@yorha2b-lab/autodev 1.0.36 → 1.0.38
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 +8 -0
- package/README_EN.md +8 -0
- package/package.json +1 -1
- package/src/commands/watch-page.js +2 -2
- package/templates/react/index.hbs +2 -2
package/README.md
CHANGED
|
@@ -43,6 +43,14 @@ npm install -g @yorha2b-lab/autodev
|
|
|
43
43
|
autodev init
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
+
> ### 💡 零配置快速体验 (模拟模式)
|
|
47
|
+
> 为了能立即感受到 Bunker 的构筑力量,项目默认开启了 **Demo 模式**:
|
|
48
|
+
> 1. **无需配置 API_KEY**,直接运行 `autodev watch:page`。
|
|
49
|
+
> 2. 向 `screenShot` 目录丢入任意图片(系统将忽略图片内容,自动空投标准 `example.json` 构筑包)。
|
|
50
|
+
> 3. **观察效果**:你会看到命令行刷刷闪过,React 代码瞬间物理装配完成。
|
|
51
|
+
>
|
|
52
|
+
> *注:若想识别真实截图,请在 `config.js` 中将 `useDemo` 设为 `false` 并配置下方环境变量。*
|
|
53
|
+
|
|
46
54
|
创建 `.env` 文件并配置以下环境变量:
|
|
47
55
|
|
|
48
56
|
```bash
|
package/README_EN.md
CHANGED
|
@@ -43,6 +43,14 @@ Quick start
|
|
|
43
43
|
autodev init
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
+
> ### 💡 Zero-Config Quick Start (Simulation Mode)
|
|
47
|
+
> To allow YoRHa units to experience the construction power immediately, **Demo Mode** is enabled by default:
|
|
48
|
+
> 1. **No API_KEY required**. Simply run `autodev watch:page`.
|
|
49
|
+
> 2. Drop any image into the `screenShot` directory (the system will ignore the image content and deploy a standard `example.json` construction package).
|
|
50
|
+
> 3. **Watch the Magic**: The terminal will flash, and React code is physically assembled in seconds.
|
|
51
|
+
>
|
|
52
|
+
> *Note: To recognize actual screenshots, set `useDemo: false` in `config.js` and configure the environment variables above.*
|
|
53
|
+
|
|
46
54
|
Create a `.env` file and configure the following environment variables:
|
|
47
55
|
|
|
48
56
|
```bash
|
package/package.json
CHANGED
|
@@ -98,8 +98,8 @@ const watchPage = options => {
|
|
|
98
98
|
let pageConfig
|
|
99
99
|
if (config.useDemo) {
|
|
100
100
|
console.log(chalk.yellow(language(
|
|
101
|
-
`\nPod 042: [
|
|
102
|
-
`\nPod 042: [
|
|
101
|
+
`\nPod 042: [警告] 当前处于模拟模式。检测到视觉样本,但 Bunker 已拦截实弹请求,正在空投标准构筑包`,
|
|
102
|
+
`\nPod 042: [Warning] Current mode is demo. Visual sample detected, but Bunker has intercepted real requests. Sending standard package.`
|
|
103
103
|
)))
|
|
104
104
|
pageConfig = require(path.join(__dirname, '../../example/example.json'))
|
|
105
105
|
} else {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export default props => {
|
|
2
2
|
|
|
3
|
-
const query = formatQuery(Object.fromEntries(new URLSearchParams(location.search).entries()), formItems)
|
|
4
|
-
|
|
5
3
|
const [form] = Form.useForm()
|
|
6
4
|
const [modal, setModal] = useState({})
|
|
7
5
|
{{#if hasTabs}}
|
|
@@ -16,6 +14,8 @@ export default props => {
|
|
|
16
14
|
|
|
17
15
|
const initParams = {{#if hasTabs}}{ type: tabs[0].key }{{else}}{}{{/if}}
|
|
18
16
|
|
|
17
|
+
const query = formatQuery(Object.fromEntries(new URLSearchParams(location.search).entries()), {{#if hasTabs}}formItems[activeKey]{{else}}formItems{{/if}})
|
|
18
|
+
|
|
19
19
|
const { total, loading, dataSource, search, setSearch, refresh } = useTableQuery(
|
|
20
20
|
async params => await request('/api/{{fileName}}', { method: 'POST', body: params }),
|
|
21
21
|
response => ({ data: response?.data ?? [], total: response?.total ?? 0 }),
|