@gadicc/loom 1.37.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.loom-source-manifest.json +97 -0
- package/README.md +113 -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 +35 -30
- 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 +9 -6
- package/esm/src/cli/migrationEnv.js.map +1 -0
- package/esm/src/cli/mod.d.ts +20 -7
- package/esm/src/cli/mod.d.ts.map +1 -1
- package/esm/src/cli/mod.js +2148 -730
- 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 +44 -21
- package/esm/src/cli/vercelBuildEnv.js.map +1 -0
- package/esm/src/cli/vercelEnvMask.d.ts +38 -0
- package/esm/src/cli/vercelEnvMask.d.ts.map +1 -0
- package/esm/src/cli/vercelEnvMask.js +140 -0
- 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 +47 -24
- package/esm/src/cli/vercelProjectRelease.js.map +1 -0
- package/esm/src/cli/vercelPulledEnv.d.ts +65 -0
- package/esm/src/cli/vercelPulledEnv.d.ts.map +1 -0
- package/esm/src/cli/vercelPulledEnv.js +133 -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/dependency-upgrades.md +4 -0
- package/skills/loom/references/esm-package.md +35 -0
- package/skills/loom/references/local-development.md +261 -29
- package/skills/loom/references/release-safety.md +10 -3
- package/skills/loom-auth/references/secrets-and-rotation.md +2 -1
- package/skills/loom-mail/SKILL.md +1 -0
- package/skills/loom-scaffold/references/greenfield-workflow.md +2 -1
- package/skills/upgrade-deps/SKILL.md +4 -2
- package/source/bin/loom.ts +50 -0
- package/source/mod.ts +10 -0
- package/source/src/apiKeys/authorize.ts +294 -0
- package/source/src/apiKeys/betterAuth.ts +253 -0
- package/source/src/apiKeys/country.ts +7 -0
- package/source/src/apiKeys/credentials.ts +171 -0
- package/source/src/apiKeys/fingerprint.ts +10 -0
- package/{script/src/apiKeys/lifecycle.d.ts → source/src/apiKeys/lifecycle.ts} +21 -23
- package/source/src/apiKeys/limits.ts +372 -0
- package/source/src/apiKeys/mod.ts +11 -0
- package/source/src/apiKeys/permissions.ts +153 -0
- package/source/src/apiKeys/policy.ts +189 -0
- package/source/src/apiKeys/retention.ts +136 -0
- package/source/src/apiKeys/types.ts +288 -0
- package/source/src/cli/atomicText.ts +38 -0
- package/source/src/cli/bunLocalDev.ts +646 -0
- package/source/src/cli/bunProject.ts +433 -0
- package/source/src/cli/cliBootstrap.ts +313 -0
- package/source/src/cli/externalSkills.ts +315 -0
- package/source/src/cli/filesR2Policy.ts +212 -0
- package/source/src/cli/generatedBuild.ts +380 -0
- package/source/src/cli/generatedCleanup.ts +87 -0
- package/source/src/cli/generatedDevLease.ts +52 -0
- package/source/src/cli/generatedInstall.ts +630 -0
- package/source/src/cli/generatedWorkflow.ts +135 -0
- package/{script/src/cli/legacyManagedOutputs.js → source/src/cli/legacyManagedOutputs.ts} +36 -30
- package/source/src/cli/localDb.ts +548 -0
- package/source/src/cli/localDevLock.ts +462 -0
- package/source/src/cli/localDevPackage.ts +754 -0
- package/source/src/cli/managedFiles.ts +688 -0
- package/source/src/cli/migrationEnv.ts +267 -0
- package/source/src/cli/mod.ts +26788 -0
- package/source/src/cli/packageTreeSignature.ts +65 -0
- package/source/src/cli/processIdentity.ts +38 -0
- package/source/src/cli/projectSkills.ts +1102 -0
- package/source/src/cli/projectTooling.ts +1140 -0
- package/source/src/cli/releaseConfig.ts +36 -0
- package/source/src/cli/releaseCredentials.ts +642 -0
- package/source/src/cli/releaseTrust.ts +194 -0
- package/source/src/cli/releaseTrustCommand.ts +210 -0
- package/source/src/cli/sourceConfig.ts +106 -0
- package/source/src/cli/sourceDev.ts +1279 -0
- package/source/src/cli/vercelBuildEnv.ts +714 -0
- package/source/src/cli/vercelEnvMask.ts +182 -0
- package/source/src/cli/vercelProjectRelease.ts +807 -0
- package/source/src/cli/vercelPulledEnv.ts +174 -0
- package/source/src/clientData/identity.ts +229 -0
- package/source/src/clientData/mod.ts +1 -0
- package/source/src/files/client.ts +75 -0
- package/source/src/files/errors.ts +69 -0
- package/source/src/files/hash.ts +109 -0
- package/source/src/files/memory.ts +158 -0
- package/source/src/files/metadata.ts +251 -0
- package/source/src/files/mod.ts +8 -0
- package/source/src/files/s3.ts +182 -0
- package/source/src/files/service.ts +210 -0
- package/source/src/files/types.ts +171 -0
- package/source/src/jobs/catalog.ts +303 -0
- package/source/src/jobs/controller.ts +156 -0
- package/source/src/jobs/direct.ts +177 -0
- package/source/src/jobs/events.ts +74 -0
- package/source/src/jobs/format.ts +233 -0
- package/source/src/jobs/http.ts +83 -0
- package/source/src/jobs/log.ts +10 -0
- package/source/src/jobs/mod.ts +10 -0
- package/source/src/jobs/run.ts +141 -0
- package/source/src/jobs/sanitize.ts +142 -0
- package/source/src/jobs/types.ts +43 -0
- package/source/src/mail/errors.ts +77 -0
- package/source/src/mail/memory.ts +451 -0
- package/source/src/mail/mod.ts +5 -0
- package/source/src/mail/postal.ts +363 -0
- package/source/src/mail/retry.ts +30 -0
- package/source/src/mail/sender.ts +57 -0
- package/source/src/mail/service.ts +252 -0
- package/source/src/mail/types.ts +229 -0
- package/source/src/mui/apiKeys.tsx +1044 -0
- package/source/src/mui/apiKeysView.ts +535 -0
- package/source/src/mui/confirm.tsx +138 -0
- package/source/src/mui/mail.tsx +279 -0
- package/source/src/mui/mailView.ts +50 -0
- package/source/src/mui/mod.ts +3 -0
- package/source/src/next/apiKeys/mod.ts +393 -0
- package/{script/src/next/auth/client.d.ts → source/src/next/auth/client.ts} +19 -5
- package/source/src/next/auth/config.ts +207 -0
- package/source/src/next/auth/localTestLogin.ts +412 -0
- package/source/src/next/auth/mod.ts +3 -0
- package/source/src/next/auth/server.ts +94 -0
- package/source/src/next/files/mod.ts +1 -0
- package/source/src/next/files/route.ts +621 -0
- package/source/src/next/jobs/list.tsx +90 -0
- package/source/src/next/jobs/mod.ts +5 -0
- package/source/src/next/jobs/paths.ts +70 -0
- package/source/src/next/jobs/route.ts +207 -0
- package/source/src/next/jobs/run.tsx +888 -0
- package/source/src/next/jobs/runRequest.ts +92 -0
- package/source/src/next/jobs/stream.ts +33 -0
- package/source/src/next/mail/mod.ts +1 -0
- package/source/src/next/mail/route.ts +75 -0
- package/source/src/next/pwa/mod.tsx +453 -0
- package/source/src/next/pwa/worker.ts +59 -0
- package/source/src/next/secrets/constants.ts +2 -0
- package/source/src/next/secrets/mod.ts +319 -0
- package/source/src/next/sourceDev.ts +50 -0
- package/source/src/secrets/encoding.ts +102 -0
- package/source/src/secrets/errors.ts +58 -0
- package/source/src/secrets/fingerprint.ts +132 -0
- package/source/src/secrets/frame.ts +119 -0
- package/source/src/secrets/keyring.ts +225 -0
- package/source/src/secrets/legacy.ts +244 -0
- package/source/src/secrets/maintenance.ts +517 -0
- package/source/src/secrets/mod.ts +38 -0
- package/source/src/secrets/secrets.ts +926 -0
- package/db/databaseTls.test.ts +0 -171
- package/db/databaseUrl.test.ts +0 -72
- package/db/neonEndpoint.test.ts +0 -51
- package/db/testing.test.ts +0 -28
- package/deno.json +0 -3
- package/esm/_dnt.polyfills.d.ts +0 -166
- package/esm/_dnt.polyfills.d.ts.map +0 -1
- package/esm/_dnt.polyfills.js +0 -177
- package/esm/_dnt.shims.d.ts +0 -2
- package/esm/_dnt.shims.d.ts.map +0 -1
- package/esm/_dnt.shims.js +0 -57
- package/esm/package.json +0 -3
- package/script/_dnt.polyfills.d.ts +0 -166
- package/script/_dnt.polyfills.d.ts.map +0 -1
- package/script/_dnt.polyfills.js +0 -180
- package/script/_dnt.shims.d.ts +0 -2
- package/script/_dnt.shims.d.ts.map +0 -1
- package/script/_dnt.shims.js +0 -60
- package/script/bin/loom.d.ts +0 -2
- package/script/bin/loom.d.ts.map +0 -1
- package/script/bin/loom.js +0 -17
- package/script/mod.d.ts +0 -12
- package/script/mod.d.ts.map +0 -1
- package/script/mod.js +0 -27
- package/script/package.json +0 -3
- package/script/src/apiKeys/authorize.d.ts +0 -4
- package/script/src/apiKeys/authorize.d.ts.map +0 -1
- package/script/src/apiKeys/authorize.js +0 -258
- package/script/src/apiKeys/betterAuth.d.ts +0 -123
- package/script/src/apiKeys/betterAuth.d.ts.map +0 -1
- package/script/src/apiKeys/betterAuth.js +0 -169
- package/script/src/apiKeys/country.d.ts +0 -3
- package/script/src/apiKeys/country.d.ts.map +0 -1
- package/script/src/apiKeys/country.js +0 -10
- package/script/src/apiKeys/credentials.d.ts +0 -39
- package/script/src/apiKeys/credentials.d.ts.map +0 -1
- package/script/src/apiKeys/credentials.js +0 -121
- package/script/src/apiKeys/fingerprint.d.ts +0 -3
- package/script/src/apiKeys/fingerprint.d.ts.map +0 -1
- package/script/src/apiKeys/fingerprint.js +0 -8
- package/script/src/apiKeys/lifecycle.d.ts.map +0 -1
- package/script/src/apiKeys/lifecycle.js +0 -7
- package/script/src/apiKeys/limits.d.ts +0 -132
- package/script/src/apiKeys/limits.d.ts.map +0 -1
- package/script/src/apiKeys/limits.js +0 -254
- package/script/src/apiKeys/mod.d.ts +0 -13
- package/script/src/apiKeys/mod.d.ts.map +0 -1
- package/script/src/apiKeys/mod.js +0 -28
- package/script/src/apiKeys/permissions.d.ts +0 -56
- package/script/src/apiKeys/permissions.d.ts.map +0 -1
- package/script/src/apiKeys/permissions.js +0 -136
- package/script/src/apiKeys/policy.d.ts +0 -61
- package/script/src/apiKeys/policy.d.ts.map +0 -1
- package/script/src/apiKeys/policy.js +0 -94
- package/script/src/apiKeys/retention.d.ts +0 -55
- package/script/src/apiKeys/retention.d.ts.map +0 -1
- package/script/src/apiKeys/retention.js +0 -70
- package/script/src/apiKeys/types.d.ts +0 -242
- package/script/src/apiKeys/types.d.ts.map +0 -1
- package/script/src/apiKeys/types.js +0 -2
- package/script/src/cli/externalSkills.d.ts +0 -39
- package/script/src/cli/externalSkills.d.ts.map +0 -1
- package/script/src/cli/externalSkills.js +0 -204
- package/script/src/cli/filesR2Policy.d.ts +0 -33
- package/script/src/cli/filesR2Policy.d.ts.map +0 -1
- package/script/src/cli/filesR2Policy.js +0 -135
- package/script/src/cli/legacyManagedOutputs.d.ts +0 -33
- package/script/src/cli/legacyManagedOutputs.d.ts.map +0 -1
- package/script/src/cli/localDb.d.ts +0 -28
- package/script/src/cli/localDb.d.ts.map +0 -1
- package/script/src/cli/localDb.js +0 -370
- package/script/src/cli/localDevLock.d.ts +0 -97
- package/script/src/cli/localDevLock.d.ts.map +0 -1
- package/script/src/cli/localDevLock.js +0 -320
- package/script/src/cli/localDevPackage.d.ts +0 -172
- package/script/src/cli/localDevPackage.d.ts.map +0 -1
- package/script/src/cli/localDevPackage.js +0 -635
- package/script/src/cli/managedFiles.d.ts +0 -131
- package/script/src/cli/managedFiles.d.ts.map +0 -1
- package/script/src/cli/managedFiles.js +0 -536
- package/script/src/cli/migrationEnv.d.ts +0 -63
- package/script/src/cli/migrationEnv.d.ts.map +0 -1
- package/script/src/cli/migrationEnv.js +0 -217
- package/script/src/cli/mod.d.ts +0 -581
- package/script/src/cli/mod.d.ts.map +0 -1
- package/script/src/cli/mod.js +0 -16850
- 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 -401
- 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/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,635 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LOOM_BUILD_STAMP_FILE = exports.LOOM_PACKAGE_RELEVANT_PATHS = void 0;
|
|
4
|
-
exports.readLoomSourceProvenance = readLoomSourceProvenance;
|
|
5
|
-
exports.settleLoomBuildProvenance = settleLoomBuildProvenance;
|
|
6
|
-
exports.hasLoomBuildProvenance = hasLoomBuildProvenance;
|
|
7
|
-
exports.computeLoomSourceFingerprint = computeLoomSourceFingerprint;
|
|
8
|
-
exports.snapshotLoomSources = snapshotLoomSources;
|
|
9
|
-
exports.loomSourcesWrittenDuringBuild = loomSourcesWrittenDuringBuild;
|
|
10
|
-
exports.formatLoomBuildStamp = formatLoomBuildStamp;
|
|
11
|
-
exports.readLoomBuildStamp = readLoomBuildStamp;
|
|
12
|
-
exports.computePackageContentDigest = computePackageContentDigest;
|
|
13
|
-
exports.findPackageTreeDifference = findPackageTreeDifference;
|
|
14
|
-
exports.computePackageTreeSignature = computePackageTreeSignature;
|
|
15
|
-
exports.getLockfileOverride = getLockfileOverride;
|
|
16
|
-
exports.getLockfileRootImporterDependency = getLockfileRootImporterDependency;
|
|
17
|
-
exports.getLockfileSnapshotVariants = getLockfileSnapshotVariants;
|
|
18
|
-
exports.findNewPeerVariantDuplicates = findNewPeerVariantDuplicates;
|
|
19
|
-
const node_crypto_1 = require("node:crypto");
|
|
20
|
-
const promises_1 = require("node:fs/promises");
|
|
21
|
-
const node_path_1 = require("node:path");
|
|
22
|
-
/**
|
|
23
|
-
* Loom repository paths whose content can change the generated npm package.
|
|
24
|
-
* Release equivalence (`git diff`) and local build fingerprints share this list.
|
|
25
|
-
* It includes every script `scripts/build_npm.ts` imports.
|
|
26
|
-
*/
|
|
27
|
-
exports.LOOM_PACKAGE_RELEVANT_PATHS = [
|
|
28
|
-
"LICENSE",
|
|
29
|
-
"NOTICE",
|
|
30
|
-
"README.md",
|
|
31
|
-
"THIRD_PARTY_NOTICES.md",
|
|
32
|
-
"bin",
|
|
33
|
-
"deno.json",
|
|
34
|
-
"deno.lock",
|
|
35
|
-
"mod.ts",
|
|
36
|
-
"runtime",
|
|
37
|
-
"scripts/browser_entrypoints.ts",
|
|
38
|
-
"scripts/build_npm.ts",
|
|
39
|
-
"scripts/git_visible_copy.ts",
|
|
40
|
-
"scripts/node_check_dependencies.ts",
|
|
41
|
-
"scripts/npm_package.ts",
|
|
42
|
-
"skills",
|
|
43
|
-
"src",
|
|
44
|
-
];
|
|
45
|
-
/**
|
|
46
|
-
* Build stamp written into Loom's `npm/` output by `scripts/build_npm.ts`.
|
|
47
|
-
* The build excludes it from the packed package, so it never reaches npm or a
|
|
48
|
-
* consumer's `node_modules`.
|
|
49
|
-
*/
|
|
50
|
-
exports.LOOM_BUILD_STAMP_FILE = ".loom-build.json";
|
|
51
|
-
/**
|
|
52
|
-
* Asks git for a checkout's HEAD commit and whether its working tree differs
|
|
53
|
-
* from it: tracked changes, untracked files that are not ignored (listed
|
|
54
|
-
* individually, whatever `status.showUntrackedFiles` says), or files marked
|
|
55
|
-
* skip-worktree or assume-unchanged, whose changes `git status` hides.
|
|
56
|
-
* `git` runs one git command in the checkout and returns its stdout, or null
|
|
57
|
-
* when it failed (git missing, not a repository). Whatever git cannot answer
|
|
58
|
-
* is null.
|
|
59
|
-
*/
|
|
60
|
-
function readLoomSourceProvenance(git) {
|
|
61
|
-
const head = git(["rev-parse", "HEAD"])?.trim() ?? "";
|
|
62
|
-
if (!/^[0-9a-f]{40,64}$/.test(head)) {
|
|
63
|
-
return { sourceCommit: null, sourceDirty: null };
|
|
64
|
-
}
|
|
65
|
-
const status = git(["status", "--porcelain", "--untracked-files=all"]);
|
|
66
|
-
// `ls-files -v` tags skip-worktree files S and assume-unchanged files with
|
|
67
|
-
// a lowercase letter.
|
|
68
|
-
const tags = status === null ? null : git(["ls-files", "-v"]);
|
|
69
|
-
return {
|
|
70
|
-
sourceCommit: head,
|
|
71
|
-
sourceDirty: status === null || tags === null
|
|
72
|
-
? null
|
|
73
|
-
: status.trim() !== "" ||
|
|
74
|
-
tags.split("\n").some((line) => /^(?:S|[a-z]) /.test(line)),
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Settles a build's provenance from what git reported when the build started
|
|
79
|
-
* and when it finished. Any change in between (a commit, a checkout, an
|
|
80
|
-
* edit, which `sourcesChanged` reports from the source fingerprints, or git
|
|
81
|
-
* becoming unable to tell) means the output may mix two states, so the build
|
|
82
|
-
* is stamped dirty, which `loom dev published` refuses; the starting commit
|
|
83
|
-
* is kept. A start git could not read stays unknown.
|
|
84
|
-
*/
|
|
85
|
-
function settleLoomBuildProvenance(start, end, sourcesChanged) {
|
|
86
|
-
const changedDuringBuild = sourcesChanged ||
|
|
87
|
-
end.sourceCommit !== start.sourceCommit ||
|
|
88
|
-
end.sourceDirty !== start.sourceDirty;
|
|
89
|
-
const provenance = changedDuringBuild && start.sourceCommit !== null
|
|
90
|
-
? { sourceCommit: start.sourceCommit, sourceDirty: true }
|
|
91
|
-
: start;
|
|
92
|
-
return { changedDuringBuild, provenance };
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Whether a stamp records the build's provenance and output digest. Stamps
|
|
96
|
-
* from older build scripts lack them.
|
|
97
|
-
*/
|
|
98
|
-
function hasLoomBuildProvenance(stamp) {
|
|
99
|
-
return stamp.sourceCommit !== undefined && stamp.sourceDirty !== undefined &&
|
|
100
|
-
typeof stamp.packageDigest === "string";
|
|
101
|
-
}
|
|
102
|
-
const SOURCE_FINGERPRINT_SKIPPED_DIRS = new Set([
|
|
103
|
-
".git",
|
|
104
|
-
"coverage",
|
|
105
|
-
"node_modules",
|
|
106
|
-
"npm",
|
|
107
|
-
]);
|
|
108
|
-
// dnt builds with `test: false`, so test-only edits cannot change the output.
|
|
109
|
-
const SOURCE_FINGERPRINT_SKIPPED_FILE = /\.test\.[cm]?[jt]sx?$/;
|
|
110
|
-
function compareNames(left, right) {
|
|
111
|
-
return left < right ? -1 : left > right ? 1 : 0;
|
|
112
|
-
}
|
|
113
|
-
function isMissingPathError(error) {
|
|
114
|
-
const code = error?.code;
|
|
115
|
-
return code === "ENOENT" || code === "ENOTDIR";
|
|
116
|
-
}
|
|
117
|
-
async function statIfExists(path) {
|
|
118
|
-
try {
|
|
119
|
-
return await (0, promises_1.stat)(path);
|
|
120
|
-
}
|
|
121
|
-
catch (error) {
|
|
122
|
-
if (isMissingPathError(error))
|
|
123
|
-
return null;
|
|
124
|
-
throw error;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Lists the package-relevant source files of a Loom checkout in fingerprint
|
|
129
|
-
* order, with their stats. Test files and build outputs are skipped.
|
|
130
|
-
*/
|
|
131
|
-
async function listLoomSourceFiles(sourceRoot) {
|
|
132
|
-
const files = [];
|
|
133
|
-
const visit = async (relativePath) => {
|
|
134
|
-
const pathStat = await statIfExists((0, node_path_1.join)(sourceRoot, relativePath));
|
|
135
|
-
if (!pathStat)
|
|
136
|
-
return;
|
|
137
|
-
if (pathStat.isDirectory()) {
|
|
138
|
-
const entries = (await (0, promises_1.readdir)((0, node_path_1.join)(sourceRoot, relativePath)))
|
|
139
|
-
.sort(compareNames);
|
|
140
|
-
for (const name of entries) {
|
|
141
|
-
if (SOURCE_FINGERPRINT_SKIPPED_DIRS.has(name))
|
|
142
|
-
continue;
|
|
143
|
-
await visit(`${relativePath}/${name}`);
|
|
144
|
-
}
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
if (pathStat.isFile() && !SOURCE_FINGERPRINT_SKIPPED_FILE.test(relativePath)) {
|
|
148
|
-
files.push({ path: relativePath, stat: pathStat });
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
for (const path of [...exports.LOOM_PACKAGE_RELEVANT_PATHS].sort(compareNames)) {
|
|
152
|
-
await visit(path);
|
|
153
|
-
}
|
|
154
|
-
return files;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Hashes the content of every package-relevant file in a Loom checkout.
|
|
158
|
-
* Unlike modification times, the result changes exactly when a rebuild could
|
|
159
|
-
* produce a different package, including after checkouts that restore older
|
|
160
|
-
* timestamps and edits made while a build is running.
|
|
161
|
-
*/
|
|
162
|
-
async function computeLoomSourceFingerprint(sourceRoot) {
|
|
163
|
-
const hash = (0, node_crypto_1.createHash)("sha256");
|
|
164
|
-
hash.update("loom-source-fingerprint:1\n");
|
|
165
|
-
for (const { path } of await listLoomSourceFiles(sourceRoot)) {
|
|
166
|
-
const content = await (0, promises_1.readFile)((0, node_path_1.join)(sourceRoot, path));
|
|
167
|
-
hash.update(`${path}\0${content.length}\0`);
|
|
168
|
-
hash.update(content);
|
|
169
|
-
hash.update("\0");
|
|
170
|
-
}
|
|
171
|
-
return `sha256:${hash.digest("hex")}`;
|
|
172
|
-
}
|
|
173
|
-
/** Records {@link LoomSourceSnapshot} for a Loom checkout. */
|
|
174
|
-
async function snapshotLoomSources(sourceRoot) {
|
|
175
|
-
return new Map((await listLoomSourceFiles(sourceRoot)).map(({ path, stat }) => [
|
|
176
|
-
path,
|
|
177
|
-
{ mtimeMs: stat.mtimeMs, size: stat.size },
|
|
178
|
-
]));
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* How far before a build's start a whole-second modification time still
|
|
182
|
-
* counts as possibly written during it: FAT stores even seconds, and
|
|
183
|
-
* timestamps are rounded down to the filesystem's granularity.
|
|
184
|
-
*/
|
|
185
|
-
const COARSE_MTIME_MARGIN_MS = 2_500;
|
|
186
|
-
/**
|
|
187
|
-
* Whether any package-relevant source file was written while a build ran,
|
|
188
|
-
* from snapshots taken when it started (at `startedAtMs`) and when it
|
|
189
|
-
* finished. Content alone misses an edit that was reverted before the build
|
|
190
|
-
* finished, but the revert rewrites the file:
|
|
191
|
-
* - a file added, removed, resized or with a new modification time counts;
|
|
192
|
-
* - so does one modified at or after the start;
|
|
193
|
-
* - on filesystems with coarse timestamps (a whole-second modification time)
|
|
194
|
-
* an edit can keep the old value, so a file modified shortly before the
|
|
195
|
-
* start counts as well.
|
|
196
|
-
*/
|
|
197
|
-
function loomSourcesWrittenDuringBuild(start, end, startedAtMs) {
|
|
198
|
-
if (start.size !== end.size)
|
|
199
|
-
return true;
|
|
200
|
-
for (const [path, after] of end) {
|
|
201
|
-
const before = start.get(path);
|
|
202
|
-
if (!before || before.size !== after.size ||
|
|
203
|
-
before.mtimeMs !== after.mtimeMs || after.mtimeMs >= startedAtMs) {
|
|
204
|
-
return true;
|
|
205
|
-
}
|
|
206
|
-
if (after.mtimeMs % 1000 === 0 &&
|
|
207
|
-
after.mtimeMs >= startedAtMs - COARSE_MTIME_MARGIN_MS) {
|
|
208
|
-
return true;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
return false;
|
|
212
|
-
}
|
|
213
|
-
/** Serializes the build stamp that `scripts/build_npm.ts` writes. */
|
|
214
|
-
function formatLoomBuildStamp(stamp) {
|
|
215
|
-
const value = { version: 1, ...stamp };
|
|
216
|
-
return `${JSON.stringify(value, null, 2)}\n`;
|
|
217
|
-
}
|
|
218
|
-
/** Reads a build stamp, returning null when it is absent or unrecognized. */
|
|
219
|
-
async function readLoomBuildStamp(packagePath) {
|
|
220
|
-
let text;
|
|
221
|
-
try {
|
|
222
|
-
text = await (0, promises_1.readFile)((0, node_path_1.join)(packagePath, exports.LOOM_BUILD_STAMP_FILE), "utf8");
|
|
223
|
-
}
|
|
224
|
-
catch (error) {
|
|
225
|
-
if (isMissingPathError(error))
|
|
226
|
-
return null;
|
|
227
|
-
throw error;
|
|
228
|
-
}
|
|
229
|
-
try {
|
|
230
|
-
const stamp = JSON.parse(text);
|
|
231
|
-
const commitOk = stamp.sourceCommit === undefined ||
|
|
232
|
-
stamp.sourceCommit === null || typeof stamp.sourceCommit === "string";
|
|
233
|
-
const dirtyOk = stamp.sourceDirty === undefined ||
|
|
234
|
-
stamp.sourceDirty === null || typeof stamp.sourceDirty === "boolean";
|
|
235
|
-
const digestOk = stamp.packageDigest === undefined ||
|
|
236
|
-
typeof stamp.packageDigest === "string";
|
|
237
|
-
const legacyOk = stamp.legacyBuildFingerprint === undefined ||
|
|
238
|
-
typeof stamp.legacyBuildFingerprint === "string";
|
|
239
|
-
return stamp.version === 1 &&
|
|
240
|
-
typeof stamp.sourceFingerprint === "string" && commitOk && dirtyOk &&
|
|
241
|
-
digestOk && legacyOk
|
|
242
|
-
? stamp
|
|
243
|
-
: null;
|
|
244
|
-
}
|
|
245
|
-
catch {
|
|
246
|
-
return null;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
/** Names npm packing, and so pnpm's directory import, always leaves out. */
|
|
250
|
-
const ALWAYS_UNPACKED_NAMES = new Set([
|
|
251
|
-
"CVS",
|
|
252
|
-
"config.gypi",
|
|
253
|
-
"node_modules",
|
|
254
|
-
"npm-debug.log",
|
|
255
|
-
"package-lock.json",
|
|
256
|
-
]);
|
|
257
|
-
async function readTextOrNull(path) {
|
|
258
|
-
try {
|
|
259
|
-
return await (0, promises_1.readFile)(path, "utf8");
|
|
260
|
-
}
|
|
261
|
-
catch (error) {
|
|
262
|
-
if (isMissingPathError(error))
|
|
263
|
-
return null;
|
|
264
|
-
throw error;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* Reads the root ignore rules npm packing applies to a package directory
|
|
269
|
-
* (`.npmignore`, else `.gitignore`). Only literal names are understood, which
|
|
270
|
-
* covers the `.npmignore` dnt writes; globs, nested paths, negations, and a
|
|
271
|
-
* `files` allowlist return null so callers fall back to a weaker comparison.
|
|
272
|
-
*/
|
|
273
|
-
async function readPackExclusions(root) {
|
|
274
|
-
try {
|
|
275
|
-
const packageJson = JSON.parse(await readTextOrNull((0, node_path_1.join)(root, "package.json")) ?? "{}");
|
|
276
|
-
if (packageJson.files !== undefined)
|
|
277
|
-
return null;
|
|
278
|
-
}
|
|
279
|
-
catch {
|
|
280
|
-
return null;
|
|
281
|
-
}
|
|
282
|
-
const ignoreText = await readTextOrNull((0, node_path_1.join)(root, ".npmignore")) ??
|
|
283
|
-
await readTextOrNull((0, node_path_1.join)(root, ".gitignore")) ?? "";
|
|
284
|
-
const exclusions = {
|
|
285
|
-
anyDepth: new Set(),
|
|
286
|
-
topLevel: new Set(),
|
|
287
|
-
};
|
|
288
|
-
for (const rawLine of ignoreText.split(/\r?\n/)) {
|
|
289
|
-
const line = rawLine.trim();
|
|
290
|
-
if (line === "" || line.startsWith("#"))
|
|
291
|
-
continue;
|
|
292
|
-
if (line.startsWith("!"))
|
|
293
|
-
return null;
|
|
294
|
-
const anchored = line.startsWith("/");
|
|
295
|
-
const name = line.replace(/^\/+/, "").replace(/\/+$/, "");
|
|
296
|
-
if (name === "")
|
|
297
|
-
continue;
|
|
298
|
-
if (/[*?[\]\\/]/.test(name))
|
|
299
|
-
return null;
|
|
300
|
-
(anchored ? exclusions.topLevel : exclusions.anyDepth).add(name);
|
|
301
|
-
}
|
|
302
|
-
return exclusions;
|
|
303
|
-
}
|
|
304
|
-
function isPackedEntry(name, anyDepthExclusions) {
|
|
305
|
-
// Dot entries cover npm's other always-ignored names (.git, .npmrc, ...)
|
|
306
|
-
// and the ignore files themselves.
|
|
307
|
-
return !name.startsWith(".") && !ALWAYS_UNPACKED_NAMES.has(name) &&
|
|
308
|
-
!name.endsWith(".orig") && !anyDepthExclusions.has(name);
|
|
309
|
-
}
|
|
310
|
-
async function collectPackageFiles(root, includeTopLevel, anyDepthExclusions) {
|
|
311
|
-
const files = new Map();
|
|
312
|
-
let nestedIgnoreFile = false;
|
|
313
|
-
const visit = async (relativePath) => {
|
|
314
|
-
const directory = relativePath ? (0, node_path_1.join)(root, relativePath) : root;
|
|
315
|
-
const entries = (await (0, promises_1.readdir)(directory, { withFileTypes: true }))
|
|
316
|
-
.sort((left, right) => compareNames(left.name, right.name));
|
|
317
|
-
for (const entry of entries) {
|
|
318
|
-
if (relativePath &&
|
|
319
|
-
(entry.name === ".npmignore" || entry.name === ".gitignore")) {
|
|
320
|
-
nestedIgnoreFile = true;
|
|
321
|
-
}
|
|
322
|
-
if (!isPackedEntry(entry.name, anyDepthExclusions))
|
|
323
|
-
continue;
|
|
324
|
-
if (!relativePath && !includeTopLevel(entry.name))
|
|
325
|
-
continue;
|
|
326
|
-
const childPath = relativePath
|
|
327
|
-
? `${relativePath}/${entry.name}`
|
|
328
|
-
: entry.name;
|
|
329
|
-
let isDirectory = entry.isDirectory();
|
|
330
|
-
let isFile = entry.isFile();
|
|
331
|
-
let fileStat = { ino: 0, mtimeMs: 0, size: 0 };
|
|
332
|
-
if (entry.isSymbolicLink() || isFile) {
|
|
333
|
-
const childStat = await statIfExists((0, node_path_1.join)(root, childPath));
|
|
334
|
-
if (!childStat)
|
|
335
|
-
continue;
|
|
336
|
-
isDirectory = childStat.isDirectory();
|
|
337
|
-
isFile = childStat.isFile();
|
|
338
|
-
fileStat = {
|
|
339
|
-
ino: childStat.ino,
|
|
340
|
-
mtimeMs: childStat.mtimeMs,
|
|
341
|
-
size: childStat.size,
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
if (isDirectory) {
|
|
345
|
-
await visit(childPath);
|
|
346
|
-
}
|
|
347
|
-
else if (isFile) {
|
|
348
|
-
files.set(childPath, fileStat);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
};
|
|
352
|
-
await visit("");
|
|
353
|
-
return { files, nestedIgnoreFile };
|
|
354
|
-
}
|
|
355
|
-
/**
|
|
356
|
-
* Digest of a built package's files by path and content, filtered as
|
|
357
|
-
* {@link findPackageTreeDifference} filters them: its root ignore rules,
|
|
358
|
-
* npm's always-ignored names, and every dot entry, which Loom's packing
|
|
359
|
-
* approximation treats as unpacked although npm would pack some. The build
|
|
360
|
-
* stamp records it, so any later edit to those files shows.
|
|
361
|
-
*/
|
|
362
|
-
async function computePackageContentDigest(root) {
|
|
363
|
-
let exclusions = await readPackExclusions(root);
|
|
364
|
-
const collect = () => collectPackageFiles(root, (name) => !exclusions?.topLevel.has(name), exclusions?.anyDepth ?? new Set());
|
|
365
|
-
let collected = await collect();
|
|
366
|
-
if (exclusions && collected.nestedIgnoreFile) {
|
|
367
|
-
// As in findPackageTreeDifference: nested rules are not applied.
|
|
368
|
-
exclusions = null;
|
|
369
|
-
collected = await collect();
|
|
370
|
-
}
|
|
371
|
-
const hash = (0, node_crypto_1.createHash)("sha256");
|
|
372
|
-
hash.update("loom-package-digest:1\n");
|
|
373
|
-
for (const path of [...collected.files.keys()].sort(compareNames)) {
|
|
374
|
-
const content = await (0, promises_1.readFile)((0, node_path_1.join)(root, path));
|
|
375
|
-
hash.update(`${path}\0${content.length}\0`);
|
|
376
|
-
hash.update(content);
|
|
377
|
-
hash.update("\0");
|
|
378
|
-
}
|
|
379
|
-
return `sha256:${hash.digest("hex")}`;
|
|
380
|
-
}
|
|
381
|
-
/**
|
|
382
|
-
* Compares a built package directory with the copy a package manager
|
|
383
|
-
* installed from it, by file list and byte content. Returns a short
|
|
384
|
-
* description of the first difference, or null when the installed copy
|
|
385
|
-
* matches.
|
|
386
|
-
*
|
|
387
|
-
* Both trees are filtered by the build's packing rules (its root
|
|
388
|
-
* `.npmignore` plus npm's always-ignored names), so a build that only adds a
|
|
389
|
-
* new top-level entry is still detected. When those rules cannot be read
|
|
390
|
-
* literally, top-level build entries absent from the installed copy are
|
|
391
|
-
* skipped instead.
|
|
392
|
-
*/
|
|
393
|
-
async function findPackageTreeDifference(builtRoot, installedRoot) {
|
|
394
|
-
const installedTopLevel = await (0, promises_1.readdir)(installedRoot).catch((error) => {
|
|
395
|
-
if (isMissingPathError(error))
|
|
396
|
-
return null;
|
|
397
|
-
throw error;
|
|
398
|
-
});
|
|
399
|
-
if (!installedTopLevel?.includes("package.json")) {
|
|
400
|
-
return "the package is not installed";
|
|
401
|
-
}
|
|
402
|
-
const installedNames = new Set(installedTopLevel);
|
|
403
|
-
const collect = (exclusions) => {
|
|
404
|
-
const includeTopLevel = exclusions
|
|
405
|
-
? (name) => !exclusions.topLevel.has(name)
|
|
406
|
-
: (name) => installedNames.has(name);
|
|
407
|
-
const anyDepth = exclusions?.anyDepth ?? new Set();
|
|
408
|
-
return Promise.all([
|
|
409
|
-
collectPackageFiles(builtRoot, includeTopLevel, anyDepth),
|
|
410
|
-
collectPackageFiles(installedRoot, includeTopLevel, anyDepth),
|
|
411
|
-
]);
|
|
412
|
-
};
|
|
413
|
-
let exclusions = await readPackExclusions(builtRoot);
|
|
414
|
-
let [built, installed] = await collect(exclusions);
|
|
415
|
-
if (exclusions && built.nestedIgnoreFile) {
|
|
416
|
-
// Nested ignore files add rules this reader does not apply.
|
|
417
|
-
exclusions = null;
|
|
418
|
-
[built, installed] = await collect(exclusions);
|
|
419
|
-
}
|
|
420
|
-
const builtFiles = built.files;
|
|
421
|
-
const installedFiles = installed.files;
|
|
422
|
-
for (const path of builtFiles.keys()) {
|
|
423
|
-
if (!installedFiles.has(path))
|
|
424
|
-
return `${path} is not installed`;
|
|
425
|
-
}
|
|
426
|
-
for (const path of installedFiles.keys()) {
|
|
427
|
-
if (!builtFiles.has(path))
|
|
428
|
-
return `${path} is no longer built`;
|
|
429
|
-
}
|
|
430
|
-
for (const [path, { size }] of builtFiles) {
|
|
431
|
-
if (installedFiles.get(path)?.size !== size)
|
|
432
|
-
return `${path} differs`;
|
|
433
|
-
}
|
|
434
|
-
for (const path of builtFiles.keys()) {
|
|
435
|
-
const [builtContent, installedContent] = await Promise.all([
|
|
436
|
-
(0, promises_1.readFile)((0, node_path_1.join)(builtRoot, path)),
|
|
437
|
-
(0, promises_1.readFile)((0, node_path_1.join)(installedRoot, path)),
|
|
438
|
-
]);
|
|
439
|
-
if (!builtContent.equals(installedContent))
|
|
440
|
-
return `${path} differs`;
|
|
441
|
-
}
|
|
442
|
-
return null;
|
|
443
|
-
}
|
|
444
|
-
/**
|
|
445
|
-
* Cheap signature of an installed package tree: its real path plus each
|
|
446
|
-
* file's path, size, inode, and modification time (no file contents), or
|
|
447
|
-
* null when it is not installed. pnpm links unchanged files from its
|
|
448
|
-
* content-addressed store, so the signature changes when the package is
|
|
449
|
-
* replaced with different content. Lets a process tell whether the package
|
|
450
|
-
* it loaded was replaced later.
|
|
451
|
-
*/
|
|
452
|
-
async function computePackageTreeSignature(root) {
|
|
453
|
-
const topLevel = await (0, promises_1.readdir)(root).catch((error) => {
|
|
454
|
-
if (isMissingPathError(error))
|
|
455
|
-
return null;
|
|
456
|
-
throw error;
|
|
457
|
-
});
|
|
458
|
-
if (!topLevel?.includes("package.json"))
|
|
459
|
-
return null;
|
|
460
|
-
const { files } = await collectPackageFiles(root, () => true, new Set());
|
|
461
|
-
const hash = (0, node_crypto_1.createHash)("sha256");
|
|
462
|
-
hash.update(`${await (0, promises_1.realpath)(root)}\n`);
|
|
463
|
-
for (const [path, { ino, mtimeMs, size }] of files) {
|
|
464
|
-
hash.update(`${path}\0${size}\0${ino}\0${mtimeMs}\n`);
|
|
465
|
-
}
|
|
466
|
-
return `stat:${hash.digest("hex")}`;
|
|
467
|
-
}
|
|
468
|
-
function unquoteYamlScalar(value) {
|
|
469
|
-
const trimmed = value.trim();
|
|
470
|
-
if (trimmed.startsWith("'") && trimmed.endsWith("'") && trimmed.length > 1) {
|
|
471
|
-
return trimmed.slice(1, -1).replaceAll("''", "'");
|
|
472
|
-
}
|
|
473
|
-
if (trimmed.startsWith('"') && trimmed.endsWith('"') && trimmed.length > 1) {
|
|
474
|
-
try {
|
|
475
|
-
return JSON.parse(trimmed);
|
|
476
|
-
}
|
|
477
|
-
catch {
|
|
478
|
-
return trimmed.slice(1, -1);
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
return trimmed;
|
|
482
|
-
}
|
|
483
|
-
/** Splits `key: value` YAML mapping lines at the given indentation. */
|
|
484
|
-
function parseYamlMappingLine(line, indent) {
|
|
485
|
-
const prefix = " ".repeat(indent);
|
|
486
|
-
if (!line.startsWith(prefix) || line[indent] === " ")
|
|
487
|
-
return null;
|
|
488
|
-
const body = line.slice(indent);
|
|
489
|
-
if (body.startsWith("#"))
|
|
490
|
-
return null;
|
|
491
|
-
const match = body.match(/^(?:'((?:[^']|'')*)'|"((?:[^"\\]|\\.)*)"|([^\s'"#][^\s]*?)):(?:\s+(.*))?$/);
|
|
492
|
-
if (!match)
|
|
493
|
-
return null;
|
|
494
|
-
const key = match[1] !== undefined
|
|
495
|
-
? match[1].replaceAll("''", "'")
|
|
496
|
-
: match[2] !== undefined
|
|
497
|
-
? unquoteYamlScalar(`"${match[2]}"`)
|
|
498
|
-
: match[3];
|
|
499
|
-
return { key, value: match[4] === undefined ? "" : match[4] };
|
|
500
|
-
}
|
|
501
|
-
/**
|
|
502
|
-
* Returns the project document of a lockfile. With `configDependencies`,
|
|
503
|
-
* pnpm 11 writes a multi-document lockfile whose first document locks the
|
|
504
|
-
* config-dependency environment and has its own importers and snapshots;
|
|
505
|
-
* the project document, which carries `settings:`, comes last.
|
|
506
|
-
*/
|
|
507
|
-
function getMainLockfileDocument(lockfileText) {
|
|
508
|
-
const documents = lockfileText.replace(/\r\n/g, "\n")
|
|
509
|
-
.split(/^---[ \t]*$/m)
|
|
510
|
-
.filter((document) => document.trim() !== "");
|
|
511
|
-
if (documents.length <= 1)
|
|
512
|
-
return documents[0] ?? "";
|
|
513
|
-
for (let index = documents.length - 1; index >= 0; index -= 1) {
|
|
514
|
-
if (/^settings:/m.test(documents[index]))
|
|
515
|
-
return documents[index];
|
|
516
|
-
}
|
|
517
|
-
return documents[documents.length - 1];
|
|
518
|
-
}
|
|
519
|
-
/** Returns the lines of a top-level section of a pnpm lockfile. */
|
|
520
|
-
function getLockfileSection(lockfileText, section) {
|
|
521
|
-
const lines = getMainLockfileDocument(lockfileText).split("\n");
|
|
522
|
-
const start = lines.indexOf(`${section}:`);
|
|
523
|
-
if (start === -1)
|
|
524
|
-
return [];
|
|
525
|
-
const body = [];
|
|
526
|
-
for (const line of lines.slice(start + 1)) {
|
|
527
|
-
if (line !== "" && !line.startsWith(" ") && !line.startsWith("#"))
|
|
528
|
-
break;
|
|
529
|
-
body.push(line);
|
|
530
|
-
}
|
|
531
|
-
return body;
|
|
532
|
-
}
|
|
533
|
-
/**
|
|
534
|
-
* Reads the override pnpm recorded for a package in the lockfile's top-level
|
|
535
|
-
* `overrides:` map. pnpm records the override map it actually applied, so
|
|
536
|
-
* this proves whether an override took effect.
|
|
537
|
-
*/
|
|
538
|
-
function getLockfileOverride(lockfileText, name) {
|
|
539
|
-
for (const line of getLockfileSection(lockfileText, "overrides")) {
|
|
540
|
-
const entry = parseYamlMappingLine(line, 2);
|
|
541
|
-
if (entry?.key === name)
|
|
542
|
-
return unquoteYamlScalar(entry.value);
|
|
543
|
-
}
|
|
544
|
-
return null;
|
|
545
|
-
}
|
|
546
|
-
/** Reads a direct dependency of the root importer (`.`) from a lockfile. */
|
|
547
|
-
function getLockfileRootImporterDependency(lockfileText, name) {
|
|
548
|
-
let inRootImporter = false;
|
|
549
|
-
let inDependency = false;
|
|
550
|
-
const result = {};
|
|
551
|
-
for (const line of getLockfileSection(lockfileText, "importers")) {
|
|
552
|
-
const importer = parseYamlMappingLine(line, 2);
|
|
553
|
-
if (importer) {
|
|
554
|
-
if (inDependency)
|
|
555
|
-
break;
|
|
556
|
-
inRootImporter = importer.key === ".";
|
|
557
|
-
continue;
|
|
558
|
-
}
|
|
559
|
-
if (!inRootImporter)
|
|
560
|
-
continue;
|
|
561
|
-
if (parseYamlMappingLine(line, 4)) {
|
|
562
|
-
if (inDependency)
|
|
563
|
-
break;
|
|
564
|
-
continue;
|
|
565
|
-
}
|
|
566
|
-
const dependency = parseYamlMappingLine(line, 6);
|
|
567
|
-
if (dependency) {
|
|
568
|
-
if (inDependency)
|
|
569
|
-
break;
|
|
570
|
-
inDependency = dependency.key === name;
|
|
571
|
-
continue;
|
|
572
|
-
}
|
|
573
|
-
const field = inDependency ? parseYamlMappingLine(line, 8) : null;
|
|
574
|
-
if (field?.key === "specifier") {
|
|
575
|
-
result.specifier = unquoteYamlScalar(field.value);
|
|
576
|
-
}
|
|
577
|
-
else if (field?.key === "version") {
|
|
578
|
-
result.version = unquoteYamlScalar(field.value);
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
return result.specifier !== undefined || result.version !== undefined
|
|
582
|
-
? result
|
|
583
|
-
: null;
|
|
584
|
-
}
|
|
585
|
-
/**
|
|
586
|
-
* Groups lockfile snapshot keys by `name@version`, collecting the peer (and
|
|
587
|
-
* patch) suffix of each variant, for example `(react@19.2.0)`.
|
|
588
|
-
*/
|
|
589
|
-
function getLockfileSnapshotVariants(lockfileText) {
|
|
590
|
-
const variants = new Map();
|
|
591
|
-
const section = getLockfileSection(lockfileText, "snapshots");
|
|
592
|
-
// Lockfile v6 and older kept peer variants in `packages:` with a `/` prefix.
|
|
593
|
-
const lines = section.length
|
|
594
|
-
? section
|
|
595
|
-
: getLockfileSection(lockfileText, "packages");
|
|
596
|
-
for (const line of lines) {
|
|
597
|
-
const entry = parseYamlMappingLine(line, 2);
|
|
598
|
-
if (!entry)
|
|
599
|
-
continue;
|
|
600
|
-
const key = entry.key.replace(/^\//, "");
|
|
601
|
-
const versionSeparator = key.indexOf("@", key.startsWith("@") ? 1 : 0);
|
|
602
|
-
if (versionSeparator <= 0)
|
|
603
|
-
continue;
|
|
604
|
-
const suffixStart = key.indexOf("(", versionSeparator);
|
|
605
|
-
const base = suffixStart === -1 ? key : key.slice(0, suffixStart);
|
|
606
|
-
const suffix = suffixStart === -1 ? "" : key.slice(suffixStart);
|
|
607
|
-
const set = variants.get(base) ?? new Set();
|
|
608
|
-
set.add(suffix);
|
|
609
|
-
variants.set(base, set);
|
|
610
|
-
}
|
|
611
|
-
return variants;
|
|
612
|
-
}
|
|
613
|
-
/**
|
|
614
|
-
* Lists `name@version` entries that have more than one peer variant after a
|
|
615
|
-
* lockfile change and more variants than before it. Pre-existing duplicates
|
|
616
|
-
* are ignored so warnings point only at what the change introduced.
|
|
617
|
-
*/
|
|
618
|
-
function findNewPeerVariantDuplicates(beforeLockfileText, afterLockfileText) {
|
|
619
|
-
const before = beforeLockfileText
|
|
620
|
-
? getLockfileSnapshotVariants(beforeLockfileText)
|
|
621
|
-
: new Map();
|
|
622
|
-
const after = getLockfileSnapshotVariants(afterLockfileText);
|
|
623
|
-
const duplicates = [];
|
|
624
|
-
for (const [packageVersion, variants] of after) {
|
|
625
|
-
const beforeCount = before.get(packageVersion)?.size ?? 0;
|
|
626
|
-
if (variants.size > 1 && variants.size > beforeCount) {
|
|
627
|
-
duplicates.push({
|
|
628
|
-
after: variants.size,
|
|
629
|
-
before: beforeCount,
|
|
630
|
-
packageVersion,
|
|
631
|
-
});
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
return duplicates.sort((left, right) => compareNames(left.packageVersion, right.packageVersion));
|
|
635
|
-
}
|