alepha 0.21.2 → 0.23.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/README.md +0 -1
- package/dist/api/audits/index.browser.js.map +1 -1
- package/dist/api/audits/index.d.ts +393 -403
- package/dist/api/audits/index.d.ts.map +1 -1
- package/dist/api/audits/index.js +25 -56
- package/dist/api/audits/index.js.map +1 -1
- package/dist/api/files/index.browser.js +31 -1
- package/dist/api/files/index.browser.js.map +1 -1
- package/dist/api/files/index.d.ts +313 -208
- package/dist/api/files/index.d.ts.map +1 -1
- package/dist/api/files/index.js +152 -42
- package/dist/api/files/index.js.map +1 -1
- package/dist/api/jobs/index.browser.js +2 -2
- package/dist/api/jobs/index.browser.js.map +1 -1
- package/dist/api/jobs/index.d.ts +282 -285
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/jobs/index.js +39 -33
- package/dist/api/jobs/index.js.map +1 -1
- package/dist/api/keys/index.d.ts +217 -222
- package/dist/api/keys/index.d.ts.map +1 -1
- package/dist/api/keys/index.js.map +1 -1
- package/dist/api/notifications/index.browser.js.map +1 -1
- package/dist/api/notifications/index.d.ts +188 -195
- package/dist/api/notifications/index.d.ts.map +1 -1
- package/dist/api/notifications/index.js.map +1 -1
- package/dist/api/oauth/index.d.ts +71 -76
- package/dist/api/oauth/index.d.ts.map +1 -1
- package/dist/api/oauth/index.js.map +1 -1
- package/dist/api/organizations/index.browser.js.map +1 -1
- package/dist/api/organizations/index.d.ts +104 -109
- package/dist/api/organizations/index.d.ts.map +1 -1
- package/dist/api/organizations/index.js.map +1 -1
- package/dist/api/parameters/index.browser.js +43 -16
- package/dist/api/parameters/index.browser.js.map +1 -1
- package/dist/api/parameters/index.d.ts +488 -344
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/parameters/index.js +175 -35
- package/dist/api/parameters/index.js.map +1 -1
- package/dist/api/payments/index.d.ts +396 -402
- package/dist/api/payments/index.d.ts.map +1 -1
- package/dist/api/payments/index.js.map +1 -1
- package/dist/api/subscriptions/index.d.ts +644 -652
- package/dist/api/subscriptions/index.d.ts.map +1 -1
- package/dist/api/subscriptions/index.js +1 -1
- package/dist/api/subscriptions/index.js.map +1 -1
- package/dist/api/users/index.browser.js +7 -0
- package/dist/api/users/index.browser.js.map +1 -1
- package/dist/api/users/index.d.ts +1106 -1005
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +307 -64
- package/dist/api/users/index.js.map +1 -1
- package/dist/api/verifications/index.browser.js.map +1 -1
- package/dist/api/verifications/index.d.ts +137 -143
- package/dist/api/verifications/index.d.ts.map +1 -1
- package/dist/api/verifications/index.js.map +1 -1
- package/dist/background/index.d.ts +95 -0
- package/dist/background/index.d.ts.map +1 -0
- package/dist/background/index.js +121 -0
- package/dist/background/index.js.map +1 -0
- package/dist/background/index.workerd.js +110 -0
- package/dist/background/index.workerd.js.map +1 -0
- package/dist/batch/index.d.ts +5 -7
- package/dist/batch/index.d.ts.map +1 -1
- package/dist/batch/index.js.map +1 -1
- package/dist/bin/index.js.map +1 -1
- package/dist/bucket/index.d.ts +76 -54
- package/dist/bucket/index.d.ts.map +1 -1
- package/dist/bucket/index.js +58 -11
- package/dist/bucket/index.js.map +1 -1
- package/dist/bucket/index.workerd.js +200 -5
- package/dist/bucket/index.workerd.js.map +1 -1
- package/dist/cache/core/index.d.ts +7 -10
- package/dist/cache/core/index.d.ts.map +1 -1
- package/dist/cache/core/index.js.map +1 -1
- package/dist/cache/core/index.workerd.js.map +1 -1
- package/dist/cache/database/index.d.ts +22 -26
- package/dist/cache/database/index.d.ts.map +1 -1
- package/dist/cache/database/index.js.map +1 -1
- package/dist/cache/redis/index.d.ts +4 -7
- package/dist/cache/redis/index.d.ts.map +1 -1
- package/dist/cache/redis/index.js.map +1 -1
- package/dist/captcha/index.d.ts +3 -6
- package/dist/captcha/index.d.ts.map +1 -1
- package/dist/captcha/index.js.map +1 -1
- package/dist/cli/config/index.d.ts.map +1 -1
- package/dist/cli/config/index.js.map +1 -1
- package/dist/cli/core/index.d.ts +458 -249
- package/dist/cli/core/index.d.ts.map +1 -1
- package/dist/cli/core/index.js +372 -660
- package/dist/cli/core/index.js.map +1 -1
- package/dist/cli/devtools/index.d.ts +3 -5
- package/dist/cli/devtools/index.d.ts.map +1 -1
- package/dist/cli/devtools/index.js.map +1 -1
- package/dist/cli/i18n/index.d.ts +20 -17
- package/dist/cli/i18n/index.d.ts.map +1 -1
- package/dist/cli/i18n/index.js +45 -11
- package/dist/cli/i18n/index.js.map +1 -1
- package/dist/cli/platform/index.d.ts +126 -1342
- package/dist/cli/platform/index.d.ts.map +1 -1
- package/dist/cli/platform/index.js +136 -2374
- package/dist/cli/platform/index.js.map +1 -1
- package/dist/cli/platform-lib/index.d.ts +1472 -0
- package/dist/cli/platform-lib/index.d.ts.map +1 -0
- package/dist/cli/platform-lib/index.js +2660 -0
- package/dist/cli/platform-lib/index.js.map +1 -0
- package/dist/cli/vendor/index.d.ts +17 -21
- package/dist/cli/vendor/index.d.ts.map +1 -1
- package/dist/cli/vendor/index.js.map +1 -1
- package/dist/command/index.d.ts +20 -19
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +39 -10
- package/dist/command/index.js.map +1 -1
- package/dist/{containers → container}/core/index.d.ts +13 -15
- package/dist/container/core/index.d.ts.map +1 -0
- package/dist/{containers → container}/core/index.js +23 -14
- package/dist/container/core/index.js.map +1 -0
- package/dist/{containers → container}/core/index.workerd.js +37 -22
- package/dist/container/core/index.workerd.js.map +1 -0
- package/dist/core/index.browser.js +27 -1
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +48 -24
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +27 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +27 -1
- package/dist/core/index.native.js.map +1 -1
- package/dist/core/index.workerd.js +27 -1
- package/dist/core/index.workerd.js.map +1 -1
- package/dist/crypto/index.browser.js.map +1 -1
- package/dist/crypto/index.d.ts +5 -8
- package/dist/crypto/index.d.ts.map +1 -1
- package/dist/crypto/index.js.map +1 -1
- package/dist/datetime/index.d.ts +3 -4
- package/dist/datetime/index.d.ts.map +1 -1
- package/dist/datetime/index.js.map +1 -1
- package/dist/email/brevo/index.d.ts +2 -4
- package/dist/email/brevo/index.d.ts.map +1 -1
- package/dist/email/brevo/index.js.map +1 -1
- package/dist/email/cloudflare/index.d.ts +20 -7
- package/dist/email/cloudflare/index.d.ts.map +1 -1
- package/dist/email/cloudflare/index.js +46 -9
- package/dist/email/cloudflare/index.js.map +1 -1
- package/dist/email/core/index.d.ts +6 -9
- package/dist/email/core/index.d.ts.map +1 -1
- package/dist/email/core/index.js.map +1 -1
- package/dist/email/core/index.workerd.js.map +1 -1
- package/dist/email/smtp/index.d.ts +10 -13
- package/dist/email/smtp/index.d.ts.map +1 -1
- package/dist/email/smtp/index.js +107 -32
- package/dist/email/smtp/index.js.map +1 -1
- package/dist/fake/index.d.ts +1 -2
- package/dist/fake/index.d.ts.map +1 -1
- package/dist/fake/index.js.map +1 -1
- package/dist/lock/core/index.d.ts +9 -14
- package/dist/lock/core/index.d.ts.map +1 -1
- package/dist/lock/core/index.js.map +1 -1
- package/dist/lock/redis/index.d.ts +2 -4
- package/dist/lock/redis/index.d.ts.map +1 -1
- package/dist/lock/redis/index.js.map +1 -1
- package/dist/logger/index.d.ts +105 -76
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/logger/index.js +196 -174
- package/dist/logger/index.js.map +1 -1
- package/dist/mcp/index.d.ts +25 -20
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +23 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/orm/core/index.browser.js.map +1 -1
- package/dist/orm/core/index.bun.js +19 -1
- package/dist/orm/core/index.bun.js.map +1 -1
- package/dist/orm/core/index.d.ts +76 -62
- package/dist/orm/core/index.d.ts.map +1 -1
- package/dist/orm/core/index.js +20 -2
- package/dist/orm/core/index.js.map +1 -1
- package/dist/orm/postgres/index.bun.js.map +1 -1
- package/dist/orm/postgres/index.d.ts +28 -20
- package/dist/orm/postgres/index.d.ts.map +1 -1
- package/dist/orm/postgres/index.js.map +1 -1
- package/dist/queue/core/index.d.ts +12 -15
- package/dist/queue/core/index.d.ts.map +1 -1
- package/dist/queue/core/index.js.map +1 -1
- package/dist/queue/core/index.workerd.js.map +1 -1
- package/dist/queue/redis/index.d.ts +3 -5
- package/dist/queue/redis/index.d.ts.map +1 -1
- package/dist/queue/redis/index.js.map +1 -1
- package/dist/react/auth/index.browser.js +9 -2
- package/dist/react/auth/index.browser.js.map +1 -1
- package/dist/react/auth/index.d.ts +14 -9
- package/dist/react/auth/index.d.ts.map +1 -1
- package/dist/react/auth/index.js +9 -2
- package/dist/react/auth/index.js.map +1 -1
- package/dist/react/core/index.d.ts +7 -8
- package/dist/react/core/index.d.ts.map +1 -1
- package/dist/react/core/index.js +6 -3
- package/dist/react/core/index.js.map +1 -1
- package/dist/react/form/index.d.ts +2 -5
- package/dist/react/form/index.d.ts.map +1 -1
- package/dist/react/form/index.js +16 -15
- package/dist/react/form/index.js.map +1 -1
- package/dist/react/head/index.browser.js.map +1 -1
- package/dist/react/head/index.d.ts +2 -4
- package/dist/react/head/index.d.ts.map +1 -1
- package/dist/react/head/index.js.map +1 -1
- package/dist/react/i18n/index.d.ts +90 -11
- package/dist/react/i18n/index.d.ts.map +1 -1
- package/dist/react/i18n/index.js +147 -11
- package/dist/react/i18n/index.js.map +1 -1
- package/dist/react/intro/index.d.ts +1 -2
- package/dist/react/intro/index.d.ts.map +1 -1
- package/dist/react/intro/index.js +2 -2
- package/dist/react/intro/index.js.map +1 -1
- package/dist/react/router/index.browser.js +193 -24
- package/dist/react/router/index.browser.js.map +1 -1
- package/dist/react/router/index.d.ts +434 -222
- package/dist/react/router/index.d.ts.map +1 -1
- package/dist/react/router/index.js +249 -35
- package/dist/react/router/index.js.map +1 -1
- package/dist/react/sitemap/index.browser.js +35 -0
- package/dist/react/sitemap/index.browser.js.map +1 -0
- package/dist/react/sitemap/index.d.ts +92 -0
- package/dist/react/sitemap/index.d.ts.map +1 -0
- package/dist/react/sitemap/index.js +131 -0
- package/dist/react/sitemap/index.js.map +1 -0
- package/dist/react/testing/index.d.ts +1 -2
- package/dist/react/testing/index.d.ts.map +1 -1
- package/dist/react/testing/index.js +16 -17
- package/dist/react/testing/index.js.map +1 -1
- package/dist/react/ui/index.d.ts +20 -25
- package/dist/react/ui/index.d.ts.map +1 -1
- package/dist/react/ui/index.js.map +1 -1
- package/dist/redis/index.bun.js.map +1 -1
- package/dist/redis/index.d.ts +17 -19
- package/dist/redis/index.d.ts.map +1 -1
- package/dist/redis/index.js.map +1 -1
- package/dist/retry/index.d.ts +2 -4
- package/dist/retry/index.d.ts.map +1 -1
- package/dist/retry/index.js.map +1 -1
- package/dist/router/index.d.ts.map +1 -1
- package/dist/router/index.js.map +1 -1
- package/dist/scheduler/index.d.ts +10 -13
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/scheduler/index.js.map +1 -1
- package/dist/scheduler/index.workerd.js.map +1 -1
- package/dist/security/index.browser.js.map +1 -1
- package/dist/security/index.d.ts +45 -48
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js.map +1 -1
- package/dist/server/auth/index.browser.js.map +1 -1
- package/dist/server/auth/index.d.ts +272 -173
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +1608 -15
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/cookies/index.browser.js.map +1 -1
- package/dist/server/cookies/index.d.ts +20 -7
- package/dist/server/cookies/index.d.ts.map +1 -1
- package/dist/server/cookies/index.js +22 -3
- package/dist/server/cookies/index.js.map +1 -1
- package/dist/server/core/index.browser.js.map +1 -1
- package/dist/server/core/index.d.ts +106 -73
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/core/index.js +44 -0
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/cors/index.d.ts +11 -14
- package/dist/server/cors/index.d.ts.map +1 -1
- package/dist/server/cors/index.js.map +1 -1
- package/dist/server/etag/index.d.ts +6 -9
- package/dist/server/etag/index.d.ts.map +1 -1
- package/dist/server/etag/index.js.map +1 -1
- package/dist/server/health/index.d.ts +18 -21
- package/dist/server/health/index.d.ts.map +1 -1
- package/dist/server/health/index.js.map +1 -1
- package/dist/server/links/index.browser.js +2 -0
- package/dist/server/links/index.browser.js.map +1 -1
- package/dist/server/links/index.d.ts +63 -67
- package/dist/server/links/index.d.ts.map +1 -1
- package/dist/server/links/index.js +2 -0
- package/dist/server/links/index.js.map +1 -1
- package/dist/server/metrics/index.d.ts +5 -7
- package/dist/server/metrics/index.d.ts.map +1 -1
- package/dist/server/metrics/index.js.map +1 -1
- package/dist/server/proxy/index.d.ts +3 -5
- package/dist/server/proxy/index.d.ts.map +1 -1
- package/dist/server/proxy/index.js.map +1 -1
- package/dist/server/rate-limit/index.d.ts +10 -13
- package/dist/server/rate-limit/index.d.ts.map +1 -1
- package/dist/server/rate-limit/index.js.map +1 -1
- package/dist/server/static/index.d.ts +3 -5
- package/dist/server/static/index.d.ts.map +1 -1
- package/dist/server/static/index.js.map +1 -1
- package/dist/server/swagger/index.d.ts +5 -8
- package/dist/server/swagger/index.d.ts.map +1 -1
- package/dist/server/swagger/index.js.map +1 -1
- package/dist/sms/index.d.ts +3 -5
- package/dist/sms/index.d.ts.map +1 -1
- package/dist/sms/index.js.map +1 -1
- package/dist/system/index.browser.js.map +1 -1
- package/dist/system/index.d.ts +2 -4
- package/dist/system/index.d.ts.map +1 -1
- package/dist/system/index.js.map +1 -1
- package/dist/system/index.workerd.js.map +1 -1
- package/dist/topic/core/index.d.ts +4 -6
- package/dist/topic/core/index.d.ts.map +1 -1
- package/dist/topic/core/index.js.map +1 -1
- package/dist/topic/redis/index.d.ts +5 -8
- package/dist/topic/redis/index.d.ts.map +1 -1
- package/dist/topic/redis/index.js.map +1 -1
- package/package.json +59 -23
- package/src/api/audits/__tests__/AuditService.spec.ts +18 -110
- package/src/api/audits/controllers/AdminAuditController.ts +14 -0
- package/src/api/audits/services/AuditService.ts +21 -88
- package/src/api/files/__tests__/FileService.spec.ts +207 -2
- package/src/api/files/index.ts +3 -0
- package/src/api/files/schemas/fileCreatorSummarySchema.ts +22 -0
- package/src/api/files/schemas/fileResourceSchema.ts +10 -1
- package/src/api/files/services/FileService.ts +170 -72
- package/src/api/jobs/__tests__/$job.spec.ts +24 -1
- package/src/api/jobs/index.ts +4 -3
- package/src/api/jobs/primitives/$job.ts +7 -3
- package/src/api/jobs/providers/DirectJobDispatcher.ts +17 -36
- package/src/api/jobs/providers/JobProvider.ts +53 -24
- package/src/api/jobs/schemas/jobConfigAtom.ts +1 -1
- package/src/api/jobs/schemas/jobExecutionResourceSchema.ts +4 -1
- package/src/api/keys/schemas/adminApiKeyResourceSchema.ts +3 -1
- package/src/api/parameters/__tests__/$parameter.spec.ts +19 -2
- package/src/api/parameters/audits/ParameterAudits.ts +17 -0
- package/src/api/parameters/controllers/AdminParameterController.ts +95 -19
- package/src/api/parameters/index.ts +3 -0
- package/src/api/parameters/schemas/activateParameterBodySchema.ts +3 -3
- package/src/api/parameters/schemas/createParameterVersionBodySchema.ts +3 -2
- package/src/api/parameters/schemas/parameterCreatorSummarySchema.ts +25 -0
- package/src/api/parameters/schemas/parameterResponseSchema.ts +5 -0
- package/src/api/parameters/schemas/rollbackParameterBodySchema.ts +4 -2
- package/src/api/parameters/services/ParameterProvider.ts +69 -6
- package/src/api/subscriptions/jobs/SubscriptionJobs.ts +1 -1
- package/src/api/users/__tests__/AdminSessionController.spec.ts +37 -0
- package/src/api/users/audits/SessionAudits.ts +33 -0
- package/src/api/users/audits/UserAudits.ts +19 -43
- package/src/api/users/controllers/AdminUserController.ts +66 -1
- package/src/api/users/controllers/RealmController.ts +1 -0
- package/src/api/users/entities/sessions.ts +6 -0
- package/src/api/users/entities/users.ts +2 -0
- package/src/api/users/index.ts +9 -1
- package/src/api/users/primitives/$realm.ts +29 -0
- package/src/api/users/providers/RealmProvider.ts +15 -0
- package/src/api/users/schemas/realmConfigSchema.ts +14 -0
- package/src/api/users/schemas/sessionResourceSchema.ts +16 -0
- package/src/api/users/schemas/updateUserSchema.ts +1 -8
- package/src/api/users/schemas/userQuerySchema.ts +7 -0
- package/src/api/users/services/CredentialService.ts +15 -6
- package/src/api/users/services/IdentityService.ts +2 -1
- package/src/api/users/services/RegistrationService.ts +2 -1
- package/src/api/users/services/SessionCrudService.ts +19 -2
- package/src/api/users/services/SessionService.ts +39 -19
- package/src/api/users/services/UserService.ts +106 -8
- package/src/background/__tests__/BackgroundTaskProvider.spec.ts +96 -0
- package/src/background/index.ts +37 -0
- package/src/background/index.workerd.ts +28 -0
- package/src/background/providers/BackgroundTaskProvider.ts +70 -0
- package/src/background/providers/WorkerdBackgroundTaskProvider.ts +43 -0
- package/src/bucket/__tests__/$bucket.spec.ts +18 -0
- package/src/bucket/__tests__/LocalFileStorageProvider.spec.ts +5 -0
- package/src/bucket/__tests__/MemoryFileStorageProvider.spec.ts +5 -0
- package/src/bucket/__tests__/NodeS3BucketProvider.spec.ts +23 -4
- package/src/bucket/__tests__/shared.ts +30 -0
- package/src/bucket/index.ts +5 -5
- package/src/bucket/index.workerd.ts +11 -4
- package/src/bucket/primitives/$bucket.ts +27 -0
- package/src/bucket/providers/FileStorageProvider.ts +13 -0
- package/src/bucket/providers/LocalFileStorageProvider.ts +17 -1
- package/src/bucket/providers/MemoryFileStorageProvider.ts +7 -0
- package/src/bucket/providers/{CloudflareR2Provider.ts → R2FileStorageProvider.ts} +10 -1
- package/src/bucket/providers/{NodeS3BucketProvider.ts → S3FileStorageProvider.ts} +27 -5
- package/src/cli/core/__tests__/BuildDockerTask.spec.ts +25 -1
- package/src/cli/core/__tests__/init.spec.ts +0 -219
- package/src/cli/core/atoms/buildOptions.ts +0 -12
- package/src/cli/core/commands/__tests__/BuildCommand.spec.ts +43 -0
- package/src/cli/core/commands/build.ts +105 -37
- package/src/cli/core/commands/init.ts +0 -12
- package/src/cli/core/commands/pack.ts +133 -0
- package/src/cli/core/index.ts +3 -3
- package/src/cli/core/providers/ViteDevServerProvider.ts +40 -16
- package/src/cli/core/services/PackageManagerUtils.ts +0 -16
- package/src/cli/core/services/ProjectScaffolder.ts +29 -291
- package/src/cli/core/tasks/BuildCloudflareTask.ts +382 -56
- package/src/cli/core/tasks/BuildDockerTask.ts +33 -3
- package/src/cli/core/tasks/BuildPrerenderTask.ts +44 -7
- package/src/cli/core/tasks/BuildTask.ts +34 -0
- package/src/cli/core/templates/apiIndexTs.ts +1 -22
- package/src/cli/core/templates/mainCss.ts +0 -1
- package/src/cli/core/templates/webAppRouterTs.ts +0 -99
- package/src/cli/core/templates/webIndexTs.ts +1 -22
- package/src/cli/i18n/__tests__/I18nCheckService.spec.ts +48 -0
- package/src/cli/i18n/services/I18nCheckService.ts +65 -11
- package/src/cli/platform/__tests__/SecretsCommand.spec.ts +5 -3
- package/src/cli/platform/commands/SecretsCommand.ts +8 -6
- package/src/cli/platform/commands/platform.ts +192 -46
- package/src/cli/platform/index.ts +12 -52
- package/src/cli/{platform → platform-lib}/__tests__/CloudflareAdapter.spec.ts +426 -169
- package/src/cli/{platform → platform-lib}/__tests__/NamingService.spec.ts +91 -4
- package/src/cli/{platform → platform-lib}/__tests__/VercelAdapter.spec.ts +56 -85
- package/src/cli/{platform → platform-lib}/adapters/CloudflareAdapter.ts +519 -190
- package/src/cli/{platform → platform-lib}/adapters/PlatformAdapter.ts +62 -35
- package/src/cli/{platform → platform-lib}/adapters/VercelAdapter.ts +6 -10
- package/src/cli/{platform → platform-lib}/atoms/platformOptions.ts +34 -1
- package/src/cli/platform-lib/index.ts +67 -0
- package/src/cli/platform-lib/services/NamingService.ts +136 -0
- package/src/cli/{platform → platform-lib}/services/PlatformInspector.ts +60 -13
- package/src/cli/{platform → platform-lib}/services/PlatformOrchestrator.ts +54 -43
- package/src/cli/{platform → platform-lib}/services/WranglerApi.ts +4 -2
- package/src/command/__tests__/Runner.spec.ts +20 -0
- package/src/command/helpers/EnvUtils.ts +19 -3
- package/src/command/helpers/Runner.ts +12 -2
- package/src/command/providers/CliProvider.ts +34 -1
- package/src/{containers → container}/core/__tests__/$container.spec.ts +5 -5
- package/src/{containers → container}/core/index.ts +4 -4
- package/src/{containers → container}/core/index.workerd.ts +19 -3
- package/src/{containers → container}/core/primitives/$container.ts +1 -1
- package/src/{containers → container}/core/providers/CloudflareContainerProvider.ts +17 -19
- package/src/{containers → container}/core/providers/ContainerProvider.ts +16 -2
- package/src/{containers → container}/core/providers/MockContainerProvider.ts +1 -1
- package/src/core/Alepha.ts +49 -1
- package/src/core/__tests__/$env.spec.ts +42 -0
- package/src/core/__tests__/dump.spec.ts +47 -0
- package/src/email/cloudflare/__tests__/CloudflareEmailProvider.spec.ts +42 -10
- package/src/email/cloudflare/index.ts +14 -5
- package/src/email/cloudflare/providers/CloudflareEmailProvider.ts +54 -9
- package/src/logger/__tests__/Logger.spec.ts +55 -0
- package/src/logger/index.ts +13 -0
- package/src/logger/services/Logger.ts +31 -1
- package/src/mcp/__tests__/McpServerProvider.spec.ts +71 -0
- package/src/mcp/providers/McpServerProvider.ts +55 -0
- package/src/orm/__tests__/orm-showcase-tests.ts +27 -0
- package/src/orm/__tests__/orm-showcase.spec.ts +12 -0
- package/src/orm/core/interfaces/PgQuery.ts +4 -1
- package/src/orm/core/services/Repository.ts +27 -11
- package/src/react/auth/hooks/useAuth.ts +10 -5
- package/src/react/core/__tests__/useQuery.browser.spec.tsx +25 -0
- package/src/react/core/hooks/useAction.ts +14 -3
- package/src/react/core/hooks/useQuery.ts +24 -4
- package/src/react/form/__tests__/FormModel-submit-loading.spec.ts +71 -0
- package/src/react/form/__tests__/form-submitting-reactive.browser.spec.tsx +96 -0
- package/src/react/form/services/FormModel.ts +57 -39
- package/src/react/i18n/__tests__/I18nProvider.spec.ts +89 -0
- package/src/react/i18n/__tests__/locale-routing.spec.ts +107 -0
- package/src/react/i18n/components/Translate.tsx +47 -0
- package/src/react/i18n/index.ts +2 -0
- package/src/react/i18n/providers/I18nProvider.ts +171 -12
- package/src/react/intro/components/GettingStartedAdminSlide.tsx +2 -2
- package/src/react/router/__tests__/$page.spec.tsx +3 -2
- package/src/react/router/__tests__/RouterLocaleProvider.spec.ts +127 -0
- package/src/react/router/__tests__/page-can.spec.ts +18 -13
- package/src/react/router/hooks/useQueryParams.ts +114 -14
- package/src/react/router/index.browser.ts +4 -0
- package/src/react/router/index.shared.ts +1 -0
- package/src/react/router/index.ts +9 -0
- package/src/react/router/primitives/$page.ts +85 -4
- package/src/react/router/providers/ReactBrowserRouterProvider.ts +18 -8
- package/src/react/router/providers/ReactPageProvider.ts +12 -1
- package/src/react/router/providers/ReactServerProvider.ts +96 -14
- package/src/react/router/providers/RootComponentsProvider.ts +13 -0
- package/src/react/router/providers/RouterLocaleProvider.ts +125 -0
- package/src/react/router/providers/__tests__/RootComponentsProvider.spec.ts +15 -0
- package/src/react/router/providers/__tests__/rootComponents.ssr.browser.spec.tsx +67 -0
- package/src/react/sitemap/__tests__/$sitemap.spec.ts +131 -0
- package/src/react/sitemap/index.browser.ts +21 -0
- package/src/react/sitemap/index.ts +25 -0
- package/src/react/sitemap/primitives/$sitemap.browser.ts +26 -0
- package/src/react/sitemap/primitives/$sitemap.ts +196 -0
- package/src/react/ui/services/SchemaControl.ts +3 -4
- package/src/server/auth/__tests__/appleClientSecret.spec.ts +34 -0
- package/src/server/auth/__tests__/authFederationClient.spec.ts +40 -0
- package/src/server/auth/__tests__/federationAssertion.spec.ts +146 -0
- package/src/server/auth/__tests__/federationRedirectReplay.spec.ts +44 -0
- package/src/server/auth/helpers/appleClientSecret.ts +24 -0
- package/src/server/auth/helpers/federationAssertion.ts +74 -0
- package/src/server/auth/helpers/jtiReplayGuard.ts +41 -0
- package/src/server/auth/helpers/safeRedirectPath.ts +19 -0
- package/src/server/auth/index.ts +4 -0
- package/src/server/auth/primitives/$authFederationBroker.ts +273 -0
- package/src/server/auth/primitives/$authFederationClient.ts +89 -0
- package/src/server/auth/providers/ServerAuthProvider.ts +18 -4
- package/src/server/cookies/__tests__/ServerCookiesProvider.spec.ts +70 -0
- package/src/server/cookies/providers/ServerCookiesProvider.ts +23 -3
- package/src/server/core/interfaces/ServerRequest.ts +8 -0
- package/src/server/core/primitives/$route.ts +27 -0
- package/src/server/core/providers/ServerMultipartProvider.ts +19 -0
- package/src/server/links/providers/LinkProvider.ts +10 -0
- package/dist/containers/core/index.d.ts.map +0 -1
- package/dist/containers/core/index.js.map +0 -1
- package/dist/containers/core/index.workerd.js.map +0 -1
- package/src/cli/core/tasks/BuildSitemapTask.ts +0 -130
- package/src/cli/core/templates/componentsJsonTs.ts +0 -39
- package/src/cli/core/templates/saasAdminLayoutTsx.ts +0 -77
- package/src/cli/core/templates/saasAdminPagesTsx.ts +0 -26
- package/src/cli/core/templates/saasAuthLayoutTsx.ts +0 -22
- package/src/cli/core/templates/saasAuthPagesTsx.ts +0 -62
- package/src/cli/core/templates/saasRealmProviderTs.ts +0 -52
- package/src/cli/platform/services/NamingService.ts +0 -54
- /package/dist/orm/core/{chunk-o8xxKEmq.js → chunk-B4FMCO8f.js} +0 -0
- /package/dist/react/testing/{chunk-6Ep1yQYe.js → chunk-BpyX8vjI.js} +0 -0
- /package/src/cli/{platform → platform-lib}/__tests__/GitHubSecretStore.spec.ts +0 -0
- /package/src/cli/{platform → platform-lib}/__tests__/PlatformCacheProvider.spec.ts +0 -0
- /package/src/cli/{platform → platform-lib}/__tests__/PlatformInspector.spec.ts +0 -0
- /package/src/cli/{platform → platform-lib}/__tests__/PlatformOrchestrator.spec.ts +0 -0
- /package/src/cli/{platform → platform-lib}/__tests__/SecretFilterService.spec.ts +0 -0
- /package/src/cli/{platform → platform-lib}/__tests__/detectResources.spec.ts +0 -0
- /package/src/cli/{platform → platform-lib}/providers/GitHubSecretStore.ts +0 -0
- /package/src/cli/{platform → platform-lib}/providers/MemorySecretStore.ts +0 -0
- /package/src/cli/{platform → platform-lib}/providers/PlatformCacheProvider.ts +0 -0
- /package/src/cli/{platform → platform-lib}/providers/SecretStoreProvider.ts +0 -0
- /package/src/cli/{platform → platform-lib}/schemas/cloudflare.ts +0 -0
- /package/src/cli/{platform → platform-lib}/schemas/platform.ts +0 -0
- /package/src/cli/{platform → platform-lib}/schemas/vercel.ts +0 -0
- /package/src/cli/{platform → platform-lib}/services/CloudflareApi.ts +0 -0
- /package/src/cli/{platform → platform-lib}/services/SecretFilterService.ts +0 -0
- /package/src/cli/{platform → platform-lib}/services/VercelApi.ts +0 -0
- /package/src/cli/{platform → platform-lib}/services/VercelCli.ts +0 -0
- /package/src/{containers → container}/core/interfaces/ContainerOptions.ts +0 -0
- /package/src/{containers → container}/core/providers/NodeContainerProvider.ts +0 -0
|
@@ -1,1121 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import * as _$alepha_command0 from "alepha/command";
|
|
5
|
-
import { Asker, EnvUtils, Runner, RunnerMethod } from "alepha/command";
|
|
6
|
-
import * as _$alepha_logger0 from "alepha/logger";
|
|
1
|
+
import { AppEntry, AppEntryProvider, ViteBuildProvider } from "alepha/cli";
|
|
2
|
+
import { DetectedResources, GitHubSecretStore, NamingService, PlatformInspector, PlatformOptions, PlatformOrchestrator, ResolvedPlatformConfig, SecretFilterService, SecretStoreProvider } from "alepha/cli/platform-lib";
|
|
3
|
+
import { EnvUtils } from "alepha/command";
|
|
7
4
|
import { ConsoleColorProvider } from "alepha/logger";
|
|
8
|
-
import { FileSystemProvider, ShellProvider } from "alepha/system";
|
|
9
|
-
import { DateTimeProvider } from "alepha/datetime";
|
|
10
|
-
import * as _$typebox from "typebox";
|
|
11
5
|
|
|
12
|
-
//#region ../../src/cli/platform/atoms/platformOptions.d.ts
|
|
13
|
-
/**
|
|
14
|
-
* Platform deployment configuration atom.
|
|
15
|
-
*
|
|
16
|
-
* Filled from the `platform` section of `alepha.config.ts`.
|
|
17
|
-
* Read by `PlatformCommand` to resolve environments and adapters.
|
|
18
|
-
*/
|
|
19
|
-
declare const platformOptions: _$alepha.Atom<_$typebox.TOptional<_$typebox.TObject<{
|
|
20
|
-
/**
|
|
21
|
-
* Project name override. Defaults to root package.json "name".
|
|
22
|
-
*/
|
|
23
|
-
name: _$typebox.TOptional<_$typebox.TString>;
|
|
24
|
-
/**
|
|
25
|
-
* Default environment when --env is omitted.
|
|
26
|
-
*
|
|
27
|
-
* @default "production"
|
|
28
|
-
*/
|
|
29
|
-
default: _$typebox.TOptional<_$typebox.TString>;
|
|
30
|
-
/**
|
|
31
|
-
* Secret store configuration for syncing .env secrets
|
|
32
|
-
* to external providers (e.g. GitHub Actions environments).
|
|
33
|
-
*/
|
|
34
|
-
secrets: _$typebox.TOptional<_$typebox.TObject<{
|
|
35
|
-
/**
|
|
36
|
-
* Secret store backend.
|
|
37
|
-
*/
|
|
38
|
-
store: _$typebox.TUnsafe<"github">;
|
|
39
|
-
/**
|
|
40
|
-
* Pattern for resolving environment names in the store.
|
|
41
|
-
* Placeholders: {project}, {env}.
|
|
42
|
-
*
|
|
43
|
-
* @default "{project}-{env}"
|
|
44
|
-
*/
|
|
45
|
-
environmentPattern: _$typebox.TOptional<_$typebox.TString>;
|
|
46
|
-
}>>;
|
|
47
|
-
/**
|
|
48
|
-
* Named environments with their adapter and configuration.
|
|
49
|
-
*/
|
|
50
|
-
environments: _$typebox.TRecord<"^.*$", _$typebox.TObject<{
|
|
51
|
-
adapter: _$typebox.TUnsafe<"cloudflare" | "vercel">;
|
|
52
|
-
/**
|
|
53
|
-
* Custom domain for the deployed worker (e.g. "api.example.com").
|
|
54
|
-
*
|
|
55
|
-
* On Cloudflare this is attached as a custom-domain route.
|
|
56
|
-
* Omit to use the adapter's default `*.workers.dev` / preview URL.
|
|
57
|
-
*
|
|
58
|
-
* Wildcards are supported for multi-tenant SaaS apps:
|
|
59
|
-
* `"*.club.alepha.dev"` routes every subdomain to the worker.
|
|
60
|
-
* Wildcard patterns require `zone` to be set, and the wildcard DNS
|
|
61
|
-
* record must already exist (proxied) in the Cloudflare zone.
|
|
62
|
-
*/
|
|
63
|
-
domain: _$typebox.TOptional<_$typebox.TString>;
|
|
64
|
-
/**
|
|
65
|
-
* Cloudflare zone name (e.g. "alepha.dev") that owns `domain`.
|
|
66
|
-
*
|
|
67
|
-
* Required when `domain` contains a wildcard (`*`). Ignored for
|
|
68
|
-
* plain custom domains, which Cloudflare resolves automatically.
|
|
69
|
-
*/
|
|
70
|
-
zone: _$typebox.TOptional<_$typebox.TString>;
|
|
71
|
-
/**
|
|
72
|
-
* Cloudflare data jurisdiction for R2 buckets and D1 databases.
|
|
73
|
-
* - "eu": data stays within the EU
|
|
74
|
-
* - "fedramp": FedRAMP-authorized regions
|
|
75
|
-
*
|
|
76
|
-
* Omit for the default (global) jurisdiction.
|
|
77
|
-
*/
|
|
78
|
-
jurisdiction: _$typebox.TOptional<_$typebox.TUnsafe<"eu" | "fedramp">>;
|
|
79
|
-
/**
|
|
80
|
-
* Cloudflare account ID to deploy into.
|
|
81
|
-
*
|
|
82
|
-
* Falls back to `CLOUDFLARE_ACCOUNT_ID` env var, then to the
|
|
83
|
-
* token's account when the token is scoped to exactly one.
|
|
84
|
-
* Required when the token has access to multiple accounts.
|
|
85
|
-
*/
|
|
86
|
-
accountId: _$typebox.TOptional<_$typebox.TString>;
|
|
87
|
-
}>>;
|
|
88
|
-
}>>, "alepha.cli.platform.options">;
|
|
89
|
-
/**
|
|
90
|
-
* Type for platform options.
|
|
91
|
-
*/
|
|
92
|
-
type PlatformOptions = Static<typeof platformOptions.schema>;
|
|
93
|
-
/**
|
|
94
|
-
* Configuration for a single named environment.
|
|
95
|
-
*/
|
|
96
|
-
interface EnvironmentConfig {
|
|
97
|
-
adapter: "cloudflare" | "vercel";
|
|
98
|
-
domain?: string;
|
|
99
|
-
zone?: string;
|
|
100
|
-
vars?: Record<string, string>;
|
|
101
|
-
jurisdiction?: "eu" | "fedramp";
|
|
102
|
-
accountId?: string;
|
|
103
|
-
}
|
|
104
|
-
//#endregion
|
|
105
|
-
//#region ../../src/cli/platform/providers/PlatformCacheProvider.d.ts
|
|
106
|
-
interface PlatformCache {
|
|
107
|
-
[adapter: string]: {
|
|
108
|
-
lastLoginCheck: number;
|
|
109
|
-
accountId?: string;
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Caches cloud provider login state to avoid slow auth checks.
|
|
114
|
-
*
|
|
115
|
-
* Stored in node_modules/.alepha/platform.json (gitignored, project-scoped).
|
|
116
|
-
* TTL: 4 hours.
|
|
117
|
-
*/
|
|
118
|
-
declare class PlatformCacheProvider {
|
|
119
|
-
protected static readonly TTL_MS: number;
|
|
120
|
-
protected readonly fs: FileSystemProvider;
|
|
121
|
-
protected readonly dateTime: DateTimeProvider;
|
|
122
|
-
protected cachePath(root: string): string;
|
|
123
|
-
isLoginFresh(root: string, adapter: string): Promise<boolean>;
|
|
124
|
-
getAccountId(root: string, adapter: string): Promise<string | undefined>;
|
|
125
|
-
recordLogin(root: string, adapter: string, accountId?: string): Promise<void>;
|
|
126
|
-
protected readCache(root: string): Promise<PlatformCache>;
|
|
127
|
-
protected writeCache(root: string, cache: PlatformCache): Promise<void>;
|
|
128
|
-
}
|
|
129
|
-
//#endregion
|
|
130
|
-
//#region ../../src/cli/platform/schemas/cloudflare.d.ts
|
|
131
|
-
declare const cloudflareAccountSchema: _$typebox.TObject<{
|
|
132
|
-
id: _$typebox.TString;
|
|
133
|
-
name: _$typebox.TString;
|
|
134
|
-
}>;
|
|
135
|
-
type CloudflareAccount = Static<typeof cloudflareAccountSchema>;
|
|
136
|
-
declare const cloudflareD1Schema: _$typebox.TObject<{
|
|
137
|
-
uuid: _$typebox.TString;
|
|
138
|
-
name: _$typebox.TString;
|
|
139
|
-
}>;
|
|
140
|
-
type CloudflareD1 = Static<typeof cloudflareD1Schema>;
|
|
141
|
-
declare const cloudflareKVSchema: _$typebox.TObject<{
|
|
142
|
-
id: _$typebox.TString;
|
|
143
|
-
title: _$typebox.TString;
|
|
144
|
-
}>;
|
|
145
|
-
type CloudflareKV = Static<typeof cloudflareKVSchema>;
|
|
146
|
-
declare const cloudflareR2Schema: _$typebox.TObject<{
|
|
147
|
-
name: _$typebox.TString;
|
|
148
|
-
creation_date: _$typebox.TOptional<_$typebox.TString>;
|
|
149
|
-
}>;
|
|
150
|
-
type CloudflareR2 = Static<typeof cloudflareR2Schema>;
|
|
151
|
-
declare const cloudflareR2ListSchema: _$typebox.TObject<{
|
|
152
|
-
buckets: _$typebox.TArray<_$typebox.TObject<{
|
|
153
|
-
name: _$typebox.TString;
|
|
154
|
-
creation_date: _$typebox.TOptional<_$typebox.TString>;
|
|
155
|
-
}>>;
|
|
156
|
-
}>;
|
|
157
|
-
declare const cloudflareQueueSchema: _$typebox.TObject<{
|
|
158
|
-
queue_id: _$typebox.TString;
|
|
159
|
-
queue_name: _$typebox.TString;
|
|
160
|
-
}>;
|
|
161
|
-
type CloudflareQueue = Static<typeof cloudflareQueueSchema>;
|
|
162
|
-
declare const cloudflareQueueConsumerSchema: _$typebox.TObject<{
|
|
163
|
-
consumer_id: _$typebox.TString;
|
|
164
|
-
service: _$typebox.TString;
|
|
165
|
-
environment: _$typebox.TOptional<_$typebox.TString>;
|
|
166
|
-
}>;
|
|
167
|
-
type CloudflareQueueConsumer = Static<typeof cloudflareQueueConsumerSchema>;
|
|
168
|
-
declare const cloudflareHyperdriveOriginSchema: _$typebox.TObject<{
|
|
169
|
-
host: _$typebox.TString;
|
|
170
|
-
}>;
|
|
171
|
-
declare const cloudflareHyperdriveSchema: _$typebox.TObject<{
|
|
172
|
-
id: _$typebox.TString;
|
|
173
|
-
name: _$typebox.TString;
|
|
174
|
-
origin: _$typebox.TObject<{
|
|
175
|
-
host: _$typebox.TString;
|
|
176
|
-
}>;
|
|
177
|
-
}>;
|
|
178
|
-
type CloudflareHyperdrive = Static<typeof cloudflareHyperdriveSchema>;
|
|
179
|
-
declare const cloudflareWorkerSchema: _$typebox.TObject<{
|
|
180
|
-
id: _$typebox.TString;
|
|
181
|
-
created_on: _$typebox.TString;
|
|
182
|
-
modified_on: _$typebox.TString;
|
|
183
|
-
}>;
|
|
184
|
-
type CloudflareWorker = Static<typeof cloudflareWorkerSchema>;
|
|
185
|
-
declare const cloudflareDeploymentVersionSchema: _$typebox.TObject<{
|
|
186
|
-
version_id: _$typebox.TString;
|
|
187
|
-
percentage: _$typebox.TNumber;
|
|
188
|
-
}>;
|
|
189
|
-
declare const cloudflareDeploymentSchema: _$typebox.TObject<{
|
|
190
|
-
id: _$typebox.TString;
|
|
191
|
-
versions: _$typebox.TArray<_$typebox.TObject<{
|
|
192
|
-
version_id: _$typebox.TString;
|
|
193
|
-
percentage: _$typebox.TNumber;
|
|
194
|
-
}>>;
|
|
195
|
-
created_on: _$typebox.TString;
|
|
196
|
-
}>;
|
|
197
|
-
type CloudflareDeployment = Static<typeof cloudflareDeploymentSchema>;
|
|
198
|
-
declare const cloudflareDeploymentListSchema: _$typebox.TObject<{
|
|
199
|
-
deployments: _$typebox.TArray<_$typebox.TObject<{
|
|
200
|
-
id: _$typebox.TString;
|
|
201
|
-
versions: _$typebox.TArray<_$typebox.TObject<{
|
|
202
|
-
version_id: _$typebox.TString;
|
|
203
|
-
percentage: _$typebox.TNumber;
|
|
204
|
-
}>>;
|
|
205
|
-
created_on: _$typebox.TString;
|
|
206
|
-
}>>;
|
|
207
|
-
}>;
|
|
208
|
-
declare const cloudflareVersionSchema: _$typebox.TObject<{
|
|
209
|
-
id: _$typebox.TString;
|
|
210
|
-
metadata: _$typebox.TObject<{
|
|
211
|
-
created_on: _$typebox.TString;
|
|
212
|
-
}>;
|
|
213
|
-
annotations: _$typebox.TOptional<_$typebox.TRecord<"^.*$", _$typebox.TString>>;
|
|
214
|
-
}>;
|
|
215
|
-
type CloudflareVersion = Static<typeof cloudflareVersionSchema>;
|
|
216
|
-
declare const cloudflareVersionListSchema: _$typebox.TObject<{
|
|
217
|
-
items: _$typebox.TArray<_$typebox.TObject<{
|
|
218
|
-
id: _$typebox.TString;
|
|
219
|
-
metadata: _$typebox.TObject<{
|
|
220
|
-
created_on: _$typebox.TString;
|
|
221
|
-
}>;
|
|
222
|
-
annotations: _$typebox.TOptional<_$typebox.TRecord<"^.*$", _$typebox.TString>>;
|
|
223
|
-
}>>;
|
|
224
|
-
}>;
|
|
225
|
-
declare const cloudflareSecretSchema: _$typebox.TObject<{
|
|
226
|
-
name: _$typebox.TString;
|
|
227
|
-
type: _$typebox.TString;
|
|
228
|
-
}>;
|
|
229
|
-
type CloudflareSecret = Static<typeof cloudflareSecretSchema>;
|
|
230
|
-
declare const createD1BodySchema: _$typebox.TObject<{
|
|
231
|
-
name: _$typebox.TString;
|
|
232
|
-
primary_location_hint: _$typebox.TOptional<_$typebox.TString>;
|
|
233
|
-
jurisdiction: _$typebox.TOptional<_$typebox.TString>;
|
|
234
|
-
}>;
|
|
235
|
-
declare const createKVBodySchema: _$typebox.TObject<{
|
|
236
|
-
title: _$typebox.TString;
|
|
237
|
-
}>;
|
|
238
|
-
declare const createR2BodySchema: _$typebox.TObject<{
|
|
239
|
-
name: _$typebox.TString;
|
|
240
|
-
}>;
|
|
241
|
-
declare const cloudflareR2TokenSchema: _$typebox.TObject<{
|
|
242
|
-
id: _$typebox.TString;
|
|
243
|
-
accessKeyId: _$typebox.TString;
|
|
244
|
-
secretAccessKey: _$typebox.TString;
|
|
245
|
-
}>;
|
|
246
|
-
type CloudflareR2Token = Static<typeof cloudflareR2TokenSchema>;
|
|
247
|
-
declare const createR2TokenBodySchema: _$typebox.TObject<{
|
|
248
|
-
name: _$typebox.TString;
|
|
249
|
-
policies: _$typebox.TArray<_$typebox.TObject<{
|
|
250
|
-
effect: _$typebox.TString;
|
|
251
|
-
permissions: _$typebox.TArray<_$typebox.TString>;
|
|
252
|
-
buckets: _$typebox.TOptional<_$typebox.TArray<_$typebox.TString>>;
|
|
253
|
-
}>>;
|
|
254
|
-
}>;
|
|
255
|
-
declare const createQueueBodySchema: _$typebox.TObject<{
|
|
256
|
-
queue_name: _$typebox.TString;
|
|
257
|
-
}>;
|
|
258
|
-
declare const createHyperdriveOriginSchema: _$typebox.TObject<{
|
|
259
|
-
scheme: _$typebox.TString;
|
|
260
|
-
host: _$typebox.TString;
|
|
261
|
-
port: _$typebox.TNumber;
|
|
262
|
-
database: _$typebox.TString;
|
|
263
|
-
user: _$typebox.TString;
|
|
264
|
-
password: _$typebox.TString;
|
|
265
|
-
}>;
|
|
266
|
-
declare const createHyperdriveBodySchema: _$typebox.TObject<{
|
|
267
|
-
name: _$typebox.TString;
|
|
268
|
-
origin: _$typebox.TObject<{
|
|
269
|
-
scheme: _$typebox.TString;
|
|
270
|
-
host: _$typebox.TString;
|
|
271
|
-
port: _$typebox.TNumber;
|
|
272
|
-
database: _$typebox.TString;
|
|
273
|
-
user: _$typebox.TString;
|
|
274
|
-
password: _$typebox.TString;
|
|
275
|
-
}>;
|
|
276
|
-
}>;
|
|
277
|
-
declare const putSecretBodySchema: _$typebox.TObject<{
|
|
278
|
-
name: _$typebox.TString;
|
|
279
|
-
text: _$typebox.TString;
|
|
280
|
-
type: _$typebox.TString;
|
|
281
|
-
}>;
|
|
282
|
-
declare const cloudflareApiErrorSchema: _$typebox.TObject<{
|
|
283
|
-
code: _$typebox.TNumber;
|
|
284
|
-
message: _$typebox.TString;
|
|
285
|
-
}>;
|
|
286
|
-
type CloudflareApiError = Static<typeof cloudflareApiErrorSchema>;
|
|
287
|
-
//#endregion
|
|
288
|
-
//#region ../../src/cli/platform/services/WranglerApi.d.ts
|
|
289
|
-
/**
|
|
290
|
-
* Wraps wrangler CLI commands that are kept as shell-outs.
|
|
291
|
-
*
|
|
292
|
-
* Only used for operations where wrangler provides value
|
|
293
|
-
* beyond a raw API call: OAuth login, worker deploy (bundling/upload),
|
|
294
|
-
* D1 migrations, and secret bulk push.
|
|
295
|
-
*/
|
|
296
|
-
declare class WranglerApi {
|
|
297
|
-
protected readonly log: _$alepha_logger0.Logger;
|
|
298
|
-
protected readonly shell: ShellProvider;
|
|
299
|
-
protected readonly utils: AlephaCliUtils;
|
|
300
|
-
protected readonly pm: PackageManagerUtils;
|
|
301
|
-
protected readonly runner: Runner;
|
|
302
|
-
protected runShell(command: string, options?: Parameters<ShellProvider["run"]>[1]): Promise<string>;
|
|
303
|
-
/**
|
|
304
|
-
* Ensure wrangler is installed in the project.
|
|
305
|
-
*/
|
|
306
|
-
ensureInstalled(root: string, run: RunnerMethod): Promise<void>;
|
|
307
|
-
/**
|
|
308
|
-
* Check if the user is authenticated. Returns the whoami output.
|
|
309
|
-
*/
|
|
310
|
-
whoami(): Promise<string>;
|
|
311
|
-
/**
|
|
312
|
-
* Open the browser-based OAuth login flow.
|
|
313
|
-
*/
|
|
314
|
-
login(): Promise<void>;
|
|
315
|
-
/**
|
|
316
|
-
* Get the current auth token from wrangler (auto-refreshes if expired).
|
|
317
|
-
*/
|
|
318
|
-
getAuthToken(): Promise<string>;
|
|
319
|
-
/**
|
|
320
|
-
* Deploy a worker via wrangler (handles bundling and upload).
|
|
321
|
-
*
|
|
322
|
-
* Returns the workers.dev URL if found in the output.
|
|
323
|
-
*/
|
|
324
|
-
deploy(workerName: string, configPath: string): Promise<string | undefined>;
|
|
325
|
-
/**
|
|
326
|
-
* Apply D1 migrations remotely.
|
|
327
|
-
*/
|
|
328
|
-
d1MigrationsApply(dbName: string, configPath: string): Promise<void>;
|
|
329
|
-
}
|
|
330
|
-
//#endregion
|
|
331
|
-
//#region ../../src/cli/platform/services/CloudflareApi.d.ts
|
|
332
|
-
/**
|
|
333
|
-
* Thin wrapper over the Cloudflare REST API.
|
|
334
|
-
*
|
|
335
|
-
* Uses `wrangler auth token` to obtain credentials,
|
|
336
|
-
* then calls `fetch()` directly for all CRUD operations.
|
|
337
|
-
*/
|
|
338
|
-
declare class CloudflareApi {
|
|
339
|
-
protected static readonly BASE = "https://api.cloudflare.com/client/v4";
|
|
340
|
-
protected readonly log: _$alepha_logger0.Logger;
|
|
341
|
-
protected readonly alepha: Alepha;
|
|
342
|
-
protected readonly wrangler: WranglerApi;
|
|
343
|
-
protected token?: string;
|
|
344
|
-
protected accountId?: string;
|
|
345
|
-
protected jurisdiction?: "eu" | "fedramp";
|
|
346
|
-
/**
|
|
347
|
-
* Set the Cloudflare data jurisdiction for R2 and D1 resources.
|
|
348
|
-
*
|
|
349
|
-
* R2 buckets and D1 databases created under a jurisdiction live in a
|
|
350
|
-
* separate namespace — every R2 API call (list/create/delete) must include
|
|
351
|
-
* the `cf-r2-jurisdiction` header, and D1 create must include the field
|
|
352
|
-
* in the request body. Omit / pass `undefined` for the default (global).
|
|
353
|
-
*/
|
|
354
|
-
setJurisdiction(jurisdiction?: "eu" | "fedramp"): void;
|
|
355
|
-
/**
|
|
356
|
-
* Override the Cloudflare account ID (from platform config).
|
|
357
|
-
*
|
|
358
|
-
* When unset, `resolveAccountId` falls back to `CLOUDFLARE_ACCOUNT_ID` env
|
|
359
|
-
* var or the token's single account.
|
|
360
|
-
*/
|
|
361
|
-
setAccountId(accountId?: string): void;
|
|
362
|
-
/**
|
|
363
|
-
* Obtain the current auth token from wrangler.
|
|
364
|
-
*/
|
|
365
|
-
resolveToken(): Promise<string>;
|
|
366
|
-
/**
|
|
367
|
-
* Resolve the Cloudflare account ID.
|
|
368
|
-
*
|
|
369
|
-
* Calls /accounts and picks the first one. Cached after first call.
|
|
370
|
-
*/
|
|
371
|
-
resolveAccountId(): Promise<string>;
|
|
372
|
-
listD1(): Promise<CloudflareD1[]>;
|
|
373
|
-
createD1(name: string, location?: string): Promise<CloudflareD1>;
|
|
374
|
-
deleteD1(databaseId: string): Promise<void>;
|
|
375
|
-
listKV(): Promise<CloudflareKV[]>;
|
|
376
|
-
createKV(title: string): Promise<CloudflareKV>;
|
|
377
|
-
deleteKV(namespaceId: string): Promise<void>;
|
|
378
|
-
listR2(): Promise<CloudflareR2[]>;
|
|
379
|
-
createR2(name: string): Promise<void>;
|
|
380
|
-
deleteR2(name: string): Promise<void>;
|
|
381
|
-
/**
|
|
382
|
-
* Mint a bucket-scoped R2 API token (S3 access key + secret) using the
|
|
383
|
-
* current bearer token. Used by teardown to wipe a bucket over the S3
|
|
384
|
-
* protocol without requiring users to pre-create R2 access keys.
|
|
385
|
-
*
|
|
386
|
-
* The returned token should be revoked with `deleteR2Token` as soon as the
|
|
387
|
-
* wipe is done.
|
|
388
|
-
*/
|
|
389
|
-
createR2Token(name: string, bucket: string): Promise<CloudflareR2Token>;
|
|
390
|
-
deleteR2Token(tokenId: string): Promise<void>;
|
|
391
|
-
listQueues(): Promise<CloudflareQueue[]>;
|
|
392
|
-
createQueue(name: string): Promise<CloudflareQueue>;
|
|
393
|
-
deleteQueue(queueId: string): Promise<void>;
|
|
394
|
-
listQueueConsumers(queueId: string): Promise<CloudflareQueueConsumer[]>;
|
|
395
|
-
deleteQueueConsumer(queueId: string, consumerService: string): Promise<void>;
|
|
396
|
-
listHyperdrive(): Promise<CloudflareHyperdrive[]>;
|
|
397
|
-
createHyperdrive(name: string, connectionString: string): Promise<CloudflareHyperdrive>;
|
|
398
|
-
deleteHyperdrive(configId: string): Promise<void>;
|
|
399
|
-
getWorker(scriptName: string): Promise<CloudflareWorker | undefined>;
|
|
400
|
-
deleteWorker(scriptName: string): Promise<void>;
|
|
401
|
-
listDeployments(scriptName: string): Promise<CloudflareDeployment[]>;
|
|
402
|
-
listVersions(scriptName: string): Promise<CloudflareVersion[]>;
|
|
403
|
-
listSecrets(scriptName: string): Promise<CloudflareSecret[]>;
|
|
404
|
-
putSecret(scriptName: string, name: string, value: string): Promise<void>;
|
|
405
|
-
/**
|
|
406
|
-
* Fetch the current worker bindings via the script-settings endpoint.
|
|
407
|
-
* Used to merge new secrets into the existing binding set in one PATCH
|
|
408
|
-
* (avoids the per-secret `putSecret` calls, each of which creates a
|
|
409
|
-
* Cloudflare deployment — pushing 7 secrets meant 7 deployment rows).
|
|
410
|
-
*
|
|
411
|
-
* Secret bindings come back with `name` + `type` but no `text` (they're
|
|
412
|
-
* write-only on Cloudflare's side); to preserve them across a PATCH we
|
|
413
|
-
* forward each one as `{ type, name }` and Cloudflare keeps the stored
|
|
414
|
-
* value.
|
|
415
|
-
*/
|
|
416
|
-
getWorkerSettings(scriptName: string): Promise<{
|
|
417
|
-
bindings: Array<{
|
|
418
|
-
type: string;
|
|
419
|
-
name: string;
|
|
420
|
-
text?: string;
|
|
421
|
-
}>;
|
|
422
|
-
}>;
|
|
423
|
-
/**
|
|
424
|
-
* Replace the worker's binding set in one call (= one Cloudflare
|
|
425
|
-
* deployment, regardless of how many secrets are being updated).
|
|
426
|
-
*
|
|
427
|
-
* The endpoint expects multipart FormData with a `settings` field whose
|
|
428
|
-
* value is a JSON-encoded `{ bindings: [...] }` — the `fetch` helper
|
|
429
|
-
* above is JSON-only, so this one bypasses it and calls `globalThis.fetch`
|
|
430
|
-
* directly. Mirrors what `wrangler secret bulk` does internally.
|
|
431
|
-
*/
|
|
432
|
-
patchWorkerBindings(scriptName: string, bindings: Array<{
|
|
433
|
-
type: string;
|
|
434
|
-
name: string;
|
|
435
|
-
text?: string;
|
|
436
|
-
}>): Promise<void>;
|
|
437
|
-
protected fetch<T = unknown>(path: string, options?: {
|
|
438
|
-
method?: string;
|
|
439
|
-
body?: unknown;
|
|
440
|
-
bodySchema?: TSchema;
|
|
441
|
-
schema?: TSchema;
|
|
442
|
-
query?: Record<string, string>;
|
|
443
|
-
}): Promise<T>;
|
|
444
|
-
/**
|
|
445
|
-
* Paginate a page-based list endpoint (`result_info.total_pages`).
|
|
446
|
-
*
|
|
447
|
-
* Cloudflare defaults to `per_page=20`; we push it to 1000 (max on most
|
|
448
|
-
* list endpoints) and loop if more pages exist. Each page is validated
|
|
449
|
-
* against the item schema.
|
|
450
|
-
*/
|
|
451
|
-
protected paginate<T>(path: string, itemSchema: TSchema, perPage?: number): Promise<T[]>;
|
|
452
|
-
/**
|
|
453
|
-
* Paginate a cursor-based list endpoint where `result` is an object
|
|
454
|
-
* containing both the items array and a `cursor` field (R2 buckets,
|
|
455
|
-
* Workers versions). Returns the flattened item array.
|
|
456
|
-
*/
|
|
457
|
-
protected paginateCursor<T>(path: string, itemsKey: string, itemSchema: TSchema, perPage?: number): Promise<T[]>;
|
|
458
|
-
/**
|
|
459
|
-
* Parse a postgres:// connection string into Hyperdrive origin fields.
|
|
460
|
-
*/
|
|
461
|
-
protected parseConnectionString(connectionString: string): {
|
|
462
|
-
scheme: string;
|
|
463
|
-
host: string;
|
|
464
|
-
port: number;
|
|
465
|
-
database: string;
|
|
466
|
-
user: string;
|
|
467
|
-
password: string;
|
|
468
|
-
};
|
|
469
|
-
}
|
|
470
|
-
//#endregion
|
|
471
|
-
//#region ../../src/cli/platform/services/NamingService.d.ts
|
|
472
|
-
/**
|
|
473
|
-
* Generates deterministic resource names for cloud deployments.
|
|
474
|
-
*
|
|
475
|
-
* Pattern: `<project>-<env>`.
|
|
476
|
-
*
|
|
477
|
-
* All segments are slugified (lowercase, alphanumeric + dashes, max 63
|
|
478
|
-
* chars). One app per workspace — see `alepha platform`.
|
|
479
|
-
*/
|
|
480
|
-
declare class NamingService {
|
|
481
|
-
forContext(project: string, env: string): NamingContext;
|
|
482
|
-
slugify(name: string): string;
|
|
483
|
-
}
|
|
484
|
-
declare class NamingContext {
|
|
485
|
-
protected readonly prefix: string;
|
|
486
|
-
constructor(prefix: string);
|
|
487
|
-
worker(): string;
|
|
488
|
-
d1(): string;
|
|
489
|
-
hyperdrive(): string;
|
|
490
|
-
r2(): string;
|
|
491
|
-
kv(): string;
|
|
492
|
-
queue(): string;
|
|
493
|
-
}
|
|
494
|
-
//#endregion
|
|
495
|
-
//#region ../../src/cli/platform/adapters/PlatformAdapter.d.ts
|
|
496
|
-
interface DetectedResources {
|
|
497
|
-
hasDatabase: boolean;
|
|
498
|
-
hasBucket: boolean;
|
|
499
|
-
hasKV: boolean;
|
|
500
|
-
hasQueue: boolean;
|
|
501
|
-
hasCron: boolean;
|
|
502
|
-
}
|
|
503
|
-
interface AppDefinition {
|
|
504
|
-
/**
|
|
505
|
-
* Slugified app name (from package.json).
|
|
506
|
-
*/
|
|
507
|
-
name: string;
|
|
508
|
-
/**
|
|
509
|
-
* Relative path from root (e.g., "apps/api").
|
|
510
|
-
* Empty string for standalone apps.
|
|
511
|
-
*/
|
|
512
|
-
path: string;
|
|
513
|
-
/**
|
|
514
|
-
* Resolved entry points for this app.
|
|
515
|
-
*/
|
|
516
|
-
entry: AppEntry;
|
|
517
|
-
/**
|
|
518
|
-
* Cloud resources detected by introspecting the app.
|
|
519
|
-
*/
|
|
520
|
-
resources: DetectedResources;
|
|
521
|
-
}
|
|
522
|
-
interface PlatformContext {
|
|
523
|
-
/**
|
|
524
|
-
* Slugified project name (from root package.json or config).
|
|
525
|
-
*/
|
|
526
|
-
project: string;
|
|
527
|
-
/**
|
|
528
|
-
* Environment key (e.g., "production", "staging", "tmp-bug001").
|
|
529
|
-
*/
|
|
530
|
-
env: string;
|
|
531
|
-
/**
|
|
532
|
-
* Environment configuration from alepha.config.ts.
|
|
533
|
-
*/
|
|
534
|
-
envConfig: EnvironmentConfig;
|
|
535
|
-
/**
|
|
536
|
-
* All apps in the project.
|
|
537
|
-
*/
|
|
538
|
-
apps: AppDefinition[];
|
|
539
|
-
/**
|
|
540
|
-
* Monorepo/project root path.
|
|
541
|
-
*/
|
|
542
|
-
root: string;
|
|
543
|
-
/**
|
|
544
|
-
* Resource name generator bound to this project+env.
|
|
545
|
-
*/
|
|
546
|
-
naming: NamingContext;
|
|
547
|
-
/**
|
|
548
|
-
* Pre-built mode. When true, the adapter's `build()` should skip the
|
|
549
|
-
* Vite bundle steps and only regenerate the deploy config
|
|
550
|
-
* (wrangler.jsonc, Dockerfile, etc.) so it reflects current bindings +
|
|
551
|
-
* per-tenant overrides.
|
|
552
|
-
*/
|
|
553
|
-
prebuilt?: boolean;
|
|
554
|
-
}
|
|
555
|
-
interface AppContext extends PlatformContext {
|
|
556
|
-
/**
|
|
557
|
-
* The specific app being operated on.
|
|
558
|
-
*/
|
|
559
|
-
app: AppDefinition;
|
|
560
|
-
}
|
|
561
|
-
interface ResourceState {
|
|
562
|
-
name: string;
|
|
563
|
-
exists: boolean;
|
|
564
|
-
id?: string;
|
|
565
|
-
detail?: string;
|
|
566
|
-
}
|
|
567
|
-
interface WorkerState extends ResourceState {
|
|
568
|
-
version?: string;
|
|
569
|
-
tag?: string;
|
|
570
|
-
createdAt?: string;
|
|
571
|
-
}
|
|
572
|
-
interface SecretState {
|
|
573
|
-
name: string;
|
|
574
|
-
deployed: boolean;
|
|
575
|
-
}
|
|
576
|
-
interface PlatformState {
|
|
577
|
-
workers: WorkerState[];
|
|
578
|
-
databases: ResourceState[];
|
|
579
|
-
buckets: ResourceState[];
|
|
580
|
-
kvNamespaces: ResourceState[];
|
|
581
|
-
queues: ResourceState[];
|
|
582
|
-
secrets: SecretState[];
|
|
583
|
-
}
|
|
584
|
-
/**
|
|
585
|
-
* Abstract platform adapter.
|
|
586
|
-
*
|
|
587
|
-
* Each cloud provider (Cloudflare, AKS, docker-compose) implements this.
|
|
588
|
-
* The PlatformOrchestrator calls these methods in the correct order.
|
|
589
|
-
*/
|
|
590
|
-
declare abstract class PlatformAdapter {
|
|
591
|
-
/**
|
|
592
|
-
* Ensure the user is authenticated with the cloud provider.
|
|
593
|
-
* May use cached credentials to avoid slow checks.
|
|
594
|
-
*/
|
|
595
|
-
abstract authenticate(ctx: PlatformContext, run: RunnerMethod): Promise<void>;
|
|
596
|
-
/**
|
|
597
|
-
* Build artifacts for a single app.
|
|
598
|
-
*/
|
|
599
|
-
abstract build(ctx: AppContext, run: RunnerMethod): Promise<void>;
|
|
600
|
-
/**
|
|
601
|
-
* Deploy a single app (upload + activate atomically, e.g., wrangler deploy).
|
|
602
|
-
* Returns the live URL if the platform provides one.
|
|
603
|
-
*/
|
|
604
|
-
abstract deploy(ctx: AppContext, run: RunnerMethod): Promise<string | undefined>;
|
|
605
|
-
/**
|
|
606
|
-
* Create/ensure cloud resources exist (DB, buckets, queues).
|
|
607
|
-
* Not all adapters provision -- AKS defers to Helm.
|
|
608
|
-
*/
|
|
609
|
-
provision(_ctx: PlatformContext, _run: RunnerMethod): Promise<void>;
|
|
610
|
-
/**
|
|
611
|
-
* Run database migrations.
|
|
612
|
-
*/
|
|
613
|
-
migrate(_ctx: PlatformContext, _run: RunnerMethod): Promise<void>;
|
|
614
|
-
/**
|
|
615
|
-
* Push runtime secrets to the deployed worker(s).
|
|
616
|
-
*
|
|
617
|
-
* Reads secrets from `.env.{env}` files (parsed, not from process.env),
|
|
618
|
-
* filters out vars already handled by bindings (DATABASE_URL, R2, etc.),
|
|
619
|
-
* and pushes the rest via the platform's secret management.
|
|
620
|
-
*/
|
|
621
|
-
secrets(_ctx: PlatformContext, _run: RunnerMethod): Promise<void>;
|
|
622
|
-
/**
|
|
623
|
-
* Detect existing resources and their state.
|
|
624
|
-
* Used by `plan` and `status` commands.
|
|
625
|
-
*/
|
|
626
|
-
abstract inspect(ctx: PlatformContext, run: RunnerMethod): Promise<PlatformState>;
|
|
627
|
-
/**
|
|
628
|
-
* Tear down all resources for an environment.
|
|
629
|
-
*/
|
|
630
|
-
abstract teardown(ctx: PlatformContext, run: RunnerMethod): Promise<void>;
|
|
631
|
-
}
|
|
632
|
-
//#endregion
|
|
633
|
-
//#region ../../src/cli/platform/adapters/CloudflareAdapter.d.ts
|
|
634
|
-
/**
|
|
635
|
-
* Cloudflare Workers adapter.
|
|
636
|
-
*
|
|
637
|
-
* Uses the Cloudflare REST API (via CloudflareApi) for resource provisioning
|
|
638
|
-
* and teardown, and wrangler CLI (via WranglerApi) for login, deploy,
|
|
639
|
-
* D1 migrations, and secret bulk push.
|
|
640
|
-
*/
|
|
641
|
-
declare class CloudflareAdapter extends PlatformAdapter {
|
|
642
|
-
protected readonly log: _$alepha_logger0.Logger;
|
|
643
|
-
protected readonly fs: FileSystemProvider;
|
|
644
|
-
protected readonly shell: ShellProvider;
|
|
645
|
-
protected readonly cache: PlatformCacheProvider;
|
|
646
|
-
protected readonly alepha: Alepha;
|
|
647
|
-
protected readonly envUtils: EnvUtils;
|
|
648
|
-
protected readonly api: CloudflareApi;
|
|
649
|
-
protected readonly wrangler: WranglerApi;
|
|
650
|
-
protected readonly runner: Runner;
|
|
651
|
-
protected provisionedD1Id?: string;
|
|
652
|
-
protected provisionedHyperdriveId?: string;
|
|
653
|
-
protected provisionedKVIds: Map<string, string>;
|
|
654
|
-
/**
|
|
655
|
-
* Check if the user's DATABASE_URL points to an external Postgres database.
|
|
656
|
-
* If so, we use Hyperdrive instead of D1.
|
|
657
|
-
*
|
|
658
|
-
* Reads from `.env.{env}` first, falls back to `process.env`.
|
|
659
|
-
*/
|
|
660
|
-
protected isPostgres(ctx: PlatformContext): Promise<boolean>;
|
|
661
|
-
/**
|
|
662
|
-
* Propagate the environment's data-jurisdiction setting to the API client.
|
|
663
|
-
*
|
|
664
|
-
* Must be invoked at the top of every entry point (authenticate, build,
|
|
665
|
-
* deploy, secrets, provision, migrate, inspect, teardown) because
|
|
666
|
-
* CloudflareApi is a singleton reused across env invocations.
|
|
667
|
-
*/
|
|
668
|
-
protected configureApi(ctx: PlatformContext): void;
|
|
669
|
-
protected runShell(command: string, options?: Parameters<ShellProvider["run"]>[1]): Promise<string>;
|
|
670
|
-
authenticate(ctx: PlatformContext, run: RunnerMethod): Promise<void>;
|
|
671
|
-
build(ctx: AppContext, run: RunnerMethod): Promise<void>;
|
|
672
|
-
deploy(ctx: AppContext, run: RunnerMethod): Promise<string | undefined>;
|
|
673
|
-
/**
|
|
674
|
-
* Vars that are handled by wrangler bindings or build config.
|
|
675
|
-
* These should not be pushed as secrets.
|
|
676
|
-
*/
|
|
677
|
-
static readonly EXCLUDED_SECRET_KEYS: Set<string>;
|
|
678
|
-
secrets(ctx: PlatformContext, run: RunnerMethod): Promise<void>;
|
|
679
|
-
/**
|
|
680
|
-
* Plain-text binding used to fingerprint the deployed secret set so the
|
|
681
|
-
* next `up` can skip the PATCH when nothing has changed.
|
|
682
|
-
*/
|
|
683
|
-
static readonly SECRETS_HASH_BINDING = "ALEPHA_SECRETS_HASH";
|
|
684
|
-
provision(ctx: PlatformContext, run: RunnerMethod): Promise<void>;
|
|
685
|
-
migrate(ctx: PlatformContext, run: RunnerMethod): Promise<void>;
|
|
686
|
-
protected migrateD1(ctx: PlatformContext, run: RunnerMethod): Promise<void>;
|
|
687
|
-
protected migratePostgres(ctx: PlatformContext, run: RunnerMethod): Promise<void>;
|
|
688
|
-
inspect(ctx: PlatformContext, run: RunnerMethod): Promise<PlatformState>;
|
|
689
|
-
teardown(ctx: PlatformContext, run: RunnerMethod): Promise<void>;
|
|
690
|
-
protected ensureD1(name: string): Promise<string>;
|
|
691
|
-
protected ensureHyperdrive(name: string, connectionString: string): Promise<string>;
|
|
692
|
-
protected ensureR2(name: string): Promise<void>;
|
|
693
|
-
/**
|
|
694
|
-
* Empty an R2 bucket via the S3-compatible API.
|
|
695
|
-
*
|
|
696
|
-
* Cloudflare's REST `DELETE /r2/buckets/:name` rejects non-empty buckets
|
|
697
|
-
* with `BucketNotEmpty`, and the REST API has no object-level endpoints —
|
|
698
|
-
* objects must be listed and deleted over the S3 protocol. To avoid
|
|
699
|
-
* making users pre-create R2 access keys, we mint a short-lived
|
|
700
|
-
* bucket-scoped API token using the wrangler bearer token, wipe the
|
|
701
|
-
* bucket with `s3mini`, then revoke the token.
|
|
702
|
-
*
|
|
703
|
-
* Also aborts any pending multipart uploads — those count as bucket
|
|
704
|
-
* contents from R2's perspective and would otherwise block the delete.
|
|
705
|
-
*/
|
|
706
|
-
protected wipeR2Bucket(bucketName: string, ctx: PlatformContext): Promise<void>;
|
|
707
|
-
protected ensureKV(name: string): Promise<string>;
|
|
708
|
-
protected ensureQueue(name: string): Promise<void>;
|
|
709
|
-
/**
|
|
710
|
-
* Get the currently active deployment for a worker.
|
|
711
|
-
*/
|
|
712
|
-
protected getActiveDeployment(workerName: string): Promise<{
|
|
713
|
-
versionId: string;
|
|
714
|
-
tag?: string;
|
|
715
|
-
createdAt?: string;
|
|
716
|
-
} | undefined>;
|
|
717
|
-
}
|
|
718
|
-
//#endregion
|
|
719
|
-
//#region ../../src/cli/platform/schemas/vercel.d.ts
|
|
720
|
-
declare const vercelProjectSchema: _$typebox.TObject<{
|
|
721
|
-
id: _$typebox.TString;
|
|
722
|
-
name: _$typebox.TString;
|
|
723
|
-
accountId: _$typebox.TString;
|
|
724
|
-
}>;
|
|
725
|
-
type VercelProject = Static<typeof vercelProjectSchema>;
|
|
726
|
-
declare const createProjectBodySchema: _$typebox.TObject<{
|
|
727
|
-
name: _$typebox.TString;
|
|
728
|
-
framework: _$typebox.TOptional<_$typebox.TNull>;
|
|
729
|
-
}>;
|
|
730
|
-
declare const vercelDeploymentSchema: _$typebox.TObject<{
|
|
731
|
-
uid: _$typebox.TString;
|
|
732
|
-
name: _$typebox.TString;
|
|
733
|
-
url: _$typebox.TString;
|
|
734
|
-
state: _$typebox.TOptional<_$typebox.TString>;
|
|
735
|
-
readyState: _$typebox.TOptional<_$typebox.TString>;
|
|
736
|
-
created: _$typebox.TOptional<_$typebox.TNumber>;
|
|
737
|
-
target: _$typebox.TOptional<_$typebox.TString>;
|
|
738
|
-
alias: _$typebox.TOptional<_$typebox.TArray<_$typebox.TString>>;
|
|
739
|
-
}>;
|
|
740
|
-
type VercelDeployment = Static<typeof vercelDeploymentSchema>;
|
|
741
|
-
declare const vercelEnvVarSchema: _$typebox.TObject<{
|
|
742
|
-
id: _$typebox.TString;
|
|
743
|
-
key: _$typebox.TString;
|
|
744
|
-
value: _$typebox.TOptional<_$typebox.TString>;
|
|
745
|
-
type: _$typebox.TString;
|
|
746
|
-
target: _$typebox.TArray<_$typebox.TString>;
|
|
747
|
-
}>;
|
|
748
|
-
type VercelEnvVar = Static<typeof vercelEnvVarSchema>;
|
|
749
|
-
declare const createEnvVarBodySchema: _$typebox.TObject<{
|
|
750
|
-
key: _$typebox.TString;
|
|
751
|
-
value: _$typebox.TString;
|
|
752
|
-
type: _$typebox.TString;
|
|
753
|
-
target: _$typebox.TArray<_$typebox.TString>;
|
|
754
|
-
}>;
|
|
755
|
-
//#endregion
|
|
756
|
-
//#region ../../src/cli/platform/services/VercelCli.d.ts
|
|
757
|
-
/**
|
|
758
|
-
* Wraps Vercel CLI commands and token management.
|
|
759
|
-
*
|
|
760
|
-
* Used for operations where the Vercel CLI provides value:
|
|
761
|
-
* OAuth login, prebuilt deploy, and auth token extraction.
|
|
762
|
-
*/
|
|
763
|
-
declare class VercelCli {
|
|
764
|
-
protected readonly log: _$alepha_logger0.Logger;
|
|
765
|
-
protected readonly shell: ShellProvider;
|
|
766
|
-
protected readonly fs: FileSystemProvider;
|
|
767
|
-
protected readonly utils: AlephaCliUtils;
|
|
768
|
-
protected readonly pm: PackageManagerUtils;
|
|
769
|
-
protected readonly runner: Runner;
|
|
770
|
-
protected runShell(command: string, options?: Parameters<ShellProvider["run"]>[1]): Promise<string>;
|
|
771
|
-
/**
|
|
772
|
-
* Ensure vercel CLI is installed in the project.
|
|
773
|
-
*/
|
|
774
|
-
ensureInstalled(root: string, run: RunnerMethod): Promise<void>;
|
|
775
|
-
/**
|
|
776
|
-
* Get the Vercel auth token.
|
|
777
|
-
*
|
|
778
|
-
* Priority:
|
|
779
|
-
* 1. VERCEL_TOKEN environment variable (CI/CD)
|
|
780
|
-
* 2. Vercel CLI auth.json file (local dev)
|
|
781
|
-
*/
|
|
782
|
-
getAuthToken(): Promise<string>;
|
|
783
|
-
/**
|
|
784
|
-
* Validate the current auth token.
|
|
785
|
-
*/
|
|
786
|
-
whoami(): Promise<string>;
|
|
787
|
-
/**
|
|
788
|
-
* Open the browser-based login flow.
|
|
789
|
-
*/
|
|
790
|
-
login(): Promise<void>;
|
|
791
|
-
/**
|
|
792
|
-
* Deploy a prebuilt .vercel/output/ directory.
|
|
793
|
-
*
|
|
794
|
-
* Returns the deployment URL.
|
|
795
|
-
*/
|
|
796
|
-
deploy(distDir: string, options: {
|
|
797
|
-
prod?: boolean;
|
|
798
|
-
token?: string;
|
|
799
|
-
}): Promise<string | undefined>;
|
|
800
|
-
/**
|
|
801
|
-
* Resolve the path to Vercel CLI auth.json.
|
|
802
|
-
*/
|
|
803
|
-
protected getAuthFilePath(): string;
|
|
804
|
-
}
|
|
805
|
-
//#endregion
|
|
806
|
-
//#region ../../src/cli/platform/services/VercelApi.d.ts
|
|
807
|
-
/**
|
|
808
|
-
* Thin wrapper over the Vercel REST API.
|
|
809
|
-
*
|
|
810
|
-
* Uses the auth token from VercelCli for all requests.
|
|
811
|
-
*/
|
|
812
|
-
declare class VercelApi {
|
|
813
|
-
protected static readonly BASE = "https://api.vercel.com";
|
|
814
|
-
protected readonly log: _$alepha_logger0.Logger;
|
|
815
|
-
protected readonly alepha: Alepha;
|
|
816
|
-
protected readonly vercelCli: VercelCli;
|
|
817
|
-
protected token?: string;
|
|
818
|
-
/**
|
|
819
|
-
* Obtain the current auth token from the Vercel CLI.
|
|
820
|
-
*/
|
|
821
|
-
resolveToken(): Promise<string>;
|
|
822
|
-
listProjects(): Promise<VercelProject[]>;
|
|
823
|
-
getProject(nameOrId: string): Promise<VercelProject | undefined>;
|
|
824
|
-
createProject(name: string): Promise<VercelProject>;
|
|
825
|
-
updateProject(nameOrId: string, settings: {
|
|
826
|
-
framework?: null;
|
|
827
|
-
}): Promise<void>;
|
|
828
|
-
deleteProject(nameOrId: string): Promise<void>;
|
|
829
|
-
listDeployments(projectId: string, options?: {
|
|
830
|
-
limit?: number;
|
|
831
|
-
target?: string;
|
|
832
|
-
}): Promise<VercelDeployment[]>;
|
|
833
|
-
listEnvVars(projectId: string): Promise<VercelEnvVar[]>;
|
|
834
|
-
upsertEnvVars(projectId: string, vars: Array<{
|
|
835
|
-
key: string;
|
|
836
|
-
value: string;
|
|
837
|
-
target: string[];
|
|
838
|
-
}>): Promise<void>;
|
|
839
|
-
deleteEnvVar(projectId: string, envVarId: string): Promise<void>;
|
|
840
|
-
protected fetch<T = unknown>(path: string, options?: {
|
|
841
|
-
method?: string;
|
|
842
|
-
body?: unknown;
|
|
843
|
-
bodySchema?: TSchema;
|
|
844
|
-
schema?: TSchema;
|
|
845
|
-
query?: Record<string, string>;
|
|
846
|
-
}): Promise<T>;
|
|
847
|
-
}
|
|
848
|
-
//#endregion
|
|
849
|
-
//#region ../../src/cli/platform/adapters/VercelAdapter.d.ts
|
|
850
|
-
/**
|
|
851
|
-
* Vercel platform adapter.
|
|
852
|
-
*
|
|
853
|
-
* Uses the Vercel CLI for login and deploy (--prebuilt),
|
|
854
|
-
* and the Vercel REST API for project management, env vars, and inspection.
|
|
855
|
-
*
|
|
856
|
-
* v1 scope: deploy pipeline only. No DB/storage/KV provisioning.
|
|
857
|
-
*/
|
|
858
|
-
declare class VercelAdapter extends PlatformAdapter {
|
|
859
|
-
protected readonly log: _$alepha_logger0.Logger;
|
|
860
|
-
protected readonly fs: FileSystemProvider;
|
|
861
|
-
protected readonly shell: ShellProvider;
|
|
862
|
-
protected readonly utils: AlephaCliUtils;
|
|
863
|
-
protected readonly cache: PlatformCacheProvider;
|
|
864
|
-
protected readonly alepha: Alepha;
|
|
865
|
-
protected readonly envUtils: EnvUtils;
|
|
866
|
-
protected readonly api: VercelApi;
|
|
867
|
-
protected readonly vercelCli: VercelCli;
|
|
868
|
-
protected readonly runner: Runner;
|
|
869
|
-
/**
|
|
870
|
-
* Vars that should not be pushed as env vars.
|
|
871
|
-
* These are either handled by the build or are internal.
|
|
872
|
-
*/
|
|
873
|
-
static readonly EXCLUDED_SECRET_KEYS: Set<string>;
|
|
874
|
-
protected runShell(command: string, options?: Parameters<ShellProvider["run"]>[1]): Promise<string>;
|
|
875
|
-
authenticate(ctx: PlatformContext, run: RunnerMethod): Promise<void>;
|
|
876
|
-
build(ctx: AppContext, run: RunnerMethod): Promise<void>;
|
|
877
|
-
deploy(ctx: AppContext, run: RunnerMethod): Promise<string | undefined>;
|
|
878
|
-
secrets(ctx: PlatformContext, run: RunnerMethod): Promise<void>;
|
|
879
|
-
inspect(ctx: PlatformContext, run: RunnerMethod): Promise<PlatformState>;
|
|
880
|
-
teardown(ctx: PlatformContext, run: RunnerMethod): Promise<void>;
|
|
881
|
-
}
|
|
882
|
-
//#endregion
|
|
883
|
-
//#region ../../src/cli/platform/services/PlatformInspector.d.ts
|
|
884
|
-
interface ResolvedPlatformConfig {
|
|
885
|
-
project: string;
|
|
886
|
-
defaultEnv: string;
|
|
887
|
-
environments: Record<string, EnvironmentConfig>;
|
|
888
|
-
}
|
|
889
|
-
/**
|
|
890
|
-
* Reads platform config and resolves project topology.
|
|
891
|
-
*
|
|
892
|
-
* Validates project name and environment configuration. Does NOT
|
|
893
|
-
* introspect app code for resources — that happens at deploy time via
|
|
894
|
-
* ViteBuildProvider.
|
|
895
|
-
*
|
|
896
|
-
* Each app self-declares its platform topology via its own
|
|
897
|
-
* `alepha.config.ts`. Run `alepha platform <op>` from the app's
|
|
898
|
-
* directory; no monorepo-root orchestration here.
|
|
899
|
-
*/
|
|
900
|
-
declare class PlatformInspector {
|
|
901
|
-
protected readonly log: _$alepha_logger0.Logger;
|
|
902
|
-
protected readonly alepha: Alepha;
|
|
903
|
-
protected readonly fs: FileSystemProvider;
|
|
904
|
-
protected readonly asker: Asker;
|
|
905
|
-
protected readonly options: Readonly<{
|
|
906
|
-
name?: string | undefined;
|
|
907
|
-
default?: string | undefined;
|
|
908
|
-
secrets?: {
|
|
909
|
-
environmentPattern?: string | undefined;
|
|
910
|
-
store: "github";
|
|
911
|
-
} | undefined;
|
|
912
|
-
environments: Record<string, {
|
|
913
|
-
domain?: string | undefined;
|
|
914
|
-
zone?: string | undefined;
|
|
915
|
-
jurisdiction?: "eu" | "fedramp" | undefined;
|
|
916
|
-
accountId?: string | undefined;
|
|
917
|
-
adapter: "cloudflare" | "vercel";
|
|
918
|
-
}>;
|
|
919
|
-
}>;
|
|
920
|
-
protected readonly naming: NamingService;
|
|
921
|
-
/**
|
|
922
|
-
* Resolve and validate the full platform configuration.
|
|
923
|
-
*/
|
|
924
|
-
resolveConfig(root: string): Promise<ResolvedPlatformConfig>;
|
|
925
|
-
/**
|
|
926
|
-
* Resolve a specific environment, validating it exists.
|
|
927
|
-
*/
|
|
928
|
-
resolveEnvironment(root: string, envName: string): Promise<EnvironmentConfig>;
|
|
929
|
-
protected resolveProjectName(root: string, configName?: string): Promise<string>;
|
|
930
|
-
}
|
|
931
|
-
//#endregion
|
|
932
|
-
//#region ../../src/cli/platform/services/PlatformOrchestrator.d.ts
|
|
933
|
-
/**
|
|
934
|
-
* Orchestrates platform lifecycle operations.
|
|
935
|
-
*
|
|
936
|
-
* Coordinates adapter calls in the correct order for
|
|
937
|
-
* up (build -> migrate -> deploy), down, plan, and status.
|
|
938
|
-
*/
|
|
939
|
-
declare class PlatformOrchestrator {
|
|
940
|
-
protected readonly log: _$alepha_logger0.Logger;
|
|
941
|
-
protected readonly color: ConsoleColorProvider;
|
|
942
|
-
protected readonly inspector: PlatformInspector;
|
|
943
|
-
protected readonly naming: NamingService;
|
|
944
|
-
protected readonly cloudflareAdapter: CloudflareAdapter;
|
|
945
|
-
protected readonly vercelAdapter: VercelAdapter;
|
|
946
|
-
protected readonly alepha: Alepha;
|
|
947
|
-
resolveAdapter(adapterName: string): PlatformAdapter;
|
|
948
|
-
up(options: {
|
|
949
|
-
root: string;
|
|
950
|
-
env: string;
|
|
951
|
-
apps: AppDefinition[];
|
|
952
|
-
run: RunnerMethod;
|
|
953
|
-
/**
|
|
954
|
-
* Pre-built mode — the artifact's `dist/` is already produced.
|
|
955
|
-
*
|
|
956
|
-
* Still runs auth → provision → build → migrate → deploy → secrets,
|
|
957
|
-
* but the `build` step shells out to `alepha build --prebuilt` which
|
|
958
|
-
* only regenerates the target-specific deploy config (e.g.
|
|
959
|
-
* `wrangler.jsonc`) and skips the Vite client + server builds.
|
|
960
|
-
* Used by external orchestrators (Rocket) that ship a pre-built
|
|
961
|
-
* `dist/` and just need the wrangler config refreshed for
|
|
962
|
-
* per-tenant overrides on every deploy.
|
|
963
|
-
*/
|
|
964
|
-
prebuilt?: boolean;
|
|
965
|
-
}): Promise<{
|
|
966
|
-
urls: string[];
|
|
967
|
-
domain?: string;
|
|
968
|
-
}>;
|
|
969
|
-
/**
|
|
970
|
-
* Pretty-print the `up()` result to stdout. Matches the formatting the
|
|
971
|
-
* orchestrator used to emit inline; split out so callers that want
|
|
972
|
-
* JSON output can skip this branch.
|
|
973
|
-
*/
|
|
974
|
-
printUpSummary(result: {
|
|
975
|
-
urls: string[];
|
|
976
|
-
domain?: string;
|
|
977
|
-
}): void;
|
|
978
|
-
down(options: {
|
|
979
|
-
root: string;
|
|
980
|
-
env: string;
|
|
981
|
-
apps: AppDefinition[];
|
|
982
|
-
run: RunnerMethod;
|
|
983
|
-
confirm: (prompt: string) => Promise<string>;
|
|
984
|
-
}): Promise<boolean>;
|
|
985
|
-
plan(options: {
|
|
986
|
-
root: string;
|
|
987
|
-
env: string;
|
|
988
|
-
apps: AppDefinition[];
|
|
989
|
-
}): Promise<{
|
|
990
|
-
config: ResolvedPlatformConfig;
|
|
991
|
-
naming: NamingContext;
|
|
992
|
-
apps: AppDefinition[];
|
|
993
|
-
}>;
|
|
994
|
-
status(options: {
|
|
995
|
-
root: string;
|
|
996
|
-
env: string;
|
|
997
|
-
apps: AppDefinition[];
|
|
998
|
-
run: RunnerMethod;
|
|
999
|
-
}): Promise<{
|
|
1000
|
-
config: ResolvedPlatformConfig;
|
|
1001
|
-
state: PlatformState;
|
|
1002
|
-
}>;
|
|
1003
|
-
isTmpEnv(env: string): boolean;
|
|
1004
|
-
}
|
|
1005
|
-
//#endregion
|
|
1006
|
-
//#region ../../src/cli/platform/providers/SecretStoreProvider.d.ts
|
|
1007
|
-
/**
|
|
1008
|
-
* A secret stored in a remote secret store.
|
|
1009
|
-
*/
|
|
1010
|
-
interface RemoteSecret {
|
|
1011
|
-
name: string;
|
|
1012
|
-
updatedAt?: string;
|
|
1013
|
-
}
|
|
1014
|
-
/**
|
|
1015
|
-
* Abstract provider for managing secrets in an external store.
|
|
1016
|
-
*
|
|
1017
|
-
* Implementations: GitHubSecretStore, MemorySecretStore
|
|
1018
|
-
*/
|
|
1019
|
-
declare abstract class SecretStoreProvider {
|
|
1020
|
-
/**
|
|
1021
|
-
* Verify the backing store is reachable and authenticated.
|
|
1022
|
-
*/
|
|
1023
|
-
abstract ensureAvailable(): Promise<void>;
|
|
1024
|
-
/**
|
|
1025
|
-
* Ensure the target environment exists in the store, creating it if needed.
|
|
1026
|
-
*/
|
|
1027
|
-
abstract ensureEnvironment(environment: string): Promise<void>;
|
|
1028
|
-
/**
|
|
1029
|
-
* List all secrets in a given environment.
|
|
1030
|
-
*/
|
|
1031
|
-
abstract list(environment: string): Promise<RemoteSecret[]>;
|
|
1032
|
-
/**
|
|
1033
|
-
* Set (create or update) a secret in a given environment.
|
|
1034
|
-
*/
|
|
1035
|
-
abstract set(environment: string, key: string, value: string): Promise<void>;
|
|
1036
|
-
/**
|
|
1037
|
-
* Delete a secret from a given environment.
|
|
1038
|
-
*/
|
|
1039
|
-
abstract delete(environment: string, key: string): Promise<void>;
|
|
1040
|
-
}
|
|
1041
|
-
//#endregion
|
|
1042
|
-
//#region ../../src/cli/platform/providers/GitHubSecretStore.d.ts
|
|
1043
|
-
/**
|
|
1044
|
-
* GitHub Actions secret store backed by the `gh` CLI.
|
|
1045
|
-
*
|
|
1046
|
-
* Requires the GitHub CLI (`gh`) to be installed and authenticated.
|
|
1047
|
-
* Pushes secrets into GitHub Actions environments.
|
|
1048
|
-
*/
|
|
1049
|
-
declare class GitHubSecretStore implements SecretStoreProvider {
|
|
1050
|
-
protected readonly log: _$alepha_logger0.Logger;
|
|
1051
|
-
protected readonly shell: ShellProvider;
|
|
1052
|
-
protected readonly fs: FileSystemProvider;
|
|
1053
|
-
/**
|
|
1054
|
-
* Verify that `gh` is installed and authenticated.
|
|
1055
|
-
*/
|
|
1056
|
-
ensureAvailable(): Promise<void>;
|
|
1057
|
-
/**
|
|
1058
|
-
* Create the GitHub Actions environment if it doesn't exist.
|
|
1059
|
-
*/
|
|
1060
|
-
ensureEnvironment(environment: string): Promise<void>;
|
|
1061
|
-
/**
|
|
1062
|
-
* List all secrets in a GitHub Actions environment.
|
|
1063
|
-
*/
|
|
1064
|
-
list(environment: string): Promise<RemoteSecret[]>;
|
|
1065
|
-
/**
|
|
1066
|
-
* Set a secret in a GitHub Actions environment.
|
|
1067
|
-
*
|
|
1068
|
-
* Writes a dotenv-formatted file and uses `gh secret set --env-file` to
|
|
1069
|
-
* avoid shell pipe issues with NodeShellProvider escaping the `|` character.
|
|
1070
|
-
*/
|
|
1071
|
-
set(environment: string, key: string, value: string): Promise<void>;
|
|
1072
|
-
/**
|
|
1073
|
-
* Delete a secret from a GitHub Actions environment.
|
|
1074
|
-
*/
|
|
1075
|
-
delete(environment: string, key: string): Promise<void>;
|
|
1076
|
-
}
|
|
1077
|
-
//#endregion
|
|
1078
|
-
//#region ../../src/cli/platform/services/SecretFilterService.d.ts
|
|
1079
|
-
/**
|
|
1080
|
-
* Filters environment variables for secret store syncing.
|
|
1081
|
-
*
|
|
1082
|
-
* Excludes platform-managed vars (NODE_ENV), build-time vars (VITE_*),
|
|
1083
|
-
* and empty values. Keeps everything else — including DATABASE_URL
|
|
1084
|
-
* and POSTGRES_SCHEMA which GitHub Actions needs.
|
|
1085
|
-
*
|
|
1086
|
-
* Also handles renaming GITHUB_* keys since GitHub Actions rejects
|
|
1087
|
-
* secret names starting with GITHUB_.
|
|
1088
|
-
*/
|
|
1089
|
-
declare class SecretFilterService {
|
|
1090
|
-
protected static readonly EXCLUDED_KEYS: Set<string>;
|
|
1091
|
-
protected static readonly GITHUB_PREFIX = "GITHUB_";
|
|
1092
|
-
protected static readonly REMOTE_PREFIX = "APP_GITHUB_";
|
|
1093
|
-
/**
|
|
1094
|
-
* Return only the entries that should be pushed to a secret store.
|
|
1095
|
-
*/
|
|
1096
|
-
filter(envVars: Record<string, string>): Record<string, string>;
|
|
1097
|
-
/**
|
|
1098
|
-
* Convert a local env key to a remote secret name.
|
|
1099
|
-
*
|
|
1100
|
-
* GITHUB_* keys are prefixed with APP_ since GitHub Actions rejects
|
|
1101
|
-
* secret names starting with GITHUB_.
|
|
1102
|
-
*/
|
|
1103
|
-
toRemoteName(key: string): string;
|
|
1104
|
-
/**
|
|
1105
|
-
* Convert a remote secret name back to the local env key.
|
|
1106
|
-
*/
|
|
1107
|
-
toLocalName(remoteName: string): string;
|
|
1108
|
-
}
|
|
1109
|
-
//#endregion
|
|
1110
6
|
//#region ../../src/cli/platform/commands/SecretsCommand.d.ts
|
|
1111
7
|
declare class SecretsCommand {
|
|
1112
|
-
protected readonly log:
|
|
8
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
1113
9
|
protected readonly options: Readonly<{
|
|
1114
10
|
name?: string | undefined;
|
|
1115
11
|
default?: string | undefined;
|
|
12
|
+
tenancy?: "required" | "none" | "optional" | undefined;
|
|
1116
13
|
secrets?: {
|
|
14
|
+
keys?: string[] | undefined;
|
|
15
|
+
store?: "github" | undefined;
|
|
1117
16
|
environmentPattern?: string | undefined;
|
|
1118
|
-
store: "github";
|
|
1119
17
|
} | undefined;
|
|
1120
18
|
environments: Record<string, {
|
|
1121
19
|
domain?: string | undefined;
|
|
@@ -1131,34 +29,36 @@ declare class SecretsCommand {
|
|
|
1131
29
|
protected readonly githubStore: GitHubSecretStore;
|
|
1132
30
|
protected readonly filter: SecretFilterService;
|
|
1133
31
|
protected readonly color: ConsoleColorProvider;
|
|
1134
|
-
protected readonly envFlags:
|
|
1135
|
-
env:
|
|
32
|
+
protected readonly envFlags: import("typebox").TObject<{
|
|
33
|
+
env: import("typebox").TOptional<import("typebox").TString>;
|
|
1136
34
|
}>;
|
|
1137
|
-
protected readonly list:
|
|
1138
|
-
env:
|
|
1139
|
-
format:
|
|
1140
|
-
}>,
|
|
1141
|
-
protected readonly diff:
|
|
1142
|
-
env:
|
|
1143
|
-
}>,
|
|
1144
|
-
protected readonly apply:
|
|
1145
|
-
env:
|
|
1146
|
-
"dry-run":
|
|
1147
|
-
}>,
|
|
1148
|
-
readonly secrets:
|
|
35
|
+
protected readonly list: import("alepha/command").CommandPrimitive<import("typebox").TObject<{
|
|
36
|
+
env: import("typebox").TOptional<import("typebox").TString>;
|
|
37
|
+
format: import("typebox").TOptional<import("typebox").TString>;
|
|
38
|
+
}>, import("typebox").TSchema, import("typebox").TObject<import("typebox").TProperties>>;
|
|
39
|
+
protected readonly diff: import("alepha/command").CommandPrimitive<import("typebox").TObject<{
|
|
40
|
+
env: import("typebox").TOptional<import("typebox").TString>;
|
|
41
|
+
}>, import("typebox").TSchema, import("typebox").TObject<import("typebox").TProperties>>;
|
|
42
|
+
protected readonly apply: import("alepha/command").CommandPrimitive<import("typebox").TObject<{
|
|
43
|
+
env: import("typebox").TOptional<import("typebox").TString>;
|
|
44
|
+
"dry-run": import("typebox").TOptional<import("typebox").TBoolean>;
|
|
45
|
+
}>, import("typebox").TSchema, import("typebox").TObject<import("typebox").TProperties>>;
|
|
46
|
+
readonly secrets: import("alepha/command").CommandPrimitive<import("typebox").TObject<import("typebox").TProperties>, import("typebox").TSchema, import("typebox").TObject<import("typebox").TProperties>>;
|
|
1149
47
|
resolveStore(): SecretStoreProvider;
|
|
1150
48
|
protected resolveEnvironmentName(project: string, env: string): string;
|
|
1151
49
|
}
|
|
1152
50
|
//#endregion
|
|
1153
51
|
//#region ../../src/cli/platform/commands/platform.d.ts
|
|
1154
52
|
declare class PlatformCommand {
|
|
1155
|
-
protected readonly log:
|
|
53
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
1156
54
|
protected readonly options: Readonly<{
|
|
1157
55
|
name?: string | undefined;
|
|
1158
56
|
default?: string | undefined;
|
|
57
|
+
tenancy?: "required" | "none" | "optional" | undefined;
|
|
1159
58
|
secrets?: {
|
|
59
|
+
keys?: string[] | undefined;
|
|
60
|
+
store?: "github" | undefined;
|
|
1160
61
|
environmentPattern?: string | undefined;
|
|
1161
|
-
store: "github";
|
|
1162
62
|
} | undefined;
|
|
1163
63
|
environments: Record<string, {
|
|
1164
64
|
domain?: string | undefined;
|
|
@@ -1179,49 +79,71 @@ declare class PlatformCommand {
|
|
|
1179
79
|
/**
|
|
1180
80
|
* Common flags for env targeting.
|
|
1181
81
|
*/
|
|
1182
|
-
protected readonly envFlags:
|
|
1183
|
-
env:
|
|
1184
|
-
|
|
1185
|
-
|
|
82
|
+
protected readonly envFlags: import("typebox").TObject<{
|
|
83
|
+
env: import("typebox").TOptional<import("typebox").TString>;
|
|
84
|
+
tenant: import("typebox").TOptional<import("typebox").TString>;
|
|
85
|
+
verbose: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
86
|
+
json: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
1186
87
|
}>;
|
|
1187
|
-
protected readonly plan:
|
|
1188
|
-
env:
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
verbose:
|
|
1217
|
-
json:
|
|
1218
|
-
}>,
|
|
1219
|
-
protected readonly
|
|
1220
|
-
env:
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
88
|
+
protected readonly plan: import("alepha/command").CommandPrimitive<import("typebox").TObject<{
|
|
89
|
+
env: import("typebox").TOptional<import("typebox").TString>;
|
|
90
|
+
tenant: import("typebox").TOptional<import("typebox").TString>;
|
|
91
|
+
verbose: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
92
|
+
json: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
93
|
+
}>, import("typebox").TSchema, import("typebox").TObject<import("typebox").TProperties>>;
|
|
94
|
+
protected readonly up: import("alepha/command").CommandPrimitive<import("typebox").TObject<{
|
|
95
|
+
prebuilt: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
96
|
+
env: import("typebox").TOptional<import("typebox").TString>;
|
|
97
|
+
tenant: import("typebox").TOptional<import("typebox").TString>;
|
|
98
|
+
verbose: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
99
|
+
json: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
100
|
+
}>, import("typebox").TSchema, import("typebox").TObject<import("typebox").TProperties>>;
|
|
101
|
+
protected readonly down: import("alepha/command").CommandPrimitive<import("typebox").TObject<{
|
|
102
|
+
yes: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
103
|
+
env: import("typebox").TOptional<import("typebox").TString>;
|
|
104
|
+
tenant: import("typebox").TOptional<import("typebox").TString>;
|
|
105
|
+
verbose: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
106
|
+
json: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
107
|
+
}>, import("typebox").TSchema, import("typebox").TObject<import("typebox").TProperties>>;
|
|
108
|
+
protected readonly status: import("alepha/command").CommandPrimitive<import("typebox").TObject<{
|
|
109
|
+
env: import("typebox").TOptional<import("typebox").TString>;
|
|
110
|
+
tenant: import("typebox").TOptional<import("typebox").TString>;
|
|
111
|
+
verbose: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
112
|
+
json: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
113
|
+
}>, import("typebox").TSchema, import("typebox").TObject<import("typebox").TProperties>>;
|
|
114
|
+
protected readonly build: import("alepha/command").CommandPrimitive<import("typebox").TObject<{
|
|
115
|
+
env: import("typebox").TOptional<import("typebox").TString>;
|
|
116
|
+
tenant: import("typebox").TOptional<import("typebox").TString>;
|
|
117
|
+
verbose: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
118
|
+
json: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
119
|
+
}>, import("typebox").TSchema, import("typebox").TObject<import("typebox").TProperties>>;
|
|
120
|
+
protected readonly deploy: import("alepha/command").CommandPrimitive<import("typebox").TObject<{
|
|
121
|
+
env: import("typebox").TOptional<import("typebox").TString>;
|
|
122
|
+
tenant: import("typebox").TOptional<import("typebox").TString>;
|
|
123
|
+
verbose: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
124
|
+
json: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
125
|
+
}>, import("typebox").TSchema, import("typebox").TObject<import("typebox").TProperties>>;
|
|
126
|
+
protected readonly migrate: import("alepha/command").CommandPrimitive<import("typebox").TObject<{
|
|
127
|
+
env: import("typebox").TOptional<import("typebox").TString>;
|
|
128
|
+
tenant: import("typebox").TOptional<import("typebox").TString>;
|
|
129
|
+
verbose: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
130
|
+
json: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
131
|
+
}>, import("typebox").TSchema, import("typebox").TObject<import("typebox").TProperties>>;
|
|
132
|
+
protected readonly dbExport: import("alepha/command").CommandPrimitive<import("typebox").TObject<{
|
|
133
|
+
output: import("typebox").TOptional<import("typebox").TString>;
|
|
134
|
+
keepSql: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
135
|
+
env: import("typebox").TOptional<import("typebox").TString>;
|
|
136
|
+
tenant: import("typebox").TOptional<import("typebox").TString>;
|
|
137
|
+
verbose: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
138
|
+
json: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
139
|
+
}>, import("typebox").TSchema, import("typebox").TObject<import("typebox").TProperties>>;
|
|
140
|
+
/**
|
|
141
|
+
* `db` subgroup — operations against the *deployed* database (export,
|
|
142
|
+
* migrate). They live under `platform` (not core `alepha db`) because
|
|
143
|
+
* they need the env config, tenancy, adapter, and resource naming.
|
|
144
|
+
*/
|
|
145
|
+
protected readonly db: import("alepha/command").CommandPrimitive<import("typebox").TObject<import("typebox").TProperties>, import("typebox").TSchema, import("typebox").TObject<import("typebox").TProperties>>;
|
|
146
|
+
readonly platform: import("alepha/command").CommandPrimitive<import("typebox").TObject<import("typebox").TProperties>, import("typebox").TSchema, import("typebox").TObject<import("typebox").TProperties>>;
|
|
1225
147
|
/**
|
|
1226
148
|
* Resolve app definitions.
|
|
1227
149
|
*
|
|
@@ -1232,186 +154,47 @@ declare class PlatformCommand {
|
|
|
1232
154
|
* ViteBuildProvider.init() per app. This is expensive -- only done
|
|
1233
155
|
* for up/down/status, not for plan.
|
|
1234
156
|
*/
|
|
1235
|
-
protected
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
interface MemorySecretStoreCall {
|
|
1242
|
-
method: "ensureAvailable" | "ensureEnvironment" | "list" | "set" | "delete";
|
|
1243
|
-
environment?: string;
|
|
1244
|
-
key?: string;
|
|
1245
|
-
value?: string;
|
|
1246
|
-
}
|
|
1247
|
-
/**
|
|
1248
|
-
* In-memory implementation of SecretStoreProvider for testing.
|
|
1249
|
-
* Records all operations and stores secrets in a nested Map.
|
|
1250
|
-
*/
|
|
1251
|
-
declare class MemorySecretStore implements SecretStoreProvider {
|
|
1252
|
-
/**
|
|
1253
|
-
* Secrets keyed by environment, then by key.
|
|
1254
|
-
*/
|
|
1255
|
-
secrets: Map<string, Map<string, string>>;
|
|
1256
|
-
/**
|
|
1257
|
-
* All recorded operations.
|
|
1258
|
-
*/
|
|
1259
|
-
calls: MemorySecretStoreCall[];
|
|
1260
|
-
/**
|
|
1261
|
-
* When set, ensureAvailable() will throw with this message.
|
|
1262
|
-
*/
|
|
1263
|
-
availableError: string | null;
|
|
1264
|
-
ensureAvailable(): Promise<void>;
|
|
1265
|
-
ensureEnvironment(environment: string): Promise<void>;
|
|
1266
|
-
list(environment: string): Promise<RemoteSecret[]>;
|
|
1267
|
-
set(environment: string, key: string, value: string): Promise<void>;
|
|
1268
|
-
delete(environment: string, key: string): Promise<void>;
|
|
1269
|
-
/**
|
|
1270
|
-
* Check if set() was called for a given environment and key.
|
|
1271
|
-
*/
|
|
1272
|
-
wasSet(environment: string, key: string): boolean;
|
|
1273
|
-
/**
|
|
1274
|
-
* Check if delete() was called for a given environment and key.
|
|
1275
|
-
*/
|
|
1276
|
-
wasDeleted(environment: string, key: string): boolean;
|
|
157
|
+
protected resolveApp(root: string, _config: ResolvedPlatformConfig, isServerless: boolean, options?: {
|
|
158
|
+
prebuilt?: boolean;
|
|
159
|
+
}): Promise<{
|
|
160
|
+
entry: AppEntry;
|
|
161
|
+
resources: DetectedResources;
|
|
162
|
+
}>;
|
|
1277
163
|
/**
|
|
1278
|
-
*
|
|
164
|
+
* @deprecated single-app projects; use `resolveApp` directly.
|
|
165
|
+
* Kept temporarily so existing commands can be migrated one at a time.
|
|
1279
166
|
*/
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
167
|
+
protected resolveApps(root: string, config: ResolvedPlatformConfig, isServerless: boolean, options?: {
|
|
168
|
+
prebuilt?: boolean;
|
|
169
|
+
}): Promise<Array<{
|
|
170
|
+
name: string;
|
|
171
|
+
path: string;
|
|
172
|
+
entry: AppEntry;
|
|
173
|
+
resources: DetectedResources;
|
|
174
|
+
}>>;
|
|
175
|
+
protected isServerless(adapter: string): boolean;
|
|
1284
176
|
/**
|
|
1285
|
-
*
|
|
177
|
+
* Read `dist/manifest.json` if present. Returns `null` when the file
|
|
178
|
+
* doesn't exist or isn't parseable — caller falls back to the
|
|
179
|
+
* Vite-introspection path.
|
|
1286
180
|
*/
|
|
1287
|
-
|
|
181
|
+
protected readManifest(root: string): Promise<{
|
|
182
|
+
version: number;
|
|
183
|
+
project: string;
|
|
184
|
+
resources: DetectedResources;
|
|
185
|
+
} | null>;
|
|
186
|
+
protected detectResources(alepha: any): DetectedResources;
|
|
1288
187
|
}
|
|
1289
188
|
//#endregion
|
|
1290
|
-
//#region ../../src/cli/platform/schemas/platform.d.ts
|
|
1291
|
-
declare const platformStatusWorkerSchema: _$typebox.TObject<{
|
|
1292
|
-
name: _$typebox.TString;
|
|
1293
|
-
exists: _$typebox.TBoolean;
|
|
1294
|
-
id: _$typebox.TOptional<_$typebox.TString>;
|
|
1295
|
-
detail: _$typebox.TOptional<_$typebox.TString>;
|
|
1296
|
-
version: _$typebox.TOptional<_$typebox.TString>;
|
|
1297
|
-
tag: _$typebox.TOptional<_$typebox.TString>;
|
|
1298
|
-
createdAt: _$typebox.TOptional<_$typebox.TString>;
|
|
1299
|
-
}>;
|
|
1300
|
-
declare const platformStatusResourceSchema: _$typebox.TObject<{
|
|
1301
|
-
name: _$typebox.TString;
|
|
1302
|
-
exists: _$typebox.TBoolean;
|
|
1303
|
-
id: _$typebox.TOptional<_$typebox.TString>;
|
|
1304
|
-
detail: _$typebox.TOptional<_$typebox.TString>;
|
|
1305
|
-
}>;
|
|
1306
|
-
declare const platformStatusSecretSchema: _$typebox.TObject<{
|
|
1307
|
-
name: _$typebox.TString;
|
|
1308
|
-
deployed: _$typebox.TBoolean;
|
|
1309
|
-
}>;
|
|
1310
|
-
declare const platformStatusSchema: _$typebox.TObject<{
|
|
1311
|
-
project: _$typebox.TString;
|
|
1312
|
-
env: _$typebox.TString;
|
|
1313
|
-
adapter: _$typebox.TString;
|
|
1314
|
-
workers: _$typebox.TArray<_$typebox.TObject<{
|
|
1315
|
-
name: _$typebox.TString;
|
|
1316
|
-
exists: _$typebox.TBoolean;
|
|
1317
|
-
id: _$typebox.TOptional<_$typebox.TString>;
|
|
1318
|
-
detail: _$typebox.TOptional<_$typebox.TString>;
|
|
1319
|
-
version: _$typebox.TOptional<_$typebox.TString>;
|
|
1320
|
-
tag: _$typebox.TOptional<_$typebox.TString>;
|
|
1321
|
-
createdAt: _$typebox.TOptional<_$typebox.TString>;
|
|
1322
|
-
}>>;
|
|
1323
|
-
databases: _$typebox.TArray<_$typebox.TObject<{
|
|
1324
|
-
name: _$typebox.TString;
|
|
1325
|
-
exists: _$typebox.TBoolean;
|
|
1326
|
-
id: _$typebox.TOptional<_$typebox.TString>;
|
|
1327
|
-
detail: _$typebox.TOptional<_$typebox.TString>;
|
|
1328
|
-
}>>;
|
|
1329
|
-
buckets: _$typebox.TArray<_$typebox.TObject<{
|
|
1330
|
-
name: _$typebox.TString;
|
|
1331
|
-
exists: _$typebox.TBoolean;
|
|
1332
|
-
id: _$typebox.TOptional<_$typebox.TString>;
|
|
1333
|
-
detail: _$typebox.TOptional<_$typebox.TString>;
|
|
1334
|
-
}>>;
|
|
1335
|
-
kvNamespaces: _$typebox.TArray<_$typebox.TObject<{
|
|
1336
|
-
name: _$typebox.TString;
|
|
1337
|
-
exists: _$typebox.TBoolean;
|
|
1338
|
-
id: _$typebox.TOptional<_$typebox.TString>;
|
|
1339
|
-
detail: _$typebox.TOptional<_$typebox.TString>;
|
|
1340
|
-
}>>;
|
|
1341
|
-
queues: _$typebox.TArray<_$typebox.TObject<{
|
|
1342
|
-
name: _$typebox.TString;
|
|
1343
|
-
exists: _$typebox.TBoolean;
|
|
1344
|
-
id: _$typebox.TOptional<_$typebox.TString>;
|
|
1345
|
-
detail: _$typebox.TOptional<_$typebox.TString>;
|
|
1346
|
-
}>>;
|
|
1347
|
-
secrets: _$typebox.TArray<_$typebox.TObject<{
|
|
1348
|
-
name: _$typebox.TString;
|
|
1349
|
-
deployed: _$typebox.TBoolean;
|
|
1350
|
-
}>>;
|
|
1351
|
-
}>;
|
|
1352
|
-
type PlatformStatusOutput = Static<typeof platformStatusSchema>;
|
|
1353
|
-
declare const platformPlanAppResourcesSchema: _$typebox.TObject<{
|
|
1354
|
-
hasDatabase: _$typebox.TBoolean;
|
|
1355
|
-
hasBucket: _$typebox.TBoolean;
|
|
1356
|
-
hasKV: _$typebox.TBoolean;
|
|
1357
|
-
hasQueue: _$typebox.TBoolean;
|
|
1358
|
-
hasCron: _$typebox.TBoolean;
|
|
1359
|
-
}>;
|
|
1360
|
-
declare const platformPlanAppSchema: _$typebox.TObject<{
|
|
1361
|
-
name: _$typebox.TString;
|
|
1362
|
-
path: _$typebox.TString;
|
|
1363
|
-
resources: _$typebox.TObject<{
|
|
1364
|
-
hasDatabase: _$typebox.TBoolean;
|
|
1365
|
-
hasBucket: _$typebox.TBoolean;
|
|
1366
|
-
hasKV: _$typebox.TBoolean;
|
|
1367
|
-
hasQueue: _$typebox.TBoolean;
|
|
1368
|
-
hasCron: _$typebox.TBoolean;
|
|
1369
|
-
}>;
|
|
1370
|
-
}>;
|
|
1371
|
-
declare const platformPlanEnvironmentSchema: _$typebox.TObject<{
|
|
1372
|
-
adapter: _$typebox.TString;
|
|
1373
|
-
domain: _$typebox.TOptional<_$typebox.TString>;
|
|
1374
|
-
zone: _$typebox.TOptional<_$typebox.TString>;
|
|
1375
|
-
}>;
|
|
1376
|
-
declare const platformPlanResourceSchema: _$typebox.TObject<{
|
|
1377
|
-
label: _$typebox.TString;
|
|
1378
|
-
value: _$typebox.TString;
|
|
1379
|
-
}>;
|
|
1380
|
-
declare const platformPlanSchema: _$typebox.TObject<{
|
|
1381
|
-
project: _$typebox.TString;
|
|
1382
|
-
env: _$typebox.TString;
|
|
1383
|
-
mode: _$typebox.TUnsafe<"monorepo" | "standalone">;
|
|
1384
|
-
apps: _$typebox.TArray<_$typebox.TObject<{
|
|
1385
|
-
name: _$typebox.TString;
|
|
1386
|
-
path: _$typebox.TString;
|
|
1387
|
-
resources: _$typebox.TObject<{
|
|
1388
|
-
hasDatabase: _$typebox.TBoolean;
|
|
1389
|
-
hasBucket: _$typebox.TBoolean;
|
|
1390
|
-
hasKV: _$typebox.TBoolean;
|
|
1391
|
-
hasQueue: _$typebox.TBoolean;
|
|
1392
|
-
hasCron: _$typebox.TBoolean;
|
|
1393
|
-
}>;
|
|
1394
|
-
}>>;
|
|
1395
|
-
environments: _$typebox.TRecord<"^.*$", _$typebox.TObject<{
|
|
1396
|
-
adapter: _$typebox.TString;
|
|
1397
|
-
domain: _$typebox.TOptional<_$typebox.TString>;
|
|
1398
|
-
zone: _$typebox.TOptional<_$typebox.TString>;
|
|
1399
|
-
}>>;
|
|
1400
|
-
resources: _$typebox.TArray<_$typebox.TObject<{
|
|
1401
|
-
label: _$typebox.TString;
|
|
1402
|
-
value: _$typebox.TString;
|
|
1403
|
-
}>>;
|
|
1404
|
-
secretCount: _$typebox.TNumber;
|
|
1405
|
-
}>;
|
|
1406
|
-
type PlatformPlanOutput = Static<typeof platformPlanSchema>;
|
|
1407
|
-
//#endregion
|
|
1408
189
|
//#region ../../src/cli/platform/index.d.ts
|
|
1409
190
|
/**
|
|
1410
191
|
* CLI plugin for multi-cloud deployment orchestration.
|
|
1411
192
|
*
|
|
1412
|
-
*
|
|
1413
|
-
*
|
|
1414
|
-
*
|
|
193
|
+
* Wraps `AlephaPlatformLibPlugin` (the framework-agnostic deploy
|
|
194
|
+
* services) with `$command` instances so the orchestration is
|
|
195
|
+
* reachable from `alepha platform …`. Non-CLI consumers (e.g. Alepha
|
|
196
|
+
* Rocket) should depend on `alepha/cli/platform-lib` directly instead
|
|
197
|
+
* of pulling in this command surface.
|
|
1415
198
|
*
|
|
1416
199
|
* Commands:
|
|
1417
200
|
* - `alepha platform plan` — show project topology and resource names
|
|
@@ -1419,9 +202,10 @@ type PlatformPlanOutput = Static<typeof platformPlanSchema>;
|
|
|
1419
202
|
* - `alepha platform down` — teardown an environment
|
|
1420
203
|
* - `alepha platform status` — inspect deployed resources
|
|
1421
204
|
* - `alepha platform build` — build apps locally
|
|
1422
|
-
* - `alepha platform deploy`
|
|
1423
|
-
* - `alepha platform migrate` — run database migrations
|
|
1424
|
-
* - `alepha platform
|
|
205
|
+
* - `alepha platform deploy` — deploy to cloud
|
|
206
|
+
* - `alepha platform db migrate` — run database migrations
|
|
207
|
+
* - `alepha platform db export` — pull the deployed DB into a local snapshot
|
|
208
|
+
* - `alepha platform secrets` — manage external secret stores
|
|
1425
209
|
*
|
|
1426
210
|
* Configuration in `alepha.config.ts`:
|
|
1427
211
|
*
|
|
@@ -1439,8 +223,8 @@ type PlatformPlanOutput = Static<typeof platformPlanSchema>;
|
|
|
1439
223
|
* });
|
|
1440
224
|
* ```
|
|
1441
225
|
*/
|
|
1442
|
-
declare const AlephaCliPlatformPlugin:
|
|
226
|
+
declare const AlephaCliPlatformPlugin: import("alepha").Service<import("alepha").Module>;
|
|
1443
227
|
declare const platform: (options: PlatformOptions) => () => void;
|
|
1444
228
|
//#endregion
|
|
1445
|
-
export { AlephaCliPlatformPlugin,
|
|
229
|
+
export { AlephaCliPlatformPlugin, PlatformCommand, SecretsCommand, platform };
|
|
1446
230
|
//# sourceMappingURL=index.d.ts.map
|