@gadicc/loom 1.38.0 → 2.0.1
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 +2010 -745
- 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 +26794 -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,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getLoomPwaWorkerFlags = getLoomPwaWorkerFlags;
|
|
4
|
-
exports.createLoomPwaSerwistOptions = createLoomPwaSerwistOptions;
|
|
5
|
-
exports.addLoomPwaSkipWaitingListener = addLoomPwaSkipWaitingListener;
|
|
6
|
-
require("../../../_dnt.polyfills.js");
|
|
7
|
-
function getLoomPwaWorkerFlags(updateMode = "prompt") {
|
|
8
|
-
return {
|
|
9
|
-
clientsClaim: true,
|
|
10
|
-
skipWaiting: updateMode === "auto",
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
function createLoomPwaSerwistOptions(options) {
|
|
14
|
-
return {
|
|
15
|
-
precacheEntries: options.precacheEntries
|
|
16
|
-
? [...options.precacheEntries]
|
|
17
|
-
: undefined,
|
|
18
|
-
...getLoomPwaWorkerFlags(options.updateMode),
|
|
19
|
-
navigationPreload: options.navigationPreload ?? true,
|
|
20
|
-
runtimeCaching: options.runtimeCaching,
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function addLoomPwaSkipWaitingListener(scope) {
|
|
24
|
-
const listener = (event) => {
|
|
25
|
-
if (event.data?.type === "SKIP_WAITING") {
|
|
26
|
-
void scope.skipWaiting();
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
scope.addEventListener("message", listener);
|
|
30
|
-
return () => {
|
|
31
|
-
scope.removeEventListener?.("message", listener);
|
|
32
|
-
};
|
|
33
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import "../../../_dnt.polyfills.js";
|
|
2
|
-
import { type CreateSecretsOptions, type SecretKeyring, type Secrets, SecretsKeyError } from "../../secrets/mod.js";
|
|
3
|
-
export * from "../../secrets/mod.js";
|
|
4
|
-
declare const ENVIRONMENTS: readonly ["production", "preview", "development"];
|
|
5
|
-
type NextSecretsEnv = Record<string, string | undefined>;
|
|
6
|
-
/** Deployment environments an expected-key list can be recorded for. */
|
|
7
|
-
export type SecretsEnvironment = (typeof ENVIRONMENTS)[number];
|
|
8
|
-
/** One recorded key as it appears in JSON, before validation. */
|
|
9
|
-
export interface RecordedSecretKey {
|
|
10
|
-
id: number;
|
|
11
|
-
fingerprint: string;
|
|
12
|
-
/** `active`, `decrypt-only` or `retired`; a JSON import types it as string. */
|
|
13
|
-
state: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Expected keys per environment, in the shape `loom` records them under
|
|
17
|
-
* `features.secrets.config.keys` in `loom.json`, so that object can be passed
|
|
18
|
-
* straight in. Every list is validated when the secrets are created. An
|
|
19
|
-
* absent or empty list means none was recorded for that environment.
|
|
20
|
-
* Development keys are per machine and gitignored, so they have no list.
|
|
21
|
-
*/
|
|
22
|
-
export interface NextSecretsExpectedKeys {
|
|
23
|
-
production?: readonly RecordedSecretKey[] | undefined;
|
|
24
|
-
preview?: readonly RecordedSecretKey[] | undefined;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Variable names, in the shape `loom` records them under
|
|
28
|
-
* `features.secrets.config.env` in `loom.json`.
|
|
29
|
-
*/
|
|
30
|
-
export interface NextSecretsVariables {
|
|
31
|
-
keyPrefix?: string | undefined;
|
|
32
|
-
activeKeyName?: string | undefined;
|
|
33
|
-
}
|
|
34
|
-
/** Options for {@link createNextSecrets}. */
|
|
35
|
-
export interface CreateNextSecretsOptions extends Omit<CreateSecretsOptions, "keys" | "expectedKeys"> {
|
|
36
|
-
/** Defaults to the environment keyring (`LOOM_SECRETS_KEY_<n>`). */
|
|
37
|
-
keys?: SecretKeyring | undefined;
|
|
38
|
-
/** Variable names for the default keyring. Ignored when `keys` is given. */
|
|
39
|
-
variables?: NextSecretsVariables | undefined;
|
|
40
|
-
expectedKeys?: NextSecretsExpectedKeys | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* Which environment's key list applies. Defaults to the
|
|
43
|
-
* `LOOM_SECRETS_ENVIRONMENT` variable, then `VERCEL_ENV`. A host that
|
|
44
|
-
* provides neither must set one of them: otherwise production cannot be
|
|
45
|
-
* told from development, and a recorded list would be silently ignored.
|
|
46
|
-
* When the two variables name different environments every operation is
|
|
47
|
-
* refused; passing this option skips that comparison.
|
|
48
|
-
*/
|
|
49
|
-
environment?: SecretsEnvironment | undefined;
|
|
50
|
-
/**
|
|
51
|
-
* Allow `assertReady()` to pass in production when no key list is recorded.
|
|
52
|
-
* Off by default: in production, a missing list means nothing shows that
|
|
53
|
-
* the deployed key is the one the operator saved.
|
|
54
|
-
*/
|
|
55
|
-
allowUnverifiedProduction?: boolean | undefined;
|
|
56
|
-
/**
|
|
57
|
-
* Allow secrets to be used while `next build` prerenders. Off by default: a
|
|
58
|
-
* page prerendered at build time would bake a decrypted value, or an
|
|
59
|
-
* "unreadable" state, into static output, and release builds substitute
|
|
60
|
-
* placeholders for keys they cannot read. Do not set it to make a failing
|
|
61
|
-
* build pass; make the route dynamic instead.
|
|
62
|
-
*/
|
|
63
|
-
allowDuringBuild?: boolean | undefined;
|
|
64
|
-
/**
|
|
65
|
-
* The environment object the default keyring reads key values from.
|
|
66
|
-
* Defaults to `process.env`. It is not the manifest's `env` section, which
|
|
67
|
-
* holds variable names and belongs in `variables`, and it is not where the
|
|
68
|
-
* build phase or the deployment environment is read from: see `runtimeEnv`.
|
|
69
|
-
*/
|
|
70
|
-
keysEnv?: NextSecretsEnv | undefined;
|
|
71
|
-
/**
|
|
72
|
-
* Where `NEXT_PHASE`, `LOOM_SECRETS_ENVIRONMENT`, `VERCEL_ENV` and
|
|
73
|
-
* `NODE_ENV` are read from. Defaults to
|
|
74
|
-
* `process.env`. For tests only: an app that narrows its environment into
|
|
75
|
-
* its own object must not hide these from the checks that depend on them.
|
|
76
|
-
*/
|
|
77
|
-
runtimeEnv?: NextSecretsEnv | undefined;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Secrets were used while `next build` was prerendering. Make the route
|
|
81
|
-
* dynamic, so that it runs per request with the deployment's real keys.
|
|
82
|
-
*/
|
|
83
|
-
export declare class SecretsBuildPhaseError extends SecretsKeyError {
|
|
84
|
-
constructor();
|
|
85
|
-
}
|
|
86
|
-
/** Names the environment explicitly where `VERCEL_ENV` is not available. */
|
|
87
|
-
export declare const SECRETS_ENVIRONMENT_ENV = "LOOM_SECRETS_ENVIRONMENT";
|
|
88
|
-
/**
|
|
89
|
-
* The environment whose expected-key list applies, or `null` when it cannot
|
|
90
|
-
* be told. `LOOM_SECRETS_ENVIRONMENT` wins over `VERCEL_ENV`: set it on hosts
|
|
91
|
-
* other than Vercel, and to `development` in `.env.local` to run a production
|
|
92
|
-
* build locally. When both are set and disagree this still returns the
|
|
93
|
-
* explicit one, but `createNextSecrets` refuses every operation.
|
|
94
|
-
*/
|
|
95
|
-
export declare function resolveSecretsEnvironment(env?: NextSecretsEnv): SecretsEnvironment | null;
|
|
96
|
-
/**
|
|
97
|
-
* Creates secrets for a Next.js app.
|
|
98
|
-
*
|
|
99
|
-
* It applies the expected-key list for the current deployment environment, and
|
|
100
|
-
* while `next build` prerenders it refuses every operation, including the
|
|
101
|
-
* `tryOpen` variants, with {@link SecretsBuildPhaseError}. A route that uses
|
|
102
|
-
* secrets or calls `assertReady()` must therefore be dynamic.
|
|
103
|
-
*
|
|
104
|
-
* The refusal covers `next build` only. A route that caches its output at run
|
|
105
|
-
* time (`revalidate`, `use cache`) will cache whatever it decrypted.
|
|
106
|
-
*/
|
|
107
|
-
export declare function createNextSecrets(options?: CreateNextSecretsOptions): Secrets;
|
|
108
|
-
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../src/src/next/secrets/mod.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAC;AAEpC,OAAO,EAEL,KAAK,oBAAoB,EAIzB,KAAK,aAAa,EAElB,KAAK,OAAO,EACZ,eAAe,EAEhB,MAAM,sBAAsB,CAAC;AAE9B,cAAc,sBAAsB,CAAC;AAQrC,QAAA,MAAM,YAAY,mDAAoD,CAAC;AAEvE,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAEzD,wEAAwE;AACxE,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,iEAAiE;AACjE,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC,UAAU,CAAC,EAAE,SAAS,iBAAiB,EAAE,GAAG,SAAS,CAAC;IACtD,OAAO,CAAC,EAAE,SAAS,iBAAiB,EAAE,GAAG,SAAS,CAAC;CACpD;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,6CAA6C;AAC7C,MAAM,WAAW,wBACf,SAAQ,IAAI,CAAC,oBAAoB,EAAE,MAAM,GAAG,cAAc,CAAC;IAC3D,oEAAoE;IACpE,IAAI,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IACjC,4EAA4E;IAC5E,SAAS,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAC7C,YAAY,CAAC,EAAE,uBAAuB,GAAG,SAAS,CAAC;IACnD;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC7C;;;;OAIG;IACH,yBAAyB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChD;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACrC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;CACzC;AAED;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,eAAe;;CAO1D;AAoBD,4EAA4E;AAC5E,eAAO,MAAM,uBAAuB,6BAA6B,CAAC;AAElE;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,GAAE,cAA6B,GACjC,kBAAkB,GAAG,IAAI,CAgB3B;AAiCD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,GAAE,wBAA6B,GACrC,OAAO,CA2GT"}
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.SECRETS_ENVIRONMENT_ENV = exports.SecretsBuildPhaseError = void 0;
|
|
40
|
-
exports.resolveSecretsEnvironment = resolveSecretsEnvironment;
|
|
41
|
-
exports.createNextSecrets = createNextSecrets;
|
|
42
|
-
require("../../../_dnt.polyfills.js");
|
|
43
|
-
const dntShim = __importStar(require("../../../_dnt.shims.js"));
|
|
44
|
-
const mod_js_1 = require("../../secrets/mod.js");
|
|
45
|
-
__exportStar(require("../../secrets/mod.js"), exports);
|
|
46
|
-
/**
|
|
47
|
-
* The value of `NEXT_PHASE` in the workers that collect page data and
|
|
48
|
-
* prerender during `next build`. Nothing sets it for `next start`, `next dev`
|
|
49
|
-
* or a deployed function.
|
|
50
|
-
*/
|
|
51
|
-
const PRODUCTION_BUILD_PHASE = "phase-production-build";
|
|
52
|
-
const ENVIRONMENTS = ["production", "preview", "development"];
|
|
53
|
-
/**
|
|
54
|
-
* Secrets were used while `next build` was prerendering. Make the route
|
|
55
|
-
* dynamic, so that it runs per request with the deployment's real keys.
|
|
56
|
-
*/
|
|
57
|
-
class SecretsBuildPhaseError extends mod_js_1.SecretsKeyError {
|
|
58
|
-
constructor() {
|
|
59
|
-
super("Secrets are not available while `next build` prerenders. Make the route dynamic.");
|
|
60
|
-
this.name = "SecretsBuildPhaseError";
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
exports.SecretsBuildPhaseError = SecretsBuildPhaseError;
|
|
64
|
-
function processEnv() {
|
|
65
|
-
try {
|
|
66
|
-
return dntShim.dntGlobalThis.process
|
|
67
|
-
?.env ?? {};
|
|
68
|
-
}
|
|
69
|
-
catch {
|
|
70
|
-
// Some runtimes refuse environment access without a permission.
|
|
71
|
-
return {};
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
function read(env, name) {
|
|
75
|
-
try {
|
|
76
|
-
return env[name];
|
|
77
|
-
}
|
|
78
|
-
catch {
|
|
79
|
-
return undefined;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
/** Names the environment explicitly where `VERCEL_ENV` is not available. */
|
|
83
|
-
exports.SECRETS_ENVIRONMENT_ENV = "LOOM_SECRETS_ENVIRONMENT";
|
|
84
|
-
/**
|
|
85
|
-
* The environment whose expected-key list applies, or `null` when it cannot
|
|
86
|
-
* be told. `LOOM_SECRETS_ENVIRONMENT` wins over `VERCEL_ENV`: set it on hosts
|
|
87
|
-
* other than Vercel, and to `development` in `.env.local` to run a production
|
|
88
|
-
* build locally. When both are set and disagree this still returns the
|
|
89
|
-
* explicit one, but `createNextSecrets` refuses every operation.
|
|
90
|
-
*/
|
|
91
|
-
function resolveSecretsEnvironment(env = processEnv()) {
|
|
92
|
-
const explicit = read(env, exports.SECRETS_ENVIRONMENT_ENV);
|
|
93
|
-
if (explicit !== undefined && explicit !== "") {
|
|
94
|
-
if (!ENVIRONMENTS.includes(explicit)) {
|
|
95
|
-
throw new TypeError(`${exports.SECRETS_ENVIRONMENT_ENV} must be production, preview or development.`);
|
|
96
|
-
}
|
|
97
|
-
return explicit;
|
|
98
|
-
}
|
|
99
|
-
// `NODE_ENV` is "production" in preview builds too, so it cannot tell a
|
|
100
|
-
// preview from production. Vercel's own variable can.
|
|
101
|
-
const vercelEnv = read(env, "VERCEL_ENV");
|
|
102
|
-
return ENVIRONMENTS.includes(vercelEnv)
|
|
103
|
-
? vercelEnv
|
|
104
|
-
: null;
|
|
105
|
-
}
|
|
106
|
-
function recordedList(expectedKeys, environment) {
|
|
107
|
-
const recorded = expectedKeys?.[environment];
|
|
108
|
-
if (recorded === undefined) {
|
|
109
|
-
return undefined;
|
|
110
|
-
}
|
|
111
|
-
if (!Array.isArray(recorded)) {
|
|
112
|
-
throw new TypeError(`The ${environment} key list must be an array.`);
|
|
113
|
-
}
|
|
114
|
-
return recorded.length === 0 ? undefined : (0, mod_js_1.parseExpectedSecretKeys)(recorded);
|
|
115
|
-
}
|
|
116
|
-
const GUARDED_METHODS = [
|
|
117
|
-
"seal",
|
|
118
|
-
"sealJson",
|
|
119
|
-
"sealBytes",
|
|
120
|
-
"open",
|
|
121
|
-
"openJson",
|
|
122
|
-
"openBytes",
|
|
123
|
-
"tryOpen",
|
|
124
|
-
"tryOpenJson",
|
|
125
|
-
"tryOpenBytes",
|
|
126
|
-
"needsReseal",
|
|
127
|
-
"reseal",
|
|
128
|
-
"mac",
|
|
129
|
-
"macMatches",
|
|
130
|
-
"macNeedsRefresh",
|
|
131
|
-
];
|
|
132
|
-
/**
|
|
133
|
-
* Creates secrets for a Next.js app.
|
|
134
|
-
*
|
|
135
|
-
* It applies the expected-key list for the current deployment environment, and
|
|
136
|
-
* while `next build` prerenders it refuses every operation, including the
|
|
137
|
-
* `tryOpen` variants, with {@link SecretsBuildPhaseError}. A route that uses
|
|
138
|
-
* secrets or calls `assertReady()` must therefore be dynamic.
|
|
139
|
-
*
|
|
140
|
-
* The refusal covers `next build` only. A route that caches its output at run
|
|
141
|
-
* time (`revalidate`, `use cache`) will cache whatever it decrypted.
|
|
142
|
-
*/
|
|
143
|
-
function createNextSecrets(options = {}) {
|
|
144
|
-
const { allowDuringBuild, allowUnverifiedProduction, environment, expectedKeys, keys, keysEnv, runtimeEnv, variables, ...rest } = options;
|
|
145
|
-
if (environment !== undefined && !ENVIRONMENTS.includes(environment)) {
|
|
146
|
-
throw new TypeError("environment must be production, preview or development.");
|
|
147
|
-
}
|
|
148
|
-
// Both lists are validated now, whatever the current environment, so a
|
|
149
|
-
// malformed production list fails a local build instead of the first
|
|
150
|
-
// production request.
|
|
151
|
-
const lists = {
|
|
152
|
-
production: recordedList(expectedKeys, "production"),
|
|
153
|
-
preview: recordedList(expectedKeys, "preview"),
|
|
154
|
-
};
|
|
155
|
-
const runtime = () => runtimeEnv ?? processEnv();
|
|
156
|
-
const resolved = environment ?? resolveSecretsEnvironment(runtime());
|
|
157
|
-
const applied = resolved === "production" || resolved === "preview"
|
|
158
|
-
? lists[resolved]
|
|
159
|
-
: undefined;
|
|
160
|
-
/** Throws when secrets must not be used right now. */
|
|
161
|
-
function guard() {
|
|
162
|
-
if (!allowDuringBuild &&
|
|
163
|
-
read(runtime(), "NEXT_PHASE") === PRODUCTION_BUILD_PHASE) {
|
|
164
|
-
throw new SecretsBuildPhaseError();
|
|
165
|
-
}
|
|
166
|
-
// An explicit variable that contradicts the platform's own would quietly
|
|
167
|
-
// drop the platform's key list (`development` on a production deployment,
|
|
168
|
-
// for example from a `.env.local` that reached the image), so neither is
|
|
169
|
-
// trusted. An `environment` option is the app's own decision and is not
|
|
170
|
-
// second-guessed.
|
|
171
|
-
if (environment === undefined) {
|
|
172
|
-
const explicit = read(runtime(), exports.SECRETS_ENVIRONMENT_ENV);
|
|
173
|
-
const vercelEnv = read(runtime(), "VERCEL_ENV");
|
|
174
|
-
if (ENVIRONMENTS.includes(explicit) &&
|
|
175
|
-
ENVIRONMENTS.includes(vercelEnv) &&
|
|
176
|
-
explicit !== vercelEnv) {
|
|
177
|
-
throw new mod_js_1.SecretsKeyError(`${exports.SECRETS_ENVIRONMENT_ENV} is ${explicit} but VERCEL_ENV is ${vercelEnv}. Secrets are refused until the two name the same environment.`);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
// Lists are recorded, but nothing says which environment this is while
|
|
181
|
-
// the process claims to be production: ignoring them here would look
|
|
182
|
-
// exactly like a healthy, verified deployment.
|
|
183
|
-
if (resolved === null &&
|
|
184
|
-
read(runtime(), "NODE_ENV") === "production" &&
|
|
185
|
-
(lists.production !== undefined || lists.preview !== undefined)) {
|
|
186
|
-
throw new mod_js_1.SecretsKeyError(`Key fingerprints are recorded but the deployment environment is unknown. Set ${exports.SECRETS_ENVIRONMENT_ENV} to production, preview or development.`);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
const inner = (0, mod_js_1.createSecrets)({
|
|
190
|
-
...rest,
|
|
191
|
-
expectedKeys: applied,
|
|
192
|
-
keys: keys ?? (0, mod_js_1.envKeyring)({ ...variables, env: keysEnv }),
|
|
193
|
-
});
|
|
194
|
-
async function assertReady() {
|
|
195
|
-
guard();
|
|
196
|
-
const readiness = await inner.assertReady();
|
|
197
|
-
if (resolved === "production" && !readiness.verified &&
|
|
198
|
-
!allowUnverifiedProduction) {
|
|
199
|
-
throw new mod_js_1.SecretsKeyError("No production key list is recorded, so the deployed key cannot be verified. Record its fingerprint in loom.json.");
|
|
200
|
-
}
|
|
201
|
-
return readiness;
|
|
202
|
-
}
|
|
203
|
-
return {
|
|
204
|
-
assertReady,
|
|
205
|
-
purpose(name, purposeOptions) {
|
|
206
|
-
const purpose = inner.purpose(name, purposeOptions);
|
|
207
|
-
const guarded = {};
|
|
208
|
-
for (const method of GUARDED_METHODS) {
|
|
209
|
-
// deno-lint-ignore require-await -- async so the guard rejects.
|
|
210
|
-
guarded[method] = async (...args) => {
|
|
211
|
-
guard();
|
|
212
|
-
return purpose[method](...args);
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
return { ...purpose, ...guarded, assertReady };
|
|
216
|
-
},
|
|
217
|
-
};
|
|
218
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rejects strings that UTF-8 encoding would silently change.
|
|
3
|
-
*
|
|
4
|
-
* `TextEncoder` turns every lone surrogate into U+FFFD, so two different
|
|
5
|
-
* JavaScript strings could otherwise produce the same bytes and collide as
|
|
6
|
-
* bindings or fingerprint input.
|
|
7
|
-
*/
|
|
8
|
-
export declare function assertWellFormed(value: string, what: string): string;
|
|
9
|
-
/** UTF-8 bytes of a well-formed string. */
|
|
10
|
-
export declare function encodeUtf8(value: string, what: string): Uint8Array<ArrayBuffer>;
|
|
11
|
-
/** Strict UTF-8 decoding. Throws on malformed input; preserves a leading BOM. */
|
|
12
|
-
export declare function decodeUtf8(bytes: Uint8Array): string;
|
|
13
|
-
/** Unpadded base64url. */
|
|
14
|
-
export declare function toBase64Url(bytes: Uint8Array): string;
|
|
15
|
-
/**
|
|
16
|
-
* Decodes unpadded base64url, accepting only the canonical spelling.
|
|
17
|
-
*
|
|
18
|
-
* Decoders tolerate padding, the standard alphabet and non-zero trailing bits.
|
|
19
|
-
* Re-encoding and comparing leaves exactly one accepted string per byte
|
|
20
|
-
* sequence, so a stored ciphertext cannot be respelled.
|
|
21
|
-
*/
|
|
22
|
-
export declare function fromBase64Url(text: string): Uint8Array<ArrayBuffer> | null;
|
|
23
|
-
/**
|
|
24
|
-
* Pre-authentication encoding, as in PASETO: a little-endian 64-bit count of
|
|
25
|
-
* pieces, then each piece prefixed with its little-endian 64-bit byte length.
|
|
26
|
-
*
|
|
27
|
-
* Joining fields with a separator is ambiguous whenever a field can contain
|
|
28
|
-
* the separator. Length prefixes make the encoding injective, so no two
|
|
29
|
-
* different lists of pieces produce the same bytes.
|
|
30
|
-
*/
|
|
31
|
-
export declare function pae(pieces: readonly (string | Uint8Array)[]): Uint8Array<ArrayBuffer>;
|
|
32
|
-
//# sourceMappingURL=encoding.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../../src/src/secrets/encoding.ts"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAQpE;AAED,2CAA2C;AAC3C,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GACX,UAAU,CAAC,WAAW,CAAC,CAEzB;AAED,iFAAiF;AACjF,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAEpD;AAED,0BAA0B;AAC1B,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAWrD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAe1E;AAED;;;;;;;GAOG;AACH,wBAAgB,GAAG,CACjB,MAAM,EAAE,SAAS,CAAC,MAAM,GAAG,UAAU,CAAC,EAAE,GACvC,UAAU,CAAC,WAAW,CAAC,CAezB"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertWellFormed = assertWellFormed;
|
|
4
|
-
exports.encodeUtf8 = encodeUtf8;
|
|
5
|
-
exports.decodeUtf8 = decodeUtf8;
|
|
6
|
-
exports.toBase64Url = toBase64Url;
|
|
7
|
-
exports.fromBase64Url = fromBase64Url;
|
|
8
|
-
exports.pae = pae;
|
|
9
|
-
const encoder = new TextEncoder();
|
|
10
|
-
// `ignoreBOM: true` keeps a leading U+FEFF in the output; the default strips it.
|
|
11
|
-
const decoder = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true });
|
|
12
|
-
const BASE64URL_PATTERN = /^[A-Za-z0-9_-]*$/;
|
|
13
|
-
// Stay well under engine argument limits when spreading into fromCharCode.
|
|
14
|
-
const BINARY_CHUNK = 0x8000;
|
|
15
|
-
/**
|
|
16
|
-
* Rejects strings that UTF-8 encoding would silently change.
|
|
17
|
-
*
|
|
18
|
-
* `TextEncoder` turns every lone surrogate into U+FFFD, so two different
|
|
19
|
-
* JavaScript strings could otherwise produce the same bytes and collide as
|
|
20
|
-
* bindings or fingerprint input.
|
|
21
|
-
*/
|
|
22
|
-
function assertWellFormed(value, what) {
|
|
23
|
-
if (typeof value !== "string") {
|
|
24
|
-
throw new TypeError(`${what} must be a string.`);
|
|
25
|
-
}
|
|
26
|
-
if (!value.isWellFormed()) {
|
|
27
|
-
throw new TypeError(`${what} must be well-formed Unicode.`);
|
|
28
|
-
}
|
|
29
|
-
return value;
|
|
30
|
-
}
|
|
31
|
-
/** UTF-8 bytes of a well-formed string. */
|
|
32
|
-
function encodeUtf8(value, what) {
|
|
33
|
-
return encoder.encode(assertWellFormed(value, what));
|
|
34
|
-
}
|
|
35
|
-
/** Strict UTF-8 decoding. Throws on malformed input; preserves a leading BOM. */
|
|
36
|
-
function decodeUtf8(bytes) {
|
|
37
|
-
return decoder.decode(bytes);
|
|
38
|
-
}
|
|
39
|
-
/** Unpadded base64url. */
|
|
40
|
-
function toBase64Url(bytes) {
|
|
41
|
-
let binary = "";
|
|
42
|
-
for (let offset = 0; offset < bytes.length; offset += BINARY_CHUNK) {
|
|
43
|
-
binary += String.fromCharCode(...bytes.subarray(offset, offset + BINARY_CHUNK));
|
|
44
|
-
}
|
|
45
|
-
return btoa(binary)
|
|
46
|
-
.replaceAll("+", "-")
|
|
47
|
-
.replaceAll("/", "_")
|
|
48
|
-
.replace(/=+$/, "");
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Decodes unpadded base64url, accepting only the canonical spelling.
|
|
52
|
-
*
|
|
53
|
-
* Decoders tolerate padding, the standard alphabet and non-zero trailing bits.
|
|
54
|
-
* Re-encoding and comparing leaves exactly one accepted string per byte
|
|
55
|
-
* sequence, so a stored ciphertext cannot be respelled.
|
|
56
|
-
*/
|
|
57
|
-
function fromBase64Url(text) {
|
|
58
|
-
if (!BASE64URL_PATTERN.test(text)) {
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
let binary;
|
|
62
|
-
try {
|
|
63
|
-
binary = atob(text.replaceAll("-", "+").replaceAll("_", "/"));
|
|
64
|
-
}
|
|
65
|
-
catch {
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
const bytes = new Uint8Array(binary.length);
|
|
69
|
-
for (let index = 0; index < binary.length; index += 1) {
|
|
70
|
-
bytes[index] = binary.charCodeAt(index);
|
|
71
|
-
}
|
|
72
|
-
return toBase64Url(bytes) === text ? bytes : null;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Pre-authentication encoding, as in PASETO: a little-endian 64-bit count of
|
|
76
|
-
* pieces, then each piece prefixed with its little-endian 64-bit byte length.
|
|
77
|
-
*
|
|
78
|
-
* Joining fields with a separator is ambiguous whenever a field can contain
|
|
79
|
-
* the separator. Length prefixes make the encoding injective, so no two
|
|
80
|
-
* different lists of pieces produce the same bytes.
|
|
81
|
-
*/
|
|
82
|
-
function pae(pieces) {
|
|
83
|
-
const encoded = pieces.map((piece) => piece instanceof Uint8Array ? piece : encodeUtf8(piece, "Encoded piece"));
|
|
84
|
-
const length = encoded.reduce((total, piece) => total + 8 + piece.length, 8);
|
|
85
|
-
const output = new Uint8Array(length);
|
|
86
|
-
const view = new DataView(output.buffer);
|
|
87
|
-
view.setBigUint64(0, BigInt(encoded.length), true);
|
|
88
|
-
let offset = 8;
|
|
89
|
-
for (const piece of encoded) {
|
|
90
|
-
view.setBigUint64(offset, BigInt(piece.length), true);
|
|
91
|
-
output.set(piece, offset + 8);
|
|
92
|
-
offset += 8 + piece.length;
|
|
93
|
-
}
|
|
94
|
-
return output;
|
|
95
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Why a sealed value could not be opened.
|
|
3
|
-
*
|
|
4
|
-
* For operator logs and metrics only. Forwarding it to an end user tells a
|
|
5
|
-
* caller who submits tokens which key ids exist and whether a guess reached
|
|
6
|
-
* the cipher.
|
|
7
|
-
*/
|
|
8
|
-
export type SecretFailureReason =
|
|
9
|
-
/** Not a string this module could have produced, or the wrong kind. */
|
|
10
|
-
"malformed"
|
|
11
|
-
/** The key version named in the string is not configured. */
|
|
12
|
-
| "unknown-key"
|
|
13
|
-
/** The key version is configured but its value cannot be used. */
|
|
14
|
-
| "key-unavailable"
|
|
15
|
-
/** The key's fingerprint is not the one recorded for that version. */
|
|
16
|
-
| "key-mismatch"
|
|
17
|
-
/** Wrong key, wrong purpose, wrong binding, or altered ciphertext. */
|
|
18
|
-
| "authentication"
|
|
19
|
-
/** The value carried an expiry that has passed. */
|
|
20
|
-
| "expired";
|
|
21
|
-
/**
|
|
22
|
-
* Thrown by `open` for every failure. The message is fixed so that nothing
|
|
23
|
-
* about the cause, the ciphertext or the binding can leak through it.
|
|
24
|
-
*/
|
|
25
|
-
export declare class SecretUnreadableError extends Error {
|
|
26
|
-
/** See {@link SecretFailureReason}. Not for end users. */
|
|
27
|
-
readonly reason: SecretFailureReason;
|
|
28
|
-
constructor(reason: SecretFailureReason);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* A key is missing or unusable. The message names the variable or key version
|
|
32
|
-
* and the problem, never the value.
|
|
33
|
-
*/
|
|
34
|
-
export declare class SecretsKeyError extends Error {
|
|
35
|
-
constructor(message: string);
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* A configured key is not the key that was recorded for its version: its
|
|
39
|
-
* fingerprint differs. Usually a paste mistake, or a version number reused
|
|
40
|
-
* for a new key.
|
|
41
|
-
*/
|
|
42
|
-
export declare class SecretsKeyMismatchError extends SecretsKeyError {
|
|
43
|
-
constructor(message: string);
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/src/secrets/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB;AAC7B,uEAAuE;AACrE,WAAW;AACb,6DAA6D;GAC3D,aAAa;AACf,kEAAkE;GAChE,iBAAiB;AACnB,sEAAsE;GACpE,cAAc;AAChB,sEAAsE;GACpE,gBAAgB;AAClB,mDAAmD;GACjD,SAAS,CAAC;AAEd;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,0DAA0D;IAC1D,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;gBAEzB,MAAM,EAAE,mBAAmB;CAKxC;AAED;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAI5B;AAED;;;;GAIG;AACH,qBAAa,uBAAwB,SAAQ,eAAe;gBAC9C,OAAO,EAAE,MAAM;CAI5B"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SecretsKeyMismatchError = exports.SecretsKeyError = exports.SecretUnreadableError = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Thrown by `open` for every failure. The message is fixed so that nothing
|
|
6
|
-
* about the cause, the ciphertext or the binding can leak through it.
|
|
7
|
-
*/
|
|
8
|
-
class SecretUnreadableError extends Error {
|
|
9
|
-
constructor(reason) {
|
|
10
|
-
super("Secret could not be read.");
|
|
11
|
-
/** See {@link SecretFailureReason}. Not for end users. */
|
|
12
|
-
Object.defineProperty(this, "reason", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
configurable: true,
|
|
15
|
-
writable: true,
|
|
16
|
-
value: void 0
|
|
17
|
-
});
|
|
18
|
-
this.name = "SecretUnreadableError";
|
|
19
|
-
this.reason = reason;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.SecretUnreadableError = SecretUnreadableError;
|
|
23
|
-
/**
|
|
24
|
-
* A key is missing or unusable. The message names the variable or key version
|
|
25
|
-
* and the problem, never the value.
|
|
26
|
-
*/
|
|
27
|
-
class SecretsKeyError extends Error {
|
|
28
|
-
constructor(message) {
|
|
29
|
-
super(message);
|
|
30
|
-
this.name = "SecretsKeyError";
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.SecretsKeyError = SecretsKeyError;
|
|
34
|
-
/**
|
|
35
|
-
* A configured key is not the key that was recorded for its version: its
|
|
36
|
-
* fingerprint differs. Usually a paste mistake, or a version number reused
|
|
37
|
-
* for a new key.
|
|
38
|
-
*/
|
|
39
|
-
class SecretsKeyMismatchError extends SecretsKeyError {
|
|
40
|
-
constructor(message) {
|
|
41
|
-
super(message);
|
|
42
|
-
this.name = "SecretsKeyMismatchError";
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.SecretsKeyMismatchError = SecretsKeyMismatchError;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/** What a key version is for, as recorded beside its fingerprint. */
|
|
2
|
-
export type SecretKeyState =
|
|
3
|
-
/** Encrypts new values and decrypts. Exactly one key is active. */
|
|
4
|
-
"active"
|
|
5
|
-
/** Decrypts only: an older key, or a new one not yet switched to. */
|
|
6
|
-
| "decrypt-only"
|
|
7
|
-
/** No longer needed. Its variable is expected to be gone. */
|
|
8
|
-
| "retired";
|
|
9
|
-
/**
|
|
10
|
-
* One key the app expects to find, with the fingerprint recorded when the key
|
|
11
|
-
* was generated. The list for an environment is committed with the app (in
|
|
12
|
-
* `loom.json`), so a deployed key that differs from the copy in the password
|
|
13
|
-
* manager is detected instead of trusted.
|
|
14
|
-
*/
|
|
15
|
-
export interface ExpectedSecretKey {
|
|
16
|
-
id: number;
|
|
17
|
-
/** 16 lowercase hex characters from {@link secretKeyFingerprint}. */
|
|
18
|
-
fingerprint: string;
|
|
19
|
-
state: SecretKeyState;
|
|
20
|
-
}
|
|
21
|
-
/** Whether a string has the shape of a key fingerprint. */
|
|
22
|
-
export declare function isSecretKeyFingerprint(value: unknown): value is string;
|
|
23
|
-
/**
|
|
24
|
-
* A short public identifier of a key: the first 8 bytes of an HKDF output that
|
|
25
|
-
* is used for nothing else.
|
|
26
|
-
*
|
|
27
|
-
* A write-only variable cannot be read back, so this is how an operator proves
|
|
28
|
-
* that the key in the deployment is the key in the password manager: compute
|
|
29
|
-
* it from the saved copy, and compare with what the running app reports. It is
|
|
30
|
-
* safe to commit and to log. It is not a key id and never appears in a sealed
|
|
31
|
-
* string.
|
|
32
|
-
*/
|
|
33
|
-
export declare function secretKeyFingerprint(key: Uint8Array): Promise<string>;
|
|
34
|
-
/**
|
|
35
|
-
* Validates an expected-key list, for example one read from `loom.json`, and
|
|
36
|
-
* returns a copy. Throws a `TypeError` naming the entry that is wrong.
|
|
37
|
-
*
|
|
38
|
-
* The list must have exactly one `active` key. No version and no fingerprint
|
|
39
|
-
* may appear twice: one fingerprint under two versions means one key was
|
|
40
|
-
* entered twice.
|
|
41
|
-
*/
|
|
42
|
-
export declare function parseExpectedSecretKeys(value: unknown): ExpectedSecretKey[];
|
|
43
|
-
//# sourceMappingURL=fingerprint.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fingerprint.d.ts","sourceRoot":"","sources":["../../../src/src/secrets/fingerprint.ts"],"names":[],"mappings":"AAOA,qEAAqE;AACrE,MAAM,MAAM,cAAc;AACxB,mEAAmE;AACjE,QAAQ;AACV,qEAAqE;GACnE,cAAc;AAChB,6DAA6D;GAC3D,SAAS,CAAC;AAEd;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,qEAAqE;IACrE,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,cAAc,CAAC;CACvB;AAED,2DAA2D;AAC3D,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAEtE;AAED;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CA0B3E;AAQD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,iBAAiB,EAAE,CA6C3E"}
|