alepha 0.21.2 → 0.22.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 +289 -292
- 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 +211 -216
- 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 +1073 -1006
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +283 -61
- 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 +134 -140
- 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 +417 -214
- package/dist/cli/core/index.d.ts.map +1 -1
- package/dist/cli/core/index.js +325 -563
- 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 +8 -12
- package/dist/cli/i18n/index.d.ts.map +1 -1
- 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 +1446 -0
- package/dist/cli/platform-lib/index.d.ts.map +1 -0
- package/dist/cli/platform-lib/index.js +2597 -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 +21 -20
- 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 +16 -20
- package/dist/mcp/index.d.ts.map +1 -1
- 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 -4
- package/dist/react/form/index.d.ts.map +1 -1
- 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 +47 -11
- package/dist/react/i18n/index.d.ts.map +1 -1
- package/dist/react/i18n/index.js +33 -1
- 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 +65 -19
- package/dist/react/router/index.browser.js.map +1 -1
- package/dist/react/router/index.d.ts +327 -222
- package/dist/react/router/index.d.ts.map +1 -1
- package/dist/react/router/index.js +65 -29
- package/dist/react/router/index.js.map +1 -1
- 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 +167 -172
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +4 -8
- 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 +5 -7
- package/dist/server/cookies/index.d.ts.map +1 -1
- 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 +88 -73
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/core/index.js +19 -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 +45 -22
- 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/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 +3 -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/commands/__tests__/BuildCommand.spec.ts +43 -0
- package/src/cli/core/commands/build.ts +108 -30
- 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 -0
- 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 +353 -47
- package/src/cli/core/tasks/BuildDockerTask.ts +33 -3
- 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/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 +402 -165
- 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/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/i18n/components/Translate.tsx +47 -0
- package/src/react/i18n/index.ts +2 -0
- package/src/react/intro/components/GettingStartedAdminSlide.tsx +2 -2
- package/src/react/router/__tests__/$page.spec.tsx +3 -2
- package/src/react/router/__tests__/page-can.spec.ts +18 -13
- package/src/react/router/hooks/useQueryParams.ts +114 -14
- package/src/react/router/primitives/$page.ts +85 -4
- package/src/react/router/providers/ReactBrowserRouterProvider.ts +3 -7
- package/src/react/router/providers/ReactServerProvider.ts +4 -13
- package/src/react/ui/services/SchemaControl.ts +3 -4
- 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/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
package/dist/api/jobs/index.d.ts
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import * as _$alepha from "alepha";
|
|
2
1
|
import { Alepha, AlephaError, Async, KIND, PipelinePrimitive, PipelinePrimitiveOptions, Static, TNull, TObject, TOptional, TSchema, TUnion } from "alepha";
|
|
2
|
+
import { BackgroundTaskProvider } from "alepha/background";
|
|
3
3
|
import { LockProvider } from "alepha/lock";
|
|
4
|
-
import * as _$alepha_queue0 from "alepha/queue";
|
|
5
4
|
import { CronProvider } from "alepha/scheduler";
|
|
6
|
-
import * as _$alepha_server0 from "alepha/server";
|
|
7
|
-
import * as _$alepha_logger0 from "alepha/logger";
|
|
8
5
|
import { LogEntry } from "alepha/logger";
|
|
9
|
-
import * as _$alepha_orm0 from "alepha/orm";
|
|
10
6
|
import { CryptoProvider } from "alepha/crypto";
|
|
11
7
|
import { DateTime, DateTimeProvider, DurationLike } from "alepha/datetime";
|
|
12
|
-
import * as _$typebox from "typebox";
|
|
13
8
|
import { BuildExtraConfigColumns, SQL } from "drizzle-orm";
|
|
14
9
|
import { PgColumnBuilderBase, PgSequenceOptions, PgTableExtraConfigValue, UpdateDeleteAction } from "drizzle-orm/pg-core";
|
|
15
10
|
//#region ../../src/orm/core/schemas/insertSchema.d.ts
|
|
@@ -303,8 +298,8 @@ type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]:
|
|
|
303
298
|
* - `d1://BINDING_NAME` — Cloudflare D1
|
|
304
299
|
* - `hyperdrive://BINDING_NAME` — Cloudflare Hyperdrive
|
|
305
300
|
*/
|
|
306
|
-
declare const databaseEnvSchema:
|
|
307
|
-
DATABASE_URL:
|
|
301
|
+
declare const databaseEnvSchema: import("typebox").TObject<{
|
|
302
|
+
DATABASE_URL: import("typebox").TOptional<import("typebox").TString>;
|
|
308
303
|
/**
|
|
309
304
|
* Enable or disable push-based schema synchronization (drizzle-kit push).
|
|
310
305
|
*
|
|
@@ -312,7 +307,7 @@ declare const databaseEnvSchema: _$typebox.TObject<{
|
|
|
312
307
|
* Set to `false` in development to skip automatic schema sync
|
|
313
308
|
* (e.g. when managing migrations manually).
|
|
314
309
|
*/
|
|
315
|
-
DATABASE_SYNC:
|
|
310
|
+
DATABASE_SYNC: import("typebox").TOptional<import("typebox").TBoolean>;
|
|
316
311
|
}>;
|
|
317
312
|
declare module "alepha" {
|
|
318
313
|
interface Env extends Partial<Static<typeof databaseEnvSchema>> {}
|
|
@@ -336,35 +331,35 @@ declare module "alepha" {
|
|
|
336
331
|
* - sweep picks due ones → pending
|
|
337
332
|
* - cancel → cancelled
|
|
338
333
|
*/
|
|
339
|
-
declare const jobExecutionEntity:
|
|
340
|
-
id:
|
|
341
|
-
createdAt:
|
|
342
|
-
updatedAt:
|
|
343
|
-
jobName:
|
|
344
|
-
key:
|
|
345
|
-
status:
|
|
346
|
-
priority:
|
|
347
|
-
attempt:
|
|
348
|
-
maxAttempts:
|
|
349
|
-
payload:
|
|
350
|
-
scheduledAt:
|
|
351
|
-
startedAt:
|
|
352
|
-
completedAt:
|
|
353
|
-
error:
|
|
354
|
-
logs:
|
|
355
|
-
level:
|
|
356
|
-
message:
|
|
357
|
-
service:
|
|
358
|
-
module:
|
|
359
|
-
context:
|
|
360
|
-
app:
|
|
361
|
-
data:
|
|
362
|
-
timestamp:
|
|
334
|
+
declare const jobExecutionEntity: import("alepha/orm").EntityPrimitive<import("typebox").TObject<{
|
|
335
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
336
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
337
|
+
updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
338
|
+
jobName: import("typebox").TString;
|
|
339
|
+
key: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TNull, import("typebox").TString]>>;
|
|
340
|
+
status: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"ok" | "error" | "pending" | "running" | "scheduled" | "cancelled">, typeof import("alepha/orm").PG_DEFAULT>;
|
|
341
|
+
priority: import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_DEFAULT>;
|
|
342
|
+
attempt: import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_DEFAULT>;
|
|
343
|
+
maxAttempts: import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_DEFAULT>;
|
|
344
|
+
payload: import("typebox").TOptional<import("typebox").TRecord<"^.*$", import("typebox").TAny>>;
|
|
345
|
+
scheduledAt: import("typebox").TOptional<import("typebox").TString>;
|
|
346
|
+
startedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
347
|
+
completedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
348
|
+
error: import("typebox").TOptional<import("typebox").TString>;
|
|
349
|
+
logs: import("typebox").TOptional<import("typebox").TArray<import("typebox").TObject<{
|
|
350
|
+
level: import("typebox").TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
351
|
+
message: import("typebox").TString;
|
|
352
|
+
service: import("typebox").TString;
|
|
353
|
+
module: import("typebox").TString;
|
|
354
|
+
context: import("typebox").TOptional<import("typebox").TString>;
|
|
355
|
+
app: import("typebox").TOptional<import("typebox").TString>;
|
|
356
|
+
data: import("typebox").TOptional<import("typebox").TAny>;
|
|
357
|
+
timestamp: import("typebox").TNumber;
|
|
363
358
|
}>>>;
|
|
364
|
-
triggeredBy:
|
|
365
|
-
triggeredByName:
|
|
366
|
-
cancelledBy:
|
|
367
|
-
cancelledByName:
|
|
359
|
+
triggeredBy: import("typebox").TOptional<import("typebox").TString>;
|
|
360
|
+
triggeredByName: import("typebox").TOptional<import("typebox").TString>;
|
|
361
|
+
cancelledBy: import("typebox").TOptional<import("typebox").TString>;
|
|
362
|
+
cancelledByName: import("typebox").TOptional<import("typebox").TString>;
|
|
368
363
|
}>>;
|
|
369
364
|
type JobExecutionEntity = Static<typeof jobExecutionEntity.schema>;
|
|
370
365
|
type JobStatus = "pending" | "running" | "scheduled" | "ok" | "error" | "cancelled";
|
|
@@ -419,8 +414,8 @@ interface JobPrimitiveOptions<T extends TSchema = TSchema> extends PipelinePrimi
|
|
|
419
414
|
* Cron-mode jobs do not retry — the next tick re-runs.
|
|
420
415
|
*
|
|
421
416
|
* Retries are picked up by the reconciliation sweep, so retry granularity
|
|
422
|
-
* is bounded by `sweepCron` (default
|
|
423
|
-
* earlier than
|
|
417
|
+
* is bounded by `sweepCron` (default 15 minutes). The first retry may run
|
|
418
|
+
* earlier than 15 minutes if the sweep tick happens sooner.
|
|
424
419
|
*/
|
|
425
420
|
retry?: JobRetryOptions;
|
|
426
421
|
/**
|
|
@@ -453,10 +448,14 @@ interface JobPrimitiveOptions<T extends TSchema = TSchema> extends PipelinePrimi
|
|
|
453
448
|
/**
|
|
454
449
|
* Whether to record successful executions.
|
|
455
450
|
*
|
|
456
|
-
* - `"error"` (default for
|
|
451
|
+
* - `"error"` (default for queue): only error/cancelled rows kept
|
|
457
452
|
* - `"all"`: keep success rows too (bounded by `keepLastSuccess`)
|
|
458
453
|
* - `"none"`: fire-and-forget, no row even on error
|
|
459
454
|
*
|
|
455
|
+
* **Cron jobs default to keeping their last successful run** (`record: "all"`
|
|
456
|
+
* with `keep.ok = 1`) so the admin "Last run" is accurate — set
|
|
457
|
+
* `record: "error"` to opt out (e.g. for very high-frequency crons).
|
|
458
|
+
*
|
|
460
459
|
* Note: queue-mode jobs always write a `pending` row at push time (outbox).
|
|
461
460
|
* This setting controls whether that row is kept on success.
|
|
462
461
|
*/
|
|
@@ -645,36 +644,36 @@ declare class JobProvider {
|
|
|
645
644
|
*/
|
|
646
645
|
protected dispatcherRef?: JobDispatcher;
|
|
647
646
|
get dispatcher(): JobDispatcher;
|
|
648
|
-
protected readonly log:
|
|
649
|
-
protected readonly executions:
|
|
650
|
-
id:
|
|
651
|
-
createdAt:
|
|
652
|
-
updatedAt:
|
|
653
|
-
jobName:
|
|
654
|
-
key:
|
|
655
|
-
status:
|
|
656
|
-
priority:
|
|
657
|
-
attempt:
|
|
658
|
-
maxAttempts:
|
|
659
|
-
payload:
|
|
660
|
-
scheduledAt:
|
|
661
|
-
startedAt:
|
|
662
|
-
completedAt:
|
|
663
|
-
error:
|
|
664
|
-
logs:
|
|
665
|
-
level:
|
|
666
|
-
message:
|
|
667
|
-
service:
|
|
668
|
-
module:
|
|
669
|
-
context:
|
|
670
|
-
app:
|
|
671
|
-
data:
|
|
672
|
-
timestamp:
|
|
647
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
648
|
+
protected readonly executions: import("alepha/orm").Repository<import("typebox").TObject<{
|
|
649
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
650
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
651
|
+
updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
652
|
+
jobName: import("typebox").TString;
|
|
653
|
+
key: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TNull, import("typebox").TString]>>;
|
|
654
|
+
status: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"ok" | "error" | "pending" | "running" | "scheduled" | "cancelled">, typeof import("alepha/orm").PG_DEFAULT>;
|
|
655
|
+
priority: import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_DEFAULT>;
|
|
656
|
+
attempt: import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_DEFAULT>;
|
|
657
|
+
maxAttempts: import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_DEFAULT>;
|
|
658
|
+
payload: import("typebox").TOptional<import("typebox").TRecord<"^.*$", import("typebox").TAny>>;
|
|
659
|
+
scheduledAt: import("typebox").TOptional<import("typebox").TString>;
|
|
660
|
+
startedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
661
|
+
completedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
662
|
+
error: import("typebox").TOptional<import("typebox").TString>;
|
|
663
|
+
logs: import("typebox").TOptional<import("typebox").TArray<import("typebox").TObject<{
|
|
664
|
+
level: import("typebox").TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
665
|
+
message: import("typebox").TString;
|
|
666
|
+
service: import("typebox").TString;
|
|
667
|
+
module: import("typebox").TString;
|
|
668
|
+
context: import("typebox").TOptional<import("typebox").TString>;
|
|
669
|
+
app: import("typebox").TOptional<import("typebox").TString>;
|
|
670
|
+
data: import("typebox").TOptional<import("typebox").TAny>;
|
|
671
|
+
timestamp: import("typebox").TNumber;
|
|
673
672
|
}>>>;
|
|
674
|
-
triggeredBy:
|
|
675
|
-
triggeredByName:
|
|
676
|
-
cancelledBy:
|
|
677
|
-
cancelledByName:
|
|
673
|
+
triggeredBy: import("typebox").TOptional<import("typebox").TString>;
|
|
674
|
+
triggeredByName: import("typebox").TOptional<import("typebox").TString>;
|
|
675
|
+
cancelledBy: import("typebox").TOptional<import("typebox").TString>;
|
|
676
|
+
cancelledByName: import("typebox").TOptional<import("typebox").TString>;
|
|
678
677
|
}>>;
|
|
679
678
|
protected readonly jobs: Map<string, JobRuntimeRegistration>;
|
|
680
679
|
protected readonly inFlight: Set<Promise<void>>;
|
|
@@ -690,6 +689,7 @@ declare class JobProvider {
|
|
|
690
689
|
timestamp: number;
|
|
691
690
|
}[]>;
|
|
692
691
|
protected stopping: boolean;
|
|
692
|
+
constructor();
|
|
693
693
|
registerJob(name: string, options: JobPrimitiveOptions): void;
|
|
694
694
|
getRegisteredJobs(): Map<string, JobRuntimeRegistration>;
|
|
695
695
|
/**
|
|
@@ -813,8 +813,8 @@ declare class JobProvider {
|
|
|
813
813
|
* path is 2 queries instead of 3.
|
|
814
814
|
*/
|
|
815
815
|
protected claim(executionId: string): Promise<{
|
|
816
|
-
key?: string | null | undefined;
|
|
817
816
|
error?: string | undefined;
|
|
817
|
+
key?: string | null | undefined;
|
|
818
818
|
payload?: Record<string, any> | undefined;
|
|
819
819
|
scheduledAt?: string | undefined;
|
|
820
820
|
startedAt?: string | undefined;
|
|
@@ -833,12 +833,12 @@ declare class JobProvider {
|
|
|
833
833
|
triggeredByName?: string | undefined;
|
|
834
834
|
cancelledBy?: string | undefined;
|
|
835
835
|
cancelledByName?: string | undefined;
|
|
836
|
+
priority: number;
|
|
837
|
+
status: "ok" | "error" | "pending" | "running" | "scheduled" | "cancelled";
|
|
836
838
|
id: string;
|
|
837
839
|
createdAt: string;
|
|
838
840
|
updatedAt: string;
|
|
839
841
|
jobName: string;
|
|
840
|
-
status: "pending" | "running" | "scheduled" | "ok" | "error" | "cancelled";
|
|
841
|
-
priority: number;
|
|
842
842
|
attempt: number;
|
|
843
843
|
maxAttempts: number;
|
|
844
844
|
} | null>;
|
|
@@ -854,15 +854,15 @@ declare class JobProvider {
|
|
|
854
854
|
protected dispatchScheduled(jobName: string, executionId: string): Promise<void>;
|
|
855
855
|
protected trimRingBuffers(): Promise<void>;
|
|
856
856
|
protected trimByStatus(jobName: string, status: "ok" | "error", keep: number): Promise<void>;
|
|
857
|
-
protected readonly onStart:
|
|
858
|
-
protected readonly onStop:
|
|
857
|
+
protected readonly onStart: import("alepha").HookPrimitive<"start">;
|
|
858
|
+
protected readonly onStop: import("alepha").HookPrimitive<"stop">;
|
|
859
859
|
protected getRegistration(name: string): JobRuntimeRegistration;
|
|
860
860
|
}
|
|
861
861
|
//#endregion
|
|
862
862
|
//#region ../../src/api/jobs/schemas/jobExecutionQuerySchema.d.ts
|
|
863
|
-
declare const jobExecutionQuerySchema:
|
|
864
|
-
status:
|
|
865
|
-
limit:
|
|
863
|
+
declare const jobExecutionQuerySchema: import("typebox").TObject<{
|
|
864
|
+
status: import("typebox").TOptional<import("typebox").TUnsafe<"ok" | "error" | "pending" | "running" | "scheduled" | "cancelled">>;
|
|
865
|
+
limit: import("typebox").TOptional<import("typebox").TInteger>;
|
|
866
866
|
}>;
|
|
867
867
|
type JobExecutionQuery = Static<typeof jobExecutionQuerySchema>;
|
|
868
868
|
//#endregion
|
|
@@ -877,57 +877,57 @@ type JobExecutionQuery = Static<typeof jobExecutionQuerySchema>;
|
|
|
877
877
|
* `JobService` is responsible for the int → string transform.
|
|
878
878
|
* - `can` derives the available admin actions from the row's status.
|
|
879
879
|
*/
|
|
880
|
-
declare const jobExecutionResourceSchema:
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
attempt: PgAttr<
|
|
889
|
-
maxAttempts: PgAttr<
|
|
890
|
-
payload:
|
|
891
|
-
scheduledAt:
|
|
892
|
-
startedAt:
|
|
893
|
-
completedAt:
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
timestamp: _$typebox.TNumber;
|
|
880
|
+
declare const jobExecutionResourceSchema: import("typebox").TObject<{
|
|
881
|
+
error: import("typebox").TOptional<import("typebox").TString>;
|
|
882
|
+
status: PgAttr<import("typebox").TUnsafe<"ok" | "error" | "pending" | "running" | "scheduled" | "cancelled">, typeof PG_DEFAULT>;
|
|
883
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
884
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
885
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
886
|
+
jobName: import("typebox").TString;
|
|
887
|
+
key: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TNull, import("typebox").TString]>>;
|
|
888
|
+
attempt: PgAttr<import("typebox").TInteger, typeof PG_DEFAULT>;
|
|
889
|
+
maxAttempts: PgAttr<import("typebox").TInteger, typeof PG_DEFAULT>;
|
|
890
|
+
payload: import("typebox").TOptional<import("typebox").TRecord<"^.*$", import("typebox").TAny>>;
|
|
891
|
+
scheduledAt: import("typebox").TOptional<import("typebox").TString>;
|
|
892
|
+
startedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
893
|
+
completedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
894
|
+
logs: import("typebox").TOptional<import("typebox").TArray<import("typebox").TObject<{
|
|
895
|
+
level: import("typebox").TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
896
|
+
message: import("typebox").TString;
|
|
897
|
+
service: import("typebox").TString;
|
|
898
|
+
module: import("typebox").TString;
|
|
899
|
+
context: import("typebox").TOptional<import("typebox").TString>;
|
|
900
|
+
app: import("typebox").TOptional<import("typebox").TString>;
|
|
901
|
+
data: import("typebox").TOptional<import("typebox").TAny>;
|
|
902
|
+
timestamp: import("typebox").TNumber;
|
|
904
903
|
}>>>;
|
|
905
|
-
triggeredBy:
|
|
906
|
-
triggeredByName:
|
|
907
|
-
cancelledBy:
|
|
908
|
-
cancelledByName:
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
904
|
+
triggeredBy: import("typebox").TOptional<import("typebox").TString>;
|
|
905
|
+
triggeredByName: import("typebox").TOptional<import("typebox").TString>;
|
|
906
|
+
cancelledBy: import("typebox").TOptional<import("typebox").TString>;
|
|
907
|
+
cancelledByName: import("typebox").TOptional<import("typebox").TString>;
|
|
908
|
+
priority: import("typebox").TUnsafe<"critical" | "high" | "normal" | "low">;
|
|
909
|
+
can: import("typebox").TObject<{
|
|
910
|
+
retry: import("typebox").TBoolean;
|
|
911
|
+
cancel: import("typebox").TBoolean;
|
|
912
912
|
}>;
|
|
913
913
|
}>;
|
|
914
914
|
type JobExecutionResource = Static<typeof jobExecutionResourceSchema>;
|
|
915
915
|
//#endregion
|
|
916
916
|
//#region ../../src/api/jobs/schemas/jobRegistrationSchema.d.ts
|
|
917
|
-
declare const jobRegistrationSchema:
|
|
918
|
-
name:
|
|
919
|
-
description:
|
|
920
|
-
type:
|
|
921
|
-
priority:
|
|
922
|
-
cron:
|
|
923
|
-
timeout:
|
|
924
|
-
retry:
|
|
925
|
-
retries:
|
|
917
|
+
declare const jobRegistrationSchema: import("typebox").TObject<{
|
|
918
|
+
name: import("typebox").TString;
|
|
919
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
920
|
+
type: import("typebox").TUnsafe<"cron" | "queue" | "direct">;
|
|
921
|
+
priority: import("typebox").TUnsafe<"critical" | "high" | "normal" | "low">;
|
|
922
|
+
cron: import("typebox").TOptional<import("typebox").TString>;
|
|
923
|
+
timeout: import("typebox").TOptional<import("typebox").TString>;
|
|
924
|
+
retry: import("typebox").TOptional<import("typebox").TObject<{
|
|
925
|
+
retries: import("typebox").TInteger;
|
|
926
926
|
}>>;
|
|
927
|
-
recent:
|
|
928
|
-
ok:
|
|
929
|
-
error:
|
|
930
|
-
lastRun:
|
|
927
|
+
recent: import("typebox").TObject<{
|
|
928
|
+
ok: import("typebox").TInteger;
|
|
929
|
+
error: import("typebox").TInteger;
|
|
930
|
+
lastRun: import("typebox").TOptional<import("typebox").TString>;
|
|
931
931
|
}>;
|
|
932
932
|
}>;
|
|
933
933
|
type JobRegistration = Static<typeof jobRegistrationSchema>;
|
|
@@ -943,37 +943,37 @@ type JobRegistration = Static<typeof jobRegistrationSchema>;
|
|
|
943
943
|
*/
|
|
944
944
|
declare class JobService {
|
|
945
945
|
protected readonly alepha: Alepha;
|
|
946
|
-
protected readonly log:
|
|
946
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
947
947
|
protected readonly jobProvider: JobProvider;
|
|
948
|
-
protected readonly executions:
|
|
949
|
-
id:
|
|
950
|
-
createdAt:
|
|
951
|
-
updatedAt:
|
|
952
|
-
jobName:
|
|
953
|
-
key:
|
|
954
|
-
status:
|
|
955
|
-
priority:
|
|
956
|
-
attempt:
|
|
957
|
-
maxAttempts:
|
|
958
|
-
payload:
|
|
959
|
-
scheduledAt:
|
|
960
|
-
startedAt:
|
|
961
|
-
completedAt:
|
|
962
|
-
error:
|
|
963
|
-
logs:
|
|
964
|
-
level:
|
|
965
|
-
message:
|
|
966
|
-
service:
|
|
967
|
-
module:
|
|
968
|
-
context:
|
|
969
|
-
app:
|
|
970
|
-
data:
|
|
971
|
-
timestamp:
|
|
948
|
+
protected readonly executions: import("alepha/orm").Repository<import("typebox").TObject<{
|
|
949
|
+
id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
950
|
+
createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
951
|
+
updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
|
|
952
|
+
jobName: import("typebox").TString;
|
|
953
|
+
key: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TNull, import("typebox").TString]>>;
|
|
954
|
+
status: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"ok" | "error" | "pending" | "running" | "scheduled" | "cancelled">, typeof import("alepha/orm").PG_DEFAULT>;
|
|
955
|
+
priority: import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_DEFAULT>;
|
|
956
|
+
attempt: import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_DEFAULT>;
|
|
957
|
+
maxAttempts: import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_DEFAULT>;
|
|
958
|
+
payload: import("typebox").TOptional<import("typebox").TRecord<"^.*$", import("typebox").TAny>>;
|
|
959
|
+
scheduledAt: import("typebox").TOptional<import("typebox").TString>;
|
|
960
|
+
startedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
961
|
+
completedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
962
|
+
error: import("typebox").TOptional<import("typebox").TString>;
|
|
963
|
+
logs: import("typebox").TOptional<import("typebox").TArray<import("typebox").TObject<{
|
|
964
|
+
level: import("typebox").TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
965
|
+
message: import("typebox").TString;
|
|
966
|
+
service: import("typebox").TString;
|
|
967
|
+
module: import("typebox").TString;
|
|
968
|
+
context: import("typebox").TOptional<import("typebox").TString>;
|
|
969
|
+
app: import("typebox").TOptional<import("typebox").TString>;
|
|
970
|
+
data: import("typebox").TOptional<import("typebox").TAny>;
|
|
971
|
+
timestamp: import("typebox").TNumber;
|
|
972
972
|
}>>>;
|
|
973
|
-
triggeredBy:
|
|
974
|
-
triggeredByName:
|
|
975
|
-
cancelledBy:
|
|
976
|
-
cancelledByName:
|
|
973
|
+
triggeredBy: import("typebox").TOptional<import("typebox").TString>;
|
|
974
|
+
triggeredByName: import("typebox").TOptional<import("typebox").TString>;
|
|
975
|
+
cancelledBy: import("typebox").TOptional<import("typebox").TString>;
|
|
976
|
+
cancelledByName: import("typebox").TOptional<import("typebox").TString>;
|
|
977
977
|
}>>;
|
|
978
978
|
protected computeCan(status: string): {
|
|
979
979
|
retry: boolean;
|
|
@@ -998,8 +998,8 @@ declare class JobService {
|
|
|
998
998
|
* Recent executions for a single job, ORDER BY startedAt DESC.
|
|
999
999
|
*/
|
|
1000
1000
|
getExecutions(jobName: string, query?: JobExecutionQuery): Promise<{
|
|
1001
|
-
key?: string | null | undefined;
|
|
1002
1001
|
error?: string | undefined;
|
|
1002
|
+
key?: string | null | undefined;
|
|
1003
1003
|
payload?: Record<string, any> | undefined;
|
|
1004
1004
|
scheduledAt?: string | undefined;
|
|
1005
1005
|
startedAt?: string | undefined;
|
|
@@ -1018,12 +1018,12 @@ declare class JobService {
|
|
|
1018
1018
|
triggeredByName?: string | undefined;
|
|
1019
1019
|
cancelledBy?: string | undefined;
|
|
1020
1020
|
cancelledByName?: string | undefined;
|
|
1021
|
+
priority: "critical" | "high" | "normal" | "low";
|
|
1022
|
+
status: "ok" | "error" | "pending" | "running" | "scheduled" | "cancelled";
|
|
1021
1023
|
id: string;
|
|
1022
1024
|
createdAt: string;
|
|
1023
1025
|
updatedAt: string;
|
|
1024
1026
|
jobName: string;
|
|
1025
|
-
status: "pending" | "running" | "scheduled" | "ok" | "error" | "cancelled";
|
|
1026
|
-
priority: number;
|
|
1027
1027
|
attempt: number;
|
|
1028
1028
|
maxAttempts: number;
|
|
1029
1029
|
can: {
|
|
@@ -1035,8 +1035,8 @@ declare class JobService {
|
|
|
1035
1035
|
* Full execution detail (includes captured logs).
|
|
1036
1036
|
*/
|
|
1037
1037
|
getExecution(id: string): Promise<{
|
|
1038
|
-
key?: string | null | undefined;
|
|
1039
1038
|
error?: string | undefined;
|
|
1039
|
+
key?: string | null | undefined;
|
|
1040
1040
|
payload?: Record<string, any> | undefined;
|
|
1041
1041
|
scheduledAt?: string | undefined;
|
|
1042
1042
|
startedAt?: string | undefined;
|
|
@@ -1055,12 +1055,12 @@ declare class JobService {
|
|
|
1055
1055
|
triggeredByName?: string | undefined;
|
|
1056
1056
|
cancelledBy?: string | undefined;
|
|
1057
1057
|
cancelledByName?: string | undefined;
|
|
1058
|
+
priority: "critical" | "high" | "normal" | "low";
|
|
1059
|
+
status: "ok" | "error" | "pending" | "running" | "scheduled" | "cancelled";
|
|
1058
1060
|
id: string;
|
|
1059
1061
|
createdAt: string;
|
|
1060
1062
|
updatedAt: string;
|
|
1061
1063
|
jobName: string;
|
|
1062
|
-
status: "pending" | "running" | "scheduled" | "ok" | "error" | "cancelled";
|
|
1063
|
-
priority: number;
|
|
1064
1064
|
attempt: number;
|
|
1065
1065
|
maxAttempts: number;
|
|
1066
1066
|
can: {
|
|
@@ -1099,137 +1099,137 @@ declare class AdminJobController {
|
|
|
1099
1099
|
protected readonly url: string;
|
|
1100
1100
|
protected readonly group: string;
|
|
1101
1101
|
protected readonly jobService: JobService;
|
|
1102
|
-
readonly listJobs:
|
|
1103
|
-
response:
|
|
1104
|
-
name:
|
|
1105
|
-
description:
|
|
1106
|
-
type:
|
|
1107
|
-
priority:
|
|
1108
|
-
cron:
|
|
1109
|
-
timeout:
|
|
1110
|
-
retry:
|
|
1111
|
-
retries:
|
|
1102
|
+
readonly listJobs: import("alepha/server").ActionPrimitiveFn<{
|
|
1103
|
+
response: import("typebox").TArray<import("typebox").TObject<{
|
|
1104
|
+
name: import("typebox").TString;
|
|
1105
|
+
description: import("typebox").TOptional<import("typebox").TString>;
|
|
1106
|
+
type: import("typebox").TUnsafe<"cron" | "queue" | "direct">;
|
|
1107
|
+
priority: import("typebox").TUnsafe<"critical" | "high" | "normal" | "low">;
|
|
1108
|
+
cron: import("typebox").TOptional<import("typebox").TString>;
|
|
1109
|
+
timeout: import("typebox").TOptional<import("typebox").TString>;
|
|
1110
|
+
retry: import("typebox").TOptional<import("typebox").TObject<{
|
|
1111
|
+
retries: import("typebox").TInteger;
|
|
1112
1112
|
}>>;
|
|
1113
|
-
recent:
|
|
1114
|
-
ok:
|
|
1115
|
-
error:
|
|
1116
|
-
lastRun:
|
|
1113
|
+
recent: import("typebox").TObject<{
|
|
1114
|
+
ok: import("typebox").TInteger;
|
|
1115
|
+
error: import("typebox").TInteger;
|
|
1116
|
+
lastRun: import("typebox").TOptional<import("typebox").TString>;
|
|
1117
1117
|
}>;
|
|
1118
1118
|
}>>;
|
|
1119
1119
|
}>;
|
|
1120
|
-
readonly listExecutions:
|
|
1121
|
-
params:
|
|
1122
|
-
name:
|
|
1120
|
+
readonly listExecutions: import("alepha/server").ActionPrimitiveFn<{
|
|
1121
|
+
params: import("typebox").TObject<{
|
|
1122
|
+
name: import("typebox").TString;
|
|
1123
1123
|
}>;
|
|
1124
|
-
query:
|
|
1125
|
-
status:
|
|
1126
|
-
limit:
|
|
1124
|
+
query: import("typebox").TObject<{
|
|
1125
|
+
status: import("typebox").TOptional<import("typebox").TUnsafe<"ok" | "error" | "pending" | "running" | "scheduled" | "cancelled">>;
|
|
1126
|
+
limit: import("typebox").TOptional<import("typebox").TInteger>;
|
|
1127
1127
|
}>;
|
|
1128
|
-
response:
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
attempt: PgAttr<
|
|
1137
|
-
maxAttempts: PgAttr<
|
|
1138
|
-
payload:
|
|
1139
|
-
scheduledAt:
|
|
1140
|
-
startedAt:
|
|
1141
|
-
completedAt:
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
timestamp: _$typebox.TNumber;
|
|
1128
|
+
response: import("typebox").TArray<import("typebox").TObject<{
|
|
1129
|
+
error: import("typebox").TOptional<import("typebox").TString>;
|
|
1130
|
+
status: PgAttr<import("typebox").TUnsafe<"ok" | "error" | "pending" | "running" | "scheduled" | "cancelled">, typeof PG_DEFAULT>;
|
|
1131
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
1132
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
1133
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
1134
|
+
jobName: import("typebox").TString;
|
|
1135
|
+
key: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TNull, import("typebox").TString]>>;
|
|
1136
|
+
attempt: PgAttr<import("typebox").TInteger, typeof PG_DEFAULT>;
|
|
1137
|
+
maxAttempts: PgAttr<import("typebox").TInteger, typeof PG_DEFAULT>;
|
|
1138
|
+
payload: import("typebox").TOptional<import("typebox").TRecord<"^.*$", import("typebox").TAny>>;
|
|
1139
|
+
scheduledAt: import("typebox").TOptional<import("typebox").TString>;
|
|
1140
|
+
startedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
1141
|
+
completedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
1142
|
+
logs: import("typebox").TOptional<import("typebox").TArray<import("typebox").TObject<{
|
|
1143
|
+
level: import("typebox").TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
1144
|
+
message: import("typebox").TString;
|
|
1145
|
+
service: import("typebox").TString;
|
|
1146
|
+
module: import("typebox").TString;
|
|
1147
|
+
context: import("typebox").TOptional<import("typebox").TString>;
|
|
1148
|
+
app: import("typebox").TOptional<import("typebox").TString>;
|
|
1149
|
+
data: import("typebox").TOptional<import("typebox").TAny>;
|
|
1150
|
+
timestamp: import("typebox").TNumber;
|
|
1152
1151
|
}>>>;
|
|
1153
|
-
triggeredBy:
|
|
1154
|
-
triggeredByName:
|
|
1155
|
-
cancelledBy:
|
|
1156
|
-
cancelledByName:
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1152
|
+
triggeredBy: import("typebox").TOptional<import("typebox").TString>;
|
|
1153
|
+
triggeredByName: import("typebox").TOptional<import("typebox").TString>;
|
|
1154
|
+
cancelledBy: import("typebox").TOptional<import("typebox").TString>;
|
|
1155
|
+
cancelledByName: import("typebox").TOptional<import("typebox").TString>;
|
|
1156
|
+
priority: import("typebox").TUnsafe<"critical" | "high" | "normal" | "low">;
|
|
1157
|
+
can: import("typebox").TObject<{
|
|
1158
|
+
retry: import("typebox").TBoolean;
|
|
1159
|
+
cancel: import("typebox").TBoolean;
|
|
1160
1160
|
}>;
|
|
1161
1161
|
}>>;
|
|
1162
1162
|
}>;
|
|
1163
|
-
readonly getExecution:
|
|
1164
|
-
params:
|
|
1165
|
-
id:
|
|
1163
|
+
readonly getExecution: import("alepha/server").ActionPrimitiveFn<{
|
|
1164
|
+
params: import("typebox").TObject<{
|
|
1165
|
+
id: import("typebox").TString;
|
|
1166
1166
|
}>;
|
|
1167
|
-
response:
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
attempt: PgAttr<
|
|
1176
|
-
maxAttempts: PgAttr<
|
|
1177
|
-
payload:
|
|
1178
|
-
scheduledAt:
|
|
1179
|
-
startedAt:
|
|
1180
|
-
completedAt:
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
timestamp: _$typebox.TNumber;
|
|
1167
|
+
response: import("typebox").TObject<{
|
|
1168
|
+
error: import("typebox").TOptional<import("typebox").TString>;
|
|
1169
|
+
status: PgAttr<import("typebox").TUnsafe<"ok" | "error" | "pending" | "running" | "scheduled" | "cancelled">, typeof PG_DEFAULT>;
|
|
1170
|
+
id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
1171
|
+
createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
1172
|
+
updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
1173
|
+
jobName: import("typebox").TString;
|
|
1174
|
+
key: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TNull, import("typebox").TString]>>;
|
|
1175
|
+
attempt: PgAttr<import("typebox").TInteger, typeof PG_DEFAULT>;
|
|
1176
|
+
maxAttempts: PgAttr<import("typebox").TInteger, typeof PG_DEFAULT>;
|
|
1177
|
+
payload: import("typebox").TOptional<import("typebox").TRecord<"^.*$", import("typebox").TAny>>;
|
|
1178
|
+
scheduledAt: import("typebox").TOptional<import("typebox").TString>;
|
|
1179
|
+
startedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
1180
|
+
completedAt: import("typebox").TOptional<import("typebox").TString>;
|
|
1181
|
+
logs: import("typebox").TOptional<import("typebox").TArray<import("typebox").TObject<{
|
|
1182
|
+
level: import("typebox").TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
1183
|
+
message: import("typebox").TString;
|
|
1184
|
+
service: import("typebox").TString;
|
|
1185
|
+
module: import("typebox").TString;
|
|
1186
|
+
context: import("typebox").TOptional<import("typebox").TString>;
|
|
1187
|
+
app: import("typebox").TOptional<import("typebox").TString>;
|
|
1188
|
+
data: import("typebox").TOptional<import("typebox").TAny>;
|
|
1189
|
+
timestamp: import("typebox").TNumber;
|
|
1191
1190
|
}>>>;
|
|
1192
|
-
triggeredBy:
|
|
1193
|
-
triggeredByName:
|
|
1194
|
-
cancelledBy:
|
|
1195
|
-
cancelledByName:
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1191
|
+
triggeredBy: import("typebox").TOptional<import("typebox").TString>;
|
|
1192
|
+
triggeredByName: import("typebox").TOptional<import("typebox").TString>;
|
|
1193
|
+
cancelledBy: import("typebox").TOptional<import("typebox").TString>;
|
|
1194
|
+
cancelledByName: import("typebox").TOptional<import("typebox").TString>;
|
|
1195
|
+
priority: import("typebox").TUnsafe<"critical" | "high" | "normal" | "low">;
|
|
1196
|
+
can: import("typebox").TObject<{
|
|
1197
|
+
retry: import("typebox").TBoolean;
|
|
1198
|
+
cancel: import("typebox").TBoolean;
|
|
1199
1199
|
}>;
|
|
1200
1200
|
}>;
|
|
1201
1201
|
}>;
|
|
1202
|
-
readonly triggerJob:
|
|
1203
|
-
params:
|
|
1204
|
-
name:
|
|
1202
|
+
readonly triggerJob: import("alepha/server").ActionPrimitiveFn<{
|
|
1203
|
+
params: import("typebox").TObject<{
|
|
1204
|
+
name: import("typebox").TString;
|
|
1205
1205
|
}>;
|
|
1206
|
-
body:
|
|
1207
|
-
payload:
|
|
1206
|
+
body: import("typebox").TObject<{
|
|
1207
|
+
payload: import("typebox").TOptional<import("typebox").TRecord<"^.*$", import("typebox").TAny>>;
|
|
1208
1208
|
}>;
|
|
1209
|
-
response:
|
|
1210
|
-
ok:
|
|
1211
|
-
id:
|
|
1212
|
-
count:
|
|
1209
|
+
response: import("typebox").TObject<{
|
|
1210
|
+
ok: import("typebox").TBoolean;
|
|
1211
|
+
id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
|
|
1212
|
+
count: import("typebox").TOptional<import("typebox").TNumber>;
|
|
1213
1213
|
}>;
|
|
1214
1214
|
}>;
|
|
1215
|
-
readonly retryExecution:
|
|
1216
|
-
params:
|
|
1217
|
-
id:
|
|
1215
|
+
readonly retryExecution: import("alepha/server").ActionPrimitiveFn<{
|
|
1216
|
+
params: import("typebox").TObject<{
|
|
1217
|
+
id: import("typebox").TString;
|
|
1218
1218
|
}>;
|
|
1219
|
-
response:
|
|
1220
|
-
ok:
|
|
1221
|
-
id:
|
|
1222
|
-
count:
|
|
1219
|
+
response: import("typebox").TObject<{
|
|
1220
|
+
ok: import("typebox").TBoolean;
|
|
1221
|
+
id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
|
|
1222
|
+
count: import("typebox").TOptional<import("typebox").TNumber>;
|
|
1223
1223
|
}>;
|
|
1224
1224
|
}>;
|
|
1225
|
-
readonly cancelExecution:
|
|
1226
|
-
params:
|
|
1227
|
-
id:
|
|
1225
|
+
readonly cancelExecution: import("alepha/server").ActionPrimitiveFn<{
|
|
1226
|
+
params: import("typebox").TObject<{
|
|
1227
|
+
id: import("typebox").TString;
|
|
1228
1228
|
}>;
|
|
1229
|
-
response:
|
|
1230
|
-
ok:
|
|
1231
|
-
id:
|
|
1232
|
-
count:
|
|
1229
|
+
response: import("typebox").TObject<{
|
|
1230
|
+
ok: import("typebox").TBoolean;
|
|
1231
|
+
id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
|
|
1232
|
+
count: import("typebox").TOptional<import("typebox").TNumber>;
|
|
1233
1233
|
}>;
|
|
1234
1234
|
}>;
|
|
1235
1235
|
}
|
|
@@ -1244,20 +1244,17 @@ declare class AdminJobController {
|
|
|
1244
1244
|
* if the process dies before the handler finishes, the next sweep tick
|
|
1245
1245
|
* picks the row up and re-dispatches.
|
|
1246
1246
|
*
|
|
1247
|
-
*
|
|
1248
|
-
*
|
|
1249
|
-
*
|
|
1250
|
-
*
|
|
1251
|
-
*
|
|
1252
|
-
* (every 5 min by default) would re-dispatch.
|
|
1253
|
-
*
|
|
1254
|
-
* **Vercel / single-Node** — on long-running runtimes the event loop
|
|
1255
|
-
* keeps the promise alive naturally; no special wiring is required.
|
|
1247
|
+
* Keeping the isolate alive past the HTTP response (Cloudflare Workers) vs.
|
|
1248
|
+
* relying on the event loop (Node/Vercel) is delegated to
|
|
1249
|
+
* {@link BackgroundTaskProvider.defer} — this dispatcher stays
|
|
1250
|
+
* platform-agnostic. The DB outbox row remains the durability guarantee: if
|
|
1251
|
+
* the process dies mid-handler, the next sweep re-dispatches.
|
|
1256
1252
|
*/
|
|
1257
1253
|
declare class DirectJobDispatcher extends JobDispatcher {
|
|
1258
1254
|
readonly kind: "direct";
|
|
1259
1255
|
protected readonly alepha: Alepha;
|
|
1260
|
-
protected readonly
|
|
1256
|
+
protected readonly background: BackgroundTaskProvider;
|
|
1257
|
+
protected readonly log: import("alepha/logger").Logger;
|
|
1261
1258
|
protected jobProviderRef?: JobProvider;
|
|
1262
1259
|
protected getJobProvider(): JobProvider;
|
|
1263
1260
|
dispatch(jobName: string, executionId: string): Promise<void>;
|
|
@@ -1280,9 +1277,9 @@ declare class JobQueueProvider extends JobDispatcher {
|
|
|
1280
1277
|
protected readonly alepha: Alepha;
|
|
1281
1278
|
protected jobProviderRef?: JobProvider;
|
|
1282
1279
|
protected getJobProvider(): JobProvider;
|
|
1283
|
-
protected readonly queue:
|
|
1284
|
-
jobName:
|
|
1285
|
-
executionId:
|
|
1280
|
+
protected readonly queue: import("alepha/queue").QueuePrimitive<import("typebox").TObject<{
|
|
1281
|
+
jobName: import("typebox").TString;
|
|
1282
|
+
executionId: import("typebox").TString;
|
|
1286
1283
|
}>>;
|
|
1287
1284
|
dispatch(jobName: string, executionId: string): Promise<void>;
|
|
1288
1285
|
/**
|
|
@@ -1303,15 +1300,15 @@ declare class JobQueueProvider extends JobDispatcher {
|
|
|
1303
1300
|
}
|
|
1304
1301
|
//#endregion
|
|
1305
1302
|
//#region ../../src/api/jobs/schemas/jobConfigAtom.d.ts
|
|
1306
|
-
declare const jobConfig:
|
|
1307
|
-
sweepCron:
|
|
1308
|
-
trimCron:
|
|
1309
|
-
staleThreshold:
|
|
1310
|
-
runTimeout:
|
|
1311
|
-
keepLastSuccess:
|
|
1312
|
-
keepLastError:
|
|
1313
|
-
logMaxEntries:
|
|
1314
|
-
drainTimeout:
|
|
1303
|
+
declare const jobConfig: import("alepha").Atom<import("typebox").TObject<{
|
|
1304
|
+
sweepCron: import("typebox").TString;
|
|
1305
|
+
trimCron: import("typebox").TString;
|
|
1306
|
+
staleThreshold: import("typebox").TInteger;
|
|
1307
|
+
runTimeout: import("typebox").TInteger;
|
|
1308
|
+
keepLastSuccess: import("typebox").TInteger;
|
|
1309
|
+
keepLastError: import("typebox").TInteger;
|
|
1310
|
+
logMaxEntries: import("typebox").TInteger;
|
|
1311
|
+
drainTimeout: import("typebox").TInteger;
|
|
1315
1312
|
}>, "alepha.jobs">;
|
|
1316
1313
|
type JobConfig = Static<typeof jobConfig.schema>;
|
|
1317
1314
|
declare module "alepha" {
|
|
@@ -1321,8 +1318,8 @@ declare module "alepha" {
|
|
|
1321
1318
|
} //# sourceMappingURL=jobConfigAtom.d.ts.map
|
|
1322
1319
|
//#endregion
|
|
1323
1320
|
//#region ../../src/api/jobs/schemas/triggerJobSchema.d.ts
|
|
1324
|
-
declare const triggerJobSchema:
|
|
1325
|
-
payload:
|
|
1321
|
+
declare const triggerJobSchema: import("typebox").TObject<{
|
|
1322
|
+
payload: import("typebox").TOptional<import("typebox").TRecord<"^.*$", import("typebox").TAny>>;
|
|
1326
1323
|
}>;
|
|
1327
1324
|
type TriggerJob = Static<typeof triggerJobSchema>;
|
|
1328
1325
|
//#endregion
|
|
@@ -1375,8 +1372,8 @@ declare module "alepha" {
|
|
|
1375
1372
|
* is overkill.
|
|
1376
1373
|
*
|
|
1377
1374
|
* **Retries** are sweep-driven across all modes (no exponential backoff).
|
|
1378
|
-
* Granularity is bounded by `sweepCron` (default
|
|
1379
|
-
* may land anywhere from a few seconds to ~
|
|
1375
|
+
* Granularity is bounded by `sweepCron` (default 15 min). The first retry
|
|
1376
|
+
* may land anywhere from a few seconds to ~15 min later depending on when
|
|
1380
1377
|
* the next sweep tick fires. Cron jobs that declare `retry` go through
|
|
1381
1378
|
* the same sweep path — a transient failure no longer means waiting for
|
|
1382
1379
|
* the next cron tick (useful for once-daily jobs).
|
|
@@ -1396,7 +1393,7 @@ declare module "alepha" {
|
|
|
1396
1393
|
*
|
|
1397
1394
|
* @module alepha.api.jobs
|
|
1398
1395
|
*/
|
|
1399
|
-
declare const AlephaApiJobs:
|
|
1396
|
+
declare const AlephaApiJobs: import("alepha").Service<import("alepha").Module>;
|
|
1400
1397
|
/**
|
|
1401
1398
|
* Queue support for `$job`. Import alongside {@link AlephaApiJobs} when your
|
|
1402
1399
|
* app declares queue-mode jobs (any `$job` with a `schema`) and you want a
|
|
@@ -1408,7 +1405,7 @@ declare const AlephaApiJobs: _$alepha.Service<_$alepha.Module>;
|
|
|
1408
1405
|
*
|
|
1409
1406
|
* @module alepha.api.jobs.queue
|
|
1410
1407
|
*/
|
|
1411
|
-
declare const AlephaApiJobsQueue:
|
|
1408
|
+
declare const AlephaApiJobsQueue: import("alepha").Service<import("alepha").Module>;
|
|
1412
1409
|
//#endregion
|
|
1413
1410
|
export { $job, AdminJobController, AlephaApiJobs, AlephaApiJobsQueue, CancelContext, DirectJobDispatcher, JobConfig, JobDispatcher, JobEffectiveMode, JobExecutionEntity, JobExecutionQuery, JobExecutionResource, JobHandlerArgs, JobPrimitive, JobPrimitiveOptions, JobPriority, JobProvider, JobQueueProvider, JobRegistration, JobRetryOptions, JobService, JobStatus, JobTriggerContext, PRIORITY_MAP, PRIORITY_REVERSE, PushManyItem, PushOptions, TriggerJob, jobConfig, jobExecutionEntity, jobExecutionQuerySchema, jobExecutionResourceSchema, jobRegistrationSchema, triggerJobSchema };
|
|
1414
1411
|
//# sourceMappingURL=index.d.ts.map
|