@oj-module/cli 0.2.25 → 0.2.26

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oj-module/cli",
3
3
  "type": "module",
4
- "version": "0.2.25",
4
+ "version": "0.2.26",
5
5
  "description": "React Antd 模块工程命令行工具(含预构建宿主 shell-dist)",
6
6
  "license": "MIT",
7
7
  "exports": {
@@ -49,7 +49,7 @@
49
49
  ],
50
50
  "dependencies": {
51
51
  "@faker-js/faker": "^10.4.0",
52
- "@oj-module/runtime": "0.2.25",
52
+ "@oj-module/runtime": "0.2.26",
53
53
  "@redocly/cli": "^2.51.0",
54
54
  "@tailwindcss/vite": "^4.3.0",
55
55
  "cac": "^6.7.14",
@@ -304,10 +304,10 @@ function getAppInfo() {
304
304
  return {
305
305
  "pkg": {
306
306
  "name": "@oj-module/runtime",
307
- "version": "0.2.25",
307
+ "version": "0.2.26",
308
308
  "license": "MIT"
309
309
  },
310
- "lastBuildTime": "2026-10-23 15:39:15"
310
+ "lastBuildTime": "2026-10-23 21:49:09"
311
311
  };
312
312
  }
313
313
  var init_get_app_info = __esmMin((() => {}));
@@ -6961,8 +6961,7 @@ function LayoutTabbar() {
6961
6961
  location,
6962
6962
  currentRoute,
6963
6963
  setActiveKey,
6964
- addTab,
6965
- activeKey
6964
+ addTab
6966
6965
  ]);
