@geekmidas/cli 0.10.0 → 0.13.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 +525 -0
- package/dist/bundler-B1qy9b-j.cjs +112 -0
- package/dist/bundler-B1qy9b-j.cjs.map +1 -0
- package/dist/bundler-DskIqW2t.mjs +111 -0
- package/dist/bundler-DskIqW2t.mjs.map +1 -0
- package/dist/{config-C9aXOHBe.cjs → config-AmInkU7k.cjs} +8 -8
- package/dist/config-AmInkU7k.cjs.map +1 -0
- package/dist/{config-BrkUalUh.mjs → config-DYULeEv8.mjs} +3 -3
- package/dist/config-DYULeEv8.mjs.map +1 -0
- package/dist/config.cjs +1 -1
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +1 -1
- package/dist/encryption-C8H-38Yy.mjs +42 -0
- package/dist/encryption-C8H-38Yy.mjs.map +1 -0
- package/dist/encryption-Dyf_r1h-.cjs +44 -0
- package/dist/encryption-Dyf_r1h-.cjs.map +1 -0
- package/dist/index.cjs +2123 -179
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +2141 -192
- package/dist/index.mjs.map +1 -1
- package/dist/{openapi-CZLI4QTr.mjs → openapi-BfFlOBCG.mjs} +801 -38
- package/dist/openapi-BfFlOBCG.mjs.map +1 -0
- package/dist/{openapi-BeHLKcwP.cjs → openapi-Bt_1FDpT.cjs} +794 -31
- package/dist/openapi-Bt_1FDpT.cjs.map +1 -0
- package/dist/{openapi-react-query-o5iMi8tz.cjs → openapi-react-query-B-sNWHFU.cjs} +5 -5
- package/dist/openapi-react-query-B-sNWHFU.cjs.map +1 -0
- package/dist/{openapi-react-query-CcciaVu5.mjs → openapi-react-query-B6XTeGqS.mjs} +5 -5
- package/dist/openapi-react-query-B6XTeGqS.mjs.map +1 -0
- package/dist/openapi-react-query.cjs +1 -1
- package/dist/openapi-react-query.d.cts.map +1 -1
- package/dist/openapi-react-query.d.mts.map +1 -1
- package/dist/openapi-react-query.mjs +1 -1
- package/dist/openapi.cjs +2 -2
- package/dist/openapi.d.cts +1 -1
- package/dist/openapi.d.cts.map +1 -1
- package/dist/openapi.d.mts +1 -1
- package/dist/openapi.d.mts.map +1 -1
- package/dist/openapi.mjs +2 -2
- package/dist/storage-BOOpAF8N.cjs +5 -0
- package/dist/storage-Bj1E26lU.cjs +187 -0
- package/dist/storage-Bj1E26lU.cjs.map +1 -0
- package/dist/storage-kSxTjkNb.mjs +133 -0
- package/dist/storage-kSxTjkNb.mjs.map +1 -0
- package/dist/storage-tgZSUnKl.mjs +3 -0
- package/dist/{types-b-vwGpqc.d.cts → types-BR0M2v_c.d.mts} +100 -1
- package/dist/types-BR0M2v_c.d.mts.map +1 -0
- package/dist/{types-DXgiA1sF.d.mts → types-BhkZc-vm.d.cts} +100 -1
- package/dist/types-BhkZc-vm.d.cts.map +1 -0
- package/examples/cron-example.ts +27 -27
- package/examples/env.ts +27 -27
- package/examples/function-example.ts +31 -31
- package/examples/gkm.config.json +20 -20
- package/examples/gkm.config.ts +8 -8
- package/examples/gkm.minimal.config.json +5 -5
- package/examples/gkm.production.config.json +25 -25
- package/examples/logger.ts +2 -2
- package/package.json +6 -6
- package/src/__tests__/EndpointGenerator.hooks.spec.ts +191 -191
- package/src/__tests__/config.spec.ts +55 -55
- package/src/__tests__/loadEnvFiles.spec.ts +93 -93
- package/src/__tests__/normalizeHooksConfig.spec.ts +58 -58
- package/src/__tests__/openapi-react-query.spec.ts +497 -497
- package/src/__tests__/openapi.spec.ts +428 -428
- package/src/__tests__/test-helpers.ts +76 -76
- package/src/auth/__tests__/credentials.spec.ts +204 -0
- package/src/auth/__tests__/index.spec.ts +168 -0
- package/src/auth/credentials.ts +187 -0
- package/src/auth/index.ts +226 -0
- package/src/build/__tests__/bundler.spec.ts +444 -0
- package/src/build/__tests__/index-new.spec.ts +474 -474
- package/src/build/__tests__/manifests.spec.ts +333 -333
- package/src/build/bundler.ts +210 -0
- package/src/build/endpoint-analyzer.ts +236 -0
- package/src/build/handler-templates.ts +1253 -0
- package/src/build/index.ts +260 -179
- package/src/build/manifests.ts +52 -52
- package/src/build/providerResolver.ts +145 -145
- package/src/build/types.ts +64 -43
- package/src/config.ts +39 -39
- package/src/deploy/__tests__/docker.spec.ts +111 -0
- package/src/deploy/__tests__/dokploy.spec.ts +245 -0
- package/src/deploy/__tests__/init.spec.ts +662 -0
- package/src/deploy/docker.ts +128 -0
- package/src/deploy/dokploy.ts +204 -0
- package/src/deploy/index.ts +136 -0
- package/src/deploy/init.ts +484 -0
- package/src/deploy/types.ts +48 -0
- package/src/dev/__tests__/index.spec.ts +266 -266
- package/src/dev/index.ts +647 -601
- package/src/docker/__tests__/compose.spec.ts +531 -0
- package/src/docker/__tests__/templates.spec.ts +280 -0
- package/src/docker/compose.ts +273 -0
- package/src/docker/index.ts +230 -0
- package/src/docker/templates.ts +446 -0
- package/src/generators/CronGenerator.ts +72 -72
- package/src/generators/EndpointGenerator.ts +699 -398
- package/src/generators/FunctionGenerator.ts +84 -84
- package/src/generators/Generator.ts +72 -72
- package/src/generators/OpenApiTsGenerator.ts +577 -577
- package/src/generators/SubscriberGenerator.ts +124 -124
- package/src/generators/__tests__/CronGenerator.spec.ts +433 -433
- package/src/generators/__tests__/EndpointGenerator.spec.ts +532 -382
- package/src/generators/__tests__/FunctionGenerator.spec.ts +244 -244
- package/src/generators/__tests__/SubscriberGenerator.spec.ts +397 -382
- package/src/generators/index.ts +4 -4
- package/src/index.ts +623 -201
- package/src/init/__tests__/generators.spec.ts +334 -334
- package/src/init/__tests__/init.spec.ts +332 -332
- package/src/init/__tests__/utils.spec.ts +89 -89
- package/src/init/generators/config.ts +175 -175
- package/src/init/generators/docker.ts +41 -41
- package/src/init/generators/env.ts +72 -72
- package/src/init/generators/index.ts +1 -1
- package/src/init/generators/models.ts +64 -64
- package/src/init/generators/monorepo.ts +161 -161
- package/src/init/generators/package.ts +71 -71
- package/src/init/generators/source.ts +6 -6
- package/src/init/index.ts +203 -208
- package/src/init/templates/api.ts +115 -115
- package/src/init/templates/index.ts +75 -75
- package/src/init/templates/minimal.ts +98 -98
- package/src/init/templates/serverless.ts +89 -89
- package/src/init/templates/worker.ts +98 -98
- package/src/init/utils.ts +54 -56
- package/src/openapi-react-query.ts +194 -194
- package/src/openapi.ts +63 -63
- package/src/secrets/__tests__/encryption.spec.ts +226 -0
- package/src/secrets/__tests__/generator.spec.ts +319 -0
- package/src/secrets/__tests__/index.spec.ts +91 -0
- package/src/secrets/__tests__/storage.spec.ts +611 -0
- package/src/secrets/encryption.ts +91 -0
- package/src/secrets/generator.ts +164 -0
- package/src/secrets/index.ts +383 -0
- package/src/secrets/storage.ts +192 -0
- package/src/secrets/types.ts +53 -0
- package/src/types.ts +295 -176
- package/tsdown.config.ts +11 -8
- package/dist/config-BrkUalUh.mjs.map +0 -1
- package/dist/config-C9aXOHBe.cjs.map +0 -1
- package/dist/openapi-BeHLKcwP.cjs.map +0 -1
- package/dist/openapi-CZLI4QTr.mjs.map +0 -1
- package/dist/openapi-react-query-CcciaVu5.mjs.map +0 -1
- package/dist/openapi-react-query-o5iMi8tz.cjs.map +0 -1
- package/dist/types-DXgiA1sF.d.mts.map +0 -1
- package/dist/types-b-vwGpqc.d.cts.map +0 -1
|
@@ -1,68 +1,68 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
GeneratedFile,
|
|
3
|
+
TemplateConfig,
|
|
4
|
+
TemplateOptions,
|
|
5
5
|
} from './index.js';
|
|
6
6
|
|
|
7
7
|
export const workerTemplate: TemplateConfig = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
8
|
+
name: 'worker',
|
|
9
|
+
description: 'Background job processing',
|
|
10
|
+
|
|
11
|
+
dependencies: {
|
|
12
|
+
'@geekmidas/constructs': 'workspace:*',
|
|
13
|
+
'@geekmidas/envkit': 'workspace:*',
|
|
14
|
+
'@geekmidas/logger': 'workspace:*',
|
|
15
|
+
'@geekmidas/events': 'workspace:*',
|
|
16
|
+
hono: '~4.8.2',
|
|
17
|
+
pino: '~9.6.0',
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
devDependencies: {
|
|
21
|
+
'@biomejs/biome': '~1.9.4',
|
|
22
|
+
'@geekmidas/cli': 'workspace:*',
|
|
23
|
+
'@types/node': '~22.0.0',
|
|
24
|
+
tsx: '~4.20.0',
|
|
25
|
+
turbo: '~2.3.0',
|
|
26
|
+
typescript: '~5.8.2',
|
|
27
|
+
vitest: '~4.0.0',
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
scripts: {
|
|
31
|
+
dev: 'gkm dev',
|
|
32
|
+
build: 'gkm build',
|
|
33
|
+
test: 'vitest',
|
|
34
|
+
'test:once': 'vitest run',
|
|
35
|
+
typecheck: 'tsc --noEmit',
|
|
36
|
+
lint: 'biome lint .',
|
|
37
|
+
fmt: 'biome format . --write',
|
|
38
|
+
'fmt:check': 'biome format .',
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
files: (options: TemplateOptions): GeneratedFile[] => {
|
|
42
|
+
const { loggerType, routesStructure } = options;
|
|
43
|
+
|
|
44
|
+
const loggerContent = `import { createLogger } from '@geekmidas/logger/${loggerType}';
|
|
45
45
|
|
|
46
46
|
export const logger = createLogger();
|
|
47
47
|
`;
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
49
|
+
// Get route path based on structure
|
|
50
|
+
const getRoutePath = (file: string) => {
|
|
51
|
+
switch (routesStructure) {
|
|
52
|
+
case 'centralized-endpoints':
|
|
53
|
+
return `src/endpoints/${file}`;
|
|
54
|
+
case 'centralized-routes':
|
|
55
|
+
return `src/routes/${file}`;
|
|
56
|
+
case 'domain-based':
|
|
57
|
+
return `src/${file.replace('.ts', '')}/routes/index.ts`;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const files: GeneratedFile[] = [
|
|
62
|
+
// src/config/env.ts
|
|
63
|
+
{
|
|
64
|
+
path: 'src/config/env.ts',
|
|
65
|
+
content: `import { EnvironmentParser } from '@geekmidas/envkit';
|
|
66
66
|
|
|
67
67
|
export const envParser = new EnvironmentParser(process.env);
|
|
68
68
|
|
|
@@ -73,28 +73,28 @@ export const config = envParser
|
|
|
73
73
|
rabbitmq: {
|
|
74
74
|
url: get('RABBITMQ_URL').string().default('amqp://localhost:5672'),
|
|
75
75
|
},${
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
options.database
|
|
77
|
+
? `
|
|
78
78
|
database: {
|
|
79
79
|
url: get('DATABASE_URL').string().default('postgresql://localhost:5432/mydb'),
|
|
80
80
|
},`
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
: ''
|
|
82
|
+
}
|
|
83
83
|
}))
|
|
84
84
|
.parse();
|
|
85
85
|
`,
|
|
86
|
-
|
|
86
|
+
},
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
// src/config/logger.ts
|
|
89
|
+
{
|
|
90
|
+
path: 'src/config/logger.ts',
|
|
91
|
+
content: loggerContent,
|
|
92
|
+
},
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
// health endpoint
|
|
95
|
+
{
|
|
96
|
+
path: getRoutePath('health.ts'),
|
|
97
|
+
content: `import { e } from '@geekmidas/constructs/endpoints';
|
|
98
98
|
|
|
99
99
|
export default e
|
|
100
100
|
.get('/health')
|
|
@@ -103,12 +103,12 @@ export default e
|
|
|
103
103
|
timestamp: new Date().toISOString(),
|
|
104
104
|
}));
|
|
105
105
|
`,
|
|
106
|
-
|
|
106
|
+
},
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
// src/events/types.ts
|
|
109
|
+
{
|
|
110
|
+
path: 'src/events/types.ts',
|
|
111
|
+
content: `import type { PublishableMessage } from '@geekmidas/events';
|
|
112
112
|
|
|
113
113
|
// Define your event types here
|
|
114
114
|
export type AppEvents =
|
|
@@ -116,12 +116,12 @@ export type AppEvents =
|
|
|
116
116
|
| PublishableMessage<'user.updated', { userId: string; changes: Record<string, unknown> }>
|
|
117
117
|
| PublishableMessage<'order.placed', { orderId: string; userId: string; total: number }>;
|
|
118
118
|
`,
|
|
119
|
-
|
|
119
|
+
},
|
|
120
120
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
// src/subscribers/user-events.ts
|
|
122
|
+
{
|
|
123
|
+
path: 'src/subscribers/user-events.ts',
|
|
124
|
+
content: `import { s } from '@geekmidas/constructs/subscribers';
|
|
125
125
|
import type { AppEvents } from '../events/types.js';
|
|
126
126
|
|
|
127
127
|
export default s<AppEvents>()
|
|
@@ -141,12 +141,12 @@ export default s<AppEvents>()
|
|
|
141
141
|
}
|
|
142
142
|
});
|
|
143
143
|
`,
|
|
144
|
-
|
|
144
|
+
},
|
|
145
145
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
// src/crons/cleanup.ts
|
|
147
|
+
{
|
|
148
|
+
path: 'src/crons/cleanup.ts',
|
|
149
|
+
content: `import { cron } from '@geekmidas/constructs/crons';
|
|
150
150
|
|
|
151
151
|
// Run every day at midnight
|
|
152
152
|
export default cron('0 0 * * *')
|
|
@@ -159,14 +159,14 @@ export default cron('0 0 * * *')
|
|
|
159
159
|
logger.info('Cleanup job completed');
|
|
160
160
|
});
|
|
161
161
|
`,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
162
|
+
},
|
|
163
|
+
];
|
|
164
|
+
|
|
165
|
+
// Add Telescope config if enabled
|
|
166
|
+
if (options.telescope) {
|
|
167
|
+
files.push({
|
|
168
|
+
path: 'src/config/telescope.ts',
|
|
169
|
+
content: `import { Telescope } from '@geekmidas/telescope';
|
|
170
170
|
import { InMemoryStorage } from '@geekmidas/telescope/storage/memory';
|
|
171
171
|
|
|
172
172
|
export const telescope = new Telescope({
|
|
@@ -174,9 +174,9 @@ export const telescope = new Telescope({
|
|
|
174
174
|
enabled: process.env.NODE_ENV === 'development',
|
|
175
175
|
});
|
|
176
176
|
`,
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
179
|
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
return files;
|
|
181
|
+
},
|
|
182
182
|
};
|
package/src/init/utils.ts
CHANGED
|
@@ -7,92 +7,90 @@ export type PackageManager = 'pnpm' | 'npm' | 'yarn' | 'bun';
|
|
|
7
7
|
* Detect the package manager being used based on lockfiles or npm_config_user_agent
|
|
8
8
|
*/
|
|
9
9
|
export function detectPackageManager(
|
|
10
|
-
|
|
10
|
+
cwd: string = process.cwd(),
|
|
11
11
|
): PackageManager {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
// Check for lockfiles in cwd
|
|
13
|
+
if (existsSync(join(cwd, 'pnpm-lock.yaml'))) return 'pnpm';
|
|
14
|
+
if (existsSync(join(cwd, 'yarn.lock'))) return 'yarn';
|
|
15
|
+
if (existsSync(join(cwd, 'bun.lockb'))) return 'bun';
|
|
16
|
+
if (existsSync(join(cwd, 'package-lock.json'))) return 'npm';
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
// Check npm_config_user_agent (set when running via npx/pnpm dlx/etc)
|
|
19
|
+
const userAgent = process.env.npm_config_user_agent || '';
|
|
20
|
+
if (userAgent.includes('pnpm')) return 'pnpm';
|
|
21
|
+
if (userAgent.includes('yarn')) return 'yarn';
|
|
22
|
+
if (userAgent.includes('bun')) return 'bun';
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
return 'npm';
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Validate project name for npm package naming conventions
|
|
29
29
|
*/
|
|
30
30
|
export function validateProjectName(name: string): boolean | string {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
if (!name) {
|
|
32
|
+
return 'Project name is required';
|
|
33
|
+
}
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
// Check for valid npm package name characters
|
|
36
|
+
if (!/^[a-z0-9-_@/.]+$/i.test(name)) {
|
|
37
|
+
return 'Project name can only contain letters, numbers, hyphens, underscores, @, /, and .';
|
|
38
|
+
}
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
// Check for reserved names
|
|
41
|
+
const reserved = ['node_modules', '.git', 'package.json', 'src'];
|
|
42
|
+
if (reserved.includes(name.toLowerCase())) {
|
|
43
|
+
return `"${name}" is a reserved name`;
|
|
44
|
+
}
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
return true;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Check if a directory already exists at the target path
|
|
51
51
|
*/
|
|
52
52
|
export function checkDirectoryExists(
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
name: string,
|
|
54
|
+
cwd: string = process.cwd(),
|
|
55
55
|
): boolean | string {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
const targetPath = join(cwd, name);
|
|
57
|
+
if (existsSync(targetPath)) {
|
|
58
|
+
return `Directory "${name}" already exists`;
|
|
59
|
+
}
|
|
60
|
+
return true;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
64
|
* Get the install command for a package manager
|
|
65
65
|
*/
|
|
66
66
|
export function getInstallCommand(pkgManager: PackageManager): string {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
67
|
+
switch (pkgManager) {
|
|
68
|
+
case 'pnpm':
|
|
69
|
+
return 'pnpm install';
|
|
70
|
+
case 'yarn':
|
|
71
|
+
return 'yarn';
|
|
72
|
+
case 'bun':
|
|
73
|
+
return 'bun install';
|
|
74
|
+
default:
|
|
75
|
+
return 'npm install';
|
|
76
|
+
}
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
/**
|
|
81
80
|
* Get the dev command for a package manager
|
|
82
81
|
*/
|
|
83
82
|
export function getRunCommand(
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
pkgManager: PackageManager,
|
|
84
|
+
script: string,
|
|
86
85
|
): string {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
86
|
+
switch (pkgManager) {
|
|
87
|
+
case 'pnpm':
|
|
88
|
+
return `pnpm ${script}`;
|
|
89
|
+
case 'yarn':
|
|
90
|
+
return `yarn ${script}`;
|
|
91
|
+
case 'bun':
|
|
92
|
+
return `bun run ${script}`;
|
|
93
|
+
default:
|
|
94
|
+
return `npm run ${script}`;
|
|
95
|
+
}
|
|
98
96
|
}
|