ai-project-manage-cli 8.0.15 → 8.0.16
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.
|
@@ -4079,7 +4079,21 @@ var SKIP_DIR_NAMES2 = /* @__PURE__ */ new Set([
|
|
|
4079
4079
|
"coverage",
|
|
4080
4080
|
"__pycache__"
|
|
4081
4081
|
]);
|
|
4082
|
-
var
|
|
4082
|
+
var SQL_DIR_MARKERS = [
|
|
4083
|
+
"/db/migration/",
|
|
4084
|
+
"/script/sql/update/"
|
|
4085
|
+
];
|
|
4086
|
+
function relativePathUnderSqlRoot(normalizedAbsPath) {
|
|
4087
|
+
const lower = normalizedAbsPath.toLowerCase();
|
|
4088
|
+
for (const marker of SQL_DIR_MARKERS) {
|
|
4089
|
+
const idx = lower.lastIndexOf(marker);
|
|
4090
|
+
if (idx < 0) continue;
|
|
4091
|
+
const relativePath = normalizedAbsPath.slice(idx + marker.length);
|
|
4092
|
+
if (!relativePath || relativePath.includes("..")) continue;
|
|
4093
|
+
return relativePath;
|
|
4094
|
+
}
|
|
4095
|
+
return null;
|
|
4096
|
+
}
|
|
4083
4097
|
function isSqlFileName(name) {
|
|
4084
4098
|
return name.toLowerCase().endsWith(".sql");
|
|
4085
4099
|
}
|
|
@@ -4108,10 +4122,8 @@ function scanLocalMigrationSqlFiles(workdir) {
|
|
|
4108
4122
|
if (!entry.isFile() || !isSqlFileName(name)) continue;
|
|
4109
4123
|
const absPath = path2.join(dir, name);
|
|
4110
4124
|
const normalized = absPath.replace(/\\/g, "/");
|
|
4111
|
-
const
|
|
4112
|
-
if (
|
|
4113
|
-
const relativePath = normalized.slice(idx + MIGRATION_MARKER.length);
|
|
4114
|
-
if (!relativePath || relativePath.includes("..")) continue;
|
|
4125
|
+
const relativePath = relativePathUnderSqlRoot(normalized);
|
|
4126
|
+
if (!relativePath) continue;
|
|
4115
4127
|
const stat = fs2.statSync(absPath);
|
|
4116
4128
|
if (!stat.isFile() || stat.size <= 0) continue;
|
|
4117
4129
|
const item = {
|
package/package.json
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
### target=backend(SpringBoot)
|
|
41
41
|
|
|
42
42
|
1. 按 deploy 文档进入后端目录,执行文档写明的构建命令(通常 `mvn clean package`)。
|
|
43
|
-
2. **只**收集 deploy 文档标明的交付 jar(路径/文件名/glob 以文档为准)。**禁止**全量收集 `target/lib`、**禁止**把 SQL 打进 jars.zip、**禁止**在规则或命令里写死具体 jar 名。SQL 镜像由 CLI 自动扫描本地 `db/migration` 下的 `.sql` 同步到 MinIO,Agent **不要**上传 SQL。
|
|
43
|
+
2. **只**收集 deploy 文档标明的交付 jar(路径/文件名/glob 以文档为准)。**禁止**全量收集 `target/lib`、**禁止**把 SQL 打进 jars.zip、**禁止**在规则或命令里写死具体 jar 名。SQL 镜像由 CLI 自动扫描本地 `db/migration`、`db/migrate`、`script/sql/update` 下的 `.sql` 同步到 MinIO,Agent **不要**上传 SQL。
|
|
44
44
|
3. 确认文档列出的每个 jar 均已生成;缺任一文件 → SetPackageFailed。
|
|
45
45
|
4. 在临时目录将上述 jar **打成一个 zip**(勿在工作区生成交付 zip),落到:
|
|
46
46
|
|