@jini-ai/devops 0.7.3-next.1 → 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/CHANGELOG.md +6 -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 +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 +912 -8
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { admitImport } from "./import-index/admission.js";
|
|
2
|
+
import { listPage, listAll, decodeCursor, encodeCursor } from "./import-index/paging.js";
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { randomUUID } from "node:crypto";
|
|
6
|
+
import { importSourceDigest, withoutQuery } from "./import-registry.js";
|
|
7
|
+
import { SiteShareRefusal } from "./share-refusal.js";
|
|
8
|
+
import { consumeUpload, deadlineSignal, downloadShareArchive, importSiteSlug, parseImportInput, reconcileInterruptedImports, refusal, projectExpiredOwnerSetup, requireFreeSpace, requireOwnerSetup, requireStagingBudget, siteImportView, startImportedSite, } from "./import-backend-steps.js";
|
|
9
|
+
/** Source union is enforced at every remote boundary; server paths are never accepted. */
|
|
10
|
+
export function parseSiteImportInput(required, _options = {}) {
|
|
11
|
+
return parseImportInput(required);
|
|
12
|
+
}
|
|
13
|
+
function createImportContext({ required, optional }) {
|
|
14
|
+
const { registry, workspace, host } = required;
|
|
15
|
+
const view = (row) => {
|
|
16
|
+
// A lock-free pre-migration view can transiently omit stage warnings.
|
|
17
|
+
const warnings = host.stagedImportWarnings({ root: registry.stagePath(row) });
|
|
18
|
+
return { ...siteImportView({ row, setupBase: required.setupBase }), ...(warnings.length ? { warnings } : {}) };
|
|
19
|
+
};
|
|
20
|
+
// Lock-free indexed reads cannot write the expiry sweep, so they show the expired state without persisting it.
|
|
21
|
+
const indexedView = (row) => siteImportView({ row: projectExpiredOwnerSetup({ row, nowMs: registry.clock.nowMs() }), setupBase: required.setupBase });
|
|
22
|
+
const put = (row) => { registry.put({ row }); optional.report?.({ importId: row.importId, status: row.status }); };
|
|
23
|
+
let active = false;
|
|
24
|
+
const exclusive = async ({ run }, _optional = {}) => {
|
|
25
|
+
if (active)
|
|
26
|
+
refusal({ code: "BUSY", message: "Another import is running. Retry after it finishes." });
|
|
27
|
+
active = true;
|
|
28
|
+
try {
|
|
29
|
+
return await registry.exclusive({ run: async () => {
|
|
30
|
+
await reconcileInterruptedImports({ registry, workspace, put, host,
|
|
31
|
+
activeRows: (_required, _optional = {}) => registry.session.kind === "index" ? registry.session.store.activeRows({}) : registry.list({}).filter(row => row.status === "verifying" || row.status === "creating"),
|
|
32
|
+
});
|
|
33
|
+
return run();
|
|
34
|
+
} });
|
|
35
|
+
}
|
|
36
|
+
finally {
|
|
37
|
+
active = false;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
return { required, optional, registry, workspace, host, view, indexedView, put, exclusive };
|
|
41
|
+
}
|
|
42
|
+
/** Reads or downloads the archive; records the consumed upload before reading so it is always removed. */
|
|
43
|
+
async function fetchArchive({ ctx, input }) {
|
|
44
|
+
const { source } = input.parsed;
|
|
45
|
+
if ("url" in source) {
|
|
46
|
+
input.signal.throwIfAborted();
|
|
47
|
+
return downloadShareArchive({ http: ctx.required.http, url: source.url, signal: input.signal, host: ctx.host });
|
|
48
|
+
}
|
|
49
|
+
const uploadId = consumeUpload({ registry: ctx.registry, uploadId: source.uploadId, principalId: input.principalId, importId: input.importId });
|
|
50
|
+
input.consumed({ uploadId });
|
|
51
|
+
input.signal.throwIfAborted();
|
|
52
|
+
return fs.readFileSync(ctx.registry.uploadPath({ uploadId }));
|
|
53
|
+
}
|
|
54
|
+
/** Verify, stage and mark the row pending owner setup; any failure removes the stage and records why. */
|
|
55
|
+
async function verifyAndStage({ ctx, input }) {
|
|
56
|
+
let consumedUpload;
|
|
57
|
+
let row = input.row;
|
|
58
|
+
try {
|
|
59
|
+
const archive = await fetchArchive({ ctx, input: { parsed: input.parsed, principalId: input.row.principalId, importId: input.row.importId, signal: input.signal, consumed: ({ uploadId }, _optional = {}) => { consumedUpload = uploadId; } } });
|
|
60
|
+
const verified = await ctx.host.verifySiteImport({ archive, reader: ctx.required.reader, sanitize: ctx.required.sanitize, schema: ctx.required.schema }, { signal: input.signal });
|
|
61
|
+
input.signal.throwIfAborted();
|
|
62
|
+
ctx.host.stageVerifiedImport({ root: ctx.registry.stagePath(input.row), verified });
|
|
63
|
+
row = { ...row, displayName: input.parsed.displayName ?? verified.name, status: "needs-owner", hasEncryptedKeys: Boolean(verified.encryptedKeys), credentialWarnings: verified.credentialWarnings ?? [], warnings: ctx.host.stagedImportWarnings({ root: ctx.registry.stagePath(row) }) };
|
|
64
|
+
ctx.put(row);
|
|
65
|
+
return ctx.view(row);
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
fs.rmSync(ctx.registry.stagePath(row), { recursive: true, force: true });
|
|
69
|
+
ctx.put({ ...row, status: "failed", error: error instanceof SiteShareRefusal ? error.message : "Archive verification failed. No site was created." });
|
|
70
|
+
throw error;
|
|
71
|
+
}
|
|
72
|
+
finally {
|
|
73
|
+
if (consumedUpload)
|
|
74
|
+
fs.rmSync(ctx.registry.uploadPath({ uploadId: consumedUpload }), { force: true });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/** Creates the site from the stage; a failure rolls the row back to failed and removes the stage. */
|
|
78
|
+
async function createImportedSite({ ctx, input }) {
|
|
79
|
+
const { signal } = input;
|
|
80
|
+
let row = input.row;
|
|
81
|
+
try {
|
|
82
|
+
const created = await (ctx.optional.createSite ?? ctx.required.createSite)({ name: importSiteSlug({ displayName: row.displayName, host: ctx.host }), displayName: row.displayName, adminPassword: input.adminPassword }, { ...ctx.required.creationOptions, workspace: ctx.workspace, collisionSafe: true,
|
|
83
|
+
onAllocated: (allocation, _optional = {}) => {
|
|
84
|
+
signal.throwIfAborted();
|
|
85
|
+
// Persist idempotency before shared registration. A ctx.registry failure is still inside
|
|
86
|
+
// createSite's compensation boundary, so a new site's identity never gets lost.
|
|
87
|
+
row = { ...row, creation: allocation, newSiteId: allocation.siteId, newSiteName: allocation.name };
|
|
88
|
+
ctx.put(row);
|
|
89
|
+
},
|
|
90
|
+
beforeRegister: () => { signal.throwIfAborted(); },
|
|
91
|
+
verifiedRestore: { signal, restore: async ({ dir, dbPath, siteId }) => {
|
|
92
|
+
signal.throwIfAborted();
|
|
93
|
+
await ctx.required.restoreStagedImport({ root: ctx.registry.stagePath(row), dir, dbPath, siteId }, { savedKeysPassword: input.savedKeysPassword, signal });
|
|
94
|
+
row = { ...row, warnings: ctx.host.stagedImportWarnings({ root: ctx.registry.stagePath(row) }) };
|
|
95
|
+
ctx.put(row);
|
|
96
|
+
} },
|
|
97
|
+
});
|
|
98
|
+
return { row, created };
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
fs.rmSync(ctx.registry.stagePath(row), { recursive: true, force: true });
|
|
102
|
+
ctx.put({ ...row, newSiteId: null, newSiteName: null, status: "failed", error: "Site creation failed and was rolled back. Import the archive again." });
|
|
103
|
+
throw error;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
async function uploadImportArchive({ ctx, input }) {
|
|
107
|
+
return ctx.exclusive({ run: async () => {
|
|
108
|
+
requireStagingBudget({ registry: ctx.registry, host: ctx.host });
|
|
109
|
+
if (!Buffer.isBuffer(input.archive) || input.archive.length > ctx.host.maxArchiveBytes)
|
|
110
|
+
refusal({ code: "LIMIT_EXCEEDED", message: ctx.host.copy.uploadTooLarge });
|
|
111
|
+
const uploadId = randomUUID();
|
|
112
|
+
try {
|
|
113
|
+
fs.writeFileSync(ctx.registry.uploadPath({ uploadId }), input.archive, { flag: "wx", mode: 0o600 });
|
|
114
|
+
ctx.registry.saveUpload({ row: { uploadId, principalId: input.principalId, createdAt: ctx.registry.clock.nowMs() } });
|
|
115
|
+
return { uploadId };
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
fs.rmSync(ctx.registry.uploadPath({ uploadId }), { force: true });
|
|
119
|
+
throw error;
|
|
120
|
+
}
|
|
121
|
+
} });
|
|
122
|
+
}
|
|
123
|
+
function traced({ ctx, name, run }, _optional = {}) {
|
|
124
|
+
return ctx.required.tracker ? ctx.required.tracker.trace({ name, run }) : run();
|
|
125
|
+
}
|
|
126
|
+
/** The deadline every verify step runs under; five minutes covers a 300 MiB download plus verification. */
|
|
127
|
+
const verifyDeadline = (options) => deadlineSignal({ timeoutMs: 5 * 60_000 }, options);
|
|
128
|
+
/** Admits through the indexed history: a replayed request returns its first outcome, a new one verifies and stages. */
|
|
129
|
+
async function startIndexedImport({ ctx, session, input, parsed, options }) {
|
|
130
|
+
const admitted = admitImport({ db: session.db, clock: ctx.registry.clock, policy: session.policy, principalId: input.principalId, requestId: parsed.requestId, source: parsed.source, digestSource: importSourceDigest,
|
|
131
|
+
requireBudget: (_required, _optional = {}) => { if ("url" in parsed.source)
|
|
132
|
+
requireStagingBudget({ registry: ctx.registry, host: ctx.host }); },
|
|
133
|
+
makeRow: ({ now }, _optional = {}) => ({ importId: randomUUID(), principalId: input.principalId, requestId: parsed.requestId, source: parsed.source, sourceDigest: importSourceDigest({ source: parsed.source }), displayName: parsed.displayName ?? "Imported site", newSiteId: null, newSiteName: null, status: "verifying", createdAt: new Date(now).toISOString(), expiresAt: now + 3600_000 }),
|
|
134
|
+
beforeWrite: session.beforeWrite,
|
|
135
|
+
});
|
|
136
|
+
if (admitted.kind === "replay") {
|
|
137
|
+
if ("row" in admitted)
|
|
138
|
+
return ctx.indexedView(admitted.row);
|
|
139
|
+
return siteImportView({ row: { ...admitted.outcome, principalId: input.principalId, expiresAt: 0, credentialWarnings: [] }, setupBase: ctx.required.setupBase });
|
|
140
|
+
}
|
|
141
|
+
ctx.optional.report?.({ importId: admitted.row.importId, status: admitted.row.status });
|
|
142
|
+
ctx.registry.expire({});
|
|
143
|
+
session.sweep({});
|
|
144
|
+
return traced({ ctx, name: "site.import.verify", run: () => verifyAndStage({ ctx, input: { row: admitted.row, parsed, signal: verifyDeadline(options) } }) });
|
|
145
|
+
}
|
|
146
|
+
/** Rows written before the digest column carry no digest, so their sources are compared with the query stripped. */
|
|
147
|
+
function isSameImportSource({ existing, source }, _optional = {}) {
|
|
148
|
+
if (existing.sourceDigest !== undefined)
|
|
149
|
+
return existing.sourceDigest === importSourceDigest({ source });
|
|
150
|
+
return JSON.stringify(withoutQuery({ source: existing.source })) === JSON.stringify(withoutQuery({ source }));
|
|
151
|
+
}
|
|
152
|
+
/** Legacy (non-indexed) admission: a repeated requestId returns the first import, or conflicts when its source differs. */
|
|
153
|
+
async function startLegacyImport({ ctx, input, parsed, options }) {
|
|
154
|
+
ctx.registry.expire({});
|
|
155
|
+
const existing = parsed.requestId ? ctx.registry.list(input).find(row => row.requestId === parsed.requestId) : undefined;
|
|
156
|
+
if (existing) {
|
|
157
|
+
if (!isSameImportSource({ existing, source: parsed.source }))
|
|
158
|
+
refusal({ code: "REQUEST_CONFLICT", message: "requestId already belongs to another source." });
|
|
159
|
+
return ctx.view(existing);
|
|
160
|
+
}
|
|
161
|
+
if ("url" in parsed.source)
|
|
162
|
+
requireStagingBudget({ registry: ctx.registry, host: ctx.host });
|
|
163
|
+
const row = { importId: randomUUID(), principalId: input.principalId, requestId: parsed.requestId, source: parsed.source, sourceDigest: importSourceDigest({ source: parsed.source }), displayName: parsed.displayName ?? "Imported site", newSiteId: null, newSiteName: null, status: "verifying", createdAt: new Date().toISOString(), expiresAt: Date.now() + 3600_000 };
|
|
164
|
+
ctx.put(row);
|
|
165
|
+
return traced({ ctx, name: "site.import.verify", run: () => verifyAndStage({ ctx, input: { row, parsed, signal: verifyDeadline(options) } }) });
|
|
166
|
+
}
|
|
167
|
+
async function startImportFromSource({ ctx, input, options }) {
|
|
168
|
+
const parsed = parseSiteImportInput({ input: { ...input.source, displayName: input.displayName, requestId: input.requestId } });
|
|
169
|
+
return ctx.exclusive({ run: async () => {
|
|
170
|
+
const { session } = ctx.registry;
|
|
171
|
+
if (session.kind === "index")
|
|
172
|
+
return startIndexedImport({ ctx, session, input, parsed, options });
|
|
173
|
+
return startLegacyImport({ ctx, input, parsed, options });
|
|
174
|
+
} });
|
|
175
|
+
}
|
|
176
|
+
async function completeImportOwner({ ctx, input, options }) {
|
|
177
|
+
const signal = deadlineSignal({ timeoutMs: 120_000 }, options);
|
|
178
|
+
return ctx.exclusive({ run: async () => {
|
|
179
|
+
ctx.registry.expire({});
|
|
180
|
+
const pending = ctx.registry.get(input);
|
|
181
|
+
if (pending.status === "ready")
|
|
182
|
+
return ctx.view(pending);
|
|
183
|
+
requireOwnerSetup({ row: pending, adminPassword: input.adminPassword, host: ctx.host });
|
|
184
|
+
const adminPassword = ctx.host.resolveNewSiteAdminPassword({ adminPassword: input.adminPassword });
|
|
185
|
+
if (input.savedKeysPassword !== undefined && (typeof input.savedKeysPassword !== "string" || input.savedKeysPassword.length > 1024))
|
|
186
|
+
refusal({ code: "INVALID_INPUT", message: "Saved keys password must be text of at most 1024 characters." });
|
|
187
|
+
const home = ctx.workspace.home({});
|
|
188
|
+
try {
|
|
189
|
+
requireFreeSpace({ dir: fs.existsSync(home) ? home : path.dirname(home), message: ctx.host.copy.homeSpace, maxExpandedBytes: ctx.host.maxExpandedBytes });
|
|
190
|
+
signal.throwIfAborted();
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
// No site exists yet (low space, or the desktop app quitting): the verified copy must not wait out its hour.
|
|
194
|
+
fs.rmSync(ctx.registry.stagePath(pending), { recursive: true, force: true });
|
|
195
|
+
ctx.put({ ...pending, status: "failed", error: signal.aborted ? "The import was stopped. No site was created. Import the archive again." : "There is not enough free disk space. No site was created. Free up space and import the archive again." });
|
|
196
|
+
throw error;
|
|
197
|
+
}
|
|
198
|
+
const creating = { ...pending, status: "creating" };
|
|
199
|
+
ctx.put(creating);
|
|
200
|
+
const { row: allocated, created } = await traced({ ctx, name: "site.import.restore", run: () => createImportedSite({ ctx, input: { row: creating, adminPassword, savedKeysPassword: input.savedKeysPassword, signal } }) });
|
|
201
|
+
// Owner and restore are committed. A supervisor failure must not repeat site creation.
|
|
202
|
+
const ready = { ...allocated, newSiteId: created.siteId, newSiteName: created.name, status: "ready" };
|
|
203
|
+
ctx.put(ready);
|
|
204
|
+
void ctx.required.tracker?.capture({ name: "site_imported", userId: ready.principalId }, { properties: { targetSiteId: created.siteId, operationId: ready.importId, eventId: `import:${ready.importId}`, source: "admin" } });
|
|
205
|
+
fs.rmSync(ctx.registry.stagePath(ready), { recursive: true, force: true });
|
|
206
|
+
const started = await startImportedSite({ row: ready, name: created.name, startSite: ctx.required.startSite, host: ctx.host });
|
|
207
|
+
ctx.put(started);
|
|
208
|
+
return ctx.view(started);
|
|
209
|
+
} });
|
|
210
|
+
}
|
|
211
|
+
function precedesImportCursor({ row, cursor }) {
|
|
212
|
+
return !cursor || Date.parse(row.createdAt) < cursor.createdMs || Date.parse(row.createdAt) === cursor.createdMs && row.importId < cursor.importId;
|
|
213
|
+
}
|
|
214
|
+
function legacyImportPage({ ctx, input }) {
|
|
215
|
+
const { registry } = ctx;
|
|
216
|
+
// A cursor chooses a position, not a principal.
|
|
217
|
+
const cursor = input.cursor === undefined ? undefined : decodeCursor({ cursor: input.cursor });
|
|
218
|
+
const limit = Number.isInteger(input.limit) ? Math.max(1, Math.min(50, input.limit)) : 50;
|
|
219
|
+
const rows = registry.list({ principalId: input.principalId }).sort((a, b) => Date.parse(b.createdAt) - Date.parse(a.createdAt) || (a.importId < b.importId ? 1 : a.importId > b.importId ? -1 : 0))
|
|
220
|
+
.filter(row => precedesImportCursor({ row, cursor }));
|
|
221
|
+
const imports = rows.slice(0, limit).map(ctx.view);
|
|
222
|
+
const last = rows[limit - 1];
|
|
223
|
+
return { imports, ...(rows.length > limit && last ? { nextCursor: encodeCursor({ createdMs: Date.parse(last.createdAt), importId: last.importId }) } : {}) };
|
|
224
|
+
}
|
|
225
|
+
function createImportHistoryReads({ ctx, available }) {
|
|
226
|
+
const { registry } = ctx;
|
|
227
|
+
return {
|
|
228
|
+
async list(input) {
|
|
229
|
+
available();
|
|
230
|
+
const indexed = registry.history?.read({ run: (session, _optional = {}) => {
|
|
231
|
+
if (session.kind === "legacy")
|
|
232
|
+
return undefined;
|
|
233
|
+
return listAll({ readPage: (page, _optional = {}) => listPage({ ...input, ...page, db: session.db, clock: registry.clock, policy: session.policy }) }).map(ctx.indexedView);
|
|
234
|
+
} });
|
|
235
|
+
if (indexed)
|
|
236
|
+
return indexed;
|
|
237
|
+
return ctx.exclusive({ run: async () => { registry.expire({}); return registry.list(input).map(ctx.view); } });
|
|
238
|
+
},
|
|
239
|
+
async listPage(input, _optional = {}) {
|
|
240
|
+
available();
|
|
241
|
+
const indexed = registry.history?.read({ run: (session, _optional = {}) => {
|
|
242
|
+
if (session.kind === "legacy")
|
|
243
|
+
return undefined;
|
|
244
|
+
const page = listPage({ ...input, db: session.db, clock: registry.clock, policy: session.policy });
|
|
245
|
+
return { ...page, imports: page.imports.map(ctx.indexedView) };
|
|
246
|
+
} });
|
|
247
|
+
if (indexed)
|
|
248
|
+
return indexed;
|
|
249
|
+
return ctx.exclusive({ run: async () => {
|
|
250
|
+
registry.expire({});
|
|
251
|
+
return legacyImportPage({ ctx, input });
|
|
252
|
+
} });
|
|
253
|
+
},
|
|
254
|
+
get(input) {
|
|
255
|
+
available();
|
|
256
|
+
// Lock-free get and list never cut over or expire anything: they hold no lock, so only `exclusive` may mutate.
|
|
257
|
+
const row = registry.get(input);
|
|
258
|
+
if (registry.history)
|
|
259
|
+
return registry.history.read({ run: (session, _optional = {}) => {
|
|
260
|
+
if (session.kind === "legacy")
|
|
261
|
+
return ctx.view(row);
|
|
262
|
+
return ctx.indexedView(row);
|
|
263
|
+
} });
|
|
264
|
+
return ctx.view(row);
|
|
265
|
+
},
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
/** Shared HTTP/tool application service. All effects enter as ports; CMS policy stays here.
|
|
269
|
+
* Pending owner setup stores sanitized bytes privately without creating any site directory.
|
|
270
|
+
* @complexity O(archive bytes + registry history), with one buffered job and four staged payloads.
|
|
271
|
+
*/
|
|
272
|
+
export function createSiteImportBackend(required, optional = {}) {
|
|
273
|
+
const ctx = createImportContext({ required, optional });
|
|
274
|
+
const { registry } = ctx;
|
|
275
|
+
// Once indexed history is refused, failing closed is what prevents a second site: every method stops here.
|
|
276
|
+
const available = () => { const error = required.authority.refusal({}); if (error)
|
|
277
|
+
throw error; };
|
|
278
|
+
const backend = {
|
|
279
|
+
upload: async (input) => { available(); return uploadImportArchive({ ctx, input }); },
|
|
280
|
+
importBackup: async (input, options = {}) => { available(); return startImportFromSource({ ctx, input, options }); },
|
|
281
|
+
completeOwner: async (input, options = {}) => { available(); return completeImportOwner({ ctx, input, options }); },
|
|
282
|
+
...createImportHistoryReads({ ctx, available }),
|
|
283
|
+
async tidy() {
|
|
284
|
+
available();
|
|
285
|
+
await ctx.exclusive({ run: async () => {
|
|
286
|
+
registry.expire({});
|
|
287
|
+
if (registry.session.kind === "index")
|
|
288
|
+
registry.session.sweep({});
|
|
289
|
+
await ctx.host.tidyImportDatabases({});
|
|
290
|
+
// Snapshot retirement is tidy-only (no timer) and acts only once the index is the authority.
|
|
291
|
+
if (registry.session.kind === "index")
|
|
292
|
+
required.authority.retire({});
|
|
293
|
+
} });
|
|
294
|
+
},
|
|
295
|
+
};
|
|
296
|
+
return backend;
|
|
297
|
+
}
|
|
298
|
+
//# sourceMappingURL=import-backend.js.map
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import childProcess from "node:child_process";
|
|
2
|
+
import type { Readable } from "node:stream";
|
|
3
|
+
import type { OwnedTempRootScope } from "./owned-temp-root.js";
|
|
4
|
+
/** The slice of a forked helper this module drives: its failure/exit events and a kill switch. */
|
|
5
|
+
export interface ImportWorkerChild {
|
|
6
|
+
readonly stderr?: Readable | null;
|
|
7
|
+
once(event: "error", listener: (error: Error) => void): unknown;
|
|
8
|
+
once(event: "close", listener: (code: number | null) => void): unknown;
|
|
9
|
+
kill(signal: NodeJS.Signals): unknown;
|
|
10
|
+
}
|
|
11
|
+
/** The exclusive file lock the host owns (its `withFileLock`), as far as this module drives it. */
|
|
12
|
+
export type ImportFileLock = <T>(required: {
|
|
13
|
+
lockPath: string;
|
|
14
|
+
run: () => Promise<T> | T;
|
|
15
|
+
}, optional?: {
|
|
16
|
+
timeoutMs?: number;
|
|
17
|
+
staleMs?: number;
|
|
18
|
+
timeoutMessage?: () => string;
|
|
19
|
+
}) => Promise<T>;
|
|
20
|
+
/** Host ports, defaulted at this composition edge; tests substitute the space probe, limits and helper. */
|
|
21
|
+
export interface RebuildImportDatabaseOptions {
|
|
22
|
+
signal?: AbortSignal;
|
|
23
|
+
limits?: {
|
|
24
|
+
readonly maxExpandedBytes: number;
|
|
25
|
+
};
|
|
26
|
+
statfs?: (root: string) => Promise<{
|
|
27
|
+
bavail: number;
|
|
28
|
+
bsize: number;
|
|
29
|
+
}>;
|
|
30
|
+
fork?: (modulePath: string, args: string[], options: childProcess.ForkOptions) => ImportWorkerChild;
|
|
31
|
+
/** A host-owned private root (lock, then marker, then folder) to stage in instead of the engine's own locked temp folder; the host's temp-root tidy sweeps the same parent. */
|
|
32
|
+
tempRoot?: OwnedTempRootScope;
|
|
33
|
+
}
|
|
34
|
+
/** Host values and collaborators the import-database helper cannot own. Every member is REQUIRED. */
|
|
35
|
+
export interface ImportDatabaseHost {
|
|
36
|
+
/** Redacts secret shapes from helper diagnostics before they reach server logs. */
|
|
37
|
+
redact(required: {
|
|
38
|
+
text: string;
|
|
39
|
+
}): {
|
|
40
|
+
text: string;
|
|
41
|
+
};
|
|
42
|
+
/** Exclusive lock around one staging root. */
|
|
43
|
+
withFileLock: ImportFileLock;
|
|
44
|
+
/** The expanded-size cap for the incoming snapshot and the rebuilt database. */
|
|
45
|
+
limits: {
|
|
46
|
+
readonly maxExpandedBytes: number;
|
|
47
|
+
};
|
|
48
|
+
/** Name prefix of every staging directory (and its sibling `.lock`) in the OS temp directory. */
|
|
49
|
+
stagingPrefix: string;
|
|
50
|
+
/** The helper entrypoint, relative to the module URL and without extension (`.ts` in source mode, `.js` in a build). */
|
|
51
|
+
helperStem: string;
|
|
52
|
+
/** The refusal shown when the helper reports a schema-version mismatch. */
|
|
53
|
+
versionMismatchMessage: string;
|
|
54
|
+
/** The helper's exit code for a schema-version mismatch. */
|
|
55
|
+
schemaMismatchExitCode: number;
|
|
56
|
+
/** The helper's exit code for a typed refusal whose message it wrote to `refusal.txt`. */
|
|
57
|
+
refusalExitCode: number;
|
|
58
|
+
/** Host-specific environment entries for the helper, minted under its private root. */
|
|
59
|
+
workerEnv(required: {
|
|
60
|
+
root: string;
|
|
61
|
+
}): Record<string, string | undefined>;
|
|
62
|
+
/** The only variables the helper inherits from the host process (read per call, e.g. `PATH`, `SystemRoot`); the engine never reads `process.env` itself. */
|
|
63
|
+
inheritedEnv(required?: Record<string, never>): {
|
|
64
|
+
PATH?: string | undefined;
|
|
65
|
+
SystemRoot?: string | undefined;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/** The helper entrypoint beside `moduleUrl` and the Node flags it needs (heap ceiling; tsx in source mode). */
|
|
69
|
+
export declare function importWorkerLaunch({ moduleUrl, helperStem }: {
|
|
70
|
+
moduleUrl: string;
|
|
71
|
+
helperStem: string;
|
|
72
|
+
}): {
|
|
73
|
+
helper: string;
|
|
74
|
+
execArgv: string[];
|
|
75
|
+
};
|
|
76
|
+
/** Read hostile SQLite only in a disposable helper with a deadline and heap ceiling.
|
|
77
|
+
* IPC carries no DB bytes or secrets. Input/output paths are minted here, never supplied by tools.
|
|
78
|
+
* The helper runs trusted source only and reuses A's sanitizer after checking schema objects.
|
|
79
|
+
* @complexity O(database bytes) memory/disk, capped at 300 MiB; one helper per import lane.
|
|
80
|
+
*/
|
|
81
|
+
export declare function rebuildImportDatabase<TProjection extends {
|
|
82
|
+
bytes: Buffer;
|
|
83
|
+
}>(required: {
|
|
84
|
+
host: ImportDatabaseHost;
|
|
85
|
+
snapshot: Buffer;
|
|
86
|
+
moduleUrl: string;
|
|
87
|
+
omittedMediaIds?: readonly string[];
|
|
88
|
+
}, optional?: RebuildImportDatabaseOptions): Promise<TProjection>;
|
|
89
|
+
/** Startup cleanup of interrupted database helpers; unrelated temp entries are left alone.
|
|
90
|
+
* Reuse the lock's dead-owner/staleness rule; a live owner is never removed for age.
|
|
91
|
+
* @complexity O(temp entries + removed bytes), one short lock attempt per matching directory or leftover lock. */
|
|
92
|
+
export declare function tidyImportDatabases(required: {
|
|
93
|
+
host: ImportDatabaseHost;
|
|
94
|
+
}, _optional?: Record<string, never>): Promise<void>;
|
|
95
|
+
/** The helper's three entry points, bound to one host's values. */
|
|
96
|
+
export interface ImportDatabase<TProjection extends {
|
|
97
|
+
bytes: Buffer;
|
|
98
|
+
}> {
|
|
99
|
+
rebuildImportDatabase(required: {
|
|
100
|
+
snapshot: Buffer;
|
|
101
|
+
moduleUrl: string;
|
|
102
|
+
omittedMediaIds?: readonly string[];
|
|
103
|
+
}, optional?: RebuildImportDatabaseOptions): Promise<TProjection>;
|
|
104
|
+
tidyImportDatabases(required: Record<string, never>, optional?: Record<string, never>): Promise<void>;
|
|
105
|
+
importWorkerLaunch(required: {
|
|
106
|
+
moduleUrl: string;
|
|
107
|
+
}): {
|
|
108
|
+
helper: string;
|
|
109
|
+
execArgv: string[];
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
/** Bind the import-database helper to one host's redactor, lock, limits, staging names and exit-code contract. */
|
|
113
|
+
export declare function createImportDatabase<TProjection extends {
|
|
114
|
+
bytes: Buffer;
|
|
115
|
+
}>(required: {
|
|
116
|
+
host: ImportDatabaseHost;
|
|
117
|
+
}, _optional?: {}): ImportDatabase<TProjection>;
|
|
118
|
+
//# sourceMappingURL=import-database.d.ts.map
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import childProcess from "node:child_process";
|
|
2
|
+
import { randomUUID } from "node:crypto";
|
|
3
|
+
import { writeFile, readFile, rm, statfs, readdir, mkdir } from "node:fs/promises";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { tmpdir } from "node:os";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import { FileLockTimeoutError } from "@jini-ai/core/contracts/runtime";
|
|
8
|
+
import { createInterface } from "node:readline";
|
|
9
|
+
import { SiteShareRefusal, archiveRefusalName } from "./share-refusal.js";
|
|
10
|
+
/** The helper entrypoint beside `moduleUrl` and the Node flags it needs (heap ceiling; tsx in source mode). */
|
|
11
|
+
export function importWorkerLaunch({ moduleUrl, helperStem }) {
|
|
12
|
+
const sourceMode = moduleUrl.endsWith(".ts");
|
|
13
|
+
const helper = fileURLToPath(new URL(helperStem + (sourceMode ? ".ts" : ".js"), moduleUrl));
|
|
14
|
+
return { helper, execArgv: [...(sourceMode ? ["--import", "tsx"] : []), "--max-old-space-size=512"] };
|
|
15
|
+
}
|
|
16
|
+
/** Maps the helper's private exit contract to the refusal the person sees.
|
|
17
|
+
* Only the trusted helper's typed refusals have a message file; native errors stay private.
|
|
18
|
+
* Reads at most refusal.txt from the private staging root; O(message bytes).
|
|
19
|
+
* @throws SiteShareRefusal INVALID_DATABASE for any non-zero exit.
|
|
20
|
+
*/
|
|
21
|
+
async function requireWorkerSuccess(required, _optional = {}) {
|
|
22
|
+
const { host } = required;
|
|
23
|
+
if (required.code === 0)
|
|
24
|
+
return;
|
|
25
|
+
const message = required.code === host.refusalExitCode ? `Import database refused: ${await readFile(path.join(required.root, "refusal.txt"), "utf8")}`
|
|
26
|
+
: required.code === host.schemaMismatchExitCode ? host.versionMismatchMessage : "Import database has unsupported schema, invalid references or unsafe data.";
|
|
27
|
+
throw new SiteShareRefusal({ code: "INVALID_DATABASE", message });
|
|
28
|
+
}
|
|
29
|
+
/** No inherited deployment credentials, startup injection or archived executable input. */
|
|
30
|
+
function workerEnvironment({ root, host }, _optional = {}) {
|
|
31
|
+
const inherited = host.inheritedEnv({});
|
|
32
|
+
return { PATH: inherited.PATH, SystemRoot: inherited.SystemRoot, TMPDIR: root, TMP: root, TEMP: root,
|
|
33
|
+
HOME: root, USERPROFILE: root, ...host.workerEnv({ root }),
|
|
34
|
+
XDG_DATA_HOME: path.join(root, "data"), XDG_CONFIG_HOME: path.join(root, "config"), APPDATA: path.join(root, "appdata"),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/** Forwards the helper's stderr, one sanitized line at a time, to the server log. */
|
|
38
|
+
function relayWorkerDiagnostics({ child, host }, _optional = {}) {
|
|
39
|
+
if (!child.stderr)
|
|
40
|
+
return;
|
|
41
|
+
createInterface({ input: child.stderr, crlfDelay: Infinity }).on("line", line => {
|
|
42
|
+
// Redact the raw line (stripping a tab can break a shape like "Bearer\t<token>"), then
|
|
43
|
+
// the control-free form (stripping can join key fragments), and only then truncate:
|
|
44
|
+
// clipping a credential first could hide its recognizable shape and leak its head.
|
|
45
|
+
const visible = host.redact({ text: line }).text.replace(/[\p{Cc}\p{Cf}]/gu, "");
|
|
46
|
+
console.error(archiveRefusalName({ name: host.redact({ text: visible }).text }));
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/** Run the helper to completion under a 90 s deadline and the caller's cancellation; resolves its exit code. */
|
|
50
|
+
function runWorker(required, optional = {}) {
|
|
51
|
+
const { host, root, fork } = required;
|
|
52
|
+
const { helper, execArgv } = importWorkerLaunch({ moduleUrl: required.moduleUrl, helperStem: host.helperStem });
|
|
53
|
+
return new Promise((resolve, reject) => {
|
|
54
|
+
const child = fork(helper, [root], {
|
|
55
|
+
execArgv,
|
|
56
|
+
// Trusted code logs redacted diagnostics to stderr; keep them in server logs,
|
|
57
|
+
// independently of the fixed public refusal written to refusal.txt. Crashes and
|
|
58
|
+
// native warnings bypass worker logging, so the parent sanitizes every line.
|
|
59
|
+
stdio: ["ignore", "ignore", "pipe", "ipc"],
|
|
60
|
+
env: workerEnvironment({ root, host }),
|
|
61
|
+
});
|
|
62
|
+
relayWorkerDiagnostics({ child, host });
|
|
63
|
+
let reason;
|
|
64
|
+
const abort = () => { reason = new SiteShareRefusal({ code: "CANCELLED", message: "Import database verification was cancelled." }); child.kill("SIGKILL"); };
|
|
65
|
+
const timer = setTimeout(() => { reason = new SiteShareRefusal({ code: "DATABASE_TIMEOUT", message: "Import database verification exceeded 90 seconds." }); child.kill("SIGKILL"); }, 90_000);
|
|
66
|
+
optional.signal?.addEventListener("abort", abort, { once: true });
|
|
67
|
+
if (optional.signal?.aborted)
|
|
68
|
+
abort();
|
|
69
|
+
child.once("error", error => { reason = error; });
|
|
70
|
+
child.once("close", code => {
|
|
71
|
+
clearTimeout(timer);
|
|
72
|
+
optional.signal?.removeEventListener("abort", abort);
|
|
73
|
+
if (reason)
|
|
74
|
+
reject(reason);
|
|
75
|
+
else
|
|
76
|
+
resolve(code);
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/** Read back the rebuilt database and its manifests from the helper's private root. */
|
|
81
|
+
async function readWorkerOutputs(required, _optional = {}) {
|
|
82
|
+
const { root } = required;
|
|
83
|
+
const bytes = await readFile(path.join(root, "output.db"));
|
|
84
|
+
if (bytes.length > required.limits.maxExpandedBytes)
|
|
85
|
+
throw new SiteShareRefusal({ code: "LIMIT_EXCEEDED", message: "Rebuilt import database exceeds 300 MiB." });
|
|
86
|
+
const media = JSON.parse(await readFile(path.join(root, "media.json"), "utf8"));
|
|
87
|
+
const documents = JSON.parse(await readFile(path.join(root, "documents.json"), "utf8"));
|
|
88
|
+
const notices = JSON.parse(await readFile(path.join(root, "notices.json"), "utf8"));
|
|
89
|
+
const credentialWarnings = JSON.parse(await readFile(path.join(root, "credential-warnings.json"), "utf8"));
|
|
90
|
+
return { bytes, media, documents, notices, credentialWarnings };
|
|
91
|
+
}
|
|
92
|
+
/** Stage the snapshot inside an owned root, run the helper and read its outputs back. */
|
|
93
|
+
async function rebuildInRoot(required, optional = {}) {
|
|
94
|
+
const { root } = required;
|
|
95
|
+
const space = await required.readSpace(root);
|
|
96
|
+
if (space.bavail * space.bsize < required.snapshot.length * 3 + 16 * 1024 * 1024)
|
|
97
|
+
throw new SiteShareRefusal({ code: "INSUFFICIENT_STORAGE", message: "Not enough private staging space to verify this database." });
|
|
98
|
+
await writeFile(path.join(root, "input.db"), required.snapshot, { flag: "wx", mode: 0o600 });
|
|
99
|
+
await writeFile(path.join(root, "omitted-media.json"), JSON.stringify(required.omittedMediaIds ?? []), { flag: "wx", mode: 0o600 });
|
|
100
|
+
const code = await runWorker({ host: required.host, root, moduleUrl: required.moduleUrl, fork: required.fork }, { signal: optional.signal });
|
|
101
|
+
await requireWorkerSuccess({ code, root, host: required.host });
|
|
102
|
+
return readWorkerOutputs({ root, limits: required.limits });
|
|
103
|
+
}
|
|
104
|
+
/** Read hostile SQLite only in a disposable helper with a deadline and heap ceiling.
|
|
105
|
+
* IPC carries no DB bytes or secrets. Input/output paths are minted here, never supplied by tools.
|
|
106
|
+
* The helper runs trusted source only and reuses A's sanitizer after checking schema objects.
|
|
107
|
+
* @complexity O(database bytes) memory/disk, capped at 300 MiB; one helper per import lane.
|
|
108
|
+
*/
|
|
109
|
+
export async function rebuildImportDatabase(required, optional = {}) {
|
|
110
|
+
const { host } = required;
|
|
111
|
+
const { limits = host.limits, statfs: readSpace = statfs, fork = childProcess.fork } = optional;
|
|
112
|
+
optional.signal?.throwIfAborted();
|
|
113
|
+
if (required.snapshot.length > limits.maxExpandedBytes)
|
|
114
|
+
throw new SiteShareRefusal({ code: "LIMIT_EXCEEDED", message: "Import database exceeds 300 MiB." });
|
|
115
|
+
const rebuild = (root) => rebuildInRoot({ host, root, snapshot: required.snapshot, moduleUrl: required.moduleUrl, ...(required.omittedMediaIds ? { omittedMediaIds: required.omittedMediaIds } : {}), limits, readSpace, fork }, { signal: optional.signal });
|
|
116
|
+
// The owned root takes its lock before the folder exists and keeps it through the helper's exit and
|
|
117
|
+
// every read, so the host's temp-root tidy never sees an unowned or abandoned-looking live root.
|
|
118
|
+
if (optional.tempRoot)
|
|
119
|
+
return optional.tempRoot({ work: ({ root }) => rebuild(root) });
|
|
120
|
+
const root = path.join(tmpdir(), host.stagingPrefix + randomUUID());
|
|
121
|
+
return host.withFileLock({ lockPath: root + ".lock", run: async () => {
|
|
122
|
+
// No staging directory exists until this parent owns its sibling lock.
|
|
123
|
+
await mkdir(root, { mode: 0o700 });
|
|
124
|
+
try {
|
|
125
|
+
return await rebuild(root);
|
|
126
|
+
}
|
|
127
|
+
finally {
|
|
128
|
+
await rm(root, { recursive: true, force: true });
|
|
129
|
+
}
|
|
130
|
+
} }, { staleMs: Infinity, timeoutMessage: () => "The temporary import database is still being cleaned up. Try importing again." });
|
|
131
|
+
}
|
|
132
|
+
/** Startup cleanup of interrupted database helpers; unrelated temp entries are left alone.
|
|
133
|
+
* Reuse the lock's dead-owner/staleness rule; a live owner is never removed for age.
|
|
134
|
+
* @complexity O(temp entries + removed bytes), one short lock attempt per matching directory or leftover lock. */
|
|
135
|
+
export async function tidyImportDatabases(required, _optional = {}) {
|
|
136
|
+
const temp = tmpdir();
|
|
137
|
+
for (const entry of await readdir(temp, { withFileTypes: true })) {
|
|
138
|
+
if (!isImportDatabaseLeftover({ entry, prefix: required.host.stagingPrefix }))
|
|
139
|
+
continue;
|
|
140
|
+
const root = path.join(temp, entry.isDirectory() ? entry.name : entry.name.slice(0, -5));
|
|
141
|
+
try {
|
|
142
|
+
await required.host.withFileLock({ lockPath: root + ".lock", run: () => rm(root, { recursive: true, force: true }) }, { timeoutMs: 100, staleMs: 86_400_000 });
|
|
143
|
+
}
|
|
144
|
+
catch (error) {
|
|
145
|
+
if (!isLockedByAnotherOwner({ error }))
|
|
146
|
+
throw error;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/** An interrupted helper's directory or its leftover `.lock` file; anything else in temp is not ours. */
|
|
151
|
+
function isImportDatabaseLeftover({ entry, prefix }, _optional = {}) {
|
|
152
|
+
return entry.name.startsWith(prefix) && (entry.isDirectory() || (entry.isFile() && entry.name.endsWith(".lock")));
|
|
153
|
+
}
|
|
154
|
+
/** Another owner still holds the lock, or the OS still holds a handle: skip this leftover. */
|
|
155
|
+
function isLockedByAnotherOwner({ error }, _optional = {}) {
|
|
156
|
+
return error instanceof FileLockTimeoutError || ["EBUSY", "EPERM", "EACCES"].includes(error.code ?? "");
|
|
157
|
+
}
|
|
158
|
+
/** Bind the import-database helper to one host's redactor, lock, limits, staging names and exit-code contract. */
|
|
159
|
+
export function createImportDatabase(required, _optional = {}) {
|
|
160
|
+
const { host } = required;
|
|
161
|
+
return {
|
|
162
|
+
rebuildImportDatabase: (input, options = {}) => rebuildImportDatabase({ host, ...input }, options),
|
|
163
|
+
tidyImportDatabases: () => tidyImportDatabases({ host }),
|
|
164
|
+
importWorkerLaunch: ({ moduleUrl }) => importWorkerLaunch({ moduleUrl, helperStem: host.helperStem }),
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=import-database.js.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { ImportHistoryPolicy, MinimalImportOutcome, SiteImportRecord, SiteImportSource } from '@jini-ai/core/contracts/site/site-import-history';
|
|
2
|
+
import type { SqliteSyncClient } from '@jini-ai/core/contracts/storage';
|
|
3
|
+
export declare function lookupFence({ db, policy, principalId, requestId, now }: {
|
|
4
|
+
db: SqliteSyncClient;
|
|
5
|
+
policy: ImportHistoryPolicy;
|
|
6
|
+
principalId: string;
|
|
7
|
+
requestId: string;
|
|
8
|
+
now: number;
|
|
9
|
+
}, _optional?: Record<string, never>): {
|
|
10
|
+
principal_id: string;
|
|
11
|
+
request_id: string;
|
|
12
|
+
fence_kind: "sha256" | "upload" | "origin";
|
|
13
|
+
fence_value: string;
|
|
14
|
+
import_id: string;
|
|
15
|
+
accepted_ms: number;
|
|
16
|
+
outcome_json: string;
|
|
17
|
+
} | undefined;
|
|
18
|
+
export declare function sameFence({ fence, source, digestSource }: {
|
|
19
|
+
fence: NonNullable<ReturnType<typeof lookupFence>>;
|
|
20
|
+
source: SiteImportSource;
|
|
21
|
+
digestSource: (required: {
|
|
22
|
+
source: SiteImportSource;
|
|
23
|
+
}, optional?: Record<string, never>) => string | undefined;
|
|
24
|
+
}, _optional?: Record<string, never>): boolean;
|
|
25
|
+
type Admission = {
|
|
26
|
+
kind: 'replay';
|
|
27
|
+
row: SiteImportRecord;
|
|
28
|
+
} | {
|
|
29
|
+
kind: 'replay';
|
|
30
|
+
outcome: MinimalImportOutcome;
|
|
31
|
+
} | {
|
|
32
|
+
kind: 'admitted';
|
|
33
|
+
row: SiteImportRecord;
|
|
34
|
+
};
|
|
35
|
+
export declare function admitImport({ db, clock, policy, principalId, requestId, source, digestSource, requireBudget, makeRow, beforeWrite }: {
|
|
36
|
+
db: SqliteSyncClient;
|
|
37
|
+
clock: {
|
|
38
|
+
nowMs(): number;
|
|
39
|
+
};
|
|
40
|
+
policy: ImportHistoryPolicy;
|
|
41
|
+
principalId: string;
|
|
42
|
+
requestId?: string | undefined;
|
|
43
|
+
source: SiteImportSource;
|
|
44
|
+
digestSource: (required: {
|
|
45
|
+
source: SiteImportSource;
|
|
46
|
+
}, optional?: Record<string, never>) => string | undefined;
|
|
47
|
+
requireBudget: (required: Record<string, never>, optional?: Record<string, never>) => void;
|
|
48
|
+
makeRow: (required: {
|
|
49
|
+
now: number;
|
|
50
|
+
}, optional?: Record<string, never>) => SiteImportRecord;
|
|
51
|
+
beforeWrite: (required: Record<string, never>, optional?: Record<string, never>) => void;
|
|
52
|
+
}, _optional?: Record<string, never>): Admission;
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=admission.d.ts.map
|