@yorha2b-lab/autodev 2.0.6 → 2.0.8
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/autodev.js
CHANGED
|
@@ -6,8 +6,6 @@ const { program } = require('commander')
|
|
|
6
6
|
const pkg = require(path.join(__dirname, '../package.json'))
|
|
7
7
|
const { language, matrixEffect, bootSequence } = require(path.join(__dirname, '../src/utils/utils.js'))
|
|
8
8
|
|
|
9
|
-
bootSequence(pkg.version)
|
|
10
|
-
|
|
11
9
|
program
|
|
12
10
|
.version(pkg.version)
|
|
13
11
|
.description(language('AI驱动的前端CRUD代码生成器', 'AI-powered frontend CRUD code generator'))
|
|
@@ -53,6 +51,7 @@ program
|
|
|
53
51
|
.alias('start')
|
|
54
52
|
.description(language('开启全频道联动监控:支持 Page/Part/API 协同构筑', 'Start full-channel linked monitoring: Coordinated Page/Part/API construction'))
|
|
55
53
|
.action(() => {
|
|
54
|
+
bootSequence(pkg.version)
|
|
56
55
|
const watch = require('../src/commands/watch')
|
|
57
56
|
watch(program.opts())
|
|
58
57
|
process.on('SIGINT', () => {
|
package/package.json
CHANGED
|
@@ -22,8 +22,8 @@ module.exports = async (filePath, context) => {
|
|
|
22
22
|
try {
|
|
23
23
|
if (!fs.existsSync(resourcePath)) {
|
|
24
24
|
throw new Error(language(
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
`🤖 Pod 153: [警告] 地堡数据库中未检索到模块 [${fileName}] 的资源文件。请先执行视觉构筑。`,
|
|
26
|
+
`🤖 Pod 153: [Warning] Module [${fileName}] resource not found in Bunker database. Please execute visual construction first.`
|
|
27
27
|
))
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -8,14 +8,18 @@ module.exports = `
|
|
|
8
8
|
## 1. 表格 (Table)
|
|
9
9
|
- 结构: { columns: [{ title: '', dataIndex: '' }] }
|
|
10
10
|
- ⚠️ 字段白名单: [title, dataIndex, sorter, render, filters, onFilter]
|
|
11
|
-
- 禁止输出:
|
|
11
|
+
- 禁止输出:
|
|
12
|
+
- 严禁在 columns 中包含“操作”列。
|
|
13
|
+
- 严禁输出formItems,只允许输出coloumns
|
|
12
14
|
- 特殊逻辑:
|
|
13
15
|
- 时间列: render 必须为 _CODE_text=>timeRender({time:text})_CODE_
|
|
14
16
|
- 序号列: render 必须为 _CODE_(_, record, index) => index + 1_CODE_
|
|
15
|
-
- 下拉映射列: render 必须为 _CODE_text
|
|
17
|
+
- 下拉映射列: render 必须为 _CODE_text=>字段英文名Options.find(item=>item.value===text)?.label_CODE_
|
|
16
18
|
|
|
17
19
|
## 2. 表单 (Form)
|
|
18
20
|
- 结构: formItems: [{label:'',name:'',type:'',options:[]}]
|
|
21
|
+
- 禁止输出:
|
|
22
|
+
- 严禁输出columns,只允许输出formItems
|
|
19
23
|
- ⚠️ 属性精简规则:
|
|
20
24
|
- 默认输入框: 仅保留 [label, name] 属性。**严禁出现 type 属性**。
|
|
21
25
|
- 非默认组件: 仅当类型为 [auto, date, radio, select, upload, checkbox, textarea, daterange] 时才允许添加 type 属性。
|
|
@@ -27,6 +31,6 @@ module.exports = `
|
|
|
27
31
|
- 文字单位: 若项末尾有单位(如 元/kg),必须存入 unit 属性。
|
|
28
32
|
|
|
29
33
|
## 3. 下拉选项字典 (OptionDict)
|
|
30
|
-
- 结构: optionDict: { _CODE_
|
|
34
|
+
- 结构: optionDict: { _CODE_字段英文名Options_CODE_: [] }
|
|
31
35
|
- 内容: 数组元素必须为 {label: '', value: ''} 格式。
|
|
32
36
|
`
|
package/src/utils/utils.js
CHANGED
|
@@ -94,7 +94,7 @@ const matrixEffect = (duration = 1500) => {
|
|
|
94
94
|
if (Date.now() > endTime) {
|
|
95
95
|
clearInterval(interval)
|
|
96
96
|
console.log(chalk.white(' [System] ') + chalk.green(language('所有构筑数据已同步至 Bunker 存储节点。', 'All data synced to Bunker storage nodes.')))
|
|
97
|
-
console.log(chalk.cyan(language('如果它能帮您节省时间,请在 GitHub 上给它点个赞 ⭐。', 'If it saves you time, feel free to give it a ⭐ on GitHub.')))
|
|
97
|
+
console.log(chalk.cyan(language(' [System] 如果它能帮您节省时间,请在 GitHub 上给它点个赞 ⭐。', ' [System] If it saves you time, feel free to give it a ⭐ on GitHub.')))
|
|
98
98
|
console.log(chalk.cyan('\n[System] Signal Lost. Glory to Mankind.\n'))
|
|
99
99
|
process.exit(0)
|
|
100
100
|
return
|