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