@yorha2b-lab/autodev 1.0.0 → 1.0.2
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/README.md +10 -0
- package/bin/autodev.js +5 -1
- package/package.json +6 -6
- package/src/prompts/mock.js +1 -1
- package/templates/react/components/MyBaseForm.js +1 -1
package/README.md
CHANGED
|
@@ -170,4 +170,14 @@ A: 工具本身开源免费,但调用的 AI 模型(如 GPT-4v, Qwen-VL)可
|
|
|
170
170
|
|
|
171
171
|
---
|
|
172
172
|
|
|
173
|
+
## ⚖️ Disclaimer
|
|
174
|
+
|
|
175
|
+
Auto CRUD Copilot is a **fan-made, non-commercial, open-source tool**.
|
|
176
|
+
|
|
177
|
+
- The themes, names (YoRHa, 2B, etc.), and catchphrases included in this project are inspired by **NieR:Automata**, which is a trademark and copyright of **Square Enix Co., Ltd. / PlatinumGames Inc.**
|
|
178
|
+
- This project is not affiliated with, endorsed by, or representative of Square Enix in any way.
|
|
179
|
+
- Please support the original masterpiece: [NieR:Automata Official Site](https://nierautomata.square-enix-games.com/).
|
|
180
|
+
|
|
181
|
+
**Glory to Mankind.**
|
|
182
|
+
|
|
173
183
|
⭐ 如果这个项目对你有帮助,请给个Star支持一下!
|
package/bin/autodev.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
const fs = require('fs')
|
|
2
3
|
const path = require('path')
|
|
3
4
|
const chalk = require('chalk')
|
|
4
5
|
const figlet = require('figlet')
|
|
@@ -9,8 +10,11 @@ console.log(chalk.white(' [System] ') + chalk.green('YoRHa No.2 Type B Unit: ')
|
|
|
9
10
|
console.log(chalk.white(' [Mission] ') + chalk.yellow('Generate Frontend CRUD: ') + chalk.cyan('Awaiting Command'))
|
|
10
11
|
console.log(chalk.gray('--------------------------------------------------\n'))
|
|
11
12
|
|
|
13
|
+
const localEnv = path.resolve(process.cwd(), '.env')
|
|
14
|
+
const pkgEnv = path.resolve(__dirname, '../.env')
|
|
15
|
+
|
|
12
16
|
require("dotenv").config({
|
|
13
|
-
path:
|
|
17
|
+
path: fs.existsSync(localEnv) ? localEnv : pkgEnv
|
|
14
18
|
})
|
|
15
19
|
|
|
16
20
|
const { program } = require('commander')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yorha2b-lab/autodev",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "基于视觉大模型的前端(Umi+Antd)全自动 CRUD 代码生成器",
|
|
5
5
|
"bin": {
|
|
6
6
|
"autodev": "bin/autodev.js"
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/yorha2b-lab/auto-crud-copilot#readme",
|
|
37
37
|
"dependencies": {
|
|
38
|
+
"chalk": "^4.1.2",
|
|
38
39
|
"chokidar": "^5.0.0",
|
|
39
40
|
"commander": "^14.0.3",
|
|
40
41
|
"dotenv": "^17.3.1",
|
|
42
|
+
"figlet": "^1.10.0",
|
|
41
43
|
"handlebars": "^4.7.8",
|
|
42
44
|
"json-stringify-pretty-compact": "^4.0.0",
|
|
43
45
|
"json5": "^2.2.3",
|
|
44
46
|
"openai": "^6.24.0",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"figlet": "^1.10.0",
|
|
48
|
-
"ora": "^5.4.1"
|
|
47
|
+
"ora": "^5.4.1",
|
|
48
|
+
"sharp": "^0.34.5"
|
|
49
49
|
}
|
|
50
|
-
}
|
|
50
|
+
}
|
package/src/prompts/mock.js
CHANGED
|
@@ -3,7 +3,7 @@ import { formNode } from './index'
|
|
|
3
3
|
|
|
4
4
|
export const MyBaseForm = ({ item, form }) => {
|
|
5
5
|
|
|
6
|
-
const renderFormContent = item => {
|
|
6
|
+
const renderFormContent = ({ item }) => {
|
|
7
7
|
|
|
8
8
|
if (!item.name) {
|
|
9
9
|
return typeof item.render === 'function' ? item.render(item) : (item.value ?? '-')
|