@maiyunnet/kebab 9.22.0 → 9.22.1
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/doc/kebab-rag.md +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/undici/response.d.ts +1 -1
- package/package.json +1 -1
- package/sys/master.js +8 -3
package/doc/kebab-rag.md
CHANGED
|
@@ -1717,7 +1717,7 @@ index/variables/VER.md
|
|
|
1717
1717
|
|
|
1718
1718
|
# Variable: VER
|
|
1719
1719
|
|
|
1720
|
-
> `const` **VER**: `"9.22.
|
|
1720
|
+
> `const` **VER**: `"9.22.1"` = `'9.22.1'`
|
|
1721
1721
|
|
|
1722
1722
|
Defined in: [index.ts:10](https://github.com/maiyunnet/kebab/blob/master/index.ts#L10)
|
|
1723
1723
|
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* --- 本文件用来定义每个目录实体地址的常量 ---
|
|
7
7
|
*/
|
|
8
8
|
/** --- 当前系统版本号 --- */
|
|
9
|
-
export const VER = '9.22.
|
|
9
|
+
export const VER = '9.22.1';
|
|
10
10
|
// --- 服务端用的路径 ---
|
|
11
11
|
const imu = decodeURIComponent(import.meta.url).replace('file://', '').replace(/^\/(\w:)/, '$1');
|
|
12
12
|
/** --- /xxx/xxx --- */
|
package/lib/undici/response.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare class Response {
|
|
|
31
31
|
/**
|
|
32
32
|
* --- 获取响应读取流对象 ---
|
|
33
33
|
*/
|
|
34
|
-
getStream():
|
|
34
|
+
getStream(): (import("undici/types/readable").default & undici.Dispatcher.BodyMixin) | zlib.Gunzip | zlib.Inflate | zlib.BrotliDecompress | null;
|
|
35
35
|
/**
|
|
36
36
|
* --- 获取原生响应读取流对象 ---
|
|
37
37
|
*/
|
package/package.json
CHANGED
package/sys/master.js
CHANGED
|
@@ -508,7 +508,7 @@ function createRpcListener() {
|
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
/** --- kebab 子项目中仅允许部署的子文件夹名集合 --- */
|
|
511
|
-
const KEBAB_ALLOWED_DIRS = new Set(['ctr', 'data', 'stc', 'view', 'lib']);
|
|
511
|
+
const KEBAB_ALLOWED_DIRS = new Set(['ctr', 'data', 'stc', 'view', 'lib', 'abox']);
|
|
512
512
|
/** --- 常见开发、依赖、缓存、构建产物目录不参与部署 --- */
|
|
513
513
|
const DEPLOY_EXCLUDE_DIRS = new Set([
|
|
514
514
|
'.git',
|
|
@@ -539,10 +539,15 @@ function createRpcListener() {
|
|
|
539
539
|
const pat = fpath.slice(1, lio + 1);
|
|
540
540
|
/** --- 纯文件名,例如 "api.js" --- */
|
|
541
541
|
const fname = fpath.slice(lio + 1);
|
|
542
|
-
|
|
542
|
+
const dirs = fpath.slice(1).split('/').slice(0, -1);
|
|
543
|
+
if (dirs.some(seg => DEPLOY_EXCLUDE_DIRS.has(seg))) {
|
|
543
544
|
// --- 开发、依赖、缓存、构建产物目录不覆盖 ---
|
|
544
545
|
continue;
|
|
545
546
|
}
|
|
547
|
+
if (dirs.some((seg, index) => seg === 'abox' && ['test', 'tests'].includes(dirs[index + 1]))) {
|
|
548
|
+
// --- abox 运行代码参与部署,测试目录不进入线上目录 ---
|
|
549
|
+
continue;
|
|
550
|
+
}
|
|
546
551
|
if (fname === 'kebab.json' && hasSensitiveConfig(ls[archivePath])) {
|
|
547
552
|
// --- 包含密码或密钥的 kebab.json 不覆盖,避免部署包覆盖现有敏感配置 ---
|
|
548
553
|
continue;
|
|
@@ -576,7 +581,7 @@ function createRpcListener() {
|
|
|
576
581
|
continue;
|
|
577
582
|
}
|
|
578
583
|
}
|
|
579
|
-
// --- 规则 2:kebab 子项目目录中,仅允许部署 ctr/data/stc/view/lib 子文件夹内的内容 ---
|
|
584
|
+
// --- 规则 2:kebab 子项目目录中,仅允许部署 ctr/data/stc/view/lib/abox 子文件夹内的内容 ---
|
|
580
585
|
// --- 快速跳过:zip 中没有 kebab.json 时整个规则无需执行 ---
|
|
581
586
|
if (kebabProjectDirs.size > 0) {
|
|
582
587
|
// --- 找最浅(最外层)匹配的 kebab 项目目录 ---
|