alepha 0.15.0 → 0.15.2
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 +43 -98
- package/dist/api/audits/index.d.ts +630 -653
- package/dist/api/audits/index.d.ts.map +1 -1
- package/dist/api/audits/index.js +12 -35
- package/dist/api/audits/index.js.map +1 -1
- package/dist/api/files/index.d.ts +365 -358
- package/dist/api/files/index.d.ts.map +1 -1
- package/dist/api/files/index.js +12 -5
- package/dist/api/files/index.js.map +1 -1
- package/dist/api/jobs/index.d.ts +255 -248
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/jobs/index.js +10 -3
- package/dist/api/jobs/index.js.map +1 -1
- package/dist/api/keys/index.d.ts +413 -0
- package/dist/api/keys/index.d.ts.map +1 -0
- package/dist/api/keys/index.js +476 -0
- package/dist/api/keys/index.js.map +1 -0
- package/dist/api/notifications/index.browser.js +4 -4
- package/dist/api/notifications/index.browser.js.map +1 -1
- package/dist/api/notifications/index.d.ts +84 -78
- package/dist/api/notifications/index.d.ts.map +1 -1
- package/dist/api/notifications/index.js +14 -8
- package/dist/api/notifications/index.js.map +1 -1
- package/dist/api/parameters/index.d.ts +528 -535
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/parameters/index.js +30 -37
- package/dist/api/parameters/index.js.map +1 -1
- package/dist/api/users/index.d.ts +1221 -910
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +2556 -248
- package/dist/api/users/index.js.map +1 -1
- package/dist/api/verifications/index.d.ts +142 -136
- package/dist/api/verifications/index.d.ts.map +1 -1
- package/dist/api/verifications/index.js +12 -4
- package/dist/api/verifications/index.js.map +1 -1
- package/dist/batch/index.d.ts +142 -162
- package/dist/batch/index.d.ts.map +1 -1
- package/dist/batch/index.js +31 -44
- package/dist/batch/index.js.map +1 -1
- package/dist/bucket/index.d.ts +595 -171
- package/dist/bucket/index.d.ts.map +1 -1
- package/dist/bucket/index.js +1856 -12
- package/dist/bucket/index.js.map +1 -1
- package/dist/cache/core/index.d.ts +225 -53
- package/dist/cache/core/index.d.ts.map +1 -1
- package/dist/cache/core/index.js +213 -7
- package/dist/cache/core/index.js.map +1 -1
- package/dist/cache/redis/index.d.ts +1 -0
- package/dist/cache/redis/index.d.ts.map +1 -1
- package/dist/cache/redis/index.js +6 -2
- package/dist/cache/redis/index.js.map +1 -1
- package/dist/cli/index.d.ts +834 -226
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2872 -417
- package/dist/cli/index.js.map +1 -1
- package/dist/command/index.d.ts +458 -310
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +2011 -76
- package/dist/command/index.js.map +1 -1
- package/dist/core/index.browser.js +309 -97
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +796 -701
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +329 -97
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +309 -97
- package/dist/core/index.native.js.map +1 -1
- package/dist/datetime/index.d.ts +59 -44
- package/dist/datetime/index.d.ts.map +1 -1
- package/dist/datetime/index.js +15 -0
- package/dist/datetime/index.js.map +1 -1
- package/dist/email/index.d.ts +314 -19
- package/dist/email/index.d.ts.map +1 -1
- package/dist/email/index.js +1852 -7
- package/dist/email/index.js.map +1 -1
- package/dist/fake/index.d.ts +5500 -5418
- package/dist/fake/index.d.ts.map +1 -1
- package/dist/fake/index.js +113 -42
- package/dist/fake/index.js.map +1 -1
- package/dist/lock/core/index.d.ts +219 -212
- package/dist/lock/core/index.d.ts.map +1 -1
- package/dist/lock/core/index.js +11 -4
- package/dist/lock/core/index.js.map +1 -1
- package/dist/lock/redis/index.d.ts.map +1 -1
- package/dist/logger/index.d.ts +41 -90
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/logger/index.js +15 -68
- package/dist/logger/index.js.map +1 -1
- package/dist/mcp/index.d.ts +228 -230
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +32 -31
- package/dist/mcp/index.js.map +1 -1
- package/dist/orm/index.browser.js +12 -12
- package/dist/orm/index.browser.js.map +1 -1
- package/dist/orm/index.bun.js +90 -80
- package/dist/orm/index.bun.js.map +1 -1
- package/dist/orm/index.d.ts +1434 -1459
- package/dist/orm/index.d.ts.map +1 -1
- package/dist/orm/index.js +112 -130
- package/dist/orm/index.js.map +1 -1
- package/dist/queue/core/index.d.ts +262 -254
- package/dist/queue/core/index.d.ts.map +1 -1
- package/dist/queue/core/index.js +14 -6
- package/dist/queue/core/index.js.map +1 -1
- package/dist/queue/redis/index.d.ts.map +1 -1
- package/dist/react/auth/index.browser.js +108 -0
- package/dist/react/auth/index.browser.js.map +1 -0
- package/dist/react/auth/index.d.ts +100 -0
- package/dist/react/auth/index.d.ts.map +1 -0
- package/dist/react/auth/index.js +145 -0
- package/dist/react/auth/index.js.map +1 -0
- package/dist/react/core/index.d.ts +469 -0
- package/dist/react/core/index.d.ts.map +1 -0
- package/dist/react/core/index.js +464 -0
- package/dist/react/core/index.js.map +1 -0
- package/dist/react/form/index.d.ts +232 -0
- package/dist/react/form/index.d.ts.map +1 -0
- package/dist/react/form/index.js +432 -0
- package/dist/react/form/index.js.map +1 -0
- package/dist/react/head/index.browser.js +423 -0
- package/dist/react/head/index.browser.js.map +1 -0
- package/dist/react/head/index.d.ts +288 -0
- package/dist/react/head/index.d.ts.map +1 -0
- package/dist/react/head/index.js +465 -0
- package/dist/react/head/index.js.map +1 -0
- package/dist/react/i18n/index.d.ts +175 -0
- package/dist/react/i18n/index.d.ts.map +1 -0
- package/dist/react/i18n/index.js +224 -0
- package/dist/react/i18n/index.js.map +1 -0
- package/dist/react/router/index.browser.js +1980 -0
- package/dist/react/router/index.browser.js.map +1 -0
- package/dist/react/router/index.d.ts +2068 -0
- package/dist/react/router/index.d.ts.map +1 -0
- package/dist/react/router/index.js +4932 -0
- package/dist/react/router/index.js.map +1 -0
- package/dist/react/websocket/index.d.ts +117 -0
- package/dist/react/websocket/index.d.ts.map +1 -0
- package/dist/react/websocket/index.js +107 -0
- package/dist/react/websocket/index.js.map +1 -0
- package/dist/redis/index.bun.js +4 -0
- package/dist/redis/index.bun.js.map +1 -1
- package/dist/redis/index.d.ts +127 -130
- package/dist/redis/index.d.ts.map +1 -1
- package/dist/redis/index.js +16 -25
- package/dist/redis/index.js.map +1 -1
- package/dist/retry/index.d.ts +80 -71
- package/dist/retry/index.d.ts.map +1 -1
- package/dist/retry/index.js +11 -2
- package/dist/retry/index.js.map +1 -1
- package/dist/router/index.d.ts +6 -6
- package/dist/router/index.d.ts.map +1 -1
- package/dist/scheduler/index.d.ts +119 -28
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/scheduler/index.js +404 -3
- package/dist/scheduler/index.js.map +1 -1
- package/dist/security/index.d.ts +642 -228
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +1579 -37
- package/dist/security/index.js.map +1 -1
- package/dist/server/auth/index.d.ts +1141 -111
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +1261 -25
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/cache/index.d.ts +63 -78
- package/dist/server/cache/index.d.ts.map +1 -1
- package/dist/server/cache/index.js +7 -22
- package/dist/server/cache/index.js.map +1 -1
- package/dist/server/compress/index.d.ts +13 -5
- package/dist/server/compress/index.d.ts.map +1 -1
- package/dist/server/compress/index.js +10 -2
- package/dist/server/compress/index.js.map +1 -1
- package/dist/server/cookies/index.d.ts +46 -22
- package/dist/server/cookies/index.d.ts.map +1 -1
- package/dist/server/cookies/index.js +7 -5
- package/dist/server/cookies/index.js.map +1 -1
- package/dist/server/core/index.d.ts +307 -196
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/core/index.js +271 -38
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/cors/index.d.ts +24 -34
- package/dist/server/cors/index.d.ts.map +1 -1
- package/dist/server/cors/index.js +7 -21
- package/dist/server/cors/index.js.map +1 -1
- package/dist/server/health/index.d.ts +25 -19
- package/dist/server/health/index.d.ts.map +1 -1
- package/dist/server/health/index.js +8 -2
- package/dist/server/health/index.js.map +1 -1
- package/dist/server/helmet/index.d.ts +13 -5
- package/dist/server/helmet/index.d.ts.map +1 -1
- package/dist/server/helmet/index.js +11 -3
- package/dist/server/helmet/index.js.map +1 -1
- package/dist/server/links/index.browser.js +9 -1
- package/dist/server/links/index.browser.js.map +1 -1
- package/dist/server/links/index.d.ts +133 -128
- package/dist/server/links/index.d.ts.map +1 -1
- package/dist/server/links/index.js +24 -11
- package/dist/server/links/index.js.map +1 -1
- package/dist/server/metrics/index.d.ts +524 -4
- package/dist/server/metrics/index.d.ts.map +1 -1
- package/dist/server/metrics/index.js +4472 -7
- package/dist/server/metrics/index.js.map +1 -1
- package/dist/server/multipart/index.d.ts +15 -9
- package/dist/server/multipart/index.d.ts.map +1 -1
- package/dist/server/multipart/index.js +9 -3
- package/dist/server/multipart/index.js.map +1 -1
- package/dist/server/proxy/index.d.ts +110 -104
- package/dist/server/proxy/index.d.ts.map +1 -1
- package/dist/server/proxy/index.js +8 -2
- package/dist/server/proxy/index.js.map +1 -1
- package/dist/server/rate-limit/index.d.ts +46 -51
- package/dist/server/rate-limit/index.d.ts.map +1 -1
- package/dist/server/rate-limit/index.js +18 -55
- package/dist/server/rate-limit/index.js.map +1 -1
- package/dist/server/static/index.d.ts +181 -48
- package/dist/server/static/index.d.ts.map +1 -1
- package/dist/server/static/index.js +1848 -5
- package/dist/server/static/index.js.map +1 -1
- package/dist/server/swagger/index.d.ts +348 -53
- package/dist/server/swagger/index.d.ts.map +1 -1
- package/dist/server/swagger/index.js +1849 -6
- package/dist/server/swagger/index.js.map +1 -1
- package/dist/sms/index.d.ts +312 -18
- package/dist/sms/index.d.ts.map +1 -1
- package/dist/sms/index.js +1854 -10
- package/dist/sms/index.js.map +1 -1
- package/dist/system/index.browser.js +496 -0
- package/dist/system/index.browser.js.map +1 -0
- package/dist/system/index.d.ts +1158 -0
- package/dist/system/index.d.ts.map +1 -0
- package/dist/{file → system}/index.js +412 -20
- package/dist/system/index.js.map +1 -0
- package/dist/thread/index.d.ts +82 -73
- package/dist/thread/index.d.ts.map +1 -1
- package/dist/thread/index.js +13 -4
- package/dist/thread/index.js.map +1 -1
- package/dist/topic/core/index.d.ts +330 -323
- package/dist/topic/core/index.d.ts.map +1 -1
- package/dist/topic/core/index.js +12 -5
- package/dist/topic/core/index.js.map +1 -1
- package/dist/topic/redis/index.d.ts +6 -6
- package/dist/topic/redis/index.d.ts.map +1 -1
- package/dist/vite/index.d.ts +163 -5825
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +130 -477
- package/dist/vite/index.js.map +1 -1
- package/dist/websocket/index.browser.js +3 -3
- package/dist/websocket/index.browser.js.map +1 -1
- package/dist/websocket/index.d.ts +287 -283
- package/dist/websocket/index.d.ts.map +1 -1
- package/dist/websocket/index.js +15 -11
- package/dist/websocket/index.js.map +1 -1
- package/package.json +86 -17
- package/src/api/audits/index.ts +10 -33
- package/src/api/files/__tests__/$bucket.spec.ts +1 -1
- package/src/api/files/controllers/AdminFileStatsController.spec.ts +1 -1
- package/src/api/files/controllers/FileController.spec.ts +1 -1
- package/src/api/files/index.ts +10 -3
- package/src/api/files/jobs/FileJobs.spec.ts +1 -1
- package/src/api/files/services/FileService.spec.ts +1 -1
- package/src/api/jobs/index.ts +10 -3
- package/src/api/keys/controllers/AdminApiKeyController.ts +75 -0
- package/src/api/keys/controllers/ApiKeyController.ts +103 -0
- package/src/api/keys/entities/apiKeyEntity.ts +41 -0
- package/src/api/keys/index.ts +49 -0
- package/src/api/keys/schemas/adminApiKeyQuerySchema.ts +7 -0
- package/src/api/keys/schemas/adminApiKeyResourceSchema.ts +17 -0
- package/src/api/keys/schemas/createApiKeyBodySchema.ts +7 -0
- package/src/api/keys/schemas/createApiKeyResponseSchema.ts +11 -0
- package/src/api/keys/schemas/listApiKeyResponseSchema.ts +15 -0
- package/src/api/keys/schemas/revokeApiKeyParamsSchema.ts +5 -0
- package/src/api/keys/schemas/revokeApiKeyResponseSchema.ts +5 -0
- package/src/api/keys/services/ApiKeyService.spec.ts +553 -0
- package/src/api/keys/services/ApiKeyService.ts +306 -0
- package/src/api/logs/TODO.md +52 -0
- package/src/api/notifications/index.ts +10 -4
- package/src/api/parameters/index.ts +9 -30
- package/src/api/parameters/primitives/$config.ts +12 -4
- package/src/api/parameters/services/ConfigStore.ts +9 -3
- package/src/api/users/__tests__/ApiKeys-integration.spec.ts +1035 -0
- package/src/api/users/__tests__/ApiKeys.spec.ts +401 -0
- package/src/api/users/index.ts +14 -3
- package/src/api/users/primitives/$realm.ts +33 -5
- package/src/api/users/providers/RealmProvider.ts +1 -12
- package/src/api/users/services/SessionService.ts +1 -11
- package/src/api/verifications/controllers/VerificationController.ts +2 -0
- package/src/api/verifications/index.ts +10 -4
- package/src/batch/index.ts +9 -36
- package/src/batch/primitives/$batch.ts +0 -8
- package/src/batch/providers/BatchProvider.ts +29 -2
- package/src/bucket/__tests__/shared.ts +1 -1
- package/src/bucket/index.ts +13 -6
- package/src/bucket/primitives/$bucket.ts +1 -1
- package/src/bucket/providers/LocalFileStorageProvider.ts +1 -1
- package/src/bucket/providers/MemoryFileStorageProvider.ts +1 -1
- package/src/cache/core/__tests__/shared.ts +30 -0
- package/src/cache/core/index.ts +11 -6
- package/src/cache/core/primitives/$cache.spec.ts +5 -0
- package/src/cache/core/providers/CacheProvider.ts +17 -0
- package/src/cache/core/providers/MemoryCacheProvider.ts +300 -1
- package/src/cache/redis/__tests__/cache-redis.spec.ts +5 -0
- package/src/cache/redis/providers/RedisCacheProvider.ts +9 -0
- package/src/cli/apps/AlephaCli.ts +3 -16
- package/src/cli/apps/AlephaPackageBuilderCli.ts +10 -2
- package/src/cli/atoms/appEntryOptions.ts +13 -0
- package/src/cli/atoms/buildOptions.ts +1 -1
- package/src/cli/atoms/changelogOptions.ts +1 -1
- package/src/cli/commands/build.ts +64 -52
- package/src/cli/commands/db.ts +17 -11
- package/src/cli/commands/deploy.ts +1 -1
- package/src/cli/commands/dev.ts +13 -49
- package/src/cli/commands/gen/env.ts +6 -3
- package/src/cli/commands/gen/openapi.ts +5 -2
- package/src/cli/commands/init.spec.ts +544 -0
- package/src/cli/commands/init.ts +101 -58
- package/src/cli/commands/lint.ts +8 -2
- package/src/cli/commands/typecheck.ts +11 -0
- package/src/cli/defineConfig.ts +9 -0
- package/src/cli/index.ts +2 -1
- package/src/cli/providers/AppEntryProvider.ts +131 -0
- package/src/cli/providers/ViteBuildProvider.ts +40 -0
- package/src/cli/providers/ViteDevServerProvider.ts +378 -0
- package/src/cli/services/AlephaCliUtils.ts +39 -93
- package/src/cli/services/PackageManagerUtils.ts +140 -17
- package/src/cli/services/ProjectScaffolder.ts +169 -101
- package/src/cli/services/ViteUtils.ts +82 -0
- package/src/cli/{assets/claudeMd.ts → templates/agentMd.ts} +41 -28
- package/src/cli/{assets → templates}/apiHelloControllerTs.ts +2 -1
- package/src/cli/{assets → templates}/biomeJson.ts +2 -1
- package/src/cli/{assets → templates}/dummySpecTs.ts +2 -1
- package/src/cli/{assets → templates}/editorconfig.ts +2 -1
- package/src/cli/templates/gitignore.ts +39 -0
- package/src/cli/{assets → templates}/mainBrowserTs.ts +2 -1
- package/src/cli/templates/mainCss.ts +33 -0
- package/src/cli/templates/mainServerTs.ts +33 -0
- package/src/cli/{assets → templates}/tsconfigJson.ts +2 -1
- package/src/cli/templates/webAppRouterTs.ts +50 -0
- package/src/cli/templates/webHelloComponentTsx.ts +20 -0
- package/src/command/helpers/Runner.spec.ts +4 -0
- package/src/command/helpers/Runner.ts +3 -21
- package/src/command/index.ts +12 -4
- package/src/command/providers/CliProvider.spec.ts +1067 -0
- package/src/command/providers/CliProvider.ts +203 -40
- package/src/core/Alepha.ts +3 -9
- package/src/core/__tests__/Alepha-start.spec.ts +4 -4
- package/src/core/helpers/jsonSchemaToTypeBox.spec.ts +771 -0
- package/src/core/helpers/jsonSchemaToTypeBox.ts +62 -10
- package/src/core/index.shared.ts +1 -0
- package/src/core/index.ts +20 -0
- package/src/core/primitives/$module.ts +12 -0
- package/src/core/providers/EventManager.spec.ts +0 -71
- package/src/core/providers/EventManager.ts +3 -15
- package/src/core/providers/Json.ts +2 -14
- package/src/core/providers/KeylessJsonSchemaCodec.spec.ts +257 -0
- package/src/core/providers/KeylessJsonSchemaCodec.ts +396 -14
- package/src/core/providers/SchemaValidator.spec.ts +236 -0
- package/src/datetime/index.ts +15 -0
- package/src/email/index.ts +10 -5
- package/src/email/providers/LocalEmailProvider.spec.ts +1 -1
- package/src/email/providers/LocalEmailProvider.ts +1 -1
- package/src/fake/__tests__/keyName.example.ts +1 -1
- package/src/fake/__tests__/keyName.spec.ts +5 -5
- package/src/fake/index.ts +9 -6
- package/src/fake/providers/FakeProvider.spec.ts +258 -40
- package/src/fake/providers/FakeProvider.ts +133 -19
- package/src/lock/core/index.ts +11 -4
- package/src/logger/index.ts +17 -66
- package/src/logger/providers/PrettyFormatterProvider.ts +0 -9
- package/src/mcp/errors/McpError.ts +30 -0
- package/src/mcp/index.ts +13 -27
- package/src/mcp/transports/SseMcpTransport.ts +6 -7
- package/src/orm/__tests__/PostgresProvider.spec.ts +2 -2
- package/src/orm/index.browser.ts +2 -2
- package/src/orm/index.bun.ts +4 -2
- package/src/orm/index.ts +21 -47
- package/src/orm/providers/DrizzleKitProvider.ts +3 -5
- package/src/orm/providers/drivers/BunSqliteProvider.ts +1 -0
- package/src/orm/services/Repository.ts +18 -3
- package/src/queue/core/index.ts +14 -6
- package/src/react/auth/__tests__/$auth.spec.ts +202 -0
- package/src/react/auth/hooks/useAuth.ts +32 -0
- package/src/react/auth/index.browser.ts +13 -0
- package/src/react/auth/index.shared.ts +2 -0
- package/src/react/auth/index.ts +48 -0
- package/src/react/auth/providers/ReactAuthProvider.ts +16 -0
- package/src/react/auth/services/ReactAuth.ts +135 -0
- package/src/react/core/__tests__/Router.spec.tsx +169 -0
- package/src/react/core/components/ClientOnly.tsx +49 -0
- package/src/react/core/components/ErrorBoundary.tsx +73 -0
- package/src/react/core/contexts/AlephaContext.ts +7 -0
- package/src/react/core/contexts/AlephaProvider.tsx +42 -0
- package/src/react/core/hooks/useAction.browser.spec.tsx +569 -0
- package/src/react/core/hooks/useAction.ts +480 -0
- package/src/react/core/hooks/useAlepha.ts +26 -0
- package/src/react/core/hooks/useClient.ts +17 -0
- package/src/react/core/hooks/useEvents.ts +51 -0
- package/src/react/core/hooks/useInject.ts +12 -0
- package/src/react/core/hooks/useStore.ts +52 -0
- package/src/react/core/index.ts +90 -0
- package/src/react/form/components/FormState.tsx +17 -0
- package/src/react/form/errors/FormValidationError.ts +18 -0
- package/src/react/form/hooks/useForm.browser.spec.tsx +366 -0
- package/src/react/form/hooks/useForm.ts +47 -0
- package/src/react/form/hooks/useFormState.ts +130 -0
- package/src/react/form/index.ts +44 -0
- package/src/react/form/services/FormModel.ts +614 -0
- package/src/react/head/helpers/SeoExpander.spec.ts +203 -0
- package/src/react/head/helpers/SeoExpander.ts +142 -0
- package/src/react/head/hooks/useHead.spec.tsx +288 -0
- package/src/react/head/hooks/useHead.ts +62 -0
- package/src/react/head/index.browser.ts +26 -0
- package/src/react/head/index.ts +44 -0
- package/src/react/head/interfaces/Head.ts +105 -0
- package/src/react/head/primitives/$head.ts +25 -0
- package/src/react/head/providers/BrowserHeadProvider.browser.spec.ts +196 -0
- package/src/react/head/providers/BrowserHeadProvider.ts +212 -0
- package/src/react/head/providers/HeadProvider.ts +168 -0
- package/src/react/head/providers/ServerHeadProvider.ts +31 -0
- package/src/react/i18n/__tests__/integration.spec.tsx +239 -0
- package/src/react/i18n/components/Localize.spec.tsx +357 -0
- package/src/react/i18n/components/Localize.tsx +35 -0
- package/src/react/i18n/hooks/useI18n.browser.spec.tsx +438 -0
- package/src/react/i18n/hooks/useI18n.ts +18 -0
- package/src/react/i18n/index.ts +41 -0
- package/src/react/i18n/primitives/$dictionary.ts +69 -0
- package/src/react/i18n/providers/I18nProvider.spec.ts +389 -0
- package/src/react/i18n/providers/I18nProvider.ts +278 -0
- package/src/react/router/__tests__/page-head-browser.browser.spec.ts +95 -0
- package/src/react/router/__tests__/page-head.spec.ts +48 -0
- package/src/react/router/__tests__/seo-head.spec.ts +125 -0
- package/src/react/router/atoms/ssrManifestAtom.ts +58 -0
- package/src/react/router/components/ErrorViewer.tsx +872 -0
- package/src/react/router/components/Link.tsx +23 -0
- package/src/react/router/components/NestedView.tsx +223 -0
- package/src/react/router/components/NotFound.tsx +30 -0
- package/src/react/router/constants/PAGE_PRELOAD_KEY.ts +6 -0
- package/src/react/router/contexts/RouterLayerContext.ts +12 -0
- package/src/react/router/errors/Redirection.ts +28 -0
- package/src/react/router/hooks/useActive.ts +52 -0
- package/src/react/router/hooks/useQueryParams.ts +63 -0
- package/src/react/router/hooks/useRouter.ts +20 -0
- package/src/react/router/hooks/useRouterState.ts +11 -0
- package/src/react/router/index.browser.ts +45 -0
- package/src/react/router/index.shared.ts +19 -0
- package/src/react/router/index.ts +142 -0
- package/src/react/router/primitives/$page.browser.spec.tsx +851 -0
- package/src/react/router/primitives/$page.spec.tsx +708 -0
- package/src/react/router/primitives/$page.ts +497 -0
- package/src/react/router/providers/ReactBrowserProvider.ts +309 -0
- package/src/react/router/providers/ReactBrowserRendererProvider.ts +25 -0
- package/src/react/router/providers/ReactBrowserRouterProvider.ts +168 -0
- package/src/react/router/providers/ReactPageProvider.ts +726 -0
- package/src/react/router/providers/ReactServerProvider.spec.tsx +316 -0
- package/src/react/router/providers/ReactServerProvider.ts +558 -0
- package/src/react/router/providers/ReactServerTemplateProvider.ts +979 -0
- package/src/react/router/providers/SSRManifestProvider.ts +334 -0
- package/src/react/router/services/ReactPageServerService.ts +48 -0
- package/src/react/router/services/ReactPageService.ts +27 -0
- package/src/react/router/services/ReactRouter.ts +262 -0
- package/src/react/websocket/hooks/useRoom.tsx +242 -0
- package/src/react/websocket/index.ts +7 -0
- package/src/redis/__tests__/redis.spec.ts +13 -0
- package/src/redis/index.ts +9 -25
- package/src/redis/providers/BunRedisProvider.ts +9 -0
- package/src/redis/providers/NodeRedisProvider.ts +8 -0
- package/src/redis/providers/RedisProvider.ts +16 -0
- package/src/retry/index.ts +11 -2
- package/src/router/index.ts +15 -0
- package/src/scheduler/index.ts +11 -2
- package/src/security/__tests__/BasicAuth.spec.ts +2 -0
- package/src/security/__tests__/ServerSecurityProvider.spec.ts +13 -5
- package/src/security/index.ts +15 -10
- package/src/security/interfaces/IssuerResolver.ts +27 -0
- package/src/security/primitives/$issuer.ts +55 -0
- package/src/security/providers/SecurityProvider.ts +179 -0
- package/src/security/providers/ServerBasicAuthProvider.ts +6 -2
- package/src/security/providers/ServerSecurityProvider.ts +36 -22
- package/src/server/auth/index.ts +12 -7
- package/src/server/cache/index.ts +7 -22
- package/src/server/compress/index.ts +10 -2
- package/src/server/cookies/index.ts +7 -5
- package/src/server/cookies/primitives/$cookie.ts +33 -11
- package/src/server/core/index.ts +17 -7
- package/src/server/core/interfaces/ServerRequest.ts +83 -1
- package/src/server/core/primitives/$action.spec.ts +1 -1
- package/src/server/core/primitives/$action.ts +8 -3
- package/src/server/core/providers/BunHttpServerProvider.ts +1 -1
- package/src/server/core/providers/NodeHttpServerProvider.spec.ts +125 -0
- package/src/server/core/providers/NodeHttpServerProvider.ts +77 -22
- package/src/server/core/providers/ServerLoggerProvider.ts +2 -2
- package/src/server/core/providers/ServerProvider.ts +9 -12
- package/src/server/core/services/ServerRequestParser.spec.ts +520 -0
- package/src/server/core/services/ServerRequestParser.ts +306 -13
- package/src/server/cors/index.ts +7 -21
- package/src/server/cors/primitives/$cors.ts +6 -2
- package/src/server/health/index.ts +8 -2
- package/src/server/helmet/index.ts +11 -3
- package/src/server/links/atoms/apiLinksAtom.ts +7 -0
- package/src/server/links/index.browser.ts +2 -0
- package/src/server/links/index.ts +13 -6
- package/src/server/metrics/index.ts +10 -3
- package/src/server/multipart/index.ts +9 -3
- package/src/server/proxy/index.ts +8 -2
- package/src/server/rate-limit/index.ts +21 -25
- package/src/server/rate-limit/primitives/$rateLimit.ts +6 -2
- package/src/server/rate-limit/providers/ServerRateLimitProvider.spec.ts +38 -14
- package/src/server/rate-limit/providers/ServerRateLimitProvider.ts +22 -56
- package/src/server/static/index.ts +8 -2
- package/src/server/static/providers/ServerStaticProvider.ts +1 -1
- package/src/server/swagger/index.ts +9 -4
- package/src/server/swagger/providers/ServerSwaggerProvider.ts +1 -1
- package/src/sms/index.ts +9 -5
- package/src/sms/providers/LocalSmsProvider.spec.ts +1 -1
- package/src/sms/providers/LocalSmsProvider.ts +1 -1
- package/src/system/index.browser.ts +11 -0
- package/src/system/index.ts +62 -0
- package/src/{file → system}/providers/FileSystemProvider.ts +16 -0
- package/src/{file → system}/providers/MemoryFileSystemProvider.ts +116 -3
- package/src/system/providers/MemoryShellProvider.ts +164 -0
- package/src/{file → system}/providers/NodeFileSystemProvider.spec.ts +2 -2
- package/src/{file → system}/providers/NodeFileSystemProvider.ts +36 -0
- package/src/system/providers/NodeShellProvider.ts +184 -0
- package/src/system/providers/ShellProvider.ts +74 -0
- package/src/{file → system}/services/FileDetector.spec.ts +2 -2
- package/src/thread/index.ts +11 -2
- package/src/topic/core/index.ts +12 -5
- package/src/vite/index.ts +3 -2
- package/src/vite/tasks/buildClient.ts +2 -8
- package/src/vite/tasks/buildServer.ts +84 -21
- package/src/vite/tasks/copyAssets.ts +5 -4
- package/src/vite/tasks/generateSitemap.ts +64 -23
- package/src/vite/tasks/index.ts +0 -2
- package/src/vite/tasks/prerenderPages.ts +49 -24
- package/src/websocket/index.ts +12 -8
- package/dist/file/index.d.ts +0 -839
- package/dist/file/index.d.ts.map +0 -1
- package/dist/file/index.js.map +0 -1
- package/src/cli/assets/indexHtml.ts +0 -15
- package/src/cli/assets/mainServerTs.ts +0 -24
- package/src/cli/assets/webAppRouterTs.ts +0 -15
- package/src/cli/assets/webHelloComponentTsx.ts +0 -16
- package/src/cli/commands/format.ts +0 -23
- package/src/file/index.ts +0 -43
- package/src/vite/helpers/boot.ts +0 -117
- package/src/vite/plugins/viteAlephaDev.ts +0 -177
- package/src/vite/tasks/devServer.ts +0 -71
- package/src/vite/tasks/runAlepha.ts +0 -270
- /package/dist/orm/{chunk-DtkW-qnP.js → chunk-DH6iiROE.js} +0 -0
- /package/src/cli/{assets → templates}/apiIndexTs.ts +0 -0
- /package/src/cli/{assets → templates}/webIndexTs.ts +0 -0
- /package/src/{file → system}/errors/FileError.ts +0 -0
- /package/src/{file → system}/services/FileDetector.ts +0 -0
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,16 +1,374 @@
|
|
|
1
1
|
import * as alepha0 from "alepha";
|
|
2
|
-
import { Alepha, Static } from "alepha";
|
|
3
|
-
import {
|
|
4
|
-
import * as alepha_command0 from "alepha/command";
|
|
5
|
-
import { CliProvider, CommandPrimitive, EnvUtils, RunnerMethod } from "alepha/command";
|
|
2
|
+
import { Alepha, FileLike, Json, Static, StreamLike } from "alepha";
|
|
3
|
+
import { Readable } from "node:stream";
|
|
6
4
|
import * as alepha_logger7 from "alepha/logger";
|
|
7
5
|
import { ConsoleColorProvider } from "alepha/logger";
|
|
6
|
+
import * as alepha_command0 from "alepha/command";
|
|
7
|
+
import { CliProvider, CommandPrimitive, EnvUtils, RunnerMethod } from "alepha/command";
|
|
8
8
|
import * as typebox0 from "typebox";
|
|
9
|
+
import { Plugin, ViteDevServer } from "vite";
|
|
9
10
|
import { DatabaseProvider } from "alepha/orm";
|
|
10
11
|
|
|
11
12
|
//#region ../../src/cli/apps/AlephaCli.d.ts
|
|
12
13
|
declare const AlephaCli: alepha0.Service<alepha0.Module>;
|
|
13
14
|
//#endregion
|
|
15
|
+
//#region ../../src/system/providers/FileSystemProvider.d.ts
|
|
16
|
+
/**
|
|
17
|
+
* Options for creating a file from a URL
|
|
18
|
+
*/
|
|
19
|
+
interface CreateFileFromUrlOptions {
|
|
20
|
+
/**
|
|
21
|
+
* The URL to load the file from (file://, http://, or https://)
|
|
22
|
+
*/
|
|
23
|
+
url: string;
|
|
24
|
+
/**
|
|
25
|
+
* The MIME type of the file (optional, will be detected from filename if not provided)
|
|
26
|
+
*/
|
|
27
|
+
type?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The name of the file (optional, will be extracted from URL if not provided)
|
|
30
|
+
*/
|
|
31
|
+
name?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Options for creating a file from a path (URL with file:// scheme)
|
|
35
|
+
*/
|
|
36
|
+
interface CreateFileFromPathOptions {
|
|
37
|
+
/**
|
|
38
|
+
* The path to the file on the local filesystem
|
|
39
|
+
*/
|
|
40
|
+
path: string;
|
|
41
|
+
/**
|
|
42
|
+
* The MIME type of the file (optional, will be detected from filename if not provided)
|
|
43
|
+
*/
|
|
44
|
+
type?: string;
|
|
45
|
+
/**
|
|
46
|
+
* The name of the file (optional, will be extracted from URL if not provided)
|
|
47
|
+
*/
|
|
48
|
+
name?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Options for creating a file from a Buffer
|
|
52
|
+
*/
|
|
53
|
+
interface CreateFileFromBufferOptions {
|
|
54
|
+
/**
|
|
55
|
+
* The Buffer containing the file data
|
|
56
|
+
*/
|
|
57
|
+
buffer: Buffer;
|
|
58
|
+
/**
|
|
59
|
+
* The MIME type of the file (optional, will be detected from name if not provided)
|
|
60
|
+
*/
|
|
61
|
+
type?: string;
|
|
62
|
+
/**
|
|
63
|
+
* The name of the file (required for proper content type detection)
|
|
64
|
+
*/
|
|
65
|
+
name?: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Options for creating a file from a stream
|
|
69
|
+
*/
|
|
70
|
+
interface CreateFileFromStreamOptions {
|
|
71
|
+
/**
|
|
72
|
+
* The readable stream containing the file data
|
|
73
|
+
*/
|
|
74
|
+
stream: StreamLike;
|
|
75
|
+
/**
|
|
76
|
+
* The MIME type of the file (optional, will be detected from name if not provided)
|
|
77
|
+
*/
|
|
78
|
+
type?: string;
|
|
79
|
+
/**
|
|
80
|
+
* The name of the file (required for proper content type detection)
|
|
81
|
+
*/
|
|
82
|
+
name?: string;
|
|
83
|
+
/**
|
|
84
|
+
* The size of the file in bytes (optional)
|
|
85
|
+
*/
|
|
86
|
+
size?: number;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Options for creating a file from text content
|
|
90
|
+
*/
|
|
91
|
+
interface CreateFileFromTextOptions {
|
|
92
|
+
/**
|
|
93
|
+
* The text content to create the file from
|
|
94
|
+
*/
|
|
95
|
+
text: string;
|
|
96
|
+
/**
|
|
97
|
+
* The MIME type of the file (default: text/plain)
|
|
98
|
+
*/
|
|
99
|
+
type?: string;
|
|
100
|
+
/**
|
|
101
|
+
* The name of the file (default: "file.txt")
|
|
102
|
+
*/
|
|
103
|
+
name?: string;
|
|
104
|
+
}
|
|
105
|
+
interface CreateFileFromResponseOptions {
|
|
106
|
+
/**
|
|
107
|
+
* The Response object containing the file data
|
|
108
|
+
*/
|
|
109
|
+
response: Response;
|
|
110
|
+
/**
|
|
111
|
+
* Override the name (optional, uses filename from Content-Disposition header if not provided)
|
|
112
|
+
*/
|
|
113
|
+
name?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Override the MIME type (optional, uses file.type if not provided)
|
|
116
|
+
*/
|
|
117
|
+
type?: string;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Options for creating a file from a Web File object
|
|
121
|
+
*/
|
|
122
|
+
interface CreateFileFromWebFileOptions {
|
|
123
|
+
/**
|
|
124
|
+
* The Web File object
|
|
125
|
+
*/
|
|
126
|
+
file: File;
|
|
127
|
+
/**
|
|
128
|
+
* Override the MIME type (optional, uses file.type if not provided)
|
|
129
|
+
*/
|
|
130
|
+
type?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Override the name (optional, uses file.name if not provided)
|
|
133
|
+
*/
|
|
134
|
+
name?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Override the size (optional, uses file.size if not provided)
|
|
137
|
+
*/
|
|
138
|
+
size?: number;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Options for creating a file from an ArrayBuffer
|
|
142
|
+
*/
|
|
143
|
+
interface CreateFileFromArrayBufferOptions {
|
|
144
|
+
/**
|
|
145
|
+
* The ArrayBuffer containing the file data
|
|
146
|
+
*/
|
|
147
|
+
arrayBuffer: ArrayBuffer;
|
|
148
|
+
/**
|
|
149
|
+
* The MIME type of the file (optional, will be detected from name if not provided)
|
|
150
|
+
*/
|
|
151
|
+
type?: string;
|
|
152
|
+
/**
|
|
153
|
+
* The name of the file (required for proper content type detection)
|
|
154
|
+
*/
|
|
155
|
+
name?: string;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Union type for all createFile options
|
|
159
|
+
*/
|
|
160
|
+
type CreateFileOptions = CreateFileFromUrlOptions | CreateFileFromPathOptions | CreateFileFromBufferOptions | CreateFileFromStreamOptions | CreateFileFromTextOptions | CreateFileFromWebFileOptions | CreateFileFromResponseOptions | CreateFileFromArrayBufferOptions;
|
|
161
|
+
/**
|
|
162
|
+
* Options for rm (remove) operation
|
|
163
|
+
*/
|
|
164
|
+
interface RmOptions {
|
|
165
|
+
/**
|
|
166
|
+
* If true, removes directories and their contents recursively
|
|
167
|
+
*/
|
|
168
|
+
recursive?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* If true, no error will be thrown if the path does not exist
|
|
171
|
+
*/
|
|
172
|
+
force?: boolean;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Options for cp (copy) operation
|
|
176
|
+
*/
|
|
177
|
+
interface CpOptions {
|
|
178
|
+
/**
|
|
179
|
+
* If true, copy directories recursively
|
|
180
|
+
*/
|
|
181
|
+
recursive?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* If true, overwrite existing destination
|
|
184
|
+
*/
|
|
185
|
+
force?: boolean;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Options for mkdir operation
|
|
189
|
+
*/
|
|
190
|
+
interface MkdirOptions {
|
|
191
|
+
/**
|
|
192
|
+
* If true, creates parent directories as needed
|
|
193
|
+
*/
|
|
194
|
+
recursive?: boolean;
|
|
195
|
+
/**
|
|
196
|
+
* File mode (permission and sticky bits)
|
|
197
|
+
*/
|
|
198
|
+
mode?: number;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Options for ls (list) operation
|
|
202
|
+
*/
|
|
203
|
+
interface LsOptions {
|
|
204
|
+
/**
|
|
205
|
+
* If true, list contents of directories recursively
|
|
206
|
+
*/
|
|
207
|
+
recursive?: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* If true, include hidden files (starting with .)
|
|
210
|
+
*/
|
|
211
|
+
hidden?: boolean;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* FileSystem interface providing utilities for working with files.
|
|
215
|
+
*/
|
|
216
|
+
declare abstract class FileSystemProvider {
|
|
217
|
+
/**
|
|
218
|
+
* Joins multiple path segments into a single path.
|
|
219
|
+
*
|
|
220
|
+
* @param paths - The path segments to join
|
|
221
|
+
* @returns The joined path
|
|
222
|
+
*/
|
|
223
|
+
abstract join(...paths: string[]): string;
|
|
224
|
+
/**
|
|
225
|
+
* Creates a FileLike object from various sources.
|
|
226
|
+
*
|
|
227
|
+
* @param options - Options for creating the file
|
|
228
|
+
* @returns A FileLike object
|
|
229
|
+
*/
|
|
230
|
+
abstract createFile(options: CreateFileOptions): FileLike;
|
|
231
|
+
/**
|
|
232
|
+
* Removes a file or directory.
|
|
233
|
+
*
|
|
234
|
+
* @param path - The path to remove
|
|
235
|
+
* @param options - Remove options
|
|
236
|
+
*/
|
|
237
|
+
abstract rm(path: string, options?: RmOptions): Promise<void>;
|
|
238
|
+
/**
|
|
239
|
+
* Copies a file or directory.
|
|
240
|
+
*
|
|
241
|
+
* @param src - Source path
|
|
242
|
+
* @param dest - Destination path
|
|
243
|
+
* @param options - Copy options
|
|
244
|
+
*/
|
|
245
|
+
abstract cp(src: string, dest: string, options?: CpOptions): Promise<void>;
|
|
246
|
+
/**
|
|
247
|
+
* Moves/renames a file or directory.
|
|
248
|
+
*
|
|
249
|
+
* @param src - Source path
|
|
250
|
+
* @param dest - Destination path
|
|
251
|
+
*/
|
|
252
|
+
abstract mv(src: string, dest: string): Promise<void>;
|
|
253
|
+
/**
|
|
254
|
+
* Creates a directory.
|
|
255
|
+
*
|
|
256
|
+
* @param path - The directory path to create
|
|
257
|
+
* @param options - Mkdir options
|
|
258
|
+
*/
|
|
259
|
+
abstract mkdir(path: string, options?: MkdirOptions): Promise<void>;
|
|
260
|
+
/**
|
|
261
|
+
* Lists files in a directory.
|
|
262
|
+
*
|
|
263
|
+
* @param path - The directory path to list
|
|
264
|
+
* @param options - List options
|
|
265
|
+
* @returns Array of filenames
|
|
266
|
+
*/
|
|
267
|
+
abstract ls(path: string, options?: LsOptions): Promise<string[]>;
|
|
268
|
+
/**
|
|
269
|
+
* Checks if a file or directory exists.
|
|
270
|
+
*
|
|
271
|
+
* @param path - The path to check
|
|
272
|
+
* @returns True if the path exists, false otherwise
|
|
273
|
+
*/
|
|
274
|
+
abstract exists(path: string): Promise<boolean>;
|
|
275
|
+
/**
|
|
276
|
+
* Reads the content of a file.
|
|
277
|
+
*
|
|
278
|
+
* @param path - The file path to read
|
|
279
|
+
* @returns The file content as a Buffer
|
|
280
|
+
*/
|
|
281
|
+
abstract readFile(path: string): Promise<Buffer>;
|
|
282
|
+
/**
|
|
283
|
+
* Writes data to a file.
|
|
284
|
+
*
|
|
285
|
+
* @param path - The file path to write to
|
|
286
|
+
* @param data - The data to write (Buffer or string)
|
|
287
|
+
*/
|
|
288
|
+
abstract writeFile(path: string, data: Uint8Array | Buffer | string | FileLike): Promise<void>;
|
|
289
|
+
/**
|
|
290
|
+
* Reads the content of a file as a string.
|
|
291
|
+
*
|
|
292
|
+
* @param path - The file path to read
|
|
293
|
+
* @returns The file content as a string
|
|
294
|
+
*/
|
|
295
|
+
abstract readTextFile(path: string): Promise<string>;
|
|
296
|
+
/**
|
|
297
|
+
* Reads the content of a file as JSON.
|
|
298
|
+
*
|
|
299
|
+
* @param path - The file path to read
|
|
300
|
+
* @returns The parsed JSON content
|
|
301
|
+
*/
|
|
302
|
+
abstract readJsonFile<T = unknown>(path: string): Promise<T>;
|
|
303
|
+
}
|
|
304
|
+
//#endregion
|
|
305
|
+
//#region ../../src/system/providers/ShellProvider.d.ts
|
|
306
|
+
interface ShellRunOptions {
|
|
307
|
+
/**
|
|
308
|
+
* Working directory for the command.
|
|
309
|
+
*/
|
|
310
|
+
root?: string;
|
|
311
|
+
/**
|
|
312
|
+
* Additional environment variables.
|
|
313
|
+
*/
|
|
314
|
+
env?: Record<string, string>;
|
|
315
|
+
/**
|
|
316
|
+
* Resolve the executable from node_modules/.bin.
|
|
317
|
+
* Supports local project, pnpm nested, and monorepo structures.
|
|
318
|
+
* @default false
|
|
319
|
+
*/
|
|
320
|
+
resolve?: boolean;
|
|
321
|
+
/**
|
|
322
|
+
* Capture stdout instead of inheriting stdio.
|
|
323
|
+
* When true, returns stdout as string.
|
|
324
|
+
* When false, streams output to terminal.
|
|
325
|
+
* @default false
|
|
326
|
+
*/
|
|
327
|
+
capture?: boolean;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Abstract provider for executing shell commands and binaries.
|
|
331
|
+
*
|
|
332
|
+
* Implementations:
|
|
333
|
+
* - `NodeShellProvider` - Real shell execution using Node.js child_process
|
|
334
|
+
* - `MemoryShellProvider` - In-memory mock for testing
|
|
335
|
+
*
|
|
336
|
+
* @example
|
|
337
|
+
* ```typescript
|
|
338
|
+
* class MyService {
|
|
339
|
+
* protected readonly shell = $inject(ShellProvider);
|
|
340
|
+
*
|
|
341
|
+
* async build() {
|
|
342
|
+
* // Run shell command directly
|
|
343
|
+
* await this.shell.run("yarn install");
|
|
344
|
+
*
|
|
345
|
+
* // Run local binary with resolution
|
|
346
|
+
* await this.shell.run("vite build", { resolve: true });
|
|
347
|
+
*
|
|
348
|
+
* // Capture output
|
|
349
|
+
* const output = await this.shell.run("echo hello", { capture: true });
|
|
350
|
+
* }
|
|
351
|
+
* }
|
|
352
|
+
* ```
|
|
353
|
+
*/
|
|
354
|
+
declare abstract class ShellProvider {
|
|
355
|
+
/**
|
|
356
|
+
* Run a shell command or binary.
|
|
357
|
+
*
|
|
358
|
+
* @param command - The command to run
|
|
359
|
+
* @param options - Execution options
|
|
360
|
+
* @returns stdout if capture is true, empty string otherwise
|
|
361
|
+
*/
|
|
362
|
+
abstract run(command: string, options?: ShellRunOptions): Promise<string>;
|
|
363
|
+
/**
|
|
364
|
+
* Check if a command is installed and available in the system PATH.
|
|
365
|
+
*
|
|
366
|
+
* @param command - The command name to check
|
|
367
|
+
* @returns true if the command is available
|
|
368
|
+
*/
|
|
369
|
+
abstract isInstalled(command: string): Promise<boolean>;
|
|
370
|
+
}
|
|
371
|
+
//#endregion
|
|
14
372
|
//#region ../../src/cli/apps/AlephaPackageBuilderCli.d.ts
|
|
15
373
|
interface Module {
|
|
16
374
|
name: string;
|
|
@@ -48,13 +406,74 @@ declare const DEFAULT_IGNORE: string[];
|
|
|
48
406
|
*/
|
|
49
407
|
declare const changelogOptions: alepha0.Atom<alepha0.TObject<{
|
|
50
408
|
/**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
409
|
+
* Scopes to ignore (e.g., "project", "release", "chore").
|
|
410
|
+
* Commits like `feat(chore): ...` will be excluded from changelog.
|
|
411
|
+
*/
|
|
54
412
|
ignore: alepha0.TOptional<alepha0.TArray<alepha0.TString>>;
|
|
55
|
-
}>, "alepha.changelog">;
|
|
413
|
+
}>, "alepha.cli.changelog.options">;
|
|
56
414
|
type ChangelogOptions = Static<typeof changelogOptions.schema>;
|
|
57
415
|
//#endregion
|
|
416
|
+
//#region ../../src/cli/providers/AppEntryProvider.d.ts
|
|
417
|
+
/**
|
|
418
|
+
* Service for locating entry files in Alepha projects.
|
|
419
|
+
*
|
|
420
|
+
* Originally in alepha/vite, moved to CLI to avoid cli -> vite dependency.
|
|
421
|
+
*/
|
|
422
|
+
declare class AppEntryProvider {
|
|
423
|
+
protected readonly fs: FileSystemProvider;
|
|
424
|
+
protected readonly options: Readonly<{
|
|
425
|
+
style?: string | undefined;
|
|
426
|
+
server?: string | undefined;
|
|
427
|
+
browser?: string | undefined;
|
|
428
|
+
}>;
|
|
429
|
+
protected readonly serverEntries: readonly ["main.server.ts", "main.server.tsx", "main.ts", "main.tsx"];
|
|
430
|
+
protected readonly browserEntries: readonly ["main.browser.ts", "main.browser.tsx", "main.ts", "main.tsx"];
|
|
431
|
+
protected readonly styleEntries: readonly ["main.css", "styles.css", "style.css"];
|
|
432
|
+
/**
|
|
433
|
+
* Get application entry points.
|
|
434
|
+
*
|
|
435
|
+
* Server entry is required, an error is thrown if not found.
|
|
436
|
+
* Browser entry is optional.
|
|
437
|
+
*
|
|
438
|
+
* It will first check for custom entries in options, see appEntryOptions.
|
|
439
|
+
*/
|
|
440
|
+
getAppEntry(root: string): Promise<AppEntry>;
|
|
441
|
+
}
|
|
442
|
+
interface AppEntry {
|
|
443
|
+
root: string;
|
|
444
|
+
server: string;
|
|
445
|
+
browser?: string;
|
|
446
|
+
style?: string;
|
|
447
|
+
}
|
|
448
|
+
//#endregion
|
|
449
|
+
//#region ../../src/cli/services/ViteUtils.d.ts
|
|
450
|
+
declare class ViteUtils {
|
|
451
|
+
protected readonly fs: FileSystemProvider;
|
|
452
|
+
protected viteDevServer?: ViteDevServer;
|
|
453
|
+
generateIndexHtml(entry: AppEntry): string;
|
|
454
|
+
/**
|
|
455
|
+
* We need to close the Vite dev server after build is done.
|
|
456
|
+
*/
|
|
457
|
+
protected onReady: alepha0.HookPrimitive<"ready">;
|
|
458
|
+
protected onStop: alepha0.HookPrimitive<"stop">;
|
|
459
|
+
runAlepha(opts: {
|
|
460
|
+
entry: AppEntry;
|
|
461
|
+
mode: "production" | "development";
|
|
462
|
+
}): Promise<Alepha>;
|
|
463
|
+
}
|
|
464
|
+
//#endregion
|
|
465
|
+
//#region ../../src/cli/providers/ViteBuildProvider.d.ts
|
|
466
|
+
declare class ViteBuildProvider {
|
|
467
|
+
protected alepha?: Alepha;
|
|
468
|
+
protected appEntry?: AppEntry;
|
|
469
|
+
protected readonly viteUtils: ViteUtils;
|
|
470
|
+
init(opts: {
|
|
471
|
+
entry: AppEntry;
|
|
472
|
+
}): Promise<Alepha>;
|
|
473
|
+
hasClient(): boolean;
|
|
474
|
+
generateIndexHtml(): string;
|
|
475
|
+
}
|
|
476
|
+
//#endregion
|
|
58
477
|
//#region ../../src/cli/services/AlephaCliUtils.d.ts
|
|
59
478
|
/**
|
|
60
479
|
* Core utility service for CLI commands.
|
|
@@ -69,38 +488,75 @@ declare class AlephaCliUtils {
|
|
|
69
488
|
protected readonly log: alepha_logger7.Logger;
|
|
70
489
|
protected readonly fs: FileSystemProvider;
|
|
71
490
|
protected readonly envUtils: EnvUtils;
|
|
491
|
+
protected readonly boot: AppEntryProvider;
|
|
492
|
+
protected readonly shell: ShellProvider;
|
|
493
|
+
protected readonly viteUtils: ViteUtils;
|
|
72
494
|
/**
|
|
73
|
-
|
|
74
|
-
|
|
495
|
+
* Execute a command with inherited stdio.
|
|
496
|
+
*
|
|
497
|
+
* @param command - The command to execute
|
|
498
|
+
* @param options.root - Working directory
|
|
499
|
+
* @param options.env - Additional environment variables
|
|
500
|
+
* @param options.global - If true, run command directly without resolving from node_modules
|
|
501
|
+
*/
|
|
75
502
|
exec(command: string, options?: {
|
|
76
503
|
root?: string;
|
|
77
504
|
env?: Record<string, string>;
|
|
78
505
|
global?: boolean;
|
|
79
506
|
}): Promise<void>;
|
|
80
507
|
/**
|
|
81
|
-
|
|
82
|
-
|
|
508
|
+
* Write a configuration file to node_modules/.alepha directory.
|
|
509
|
+
*/
|
|
83
510
|
writeConfigFile(name: string, content: string, root?: string): Promise<string>;
|
|
511
|
+
loadAlephaFromServerEntryFile(opts: {
|
|
512
|
+
mode: "production" | "development";
|
|
513
|
+
} & ({
|
|
514
|
+
entry: AppEntry;
|
|
515
|
+
} | {
|
|
516
|
+
root: string;
|
|
517
|
+
})): Promise<Alepha>;
|
|
84
518
|
/**
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
loadAlephaFromServerEntryFile(rootDir?: string, explicitEntry?: string): Promise<{
|
|
88
|
-
alepha: Alepha;
|
|
89
|
-
entry: string;
|
|
90
|
-
}>;
|
|
91
|
-
/**
|
|
92
|
-
* Generate JavaScript code for Drizzle entities export.
|
|
93
|
-
*/
|
|
519
|
+
* Generate JavaScript code for Drizzle entities export.
|
|
520
|
+
*/
|
|
94
521
|
generateEntitiesJs(entry: string, provider: string, models?: string[]): string;
|
|
95
522
|
/**
|
|
96
|
-
|
|
97
|
-
|
|
523
|
+
* Load environment variables from a .env file.
|
|
524
|
+
*/
|
|
98
525
|
loadEnv(root: string, files?: string[]): Promise<void>;
|
|
99
526
|
exists(root: string, path: string): Promise<boolean>;
|
|
100
|
-
|
|
527
|
+
/**
|
|
528
|
+
* Check if a command is installed and available in the system PATH.
|
|
529
|
+
*/
|
|
530
|
+
isInstalledAsync(cmd: string): Promise<boolean>;
|
|
101
531
|
}
|
|
102
532
|
//#endregion
|
|
103
533
|
//#region ../../src/cli/services/PackageManagerUtils.d.ts
|
|
534
|
+
/**
|
|
535
|
+
* Context information about a workspace root.
|
|
536
|
+
* Used when initializing a package inside a monorepo.
|
|
537
|
+
*/
|
|
538
|
+
interface WorkspaceContext {
|
|
539
|
+
/**
|
|
540
|
+
* Whether we're inside a workspace package.
|
|
541
|
+
*/
|
|
542
|
+
isPackage: boolean;
|
|
543
|
+
/**
|
|
544
|
+
* The workspace root directory (e.g., ../.. from packages/my-pkg).
|
|
545
|
+
*/
|
|
546
|
+
workspaceRoot: string | null;
|
|
547
|
+
/**
|
|
548
|
+
* Package manager detected at workspace root.
|
|
549
|
+
*/
|
|
550
|
+
packageManager: "yarn" | "pnpm" | "npm" | "bun" | null;
|
|
551
|
+
/**
|
|
552
|
+
* Config files present at workspace root.
|
|
553
|
+
*/
|
|
554
|
+
config: {
|
|
555
|
+
biomeJson: boolean;
|
|
556
|
+
editorconfig: boolean;
|
|
557
|
+
tsconfigJson: boolean;
|
|
558
|
+
};
|
|
559
|
+
}
|
|
104
560
|
/**
|
|
105
561
|
* Utility service for package manager operations.
|
|
106
562
|
*
|
|
@@ -115,31 +571,45 @@ declare class PackageManagerUtils {
|
|
|
115
571
|
protected readonly fs: FileSystemProvider;
|
|
116
572
|
protected readonly alepha: Alepha;
|
|
117
573
|
/**
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
getPackageManager(root: string,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
574
|
+
* Detect the package manager used in the project.
|
|
575
|
+
*/
|
|
576
|
+
getPackageManager(root: string, pm?: "yarn" | "pnpm" | "npm" | "bun"): Promise<"yarn" | "pnpm" | "npm" | "bun">;
|
|
577
|
+
/**
|
|
578
|
+
* Detect workspace context when inside a monorepo package.
|
|
579
|
+
*
|
|
580
|
+
* Checks if we're inside a workspace package (e.g., packages/my-pkg or apps/my-app)
|
|
581
|
+
* by looking 2 levels up for workspace indicators like lockfiles and config files.
|
|
582
|
+
*
|
|
583
|
+
* @param root - The current package directory
|
|
584
|
+
* @returns Workspace context with root path, PM, and config presence
|
|
585
|
+
*/
|
|
586
|
+
getWorkspaceContext(root: string): Promise<WorkspaceContext>;
|
|
587
|
+
/**
|
|
588
|
+
* Get the install command for a package.
|
|
589
|
+
*/
|
|
129
590
|
getInstallCommand(root: string, packageName: string, dev?: boolean): Promise<string>;
|
|
130
591
|
/**
|
|
131
|
-
|
|
132
|
-
|
|
592
|
+
* Check if a dependency is installed in the project.
|
|
593
|
+
*/
|
|
133
594
|
hasDependency(root: string, packageName: string): Promise<boolean>;
|
|
134
595
|
/**
|
|
135
|
-
|
|
136
|
-
|
|
596
|
+
* Check if Expo is present in the project.
|
|
597
|
+
*/
|
|
137
598
|
hasExpo(root: string): Promise<boolean>;
|
|
138
599
|
/**
|
|
139
|
-
|
|
140
|
-
|
|
600
|
+
* Check if React is present in the project.
|
|
601
|
+
*/
|
|
602
|
+
hasReact(root: string): Promise<boolean>;
|
|
603
|
+
/**
|
|
604
|
+
* Install a dependency if it's missing from the project.
|
|
605
|
+
* Optionally checks workspace root for the dependency in monorepo setups.
|
|
606
|
+
*/
|
|
141
607
|
ensureDependency(root: string, packageName: string, options?: {
|
|
142
608
|
dev?: boolean;
|
|
609
|
+
/**
|
|
610
|
+
* Also check workspace root for the dependency (for monorepo setups).
|
|
611
|
+
*/
|
|
612
|
+
checkWorkspace?: boolean;
|
|
143
613
|
run?: RunnerMethod;
|
|
144
614
|
exec?: (cmd: string, opts?: {
|
|
145
615
|
global?: boolean;
|
|
@@ -168,17 +638,23 @@ declare class PackageManagerUtils {
|
|
|
168
638
|
protected removeFiles(root: string, files: string[]): Promise<void>;
|
|
169
639
|
}
|
|
170
640
|
interface DependencyModes {
|
|
171
|
-
|
|
172
|
-
|
|
641
|
+
react?: boolean;
|
|
642
|
+
ui?: boolean;
|
|
173
643
|
expo?: boolean;
|
|
644
|
+
test?: boolean;
|
|
645
|
+
/**
|
|
646
|
+
* Skip biome/vitest when inside a workspace package (they're at root).
|
|
647
|
+
*/
|
|
648
|
+
isPackage?: boolean;
|
|
174
649
|
}
|
|
175
650
|
//#endregion
|
|
176
|
-
//#region ../../src/cli/
|
|
177
|
-
interface
|
|
651
|
+
//#region ../../src/cli/templates/agentMd.d.ts
|
|
652
|
+
interface AgentMdOptions {
|
|
178
653
|
react?: boolean;
|
|
179
654
|
ui?: boolean;
|
|
180
655
|
projectName?: string;
|
|
181
656
|
}
|
|
657
|
+
type AgentMdType = "claude" | "agents";
|
|
182
658
|
//#endregion
|
|
183
659
|
//#region ../../src/cli/services/ProjectScaffolder.d.ts
|
|
184
660
|
/**
|
|
@@ -194,57 +670,98 @@ declare class ProjectScaffolder {
|
|
|
194
670
|
protected readonly log: alepha_logger7.Logger;
|
|
195
671
|
protected readonly fs: FileSystemProvider;
|
|
196
672
|
protected readonly pm: PackageManagerUtils;
|
|
673
|
+
protected readonly utils: AlephaCliUtils;
|
|
197
674
|
/**
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
675
|
+
* Get the app name from the directory name.
|
|
676
|
+
*
|
|
677
|
+
* Converts the directory name to a valid module name:
|
|
678
|
+
* - Converts to lowercase
|
|
679
|
+
* - Replaces spaces, dashes, underscores with nothing
|
|
680
|
+
* - Falls back to "app" if empty
|
|
681
|
+
*/
|
|
205
682
|
getAppName(root: string): string;
|
|
206
683
|
/**
|
|
207
|
-
|
|
208
|
-
|
|
684
|
+
* Ensure all configuration files exist.
|
|
685
|
+
*/
|
|
209
686
|
ensureConfig(root: string, opts: {
|
|
687
|
+
force?: boolean;
|
|
688
|
+
/**
|
|
689
|
+
* Check workspace root for existing config files.
|
|
690
|
+
*/
|
|
691
|
+
checkWorkspace?: boolean;
|
|
210
692
|
packageJson?: boolean | DependencyModes;
|
|
211
693
|
tsconfigJson?: boolean;
|
|
212
|
-
indexHtml?: boolean;
|
|
213
694
|
biomeJson?: boolean;
|
|
214
695
|
editorconfig?: boolean;
|
|
215
|
-
|
|
696
|
+
agentMd?: false | (AgentMdOptions & {
|
|
697
|
+
type: AgentMdType;
|
|
698
|
+
});
|
|
699
|
+
}): Promise<void>;
|
|
700
|
+
ensureTsConfig(root: string, opts?: {
|
|
701
|
+
force?: boolean;
|
|
702
|
+
}): Promise<void>;
|
|
703
|
+
ensureBiomeConfig(root: string, opts?: {
|
|
704
|
+
force?: boolean;
|
|
705
|
+
checkWorkspace?: boolean;
|
|
706
|
+
}): Promise<void>;
|
|
707
|
+
ensureEditorConfig(root: string, opts?: {
|
|
708
|
+
force?: boolean;
|
|
709
|
+
checkWorkspace?: boolean;
|
|
710
|
+
}): Promise<void>;
|
|
711
|
+
/**
|
|
712
|
+
* Ensure git repository is initialized with .gitignore.
|
|
713
|
+
*
|
|
714
|
+
* @returns true if git was initialized, false if already exists or git unavailable
|
|
715
|
+
*/
|
|
716
|
+
ensureGitRepo(root: string, opts?: {
|
|
717
|
+
force?: boolean;
|
|
718
|
+
}): Promise<boolean>;
|
|
719
|
+
ensureAgentMd(root: string, options: AgentMdOptions & {
|
|
720
|
+
type: AgentMdType;
|
|
721
|
+
force?: boolean;
|
|
722
|
+
}): Promise<void>;
|
|
723
|
+
/**
|
|
724
|
+
* Ensure src/main.server.ts exists with correct module imports.
|
|
725
|
+
*/
|
|
726
|
+
ensureMainServerTs(root: string, opts?: {
|
|
727
|
+
api?: boolean;
|
|
728
|
+
react?: boolean;
|
|
729
|
+
force?: boolean;
|
|
730
|
+
}): Promise<void>;
|
|
731
|
+
/**
|
|
732
|
+
* Ensure API module structure exists.
|
|
733
|
+
*
|
|
734
|
+
* Creates:
|
|
735
|
+
* - src/api/index.ts (API module)
|
|
736
|
+
* - src/api/controllers/HelloController.ts (example controller)
|
|
737
|
+
*/
|
|
738
|
+
ensureApiProject(root: string, opts?: {
|
|
739
|
+
force?: boolean;
|
|
740
|
+
}): Promise<void>;
|
|
741
|
+
/**
|
|
742
|
+
* Ensure web/React project structure exists.
|
|
743
|
+
*
|
|
744
|
+
* Creates:
|
|
745
|
+
* - src/main.browser.ts
|
|
746
|
+
* - src/main.css
|
|
747
|
+
* - src/web/index.ts, src/web/AppRouter.ts, src/web/components/Hello.tsx
|
|
748
|
+
*/
|
|
749
|
+
ensureWebProject(root: string, opts?: {
|
|
750
|
+
api?: boolean;
|
|
751
|
+
ui?: boolean;
|
|
752
|
+
force?: boolean;
|
|
216
753
|
}): Promise<void>;
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
ensureClaudeMd(root: string, options?: ClaudeMdOptions): Promise<void>;
|
|
221
|
-
/**
|
|
222
|
-
* Ensure src/main.server.ts exists with full API structure.
|
|
223
|
-
*
|
|
224
|
-
* Creates:
|
|
225
|
-
* - src/main.server.ts (entry point)
|
|
226
|
-
* - src/api/index.ts (API module)
|
|
227
|
-
* - src/api/controllers/HelloController.ts (example controller)
|
|
228
|
-
*/
|
|
229
|
-
ensureApiProject(root: string): Promise<void>;
|
|
230
|
-
/**
|
|
231
|
-
* Ensure full React project structure exists.
|
|
232
|
-
*
|
|
233
|
-
* Creates:
|
|
234
|
-
* - index.html
|
|
235
|
-
* - src/main.server.ts, src/main.browser.ts
|
|
236
|
-
* - src/api/index.ts, src/api/controllers/HelloController.ts
|
|
237
|
-
* - src/web/index.ts, src/web/AppRouter.ts, src/web/components/Hello.tsx
|
|
238
|
-
*/
|
|
239
|
-
ensureReactProject(root: string): Promise<void>;
|
|
240
|
-
/**
|
|
241
|
-
* Ensure test directory exists with a dummy test file.
|
|
242
|
-
*/
|
|
754
|
+
/**
|
|
755
|
+
* Ensure test directory exists with a dummy test file.
|
|
756
|
+
*/
|
|
243
757
|
ensureTestDir(root: string): Promise<void>;
|
|
244
|
-
protected ensureFileIfNotExists(root: string, relativePath: string, content: string): Promise<void>;
|
|
245
758
|
/**
|
|
246
|
-
|
|
247
|
-
|
|
759
|
+
* Write a file, optionally overriding if it exists.
|
|
760
|
+
*/
|
|
761
|
+
protected ensureFile(root: string, relativePath: string, content: string, force?: boolean): Promise<void>;
|
|
762
|
+
/**
|
|
763
|
+
* Check if a file exists in the given directory or any parent directory.
|
|
764
|
+
*/
|
|
248
765
|
protected existsInParents(root: string, filename: string): Promise<boolean>;
|
|
249
766
|
}
|
|
250
767
|
//#endregion
|
|
@@ -255,6 +772,8 @@ declare class BuildCommand {
|
|
|
255
772
|
protected readonly utils: AlephaCliUtils;
|
|
256
773
|
protected readonly pm: PackageManagerUtils;
|
|
257
774
|
protected readonly scaffolder: ProjectScaffolder;
|
|
775
|
+
protected readonly boot: AppEntryProvider;
|
|
776
|
+
protected readonly viteBuildProvider: ViteBuildProvider;
|
|
258
777
|
protected readonly options: Readonly<{
|
|
259
778
|
stats?: boolean | undefined;
|
|
260
779
|
vercel?: {
|
|
@@ -288,14 +807,14 @@ declare class BuildCommand {
|
|
|
288
807
|
docker: alepha0.TOptional<alepha0.TBoolean>;
|
|
289
808
|
sitemap: alepha0.TOptional<alepha0.TString>;
|
|
290
809
|
bun: alepha0.TOptional<alepha0.TBoolean>;
|
|
291
|
-
}>, alepha0.
|
|
810
|
+
}>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
292
811
|
}
|
|
293
812
|
//#endregion
|
|
294
813
|
//#region ../../src/cli/commands/clean.d.ts
|
|
295
814
|
declare class CleanCommand {
|
|
296
815
|
/**
|
|
297
|
-
|
|
298
|
-
|
|
816
|
+
* Clean the project, removing the "dist" directory
|
|
817
|
+
*/
|
|
299
818
|
readonly clean: alepha_command0.CommandPrimitive<typebox0.TObject<typebox0.TProperties>, typebox0.TSchema, typebox0.TObject<typebox0.TProperties>>;
|
|
300
819
|
}
|
|
301
820
|
//#endregion
|
|
@@ -304,49 +823,50 @@ declare class DbCommand {
|
|
|
304
823
|
protected readonly log: alepha_logger7.Logger;
|
|
305
824
|
protected readonly fs: FileSystemProvider;
|
|
306
825
|
protected readonly utils: AlephaCliUtils;
|
|
826
|
+
protected readonly entryProvider: AppEntryProvider;
|
|
307
827
|
/**
|
|
308
|
-
|
|
309
|
-
|
|
828
|
+
* Check if database migrations are up to date.
|
|
829
|
+
*/
|
|
310
830
|
protected readonly check: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
311
831
|
provider: alepha0.TOptional<alepha0.TString>;
|
|
312
832
|
mode: alepha0.TOptional<alepha0.TString>;
|
|
313
833
|
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
314
834
|
/**
|
|
315
|
-
|
|
316
|
-
|
|
835
|
+
* Generate database migration files
|
|
836
|
+
*/
|
|
317
837
|
protected readonly generate: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
318
838
|
provider: alepha0.TOptional<alepha0.TString>;
|
|
319
839
|
mode: alepha0.TOptional<alepha0.TString>;
|
|
320
840
|
custom: alepha0.TOptional<alepha0.TString>;
|
|
321
841
|
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
322
842
|
/**
|
|
323
|
-
|
|
324
|
-
|
|
843
|
+
* Push database schema changes directly to the database
|
|
844
|
+
*/
|
|
325
845
|
protected readonly push: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
326
846
|
provider: alepha0.TOptional<alepha0.TString>;
|
|
327
847
|
mode: alepha0.TOptional<alepha0.TString>;
|
|
328
848
|
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
329
849
|
/**
|
|
330
|
-
|
|
331
|
-
|
|
850
|
+
* Apply pending database migrations
|
|
851
|
+
*/
|
|
332
852
|
protected readonly migrate: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
333
853
|
provider: alepha0.TOptional<alepha0.TString>;
|
|
334
854
|
mode: alepha0.TOptional<alepha0.TString>;
|
|
335
855
|
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
336
856
|
/**
|
|
337
|
-
|
|
338
|
-
|
|
857
|
+
* Launch Drizzle Studio database browser
|
|
858
|
+
*/
|
|
339
859
|
protected readonly studio: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
340
860
|
provider: alepha0.TOptional<alepha0.TString>;
|
|
341
861
|
mode: alepha0.TOptional<alepha0.TString>;
|
|
342
862
|
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
343
863
|
/**
|
|
344
|
-
|
|
345
|
-
|
|
864
|
+
* Parent command for database operations.
|
|
865
|
+
*/
|
|
346
866
|
readonly db: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
347
867
|
/**
|
|
348
|
-
|
|
349
|
-
|
|
868
|
+
* Run a drizzle-kit command for all database providers in an Alepha instance.
|
|
869
|
+
*/
|
|
350
870
|
runDrizzleKitCommand(options: {
|
|
351
871
|
root: string;
|
|
352
872
|
args?: string;
|
|
@@ -357,8 +877,8 @@ declare class DbCommand {
|
|
|
357
877
|
env?: string;
|
|
358
878
|
}): Promise<void>;
|
|
359
879
|
/**
|
|
360
|
-
|
|
361
|
-
|
|
880
|
+
* Prepare Drizzle configuration files for a database provider.
|
|
881
|
+
*/
|
|
362
882
|
prepareDrizzleConfig(options: {
|
|
363
883
|
kit: any;
|
|
364
884
|
provider: DatabaseProvider;
|
|
@@ -378,24 +898,24 @@ declare class DeployCommand {
|
|
|
378
898
|
protected readonly utils: AlephaCliUtils;
|
|
379
899
|
protected readonly pm: PackageManagerUtils;
|
|
380
900
|
/**
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
901
|
+
* Deploy the project to a hosting platform (e.g., Vercel, Cloudflare, Surge)
|
|
902
|
+
*
|
|
903
|
+
* Deploy command can be overridden by creating a alepha.config.ts in the project root:
|
|
904
|
+
*
|
|
905
|
+
* ```ts
|
|
906
|
+
* import { defineConfig } from "alepha/cli";
|
|
907
|
+
*
|
|
908
|
+
* export default defineConfig({
|
|
909
|
+
* commands: {
|
|
910
|
+
* deploy: {
|
|
911
|
+
* handler: async ({ root, mode, flags }) => {
|
|
912
|
+
* // Custom deployment logic here
|
|
913
|
+
* },
|
|
914
|
+
* },
|
|
915
|
+
* },
|
|
916
|
+
* });
|
|
917
|
+
* ```
|
|
918
|
+
*/
|
|
399
919
|
readonly deploy: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
400
920
|
build: alepha0.TBoolean;
|
|
401
921
|
migrate: alepha0.TBoolean;
|
|
@@ -408,6 +928,96 @@ declare class DeployCommand {
|
|
|
408
928
|
}>>;
|
|
409
929
|
}
|
|
410
930
|
//#endregion
|
|
931
|
+
//#region ../../src/cli/providers/ViteDevServerProvider.d.ts
|
|
932
|
+
interface ViteDevServerOptions {
|
|
933
|
+
/**
|
|
934
|
+
* Root directory of the project.
|
|
935
|
+
*/
|
|
936
|
+
root: string;
|
|
937
|
+
/**
|
|
938
|
+
* Path to the server entry file.
|
|
939
|
+
*/
|
|
940
|
+
entry: AppEntry;
|
|
941
|
+
/**
|
|
942
|
+
* Port to run the dev server on.
|
|
943
|
+
*/
|
|
944
|
+
port?: number;
|
|
945
|
+
/**
|
|
946
|
+
* Host to bind the dev server to.
|
|
947
|
+
*/
|
|
948
|
+
host?: string | boolean;
|
|
949
|
+
}
|
|
950
|
+
/**
|
|
951
|
+
* Vite development server with Alepha integration.
|
|
952
|
+
*
|
|
953
|
+
* Architecture:
|
|
954
|
+
* - Vite runs in middleware mode (no HTTP server)
|
|
955
|
+
* - Alepha is the HTTP server via server:onRequest event
|
|
956
|
+
* - Request flow: Page requests → Alepha SSR, Assets → Vite middleware
|
|
957
|
+
*
|
|
958
|
+
* HMR Strategy:
|
|
959
|
+
* - Browser-only changes (CSS, client components) → Vite HMR (React Fast Refresh)
|
|
960
|
+
* - Server-only changes → Restart Alepha → Full browser reload
|
|
961
|
+
* - Shared changes → Restart Alepha → Let Vite HMR propagate
|
|
962
|
+
*
|
|
963
|
+
* Features:
|
|
964
|
+
* - Automatic .env reload detection
|
|
965
|
+
* - Error recovery on next file change
|
|
966
|
+
* - Optimized module invalidation (only changed files + importers)
|
|
967
|
+
*/
|
|
968
|
+
declare class ViteDevServerProvider {
|
|
969
|
+
protected readonly log: alepha_logger7.Logger;
|
|
970
|
+
protected readonly fs: FileSystemProvider;
|
|
971
|
+
protected readonly templateProvider: ViteUtils;
|
|
972
|
+
protected server: ViteDevServer;
|
|
973
|
+
protected options: ViteDevServerOptions;
|
|
974
|
+
protected alepha: Alepha | null;
|
|
975
|
+
protected hasError: boolean;
|
|
976
|
+
protected changedFiles: Set<string>;
|
|
977
|
+
init(options: ViteDevServerOptions): Promise<Alepha>;
|
|
978
|
+
start(): Promise<void>;
|
|
979
|
+
/**
|
|
980
|
+
* Create the Vite server in middleware mode.
|
|
981
|
+
*/
|
|
982
|
+
protected createViteServer(): Promise<void>;
|
|
983
|
+
/**
|
|
984
|
+
* Vite plugin to handle HMR for Alepha.
|
|
985
|
+
*/
|
|
986
|
+
protected createHmrPlugin(): Plugin;
|
|
987
|
+
/**
|
|
988
|
+
* Send browser reload signal via custom event.
|
|
989
|
+
* Browser listens for 'alepha:reload' and does window.location.reload()
|
|
990
|
+
*/
|
|
991
|
+
protected sendBrowserReload(): void;
|
|
992
|
+
/**
|
|
993
|
+
* Setup environment variables for dev mode.
|
|
994
|
+
*/
|
|
995
|
+
protected setupEnvironment(): Promise<void>;
|
|
996
|
+
/**
|
|
997
|
+
* Load or reload the Alepha instance.
|
|
998
|
+
*/
|
|
999
|
+
protected loadAlepha(isInitialLoad?: boolean): Promise<Alepha>;
|
|
1000
|
+
hasReact(): boolean;
|
|
1001
|
+
/**
|
|
1002
|
+
* Setup Alepha instance with Vite middleware and template.
|
|
1003
|
+
*/
|
|
1004
|
+
protected setupAlepha(): Promise<void>;
|
|
1005
|
+
/**
|
|
1006
|
+
* Check if request is for an HTML page (not an asset).
|
|
1007
|
+
*/
|
|
1008
|
+
protected isPageRequest(req: any): boolean;
|
|
1009
|
+
/**
|
|
1010
|
+
* Run Vite middleware and detect if it handled the request.
|
|
1011
|
+
*/
|
|
1012
|
+
protected runViteMiddleware(req: any, res: any, ctx: {
|
|
1013
|
+
metadata: any;
|
|
1014
|
+
}): Promise<boolean>;
|
|
1015
|
+
/**
|
|
1016
|
+
* Invalidate modules and all their importers.
|
|
1017
|
+
*/
|
|
1018
|
+
protected invalidateModulesWithImporters(): void;
|
|
1019
|
+
}
|
|
1020
|
+
//#endregion
|
|
411
1021
|
//#region ../../src/cli/commands/dev.d.ts
|
|
412
1022
|
declare class DevCommand {
|
|
413
1023
|
protected readonly log: alepha_logger7.Logger;
|
|
@@ -416,23 +1026,12 @@ declare class DevCommand {
|
|
|
416
1026
|
protected readonly pm: PackageManagerUtils;
|
|
417
1027
|
protected readonly scaffolder: ProjectScaffolder;
|
|
418
1028
|
protected readonly alepha: Alepha;
|
|
1029
|
+
protected readonly viteDevServer: ViteDevServerProvider;
|
|
1030
|
+
protected readonly boot: AppEntryProvider;
|
|
419
1031
|
/**
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
* - Otherwise, it will look for a server entry file and run it with tsx in watch mode.
|
|
424
|
-
*/
|
|
425
|
-
readonly dev: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
426
|
-
protected isBunProject(root: string): Promise<boolean>;
|
|
427
|
-
protected isFullstackProject(root: string): Promise<boolean>;
|
|
428
|
-
}
|
|
429
|
-
//#endregion
|
|
430
|
-
//#region ../../src/cli/commands/format.d.ts
|
|
431
|
-
declare class FormatCommand {
|
|
432
|
-
protected readonly utils: AlephaCliUtils;
|
|
433
|
-
protected readonly pm: PackageManagerUtils;
|
|
434
|
-
protected readonly scaffolder: ProjectScaffolder;
|
|
435
|
-
readonly format: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
1032
|
+
* Will run the project in watch mode.
|
|
1033
|
+
*/
|
|
1034
|
+
readonly dev: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
436
1035
|
}
|
|
437
1036
|
//#endregion
|
|
438
1037
|
//#region ../../src/cli/services/GitMessageParser.d.ts
|
|
@@ -453,16 +1052,16 @@ declare class FormatCommand {
|
|
|
453
1052
|
declare class GitMessageParser {
|
|
454
1053
|
protected readonly log: alepha_logger7.Logger;
|
|
455
1054
|
/**
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
1055
|
+
* Parse a git commit line into a structured Commit object.
|
|
1056
|
+
*
|
|
1057
|
+
* **Format:** `type(scope): description` or `type(scope)!: description`
|
|
1058
|
+
*
|
|
1059
|
+
* **Supported types:** feat, fix, docs, refactor, perf, revert
|
|
1060
|
+
*
|
|
1061
|
+
* **Breaking changes:** Use `!` before `:` (e.g., `feat(api)!: remove endpoint`)
|
|
1062
|
+
*
|
|
1063
|
+
* @returns Commit object or null if not matching/ignored
|
|
1064
|
+
*/
|
|
466
1065
|
parseCommit(line: string, config: ChangelogOptions): Commit | null;
|
|
467
1066
|
}
|
|
468
1067
|
//#endregion
|
|
@@ -502,39 +1101,39 @@ declare class ChangelogCommand {
|
|
|
502
1101
|
ignore?: string[] | undefined;
|
|
503
1102
|
}>;
|
|
504
1103
|
/**
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
1104
|
+
* Format a single commit line.
|
|
1105
|
+
* Example: `- **cli**: add new command (\`abc1234\`)`
|
|
1106
|
+
* Breaking changes are flagged: `- **cli**: add new command [BREAKING] (\`abc1234\`)`
|
|
1107
|
+
*/
|
|
509
1108
|
protected formatCommit(commit: Commit): string;
|
|
510
1109
|
/**
|
|
511
|
-
|
|
512
|
-
|
|
1110
|
+
* Format the changelog entry with sections.
|
|
1111
|
+
*/
|
|
513
1112
|
protected formatEntry(entry: ChangelogEntry): string;
|
|
514
1113
|
/**
|
|
515
|
-
|
|
516
|
-
|
|
1114
|
+
* Parse git log output into a changelog entry.
|
|
1115
|
+
*/
|
|
517
1116
|
protected parseCommits(commitsOutput: string): ChangelogEntry;
|
|
518
1117
|
/**
|
|
519
|
-
|
|
520
|
-
|
|
1118
|
+
* Check if entry has any public commits.
|
|
1119
|
+
*/
|
|
521
1120
|
protected hasChanges(entry: ChangelogEntry): boolean;
|
|
522
1121
|
/**
|
|
523
|
-
|
|
524
|
-
|
|
1122
|
+
* Get the latest version tag.
|
|
1123
|
+
*/
|
|
525
1124
|
protected getLatestTag(git: (cmd: string) => Promise<string>): Promise<string | null>;
|
|
526
1125
|
readonly command: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
527
1126
|
/**
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
1127
|
+
* Show changes from this ref (tag, commit, branch).
|
|
1128
|
+
* Defaults to the latest version tag.
|
|
1129
|
+
* Example: --from=1.0.0
|
|
1130
|
+
*/
|
|
532
1131
|
from: alepha0.TOptional<alepha0.TString>;
|
|
533
1132
|
/**
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
1133
|
+
* Show changes up to this ref (tag, commit, branch).
|
|
1134
|
+
* Defaults to HEAD.
|
|
1135
|
+
* Example: --to=main
|
|
1136
|
+
*/
|
|
538
1137
|
to: alepha0.TOptional<alepha0.TString>;
|
|
539
1138
|
}>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
540
1139
|
}
|
|
@@ -556,18 +1155,17 @@ declare class InitCommand {
|
|
|
556
1155
|
protected readonly scaffolder: ProjectScaffolder;
|
|
557
1156
|
protected readonly fs: FileSystemProvider;
|
|
558
1157
|
/**
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
1158
|
+
* Ensure the project has the necessary Alepha configuration files.
|
|
1159
|
+
* Add the correct dependencies to package.json and install them.
|
|
1160
|
+
*/
|
|
562
1161
|
readonly init: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
563
1162
|
agent: alepha0.TOptional<alepha0.TBoolean>;
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
web: alepha0.TOptional<alepha0.TBoolean>;
|
|
569
|
-
admin: alepha0.TOptional<alepha0.TBoolean>;
|
|
1163
|
+
pm: alepha0.TOptional<alepha0.TUnsafe<"bun" | "yarn" | "npm" | "pnpm">>;
|
|
1164
|
+
api: alepha0.TOptional<alepha0.TBoolean>;
|
|
1165
|
+
react: alepha0.TOptional<alepha0.TBoolean>;
|
|
1166
|
+
ui: alepha0.TOptional<alepha0.TBoolean>;
|
|
570
1167
|
test: alepha0.TOptional<alepha0.TBoolean>;
|
|
1168
|
+
force: alepha0.TOptional<alepha0.TBoolean>;
|
|
571
1169
|
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
572
1170
|
}
|
|
573
1171
|
//#endregion
|
|
@@ -586,8 +1184,8 @@ declare class RootCommand {
|
|
|
586
1184
|
protected readonly alepha: Alepha;
|
|
587
1185
|
protected readonly color: ConsoleColorProvider;
|
|
588
1186
|
/**
|
|
589
|
-
|
|
590
|
-
|
|
1187
|
+
* Called when no command is provided
|
|
1188
|
+
*/
|
|
591
1189
|
readonly root: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
592
1190
|
version: alepha0.TOptional<alepha0.TBoolean>;
|
|
593
1191
|
}>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
@@ -610,9 +1208,10 @@ declare class TypecheckCommand {
|
|
|
610
1208
|
protected readonly utils: AlephaCliUtils;
|
|
611
1209
|
protected readonly pm: PackageManagerUtils;
|
|
612
1210
|
protected readonly log: alepha_logger7.Logger;
|
|
1211
|
+
protected readonly scaffolder: ProjectScaffolder;
|
|
613
1212
|
/**
|
|
614
|
-
|
|
615
|
-
|
|
1213
|
+
* Run TypeScript type checking across the codebase with no emit.
|
|
1214
|
+
*/
|
|
616
1215
|
readonly typecheck: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
617
1216
|
}
|
|
618
1217
|
//#endregion
|
|
@@ -621,21 +1220,29 @@ declare class VerifyCommand {
|
|
|
621
1220
|
protected readonly utils: AlephaCliUtils;
|
|
622
1221
|
protected readonly pm: PackageManagerUtils;
|
|
623
1222
|
/**
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
1223
|
+
* Run a series of verification commands to ensure code quality and correctness.
|
|
1224
|
+
*
|
|
1225
|
+
* This command runs the following checks in order:
|
|
1226
|
+
* - Clean the project
|
|
1227
|
+
* - Format the code
|
|
1228
|
+
* - Lint the code
|
|
1229
|
+
* - Run tests (if Vitest is a dev dependency)
|
|
1230
|
+
* - Check database migrations (if a migrations directory exists)
|
|
1231
|
+
* - Type check the code
|
|
1232
|
+
* - Build the project
|
|
1233
|
+
* - Clean the project again
|
|
1234
|
+
*/
|
|
636
1235
|
readonly verify: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
637
1236
|
}
|
|
638
1237
|
//#endregion
|
|
1238
|
+
//#region ../../src/cli/atoms/appEntryOptions.d.ts
|
|
1239
|
+
declare const appEntryOptions: alepha0.Atom<alepha0.TObject<{
|
|
1240
|
+
server: alepha0.TOptional<alepha0.TString>;
|
|
1241
|
+
browser: alepha0.TOptional<alepha0.TString>;
|
|
1242
|
+
style: alepha0.TOptional<alepha0.TString>;
|
|
1243
|
+
}>, "alepha.cli.appEntry.options">;
|
|
1244
|
+
type AppEntryOptions = Static<typeof appEntryOptions.schema>;
|
|
1245
|
+
//#endregion
|
|
639
1246
|
//#region ../../src/cli/atoms/buildOptions.d.ts
|
|
640
1247
|
/**
|
|
641
1248
|
* Build options atom for CLI build command.
|
|
@@ -645,12 +1252,12 @@ declare class VerifyCommand {
|
|
|
645
1252
|
*/
|
|
646
1253
|
declare const buildOptions: alepha0.Atom<alepha0.TObject<{
|
|
647
1254
|
/**
|
|
648
|
-
|
|
649
|
-
|
|
1255
|
+
* Generate build stats report.
|
|
1256
|
+
*/
|
|
650
1257
|
stats: alepha0.TOptional<alepha0.TBoolean>;
|
|
651
1258
|
/**
|
|
652
|
-
|
|
653
|
-
|
|
1259
|
+
* Vercel deployment configuration.
|
|
1260
|
+
*/
|
|
654
1261
|
vercel: alepha0.TOptional<alepha0.TObject<{
|
|
655
1262
|
projectName: alepha0.TOptional<alepha0.TString>;
|
|
656
1263
|
orgId: alepha0.TOptional<alepha0.TString>;
|
|
@@ -663,36 +1270,36 @@ declare const buildOptions: alepha0.Atom<alepha0.TObject<{
|
|
|
663
1270
|
}>>;
|
|
664
1271
|
}>>;
|
|
665
1272
|
/**
|
|
666
|
-
|
|
667
|
-
|
|
1273
|
+
* Cloudflare Workers deployment configuration.
|
|
1274
|
+
*/
|
|
668
1275
|
cloudflare: alepha0.TOptional<alepha0.TObject<{
|
|
669
1276
|
config: alepha0.TOptional<alepha0.TRecord<string, alepha0.TAny>>;
|
|
670
1277
|
}>>;
|
|
671
1278
|
/**
|
|
672
|
-
|
|
673
|
-
|
|
1279
|
+
* Docker deployment configuration.
|
|
1280
|
+
*/
|
|
674
1281
|
docker: alepha0.TOptional<alepha0.TObject<{
|
|
675
1282
|
/**
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
1283
|
+
* Docker image name to use in the Dockerfile.
|
|
1284
|
+
* @default "node:24-alpine"
|
|
1285
|
+
*/
|
|
679
1286
|
image: alepha0.TOptional<alepha0.TString>;
|
|
680
1287
|
/**
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
1288
|
+
* Command to run in the Docker container.
|
|
1289
|
+
* @default "node"
|
|
1290
|
+
*/
|
|
684
1291
|
command: alepha0.TOptional<alepha0.TString>;
|
|
685
1292
|
}>>;
|
|
686
1293
|
/**
|
|
687
|
-
|
|
688
|
-
|
|
1294
|
+
* Sitemap generation configuration.
|
|
1295
|
+
*/
|
|
689
1296
|
sitemap: alepha0.TOptional<alepha0.TObject<{
|
|
690
1297
|
/**
|
|
691
|
-
|
|
692
|
-
|
|
1298
|
+
* Base URL for sitemap entries.
|
|
1299
|
+
*/
|
|
693
1300
|
hostname: alepha0.TString;
|
|
694
1301
|
}>>;
|
|
695
|
-
}>, "alepha.build.options">;
|
|
1302
|
+
}>, "alepha.cli.build.options">;
|
|
696
1303
|
/**
|
|
697
1304
|
* Type for build options.
|
|
698
1305
|
*/
|
|
@@ -700,26 +1307,27 @@ type BuildOptions = Static<typeof buildOptions.schema>;
|
|
|
700
1307
|
//#endregion
|
|
701
1308
|
//#region ../../src/cli/defineConfig.d.ts
|
|
702
1309
|
interface AlephaCliConfig {
|
|
1310
|
+
entry?: AppEntryOptions;
|
|
703
1311
|
/**
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
1312
|
+
* Add custom commands to the Alepha CLI.
|
|
1313
|
+
*
|
|
1314
|
+
* You can override 'deploy', 'build', 'dev', 'start' commands this way.
|
|
1315
|
+
* But you can also add your own commands and run them via `alepha <command>`.
|
|
1316
|
+
*/
|
|
709
1317
|
commands?: Record<string, CommandPrimitive>;
|
|
710
1318
|
/**
|
|
711
|
-
|
|
712
|
-
|
|
1319
|
+
* Register more services to the Alepha CLI (enhancements, commands, etc.).
|
|
1320
|
+
*/
|
|
713
1321
|
services?: Array<any>;
|
|
714
1322
|
/**
|
|
715
|
-
|
|
716
|
-
|
|
1323
|
+
* Configure Alepha build command.
|
|
1324
|
+
*/
|
|
717
1325
|
build?: BuildOptions;
|
|
718
1326
|
/**
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
1327
|
+
* Environment variables to set before running commands.
|
|
1328
|
+
*
|
|
1329
|
+
* Always use .env files by default, this is only for dynamic values.
|
|
1330
|
+
*/
|
|
723
1331
|
env?: Record<string, unknown>;
|
|
724
1332
|
}
|
|
725
1333
|
type AlephaCliConfigFn = (alepha: Alepha) => AlephaCliConfig;
|
|
@@ -736,5 +1344,5 @@ declare const defineAlephaConfig: (runConfig: AlephaCliConfig | AlephaCliConfigF
|
|
|
736
1344
|
//#region ../../src/cli/version.d.ts
|
|
737
1345
|
declare const version: any;
|
|
738
1346
|
//#endregion
|
|
739
|
-
export { AlephaCli, AlephaCliConfig, AlephaCliConfigFn, AlephaCliUtils, AlephaPackageBuilderCli, BuildCommand, ChangelogCommand, type ChangelogOptions, CleanCommand, Commit, DEFAULT_IGNORE, DbCommand, DeployCommand, DevCommand,
|
|
1347
|
+
export { AlephaCli, AlephaCliConfig, AlephaCliConfigFn, AlephaCliUtils, AlephaPackageBuilderCli, AppEntry, AppEntryProvider, BuildCommand, ChangelogCommand, type ChangelogOptions, CleanCommand, Commit, DEFAULT_IGNORE, DbCommand, DeployCommand, DevCommand, GitMessageParser, GitProvider, InitCommand, LintCommand, OpenApiCommand, RootCommand, TestCommand, TypecheckCommand, VerifyCommand, analyzeModules, changelogOptions, defineAlephaConfig, defineConfig, version };
|
|
740
1348
|
//# sourceMappingURL=index.d.ts.map
|