@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
package/dist/local-dev/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export { selectNodeRuntime } from './node-runtime.js';
|
|
|
2
2
|
export { sourceTreeStamp } from './source-tree-stamp.js';
|
|
3
3
|
export { createDevServerRetirement } from './server-retirement.js';
|
|
4
4
|
export { isPortFree, pickFreePort, LOOPBACK_HOSTS } from './free-port.js';
|
|
5
|
+
export { resolveBindHost, isLoopbackHost, DEFAULT_LOCAL_BIND_HOST } from './bind-host.js';
|
|
5
6
|
/** Load the required environment-file path, if present. Loader errors propagate to the caller. */
|
|
6
7
|
export function loadRepoRootEnvFile({ environmentFile, fs, loader }, _optional = {}) {
|
|
7
8
|
if (!fs.exists({ path: environmentFile }))
|
|
@@ -89,4 +90,28 @@ export async function listenServer({ server, port }, { host, attempts = 1 } = {}
|
|
|
89
90
|
// The final attempt's error, whatever it is, propagates unchanged.
|
|
90
91
|
return bindAndReport({ server, port: port + attempts - 1 }, { host });
|
|
91
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Boot-listener policy over {@link listenServer}: the host's one boot listener (HTTP or dev-TLS
|
|
95
|
+
* HTTPS — the same `server` either way) bound to the operator's resolved bind host.
|
|
96
|
+
*
|
|
97
|
+
* `bindHost === undefined` omits `host` entirely, so Node keeps its own all-interfaces default
|
|
98
|
+
* (`::`, or `0.0.0.0` without IPv6). Only the production start (`autoStartPort`) opts into
|
|
99
|
+
* direct-bind retries; every other entry point gets one attempt, so a held port fails loudly instead
|
|
100
|
+
* of two dev processes racing for it.
|
|
101
|
+
*/
|
|
102
|
+
/** Ports an auto-start boot tries, starting at the requested one, before giving up. */
|
|
103
|
+
export const AUTO_START_PORT_ATTEMPTS = 20;
|
|
104
|
+
/**
|
|
105
|
+
* Listens `server` on `port` (and `bindHost`, when set); resolves the port actually bound.
|
|
106
|
+
*
|
|
107
|
+
* @param required.bindHost - the host's resolved bind host (`undefined` = all interfaces).
|
|
108
|
+
* @param optional.autoStartPort - true only for the production start: on EADDRINUSE try the next
|
|
109
|
+
* port, up to `AUTO_START_PORT_ATTEMPTS` ports in all.
|
|
110
|
+
* @throws whatever `listenServer` rejects with (EADDRINUSE once the range is exhausted).
|
|
111
|
+
* @complexity O(attempts) listen calls.
|
|
112
|
+
*/
|
|
113
|
+
export async function reserveBootListener(required, optional = {}) {
|
|
114
|
+
const { server, port, bindHost } = required;
|
|
115
|
+
return listenServer({ server, port }, { ...(bindHost === undefined ? {} : { host: bindHost }), attempts: optional.autoStartPort ? AUTO_START_PORT_ATTEMPTS : 1 });
|
|
116
|
+
}
|
|
92
117
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
relPath: string;
|
|
4
|
-
reason: string;
|
|
5
|
-
}
|
|
6
|
-
export interface AsarVerification {
|
|
7
|
-
checkedCount: number;
|
|
8
|
-
mismatches: AsarMismatch[];
|
|
9
|
-
}
|
|
1
|
+
import type { ArchiveReaderPort, PackagingFilesystemPort } from './ports.js';
|
|
2
|
+
import type { AsarHeaderNode, AsarMismatch, AsarVerification } from "@jini-ai/core/contracts/site/packaging-electron";
|
|
10
3
|
/**
|
|
11
4
|
* Every leaf FILE path (POSIX, no leading slash) under one of `prefixes` in an asar header's `files`
|
|
12
5
|
* metadata tree. Pure and dependency-free — takes the already-parsed header object rather than an
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { ArchiveReaderPort
|
|
1
|
+
import type { ArchiveReaderPort } from './ports.js';
|
|
2
|
+
import type { AsarHeaderNode } from "@jini-ai/core/contracts/site/packaging-electron";
|
|
2
3
|
/** Bind @electron/asar in the host rather than depending on the packaging SDK in core. */
|
|
3
4
|
export declare function createAsarArchiveReader({ asar }: {
|
|
4
5
|
asar: {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Deprecated re-export: import these from `@jini-ai/core/contracts/site/packaging-electron`; removed at the next major. */
|
|
2
|
+
export type { AsarHeaderNode, AsarMismatch, AsarVerification } from "@jini-ai/core/contracts/site/packaging-electron";
|
|
1
3
|
export * from './ports.js';
|
|
2
4
|
export * from './policies.js';
|
|
3
5
|
export * from './archive.js';
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/** The outcome messages the flow shows; the host supplies its own wording. */
|
|
2
|
+
interface MovePromptMessages {
|
|
3
|
+
/** A move that failed or was refused with no clash decision. A thrown reason is appended. */
|
|
4
|
+
moveFailed: string;
|
|
5
|
+
/** An older copy is running from Applications, so this copy keeps running. */
|
|
6
|
+
olderCopyRunning: string;
|
|
7
|
+
/** A newer copy is already in Applications and is opened instead. Must block until dismissed. */
|
|
8
|
+
openingNewer: string;
|
|
9
|
+
}
|
|
10
|
+
/** {@link movePromptSkipReason}'s input: everything about this launch that decides whether to ask. */
|
|
11
|
+
interface MovePromptEnvironment {
|
|
12
|
+
/** The app's display name, used in the "another copy is open" skip reason. */
|
|
13
|
+
appName: string;
|
|
14
|
+
platform: NodeJS.Platform;
|
|
15
|
+
isPackaged: boolean;
|
|
16
|
+
/** Electron's `process.mas`: a Mac App Store build, which the Store installs and must not move. */
|
|
17
|
+
isMas: boolean;
|
|
18
|
+
/** A headless self-test launch: nobody to answer. */
|
|
19
|
+
selftest: boolean;
|
|
20
|
+
/** Launched by a script to open named content, not by a person. */
|
|
21
|
+
unattended: boolean;
|
|
22
|
+
/** `app.isInApplicationsFolder()` — `/Applications` or `~/Applications`. */
|
|
23
|
+
inApplications: boolean;
|
|
24
|
+
/** Live copies of this app other than this one. */
|
|
25
|
+
otherInstancesOpen: number;
|
|
26
|
+
currentVersion: string;
|
|
27
|
+
/** The version "Not Now" was last chosen on, or `null`. */
|
|
28
|
+
declinedVersion: string | null;
|
|
29
|
+
}
|
|
30
|
+
/** One read of a durable JSON file; any non-`ok` state reads as "never declined". */
|
|
31
|
+
type DeclineFileRead = {
|
|
32
|
+
state: "ok";
|
|
33
|
+
value: unknown;
|
|
34
|
+
} | {
|
|
35
|
+
state: "missing" | "unreadable";
|
|
36
|
+
};
|
|
37
|
+
/** The host's durable JSON file helper (atomic replace, corrupt-vs-missing distinguished). */
|
|
38
|
+
interface DeclinedVersionStore {
|
|
39
|
+
readJsonFile: (required: {
|
|
40
|
+
filePath: string;
|
|
41
|
+
}) => DeclineFileRead;
|
|
42
|
+
/** Must replace atomically; failures propagate (an unwritable host data directory). */
|
|
43
|
+
writeJsonFileAtomic: (required: {
|
|
44
|
+
filePath: string;
|
|
45
|
+
value: unknown;
|
|
46
|
+
}) => void;
|
|
47
|
+
}
|
|
48
|
+
/** Reads a text file; may throw when it is missing or unreadable. */
|
|
49
|
+
type ReadTextFile = (required: {
|
|
50
|
+
filePath: string;
|
|
51
|
+
}) => string;
|
|
52
|
+
/**
|
|
53
|
+
* Runs `work`; on any failure answers `fallback`. The host binds its own synchronous fallback idiom
|
|
54
|
+
* (the shape of Core's `orFallbackSync`), so an unreadable bundle is observed the host's way.
|
|
55
|
+
*/
|
|
56
|
+
type OrFallbackSync = <Value>(required: {
|
|
57
|
+
work: () => Value;
|
|
58
|
+
fallback: Value;
|
|
59
|
+
step: string;
|
|
60
|
+
}) => Value;
|
|
61
|
+
/**
|
|
62
|
+
* @returns why this launch must NOT offer the move, or `null` when it should.
|
|
63
|
+
*
|
|
64
|
+
* "Not Now" silences it for that version only: an update is a natural moment to ask again, and a
|
|
65
|
+
* copy still outside Applications after an update is exactly the copy that could not update itself.
|
|
66
|
+
* @complexity O(1).
|
|
67
|
+
*/
|
|
68
|
+
declare function movePromptSkipReason(env: MovePromptEnvironment): string | null;
|
|
69
|
+
/** @returns the version "Not Now" was chosen on; `null` if never, or the file is unusable.
|
|
70
|
+
* @complexity O(n) in file size. */
|
|
71
|
+
declare function readDeclinedVersion({ filePath, store }: {
|
|
72
|
+
filePath: string;
|
|
73
|
+
store: DeclinedVersionStore;
|
|
74
|
+
}, _options?: {}): string | null;
|
|
75
|
+
/** Records "Not Now" for `version`, replacing any earlier one. @complexity O(1). */
|
|
76
|
+
declare function recordDeclinedVersion({ filePath, version, store }: {
|
|
77
|
+
filePath: string;
|
|
78
|
+
version: string;
|
|
79
|
+
store: DeclinedVersionStore;
|
|
80
|
+
}, _options?: {}): void;
|
|
81
|
+
/** @returns the `.app` bundle holding `execPath` (`…/X.app/Contents/MacOS/X`), or `null`.
|
|
82
|
+
* @complexity O(n) in the path length. */
|
|
83
|
+
declare function bundlePathFromExecPath({ execPath }: {
|
|
84
|
+
execPath: string;
|
|
85
|
+
}, _options?: {}): string | null;
|
|
86
|
+
/** Where `app.moveToApplicationsFolder()` puts the bundle: `/Applications/<its name>`. @complexity O(1). */
|
|
87
|
+
declare function applicationsTargetPath({ bundlePath }: {
|
|
88
|
+
bundlePath: string;
|
|
89
|
+
}, _options?: {}): string;
|
|
90
|
+
/** @returns a bundle's `CFBundleShortVersionString` from its XML `Info.plist` (what electron-builder
|
|
91
|
+
* writes), or `null` when it cannot be read. @complexity O(n) in the plist's size. */
|
|
92
|
+
declare function readBundleVersion({ bundlePath, readTextFile, orFallbackSync }: {
|
|
93
|
+
bundlePath: string;
|
|
94
|
+
readTextFile: ReadTextFile;
|
|
95
|
+
orFallbackSync: OrFallbackSync;
|
|
96
|
+
}, _options?: {}): string | null;
|
|
97
|
+
/**
|
|
98
|
+
* Compares two dotted numeric versions, missing parts reading as 0. Pre-release tags are ignored.
|
|
99
|
+
* @returns 1, 0 or -1; `null` when either is not a version.
|
|
100
|
+
* @complexity O(n) in the number of parts.
|
|
101
|
+
*/
|
|
102
|
+
declare function compareVersions({ a, b }: {
|
|
103
|
+
a: string | null;
|
|
104
|
+
b: string | null;
|
|
105
|
+
}, _options?: {}): number | null;
|
|
106
|
+
/** Electron's `conflictHandler` argument. */
|
|
107
|
+
type MoveConflictType = "exists" | "existsAndRunning";
|
|
108
|
+
/** {@link decideMoveConflict}'s answer. */
|
|
109
|
+
type MoveConflictDecision = "replace" | "open-existing" | "blocked-by-running-copy";
|
|
110
|
+
/**
|
|
111
|
+
* What to do when `/Applications` already holds a copy of this app:
|
|
112
|
+
*
|
|
113
|
+
* - `"replace"` — an older, same, or unreadable copy that is not running. Electron moves it to the
|
|
114
|
+
* Trash (recoverable) and puts this one in its place.
|
|
115
|
+
* - `"open-existing"` — the copy there is newer, or is running and at least as new: keep it and use
|
|
116
|
+
* it. Never downgrade the installed app.
|
|
117
|
+
* - `"blocked-by-running-copy"` — an older (or unreadable) copy is running there. Replacing a running
|
|
118
|
+
* app pulls its bundle from under it, and Electron's own default would instead switch to that OLD
|
|
119
|
+
* copy and quit this newer one; neither is right, so this copy keeps running and says why.
|
|
120
|
+
* @complexity O(1).
|
|
121
|
+
*/
|
|
122
|
+
declare function decideMoveConflict(input: {
|
|
123
|
+
conflictType: MoveConflictType;
|
|
124
|
+
existingVersion: string | null;
|
|
125
|
+
currentVersion: string;
|
|
126
|
+
}): MoveConflictDecision;
|
|
127
|
+
/** {@link runMoveToApplicationsPrompt}'s Electron seams and host copy. */
|
|
128
|
+
interface MovePromptDeps {
|
|
129
|
+
currentVersion: string;
|
|
130
|
+
/** {@link applicationsTargetPath} of this bundle. */
|
|
131
|
+
targetPath: string;
|
|
132
|
+
messages: MovePromptMessages;
|
|
133
|
+
/** Shows the prompt (its question and buttons are the host's copy). */
|
|
134
|
+
ask: () => Promise<"move" | "not-now">;
|
|
135
|
+
/** `app.moveToApplicationsFolder({ conflictHandler })`. On success Electron relaunches from the new
|
|
136
|
+
* location and quits this process itself. */
|
|
137
|
+
move: (required: {
|
|
138
|
+
conflictHandler: (conflictType: MoveConflictType) => boolean;
|
|
139
|
+
}) => boolean;
|
|
140
|
+
readExistingVersion: (required: {
|
|
141
|
+
appPath: string;
|
|
142
|
+
}) => string | null;
|
|
143
|
+
openExisting: (required: {
|
|
144
|
+
appPath: string;
|
|
145
|
+
}) => void;
|
|
146
|
+
quit: () => void;
|
|
147
|
+
recordDeclined: () => void;
|
|
148
|
+
showError: (required: {
|
|
149
|
+
message: string;
|
|
150
|
+
}) => void;
|
|
151
|
+
/** Must block until dismissed: {@link afterRefusedMove} quits right after it. */
|
|
152
|
+
showInfo: (required: {
|
|
153
|
+
message: string;
|
|
154
|
+
}) => void;
|
|
155
|
+
}
|
|
156
|
+
type MovePromptOutcome = "declined" | "moved" | "opened-existing" | "blocked-by-running-copy" | "failed";
|
|
157
|
+
/**
|
|
158
|
+
* The prompt, start to finish. A failed move never throws — it is reported and this copy keeps
|
|
159
|
+
* running; only `recordDeclined` failing (an unwritable host data directory) propagates.
|
|
160
|
+
* @complexity O(1) plus the injected calls.
|
|
161
|
+
*/
|
|
162
|
+
declare function runMoveToApplicationsPrompt(deps: MovePromptDeps): Promise<MovePromptOutcome>;
|
|
163
|
+
export { applicationsTargetPath, bundlePathFromExecPath, compareVersions, decideMoveConflict, movePromptSkipReason, readBundleVersion, readDeclinedVersion, recordDeclinedVersion, runMoveToApplicationsPrompt, };
|
|
164
|
+
export type { DeclineFileRead, DeclinedVersionStore, MoveConflictDecision, MoveConflictType, MovePromptDeps, MovePromptEnvironment, MovePromptMessages, MovePromptOutcome, OrFallbackSync, ReadTextFile, };
|
|
165
|
+
//# sourceMappingURL=move-to-applications.d.ts.map
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file The "Move this app to your Applications folder?" prompt a packaged macOS copy shows once
|
|
3
|
+
* when it is launched from anywhere else (a disk image, Downloads). Every rule lives here as a pure
|
|
4
|
+
* function or an injected-deps flow; the host's Electron entry only supplies Electron's calls, its
|
|
5
|
+
* own copy, the decline-file path and the durable JSON store.
|
|
6
|
+
*
|
|
7
|
+
* Why it matters: a copy run from its disk image cannot update itself (Squirrel cannot replace a
|
|
8
|
+
* read-only bundle) and keeps the image busy so it cannot be ejected — see `isTransientAppPath` in
|
|
9
|
+
* `@jini-ai/desktop-host` node-toolchain for the paths that stop an app from persisting.
|
|
10
|
+
*
|
|
11
|
+
* **Several copies at once.** A host may run several copies with no single-instance lock. The
|
|
12
|
+
* prompt is not offered while another copy is open (the host counts them from its own instance
|
|
13
|
+
* presence records): moving a bundle out of, say, Downloads would pull it from under a sibling
|
|
14
|
+
* running from the same place, and two copies prompting at once would race to the same
|
|
15
|
+
* `/Applications/<name>.app`. It comes back on a later launch that is alone.
|
|
16
|
+
*
|
|
17
|
+
* **Strings.** Every word the user sees — the app's name and each outcome message — is injected by
|
|
18
|
+
* the host ({@link MovePromptMessages}, {@link MovePromptEnvironment.appName}), so a later locale
|
|
19
|
+
* layer has one place to replace.
|
|
20
|
+
*
|
|
21
|
+
* No `electron` import and no filesystem access of its own: persistence and file reads are ports.
|
|
22
|
+
* Architecture: `ADS-memory/reports/jini-port/extraction-plan.md`.
|
|
23
|
+
*/
|
|
24
|
+
import path from "node:path";
|
|
25
|
+
/**
|
|
26
|
+
* @returns why this launch must NOT offer the move, or `null` when it should.
|
|
27
|
+
*
|
|
28
|
+
* "Not Now" silences it for that version only: an update is a natural moment to ask again, and a
|
|
29
|
+
* copy still outside Applications after an update is exactly the copy that could not update itself.
|
|
30
|
+
* @complexity O(1).
|
|
31
|
+
*/
|
|
32
|
+
function movePromptSkipReason(env) {
|
|
33
|
+
const reasons = [
|
|
34
|
+
[!env.isPackaged, "not packaged (dev launch)"],
|
|
35
|
+
[env.platform !== "darwin", "not macOS"],
|
|
36
|
+
[env.isMas, "Mac App Store build"],
|
|
37
|
+
[env.selftest, "self-test launch"],
|
|
38
|
+
[env.unattended, "unattended site launch"],
|
|
39
|
+
[env.inApplications, "already in Applications"],
|
|
40
|
+
[env.otherInstancesOpen > 0, `another copy of ${env.appName} is open`],
|
|
41
|
+
[env.declinedVersion === env.currentVersion, "declined for this version"],
|
|
42
|
+
];
|
|
43
|
+
return reasons.find(([applies]) => applies)?.[1] ?? null;
|
|
44
|
+
}
|
|
45
|
+
/** @returns the version "Not Now" was chosen on; `null` if never, or the file is unusable.
|
|
46
|
+
* @complexity O(n) in file size. */
|
|
47
|
+
function readDeclinedVersion({ filePath, store }, _options = {}) {
|
|
48
|
+
const read = store.readJsonFile({ filePath });
|
|
49
|
+
if (read.state !== "ok")
|
|
50
|
+
return null;
|
|
51
|
+
const version = read.value?.declinedVersion;
|
|
52
|
+
return typeof version === "string" ? version : null;
|
|
53
|
+
}
|
|
54
|
+
/** Records "Not Now" for `version`, replacing any earlier one. @complexity O(1). */
|
|
55
|
+
function recordDeclinedVersion({ filePath, version, store }, _options = {}) {
|
|
56
|
+
store.writeJsonFileAtomic({ filePath, value: { declinedVersion: version } });
|
|
57
|
+
}
|
|
58
|
+
/** @returns the `.app` bundle holding `execPath` (`…/X.app/Contents/MacOS/X`), or `null`.
|
|
59
|
+
* @complexity O(n) in the path length. */
|
|
60
|
+
function bundlePathFromExecPath({ execPath }, _options = {}) {
|
|
61
|
+
return /^(.*\.app)\/Contents\/MacOS\/[^/]+$/.exec(execPath)?.[1] ?? null;
|
|
62
|
+
}
|
|
63
|
+
/** Where `app.moveToApplicationsFolder()` puts the bundle: `/Applications/<its name>`. @complexity O(1). */
|
|
64
|
+
function applicationsTargetPath({ bundlePath }, _options = {}) {
|
|
65
|
+
return path.join("/Applications", path.basename(bundlePath));
|
|
66
|
+
}
|
|
67
|
+
/** @returns a bundle's `CFBundleShortVersionString` from its XML `Info.plist` (what electron-builder
|
|
68
|
+
* writes), or `null` when it cannot be read. @complexity O(n) in the plist's size. */
|
|
69
|
+
function readBundleVersion({ bundlePath, readTextFile, orFallbackSync }, _options = {}) {
|
|
70
|
+
return orFallbackSync({ work: () => {
|
|
71
|
+
const plist = readTextFile({ filePath: path.join(bundlePath, "Contents", "Info.plist") });
|
|
72
|
+
return /<key>CFBundleShortVersionString<\/key>\s*<string>([^<]+)<\/string>/.exec(plist)?.[1]?.trim() ?? null;
|
|
73
|
+
}, fallback: null, step: "Read application bundle version" });
|
|
74
|
+
}
|
|
75
|
+
/** The dotted numeric part of a version (`0.2.0-beta.1` → `[0, 2, 0]`), or `null`. @complexity O(n). */
|
|
76
|
+
function numericParts({ version }, _options = {}) {
|
|
77
|
+
const core = /^(\d+(?:\.\d+)*)/.exec(version ?? "")?.[1];
|
|
78
|
+
return core === undefined ? null : core.split(".").map(Number);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Compares two dotted numeric versions, missing parts reading as 0. Pre-release tags are ignored.
|
|
82
|
+
* @returns 1, 0 or -1; `null` when either is not a version.
|
|
83
|
+
* @complexity O(n) in the number of parts.
|
|
84
|
+
*/
|
|
85
|
+
function compareVersions({ a, b }, _options = {}) {
|
|
86
|
+
const left = numericParts({ version: a });
|
|
87
|
+
const right = numericParts({ version: b });
|
|
88
|
+
if (left === null || right === null)
|
|
89
|
+
return null;
|
|
90
|
+
for (let index = 0; index < Math.max(left.length, right.length); index++) {
|
|
91
|
+
const diff = (left[index] ?? 0) - (right[index] ?? 0);
|
|
92
|
+
if (diff !== 0)
|
|
93
|
+
return Math.sign(diff);
|
|
94
|
+
}
|
|
95
|
+
return 0;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* What to do when `/Applications` already holds a copy of this app:
|
|
99
|
+
*
|
|
100
|
+
* - `"replace"` — an older, same, or unreadable copy that is not running. Electron moves it to the
|
|
101
|
+
* Trash (recoverable) and puts this one in its place.
|
|
102
|
+
* - `"open-existing"` — the copy there is newer, or is running and at least as new: keep it and use
|
|
103
|
+
* it. Never downgrade the installed app.
|
|
104
|
+
* - `"blocked-by-running-copy"` — an older (or unreadable) copy is running there. Replacing a running
|
|
105
|
+
* app pulls its bundle from under it, and Electron's own default would instead switch to that OLD
|
|
106
|
+
* copy and quit this newer one; neither is right, so this copy keeps running and says why.
|
|
107
|
+
* @complexity O(1).
|
|
108
|
+
*/
|
|
109
|
+
function decideMoveConflict(input) {
|
|
110
|
+
const order = compareVersions({ a: input.existingVersion, b: input.currentVersion });
|
|
111
|
+
if (order === 1)
|
|
112
|
+
return "open-existing";
|
|
113
|
+
if (input.conflictType === "exists")
|
|
114
|
+
return "replace";
|
|
115
|
+
return order === 0 ? "open-existing" : "blocked-by-running-copy";
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* The prompt, start to finish. A failed move never throws — it is reported and this copy keeps
|
|
119
|
+
* running; only `recordDeclined` failing (an unwritable host data directory) propagates.
|
|
120
|
+
* @complexity O(1) plus the injected calls.
|
|
121
|
+
*/
|
|
122
|
+
async function runMoveToApplicationsPrompt(deps) {
|
|
123
|
+
if ((await deps.ask()) === "not-now") {
|
|
124
|
+
deps.recordDeclined();
|
|
125
|
+
return "declined";
|
|
126
|
+
}
|
|
127
|
+
// Electron re-enters this flow through `conflictHandler` in the middle of the relocation; the
|
|
128
|
+
// decision it made there is what decides the outcome once `move` returns without moving.
|
|
129
|
+
let decision = null;
|
|
130
|
+
const conflictHandler = (conflictType) => {
|
|
131
|
+
decision = decideMoveConflict({ conflictType, existingVersion: deps.readExistingVersion({ appPath: deps.targetPath }), currentVersion: deps.currentVersion });
|
|
132
|
+
// `true` = Electron's own default: replace a stopped copy, or switch to a running one.
|
|
133
|
+
return decision === "replace" || (decision === "open-existing" && conflictType === "existsAndRunning");
|
|
134
|
+
};
|
|
135
|
+
let moved;
|
|
136
|
+
try {
|
|
137
|
+
moved = deps.move({ conflictHandler });
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
deps.showError({ message: `${deps.messages.moveFailed} ${error.message}` });
|
|
141
|
+
return "failed";
|
|
142
|
+
}
|
|
143
|
+
return moved ? "moved" : afterRefusedMove({ deps, decision });
|
|
144
|
+
}
|
|
145
|
+
/** A move that did not happen: open the newer copy, explain the running older one, or report it.
|
|
146
|
+
* @complexity O(1). */
|
|
147
|
+
function afterRefusedMove({ deps, decision }, _options = {}) {
|
|
148
|
+
if (decision === "open-existing") {
|
|
149
|
+
deps.showInfo({ message: deps.messages.openingNewer });
|
|
150
|
+
deps.openExisting({ appPath: deps.targetPath });
|
|
151
|
+
deps.quit();
|
|
152
|
+
return "opened-existing";
|
|
153
|
+
}
|
|
154
|
+
if (decision === "blocked-by-running-copy") {
|
|
155
|
+
deps.showError({ message: deps.messages.olderCopyRunning });
|
|
156
|
+
return "blocked-by-running-copy";
|
|
157
|
+
}
|
|
158
|
+
deps.showError({ message: deps.messages.moveFailed });
|
|
159
|
+
return "failed";
|
|
160
|
+
}
|
|
161
|
+
export { applicationsTargetPath, bundlePathFromExecPath, compareVersions, decideMoveConflict, movePromptSkipReason, readBundleVersion, readDeclinedVersion, recordDeclinedVersion, runMoveToApplicationsPrompt, };
|
|
162
|
+
//# sourceMappingURL=move-to-applications.js.map
|
|
@@ -11,23 +11,52 @@ export interface StalenessShell {
|
|
|
11
11
|
marker: string;
|
|
12
12
|
buildWith: string;
|
|
13
13
|
}
|
|
14
|
-
/**
|
|
14
|
+
/** Host wording for each tree-quiet problem. Each one is called only when its signal fires. */
|
|
15
|
+
export interface TreeQuietFormatters {
|
|
16
|
+
watcherRunning?: (args: {
|
|
17
|
+
surface: string;
|
|
18
|
+
}) => string;
|
|
19
|
+
gitDirty?: (args: {
|
|
20
|
+
surface: string;
|
|
21
|
+
paths: readonly string[];
|
|
22
|
+
}) => string;
|
|
23
|
+
moving?: (args: {
|
|
24
|
+
surface: string;
|
|
25
|
+
paths: readonly string[];
|
|
26
|
+
}) => string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Independent live signals; a quiet sample still requires post-package byte verification.
|
|
30
|
+
* `movingPaths` must come from two live snapshots taken a short interval apart, never an absolute
|
|
31
|
+
* mtime age: a fresh checkout stamps every file "now", so an age test would refuse every CI run.
|
|
32
|
+
* Hosts that need their own copy (incident links, remedies) pass `formatters`; omitted ones keep
|
|
33
|
+
* the neutral default wording.
|
|
34
|
+
*/
|
|
15
35
|
export declare function treeQuietProblems(required: {
|
|
16
36
|
surface: string;
|
|
17
37
|
watcherRunning: boolean;
|
|
18
38
|
gitDirtyPaths?: readonly string[];
|
|
19
39
|
movingPaths?: readonly string[];
|
|
20
|
-
},
|
|
40
|
+
}, optional?: {
|
|
41
|
+
formatters?: TreeQuietFormatters;
|
|
42
|
+
}): string[];
|
|
21
43
|
/** Conservative bundle-input policy, shared by source timestamp scanning. */
|
|
22
44
|
export declare function isBundleInput({ relPath }: {
|
|
23
45
|
relPath: string;
|
|
24
46
|
}, _optional?: Record<string, never>): boolean;
|
|
25
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Missing timestamps defer to the host's existence checks; there is no stale-build tolerance.
|
|
49
|
+
* `consequence` is host copy placed between the age and the remedy: a host that once shipped a
|
|
50
|
+
* stale bundle while packaging reported success keeps its own incident wording there, so the
|
|
51
|
+
* reader learns why the refusal is not noise without this package owning that history.
|
|
52
|
+
*/
|
|
26
53
|
export declare function shellStalenessFailure({ builtAt, sourceAt, shell }: {
|
|
27
54
|
builtAt: number;
|
|
28
55
|
sourceAt: number;
|
|
29
56
|
shell: StalenessShell;
|
|
30
|
-
},
|
|
57
|
+
}, { consequence }?: {
|
|
58
|
+
consequence?: string;
|
|
59
|
+
}): string | null;
|
|
31
60
|
/** npm's parseable output may contain duplicates and Windows CRLF endings. */
|
|
32
61
|
export declare function parseNpmLsPaths({ stdout, modulesDir, separator }: {
|
|
33
62
|
stdout: string;
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
const DEFAULT_TREE_QUIET_FORMATTERS = {
|
|
3
|
+
watcherRunning: ({ surface }) => `a build watch process is rewriting ${surface}; stop it before packaging.`,
|
|
4
|
+
gitDirty: ({ surface, paths }) => `${surface} has uncommitted changes: ${paths.join(', ')}.`,
|
|
5
|
+
moving: ({ surface, paths }) => `${surface} is still being written to: ${paths.join(', ')} changed during this check.`,
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Independent live signals; a quiet sample still requires post-package byte verification.
|
|
9
|
+
* `movingPaths` must come from two live snapshots taken a short interval apart, never an absolute
|
|
10
|
+
* mtime age: a fresh checkout stamps every file "now", so an age test would refuse every CI run.
|
|
11
|
+
* Hosts that need their own copy (incident links, remedies) pass `formatters`; omitted ones keep
|
|
12
|
+
* the neutral default wording.
|
|
13
|
+
*/
|
|
14
|
+
export function treeQuietProblems(required, optional = {}) {
|
|
15
|
+
const format = { ...DEFAULT_TREE_QUIET_FORMATTERS, ...optional.formatters };
|
|
16
|
+
const { surface, gitDirtyPaths = [], movingPaths = [] } = required;
|
|
4
17
|
const problems = [];
|
|
5
18
|
if (required.watcherRunning)
|
|
6
|
-
problems.push(
|
|
7
|
-
if (
|
|
8
|
-
problems.push(
|
|
9
|
-
if (
|
|
10
|
-
problems.push(
|
|
19
|
+
problems.push(format.watcherRunning({ surface }));
|
|
20
|
+
if (gitDirtyPaths.length)
|
|
21
|
+
problems.push(format.gitDirty({ surface, paths: gitDirtyPaths }));
|
|
22
|
+
if (movingPaths.length)
|
|
23
|
+
problems.push(format.moving({ surface, paths: movingPaths }));
|
|
11
24
|
return problems;
|
|
12
25
|
}
|
|
13
26
|
/** Conservative bundle-input policy, shared by source timestamp scanning. */
|
|
@@ -17,11 +30,17 @@ export function isBundleInput({ relPath }, _optional = {}) {
|
|
|
17
30
|
return false;
|
|
18
31
|
return !/\.(test|spec)\.[cm]?[jt]sx?$/.test(normalized);
|
|
19
32
|
}
|
|
20
|
-
/**
|
|
21
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Missing timestamps defer to the host's existence checks; there is no stale-build tolerance.
|
|
35
|
+
* `consequence` is host copy placed between the age and the remedy: a host that once shipped a
|
|
36
|
+
* stale bundle while packaging reported success keeps its own incident wording there, so the
|
|
37
|
+
* reader learns why the refusal is not noise without this package owning that history.
|
|
38
|
+
*/
|
|
39
|
+
export function shellStalenessFailure({ builtAt, sourceAt, shell }, { consequence } = {}) {
|
|
22
40
|
if (builtAt === 0 || sourceAt === 0 || builtAt >= sourceAt)
|
|
23
41
|
return null;
|
|
24
|
-
|
|
42
|
+
const why = consequence === undefined ? '' : ` ${consequence}`;
|
|
43
|
+
return `the built shell at ${shell.relative} is STALE — its ${shell.marker} is ${((sourceAt - builtAt) / 86_400_000).toFixed(1)} day(s) older than its own source.${why} Rebuild it with: ${shell.buildWith}`;
|
|
25
44
|
}
|
|
26
45
|
/** npm's parseable output may contain duplicates and Windows CRLF endings. */
|
|
27
46
|
export function parseNpmLsPaths({ stdout, modulesDir, separator }, _optional = {}) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AsarHeaderNode } from "@jini-ai/core/contracts/site/packaging-electron";
|
|
1
2
|
export interface FileInfo {
|
|
2
3
|
kind: 'file' | 'directory' | 'other';
|
|
3
4
|
mtimeMs: number;
|
|
@@ -57,12 +58,6 @@ export interface ProcessRunnerPort {
|
|
|
57
58
|
exitCode: number;
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
|
-
export interface AsarHeaderNode {
|
|
61
|
-
files?: Record<string, AsarHeaderNode>;
|
|
62
|
-
link?: string;
|
|
63
|
-
size?: number;
|
|
64
|
-
offset?: string;
|
|
65
|
-
}
|
|
66
61
|
export interface ArchiveReaderPort {
|
|
67
62
|
header(required: {
|
|
68
63
|
archivePath: string;
|
|
@@ -22,12 +22,21 @@ interface DependencyOptions {
|
|
|
22
22
|
fs: PackagingFilesystemPort;
|
|
23
23
|
}) => readonly string[];
|
|
24
24
|
}
|
|
25
|
+
/** Staging options: dependency policy plus where the caller already staged each supplied root. */
|
|
26
|
+
interface StageOptions extends DependencyOptions {
|
|
27
|
+
/**
|
|
28
|
+
* Root (as passed, or its real path) → the staged directory the caller copied it to. A root with an
|
|
29
|
+
* entry can keep a conflicting dependency nested under that directory; a root without one has no
|
|
30
|
+
* known position, so a conflict on its edges still fails closed.
|
|
31
|
+
*/
|
|
32
|
+
rootDestinations?: ReadonlyMap<string, string>;
|
|
33
|
+
}
|
|
25
34
|
/** Plan selected runtime edges before copying; unresolved/irreconcilable versions throw atomically.
|
|
26
35
|
* Supplied roots are already owned by the caller and are never copied through a back edge.
|
|
27
36
|
* A version that conflicts with the hoisted copy is staged nested under its dependent, so every
|
|
28
37
|
* staged package still resolves its declared dependencies from where it sits.
|
|
29
38
|
* @complexity O(packages × nesting depth + edges × ancestor depth) filesystem reads, O(packages + edges × ancestor depth) plan memory.
|
|
30
|
-
* @example stageTransitiveDependencies({ roots, outDir, excluded, fs, resolver });
|
|
39
|
+
* @example stageTransitiveDependencies({ roots, outDir, excluded, fs, resolver }, { rootDestinations: new Map([[root, stagedRoot]]) });
|
|
31
40
|
*/
|
|
32
41
|
export declare function stageTransitiveDependencies(required: {
|
|
33
42
|
roots: readonly string[];
|
|
@@ -35,7 +44,7 @@ export declare function stageTransitiveDependencies(required: {
|
|
|
35
44
|
excluded: ReadonlySet<string>;
|
|
36
45
|
fs: PackagingFilesystemPort;
|
|
37
46
|
resolver: PackageResolverPort;
|
|
38
|
-
}, optional?:
|
|
47
|
+
}, optional?: StageOptions): number;
|
|
39
48
|
/** Enumerate real package roots, treating scoped directories as containers. */
|
|
40
49
|
export declare function stagedPackageDirs({ modulesDir, fs }: {
|
|
41
50
|
modulesDir: string;
|
|
@@ -75,7 +75,7 @@ function conflictError(required) {
|
|
|
75
75
|
* Choose where `planned` ships so Node resolves it from the dependent, or nothing when an existing
|
|
76
76
|
* copy already serves it. A version that conflicts with the hoisted copy stays nested under its
|
|
77
77
|
* dependent, preferring npm's own position, instead of failing or silently picking first-wins.
|
|
78
|
-
*
|
|
78
|
+
* A supplied root without a caller-declared destination has no known position, so a conflict on its edges still throws.
|
|
79
79
|
*/
|
|
80
80
|
function placeDependency(plan, required) {
|
|
81
81
|
const { from, name, planned } = required;
|
|
@@ -129,17 +129,27 @@ function planDependency(plan, required) {
|
|
|
129
129
|
plan.staged.set(destination, planned);
|
|
130
130
|
plan.queue.push({ directory, destination });
|
|
131
131
|
}
|
|
132
|
+
/** One queue entry per real root directory, carrying the caller-declared staged destination when known. O(roots). */
|
|
133
|
+
function rootQueue({ roots, fs }, { rootDestinations } = {}) {
|
|
134
|
+
const byDirectory = new Map();
|
|
135
|
+
for (const root of roots) {
|
|
136
|
+
const directory = fs.realpath({ path: root });
|
|
137
|
+
const destination = rootDestinations?.get(root) ?? rootDestinations?.get(directory) ?? byDirectory.get(directory)?.destination;
|
|
138
|
+
byDirectory.set(directory, destination === undefined ? { directory } : { directory, destination });
|
|
139
|
+
}
|
|
140
|
+
return [...byDirectory.values()];
|
|
141
|
+
}
|
|
132
142
|
/** Plan selected runtime edges before copying; unresolved/irreconcilable versions throw atomically.
|
|
133
143
|
* Supplied roots are already owned by the caller and are never copied through a back edge.
|
|
134
144
|
* A version that conflicts with the hoisted copy is staged nested under its dependent, so every
|
|
135
145
|
* staged package still resolves its declared dependencies from where it sits.
|
|
136
146
|
* @complexity O(packages × nesting depth + edges × ancestor depth) filesystem reads, O(packages + edges × ancestor depth) plan memory.
|
|
137
|
-
* @example stageTransitiveDependencies({ roots, outDir, excluded, fs, resolver });
|
|
147
|
+
* @example stageTransitiveDependencies({ roots, outDir, excluded, fs, resolver }, { rootDestinations: new Map([[root, stagedRoot]]) });
|
|
138
148
|
*/
|
|
139
149
|
export function stageTransitiveDependencies(required, optional = {}) {
|
|
140
|
-
const {
|
|
141
|
-
const
|
|
142
|
-
const plan = { ...required, staged: new Map(), bindings: new Map(), roots:
|
|
150
|
+
const { fs } = required;
|
|
151
|
+
const queue = rootQueue({ roots: required.roots, fs }, { rootDestinations: optional.rootDestinations });
|
|
152
|
+
const plan = { ...required, staged: new Map(), bindings: new Map(), roots: new Set(queue.map(entry => entry.directory)), queue };
|
|
143
153
|
for (let index = 0; index < plan.queue.length; index++) {
|
|
144
154
|
const from = plan.queue[index];
|
|
145
155
|
for (const name of (optional.dependencies ?? declaredDependencies)({ packageDir: from.directory, fs }))
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ElementType, SelectHTMLAttributes } from 'react';
|
|
2
|
+
export declare function ShareExpiryControls({ useShareExpiry, kit: { Button, Select }, copy, choices, status, expiresAt, showExpired }: {
|
|
3
|
+
useShareExpiry: () => {
|
|
4
|
+
expiresInDays?: 7 | 30 | 90 | null;
|
|
5
|
+
change: (required: {
|
|
6
|
+
expiresInDays: 7 | 30 | 90 | null;
|
|
7
|
+
}) => void;
|
|
8
|
+
acknowledge: () => void;
|
|
9
|
+
setShowExpired: (required: {
|
|
10
|
+
showExpired: boolean;
|
|
11
|
+
}) => void;
|
|
12
|
+
};
|
|
13
|
+
kit: {
|
|
14
|
+
Button: ElementType<ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
15
|
+
Select: ElementType<SelectHTMLAttributes<HTMLSelectElement>>;
|
|
16
|
+
};
|
|
17
|
+
copy: {
|
|
18
|
+
never: string;
|
|
19
|
+
days: (days: 7 | 30 | 90) => string;
|
|
20
|
+
expired: string;
|
|
21
|
+
showExpired: string;
|
|
22
|
+
acknowledge: string;
|
|
23
|
+
};
|
|
24
|
+
choices: readonly (7 | 30 | 90)[];
|
|
25
|
+
status: string;
|
|
26
|
+
expiresAt?: string | null;
|
|
27
|
+
showExpired?: boolean;
|
|
28
|
+
}, _optional?: {}): import("react").JSX.Element;
|
|
29
|
+
//# sourceMappingURL=ShareExpiryControls.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export function ShareExpiryControls({ useShareExpiry, kit: { Button, Select }, copy, choices, status, expiresAt, showExpired = true }, _optional = {}) {
|
|
3
|
+
const expiry = useShareExpiry();
|
|
4
|
+
// An absent recipient URL is not evidence that a link is inactive.
|
|
5
|
+
return _jsxs("div", { children: [_jsxs(Select, { "aria-label": copy.never, value: expiry.expiresInDays ?? 'never', onChange: (event) => expiry.change({ expiresInDays: event.currentTarget.value === 'never' ? null : Number(event.currentTarget.value) }), children: [_jsx("option", { value: "never", children: copy.never }), choices.map(days => _jsx("option", { value: days, children: copy.days(days) }, days))] }), _jsxs("label", { children: [_jsx("input", { type: "checkbox", checked: showExpired, onChange: event => expiry.setShowExpired({ showExpired: event.currentTarget.checked }) }), copy.showExpired] }), status === 'expired' ? _jsx("p", { children: copy.expired }) : null, expiresAt ? _jsx("time", { dateTime: expiresAt, children: expiresAt }) : null, _jsx(Button, { type: "button", onClick: expiry.acknowledge, children: copy.acknowledge })] });
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ShareExpiryControls.js.map
|