moyan-mfw-cli 1.1.10-beta.3 → 1.1.10-beta.5

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 (72) hide show
  1. package/package.json +1 -1
  2. package/dist/index.cjs +0 -368
  3. package/dist/index.d.cts +0 -1
  4. package/dist/index.d.ts +0 -1
  5. package/dist/index.js +0 -344
  6. package/dist/templates/business/backend/.env.example +0 -52
  7. package/dist/templates/business/backend/.env.hbs +0 -29
  8. package/dist/templates/business/backend/nest-cli.json.hbs +0 -10
  9. package/dist/templates/business/backend/package.json.hbs +0 -46
  10. package/dist/templates/business/backend/src/app-types.config.ts.hbs +0 -3
  11. package/dist/templates/business/backend/src/app.modules.ts.hbs +0 -7
  12. package/dist/templates/business/backend/src/main.ts.hbs +0 -46
  13. package/dist/templates/business/backend/src/permissions.ts.hbs +0 -4
  14. package/dist/templates/business/backend/tsconfig.json.hbs +0 -18
  15. package/dist/templates/business/frontend/.env.example +0 -18
  16. package/dist/templates/business/frontend/index.html.hbs +0 -394
  17. package/dist/templates/business/frontend/package.json.hbs +0 -36
  18. package/dist/templates/business/frontend/src/components/Layout/components/HeaderCommonActions.vue.hbs +0 -203
  19. package/dist/templates/business/frontend/src/components/Layout/index.ts.hbs +0 -1
  20. package/dist/templates/business/frontend/src/env.d.ts.hbs +0 -28
  21. package/dist/templates/business/frontend/src/main.ts.hbs +0 -34
  22. package/dist/templates/business/frontend/src/permissions.ts.hbs +0 -4
  23. package/dist/templates/business/frontend/src/router.ts.hbs +0 -9
  24. package/dist/templates/business/frontend/src/views/dashboard/Index.vue.hbs +0 -93
  25. package/dist/templates/business/frontend/src/views/dashboard/index.ts.hbs +0 -11
  26. package/dist/templates/business/frontend/tsconfig.json.hbs +0 -19
  27. package/dist/templates/business/frontend/vite.config.ts.hbs +0 -27
  28. package/dist/templates/business/package.json.hbs +0 -25
  29. package/dist/templates/business/pnpm-workspace.yaml.hbs +0 -46
  30. package/dist/templates/business/shared/package.json.hbs +0 -34
  31. package/dist/templates/business/shared/src/index.ts.hbs +0 -1
  32. package/dist/templates/business/shared/src/permissions.ts.hbs +0 -3
  33. package/dist/templates/business/shared/tsconfig.cjs.json.hbs +0 -13
  34. package/dist/templates/business/shared/tsconfig.json.hbs +0 -13
  35. package/dist/templates/business/tsconfig.base.json.hbs +0 -12
  36. package/dist/templates/extension/README.md.hbs +0 -27
  37. package/dist/templates/extension/backend/.env.example +0 -46
  38. package/dist/templates/extension/backend/.env.hbs +0 -21
  39. package/dist/templates/extension/backend/nest-cli.json.hbs +0 -1
  40. package/dist/templates/extension/backend/package.json.hbs +0 -1
  41. package/dist/templates/extension/backend/src/controller/.gitkeep +0 -0
  42. package/dist/templates/extension/backend/src/dto/.gitkeep +0 -0
  43. package/dist/templates/extension/backend/src/entities/.gitkeep +0 -0
  44. package/dist/templates/extension/backend/src/index.ts.hbs +0 -1
  45. package/dist/templates/extension/backend/src/main.ts.hbs +0 -34
  46. package/dist/templates/extension/backend/src/service/.gitkeep +0 -0
  47. package/dist/templates/extension/backend/src/{{name}}.module.ts.hbs +0 -4
  48. package/dist/templates/extension/backend/tsconfig.json.hbs +0 -1
  49. package/dist/templates/extension/frontend/.env.example +0 -18
  50. package/dist/templates/extension/frontend/api.build.cjs.hbs +0 -8
  51. package/dist/templates/extension/frontend/index.html.hbs +0 -12
  52. package/dist/templates/extension/frontend/package.json.hbs +0 -1
  53. package/dist/templates/extension/frontend/src/apis/.gitkeep +0 -0
  54. package/dist/templates/extension/frontend/src/components/.gitkeep +0 -0
  55. package/dist/templates/extension/frontend/src/env.d.ts.hbs +0 -1
  56. package/dist/templates/extension/frontend/src/index.ts.hbs +0 -10
  57. package/dist/templates/extension/frontend/src/main.ts.hbs +0 -13
  58. package/dist/templates/extension/frontend/src/views/.gitkeep +0 -0
  59. package/dist/templates/extension/frontend/src/views/index.ts.hbs +0 -15
  60. package/dist/templates/extension/frontend/tsconfig.json.hbs +0 -1
  61. package/dist/templates/extension/frontend/vite.config.mts.hbs +0 -32
  62. package/dist/templates/extension/package.json.hbs +0 -1
  63. package/dist/templates/extension/scripts/verify-dist.mjs.hbs +0 -43
  64. package/dist/templates/extension/shared/package.json.hbs +0 -1
  65. package/dist/templates/extension/shared/src/constants.ts.hbs +0 -12
  66. package/dist/templates/extension/shared/src/dict.ts.hbs +0 -8
  67. package/dist/templates/extension/shared/src/index.ts.hbs +0 -10
  68. package/dist/templates/extension/shared/src/paths.ts.hbs +0 -5
  69. package/dist/templates/extension/shared/src/permission-values.ts.hbs +0 -3
  70. package/dist/templates/extension/shared/src/types.ts.hbs +0 -5
  71. package/dist/templates/extension/shared/tsconfig.json.hbs +0 -1
  72. package/dist/templates/extension/tsconfig.json.hbs +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moyan-mfw-cli",
