@yorha2b-lab/autodev 1.0.39 → 1.0.40

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yorha2b-lab/autodev",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "description": "基于视觉大模型的前端(Umi+Antd)全自动 CRUD 代码生成器",
5
5
  "bin": {
6
6
  "autodev": "bin/autodev.js"
@@ -119,10 +119,10 @@ const watchPage = options => {
119
119
  `🧑‍💻 9S: Leave it to me, 2B! Hacking and forging Mock data for [${fileName}]...`
120
120
  )))
121
121
  const rawContent = await generateMock(pageConfig.table.columns, fileName)
122
- fs.writeFileSync(path.join(mockDir, `${fileName}.js`), `export default ${stringify.default(rawContent, { indent: 4, maxLength: 200 })}`.replaceAll(`"'`, `"`).replaceAll(`'"`, `"`))
122
+ fs.writeFileSync(path.join(mockDir, `${fileName}.js`), `export default ${stringify.default(rawContent, { indent: 4, maxLength: 200 })}`)
123
123
  console.log(chalk.green(language(
124
- `🤖 Pod 042: [报告] Mock 数据注入完成,耗时: ${(Date.now() - startTime) / 1000} 秒`,
125
- `🤖 Pod 042: [Report] Mock data injection complete. Elapsed time: ${(Date.now() - startTime) / 1000}s`
124
+ `\n🤖 Pod 042: [报告] Mock 数据注入完成,耗时: ${(Date.now() - startTime) / 1000} 秒`,
125
+ `\n🤖 Pod 042: [Report] Mock data injection complete. Elapsed time: ${(Date.now() - startTime) / 1000}s`
126
126
  )))
127
127
  }
128
128
 
@@ -1,5 +1,6 @@
1
1
  module.exports = (columns, fileName) => `
2
- 根据这些字段生成一个简单的get接口mock数据: ${JSON.stringify(columns)},
3
- 格式如下:
4
- 'POST /api/${fileName}': {data:模块对象列表},
2
+ 根据这些字段生成一个简单的接口mock数据: ${JSON.stringify(columns)},
3
+ 格式为{key:value}:
4
+ key: POST /api/${fileName}
5
+ value: {data:模块对象列表},
5
6
  `