@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,138 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decodePulledEnvEscapes = decodePulledEnvEscapes;
|
|
4
|
-
exports.parsePulledEnv = parsePulledEnv;
|
|
5
|
-
exports.decodePulledEnvBytes = decodePulledEnvBytes;
|
|
6
|
-
exports.readPulledEnvFile = readPulledEnvFile;
|
|
7
|
-
const node_fs_1 = require("node:fs");
|
|
8
|
-
// `[\s\S]` rather than `.`: Vercel writes U+2028 and U+2029 unescaped, and `.`
|
|
9
|
-
// would stop at them and reject the whole line.
|
|
10
|
-
const ASSIGNMENT = /^\s*(?:export\s+)?([\w.-]+)(?:\s*=|:\s)\s*([\s\S]*)$/;
|
|
11
|
-
/** Decodes the `\n` and `\r` escapes `vercel pull` writes in quoted values. */
|
|
12
|
-
function decodePulledEnvEscapes(raw) {
|
|
13
|
-
return raw.replaceAll("\\n", "\n").replaceAll("\\r", "\r");
|
|
14
|
-
}
|
|
15
|
-
function escapeRegExp(text) {
|
|
16
|
-
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Where a double-quoted value that closes on its own line ends: at the first
|
|
20
|
-
* `"` followed only by whitespace and an optional `# comment` (dotenv's early
|
|
21
|
-
* close, which hand-written files rely on), and otherwise at the last `"`.
|
|
22
|
-
* Vercel never writes comments, so its lines end at the last `"` unless the
|
|
23
|
-
* value itself contains `"` followed by ` #`.
|
|
24
|
-
*/
|
|
25
|
-
function closingQuoteIndex(rest) {
|
|
26
|
-
for (let index = rest.indexOf('"', 1); index > 0;) {
|
|
27
|
-
if (/^\s*(?:#[\s\S]*)?$/.test(rest.slice(index + 1)))
|
|
28
|
-
return index;
|
|
29
|
-
index = rest.indexOf('"', index + 1);
|
|
30
|
-
}
|
|
31
|
-
return -1;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Parses dotenv text so that masking and placeholder checks see the value
|
|
35
|
-
* Vercel stored.
|
|
36
|
-
*
|
|
37
|
-
* `vercel pull` writes every variable as `KEY="<value>"`, escaping only newline
|
|
38
|
-
* and carriage return (as `\n` and `\r`) and writing `"`, `\`, `#`, `$`, U+2028
|
|
39
|
-
* and U+2029 as they are. No consumer reads that format back exactly:
|
|
40
|
-
*
|
|
41
|
-
* - Node's `util.parseEnv` ends the value at its first embedded `"`, so
|
|
42
|
-
* `KEY="{"a":1}"` reads as `{`.
|
|
43
|
-
* - `vercel build` loads the file with its bundled dotenv 4.0.0, which trims
|
|
44
|
-
* inside the quotes, decodes `\n` but not `\r`, does not treat `#` specially,
|
|
45
|
-
* and drops any line containing U+2028 or U+2029.
|
|
46
|
-
* - Next.js (`@next/env`) uses dotenv 16, which cuts a value containing both
|
|
47
|
-
* `"` and `#` (`KEY="a"b#c"` reads as `"a"b`), and then expands `$VAR`.
|
|
48
|
-
*
|
|
49
|
-
* This reader is deliberately closer to the stored value than any of them,
|
|
50
|
-
* because masking has to cover the secret itself: a double-quoted value that
|
|
51
|
-
* closes on its line runs to the last `"` (or an earlier `"` followed only by a
|
|
52
|
-
* comment, see {@link PulledEnvEntry.alternateRaw}), nothing is trimmed inside
|
|
53
|
-
* the quotes, `#` and `$` are literal, and only `\n` and `\r` are decoded.
|
|
54
|
-
* Everything else follows dotenv 16: unquoted values end at `#` and are
|
|
55
|
-
* trimmed, single- and backtick-quoted values are literal, and quoted values
|
|
56
|
-
* may span lines.
|
|
57
|
-
*/
|
|
58
|
-
function parsePulledEnv(source) {
|
|
59
|
-
// dotenv normalizes line endings before parsing; Vercel escapes CR and LF
|
|
60
|
-
// inside values, so a real CR here is always part of a line ending.
|
|
61
|
-
const lines = source.replace(/\r\n?/g, "\n").split("\n");
|
|
62
|
-
const entries = [];
|
|
63
|
-
const unrecognizedLines = [];
|
|
64
|
-
for (let index = 0; index < lines.length; index++) {
|
|
65
|
-
const lineText = lines[index];
|
|
66
|
-
const trimmed = lineText.trim();
|
|
67
|
-
if (!trimmed || trimmed.startsWith("#"))
|
|
68
|
-
continue;
|
|
69
|
-
const match = lineText.match(ASSIGNMENT);
|
|
70
|
-
if (!match) {
|
|
71
|
-
unrecognizedLines.push(index + 1);
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
|
-
const [, key, rest] = match;
|
|
75
|
-
const line = index + 1;
|
|
76
|
-
const quote = rest[0];
|
|
77
|
-
const closing = quote === '"' ? closingQuoteIndex(rest) : -1;
|
|
78
|
-
if (closing > 0) {
|
|
79
|
-
const raw = rest.slice(1, closing);
|
|
80
|
-
const last = rest.lastIndexOf('"');
|
|
81
|
-
entries.push({
|
|
82
|
-
...(last > closing ? { alternateRaw: rest.slice(1, last) } : {}),
|
|
83
|
-
endLine: line,
|
|
84
|
-
key,
|
|
85
|
-
line,
|
|
86
|
-
raw,
|
|
87
|
-
value: decodePulledEnvEscapes(raw),
|
|
88
|
-
});
|
|
89
|
-
continue;
|
|
90
|
-
}
|
|
91
|
-
if (quote === '"' || quote === "'" || quote === "`") {
|
|
92
|
-
// As in dotenv: the first unescaped closing quote, possibly on a later
|
|
93
|
-
// line, followed only by whitespace or a comment.
|
|
94
|
-
const q = escapeRegExp(quote);
|
|
95
|
-
const remaining = [rest.slice(1), ...lines.slice(index + 1)].join("\n");
|
|
96
|
-
const closed = remaining.match(new RegExp(`^((?:\\\\${q}|[^${q}])*)${q}[ \\t]*(?:#[^\\n]*)?(?:\\n|$)`));
|
|
97
|
-
if (closed) {
|
|
98
|
-
const raw = closed[1];
|
|
99
|
-
index += (closed[0].replace(/\n$/, "").match(/\n/g) ?? []).length;
|
|
100
|
-
entries.push({
|
|
101
|
-
endLine: index + 1,
|
|
102
|
-
key,
|
|
103
|
-
line,
|
|
104
|
-
raw,
|
|
105
|
-
value: quote === '"' ? decodePulledEnvEscapes(raw) : raw,
|
|
106
|
-
});
|
|
107
|
-
continue;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
// dotenv's unquoted form: up to the first `#`, trimmed, with one pair of
|
|
111
|
-
// matching surrounding quotes removed.
|
|
112
|
-
const text = rest.split("#", 1)[0].trim();
|
|
113
|
-
const surrounding = text.match(/^(['"`])([\s\S]*)\1$/);
|
|
114
|
-
const raw = surrounding ? surrounding[2] : text;
|
|
115
|
-
entries.push({
|
|
116
|
-
endLine: line,
|
|
117
|
-
key,
|
|
118
|
-
line,
|
|
119
|
-
raw,
|
|
120
|
-
value: text.startsWith('"') ? decodePulledEnvEscapes(raw) : raw,
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
const values = {};
|
|
124
|
-
for (const entry of entries)
|
|
125
|
-
values[entry.key] = entry.value;
|
|
126
|
-
return { entries, unrecognizedLines, values };
|
|
127
|
-
}
|
|
128
|
-
/** Decodes UTF-8, throwing on invalid bytes instead of replacing them. */
|
|
129
|
-
function decodePulledEnvBytes(bytes) {
|
|
130
|
-
return new TextDecoder("utf-8", { fatal: true }).decode(bytes);
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Reads and parses a dotenv file with {@link parsePulledEnv}. Throws on bytes
|
|
134
|
-
* that are not UTF-8 rather than silently replacing them.
|
|
135
|
-
*/
|
|
136
|
-
function readPulledEnvFile(path) {
|
|
137
|
-
return parsePulledEnv(decodePulledEnvBytes((0, node_fs_1.readFileSync)(path)));
|
|
138
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
export type ClientDataIdentityStatus = "active" | "signed-out" | "unknown";
|
|
2
|
-
/**
|
|
3
|
-
* Storage-neutral identity fence for account-owned browser data.
|
|
4
|
-
*
|
|
5
|
-
* Owner IDs are opaque strings. The consuming app remains responsible for
|
|
6
|
-
* validating their format before calling these helpers.
|
|
7
|
-
*/
|
|
8
|
-
export interface ClientDataIdentityState<TOwnerId extends string = string> {
|
|
9
|
-
/** Last verified owner, retained while signed out so stored rows stay attributable. */
|
|
10
|
-
readonly lastOwnerId: TOwnerId | null;
|
|
11
|
-
/** Whether the last durable identity decision activated or fenced the owner. */
|
|
12
|
-
readonly status: ClientDataIdentityStatus;
|
|
13
|
-
/** Monotonic ordering for identity writes and cross-context notifications. */
|
|
14
|
-
readonly revision: number;
|
|
15
|
-
/** Revision of the newest sign-out explicitly requested by the user. */
|
|
16
|
-
readonly explicitSignOutRevision: number;
|
|
17
|
-
}
|
|
18
|
-
export type ClientDataIdentitySignal<TOwnerId extends string = string> = {
|
|
19
|
-
readonly type: "owner-active";
|
|
20
|
-
readonly ownerId: TOwnerId;
|
|
21
|
-
readonly revision: number;
|
|
22
|
-
} | {
|
|
23
|
-
readonly type: "signed-out";
|
|
24
|
-
readonly explicit: boolean;
|
|
25
|
-
/** An immediate pre-persistence sign-out fence intentionally has no revision. */
|
|
26
|
-
readonly revision?: number;
|
|
27
|
-
};
|
|
28
|
-
export interface ClientDataIdentitySignalDecision {
|
|
29
|
-
readonly accepted: boolean;
|
|
30
|
-
readonly appliedRevision: number;
|
|
31
|
-
}
|
|
32
|
-
export type ClientDataSignOutTransition<TOwnerId extends string = string> = {
|
|
33
|
-
readonly outcome: "applied";
|
|
34
|
-
readonly revision: number;
|
|
35
|
-
readonly signal: Extract<ClientDataIdentitySignal<TOwnerId>, {
|
|
36
|
-
type: "signed-out";
|
|
37
|
-
}>;
|
|
38
|
-
readonly state: ClientDataIdentityState<TOwnerId>;
|
|
39
|
-
} | {
|
|
40
|
-
readonly outcome: "stale" | "unchanged";
|
|
41
|
-
readonly state: ClientDataIdentityState<TOwnerId>;
|
|
42
|
-
};
|
|
43
|
-
export type ClientDataActivationTransition<TOwnerId extends string = string> = {
|
|
44
|
-
readonly outcome: "applied";
|
|
45
|
-
readonly revision: number;
|
|
46
|
-
readonly signal: Extract<ClientDataIdentitySignal<TOwnerId>, {
|
|
47
|
-
type: "owner-active";
|
|
48
|
-
}>;
|
|
49
|
-
readonly state: ClientDataIdentityState<TOwnerId>;
|
|
50
|
-
} | {
|
|
51
|
-
readonly outcome: "blocked";
|
|
52
|
-
readonly state: ClientDataIdentityState<TOwnerId>;
|
|
53
|
-
};
|
|
54
|
-
/** Creates the durable state used before this device has verified an owner. */
|
|
55
|
-
export declare function createClientDataIdentityState<TOwnerId extends string = string>(): ClientDataIdentityState<TOwnerId>;
|
|
56
|
-
/** Returns the owner that may be reopened offline, or null while fenced. */
|
|
57
|
-
export declare function activeClientDataOwner<TOwnerId extends string>(state: ClientDataIdentityState<TOwnerId>): TOwnerId | null;
|
|
58
|
-
/**
|
|
59
|
-
* Applies a signed-out identity answer to a state read in the same transaction.
|
|
60
|
-
*
|
|
61
|
-
* Pass `expectedRevision` from before an asynchronous session check. A newer
|
|
62
|
-
* identity write then makes that delayed answer stale instead of allowing it to
|
|
63
|
-
* fence the newly activated owner.
|
|
64
|
-
*/
|
|
65
|
-
export declare function transitionClientDataSignOut<TOwnerId extends string>(state: ClientDataIdentityState<TOwnerId>, options?: {
|
|
66
|
-
readonly expectedRevision?: number;
|
|
67
|
-
readonly explicit?: boolean;
|
|
68
|
-
}): ClientDataSignOutTransition<TOwnerId>;
|
|
69
|
-
/**
|
|
70
|
-
* Activates a freshly verified owner and advances the durable identity revision.
|
|
71
|
-
*
|
|
72
|
-
* `baselineRevision` only fences an explicit sign-out that happened after the
|
|
73
|
-
* caller began verification. It does not order competing owner verifications.
|
|
74
|
-
* Within one runtime, callers must abort or generation-check asynchronous
|
|
75
|
-
* session requests. Across tabs or workers, the persistence adapter must also
|
|
76
|
-
* compare the durable revision with the request's original revision, or apply
|
|
77
|
-
* equivalent durable ordering, before calling this transition. Otherwise an
|
|
78
|
-
* older owner-A response can overtake a newer owner-B activation.
|
|
79
|
-
*/
|
|
80
|
-
export declare function transitionClientDataActivation<TOwnerId extends string>(state: ClientDataIdentityState<TOwnerId>, ownerId: TOwnerId, options?: {
|
|
81
|
-
readonly baselineRevision?: number;
|
|
82
|
-
}): ClientDataActivationTransition<TOwnerId>;
|
|
83
|
-
/**
|
|
84
|
-
* Orders a validated cross-context identity signal against the newest applied
|
|
85
|
-
* durable revision. An unrevisioned sign-out is an immediate fence and always
|
|
86
|
-
* applies; the storage adapter must later reconcile it with durable state.
|
|
87
|
-
*/
|
|
88
|
-
export declare function acceptClientDataIdentitySignal<TOwnerId extends string>(appliedRevision: number, signal: ClientDataIdentitySignal<TOwnerId>): ClientDataIdentitySignalDecision;
|
|
89
|
-
//# sourceMappingURL=identity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/src/clientData/identity.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,YAAY,GAAG,SAAS,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM;IACvE,uFAAuF;IACvF,QAAQ,CAAC,WAAW,EAAE,QAAQ,GAAG,IAAI,CAAC;IACtC,gFAAgF;IAChF,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAC1C,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,wEAAwE;IACxE,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;CAC1C;AAED,MAAM,MAAM,wBAAwB,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM,IACjE;IACA,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,GACC;IACA,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,iFAAiF;IACjF,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEJ,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,MAAM,2BAA2B,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM,IACpE;IACA,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,OAAO,CACtB,wBAAwB,CAAC,QAAQ,CAAC,EAClC;QAAE,IAAI,EAAE,YAAY,CAAA;KAAE,CACvB,CAAC;IACF,QAAQ,CAAC,KAAK,EAAE,uBAAuB,CAAC,QAAQ,CAAC,CAAC;CACnD,GACC;IACA,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,uBAAuB,CAAC,QAAQ,CAAC,CAAC;CACnD,CAAC;AAEJ,MAAM,MAAM,8BAA8B,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM,IACvE;IACA,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,OAAO,CACtB,wBAAwB,CAAC,QAAQ,CAAC,EAClC;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,CACzB,CAAC;IACF,QAAQ,CAAC,KAAK,EAAE,uBAAuB,CAAC,QAAQ,CAAC,CAAC;CACnD,GACC;IACA,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,uBAAuB,CAAC,QAAQ,CAAC,CAAC;CACnD,CAAC;AA2CJ,+EAA+E;AAC/E,wBAAgB,6BAA6B,CAC3C,QAAQ,SAAS,MAAM,GAAG,MAAM,KAC7B,uBAAuB,CAAC,QAAQ,CAAC,CAOrC;AAED,4EAA4E;AAC5E,wBAAgB,qBAAqB,CAAC,QAAQ,SAAS,MAAM,EAC3D,KAAK,EAAE,uBAAuB,CAAC,QAAQ,CAAC,GACvC,QAAQ,GAAG,IAAI,CAGjB;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,SAAS,MAAM,EACjE,KAAK,EAAE,uBAAuB,CAAC,QAAQ,CAAC,EACxC,OAAO,GAAE;IAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACtE,GACH,2BAA2B,CAAC,QAAQ,CAAC,CA6BvC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,8BAA8B,CAAC,QAAQ,SAAS,MAAM,EACpE,KAAK,EAAE,uBAAuB,CAAC,QAAQ,CAAC,EACxC,OAAO,EAAE,QAAQ,EACjB,OAAO,GAAE;IAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAO,GACnD,8BAA8B,CAAC,QAAQ,CAAC,CAyB1C;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,QAAQ,SAAS,MAAM,EACpE,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,wBAAwB,CAAC,QAAQ,CAAC,GACzC,gCAAgC,CASlC"}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createClientDataIdentityState = createClientDataIdentityState;
|
|
4
|
-
exports.activeClientDataOwner = activeClientDataOwner;
|
|
5
|
-
exports.transitionClientDataSignOut = transitionClientDataSignOut;
|
|
6
|
-
exports.transitionClientDataActivation = transitionClientDataActivation;
|
|
7
|
-
exports.acceptClientDataIdentitySignal = acceptClientDataIdentitySignal;
|
|
8
|
-
function assertRevision(value, label) {
|
|
9
|
-
if (!Number.isSafeInteger(value) || value < 0) {
|
|
10
|
-
throw new TypeError(`${label} must be a non-negative safe integer.`);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
function assertState(state) {
|
|
14
|
-
assertRevision(state.revision, "Identity revision");
|
|
15
|
-
assertRevision(state.explicitSignOutRevision, "Explicit sign-out revision");
|
|
16
|
-
if (state.explicitSignOutRevision > state.revision) {
|
|
17
|
-
throw new TypeError("Explicit sign-out revision cannot exceed the identity revision.");
|
|
18
|
-
}
|
|
19
|
-
if (state.status !== "active" &&
|
|
20
|
-
state.status !== "signed-out" &&
|
|
21
|
-
state.status !== "unknown") {
|
|
22
|
-
throw new TypeError("Identity status is invalid.");
|
|
23
|
-
}
|
|
24
|
-
if ((state.lastOwnerId !== null && typeof state.lastOwnerId !== "string") ||
|
|
25
|
-
(state.status === "active" && state.lastOwnerId === null)) {
|
|
26
|
-
throw new TypeError("Active client data must have a string owner ID.");
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function nextRevision(revision) {
|
|
30
|
-
if (revision === Number.MAX_SAFE_INTEGER) {
|
|
31
|
-
throw new RangeError("Identity revision is exhausted.");
|
|
32
|
-
}
|
|
33
|
-
return revision + 1;
|
|
34
|
-
}
|
|
35
|
-
/** Creates the durable state used before this device has verified an owner. */
|
|
36
|
-
function createClientDataIdentityState() {
|
|
37
|
-
return {
|
|
38
|
-
lastOwnerId: null,
|
|
39
|
-
status: "unknown",
|
|
40
|
-
revision: 0,
|
|
41
|
-
explicitSignOutRevision: 0,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
/** Returns the owner that may be reopened offline, or null while fenced. */
|
|
45
|
-
function activeClientDataOwner(state) {
|
|
46
|
-
assertState(state);
|
|
47
|
-
return state.status === "active" ? state.lastOwnerId : null;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Applies a signed-out identity answer to a state read in the same transaction.
|
|
51
|
-
*
|
|
52
|
-
* Pass `expectedRevision` from before an asynchronous session check. A newer
|
|
53
|
-
* identity write then makes that delayed answer stale instead of allowing it to
|
|
54
|
-
* fence the newly activated owner.
|
|
55
|
-
*/
|
|
56
|
-
function transitionClientDataSignOut(state, options = {}) {
|
|
57
|
-
assertState(state);
|
|
58
|
-
if (options.expectedRevision !== undefined) {
|
|
59
|
-
assertRevision(options.expectedRevision, "Expected identity revision");
|
|
60
|
-
if (options.expectedRevision !== state.revision) {
|
|
61
|
-
return { outcome: "stale", state };
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
const explicit = options.explicit === true;
|
|
65
|
-
if (state.status === "signed-out" && !explicit) {
|
|
66
|
-
return { outcome: "unchanged", state };
|
|
67
|
-
}
|
|
68
|
-
const revision = nextRevision(state.revision);
|
|
69
|
-
const next = {
|
|
70
|
-
...state,
|
|
71
|
-
status: "signed-out",
|
|
72
|
-
revision,
|
|
73
|
-
explicitSignOutRevision: explicit
|
|
74
|
-
? revision
|
|
75
|
-
: state.explicitSignOutRevision,
|
|
76
|
-
};
|
|
77
|
-
return {
|
|
78
|
-
outcome: "applied",
|
|
79
|
-
revision,
|
|
80
|
-
signal: { type: "signed-out", explicit, revision },
|
|
81
|
-
state: next,
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Activates a freshly verified owner and advances the durable identity revision.
|
|
86
|
-
*
|
|
87
|
-
* `baselineRevision` only fences an explicit sign-out that happened after the
|
|
88
|
-
* caller began verification. It does not order competing owner verifications.
|
|
89
|
-
* Within one runtime, callers must abort or generation-check asynchronous
|
|
90
|
-
* session requests. Across tabs or workers, the persistence adapter must also
|
|
91
|
-
* compare the durable revision with the request's original revision, or apply
|
|
92
|
-
* equivalent durable ordering, before calling this transition. Otherwise an
|
|
93
|
-
* older owner-A response can overtake a newer owner-B activation.
|
|
94
|
-
*/
|
|
95
|
-
function transitionClientDataActivation(state, ownerId, options = {}) {
|
|
96
|
-
assertState(state);
|
|
97
|
-
if (typeof ownerId !== "string") {
|
|
98
|
-
throw new TypeError("Client-data owner ID must be a string.");
|
|
99
|
-
}
|
|
100
|
-
if (options.baselineRevision !== undefined) {
|
|
101
|
-
assertRevision(options.baselineRevision, "Baseline identity revision");
|
|
102
|
-
if (state.explicitSignOutRevision > options.baselineRevision) {
|
|
103
|
-
return { outcome: "blocked", state };
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
const revision = nextRevision(state.revision);
|
|
107
|
-
const next = {
|
|
108
|
-
...state,
|
|
109
|
-
lastOwnerId: ownerId,
|
|
110
|
-
status: "active",
|
|
111
|
-
revision,
|
|
112
|
-
};
|
|
113
|
-
return {
|
|
114
|
-
outcome: "applied",
|
|
115
|
-
revision,
|
|
116
|
-
signal: { type: "owner-active", ownerId, revision },
|
|
117
|
-
state: next,
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Orders a validated cross-context identity signal against the newest applied
|
|
122
|
-
* durable revision. An unrevisioned sign-out is an immediate fence and always
|
|
123
|
-
* applies; the storage adapter must later reconcile it with durable state.
|
|
124
|
-
*/
|
|
125
|
-
function acceptClientDataIdentitySignal(appliedRevision, signal) {
|
|
126
|
-
assertRevision(appliedRevision, "Applied identity revision");
|
|
127
|
-
if (signal.revision === undefined) {
|
|
128
|
-
return { accepted: true, appliedRevision };
|
|
129
|
-
}
|
|
130
|
-
assertRevision(signal.revision, "Signal identity revision");
|
|
131
|
-
return signal.revision < appliedRevision
|
|
132
|
-
? { accepted: false, appliedRevision }
|
|
133
|
-
: { accepted: true, appliedRevision: signal.revision };
|
|
134
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/src/clientData/mod.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,cAAc,eAAe,CAAC"}
|
|
@@ -1,18 +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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
require("../../_dnt.polyfills.js");
|
|
18
|
-
__exportStar(require("./identity.js"), exports);
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { LoomFileRecord } from "./types.js";
|
|
2
|
-
export interface LoomFileUploadResponse<TRecord extends LoomFileRecord = LoomFileRecord> {
|
|
3
|
-
created: boolean;
|
|
4
|
-
file: TRecord;
|
|
5
|
-
reusedExisting: boolean;
|
|
6
|
-
sha256: string;
|
|
7
|
-
stored: boolean;
|
|
8
|
-
}
|
|
9
|
-
export interface UploadLoomFileOptions {
|
|
10
|
-
computeSha256?: boolean;
|
|
11
|
-
endpoint?: string;
|
|
12
|
-
extraFields?: Record<string, string>;
|
|
13
|
-
fetch?: typeof fetch;
|
|
14
|
-
fieldName?: string;
|
|
15
|
-
file: Blob;
|
|
16
|
-
filename?: string;
|
|
17
|
-
headers?: HeadersInit;
|
|
18
|
-
sha256?: string;
|
|
19
|
-
}
|
|
20
|
-
export declare function createLoomFileUploadFormData(options: UploadLoomFileOptions): Promise<{
|
|
21
|
-
formData: any;
|
|
22
|
-
sha256: string | null;
|
|
23
|
-
}>;
|
|
24
|
-
/**
|
|
25
|
-
* Uploads a blob through the shared multipart route contract. UI libraries can
|
|
26
|
-
* wrap this helper without coupling Loom to a specific component package.
|
|
27
|
-
*/
|
|
28
|
-
export declare function uploadLoomFile<TRecord extends LoomFileRecord = LoomFileRecord>(options: UploadLoomFileOptions): Promise<LoomFileUploadResponse<TRecord>>;
|
|
29
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/src/files/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,WAAW,sBAAsB,CACrC,OAAO,SAAS,cAAc,GAAG,cAAc;IAE/C,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,cAAc,EAAE,OAAO,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AASD,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,qBAAqB;;;GAmB/B;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,OAAO,SAAS,cAAc,GAAG,cAAc,EAC/C,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAc1E"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createLoomFileUploadFormData = createLoomFileUploadFormData;
|
|
4
|
-
exports.uploadLoomFile = uploadLoomFile;
|
|
5
|
-
const hash_js_1 = require("./hash.js");
|
|
6
|
-
function getBlobFilename(file, fallback = "file") {
|
|
7
|
-
const candidate = "name" in file && typeof file.name === "string"
|
|
8
|
-
? file.name
|
|
9
|
-
: null;
|
|
10
|
-
return candidate || fallback;
|
|
11
|
-
}
|
|
12
|
-
async function createLoomFileUploadFormData(options) {
|
|
13
|
-
const formData = new FormData();
|
|
14
|
-
const fieldName = options.fieldName ?? "file";
|
|
15
|
-
const filename = options.filename ?? getBlobFilename(options.file);
|
|
16
|
-
const sha256 = options.sha256 ??
|
|
17
|
-
(options.computeSha256 === false
|
|
18
|
-
? null
|
|
19
|
-
: await (0, hash_js_1.sha256Hex)(await options.file.arrayBuffer()));
|
|
20
|
-
formData.set(fieldName, options.file, filename);
|
|
21
|
-
if (sha256) {
|
|
22
|
-
formData.set("sha256", sha256);
|
|
23
|
-
}
|
|
24
|
-
for (const [key, value] of Object.entries(options.extraFields ?? {})) {
|
|
25
|
-
formData.set(key, value);
|
|
26
|
-
}
|
|
27
|
-
return { formData, sha256 };
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Uploads a blob through the shared multipart route contract. UI libraries can
|
|
31
|
-
* wrap this helper without coupling Loom to a specific component package.
|
|
32
|
-
*/
|
|
33
|
-
async function uploadLoomFile(options) {
|
|
34
|
-
const fetchImpl = options.fetch ?? fetch;
|
|
35
|
-
const { formData } = await createLoomFileUploadFormData(options);
|
|
36
|
-
const response = await fetchImpl(options.endpoint ?? "/api/files", {
|
|
37
|
-
body: formData,
|
|
38
|
-
headers: options.headers,
|
|
39
|
-
method: "POST",
|
|
40
|
-
});
|
|
41
|
-
if (!response.ok) {
|
|
42
|
-
throw new Error(`Loom file upload failed with HTTP ${response.status}.`);
|
|
43
|
-
}
|
|
44
|
-
return await response.json();
|
|
45
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base error for file runtime failures that can be translated into HTTP
|
|
3
|
-
* responses by route adapters.
|
|
4
|
-
*/
|
|
5
|
-
export declare class LoomFileError extends Error {
|
|
6
|
-
readonly code: string;
|
|
7
|
-
readonly status: number;
|
|
8
|
-
constructor(message: string, options: {
|
|
9
|
-
code: string;
|
|
10
|
-
status: number;
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
export declare class LoomFileDigestMismatchError extends LoomFileError {
|
|
14
|
-
constructor(options: {
|
|
15
|
-
actual: string;
|
|
16
|
-
expected: string;
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
export declare class LoomFileDuplicateError extends LoomFileError {
|
|
20
|
-
constructor(message?: string);
|
|
21
|
-
}
|
|
22
|
-
export declare class LoomFileInvalidDigestError extends LoomFileError {
|
|
23
|
-
constructor(value: string);
|
|
24
|
-
}
|
|
25
|
-
export declare class LoomFileNotFoundError extends LoomFileError {
|
|
26
|
-
constructor(message?: string);
|
|
27
|
-
}
|
|
28
|
-
export declare class LoomFileSizeLimitError extends LoomFileError {
|
|
29
|
-
constructor(options: {
|
|
30
|
-
actual: number;
|
|
31
|
-
maxBytes: number;
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
export declare class LoomFileStorageReadUnsupportedError extends LoomFileError {
|
|
35
|
-
constructor();
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/src/files/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;CAMvE;AAED,qBAAa,2BAA4B,SAAQ,aAAa;gBAChD,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE;CAO1D;AAED,qBAAa,sBAAuB,SAAQ,aAAa;gBAErD,OAAO,SAAwD;CAKlE;AAED,qBAAa,0BAA2B,SAAQ,aAAa;gBAC/C,KAAK,EAAE,MAAM;CAO1B;AAED,qBAAa,qBAAsB,SAAQ,aAAa;gBAC1C,OAAO,SAAoB;CAIxC;AAED,qBAAa,sBAAuB,SAAQ,aAAa;gBAC3C,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE;CAO1D;AAED,qBAAa,mCAAoC,SAAQ,aAAa;;CAQrE"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LoomFileStorageReadUnsupportedError = exports.LoomFileSizeLimitError = exports.LoomFileNotFoundError = exports.LoomFileInvalidDigestError = exports.LoomFileDuplicateError = exports.LoomFileDigestMismatchError = exports.LoomFileError = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Base error for file runtime failures that can be translated into HTTP
|
|
6
|
-
* responses by route adapters.
|
|
7
|
-
*/
|
|
8
|
-
class LoomFileError extends Error {
|
|
9
|
-
constructor(message, options) {
|
|
10
|
-
super(message);
|
|
11
|
-
Object.defineProperty(this, "code", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
configurable: true,
|
|
14
|
-
writable: true,
|
|
15
|
-
value: void 0
|
|
16
|
-
});
|
|
17
|
-
Object.defineProperty(this, "status", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
configurable: true,
|
|
20
|
-
writable: true,
|
|
21
|
-
value: void 0
|
|
22
|
-
});
|
|
23
|
-
this.name = "LoomFileError";
|
|
24
|
-
this.code = options.code;
|
|
25
|
-
this.status = options.status;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.LoomFileError = LoomFileError;
|
|
29
|
-
class LoomFileDigestMismatchError extends LoomFileError {
|
|
30
|
-
constructor(options) {
|
|
31
|
-
super(`SHA-256 digest mismatch: expected ${options.expected}, received ${options.actual}.`, { code: "digest_mismatch", status: 400 });
|
|
32
|
-
this.name = "LoomFileDigestMismatchError";
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.LoomFileDigestMismatchError = LoomFileDigestMismatchError;
|
|
36
|
-
class LoomFileDuplicateError extends LoomFileError {
|
|
37
|
-
constructor(message = "A file with the same SHA-256 digest already exists.") {
|
|
38
|
-
super(message, { code: "duplicate_file", status: 409 });
|
|
39
|
-
this.name = "LoomFileDuplicateError";
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.LoomFileDuplicateError = LoomFileDuplicateError;
|
|
43
|
-
class LoomFileInvalidDigestError extends LoomFileError {
|
|
44
|
-
constructor(value) {
|
|
45
|
-
super(`Invalid SHA-256 digest: ${value}.`, {
|
|
46
|
-
code: "invalid_digest",
|
|
47
|
-
status: 400,
|
|
48
|
-
});
|
|
49
|
-
this.name = "LoomFileInvalidDigestError";
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
exports.LoomFileInvalidDigestError = LoomFileInvalidDigestError;
|
|
53
|
-
class LoomFileNotFoundError extends LoomFileError {
|
|
54
|
-
constructor(message = "File not found.") {
|
|
55
|
-
super(message, { code: "not_found", status: 404 });
|
|
56
|
-
this.name = "LoomFileNotFoundError";
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.LoomFileNotFoundError = LoomFileNotFoundError;
|
|
60
|
-
class LoomFileSizeLimitError extends LoomFileError {
|
|
61
|
-
constructor(options) {
|
|
62
|
-
super(`File is too large: ${options.actual} bytes exceeds ${options.maxBytes} bytes.`, { code: "size_limit_exceeded", status: 413 });
|
|
63
|
-
this.name = "LoomFileSizeLimitError";
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
exports.LoomFileSizeLimitError = LoomFileSizeLimitError;
|
|
67
|
-
class LoomFileStorageReadUnsupportedError extends LoomFileError {
|
|
68
|
-
constructor() {
|
|
69
|
-
super("The configured file storage adapter does not support reads.", {
|
|
70
|
-
code: "storage_read_unsupported",
|
|
71
|
-
status: 501,
|
|
72
|
-
});
|
|
73
|
-
this.name = "LoomFileStorageReadUnsupportedError";
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
exports.LoomFileStorageReadUnsupportedError = LoomFileStorageReadUnsupportedError;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { LoomFileBody } from "./types.js";
|
|
2
|
-
export interface ReadLoomFileBodyOptions {
|
|
3
|
-
maxBytes?: number;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Reads a supported file body into bytes and enforces an optional size limit.
|
|
7
|
-
* Route adapters use this before hashing so server-side limits are applied
|
|
8
|
-
* consistently for raw and multipart uploads.
|
|
9
|
-
*/
|
|
10
|
-
export declare function readLoomFileBodyBytes(body: LoomFileBody, options?: ReadLoomFileBodyOptions): Promise<Uint8Array<any>>;
|
|
11
|
-
export declare function sha256Hex(body: Uint8Array | ArrayBuffer): Promise<string>;
|
|
12
|
-
export declare function isSha256Hex(value: string): boolean;
|
|
13
|
-
export declare function normalizeSha256Hex(value: string): string;
|
|
14
|
-
export declare function assertExpectedSha256(actual: string, expected: string | null): void;
|
|
15
|
-
//# sourceMappingURL=hash.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../../src/src/files/hash.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAoBD;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,YAAY,EAClB,OAAO,GAAE,uBAA4B,4BAwCtC;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,WAAW,mBAI7D;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,WAExC;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,UAM/C;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,QAY3E"}
|