@statewalker/vcs-commands 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/add-command.d.ts +38 -0
- package/dist/commands/add-command.d.ts.map +1 -1
- package/dist/commands/am/am-command.d.ts +55 -1
- package/dist/commands/am/am-command.d.ts.map +1 -1
- package/dist/commands/am/index.d.ts +1 -0
- package/dist/commands/am/index.d.ts.map +1 -1
- package/dist/commands/am/mailsplit.d.ts +88 -0
- package/dist/commands/am/mailsplit.d.ts.map +1 -0
- package/dist/commands/apply/apply-command.d.ts.map +1 -1
- package/dist/commands/apply/apply-engine.d.ts.map +1 -1
- package/dist/commands/apply/apply-parse.d.ts.map +1 -1
- package/dist/commands/bisect/bisect-command.d.ts +2 -0
- package/dist/commands/bisect/bisect-command.d.ts.map +1 -1
- package/dist/commands/bisect/bisect-engine.d.ts.map +1 -1
- package/dist/commands/branch-command.d.ts +148 -18
- package/dist/commands/branch-command.d.ts.map +1 -1
- package/dist/commands/branch-info-command.d.ts +55 -0
- package/dist/commands/branch-info-command.d.ts.map +1 -0
- package/dist/commands/branch-tracking.d.ts +106 -17
- package/dist/commands/branch-tracking.d.ts.map +1 -1
- package/dist/commands/branch-upstream-command.d.ts +83 -0
- package/dist/commands/branch-upstream-command.d.ts.map +1 -0
- package/dist/commands/checkout-command.d.ts +19 -3
- package/dist/commands/checkout-command.d.ts.map +1 -1
- package/dist/commands/cherry-pick-command.d.ts +59 -0
- package/dist/commands/cherry-pick-command.d.ts.map +1 -1
- package/dist/commands/clean-command.d.ts +12 -0
- package/dist/commands/clean-command.d.ts.map +1 -1
- package/dist/commands/clone-command.d.ts +17 -0
- package/dist/commands/clone-command.d.ts.map +1 -1
- package/dist/commands/comment-char-config.d.ts +35 -0
- package/dist/commands/comment-char-config.d.ts.map +1 -0
- package/dist/commands/commit-command.d.ts +191 -5
- package/dist/commands/commit-command.d.ts.map +1 -1
- package/dist/commands/commit-reuse.d.ts +33 -0
- package/dist/commands/commit-reuse.d.ts.map +1 -0
- package/dist/commands/config-command.d.ts +236 -0
- package/dist/commands/config-command.d.ts.map +1 -0
- package/dist/commands/config-value-types.d.ts +91 -0
- package/dist/commands/config-value-types.d.ts.map +1 -0
- package/dist/commands/core-config.d.ts +20 -0
- package/dist/commands/core-config.d.ts.map +1 -1
- package/dist/commands/default-branch.d.ts +70 -0
- package/dist/commands/default-branch.d.ts.map +1 -0
- package/dist/commands/diff-color-config.d.ts +73 -0
- package/dist/commands/diff-color-config.d.ts.map +1 -0
- package/dist/commands/diff-command.d.ts +252 -5
- package/dist/commands/diff-command.d.ts.map +1 -1
- package/dist/commands/fetch-command.d.ts +20 -0
- package/dist/commands/fetch-command.d.ts.map +1 -1
- package/dist/commands/fmt-merge-msg-command.d.ts +124 -0
- package/dist/commands/fmt-merge-msg-command.d.ts.map +1 -0
- package/dist/commands/fork-point.d.ts +38 -0
- package/dist/commands/fork-point.d.ts.map +1 -0
- package/dist/commands/format-patch-command.d.ts +41 -1
- package/dist/commands/format-patch-command.d.ts.map +1 -1
- package/dist/commands/fsck/fetch-fsck.d.ts +51 -0
- package/dist/commands/fsck/fetch-fsck.d.ts.map +1 -1
- package/dist/commands/fsck/fsck-command.d.ts +2 -0
- package/dist/commands/fsck/fsck-command.d.ts.map +1 -1
- package/dist/commands/fsck/fsck-loose.d.ts +3 -0
- package/dist/commands/fsck/fsck-loose.d.ts.map +1 -1
- package/dist/commands/fsck/fsck-object-checks.d.ts +25 -14
- package/dist/commands/fsck/fsck-object-checks.d.ts.map +1 -1
- package/dist/commands/fsck/fsck-object-table.d.ts +15 -7
- package/dist/commands/fsck/fsck-object-table.d.ts.map +1 -1
- package/dist/commands/fsck/fsck-pack.d.ts +11 -4
- package/dist/commands/fsck/fsck-pack.d.ts.map +1 -1
- package/dist/commands/fsck/verify-pack-command.d.ts.map +1 -1
- package/dist/commands/gc-command.d.ts +80 -48
- package/dist/commands/gc-command.d.ts.map +1 -1
- package/dist/commands/git-date.d.ts +1 -65
- package/dist/commands/git-date.d.ts.map +1 -1
- package/dist/commands/git-describe.d.ts +4 -0
- package/dist/commands/git-describe.d.ts.map +1 -1
- package/dist/commands/git-hooks.d.ts +43 -0
- package/dist/commands/git-hooks.d.ts.map +1 -1
- package/dist/commands/grep/grep-command.d.ts +210 -0
- package/dist/commands/grep/grep-command.d.ts.map +1 -0
- package/dist/commands/grep/grep-engine.d.ts +218 -0
- package/dist/commands/grep/grep-engine.d.ts.map +1 -0
- package/dist/commands/grep/index.d.ts +3 -0
- package/dist/commands/grep/index.d.ts.map +1 -0
- package/dist/commands/index-adder.d.ts +15 -2
- package/dist/commands/index-adder.d.ts.map +1 -1
- package/dist/commands/index.d.ts +28 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +3 -3
- package/dist/commands/init-command.d.ts +50 -3
- package/dist/commands/init-command.d.ts.map +1 -1
- package/dist/commands/interpret-trailers-command.d.ts +90 -0
- package/dist/commands/interpret-trailers-command.d.ts.map +1 -0
- package/dist/commands/legacy-remotes.d.ts +55 -0
- package/dist/commands/legacy-remotes.d.ts.map +1 -0
- package/dist/commands/local-transport.d.ts +36 -5
- package/dist/commands/local-transport.d.ts.map +1 -1
- package/dist/commands/log-command.d.ts +296 -11
- package/dist/commands/log-command.d.ts.map +1 -1
- package/dist/commands/log-graph.d.ts +26 -1
- package/dist/commands/log-graph.d.ts.map +1 -1
- package/dist/commands/log-output.d.ts +133 -5
- package/dist/commands/log-output.d.ts.map +1 -1
- package/dist/commands/ls-remote-command.d.ts +2 -0
- package/dist/commands/ls-remote-command.d.ts.map +1 -1
- package/dist/commands/mailmap.d.ts +30 -0
- package/dist/commands/mailmap.d.ts.map +1 -1
- package/dist/commands/merge-base-command.d.ts +60 -0
- package/dist/commands/merge-base-command.d.ts.map +1 -0
- package/dist/commands/merge-bases.d.ts +23 -0
- package/dist/commands/merge-bases.d.ts.map +1 -1
- package/dist/commands/merge-command.d.ts +108 -9
- package/dist/commands/merge-command.d.ts.map +1 -1
- package/dist/commands/merge-support.d.ts +11 -3
- package/dist/commands/merge-support.d.ts.map +1 -1
- package/dist/commands/mv-command.d.ts +4 -0
- package/dist/commands/mv-command.d.ts.map +1 -1
- package/dist/commands/name-rev.d.ts +48 -0
- package/dist/commands/name-rev.d.ts.map +1 -0
- package/dist/commands/notes-command.d.ts.map +1 -1
- package/dist/commands/notes-merge-command.d.ts.map +1 -1
- package/dist/commands/notes-tree.d.ts +11 -1
- package/dist/commands/notes-tree.d.ts.map +1 -1
- package/dist/commands/patch-id.d.ts +3 -0
- package/dist/commands/patch-id.d.ts.map +1 -1
- package/dist/commands/pathspec-file.d.ts +39 -0
- package/dist/commands/pathspec-file.d.ts.map +1 -0
- package/dist/commands/pathspec.d.ts +3 -0
- package/dist/commands/pathspec.d.ts.map +1 -1
- package/dist/commands/pretty-format.d.ts +43 -3
- package/dist/commands/pretty-format.d.ts.map +1 -1
- package/dist/commands/promisor-remote.d.ts.map +1 -1
- package/dist/commands/pull-command.d.ts +28 -0
- package/dist/commands/pull-command.d.ts.map +1 -1
- package/dist/commands/push-command.d.ts +160 -9
- package/dist/commands/push-command.d.ts.map +1 -1
- package/dist/commands/read-tree-command.d.ts +6 -0
- package/dist/commands/read-tree-command.d.ts.map +1 -1
- package/dist/commands/rebase-command.d.ts +168 -6
- package/dist/commands/rebase-command.d.ts.map +1 -1
- package/dist/commands/ref-filter/for-each-ref-command.d.ts +121 -0
- package/dist/commands/ref-filter/for-each-ref-command.d.ts.map +1 -0
- package/dist/commands/ref-filter/index.d.ts +8 -0
- package/dist/commands/ref-filter/index.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-atoms.d.ts +88 -0
- package/dist/commands/ref-filter/ref-atoms.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-filter.d.ts +178 -0
- package/dist/commands/ref-filter/ref-filter.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-format.d.ts +222 -0
- package/dist/commands/ref-filter/ref-format.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-listing-command.d.ts +56 -0
- package/dist/commands/ref-filter/ref-listing-command.d.ts.map +1 -0
- package/dist/commands/ref-filter/ref-quote.d.ts +20 -0
- package/dist/commands/ref-filter/ref-quote.d.ts.map +1 -0
- package/dist/commands/ref-filter/version-compare.d.ts +20 -0
- package/dist/commands/ref-filter/version-compare.d.ts.map +1 -0
- package/dist/commands/reflog-command.d.ts +120 -0
- package/dist/commands/reflog-command.d.ts.map +1 -1
- package/dist/commands/reflog-walk.d.ts +72 -0
- package/dist/commands/reflog-walk.d.ts.map +1 -0
- package/dist/commands/remote-command.d.ts +138 -29
- package/dist/commands/remote-command.d.ts.map +1 -1
- package/dist/commands/remote-transport.d.ts +7 -1
- package/dist/commands/remote-transport.d.ts.map +1 -1
- package/dist/commands/reset-command.d.ts +2 -3
- package/dist/commands/reset-command.d.ts.map +1 -1
- package/dist/commands/restore-command.d.ts +2 -3
- package/dist/commands/restore-command.d.ts.map +1 -1
- package/dist/commands/rev-filter/commit-filter.d.ts +95 -0
- package/dist/commands/rev-filter/commit-filter.d.ts.map +1 -0
- package/dist/commands/rev-filter/commit-grep.d.ts +91 -0
- package/dist/commands/rev-filter/commit-grep.d.ts.map +1 -0
- package/dist/commands/rev-filter/index.d.ts +3 -0
- package/dist/commands/rev-filter/index.d.ts.map +1 -0
- package/dist/commands/rev-list-command.d.ts +154 -2
- package/dist/commands/rev-list-command.d.ts.map +1 -1
- package/dist/commands/rev-parse-command.d.ts +9 -0
- package/dist/commands/rev-parse-command.d.ts.map +1 -1
- package/dist/commands/revert-command.d.ts +32 -0
- package/dist/commands/revert-command.d.ts.map +1 -1
- package/dist/commands/revision-range.d.ts +32 -1
- package/dist/commands/revision-range.d.ts.map +1 -1
- package/dist/commands/revision-resolver.d.ts +21 -2
- package/dist/commands/revision-resolver.d.ts.map +1 -1
- package/dist/commands/rm-command.d.ts +70 -2
- package/dist/commands/rm-command.d.ts.map +1 -1
- package/dist/commands/sequencer-pick.d.ts +85 -5
- package/dist/commands/sequencer-pick.d.ts.map +1 -1
- package/dist/commands/sequencer-support.d.ts +2 -0
- package/dist/commands/sequencer-support.d.ts.map +1 -1
- package/dist/commands/serve-repository.d.ts +7 -0
- package/dist/commands/serve-repository.d.ts.map +1 -1
- package/dist/commands/show-command.d.ts +130 -0
- package/dist/commands/show-command.d.ts.map +1 -0
- package/dist/commands/show-commit.d.ts +11 -0
- package/dist/commands/show-commit.d.ts.map +1 -0
- package/dist/commands/signature-check.d.ts +164 -0
- package/dist/commands/signature-check.d.ts.map +1 -0
- package/dist/commands/signing.d.ts +160 -0
- package/dist/commands/signing.d.ts.map +1 -0
- package/dist/commands/sparse-checkout-command.d.ts.map +1 -1
- package/dist/commands/sparse-index-view.d.ts +45 -0
- package/dist/commands/sparse-index-view.d.ts.map +1 -0
- package/dist/commands/ssh-signer.d.ts +29 -0
- package/dist/commands/ssh-signer.d.ts.map +1 -0
- package/dist/commands/ssh-verifier.d.ts +42 -0
- package/dist/commands/ssh-verifier.d.ts.map +1 -0
- package/dist/commands/stash-apply-command.d.ts +5 -0
- package/dist/commands/stash-apply-command.d.ts.map +1 -1
- package/dist/commands/stash-branch-command.d.ts +34 -0
- package/dist/commands/stash-branch-command.d.ts.map +1 -0
- package/dist/commands/stash-create-command.d.ts +18 -1
- package/dist/commands/stash-create-command.d.ts.map +1 -1
- package/dist/commands/stash-info.d.ts +93 -0
- package/dist/commands/stash-info.d.ts.map +1 -0
- package/dist/commands/stash-list-command.d.ts +16 -0
- package/dist/commands/stash-list-command.d.ts.map +1 -1
- package/dist/commands/stash-pop-command.d.ts +39 -0
- package/dist/commands/stash-pop-command.d.ts.map +1 -0
- package/dist/commands/stash-show-command.d.ts +48 -0
- package/dist/commands/stash-show-command.d.ts.map +1 -0
- package/dist/commands/stash-store-command.d.ts +29 -0
- package/dist/commands/stash-store-command.d.ts.map +1 -0
- package/dist/commands/stash-working-tree.d.ts.map +1 -1
- package/dist/commands/status-command.d.ts.map +1 -1
- package/dist/commands/status-header.d.ts +5 -0
- package/dist/commands/status-header.d.ts.map +1 -1
- package/dist/commands/submodule-add-command.d.ts +89 -0
- package/dist/commands/submodule-add-command.d.ts.map +1 -0
- package/dist/commands/submodule-auth.d.ts +90 -0
- package/dist/commands/submodule-auth.d.ts.map +1 -0
- package/dist/commands/submodule-commands.d.ts +375 -0
- package/dist/commands/submodule-commands.d.ts.map +1 -0
- package/dist/commands/submodule-model.d.ts +288 -0
- package/dist/commands/submodule-model.d.ts.map +1 -0
- package/dist/commands/submodule-summary-command.d.ts.map +1 -1
- package/dist/commands/submodule-update-command.d.ts +198 -0
- package/dist/commands/submodule-update-command.d.ts.map +1 -0
- package/dist/commands/switch-command.d.ts.map +1 -1
- package/dist/commands/tag-command.d.ts +259 -10
- package/dist/commands/tag-command.d.ts.map +1 -1
- package/dist/commands/trailers.d.ts +218 -17
- package/dist/commands/trailers.d.ts.map +1 -1
- package/dist/commands/tree-restore.d.ts +7 -0
- package/dist/commands/tree-restore.d.ts.map +1 -1
- package/dist/commands/untracked-cache-support.d.ts +2 -1
- package/dist/commands/untracked-cache-support.d.ts.map +1 -1
- package/dist/commands/verify-command.d.ts +92 -0
- package/dist/commands/verify-command.d.ts.map +1 -0
- package/dist/commands/worktree-add-command.d.ts +79 -7
- package/dist/commands/worktree-add-command.d.ts.map +1 -1
- package/dist/commands/worktree-list-command.d.ts.map +1 -1
- package/dist/commands/worktree-path-rules.d.ts +66 -0
- package/dist/commands/worktree-path-rules.d.ts.map +1 -0
- package/dist/commands/worktree-remove-command.d.ts +10 -3
- package/dist/commands/worktree-remove-command.d.ts.map +1 -1
- package/dist/commands/worktree-repair-command.d.ts +15 -2
- package/dist/commands/worktree-repair-command.d.ts.map +1 -1
- package/dist/commands/worktree-support.d.ts +5 -0
- package/dist/commands/worktree-support.d.ts.map +1 -1
- package/dist/{commands-DnmlfwGV.js → commands-ISM52N0n.js} +66120 -49271
- package/dist/errors/checkout-errors.d.ts +19 -0
- package/dist/errors/checkout-errors.d.ts.map +1 -1
- package/dist/errors/command-errors.d.ts.map +1 -1
- package/dist/errors/index.js +57 -3
- package/dist/errors/ref-errors.d.ts +19 -0
- package/dist/errors/ref-errors.d.ts.map +1 -1
- package/dist/errors/worktree-errors.d.ts +6 -1
- package/dist/errors/worktree-errors.d.ts.map +1 -1
- package/dist/{git-command-DxvwPrPB.js → fsck-DLRpbwTj.js} +6863 -1070
- package/dist/git-command.d.ts +43 -2
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +276 -3
- package/dist/git.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/remote-config/index.d.ts +1 -1
- package/dist/remote-config/index.d.ts.map +1 -1
- package/dist/remote-config/remote-config-store.d.ts +117 -3
- package/dist/remote-config/remote-config-store.d.ts.map +1 -1
- package/dist/rename/detect-renames.d.ts.map +1 -1
- package/dist/results/clone-result.d.ts +8 -0
- package/dist/results/clone-result.d.ts.map +1 -1
- package/dist/results/combined-diff.d.ts +3 -0
- package/dist/results/combined-diff.d.ts.map +1 -1
- package/dist/results/diff-check.d.ts +38 -0
- package/dist/results/diff-check.d.ts.map +1 -0
- package/dist/results/diff-color.d.ts +135 -0
- package/dist/results/diff-color.d.ts.map +1 -0
- package/dist/results/diff-output.d.ts +85 -1
- package/dist/results/diff-output.d.ts.map +1 -1
- package/dist/results/diff-pickaxe.d.ts +67 -0
- package/dist/results/diff-pickaxe.d.ts.map +1 -0
- package/dist/results/diff-words.d.ts +55 -0
- package/dist/results/diff-words.d.ts.map +1 -0
- package/dist/results/index.d.ts +4 -0
- package/dist/results/index.d.ts.map +1 -1
- package/dist/results/index.js +2 -2
- package/dist/results/init-result.d.ts +7 -0
- package/dist/results/init-result.d.ts.map +1 -1
- package/dist/results/pull-result.d.ts +5 -0
- package/dist/results/pull-result.d.ts.map +1 -1
- package/dist/results/push-result.d.ts +12 -0
- package/dist/results/push-result.d.ts.map +1 -1
- package/dist/results/rebase-result.d.ts +2 -0
- package/dist/results/rebase-result.d.ts.map +1 -1
- package/dist/results/stash-result.d.ts +6 -0
- package/dist/results/stash-result.d.ts.map +1 -1
- package/dist/results/status-result.d.ts.map +1 -1
- package/dist/{results-BZGa2Z3I.js → results-TB2IJ64h.js} +2178 -412
- package/dist/whitespace/index.d.ts +2 -0
- package/dist/whitespace/index.d.ts.map +1 -0
- package/dist/whitespace/whitespace-rule.d.ts +94 -0
- package/dist/whitespace/whitespace-rule.d.ts.map +1 -0
- package/package.json +12 -12
- package/src/commands/add-command.ts +178 -17
- package/src/commands/add-patch/add-interactive.ts +3 -3
- package/src/commands/am/am-command.ts +263 -43
- package/src/commands/am/index.ts +1 -0
- package/src/commands/am/mailsplit.ts +326 -0
- package/src/commands/apply/apply-command.ts +18 -8
- package/src/commands/apply/apply-engine.ts +6 -7
- package/src/commands/apply/apply-parse.ts +10 -10
- package/src/commands/attributes-source.ts +1 -1
- package/src/commands/bisect/bisect-command.ts +18 -5
- package/src/commands/bisect/bisect-engine.ts +2 -1
- package/src/commands/branch-command.ts +528 -53
- package/src/commands/branch-info-command.ts +150 -0
- package/src/commands/branch-tracking.ts +335 -60
- package/src/commands/branch-upstream-command.ts +218 -0
- package/src/commands/checkout-command.ts +70 -44
- package/src/commands/cherry-pick-command.ts +143 -0
- package/src/commands/clean-command.ts +34 -3
- package/src/commands/clone-command.ts +118 -5
- package/src/commands/comment-char-config.ts +160 -0
- package/src/commands/commit-command.ts +790 -71
- package/src/commands/commit-reuse.ts +94 -0
- package/src/commands/config-command.ts +1256 -0
- package/src/commands/config-value-types.ts +358 -0
- package/src/commands/core-config.ts +47 -2
- package/src/commands/default-branch.ts +196 -0
- package/src/commands/diff-color-config.ts +274 -0
- package/src/commands/diff-command.ts +1053 -75
- package/src/commands/fetch-command.ts +161 -13
- package/src/commands/fmt-merge-msg-command.ts +715 -0
- package/src/commands/fork-point.ts +63 -0
- package/src/commands/format-patch-command.ts +316 -43
- package/src/commands/fsck/fetch-fsck.ts +172 -18
- package/src/commands/fsck/fsck-command.ts +183 -66
- package/src/commands/fsck/fsck-loose.ts +14 -4
- package/src/commands/fsck/fsck-object-checks.ts +87 -46
- package/src/commands/fsck/fsck-object-table.ts +52 -42
- package/src/commands/fsck/fsck-pack.ts +64 -34
- package/src/commands/fsck/verify-pack-command.ts +5 -2
- package/src/commands/gc-command.ts +238 -107
- package/src/commands/git-date.ts +9 -895
- package/src/commands/git-describe.ts +31 -11
- package/src/commands/git-hooks.ts +92 -0
- package/src/commands/grep/grep-command.ts +1077 -0
- package/src/commands/grep/grep-engine.ts +1024 -0
- package/src/commands/grep/index.ts +2 -0
- package/src/commands/index-adder.ts +54 -10
- package/src/commands/index.ts +28 -0
- package/src/commands/init-command.ts +167 -11
- package/src/commands/interpret-trailers-command.ts +256 -0
- package/src/commands/legacy-remotes.ts +224 -0
- package/src/commands/local-transport.ts +109 -10
- package/src/commands/log-command.ts +1283 -232
- package/src/commands/log-graph.ts +123 -26
- package/src/commands/log-output.ts +280 -21
- package/src/commands/ls-remote-command.ts +9 -0
- package/src/commands/mailmap.ts +119 -0
- package/src/commands/merge-base-command.ts +170 -0
- package/src/commands/merge-bases.ts +63 -8
- package/src/commands/merge-command.ts +360 -82
- package/src/commands/merge-support.ts +43 -9
- package/src/commands/mv-command.ts +6 -3
- package/src/commands/name-rev.ts +171 -0
- package/src/commands/notes-command.ts +11 -1
- package/src/commands/notes-merge-command.ts +23 -14
- package/src/commands/notes-tree.ts +28 -13
- package/src/commands/octopus-merge.ts +3 -2
- package/src/commands/patch-id.ts +16 -8
- package/src/commands/pathspec-file.ts +72 -0
- package/src/commands/pathspec.ts +14 -2
- package/src/commands/pretty-format.ts +105 -20
- package/src/commands/promisor-remote.ts +10 -1
- package/src/commands/pull-command.ts +149 -22
- package/src/commands/push-command.ts +704 -72
- package/src/commands/read-tree-command.ts +34 -3
- package/src/commands/rebase-command.ts +957 -142
- package/src/commands/ref-filter/for-each-ref-command.ts +298 -0
- package/src/commands/ref-filter/index.ts +7 -0
- package/src/commands/ref-filter/ref-atoms.ts +581 -0
- package/src/commands/ref-filter/ref-filter.ts +651 -0
- package/src/commands/ref-filter/ref-format.ts +1070 -0
- package/src/commands/ref-filter/ref-listing-command.ts +421 -0
- package/src/commands/ref-filter/ref-quote.ts +69 -0
- package/src/commands/ref-filter/version-compare.ts +177 -0
- package/src/commands/reflog-command.ts +492 -2
- package/src/commands/reflog-walk.ts +234 -0
- package/src/commands/remote-command.ts +484 -74
- package/src/commands/remote-transport.ts +9 -1
- package/src/commands/reset-command.ts +40 -42
- package/src/commands/restore-command.ts +12 -41
- package/src/commands/rev-filter/commit-filter.ts +159 -0
- package/src/commands/rev-filter/commit-grep.ts +444 -0
- package/src/commands/rev-filter/index.ts +2 -0
- package/src/commands/rev-list-command.ts +402 -15
- package/src/commands/rev-parse-command.ts +22 -0
- package/src/commands/revert-command.ts +82 -0
- package/src/commands/revision-range.ts +204 -4
- package/src/commands/revision-resolver.ts +55 -22
- package/src/commands/rm-command.ts +282 -21
- package/src/commands/sequencer-pick.ts +504 -86
- package/src/commands/sequencer-support.ts +30 -5
- package/src/commands/serve-repository.ts +18 -3
- package/src/commands/show-command.ts +490 -0
- package/src/commands/show-commit.ts +24 -0
- package/src/commands/signature-check.ts +657 -0
- package/src/commands/signing.ts +385 -0
- package/src/commands/sparse-checkout-command.ts +2 -9
- package/src/commands/sparse-checkout-support.ts +2 -2
- package/src/commands/sparse-index-view.ts +135 -0
- package/src/commands/ssh-signer.ts +199 -0
- package/src/commands/ssh-verifier.ts +523 -0
- package/src/commands/stash-apply-command.ts +17 -5
- package/src/commands/stash-branch-command.ts +88 -0
- package/src/commands/stash-create-command.ts +30 -2
- package/src/commands/stash-info.ts +243 -0
- package/src/commands/stash-list-command.ts +33 -0
- package/src/commands/stash-pop-command.ts +83 -0
- package/src/commands/stash-show-command.ts +141 -0
- package/src/commands/stash-store-command.ts +82 -0
- package/src/commands/stash-working-tree.ts +2 -2
- package/src/commands/status-command.ts +7 -6
- package/src/commands/status-header.ts +44 -8
- package/src/commands/submodule-add-command.ts +509 -0
- package/src/commands/submodule-auth.ts +276 -0
- package/src/commands/submodule-commands.ts +1517 -0
- package/src/commands/submodule-model.ts +930 -0
- package/src/commands/submodule-summary-command.ts +6 -7
- package/src/commands/submodule-update-command.ts +1092 -0
- package/src/commands/switch-command.ts +3 -1
- package/src/commands/tag-command.ts +876 -64
- package/src/commands/trailers.ts +837 -100
- package/src/commands/tree-restore.ts +38 -10
- package/src/commands/untracked-cache-support.ts +16 -12
- package/src/commands/verify-command.ts +235 -0
- package/src/commands/worktree-add-command.ts +268 -24
- package/src/commands/worktree-list-command.ts +3 -5
- package/src/commands/worktree-path-rules.ts +183 -0
- package/src/commands/worktree-remove-command.ts +39 -5
- package/src/commands/worktree-repair-command.ts +52 -5
- package/src/commands/worktree-support.ts +22 -1
- package/src/core-commands/add.command.impl.ts +1 -1
- package/src/errors/checkout-errors.ts +29 -0
- package/src/errors/command-errors.ts +2 -1
- package/src/errors/ref-errors.ts +23 -0
- package/src/errors/worktree-errors.ts +8 -1
- package/src/git-command.ts +98 -3
- package/src/git.ts +420 -4
- package/src/remote-config/index.ts +4 -0
- package/src/remote-config/remote-config-store.ts +238 -11
- package/src/rename/detect-renames.ts +5 -1
- package/src/results/clone-result.ts +9 -0
- package/src/results/combined-diff.ts +38 -18
- package/src/results/diff-check.ts +185 -0
- package/src/results/diff-color.ts +868 -0
- package/src/results/diff-output.ts +204 -37
- package/src/results/diff-pickaxe.ts +304 -0
- package/src/results/diff-words.ts +395 -0
- package/src/results/index.ts +4 -0
- package/src/results/init-result.ts +9 -0
- package/src/results/pull-result.ts +5 -0
- package/src/results/push-result.ts +12 -0
- package/src/results/rebase-result.ts +3 -0
- package/src/results/stash-result.ts +7 -0
- package/src/results/status-result.ts +5 -2
- package/src/whitespace/index.ts +1 -0
- package/src/{commands/apply/whitespace.ts → whitespace/whitespace-rule.ts} +173 -23
- package/dist/commands/apply/whitespace.d.ts +0 -58
- package/dist/commands/apply/whitespace.d.ts.map +0 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { ObjectId } from "@statewalker/vcs-core";
|
|
2
|
+
import { GitCommand } from "../git-command.js";
|
|
3
|
+
import { type StashApplyResult } from "../results/stash-result.js";
|
|
4
|
+
/** Which git a stash command answers as, where 2.43 and 2.5x differ. */
|
|
5
|
+
export type StashCompatibility = "2.43" | "2.56";
|
|
6
|
+
/**
|
|
7
|
+
* git's `struct stash_info`: a stash named on the command line, read as `get_stash_info` reads
|
|
8
|
+
* it.
|
|
9
|
+
*/
|
|
10
|
+
export interface StashInfo {
|
|
11
|
+
/** The revision as git spells it (`refs/stash@{0}` when none is named, `refs/stash@{n}` for `n`) */
|
|
12
|
+
readonly revision: string;
|
|
13
|
+
/** The stash commit (its tree is the worktree state) */
|
|
14
|
+
readonly wCommit: ObjectId;
|
|
15
|
+
/** Its first parent: the commit the stash was made on */
|
|
16
|
+
readonly bCommit: ObjectId;
|
|
17
|
+
/** Its second parent: the index state */
|
|
18
|
+
readonly iCommit: ObjectId;
|
|
19
|
+
/** Its third parent, when the untracked files were stashed */
|
|
20
|
+
readonly uCommit?: ObjectId;
|
|
21
|
+
readonly wTree: ObjectId;
|
|
22
|
+
readonly bTree: ObjectId;
|
|
23
|
+
readonly iTree: ObjectId;
|
|
24
|
+
readonly uTree?: ObjectId;
|
|
25
|
+
/** Whether the revision names an entry of `refs/stash` (git's `is_stash_ref`) */
|
|
26
|
+
readonly isStashRef: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* What the stash subcommands that read an entry share (`pop`, `show`, `branch`): git's
|
|
30
|
+
* `parse_stash_revision` and `get_stash_info`, with their messages and exit statuses.
|
|
31
|
+
*/
|
|
32
|
+
export declare abstract class StashInfoCommand<T> extends GitCommand<T> {
|
|
33
|
+
protected compatibility: StashCompatibility;
|
|
34
|
+
/**
|
|
35
|
+
* Answer as git 2.43 or 2.5x where they differ: 2.5x exits 128 where a stash subcommand
|
|
36
|
+
* fails (`cmd_stash` maps a failure to die's status, keeping 1 for a conflicted apply),
|
|
37
|
+
* 2.43 exits 1; 2.5x reads `stash.index`.
|
|
38
|
+
*/
|
|
39
|
+
setCompatibility(version: StashCompatibility): this;
|
|
40
|
+
/** The exit status of a subcommand's `error()` return (`ret < 0`) */
|
|
41
|
+
protected get failureExitCode(): number;
|
|
42
|
+
/**
|
|
43
|
+
* git's get_stash_info: the stash named by `commit` (none: `refs/stash@{0}`; a number n:
|
|
44
|
+
* `refs/stash@{n}`), refused as git refuses it:
|
|
45
|
+
*
|
|
46
|
+
* - no stash named and none kept: `No stash entries found.`;
|
|
47
|
+
* - a revision naming nothing: `error: <rev> is not a valid reference`;
|
|
48
|
+
* - an entry beyond the reflog: `fatal: log for '<ref>' only has <n> entries` (dies);
|
|
49
|
+
* - a commit that is no stash: `fatal: '<rev>' is not a stash-like commit` (dies).
|
|
50
|
+
*/
|
|
51
|
+
protected getStashInfo(commit?: string): Promise<StashInfo>;
|
|
52
|
+
/**
|
|
53
|
+
* git's is_stash_ref: the revision's part before its first `@`, as dwim_ref expands it,
|
|
54
|
+
* is `refs/stash`.
|
|
55
|
+
*/
|
|
56
|
+
private isStashRef;
|
|
57
|
+
/** What the subcommand printed on stdout, line by line (see {@link getOutput}) */
|
|
58
|
+
protected readonly output: string[];
|
|
59
|
+
/**
|
|
60
|
+
* What the subcommand printed on stdout as git prints it, once `call()` has returned or
|
|
61
|
+
* thrown: the merge's messages, `git status`'s long format, then `Dropped <rev> (<id>)`
|
|
62
|
+
* or `The stash entry is kept in case you need it again.`; empty when nothing was printed.
|
|
63
|
+
*/
|
|
64
|
+
getOutput(): string;
|
|
65
|
+
/**
|
|
66
|
+
* git's do_apply_stash for `pop` and `branch`: the stash applied (see
|
|
67
|
+
* {@link StashApplyCommand}), then, unless `quiet`, the merge's messages and `git status`
|
|
68
|
+
* printed. A conflicted apply returns its result (`Index was not unstashed.` in its
|
|
69
|
+
* warnings under `index`); a refusal throws, its exit status mapped as `cmd_stash` maps
|
|
70
|
+
* it, after the status is printed where git prints it (a refused merge, not a refused
|
|
71
|
+
* `--index` or an index with conflicts, which return before).
|
|
72
|
+
*/
|
|
73
|
+
protected applyStash(info: StashInfo, options: {
|
|
74
|
+
index: boolean;
|
|
75
|
+
quiet: boolean;
|
|
76
|
+
}): Promise<StashApplyResult>;
|
|
77
|
+
/** `git status`, as do_apply_stash runs it after an apply. */
|
|
78
|
+
private printStatus;
|
|
79
|
+
/**
|
|
80
|
+
* git's do_drop_stash: `reflog delete --rewrite --updateref <rev>`, then `Dropped <rev>
|
|
81
|
+
* (<id>)` unless `quiet`; refs/stash goes with its last entry. A revision naming no
|
|
82
|
+
* entry by number fails as reflog_delete does (`error: not a reflog: <rev>`).
|
|
83
|
+
*/
|
|
84
|
+
protected dropStash(info: StashInfo, quiet: boolean): Promise<void>;
|
|
85
|
+
/** `stash.index` (2.5x): whether `pop` and `apply` default to `--index`. */
|
|
86
|
+
protected configuredIndex(): boolean;
|
|
87
|
+
/**
|
|
88
|
+
* The `refs/stash` reflog position `revision` names (`stash@{n}`, `refs/stash@{n}`),
|
|
89
|
+
* for `reflog delete`; undefined when it names none by number.
|
|
90
|
+
*/
|
|
91
|
+
protected reflogIndexOf(revision: string): number | undefined;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=stash-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stash-info.d.ts","sourceRoot":"","sources":["../../src/commands/stash-info.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,KAAK,gBAAgB,EAAoB,MAAM,4BAA4B,CAAC;AAOrF,wEAAwE;AACxE,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjD;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,oGAAoG;IACpG,Q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B3B;IAED,8DAA8D;YAChD,WAAW;IAKzB;;;;OAIG;IACH,UAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAUxE;IAED,4EAA4E;IAC5E,SAAS,CAAC,eAAe,IAAI,OAAO,CAGnC;IAED;;;OAGG;IACH,SAAS,CAAC,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAG5D;CACF"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { GitCommand } from "../git-command.js";
|
|
2
2
|
import type { StashEntry } from "../results/stash-result.js";
|
|
3
|
+
import { LogCommand } from "./log-command.js";
|
|
4
|
+
import type { LogOutputOptions } from "./log-output.js";
|
|
3
5
|
/**
|
|
4
6
|
* Reference name for stash.
|
|
5
7
|
*/
|
|
@@ -27,6 +29,20 @@ export declare class StashListCommand extends GitCommand<StashEntry[]> {
|
|
|
27
29
|
* @returns Array of stash entries, most recent first
|
|
28
30
|
*/
|
|
29
31
|
call(): Promise<StashEntry[]>;
|
|
32
|
+
/**
|
|
33
|
+
* `git stash list [<log-options>]` as git prints it: `git log --format="%gd: %gs" -g
|
|
34
|
+
* --first-parent <options> refs/stash --`, so `stash@{0}: WIP on main: ...` by default,
|
|
35
|
+
* and the log's formats, dates and diffs (`-p`, `--stat`: each entry against the commit
|
|
36
|
+
* it was made on) when asked. `walk` sets the walk's options on the log command (`-n`,
|
|
37
|
+
* `--skip`, `--grep`, `--author`...). Nothing is printed without a stash.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```typescript
|
|
41
|
+
* await git.stashList().callText(); // "stash@{0}: On main: msg\n"
|
|
42
|
+
* await git.stashList().callText({ stat: true }, (log) => log.setMaxCount(1));
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
callText(options?: LogOutputOptions, walk?: (log: LogCommand) => void): Promise<string>;
|
|
30
46
|
/**
|
|
31
47
|
* Get stash entries: the reflog of `refs/stash`, newest first, as `git stash list`
|
|
32
48
|
* reads it. A store without reflogs gives only the current `refs/stash`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stash-list-command.d.ts","sourceRoot":"","sources":["../../src/commands/stash-list-command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"stash-list-command.d.ts","sourceRoot":"","sources":["../../src/commands/stash-list-command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,SAAS,eAAe,CAAC;AAEtC;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,gBAAiB,SAAQ,UAAU,CAAC,UAAU,EAAE,CAAC;IAC5D;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAyBlC;IAED;;;;;;;;;;;;OAYG;IACG,QAAQ,CACZ,OAAO,GAAE,gBAAqB,EAC9B,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,IAAI,GAC/B,OAAO,CAAC,MAAM,CAAC,CAajB;IAED;;;OAGG;YACW,cAAc;IA0B5B;;OAEG;YACW,eAAe;CA6B9B"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { StashApplyResult } from "../results/stash-result.js";
|
|
2
|
+
import { StashInfoCommand } from "./stash-info.js";
|
|
3
|
+
/** What `git stash pop` did: the apply's result, and whether the entry was dropped. */
|
|
4
|
+
export interface StashPopResult extends StashApplyResult {
|
|
5
|
+
/** Whether the entry was dropped (false when the apply left conflicts: it is kept) */
|
|
6
|
+
readonly dropped: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* `git stash pop [--index] [-q] [<stash>]`: the stash applied as `stash apply` applies it,
|
|
10
|
+
* then dropped from `refs/stash`'s reflog.
|
|
11
|
+
*
|
|
12
|
+
* As git's pop_stash: the stash must be an entry of `refs/stash` (`error: '<rev>' is not a
|
|
13
|
+
* stash reference`, nothing applied); an apply with conflicts keeps the entry (status
|
|
14
|
+
* CONFLICTS, `dropped` false, `The stash entry is kept in case you need it again.`); a
|
|
15
|
+
* refused apply throws and keeps it too. What git prints on stdout (the merge's messages,
|
|
16
|
+
* `git status`, `Dropped refs/stash@{0} (<id>)`) is {@link getOutput}.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const result = await git.stashPop().call();
|
|
21
|
+
* if (!result.dropped) console.log("conflicts in", result.conflicts);
|
|
22
|
+
*
|
|
23
|
+
* // git stash pop --index stash@{1}
|
|
24
|
+
* await git.stashPop().setStashRef("stash@{1}").setRestoreIndex(true).call();
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare class StashPopCommand extends StashInfoCommand<StashPopResult> {
|
|
28
|
+
private stashRef?;
|
|
29
|
+
private restoreIndex?;
|
|
30
|
+
private quiet;
|
|
31
|
+
/** The stash to pop: `stash@{n}`, `refs/stash@{n}` or a number n (default the newest). */
|
|
32
|
+
setStashRef(stashRef: string): this;
|
|
33
|
+
/** `--index` / `--no-index` (default `stash.index` in 2.5x, else off). */
|
|
34
|
+
setRestoreIndex(restoreIndex: boolean): this;
|
|
35
|
+
/** `-q`: neither the merge's messages, the status nor `Dropped ...` are printed. */
|
|
36
|
+
setQuiet(quiet: boolean): this;
|
|
37
|
+
call(): Promise<StashPopResult>;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=stash-pop-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stash-pop-command.d.ts","sourceRoot":"","sources":["../../src/commands/stash-pop-command.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,uFAAuF;AACvF,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD,sFAAsF;IACtF,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,eAAgB,SAAQ,gBAAgB,CAAC,cAAc,CAAC;IACnE,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,YAAY,CAAC,CAAU;IAC/B,OAAO,CAAC,KAAK,CAAS;IAEtB,0FAA0F;IAC1F,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAIlC;IAED,0EAA0E;IAC1E,eAAe,CAAC,YAAY,EAAE,OAAO,GAAG,IAAI,CAI3C;IAED,oFAAoF;IACpF,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI7B;IAEK,IAAI,IAAI,OAAO,CAAC,cAAc,CAAC,CAyBpC;CACF"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type DiffOutputFormat, type DiffTextOptions } from "./diff-command.js";
|
|
2
|
+
import { StashInfoCommand } from "./stash-info.js";
|
|
3
|
+
/** Which part of a stash `git stash show` shows. */
|
|
4
|
+
export type StashShowUntracked = "none" | "include" | "only";
|
|
5
|
+
/**
|
|
6
|
+
* `git stash show [-u | --only-untracked] [<diff-options>] [<stash>]`: the change a stash
|
|
7
|
+
* records, from the commit it was made on to its worktree state, printed as `git diff`.
|
|
8
|
+
*
|
|
9
|
+
* As git's show_stash: with no diff option given, `stash.showStat` (default true) and
|
|
10
|
+
* `stash.showPatch` (default false) choose `--stat`, the patch, both, or nothing; any diff
|
|
11
|
+
* option ({@link setFormats}, {@link setOptions}) turns them off (the patch by default).
|
|
12
|
+
* `-u` ({@link setUntracked} `include`, default `stash.showIncludeUntracked`) adds the
|
|
13
|
+
* stashed untracked files (git's `diff_include_untracked`: the worktree and untracked trees
|
|
14
|
+
* merged, a path in both refused with `worktree and untracked commit have duplicate
|
|
15
|
+
* entries`), `--only-untracked` shows them alone (a root diff of the untracked tree).
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* const stat = await git.stashShow().call(); // git stash show
|
|
20
|
+
* const patch = await git.stashShow().setStashRef("1").setFormats(["patch"]).call();
|
|
21
|
+
* const all = await git.stashShow().setUntracked("include").setFormats(["stat", "patch"]).call();
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class StashShowCommand extends StashInfoCommand<string> {
|
|
25
|
+
private stashRef?;
|
|
26
|
+
private untracked?;
|
|
27
|
+
private formats?;
|
|
28
|
+
private diffOptions?;
|
|
29
|
+
/** The stash to show: `stash@{n}`, a number n, or any stash-like commit. */
|
|
30
|
+
setStashRef(stashRef: string): this;
|
|
31
|
+
/**
|
|
32
|
+
* `-u`/`--include-untracked` (`include`), `--only-untracked` (`only`),
|
|
33
|
+
* `--no-include-untracked` (`none`); the last given wins, as on git's command line.
|
|
34
|
+
*/
|
|
35
|
+
setUntracked(untracked: StashShowUntracked): this;
|
|
36
|
+
/** The diff formats (`--stat`, `-p`, `--numstat`...), in any order: git prints them in its own. */
|
|
37
|
+
setFormats(formats: DiffOutputFormat[]): this;
|
|
38
|
+
/** Other diff options (`--patience`, `--src-prefix`, `-R`...); they turn the configuration off. */
|
|
39
|
+
setOptions(options: DiffTextOptions): this;
|
|
40
|
+
/** The output, as git prints it to a pipe. */
|
|
41
|
+
call(): Promise<string>;
|
|
42
|
+
/**
|
|
43
|
+
* git's diff_include_untracked: the worktree and untracked trees unpacked into one index
|
|
44
|
+
* (stash_worktree_untracked_merge), a name both trees hold, as a file in either, refused.
|
|
45
|
+
*/
|
|
46
|
+
private untrackedIndex;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=stash-show-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stash-show-command.d.ts","sourceRoot":"","sources":["../../src/commands/stash-show-command.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAG7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,oDAAoD;AACpD,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAE7D;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,gBAAiB,SAAQ,gBAAgB,CAAC,MAAM,CAAC;IAC5D,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,SAAS,CAAC,CAAqB;IACvC,OAAO,CAAC,OAAO,CAAC,CAAqB;IACrC,OAAO,CAAC,WAAW,CAAC,CAAkB;IAEtC,4EAA4E;IAC5E,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAIlC;IAED;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAIhD;IAED,mGAAmG;IACnG,UAAU,CAAC,OAAO,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAI5C;IAED,mGAAmG;IACnG,UAAU,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CAIzC;IAED,8CAA8C;IACxC,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAiC5B;IAED;;;OAGG;YACW,cAAc;CAgC7B"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ObjectId } from "@statewalker/vcs-core";
|
|
2
|
+
import { StashInfoCommand } from "./stash-info.js";
|
|
3
|
+
/**
|
|
4
|
+
* `git stash store [-m <message>] [-q] <commit>`: a stash commit (one `stash create`
|
|
5
|
+
* made) recorded as `stash@{0}`, `refs/stash` updated with a reflog line holding the
|
|
6
|
+
* message (default `Created via "git stash store".`).
|
|
7
|
+
*
|
|
8
|
+
* As git's store_stash: the commit must be stash-like (`fatal: '<id>' is not a stash-like
|
|
9
|
+
* commit`); a revision naming nothing is `Cannot update refs/stash with <rev>`.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const id = await git.stashCreate().setRef(null).call();
|
|
14
|
+
* if (id) await git.stashStore().setCommit(id).setMessage("saved").call();
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare class StashStoreCommand extends StashInfoCommand<ObjectId> {
|
|
18
|
+
private commit?;
|
|
19
|
+
private message?;
|
|
20
|
+
private quiet;
|
|
21
|
+
/** The stash commit to store (any revision naming it). */
|
|
22
|
+
setCommit(commit: string): this;
|
|
23
|
+
/** `-m <message>`: the reflog message (default `Created via "git stash store".`). */
|
|
24
|
+
setMessage(message: string): this;
|
|
25
|
+
/** `-q`: a failure says nothing but git's `error:` lines. */
|
|
26
|
+
setQuiet(quiet: boolean): this;
|
|
27
|
+
call(): Promise<ObjectId>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=stash-store-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stash-store-command.d.ts","sourceRoot":"","sources":["../../src/commands/stash-store-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD;;;;;;;;;;;;;GAaG;AACH,qBAAa,iBAAkB,SAAQ,gBAAgB,CAAC,QAAQ,CAAC;IAC/D,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,KAAK,CAAS;IAEtB,0DAA0D;IAC1D,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAI9B;IAED,qFAAqF;IACrF,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAIhC;IAED,6DAA6D;IAC7D,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAI7B;IAEK,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC,CAkC9B;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stash-working-tree.d.ts","sourceRoot":"","sources":["../../src/commands/stash-working-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,KAAK,KAAK,EAAY,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAcL,KAAK,OAAO,EAIZ,KAAK,WAAW,EAChB,KAAK,QAAQ,EACd,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"stash-working-tree.d.ts","sourceRoot":"","sources":["../../src/commands/stash-working-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,KAAK,KAAK,EAAY,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAcL,KAAK,OAAO,EAIZ,KAAK,WAAW,EAChB,KAAK,QAAQ,EACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAQ7F,sDAAsD;AACtD,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,sDAAsD;IACtD,QAAQ,EAAE,MAAM,OAAO,CAAC,QAAQ,GAAG,SAA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e;IAI7B;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;IAMtB;;OAEG;IACH;;;;OAIG;YACW,kBAAkB;CAwBjC;AAcD,+CAA+C;AAC/C,MAAM,WAAW,qBAAqB;IACpC,kGAAkG;IAClG,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,cAAc,CAAC;IACzD,uEAAuE;IACvE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,2EAA2E;IAC3E,CAAC,CAAC,EAAE,OAAO,CAAC;IACZ,iDAAiD;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2FAA2F;IAC3F,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sGAAsG;IACtG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,qFAAqF;IACrF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,wFAAwF;IACxF,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,6FAA6F;IAC7F,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,qFAAqF;AACrF,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAqBD;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAM/C"}
|
|
@@ -61,4 +61,9 @@ export interface StatusHeaderOptions {
|
|
|
61
61
|
export declare function readStatusHeader(source: StatusHeaderSource, options: StatusHeaderOptions): Promise<StatusHeader & {
|
|
62
62
|
warnings: string[];
|
|
63
63
|
}>;
|
|
64
|
+
/**
|
|
65
|
+
* ref-filter.c's get_head_description: how `git branch` names a detached HEAD
|
|
66
|
+
* (`(HEAD detached at v1)`, `(no branch, rebasing main)`, ...).
|
|
67
|
+
*/
|
|
68
|
+
export declare function readHeadDescription(source: Omit<StatusHeaderSource, "tracking" | "entries">): Promise<string>;
|
|
64
69
|
//# sourceMappingURL=status-header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-header.d.ts","sourceRoot":"","sources":["../../src/commands/status-header.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAiB,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAE5B,6BAA6B;AAC7B,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,cAAc,CAAC;IACzB,qDAAqD;IACrD,UAAU,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1C,6CAA6C;IAC7C,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,QAAQ,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC,CAAC;IAChE,qEAAqE;IACrE,QAAQ,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC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,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAID,2EAA2E;AAC3E,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,kBAAkB,EAC1B,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,YAAY,GAAG;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAqChD;AAiPD;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,SAAS,CAAC,GACvD,OAAO,CAAC,MAAM,CAAC,CAcjB"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { GitTransportRegistry } from "@statewalker/vcs-transport";
|
|
2
|
+
import { SubmoduleCommandBase, type SubmoduleCommandResult } from "./submodule-commands.js";
|
|
3
|
+
/**
|
|
4
|
+
* git's `git_url_basename(repo, 0, 0)` (dir.c): the directory `git clone <repo>` would
|
|
5
|
+
* make: the last component of the URL without scheme, credentials, trailing slashes, `/.git`,
|
|
6
|
+
* a host's port or a `.git` suffix; control characters and runs of spaces become one space.
|
|
7
|
+
*
|
|
8
|
+
* @throws GitApiError "No directory name could be guessed." where git dies
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* gitUrlBasename("https://example.com/org/lib.git"); // "lib"
|
|
13
|
+
* gitUrlBasename("../up/.git"); // "up"
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare function gitUrlBasename(repo: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* `git submodule add [-b <branch>] [-f] [-q] [--name <name>] [--reference <repo>]
|
|
19
|
+
* [--depth <n>] <repository> [<path>]`: the repository cloned into
|
|
20
|
+
* `.git/modules/<name>` (`--no-checkout`, then `checkout -f -q [-B <branch>
|
|
21
|
+
* origin/<branch>]`), linked to its worktree at `<path>` by a gitfile and `core.worktree`,
|
|
22
|
+
* then registered: `submodule.<name>.url` (a `./` or `../` URL resolved against the
|
|
23
|
+
* superproject's default remote, else its own directory) and `submodule.<name>.active` in
|
|
24
|
+
* `.git/config`, `path`, `url` (as given) and `branch` in `.gitmodules`, the gitlink and
|
|
25
|
+
* `.gitmodules` staged.
|
|
26
|
+
*
|
|
27
|
+
* A repository already at the path is added as it is ("Adding existing repo at ..."); a git
|
|
28
|
+
* directory kept from an earlier submodule of that name is refused without `-f` and
|
|
29
|
+
* reactivated with it. As git, a local URL is cloned with `GIT_PROTOCOL_FROM_USER=0`, so
|
|
30
|
+
* `protocol.file.allow` must be `always` (git 2.38+'s default is `user`).
|
|
31
|
+
*
|
|
32
|
+
* Refusals are git's: a path the index holds, an ignored path without `-f` (exit status 1,
|
|
33
|
+
* git add's message), a URL that is neither absolute nor `./`/`../`, an invalid name, a name
|
|
34
|
+
* another path uses (git 2.5x; `-f` picks `<name><n>`), a directory that is no repository,
|
|
35
|
+
* a repository without a commit, a missing `.gitmodules` the index or HEAD has.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* const { stderr } = await git.submoduleAdd().setURI("../lib").setPath("lib").call();
|
|
40
|
+
* // "Cloning into '/work/super/lib'...\ndone.\n"
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare class SubmoduleAddCommand extends SubmoduleCommandBase {
|
|
44
|
+
private uri?;
|
|
45
|
+
private path?;
|
|
46
|
+
private name?;
|
|
47
|
+
private branch?;
|
|
48
|
+
private force;
|
|
49
|
+
private reference?;
|
|
50
|
+
private depth?;
|
|
51
|
+
private transports?;
|
|
52
|
+
/** `<repository>`: the URL to clone (absolute, or `./`/`../` relative to the remote). */
|
|
53
|
+
setURI(uri: string): this;
|
|
54
|
+
/** `<path>`: where the submodule goes (default: the URL's basename, as `git clone`'s). */
|
|
55
|
+
setPath(path: string): this;
|
|
56
|
+
/** `--name <name>`: the submodule's name (default: its path). */
|
|
57
|
+
setName(name: string): this;
|
|
58
|
+
/** `-b <branch>`: check out and record this branch of the repository. */
|
|
59
|
+
setBranch(branch: string): this;
|
|
60
|
+
/** `-f`: add an ignored path, reuse a kept git directory, rename a clashing name. */
|
|
61
|
+
setForce(force: boolean): this;
|
|
62
|
+
/** `--reference <repository>`: borrow objects from it (clone's `--reference`). */
|
|
63
|
+
setReference(reference: string): this;
|
|
64
|
+
/** `--depth <n>`: a shallow clone (ignored, with git's warning, for a local path). */
|
|
65
|
+
setDepth(depth: number): this;
|
|
66
|
+
/** The transports the clone reaches non-local URLs through. */
|
|
67
|
+
setTransports(transports: GitTransportRegistry): this;
|
|
68
|
+
call(): Promise<SubmoduleCommandResult>;
|
|
69
|
+
/** submodule.c's `is_writing_gitmodules_ok`. */
|
|
70
|
+
private writingGitmodulesOk;
|
|
71
|
+
/**
|
|
72
|
+
* git's `unable_to_lock_die` lines when another process holds the index lock (`git add`
|
|
73
|
+
* takes it even for a dry run), undefined once it was taken and released.
|
|
74
|
+
*/
|
|
75
|
+
private indexLockRefusal;
|
|
76
|
+
/** The host path of the superproject's git directory (git's absolute `get_git_dir()`). */
|
|
77
|
+
private hostGitDir;
|
|
78
|
+
/** submodule--helper.c's `die_on_index_match`. */
|
|
79
|
+
private dieOnIndexMatch;
|
|
80
|
+
/** submodule--helper.c's `die_on_repo_without_commits`. */
|
|
81
|
+
private dieOnRepoWithoutCommits;
|
|
82
|
+
/** submodule--helper.c's `add_submodule`. */
|
|
83
|
+
private addSubmodule;
|
|
84
|
+
/** The `git remote -v` fetch lines of the kept git directory, as git lists them. */
|
|
85
|
+
private fetchRemotesOf;
|
|
86
|
+
/** submodule--helper.c's `configure_added_submodule`. */
|
|
87
|
+
private configureAddedSubmodule;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=submodule-add-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submodule-add-command.d.ts","sourceRoot":"","sources":["../../src/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;IAED,gDAAgD;YAClC,mBAAmB;IAejC;;;OAGG;YACW,gBAAgB;IAyB9B,0FAA0F;YAC5E,UAAU;IAWxB,kDAAkD;YACpC,eAAe;IAmB7B,2DAA2D;YAC7C,uBAAuB;IAOrC,6CAA6C;YAC/B,YAAY;IAiE1B,oFAAoF;YACtE,cAAc;IAY5B,yDAAyD;YAC3C,uBAAuB;CA6CtC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which credentials and headers a clone or fetch inside a submodule command may send, and
|
|
3
|
+
* the transports that attach them.
|
|
4
|
+
*
|
|
5
|
+
* Submodule URLs come from `.gitmodules`, a file of the repository's content: anyone who
|
|
6
|
+
* can commit can point a submodule (or a nested one) at any host. git matches its credential
|
|
7
|
+
* helpers per URL; here a credential or header is sent only where the caller gave it for:
|
|
8
|
+
* what a per-URL provider answers for that URL, or the static credentials and headers for a
|
|
9
|
+
* URL whose origin (scheme, host, port) is one the caller named, or, when it named none, the
|
|
10
|
+
* origin of the superproject's own remote.
|
|
11
|
+
*
|
|
12
|
+
* Two guards keep that true whatever a URL looks like:
|
|
13
|
+
*
|
|
14
|
+
* - {@link strictUrlOrigin} computes an origin from the parses the transports connect with
|
|
15
|
+
* (`new URL` for smart HTTP, `parseGitUrl` for the others) and gives none when they
|
|
16
|
+
* disagree or the authority holds anything a parser could read two ways (`\`, `%`,
|
|
17
|
+
* whitespace, controls, non-ASCII, a second `@`): no origin, no credentials.
|
|
18
|
+
* - {@link guardSubmoduleTransports} attaches them itself, at connect time, never through
|
|
19
|
+
* the commands: a native connector gets them for the URL just checked, and every smart-HTTP
|
|
20
|
+
* request carries them only when `new URL(request.url).origin` is the approved origin;
|
|
21
|
+
* redirects are followed by hand (`redirect: "manual"`) so a redirect to another origin
|
|
22
|
+
* goes out without them, and an opaque redirect (a browser's) is refused.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* const authFor = createSubmoduleAuthPolicy({
|
|
27
|
+
* credentials: { token },
|
|
28
|
+
* origins: [strictUrlOrigin("https://git.example.com/org/super.git") as string],
|
|
29
|
+
* });
|
|
30
|
+
* const transports = guardSubmoduleTransports(createDefaultTransports(), authFor);
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @module
|
|
34
|
+
*/
|
|
35
|
+
import { type Credentials, GitTransportRegistry } from "@statewalker/vcs-transport";
|
|
36
|
+
/** What a clone or fetch of one URL authenticates with, and the origin it is approved for. */
|
|
37
|
+
export interface SubmoduleAuth {
|
|
38
|
+
/** The origin the credentials and headers may go to (absent: none may go anywhere) */
|
|
39
|
+
origin?: string;
|
|
40
|
+
credentials?: Credentials;
|
|
41
|
+
headers?: Record<string, string>;
|
|
42
|
+
}
|
|
43
|
+
/** The credentials and headers for one URL. */
|
|
44
|
+
export type SubmoduleAuthFor = (url: string) => SubmoduleAuth;
|
|
45
|
+
/** Credentials for a URL, undefined for none. */
|
|
46
|
+
export type CredentialsForUrl = (url: string) => Credentials | undefined;
|
|
47
|
+
/** HTTP headers for a URL, undefined for none. */
|
|
48
|
+
export type HeadersForUrl = (url: string) => Record<string, string> | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* The origin a URL connects to, as `<scheme>://<host>[:<port>]` (the scheme's default port
|
|
51
|
+
* left out; `ssh` for every ssh spelling and the scp-like form), or undefined when it has
|
|
52
|
+
* none or it cannot be told for sure: a local path, a `file:` URL, a `<helper>::` URL, an
|
|
53
|
+
* authority holding `%`, `\`, whitespace, a control or non-ASCII character or two `@`, or an
|
|
54
|
+
* http(s) URL `new URL` and `parseGitUrl` read with different hosts or ports.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* strictUrlOrigin("HTTPS://user@Git.Example.com:443/x.git"); // "https://git.example.com"
|
|
59
|
+
* strictUrlOrigin("git@example.com:org/x.git"); // "ssh://example.com"
|
|
60
|
+
* strictUrlOrigin("http://127.0.0.1:1\\@localhost:2/up"); // undefined
|
|
61
|
+
* strictUrlOrigin("../lib"); // undefined
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export declare function strictUrlOrigin(url: string): string | undefined;
|
|
65
|
+
/** What {@link createSubmoduleAuthPolicy} is built from. */
|
|
66
|
+
export interface SubmoduleAuthOptions {
|
|
67
|
+
/** Static credentials, for the {@link origins} alone */
|
|
68
|
+
credentials?: Credentials;
|
|
69
|
+
/** Static headers, for the {@link origins} alone */
|
|
70
|
+
headers?: Record<string, string>;
|
|
71
|
+
/** The origins ({@link strictUrlOrigin}) the static credentials and headers are for */
|
|
72
|
+
origins: readonly string[];
|
|
73
|
+
/** Asked with each URL that has an origin; its answer is for that origin alone */
|
|
74
|
+
credentialsFor?: CredentialsForUrl;
|
|
75
|
+
/** Asked with each URL that has an origin; its answer is for that origin alone */
|
|
76
|
+
headersFor?: HeadersForUrl;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The policy: for a URL with a {@link strictUrlOrigin}, a provider's answer, else the static
|
|
80
|
+
* value when that origin is one of `origins`; nothing for a URL without one.
|
|
81
|
+
*/
|
|
82
|
+
export declare function createSubmoduleAuthPolicy(options: SubmoduleAuthOptions): SubmoduleAuthFor;
|
|
83
|
+
/**
|
|
84
|
+
* `transports` whose connectors attach the credentials and headers `authFor` gives each
|
|
85
|
+
* URL (the commands using them are given none): a native session through the connect
|
|
86
|
+
* request, a smart-HTTP session through its `fetchImpl`, request by request, only to the
|
|
87
|
+
* approved origin (see the module's notes).
|
|
88
|
+
*/
|
|
89
|
+
export declare function guardSubmoduleTransports(transports: GitTransportRegistry, authFor: SubmoduleAuthFor): GitTransportRegistry;
|
|
90
|
+
//# sourceMappingURL=submodule-auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submodule-auth.d.ts","sourceRoot":"","sources":["../../src/commands/submodule-auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;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