alepha 0.14.3 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -5
- package/dist/api/audits/index.d.ts +620 -811
- package/dist/api/audits/index.d.ts.map +1 -1
- package/dist/api/files/index.d.ts +185 -377
- package/dist/api/files/index.d.ts.map +1 -1
- package/dist/api/files/index.js +0 -1
- package/dist/api/files/index.js.map +1 -1
- package/dist/api/jobs/index.d.ts +245 -435
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/notifications/index.d.ts +238 -429
- package/dist/api/notifications/index.d.ts.map +1 -1
- package/dist/api/parameters/index.d.ts +236 -427
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/users/index.browser.js +1 -2
- package/dist/api/users/index.browser.js.map +1 -1
- package/dist/api/users/index.d.ts +1010 -1196
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +178 -151
- package/dist/api/users/index.js.map +1 -1
- package/dist/api/verifications/index.d.ts +17 -17
- package/dist/api/verifications/index.d.ts.map +1 -1
- package/dist/batch/index.d.ts +122 -122
- package/dist/batch/index.d.ts.map +1 -1
- package/dist/batch/index.js +1 -2
- package/dist/batch/index.js.map +1 -1
- package/dist/bucket/index.d.ts +163 -163
- package/dist/bucket/index.d.ts.map +1 -1
- package/dist/cache/core/index.d.ts +46 -46
- package/dist/cache/core/index.d.ts.map +1 -1
- package/dist/cache/redis/index.d.ts.map +1 -1
- package/dist/cli/index.d.ts +384 -285
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +1113 -623
- package/dist/cli/index.js.map +1 -1
- package/dist/command/index.d.ts +299 -300
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +13 -9
- package/dist/command/index.js.map +1 -1
- package/dist/core/index.browser.js +445 -103
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +733 -625
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +446 -103
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +445 -103
- package/dist/core/index.native.js.map +1 -1
- package/dist/datetime/index.d.ts +44 -44
- package/dist/datetime/index.d.ts.map +1 -1
- package/dist/datetime/index.js +4 -4
- package/dist/datetime/index.js.map +1 -1
- package/dist/email/index.d.ts +97 -50
- package/dist/email/index.d.ts.map +1 -1
- package/dist/email/index.js +129 -33
- package/dist/email/index.js.map +1 -1
- package/dist/fake/index.d.ts +7981 -14
- package/dist/fake/index.d.ts.map +1 -1
- package/dist/file/index.d.ts +523 -390
- package/dist/file/index.d.ts.map +1 -1
- package/dist/file/index.js +253 -1
- package/dist/file/index.js.map +1 -1
- package/dist/lock/core/index.d.ts +208 -208
- package/dist/lock/core/index.d.ts.map +1 -1
- package/dist/lock/redis/index.d.ts.map +1 -1
- package/dist/logger/index.d.ts +25 -26
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/logger/index.js +12 -2
- package/dist/logger/index.js.map +1 -1
- package/dist/mcp/index.d.ts +197 -197
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/orm/chunk-DtkW-qnP.js +38 -0
- package/dist/orm/index.browser.js.map +1 -1
- package/dist/orm/index.bun.js +2814 -0
- package/dist/orm/index.bun.js.map +1 -0
- package/dist/orm/index.d.ts +1228 -1216
- package/dist/orm/index.d.ts.map +1 -1
- package/dist/orm/index.js +2041 -1967
- package/dist/orm/index.js.map +1 -1
- package/dist/queue/core/index.d.ts +248 -248
- package/dist/queue/core/index.d.ts.map +1 -1
- package/dist/queue/redis/index.d.ts.map +1 -1
- package/dist/redis/index.bun.js +285 -0
- package/dist/redis/index.bun.js.map +1 -0
- package/dist/redis/index.d.ts +118 -136
- package/dist/redis/index.d.ts.map +1 -1
- package/dist/redis/index.js +18 -38
- package/dist/redis/index.js.map +1 -1
- package/dist/retry/index.d.ts +69 -69
- package/dist/retry/index.d.ts.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 +25 -25
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/security/index.browser.js +5 -1
- package/dist/security/index.browser.js.map +1 -1
- package/dist/security/index.d.ts +417 -254
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +386 -86
- package/dist/security/index.js.map +1 -1
- package/dist/server/auth/index.d.ts +110 -110
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +20 -20
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/cache/index.d.ts +62 -47
- package/dist/server/cache/index.d.ts.map +1 -1
- package/dist/server/cache/index.js +56 -3
- package/dist/server/cache/index.js.map +1 -1
- package/dist/server/compress/index.d.ts +6 -0
- package/dist/server/compress/index.d.ts.map +1 -1
- package/dist/server/compress/index.js +36 -1
- package/dist/server/compress/index.js.map +1 -1
- package/dist/server/cookies/index.d.ts +6 -6
- package/dist/server/cookies/index.d.ts.map +1 -1
- package/dist/server/cookies/index.js +3 -3
- package/dist/server/cookies/index.js.map +1 -1
- package/dist/server/core/index.browser.js +2 -2
- package/dist/server/core/index.browser.js.map +1 -1
- package/dist/server/core/index.d.ts +242 -150
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/core/index.js +294 -125
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/cors/index.d.ts +11 -12
- package/dist/server/cors/index.d.ts.map +1 -1
- package/dist/server/health/index.d.ts +0 -1
- package/dist/server/health/index.d.ts.map +1 -1
- package/dist/server/helmet/index.d.ts +2 -2
- package/dist/server/helmet/index.d.ts.map +1 -1
- package/dist/server/links/index.browser.js.map +1 -1
- package/dist/server/links/index.d.ts +123 -124
- package/dist/server/links/index.d.ts.map +1 -1
- package/dist/server/links/index.js +1 -2
- package/dist/server/links/index.js.map +1 -1
- package/dist/server/metrics/index.d.ts.map +1 -1
- package/dist/server/multipart/index.d.ts +6 -6
- package/dist/server/multipart/index.d.ts.map +1 -1
- package/dist/server/proxy/index.d.ts +102 -103
- package/dist/server/proxy/index.d.ts.map +1 -1
- package/dist/server/rate-limit/index.d.ts +16 -16
- package/dist/server/rate-limit/index.d.ts.map +1 -1
- package/dist/server/static/index.d.ts +44 -44
- package/dist/server/static/index.d.ts.map +1 -1
- package/dist/server/static/index.js +4 -0
- package/dist/server/static/index.js.map +1 -1
- package/dist/server/swagger/index.d.ts +48 -49
- package/dist/server/swagger/index.d.ts.map +1 -1
- package/dist/server/swagger/index.js +3 -5
- package/dist/server/swagger/index.js.map +1 -1
- package/dist/sms/index.d.ts +13 -11
- package/dist/sms/index.d.ts.map +1 -1
- package/dist/sms/index.js +7 -7
- package/dist/sms/index.js.map +1 -1
- package/dist/thread/index.d.ts +71 -72
- package/dist/thread/index.d.ts.map +1 -1
- package/dist/topic/core/index.d.ts +318 -318
- package/dist/topic/core/index.d.ts.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 +5805 -249
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +599 -513
- package/dist/vite/index.js.map +1 -1
- package/dist/websocket/index.browser.js +6 -6
- package/dist/websocket/index.browser.js.map +1 -1
- package/dist/websocket/index.d.ts +247 -247
- package/dist/websocket/index.d.ts.map +1 -1
- package/dist/websocket/index.js +6 -6
- package/dist/websocket/index.js.map +1 -1
- package/package.json +9 -14
- package/src/api/files/controllers/AdminFileStatsController.ts +0 -1
- package/src/api/users/atoms/realmAuthSettingsAtom.ts +5 -0
- package/src/api/users/controllers/{UserRealmController.ts → RealmController.ts} +11 -11
- package/src/api/users/entities/users.ts +1 -1
- package/src/api/users/index.ts +8 -8
- package/src/api/users/primitives/{$userRealm.ts → $realm.ts} +17 -19
- package/src/api/users/providers/{UserRealmProvider.ts → RealmProvider.ts} +26 -30
- package/src/api/users/schemas/{userRealmConfigSchema.ts → realmConfigSchema.ts} +2 -2
- package/src/api/users/services/CredentialService.ts +7 -7
- package/src/api/users/services/IdentityService.ts +4 -4
- package/src/api/users/services/RegistrationService.spec.ts +25 -27
- package/src/api/users/services/RegistrationService.ts +38 -27
- package/src/api/users/services/SessionCrudService.ts +3 -3
- package/src/api/users/services/SessionService.spec.ts +3 -3
- package/src/api/users/services/SessionService.ts +28 -9
- package/src/api/users/services/UserService.ts +7 -7
- package/src/batch/providers/BatchProvider.ts +1 -2
- package/src/cli/apps/AlephaCli.ts +0 -2
- package/src/cli/apps/AlephaPackageBuilderCli.ts +38 -19
- package/src/cli/assets/apiHelloControllerTs.ts +18 -0
- package/src/cli/assets/apiIndexTs.ts +16 -0
- package/src/cli/assets/claudeMd.ts +303 -0
- package/src/cli/assets/mainBrowserTs.ts +2 -2
- package/src/cli/assets/mainServerTs.ts +24 -0
- package/src/cli/assets/webAppRouterTs.ts +15 -0
- package/src/cli/assets/webHelloComponentTsx.ts +16 -0
- package/src/cli/assets/webIndexTs.ts +16 -0
- package/src/cli/atoms/buildOptions.ts +88 -0
- package/src/cli/commands/build.ts +70 -87
- package/src/cli/commands/db.ts +21 -22
- package/src/cli/commands/deploy.ts +17 -5
- package/src/cli/commands/dev.ts +22 -14
- package/src/cli/commands/format.ts +8 -2
- package/src/cli/commands/gen/env.ts +53 -0
- package/src/cli/commands/gen/openapi.ts +1 -1
- package/src/cli/commands/gen/resource.ts +15 -0
- package/src/cli/commands/gen.ts +7 -1
- package/src/cli/commands/init.ts +74 -30
- package/src/cli/commands/lint.ts +8 -2
- package/src/cli/commands/test.ts +8 -3
- package/src/cli/commands/typecheck.ts +5 -1
- package/src/cli/commands/verify.ts +5 -3
- package/src/cli/defineConfig.ts +49 -7
- package/src/cli/index.ts +0 -1
- package/src/cli/services/AlephaCliUtils.ts +39 -589
- package/src/cli/services/PackageManagerUtils.ts +301 -0
- package/src/cli/services/ProjectScaffolder.ts +306 -0
- package/src/command/helpers/Runner.spec.ts +2 -2
- package/src/command/helpers/Runner.ts +16 -4
- package/src/command/primitives/$command.ts +0 -6
- package/src/command/providers/CliProvider.ts +1 -3
- package/src/core/Alepha.ts +42 -0
- package/src/core/__tests__/Alepha-graph.spec.ts +4 -0
- package/src/core/index.shared.ts +1 -0
- package/src/core/index.ts +2 -0
- package/src/core/primitives/$hook.ts +6 -2
- package/src/core/primitives/$module.spec.ts +4 -0
- package/src/core/providers/AlsProvider.ts +1 -1
- package/src/core/providers/CodecManager.spec.ts +12 -6
- package/src/core/providers/CodecManager.ts +26 -6
- package/src/core/providers/EventManager.ts +169 -13
- package/src/core/providers/KeylessJsonSchemaCodec.spec.ts +621 -0
- package/src/core/providers/KeylessJsonSchemaCodec.ts +407 -0
- package/src/core/providers/StateManager.spec.ts +27 -16
- package/src/email/providers/LocalEmailProvider.spec.ts +111 -87
- package/src/email/providers/LocalEmailProvider.ts +52 -15
- package/src/email/providers/NodemailerEmailProvider.ts +167 -56
- package/src/file/errors/FileError.ts +7 -0
- package/src/file/index.ts +9 -1
- package/src/file/providers/MemoryFileSystemProvider.ts +393 -0
- package/src/logger/index.ts +15 -3
- package/src/mcp/transports/StdioMcpTransport.ts +1 -1
- package/src/orm/index.browser.ts +1 -19
- package/src/orm/index.bun.ts +77 -0
- package/src/orm/index.shared-server.ts +22 -0
- package/src/orm/index.shared.ts +15 -0
- package/src/orm/index.ts +13 -39
- package/src/orm/providers/drivers/BunPostgresProvider.ts +3 -5
- package/src/orm/providers/drivers/BunSqliteProvider.ts +1 -1
- package/src/orm/providers/drivers/CloudflareD1Provider.ts +4 -0
- package/src/orm/providers/drivers/DatabaseProvider.ts +4 -0
- package/src/orm/providers/drivers/PglitePostgresProvider.ts +4 -0
- package/src/orm/services/Repository.ts +8 -0
- package/src/queue/core/providers/WorkerProvider.spec.ts +48 -32
- package/src/redis/index.bun.ts +35 -0
- package/src/redis/providers/BunRedisProvider.ts +12 -43
- package/src/redis/providers/BunRedisSubscriberProvider.ts +2 -3
- package/src/redis/providers/NodeRedisProvider.ts +16 -34
- package/src/{server/security → security}/__tests__/BasicAuth.spec.ts +11 -11
- package/src/{server/security → security}/__tests__/ServerSecurityProvider-realm.spec.ts +21 -16
- package/src/{server/security/providers → security/__tests__}/ServerSecurityProvider.spec.ts +5 -5
- package/src/security/index.browser.ts +5 -0
- package/src/security/index.ts +90 -7
- package/src/security/primitives/{$realm.spec.ts → $issuer.spec.ts} +11 -11
- package/src/security/primitives/{$realm.ts → $issuer.ts} +20 -17
- package/src/security/primitives/$role.ts +5 -5
- package/src/security/primitives/$serviceAccount.spec.ts +5 -5
- package/src/security/primitives/$serviceAccount.ts +3 -3
- package/src/{server/security → security}/providers/ServerSecurityProvider.ts +5 -7
- package/src/server/auth/primitives/$auth.ts +10 -10
- package/src/server/auth/primitives/$authCredentials.ts +3 -3
- package/src/server/auth/primitives/$authGithub.ts +3 -3
- package/src/server/auth/primitives/$authGoogle.ts +3 -3
- package/src/server/auth/providers/ServerAuthProvider.ts +13 -13
- package/src/server/cache/providers/ServerCacheProvider.spec.ts +183 -0
- package/src/server/cache/providers/ServerCacheProvider.ts +95 -10
- package/src/server/compress/providers/ServerCompressProvider.ts +61 -2
- package/src/server/cookies/providers/ServerCookiesProvider.ts +3 -3
- package/src/server/core/helpers/ServerReply.ts +2 -2
- package/src/server/core/providers/NodeHttpServerProvider.ts +25 -6
- package/src/server/core/providers/ServerBodyParserProvider.ts +19 -23
- package/src/server/core/providers/ServerLoggerProvider.ts +23 -19
- package/src/server/core/providers/ServerProvider.ts +155 -22
- package/src/server/core/providers/ServerRouterProvider.ts +259 -115
- package/src/server/core/providers/ServerTimingProvider.ts +2 -2
- package/src/server/links/index.ts +1 -1
- package/src/server/links/providers/LinkProvider.ts +1 -1
- package/src/server/static/providers/ServerStaticProvider.ts +10 -0
- package/src/server/swagger/index.ts +1 -1
- package/src/server/swagger/providers/ServerSwaggerProvider.ts +5 -8
- package/src/sms/providers/LocalSmsProvider.spec.ts +153 -111
- package/src/sms/providers/LocalSmsProvider.ts +8 -7
- package/src/vite/helpers/boot.ts +28 -17
- package/src/vite/helpers/importViteReact.ts +13 -0
- package/src/vite/index.ts +1 -21
- package/src/vite/plugins/viteAlephaDev.ts +16 -1
- package/src/vite/plugins/viteAlephaSsrPreload.ts +222 -0
- package/src/vite/tasks/buildClient.ts +11 -0
- package/src/vite/tasks/buildServer.ts +59 -4
- package/src/vite/tasks/devServer.ts +71 -0
- package/src/vite/tasks/generateCloudflare.ts +7 -0
- package/src/vite/tasks/index.ts +2 -1
- package/dist/server/security/index.browser.js +0 -13
- package/dist/server/security/index.browser.js.map +0 -1
- package/dist/server/security/index.d.ts +0 -173
- package/dist/server/security/index.d.ts.map +0 -1
- package/dist/server/security/index.js +0 -311
- package/dist/server/security/index.js.map +0 -1
- package/src/cli/assets/appRouterTs.ts +0 -9
- package/src/cli/assets/mainTs.ts +0 -13
- package/src/cli/assets/viteConfigTs.ts +0 -14
- package/src/cli/commands/run.ts +0 -24
- package/src/server/security/index.browser.ts +0 -10
- package/src/server/security/index.ts +0 -94
- package/src/vite/plugins/viteAlepha.ts +0 -37
- package/src/vite/plugins/viteAlephaBuild.ts +0 -281
- /package/src/{server/security → security}/primitives/$basicAuth.ts +0 -0
- /package/src/{server/security → security}/providers/ServerBasicAuthProvider.ts +0 -0
package/dist/cli/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ interface Module {
|
|
|
17
17
|
dependencies: string[];
|
|
18
18
|
native?: boolean;
|
|
19
19
|
browser?: boolean;
|
|
20
|
+
bun?: boolean;
|
|
20
21
|
node?: boolean;
|
|
21
22
|
}
|
|
22
23
|
declare class AlephaPackageBuilderCli {
|
|
@@ -47,300 +48,305 @@ declare const DEFAULT_IGNORE: string[];
|
|
|
47
48
|
*/
|
|
48
49
|
declare const changelogOptions: alepha0.Atom<alepha0.TObject<{
|
|
49
50
|
/**
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
* Scopes to ignore (e.g., "project", "release", "chore").
|
|
52
|
+
* Commits like `feat(chore): ...` will be excluded from changelog.
|
|
53
|
+
*/
|
|
53
54
|
ignore: alepha0.TOptional<alepha0.TArray<alepha0.TString>>;
|
|
54
55
|
}>, "alepha.changelog">;
|
|
55
56
|
type ChangelogOptions = Static<typeof changelogOptions.schema>;
|
|
56
57
|
//#endregion
|
|
57
58
|
//#region ../../src/cli/services/AlephaCliUtils.d.ts
|
|
58
59
|
/**
|
|
59
|
-
*
|
|
60
|
+
* Core utility service for CLI commands.
|
|
60
61
|
*
|
|
61
|
-
*
|
|
62
|
-
* -
|
|
63
|
-
* -
|
|
64
|
-
* -
|
|
65
|
-
* -
|
|
66
|
-
* - Alepha instance loading
|
|
62
|
+
* Provides:
|
|
63
|
+
* - Command execution
|
|
64
|
+
* - File editing helpers
|
|
65
|
+
* - Drizzle/ORM utilities
|
|
66
|
+
* - Environment loading
|
|
67
67
|
*/
|
|
68
68
|
declare class AlephaCliUtils {
|
|
69
69
|
protected readonly log: alepha_logger7.Logger;
|
|
70
70
|
protected readonly fs: FileSystemProvider;
|
|
71
71
|
protected readonly envUtils: EnvUtils;
|
|
72
|
-
protected readonly alepha: Alepha;
|
|
73
72
|
/**
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
* @example
|
|
77
|
-
* ```ts
|
|
78
|
-
* const runner = alepha.inject(ProcessRunner);
|
|
79
|
-
* await runner.exec("tsx watch src/index.ts");
|
|
80
|
-
* ```
|
|
81
|
-
*/
|
|
73
|
+
* Execute a command with inherited stdio.
|
|
74
|
+
*/
|
|
82
75
|
exec(command: string, options?: {
|
|
76
|
+
root?: string;
|
|
83
77
|
env?: Record<string, string>;
|
|
84
78
|
global?: boolean;
|
|
85
79
|
}): Promise<void>;
|
|
86
80
|
/**
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
* Creates the .alepha directory if it doesn't exist and writes the file with the given content.
|
|
90
|
-
*
|
|
91
|
-
* @param name - The name of the config file to create
|
|
92
|
-
* @param content - The content to write to the file
|
|
93
|
-
* @param root - The root directory (defaults to process.cwd())
|
|
94
|
-
* @returns The absolute path to the created file
|
|
95
|
-
*
|
|
96
|
-
* @example
|
|
97
|
-
* ```ts
|
|
98
|
-
* const runner = alepha.inject(ProcessRunner);
|
|
99
|
-
* const configPath = await runner.writeConfigFile("biome.json", biomeConfig);
|
|
100
|
-
* ```
|
|
101
|
-
*/
|
|
81
|
+
* Write a configuration file to node_modules/.alepha directory.
|
|
82
|
+
*/
|
|
102
83
|
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>;
|
|
109
|
-
/**
|
|
110
|
-
* Ensure Yarn is configured in the project directory.
|
|
111
|
-
*
|
|
112
|
-
* Creates a .yarnrc.yml file with node-modules linker if it doesn't exist.
|
|
113
|
-
*
|
|
114
|
-
* @param root - The root directory of the project
|
|
115
|
-
*/
|
|
116
|
-
ensureYarn(root: string): Promise<void>;
|
|
117
|
-
ensureBun(root: string): Promise<void>;
|
|
118
|
-
ensurePnpm(root: string): Promise<void>;
|
|
119
|
-
ensureNpm(root: string): Promise<void>;
|
|
120
|
-
/**
|
|
121
|
-
* Generate package.json content with Alepha dependencies.
|
|
122
|
-
*
|
|
123
|
-
* @param modes - Configuration for which dependencies to include
|
|
124
|
-
* @returns Package.json partial with dependencies, devDependencies, and scripts
|
|
125
|
-
*/
|
|
126
|
-
generatePackageJsonContent(modes: DependencyModes): {
|
|
127
|
-
dependencies: Record<string, string>;
|
|
128
|
-
devDependencies: Record<string, string>;
|
|
129
|
-
scripts: Record<string, string>;
|
|
130
|
-
type: "module";
|
|
131
|
-
};
|
|
132
|
-
/**
|
|
133
|
-
* Ensure package.json exists and has correct configuration.
|
|
134
|
-
*
|
|
135
|
-
* Creates a new package.json if none exists, or updates an existing one to:
|
|
136
|
-
* - Set "type": "module"
|
|
137
|
-
* - Add Alepha dependencies
|
|
138
|
-
* - Add standard scripts
|
|
139
|
-
*
|
|
140
|
-
* @param root - The root directory of the project
|
|
141
|
-
* @param modes - Configuration for which dependencies to include
|
|
142
|
-
*/
|
|
143
|
-
ensurePackageJson(root: string, modes: DependencyModes): Promise<object>;
|
|
144
|
-
ensureConfig(root: string, opts: {
|
|
145
|
-
packageJson?: boolean | DependencyModes;
|
|
146
|
-
tsconfigJson?: boolean;
|
|
147
|
-
viteConfigTs?: boolean;
|
|
148
|
-
indexHtml?: boolean;
|
|
149
|
-
biomeJson?: boolean;
|
|
150
|
-
editorconfig?: boolean;
|
|
151
|
-
}): Promise<Array<void | object>>;
|
|
152
|
-
/**
|
|
153
|
-
* Ensure tsconfig.json exists in the project.
|
|
154
|
-
*
|
|
155
|
-
* Creates a standard Alepha tsconfig.json if none exists.
|
|
156
|
-
*
|
|
157
|
-
* @param root - The root directory of the project
|
|
158
|
-
*/
|
|
159
|
-
ensureTsConfig(root: string): Promise<void>;
|
|
160
|
-
/**
|
|
161
|
-
* Ensure vite.config.ts exists in the project.
|
|
162
|
-
*
|
|
163
|
-
* Creates a standard Alepha vite.config.ts if none exists.
|
|
164
|
-
*/
|
|
165
|
-
ensureViteConfig(root: string, serverEntry?: string): Promise<void>;
|
|
166
|
-
protected checkFileExists(root: string, name: string, checkParentDirectories?: boolean): Promise<string | undefined>;
|
|
167
|
-
protected ensureFileExists(root: string, name: string, content: string, checkParentDirectories?: boolean): Promise<void>;
|
|
168
|
-
/**
|
|
169
|
-
* Get the path to Biome configuration file.
|
|
170
|
-
*
|
|
171
|
-
* Looks for an existing biome.json in the project root, or creates one if it doesn't exist.
|
|
172
|
-
*/
|
|
173
|
-
ensureBiomeConfig(root: string): Promise<void>;
|
|
174
|
-
/**
|
|
175
|
-
* Ensure .editorconfig exists in the project.
|
|
176
|
-
*
|
|
177
|
-
* Creates a standard .editorconfig if none exists.
|
|
178
|
-
*
|
|
179
|
-
* @param root - The root directory of the project
|
|
180
|
-
*/
|
|
181
|
-
ensureEditorConfig(root: string): Promise<void>;
|
|
182
84
|
/**
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
* Dynamically imports the server entry file and extracts the Alepha instance.
|
|
186
|
-
* Skips the automatic start process.
|
|
187
|
-
*
|
|
188
|
-
* @param rootDir - The root directory of the project
|
|
189
|
-
* @param explicitEntry - Optional explicit path to the entry file
|
|
190
|
-
* @returns Object containing the Alepha instance and the entry file path
|
|
191
|
-
* @throws {AlephaError} If the Alepha instance cannot be found
|
|
192
|
-
*/
|
|
85
|
+
* Load Alepha instance from a server entry file.
|
|
86
|
+
*/
|
|
193
87
|
loadAlephaFromServerEntryFile(rootDir?: string, explicitEntry?: string): Promise<{
|
|
194
88
|
alepha: Alepha;
|
|
195
89
|
entry: string;
|
|
196
90
|
}>;
|
|
197
91
|
/**
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
* Creates a temporary entities.js file that imports from the entry file
|
|
201
|
-
* and exports database models for Drizzle Kit to process.
|
|
202
|
-
*
|
|
203
|
-
* @param entry - Path to the server entry file
|
|
204
|
-
* @param provider - Name of the database provider
|
|
205
|
-
* @param models - Array of model names to export
|
|
206
|
-
* @returns JavaScript code as a string
|
|
207
|
-
*/
|
|
92
|
+
* Generate JavaScript code for Drizzle entities export.
|
|
93
|
+
*/
|
|
208
94
|
generateEntitiesJs(entry: string, provider: string, models?: string[]): string;
|
|
209
95
|
/**
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
* Reads the .env file in the specified root directory and sets
|
|
213
|
-
* the environment variables in process.env.
|
|
214
|
-
*/
|
|
96
|
+
* Load environment variables from a .env file.
|
|
97
|
+
*/
|
|
215
98
|
loadEnv(root: string, files?: string[]): Promise<void>;
|
|
99
|
+
exists(root: string, path: string): Promise<boolean>;
|
|
100
|
+
protected checkFileExists(root: string, name: string): Promise<string | undefined>;
|
|
101
|
+
}
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region ../../src/cli/services/PackageManagerUtils.d.ts
|
|
104
|
+
/**
|
|
105
|
+
* Utility service for package manager operations.
|
|
106
|
+
*
|
|
107
|
+
* Handles detection, installation, and cleanup for:
|
|
108
|
+
* - Yarn
|
|
109
|
+
* - npm
|
|
110
|
+
* - pnpm
|
|
111
|
+
* - Bun
|
|
112
|
+
*/
|
|
113
|
+
declare class PackageManagerUtils {
|
|
114
|
+
protected readonly log: alepha_logger7.Logger;
|
|
115
|
+
protected readonly fs: FileSystemProvider;
|
|
116
|
+
protected readonly alepha: Alepha;
|
|
117
|
+
/**
|
|
118
|
+
* Detect the package manager used in the project.
|
|
119
|
+
*/
|
|
216
120
|
getPackageManager(root: string, flags?: {
|
|
217
121
|
yarn?: boolean;
|
|
218
122
|
pnpm?: boolean;
|
|
219
123
|
npm?: boolean;
|
|
220
124
|
bun?: boolean;
|
|
221
125
|
}): Promise<"yarn" | "pnpm" | "npm" | "bun">;
|
|
222
|
-
ensureIndexHtml(root: string): Promise<void>;
|
|
223
|
-
exists(root: string, dirName: string): Promise<boolean>;
|
|
224
|
-
/**
|
|
225
|
-
* Ensure src/main.ts exists with a minimal Alepha bootstrap.
|
|
226
|
-
*
|
|
227
|
-
* Creates the src directory and main.ts file if the src directory
|
|
228
|
-
* doesn't exist or is empty.
|
|
229
|
-
*
|
|
230
|
-
* @param root - The root directory of the project
|
|
231
|
-
*/
|
|
232
|
-
ensureSrcMain(root: string): Promise<void>;
|
|
233
|
-
/**
|
|
234
|
-
* Ensure test directory exists with a dummy test file.
|
|
235
|
-
*
|
|
236
|
-
* Creates the test directory and a dummy.spec.ts file if the test directory
|
|
237
|
-
* doesn't exist or is empty.
|
|
238
|
-
*
|
|
239
|
-
* @param root - The root directory of the project
|
|
240
|
-
*/
|
|
241
|
-
ensureTestDir(root: string): Promise<void>;
|
|
242
|
-
readPackageJson(root: string): Promise<Record<string, any>>;
|
|
243
126
|
/**
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
127
|
+
* Get the install command for a package.
|
|
128
|
+
*/
|
|
129
|
+
getInstallCommand(root: string, packageName: string, dev?: boolean): Promise<string>;
|
|
130
|
+
/**
|
|
131
|
+
* Check if a dependency is installed in the project.
|
|
132
|
+
*/
|
|
250
133
|
hasDependency(root: string, packageName: string): Promise<boolean>;
|
|
251
134
|
/**
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
* @param root - The root directory of the project
|
|
255
|
-
* @returns True if expo is in dependencies or devDependencies
|
|
256
|
-
*/
|
|
135
|
+
* Check if Expo is present in the project.
|
|
136
|
+
*/
|
|
257
137
|
hasExpo(root: string): Promise<boolean>;
|
|
258
|
-
getInstallCommand(root: string, packageName: string, dev?: boolean): Promise<string>;
|
|
259
138
|
/**
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
* Automatically detects the package manager (yarn, pnpm, npm) and installs
|
|
263
|
-
* the package as a dev dependency if not already present.
|
|
264
|
-
*/
|
|
139
|
+
* Install a dependency if it's missing from the project.
|
|
140
|
+
*/
|
|
265
141
|
ensureDependency(root: string, packageName: string, options?: {
|
|
266
142
|
dev?: boolean;
|
|
267
143
|
run?: RunnerMethod;
|
|
144
|
+
exec?: (cmd: string, opts?: {
|
|
145
|
+
global?: boolean;
|
|
146
|
+
root?: string;
|
|
147
|
+
}) => Promise<void>;
|
|
268
148
|
}): Promise<void>;
|
|
149
|
+
ensureYarn(root: string): Promise<void>;
|
|
150
|
+
ensureBun(root: string): Promise<void>;
|
|
151
|
+
ensurePnpm(root: string): Promise<void>;
|
|
152
|
+
ensureNpm(root: string): Promise<void>;
|
|
153
|
+
removeAllPmFilesExcept(root: string, except: string): Promise<void>;
|
|
154
|
+
removeYarn(root: string): Promise<void>;
|
|
155
|
+
removePnpm(root: string): Promise<void>;
|
|
156
|
+
removeNpm(root: string): Promise<void>;
|
|
157
|
+
removeBun(root: string): Promise<void>;
|
|
158
|
+
readPackageJson(root: string): Promise<Record<string, any>>;
|
|
159
|
+
writePackageJson(root: string, content: Record<string, any>): Promise<void>;
|
|
160
|
+
editPackageJson(root: string, editFn: (pkg: Record<string, any>) => Record<string, any>): Promise<void>;
|
|
161
|
+
ensurePackageJson(root: string, modes: DependencyModes): Promise<Record<string, any>>;
|
|
162
|
+
generatePackageJsonContent(modes: DependencyModes): {
|
|
163
|
+
dependencies: Record<string, string>;
|
|
164
|
+
devDependencies: Record<string, string>;
|
|
165
|
+
scripts: Record<string, string>;
|
|
166
|
+
type: "module";
|
|
167
|
+
};
|
|
168
|
+
protected removeFiles(root: string, files: string[]): Promise<void>;
|
|
269
169
|
}
|
|
270
170
|
interface DependencyModes {
|
|
171
|
+
web?: boolean;
|
|
172
|
+
admin?: boolean;
|
|
173
|
+
expo?: boolean;
|
|
174
|
+
}
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region ../../src/cli/assets/claudeMd.d.ts
|
|
177
|
+
interface ClaudeMdOptions {
|
|
271
178
|
react?: boolean;
|
|
272
179
|
ui?: boolean;
|
|
273
|
-
|
|
180
|
+
projectName?: string;
|
|
181
|
+
}
|
|
182
|
+
//#endregion
|
|
183
|
+
//#region ../../src/cli/services/ProjectScaffolder.d.ts
|
|
184
|
+
/**
|
|
185
|
+
* Service for scaffolding new Alepha projects.
|
|
186
|
+
*
|
|
187
|
+
* Handles creation of:
|
|
188
|
+
* - Project structure (src/api, src/web)
|
|
189
|
+
* - Configuration files (tsconfig, biome, editorconfig)
|
|
190
|
+
* - Entry points (main.server.ts, main.browser.ts)
|
|
191
|
+
* - Example code (HelloController, Hello component)
|
|
192
|
+
*/
|
|
193
|
+
declare class ProjectScaffolder {
|
|
194
|
+
protected readonly log: alepha_logger7.Logger;
|
|
195
|
+
protected readonly fs: FileSystemProvider;
|
|
196
|
+
protected readonly pm: PackageManagerUtils;
|
|
197
|
+
/**
|
|
198
|
+
* Get the app name from the directory name.
|
|
199
|
+
*
|
|
200
|
+
* Converts the directory name to a valid module name:
|
|
201
|
+
* - Converts to lowercase
|
|
202
|
+
* - Replaces spaces, dashes, underscores with nothing
|
|
203
|
+
* - Falls back to "app" if empty
|
|
204
|
+
*/
|
|
205
|
+
getAppName(root: string): string;
|
|
206
|
+
/**
|
|
207
|
+
* Ensure all configuration files exist.
|
|
208
|
+
*/
|
|
209
|
+
ensureConfig(root: string, opts: {
|
|
210
|
+
packageJson?: boolean | DependencyModes;
|
|
211
|
+
tsconfigJson?: boolean;
|
|
212
|
+
indexHtml?: boolean;
|
|
213
|
+
biomeJson?: boolean;
|
|
214
|
+
editorconfig?: boolean;
|
|
215
|
+
claudeMd?: boolean | ClaudeMdOptions;
|
|
216
|
+
}): Promise<void>;
|
|
217
|
+
ensureTsConfig(root: string): Promise<void>;
|
|
218
|
+
ensureBiomeConfig(root: string): Promise<void>;
|
|
219
|
+
ensureEditorConfig(root: string): Promise<void>;
|
|
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
|
+
*/
|
|
243
|
+
ensureTestDir(root: string): Promise<void>;
|
|
244
|
+
protected ensureFileIfNotExists(root: string, relativePath: string, content: string): Promise<void>;
|
|
245
|
+
/**
|
|
246
|
+
* Check if a file exists in the given directory or any parent directory.
|
|
247
|
+
*/
|
|
248
|
+
protected existsInParents(root: string, filename: string): Promise<boolean>;
|
|
274
249
|
}
|
|
275
250
|
//#endregion
|
|
276
251
|
//#region ../../src/cli/commands/build.d.ts
|
|
277
252
|
declare class BuildCommand {
|
|
278
253
|
protected readonly log: alepha_logger7.Logger;
|
|
254
|
+
protected readonly fs: FileSystemProvider;
|
|
279
255
|
protected readonly utils: AlephaCliUtils;
|
|
256
|
+
protected readonly pm: PackageManagerUtils;
|
|
257
|
+
protected readonly scaffolder: ProjectScaffolder;
|
|
258
|
+
protected readonly options: Readonly<{
|
|
259
|
+
stats?: boolean | undefined;
|
|
260
|
+
vercel?: {
|
|
261
|
+
config?: {
|
|
262
|
+
crons?: {
|
|
263
|
+
path: string;
|
|
264
|
+
schedule: string;
|
|
265
|
+
}[] | undefined;
|
|
266
|
+
} | undefined;
|
|
267
|
+
projectName?: string | undefined;
|
|
268
|
+
orgId?: string | undefined;
|
|
269
|
+
projectId?: string | undefined;
|
|
270
|
+
} | undefined;
|
|
271
|
+
cloudflare?: {
|
|
272
|
+
config?: typebox0.StaticRecord<[], "Decode", {}, {
|
|
273
|
+
config: alepha0.TOptional<alepha0.TRecord<string, alepha0.TAny>>;
|
|
274
|
+
}, string, alepha0.TAny> | undefined;
|
|
275
|
+
} | undefined;
|
|
276
|
+
docker?: {
|
|
277
|
+
image?: string | undefined;
|
|
278
|
+
command?: string | undefined;
|
|
279
|
+
} | undefined;
|
|
280
|
+
sitemap?: {
|
|
281
|
+
hostname: string;
|
|
282
|
+
} | undefined;
|
|
283
|
+
}>;
|
|
280
284
|
readonly build: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
281
285
|
stats: alepha0.TOptional<alepha0.TBoolean>;
|
|
282
286
|
vercel: alepha0.TOptional<alepha0.TBoolean>;
|
|
283
287
|
cloudflare: alepha0.TOptional<alepha0.TBoolean>;
|
|
284
288
|
docker: alepha0.TOptional<alepha0.TBoolean>;
|
|
285
289
|
sitemap: alepha0.TOptional<alepha0.TString>;
|
|
290
|
+
bun: alepha0.TOptional<alepha0.TBoolean>;
|
|
286
291
|
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
287
292
|
}
|
|
288
293
|
//#endregion
|
|
289
294
|
//#region ../../src/cli/commands/clean.d.ts
|
|
290
295
|
declare class CleanCommand {
|
|
291
296
|
/**
|
|
292
|
-
|
|
293
|
-
|
|
297
|
+
* Clean the project, removing the "dist" directory
|
|
298
|
+
*/
|
|
294
299
|
readonly clean: alepha_command0.CommandPrimitive<typebox0.TObject<typebox0.TProperties>, typebox0.TSchema, typebox0.TObject<typebox0.TProperties>>;
|
|
295
300
|
}
|
|
296
301
|
//#endregion
|
|
297
302
|
//#region ../../src/cli/commands/db.d.ts
|
|
298
303
|
declare class DbCommand {
|
|
299
304
|
protected readonly log: alepha_logger7.Logger;
|
|
305
|
+
protected readonly fs: FileSystemProvider;
|
|
300
306
|
protected readonly utils: AlephaCliUtils;
|
|
301
307
|
/**
|
|
302
|
-
|
|
303
|
-
|
|
308
|
+
* Check if database migrations are up to date.
|
|
309
|
+
*/
|
|
304
310
|
protected readonly check: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
305
311
|
provider: alepha0.TOptional<alepha0.TString>;
|
|
306
312
|
mode: alepha0.TOptional<alepha0.TString>;
|
|
307
313
|
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
308
314
|
/**
|
|
309
|
-
|
|
310
|
-
|
|
315
|
+
* Generate database migration files
|
|
316
|
+
*/
|
|
311
317
|
protected readonly generate: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
312
318
|
provider: alepha0.TOptional<alepha0.TString>;
|
|
313
319
|
mode: alepha0.TOptional<alepha0.TString>;
|
|
314
320
|
custom: alepha0.TOptional<alepha0.TString>;
|
|
315
321
|
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
316
322
|
/**
|
|
317
|
-
|
|
318
|
-
|
|
323
|
+
* Push database schema changes directly to the database
|
|
324
|
+
*/
|
|
319
325
|
protected readonly push: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
320
326
|
provider: alepha0.TOptional<alepha0.TString>;
|
|
321
327
|
mode: alepha0.TOptional<alepha0.TString>;
|
|
322
328
|
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
323
329
|
/**
|
|
324
|
-
|
|
325
|
-
|
|
330
|
+
* Apply pending database migrations
|
|
331
|
+
*/
|
|
326
332
|
protected readonly migrate: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
327
333
|
provider: alepha0.TOptional<alepha0.TString>;
|
|
328
334
|
mode: alepha0.TOptional<alepha0.TString>;
|
|
329
335
|
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
330
336
|
/**
|
|
331
|
-
|
|
332
|
-
|
|
337
|
+
* Launch Drizzle Studio database browser
|
|
338
|
+
*/
|
|
333
339
|
protected readonly studio: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
334
340
|
provider: alepha0.TOptional<alepha0.TString>;
|
|
335
341
|
mode: alepha0.TOptional<alepha0.TString>;
|
|
336
342
|
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
337
343
|
/**
|
|
338
|
-
|
|
339
|
-
|
|
344
|
+
* Parent command for database operations.
|
|
345
|
+
*/
|
|
340
346
|
readonly db: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
341
347
|
/**
|
|
342
|
-
|
|
343
|
-
|
|
348
|
+
* Run a drizzle-kit command for all database providers in an Alepha instance.
|
|
349
|
+
*/
|
|
344
350
|
runDrizzleKitCommand(options: {
|
|
345
351
|
root: string;
|
|
346
352
|
args?: string;
|
|
@@ -351,13 +357,14 @@ declare class DbCommand {
|
|
|
351
357
|
env?: string;
|
|
352
358
|
}): Promise<void>;
|
|
353
359
|
/**
|
|
354
|
-
|
|
355
|
-
|
|
360
|
+
* Prepare Drizzle configuration files for a database provider.
|
|
361
|
+
*/
|
|
356
362
|
prepareDrizzleConfig(options: {
|
|
357
363
|
kit: any;
|
|
358
364
|
provider: DatabaseProvider;
|
|
359
365
|
providerName: string;
|
|
360
366
|
providerUrl: string;
|
|
367
|
+
providerDriver: string;
|
|
361
368
|
dialect: string;
|
|
362
369
|
entry: string;
|
|
363
370
|
rootDir: string;
|
|
@@ -367,26 +374,28 @@ declare class DbCommand {
|
|
|
367
374
|
//#region ../../src/cli/commands/deploy.d.ts
|
|
368
375
|
declare class DeployCommand {
|
|
369
376
|
protected readonly log: alepha_logger7.Logger;
|
|
377
|
+
protected readonly fs: FileSystemProvider;
|
|
370
378
|
protected readonly utils: AlephaCliUtils;
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
379
|
+
protected readonly pm: PackageManagerUtils;
|
|
380
|
+
/**
|
|
381
|
+
* Deploy the project to a hosting platform (e.g., Vercel, Cloudflare, Surge)
|
|
382
|
+
*
|
|
383
|
+
* Deploy command can be overridden by creating a alepha.config.ts in the project root:
|
|
384
|
+
*
|
|
385
|
+
* ```ts
|
|
386
|
+
* import { defineConfig } from "alepha/cli";
|
|
387
|
+
*
|
|
388
|
+
* export default defineConfig({
|
|
389
|
+
* commands: {
|
|
390
|
+
* deploy: {
|
|
391
|
+
* handler: async ({ root, mode, flags }) => {
|
|
392
|
+
* // Custom deployment logic here
|
|
393
|
+
* },
|
|
394
|
+
* },
|
|
395
|
+
* },
|
|
396
|
+
* });
|
|
397
|
+
* ```
|
|
398
|
+
*/
|
|
390
399
|
readonly deploy: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
391
400
|
build: alepha0.TBoolean;
|
|
392
401
|
migrate: alepha0.TBoolean;
|
|
@@ -402,21 +411,27 @@ declare class DeployCommand {
|
|
|
402
411
|
//#region ../../src/cli/commands/dev.d.ts
|
|
403
412
|
declare class DevCommand {
|
|
404
413
|
protected readonly log: alepha_logger7.Logger;
|
|
414
|
+
protected readonly fs: FileSystemProvider;
|
|
405
415
|
protected readonly utils: AlephaCliUtils;
|
|
416
|
+
protected readonly pm: PackageManagerUtils;
|
|
417
|
+
protected readonly scaffolder: ProjectScaffolder;
|
|
406
418
|
protected readonly alepha: Alepha;
|
|
407
419
|
/**
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
420
|
+
* Will run the project in watch mode.
|
|
421
|
+
*
|
|
422
|
+
* - If an index.html file is found in the project root, it will run Vite in dev mode.
|
|
423
|
+
* - Otherwise, it will look for a server entry file and run it with tsx in watch mode.
|
|
424
|
+
*/
|
|
413
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>;
|
|
414
427
|
protected isFullstackProject(root: string): Promise<boolean>;
|
|
415
428
|
}
|
|
416
429
|
//#endregion
|
|
417
430
|
//#region ../../src/cli/commands/format.d.ts
|
|
418
431
|
declare class FormatCommand {
|
|
419
432
|
protected readonly utils: AlephaCliUtils;
|
|
433
|
+
protected readonly pm: PackageManagerUtils;
|
|
434
|
+
protected readonly scaffolder: ProjectScaffolder;
|
|
420
435
|
readonly format: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
421
436
|
}
|
|
422
437
|
//#endregion
|
|
@@ -438,16 +453,16 @@ declare class FormatCommand {
|
|
|
438
453
|
declare class GitMessageParser {
|
|
439
454
|
protected readonly log: alepha_logger7.Logger;
|
|
440
455
|
/**
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
456
|
+
* Parse a git commit line into a structured Commit object.
|
|
457
|
+
*
|
|
458
|
+
* **Format:** `type(scope): description` or `type(scope)!: description`
|
|
459
|
+
*
|
|
460
|
+
* **Supported types:** feat, fix, docs, refactor, perf, revert
|
|
461
|
+
*
|
|
462
|
+
* **Breaking changes:** Use `!` before `:` (e.g., `feat(api)!: remove endpoint`)
|
|
463
|
+
*
|
|
464
|
+
* @returns Commit object or null if not matching/ignored
|
|
465
|
+
*/
|
|
451
466
|
parseCommit(line: string, config: ChangelogOptions): Commit | null;
|
|
452
467
|
}
|
|
453
468
|
//#endregion
|
|
@@ -487,39 +502,39 @@ declare class ChangelogCommand {
|
|
|
487
502
|
ignore?: string[] | undefined;
|
|
488
503
|
}>;
|
|
489
504
|
/**
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
505
|
+
* Format a single commit line.
|
|
506
|
+
* Example: `- **cli**: add new command (\`abc1234\`)`
|
|
507
|
+
* Breaking changes are flagged: `- **cli**: add new command [BREAKING] (\`abc1234\`)`
|
|
508
|
+
*/
|
|
494
509
|
protected formatCommit(commit: Commit): string;
|
|
495
510
|
/**
|
|
496
|
-
|
|
497
|
-
|
|
511
|
+
* Format the changelog entry with sections.
|
|
512
|
+
*/
|
|
498
513
|
protected formatEntry(entry: ChangelogEntry): string;
|
|
499
514
|
/**
|
|
500
|
-
|
|
501
|
-
|
|
515
|
+
* Parse git log output into a changelog entry.
|
|
516
|
+
*/
|
|
502
517
|
protected parseCommits(commitsOutput: string): ChangelogEntry;
|
|
503
518
|
/**
|
|
504
|
-
|
|
505
|
-
|
|
519
|
+
* Check if entry has any public commits.
|
|
520
|
+
*/
|
|
506
521
|
protected hasChanges(entry: ChangelogEntry): boolean;
|
|
507
522
|
/**
|
|
508
|
-
|
|
509
|
-
|
|
523
|
+
* Get the latest version tag.
|
|
524
|
+
*/
|
|
510
525
|
protected getLatestTag(git: (cmd: string) => Promise<string>): Promise<string | null>;
|
|
511
526
|
readonly command: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
512
527
|
/**
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
528
|
+
* Show changes from this ref (tag, commit, branch).
|
|
529
|
+
* Defaults to the latest version tag.
|
|
530
|
+
* Example: --from=1.0.0
|
|
531
|
+
*/
|
|
517
532
|
from: alepha0.TOptional<alepha0.TString>;
|
|
518
533
|
/**
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
534
|
+
* Show changes up to this ref (tag, commit, branch).
|
|
535
|
+
* Defaults to HEAD.
|
|
536
|
+
* Example: --to=main
|
|
537
|
+
*/
|
|
523
538
|
to: alepha0.TOptional<alepha0.TString>;
|
|
524
539
|
}>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
525
540
|
}
|
|
@@ -537,24 +552,30 @@ declare class OpenApiCommand {
|
|
|
537
552
|
//#region ../../src/cli/commands/init.d.ts
|
|
538
553
|
declare class InitCommand {
|
|
539
554
|
protected readonly utils: AlephaCliUtils;
|
|
555
|
+
protected readonly pm: PackageManagerUtils;
|
|
556
|
+
protected readonly scaffolder: ProjectScaffolder;
|
|
557
|
+
protected readonly fs: FileSystemProvider;
|
|
540
558
|
/**
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
559
|
+
* Ensure the project has the necessary Alepha configuration files.
|
|
560
|
+
* Add the correct dependencies to package.json and install them.
|
|
561
|
+
*/
|
|
544
562
|
readonly init: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
563
|
+
agent: alepha0.TOptional<alepha0.TBoolean>;
|
|
545
564
|
yarn: alepha0.TOptional<alepha0.TBoolean>;
|
|
546
565
|
pnpm: alepha0.TOptional<alepha0.TBoolean>;
|
|
547
566
|
npm: alepha0.TOptional<alepha0.TBoolean>;
|
|
548
567
|
bun: alepha0.TOptional<alepha0.TBoolean>;
|
|
549
|
-
|
|
550
|
-
|
|
568
|
+
web: alepha0.TOptional<alepha0.TBoolean>;
|
|
569
|
+
admin: alepha0.TOptional<alepha0.TBoolean>;
|
|
551
570
|
test: alepha0.TOptional<alepha0.TBoolean>;
|
|
552
|
-
}>, alepha0.
|
|
571
|
+
}>, alepha0.TOptional<alepha0.TString>, alepha0.TObject<alepha0.TProperties>>;
|
|
553
572
|
}
|
|
554
573
|
//#endregion
|
|
555
574
|
//#region ../../src/cli/commands/lint.d.ts
|
|
556
575
|
declare class LintCommand {
|
|
557
576
|
protected readonly utils: AlephaCliUtils;
|
|
577
|
+
protected readonly pm: PackageManagerUtils;
|
|
578
|
+
protected readonly scaffolder: ProjectScaffolder;
|
|
558
579
|
readonly lint: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
559
580
|
}
|
|
560
581
|
//#endregion
|
|
@@ -565,24 +586,18 @@ declare class RootCommand {
|
|
|
565
586
|
protected readonly alepha: Alepha;
|
|
566
587
|
protected readonly color: ConsoleColorProvider;
|
|
567
588
|
/**
|
|
568
|
-
|
|
569
|
-
|
|
589
|
+
* Called when no command is provided
|
|
590
|
+
*/
|
|
570
591
|
readonly root: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
571
592
|
version: alepha0.TOptional<alepha0.TBoolean>;
|
|
572
593
|
}>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
573
594
|
}
|
|
574
595
|
//#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
596
|
//#region ../../src/cli/commands/test.d.ts
|
|
584
597
|
declare class TestCommand {
|
|
585
598
|
protected readonly utils: AlephaCliUtils;
|
|
599
|
+
protected readonly pm: PackageManagerUtils;
|
|
600
|
+
protected readonly scaffolder: ProjectScaffolder;
|
|
586
601
|
readonly test: alepha_command0.CommandPrimitive<alepha0.TObject<{
|
|
587
602
|
config: alepha0.TOptional<alepha0.TString>;
|
|
588
603
|
}>, alepha0.TSchema, alepha0.TObject<{
|
|
@@ -593,49 +608,133 @@ declare class TestCommand {
|
|
|
593
608
|
//#region ../../src/cli/commands/typecheck.d.ts
|
|
594
609
|
declare class TypecheckCommand {
|
|
595
610
|
protected readonly utils: AlephaCliUtils;
|
|
611
|
+
protected readonly pm: PackageManagerUtils;
|
|
596
612
|
protected readonly log: alepha_logger7.Logger;
|
|
597
613
|
/**
|
|
598
|
-
|
|
599
|
-
|
|
614
|
+
* Run TypeScript type checking across the codebase with no emit.
|
|
615
|
+
*/
|
|
600
616
|
readonly typecheck: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
601
617
|
}
|
|
602
618
|
//#endregion
|
|
603
619
|
//#region ../../src/cli/commands/verify.d.ts
|
|
604
620
|
declare class VerifyCommand {
|
|
605
621
|
protected readonly utils: AlephaCliUtils;
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
622
|
+
protected readonly pm: PackageManagerUtils;
|
|
623
|
+
/**
|
|
624
|
+
* Run a series of verification commands to ensure code quality and correctness.
|
|
625
|
+
*
|
|
626
|
+
* This command runs the following checks in order:
|
|
627
|
+
* - Clean the project
|
|
628
|
+
* - Format the code
|
|
629
|
+
* - Lint the code
|
|
630
|
+
* - Run tests (if Vitest is a dev dependency)
|
|
631
|
+
* - Check database migrations (if a migrations directory exists)
|
|
632
|
+
* - Type check the code
|
|
633
|
+
* - Build the project
|
|
634
|
+
* - Clean the project again
|
|
635
|
+
*/
|
|
619
636
|
readonly verify: alepha_command0.CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
620
637
|
}
|
|
621
638
|
//#endregion
|
|
639
|
+
//#region ../../src/cli/atoms/buildOptions.d.ts
|
|
640
|
+
/**
|
|
641
|
+
* Build options atom for CLI build command.
|
|
642
|
+
*
|
|
643
|
+
* Defines the available build configuration options with their defaults.
|
|
644
|
+
* Options can be overridden via vite.config.ts or CLI flags.
|
|
645
|
+
*/
|
|
646
|
+
declare const buildOptions: alepha0.Atom<alepha0.TObject<{
|
|
647
|
+
/**
|
|
648
|
+
* Generate build stats report.
|
|
649
|
+
*/
|
|
650
|
+
stats: alepha0.TOptional<alepha0.TBoolean>;
|
|
651
|
+
/**
|
|
652
|
+
* Vercel deployment configuration.
|
|
653
|
+
*/
|
|
654
|
+
vercel: alepha0.TOptional<alepha0.TObject<{
|
|
655
|
+
projectName: alepha0.TOptional<alepha0.TString>;
|
|
656
|
+
orgId: alepha0.TOptional<alepha0.TString>;
|
|
657
|
+
projectId: alepha0.TOptional<alepha0.TString>;
|
|
658
|
+
config: alepha0.TOptional<alepha0.TObject<{
|
|
659
|
+
crons: alepha0.TOptional<alepha0.TArray<alepha0.TObject<{
|
|
660
|
+
path: alepha0.TString;
|
|
661
|
+
schedule: alepha0.TString;
|
|
662
|
+
}>>>;
|
|
663
|
+
}>>;
|
|
664
|
+
}>>;
|
|
665
|
+
/**
|
|
666
|
+
* Cloudflare Workers deployment configuration.
|
|
667
|
+
*/
|
|
668
|
+
cloudflare: alepha0.TOptional<alepha0.TObject<{
|
|
669
|
+
config: alepha0.TOptional<alepha0.TRecord<string, alepha0.TAny>>;
|
|
670
|
+
}>>;
|
|
671
|
+
/**
|
|
672
|
+
* Docker deployment configuration.
|
|
673
|
+
*/
|
|
674
|
+
docker: alepha0.TOptional<alepha0.TObject<{
|
|
675
|
+
/**
|
|
676
|
+
* Docker image name to use in the Dockerfile.
|
|
677
|
+
* @default "node:24-alpine"
|
|
678
|
+
*/
|
|
679
|
+
image: alepha0.TOptional<alepha0.TString>;
|
|
680
|
+
/**
|
|
681
|
+
* Command to run in the Docker container.
|
|
682
|
+
* @default "node"
|
|
683
|
+
*/
|
|
684
|
+
command: alepha0.TOptional<alepha0.TString>;
|
|
685
|
+
}>>;
|
|
686
|
+
/**
|
|
687
|
+
* Sitemap generation configuration.
|
|
688
|
+
*/
|
|
689
|
+
sitemap: alepha0.TOptional<alepha0.TObject<{
|
|
690
|
+
/**
|
|
691
|
+
* Base URL for sitemap entries.
|
|
692
|
+
*/
|
|
693
|
+
hostname: alepha0.TString;
|
|
694
|
+
}>>;
|
|
695
|
+
}>, "alepha.build.options">;
|
|
696
|
+
/**
|
|
697
|
+
* Type for build options.
|
|
698
|
+
*/
|
|
699
|
+
type BuildOptions = Static<typeof buildOptions.schema>;
|
|
700
|
+
//#endregion
|
|
622
701
|
//#region ../../src/cli/defineConfig.d.ts
|
|
623
|
-
|
|
702
|
+
interface AlephaCliConfig {
|
|
703
|
+
/**
|
|
704
|
+
* Add custom commands to the Alepha CLI.
|
|
705
|
+
*
|
|
706
|
+
* You can override 'deploy', 'build', 'dev', 'start' commands this way.
|
|
707
|
+
* But you can also add your own commands and run them via `alepha <command>`.
|
|
708
|
+
*/
|
|
624
709
|
commands?: Record<string, CommandPrimitive>;
|
|
710
|
+
/**
|
|
711
|
+
* Register more services to the Alepha CLI (enhancements, commands, etc.).
|
|
712
|
+
*/
|
|
625
713
|
services?: Array<any>;
|
|
626
|
-
|
|
627
|
-
|
|
714
|
+
/**
|
|
715
|
+
* Configure Alepha build command.
|
|
716
|
+
*/
|
|
717
|
+
build?: BuildOptions;
|
|
718
|
+
/**
|
|
719
|
+
* Environment variables to set before running commands.
|
|
720
|
+
*
|
|
721
|
+
* Always use .env files by default, this is only for dynamic values.
|
|
722
|
+
*/
|
|
723
|
+
env?: Record<string, unknown>;
|
|
724
|
+
}
|
|
725
|
+
type AlephaCliConfigFn = (alepha: Alepha) => AlephaCliConfig;
|
|
726
|
+
declare const defineConfig: (runConfig: AlephaCliConfig | AlephaCliConfigFn) => (alepha: Alepha) => {
|
|
628
727
|
[x: string]: CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
629
728
|
};
|
|
630
729
|
/**
|
|
631
730
|
* @alias defineConfig
|
|
632
731
|
*/
|
|
633
|
-
declare const defineAlephaConfig: (
|
|
732
|
+
declare const defineAlephaConfig: (runConfig: AlephaCliConfig | AlephaCliConfigFn) => (alepha: Alepha) => {
|
|
634
733
|
[x: string]: CommandPrimitive<alepha0.TObject<alepha0.TProperties>, alepha0.TSchema, alepha0.TObject<alepha0.TProperties>>;
|
|
635
734
|
};
|
|
636
735
|
//#endregion
|
|
637
736
|
//#region ../../src/cli/version.d.ts
|
|
638
737
|
declare const version: any;
|
|
639
738
|
//#endregion
|
|
640
|
-
export { AlephaCli, AlephaCliConfig, AlephaCliUtils, AlephaPackageBuilderCli, BuildCommand, ChangelogCommand, type ChangelogOptions, CleanCommand, Commit, DEFAULT_IGNORE, DbCommand,
|
|
739
|
+
export { AlephaCli, AlephaCliConfig, AlephaCliConfigFn, AlephaCliUtils, AlephaPackageBuilderCli, BuildCommand, ChangelogCommand, type ChangelogOptions, CleanCommand, Commit, DEFAULT_IGNORE, DbCommand, DeployCommand, DevCommand, FormatCommand, GitMessageParser, GitProvider, InitCommand, LintCommand, OpenApiCommand, RootCommand, TestCommand, TypecheckCommand, VerifyCommand, analyzeModules, changelogOptions, defineAlephaConfig, defineConfig, version };
|
|
641
740
|
//# sourceMappingURL=index.d.ts.map
|