@stalfh233/omc-fake-platform 0.4.53 → 0.4.55

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/report.js CHANGED
@@ -234,7 +234,12 @@ export const reportRoute = (ctx, input) => {
234
234
  if (!hasConfig(body))
235
235
  return biNoop();
236
236
  const infos = Array.isArray(body.dataSourceInfos) ? body.dataSourceInfos : [];
237
- return biData(infos.map((info) => ({ nodeType: 1, displayName: String(info.dataSourceId), dataSourceId: info.dataSourceId, schema: { dataSourceId: info.dataSourceId, tableName: `t_${String(info.dataSourceId)}` } })));
237
+ // Live 2026-10-18 fidelity: the platform answers success but links
238
+ // NOTHING for a datasource that has not synced into BI yet (unknown id).
239
+ const synced = new Set(["model-1", "sql-1"]);
240
+ return biData(infos
241
+ .filter((info) => synced.has(String(info.dataSourceId)))
242
+ .map((info) => ({ nodeType: 1, displayName: String(info.dataSourceId), dataSourceId: info.dataSourceId, schema: { dataSourceId: info.dataSourceId, tableName: `t_${String(info.dataSourceId)}` } })));
238
243
  }
239
244
  case "/dashboard/v1/datalogic/v3/chartdata": {
240
245
  // Live fidelity: the endpoint wants the flattened chart with an Integer
package/dist/workflow.js CHANGED
@@ -258,12 +258,12 @@ export const workflowRoute = (ctx, input) => {
258
258
  return businessRefusal(50000, "服务异常");
259
259
  if (body.activities !== undefined && invalidRenderShape(body))
260
260
  return businessRefusal(50000, "服务异常");
261
- // Platform fidelity (live 2026-09-23; bench12/13/15): an existing
262
- // activityCode cannot be RENAMED or RETYPED — the stored name/type win.
263
- // A caller that wants a different name/type must send it under a fresh
264
- // code (the tool reconciles this before the wire); re-sending the same
265
- // code with a changed name is a silent no-op on the platform, so the fake
266
- // must reproduce it rather than store the body verbatim.
261
+ // Platform fidelity (designer capture + raw replay, live 2026-10-17):
262
+ // for an EXISTING activityCode the stored activityName/i18nMessage/
263
+ // activityType WIN (a same-code name/type resend is a silent no-op), BUT
264
+ // `name_i18n` (locale map) is writable and is the rename carrier — the
265
+ // designer's own rename posts exactly that under the same code. The fake
266
+ // must pin the identity fields yet store name_i18n verbatim.
267
267
  const stored = wf.template.activities;
268
268
  const storedByCode = new Map((Array.isArray(stored) ? stored : []).map((activity) => [String(activity.activityCode ?? ""), activity]));
269
269
  const pinned = Array.isArray(body.activities)
@@ -272,7 +272,7 @@ export const workflowRoute = (ctx, input) => {
272
272
  activities: body.activities.map((activity) => {
273
273
  const prior = storedByCode.get(String(activity.activityCode ?? ""));
274
274
  return prior
275
- ? { ...activity, activityName: prior.activityName, i18nMessage: prior.i18nMessage, activityType: prior.activityType }
275
+ ? { ...activity, activityName: prior.activityName, i18nMessage: prior.i18nMessage, activityType: prior.activityType, name_i18n: activity.name_i18n ?? prior.name_i18n }
276
276
  : activity;
277
277
  }),
278
278
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stalfh233/omc-fake-platform",
3
- "version": "0.4.53",
3
+ "version": "0.4.55",
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.44"
21
+ "omc-core": "0.4.55"
22
22
  },
23
23
  "engines": {
24
24
  "node": ">=22.13"