6967
6966
  return /* @__PURE__ */ jsx("div", {
6968
6967
  className: classes.tabsContainer,
@@ -5,9 +5,9 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <link rel="icon" href="/favicon.ico" />
7
7
  <title>React Antd Admin · Shell</title>
8
- <meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self' https://modules.cdn.example.com 'wasm-unsafe-eval' 'nonce-rkh8kQ0W+uFw3wTdIkSSUA=='; script-src-attr 'none'; connect-src 'self' data: https://modules.cdn.example.com; style-src 'self' https://modules.cdn.example.com 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:; frame-src https://ant.design https://react.dev https://condorheroblog.github.io; form-action 'none'; base-uri 'none'; object-src 'none'; upgrade-insecure-requests" />
8
+ <meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self' https://modules.cdn.example.com 'wasm-unsafe-eval' 'nonce-yoOEdSzDoQ4YJ5XCof4eFQ=='; script-src-attr 'none'; connect-src 'self' data: https://modules.cdn.example.com; style-src 'self' https://modules.cdn.example.com 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:; frame-src https://ant.design https://react.dev https://condorheroblog.github.io; form-action 'none'; base-uri 'none'; object-src 'none'; upgrade-insecure-requests" />
9
9
 
10
- <script type="importmap" nonce="rkh8kQ0W+uFw3wTdIkSSUA==">{
10
+ <script type="importmap" nonce="yoOEdSzDoQ4YJ5XCof4eFQ==">{
11
11
  "imports": {
12
12
  "react": "/assets/react.js",
13
13
  "react/jsx-runtime": "/assets/jsx-runtime.js",
@@ -7,9 +7,9 @@
7
7
  "react-router": "7.18.2",
8
8
  "react-router/dom": "7.18.2",
9
9
  "@tanstack/react-query": "5.102.8",
10
- "@oj-module/runtime": "0.2.25",
11
- "@oj-module/runtime/contract": "0.2.25",
12
- "@oj-module/runtime/contract/errors": "0.2.25",
10
+ "@oj-module/runtime": "0.2.26",
11
+ "@oj-module/runtime/contract": "0.2.26",
12
+ "@oj-module/runtime/contract/errors": "0.2.26",
13
13
  "@plane/kit": "0.1.20",
14
14
  "@plane/editor": "0.1.20",
15
15
  "antd": "6.6.1",
@@ -216,7 +216,14 @@ function reconcileRoutes(contractIr: IrEndpoint[], handlers: HandlerRow[], exemp
216
216
  const contractAbs = `${wirePrefixOf(ep)}${ep.route}`;
217
217
 
218
218
  // ① 精确全路径:嵌套组 / 绝对精确命中
219
- const exact = byPath.get(pathKey(ep.method, ojFull)) ?? byPath.get(pathKey(ep.method, contractAbs));
219
+ // 模块根动词(契约 route "/",如 GET /api/books 的聚合根形态):ojFull 带尾斜杠
220
+ // ("books/"),handler 全路径是模块名("books")——去尾斜杠再查一次,否则
221
+ // 会掉进②模糊兜底被误报 route-params-mismatch(0.2.25 演练实踩)
222
+ const ojFullBare = ojFull.replace(/\/+$/, "");
223
+ let exact = byPath.get(pathKey(ep.method, ojFull));
224
+ if (!exact && ojFullBare !== ojFull)
225
+ exact = byPath.get(pathKey(ep.method, ojFullBare));
226
+ exact ??= byPath.get(pathKey(ep.method, contractAbs));
220
227
  if (exact) {
221
228
  claimed.add(exact);
222
229
  continue;
package/src/vendor.ts CHANGED
@@ -39,8 +39,12 @@ export const NPM_PKG = "@oj-bin/oj";
39
39
  * 与 `-d`/`--api-path` 互斥);旧版收到该旗标即报错。0.1.85 同时落地了
40
40
  * `manifest.name` 与目录名脱钩、`#/m/x` 按 name 解析(见
41
41
  * docs/prd/202610220010-layout-module-root-design.md §5)。
42
+ * **0.2.26 抬到 0.1.86**:openapi 的 dev 分支裸包解析截断(module-root 下预生成
43
+ * `__client` 内省 fail-fast,`oj openapi --module-root` 契约链整体不可用)修复于
44
+ * 0.1.86(oj-bin 0f8a6e2,第三次基线发布通道实证);module-root 工程是 0.2.20 起
45
+ * 的默认布局,门禁必须盖住契约链(见 playbook §9 与 2026-10-23 第三次基线)。
42
46
  */
43
- export const MIN_OJ_VERSION = "0.1.85";
47
+ export const MIN_OJ_VERSION = "0.1.86";
44
48
 
45
49
  /** 按段数值比较(字符串比较会把 0.1.9 判成大于 0.1.69);非数字段按 0 处理 */
46
50
  export function isSupportedOjVersion(version: string): boolean {
@@ -46,7 +46,43 @@ include:
46
46
  - seed.mysql.sql
47
47
  - seed.pg.sql
48
48
  - vitest.config.ts
49
- - tests
49
+ # —— tests 逐条白名单(不收 tests/ 整目录)——
50
+ # 业务工程只拷「纯 node:sqlite 夹具、零 cli 包环境假设」的测试。以下 6 个不分发
51
+ # (oj-wiki 0.2.25 升级实踩:拷进业务工程即死文件,重跑 init 还会复活):
52
+ # lifecycle/preflight・installer・market-api・steps-fs・sig-fixtures —— 硬编码
53
+ # oj-bin 仓夹具路径(../../src/lifecycle/__tests__/fixtures,模板树内不存在);
54
+ # lifecycle/bootstrap —— 私钥红线钉测硬编码「packages/cli 全树」扫描,业务工程
55
+ # 扫 node_modules 必超时。它们只活在 oj-module/oj-bin 的 cli 包测试语境。
56
+ - tests/fixture.ts
57
+ - tests/auth-ldap.spec.ts
58
+ - tests/auth-session.spec.ts
59
+ - tests/auth-throttle.spec.ts
60
+ - tests/guard.spec.ts
61
+ - tests/l1-builder.test.ts
62
+ - tests/query-utils.spec.ts
63
+ - tests/rbac-audit.spec.ts
64
+ - tests/rbac-contacts.spec.ts
65
+ - tests/rbac-guard.spec.ts
66
+ - tests/rbac-roles.spec.ts
67
+ - tests/rbac-seed.spec.ts
68
+ - tests/rbac-settings.spec.ts
69
+ - tests/rbac-solution-perms.spec.ts
70
+ - tests/rbac-tables.spec.ts
71
+ - tests/rbac-users.spec.ts
72
+ - tests/seed-role-accounts.spec.ts
73
+ - tests/lifecycle/atomic-state.spec.ts
74
+ - tests/lifecycle/deploy-smoke.spec.ts
75
+ - tests/lifecycle/migrate.spec.ts
76
+ - tests/lifecycle/register.spec.ts
77
+ - tests/lifecycle/semver.spec.ts
78
+ - tests/lifecycle/sha384.spec.ts
79
+ - tests/lifecycle/solutions-api.spec.ts
80
+ - tests/lifecycle/text-edit.spec.ts
81
+ - tests/lifecycle/tgz-guard.spec.ts
82
+ - tests/lifecycle/trust.spec.ts
83
+ - tests/lifecycle/uninstall.spec.ts
84
+ - tests/lifecycle/verify-checks.spec.ts
85
+ - tests/lifecycle/verify-report.spec.ts
50
86
  - src/_platform/api
51
87
  - src/auth/api
52
88
  - src/notification/api
@@ -8,9 +8,9 @@
8
8
  "react-router": "7.18.2",
9
9
  "react-router/dom": "7.18.2",
10
10
  "@tanstack/react-query": "5.102.8",
11
- "@oj-module/runtime": "0.2.25",
12
- "@oj-module/runtime/contract": "0.2.25",
13
- "@oj-module/runtime/contract/errors": "0.2.25",
11
+ "@oj-module/runtime": "0.2.26",
12
+ "@oj-module/runtime/contract": "0.2.26",
13
+ "@oj-module/runtime/contract/errors": "0.2.26",
14
14
  "@plane/kit": "0.1.20",
15
15
  "@plane/editor": "0.1.20",
16
16
  "antd": "6.6.1",