Repository navigation
feat(migrate): add custom sources and migrate sources #530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
+2,412
−101
Open
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
8a7f608
feat(migrate): add custom sources and migrate sources
royanger 8c781dd
docs(changeset): Add clerk migrate sources and custom sources
royanger e3cd071
docs(migrate): list both hook validation errors for a custom source
royanger d0096a5
fix(migrate): refuse a second import while one of the same file is live
royanger fc671e3
fix(migrate): say --source takes a key or a path in the sources listing
royanger 3bb0fd2
fix(migrate): hold an exclusive lock for an import of a file, from be…
royanger 5d60274
fix(migrate): load a custom source by the hash a run records for it
royanger 3969ed4
docs(migrate): say a custom source's hash covers its own file only
royanger 72b60c5
fix(migrate): link a lock into place whole, so no reader sees it with…
royanger c1d8c6d
docs(migrate): say a custom source can import its own files, but not …
royanger 952c9df
fix(migrate): key the import lock by the secret key, so a failed inst…
royanger f8cce65
fix(migrate): lock an import by the instance too, so a second key for…
royanger 57cd24f
fix(migrate): refuse a custom source whose caveats are not a list of …
royanger 370f9f6
fix(migrate): refuse an edited custom source beside its earlier run, …
royanger fc9c896
test(migrate): let the lock-linking test pass where hard links are re…
royanger 2f1a0d2
feat(migrate): let a source you wrote replace an export file's own
royanger cb61df9
fix(migrate): refuse an edited custom source while any earlier versio…
royanger 21eb5fe
fix(migrate): match a file's earlier imports by file and instance, an…
royanger b474a9b
fix(migrate): check other unfinished runs behind an undone exact matc…
royanger 06cbbc0
fix(migrate): name an earlier run of any source when a refusal meets …
royanger a8455e1
fix(migrate): include a source's fixed defaults in `sources <source> …
royanger 085c9d5
docs(migrate): say a Ctrl-C can leave the import lock behind
royanger f9e3c1e
fix(migrate): point source authors at the Custom sources docs
royanger 72ac1d0
fix(migrate): reject an async postTransform instead of losing its cha…
royanger ef61c13
fix(migrate): name the source and row when postTransform throws
royanger e5cc22b
docs(migrate): write out the custom source hooks' contract
royanger 26a14ed
fix(migrate): mark field targets that aren't Clerk fields in `sources`
royanger 28aa6c7
fix(migrate): report a directory passed as --source as a usage error
royanger bf91117
fix(migrate): reject any thenable a postTransform returns
royanger 956763a
fix(migrate): keep a postTransform's own error and code
royanger ea768f2
fix(migrate): say a built-in source handles a field it doesn't store
royanger 22d464e
fix(migrate): keep file completion for a custom source path
royanger 2d20eb3
fix(completion): let fish complete files when the directive allows it
royanger 4cc8312
fix(migrate): check Supabase providers under a source you wrote
royanger f732892
fix(migrate): count an export's social providers under a source you w…
royanger 3e7df67
fix(migrate): skip the provider fallback for a platform this CLI does…
royanger eb28fa6
docs(migrate): say the import lock follows the key when the instance …
royanger 220a924
docs(migrate): say two imports can both reclaim a stale import lock
royanger 5672983
docs(migrate): say when an import holds only its key's lock
royanger f4b5fff
docs(migrate): say the custom-source example's email is created verified
royanger d2b969c
fix(migrate): let a preTransform parse a JSON file the CLI can't
royanger dcf656f
docs(migrate): say a preTransform's file keeps the import's format
royanger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,5 @@ | ||
| --- | ||
| "clerk": minor | ||
| --- | ||
|
|
||
| Add `clerk migrate sources`, and let `clerk migrate import --source` take the path to a source you wrote. `clerk migrate sources` lists the built-in sources with the passwords, MFA and metadata each brings across, and `clerk migrate sources <source>` shows where each field lands, how to export, and any caveats. A source you wrote is a `.ts` or `.js` file in your project, checked before use, so a platform with no built-in source can be imported without rebuilding the CLI. `clerk migrate` is still experimental and needs `CLERK_EXPERIMENTAL=migrate`. |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.