@stalfh233/omc-fake-platform 0.5.1 → 0.5.2

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/dist/model.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { relationTargetOf } from "omc-core/relation-shape";
2
2
  import { MODEL_REFERENCED_DELETE_ERRCODE } from "omc-core/wire-facts";
3
- import { businessRefusal, NOT_HANDLED } from "./state.js";
3
+ import { businessRefusal, httpErrorResponse, NOT_HANDLED } from "./state.js";
4
4
  /** model-management lane: app tree, model CRUD, physical delete. Twin of src/lanes/model.ts. */
5
5
  export const modelRoute = (ctx, input) => {
6
6
  const q = input.query ?? {};
@@ -140,6 +140,9 @@ export const modelRoute = (ctx, input) => {
140
140
  return null;
141
141
  }
142
142
  case "/api/api/app/bizmodels/get_all": {
143
+ // 8.0/8.1 do not mount this path at all (live 8.1.108: HTTP 404).
144
+ if (ctx.options.modelGetAllAbsent === true)
145
+ return httpErrorResponse(404, JSON.stringify({ timestamp: "fake", status: 404, error: "Not Found", path: input.path }));
143
146
  const model = ctx.state.models.get(q.schemaCode);
144
147
  return model ? { id: model.recordId, name: model.name, modelType: "LIST" } : null;
145
148
  }
package/dist/state.d.ts CHANGED
@@ -36,6 +36,13 @@ export interface FakeCloudPivotOptions {
36
36
  readonly systemClientSecretField?: boolean;
37
37
  readonly systemClient?: string;
38
38
  readonly systemVersion?: string;
39
+ /**
40
+ * 8.0/8.1 deployments do not serve `/api/api/app/bizmodels/get_all` at all —
41
+ * the path answers HTTP 404 and the same rows come from
42
+ * `/bizmodels/list_schema` (live 8.1.108, 2026-10-30). Set this to model such
43
+ * a box and prove the version-tolerant model read falls back.
44
+ */
45
+ readonly modelGetAllAbsent?: boolean;
39
46
  }
40
47
  export interface FakeDictionaryRecord {
41
48
  id: string;
package/package.json CHANGED
@@ -1,26 +1,26 @@
1
- {
2
- "name": "@stalfh233/omc-fake-platform",
3
- "version": "0.5.1",
4
- "description": "OMC 的内存假 CloudPivot 平台(wire 接缝的第二个适配器)+ HTTP 假服务器——@stalfh233/omc-cli 的测试与 bench 基准基座",
5
- "type": "module",
6
- "main": "dist/index.js",
7
- "exports": {
8
- ".": "./dist/index.js",
9
- "./state": "./dist/state.js",
10
- "./http-server": "./dist/http-server.js"
11
- },
12
- "files": [
13
- "dist",
14
- "package.json",
15
- "README.md"
16
- ],
17
- "scripts": {
18
- "build": "tsc --project tsconfig.build.json"
19
- },
20
- "dependencies": {
21
- "omc-core": "0.5.1"
22
- },
23
- "engines": {
24
- "node": ">=22.13"
25
- }
26
- }
1
+ {
2
+ "name": "@stalfh233/omc-fake-platform",
3
+ "version": "0.5.2",
4
+ "description": "OMC 的内存假 CloudPivot 平台(wire 接缝的第二个适配器)+ HTTP 假服务器——@stalfh233/omc-cli 的测试与 bench 基准基座",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "exports": {
8
+ ".": "./dist/index.js",
9
+ "./state": "./dist/state.js",
10
+ "./http-server": "./dist/http-server.js"
11
+ },
12
+ "files": [
13
+ "dist",
14
+ "package.json",
15
+ "README.md"
16
+ ],
17
+ "scripts": {
18
+ "build": "tsc --project tsconfig.build.json"
19
+ },
20
+ "dependencies": {
21
+ "omc-core": "0.5.2"
22
+ },
23
+ "engines": {
24
+ "node": ">=22.13"
25
+ }
26
+ }