@noldova/git.window 0.0.6 → 0.0.8
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/package.json +34 -9
- package/src/api/index.d.ts +1593 -16
- package/src/api/index.js +33 -0
- package/src/api/index.js.map +1 -1
- package/src/app/components/git-account-dialog/git-account-dialog.component.js +29 -0
- package/src/app/components/git-account-dialog/git-account-dialog.component.js.map +1 -0
- package/src/app/components/git-accounts/git-accounts.component.js +44 -0
- package/src/app/components/git-accounts/git-accounts.component.js.map +1 -0
- package/src/app/components/git-agents/git-agents.component.js +54 -0
- package/src/app/components/git-agents/git-agents.component.js.map +1 -0
- package/src/app/components/git-branch-card/git-branch-card.component.js +6 -4
- package/src/app/components/git-branch-card/git-branch-card.component.js.map +1 -1
- package/src/app/components/git-branch-drop/git-branch-drop.component.js +84 -0
- package/src/app/components/git-branch-drop/git-branch-drop.component.js.map +1 -0
- package/src/app/components/git-bulk-branch-dialog/git-bulk-branch-dialog.component.js +38 -0
- package/src/app/components/git-bulk-branch-dialog/git-bulk-branch-dialog.component.js.map +1 -0
- package/src/app/components/git-bulk-push-dialog/git-bulk-push-dialog.component.js +34 -0
- package/src/app/components/git-bulk-push-dialog/git-bulk-push-dialog.component.js.map +1 -0
- package/src/app/components/git-command-log/git-command-log.component.js +91 -0
- package/src/app/components/git-command-log/git-command-log.component.js.map +1 -0
- package/src/app/components/git-commit-card/git-commit-card.component.js +41 -6
- package/src/app/components/git-commit-card/git-commit-card.component.js.map +1 -1
- package/src/app/components/git-commit-detail/git-commit-detail.component.js +263 -0
- package/src/app/components/git-commit-detail/git-commit-detail.component.js.map +1 -0
- package/src/app/components/git-commit-detail-view/git-commit-detail-view.component.js +27 -0
- package/src/app/components/git-commit-detail-view/git-commit-detail-view.component.js.map +1 -0
- package/src/app/components/git-conflict-detail/git-conflict-detail.component.js +26 -0
- package/src/app/components/git-conflict-detail/git-conflict-detail.component.js.map +1 -0
- package/src/app/components/git-conflicts/git-conflicts.component.js +251 -0
- package/src/app/components/git-conflicts/git-conflicts.component.js.map +1 -0
- package/src/app/components/git-diff-files/git-diff-files.component.js +178 -0
- package/src/app/components/git-diff-files/git-diff-files.component.js.map +1 -0
- package/src/app/components/git-discard-dialog/git-discard-dialog.component.js +29 -0
- package/src/app/components/git-discard-dialog/git-discard-dialog.component.js.map +1 -0
- package/src/app/components/git-file-group/git-file-group.component.js +78 -5
- package/src/app/components/git-file-group/git-file-group.component.js.map +1 -1
- package/src/app/components/git-file-layout-button/git-file-layout-button.component.js +23 -0
- package/src/app/components/git-file-layout-button/git-file-layout-button.component.js.map +1 -0
- package/src/app/components/git-force-push-dialog/git-force-push-dialog.component.js +30 -0
- package/src/app/components/git-force-push-dialog/git-force-push-dialog.component.js.map +1 -0
- package/src/app/components/git-history/git-history.component.js +480 -0
- package/src/app/components/git-history/git-history.component.js.map +1 -0
- package/src/app/components/git-host-row/git-host-row.component.js +3 -4
- package/src/app/components/git-host-row/git-host-row.component.js.map +1 -1
- package/src/app/components/git-person-avatar/git-person-avatar.component.js +44 -0
- package/src/app/components/git-person-avatar/git-person-avatar.component.js.map +1 -0
- package/src/app/components/git-pull-request-commits/git-pull-request-commits.component.js +118 -0
- package/src/app/components/git-pull-request-commits/git-pull-request-commits.component.js.map +1 -0
- package/src/app/components/git-pull-request-conflicts/git-pull-request-conflicts.component.js +123 -0
- package/src/app/components/git-pull-request-conflicts/git-pull-request-conflicts.component.js.map +1 -0
- package/src/app/components/git-pull-request-files/git-pull-request-files.component.js +228 -0
- package/src/app/components/git-pull-request-files/git-pull-request-files.component.js.map +1 -0
- package/src/app/components/git-pull-request-threads/git-pull-request-threads.component.js +211 -0
- package/src/app/components/git-pull-request-threads/git-pull-request-threads.component.js.map +1 -0
- package/src/app/components/git-pull-requests/git-pull-requests.component.js +100 -0
- package/src/app/components/git-pull-requests/git-pull-requests.component.js.map +1 -0
- package/src/app/components/git-rebase/git-rebase.component.js +392 -0
- package/src/app/components/git-rebase/git-rebase.component.js.map +1 -0
- package/src/app/components/git-rebase-preview/git-rebase-preview.component.js +34 -0
- package/src/app/components/git-rebase-preview/git-rebase-preview.component.js.map +1 -0
- package/src/app/components/git-reference-text/git-reference-text.component.js +56 -0
- package/src/app/components/git-reference-text/git-reference-text.component.js.map +1 -0
- package/src/app/components/git-repository/git-repository.component.js +289 -0
- package/src/app/components/git-repository/git-repository.component.js.map +1 -0
- package/src/app/components/git-switch-merge-dialog/git-switch-merge-dialog.component.js +27 -0
- package/src/app/components/git-switch-merge-dialog/git-switch-merge-dialog.component.js.map +1 -0
- package/src/app/components/git-undo-menu/git-undo-menu.component.js +40 -0
- package/src/app/components/git-undo-menu/git-undo-menu.component.js.map +1 -0
- package/src/app/components/git-view/git-view.component.js +62 -10
- package/src/app/components/git-view/git-view.component.js.map +1 -1
- package/src/app/components/git-workspace/git-visible.directive.js +27 -0
- package/src/app/components/git-workspace/git-visible.directive.js.map +1 -0
- package/src/app/components/git-workspace/git-workspace.component.js +301 -0
- package/src/app/components/git-workspace/git-workspace.component.js.map +1 -0
- package/src/app/components/git-workspace-across/git-workspace-across.component.js +128 -0
- package/src/app/components/git-workspace-across/git-workspace-across.component.js.map +1 -0
- package/src/app/components/git-workspace-across-view/git-workspace-across-view.component.js +32 -0
- package/src/app/components/git-workspace-across-view/git-workspace-across-view.component.js.map +1 -0
- package/src/app/components/git-workspaces/git-workspaces.component.js +55 -0
- package/src/app/components/git-workspaces/git-workspaces.component.js.map +1 -0
- package/src/app/enums/git-agent-state.js +15 -0
- package/src/app/enums/git-agent-state.js.map +1 -0
- package/src/app/enums/git-file-layout.js +14 -0
- package/src/app/enums/git-file-layout.js.map +1 -0
- package/src/app/enums/git-history-action.js +19 -0
- package/src/app/enums/git-history-action.js.map +1 -0
- package/src/app/enums/git-host-card-state.js +15 -0
- package/src/app/enums/git-host-card-state.js.map +1 -0
- package/src/app/enums/git-host-feature.js +17 -0
- package/src/app/enums/git-host-feature.js.map +1 -0
- package/src/app/enums/git-pull-request-state.js +15 -0
- package/src/app/enums/git-pull-request-state.js.map +1 -0
- package/src/app/enums/git-pull-requests-state.js +15 -0
- package/src/app/enums/git-pull-requests-state.js.map +1 -0
- package/src/app/enums/git-resolved-by.js +16 -0
- package/src/app/enums/git-resolved-by.js.map +1 -0
- package/src/app/enums/git-workspace-view.js +15 -0
- package/src/app/enums/git-workspace-view.js.map +1 -0
- package/src/app/interfaces/i-git-agents.js +8 -0
- package/src/app/interfaces/i-git-agents.js.map +1 -0
- package/src/app/interfaces/i-git-avatars.js +8 -0
- package/src/app/interfaces/i-git-avatars.js.map +1 -0
- package/src/app/interfaces/i-git-commit-prefixes.js +8 -0
- package/src/app/interfaces/i-git-commit-prefixes.js.map +1 -0
- package/src/app/interfaces/i-git-host-account.js +8 -0
- package/src/app/interfaces/i-git-host-account.js.map +1 -0
- package/src/app/interfaces/i-git-link-references.js +8 -0
- package/src/app/interfaces/i-git-link-references.js.map +1 -0
- package/src/app/interfaces/i-git-pull-request-host.js +8 -0
- package/src/app/interfaces/i-git-pull-request-host.js.map +1 -0
- package/src/app/interfaces/i-git-pull-requests.js +8 -0
- package/src/app/interfaces/i-git-pull-requests.js.map +1 -0
- package/src/app/interfaces/i-git-repository-links.js +8 -0
- package/src/app/interfaces/i-git-repository-links.js.map +1 -0
- package/src/app/interfaces/i-git-workspace-across-page.js +8 -0
- package/src/app/interfaces/i-git-workspace-across-page.js.map +1 -0
- package/src/app/interfaces/i-provided-git-commit-prefixes.js +8 -0
- package/src/app/interfaces/i-provided-git-commit-prefixes.js.map +1 -0
- package/src/app/interfaces/i-provided-git-host-account.js +8 -0
- package/src/app/interfaces/i-provided-git-host-account.js.map +1 -0
- package/src/app/models/focus-place.js +16 -0
- package/src/app/models/focus-place.js.map +1 -0
- package/src/app/models/focus-survivor.js +16 -0
- package/src/app/models/focus-survivor.js.map +1 -0
- package/src/app/models/git-agent-row.js +20 -0
- package/src/app/models/git-agent-row.js.map +1 -0
- package/src/app/models/git-branch-drop.js +40 -0
- package/src/app/models/git-branch-drop.js.map +1 -0
- package/src/app/models/git-branch-menu-item.js +3 -2
- package/src/app/models/git-branch-menu-item.js.map +1 -1
- package/src/app/models/git-branch-pull-request.js +49 -0
- package/src/app/models/git-branch-pull-request.js.map +1 -0
- package/src/app/models/git-branch-row.js +24 -0
- package/src/app/models/git-branch-row.js.map +1 -0
- package/src/app/models/git-branch-tree-node.js +16 -0
- package/src/app/models/git-branch-tree-node.js.map +1 -0
- package/src/app/models/git-branch-view.js +27 -0
- package/src/app/models/git-branch-view.js.map +1 -0
- package/src/app/models/git-bulk-outcome.js +16 -0
- package/src/app/models/git-bulk-outcome.js.map +1 -0
- package/src/app/models/git-bulk-result.js +18 -0
- package/src/app/models/git-bulk-result.js.map +1 -0
- package/src/app/models/git-bulk-target.js +22 -0
- package/src/app/models/git-bulk-target.js.map +1 -0
- package/src/app/models/git-check-counts.js +19 -0
- package/src/app/models/git-check-counts.js.map +1 -0
- package/src/app/models/git-chip-drag.js +20 -0
- package/src/app/models/git-chip-drag.js.map +1 -0
- package/src/app/models/git-chip-split.js +16 -0
- package/src/app/models/git-chip-split.js.map +1 -0
- package/src/app/models/git-code-span.js +54 -0
- package/src/app/models/git-code-span.js.map +1 -0
- package/src/app/models/git-comments-link.js +16 -0
- package/src/app/models/git-comments-link.js.map +1 -0
- package/src/app/models/git-commit-comments.js +18 -0
- package/src/app/models/git-commit-comments.js.map +1 -0
- package/src/app/models/git-commit-file-row.js +28 -0
- package/src/app/models/git-commit-file-row.js.map +1 -0
- package/src/app/models/git-commit-pull-request.js +28 -0
- package/src/app/models/git-commit-pull-request.js.map +1 -0
- package/src/app/models/git-commit-view.js +16 -0
- package/src/app/models/git-commit-view.js.map +1 -0
- package/src/app/models/git-conflict-detail.js +20 -0
- package/src/app/models/git-conflict-detail.js.map +1 -0
- package/src/app/models/git-detail-front.js +16 -0
- package/src/app/models/git-detail-front.js.map +1 -0
- package/src/app/models/git-detail-page.js +16 -0
- package/src/app/models/git-detail-page.js.map +1 -0
- package/src/app/models/git-diff-row.js +19 -8
- package/src/app/models/git-diff-row.js.map +1 -1
- package/src/app/models/git-file-group.js +2 -1
- package/src/app/models/git-file-group.js.map +1 -1
- package/src/app/models/git-file-item.js +22 -0
- package/src/app/models/git-file-item.js.map +1 -0
- package/src/app/models/git-file-line.js +16 -0
- package/src/app/models/git-file-line.js.map +1 -0
- package/src/app/models/git-file-row.js +4 -3
- package/src/app/models/git-file-row.js.map +1 -1
- package/src/app/models/git-first-conflicts-read.js +16 -0
- package/src/app/models/git-first-conflicts-read.js.map +1 -0
- package/src/app/models/git-folder-page.js +16 -0
- package/src/app/models/git-folder-page.js.map +1 -0
- package/src/app/models/git-force-push-offer.js +25 -0
- package/src/app/models/git-force-push-offer.js.map +1 -0
- package/src/app/models/git-graph-line.js +22 -0
- package/src/app/models/git-graph-line.js.map +1 -0
- package/src/app/models/git-graph-row.js +26 -0
- package/src/app/models/git-graph-row.js.map +1 -0
- package/src/app/models/git-history-ask.js +16 -0
- package/src/app/models/git-history-ask.js.map +1 -0
- package/src/app/models/git-history-row.js +39 -0
- package/src/app/models/git-history-row.js.map +1 -0
- package/src/app/models/git-history-toolbar.js +16 -0
- package/src/app/models/git-history-toolbar.js.map +1 -0
- package/src/app/models/git-host-card.js +24 -0
- package/src/app/models/git-host-card.js.map +1 -0
- package/src/app/models/git-host-row-view.js +9 -0
- package/src/app/models/git-host-row-view.js.map +1 -0
- package/src/app/models/git-host-tally.js +16 -0
- package/src/app/models/git-host-tally.js.map +1 -0
- package/src/app/models/git-labeled-prediction.js +16 -0
- package/src/app/models/git-labeled-prediction.js.map +1 -0
- package/src/app/models/git-lane-target.js +16 -0
- package/src/app/models/git-lane-target.js.map +1 -0
- package/src/app/models/git-lane.js +21 -0
- package/src/app/models/git-lane.js.map +1 -0
- package/src/app/models/git-last-write.js +18 -0
- package/src/app/models/git-last-write.js.map +1 -0
- package/src/app/models/git-line-counts.js +20 -0
- package/src/app/models/git-line-counts.js.map +1 -0
- package/src/app/models/git-marked-line.js +19 -0
- package/src/app/models/git-marked-line.js.map +1 -0
- package/src/app/models/git-moving-folder.js +16 -0
- package/src/app/models/git-moving-folder.js.map +1 -0
- package/src/app/models/git-operation-name.js +17 -0
- package/src/app/models/git-operation-name.js.map +1 -0
- package/src/app/models/git-path-entry.js +20 -0
- package/src/app/models/git-path-entry.js.map +1 -0
- package/src/app/models/git-predicted-line.js +18 -0
- package/src/app/models/git-predicted-line.js.map +1 -0
- package/src/app/models/git-prediction-ask.js +16 -0
- package/src/app/models/git-prediction-ask.js.map +1 -0
- package/src/app/models/git-provided-pull-requests.js +16 -0
- package/src/app/models/git-provided-pull-requests.js.map +1 -0
- package/src/app/models/git-pull-request-list.js +33 -0
- package/src/app/models/git-pull-request-list.js.map +1 -0
- package/src/app/models/git-pull-request-read.js +16 -0
- package/src/app/models/git-pull-request-read.js.map +1 -0
- package/src/app/models/git-pull-request-row.js +34 -0
- package/src/app/models/git-pull-request-row.js.map +1 -0
- package/src/app/models/git-pull-request-stack.js +18 -0
- package/src/app/models/git-pull-request-stack.js.map +1 -0
- package/src/app/models/git-rebase-landing.js +16 -0
- package/src/app/models/git-rebase-landing.js.map +1 -0
- package/src/app/models/git-rebase-preview.js +38 -0
- package/src/app/models/git-rebase-preview.js.map +1 -0
- package/src/app/models/git-rebase-row-plan.js +16 -0
- package/src/app/models/git-rebase-row-plan.js.map +1 -0
- package/src/app/models/git-rebase-row.js +82 -0
- package/src/app/models/git-rebase-row.js.map +1 -0
- package/src/app/models/git-rebase-start.js +16 -0
- package/src/app/models/git-rebase-start.js.map +1 -0
- package/src/app/models/git-ref-chip.js +75 -0
- package/src/app/models/git-ref-chip.js.map +1 -0
- package/src/app/models/git-reference-part.js +45 -0
- package/src/app/models/git-reference-part.js.map +1 -0
- package/src/app/models/git-repository-link.js +25 -0
- package/src/app/models/git-repository-link.js.map +1 -0
- package/src/app/models/git-repository-summary.js +60 -0
- package/src/app/models/git-repository-summary.js.map +1 -0
- package/src/app/models/git-resolved-file.js +16 -0
- package/src/app/models/git-resolved-file.js.map +1 -0
- package/src/app/models/git-reviews-read.js +18 -0
- package/src/app/models/git-reviews-read.js.map +1 -0
- package/src/app/models/git-row-pull-request.js +16 -0
- package/src/app/models/git-row-pull-request.js.map +1 -0
- package/src/app/models/git-shared-branch.js +16 -0
- package/src/app/models/git-shared-branch.js.map +1 -0
- package/src/app/models/git-signing-read.js +16 -0
- package/src/app/models/git-signing-read.js.map +1 -0
- package/src/app/models/git-status-bar-items.js +18 -0
- package/src/app/models/git-status-bar-items.js.map +1 -0
- package/src/app/models/git-switch-target.js +16 -0
- package/src/app/models/git-switch-target.js.map +1 -0
- package/src/app/models/git-text-around.js +18 -0
- package/src/app/models/git-text-around.js.map +1 -0
- package/src/app/models/git-track-counts.js +17 -0
- package/src/app/models/git-track-counts.js.map +1 -0
- package/src/app/models/git-workspace-across.js +22 -0
- package/src/app/models/git-workspace-across.js.map +1 -0
- package/src/app/models/git-workspace-host.js +55 -0
- package/src/app/models/git-workspace-host.js.map +1 -0
- package/src/app/models/git-workspace-overview.js +96 -0
- package/src/app/models/git-workspace-overview.js.map +1 -0
- package/src/app/models/git-workspace-review.js +20 -0
- package/src/app/models/git-workspace-review.js.map +1 -0
- package/src/app/models/git-workspace-reviews.js +16 -0
- package/src/app/models/git-workspace-reviews.js.map +1 -0
- package/src/app/models/git-workspace-row.js +185 -0
- package/src/app/models/git-workspace-row.js.map +1 -0
- package/src/app/models/git-workspace-run.js +23 -0
- package/src/app/models/git-workspace-run.js.map +1 -0
- package/src/app/models/git-workspace-side.js +25 -0
- package/src/app/models/git-workspace-side.js.map +1 -0
- package/src/app/models/git-workspace-view-count.js +16 -0
- package/src/app/models/git-workspace-view-count.js.map +1 -0
- package/src/app/models/git-workspace-view-label.js +16 -0
- package/src/app/models/git-workspace-view-label.js.map +1 -0
- package/src/app/models/git-workspace.js +47 -0
- package/src/app/models/git-workspace.js.map +1 -0
- package/src/app/models/thread-line.js +18 -0
- package/src/app/models/thread-line.js.map +1 -0
- package/src/app/services/commit-labels.js +44 -0
- package/src/app/services/commit-labels.js.map +1 -0
- package/src/app/services/focus-keeper.js +76 -0
- package/src/app/services/focus-keeper.js.map +1 -0
- package/src/app/services/git-agents.js +18 -0
- package/src/app/services/git-agents.js.map +1 -0
- package/src/app/services/git-avatars.js +34 -0
- package/src/app/services/git-avatars.js.map +1 -0
- package/src/app/services/git-branch-tree.js +50 -0
- package/src/app/services/git-branch-tree.js.map +1 -0
- package/src/app/services/git-code-colors.js +56 -0
- package/src/app/services/git-code-colors.js.map +1 -0
- package/src/app/services/git-command-logs.js +33 -0
- package/src/app/services/git-command-logs.js.map +1 -0
- package/src/app/services/git-commit-details.js +22 -0
- package/src/app/services/git-commit-details.js.map +1 -0
- package/src/app/services/git-commit-files.js +35 -0
- package/src/app/services/git-commit-files.js.map +1 -0
- package/src/app/services/git-commit-prefixes.js +32 -0
- package/src/app/services/git-commit-prefixes.js.map +1 -0
- package/src/app/services/git-conflict-details.js +22 -0
- package/src/app/services/git-conflict-details.js.map +1 -0
- package/src/app/services/git-counts.js +17 -0
- package/src/app/services/git-counts.js.map +1 -0
- package/src/app/services/git-detail-view.js +81 -0
- package/src/app/services/git-detail-view.js.map +1 -0
- package/src/app/services/git-file-tree.js +19 -0
- package/src/app/services/git-file-tree.js.map +1 -0
- package/src/app/services/git-folder.js +32 -6
- package/src/app/services/git-folder.js.map +1 -1
- package/src/app/services/git-graph-layout.js +80 -0
- package/src/app/services/git-graph-layout.js.map +1 -0
- package/src/app/services/git-gravatars.js +30 -0
- package/src/app/services/git-gravatars.js.map +1 -0
- package/src/app/services/git-history-asks.js +26 -0
- package/src/app/services/git-history-asks.js.map +1 -0
- package/src/app/services/git-history-rows.js +48 -0
- package/src/app/services/git-history-rows.js.map +1 -0
- package/src/app/services/git-history-selection.js +17 -0
- package/src/app/services/git-history-selection.js.map +1 -0
- package/src/app/services/git-host-accounts.js +33 -0
- package/src/app/services/git-host-accounts.js.map +1 -0
- package/src/app/services/git-last-write-undo.js +99 -0
- package/src/app/services/git-last-write-undo.js.map +1 -0
- package/src/app/services/git-link-reference-set.js +33 -0
- package/src/app/services/git-link-reference-set.js.map +1 -0
- package/src/app/services/git-link-references.js +31 -0
- package/src/app/services/git-link-references.js.map +1 -0
- package/src/app/services/git-new-branch.js +21 -0
- package/src/app/services/git-new-branch.js.map +1 -0
- package/src/app/services/git-path-layout.js +77 -0
- package/src/app/services/git-path-layout.js.map +1 -0
- package/src/app/services/git-pending-switch.js +30 -0
- package/src/app/services/git-pending-switch.js.map +1 -0
- package/src/app/services/git-pull-requests.js +43 -0
- package/src/app/services/git-pull-requests.js.map +1 -0
- package/src/app/services/git-rebase-previews.js +22 -0
- package/src/app/services/git-rebase-previews.js.map +1 -0
- package/src/app/services/git-rebasing.js +48 -0
- package/src/app/services/git-rebasing.js.map +1 -0
- package/src/app/services/git-recent-repositories.js +35 -0
- package/src/app/services/git-recent-repositories.js.map +1 -0
- package/src/app/services/git-repository-links.js +20 -0
- package/src/app/services/git-repository-links.js.map +1 -0
- package/src/app/services/git-repository-summaries.js +146 -0
- package/src/app/services/git-repository-summaries.js.map +1 -0
- package/src/app/services/git-resolving.js +32 -0
- package/src/app/services/git-resolving.js.map +1 -0
- package/src/app/services/git-runtime-client.js +112 -1
- package/src/app/services/git-runtime-client.js.map +1 -1
- package/src/app/services/git-status-bar.js +81 -0
- package/src/app/services/git-status-bar.js.map +1 -0
- package/src/app/services/git-status-follower.js +78 -0
- package/src/app/services/git-status-follower.js.map +1 -0
- package/src/app/services/git-view-options.js +15 -0
- package/src/app/services/git-view-options.js.map +1 -0
- package/src/app/services/git-view-state.service.js +232 -17
- package/src/app/services/git-view-state.service.js.map +1 -1
- package/src/app/services/git-viewing.js +31 -0
- package/src/app/services/git-viewing.js.map +1 -0
- package/src/app/services/git-window-part.js +93 -4
- package/src/app/services/git-window-part.js.map +1 -1
- package/src/app/services/git-window-storage.js +27 -0
- package/src/app/services/git-window-storage.js.map +1 -0
- package/src/app/services/git-workspace-across-views.js +22 -0
- package/src/app/services/git-workspace-across-views.js.map +1 -0
- package/src/app/services/git-workspace-bulk.js +81 -0
- package/src/app/services/git-workspace-bulk.js.map +1 -0
- package/src/app/services/git-workspace-pages.js +25 -0
- package/src/app/services/git-workspace-pages.js.map +1 -0
- package/src/app/services/git-workspace-pull-requests.js +199 -0
- package/src/app/services/git-workspace-pull-requests.js.map +1 -0
- package/src/app/services/git-workspace-sides.js +22 -0
- package/src/app/services/git-workspace-sides.js.map +1 -0
- package/src/app/services/git-workspaces.js +58 -0
- package/src/app/services/git-workspaces.js.map +1 -0
- package/src/resources.js +1153 -13
- package/src/resources.js.map +1 -1
package/src/api/index.d.ts
CHANGED
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type { Signal, Type } from "@angular/core";
|
|
9
|
+
import type { Injector, InputSignal, OutputEmitterRef, Signal, Type, WritableSignal, ɵɵComponentDeclaration, ɵɵFactoryDeclaration } from "@angular/core";
|
|
10
10
|
import { Exception, type ExceptionOptions } from "@noldova/context.exceptions";
|
|
11
11
|
import type { IWindowPart, IWindowPartContext } from "@noldova/desktop.window";
|
|
12
|
-
import type {
|
|
12
|
+
import type { HostChanges, HostPullRequestFiles, HostReference } from "@noldova/git.hosting.protocol";
|
|
13
|
+
import type { DiffScope, GitRemote } from "@noldova/git.protocol";
|
|
14
|
+
import type { ILinkReferenceSource, LinkOpenEvent } from "@noldova/ui.components.angular";
|
|
13
15
|
|
|
14
16
|
/**
|
|
15
17
|
* The base of the Git window part's own exceptions; catch it to catch them all.
|
|
@@ -74,6 +76,516 @@ export interface IGitHostRow {
|
|
|
74
76
|
readonly component: Type<unknown>;
|
|
75
77
|
}
|
|
76
78
|
|
|
79
|
+
/**
|
|
80
|
+
* What a host module gives the Git view so that commit authors show its pictures of them.
|
|
81
|
+
*/
|
|
82
|
+
export interface IGitAvatars {
|
|
83
|
+
/**
|
|
84
|
+
* Reads an author's picture in the repository at a folder.
|
|
85
|
+
* The view reads it inside a computed signal, so a host that answers from signals shows the picture once it arrives.
|
|
86
|
+
* @param folder The repository's folder.
|
|
87
|
+
* @param email The author's email as the commit names it.
|
|
88
|
+
* @param commitId The full id of a commit of theirs, for a host that finds people by commit.
|
|
89
|
+
* @returns The picture as a base64 `data:` address, `null` when the host has none for them, or `undefined` while it is still reading.
|
|
90
|
+
*/
|
|
91
|
+
avatarOf(folder: string, email: string, commitId: string): string | null | undefined;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* What a host module gives the Git view so that a new commit's message starts with its prefix for the branch, such as a work item's id.
|
|
96
|
+
*/
|
|
97
|
+
export interface IGitCommitPrefixes {
|
|
98
|
+
/**
|
|
99
|
+
* The prefix for a new commit's message on a branch of the repository at a folder.
|
|
100
|
+
* The view reads it inside a computed signal, so a host that answers from signals fills the message once its answer arrives.
|
|
101
|
+
* @param folder The repository's folder.
|
|
102
|
+
* @param branch The current branch's short name; the view asks for none on a detached HEAD.
|
|
103
|
+
* @returns The prefix, or `null` when the host has none for the branch.
|
|
104
|
+
*/
|
|
105
|
+
prefixFor(folder: string, branch: string): string | null;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* What a host module gives a pull request page's Commits, Files and Conflicts tabs and its comment threads, which the Git module draws the same way for every
|
|
110
|
+
* host.
|
|
111
|
+
* @example
|
|
112
|
+
* ```ts
|
|
113
|
+
* import type { IGitPullRequestHost } from "@noldova/git.window";
|
|
114
|
+
*
|
|
115
|
+
* export const host: IGitPullRequestHost = {
|
|
116
|
+
* name: "Example", readCommitsMethod: "example.readPullRequestCommits", readChangesMethod: "example.readPullRequestChanges",
|
|
117
|
+
* readConflictsMethod: "example.readPullRequestConflicts", readThreadsMethod: "example.readPullRequestThreads", replyToThreadMethod: null,
|
|
118
|
+
* changeThreadMethod: null, localFolderAsync: async () => null, commitPageOf: (url, commitId) => `${url}/commits/${commitId}`, personAvatarOf: () => null
|
|
119
|
+
* };
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
export interface IGitPullRequestHost {
|
|
123
|
+
/**
|
|
124
|
+
* The host's name as the tabs show it, such as `Azure DevOps`.
|
|
125
|
+
*/
|
|
126
|
+
readonly name: string;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* The method that answers a pull request's commits as `HostPullRequestCommits`, asked with its `HostReference`.
|
|
130
|
+
*/
|
|
131
|
+
readonly readCommitsMethod: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* The method that answers the files a pull request's latest push changes as `HostPullRequestFiles`, asked with its `HostReference`.
|
|
135
|
+
*/
|
|
136
|
+
readonly readChangesMethod: string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The method that answers the paths that keep a pull request from merging as `HostPullRequestConflicts`, asked with its `HostReference`.
|
|
140
|
+
*/
|
|
141
|
+
readonly readConflictsMethod: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* The method that answers a pull request's comment threads as `HostPullRequestThreads`, asked with its `HostReference`.
|
|
145
|
+
*/
|
|
146
|
+
readonly readThreadsMethod: string;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The method that replies to a thread, asked with `{ reference, thread, parent, body }`: the pull request's `HostReference`, the thread's id, its first
|
|
150
|
+
* comment's id and the reply's Markdown; it answers the reply as a `HostComment`. `null` for a host that can't reply, whose threads show no Reply.
|
|
151
|
+
*/
|
|
152
|
+
readonly replyToThreadMethod: string | null;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* The method that resolves or reactivates a thread, asked with `{ reference, thread, state }`, the new `ThreadStatus`. `null` for a host that keeps no
|
|
156
|
+
* thread state, whose threads show no Resolve or Reactivate.
|
|
157
|
+
*/
|
|
158
|
+
readonly changeThreadMethod: string | null;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The open repository's folder when it is the pull request's own repository.
|
|
162
|
+
* @param pullRequestUrl The pull request's page on the host.
|
|
163
|
+
* @returns The folder, or `null` for another repository, none open, or one the host can't tell.
|
|
164
|
+
*/
|
|
165
|
+
localFolderAsync(pullRequestUrl: string): Promise<string | null>;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* A commit's page on the host, which the Commits tab opens when the open repository can't show the commit.
|
|
169
|
+
* @param pullRequestUrl The pull request's page on the host.
|
|
170
|
+
* @param commitId The commit's full id.
|
|
171
|
+
* @returns The commit's page.
|
|
172
|
+
*/
|
|
173
|
+
commitPageOf(pullRequestUrl: string, commitId: string): string;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* A comment author's picture, which the threads ask once the author first comes into view.
|
|
177
|
+
* The threads read it inside a computed signal, so a host that answers from signals shows the picture once it arrives.
|
|
178
|
+
* @param reference The pull request the comment is on, such as for Azure DevOps's organization; a host that finds people by login alone may ignore it.
|
|
179
|
+
* @param login The author's sign-in name as the comment names it.
|
|
180
|
+
* @returns The picture as a base64 `data:` address, `null` when the host has none for them, or `undefined` while it is still reading.
|
|
181
|
+
*/
|
|
182
|
+
personAvatarOf(reference: HostReference, login: string): string | null | undefined;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* What a host module gives the Git view so that links to its items in a commit's message show as reference chips.
|
|
187
|
+
*/
|
|
188
|
+
export interface IGitLinkReferences {
|
|
189
|
+
/**
|
|
190
|
+
* The links this host knows in the repository at a folder.
|
|
191
|
+
* The view reads it inside a computed signal, so a source whose answer depends on signals keeps the message current.
|
|
192
|
+
* @param folder The repository's folder.
|
|
193
|
+
* @returns The source, or `null` when the host knows no links there.
|
|
194
|
+
*/
|
|
195
|
+
referencesFor(folder: string): ILinkReferenceSource | null;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Opens a link of the host's own, such as a reference card's action, in the repository at a folder; left out, the host opens none.
|
|
199
|
+
* @param folder The repository's folder.
|
|
200
|
+
* @param url The link the person opened.
|
|
201
|
+
* @param injector The window's injector, from which the host can open a kit dialog, such as with `DialogService`.
|
|
202
|
+
* @returns True when the host opened it; false leaves it to the window, which opens it in a browser.
|
|
203
|
+
*/
|
|
204
|
+
opens?(folder: string, url: string, injector: Injector): boolean;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* What a host module gives the repository panel so that it shows rows for the host's pages under Changes and History.
|
|
209
|
+
*/
|
|
210
|
+
export interface IGitRepositoryLinks {
|
|
211
|
+
/**
|
|
212
|
+
* The rows for a repository whose remote this is.
|
|
213
|
+
* The panel reads it inside a computed signal, so a host added later shows its rows.
|
|
214
|
+
* @param remote The repository's remote.
|
|
215
|
+
* @returns The rows, in order; none for a remote the host doesn't claim.
|
|
216
|
+
*/
|
|
217
|
+
linksFor(remote: GitRemote): readonly GitRepositoryLink[];
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* What a module that runs agents gives the repository panel so that it lists the agents working in a repository.
|
|
222
|
+
*/
|
|
223
|
+
export interface IGitAgents {
|
|
224
|
+
/**
|
|
225
|
+
* The runs working in the repository or its worktrees, newest first, or null before the provider has any answer.
|
|
226
|
+
* The panel reads it inside a computed signal, so the provider answers the same signal for a folder each time and updates it.
|
|
227
|
+
* @param folder The repository's folder.
|
|
228
|
+
*/
|
|
229
|
+
listFor(folder: string): Signal<readonly GitAgentRow[] | null>;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Shows the run, such as in the provider's own view; the panel calls it when the person clicks the run's row.
|
|
233
|
+
* @param folder The repository's folder.
|
|
234
|
+
* @param row The run the person clicked.
|
|
235
|
+
*/
|
|
236
|
+
open(folder: string, row: GitAgentRow): void;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Where an agent's run in a repository stands, which its row's icon shows.
|
|
241
|
+
*/
|
|
242
|
+
export declare enum GitAgentState {
|
|
243
|
+
/** The agent is working. */
|
|
244
|
+
Working = "Working",
|
|
245
|
+
/** The agent waits for the person, such as for an answer or an approval. */
|
|
246
|
+
WaitingForYou = "WaitingForYou",
|
|
247
|
+
/** The run ended with its work done. */
|
|
248
|
+
Done = "Done",
|
|
249
|
+
/** The run ended with a failure. */
|
|
250
|
+
Failed = "Failed"
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* One agent's run as the repository panel lists it: its task's name, where it stands and the worktree it works in.
|
|
255
|
+
*/
|
|
256
|
+
export declare class GitAgentRow {
|
|
257
|
+
/** The provider's own key for the run, such as its id; the panel never reads it, and gives it back to the provider's open(). */
|
|
258
|
+
public readonly key: string;
|
|
259
|
+
/** The run's task, as a short name such as "Blame gutter". */
|
|
260
|
+
public readonly name: string;
|
|
261
|
+
public readonly state: GitAgentState;
|
|
262
|
+
/** The folder of the worktree the run works in; the section's header counts the distinct ones. */
|
|
263
|
+
public readonly worktree: string;
|
|
264
|
+
|
|
265
|
+
public constructor(key: string, name: string, state: GitAgentState, worktree: string);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* The agent runs modules give the repository panel; its Agents section, between Branches and Pull requests, lists every provider's runs
|
|
270
|
+
* together, and shows only while at least one provider is given.
|
|
271
|
+
*/
|
|
272
|
+
export declare class GitAgents {
|
|
273
|
+
/** Every provider given and not yet removed. */
|
|
274
|
+
public static readonly all: Signal<readonly IGitAgents[]>;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Gives the panel a module's agent runs, until the returned function removes them.
|
|
278
|
+
* @example
|
|
279
|
+
* const remove = GitAgents.provide({ listFor: folder => runs.of(folder), open: (folder, row) => runs.show(row.key) });
|
|
280
|
+
* @param agents The module's runs.
|
|
281
|
+
* @returns The function that removes them.
|
|
282
|
+
*/
|
|
283
|
+
public static provide(agents: IGitAgents): () => void;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* What a host module gives the repository panel so that it lists a repository's open pull requests on that host.
|
|
288
|
+
*/
|
|
289
|
+
export interface IGitPullRequests {
|
|
290
|
+
/**
|
|
291
|
+
* Whether a remote is on this host; the first host that claims the current branch's remote lists its pull requests.
|
|
292
|
+
* @param remote The current branch's remote.
|
|
293
|
+
* @returns True when this host lists its pull requests.
|
|
294
|
+
*/
|
|
295
|
+
claims(remote: GitRemote): boolean;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* The host's name, which the section's header shows, such as "GitHub".
|
|
299
|
+
*/
|
|
300
|
+
readonly hostName: string;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* The settings page whose sign-in a signed-out section opens.
|
|
304
|
+
*/
|
|
305
|
+
readonly signInPage: string;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* The repository's open pull requests on the remote, newest first.
|
|
309
|
+
* The panel reads it inside a computed signal, so the host answers the same signal for a folder and remote each time and updates it.
|
|
310
|
+
* @param folder The repository's folder.
|
|
311
|
+
* @param remote The current branch's remote.
|
|
312
|
+
* @returns The list, or `null` before the host has any answer.
|
|
313
|
+
*/
|
|
314
|
+
listFor(folder: string, remote: GitRemote): Signal<GitPullRequestList | null>;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Reads them again: the panel asks when the section first shows a folder or remote, when the window takes the focus, and on Try again.
|
|
318
|
+
* @param folder The repository's folder.
|
|
319
|
+
* @param remote The current branch's remote.
|
|
320
|
+
*/
|
|
321
|
+
refresh(folder: string, remote: GitRemote): void;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* A branch's newest pull request in any state, with its checks, or its head commit's checks when it has none; the workspace page reads it
|
|
325
|
+
* inside a computed signal, so the host answers the same signal for a folder, remote, branch and head commit each time and updates it, a newer
|
|
326
|
+
* read overtaking an older one. Left out, the workspace page finds the branch's pull request among {@link listFor}'s open ones.
|
|
327
|
+
* @param folder The repository's folder.
|
|
328
|
+
* @param remote The branch's remote.
|
|
329
|
+
* @param branch The branch's name.
|
|
330
|
+
* @param headCommit The branch's head commit, whose checks show when it has no pull request, or `null` when it is unknown.
|
|
331
|
+
* @returns The branch's pull request, or `null` before the host has any answer.
|
|
332
|
+
*/
|
|
333
|
+
branchFor?(folder: string, remote: GitRemote, branch: string, headCommit: string | null): Signal<GitBranchPullRequest | null>;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Reads a branch's pull request again: the workspace page asks when the branch's row first shows and when the window takes the focus.
|
|
337
|
+
* @param folder The repository's folder.
|
|
338
|
+
* @param remote The branch's remote.
|
|
339
|
+
* @param branch The branch's name.
|
|
340
|
+
* @param headCommit The branch's head commit, or `null` when it is unknown.
|
|
341
|
+
*/
|
|
342
|
+
refreshBranch?(folder: string, remote: GitRemote, branch: string, headCommit: string | null): void;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* The repository's open pull requests with their head and base branches, for finding stacks only, or null before the host has any answer or
|
|
346
|
+
* after a read that failed; for a host with `branchFor`, whose `listFor` the workspace page doesn't read. Its rows carry no approvals or checks,
|
|
347
|
+
* so nothing shows them. The workspace page reads it inside a computed signal, so the host answers the same signal for a remote each time, reads
|
|
348
|
+
* it when first asked, and forgets a failed read. Without this member, the page finds stacks only for a host without `branchFor`.
|
|
349
|
+
* @param folder The repository's folder.
|
|
350
|
+
* @param remote The repository's remote.
|
|
351
|
+
* @returns The open pull requests' heads and bases, or `null` before the host has any answer.
|
|
352
|
+
*/
|
|
353
|
+
stackListFor?(folder: string, remote: GitRemote): Signal<GitPullRequestList | null>;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* The pull request that brought a commit in, in any state, with its checks; the commit's detail shows it as a card under the files. The detail
|
|
357
|
+
* reads it inside a computed signal, so the host answers the same signal for a folder, remote and commit each time, reads it when first asked,
|
|
358
|
+
* and updates it. Left out, the commit's detail shows no pull request.
|
|
359
|
+
* @param folder The repository's folder.
|
|
360
|
+
* @param remote The current branch's remote.
|
|
361
|
+
* @param commitId The commit's full id.
|
|
362
|
+
* @returns The pull request, {@link GitBranchPullRequest.none} when no pull request brought the commit in, or `null` before the host has any answer.
|
|
363
|
+
*/
|
|
364
|
+
commitFor?(folder: string, remote: GitRemote, commitId: string): Signal<GitBranchPullRequest | null>;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* The review comments on a commit; the commit's detail shows "3 review comments on this commit" above 0, which opens their page in the browser.
|
|
368
|
+
* The detail reads it inside a computed signal, so the host answers the same signal for a remote and commit each time, reads it when first asked,
|
|
369
|
+
* and forgets a failed read so the next time the detail shows the commit reads it again. Left out, the commit's detail shows no comments row.
|
|
370
|
+
* @param folder The repository's folder.
|
|
371
|
+
* @param remote The current branch's remote.
|
|
372
|
+
* @param commitId The commit's full id.
|
|
373
|
+
* @returns The comments, or `null` before the host has any answer or after a read that failed.
|
|
374
|
+
*/
|
|
375
|
+
commentsFor?(folder: string, remote: GitRemote, commitId: string): Signal<GitCommitComments | null>;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* The open pull requests on the remote's repository that ask the signed-in person for a review, their own or, where the host knows it, a team's;
|
|
379
|
+
* the workspace page's Needs you lists them across its repositories. Keyed by the remote, so the folders of one repository share one read; the
|
|
380
|
+
* page reads it inside a computed signal, so the host answers the same signal for a remote each time and updates it. A row carries no counts or
|
|
381
|
+
* head branch. Left out, the host shows no review requests.
|
|
382
|
+
* @param remote A listed repository's remote on this host.
|
|
383
|
+
* @returns The review requests, newest first, `hasMore` when the host's answer was cut, or `null` before the host has any answer.
|
|
384
|
+
*/
|
|
385
|
+
reviewsFor?(remote: GitRemote): Signal<GitPullRequestList | null>;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Reads the review requests again: the workspace page asks for each listed repository's remote when it lists them and when the window takes the
|
|
389
|
+
* focus. A host may answer from a read it holds, such as one search of the account a minute.
|
|
390
|
+
* @param remote A listed repository's remote on this host.
|
|
391
|
+
*/
|
|
392
|
+
refreshReviews?(remote: GitRemote): void;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* The host's page that opens a new pull request, which the history's branch drop opens in the browser. Left out, or answering null, the drop holds
|
|
396
|
+
* its pull request choice.
|
|
397
|
+
* @param remote The current branch's remote on this host.
|
|
398
|
+
* @param source The dropped branch, as the remote names it.
|
|
399
|
+
* @param target The branch it was dropped on, as the remote names it.
|
|
400
|
+
* @returns The page's address, or `null` when the host has none for them.
|
|
401
|
+
*/
|
|
402
|
+
newPullRequestUrl?(remote: GitRemote, source: string, target: string): string | null;
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Opens a pull request in the host's own page; left out, the panel opens its page in the browser.
|
|
406
|
+
* @param folder The repository's folder.
|
|
407
|
+
* @param row The pull request the person clicked.
|
|
408
|
+
* @returns True when the host opened it; false leaves it to the panel, which opens its page in the browser.
|
|
409
|
+
*/
|
|
410
|
+
open?(folder: string, row: GitPullRequestRow): boolean;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Where a host's read of a repository's open pull requests stands.
|
|
415
|
+
*/
|
|
416
|
+
export declare enum GitPullRequestsState {
|
|
417
|
+
/** The host is reading them, and has none to show yet. */
|
|
418
|
+
Reading = "Reading",
|
|
419
|
+
/** The host read them. */
|
|
420
|
+
Ready = "Ready",
|
|
421
|
+
/** Nobody is signed in to the host, so it can't read them; the section offers its sign-in. */
|
|
422
|
+
SignedOut = "SignedOut",
|
|
423
|
+
/** The host's read failed; the section shows why, with Try again. */
|
|
424
|
+
Failed = "Failed"
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* One open pull request as the repository panel lists it: a status dot, its label and title, and a note.
|
|
429
|
+
* The dot shows failing checks first, then running ones, then passed ones; the note shows the failing checks, else that checks run, else the
|
|
430
|
+
* reviews, else that it is a draft.
|
|
431
|
+
*/
|
|
432
|
+
export declare class GitPullRequestRow {
|
|
433
|
+
/** The host's own key for it, such as its id; the window never reads it, and gives it back to the host's open(). */
|
|
434
|
+
public readonly key: string;
|
|
435
|
+
/** The host's label for it, such as "#214" or "!752". */
|
|
436
|
+
public readonly label: string;
|
|
437
|
+
public readonly title: string;
|
|
438
|
+
/** Its page on the host, which a click opens unless the host opens it itself. */
|
|
439
|
+
public readonly url: string;
|
|
440
|
+
public readonly isDraft: boolean;
|
|
441
|
+
/** Its approving reviews. */
|
|
442
|
+
public readonly approvals: number;
|
|
443
|
+
/** Its checks that passed. */
|
|
444
|
+
public readonly passed: number;
|
|
445
|
+
/** Its checks that failed. */
|
|
446
|
+
public readonly failing: number;
|
|
447
|
+
/** Its checks that still run or wait. */
|
|
448
|
+
public readonly pending: number;
|
|
449
|
+
/** The branch it merges from, without refs/heads/, such as "feature/sign-in"; the workspace page shows the pull request of a repository's current branch. */
|
|
450
|
+
public readonly headBranch: string;
|
|
451
|
+
/**
|
|
452
|
+
* The branch it merges into, without refs/heads/, such as "main", or `null` when the host didn't say; the workspace page shows a pull request
|
|
453
|
+
* whose base is another open pull request's head as stacked on it.
|
|
454
|
+
*/
|
|
455
|
+
public readonly baseBranch: string | null;
|
|
456
|
+
|
|
457
|
+
/** @param baseBranch The branch it merges into, or `null`, the default, when the host doesn't say. */
|
|
458
|
+
public constructor(key: string, label: string, title: string, url: string, isDraft: boolean, approvals: number, passed: number, failing: number, pending: number,
|
|
459
|
+
headBranch: string, baseBranch?: string | null);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* The review comments on a commit as its detail shows them: how many, whether the host's answer was cut, and the host's page that shows them.
|
|
464
|
+
*/
|
|
465
|
+
export declare class GitCommitComments {
|
|
466
|
+
/** The comments the host counted; the detail shows the row only above 0. */
|
|
467
|
+
public readonly count: number;
|
|
468
|
+
/** Whether a page of the host's answer was full, so there may be more than the count; the row then shows "100+" or "3+". */
|
|
469
|
+
public readonly isCapped: boolean;
|
|
470
|
+
/** The host's page that shows them, which a click opens in the browser; null when there are none. */
|
|
471
|
+
public readonly url: string | null;
|
|
472
|
+
|
|
473
|
+
public constructor(count: number, isCapped: boolean, url: string | null);
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* A host's open pull requests in a repository, with where its read stands; the section lists the first 20, and says when there are more.
|
|
478
|
+
*/
|
|
479
|
+
export declare class GitPullRequestList {
|
|
480
|
+
public readonly state: GitPullRequestsState;
|
|
481
|
+
/** The pull requests, newest first. */
|
|
482
|
+
public readonly rows: readonly GitPullRequestRow[];
|
|
483
|
+
/** Why the read failed, in the host's words, or `null`. */
|
|
484
|
+
public readonly failure: string | null;
|
|
485
|
+
/** Whether the host's answer was cut, so there may be more past the rows; review requests set it when the account's search was cut. */
|
|
486
|
+
public readonly hasMore: boolean;
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* A read that runs.
|
|
490
|
+
* @param rows The rows the last read gave, which the section keeps showing until this one ends; none by default.
|
|
491
|
+
*/
|
|
492
|
+
public static reading(rows?: readonly GitPullRequestRow[]): GitPullRequestList;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* A read that ended.
|
|
496
|
+
* @param rows The pull requests, newest first.
|
|
497
|
+
* @param hasMore Whether the host's answer was cut; false by default.
|
|
498
|
+
*/
|
|
499
|
+
public static ready(rows: readonly GitPullRequestRow[], hasMore?: boolean): GitPullRequestList;
|
|
500
|
+
|
|
501
|
+
/** Nobody is signed in to the host. */
|
|
502
|
+
public static signedOut(): GitPullRequestList;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* A read that failed.
|
|
506
|
+
* @param failure Why, in the host's words, which the section shows.
|
|
507
|
+
* @param rows The rows the last read gave, which review requests keep showing after a failed read; none by default.
|
|
508
|
+
*/
|
|
509
|
+
public static failed(failure: string, rows?: readonly GitPullRequestRow[]): GitPullRequestList;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/** Where a branch's pull request stands on its host. */
|
|
513
|
+
export declare enum GitPullRequestState {
|
|
514
|
+
Open = "Open",
|
|
515
|
+
Draft = "Draft",
|
|
516
|
+
Merged = "Merged",
|
|
517
|
+
/** Closed without merging, or abandoned. */
|
|
518
|
+
Closed = "Closed"
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* A branch's newest pull request on its host, in any state, with its checks; or, when the branch has none, the checks of its head commit.
|
|
523
|
+
* The workspace page shows it in a repository's Pull request and Checks cells: "#214 open", "#1046 draft", "#22 merged", "#9 closed", or
|
|
524
|
+
* "Review #533" for an open one that waits for its reviews, and the worst of the checks.
|
|
525
|
+
*/
|
|
526
|
+
export declare class GitBranchPullRequest {
|
|
527
|
+
/** Where the host's read stands. */
|
|
528
|
+
public readonly state: GitPullRequestsState;
|
|
529
|
+
/** The pull request, which a click opens through the host's `open`, or `null` when the branch has none or the read has no answer. */
|
|
530
|
+
public readonly pullRequest: GitPullRequestRow | null;
|
|
531
|
+
/** Where the pull request stands, or `null` without one. */
|
|
532
|
+
public readonly pullRequestState: GitPullRequestState | null;
|
|
533
|
+
/** Whether the open pull request waits for its reviews: none approves it or requests changes. */
|
|
534
|
+
public readonly isWaitingForReview: boolean;
|
|
535
|
+
/** The checks that passed: the pull request's, or the head commit's without one. */
|
|
536
|
+
public readonly passed: number;
|
|
537
|
+
/** The checks that failed. */
|
|
538
|
+
public readonly failing: number;
|
|
539
|
+
/** The checks that still run or wait. */
|
|
540
|
+
public readonly pending: number;
|
|
541
|
+
/** Why the read failed, in the host's words, or `null`. */
|
|
542
|
+
public readonly failure: string | null;
|
|
543
|
+
/**
|
|
544
|
+
* The host's own word for where the pull request stands, as its site shows it, such as Azure DevOps' "Active", "Completed" or "Abandoned", which the
|
|
545
|
+
* commit's pull request card and the workspace page show; `null` shows Git's word for `pullRequestState`: Open, Draft, Merged or Closed.
|
|
546
|
+
*/
|
|
547
|
+
public readonly stateLabel: string | null;
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* A read that runs, keeping the last read's state word.
|
|
551
|
+
* @param last What the last read gave, which the page keeps showing until this one ends; none by default.
|
|
552
|
+
*/
|
|
553
|
+
public static reading(last?: GitBranchPullRequest | null): GitBranchPullRequest;
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* The branch's pull request, with its checks counted on the row.
|
|
557
|
+
* @param pullRequest The pull request, whose `passed`, `failing` and `pending` count its checks.
|
|
558
|
+
* @param state Where it stands.
|
|
559
|
+
* @param isWaitingForReview Whether none of its reviews approves it or requests changes yet.
|
|
560
|
+
* @param stateLabel The host's own word for where it stands, such as "Completed", or `null`, the default, for Git's word for `state`.
|
|
561
|
+
* @example
|
|
562
|
+
* ```ts
|
|
563
|
+
* import { GitBranchPullRequest, GitPullRequestRow, GitPullRequestState } from "@noldova/git.window";
|
|
564
|
+
*
|
|
565
|
+
* const shown = GitBranchPullRequest.of(new GitPullRequestRow("214", "#214", "Draw lanes", "https://github.com/example-owner/site/pull/214", false, 0, 3, 0,
|
|
566
|
+
* 1, "feature/lanes"), GitPullRequestState.Open, true);
|
|
567
|
+
* ```
|
|
568
|
+
*/
|
|
569
|
+
public static of(pullRequest: GitPullRequestRow, state: GitPullRequestState, isWaitingForReview: boolean, stateLabel?: string | null): GitBranchPullRequest;
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* No pull request for the branch.
|
|
573
|
+
* @param passed The head commit's checks that passed.
|
|
574
|
+
* @param failing Those that failed.
|
|
575
|
+
* @param pending Those that still run or wait.
|
|
576
|
+
*/
|
|
577
|
+
public static none(passed: number, failing: number, pending: number): GitBranchPullRequest;
|
|
578
|
+
|
|
579
|
+
/** Nobody is signed in to the host. */
|
|
580
|
+
public static signedOut(): GitBranchPullRequest;
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* A read that failed.
|
|
584
|
+
* @param failure Why, in the host's words, or `null` when it gave none.
|
|
585
|
+
*/
|
|
586
|
+
public static failed(failure: string | null): GitBranchPullRequest;
|
|
587
|
+
}
|
|
588
|
+
|
|
77
589
|
/**
|
|
78
590
|
* A host row as {@link GitHostRows.provide} added it, with the context of the window part that provided it.
|
|
79
591
|
*/
|
|
@@ -89,6 +601,113 @@ export interface IProvidedGitHostRow {
|
|
|
89
601
|
readonly row: IGitHostRow;
|
|
90
602
|
}
|
|
91
603
|
|
|
604
|
+
/**
|
|
605
|
+
* A feature a host can have, as the "What each host can do" table on Accounts and hosts lists it.
|
|
606
|
+
*/
|
|
607
|
+
export declare enum GitHostFeature {
|
|
608
|
+
/** Opening and reading pull requests. */
|
|
609
|
+
PullRequests = "PullRequests",
|
|
610
|
+
/** Reviewers' votes and branch policies on a pull request. */
|
|
611
|
+
VotesAndPolicies = "VotesAndPolicies",
|
|
612
|
+
/** Builds or checks on commits. */
|
|
613
|
+
BuildsOnCommits = "BuildsOnCommits",
|
|
614
|
+
/** Work items or issues. */
|
|
615
|
+
WorkItems = "WorkItems",
|
|
616
|
+
/** Creating a branch from a work item. */
|
|
617
|
+
BranchFromItem = "BranchFromItem",
|
|
618
|
+
/** Completing a pull request by itself once its policies pass. */
|
|
619
|
+
AutoComplete = "AutoComplete"
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* The state of a {@link GitHostCard}, which picks what it ends with.
|
|
624
|
+
*/
|
|
625
|
+
export declare enum GitHostCardState {
|
|
626
|
+
/** Signed in: a chip with the success dot, and a button that opens the host's account. */
|
|
627
|
+
SignedIn = "SignedIn",
|
|
628
|
+
/** A sign-in waits on the person, such as for a code or the browser: a plain chip, and the button that opens it. */
|
|
629
|
+
Waiting = "Waiting",
|
|
630
|
+
/** Signed out: a button that opens the host's sign-in. */
|
|
631
|
+
SignedOut = "SignedOut",
|
|
632
|
+
/** The sign-in couldn't be read or failed: a button that opens the host's sign-in. */
|
|
633
|
+
Failed = "Failed"
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* One account or sign-in a host shows on Accounts and hosts.
|
|
638
|
+
* @example
|
|
639
|
+
* ```ts
|
|
640
|
+
* import { GitHostCard, GitHostCardState } from "@noldova/git.window";
|
|
641
|
+
*
|
|
642
|
+
* export const signedIn: GitHostCard = new GitHostCard("GitHub · kim", "Device sign-in", GitHostCardState.SignedIn, "Signed in");
|
|
643
|
+
* ```
|
|
644
|
+
*/
|
|
645
|
+
export declare class GitHostCard {
|
|
646
|
+
/** The card's title, such as the host and the account's name. */
|
|
647
|
+
public readonly title: string;
|
|
648
|
+
|
|
649
|
+
/** The line under the title, such as how the account signed in and what it reaches. */
|
|
650
|
+
public readonly detail: string;
|
|
651
|
+
|
|
652
|
+
/** The card's state. */
|
|
653
|
+
public readonly state: GitHostCardState;
|
|
654
|
+
|
|
655
|
+
/** The chip's text, or the button's while it asks to sign in. */
|
|
656
|
+
public readonly label: string;
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* Creates a card.
|
|
660
|
+
* @param title The card's title.
|
|
661
|
+
* @param detail The line under the title.
|
|
662
|
+
* @param state The card's state.
|
|
663
|
+
* @param label The chip's text, or the button's while it asks to sign in.
|
|
664
|
+
*/
|
|
665
|
+
public constructor(title: string, detail: string, state: GitHostCardState, label: string);
|
|
666
|
+
|
|
667
|
+
/** Whether the card ends with a button that opens the host's sign-in rather than a chip: while it is signed out or its sign-in failed. */
|
|
668
|
+
public get asksToSignIn(): boolean;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* A host's accounts as a host module gives them to Accounts and hosts with {@link GitHostAccounts.provide}.
|
|
673
|
+
*/
|
|
674
|
+
export interface IGitHostAccount {
|
|
675
|
+
/** The host's id, `<module id>.<name>`, unique among the hosts; the page's Settings search row for the host is `git.account.<id>`. */
|
|
676
|
+
readonly id: string;
|
|
677
|
+
|
|
678
|
+
/** The host's name, such as Azure DevOps, which titles its menu item under Add an account and its dialog. */
|
|
679
|
+
readonly host: string;
|
|
680
|
+
|
|
681
|
+
/** The host's short name, such as Azure, which titles its column in What each host can do. */
|
|
682
|
+
readonly column: string;
|
|
683
|
+
|
|
684
|
+
/** The two letters on the host's 2rem tile, such as GH. */
|
|
685
|
+
readonly mark: string;
|
|
686
|
+
|
|
687
|
+
/** The tile's background, the host's brand colour as a CSS colour; its text is the kit's button text colour. */
|
|
688
|
+
readonly markColor: string;
|
|
689
|
+
|
|
690
|
+
/** The host's cards, one per account or sign-in, which the page follows as they change. */
|
|
691
|
+
readonly cards: Signal<readonly GitHostCard[]>;
|
|
692
|
+
|
|
693
|
+
/** The component the host's dialog shows, which draws its own sign-in, account and sign-out, with the providing part's context as `WindowPartTokens.context`. */
|
|
694
|
+
readonly signIn: Type<unknown>;
|
|
695
|
+
|
|
696
|
+
/** The features the host has, each once; the table shows the others as missing. */
|
|
697
|
+
readonly features: readonly GitHostFeature[];
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* A host's accounts as {@link GitHostAccounts.provide} added them, with the context of the window part that provided them.
|
|
702
|
+
*/
|
|
703
|
+
export interface IProvidedGitHostAccount {
|
|
704
|
+
/** The providing window part's context, which the dialog gives the host's component as `WindowPartTokens.context`. */
|
|
705
|
+
readonly context: IWindowPartContext;
|
|
706
|
+
|
|
707
|
+
/** The host's accounts. */
|
|
708
|
+
readonly account: IGitHostAccount;
|
|
709
|
+
}
|
|
710
|
+
|
|
92
711
|
/**
|
|
93
712
|
* The folder the Git view shows, which the app provides.
|
|
94
713
|
*/
|
|
@@ -130,28 +749,77 @@ export declare class GitFolder {
|
|
|
130
749
|
* ```
|
|
131
750
|
*/
|
|
132
751
|
public static provide(context: IWindowPartContext, folder: Signal<string | null>): () => void;
|
|
133
|
-
}
|
|
134
752
|
|
|
135
|
-
/**
|
|
136
|
-
* The host rows other modules add to the Git view.
|
|
137
|
-
*/
|
|
138
|
-
export declare class GitHostRows {
|
|
139
753
|
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
* @
|
|
754
|
+
* Points the Git views at the repository a document shows, ahead of the provided folder, until the returned function is called or another
|
|
755
|
+
* document is shown; a history document's own repository, while its tab is the window's active document, comes ahead of it. It has no effect while no
|
|
756
|
+
* folder is provided.
|
|
757
|
+
* @param folder The repository's folder, an absolute path of at most 4096 characters.
|
|
758
|
+
* @returns A function that stops pointing at it, unless another document was shown since.
|
|
144
759
|
* @example
|
|
145
760
|
* ```ts
|
|
146
|
-
* import
|
|
147
|
-
* import { GitHostRows } from "@noldova/git.window";
|
|
761
|
+
* import { GitFolder } from "@noldova/git.window";
|
|
148
762
|
*
|
|
149
|
-
* export function
|
|
150
|
-
* return
|
|
763
|
+
* export function showRepository(folder: string): () => void {
|
|
764
|
+
* return GitFolder.show(folder);
|
|
151
765
|
* }
|
|
152
766
|
* ```
|
|
153
767
|
*/
|
|
154
|
-
public static
|
|
768
|
+
public static show(folder: string): () => void;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* How an app wants the Git view laid out.
|
|
773
|
+
* @example
|
|
774
|
+
* ```ts
|
|
775
|
+
* import { GitViewOptions } from "@noldova/git.window";
|
|
776
|
+
*
|
|
777
|
+
* export function hideBranchCard(): void {
|
|
778
|
+
* GitViewOptions.showsBranch.set(false);
|
|
779
|
+
* }
|
|
780
|
+
* ```
|
|
781
|
+
*/
|
|
782
|
+
export declare class GitViewOptions {
|
|
783
|
+
/**
|
|
784
|
+
* Whether the view starts with the branch card, `true` by default; an app that shows branches, Pull and Push elsewhere turns it off, and the view
|
|
785
|
+
* titles its changes with the branch instead.
|
|
786
|
+
*/
|
|
787
|
+
public static readonly showsBranch: WritableSignal<boolean>;
|
|
788
|
+
/**
|
|
789
|
+
* Whether the module offers its AI features, `false` by default: Suggest on the commit message, Explain in a commit's detail and Tidy up for
|
|
790
|
+
* review on the rebase screen. An app that runs them turns it on; while it is off none of them shows, and the rows they sit in close up.
|
|
791
|
+
* @example
|
|
792
|
+
* ```ts
|
|
793
|
+
* import { GitViewOptions } from "@noldova/git.window";
|
|
794
|
+
*
|
|
795
|
+
* export function offerAiFeatures(): void {
|
|
796
|
+
* GitViewOptions.showsAiFeatures.set(true);
|
|
797
|
+
* }
|
|
798
|
+
* ```
|
|
799
|
+
*/
|
|
800
|
+
public static readonly showsAiFeatures: WritableSignal<boolean>;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* The host rows other modules add to the Git view.
|
|
805
|
+
*/
|
|
806
|
+
export declare class GitHostRows {
|
|
807
|
+
/**
|
|
808
|
+
* Adds a host row; rows are asked in the order they were added.
|
|
809
|
+
* @param context The providing window part's context, which logs a claim that throws.
|
|
810
|
+
* @param row The row.
|
|
811
|
+
* @returns A function that removes the row.
|
|
812
|
+
* @example
|
|
813
|
+
* ```ts
|
|
814
|
+
* import type { IWindowPartContext } from "@noldova/desktop.window";
|
|
815
|
+
* import { GitHostRows } from "@noldova/git.window";
|
|
816
|
+
*
|
|
817
|
+
* export function addRow(context: IWindowPartContext, component: import("@angular/core").Type<unknown>): () => void {
|
|
818
|
+
* return GitHostRows.provide(context, { claims: t => t.host === "github.com", component });
|
|
819
|
+
* }
|
|
820
|
+
* ```
|
|
821
|
+
*/
|
|
822
|
+
public static provide(context: IWindowPartContext, row: IGitHostRow): () => void;
|
|
155
823
|
|
|
156
824
|
/**
|
|
157
825
|
* Finds the row for a remote.
|
|
@@ -162,6 +830,915 @@ export declare class GitHostRows {
|
|
|
162
830
|
public static rowFor(remote: GitRemote): IProvidedGitHostRow | null;
|
|
163
831
|
}
|
|
164
832
|
|
|
833
|
+
/**
|
|
834
|
+
* The hosts other modules add to Accounts and hosts, the Git module's Settings page `git.accounts`.
|
|
835
|
+
*/
|
|
836
|
+
export declare class GitHostAccounts {
|
|
837
|
+
/** The added hosts, in the order they were added. */
|
|
838
|
+
public static readonly accounts: Signal<readonly IProvidedGitHostAccount[]>;
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* Adds a host, which the page shows after those added before it, and Settings search finds by its row.
|
|
842
|
+
* @param context The providing window part's context, which the host's dialog component gets.
|
|
843
|
+
* @param account The host's accounts.
|
|
844
|
+
* @returns A function that removes the host.
|
|
845
|
+
* @example
|
|
846
|
+
* ```ts
|
|
847
|
+
* import { signal, type Type } from "@angular/core";
|
|
848
|
+
* import type { IWindowPartContext } from "@noldova/desktop.window";
|
|
849
|
+
* import { GitHostAccounts, GitHostFeature } from "@noldova/git.window";
|
|
850
|
+
*
|
|
851
|
+
* export function addHost(context: IWindowPartContext, signIn: Type<unknown>): () => void {
|
|
852
|
+
* return GitHostAccounts.provide(context, { id: "git-github.account", host: "GitHub", column: "GitHub", mark: "GH", markColor: "#24292f", cards: signal([]), signIn,
|
|
853
|
+
* features: [GitHostFeature.PullRequests] });
|
|
854
|
+
* }
|
|
855
|
+
* ```
|
|
856
|
+
*/
|
|
857
|
+
public static provide(context: IWindowPartContext, account: IGitHostAccount): () => void;
|
|
858
|
+
|
|
859
|
+
/**
|
|
860
|
+
* Calls a listener with the added hosts now and after each host is added or removed.
|
|
861
|
+
* @param listener The listener.
|
|
862
|
+
* @returns A function that stops calling it.
|
|
863
|
+
*/
|
|
864
|
+
public static follow(listener: (accounts: readonly IProvidedGitHostAccount[]) => void): () => void;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* The commit authors' pictures: each host module's first, asked in the order they were added, then the fallbacks', which the Git module's window
|
|
869
|
+
* part adds for Gravatar; a host still reading holds the fallbacks back, so a picture doesn't change once shown.
|
|
870
|
+
*/
|
|
871
|
+
export declare class GitAvatars {
|
|
872
|
+
/**
|
|
873
|
+
* Adds a host's pictures; hosts are asked in the order they were added.
|
|
874
|
+
* @param avatars The host's pictures.
|
|
875
|
+
* @returns A function that removes them.
|
|
876
|
+
* @example
|
|
877
|
+
* ```ts
|
|
878
|
+
* import { GitAvatars } from "@noldova/git.window";
|
|
879
|
+
*
|
|
880
|
+
* export function addPictures(pictures: ReadonlyMap<string, string>): () => void {
|
|
881
|
+
* return GitAvatars.provide({ avatarOf: (_folder, email) => pictures.get(email) ?? null });
|
|
882
|
+
* }
|
|
883
|
+
* ```
|
|
884
|
+
*/
|
|
885
|
+
public static provide(avatars: IGitAvatars): () => void;
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* Adds pictures asked only once every host has none for an author, in the order they were added.
|
|
889
|
+
* @param avatars The fallback's pictures.
|
|
890
|
+
* @returns A function that removes them.
|
|
891
|
+
* @example
|
|
892
|
+
* ```ts
|
|
893
|
+
* import { GitAvatars } from "@noldova/git.window";
|
|
894
|
+
*
|
|
895
|
+
* export function addFallback(picture: string): () => void {
|
|
896
|
+
* return GitAvatars.provideFallback({ avatarOf: () => picture });
|
|
897
|
+
* }
|
|
898
|
+
* ```
|
|
899
|
+
*/
|
|
900
|
+
public static provideFallback(avatars: IGitAvatars): () => void;
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* An author's picture; read inside a computed signal, it changes once a picture arrives.
|
|
904
|
+
* @param folder The repository's folder.
|
|
905
|
+
* @param email The author's email as the commit names it.
|
|
906
|
+
* @param commitId The full id of a commit of theirs.
|
|
907
|
+
* @returns The first picture a host has, else the first a fallback has, as a base64 `data:` address; `null` while none is known.
|
|
908
|
+
* @example
|
|
909
|
+
* ```ts
|
|
910
|
+
* import { GitAvatars } from "@noldova/git.window";
|
|
911
|
+
*
|
|
912
|
+
* export const picture: string | null = GitAvatars.imageOf("/home/a/repo", "kim@example.com", "0123456789abcdef0123456789abcdef01234567");
|
|
913
|
+
* ```
|
|
914
|
+
*/
|
|
915
|
+
public static imageOf(folder: string, email: string, commitId: string): string | null;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* The commit message prefixes host modules give the Git view's commit box.
|
|
920
|
+
* The box starts an empty message with the prefix for the current branch, and when the branch changes it swaps a prefix still untouched for the
|
|
921
|
+
* new branch's, or empties it; it never changes text the person typed. A message the person clears stays empty until the branch changes, a commit
|
|
922
|
+
* is made or amending is turned off.
|
|
923
|
+
*/
|
|
924
|
+
export declare class GitCommitPrefixes {
|
|
925
|
+
/**
|
|
926
|
+
* Adds a host's prefixes; hosts are asked in the order they were added, and the first that answers other than `null` wins.
|
|
927
|
+
* @param context The providing window part's context, which logs an answer that throws before the next host is asked.
|
|
928
|
+
* @param prefixes The host's prefixes.
|
|
929
|
+
* @returns A function that removes only this host's prefixes.
|
|
930
|
+
* @example
|
|
931
|
+
* ```ts
|
|
932
|
+
* import type { IWindowPartContext } from "@noldova/desktop.window";
|
|
933
|
+
* import { GitCommitPrefixes } from "@noldova/git.window";
|
|
934
|
+
*
|
|
935
|
+
* export function addPrefixes(context: IWindowPartContext): () => void {
|
|
936
|
+
* return GitCommitPrefixes.provide(context, { prefixFor: (_folder, branch) => branch === "users/kim/7521-export-notes" ? "AB#7521 " : null });
|
|
937
|
+
* }
|
|
938
|
+
* ```
|
|
939
|
+
*/
|
|
940
|
+
public static provide(context: IWindowPartContext, prefixes: IGitCommitPrefixes): () => void;
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* Finds the prefix for a branch.
|
|
944
|
+
* @param folder The repository's folder.
|
|
945
|
+
* @param branch The branch's short name.
|
|
946
|
+
* @returns The first added host's prefix that isn't `null`, or `null` when none gives one; a host whose answer throws is logged and skipped.
|
|
947
|
+
*/
|
|
948
|
+
public static prefixFor(folder: string, branch: string): string | null;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
/** Counts in sentences and buttons as every Git window writes them: a word from one to nine and digits otherwise. */
|
|
952
|
+
export declare class GitCounts {
|
|
953
|
+
/**
|
|
954
|
+
* A count inside a sentence or a button.
|
|
955
|
+
* @param count The count.
|
|
956
|
+
* @returns A word from one to nine, such as "three", and digits otherwise, such as "12".
|
|
957
|
+
* @example
|
|
958
|
+
* ```ts
|
|
959
|
+
* import { GitCounts } from "@noldova/git.window";
|
|
960
|
+
*
|
|
961
|
+
* export const label: string = `Open all ${GitCounts.format(3)}`;
|
|
962
|
+
* ```
|
|
963
|
+
*/
|
|
964
|
+
public static format(count: number): string;
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* A count that starts a sentence.
|
|
968
|
+
* @param count The count.
|
|
969
|
+
* @returns A capitalized word from one to nine, such as "Three", and digits otherwise, such as "12".
|
|
970
|
+
* @example
|
|
971
|
+
* ```ts
|
|
972
|
+
* import { GitCounts } from "@noldova/git.window";
|
|
973
|
+
*
|
|
974
|
+
* export const line: string = `${GitCounts.formatStart(2)} repositories are behind`;
|
|
975
|
+
* ```
|
|
976
|
+
*/
|
|
977
|
+
public static formatStart(count: number): string;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* Keeps the focus on a control when the control that held it as the person pressed goes away, as a staged file's row or a dismissed banner does,
|
|
982
|
+
* rather than letting it fall to the page: it moves to the control now at the pressed one's place in the nearest container that survives, such as the
|
|
983
|
+
* next row's same button or the new state's first button; while none is there, as when a spinner stands in for the next state, it waits for one, until
|
|
984
|
+
* the focus goes elsewhere or the person presses again. Host modules' window parts use it in their own settings and rows.
|
|
985
|
+
*/
|
|
986
|
+
export declare class FocusKeeper {
|
|
987
|
+
/**
|
|
988
|
+
* Keeps the focus within the root until the returned function stops it.
|
|
989
|
+
* @param root The element whose controls it watches, usually a component's host element.
|
|
990
|
+
* @returns A function that stops it.
|
|
991
|
+
* @example
|
|
992
|
+
* ```ts
|
|
993
|
+
* import { Component, DestroyRef, ElementRef, inject } from "@angular/core";
|
|
994
|
+
* import { FocusKeeper } from "@noldova/git.window";
|
|
995
|
+
*
|
|
996
|
+
* @Component({ selector: "nol-host-row", template: "<button type=\"button\">Sign out</button>" })
|
|
997
|
+
* export class HostRowComponent {
|
|
998
|
+
* public constructor() {
|
|
999
|
+
* inject(DestroyRef).onDestroy(FocusKeeper.keep(inject<ElementRef<HTMLElement>>(ElementRef).nativeElement));
|
|
1000
|
+
* }
|
|
1001
|
+
* }
|
|
1002
|
+
* ```
|
|
1003
|
+
*/
|
|
1004
|
+
public static keep(root: HTMLElement): () => void;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* The link sources host modules give the Git view, for the chips in a commit's message.
|
|
1009
|
+
*/
|
|
1010
|
+
export declare class GitLinkReferences {
|
|
1011
|
+
/**
|
|
1012
|
+
* Adds a host's link source; sources are asked in the order they were added.
|
|
1013
|
+
* @param references The host's source.
|
|
1014
|
+
* @returns A function that removes it.
|
|
1015
|
+
* @example
|
|
1016
|
+
* ```ts
|
|
1017
|
+
* import type { ILinkReferenceSource } from "@noldova/ui.components.angular";
|
|
1018
|
+
* import { GitLinkReferences } from "@noldova/git.window";
|
|
1019
|
+
*
|
|
1020
|
+
* export function addLinks(source: ILinkReferenceSource): () => void {
|
|
1021
|
+
* return GitLinkReferences.provide({ referencesFor: () => source });
|
|
1022
|
+
* }
|
|
1023
|
+
* ```
|
|
1024
|
+
*/
|
|
1025
|
+
public static provide(references: IGitLinkReferences): () => void;
|
|
1026
|
+
|
|
1027
|
+
/**
|
|
1028
|
+
* Asks each host, in the order they were added, to open a link of its own in the repository at a folder.
|
|
1029
|
+
* @param folder The repository's folder.
|
|
1030
|
+
* @param url The link the person opened.
|
|
1031
|
+
* @param injector The window's injector, passed to each host.
|
|
1032
|
+
* @returns True when a host opened it.
|
|
1033
|
+
*/
|
|
1034
|
+
public static opens(folder: string, url: string, injector: Injector): boolean;
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* The link source for the repository at a folder.
|
|
1038
|
+
* @param folder The repository's folder.
|
|
1039
|
+
* @returns `null` when no host knows links there, the one host's source when one does, or else a source that asks each in turn: the first that
|
|
1040
|
+
* knows a link draws it, and a text match that overlaps an earlier one is dropped.
|
|
1041
|
+
*/
|
|
1042
|
+
public static of(folder: string): ILinkReferenceSource | null;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* A row a host module adds to the repository panel under Changes and History, such as one that opens the remote's work items.
|
|
1047
|
+
* @example
|
|
1048
|
+
* ```ts
|
|
1049
|
+
* import { GitRepositoryLink } from "@noldova/git.window";
|
|
1050
|
+
*
|
|
1051
|
+
* export const workItems: GitRepositoryLink = new GitRepositoryLink("workItems", "My work items", "checklist", () => undefined);
|
|
1052
|
+
* ```
|
|
1053
|
+
*/
|
|
1054
|
+
export declare class GitRepositoryLink {
|
|
1055
|
+
/** The row's key, unique among one host's rows. */
|
|
1056
|
+
public readonly key: string;
|
|
1057
|
+
|
|
1058
|
+
/** The row's text. */
|
|
1059
|
+
public readonly label: string;
|
|
1060
|
+
|
|
1061
|
+
/** The row's Material Symbols icon. */
|
|
1062
|
+
public readonly icon: string;
|
|
1063
|
+
|
|
1064
|
+
/** Opens the row's page. */
|
|
1065
|
+
public readonly open: () => void;
|
|
1066
|
+
|
|
1067
|
+
/** Whether the row's page is the window's active document, which selects the row in place of Changes or History. */
|
|
1068
|
+
public readonly isActive: Signal<boolean>;
|
|
1069
|
+
|
|
1070
|
+
/**
|
|
1071
|
+
* Creates a row.
|
|
1072
|
+
* @param key The row's key, unique among one host's rows.
|
|
1073
|
+
* @param label The row's text.
|
|
1074
|
+
* @param icon The row's Material Symbols icon.
|
|
1075
|
+
* @param open Opens the row's page.
|
|
1076
|
+
* @param isActive Whether the row's page is the window's active document, such as from `WindowPartTokens.activeDocument` in the page; never, when left out.
|
|
1077
|
+
*/
|
|
1078
|
+
public constructor(key: string, label: string, icon: string, open: () => void, isActive?: Signal<boolean>);
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
/**
|
|
1082
|
+
* The rows host modules give the repository panel under Changes and History.
|
|
1083
|
+
*/
|
|
1084
|
+
export declare class GitRepositoryLinks {
|
|
1085
|
+
/**
|
|
1086
|
+
* Adds a host's rows; hosts' rows show in the order they were added.
|
|
1087
|
+
* @param links The host's rows.
|
|
1088
|
+
* @returns A function that removes them.
|
|
1089
|
+
* @example
|
|
1090
|
+
* ```ts
|
|
1091
|
+
* import { GitRepositoryLink, GitRepositoryLinks } from "@noldova/git.window";
|
|
1092
|
+
*
|
|
1093
|
+
* export function addWorkItems(open: () => void): () => void {
|
|
1094
|
+
* return GitRepositoryLinks.provide({ linksFor: remote => remote.host === "dev.azure.com" ? [new GitRepositoryLink("workItems", "My work items", "checklist", open)] : [] });
|
|
1095
|
+
* }
|
|
1096
|
+
* ```
|
|
1097
|
+
*/
|
|
1098
|
+
public static provide(links: IGitRepositoryLinks): () => void;
|
|
1099
|
+
|
|
1100
|
+
/**
|
|
1101
|
+
* Every host's rows for a repository whose remote this is.
|
|
1102
|
+
* @param remote The repository's remote.
|
|
1103
|
+
* @returns The rows, in the order the hosts were added.
|
|
1104
|
+
*/
|
|
1105
|
+
public static of(remote: GitRemote): readonly GitRepositoryLink[];
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
/**
|
|
1109
|
+
* The pull request lists host modules give the repository panel, which shows a Pull requests section for the current branch's remote.
|
|
1110
|
+
*/
|
|
1111
|
+
export declare class GitPullRequests {
|
|
1112
|
+
/**
|
|
1113
|
+
* Adds a host's pull request list; hosts are asked in the order they were added.
|
|
1114
|
+
* @param context The providing window part's context, to which a claim that throws is logged.
|
|
1115
|
+
* @param pullRequests The host's list.
|
|
1116
|
+
* @returns A function that removes it.
|
|
1117
|
+
* @example
|
|
1118
|
+
* ```ts
|
|
1119
|
+
* import { signal } from "@angular/core";
|
|
1120
|
+
* import type { IWindowPartContext } from "@noldova/desktop.window";
|
|
1121
|
+
* import { GitPullRequestList, GitPullRequests } from "@noldova/git.window";
|
|
1122
|
+
*
|
|
1123
|
+
* export function listPullRequests(context: IWindowPartContext): () => void {
|
|
1124
|
+
* const list = signal(GitPullRequestList.reading());
|
|
1125
|
+
* return GitPullRequests.provide(context, {
|
|
1126
|
+
* claims: remote => remote.host === "example.com", hostName: "Example", signInPage: "example.account",
|
|
1127
|
+
* listFor: () => list, refresh: () => list.set(GitPullRequestList.ready([]))
|
|
1128
|
+
* });
|
|
1129
|
+
* }
|
|
1130
|
+
* ```
|
|
1131
|
+
*/
|
|
1132
|
+
public static provide(context: IWindowPartContext, pullRequests: IGitPullRequests): () => void;
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* The first host, in the order they were added, that claims a remote; a host whose claim throws is logged to its part and passed over.
|
|
1136
|
+
* @param remote The current branch's remote.
|
|
1137
|
+
* @returns The host's list, or `null` when no host claims the remote.
|
|
1138
|
+
*/
|
|
1139
|
+
public static of(remote: GitRemote): IGitPullRequests | null;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
/**
|
|
1143
|
+
* A named, ordered list of repository folders that the workspace page shows together.
|
|
1144
|
+
*/
|
|
1145
|
+
export declare class GitWorkspace {
|
|
1146
|
+
/** The workspace's id, which its page opens with. */
|
|
1147
|
+
public readonly id: string;
|
|
1148
|
+
|
|
1149
|
+
/** The name the person gave it. */
|
|
1150
|
+
public readonly name: string;
|
|
1151
|
+
|
|
1152
|
+
/** Its repositories' absolute folders, in the person's order. */
|
|
1153
|
+
public readonly folders: readonly string[];
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* The person's workspaces, in the order they made them, kept in the window's storage. The Git module's window part reads them when it activates;
|
|
1158
|
+
* its `git.openWorkspace` command opens one's page, with `{ id }`, or the repositories opened lately with `{ id: null }` or no arguments.
|
|
1159
|
+
* @example
|
|
1160
|
+
* ```ts
|
|
1161
|
+
* import type { IWindowPartContext } from "@noldova/desktop.window";
|
|
1162
|
+
* import { GitWorkspaces } from "@noldova/git.window";
|
|
1163
|
+
*
|
|
1164
|
+
* export async function openFirstWorkspaceAsync(context: IWindowPartContext): Promise<void> {
|
|
1165
|
+
* await context.runCommandAsync("git.openWorkspace", { id: GitWorkspaces.list()[0]?.id ?? null });
|
|
1166
|
+
* }
|
|
1167
|
+
* ```
|
|
1168
|
+
*/
|
|
1169
|
+
export declare class GitWorkspaces {
|
|
1170
|
+
/** The workspaces, in the order they were made. */
|
|
1171
|
+
public static readonly list: Signal<readonly GitWorkspace[]>;
|
|
1172
|
+
|
|
1173
|
+
/** Reads the workspaces kept in the window's storage again; one that no longer reads is dropped, and the others stay. */
|
|
1174
|
+
public static restore(): void;
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* Finds a workspace.
|
|
1178
|
+
* @param id The workspace's id.
|
|
1179
|
+
* @returns The workspace, or null when there is none with that id.
|
|
1180
|
+
*/
|
|
1181
|
+
public static find(id: string): GitWorkspace | null;
|
|
1182
|
+
|
|
1183
|
+
/**
|
|
1184
|
+
* Makes a workspace with no repositories.
|
|
1185
|
+
* @param name Its name.
|
|
1186
|
+
* @returns The new workspace.
|
|
1187
|
+
*/
|
|
1188
|
+
public static create(name: string): GitWorkspace;
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* Removes a workspace; its repositories stay as they are.
|
|
1192
|
+
* @param id The workspace's id.
|
|
1193
|
+
*/
|
|
1194
|
+
public static remove(id: string): void;
|
|
1195
|
+
|
|
1196
|
+
/**
|
|
1197
|
+
* Renames a workspace.
|
|
1198
|
+
* @param id The workspace's id.
|
|
1199
|
+
* @param name The new name.
|
|
1200
|
+
*/
|
|
1201
|
+
public static rename(id: string, name: string): void;
|
|
1202
|
+
|
|
1203
|
+
/**
|
|
1204
|
+
* Adds a repository at the end of a workspace; one it already lists stays where it is.
|
|
1205
|
+
* @param id The workspace's id.
|
|
1206
|
+
* @param folder The repository's absolute folder.
|
|
1207
|
+
*/
|
|
1208
|
+
public static addFolder(id: string, folder: string): void;
|
|
1209
|
+
|
|
1210
|
+
/**
|
|
1211
|
+
* Takes repositories off a workspace.
|
|
1212
|
+
* @param id The workspace's id.
|
|
1213
|
+
* @param folders The repositories' absolute folders.
|
|
1214
|
+
*/
|
|
1215
|
+
public static removeFolders(id: string, folders: ReadonlySet<string>): void;
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
* Moves repositories one place up or down in a workspace's order, keeping their order among themselves.
|
|
1219
|
+
* @param id The workspace's id.
|
|
1220
|
+
* @param folders The repositories' absolute folders.
|
|
1221
|
+
* @param by -1 to move them up, 1 to move them down.
|
|
1222
|
+
*/
|
|
1223
|
+
public static moveFolders(id: string, folders: ReadonlySet<string>, by: -1 | 1): void;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
/**
|
|
1227
|
+
* The repositories opened lately, newest first, kept in the window's storage. The Git module's `git.openHistory` command puts the repository it
|
|
1228
|
+
* opens first, and the workspace page lists them as its open repositories.
|
|
1229
|
+
* @example
|
|
1230
|
+
* ```ts
|
|
1231
|
+
* import { computed, type Signal } from "@angular/core";
|
|
1232
|
+
* import { GitRecentRepositories } from "@noldova/git.window";
|
|
1233
|
+
*
|
|
1234
|
+
* export const current: Signal<string | null> = computed(() => GitRecentRepositories.recent()[0] ?? null);
|
|
1235
|
+
* ```
|
|
1236
|
+
*/
|
|
1237
|
+
export declare class GitRecentRepositories {
|
|
1238
|
+
/** The repositories' absolute folders, newest first, at most twenty. */
|
|
1239
|
+
public static readonly recent: Signal<readonly string[]>;
|
|
1240
|
+
|
|
1241
|
+
/** Reads the list kept in the window's storage again, keeping only its folders. */
|
|
1242
|
+
public static restore(): void;
|
|
1243
|
+
|
|
1244
|
+
/**
|
|
1245
|
+
* Puts a repository first, and drops the oldest past twenty.
|
|
1246
|
+
* @param folder The repository's absolute folder.
|
|
1247
|
+
*/
|
|
1248
|
+
public static remember(folder: string): void;
|
|
1249
|
+
|
|
1250
|
+
/**
|
|
1251
|
+
* Takes repositories off the list.
|
|
1252
|
+
* @param folders The repositories' absolute folders.
|
|
1253
|
+
*/
|
|
1254
|
+
public static forget(folders: ReadonlySet<string>): void;
|
|
1255
|
+
|
|
1256
|
+
/**
|
|
1257
|
+
* A folder's last name, which a list shows for its repository.
|
|
1258
|
+
* @param folder The repository's absolute folder.
|
|
1259
|
+
* @returns Its last name, or a fallback for a root.
|
|
1260
|
+
*/
|
|
1261
|
+
public static nameOf(folder: string): string;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
/**
|
|
1265
|
+
* The files a diff changes in a repository, as the commit detail shows them: a header with their count and the lines added and removed, a folder tree or
|
|
1266
|
+
* flat list, and each file's diff under its row once opened. It reads the diff from the repository through `git.diff`, so nothing leaves the machine; a
|
|
1267
|
+
* failed read shows Git's message. Inside the Git view it follows the view's file layout and offers its layout button; elsewhere it shows folders.
|
|
1268
|
+
* Its selector is `nol-git-diff-files`.
|
|
1269
|
+
* @example
|
|
1270
|
+
* ```ts
|
|
1271
|
+
* import { Component } from "@angular/core";
|
|
1272
|
+
* import { DiffScope, DiffScopeKind } from "@noldova/git.protocol";
|
|
1273
|
+
* import { GitDiffFilesComponent } from "@noldova/git.window";
|
|
1274
|
+
*
|
|
1275
|
+
* @Component({
|
|
1276
|
+
* selector: "app-pull-request-files",
|
|
1277
|
+
* imports: [GitDiffFilesComponent],
|
|
1278
|
+
* template: "<nol-git-diff-files [folder]=\"folder\" [scope]=\"scope\" />"
|
|
1279
|
+
* })
|
|
1280
|
+
* export class PullRequestFilesComponent {
|
|
1281
|
+
* protected readonly folder: string = "/home/a/repo";
|
|
1282
|
+
* protected readonly scope: DiffScope = new DiffScope(DiffScopeKind.Range, "0123456789abcdef0123456789abcdef01234567",
|
|
1283
|
+
* "9fceb02d0ae598e95dc970b74767f19372d61af8");
|
|
1284
|
+
* }
|
|
1285
|
+
* ```
|
|
1286
|
+
*/
|
|
1287
|
+
export declare class GitDiffFilesComponent {
|
|
1288
|
+
/**
|
|
1289
|
+
* Angular's factory for the component, as its compiler declares it.
|
|
1290
|
+
*/
|
|
1291
|
+
public static ɵfac: ɵɵFactoryDeclaration<GitDiffFilesComponent, never>;
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* Angular's metadata for the standalone component: its selector and its two required signal inputs, as its compiler declares it.
|
|
1295
|
+
*/
|
|
1296
|
+
public static ɵcmp: ɵɵComponentDeclaration<GitDiffFilesComponent, "nol-git-diff-files", never, {
|
|
1297
|
+
"folder": { "alias": "folder"; "required": true; "isSignal": true };
|
|
1298
|
+
"scope": { "alias": "scope"; "required": true; "isSignal": true };
|
|
1299
|
+
}, Record<string, never>, never, never, true, never>;
|
|
1300
|
+
|
|
1301
|
+
/**
|
|
1302
|
+
* The repository's folder, an absolute path of at most 4096 characters.
|
|
1303
|
+
*/
|
|
1304
|
+
public readonly folder: InputSignal<string>;
|
|
1305
|
+
|
|
1306
|
+
/**
|
|
1307
|
+
* The changes to show, such as a range between two commits; another scope reads again.
|
|
1308
|
+
*/
|
|
1309
|
+
public readonly scope: InputSignal<DiffScope>;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* A detail view beside the documents that shows what the active document of its kind chose, such as a work item or a conflict: the documents follow it
|
|
1314
|
+
* with their choice, it opens the view with `openView` and never `showView`, so the focus stays in the document, and the view draws what it shows.
|
|
1315
|
+
* A module keeps one for each window and view.
|
|
1316
|
+
* @example
|
|
1317
|
+
* ```ts
|
|
1318
|
+
* import { inject, Injector, type Signal } from "@angular/core";
|
|
1319
|
+
* import { type IWindowPartContext, WindowPartTokens } from "@noldova/desktop.window";
|
|
1320
|
+
* import { GitDetailView } from "@noldova/git.window";
|
|
1321
|
+
*
|
|
1322
|
+
* export function followNote(context: IWindowPartContext, note: Signal<string | null>): GitDetailView<string> {
|
|
1323
|
+
* const detail = new GitDetailView<string>(context, "notes.detail", "selected", t => `Note ${t}`);
|
|
1324
|
+
* detail.follow(note, inject(WindowPartTokens.activeDocument), inject(Injector));
|
|
1325
|
+
* return detail;
|
|
1326
|
+
* }
|
|
1327
|
+
* ```
|
|
1328
|
+
*/
|
|
1329
|
+
export declare class GitDetailView<T> {
|
|
1330
|
+
/**
|
|
1331
|
+
* The choice of the followed document that is the window's active document: `undefined` while none is, and `null` while it has nothing chosen.
|
|
1332
|
+
*/
|
|
1333
|
+
public readonly front: Signal<T | null | undefined>;
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* What the view shows: the front choice, kept while a document of another kind is in front, and `null` while the document in front has nothing
|
|
1337
|
+
* chosen or no followed document is open, when the view shows its empty state.
|
|
1338
|
+
*/
|
|
1339
|
+
public readonly shown: Signal<T | null>;
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* Whether the view is open since a choice opened it: `false` before, and once the person closed it, which `listen` hears; a document marks its
|
|
1343
|
+
* choice only while it is `true`.
|
|
1344
|
+
*/
|
|
1345
|
+
public readonly isOpen: Signal<boolean>;
|
|
1346
|
+
|
|
1347
|
+
/**
|
|
1348
|
+
* Makes the detail view for one window.
|
|
1349
|
+
* @param context The window part's context, which opens the view and hears it close.
|
|
1350
|
+
* @param view The view's name, a view with instances the module registered.
|
|
1351
|
+
* @param instance The view's one instance, which its tab opens with.
|
|
1352
|
+
* @param titleOf The tab's title for a choice.
|
|
1353
|
+
* @param isBroughtForward Whether a followed document coming to the front brings the view forward; `false` for a view that stays where the person put
|
|
1354
|
+
* it, which only `showInFront` and `bringForward` open. `true` when left out.
|
|
1355
|
+
*/
|
|
1356
|
+
public constructor(context: IWindowPartContext, view: string, instance: string, titleOf: (choice: T) => string, isBroughtForward?: boolean);
|
|
1357
|
+
|
|
1358
|
+
/**
|
|
1359
|
+
* Adds a document's choice while it is open. The document coming to the front with a choice, or showing its first choice while in front, brings the
|
|
1360
|
+
* view to the front of its group with `openView`; a read again that keeps a choice moves nothing. While the view is open, the person leaving the
|
|
1361
|
+
* followed documents for another kind gives the view's group its front back with `returnView`.
|
|
1362
|
+
* @param choice What the document chose, or `null` for nothing.
|
|
1363
|
+
* @param active Whether the document is the window's active document, such as `WindowPartTokens.activeDocument`.
|
|
1364
|
+
* @param injector The document's injector: the document is removed once it is destroyed, and the view reacts in its context.
|
|
1365
|
+
*/
|
|
1366
|
+
public follow(choice: Signal<T | null>, active: Signal<boolean>, injector: Injector): void;
|
|
1367
|
+
|
|
1368
|
+
/**
|
|
1369
|
+
* Opens the view, without moving the focus, for a choice the person made, and while it is open brings its tab to the front of its group again,
|
|
1370
|
+
* retitled for the choice.
|
|
1371
|
+
* @param choice The choice, which titles the tab.
|
|
1372
|
+
*/
|
|
1373
|
+
public showInFront(choice: T): void;
|
|
1374
|
+
|
|
1375
|
+
/**
|
|
1376
|
+
* Brings the view to the front of its group, without moving the focus, for the choice of the followed document in front, titled for it; with none,
|
|
1377
|
+
* the next followed document in front with a choice brings it.
|
|
1378
|
+
*/
|
|
1379
|
+
public bringForward(): void;
|
|
1380
|
+
|
|
1381
|
+
/**
|
|
1382
|
+
* Follows the person closing the view, so their next choice opens it again; the window part calls it once it registered the view.
|
|
1383
|
+
* @returns A function that stops following, which the window part calls when it deactivates.
|
|
1384
|
+
*/
|
|
1385
|
+
public listen(): () => void;
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
/**
|
|
1389
|
+
* A pull request page's Commits tab: the pull request's commits with their short id, subject, author and age. A commit opens in the repository's history when
|
|
1390
|
+
* the open repository is the pull request's, and on the host's page otherwise.
|
|
1391
|
+
* Its selector is `nol-git-pull-request-commits`; a host module's pull request page shows it as a tab and gives it the host's reads through `host`.
|
|
1392
|
+
* @example
|
|
1393
|
+
* ```ts
|
|
1394
|
+
* import { Component } from "@angular/core";
|
|
1395
|
+
* import { HostReference } from "@noldova/git.hosting.protocol";
|
|
1396
|
+
* import { GitPullRequestCommitsComponent, type IGitPullRequestHost } from "@noldova/git.window";
|
|
1397
|
+
*
|
|
1398
|
+
* @Component({
|
|
1399
|
+
* selector: "app-pull-request-tab",
|
|
1400
|
+
* imports: [GitPullRequestCommitsComponent],
|
|
1401
|
+
* template: "<nol-git-pull-request-commits [host]=\"host\" [reference]=\"reference\" [url]=\"url\" (counted)=\"count = $event\" />"
|
|
1402
|
+
* })
|
|
1403
|
+
* export class PullRequestTabComponent {
|
|
1404
|
+
* protected readonly host: IGitPullRequestHost = {
|
|
1405
|
+
* name: "Example", readCommitsMethod: "example.readPullRequestCommits", readChangesMethod: "example.readPullRequestChanges",
|
|
1406
|
+
* readConflictsMethod: "example.readPullRequestConflicts", readThreadsMethod: "example.readPullRequestThreads", replyToThreadMethod: null,
|
|
1407
|
+
* changeThreadMethod: null, localFolderAsync: async () => null, commitPageOf: (url, commitId) => `${url}/commits/${commitId}`, personAvatarOf: () => null
|
|
1408
|
+
* };
|
|
1409
|
+
* protected readonly reference: HostReference = new HostReference("example", "octocat", "hello-world", 7);
|
|
1410
|
+
* protected readonly url: string = "https://example.com/octocat/hello-world/pulls/7";
|
|
1411
|
+
* protected count: string = "";
|
|
1412
|
+
* }
|
|
1413
|
+
* ```
|
|
1414
|
+
*/
|
|
1415
|
+
export declare class GitPullRequestCommitsComponent {
|
|
1416
|
+
/**
|
|
1417
|
+
* Angular's factory for the component, as its compiler declares it.
|
|
1418
|
+
*/
|
|
1419
|
+
public static ɵfac: ɵɵFactoryDeclaration<GitPullRequestCommitsComponent, never>;
|
|
1420
|
+
|
|
1421
|
+
/**
|
|
1422
|
+
* Angular's metadata for the standalone component: its selector, its required signal inputs and its output, as its compiler declares it.
|
|
1423
|
+
*/
|
|
1424
|
+
public static ɵcmp: ɵɵComponentDeclaration<GitPullRequestCommitsComponent, "nol-git-pull-request-commits", never, {
|
|
1425
|
+
"host": { "alias": "host"; "required": true; "isSignal": true };
|
|
1426
|
+
"reference": { "alias": "reference"; "required": true; "isSignal": true };
|
|
1427
|
+
"url": { "alias": "url"; "required": true; "isSignal": true };
|
|
1428
|
+
}, { "counted": "counted" }, never, never, true, never>;
|
|
1429
|
+
|
|
1430
|
+
/**
|
|
1431
|
+
* The host that reads the tab's list and finds the pull request's repository on this computer.
|
|
1432
|
+
*/
|
|
1433
|
+
public readonly host: InputSignal<IGitPullRequestHost>;
|
|
1434
|
+
|
|
1435
|
+
/**
|
|
1436
|
+
* The pull request, by its host module's id, its repository and its number; another pull request reads again.
|
|
1437
|
+
*/
|
|
1438
|
+
public readonly reference: InputSignal<HostReference>;
|
|
1439
|
+
|
|
1440
|
+
/**
|
|
1441
|
+
* The pull request's page on its host, which the host reads to find the pull request's repository here.
|
|
1442
|
+
*/
|
|
1443
|
+
public readonly url: InputSignal<string>;
|
|
1444
|
+
|
|
1445
|
+
/**
|
|
1446
|
+
* The tab's count once read, such as `12`, or `250+` when the host has more than it shows.
|
|
1447
|
+
*/
|
|
1448
|
+
public readonly counted: OutputEmitterRef<string>;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
/**
|
|
1452
|
+
* A line of a file in a pull request's latest push, such as a comment thread's, which the pull request page's Files tab shows through its `reveal` input.
|
|
1453
|
+
* @example
|
|
1454
|
+
* ```ts
|
|
1455
|
+
* import { GitFileLine } from "@noldova/git.window";
|
|
1456
|
+
*
|
|
1457
|
+
* export const line: GitFileLine = new GitFileLine("src/app.ts", 42);
|
|
1458
|
+
* ```
|
|
1459
|
+
*/
|
|
1460
|
+
export declare class GitFileLine {
|
|
1461
|
+
/** The file's path from the repository's root, with `/` between folders and no leading `/`, such as `src/app.ts`. */
|
|
1462
|
+
public readonly path: string;
|
|
1463
|
+
/** The line's number in the file as the push leaves it, from 1. */
|
|
1464
|
+
public readonly line: number;
|
|
1465
|
+
|
|
1466
|
+
public constructor(path: string, line: number);
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
/**
|
|
1470
|
+
* A pull request page's Files tab: the files its latest push changes. When the open repository is the pull request's and has that push's commits, it shows the
|
|
1471
|
+
* changes from local Git; otherwise it lists the paths the host names, never their contents, with a Fetch for a repository that lacks the commits.
|
|
1472
|
+
* Its selector is `nol-git-pull-request-files`; a host module's pull request page shows it as a tab and gives it the host's reads through `host`.
|
|
1473
|
+
* @example
|
|
1474
|
+
* ```ts
|
|
1475
|
+
* import { Component } from "@angular/core";
|
|
1476
|
+
* import { HostReference } from "@noldova/git.hosting.protocol";
|
|
1477
|
+
* import { GitPullRequestFilesComponent, type IGitPullRequestHost } from "@noldova/git.window";
|
|
1478
|
+
*
|
|
1479
|
+
* @Component({
|
|
1480
|
+
* selector: "app-pull-request-tab",
|
|
1481
|
+
* imports: [GitPullRequestFilesComponent],
|
|
1482
|
+
* template: "<nol-git-pull-request-files [host]=\"host\" [reference]=\"reference\" [url]=\"url\" (counted)=\"count = $event\" />"
|
|
1483
|
+
* })
|
|
1484
|
+
* export class PullRequestTabComponent {
|
|
1485
|
+
* protected readonly host: IGitPullRequestHost = {
|
|
1486
|
+
* name: "Example", readCommitsMethod: "example.readPullRequestCommits", readChangesMethod: "example.readPullRequestChanges",
|
|
1487
|
+
* readConflictsMethod: "example.readPullRequestConflicts", readThreadsMethod: "example.readPullRequestThreads", replyToThreadMethod: null,
|
|
1488
|
+
* changeThreadMethod: null, localFolderAsync: async () => null, commitPageOf: (url, commitId) => `${url}/commits/${commitId}`, personAvatarOf: () => null
|
|
1489
|
+
* };
|
|
1490
|
+
* protected readonly reference: HostReference = new HostReference("example", "octocat", "hello-world", 7);
|
|
1491
|
+
* protected readonly url: string = "https://example.com/octocat/hello-world/pulls/7";
|
|
1492
|
+
* protected count: string = "";
|
|
1493
|
+
* }
|
|
1494
|
+
* ```
|
|
1495
|
+
*/
|
|
1496
|
+
export declare class GitPullRequestFilesComponent {
|
|
1497
|
+
/**
|
|
1498
|
+
* Angular's factory for the component, as its compiler declares it.
|
|
1499
|
+
*/
|
|
1500
|
+
public static ɵfac: ɵɵFactoryDeclaration<GitPullRequestFilesComponent, never>;
|
|
1501
|
+
|
|
1502
|
+
/**
|
|
1503
|
+
* Angular's metadata for the standalone component: its selector, its required signal inputs and its output, as its compiler declares it.
|
|
1504
|
+
*/
|
|
1505
|
+
public static ɵcmp: ɵɵComponentDeclaration<GitPullRequestFilesComponent, "nol-git-pull-request-files", never, {
|
|
1506
|
+
"host": { "alias": "host"; "required": true; "isSignal": true };
|
|
1507
|
+
"reference": { "alias": "reference"; "required": true; "isSignal": true };
|
|
1508
|
+
"url": { "alias": "url"; "required": true; "isSignal": true };
|
|
1509
|
+
"answer": { "alias": "answer"; "required": false; "isSignal": true };
|
|
1510
|
+
"reveal": { "alias": "reveal"; "required": false; "isSignal": true };
|
|
1511
|
+
}, { "counted": "counted"; "unrevealed": "unrevealed" }, never, never, true, never>;
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* The host that reads the tab's list and finds the pull request's repository on this computer.
|
|
1515
|
+
*/
|
|
1516
|
+
public readonly host: InputSignal<IGitPullRequestHost>;
|
|
1517
|
+
|
|
1518
|
+
/**
|
|
1519
|
+
* The pull request, by its host module's id, its repository and its number; another pull request reads again.
|
|
1520
|
+
*/
|
|
1521
|
+
public readonly reference: InputSignal<HostReference>;
|
|
1522
|
+
|
|
1523
|
+
/**
|
|
1524
|
+
* The pull request's page on its host, which the host reads to find the pull request's repository here.
|
|
1525
|
+
*/
|
|
1526
|
+
public readonly url: InputSignal<string>;
|
|
1527
|
+
|
|
1528
|
+
/**
|
|
1529
|
+
* The files as the page already read them through `host.readChangesMethod`, such as to count them before the tab opens, which the tab's first read shows
|
|
1530
|
+
* instead of asking again; `null`, the default, to ask. Try again and another pull request ask anew.
|
|
1531
|
+
*/
|
|
1532
|
+
public readonly answer: InputSignal<HostPullRequestFiles | null>;
|
|
1533
|
+
|
|
1534
|
+
/**
|
|
1535
|
+
* A line to show once the tab has read, such as a comment thread's: the changes from local Git open its file and mark and scroll to the line, or to the file
|
|
1536
|
+
* when no hunk shows it. `null`, the default, shows none; another `GitFileLine` shows again.
|
|
1537
|
+
*/
|
|
1538
|
+
public readonly reveal: InputSignal<GitFileLine | null>;
|
|
1539
|
+
|
|
1540
|
+
/**
|
|
1541
|
+
* The tab's count once read, such as `12`, or `250+` when the host has more than it shows.
|
|
1542
|
+
*/
|
|
1543
|
+
public readonly counted: OutputEmitterRef<string>;
|
|
1544
|
+
|
|
1545
|
+
/**
|
|
1546
|
+
* A line given in `reveal` that the tab can't show, as the changes from local Git aren't here or don't hold its file, so the page can show it on the host.
|
|
1547
|
+
*/
|
|
1548
|
+
public readonly unrevealed: OutputEmitterRef<GitFileLine>;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
* A pull request page's Conflicts tab: the paths of the files that keep it from merging. When the open repository is the pull request's and is merging on its
|
|
1553
|
+
* source or target branch, a row opens that repository's Conflicts screen; otherwise rows are plain paths.
|
|
1554
|
+
* Its selector is `nol-git-pull-request-conflicts`; a host module's pull request page shows it as a tab and gives it the host's reads through `host`.
|
|
1555
|
+
* @example
|
|
1556
|
+
* ```ts
|
|
1557
|
+
* import { Component } from "@angular/core";
|
|
1558
|
+
* import { type HostChanges, HostReference } from "@noldova/git.hosting.protocol";
|
|
1559
|
+
* import { GitPullRequestConflictsComponent, type IGitPullRequestHost } from "@noldova/git.window";
|
|
1560
|
+
*
|
|
1561
|
+
* @Component({
|
|
1562
|
+
* selector: "app-pull-request-tab",
|
|
1563
|
+
* imports: [GitPullRequestConflictsComponent],
|
|
1564
|
+
* template: "<nol-git-pull-request-conflicts [host]=\"host\" [reference]=\"reference\" [url]=\"url\" [changes]=\"changes\" (counted)=\"count = $event\" />"
|
|
1565
|
+
* })
|
|
1566
|
+
* export class PullRequestTabComponent {
|
|
1567
|
+
* protected readonly host: IGitPullRequestHost = {
|
|
1568
|
+
* name: "Example", readCommitsMethod: "example.readPullRequestCommits", readChangesMethod: "example.readPullRequestChanges",
|
|
1569
|
+
* readConflictsMethod: "example.readPullRequestConflicts", readThreadsMethod: "example.readPullRequestThreads", replyToThreadMethod: null,
|
|
1570
|
+
* changeThreadMethod: null, localFolderAsync: async () => null, commitPageOf: (url, commitId) => `${url}/commits/${commitId}`, personAvatarOf: () => null
|
|
1571
|
+
* };
|
|
1572
|
+
* protected readonly reference: HostReference = new HostReference("example", "octocat", "hello-world", 7);
|
|
1573
|
+
* protected readonly url: string = "https://example.com/octocat/hello-world/pulls/7";
|
|
1574
|
+
* protected readonly changes: HostChanges | null = null;
|
|
1575
|
+
* protected count: string = "";
|
|
1576
|
+
* }
|
|
1577
|
+
* ```
|
|
1578
|
+
*/
|
|
1579
|
+
export declare class GitPullRequestConflictsComponent {
|
|
1580
|
+
/**
|
|
1581
|
+
* Angular's factory for the component, as its compiler declares it.
|
|
1582
|
+
*/
|
|
1583
|
+
public static ɵfac: ɵɵFactoryDeclaration<GitPullRequestConflictsComponent, never>;
|
|
1584
|
+
|
|
1585
|
+
/**
|
|
1586
|
+
* Angular's metadata for the standalone component: its selector, its required signal inputs and its output, as its compiler declares it.
|
|
1587
|
+
*/
|
|
1588
|
+
public static ɵcmp: ɵɵComponentDeclaration<GitPullRequestConflictsComponent, "nol-git-pull-request-conflicts", never, {
|
|
1589
|
+
"host": { "alias": "host"; "required": true; "isSignal": true };
|
|
1590
|
+
"reference": { "alias": "reference"; "required": true; "isSignal": true };
|
|
1591
|
+
"url": { "alias": "url"; "required": true; "isSignal": true };
|
|
1592
|
+
"changes": { "alias": "changes"; "required": true; "isSignal": true };
|
|
1593
|
+
}, { "counted": "counted" }, never, never, true, never>;
|
|
1594
|
+
|
|
1595
|
+
/**
|
|
1596
|
+
* The host that reads the tab's list and finds the pull request's repository on this computer.
|
|
1597
|
+
*/
|
|
1598
|
+
public readonly host: InputSignal<IGitPullRequestHost>;
|
|
1599
|
+
|
|
1600
|
+
/**
|
|
1601
|
+
* The pull request, by its host module's id, its repository and its number; another pull request reads again.
|
|
1602
|
+
*/
|
|
1603
|
+
public readonly reference: InputSignal<HostReference>;
|
|
1604
|
+
|
|
1605
|
+
/**
|
|
1606
|
+
* The pull request's page on its host, which the host reads to find the pull request's repository here.
|
|
1607
|
+
*/
|
|
1608
|
+
public readonly url: InputSignal<string>;
|
|
1609
|
+
|
|
1610
|
+
/**
|
|
1611
|
+
* The pull request's branches, whose merge the open repository may be in; `null` when the host didn't say.
|
|
1612
|
+
*/
|
|
1613
|
+
public readonly changes: InputSignal<HostChanges | null>;
|
|
1614
|
+
|
|
1615
|
+
/**
|
|
1616
|
+
* The tab's count once read, such as `12`, or `250+` when the host has more than it shows.
|
|
1617
|
+
*/
|
|
1618
|
+
public readonly counted: OutputEmitterRef<string>;
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
/**
|
|
1622
|
+
* A comment thread on a line of a file, whose Go to line the person clicked in `GitPullRequestThreadsComponent`.
|
|
1623
|
+
* @example
|
|
1624
|
+
* ```ts
|
|
1625
|
+
* import { ThreadLine } from "@noldova/git.window";
|
|
1626
|
+
*
|
|
1627
|
+
* export const line: ThreadLine = new ThreadLine(3, "/src/app.ts", 42);
|
|
1628
|
+
* ```
|
|
1629
|
+
*/
|
|
1630
|
+
export declare class ThreadLine {
|
|
1631
|
+
/** The thread's id on its host. */
|
|
1632
|
+
public readonly threadId: number;
|
|
1633
|
+
/** The file's path as its host names it, such as Azure DevOps's `/src/app.ts` with a leading slash or GitHub's `src/app.ts`. */
|
|
1634
|
+
public readonly path: string;
|
|
1635
|
+
/** The line's number in the file, from 1. */
|
|
1636
|
+
public readonly line: number;
|
|
1637
|
+
|
|
1638
|
+
public constructor(threadId: number, path: string, line: number);
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
/**
|
|
1642
|
+
* A pull request page's comment threads, oldest first: each thread's head with its state, the file's name and line, its full path as the tooltip and Go to
|
|
1643
|
+
* line for a thread on a line, then its comments with their author's picture, time and Markdown, a reply set in from the comment it answers. A resolved,
|
|
1644
|
+
* won't-fix, by-design or closed thread folds to its first comment until it is opened, and the head counts the active and pending threads. Under an open
|
|
1645
|
+
* thread, Reply and Resolve or Reactivate write through the host, each only when the host has its method, with no answer row when it has neither; resolving
|
|
1646
|
+
* the last open thread of a pull request that completes by itself asks first. When the host keeps older comments than it answered, the threads say so.
|
|
1647
|
+
* Its selector is `nol-git-pull-request-threads`; a host module's pull request page shows it and gives it the host's reads and writes through `host`.
|
|
1648
|
+
* @example
|
|
1649
|
+
* ```ts
|
|
1650
|
+
* import { Component } from "@angular/core";
|
|
1651
|
+
* import { HostReference } from "@noldova/git.hosting.protocol";
|
|
1652
|
+
* import { GitPullRequestThreadsComponent, type IGitPullRequestHost, type ThreadLine } from "@noldova/git.window";
|
|
1653
|
+
*
|
|
1654
|
+
* @Component({
|
|
1655
|
+
* selector: "app-pull-request-threads",
|
|
1656
|
+
* imports: [GitPullRequestThreadsComponent],
|
|
1657
|
+
* template: "<nol-git-pull-request-threads [host]=\"host\" [reference]=\"reference\" (goToLine)=\"line = $event\" />"
|
|
1658
|
+
* })
|
|
1659
|
+
* export class PullRequestThreadsComponent {
|
|
1660
|
+
* protected readonly host: IGitPullRequestHost = {
|
|
1661
|
+
* name: "Example", readCommitsMethod: "example.readPullRequestCommits", readChangesMethod: "example.readPullRequestChanges",
|
|
1662
|
+
* readConflictsMethod: "example.readPullRequestConflicts", readThreadsMethod: "example.readPullRequestThreads", replyToThreadMethod: null,
|
|
1663
|
+
* changeThreadMethod: null, localFolderAsync: async () => null, commitPageOf: (url, commitId) => `${url}/commits/${commitId}`, personAvatarOf: () => null
|
|
1664
|
+
* };
|
|
1665
|
+
* protected readonly reference: HostReference = new HostReference("example", "octocat", "hello-world", 7);
|
|
1666
|
+
* protected line: ThreadLine | null = null;
|
|
1667
|
+
* }
|
|
1668
|
+
* ```
|
|
1669
|
+
*/
|
|
1670
|
+
export declare class GitPullRequestThreadsComponent {
|
|
1671
|
+
/**
|
|
1672
|
+
* Angular's factory for the component, as its compiler declares it.
|
|
1673
|
+
*/
|
|
1674
|
+
public static ɵfac: ɵɵFactoryDeclaration<GitPullRequestThreadsComponent, never>;
|
|
1675
|
+
|
|
1676
|
+
/**
|
|
1677
|
+
* Angular's metadata for the standalone component: its selector, its signal inputs and its outputs, as its compiler declares it.
|
|
1678
|
+
*/
|
|
1679
|
+
public static ɵcmp: ɵɵComponentDeclaration<GitPullRequestThreadsComponent, "nol-git-pull-request-threads", never, {
|
|
1680
|
+
"host": { "alias": "host"; "required": true; "isSignal": true };
|
|
1681
|
+
"reference": { "alias": "reference"; "required": true; "isSignal": true };
|
|
1682
|
+
"isAutoComplete": { "alias": "isAutoComplete"; "required": false; "isSignal": true };
|
|
1683
|
+
"references": { "alias": "references"; "required": false; "isSignal": true };
|
|
1684
|
+
}, { "linkOpen": "linkOpen"; "goToLine": "goToLine" }, never, never, true, never>;
|
|
1685
|
+
|
|
1686
|
+
/**
|
|
1687
|
+
* The host that reads the threads, writes replies and changes, if it does, and finds each comment author's picture.
|
|
1688
|
+
*/
|
|
1689
|
+
public readonly host: InputSignal<IGitPullRequestHost>;
|
|
1690
|
+
|
|
1691
|
+
/**
|
|
1692
|
+
* The pull request whose comment threads it shows; another pull request reads again.
|
|
1693
|
+
*/
|
|
1694
|
+
public readonly reference: InputSignal<HostReference>;
|
|
1695
|
+
|
|
1696
|
+
/**
|
|
1697
|
+
* Whether the pull request completes by itself once its policies pass, so resolving its last open thread may merge it; `false` by default.
|
|
1698
|
+
*/
|
|
1699
|
+
public readonly isAutoComplete: InputSignal<boolean>;
|
|
1700
|
+
|
|
1701
|
+
/**
|
|
1702
|
+
* Finds the references the comments write, such as `AB#12` and `!8`, and shows them as chips; `null`, the default, shows the comments as they're written.
|
|
1703
|
+
*/
|
|
1704
|
+
public readonly references: InputSignal<ILinkReferenceSource | null>;
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* A link a comment's Markdown asks to open, with the gesture that opened it.
|
|
1708
|
+
*/
|
|
1709
|
+
public readonly linkOpen: OutputEmitterRef<LinkOpenEvent>;
|
|
1710
|
+
|
|
1711
|
+
/**
|
|
1712
|
+
* A thread on a file's line whose Go to line the person clicked, for the page to show that line.
|
|
1713
|
+
*/
|
|
1714
|
+
public readonly goToLine: OutputEmitterRef<ThreadLine>;
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
/**
|
|
1718
|
+
* Lets another module's page show a commit in a repository's history, such as a commit that names a work item.
|
|
1719
|
+
*/
|
|
1720
|
+
export declare class GitHistorySelection {
|
|
1721
|
+
/**
|
|
1722
|
+
* Opens the repository's history through the `git.openHistory` command and selects the commit there, scrolled into view, once the history has read
|
|
1723
|
+
* it; a history whose loaded commits don't hold it says so instead. A later ask replaces one the history hasn't taken yet.
|
|
1724
|
+
* @param context The asking window part's context, which runs the command.
|
|
1725
|
+
* @param folder The repository's folder, an absolute path of at most 4096 characters.
|
|
1726
|
+
* @param commitId The commit's full id.
|
|
1727
|
+
* @returns A promise that settles once the history is open.
|
|
1728
|
+
* @throws Rejects as the command does, such as when the Git module isn't active.
|
|
1729
|
+
* @example
|
|
1730
|
+
* ```ts
|
|
1731
|
+
* import type { IWindowPartContext } from "@noldova/desktop.window";
|
|
1732
|
+
* import { GitHistorySelection } from "@noldova/git.window";
|
|
1733
|
+
*
|
|
1734
|
+
* export function showCommit(context: IWindowPartContext, folder: string, commitId: string): Promise<void> {
|
|
1735
|
+
* return GitHistorySelection.selectAsync(context, folder, commitId);
|
|
1736
|
+
* }
|
|
1737
|
+
* ```
|
|
1738
|
+
*/
|
|
1739
|
+
public static selectAsync(context: IWindowPartContext, folder: string, commitId: string): Promise<void>;
|
|
1740
|
+
}
|
|
1741
|
+
|
|
165
1742
|
/**
|
|
166
1743
|
* The Git module's window part, which Noldova Desktop activates in each window; it registers the Git view, `git.view`, in the right dock.
|
|
167
1744
|
*
|