@xeno-js/cli 0.1.3 → 0.1.4

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.
Files changed (88) hide show
  1. package/LICENSE +18 -12
  2. package/README.md +461 -236
  3. package/dist/index.js +985 -653
  4. package/dist/index.js.map +1 -1
  5. package/package.json +91 -66
  6. package/.github/.copilot-instruction.md +0 -73
  7. package/.github/agents/git-operator.agent.md +0 -86
  8. package/.github/agents/unit-tester.agent.md +0 -68
  9. package/.husky/commit-msg +0 -1
  10. package/.husky/pre-commit +0 -1
  11. package/.husky/pre-push +0 -1
  12. package/.prettierignore +0 -7
  13. package/.prettierrc.json +0 -37
  14. package/commitlint.config.cjs +0 -39
  15. package/eslint.config.mjs +0 -306
  16. package/lint-staged.config.mjs +0 -5
  17. package/logo/logo.png +0 -0
  18. package/src/domain/contracts/icommand-cli.contracts.ts +0 -13
  19. package/src/domain/contracts/icommand-runner.contracts.ts +0 -3
  20. package/src/domain/contracts/idispatch.contracts.ts +0 -3
  21. package/src/domain/contracts/ifile-service.contracts.ts +0 -3
  22. package/src/domain/contracts/igenerator.contracts.ts +0 -5
  23. package/src/domain/contracts/index.ts +0 -6
  24. package/src/domain/contracts/iscaffold-strategy.contracts.ts +0 -7
  25. package/src/domain/index.ts +0 -1
  26. package/src/index.ts +0 -30
  27. package/src/infrastructure/bootstrap/bootstrapper.ts +0 -30
  28. package/src/infrastructure/bootstrap/index.ts +0 -1
  29. package/src/infrastructure/builder/builder.test.ts +0 -36
  30. package/src/infrastructure/builder/builder.ts +0 -15
  31. package/src/infrastructure/builder/index.ts +0 -1
  32. package/src/infrastructure/command_launcher/command.utils.ts +0 -31
  33. package/src/infrastructure/command_launcher/index.ts +0 -0
  34. package/src/infrastructure/commands/command-runner.service.ts +0 -36
  35. package/src/infrastructure/commands/generate.command.ts +0 -55
  36. package/src/infrastructure/commands/help.command.ts +0 -63
  37. package/src/infrastructure/commands/index.ts +0 -4
  38. package/src/infrastructure/commands/new-project.command.ts +0 -47
  39. package/src/infrastructure/dispatcher/dispatcher.ts +0 -45
  40. package/src/infrastructure/dispatcher/index.ts +0 -1
  41. package/src/infrastructure/file/file.service.ts +0 -14
  42. package/src/infrastructure/file/index.ts +0 -1
  43. package/src/infrastructure/generators/core/bootstrap.generator.ts +0 -118
  44. package/src/infrastructure/generators/core/command/cqrs.generator.ts +0 -63
  45. package/src/infrastructure/generators/core/command/generate-command.generator.ts +0 -191
  46. package/src/infrastructure/generators/core/command/generate-query.generator.ts +0 -150
  47. package/src/infrastructure/generators/core/drizzle-sql-lite.generator.ts +0 -77
  48. package/src/infrastructure/generators/core/drizzle.generator.ts +0 -87
  49. package/src/infrastructure/generators/core/env.generator.ts +0 -69
  50. package/src/infrastructure/generators/core/index.ts +0 -9
  51. package/src/infrastructure/generators/core/main.generator.ts +0 -41
  52. package/src/infrastructure/generators/core/packagejson.generator.ts +0 -70
  53. package/src/infrastructure/generators/core/readme.generator.ts +0 -427
  54. package/src/infrastructure/generators/core/registry.generator.ts +0 -40
  55. package/src/infrastructure/generators/core/tsconfig.generator.ts +0 -32
  56. package/src/infrastructure/generators/gitignore.generator.ts +0 -60
  57. package/src/infrastructure/generators/vue/app-vue.generator.ts +0 -21
  58. package/src/infrastructure/generators/vue/bootstrap-ts.generator.ts +0 -60
  59. package/src/infrastructure/generators/vue/command_query/cqrs.generator.ts +0 -36
  60. package/src/infrastructure/generators/vue/command_query/generate-command-vue.generator.ts +0 -153
  61. package/src/infrastructure/generators/vue/command_query/generate-query-vue.generator.ts +0 -161
  62. package/src/infrastructure/generators/vue/env.generator.ts +0 -39
  63. package/src/infrastructure/generators/vue/index-html.generator.ts +0 -24
  64. package/src/infrastructure/generators/vue/index.ts +0 -12
  65. package/src/infrastructure/generators/vue/main.generator.ts +0 -41
  66. package/src/infrastructure/generators/vue/packagejson.generator.ts +0 -50
  67. package/src/infrastructure/generators/vue/readme.generator.ts +0 -389
  68. package/src/infrastructure/generators/vue/registry-ts.generator.ts +0 -26
  69. package/src/infrastructure/generators/vue/router.generator.ts +0 -35
  70. package/src/infrastructure/generators/vue/tailwind.generator.ts +0 -17
  71. package/src/infrastructure/generators/vue/tsconfig.generator.ts +0 -38
  72. package/src/infrastructure/generators/vue/use-app.generator.ts +0 -38
  73. package/src/infrastructure/generators/vue/vite-config.generator.ts +0 -35
  74. package/src/infrastructure/index.ts +0 -5
  75. package/src/infrastructure/strategies/core-scaffold.strategy.ts +0 -100
  76. package/src/infrastructure/strategies/index.ts +0 -2
  77. package/src/infrastructure/strategies/vue-scaffold.strategy.ts +0 -79
  78. package/src/shared/constants/command.constants.ts +0 -18
  79. package/src/shared/constants/core.constants.ts +0 -7
  80. package/src/shared/constants/index.ts +0 -2
  81. package/src/shared/index.ts +0 -3
  82. package/src/shared/types/common.types.ts +0 -68
  83. package/src/shared/types/index.ts +0 -1
  84. package/src/shared/utils/guards.utils.ts +0 -334
  85. package/src/shared/utils/index.ts +0 -2
  86. package/src/shared/utils/string.utils.ts +0 -60
  87. package/tsconfig.json +0 -15
  88. package/tsup.config.ts +0 -13
