-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #188 from oliver-oloughlin/add-module-docs
Add module docs
- Loading branch information
Showing
9 changed files
with
295 additions
and
66 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,4 +1,38 @@ | ||
import { parseArgs } from "jsr:@std/[email protected]/parse_args" | ||
/** | ||
* @module # Migrate | ||
* | ||
* A utility script and function for migrating entries from a source KV instance to | ||
* a target KV instance. Only migrates `kvdex` entries by default, but optionally | ||
* allows for migrating all entries. | ||
* | ||
* ## Script | ||
* | ||
* Run the migrate script and provide --source and --target arguments. Optionally | ||
* pass --all to migrate all entries. | ||
* | ||
* ```console | ||
* deno run -A --unstable-kv jsr:@olli/kvdex/ext/migrate --source=./source.sqlite3 --target=./target.sqlite3 | ||
* ``` | ||
* | ||
* ## Function | ||
* | ||
* Use the migrate function and pass a source KV instance and a target KV instance. | ||
* Optionally pass `all: true` to migrate all entries. | ||
* | ||
* ```ts | ||
* import { migrate } from "jsr:@olli/kvdex/ext/migrate" | ||
* | ||
* const source = await Deno.openKv("./source.sqlite3") | ||
* const target = await Deno.openKv("./target.sqlite3") | ||
* | ||
* await migrate({ | ||
* source, | ||
* target | ||
* }) | ||
* ``` | ||
*/ | ||
|
||
import { parseArgs } from "jsr:@std/cli@^0.217/parse_args" | ||
import { KVDEX_KEY_PREFIX } from "../src/constants.ts" | ||
|
||
if (import.meta.main) { | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
export { brotliCompressSync, brotliDecompressSync, constants } from "node:zlib" | ||
export { ulid } from "jsr:@std/[email protected]" | ||
export { concat } from "jsr:@std/[email protected]/concat" | ||
export { ulid } from "jsr:@std/ulid@^0.217" | ||
export { concat } from "jsr:@std/bytes@^0.217/concat" | ||
export { | ||
deepMerge, | ||
type DeepMergeOptions, | ||
} from "jsr:@std/[email protected]/deep_merge" | ||
} from "jsr:@std/collections@^0.217/deep_merge" |
Oops, something went wrong.