@stalfh233/omc-fake-platform 0.5.0 → 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/README.md +3 -3
- package/dist/app.d.ts +0 -0
- package/dist/app.js +0 -0
- package/dist/b2-registration.d.ts +0 -0
- package/dist/b2-registration.js +0 -0
- package/dist/businessrule.d.ts +0 -0
- package/dist/businessrule.js +0 -0
- package/dist/custom-page.d.ts +0 -0
- package/dist/custom-page.js +0 -0
- package/dist/datarule.d.ts +0 -0
- package/dist/datarule.js +0 -0
- package/dist/dictionary.d.ts +0 -0
- package/dist/dictionary.js +0 -0
- package/dist/environment.d.ts +0 -0
- package/dist/environment.js +3 -1
- package/dist/field.d.ts +0 -0
- package/dist/field.js +0 -0
- package/dist/form.d.ts +0 -0
- package/dist/form.js +0 -0
- package/dist/http-server.d.ts +0 -0
- package/dist/http-server.js +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/dist/list-view.d.ts +0 -0
- package/dist/list-view.js +0 -0
- package/dist/model.d.ts +0 -0
- package/dist/model.js +4 -1
- package/dist/online-js.d.ts +0 -0
- package/dist/online-js.js +0 -0
- package/dist/report.d.ts +0 -0
- package/dist/report.js +0 -0
- package/dist/routes.d.ts +0 -0
- package/dist/routes.js +0 -0
- package/dist/rule-lifecycle.d.ts +0 -0
- package/dist/rule-lifecycle.js +0 -0
- package/dist/runtime-data.d.ts +0 -0
- package/dist/runtime-data.js +0 -0
- package/dist/state.d.ts +17 -0
- package/dist/state.js +0 -0
- package/dist/workflow.d.ts +0 -0
- package/dist/workflow.js +0 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# omc-fake-platform
|
|
2
|
-
|
|
3
|
-
OMC 的内存假 CloudPivot 平台(FakeCloudPivot)与 HTTP 假服务器——`@stalfh233/omc-cli` 的 1190 项测试与 `omc bench` 基准全部跑在其上,不触碰真实平台。wire 接缝的两个适配器:真实 HTTP 平台(omc-core)与本假平台共用 core 中的平台 wire 事实。
|
|
1
|
+
# omc-fake-platform
|
|
2
|
+
|
|
3
|
+
OMC 的内存假 CloudPivot 平台(FakeCloudPivot)与 HTTP 假服务器——`@stalfh233/omc-cli` 的 1190 项测试与 `omc bench` 基准全部跑在其上,不触碰真实平台。wire 接缝的两个适配器:真实 HTTP 平台(omc-core)与本假平台共用 core 中的平台 wire 事实。
|
package/dist/app.d.ts
CHANGED
|
File without changes
|
package/dist/app.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/b2-registration.js
CHANGED
|
File without changes
|
package/dist/businessrule.d.ts
CHANGED
|
File without changes
|
package/dist/businessrule.js
CHANGED
|
File without changes
|
package/dist/custom-page.d.ts
CHANGED
|
File without changes
|
package/dist/custom-page.js
CHANGED
|
File without changes
|
package/dist/datarule.d.ts
CHANGED
|
File without changes
|
package/dist/datarule.js
CHANGED
|
File without changes
|
package/dist/dictionary.d.ts
CHANGED
|
File without changes
|
package/dist/dictionary.js
CHANGED
|
File without changes
|
package/dist/environment.d.ts
CHANGED
|
File without changes
|
package/dist/environment.js
CHANGED
|
@@ -9,8 +9,10 @@ export const environmentRoute = (ctx, input) => {
|
|
|
9
9
|
case "/api/public/system/config":
|
|
10
10
|
return {
|
|
11
11
|
corpId: "fake-corp",
|
|
12
|
-
client_secret: "fake-client-secret",
|
|
12
|
+
...(ctx.options.systemClientSecretField === false ? {} : { client_secret: "fake-client-secret" }),
|
|
13
|
+
...(ctx.options.systemClient !== undefined ? { client: ctx.options.systemClient } : {}),
|
|
13
14
|
pcServerUrl: ctx.options.baseUrl ?? "https://fake.cloudpivot.example",
|
|
15
|
+
systemVersion: ctx.options.systemVersion ?? ctx.options.version ?? "8.6.26",
|
|
14
16
|
version: ctx.options.version ?? "8.6.26",
|
|
15
17
|
};
|
|
16
18
|
case "/user/public/getKey":
|
package/dist/field.d.ts
CHANGED
|
File without changes
|
package/dist/field.js
CHANGED
|
File without changes
|
package/dist/form.d.ts
CHANGED
|
File without changes
|
package/dist/form.js
CHANGED
|
File without changes
|
package/dist/http-server.d.ts
CHANGED
|
File without changes
|
package/dist/http-server.js
CHANGED
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/list-view.d.ts
CHANGED
|
File without changes
|
package/dist/list-view.js
CHANGED
|
File without changes
|
package/dist/model.d.ts
CHANGED
|
File without changes
|
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/online-js.d.ts
CHANGED
|
File without changes
|
package/dist/online-js.js
CHANGED
|
File without changes
|
package/dist/report.d.ts
CHANGED
|
File without changes
|
package/dist/report.js
CHANGED
|
File without changes
|
package/dist/routes.d.ts
CHANGED
|
File without changes
|
package/dist/routes.js
CHANGED
|
File without changes
|
package/dist/rule-lifecycle.d.ts
CHANGED
|
File without changes
|
package/dist/rule-lifecycle.js
CHANGED
|
File without changes
|
package/dist/runtime-data.d.ts
CHANGED
|
File without changes
|
package/dist/runtime-data.js
CHANGED
|
File without changes
|
package/dist/state.d.ts
CHANGED
|
@@ -26,6 +26,23 @@ export interface FakeCloudPivotOptions {
|
|
|
26
26
|
appCode: string;
|
|
27
27
|
appName: string;
|
|
28
28
|
}>;
|
|
29
|
+
/**
|
|
30
|
+
* `/api/public/system/config` shape overrides. Deployments differ: some
|
|
31
|
+
* return a top-level `client_secret`, some only an opaque `client` blob
|
|
32
|
+
* (plaintext JSON / base64 JSON / AES ciphertext), 8.1 boxes omit both.
|
|
33
|
+
* `clientSecretField: false` drops the top-level secret; `client` supplies
|
|
34
|
+
* the raw blob value; `version` is echoed into `systemVersion`.
|
|
35
|
+
*/
|
|
36
|
+
readonly systemClientSecretField?: boolean;
|
|
37
|
+
readonly systemClient?: string;
|
|
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;
|
|
29
46
|
}
|
|
30
47
|
export interface FakeDictionaryRecord {
|
|
31
48
|
id: string;
|
package/dist/state.js
CHANGED
|
File without changes
|
package/dist/workflow.d.ts
CHANGED
|
File without changes
|
package/dist/workflow.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stalfh233/omc-fake-platform",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
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.5.
|
|
21
|
+
"omc-core": "0.5.2"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">=22.13"
|