@kimesh/cli 0.1.0-nightly.20260120063147 → 0.1.1-nightly.20260120033751
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/bin/km.mjs +0 -0
- package/dist/index.d.ts +1 -361
- package/dist/index.js +1 -80
- package/dist/main.d.ts +1 -1
- package/dist/main.js +1 -1
- package/dist/run.d.ts +1 -1
- package/dist/run.js +5 -2
- package/package.json +11 -32
- package/dist/_shared-CEwpPT2B.js +0 -84
- package/dist/build-Ce4Dm8mI.js +0 -34
- package/dist/commands/init.d.ts +0 -24
- package/dist/commands/init.js +0 -198
- package/dist/dev-o5sR0-kW.js +0 -75
- package/dist/generate-Dx64ract.js +0 -21
- package/dist/kit-BcEYldTS.js +0 -39
- package/dist/layer-D829AuwM.js +0 -258
- package/dist/main-CCPXvZyj.d.ts +0 -10
- package/dist/main-DncTPs_e.js +0 -47
- package/dist/prepare-DScUWnaY.js +0 -45
- package/dist/run-DCL2u7IK.js +0 -15
- package/dist/run-DiuH8yNF.d.ts +0 -8
package/bin/km.mjs
CHANGED
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,362 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { run$1 as run } from "./run-DiuH8yNF.js";
|
|
3
|
-
import * as citty2 from "citty";
|
|
4
|
-
import * as consola0 from "consola";
|
|
5
|
-
import * as _kimesh_kit0 from "@kimesh/kit";
|
|
6
|
-
|
|
7
|
-
//#region src/commands/index.d.ts
|
|
8
|
-
/**
|
|
9
|
-
* Command registry with lazy loading
|
|
10
|
-
* Commands are only imported when actually used
|
|
11
|
-
*/
|
|
12
|
-
declare const commands: {
|
|
13
|
-
readonly dev: () => Promise<citty2.CommandDef<{
|
|
14
|
-
port: {
|
|
15
|
-
type: "string";
|
|
16
|
-
alias: string;
|
|
17
|
-
description: string;
|
|
18
|
-
default: string;
|
|
19
|
-
};
|
|
20
|
-
host: {
|
|
21
|
-
type: "string";
|
|
22
|
-
alias: string;
|
|
23
|
-
description: string;
|
|
24
|
-
};
|
|
25
|
-
open: {
|
|
26
|
-
type: "boolean";
|
|
27
|
-
alias: string;
|
|
28
|
-
description: string;
|
|
29
|
-
default: false;
|
|
30
|
-
};
|
|
31
|
-
layers: {
|
|
32
|
-
type: "string";
|
|
33
|
-
alias: string;
|
|
34
|
-
description: string;
|
|
35
|
-
};
|
|
36
|
-
"exclude-layers": {
|
|
37
|
-
type: "string";
|
|
38
|
-
alias: string;
|
|
39
|
-
description: string;
|
|
40
|
-
};
|
|
41
|
-
root: {
|
|
42
|
-
type: "string";
|
|
43
|
-
alias: string;
|
|
44
|
-
description: string;
|
|
45
|
-
};
|
|
46
|
-
config: {
|
|
47
|
-
type: "string";
|
|
48
|
-
alias: string;
|
|
49
|
-
description: string;
|
|
50
|
-
};
|
|
51
|
-
logLevel: {
|
|
52
|
-
type: "string";
|
|
53
|
-
description: string;
|
|
54
|
-
};
|
|
55
|
-
}>>;
|
|
56
|
-
readonly build: () => Promise<citty2.CommandDef<{
|
|
57
|
-
minify: {
|
|
58
|
-
type: "boolean";
|
|
59
|
-
description: string;
|
|
60
|
-
default: true;
|
|
61
|
-
};
|
|
62
|
-
sourcemap: {
|
|
63
|
-
type: "boolean";
|
|
64
|
-
description: string;
|
|
65
|
-
default: false;
|
|
66
|
-
};
|
|
67
|
-
root: {
|
|
68
|
-
type: "string";
|
|
69
|
-
alias: string;
|
|
70
|
-
description: string;
|
|
71
|
-
};
|
|
72
|
-
config: {
|
|
73
|
-
type: "string";
|
|
74
|
-
alias: string;
|
|
75
|
-
description: string;
|
|
76
|
-
};
|
|
77
|
-
logLevel: {
|
|
78
|
-
type: "string";
|
|
79
|
-
description: string;
|
|
80
|
-
};
|
|
81
|
-
}>>;
|
|
82
|
-
readonly generate: () => Promise<citty2.CommandDef<{
|
|
83
|
-
root: {
|
|
84
|
-
type: "string";
|
|
85
|
-
alias: string;
|
|
86
|
-
description: string;
|
|
87
|
-
};
|
|
88
|
-
config: {
|
|
89
|
-
type: "string";
|
|
90
|
-
alias: string;
|
|
91
|
-
description: string;
|
|
92
|
-
};
|
|
93
|
-
logLevel: {
|
|
94
|
-
type: "string";
|
|
95
|
-
description: string;
|
|
96
|
-
};
|
|
97
|
-
}>>;
|
|
98
|
-
readonly prepare: () => Promise<citty2.CommandDef<{
|
|
99
|
-
verbose: {
|
|
100
|
-
type: "boolean";
|
|
101
|
-
alias: string;
|
|
102
|
-
description: string;
|
|
103
|
-
default: false;
|
|
104
|
-
};
|
|
105
|
-
root: {
|
|
106
|
-
type: "string";
|
|
107
|
-
alias: string;
|
|
108
|
-
description: string;
|
|
109
|
-
};
|
|
110
|
-
config: {
|
|
111
|
-
type: "string";
|
|
112
|
-
alias: string;
|
|
113
|
-
description: string;
|
|
114
|
-
};
|
|
115
|
-
logLevel: {
|
|
116
|
-
type: "string";
|
|
117
|
-
description: string;
|
|
118
|
-
};
|
|
119
|
-
}>>;
|
|
120
|
-
readonly layer: () => Promise<citty2.CommandDef<citty2.ArgsDef>>;
|
|
121
|
-
readonly init: () => Promise<citty2.CommandDef<{
|
|
122
|
-
root: {
|
|
123
|
-
type: "string";
|
|
124
|
-
alias: string;
|
|
125
|
-
description: string;
|
|
126
|
-
};
|
|
127
|
-
force: {
|
|
128
|
-
type: "boolean";
|
|
129
|
-
alias: string;
|
|
130
|
-
description: string;
|
|
131
|
-
default: false;
|
|
132
|
-
};
|
|
133
|
-
typescript: {
|
|
134
|
-
type: "boolean";
|
|
135
|
-
alias: string;
|
|
136
|
-
description: string;
|
|
137
|
-
default: true;
|
|
138
|
-
};
|
|
139
|
-
}>>;
|
|
140
|
-
readonly start: () => Promise<citty2.CommandDef<{
|
|
141
|
-
port: {
|
|
142
|
-
type: "string";
|
|
143
|
-
alias: string;
|
|
144
|
-
description: string;
|
|
145
|
-
default: string;
|
|
146
|
-
};
|
|
147
|
-
host: {
|
|
148
|
-
type: "string";
|
|
149
|
-
alias: string;
|
|
150
|
-
description: string;
|
|
151
|
-
};
|
|
152
|
-
open: {
|
|
153
|
-
type: "boolean";
|
|
154
|
-
alias: string;
|
|
155
|
-
description: string;
|
|
156
|
-
default: false;
|
|
157
|
-
};
|
|
158
|
-
layers: {
|
|
159
|
-
type: "string";
|
|
160
|
-
alias: string;
|
|
161
|
-
description: string;
|
|
162
|
-
};
|
|
163
|
-
"exclude-layers": {
|
|
164
|
-
type: "string";
|
|
165
|
-
alias: string;
|
|
166
|
-
description: string;
|
|
167
|
-
};
|
|
168
|
-
root: {
|
|
169
|
-
type: "string";
|
|
170
|
-
alias: string;
|
|
171
|
-
description: string;
|
|
172
|
-
};
|
|
173
|
-
config: {
|
|
174
|
-
type: "string";
|
|
175
|
-
alias: string;
|
|
176
|
-
description: string;
|
|
177
|
-
};
|
|
178
|
-
logLevel: {
|
|
179
|
-
type: "string";
|
|
180
|
-
description: string;
|
|
181
|
-
};
|
|
182
|
-
}>>;
|
|
183
|
-
};
|
|
184
|
-
//#endregion
|
|
185
|
-
//#region src/utils/kit.d.ts
|
|
186
|
-
/**
|
|
187
|
-
* Dynamically load @kimesh/kit from the project context
|
|
188
|
-
* Falls back to bundled version if not found
|
|
189
|
-
*/
|
|
190
|
-
declare function loadKit(root?: string): Promise<typeof _kimesh_kit0>;
|
|
191
|
-
/**
|
|
192
|
-
* Get cached kit instance or throw if not loaded
|
|
193
|
-
*/
|
|
194
|
-
declare function getKit(): typeof _kimesh_kit0;
|
|
195
|
-
/**
|
|
196
|
-
* Clear kit cache (useful for testing)
|
|
197
|
-
*/
|
|
198
|
-
declare function clearKitCache(): void;
|
|
199
|
-
//#endregion
|
|
200
|
-
//#region src/utils/paths.d.ts
|
|
201
|
-
/**
|
|
202
|
-
* Get the directory of the current module
|
|
203
|
-
*/
|
|
204
|
-
declare function getCurrentDir(importMetaUrl: string): string;
|
|
205
|
-
/**
|
|
206
|
-
* Resolve project root, handling various inputs
|
|
207
|
-
*/
|
|
208
|
-
declare function resolveRoot(input?: string): string;
|
|
209
|
-
/**
|
|
210
|
-
* Get the .kimesh build directory
|
|
211
|
-
*/
|
|
212
|
-
declare function getBuildDir(root: string): string;
|
|
213
|
-
/**
|
|
214
|
-
* Check if we're running from a global installation
|
|
215
|
-
*/
|
|
216
|
-
declare function isGlobalInstall(): boolean;
|
|
217
|
-
//#endregion
|
|
218
|
-
//#region src/utils/logger.d.ts
|
|
219
|
-
declare const logger: consola0.ConsolaInstance;
|
|
220
|
-
/**
|
|
221
|
-
* Print a banner header
|
|
222
|
-
*/
|
|
223
|
-
declare function banner(text: string, version?: string): void;
|
|
224
|
-
/**
|
|
225
|
-
* Print a step in a process
|
|
226
|
-
*/
|
|
227
|
-
declare function step(message: string): void;
|
|
228
|
-
/**
|
|
229
|
-
* Print a success message
|
|
230
|
-
*/
|
|
231
|
-
declare function success(message: string): void;
|
|
232
|
-
/**
|
|
233
|
-
* Print timing information
|
|
234
|
-
*/
|
|
235
|
-
declare function timing(label: string, ms: number): void;
|
|
236
|
-
/**
|
|
237
|
-
* Create a spinner for long operations
|
|
238
|
-
*/
|
|
239
|
-
declare function withSpinner<T>(message: string, fn: () => Promise<T>): Promise<T>;
|
|
240
|
-
//#endregion
|
|
241
|
-
//#region src/commands/_shared.d.ts
|
|
242
|
-
/**
|
|
243
|
-
* Shared arguments used across multiple commands
|
|
244
|
-
*/
|
|
245
|
-
declare const sharedArgs: {
|
|
246
|
-
root: {
|
|
247
|
-
type: "string";
|
|
248
|
-
alias: string;
|
|
249
|
-
description: string;
|
|
250
|
-
};
|
|
251
|
-
config: {
|
|
252
|
-
type: "string";
|
|
253
|
-
alias: string;
|
|
254
|
-
description: string;
|
|
255
|
-
};
|
|
256
|
-
logLevel: {
|
|
257
|
-
type: "string";
|
|
258
|
-
description: string;
|
|
259
|
-
};
|
|
260
|
-
};
|
|
261
|
-
/**
|
|
262
|
-
* Dev command specific arguments
|
|
263
|
-
*/
|
|
264
|
-
declare const devArgs: {
|
|
265
|
-
port: {
|
|
266
|
-
type: "string";
|
|
267
|
-
alias: string;
|
|
268
|
-
description: string;
|
|
269
|
-
default: string;
|
|
270
|
-
};
|
|
271
|
-
host: {
|
|
272
|
-
type: "string";
|
|
273
|
-
alias: string;
|
|
274
|
-
description: string;
|
|
275
|
-
};
|
|
276
|
-
open: {
|
|
277
|
-
type: "boolean";
|
|
278
|
-
alias: string;
|
|
279
|
-
description: string;
|
|
280
|
-
default: false;
|
|
281
|
-
};
|
|
282
|
-
layers: {
|
|
283
|
-
type: "string";
|
|
284
|
-
alias: string;
|
|
285
|
-
description: string;
|
|
286
|
-
};
|
|
287
|
-
"exclude-layers": {
|
|
288
|
-
type: "string";
|
|
289
|
-
alias: string;
|
|
290
|
-
description: string;
|
|
291
|
-
};
|
|
292
|
-
root: {
|
|
293
|
-
type: "string";
|
|
294
|
-
alias: string;
|
|
295
|
-
description: string;
|
|
296
|
-
};
|
|
297
|
-
config: {
|
|
298
|
-
type: "string";
|
|
299
|
-
alias: string;
|
|
300
|
-
description: string;
|
|
301
|
-
};
|
|
302
|
-
logLevel: {
|
|
303
|
-
type: "string";
|
|
304
|
-
description: string;
|
|
305
|
-
};
|
|
306
|
-
};
|
|
307
|
-
/**
|
|
308
|
-
* Build command specific arguments
|
|
309
|
-
*/
|
|
310
|
-
declare const buildArgs: {
|
|
311
|
-
minify: {
|
|
312
|
-
type: "boolean";
|
|
313
|
-
description: string;
|
|
314
|
-
default: true;
|
|
315
|
-
};
|
|
316
|
-
sourcemap: {
|
|
317
|
-
type: "boolean";
|
|
318
|
-
description: string;
|
|
319
|
-
default: false;
|
|
320
|
-
};
|
|
321
|
-
root: {
|
|
322
|
-
type: "string";
|
|
323
|
-
alias: string;
|
|
324
|
-
description: string;
|
|
325
|
-
};
|
|
326
|
-
config: {
|
|
327
|
-
type: "string";
|
|
328
|
-
alias: string;
|
|
329
|
-
description: string;
|
|
330
|
-
};
|
|
331
|
-
logLevel: {
|
|
332
|
-
type: "string";
|
|
333
|
-
description: string;
|
|
334
|
-
};
|
|
335
|
-
};
|
|
336
|
-
/**
|
|
337
|
-
* Prepare command specific arguments
|
|
338
|
-
*/
|
|
339
|
-
declare const prepareArgs: {
|
|
340
|
-
verbose: {
|
|
341
|
-
type: "boolean";
|
|
342
|
-
alias: string;
|
|
343
|
-
description: string;
|
|
344
|
-
default: false;
|
|
345
|
-
};
|
|
346
|
-
root: {
|
|
347
|
-
type: "string";
|
|
348
|
-
alias: string;
|
|
349
|
-
description: string;
|
|
350
|
-
};
|
|
351
|
-
config: {
|
|
352
|
-
type: "string";
|
|
353
|
-
alias: string;
|
|
354
|
-
description: string;
|
|
355
|
-
};
|
|
356
|
-
logLevel: {
|
|
357
|
-
type: "string";
|
|
358
|
-
description: string;
|
|
359
|
-
};
|
|
360
|
-
};
|
|
361
|
-
//#endregion
|
|
1
|
+
import { banner, buildArgs, clearKitCache, commands, devArgs, getBuildDir, getCurrentDir, getKit, isGlobalInstall, loadKit, logger, main, prepareArgs, resolveRoot, run, sharedArgs, step, success, timing, version, withSpinner } from "../../km/src/index";
|
|
362
2
|
export { banner, buildArgs, clearKitCache, commands, devArgs, getBuildDir, getCurrentDir, getKit, isGlobalInstall, loadKit, logger, main, prepareArgs, resolveRoot, run, sharedArgs, step, success, timing, version, withSpinner };
|
package/dist/index.js
CHANGED
|
@@ -1,82 +1,3 @@
|
|
|
1
|
-
import { commands, main, version } from "
|
|
2
|
-
import { run } from "./run-DCL2u7IK.js";
|
|
3
|
-
import { clearKitCache, getKit, loadKit } from "./kit-BcEYldTS.js";
|
|
4
|
-
import { buildArgs, devArgs, prepareArgs, sharedArgs } from "./_shared-CEwpPT2B.js";
|
|
5
|
-
import consola from "consola";
|
|
6
|
-
import pc from "picocolors";
|
|
7
|
-
import { fileURLToPath } from "node:url";
|
|
8
|
-
import { dirname, resolve } from "node:path";
|
|
1
|
+
import { banner, buildArgs, clearKitCache, commands, devArgs, getBuildDir, getCurrentDir, getKit, isGlobalInstall, loadKit, logger, main, prepareArgs, resolveRoot, run, sharedArgs, step, success, timing, version, withSpinner } from "../../km/src/index";
|
|
9
2
|
|
|
10
|
-
//#region src/utils/paths.ts
|
|
11
|
-
/**
|
|
12
|
-
* Get the directory of the current module
|
|
13
|
-
*/
|
|
14
|
-
function getCurrentDir(importMetaUrl) {
|
|
15
|
-
return dirname(fileURLToPath(importMetaUrl));
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Resolve project root, handling various inputs
|
|
19
|
-
*/
|
|
20
|
-
function resolveRoot(input) {
|
|
21
|
-
if (!input) return process.cwd();
|
|
22
|
-
return resolve(process.cwd(), input);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Get the .kimesh build directory
|
|
26
|
-
*/
|
|
27
|
-
function getBuildDir(root) {
|
|
28
|
-
return resolve(root, ".kimesh");
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Check if we're running from a global installation
|
|
32
|
-
*/
|
|
33
|
-
function isGlobalInstall() {
|
|
34
|
-
const execPath = process.argv[1] || "";
|
|
35
|
-
return execPath.includes("/lib/node_modules/") || execPath.includes("\\node_modules\\npm\\");
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region src/utils/logger.ts
|
|
40
|
-
const logger = consola.withTag("kmi");
|
|
41
|
-
/**
|
|
42
|
-
* Print a banner header
|
|
43
|
-
*/
|
|
44
|
-
function banner(text, version$1) {
|
|
45
|
-
const versionStr = version$1 ? ` v${version$1}` : "";
|
|
46
|
-
consola.log(pc.cyan(`\n 🚀 ${text}${versionStr}\n`));
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Print a step in a process
|
|
50
|
-
*/
|
|
51
|
-
function step(message) {
|
|
52
|
-
consola.info(`${pc.blue("›")} ${message}`);
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Print a success message
|
|
56
|
-
*/
|
|
57
|
-
function success(message) {
|
|
58
|
-
consola.success(pc.green("✓") + " " + message);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Print timing information
|
|
62
|
-
*/
|
|
63
|
-
function timing(label, ms) {
|
|
64
|
-
consola.info(`${label}: ${pc.cyan(`${ms}ms`)}`);
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Create a spinner for long operations
|
|
68
|
-
*/
|
|
69
|
-
async function withSpinner(message, fn) {
|
|
70
|
-
consola.start(message);
|
|
71
|
-
try {
|
|
72
|
-
const result = await fn();
|
|
73
|
-
consola.success(message);
|
|
74
|
-
return result;
|
|
75
|
-
} catch (error) {
|
|
76
|
-
consola.fail(message);
|
|
77
|
-
throw error;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
//#endregion
|
|
82
3
|
export { banner, buildArgs, clearKitCache, commands, devArgs, getBuildDir, getCurrentDir, getKit, isGlobalInstall, loadKit, logger, main, prepareArgs, resolveRoot, run, sharedArgs, step, success, timing, version, withSpinner };
|
package/dist/main.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { main
|
|
1
|
+
import { main, version } from "../../km/src/index";
|
|
2
2
|
export { main, version };
|
package/dist/main.js
CHANGED
package/dist/run.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { run
|
|
1
|
+
import { run } from "../../km/src/index";
|
|
2
2
|
export { run };
|
package/dist/run.js
CHANGED
package/package.json
CHANGED
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kimesh/cli",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Kimesh
|
|
3
|
+
"version": "0.1.1-nightly.20260120033751",
|
|
4
|
+
"description": "Kimesh CLI for integration with main package",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"km": "./bin/km.mjs",
|
|
8
|
-
"kimesh": "./bin/km.mjs"
|
|
9
|
-
},
|
|
10
6
|
"exports": {
|
|
11
7
|
".": {
|
|
12
|
-
"types": "./dist/index.d.
|
|
13
|
-
"import": "./dist/index.
|
|
8
|
+
"types": "./dist/index.d.mts",
|
|
9
|
+
"import": "./dist/index.mjs"
|
|
14
10
|
},
|
|
15
|
-
"./cli":
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"import": "./dist/commands/init.js"
|
|
22
|
-
}
|
|
11
|
+
"./cli": "./bin/km.mjs"
|
|
12
|
+
},
|
|
13
|
+
"main": "./dist/index.mjs",
|
|
14
|
+
"types": "./dist/index.d.mts",
|
|
15
|
+
"bin": {
|
|
16
|
+
"km": "bin/km.mjs"
|
|
23
17
|
},
|
|
24
|
-
"main": "./dist/index.js",
|
|
25
|
-
"types": "./dist/index.d.ts",
|
|
26
18
|
"files": [
|
|
27
19
|
"dist",
|
|
28
20
|
"bin"
|
|
@@ -33,23 +25,10 @@
|
|
|
33
25
|
"typecheck": "tsc --noEmit"
|
|
34
26
|
},
|
|
35
27
|
"dependencies": {
|
|
36
|
-
"@kimesh/
|
|
37
|
-
"citty": "^0.1.6",
|
|
38
|
-
"consola": "^3.4.2",
|
|
39
|
-
"exsolve": "^1.0.8",
|
|
40
|
-
"picocolors": "^1.1.1"
|
|
28
|
+
"@kimesh/km": "0.1.1"
|
|
41
29
|
},
|
|
42
30
|
"devDependencies": {
|
|
43
|
-
"@types/node": "^22.13.1",
|
|
44
31
|
"tsdown": "^0.11.7",
|
|
45
32
|
"typescript": "^5.8.2"
|
|
46
|
-
},
|
|
47
|
-
"peerDependencies": {
|
|
48
|
-
"vite": "^6.0.0"
|
|
49
|
-
},
|
|
50
|
-
"peerDependenciesMeta": {
|
|
51
|
-
"vite": {
|
|
52
|
-
"optional": true
|
|
53
|
-
}
|
|
54
33
|
}
|
|
55
34
|
}
|
package/dist/_shared-CEwpPT2B.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
//#region src/commands/_shared.ts
|
|
2
|
-
/**
|
|
3
|
-
* Shared arguments used across multiple commands
|
|
4
|
-
*/
|
|
5
|
-
const sharedArgs = {
|
|
6
|
-
root: {
|
|
7
|
-
type: "string",
|
|
8
|
-
alias: "r",
|
|
9
|
-
description: "Project root directory"
|
|
10
|
-
},
|
|
11
|
-
config: {
|
|
12
|
-
type: "string",
|
|
13
|
-
alias: "c",
|
|
14
|
-
description: "Config file path"
|
|
15
|
-
},
|
|
16
|
-
logLevel: {
|
|
17
|
-
type: "string",
|
|
18
|
-
description: "Log level (silent, info, verbose)"
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Dev command specific arguments
|
|
23
|
-
*/
|
|
24
|
-
const devArgs = {
|
|
25
|
-
...sharedArgs,
|
|
26
|
-
port: {
|
|
27
|
-
type: "string",
|
|
28
|
-
alias: "p",
|
|
29
|
-
description: "Server port",
|
|
30
|
-
default: "3000"
|
|
31
|
-
},
|
|
32
|
-
host: {
|
|
33
|
-
type: "string",
|
|
34
|
-
alias: "h",
|
|
35
|
-
description: "Server host"
|
|
36
|
-
},
|
|
37
|
-
open: {
|
|
38
|
-
type: "boolean",
|
|
39
|
-
alias: "o",
|
|
40
|
-
description: "Open browser on start",
|
|
41
|
-
default: false
|
|
42
|
-
},
|
|
43
|
-
layers: {
|
|
44
|
-
type: "string",
|
|
45
|
-
alias: "l",
|
|
46
|
-
description: "Comma-separated list of layers or all/none"
|
|
47
|
-
},
|
|
48
|
-
"exclude-layers": {
|
|
49
|
-
type: "string",
|
|
50
|
-
alias: "x",
|
|
51
|
-
description: "Comma-separated list of layers to exclude"
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* Build command specific arguments
|
|
56
|
-
*/
|
|
57
|
-
const buildArgs = {
|
|
58
|
-
...sharedArgs,
|
|
59
|
-
minify: {
|
|
60
|
-
type: "boolean",
|
|
61
|
-
description: "Minify output",
|
|
62
|
-
default: true
|
|
63
|
-
},
|
|
64
|
-
sourcemap: {
|
|
65
|
-
type: "boolean",
|
|
66
|
-
description: "Generate sourcemaps",
|
|
67
|
-
default: false
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* Prepare command specific arguments
|
|
72
|
-
*/
|
|
73
|
-
const prepareArgs = {
|
|
74
|
-
...sharedArgs,
|
|
75
|
-
verbose: {
|
|
76
|
-
type: "boolean",
|
|
77
|
-
alias: "v",
|
|
78
|
-
description: "Enable verbose logging",
|
|
79
|
-
default: false
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
//#endregion
|
|
84
|
-
export { buildArgs, devArgs, prepareArgs, sharedArgs };
|
package/dist/build-Ce4Dm8mI.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { loadKit } from "./kit-BcEYldTS.js";
|
|
2
|
-
import { buildArgs } from "./_shared-CEwpPT2B.js";
|
|
3
|
-
import { defineCommand } from "citty";
|
|
4
|
-
import consola from "consola";
|
|
5
|
-
import { resolve } from "node:path";
|
|
6
|
-
|
|
7
|
-
//#region src/commands/build.ts
|
|
8
|
-
var build_default = defineCommand({
|
|
9
|
-
meta: {
|
|
10
|
-
name: "build",
|
|
11
|
-
description: "Build for production"
|
|
12
|
-
},
|
|
13
|
-
args: buildArgs,
|
|
14
|
-
async run({ args }) {
|
|
15
|
-
const root = resolve(args.root || process.cwd());
|
|
16
|
-
consola.info(`Building for production...`);
|
|
17
|
-
const kit = await loadKit(root);
|
|
18
|
-
const { loadConfig, kimeshPlugin } = kit;
|
|
19
|
-
const kmConfig = await loadConfig({
|
|
20
|
-
root,
|
|
21
|
-
configFile: args.config
|
|
22
|
-
});
|
|
23
|
-
const { build } = await import("vite");
|
|
24
|
-
await build({
|
|
25
|
-
root,
|
|
26
|
-
configFile: false,
|
|
27
|
-
plugins: [kimeshPlugin({ config: kmConfig })]
|
|
28
|
-
});
|
|
29
|
-
consola.success(`Build complete!`);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
//#endregion
|
|
34
|
-
export { build_default as default };
|
package/dist/commands/init.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as citty1 from "citty";
|
|
2
|
-
|
|
3
|
-
//#region src/commands/init.d.ts
|
|
4
|
-
declare const _default: citty1.CommandDef<{
|
|
5
|
-
root: {
|
|
6
|
-
type: "string";
|
|
7
|
-
alias: string;
|
|
8
|
-
description: string;
|
|
9
|
-
};
|
|
10
|
-
force: {
|
|
11
|
-
type: "boolean";
|
|
12
|
-
alias: string;
|
|
13
|
-
description: string;
|
|
14
|
-
default: false;
|
|
15
|
-
};
|
|
16
|
-
typescript: {
|
|
17
|
-
type: "boolean";
|
|
18
|
-
alias: string;
|
|
19
|
-
description: string;
|
|
20
|
-
default: true;
|
|
21
|
-
};
|
|
22
|
-
}>;
|
|
23
|
-
//#endregion
|
|
24
|
-
export { _default as default };
|