forked from bluesky-social/atproto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement export cmd (bluesky-social#70)
- Loading branch information
Showing
7 changed files
with
34 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
.DS_STORE | ||
DS_STORE | ||
node_modules | ||
yarn-error.log | ||
dist | ||
analytics.txt | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import cmd from '../../lib/command.js' | ||
import path from 'path' | ||
import { promises as fsp } from 'fs' | ||
import { loadDelegate } from '../../lib/client.js' | ||
import { REPO_PATH } from '../../lib/env.js' | ||
|
||
export default cmd({ | ||
name: 'export', | ||
category: 'repo', | ||
help: 'Export repo as a CAR file', | ||
args: [], | ||
opts: [], | ||
async command(args) { | ||
const client = await loadDelegate(REPO_PATH) | ||
const car = await client.export() | ||
const p = path.join(REPO_PATH, 'export.car') | ||
await fsp.writeFile(p, car) | ||
console.log('Exported repo to: ', p) | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters