@stalfh233/omc-fake-platform 0.4.75 → 0.4.76

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/field.js CHANGED
@@ -6,6 +6,12 @@ export const fieldRoute = (ctx, input) => {
6
6
  const body = (input.body ?? {});
7
7
  switch (input.path) {
8
8
  case "/api/api/app/bizproperty/list": {
9
+ // Live 2026-10-23 (issue §1.4): on some versions a CHILD-table schema code
10
+ // answers 601003 业务模型不存在 on this face while bizdatarule/list answers
11
+ // rows for it. That is a version-specific asymmetry, so the fake exposes it
12
+ // as an explicit lever (state.fieldListUnavailable) instead of guessing it.
13
+ if (ctx.state.fieldListUnavailable?.has(String(q.schemaCode ?? "")))
14
+ return businessRefusal(601003, "业务模型不存在");
9
15
  const rows = [...ctx.state.fields.entries()]
10
16
  .filter(([key]) => key.startsWith(`${q.schemaCode}#`))
11
17
  .map(([, field]) => ({
package/dist/state.d.ts CHANGED
@@ -289,6 +289,8 @@ export interface FakeState {
289
289
  sheets: Map<string, FakeSheet>;
290
290
  rules: Map<string, FakeRule>;
291
291
  buttons: Map<string, FakeButton>;
292
+ /** Schema codes for which bizproperty/list answers 601003 (see field.ts). */
293
+ fieldListUnavailable: Set<string>;
292
294
  /**
293
295
  * Ticket 109 platform fidelity: every businessrule create/update mints a NEW
294
296
  * record id — superseded rows stay readable via businessrule/get?id=
package/dist/state.js CHANGED
@@ -34,6 +34,7 @@ export function createFakeState(options = {}) {
34
34
  sheets: new Map(),
35
35
  rules: new Map(),
36
36
  buttons: new Map(),
37
+ fieldListUnavailable: new Set(),
37
38
  ruleHistory: [],
38
39
  ruleSeq: 0,
39
40
  dataRules: new Map(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stalfh233/omc-fake-platform",
3
- "version": "0.4.75",
3
+ "version": "0.4.76",
4
4
  "description": "OMC 的内存假 CloudPivot 平台(wire 接缝的第二个适配器)+ HTTP 假服务器——@stalfh233/omc-cli 的测试与 bench 基准基座",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -18,7 +18,7 @@
18
18
  "build": "tsc --project tsconfig.build.json"
19
19
  },
20
20
  "dependencies": {
21
- "omc-core": "0.4.75"
21
+ "omc-core": "0.4.76"
22
22
  },
23
23
  "engines": {
24
24
  "node": ">=22.13"