@svton/cli 1.2.4 → 1.2.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.
package/dist/index.js CHANGED
@@ -743,7 +743,7 @@ async function generateEnvExample(features, config, targetPath) {
743
743
  return lines.join("\n");
744
744
  })
745
745
  ].join("\n");
746
- await import_fs_extra4.default.writeFile(import_path3.default.join(targetPath, ".env.example"), content);
746
+ await import_fs_extra4.default.writeFile(import_path3.default.join(targetPath, "apps/backend/.env.example"), content);
747
747
  logger.info("Generated .env.example");
748
748
  }
749
749
  async function copyConfigFiles(features, config, templateDir, targetPath) {
@@ -834,7 +834,7 @@ ${featuresList}
834
834
  \u5F53\u4F60\u9700\u8981\u4F7F\u7528\u67D0\u4E2A\u529F\u80FD\u65F6\uFF0C\u53EF\u4EE5\uFF1A
835
835
 
836
836
  1. \u67E5\u770B\u5BF9\u5E94\u7684 skill \u6587\u6863\u4E86\u89E3 API \u548C\u6700\u4F73\u5B9E\u8DF5
837
- 2. \u53C2\u8003 \`src/examples/\` \u76EE\u5F55\u4E0B\u7684\u793A\u4F8B\u4EE3\u7801
837
+ 2. \u53C2\u8003 \`apps/backend/src/examples/\` \u76EE\u5F55\u4E0B\u7684\u793A\u4F8B\u4EE3\u7801
838
838
  3. \u67E5\u770B\u5B98\u65B9\u6587\u6863\u83B7\u53D6\u66F4\u591A\u4FE1\u606F
839
839
 
840
840
  ## \u6587\u6863\u8D44\u6E90
@@ -847,7 +847,7 @@ ${featuresList}
847
847
  logger.info("Generated capabilities index");
848
848
  }
849
849
  async function updatePackageJson(features, config, targetPath) {
850
- const packageJsonPath = import_path3.default.join(targetPath, "package.json");
850
+ const packageJsonPath = import_path3.default.join(targetPath, "apps/backend/package.json");
851
851
  const packageJson = await import_fs_extra4.default.readJSON(packageJsonPath);
852
852
  const dependencies = collectDependencies(features, config);
853
853
  packageJson.dependencies = {
@@ -884,7 +884,7 @@ function generateModuleRegistrations(features, config) {
884
884
  return registrations.join("\n");
885
885
  }
886
886
  async function updateAppModule(features, config, targetPath) {
887
- const appModulePath = import_path3.default.join(targetPath, "src/app.module.ts");
887
+ const appModulePath = import_path3.default.join(targetPath, "apps/backend/src/app.module.ts");
888
888
  if (!await import_fs_extra4.default.pathExists(appModulePath)) {
889
889
  logger.warn("app.module.ts not found, skipping module injection");
890
890
  return;
@@ -1115,7 +1115,7 @@ async function createProjectFromTemplate(config) {
1115
1115
  }
1116
1116
 
1117
1117
  // package.json
1118
- var version = "1.2.4";
1118
+ var version = "1.2.5";
1119
1119
 
1120
1120
  // src/index.ts
1121
1121
  async function cli() {
package/dist/index.mjs CHANGED
@@ -716,7 +716,7 @@ async function generateEnvExample(features, config, targetPath) {
716
716
  return lines.join("\n");
717
717
  })
718
718
  ].join("\n");
719
- await fs4.writeFile(path3.join(targetPath, ".env.example"), content);
719
+ await fs4.writeFile(path3.join(targetPath, "apps/backend/.env.example"), content);
720
720
  logger.info("Generated .env.example");
721
721
  }
722
722
  async function copyConfigFiles(features, config, templateDir, targetPath) {
@@ -807,7 +807,7 @@ ${featuresList}
807
807
  \u5F53\u4F60\u9700\u8981\u4F7F\u7528\u67D0\u4E2A\u529F\u80FD\u65F6\uFF0C\u53EF\u4EE5\uFF1A
808
808
 
809
809
  1. \u67E5\u770B\u5BF9\u5E94\u7684 skill \u6587\u6863\u4E86\u89E3 API \u548C\u6700\u4F73\u5B9E\u8DF5
810
- 2. \u53C2\u8003 \`src/examples/\` \u76EE\u5F55\u4E0B\u7684\u793A\u4F8B\u4EE3\u7801
810
+ 2. \u53C2\u8003 \`apps/backend/src/examples/\` \u76EE\u5F55\u4E0B\u7684\u793A\u4F8B\u4EE3\u7801
811
811
  3. \u67E5\u770B\u5B98\u65B9\u6587\u6863\u83B7\u53D6\u66F4\u591A\u4FE1\u606F
812
812
 
813
813
  ## \u6587\u6863\u8D44\u6E90
@@ -820,7 +820,7 @@ ${featuresList}
820
820
  logger.info("Generated capabilities index");
821
821
  }
822
822
  async function updatePackageJson(features, config, targetPath) {
823
- const packageJsonPath = path3.join(targetPath, "package.json");
823
+ const packageJsonPath = path3.join(targetPath, "apps/backend/package.json");
824
824
  const packageJson = await fs4.readJSON(packageJsonPath);
825
825
  const dependencies = collectDependencies(features, config);
826
826
  packageJson.dependencies = {
@@ -857,7 +857,7 @@ function generateModuleRegistrations(features, config) {
857
857
  return registrations.join("\n");
858
858
  }
859
859
  async function updateAppModule(features, config, targetPath) {
860
- const appModulePath = path3.join(targetPath, "src/app.module.ts");
860
+ const appModulePath = path3.join(targetPath, "apps/backend/src/app.module.ts");
861
861
  if (!await fs4.pathExists(appModulePath)) {
862
862
  logger.warn("app.module.ts not found, skipping module injection");
863
863
  return;
@@ -1088,7 +1088,7 @@ async function createProjectFromTemplate(config) {
1088
1088
  }
1089
1089
 
1090
1090
  // package.json
1091
- var version = "1.2.4";
1091
+ var version = "1.2.5";
1092
1092
 
1093
1093
  // src/index.ts
1094
1094
  async function cli() {
package/features.json CHANGED
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "configFiles": [
19
19
  {
20
- "path": "src/config/cache.config.ts",
20
+ "path": "apps/backend/src/config/cache.config.ts",
21
21
  "template": "configs/cache.config.ts"
22
22
  }
23
23
  ],
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "exampleFiles": {
36
36
  "source": "examples/cache",
37
- "target": "src/examples/cache",
37
+ "target": "apps/backend/src/examples/cache",
38
38
  "description": "缓存装饰器使用示例"
39
39
  },
40
40
  "skillFile": {
@@ -58,7 +58,7 @@
58
58
  ],
59
59
  "configFiles": [
60
60
  {
61
- "path": "src/config/queue.config.ts",
61
+ "path": "apps/backend/src/config/queue.config.ts",
62
62
  "template": "configs/queue.config.ts"
63
63
  }
64
64
  ],
@@ -75,7 +75,7 @@
75
75
  },
76
76
  "exampleFiles": {
77
77
  "source": "examples/queue",
78
- "target": "src/examples/queue",
78
+ "target": "apps/backend/src/examples/queue",
79
79
  "description": "队列任务处理示例"
80
80
  },
81
81
  "skillFile": {
@@ -104,7 +104,7 @@
104
104
  ],
105
105
  "configFiles": [
106
106
  {
107
- "path": "src/config/payment.config.ts",
107
+ "path": "apps/backend/src/config/payment.config.ts",
108
108
  "template": "configs/payment.config.ts"
109
109
  }
110
110
  ],
@@ -121,7 +121,7 @@
121
121
  },
122
122
  "exampleFiles": {
123
123
  "source": "examples/payment",
124
- "target": "src/examples/payment",
124
+ "target": "apps/backend/src/examples/payment",
125
125
  "description": "支付功能示例(微信/支付宝)"
126
126
  },
127
127
  "skillFile": {
@@ -146,7 +146,7 @@
146
146
  ],
147
147
  "configFiles": [
148
148
  {
149
- "path": "src/config/oauth.config.ts",
149
+ "path": "apps/backend/src/config/oauth.config.ts",
150
150
  "template": "configs/oauth.config.ts"
151
151
  }
152
152
  ],
@@ -163,7 +163,7 @@
163
163
  },
164
164
  "exampleFiles": {
165
165
  "source": "examples/oauth",
166
- "target": "src/examples/oauth",
166
+ "target": "apps/backend/src/examples/oauth",
167
167
  "description": "OAuth 登录示例"
168
168
  },
169
169
  "skillFile": {
@@ -188,7 +188,7 @@
188
188
  ],
189
189
  "configFiles": [
190
190
  {
191
- "path": "src/config/sms.config.ts",
191
+ "path": "apps/backend/src/config/sms.config.ts",
192
192
  "template": "configs/sms.config.ts"
193
193
  }
194
194
  ],
@@ -205,7 +205,7 @@
205
205
  },
206
206
  "exampleFiles": {
207
207
  "source": "examples/sms",
208
- "target": "src/examples/sms",
208
+ "target": "apps/backend/src/examples/sms",
209
209
  "description": "短信发送示例"
210
210
  },
211
211
  "skillFile": {
@@ -232,7 +232,7 @@
232
232
  ],
233
233
  "configFiles": [
234
234
  {
235
- "path": "src/config/storage.config.ts",
235
+ "path": "apps/backend/src/config/storage.config.ts",
236
236
  "template": "configs/storage.config.ts"
237
237
  }
238
238
  ],
@@ -249,7 +249,7 @@
249
249
  },
250
250
  "exampleFiles": {
251
251
  "source": "examples/storage",
252
- "target": "src/examples/storage",
252
+ "target": "apps/backend/src/examples/storage",
253
253
  "description": "文件上传示例"
254
254
  },
255
255
  "skillFile": {
@@ -273,7 +273,7 @@
273
273
  ],
274
274
  "configFiles": [
275
275
  {
276
- "path": "src/config/rate-limit.config.ts",
276
+ "path": "apps/backend/src/config/rate-limit.config.ts",
277
277
  "template": "configs/rate-limit.config.ts"
278
278
  }
279
279
  ],
@@ -290,7 +290,7 @@
290
290
  },
291
291
  "exampleFiles": {
292
292
  "source": "examples/rate-limit",
293
- "target": "src/examples/rate-limit",
293
+ "target": "apps/backend/src/examples/rate-limit",
294
294
  "description": "限流使用示例"
295
295
  },
296
296
  "skillFile": {
@@ -310,7 +310,7 @@
310
310
  "envVars": [],
311
311
  "configFiles": [
312
312
  {
313
- "path": "src/config/authz.config.ts",
313
+ "path": "apps/backend/src/config/authz.config.ts",
314
314
  "template": "configs/authz.config.ts"
315
315
  }
316
316
  ],
@@ -327,7 +327,7 @@
327
327
  },
328
328
  "exampleFiles": {
329
329
  "source": "examples/authz",
330
- "target": "src/examples/authz",
330
+ "target": "apps/backend/src/examples/authz",
331
331
  "description": "权限控制示例"
332
332
  },
333
333
  "skillFile": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svton/cli",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Svton CLI - Create full-stack applications with NestJS, Next.js, and Taro",
5
5
  "keywords": [
6
6
  "cli",