@stalfh233/omc-fake-platform 0.6.52 → 0.6.53
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 +12 -0
- package/dist/report.js +13 -2
- package/package.json +2 -2
package/dist/model.js
CHANGED
|
@@ -59,6 +59,18 @@ export const modelRoute = (ctx, input) => {
|
|
|
59
59
|
else
|
|
60
60
|
rootChildren.push(node);
|
|
61
61
|
}
|
|
62
|
+
// r63 live fidelity (2026-11-14, h_app_function 实证):报表页镜像进应用树
|
|
63
|
+
// (type=Report 挂在 parentId 目录下);parentId 不指向任何目录的报表是
|
|
64
|
+
// **孤儿**——树里不可见(真机 create 传 appCode 当 parentId,平台原样存储,
|
|
65
|
+
// 两棵树都读不到)。queryReportChartTree 只回配了图的报表,与这棵树互补。
|
|
66
|
+
for (const page of ctx.state.reportPages.values()) {
|
|
67
|
+
if (appCode !== undefined && page.appCode !== appCode)
|
|
68
|
+
continue;
|
|
69
|
+
const parent = page.parentId ? nodes.get(page.parentId) : undefined;
|
|
70
|
+
if (!parent)
|
|
71
|
+
continue;
|
|
72
|
+
parent.children.push({ id: page.id, type: "Report", code: page.code, name: page.name, parentId: page.parentId });
|
|
73
|
+
}
|
|
62
74
|
// Live 1.1.25 fidelity (2026-10-23, folder.tree readback): the tree
|
|
63
75
|
// returns the TOP-LEVEL folders directly — no synthetic app-package
|
|
64
76
|
// container row. The fake must match, or a depth-0 assertion would pass
|
package/dist/report.js
CHANGED
|
@@ -226,10 +226,20 @@ export const reportRoute = (ctx, input) => {
|
|
|
226
226
|
dashboard.charts = dashboard.charts.filter((chart) => !ids.has(String(chart.uuid)));
|
|
227
227
|
return biData(true);
|
|
228
228
|
}
|
|
229
|
-
case "/dashboard/v1/report/v3/datasourcelist":
|
|
229
|
+
case "/dashboard/v1/report/v3/datasourcelist": {
|
|
230
|
+
// r63 live fidelity:datasourcelist 是层级树——不传 parentObjectIds 回
|
|
231
|
+
// 顶层(应用包容器 + 系统数据源);传了回该父下的**模型级**行
|
|
232
|
+
// (nodeType:1,objectId 是真键,dataSourceId 恒 null)。
|
|
233
|
+
const parents = Array.isArray(body.parentObjectIds) ? body.parentObjectIds.map(String) : [];
|
|
234
|
+
if (parents.length > 0)
|
|
235
|
+
return biData([
|
|
236
|
+
{ dataSourceId: null, displayName: "合同", nodeType: 1, useType: 1, objectId: "bizmodel-1-contract", parentObjectId: parents[0], corpId: "a" },
|
|
237
|
+
{ dataSourceId: null, displayName: "回款", nodeType: 1, useType: 1, objectId: "bizmodel-1-payment", parentObjectId: parents[0], corpId: "a" },
|
|
238
|
+
]);
|
|
230
239
|
return biData([
|
|
231
240
|
{ dataSourceId: "model-1", displayName: "人员信息", nodeType: 0, useType: 1, objectId: "model-1", corpId: "a" },
|
|
232
241
|
]);
|
|
242
|
+
}
|
|
233
243
|
case "/dashboard/datasource/advanced_list":
|
|
234
244
|
return biData([
|
|
235
245
|
{ dataSourceId: "sql-1", displayName: "自定义查询", nodeType: 100, useType: 100, objectId: "sql-1", corpId: "a", status: 0, sort: 0, dwTableSyncFlag: false },
|
|
@@ -242,7 +252,8 @@ export const reportRoute = (ctx, input) => {
|
|
|
242
252
|
const infos = Array.isArray(body.dataSourceInfos) ? body.dataSourceInfos : [];
|
|
243
253
|
// Live 2026-10-18 fidelity: the platform answers success but links
|
|
244
254
|
// NOTHING for a datasource that has not synced into BI yet (unknown id).
|
|
245
|
-
|
|
255
|
+
// r63: 模型行的 objectId 也是合法 link 键(真机 crm_contract 实证)。
|
|
256
|
+
const synced = new Set(["model-1", "sql-1", "bizmodel-1-contract", "bizmodel-1-payment"]);
|
|
246
257
|
return biData(infos
|
|
247
258
|
.filter((info) => synced.has(String(info.dataSourceId)))
|
|
248
259
|
.map((info) => ({ nodeType: 1, displayName: String(info.dataSourceId), dataSourceId: info.dataSourceId, schema: { dataSourceId: info.dataSourceId, tableName: `t_${String(info.dataSourceId)}` } })));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stalfh233/omc-fake-platform",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.53",
|
|
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.6.
|
|
21
|
+
"omc-core": "0.6.53"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">=22.13"
|