@gadicc/loom 1.38.0 → 2.0.0
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/.loom-source-manifest.json +97 -0
- package/README.md +103 -31
- package/db/databaseTls.js +6 -3
- package/db/databaseUrl.js +3 -2
- package/db/drizzle-config.js +14 -16
- package/db/fixtures.d.ts +1 -3
- package/db/fixtures.js +4 -7
- package/esm/bin/loom.d.ts +2 -1
- package/esm/bin/loom.d.ts.map +1 -1
- package/esm/bin/loom.js +37 -10
- package/esm/bin/loom.js.map +1 -0
- package/esm/mod.d.ts +0 -1
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +1 -1
- package/esm/mod.js.map +1 -0
- package/esm/src/apiKeys/authorize.d.ts.map +1 -1
- package/esm/src/apiKeys/authorize.js +15 -14
- package/esm/src/apiKeys/authorize.js.map +1 -0
- package/esm/src/apiKeys/betterAuth.d.ts.map +1 -1
- package/esm/src/apiKeys/betterAuth.js +1 -0
- package/esm/src/apiKeys/betterAuth.js.map +1 -0
- package/esm/src/apiKeys/country.d.ts.map +1 -1
- package/esm/src/apiKeys/country.js +1 -0
- package/esm/src/apiKeys/country.js.map +1 -0
- package/esm/src/apiKeys/credentials.d.ts.map +1 -1
- package/esm/src/apiKeys/credentials.js +3 -1
- package/esm/src/apiKeys/credentials.js.map +1 -0
- package/esm/src/apiKeys/fingerprint.d.ts.map +1 -1
- package/esm/src/apiKeys/fingerprint.js +1 -0
- package/esm/src/apiKeys/fingerprint.js.map +1 -0
- package/esm/src/apiKeys/lifecycle.d.ts.map +1 -1
- package/esm/src/apiKeys/lifecycle.js +1 -0
- package/esm/src/apiKeys/lifecycle.js.map +1 -0
- package/esm/src/apiKeys/limits.d.ts.map +1 -1
- package/esm/src/apiKeys/limits.js +10 -10
- package/esm/src/apiKeys/limits.js.map +1 -0
- package/esm/src/apiKeys/mod.d.ts +0 -1
- package/esm/src/apiKeys/mod.d.ts.map +1 -1
- package/esm/src/apiKeys/mod.js +1 -1
- package/esm/src/apiKeys/mod.js.map +1 -0
- package/esm/src/apiKeys/permissions.d.ts.map +1 -1
- package/esm/src/apiKeys/permissions.js +1 -0
- package/esm/src/apiKeys/permissions.js.map +1 -0
- package/esm/src/apiKeys/policy.d.ts.map +1 -1
- package/esm/src/apiKeys/policy.js +1 -0
- package/esm/src/apiKeys/policy.js.map +1 -0
- package/esm/src/apiKeys/retention.d.ts.map +1 -1
- package/esm/src/apiKeys/retention.js +1 -0
- package/esm/src/apiKeys/retention.js.map +1 -0
- package/esm/src/apiKeys/types.d.ts.map +1 -1
- package/esm/src/apiKeys/types.js +1 -0
- package/esm/src/apiKeys/types.js.map +1 -0
- package/esm/src/cli/atomicText.d.ts +3 -0
- package/esm/src/cli/atomicText.d.ts.map +1 -0
- package/esm/src/cli/atomicText.js +33 -0
- package/esm/src/cli/atomicText.js.map +1 -0
- package/esm/src/cli/bunLocalDev.d.ts +65 -0
- package/esm/src/cli/bunLocalDev.d.ts.map +1 -0
- package/esm/src/cli/bunLocalDev.js +459 -0
- package/esm/src/cli/bunLocalDev.js.map +1 -0
- package/esm/src/cli/bunProject.d.ts +30 -0
- package/esm/src/cli/bunProject.d.ts.map +1 -0
- package/esm/src/cli/bunProject.js +309 -0
- package/esm/src/cli/bunProject.js.map +1 -0
- package/esm/src/cli/cliBootstrap.d.ts +83 -0
- package/esm/src/cli/cliBootstrap.d.ts.map +1 -0
- package/esm/src/cli/cliBootstrap.js +186 -0
- package/esm/src/cli/cliBootstrap.js.map +1 -0
- package/esm/src/cli/externalSkills.d.ts.map +1 -1
- package/esm/src/cli/externalSkills.js +9 -5
- package/esm/src/cli/externalSkills.js.map +1 -0
- package/esm/src/cli/filesR2Policy.d.ts.map +1 -1
- package/esm/src/cli/filesR2Policy.js +18 -11
- package/esm/src/cli/filesR2Policy.js.map +1 -0
- package/esm/src/cli/generatedBuild.d.ts +42 -0
- package/esm/src/cli/generatedBuild.d.ts.map +1 -0
- package/esm/src/cli/generatedBuild.js +259 -0
- package/esm/src/cli/generatedBuild.js.map +1 -0
- package/esm/src/cli/generatedCleanup.d.ts +7 -0
- package/esm/src/cli/generatedCleanup.d.ts.map +1 -0
- package/esm/src/cli/generatedCleanup.js +67 -0
- package/esm/src/cli/generatedCleanup.js.map +1 -0
- package/esm/src/cli/generatedDevLease.d.ts +8 -0
- package/esm/src/cli/generatedDevLease.d.ts.map +1 -0
- package/esm/src/cli/generatedDevLease.js +39 -0
- package/esm/src/cli/generatedDevLease.js.map +1 -0
- package/esm/src/cli/generatedInstall.d.ts +64 -0
- package/esm/src/cli/generatedInstall.d.ts.map +1 -0
- package/esm/src/cli/generatedInstall.js +466 -0
- package/esm/src/cli/generatedInstall.js.map +1 -0
- package/esm/src/cli/generatedWorkflow.d.ts +34 -0
- package/esm/src/cli/generatedWorkflow.d.ts.map +1 -0
- package/esm/src/cli/generatedWorkflow.js +85 -0
- package/esm/src/cli/generatedWorkflow.js.map +1 -0
- package/esm/src/cli/legacyManagedOutputs.d.ts.map +1 -1
- package/esm/src/cli/legacyManagedOutputs.js +1 -0
- package/esm/src/cli/legacyManagedOutputs.js.map +1 -0
- package/esm/src/cli/localDb.d.ts.map +1 -1
- package/esm/src/cli/localDb.js +33 -28
- package/esm/src/cli/localDb.js.map +1 -0
- package/esm/src/cli/localDevLock.d.ts +9 -0
- package/esm/src/cli/localDevLock.d.ts.map +1 -1
- package/esm/src/cli/localDevLock.js +54 -13
- package/esm/src/cli/localDevLock.js.map +1 -0
- package/esm/src/cli/localDevPackage.d.ts +6 -11
- package/esm/src/cli/localDevPackage.d.ts.map +1 -1
- package/esm/src/cli/localDevPackage.js +51 -48
- package/esm/src/cli/localDevPackage.js.map +1 -0
- package/esm/src/cli/managedFiles.d.ts.map +1 -1
- package/esm/src/cli/managedFiles.js +34 -18
- package/esm/src/cli/managedFiles.js.map +1 -0
- package/esm/src/cli/migrationEnv.d.ts +16 -3
- package/esm/src/cli/migrationEnv.d.ts.map +1 -1
- package/esm/src/cli/migrationEnv.js +7 -4
- package/esm/src/cli/migrationEnv.js.map +1 -0
- package/esm/src/cli/mod.d.ts +19 -7
- package/esm/src/cli/mod.d.ts.map +1 -1
- package/esm/src/cli/mod.js +2000 -742
- package/esm/src/cli/mod.js.map +1 -0
- package/esm/src/cli/packageTreeSignature.d.ts +8 -0
- package/esm/src/cli/packageTreeSignature.d.ts.map +1 -0
- package/esm/src/cli/packageTreeSignature.js +60 -0
- package/esm/src/cli/packageTreeSignature.js.map +1 -0
- package/esm/src/cli/processIdentity.d.ts +7 -0
- package/esm/src/cli/processIdentity.d.ts.map +1 -0
- package/esm/src/cli/processIdentity.js +39 -0
- package/esm/src/cli/processIdentity.js.map +1 -0
- package/esm/src/cli/projectSkills.d.ts +1 -1
- package/esm/src/cli/projectSkills.d.ts.map +1 -1
- package/esm/src/cli/projectSkills.js +31 -23
- package/esm/src/cli/projectSkills.js.map +1 -0
- package/esm/src/cli/projectTooling.d.ts +6 -3
- package/esm/src/cli/projectTooling.d.ts.map +1 -1
- package/esm/src/cli/projectTooling.js +86 -41
- package/esm/src/cli/projectTooling.js.map +1 -0
- package/esm/src/cli/releaseConfig.d.ts.map +1 -1
- package/esm/src/cli/releaseConfig.js +5 -3
- package/esm/src/cli/releaseConfig.js.map +1 -0
- package/esm/src/cli/releaseCredentials.d.ts.map +1 -1
- package/esm/src/cli/releaseCredentials.js +19 -31
- package/esm/src/cli/releaseCredentials.js.map +1 -0
- package/esm/src/cli/releaseTrust.d.ts.map +1 -1
- package/esm/src/cli/releaseTrust.js +11 -4
- package/esm/src/cli/releaseTrust.js.map +1 -0
- package/esm/src/cli/releaseTrustCommand.d.ts.map +1 -1
- package/esm/src/cli/releaseTrustCommand.js +6 -4
- package/esm/src/cli/releaseTrustCommand.js.map +1 -0
- package/esm/src/cli/sourceConfig.d.ts +3 -0
- package/esm/src/cli/sourceConfig.d.ts.map +1 -0
- package/esm/src/cli/sourceConfig.js +91 -0
- package/esm/src/cli/sourceConfig.js.map +1 -0
- package/esm/src/cli/sourceDev.d.ts +77 -0
- package/esm/src/cli/sourceDev.d.ts.map +1 -0
- package/esm/src/cli/sourceDev.js +974 -0
- package/esm/src/cli/sourceDev.js.map +1 -0
- package/esm/src/cli/vercelBuildEnv.d.ts.map +1 -1
- package/esm/src/cli/vercelBuildEnv.js +21 -15
- package/esm/src/cli/vercelBuildEnv.js.map +1 -0
- package/esm/src/cli/vercelEnvMask.d.ts +2 -2
- package/esm/src/cli/vercelEnvMask.d.ts.map +1 -1
- package/esm/src/cli/vercelEnvMask.js +8 -4
- package/esm/src/cli/vercelEnvMask.js.map +1 -0
- package/esm/src/cli/vercelProjectRelease.d.ts.map +1 -1
- package/esm/src/cli/vercelProjectRelease.js +45 -22
- package/esm/src/cli/vercelProjectRelease.js.map +1 -0
- package/esm/src/cli/vercelPulledEnv.d.ts +1 -1
- package/esm/src/cli/vercelPulledEnv.d.ts.map +1 -1
- package/esm/src/cli/vercelPulledEnv.js +1 -0
- package/esm/src/cli/vercelPulledEnv.js.map +1 -0
- package/esm/src/clientData/identity.d.ts.map +1 -1
- package/esm/src/clientData/identity.js +1 -0
- package/esm/src/clientData/identity.js.map +1 -0
- package/esm/src/clientData/mod.d.ts +0 -1
- package/esm/src/clientData/mod.d.ts.map +1 -1
- package/esm/src/clientData/mod.js +1 -0
- package/esm/src/clientData/mod.js.map +1 -0
- package/esm/src/files/client.d.ts +1 -1
- package/esm/src/files/client.d.ts.map +1 -1
- package/esm/src/files/client.js +3 -4
- package/esm/src/files/client.js.map +1 -0
- package/esm/src/files/errors.d.ts.map +1 -1
- package/esm/src/files/errors.js +3 -12
- package/esm/src/files/errors.js.map +1 -0
- package/esm/src/files/hash.d.ts +1 -1
- package/esm/src/files/hash.d.ts.map +1 -1
- package/esm/src/files/hash.js +1 -0
- package/esm/src/files/hash.js.map +1 -0
- package/esm/src/files/memory.d.ts.map +1 -1
- package/esm/src/files/memory.js +2 -1
- package/esm/src/files/memory.js.map +1 -0
- package/esm/src/files/metadata.d.ts.map +1 -1
- package/esm/src/files/metadata.js +11 -18
- package/esm/src/files/metadata.js.map +1 -0
- package/esm/src/files/mod.d.ts +0 -1
- package/esm/src/files/mod.d.ts.map +1 -1
- package/esm/src/files/mod.js +1 -1
- package/esm/src/files/mod.js.map +1 -0
- package/esm/src/files/s3.d.ts.map +1 -1
- package/esm/src/files/s3.js +6 -4
- package/esm/src/files/s3.js.map +1 -0
- package/esm/src/files/service.d.ts.map +1 -1
- package/esm/src/files/service.js +3 -4
- package/esm/src/files/service.js.map +1 -0
- package/esm/src/files/types.d.ts.map +1 -1
- package/esm/src/files/types.js +1 -0
- package/esm/src/files/types.js.map +1 -0
- package/esm/src/jobs/catalog.d.ts.map +1 -1
- package/esm/src/jobs/catalog.js +5 -1
- package/esm/src/jobs/catalog.js.map +1 -0
- package/esm/src/jobs/controller.d.ts +1 -1
- package/esm/src/jobs/controller.d.ts.map +1 -1
- package/esm/src/jobs/controller.js +11 -55
- package/esm/src/jobs/controller.js.map +1 -0
- package/esm/src/jobs/direct.d.ts.map +1 -1
- package/esm/src/jobs/direct.js +3 -3
- package/esm/src/jobs/direct.js.map +1 -0
- package/esm/src/jobs/events.d.ts.map +1 -1
- package/esm/src/jobs/events.js +1 -0
- package/esm/src/jobs/events.js.map +1 -0
- package/esm/src/jobs/format.d.ts +5 -5
- package/esm/src/jobs/format.d.ts.map +1 -1
- package/esm/src/jobs/format.js +2 -1
- package/esm/src/jobs/format.js.map +1 -0
- package/esm/src/jobs/http.d.ts +3 -3
- package/esm/src/jobs/http.d.ts.map +1 -1
- package/esm/src/jobs/http.js +1 -0
- package/esm/src/jobs/http.js.map +1 -0
- package/esm/src/jobs/log.d.ts.map +1 -1
- package/esm/src/jobs/log.js +1 -0
- package/esm/src/jobs/log.js.map +1 -0
- package/esm/src/jobs/mod.d.ts.map +1 -1
- package/esm/src/jobs/mod.js +1 -0
- package/esm/src/jobs/mod.js.map +1 -0
- package/esm/src/jobs/run.d.ts.map +1 -1
- package/esm/src/jobs/run.js +1 -0
- package/esm/src/jobs/run.js.map +1 -0
- package/esm/src/jobs/sanitize.d.ts.map +1 -1
- package/esm/src/jobs/sanitize.js +1 -0
- package/esm/src/jobs/sanitize.js.map +1 -0
- package/esm/src/jobs/types.d.ts +1 -0
- package/esm/src/jobs/types.d.ts.map +1 -1
- package/esm/src/jobs/types.js +1 -0
- package/esm/src/jobs/types.js.map +1 -0
- package/esm/src/mail/errors.d.ts.map +1 -1
- package/esm/src/mail/errors.js +8 -42
- package/esm/src/mail/errors.js.map +1 -0
- package/esm/src/mail/memory.d.ts +1 -1
- package/esm/src/mail/memory.d.ts.map +1 -1
- package/esm/src/mail/memory.js +10 -14
- package/esm/src/mail/memory.js.map +1 -0
- package/esm/src/mail/mod.d.ts +0 -1
- package/esm/src/mail/mod.d.ts.map +1 -1
- package/esm/src/mail/mod.js +1 -1
- package/esm/src/mail/mod.js.map +1 -0
- package/esm/src/mail/postal.d.ts +1 -2
- package/esm/src/mail/postal.d.ts.map +1 -1
- package/esm/src/mail/postal.js +22 -18
- package/esm/src/mail/postal.js.map +1 -0
- package/esm/src/mail/retry.d.ts.map +1 -1
- package/esm/src/mail/retry.js +1 -0
- package/esm/src/mail/retry.js.map +1 -0
- package/esm/src/mail/sender.d.ts.map +1 -1
- package/esm/src/mail/sender.js +1 -0
- package/esm/src/mail/sender.js.map +1 -0
- package/esm/src/mail/service.d.ts.map +1 -1
- package/esm/src/mail/service.js +6 -7
- package/esm/src/mail/service.js.map +1 -0
- package/esm/src/mail/types.d.ts.map +1 -1
- package/esm/src/mail/types.js +1 -0
- package/esm/src/mail/types.js.map +1 -0
- package/esm/src/mui/apiKeys.d.ts +10 -11
- package/esm/src/mui/apiKeys.d.ts.map +1 -1
- package/esm/src/mui/apiKeys.js +83 -214
- package/esm/src/mui/apiKeys.js.map +1 -0
- package/esm/src/mui/apiKeysView.d.ts +1 -1
- package/esm/src/mui/apiKeysView.d.ts.map +1 -1
- package/esm/src/mui/apiKeysView.js +11 -9
- package/esm/src/mui/apiKeysView.js.map +1 -0
- package/esm/src/mui/confirm.d.ts +2 -2
- package/esm/src/mui/confirm.d.ts.map +1 -1
- package/esm/src/mui/confirm.js +3 -7
- package/esm/src/mui/confirm.js.map +1 -0
- package/esm/src/mui/mail.d.ts +4 -4
- package/esm/src/mui/mail.d.ts.map +1 -1
- package/esm/src/mui/mail.js +11 -71
- package/esm/src/mui/mail.js.map +1 -0
- package/esm/src/mui/mailView.d.ts +1 -1
- package/esm/src/mui/mailView.d.ts.map +1 -1
- package/esm/src/mui/mailView.js +1 -0
- package/esm/src/mui/mailView.js.map +1 -0
- package/esm/src/mui/mod.d.ts +0 -1
- package/esm/src/mui/mod.d.ts.map +1 -1
- package/esm/src/mui/mod.js +1 -0
- package/esm/src/mui/mod.js.map +1 -0
- package/esm/src/next/apiKeys/mod.d.ts +2 -3
- package/esm/src/next/apiKeys/mod.d.ts.map +1 -1
- package/esm/src/next/apiKeys/mod.js +6 -5
- package/esm/src/next/apiKeys/mod.js.map +1 -0
- package/esm/src/next/auth/client.d.ts +0 -1
- package/esm/src/next/auth/client.d.ts.map +1 -1
- package/esm/src/next/auth/client.js +1 -0
- package/esm/src/next/auth/client.js.map +1 -0
- package/esm/src/next/auth/config.d.ts.map +1 -1
- package/esm/src/next/auth/config.js +11 -17
- package/esm/src/next/auth/config.js.map +1 -0
- package/esm/src/next/auth/localTestLogin.d.ts.map +1 -1
- package/esm/src/next/auth/localTestLogin.js +13 -9
- package/esm/src/next/auth/localTestLogin.js.map +1 -0
- package/esm/src/next/auth/mod.d.ts.map +1 -1
- package/esm/src/next/auth/mod.js +1 -0
- package/esm/src/next/auth/mod.js.map +1 -0
- package/esm/src/next/auth/server.d.ts +2 -2
- package/esm/src/next/auth/server.d.ts.map +1 -1
- package/esm/src/next/auth/server.js +1 -0
- package/esm/src/next/auth/server.js.map +1 -0
- package/esm/src/next/files/mod.d.ts +0 -1
- package/esm/src/next/files/mod.d.ts.map +1 -1
- package/esm/src/next/files/mod.js +1 -1
- package/esm/src/next/files/mod.js.map +1 -0
- package/esm/src/next/files/route.d.ts +1 -1
- package/esm/src/next/files/route.d.ts.map +1 -1
- package/esm/src/next/files/route.js +11 -11
- package/esm/src/next/files/route.js.map +1 -0
- package/esm/src/next/jobs/list.d.ts +5 -5
- package/esm/src/next/jobs/list.d.ts.map +1 -1
- package/esm/src/next/jobs/list.js +15 -19
- package/esm/src/next/jobs/list.js.map +1 -0
- package/esm/src/next/jobs/mod.d.ts.map +1 -1
- package/esm/src/next/jobs/mod.js +1 -0
- package/esm/src/next/jobs/mod.js.map +1 -0
- package/esm/src/next/jobs/paths.d.ts +2 -2
- package/esm/src/next/jobs/paths.d.ts.map +1 -1
- package/esm/src/next/jobs/paths.js +1 -0
- package/esm/src/next/jobs/paths.js.map +1 -0
- package/esm/src/next/jobs/route.d.ts +2 -2
- package/esm/src/next/jobs/route.d.ts.map +1 -1
- package/esm/src/next/jobs/route.js +4 -4
- package/esm/src/next/jobs/route.js.map +1 -0
- package/esm/src/next/jobs/run.d.ts +2 -2
- package/esm/src/next/jobs/run.d.ts.map +1 -1
- package/esm/src/next/jobs/run.js +68 -132
- package/esm/src/next/jobs/run.js.map +1 -0
- package/esm/src/next/jobs/runRequest.d.ts +1 -1
- package/esm/src/next/jobs/runRequest.d.ts.map +1 -1
- package/esm/src/next/jobs/runRequest.js +3 -4
- package/esm/src/next/jobs/runRequest.js.map +1 -0
- package/esm/src/next/jobs/stream.d.ts.map +1 -1
- package/esm/src/next/jobs/stream.js +1 -0
- package/esm/src/next/jobs/stream.js.map +1 -0
- package/esm/src/next/mail/mod.d.ts +0 -1
- package/esm/src/next/mail/mod.d.ts.map +1 -1
- package/esm/src/next/mail/mod.js +1 -1
- package/esm/src/next/mail/mod.js.map +1 -0
- package/esm/src/next/mail/route.d.ts +2 -2
- package/esm/src/next/mail/route.d.ts.map +1 -1
- package/esm/src/next/mail/route.js +1 -0
- package/esm/src/next/mail/route.js.map +1 -0
- package/esm/src/next/pwa/mod.d.ts +0 -4
- package/esm/src/next/pwa/mod.d.ts.map +1 -1
- package/esm/src/next/pwa/mod.js +32 -16
- package/esm/src/next/pwa/mod.js.map +1 -0
- package/esm/src/next/pwa/worker.d.ts +0 -1
- package/esm/src/next/pwa/worker.d.ts.map +1 -1
- package/esm/src/next/pwa/worker.js +1 -0
- package/esm/src/next/pwa/worker.js.map +1 -0
- package/esm/src/next/secrets/constants.d.ts +3 -0
- package/esm/src/next/secrets/constants.d.ts.map +1 -0
- package/esm/src/next/secrets/constants.js +3 -0
- package/esm/src/next/secrets/constants.js.map +1 -0
- package/esm/src/next/secrets/mod.d.ts +1 -3
- package/esm/src/next/secrets/mod.d.ts.map +1 -1
- package/esm/src/next/secrets/mod.js +6 -7
- package/esm/src/next/secrets/mod.js.map +1 -0
- package/esm/src/next/sourceDev.d.ts +6 -0
- package/esm/src/next/sourceDev.d.ts.map +1 -0
- package/esm/src/next/sourceDev.js +41 -0
- package/esm/src/next/sourceDev.js.map +1 -0
- package/esm/src/secrets/encoding.d.ts.map +1 -1
- package/esm/src/secrets/encoding.js +1 -0
- package/esm/src/secrets/encoding.js.map +1 -0
- package/esm/src/secrets/errors.d.ts.map +1 -1
- package/esm/src/secrets/errors.js +3 -7
- package/esm/src/secrets/errors.js.map +1 -0
- package/esm/src/secrets/fingerprint.d.ts.map +1 -1
- package/esm/src/secrets/fingerprint.js +1 -0
- package/esm/src/secrets/fingerprint.js.map +1 -0
- package/esm/src/secrets/frame.d.ts.map +1 -1
- package/esm/src/secrets/frame.js +4 -3
- package/esm/src/secrets/frame.js.map +1 -0
- package/esm/src/secrets/keyring.d.ts.map +1 -1
- package/esm/src/secrets/keyring.js +6 -6
- package/esm/src/secrets/keyring.js.map +1 -0
- package/esm/src/secrets/legacy.d.ts +0 -1
- package/esm/src/secrets/legacy.d.ts.map +1 -1
- package/esm/src/secrets/legacy.js +13 -10
- package/esm/src/secrets/legacy.js.map +1 -0
- package/esm/src/secrets/maintenance.d.ts +0 -1
- package/esm/src/secrets/maintenance.d.ts.map +1 -1
- package/esm/src/secrets/maintenance.js +9 -24
- package/esm/src/secrets/maintenance.js.map +1 -0
- package/esm/src/secrets/mod.d.ts +0 -1
- package/esm/src/secrets/mod.d.ts.map +1 -1
- package/esm/src/secrets/mod.js +1 -1
- package/esm/src/secrets/mod.js.map +1 -0
- package/esm/src/secrets/secrets.d.ts.map +1 -1
- package/esm/src/secrets/secrets.js +38 -30
- package/esm/src/secrets/secrets.js.map +1 -0
- package/package.json +111 -135
- package/skills/loom/SKILL.md +40 -5
- package/skills/loom/references/esm-package.md +35 -0
- package/skills/loom/references/local-development.md +261 -29
- package/skills/loom-mail/SKILL.md +1 -0
- package/skills/upgrade-deps/SKILL.md +4 -2
- package/source/bin/loom.ts +50 -0
- package/source/mod.ts +10 -0
- package/source/src/apiKeys/authorize.ts +294 -0
- package/source/src/apiKeys/betterAuth.ts +253 -0
- package/source/src/apiKeys/country.ts +7 -0
- package/source/src/apiKeys/credentials.ts +171 -0
- package/source/src/apiKeys/fingerprint.ts +10 -0
- package/{script/src/apiKeys/lifecycle.d.ts → source/src/apiKeys/lifecycle.ts} +21 -23
- package/source/src/apiKeys/limits.ts +372 -0
- package/source/src/apiKeys/mod.ts +11 -0
- package/source/src/apiKeys/permissions.ts +153 -0
- package/source/src/apiKeys/policy.ts +189 -0
- package/source/src/apiKeys/retention.ts +136 -0
- package/source/src/apiKeys/types.ts +288 -0
- package/source/src/cli/atomicText.ts +38 -0
- package/source/src/cli/bunLocalDev.ts +646 -0
- package/source/src/cli/bunProject.ts +433 -0
- package/source/src/cli/cliBootstrap.ts +313 -0
- package/source/src/cli/externalSkills.ts +315 -0
- package/source/src/cli/filesR2Policy.ts +212 -0
- package/source/src/cli/generatedBuild.ts +380 -0
- package/source/src/cli/generatedCleanup.ts +87 -0
- package/source/src/cli/generatedDevLease.ts +52 -0
- package/source/src/cli/generatedInstall.ts +630 -0
- package/source/src/cli/generatedWorkflow.ts +135 -0
- package/{script/src/cli/legacyManagedOutputs.js → source/src/cli/legacyManagedOutputs.ts} +36 -30
- package/source/src/cli/localDb.ts +548 -0
- package/source/src/cli/localDevLock.ts +462 -0
- package/source/src/cli/localDevPackage.ts +754 -0
- package/source/src/cli/managedFiles.ts +688 -0
- package/source/src/cli/migrationEnv.ts +267 -0
- package/source/src/cli/mod.ts +26788 -0
- package/source/src/cli/packageTreeSignature.ts +65 -0
- package/source/src/cli/processIdentity.ts +38 -0
- package/source/src/cli/projectSkills.ts +1102 -0
- package/source/src/cli/projectTooling.ts +1140 -0
- package/source/src/cli/releaseConfig.ts +36 -0
- package/source/src/cli/releaseCredentials.ts +642 -0
- package/source/src/cli/releaseTrust.ts +194 -0
- package/source/src/cli/releaseTrustCommand.ts +210 -0
- package/source/src/cli/sourceConfig.ts +106 -0
- package/source/src/cli/sourceDev.ts +1279 -0
- package/source/src/cli/vercelBuildEnv.ts +714 -0
- package/source/src/cli/vercelEnvMask.ts +182 -0
- package/source/src/cli/vercelProjectRelease.ts +807 -0
- package/source/src/cli/vercelPulledEnv.ts +174 -0
- package/source/src/clientData/identity.ts +229 -0
- package/source/src/clientData/mod.ts +1 -0
- package/source/src/files/client.ts +75 -0
- package/source/src/files/errors.ts +69 -0
- package/source/src/files/hash.ts +109 -0
- package/source/src/files/memory.ts +158 -0
- package/source/src/files/metadata.ts +251 -0
- package/source/src/files/mod.ts +8 -0
- package/source/src/files/s3.ts +182 -0
- package/source/src/files/service.ts +210 -0
- package/source/src/files/types.ts +171 -0
- package/source/src/jobs/catalog.ts +303 -0
- package/source/src/jobs/controller.ts +156 -0
- package/source/src/jobs/direct.ts +177 -0
- package/source/src/jobs/events.ts +74 -0
- package/source/src/jobs/format.ts +233 -0
- package/source/src/jobs/http.ts +83 -0
- package/source/src/jobs/log.ts +10 -0
- package/source/src/jobs/mod.ts +10 -0
- package/source/src/jobs/run.ts +141 -0
- package/source/src/jobs/sanitize.ts +142 -0
- package/source/src/jobs/types.ts +43 -0
- package/source/src/mail/errors.ts +77 -0
- package/source/src/mail/memory.ts +451 -0
- package/source/src/mail/mod.ts +5 -0
- package/source/src/mail/postal.ts +363 -0
- package/source/src/mail/retry.ts +30 -0
- package/source/src/mail/sender.ts +57 -0
- package/source/src/mail/service.ts +252 -0
- package/source/src/mail/types.ts +229 -0
- package/source/src/mui/apiKeys.tsx +1044 -0
- package/source/src/mui/apiKeysView.ts +535 -0
- package/source/src/mui/confirm.tsx +138 -0
- package/source/src/mui/mail.tsx +279 -0
- package/source/src/mui/mailView.ts +50 -0
- package/source/src/mui/mod.ts +3 -0
- package/source/src/next/apiKeys/mod.ts +393 -0
- package/{script/src/next/auth/client.d.ts → source/src/next/auth/client.ts} +19 -5
- package/source/src/next/auth/config.ts +207 -0
- package/source/src/next/auth/localTestLogin.ts +412 -0
- package/source/src/next/auth/mod.ts +3 -0
- package/source/src/next/auth/server.ts +94 -0
- package/source/src/next/files/mod.ts +1 -0
- package/source/src/next/files/route.ts +621 -0
- package/source/src/next/jobs/list.tsx +90 -0
- package/source/src/next/jobs/mod.ts +5 -0
- package/source/src/next/jobs/paths.ts +70 -0
- package/source/src/next/jobs/route.ts +207 -0
- package/source/src/next/jobs/run.tsx +888 -0
- package/source/src/next/jobs/runRequest.ts +92 -0
- package/source/src/next/jobs/stream.ts +33 -0
- package/source/src/next/mail/mod.ts +1 -0
- package/source/src/next/mail/route.ts +75 -0
- package/source/src/next/pwa/mod.tsx +453 -0
- package/source/src/next/pwa/worker.ts +59 -0
- package/source/src/next/secrets/constants.ts +2 -0
- package/source/src/next/secrets/mod.ts +319 -0
- package/source/src/next/sourceDev.ts +50 -0
- package/source/src/secrets/encoding.ts +102 -0
- package/source/src/secrets/errors.ts +58 -0
- package/source/src/secrets/fingerprint.ts +132 -0
- package/source/src/secrets/frame.ts +119 -0
- package/source/src/secrets/keyring.ts +225 -0
- package/source/src/secrets/legacy.ts +244 -0
- package/source/src/secrets/maintenance.ts +517 -0
- package/source/src/secrets/mod.ts +38 -0
- package/source/src/secrets/secrets.ts +926 -0
- package/db/databaseTls.test.ts +0 -171
- package/db/databaseUrl.test.ts +0 -72
- package/db/neonEndpoint.test.ts +0 -51
- package/db/testing.test.ts +0 -28
- package/deno.json +0 -3
- package/esm/_dnt.polyfills.d.ts +0 -166
- package/esm/_dnt.polyfills.d.ts.map +0 -1
- package/esm/_dnt.polyfills.js +0 -177
- package/esm/_dnt.shims.d.ts +0 -2
- package/esm/_dnt.shims.d.ts.map +0 -1
- package/esm/_dnt.shims.js +0 -57
- package/esm/package.json +0 -3
- package/script/_dnt.polyfills.d.ts +0 -166
- package/script/_dnt.polyfills.d.ts.map +0 -1
- package/script/_dnt.polyfills.js +0 -180
- package/script/_dnt.shims.d.ts +0 -2
- package/script/_dnt.shims.d.ts.map +0 -1
- package/script/_dnt.shims.js +0 -60
- package/script/bin/loom.d.ts +0 -2
- package/script/bin/loom.d.ts.map +0 -1
- package/script/bin/loom.js +0 -17
- package/script/mod.d.ts +0 -12
- package/script/mod.d.ts.map +0 -1
- package/script/mod.js +0 -27
- package/script/package.json +0 -3
- package/script/src/apiKeys/authorize.d.ts +0 -4
- package/script/src/apiKeys/authorize.d.ts.map +0 -1
- package/script/src/apiKeys/authorize.js +0 -258
- package/script/src/apiKeys/betterAuth.d.ts +0 -123
- package/script/src/apiKeys/betterAuth.d.ts.map +0 -1
- package/script/src/apiKeys/betterAuth.js +0 -169
- package/script/src/apiKeys/country.d.ts +0 -3
- package/script/src/apiKeys/country.d.ts.map +0 -1
- package/script/src/apiKeys/country.js +0 -10
- package/script/src/apiKeys/credentials.d.ts +0 -39
- package/script/src/apiKeys/credentials.d.ts.map +0 -1
- package/script/src/apiKeys/credentials.js +0 -121
- package/script/src/apiKeys/fingerprint.d.ts +0 -3
- package/script/src/apiKeys/fingerprint.d.ts.map +0 -1
- package/script/src/apiKeys/fingerprint.js +0 -8
- package/script/src/apiKeys/lifecycle.d.ts.map +0 -1
- package/script/src/apiKeys/lifecycle.js +0 -7
- package/script/src/apiKeys/limits.d.ts +0 -132
- package/script/src/apiKeys/limits.d.ts.map +0 -1
- package/script/src/apiKeys/limits.js +0 -254
- package/script/src/apiKeys/mod.d.ts +0 -13
- package/script/src/apiKeys/mod.d.ts.map +0 -1
- package/script/src/apiKeys/mod.js +0 -28
- package/script/src/apiKeys/permissions.d.ts +0 -56
- package/script/src/apiKeys/permissions.d.ts.map +0 -1
- package/script/src/apiKeys/permissions.js +0 -136
- package/script/src/apiKeys/policy.d.ts +0 -61
- package/script/src/apiKeys/policy.d.ts.map +0 -1
- package/script/src/apiKeys/policy.js +0 -94
- package/script/src/apiKeys/retention.d.ts +0 -55
- package/script/src/apiKeys/retention.d.ts.map +0 -1
- package/script/src/apiKeys/retention.js +0 -70
- package/script/src/apiKeys/types.d.ts +0 -242
- package/script/src/apiKeys/types.d.ts.map +0 -1
- package/script/src/apiKeys/types.js +0 -2
- package/script/src/cli/externalSkills.d.ts +0 -39
- package/script/src/cli/externalSkills.d.ts.map +0 -1
- package/script/src/cli/externalSkills.js +0 -204
- package/script/src/cli/filesR2Policy.d.ts +0 -33
- package/script/src/cli/filesR2Policy.d.ts.map +0 -1
- package/script/src/cli/filesR2Policy.js +0 -135
- package/script/src/cli/legacyManagedOutputs.d.ts +0 -33
- package/script/src/cli/legacyManagedOutputs.d.ts.map +0 -1
- package/script/src/cli/localDb.d.ts +0 -28
- package/script/src/cli/localDb.d.ts.map +0 -1
- package/script/src/cli/localDb.js +0 -370
- package/script/src/cli/localDevLock.d.ts +0 -97
- package/script/src/cli/localDevLock.d.ts.map +0 -1
- package/script/src/cli/localDevLock.js +0 -320
- package/script/src/cli/localDevPackage.d.ts +0 -172
- package/script/src/cli/localDevPackage.d.ts.map +0 -1
- package/script/src/cli/localDevPackage.js +0 -635
- package/script/src/cli/managedFiles.d.ts +0 -131
- package/script/src/cli/managedFiles.d.ts.map +0 -1
- package/script/src/cli/managedFiles.js +0 -536
- package/script/src/cli/migrationEnv.d.ts +0 -63
- package/script/src/cli/migrationEnv.d.ts.map +0 -1
- package/script/src/cli/migrationEnv.js +0 -217
- package/script/src/cli/mod.d.ts +0 -582
- package/script/src/cli/mod.d.ts.map +0 -1
- package/script/src/cli/mod.js +0 -17010
- package/script/src/cli/projectSkills.d.ts +0 -109
- package/script/src/cli/projectSkills.d.ts.map +0 -1
- package/script/src/cli/projectSkills.js +0 -749
- package/script/src/cli/projectTooling.d.ts +0 -164
- package/script/src/cli/projectTooling.d.ts.map +0 -1
- package/script/src/cli/projectTooling.js +0 -847
- package/script/src/cli/releaseConfig.d.ts +0 -10
- package/script/src/cli/releaseConfig.d.ts.map +0 -1
- package/script/src/cli/releaseConfig.js +0 -26
- package/script/src/cli/releaseCredentials.d.ts +0 -32
- package/script/src/cli/releaseCredentials.d.ts.map +0 -1
- package/script/src/cli/releaseCredentials.js +0 -392
- package/script/src/cli/releaseTrust.d.ts +0 -39
- package/script/src/cli/releaseTrust.d.ts.map +0 -1
- package/script/src/cli/releaseTrust.js +0 -130
- package/script/src/cli/releaseTrustCommand.d.ts +0 -18
- package/script/src/cli/releaseTrustCommand.d.ts.map +0 -1
- package/script/src/cli/releaseTrustCommand.js +0 -145
- package/script/src/cli/vercelBuildEnv.d.ts +0 -62
- package/script/src/cli/vercelBuildEnv.d.ts.map +0 -1
- package/script/src/cli/vercelBuildEnv.js +0 -418
- package/script/src/cli/vercelEnvMask.d.ts +0 -38
- package/script/src/cli/vercelEnvMask.d.ts.map +0 -1
- package/script/src/cli/vercelEnvMask.js +0 -142
- package/script/src/cli/vercelProjectRelease.d.ts +0 -38
- package/script/src/cli/vercelProjectRelease.d.ts.map +0 -1
- package/script/src/cli/vercelProjectRelease.js +0 -607
- package/script/src/cli/vercelPulledEnv.d.ts +0 -65
- package/script/src/cli/vercelPulledEnv.d.ts.map +0 -1
- package/script/src/cli/vercelPulledEnv.js +0 -138
- package/script/src/clientData/identity.d.ts +0 -89
- package/script/src/clientData/identity.d.ts.map +0 -1
- package/script/src/clientData/identity.js +0 -134
- package/script/src/clientData/mod.d.ts +0 -3
- package/script/src/clientData/mod.d.ts.map +0 -1
- package/script/src/clientData/mod.js +0 -18
- package/script/src/files/client.d.ts +0 -29
- package/script/src/files/client.d.ts.map +0 -1
- package/script/src/files/client.js +0 -45
- package/script/src/files/errors.d.ts +0 -37
- package/script/src/files/errors.d.ts.map +0 -1
- package/script/src/files/errors.js +0 -76
- package/script/src/files/hash.d.ts +0 -15
- package/script/src/files/hash.d.ts.map +0 -1
- package/script/src/files/hash.js +0 -89
- package/script/src/files/memory.d.ts +0 -29
- package/script/src/files/memory.d.ts.map +0 -1
- package/script/src/files/memory.js +0 -113
- package/script/src/files/metadata.d.ts +0 -10
- package/script/src/files/metadata.d.ts.map +0 -1
- package/script/src/files/metadata.js +0 -189
- package/script/src/files/mod.d.ts +0 -10
- package/script/src/files/mod.d.ts.map +0 -1
- package/script/src/files/mod.js +0 -25
- package/script/src/files/s3.d.ts +0 -29
- package/script/src/files/s3.d.ts.map +0 -1
- package/script/src/files/s3.js +0 -110
- package/script/src/files/service.d.ts +0 -27
- package/script/src/files/service.d.ts.map +0 -1
- package/script/src/files/service.js +0 -139
- package/script/src/files/types.d.ts +0 -134
- package/script/src/files/types.d.ts.map +0 -1
- package/script/src/files/types.js +0 -2
- package/script/src/jobs/catalog.d.ts +0 -32
- package/script/src/jobs/catalog.d.ts.map +0 -1
- package/script/src/jobs/catalog.js +0 -223
- package/script/src/jobs/controller.d.ts +0 -41
- package/script/src/jobs/controller.d.ts.map +0 -1
- package/script/src/jobs/controller.js +0 -151
- package/script/src/jobs/direct.d.ts +0 -36
- package/script/src/jobs/direct.d.ts.map +0 -1
- package/script/src/jobs/direct.js +0 -128
- package/script/src/jobs/events.d.ts +0 -23
- package/script/src/jobs/events.d.ts.map +0 -1
- package/script/src/jobs/events.js +0 -50
- package/script/src/jobs/format.d.ts +0 -16
- package/script/src/jobs/format.d.ts.map +0 -1
- package/script/src/jobs/format.js +0 -193
- package/script/src/jobs/http.d.ts +0 -22
- package/script/src/jobs/http.d.ts.map +0 -1
- package/script/src/jobs/http.js +0 -50
- package/script/src/jobs/log.d.ts +0 -2
- package/script/src/jobs/log.d.ts.map +0 -1
- package/script/src/jobs/log.js +0 -13
- package/script/src/jobs/mod.d.ts +0 -11
- package/script/src/jobs/mod.d.ts.map +0 -1
- package/script/src/jobs/mod.js +0 -26
- package/script/src/jobs/run.d.ts +0 -39
- package/script/src/jobs/run.d.ts.map +0 -1
- package/script/src/jobs/run.js +0 -86
- package/script/src/jobs/sanitize.d.ts +0 -30
- package/script/src/jobs/sanitize.d.ts.map +0 -1
- package/script/src/jobs/sanitize.js +0 -97
- package/script/src/jobs/types.d.ts +0 -31
- package/script/src/jobs/types.d.ts.map +0 -1
- package/script/src/jobs/types.js +0 -2
- package/script/src/mail/errors.d.ts +0 -33
- package/script/src/mail/errors.d.ts.map +0 -1
- package/script/src/mail/errors.js +0 -97
- package/script/src/mail/memory.d.ts +0 -30
- package/script/src/mail/memory.d.ts.map +0 -1
- package/script/src/mail/memory.js +0 -345
- package/script/src/mail/mod.d.ts +0 -7
- package/script/src/mail/mod.d.ts.map +0 -1
- package/script/src/mail/mod.js +0 -22
- package/script/src/mail/postal.d.ts +0 -57
- package/script/src/mail/postal.d.ts.map +0 -1
- package/script/src/mail/postal.js +0 -251
- package/script/src/mail/retry.d.ts +0 -9
- package/script/src/mail/retry.d.ts.map +0 -1
- package/script/src/mail/retry.js +0 -22
- package/script/src/mail/sender.d.ts +0 -5
- package/script/src/mail/sender.d.ts.map +0 -1
- package/script/src/mail/sender.js +0 -52
- package/script/src/mail/service.d.ts +0 -23
- package/script/src/mail/service.d.ts.map +0 -1
- package/script/src/mail/service.js +0 -191
- package/script/src/mail/types.d.ts +0 -176
- package/script/src/mail/types.d.ts.map +0 -1
- package/script/src/mail/types.js +0 -2
- package/script/src/mui/apiKeys.d.ts +0 -171
- package/script/src/mui/apiKeys.d.ts.map +0 -1
- package/script/src/mui/apiKeys.js +0 -470
- package/script/src/mui/apiKeysView.d.ts +0 -193
- package/script/src/mui/apiKeysView.d.ts.map +0 -1
- package/script/src/mui/apiKeysView.js +0 -331
- package/script/src/mui/confirm.d.ts +0 -12
- package/script/src/mui/confirm.d.ts.map +0 -1
- package/script/src/mui/confirm.js +0 -85
- package/script/src/mui/mail.d.ts +0 -29
- package/script/src/mui/mail.d.ts.map +0 -1
- package/script/src/mui/mail.js +0 -159
- package/script/src/mui/mailView.d.ts +0 -20
- package/script/src/mui/mailView.d.ts.map +0 -1
- package/script/src/mui/mailView.js +0 -32
- package/script/src/mui/mod.d.ts +0 -5
- package/script/src/mui/mod.d.ts.map +0 -1
- package/script/src/mui/mod.js +0 -20
- package/script/src/next/apiKeys/mod.d.ts +0 -71
- package/script/src/next/apiKeys/mod.d.ts.map +0 -1
- package/script/src/next/apiKeys/mod.js +0 -227
- package/script/src/next/auth/client.d.ts.map +0 -1
- package/script/src/next/auth/client.js +0 -39
- package/script/src/next/auth/config.d.ts +0 -62
- package/script/src/next/auth/config.d.ts.map +0 -1
- package/script/src/next/auth/config.js +0 -178
- package/script/src/next/auth/localTestLogin.d.ts +0 -75
- package/script/src/next/auth/localTestLogin.d.ts.map +0 -1
- package/script/src/next/auth/localTestLogin.js +0 -291
- package/script/src/next/auth/mod.d.ts +0 -4
- package/script/src/next/auth/mod.d.ts.map +0 -1
- package/script/src/next/auth/mod.js +0 -19
- package/script/src/next/auth/server.d.ts +0 -44
- package/script/src/next/auth/server.d.ts.map +0 -1
- package/script/src/next/auth/server.js +0 -39
- package/script/src/next/files/mod.d.ts +0 -3
- package/script/src/next/files/mod.d.ts.map +0 -1
- package/script/src/next/files/mod.js +0 -18
- package/script/src/next/files/route.d.ts +0 -99
- package/script/src/next/files/route.d.ts.map +0 -1
- package/script/src/next/files/route.js +0 -353
- package/script/src/next/jobs/list.d.ts +0 -25
- package/script/src/next/jobs/list.d.ts.map +0 -1
- package/script/src/next/jobs/list.js +0 -48
- package/script/src/next/jobs/mod.d.ts +0 -6
- package/script/src/next/jobs/mod.d.ts.map +0 -1
- package/script/src/next/jobs/mod.js +0 -21
- package/script/src/next/jobs/paths.d.ts +0 -14
- package/script/src/next/jobs/paths.d.ts.map +0 -1
- package/script/src/next/jobs/paths.js +0 -47
- package/script/src/next/jobs/route.d.ts +0 -48
- package/script/src/next/jobs/route.d.ts.map +0 -1
- package/script/src/next/jobs/route.js +0 -105
- package/script/src/next/jobs/run.d.ts +0 -58
- package/script/src/next/jobs/run.d.ts.map +0 -1
- package/script/src/next/jobs/run.js +0 -592
- package/script/src/next/jobs/runRequest.d.ts +0 -19
- package/script/src/next/jobs/runRequest.d.ts.map +0 -1
- package/script/src/next/jobs/runRequest.js +0 -81
- package/script/src/next/jobs/stream.d.ts +0 -3
- package/script/src/next/jobs/stream.d.ts.map +0 -1
- package/script/src/next/jobs/stream.js +0 -28
- package/script/src/next/mail/mod.d.ts +0 -3
- package/script/src/next/mail/mod.d.ts.map +0 -1
- package/script/src/next/mail/mod.js +0 -18
- package/script/src/next/mail/route.d.ts +0 -12
- package/script/src/next/mail/route.d.ts.map +0 -1
- package/script/src/next/mail/route.js +0 -46
- package/script/src/next/pwa/mod.d.ts +0 -112
- package/script/src/next/pwa/mod.d.ts.map +0 -1
- package/script/src/next/pwa/mod.js +0 -303
- package/script/src/next/pwa/worker.d.ts +0 -27
- package/script/src/next/pwa/worker.d.ts.map +0 -1
- package/script/src/next/pwa/worker.js +0 -33
- package/script/src/next/secrets/mod.d.ts +0 -108
- package/script/src/next/secrets/mod.d.ts.map +0 -1
- package/script/src/next/secrets/mod.js +0 -218
- package/script/src/secrets/encoding.d.ts +0 -32
- package/script/src/secrets/encoding.d.ts.map +0 -1
- package/script/src/secrets/encoding.js +0 -95
- package/script/src/secrets/errors.d.ts +0 -45
- package/script/src/secrets/errors.d.ts.map +0 -1
- package/script/src/secrets/errors.js +0 -45
- package/script/src/secrets/fingerprint.d.ts +0 -43
- package/script/src/secrets/fingerprint.d.ts.map +0 -1
- package/script/src/secrets/fingerprint.js +0 -92
- package/script/src/secrets/frame.d.ts +0 -34
- package/script/src/secrets/frame.d.ts.map +0 -1
- package/script/src/secrets/frame.js +0 -91
- package/script/src/secrets/keyring.d.ts +0 -62
- package/script/src/secrets/keyring.d.ts.map +0 -1
- package/script/src/secrets/keyring.js +0 -202
- package/script/src/secrets/legacy.d.ts +0 -60
- package/script/src/secrets/legacy.d.ts.map +0 -1
- package/script/src/secrets/legacy.js +0 -186
- package/script/src/secrets/maintenance.d.ts +0 -173
- package/script/src/secrets/maintenance.d.ts.map +0 -1
- package/script/src/secrets/maintenance.js +0 -323
- package/script/src/secrets/mod.d.ts +0 -6
- package/script/src/secrets/mod.d.ts.map +0 -1
- package/script/src/secrets/mod.js +0 -24
- package/script/src/secrets/secrets.d.ts +0 -192
- package/script/src/secrets/secrets.d.ts.map +0 -1
- package/script/src/secrets/secrets.js +0 -532
|
@@ -1,607 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseVercelReleaseTimeout = parseVercelReleaseTimeout;
|
|
4
|
-
exports.serializeVercelPulledEnvironment = serializeVercelPulledEnvironment;
|
|
5
|
-
exports.prepareVercelProjectRelease = prepareVercelProjectRelease;
|
|
6
|
-
exports.promoteVercelProjectRelease = promoteVercelProjectRelease;
|
|
7
|
-
const node_crypto_1 = require("node:crypto");
|
|
8
|
-
const node_fs_1 = require("node:fs");
|
|
9
|
-
const node_path_1 = require("node:path");
|
|
10
|
-
const vercelPulledEnv_js_1 = require("./vercelPulledEnv.js");
|
|
11
|
-
const API_ORIGIN = "https://api.vercel.com";
|
|
12
|
-
const FETCH_TIMEOUT_MS = 30_000;
|
|
13
|
-
const MAX_PROJECT_BYTES = 2 * 1024 * 1024;
|
|
14
|
-
const MAX_ENV_BYTES = 8 * 1024 * 1024;
|
|
15
|
-
const MAX_METADATA_BYTES = 8 * 1024 * 1024;
|
|
16
|
-
const ENV_PREFIX = "# Created by Vercel CLI\n";
|
|
17
|
-
const IGNORED_ENV_KEYS = new Set([
|
|
18
|
-
"VERCEL_ANALYTICS_ID",
|
|
19
|
-
"VERCEL_SPEED_INSIGHTS_ID",
|
|
20
|
-
"VERCEL_WEB_ANALYTICS_ID",
|
|
21
|
-
]);
|
|
22
|
-
/** Parse the bounded duration accepted by project-scoped promotion polling. */
|
|
23
|
-
function parseVercelReleaseTimeout(value) {
|
|
24
|
-
const match = value.match(/^(\d+)(ms|s|m)$/);
|
|
25
|
-
if (!match)
|
|
26
|
-
throw new Error("Vercel promotion timeout is invalid.");
|
|
27
|
-
const unit = match[2];
|
|
28
|
-
const multiplier = unit === "m" ? 60_000 : unit === "s" ? 1_000 : 1;
|
|
29
|
-
const milliseconds = Number(match[1]) * multiplier;
|
|
30
|
-
if (!Number.isSafeInteger(milliseconds) || milliseconds < 1_000 ||
|
|
31
|
-
milliseconds > 900_000) {
|
|
32
|
-
throw new Error("Vercel promotion timeout must be between 1s and 15m.");
|
|
33
|
-
}
|
|
34
|
-
return milliseconds;
|
|
35
|
-
}
|
|
36
|
-
function object(value) {
|
|
37
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
38
|
-
}
|
|
39
|
-
function requireReleaseIdentity(env) {
|
|
40
|
-
const token = env.VERCEL_TOKEN?.trim();
|
|
41
|
-
const orgId = env.VERCEL_ORG_ID?.trim();
|
|
42
|
-
const projectId = env.VERCEL_PROJECT_ID?.trim();
|
|
43
|
-
if (!token || !orgId || !projectId) {
|
|
44
|
-
throw new Error("VERCEL_TOKEN, VERCEL_ORG_ID, and VERCEL_PROJECT_ID are required.");
|
|
45
|
-
}
|
|
46
|
-
if (!/^team_[A-Za-z0-9]+$/.test(orgId)) {
|
|
47
|
-
throw new Error("VERCEL_ORG_ID is invalid.");
|
|
48
|
-
}
|
|
49
|
-
if (!/^prj_[A-Za-z0-9]+$/.test(projectId)) {
|
|
50
|
-
throw new Error("VERCEL_PROJECT_ID is invalid.");
|
|
51
|
-
}
|
|
52
|
-
return { orgId, projectId, token };
|
|
53
|
-
}
|
|
54
|
-
function query(path, values) {
|
|
55
|
-
const url = new URL(path, API_ORIGIN);
|
|
56
|
-
for (const [key, value] of Object.entries(values)) {
|
|
57
|
-
url.searchParams.set(key, value);
|
|
58
|
-
}
|
|
59
|
-
return url;
|
|
60
|
-
}
|
|
61
|
-
async function cancelQuietly(reader) {
|
|
62
|
-
try {
|
|
63
|
-
await Promise.race([
|
|
64
|
-
reader.cancel(),
|
|
65
|
-
new Promise((resolve) => setTimeout(resolve, 100)),
|
|
66
|
-
]);
|
|
67
|
-
}
|
|
68
|
-
catch {
|
|
69
|
-
// Cancellation is best effort after a bounded read has already failed.
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
async function readBoundedJson(response, maxBytes) {
|
|
73
|
-
const declared = response.headers.get("content-length");
|
|
74
|
-
if (declared !== null) {
|
|
75
|
-
const bytes = Number(declared);
|
|
76
|
-
if (!Number.isSafeInteger(bytes) || bytes < 0 || bytes > maxBytes) {
|
|
77
|
-
if (response.body)
|
|
78
|
-
void cancelQuietly(response.body.getReader());
|
|
79
|
-
throw new Error("Vercel returned an oversized response.");
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
if (!response.body)
|
|
83
|
-
throw new Error("Vercel returned an empty response.");
|
|
84
|
-
const reader = response.body.getReader();
|
|
85
|
-
const chunks = [];
|
|
86
|
-
let total = 0;
|
|
87
|
-
try {
|
|
88
|
-
while (true) {
|
|
89
|
-
const { done, value } = await reader.read();
|
|
90
|
-
if (done)
|
|
91
|
-
break;
|
|
92
|
-
total += value.byteLength;
|
|
93
|
-
if (total > maxBytes) {
|
|
94
|
-
void cancelQuietly(reader);
|
|
95
|
-
throw new Error("Vercel returned an oversized response.");
|
|
96
|
-
}
|
|
97
|
-
chunks.push(value);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
catch (error) {
|
|
101
|
-
void cancelQuietly(reader);
|
|
102
|
-
if (error instanceof Error && error.message.includes("oversized")) {
|
|
103
|
-
throw error;
|
|
104
|
-
}
|
|
105
|
-
throw new Error("Vercel response could not be read.");
|
|
106
|
-
}
|
|
107
|
-
const bytes = new Uint8Array(total);
|
|
108
|
-
let offset = 0;
|
|
109
|
-
for (const chunk of chunks) {
|
|
110
|
-
bytes.set(chunk, offset);
|
|
111
|
-
offset += chunk.byteLength;
|
|
112
|
-
}
|
|
113
|
-
let text;
|
|
114
|
-
try {
|
|
115
|
-
text = new TextDecoder("utf-8", { fatal: true }).decode(bytes);
|
|
116
|
-
}
|
|
117
|
-
catch {
|
|
118
|
-
throw new Error("Vercel returned invalid UTF-8.");
|
|
119
|
-
}
|
|
120
|
-
try {
|
|
121
|
-
return JSON.parse(text);
|
|
122
|
-
}
|
|
123
|
-
catch {
|
|
124
|
-
throw new Error("Vercel returned invalid JSON.");
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
async function fetchJson(identity, url, options) {
|
|
128
|
-
const controller = new AbortController();
|
|
129
|
-
const timer = setTimeout(() => controller.abort(), options.timeoutMs);
|
|
130
|
-
let response;
|
|
131
|
-
try {
|
|
132
|
-
response = await options.fetchImpl(url, {
|
|
133
|
-
body: options.body,
|
|
134
|
-
headers: {
|
|
135
|
-
authorization: `Bearer ${identity.token}`,
|
|
136
|
-
...(options.body === undefined
|
|
137
|
-
? {}
|
|
138
|
-
: { "content-type": "application/json" }),
|
|
139
|
-
},
|
|
140
|
-
method: options.method ?? "GET",
|
|
141
|
-
redirect: "error",
|
|
142
|
-
signal: controller.signal,
|
|
143
|
-
});
|
|
144
|
-
if (!response.ok) {
|
|
145
|
-
if (response.body)
|
|
146
|
-
void cancelQuietly(response.body.getReader());
|
|
147
|
-
throw new Error(`Vercel request failed with HTTP ${response.status}.`);
|
|
148
|
-
}
|
|
149
|
-
return await readBoundedJson(response, options.maxBytes);
|
|
150
|
-
}
|
|
151
|
-
catch (error) {
|
|
152
|
-
if (error instanceof Error && error.message.startsWith("Vercel ")) {
|
|
153
|
-
throw error;
|
|
154
|
-
}
|
|
155
|
-
throw new Error("Vercel request did not complete.");
|
|
156
|
-
}
|
|
157
|
-
finally {
|
|
158
|
-
clearTimeout(timer);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
function requireStringMap(value, label) {
|
|
162
|
-
if (!object(value))
|
|
163
|
-
throw new Error(`${label} is invalid.`);
|
|
164
|
-
const result = Object.create(null);
|
|
165
|
-
for (const [key, item] of Object.entries(value)) {
|
|
166
|
-
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(key) || typeof item !== "string") {
|
|
167
|
-
throw new Error(`${label} is invalid.`);
|
|
168
|
-
}
|
|
169
|
-
result[key] = item;
|
|
170
|
-
}
|
|
171
|
-
return result;
|
|
172
|
-
}
|
|
173
|
-
function escapeLikeVercelCli(value) {
|
|
174
|
-
return value.replaceAll("\n", "\\n").replaceAll("\r", "\\r");
|
|
175
|
-
}
|
|
176
|
-
/** Serialize a pulled Vercel env map without changing its parsed values. */
|
|
177
|
-
function serializeVercelPulledEnvironment(records) {
|
|
178
|
-
const included = Object.keys(records).sort().filter((key) => !IGNORED_ENV_KEYS.has(key));
|
|
179
|
-
if (included.some((key) => records[key].includes("$") || records[key].includes('"') ||
|
|
180
|
-
records[key].includes("\0") || records[key].includes("\r") ||
|
|
181
|
-
records[key].includes("\\n") || records[key].includes("\\r"))) {
|
|
182
|
-
throw new Error("Vercel environment contains a value that the release dotenv format would change.");
|
|
183
|
-
}
|
|
184
|
-
const source = ENV_PREFIX +
|
|
185
|
-
included.map((key) => `${key}="${escapeLikeVercelCli(records[key])}"`).join("\n") + "\n";
|
|
186
|
-
let roundTrip;
|
|
187
|
-
try {
|
|
188
|
-
roundTrip = (0, vercelPulledEnv_js_1.parsePulledEnv)(source).values;
|
|
189
|
-
}
|
|
190
|
-
catch {
|
|
191
|
-
throw new Error("Vercel environment could not be represented safely.");
|
|
192
|
-
}
|
|
193
|
-
for (const key of included) {
|
|
194
|
-
if (roundTrip[key] !== records[key]) {
|
|
195
|
-
throw new Error(`Vercel environment value for ${key} cannot be represented safely.`);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
if (Object.keys(roundTrip).length !== included.length) {
|
|
199
|
-
throw new Error("Vercel environment could not be represented safely.");
|
|
200
|
-
}
|
|
201
|
-
return source;
|
|
202
|
-
}
|
|
203
|
-
function optionalStringOrNull(value, label) {
|
|
204
|
-
if (value === undefined || value === null || typeof value === "string") {
|
|
205
|
-
return value;
|
|
206
|
-
}
|
|
207
|
-
throw new Error(`Vercel project ${label} is invalid.`);
|
|
208
|
-
}
|
|
209
|
-
function projectFileFromResponse(value, identity) {
|
|
210
|
-
if (!object(value))
|
|
211
|
-
throw new Error("Vercel project response is invalid.");
|
|
212
|
-
if (value.id !== identity.projectId || value.accountId !== identity.orgId) {
|
|
213
|
-
throw new Error("Vercel project identity does not match release config.");
|
|
214
|
-
}
|
|
215
|
-
if (typeof value.name !== "string" || !value.name) {
|
|
216
|
-
throw new Error("Vercel project name is invalid.");
|
|
217
|
-
}
|
|
218
|
-
let analyticsId;
|
|
219
|
-
if (object(value.analytics) && typeof value.analytics.id === "string") {
|
|
220
|
-
const disabledAt = value.analytics.disabledAt;
|
|
221
|
-
const enabledAt = value.analytics.enabledAt;
|
|
222
|
-
if (disabledAt === undefined || disabledAt === null ||
|
|
223
|
-
(typeof enabledAt === "number" && typeof disabledAt === "number" &&
|
|
224
|
-
enabledAt > disabledAt))
|
|
225
|
-
analyticsId = value.analytics.id;
|
|
226
|
-
}
|
|
227
|
-
const settings = {};
|
|
228
|
-
if (value.createdAt !== undefined) {
|
|
229
|
-
if (typeof value.createdAt !== "number" || !Number.isFinite(value.createdAt)) {
|
|
230
|
-
throw new Error("Vercel project createdAt is invalid.");
|
|
231
|
-
}
|
|
232
|
-
settings.createdAt = value.createdAt;
|
|
233
|
-
}
|
|
234
|
-
for (const key of [
|
|
235
|
-
"framework",
|
|
236
|
-
"devCommand",
|
|
237
|
-
"installCommand",
|
|
238
|
-
"buildCommand",
|
|
239
|
-
"outputDirectory",
|
|
240
|
-
"rootDirectory",
|
|
241
|
-
"nodeVersion",
|
|
242
|
-
]) {
|
|
243
|
-
const item = optionalStringOrNull(value[key], key);
|
|
244
|
-
if (item !== undefined)
|
|
245
|
-
settings[key] = item;
|
|
246
|
-
}
|
|
247
|
-
if (value.directoryListing !== undefined) {
|
|
248
|
-
if (typeof value.directoryListing !== "boolean") {
|
|
249
|
-
throw new Error("Vercel project directoryListing is invalid.");
|
|
250
|
-
}
|
|
251
|
-
settings.directoryListing = value.directoryListing;
|
|
252
|
-
}
|
|
253
|
-
if (analyticsId !== undefined)
|
|
254
|
-
settings.analyticsId = analyticsId;
|
|
255
|
-
return {
|
|
256
|
-
orgId: identity.orgId,
|
|
257
|
-
projectId: identity.projectId,
|
|
258
|
-
projectName: value.name,
|
|
259
|
-
settings,
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
function normalizeMetadata(value) {
|
|
263
|
-
if (!object(value) || !Array.isArray(value.envs)) {
|
|
264
|
-
throw new Error("Vercel environment metadata is invalid.");
|
|
265
|
-
}
|
|
266
|
-
if (value.pagination !== undefined && !object(value.pagination)) {
|
|
267
|
-
throw new Error("Vercel environment metadata pagination is invalid.");
|
|
268
|
-
}
|
|
269
|
-
if (object(value.pagination) &&
|
|
270
|
-
(value.pagination.next !== undefined && value.pagination.next !== null)) {
|
|
271
|
-
throw new Error("Vercel environment metadata pagination is incomplete.");
|
|
272
|
-
}
|
|
273
|
-
const envs = value.envs.map((item) => {
|
|
274
|
-
if (!object(item) || typeof item.key !== "string" ||
|
|
275
|
-
!/^[A-Za-z_][A-Za-z0-9_]*$/.test(item.key) ||
|
|
276
|
-
typeof item.type !== "string")
|
|
277
|
-
throw new Error("Vercel environment metadata is invalid.");
|
|
278
|
-
const targets = Array.isArray(item.target)
|
|
279
|
-
? [...item.target]
|
|
280
|
-
: [item.target];
|
|
281
|
-
if (targets.length === 0 ||
|
|
282
|
-
targets.some((target) => typeof target !== "string"))
|
|
283
|
-
throw new Error("Vercel environment metadata is invalid.");
|
|
284
|
-
if (typeof item.id !== "string" || !item.id) {
|
|
285
|
-
throw new Error("Vercel environment metadata is invalid.");
|
|
286
|
-
}
|
|
287
|
-
if (!targets.includes("production")) {
|
|
288
|
-
throw new Error("Vercel environment metadata target is invalid.");
|
|
289
|
-
}
|
|
290
|
-
targets.sort();
|
|
291
|
-
const normalized = {
|
|
292
|
-
id: item.id,
|
|
293
|
-
key: item.key,
|
|
294
|
-
target: targets,
|
|
295
|
-
type: item.type,
|
|
296
|
-
};
|
|
297
|
-
if (item.createdAt !== undefined) {
|
|
298
|
-
if (typeof item.createdAt !== "number" || !Number.isFinite(item.createdAt)) {
|
|
299
|
-
throw new Error("Vercel environment metadata is invalid.");
|
|
300
|
-
}
|
|
301
|
-
normalized.createdAt = item.createdAt;
|
|
302
|
-
}
|
|
303
|
-
if (item.updatedAt !== undefined) {
|
|
304
|
-
if (typeof item.updatedAt !== "number" || !Number.isFinite(item.updatedAt)) {
|
|
305
|
-
throw new Error("Vercel environment metadata is invalid.");
|
|
306
|
-
}
|
|
307
|
-
normalized.updatedAt = item.updatedAt;
|
|
308
|
-
}
|
|
309
|
-
if (item.gitBranch !== undefined) {
|
|
310
|
-
if (typeof item.gitBranch !== "string" && item.gitBranch !== null) {
|
|
311
|
-
throw new Error("Vercel environment metadata is invalid.");
|
|
312
|
-
}
|
|
313
|
-
normalized.gitBranch = item.gitBranch;
|
|
314
|
-
}
|
|
315
|
-
if (item.customEnvironmentIds !== undefined) {
|
|
316
|
-
if (!Array.isArray(item.customEnvironmentIds) ||
|
|
317
|
-
item.customEnvironmentIds.some((id) => typeof id !== "string")) {
|
|
318
|
-
throw new Error("Vercel environment metadata is invalid.");
|
|
319
|
-
}
|
|
320
|
-
normalized.customEnvironmentIds = [...item.customEnvironmentIds].sort();
|
|
321
|
-
}
|
|
322
|
-
return normalized;
|
|
323
|
-
}).sort((left, right) => JSON.stringify(left).localeCompare(JSON.stringify(right)));
|
|
324
|
-
return { envs };
|
|
325
|
-
}
|
|
326
|
-
function withSensitiveSentinels(records, metadata) {
|
|
327
|
-
const result = Object.assign(Object.create(null), records);
|
|
328
|
-
const sensitiveKeys = new Set(metadata.envs.flatMap((entry) => entry.type === "sensitive" && typeof entry.key === "string"
|
|
329
|
-
? [entry.key]
|
|
330
|
-
: []));
|
|
331
|
-
for (const key of sensitiveKeys) {
|
|
332
|
-
if (key in result && !result[key])
|
|
333
|
-
result[key] = "[SENSITIVE]";
|
|
334
|
-
}
|
|
335
|
-
return result;
|
|
336
|
-
}
|
|
337
|
-
function assertReplaceable(path) {
|
|
338
|
-
try {
|
|
339
|
-
const stat = (0, node_fs_1.lstatSync)(path);
|
|
340
|
-
if (!stat.isFile() || stat.isSymbolicLink()) {
|
|
341
|
-
throw new Error(`Refusing to replace non-file output: ${path}`);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
catch (error) {
|
|
345
|
-
if (error.code !== "ENOENT")
|
|
346
|
-
throw error;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
function stageFile(path, contents) {
|
|
350
|
-
(0, node_fs_1.mkdirSync)((0, node_path_1.dirname)(path), { recursive: true, mode: 0o700 });
|
|
351
|
-
assertReplaceable(path);
|
|
352
|
-
const temporary = `${path}.loom-${(0, node_crypto_1.randomBytes)(12).toString("hex")}.tmp`;
|
|
353
|
-
const fd = (0, node_fs_1.openSync)(temporary, "wx", 0o600);
|
|
354
|
-
try {
|
|
355
|
-
(0, node_fs_1.writeFileSync)(fd, contents, "utf8");
|
|
356
|
-
(0, node_fs_1.fsyncSync)(fd);
|
|
357
|
-
}
|
|
358
|
-
catch (error) {
|
|
359
|
-
(0, node_fs_1.closeSync)(fd);
|
|
360
|
-
(0, node_fs_1.unlinkSync)(temporary);
|
|
361
|
-
throw error;
|
|
362
|
-
}
|
|
363
|
-
(0, node_fs_1.closeSync)(fd);
|
|
364
|
-
return temporary;
|
|
365
|
-
}
|
|
366
|
-
function publishStaged(path, temporary) {
|
|
367
|
-
(0, node_fs_1.renameSync)(temporary, path);
|
|
368
|
-
(0, node_fs_1.chmodSync)(path, 0o600);
|
|
369
|
-
const parent = (0, node_fs_1.openSync)((0, node_path_1.dirname)(path), "r");
|
|
370
|
-
try {
|
|
371
|
-
(0, node_fs_1.fsyncSync)(parent);
|
|
372
|
-
}
|
|
373
|
-
finally {
|
|
374
|
-
(0, node_fs_1.closeSync)(parent);
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
/** Materialize private Production release inputs through project-bound APIs. */
|
|
378
|
-
async function prepareVercelProjectRelease(options, io = { out: (line) => console.log(line) }) {
|
|
379
|
-
const identity = requireReleaseIdentity(options.env);
|
|
380
|
-
const fetchImpl = options.fetchImpl ?? fetch;
|
|
381
|
-
const timeoutMs = options.timeoutMs ?? FETCH_TIMEOUT_MS;
|
|
382
|
-
const common = { teamId: identity.orgId };
|
|
383
|
-
const [projectResponse, metadataBeforeResponse] = await Promise.all([
|
|
384
|
-
fetchJson(identity, query(`/v9/projects/${encodeURIComponent(identity.projectId)}`, common), { fetchImpl, maxBytes: MAX_PROJECT_BYTES, timeoutMs }),
|
|
385
|
-
fetchJson(identity, query(`/v10/projects/${encodeURIComponent(identity.projectId)}/env`, {
|
|
386
|
-
target: "production",
|
|
387
|
-
source: "vercel-cli:pull",
|
|
388
|
-
decrypt: "false",
|
|
389
|
-
...common,
|
|
390
|
-
}), { fetchImpl, maxBytes: MAX_METADATA_BYTES, timeoutMs }),
|
|
391
|
-
]);
|
|
392
|
-
const pullResponse = await fetchJson(identity, query(`/v3/env/pull/${encodeURIComponent(identity.projectId)}/production`, { source: "vercel-cli:pull", ...common }), { fetchImpl, maxBytes: MAX_ENV_BYTES, timeoutMs });
|
|
393
|
-
const metadataAfterResponse = await fetchJson(identity, query(`/v10/projects/${encodeURIComponent(identity.projectId)}/env`, {
|
|
394
|
-
target: "production",
|
|
395
|
-
source: "vercel-cli:pull",
|
|
396
|
-
decrypt: "false",
|
|
397
|
-
...common,
|
|
398
|
-
}), { fetchImpl, maxBytes: MAX_METADATA_BYTES, timeoutMs });
|
|
399
|
-
const projectFile = projectFileFromResponse(projectResponse, identity);
|
|
400
|
-
if (!object(pullResponse)) {
|
|
401
|
-
throw new Error("Vercel pulled environment is invalid.");
|
|
402
|
-
}
|
|
403
|
-
const pulledRecords = requireStringMap(pullResponse.env, "Vercel pulled environment");
|
|
404
|
-
if (pullResponse.buildEnv !== undefined) {
|
|
405
|
-
requireStringMap(pullResponse.buildEnv, "Vercel pulled build environment");
|
|
406
|
-
}
|
|
407
|
-
const metadata = normalizeMetadata(metadataBeforeResponse);
|
|
408
|
-
const metadataAfter = normalizeMetadata(metadataAfterResponse);
|
|
409
|
-
if (JSON.stringify(metadata) !== JSON.stringify(metadataAfter)) {
|
|
410
|
-
throw new Error("Vercel environment metadata changed during the pull.");
|
|
411
|
-
}
|
|
412
|
-
const records = withSensitiveSentinels(pulledRecords, metadata);
|
|
413
|
-
const envSource = serializeVercelPulledEnvironment(records);
|
|
414
|
-
const outputs = [
|
|
415
|
-
[(0, node_path_1.resolve)(options.metadataFile), JSON.stringify(metadata, null, 2) + "\n"],
|
|
416
|
-
[(0, node_path_1.resolve)(options.envFile), envSource],
|
|
417
|
-
[(0, node_path_1.resolve)(options.projectFile), JSON.stringify(projectFile, null, 2) + "\n"],
|
|
418
|
-
];
|
|
419
|
-
if (new Set(outputs.map(([path]) => path)).size !== outputs.length) {
|
|
420
|
-
throw new Error("Vercel release output paths must be distinct.");
|
|
421
|
-
}
|
|
422
|
-
const staged = [];
|
|
423
|
-
try {
|
|
424
|
-
for (const [path, contents] of outputs) {
|
|
425
|
-
staged.push({ path, temporary: stageFile(path, contents) });
|
|
426
|
-
}
|
|
427
|
-
for (const output of staged)
|
|
428
|
-
publishStaged(output.path, output.temporary);
|
|
429
|
-
}
|
|
430
|
-
catch (error) {
|
|
431
|
-
for (const output of staged) {
|
|
432
|
-
try {
|
|
433
|
-
(0, node_fs_1.unlinkSync)(output.temporary);
|
|
434
|
-
}
|
|
435
|
-
catch {
|
|
436
|
-
// Ignore cleanup after a failed or already-published staged file.
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
throw error;
|
|
440
|
-
}
|
|
441
|
-
io.out(`Prepared Vercel Production project settings, ${Object.keys(records).length} pulled variables, and ${metadata.envs.length} metadata records.`);
|
|
442
|
-
return {
|
|
443
|
-
metadataCount: metadata.envs.length,
|
|
444
|
-
projectId: identity.projectId,
|
|
445
|
-
pulledCount: Object.keys(records).length,
|
|
446
|
-
};
|
|
447
|
-
}
|
|
448
|
-
function deploymentFromResponse(value, identity, deploymentId) {
|
|
449
|
-
if (!object(value))
|
|
450
|
-
throw new Error("Vercel deployment response is invalid.");
|
|
451
|
-
if (value.id !== deploymentId || value.projectId !== identity.projectId ||
|
|
452
|
-
value.ownerId !== identity.orgId || value.target !== "production" ||
|
|
453
|
-
value.readyState !== "READY") {
|
|
454
|
-
throw new Error("Vercel deployment is not a READY Production deployment for the configured project.");
|
|
455
|
-
}
|
|
456
|
-
return { id: value.id };
|
|
457
|
-
}
|
|
458
|
-
function promotionState(value, deploymentId) {
|
|
459
|
-
if (!object(value))
|
|
460
|
-
throw new Error("Vercel project response is invalid.");
|
|
461
|
-
if (value.rollingRelease) {
|
|
462
|
-
throw new Error("Rolling Release promotion is not supported by this command.");
|
|
463
|
-
}
|
|
464
|
-
const request = value.lastAliasRequest;
|
|
465
|
-
if (!object(request) || request.toDeploymentId !== deploymentId) {
|
|
466
|
-
return { state: "absent" };
|
|
467
|
-
}
|
|
468
|
-
if (request.type !== "promote") {
|
|
469
|
-
return { state: "absent" };
|
|
470
|
-
}
|
|
471
|
-
if (typeof request.requestedAt !== "number" ||
|
|
472
|
-
!Number.isFinite(request.requestedAt))
|
|
473
|
-
return { state: "absent" };
|
|
474
|
-
const jobStatus = request.jobStatus;
|
|
475
|
-
if (jobStatus === "succeeded") {
|
|
476
|
-
return { requestedAt: request.requestedAt, state: "succeeded" };
|
|
477
|
-
}
|
|
478
|
-
if (jobStatus === "failed" || jobStatus === "skipped") {
|
|
479
|
-
return { requestedAt: request.requestedAt, state: "failed" };
|
|
480
|
-
}
|
|
481
|
-
if (jobStatus === "pending" || jobStatus === "in-progress") {
|
|
482
|
-
return { requestedAt: request.requestedAt, state: "pending" };
|
|
483
|
-
}
|
|
484
|
-
return { state: "absent" };
|
|
485
|
-
}
|
|
486
|
-
function currentProductionDeploymentId(value) {
|
|
487
|
-
if (!object(value) || !object(value.targets))
|
|
488
|
-
return null;
|
|
489
|
-
const production = value.targets.production;
|
|
490
|
-
return object(production) && typeof production.id === "string"
|
|
491
|
-
? production.id
|
|
492
|
-
: null;
|
|
493
|
-
}
|
|
494
|
-
async function requestPromotion(identity, deploymentId, fetchImpl, timeoutMs) {
|
|
495
|
-
const controller = new AbortController();
|
|
496
|
-
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
497
|
-
try {
|
|
498
|
-
const response = await fetchImpl(query(`/v10/projects/${encodeURIComponent(identity.projectId)}/promote/${encodeURIComponent(deploymentId)}`, { teamId: identity.orgId }), {
|
|
499
|
-
body: "{}",
|
|
500
|
-
headers: {
|
|
501
|
-
authorization: `Bearer ${identity.token}`,
|
|
502
|
-
"content-type": "application/json",
|
|
503
|
-
},
|
|
504
|
-
method: "POST",
|
|
505
|
-
redirect: "error",
|
|
506
|
-
signal: controller.signal,
|
|
507
|
-
});
|
|
508
|
-
if (response.body)
|
|
509
|
-
void cancelQuietly(response.body.getReader());
|
|
510
|
-
if (response.status >= 400 && response.status < 500) {
|
|
511
|
-
throw new PromotionRejectedError(response.status);
|
|
512
|
-
}
|
|
513
|
-
if (response.status !== 201 && response.status !== 202) {
|
|
514
|
-
throw new Error("Vercel promotion request had an uncertain result.");
|
|
515
|
-
}
|
|
516
|
-
return response.status;
|
|
517
|
-
}
|
|
518
|
-
finally {
|
|
519
|
-
clearTimeout(timer);
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
class PromotionRejectedError extends Error {
|
|
523
|
-
constructor(status) {
|
|
524
|
-
super(`Vercel promotion was rejected with HTTP ${status}.`);
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
/** Promote one exact deployment and require matching terminal provider state. */
|
|
528
|
-
async function promoteVercelProjectRelease(options, io = { out: (line) => console.log(line) }) {
|
|
529
|
-
const identity = requireReleaseIdentity(options.env);
|
|
530
|
-
if (!/^dpl_[A-Za-z0-9]+$/.test(options.deploymentId)) {
|
|
531
|
-
throw new Error("Deployment ID is invalid.");
|
|
532
|
-
}
|
|
533
|
-
const fetchImpl = options.fetchImpl ?? fetch;
|
|
534
|
-
const timeoutMs = options.timeoutMs ?? 180_000;
|
|
535
|
-
const pollIntervalMs = options.pollIntervalMs ?? 500;
|
|
536
|
-
const now = options.now ?? Date.now;
|
|
537
|
-
const sleep = options.sleep ??
|
|
538
|
-
((milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds)));
|
|
539
|
-
const requestTimeoutMs = Math.min(FETCH_TIMEOUT_MS, timeoutMs);
|
|
540
|
-
const teamId = identity.orgId;
|
|
541
|
-
// Vercel exposes promotion operation state through this rollback projection.
|
|
542
|
-
const projectUrl = query(`/v9/projects/${encodeURIComponent(identity.projectId)}`, { rollbackInfo: "true", teamId });
|
|
543
|
-
const deployment = deploymentFromResponse(await fetchJson(identity, query(`/v13/deployments/${encodeURIComponent(options.deploymentId)}`, {
|
|
544
|
-
teamId,
|
|
545
|
-
}), { fetchImpl, maxBytes: MAX_PROJECT_BYTES, timeoutMs: requestTimeoutMs }), identity, options.deploymentId);
|
|
546
|
-
const initialProject = await fetchJson(identity, projectUrl, {
|
|
547
|
-
fetchImpl,
|
|
548
|
-
maxBytes: MAX_PROJECT_BYTES,
|
|
549
|
-
timeoutMs: requestTimeoutMs,
|
|
550
|
-
});
|
|
551
|
-
projectFileFromResponse(initialProject, identity);
|
|
552
|
-
const initialState = promotionState(initialProject, deployment.id);
|
|
553
|
-
if (initialState.state === "succeeded") {
|
|
554
|
-
if (currentProductionDeploymentId(initialProject) !== deployment.id) {
|
|
555
|
-
throw new Error("The prior promotion succeeded, but Production no longer points to this deployment.");
|
|
556
|
-
}
|
|
557
|
-
io.out("Verified that the Production deployment is already promoted.");
|
|
558
|
-
return { replayed: true, status: "succeeded" };
|
|
559
|
-
}
|
|
560
|
-
if (initialState.state === "failed") {
|
|
561
|
-
throw new Error("A previous promotion of this deployment failed.");
|
|
562
|
-
}
|
|
563
|
-
const resumePending = initialState.state === "pending";
|
|
564
|
-
const providerBaseline = initialState.state === "absent"
|
|
565
|
-
? undefined
|
|
566
|
-
: initialState.requestedAt;
|
|
567
|
-
let requestUncertain = false;
|
|
568
|
-
if (!resumePending) {
|
|
569
|
-
try {
|
|
570
|
-
await requestPromotion(identity, deployment.id, fetchImpl, requestTimeoutMs);
|
|
571
|
-
}
|
|
572
|
-
catch (error) {
|
|
573
|
-
if (error instanceof PromotionRejectedError)
|
|
574
|
-
throw error;
|
|
575
|
-
requestUncertain = true;
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
const deadline = now() + timeoutMs;
|
|
579
|
-
let delay = pollIntervalMs;
|
|
580
|
-
while (now() < deadline) {
|
|
581
|
-
const project = await fetchJson(identity, projectUrl, {
|
|
582
|
-
fetchImpl,
|
|
583
|
-
maxBytes: MAX_PROJECT_BYTES,
|
|
584
|
-
timeoutMs: Math.min(requestTimeoutMs, Math.max(1, deadline - now())),
|
|
585
|
-
});
|
|
586
|
-
projectFileFromResponse(project, identity);
|
|
587
|
-
const state = promotionState(project, deployment.id);
|
|
588
|
-
const isCurrentRequest = state.state !== "absent" &&
|
|
589
|
-
(resumePending
|
|
590
|
-
? state.requestedAt === providerBaseline
|
|
591
|
-
: providerBaseline === undefined ||
|
|
592
|
-
state.requestedAt > providerBaseline);
|
|
593
|
-
if (isCurrentRequest && state.state === "succeeded" &&
|
|
594
|
-
currentProductionDeploymentId(project) === deployment.id) {
|
|
595
|
-
io.out("Verified terminal success for the Vercel Production promotion.");
|
|
596
|
-
return { replayed: resumePending, status: "succeeded" };
|
|
597
|
-
}
|
|
598
|
-
if (isCurrentRequest && state.state === "failed") {
|
|
599
|
-
throw new Error("Vercel Production promotion failed.");
|
|
600
|
-
}
|
|
601
|
-
await sleep(Math.min(delay, Math.max(1, deadline - now())));
|
|
602
|
-
delay = Math.min(2_000, Math.ceil(delay * 1.5));
|
|
603
|
-
}
|
|
604
|
-
throw new Error(requestUncertain
|
|
605
|
-
? "Vercel promotion request was uncertain and no terminal result was observed."
|
|
606
|
-
: "Vercel promotion did not reach a terminal result before the timeout.");
|
|
607
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/** One assignment read from a dotenv file, in file order. */
|
|
2
|
-
export type PulledEnvEntry = {
|
|
3
|
-
/**
|
|
4
|
-
* The on-disk text up to the last `"` on the line, when a dotenv-style early
|
|
5
|
-
* close (see {@link parsePulledEnv}) ended {@link raw} sooner. A Vercel value
|
|
6
|
-
* can itself contain `" #`, so masking registers this form too.
|
|
7
|
-
*/
|
|
8
|
-
alternateRaw?: string;
|
|
9
|
-
/** 1-based line on which the assignment ends (later for multi-line). */
|
|
10
|
-
endLine: number;
|
|
11
|
-
key: string;
|
|
12
|
-
/** 1-based line on which the assignment starts. */
|
|
13
|
-
line: number;
|
|
14
|
-
/**
|
|
15
|
-
* The value as written on disk between its quotes (or the trimmed unquoted
|
|
16
|
-
* text), before `\n`/`\r` escapes are decoded.
|
|
17
|
-
*/
|
|
18
|
-
raw: string;
|
|
19
|
-
/** The decoded value (see {@link parsePulledEnv} for how it is chosen). */
|
|
20
|
-
value: string;
|
|
21
|
-
};
|
|
22
|
-
/** A parsed dotenv file. */
|
|
23
|
-
export type PulledEnvFile = {
|
|
24
|
-
entries: PulledEnvEntry[];
|
|
25
|
-
/** 1-based lines that are neither blank, a comment, nor an assignment. */
|
|
26
|
-
unrecognizedLines: number[];
|
|
27
|
-
/** Final value per key; a later assignment wins, as in dotenv. */
|
|
28
|
-
values: Record<string, string>;
|
|
29
|
-
};
|
|
30
|
-
/** Decodes the `\n` and `\r` escapes `vercel pull` writes in quoted values. */
|
|
31
|
-
export declare function decodePulledEnvEscapes(raw: string): string;
|
|
32
|
-
/**
|
|
33
|
-
* Parses dotenv text so that masking and placeholder checks see the value
|
|
34
|
-
* Vercel stored.
|
|
35
|
-
*
|
|
36
|
-
* `vercel pull` writes every variable as `KEY="<value>"`, escaping only newline
|
|
37
|
-
* and carriage return (as `\n` and `\r`) and writing `"`, `\`, `#`, `$`, U+2028
|
|
38
|
-
* and U+2029 as they are. No consumer reads that format back exactly:
|
|
39
|
-
*
|
|
40
|
-
* - Node's `util.parseEnv` ends the value at its first embedded `"`, so
|
|
41
|
-
* `KEY="{"a":1}"` reads as `{`.
|
|
42
|
-
* - `vercel build` loads the file with its bundled dotenv 4.0.0, which trims
|
|
43
|
-
* inside the quotes, decodes `\n` but not `\r`, does not treat `#` specially,
|
|
44
|
-
* and drops any line containing U+2028 or U+2029.
|
|
45
|
-
* - Next.js (`@next/env`) uses dotenv 16, which cuts a value containing both
|
|
46
|
-
* `"` and `#` (`KEY="a"b#c"` reads as `"a"b`), and then expands `$VAR`.
|
|
47
|
-
*
|
|
48
|
-
* This reader is deliberately closer to the stored value than any of them,
|
|
49
|
-
* because masking has to cover the secret itself: a double-quoted value that
|
|
50
|
-
* closes on its line runs to the last `"` (or an earlier `"` followed only by a
|
|
51
|
-
* comment, see {@link PulledEnvEntry.alternateRaw}), nothing is trimmed inside
|
|
52
|
-
* the quotes, `#` and `$` are literal, and only `\n` and `\r` are decoded.
|
|
53
|
-
* Everything else follows dotenv 16: unquoted values end at `#` and are
|
|
54
|
-
* trimmed, single- and backtick-quoted values are literal, and quoted values
|
|
55
|
-
* may span lines.
|
|
56
|
-
*/
|
|
57
|
-
export declare function parsePulledEnv(source: string): PulledEnvFile;
|
|
58
|
-
/** Decodes UTF-8, throwing on invalid bytes instead of replacing them. */
|
|
59
|
-
export declare function decodePulledEnvBytes(bytes: Uint8Array): any;
|
|
60
|
-
/**
|
|
61
|
-
* Reads and parses a dotenv file with {@link parsePulledEnv}. Throws on bytes
|
|
62
|
-
* that are not UTF-8 rather than silently replacing them.
|
|
63
|
-
*/
|
|
64
|
-
export declare function readPulledEnvFile(path: string): PulledEnvFile;
|
|
65
|
-
//# sourceMappingURL=vercelPulledEnv.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vercelPulledEnv.d.ts","sourceRoot":"","sources":["../../../src/src/cli/vercelPulledEnv.ts"],"names":[],"mappings":"AAEA,6DAA6D;AAC7D,MAAM,MAAM,cAAc,GAAG;IAC3B;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,4BAA4B;AAC5B,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,0EAA0E;IAC1E,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,kEAAkE;IAClE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC,CAAC;AAMF,+EAA+E;AAC/E,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,UAEjD;AAqBD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CA0E5D;AAED,0EAA0E;AAC1E,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,UAAU,OAErD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAE7D"}
|