@jini-ai/devops 0.7.3-next.2 → 0.7.3-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/dist/backup/site/archive-extensions.d.ts +73 -0
- package/dist/backup/site/archive-extensions.js +129 -0
- package/dist/backup/site/archive-manifest.d.ts +85 -0
- package/dist/backup/site/archive-manifest.js +176 -0
- package/dist/backup/site/archive-media.d.ts +121 -0
- package/dist/backup/site/archive-media.js +93 -0
- package/dist/backup/site/backup-service.credentials.d.ts +31 -0
- package/dist/backup/site/backup-service.credentials.js +161 -0
- package/dist/backup/site/backup-service.d.ts +331 -0
- package/dist/backup/site/backup-service.js +125 -0
- package/dist/backup/site/backup-service.plan.d.ts +64 -0
- package/dist/backup/site/backup-service.plan.js +207 -0
- package/dist/backup/site/backup-service.push.d.ts +29 -0
- package/dist/backup/site/backup-service.push.js +82 -0
- package/dist/backup/site/backup-service.shared.d.ts +40 -0
- package/dist/backup/site/backup-service.shared.js +37 -0
- package/dist/backup/site/bundled-export-file-policy.d.ts +38 -0
- package/dist/backup/site/bundled-export-file-policy.js +40 -0
- package/dist/backup/site/credential-warnings.d.ts +41 -0
- package/dist/backup/site/credential-warnings.js +50 -0
- package/dist/backup/site/import-backend-steps.d.ts +167 -0
- package/dist/backup/site/import-backend-steps.js +170 -0
- package/dist/backup/site/import-backend.d.ts +167 -0
- package/dist/backup/site/import-backend.js +298 -0
- package/dist/backup/site/import-database.d.ts +118 -0
- package/dist/backup/site/import-database.js +167 -0
- package/dist/backup/site/import-index/admission.d.ts +54 -0
- package/dist/backup/site/import-index/admission.js +46 -0
- package/dist/backup/site/import-index/backfill.d.ts +106 -0
- package/dist/backup/site/import-index/backfill.js +137 -0
- package/dist/backup/site/import-index/errors.d.ts +28 -0
- package/dist/backup/site/import-index/errors.js +38 -0
- package/dist/backup/site/import-index/migrations/checksums.d.ts +4 -0
- package/dist/backup/site/import-index/migrations/checksums.js +4 -0
- package/dist/backup/site/import-index/migrations/site-imports-v1.d.ts +2 -0
- package/dist/backup/site/import-index/migrations/site-imports-v1.js +10 -0
- package/dist/backup/site/import-index/mode.d.ts +191 -0
- package/dist/backup/site/import-index/mode.js +272 -0
- package/dist/backup/site/import-index/open.d.ts +40 -0
- package/dist/backup/site/import-index/open.js +87 -0
- package/dist/backup/site/import-index/paging.d.ts +28 -0
- package/dist/backup/site/import-index/paging.js +66 -0
- package/dist/backup/site/import-index/payload-namespace.d.ts +80 -0
- package/dist/backup/site/import-index/payload-namespace.js +156 -0
- package/dist/backup/site/import-index/rows.d.ts +32 -0
- package/dist/backup/site/import-index/rows.js +61 -0
- package/dist/backup/site/import-index/schema.d.ts +8 -0
- package/dist/backup/site/import-index/schema.js +31 -0
- package/dist/backup/site/import-index/store.d.ts +27 -0
- package/dist/backup/site/import-index/store.js +33 -0
- package/dist/backup/site/import-index/sweep.d.ts +10 -0
- package/dist/backup/site/import-index/sweep.js +26 -0
- package/dist/backup/site/import-keep-off.d.ts +128 -0
- package/dist/backup/site/import-keep-off.js +204 -0
- package/dist/backup/site/import-plugin-state.d.ts +74 -0
- package/dist/backup/site/import-plugin-state.js +67 -0
- package/dist/backup/site/import-registry.d.ts +110 -0
- package/dist/backup/site/import-registry.js +205 -0
- package/dist/backup/site/import-restore-placement.d.ts +94 -0
- package/dist/backup/site/import-restore-placement.js +158 -0
- package/dist/backup/site/import-restore.d.ts +111 -0
- package/dist/backup/site/import-restore.js +120 -0
- package/dist/backup/site/import-verifier-inventory.d.ts +137 -0
- package/dist/backup/site/import-verifier-inventory.js +236 -0
- package/dist/backup/site/import-verifier-projection.d.ts +78 -0
- package/dist/backup/site/import-verifier-projection.js +100 -0
- package/dist/backup/site/import-verifier.d.ts +126 -0
- package/dist/backup/site/import-verifier.js +53 -0
- package/dist/backup/site/owned-temp-root.d.ts +12 -0
- package/dist/backup/site/owned-temp-root.js +2 -0
- package/dist/backup/site/package-file-inventory.d.ts +63 -0
- package/dist/backup/site/package-file-inventory.js +56 -0
- package/dist/backup/site/push-content.d.ts +70 -0
- package/dist/backup/site/push-content.js +56 -0
- package/dist/backup/site/react/ShowMoreImports.d.ts +21 -0
- package/dist/backup/site/react/ShowMoreImports.js +8 -0
- package/dist/backup/site/saved-keys-port.d.ts +47 -0
- package/dist/backup/site/saved-keys-port.js +3 -0
- package/dist/backup/site/saved-keys.d.ts +25 -0
- package/dist/backup/site/saved-keys.js +38 -0
- package/dist/backup/site/share-backend.d.ts +243 -0
- package/dist/backup/site/share-backend.js +284 -0
- package/dist/backup/site/share-database/projection.d.ts +195 -0
- package/dist/backup/site/share-database/projection.js +90 -0
- package/dist/backup/site/share-database/projection.media.d.ts +38 -0
- package/dist/backup/site/share-database/projection.media.js +179 -0
- package/dist/backup/site/share-database/projection.tables.d.ts +46 -0
- package/dist/backup/site/share-database/projection.tables.js +193 -0
- package/dist/backup/site/share-expiry.d.ts +75 -0
- package/dist/backup/site/share-expiry.js +49 -0
- package/dist/backup/site/share-export-failure.d.ts +17 -0
- package/dist/backup/site/share-export-failure.js +16 -0
- package/dist/backup/site/share-file-policy.d.ts +60 -0
- package/dist/backup/site/share-file-policy.js +146 -0
- package/dist/backup/site/share-hosting.d.ts +107 -0
- package/dist/backup/site/share-hosting.js +148 -0
- package/dist/backup/site/share-preparation-steps.d.ts +180 -0
- package/dist/backup/site/share-preparation-steps.js +109 -0
- package/dist/backup/site/share-preparation.d.ts +122 -0
- package/dist/backup/site/share-preparation.js +43 -0
- package/dist/backup/site/share-refusal.d.ts +21 -0
- package/dist/backup/site/share-refusal.js +20 -0
- package/dist/backup/site/share-registry.d.ts +124 -0
- package/dist/backup/site/share-registry.js +219 -0
- package/dist/backup/site/share-retention.d.ts +62 -0
- package/dist/backup/site/share-retention.js +126 -0
- package/dist/backup/site/share-service.d.ts +128 -0
- package/dist/backup/site/share-service.js +194 -0
- package/dist/backup/site/share-zip.d.ts +115 -0
- package/dist/backup/site/share-zip.js +144 -0
- package/dist/backup/site/sources.d.ts +344 -0
- package/dist/backup/site/sources.js +595 -0
- package/dist/backup/site/static-copy.d.ts +122 -0
- package/dist/backup/site/static-copy.js +165 -0
- package/dist/backup/site/static-download-html.d.ts +76 -0
- package/dist/backup/site/static-download-html.js +149 -0
- package/dist/backup/site/static-download-landing.d.ts +52 -0
- package/dist/backup/site/static-download-landing.js +95 -0
- package/dist/backup/site/static-download-layout.d.ts +96 -0
- package/dist/backup/site/static-download-layout.js +325 -0
- package/dist/backup/site/static-export-selection.d.ts +50 -0
- package/dist/backup/site/static-export-selection.js +76 -0
- package/dist/backup/site/static-site-packager.d.ts +42 -0
- package/dist/backup/site/static-site-packager.js +32 -0
- package/dist/backup/site/tool-registrations.d.ts +74 -0
- package/dist/backup/site/tool-registrations.js +201 -0
- package/dist/checks/complexity-debt.d.ts +100 -0
- package/dist/checks/complexity-debt.js +131 -0
- package/dist/checks/coverage/diff.js +5 -1
- package/dist/checks/env-access.d.ts +14 -1
- package/dist/checks/env-access.js +92 -6
- package/dist/checks/live-verify-checks.d.ts +29 -0
- package/dist/checks/live-verify-checks.js +30 -0
- package/dist/checks/quality-gates.d.ts +137 -0
- package/dist/checks/quality-gates.js +209 -0
- package/dist/core/deploy-types.d.ts +2 -0
- package/dist/deploy/admin-http/site-update-status.d.ts +8 -0
- package/dist/deploy/admin-http/site-update-status.js +15 -0
- package/dist/deploy/host-kit.d.ts +3 -0
- package/dist/deploy/index.d.ts +6 -0
- package/dist/deploy/index.js +6 -0
- package/dist/deploy/ops-runner.js +7 -0
- package/dist/deploy/ops-tool-contracts.d.ts +10 -1
- package/dist/deploy/react/Deployment.d.ts +37 -0
- package/dist/deploy/react/Deployment.js +94 -0
- package/dist/deploy/react/DockerfileTab.d.ts +72 -0
- package/dist/deploy/react/DockerfileTab.js +131 -0
- package/dist/deploy/react/HistoryTab.d.ts +43 -0
- package/dist/deploy/react/HistoryTab.js +12 -0
- package/dist/deploy/react/OverviewTab.d.ts +60 -0
- package/dist/deploy/react/OverviewTab.js +75 -0
- package/dist/deploy/react/PublishRunResult.d.ts +5 -1
- package/dist/deploy/react/PublishRunResult.js +4 -4
- package/dist/deploy/react/SiteUpdateNotice.d.ts +22 -0
- package/dist/deploy/react/SiteUpdateNotice.js +25 -0
- package/dist/deploy/react/StaticCredentialFields.d.ts +36 -0
- package/dist/deploy/react/StaticCredentialFields.js +63 -0
- package/dist/deploy/react/StaticCredentialSteps.d.ts +23 -0
- package/dist/deploy/react/StaticCredentialSteps.js +155 -0
- package/dist/deploy/react/StaticExportCard.d.ts +11 -0
- package/dist/deploy/react/StaticExportCard.js +97 -0
- package/dist/deploy/react/StaticPublishCredentials.d.ts +50 -0
- package/dist/deploy/react/StaticPublishCredentials.js +77 -0
- package/dist/deploy/react/StaticPublishForm.d.ts +12 -0
- package/dist/deploy/react/StaticPublishForm.js +91 -0
- package/dist/deploy/react/StaticSiteTab.d.ts +207 -0
- package/dist/deploy/react/StaticSiteTab.js +117 -0
- package/dist/deploy/react/deployment-visuals.d.ts +207 -0
- package/dist/deploy/react/deployment-visuals.js +101 -0
- package/dist/deploy/react/download-dockerfile.d.ts +14 -0
- package/dist/deploy/react/download-dockerfile.js +15 -0
- package/dist/deploy/react/hooks/publish-credential-draft.d.ts +33 -0
- package/dist/deploy/react/hooks/publish-credential-draft.js +54 -0
- package/dist/deploy/react/hooks/publish-credential-selection.d.ts +13 -0
- package/dist/deploy/react/hooks/publish-credential-selection.js +34 -0
- package/dist/deploy/react/hooks/publish-credential-writes.d.ts +20 -0
- package/dist/deploy/react/hooks/publish-credential-writes.js +99 -0
- package/dist/deploy/react/hooks/static-publish-actions.d.ts +10 -0
- package/dist/deploy/react/hooks/static-publish-actions.js +62 -0
- package/dist/deploy/react/hooks/static-publish-form.hooks.d.ts +38 -0
- package/dist/deploy/react/hooks/static-publish-form.hooks.js +103 -0
- package/dist/deploy/react/hooks/static-publish-run.hooks.d.ts +28 -0
- package/dist/deploy/react/hooks/static-publish-run.hooks.js +92 -0
- package/dist/deploy/react/hooks/use-dockerfile-source.hooks.d.ts +148 -0
- package/dist/deploy/react/hooks/use-dockerfile-source.hooks.js +155 -0
- package/dist/deploy/react/hooks/use-publish-credentials.hooks.d.ts +268 -0
- package/dist/deploy/react/hooks/use-publish-credentials.hooks.js +52 -0
- package/dist/deploy/react/hooks/use-static-export.hooks.d.ts +128 -0
- package/dist/deploy/react/hooks/use-static-export.hooks.js +159 -0
- package/dist/deploy/react/hooks/use-static-publish.hooks.d.ts +208 -0
- package/dist/deploy/react/hooks/use-static-publish.hooks.js +48 -0
- package/dist/deploy/react/index.d.ts +4 -0
- package/dist/deploy/react/index.js +2 -0
- package/dist/deploy/react/rules.d.ts +363 -0
- package/dist/deploy/react/rules.js +314 -0
- package/dist/deploy/react/use-deployment-overview.hooks.d.ts +41 -0
- package/dist/deploy/react/use-deployment-overview.hooks.js +11 -0
- package/dist/deploy/site/agent-tools.d.ts +42 -0
- package/dist/deploy/site/agent-tools.js +119 -0
- package/dist/deploy/site/deploy-config-registry.d.ts +155 -0
- package/dist/deploy/site/deploy-config-registry.js +124 -0
- package/dist/deploy/site/deploy-config.d.ts +97 -0
- package/dist/deploy/site/deploy-config.js +115 -0
- package/dist/deploy/site/deploy-ops/agent-tools.d.ts +22 -0
- package/dist/deploy/site/deploy-ops/agent-tools.js +76 -0
- package/dist/deploy/site/deploy-ops/registry.d.ts +134 -0
- package/dist/deploy/site/deploy-ops/registry.js +106 -0
- package/dist/deploy/site/deploy-ops/run-ops.d.ts +66 -0
- package/dist/deploy/site/deploy-ops/run-ops.js +34 -0
- package/dist/deploy/site/deploy-ops/secret-confirm.d.ts +36 -0
- package/dist/deploy/site/deploy-ops/secret-confirm.js +27 -0
- package/dist/deploy/site/deploy-targets/host-kit.d.ts +28 -0
- package/dist/deploy/site/deploy-targets/host-kit.js +120 -0
- package/dist/deploy/site/deploy-targets/registry.d.ts +157 -0
- package/dist/deploy/site/deploy-targets/registry.js +132 -0
- package/dist/deploy/site/deploy-targets/types.d.ts +27 -0
- package/dist/deploy/site/deploy-targets/types.js +2 -0
- package/dist/deploy/site/dockerfile.d.ts +137 -0
- package/dist/deploy/site/dockerfile.js +101 -0
- package/dist/deploy/site/export-run.d.ts +137 -0
- package/dist/deploy/site/export-run.js +152 -0
- package/dist/deploy/site/ports.d.ts +115 -0
- package/dist/deploy/site/ports.js +2 -0
- package/dist/deploy/site/publish-agent-tools.d.ts +18 -0
- package/dist/deploy/site/publish-agent-tools.js +120 -0
- package/dist/deploy/site/publish-candidate.d.ts +26 -0
- package/dist/deploy/site/publish-candidate.js +37 -0
- package/dist/deploy/site/publish-credentials/account-label-heal-scheduler.d.ts +78 -0
- package/dist/deploy/site/publish-credentials/account-label-heal-scheduler.js +88 -0
- package/dist/deploy/site/publish-credentials/compatibility-port.d.ts +38 -0
- package/dist/deploy/site/publish-credentials/compatibility-port.js +19 -0
- package/dist/deploy/site/publish-credentials/execution-mode.d.ts +43 -0
- package/dist/deploy/site/publish-credentials/execution-mode.js +19 -0
- package/dist/deploy/site/publish-credentials/store-owner.d.ts +11 -0
- package/dist/deploy/site/publish-credentials/store-owner.js +9 -0
- package/dist/deploy/site/publish-credentials/store-resolution.d.ts +55 -0
- package/dist/deploy/site/publish-credentials/store-resolution.js +100 -0
- package/dist/deploy/site/publish-credentials/store-validation.d.ts +68 -0
- package/dist/deploy/site/publish-credentials/store-validation.js +182 -0
- package/dist/deploy/site/publish-credentials/store.d.ts +322 -0
- package/dist/deploy/site/publish-credentials/store.js +372 -0
- package/dist/deploy/site/publish-credentials/types.d.ts +85 -0
- package/dist/deploy/site/publish-credentials/types.js +2 -0
- package/dist/deploy/site/publish-tool-capabilities.d.ts +123 -0
- package/dist/deploy/site/publish-tool-capabilities.js +175 -0
- package/dist/deploy/site/publish-tool-credential.d.ts +48 -0
- package/dist/deploy/site/publish-tool-credential.js +284 -0
- package/dist/deploy/site/publish-tool-deps.d.ts +205 -0
- package/dist/deploy/site/publish-tool-deps.js +15 -0
- package/dist/deploy/site/publish-tool-execution.d.ts +78 -0
- package/dist/deploy/site/publish-tool-execution.js +313 -0
- package/dist/deploy/site/publish-tool-schema.d.ts +29 -0
- package/dist/deploy/site/publish-tool-schema.js +38 -0
- package/dist/deploy/site/static-publish/adapter-export.d.ts +54 -0
- package/dist/deploy/site/static-publish/adapter-export.js +89 -0
- package/dist/deploy/site/static-publish/adapter-plan.d.ts +99 -0
- package/dist/deploy/site/static-publish/adapter-plan.js +112 -0
- package/dist/deploy/site/static-publish/adapter.d.ts +182 -0
- package/dist/deploy/site/static-publish/adapter.js +321 -0
- package/dist/deploy/site/static-publish/admin-publish-read.d.ts +209 -0
- package/dist/deploy/site/static-publish/admin-publish-read.js +116 -0
- package/dist/deploy/site/static-publish/credentials.d.ts +110 -0
- package/dist/deploy/site/static-publish/credentials.js +290 -0
- package/dist/deploy/site/static-publish/domain-publish-rows.d.ts +25 -0
- package/dist/deploy/site/static-publish/domain-publish-rows.js +43 -0
- package/dist/deploy/site/static-publish/domain-publish-tool.d.ts +19 -0
- package/dist/deploy/site/static-publish/domain-publish-tool.js +111 -0
- package/dist/deploy/site/static-publish/inspection.d.ts +24 -0
- package/dist/deploy/site/static-publish/inspection.js +69 -0
- package/dist/deploy/site/static-publish/publish-history.d.ts +197 -0
- package/dist/deploy/site/static-publish/publish-history.js +153 -0
- package/dist/deploy/site/static-publish/publish-run.d.ts +156 -0
- package/dist/deploy/site/static-publish/publish-run.js +186 -0
- package/dist/deploy/site/static-publish/types.d.ts +165 -0
- package/dist/deploy/site/static-publish/types.js +2 -0
- package/dist/deploy/site/static-publish/verify.d.ts +217 -0
- package/dist/deploy/site/static-publish/verify.js +248 -0
- package/dist/deploy/site/tool-registrations.d.ts +97 -0
- package/dist/deploy/site/tool-registrations.js +130 -0
- package/dist/deploy/site/types.d.ts +51 -0
- package/dist/deploy/site/types.js +2 -0
- package/dist/deploy/site-update/check-for-update.d.ts +19 -0
- package/dist/deploy/site-update/check-for-update.js +19 -0
- package/dist/deploy/site-update/contracts.d.ts +161 -0
- package/dist/deploy/site-update/contracts.js +94 -0
- package/dist/deploy/site-update/desktop-site-update.d.ts +66 -0
- package/dist/deploy/site-update/desktop-site-update.js +43 -0
- package/dist/deploy/site-update/fake-site-update.d.ts +39 -0
- package/dist/deploy/site-update/fake-site-update.js +52 -0
- package/dist/deploy/site-update/run-site-update.d.ts +121 -0
- package/dist/deploy/site-update/run-site-update.js +219 -0
- package/dist/deploy/site-update/self-hosted-site-update.d.ts +71 -0
- package/dist/deploy/site-update/self-hosted-site-update.js +79 -0
- package/dist/deploy/target-contracts.d.ts +3 -0
- package/dist/deploy/tool.d.ts +5 -8
- package/dist/deploy/tool.js +6 -9
- package/dist/dns/binding-sweeper.d.ts +72 -0
- package/dist/dns/binding-sweeper.js +53 -0
- package/dist/dns/index.d.ts +1 -0
- package/dist/dns/index.js +1 -0
- package/dist/dns/site/binding.repo.d.ts +71 -0
- package/dist/dns/site/binding.repo.js +45 -0
- package/dist/dns/site/dns-changes.d.ts +90 -0
- package/dist/dns/site/dns-changes.js +271 -0
- package/dist/dns/site/dns-tools.d.ts +46 -0
- package/dist/dns/site/dns-tools.js +204 -0
- package/dist/dns/site/mail-dns-status.d.ts +111 -0
- package/dist/dns/site/mail-dns-status.js +190 -0
- package/dist/dns/site/mail-dns-tools.d.ts +33 -0
- package/dist/dns/site/mail-dns-tools.js +62 -0
- package/dist/dns/site/mail-requirements.d.ts +30 -0
- package/dist/dns/site/mail-requirements.js +78 -0
- package/dist/dns/site/tool-deps.d.ts +21 -0
- package/dist/dns/site/tool-deps.js +2 -0
- package/dist/dns/site/tools.d.ts +74 -0
- package/dist/dns/site/tools.js +124 -0
- package/dist/local-dev/bind-host.d.ts +80 -0
- package/dist/local-dev/bind-host.js +90 -0
- package/dist/local-dev/dev-proxy-upstream.d.ts +69 -0
- package/dist/local-dev/dev-proxy-upstream.js +63 -0
- package/dist/local-dev/index.d.ts +28 -0
- package/dist/local-dev/index.js +25 -0
- package/dist/packaging/electron/archive.d.ts +2 -9
- package/dist/packaging/electron/asar-adapter.d.ts +2 -1
- package/dist/packaging/electron/entry.d.ts +2 -0
- package/dist/packaging/electron/move-to-applications.d.ts +165 -0
- package/dist/packaging/electron/move-to-applications.js +162 -0
- package/dist/packaging/electron/policies.d.ts +33 -4
- package/dist/packaging/electron/policies.js +29 -10
- package/dist/packaging/electron/ports.d.ts +1 -6
- package/dist/packaging/electron/staging.d.ts +11 -2
- package/dist/packaging/electron/staging.js +15 -5
- package/dist/react/site-share-expiry/ShareExpiryControls.d.ts +29 -0
- package/dist/react/site-share-expiry/ShareExpiryControls.js +7 -0
- package/dist/react/site-share-expiry/index.d.ts +2 -0
- package/dist/react/site-share-expiry/index.js +2 -0
- package/dist/source-control/react/ProvidersTab.d.ts +98 -0
- package/dist/source-control/react/ProvidersTab.js +195 -0
- package/dist/source-control/react/SourceControl.d.ts +51 -0
- package/dist/source-control/react/SourceControl.js +61 -0
- package/dist/source-control/react/hooks/use-source-control-credentials.hooks.d.ts +128 -0
- package/dist/source-control/react/hooks/use-source-control-credentials.hooks.js +102 -0
- package/dist/source-control/react/rules.d.ts +167 -0
- package/dist/source-control/react/rules.js +125 -0
- package/dist/source-control/react/source-control-visuals.d.ts +75 -0
- package/dist/source-control/react/source-control-visuals.js +48 -0
- package/dist/source-control/site/agent-tools.d.ts +5 -0
- package/dist/source-control/site/agent-tools.js +30 -0
- package/dist/source-control/site/bundled-provider-registry.d.ts +33 -0
- package/dist/source-control/site/bundled-provider-registry.js +37 -0
- package/dist/source-control/site/commit-schema.d.ts +40 -0
- package/dist/source-control/site/commit-schema.js +29 -0
- package/dist/source-control/site/commit-target.d.ts +26 -0
- package/dist/source-control/site/commit-target.js +58 -0
- package/dist/source-control/site/credential-form.d.ts +36 -0
- package/dist/source-control/site/credential-form.js +102 -0
- package/dist/source-control/site/credential-setup.d.ts +107 -0
- package/dist/source-control/site/credential-setup.js +216 -0
- package/dist/source-control/site/provider-kit.d.ts +37 -0
- package/dist/source-control/site/provider-kit.js +35 -0
- package/dist/source-control/site/provider-module.d.ts +251 -0
- package/dist/source-control/site/provider-module.js +2 -0
- package/dist/source-control/site/saved-key-bindings.d.ts +4 -0
- package/dist/source-control/site/saved-key-bindings.js +4 -0
- package/dist/source-control/site/static-site-packager-port.d.ts +37 -0
- package/dist/source-control/site/static-site-packager-port.js +2 -0
- package/dist/source-control/site/store.d.ts +209 -0
- package/dist/source-control/site/store.js +374 -0
- package/dist/source-control/site/store.validation.d.ts +72 -0
- package/dist/source-control/site/store.validation.js +168 -0
- package/dist/source-control/site/tool-registrations.d.ts +190 -0
- package/dist/source-control/site/tool-registrations.js +379 -0
- package/dist/static-export/site/export-preflight.d.ts +48 -0
- package/dist/static-export/site/export-preflight.js +82 -0
- package/dist/static-export/site/media-original-urls.d.ts +57 -0
- package/dist/static-export/site/media-original-urls.js +109 -0
- package/dist/static-export/site/ports.d.ts +82 -0
- package/dist/static-export/site/ports.js +29 -0
- package/dist/static-export/site/public-origin-policy.d.ts +32 -0
- package/dist/static-export/site/public-origin-policy.js +68 -0
- package/dist/static-export/site/route-manifest.d.ts +65 -0
- package/dist/static-export/site/route-manifest.js +139 -0
- package/dist/static-export/site/site-exporter.d.ts +158 -0
- package/dist/static-export/site/site-exporter.js +112 -0
- package/dist/static-export/site/static-security-headers.d.ts +39 -0
- package/dist/static-export/site/static-security-headers.js +43 -0
- package/dist/static-export/site/theme-preview-manifest.d.ts +35 -0
- package/dist/static-export/site/theme-preview-manifest.js +28 -0
- package/package.json +911 -7
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { ComponentType, ChangeEvent } from "react";
|
|
2
|
+
import type { CredentialTokenHint } from "@jini-ai/core/contracts/site/secrets-credential-token";
|
|
3
|
+
import type { fieldHelpText } from "../../deploy/react/rules.js";
|
|
4
|
+
import { ConnectedMarkIcon } from "./source-control-visuals.js";
|
|
5
|
+
import type { SourceControlCredentialsController } from "./hooks/use-source-control-credentials.hooks.js";
|
|
6
|
+
/**
|
|
7
|
+
* @file The Providers tab — `SourceControl.tsx`'s one tab today, and this feature's actual content.
|
|
8
|
+
* Three always-visible rows — GitHub, GitLab, Bitbucket, in that order (GitHub is the one that
|
|
9
|
+
* matters; the other two are real connectable rows, not "coming soon" stubs) — never a second-level
|
|
10
|
+
* tab bar of their own. Moved here verbatim out of `SourceControl.tsx` in the 2026-08-16 page-shell
|
|
11
|
+
* pass — see that file's own header for why the row content did not change, only what wraps it.
|
|
12
|
+
*
|
|
13
|
+
* ## No outer `.card` — owner-corrected the same pass
|
|
14
|
+
*
|
|
15
|
+
* The first cut of this file wrapped the row list in its own `.card` (icon + "Providers"
|
|
16
|
+
* `card-title`) sitting under the `TabBar`. Owner's direct read: that is a card inside a card inside
|
|
17
|
+
* a tab — each `.source-control-row` below is ALREADY its own bordered surface, so a second
|
|
18
|
+
* bordered/background box around the whole list added a layer of chrome with no content of its own.
|
|
19
|
+
* `features/pages/Pages.tsx` (a real `TabBar`-driven list screen) never wraps its rows in a card
|
|
20
|
+
* either — `.card` there is reserved for an EMPTY state, not the populated list — so this tab now
|
|
21
|
+
* matches that: the rows render directly under the tab, no enclosing card. `SourceControlIcon`
|
|
22
|
+
* (`source-control-visuals.tsx`) lost its only call site here and is currently unused; left defined
|
|
23
|
+
* rather than deleted in case a later pass finds it a home.
|
|
24
|
+
*
|
|
25
|
+
* ## Second density pass (2026-08-16) — an accordion, not three open forms
|
|
26
|
+
*
|
|
27
|
+
* The page-shell pass above shipped, the owner looked at it twice, and both times called it "a wall
|
|
28
|
+
* of text" — the same complaint `deployment/StaticSiteTab.tsx`'s own "seventh pass" doc records for
|
|
29
|
+
* the identical symptom (all four of ITS providers' full credential forms rendering at once). That
|
|
30
|
+
* file's fix was a tab bar showing one provider's fields at a time; this page has no per-provider tab
|
|
31
|
+
* bar by deliberate, still-standing decision (see the top of this file), so the equivalent fix here
|
|
32
|
+
* is a native accordion: every row — connected or not — now renders behind `<details
|
|
33
|
+
* name="source-control-provider">`. The shared `name` makes the three rows one EXCLUSIVE group
|
|
34
|
+
* (Baseline since 2024 — Chrome 120, Safari 17.4, Firefox 129): opening one closes whichever other
|
|
35
|
+
* row was open, no click handler or React state involved, so it stays presentation-layer.
|
|
36
|
+
* {@link firstUnconnectedProviderId} decides which row starts open — the first one still needing a
|
|
37
|
+
* token — so a first-time visitor already sees the one form they came to fill in, not three, and the
|
|
38
|
+
* open row naturally advances to the next unconnected provider once the current one saves. This
|
|
39
|
+
* supersedes {@link SourceControlRowTodo}'s old "always open, there is nothing to disclose FROM here"
|
|
40
|
+
* reasoning (removed, not merely extended) — with three rows open at once that reasoning was exactly
|
|
41
|
+
* what produced the wall the owner flagged twice.
|
|
42
|
+
*
|
|
43
|
+
* The per-row subtitle ("Save a personal access token so the host can use this account.") was identical
|
|
44
|
+
* on all three rows and added nothing the heading plus the "Access token" field label didn't already
|
|
45
|
+
* say — cut, along with its now-orphaned translation key across all 21 locale dictionaries. The
|
|
46
|
+
* scope-guidance sentence stays exactly as owner-narrowed on 2026-08-15 (`rules.ts`'s own header) —
|
|
47
|
+
* cutting ITS words was never the ask, only its default visibility — so it now sits behind its own
|
|
48
|
+
* small nested "Which token do I need?" `<details>` inside {@link SourceControlCredentialFields},
|
|
49
|
+
* reachable in one click rather than always-rendered.
|
|
50
|
+
*
|
|
51
|
+
* ## Two defects this page was briefed NOT to inherit
|
|
52
|
+
*
|
|
53
|
+
* 1. A connected/collapsed row needs a VISIBLE expand affordance — a text label plus a chevron —
|
|
54
|
+
* never a bare clickable row. See {@link SourceControlRowSummary}'s own doc.
|
|
55
|
+
* 2. A saved-credential timestamp says "saved," never "updated" — "updated" falsely implies the
|
|
56
|
+
* token was recently re-verified, and a revoked token still shows that same timestamp. No
|
|
57
|
+
* token-liveness indicator is shown anywhere on this page either, for the same reason.
|
|
58
|
+
*
|
|
59
|
+
* This tab reuses `deployment/StaticSiteTab.tsx`'s `PublishCredentialFields` VISUAL pattern
|
|
60
|
+
* deliberately (connected/not-connected split, same hint-below-input idiom) but owns no code
|
|
61
|
+
* dependency on `features/deployment/` — two different agents were building the two features in the
|
|
62
|
+
* same session, and this page's own icons (`source-control-visuals.tsx`), CSS
|
|
63
|
+
* (`styles/source-control.css`), and hook plumbing are drawn fresh rather than imported
|
|
64
|
+
* cross-feature.
|
|
65
|
+
*/
|
|
66
|
+
export interface ProvidersTabProps {
|
|
67
|
+
useSourceControlCredentialsHook(): SourceControlCredentialsController;
|
|
68
|
+
useAdminLocaleHook(): string;
|
|
69
|
+
navigate(required: {
|
|
70
|
+
routePath: string;
|
|
71
|
+
}): void;
|
|
72
|
+
viewerTimeZone: string;
|
|
73
|
+
CredentialHint: ComponentType<{
|
|
74
|
+
hint?: CredentialTokenHint | null;
|
|
75
|
+
}>;
|
|
76
|
+
kit: {
|
|
77
|
+
SecretInput: ComponentType<{
|
|
78
|
+
label: string;
|
|
79
|
+
secret?: boolean;
|
|
80
|
+
id: string;
|
|
81
|
+
autoComplete: "new-password";
|
|
82
|
+
value: string;
|
|
83
|
+
onChange(event: ChangeEvent<HTMLInputElement>): void;
|
|
84
|
+
}>;
|
|
85
|
+
Icon: Parameters<typeof ConnectedMarkIcon>[0]["Icon"];
|
|
86
|
+
};
|
|
87
|
+
lineIcon: Parameters<typeof ConnectedMarkIcon>[0]["lineIcon"];
|
|
88
|
+
fieldHelpText: typeof fieldHelpText;
|
|
89
|
+
fieldNameHandleSegment(required: {
|
|
90
|
+
fieldName: string;
|
|
91
|
+
}, optional?: Record<string, never>): string;
|
|
92
|
+
copy: {
|
|
93
|
+
providersRegionLabel: string;
|
|
94
|
+
storedTokenHint: string;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export declare function ProvidersTab({ useAdminLocaleHook, useSourceControlCredentialsHook, ...props }: ProvidersTabProps): import("react").JSX.Element;
|
|
98
|
+
//# sourceMappingURL=ProvidersTab.d.ts.map
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { agentHandle } from "@jini-ai/core/agent-handles";
|
|
3
|
+
import { ConnectedMarkIcon, DisclosureChevronIcon } from "./source-control-visuals.js";
|
|
4
|
+
import { formatTimestamp } from '@jini-ai/core/text';
|
|
5
|
+
export function ProvidersTab({ useAdminLocaleHook, useSourceControlCredentialsHook, ...props }) {
|
|
6
|
+
// Subscribes to the admin locale so a language switch re-renders this tab; every string itself
|
|
7
|
+
// goes through the controller's own `t`.
|
|
8
|
+
useAdminLocaleHook();
|
|
9
|
+
const controller = useSourceControlCredentialsHook();
|
|
10
|
+
return (_jsxs("div", { className: "source-control-tab form-measure", ...agentHandle({ handle: "source-control-providers" }, {
|
|
11
|
+
role: "region",
|
|
12
|
+
label: props.copy.providersRegionLabel,
|
|
13
|
+
}), children: [_jsx(ProvidersNotice, { notice: controller.providersNotice }), _jsx(SourceControlCredentialsList, { controller: controller, t: controller.t, ...props }), _jsx(ManageAccessTokensLink, { t: controller.t, navigate: props.navigate })] }));
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Why a host is missing from the rows below, read-only (see `rules.ts`'s `sourceControlProvidersNotice`):
|
|
17
|
+
* the sentence carries the next step, the list the server's own reasons naming each plugin.
|
|
18
|
+
* @complexity O(r) in the reasons listed.
|
|
19
|
+
*/
|
|
20
|
+
function ProvidersNotice({ notice }) {
|
|
21
|
+
if (notice === null)
|
|
22
|
+
return null;
|
|
23
|
+
return (_jsxs("div", { className: "notice", role: "status", ...agentHandle({ handle: "source-control-providers-notice" }, { role: "status", label: "Why no source-control host is listed" }), "aria-label": "Why no source-control host is listed", children: [_jsx("p", { children: notice.message }), notice.reasons.length > 0 ? _jsx("ul", { children: notice.reasons.map((reason) => _jsx("li", { children: reason }, reason)) }) : null] }));
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Cross-link to the Access Tokens tab on the Security page — the same "ONE credential home" pattern
|
|
27
|
+
* `deployment/StaticSiteTab.tsx`'s own `ManageAccessTokensLink` documents (2026-08-16 owner ruling,
|
|
28
|
+
* `ADS-memory/reports/2026-08-17-source-control-ui.md`: "Security → Access Tokens is the ONE
|
|
29
|
+
* credential home. Source Control keeps only real source hosts; Static Site picks a saved
|
|
30
|
+
* credential."). The three rows above still handle the common case inline (one token per provider,
|
|
31
|
+
* paste-and-save) — this is the escape hatch to what only Security's Access Tokens tab can do: save a
|
|
32
|
+
* SECOND named token for GitHub/GitLab/Bitbucket, rename one, or manage every credential this install
|
|
33
|
+
* holds (including the four publish providers) in one place.
|
|
34
|
+
*
|
|
35
|
+
* Deliberately NOT a 7-`VendorId` picker — a picker built from `VendorId` would list static
|
|
36
|
+
* hosts and object stores as places to keep SOURCE CODE, which they are not; this page's own three rows
|
|
37
|
+
* (the source-control hosts plugins declare, `rules.ts`'s `sourceControlProviders`) are the correct,
|
|
38
|
+
* narrower provider set for what this page actually does.
|
|
39
|
+
* @complexity O(1) — no branches.
|
|
40
|
+
*/
|
|
41
|
+
function ManageAccessTokensLink({ t: translate, navigate }) {
|
|
42
|
+
return (_jsxs("p", { className: "source-control-action-reason", children: [translate("Need to save more than one token, rename one, or manage every saved credential in one place?"), " ", _jsx("button", { type: "button", className: "link-button", onClick: () => navigate({ routePath: "/access-tokens?tab=access-tokens" }), ...agentHandle({ handle: "source-control-manage-tokens-link" }, {
|
|
43
|
+
role: "button",
|
|
44
|
+
label: "Go to the Access Tokens tab on the Security page to create, rename, or manage saved tokens",
|
|
45
|
+
}), children: translate("Create access token") })] }));
|
|
46
|
+
}
|
|
47
|
+
/** The host rows — loading/error states, then one row per listed host (and per saved connection's
|
|
48
|
+
* unlisted host). Split out of {@link ProvidersTab} purely for the complexity gate, same reasoning every
|
|
49
|
+
* other per-section split in this app documents: this repo's real `host admin app` ESLint gate is a
|
|
50
|
+
* hard 9/9 cyclomatic/cognitive ceiling, and the loading/error branches plus the `.map()` counted
|
|
51
|
+
* directly in the tab component would have pushed it over budget alongside the header markup. */
|
|
52
|
+
function SourceControlCredentialsList({ controller, t: translate, ...props }) {
|
|
53
|
+
if (controller.loadError) {
|
|
54
|
+
return (_jsx("p", { className: "notice error", role: "status", ...agentHandle({ handle: "source-control-load-error" }, {
|
|
55
|
+
role: "status",
|
|
56
|
+
label: "Shows the error when saved source control connections could not be loaded",
|
|
57
|
+
}), children: controller.loadError }));
|
|
58
|
+
}
|
|
59
|
+
if (controller.rows === undefined) {
|
|
60
|
+
return _jsx("p", { className: "source-control-action-reason", children: translate("Loading connections…") });
|
|
61
|
+
}
|
|
62
|
+
const defaultOpenProviderId = firstUnconnectedProviderId(controller.rows);
|
|
63
|
+
return (_jsx("div", { className: "source-control-rows", children: controller.rows.map((row) => (_jsx(SourceControlProviderRow, { row: row, controller: controller, t: translate, defaultOpen: row.providerId === defaultOpenProviderId, ...props }, row.providerId))) }));
|
|
64
|
+
}
|
|
65
|
+
/** The first listed host still missing a saved connection, in row order —
|
|
66
|
+
* the one row {@link SourceControlProviderRow} defaults open. `undefined` once every provider is
|
|
67
|
+
* connected, matching every row starting collapsed (this file's own header explains why an
|
|
68
|
+
* accordion exists at all). Pure and React-free like this page's `rules.ts` helpers, but kept here
|
|
69
|
+
* rather than moved there: this decides a disclosure default, a presentation choice, not a fact
|
|
70
|
+
* about a credential — `rules.ts` stays the file with no opinion about what is open on screen.
|
|
71
|
+
* @complexity O(n) in the fixed, size-3 provider list. */
|
|
72
|
+
function firstUnconnectedProviderId(rows) {
|
|
73
|
+
return rows.find((row) => row.saved === undefined && row.info.listed)?.providerId;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* One provider's row — a native `<details name="source-control-provider">`, connected or not, so
|
|
77
|
+
* the three rows form one exclusive accordion group (this file's own header explains why). Replaces
|
|
78
|
+
* the old {@link SourceControlRowTodo}/{@link SourceControlRowDone} split: both states now share this
|
|
79
|
+
* one shell, differing only in the marker glyph and {@link SourceControlRowSummary}'s content —
|
|
80
|
+
* mirrors `PublishCredentialsSection`'s single-row-at-a-time shape in `deployment/StaticSiteTab.tsx`,
|
|
81
|
+
* built for the identical density complaint.
|
|
82
|
+
*
|
|
83
|
+
* `open={defaultOpen}` is intentionally uncontrolled: React sets it once per computed value and
|
|
84
|
+
* otherwise leaves the DOM alone (it never re-asserts a prop that hasn't itself changed), so a
|
|
85
|
+
* reader's own manual expand/collapse clicks survive re-renders of sibling rows — typing a token
|
|
86
|
+
* into THIS row does not fight the accordion state of another.
|
|
87
|
+
*
|
|
88
|
+
* ## Seam for the not-yet-built "reuse the publish token" affordance
|
|
89
|
+
*
|
|
90
|
+
* 2026-08-16 owner decision: when a not-yet-connected row's provider already has a matching
|
|
91
|
+
* Deployment publish credential saved (checked directly against the database this session — e.g.
|
|
92
|
+
* `publish_credential_sets` already has a static-hosting provider row for a workspace whose
|
|
93
|
+
* `source_control_credential_sets` is empty), this row should offer a one-click "reuse that
|
|
94
|
+
* credential" path instead of asking the operator to paste the same token twice. NOT built here —
|
|
95
|
+
* it needs a server-side read across both credential stores plus a decrypt-and-reseal from one
|
|
96
|
+
* sealed store into the other, both squarely outside this feature's fence (`lib/api.ts` wire types,
|
|
97
|
+
* `src/**`). Dispatched separately.
|
|
98
|
+
*
|
|
99
|
+
* The affordance's insertion point, once that data exists: directly below {@link
|
|
100
|
+
* SourceControlRowSummary}, ABOVE {@link SourceControlCredentialFields} — same "settled fact first,
|
|
101
|
+
* fields second" order the connected summary already establishes, so a reader sees "a hosting provider
|
|
102
|
+
* credential already exists" before being asked to type a new token into the fields underneath. It
|
|
103
|
+
* needs to read, per provider, from the controller: whether a matching publish credential exists,
|
|
104
|
+
* and when it was saved (same shape `AdminSourceControlCredentialSummary.updatedAt` already carries
|
|
105
|
+
* for THIS store's own rows) — `SourceControlCredentialsController`/`useSourceControlCredentialsHook`
|
|
106
|
+
* (`hooks/use-source-control-credentials.hooks.ts`) has neither field today; adding them is that
|
|
107
|
+
* follow-up's job, not this pass's. No placeholder button renders here in the meantime — an inert
|
|
108
|
+
* "Reuse token" control pointing at nothing would be a worse defect than the wait.
|
|
109
|
+
*/
|
|
110
|
+
function SourceControlProviderRow({ row, controller, t: translate, defaultOpen, ...props }) {
|
|
111
|
+
const info = row.info;
|
|
112
|
+
const connected = row.saved !== undefined;
|
|
113
|
+
return (_jsxs("details", { className: connected ? "source-control-row source-control-row-done" : "source-control-row", open: defaultOpen, name: "source-control-provider", ...agentHandle({ handle: `source-control-credentials-row-${row.providerId}` }, {
|
|
114
|
+
role: "region",
|
|
115
|
+
label: `${info.label}'s saved source control connection — ${connected ? "connected" : "not yet connected"}`,
|
|
116
|
+
}), children: [_jsx(SourceControlRowSummary, { row: row, label: info.label, connected: connected, t: translate, viewerTimeZone: props.viewerTimeZone, CredentialHint: props.CredentialHint, kit: props.kit, lineIcon: props.lineIcon }), info.listed ? (_jsx(SourceControlCredentialFields, { row: row, controller: controller, t: translate, kit: props.kit, lineIcon: props.lineIcon, fieldHelpText: props.fieldHelpText, fieldNameHandleSegment: props.fieldNameHandleSegment, copy: props.copy })) : (_jsx("p", { className: "field-hint", children: translate("Its plugin is off or missing. Remove this token on the Access tokens page.") }))] }));
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* A row's `<summary>` — split out of {@link SourceControlProviderRow} purely for this app's
|
|
120
|
+
* complexity gate, same reasoning every other per-state split in this file documents.
|
|
121
|
+
*
|
|
122
|
+
* Not-connected: an empty ring marker plus a heading ("Connect GitHub") — the heading text is
|
|
123
|
+
* already the call to action, so no separate subtitle repeats it (the old subtitle line, identical
|
|
124
|
+
* on all three rows, was cut for exactly this reason — see this file's own header).
|
|
125
|
+
*
|
|
126
|
+
* Connected: the same summary line this page has always shown — a filled checkmark marker, the
|
|
127
|
+
* settled trust fact ("token stored, encrypted"), and the SAVED time, never "updated" ("updated"
|
|
128
|
+
* would falsely imply the token was recently re-verified, and a revoked token still carries whatever
|
|
129
|
+
* timestamp is stored here regardless). No liveness/verification indicator is shown anywhere on this
|
|
130
|
+
* row — this admin has no way to check a token is still valid without trying to use it, and claiming
|
|
131
|
+
* otherwise would be exactly the kind of unbacked trust signal `CredentialStepDone`'s own doc in
|
|
132
|
+
* `deployment/StaticSiteTab.tsx` warns against.
|
|
133
|
+
*
|
|
134
|
+
* Both states end in a trailing chevron — connected pairs it with visible "Replace token" text,
|
|
135
|
+
* REQUIRED rather than a bare clickable row: a settled `<summary>` with its native disclosure
|
|
136
|
+
* triangle stripped and no replacement was owner-reported as undiscoverable on the Static Site tab's
|
|
137
|
+
* own credential rows (a reader with a rotated token had no way to tell the row could be reopened).
|
|
138
|
+
* The not-connected chevron carries no extra label — its own heading text is already the action, so a
|
|
139
|
+
* second "Add token" label next to it would repeat, not clarify.
|
|
140
|
+
*/
|
|
141
|
+
function SourceControlRowSummary({ row, label, connected, t: translate, viewerTimeZone, CredentialHint, kit: { Icon }, lineIcon, }) {
|
|
142
|
+
const saved = row.saved;
|
|
143
|
+
if (connected && !saved)
|
|
144
|
+
throw new Error(`source control provider ${row.providerId} has no saved credential`);
|
|
145
|
+
return (_jsxs("summary", { className: "source-control-row-summary", children: [_jsx("span", { className: connected ? "source-control-row-marker source-control-row-marker-done" : "source-control-row-marker", "aria-hidden": "true", children: connected ? _jsx(ConnectedMarkIcon, { Icon: Icon, lineIcon: lineIcon }) : null }), _jsx("span", { className: "source-control-row-summary-text", children: connected && saved ? (_jsxs(_Fragment, { children: [_jsx("span", { translate: "no", children: label }), " ", translate("connected"), " \u00B7 ", translate("token stored, encrypted"), " \u00B7", " ", translate("saved"), " ", formatTimestamp({ iso: saved.updatedAt }, { viewerTimeZone: viewerTimeZone }), " ", _jsx(CredentialHint, { ...(saved.tokenHint === undefined ? {} : { hint: saved.tokenHint }) })] })) : (_jsxs("h3", { className: "source-control-row-title", children: [translate("Connect"), " ", _jsx("span", { translate: "no", children: label })] })) }), _jsxs("span", { className: "source-control-row-summary-expand", children: [connected ? translate("Replace token") : null, _jsx(DisclosureChevronIcon, { Icon: Icon, lineIcon: lineIcon })] })] }));
|
|
146
|
+
}
|
|
147
|
+
/** Optional token guidance stays hidden behind its disclosure until requested. */
|
|
148
|
+
function SourceControlScopeGuidance({ info, providerId, t, Icon, lineIcon }) {
|
|
149
|
+
return _jsx(_Fragment, { children: info.scopeGuidanceKey !== "" || info.tokenPageUrl !== "" ? (_jsxs("details", { className: "source-control-scope-guidance", children: [_jsxs("summary", { className: "source-control-scope-guidance-summary", children: [t("Which token do I need?"), _jsx(DisclosureChevronIcon, { size: 10, Icon: Icon, lineIcon: lineIcon })] }), _jsxs("p", { className: "field-hint", children: [info.scopeGuidanceKey !== "" ? _jsxs(_Fragment, { children: [t(info.scopeGuidanceKey), " "] }) : null, info.tokenPageUrl !== "" ? (_jsx("a", { href: info.tokenPageUrl, target: "_blank", rel: "noreferrer", ...agentHandle({ handle: `source-control-credentials-token-page-${providerId}` }, {
|
|
150
|
+
role: "link",
|
|
151
|
+
label: `Open ${info.label}'s own page for creating a personal access token`,
|
|
152
|
+
}), children: t("Create a token") })) : null] })] })) : null });
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* A row's fields — token input, the host's other declared fields, and the Save action. Shared between
|
|
156
|
+
* both {@link SourceControlProviderRow} states, same split `PublishCredentialFields` uses in
|
|
157
|
+
* `deployment/StaticSiteTab.tsx` and for the same reason: the fields and Save behavior are
|
|
158
|
+
* identical in both states, only whether the reader has opened the row to see them differs.
|
|
159
|
+
*
|
|
160
|
+
* Every hint renders BELOW its input as `.field-hint`, never as placeholder text inside it — a
|
|
161
|
+
* placeholder sitting in an empty box reads as a saved value at a glance, the exact confusion the
|
|
162
|
+
* Static Site tab's own credential form was corrected out of. The inputs below
|
|
163
|
+
* carry no `placeholder` prop at all, connected or not.
|
|
164
|
+
*
|
|
165
|
+
* The scope-guidance sentence (which token, which scopes) sits behind its own nested "Which token do
|
|
166
|
+
* I need?" `<details>` rather than rendering by default — this file's own header records why: the
|
|
167
|
+
* words themselves are the owner's own 2026-08-15 narrowing (`rules.ts`), untouched here, only their
|
|
168
|
+
* default visibility changed. No `name` attribute on this inner `<details>` — it has nothing to stay
|
|
169
|
+
* exclusive WITH, and giving it the outer accordion's own group name would fold it into that group by
|
|
170
|
+
* mistake.
|
|
171
|
+
*/
|
|
172
|
+
function SourceControlCredentialFields({ row, controller, t: translate, kit: { SecretInput, Icon }, lineIcon, fieldHelpText, fieldNameHandleSegment, copy, }) {
|
|
173
|
+
const info = row.info;
|
|
174
|
+
const connected = row.saved !== undefined;
|
|
175
|
+
const tokenLabel = info.tokenLabel !== undefined ? translate(info.tokenLabel) : translate("Access token");
|
|
176
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "source-control-credential-fields", children: [_jsxs("div", { className: "field", children: [_jsx("label", { className: "field-label", htmlFor: `source-control-credentials-token-${row.providerId}`, children: tokenLabel }), _jsx(SecretInput, { label: tokenLabel, id: `source-control-credentials-token-${row.providerId}`,
|
|
177
|
+
// `new-password`, not `off` — Chrome ignores `off` on credential-shaped fields by
|
|
178
|
+
// design. See `security/AccessTokensTab.tsx`'s token input for the full reasoning.
|
|
179
|
+
autoComplete: "new-password", value: row.token, onChange: (e) => controller.setToken({ providerId: row.providerId, value: e.target.value }), ...agentHandle({ handle: `source-control-credentials-token-${row.providerId}` }, {
|
|
180
|
+
role: "field",
|
|
181
|
+
label: `${info.label} access token — stored encrypted, never shown again once saved`,
|
|
182
|
+
}) }), _jsx("p", { className: "field-hint", children: connected
|
|
183
|
+
? translate("Leave blank to keep the current token.")
|
|
184
|
+
: translate(copy.storedTokenHint) }), _jsx(SourceControlScopeGuidance, { info: info, providerId: row.providerId, t: translate, Icon: Icon, lineIcon: lineIcon })] }), info.fields.map((field) => {
|
|
185
|
+
const help = fieldHelpText({ field });
|
|
186
|
+
return _jsxs("div", { className: "field", children: [_jsx("label", { className: "field-label", htmlFor: `source-control-credentials-${fieldNameHandleSegment({ fieldName: field.name })}-${row.providerId}`, children: translate(field.label) }), _jsx(SecretInput, { label: translate(field.label), secret: field.secret === true, id: `source-control-credentials-${fieldNameHandleSegment({ fieldName: field.name })}-${row.providerId}`, autoComplete: "new-password", value: row.values[field.name] ?? "", onChange: (e) => controller.setField({ providerId: row.providerId, name: field.name, value: e.target.value }), ...agentHandle({ handle: `source-control-credentials-${fieldNameHandleSegment({ fieldName: field.name })}-${row.providerId}` }, {
|
|
187
|
+
role: "field",
|
|
188
|
+
label: `${info.label} ${field.label}`,
|
|
189
|
+
}) }), help !== undefined ? _jsx("p", { className: "field-hint", children: translate(help) }) : null] }, field.name);
|
|
190
|
+
})] }), _jsxs("div", { className: "source-control-action", children: [_jsx("button", { type: "button", disabled: !row.readyToSave || row.saving, onClick: () => void controller.save(row.providerId), ...agentHandle({ handle: `source-control-credentials-save-${row.providerId}` }, {
|
|
191
|
+
role: "button",
|
|
192
|
+
label: `Save the ${info.label} access token`,
|
|
193
|
+
}), children: row.saving ? translate("Saving…") : translate("Save") }), row.error ? (_jsx("p", { className: "save-error", role: "alert", children: row.error })) : null] })] }));
|
|
194
|
+
}
|
|
195
|
+
//# sourceMappingURL=ProvidersTab.js.map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from "react";
|
|
2
|
+
import type { AgentHandleProps } from "@jini-ai/core/agent-handles";
|
|
3
|
+
export interface SourceControlTabBarProps {
|
|
4
|
+
tabs: readonly {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
icon?: ReactNode | undefined;
|
|
8
|
+
handle?: string | undefined;
|
|
9
|
+
handleLabel?: string | undefined;
|
|
10
|
+
}[];
|
|
11
|
+
activeId: string;
|
|
12
|
+
onChange: (id: string) => void;
|
|
13
|
+
ariaLabel: string;
|
|
14
|
+
containerHandle?: string | undefined;
|
|
15
|
+
}
|
|
16
|
+
export interface SourceControlProps {
|
|
17
|
+
readonly classes: {
|
|
18
|
+
readonly page: string;
|
|
19
|
+
readonly pageHeader: string;
|
|
20
|
+
readonly pageHeaderText: string;
|
|
21
|
+
readonly pageKicker: string;
|
|
22
|
+
readonly pageTitle: string;
|
|
23
|
+
readonly pageDescription: string;
|
|
24
|
+
};
|
|
25
|
+
/** The `?tab=` query value from `panels.tsx`'s `source-control` route (`URLSearchParams.get`
|
|
26
|
+
* returns `null` when the param is absent). See {@link resolveSourceControlTabId}. */
|
|
27
|
+
tabId?: string | null | undefined;
|
|
28
|
+
useAdminLocaleHook: (required: Record<string, never>, optional?: Record<string, never>) => string;
|
|
29
|
+
t: (required: {
|
|
30
|
+
locale: string;
|
|
31
|
+
key: string;
|
|
32
|
+
}, optional?: Record<string, never>) => string;
|
|
33
|
+
resolveActiveTabId: (required: {
|
|
34
|
+
tabId: string | null | undefined;
|
|
35
|
+
validIds: readonly "providers"[];
|
|
36
|
+
defaultId: "providers";
|
|
37
|
+
}, optional?: Record<string, never>) => "providers";
|
|
38
|
+
TabBar: ComponentType<SourceControlTabBarProps>;
|
|
39
|
+
onTabChange: (required: {
|
|
40
|
+
nextTabId: string;
|
|
41
|
+
}, optional?: Record<string, never>) => void;
|
|
42
|
+
providerIcon: ReactNode;
|
|
43
|
+
providers: ReactNode;
|
|
44
|
+
headerAttrs: AgentHandleProps;
|
|
45
|
+
copy: {
|
|
46
|
+
descriptionKey: string;
|
|
47
|
+
providerTabHandleLabel: string;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export declare function SourceControl({ useAdminLocaleHook, t, resolveActiveTabId, TabBar, onTabChange, providerIcon, providers, headerAttrs, copy, classes, ...props }: SourceControlProps): import("react").JSX.Element;
|
|
51
|
+
//# sourceMappingURL=SourceControl.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @file The Source Control page (`/admin/source-control`) — a CONNECTION page, not git integration.
|
|
4
|
+
* See `ProvidersTab.tsx`'s own header for the scope boundary: save a personal access token per
|
|
5
|
+
* provider so the host can read (and later push to) repositories, nothing more yet.
|
|
6
|
+
*
|
|
7
|
+
* ## 2026-08-16 — page shell rebuilt on `TabBar`, superseding this file's own PREVIOUS "never a tab
|
|
8
|
+
* bar" decision
|
|
9
|
+
*
|
|
10
|
+
* This file used to hold every provider row directly, under a doc comment arguing explicitly
|
|
11
|
+
* against a tab bar: "three flat rows was the explicit brief... this page has no tab bar to begin
|
|
12
|
+
* with." That was a real, considered decision the owner made the day before (2026-08-15) — a
|
|
13
|
+
* same-week reversal, not drift or an agent's own judgment call — confirmed directly by the owner
|
|
14
|
+
* after seeing this page next to `deployment/Deployment.tsx`. A future reader who finds a tab bar
|
|
15
|
+
* here where a comment once forbade one should read THIS as the record of that reversal, not a sign
|
|
16
|
+
* the old comment was ignored. The page read as a settings-dialog panel dropped onto a route, not a
|
|
17
|
+
* page: it carried no `page-header`/`TabBar` shell at all, while its nearest neighbour,
|
|
18
|
+
* `deployment/Deployment.tsx`, does. This file now mirrors `Deployment.tsx`'s shell exactly — same
|
|
19
|
+
* `TabBar` (not `@jini-ai/ui`'s `SettingsDialogShell`, for the identical reason that file's own
|
|
20
|
+
* header gives: a dialog-shaped shell bundling its own sidebar plus a kicker/title/subtitle header
|
|
21
|
+
* fights a page's own `.page-header`), same {@link resolveSourceControlTabId} guard against a junk `?tab=`
|
|
22
|
+
* value, same `navigate(..., { replace: true })` on tab switch so the URL stays a correct deep link
|
|
23
|
+
* without growing back-button history one entry per click.
|
|
24
|
+
*
|
|
25
|
+
* The three provider rows themselves did NOT change — moved verbatim into `ProvidersTab.tsx`, this
|
|
26
|
+
* page's one tab today. "Flat rows, not sub-tabs" is still true one level down: GitHub, GitLab, and
|
|
27
|
+
* Bitbucket are still three parallel rows inside that one tab, never three tabs of their own — this
|
|
28
|
+
* pass only wraps that existing content in the page-level shell every other built Operations screen
|
|
29
|
+
* already has. Only one real tab exists because only one real thing is built here — commit history,
|
|
30
|
+
* sync, diffing, and branch management are still a separate, not-yet-started feature (see
|
|
31
|
+
* `ProvidersTab.tsx`'s header) — so {@link SOURCE_CONTROL_TAB_IDS} stays a list of one rather than
|
|
32
|
+
* padding itself out with a disabled placeholder tab for a feature that has not been spec'd yet.
|
|
33
|
+
* `panels.tsx`'s own "its own Operations entry, not a Deployment tab" reasoning is unaffected by any
|
|
34
|
+
* of this — that argument was always about this page's place in the top-level nav, not about
|
|
35
|
+
* whether it may have an internal tab bar of its own.
|
|
36
|
+
*/
|
|
37
|
+
const SOURCE_CONTROL_TAB_IDS = ["providers"];
|
|
38
|
+
/** Falls back to the one tab for an absent or unrecognized `?tab=` value. Delegates to the shared
|
|
39
|
+
* injected guard `Deployment.tsx`/`Security.tsx`/`Database.tsx`/
|
|
40
|
+
* `Themes.tsx` all use, for the same reason (a stale link or a typo must not blank the panel).
|
|
41
|
+
* Kept as a real function rather than inlined even with one tab today: `Deployment.tsx` started
|
|
42
|
+
* at five tabs where this guard mattered immediately, and a second real tab landing here later
|
|
43
|
+
* should not have to reintroduce it. */
|
|
44
|
+
function resolveSourceControlTabId({ tabId, resolveActiveTabId }, _optional = {}) {
|
|
45
|
+
return resolveActiveTabId({ tabId: tabId, validIds: SOURCE_CONTROL_TAB_IDS, defaultId: "providers" });
|
|
46
|
+
}
|
|
47
|
+
export function SourceControl({ useAdminLocaleHook, t, resolveActiveTabId, TabBar, onTabChange, providerIcon, providers, headerAttrs, copy, classes, ...props }) {
|
|
48
|
+
const locale = useAdminLocaleHook({});
|
|
49
|
+
const activeTabId = resolveSourceControlTabId({ tabId: props.tabId, resolveActiveTabId });
|
|
50
|
+
const tabs = [
|
|
51
|
+
{
|
|
52
|
+
id: "providers",
|
|
53
|
+
label: t({ locale: locale, key: "Providers" }),
|
|
54
|
+
icon: providerIcon,
|
|
55
|
+
handle: "source-control-tab-providers",
|
|
56
|
+
handleLabel: copy.providerTabHandleLabel,
|
|
57
|
+
},
|
|
58
|
+
];
|
|
59
|
+
return (_jsxs("div", { className: classes.page, children: [_jsx("div", { className: classes.pageHeader, ...headerAttrs, children: _jsxs("div", { className: classes.pageHeaderText, children: [_jsx("p", { className: classes.pageKicker, children: t({ locale: locale, key: "Operations" }) }), _jsx("h1", { className: classes.pageTitle, children: t({ locale: locale, key: "Source Control" }) }), _jsx("p", { className: classes.pageDescription, children: t({ locale: locale, key: copy.descriptionKey }) })] }) }), _jsx(TabBar, { ariaLabel: t({ locale: locale, key: "Source Control" }), tabs: tabs, activeId: activeTabId, onChange: (nextTabId) => onTabChange({ nextTabId }), containerHandle: "source-control-tab-bar" }), providers] }));
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=SourceControl.js.map
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { FetchQueryAdapter } from "@jini-ai/core/fetch";
|
|
2
|
+
import type { AdminSourceControlCredentialSummary, AdminSourceControlProviderId, AdminSourceControlProviderDescriptor, AdminSourceControlProvidersSnapshot, AdminSourceControlConnectionInput, SourceControlCredentialSubmitFailure } from "../rules.js";
|
|
3
|
+
import { type SourceControlProviderInfo } from "../rules.js";
|
|
4
|
+
import { type Translate } from '@jini-ai/core/text';
|
|
5
|
+
import { type SourceControlProvidersNotice } from "../rules.js";
|
|
6
|
+
/**
|
|
7
|
+
* @file The Source Control page's credential-management hook — one always-visible row per host
|
|
8
|
+
* (the hosts come from plugins, `GET .../system/source-control/providers`), each with its own token
|
|
9
|
+
* (plus any other declared field) input, save action, and connected/not status. Mirrors `deployment/hooks/use-publish-credentials.hooks.ts` closely — same flat-row shape,
|
|
10
|
+
* same optimistic local-state-after-write pattern, same create-vs-update-by-looking-at-what-exists
|
|
11
|
+
* decision — with two differences: no `executionMode` (this page has no CLI-first alternative path
|
|
12
|
+
* to branch on, unlike static publish), and `username` in place of `accountId` as the one provider
|
|
13
|
+
* (a source-control host, not a static host) that needs a field beyond the universal token.
|
|
14
|
+
*
|
|
15
|
+
* ## A stored credential is NEVER read back — this is why every row's inputs start blank
|
|
16
|
+
*
|
|
17
|
+
* `AdminSourceControlCredentialSummary` carries no token, no ciphertext, and no masked suffix. So a
|
|
18
|
+
* row's `token`/`username` draft state can only ever start blank, connected or not — a blank token
|
|
19
|
+
* at save time therefore means "nothing to change" on an already-connected row, not "the operator
|
|
20
|
+
* left it empty by mistake" (`sourceControlCredentialRowReadyToSave`, `rules.ts`, disables Save in
|
|
21
|
+
* that case rather than sending a no-op write).
|
|
22
|
+
*
|
|
23
|
+
* ## Save decides CREATE vs. UPDATE by looking at what is already there, not at UI mode
|
|
24
|
+
*
|
|
25
|
+
* {@link save} reads the provider's current DEFAULT connection via `rules.ts`'s
|
|
26
|
+
* `defaultSourceControlCredentialForProvider`. If one exists, save PUTs to its id, replacing the
|
|
27
|
+
* connection but leaving its own label untouched. If none exists, save POSTs a brand-new one
|
|
28
|
+
* labeled {@link SOURCE_CONTROL_CREDENTIAL_ROW_LABEL} — the one fixed label this flat-list UI ever
|
|
29
|
+
* writes.
|
|
30
|
+
*
|
|
31
|
+
* ## The row list is optimistically maintained locally, not refetched after every write
|
|
32
|
+
*
|
|
33
|
+
* `save` splices its own result into the local `credentials` array rather than re-running
|
|
34
|
+
* `listCredentials()` — one round trip per write. Draft `token`/`username` are cleared back to
|
|
35
|
+
* blank on a successful save.
|
|
36
|
+
*/
|
|
37
|
+
export interface SourceControlCredentialRowState {
|
|
38
|
+
readonly providerId: AdminSourceControlProviderId;
|
|
39
|
+
/** The host's label, guidance and declared fields; `listed: false` for a saved connection whose
|
|
40
|
+
* plugin is off or missing (shown, but no form). */
|
|
41
|
+
readonly info: SourceControlProviderInfo;
|
|
42
|
+
/** This provider's saved DEFAULT connection, if any — `undefined` means "not connected yet". */
|
|
43
|
+
readonly saved: AdminSourceControlCredentialSummary | undefined;
|
|
44
|
+
readonly token: string;
|
|
45
|
+
/** The host's other declared fields, keyed by field name. */
|
|
46
|
+
readonly values: Readonly<Record<string, string>>;
|
|
47
|
+
/** Whether Save may be pressed, from `rules.ts`'s readiness gate. */
|
|
48
|
+
readonly readyToSave: boolean;
|
|
49
|
+
readonly saving: boolean;
|
|
50
|
+
readonly error: string | null;
|
|
51
|
+
}
|
|
52
|
+
export interface SourceControlCredentialsController {
|
|
53
|
+
/** One entry per listed host, then one per saved connection's unlisted host — `undefined` until
|
|
54
|
+
* both the hosts and the saved connections first load. */
|
|
55
|
+
rows: readonly SourceControlCredentialRowState[] | undefined;
|
|
56
|
+
loadError: string | null;
|
|
57
|
+
/** Why a host is missing (load failure, plugin refusals, switched-off plugins); `null` when none is. */
|
|
58
|
+
providersNotice: SourceControlProvidersNotice | null;
|
|
59
|
+
setToken: (required: {
|
|
60
|
+
providerId: AdminSourceControlProviderId;
|
|
61
|
+
value: string;
|
|
62
|
+
}, optional?: Record<string, never>) => void;
|
|
63
|
+
/** Sets one of the host's other declared fields. */
|
|
64
|
+
setField: (required: {
|
|
65
|
+
providerId: AdminSourceControlProviderId;
|
|
66
|
+
name: string;
|
|
67
|
+
value: string;
|
|
68
|
+
}, optional?: Record<string, never>) => void;
|
|
69
|
+
/** Creates or replaces one provider's saved connection from its own row's current draft — see
|
|
70
|
+
* this file's header for the create-vs-update decision. A no-op when the row is not ready.
|
|
71
|
+
* Resolves either way — a failure is surfaced through that row's own `error`. */
|
|
72
|
+
save: (providerId: AdminSourceControlProviderId) => Promise<void>;
|
|
73
|
+
t: Translate;
|
|
74
|
+
}
|
|
75
|
+
export declare function useSourceControlCredentials({ port, t, locale, useFetchQueryHook, localizeSourceControlProviders, credentialDraftError, translateCredentialMessage, describeApiError, sourceControlCredentialsLoadErrorMessage, sourceControlCredentialSaveErrorMessage, classifyCredentialSubmitError }: {
|
|
76
|
+
port: {
|
|
77
|
+
listProviders(): Promise<AdminSourceControlProvidersSnapshot>;
|
|
78
|
+
listCredentials(): Promise<{
|
|
79
|
+
credentials: AdminSourceControlCredentialSummary[];
|
|
80
|
+
}>;
|
|
81
|
+
createCredential(input: {
|
|
82
|
+
label: string;
|
|
83
|
+
connection: AdminSourceControlConnectionInput;
|
|
84
|
+
isDefault?: boolean;
|
|
85
|
+
}): Promise<AdminSourceControlCredentialSummary>;
|
|
86
|
+
updateCredential(required: {
|
|
87
|
+
id: string;
|
|
88
|
+
input: {
|
|
89
|
+
label?: string;
|
|
90
|
+
connection?: AdminSourceControlConnectionInput;
|
|
91
|
+
isDefault?: boolean;
|
|
92
|
+
};
|
|
93
|
+
}, optional?: Record<string, never>): Promise<AdminSourceControlCredentialSummary>;
|
|
94
|
+
};
|
|
95
|
+
t: Translate;
|
|
96
|
+
locale: string;
|
|
97
|
+
useFetchQueryHook: FetchQueryAdapter["useFetchQuery"];
|
|
98
|
+
localizeSourceControlProviders(required: {
|
|
99
|
+
providers: AdminSourceControlProviderDescriptor[];
|
|
100
|
+
locale: string;
|
|
101
|
+
}): AdminSourceControlProviderDescriptor[];
|
|
102
|
+
credentialDraftError(required: {
|
|
103
|
+
value: string;
|
|
104
|
+
}, optional: {
|
|
105
|
+
locale: string;
|
|
106
|
+
required?: boolean;
|
|
107
|
+
}): string | null;
|
|
108
|
+
translateCredentialMessage(required: {
|
|
109
|
+
message: string;
|
|
110
|
+
locale: string;
|
|
111
|
+
}): string;
|
|
112
|
+
describeApiError(required: {
|
|
113
|
+
e: unknown;
|
|
114
|
+
fallback: string;
|
|
115
|
+
}): string;
|
|
116
|
+
sourceControlCredentialsLoadErrorMessage(required: {
|
|
117
|
+
locale: string;
|
|
118
|
+
error: string;
|
|
119
|
+
}): string;
|
|
120
|
+
sourceControlCredentialSaveErrorMessage(required: {
|
|
121
|
+
locale: string;
|
|
122
|
+
error: string;
|
|
123
|
+
}): string;
|
|
124
|
+
classifyCredentialSubmitError(required: {
|
|
125
|
+
error: unknown;
|
|
126
|
+
}): SourceControlCredentialSubmitFailure;
|
|
127
|
+
}, _optional?: Record<string, never>): SourceControlCredentialsController;
|
|
128
|
+
//# sourceMappingURL=use-source-control-credentials.hooks.d.ts.map
|