@@ -1,150 +0,0 @@
1
- import path from 'node:path'
2
-
3
- import type { IFileService } from '../../../../domain'
4
-
5
- export class GenerateQueryCoreGenerator {
6
- constructor(private readonly _fileService: IFileService) {}
7
-
8
- public async generate(
9
- pascalName: string,
10
- lowerName: string,
11
- tokenPrefix: string,
12
- componentDir: string,
13
- hasZod: boolean,
14
- ): Promise<void> {
15
- const queryContent = `import { BaseQuery } from '@xeno-js/core';
16
-
17
- /*
18
- * ⚠️ WARNING: ACTION REQUIRED ⚠️
19
- * Please replace <any> with your specific payload and response types.
20
- */
21
- export class ${pascalName}Query extends BaseQuery<any> {
22
- constructor(public readonly payload: any) {
23
- super(
24
- '${tokenPrefix}_QUERY_HANDLER',
25
- // Default cache options:
26
- {
27
- ttl: 60,
28
- cacheKey: \`${lowerName}:\${JSON.stringify(payload)}\`,
29
- bypassCache: false,
30
- consistentRead: false
31
- isUserScoped: false,
32
- }
33
- );
34
- }
35
- }
36
- `
37
- await this._fileService.writeFileRecursive(
38
- path.join(componentDir, `${lowerName}.query.ts`),
39
- queryContent,
40
- )
41
-
42
- // 2. Handler
43
- const handlerContent = `import type { IFactory, ResultType, UserContext } from '@xeno-js/core';
44
- import { AppError, BaseHandler, Result } from '@xeno-js/core';
45
- import { ${pascalName}Query } from './${lowerName}.query';
46
-
47
- /*
48
- * ⚠️ WARNING: ACTION REQUIRED ⚠️
49
- * Please replace <any> with your specific response type.
50
- */
51
- export class ${pascalName}Handler extends BaseHandler<${pascalName}Query, any> {
52
- constructor(
53
- identityFactory: IFactory<void, UserContext>
54
- // TODO: Inject your ReadDao or DataSource here
55
- ) {
56
- super(identityFactory);
57
- }
58
-
59
- public async executeAsync(request: ${pascalName}Query, singal: AbortSignal): Promise<ResultType<any>> {
60
- // TODO: Implement your query logic here
61
-
62
- return Result.ok();
63
- }
64
- }
65
- `
66
- await this._fileService.writeFileRecursive(
67
- path.join(componentDir, `${lowerName}.handler.ts`),
68
- handlerContent,
69
- )
70
-
71
- // 3. Controller
72
- const controllerContent = `import type { IContextAccessor, IMediator, RequestContext, ResponseDto } from '@xeno-js/core';
73
- import { BaseController } from '@xeno-js/core';
74
- import { ${pascalName}Query } from './${lowerName}.query';
75
-
76
- /*
77
- * ⚠️ WARNING: ACTION REQUIRED ⚠️
78
- * Please replace <any, any> with your specific request and response types.
79
- */
80
- export class ${pascalName}Controller extends BaseController<any, any> {
81
- constructor(
82
- requestContext: IContextAccessor<RequestContext>,
83
- mediator: IMediator,
84
- ) {
85
- super(requestContext, mediator);
86
- }
87
-
88
- public async handle(request: any): Promise<ResponseDto<any>> {
89
- const query = new ${pascalName}Query(request);
90
- const result = await this._query(query);
91
-
92
- if (!result.isOk()) {
93
- return this.fail(result.getErrorOrThrow(), 'Error during ${pascalName} operation');
94
- }
95
-
96
- return this.ok(result.getValueOrThrow());
97
- }
98
- }
99
- `
100
- await this._fileService.writeFileRecursive(
101
- path.join(componentDir, `${lowerName}.controller.ts`),
102
- controllerContent,
103
- )
104
-
105
- // 4. Schema Zod
106
- if (hasZod) {
107
- const zodContent = `import { z } from 'zod';
108
- import { ZodUtils } from '@xeno-js/core';
109
-
110
- /*
111
- * ⚠️ WARNING: ACTION REQUIRED ⚠️
112
- * Define the actual Zod validation schema for your query payload.
113
- */
114
- export const ${pascalName}Schema = ZodUtils.createQuerySchema({
115
- payload: z.any() // TODO: Update with strict validation
116
- });
117
- `
118
- await this._fileService.writeFileRecursive(
119
- path.join(componentDir, `${lowerName}.schema-zod.ts`),
120
- zodContent,
121
- )
122
- }
123
-
124
- // 5. Module
125
- const moduleContent = `import type { IServiceContainer, IConfigurationService } from '@xeno-js/core';
126
- import { TOKENS } from '@xeno-js/core';
127
- import { ${pascalName}Controller } from './${lowerName}.controller';
128
- import { ${pascalName}Handler } from './${lowerName}.handler';
129
-
130
- export const ${pascalName}Module = Object.freeze({
131
- register(opts: IServiceContainer<any>, _config: IConfigurationService): void {
132
- opts.addTransient('${tokenPrefix}_QUERY_CONTROLLER', (c) => new ${pascalName}Controller(c.resolve(TOKENS.REQUEST_CONTEXT), c.resolve(TOKENS.MEDIATOR)));
133
- opts.addScoped('${tokenPrefix}_QUERY_HANDLER', (c) => new ${pascalName}Handler(c.resolve(TOKENS.USER_CONTEXT_FACTORY)));
134
-
135
- /*
136
- * ⚠️ WARNING: ACTION REQUIRED ⚠️
137
- * Please copy and paste the following tokens to your MyRegistry interface (usually in src/registry.ts):
138
- *
139
- * ${tokenPrefix}_QUERY_CONTROLLER: IController<any, any>;
140
- * ${tokenPrefix}_QUERY_HANDLER: IHandler<${pascalName}Query, any>;
141
- */
142
- }
143
- } as const);
144
- `
145
- await this._fileService.writeFileRecursive(
146
- path.join(componentDir, `${lowerName}.module.ts`),
147
- moduleContent,
148
- )
149
- }
150
- }
@@ -1,77 +0,0 @@
1
- import path from 'node:path'
2
-
3
- import type { IFileService, IGenerator } from '../../../domain'
4
- import { type CoreOptions } from '../../../shared'
5
-
6
- /**
7
- * @class DrizzleSqlLiteGenerator
8
- * @description Generates a Drizzle configuration file (drizzle.config.ts) and a
9
- * SQLite schema example (src/infrastructure/db/sqlite-schema.ts) when the user
10
- * opts to use SQLite/libSQL instead of Postgres.
11
- */
12
- export class DrizzleSqlLiteGenerator implements IGenerator<CoreOptions> {
13
- constructor(private readonly _fileService: IFileService) {}
14
-
15
- async generate(projectPath: string, _options: CoreOptions): Promise<void> {
16
- const configContent = this.composeDrizzleConfig()
17
- const filePath = path.join(projectPath, 'drizzle.config.ts')
18
- await this._fileService.writeFileRecursive(filePath, configContent)
19
-
20
- const schemaPath = path.join(projectPath, 'src', 'schema.ts')
21
- const schemaContent = this.composeSchema()
22
- await this._fileService.writeFileRecursive(schemaPath, schemaContent)
23
- }
24
-
25
- private composeDrizzleConfig(): string {
26
- return `/// <reference types="node" />
27
- import 'dotenv/config';
28
- import { defineConfig } from 'drizzle-kit';
29
-
30
- /**
31
- * Drizzle Kit configuration for SQLite / libSQL.
32
- * Uses environment variable SQLITE_DATABASE_URL to locate the database.
33
- */
34
- export default defineConfig({
35
- schema: './src/schema.ts',
36
- out: './drizzle',
37
- dialect: 'sqlite',
38
- dbCredentials: {
39
- url: process.env.SQLITE_DATABASE_URL!,
40
- },
41
- verbose: true,
42
- strict: true,
43
- });
44
- `
45
- }
46
-
47
- private composeSchema(): string {
48
- return `import { sqliteTable, integer, text } from 'drizzle-orm/sqlite-core';
49
-
50
- /**
51
- * Example SQLite schema using Drizzle's libsql primitives.
52
- * Place your application tables here (this file is scaffolded by the CLI when
53
- * the user opts into SQLite support).
54
- */
55
- export const usersTable = sqliteTable('users', {
56
- id: integer('id').primaryKey().notNull(),
57
- name: text('name').notNull(),
58
- description: text('description'),
59
- });
60
-
61
- /**
62
- * Types inferred from the schema.
63
- * - UserDto: Represents the shape of the data retrieved from the database ($inferSelect).
64
- * - NewUserDto: Represents the shape of the data required to insert a new record ($inferInsert).
65
- */
66
- export type UserDto = typeof usersTable.$inferSelect;
67
- export type NewUserDto = typeof usersTable.$inferInsert;
68
-
69
- /**
70
- * Centralized Database Schema dictionary.
71
- */
72
- export type SqliteSchema = {
73
- users: typeof usersTable;
74
- };
75
- `
76
- }
77
- }
@@ -1,87 +0,0 @@
1
- import path from 'node:path'
2
-
3
- import type { IFileService, IGenerator } from '../../../domain'
4
- import { type CoreOptions } from '../../../shared'
5
-
6
- /**
7
- * @class DrizzleGenerator
8
- * @description Generates the Drizzle configuration file (drizzle.config.ts) and a basic schema file (src/schema.ts) for database scaffolding.
9
- * The generator is only invoked if the user has opted to include database support in their project.
10
- *
11
- * @author Xeno
12
- * @version 1.0.0
13
- * @license ISC
14
- * @since 2025-09-30
15
- * @link https://github.com/xeno-js/xeno-js
16
- */
17
- export class DrizzleGenerator implements IGenerator<CoreOptions> {
18
- constructor(private readonly _fileService: IFileService) {}
19
-
20
- async generate(projectPath: string, _options: CoreOptions): Promise<void> {
21
- const configContent = this.composeDrizzleConfig()
22
- const filePath = path.join(projectPath, 'drizzle.config.ts')
23
- await this._fileService.writeFileRecursive(filePath, configContent)
24
-
25
- const schemaContent = this.composeSchema()
26
- await this._fileService.writeFileRecursive(
27
- path.join(projectPath, 'src', 'schema.ts'),
28
- schemaContent,
29
- )
30
- }
31
-
32
- private composeDrizzleConfig(): string {
33
- return `/// <reference types="node" />
34
- import 'dotenv/config';
35
- import { defineConfig } from 'drizzle-kit';
36
-
37
- /**
38
- * Drizzle Kit configuration file.
39
- * Defines the schema location, migration output directory, and database connection.
40
- */
41
- export default defineConfig({
42
- schema: './src/schema.ts',
43
- out: './drizzle',
44
- dialect: 'postgresql',
45
- dbCredentials: {
46
- url: process.env.DATABASE_URL!,
47
- },
48
- verbose: true,
49
- strict: true,
50
- });
51
- `
52
- }
53
-
54
- private composeSchema(): string {
55
- return `import { boolean, pgTable, serial, text, timestamp } from 'drizzle-orm/pg-core';
56
-
57
- /**
58
- * @description Define your database tables here.
59
- * The 'usersTable' serves as a baseline example.
60
- * You can add more tables, relations, and indexes according to your domain requirements.
61
- */
62
- export const usersTable = pgTable('users', {
63
- id: serial('id').primaryKey(),
64
- name: text('name').notNull(),
65
- email: text('email').notNull().unique(),
66
- isDeleted: boolean('is_deleted').notNull().default(false),
67
- deletedAt: timestamp('deleted_at'),
68
- createdAt: timestamp('created_at').defaultNow(),
69
- });
70
-
71
- /**
72
- * Types inferred from the schema.
73
- * - UserDto: Represents the shape of the data retrieved from the database ($inferSelect).
74
- * - NewUserDto: Represents the shape of the data required to insert a new record ($inferInsert).
75
- */
76
- export type UserDto = typeof usersTable.$inferSelect;
77
- export type NewUserDto = typeof usersTable.$inferInsert;
78
-
79
- /**
80
- * Centralized Database Schema dictionary.
81
- */
82
- export type DbSchema = {
83
- users: typeof usersTable;
84
- };
85
- `
86
- }
87
- }
@@ -1,69 +0,0 @@
1
- import path from 'node:path'
2
-
3
- import { type IFileService, type IGenerator } from '../../../domain'
4
- import { CORE_CONSTANTS, type CoreOptions } from '../../../shared'
5
-
6
- export class EnvGenerator implements IGenerator<CoreOptions> {
7
- constructor(private readonly _fileService: IFileService) {}
8
-
9
- public async generate(projectPath: string, options: CoreOptions): Promise<void> {
10
- let content = `# ─────────────────────────────────────────────────────────────────────────────
11
- # Xeno APPLICATION ENVIRONMENT VARIABLES
12
- # ─────────────────────────────────────────────────────────────────────────────
13
- NODE_ENV=development
14
- `
15
-
16
- // Configurazione Database
17
- if (options.database !== CORE_CONSTANTS.NONE) {
18
- if (options.database === CORE_CONSTANTS.DRIZZLE) {
19
- content += `\n# --- Database (PostgreSQL) ---
20
- DATABASE_URL=postgres://postgres:password@localhost:5432/xeno_db
21
- `
22
- } else if (options.database === CORE_CONSTANTS.SQL_LITE) {
23
- content += `\n# --- Database (SQLite) ---
24
- SQLITE_DATABASE_URL=file:./dev.sqlite
25
- `
26
- }
27
- }
28
-
29
- if (options.axios) {
30
- content += `\n# --- Axios ---
31
- BASE_URL=
32
- `
33
- }
34
-
35
- // Configurazione Redis (Caching, Idempotenza, Concorrenza)
36
- if (options.redis) {
37
- content += `\n# --- Cache (Redis) ---
38
- REDIS_HOST=localhost
39
- REDIS_PORT=6379
40
- REDIS_PASSWORD=
41
- REDIS_USERNAME=
42
- REDIS_TLS=false
43
- `
44
- }
45
-
46
- // Configurazione Supabase (Autenticazione)
47
- if (options.supabase) {
48
- content += `\n# --- Authentication (Supabase) ---
49
- SUPABASE_URL=https://your-project.supabase.co
50
- SUPABASE_KEY=your-anon-key
51
- `
52
- }
53
-
54
- // Configurazione Logging & Observability
55
- if (options.sentry) {
56
- content += `\n# --- Error Tracking (Sentry) ---
57
- SENTRY_DSN=https://your-sentry-dsn@o0.ingest.sentry.io/0
58
- SENTRY_ENVIRONMENT=development
59
- `
60
- }
61
-
62
- // Creiamo sia il file effettivo che il file di esempio
63
- const envPath = path.join(projectPath, '.env')
64
- const envExamplePath = path.join(projectPath, '.env.example')
65
-
66
- await this._fileService.writeFileRecursive(envPath, content)
67
- await this._fileService.writeFileRecursive(envExamplePath, content)
68
- }
69
- }
@@ -1,9 +0,0 @@
1
- export * from './bootstrap.generator'
2
- export * from './drizzle.generator'
3
- export * from './drizzle-sql-lite.generator'
4
- export * from './env.generator'
5
- export * from './main.generator'
6
- export * from './packagejson.generator'
7
- export * from './readme.generator'
8
- export * from './registry.generator'
9
- export * from './tsconfig.generator'
@@ -1,41 +0,0 @@
1
- import path from 'node:path'
2
-
3
- import type { IFileService, IGenerator } from '../../../domain'
4
- import { type CoreOptions } from '../../../shared'
5
-
6
- export class MainGenerator implements IGenerator<CoreOptions> {
7
- constructor(private readonly _fileService: IFileService) {}
8
-
9
- public async generate(projectPath: string, options: CoreOptions): Promise<void> {
10
- const content = `import 'dotenv/config';
11
- import { bootstrap } from './bootstrap';
12
- import { TOKENS } from '@xeno-js/core';
13
-
14
- /**
15
- * Main Application Entry Point
16
- */
17
- async function main() {
18
- try {
19
- console.info('⏳ Bootstrapping ${options.targetDir} application...');
20
-
21
- // Initialize the dependency injection container and infrastructure modules
22
- const container = await bootstrap();
23
-
24
- const logger = container.resolve(TOKENS.LOGGER)
25
- logger.info('✅ Application started successfully!');
26
-
27
- // TODO: Implement your logic here
28
-
29
- } catch (error) {
30
- console.error('❌ Critical error during startup:', error);
31
- process.exit(1);
32
- }
33
- }
34
-
35
- main();
36
- `
37
-
38
- const filePath = path.join(projectPath, 'src', 'main.ts')
39
- await this._fileService.writeFileRecursive(filePath, content)
40
- }
41
- }
@@ -1,70 +0,0 @@
1
- import path from 'node:path'
2
-
3
- import type { IFileService, IGenerator } from '../../../domain'
4
- import { CORE_CONSTANTS, type CoreOptions } from '../../../shared'
5
-
6
- export class PackageJsonCoreGenerator implements IGenerator<CoreOptions> {
7
- constructor(private readonly _fileService: IFileService) { }
8
-
9
- public async generate(projectPath: string, options: CoreOptions): Promise<void> {
10
- const packageJson = {
11
- name: options.targetDir,
12
- version: '1.0.0',
13
- private: true,
14
- main: './dist/index.js',
15
- module: './dist/index.js',
16
- types: './dist/index.d.ts',
17
- scripts: {
18
- start: 'tsx src/main.ts',
19
- build: 'tsc --project tsconfig.json',
20
- g: 'xeno-js generate',
21
- } as Record<string, string>,
22
- dependencies: {
23
- '@xeno-js/core': 'latest',
24
- 'dotenv': '^16.4.5',
25
- } as Record<string, string>,
26
- devDependencies: {
27
- '@types/node': '^20.0.0',
28
- 'tsx': '^4.7.0',
29
- 'typescript': '^5.8.0',
30
- } as Record<string, string>,
31
- }
32
-
33
- // Database & ORM
34
- if (options.database !== CORE_CONSTANTS.NONE) {
35
- packageJson.dependencies['drizzle-orm'] = '^0.45.3'
36
- packageJson.dependencies['pg'] = '^8.23.0'
37
- packageJson.dependencies['postgres'] = '^3.4.9'
38
- packageJson.devDependencies['@types/pg'] = '^8.23.1'
39
- packageJson.devDependencies['drizzle-kit'] = '^0.31.11'
40
- packageJson.scripts['db:migrate'] = 'drizzle-kit migrate'
41
- packageJson.dependencies['drizzle-orm'] = '^0.45.3'
42
- packageJson.devDependencies['drizzle-kit'] = '^0.31.11'
43
- packageJson.dependencies['@libsql/client'] = '^0.14.0'
44
- packageJson.scripts['db:generate'] = 'drizzle-kit generate'
45
- packageJson.scripts['db:push'] = 'drizzle-kit push'
46
- }
47
-
48
- // HTTP / External Calls
49
- if (options.axios) packageJson.dependencies['axios'] = '^1.20.0'
50
- if (options.cockatiel) packageJson.dependencies['cockatiel'] = '^4.0.0'
51
-
52
- // Logging & Observability
53
- if (options.pino) {
54
- packageJson.dependencies['pino'] = '^10.3.1'
55
- packageJson.devDependencies['pino-pretty'] = '^11.2.2'
56
- }
57
- if (options.sentry) packageJson.dependencies['@sentry/node'] = '^11.0.0'
58
-
59
- // Services
60
- if (options.redis) packageJson.dependencies['ioredis'] = '^6.0.0'
61
- if (options.supabase) {
62
- packageJson.dependencies['@supabase/supabase-js'] = '^2.117.1'
63
- packageJson.dependencies['@supabase/ssr'] = '^0.12.7'
64
- }
65
- if (options.zod) packageJson.dependencies['zod'] = '^4.6.5'
66
-
67
- const filePath = path.join(projectPath, 'package.json')
68
- await this._fileService.writeFileRecursive(filePath, JSON.stringify(packageJson, null, 2))
69
- }
70
- }