@software-dlc/cli 0.157.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/LICENSE +105 -0
- package/README.md +31 -0
- package/dist/checkout.d.ts +43 -0
- package/dist/checkout.d.ts.map +1 -0
- package/dist/checkout.js +92 -0
- package/dist/checkout.js.map +1 -0
- package/dist/cli-arguments.d.ts +13 -0
- package/dist/cli-arguments.d.ts.map +1 -0
- package/dist/cli-arguments.js +67 -0
- package/dist/cli-arguments.js.map +1 -0
- package/dist/cli-branch-history.d.ts +48 -0
- package/dist/cli-branch-history.d.ts.map +1 -0
- package/dist/cli-branch-history.js +319 -0
- package/dist/cli-branch-history.js.map +1 -0
- package/dist/cli-branches.d.ts +22 -0
- package/dist/cli-branches.d.ts.map +1 -0
- package/dist/cli-branches.js +59 -0
- package/dist/cli-branches.js.map +1 -0
- package/dist/cli-deploy.d.ts +14 -0
- package/dist/cli-deploy.d.ts.map +1 -0
- package/dist/cli-deploy.js +164 -0
- package/dist/cli-deploy.js.map +1 -0
- package/dist/cli-health.d.ts +3 -0
- package/dist/cli-health.d.ts.map +1 -0
- package/dist/cli-health.js +73 -0
- package/dist/cli-health.js.map +1 -0
- package/dist/cli-help.d.ts +21 -0
- package/dist/cli-help.d.ts.map +1 -0
- package/dist/cli-help.js +176 -0
- package/dist/cli-help.js.map +1 -0
- package/dist/cli-login.d.ts +76 -0
- package/dist/cli-login.d.ts.map +1 -0
- package/dist/cli-login.js +634 -0
- package/dist/cli-login.js.map +1 -0
- package/dist/cli-operation.d.ts +2 -0
- package/dist/cli-operation.d.ts.map +1 -0
- package/dist/cli-operation.js +66 -0
- package/dist/cli-operation.js.map +1 -0
- package/dist/cli-org.d.ts +12 -0
- package/dist/cli-org.d.ts.map +1 -0
- package/dist/cli-org.js +218 -0
- package/dist/cli-org.js.map +1 -0
- package/dist/cli-rebuild.d.ts +20 -0
- package/dist/cli-rebuild.d.ts.map +1 -0
- package/dist/cli-rebuild.js +29 -0
- package/dist/cli-rebuild.js.map +1 -0
- package/dist/cli-reset.d.ts +27 -0
- package/dist/cli-reset.d.ts.map +1 -0
- package/dist/cli-reset.js +44 -0
- package/dist/cli-reset.js.map +1 -0
- package/dist/cli-snapshot.d.ts +398 -0
- package/dist/cli-snapshot.d.ts.map +1 -0
- package/dist/cli-snapshot.js +45 -0
- package/dist/cli-snapshot.js.map +1 -0
- package/dist/cli-task-context.d.ts +3 -0
- package/dist/cli-task-context.d.ts.map +1 -0
- package/dist/cli-task-context.js +112 -0
- package/dist/cli-task-context.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +1004 -0
- package/dist/cli.js.map +1 -0
- package/dist/graph-packages-lock.d.ts +169 -0
- package/dist/graph-packages-lock.d.ts.map +1 -0
- package/dist/graph-packages-lock.js +503 -0
- package/dist/graph-packages-lock.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/local/aggregate-preflight.d.ts +12 -0
- package/dist/local/aggregate-preflight.d.ts.map +1 -0
- package/dist/local/aggregate-preflight.js +22 -0
- package/dist/local/aggregate-preflight.js.map +1 -0
- package/dist/local/allow-mcp.d.ts +77 -0
- package/dist/local/allow-mcp.d.ts.map +1 -0
- package/dist/local/allow-mcp.js +394 -0
- package/dist/local/allow-mcp.js.map +1 -0
- package/dist/local/api-client.d.ts +15 -0
- package/dist/local/api-client.d.ts.map +1 -0
- package/dist/local/api-client.js +87 -0
- package/dist/local/api-client.js.map +1 -0
- package/dist/local/app-contract-readers.d.ts +229 -0
- package/dist/local/app-contract-readers.d.ts.map +1 -0
- package/dist/local/app-contract-readers.js +450 -0
- package/dist/local/app-contract-readers.js.map +1 -0
- package/dist/local/app-org-reader.d.ts +21 -0
- package/dist/local/app-org-reader.d.ts.map +1 -0
- package/dist/local/app-org-reader.js +66 -0
- package/dist/local/app-org-reader.js.map +1 -0
- package/dist/local/app-shell-readers.d.ts +96 -0
- package/dist/local/app-shell-readers.d.ts.map +1 -0
- package/dist/local/app-shell-readers.js +381 -0
- package/dist/local/app-shell-readers.js.map +1 -0
- package/dist/local/app-tasks-read.d.ts +202 -0
- package/dist/local/app-tasks-read.d.ts.map +1 -0
- package/dist/local/app-tasks-read.js +290 -0
- package/dist/local/app-tasks-read.js.map +1 -0
- package/dist/local/app-worktrees.d.ts +69 -0
- package/dist/local/app-worktrees.d.ts.map +1 -0
- package/dist/local/app-worktrees.js +554 -0
- package/dist/local/app-worktrees.js.map +1 -0
- package/dist/local/base-sync-manifest.d.ts +12 -0
- package/dist/local/base-sync-manifest.d.ts.map +1 -0
- package/dist/local/base-sync-manifest.js +57 -0
- package/dist/local/base-sync-manifest.js.map +1 -0
- package/dist/local/blast-radius.d.ts +191 -0
- package/dist/local/blast-radius.d.ts.map +1 -0
- package/dist/local/blast-radius.js +585 -0
- package/dist/local/blast-radius.js.map +1 -0
- package/dist/local/canonical.d.ts +2 -0
- package/dist/local/canonical.d.ts.map +1 -0
- package/dist/local/canonical.js +2 -0
- package/dist/local/canonical.js.map +1 -0
- package/dist/local/config.d.ts +22 -0
- package/dist/local/config.d.ts.map +1 -0
- package/dist/local/config.js +57 -0
- package/dist/local/config.js.map +1 -0
- package/dist/local/document-commands.d.ts +163 -0
- package/dist/local/document-commands.d.ts.map +1 -0
- package/dist/local/document-commands.js +620 -0
- package/dist/local/document-commands.js.map +1 -0
- package/dist/local/document-embeds.d.ts +21 -0
- package/dist/local/document-embeds.d.ts.map +1 -0
- package/dist/local/document-embeds.js +38 -0
- package/dist/local/document-embeds.js.map +1 -0
- package/dist/local/environment-context.d.ts +39 -0
- package/dist/local/environment-context.d.ts.map +1 -0
- package/dist/local/environment-context.js +193 -0
- package/dist/local/environment-context.js.map +1 -0
- package/dist/local/environment-exclude.d.ts +7 -0
- package/dist/local/environment-exclude.d.ts.map +1 -0
- package/dist/local/environment-exclude.js +82 -0
- package/dist/local/environment-exclude.js.map +1 -0
- package/dist/local/environment-sidecar.d.ts +126 -0
- package/dist/local/environment-sidecar.d.ts.map +1 -0
- package/dist/local/environment-sidecar.js +442 -0
- package/dist/local/environment-sidecar.js.map +1 -0
- package/dist/local/environment-switch.d.ts +22 -0
- package/dist/local/environment-switch.d.ts.map +1 -0
- package/dist/local/environment-switch.js +385 -0
- package/dist/local/environment-switch.js.map +1 -0
- package/dist/local/exact-remote-projection.d.ts +17 -0
- package/dist/local/exact-remote-projection.d.ts.map +1 -0
- package/dist/local/exact-remote-projection.js +53 -0
- package/dist/local/exact-remote-projection.js.map +1 -0
- package/dist/local/experimental/path-object-store.d.ts +66 -0
- package/dist/local/experimental/path-object-store.d.ts.map +1 -0
- package/dist/local/experimental/path-object-store.js +135 -0
- package/dist/local/experimental/path-object-store.js.map +1 -0
- package/dist/local/external-worktree-binding.d.ts +21 -0
- package/dist/local/external-worktree-binding.d.ts.map +1 -0
- package/dist/local/external-worktree-binding.js +56 -0
- package/dist/local/external-worktree-binding.js.map +1 -0
- package/dist/local/folder-members.d.ts +34 -0
- package/dist/local/folder-members.d.ts.map +1 -0
- package/dist/local/folder-members.js +168 -0
- package/dist/local/folder-members.js.map +1 -0
- package/dist/local/git-ref-authority.d.ts +11 -0
- package/dist/local/git-ref-authority.d.ts.map +1 -0
- package/dist/local/git-ref-authority.js +76 -0
- package/dist/local/git-ref-authority.js.map +1 -0
- package/dist/local/git.d.ts +88 -0
- package/dist/local/git.d.ts.map +1 -0
- package/dist/local/git.js +413 -0
- package/dist/local/git.js.map +1 -0
- package/dist/local/graph-read.d.ts +168 -0
- package/dist/local/graph-read.d.ts.map +1 -0
- package/dist/local/graph-read.js +360 -0
- package/dist/local/graph-read.js.map +1 -0
- package/dist/local/graph-sync.d.ts +39 -0
- package/dist/local/graph-sync.d.ts.map +1 -0
- package/dist/local/graph-sync.js +186 -0
- package/dist/local/graph-sync.js.map +1 -0
- package/dist/local/guide-commands.d.ts +79 -0
- package/dist/local/guide-commands.d.ts.map +1 -0
- package/dist/local/guide-commands.js +247 -0
- package/dist/local/guide-commands.js.map +1 -0
- package/dist/local/health-files.d.ts +24 -0
- package/dist/local/health-files.d.ts.map +1 -0
- package/dist/local/health-files.js +133 -0
- package/dist/local/health-files.js.map +1 -0
- package/dist/local/health-inspection.d.ts +12 -0
- package/dist/local/health-inspection.d.ts.map +1 -0
- package/dist/local/health-inspection.js +407 -0
- package/dist/local/health-inspection.js.map +1 -0
- package/dist/local/health-policy.d.ts +11 -0
- package/dist/local/health-policy.d.ts.map +1 -0
- package/dist/local/health-policy.js +257 -0
- package/dist/local/health-policy.js.map +1 -0
- package/dist/local/health-projection.d.ts +14 -0
- package/dist/local/health-projection.d.ts.map +1 -0
- package/dist/local/health-projection.js +102 -0
- package/dist/local/health-projection.js.map +1 -0
- package/dist/local/health-schema.d.ts +338 -0
- package/dist/local/health-schema.d.ts.map +1 -0
- package/dist/local/health-schema.js +213 -0
- package/dist/local/health-schema.js.map +1 -0
- package/dist/local/health-store.d.ts +61 -0
- package/dist/local/health-store.d.ts.map +1 -0
- package/dist/local/health-store.js +218 -0
- package/dist/local/health-store.js.map +1 -0
- package/dist/local/index.d.ts +66 -0
- package/dist/local/index.d.ts.map +1 -0
- package/dist/local/index.js +66 -0
- package/dist/local/index.js.map +1 -0
- package/dist/local/journey-commands.d.ts +65 -0
- package/dist/local/journey-commands.d.ts.map +1 -0
- package/dist/local/journey-commands.js +138 -0
- package/dist/local/journey-commands.js.map +1 -0
- package/dist/local/local-org-store.d.ts +46 -0
- package/dist/local/local-org-store.d.ts.map +1 -0
- package/dist/local/local-org-store.js +132 -0
- package/dist/local/local-org-store.js.map +1 -0
- package/dist/local/local-org.d.ts +389 -0
- package/dist/local/local-org.d.ts.map +1 -0
- package/dist/local/local-org.js +855 -0
- package/dist/local/local-org.js.map +1 -0
- package/dist/local/media-upload.d.ts +5 -0
- package/dist/local/media-upload.d.ts.map +1 -0
- package/dist/local/media-upload.js +41 -0
- package/dist/local/media-upload.js.map +1 -0
- package/dist/local/operation.d.ts +155 -0
- package/dist/local/operation.d.ts.map +1 -0
- package/dist/local/operation.js +340 -0
- package/dist/local/operation.js.map +1 -0
- package/dist/local/ownership-reader-schema.d.ts +117 -0
- package/dist/local/ownership-reader-schema.d.ts.map +1 -0
- package/dist/local/ownership-reader-schema.js +105 -0
- package/dist/local/ownership-reader-schema.js.map +1 -0
- package/dist/local/ownership-reader-worker.d.ts +2 -0
- package/dist/local/ownership-reader-worker.d.ts.map +1 -0
- package/dist/local/ownership-reader-worker.js +341 -0
- package/dist/local/ownership-reader-worker.js.map +1 -0
- package/dist/local/ownership-reader.d.ts +10 -0
- package/dist/local/ownership-reader.d.ts.map +1 -0
- package/dist/local/ownership-reader.js +93 -0
- package/dist/local/ownership-reader.js.map +1 -0
- package/dist/local/package-uses-check.d.ts +33 -0
- package/dist/local/package-uses-check.d.ts.map +1 -0
- package/dist/local/package-uses-check.js +62 -0
- package/dist/local/package-uses-check.js.map +1 -0
- package/dist/local/pending-recovery.d.ts +22 -0
- package/dist/local/pending-recovery.d.ts.map +1 -0
- package/dist/local/pending-recovery.js +171 -0
- package/dist/local/pending-recovery.js.map +1 -0
- package/dist/local/portable-commit-store.d.ts +28 -0
- package/dist/local/portable-commit-store.d.ts.map +1 -0
- package/dist/local/portable-commit-store.js +187 -0
- package/dist/local/portable-commit-store.js.map +1 -0
- package/dist/local/portable-commit.d.ts +109 -0
- package/dist/local/portable-commit.d.ts.map +1 -0
- package/dist/local/portable-commit.js +209 -0
- package/dist/local/portable-commit.js.map +1 -0
- package/dist/local/portable-remote.d.ts +432 -0
- package/dist/local/portable-remote.d.ts.map +1 -0
- package/dist/local/portable-remote.js +280 -0
- package/dist/local/portable-remote.js.map +1 -0
- package/dist/local/project-deleted.d.ts +4 -0
- package/dist/local/project-deleted.d.ts.map +1 -0
- package/dist/local/project-deleted.js +13 -0
- package/dist/local/project-deleted.js.map +1 -0
- package/dist/local/projection.d.ts +166 -0
- package/dist/local/projection.d.ts.map +1 -0
- package/dist/local/projection.js +709 -0
- package/dist/local/projection.js.map +1 -0
- package/dist/local/read-operation.d.ts +3 -0
- package/dist/local/read-operation.d.ts.map +1 -0
- package/dist/local/read-operation.js +19 -0
- package/dist/local/read-operation.js.map +1 -0
- package/dist/local/rebuild.d.ts +11 -0
- package/dist/local/rebuild.d.ts.map +1 -0
- package/dist/local/rebuild.js +42 -0
- package/dist/local/rebuild.js.map +1 -0
- package/dist/local/remote-base.d.ts +25 -0
- package/dist/local/remote-base.d.ts.map +1 -0
- package/dist/local/remote-base.js +68 -0
- package/dist/local/remote-base.js.map +1 -0
- package/dist/local/save-layout-worker.d.ts +19 -0
- package/dist/local/save-layout-worker.d.ts.map +1 -0
- package/dist/local/save-layout-worker.js +28 -0
- package/dist/local/save-layout-worker.js.map +1 -0
- package/dist/local/save-layout.d.ts +84 -0
- package/dist/local/save-layout.d.ts.map +1 -0
- package/dist/local/save-layout.js +221 -0
- package/dist/local/save-layout.js.map +1 -0
- package/dist/local/scope-impact.d.ts +31 -0
- package/dist/local/scope-impact.d.ts.map +1 -0
- package/dist/local/scope-impact.js +32 -0
- package/dist/local/scope-impact.js.map +1 -0
- package/dist/local/source-evidence/filesystem-worker.d.ts +2 -0
- package/dist/local/source-evidence/filesystem-worker.d.ts.map +1 -0
- package/dist/local/source-evidence/filesystem-worker.js +139 -0
- package/dist/local/source-evidence/filesystem-worker.js.map +1 -0
- package/dist/local/source-evidence/processes.d.ts +20 -0
- package/dist/local/source-evidence/processes.d.ts.map +1 -0
- package/dist/local/source-evidence/processes.js +133 -0
- package/dist/local/source-evidence/processes.js.map +1 -0
- package/dist/local/source-evidence/protocol.d.ts +52 -0
- package/dist/local/source-evidence/protocol.d.ts.map +1 -0
- package/dist/local/source-evidence/protocol.js +72 -0
- package/dist/local/source-evidence/protocol.js.map +1 -0
- package/dist/local/source-evidence/reader.d.ts +14 -0
- package/dist/local/source-evidence/reader.d.ts.map +1 -0
- package/dist/local/source-evidence/reader.js +308 -0
- package/dist/local/source-evidence/reader.js.map +1 -0
- package/dist/local/source-evidence/schema.d.ts +2504 -0
- package/dist/local/source-evidence/schema.d.ts.map +1 -0
- package/dist/local/source-evidence/schema.js +99 -0
- package/dist/local/source-evidence/schema.js.map +1 -0
- package/dist/local/source-policy/loader.d.ts +29 -0
- package/dist/local/source-policy/loader.d.ts.map +1 -0
- package/dist/local/source-policy/loader.js +209 -0
- package/dist/local/source-policy/loader.js.map +1 -0
- package/dist/local/source-policy/process.d.ts +7 -0
- package/dist/local/source-policy/process.d.ts.map +1 -0
- package/dist/local/source-policy/process.js +53 -0
- package/dist/local/source-policy/process.js.map +1 -0
- package/dist/local/source-policy/protocol.d.ts +27 -0
- package/dist/local/source-policy/protocol.d.ts.map +1 -0
- package/dist/local/source-policy/protocol.js +48 -0
- package/dist/local/source-policy/protocol.js.map +1 -0
- package/dist/local/source-policy/worker.d.ts +2 -0
- package/dist/local/source-policy/worker.d.ts.map +1 -0
- package/dist/local/source-policy/worker.js +100 -0
- package/dist/local/source-policy/worker.js.map +1 -0
- package/dist/local/state-directory.d.ts +17 -0
- package/dist/local/state-directory.d.ts.map +1 -0
- package/dist/local/state-directory.js +68 -0
- package/dist/local/state-directory.js.map +1 -0
- package/dist/local/store-database.d.ts +13 -0
- package/dist/local/store-database.d.ts.map +1 -0
- package/dist/local/store-database.js +187 -0
- package/dist/local/store-database.js.map +1 -0
- package/dist/local/store.d.ts +181 -0
- package/dist/local/store.d.ts.map +1 -0
- package/dist/local/store.js +585 -0
- package/dist/local/store.js.map +1 -0
- package/dist/local/sync.d.ts +47 -0
- package/dist/local/sync.d.ts.map +1 -0
- package/dist/local/sync.js +518 -0
- package/dist/local/sync.js.map +1 -0
- package/dist/local/task-context-inspection.d.ts +23 -0
- package/dist/local/task-context-inspection.d.ts.map +1 -0
- package/dist/local/task-context-inspection.js +165 -0
- package/dist/local/task-context-inspection.js.map +1 -0
- package/dist/local/task-context-observations.d.ts +9553 -0
- package/dist/local/task-context-observations.d.ts.map +1 -0
- package/dist/local/task-context-observations.js +232 -0
- package/dist/local/task-context-observations.js.map +1 -0
- package/dist/local/task-context-provider.d.ts +18 -0
- package/dist/local/task-context-provider.d.ts.map +1 -0
- package/dist/local/task-context-provider.js +231 -0
- package/dist/local/task-context-provider.js.map +1 -0
- package/dist/local/task-context-schema.d.ts +847 -0
- package/dist/local/task-context-schema.d.ts.map +1 -0
- package/dist/local/task-context-schema.js +305 -0
- package/dist/local/task-context-schema.js.map +1 -0
- package/dist/local/task-context-source.d.ts +16 -0
- package/dist/local/task-context-source.d.ts.map +1 -0
- package/dist/local/task-context-source.js +45 -0
- package/dist/local/task-context-source.js.map +1 -0
- package/dist/local/task-context.d.ts +14 -0
- package/dist/local/task-context.d.ts.map +1 -0
- package/dist/local/task-context.js +570 -0
- package/dist/local/task-context.js.map +1 -0
- package/dist/local/test-commands.d.ts +71 -0
- package/dist/local/test-commands.d.ts.map +1 -0
- package/dist/local/test-commands.js +292 -0
- package/dist/local/test-commands.js.map +1 -0
- package/dist/local/tree-save.d.ts +117 -0
- package/dist/local/tree-save.d.ts.map +1 -0
- package/dist/local/tree-save.js +615 -0
- package/dist/local/tree-save.js.map +1 -0
- package/dist/local/variants.d.ts +125 -0
- package/dist/local/variants.d.ts.map +1 -0
- package/dist/local/variants.js +267 -0
- package/dist/local/variants.js.map +1 -0
- package/dist/local/workspace-admission.d.ts +61 -0
- package/dist/local/workspace-admission.d.ts.map +1 -0
- package/dist/local/workspace-admission.js +112 -0
- package/dist/local/workspace-admission.js.map +1 -0
- package/dist/local/workspace-authority-guard.d.ts +18 -0
- package/dist/local/workspace-authority-guard.d.ts.map +1 -0
- package/dist/local/workspace-authority-guard.js +69 -0
- package/dist/local/workspace-authority-guard.js.map +1 -0
- package/dist/local/workspace-authority.d.ts +33 -0
- package/dist/local/workspace-authority.d.ts.map +1 -0
- package/dist/local/workspace-authority.js +33 -0
- package/dist/local/workspace-authority.js.map +1 -0
- package/dist/local/workspace-branch-runtime.d.ts +61 -0
- package/dist/local/workspace-branch-runtime.d.ts.map +1 -0
- package/dist/local/workspace-branch-runtime.js +216 -0
- package/dist/local/workspace-branch-runtime.js.map +1 -0
- package/dist/local/workspace-built-content.d.ts +137 -0
- package/dist/local/workspace-built-content.d.ts.map +1 -0
- package/dist/local/workspace-built-content.js +393 -0
- package/dist/local/workspace-built-content.js.map +1 -0
- package/dist/local/workspace-claim-status-read.d.ts +53 -0
- package/dist/local/workspace-claim-status-read.d.ts.map +1 -0
- package/dist/local/workspace-claim-status-read.js +118 -0
- package/dist/local/workspace-claim-status-read.js.map +1 -0
- package/dist/local/workspace-claim-status.d.ts +172 -0
- package/dist/local/workspace-claim-status.d.ts.map +1 -0
- package/dist/local/workspace-claim-status.js +721 -0
- package/dist/local/workspace-claim-status.js.map +1 -0
- package/dist/local/workspace-claim-views.d.ts +45 -0
- package/dist/local/workspace-claim-views.d.ts.map +1 -0
- package/dist/local/workspace-claim-views.js +45 -0
- package/dist/local/workspace-claim-views.js.map +1 -0
- package/dist/local/workspace-cli.d.ts +46 -0
- package/dist/local/workspace-cli.d.ts.map +1 -0
- package/dist/local/workspace-cli.js +1524 -0
- package/dist/local/workspace-cli.js.map +1 -0
- package/dist/local/workspace-commit-resolver.d.ts +19 -0
- package/dist/local/workspace-commit-resolver.d.ts.map +1 -0
- package/dist/local/workspace-commit-resolver.js +47 -0
- package/dist/local/workspace-commit-resolver.js.map +1 -0
- package/dist/local/workspace-decision-store.d.ts +184 -0
- package/dist/local/workspace-decision-store.d.ts.map +1 -0
- package/dist/local/workspace-decision-store.js +510 -0
- package/dist/local/workspace-decision-store.js.map +1 -0
- package/dist/local/workspace-environment-runtime.d.ts +107 -0
- package/dist/local/workspace-environment-runtime.d.ts.map +1 -0
- package/dist/local/workspace-environment-runtime.js +135 -0
- package/dist/local/workspace-environment-runtime.js.map +1 -0
- package/dist/local/workspace-evidence-drop.d.ts +21 -0
- package/dist/local/workspace-evidence-drop.d.ts.map +1 -0
- package/dist/local/workspace-evidence-drop.js +58 -0
- package/dist/local/workspace-evidence-drop.js.map +1 -0
- package/dist/local/workspace-evidence-sign-tool.d.ts +20 -0
- package/dist/local/workspace-evidence-sign-tool.d.ts.map +1 -0
- package/dist/local/workspace-evidence-sign-tool.js +85 -0
- package/dist/local/workspace-evidence-sign-tool.js.map +1 -0
- package/dist/local/workspace-evidence-status.d.ts +89 -0
- package/dist/local/workspace-evidence-status.d.ts.map +1 -0
- package/dist/local/workspace-evidence-status.js +141 -0
- package/dist/local/workspace-evidence-status.js.map +1 -0
- package/dist/local/workspace-evidence.d.ts +145 -0
- package/dist/local/workspace-evidence.d.ts.map +1 -0
- package/dist/local/workspace-evidence.js +347 -0
- package/dist/local/workspace-evidence.js.map +1 -0
- package/dist/local/workspace-graph-store.d.ts +32 -0
- package/dist/local/workspace-graph-store.d.ts.map +1 -0
- package/dist/local/workspace-graph-store.js +249 -0
- package/dist/local/workspace-graph-store.js.map +1 -0
- package/dist/local/workspace-handoff.d.ts +32 -0
- package/dist/local/workspace-handoff.d.ts.map +1 -0
- package/dist/local/workspace-handoff.js +144 -0
- package/dist/local/workspace-handoff.js.map +1 -0
- package/dist/local/workspace-history-journal.d.ts +70 -0
- package/dist/local/workspace-history-journal.d.ts.map +1 -0
- package/dist/local/workspace-history-journal.js +131 -0
- package/dist/local/workspace-history-journal.js.map +1 -0
- package/dist/local/workspace-history-store.d.ts +98 -0
- package/dist/local/workspace-history-store.d.ts.map +1 -0
- package/dist/local/workspace-history-store.js +632 -0
- package/dist/local/workspace-history-store.js.map +1 -0
- package/dist/local/workspace-history-types.d.ts +307 -0
- package/dist/local/workspace-history-types.d.ts.map +1 -0
- package/dist/local/workspace-history-types.js +2 -0
- package/dist/local/workspace-history-types.js.map +1 -0
- package/dist/local/workspace-integration-runtime.d.ts +48 -0
- package/dist/local/workspace-integration-runtime.d.ts.map +1 -0
- package/dist/local/workspace-integration-runtime.js +419 -0
- package/dist/local/workspace-integration-runtime.js.map +1 -0
- package/dist/local/workspace-lock.d.ts +7 -0
- package/dist/local/workspace-lock.d.ts.map +1 -0
- package/dist/local/workspace-lock.js +211 -0
- package/dist/local/workspace-lock.js.map +1 -0
- package/dist/local/workspace-merge.d.ts +77 -0
- package/dist/local/workspace-merge.d.ts.map +1 -0
- package/dist/local/workspace-merge.js +703 -0
- package/dist/local/workspace-merge.js.map +1 -0
- package/dist/local/workspace-mixed-history.d.ts +33 -0
- package/dist/local/workspace-mixed-history.d.ts.map +1 -0
- package/dist/local/workspace-mixed-history.js +107 -0
- package/dist/local/workspace-mixed-history.js.map +1 -0
- package/dist/local/workspace-overlap-allocation.d.ts +33 -0
- package/dist/local/workspace-overlap-allocation.d.ts.map +1 -0
- package/dist/local/workspace-overlap-allocation.js +69 -0
- package/dist/local/workspace-overlap-allocation.js.map +1 -0
- package/dist/local/workspace-overlap-impact.d.ts +46 -0
- package/dist/local/workspace-overlap-impact.d.ts.map +1 -0
- package/dist/local/workspace-overlap-impact.js +162 -0
- package/dist/local/workspace-overlap-impact.js.map +1 -0
- package/dist/local/workspace-overlap.d.ts +109 -0
- package/dist/local/workspace-overlap.d.ts.map +1 -0
- package/dist/local/workspace-overlap.js +327 -0
- package/dist/local/workspace-overlap.js.map +1 -0
- package/dist/local/workspace-paths.d.ts +4 -0
- package/dist/local/workspace-paths.d.ts.map +1 -0
- package/dist/local/workspace-paths.js +8 -0
- package/dist/local/workspace-paths.js.map +1 -0
- package/dist/local/workspace-pick-runtime.d.ts +70 -0
- package/dist/local/workspace-pick-runtime.d.ts.map +1 -0
- package/dist/local/workspace-pick-runtime.js +177 -0
- package/dist/local/workspace-pick-runtime.js.map +1 -0
- package/dist/local/workspace-pick-store.d.ts +33 -0
- package/dist/local/workspace-pick-store.d.ts.map +1 -0
- package/dist/local/workspace-pick-store.js +43 -0
- package/dist/local/workspace-pick-store.js.map +1 -0
- package/dist/local/workspace-pick.d.ts +73 -0
- package/dist/local/workspace-pick.d.ts.map +1 -0
- package/dist/local/workspace-pick.js +253 -0
- package/dist/local/workspace-pick.js.map +1 -0
- package/dist/local/workspace-portable-authoring.d.ts +43 -0
- package/dist/local/workspace-portable-authoring.d.ts.map +1 -0
- package/dist/local/workspace-portable-authoring.js +128 -0
- package/dist/local/workspace-portable-authoring.js.map +1 -0
- package/dist/local/workspace-prune.d.ts +63 -0
- package/dist/local/workspace-prune.d.ts.map +1 -0
- package/dist/local/workspace-prune.js +267 -0
- package/dist/local/workspace-prune.js.map +1 -0
- package/dist/local/workspace-remote-fetch.d.ts +82 -0
- package/dist/local/workspace-remote-fetch.d.ts.map +1 -0
- package/dist/local/workspace-remote-fetch.js +409 -0
- package/dist/local/workspace-remote-fetch.js.map +1 -0
- package/dist/local/workspace-remote-provider.d.ts +97 -0
- package/dist/local/workspace-remote-provider.d.ts.map +1 -0
- package/dist/local/workspace-remote-provider.js +400 -0
- package/dist/local/workspace-remote-provider.js.map +1 -0
- package/dist/local/workspace-remote-pull-request-journal.d.ts +49 -0
- package/dist/local/workspace-remote-pull-request-journal.d.ts.map +1 -0
- package/dist/local/workspace-remote-pull-request-journal.js +63 -0
- package/dist/local/workspace-remote-pull-request-journal.js.map +1 -0
- package/dist/local/workspace-remote-pull-request.d.ts +36 -0
- package/dist/local/workspace-remote-pull-request.d.ts.map +1 -0
- package/dist/local/workspace-remote-pull-request.js +158 -0
- package/dist/local/workspace-remote-pull-request.js.map +1 -0
- package/dist/local/workspace-remote-push.d.ts +88 -0
- package/dist/local/workspace-remote-push.d.ts.map +1 -0
- package/dist/local/workspace-remote-push.js +297 -0
- package/dist/local/workspace-remote-push.js.map +1 -0
- package/dist/local/workspace-remote-topic-journal.d.ts +56 -0
- package/dist/local/workspace-remote-topic-journal.d.ts.map +1 -0
- package/dist/local/workspace-remote-topic-journal.js +121 -0
- package/dist/local/workspace-remote-topic-journal.js.map +1 -0
- package/dist/local/workspace-remote-topic.d.ts +45 -0
- package/dist/local/workspace-remote-topic.d.ts.map +1 -0
- package/dist/local/workspace-remote-topic.js +204 -0
- package/dist/local/workspace-remote-topic.js.map +1 -0
- package/dist/local/workspace-remote-transfer.d.ts +76 -0
- package/dist/local/workspace-remote-transfer.d.ts.map +1 -0
- package/dist/local/workspace-remote-transfer.js +270 -0
- package/dist/local/workspace-remote-transfer.js.map +1 -0
- package/dist/local/workspace-resolution.d.ts +145 -0
- package/dist/local/workspace-resolution.d.ts.map +1 -0
- package/dist/local/workspace-resolution.js +479 -0
- package/dist/local/workspace-resolution.js.map +1 -0
- package/dist/local/workspace-resolver-provider.d.ts +72 -0
- package/dist/local/workspace-resolver-provider.d.ts.map +1 -0
- package/dist/local/workspace-resolver-provider.js +312 -0
- package/dist/local/workspace-resolver-provider.js.map +1 -0
- package/dist/local/workspace-runtime-handoff.d.ts +52 -0
- package/dist/local/workspace-runtime-handoff.d.ts.map +1 -0
- package/dist/local/workspace-runtime-handoff.js +237 -0
- package/dist/local/workspace-runtime-handoff.js.map +1 -0
- package/dist/local/workspace-runtime-lease.d.ts +26 -0
- package/dist/local/workspace-runtime-lease.d.ts.map +1 -0
- package/dist/local/workspace-runtime-lease.js +123 -0
- package/dist/local/workspace-runtime-lease.js.map +1 -0
- package/dist/local/workspace-runtime.d.ts +690 -0
- package/dist/local/workspace-runtime.d.ts.map +1 -0
- package/dist/local/workspace-runtime.js +2124 -0
- package/dist/local/workspace-runtime.js.map +1 -0
- package/dist/local/workspace-scope.d.ts +70 -0
- package/dist/local/workspace-scope.d.ts.map +1 -0
- package/dist/local/workspace-scope.js +206 -0
- package/dist/local/workspace-scope.js.map +1 -0
- package/dist/local/workspace-sources.d.ts +159 -0
- package/dist/local/workspace-sources.d.ts.map +1 -0
- package/dist/local/workspace-sources.js +570 -0
- package/dist/local/workspace-sources.js.map +1 -0
- package/dist/local/workspace-store-database.d.ts +5 -0
- package/dist/local/workspace-store-database.d.ts.map +1 -0
- package/dist/local/workspace-store-database.js +726 -0
- package/dist/local/workspace-store-database.js.map +1 -0
- package/dist/local/workspace-store.d.ts +261 -0
- package/dist/local/workspace-store.d.ts.map +1 -0
- package/dist/local/workspace-store.js +831 -0
- package/dist/local/workspace-store.js.map +1 -0
- package/dist/local/workspace-topology-runtime.d.ts +27 -0
- package/dist/local/workspace-topology-runtime.d.ts.map +1 -0
- package/dist/local/workspace-topology-runtime.js +396 -0
- package/dist/local/workspace-topology-runtime.js.map +1 -0
- package/dist/local/workspace-topology.d.ts +140 -0
- package/dist/local/workspace-topology.d.ts.map +1 -0
- package/dist/local/workspace-topology.js +359 -0
- package/dist/local/workspace-topology.js.map +1 -0
- package/dist/local/workspace-upstream-inspection.d.ts +60 -0
- package/dist/local/workspace-upstream-inspection.d.ts.map +1 -0
- package/dist/local/workspace-upstream-inspection.js +189 -0
- package/dist/local/workspace-upstream-inspection.js.map +1 -0
- package/dist/local/workspace-upstream-runtime.d.ts +91 -0
- package/dist/local/workspace-upstream-runtime.d.ts.map +1 -0
- package/dist/local/workspace-upstream-runtime.js +270 -0
- package/dist/local/workspace-upstream-runtime.js.map +1 -0
- package/dist/local/workspace-upstream-store.d.ts +51 -0
- package/dist/local/workspace-upstream-store.d.ts.map +1 -0
- package/dist/local/workspace-upstream-store.js +475 -0
- package/dist/local/workspace-upstream-store.js.map +1 -0
- package/dist/local/workspace-viewer-server.d.ts +136 -0
- package/dist/local/workspace-viewer-server.d.ts.map +1 -0
- package/dist/local/workspace-viewer-server.js +1097 -0
- package/dist/local/workspace-viewer-server.js.map +1 -0
- package/dist/local/workspace-viewer-snapshot.d.ts +49 -0
- package/dist/local/workspace-viewer-snapshot.d.ts.map +1 -0
- package/dist/local/workspace-viewer-snapshot.js +91 -0
- package/dist/local/workspace-viewer-snapshot.js.map +1 -0
- package/dist/local/worktree-projection.d.ts +76 -0
- package/dist/local/worktree-projection.d.ts.map +1 -0
- package/dist/local/worktree-projection.js +470 -0
- package/dist/local/worktree-projection.js.map +1 -0
- package/dist/mcp/client-identity.d.ts +8 -0
- package/dist/mcp/client-identity.d.ts.map +1 -0
- package/dist/mcp/client-identity.js +33 -0
- package/dist/mcp/client-identity.js.map +1 -0
- package/dist/mcp/graph-to-code.d.ts +53 -0
- package/dist/mcp/graph-to-code.d.ts.map +1 -0
- package/dist/mcp/graph-to-code.js +1624 -0
- package/dist/mcp/graph-to-code.js.map +1 -0
- package/dist/mcp/index.d.ts +3 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +3 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/stdio/graph-to-code.d.ts +3 -0
- package/dist/mcp/stdio/graph-to-code.d.ts.map +1 -0
- package/dist/mcp/stdio/graph-to-code.js +55 -0
- package/dist/mcp/stdio/graph-to-code.js.map +1 -0
- package/dist/mcp/stdio/worktree.d.ts +3 -0
- package/dist/mcp/stdio/worktree.d.ts.map +1 -0
- package/dist/mcp/stdio/worktree.js +67 -0
- package/dist/mcp/stdio/worktree.js.map +1 -0
- package/dist/mcp/worktree-claim-status.d.ts +162 -0
- package/dist/mcp/worktree-claim-status.d.ts.map +1 -0
- package/dist/mcp/worktree-claim-status.js +113 -0
- package/dist/mcp/worktree-claim-status.js.map +1 -0
- package/dist/mcp/worktree-dispatch.d.ts +13 -0
- package/dist/mcp/worktree-dispatch.d.ts.map +1 -0
- package/dist/mcp/worktree-dispatch.js +52 -0
- package/dist/mcp/worktree-dispatch.js.map +1 -0
- package/dist/mcp/worktree-errors.d.ts +15 -0
- package/dist/mcp/worktree-errors.d.ts.map +1 -0
- package/dist/mcp/worktree-errors.js +17 -0
- package/dist/mcp/worktree-errors.js.map +1 -0
- package/dist/mcp/worktree-health.d.ts +12 -0
- package/dist/mcp/worktree-health.d.ts.map +1 -0
- package/dist/mcp/worktree-health.js +32 -0
- package/dist/mcp/worktree-health.js.map +1 -0
- package/dist/mcp/worktree-results.d.ts +15 -0
- package/dist/mcp/worktree-results.d.ts.map +1 -0
- package/dist/mcp/worktree-results.js +12 -0
- package/dist/mcp/worktree-results.js.map +1 -0
- package/dist/mcp/worktree-task-context.d.ts +57 -0
- package/dist/mcp/worktree-task-context.d.ts.map +1 -0
- package/dist/mcp/worktree-task-context.js +45 -0
- package/dist/mcp/worktree-task-context.js.map +1 -0
- package/dist/mcp/worktree-tools.d.ts +2648 -0
- package/dist/mcp/worktree-tools.d.ts.map +1 -0
- package/dist/mcp/worktree-tools.js +192 -0
- package/dist/mcp/worktree-tools.js.map +1 -0
- package/dist/mcp/worktree.d.ts +33 -0
- package/dist/mcp/worktree.d.ts.map +1 -0
- package/dist/mcp/worktree.js +551 -0
- package/dist/mcp/worktree.js.map +1 -0
- package/dist/own-package.d.ts +13 -0
- package/dist/own-package.d.ts.map +1 -0
- package/dist/own-package.js +32 -0
- package/dist/own-package.js.map +1 -0
- package/dist/packages-browse.d.ts +107 -0
- package/dist/packages-browse.d.ts.map +1 -0
- package/dist/packages-browse.js +646 -0
- package/dist/packages-browse.js.map +1 -0
- package/dist/packages-cli.d.ts +8 -0
- package/dist/packages-cli.d.ts.map +1 -0
- package/dist/packages-cli.js +184 -0
- package/dist/packages-cli.js.map +1 -0
- package/dist/packages-uses.d.ts +46 -0
- package/dist/packages-uses.d.ts.map +1 -0
- package/dist/packages-uses.js +737 -0
- package/dist/packages-uses.js.map +1 -0
- package/dist/portable.d.ts +7 -0
- package/dist/portable.d.ts.map +1 -0
- package/dist/portable.js +14 -0
- package/dist/portable.js.map +1 -0
- package/dist/quiet-warnings.d.ts +3 -0
- package/dist/quiet-warnings.d.ts.map +1 -0
- package/dist/quiet-warnings.js +21 -0
- package/dist/quiet-warnings.js.map +1 -0
- package/dist/view-seam.d.ts +62 -0
- package/dist/view-seam.d.ts.map +1 -0
- package/dist/view-seam.js +70 -0
- package/dist/view-seam.js.map +1 -0
- package/generated/graph-packages/index.json +5 -0
- package/graph-packages.lock.json +4 -0
- package/package.json +81 -0
- package/viewer/assets/index-BZKGDARF.css +1 -0
- package/viewer/assets/index-DWu0CbZZ.js +272 -0
- package/viewer/index.html +13 -0
|
@@ -0,0 +1 @@
|
|
|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C,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACrH,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;gBACvB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,OAAO,IAAI,CAAC,CAAC;gBAClF,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,oDAAoD,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC;YAC7G,CAAC;YACD,wFAAwF;YACxF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,OAAO,IAAI,CAAC,CAAC;YAChF,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,gDAAgD,EAAE,EAAE,CAAC;QAC5F,CAAC;IACH,CAAC,CAAC;IACF,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { AppContractAnswer } from './app-contract-readers.js';
|
|
2
|
+
import { type LocalOrgRepository } from './local-org.js';
|
|
3
|
+
/**
|
|
4
|
+
* sdlc viewer's api/app/org read (osa-chart-viewer): the Org chart page's one read, answering what
|
|
5
|
+
* sdlc org show prints for the repository's local org, with whether a workflow file named its gate
|
|
6
|
+
* slots. It reads the store and writes nothing. No org yet answers 404 no_local_org, a store a
|
|
7
|
+
* writer holds 503 with retry, and any other failure 500 with its detail on the viewer's terminal.
|
|
8
|
+
*/
|
|
9
|
+
export type AppOrgInput = {
|
|
10
|
+
/** The directory sdlc viewer runs in. */
|
|
11
|
+
cwd: string;
|
|
12
|
+
/** Opens the repository store; tests stand it in. */
|
|
13
|
+
open?: () => Promise<LocalOrgRepository>;
|
|
14
|
+
/**
|
|
15
|
+
* Where a failure's detail goes: the viewer's terminal by default; sdlc view --section org keeps
|
|
16
|
+
* a failed read's message for the section instead. reason: not_git or failed.
|
|
17
|
+
*/
|
|
18
|
+
report?: (message: string, reason: 'not_git' | 'failed') => void;
|
|
19
|
+
};
|
|
20
|
+
export declare function appOrgReader(input: AppOrgInput): () => Promise<AppContractAnswer>;
|
|
21
|
+
//# sourceMappingURL=app-org-reader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-org-reader.d.ts","sourceRoot":"","sources":["../../src/local/app-org-reader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EASL,KAAK,kBAAkB,EACxB,MAAM,gBAAgB,CAAC;AAExB;;;;;GAKG;AAEH,MAAM,MAAM,WAAW,GAAG;IACxB,yCAAyC;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACzC;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,QAAQ,KAAK,IAAI,CAAC;CAClE,CAAC;AAYF,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,OAAO,CAAC,iBAAiB,CAAC,CAoDjF"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { defaultWorkflowPath, describeLocalOrg, describeLocalProjectOrOwners, LOCAL_ORG_MISSING, localOrgRules, openLocalOrgRepository, readLocalOrg, readWorkflowRoles } from './local-org.js';
|
|
2
|
+
function viewerTerminal(message, reason) {
|
|
3
|
+
process.stderr.write(`sdlc viewer: ${reason === 'failed' ? 'org read failed' : 'org read'}: ${message}\n`);
|
|
4
|
+
}
|
|
5
|
+
// SQLite's own words for a store a writer holds.
|
|
6
|
+
const BUSY = /database is (locked|busy)|SQLITE_BUSY/;
|
|
7
|
+
const RETRY_AFTER_S = 10;
|
|
8
|
+
// openLocalOrgRepository's refusal outside a Git repository.
|
|
9
|
+
const NOT_IN_GIT = 'sdlc org runs in a Git repository.';
|
|
10
|
+
export function appOrgReader(input) {
|
|
11
|
+
const open = input.open ?? (() => openLocalOrgRepository({ cwd: input.cwd }));
|
|
12
|
+
const report = input.report ?? viewerTerminal;
|
|
13
|
+
return async () => {
|
|
14
|
+
let repository = null;
|
|
15
|
+
try {
|
|
16
|
+
repository = await open();
|
|
17
|
+
const org = await readLocalOrg(repository);
|
|
18
|
+
if (!org)
|
|
19
|
+
return { status: 404, body: { reason: 'no_local_org', error: LOCAL_ORG_MISSING } };
|
|
20
|
+
const path = defaultWorkflowPath(repository);
|
|
21
|
+
const workflow = path ? await readWorkflowRoles(path) : null;
|
|
22
|
+
const rules = localOrgRules(org.graph, workflow, org.overrides);
|
|
23
|
+
const described = describeLocalOrg(org.graph, org.holders, rules);
|
|
24
|
+
// A gate slot names the gates its role decides, as the page shows them.
|
|
25
|
+
const gates = (slot) => (workflow?.gates ?? []).filter((gate) => gate.role === slot).map((gate) => gate.gate);
|
|
26
|
+
return {
|
|
27
|
+
status: 200,
|
|
28
|
+
body: {
|
|
29
|
+
org: repository.name,
|
|
30
|
+
workflow: workflow !== null,
|
|
31
|
+
...described,
|
|
32
|
+
slots: described.slots.map((slot) => (slot.gate ? { ...slot, gates: gates(slot.key) } : slot)),
|
|
33
|
+
// The repository's project: its owning team and slot bindings, as sdlc org slots prints them.
|
|
34
|
+
project: describeLocalProjectOrOwners(org, rules)
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
40
|
+
// Outside a Git repository there is no org to read, as the shell lists none.
|
|
41
|
+
// The page points to the terminal for details, so they are written there.
|
|
42
|
+
if (message === NOT_IN_GIT) {
|
|
43
|
+
report(`${input.cwd} is not in a Git repository; sdlc org runs in one.`, 'not_git');
|
|
44
|
+
return { status: 404, body: { reason: 'not_found', error: 'This directory is not a Git repository.' } };
|
|
45
|
+
}
|
|
46
|
+
if (BUSY.test(message)) {
|
|
47
|
+
return {
|
|
48
|
+
status: 503,
|
|
49
|
+
body: {
|
|
50
|
+
reason: 'store_locked',
|
|
51
|
+
error: 'Another sdlc command holds the repository store; read again in a moment.',
|
|
52
|
+
retry: true,
|
|
53
|
+
retry_after: RETRY_AFTER_S,
|
|
54
|
+
store: 'repository_registry'
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
report(message, 'failed');
|
|
59
|
+
return { status: 500, body: { error: 'The local org could not be read; see the sdlc viewer terminal.' } };
|
|
60
|
+
}
|
|
61
|
+
finally {
|
|
62
|
+
repository?.store.close();
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=app-org-reader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-org-reader.js","sourceRoot":"","sources":["../../src/local/app-org-reader.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,4BAA4B,EAC5B,iBAAiB,EACjB,aAAa,EACb,sBAAsB,EACtB,YAAY,EACZ,iBAAiB,EAElB,MAAM,gBAAgB,CAAC;AAqBxB,SAAS,cAAc,CAAC,OAAe,EAAE,MAA4B;IACnE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,UAAU,KAAK,OAAO,IAAI,CAAC,CAAC;AAC7G,CAAC;AAED,iDAAiD;AACjD,MAAM,IAAI,GAAG,uC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EAAE,IAAI;wBACX,WAAW,EAAE,aAAa;wBAC1B,KAAK,EAAE,qBAAqB;qBAC7B;iBACF,CAAC;YACJ,CAAC;YACD,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAC1B,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,gEAAgE,EAAE,EAAE,CAAC;QAC5G,CAAC;gBAAS,CAAC;YACT,UAAU,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;QAC5B,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { AppContractAnswer, AppContractRoute } from './app-contract-readers.js';
|
|
2
|
+
/**
|
|
3
|
+
* The shell's reads under sdlc viewer's api/app/ (la-shell, docs/specs/app-ui-contracts.md): the
|
|
4
|
+
* organization, its projects, what may be viewed, and the sdlc release with the sync state. They are
|
|
5
|
+
* answered by the sdlc package itself in any Git repository, with or without the SoftwareDLC
|
|
6
|
+
* engine; the domain reads (tasks, issues, releases) go to the engine's reader when it resolves,
|
|
7
|
+
* and are refused as engine_missing when it does not.
|
|
8
|
+
*
|
|
9
|
+
* The organization is the folder of repositories this repository belongs to, read as folder.py
|
|
10
|
+
* reads it, else the repository itself. Pages see names and folder-relative paths only: a
|
|
11
|
+
* member's absolute path, and the path-bearing detail of a refusal, stay on the viewer's terminal.
|
|
12
|
+
*/
|
|
13
|
+
export type ShellRefusal = {
|
|
14
|
+
status: number;
|
|
15
|
+
reason: string;
|
|
16
|
+
error: string;
|
|
17
|
+
retry?: boolean;
|
|
18
|
+
retry_after?: number;
|
|
19
|
+
since?: string;
|
|
20
|
+
store?: string;
|
|
21
|
+
repository?: string;
|
|
22
|
+
folder?: string;
|
|
23
|
+
home?: string;
|
|
24
|
+
member_path?: string;
|
|
25
|
+
};
|
|
26
|
+
type Project = {
|
|
27
|
+
name: string;
|
|
28
|
+
location: string;
|
|
29
|
+
current: boolean;
|
|
30
|
+
};
|
|
31
|
+
/** Where this repository stands: alone, in a folder, outside Git, or refused by its folder files. */
|
|
32
|
+
export type ShellLocation = {
|
|
33
|
+
kind: 'repository';
|
|
34
|
+
name: string;
|
|
35
|
+
projects: Project[];
|
|
36
|
+
} | {
|
|
37
|
+
kind: 'folder';
|
|
38
|
+
name: string;
|
|
39
|
+
home: string;
|
|
40
|
+
projects: Project[];
|
|
41
|
+
} | {
|
|
42
|
+
kind: 'not_in_git';
|
|
43
|
+
directory: string;
|
|
44
|
+
} | {
|
|
45
|
+
kind: 'refused';
|
|
46
|
+
refusal: ShellRefusal;
|
|
47
|
+
detail: string;
|
|
48
|
+
};
|
|
49
|
+
/** A directory's name as a page shows it: no control or bidirectional characters, at most 64. */
|
|
50
|
+
export declare function displayName(name: string): string;
|
|
51
|
+
/** An organization's slug: lowercased, each run outside a-z and 0-9 one '-', trimmed, at most 64. */
|
|
52
|
+
export declare function orgSlug(name: string): string;
|
|
53
|
+
/** A lone repository's project id: its directory under the member-name rule. */
|
|
54
|
+
export declare function projectSlug(name: string): string;
|
|
55
|
+
/** Where the repository whose Git common directory is `common_dir` stands, as folder.py locate() reads it. */
|
|
56
|
+
export declare function locateRepository(common_dir: string): Promise<ShellLocation>;
|
|
57
|
+
/**
|
|
58
|
+
* The Git common directory of the repository at `cwd`, or null outside one. Any other git failure,
|
|
59
|
+
* a timeout on a busy machine included, rejects, so it reads as a failed read, not as no repository.
|
|
60
|
+
* LC_ALL=C keeps git's message English whatever the user's locale.
|
|
61
|
+
*/
|
|
62
|
+
export declare function gitCommonDir(cwd: string): Promise<string | null>;
|
|
63
|
+
/** Whether `segments` under api/app/ name a route: a HEAD on one answers 200, on anything else 404. */
|
|
64
|
+
export declare function appRouteKnown(segments: string[]): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* The viewer's api/app/ read, with the HEAD status of a route, which reads nothing, and what drops
|
|
67
|
+
* the domain reader's kept Tasks reads after a Done.
|
|
68
|
+
*/
|
|
69
|
+
export type AppShellRead = ((route: AppContractRoute) => Promise<AppContractAnswer>) & {
|
|
70
|
+
head: (segments: string[]) => number;
|
|
71
|
+
invalidate: () => void;
|
|
72
|
+
};
|
|
73
|
+
export type AppShellInput = {
|
|
74
|
+
/** The directory sdlc viewer runs in. */
|
|
75
|
+
cwd: string;
|
|
76
|
+
/** The engine's domain reads (appContractsProvider), or undefined when no engine resolves. */
|
|
77
|
+
domains?: ((route: AppContractRoute) => Promise<AppContractAnswer>) & {
|
|
78
|
+
invalidate?: () => void;
|
|
79
|
+
};
|
|
80
|
+
/** Where the repository stands; tests stand it in. */
|
|
81
|
+
locate?: () => Promise<ShellLocation>;
|
|
82
|
+
/** The local org chart (api/app/org); tests stand it in. */
|
|
83
|
+
org?: () => Promise<AppContractAnswer>;
|
|
84
|
+
/** The Worktrees page's reads (worktreesProvider), or undefined when no engine resolves. */
|
|
85
|
+
worktrees?: {
|
|
86
|
+
list: () => Promise<AppContractAnswer>;
|
|
87
|
+
sizes: () => Promise<AppContractAnswer>;
|
|
88
|
+
current: boolean;
|
|
89
|
+
};
|
|
90
|
+
version?: string;
|
|
91
|
+
now?: () => number;
|
|
92
|
+
};
|
|
93
|
+
/** The viewer's api/app/ reads: the shell's own, and the domain reads it hands to the engine's reader. */
|
|
94
|
+
export declare function appShellReader(input: AppShellInput): AppShellRead;
|
|
95
|
+
export {};
|
|
96
|
+
//# sourceMappingURL=app-shell-readers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-shell-readers.d.ts","sourceRoot":"","sources":["../../src/local/app-shell-readers.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAGrF;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAA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|
2
|
+
import { lstat, readFile, realpath } from 'node:fs/promises';
|
|
3
|
+
import { basename, dirname, isAbsolute, join, relative, resolve } from 'node:path';
|
|
4
|
+
import { ownPackage } from '../own-package.js';
|
|
5
|
+
import { readFolderMembers } from './folder-members.js';
|
|
6
|
+
const STATE = 'sdlc-executions';
|
|
7
|
+
const MEMBERSHIP = 'folder.json';
|
|
8
|
+
const POINTER = 'sdlc-folder.json';
|
|
9
|
+
const LOCAL = 'local';
|
|
10
|
+
// A project id is a member name as folder.py writes it.
|
|
11
|
+
const MEMBER_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;
|
|
12
|
+
// Control and bidirectional characters a directory name may carry.
|
|
13
|
+
// eslint-disable-next-line no-control-regex
|
|
14
|
+
const UNSHOWN = /[\u0000-\u001f\u007f-\u009f--]/g;
|
|
15
|
+
const RETRY_AFTER_S = 10;
|
|
16
|
+
/** The sdlc package's version (ownPackage). */
|
|
17
|
+
function packageVersion() {
|
|
18
|
+
return ownPackage()?.version ?? 'unknown';
|
|
19
|
+
}
|
|
20
|
+
/** A directory's name as a page shows it: no control or bidirectional characters, at most 64. */
|
|
21
|
+
export function displayName(name) {
|
|
22
|
+
return Array.from(name.replace(UNSHOWN, '')).slice(0, 64).join('') || 'repository';
|
|
23
|
+
}
|
|
24
|
+
/** An organization's slug: lowercased, each run outside a-z and 0-9 one '-', trimmed, at most 64. */
|
|
25
|
+
export function orgSlug(name) {
|
|
26
|
+
return (name
|
|
27
|
+
.toLowerCase()
|
|
28
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
29
|
+
.replace(/^-+|-+$/g, '')
|
|
30
|
+
.slice(0, 64)
|
|
31
|
+
.replace(/-+$/, '') || LOCAL);
|
|
32
|
+
}
|
|
33
|
+
/** A lone repository's project id: its directory under the member-name rule. */
|
|
34
|
+
export function projectSlug(name) {
|
|
35
|
+
if (MEMBER_NAME.test(name))
|
|
36
|
+
return name;
|
|
37
|
+
const cleaned = name.replace(/[^A-Za-z0-9._-]+/g, '-').replace(/^[^A-Za-z0-9]+/, '').slice(0, 64);
|
|
38
|
+
return MEMBER_NAME.test(cleaned) ? cleaned : 'repository';
|
|
39
|
+
}
|
|
40
|
+
const refused = (refusal, detail) => ({
|
|
41
|
+
kind: 'refused',
|
|
42
|
+
refusal: { status: 409, ...refusal },
|
|
43
|
+
detail
|
|
44
|
+
});
|
|
45
|
+
async function isDirectory(path) {
|
|
46
|
+
try {
|
|
47
|
+
return (await lstat(path)).isDirectory();
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
async function exists(path) {
|
|
54
|
+
try {
|
|
55
|
+
await lstat(path);
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/** A folder pointer's name and home, or a throw when it cannot be read as one. */
|
|
63
|
+
async function readPointer(path) {
|
|
64
|
+
const info = await lstat(path);
|
|
65
|
+
if (!info.isFile() || info.size > 64 << 10)
|
|
66
|
+
throw new Error(`${path} is not a regular folder file`);
|
|
67
|
+
const doc = JSON.parse(await readFile(path, 'utf8'));
|
|
68
|
+
const { name, home } = doc ?? {};
|
|
69
|
+
if (doc?.schema_version !== 1 || typeof name !== 'string' || !MEMBER_NAME.test(name)) {
|
|
70
|
+
throw new Error(`${path} is not a schema_version 1 folder pointer`);
|
|
71
|
+
}
|
|
72
|
+
if (typeof home !== 'string' || !home || isAbsolute(home) || home.includes('\\') || home.includes('\0')) {
|
|
73
|
+
throw new Error(`${path}: home must be a relative path`);
|
|
74
|
+
}
|
|
75
|
+
return { name, home };
|
|
76
|
+
}
|
|
77
|
+
/** The folder's members as projects: the home and every confirmed member inside the folder. */
|
|
78
|
+
async function folderProjects(home_common, current) {
|
|
79
|
+
const members = await readFolderMembers(home_common);
|
|
80
|
+
const home_primary = await realpath(dirname(home_common));
|
|
81
|
+
const all = [{ name: members.home, path: home_primary }, ...members.members];
|
|
82
|
+
// Real paths on both sides, so a folder reached through a link still holds its members.
|
|
83
|
+
const folder_real = await realpath(members.folder).catch(() => members.folder);
|
|
84
|
+
const projects = [];
|
|
85
|
+
for (const member of all) {
|
|
86
|
+
const member_real = await realpath(member.path).catch(() => member.path);
|
|
87
|
+
const location = relative(folder_real, member_real) || '.';
|
|
88
|
+
// A member outside the folder is refused, not listed: its path would leave the folder.
|
|
89
|
+
if (location.startsWith('..') || isAbsolute(location)) {
|
|
90
|
+
process.stderr.write(`sdlc viewer: the folder member ${member.name} is outside the folder; it is not listed\n`);
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
projects.push({ name: member.name, location, current: member.name === current });
|
|
94
|
+
}
|
|
95
|
+
projects.sort((a, b) => a.name.localeCompare(b.name));
|
|
96
|
+
return { folder: displayName(basename(members.folder)), home: members.home, projects };
|
|
97
|
+
}
|
|
98
|
+
/** A membership read's failure, as folder_moved when the folder moved, else membership_invalid. */
|
|
99
|
+
function membershipRefusal(error, names) {
|
|
100
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
101
|
+
const moved = /relocate|places the home/.test(message);
|
|
102
|
+
return refused({
|
|
103
|
+
reason: moved ? 'folder_moved' : 'membership_invalid',
|
|
104
|
+
error: moved ? 'The folder has moved.' : "The folder's records cannot be read.",
|
|
105
|
+
...names
|
|
106
|
+
}, message);
|
|
107
|
+
}
|
|
108
|
+
/** Where the repository whose Git common directory is `common_dir` stands, as folder.py locate() reads it. */
|
|
109
|
+
export async function locateRepository(common_dir) {
|
|
110
|
+
let repository = displayName(basename(dirname(common_dir)));
|
|
111
|
+
try {
|
|
112
|
+
const common = await realpath(common_dir);
|
|
113
|
+
const primary = dirname(common);
|
|
114
|
+
repository = displayName(basename(primary));
|
|
115
|
+
const pointer_path = join(common, POINTER);
|
|
116
|
+
const own_membership = join(common, STATE, MEMBERSHIP);
|
|
117
|
+
if (!(await exists(pointer_path))) {
|
|
118
|
+
if (!(await exists(own_membership))) {
|
|
119
|
+
return { kind: 'repository', name: repository, projects: [{ name: projectSlug(basename(primary)), location: '.', current: true }] };
|
|
120
|
+
}
|
|
121
|
+
// This repository is a folder's home.
|
|
122
|
+
try {
|
|
123
|
+
const found = await folderProjects(common, '');
|
|
124
|
+
const projects = found.projects.map((p) => ({ ...p, current: p.name === found.home }));
|
|
125
|
+
return { kind: 'folder', name: found.folder, home: found.home, projects };
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
return membershipRefusal(error, { repository });
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
// Each refusal's terminal detail ends with folder.py's own fix, which the page points to.
|
|
132
|
+
const leave = `run sdlc-agents folder leave in ${primary} to use this repository's own state`;
|
|
133
|
+
if (await exists(own_membership)) {
|
|
134
|
+
return refused({ reason: 'folder_conflict', error: "This repository holds both a folder pointer and a folder's membership.", repository }, `${common} holds both a folder pointer and a folder's membership; run sdlc-agents folder leave in ${primary}`);
|
|
135
|
+
}
|
|
136
|
+
let pointer;
|
|
137
|
+
try {
|
|
138
|
+
pointer = await readPointer(pointer_path);
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
return refused({ reason: 'pointer_invalid', error: "This repository's folder pointer cannot be read.", repository },
|
|
142
|
+
// folder.py names no fix here, and leave refuses an unreadable pointer.
|
|
143
|
+
`${error instanceof Error ? error.message : String(error)}; restore ${pointer_path}, or remove it if this repository belongs to no folder`);
|
|
144
|
+
}
|
|
145
|
+
const home_primary = resolve(primary, pointer.home);
|
|
146
|
+
const home_git = join(home_primary, '.git');
|
|
147
|
+
if (!(await isDirectory(home_git))) {
|
|
148
|
+
return refused({ reason: 'folder_moved', error: 'The folder has moved.', repository }, `the folder home ${home_primary} named by ${pointer_path} is not a Git repository's primary checkout; ` +
|
|
149
|
+
`if the folder moved, run sdlc-agents folder relocate in its home, or ${leave}`);
|
|
150
|
+
}
|
|
151
|
+
const home_common = await realpath(home_git);
|
|
152
|
+
const home_name = displayName(basename(home_primary));
|
|
153
|
+
if (home_common === common) {
|
|
154
|
+
return refused({ reason: 'pointer_invalid', error: "This repository's folder pointer names this repository as its own home.", repository }, `${pointer_path} names this repository as its own home; ${leave}`);
|
|
155
|
+
}
|
|
156
|
+
if (!(await exists(join(home_common, STATE, MEMBERSHIP)))) {
|
|
157
|
+
return refused({ reason: 'not_a_home', error: "The repository this one's folder pointer names is not a folder's home.", repository, home: home_name }, `${home_primary} is not a folder's home; ${leave}`);
|
|
158
|
+
}
|
|
159
|
+
// Add refuses a checkout that still has a pointer, so leaving comes first.
|
|
160
|
+
const rejoin = `run sdlc-agents folder leave in ${primary}, then sdlc-agents folder add ${primary} --name ${pointer.name} ` +
|
|
161
|
+
`in ${home_primary}; or ${leave}`;
|
|
162
|
+
let members;
|
|
163
|
+
try {
|
|
164
|
+
members = await readFolderMembers(home_common);
|
|
165
|
+
}
|
|
166
|
+
catch (error) {
|
|
167
|
+
return membershipRefusal(error, { repository, home: home_name });
|
|
168
|
+
}
|
|
169
|
+
const folder = displayName(basename(members.folder));
|
|
170
|
+
// The home is this repository only when the pointer names it, which it never does here (the
|
|
171
|
+
// pointer naming this repository as its own home was refused above): as folder.py's placement
|
|
172
|
+
// check finds, this repository is not where the folder records its home.
|
|
173
|
+
if (pointer.name === members.home) {
|
|
174
|
+
return refused({ reason: 'member_moved', error: 'This repository is not where its folder records it.', repository, folder }, `this repository's pointer names the folder home ${pointer.name}, which the folder records at ${home_primary}; ${rejoin}`);
|
|
175
|
+
}
|
|
176
|
+
const listed = [...members.members, ...members.skipped].find((m) => m.name === pointer.name);
|
|
177
|
+
if (!listed) {
|
|
178
|
+
return refused({
|
|
179
|
+
reason: 'folder_member_unlisted',
|
|
180
|
+
error: 'This repository points to a folder that no longer lists it.',
|
|
181
|
+
// Its member name, which add takes back as --name.
|
|
182
|
+
repository: pointer.name,
|
|
183
|
+
folder,
|
|
184
|
+
home: displayName(members.home),
|
|
185
|
+
member_path: relative(home_primary, primary) || '.'
|
|
186
|
+
}, `the folder home ${home_primary} does not list this repository as ${pointer.name}; ${rejoin}`);
|
|
187
|
+
}
|
|
188
|
+
if (listed && (await realpath(listed.path).catch(() => null)) !== (await realpath(primary))) {
|
|
189
|
+
return refused({ reason: 'member_moved', error: 'This repository is not where its folder records it.', repository, folder }, `this repository (${pointer.name}) is not at ${listed.path} as the folder records; ${rejoin}`);
|
|
190
|
+
}
|
|
191
|
+
const found = await folderProjects(home_common, pointer.name);
|
|
192
|
+
return { kind: 'folder', name: found.folder, home: found.home, projects: found.projects };
|
|
193
|
+
}
|
|
194
|
+
catch (error) {
|
|
195
|
+
return refused({ reason: 'folder_invalid', error: "This repository's folder records cannot be read.", repository }, error instanceof Error ? error.message : String(error));
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* The Git common directory of the repository at `cwd`, or null outside one. Any other git failure,
|
|
200
|
+
* a timeout on a busy machine included, rejects, so it reads as a failed read, not as no repository.
|
|
201
|
+
* LC_ALL=C keeps git's message English whatever the user's locale.
|
|
202
|
+
*/
|
|
203
|
+
export function gitCommonDir(cwd) {
|
|
204
|
+
return new Promise((done, fail) => {
|
|
205
|
+
execFile('git', ['rev-parse', '--path-format=absolute', '--git-common-dir'], { cwd, encoding: 'utf8', timeout: 10_000, env: { ...process.env, LC_ALL: 'C' } }, (error, stdout, stderr) => {
|
|
206
|
+
if (!error)
|
|
207
|
+
return done(String(stdout).trim() || null);
|
|
208
|
+
if (!error.killed && /not a git repository/i.test(String(stderr)))
|
|
209
|
+
return done(null);
|
|
210
|
+
fail(error);
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
const READ_ONLY = {
|
|
215
|
+
tasks: 'The local app reads tasks; change them with task-start, task-record and status.',
|
|
216
|
+
issues: 'The local app reads issues; change them with the issue command.',
|
|
217
|
+
releases: 'The local app reads Releases; a release batch writes them.',
|
|
218
|
+
organizations: 'Locally the organization is this folder of repositories, or this repository; it is not changed here.',
|
|
219
|
+
projects: 'Locally the projects are the repositories this viewer reads; they are not added or removed here.',
|
|
220
|
+
worktrees: "This viewer's engine is too old to merge or remove worktrees; update the main checkout and restart sdlc viewer."
|
|
221
|
+
};
|
|
222
|
+
const ENGINE_MISSING = 'Tasks, issues and Releases are read by the SoftwareDLC coordination engine, which this repository does not have.';
|
|
223
|
+
const WORKTREES_MISSING = 'Worktrees are read by the SoftwareDLC coordination engine, which this repository does not have.';
|
|
224
|
+
// The Worktrees page's reads (la-worktrees): the list, and the slower size read beside it.
|
|
225
|
+
const WORKTREE_READS = ['worktrees', 'worktree-sizes'];
|
|
226
|
+
/** Whether `segments` under api/app/ name a route: a HEAD on one answers 200, on anything else 404. */
|
|
227
|
+
export function appRouteKnown(segments) {
|
|
228
|
+
const [domain, ...rest] = segments;
|
|
229
|
+
const route = rest.join('/');
|
|
230
|
+
if (['access', 'about', 'orgs', 'projects', 'org', ...WORKTREE_READS].includes(domain))
|
|
231
|
+
return rest.length === 0;
|
|
232
|
+
if (domain === 'tasks') {
|
|
233
|
+
return (route === 'configuration' ||
|
|
234
|
+
(rest.length === 3 && rest[0] === 'lists' && rest[2] === 'tasks') ||
|
|
235
|
+
(rest.length === 2 && rest[0] === 'tasks'));
|
|
236
|
+
}
|
|
237
|
+
if (domain === 'issues' || domain === 'releases')
|
|
238
|
+
return rest.length <= 1;
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
/** The viewer's api/app/ reads: the shell's own, and the domain reads it hands to the engine's reader. */
|
|
242
|
+
export function appShellReader(input) {
|
|
243
|
+
const now = input.now ?? Date.now;
|
|
244
|
+
const version = input.version ?? packageVersion();
|
|
245
|
+
const locate = input.locate ??
|
|
246
|
+
(async () => {
|
|
247
|
+
const common = await gitCommonDir(input.cwd);
|
|
248
|
+
return common ? locateRepository(common) : { kind: 'not_in_git', directory: displayName(basename(input.cwd)) };
|
|
249
|
+
});
|
|
250
|
+
// Imported when first read: the org reader's module imports this one.
|
|
251
|
+
const org = input.org ?? (async () => (await import('./app-org-reader.js')).appOrgReader({ cwd: input.cwd })());
|
|
252
|
+
// When each kind of read was first refused as busy, cleared when it next answers.
|
|
253
|
+
const busy_since = new Map();
|
|
254
|
+
const refusal = (refusal) => {
|
|
255
|
+
const { status, ...body } = refusal;
|
|
256
|
+
return { status, body };
|
|
257
|
+
};
|
|
258
|
+
const located = async () => {
|
|
259
|
+
const where = await locate();
|
|
260
|
+
if (where.kind === 'refused')
|
|
261
|
+
process.stderr.write(`sdlc viewer: ${where.refusal.reason}: ${where.detail}\n`);
|
|
262
|
+
return where;
|
|
263
|
+
};
|
|
264
|
+
const shell = async (domain, rest) => {
|
|
265
|
+
if (rest.length > 0)
|
|
266
|
+
return null;
|
|
267
|
+
if (domain === 'about')
|
|
268
|
+
return { status: 200, body: { version, sync: { state: 'local_only' } } };
|
|
269
|
+
if (domain === 'access') {
|
|
270
|
+
const viewed = (reason) => ({ can_view: true, can_change: false, read_only_reason: reason });
|
|
271
|
+
const missing = { can_view: false, can_change: false, reason: 'engine_missing', read_only_reason: ENGINE_MISSING };
|
|
272
|
+
return {
|
|
273
|
+
status: 200,
|
|
274
|
+
body: {
|
|
275
|
+
tasks: input.domains ? viewed(READ_ONLY.tasks) : missing,
|
|
276
|
+
issues: input.domains ? viewed(READ_ONLY.issues) : missing,
|
|
277
|
+
releases: input.domains ? viewed(READ_ONLY.releases) : missing,
|
|
278
|
+
organizations: viewed(READ_ONLY.organizations),
|
|
279
|
+
projects: viewed(READ_ONLY.projects),
|
|
280
|
+
worktrees: !input.worktrees
|
|
281
|
+
? { ...missing, read_only_reason: WORKTREES_MISSING }
|
|
282
|
+
: input.worktrees.current
|
|
283
|
+
? { can_view: true, can_change: true }
|
|
284
|
+
: viewed(READ_ONLY.worktrees)
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
if (domain !== 'orgs' && domain !== 'projects')
|
|
289
|
+
return null;
|
|
290
|
+
const where = await located();
|
|
291
|
+
if (where.kind === 'refused')
|
|
292
|
+
return refusal(where.refusal);
|
|
293
|
+
// Outside a Git repository there is no organization: an empty list, not a refusal.
|
|
294
|
+
if (where.kind === 'not_in_git')
|
|
295
|
+
return { status: 200, body: domain === 'orgs' ? { organizations: [] } : { projects: [] } };
|
|
296
|
+
if (domain === 'orgs') {
|
|
297
|
+
return {
|
|
298
|
+
status: 200,
|
|
299
|
+
body: {
|
|
300
|
+
organizations: [
|
|
301
|
+
{
|
|
302
|
+
id: LOCAL,
|
|
303
|
+
name: where.name,
|
|
304
|
+
slug: orgSlug(where.name),
|
|
305
|
+
source: { kind: where.kind, repositories: where.projects.length }
|
|
306
|
+
}
|
|
307
|
+
]
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
return {
|
|
312
|
+
status: 200,
|
|
313
|
+
body: {
|
|
314
|
+
projects: where.projects.map((p) => ({
|
|
315
|
+
id: p.name,
|
|
316
|
+
organization_id: LOCAL,
|
|
317
|
+
name: p.name,
|
|
318
|
+
slug: p.name,
|
|
319
|
+
location: p.location,
|
|
320
|
+
current: p.current
|
|
321
|
+
}))
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
// A busy store answers with its kind and since when it has been held; the domain reader says only
|
|
326
|
+
// that it was busy.
|
|
327
|
+
const storeOf = async (domain) => {
|
|
328
|
+
if (domain === 'issues')
|
|
329
|
+
return 'issue_store';
|
|
330
|
+
const where = await locate().catch(() => null);
|
|
331
|
+
return where?.kind === 'folder' ? 'folder_registry' : 'repository_registry';
|
|
332
|
+
};
|
|
333
|
+
const read = async (route) => {
|
|
334
|
+
const [domain = '', ...rest] = route.segments;
|
|
335
|
+
const own = await shell(domain, rest);
|
|
336
|
+
if (own)
|
|
337
|
+
return own;
|
|
338
|
+
if (domain === 'org' && rest.length === 0)
|
|
339
|
+
return org();
|
|
340
|
+
if (WORKTREE_READS.includes(domain) && rest.length === 0) {
|
|
341
|
+
if (!input.worktrees)
|
|
342
|
+
return refusal({ status: 404, reason: 'engine_missing', error: WORKTREES_MISSING });
|
|
343
|
+
return domain === 'worktrees' ? input.worktrees.list() : input.worktrees.sizes();
|
|
344
|
+
}
|
|
345
|
+
if (!['tasks', 'issues', 'releases'].includes(domain)) {
|
|
346
|
+
return refusal({ status: 404, reason: 'not_found', error: 'Not found.' });
|
|
347
|
+
}
|
|
348
|
+
if (!input.domains) {
|
|
349
|
+
return refusal({ status: 404, reason: 'engine_missing', error: ENGINE_MISSING });
|
|
350
|
+
}
|
|
351
|
+
const answer = await input.domains(route);
|
|
352
|
+
const body = (answer.body ?? {});
|
|
353
|
+
if (answer.status === 503 && body.retry === true) {
|
|
354
|
+
const first = busy_since.get(domain) ?? now();
|
|
355
|
+
busy_since.set(domain, first);
|
|
356
|
+
return refusal({
|
|
357
|
+
status: 503,
|
|
358
|
+
reason: 'store_locked',
|
|
359
|
+
error: String(body.error ?? 'The local stores are busy; read again in a moment.'),
|
|
360
|
+
retry: true,
|
|
361
|
+
retry_after: RETRY_AFTER_S,
|
|
362
|
+
since: new Date(first).toISOString(),
|
|
363
|
+
store: await storeOf(domain)
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
busy_since.delete(domain);
|
|
367
|
+
if (answer.status === 404)
|
|
368
|
+
return refusal({ status: 404, reason: 'not_found', error: String(body.error ?? 'Not found.') });
|
|
369
|
+
if (answer.status >= 500) {
|
|
370
|
+
return refusal({ status: 500, reason: 'engine_failed', error: String(body.error ?? 'The read failed.'), retry: true });
|
|
371
|
+
}
|
|
372
|
+
return answer;
|
|
373
|
+
};
|
|
374
|
+
const head = (segments) => !appRouteKnown(segments) ||
|
|
375
|
+
(!input.domains && ['tasks', 'issues', 'releases'].includes(segments[0])) ||
|
|
376
|
+
(!input.worktrees && WORKTREE_READS.includes(segments[0]))
|
|
377
|
+
? 404
|
|
378
|
+
: 200;
|
|
379
|
+
return Object.assign(read, { head, invalidate: () => input.domains?.invalidate?.() });
|
|
380
|
+
}
|
|
381
|
+
//# sourceMappingURL=app-shell-readers.js.map
|