zero-ai 0.3.36 → 1.0.49
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 +3 -1
- package/package.json +1 -1
- package/script/zrun-ram.sh +25 -0
- package/src/_template/ZERO/source-domain/mvn-db.sh +5 -0
- package/src/_template/ZERO/source-provider/vertx-generate.yml.ejs +8 -0
- package/src/_template/version +2 -2
- package/src/commander-shared/ai.fn.initialize.__.zero.directory.js +1 -0
- package/src/commander-shared/ai.fn.initialize.__.zero.file.js +16 -3
package/README.md
CHANGED
|
@@ -29,10 +29,12 @@ npm install -g zero-ai
|
|
|
29
29
|
|
|
30
30
|
```
|
|
31
31
|
/usr/local/bin/ai -> /usr/local/lib/node_modules/vertx-ai/src/ai.js
|
|
32
|
-
+ zero-ai@
|
|
32
|
+
+ zero-ai@x.x.xx
|
|
33
33
|
added 77 packages from 119 contributors in 8.417s
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
版本跟随 `R2MO / MOMO` 版本同步更新,所以最新版是 `1.0.48`
|
|
37
|
+
|
|
36
38
|
## 2. 常用命令说明
|
|
37
39
|
|
|
38
40
|
```bash
|
package/package.json
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# 1. 检查是否有参数
|
|
4
|
+
CACHE_NAME="$1"
|
|
5
|
+
|
|
6
|
+
if [ -z "$CACHE_NAME" ]; then
|
|
7
|
+
echo "❌ 错误:请提供一个名称参数"
|
|
8
|
+
echo "👉 用法: ./zrun-ram.sh my-project-v1"
|
|
9
|
+
exit 1
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
# 2. 定义 RAMDisk 目标位置
|
|
13
|
+
TARGET_DIR="/Volumes/RAMJava/WebStorm/tmp/$CACHE_NAME"
|
|
14
|
+
|
|
15
|
+
# 3. 在 RAMDisk 创建目录
|
|
16
|
+
mkdir -p "$TARGET_DIR"
|
|
17
|
+
|
|
18
|
+
# 4. 准备 node_modules 并清理旧缓存
|
|
19
|
+
mkdir -p node_modules
|
|
20
|
+
rm -rf node_modules/.cache
|
|
21
|
+
|
|
22
|
+
# 5. 建立软链接
|
|
23
|
+
ln -s "$TARGET_DIR" node_modules/.cache
|
|
24
|
+
|
|
25
|
+
echo "✅ 成功映射: node_modules/.cache -> $TARGET_DIR"
|
package/src/_template/version
CHANGED
|
@@ -13,6 +13,7 @@ const ioDPAZeroStructure = async (baseDir, configuration) => {
|
|
|
13
13
|
`${baseDir}/${name}/${name}-domain/src/main/java`,
|
|
14
14
|
`${baseDir}/${name}/${name}-domain/src/main/resources/plugins/${name}`,
|
|
15
15
|
`${baseDir}/${name}/${name}-domain/src/main/resources/plugins/${name}/database/${configuration.dbType}/`,
|
|
16
|
+
`${baseDir}/${name}/${name}-domain/src/main/resources/plugins/${name}/flyway/${configuration.dbType}/`,
|
|
16
17
|
`${baseDir}/${name}/${name}-domain/src/test/java`,
|
|
17
18
|
`${baseDir}/${name}/${name}-domain/src/test/resources`,
|
|
18
19
|
`${baseDir}/${name}/${name}-api/src/main/java`,
|
|
@@ -32,6 +32,11 @@ const ioZeroDatabase = async (source, configuration = {}) => {
|
|
|
32
32
|
await fs.copyFile(fileSrc, fileDest);
|
|
33
33
|
Ec.execute("拷贝文件:" + fileDest.green);
|
|
34
34
|
|
|
35
|
+
fileSrc = `${source}/source-domain/mvn-db.sh`;
|
|
36
|
+
fileDest = IoUt.withDomain(configuration, "mvn-db.sh");
|
|
37
|
+
await fs.copyFile(fileSrc, fileDest);
|
|
38
|
+
Ec.execute("拷贝文件:" + fileDest.green);
|
|
39
|
+
|
|
35
40
|
return true;
|
|
36
41
|
}
|
|
37
42
|
const ioZeroConfiguration = async (source, configuration = {}) => {
|
|
@@ -59,7 +64,7 @@ const ioZeroConfiguration = async (source, configuration = {}) => {
|
|
|
59
64
|
Ec.execute("生成文件:" + fileDest.green);
|
|
60
65
|
|
|
61
66
|
fileSrc = `${source}/source-api/flyway.conf`;
|
|
62
|
-
fileDest = IoUt.
|
|
67
|
+
fileDest = IoUt.withDomain(configuration, "src/main/resources/flyway.conf");
|
|
63
68
|
await fs.copyFile(fileSrc, fileDest);
|
|
64
69
|
Ec.execute("拷贝文件:" + fileDest.green);
|
|
65
70
|
return true;
|
|
@@ -73,11 +78,13 @@ const ioZeroSource = async (source, configuration = {}) => {
|
|
|
73
78
|
Ec.execute("拷贝文件:" + fileDest.green);
|
|
74
79
|
|
|
75
80
|
// 数据库脚本文件占位符
|
|
76
|
-
fileDest = IoUt.withDomain(configuration,
|
|
77
|
-
`src/main/resources/plugins/${configuration.artifactId}/database/.placeholder`);
|
|
81
|
+
fileDest = IoUt.withDomain(configuration, `src/main/resources/plugins/${configuration.artifactId}/database/${configuration.dbType}/.placeholder`);
|
|
78
82
|
await fs.copyFile(fileSrc, fileDest);
|
|
79
83
|
Ec.execute("拷贝文件:" + fileDest.green);
|
|
80
84
|
|
|
85
|
+
fileDest = IoUt.withDomain(configuration, `src/main/resources/plugins/${configuration.artifactId}/flyway/${configuration.dbType}/.placeholder`);
|
|
86
|
+
await fs.copyFile(fileSrc, fileDest);
|
|
87
|
+
Ec.execute("拷贝文件:" + fileDest.green);
|
|
81
88
|
|
|
82
89
|
pathPackage = await IoUt.ioPackage(null, configuration, IoUt.withDomain);
|
|
83
90
|
fileSrc = `${source}/source-domain/ModuleGeneration.java.ejs`;
|
|
@@ -93,6 +100,12 @@ const ioZeroSource = async (source, configuration = {}) => {
|
|
|
93
100
|
await fs.writeFile(fileDest, fileContent.toString(), null);
|
|
94
101
|
Ec.execute("生成文件:" + fileDest.green);
|
|
95
102
|
|
|
103
|
+
fileSrc = `${source}/source-provider/vertx-generate.yml.ejs`;
|
|
104
|
+
fileContent = await IoUt.ioEJS(fileSrc, configuration);
|
|
105
|
+
fileDest = IoUt.withProvider(configuration, `src/main/resources/vertx-generate.yml`);
|
|
106
|
+
await fs.writeFile(fileDest, fileContent.toString(), null);
|
|
107
|
+
Ec.execute("生成文件:" + fileDest.green);
|
|
108
|
+
|
|
96
109
|
// AppDev
|
|
97
110
|
pathPackage = await IoUt.ioPackage(null, configuration, IoUt.withApi);
|
|
98
111
|
fileSrc = `${source}/source-api/AppDev.java.ejs`;
|