@stalfh233/omc-fake-platform 0.6.65 → 0.6.67
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/form.js +16 -10
- package/dist/state.d.ts +4 -2
- package/package.json +2 -2
package/dist/form.js
CHANGED
|
@@ -99,8 +99,14 @@ export const formRoute = (ctx, input) => {
|
|
|
99
99
|
sheet.options = body.options;
|
|
100
100
|
// ModelManagementFacadeImpl.publishBizForm:1022 — publish reads
|
|
101
101
|
// options.customButtonJson and re-adds the FORM-trigger button rows.
|
|
102
|
-
//
|
|
103
|
-
//
|
|
102
|
+
// GitLab #38 (live 8.6.26, 2026-11-16): the DESIGNER authors the
|
|
103
|
+
// column as a JSON ARRAY (each entry's actionConfig an OBJECT) — that
|
|
104
|
+
// is the authoritative shape and what the CLI writes. A STRINGIFIED
|
|
105
|
+
// array (the pre-r72 CLI shape) is still ACCEPTED here — the platform
|
|
106
|
+
// parses it and materialises the rows; only the form page drops the
|
|
107
|
+
// buttons, which the CLI readback lint flags. Any other value answers
|
|
108
|
+
// 50000 (fastjson "syntax error, position at 0, name
|
|
109
|
+
// customButtonJson") exactly like the platform.
|
|
104
110
|
const rawOptions = typeof body.options === "string" ? body.options : sheet.options;
|
|
105
111
|
if (typeof rawOptions === "string" && rawOptions !== "") {
|
|
106
112
|
let optionsRecord;
|
|
@@ -114,14 +120,14 @@ export const formRoute = (ctx, input) => {
|
|
|
114
120
|
}
|
|
115
121
|
const rawButtons = optionsRecord?.customButtonJson;
|
|
116
122
|
if (rawButtons !== undefined && rawButtons !== null && rawButtons !== "") {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
let list = rawButtons;
|
|
124
|
+
if (typeof rawButtons === "string") {
|
|
125
|
+
try {
|
|
126
|
+
list = JSON.parse(rawButtons);
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
return businessRefusal(50000, "syntax error, position at 0, name customButtonJson");
|
|
130
|
+
}
|
|
125
131
|
}
|
|
126
132
|
if (!Array.isArray(list))
|
|
127
133
|
return businessRefusal(50000, "syntax error, position at 0, name customButtonJson");
|
package/dist/state.d.ts
CHANGED
|
@@ -100,8 +100,10 @@ export interface FakeSheet {
|
|
|
100
100
|
publishedAttributesJson?: string | null;
|
|
101
101
|
publishedActionsJson?: string | null;
|
|
102
102
|
publishedHtmlJson?: string | null;
|
|
103
|
-
/** `options` (BizForm.options): form-level JSON carrying
|
|
104
|
-
*
|
|
103
|
+
/** `options` (BizForm.options): form-level JSON string carrying
|
|
104
|
+
* customButtonJson (a JSON ARRAY — designer shape, GitLab #38 live 8.6.26;
|
|
105
|
+
* a stringified array is the legacy dirty form), presetButtonManage,
|
|
106
|
+
* sheetPresetButtonManage. Live column, string value. */
|
|
105
107
|
options?: string | null;
|
|
106
108
|
fieldCodes: string[];
|
|
107
109
|
}
|
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.67",
|
|
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.67"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">=22.13"
|