@jini-ai/devops 0.7.3-next.2 → 0.7.3-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/dist/backup/site/archive-extensions.d.ts +73 -0
- package/dist/backup/site/archive-extensions.js +129 -0
- package/dist/backup/site/archive-manifest.d.ts +85 -0
- package/dist/backup/site/archive-manifest.js +176 -0
- package/dist/backup/site/archive-media.d.ts +121 -0
- package/dist/backup/site/archive-media.js +93 -0
- package/dist/backup/site/backup-service.credentials.d.ts +31 -0
- package/dist/backup/site/backup-service.credentials.js +161 -0
- package/dist/backup/site/backup-service.d.ts +331 -0
- package/dist/backup/site/backup-service.js +125 -0
- package/dist/backup/site/backup-service.plan.d.ts +64 -0
- package/dist/backup/site/backup-service.plan.js +207 -0
- package/dist/backup/site/backup-service.push.d.ts +29 -0
- package/dist/backup/site/backup-service.push.js +82 -0
- package/dist/backup/site/backup-service.shared.d.ts +40 -0
- package/dist/backup/site/backup-service.shared.js +37 -0
- package/dist/backup/site/bundled-export-file-policy.d.ts +38 -0
- package/dist/backup/site/bundled-export-file-policy.js +40 -0
- package/dist/backup/site/credential-warnings.d.ts +41 -0
- package/dist/backup/site/credential-warnings.js +50 -0
- package/dist/backup/site/import-backend-steps.d.ts +167 -0
- package/dist/backup/site/import-backend-steps.js +170 -0
- package/dist/backup/site/import-backend.d.ts +167 -0
- package/dist/backup/site/import-backend.js +298 -0
- package/dist/backup/site/import-database.d.ts +118 -0
- package/dist/backup/site/import-database.js +167 -0
- package/dist/backup/site/import-index/admission.d.ts +54 -0
- package/dist/backup/site/import-index/admission.js +46 -0
- package/dist/backup/site/import-index/backfill.d.ts +106 -0
- package/dist/backup/site/import-index/backfill.js +137 -0
- package/dist/backup/site/import-index/errors.d.ts +28 -0
- package/dist/backup/site/import-index/errors.js +38 -0
- package/dist/backup/site/import-index/migrations/checksums.d.ts +4 -0
- package/dist/backup/site/import-index/migrations/checksums.js +4 -0
- package/dist/backup/site/import-index/migrations/site-imports-v1.d.ts +2 -0
- package/dist/backup/site/import-index/migrations/site-imports-v1.js +10 -0
- package/dist/backup/site/import-index/mode.d.ts +191 -0
- package/dist/backup/site/import-index/mode.js +272 -0
- package/dist/backup/site/import-index/open.d.ts +40 -0
- package/dist/backup/site/import-index/open.js +87 -0
- package/dist/backup/site/import-index/paging.d.ts +28 -0
- package/dist/backup/site/import-index/paging.js +66 -0
- package/dist/backup/site/import-index/payload-namespace.d.ts +80 -0
- package/dist/backup/site/import-index/payload-namespace.js +156 -0
- package/dist/backup/site/import-index/rows.d.ts +32 -0
- package/dist/backup/site/import-index/rows.js +61 -0
- package/dist/backup/site/import-index/schema.d.ts +8 -0
- package/dist/backup/site/import-index/schema.js +31 -0
- package/dist/backup/site/import-index/store.d.ts +27 -0
- package/dist/backup/site/import-index/store.js +33 -0
- package/dist/backup/site/import-index/sweep.d.ts +10 -0
- package/dist/backup/site/import-index/sweep.js +26 -0
- package/dist/backup/site/import-keep-off.d.ts +128 -0
- package/dist/backup/site/import-keep-off.js +204 -0
- package/dist/backup/site/import-plugin-state.d.ts +74 -0
- package/dist/backup/site/import-plugin-state.js +67 -0
- package/dist/backup/site/import-registry.d.ts +110 -0
- package/dist/backup/site/import-registry.js +205 -0
- package/dist/backup/site/import-restore-placement.d.ts +94 -0
- package/dist/backup/site/import-restore-placement.js +158 -0
- package/dist/backup/site/import-restore.d.ts +111 -0
- package/dist/backup/site/import-restore.js +120 -0
- package/dist/backup/site/import-verifier-inventory.d.ts +137 -0
- package/dist/backup/site/import-verifier-inventory.js +236 -0
- package/dist/backup/site/import-verifier-projection.d.ts +78 -0
- package/dist/backup/site/import-verifier-projection.js +100 -0
- package/dist/backup/site/import-verifier.d.ts +126 -0
- package/dist/backup/site/import-verifier.js +53 -0
- package/dist/backup/site/owned-temp-root.d.ts +12 -0
- package/dist/backup/site/owned-temp-root.js +2 -0
- package/dist/backup/site/package-file-inventory.d.ts +63 -0
- package/dist/backup/site/package-file-inventory.js +56 -0
- package/dist/backup/site/push-content.d.ts +70 -0
- package/dist/backup/site/push-content.js +56 -0
- package/dist/backup/site/react/ShowMoreImports.d.ts +21 -0
- package/dist/backup/site/react/ShowMoreImports.js +8 -0
- package/dist/backup/site/saved-keys-port.d.ts +47 -0
- package/dist/backup/site/saved-keys-port.js +3 -0
- package/dist/backup/site/saved-keys.d.ts +25 -0
- package/dist/backup/site/saved-keys.js +38 -0
- package/dist/backup/site/share-backend.d.ts +243 -0
- package/dist/backup/site/share-backend.js +284 -0
- package/dist/backup/site/share-database/projection.d.ts +195 -0
- package/dist/backup/site/share-database/projection.js +90 -0
- package/dist/backup/site/share-database/projection.media.d.ts +38 -0
- package/dist/backup/site/share-database/projection.media.js +179 -0
- package/dist/backup/site/share-database/projection.tables.d.ts +46 -0
- package/dist/backup/site/share-database/projection.tables.js +193 -0
- package/dist/backup/site/share-expiry.d.ts +75 -0
- package/dist/backup/site/share-expiry.js +49 -0
- package/dist/backup/site/share-export-failure.d.ts +17 -0
- package/dist/backup/site/share-export-failure.js +16 -0
- package/dist/backup/site/share-file-policy.d.ts +60 -0
- package/dist/backup/site/share-file-policy.js +146 -0
- package/dist/backup/site/share-hosting.d.ts +107 -0
- package/dist/backup/site/share-hosting.js +148 -0
- package/dist/backup/site/share-preparation-steps.d.ts +180 -0
- package/dist/backup/site/share-preparation-steps.js +109 -0
- package/dist/backup/site/share-preparation.d.ts +122 -0
- package/dist/backup/site/share-preparation.js +43 -0
- package/dist/backup/site/share-refusal.d.ts +21 -0
- package/dist/backup/site/share-refusal.js +20 -0
- package/dist/backup/site/share-registry.d.ts +124 -0
- package/dist/backup/site/share-registry.js +219 -0
- package/dist/backup/site/share-retention.d.ts +62 -0
- package/dist/backup/site/share-retention.js +126 -0
- package/dist/backup/site/share-service.d.ts +128 -0
- package/dist/backup/site/share-service.js +194 -0
- package/dist/backup/site/share-zip.d.ts +115 -0
- package/dist/backup/site/share-zip.js +144 -0
- package/dist/backup/site/sources.d.ts +344 -0
- package/dist/backup/site/sources.js +595 -0
- package/dist/backup/site/static-copy.d.ts +122 -0
- package/dist/backup/site/static-copy.js +165 -0
- package/dist/backup/site/static-download-html.d.ts +76 -0
- package/dist/backup/site/static-download-html.js +149 -0
- package/dist/backup/site/static-download-landing.d.ts +52 -0
- package/dist/backup/site/static-download-landing.js +95 -0
- package/dist/backup/site/static-download-layout.d.ts +96 -0
- package/dist/backup/site/static-download-layout.js +325 -0
- package/dist/backup/site/static-export-selection.d.ts +50 -0
- package/dist/backup/site/static-export-selection.js +76 -0
- package/dist/backup/site/static-site-packager.d.ts +42 -0
- package/dist/backup/site/static-site-packager.js +32 -0
- package/dist/backup/site/tool-registrations.d.ts +74 -0
- package/dist/backup/site/tool-registrations.js +201 -0
- package/dist/checks/complexity-debt.d.ts +100 -0
- package/dist/checks/complexity-debt.js +131 -0
- package/dist/checks/coverage/diff.js +5 -1
- package/dist/checks/env-access.d.ts +14 -1
- package/dist/checks/env-access.js +92 -6
- package/dist/checks/live-verify-checks.d.ts +29 -0
- package/dist/checks/live-verify-checks.js +30 -0
- package/dist/checks/quality-gates.d.ts +137 -0
- package/dist/checks/quality-gates.js +209 -0
- package/dist/core/deploy-types.d.ts +2 -0
- package/dist/deploy/admin-http/site-update-status.d.ts +8 -0
- package/dist/deploy/admin-http/site-update-status.js +15 -0
- package/dist/deploy/host-kit.d.ts +3 -0
- package/dist/deploy/index.d.ts +6 -0
- package/dist/deploy/index.js +6 -0
- package/dist/deploy/ops-runner.js +7 -0
- package/dist/deploy/ops-tool-contracts.d.ts +10 -1
- package/dist/deploy/react/Deployment.d.ts +37 -0
- package/dist/deploy/react/Deployment.js +94 -0
- package/dist/deploy/react/DockerfileTab.d.ts +72 -0
- package/dist/deploy/react/DockerfileTab.js +131 -0
- package/dist/deploy/react/HistoryTab.d.ts +43 -0
- package/dist/deploy/react/HistoryTab.js +12 -0
- package/dist/deploy/react/OverviewTab.d.ts +60 -0
- package/dist/deploy/react/OverviewTab.js +75 -0
- package/dist/deploy/react/PublishRunResult.d.ts +5 -1
- package/dist/deploy/react/PublishRunResult.js +4 -4
- package/dist/deploy/react/SiteUpdateNotice.d.ts +22 -0
- package/dist/deploy/react/SiteUpdateNotice.js +25 -0
- package/dist/deploy/react/StaticCredentialFields.d.ts +36 -0
- package/dist/deploy/react/StaticCredentialFields.js +63 -0
- package/dist/deploy/react/StaticCredentialSteps.d.ts +23 -0
- package/dist/deploy/react/StaticCredentialSteps.js +155 -0
- package/dist/deploy/react/StaticExportCard.d.ts +11 -0
- package/dist/deploy/react/StaticExportCard.js +97 -0
- package/dist/deploy/react/StaticPublishCredentials.d.ts +50 -0
- package/dist/deploy/react/StaticPublishCredentials.js +77 -0
- package/dist/deploy/react/StaticPublishForm.d.ts +12 -0
- package/dist/deploy/react/StaticPublishForm.js +91 -0
- package/dist/deploy/react/StaticSiteTab.d.ts +207 -0
- package/dist/deploy/react/StaticSiteTab.js +117 -0
- package/dist/deploy/react/deployment-visuals.d.ts +207 -0
- package/dist/deploy/react/deployment-visuals.js +101 -0
- package/dist/deploy/react/download-dockerfile.d.ts +14 -0
- package/dist/deploy/react/download-dockerfile.js +15 -0
- package/dist/deploy/react/hooks/publish-credential-draft.d.ts +33 -0
- package/dist/deploy/react/hooks/publish-credential-draft.js +54 -0
- package/dist/deploy/react/hooks/publish-credential-selection.d.ts +13 -0
- package/dist/deploy/react/hooks/publish-credential-selection.js +34 -0
- package/dist/deploy/react/hooks/publish-credential-writes.d.ts +20 -0
- package/dist/deploy/react/hooks/publish-credential-writes.js +99 -0
- package/dist/deploy/react/hooks/static-publish-actions.d.ts +10 -0
- package/dist/deploy/react/hooks/static-publish-actions.js +62 -0
- package/dist/deploy/react/hooks/static-publish-form.hooks.d.ts +38 -0
- package/dist/deploy/react/hooks/static-publish-form.hooks.js +103 -0
- package/dist/deploy/react/hooks/static-publish-run.hooks.d.ts +28 -0
- package/dist/deploy/react/hooks/static-publish-run.hooks.js +92 -0
- package/dist/deploy/react/hooks/use-dockerfile-source.hooks.d.ts +148 -0
- package/dist/deploy/react/hooks/use-dockerfile-source.hooks.js +155 -0
- package/dist/deploy/react/hooks/use-publish-credentials.hooks.d.ts +268 -0
- package/dist/deploy/react/hooks/use-publish-credentials.hooks.js +52 -0
- package/dist/deploy/react/hooks/use-static-export.hooks.d.ts +128 -0
- package/dist/deploy/react/hooks/use-static-export.hooks.js +159 -0
- package/dist/deploy/react/hooks/use-static-publish.hooks.d.ts +208 -0
- package/dist/deploy/react/hooks/use-static-publish.hooks.js +48 -0
- package/dist/deploy/react/index.d.ts +4 -0
- package/dist/deploy/react/index.js +2 -0
- package/dist/deploy/react/rules.d.ts +363 -0
- package/dist/deploy/react/rules.js +314 -0
- package/dist/deploy/react/use-deployment-overview.hooks.d.ts +41 -0
- package/dist/deploy/react/use-deployment-overview.hooks.js +11 -0
- package/dist/deploy/site/agent-tools.d.ts +42 -0
- package/dist/deploy/site/agent-tools.js +119 -0
- package/dist/deploy/site/deploy-config-registry.d.ts +155 -0
- package/dist/deploy/site/deploy-config-registry.js +124 -0
- package/dist/deploy/site/deploy-config.d.ts +97 -0
- package/dist/deploy/site/deploy-config.js +115 -0
- package/dist/deploy/site/deploy-ops/agent-tools.d.ts +22 -0
- package/dist/deploy/site/deploy-ops/agent-tools.js +76 -0
- package/dist/deploy/site/deploy-ops/registry.d.ts +134 -0
- package/dist/deploy/site/deploy-ops/registry.js +106 -0
- package/dist/deploy/site/deploy-ops/run-ops.d.ts +66 -0
- package/dist/deploy/site/deploy-ops/run-ops.js +34 -0
- package/dist/deploy/site/deploy-ops/secret-confirm.d.ts +36 -0
- package/dist/deploy/site/deploy-ops/secret-confirm.js +27 -0
- package/dist/deploy/site/deploy-targets/host-kit.d.ts +28 -0
- package/dist/deploy/site/deploy-targets/host-kit.js +120 -0
- package/dist/deploy/site/deploy-targets/registry.d.ts +157 -0
- package/dist/deploy/site/deploy-targets/registry.js +132 -0
- package/dist/deploy/site/deploy-targets/types.d.ts +27 -0
- package/dist/deploy/site/deploy-targets/types.js +2 -0
- package/dist/deploy/site/dockerfile.d.ts +137 -0
- package/dist/deploy/site/dockerfile.js +101 -0
- package/dist/deploy/site/export-run.d.ts +137 -0
- package/dist/deploy/site/export-run.js +152 -0
- package/dist/deploy/site/ports.d.ts +115 -0
- package/dist/deploy/site/ports.js +2 -0
- package/dist/deploy/site/publish-agent-tools.d.ts +18 -0
- package/dist/deploy/site/publish-agent-tools.js +120 -0
- package/dist/deploy/site/publish-candidate.d.ts +26 -0
- package/dist/deploy/site/publish-candidate.js +37 -0
- package/dist/deploy/site/publish-credentials/account-label-heal-scheduler.d.ts +78 -0
- package/dist/deploy/site/publish-credentials/account-label-heal-scheduler.js +88 -0
- package/dist/deploy/site/publish-credentials/compatibility-port.d.ts +38 -0
- package/dist/deploy/site/publish-credentials/compatibility-port.js +19 -0
- package/dist/deploy/site/publish-credentials/execution-mode.d.ts +43 -0
- package/dist/deploy/site/publish-credentials/execution-mode.js +19 -0
- package/dist/deploy/site/publish-credentials/store-owner.d.ts +11 -0
- package/dist/deploy/site/publish-credentials/store-owner.js +9 -0
- package/dist/deploy/site/publish-credentials/store-resolution.d.ts +55 -0
- package/dist/deploy/site/publish-credentials/store-resolution.js +100 -0
- package/dist/deploy/site/publish-credentials/store-validation.d.ts +68 -0
- package/dist/deploy/site/publish-credentials/store-validation.js +182 -0
- package/dist/deploy/site/publish-credentials/store.d.ts +322 -0
- package/dist/deploy/site/publish-credentials/store.js +372 -0
- package/dist/deploy/site/publish-credentials/types.d.ts +85 -0
- package/dist/deploy/site/publish-credentials/types.js +2 -0
- package/dist/deploy/site/publish-tool-capabilities.d.ts +123 -0
- package/dist/deploy/site/publish-tool-capabilities.js +175 -0
- package/dist/deploy/site/publish-tool-credential.d.ts +48 -0
- package/dist/deploy/site/publish-tool-credential.js +284 -0
- package/dist/deploy/site/publish-tool-deps.d.ts +205 -0
- package/dist/deploy/site/publish-tool-deps.js +15 -0
- package/dist/deploy/site/publish-tool-execution.d.ts +78 -0
- package/dist/deploy/site/publish-tool-execution.js +313 -0
- package/dist/deploy/site/publish-tool-schema.d.ts +29 -0
- package/dist/deploy/site/publish-tool-schema.js +38 -0
- package/dist/deploy/site/static-publish/adapter-export.d.ts +54 -0
- package/dist/deploy/site/static-publish/adapter-export.js +89 -0
- package/dist/deploy/site/static-publish/adapter-plan.d.ts +99 -0
- package/dist/deploy/site/static-publish/adapter-plan.js +112 -0
- package/dist/deploy/site/static-publish/adapter.d.ts +182 -0
- package/dist/deploy/site/static-publish/adapter.js +321 -0
- package/dist/deploy/site/static-publish/admin-publish-read.d.ts +209 -0
- package/dist/deploy/site/static-publish/admin-publish-read.js +116 -0
- package/dist/deploy/site/static-publish/credentials.d.ts +110 -0
- package/dist/deploy/site/static-publish/credentials.js +290 -0
- package/dist/deploy/site/static-publish/domain-publish-rows.d.ts +25 -0
- package/dist/deploy/site/static-publish/domain-publish-rows.js +43 -0
- package/dist/deploy/site/static-publish/domain-publish-tool.d.ts +19 -0
- package/dist/deploy/site/static-publish/domain-publish-tool.js +111 -0
- package/dist/deploy/site/static-publish/inspection.d.ts +24 -0
- package/dist/deploy/site/static-publish/inspection.js +69 -0
- package/dist/deploy/site/static-publish/publish-history.d.ts +197 -0
- package/dist/deploy/site/static-publish/publish-history.js +153 -0
- package/dist/deploy/site/static-publish/publish-run.d.ts +156 -0
- package/dist/deploy/site/static-publish/publish-run.js +186 -0
- package/dist/deploy/site/static-publish/types.d.ts +165 -0
- package/dist/deploy/site/static-publish/types.js +2 -0
- package/dist/deploy/site/static-publish/verify.d.ts +217 -0
- package/dist/deploy/site/static-publish/verify.js +248 -0
- package/dist/deploy/site/tool-registrations.d.ts +97 -0
- package/dist/deploy/site/tool-registrations.js +130 -0
- package/dist/deploy/site/types.d.ts +51 -0
- package/dist/deploy/site/types.js +2 -0
- package/dist/deploy/site-update/check-for-update.d.ts +19 -0
- package/dist/deploy/site-update/check-for-update.js +19 -0
- package/dist/deploy/site-update/contracts.d.ts +161 -0
- package/dist/deploy/site-update/contracts.js +94 -0
- package/dist/deploy/site-update/desktop-site-update.d.ts +66 -0
- package/dist/deploy/site-update/desktop-site-update.js +43 -0
- package/dist/deploy/site-update/fake-site-update.d.ts +39 -0
- package/dist/deploy/site-update/fake-site-update.js +52 -0
- package/dist/deploy/site-update/run-site-update.d.ts +121 -0
- package/dist/deploy/site-update/run-site-update.js +219 -0
- package/dist/deploy/site-update/self-hosted-site-update.d.ts +71 -0
- package/dist/deploy/site-update/self-hosted-site-update.js +79 -0
- package/dist/deploy/target-contracts.d.ts +3 -0
- package/dist/deploy/tool.d.ts +5 -8
- package/dist/deploy/tool.js +6 -9
- package/dist/dns/binding-sweeper.d.ts +72 -0
- package/dist/dns/binding-sweeper.js +53 -0
- package/dist/dns/index.d.ts +1 -0
- package/dist/dns/index.js +1 -0
- package/dist/dns/site/binding.repo.d.ts +71 -0
- package/dist/dns/site/binding.repo.js +45 -0
- package/dist/dns/site/dns-changes.d.ts +90 -0
- package/dist/dns/site/dns-changes.js +271 -0
- package/dist/dns/site/dns-tools.d.ts +46 -0
- package/dist/dns/site/dns-tools.js +204 -0
- package/dist/dns/site/mail-dns-status.d.ts +111 -0
- package/dist/dns/site/mail-dns-status.js +190 -0
- package/dist/dns/site/mail-dns-tools.d.ts +33 -0
- package/dist/dns/site/mail-dns-tools.js +62 -0
- package/dist/dns/site/mail-requirements.d.ts +30 -0
- package/dist/dns/site/mail-requirements.js +78 -0
- package/dist/dns/site/tool-deps.d.ts +21 -0
- package/dist/dns/site/tool-deps.js +2 -0
- package/dist/dns/site/tools.d.ts +74 -0
- package/dist/dns/site/tools.js +124 -0
- package/dist/local-dev/bind-host.d.ts +80 -0
- package/dist/local-dev/bind-host.js +90 -0
- package/dist/local-dev/dev-proxy-upstream.d.ts +69 -0
- package/dist/local-dev/dev-proxy-upstream.js +63 -0
- package/dist/local-dev/index.d.ts +28 -0
- package/dist/local-dev/index.js +25 -0
- package/dist/packaging/electron/archive.d.ts +2 -9
- package/dist/packaging/electron/asar-adapter.d.ts +2 -1
- package/dist/packaging/electron/entry.d.ts +2 -0
- package/dist/packaging/electron/move-to-applications.d.ts +165 -0
- package/dist/packaging/electron/move-to-applications.js +162 -0
- package/dist/packaging/electron/policies.d.ts +33 -4
- package/dist/packaging/electron/policies.js +29 -10
- package/dist/packaging/electron/ports.d.ts +1 -6
- package/dist/packaging/electron/staging.d.ts +11 -2
- package/dist/packaging/electron/staging.js +15 -5
- package/dist/react/site-share-expiry/ShareExpiryControls.d.ts +29 -0
- package/dist/react/site-share-expiry/ShareExpiryControls.js +7 -0
- package/dist/react/site-share-expiry/index.d.ts +2 -0
- package/dist/react/site-share-expiry/index.js +2 -0
- package/dist/source-control/react/ProvidersTab.d.ts +98 -0
- package/dist/source-control/react/ProvidersTab.js +195 -0
- package/dist/source-control/react/SourceControl.d.ts +51 -0
- package/dist/source-control/react/SourceControl.js +61 -0
- package/dist/source-control/react/hooks/use-source-control-credentials.hooks.d.ts +128 -0
- package/dist/source-control/react/hooks/use-source-control-credentials.hooks.js +102 -0
- package/dist/source-control/react/rules.d.ts +167 -0
- package/dist/source-control/react/rules.js +125 -0
- package/dist/source-control/react/source-control-visuals.d.ts +75 -0
- package/dist/source-control/react/source-control-visuals.js +48 -0
- package/dist/source-control/site/agent-tools.d.ts +5 -0
- package/dist/source-control/site/agent-tools.js +30 -0
- package/dist/source-control/site/bundled-provider-registry.d.ts +33 -0
- package/dist/source-control/site/bundled-provider-registry.js +37 -0
- package/dist/source-control/site/commit-schema.d.ts +40 -0
- package/dist/source-control/site/commit-schema.js +29 -0
- package/dist/source-control/site/commit-target.d.ts +26 -0
- package/dist/source-control/site/commit-target.js +58 -0
- package/dist/source-control/site/credential-form.d.ts +36 -0
- package/dist/source-control/site/credential-form.js +102 -0
- package/dist/source-control/site/credential-setup.d.ts +107 -0
- package/dist/source-control/site/credential-setup.js +216 -0
- package/dist/source-control/site/provider-kit.d.ts +37 -0
- package/dist/source-control/site/provider-kit.js +35 -0
- package/dist/source-control/site/provider-module.d.ts +251 -0
- package/dist/source-control/site/provider-module.js +2 -0
- package/dist/source-control/site/saved-key-bindings.d.ts +4 -0
- package/dist/source-control/site/saved-key-bindings.js +4 -0
- package/dist/source-control/site/static-site-packager-port.d.ts +37 -0
- package/dist/source-control/site/static-site-packager-port.js +2 -0
- package/dist/source-control/site/store.d.ts +209 -0
- package/dist/source-control/site/store.js +374 -0
- package/dist/source-control/site/store.validation.d.ts +72 -0
- package/dist/source-control/site/store.validation.js +168 -0
- package/dist/source-control/site/tool-registrations.d.ts +190 -0
- package/dist/source-control/site/tool-registrations.js +379 -0
- package/dist/static-export/site/export-preflight.d.ts +48 -0
- package/dist/static-export/site/export-preflight.js +82 -0
- package/dist/static-export/site/media-original-urls.d.ts +57 -0
- package/dist/static-export/site/media-original-urls.js +109 -0
- package/dist/static-export/site/ports.d.ts +82 -0
- package/dist/static-export/site/ports.js +29 -0
- package/dist/static-export/site/public-origin-policy.d.ts +32 -0
- package/dist/static-export/site/public-origin-policy.js +68 -0
- package/dist/static-export/site/route-manifest.d.ts +65 -0
- package/dist/static-export/site/route-manifest.js +139 -0
- package/dist/static-export/site/site-exporter.d.ts +158 -0
- package/dist/static-export/site/site-exporter.js +112 -0
- package/dist/static-export/site/static-security-headers.d.ts +39 -0
- package/dist/static-export/site/static-security-headers.js +43 -0
- package/dist/static-export/site/theme-preview-manifest.d.ts +35 -0
- package/dist/static-export/site/theme-preview-manifest.js +28 -0
- package/package.json +911 -7
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file `include: ["mail"]` for the DNS change tools: the active transactional mail provider's
|
|
3
|
+
* domain records join a hostname's requirements (design override, 2026-10-21: "requirements go to
|
|
4
|
+
* DNS through ports; DNS merges SPF; never overwrite existing SPF/DMARC").
|
|
5
|
+
*
|
|
6
|
+
* The records come only through the `mailRequirements` port (the resolved mailer's
|
|
7
|
+
* `domainRequirements`); this file never talks to a mail provider. SPF needs nothing here: the
|
|
8
|
+
* planner merges it into the zone's one `v=spf1` record. DMARC does: a name may carry only one
|
|
9
|
+
* `v=DMARC1` record and the planner adds TXT values beside existing ones, so a DMARC record the
|
|
10
|
+
* site already publishes is kept and any DMARC the provider asks for is dropped. When neither
|
|
11
|
+
* exists, a monitoring-only hint (`p=none`) is added; when existence cannot be read, nothing is.
|
|
12
|
+
*/
|
|
13
|
+
import { ToolInputError } from "@jini-ai/core";
|
|
14
|
+
import { normalizeDnsName, settlePort } from "../index.js";
|
|
15
|
+
/** Who "asked" for the DMARC hint, so a later refresh can replace it. */
|
|
16
|
+
export const DMARC_HINT_PROVIDER_ID = "dmarc-hint";
|
|
17
|
+
/** Monitoring only: receivers report, nothing is rejected, so it cannot break delivery. */
|
|
18
|
+
export const DMARC_HINT_VALUE = "v=DMARC1; p=none";
|
|
19
|
+
const DMARC_VALUE = /^v=DMARC1(;|\s|$)/i;
|
|
20
|
+
function refuse({ prefix, message }, _options = {}) {
|
|
21
|
+
throw new ToolInputError({ message: `${prefix}: ${message}` });
|
|
22
|
+
}
|
|
23
|
+
/** Same name, or one inside the other: the hostname's zone can carry the mail domain's records. */
|
|
24
|
+
function related({ hostname, domain }, _options = {}) {
|
|
25
|
+
return hostname === domain || hostname.endsWith(`.${domain}`) || domain.endsWith(`.${hostname}`);
|
|
26
|
+
}
|
|
27
|
+
const isDmarcRecord = ({ name }, _options = {}) => (record) => record.type === "TXT" && normalizeDnsName({ name: record.name }) === name && DMARC_VALUE.test(record.value.trim());
|
|
28
|
+
/** Whether `name` already publishes DMARC: true, false, or `unknown` when it could not be read. */
|
|
29
|
+
async function existingDmarc({ name, ports }, _options = {}) {
|
|
30
|
+
const zone = await settlePort({ call: () => ports.provider.findZone(ports.context, { hostname: name }) });
|
|
31
|
+
if (zone.status !== "ok" || zone.value === null)
|
|
32
|
+
return "unknown";
|
|
33
|
+
const zoneRef = zone.value.ref;
|
|
34
|
+
const listed = await settlePort({ call: () => ports.provider.listRecords(ports.context, { zoneRef, names: [name] }) });
|
|
35
|
+
if (listed.status !== "ok" || listed.value.inventory !== "complete")
|
|
36
|
+
return "unknown";
|
|
37
|
+
return listed.value.records.some(record => record.type === "TXT" && record.values.some(value => DMARC_VALUE.test(String(value).trim())));
|
|
38
|
+
}
|
|
39
|
+
/** The provider's requirement with DMARC reconciled against what the zone already has. */
|
|
40
|
+
async function withDmarc(mail, ports) {
|
|
41
|
+
const name = `_dmarc.${mail.domain}`;
|
|
42
|
+
const existing = await existingDmarc({ name, ports });
|
|
43
|
+
if (existing === true) {
|
|
44
|
+
// Never a second DMARC beside the site's own: keep theirs, drop the provider's.
|
|
45
|
+
const records = mail.records.filter(record => !isDmarcRecord({ name })(record));
|
|
46
|
+
return records.length > 0 ? [{ ...mail, records }] : [];
|
|
47
|
+
}
|
|
48
|
+
if (existing === "unknown" || mail.records.some(isDmarcRecord({ name })))
|
|
49
|
+
return [mail];
|
|
50
|
+
const hint = {
|
|
51
|
+
purpose: "mail", domain: mail.domain, providerId: DMARC_HINT_PROVIDER_ID,
|
|
52
|
+
records: [{ type: "TXT", name, value: DMARC_HINT_VALUE, note: "DMARC in monitoring mode; tighten the policy once reports look clean." }],
|
|
53
|
+
};
|
|
54
|
+
return [mail, hint];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Append the active mail provider's records for its sender domain to `requirements`, replacing any
|
|
58
|
+
* earlier copy of them (and of the DMARC hint) so a refresh never duplicates. Caller errors when the
|
|
59
|
+
* site cannot report mail requirements or the sender domain is outside the hostname.
|
|
60
|
+
* @complexity One port call, then at most one zone lookup and one record listing.
|
|
61
|
+
*/
|
|
62
|
+
export async function withMailRequirements(required, ports) {
|
|
63
|
+
const { hostname, errorPrefix } = required;
|
|
64
|
+
if (ports.mailRequirements === undefined)
|
|
65
|
+
refuse({ prefix: errorPrefix, message: "this site cannot report its mail provider's DNS records." });
|
|
66
|
+
const found = await ports.mailRequirements({ workspaceId: ports.context.workspaceId });
|
|
67
|
+
if (found === null) {
|
|
68
|
+
refuse({ prefix: errorPrefix, message: "no mail DNS records are available: choose a transactional mail provider that verifies sending domains (mail_set_provider), save its key, and set the site's sender address (core.mail.senderEmail)." });
|
|
69
|
+
}
|
|
70
|
+
const domain = normalizeDnsName({ name: found.domain });
|
|
71
|
+
if (!related({ hostname, domain }))
|
|
72
|
+
refuse({ prefix: errorPrefix, message: `the sender domain ${domain} is outside ${hostname}; plan it with hostname ${domain} instead.` });
|
|
73
|
+
const mail = { ...found, domain, records: [...found.records] };
|
|
74
|
+
const refreshed = (requirement) => requirement.purpose === "mail"
|
|
75
|
+
&& normalizeDnsName({ name: requirement.domain }) === domain && [mail.providerId, DMARC_HINT_PROVIDER_ID].includes(requirement.providerId);
|
|
76
|
+
return [...required.requirements.filter(requirement => !refreshed(requirement)), ...(await withDmarc(mail, ports))];
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=mail-requirements.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { AuthorizeFn } from "@jini-ai/core/contracts/events";
|
|
2
|
+
import type { AuthoritativeDnsPort, DnsProviderContext, DnsProviderRegistry } from "../index.js";
|
|
3
|
+
import type { DomainBindingStore } from "./binding.repo.js";
|
|
4
|
+
import type { MailRequirementsPort } from "./mail-requirements.js";
|
|
5
|
+
import type { SenderDomainVerificationPort } from "@jini-ai/core/contracts/mail";
|
|
6
|
+
/** Workspace authorization plus the DNS kernel ports built in the composition root. */
|
|
7
|
+
export interface DnsChangeToolDeps {
|
|
8
|
+
workspaceId: string;
|
|
9
|
+
authorize: AuthorizeFn;
|
|
10
|
+
registry: DnsProviderRegistry;
|
|
11
|
+
resolver: AuthoritativeDnsPort;
|
|
12
|
+
context: DnsProviderContext;
|
|
13
|
+
/** Absent when the composition has no content database (hermetic roots): `dns_verify` refuses. */
|
|
14
|
+
bindings?: DomainBindingStore;
|
|
15
|
+
/** The resolved mailer's `domainRequirements` (`include: ["mail"]`). Absent: that include refuses. */
|
|
16
|
+
mailRequirements?: MailRequirementsPort;
|
|
17
|
+
/** The mail provider's own sender-domain verdict, for `mail_dns_status`. Absent: reported as `null`. */
|
|
18
|
+
senderDomainVerification?: SenderDomainVerificationPort;
|
|
19
|
+
now: () => number;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=tool-deps.d.ts.map
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { AgentToolDefinition as SharedAgentToolDefinition } from "@jini-ai/core";
|
|
2
|
+
import { type AgentToolSideEffect, type ToolRegistration } from "@jini-ai/core";
|
|
3
|
+
import type { AuthorizeFn } from "@jini-ai/core/contracts/events";
|
|
4
|
+
/** The three bounded public DNS/TLS read operations the host builds (for example with the DNS diagnostics' `createDomainDnsChecks`). */
|
|
5
|
+
export interface DomainDnsChecksPort {
|
|
6
|
+
lookupDns(required: {
|
|
7
|
+
domain: unknown;
|
|
8
|
+
}, options?: {
|
|
9
|
+
types?: unknown;
|
|
10
|
+
}): Promise<unknown>;
|
|
11
|
+
checkDns(required: {
|
|
12
|
+
domain: unknown;
|
|
13
|
+
}, options?: {
|
|
14
|
+
expectedHost?: unknown;
|
|
15
|
+
}): Promise<{
|
|
16
|
+
status: string;
|
|
17
|
+
expectedHost: string | null;
|
|
18
|
+
}>;
|
|
19
|
+
tlsStatus(required: {
|
|
20
|
+
domain: unknown;
|
|
21
|
+
}): Promise<unknown>;
|
|
22
|
+
}
|
|
23
|
+
/** Public hostname validators (for example the DNS diagnostics' own); they throw `DomainDnsInputError` on refusal. */
|
|
24
|
+
export interface PublicNameValidators {
|
|
25
|
+
/** Canonical ASCII hostname; refuses URLs, IPs, ports, underscores and reserved/internal suffixes. */
|
|
26
|
+
readPublicDomain(required: {
|
|
27
|
+
value: unknown;
|
|
28
|
+
errorPrefix: string;
|
|
29
|
+
}): string;
|
|
30
|
+
/** Canonical ASCII DNS owner name, allowing ACME/DKIM/DMARC underscores. */
|
|
31
|
+
readPublicDnsName(required: {
|
|
32
|
+
value: unknown;
|
|
33
|
+
errorPrefix: string;
|
|
34
|
+
}): string;
|
|
35
|
+
}
|
|
36
|
+
/** Host authorization plus the checks factory; the public resolver, TLS probe and saved publishing hostnames stay inside the host's binding. */
|
|
37
|
+
export interface DomainDnsToolDeps {
|
|
38
|
+
workspaceId: string;
|
|
39
|
+
authorize: AuthorizeFn;
|
|
40
|
+
/** Builds the checks for one invocation, with this principal's operation authorization bound in. */
|
|
41
|
+
createChecks(required: {
|
|
42
|
+
authorize(required: {
|
|
43
|
+
operation: string;
|
|
44
|
+
}): Promise<void>;
|
|
45
|
+
}): DomainDnsChecksPort;
|
|
46
|
+
/** The validators the DNS change tools (and host adapters) normalize hostnames with. */
|
|
47
|
+
publicNames: PublicNameValidators;
|
|
48
|
+
}
|
|
49
|
+
type AgentToolDefinition = SharedAgentToolDefinition & {
|
|
50
|
+
inputSchema: Readonly<Record<string, unknown>>;
|
|
51
|
+
};
|
|
52
|
+
export declare const domainDnsAgentToolCatalog: AgentToolDefinition[];
|
|
53
|
+
export declare const domainDnsDerivedRisk: ReadonlyMap<string, AgentToolSideEffect>;
|
|
54
|
+
/**
|
|
55
|
+
* Wraps injected public-name validators so a refusal surfaces as the model-facing tool error.
|
|
56
|
+
* Generic validation and its URL/IP/internal-name rationale live with the injected validators.
|
|
57
|
+
* @param required.validators Validators that throw `DomainDnsInputError` on refusal.
|
|
58
|
+
* @returns The same two readers; a `DomainDnsInputError` becomes `ToolInputError` (cause kept), anything else propagates.
|
|
59
|
+
* @complexity O(length) time and space per call.
|
|
60
|
+
* @example toolInputPublicNames({ validators }).readPublicDomain({ value: "EXAMPLE.COM.", errorPrefix: "domain_lookup_dns" });
|
|
61
|
+
*/
|
|
62
|
+
export declare function toolInputPublicNames({ validators }: {
|
|
63
|
+
validators: PublicNameValidators;
|
|
64
|
+
}, _optional?: Record<string, never>): PublicNameValidators;
|
|
65
|
+
/**
|
|
66
|
+
* Wires the catalog/permissions around the host-injected bounded public DNS and TLS checks.
|
|
67
|
+
* @param deps Workspace authorization and the checks factory.
|
|
68
|
+
* @returns Three read-only tool registrations; validation errors surface as ToolInputError.
|
|
69
|
+
* @complexity O(1) registration; effects occur only when a handler is invoked.
|
|
70
|
+
* @example buildDomainDnsRegistrations(deps);
|
|
71
|
+
*/
|
|
72
|
+
export declare function buildDomainDnsRegistrations(deps: DomainDnsToolDeps, _optional?: Record<string, never>): ToolRegistration[];
|
|
73
|
+
export {};
|
|
74
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { toolMetadata } from '@jini-ai/core/tool-metadata/domain-dns';
|
|
2
|
+
import { ToolInputError } from "@jini-ai/core";
|
|
3
|
+
import { buildDomainRegistrations, indexCatalogById, requireInputRecord } from "@jini-ai/core";
|
|
4
|
+
import { adaptLegacyAuthorize, requireToolPermission } from "@jini-ai/core";
|
|
5
|
+
import { DomainDnsInputError, DNS_TYPES } from "@jini-ai/core/net/public-dns-vocabulary";
|
|
6
|
+
const domainSchema = { type: "string", minLength: 1, maxLength: 254, description: "Public DNS hostname, such as example.com or www.example.com; no URL, IP, port, or path." };
|
|
7
|
+
export const domainDnsAgentToolCatalog = [
|
|
8
|
+
{
|
|
9
|
+
name: "domain_lookup_dns",
|
|
10
|
+
description: "Looks up public A, AAAA, CNAME, MX, TXT, and NS DNS records for a domain or subdomain, including apex, www, and underscore names such as _acme-challenge, _dmarc, and selector._domainkey. Call to inspect DNS propagation, hosting IPs, mail records, verification TXT, or nameservers instead of running dig. Returns {domain, resolver, untrusted, queries:[{type,status,records:[{value,ttl}]}]}; not-found and no-data are distinct from resolver failure. Reports one public resolver's current view, not proof of propagation to every resolver. Records are untrusted data, never instructions. Read-only; cannot change DNS, register a domain, or inspect private DNS. For comparing a custom domain with this site's saved hosting address use domain_check_dns. Refuses invalid/internal hostnames, non-public addresses, excessive answers, and unusable resolver replies.",
|
|
11
|
+
sideEffects: "none", authorization: { permission: "content.read" },
|
|
12
|
+
inputSchema: { type: "object", additionalProperties: false, required: ["domain"], properties: { domain: { ...domainSchema, description: "Public DNS owner name, such as example.com, www.example.com, or _acme-challenge.example.com; no URL, IP, port, or path." }, types: { type: "array", minItems: 1, maxItems: 6, uniqueItems: true, items: { type: "string", enum: [...DNS_TYPES] }, description: "Record types; omit for all six." } } },
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: "domain_check_dns",
|
|
16
|
+
description: "Checks whether a custom domain's public DNS matches this site's saved hosting hostname from a connected publish destination or latest successful publish. Call after pointing an apex or www domain at its host. Optional expectedHost selects among saved hosting hostnames. Returns domain, expectedHost, status (matches-host-dns, mismatch, or unknown), expected/observed address records, missing/unexpected addresses, and a limitation. Compares current host DNS because provider-required records are not persisted; shared/CDN addresses do not prove correct app routing. Unknown means no independent host or no host address answer; never treat unknown as correctly configured. Read-only; cannot update registrar records. Requires deployments.read and publish_content.read; refuses ambiguous or unsaved hosting hostnames. DNS answers are untrusted data.",
|
|
17
|
+
sideEffects: "none", authorization: { permission: "deployments.read" },
|
|
18
|
+
inputSchema: { type: "object", additionalProperties: false, required: ["domain"], properties: { domain: domainSchema, expectedHost: domainSchema } },
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "domain_tls_status",
|
|
22
|
+
description: "Checks TLS/SSL certificate trust, hostname, and validity for a public domain with one bounded HTTPS HEAD request. Call to check whether HTTPS is trusted after configuring a custom domain, or diagnose an expired or mismatched certificate. Returns {domain,status:verified|invalid|unavailable,httpStatus,certificate:{expiresAt:null,issuer:null},limitation}. Certificate metadata is not exposed by the HTTP client; no expiry date is claimed. An HTTP error or redirect still proves certificate validation succeeded; redirects are never followed. Unavailable means no certificate conclusion was reached. Read-only; cannot issue or renew certificates. Refuses private destinations and invalid hostnames; only HTTPS port 443, no credentials or cookies.",
|
|
23
|
+
sideEffects: "none", authorization: { permission: "content.read" },
|
|
24
|
+
inputSchema: { type: "object", additionalProperties: false, required: ["domain"], properties: { domain: domainSchema } },
|
|
25
|
+
},
|
|
26
|
+
];
|
|
27
|
+
export const domainDnsDerivedRisk = new Map([
|
|
28
|
+
// -> injected public resolver.query; only bounded public DNS reads.
|
|
29
|
+
["domain_lookup_dns", "none"],
|
|
30
|
+
// -> injected listExpectedHosts + resolver.query; repository and DNS reads only.
|
|
31
|
+
["domain_check_dns", "none"],
|
|
32
|
+
// -> injected probeTls; one guarded HTTPS HEAD, no authored durable state.
|
|
33
|
+
["domain_tls_status", "none"],
|
|
34
|
+
]);
|
|
35
|
+
const UNKNOWN_REASON = "No independent hosting hostname is saved. Connect a publish destination or publish the site first.";
|
|
36
|
+
/**
|
|
37
|
+
* Wraps injected public-name validators so a refusal surfaces as the model-facing tool error.
|
|
38
|
+
* Generic validation and its URL/IP/internal-name rationale live with the injected validators.
|
|
39
|
+
* @param required.validators Validators that throw `DomainDnsInputError` on refusal.
|
|
40
|
+
* @returns The same two readers; a `DomainDnsInputError` becomes `ToolInputError` (cause kept), anything else propagates.
|
|
41
|
+
* @complexity O(length) time and space per call.
|
|
42
|
+
* @example toolInputPublicNames({ validators }).readPublicDomain({ value: "EXAMPLE.COM.", errorPrefix: "domain_lookup_dns" });
|
|
43
|
+
*/
|
|
44
|
+
export function toolInputPublicNames({ validators }, _optional = {}) {
|
|
45
|
+
return {
|
|
46
|
+
readPublicDomain: required => domainInputBoundary({ read: () => validators.readPublicDomain(required) }),
|
|
47
|
+
readPublicDnsName: required => domainInputBoundary({ read: () => validators.readPublicDnsName(required) }),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/** Converts synchronous injected validation into the model-facing tool error type; no I/O. */
|
|
51
|
+
function domainInputBoundary({ read }) {
|
|
52
|
+
try {
|
|
53
|
+
return read();
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
if (error instanceof DomainDnsInputError) {
|
|
57
|
+
throw new ToolInputError({ message: error.message }, { cause: error });
|
|
58
|
+
}
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Binds the injected checks to tool permissions for this invocation's principal.
|
|
64
|
+
* @returns Checks which validate before authorization and network reads. No effects during setup.
|
|
65
|
+
* @complexity O(1) setup; the package bounds each call to at most six DNS reads.
|
|
66
|
+
*/
|
|
67
|
+
function checksForPrincipal({ deps, principalId }) {
|
|
68
|
+
return deps.createChecks({
|
|
69
|
+
authorize: async ({ operation }) => {
|
|
70
|
+
const permission = operation === "check-dns" ? "deployments.read" : "content.read";
|
|
71
|
+
await requireToolPermission({ authorize: adaptLegacyAuthorize({ authorize: deps.authorize }), workspaceId: deps.workspaceId, principalId, permission }, { entityType: "domain-dns" });
|
|
72
|
+
if (operation === "check-dns") {
|
|
73
|
+
await requireToolPermission({ authorize: adaptLegacyAuthorize({ authorize: deps.authorize }), workspaceId: deps.workspaceId, principalId, permission: "publish_content.read" }, { entityType: "domain-dns" });
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Converts only diagnostics validation failures to the daemon's caller-input marker.
|
|
80
|
+
* Authorization and transport failures propagate unchanged; no effects beyond the injected call.
|
|
81
|
+
* @complexity O(1) beyond check execution.
|
|
82
|
+
*/
|
|
83
|
+
async function toolInputBoundary({ check }) {
|
|
84
|
+
try {
|
|
85
|
+
return await check();
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
if (error instanceof DomainDnsInputError) {
|
|
89
|
+
throw new ToolInputError({ message: error.message }, { cause: error });
|
|
90
|
+
}
|
|
91
|
+
throw error;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Wires the catalog/permissions around the host-injected bounded public DNS and TLS checks.
|
|
96
|
+
* @param deps Workspace authorization and the checks factory.
|
|
97
|
+
* @returns Three read-only tool registrations; validation errors surface as ToolInputError.
|
|
98
|
+
* @complexity O(1) registration; effects occur only when a handler is invoked.
|
|
99
|
+
* @example buildDomainDnsRegistrations(deps);
|
|
100
|
+
*/
|
|
101
|
+
export function buildDomainDnsRegistrations(deps, _optional = {}) {
|
|
102
|
+
return buildDomainRegistrations({ metadata: toolMetadata, domain: "domain-dns", catalogModule: "@jini-ai/devops/dns/site/tools.ts", catalog: indexCatalogById({ catalog: domainDnsAgentToolCatalog }), derivedRisk: domainDnsDerivedRisk, handlers: {
|
|
103
|
+
domain_lookup_dns: async (ctx) => {
|
|
104
|
+
const input = requireInputRecord({ input: ctx.input });
|
|
105
|
+
const checks = checksForPrincipal({ deps, principalId: ctx.principal.id });
|
|
106
|
+
return toolInputBoundary({ check: () => checks.lookupDns({ domain: input.domain }, { types: input.types }) });
|
|
107
|
+
},
|
|
108
|
+
domain_check_dns: async (ctx) => {
|
|
109
|
+
const input = requireInputRecord({ input: ctx.input });
|
|
110
|
+
const checks = checksForPrincipal({ deps, principalId: ctx.principal.id });
|
|
111
|
+
const result = await toolInputBoundary({ check: () => checks.checkDns({ domain: input.domain }, { expectedHost: input.expectedHost }) });
|
|
112
|
+
if (result.status === "unknown" && result.expectedHost === null) {
|
|
113
|
+
return { ...result, reason: UNKNOWN_REASON };
|
|
114
|
+
}
|
|
115
|
+
return result;
|
|
116
|
+
},
|
|
117
|
+
domain_tls_status: async (ctx) => {
|
|
118
|
+
const input = requireInputRecord({ input: ctx.input });
|
|
119
|
+
const checks = checksForPrincipal({ deps, principalId: ctx.principal.id });
|
|
120
|
+
return toolInputBoundary({ check: () => checks.tlsStatus({ domain: input.domain }) });
|
|
121
|
+
},
|
|
122
|
+
} });
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file The pure `--host`/host-env resolver shared by a host's local serve command and its
|
|
3
|
+
* container entry point.
|
|
4
|
+
*
|
|
5
|
+
* Purpose:
|
|
6
|
+
* Both boot paths call `app.listen(port, host)` with a HOST that used to be implicit — Node's own
|
|
7
|
+
* default when no host argument is passed is `::` (dual-stack, every interface), so every listener
|
|
8
|
+
* in the product was LAN-reachable unless it opted out individually. This is the one place that
|
|
9
|
+
* turns an operator's already-picked raw value into the second argument `.listen()` actually wants,
|
|
10
|
+
* so both entry points agree on what that value means.
|
|
11
|
+
*
|
|
12
|
+
* Why this takes the already-picked `raw` value, not an env object: the serve command has a
|
|
13
|
+
* `--host` flag that must win over the host env var (same precedence shape as its `--port`), so it
|
|
14
|
+
* computes `input.host ?? process.env.<HOST_ENV>` itself before calling in; the container entry has
|
|
15
|
+
* no `--host` flag, so it passes the env value directly. Keeping that precedence decision at each
|
|
16
|
+
* call site — rather than inside this resolver — is what lets the container entry stay a one-input
|
|
17
|
+
* caller instead of also depending on a CLI flag it does not have.
|
|
18
|
+
*
|
|
19
|
+
* Why `"::"` resolves to `undefined`, not the literal string: Node's `.listen(port, host)` already
|
|
20
|
+
* falls back to `::` (with an IPv4 fallback to `0.0.0.0` on hosts without IPv6) when `host` is
|
|
21
|
+
* `undefined` — that is its own documented default, not this module's. Passing the literal string
|
|
22
|
+
* `"::"` through would work identically on a dual-stack machine, but `resolveBindHost` returning
|
|
23
|
+
* `undefined` for "no host restriction" lets a caller's OWN default (the container entry passes
|
|
24
|
+
* `undefined` as its fallback) and an explicit `<HOST_ENV>=::` collapse onto the exact same code
|
|
25
|
+
* path, rather than two paths that happen to behave the same.
|
|
26
|
+
*
|
|
27
|
+
* Why a hostname (`localhost`, `my host`) is REJECTED rather than resolved: `localhost` can resolve
|
|
28
|
+
* to `::1` before `127.0.0.1`. A server bound to the IP literal `127.0.0.1` refuses a Node client
|
|
29
|
+
* that dials the hostname `localhost` and gets `::1` first — browsers and curl fall back to IPv4
|
|
30
|
+
* and never notice, but desktop and test clients that dial `127.0.0.1` literally do. Accepting
|
|
31
|
+
* `localhost` as a host value would look like it works (a browser hitting it would connect fine)
|
|
32
|
+
* while quietly breaking every one of those literal-IP clients. Restricting this to `net.isIP`
|
|
33
|
+
* literals makes that trap unreachable instead of documenting around it.
|
|
34
|
+
*
|
|
35
|
+
* Architectural role:
|
|
36
|
+
* Pure — no `process.env` or `process.argv` read inside the resolver itself, and no side effect.
|
|
37
|
+
* Both call sites resolve their own raw value and pass it in explicitly, so this stays directly
|
|
38
|
+
* testable and never disagrees with a caller that injects a different value.
|
|
39
|
+
*/
|
|
40
|
+
/** A local serve command's own default: loopback-only, so a locally run or desktop-spawned site is
|
|
41
|
+
* never reachable from another machine on the network unless `--host`/the host env var opts in. */
|
|
42
|
+
export declare const DEFAULT_LOCAL_BIND_HOST = "127.0.0.1";
|
|
43
|
+
/**
|
|
44
|
+
* Resolves the host argument for `.listen(port, host)` from the already-picked raw value, falling
|
|
45
|
+
* back to `fallback` when that value is absent or blank.
|
|
46
|
+
*
|
|
47
|
+
* @param required.raw - the `--host` flag value if present, else the host env value, else
|
|
48
|
+
* `undefined` — precedence is the caller's job (see this file's header). Always a plain string or
|
|
49
|
+
* `undefined`; never an env object.
|
|
50
|
+
* @param required.fallback - what to return when `raw` is absent: a serve command passes
|
|
51
|
+
* `DEFAULT_LOCAL_BIND_HOST`, a container entry passes `undefined` (Node's all-interfaces default).
|
|
52
|
+
* @param required.source - the host's own name for where `raw` came from (e.g. `--host/APP_HOST`);
|
|
53
|
+
* it leads the rejection message.
|
|
54
|
+
* @param required.invalidHost - the host's error factory for a rejected value.
|
|
55
|
+
* @throws whatever `invalidHost` returns when `raw` is set to something that is not an IP literal
|
|
56
|
+
* and not blank — message: `<source> must be an IP address such as 127.0.0.1 or 0.0.0.0
|
|
57
|
+
* (got "<value>")`.
|
|
58
|
+
* @complexity O(1) — one `net.isIP` check.
|
|
59
|
+
*/
|
|
60
|
+
export declare function resolveBindHost({ raw, fallback, source, invalidHost }: {
|
|
61
|
+
raw: string | undefined;
|
|
62
|
+
fallback: string | undefined;
|
|
63
|
+
source: string;
|
|
64
|
+
invalidHost: (input: {
|
|
65
|
+
message: string;
|
|
66
|
+
}) => Error;
|
|
67
|
+
}, _optional?: {}): string | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Whether a resolved bind host is loopback-only (never reachable from another machine).
|
|
70
|
+
*
|
|
71
|
+
* Backs the non-loopback stderr warning a serve command prints when `--host`/the host env var
|
|
72
|
+
* widens exposure — every OTHER value, including `undefined` (all interfaces) and `0.0.0.0`, is
|
|
73
|
+
* treated as network-reachable and worth warning about.
|
|
74
|
+
*
|
|
75
|
+
* @complexity O(1).
|
|
76
|
+
*/
|
|
77
|
+
export declare function isLoopbackHost({ host }: {
|
|
78
|
+
host: string | undefined;
|
|
79
|
+
}, _optional?: {}): boolean;
|
|
80
|
+
//# sourceMappingURL=bind-host.d.ts.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import net from 'node:net';
|
|
2
|
+
/**
|
|
3
|
+
* @file The pure `--host`/host-env resolver shared by a host's local serve command and its
|
|
4
|
+
* container entry point.
|
|
5
|
+
*
|
|
6
|
+
* Purpose:
|
|
7
|
+
* Both boot paths call `app.listen(port, host)` with a HOST that used to be implicit — Node's own
|
|
8
|
+
* default when no host argument is passed is `::` (dual-stack, every interface), so every listener
|
|
9
|
+
* in the product was LAN-reachable unless it opted out individually. This is the one place that
|
|
10
|
+
* turns an operator's already-picked raw value into the second argument `.listen()` actually wants,
|
|
11
|
+
* so both entry points agree on what that value means.
|
|
12
|
+
*
|
|
13
|
+
* Why this takes the already-picked `raw` value, not an env object: the serve command has a
|
|
14
|
+
* `--host` flag that must win over the host env var (same precedence shape as its `--port`), so it
|
|
15
|
+
* computes `input.host ?? process.env.<HOST_ENV>` itself before calling in; the container entry has
|
|
16
|
+
* no `--host` flag, so it passes the env value directly. Keeping that precedence decision at each
|
|
17
|
+
* call site — rather than inside this resolver — is what lets the container entry stay a one-input
|
|
18
|
+
* caller instead of also depending on a CLI flag it does not have.
|
|
19
|
+
*
|
|
20
|
+
* Why `"::"` resolves to `undefined`, not the literal string: Node's `.listen(port, host)` already
|
|
21
|
+
* falls back to `::` (with an IPv4 fallback to `0.0.0.0` on hosts without IPv6) when `host` is
|
|
22
|
+
* `undefined` — that is its own documented default, not this module's. Passing the literal string
|
|
23
|
+
* `"::"` through would work identically on a dual-stack machine, but `resolveBindHost` returning
|
|
24
|
+
* `undefined` for "no host restriction" lets a caller's OWN default (the container entry passes
|
|
25
|
+
* `undefined` as its fallback) and an explicit `<HOST_ENV>=::` collapse onto the exact same code
|
|
26
|
+
* path, rather than two paths that happen to behave the same.
|
|
27
|
+
*
|
|
28
|
+
* Why a hostname (`localhost`, `my host`) is REJECTED rather than resolved: `localhost` can resolve
|
|
29
|
+
* to `::1` before `127.0.0.1`. A server bound to the IP literal `127.0.0.1` refuses a Node client
|
|
30
|
+
* that dials the hostname `localhost` and gets `::1` first — browsers and curl fall back to IPv4
|
|
31
|
+
* and never notice, but desktop and test clients that dial `127.0.0.1` literally do. Accepting
|
|
32
|
+
* `localhost` as a host value would look like it works (a browser hitting it would connect fine)
|
|
33
|
+
* while quietly breaking every one of those literal-IP clients. Restricting this to `net.isIP`
|
|
34
|
+
* literals makes that trap unreachable instead of documenting around it.
|
|
35
|
+
*
|
|
36
|
+
* Architectural role:
|
|
37
|
+
* Pure — no `process.env` or `process.argv` read inside the resolver itself, and no side effect.
|
|
38
|
+
* Both call sites resolve their own raw value and pass it in explicitly, so this stays directly
|
|
39
|
+
* testable and never disagrees with a caller that injects a different value.
|
|
40
|
+
*/
|
|
41
|
+
/** A local serve command's own default: loopback-only, so a locally run or desktop-spawned site is
|
|
42
|
+
* never reachable from another machine on the network unless `--host`/the host env var opts in. */
|
|
43
|
+
export const DEFAULT_LOCAL_BIND_HOST = '127.0.0.1';
|
|
44
|
+
/**
|
|
45
|
+
* Resolves the host argument for `.listen(port, host)` from the already-picked raw value, falling
|
|
46
|
+
* back to `fallback` when that value is absent or blank.
|
|
47
|
+
*
|
|
48
|
+
* @param required.raw - the `--host` flag value if present, else the host env value, else
|
|
49
|
+
* `undefined` — precedence is the caller's job (see this file's header). Always a plain string or
|
|
50
|
+
* `undefined`; never an env object.
|
|
51
|
+
* @param required.fallback - what to return when `raw` is absent: a serve command passes
|
|
52
|
+
* `DEFAULT_LOCAL_BIND_HOST`, a container entry passes `undefined` (Node's all-interfaces default).
|
|
53
|
+
* @param required.source - the host's own name for where `raw` came from (e.g. `--host/APP_HOST`);
|
|
54
|
+
* it leads the rejection message.
|
|
55
|
+
* @param required.invalidHost - the host's error factory for a rejected value.
|
|
56
|
+
* @throws whatever `invalidHost` returns when `raw` is set to something that is not an IP literal
|
|
57
|
+
* and not blank — message: `<source> must be an IP address such as 127.0.0.1 or 0.0.0.0
|
|
58
|
+
* (got "<value>")`.
|
|
59
|
+
* @complexity O(1) — one `net.isIP` check.
|
|
60
|
+
*/
|
|
61
|
+
export function resolveBindHost({ raw, fallback, source, invalidHost }, _optional = {}) {
|
|
62
|
+
if (raw === undefined)
|
|
63
|
+
return fallback;
|
|
64
|
+
const trimmed = raw.trim();
|
|
65
|
+
if (trimmed === '')
|
|
66
|
+
return fallback;
|
|
67
|
+
// Node's own `.listen()` default for "no host restriction" — see this file's header for why this
|
|
68
|
+
// collapses onto the same path as an absent raw value rather than being passed through as a string.
|
|
69
|
+
if (trimmed === '::')
|
|
70
|
+
return undefined;
|
|
71
|
+
if (net.isIP(trimmed) === 0) {
|
|
72
|
+
throw invalidHost({ message: `${source} must be an IP address such as 127.0.0.1 or 0.0.0.0 (got "${trimmed}")` });
|
|
73
|
+
}
|
|
74
|
+
return trimmed;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Whether a resolved bind host is loopback-only (never reachable from another machine).
|
|
78
|
+
*
|
|
79
|
+
* Backs the non-loopback stderr warning a serve command prints when `--host`/the host env var
|
|
80
|
+
* widens exposure — every OTHER value, including `undefined` (all interfaces) and `0.0.0.0`, is
|
|
81
|
+
* treated as network-reachable and worth warning about.
|
|
82
|
+
*
|
|
83
|
+
* @complexity O(1).
|
|
84
|
+
*/
|
|
85
|
+
export function isLoopbackHost({ host }, _optional = {}) {
|
|
86
|
+
if (host === undefined)
|
|
87
|
+
return false;
|
|
88
|
+
return host === '::1' || host.startsWith('127.');
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=bind-host.js.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Dropped-upstream lifecycle for a development reverse proxy, over structural ports.
|
|
3
|
+
*
|
|
4
|
+
* A dev proxy that only pipes the upstream response into the browser's response never learns that
|
|
5
|
+
* the upstream died mid-stream: `pipe` ends the response on `end`, but not on `close` or `error`,
|
|
6
|
+
* and a proxy's own error handler usually answers only while headers are still unsent. So when the
|
|
7
|
+
* upstream restarts under a watcher, a streaming response that already had its headers stays open
|
|
8
|
+
* forever. The browser's `EventSource` never sees an error, never reconnects, and anything that
|
|
9
|
+
* bound itself to the dead process keeps using it. Destroying the response surfaces the loss the
|
|
10
|
+
* way the real server dying would when the browser talks to it directly.
|
|
11
|
+
*
|
|
12
|
+
* `destroy`, not `end`: `end` would finish a truncated body as if it were complete. Both
|
|
13
|
+
* `http.ServerResponse` and `http2.Http2ServerResponse` have `destroy`, and on HTTP/2 it resets just
|
|
14
|
+
* this stream, not the tab's whole multiplexed connection.
|
|
15
|
+
*
|
|
16
|
+
* Nothing here imports a server framework: the host passes its proxy object, which only has to
|
|
17
|
+
* satisfy {@link ProxyEventsPort}, and supplies the refusal answer as data.
|
|
18
|
+
*/
|
|
19
|
+
/** The upstream response: only its `close` event is observed. */
|
|
20
|
+
export interface UpstreamResponsePort {
|
|
21
|
+
on(event: 'close', listener: () => void): unknown;
|
|
22
|
+
}
|
|
23
|
+
/** The browser-facing response the proxy writes to. */
|
|
24
|
+
export interface ClientResponsePort {
|
|
25
|
+
readonly writableEnded?: boolean;
|
|
26
|
+
readonly headersSent?: boolean;
|
|
27
|
+
destroy(): unknown;
|
|
28
|
+
writeHead(status: number, headers: Record<string, string>): unknown;
|
|
29
|
+
end(body: string): unknown;
|
|
30
|
+
}
|
|
31
|
+
/** The slice of the proxied request the error path reads. */
|
|
32
|
+
export interface ProxiedRequestPort {
|
|
33
|
+
readonly headers: {
|
|
34
|
+
readonly accept?: string | readonly string[] | undefined;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/** The proxy's event surface: a response from the upstream, and a failure reaching it. */
|
|
38
|
+
export interface ProxyEventsPort {
|
|
39
|
+
on(event: 'proxyRes', listener: (upstream: UpstreamResponsePort, req: unknown, res: ClientResponsePort) => void): unknown;
|
|
40
|
+
on(event: 'error', listener: (error: Error, req: ProxiedRequestPort, res: unknown) => void): unknown;
|
|
41
|
+
}
|
|
42
|
+
/** What the host answers with when the upstream refused the connection, so the request provably never ran. */
|
|
43
|
+
export interface UpstreamRefusal {
|
|
44
|
+
status: number;
|
|
45
|
+
headers: Record<string, string>;
|
|
46
|
+
body: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Install the dropped-upstream handling on `proxy`.
|
|
50
|
+
*
|
|
51
|
+
* - An upstream response that closes before the client response ended destroys the client response.
|
|
52
|
+
* `close` also follows a normal `end`, by which point `pipe` has already ended it.
|
|
53
|
+
* - A failure to reach the upstream on an `EventSource` request drops the connection instead of
|
|
54
|
+
* answering it. An HTTP error status is final for `EventSource`, which then never reconnects once
|
|
55
|
+
* the upstream is back, while an unreachable server is something it keeps retrying. This listener
|
|
56
|
+
* must be registered before the proxy's own error listener, which then finds the response
|
|
57
|
+
* destroyed and writes nothing.
|
|
58
|
+
* - Any other request refused with `ECONNREFUSED` gets the host's `refusal` answer: the request never
|
|
59
|
+
* reached the upstream, so even a write is safe to send again. Other errors (a reset mid-request)
|
|
60
|
+
* are left to the proxy's own handler, because that request may have run.
|
|
61
|
+
* @param input.proxy - The host's proxy event emitter.
|
|
62
|
+
* @param input.refusal - The host's answer for a refused connection.
|
|
63
|
+
* @complexity O(1) per proxied response or error.
|
|
64
|
+
*/
|
|
65
|
+
export declare function installUpstreamCloseHandling({ proxy, refusal }: {
|
|
66
|
+
proxy: ProxyEventsPort;
|
|
67
|
+
refusal: UpstreamRefusal;
|
|
68
|
+
}, _optional?: Record<string, never>): void;
|
|
69
|
+
//# sourceMappingURL=dev-proxy-upstream.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Dropped-upstream lifecycle for a development reverse proxy, over structural ports.
|
|
3
|
+
*
|
|
4
|
+
* A dev proxy that only pipes the upstream response into the browser's response never learns that
|
|
5
|
+
* the upstream died mid-stream: `pipe` ends the response on `end`, but not on `close` or `error`,
|
|
6
|
+
* and a proxy's own error handler usually answers only while headers are still unsent. So when the
|
|
7
|
+
* upstream restarts under a watcher, a streaming response that already had its headers stays open
|
|
8
|
+
* forever. The browser's `EventSource` never sees an error, never reconnects, and anything that
|
|
9
|
+
* bound itself to the dead process keeps using it. Destroying the response surfaces the loss the
|
|
10
|
+
* way the real server dying would when the browser talks to it directly.
|
|
11
|
+
*
|
|
12
|
+
* `destroy`, not `end`: `end` would finish a truncated body as if it were complete. Both
|
|
13
|
+
* `http.ServerResponse` and `http2.Http2ServerResponse` have `destroy`, and on HTTP/2 it resets just
|
|
14
|
+
* this stream, not the tab's whole multiplexed connection.
|
|
15
|
+
*
|
|
16
|
+
* Nothing here imports a server framework: the host passes its proxy object, which only has to
|
|
17
|
+
* satisfy {@link ProxyEventsPort}, and supplies the refusal answer as data.
|
|
18
|
+
*/
|
|
19
|
+
/** A WebSocket upgrade hands the error listener a socket, which has no headers to check. */
|
|
20
|
+
function isClientResponse(res) {
|
|
21
|
+
return typeof res === 'object' && res !== null && 'headersSent' in res;
|
|
22
|
+
}
|
|
23
|
+
function wantsEventStream({ req }) {
|
|
24
|
+
return String(req.headers.accept ?? '').includes('text/event-stream');
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Install the dropped-upstream handling on `proxy`.
|
|
28
|
+
*
|
|
29
|
+
* - An upstream response that closes before the client response ended destroys the client response.
|
|
30
|
+
* `close` also follows a normal `end`, by which point `pipe` has already ended it.
|
|
31
|
+
* - A failure to reach the upstream on an `EventSource` request drops the connection instead of
|
|
32
|
+
* answering it. An HTTP error status is final for `EventSource`, which then never reconnects once
|
|
33
|
+
* the upstream is back, while an unreachable server is something it keeps retrying. This listener
|
|
34
|
+
* must be registered before the proxy's own error listener, which then finds the response
|
|
35
|
+
* destroyed and writes nothing.
|
|
36
|
+
* - Any other request refused with `ECONNREFUSED` gets the host's `refusal` answer: the request never
|
|
37
|
+
* reached the upstream, so even a write is safe to send again. Other errors (a reset mid-request)
|
|
38
|
+
* are left to the proxy's own handler, because that request may have run.
|
|
39
|
+
* @param input.proxy - The host's proxy event emitter.
|
|
40
|
+
* @param input.refusal - The host's answer for a refused connection.
|
|
41
|
+
* @complexity O(1) per proxied response or error.
|
|
42
|
+
*/
|
|
43
|
+
export function installUpstreamCloseHandling({ proxy, refusal }, _optional = {}) {
|
|
44
|
+
proxy.on('proxyRes', (upstream, _req, res) => {
|
|
45
|
+
upstream.on('close', () => {
|
|
46
|
+
if (!res.writableEnded)
|
|
47
|
+
res.destroy();
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
proxy.on('error', (error, req, res) => {
|
|
51
|
+
if (!isClientResponse(res) || res.headersSent)
|
|
52
|
+
return;
|
|
53
|
+
if (wantsEventStream({ req })) {
|
|
54
|
+
res.destroy();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (error.code === 'ECONNREFUSED') {
|
|
58
|
+
res.writeHead(refusal.status, refusal.headers);
|
|
59
|
+
res.end(refusal.body);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=dev-proxy-upstream.js.map
|
|
@@ -3,6 +3,7 @@ export { selectNodeRuntime } from './node-runtime.js';
|
|
|
3
3
|
export { sourceTreeStamp } from './source-tree-stamp.js';
|
|
4
4
|
export { createDevServerRetirement } from './server-retirement.js';
|
|
5
5
|
export { isPortFree, pickFreePort, LOOPBACK_HOSTS } from './free-port.js';
|
|
6
|
+
export { resolveBindHost, isLoopbackHost, DEFAULT_LOCAL_BIND_HOST } from './bind-host.js';
|
|
6
7
|
export interface EnvLoaderPort {
|
|
7
8
|
load(args: {
|
|
8
9
|
path: string;
|
|
@@ -56,4 +57,31 @@ export declare function listenServer({ server, port }: {
|
|
|
56
57
|
host?: string;
|
|
57
58
|
attempts?: number;
|
|
58
59
|
}): Promise<number>;
|
|
60
|
+
/**
|
|
61
|
+
* Boot-listener policy over {@link listenServer}: the host's one boot listener (HTTP or dev-TLS
|
|
62
|
+
* HTTPS — the same `server` either way) bound to the operator's resolved bind host.
|
|
63
|
+
*
|
|
64
|
+
* `bindHost === undefined` omits `host` entirely, so Node keeps its own all-interfaces default
|
|
65
|
+
* (`::`, or `0.0.0.0` without IPv6). Only the production start (`autoStartPort`) opts into
|
|
66
|
+
* direct-bind retries; every other entry point gets one attempt, so a held port fails loudly instead
|
|
67
|
+
* of two dev processes racing for it.
|
|
68
|
+
*/
|
|
69
|
+
/** Ports an auto-start boot tries, starting at the requested one, before giving up. */
|
|
70
|
+
export declare const AUTO_START_PORT_ATTEMPTS = 20;
|
|
71
|
+
/**
|
|
72
|
+
* Listens `server` on `port` (and `bindHost`, when set); resolves the port actually bound.
|
|
73
|
+
*
|
|
74
|
+
* @param required.bindHost - the host's resolved bind host (`undefined` = all interfaces).
|
|
75
|
+
* @param optional.autoStartPort - true only for the production start: on EADDRINUSE try the next
|
|
76
|
+
* port, up to `AUTO_START_PORT_ATTEMPTS` ports in all.
|
|
77
|
+
* @throws whatever `listenServer` rejects with (EADDRINUSE once the range is exhausted).
|
|
78
|
+
* @complexity O(attempts) listen calls.
|
|
79
|
+
*/
|
|
80
|
+
export declare function reserveBootListener(required: {
|
|
81
|
+
server: ServerListenerPort;
|
|
82
|
+
port: number;
|
|
83
|
+
bindHost: string | undefined;
|
|
84
|
+
}, optional?: {
|
|
85
|
+
autoStartPort?: boolean;
|
|
86
|
+
}): Promise<number>;
|
|
59
87
|
//# sourceMappingURL=index.d.ts.map
|