alepha 0.14.1 → 0.14.3
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 +3 -3
- package/dist/api/audits/index.browser.js +5 -5
- package/dist/api/audits/index.browser.js.map +1 -1
- package/dist/api/audits/index.d.ts +784 -784
- package/dist/api/audits/index.d.ts.map +1 -1
- package/dist/api/audits/index.js +13 -13
- package/dist/api/audits/index.js.map +1 -1
- package/dist/api/files/index.browser.js +5 -5
- package/dist/api/files/index.browser.js.map +1 -1
- package/dist/api/files/index.d.ts +57 -57
- package/dist/api/files/index.d.ts.map +1 -1
- package/dist/api/files/index.js +71 -71
- package/dist/api/files/index.js.map +1 -1
- package/dist/api/jobs/index.browser.js +5 -5
- package/dist/api/jobs/index.browser.js.map +1 -1
- package/dist/api/jobs/index.d.ts +165 -165
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/jobs/index.js +10 -10
- package/dist/api/jobs/index.js.map +1 -1
- package/dist/api/notifications/index.browser.js +10 -10
- package/dist/api/notifications/index.browser.js.map +1 -1
- package/dist/api/notifications/index.d.ts +583 -171
- package/dist/api/notifications/index.d.ts.map +1 -1
- package/dist/api/notifications/index.js +12 -12
- package/dist/api/notifications/index.js.map +1 -1
- package/dist/api/parameters/index.browser.js +163 -10
- package/dist/api/parameters/index.browser.js.map +1 -1
- package/dist/api/parameters/index.d.ts +281 -276
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/parameters/index.js +196 -91
- package/dist/api/parameters/index.js.map +1 -1
- package/dist/api/users/index.browser.js +19 -19
- package/dist/api/users/index.browser.js.map +1 -1
- package/dist/api/users/index.d.ts +778 -764
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +831 -596
- package/dist/api/users/index.js.map +1 -1
- package/dist/api/verifications/index.browser.js +6 -6
- package/dist/api/verifications/index.browser.js.map +1 -1
- package/dist/api/verifications/index.d.ts +125 -125
- package/dist/api/verifications/index.d.ts.map +1 -1
- package/dist/api/verifications/index.js +6 -6
- package/dist/api/verifications/index.js.map +1 -1
- package/dist/batch/index.js.map +1 -1
- package/dist/bin/index.d.ts +1 -2
- package/dist/bin/index.js +0 -1
- package/dist/bin/index.js.map +1 -1
- package/dist/cache/core/index.js.map +1 -1
- package/dist/cli/index.d.ts +249 -218
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +951 -821
- package/dist/cli/index.js.map +1 -1
- package/dist/command/index.d.ts +40 -0
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +97 -17
- package/dist/command/index.js.map +1 -1
- package/dist/core/index.browser.js +14 -18
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +29 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +21 -24
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +21 -24
- package/dist/core/index.native.js.map +1 -1
- package/dist/datetime/index.js.map +1 -1
- package/dist/fake/index.js +195 -168
- package/dist/fake/index.js.map +1 -1
- package/dist/file/index.d.ts +8 -0
- package/dist/file/index.d.ts.map +1 -1
- package/dist/file/index.js +3 -0
- package/dist/file/index.js.map +1 -1
- package/dist/lock/redis/index.js.map +1 -1
- package/dist/logger/index.js.map +1 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/orm/index.browser.js +26 -5
- package/dist/orm/index.browser.js.map +1 -1
- package/dist/orm/index.d.ts +146 -121
- package/dist/orm/index.d.ts.map +1 -1
- package/dist/orm/index.js +49 -24
- package/dist/orm/index.js.map +1 -1
- package/dist/redis/index.js.map +1 -1
- package/dist/retry/index.js.map +1 -1
- package/dist/router/index.js.map +1 -1
- package/dist/scheduler/index.d.ts +6 -6
- package/dist/scheduler/index.js.map +1 -1
- package/dist/security/index.d.ts +29 -29
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +1 -1
- package/dist/security/index.js.map +1 -1
- package/dist/server/auth/index.d.ts +171 -155
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +0 -1
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/cache/index.js.map +1 -1
- package/dist/server/compress/index.d.ts.map +1 -1
- package/dist/server/compress/index.js +2 -0
- package/dist/server/compress/index.js.map +1 -1
- package/dist/server/cookies/index.browser.js.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.map +1 -1
- package/dist/server/core/index.js +1 -1
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/health/index.d.ts +17 -17
- package/dist/server/helmet/index.js.map +1 -1
- package/dist/server/links/index.browser.js +22 -6
- package/dist/server/links/index.browser.js.map +1 -1
- package/dist/server/links/index.d.ts +46 -44
- package/dist/server/links/index.d.ts.map +1 -1
- package/dist/server/links/index.js +24 -41
- package/dist/server/links/index.js.map +1 -1
- package/dist/server/multipart/index.js.map +1 -1
- package/dist/server/rate-limit/index.js.map +1 -1
- package/dist/server/security/index.js.map +1 -1
- package/dist/server/swagger/index.d.ts +2 -1
- package/dist/server/swagger/index.d.ts.map +1 -1
- package/dist/server/swagger/index.js +8 -3
- package/dist/server/swagger/index.js.map +1 -1
- package/dist/thread/index.js.map +1 -1
- package/dist/topic/core/index.js.map +1 -1
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +12 -4
- package/dist/vite/index.js.map +1 -1
- package/dist/websocket/index.browser.js.map +1 -1
- package/dist/websocket/index.js.map +1 -1
- package/package.json +7 -7
- package/src/api/audits/controllers/{AuditController.ts → AdminAuditController.ts} +5 -6
- package/src/api/audits/entities/audits.ts +5 -5
- package/src/api/audits/index.browser.ts +1 -1
- package/src/api/audits/index.ts +3 -3
- package/src/api/audits/primitives/$audit.spec.ts +276 -0
- package/src/api/audits/services/AuditService.spec.ts +495 -0
- package/src/api/files/__tests__/$bucket.spec.ts +91 -0
- package/src/api/files/controllers/AdminFileStatsController.spec.ts +166 -0
- package/src/api/files/controllers/{StorageStatsController.ts → AdminFileStatsController.ts} +2 -2
- package/src/api/files/controllers/FileController.spec.ts +558 -0
- package/src/api/files/controllers/FileController.ts +4 -5
- package/src/api/files/entities/files.ts +5 -5
- package/src/api/files/index.browser.ts +1 -1
- package/src/api/files/index.ts +4 -4
- package/src/api/files/jobs/FileJobs.spec.ts +52 -0
- package/src/api/files/services/FileService.spec.ts +109 -0
- package/src/api/jobs/__tests__/JobController.spec.ts +343 -0
- package/src/api/jobs/controllers/{JobController.ts → AdminJobController.ts} +2 -2
- package/src/api/jobs/entities/jobExecutions.ts +5 -5
- package/src/api/jobs/index.ts +3 -3
- package/src/api/jobs/primitives/$job.spec.ts +476 -0
- package/src/api/notifications/controllers/{NotificationController.ts → AdminNotificationController.ts} +4 -5
- package/src/api/notifications/entities/notifications.ts +5 -5
- package/src/api/notifications/index.browser.ts +1 -1
- package/src/api/notifications/index.ts +4 -4
- package/src/api/parameters/controllers/{ConfigController.ts → AdminConfigController.ts} +46 -107
- package/src/api/parameters/entities/parameters.ts +7 -17
- package/src/api/parameters/index.ts +3 -3
- package/src/api/parameters/primitives/$config.spec.ts +356 -0
- package/src/api/parameters/schemas/activateConfigBodySchema.ts +12 -0
- package/src/api/parameters/schemas/checkScheduledResponseSchema.ts +8 -0
- package/src/api/parameters/schemas/configCurrentResponseSchema.ts +13 -0
- package/src/api/parameters/schemas/configHistoryResponseSchema.ts +9 -0
- package/src/api/parameters/schemas/configNameParamSchema.ts +10 -0
- package/src/api/parameters/schemas/configNamesResponseSchema.ts +8 -0
- package/src/api/parameters/schemas/configTreeNodeSchema.ts +13 -0
- package/src/api/parameters/schemas/configVersionParamSchema.ts +9 -0
- package/src/api/parameters/schemas/configVersionResponseSchema.ts +9 -0
- package/src/api/parameters/schemas/configsByStatusResponseSchema.ts +9 -0
- package/src/api/parameters/schemas/createConfigVersionBodySchema.ts +24 -0
- package/src/api/parameters/schemas/index.ts +15 -0
- package/src/api/parameters/schemas/parameterResponseSchema.ts +26 -0
- package/src/api/parameters/schemas/parameterStatusSchema.ts +13 -0
- package/src/api/parameters/schemas/rollbackConfigBodySchema.ts +15 -0
- package/src/api/parameters/schemas/statusParamSchema.ts +9 -0
- package/src/api/users/__tests__/EmailVerification.spec.ts +369 -0
- package/src/api/users/__tests__/PasswordReset.spec.ts +550 -0
- package/src/api/users/controllers/AdminIdentityController.spec.ts +365 -0
- package/src/api/users/controllers/{IdentityController.ts → AdminIdentityController.ts} +3 -4
- package/src/api/users/controllers/AdminSessionController.spec.ts +274 -0
- package/src/api/users/controllers/{SessionController.ts → AdminSessionController.ts} +3 -4
- package/src/api/users/controllers/AdminUserController.spec.ts +372 -0
- package/src/api/users/controllers/AdminUserController.ts +116 -0
- package/src/api/users/controllers/UserController.ts +4 -107
- package/src/api/users/controllers/UserRealmController.ts +3 -0
- package/src/api/users/entities/identities.ts +6 -6
- package/src/api/users/entities/sessions.ts +6 -6
- package/src/api/users/entities/users.ts +9 -9
- package/src/api/users/index.ts +13 -6
- package/src/api/users/primitives/$userRealm.ts +13 -8
- package/src/api/users/services/CredentialService.spec.ts +509 -0
- package/src/api/users/services/CredentialService.ts +46 -0
- package/src/api/users/services/IdentityService.ts +15 -0
- package/src/api/users/services/RegistrationService.spec.ts +630 -0
- package/src/api/users/services/RegistrationService.ts +18 -0
- package/src/api/users/services/SessionService.spec.ts +301 -0
- package/src/api/users/services/SessionService.ts +110 -1
- package/src/api/users/services/UserService.ts +67 -2
- package/src/api/verifications/__tests__/CodeVerification.spec.ts +318 -0
- package/src/api/verifications/__tests__/LinkVerification.spec.ts +279 -0
- package/src/api/verifications/entities/verifications.ts +6 -6
- package/src/api/verifications/jobs/VerificationJobs.spec.ts +50 -0
- package/src/batch/__tests__/startup-buffering.spec.ts +458 -0
- package/src/batch/primitives/$batch.spec.ts +766 -0
- package/src/batch/providers/BatchProvider.spec.ts +786 -0
- package/src/bin/index.ts +0 -1
- package/src/bucket/__tests__/shared.ts +194 -0
- package/src/bucket/primitives/$bucket.spec.ts +104 -0
- package/src/bucket/providers/FileStorageProvider.spec.ts +13 -0
- package/src/bucket/providers/LocalFileStorageProvider.spec.ts +77 -0
- package/src/bucket/providers/MemoryFileStorageProvider.spec.ts +82 -0
- package/src/cache/core/__tests__/shared.ts +377 -0
- package/src/cache/core/primitives/$cache.spec.ts +111 -0
- package/src/cache/redis/__tests__/cache-redis.spec.ts +70 -0
- package/src/cli/apps/AlephaCli.ts +54 -16
- package/src/cli/apps/AlephaPackageBuilderCli.ts +2 -1
- package/src/cli/assets/appRouterTs.ts +1 -1
- package/src/cli/commands/{ViteCommands.ts → build.ts} +2 -105
- package/src/cli/commands/clean.ts +14 -0
- package/src/cli/commands/{DrizzleCommands.ts → db.ts} +10 -117
- package/src/cli/commands/{DeployCommands.ts → deploy.ts} +1 -1
- package/src/cli/commands/dev.ts +69 -0
- package/src/cli/commands/format.ts +17 -0
- package/src/cli/commands/gen/changelog.spec.ts +315 -0
- package/src/cli/commands/{ChangelogCommands.ts → gen/changelog.ts} +16 -31
- package/src/cli/commands/gen/openapi.ts +71 -0
- package/src/cli/commands/gen.ts +18 -0
- package/src/cli/commands/{CoreCommands.ts → init.ts} +4 -40
- package/src/cli/commands/lint.ts +17 -0
- package/src/cli/commands/root.ts +41 -0
- package/src/cli/commands/run.ts +24 -0
- package/src/cli/commands/test.ts +42 -0
- package/src/cli/commands/typecheck.ts +24 -0
- package/src/cli/commands/{VerifyCommands.ts → verify.ts} +1 -13
- package/src/cli/defineConfig.ts +10 -1
- package/src/cli/index.ts +17 -7
- package/src/cli/services/AlephaCliUtils.ts +71 -32
- package/src/cli/services/GitMessageParser.ts +1 -1
- package/src/command/helpers/Asker.spec.ts +127 -0
- package/src/command/helpers/Runner.spec.ts +126 -0
- package/src/command/primitives/$command.spec.ts +1588 -0
- package/src/command/providers/CliProvider.ts +74 -24
- package/src/core/Alepha.ts +52 -4
- package/src/core/__tests__/Alepha-emit.spec.ts +22 -0
- package/src/core/__tests__/Alepha-graph.spec.ts +93 -0
- package/src/core/__tests__/Alepha-has.spec.ts +41 -0
- package/src/core/__tests__/Alepha-inject.spec.ts +93 -0
- package/src/core/__tests__/Alepha-register.spec.ts +81 -0
- package/src/core/__tests__/Alepha-start.spec.ts +176 -0
- package/src/core/__tests__/Alepha-with.spec.ts +14 -0
- package/src/core/__tests__/TypeBox-usecases.spec.ts +35 -0
- package/src/core/__tests__/TypeBoxLocale.spec.ts +15 -0
- package/src/core/__tests__/descriptor.spec.ts +34 -0
- package/src/core/__tests__/fixtures/A.ts +5 -0
- package/src/core/__tests__/pagination.spec.ts +77 -0
- package/src/core/helpers/jsonSchemaToTypeBox.ts +2 -2
- package/src/core/primitives/$atom.spec.ts +43 -0
- package/src/core/primitives/$hook.spec.ts +130 -0
- package/src/core/primitives/$inject.spec.ts +175 -0
- package/src/core/primitives/$module.spec.ts +115 -0
- package/src/core/providers/CodecManager.spec.ts +740 -0
- package/src/core/providers/EventManager.spec.ts +762 -0
- package/src/core/providers/EventManager.ts +4 -0
- package/src/core/providers/StateManager.spec.ts +365 -0
- package/src/core/providers/TypeProvider.spec.ts +1607 -0
- package/src/core/providers/TypeProvider.ts +20 -26
- package/src/datetime/primitives/$interval.spec.ts +103 -0
- package/src/datetime/providers/DateTimeProvider.spec.ts +86 -0
- package/src/email/primitives/$email.spec.ts +175 -0
- package/src/email/providers/LocalEmailProvider.spec.ts +341 -0
- package/src/fake/__tests__/keyName.example.ts +40 -0
- package/src/fake/__tests__/keyName.spec.ts +152 -0
- package/src/fake/__tests__/module.example.ts +32 -0
- package/src/fake/providers/FakeProvider.spec.ts +438 -0
- package/src/file/providers/FileSystemProvider.ts +8 -0
- package/src/file/providers/NodeFileSystemProvider.spec.ts +418 -0
- package/src/file/providers/NodeFileSystemProvider.ts +5 -0
- package/src/file/services/FileDetector.spec.ts +591 -0
- package/src/lock/core/__tests__/shared.ts +190 -0
- package/src/lock/core/providers/MemoryLockProvider.spec.ts +25 -0
- package/src/lock/redis/providers/RedisLockProvider.spec.ts +25 -0
- package/src/logger/__tests__/SimpleFormatterProvider.spec.ts +109 -0
- package/src/logger/primitives/$logger.spec.ts +108 -0
- package/src/logger/services/Logger.spec.ts +295 -0
- package/src/mcp/__tests__/errors.spec.ts +175 -0
- package/src/mcp/__tests__/integration.spec.ts +450 -0
- package/src/mcp/helpers/jsonrpc.spec.ts +380 -0
- package/src/mcp/primitives/$prompt.spec.ts +468 -0
- package/src/mcp/primitives/$resource.spec.ts +390 -0
- package/src/mcp/primitives/$tool.spec.ts +406 -0
- package/src/mcp/providers/McpServerProvider.spec.ts +797 -0
- package/src/orm/__tests__/$repository-crud.spec.ts +276 -0
- package/src/orm/__tests__/$repository-hooks.spec.ts +325 -0
- package/src/orm/__tests__/$repository-orderBy.spec.ts +128 -0
- package/src/orm/__tests__/$repository-pagination-sort.spec.ts +149 -0
- package/src/orm/__tests__/$repository-save.spec.ts +37 -0
- package/src/orm/__tests__/ModelBuilder-integration.spec.ts +490 -0
- package/src/orm/__tests__/ModelBuilder-types.spec.ts +186 -0
- package/src/orm/__tests__/PostgresProvider.spec.ts +46 -0
- package/src/orm/__tests__/delete-returning.spec.ts +256 -0
- package/src/orm/__tests__/deletedAt.spec.ts +80 -0
- package/src/orm/__tests__/enums.spec.ts +315 -0
- package/src/orm/__tests__/execute.spec.ts +72 -0
- package/src/orm/__tests__/fixtures/bigEntitySchema.ts +65 -0
- package/src/orm/__tests__/fixtures/userEntitySchema.ts +27 -0
- package/src/orm/__tests__/joins.spec.ts +1114 -0
- package/src/orm/__tests__/page.spec.ts +287 -0
- package/src/orm/__tests__/primaryKey.spec.ts +87 -0
- package/src/orm/__tests__/query-date-encoding.spec.ts +402 -0
- package/src/orm/__tests__/ref-auto-onDelete.spec.ts +156 -0
- package/src/orm/__tests__/references.spec.ts +102 -0
- package/src/orm/__tests__/security.spec.ts +710 -0
- package/src/orm/__tests__/sqlite.spec.ts +111 -0
- package/src/orm/__tests__/string-operators.spec.ts +429 -0
- package/src/orm/__tests__/timestamps.spec.ts +388 -0
- package/src/orm/__tests__/validation.spec.ts +183 -0
- package/src/orm/__tests__/version.spec.ts +64 -0
- package/src/orm/helpers/parseQueryString.spec.ts +196 -0
- package/src/orm/index.browser.ts +1 -1
- package/src/orm/index.ts +10 -6
- package/src/orm/primitives/$repository.spec.ts +137 -0
- package/src/orm/primitives/$sequence.spec.ts +29 -0
- package/src/orm/primitives/$transaction.spec.ts +82 -0
- package/src/orm/providers/{PostgresTypeProvider.ts → DatabaseTypeProvider.ts} +25 -3
- package/src/orm/providers/drivers/BunPostgresProvider.ts +3 -3
- package/src/orm/providers/drivers/BunSqliteProvider.ts +1 -1
- package/src/orm/providers/drivers/CloudflareD1Provider.ts +1 -1
- package/src/orm/providers/drivers/DatabaseProvider.ts +1 -1
- package/src/orm/providers/drivers/NodePostgresProvider.ts +3 -3
- package/src/orm/providers/drivers/NodeSqliteProvider.ts +1 -1
- package/src/orm/providers/drivers/PglitePostgresProvider.ts +2 -2
- package/src/orm/services/ModelBuilder.spec.ts +575 -0
- package/src/orm/services/Repository.spec.ts +137 -0
- package/src/queue/core/__tests__/shared.ts +143 -0
- package/src/queue/core/providers/MemoryQueueProvider.spec.ts +23 -0
- package/src/queue/core/providers/WorkerProvider.spec.ts +378 -0
- package/src/queue/redis/providers/RedisQueueProvider.spec.ts +23 -0
- package/src/redis/__tests__/redis.spec.ts +58 -0
- package/src/retry/primitives/$retry.spec.ts +234 -0
- package/src/retry/providers/RetryProvider.spec.ts +438 -0
- package/src/router/__tests__/match.spec.ts +252 -0
- package/src/router/providers/RouterProvider.spec.ts +197 -0
- package/src/scheduler/__tests__/$scheduler-cron.spec.ts +25 -0
- package/src/scheduler/__tests__/$scheduler-interval.spec.ts +25 -0
- package/src/scheduler/__tests__/shared.ts +77 -0
- package/src/security/__tests__/bug-1-wildcard-after-start.spec.ts +229 -0
- package/src/security/__tests__/bug-2-password-validation.spec.ts +245 -0
- package/src/security/__tests__/bug-3-regex-vulnerability.spec.ts +407 -0
- package/src/security/__tests__/bug-4-oauth2-validation.spec.ts +439 -0
- package/src/security/__tests__/multi-layer-permissions.spec.ts +522 -0
- package/src/security/primitives/$permission.spec.ts +30 -0
- package/src/security/primitives/$permission.ts +2 -2
- package/src/security/primitives/$realm.spec.ts +101 -0
- package/src/security/primitives/$role.spec.ts +52 -0
- package/src/security/primitives/$serviceAccount.spec.ts +61 -0
- package/src/security/providers/SecurityProvider.spec.ts +350 -0
- package/src/server/auth/providers/ServerAuthProvider.ts +0 -2
- package/src/server/cache/providers/ServerCacheProvider.spec.ts +942 -0
- package/src/server/compress/providers/ServerCompressProvider.spec.ts +31 -0
- package/src/server/compress/providers/ServerCompressProvider.ts +2 -0
- package/src/server/cookies/providers/ServerCookiesProvider.spec.ts +253 -0
- package/src/server/core/__tests__/ServerRouterProvider-getRoutes.spec.ts +334 -0
- package/src/server/core/__tests__/ServerRouterProvider-requestId.spec.ts +129 -0
- package/src/server/core/primitives/$action.spec.ts +191 -0
- package/src/server/core/primitives/$route.spec.ts +65 -0
- package/src/server/core/providers/ServerBodyParserProvider.spec.ts +93 -0
- package/src/server/core/providers/ServerLoggerProvider.spec.ts +100 -0
- package/src/server/core/providers/ServerProvider.ts +3 -1
- package/src/server/core/services/HttpClient.spec.ts +123 -0
- package/src/server/core/services/UserAgentParser.spec.ts +111 -0
- package/src/server/cors/providers/ServerCorsProvider.spec.ts +481 -0
- package/src/server/health/providers/ServerHealthProvider.spec.ts +22 -0
- package/src/server/helmet/providers/ServerHelmetProvider.spec.ts +105 -0
- package/src/server/links/__tests__/$action.spec.ts +238 -0
- package/src/server/links/__tests__/fixtures/CrudApp.ts +122 -0
- package/src/server/links/__tests__/requestId.spec.ts +120 -0
- package/src/server/links/primitives/$remote.spec.ts +228 -0
- package/src/server/links/providers/LinkProvider.spec.ts +54 -0
- package/src/server/links/providers/LinkProvider.ts +49 -3
- package/src/server/links/providers/ServerLinksProvider.ts +1 -53
- package/src/server/links/schemas/apiLinksResponseSchema.ts +7 -0
- package/src/server/metrics/providers/ServerMetricsProvider.spec.ts +25 -0
- package/src/server/multipart/providers/ServerMultipartProvider.spec.ts +528 -0
- package/src/server/proxy/primitives/$proxy.spec.ts +87 -0
- package/src/server/rate-limit/__tests__/ActionRateLimit.spec.ts +211 -0
- package/src/server/rate-limit/providers/ServerRateLimitProvider.spec.ts +344 -0
- package/src/server/security/__tests__/BasicAuth.spec.ts +684 -0
- package/src/server/security/__tests__/ServerSecurityProvider-realm.spec.ts +388 -0
- package/src/server/security/providers/ServerSecurityProvider.spec.ts +123 -0
- package/src/server/static/primitives/$serve.spec.ts +193 -0
- package/src/server/swagger/__tests__/ui.spec.ts +52 -0
- package/src/server/swagger/primitives/$swagger.spec.ts +193 -0
- package/src/server/swagger/providers/ServerSwaggerProvider.ts +18 -8
- package/src/sms/primitives/$sms.spec.ts +165 -0
- package/src/sms/providers/LocalSmsProvider.spec.ts +224 -0
- package/src/sms/providers/MemorySmsProvider.spec.ts +193 -0
- package/src/thread/primitives/$thread.spec.ts +186 -0
- package/src/topic/core/__tests__/shared.ts +144 -0
- package/src/topic/core/providers/MemoryTopicProvider.spec.ts +23 -0
- package/src/topic/redis/providers/RedisTopicProvider.spec.ts +23 -0
- package/src/vite/plugins/viteAlephaDev.ts +16 -4
- package/src/vite/tasks/runAlepha.ts +7 -1
- package/src/websocket/__tests__/$websocket-new.spec.ts +195 -0
- package/src/websocket/primitives/$channel.spec.ts +30 -0
- package/src/cli/commands/BiomeCommands.ts +0 -29
package/dist/cli/index.d.ts
CHANGED
|
@@ -3,7 +3,9 @@ import { Alepha, Static } from "alepha";
|
|
|
3
3
|
import { FileSystemProvider } from "alepha/file";
|
|
4
4
|
import * as alepha_command0 from "alepha/command";
|
|
5
5
|
import { CliProvider, CommandPrimitive, EnvUtils, RunnerMethod } from "alepha/command";
|
|
6
|
-
import * as
|
|
6
|
+
import * as alepha_logger7 from "alepha/logger";
|
|
7
|
+
import { ConsoleColorProvider } from "alepha/logger";
|
|
8
|
+
import * as typebox0 from "typebox";
|
|
7
9
|
import { DatabaseProvider } from "alepha/orm";
|
|
8
10
|
|
|
9
11
|
//#region ../../src/cli/apps/AlephaCli.d.ts
|
|
@@ -25,6 +27,33 @@ declare class AlephaPackageBuilderCli {
|
|
|
25
27
|
}
|
|
26
28
|
declare function analyzeModules(srcDir: string, packageName: string): Promise<Module[]>;
|
|
27
29
|
//#endregion
|
|
30
|
+
//#region ../../src/cli/atoms/changelogOptions.d.ts
|
|
31
|
+
/**
|
|
32
|
+
* Default scopes to ignore in changelog generation.
|
|
33
|
+
* Commits with these scopes won't appear in release notes.
|
|
34
|
+
*/
|
|
35
|
+
declare const DEFAULT_IGNORE: string[];
|
|
36
|
+
/**
|
|
37
|
+
* Changelog configuration atom.
|
|
38
|
+
*
|
|
39
|
+
* Configure in `alepha.config.ts`:
|
|
40
|
+
* ```ts
|
|
41
|
+
* import { changelogOptions } from "alepha/cli";
|
|
42
|
+
*
|
|
43
|
+
* alepha.set(changelogOptions, {
|
|
44
|
+
* ignore: ["project", "release", "chore", "docs"],
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
declare const changelogOptions: alepha0.Atom<alepha0.TObject<{
|
|
49
|
+
/**
|
|
50
|
+
* Scopes to ignore (e.g., "project", "release", "chore").
|
|
51
|
+
* Commits like `feat(chore): ...` will be excluded from changelog.
|
|
52
|
+
*/
|
|
53
|
+
ignore: alepha0.TOptional<alepha0.TArray<alepha0.TString>>;
|
|
54
|
+
}>, "alepha.changelog">;
|
|
55
|
+
type ChangelogOptions = Static<typeof changelogOptions.schema>;
|
|
56
|
+
//#endregion
|
|
28
57
|
//#region ../../src/cli/services/AlephaCliUtils.d.ts
|
|
29
58
|
/**
|
|
30
59
|
* Utility service for common project operations used by CLI commands.
|
|
@@ -37,9 +66,10 @@ declare function analyzeModules(srcDir: string, packageName: string): Promise<Mo
|
|
|
37
66
|
* - Alepha instance loading
|
|
38
67
|
*/
|
|
39
68
|
declare class AlephaCliUtils {
|
|
40
|
-
protected readonly log:
|
|
69
|
+
protected readonly log: alepha_logger7.Logger;
|
|
41
70
|
protected readonly fs: FileSystemProvider;
|
|
42
71
|
protected readonly envUtils: EnvUtils;
|
|
72
|
+
protected readonly alepha: Alepha;
|
|
43
73
|
/**
|
|
44
74
|
* Execute a command using npx with inherited stdio.
|
|
45
75
|
*
|
|
@@ -70,6 +100,12 @@ declare class AlephaCliUtils {
|
|
|
70
100
|
* ```
|
|
71
101
|
*/
|
|
72
102
|
writeConfigFile(name: string, content: string, root?: string): Promise<string>;
|
|
103
|
+
removeFiles(root: string, files: string[]): Promise<void>;
|
|
104
|
+
removeYarn(root: string): Promise<void>;
|
|
105
|
+
removePnpm(root: string): Promise<void>;
|
|
106
|
+
removeNpm(root: string): Promise<void>;
|
|
107
|
+
removeBun(root: string): Promise<void>;
|
|
108
|
+
removeAllPmFilesExcept(root: string, except: string): Promise<void>;
|
|
73
109
|
/**
|
|
74
110
|
* Ensure Yarn is configured in the project directory.
|
|
75
111
|
*
|
|
@@ -78,6 +114,7 @@ declare class AlephaCliUtils {
|
|
|
78
114
|
* @param root - The root directory of the project
|
|
79
115
|
*/
|
|
80
116
|
ensureYarn(root: string): Promise<void>;
|
|
117
|
+
ensureBun(root: string): Promise<void>;
|
|
81
118
|
ensurePnpm(root: string): Promise<void>;
|
|
82
119
|
ensureNpm(root: string): Promise<void>;
|
|
83
120
|
/**
|
|
@@ -218,6 +255,7 @@ declare class AlephaCliUtils {
|
|
|
218
255
|
* @returns True if expo is in dependencies or devDependencies
|
|
219
256
|
*/
|
|
220
257
|
hasExpo(root: string): Promise<boolean>;
|
|
258
|
+
getInstallCommand(root: string, packageName: string, dev?: boolean): Promise<string>;
|
|
221
259
|
/**
|
|
222
260
|
* Install a dependency if it's missing from the project.
|
|
223
261
|
*
|
|
@@ -235,40 +273,152 @@ interface DependencyModes {
|
|
|
235
273
|
expo?: boolean;
|
|
236
274
|
}
|
|
237
275
|
//#endregion
|
|
238
|
-
//#region ../../src/cli/commands/
|
|
239
|
-
declare class
|
|
240
|
-
protected readonly log:
|
|
276
|
+
//#region ../../src/cli/commands/build.d.ts
|
|
277
|
+
declare class BuildCommand {
|
|
278
|
+
protected readonly log: alepha_logger7.Logger;
|
|
241
279
|
protected readonly utils: AlephaCliUtils;
|
|
242
|
-
readonly
|
|
243
|
-
|
|
280
|
+
readonly build: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
281
|
+
stats: alepha0.TOptional<alepha0.TBoolean>;
|
|
282
|
+
vercel: alepha0.TOptional<alepha0.TBoolean>;
|
|
283
|
+
cloudflare: alepha0.TOptional<alepha0.TBoolean>;
|
|
284
|
+
docker: alepha0.TOptional<alepha0.TBoolean>;
|
|
285
|
+
sitemap: alepha0.TOptional<alepha0.TString>;
|
|
286
|
+
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
244
287
|
}
|
|
245
288
|
//#endregion
|
|
246
|
-
//#region ../../src/cli/
|
|
247
|
-
|
|
248
|
-
* Default scopes to ignore in changelog generation.
|
|
249
|
-
* Commits with these scopes won't appear in release notes.
|
|
250
|
-
*/
|
|
251
|
-
declare const DEFAULT_IGNORE: string[];
|
|
252
|
-
/**
|
|
253
|
-
* Changelog configuration atom.
|
|
254
|
-
*
|
|
255
|
-
* Configure in `alepha.config.ts`:
|
|
256
|
-
* ```ts
|
|
257
|
-
* import { changelogOptions } from "alepha/cli";
|
|
258
|
-
*
|
|
259
|
-
* alepha.set(changelogOptions, {
|
|
260
|
-
* ignore: ["project", "release", "chore", "docs"],
|
|
261
|
-
* });
|
|
262
|
-
* ```
|
|
263
|
-
*/
|
|
264
|
-
declare const changelogOptions: alepha0.Atom<alepha0.TObject<{
|
|
289
|
+
//#region ../../src/cli/commands/clean.d.ts
|
|
290
|
+
declare class CleanCommand {
|
|
265
291
|
/**
|
|
266
|
-
*
|
|
267
|
-
* Commits like `feat(chore): ...` will be excluded from changelog.
|
|
292
|
+
* Clean the project, removing the "dist" directory
|
|
268
293
|
*/
|
|
269
|
-
|
|
270
|
-
}
|
|
271
|
-
|
|
294
|
+
readonly clean: alepha_command0.CommandPrimitive<typebox0.TObject<typebox0.TProperties>, typebox0.TSchema, typebox0.TObject<typebox0.TProperties>>;
|
|
295
|
+
}
|
|
296
|
+
//#endregion
|
|
297
|
+
//#region ../../src/cli/commands/db.d.ts
|
|
298
|
+
declare class DbCommand {
|
|
299
|
+
protected readonly log: alepha_logger7.Logger;
|
|
300
|
+
protected readonly utils: AlephaCliUtils;
|
|
301
|
+
/**
|
|
302
|
+
* Check if database migrations are up to date.
|
|
303
|
+
*/
|
|
304
|
+
protected readonly check: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
305
|
+
provider: alepha0.TOptional<alepha0.TString>;
|
|
306
|
+
mode: alepha0.TOptional<alepha0.TString>;
|
|
307
|
+
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
308
|
+
/**
|
|
309
|
+
* Generate database migration files
|
|
310
|
+
*/
|
|
311
|
+
protected readonly generate: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
312
|
+
provider: alepha0.TOptional<alepha0.TString>;
|
|
313
|
+
mode: alepha0.TOptional<alepha0.TString>;
|
|
314
|
+
custom: alepha0.TOptional<alepha0.TString>;
|
|
315
|
+
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
316
|
+
/**
|
|
317
|
+
* Push database schema changes directly to the database
|
|
318
|
+
*/
|
|
319
|
+
protected readonly push: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
320
|
+
provider: alepha0.TOptional<alepha0.TString>;
|
|
321
|
+
mode: alepha0.TOptional<alepha0.TString>;
|
|
322
|
+
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
323
|
+
/**
|
|
324
|
+
* Apply pending database migrations
|
|
325
|
+
*/
|
|
326
|
+
protected readonly migrate: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
327
|
+
provider: alepha0.TOptional<alepha0.TString>;
|
|
328
|
+
mode: alepha0.TOptional<alepha0.TString>;
|
|
329
|
+
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
330
|
+
/**
|
|
331
|
+
* Launch Drizzle Studio database browser
|
|
332
|
+
*/
|
|
333
|
+
protected readonly studio: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
334
|
+
provider: alepha0.TOptional<alepha0.TString>;
|
|
335
|
+
mode: alepha0.TOptional<alepha0.TString>;
|
|
336
|
+
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
337
|
+
/**
|
|
338
|
+
* Parent command for database operations.
|
|
339
|
+
*/
|
|
340
|
+
readonly db: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
341
|
+
/**
|
|
342
|
+
* Run a drizzle-kit command for all database providers in an Alepha instance.
|
|
343
|
+
*/
|
|
344
|
+
runDrizzleKitCommand(options: {
|
|
345
|
+
root: string;
|
|
346
|
+
args?: string;
|
|
347
|
+
command: string;
|
|
348
|
+
commandFlags?: string;
|
|
349
|
+
provider?: string;
|
|
350
|
+
logMessage: (providerName: string, dialect: string) => string;
|
|
351
|
+
env?: string;
|
|
352
|
+
}): Promise<void>;
|
|
353
|
+
/**
|
|
354
|
+
* Prepare Drizzle configuration files for a database provider.
|
|
355
|
+
*/
|
|
356
|
+
prepareDrizzleConfig(options: {
|
|
357
|
+
kit: any;
|
|
358
|
+
provider: DatabaseProvider;
|
|
359
|
+
providerName: string;
|
|
360
|
+
providerUrl: string;
|
|
361
|
+
dialect: string;
|
|
362
|
+
entry: string;
|
|
363
|
+
rootDir: string;
|
|
364
|
+
}): Promise<string>;
|
|
365
|
+
}
|
|
366
|
+
//#endregion
|
|
367
|
+
//#region ../../src/cli/commands/deploy.d.ts
|
|
368
|
+
declare class DeployCommand {
|
|
369
|
+
protected readonly log: alepha_logger7.Logger;
|
|
370
|
+
protected readonly utils: AlephaCliUtils;
|
|
371
|
+
/**
|
|
372
|
+
* Deploy the project to a hosting platform (e.g., Vercel, Cloudflare, Surge)
|
|
373
|
+
*
|
|
374
|
+
* Deploy command can be overridden by creating a alepha.config.ts in the project root:
|
|
375
|
+
*
|
|
376
|
+
* ```ts
|
|
377
|
+
* import { defineConfig } from "alepha/cli";
|
|
378
|
+
*
|
|
379
|
+
* export default defineConfig({
|
|
380
|
+
* commands: {
|
|
381
|
+
* deploy: {
|
|
382
|
+
* handler: async ({ root, mode, flags }) => {
|
|
383
|
+
* // Custom deployment logic here
|
|
384
|
+
* },
|
|
385
|
+
* },
|
|
386
|
+
* },
|
|
387
|
+
* });
|
|
388
|
+
* ```
|
|
389
|
+
*/
|
|
390
|
+
readonly deploy: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
391
|
+
build: alepha0.TBoolean;
|
|
392
|
+
migrate: alepha0.TBoolean;
|
|
393
|
+
}>, alepha0.TSchema, alepha0.TObject<{
|
|
394
|
+
VERCEL_TOKEN: alepha0.TOptional<alepha0.TString>;
|
|
395
|
+
VERCEL_ORG_ID: alepha0.TOptional<alepha0.TString>;
|
|
396
|
+
VERCEL_PROJECT_ID: alepha0.TOptional<alepha0.TString>;
|
|
397
|
+
CLOUDFLARE_API_TOKEN: alepha0.TOptional<alepha0.TString>;
|
|
398
|
+
CLOUDFLARE_ACCOUNT_ID: alepha0.TOptional<alepha0.TString>;
|
|
399
|
+
}>>;
|
|
400
|
+
}
|
|
401
|
+
//#endregion
|
|
402
|
+
//#region ../../src/cli/commands/dev.d.ts
|
|
403
|
+
declare class DevCommand {
|
|
404
|
+
protected readonly log: alepha_logger7.Logger;
|
|
405
|
+
protected readonly utils: AlephaCliUtils;
|
|
406
|
+
protected readonly alepha: Alepha;
|
|
407
|
+
/**
|
|
408
|
+
* Will run the project in watch mode.
|
|
409
|
+
*
|
|
410
|
+
* - If an index.html file is found in the project root, it will run Vite in dev mode.
|
|
411
|
+
* - Otherwise, it will look for a server entry file and run it with tsx in watch mode.
|
|
412
|
+
*/
|
|
413
|
+
readonly dev: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
414
|
+
protected isFullstackProject(root: string): Promise<boolean>;
|
|
415
|
+
}
|
|
416
|
+
//#endregion
|
|
417
|
+
//#region ../../src/cli/commands/format.d.ts
|
|
418
|
+
declare class FormatCommand {
|
|
419
|
+
protected readonly utils: AlephaCliUtils;
|
|
420
|
+
readonly format: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
421
|
+
}
|
|
272
422
|
//#endregion
|
|
273
423
|
//#region ../../src/cli/services/GitMessageParser.d.ts
|
|
274
424
|
/**
|
|
@@ -286,7 +436,7 @@ type ChangelogOptions = Static<typeof changelogOptions.schema>;
|
|
|
286
436
|
* - `feat(cli): add command` → included
|
|
287
437
|
*/
|
|
288
438
|
declare class GitMessageParser {
|
|
289
|
-
protected readonly log:
|
|
439
|
+
protected readonly log: alepha_logger7.Logger;
|
|
290
440
|
/**
|
|
291
441
|
* Parse a git commit line into a structured Commit object.
|
|
292
442
|
*
|
|
@@ -301,7 +451,7 @@ declare class GitMessageParser {
|
|
|
301
451
|
parseCommit(line: string, config: ChangelogOptions): Commit | null;
|
|
302
452
|
}
|
|
303
453
|
//#endregion
|
|
304
|
-
//#region ../../src/cli/commands/
|
|
454
|
+
//#region ../../src/cli/commands/gen/changelog.d.ts
|
|
305
455
|
/**
|
|
306
456
|
* Git provider for executing git commands.
|
|
307
457
|
* Can be substituted in tests with a mock implementation.
|
|
@@ -319,19 +469,18 @@ interface Commit {
|
|
|
319
469
|
interface ChangelogEntry {
|
|
320
470
|
features: Commit[];
|
|
321
471
|
fixes: Commit[];
|
|
322
|
-
breaking: Commit[];
|
|
323
472
|
}
|
|
324
473
|
/**
|
|
325
474
|
* Changelog command for generating release notes from git commits.
|
|
326
475
|
*
|
|
327
476
|
* Usage:
|
|
328
|
-
* - `alepha changelog` - Show unreleased changes since latest tag to HEAD
|
|
329
|
-
* - `alepha changelog --from=1.0.0` - Show changes from version to HEAD
|
|
330
|
-
* - `alepha changelog --from=1.0.0 --to=1.1.0` - Show changes between two refs
|
|
331
|
-
* - `alepha changelog | tee -a CHANGELOG.md` - Append to file
|
|
477
|
+
* - `alepha gen changelog` - Show unreleased changes since latest tag to HEAD
|
|
478
|
+
* - `alepha gen changelog --from=1.0.0` - Show changes from version to HEAD
|
|
479
|
+
* - `alepha gen changelog --from=1.0.0 --to=1.1.0` - Show changes between two refs
|
|
480
|
+
* - `alepha gen changelog | tee -a CHANGELOG.md` - Append to file
|
|
332
481
|
*/
|
|
333
|
-
declare class
|
|
334
|
-
protected readonly log:
|
|
482
|
+
declare class ChangelogCommand {
|
|
483
|
+
protected readonly log: alepha_logger7.Logger;
|
|
335
484
|
protected readonly git: GitProvider;
|
|
336
485
|
protected readonly parser: GitMessageParser;
|
|
337
486
|
protected readonly config: Readonly<{
|
|
@@ -340,6 +489,7 @@ declare class ChangelogCommands {
|
|
|
340
489
|
/**
|
|
341
490
|
* Format a single commit line.
|
|
342
491
|
* Example: `- **cli**: add new command (\`abc1234\`)`
|
|
492
|
+
* Breaking changes are flagged: `- **cli**: add new command [BREAKING] (\`abc1234\`)`
|
|
343
493
|
*/
|
|
344
494
|
protected formatCommit(commit: Commit): string;
|
|
345
495
|
/**
|
|
@@ -358,7 +508,7 @@ declare class ChangelogCommands {
|
|
|
358
508
|
* Get the latest version tag.
|
|
359
509
|
*/
|
|
360
510
|
protected getLatestTag(git: (cmd: string) => Promise<string>): Promise<string | null>;
|
|
361
|
-
readonly
|
|
511
|
+
readonly command: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
362
512
|
/**
|
|
363
513
|
* Show changes from this ref (tag, commit, branch).
|
|
364
514
|
* Defaults to the latest version tag.
|
|
@@ -374,21 +524,19 @@ declare class ChangelogCommands {
|
|
|
374
524
|
}>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
375
525
|
}
|
|
376
526
|
//#endregion
|
|
377
|
-
//#region ../../src/cli/commands/
|
|
378
|
-
declare class
|
|
379
|
-
protected readonly log:
|
|
380
|
-
protected readonly cli: CliProvider;
|
|
527
|
+
//#region ../../src/cli/commands/gen/openapi.d.ts
|
|
528
|
+
declare class OpenApiCommand {
|
|
529
|
+
protected readonly log: alepha_logger7.Logger;
|
|
381
530
|
protected readonly utils: AlephaCliUtils;
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
readonly root: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
386
|
-
version: alepha0.TOptional<alepha0.TBoolean>;
|
|
531
|
+
protected readonly fs: FileSystemProvider;
|
|
532
|
+
readonly command: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
533
|
+
out: alepha0.TOptional<alepha0.TString>;
|
|
387
534
|
}>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
535
|
+
}
|
|
536
|
+
//#endregion
|
|
537
|
+
//#region ../../src/cli/commands/init.d.ts
|
|
538
|
+
declare class InitCommand {
|
|
539
|
+
protected readonly utils: AlephaCliUtils;
|
|
392
540
|
/**
|
|
393
541
|
* Ensure the project has the necessary Alepha configuration files.
|
|
394
542
|
* Add the correct dependencies to package.json and install them.
|
|
@@ -404,145 +552,56 @@ declare class CoreCommands {
|
|
|
404
552
|
}>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
405
553
|
}
|
|
406
554
|
//#endregion
|
|
407
|
-
//#region ../../src/cli/commands/
|
|
408
|
-
declare class
|
|
409
|
-
protected readonly log: alepha_logger5.Logger;
|
|
555
|
+
//#region ../../src/cli/commands/lint.d.ts
|
|
556
|
+
declare class LintCommand {
|
|
410
557
|
protected readonly utils: AlephaCliUtils;
|
|
558
|
+
readonly lint: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
559
|
+
}
|
|
560
|
+
//#endregion
|
|
561
|
+
//#region ../../src/cli/commands/root.d.ts
|
|
562
|
+
declare class RootCommand {
|
|
563
|
+
protected readonly log: alepha_logger7.Logger;
|
|
564
|
+
protected readonly cli: CliProvider;
|
|
565
|
+
protected readonly alepha: Alepha;
|
|
566
|
+
protected readonly color: ConsoleColorProvider;
|
|
411
567
|
/**
|
|
412
|
-
*
|
|
413
|
-
*
|
|
414
|
-
* Deploy command can be overridden by creating a alepha.config.ts in the project root:
|
|
415
|
-
*
|
|
416
|
-
* ```ts
|
|
417
|
-
* import { defineConfig } from "alepha/cli";
|
|
418
|
-
*
|
|
419
|
-
* export default defineConfig({
|
|
420
|
-
* commands: {
|
|
421
|
-
* deploy: {
|
|
422
|
-
* handler: async ({ root, mode, flags }) => {
|
|
423
|
-
* // Custom deployment logic here
|
|
424
|
-
* },
|
|
425
|
-
* },
|
|
426
|
-
* },
|
|
427
|
-
* });
|
|
428
|
-
* ```
|
|
568
|
+
* Called when no command is provided
|
|
429
569
|
*/
|
|
430
|
-
readonly
|
|
431
|
-
|
|
432
|
-
|
|
570
|
+
readonly root: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
571
|
+
version: alepha0.TOptional<alepha0.TBoolean>;
|
|
572
|
+
}>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
573
|
+
}
|
|
574
|
+
//#endregion
|
|
575
|
+
//#region ../../src/cli/commands/run.d.ts
|
|
576
|
+
declare class RunCommand {
|
|
577
|
+
protected readonly utils: AlephaCliUtils;
|
|
578
|
+
readonly run: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
579
|
+
watch: alepha0.TOptional<alepha0.TBoolean>;
|
|
580
|
+
}>, alepha0.TString, alepha0.TObject<alepha0.TProperties>>;
|
|
581
|
+
}
|
|
582
|
+
//#endregion
|
|
583
|
+
//#region ../../src/cli/commands/test.d.ts
|
|
584
|
+
declare class TestCommand {
|
|
585
|
+
protected readonly utils: AlephaCliUtils;
|
|
586
|
+
readonly test: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
587
|
+
config: alepha0.TOptional<alepha0.TString>;
|
|
433
588
|
}>, alepha0.TSchema, alepha0.TObject<{
|
|
434
|
-
|
|
435
|
-
VERCEL_ORG_ID: alepha0.TOptional<alepha0.TString>;
|
|
436
|
-
VERCEL_PROJECT_ID: alepha0.TOptional<alepha0.TString>;
|
|
437
|
-
CLOUDFLARE_API_TOKEN: alepha0.TOptional<alepha0.TString>;
|
|
438
|
-
CLOUDFLARE_ACCOUNT_ID: alepha0.TOptional<alepha0.TString>;
|
|
589
|
+
VITEST_ARGS: alepha0.TOptional<alepha0.TString>;
|
|
439
590
|
}>>;
|
|
440
591
|
}
|
|
441
592
|
//#endregion
|
|
442
|
-
//#region ../../src/cli/commands/
|
|
443
|
-
declare class
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
/**
|
|
447
|
-
* Check if database migrations are up to date.
|
|
448
|
-
*/
|
|
449
|
-
check: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
450
|
-
provider: alepha0.TOptional<alepha0.TString>;
|
|
451
|
-
mode: alepha0.TOptional<alepha0.TString>;
|
|
452
|
-
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
453
|
-
/**
|
|
454
|
-
* Generate database migration files
|
|
455
|
-
*
|
|
456
|
-
* - Loads the Alepha instance from the specified entry file.
|
|
457
|
-
* - Retrieves all repository primitives to gather database models.
|
|
458
|
-
* - Creates temporary entity definitions based on the current database schema.
|
|
459
|
-
* - Writes these definitions to a temporary schema file. (node_modules/.db/entities.ts)
|
|
460
|
-
* - Invokes Drizzle Kit's CLI to generate migration files based on the current schema.
|
|
461
|
-
*/
|
|
462
|
-
generate: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
463
|
-
provider: alepha0.TOptional<alepha0.TString>;
|
|
464
|
-
mode: alepha0.TOptional<alepha0.TString>;
|
|
465
|
-
custom: alepha0.TOptional<alepha0.TString>;
|
|
466
|
-
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
467
|
-
/**
|
|
468
|
-
* Push database schema changes directly to the database
|
|
469
|
-
*
|
|
470
|
-
* - Loads the Alepha instance from the specified entry file.
|
|
471
|
-
* - Retrieves all repository primitives to gather database models.
|
|
472
|
-
* - Creates temporary entity definitions and Drizzle config.
|
|
473
|
-
* - Invokes Drizzle Kit's push command to apply schema changes directly.
|
|
474
|
-
*/
|
|
475
|
-
push: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
476
|
-
provider: alepha0.TOptional<alepha0.TString>;
|
|
477
|
-
mode: alepha0.TOptional<alepha0.TString>;
|
|
478
|
-
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
479
|
-
/**
|
|
480
|
-
* Apply pending database migrations
|
|
481
|
-
*
|
|
482
|
-
* - Loads the Alepha instance from the specified entry file.
|
|
483
|
-
* - Retrieves all repository primitives to gather database models.
|
|
484
|
-
* - Creates temporary entity definitions and Drizzle config.
|
|
485
|
-
* - Invokes Drizzle Kit's migrate command to apply pending migrations.
|
|
486
|
-
*/
|
|
487
|
-
migrate: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
488
|
-
provider: alepha0.TOptional<alepha0.TString>;
|
|
489
|
-
mode: alepha0.TOptional<alepha0.TString>;
|
|
490
|
-
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
491
|
-
/**
|
|
492
|
-
* Launch Drizzle Studio database browser
|
|
493
|
-
*
|
|
494
|
-
* - Loads the Alepha instance from the specified entry file.
|
|
495
|
-
* - Retrieves all repository primitives to gather database models.
|
|
496
|
-
* - Creates temporary entity definitions and Drizzle config.
|
|
497
|
-
* - Invokes Drizzle Kit's studio command to launch the web-based database browser.
|
|
498
|
-
*/
|
|
499
|
-
studio: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
500
|
-
provider: alepha0.TOptional<alepha0.TString>;
|
|
501
|
-
mode: alepha0.TOptional<alepha0.TString>;
|
|
502
|
-
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
503
|
-
/**
|
|
504
|
-
* Parent command for database operations.
|
|
505
|
-
*/
|
|
506
|
-
db: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
507
|
-
/**
|
|
508
|
-
* Run a drizzle-kit command for all database providers in an Alepha instance.
|
|
509
|
-
*
|
|
510
|
-
* Iterates through all repository providers, prepares Drizzle config for each,
|
|
511
|
-
* and executes the specified drizzle-kit command.
|
|
512
|
-
*
|
|
513
|
-
* @param options - Configuration including command to run, flags, and logging
|
|
514
|
-
*/
|
|
515
|
-
runDrizzleKitCommand(options: {
|
|
516
|
-
root: string;
|
|
517
|
-
args?: string;
|
|
518
|
-
command: string;
|
|
519
|
-
commandFlags?: string;
|
|
520
|
-
provider?: string;
|
|
521
|
-
logMessage: (providerName: string, dialect: string) => string;
|
|
522
|
-
env?: string;
|
|
523
|
-
}): Promise<void>;
|
|
593
|
+
//#region ../../src/cli/commands/typecheck.d.ts
|
|
594
|
+
declare class TypecheckCommand {
|
|
595
|
+
protected readonly utils: AlephaCliUtils;
|
|
596
|
+
protected readonly log: alepha_logger7.Logger;
|
|
524
597
|
/**
|
|
525
|
-
*
|
|
526
|
-
*
|
|
527
|
-
* Creates temporary entities.js and drizzle.config.js files needed
|
|
528
|
-
* for Drizzle Kit commands to run properly.
|
|
529
|
-
*
|
|
530
|
-
* @param options - Configuration options including kit, provider info, and paths
|
|
531
|
-
* @returns Path to the generated drizzle.config.js file
|
|
598
|
+
* Run TypeScript type checking across the codebase with no emit.
|
|
532
599
|
*/
|
|
533
|
-
|
|
534
|
-
kit: any;
|
|
535
|
-
provider: DatabaseProvider;
|
|
536
|
-
providerName: string;
|
|
537
|
-
providerUrl: string;
|
|
538
|
-
dialect: string;
|
|
539
|
-
entry: string;
|
|
540
|
-
rootDir: string;
|
|
541
|
-
}): Promise<string>;
|
|
600
|
+
readonly typecheck: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
542
601
|
}
|
|
543
602
|
//#endregion
|
|
544
|
-
//#region ../../src/cli/commands/
|
|
545
|
-
declare class
|
|
603
|
+
//#region ../../src/cli/commands/verify.d.ts
|
|
604
|
+
declare class VerifyCommand {
|
|
546
605
|
protected readonly utils: AlephaCliUtils;
|
|
547
606
|
/**
|
|
548
607
|
* Run a series of verification commands to ensure code quality and correctness.
|
|
@@ -558,53 +617,25 @@ declare class VerifyCommands {
|
|
|
558
617
|
* - Clean the project again
|
|
559
618
|
*/
|
|
560
619
|
readonly verify: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
561
|
-
/**
|
|
562
|
-
* Run TypeScript type checking across the codebase with no emit.
|
|
563
|
-
*/
|
|
564
|
-
readonly typecheck: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
565
|
-
}
|
|
566
|
-
//#endregion
|
|
567
|
-
//#region ../../src/cli/commands/ViteCommands.d.ts
|
|
568
|
-
declare class ViteCommands {
|
|
569
|
-
protected readonly log: alepha_logger5.Logger;
|
|
570
|
-
protected readonly utils: AlephaCliUtils;
|
|
571
|
-
protected readonly env: {
|
|
572
|
-
VITEST_ARGS: string;
|
|
573
|
-
};
|
|
574
|
-
readonly run: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
575
|
-
watch: alepha0.TOptional<alepha0.TBoolean>;
|
|
576
|
-
}>, alepha0.TString, alepha0.TObject<alepha0.TProperties>>;
|
|
577
|
-
/**
|
|
578
|
-
* Will run the project in watch mode.
|
|
579
|
-
*
|
|
580
|
-
* - If an index.html file is found in the project root, it will run Vite in dev mode.
|
|
581
|
-
* - Otherwise, it will look for a server entry file and run it with tsx in watch mode.
|
|
582
|
-
*/
|
|
583
|
-
readonly dev: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
584
|
-
readonly build: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
585
|
-
stats: alepha0.TOptional<alepha0.TBoolean>;
|
|
586
|
-
vercel: alepha0.TOptional<alepha0.TBoolean>;
|
|
587
|
-
cloudflare: alepha0.TOptional<alepha0.TBoolean>;
|
|
588
|
-
docker: alepha0.TOptional<alepha0.TBoolean>;
|
|
589
|
-
sitemap: alepha0.TOptional<alepha0.TString>;
|
|
590
|
-
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
591
|
-
readonly test: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
592
|
-
config: alepha0.TOptional<alepha0.TString>;
|
|
593
|
-
}>, alepha0.TSchema, alepha0.TObject<{
|
|
594
|
-
VITEST_ARGS: alepha0.TOptional<alepha0.TString>;
|
|
595
|
-
}>>;
|
|
596
620
|
}
|
|
597
621
|
//#endregion
|
|
598
622
|
//#region ../../src/cli/defineConfig.d.ts
|
|
599
623
|
type AlephaCliConfig = (alepha: Alepha) => {
|
|
600
624
|
commands?: Record<string, CommandPrimitive>;
|
|
625
|
+
services?: Array<any>;
|
|
601
626
|
};
|
|
602
627
|
declare const defineConfig: (config: AlephaCliConfig) => (alepha: Alepha) => {
|
|
603
628
|
[x: string]: CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
604
629
|
};
|
|
630
|
+
/**
|
|
631
|
+
* @alias defineConfig
|
|
632
|
+
*/
|
|
633
|
+
declare const defineAlephaConfig: (config: AlephaCliConfig) => (alepha: Alepha) => {
|
|
634
|
+
[x: string]: CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
635
|
+
};
|
|
605
636
|
//#endregion
|
|
606
637
|
//#region ../../src/cli/version.d.ts
|
|
607
638
|
declare const version: any;
|
|
608
639
|
//#endregion
|
|
609
|
-
export { AlephaCli, AlephaCliConfig, AlephaCliUtils, AlephaPackageBuilderCli,
|
|
640
|
+
export { AlephaCli, AlephaCliConfig, AlephaCliUtils, AlephaPackageBuilderCli, BuildCommand, ChangelogCommand, type ChangelogOptions, CleanCommand, Commit, DEFAULT_IGNORE, DbCommand, DependencyModes, DeployCommand, DevCommand, FormatCommand, GitMessageParser, GitProvider, InitCommand, LintCommand, OpenApiCommand, RootCommand, RunCommand, TestCommand, TypecheckCommand, VerifyCommand, analyzeModules, changelogOptions, defineAlephaConfig, defineConfig, version };
|
|
610
641
|
//# sourceMappingURL=index.d.ts.map
|