3
- "version": "1.1.10-beta.3",
3
+ "version": "1.1.10-beta.5",
4
4
  "description": "MFW framework CLI — extension scaffolding, validation, and publishing tools",
5
5
  "type": "module",
6
6
  "bin": {
package/dist/index.cjs DELETED
@@ -1,368 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
- // If the importer is in node compatibility mode or this is not an ESM
19
- // file that has been converted to a CommonJS file using a Babel-
20
- // compatible transform (i.e. "__esModule" has not been set), then set
21
- // "default" to the CommonJS "module.exports" for node compatibility.
22
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
- mod
24
- ));
25
-
26
- // src/index.ts
27
- var import_commander3 = require("commander");
28
- var import_chalk3 = __toESM(require("chalk"), 1);
29
-
30
- // src/commands/create.ts
31
- var import_commander = require("commander");
32
- var import_inquirer = __toESM(require("inquirer"), 1);
33
- var import_chalk = __toESM(require("chalk"), 1);
34
- var path3 = __toESM(require("path"), 1);
35
- var fs3 = __toESM(require("fs/promises"), 1);
36
-
37
- // src/utils/fs.ts
38
- var fs = __toESM(require("fs/promises"), 1);
39
- var path = __toESM(require("path"), 1);
40
- async function ensureDir(dirPath) {
41
- await fs.mkdir(dirPath, { recursive: true });
42
- }
43
- async function writeFile2(filePath, content) {
44
- await ensureDir(path.dirname(filePath));
45
- await fs.writeFile(filePath, content, "utf-8");
46
- }
47
- async function exists(filePath) {
48
- try {
49
- await fs.access(filePath);
50
- return true;
51
- } catch {
52
- return false;
53
- }
54
- }
55
-
56
- // src/utils/template.ts
57
- var import_handlebars = __toESM(require("handlebars"), 1);
58
- var fs2 = __toESM(require("fs/promises"), 1);
59
- var fsSync = __toESM(require("fs"), 1);
60
- var path2 = __toESM(require("path"), 1);
61
- var import_node_url = require("url");
62
- var import_meta = {};
63
- var _currentDir = path2.dirname((0, import_node_url.fileURLToPath)(import_meta.url));
64
- function getCliVersion() {
65
- const pkgPathProd = path2.resolve(_currentDir, "../package.json");
66
- const pkgPathDev = path2.resolve(_currentDir, "../../package.json");
67
- const pkgPath = fsSync.existsSync(pkgPathProd) ? pkgPathProd : pkgPathDev;
68
- const raw = fsSync.readFileSync(pkgPath, "utf-8");
69
- const pkg = JSON.parse(raw);
70
- return pkg.version;
71
- }
72
- import_handlebars.default.registerHelper(
73
- "pascalCase",
74
- (str) => str.replace(/(^\w|-\w)/g, (c) => c.slice(-1).toUpperCase())
75
- );
76
- import_handlebars.default.registerHelper(
77
- "camelCase",
78
- (str) => str.replace(/-(\w)/g, (_, c) => c.toUpperCase())
79
- );
80
- import_handlebars.default.registerHelper("pascalCaseUpper", (str) => {
81
- const pascal = str.replace(/(^\w|-\w)/g, (c) => c.slice(-1).toUpperCase());
82
- return pascal.toUpperCase();
83
- });
84
- import_handlebars.default.registerHelper("snakeCase", (str) => str.replace(/-/g, "_"));
85
- function getTemplateDir(type) {
86
- const distTemplate = path2.resolve(_currentDir, `templates/${type}`);
87
- const srcTemplate = path2.resolve(_currentDir, `../templates/${type}`);
88
- if (fsSync.existsSync(distTemplate)) return distTemplate;
89
- if (fsSync.existsSync(srcTemplate)) return srcTemplate;
90
- return distTemplate;
91
- }
92
- function getParser(filePath) {
93
- const ext = path2.extname(filePath);
94
- const map = {
95
- ".ts": "typescript",
96
- ".tsx": "typescript",
97
- ".js": "babel",
98
- ".jsx": "babel",
99
- ".mjs": "babel",
100
- ".cjs": "babel",
101
- ".vue": "vue",
102
- ".json": "json",
103
- ".md": "markdown",
104
- ".html": "html",
105
- ".css": "css",
106
- ".scss": "scss",
107
- ".less": "less",
108
- ".yaml": "yaml",
109
- ".yml": "yaml"
110
- };
111
- return map[ext] ?? null;
112
- }
113
- async function formatContent(content, filePath) {
114
- const parser = getParser(filePath);
115
- if (!parser) return content;
116
- try {
117
- const mod = await import("prettier");
118
- const fmt = mod.default ?? mod;
119
- if (typeof fmt.format !== "function") return content;
120
- const formatted = await fmt.format(content, {
121
- parser,
122
- semi: true,
123
- singleQuote: true,
124
- trailingComma: "all",
125
- printWidth: 100,
126
- tabWidth: 2,
127
- useTabs: false,
128
- endOfLine: "lf"
129
- });
130
- return formatted;
131
- } catch {
132
- return content;
133
- }
134
- }
135
- async function renderTemplate(templatePath, vars) {
136
- const source = await fs2.readFile(templatePath, "utf-8");
137
- const compiled = import_handlebars.default.compile(source);
138
- return compiled(vars);
139
- }
140
- async function renderTemplateToDir(templateDir, outputDir, vars) {
141
- const files = await getAllFiles(templateDir);
142
- for (const file of files) {
143
- const relative4 = path2.relative(templateDir, file);
144
- if (relative4.endsWith(".hbs")) {
145
- const outputNameRaw = relative4.replace(/\.hbs$/, "").replace(/\\/g, "/");
146
- const outputName = import_handlebars.default.compile(outputNameRaw)(vars);
147
- const outputPath = path2.join(outputDir, outputName);
148
- const raw = await renderTemplate(file, vars);
149
- const content = await formatContent(raw, outputPath);
150
- await writeFile2(outputPath, content);
151
- } else {
152
- const outputPath = path2.join(outputDir, relative4);
153
- await ensureDir(path2.dirname(outputPath));
154
- await fs2.copyFile(file, outputPath);
155
- }
156
- }
157
- }
158
- async function getAllFiles(dir) {
159
- const results = [];
160
- const entries = await fs2.readdir(dir, { withFileTypes: true });
161
- for (const entry of entries) {
162
- const fullPath = path2.join(dir, entry.name);
163
- if (entry.isDirectory()) {
164
- results.push(...await getAllFiles(fullPath));
165
- } else {
166
- results.push(fullPath);
167
- }
168
- }
169
- return results;
170
- }
171
-
172
- // src/commands/create.ts
173
- function defaultExtensionAnswers(name, className) {
174
- return {
175
- displayName: className,
176
- description: "",
177
- routePrefix: `/ext/${name}`,
178
- hasBackend: true,
179
- hasFrontend: true,
180
- hasShared: true
181
- };
182
- }
183
- var createCommand = new import_commander.Command("extension").description("Create a new MFW extension package").argument("<name>", 'Extension name in kebab-case (e.g., "ad", "blog")').option("-t, --template <name>", "Template to use", "default").option("-d, --dir <path>", "Output directory", "packages/extensions").option("-f, --force", "Force overwrite existing directory", false).option("-y, --yes", "Skip prompts and use default values", false).action(async (name, opts) => {
184
- if (!/^[a-z][a-z0-9-]*$/.test(name)) {
185
- console.error(import_chalk.default.red(`Invalid name "${name}". Must be kebab-case.`));
186
- process.exit(1);
187
- }
188
- const className = name.replace(/(^\w|-\w)/g, (c) => c.slice(-1).toUpperCase());
189
- const targetDir = path3.resolve(opts.dir, `extension-${name}`);
190
- if (await exists(targetDir)) {
191
- if (!opts.force) {
192
- console.error(import_chalk.default.red(`Directory already exists: ${targetDir}
193
- Use --force to overwrite.`));
194
- process.exit(1);
195
- }
196
- }
197
- if (!process.stdin.isTTY && !opts.yes) {
198
- console.log(import_chalk.default.yellow("\u26A0 \u975E\u4EA4\u4E92\u5F0F\u7EC8\u7AEF\uFF0C\u5C06\u4F7F\u7528\u9ED8\u8BA4\u503C\u521B\u5EFA\uFF08\u4F7F\u7528 -y \u53EF\u8DF3\u8FC7\u6B64\u63D0\u793A\uFF09"));
199
- }
200
- const answers = opts.yes || !process.stdin.isTTY ? defaultExtensionAnswers(name, className) : await import_inquirer.default.prompt([
201
- { name: "displayName", message: "\u663E\u793A\u540D\u79F0:", default: className },
202
- { name: "description", message: "\u63CF\u8FF0:", default: "" },
203
- { name: "routePrefix", message: "\u8DEF\u7531\u524D\u7F00:", default: `/ext/${name}` },
204
- { name: "hasBackend", message: "\u9700\u8981\u540E\u7AEF\u6A21\u5757?", type: "confirm", default: true },
205
- { name: "hasFrontend", message: "\u9700\u8981\u524D\u7AEF\u9875\u9762?", type: "confirm", default: true },
206
- { name: "hasShared", message: "\u9700\u8981\u5171\u4EAB\u5C42?", type: "confirm", default: true }
207
- ]);
208
- if (!answers.routePrefix.startsWith("/ext/")) {
209
- console.error(import_chalk.default.red(`routePrefix must start with "/ext/", got: "${answers.routePrefix}"`));
210
- process.exit(1);
211
- }
212
- const vars = {
213
- name,
214
- displayName: answers.displayName,
215
- description: answers.description,
216
- routePrefix: answers.routePrefix,
217
- permPrefix: name,
218
- className,
219
- packageName: `moyan-mfw-extension-${name}`,
220
- hasBackend: answers.hasBackend,
221
- hasFrontend: answers.hasFrontend,
222
- hasShared: answers.hasShared,
223
- version: "0.1.0",
224
- baseVersion: getCliVersion(),
225
- year: (/* @__PURE__ */ new Date()).getFullYear()
226
- };
227
- const templateDir = getTemplateDir("extension");
228
- console.log(import_chalk.default.blue(`
229
- \u{1F528} Generating extension "${name}" at ${targetDir}...`));
230
- await renderTemplateToDir(templateDir, targetDir, vars);
231
- if (!vars.hasBackend) {
232
- await fs3.rm(path3.join(targetDir, "src/backend"), { recursive: true, force: true });
233
- }
234
- if (!vars.hasFrontend) {
235
- await fs3.rm(path3.join(targetDir, "src/frontend"), { recursive: true, force: true });
236
- }
237
- if (!vars.hasShared) {
238
- await fs3.rm(path3.join(targetDir, "src/shared"), { recursive: true, force: true });
239
- }
240
- await ensureDir(path3.join(targetDir, "database/migrations"));
241
- await writeFile2(path3.join(targetDir, "database/migrations", ".gitkeep"), "");
242
- console.log(import_chalk.default.green("\n\u2705 Done!"));
243
- console.log(`
244
- ${import_chalk.default.bold("\u{1F4CB} \u540E\u7EED\u96C6\u6210\u6B65\u9AA4:")}`);
245
- console.log(` 1. cd ${path3.relative(process.cwd(), targetDir)} && pnpm install`);
246
- console.log(" 2. \u6839 package.json \u2192 scripts.build \u4E2D\u6DFB\u52A0\u6784\u5EFA\u547D\u4EE4");
247
- console.log(" 3. \u6839 package.json \u2192 scripts.typecheck \u4E2D\u6DFB\u52A0\u5B50\u5305\u5F15\u7528");
248
- console.log(" 4. \uFF08\u5982\u9700\u540E\u7AEF\uFF09\u6CE8\u518C\u6269\u5C55 Module \u5230\u5E94\u7528\u5165\u53E3");
249
- console.log(import_chalk.default.gray("\n\u{1F4A1} P2 \u9636\u6BB5\u5C06\u63D0\u4F9B mfw integrate <name> \u81EA\u52A8\u5B8C\u6210\u6B65\u9AA4 2-4"));
250
- });
251
-
252
- // src/commands/create-business.ts
253
- var import_commander2 = require("commander");
254
- var import_inquirer2 = __toESM(require("inquirer"), 1);
255
- var import_chalk2 = __toESM(require("chalk"), 1);
256
- var path4 = __toESM(require("path"), 1);
257
- function defaultBusinessAnswers(className) {
258
- return {
259
- displayName: className,
260
- description: `${className} \u4E1A\u52A1\u9879\u76EE`,
261
- port: "3000",
262
- frontendPort: "5173"
263
- };
264
- }
265
- var createBusinessCommand = new import_commander2.Command("business").description("Create a new business project (backend + frontend + shared)").argument("<name>", 'Project name in kebab-case (e.g., "my-shop")').option("-d, --dir <path>", "Output directory", ".").option("-f, --force", "Force overwrite existing directory", false).option("-y, --yes", "Skip prompts and use default values", false).action(async (name, opts) => {
266
- if (!/^[a-z][a-z0-9-]*$/.test(name)) {
267
- console.error(import_chalk2.default.red(`Invalid name "${name}". Must be kebab-case (e.g., "my-shop").`));
268
- process.exit(1);
269
- }
270
- const targetDir = path4.resolve(opts.dir, name);
271
- const className = name.replace(/(^\w|-\w)/g, (c) => c.slice(-1).toUpperCase());
272
- if (await exists(targetDir)) {
273
- if (!opts.force) {
274
- console.error(import_chalk2.default.red(`Directory already exists: ${targetDir}
275
- Use --force to overwrite.`));
276
- process.exit(1);
277
- }
278
- }
279
- if (!process.stdin.isTTY && !opts.yes) {
280
- console.log(import_chalk2.default.yellow("\u26A0 \u975E\u4EA4\u4E92\u5F0F\u7EC8\u7AEF\uFF0C\u5C06\u4F7F\u7528\u9ED8\u8BA4\u503C\u521B\u5EFA\uFF08\u4F7F\u7528 -y \u53EF\u8DF3\u8FC7\u6B64\u63D0\u793A\uFF09"));
281
- }
282
- const answers = opts.yes || !process.stdin.isTTY ? defaultBusinessAnswers(className) : await import_inquirer2.default.prompt([
283
- {
284
- name: "displayName",
285
- message: "\u663E\u793A\u540D\u79F0:",
286
- default: className
287
- },
288
- {
289
- name: "description",
290
- message: "\u63CF\u8FF0:",
291
- default: `${className} \u4E1A\u52A1\u9879\u76EE`
292
- },
293
- {
294
- name: "port",
295
- message: "\u540E\u7AEF\u7AEF\u53E3:",
296
- default: "3000",
297
- validate: (v) => {
298
- const n = Number(v);
299
- return n > 0 && n < 65536 ? true : "\u7AEF\u53E3\u53F7\u5FC5\u987B\u5728 1-65535 \u4E4B\u95F4";
300
- }
301
- },
302
- {
303
- name: "frontendPort",
304
- message: "\u524D\u7AEF\u7AEF\u53E3:",
305
- default: "5173",
306
- validate: (v) => {
307
- const n = Number(v);
308
- return n > 0 && n < 65536 ? true : "\u7AEF\u53E3\u53F7\u5FC5\u987B\u5728 1-65535 \u4E4B\u95F4";
309
- }
310
- }
311
- ]);
312
- const vars = {
313
- name,
314
- displayName: answers.displayName,
315
- description: answers.description,
316
- port: Number(answers.port),
317
- frontendPort: Number(answers.frontendPort),
318
- className,
319
- version: "0.1.0",
320
- baseVersion: getCliVersion(),
321
- year: (/* @__PURE__ */ new Date()).getFullYear()
322
- };
323
- const templateDir = getTemplateDir("business");
324
- console.log(import_chalk2.default.blue(`
325
- \u{1F528} Generating business project "${name}" at ${targetDir}...`));
326
- await renderTemplateToDir(templateDir, targetDir, vars);
327
- const keepDirs = [
328
- "backend/src/modules",
329
- "backend/src/entities",
330
- "backend/src/database",
331
- "frontend/src/components/Layout"
332
- ];
333
- for (const dir of keepDirs) {
334
- await ensureDir(path4.join(targetDir, dir));
335
- await writeFile2(path4.join(targetDir, dir, ".gitkeep"), "");
336
- }
337
- console.log(import_chalk2.default.green("\n\u2705 Done!"));
338
- console.log(`
339
- ${import_chalk2.default.bold("\u{1F4CB} \u540E\u7EED\u6B65\u9AA4:")}`);
340
- console.log(` 1. cd ${path4.relative(process.cwd(), targetDir)}`);
341
- console.log(` 2. \u7F16\u8F91 backend/.env \u914D\u7F6E\u6570\u636E\u5E93\u8FDE\u63A5`);
342
- console.log(` 3. \u5728 MySQL \u4E2D\u521B\u5EFA\u6570\u636E\u5E93\uFF08\u9ED8\u8BA4 DB_NAME \u89C1 backend/.env\uFF09`);
343
- console.log(` 4. pnpm install --no-frozen-lockfile && pnpm build`);
344
- console.log(` 5. pnpm --filter ${name}-backend dev # \u542F\u52A8\u540E\u7AEF`);
345
- console.log(` 6. pnpm --filter ${name}-frontend dev # \u542F\u52A8\u524D\u7AEF`);
346
- console.log(`
347
- ${import_chalk2.default.yellow("\u26A0 \u9996\u6B21\u5B89\u88C5\u8BF7\u4F7F\u7528 --no-frozen-lockfile\uFF0C\u5426\u5219\u4F1A\u56E0\u7F3A\u5C11 lock \u6587\u4EF6\u62A5\u9519")}`);
348
- console.log(`${import_chalk2.default.gray("\u{1F4A1} \u6DFB\u52A0\u6269\u5C55\u6A21\u5757: \u5728 backend/src/app.modules.ts \u4E2D\u5F15\u5165\u6269\u5C55 Module")}`);
349
- console.log(`${import_chalk2.default.gray("\u{1F4A1} \u6DFB\u52A0\u4E1A\u52A1\u6A21\u5757: \u5728 backend/src/modules/ \u4E0B\u521B\u5EFA\u65B0\u7684 NestJS \u6A21\u5757")}`);
350
- });
351
-
352
- // src/index.ts
353
- var program = new import_commander3.Command();
354
- program.name("mfw").description("Moyan MFW Framework CLI").version(getCliVersion());
355
- var createCmd = new import_commander3.Command("create").description("Create a new extension or resource");
356
- createCmd.addCommand(createCommand);
357
- createCmd.addCommand(createBusinessCommand);
358
- program.addCommand(createCmd);
359
- program.command("generate").description("Generate code within an extension").action(() => {
360
- console.log(import_chalk3.default.yellow("generate command coming soon"));
361
- });
362
- program.command("validate").description("Validate an extension package").action(() => {
363
- console.log(import_chalk3.default.yellow("validate command coming soon"));
364
- });
365
- program.command("version").description("Version management utilities").action(() => {
366
- console.log(import_chalk3.default.yellow("version command coming soon"));
367
- });
368
- program.parse();
package/dist/index.d.cts DELETED
@@ -1 +0,0 @@
1
- #!/usr/bin/env node
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- #!/usr/bin/env node