@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 CHANGED
@@ -1717,7 +1717,7 @@ index/variables/VER.md
1717
1717
 
1718
1718
  # Variable: VER
1719
1719
 
1720
- > `const` **VER**: `"9.22.0"` = `'9.22.0'`
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
@@ -5,7 +5,7 @@
5
5
  * --- 本文件用来定义每个目录实体地址的常量 ---
6
6
  */
7
7
  /** --- 当前系统版本号 --- */
8
- export declare const VER = "9.22.0";
8
+ export declare const VER = "9.22.1";
9
9
  /** --- 框架根目录,以 / 结尾 --- */
10
10
  export declare const ROOT_PATH: string;
11
11
  /** --- 框架的 LIB,以 / 结尾 --- */
package/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * --- 本文件用来定义每个目录实体地址的常量 ---
7
7
  */
8
8
  /** --- 当前系统版本号 --- */
9
- export const VER = '9.22.0';
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 --- */
@@ -31,7 +31,7 @@ export declare class Response {
31
31
  /**
32
32
  * --- 获取响应读取流对象 ---
33
33
  */
34
- getStream(): zlib.BrotliDecompress | zlib.Gunzip | zlib.Inflate | (import("undici/types/readable").default & undici.Dispatcher.BodyMixin) | null;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maiyunnet/kebab",
3
- "version": "9.22.0",
3
+ "version": "9.22.1",
4
4
  "description": "Simple, easy-to-use, and fully-featured Node.js framework that is ready-to-use out of the box.",
5
5
  "type": "module",
6
6
  "keywords": [
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
- if (fpath.slice(1).split('/').slice(0, -1).some(seg => DEPLOY_EXCLUDE_DIRS.has(seg))) {
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 项目目录 ---