@statewalker/vcs-commands 0.5.0 → 0.6.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/README.md +123 -8
- package/dist/commands/add-command.d.ts +265 -34
- package/dist/commands/add-command.d.ts.map +1 -1
- package/dist/commands/add-patch/add-interactive.d.ts +46 -0
- package/dist/commands/add-patch/add-interactive.d.ts.map +1 -0
- package/dist/commands/add-patch/add-patch.d.ts +139 -0
- package/dist/commands/add-patch/add-patch.d.ts.map +1 -0
- package/dist/commands/add-patch/index.d.ts +6 -0
- package/dist/commands/add-patch/index.d.ts.map +1 -0
- package/dist/commands/add-patch/patch-backend.d.ts +80 -0
- package/dist/commands/add-patch/patch-backend.d.ts.map +1 -0
- package/dist/commands/add-patch/patch-modes.d.ts +71 -0
- package/dist/commands/add-patch/patch-modes.d.ts.map +1 -0
- package/dist/commands/add-patch/patch-session.d.ts +49 -0
- package/dist/commands/add-patch/patch-session.d.ts.map +1 -0
- package/dist/commands/am/am-command.d.ts +175 -0
- package/dist/commands/am/am-command.d.ts.map +1 -0
- package/dist/commands/am/index.d.ts +3 -0
- package/dist/commands/am/index.d.ts.map +1 -0
- package/dist/commands/am/mailinfo.d.ts +58 -0
- package/dist/commands/am/mailinfo.d.ts.map +1 -0
- package/dist/commands/am/patch-format.d.ts +24 -0
- package/dist/commands/am/patch-format.d.ts.map +1 -0
- package/dist/commands/apply/apply-command.d.ts +153 -0
- package/dist/commands/apply/apply-command.d.ts.map +1 -0
- package/dist/commands/apply/apply-engine.d.ts +195 -0
- package/dist/commands/apply/apply-engine.d.ts.map +1 -0
- package/dist/commands/apply/apply-parse.d.ts +86 -0
- package/dist/commands/apply/apply-parse.d.ts.map +1 -0
- package/dist/commands/apply/apply-types.d.ts +70 -0
- package/dist/commands/apply/apply-types.d.ts.map +1 -0
- package/dist/commands/apply/index.d.ts +6 -0
- package/dist/commands/apply/index.d.ts.map +1 -0
- package/dist/commands/apply/latin1.d.ts +32 -0
- package/dist/commands/apply/latin1.d.ts.map +1 -0
- package/dist/commands/apply/whitespace.d.ts +58 -0
- package/dist/commands/apply/whitespace.d.ts.map +1 -0
- package/dist/commands/attributes-source.d.ts +26 -0
- package/dist/commands/attributes-source.d.ts.map +1 -0
- package/dist/commands/backfill-command.d.ts +110 -0
- package/dist/commands/backfill-command.d.ts.map +1 -0
- package/dist/commands/bisect/bisect-checkout.d.ts +64 -0
- package/dist/commands/bisect/bisect-checkout.d.ts.map +1 -0
- package/dist/commands/bisect/bisect-command.d.ts +201 -0
- package/dist/commands/bisect/bisect-command.d.ts.map +1 -0
- package/dist/commands/bisect/bisect-engine.d.ts +219 -0
- package/dist/commands/bisect/bisect-engine.d.ts.map +1 -0
- package/dist/commands/bisect/bisect-graph.d.ts +127 -0
- package/dist/commands/bisect/bisect-graph.d.ts.map +1 -0
- package/dist/commands/bisect/bisect-quote.d.ts +27 -0
- package/dist/commands/bisect/bisect-quote.d.ts.map +1 -0
- package/dist/commands/bisect/index.d.ts +5 -0
- package/dist/commands/bisect/index.d.ts.map +1 -0
- package/dist/commands/blame-command.d.ts +122 -131
- package/dist/commands/blame-command.d.ts.map +1 -1
- package/dist/commands/branch-command.d.ts +52 -2
- package/dist/commands/branch-command.d.ts.map +1 -1
- package/dist/commands/branch-tracking.d.ts +98 -0
- package/dist/commands/branch-tracking.d.ts.map +1 -0
- package/dist/commands/checkout-command.d.ts +300 -18
- package/dist/commands/checkout-command.d.ts.map +1 -1
- package/dist/commands/checkout-paths.d.ts +124 -0
- package/dist/commands/checkout-paths.d.ts.map +1 -0
- package/dist/commands/cherry-pick-command.d.ts +50 -42
- package/dist/commands/cherry-pick-command.d.ts.map +1 -1
- package/dist/commands/clean-command.d.ts +49 -16
- package/dist/commands/clean-command.d.ts.map +1 -1
- package/dist/commands/clone-command.d.ts +117 -0
- package/dist/commands/clone-command.d.ts.map +1 -1
- package/dist/commands/commit-command.d.ts +311 -17
- package/dist/commands/commit-command.d.ts.map +1 -1
- package/dist/commands/core-config.d.ts +78 -1
- package/dist/commands/core-config.d.ts.map +1 -1
- package/dist/commands/date-format.d.ts +58 -0
- package/dist/commands/date-format.d.ts.map +1 -0
- package/dist/commands/describe-command.d.ts.map +1 -1
- package/dist/commands/diff-command.d.ts +377 -30
- package/dist/commands/diff-command.d.ts.map +1 -1
- package/dist/commands/diff-textconv.d.ts +40 -0
- package/dist/commands/diff-textconv.d.ts.map +1 -0
- package/dist/commands/fetch-command.d.ts +149 -10
- package/dist/commands/fetch-command.d.ts.map +1 -1
- package/dist/commands/format-patch-command.d.ts +164 -0
- package/dist/commands/format-patch-command.d.ts.map +1 -0
- package/dist/commands/fsck/fetch-fsck.d.ts +60 -0
- package/dist/commands/fsck/fetch-fsck.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-command.d.ts +225 -0
- package/dist/commands/fsck/fsck-command.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-loose.d.ts +68 -0
- package/dist/commands/fsck/fsck-loose.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-msg-ids.d.ts +122 -0
- package/dist/commands/fsck/fsck-msg-ids.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-object-checks.d.ts +148 -0
- package/dist/commands/fsck/fsck-object-checks.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-object-table.d.ts +132 -0
- package/dist/commands/fsck/fsck-object-table.d.ts.map +1 -0
- package/dist/commands/fsck/fsck-pack.d.ts +115 -0
- package/dist/commands/fsck/fsck-pack.d.ts.map +1 -0
- package/dist/commands/fsck/index.d.ts +6 -0
- package/dist/commands/fsck/index.d.ts.map +1 -0
- package/dist/commands/fsck/verify-pack-command.d.ts +81 -0
- package/dist/commands/fsck/verify-pack-command.d.ts.map +1 -0
- package/dist/commands/gc-command.d.ts +43 -0
- package/dist/commands/gc-command.d.ts.map +1 -1
- package/dist/commands/git-date.d.ts +66 -0
- package/dist/commands/git-date.d.ts.map +1 -0
- package/dist/commands/git-describe.d.ts +67 -0
- package/dist/commands/git-describe.d.ts.map +1 -0
- package/dist/commands/git-hooks.d.ts +416 -0
- package/dist/commands/git-hooks.d.ts.map +1 -0
- package/dist/commands/git-ident.d.ts +128 -0
- package/dist/commands/git-ident.d.ts.map +1 -0
- package/dist/commands/hook-command.d.ts +96 -0
- package/dist/commands/hook-command.d.ts.map +1 -0
- package/dist/commands/index-adder.d.ts +231 -0
- package/dist/commands/index-adder.d.ts.map +1 -0
- package/dist/commands/index-host.d.ts +86 -0
- package/dist/commands/index-host.d.ts.map +1 -0
- package/dist/commands/index.d.ts +54 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +3 -2
- package/dist/commands/init-command.d.ts +12 -1
- package/dist/commands/init-command.d.ts.map +1 -1
- package/dist/commands/local-clone.d.ts +60 -0
- package/dist/commands/local-clone.d.ts.map +1 -0
- package/dist/commands/local-transport.d.ts +117 -0
- package/dist/commands/local-transport.d.ts.map +1 -0
- package/dist/commands/log-command.d.ts +216 -24
- package/dist/commands/log-command.d.ts.map +1 -1
- package/dist/commands/log-graph.d.ts +120 -0
- package/dist/commands/log-graph.d.ts.map +1 -0
- package/dist/commands/log-output.d.ts +323 -0
- package/dist/commands/log-output.d.ts.map +1 -0
- package/dist/commands/ls-remote-command.d.ts +23 -7
- package/dist/commands/ls-remote-command.d.ts.map +1 -1
- package/dist/commands/mailmap.d.ts +31 -0
- package/dist/commands/mailmap.d.ts.map +1 -0
- package/dist/commands/merge-bases.d.ts +85 -0
- package/dist/commands/merge-bases.d.ts.map +1 -0
- package/dist/commands/merge-command.d.ts +209 -74
- package/dist/commands/merge-command.d.ts.map +1 -1
- package/dist/commands/merge-config.d.ts +13 -0
- package/dist/commands/merge-config.d.ts.map +1 -0
- package/dist/commands/merge-drivers.d.ts +130 -0
- package/dist/commands/merge-drivers.d.ts.map +1 -0
- package/dist/commands/merge-support.d.ts +252 -0
- package/dist/commands/merge-support.d.ts.map +1 -0
- package/dist/commands/message-cleanup.d.ts +86 -0
- package/dist/commands/message-cleanup.d.ts.map +1 -0
- package/dist/commands/mv-command.d.ts +94 -0
- package/dist/commands/mv-command.d.ts.map +1 -0
- package/dist/commands/notes-command.d.ts +256 -0
- package/dist/commands/notes-command.d.ts.map +1 -0
- package/dist/commands/notes-commands.d.ts +41 -0
- package/dist/commands/notes-commands.d.ts.map +1 -0
- package/dist/commands/notes-merge-command.d.ts +105 -0
- package/dist/commands/notes-merge-command.d.ts.map +1 -0
- package/dist/commands/notes-support.d.ts +125 -0
- package/dist/commands/notes-support.d.ts.map +1 -0
- package/dist/commands/notes-tree.d.ts +106 -0
- package/dist/commands/notes-tree.d.ts.map +1 -0
- package/dist/commands/object-id-input.d.ts +20 -0
- package/dist/commands/object-id-input.d.ts.map +1 -0
- package/dist/commands/octopus-merge.d.ts +59 -0
- package/dist/commands/octopus-merge.d.ts.map +1 -0
- package/dist/commands/ort-merge.d.ts +126 -0
- package/dist/commands/ort-merge.d.ts.map +1 -0
- package/dist/commands/ort-recursive.d.ts +53 -0
- package/dist/commands/ort-recursive.d.ts.map +1 -0
- package/dist/commands/pack-refs-command.d.ts +20 -0
- package/dist/commands/pack-refs-command.d.ts.map +1 -1
- package/dist/commands/patch-id.d.ts +41 -0
- package/dist/commands/patch-id.d.ts.map +1 -0
- package/dist/commands/pathspec-attributes.d.ts +64 -0
- package/dist/commands/pathspec-attributes.d.ts.map +1 -0
- package/dist/commands/pathspec.d.ts +324 -0
- package/dist/commands/pathspec.d.ts.map +1 -0
- package/dist/commands/post-index-change.d.ts +33 -0
- package/dist/commands/post-index-change.d.ts.map +1 -0
- package/dist/commands/pretty-format.d.ts +222 -0
- package/dist/commands/pretty-format.d.ts.map +1 -0
- package/dist/commands/promisor-remote.d.ts +80 -0
- package/dist/commands/promisor-remote.d.ts.map +1 -0
- package/dist/commands/pull-command.d.ts +41 -8
- package/dist/commands/pull-command.d.ts.map +1 -1
- package/dist/commands/push-command.d.ts +24 -8
- package/dist/commands/push-command.d.ts.map +1 -1
- package/dist/commands/read-tree-command.d.ts +112 -0
- package/dist/commands/read-tree-command.d.ts.map +1 -0
- package/dist/commands/rebase-command.d.ts +507 -75
- package/dist/commands/rebase-command.d.ts.map +1 -1
- package/dist/commands/rebase-todo.d.ts +130 -0
- package/dist/commands/rebase-todo.d.ts.map +1 -0
- package/dist/commands/ref-decoration-filter.d.ts +53 -0
- package/dist/commands/ref-decoration-filter.d.ts.map +1 -0
- package/dist/commands/reflog-messages.d.ts +98 -0
- package/dist/commands/reflog-messages.d.ts.map +1 -0
- package/dist/commands/remote-command.d.ts +31 -0
- package/dist/commands/remote-command.d.ts.map +1 -1
- package/dist/commands/remote-transport.d.ts +120 -0
- package/dist/commands/remote-transport.d.ts.map +1 -0
- package/dist/commands/reset-command.d.ts +161 -7
- package/dist/commands/reset-command.d.ts.map +1 -1
- package/dist/commands/restore-command.d.ts +103 -0
- package/dist/commands/restore-command.d.ts.map +1 -0
- package/dist/commands/rev-list-command.d.ts +78 -0
- package/dist/commands/rev-list-command.d.ts.map +1 -0
- package/dist/commands/rev-parse-command.d.ts +80 -0
- package/dist/commands/rev-parse-command.d.ts.map +1 -0
- package/dist/commands/revert-command.d.ts +46 -38
- package/dist/commands/revert-command.d.ts.map +1 -1
- package/dist/commands/revision-filenames.d.ts +95 -0
- package/dist/commands/revision-filenames.d.ts.map +1 -0
- package/dist/commands/revision-range.d.ts +67 -0
- package/dist/commands/revision-range.d.ts.map +1 -0
- package/dist/commands/revision-resolver.d.ts +321 -0
- package/dist/commands/revision-resolver.d.ts.map +1 -0
- package/dist/commands/rm-command.d.ts +69 -7
- package/dist/commands/rm-command.d.ts.map +1 -1
- package/dist/commands/sequencer-pick.d.ts +191 -0
- package/dist/commands/sequencer-pick.d.ts.map +1 -0
- package/dist/commands/sequencer-support.d.ts +125 -0
- package/dist/commands/sequencer-support.d.ts.map +1 -0
- package/dist/commands/serve-repository.d.ts +52 -0
- package/dist/commands/serve-repository.d.ts.map +1 -0
- package/dist/commands/sparse-checkout-command.d.ts +190 -0
- package/dist/commands/sparse-checkout-command.d.ts.map +1 -0
- package/dist/commands/sparse-checkout-support.d.ts +268 -0
- package/dist/commands/sparse-checkout-support.d.ts.map +1 -0
- package/dist/commands/stash-apply-command.d.ts +42 -8
- package/dist/commands/stash-apply-command.d.ts.map +1 -1
- package/dist/commands/stash-create-command.d.ts +155 -1
- package/dist/commands/stash-create-command.d.ts.map +1 -1
- package/dist/commands/stash-drop-command.d.ts +2 -0
- package/dist/commands/stash-drop-command.d.ts.map +1 -1
- package/dist/commands/stash-working-tree.d.ts +23 -0
- package/dist/commands/stash-working-tree.d.ts.map +1 -1
- package/dist/commands/status-command.d.ts +300 -15
- package/dist/commands/status-command.d.ts.map +1 -1
- package/dist/commands/status-format.d.ts +155 -0
- package/dist/commands/status-format.d.ts.map +1 -0
- package/dist/commands/status-header.d.ts +64 -0
- package/dist/commands/status-header.d.ts.map +1 -0
- package/dist/commands/strerror.d.ts +7 -0
- package/dist/commands/strerror.d.ts.map +1 -0
- package/dist/commands/submodule-config.d.ts +38 -0
- package/dist/commands/submodule-config.d.ts.map +1 -0
- package/dist/commands/submodule-summary-command.d.ts +80 -0
- package/dist/commands/submodule-summary-command.d.ts.map +1 -0
- package/dist/commands/submodule-summary.d.ts +150 -0
- package/dist/commands/submodule-summary.d.ts.map +1 -0
- package/dist/commands/switch-command.d.ts +132 -0
- package/dist/commands/switch-command.d.ts.map +1 -0
- package/dist/commands/tag-command.d.ts +23 -2
- package/dist/commands/tag-command.d.ts.map +1 -1
- package/dist/commands/tracking-info.d.ts +64 -0
- package/dist/commands/tracking-info.d.ts.map +1 -0
- package/dist/commands/trailers.d.ts +73 -0
- package/dist/commands/trailers.d.ts.map +1 -0
- package/dist/commands/tree-restore.d.ts +85 -1
- package/dist/commands/tree-restore.d.ts.map +1 -1
- package/dist/commands/untracked-cache-support.d.ts +53 -0
- package/dist/commands/untracked-cache-support.d.ts.map +1 -0
- package/dist/commands/worktree-add-command.d.ts +108 -0
- package/dist/commands/worktree-add-command.d.ts.map +1 -0
- package/dist/commands/worktree-list-command.d.ts +69 -0
- package/dist/commands/worktree-list-command.d.ts.map +1 -0
- package/dist/commands/worktree-lock-command.d.ts +44 -0
- package/dist/commands/worktree-lock-command.d.ts.map +1 -0
- package/dist/commands/worktree-overwrite-checks.d.ts +146 -6
- package/dist/commands/worktree-overwrite-checks.d.ts.map +1 -1
- package/dist/commands/worktree-prune-command.d.ts +48 -0
- package/dist/commands/worktree-prune-command.d.ts.map +1 -0
- package/dist/commands/worktree-remove-command.d.ts +59 -0
- package/dist/commands/worktree-remove-command.d.ts.map +1 -0
- package/dist/commands/worktree-repair-command.d.ts +35 -0
- package/dist/commands/worktree-repair-command.d.ts.map +1 -0
- package/dist/commands/worktree-support.d.ts +64 -0
- package/dist/commands/worktree-support.d.ts.map +1 -0
- package/dist/commands-DnmlfwGV.js +61620 -0
- package/dist/core-commands/add.command.impl.d.ts.map +1 -1
- package/dist/errors/add-errors.d.ts +55 -0
- package/dist/errors/add-errors.d.ts.map +1 -1
- package/dist/errors/checkout-errors.d.ts +16 -0
- package/dist/errors/checkout-errors.d.ts.map +1 -1
- package/dist/errors/command-errors.d.ts +77 -0
- package/dist/errors/command-errors.d.ts.map +1 -1
- package/dist/errors/commit-errors.d.ts +9 -0
- package/dist/errors/commit-errors.d.ts.map +1 -1
- package/dist/errors/git-api-error.d.ts +59 -2
- package/dist/errors/git-api-error.d.ts.map +1 -1
- package/dist/errors/index.d.ts +1 -0
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +354 -19
- package/dist/errors/rebase-errors.d.ts +9 -0
- package/dist/errors/rebase-errors.d.ts.map +1 -1
- package/dist/errors/ref-errors.d.ts +32 -0
- package/dist/errors/ref-errors.d.ts.map +1 -1
- package/dist/errors/transport-errors.d.ts +12 -2
- package/dist/errors/transport-errors.d.ts.map +1 -1
- package/dist/errors/worktree-errors.d.ts +35 -0
- package/dist/errors/worktree-errors.d.ts.map +1 -0
- package/dist/git-command-DxvwPrPB.js +7612 -0
- package/dist/git-command.d.ts +413 -32
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +306 -3
- package/dist/git.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/remote-config/remote-config-store.d.ts +105 -3
- package/dist/remote-config/remote-config-store.d.ts.map +1 -1
- package/dist/remote-config/remote-refs.d.ts +7 -3
- package/dist/remote-config/remote-refs.d.ts.map +1 -1
- package/dist/rename/detect-renames.d.ts +148 -0
- package/dist/rename/detect-renames.d.ts.map +1 -0
- package/dist/rename/git-similarity.d.ts +44 -0
- package/dist/rename/git-similarity.d.ts.map +1 -0
- package/dist/rename/index.d.ts +2 -0
- package/dist/rename/index.d.ts.map +1 -1
- package/dist/results/binary-patch.d.ts +11 -0
- package/dist/results/binary-patch.d.ts.map +1 -0
- package/dist/results/blame-format.d.ts +55 -0
- package/dist/results/blame-format.d.ts.map +1 -0
- package/dist/results/cherry-pick-result.d.ts +10 -0
- package/dist/results/cherry-pick-result.d.ts.map +1 -1
- package/dist/results/clone-result.d.ts +10 -0
- package/dist/results/clone-result.d.ts.map +1 -1
- package/dist/results/combined-diff.d.ts +77 -0
- package/dist/results/combined-diff.d.ts.map +1 -0
- package/dist/results/diff-entry.d.ts +32 -0
- package/dist/results/diff-entry.d.ts.map +1 -1
- package/dist/results/diff-formatter.d.ts +34 -60
- package/dist/results/diff-formatter.d.ts.map +1 -1
- package/dist/results/diff-order.d.ts +25 -0
- package/dist/results/diff-order.d.ts.map +1 -0
- package/dist/results/diff-output.d.ts +249 -0
- package/dist/results/diff-output.d.ts.map +1 -0
- package/dist/results/fetch-result.d.ts +15 -0
- package/dist/results/fetch-result.d.ts.map +1 -1
- package/dist/results/index.d.ts +5 -0
- package/dist/results/index.d.ts.map +1 -1
- package/dist/results/index.js +2 -252
- package/dist/results/merge-result.d.ts +15 -1
- package/dist/results/merge-result.d.ts.map +1 -1
- package/dist/results/pull-result.d.ts +12 -3
- package/dist/results/pull-result.d.ts.map +1 -1
- package/dist/results/push-result.d.ts +42 -0
- package/dist/results/push-result.d.ts.map +1 -1
- package/dist/results/quote-path.d.ts +27 -0
- package/dist/results/quote-path.d.ts.map +1 -0
- package/dist/results/rebase-result.d.ts +28 -1
- package/dist/results/rebase-result.d.ts.map +1 -1
- package/dist/results/revert-result.d.ts +10 -0
- package/dist/results/revert-result.d.ts.map +1 -1
- package/dist/results/stash-result.d.ts +5 -0
- package/dist/results/stash-result.d.ts.map +1 -1
- package/dist/results/status-result.d.ts +60 -6
- package/dist/results/status-result.d.ts.map +1 -1
- package/dist/results-BZGa2Z3I.js +2934 -0
- package/dist/transport-command.d.ts +44 -1
- package/dist/transport-command.d.ts.map +1 -1
- package/package.json +15 -11
- package/src/commands/add-command.ts +1291 -226
- package/src/commands/add-patch/add-interactive.ts +941 -0
- package/src/commands/add-patch/add-patch.ts +1169 -0
- package/src/commands/add-patch/index.ts +5 -0
- package/src/commands/add-patch/patch-backend.ts +239 -0
- package/src/commands/add-patch/patch-modes.ts +249 -0
- package/src/commands/add-patch/patch-session.ts +159 -0
- package/src/commands/am/am-command.ts +1111 -0
- package/src/commands/am/index.ts +2 -0
- package/src/commands/am/mailinfo.ts +1015 -0
- package/src/commands/am/patch-format.ts +121 -0
- package/src/commands/apply/apply-command.ts +832 -0
- package/src/commands/apply/apply-engine.ts +1603 -0
- package/src/commands/apply/apply-parse.ts +1209 -0
- package/src/commands/apply/apply-types.ts +112 -0
- package/src/commands/apply/index.ts +5 -0
- package/src/commands/apply/latin1.ts +171 -0
- package/src/commands/apply/whitespace.ts +260 -0
- package/src/commands/attributes-source.ts +96 -0
- package/src/commands/backfill-command.ts +694 -0
- package/src/commands/bisect/bisect-checkout.ts +217 -0
- package/src/commands/bisect/bisect-command.ts +788 -0
- package/src/commands/bisect/bisect-engine.ts +1079 -0
- package/src/commands/bisect/bisect-graph.ts +595 -0
- package/src/commands/bisect/bisect-quote.ts +92 -0
- package/src/commands/bisect/index.ts +4 -0
- package/src/commands/blame-command.ts +711 -986
- package/src/commands/branch-command.ts +354 -32
- package/src/commands/branch-tracking.ts +331 -0
- package/src/commands/checkout-command.ts +1290 -243
- package/src/commands/checkout-paths.ts +784 -0
- package/src/commands/cherry-pick-command.ts +156 -396
- package/src/commands/clean-command.ts +504 -156
- package/src/commands/clone-command.ts +634 -67
- package/src/commands/commit-command.ts +1781 -166
- package/src/commands/core-config.ts +161 -6
- package/src/commands/date-format.ts +668 -0
- package/src/commands/describe-command.ts +2 -0
- package/src/commands/diff-command.ts +1898 -110
- package/src/commands/diff-textconv.ts +50 -0
- package/src/commands/fetch-command.ts +606 -66
- package/src/commands/format-patch-command.ts +969 -0
- package/src/commands/fsck/fetch-fsck.ts +229 -0
- package/src/commands/fsck/fsck-command.ts +3347 -0
- package/src/commands/fsck/fsck-loose.ts +287 -0
- package/src/commands/fsck/fsck-msg-ids.ts +176 -0
- package/src/commands/fsck/fsck-object-checks.ts +1044 -0
- package/src/commands/fsck/fsck-object-table.ts +363 -0
- package/src/commands/fsck/fsck-pack.ts +604 -0
- package/src/commands/fsck/index.ts +5 -0
- package/src/commands/fsck/verify-pack-command.ts +249 -0
- package/src/commands/gc-command.ts +147 -1
- package/src/commands/git-date.ts +895 -0
- package/src/commands/git-describe.ts +316 -0
- package/src/commands/git-hooks.ts +1472 -0
- package/src/commands/git-ident.ts +344 -0
- package/src/commands/hook-command.ts +247 -0
- package/src/commands/index-adder.ts +706 -0
- package/src/commands/index-host.ts +291 -0
- package/src/commands/index.ts +82 -0
- package/src/commands/init-command.ts +28 -4
- package/src/commands/local-clone.ts +183 -0
- package/src/commands/local-transport.ts +762 -0
- package/src/commands/log-command.ts +1915 -170
- package/src/commands/log-graph.ts +671 -0
- package/src/commands/log-output.ts +1359 -0
- package/src/commands/ls-remote-command.ts +101 -58
- package/src/commands/mailmap.ts +129 -0
- package/src/commands/merge-bases.ts +296 -0
- package/src/commands/merge-command.ts +1386 -491
- package/src/commands/merge-config.ts +25 -0
- package/src/commands/merge-drivers.ts +306 -0
- package/src/commands/merge-support.ts +1198 -0
- package/src/commands/message-cleanup.ts +275 -0
- package/src/commands/mv-command.ts +976 -0
- package/src/commands/notes-command.ts +890 -0
- package/src/commands/notes-commands.ts +87 -0
- package/src/commands/notes-merge-command.ts +768 -0
- package/src/commands/notes-support.ts +402 -0
- package/src/commands/notes-tree.ts +602 -0
- package/src/commands/object-id-input.ts +27 -0
- package/src/commands/octopus-merge.ts +377 -0
- package/src/commands/ort-merge.ts +1660 -0
- package/src/commands/ort-recursive.ts +160 -0
- package/src/commands/pack-refs-command.ts +39 -22
- package/src/commands/patch-id.ts +196 -0
- package/src/commands/pathspec-attributes.ts +162 -0
- package/src/commands/pathspec.ts +1199 -0
- package/src/commands/post-index-change.ts +62 -0
- package/src/commands/pretty-format.ts +1431 -0
- package/src/commands/promisor-remote.ts +298 -0
- package/src/commands/pull-command.ts +207 -22
- package/src/commands/push-command.ts +236 -23
- package/src/commands/read-tree-command.ts +857 -0
- package/src/commands/rebase-command.ts +3808 -371
- package/src/commands/rebase-todo.ts +584 -0
- package/src/commands/ref-decoration-filter.ts +118 -0
- package/src/commands/reflog-messages.ts +177 -0
- package/src/commands/remote-command.ts +93 -22
- package/src/commands/remote-transport.ts +383 -0
- package/src/commands/reset-command.ts +827 -103
- package/src/commands/restore-command.ts +350 -0
- package/src/commands/rev-list-command.ts +167 -0
- package/src/commands/rev-parse-command.ts +277 -0
- package/src/commands/revert-command.ts +152 -399
- package/src/commands/revision-filenames.ts +254 -0
- package/src/commands/revision-range.ts +222 -0
- package/src/commands/revision-resolver.ts +1379 -0
- package/src/commands/rm-command.ts +613 -67
- package/src/commands/sequencer-pick.ts +869 -0
- package/src/commands/sequencer-support.ts +869 -0
- package/src/commands/serve-repository.ts +125 -0
- package/src/commands/sparse-checkout-command.ts +1389 -0
- package/src/commands/sparse-checkout-support.ts +793 -0
- package/src/commands/stash-apply-command.ts +376 -343
- package/src/commands/stash-create-command.ts +625 -42
- package/src/commands/stash-drop-command.ts +15 -2
- package/src/commands/stash-working-tree.ts +168 -24
- package/src/commands/status-command.ts +1328 -105
- package/src/commands/status-format.ts +775 -0
- package/src/commands/status-header.ts +330 -0
- package/src/commands/strerror.ts +29 -0
- package/src/commands/submodule-config.ts +94 -0
- package/src/commands/submodule-summary-command.ts +334 -0
- package/src/commands/submodule-summary.ts +446 -0
- package/src/commands/switch-command.ts +402 -0
- package/src/commands/tag-command.ts +129 -41
- package/src/commands/tracking-info.ts +201 -0
- package/src/commands/trailers.ts +417 -0
- package/src/commands/tree-restore.ts +204 -4
- package/src/commands/untracked-cache-support.ts +194 -0
- package/src/commands/worktree-add-command.ts +458 -0
- package/src/commands/worktree-list-command.ts +208 -0
- package/src/commands/worktree-lock-command.ts +96 -0
- package/src/commands/worktree-overwrite-checks.ts +452 -26
- package/src/commands/worktree-prune-command.ts +99 -0
- package/src/commands/worktree-remove-command.ts +186 -0
- package/src/commands/worktree-repair-command.ts +59 -0
- package/src/commands/worktree-support.ts +214 -0
- package/src/core-commands/add.command.impl.ts +7 -1
- package/src/errors/add-errors.ts +45 -0
- package/src/errors/checkout-errors.ts +26 -2
- package/src/errors/command-errors.ts +101 -1
- package/src/errors/commit-errors.ts +18 -2
- package/src/errors/git-api-error.ts +82 -2
- package/src/errors/index.ts +1 -0
- package/src/errors/merge-errors.ts +2 -2
- package/src/errors/rebase-errors.ts +12 -0
- package/src/errors/ref-errors.ts +56 -2
- package/src/errors/remote-errors.ts +2 -2
- package/src/errors/stash-errors.ts +1 -1
- package/src/errors/transport-errors.ts +20 -4
- package/src/errors/worktree-errors.ts +49 -0
- package/src/git-command.ts +1177 -118
- package/src/git.ts +523 -10
- package/src/index.ts +1 -1
- package/src/remote-config/remote-config-store.ts +242 -8
- package/src/remote-config/remote-refs.ts +22 -6
- package/src/rename/detect-renames.ts +711 -0
- package/src/rename/git-similarity.ts +116 -0
- package/src/rename/index.ts +2 -0
- package/src/results/binary-patch.ts +401 -0
- package/src/results/blame-format.ts +239 -0
- package/src/results/cherry-pick-result.ts +10 -0
- package/src/results/clone-result.ts +12 -0
- package/src/results/combined-diff.ts +585 -0
- package/src/results/diff-entry.ts +35 -0
- package/src/results/diff-formatter.ts +152 -288
- package/src/results/diff-order.ts +64 -0
- package/src/results/diff-output.ts +1051 -0
- package/src/results/fetch-result.ts +15 -0
- package/src/results/index.ts +5 -0
- package/src/results/merge-result.ts +15 -1
- package/src/results/pull-result.ts +12 -3
- package/src/results/push-result.ts +43 -0
- package/src/results/quote-path.ts +103 -0
- package/src/results/rebase-result.ts +37 -0
- package/src/results/revert-result.ts +10 -0
- package/src/results/stash-result.ts +6 -0
- package/src/results/status-result.ts +123 -45
- package/src/transport-command.ts +121 -2
- package/dist/commands-CsLNyvZ1.js +0 -12587
- package/dist/status-result-BpyUK1Sg.js +0 -519
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Formatter for
|
|
3
|
-
*
|
|
4
|
-
* Based on JGit's DiffFormatter class.
|
|
2
|
+
* Formatter for unified diffs of DiffEntry objects, byte for byte as `git diff` prints them
|
|
3
|
+
* (see {@link formatPatch} for the rules).
|
|
5
4
|
*/
|
|
6
5
|
import { type Blobs } from "@statewalker/vcs-core";
|
|
7
|
-
import { type SupportedAlgorithm } from "@statewalker/vcs-utils";
|
|
6
|
+
import { type SupportedAlgorithm, type XdiffAlgorithm } from "@statewalker/vcs-utils";
|
|
8
7
|
import { type DiffEntry } from "./diff-entry.js";
|
|
8
|
+
import { type DiffFilePair, type DiffOutputOptions } from "./diff-output.js";
|
|
9
9
|
/**
|
|
10
10
|
* Options for diff formatting.
|
|
11
11
|
*/
|
|
12
|
-
export interface DiffFormatterOptions {
|
|
13
|
-
/** Number of context lines around changes (default: 3) */
|
|
12
|
+
export interface DiffFormatterOptions extends Omit<DiffOutputOptions, "algorithm"> {
|
|
13
|
+
/** Number of context lines around changes (default: 3; same as `context`) */
|
|
14
14
|
contextLines?: number;
|
|
15
15
|
/** Whether to include file headers (default: true) */
|
|
16
16
|
includeHeaders?: boolean;
|
|
@@ -18,8 +18,8 @@ export interface DiffFormatterOptions {
|
|
|
18
18
|
abbreviateIds?: boolean;
|
|
19
19
|
/** Length of abbreviated object IDs (default: 7) */
|
|
20
20
|
abbreviationLength?: number;
|
|
21
|
-
/** Diff algorithm
|
|
22
|
-
algorithm?: SupportedAlgorithm;
|
|
21
|
+
/** Diff algorithm (default: myers, as git's `diff.algorithm`) */
|
|
22
|
+
algorithm?: XdiffAlgorithm | SupportedAlgorithm;
|
|
23
23
|
/**
|
|
24
24
|
* Files larger than this are binary: they show as "Binary files differ" and are
|
|
25
25
|
* never loaded (git's `core.bigFileThreshold`). Default 50 MiB.
|
|
@@ -30,15 +30,20 @@ export interface DiffFormatterOptions {
|
|
|
30
30
|
* A hunk in unified diff format.
|
|
31
31
|
*/
|
|
32
32
|
export interface DiffHunk {
|
|
33
|
-
/** Starting line in old file (1-based) */
|
|
33
|
+
/** Starting line in old file, as printed (1-based; the line before for an empty range) */
|
|
34
34
|
oldStart: number;
|
|
35
35
|
/** Number of lines from old file */
|
|
36
36
|
oldCount: number;
|
|
37
|
-
/** Starting line in new file
|
|
37
|
+
/** Starting line in new file, as printed */
|
|
38
38
|
newStart: number;
|
|
39
39
|
/** Number of lines from new file */
|
|
40
40
|
newCount: number;
|
|
41
|
-
/**
|
|
41
|
+
/** The function line of the hunk header ("" when none) */
|
|
42
|
+
functionName?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Lines in the hunk (prefixed with ' ', '+', or '-', without line terminator), with
|
|
45
|
+
* "" after a line without one
|
|
46
|
+
*/
|
|
42
47
|
lines: string[];
|
|
43
48
|
}
|
|
44
49
|
/**
|
|
@@ -51,21 +56,27 @@ export interface FileContentDiff {
|
|
|
51
56
|
isBinary: boolean;
|
|
52
57
|
/** File header line (e.g., "diff --git a/path b/path") */
|
|
53
58
|
header: string;
|
|
54
|
-
/** Old file header (e.g., "--- a/path") */
|
|
59
|
+
/** Old file header (e.g., "--- a/path"), when hunks follow */
|
|
55
60
|
oldFileHeader?: string;
|
|
56
|
-
/** New file header (e.g., "+++ b/path") */
|
|
61
|
+
/** New file header (e.g., "+++ b/path"), when hunks follow */
|
|
57
62
|
newFileHeader?: string;
|
|
58
63
|
/** Index line (e.g., "index abc123..def456 100644") */
|
|
59
64
|
indexLine?: string;
|
|
65
|
+
/** Lines between the `diff --git` line and the file headers, each with its LF */
|
|
66
|
+
extendedHeaders?: string;
|
|
60
67
|
/** Hunks of changes */
|
|
61
68
|
hunks: DiffHunk[];
|
|
62
69
|
/** Raw old content of a text file (binary files are not loaded) */
|
|
63
70
|
oldContent?: Uint8Array;
|
|
64
71
|
/** Raw new content of a text file (binary files are not loaded) */
|
|
65
72
|
newContent?: Uint8Array;
|
|
73
|
+
/** The file's part of `git diff` output, exactly (empty when git prints nothing for it) */
|
|
74
|
+
patch: Uint8Array;
|
|
66
75
|
}
|
|
76
|
+
/** The file pair of a diff entry: blob sides, or the content the entry reads */
|
|
77
|
+
export declare function diffEntryToPair(entry: DiffEntry, blobs: Blobs): DiffFilePair;
|
|
67
78
|
/**
|
|
68
|
-
* Format DiffEntry objects into unified diff format.
|
|
79
|
+
* Format DiffEntry objects into unified diff format, as `git diff` prints them.
|
|
69
80
|
*
|
|
70
81
|
* @example
|
|
71
82
|
* ```typescript
|
|
@@ -75,20 +86,13 @@ export interface FileContentDiff {
|
|
|
75
86
|
* const entries = await git.diff().setOldTree(commitA).setNewTree(commitB).call();
|
|
76
87
|
*
|
|
77
88
|
* // Format as unified diff
|
|
78
|
-
*
|
|
79
|
-
* const diff = await formatter.format(entry);
|
|
80
|
-
* console.log(formatter.toString(diff));
|
|
81
|
-
* }
|
|
89
|
+
* process.stdout.write(await formatter.formatAll(entries));
|
|
82
90
|
* ```
|
|
83
91
|
*/
|
|
84
92
|
export declare class DiffFormatter {
|
|
85
93
|
private readonly blobs;
|
|
86
|
-
private
|
|
87
|
-
private
|
|
88
|
-
private abbreviateIds;
|
|
89
|
-
private abbreviationLength;
|
|
90
|
-
private diffAlgorithm;
|
|
91
|
-
private bigFileThreshold;
|
|
94
|
+
private readonly includeHeaders;
|
|
95
|
+
private readonly output;
|
|
92
96
|
constructor(blobs: Blobs, options?: DiffFormatterOptions);
|
|
93
97
|
/**
|
|
94
98
|
* Format a DiffEntry into a content diff.
|
|
@@ -103,54 +107,24 @@ export declare class DiffFormatter {
|
|
|
103
107
|
*/
|
|
104
108
|
format(entry: DiffEntry): Promise<FileContentDiff>;
|
|
105
109
|
/**
|
|
106
|
-
*
|
|
110
|
+
* The file's part of the diff as text: exactly git's output (LF-terminated lines), or
|
|
111
|
+
* without the file headers when `includeHeaders` is false. Bytes that are no UTF-8 decode
|
|
112
|
+
* as paths do (`decodeGitPath`), so `encodeGitPath` of the text gives the bytes back.
|
|
107
113
|
*
|
|
108
114
|
* @param diff The content diff to stringify
|
|
109
115
|
* @returns Unified diff string
|
|
110
116
|
*/
|
|
111
117
|
toString(diff: FileContentDiff): string;
|
|
112
118
|
/**
|
|
113
|
-
* Format all diff entries to a single string.
|
|
119
|
+
* Format all diff entries to a single string, as `git diff` prints them.
|
|
114
120
|
*
|
|
115
121
|
* @param entries Array of diff entries
|
|
116
122
|
* @returns Complete unified diff output
|
|
117
123
|
*/
|
|
118
124
|
formatAll(entries: DiffEntry[]): Promise<string>;
|
|
119
125
|
/**
|
|
120
|
-
*
|
|
121
|
-
*/
|
|
122
|
-
private buildHeader;
|
|
123
|
-
/**
|
|
124
|
-
* Build the index line.
|
|
125
|
-
*/
|
|
126
|
-
private buildIndexLine;
|
|
127
|
-
/**
|
|
128
|
-
* Build the old file header line.
|
|
129
|
-
*/
|
|
130
|
-
private buildOldFileHeader;
|
|
131
|
-
/**
|
|
132
|
-
* Build the new file header line.
|
|
133
|
-
*/
|
|
134
|
-
private buildNewFileHeader;
|
|
135
|
-
/**
|
|
136
|
-
* Abbreviate an object ID.
|
|
137
|
-
*/
|
|
138
|
-
private abbreviateId;
|
|
139
|
-
/**
|
|
140
|
-
* Format the hunk header.
|
|
141
|
-
*/
|
|
142
|
-
private formatHunkHeader;
|
|
143
|
-
/**
|
|
144
|
-
* Format edits into hunks.
|
|
145
|
-
*/
|
|
146
|
-
private formatEdits;
|
|
147
|
-
/**
|
|
148
|
-
* Combine edits that are within context range of each other.
|
|
149
|
-
*/
|
|
150
|
-
private combineEdits;
|
|
151
|
-
/**
|
|
152
|
-
* Create a hunk from a group of edits.
|
|
126
|
+
* All diff entries as the bytes `git diff` prints (content that is not UTF-8 kept as it is).
|
|
153
127
|
*/
|
|
154
|
-
|
|
128
|
+
formatBytes(entries: DiffEntry[]): Promise<Uint8Array>;
|
|
155
129
|
}
|
|
156
130
|
//# sourceMappingURL=diff-formatter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff-formatter.d.ts","sourceRoot":"","sources":["../../src/results/diff-formatter.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"diff-formatter.d.ts","sourceRoot":"","sources":["../../src/results/diff-formatter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,KAAK,EAA8B,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAY,KAAK,kBAAkB,EAAE,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGhG,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,iBAAiB,EAIvB,MAAM,kBAAkB,CAAC;AAE1B;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,WAAW,CAAC;IAChF,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sDAAsD;IACtD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,uDAAuD;IACvD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oDAAoD;IACpD,kBAAkB,CAAC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KAAK;IAJxB,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAU;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;IAE3C,YACmB,KAAK,EAAE,KAAK,EAC7B,OAAO,GAAE,oBAAyB,EAoBnC;IAED;;;;;;;;;;OAUG;IACG,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,eAAe,CAAC,CAyCvD;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAKtC;IAED;;;;;OAKG;IACG,SAAS,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAIrD;IAED;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAI3D;CACF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* git's `diffcore-order.c` (`-O<orderfile>`, `diff.orderFile`): file pairs reordered by the
|
|
3
|
+
* glob patterns of an order file.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```typescript
|
|
7
|
+
* const patterns = parseOrderFile(new TextEncoder().encode("*.h\n# headers first\n*.c\n"));
|
|
8
|
+
* orderByPatterns(["b.c", "a.h", "README"], patterns, (p) => p);
|
|
9
|
+
* // ["a.h", "b.c", "README"]
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* Each line of the file is a pattern, taken as it is (no trimming); empty lines and lines
|
|
13
|
+
* starting with `#` are skipped. A path's rank is the first pattern that matches it or one
|
|
14
|
+
* of its leading directories (wildmatch without `WM_PATHNAME`, so `*` also matches `/`);
|
|
15
|
+
* paths no pattern matches come last, and paths of the same rank keep their order.
|
|
16
|
+
*
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
/** The patterns of an order file (git's `prepare_order`) */
|
|
20
|
+
export declare function parseOrderFile(content: Uint8Array): string[];
|
|
21
|
+
/** The rank of `path`: the first pattern matching it or a leading directory (`match_order`) */
|
|
22
|
+
export declare function orderRank(patterns: readonly string[], path: string): number;
|
|
23
|
+
/** The items ordered by the rank of their paths, stably (`order_objects`) */
|
|
24
|
+
export declare function orderByPatterns<T>(items: readonly T[], patterns: readonly string[], pathOf: (item: T) => string): T[];
|
|
25
|
+
//# sourceMappingURL=diff-order.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff-order.d.ts","sourceRoot":"","sources":["../../src/results/diff-order.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,4DAA4D;AAC5D,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,EAAE,CAc5D;AAED,+FAA+F;AAC/F,wBAAgB,SAAS,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAW3E;AAED,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,CAAC,EAC/B,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAC1B,CAAC,EAAE,CAKL"}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* git's diff output (`diff.c`) over file pairs: the patch (`git diff`), `--stat`,
|
|
3
|
+
* `--numstat`, `--shortstat`, `--name-only` and `--name-status`, byte for byte as git prints
|
|
4
|
+
* them.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const pairs: DiffFilePair[] = [{ status: "M", old: blobSide(...), new: blobSide(...) }];
|
|
9
|
+
* const patch = await formatPatch(pairs, { context: 3, indentHeuristic: true });
|
|
10
|
+
* const stat = formatStat(await computeDiffstat(pairs), { width: 80 });
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* A pair has an old and a new side; a side that does not exist (an added file's old side,
|
|
14
|
+
* a deleted file's new side) is left out. Each file is shown as git's `builtin_diff` shows
|
|
15
|
+
* it: the `diff --git` header with mode, rename and `index` lines, then "Binary files ...
|
|
16
|
+
* differ" or the hunks of the text diff ({@link unifiedDiffHunks}). A pair between a file
|
|
17
|
+
* and a symbolic link is shown as a deletion and an addition. The header of a file whose
|
|
18
|
+
* diff comes out empty (only whitespace changes under `-w`) is printed only when it
|
|
19
|
+
* carries news of its own (mode change, rename, new or deleted file).
|
|
20
|
+
*
|
|
21
|
+
* @module
|
|
22
|
+
*/
|
|
23
|
+
import { type Blobs } from "@statewalker/vcs-core";
|
|
24
|
+
import { ByteSink, type FindFunction, type UnifiedDiffOptions, type UnifiedDiffResult, type XdiffAlgorithm } from "@statewalker/vcs-utils";
|
|
25
|
+
/** One side of a file pair */
|
|
26
|
+
export interface DiffSideSpec {
|
|
27
|
+
path: string;
|
|
28
|
+
/** git file mode, e.g. `0o100644` */
|
|
29
|
+
mode: number;
|
|
30
|
+
/** Object id of the content (a worktree file: the id of its cleaned content) */
|
|
31
|
+
id: string;
|
|
32
|
+
/** The content (a symbolic link: its target; a submodule: "Subproject commit <id>\n") */
|
|
33
|
+
read(): Promise<Uint8Array>;
|
|
34
|
+
/**
|
|
35
|
+
* The bytes a textconv command reads, as git's `prepare_temp_file` writes them: a stored
|
|
36
|
+
* blob as checkout would write it (smudged), a worktree file as it is (not cleaned);
|
|
37
|
+
* default {@link read}
|
|
38
|
+
*/
|
|
39
|
+
readTextconvInput?(): Promise<Uint8Array>;
|
|
40
|
+
/**
|
|
41
|
+
* Whether `id` is known as git knows a stored object's (default true); false for content
|
|
42
|
+
* hashed here, a worktree file or a file outside the repository (git's `oid_valid` unset):
|
|
43
|
+
* the diffstat then compares the contents even when the ids are equal
|
|
44
|
+
*/
|
|
45
|
+
idValid?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Size and binary probe without reading everything (big files): when absent, the content
|
|
48
|
+
* is read
|
|
49
|
+
*/
|
|
50
|
+
probe?(bigFileThreshold: number): Promise<{
|
|
51
|
+
size: number;
|
|
52
|
+
binary: boolean;
|
|
53
|
+
}>;
|
|
54
|
+
/**
|
|
55
|
+
* A submodule's own changes in the worktree (git's `dirty_submodule`): tracked changes
|
|
56
|
+
* (`modified`) and untracked files (`untracked`) inside it
|
|
57
|
+
*/
|
|
58
|
+
submoduleDirt?: {
|
|
59
|
+
modified?: boolean;
|
|
60
|
+
untracked?: boolean;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/** git's status letters of a file pair */
|
|
64
|
+
export type DiffStatus = "A" | "D" | "M" | "R" | "C" | "T";
|
|
65
|
+
/** A file pair as git's diff queue holds it */
|
|
66
|
+
export interface DiffFilePair {
|
|
67
|
+
status: DiffStatus;
|
|
68
|
+
/** The old side; absent for an added file */
|
|
69
|
+
old?: DiffSideSpec;
|
|
70
|
+
/** The new side; absent for a deleted file */
|
|
71
|
+
new?: DiffSideSpec;
|
|
72
|
+
/** Similarity percentage of a rename or copy */
|
|
73
|
+
score?: number;
|
|
74
|
+
}
|
|
75
|
+
/** What a diff driver (`diff=<name>` attribute) changes */
|
|
76
|
+
export interface DiffDriver {
|
|
77
|
+
/** Binary (`-diff`, `diff.<name>.binary`) or text (`diff`) regardless of content */
|
|
78
|
+
binary?: boolean;
|
|
79
|
+
/** Hunk header function lines (`diff.<name>.xfuncname`, builtin drivers) */
|
|
80
|
+
findFunction?: FindFunction;
|
|
81
|
+
/** `diff.<name>.algorithm` */
|
|
82
|
+
algorithm?: XdiffAlgorithm;
|
|
83
|
+
/** The driver's name (`diff=<name>`) */
|
|
84
|
+
name?: string;
|
|
85
|
+
/** `diff.<name>.textconv`: the command git would run to turn the content into text */
|
|
86
|
+
textconvCommand?: string;
|
|
87
|
+
/** `diff.<name>.cachetextconv` (output is the same with or without the cache) */
|
|
88
|
+
cacheTextconv?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Turns a side's content into the text the patch compares (git's `fill_textconv`): set
|
|
91
|
+
* when textconv is allowed and the host can run `textconvCommand`. A side converted this
|
|
92
|
+
* way is never binary.
|
|
93
|
+
*/
|
|
94
|
+
textconv?: TextconvFunction;
|
|
95
|
+
}
|
|
96
|
+
/** A textconv conversion: the text of `content`, the content of the file `path` */
|
|
97
|
+
export type TextconvFunction = (content: Uint8Array, path: string) => Promise<Uint8Array>;
|
|
98
|
+
/** Options of the diff output */
|
|
99
|
+
export interface DiffOutputOptions extends Omit<UnifiedDiffOptions, "findFunction" | "indentHeuristic"> {
|
|
100
|
+
/** Slide changes as the indentation suggests (`diff.indentHeuristic`, default true) */
|
|
101
|
+
indentHeuristic?: boolean;
|
|
102
|
+
/** Length of abbreviated object ids in `index` lines (default 7) */
|
|
103
|
+
abbrev?: number;
|
|
104
|
+
/**
|
|
105
|
+
* The length of each id in `index` lines, as git abbreviates them (`DiffCommand` finds
|
|
106
|
+
* them from `core.abbrev`, the repository's size and the other objects); ids not in it
|
|
107
|
+
* take `abbrev`
|
|
108
|
+
*/
|
|
109
|
+
abbrevLengths?: ReadonlyMap<string, number>;
|
|
110
|
+
/** Full object ids in `index` lines (`--full-index`) */
|
|
111
|
+
fullIndex?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* `--submodule=log` / `--submodule=diff`: writes a pair whose sides are submodules (or
|
|
114
|
+
* absent) in place of its patch (builtin_diff's submodule branch); unset, a submodule's
|
|
115
|
+
* change is a `Subproject commit` patch (`--submodule=short`)
|
|
116
|
+
*/
|
|
117
|
+
submodulePatch?: (sink: ByteSink, pair: DiffFilePair, options: DiffOutputOptions) => Promise<void>;
|
|
118
|
+
/**
|
|
119
|
+
* `--binary`: binary files as "GIT binary patch" hunks `git apply` can apply (their `index`
|
|
120
|
+
* lines with full ids), instead of "Binary files ... differ"
|
|
121
|
+
*/
|
|
122
|
+
binaryPatch?: boolean;
|
|
123
|
+
/** `core.quotePath` (default true): bytes above 0x7f in paths are escaped */
|
|
124
|
+
quotePath?: boolean;
|
|
125
|
+
/** Larger files are binary (`core.bigFileThreshold`, default 512 MiB as git's diff) */
|
|
126
|
+
bigFileThreshold?: number;
|
|
127
|
+
/** Treat every file as text (`-a`, `--text`) */
|
|
128
|
+
text?: boolean;
|
|
129
|
+
/** Prefix of old paths (default "a/"; `--src-prefix`, `--no-prefix`) */
|
|
130
|
+
srcPrefix?: string;
|
|
131
|
+
/** Prefix of new paths (default "b/") */
|
|
132
|
+
dstPrefix?: string;
|
|
133
|
+
/** The diff driver of a path (from its `diff` attribute), if any */
|
|
134
|
+
driver?: (path: string) => Promise<DiffDriver | undefined> | DiffDriver | undefined;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The driver of a `diff` attribute value (git's `userdiff_find_by_path`): set means text,
|
|
138
|
+
* unset means binary, a name means `diff.<name>.*` from `config` or a builtin driver.
|
|
139
|
+
*/
|
|
140
|
+
export declare function diffDriverOf(attribute: true | false | string | undefined | null, config?: (key: string) => string | undefined): DiffDriver | undefined;
|
|
141
|
+
/**
|
|
142
|
+
* The patch of the pairs, as `git diff` prints it.
|
|
143
|
+
*/
|
|
144
|
+
export declare function formatPatch(pairs: DiffFilePair[], options?: DiffOutputOptions): Promise<Uint8Array>;
|
|
145
|
+
/** What {@link writePairPatch} found for a pair (the last part, for a split pair) */
|
|
146
|
+
export interface PairPatchReport {
|
|
147
|
+
/** "Binary files ... differ" (or binary and equal) */
|
|
148
|
+
binary: boolean;
|
|
149
|
+
/** The `diff --git` line, without its LF */
|
|
150
|
+
gitLine: string;
|
|
151
|
+
/** The lines between `diff --git` and `---` (mode, rename, index lines), each with LF */
|
|
152
|
+
extended: string;
|
|
153
|
+
/** The `---` and `+++` lines, without LF, when hunks were printed */
|
|
154
|
+
oldLabel?: string;
|
|
155
|
+
newLabel?: string;
|
|
156
|
+
/** The text diff, for a text pair */
|
|
157
|
+
result?: UnifiedDiffResult;
|
|
158
|
+
}
|
|
159
|
+
/** Writes one pair as `run_diff` does: a file/symlink change as deletion and addition */
|
|
160
|
+
export declare function writePairPatch(sink: ByteSink, pair: DiffFilePair, options?: DiffOutputOptions, report?: PairPatchReport): Promise<void>;
|
|
161
|
+
/** One file of a diffstat (`struct diffstat_file`) */
|
|
162
|
+
export interface DiffstatFile {
|
|
163
|
+
/** The old name of a renamed (or differently named) pair */
|
|
164
|
+
fromName?: string;
|
|
165
|
+
name: string;
|
|
166
|
+
isRenamed: boolean;
|
|
167
|
+
isBinary: boolean;
|
|
168
|
+
isUnmerged?: boolean;
|
|
169
|
+
/** Lines added (binary: new size in bytes) */
|
|
170
|
+
added: number;
|
|
171
|
+
/** Lines deleted (binary: old size in bytes) */
|
|
172
|
+
deleted: number;
|
|
173
|
+
}
|
|
174
|
+
/** The diffstat of the pairs (`builtin_diffstat` for each) */
|
|
175
|
+
export declare function computeDiffstat(pairs: DiffFilePair[], options?: DiffOutputOptions): Promise<DiffstatFile[]>;
|
|
176
|
+
/** Options of {@link formatStat} (`--stat=<width>[,<name-width>[,<count>]]`) */
|
|
177
|
+
export interface DiffstatOptions {
|
|
178
|
+
/** Total width (`COLUMNS`, default 80) */
|
|
179
|
+
width?: number;
|
|
180
|
+
/** Width of the name part (`--stat-name-width`, `diff.statNameWidth`) */
|
|
181
|
+
nameWidth?: number;
|
|
182
|
+
/** Width of the graph part (`--stat-graph-width`, `diff.statGraphWidth`) */
|
|
183
|
+
graphWidth?: number;
|
|
184
|
+
/** Files shown (`--stat-count`) */
|
|
185
|
+
count?: number;
|
|
186
|
+
/** `core.quotePath` (default true) */
|
|
187
|
+
quotePath?: boolean;
|
|
188
|
+
}
|
|
189
|
+
/** git's `pprint_rename`: `a/{b => c}/d` */
|
|
190
|
+
export declare function pprintRename(a: string, b: string, quote?: boolean): string;
|
|
191
|
+
/**
|
|
192
|
+
* Display width of a name, as git's utf8_strwidth measures it (git 2.56's character widths:
|
|
193
|
+
* wide East Asian characters and emoji two columns, combining marks none; a name that is not
|
|
194
|
+
* valid UTF-8 its byte count)
|
|
195
|
+
*/
|
|
196
|
+
export declare function displayWidth(s: string): number;
|
|
197
|
+
/** git's `print_stat_summary_inserts_deletes` */
|
|
198
|
+
export declare function statSummary(files: number, insertions: number, deletions: number): string;
|
|
199
|
+
/** `--stat`, as git's `show_stats` prints it */
|
|
200
|
+
export declare function formatStat(files: DiffstatFile[], options?: DiffstatOptions): string;
|
|
201
|
+
/** `--shortstat` (git's `show_shortstats`) */
|
|
202
|
+
export declare function formatShortstat(files: DiffstatFile[]): string;
|
|
203
|
+
/** `--numstat` (git's `show_numstat`) */
|
|
204
|
+
export declare function formatNumstat(files: DiffstatFile[], options?: {
|
|
205
|
+
quotePath?: boolean;
|
|
206
|
+
}): string;
|
|
207
|
+
/** `--name-only`: the new path of each pair */
|
|
208
|
+
export declare function formatNameOnly(pairs: DiffFilePair[], options?: {
|
|
209
|
+
quotePath?: boolean;
|
|
210
|
+
}): string;
|
|
211
|
+
/** `--name-status` (git's `diff_flush_raw` with `DIFF_FORMAT_NAME_STATUS`) */
|
|
212
|
+
export declare function formatNameStatus(pairs: DiffFilePair[], options?: {
|
|
213
|
+
quotePath?: boolean;
|
|
214
|
+
}): string;
|
|
215
|
+
/**
|
|
216
|
+
* `--summary` (diff.c's diff_summary for each pair): ` create mode 100644 <path>`, ` delete
|
|
217
|
+
* mode ...`, ` rename <a => b> (<n>%)` and ` copy ...` (then their mode change), ` mode change
|
|
218
|
+
* 100644 => 100755 <path>`; empty when nothing is to be said (git's is_summary_empty).
|
|
219
|
+
*/
|
|
220
|
+
export declare function formatSummary(pairs: DiffFilePair[], quote?: boolean): string;
|
|
221
|
+
/**
|
|
222
|
+
* A side whose content is a stored blob (a submodule's: "Subproject commit <id>\n", as git
|
|
223
|
+
* shows a gitlink). The probe reads a text blob once and keeps it for {@link DiffSideSpec.read}.
|
|
224
|
+
*/
|
|
225
|
+
export declare function blobSide(blobs: Blobs, path: string, mode: number, id: string): DiffSideSpec;
|
|
226
|
+
/** A side whose content comes from elsewhere (a worktree file, a file outside a repository) */
|
|
227
|
+
export declare function contentSide(path: string, mode: number, id: string, read: () => Promise<Uint8Array>, idValid?: boolean): DiffSideSpec;
|
|
228
|
+
/**
|
|
229
|
+
* Bytes for a string (diff output pieces are UTF-8; a path's escaped bytes, unquoted with
|
|
230
|
+
* `core.quotePath=false`, are written as the bytes they stand for)
|
|
231
|
+
*/
|
|
232
|
+
export declare function utf8(s: string): Uint8Array;
|
|
233
|
+
/** A file of a `--no-index` diff: its path as given, content, and mode (default 100644) */
|
|
234
|
+
export interface NoIndexFile {
|
|
235
|
+
path: string;
|
|
236
|
+
/** Undefined for a side that does not exist (`/dev/null`) */
|
|
237
|
+
content?: Uint8Array;
|
|
238
|
+
mode?: number;
|
|
239
|
+
}
|
|
240
|
+
/** The blob id of `content` (as `hash-object` computes it) */
|
|
241
|
+
export declare function blobIdOf(content: Uint8Array): string;
|
|
242
|
+
/**
|
|
243
|
+
* The pair `diff --no-index a b` compares for two files: a modification between two names
|
|
244
|
+
* (no rename detection), or an addition or deletion against `/dev/null`.
|
|
245
|
+
*/
|
|
246
|
+
export declare function noIndexPair(a: NoIndexFile, b: NoIndexFile): DiffFilePair | undefined;
|
|
247
|
+
/** `diff --no-index a b` for two files, as git prints it */
|
|
248
|
+
export declare function formatNoIndexDiff(a: NoIndexFile, b: NoIndexFile, options?: DiffOutputOptions): Promise<Uint8Array>;
|
|
249
|
+
//# sourceMappingURL=diff-output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff-output.d.ts","sourceRoot":"","sources":["../../src/results/diff-output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,KAAK,KAAK,EAAa,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,QAAQ,EAIR,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EAItB,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAYhC,8BAA8B;AAC9B,MAAM,WAAW,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A;CAAO,GACpC,MAAM,CAaR;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,KAAK,UAAO,GAAG,MAAM,CAqCzE;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,YAAY,CAiC3F;AAED,+FAA+F;AAC/F,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,OAAO,CAAC,UAAU,CAAC,EAC/B,OAAO,UAAQ,GACd,YAAY,CAYd;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,UAAU,CAE1C;AAED,2FAA2F;AAC3F,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,8DAA8D;AAC9D,wBAAgB,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAOpD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,YAAY,GAAG,SAAS,CAWpF;AAED,4DAA4D;AAC5D,wBAAsB,iBAAiB,CACrC,CAAC,EAAE,WAAW,EACd,CAAC,EAAE,WAAW,EACd,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,UAAU,CAAC,CAGrB"}
|
|
@@ -74,6 +74,16 @@ export interface FetchResult {
|
|
|
74
74
|
* the symbolic refs a prune left dangling
|
|
75
75
|
*/
|
|
76
76
|
messages: string[];
|
|
77
|
+
/**
|
|
78
|
+
* The ref lines git prints on stderr (`From <url>`, ` * [new branch] main -> origin/main`,
|
|
79
|
+
* ` 1a2b3c4..5d6e7f8 dev -> origin/dev`, ` - [deleted] (none) -> origin/gone`), ids
|
|
80
|
+
* abbreviated as git's find_unique_abbrev under `core.abbrev`, the columns as wide as git
|
|
81
|
+
* makes them; empty when no ref changed. With `setVerbose(true)` (`-v`) the refs already up
|
|
82
|
+
* to date have their ` = [up to date]` lines too; with `fetch.output=compact` a shared tail
|
|
83
|
+
* of the names is `*`; with `setPorcelain(true)` (`--porcelain`, on stdout) these are
|
|
84
|
+
* `<flag> <old-id> <new-id> <local-ref>` lines without the `From` line.
|
|
85
|
+
*/
|
|
86
|
+
display?: string[];
|
|
77
87
|
/**
|
|
78
88
|
* What failed without stopping the fetch (a refused prune), where git reports an error
|
|
79
89
|
* and exits 1; absent when nothing failed
|
|
@@ -81,6 +91,11 @@ export interface FetchResult {
|
|
|
81
91
|
errors?: string[];
|
|
82
92
|
/** Submodule fetch results (if any) */
|
|
83
93
|
submodules?: Map<string, FetchResult>;
|
|
94
|
+
/**
|
|
95
|
+
* The layer hashes of the commit-graph chain the fetch wrote (`fetch.writeCommitGraph`,
|
|
96
|
+
* `--write-commit-graph`), base first; absent when it wrote none
|
|
97
|
+
*/
|
|
98
|
+
commitGraph?: string[];
|
|
84
99
|
}
|
|
85
100
|
/**
|
|
86
101
|
* Check if fetch result has any updates.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-result.d.ts","sourceRoot":"","sources":["../../src/results/fetch-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,mCAAmC;IACnC,WAAW,EAAE,QAAQ,CAAC;IACtB,2BAA2B;IAC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,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAEvD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,WAAW,GAAG,iBAAiB,EAAE,CAO7E"}
|
package/dist/results/index.d.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
export * from "./blame-format.js";
|
|
1
2
|
export * from "./cherry-pick-result.js";
|
|
2
3
|
export * from "./clone-result.js";
|
|
4
|
+
export * from "./combined-diff.js";
|
|
3
5
|
export * from "./diff-entry.js";
|
|
4
6
|
export * from "./diff-formatter.js";
|
|
7
|
+
export * from "./diff-order.js";
|
|
8
|
+
export * from "./diff-output.js";
|
|
5
9
|
export * from "./fetch-result.js";
|
|
6
10
|
export * from "./init-result.js";
|
|
7
11
|
export * from "./merge-result.js";
|
|
8
12
|
export * from "./pull-result.js";
|
|
9
13
|
export * from "./push-result.js";
|
|
14
|
+
export * from "./quote-path.js";
|
|
10
15
|
export * from "./rebase-result.js";
|
|
11
16
|
export * from "./revert-result.js";
|
|
12
17
|
export * from "./stash-result.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/results/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/results/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
|