@jini-ai/devops 0.7.3-next.2 → 0.7.4
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 +7 -0
- 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 +158 -0
- package/dist/backup/site/backup-service.d.ts +336 -0
- package/dist/backup/site/backup-service.js +127 -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 +94 -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 +39 -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 +197 -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 +210 -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 +107 -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 +75 -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 +204 -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/coverage/lcov.js +1 -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 +152 -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 +130 -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 +321 -0
- package/dist/deploy/site/publish-credentials/store.js +367 -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 +118 -0
- package/dist/deploy/site/static-publish/credentials.d.ts +114 -0
- package/dist/deploy/site/static-publish/credentials.js +298 -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 +168 -0
- package/dist/deploy/site/static-publish/types.js +2 -0
- package/dist/deploy/site/static-publish/verify.d.ts +237 -0
- package/dist/deploy/site/static-publish/verify.js +284 -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/packaging/electron/update-manifest-merge.js +0 -2
- 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/asset-crawl.d.ts +30 -0
- package/dist/static-export/asset-crawl.js +71 -0
- package/dist/static-export/dynamic-asset-locations.d.ts +23 -0
- package/dist/static-export/dynamic-asset-locations.js +34 -0
- package/dist/static-export/html-url-locations.d.ts +3 -1
- package/dist/static-export/html-url-locations.js +43 -9
- package/dist/static-export/runner.js +26 -27
- 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/dist/static-export/transforms.d.ts +1 -1
- package/dist/static-export/transforms.js +3 -3
- package/package.json +911 -7
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { SourceControlKitHttpClient, SourceControlProviderKit } from "./provider-module.js";
|
|
2
|
+
/**
|
|
3
|
+
* @file Builds the {@link SourceControlProviderKit} core hands a git-host provider module
|
|
4
|
+
* (`provider-module.ts`). The kit is the module's only way to reach anything but Node builtins.
|
|
5
|
+
*/
|
|
6
|
+
/** What the host supplies so the kit can describe and trace its own transport. */
|
|
7
|
+
export interface SourceControlKitHost {
|
|
8
|
+
/** Describes a transport failure: the caller-safe `refusal` text when `error` is the host's egress-policy refusal
|
|
9
|
+
* (else `undefined`), and the redacted `logDetail` the host wants logged. The kit passes the raw error, never formats it. */
|
|
10
|
+
describeTransportError(required: {
|
|
11
|
+
error: unknown;
|
|
12
|
+
}): {
|
|
13
|
+
readonly refusal: string | undefined;
|
|
14
|
+
readonly logDetail: string;
|
|
15
|
+
};
|
|
16
|
+
/** Wraps the raw `fetch` so each `kit.fetch` is recorded as one outbound span (host/status only). Absent: untraced. */
|
|
17
|
+
observeFetch?(required: {
|
|
18
|
+
fetch: typeof fetch;
|
|
19
|
+
}): typeof fetch;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @param required.host - The host's transport-failure describer and optional fetch tracer.
|
|
23
|
+
* The guarded `httpClient` is traced where it is built, not here.
|
|
24
|
+
* @param optional.httpClient - The guarded client for credentialed custom-credential calls, handed
|
|
25
|
+
* to the module as-is (it already speaks the module's positional ABI).
|
|
26
|
+
* @param optional.fetchFn - Replaces global `fetch` (tests); otherwise `fetch` is looked up per call.
|
|
27
|
+
* @param optional.sleep - Replaces the retry timer (tests).
|
|
28
|
+
* @complexity O(1).
|
|
29
|
+
*/
|
|
30
|
+
export declare function createSourceControlProviderKit(required: {
|
|
31
|
+
readonly host: SourceControlKitHost;
|
|
32
|
+
}, optional?: {
|
|
33
|
+
readonly httpClient?: SourceControlKitHttpClient;
|
|
34
|
+
readonly fetchFn?: typeof fetch;
|
|
35
|
+
readonly sleep?: (ms: number) => Promise<void>;
|
|
36
|
+
}): SourceControlProviderKit;
|
|
37
|
+
//# sourceMappingURL=provider-kit.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createSourceControlProviderKit as createKit } from "../kit.js";
|
|
2
|
+
/** Stands in when a caller has no guarded HTTP client (the admin credential form only probes an
|
|
3
|
+
* account name, through `fetch`). A call through it fails as a transport error, never silently. */
|
|
4
|
+
const NO_HTTP_CLIENT = {
|
|
5
|
+
send: () => Promise.reject(new Error("no outbound HTTP client is wired for this call")),
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* @param required.host - The host's transport-failure describer and optional fetch tracer.
|
|
9
|
+
* The guarded `httpClient` is traced where it is built, not here.
|
|
10
|
+
* @param optional.httpClient - The guarded client for credentialed custom-credential calls, handed
|
|
11
|
+
* to the module as-is (it already speaks the module's positional ABI).
|
|
12
|
+
* @param optional.fetchFn - Replaces global `fetch` (tests); otherwise `fetch` is looked up per call.
|
|
13
|
+
* @param optional.sleep - Replaces the retry timer (tests).
|
|
14
|
+
* @complexity O(1).
|
|
15
|
+
*/
|
|
16
|
+
export function createSourceControlProviderKit(required, optional = {}) {
|
|
17
|
+
const { host } = required;
|
|
18
|
+
const send = (url, init) => (optional.fetchFn ?? fetch)(url, init);
|
|
19
|
+
const httpClient = optional.httpClient ?? NO_HTTP_CLIENT;
|
|
20
|
+
const kit = createKit({ httpClient: { send: ({ request }) => httpClient.send(request) },
|
|
21
|
+
fetch: ({ url }, options = {}) => (host.observeFetch ? host.observeFetch({ fetch: send }) : send)(url, options.init ?? {}),
|
|
22
|
+
describeTransportError: ({ error }) => host.describeTransportError({ error }), }, { fetchRedirectPolicy: "caller" });
|
|
23
|
+
return {
|
|
24
|
+
repositoryPaths: kit.repositoryPaths,
|
|
25
|
+
// why: positional on purpose: the plugin module ABI (see SourceControlProviderKit).
|
|
26
|
+
fetch: (url, init) => kit.fetch({ url, init }),
|
|
27
|
+
redirectGuardInit: init => kit.redirectGuardInit({ init }),
|
|
28
|
+
assertNotRedirected: (response, hostName) => kit.assertNotRedirected({ response, hostName }),
|
|
29
|
+
isRedirectRefusal: error => kit.isRedirectRefusal({ error }),
|
|
30
|
+
httpClient,
|
|
31
|
+
describeTransportError: error => kit.describeTransportError({ error }),
|
|
32
|
+
sleep: optional.sleep ?? (ms => new Promise(resolve => setTimeout(resolve, ms))),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=provider-kit.js.map
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import type { HttpRequest, HttpResponse, RequestRedirect } from "@jini-ai/core/primitives";
|
|
2
|
+
import type { BackupRepositoryState } from "../contracts.js";
|
|
3
|
+
/**
|
|
4
|
+
* @file The contract a git-host provider MODULE (shipped inside an Agent Plugin) is written against.
|
|
5
|
+
*
|
|
6
|
+
* Git-host vendors live in plugins, not core (the bundled `github` plugin ships
|
|
7
|
+
* `@jini-ai/agent-plugins/github/source-control/github.mjs` today). Core loads a plugin's module
|
|
8
|
+
* through the host's provider registry, builds it with a
|
|
9
|
+
* {@link SourceControlProviderKit}, and calls the generic operations below: committing the site's
|
|
10
|
+
* static export (`source_control_execute_commit`), reading a token's account name (the admin Source
|
|
11
|
+
* Control page), writing files through a saved custom credential (`custom_credential_write_files`)
|
|
12
|
+
* and pushing a site backup (`site_backup_*`). Saved API-key labels in `saved-key-bindings.ts` are the host's credential
|
|
13
|
+
* bindings; vendor operations remain in the plugin.
|
|
14
|
+
*
|
|
15
|
+
* Every operation reports failure as a value, never a throw. `network-unreachable` always means no
|
|
16
|
+
* response arrived (so says nothing about the credential); `provider-error` means the host answered
|
|
17
|
+
* and refused; `diverged` means the branch moved and nothing was overwritten.
|
|
18
|
+
*/
|
|
19
|
+
/** One file of a site export, relative to the selected folder. The provider prefixes it once. */
|
|
20
|
+
export interface CommitFile {
|
|
21
|
+
readonly path: string;
|
|
22
|
+
readonly data: string | Buffer;
|
|
23
|
+
}
|
|
24
|
+
/** One commit of a full site export: the result of {@link SourceControlProvider.commitSite}. */
|
|
25
|
+
export type SourceControlCommitResult = {
|
|
26
|
+
ok: true;
|
|
27
|
+
branch: string;
|
|
28
|
+
branchCreated: boolean;
|
|
29
|
+
commitSha: string;
|
|
30
|
+
commitUrl: string;
|
|
31
|
+
filesChanged: number;
|
|
32
|
+
filesDeleted: number;
|
|
33
|
+
/** Paths a previous export owned that this one dropped but that were NOT deleted, because their
|
|
34
|
+
* live content no longer matches what was written (or was never recorded). Optional so a test
|
|
35
|
+
* double may omit it. */
|
|
36
|
+
divergedPaths?: readonly string[];
|
|
37
|
+
} | {
|
|
38
|
+
ok: false;
|
|
39
|
+
code: "repository-not-found" | "no-changes" | "diverged" | "network-unreachable" | "provider-error";
|
|
40
|
+
message: string;
|
|
41
|
+
};
|
|
42
|
+
export interface CommitSiteInput {
|
|
43
|
+
readonly folder?: string;
|
|
44
|
+
readonly previousManagedManifestPath?: string;
|
|
45
|
+
readonly token: string;
|
|
46
|
+
readonly owner: string;
|
|
47
|
+
readonly repo: string;
|
|
48
|
+
/** The repository's default branch when omitted. */
|
|
49
|
+
readonly branch?: string;
|
|
50
|
+
readonly commitMessage: string;
|
|
51
|
+
readonly files: readonly CommitFile[];
|
|
52
|
+
}
|
|
53
|
+
/** A failure of a credentialed call. `logDetail` is for the server log only, never the model. */
|
|
54
|
+
export type ProviderCallFailure = {
|
|
55
|
+
ok: false;
|
|
56
|
+
code: "provider-error";
|
|
57
|
+
message: string;
|
|
58
|
+
} | {
|
|
59
|
+
ok: false;
|
|
60
|
+
code: "network-unreachable";
|
|
61
|
+
message: string;
|
|
62
|
+
logDetail: string;
|
|
63
|
+
};
|
|
64
|
+
/** Where a custom-credential call goes: the credential's own API base URL plus the ready-made
|
|
65
|
+
* `Authorization` header core built from the saved connection. */
|
|
66
|
+
export interface CredentialedRepositoryTarget {
|
|
67
|
+
readonly baseUrl: string;
|
|
68
|
+
readonly authorization: string;
|
|
69
|
+
readonly owner: string;
|
|
70
|
+
readonly repo: string;
|
|
71
|
+
}
|
|
72
|
+
export interface WriteFile {
|
|
73
|
+
readonly path: string;
|
|
74
|
+
readonly content: string;
|
|
75
|
+
}
|
|
76
|
+
export interface FileWriteState {
|
|
77
|
+
readonly path: string;
|
|
78
|
+
readonly exists: boolean;
|
|
79
|
+
}
|
|
80
|
+
/** The read-only reconnaissance a confirmed write builds on, so the commit lands on exactly the tree
|
|
81
|
+
* the human was shown. */
|
|
82
|
+
export interface FileWritePlan {
|
|
83
|
+
readonly parentCommitSha: string;
|
|
84
|
+
readonly baseTreeSha: string;
|
|
85
|
+
readonly fileStates: readonly FileWriteState[];
|
|
86
|
+
}
|
|
87
|
+
export type FileWritePlanResult = {
|
|
88
|
+
ok: true;
|
|
89
|
+
plan: FileWritePlan;
|
|
90
|
+
} | {
|
|
91
|
+
ok: false;
|
|
92
|
+
code: "branch-not-found";
|
|
93
|
+
message: string;
|
|
94
|
+
} | ProviderCallFailure;
|
|
95
|
+
export type CommitFilesResult = {
|
|
96
|
+
ok: true;
|
|
97
|
+
commitSha: string;
|
|
98
|
+
commitUrl: string;
|
|
99
|
+
} | {
|
|
100
|
+
ok: false;
|
|
101
|
+
code: "diverged";
|
|
102
|
+
message: string;
|
|
103
|
+
} | ProviderCallFailure;
|
|
104
|
+
export type InspectBackupRepositoryFailureCode = "repo-not-found" | "repo-not-private" | "no-push-permission" | "repo-empty" | "branch-not-found" | "folder-is-file";
|
|
105
|
+
export type InspectBackupRepositoryResult = {
|
|
106
|
+
ok: true;
|
|
107
|
+
state: BackupRepositoryState;
|
|
108
|
+
} | {
|
|
109
|
+
ok: false;
|
|
110
|
+
code: InspectBackupRepositoryFailureCode;
|
|
111
|
+
message: string;
|
|
112
|
+
} | ProviderCallFailure;
|
|
113
|
+
export interface UploadedBackupBlob {
|
|
114
|
+
readonly path: string;
|
|
115
|
+
readonly blobSha: string;
|
|
116
|
+
readonly bytes: number;
|
|
117
|
+
readonly sha256: string;
|
|
118
|
+
}
|
|
119
|
+
/** A small UTF-8 file sent inside the tree request instead of as its own blob, for a provider that
|
|
120
|
+
* accepts that ({@link SourceControlProviderOperations.backupInlineTextMaxBytes}). */
|
|
121
|
+
export interface InlineBackupText {
|
|
122
|
+
readonly path: string;
|
|
123
|
+
readonly text: string;
|
|
124
|
+
readonly bytes: number;
|
|
125
|
+
readonly sha256: string;
|
|
126
|
+
}
|
|
127
|
+
export type BackupTreeEntry = UploadedBackupBlob | InlineBackupText;
|
|
128
|
+
export interface CommitBackupTreeInput extends CredentialedRepositoryTarget {
|
|
129
|
+
readonly branch: string;
|
|
130
|
+
readonly folder: string;
|
|
131
|
+
readonly commitMessage: string;
|
|
132
|
+
readonly parentCommitSha: string;
|
|
133
|
+
readonly baseTreeSha: string;
|
|
134
|
+
readonly htmlUrl: string;
|
|
135
|
+
readonly entries: readonly BackupTreeEntry[];
|
|
136
|
+
}
|
|
137
|
+
/** The host facts a plugin DECLARES in `jini-source-control.json` (`provider-registry.ts`), carried
|
|
138
|
+
* on every built provider so core copy and checks can name the host without hard-coding one. */
|
|
139
|
+
export interface SourceControlHostFacts {
|
|
140
|
+
/** The `source_control_credential_sets.provider_id` this host serves. */
|
|
141
|
+
readonly id: string;
|
|
142
|
+
/** The host's display name ("GitHub"). */
|
|
143
|
+
readonly label: string;
|
|
144
|
+
/** The API origin a saved custom credential for this host points at (used to pick one when the
|
|
145
|
+
* caller named none). */
|
|
146
|
+
readonly apiOrigin: string;
|
|
147
|
+
/** The largest single file the host accepts in a push, when it has such a limit. */
|
|
148
|
+
readonly maxFileBytes?: number;
|
|
149
|
+
/** Repository folders the host gives a meaning of its own (GitHub runs whatever is under
|
|
150
|
+
* `.github/workflows`), so a site backup is never written into or under one. Compared
|
|
151
|
+
* case-insensitively. */
|
|
152
|
+
readonly reservedPaths?: readonly string[];
|
|
153
|
+
/** Repository folders whose files the host RUNS automatically (GitHub: `.github/workflows`), so a
|
|
154
|
+
* write confirmation names such a file with an extra warning. Compared exactly and
|
|
155
|
+
* case-sensitively, from the repository root: the host recognizes no other spelling. */
|
|
156
|
+
readonly workflowPaths?: readonly string[];
|
|
157
|
+
}
|
|
158
|
+
/** What a provider module's `create()` returns: the operations only. */
|
|
159
|
+
export interface SourceControlProviderOperations {
|
|
160
|
+
commitSite(input: CommitSiteInput): Promise<SourceControlCommitResult>;
|
|
161
|
+
/** The account name a token belongs to, or `null` when it cannot be learned. Never throws. */
|
|
162
|
+
readAccountLabel(token: string): Promise<string | null>;
|
|
163
|
+
planFileWrite(input: CredentialedRepositoryTarget & {
|
|
164
|
+
readonly branch: string;
|
|
165
|
+
readonly files: readonly WriteFile[];
|
|
166
|
+
}): Promise<FileWritePlanResult>;
|
|
167
|
+
commitFiles(input: CredentialedRepositoryTarget & {
|
|
168
|
+
readonly branch: string;
|
|
169
|
+
readonly commitMessage: string;
|
|
170
|
+
readonly files: readonly WriteFile[];
|
|
171
|
+
}, plan: FileWritePlan): Promise<CommitFilesResult>;
|
|
172
|
+
/** The largest UTF-8 file {@link commitBackupTree} accepts inline as an {@link InlineBackupText}
|
|
173
|
+
* instead of an uploaded blob. Absent: every file is uploaded with {@link uploadBackupBlob}. */
|
|
174
|
+
readonly backupInlineTextMaxBytes?: number;
|
|
175
|
+
inspectBackupRepository(input: CredentialedRepositoryTarget & {
|
|
176
|
+
readonly branch?: string;
|
|
177
|
+
readonly folder: string;
|
|
178
|
+
}): Promise<InspectBackupRepositoryResult>;
|
|
179
|
+
uploadBackupBlob(target: CredentialedRepositoryTarget, file: {
|
|
180
|
+
readonly path: string;
|
|
181
|
+
readonly content: Uint8Array;
|
|
182
|
+
}): Promise<{
|
|
183
|
+
ok: true;
|
|
184
|
+
blob: UploadedBackupBlob;
|
|
185
|
+
} | ProviderCallFailure>;
|
|
186
|
+
commitBackupTree(input: CommitBackupTreeInput): Promise<CommitFilesResult>;
|
|
187
|
+
}
|
|
188
|
+
/** A built provider: the module's operations plus the host facts its plugin declares, and the
|
|
189
|
+
* module's own owner/repo rules when it has them. */
|
|
190
|
+
export type SourceControlProvider = SourceControlProviderOperations & SourceControlHostFacts & {
|
|
191
|
+
readonly supportsFolder?: boolean;
|
|
192
|
+
readonly validateTarget?: RepositoryTargetValidator;
|
|
193
|
+
};
|
|
194
|
+
/** A transport error, described without leaking it: `refusal` is set (caller-safe text) only when the
|
|
195
|
+
* egress policy refused the request; `logDetail` is for the server log. */
|
|
196
|
+
export interface DescribedTransportError {
|
|
197
|
+
readonly refusal: string | undefined;
|
|
198
|
+
readonly logDetail: string;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* What a module may call that is not a Node builtin: a plugin ships no npm dependencies.
|
|
202
|
+
* why: this is the plugin module ABI. Shipped provider modules (`@jini-ai/agent-plugins/github`)
|
|
203
|
+
* call `kit.fetch(url, init)` positionally, like the deploy and form-destination kits, so the
|
|
204
|
+
* args rule does not apply here; an object signature would hand them `url === undefined`.
|
|
205
|
+
*/
|
|
206
|
+
export interface SourceControlProviderKit {
|
|
207
|
+
readonly repositoryPaths: import("../contracts.js").SourceControlProviderKit["repositoryPaths"];
|
|
208
|
+
/** Plain `fetch`, looked up at call time. */
|
|
209
|
+
fetch(url: string, init: RequestInit): Promise<Response>;
|
|
210
|
+
/** A `RequestInit` that never follows a redirect. */
|
|
211
|
+
redirectGuardInit(init: RequestInit): RequestInit;
|
|
212
|
+
/** Throws when `response` is a redirect, so a token is never sent on to another host. */
|
|
213
|
+
assertNotRedirected(response: Response, hostName: string): void;
|
|
214
|
+
/** True for the error {@link assertNotRedirected} throws. */
|
|
215
|
+
isRedirectRefusal(error: unknown): boolean;
|
|
216
|
+
/** The guarded outbound-HTTP seam (ADR-038) for credentialed custom-credential calls. */
|
|
217
|
+
readonly httpClient: SourceControlKitHttpClient;
|
|
218
|
+
describeTransportError(error: unknown): DescribedTransportError;
|
|
219
|
+
/** Waits before a retry. Optional so a hand-built kit may omit it; a module falls back to a timer. */
|
|
220
|
+
sleep?(ms: number): Promise<void>;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* The guarded client as a provider module sees it.
|
|
224
|
+
* why: positional on purpose, like the rest of the kit: shipped modules call
|
|
225
|
+
* `kit.httpClient.send(request, { redirect: "error" })`, so the core object-shaped
|
|
226
|
+
* `HttpClientPort` (`send({ request }, options)`) would hand them `request === undefined`.
|
|
227
|
+
*/
|
|
228
|
+
export interface SourceControlKitHttpClient {
|
|
229
|
+
send(request: HttpRequest, options?: {
|
|
230
|
+
redirect?: RequestRedirect;
|
|
231
|
+
}): Promise<HttpResponse>;
|
|
232
|
+
}
|
|
233
|
+
/** A repository named by owner and name, before anything is sent. */
|
|
234
|
+
export interface RepositoryTarget {
|
|
235
|
+
readonly owner: string;
|
|
236
|
+
readonly repo: string;
|
|
237
|
+
}
|
|
238
|
+
/** The host's own owner/repo rules: `null` when valid, else a caller-safe reason naming the field
|
|
239
|
+
* (e.g. "invalid GitHub owner 'x'"). Pure, never throws. */
|
|
240
|
+
export type RepositoryTargetValidator = (target: RepositoryTarget) => string | null;
|
|
241
|
+
/** A provider module's default export. */
|
|
242
|
+
export interface SourceControlProviderModule {
|
|
243
|
+
readonly supportsFolder?: boolean;
|
|
244
|
+
create(context: {
|
|
245
|
+
readonly kit: SourceControlProviderKit;
|
|
246
|
+
}): SourceControlProviderOperations;
|
|
247
|
+
/** Optional, needs no kit, so core can refuse a malformed target before building anything or
|
|
248
|
+
* raising a dialog. Core still applies its own generic one-path-segment rule afterwards. */
|
|
249
|
+
validateTarget?: RepositoryTargetValidator;
|
|
250
|
+
}
|
|
251
|
+
//# sourceMappingURL=provider-module.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Provider id -> saved custom API-key label. Only declared bindings may supply a commit fallback;
|
|
2
|
+
* explicit source-control connections always win. */
|
|
3
|
+
export declare const sourceControlSavedApiKeyLabels: ReadonlyMap<string, string>;
|
|
4
|
+
//# sourceMappingURL=saved-key-bindings.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Provider id -> saved custom API-key label. Only declared bindings may supply a commit fallback;
|
|
2
|
+
* explicit source-control connections always win. */
|
|
3
|
+
export const sourceControlSavedApiKeyLabels = new Map([["github", "github"]]);
|
|
4
|
+
//# sourceMappingURL=saved-key-bindings.js.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ExportReport } from "../../static-export/contracts.js";
|
|
2
|
+
import type { CommitFile } from "./provider-module.js";
|
|
3
|
+
/**
|
|
4
|
+
* @file The port a site commit calls to turn a finished site export into the flat file list a
|
|
5
|
+
* commit publishes. `source-control` owns the interface; the host's backup feature implements it,
|
|
6
|
+
* because the portable static copy a commit publishes is the same one the backup/share download
|
|
7
|
+
* builds, and that packaging code lives there. Owning the port here keeps the dependency pointing
|
|
8
|
+
* one way: the backup feature imports `source-control` (it uses providers as its transport), never
|
|
9
|
+
* the reverse. The composition root binds the implementation. `R` lets a host that extends the
|
|
10
|
+
* export report keep its own fields on the way through.
|
|
11
|
+
*/
|
|
12
|
+
/** What `StaticSiteContextFn` resolves to: the identity the packaged copy is labelled with. */
|
|
13
|
+
export interface StaticSiteIdentity {
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly slug: string;
|
|
16
|
+
readonly theme: string;
|
|
17
|
+
readonly themeId: string;
|
|
18
|
+
}
|
|
19
|
+
/** Flat commit files, or the one refusal a caller can explain to the owner: two files claiming a path. */
|
|
20
|
+
export type StaticSitePackage = {
|
|
21
|
+
readonly ok: true;
|
|
22
|
+
readonly files: CommitFile[];
|
|
23
|
+
} | {
|
|
24
|
+
readonly ok: false;
|
|
25
|
+
readonly kind: "destination-collision";
|
|
26
|
+
readonly message: string;
|
|
27
|
+
};
|
|
28
|
+
export interface StaticSitePackagerPort<R extends ExportReport = ExportReport> {
|
|
29
|
+
/** The file a visitor opens first in the packaged copy. */
|
|
30
|
+
readonly entryFile: string;
|
|
31
|
+
/** Any failure other than a path collision is thrown unchanged. */
|
|
32
|
+
packageSite(required: {
|
|
33
|
+
report: R;
|
|
34
|
+
site: StaticSiteIdentity;
|
|
35
|
+
}, optional?: Record<string, never>): StaticSitePackage;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=static-site-packager-port.d.ts.map
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import type { Clock as ClockPort, UUID } from "@jini-ai/core/primitives";
|
|
2
|
+
import type { KeyringPort } from "@jini-ai/core/contracts/vault";
|
|
3
|
+
import type { SecretSealerPort } from "@jini-ai/core/contracts/vault";
|
|
4
|
+
import type { CredentialScope } from "@jini-ai/core/contracts/site/credential-project-half";
|
|
5
|
+
interface ScopedCredentialDeps<D> {
|
|
6
|
+
readonly deps: D;
|
|
7
|
+
readonly workspaceId: string;
|
|
8
|
+
readonly scope: CredentialScope;
|
|
9
|
+
}
|
|
10
|
+
import type { DescriptorI18n } from "@jini-ai/core/text";
|
|
11
|
+
import type { SourceControlProviderDescriptor as BaseProviderDescriptor } from "../contracts.js";
|
|
12
|
+
import type { SourceControlCredentialForm } from "./credential-form.js";
|
|
13
|
+
import type { SourceControlProvider, SourceControlProviderModule, SourceControlKitHttpClient as HttpClientPort } from "./provider-module.js";
|
|
14
|
+
export type SourceControlProviderDescriptor = Omit<BaseProviderDescriptor, "credential" | "i18n"> & {
|
|
15
|
+
readonly credential?: SourceControlCredentialForm;
|
|
16
|
+
readonly i18n?: DescriptorI18n;
|
|
17
|
+
};
|
|
18
|
+
export interface SourceControlProviderRegistry {
|
|
19
|
+
list(): readonly {
|
|
20
|
+
descriptor: SourceControlProviderDescriptor;
|
|
21
|
+
pluginId: string;
|
|
22
|
+
module: SourceControlProviderModule;
|
|
23
|
+
}[];
|
|
24
|
+
get(required: {
|
|
25
|
+
providerId: string;
|
|
26
|
+
}, optional?: Record<string, never>): {
|
|
27
|
+
descriptor: SourceControlProviderDescriptor;
|
|
28
|
+
pluginId: string;
|
|
29
|
+
module: SourceControlProviderModule;
|
|
30
|
+
} | undefined;
|
|
31
|
+
readonly switchedOff?: ReadonlyMap<string, string>;
|
|
32
|
+
readonly refusals: readonly string[];
|
|
33
|
+
}
|
|
34
|
+
export type LoadSourceControlProviders = (required: {
|
|
35
|
+
workspaceId: string;
|
|
36
|
+
}, optional?: Record<string, never>) => Promise<SourceControlProviderRegistry>;
|
|
37
|
+
import type { SourceControlConnectionInput, SourceControlCredentialSetRecord, SourceControlCredentialSetRepoPort, SourceControlCredentialSummary, SourceControlProviderId } from "@jini-ai/core/contracts/site/source-control-credentials";
|
|
38
|
+
/** Source-control validation and inline identity probes remain feature policy. Jini owns
|
|
39
|
+
* sealing, persistence, hints and defaults. Plain read models require neither keys nor opens.
|
|
40
|
+
* The identity store stays separate from deployments and custom API keys; commit callers may
|
|
41
|
+
* supply the existing custom-key reader through a port when this provider has no identity row. */
|
|
42
|
+
/** A `(workspaceId, providerId, label)` collision — the route maps this to `409 DUPLICATE_LABEL`. */
|
|
43
|
+
export declare class SourceControlCredentialDuplicateLabelError extends Error {
|
|
44
|
+
}
|
|
45
|
+
/** Thrown when `sealer.seal()`/`keyring.activeKey()` fails while writing a connection — the
|
|
46
|
+
* realistic cause is a missing site key (`site key`), same fail-closed
|
|
47
|
+
* contract `PublishCredentialSecretStoreUnconfiguredError` documents for the sibling table. */
|
|
48
|
+
export declare class SourceControlCredentialSecretStoreUnconfiguredError extends Error {
|
|
49
|
+
}
|
|
50
|
+
export declare class SourceControlCredentialNotFoundError extends Error {
|
|
51
|
+
}
|
|
52
|
+
export interface SourceControlCredentialReadDeps {
|
|
53
|
+
deps: {
|
|
54
|
+
CREDENTIAL_MESSAGES: Readonly<Record<"storage", string>>;
|
|
55
|
+
CredentialInputError: abstract new (...args: never[]) => Error;
|
|
56
|
+
normalizeCredentialToken(required: {
|
|
57
|
+
value: unknown;
|
|
58
|
+
field?: string;
|
|
59
|
+
hosted?: boolean;
|
|
60
|
+
}, optional?: Record<string, never>): string;
|
|
61
|
+
credentialScopes<D extends {
|
|
62
|
+
repo: SourceControlCredentialSetRepoPort;
|
|
63
|
+
}>(required: {
|
|
64
|
+
deps: D;
|
|
65
|
+
workspaceId: string;
|
|
66
|
+
}, optional?: Record<string, never>): ScopedCredentialDeps<D>[];
|
|
67
|
+
credentialCreateTarget<D extends {
|
|
68
|
+
repo: SourceControlCredentialSetRepoPort;
|
|
69
|
+
}>(required: {
|
|
70
|
+
deps: D;
|
|
71
|
+
input: {
|
|
72
|
+
workspaceId: string;
|
|
73
|
+
scope?: unknown;
|
|
74
|
+
};
|
|
75
|
+
invalid: (message: string) => Error;
|
|
76
|
+
}, optional?: Record<string, never>): ScopedCredentialDeps<D>;
|
|
77
|
+
};
|
|
78
|
+
repo: SourceControlCredentialSetRepoPort;
|
|
79
|
+
sealer?: SecretSealerPort;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The read model for ONE credential set. Pure DB read — no sealer, no keyring, cannot fail on a
|
|
83
|
+
* misconfigured site key. Returns `null` if no row exists for `(workspaceId, id)` (not an
|
|
84
|
+
* error — the caller decides whether that is a 404).
|
|
85
|
+
*
|
|
86
|
+
* @complexity O(1) — one `findById` lookup.
|
|
87
|
+
*/
|
|
88
|
+
export declare function describeCredential(deps: SourceControlCredentialReadDeps, input: {
|
|
89
|
+
workspaceId: UUID;
|
|
90
|
+
id: UUID;
|
|
91
|
+
}): Promise<SourceControlCredentialSummary | null>;
|
|
92
|
+
/**
|
|
93
|
+
* The read model for EVERY credential set a workspace has saved — what
|
|
94
|
+
* `GET .../source-control/credentials` returns. Same "never decrypts" contract as
|
|
95
|
+
* {@link describeCredential}.
|
|
96
|
+
*
|
|
97
|
+
* @complexity O(n) in the workspace's own (small) credential-set count. One repo read, one array
|
|
98
|
+
* map, no per-row I/O.
|
|
99
|
+
*/
|
|
100
|
+
export declare function listSourceControlCredentials(deps: SourceControlCredentialReadDeps, input: {
|
|
101
|
+
workspaceId: UUID;
|
|
102
|
+
}): Promise<SourceControlCredentialSummary[]>;
|
|
103
|
+
export interface SourceControlCredentialWriteDeps extends SourceControlCredentialReadDeps {
|
|
104
|
+
assertCredentialFreeField: (required: {
|
|
105
|
+
value: string;
|
|
106
|
+
field: string;
|
|
107
|
+
}, optional?: Record<string, never>) => void;
|
|
108
|
+
isProjectKeyCreateConflictError: (error: unknown) => error is Error;
|
|
109
|
+
buildSourceControlProvider: (required: {
|
|
110
|
+
load: LoadSourceControlProviders;
|
|
111
|
+
httpClient?: HttpClientPort;
|
|
112
|
+
workspaceId: string;
|
|
113
|
+
providerId: string;
|
|
114
|
+
}) => Promise<{
|
|
115
|
+
ok: true;
|
|
116
|
+
provider: Pick<SourceControlProvider, "readAccountLabel">;
|
|
117
|
+
} | {
|
|
118
|
+
ok: false;
|
|
119
|
+
message: string;
|
|
120
|
+
}>;
|
|
121
|
+
sealer: SecretSealerPort;
|
|
122
|
+
keyring: KeyringPort;
|
|
123
|
+
clock: ClockPort;
|
|
124
|
+
idGen: {
|
|
125
|
+
newId(): string;
|
|
126
|
+
};
|
|
127
|
+
/** The guarded client (egress policy, redirects per call) for the save-time identity probe, which
|
|
128
|
+
* carries the saved token. Absent: the provider's request fails as a transport error (no global `fetch`).
|
|
129
|
+
* Its outbound span is recorded where the client is built. */
|
|
130
|
+
httpClient?: HttpClientPort;
|
|
131
|
+
/** Loaded provider declarations govern admission and optional account-label discovery. */
|
|
132
|
+
loadSourceControlProviders?: LoadSourceControlProviders;
|
|
133
|
+
}
|
|
134
|
+
/** True iff `err` is the label's UNIQUE `(workspace_id, provider_id, label)` index rejecting a
|
|
135
|
+
* duplicate, on any database (`isUniqueViolation`, storage kernel: SQLite's code/message, Postgres
|
|
136
|
+
* SQLSTATE 23505). */
|
|
137
|
+
export declare function isUniqueLabelViolation({ err }: {
|
|
138
|
+
err: unknown;
|
|
139
|
+
}, _optional?: {}): boolean;
|
|
140
|
+
export interface CreateSourceControlCredentialInput {
|
|
141
|
+
workspaceId: UUID;
|
|
142
|
+
label: unknown;
|
|
143
|
+
connection: unknown;
|
|
144
|
+
/** `true` makes this the provider's default connection. Omitted auto-defaults the provider's
|
|
145
|
+
* FIRST saved connection; explicit `false` opts out. Jini owns atomic auto-defaulting. */
|
|
146
|
+
isDefault?: unknown;
|
|
147
|
+
/** `"site"` = a site-owned key. Omitted (or `"project"`) = the project store when one is
|
|
148
|
+
* attached, visible to attached sites only; this site's vault otherwise. */
|
|
149
|
+
scope?: unknown;
|
|
150
|
+
}
|
|
151
|
+
/** Validate the loaded declaration, then make the secret durable before identity discovery.
|
|
152
|
+
* @param required Explicit store ports and create input. @returns A summary with no secret fields.
|
|
153
|
+
* @throws {SourceControlCredentialValidationError} Invalid or unavailable provider/fields.
|
|
154
|
+
* Probe failures never undo a save; Jini owns sealing, hints and atomic defaults. */
|
|
155
|
+
export declare function createSourceControlCredential({ deps, input }: {
|
|
156
|
+
deps: SourceControlCredentialWriteDeps;
|
|
157
|
+
input: CreateSourceControlCredentialInput;
|
|
158
|
+
}, _options?: {}): Promise<SourceControlCredentialSummary>;
|
|
159
|
+
export interface UpdateSourceControlCredentialInput {
|
|
160
|
+
workspaceId: UUID;
|
|
161
|
+
id: UUID;
|
|
162
|
+
/** Omitted = leave the label unchanged. */
|
|
163
|
+
label?: unknown;
|
|
164
|
+
/** Omitted = leave the stored connection (and its provider) untouched. */
|
|
165
|
+
connection?: unknown;
|
|
166
|
+
/** `true` selects the destination default. Omitted/`false` preserves a same-provider default;
|
|
167
|
+
* a move uses the destination group's default/first-row rule. */
|
|
168
|
+
isDefault?: unknown;
|
|
169
|
+
}
|
|
170
|
+
/** Omitted/blank tokens keep the envelope; explicit rotations reset and re-probe the label.
|
|
171
|
+
* @param required Explicit store ports and update input. @returns A summary with no secret fields.
|
|
172
|
+
* @throws {SourceControlCredentialValidationError} Invalid or unavailable destination/fields.
|
|
173
|
+
* Metadata updates for an unchanged opaque id need neither a provider nor decryption. */
|
|
174
|
+
export declare function updateSourceControlCredential({ deps, input }: {
|
|
175
|
+
deps: SourceControlCredentialWriteDeps;
|
|
176
|
+
input: UpdateSourceControlCredentialInput;
|
|
177
|
+
}, _options?: {}): Promise<SourceControlCredentialSummary>;
|
|
178
|
+
/**
|
|
179
|
+
* Deletes a credential set. No-op (not an error) if no row exists for `(workspaceId, id)` — matches
|
|
180
|
+
* `SourceControlCredentialSetRepoPort.delete`'s own idempotent contract and this feature's `DELETE`
|
|
181
|
+
* route's documented 204-always behavior. If the deleted row was its provider's default,
|
|
182
|
+
* `SourceControlCredentialSetRepoPort.delete` itself promotes the group's next candidate.
|
|
183
|
+
*
|
|
184
|
+
* @complexity O(1) at this layer (the repo's own promotion work is O(n) in the small provider
|
|
185
|
+
* group).
|
|
186
|
+
*/
|
|
187
|
+
export declare function deleteSourceControlCredential(deps: SourceControlCredentialReadDeps, input: {
|
|
188
|
+
workspaceId: UUID;
|
|
189
|
+
id: UUID;
|
|
190
|
+
}): Promise<void>;
|
|
191
|
+
/** The selected credential's metadata for a host, never decrypted: this site's, else the project's. */
|
|
192
|
+
export declare function findDefaultSourceControlCredential(deps: SourceControlCredentialReadDeps, input: {
|
|
193
|
+
workspaceId: UUID;
|
|
194
|
+
providerId: SourceControlProviderId;
|
|
195
|
+
}): Promise<Pick<SourceControlCredentialSetRecord, "id" | "label" | "providerId"> | null>;
|
|
196
|
+
/** Resolve exactly one eligible credential through Jini's context-checked open. Genuine decrypt
|
|
197
|
+
* failures stay typed: this runs in the daemon as well as the HTTP process. */
|
|
198
|
+
export declare function resolveDefaultForSourceControl(deps: SourceControlCredentialReadDeps & {
|
|
199
|
+
sealer: SecretSealerPort;
|
|
200
|
+
}, input: {
|
|
201
|
+
workspaceId: UUID;
|
|
202
|
+
providerId: SourceControlProviderId;
|
|
203
|
+
}): Promise<{
|
|
204
|
+
id: UUID;
|
|
205
|
+
label: string;
|
|
206
|
+
connection: SourceControlConnectionInput;
|
|
207
|
+
} | null>;
|
|
208
|
+
export {};
|
|
209
|
+
//# sourceMappingURL=store.d.ts.map
|