@mldong/jeeflow 1.8.29 → 1.8.31
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/facade.js +15 -9
- package/package.json +2 -1
package/dist/facade.js
CHANGED
|
@@ -831,8 +831,8 @@ export class JeeflowFacade {
|
|
|
831
831
|
// issues/122:可空时间列空值出 '' 不出 null——mldong-nestjs 全局 SmartNullStripping
|
|
832
832
|
// 拦截器会把 null 值整键剥掉(本出口是对象字面量,拿不到 keepNull:fields 元数据),
|
|
833
833
|
// 出 '' 才能让键恒在,形状也与 boot2 的 record 行一致。
|
|
834
|
-
finishTime: fmtTime(t.finishTime),
|
|
835
|
-
ext: t.variables ?? {}, // issues/15:前端读 ext.tf_approvalComment
|
|
834
|
+
finishTime: fmtTime(t.finishTime),
|
|
835
|
+
ext: t.variables ?? {}, // issues/15:前端读 ext.tf_approvalComment;issues/124 variable 原串出口下线
|
|
836
836
|
}));
|
|
837
837
|
}
|
|
838
838
|
async getAssigneeTextData(args) {
|
|
@@ -1147,7 +1147,6 @@ export class JeeflowFacade {
|
|
|
1147
1147
|
performType: t.performType ?? null, taskState: t.taskState,
|
|
1148
1148
|
operator: t.actorId ?? '', finishTime: fmtTime(t.finishTime),
|
|
1149
1149
|
expireTime: fmtTime(t.expireTime), formKey: t.formKey ?? '', taskParentId: t.parentTaskId ?? null,
|
|
1150
|
-
variable: JSON.stringify(t.variables ?? {}),
|
|
1151
1150
|
createTime: fmtTime(t.createTime), createUser: t.createUser,
|
|
1152
1151
|
updateTime: fmtTime(t.updateTime), updateUser: t.updateUser,
|
|
1153
1152
|
taskActorIdList: t.actorIds ?? [],
|
|
@@ -1168,7 +1167,7 @@ export class JeeflowFacade {
|
|
|
1168
1167
|
id: inst.id, parentId: inst.parentId, processDefineId: inst.defineId,
|
|
1169
1168
|
state: inst.state, parentNodeName: inst.parentNodeName,
|
|
1170
1169
|
businessNo: inst.businessNo, operator: inst.operator,
|
|
1171
|
-
|
|
1170
|
+
ext: inst.variables ?? {}, // issues/124:变量唯一对外出口,空变量出 {} 而非 null
|
|
1172
1171
|
formData: formDataOf(inst.variables, 'f_'), // issues/15
|
|
1173
1172
|
createTime: fmtTime(inst.createTime), createUser: inst.createUser,
|
|
1174
1173
|
jsonObject: graph, // issues/05
|
|
@@ -1426,9 +1425,16 @@ function formDataOf(vars, prefix) {
|
|
|
1426
1425
|
* 13 栈里就只有 nestjs 少这些列(issues/122 的机理)。规范 06 §2.4 的时间列是"必出键、空即空串",
|
|
1427
1426
|
* 所以归一放在这一层:所有行投影共用它,逐个补 `?? ''` 迟早漏一处。
|
|
1428
1427
|
*/
|
|
1428
|
+
// issues/133(拍板 B):可空时间列空值出 `null`,不出 ''。
|
|
1429
|
+
// · spec 06-facade.md:93 钉的是"空值返回 null";
|
|
1430
|
+
// · boot2 参考实现的 ProcessTaskVO 直接继承 entity 的 `Date finishTime` ⇒ Jackson 出 null;
|
|
1431
|
+
// · 历史上这里回 ''(commit 448f902)是为绕 issues/122 宿主侧全局剥-null,
|
|
1432
|
+
// 该根因已由 mldong-nestjs `@KeepNullResponse()`(WfController 类级)收口,
|
|
1433
|
+
// 引擎侧不该再替宿主兜底——那会把"键恒在、值 null"的形状换成"值空串",
|
|
1434
|
+
// 前端 `x ? 显示 : 隐藏` 这类判空在 '' 上恒假,等于把缺值伪装成有值。
|
|
1429
1435
|
function fmtTime(v) {
|
|
1430
1436
|
if (v == null)
|
|
1431
|
-
return
|
|
1437
|
+
return null;
|
|
1432
1438
|
const p = (n) => String(n).padStart(2, '0');
|
|
1433
1439
|
return `${v.getFullYear()}-${p(v.getMonth() + 1)}-${p(v.getDate())} ${p(v.getHours())}:${p(v.getMinutes())}:${p(v.getSeconds())}`;
|
|
1434
1440
|
}
|
|
@@ -1519,7 +1525,7 @@ function instanceRowToMap(r) {
|
|
|
1519
1525
|
id: r.id, parentId: r.parentId ?? null, processDefineId: r.defineId,
|
|
1520
1526
|
state: r.state, parentNodeName: r.parentNodeName, businessNo: r.businessNo,
|
|
1521
1527
|
operator: r.operator, expireTime: fmtTime(r.expireTime),
|
|
1522
|
-
|
|
1528
|
+
createTime: fmtTime(r.createTime), createUser: r.createUser,
|
|
1523
1529
|
updateTime: fmtTime(r.updateTime), updateUser: r.updateUser,
|
|
1524
1530
|
processDefineName: r.defineName, processDefineDisplayName: r.defineDisplayName,
|
|
1525
1531
|
processDefineVersion: r.defineVersion,
|
|
@@ -1532,7 +1538,7 @@ function ccRowToMap(r) {
|
|
|
1532
1538
|
id: r.id, parentId: r.parentId ?? null, processDefineId: r.defineId,
|
|
1533
1539
|
state: r.state, parentNodeName: r.parentNodeName, businessNo: r.businessNo,
|
|
1534
1540
|
operator: r.operator, expireTime: fmtTime(r.expireTime),
|
|
1535
|
-
|
|
1541
|
+
createTime: fmtTime(r.createTime), createUser: r.createUser,
|
|
1536
1542
|
updateTime: fmtTime(r.updateTime), updateUser: r.updateUser,
|
|
1537
1543
|
processDefineName: r.defineName, processDefineDisplayName: r.defineDisplayName,
|
|
1538
1544
|
processDefineVersion: r.defineVersion,
|
|
@@ -1551,10 +1557,10 @@ function taskRowToMap(r) {
|
|
|
1551
1557
|
displayName: r.displayName, taskType: r.taskType, performType: r.performType,
|
|
1552
1558
|
taskState: r.taskState, operator: r.operator, finishTime: fmtTime(r.finishTime),
|
|
1553
1559
|
expireTime: fmtTime(r.expireTime), formKey: r.formKey, taskParentId: r.taskParentId ?? null,
|
|
1554
|
-
|
|
1560
|
+
createTime: fmtTime(r.createTime), createUser: r.createUser,
|
|
1555
1561
|
updateTime: fmtTime(r.updateTime), updateUser: r.updateUser,
|
|
1556
1562
|
processDefineName: r.processDefineName, processDefineDisplayName: r.processDefineDisplayName,
|
|
1557
|
-
|
|
1563
|
+
instanceCreateTime: fmtTime(r.instanceCreateTime),
|
|
1558
1564
|
ext, instanceExt, version: r.defineVersion,
|
|
1559
1565
|
taskFormData: formDataOf(r.variables, 'tf_'), // issues/15
|
|
1560
1566
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mldong/jeeflow",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.31",
|
|
4
4
|
"description": "jeeflow workflow engine — Node.js / TypeScript implementation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "tsc",
|
|
21
|
+
"typecheck": "tsc -p tsconfig.check.json",
|
|
21
22
|
"test": "node --import tsx __tests__/spec.test.ts",
|
|
22
23
|
"test-mysql": "node --import tsx --test __tests__/jdbc.test.ts",
|
|
23
24
|
"demo": "node --import tsx demo/main.ts",
|