mioku 0.9.2 → 0.9.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.
@@ -1,17 +1,17 @@
1
1
  #!/usr/bin/env node
2
- const require_chunk = require('./chunk-CUT6urMc.cjs');
2
+ const require_chunk = require('../chunk-CUT6urMc.cjs');
3
+ const mri = require_chunk.__toESM(require("mri"));
3
4
  const node_fs = require_chunk.__toESM(require("node:fs"));
4
5
  const node_child_process = require_chunk.__toESM(require("node:child_process"));
5
- const mri = require_chunk.__toESM(require("mri"));
6
6
  const node_path = require_chunk.__toESM(require("node:path"));
7
- const dedent = require_chunk.__toESM(require("dedent"));
8
7
  const consola = require_chunk.__toESM(require("consola"));
8
+ const dedent = require_chunk.__toESM(require("dedent"));
9
9
 
10
10
  //#region package.json
11
- var version = "0.9.2";
11
+ var version = "0.9.3";
12
12
 
13
13
  //#endregion
14
- //#region src/cli.ts
14
+ //#region src/cli/shared.ts
15
15
  const DEFAULT_PACKAGES = [
16
16
  "mioku",
17
17
  "mioku-plugin-boot",
@@ -24,9 +24,8 @@ const DEFAULT_PACKAGES = [
24
24
  ];
25
25
  const PLUGIN_PREFIX = "mioku-plugin-";
26
26
  const SERVICE_PREFIX = "mioku-service-";
27
- const args = process.argv.slice(2);
28
27
  function run(cmd, args$1 = [], options = {}) {
29
- return (0, node_child_process.execFileSync)(cmd, args$1, {
28
+ (0, node_child_process.execFileSync)(cmd, args$1, {
30
29
  stdio: "inherit",
31
30
  shell: process.platform === "win32",
32
31
  ...options
@@ -79,8 +78,7 @@ function findNpmPath() {
79
78
  shell: true
80
79
  });
81
80
  const lines = result.split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
82
- const cmdPath = lines.find((line) => line.endsWith(".cmd"));
83
- return cmdPath || lines[0] || null;
81
+ return lines.find((l) => l.endsWith(".cmd")) || lines[0] || null;
84
82
  } catch {
85
83
  return null;
86
84
  }
@@ -102,42 +100,11 @@ function ensurePackageManager() {
102
100
  function getAddCommand(packages) {
103
101
  return ["bun", ["add", ...packages]];
104
102
  }
105
- function normalizePackageName(input$1) {
106
- if (input$1.startsWith(PLUGIN_PREFIX) || input$1.startsWith(SERVICE_PREFIX)) return input$1;
107
- if (input$1.startsWith("mioku-")) return input$1;
108
- return `${PLUGIN_PREFIX}${input$1}`;
109
- }
110
- function detectType(name) {
111
- if (name.startsWith(PLUGIN_PREFIX)) return "plugin";
112
- if (name.startsWith(SERVICE_PREFIX)) return "service";
113
- return "unknown";
114
- }
115
103
  function execAdd(packages, cwd) {
116
104
  const [cmd, args$1] = getAddCommand(packages);
117
105
  console.log(`执行: ${cmd} ${args$1.join(" ")}`);
118
106
  run(cmd, args$1, { cwd });
119
107
  }
120
- async function installPackage(name, cwd) {
121
- const normalized = normalizePackageName(name);
122
- const type = detectType(normalized);
123
- if (type === "unknown") {
124
- consola.default.error(`无法识别的包类型: ${name}`);
125
- return false;
126
- }
127
- try {
128
- execAdd([normalized], cwd);
129
- consola.default.success(`已安装 ${normalized}`);
130
- if (type === "plugin" && cwd) {
131
- const enabled = appendToMiokiPlugins(cwd, normalized);
132
- if (enabled) consola.default.success(`已在 mioki.plugins 中启用 ${normalized.slice(PLUGIN_PREFIX.length)}`);
133
- else consola.default.info(`${normalized.slice(PLUGIN_PREFIX.length)} 已在 mioki.plugins 中,跳过`);
134
- }
135
- return true;
136
- } catch {
137
- consola.default.error(`安装失败: ${normalized}`);
138
- return false;
139
- }
140
- }
141
108
  function appendToMiokiPlugins(cwd, pkgName) {
142
109
  if (!pkgName.startsWith(PLUGIN_PREFIX)) return false;
143
110
  const shortName = pkgName.slice(PLUGIN_PREFIX.length);
@@ -157,9 +124,7 @@ function appendToMiokiPlugins(cwd, pkgName) {
157
124
  }
158
125
  async function getInstalledPackages(cwd) {
159
126
  try {
160
- const pkgPath = node_path.default.join(cwd, "package.json");
161
- const content = (0, node_fs.readFileSync)(pkgPath, "utf-8");
162
- const pkg = JSON.parse(content);
127
+ const pkg = JSON.parse((0, node_fs.readFileSync)(node_path.default.join(cwd, "package.json"), "utf-8"));
163
128
  const deps = {
164
129
  ...pkg.dependencies,
165
130
  ...pkg.devDependencies
@@ -169,13 +134,29 @@ async function getInstalledPackages(cwd) {
169
134
  return [];
170
135
  }
171
136
  }
172
- (async () => {
173
- const cli = (0, mri.default)(args, { alias: {
174
- v: "version",
175
- h: "help"
176
- } });
177
- const helpInfo = (0, dedent.default)(`
178
- mioku 命令行工具 v${version}
137
+ function withRoot(p) {
138
+ return node_path.default.resolve(process.cwd(), p);
139
+ }
140
+ function gracefullyExit() {
141
+ console.log("Bye!");
142
+ process.exit(0);
143
+ }
144
+ function makeFileTree(fileTree, base) {
145
+ for (const [name, content] of Object.entries(fileTree)) if (typeof content === "object" && content !== null) {
146
+ const subPath = `${base}/${name}`;
147
+ if (!node_fs.default.existsSync(subPath)) node_fs.default.mkdirSync(subPath, { recursive: true });
148
+ for (const [subName, subContent] of Object.entries(content)) if (typeof subContent === "object") makeFileTree(subContent, node_path.default.join(subPath, subName));
149
+ else node_fs.default.writeFileSync(`${subPath}/${subName}`, subContent);
150
+ } else {
151
+ const filePath = `${base}/${name}`;
152
+ const dirname = node_path.default.dirname(filePath);
153
+ if (!node_fs.default.existsSync(dirname)) node_fs.default.mkdirSync(dirname, { recursive: true });
154
+ node_fs.default.writeFileSync(filePath, content);
155
+ }
156
+ }
157
+ function buildHelpInfo(version$1) {
158
+ return (0, dedent.default)(`
159
+ mioku 命令行工具 v${version$1}
179
160
 
180
161
  用法: mioku <命令> [选项]
181
162
 
@@ -201,214 +182,130 @@ async function getInstalledPackages(cwd) {
201
182
  --admins <admins> 指定管理员 QQ,英文逗号分隔,可空
202
183
  --use-npm-mirror 使用 npm 镜像源加速依赖安装,默认否
203
184
  `);
204
- const [cmd, ...cmdArgs] = args;
205
- switch (cmd) {
206
- case "install": {
207
- ensurePackageManager();
208
- const cwd = process.cwd();
209
- const type = cmdArgs[0];
210
- const name = cmdArgs[1];
211
- if (!type || !name) {
212
- consola.default.error("请指定类型和名称: mioku install plugin <名称> 或 mioku install service <名称>");
213
- console.log(helpInfo);
214
- process.exitCode = 1;
215
- return;
216
- }
217
- if (type !== "plugin" && type !== "service") {
218
- consola.default.error(`无效的类型 "${type}",请使用 plugin service`);
219
- console.log(helpInfo);
220
- process.exitCode = 1;
221
- return;
222
- }
223
- const prefix = type === "plugin" ? PLUGIN_PREFIX : SERVICE_PREFIX;
224
- const normalized = `${prefix}${name}`;
225
- const success = await installPackage(normalized, cwd);
226
- process.exitCode = success ? 0 : 1;
227
- return;
228
- }
229
- case "update": {
230
- ensurePackageManager();
231
- const cwd = process.cwd();
232
- const target = cmdArgs[0];
233
- if (!target || target === "check") {
234
- run("bun", ["update", "-i"], { cwd });
235
- process.exitCode = 0;
236
- return;
237
- }
238
- if (target === "all") {
239
- const packages = await getInstalledPackages(cwd);
240
- const filtered = packages.filter((p) => p.startsWith("mioku-"));
241
- if (filtered.length === 0) {
242
- consola.default.info("未找到 mioku- 相关依赖");
243
- process.exitCode = 0;
244
- return;
245
- }
246
- console.log(`执行: bun update ${filtered.join(" ")} --latest`);
247
- run("bun", [
248
- "update",
249
- ...filtered,
250
- "--latest"
251
- ], { cwd });
252
- process.exitCode = 0;
253
- return;
254
- }
255
- if (target === "self") {
256
- console.log("执行: bun update mioku --latest");
257
- run("bun", [
258
- "update",
259
- "mioku",
260
- "--latest"
261
- ], { cwd });
262
- process.exitCode = 0;
263
- return;
264
- }
265
- if (target === "plugin" || target === "service") {
266
- const name = cmdArgs[1];
267
- if (!name) {
268
- const packages = await getInstalledPackages(cwd);
269
- const prefix = target === "plugin" ? PLUGIN_PREFIX : SERVICE_PREFIX;
270
- const filtered = packages.filter((p) => p.startsWith(prefix));
271
- if (filtered.length === 0) {
272
- consola.default.info(`未找到 ${prefix}* 相关依赖`);
273
- process.exitCode = 0;
274
- return;
275
- }
276
- console.log(`执行: bun update ${filtered.join(" ")} --latest`);
277
- run("bun", [
278
- "update",
279
- ...filtered,
280
- "--latest"
281
- ], { cwd });
282
- } else {
283
- const prefix = target === "plugin" ? PLUGIN_PREFIX : SERVICE_PREFIX;
284
- const normalized = name.startsWith(prefix) ? name : `${prefix}${name}`;
285
- console.log(`执行: bun update ${normalized} --latest`);
286
- run("bun", [
287
- "update",
288
- normalized,
289
- "--latest"
290
- ], { cwd });
291
- }
292
- process.exitCode = 0;
293
- return;
294
- }
295
- console.log(`执行: bun update ${target} --latest`);
296
- run("bun", [
297
- "update",
298
- target,
299
- "--latest"
300
- ], { cwd });
301
- process.exitCode = 0;
302
- return;
303
- }
304
- default: {
305
- const cli$1 = (0, mri.default)(args, { alias: {
306
- v: "version",
307
- h: "help"
308
- } });
309
- switch (true) {
310
- case cli$1.version:
311
- console.log(`v${version}`);
312
- process.exitCode = 0;
313
- return;
314
- case cli$1.help:
315
- console.log(helpInfo);
316
- process.exitCode = 0;
317
- return;
318
- default: break;
319
- }
320
- const name = await input("请输入项目名称", {
321
- default: "mioku-bot",
322
- placeholder: "mioku-bot",
323
- required: true
324
- });
325
- const owners = await input("请输入主人 QQ (最高权限,英文逗号分隔,必填)", {
326
- placeholder: "请输入",
327
- default: "",
328
- required: true
329
- });
330
- const host = await input("请输入 NapCat WS 主机", {
331
- default: "localhost",
332
- placeholder: "localhost",
333
- required: true
334
- });
335
- const port = parseInt(await input("请输入 NapCat WS 端口", {
336
- default: "3001",
337
- placeholder: "3001",
338
- required: true
339
- }));
340
- const token = await input("请输入 NapCat WS Token(如无则留空)", { placeholder: "请输入" });
341
- ensurePackageManager();
342
- const pkgJson = (0, dedent.default)(`
343
- {
344
- "name": "${name}",
345
- "private": true,
346
- "type": "module",
347
- "dependencies": {},
348
- "mioki": {
349
- "prefix": "#",
350
- "owners": [${String(owners).split(",").map((o) => o.trim()).join(", ")}],
351
- "admins": [],
352
- "plugins": ["boot", "help", "chat", "demo"],
353
- "log_level": "info",
354
- "online_push": false,
355
- "error_push": false,
356
- "napcat": [
357
- {
358
- "protocol": "ws",
359
- "port": ${port},
360
- "host": "${host}",
361
- "token": "${token}"
362
- }
363
- ]
364
- },
365
- "scripts": {
366
- "start": "bun run app.ts",
367
- "dev": "bun run --watch app.ts"
368
- }
369
- }
370
- `);
371
- const pluginCode = (0, dedent.default)(`
372
- import { definePlugin } from 'mioku'
373
-
374
- export default definePlugin({
375
- name: 'demo',
376
- version: '${version}',
377
- async setup(ctx) {
378
- ctx.logger.info('Demo 插件已加载')
379
-
380
- ctx.handle('message', async (e) => {
381
- if (e.raw_message === 'hello') {
382
- e.reply('world', true)
383
- }
384
- })
185
+ }
186
+ async function confirm(message, options) {
187
+ return consola.default.prompt(message, {
188
+ type: "confirm",
189
+ cancel: "reject",
190
+ ...options
191
+ });
192
+ }
193
+ async function input(message, options) {
194
+ const result = await consola.default.prompt(message, {
195
+ type: "text",
196
+ cancel: "reject",
197
+ ...options
198
+ });
199
+ if (options?.required && !result) return input(message, options);
200
+ return result;
201
+ }
385
202
 
386
- return () => {
387
- ctx.logger.info('Demo 插件已卸载')
388
- }
389
- },
390
- })
391
- `);
392
- const fileTree = {
393
- "app.ts": "import { start } from 'mioku'\n\nstart({ cwd: import.meta.dirname }).then()\n",
394
- "package.json": pkgJson,
395
- plugins: { demo: { "index.ts": pluginCode } },
396
- config: {},
397
- data: {}
398
- };
399
- const installWebui = await confirm("是否安装 WebUI 管理面板?(建议安装)", { initial: true });
400
- await createNewProject(name, fileTree, installWebui);
401
- console.log("\n若需启动机器人,请运行:");
402
- console.log(" cd", name);
403
- console.log(" bun run start");
203
+ //#endregion
204
+ //#region src/cli/install.ts
205
+ async function installCommand(cmdArgs, helpInfo) {
206
+ ensurePackageManager();
207
+ const cwd = process.cwd();
208
+ const [type, name] = cmdArgs;
209
+ if (!type || !name) {
210
+ consola.default.error("请指定类型和名称: mioku install plugin <名称> mioku install service <名称>");
211
+ console.log(helpInfo);
212
+ return 1;
213
+ }
214
+ if (type !== "plugin" && type !== "service") {
215
+ consola.default.error(`无效的类型 "${type}",请使用 plugin 或 service`);
216
+ console.log(helpInfo);
217
+ return 1;
218
+ }
219
+ const prefix = type === "plugin" ? PLUGIN_PREFIX : SERVICE_PREFIX;
220
+ const normalized = `${prefix}${name}`;
221
+ try {
222
+ execAdd([normalized], cwd);
223
+ consola.default.success(`已安装 ${normalized}`);
224
+ if (type === "plugin") {
225
+ const shortName = normalized.slice(PLUGIN_PREFIX.length);
226
+ if (appendToMiokiPlugins(cwd, normalized)) consola.default.success(`已在 mioki.plugins 中启用 ${shortName}`);
227
+ else consola.default.info(`${shortName} 已在 mioki.plugins 中,跳过`);
404
228
  }
229
+ return 0;
230
+ } catch {
231
+ consola.default.error(`安装失败: ${normalized}`);
232
+ return 1;
405
233
  }
406
- })();
234
+ }
235
+
236
+ //#endregion
237
+ //#region src/cli/update.ts
238
+ async function updatePackages(packages, cwd) {
239
+ if (packages.length === 0) {
240
+ consola.default.info("未找到 mioku- 相关依赖");
241
+ return;
242
+ }
243
+ console.log(`执行: bun update ${packages.join(" ")} --latest`);
244
+ run("bun", [
245
+ "update",
246
+ ...packages,
247
+ "--latest"
248
+ ], { cwd });
249
+ }
250
+ async function updateByPrefix(prefix, cwd, name) {
251
+ if (name) {
252
+ const normalized = name.startsWith(prefix) ? name : `${prefix}${name}`;
253
+ console.log(`执行: bun update ${normalized} --latest`);
254
+ run("bun", [
255
+ "update",
256
+ normalized,
257
+ "--latest"
258
+ ], { cwd });
259
+ return;
260
+ }
261
+ const packages = (await getInstalledPackages(cwd)).filter((p) => p.startsWith(prefix));
262
+ if (packages.length === 0) {
263
+ consola.default.info(`未找到 ${prefix}* 相关依赖`);
264
+ return;
265
+ }
266
+ await updatePackages(packages, cwd);
267
+ }
268
+ async function updateCommand(cmdArgs) {
269
+ ensurePackageManager();
270
+ const cwd = process.cwd();
271
+ const [target, name] = cmdArgs;
272
+ if (!target || target === "check") {
273
+ run("bun", ["update", "-i"], { cwd });
274
+ return 0;
275
+ }
276
+ if (target === "all") {
277
+ await updatePackages(await getInstalledPackages(cwd), cwd);
278
+ return 0;
279
+ }
280
+ if (target === "self") {
281
+ console.log("执行: bun update mioku --latest");
282
+ run("bun", [
283
+ "update",
284
+ "mioku",
285
+ "--latest"
286
+ ], { cwd });
287
+ return 0;
288
+ }
289
+ if (target === "plugin" || target === "service") {
290
+ const prefix = target === "plugin" ? PLUGIN_PREFIX : SERVICE_PREFIX;
291
+ await updateByPrefix(prefix, cwd, name);
292
+ return 0;
293
+ }
294
+ console.log(`执行: bun update ${target} --latest`);
295
+ run("bun", [
296
+ "update",
297
+ target,
298
+ "--latest"
299
+ ], { cwd });
300
+ return 0;
301
+ }
302
+
303
+ //#endregion
304
+ //#region src/cli/scaffold.ts
407
305
  async function createNewProject(name, fileTree, installWebui = false) {
408
- const projectName = name;
409
- const projectPath = withRoot(`./${projectName}`);
306
+ const projectPath = withRoot(`./${name}`);
410
307
  if (node_fs.default.existsSync(projectPath)) {
411
- const overwrite = await confirm(`项目 ${projectName} 已存在,是否覆盖?`);
308
+ const overwrite = await confirm(`项目 ${name} 已存在,是否覆盖?`);
412
309
  if (!overwrite) gracefullyExit();
413
310
  if (projectPath === process.cwd()) {
414
311
  if (node_fs.default.readdirSync(projectPath).length !== 0) {
@@ -420,48 +317,131 @@ async function createNewProject(name, fileTree, installWebui = false) {
420
317
  }
421
318
  node_fs.default.mkdirSync(projectPath, { recursive: true });
422
319
  makeFileTree(fileTree, projectPath);
423
- console.log(`项目 ${projectName} 创建成功!`);
320
+ console.log(`项目 ${name} 创建成功!`);
424
321
  const packages = installWebui ? [...DEFAULT_PACKAGES, "mioku-service-webui"] : DEFAULT_PACKAGES;
425
322
  const [cmd, args$1] = getAddCommand(packages);
426
323
  console.log(`正在安装 Mioku 依赖: ${cmd} ${args$1.join(" ")}`);
427
324
  run(cmd, args$1, { cwd: projectPath });
428
325
  }
429
- function gracefullyExit() {
430
- console.log("Bye!");
431
- process.exit(0);
432
- }
433
- function withRoot(_path) {
434
- return node_path.default.resolve(process.cwd(), _path);
435
- }
436
- async function confirm(message, options) {
437
- return consola.default.prompt(message, {
438
- type: "confirm",
439
- cancel: "reject",
440
- ...options
326
+ async function scaffoldCommand(version$1) {
327
+ const name = await input("请输入项目名称", {
328
+ default: "mioku-bot",
329
+ placeholder: "mioku-bot",
330
+ required: true
441
331
  });
442
- }
443
- async function input(message, options) {
444
- const result = await consola.default.prompt(message, {
445
- type: "text",
446
- cancel: "reject",
447
- ...options
332
+ const owners = await input("请输入主人 QQ (最高权限,英文逗号分隔,必填)", {
333
+ placeholder: "请输入",
334
+ default: "",
335
+ required: true
448
336
  });
449
- if (options?.required && !result) return input(message, options);
450
- return result;
337
+ const host = await input("请输入 NapCat WS 主机", {
338
+ default: "localhost",
339
+ placeholder: "localhost",
340
+ required: true
341
+ });
342
+ const port = parseInt(await input("请输入 NapCat WS 端口", {
343
+ default: "3001",
344
+ placeholder: "3001",
345
+ required: true
346
+ }), 10);
347
+ const token = await input("请输入 NapCat WS Token(如无则留空)", { placeholder: "请输入" });
348
+ ensurePackageManager();
349
+ const ownersList = String(owners).split(",").map((o) => o.trim()).join(", ");
350
+ const pkgJson = (0, dedent.default)(`
351
+ {
352
+ "name": "${name}",
353
+ "private": true,
354
+ "type": "module",
355
+ "dependencies": {},
356
+ "mioki": {
357
+ "prefix": "#",
358
+ "owners": [${ownersList}],
359
+ "admins": [],
360
+ "plugins": ["boot", "help", "chat", "demo"],
361
+ "log_level": "info",
362
+ "online_push": false,
363
+ "error_push": false,
364
+ "napcat": [
365
+ {
366
+ "protocol": "ws",
367
+ "port": ${port},
368
+ "host": "${host}",
369
+ "token": "${token}"
370
+ }
371
+ ]
372
+ },
373
+ "scripts": {
374
+ "start": "bun run app.ts",
375
+ "dev": "bun run --watch app.ts"
376
+ }
377
+ }
378
+ `);
379
+ const pluginCode = (0, dedent.default)(`
380
+ import { definePlugin } from 'mioku'
381
+
382
+ export default definePlugin({
383
+ name: 'demo',
384
+ version: '${version$1}',
385
+ async setup(ctx) {
386
+ ctx.logger.info('Demo 插件已加载')
387
+
388
+ ctx.handle('message', async (e) => {
389
+ if (e.raw_message === 'hello') {
390
+ e.reply('world', true)
391
+ }
392
+ })
393
+
394
+ return () => {
395
+ ctx.logger.info('Demo 插件已卸载')
396
+ }
397
+ },
398
+ })
399
+ `);
400
+ const fileTree = {
401
+ "app.ts": "import { start } from 'mioku'\n\nstart({ cwd: import.meta.dirname }).then()\n",
402
+ "package.json": pkgJson,
403
+ plugins: { demo: { "index.ts": pluginCode } },
404
+ config: {},
405
+ data: {}
406
+ };
407
+ const installWebui = await confirm("是否安装 WebUI 管理面板?(建议安装)", { initial: true });
408
+ await createNewProject(name, fileTree, installWebui);
409
+ console.log("\n若需启动机器人,请运行:");
410
+ console.log(" cd", name);
411
+ console.log(" bun run start");
412
+ return 0;
451
413
  }
452
- function makeFileTree(fileTree, base) {
453
- for (const [name, content] of Object.entries(fileTree)) if (typeof content === "object" && content !== null) {
454
- const subPath = `${base}/${name}`;
455
- if (!node_fs.default.existsSync(subPath)) node_fs.default.mkdirSync(subPath, { recursive: true });
456
- for (const [subName, subContent] of Object.entries(content)) if (typeof subContent === "object") makeFileTree(subContent, node_path.default.join(subPath, subName));
457
- else node_fs.default.writeFileSync(`${subPath}/${subName}`, subContent);
458
- } else {
459
- const filePath = `${base}/${name}`;
460
- const dirname = node_path.default.dirname(filePath);
461
- if (!node_fs.default.existsSync(dirname)) node_fs.default.mkdirSync(dirname, { recursive: true });
462
- node_fs.default.writeFileSync(filePath, content);
414
+
415
+ //#endregion
416
+ //#region src/cli/index.ts
417
+ const args = process.argv.slice(2);
418
+ (async () => {
419
+ const cli = (0, mri.default)(args, { alias: {
420
+ v: "version",
421
+ h: "help"
422
+ } });
423
+ const helpInfo = buildHelpInfo(version);
424
+ const [cmd, ...cmdArgs] = args;
425
+ switch (cmd) {
426
+ case "install":
427
+ process.exitCode = await installCommand(cmdArgs, helpInfo);
428
+ return;
429
+ case "update":
430
+ process.exitCode = await updateCommand(cmdArgs);
431
+ return;
432
+ default:
433
+ if (cli.version) {
434
+ console.log(`v${version}`);
435
+ return;
436
+ }
437
+ if (cli.help) {
438
+ console.log(helpInfo);
439
+ return;
440
+ }
441
+ process.exitCode = await scaffoldCommand(version);
442
+ return;
463
443
  }
464
- }
444
+ })();
465
445
 
466
446
  //#endregion
467
- //# sourceMappingURL=cli.cjs.map
447
+ //# sourceMappingURL=index.cjs.map