@waron97/prbot 3.2.1 → 3.3.0

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.
@@ -52,7 +52,9 @@ const NODE_FIELDS = [
52
52
  'fields',
53
53
  'formKey',
54
54
  'attachedToRef',
55
- 'errorEventDefinition',
55
+ 'eventDefinitions',
56
+ 'calledElement',
57
+ 'dataIO',
56
58
  'multiInstance',
57
59
  'documentation',
58
60
  ];
@@ -107,9 +109,12 @@ function geometryMaps(diagram) {
107
109
  if (s.attrs.isExpanded !== undefined)
108
110
  expanded[s.attrs.bpmnElement] = s.attrs.isExpanded;
109
111
  }
112
+ // Always record the edge, even with zero waypoints (rare, but real —
113
+ // some exporters emit an empty <...:BPMNEdge>). Skipping on `.length`
114
+ // would drop the entry, so buildDiagram doesn't recreate the edge shape
115
+ // at all, losing a real (if degenerate) diagram element.
110
116
  for (const e of diagram.edges)
111
- if (e.waypoints?.length)
112
- waypoints[e.attrs.bpmnElement] = e.waypoints.map((w) => [w.x, w.y]);
117
+ waypoints[e.attrs.bpmnElement] = (e.waypoints || []).map((w) => [w.x, w.y]);
113
118
  }
114
119
  return { bounds, waypoints, expanded };
115
120
  }
@@ -121,6 +126,7 @@ function structEdge(e, geo) {
121
126
  if (e.name !== undefined) o.name = e.name;
122
127
  if (e.condition !== undefined) o.condition = e.condition;
123
128
  if (e.conditionType !== undefined) o.conditionType = e.conditionType;
129
+ if (e.conditionAttrs !== undefined) o.conditionAttrs = e.conditionAttrs;
124
130
  if (e.documentation !== undefined) o.documentation = e.documentation;
125
131
  if (geo.waypoints[e.id]) o.waypoints = geo.waypoints[e.id];
126
132
  return o;
@@ -166,6 +172,7 @@ function flattenNodes(structNodes, parentId, model, read, geo) {
166
172
  if (se.name !== undefined) e.name = se.name;
167
173
  if (se.condition !== undefined) e.condition = se.condition;
168
174
  if (se.conditionType !== undefined) e.conditionType = se.conditionType;
175
+ if (se.conditionAttrs !== undefined) e.conditionAttrs = se.conditionAttrs;
169
176
  if (se.documentation !== undefined) e.documentation = se.documentation;
170
177
  if (parentId) e.parent = parentId;
171
178
  if (se.waypoints) geo.waypoints[se.id] = se.waypoints;
@@ -219,7 +226,10 @@ function decompose(payload) {
219
226
  // back for the diagram).
220
227
  const structure = {
221
228
  process: model.process,
229
+ messages: model.messages,
222
230
  errors: model.errors,
231
+ signals: model.signals,
232
+ extraDefs: model.extraDefs,
223
233
  nodes: nestNodes(model, null, scriptsMap, geo),
224
234
  annotations: model.annotations.map((a) =>
225
235
  geo.bounds[a.id] ? { ...a, layout: geo.bounds[a.id] } : a
@@ -227,6 +237,9 @@ function decompose(payload) {
227
237
  associations: model.associations.map((a) =>
228
238
  geo.waypoints[a.id] ? { ...a, waypoints: geo.waypoints[a.id] } : a
229
239
  ),
240
+ groups: (model.groups || []).map((g) =>
241
+ geo.bounds[g.id] ? { ...g, layout: geo.bounds[g.id] } : g
242
+ ),
230
243
  };
231
244
  files[STRUCTURE_FILE] = stringifyStructure(structure);
232
245
 
@@ -259,17 +272,22 @@ function recompose(read) {
259
272
 
260
273
  const model = {
261
274
  process: structure.process,
275
+ messages: structure.messages || [],
262
276
  errors: structure.errors || [],
277
+ signals: structure.signals || [],
278
+ extraDefs: structure.extraDefs || [],
263
279
  nodes: [],
264
280
  edges: [],
265
281
  annotations: structure.annotations || [],
266
282
  associations: structure.associations || [],
283
+ groups: structure.groups || [],
267
284
  };
268
285
  const geo = { bounds: {}, waypoints: {}, expanded: {}, labelPos: {} };
269
286
  flattenNodes(structure.nodes, null, model, read, geo);
270
- // annotation/association geometry (top-level lists carry it inline)
287
+ // annotation/association/group geometry (top-level lists carry it inline)
271
288
  for (const a of model.annotations) if (a.layout) geo.bounds[a.id] = a.layout;
272
289
  for (const a of model.associations) if (a.waypoints) geo.waypoints[a.id] = a.waypoints;
290
+ for (const g of model.groups) if (g.layout) geo.bounds[g.id] = g.layout;
273
291
 
274
292
  const built_page = buildProcess({ ns: manifest.ns, model, geo });
275
293
 
@@ -0,0 +1,29 @@
1
+ // Initial body scaffolded into a new scriptTask's .js file (mirrors the
2
+ // `pbtemplate` editor snippet) so created scripts aren't empty.
3
+ export const SCRIPT_TEMPLATE = `try {
4
+ // ----------------------------
5
+ // Input gathering
6
+ // ----------------------------
7
+
8
+ // ----------------------------
9
+ // Output variable initialization
10
+ // ----------------------------
11
+
12
+ // ----------------------------
13
+ // Logical Helpers
14
+ // ----------------------------
15
+
16
+ // ----------------------------
17
+ // Main Execution
18
+ // ----------------------------
19
+
20
+ // ----------------------------
21
+ // Output
22
+ // ----------------------------
23
+
24
+ } catch (err) {
25
+ execution.setVariable('isAlive', false);
26
+ execution.setVariable('errorCode', '');
27
+ execution.setVariable('errorMessage', err.message);
28
+ }
29
+ `;
@@ -282,7 +282,7 @@ async function autopr(options) {
282
282
 
283
283
  const content = readFileSync(changelogPath, 'utf-8');
284
284
 
285
- const duplicate = hasTridents ? findDuplicateLine(content, ids, []) : null;
285
+ const duplicate = findDuplicateLine(content, ids, options.jira ?? []);
286
286
 
287
287
  let appendMode = false;
288
288
  if (duplicate) {