@gitkraken/core-gitlens 0.1.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/CHANGELOG.md +16 -0
- package/LICENSE +30 -0
- package/LICENSE.plus +40 -0
- package/README.md +54 -0
- package/dist/git/cache.d.ts +140 -0
- package/dist/git/cache.d.ts.map +1 -0
- package/dist/git/cache.js +765 -0
- package/dist/git/cache.js.map +1 -0
- package/dist/git/context.d.ts +238 -0
- package/dist/git/context.d.ts.map +1 -0
- package/dist/git/context.js +11 -0
- package/dist/git/context.js.map +1 -0
- package/dist/git/errors.d.ts +419 -0
- package/dist/git/errors.d.ts.map +1 -0
- package/dist/git/errors.js +681 -0
- package/dist/git/errors.js.map +1 -0
- package/dist/git/exec.types.d.ts +66 -0
- package/dist/git/exec.types.d.ts.map +1 -0
- package/dist/git/exec.types.js +2 -0
- package/dist/git/exec.types.js.map +1 -0
- package/dist/git/features.d.ts +8 -0
- package/dist/git/features.d.ts.map +1 -0
- package/dist/git/features.js +18 -0
- package/dist/git/features.js.map +1 -0
- package/dist/git/models/author.d.ts +17 -0
- package/dist/git/models/author.d.ts.map +1 -0
- package/dist/git/models/author.js +2 -0
- package/dist/git/models/author.js.map +1 -0
- package/dist/git/models/autolink.d.ts +51 -0
- package/dist/git/models/autolink.d.ts.map +1 -0
- package/dist/git/models/autolink.js +2 -0
- package/dist/git/models/autolink.js.map +1 -0
- package/dist/git/models/blame.d.ts +41 -0
- package/dist/git/models/blame.d.ts.map +1 -0
- package/dist/git/models/blame.js +2 -0
- package/dist/git/models/blame.js.map +1 -0
- package/dist/git/models/branch.d.ts +85 -0
- package/dist/git/models/branch.d.ts.map +1 -0
- package/dist/git/models/branch.js +174 -0
- package/dist/git/models/branch.js.map +1 -0
- package/dist/git/models/commit.d.ts +163 -0
- package/dist/git/models/commit.d.ts.map +1 -0
- package/dist/git/models/commit.js +496 -0
- package/dist/git/models/commit.js.map +1 -0
- package/dist/git/models/contributor.d.ts +40 -0
- package/dist/git/models/contributor.d.ts.map +1 -0
- package/dist/git/models/contributor.js +67 -0
- package/dist/git/models/contributor.js.map +1 -0
- package/dist/git/models/defaultBranch.d.ts +6 -0
- package/dist/git/models/defaultBranch.d.ts.map +1 -0
- package/dist/git/models/defaultBranch.js +2 -0
- package/dist/git/models/defaultBranch.js.map +1 -0
- package/dist/git/models/diff.d.ts +73 -0
- package/dist/git/models/diff.d.ts.map +1 -0
- package/dist/git/models/diff.js +2 -0
- package/dist/git/models/diff.js.map +1 -0
- package/dist/git/models/file.d.ts +23 -0
- package/dist/git/models/file.d.ts.map +1 -0
- package/dist/git/models/file.js +2 -0
- package/dist/git/models/file.js.map +1 -0
- package/dist/git/models/fileChange.d.ts +50 -0
- package/dist/git/models/fileChange.d.ts.map +1 -0
- package/dist/git/models/fileChange.js +69 -0
- package/dist/git/models/fileChange.js.map +1 -0
- package/dist/git/models/fileStatus.d.ts +33 -0
- package/dist/git/models/fileStatus.d.ts.map +1 -0
- package/dist/git/models/fileStatus.js +29 -0
- package/dist/git/models/fileStatus.js.map +1 -0
- package/dist/git/models/graph.d.ts +171 -0
- package/dist/git/models/graph.d.ts.map +1 -0
- package/dist/git/models/graph.js +2 -0
- package/dist/git/models/graph.js.map +1 -0
- package/dist/git/models/graphSearch.d.ts +48 -0
- package/dist/git/models/graphSearch.d.ts.map +1 -0
- package/dist/git/models/graphSearch.js +2 -0
- package/dist/git/models/graphSearch.js.map +1 -0
- package/dist/git/models/issue.d.ts +69 -0
- package/dist/git/models/issue.d.ts.map +1 -0
- package/dist/git/models/issue.js +68 -0
- package/dist/git/models/issue.js.map +1 -0
- package/dist/git/models/issueOrPullRequest.d.ts +19 -0
- package/dist/git/models/issueOrPullRequest.d.ts.map +1 -0
- package/dist/git/models/issueOrPullRequest.js +2 -0
- package/dist/git/models/issueOrPullRequest.js.map +1 -0
- package/dist/git/models/lineRange.d.ts +8 -0
- package/dist/git/models/lineRange.d.ts.map +1 -0
- package/dist/git/models/lineRange.js +2 -0
- package/dist/git/models/lineRange.js.map +1 -0
- package/dist/git/models/log.d.ts +19 -0
- package/dist/git/models/log.d.ts.map +1 -0
- package/dist/git/models/log.js +2 -0
- package/dist/git/models/log.js.map +1 -0
- package/dist/git/models/mergeConflicts.d.ts +23 -0
- package/dist/git/models/mergeConflicts.d.ts.map +1 -0
- package/dist/git/models/mergeConflicts.js +2 -0
- package/dist/git/models/mergeConflicts.js.map +1 -0
- package/dist/git/models/patch.d.ts +22 -0
- package/dist/git/models/patch.d.ts.map +1 -0
- package/dist/git/models/patch.js +2 -0
- package/dist/git/models/patch.js.map +1 -0
- package/dist/git/models/pausedOperationStatus.d.ts +52 -0
- package/dist/git/models/pausedOperationStatus.d.ts.map +1 -0
- package/dist/git/models/pausedOperationStatus.js +2 -0
- package/dist/git/models/pausedOperationStatus.js.map +1 -0
- package/dist/git/models/pullRequest.d.ts +125 -0
- package/dist/git/models/pullRequest.d.ts.map +1 -0
- package/dist/git/models/pullRequest.js +127 -0
- package/dist/git/models/pullRequest.js.map +1 -0
- package/dist/git/models/rebase.d.ts +51 -0
- package/dist/git/models/rebase.d.ts.map +1 -0
- package/dist/git/models/rebase.js +2 -0
- package/dist/git/models/rebase.js.map +1 -0
- package/dist/git/models/reference.d.ts +48 -0
- package/dist/git/models/reference.d.ts.map +1 -0
- package/dist/git/models/reference.js +2 -0
- package/dist/git/models/reference.js.map +1 -0
- package/dist/git/models/reflog.d.ts +33 -0
- package/dist/git/models/reflog.d.ts.map +1 -0
- package/dist/git/models/reflog.js +85 -0
- package/dist/git/models/reflog.js.map +1 -0
- package/dist/git/models/remote.d.ts +37 -0
- package/dist/git/models/remote.d.ts.map +1 -0
- package/dist/git/models/remote.js +98 -0
- package/dist/git/models/remote.js.map +1 -0
- package/dist/git/models/remoteProvider.d.ts +112 -0
- package/dist/git/models/remoteProvider.d.ts.map +1 -0
- package/dist/git/models/remoteProvider.js +154 -0
- package/dist/git/models/remoteProvider.js.map +1 -0
- package/dist/git/models/remoteResource.d.ts +78 -0
- package/dist/git/models/remoteResource.d.ts.map +1 -0
- package/dist/git/models/remoteResource.js +13 -0
- package/dist/git/models/remoteResource.js.map +1 -0
- package/dist/git/models/repository.d.ts +106 -0
- package/dist/git/models/repository.d.ts.map +1 -0
- package/dist/git/models/repository.js +324 -0
- package/dist/git/models/repository.js.map +1 -0
- package/dist/git/models/repositoryChangeEvent.d.ts +17 -0
- package/dist/git/models/repositoryChangeEvent.d.ts.map +1 -0
- package/dist/git/models/repositoryChangeEvent.js +26 -0
- package/dist/git/models/repositoryChangeEvent.js.map +1 -0
- package/dist/git/models/repositoryIdentities.d.ts +72 -0
- package/dist/git/models/repositoryIdentities.d.ts.map +1 -0
- package/dist/git/models/repositoryIdentities.js +7 -0
- package/dist/git/models/repositoryIdentities.js.map +1 -0
- package/dist/git/models/repositoryMetadata.d.ts +12 -0
- package/dist/git/models/repositoryMetadata.d.ts.map +1 -0
- package/dist/git/models/repositoryMetadata.js +2 -0
- package/dist/git/models/repositoryMetadata.js.map +1 -0
- package/dist/git/models/resourceDescriptor.d.ts +12 -0
- package/dist/git/models/resourceDescriptor.d.ts.map +1 -0
- package/dist/git/models/resourceDescriptor.js +2 -0
- package/dist/git/models/resourceDescriptor.js.map +1 -0
- package/dist/git/models/revision.d.ts +7 -0
- package/dist/git/models/revision.d.ts.map +1 -0
- package/dist/git/models/revision.js +6 -0
- package/dist/git/models/revision.js.map +1 -0
- package/dist/git/models/search.d.ts +66 -0
- package/dist/git/models/search.d.ts.map +1 -0
- package/dist/git/models/search.js +48 -0
- package/dist/git/models/search.js.map +1 -0
- package/dist/git/models/shortlog.d.ts +6 -0
- package/dist/git/models/shortlog.d.ts.map +1 -0
- package/dist/git/models/shortlog.js +2 -0
- package/dist/git/models/shortlog.js.map +1 -0
- package/dist/git/models/signature.d.ts +26 -0
- package/dist/git/models/signature.d.ts.map +1 -0
- package/dist/git/models/signature.js +2 -0
- package/dist/git/models/signature.js.map +1 -0
- package/dist/git/models/staging.d.ts +24 -0
- package/dist/git/models/staging.d.ts.map +1 -0
- package/dist/git/models/staging.js +2 -0
- package/dist/git/models/staging.js.map +1 -0
- package/dist/git/models/stash.d.ts +6 -0
- package/dist/git/models/stash.d.ts.map +1 -0
- package/dist/git/models/stash.js +2 -0
- package/dist/git/models/stash.js.map +1 -0
- package/dist/git/models/status.d.ts +55 -0
- package/dist/git/models/status.d.ts.map +1 -0
- package/dist/git/models/status.js +208 -0
- package/dist/git/models/status.js.map +1 -0
- package/dist/git/models/statusFile.d.ts +28 -0
- package/dist/git/models/statusFile.d.ts.map +1 -0
- package/dist/git/models/statusFile.js +114 -0
- package/dist/git/models/statusFile.js.map +1 -0
- package/dist/git/models/tag.d.ts +26 -0
- package/dist/git/models/tag.d.ts.map +1 -0
- package/dist/git/models/tag.js +73 -0
- package/dist/git/models/tag.js.map +1 -0
- package/dist/git/models/tree.d.ts +10 -0
- package/dist/git/models/tree.d.ts.map +1 -0
- package/dist/git/models/tree.js +2 -0
- package/dist/git/models/tree.js.map +1 -0
- package/dist/git/models/user.d.ts +7 -0
- package/dist/git/models/user.d.ts.map +1 -0
- package/dist/git/models/user.js +2 -0
- package/dist/git/models/user.js.map +1 -0
- package/dist/git/models/worktree.d.ts +51 -0
- package/dist/git/models/worktree.d.ts.map +1 -0
- package/dist/git/models/worktree.js +136 -0
- package/dist/git/models/worktree.js.map +1 -0
- package/dist/git/parsers/diffParser.d.ts +45 -0
- package/dist/git/parsers/diffParser.d.ts.map +1 -0
- package/dist/git/parsers/diffParser.js +628 -0
- package/dist/git/parsers/diffParser.js.map +1 -0
- package/dist/git/parsers/rebaseTodoParser.d.ts +15 -0
- package/dist/git/parsers/rebaseTodoParser.d.ts.map +1 -0
- package/dist/git/parsers/rebaseTodoParser.js +215 -0
- package/dist/git/parsers/rebaseTodoParser.js.map +1 -0
- package/dist/git/providers/blame.d.ts +15 -0
- package/dist/git/providers/blame.d.ts.map +1 -0
- package/dist/git/providers/blame.js +2 -0
- package/dist/git/providers/blame.js.map +1 -0
- package/dist/git/providers/branches.d.ts +80 -0
- package/dist/git/providers/branches.d.ts.map +1 -0
- package/dist/git/providers/branches.js +2 -0
- package/dist/git/providers/branches.js.map +1 -0
- package/dist/git/providers/commits.d.ts +102 -0
- package/dist/git/providers/commits.d.ts.map +1 -0
- package/dist/git/providers/commits.js +2 -0
- package/dist/git/providers/commits.js.map +1 -0
- package/dist/git/providers/config.d.ts +64 -0
- package/dist/git/providers/config.d.ts.map +1 -0
- package/dist/git/providers/config.js +2 -0
- package/dist/git/providers/config.js.map +1 -0
- package/dist/git/providers/contributors.d.ts +26 -0
- package/dist/git/providers/contributors.d.ts.map +1 -0
- package/dist/git/providers/contributors.js +2 -0
- package/dist/git/providers/contributors.js.map +1 -0
- package/dist/git/providers/diff.d.ts +73 -0
- package/dist/git/providers/diff.d.ts.map +1 -0
- package/dist/git/providers/diff.js +2 -0
- package/dist/git/providers/diff.js.map +1 -0
- package/dist/git/providers/graph.d.ts +20 -0
- package/dist/git/providers/graph.d.ts.map +1 -0
- package/dist/git/providers/graph.js +2 -0
- package/dist/git/providers/graph.js.map +1 -0
- package/dist/git/providers/operations.d.ts +65 -0
- package/dist/git/providers/operations.d.ts.map +1 -0
- package/dist/git/providers/operations.js +2 -0
- package/dist/git/providers/operations.js.map +1 -0
- package/dist/git/providers/patch.d.ts +27 -0
- package/dist/git/providers/patch.d.ts.map +1 -0
- package/dist/git/providers/patch.js +2 -0
- package/dist/git/providers/patch.js.map +1 -0
- package/dist/git/providers/pausedOperations.d.ts +11 -0
- package/dist/git/providers/pausedOperations.d.ts.map +1 -0
- package/dist/git/providers/pausedOperations.js +2 -0
- package/dist/git/providers/pausedOperations.js.map +1 -0
- package/dist/git/providers/provider.d.ts +57 -0
- package/dist/git/providers/provider.d.ts.map +1 -0
- package/dist/git/providers/provider.js +2 -0
- package/dist/git/providers/provider.js.map +1 -0
- package/dist/git/providers/refs.d.ts +22 -0
- package/dist/git/providers/refs.d.ts.map +1 -0
- package/dist/git/providers/refs.js +2 -0
- package/dist/git/providers/refs.js.map +1 -0
- package/dist/git/providers/remotes.d.ts +25 -0
- package/dist/git/providers/remotes.d.ts.map +1 -0
- package/dist/git/providers/remotes.js +2 -0
- package/dist/git/providers/remotes.js.map +1 -0
- package/dist/git/providers/revision.d.ts +28 -0
- package/dist/git/providers/revision.d.ts.map +1 -0
- package/dist/git/providers/revision.js +2 -0
- package/dist/git/providers/revision.js.map +1 -0
- package/dist/git/providers/shared/remotes.d.ts +25 -0
- package/dist/git/providers/shared/remotes.d.ts.map +1 -0
- package/dist/git/providers/shared/remotes.js +79 -0
- package/dist/git/providers/shared/remotes.js.map +1 -0
- package/dist/git/providers/staging.d.ts +22 -0
- package/dist/git/providers/staging.d.ts.map +1 -0
- package/dist/git/providers/staging.js +2 -0
- package/dist/git/providers/staging.js.map +1 -0
- package/dist/git/providers/stash.d.ts +41 -0
- package/dist/git/providers/stash.d.ts.map +1 -0
- package/dist/git/providers/stash.js +2 -0
- package/dist/git/providers/stash.js.map +1 -0
- package/dist/git/providers/status.d.ts +30 -0
- package/dist/git/providers/status.d.ts.map +1 -0
- package/dist/git/providers/status.js +2 -0
- package/dist/git/providers/status.js.map +1 -0
- package/dist/git/providers/tags.d.ts +18 -0
- package/dist/git/providers/tags.d.ts.map +1 -0
- package/dist/git/providers/tags.js +2 -0
- package/dist/git/providers/tags.js.map +1 -0
- package/dist/git/providers/types.d.ts +28 -0
- package/dist/git/providers/types.d.ts.map +1 -0
- package/dist/git/providers/types.js +2 -0
- package/dist/git/providers/types.js.map +1 -0
- package/dist/git/providers/worktrees.d.ts +23 -0
- package/dist/git/providers/worktrees.d.ts.map +1 -0
- package/dist/git/providers/worktrees.js +2 -0
- package/dist/git/providers/worktrees.js.map +1 -0
- package/dist/git/remotes/azure-devops.d.ts +43 -0
- package/dist/git/remotes/azure-devops.d.ts.map +1 -0
- package/dist/git/remotes/azure-devops.js +248 -0
- package/dist/git/remotes/azure-devops.js.map +1 -0
- package/dist/git/remotes/bitbucket-server.d.ts +32 -0
- package/dist/git/remotes/bitbucket-server.d.ts.map +1 -0
- package/dist/git/remotes/bitbucket-server.js +145 -0
- package/dist/git/remotes/bitbucket-server.js.map +1 -0
- package/dist/git/remotes/bitbucket.d.ts +29 -0
- package/dist/git/remotes/bitbucket.d.ts.map +1 -0
- package/dist/git/remotes/bitbucket.js +114 -0
- package/dist/git/remotes/bitbucket.js.map +1 -0
- package/dist/git/remotes/custom.d.ts +26 -0
- package/dist/git/remotes/custom.d.ts.map +1 -0
- package/dist/git/remotes/custom.js +111 -0
- package/dist/git/remotes/custom.js.map +1 -0
- package/dist/git/remotes/gerrit.d.ts +31 -0
- package/dist/git/remotes/gerrit.d.ts.map +1 -0
- package/dist/git/remotes/gerrit.js +146 -0
- package/dist/git/remotes/gerrit.js.map +1 -0
- package/dist/git/remotes/gitea.d.ts +30 -0
- package/dist/git/remotes/gitea.d.ts.map +1 -0
- package/dist/git/remotes/gitea.js +148 -0
- package/dist/git/remotes/gitea.js.map +1 -0
- package/dist/git/remotes/github.d.ts +41 -0
- package/dist/git/remotes/github.d.ts.map +1 -0
- package/dist/git/remotes/github.js +198 -0
- package/dist/git/remotes/github.js.map +1 -0
- package/dist/git/remotes/gitlab.d.ts +35 -0
- package/dist/git/remotes/gitlab.d.ts.map +1 -0
- package/dist/git/remotes/gitlab.js +232 -0
- package/dist/git/remotes/gitlab.js.map +1 -0
- package/dist/git/remotes/google-source.d.ts +17 -0
- package/dist/git/remotes/google-source.d.ts.map +1 -0
- package/dist/git/remotes/google-source.js +32 -0
- package/dist/git/remotes/google-source.js.map +1 -0
- package/dist/git/remotes/matcher.d.ts +35 -0
- package/dist/git/remotes/matcher.d.ts.map +1 -0
- package/dist/git/remotes/matcher.js +140 -0
- package/dist/git/remotes/matcher.js.map +1 -0
- package/dist/git/repositoryService.d.ts +127 -0
- package/dist/git/repositoryService.d.ts.map +1 -0
- package/dist/git/repositoryService.js +54 -0
- package/dist/git/repositoryService.js.map +1 -0
- package/dist/git/service.d.ts +112 -0
- package/dist/git/service.d.ts.map +1 -0
- package/dist/git/service.js +303 -0
- package/dist/git/service.js.map +1 -0
- package/dist/git/utils/autolink.utils.d.ts +13 -0
- package/dist/git/utils/autolink.utils.d.ts.map +1 -0
- package/dist/git/utils/autolink.utils.js +147 -0
- package/dist/git/utils/autolink.utils.js.map +1 -0
- package/dist/git/utils/blame.utils.d.ts +47 -0
- package/dist/git/utils/blame.utils.d.ts.map +1 -0
- package/dist/git/utils/blame.utils.js +239 -0
- package/dist/git/utils/blame.utils.js.map +1 -0
- package/dist/git/utils/branch.utils.d.ts +22 -0
- package/dist/git/utils/branch.utils.d.ts.map +1 -0
- package/dist/git/utils/branch.utils.js +122 -0
- package/dist/git/utils/branch.utils.js.map +1 -0
- package/dist/git/utils/commit.utils.d.ts +26 -0
- package/dist/git/utils/commit.utils.d.ts.map +1 -0
- package/dist/git/utils/commit.utils.js +54 -0
- package/dist/git/utils/commit.utils.js.map +1 -0
- package/dist/git/utils/contributor.utils.d.ts +15 -0
- package/dist/git/utils/contributor.utils.d.ts.map +1 -0
- package/dist/git/utils/contributor.utils.js +55 -0
- package/dist/git/utils/contributor.utils.js.map +1 -0
- package/dist/git/utils/fetch.utils.d.ts +20 -0
- package/dist/git/utils/fetch.utils.d.ts.map +1 -0
- package/dist/git/utils/fetch.utils.js +47 -0
- package/dist/git/utils/fetch.utils.js.map +1 -0
- package/dist/git/utils/fileStatus.utils.d.ts +24 -0
- package/dist/git/utils/fileStatus.utils.d.ts.map +1 -0
- package/dist/git/utils/fileStatus.utils.js +45 -0
- package/dist/git/utils/fileStatus.utils.js.map +1 -0
- package/dist/git/utils/issue.utils.d.ts +4 -0
- package/dist/git/utils/issue.utils.d.ts.map +1 -0
- package/dist/git/utils/issue.utils.js +76 -0
- package/dist/git/utils/issue.utils.js.map +1 -0
- package/dist/git/utils/issueOrPullRequest.utils.d.ts +3 -0
- package/dist/git/utils/issueOrPullRequest.utils.d.ts.map +1 -0
- package/dist/git/utils/issueOrPullRequest.utils.js +22 -0
- package/dist/git/utils/issueOrPullRequest.utils.js.map +1 -0
- package/dist/git/utils/mergeConflicts.utils.d.ts +3 -0
- package/dist/git/utils/mergeConflicts.utils.d.ts.map +1 -0
- package/dist/git/utils/mergeConflicts.utils.js +19 -0
- package/dist/git/utils/mergeConflicts.utils.js.map +1 -0
- package/dist/git/utils/pausedOperationStatus.utils.d.ts +58 -0
- package/dist/git/utils/pausedOperationStatus.utils.d.ts.map +1 -0
- package/dist/git/utils/pausedOperationStatus.utils.js +133 -0
- package/dist/git/utils/pausedOperationStatus.utils.js.map +1 -0
- package/dist/git/utils/pullRequest.utils.d.ts +12 -0
- package/dist/git/utils/pullRequest.utils.d.ts.map +1 -0
- package/dist/git/utils/pullRequest.utils.js +124 -0
- package/dist/git/utils/pullRequest.utils.js.map +1 -0
- package/dist/git/utils/rebase.utils.d.ts +19 -0
- package/dist/git/utils/rebase.utils.d.ts.map +1 -0
- package/dist/git/utils/rebase.utils.js +93 -0
- package/dist/git/utils/rebase.utils.js.map +1 -0
- package/dist/git/utils/reference.utils.d.ts +56 -0
- package/dist/git/utils/reference.utils.d.ts.map +1 -0
- package/dist/git/utils/reference.utils.js +191 -0
- package/dist/git/utils/reference.utils.js.map +1 -0
- package/dist/git/utils/remote.utils.d.ts +17 -0
- package/dist/git/utils/remote.utils.d.ts.map +1 -0
- package/dist/git/utils/remote.utils.js +124 -0
- package/dist/git/utils/remote.utils.js.map +1 -0
- package/dist/git/utils/repository.utils.d.ts +5 -0
- package/dist/git/utils/repository.utils.d.ts.map +1 -0
- package/dist/git/utils/repository.utils.js +15 -0
- package/dist/git/utils/repository.utils.js.map +1 -0
- package/dist/git/utils/resourceDescriptor.utils.d.ts +4 -0
- package/dist/git/utils/resourceDescriptor.utils.d.ts.map +1 -0
- package/dist/git/utils/resourceDescriptor.utils.js +17 -0
- package/dist/git/utils/resourceDescriptor.utils.js.map +1 -0
- package/dist/git/utils/revision.utils.d.ts +36 -0
- package/dist/git/utils/revision.utils.d.ts.map +1 -0
- package/dist/git/utils/revision.utils.js +114 -0
- package/dist/git/utils/revision.utils.js.map +1 -0
- package/dist/git/utils/search.utils.d.ts +15 -0
- package/dist/git/utils/search.utils.d.ts.map +1 -0
- package/dist/git/utils/search.utils.js +422 -0
- package/dist/git/utils/search.utils.js.map +1 -0
- package/dist/git/utils/sorting.d.ts +34 -0
- package/dist/git/utils/sorting.d.ts.map +1 -0
- package/dist/git/utils/sorting.js +203 -0
- package/dist/git/utils/sorting.js.map +1 -0
- package/dist/git/utils/status.utils.d.ts +20 -0
- package/dist/git/utils/status.utils.d.ts.map +1 -0
- package/dist/git/utils/status.utils.js +82 -0
- package/dist/git/utils/status.utils.js.map +1 -0
- package/dist/git/utils/statusFile.utils.d.ts +8 -0
- package/dist/git/utils/statusFile.utils.d.ts.map +1 -0
- package/dist/git/utils/statusFile.utils.js +76 -0
- package/dist/git/utils/statusFile.utils.js.map +1 -0
- package/dist/git/utils/tag.utils.d.ts +7 -0
- package/dist/git/utils/tag.utils.d.ts.map +1 -0
- package/dist/git/utils/tag.utils.js +13 -0
- package/dist/git/utils/tag.utils.js.map +1 -0
- package/dist/git/utils/tooltip.utils.d.ts +14 -0
- package/dist/git/utils/tooltip.utils.d.ts.map +1 -0
- package/dist/git/utils/tooltip.utils.js +29 -0
- package/dist/git/utils/tooltip.utils.js.map +1 -0
- package/dist/git/utils/uriAuthority.d.ts +16 -0
- package/dist/git/utils/uriAuthority.d.ts.map +1 -0
- package/dist/git/utils/uriAuthority.js +20 -0
- package/dist/git/utils/uriAuthority.js.map +1 -0
- package/dist/git/utils/user.utils.d.ts +3 -0
- package/dist/git/utils/user.utils.d.ts.map +1 -0
- package/dist/git/utils/user.utils.js +12 -0
- package/dist/git/utils/user.utils.js.map +1 -0
- package/dist/git/utils/worktree.utils.d.ts +7 -0
- package/dist/git/utils/worktree.utils.d.ts.map +1 -0
- package/dist/git/utils/worktree.utils.js +15 -0
- package/dist/git/utils/worktree.utils.js.map +1 -0
- package/dist/git/watching/changeEvent.d.ts +47 -0
- package/dist/git/watching/changeEvent.d.ts.map +1 -0
- package/dist/git/watching/changeEvent.js +69 -0
- package/dist/git/watching/changeEvent.js.map +1 -0
- package/dist/git/watching/classifyChange.d.ts +16 -0
- package/dist/git/watching/classifyChange.d.ts.map +1 -0
- package/dist/git/watching/classifyChange.js +61 -0
- package/dist/git/watching/classifyChange.js.map +1 -0
- package/dist/git/watching/gitIgnoreFilter.d.ts +58 -0
- package/dist/git/watching/gitIgnoreFilter.d.ts.map +1 -0
- package/dist/git/watching/gitIgnoreFilter.js +109 -0
- package/dist/git/watching/gitIgnoreFilter.js.map +1 -0
- package/dist/git/watching/initWatcher.d.ts +33 -0
- package/dist/git/watching/initWatcher.d.ts.map +1 -0
- package/dist/git/watching/initWatcher.js +59 -0
- package/dist/git/watching/initWatcher.js.map +1 -0
- package/dist/git/watching/provider.d.ts +23 -0
- package/dist/git/watching/provider.d.ts.map +1 -0
- package/dist/git/watching/provider.js +2 -0
- package/dist/git/watching/provider.js.map +1 -0
- package/dist/git/watching/watchGroup.d.ts +54 -0
- package/dist/git/watching/watchGroup.d.ts.map +1 -0
- package/dist/git/watching/watchGroup.js +139 -0
- package/dist/git/watching/watchGroup.js.map +1 -0
- package/dist/git/watching/watchService.d.ts +79 -0
- package/dist/git/watching/watchService.d.ts.map +1 -0
- package/dist/git/watching/watchService.js +282 -0
- package/dist/git/watching/watchService.js.map +1 -0
- package/dist/git/watching/watchSession.d.ts +118 -0
- package/dist/git/watching/watchSession.d.ts.map +1 -0
- package/dist/git/watching/watchSession.js +274 -0
- package/dist/git/watching/watchSession.js.map +1 -0
- package/dist/git/watching/watcherPatterns.d.ts +21 -0
- package/dist/git/watching/watcherPatterns.d.ts.map +1 -0
- package/dist/git/watching/watcherPatterns.js +36 -0
- package/dist/git/watching/watcherPatterns.js.map +1 -0
- package/dist/git-cli/cliGitProvider.d.ts +133 -0
- package/dist/git-cli/cliGitProvider.d.ts.map +1 -0
- package/dist/git-cli/cliGitProvider.js +273 -0
- package/dist/git-cli/cliGitProvider.js.map +1 -0
- package/dist/git-cli/exec/exec.d.ts +4 -0
- package/dist/git-cli/exec/exec.d.ts.map +1 -0
- package/dist/git-cli/exec/exec.errors.d.ts +2 -0
- package/dist/git-cli/exec/exec.errors.d.ts.map +1 -0
- package/dist/git-cli/exec/exec.errors.js +2 -0
- package/dist/git-cli/exec/exec.errors.js.map +1 -0
- package/dist/git-cli/exec/exec.js +3 -0
- package/dist/git-cli/exec/exec.js.map +1 -0
- package/dist/git-cli/exec/exec.types.d.ts +2 -0
- package/dist/git-cli/exec/exec.types.d.ts.map +1 -0
- package/dist/git-cli/exec/exec.types.js +2 -0
- package/dist/git-cli/exec/exec.types.js.map +1 -0
- package/dist/git-cli/exec/features.d.ts +3 -0
- package/dist/git-cli/exec/features.d.ts.map +1 -0
- package/dist/git-cli/exec/features.js +2 -0
- package/dist/git-cli/exec/features.js.map +1 -0
- package/dist/git-cli/exec/git.d.ts +228 -0
- package/dist/git-cli/exec/git.d.ts.map +1 -0
- package/dist/git-cli/exec/git.js +823 -0
- package/dist/git-cli/exec/git.js.map +1 -0
- package/dist/git-cli/exec/gitQueue.d.ts +68 -0
- package/dist/git-cli/exec/gitQueue.d.ts.map +1 -0
- package/dist/git-cli/exec/gitQueue.js +207 -0
- package/dist/git-cli/exec/gitQueue.js.map +1 -0
- package/dist/git-cli/exec/locator.d.ts +14 -0
- package/dist/git-cli/exec/locator.d.ts.map +1 -0
- package/dist/git-cli/exec/locator.js +133 -0
- package/dist/git-cli/exec/locator.js.map +1 -0
- package/dist/git-cli/parsers/blameParser.d.ts +30 -0
- package/dist/git-cli/parsers/blameParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/blameParser.js +339 -0
- package/dist/git-cli/parsers/blameParser.js.map +1 -0
- package/dist/git-cli/parsers/indexParser.d.ts +4 -0
- package/dist/git-cli/parsers/indexParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/indexParser.js +226 -0
- package/dist/git-cli/parsers/indexParser.js.map +1 -0
- package/dist/git-cli/parsers/logParser.d.ts +178 -0
- package/dist/git-cli/parsers/logParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/logParser.js +1166 -0
- package/dist/git-cli/parsers/logParser.js.map +1 -0
- package/dist/git-cli/parsers/mergeTreeParser.d.ts +7 -0
- package/dist/git-cli/parsers/mergeTreeParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/mergeTreeParser.js +74 -0
- package/dist/git-cli/parsers/mergeTreeParser.js.map +1 -0
- package/dist/git-cli/parsers/refParser.d.ts +34 -0
- package/dist/git-cli/parsers/refParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/refParser.js +148 -0
- package/dist/git-cli/parsers/refParser.js.map +1 -0
- package/dist/git-cli/parsers/reflogParser.d.ts +12 -0
- package/dist/git-cli/parsers/reflogParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/reflogParser.js +181 -0
- package/dist/git-cli/parsers/reflogParser.js.map +1 -0
- package/dist/git-cli/parsers/remoteParser.d.ts +4 -0
- package/dist/git-cli/parsers/remoteParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/remoteParser.js +128 -0
- package/dist/git-cli/parsers/remoteParser.js.map +1 -0
- package/dist/git-cli/parsers/shortlogParser.d.ts +4 -0
- package/dist/git-cli/parsers/shortlogParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/shortlogParser.js +51 -0
- package/dist/git-cli/parsers/shortlogParser.js.map +1 -0
- package/dist/git-cli/parsers/signatureParser.d.ts +21 -0
- package/dist/git-cli/parsers/signatureParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/signatureParser.js +139 -0
- package/dist/git-cli/parsers/signatureParser.js.map +1 -0
- package/dist/git-cli/parsers/statusParser.d.ts +4 -0
- package/dist/git-cli/parsers/statusParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/statusParser.js +216 -0
- package/dist/git-cli/parsers/statusParser.js.map +1 -0
- package/dist/git-cli/parsers/treeParser.d.ts +3 -0
- package/dist/git-cli/parsers/treeParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/treeParser.js +110 -0
- package/dist/git-cli/parsers/treeParser.js.map +1 -0
- package/dist/git-cli/parsers/worktreeParser.d.ts +5 -0
- package/dist/git-cli/parsers/worktreeParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/worktreeParser.js +136 -0
- package/dist/git-cli/parsers/worktreeParser.js.map +1 -0
- package/dist/git-cli/providers/blame.d.ts +26 -0
- package/dist/git-cli/providers/blame.d.ts.map +1 -0
- package/dist/git-cli/providers/blame.js +426 -0
- package/dist/git-cli/providers/blame.js.map +1 -0
- package/dist/git-cli/providers/branches.d.ts +87 -0
- package/dist/git-cli/providers/branches.d.ts.map +1 -0
- package/dist/git-cli/providers/branches.js +1153 -0
- package/dist/git-cli/providers/branches.js.map +1 -0
- package/dist/git-cli/providers/commitFilesetUtils.d.ts +4 -0
- package/dist/git-cli/providers/commitFilesetUtils.d.ts.map +1 -0
- package/dist/git-cli/providers/commitFilesetUtils.js +20 -0
- package/dist/git-cli/providers/commitFilesetUtils.js.map +1 -0
- package/dist/git-cli/providers/commits.d.ts +49 -0
- package/dist/git-cli/providers/commits.d.ts.map +1 -0
- package/dist/git-cli/providers/commits.js +1151 -0
- package/dist/git-cli/providers/commits.js.map +1 -0
- package/dist/git-cli/providers/config.d.ts +74 -0
- package/dist/git-cli/providers/config.d.ts.map +1 -0
- package/dist/git-cli/providers/config.js +588 -0
- package/dist/git-cli/providers/config.js.map +1 -0
- package/dist/git-cli/providers/contributors.d.ts +31 -0
- package/dist/git-cli/providers/contributors.d.ts.map +1 -0
- package/dist/git-cli/providers/contributors.js +350 -0
- package/dist/git-cli/providers/contributors.js.map +1 -0
- package/dist/git-cli/providers/diff.d.ts +99 -0
- package/dist/git-cli/providers/diff.d.ts.map +1 -0
- package/dist/git-cli/providers/diff.js +786 -0
- package/dist/git-cli/providers/diff.js.map +1 -0
- package/dist/git-cli/providers/graph.d.ts +31 -0
- package/dist/git-cli/providers/graph.d.ts.map +1 -0
- package/dist/git-cli/providers/graph.js +703 -0
- package/dist/git-cli/providers/graph.js.map +1 -0
- package/dist/git-cli/providers/operations.d.ts +75 -0
- package/dist/git-cli/providers/operations.d.ts.map +1 -0
- package/dist/git-cli/providers/operations.js +564 -0
- package/dist/git-cli/providers/operations.js.map +1 -0
- package/dist/git-cli/providers/patch.d.ts +38 -0
- package/dist/git-cli/providers/patch.d.ts.map +1 -0
- package/dist/git-cli/providers/patch.js +324 -0
- package/dist/git-cli/providers/patch.js.map +1 -0
- package/dist/git-cli/providers/pausedOperations.d.ts +22 -0
- package/dist/git-cli/providers/pausedOperations.d.ts.map +1 -0
- package/dist/git-cli/providers/pausedOperations.js +411 -0
- package/dist/git-cli/providers/pausedOperations.js.map +1 -0
- package/dist/git-cli/providers/refs.d.ts +32 -0
- package/dist/git-cli/providers/refs.d.ts.map +1 -0
- package/dist/git-cli/providers/refs.js +149 -0
- package/dist/git-cli/providers/refs.js.map +1 -0
- package/dist/git-cli/providers/remotes.d.ts +24 -0
- package/dist/git-cli/providers/remotes.d.ts.map +1 -0
- package/dist/git-cli/providers/remotes.js +94 -0
- package/dist/git-cli/providers/remotes.js.map +1 -0
- package/dist/git-cli/providers/revision.d.ts +27 -0
- package/dist/git-cli/providers/revision.d.ts.map +1 -0
- package/dist/git-cli/providers/revision.js +269 -0
- package/dist/git-cli/providers/revision.js.map +1 -0
- package/dist/git-cli/providers/staging.d.ts +24 -0
- package/dist/git-cli/providers/staging.d.ts.map +1 -0
- package/dist/git-cli/providers/staging.js +138 -0
- package/dist/git-cli/providers/staging.js.map +1 -0
- package/dist/git-cli/providers/stash.d.ts +55 -0
- package/dist/git-cli/providers/stash.d.ts.map +1 -0
- package/dist/git-cli/providers/stash.js +430 -0
- package/dist/git-cli/providers/stash.js.map +1 -0
- package/dist/git-cli/providers/status.d.ts +38 -0
- package/dist/git-cli/providers/status.d.ts.map +1 -0
- package/dist/git-cli/providers/status.js +352 -0
- package/dist/git-cli/providers/status.js.map +1 -0
- package/dist/git-cli/providers/tags.d.ts +29 -0
- package/dist/git-cli/providers/tags.d.ts.map +1 -0
- package/dist/git-cli/providers/tags.js +190 -0
- package/dist/git-cli/providers/tags.js.map +1 -0
- package/dist/git-cli/providers/worktrees.d.ts +33 -0
- package/dist/git-cli/providers/worktrees.d.ts.map +1 -0
- package/dist/git-cli/providers/worktrees.js +175 -0
- package/dist/git-cli/providers/worktrees.js.map +1 -0
- package/dist/git-cli/service.d.ts +52 -0
- package/dist/git-cli/service.d.ts.map +1 -0
- package/dist/git-cli/service.js +35 -0
- package/dist/git-cli/service.js.map +1 -0
- package/dist/plus/ai/constants.d.ts +21 -0
- package/dist/plus/ai/constants.d.ts.map +1 -0
- package/dist/plus/ai/constants.js +99 -0
- package/dist/plus/ai/constants.js.map +1 -0
- package/dist/plus/ai/errors.d.ts +25 -0
- package/dist/plus/ai/errors.d.ts.map +1 -0
- package/dist/plus/ai/errors.js +76 -0
- package/dist/plus/ai/errors.js.map +1 -0
- package/dist/plus/ai/models/conversation.d.ts +12 -0
- package/dist/plus/ai/models/conversation.d.ts.map +1 -0
- package/dist/plus/ai/models/conversation.js +27 -0
- package/dist/plus/ai/models/conversation.js.map +1 -0
- package/dist/plus/ai/models/model.d.ts +34 -0
- package/dist/plus/ai/models/model.d.ts.map +1 -0
- package/dist/plus/ai/models/model.js +379 -0
- package/dist/plus/ai/models/model.js.map +1 -0
- package/dist/plus/ai/models/promptTemplates.d.ts +74 -0
- package/dist/plus/ai/models/promptTemplates.d.ts.map +1 -0
- package/dist/plus/ai/models/promptTemplates.js +2 -0
- package/dist/plus/ai/models/promptTemplates.js.map +1 -0
- package/dist/plus/ai/models/provider.d.ts +46 -0
- package/dist/plus/ai/models/provider.d.ts.map +1 -0
- package/dist/plus/ai/models/provider.js +2 -0
- package/dist/plus/ai/models/provider.js.map +1 -0
- package/dist/plus/ai/models/results.d.ts +5 -0
- package/dist/plus/ai/models/results.d.ts.map +1 -0
- package/dist/plus/ai/models/results.js +2 -0
- package/dist/plus/ai/models/results.js.map +1 -0
- package/dist/plus/ai/prompts.d.ts +13 -0
- package/dist/plus/ai/prompts.d.ts.map +1 -0
- package/dist/plus/ai/prompts.js +517 -0
- package/dist/plus/ai/prompts.js.map +1 -0
- package/dist/plus/ai/providers/anthropicProvider.d.ts +21 -0
- package/dist/plus/ai/providers/anthropicProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/anthropicProvider.js +257 -0
- package/dist/plus/ai/providers/anthropicProvider.js.map +1 -0
- package/dist/plus/ai/providers/azureProvider.d.ts +18 -0
- package/dist/plus/ai/providers/azureProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/azureProvider.js +54 -0
- package/dist/plus/ai/providers/azureProvider.js.map +1 -0
- package/dist/plus/ai/providers/context.d.ts +23 -0
- package/dist/plus/ai/providers/context.d.ts.map +1 -0
- package/dist/plus/ai/providers/context.js +2 -0
- package/dist/plus/ai/providers/context.js.map +1 -0
- package/dist/plus/ai/providers/deepSeekProvider.d.ts +15 -0
- package/dist/plus/ai/providers/deepSeekProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/deepSeekProvider.js +35 -0
- package/dist/plus/ai/providers/deepSeekProvider.js.map +1 -0
- package/dist/plus/ai/providers/geminiProvider.d.ts +15 -0
- package/dist/plus/ai/providers/geminiProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/geminiProvider.js +195 -0
- package/dist/plus/ai/providers/geminiProvider.js.map +1 -0
- package/dist/plus/ai/providers/githubModelsProvider.d.ts +19 -0
- package/dist/plus/ai/providers/githubModelsProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/githubModelsProvider.js +51 -0
- package/dist/plus/ai/providers/githubModelsProvider.js.map +1 -0
- package/dist/plus/ai/providers/gitkrakenProvider.d.ts +18 -0
- package/dist/plus/ai/providers/gitkrakenProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/gitkrakenProvider.js +151 -0
- package/dist/plus/ai/providers/gitkrakenProvider.js.map +1 -0
- package/dist/plus/ai/providers/huggingFaceProvider.d.ts +15 -0
- package/dist/plus/ai/providers/huggingFaceProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/huggingFaceProvider.js +39 -0
- package/dist/plus/ai/providers/huggingFaceProvider.js.map +1 -0
- package/dist/plus/ai/providers/mistralProvider.d.ts +20 -0
- package/dist/plus/ai/providers/mistralProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/mistralProvider.js +118 -0
- package/dist/plus/ai/providers/mistralProvider.js.map +1 -0
- package/dist/plus/ai/providers/ollamaProvider.d.ts +25 -0
- package/dist/plus/ai/providers/ollamaProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/ollamaProvider.js +155 -0
- package/dist/plus/ai/providers/ollamaProvider.js.map +1 -0
- package/dist/plus/ai/providers/openAICompatibleProvider.d.ts +17 -0
- package/dist/plus/ai/providers/openAICompatibleProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/openAICompatibleProvider.js +47 -0
- package/dist/plus/ai/providers/openAICompatibleProvider.js.map +1 -0
- package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts +39 -0
- package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts.map +1 -0
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js +218 -0
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js.map +1 -0
- package/dist/plus/ai/providers/openRouterProvider.d.ts +17 -0
- package/dist/plus/ai/providers/openRouterProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/openRouterProvider.js +57 -0
- package/dist/plus/ai/providers/openRouterProvider.js.map +1 -0
- package/dist/plus/ai/providers/openaiProvider.d.ts +16 -0
- package/dist/plus/ai/providers/openaiProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/openaiProvider.js +34 -0
- package/dist/plus/ai/providers/openaiProvider.js.map +1 -0
- package/dist/plus/ai/providers/xaiProvider.d.ts +15 -0
- package/dist/plus/ai/providers/xaiProvider.d.ts.map +1 -0
- package/dist/plus/ai/providers/xaiProvider.js +27 -0
- package/dist/plus/ai/providers/xaiProvider.js.map +1 -0
- package/dist/plus/ai/utils/ai.utils.d.ts +18 -0
- package/dist/plus/ai/utils/ai.utils.d.ts.map +1 -0
- package/dist/plus/ai/utils/ai.utils.js +70 -0
- package/dist/plus/ai/utils/ai.utils.js.map +1 -0
- package/dist/plus/ai/utils/results.utils.d.ts +9 -0
- package/dist/plus/ai/utils/results.utils.d.ts.map +1 -0
- package/dist/plus/ai/utils/results.utils.js +44 -0
- package/dist/plus/ai/utils/results.utils.js.map +1 -0
- package/dist/plus/ai/utils/truncation.utils.d.ts +13 -0
- package/dist/plus/ai/utils/truncation.utils.d.ts.map +1 -0
- package/dist/plus/ai/utils/truncation.utils.js +228 -0
- package/dist/plus/ai/utils/truncation.utils.js.map +1 -0
- package/dist/plus/git-github/api/config.d.ts +66 -0
- package/dist/plus/git-github/api/config.d.ts.map +1 -0
- package/dist/plus/git-github/api/config.js +2 -0
- package/dist/plus/git-github/api/config.js.map +1 -0
- package/dist/plus/git-github/api/github.d.ts +178 -0
- package/dist/plus/git-github/api/github.d.ts.map +1 -0
- package/dist/plus/git-github/api/github.js +2360 -0
- package/dist/plus/git-github/api/github.js.map +1 -0
- package/dist/plus/git-github/api/github.utils.d.ts +9 -0
- package/dist/plus/git-github/api/github.utils.d.ts.map +1 -0
- package/dist/plus/git-github/api/github.utils.js +22 -0
- package/dist/plus/git-github/api/github.utils.js.map +1 -0
- package/dist/plus/git-github/api/token.d.ts +16 -0
- package/dist/plus/git-github/api/token.d.ts.map +1 -0
- package/dist/plus/git-github/api/token.js +2 -0
- package/dist/plus/git-github/api/token.js.map +1 -0
- package/dist/plus/git-github/api/tokenUtils.d.ts +7 -0
- package/dist/plus/git-github/api/tokenUtils.d.ts.map +1 -0
- package/dist/plus/git-github/api/tokenUtils.js +13 -0
- package/dist/plus/git-github/api/tokenUtils.js.map +1 -0
- package/dist/plus/git-github/api/types.d.ts +100 -0
- package/dist/plus/git-github/api/types.d.ts.map +1 -0
- package/dist/plus/git-github/api/types.js +2 -0
- package/dist/plus/git-github/api/types.js.map +1 -0
- package/dist/plus/git-github/context.d.ts +102 -0
- package/dist/plus/git-github/context.d.ts.map +1 -0
- package/dist/plus/git-github/context.js +12 -0
- package/dist/plus/git-github/context.js.map +1 -0
- package/dist/plus/git-github/models.d.ts +204 -0
- package/dist/plus/git-github/models.d.ts.map +1 -0
- package/dist/plus/git-github/models.js +229 -0
- package/dist/plus/git-github/models.js.map +1 -0
- package/dist/plus/git-github/providers/github/blame.d.ts +34 -0
- package/dist/plus/git-github/providers/github/blame.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/blame.js +155 -0
- package/dist/plus/git-github/providers/github/blame.js.map +1 -0
- package/dist/plus/git-github/providers/github/branches.d.ts +38 -0
- package/dist/plus/git-github/providers/github/branches.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/branches.js +234 -0
- package/dist/plus/git-github/providers/github/branches.js.map +1 -0
- package/dist/plus/git-github/providers/github/commits.d.ts +36 -0
- package/dist/plus/git-github/providers/github/commits.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/commits.js +560 -0
- package/dist/plus/git-github/providers/github/commits.js.map +1 -0
- package/dist/plus/git-github/providers/github/config.d.ts +11 -0
- package/dist/plus/git-github/providers/github/config.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/config.js +47 -0
- package/dist/plus/git-github/providers/github/config.js.map +1 -0
- package/dist/plus/git-github/providers/github/contributors.d.ts +27 -0
- package/dist/plus/git-github/providers/github/contributors.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/contributors.js +218 -0
- package/dist/plus/git-github/providers/github/contributors.js.map +1 -0
- package/dist/plus/git-github/providers/github/diff.d.ts +33 -0
- package/dist/plus/git-github/providers/github/diff.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/diff.js +184 -0
- package/dist/plus/git-github/providers/github/diff.js.map +1 -0
- package/dist/plus/git-github/providers/github/graph.d.ts +25 -0
- package/dist/plus/git-github/providers/github/graph.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/graph.js +372 -0
- package/dist/plus/git-github/providers/github/graph.js.map +1 -0
- package/dist/plus/git-github/providers/github/refs.d.ts +26 -0
- package/dist/plus/git-github/providers/github/refs.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/refs.js +108 -0
- package/dist/plus/git-github/providers/github/refs.js.map +1 -0
- package/dist/plus/git-github/providers/github/remotes.d.ts +9 -0
- package/dist/plus/git-github/providers/github/remotes.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/remotes.js +37 -0
- package/dist/plus/git-github/providers/github/remotes.js.map +1 -0
- package/dist/plus/git-github/providers/github/revision.d.ts +14 -0
- package/dist/plus/git-github/providers/github/revision.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/revision.js +132 -0
- package/dist/plus/git-github/providers/github/revision.js.map +1 -0
- package/dist/plus/git-github/providers/github/status.d.ts +21 -0
- package/dist/plus/git-github/providers/github/status.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/status.js +49 -0
- package/dist/plus/git-github/providers/github/status.js.map +1 -0
- package/dist/plus/git-github/providers/github/tags.d.ts +22 -0
- package/dist/plus/git-github/providers/github/tags.d.ts.map +1 -0
- package/dist/plus/git-github/providers/github/tags.js +104 -0
- package/dist/plus/git-github/providers/github/tags.js.map +1 -0
- package/dist/plus/git-github/providers/githubGitProvider.d.ts +85 -0
- package/dist/plus/git-github/providers/githubGitProvider.d.ts.map +1 -0
- package/dist/plus/git-github/providers/githubGitProvider.js +130 -0
- package/dist/plus/git-github/providers/githubGitProvider.js.map +1 -0
- package/dist/plus/git-github/providers/githubProvider.d.ts +55 -0
- package/dist/plus/git-github/providers/githubProvider.d.ts.map +1 -0
- package/dist/plus/git-github/providers/githubProvider.js +2 -0
- package/dist/plus/git-github/providers/githubProvider.js.map +1 -0
- package/dist/utils/array.d.ts +27 -0
- package/dist/utils/array.d.ts.map +1 -0
- package/dist/utils/array.js +142 -0
- package/dist/utils/array.js.map +1 -0
- package/dist/utils/base64.d.ts +2 -0
- package/dist/utils/base64.d.ts.map +1 -0
- package/dist/utils/base64.js +2 -0
- package/dist/utils/base64.js.map +1 -0
- package/dist/utils/brand.d.ts +11 -0
- package/dist/utils/brand.d.ts.map +1 -0
- package/dist/utils/brand.js +2 -0
- package/dist/utils/brand.js.map +1 -0
- package/dist/utils/cancellation.d.ts +54 -0
- package/dist/utils/cancellation.d.ts.map +1 -0
- package/dist/utils/cancellation.js +133 -0
- package/dist/utils/cancellation.js.map +1 -0
- package/dist/utils/charCode.d.ts +39 -0
- package/dist/utils/charCode.d.ts.map +1 -0
- package/dist/utils/charCode.js +39 -0
- package/dist/utils/charCode.js.map +1 -0
- package/dist/utils/color.d.ts +177 -0
- package/dist/utils/color.d.ts.map +1 -0
- package/dist/utils/color.js +693 -0
- package/dist/utils/color.js.map +1 -0
- package/dist/utils/counter.d.ts +7 -0
- package/dist/utils/counter.d.ts.map +1 -0
- package/dist/utils/counter.js +19 -0
- package/dist/utils/counter.js.map +1 -0
- package/dist/utils/crypto.d.ts +2 -0
- package/dist/utils/crypto.d.ts.map +1 -0
- package/dist/utils/crypto.js +2 -0
- package/dist/utils/crypto.js.map +1 -0
- package/dist/utils/date.d.ts +20 -0
- package/dist/utils/date.d.ts.map +1 -0
- package/dist/utils/date.js +313 -0
- package/dist/utils/date.js.map +1 -0
- package/dist/utils/debounce.d.ts +108 -0
- package/dist/utils/debounce.d.ts.map +1 -0
- package/dist/utils/debounce.js +209 -0
- package/dist/utils/debounce.js.map +1 -0
- package/dist/utils/decorators/debounce.d.ts +3 -0
- package/dist/utils/decorators/debounce.d.ts.map +1 -0
- package/dist/utils/decorators/debounce.js +21 -0
- package/dist/utils/decorators/debounce.js.map +1 -0
- package/dist/utils/decorators/gate.d.ts +15 -0
- package/dist/utils/decorators/gate.d.ts.map +1 -0
- package/dist/utils/decorators/gate.js +129 -0
- package/dist/utils/decorators/gate.js.map +1 -0
- package/dist/utils/decorators/log.d.ts +46 -0
- package/dist/utils/decorators/log.d.ts.map +1 -0
- package/dist/utils/decorators/log.js +238 -0
- package/dist/utils/decorators/log.js.map +1 -0
- package/dist/utils/decorators/memoize.d.ts +17 -0
- package/dist/utils/decorators/memoize.d.ts.map +1 -0
- package/dist/utils/decorators/memoize.js +63 -0
- package/dist/utils/decorators/memoize.js.map +1 -0
- package/dist/utils/decorators/resolver.d.ts +12 -0
- package/dist/utils/decorators/resolver.d.ts.map +1 -0
- package/dist/utils/decorators/resolver.js +85 -0
- package/dist/utils/decorators/resolver.js.map +1 -0
- package/dist/utils/decorators/sequentialize.d.ts +29 -0
- package/dist/utils/decorators/sequentialize.d.ts.map +1 -0
- package/dist/utils/decorators/sequentialize.js +81 -0
- package/dist/utils/decorators/sequentialize.js.map +1 -0
- package/dist/utils/decorators/serializable.d.ts +13 -0
- package/dist/utils/decorators/serializable.d.ts.map +1 -0
- package/dist/utils/decorators/serializable.js +42 -0
- package/dist/utils/decorators/serializable.js.map +1 -0
- package/dist/utils/disposable.d.ts +40 -0
- package/dist/utils/disposable.d.ts.map +1 -0
- package/dist/utils/disposable.js +87 -0
- package/dist/utils/disposable.js.map +1 -0
- package/dist/utils/encoding.d.ts +3 -0
- package/dist/utils/encoding.d.ts.map +1 -0
- package/dist/utils/encoding.js +7 -0
- package/dist/utils/encoding.js.map +1 -0
- package/dist/utils/env/browser/base64.d.ts +9 -0
- package/dist/utils/env/browser/base64.d.ts.map +1 -0
- package/dist/utils/env/browser/base64.js +42 -0
- package/dist/utils/env/browser/base64.js.map +1 -0
- package/dist/utils/env/browser/crypto.d.ts +5 -0
- package/dist/utils/env/browser/crypto.d.ts.map +1 -0
- package/dist/utils/env/browser/crypto.js +18 -0
- package/dist/utils/env/browser/crypto.js.map +1 -0
- package/dist/utils/env/browser/fs.d.ts +2 -0
- package/dist/utils/env/browser/fs.d.ts.map +1 -0
- package/dist/utils/env/browser/fs.js +4 -0
- package/dist/utils/env/browser/fs.js.map +1 -0
- package/dist/utils/env/browser/hex.d.ts +4 -0
- package/dist/utils/env/browser/hex.d.ts.map +1 -0
- package/dist/utils/env/browser/hex.js +38 -0
- package/dist/utils/env/browser/hex.js.map +1 -0
- package/dist/utils/env/browser/hrtime.d.ts +2 -0
- package/dist/utils/env/browser/hrtime.d.ts.map +1 -0
- package/dist/utils/env/browser/hrtime.js +15 -0
- package/dist/utils/env/browser/hrtime.js.map +1 -0
- package/dist/utils/env/browser/logScope.d.ts +25 -0
- package/dist/utils/env/browser/logScope.d.ts.map +1 -0
- package/dist/utils/env/browser/logScope.js +53 -0
- package/dist/utils/env/browser/logScope.js.map +1 -0
- package/dist/utils/env/browser/md5.d.ts +2 -0
- package/dist/utils/env/browser/md5.d.ts.map +1 -0
- package/dist/utils/env/browser/md5.js +199 -0
- package/dist/utils/env/browser/md5.js.map +1 -0
- package/dist/utils/env/browser/platform.d.ts +4 -0
- package/dist/utils/env/browser/platform.d.ts.map +1 -0
- package/dist/utils/env/browser/platform.js +6 -0
- package/dist/utils/env/browser/platform.js.map +1 -0
- package/dist/utils/env/node/base64.d.ts +9 -0
- package/dist/utils/env/node/base64.d.ts.map +1 -0
- package/dist/utils/env/node/base64.js +14 -0
- package/dist/utils/env/node/base64.js.map +1 -0
- package/dist/utils/env/node/crypto.d.ts +5 -0
- package/dist/utils/env/node/crypto.d.ts.map +1 -0
- package/dist/utils/env/node/crypto.js +14 -0
- package/dist/utils/env/node/crypto.js.map +1 -0
- package/dist/utils/env/node/exec.d.ts +89 -0
- package/dist/utils/env/node/exec.d.ts.map +1 -0
- package/dist/utils/env/node/exec.js +277 -0
- package/dist/utils/env/node/exec.js.map +1 -0
- package/dist/utils/env/node/fs.d.ts +2 -0
- package/dist/utils/env/node/fs.d.ts.map +1 -0
- package/dist/utils/env/node/fs.js +5 -0
- package/dist/utils/env/node/fs.js.map +1 -0
- package/dist/utils/env/node/hex.d.ts +4 -0
- package/dist/utils/env/node/hex.d.ts.map +1 -0
- package/dist/utils/env/node/hex.js +10 -0
- package/dist/utils/env/node/hex.js.map +1 -0
- package/dist/utils/env/node/hrtime.d.ts +2 -0
- package/dist/utils/env/node/hrtime.d.ts.map +1 -0
- package/dist/utils/env/node/hrtime.js +2 -0
- package/dist/utils/env/node/hrtime.js.map +1 -0
- package/dist/utils/env/node/logScope.d.ts +34 -0
- package/dist/utils/env/node/logScope.d.ts.map +1 -0
- package/dist/utils/env/node/logScope.js +52 -0
- package/dist/utils/env/node/logScope.js.map +1 -0
- package/dist/utils/env/node/platform.d.ts +4 -0
- package/dist/utils/env/node/platform.d.ts.map +1 -0
- package/dist/utils/env/node/platform.js +5 -0
- package/dist/utils/env/node/platform.js.map +1 -0
- package/dist/utils/error.d.ts +18 -0
- package/dist/utils/error.d.ts.map +1 -0
- package/dist/utils/error.js +19 -0
- package/dist/utils/error.js.map +1 -0
- package/dist/utils/event.d.ts +59 -0
- package/dist/utils/event.d.ts.map +1 -0
- package/dist/utils/event.js +183 -0
- package/dist/utils/event.js.map +1 -0
- package/dist/utils/formatter.d.ts +21 -0
- package/dist/utils/formatter.d.ts.map +1 -0
- package/dist/utils/formatter.js +139 -0
- package/dist/utils/formatter.js.map +1 -0
- package/dist/utils/fs.d.ts +2 -0
- package/dist/utils/fs.d.ts.map +1 -0
- package/dist/utils/fs.js +2 -0
- package/dist/utils/fs.js.map +1 -0
- package/dist/utils/function.d.ts +24 -0
- package/dist/utils/function.d.ts.map +1 -0
- package/dist/utils/function.js +103 -0
- package/dist/utils/function.js.map +1 -0
- package/dist/utils/fuzzy.d.ts +68 -0
- package/dist/utils/fuzzy.d.ts.map +1 -0
- package/dist/utils/fuzzy.js +134 -0
- package/dist/utils/fuzzy.js.map +1 -0
- package/dist/utils/hash.d.ts +32 -0
- package/dist/utils/hash.d.ts.map +1 -0
- package/dist/utils/hash.js +53 -0
- package/dist/utils/hash.js.map +1 -0
- package/dist/utils/hex.d.ts +2 -0
- package/dist/utils/hex.d.ts.map +1 -0
- package/dist/utils/hex.js +2 -0
- package/dist/utils/hex.js.map +1 -0
- package/dist/utils/hrtime.d.ts +4 -0
- package/dist/utils/hrtime.d.ts.map +1 -0
- package/dist/utils/hrtime.js +7 -0
- package/dist/utils/hrtime.js.map +1 -0
- package/dist/utils/iterable.d.ts +65 -0
- package/dist/utils/iterable.d.ts.map +1 -0
- package/dist/utils/iterable.js +635 -0
- package/dist/utils/iterable.js.map +1 -0
- package/dist/utils/lazy.d.ts +18 -0
- package/dist/utils/lazy.d.ts.map +1 -0
- package/dist/utils/lazy.js +40 -0
- package/dist/utils/lazy.js.map +1 -0
- package/dist/utils/loggable.d.ts +5 -0
- package/dist/utils/loggable.d.ts.map +1 -0
- package/dist/utils/loggable.js +4 -0
- package/dist/utils/loggable.js.map +1 -0
- package/dist/utils/logger.d.ts +63 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +316 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/logger.scoped.d.ts +56 -0
- package/dist/utils/logger.scoped.d.ts.map +1 -0
- package/dist/utils/logger.scoped.js +166 -0
- package/dist/utils/logger.scoped.js.map +1 -0
- package/dist/utils/markdown.d.ts +9 -0
- package/dist/utils/markdown.d.ts.map +1 -0
- package/dist/utils/markdown.js +100 -0
- package/dist/utils/markdown.js.map +1 -0
- package/dist/utils/mru.d.ts +14 -0
- package/dist/utils/mru.d.ts.map +1 -0
- package/dist/utils/mru.js +63 -0
- package/dist/utils/mru.js.map +1 -0
- package/dist/utils/object.d.ts +62 -0
- package/dist/utils/object.d.ts.map +1 -0
- package/dist/utils/object.js +151 -0
- package/dist/utils/object.js.map +1 -0
- package/dist/utils/paging.d.ts +19 -0
- package/dist/utils/paging.d.ts.map +1 -0
- package/dist/utils/paging.js +32 -0
- package/dist/utils/paging.js.map +1 -0
- package/dist/utils/path.d.ts +17 -0
- package/dist/utils/path.d.ts.map +1 -0
- package/dist/utils/path.js +156 -0
- package/dist/utils/path.js.map +1 -0
- package/dist/utils/platform.d.ts +2 -0
- package/dist/utils/platform.d.ts.map +1 -0
- package/dist/utils/platform.js +2 -0
- package/dist/utils/platform.js.map +1 -0
- package/dist/utils/promise.d.ts +61 -0
- package/dist/utils/promise.d.ts.map +1 -0
- package/dist/utils/promise.js +337 -0
- package/dist/utils/promise.js.map +1 -0
- package/dist/utils/promiseCache.d.ts +337 -0
- package/dist/utils/promiseCache.d.ts.map +1 -0
- package/dist/utils/promiseCache.js +634 -0
- package/dist/utils/promiseCache.js.map +1 -0
- package/dist/utils/searchTree.d.ts +58 -0
- package/dist/utils/searchTree.d.ts.map +1 -0
- package/dist/utils/searchTree.js +394 -0
- package/dist/utils/searchTree.js.map +1 -0
- package/dist/utils/stopwatch.d.ts +41 -0
- package/dist/utils/stopwatch.d.ts.map +1 -0
- package/dist/utils/stopwatch.js +83 -0
- package/dist/utils/stopwatch.js.map +1 -0
- package/dist/utils/string.d.ts +91 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/string.js +803 -0
- package/dist/utils/string.js.map +1 -0
- package/dist/utils/subscriptionManager.d.ts +18 -0
- package/dist/utils/subscriptionManager.d.ts.map +1 -0
- package/dist/utils/subscriptionManager.js +34 -0
- package/dist/utils/subscriptionManager.js.map +1 -0
- package/dist/utils/trie.d.ts +76 -0
- package/dist/utils/trie.d.ts.map +1 -0
- package/dist/utils/trie.js +584 -0
- package/dist/utils/trie.js.map +1 -0
- package/dist/utils/types.d.ts +21 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/dist/utils/types.js +2 -0
- package/dist/utils/types.js.map +1 -0
- package/dist/utils/uri.d.ts +69 -0
- package/dist/utils/uri.d.ts.map +1 -0
- package/dist/utils/uri.js +66 -0
- package/dist/utils/uri.js.map +1 -0
- package/dist/utils/validation.d.ts +14 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +26 -0
- package/dist/utils/validation.js.map +1 -0
- package/dist/utils/version.d.ts +15 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +66 -0
- package/dist/utils/version.js.map +1 -0
- package/package.json +161 -0
- package/src/git/cache.ts +1152 -0
- package/src/git/context.ts +248 -0
- package/src/git/errors.ts +1121 -0
- package/src/git/exec.types.ts +78 -0
- package/src/git/features.ts +45 -0
- package/src/git/models/author.ts +19 -0
- package/src/git/models/autolink.ts +59 -0
- package/src/git/models/blame.ts +46 -0
- package/src/git/models/branch.ts +236 -0
- package/src/git/models/commit.ts +688 -0
- package/src/git/models/contributor.ts +84 -0
- package/src/git/models/defaultBranch.ts +6 -0
- package/src/git/models/diff.ts +74 -0
- package/src/git/models/file.ts +29 -0
- package/src/git/models/fileChange.ts +82 -0
- package/src/git/models/fileStatus.ts +35 -0
- package/src/git/models/graph.ts +184 -0
- package/src/git/models/graphSearch.ts +53 -0
- package/src/git/models/issue.ts +88 -0
- package/src/git/models/issueOrPullRequest.ts +20 -0
- package/src/git/models/lineRange.ts +7 -0
- package/src/git/models/log.ts +21 -0
- package/src/git/models/mergeConflicts.ts +18 -0
- package/src/git/models/patch.ts +25 -0
- package/src/git/models/pausedOperationStatus.ts +63 -0
- package/src/git/models/pullRequest.ts +161 -0
- package/src/git/models/rebase.ts +60 -0
- package/src/git/models/reference.ts +47 -0
- package/src/git/models/reflog.ts +88 -0
- package/src/git/models/remote.ts +99 -0
- package/src/git/models/remoteProvider.ts +290 -0
- package/src/git/models/remoteResource.ts +87 -0
- package/src/git/models/repository.ts +417 -0
- package/src/git/models/repositoryChangeEvent.ts +30 -0
- package/src/git/models/repositoryIdentities.ts +99 -0
- package/src/git/models/repositoryMetadata.ts +12 -0
- package/src/git/models/resourceDescriptor.ts +11 -0
- package/src/git/models/revision.ts +12 -0
- package/src/git/models/search.ts +123 -0
- package/src/git/models/shortlog.ts +6 -0
- package/src/git/models/signature.ts +29 -0
- package/src/git/models/staging.ts +27 -0
- package/src/git/models/stash.ts +6 -0
- package/src/git/models/status.ts +246 -0
- package/src/git/models/statusFile.ts +116 -0
- package/src/git/models/tag.ts +71 -0
- package/src/git/models/tree.ts +10 -0
- package/src/git/models/user.ts +7 -0
- package/src/git/models/worktree.ts +152 -0
- package/src/git/parsers/diffParser.ts +660 -0
- package/src/git/parsers/rebaseTodoParser.ts +169 -0
- package/src/git/providers/blame.ts +40 -0
- package/src/git/providers/branches.ts +111 -0
- package/src/git/providers/commits.ts +147 -0
- package/src/git/providers/config.ts +104 -0
- package/src/git/providers/contributors.ts +34 -0
- package/src/git/providers/diff.ts +127 -0
- package/src/git/providers/graph.ts +30 -0
- package/src/git/providers/operations.ts +82 -0
- package/src/git/providers/patch.ts +31 -0
- package/src/git/providers/pausedOperations.ts +10 -0
- package/src/git/providers/provider.ts +62 -0
- package/src/git/providers/refs.ts +39 -0
- package/src/git/providers/remotes.ts +33 -0
- package/src/git/providers/revision.ts +28 -0
- package/src/git/providers/shared/remotes.ts +95 -0
- package/src/git/providers/staging.ts +22 -0
- package/src/git/providers/stash.ts +51 -0
- package/src/git/providers/status.ts +42 -0
- package/src/git/providers/tags.ts +28 -0
- package/src/git/providers/types.ts +33 -0
- package/src/git/providers/worktrees.ts +23 -0
- package/src/git/remotes/azure-devops.ts +309 -0
- package/src/git/remotes/bitbucket-server.ts +191 -0
- package/src/git/remotes/bitbucket.ts +144 -0
- package/src/git/remotes/custom.ts +139 -0
- package/src/git/remotes/gerrit.ts +188 -0
- package/src/git/remotes/gitea.ts +186 -0
- package/src/git/remotes/github.ts +238 -0
- package/src/git/remotes/gitlab.ts +272 -0
- package/src/git/remotes/google-source.ts +51 -0
- package/src/git/remotes/matcher.ts +215 -0
- package/src/git/repositoryService.ts +179 -0
- package/src/git/service.ts +365 -0
- package/src/git/utils/autolink.utils.ts +201 -0
- package/src/git/utils/blame.utils.ts +296 -0
- package/src/git/utils/branch.utils.ts +154 -0
- package/src/git/utils/commit.utils.ts +89 -0
- package/src/git/utils/contributor.utils.ts +81 -0
- package/src/git/utils/fetch.utils.ts +48 -0
- package/src/git/utils/fileStatus.utils.ts +49 -0
- package/src/git/utils/issue.utils.ts +81 -0
- package/src/git/utils/issueOrPullRequest.utils.ts +23 -0
- package/src/git/utils/mergeConflicts.utils.ts +21 -0
- package/src/git/utils/pausedOperationStatus.utils.ts +156 -0
- package/src/git/utils/pullRequest.utils.ts +149 -0
- package/src/git/utils/rebase.utils.ts +128 -0
- package/src/git/utils/reference.utils.ts +267 -0
- package/src/git/utils/remote.utils.ts +140 -0
- package/src/git/utils/repository.utils.ts +18 -0
- package/src/git/utils/resourceDescriptor.utils.ts +26 -0
- package/src/git/utils/revision.utils.ts +149 -0
- package/src/git/utils/search.utils.ts +498 -0
- package/src/git/utils/sorting.ts +291 -0
- package/src/git/utils/status.utils.ts +114 -0
- package/src/git/utils/statusFile.utils.ts +182 -0
- package/src/git/utils/tag.utils.ts +17 -0
- package/src/git/utils/tooltip.utils.ts +37 -0
- package/src/git/utils/uriAuthority.ts +34 -0
- package/src/git/utils/user.utils.ts +20 -0
- package/src/git/utils/worktree.utils.ts +21 -0
- package/src/git/watching/changeEvent.ts +90 -0
- package/src/git/watching/classifyChange.ts +81 -0
- package/src/git/watching/gitIgnoreFilter.ts +134 -0
- package/src/git/watching/initWatcher.ts +79 -0
- package/src/git/watching/provider.ts +24 -0
- package/src/git/watching/watchGroup.ts +182 -0
- package/src/git/watching/watchService.ts +350 -0
- package/src/git/watching/watchSession.ts +370 -0
- package/src/git/watching/watcherPatterns.ts +51 -0
- package/src/git-cli/cliGitProvider.ts +436 -0
- package/src/git-cli/exec/exec.errors.ts +1 -0
- package/src/git-cli/exec/exec.ts +11 -0
- package/src/git-cli/exec/exec.types.ts +8 -0
- package/src/git-cli/exec/features.ts +2 -0
- package/src/git-cli/exec/git.ts +1092 -0
- package/src/git-cli/exec/gitQueue.ts +251 -0
- package/src/git-cli/exec/locator.ts +157 -0
- package/src/git-cli/parsers/blameParser.ts +373 -0
- package/src/git-cli/parsers/indexParser.ts +192 -0
- package/src/git-cli/parsers/logParser.ts +1275 -0
- package/src/git-cli/parsers/mergeTreeParser.ts +22 -0
- package/src/git-cli/parsers/refParser.ts +111 -0
- package/src/git-cli/parsers/reflogParser.ts +153 -0
- package/src/git-cli/parsers/remoteParser.ts +95 -0
- package/src/git-cli/parsers/shortlogParser.ts +59 -0
- package/src/git-cli/parsers/signatureParser.ts +162 -0
- package/src/git-cli/parsers/statusParser.ts +209 -0
- package/src/git-cli/parsers/treeParser.ts +61 -0
- package/src/git-cli/parsers/worktreeParser.ts +113 -0
- package/src/git-cli/providers/blame.ts +602 -0
- package/src/git-cli/providers/branches.ts +1491 -0
- package/src/git-cli/providers/commitFilesetUtils.ts +45 -0
- package/src/git-cli/providers/commits.ts +1517 -0
- package/src/git-cli/providers/config.ts +724 -0
- package/src/git-cli/providers/contributors.ts +361 -0
- package/src/git-cli/providers/diff.ts +1084 -0
- package/src/git-cli/providers/graph.ts +799 -0
- package/src/git-cli/providers/operations.ts +776 -0
- package/src/git-cli/providers/patch.ts +326 -0
- package/src/git-cli/providers/pausedOperations.ts +538 -0
- package/src/git-cli/providers/refs.ts +193 -0
- package/src/git-cli/providers/remotes.ts +115 -0
- package/src/git-cli/providers/revision.ts +334 -0
- package/src/git-cli/providers/staging.ts +160 -0
- package/src/git-cli/providers/stash.ts +626 -0
- package/src/git-cli/providers/status.ts +373 -0
- package/src/git-cli/providers/tags.ts +188 -0
- package/src/git-cli/providers/worktrees.ts +229 -0
- package/src/git-cli/service.ts +74 -0
- package/src/plus/ai/constants.ts +121 -0
- package/src/plus/ai/errors.ts +82 -0
- package/src/plus/ai/models/conversation.ts +35 -0
- package/src/plus/ai/models/model.ts +425 -0
- package/src/plus/ai/models/promptTemplates.ts +122 -0
- package/src/plus/ai/models/provider.ts +52 -0
- package/src/plus/ai/models/results.ts +1 -0
- package/src/plus/ai/prompts.ts +528 -0
- package/src/plus/ai/providers/anthropicProvider.ts +308 -0
- package/src/plus/ai/providers/azureProvider.ts +74 -0
- package/src/plus/ai/providers/context.ts +29 -0
- package/src/plus/ai/providers/deepSeekProvider.ts +40 -0
- package/src/plus/ai/providers/geminiProvider.ts +207 -0
- package/src/plus/ai/providers/githubModelsProvider.ts +92 -0
- package/src/plus/ai/providers/gitkrakenProvider.ts +218 -0
- package/src/plus/ai/providers/huggingFaceProvider.ts +51 -0
- package/src/plus/ai/providers/mistralProvider.ts +160 -0
- package/src/plus/ai/providers/ollamaProvider.ts +241 -0
- package/src/plus/ai/providers/openAICompatibleProvider.ts +59 -0
- package/src/plus/ai/providers/openAICompatibleProviderBase.ts +279 -0
- package/src/plus/ai/providers/openRouterProvider.ts +84 -0
- package/src/plus/ai/providers/openaiProvider.ts +46 -0
- package/src/plus/ai/providers/xaiProvider.ts +32 -0
- package/src/plus/ai/utils/ai.utils.ts +79 -0
- package/src/plus/ai/utils/results.utils.ts +50 -0
- package/src/plus/ai/utils/truncation.utils.ts +295 -0
- package/src/plus/git-github/api/config.ts +78 -0
- package/src/plus/git-github/api/github.ts +3424 -0
- package/src/plus/git-github/api/github.utils.ts +36 -0
- package/src/plus/git-github/api/token.ts +15 -0
- package/src/plus/git-github/api/tokenUtils.ts +15 -0
- package/src/plus/git-github/api/types.ts +182 -0
- package/src/plus/git-github/context.ts +107 -0
- package/src/plus/git-github/models.ts +524 -0
- package/src/plus/git-github/providers/github/blame.ts +222 -0
- package/src/plus/git-github/providers/github/branches.ts +356 -0
- package/src/plus/git-github/providers/github/commits.ts +858 -0
- package/src/plus/git-github/providers/github/config.ts +47 -0
- package/src/plus/git-github/providers/github/contributors.ts +313 -0
- package/src/plus/git-github/providers/github/diff.ts +267 -0
- package/src/plus/git-github/providers/github/graph.ts +511 -0
- package/src/plus/git-github/providers/github/refs.ts +137 -0
- package/src/plus/git-github/providers/github/remotes.ts +44 -0
- package/src/plus/git-github/providers/github/revision.ts +141 -0
- package/src/plus/git-github/providers/github/status.ts +63 -0
- package/src/plus/git-github/providers/github/tags.ts +147 -0
- package/src/plus/git-github/providers/githubGitProvider.ts +167 -0
- package/src/plus/git-github/providers/githubProvider.ts +65 -0
- package/src/utils/array.ts +194 -0
- package/src/utils/base64.ts +1 -0
- package/src/utils/brand.ts +9 -0
- package/src/utils/cancellation.ts +150 -0
- package/src/utils/charCode.ts +38 -0
- package/src/utils/color.ts +815 -0
- package/src/utils/counter.ts +21 -0
- package/src/utils/crypto.ts +1 -0
- package/src/utils/date.ts +394 -0
- package/src/utils/debounce.ts +303 -0
- package/src/utils/decorators/debounce.ts +31 -0
- package/src/utils/decorators/gate.ts +167 -0
- package/src/utils/decorators/log.ts +320 -0
- package/src/utils/decorators/memoize.ts +98 -0
- package/src/utils/decorators/resolver.ts +95 -0
- package/src/utils/decorators/sequentialize.ts +116 -0
- package/src/utils/decorators/serializable.ts +42 -0
- package/src/utils/disposable.ts +141 -0
- package/src/utils/encoding.ts +8 -0
- package/src/utils/env/browser/base64.ts +50 -0
- package/src/utils/env/browser/crypto.ts +21 -0
- package/src/utils/env/browser/fs.ts +3 -0
- package/src/utils/env/browser/hex.ts +41 -0
- package/src/utils/env/browser/hrtime.ts +14 -0
- package/src/utils/env/browser/logScope.ts +57 -0
- package/src/utils/env/browser/md5.ts +217 -0
- package/src/utils/env/browser/platform.ts +10 -0
- package/src/utils/env/node/base64.ts +17 -0
- package/src/utils/env/node/crypto.ts +17 -0
- package/src/utils/env/node/exec.ts +471 -0
- package/src/utils/env/node/fs.ts +5 -0
- package/src/utils/env/node/hex.ts +11 -0
- package/src/utils/env/node/hrtime.ts +1 -0
- package/src/utils/env/node/logScope.ts +63 -0
- package/src/utils/env/node/platform.ts +5 -0
- package/src/utils/error.ts +17 -0
- package/src/utils/event.ts +236 -0
- package/src/utils/formatter.ts +205 -0
- package/src/utils/fs.ts +1 -0
- package/src/utils/function.ts +141 -0
- package/src/utils/fuzzy.ts +185 -0
- package/src/utils/hash.ts +60 -0
- package/src/utils/hex.ts +1 -0
- package/src/utils/hrtime.ts +8 -0
- package/src/utils/iterable.ts +787 -0
- package/src/utils/lazy.ts +39 -0
- package/src/utils/loggable.ts +7 -0
- package/src/utils/logger.scoped.ts +237 -0
- package/src/utils/logger.ts +402 -0
- package/src/utils/markdown.ts +114 -0
- package/src/utils/mru.ts +66 -0
- package/src/utils/object.ts +227 -0
- package/src/utils/paging.ts +51 -0
- package/src/utils/path.ts +189 -0
- package/src/utils/platform.ts +1 -0
- package/src/utils/promise.ts +590 -0
- package/src/utils/promiseCache.ts +803 -0
- package/src/utils/searchTree.ts +442 -0
- package/src/utils/stopwatch.ts +125 -0
- package/src/utils/string.ts +964 -0
- package/src/utils/subscriptionManager.ts +40 -0
- package/src/utils/trie.ts +739 -0
- package/src/utils/types.ts +31 -0
- package/src/utils/uri.ts +117 -0
- package/src/utils/validation.ts +38 -0
- package/src/utils/version.ts +79 -0
|
@@ -0,0 +1,964 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
WidthOptions as StringWidthOptions,
|
|
3
|
+
TruncationOptions as StringWidthTruncationOptions,
|
|
4
|
+
Result as TruncatedStringWidthResult,
|
|
5
|
+
} from 'fast-string-truncated-width';
|
|
6
|
+
import getTruncatedStringWidth from 'fast-string-truncated-width';
|
|
7
|
+
import { CharCode } from './charCode.js';
|
|
8
|
+
import { getNumericFormat } from './date.js';
|
|
9
|
+
|
|
10
|
+
export function capitalize(s: string): string {
|
|
11
|
+
return `${s[0].toLocaleUpperCase()}${s.slice(1)}`;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let compareCollator: Intl.Collator | undefined;
|
|
15
|
+
export function compareIgnoreCase(a: string, b: string): 0 | -1 | 1 {
|
|
16
|
+
compareCollator ??= new Intl.Collator(undefined, { sensitivity: 'accent' });
|
|
17
|
+
|
|
18
|
+
const result = compareCollator.compare(a, b);
|
|
19
|
+
// Intl.Collator.compare isn't guaranteed to always return 1 or -1 on all platforms so normalize it
|
|
20
|
+
return result === 0 ? 0 : result > 0 ? 1 : -1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Removes common leading whitespace from each line in a template string.
|
|
25
|
+
* This allows you to write indented template strings but have them trimmed in the result.
|
|
26
|
+
*
|
|
27
|
+
* @param template The template string to dedent
|
|
28
|
+
* @returns The dedented string
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const str = dedent(`
|
|
33
|
+
* Hello
|
|
34
|
+
* World
|
|
35
|
+
* Test
|
|
36
|
+
* `);
|
|
37
|
+
* // Result: "Hello\nWorld\nTest"
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export function dedent(template: string): string {
|
|
41
|
+
const lines = template.split('\n');
|
|
42
|
+
|
|
43
|
+
// Remove leading and trailing empty lines
|
|
44
|
+
while (lines.length > 0 && lines[0].trim() === '') {
|
|
45
|
+
lines.shift();
|
|
46
|
+
}
|
|
47
|
+
while (lines.length > 0 && lines.at(-1)?.trim() === '') {
|
|
48
|
+
lines.pop();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (lines.length === 0) return '';
|
|
52
|
+
|
|
53
|
+
// Find the minimum indentation (excluding empty lines)
|
|
54
|
+
const nonEmptyLines = lines.filter(line => line.trim() !== '');
|
|
55
|
+
if (nonEmptyLines.length === 0) return '';
|
|
56
|
+
|
|
57
|
+
const minIndent = Math.min(
|
|
58
|
+
...nonEmptyLines.map(line => {
|
|
59
|
+
const match = line.match(/^(\s*)/);
|
|
60
|
+
return match ? match[1].length : 0;
|
|
61
|
+
}),
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
// Remove the common indentation from all lines
|
|
65
|
+
return lines.map(line => line.slice(minIndent)).join('\n');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function equalsIgnoreCase(a: string | null | undefined, b: string | null | undefined): boolean {
|
|
69
|
+
// Treat `null` & `undefined` as equivalent
|
|
70
|
+
if (a == null && b == null) return true;
|
|
71
|
+
if (a == null || b == null) return false;
|
|
72
|
+
return compareIgnoreCase(a, b) === 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
let sortCollator: Intl.Collator | undefined;
|
|
76
|
+
export function sortCompare(x: string, y: string): number {
|
|
77
|
+
sortCollator ??= new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' });
|
|
78
|
+
return sortCollator.compare(x, y);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function compareSubstring(
|
|
82
|
+
a: string,
|
|
83
|
+
b: string,
|
|
84
|
+
aStart: number = 0,
|
|
85
|
+
aEnd: number = a.length,
|
|
86
|
+
bStart: number = 0,
|
|
87
|
+
bEnd: number = b.length,
|
|
88
|
+
): number {
|
|
89
|
+
for (; aStart < aEnd && bStart < bEnd; aStart++, bStart++) {
|
|
90
|
+
const codeA = a.charCodeAt(aStart);
|
|
91
|
+
const codeB = b.charCodeAt(bStart);
|
|
92
|
+
if (codeA < codeB) {
|
|
93
|
+
return -1;
|
|
94
|
+
} else if (codeA > codeB) {
|
|
95
|
+
return 1;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const aLen = aEnd - aStart;
|
|
99
|
+
const bLen = bEnd - bStart;
|
|
100
|
+
if (aLen < bLen) {
|
|
101
|
+
return -1;
|
|
102
|
+
} else if (aLen > bLen) {
|
|
103
|
+
return 1;
|
|
104
|
+
}
|
|
105
|
+
return 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function compareSubstringIgnoreCase(
|
|
109
|
+
a: string,
|
|
110
|
+
b: string,
|
|
111
|
+
aStart: number = 0,
|
|
112
|
+
aEnd: number = a.length,
|
|
113
|
+
bStart: number = 0,
|
|
114
|
+
bEnd: number = b.length,
|
|
115
|
+
): number {
|
|
116
|
+
for (; aStart < aEnd && bStart < bEnd; aStart++, bStart++) {
|
|
117
|
+
const codeA = a.charCodeAt(aStart);
|
|
118
|
+
const codeB = b.charCodeAt(bStart);
|
|
119
|
+
|
|
120
|
+
if (codeA === codeB) {
|
|
121
|
+
// equal
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const diff = codeA - codeB;
|
|
126
|
+
if (diff === 32 && isUpperAsciiLetter(codeB)) {
|
|
127
|
+
//codeB =[65-90] && codeA =[97-122]
|
|
128
|
+
continue;
|
|
129
|
+
} else if (diff === -32 && isUpperAsciiLetter(codeA)) {
|
|
130
|
+
//codeB =[97-122] && codeA =[65-90]
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (isLowerAsciiLetter(codeA) && isLowerAsciiLetter(codeB)) {
|
|
135
|
+
//
|
|
136
|
+
return diff;
|
|
137
|
+
}
|
|
138
|
+
return compareSubstring(a.toLowerCase(), b.toLowerCase(), aStart, aEnd, bStart, bEnd);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const aLen = aEnd - aStart;
|
|
142
|
+
const bLen = bEnd - bStart;
|
|
143
|
+
|
|
144
|
+
if (aLen < bLen) {
|
|
145
|
+
return -1;
|
|
146
|
+
} else if (aLen > bLen) {
|
|
147
|
+
return 1;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
return 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function countOccurrences(s: string, search: string): number {
|
|
154
|
+
let count = 0;
|
|
155
|
+
let position = 0;
|
|
156
|
+
|
|
157
|
+
while (true) {
|
|
158
|
+
position = s.indexOf(search, position);
|
|
159
|
+
if (position === -1) break;
|
|
160
|
+
|
|
161
|
+
count++;
|
|
162
|
+
position += search.length;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return count;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export function encodeHtmlWeak(s: string): string;
|
|
169
|
+
export function encodeHtmlWeak(s: string | undefined): string | undefined;
|
|
170
|
+
export function encodeHtmlWeak(s: string | undefined): string | undefined {
|
|
171
|
+
return s?.replace(/[<>&"]/g, c => {
|
|
172
|
+
switch (c) {
|
|
173
|
+
case '<':
|
|
174
|
+
return '<';
|
|
175
|
+
case '>':
|
|
176
|
+
return '>';
|
|
177
|
+
case '&':
|
|
178
|
+
return '&';
|
|
179
|
+
case '"':
|
|
180
|
+
return '"';
|
|
181
|
+
default:
|
|
182
|
+
return c;
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export function escapeRegex(s: string): string {
|
|
188
|
+
return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Distributes a value into one of 100 groups based on a hash of the value
|
|
193
|
+
* @param value The value to distribute (e.g., machine ID)
|
|
194
|
+
* @returns A number between 1-100 representing the distribution group
|
|
195
|
+
*/
|
|
196
|
+
export function getDistributionGroup(value: string): number {
|
|
197
|
+
// Simple hash function
|
|
198
|
+
let hash = 0;
|
|
199
|
+
for (let i = 0; i < value.length; i++) {
|
|
200
|
+
hash = (hash << 5) - hash + value.charCodeAt(i);
|
|
201
|
+
hash = hash & hash; // Convert to 32-bit integer
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// Convert hash to a number between 1-100
|
|
205
|
+
const group = Math.abs(hash % 100) + 1;
|
|
206
|
+
return group;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export function getPossessiveForm(name: string): string {
|
|
210
|
+
return name.endsWith('s') ? `${name}'` : `${name}'s`;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
const defaultTruncationOptions: StringWidthTruncationOptions = {
|
|
214
|
+
ellipsisWidth: 0,
|
|
215
|
+
limit: 2 ** 30 - 1, // Max number that can be stored in V8's smis (small integers)
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
const defaultWidthOptions: StringWidthOptions = {
|
|
219
|
+
controlWidth: 0,
|
|
220
|
+
emojiWidth: 2,
|
|
221
|
+
regularWidth: 1,
|
|
222
|
+
wideWidth: 2,
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
export function getTruncatedWidth(s: string, limit: number, ellipsisWidth: number): TruncatedStringWidthResult {
|
|
226
|
+
if (s == null || s.length === 0) {
|
|
227
|
+
return {
|
|
228
|
+
truncated: false,
|
|
229
|
+
ellipsed: false,
|
|
230
|
+
width: 0,
|
|
231
|
+
index: 0,
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
return getTruncatedStringWidth(s, { limit: limit, ellipsisWidth: ellipsisWidth ?? 0 }, defaultWidthOptions);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export function getWidth(s: string): number {
|
|
239
|
+
if (s == null || s.length === 0) return 0;
|
|
240
|
+
|
|
241
|
+
const result = getTruncatedStringWidth(s, defaultTruncationOptions, defaultWidthOptions);
|
|
242
|
+
return result.width;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
const superscripts = ['\u00B9', '\u00B2', '\u00B3', '\u2074', '\u2075', '\u2076', '\u2077', '\u2078', '\u2079'];
|
|
246
|
+
|
|
247
|
+
export function getSuperscript(num: number): string {
|
|
248
|
+
return superscripts[num - 1] ?? '';
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
const tokenRegex = /\$\{(?:'(.*?[^\\])'|(\W*))?([^|]*?)(?:\|(\d+)(-|\?)?)?(?:'(.*?[^\\])'|(\W*))?\}/g;
|
|
252
|
+
const tokenSanitizeRegex = /\$\{(?:'.*?[^\\]'|\W*)?(\w*?)(?:'.*?[^\\]'|[\W\d]*)\}/g;
|
|
253
|
+
const tokenGroupCharacter = "'";
|
|
254
|
+
const tokenGroupCharacterEscapedRegex = /(\\')/g;
|
|
255
|
+
|
|
256
|
+
interface TokenMatch {
|
|
257
|
+
key: string;
|
|
258
|
+
start: number;
|
|
259
|
+
end: number;
|
|
260
|
+
options: TokenOptions;
|
|
261
|
+
}
|
|
262
|
+
const templateTokenMap = new Map<string, TokenMatch[]>();
|
|
263
|
+
|
|
264
|
+
export interface TokenOptions {
|
|
265
|
+
collapseWhitespace: boolean;
|
|
266
|
+
padDirection: 'left' | 'right';
|
|
267
|
+
prefix: string | undefined;
|
|
268
|
+
suffix: string | undefined;
|
|
269
|
+
truncateTo: number | undefined;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
function isWordChar(code: number): boolean {
|
|
273
|
+
return (
|
|
274
|
+
code === 95 /* _ */ ||
|
|
275
|
+
(code >= 0x61 && code <= 0x7a) || // lowercase letters
|
|
276
|
+
(code >= 0x41 && code <= 0x5a) || // uppercase letters
|
|
277
|
+
(code >= 0x30 && code <= 0x39) // digits
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export function getTokensFromTemplate(template: string): TokenMatch[] {
|
|
282
|
+
let tokens = templateTokenMap.get(template);
|
|
283
|
+
if (tokens != null) return tokens;
|
|
284
|
+
|
|
285
|
+
tokens = [];
|
|
286
|
+
const length = template.length;
|
|
287
|
+
|
|
288
|
+
let position = 0;
|
|
289
|
+
while (position < length) {
|
|
290
|
+
const tokenStart = template.indexOf('${', position);
|
|
291
|
+
if (tokenStart === -1) break;
|
|
292
|
+
|
|
293
|
+
const tokenEnd = template.indexOf('}', tokenStart);
|
|
294
|
+
if (tokenEnd === -1) break;
|
|
295
|
+
|
|
296
|
+
let tokenPos = tokenStart + 2;
|
|
297
|
+
|
|
298
|
+
let key = '';
|
|
299
|
+
let prefix = '';
|
|
300
|
+
let truncateTo = '';
|
|
301
|
+
let collapseWhitespace = false;
|
|
302
|
+
let padDirection: 'left' | 'right' = 'right';
|
|
303
|
+
let suffix = '';
|
|
304
|
+
|
|
305
|
+
if (template[tokenPos] === "'") {
|
|
306
|
+
const start = ++tokenPos;
|
|
307
|
+
tokenPos = template.indexOf("'", tokenPos);
|
|
308
|
+
if (tokenPos === -1) break;
|
|
309
|
+
|
|
310
|
+
if (start !== tokenPos) {
|
|
311
|
+
prefix = template.slice(start, tokenPos);
|
|
312
|
+
}
|
|
313
|
+
tokenPos++;
|
|
314
|
+
} else if (!isWordChar(template.charCodeAt(tokenPos))) {
|
|
315
|
+
const start = tokenPos++;
|
|
316
|
+
while (tokenPos < tokenEnd && !isWordChar(template.charCodeAt(tokenPos))) {
|
|
317
|
+
tokenPos++;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
if (start !== tokenPos) {
|
|
321
|
+
prefix = template.slice(start, tokenPos);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
while (tokenPos < tokenEnd) {
|
|
326
|
+
let code = template.charCodeAt(tokenPos);
|
|
327
|
+
if (isWordChar(code)) {
|
|
328
|
+
key += template[tokenPos++];
|
|
329
|
+
} else {
|
|
330
|
+
if (code !== 0x7c /* | */) break;
|
|
331
|
+
|
|
332
|
+
while (tokenPos < tokenEnd) {
|
|
333
|
+
code = template.charCodeAt(++tokenPos);
|
|
334
|
+
if (code >= 0x30 && code <= 0x39 /* digits */) {
|
|
335
|
+
truncateTo += template[tokenPos];
|
|
336
|
+
continue;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
if (code === 0x3f /* ? */) {
|
|
340
|
+
collapseWhitespace = true;
|
|
341
|
+
tokenPos++;
|
|
342
|
+
} else if (code === 0x2d /* - */) {
|
|
343
|
+
padDirection = 'left';
|
|
344
|
+
tokenPos++;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
if (tokenPos < tokenEnd) {
|
|
353
|
+
if (template[tokenPos] === "'") {
|
|
354
|
+
const start = ++tokenPos;
|
|
355
|
+
tokenPos = template.indexOf("'", tokenPos);
|
|
356
|
+
if (tokenPos === -1) break;
|
|
357
|
+
|
|
358
|
+
if (start !== tokenPos) {
|
|
359
|
+
suffix = template.slice(start, tokenPos);
|
|
360
|
+
}
|
|
361
|
+
} else if (!isWordChar(template.charCodeAt(tokenPos))) {
|
|
362
|
+
const start = tokenPos++;
|
|
363
|
+
while (tokenPos < tokenEnd && !isWordChar(template.charCodeAt(tokenPos))) {
|
|
364
|
+
tokenPos++;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
if (start !== tokenPos) {
|
|
368
|
+
suffix = template.slice(start, tokenPos);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
position = tokenEnd + 1;
|
|
374
|
+
tokens.push({
|
|
375
|
+
key: key,
|
|
376
|
+
start: tokenStart,
|
|
377
|
+
end: position,
|
|
378
|
+
options: {
|
|
379
|
+
prefix: prefix || undefined,
|
|
380
|
+
suffix: suffix || undefined,
|
|
381
|
+
truncateTo: truncateTo ? parseInt(truncateTo, 10) : undefined,
|
|
382
|
+
collapseWhitespace: collapseWhitespace,
|
|
383
|
+
padDirection: padDirection,
|
|
384
|
+
},
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
templateTokenMap.set(template, tokens);
|
|
389
|
+
return tokens;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// FYI, this is about twice as slow as getTokensFromTemplate
|
|
393
|
+
export function getTokensFromTemplateRegex(template: string): TokenMatch[] {
|
|
394
|
+
let tokens = templateTokenMap.get(template);
|
|
395
|
+
if (tokens != null) return tokens;
|
|
396
|
+
|
|
397
|
+
tokens = [];
|
|
398
|
+
|
|
399
|
+
let match;
|
|
400
|
+
while ((match = tokenRegex.exec(template))) {
|
|
401
|
+
const [, prefixGroup, prefixNonGroup, key, truncateTo, option, suffixGroup, suffixNonGroup] = match;
|
|
402
|
+
const start = match.index;
|
|
403
|
+
const end = start + match[0].length;
|
|
404
|
+
|
|
405
|
+
let prefix = prefixGroup || prefixNonGroup || undefined;
|
|
406
|
+
if (prefix) {
|
|
407
|
+
prefix = prefix.replace(tokenGroupCharacterEscapedRegex, tokenGroupCharacter);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
let suffix = suffixGroup || suffixNonGroup || undefined;
|
|
411
|
+
if (suffix) {
|
|
412
|
+
suffix = suffix.replace(tokenGroupCharacterEscapedRegex, tokenGroupCharacter);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
tokens.push({
|
|
416
|
+
key: key,
|
|
417
|
+
start: start,
|
|
418
|
+
end: end,
|
|
419
|
+
options: {
|
|
420
|
+
collapseWhitespace: option === '?',
|
|
421
|
+
padDirection: option === '-' ? 'left' : 'right',
|
|
422
|
+
prefix: prefix,
|
|
423
|
+
suffix: suffix,
|
|
424
|
+
truncateTo: truncateTo == null ? undefined : parseInt(truncateTo, 10),
|
|
425
|
+
},
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
templateTokenMap.set(template, tokens);
|
|
430
|
+
return tokens;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Fast string delimiter iterator
|
|
435
|
+
* Optimized for simple string splitting without generator overhead
|
|
436
|
+
*/
|
|
437
|
+
class StringDelimiterIterator implements IterableIterator<string> {
|
|
438
|
+
private readonly delimiterLen: number;
|
|
439
|
+
private index = 0;
|
|
440
|
+
private done = false;
|
|
441
|
+
|
|
442
|
+
constructor(
|
|
443
|
+
private readonly data: string,
|
|
444
|
+
private readonly delimiter: string,
|
|
445
|
+
) {
|
|
446
|
+
this.delimiterLen = delimiter.length;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
next(): IteratorResult<string> {
|
|
450
|
+
if (this.done || this.index >= this.data.length) {
|
|
451
|
+
this.done = true;
|
|
452
|
+
return { done: true, value: undefined };
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
const j = this.data.indexOf(this.delimiter, this.index);
|
|
456
|
+
const endIndex = j === -1 ? this.data.length : j;
|
|
457
|
+
|
|
458
|
+
const value = this.data.substring(this.index, endIndex);
|
|
459
|
+
this.index = endIndex + this.delimiterLen;
|
|
460
|
+
|
|
461
|
+
return { done: false, value: value };
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
[Symbol.iterator](): IterableIterator<string> {
|
|
465
|
+
return this;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* Iterable delimiter iterator with buffering
|
|
471
|
+
* Handles streaming data by buffering incomplete segments
|
|
472
|
+
*/
|
|
473
|
+
class IterableDelimiterIterator implements IterableIterator<string> {
|
|
474
|
+
private readonly delimiterLen: number;
|
|
475
|
+
private readonly iterator: Iterator<string>;
|
|
476
|
+
private readonly isArray: boolean;
|
|
477
|
+
private readonly arrayLength: number;
|
|
478
|
+
|
|
479
|
+
private arrayCount = 0;
|
|
480
|
+
private buffer = '';
|
|
481
|
+
private bufferIndex = 0;
|
|
482
|
+
private needsMoreData = true;
|
|
483
|
+
private done = false;
|
|
484
|
+
|
|
485
|
+
constructor(
|
|
486
|
+
data: Iterable<string>,
|
|
487
|
+
private readonly delimiter: string,
|
|
488
|
+
) {
|
|
489
|
+
this.delimiterLen = delimiter.length;
|
|
490
|
+
this.isArray = Array.isArray(data);
|
|
491
|
+
this.arrayLength = this.isArray ? (data as string[]).length : 0;
|
|
492
|
+
this.iterator = data[Symbol.iterator]();
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
next(): IteratorResult<string> {
|
|
496
|
+
if (this.done) {
|
|
497
|
+
return { done: true, value: undefined };
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
while (true) {
|
|
501
|
+
// Try to find delimiter in current buffer
|
|
502
|
+
if (this.bufferIndex < this.buffer.length) {
|
|
503
|
+
const j = this.buffer.indexOf(this.delimiter, this.bufferIndex);
|
|
504
|
+
|
|
505
|
+
if (j !== -1) {
|
|
506
|
+
// Found delimiter - return the segment
|
|
507
|
+
const value = this.buffer.substring(this.bufferIndex, j);
|
|
508
|
+
this.bufferIndex = j + this.delimiterLen;
|
|
509
|
+
return { done: false, value: value };
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
// No delimiter found in buffer
|
|
513
|
+
if (!this.needsMoreData) {
|
|
514
|
+
// No more data coming - yield rest of buffer
|
|
515
|
+
if (this.bufferIndex < this.buffer.length) {
|
|
516
|
+
const value = this.buffer.substring(this.bufferIndex);
|
|
517
|
+
this.bufferIndex = this.buffer.length;
|
|
518
|
+
this.done = true;
|
|
519
|
+
return { done: false, value: value };
|
|
520
|
+
}
|
|
521
|
+
this.done = true;
|
|
522
|
+
return { done: true, value: undefined };
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
// Need more data - keep unprocessed part as leftover
|
|
526
|
+
if (this.bufferIndex > 0) {
|
|
527
|
+
this.buffer = this.buffer.substring(this.bufferIndex);
|
|
528
|
+
this.bufferIndex = 0;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
// Fetch next chunk if needed
|
|
533
|
+
if (this.needsMoreData) {
|
|
534
|
+
const result = this.iterator.next();
|
|
535
|
+
|
|
536
|
+
if (result.done) {
|
|
537
|
+
this.needsMoreData = false;
|
|
538
|
+
|
|
539
|
+
// Yield any remaining buffer content
|
|
540
|
+
if (this.buffer.length > 0) {
|
|
541
|
+
const value = this.buffer;
|
|
542
|
+
this.buffer = '';
|
|
543
|
+
this.done = true;
|
|
544
|
+
return { done: false, value: value };
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
this.done = true;
|
|
548
|
+
return { done: true, value: undefined };
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
// Track array iteration
|
|
552
|
+
if (this.isArray) {
|
|
553
|
+
this.arrayCount++;
|
|
554
|
+
if (this.arrayCount === this.arrayLength) {
|
|
555
|
+
this.needsMoreData = false;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
// Append chunk to buffer
|
|
560
|
+
this.buffer += result.value;
|
|
561
|
+
} else {
|
|
562
|
+
// No more data and buffer is empty
|
|
563
|
+
this.done = true;
|
|
564
|
+
return { done: true, value: undefined };
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
[Symbol.iterator](): IterableIterator<string> {
|
|
570
|
+
return this;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Iterate over a string or iterable by delimiter without using generators
|
|
576
|
+
* More performant than generator version while maintaining lazy evaluation
|
|
577
|
+
*/
|
|
578
|
+
export function iterateByDelimiter(data: string | Iterable<string>, delimiter: string): IterableIterator<string> {
|
|
579
|
+
if (typeof data === 'string') {
|
|
580
|
+
return new StringDelimiterIterator(data, delimiter);
|
|
581
|
+
}
|
|
582
|
+
return new IterableDelimiterIterator(data, delimiter);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* Async iterable delimiter iterator with buffering.
|
|
587
|
+
*
|
|
588
|
+
* Buffer strategy: instead of growing a single buffer via concatenation
|
|
589
|
+
* (which causes V8 SlicedString retention — yielded substrings hold
|
|
590
|
+
* references to the entire accumulated buffer, preventing GC), each chunk
|
|
591
|
+
* builds a fresh `remainder + chunk` string. Substrings of this bounded
|
|
592
|
+
* string only retain the current chunk, not the full stream history.
|
|
593
|
+
*/
|
|
594
|
+
class AsyncIterableDelimiterIterator implements AsyncIterableIterator<string> {
|
|
595
|
+
private readonly delimiterLen: number;
|
|
596
|
+
private readonly iterator: AsyncIterator<string>;
|
|
597
|
+
|
|
598
|
+
private remainder = '';
|
|
599
|
+
private buffer = '';
|
|
600
|
+
private searchIndex = 0;
|
|
601
|
+
private done = false;
|
|
602
|
+
|
|
603
|
+
constructor(
|
|
604
|
+
data: AsyncIterable<string>,
|
|
605
|
+
private readonly delimiter: string,
|
|
606
|
+
) {
|
|
607
|
+
this.delimiterLen = delimiter.length;
|
|
608
|
+
this.iterator = data[Symbol.asyncIterator]();
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
async next(): Promise<IteratorResult<string>> {
|
|
612
|
+
if (this.done) {
|
|
613
|
+
return { done: true, value: undefined };
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
while (true) {
|
|
617
|
+
// Try to find delimiter in current buffer
|
|
618
|
+
const j = this.buffer.indexOf(this.delimiter, this.searchIndex);
|
|
619
|
+
if (j !== -1) {
|
|
620
|
+
const value = this.buffer.substring(this.searchIndex, j);
|
|
621
|
+
this.searchIndex = j + this.delimiterLen;
|
|
622
|
+
return { done: false, value: value };
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
// No delimiter — fetch next chunk
|
|
626
|
+
const result = await this.iterator.next();
|
|
627
|
+
if (result.done) {
|
|
628
|
+
// No more data — yield any remaining content
|
|
629
|
+
if (this.searchIndex < this.buffer.length) {
|
|
630
|
+
const value = this.buffer.substring(this.searchIndex);
|
|
631
|
+
this.done = true;
|
|
632
|
+
return { done: false, value: value };
|
|
633
|
+
}
|
|
634
|
+
this.done = true;
|
|
635
|
+
return { done: true, value: undefined };
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
// Build a fresh buffer from leftover + new chunk so that
|
|
639
|
+
// substrings only retain this bounded string, not a growing chain
|
|
640
|
+
this.remainder = this.searchIndex < this.buffer.length ? this.buffer.substring(this.searchIndex) : '';
|
|
641
|
+
this.buffer = this.remainder + result.value;
|
|
642
|
+
this.searchIndex = 0;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<string> {
|
|
647
|
+
return this;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* Iterate over an async iterable by delimiter without using generators
|
|
653
|
+
* More performant than generator version while maintaining lazy evaluation
|
|
654
|
+
*/
|
|
655
|
+
export function iterateAsyncByDelimiter(data: AsyncIterable<string>, delimiter: string): AsyncIterableIterator<string> {
|
|
656
|
+
return new AsyncIterableDelimiterIterator(data, delimiter);
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
export function interpolate(template: string, context: object | undefined): string {
|
|
660
|
+
if (template == null || template.length === 0) return template;
|
|
661
|
+
if (context == null) return template.replace(tokenSanitizeRegex, '');
|
|
662
|
+
|
|
663
|
+
const tokens = getTokensFromTemplate(template);
|
|
664
|
+
if (tokens.length === 0) return template;
|
|
665
|
+
|
|
666
|
+
let position = 0;
|
|
667
|
+
let result = '';
|
|
668
|
+
for (const token of tokens) {
|
|
669
|
+
result += template.slice(position, token.start) + ((context as Record<string, string>)[token.key] ?? '');
|
|
670
|
+
position = token.end;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
if (position < template.length) {
|
|
674
|
+
result += template.slice(position);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
return result;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
export async function interpolateAsync(template: string, context: object | undefined): Promise<string> {
|
|
681
|
+
if (template == null || template.length === 0) return template;
|
|
682
|
+
if (context == null) return template.replace(tokenSanitizeRegex, '');
|
|
683
|
+
|
|
684
|
+
const tokens = getTokensFromTemplate(template);
|
|
685
|
+
if (tokens.length === 0) return template;
|
|
686
|
+
|
|
687
|
+
let position = 0;
|
|
688
|
+
let result = '';
|
|
689
|
+
let value;
|
|
690
|
+
for (const token of tokens) {
|
|
691
|
+
value = (context as Record<string, any>)[token.key];
|
|
692
|
+
if (value != null && typeof value === 'object' && typeof value.then === 'function') {
|
|
693
|
+
value = await value;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
|
697
|
+
result += template.slice(position, token.start) + (value ?? '');
|
|
698
|
+
position = token.end;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
if (position < template.length) {
|
|
702
|
+
result += template.slice(position);
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
return result;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
export function isLowerAsciiLetter(code: number): boolean {
|
|
709
|
+
return code >= CharCode.a && code <= CharCode.z;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
export function isUpperAsciiLetter(code: number): boolean {
|
|
713
|
+
return code >= CharCode.A && code <= CharCode.Z;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
export function pad(s: string, before: number = 0, after: number = 0, padding: string = '\u00a0'): string {
|
|
717
|
+
if (before === 0 && after === 0) return s;
|
|
718
|
+
|
|
719
|
+
return `${before === 0 ? '' : padding.repeat(before)}${s}${after === 0 ? '' : padding.repeat(after)}`;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
export function padOrTruncateEnd(s: string, maxLength: number, fillString?: string): string {
|
|
723
|
+
if (s.length === maxLength) return s;
|
|
724
|
+
if (s.length > maxLength) return s.substring(0, maxLength);
|
|
725
|
+
return s.padEnd(maxLength, fillString);
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
let numericFormat: ReturnType<typeof getNumericFormat> | undefined;
|
|
729
|
+
|
|
730
|
+
export function pluralize(
|
|
731
|
+
s: string,
|
|
732
|
+
count: number,
|
|
733
|
+
options?: {
|
|
734
|
+
/** Controls the character/string between the count and the string */
|
|
735
|
+
infix?: string;
|
|
736
|
+
/** Formats the count */
|
|
737
|
+
format?: false | ((count: number) => string | undefined);
|
|
738
|
+
/** Controls if only the string should be included */
|
|
739
|
+
only?: boolean;
|
|
740
|
+
/** Controls the plural version of the string */
|
|
741
|
+
plural?: string;
|
|
742
|
+
/** Controls the string for a zero value */
|
|
743
|
+
zero?: string;
|
|
744
|
+
},
|
|
745
|
+
): string {
|
|
746
|
+
if (options == null) {
|
|
747
|
+
numericFormat ??= getNumericFormat();
|
|
748
|
+
return `${numericFormat(count)} ${s}${count === 1 ? '' : 's'}`;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
const suffix = count === 1 ? s : (options.plural ?? `${s}s`);
|
|
752
|
+
if (options.only) return suffix;
|
|
753
|
+
|
|
754
|
+
let result;
|
|
755
|
+
if (count === 0) {
|
|
756
|
+
result = options.zero ?? count;
|
|
757
|
+
} else if (options.format === false) {
|
|
758
|
+
result = count;
|
|
759
|
+
} else if (options.format != null) {
|
|
760
|
+
result = options.format(count);
|
|
761
|
+
} else {
|
|
762
|
+
numericFormat ??= getNumericFormat();
|
|
763
|
+
result = numericFormat(count);
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
return `${result}${options.infix ?? ' '}${suffix}`;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
// Removes \ / : * ? " < > | and C0 and C1 control codes
|
|
770
|
+
// eslint-disable-next-line no-control-regex
|
|
771
|
+
const illegalCharsForFSRegex = /[\\/:*?"<>|\x00-\x1f\x80-\x9f]/g;
|
|
772
|
+
|
|
773
|
+
export function sanitizeForFileSystem(s: string, replacement: string = '_'): string {
|
|
774
|
+
if (!s) return s;
|
|
775
|
+
return s.replace(illegalCharsForFSRegex, replacement);
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
export function splitLast(s: string, splitter: string): string[] {
|
|
779
|
+
const index = s.lastIndexOf(splitter);
|
|
780
|
+
if (index === -1) return [s];
|
|
781
|
+
|
|
782
|
+
return [s.substring(0, index), s.substring(index + splitter.length)];
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
export function splitSingle(s: string, splitter: string): string[] {
|
|
786
|
+
const index = s.indexOf(splitter);
|
|
787
|
+
if (index === -1) return [s];
|
|
788
|
+
|
|
789
|
+
const start = s.substring(0, index);
|
|
790
|
+
const rest = s.substring(index + splitter.length);
|
|
791
|
+
return rest != null ? [start, rest] : [start];
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
export function truncate(s: string, truncateTo: number, ellipsis: string = '\u2026', width?: number): string {
|
|
795
|
+
if (!s) return s;
|
|
796
|
+
if (truncateTo <= 1) return ellipsis;
|
|
797
|
+
|
|
798
|
+
width = width ?? getWidth(s);
|
|
799
|
+
if (width <= truncateTo) return s;
|
|
800
|
+
if (width === s.length) return `${s.substring(0, truncateTo - 1)}${ellipsis}`;
|
|
801
|
+
|
|
802
|
+
// Skip ahead to start as far as we can by assuming all the double-width characters won't be truncated
|
|
803
|
+
let chars = Math.floor(truncateTo / (width / s.length));
|
|
804
|
+
let count = getWidth(s.substring(0, chars));
|
|
805
|
+
while (count < truncateTo) {
|
|
806
|
+
count += getWidth(s[chars++]);
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
if (count >= truncateTo) {
|
|
810
|
+
chars--;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
return `${s.substring(0, chars)}${ellipsis}`;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
export function truncateLeft(s: string, truncateTo: number, ellipsis: string = '\u2026', width?: number): string {
|
|
817
|
+
if (!s) return s;
|
|
818
|
+
if (truncateTo <= 1) return ellipsis;
|
|
819
|
+
|
|
820
|
+
width = width ?? getWidth(s);
|
|
821
|
+
if (width <= truncateTo) return s;
|
|
822
|
+
if (width === s.length) return `${ellipsis}${s.substring(width - truncateTo)}`;
|
|
823
|
+
|
|
824
|
+
// Skip ahead to start as far as we can by assuming all the double-width characters won't be truncated
|
|
825
|
+
let chars = Math.floor(truncateTo / (width / s.length));
|
|
826
|
+
let count = getWidth(s.substring(0, chars));
|
|
827
|
+
while (count < truncateTo) {
|
|
828
|
+
count += getWidth(s[chars++]);
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
if (count >= truncateTo) {
|
|
832
|
+
chars--;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
return `${ellipsis}${s.substring(s.length - chars)}`;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
export function truncateMiddle(s: string, truncateTo: number, ellipsis: string = '\u2026'): string {
|
|
839
|
+
if (!s) return s;
|
|
840
|
+
if (truncateTo <= 1) return ellipsis;
|
|
841
|
+
|
|
842
|
+
const width = getWidth(s);
|
|
843
|
+
if (width <= truncateTo) return s;
|
|
844
|
+
|
|
845
|
+
return `${s.slice(0, Math.floor(truncateTo / 2) - 1)}${ellipsis}${s.slice(width - Math.ceil(truncateTo / 2))}`;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
// Below adapted from https://github.com/pieroxy/lz-string
|
|
849
|
+
|
|
850
|
+
// Pre-computed from:
|
|
851
|
+
// const base64ReverseMap = new Uint8Array(123);
|
|
852
|
+
// const base64Chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
853
|
+
// for (let i = 0; i < base64Chars.length; i++) {
|
|
854
|
+
// base64ReverseMap[base64Chars.charCodeAt(i)] = i;
|
|
855
|
+
// }
|
|
856
|
+
|
|
857
|
+
const base64ReverseMap = new Uint8Array([
|
|
858
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
859
|
+
0, 0, 0, 0, 62, 0, 0, 0, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 64, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7,
|
|
860
|
+
8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, 0, 26, 27, 28, 29, 30, 31, 32,
|
|
861
|
+
33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
|
|
862
|
+
]);
|
|
863
|
+
|
|
864
|
+
export function decompressFromBase64LZString(input: string | undefined): string {
|
|
865
|
+
if (input == null || input === '') return '';
|
|
866
|
+
|
|
867
|
+
const result = _decompressLZString(input, 32) ?? '';
|
|
868
|
+
return result;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
function _decompressLZString(input: string, resetValue: number) {
|
|
872
|
+
const dictionary = new Array<string>(4096);
|
|
873
|
+
dictionary[0] = '0';
|
|
874
|
+
dictionary[1] = '1';
|
|
875
|
+
dictionary[2] = '2';
|
|
876
|
+
|
|
877
|
+
const result: string[] = [];
|
|
878
|
+
const length = input.length;
|
|
879
|
+
|
|
880
|
+
let val = base64ReverseMap[input.charCodeAt(0)];
|
|
881
|
+
let position = resetValue;
|
|
882
|
+
let index = 1;
|
|
883
|
+
|
|
884
|
+
function readBits(maxpower: number): number {
|
|
885
|
+
let bits = 0;
|
|
886
|
+
let power = 1;
|
|
887
|
+
do {
|
|
888
|
+
bits |= Number((val & position) > 0) * power;
|
|
889
|
+
power <<= 1;
|
|
890
|
+
|
|
891
|
+
position >>= 1;
|
|
892
|
+
if (position === 0) {
|
|
893
|
+
position = resetValue;
|
|
894
|
+
val = base64ReverseMap[input.charCodeAt(index++)];
|
|
895
|
+
}
|
|
896
|
+
} while (power !== maxpower);
|
|
897
|
+
|
|
898
|
+
return bits;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
let c = readBits(4);
|
|
902
|
+
|
|
903
|
+
switch (c) {
|
|
904
|
+
case 0:
|
|
905
|
+
c = readBits(256);
|
|
906
|
+
break;
|
|
907
|
+
case 1:
|
|
908
|
+
c = readBits(65536);
|
|
909
|
+
break;
|
|
910
|
+
case 2:
|
|
911
|
+
return '';
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
let w = String.fromCharCode(c);
|
|
915
|
+
dictionary[3] = w;
|
|
916
|
+
result.push(w);
|
|
917
|
+
|
|
918
|
+
let dictSize = 4;
|
|
919
|
+
let enlargeIn = 4;
|
|
920
|
+
let numBits = 3;
|
|
921
|
+
|
|
922
|
+
while (index <= length) {
|
|
923
|
+
c = readBits(1 << numBits);
|
|
924
|
+
|
|
925
|
+
switch (c) {
|
|
926
|
+
case 0:
|
|
927
|
+
c = readBits(256);
|
|
928
|
+
dictionary[dictSize] = String.fromCharCode(c);
|
|
929
|
+
c = dictSize++;
|
|
930
|
+
enlargeIn--;
|
|
931
|
+
break;
|
|
932
|
+
case 1:
|
|
933
|
+
c = readBits(65536);
|
|
934
|
+
dictionary[dictSize] = String.fromCharCode(c);
|
|
935
|
+
c = dictSize++;
|
|
936
|
+
enlargeIn--;
|
|
937
|
+
break;
|
|
938
|
+
case 2:
|
|
939
|
+
return result.join('');
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
if (enlargeIn === 0) {
|
|
943
|
+
enlargeIn = 1 << numBits++;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
let entry = dictionary[c];
|
|
947
|
+
if (entry === undefined) {
|
|
948
|
+
if (c !== dictSize) return undefined;
|
|
949
|
+
|
|
950
|
+
entry = w + w[0];
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
result.push(entry);
|
|
954
|
+
dictionary[dictSize++] = w + entry[0];
|
|
955
|
+
enlargeIn--;
|
|
956
|
+
w = entry;
|
|
957
|
+
|
|
958
|
+
if (enlargeIn === 0) {
|
|
959
|
+
enlargeIn = 1 << numBits++;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
return undefined;
|
|
964
|
+
}
|