@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"releaseTrustCommand.d.ts","sourceRoot":"","sources":["../../../src/src/cli/releaseTrustCommand.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAU9C,kFAAkF;AAClF,MAAM,WAAW,gCAAgC;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,aAAa,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACxC,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAgBD;;;;;GAKG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,EAClC,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,MAAM,EAAE,CAAC,CA4JnB"}
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.runGithubReleaseTrustCommand = runGithubReleaseTrustCommand;
|
|
4
|
-
const promises_1 = require("node:fs/promises");
|
|
5
|
-
const node_path_1 = require("node:path");
|
|
6
|
-
const releaseConfig_js_1 = require("./releaseConfig.js");
|
|
7
|
-
const releaseTrust_js_1 = require("./releaseTrust.js");
|
|
8
|
-
function object(value) {
|
|
9
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
10
|
-
}
|
|
11
|
-
function json(text, description) {
|
|
12
|
-
try {
|
|
13
|
-
const value = JSON.parse(text);
|
|
14
|
-
if (object(value))
|
|
15
|
-
return value;
|
|
16
|
-
}
|
|
17
|
-
catch {
|
|
18
|
-
// Provider stdout can contain credentials; never reproduce it in an error.
|
|
19
|
-
}
|
|
20
|
-
throw new Error(`Invalid ${description} JSON.`);
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Plan, apply, or verify one reviewed GitHub production HTTP trust rule.
|
|
24
|
-
* Planning only reads providers and writes an exclusive local proposal file.
|
|
25
|
-
* Apply checks current state twice, requires the reviewed proposal digest, and
|
|
26
|
-
* verifies the exact resulting provider state. It never creates a deploy token.
|
|
27
|
-
*/
|
|
28
|
-
async function runGithubReleaseTrustCommand(action, args, options) {
|
|
29
|
-
const requiredCount = action === "plan" || action === "apply" ? 2 : 1;
|
|
30
|
-
if (args.length !== requiredCount) {
|
|
31
|
-
throw new Error(action === "plan"
|
|
32
|
-
? "Usage: loom db release trust-plan <workflow-path> <plan-file> [--environment <name>]"
|
|
33
|
-
: action === "apply"
|
|
34
|
-
? "Usage: loom db release trust-apply <plan-file> <reviewed-plan-sha256>"
|
|
35
|
-
: "Usage: loom db release trust-check <plan-file>");
|
|
36
|
-
}
|
|
37
|
-
const { cwd, env, commandRunner, vercelCli } = options;
|
|
38
|
-
async function command(command, args, input) {
|
|
39
|
-
let result;
|
|
40
|
-
try {
|
|
41
|
-
result = await commandRunner(command, args, {
|
|
42
|
-
cwd,
|
|
43
|
-
env,
|
|
44
|
-
...(input === undefined ? {} : { input }),
|
|
45
|
-
stdio: "pipe",
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
catch {
|
|
49
|
-
throw new Error("Trusted Sources provider command did not complete.");
|
|
50
|
-
}
|
|
51
|
-
if (result.code !== 0) {
|
|
52
|
-
throw new Error(`Trusted Sources provider command failed (exit ${result.code}); inspect provider state before retrying an apply.`);
|
|
53
|
-
}
|
|
54
|
-
return result.stdout;
|
|
55
|
-
}
|
|
56
|
-
const link = json(await (0, promises_1.readFile)((0, node_path_1.resolve)(cwd, ".vercel/project.json"), "utf8"), "local Vercel project link");
|
|
57
|
-
if (typeof link.orgId !== "string" ||
|
|
58
|
-
typeof link.projectId !== "string" ||
|
|
59
|
-
!/^[A-Za-z0-9_-]+(?![\s\S])/.test(link.orgId) ||
|
|
60
|
-
!/^[A-Za-z0-9_-]+(?![\s\S])/.test(link.projectId))
|
|
61
|
-
throw new Error("Invalid local Vercel project link.");
|
|
62
|
-
const manifest = json(await (0, promises_1.readFile)((0, node_path_1.resolve)(cwd, "loom.json"), "utf8"), "Loom manifest");
|
|
63
|
-
const db = object(manifest.features) && object(manifest.features.db)
|
|
64
|
-
? manifest.features.db
|
|
65
|
-
: undefined;
|
|
66
|
-
const release = db && object(db.config) ? db.config.release : undefined;
|
|
67
|
-
const productionBranch = (0, releaseConfig_js_1.resolveProductionBranch)(release);
|
|
68
|
-
const repository = json(await command("gh", ["api", "repos/:owner/:repo"]), "GitHub repository");
|
|
69
|
-
if (typeof repository.full_name !== "string" ||
|
|
70
|
-
(typeof repository.id !== "string" &&
|
|
71
|
-
!(typeof repository.id === "number" &&
|
|
72
|
-
Number.isSafeInteger(repository.id))))
|
|
73
|
-
throw new Error("Invalid canonical GitHub repository identity.");
|
|
74
|
-
const providerPath = (version) => `/v${version}/projects/${link.projectId}?teamId=${encodeURIComponent(link.orgId)}`;
|
|
75
|
-
const readProject = async () => json(await command(vercelCli, [
|
|
76
|
-
"api",
|
|
77
|
-
providerPath(10),
|
|
78
|
-
"--method",
|
|
79
|
-
"GET",
|
|
80
|
-
"--raw",
|
|
81
|
-
]), "Vercel project");
|
|
82
|
-
if (action === "plan") {
|
|
83
|
-
if (typeof options.environment !== "string") {
|
|
84
|
-
throw new Error("A resolved GitHub environment is required for planning.");
|
|
85
|
-
}
|
|
86
|
-
// Requiring a local file avoids authorizing a misspelled/nonexistent workflow.
|
|
87
|
-
const workflowPath = args[0];
|
|
88
|
-
const target = {
|
|
89
|
-
projectId: link.projectId,
|
|
90
|
-
teamId: link.orgId,
|
|
91
|
-
repository: repository.full_name,
|
|
92
|
-
repositoryId: String(repository.id),
|
|
93
|
-
productionBranch,
|
|
94
|
-
githubEnvironment: options.environment,
|
|
95
|
-
workflowPath,
|
|
96
|
-
};
|
|
97
|
-
const plan = (0, releaseTrust_js_1.prepareGithubReleaseTrust)(await readProject(), target);
|
|
98
|
-
await (0, promises_1.readFile)((0, node_path_1.resolve)(cwd, workflowPath), "utf8");
|
|
99
|
-
const planFile = (0, node_path_1.resolve)(cwd, args[1]);
|
|
100
|
-
await (0, promises_1.writeFile)(planFile, `${JSON.stringify(plan, null, 2)}\n`, {
|
|
101
|
-
flag: "wx",
|
|
102
|
-
mode: 0o600,
|
|
103
|
-
});
|
|
104
|
-
return [
|
|
105
|
-
`Wrote Trusted Sources proposal: ${planFile}`,
|
|
106
|
-
`Reviewed proposal SHA-256: ${plan.approvalSha256}`,
|
|
107
|
-
"No provider settings changed. Review the proposal before trust-apply.",
|
|
108
|
-
];
|
|
109
|
-
}
|
|
110
|
-
const value = json(await (0, promises_1.readFile)((0, node_path_1.resolve)(cwd, args[0]), "utf8"), "trust proposal");
|
|
111
|
-
if (value.profile !== "loom-github-release-trust-v1" || !object(value.target) ||
|
|
112
|
-
!object(value.patch) || !object(value.patch.trustedSources) ||
|
|
113
|
-
typeof value.approvalSha256 !== "string" ||
|
|
114
|
-
!/^[a-f0-9]{64}$/.test(value.approvalSha256) ||
|
|
115
|
-
value.target.projectId !== link.projectId ||
|
|
116
|
-
value.target.teamId !== link.orgId ||
|
|
117
|
-
value.target.repository !== repository.full_name ||
|
|
118
|
-
value.target.repositoryId !== String(repository.id) ||
|
|
119
|
-
value.target.productionBranch !== productionBranch ||
|
|
120
|
-
(options.environment !== undefined &&
|
|
121
|
-
value.target.githubEnvironment !== options.environment)) {
|
|
122
|
-
throw new Error("Trust proposal does not match this linked project and repository.");
|
|
123
|
-
}
|
|
124
|
-
const plan = value;
|
|
125
|
-
// Validate the workflow path before resolving untrusted proposal contents.
|
|
126
|
-
if (typeof plan.target.workflowPath !== "string" ||
|
|
127
|
-
!/^\.github\/workflows\/[A-Za-z0-9_.-]+\.ya?ml(?![\s\S])/.test(plan.target.workflowPath))
|
|
128
|
-
throw new Error("Invalid workflow path in trust proposal.");
|
|
129
|
-
await (0, promises_1.readFile)((0, node_path_1.resolve)(cwd, plan.target.workflowPath), "utf8");
|
|
130
|
-
if (action === "check") {
|
|
131
|
-
(0, releaseTrust_js_1.verifyGithubReleaseTrustApplied)(await readProject(), plan);
|
|
132
|
-
return ["Verified production Trusted Sources matches the local proposal."];
|
|
133
|
-
}
|
|
134
|
-
(0, releaseTrust_js_1.verifyGithubReleaseTrustPlan)(await readProject(), plan, args[1]);
|
|
135
|
-
if (plan.changed) {
|
|
136
|
-
(0, releaseTrust_js_1.verifyGithubReleaseTrustPlan)(await readProject(), plan, args[1]);
|
|
137
|
-
await command(vercelCli, ["api", providerPath(9), "--method", "PATCH", "--input", "-", "--raw"], JSON.stringify(plan.patch));
|
|
138
|
-
}
|
|
139
|
-
(0, releaseTrust_js_1.verifyGithubReleaseTrustApplied)(await readProject(), plan);
|
|
140
|
-
return [
|
|
141
|
-
plan.changed
|
|
142
|
-
? "Applied and verified the reviewed production Trusted Sources rule."
|
|
143
|
-
: "Trusted Sources already matched; no provider settings changed.",
|
|
144
|
-
];
|
|
145
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/** One validated requirement from a Vercel build environment policy file. */
|
|
2
|
-
export type ParsedBuildEnvironmentRequirement = {
|
|
3
|
-
/**
|
|
4
|
-
* Source of the anchored regular expression that selects variables by name,
|
|
5
|
-
* for a requirement written with `keyPattern` instead of `keys`.
|
|
6
|
-
*/
|
|
7
|
-
keyPattern?: string;
|
|
8
|
-
/** The alternative variable names; empty for a pattern requirement. */
|
|
9
|
-
keys: string[];
|
|
10
|
-
/** Whether a variable name satisfies this requirement. */
|
|
11
|
-
matches: (key: string) => boolean;
|
|
12
|
-
name: string;
|
|
13
|
-
/** A pattern requirement's placeholder has no fixed `key`. */
|
|
14
|
-
placeholder?: {
|
|
15
|
-
key?: string;
|
|
16
|
-
kind: string;
|
|
17
|
-
};
|
|
18
|
-
/** Every matched variable must target Production and nothing else. */
|
|
19
|
-
productionOnly: boolean;
|
|
20
|
-
/** Every matched variable must be a write-only Sensitive value. */
|
|
21
|
-
sensitive: boolean;
|
|
22
|
-
};
|
|
23
|
-
type BuildPlaceholder = {
|
|
24
|
-
key: string;
|
|
25
|
-
marker: string;
|
|
26
|
-
requirement: string;
|
|
27
|
-
};
|
|
28
|
-
type CliOutput = {
|
|
29
|
-
out: (line: string) => void;
|
|
30
|
-
};
|
|
31
|
-
export declare function isUsablePulledValue(value: string | undefined): boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Validates a Vercel build environment policy (the app's
|
|
34
|
-
* `.github/vercel-production-env.json`) and returns its requirements. Throws
|
|
35
|
-
* naming the requirement that is wrong.
|
|
36
|
-
*/
|
|
37
|
-
export declare function parseVercelBuildEnvironmentPolicy(policy: unknown): ParsedBuildEnvironmentRequirement[];
|
|
38
|
-
/**
|
|
39
|
-
* Validates required Production variables and fills unreadable Sensitive values
|
|
40
|
-
* with unique build-only placeholders without replacing readable pulled values.
|
|
41
|
-
*/
|
|
42
|
-
export declare function prepareVercelBuildEnvironment({ envFile, manifestFile, metadataFile, policyFile, }: {
|
|
43
|
-
envFile: string;
|
|
44
|
-
manifestFile: string;
|
|
45
|
-
metadataFile: string;
|
|
46
|
-
policyFile: string;
|
|
47
|
-
}, io?: CliOutput): {
|
|
48
|
-
placeholders: BuildPlaceholder[];
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Rejects a Vercel artifact containing any unique build-only marker. The scan
|
|
52
|
-
* follows contained symlinks and Vercel function filePathMap references so it
|
|
53
|
-
* covers FileFsRef content uploaded from outside `.vercel/output`.
|
|
54
|
-
*/
|
|
55
|
-
export declare function verifyVercelBuildArtifact({ deploymentRoot, manifestFile, outputDirectory, }: {
|
|
56
|
-
/** Root from which Vercel resolves function filePathMap source paths. */
|
|
57
|
-
deploymentRoot?: string;
|
|
58
|
-
manifestFile: string;
|
|
59
|
-
outputDirectory: string;
|
|
60
|
-
}, io?: CliOutput): void;
|
|
61
|
-
export {};
|
|
62
|
-
//# sourceMappingURL=vercelBuildEnv.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vercelBuildEnv.d.ts","sourceRoot":"","sources":["../../../src/src/cli/vercelBuildEnv.ts"],"names":[],"mappings":"AAwCA,6EAA6E;AAC7E,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,0DAA0D;IAC1D,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,WAAW,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,sEAAsE;IACtE,cAAc,EAAE,OAAO,CAAC;IACxB,mEAAmE;IACnE,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAMF,KAAK,gBAAgB,GAAG;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAMF,KAAK,SAAS,GAAG;IACf,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B,CAAC;AAkDF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,WAG5D;AAqID;;;;GAIG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,OAAO,GACd,iCAAiC,EAAE,CAUrC;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,EACE,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,UAAU,GACX,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB,EACD,EAAE,GAAE,SAAgD;;EAoJrD;AA0MD;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,EACE,cAAc,EACd,YAAY,EACZ,eAAe,GAChB,EAAE;IACD,yEAAyE;IACzE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;CACzB,EACD,EAAE,GAAE,SAAgD,QA8CrD"}
|
|
@@ -1,418 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isUsablePulledValue = isUsablePulledValue;
|
|
4
|
-
exports.parseVercelBuildEnvironmentPolicy = parseVercelBuildEnvironmentPolicy;
|
|
5
|
-
exports.prepareVercelBuildEnvironment = prepareVercelBuildEnvironment;
|
|
6
|
-
exports.verifyVercelBuildArtifact = verifyVercelBuildArtifact;
|
|
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
|
-
function readJson(path) {
|
|
12
|
-
return JSON.parse((0, node_fs_1.readFileSync)(path, "utf8"));
|
|
13
|
-
}
|
|
14
|
-
function entryTargets(entry) {
|
|
15
|
-
return Array.isArray(entry.target) ? entry.target : [entry.target];
|
|
16
|
-
}
|
|
17
|
-
function productionEntries(envs, matches) {
|
|
18
|
-
return envs.filter((entry) => typeof entry.key === "string" &&
|
|
19
|
-
matches(entry.key) &&
|
|
20
|
-
entryTargets(entry).includes("production"));
|
|
21
|
-
}
|
|
22
|
-
function compileKeyPattern(source, name) {
|
|
23
|
-
if (typeof source !== "string" || !source) {
|
|
24
|
-
throw new Error(`Environment requirement "${name}" has an invalid keyPattern.`);
|
|
25
|
-
}
|
|
26
|
-
// An odd number of backslashes before the final `$` escapes it.
|
|
27
|
-
const trailingBackslashes = source.slice(0, -1).match(/\\*$/)?.[0].length ??
|
|
28
|
-
0;
|
|
29
|
-
if (source.length < 2 || !source.startsWith("^") || !source.endsWith("$") ||
|
|
30
|
-
trailingBackslashes % 2 === 1) {
|
|
31
|
-
throw new Error(`Environment requirement "${name}" keyPattern must be anchored with ^ and $: ${source}`);
|
|
32
|
-
}
|
|
33
|
-
try {
|
|
34
|
-
new RegExp(source);
|
|
35
|
-
// Grouping the body keeps a top-level alternative such as `^A|B$` inside
|
|
36
|
-
// the anchors, so it cannot match part of an unrelated variable name.
|
|
37
|
-
return new RegExp(`^(?:${source.slice(1, -1)})$`);
|
|
38
|
-
}
|
|
39
|
-
catch {
|
|
40
|
-
throw new Error(`Environment requirement "${name}" keyPattern is not a valid regular expression: ${source}`);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
function isUsablePulledValue(value) {
|
|
44
|
-
return Boolean(value?.trim()) &&
|
|
45
|
-
!/(?:sensitive|redacted)/i.test(value ?? "");
|
|
46
|
-
}
|
|
47
|
-
function buildPlaceholder(kind) {
|
|
48
|
-
const marker = `loom-build-only-${(0, node_crypto_1.randomBytes)(32).toString("hex")}`;
|
|
49
|
-
if (kind === "secret") {
|
|
50
|
-
return { marker, value: marker };
|
|
51
|
-
}
|
|
52
|
-
if (kind === "versioned-secret") {
|
|
53
|
-
return { marker, value: `1:${marker}` };
|
|
54
|
-
}
|
|
55
|
-
if (kind === "postgres-url") {
|
|
56
|
-
return {
|
|
57
|
-
marker,
|
|
58
|
-
value: `postgresql://build:${marker}@127.0.0.1:1/build?sslmode=disable`,
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
throw new Error(`Unsupported placeholder kind: ${kind}`);
|
|
62
|
-
}
|
|
63
|
-
function setEnvValue(source, key, value) {
|
|
64
|
-
if (!/^[A-Z_][A-Z0-9_]*$/.test(key)) {
|
|
65
|
-
throw new Error(`Invalid environment variable key in policy: ${key}`);
|
|
66
|
-
}
|
|
67
|
-
const line = `${key}=${JSON.stringify(value)}`;
|
|
68
|
-
const entries = (0, vercelPulledEnv_js_1.parsePulledEnv)(source).entries.filter((entry) => entry.key === key);
|
|
69
|
-
if (!entries.length)
|
|
70
|
-
return `${source.trimEnd()}\n${line}\n`;
|
|
71
|
-
// Every assignment of the key is replaced, so no reader can keep an earlier
|
|
72
|
-
// or later (empty) duplicate. Lines are split on real line breaks only:
|
|
73
|
-
// Vercel writes U+2028 and U+2029 unescaped, and a multiline `^…$` regex
|
|
74
|
-
// would end the line there and leave the rest of the old value behind.
|
|
75
|
-
const parts = source.split(/(\r\n|\r|\n)/);
|
|
76
|
-
const texts = parts.filter((_, index) => index % 2 === 0);
|
|
77
|
-
const breaks = parts.filter((_, index) => index % 2 === 1);
|
|
78
|
-
const replaced = new Set(entries.map((entry) => entry.line - 1));
|
|
79
|
-
const continued = new Set(entries.flatMap((entry) => Array.from({ length: entry.endLine - entry.line }, (_, offset) => entry.line + offset)));
|
|
80
|
-
let output = "";
|
|
81
|
-
for (let index = 0; index < texts.length; index++) {
|
|
82
|
-
if (continued.has(index))
|
|
83
|
-
continue;
|
|
84
|
-
let end = index;
|
|
85
|
-
while (continued.has(end + 1))
|
|
86
|
-
end++;
|
|
87
|
-
output += (replaced.has(index) ? line : texts[index]) + (breaks[end] ?? "");
|
|
88
|
-
}
|
|
89
|
-
return output;
|
|
90
|
-
}
|
|
91
|
-
function parsePolicyRequirement(value, index) {
|
|
92
|
-
if (typeof value !== "object" || value === null) {
|
|
93
|
-
throw new Error(`Vercel environment requirement ${index + 1} is invalid.`);
|
|
94
|
-
}
|
|
95
|
-
const requirement = value;
|
|
96
|
-
const name = typeof requirement.name === "string" &&
|
|
97
|
-
requirement.name.trim()
|
|
98
|
-
? requirement.name
|
|
99
|
-
: `requirement ${index + 1}`;
|
|
100
|
-
const keys = Array.isArray(requirement.keys)
|
|
101
|
-
? requirement.keys.filter((key) => typeof key === "string" && Boolean(key))
|
|
102
|
-
: [];
|
|
103
|
-
const hasPattern = requirement.keyPattern !== undefined;
|
|
104
|
-
if (hasPattern && requirement.keys !== undefined) {
|
|
105
|
-
throw new Error(`Environment requirement "${name}" must have either keys or keyPattern, not both.`);
|
|
106
|
-
}
|
|
107
|
-
if (!hasPattern && keys.length === 0) {
|
|
108
|
-
throw new Error(`Environment requirement "${name}" has no keys.`);
|
|
109
|
-
}
|
|
110
|
-
const pattern = hasPattern
|
|
111
|
-
? compileKeyPattern(requirement.keyPattern, name)
|
|
112
|
-
: undefined;
|
|
113
|
-
let placeholder;
|
|
114
|
-
if (requirement.placeholder !== undefined) {
|
|
115
|
-
if (typeof requirement.placeholder !== "object" ||
|
|
116
|
-
requirement.placeholder === null ||
|
|
117
|
-
typeof requirement.placeholder.kind !== "string") {
|
|
118
|
-
throw new Error(`Environment requirement "${name}" has an invalid placeholder policy.`);
|
|
119
|
-
}
|
|
120
|
-
if (pattern) {
|
|
121
|
-
// The placeholder goes to each matched variable, so naming one is a
|
|
122
|
-
// mistake rather than something to ignore.
|
|
123
|
-
if (requirement.placeholder.key !== undefined) {
|
|
124
|
-
throw new Error(`Environment requirement "${name}" uses keyPattern, so its placeholder must not name a key.`);
|
|
125
|
-
}
|
|
126
|
-
placeholder = { kind: requirement.placeholder.kind };
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
if (typeof requirement.placeholder.key !== "string") {
|
|
130
|
-
throw new Error(`Environment requirement "${name}" has an invalid placeholder policy.`);
|
|
131
|
-
}
|
|
132
|
-
placeholder = {
|
|
133
|
-
key: requirement.placeholder.key,
|
|
134
|
-
kind: requirement.placeholder.kind,
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
const keySet = new Set(keys);
|
|
139
|
-
return {
|
|
140
|
-
keyPattern: pattern ? requirement.keyPattern : undefined,
|
|
141
|
-
keys,
|
|
142
|
-
matches: pattern ? (key) => pattern.test(key) : (key) => keySet.has(key),
|
|
143
|
-
name,
|
|
144
|
-
placeholder,
|
|
145
|
-
productionOnly: requirement.productionOnly === true,
|
|
146
|
-
sensitive: requirement.sensitive === true,
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Validates a Vercel build environment policy (the app's
|
|
151
|
-
* `.github/vercel-production-env.json`) and returns its requirements. Throws
|
|
152
|
-
* naming the requirement that is wrong.
|
|
153
|
-
*/
|
|
154
|
-
function parseVercelBuildEnvironmentPolicy(policy) {
|
|
155
|
-
const requirements = typeof policy === "object" && policy !== null
|
|
156
|
-
? policy.requirements
|
|
157
|
-
: undefined;
|
|
158
|
-
if (!Array.isArray(requirements)) {
|
|
159
|
-
throw new Error("Vercel environment policy has no requirements array.");
|
|
160
|
-
}
|
|
161
|
-
return requirements.map((value, index) => parsePolicyRequirement(value, index));
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Validates required Production variables and fills unreadable Sensitive values
|
|
165
|
-
* with unique build-only placeholders without replacing readable pulled values.
|
|
166
|
-
*/
|
|
167
|
-
function prepareVercelBuildEnvironment({ envFile, manifestFile, metadataFile, policyFile, }, io = { out: (line) => console.log(line) }) {
|
|
168
|
-
let envSource = (0, node_fs_1.readFileSync)(envFile, "utf8");
|
|
169
|
-
const pulledValues = (0, vercelPulledEnv_js_1.parsePulledEnv)(envSource).values;
|
|
170
|
-
const metadata = readJson(metadataFile);
|
|
171
|
-
const policy = readJson(policyFile);
|
|
172
|
-
const envs = typeof metadata === "object" && metadata !== null
|
|
173
|
-
? metadata.envs
|
|
174
|
-
: undefined;
|
|
175
|
-
if (!Array.isArray(envs)) {
|
|
176
|
-
throw new Error("Vercel metadata did not contain an envs array.");
|
|
177
|
-
}
|
|
178
|
-
const requirements = parseVercelBuildEnvironmentPolicy(policy);
|
|
179
|
-
const placeholders = [];
|
|
180
|
-
const addPlaceholder = (key, kind, requirement) => {
|
|
181
|
-
const placeholder = buildPlaceholder(kind);
|
|
182
|
-
envSource = setEnvValue(envSource, key, placeholder.value);
|
|
183
|
-
pulledValues[key] = placeholder.value;
|
|
184
|
-
placeholders.push({ key, marker: placeholder.marker, requirement });
|
|
185
|
-
io.out(`Added a build-only ${key} placeholder for ${requirement}.`);
|
|
186
|
-
};
|
|
187
|
-
for (const requirement of requirements) {
|
|
188
|
-
const entries = productionEntries(envs, requirement.matches);
|
|
189
|
-
if (entries.length === 0) {
|
|
190
|
-
throw new Error(`Missing Vercel Production variable for ${requirement.name}: ${requirement.keyPattern ?? requirement.keys.join(" or ")}`);
|
|
191
|
-
}
|
|
192
|
-
const nonSensitive = entries.filter((entry) => entry.type !== "sensitive");
|
|
193
|
-
if (requirement.sensitive && nonSensitive.length > 0) {
|
|
194
|
-
throw new Error(`Vercel Production variable must be Sensitive for ${requirement.name}: ${nonSensitive
|
|
195
|
-
.map((entry) => entry.key)
|
|
196
|
-
.join(", ")}`);
|
|
197
|
-
}
|
|
198
|
-
const shared = entries.filter((entry) => {
|
|
199
|
-
const targets = entryTargets(entry);
|
|
200
|
-
if (targets.length !== 1 || targets[0] !== "production")
|
|
201
|
-
return true;
|
|
202
|
-
// Vercel lists custom environments beside `target`, so a variable
|
|
203
|
-
// attached to one is shared even though it targets only Production.
|
|
204
|
-
// Anything but an absent or empty list counts as shared.
|
|
205
|
-
const custom = entry.customEnvironmentIds;
|
|
206
|
-
return custom !== undefined && custom !== null &&
|
|
207
|
-
!(Array.isArray(custom) && custom.length === 0);
|
|
208
|
-
});
|
|
209
|
-
if (requirement.productionOnly && shared.length > 0) {
|
|
210
|
-
throw new Error(`Vercel Production variable must target Production only for ${requirement.name}: ${shared
|
|
211
|
-
.map((entry) => entry.key)
|
|
212
|
-
.join(", ")}`);
|
|
213
|
-
}
|
|
214
|
-
if (requirement.keyPattern !== undefined) {
|
|
215
|
-
// Every matched variable is needed, not one of several alternatives,
|
|
216
|
-
// so each gets its own verdict and, when unreadable, its own placeholder.
|
|
217
|
-
const matchedKeys = [
|
|
218
|
-
...new Set(entries.map((entry) => entry.key)),
|
|
219
|
-
];
|
|
220
|
-
for (const key of matchedKeys) {
|
|
221
|
-
if (isUsablePulledValue(pulledValues[key])) {
|
|
222
|
-
io.out(`Verified ${requirement.name} from vercel pull (${key}).`);
|
|
223
|
-
continue;
|
|
224
|
-
}
|
|
225
|
-
if (entries.some((entry) => entry.key === key && entry.type !== "sensitive")) {
|
|
226
|
-
throw new Error(`Vercel Production variable is empty after pull for ${requirement.name}: ${key}`);
|
|
227
|
-
}
|
|
228
|
-
if (!requirement.placeholder) {
|
|
229
|
-
throw new Error(`Sensitive Vercel Production variable has no build placeholder policy for ${requirement.name}.`);
|
|
230
|
-
}
|
|
231
|
-
addPlaceholder(key, requirement.placeholder.kind, requirement.name);
|
|
232
|
-
}
|
|
233
|
-
continue;
|
|
234
|
-
}
|
|
235
|
-
const pulledKey = requirement.keys.find((key) => isUsablePulledValue(pulledValues[key]));
|
|
236
|
-
if (pulledKey) {
|
|
237
|
-
io.out(`Verified ${requirement.name} from vercel pull (${pulledKey}).`);
|
|
238
|
-
continue;
|
|
239
|
-
}
|
|
240
|
-
const unreadableSensitive = entries.every((entry) => entry.type === "sensitive");
|
|
241
|
-
if (!unreadableSensitive) {
|
|
242
|
-
throw new Error(`Vercel Production variable is empty after pull for ${requirement.name}: ${requirement.keys.join(" or ")}`);
|
|
243
|
-
}
|
|
244
|
-
if (!requirement.placeholder) {
|
|
245
|
-
throw new Error(`Sensitive Vercel Production variable has no build placeholder policy for ${requirement.name}.`);
|
|
246
|
-
}
|
|
247
|
-
const placeholderKey = requirement.placeholder.key;
|
|
248
|
-
if (isUsablePulledValue(pulledValues[placeholderKey])) {
|
|
249
|
-
io.out(`Preserved pulled ${placeholderKey} for ${requirement.name}.`);
|
|
250
|
-
continue;
|
|
251
|
-
}
|
|
252
|
-
addPlaceholder(placeholderKey, requirement.placeholder.kind, requirement.name);
|
|
253
|
-
}
|
|
254
|
-
(0, node_fs_1.writeFileSync)(envFile, envSource, { mode: 0o600 });
|
|
255
|
-
(0, node_fs_1.writeFileSync)(manifestFile, `${JSON.stringify({ placeholders }, null, 2)}\n`, { mode: 0o600 });
|
|
256
|
-
(0, node_fs_1.chmodSync)(envFile, 0o600);
|
|
257
|
-
(0, node_fs_1.chmodSync)(manifestFile, 0o600);
|
|
258
|
-
return { placeholders };
|
|
259
|
-
}
|
|
260
|
-
function isWithin(root, path) {
|
|
261
|
-
const rel = (0, node_path_1.relative)(root, path);
|
|
262
|
-
return rel === "" ||
|
|
263
|
-
(rel !== ".." && !rel.startsWith(`..${node_path_1.sep}`) && !(0, node_path_1.isAbsolute)(rel));
|
|
264
|
-
}
|
|
265
|
-
function fileSystemErrorCode(error) {
|
|
266
|
-
return typeof error === "object" && error !== null && "code" in error &&
|
|
267
|
-
typeof error.code === "string"
|
|
268
|
-
? error.code
|
|
269
|
-
: undefined;
|
|
270
|
-
}
|
|
271
|
-
function inferDeploymentRoot(outputDirectory) {
|
|
272
|
-
const output = (0, node_path_1.resolve)(outputDirectory);
|
|
273
|
-
const vercelDirectory = (0, node_path_1.dirname)(output);
|
|
274
|
-
return (0, node_path_1.basename)(output) === "output" &&
|
|
275
|
-
(0, node_path_1.basename)(vercelDirectory) === ".vercel"
|
|
276
|
-
? (0, node_path_1.dirname)(vercelDirectory)
|
|
277
|
-
: undefined;
|
|
278
|
-
}
|
|
279
|
-
function resolveGraphPath(path, description) {
|
|
280
|
-
try {
|
|
281
|
-
return (0, node_fs_1.realpathSync)(path);
|
|
282
|
-
}
|
|
283
|
-
catch (error) {
|
|
284
|
-
const code = fileSystemErrorCode(error);
|
|
285
|
-
if (code === "ELOOP") {
|
|
286
|
-
throw new Error(`Vercel artifact contains a symlink cycle at ${description}: ${path}`);
|
|
287
|
-
}
|
|
288
|
-
if (code === "ENOENT") {
|
|
289
|
-
throw new Error(`Vercel artifact path is missing or has a broken symlink at ${description}: ${path}`);
|
|
290
|
-
}
|
|
291
|
-
throw new Error(`Vercel artifact path cannot be resolved at ${description}: ${path}`);
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
function visitArtifactPath(path, description, allowedRoot, graph, ancestors = new Set()) {
|
|
295
|
-
const canonicalPath = resolveGraphPath(path, description);
|
|
296
|
-
if (!isWithin(allowedRoot, canonicalPath)) {
|
|
297
|
-
throw new Error(`Vercel artifact path resolves outside the deployment root at ${description}: ${path}`);
|
|
298
|
-
}
|
|
299
|
-
let stats;
|
|
300
|
-
try {
|
|
301
|
-
stats = (0, node_fs_1.lstatSync)(canonicalPath);
|
|
302
|
-
}
|
|
303
|
-
catch {
|
|
304
|
-
throw new Error(`Vercel artifact path cannot be inspected at ${description}: ${path}`);
|
|
305
|
-
}
|
|
306
|
-
if (stats.isFile()) {
|
|
307
|
-
graph.files.add(canonicalPath);
|
|
308
|
-
if ((0, node_path_1.basename)(path) === ".vc-config.json" ||
|
|
309
|
-
(0, node_path_1.basename)(canonicalPath) === ".vc-config.json") {
|
|
310
|
-
graph.configurationFiles.add(canonicalPath);
|
|
311
|
-
}
|
|
312
|
-
return;
|
|
313
|
-
}
|
|
314
|
-
if (!stats.isDirectory()) {
|
|
315
|
-
throw new Error(`Vercel artifact contains an unsupported filesystem entry at ${description}: ${path}`);
|
|
316
|
-
}
|
|
317
|
-
if (ancestors.has(canonicalPath)) {
|
|
318
|
-
throw new Error(`Vercel artifact contains a directory symlink cycle at ${description}: ${path}`);
|
|
319
|
-
}
|
|
320
|
-
if (graph.visitedDirectories.has(canonicalPath)) {
|
|
321
|
-
return;
|
|
322
|
-
}
|
|
323
|
-
graph.visitedDirectories.add(canonicalPath);
|
|
324
|
-
const nextAncestors = new Set(ancestors);
|
|
325
|
-
nextAncestors.add(canonicalPath);
|
|
326
|
-
for (const entry of (0, node_fs_1.readdirSync)(canonicalPath, { withFileTypes: true })) {
|
|
327
|
-
visitArtifactPath((0, node_path_1.join)(canonicalPath, entry.name), description, allowedRoot, graph, nextAncestors);
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
function collectDeployableArtifactFiles(outputDirectory, deploymentRoot) {
|
|
331
|
-
const output = (0, node_path_1.resolve)(outputDirectory);
|
|
332
|
-
const resolutionRoot = deploymentRoot === undefined
|
|
333
|
-
? inferDeploymentRoot(output)
|
|
334
|
-
: (0, node_path_1.resolve)(deploymentRoot);
|
|
335
|
-
const lexicalRoot = resolutionRoot ?? output;
|
|
336
|
-
if (!isWithin(lexicalRoot, output)) {
|
|
337
|
-
throw new Error(`Vercel output directory is outside the deployment root: ${output}`);
|
|
338
|
-
}
|
|
339
|
-
const allowedRoot = resolveGraphPath(lexicalRoot, "deployment root");
|
|
340
|
-
const graph = {
|
|
341
|
-
configurationFiles: new Set(),
|
|
342
|
-
files: new Set(),
|
|
343
|
-
visitedDirectories: new Set(),
|
|
344
|
-
};
|
|
345
|
-
visitArtifactPath(output, "output directory", allowedRoot, graph);
|
|
346
|
-
const configurationFiles = [...graph.configurationFiles];
|
|
347
|
-
for (const configurationFile of configurationFiles) {
|
|
348
|
-
let configuration;
|
|
349
|
-
try {
|
|
350
|
-
configuration = readJson(configurationFile);
|
|
351
|
-
}
|
|
352
|
-
catch {
|
|
353
|
-
throw new Error(`Vercel function configuration is not valid JSON: ${configurationFile}`);
|
|
354
|
-
}
|
|
355
|
-
if (typeof configuration !== "object" || configuration === null ||
|
|
356
|
-
Array.isArray(configuration)) {
|
|
357
|
-
throw new Error(`Vercel function configuration is invalid: ${configurationFile}`);
|
|
358
|
-
}
|
|
359
|
-
const filePathMap = configuration.filePathMap;
|
|
360
|
-
if (filePathMap === undefined) {
|
|
361
|
-
continue;
|
|
362
|
-
}
|
|
363
|
-
if (typeof filePathMap !== "object" || filePathMap === null ||
|
|
364
|
-
Array.isArray(filePathMap)) {
|
|
365
|
-
throw new Error(`Vercel function filePathMap is invalid: ${configurationFile}`);
|
|
366
|
-
}
|
|
367
|
-
const filePathMapEntries = Object.entries(filePathMap);
|
|
368
|
-
if (filePathMapEntries.length === 0) {
|
|
369
|
-
continue;
|
|
370
|
-
}
|
|
371
|
-
if (resolutionRoot === undefined) {
|
|
372
|
-
throw new Error(`Vercel function filePathMap requires a deployment root; use .vercel/output or provide deploymentRoot: ${configurationFile}`);
|
|
373
|
-
}
|
|
374
|
-
for (const [bundlePath, sourcePath] of filePathMapEntries) {
|
|
375
|
-
if (typeof sourcePath !== "string" || sourcePath.length === 0) {
|
|
376
|
-
throw new Error(`Vercel function filePathMap target is invalid for ${bundlePath}: ${configurationFile}`);
|
|
377
|
-
}
|
|
378
|
-
const mappedPath = (0, node_path_1.resolve)((0, node_path_1.join)(resolutionRoot, sourcePath));
|
|
379
|
-
if (!isWithin(resolutionRoot, mappedPath)) {
|
|
380
|
-
throw new Error(`Vercel function filePathMap target resolves outside the deployment root and would be ignored by Vercel CLI for ${bundlePath}: ${sourcePath}`);
|
|
381
|
-
}
|
|
382
|
-
visitArtifactPath(mappedPath, `filePathMap entry ${bundlePath}`, allowedRoot, graph);
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
return graph.files;
|
|
386
|
-
}
|
|
387
|
-
/**
|
|
388
|
-
* Rejects a Vercel artifact containing any unique build-only marker. The scan
|
|
389
|
-
* follows contained symlinks and Vercel function filePathMap references so it
|
|
390
|
-
* covers FileFsRef content uploaded from outside `.vercel/output`.
|
|
391
|
-
*/
|
|
392
|
-
function verifyVercelBuildArtifact({ deploymentRoot, manifestFile, outputDirectory, }, io = { out: (line) => console.log(line) }) {
|
|
393
|
-
const manifest = readJson(manifestFile);
|
|
394
|
-
if (!Array.isArray(manifest.placeholders)) {
|
|
395
|
-
throw new Error("Build placeholder manifest is invalid.");
|
|
396
|
-
}
|
|
397
|
-
const placeholders = manifest.placeholders.filter((value) => typeof value === "object" &&
|
|
398
|
-
value !== null &&
|
|
399
|
-
typeof value.key === "string" &&
|
|
400
|
-
typeof value.marker === "string" &&
|
|
401
|
-
typeof value.requirement === "string");
|
|
402
|
-
if (placeholders.length !== manifest.placeholders.length) {
|
|
403
|
-
throw new Error("Build placeholder manifest is invalid.");
|
|
404
|
-
}
|
|
405
|
-
const leaks = [];
|
|
406
|
-
for (const path of collectDeployableArtifactFiles(outputDirectory, deploymentRoot)) {
|
|
407
|
-
const contents = (0, node_fs_1.readFileSync)(path);
|
|
408
|
-
for (const placeholder of placeholders) {
|
|
409
|
-
if (contents.includes(Buffer.from(placeholder.marker))) {
|
|
410
|
-
leaks.push(`${placeholder.key}: ${path}`);
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
if (leaks.length > 0) {
|
|
415
|
-
throw new Error(`Build-only environment placeholder reached the deployable artifact:\n${leaks.join("\n")}`);
|
|
416
|
-
}
|
|
417
|
-
io.out(`Verified ${placeholders.length} build-only placeholder(s) are absent from ${(0, node_path_1.basename)(outputDirectory)}.`);
|
|
418
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { type PulledEnvEntry } from "./vercelPulledEnv.js";
|
|
2
|
-
type CliOutput = {
|
|
3
|
-
err: (line: string) => void;
|
|
4
|
-
out: (line: string) => void;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Values shorter than this are not masked. A value this short is too small to
|
|
8
|
-
* be a meaningful secret, and GitHub masks every occurrence of a registered
|
|
9
|
-
* value in later log lines, so masking `1`, `true` or `production` would turn
|
|
10
|
-
* unrelated output into `***`.
|
|
11
|
-
*/
|
|
12
|
-
export declare const MIN_MASKED_VALUE_LENGTH = 8;
|
|
13
|
-
/** Whether a pulled variable's value is public by construction. */
|
|
14
|
-
export declare function isPublicPulledEnvName(name: string): boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Returns the de-duplicated `::add-mask::` workflow commands for the entries
|
|
17
|
-
* of a parsed env file. An entry is skipped when its name is public by
|
|
18
|
-
* construction; otherwise its on-disk text, decoded value and trimmed value
|
|
19
|
-
* are each registered unless shorter than {@link MIN_MASKED_VALUE_LENGTH}.
|
|
20
|
-
* Registering every form costs only readability and covers whichever one a
|
|
21
|
-
* tool prints. A multi-line value is also registered line by line, without
|
|
22
|
-
* line terminators, because GitHub matches masks against each log line.
|
|
23
|
-
*/
|
|
24
|
-
export declare function pulledEnvMaskCommands(entries: Iterable<Pick<PulledEnvEntry, "alternateRaw" | "key" | "raw" | "value">>): string[];
|
|
25
|
-
/**
|
|
26
|
-
* Implements `loom db release mask-env <env-file>`: reads a pulled Vercel env
|
|
27
|
-
* file directly (so a process variable of the same name cannot shadow the
|
|
28
|
-
* file's value) and writes one `::add-mask::` command per secret-capable value.
|
|
29
|
-
* Nothing else reaches stdout, and failures name neither variables nor values.
|
|
30
|
-
* Refuses outside GitHub Actions, where the commands would print the values
|
|
31
|
-
* instead of registering masks.
|
|
32
|
-
*/
|
|
33
|
-
export declare function maskVercelPulledEnvironment({ env, envFile }: {
|
|
34
|
-
env: Record<string, string | undefined>;
|
|
35
|
-
envFile: string;
|
|
36
|
-
}, io: CliOutput): 1 | 0;
|
|
37
|
-
export {};
|
|
38
|
-
//# sourceMappingURL=vercelEnvMask.d.ts.map
|