@rytass/bpm-core-client 0.17.2 → 0.17.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 0.17.3 (2026-10-19)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **react:** add a BPM message language provider ([355b15c](https://github.com/Rytass/BPMCore/commit/355b15c))
6
+ - **template:** translate publish lint lines per language ([60fa7bc](https://github.com/Rytass/BPMCore/commit/60fa7bc))
7
+ - **client:** translate structural publish-lint lines into designer copy ([490339c](https://github.com/Rytass/BPMCore/commit/490339c))
8
+
9
+ ### 🩹 Fixes
10
+
11
+ - **template:** address review of the lint translation ([26d7a54](https://github.com/Rytass/BPMCore/commit/26d7a54))
12
+ - **client:** cover blank node labels and never throw while translating lint ([0a8b3af](https://github.com/Rytass/BPMCore/commit/0a8b3af))
13
+
14
+ ### ❤️ Thank You
15
+
16
+ - Chia Yu Pai @fantasywind
17
+ - Kai-Chieh Yang
18
+
1
19
  ## 0.17.2 (2026-10-18)
2
20
 
3
21
  ### 🚀 Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rytass/bpm-core-client",
3
- "version": "0.17.2",
3
+ "version": "0.17.3",
4
4
  "description": "Framework-agnostic TypeScript client for the Rytass BPM approval workflow GraphQL surface: fetch-based GraphQL transport, REST auth client, pre-baked typed operations for organization, member, form, template, and workflow.",
5
5
  "keywords": [
6
6
  "bpm",
@@ -73,7 +73,7 @@
73
73
  }
74
74
  },
75
75
  "peerDependencies": {
76
- "@rytass/bpm-core-shared": "^0.17.2"
76
+ "@rytass/bpm-core-shared": "^0.17.3"
77
77
  },
78
78
  "dependencies": {
79
79
  "tslib": "^2.8.1"
@@ -1,2 +1,3 @@
1
1
  export * from './template-api';
2
2
  export * from './workflow-webhook-endpoint-api';
3
+ export * from './workflow-lint-errors';
@@ -3,4 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./template-api"), exports);
5
5
  tslib_1.__exportStar(require("./workflow-webhook-endpoint-api"), exports);
6
+ tslib_1.__exportStar(require("./workflow-lint-errors"), exports);
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core-client/src/lib/template/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,0EAAgD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core-client/src/lib/template/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,0EAAgD;AAChD,iEAAuC"}
@@ -0,0 +1,23 @@
1
+ import type { WorkflowDefinition } from '@rytass/bpm-core-shared/workflow';
2
+ /** Languages `readWorkflowLintMessage` can rewrite the publish lint into. */
3
+ export type WorkflowLintLanguage = 'en' | 'zh-TW';
4
+ export declare const DEFAULT_WORKFLOW_LINT_LANGUAGE: WorkflowLintLanguage;
5
+ export declare const WORKFLOW_LINT_LANGUAGES: readonly WorkflowLintLanguage[];
6
+ /**
7
+ * Rewrites the structural lines of a publish-lint failure into designer copy
8
+ * in `language` (Traditional Chinese by default).
9
+ *
10
+ * The backend lint (`lintWorkflowDefinition`) speaks in node ids —
11
+ * `workflow.nodes.exclusiveGateway_1 exclusive split requires at least two
12
+ * outgoing edges` — and joins every failing line with `'; '`. The designer
13
+ * already holds the definition it just submitted, so it can name the node the
14
+ * way the canvas does and say how to fix it.
15
+ *
16
+ * The backend message itself stays untouched: hosts may match it, and only the
17
+ * screen needs the translation. Every line is rebuilt from the definition with
18
+ * the same `WORKFLOW_LINT_MESSAGES` the backend writes with, and replaced only
19
+ * on an exact, segment-bounded match, so a line this module does not know — a
20
+ * CEL error, a webhook code, a form path — or a node id that does not belong
21
+ * to this definition is returned exactly as the backend wrote it.
22
+ */
23
+ export declare function readWorkflowLintMessage(message: string, definition: WorkflowDefinition | null | undefined, language?: WorkflowLintLanguage): string;
@@ -0,0 +1,201 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WORKFLOW_LINT_LANGUAGES = exports.DEFAULT_WORKFLOW_LINT_LANGUAGE = void 0;
4
+ exports.readWorkflowLintMessage = readWorkflowLintMessage;
5
+ const workflow_graph_1 = require("@rytass/bpm-core-shared/workflow-graph");
6
+ exports.DEFAULT_WORKFLOW_LINT_LANGUAGE = 'zh-TW';
7
+ exports.WORKFLOW_LINT_LANGUAGES = [
8
+ 'zh-TW',
9
+ 'en',
10
+ ];
11
+ // Node types are looked up in a Map, not an object literal: the lint only
12
+ // checks that a node type is a non-empty string, so a draft can carry
13
+ // `constructor` or `toString`, which an object lookup would answer with a
14
+ // prototype function.
15
+ //
16
+ // The designer's own labels are Chinese whatever the language, so the English
17
+ // copy names each field and node type with its on-screen label beside it.
18
+ const WORKFLOW_LINT_COPY = {
19
+ en: {
20
+ blankNodeLabel: (typeLabel) => `A "${typeLabel}" node has no display name. Select it, fill in "Display name" (顯示名稱), then publish again.`,
21
+ cycle: (name) => `The connections around "${name}" form a loop, so the flow would keep coming back. Remove the connection that closes the loop.`,
22
+ endEventMissing: 'The flow needs at least one "End" (結束) node.',
23
+ exclusiveSplitDefaultEdge: (name) => `One outgoing connection of the condition split "${name}" must have "Otherwise take this path" (其他情況走這條) turned on, so the flow has somewhere to go when no condition matches.`,
24
+ exclusiveSplitOutgoingEdges: (name) => `The condition split "${name}" needs at least two outgoing connections, one of them with "Otherwise take this path" (其他情況走這條) turned on.`,
25
+ noPathToEnd: (name) => `"${name}" has no path to "End" (結束), so the flow would get stuck there. Connect it to the next node or to "End".`,
26
+ nodeTypeLabels: new Map([
27
+ ['endEvent', 'End (結束)'],
28
+ ['exclusiveGateway', 'Condition split (條件分流)'],
29
+ ['parallelGateway', 'Parallel (並行處理)'],
30
+ ['serviceTask', 'System (系統)'],
31
+ ['startEvent', 'Start (開始)'],
32
+ ['userTask', 'Approval (簽核)'],
33
+ ]),
34
+ notifyOutgoingEdge: (name) => `The notify node "${name}" cannot have outgoing connections (it only sends a notice; the flow does not continue from it). Delete the connection leaving it.`,
35
+ parallelJoinIncomingEdges: (name) => `The parallel join "${name}" needs at least two incoming connections.`,
36
+ startEventCount: 'The flow needs exactly one "Start" (開始) node.',
37
+ unknownNodeType: 'Unknown type',
38
+ unreachableNode: (name) => `"${name}" cannot be reached from "Start" (開始), so the flow never gets there. Make sure a chain of connections leads to it from "Start".`,
39
+ },
40
+ 'zh-TW': {
41
+ blankNodeLabel: (typeLabel) => `有一個「${typeLabel}」節點沒有顯示名稱。請點選該節點,在「顯示名稱」填入名稱後再發布。`,
42
+ cycle: (name) => `節點「${name}」所在的連線繞成了迴圈,流程會一直繞回來。請移除造成迴圈的那條連線。`,
43
+ endEventMissing: '流程至少要有一個「結束」節點。',
44
+ exclusiveSplitDefaultEdge: (name) => `條件分流「${name}」的輸出連線中,要有一條開啟「其他情況走這條」,其他條件都不符合時流程才有路可走。`,
45
+ exclusiveSplitOutgoingEdges: (name) => `條件分流「${name}」往下至少要有兩條連線,且其中一條要開啟「其他情況走這條」。`,
46
+ noPathToEnd: (name) => `節點「${name}」往下接不到「結束」,流程走到這裡會卡住。請從它拉一條連線到下一個節點或「結束」。`,
47
+ // The canvas's own labels, so the copy names a node type the way the
48
+ // designer and the AI toolset do.
49
+ nodeTypeLabels: new Map(Object.entries(workflow_graph_1.WORKFLOW_NODE_TYPE_LABELS)),
50
+ notifyOutgoingEdge: (name) => `知會節點「${name}」不能往下接連線(知會只負責通知,流程不會從它繼續)。請刪除從它拉出的連線。`,
51
+ parallelJoinIncomingEdges: (name) => `並行處理「${name}」至少要有兩條連線匯入。`,
52
+ startEventCount: '流程必須有一個「開始」節點,而且只能有一個。',
53
+ unknownNodeType: '未知類型',
54
+ unreachableNode: (name) => `從「開始」走不到節點「${name}」,流程永遠不會到這一關。請確認從「開始」一路都有連線接到它。`,
55
+ },
56
+ };
57
+ /**
58
+ * Rewrites the structural lines of a publish-lint failure into designer copy
59
+ * in `language` (Traditional Chinese by default).
60
+ *
61
+ * The backend lint (`lintWorkflowDefinition`) speaks in node ids —
62
+ * `workflow.nodes.exclusiveGateway_1 exclusive split requires at least two
63
+ * outgoing edges` — and joins every failing line with `'; '`. The designer
64
+ * already holds the definition it just submitted, so it can name the node the
65
+ * way the canvas does and say how to fix it.
66
+ *
67
+ * The backend message itself stays untouched: hosts may match it, and only the
68
+ * screen needs the translation. Every line is rebuilt from the definition with
69
+ * the same `WORKFLOW_LINT_MESSAGES` the backend writes with, and replaced only
70
+ * on an exact, segment-bounded match, so a line this module does not know — a
71
+ * CEL error, a webhook code, a form path — or a node id that does not belong
72
+ * to this definition is returned exactly as the backend wrote it.
73
+ */
74
+ function readWorkflowLintMessage(message, definition, language = exports.DEFAULT_WORKFLOW_LINT_LANGUAGE) {
75
+ // A plain JavaScript host can pass any string; fall back rather than throw
76
+ // inside the caller's error handler.
77
+ const copy = exports.WORKFLOW_LINT_LANGUAGES.includes(language)
78
+ ? WORKFLOW_LINT_COPY[language]
79
+ : WORKFLOW_LINT_COPY[exports.DEFAULT_WORKFLOW_LINT_LANGUAGE];
80
+ // Unreadable entries are skipped one by one below; this is the last resort
81
+ // for a draft that throws on read (a getter or a Proxy), which shows the
82
+ // backend message rather than nothing.
83
+ try {
84
+ const translations = readFirstWins(readWorkflowLintTranslations(definition, copy));
85
+ // Split on the backend's own separator and swap whole lines only, so a
86
+ // line that merely contains a known one — a CEL error quoting it, say — is
87
+ // left as written.
88
+ return message
89
+ .split('; ')
90
+ .map((segment) => translations.get(segment) ?? segment)
91
+ .join('; ');
92
+ }
93
+ catch {
94
+ return message;
95
+ }
96
+ }
97
+ /**
98
+ * A Map keyed by the first entry for each key. Duplicate node ids are a lint
99
+ * error of their own, and the line then names the first node with that id.
100
+ */
101
+ function readFirstWins(entries) {
102
+ return new Map([...entries].reverse());
103
+ }
104
+ /**
105
+ * This runs inside the callers' error handlers, after they have cleared the
106
+ * previous error, so it should not throw (`readWorkflowLintMessage` still
107
+ * catches anything that does): a draft saved by the AI toolset or the API is
108
+ * not linted on save and may be malformed. A node or edge it cannot
109
+ * read is skipped on its own, which leaves that line as the backend wrote it
110
+ * while every readable one is still translated.
111
+ */
112
+ function readWorkflowLintTranslations(definition, copy) {
113
+ const entries = Array.isArray(definition?.nodes)
114
+ ? definition.nodes
115
+ : [];
116
+ const edges = Array.isArray(definition?.edges)
117
+ ? definition.edges
118
+ : [];
119
+ // The shape lint names a node by its index in the submitted array, so the
120
+ // index is taken before unreadable entries are dropped.
121
+ const indexedNodes = entries.flatMap((node, index) => isReadableNode(node) ? [[node, index]] : []);
122
+ const nodesById = readFirstWins(indexedNodes.map(([node]) => [
123
+ node.id,
124
+ node,
125
+ ]));
126
+ const nodeTranslations = indexedNodes.flatMap(([node, index]) => readNodeTranslations(node, index, copy));
127
+ const edgeTranslations = edges
128
+ .filter(isReadableEdge)
129
+ .flatMap((edge) => {
130
+ const source = nodesById.get(edge.source);
131
+ return source
132
+ ? [
133
+ [
134
+ workflow_graph_1.WORKFLOW_LINT_MESSAGES.notifyOutgoingEdge(edge.id),
135
+ copy.notifyOutgoingEdge(readNodeName(source, copy)),
136
+ ],
137
+ ]
138
+ : [];
139
+ });
140
+ return [
141
+ [workflow_graph_1.WORKFLOW_LINT_MESSAGES.startEventCount(), copy.startEventCount],
142
+ [workflow_graph_1.WORKFLOW_LINT_MESSAGES.endEventMissing(), copy.endEventMissing],
143
+ ...nodeTranslations,
144
+ ...edgeTranslations,
145
+ ];
146
+ }
147
+ function readNodeTranslations(node, index, copy) {
148
+ const name = readNodeName(node, copy);
149
+ return [
150
+ [
151
+ // The shape lint names the node by array index, the one thing the
152
+ // canvas never shows, and the label it would use is the blank one.
153
+ workflow_graph_1.WORKFLOW_LINT_MESSAGES.blankNodeLabel(index),
154
+ copy.blankNodeLabel(readNodeTypeLabel(node, copy)),
155
+ ],
156
+ [
157
+ workflow_graph_1.WORKFLOW_LINT_MESSAGES.exclusiveSplitOutgoingEdges(node.id),
158
+ copy.exclusiveSplitOutgoingEdges(name),
159
+ ],
160
+ [
161
+ workflow_graph_1.WORKFLOW_LINT_MESSAGES.exclusiveSplitDefaultEdge(node.id),
162
+ copy.exclusiveSplitDefaultEdge(name),
163
+ ],
164
+ [
165
+ workflow_graph_1.WORKFLOW_LINT_MESSAGES.parallelJoinIncomingEdges(node.id),
166
+ copy.parallelJoinIncomingEdges(name),
167
+ ],
168
+ [
169
+ workflow_graph_1.WORKFLOW_LINT_MESSAGES.unreachableNode(node.id),
170
+ copy.unreachableNode(name),
171
+ ],
172
+ [workflow_graph_1.WORKFLOW_LINT_MESSAGES.noPathToEnd(node.id), copy.noPathToEnd(name)],
173
+ [workflow_graph_1.WORKFLOW_LINT_MESSAGES.cycle(node.id), copy.cycle(name)],
174
+ ];
175
+ }
176
+ function isReadableNode(node) {
177
+ return (typeof node === 'object' &&
178
+ node !== null &&
179
+ typeof node.id === 'string');
180
+ }
181
+ function isReadableEdge(edge) {
182
+ return (typeof edge === 'object' &&
183
+ edge !== null &&
184
+ typeof edge.id === 'string' &&
185
+ typeof edge.source === 'string');
186
+ }
187
+ /**
188
+ * The name the canvas shows for a node. A blank label falls back to the node
189
+ * type, never the id: the id is what the designer cannot see.
190
+ */
191
+ function readNodeName(node, copy) {
192
+ const label = node.data
193
+ ?.label;
194
+ return typeof label === 'string' && label.trim()
195
+ ? label.trim()
196
+ : readNodeTypeLabel(node, copy);
197
+ }
198
+ function readNodeTypeLabel(node, copy) {
199
+ return copy.nodeTypeLabels.get(node.type) ?? copy.unknownNodeType;
200
+ }
201
+ //# sourceMappingURL=workflow-lint-errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-lint-errors.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core-client/src/lib/template/workflow-lint-errors.ts"],"names":[],"mappings":";;;AAqHA,0DA6BC;AA7ID,2EAGgD;AAKnC,QAAA,8BAA8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