@xeno-js/cli 0.1.2 → 0.1.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/dist/index.js +33 -35
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/infrastructure/commands/command-runner.service.ts +1 -1
- package/src/infrastructure/generators/core/drizzle-sql-lite.generator.ts +2 -1
- package/src/infrastructure/generators/core/drizzle.generator.ts +2 -1
- package/src/infrastructure/generators/core/packagejson.generator.ts +20 -20
- package/src/infrastructure/generators/core/tsconfig.generator.ts +2 -9
- package/src/infrastructure/generators/vue/bootstrap-ts.generator.ts +1 -1
- package/src/infrastructure/generators/vue/packagejson.generator.ts +11 -11
package/package.json
CHANGED
|
@@ -23,7 +23,8 @@ export class DrizzleSqlLiteGenerator implements IGenerator<CoreOptions> {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
private composeDrizzleConfig(): string {
|
|
26
|
-
return
|
|
26
|
+
return `/// <reference types="node" />
|
|
27
|
+
import 'dotenv/config';
|
|
27
28
|
import { defineConfig } from 'drizzle-kit';
|
|
28
29
|
|
|
29
30
|
/**
|
|
@@ -30,7 +30,8 @@ export class DrizzleGenerator implements IGenerator<CoreOptions> {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
private composeDrizzleConfig(): string {
|
|
33
|
-
return
|
|
33
|
+
return `/// <reference types="node" />
|
|
34
|
+
import 'dotenv/config';
|
|
34
35
|
import { defineConfig } from 'drizzle-kit';
|
|
35
36
|
|
|
36
37
|
/**
|
|
@@ -4,7 +4,7 @@ import type { IFileService, IGenerator } from '../../../domain'
|
|
|
4
4
|
import { CORE_CONSTANTS, type CoreOptions } from '../../../shared'
|
|
5
5
|
|
|
6
6
|
export class PackageJsonCoreGenerator implements IGenerator<CoreOptions> {
|
|
7
|
-
constructor(private readonly _fileService: IFileService) {}
|
|
7
|
+
constructor(private readonly _fileService: IFileService) { }
|
|
8
8
|
|
|
9
9
|
public async generate(projectPath: string, options: CoreOptions): Promise<void> {
|
|
10
10
|
const packageJson = {
|
|
@@ -26,30 +26,27 @@ export class PackageJsonCoreGenerator implements IGenerator<CoreOptions> {
|
|
|
26
26
|
devDependencies: {
|
|
27
27
|
'@types/node': '^20.0.0',
|
|
28
28
|
'tsx': '^4.7.0',
|
|
29
|
-
'typescript': '^5.
|
|
29
|
+
'typescript': '^5.8.0',
|
|
30
30
|
} as Record<string, string>,
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
// Database & ORM
|
|
34
34
|
if (options.database !== CORE_CONSTANTS.NONE) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
packageJson.dependencies['@libsql/client'] = '^0.14.0'
|
|
45
|
-
packageJson.devDependencies['drizzle-kit'] = '^0.31.10'
|
|
46
|
-
}
|
|
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'
|
|
47
44
|
packageJson.scripts['db:generate'] = 'drizzle-kit generate'
|
|
48
45
|
packageJson.scripts['db:push'] = 'drizzle-kit push'
|
|
49
46
|
}
|
|
50
47
|
|
|
51
48
|
// HTTP / External Calls
|
|
52
|
-
if (options.axios) packageJson.dependencies['axios'] = '^1.
|
|
49
|
+
if (options.axios) packageJson.dependencies['axios'] = '^1.20.0'
|
|
53
50
|
if (options.cockatiel) packageJson.dependencies['cockatiel'] = '^4.0.0'
|
|
54
51
|
|
|
55
52
|
// Logging & Observability
|
|
@@ -57,14 +54,17 @@ export class PackageJsonCoreGenerator implements IGenerator<CoreOptions> {
|
|
|
57
54
|
packageJson.dependencies['pino'] = '^10.3.1'
|
|
58
55
|
packageJson.devDependencies['pino-pretty'] = '^11.2.2'
|
|
59
56
|
}
|
|
60
|
-
if (options.sentry) packageJson.dependencies['@sentry/node'] = '^
|
|
57
|
+
if (options.sentry) packageJson.dependencies['@sentry/node'] = '^11.0.0'
|
|
61
58
|
|
|
62
59
|
// Services
|
|
63
|
-
if (options.redis) packageJson.dependencies['ioredis'] = '^
|
|
64
|
-
if (options.supabase)
|
|
65
|
-
|
|
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
66
|
|
|
67
67
|
const filePath = path.join(projectPath, 'package.json')
|
|
68
68
|
await this._fileService.writeFileRecursive(filePath, JSON.stringify(packageJson, null, 2))
|
|
69
69
|
}
|
|
70
|
-
}
|
|
70
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import path from 'node:path'
|
|
2
2
|
|
|
3
3
|
import type { IFileService, IGenerator } from '../../../domain'
|
|
4
|
-
import {
|
|
4
|
+
import type { CoreOptions } from '../../../shared'
|
|
5
5
|
|
|
6
6
|
export class TsconfigGenerator implements IGenerator<CoreOptions> {
|
|
7
7
|
constructor(private readonly _fileService: IFileService) {}
|
|
8
8
|
|
|
9
|
-
public async generate(projectPath: string,
|
|
9
|
+
public async generate(projectPath: string, _options: CoreOptions): Promise<void> {
|
|
10
10
|
const tsconfig = {
|
|
11
11
|
compilerOptions: {
|
|
12
12
|
target: 'ES2022',
|
|
@@ -26,13 +26,6 @@ export class TsconfigGenerator implements IGenerator<CoreOptions> {
|
|
|
26
26
|
include: ['src/**/*.ts'],
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
if (
|
|
30
|
-
options.database === CORE_CONSTANTS.DRIZZLE ||
|
|
31
|
-
options.database === CORE_CONSTANTS.SQL_LITE
|
|
32
|
-
) {
|
|
33
|
-
tsconfig.include.push('drizzle.config.ts')
|
|
34
|
-
}
|
|
35
|
-
|
|
36
29
|
const filePath = path.join(projectPath, 'tsconfig.json')
|
|
37
30
|
await this._fileService.writeFileRecursive(filePath, JSON.stringify(tsconfig, null, 2))
|
|
38
31
|
}
|
|
@@ -19,7 +19,7 @@ export class BootstrapGenerator implements IGenerator<VueOptions> {
|
|
|
19
19
|
|
|
20
20
|
if (options.sentry) {
|
|
21
21
|
builderNodes += `\n .addLogger((opts, config) => {
|
|
22
|
-
const env = config.get(
|
|
22
|
+
const env = config.get('APP_ENV') ?? 'development'
|
|
23
23
|
const isDev = env.toLowerCase() === 'development'
|
|
24
24
|
opts.console = isDev
|
|
25
25
|
if (!isDev) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import path from 'node:path'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import type { IFileService, IGenerator } from '../../../domain'
|
|
4
4
|
import type { VueOptions } from '../../../shared'
|
|
5
5
|
|
|
6
6
|
export class PackageJsonVueGenerator implements IGenerator<VueOptions> {
|
|
7
|
-
constructor(private readonly _fileService: IFileService) {}
|
|
7
|
+
constructor(private readonly _fileService: IFileService) { }
|
|
8
8
|
|
|
9
9
|
public async generate(projectPath: string, options: VueOptions): Promise<void> {
|
|
10
10
|
const packageJson = {
|
|
@@ -20,24 +20,24 @@ export class PackageJsonVueGenerator implements IGenerator<VueOptions> {
|
|
|
20
20
|
} as Record<string, string>,
|
|
21
21
|
dependencies: {
|
|
22
22
|
'@xeno-js/vue': 'latest',
|
|
23
|
-
'vue': '^3.5.
|
|
23
|
+
'vue': '^3.5.43',
|
|
24
24
|
} as Record<string, string>,
|
|
25
25
|
devDependencies: {
|
|
26
26
|
'@types/node': '^20.0.0',
|
|
27
27
|
'@vitejs/plugin-vue': '^5.1.0',
|
|
28
|
-
'typescript': '^5.
|
|
28
|
+
'typescript': '^5.8.0',
|
|
29
29
|
'vite': '^5.4.0',
|
|
30
|
-
'vue-tsc': '^
|
|
30
|
+
'vue-tsc': '^3.3.11',
|
|
31
31
|
} as Record<string, string>,
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
if (options.axios) packageJson.dependencies['axios'] = '^1.
|
|
34
|
+
if (options.axios) packageJson.dependencies['axios'] = '^1.20.0'
|
|
35
35
|
if (options.cockatiel) packageJson.dependencies['cockatiel'] = '^4.0.0'
|
|
36
|
-
if (options.supabase) packageJson.dependencies['@supabase/supabase-js'] = '^2.
|
|
37
|
-
if (options.sentry) packageJson.dependencies['@sentry/vue'] = '^
|
|
36
|
+
if (options.supabase) packageJson.dependencies['@supabase/supabase-js'] = '^2.117.1'
|
|
37
|
+
if (options.sentry) packageJson.dependencies['@sentry/vue'] = '^10.75.2'
|
|
38
38
|
if (options.pinia) packageJson.dependencies['pinia'] = '^2.2.0'
|
|
39
|
-
if (options.router) packageJson.dependencies['vue-router'] = '^4.4
|
|
40
|
-
if (options.zod) packageJson.dependencies['zod'] = '^4.
|
|
39
|
+
if (options.router) packageJson.dependencies['vue-router'] = '^4.6.4'
|
|
40
|
+
if (options.zod) packageJson.dependencies['zod'] = '^4.6.5'
|
|
41
41
|
|
|
42
42
|
if (options.tailwind) {
|
|
43
43
|
packageJson.devDependencies['tailwindcss'] = '^4.0.0'
|
|
@@ -47,4 +47,4 @@ export class PackageJsonVueGenerator implements IGenerator<VueOptions> {
|
|
|
47
47
|
const filePath = path.join(projectPath, 'package.json')
|
|
48
48
|
await this._fileService.writeFileRecursive(filePath, JSON.stringify(packageJson, null, 2))
|
|
49
49
|
}
|
|
50
|
-
}
|
|
50
|
+
}
|