@uipath/maestro-builder-sdk 6.86.18 → 6.86.19
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/case/decompile.js
CHANGED
|
@@ -2739,6 +2739,13 @@ export function collectPreservation(plan) {
|
|
|
2739
2739
|
fields.default = row.default;
|
|
2740
2740
|
if (lane === 'outputs' && row.var !== undefined)
|
|
2741
2741
|
fields.var = row.var;
|
|
2742
|
+
// `body` is typed only on a structured (`jsonSchema`) variable. On any
|
|
2743
|
+
// other row it is the schema the Designer generated for the type (for a
|
|
2744
|
+
// `file`, the job attachment's `{ ID, FullName, MimeType, Metadata }`),
|
|
2745
|
+
// which compile does not write, so it is carried verbatim, with the type
|
|
2746
|
+
// it describes (`bodyType`): compile drops it once the type changes.
|
|
2747
|
+
if (row.type !== 'jsonSchema' && row.body !== undefined)
|
|
2748
|
+
Object.assign(fields, { body: row.body, bodyType: row.type });
|
|
2742
2749
|
if (Object.keys(fields).length)
|
|
2743
2750
|
byName[row.name] = fields;
|
|
2744
2751
|
if (row.default !== undefined && typeof row.default !== 'string')
|
package/dist/case/preserve.js
CHANGED
|
@@ -276,17 +276,23 @@ export function caseJsonPreservationErrors(payload) {
|
|
|
276
276
|
errors.push(`variable lane "${lane}" is not recognized`);
|
|
277
277
|
continue;
|
|
278
278
|
}
|
|
279
|
+
// A carried `body` names the non-structured type it was saved for.
|
|
280
|
+
for (const [name, fields] of Object.entries(rows ?? {}))
|
|
281
|
+
if (fields.body !== undefined && (typeof fields.bodyType !== 'string' || fields.bodyType === 'jsonSchema'))
|
|
282
|
+
errors.push(`variable "${name}" carried body needs the non-jsonSchema type it was saved for (bodyType)`);
|
|
279
283
|
for (const [name, fields] of Object.entries(rows ?? {}))
|
|
280
284
|
for (const field of Object.keys(fields))
|
|
281
285
|
if (lane === 'inputOutputs' && field === 'value')
|
|
282
286
|
errors.push(`variable "${name}" field "value" on inputOutputs is behavior (a process mapping's var) and cannot be preserved`);
|
|
283
287
|
else if (!PRESERVED_VARIABLE_KEYS.has(field)
|
|
284
288
|
&& !(lane === 'inputOutputs' && (field === 'default' || field === 'custom'))
|
|
285
|
-
&& !(lane === 'outputs' && field === 'var')
|
|
289
|
+
&& !(lane === 'outputs' && field === 'var')
|
|
290
|
+
&& field !== 'body' && field !== 'bodyType')
|
|
286
291
|
errors.push(`variable "${name}" field "${field}" is not an allowed preserved designer field`);
|
|
287
292
|
else if (VARIABLE_KEYS.has(field)
|
|
288
293
|
&& !(lane === 'inputOutputs' && field === 'default')
|
|
289
|
-
&& !(lane === 'outputs' && field === 'var')
|
|
294
|
+
&& !(lane === 'outputs' && field === 'var')
|
|
295
|
+
&& field !== 'body')
|
|
290
296
|
errors.push(`variable "${name}" field "${field}" is owned by the typed Case serializer`);
|
|
291
297
|
}
|
|
292
298
|
for (const lane of payload.variableLanes ?? [])
|
package/dist/case/serialize.js
CHANGED
|
@@ -629,8 +629,16 @@ export function applyPreservation(result, preservation, options = {}) {
|
|
|
629
629
|
if (!row)
|
|
630
630
|
throw new CompileRefusal('PRESERVATION_TARGET_MISSING', `preserved variable "${name}" was not regenerated in variables.${lane}.`);
|
|
631
631
|
for (const [field, value] of Object.entries(fields)) {
|
|
632
|
+
// `bodyType` is the type a carried `body` was saved for, not a field.
|
|
633
|
+
if (field === 'bodyType')
|
|
634
|
+
continue;
|
|
632
635
|
if (row[field] === value)
|
|
633
636
|
continue;
|
|
637
|
+
// A carried `body` describes the type it was saved with. A variable the
|
|
638
|
+
// edit gave another type (a `string`, or a `jsonSchema` with the schema
|
|
639
|
+
// the author typed) does not get it.
|
|
640
|
+
if (field === 'body' && row.type !== fields.bodyType)
|
|
641
|
+
continue;
|
|
634
642
|
if (!options.overwrite && Object.prototype.hasOwnProperty.call(row, field))
|
|
635
643
|
throw new CompileRefusal('PRESERVATION_FIELD_COLLISION', `preserved variable "${name}" field "${field}" collides with serializer-owned output.`);
|
|
636
644
|
row[field] = value;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.86.
|
|
3
|
+
"version": "6.86.19",
|
|
4
4
|
"description": "Build UiPath Flow, Case, and BPMN artifacts by writing TypeScript.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://docs.uipath.com/maestro",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"@types/node": "^22.7.0",
|
|
104
104
|
"esbuild": "^0.28.1"
|
|
105
105
|
},
|
|
106
|
-
"gitref": "
|
|
106
|
+
"gitref": "b5c4c83fdc2104407f0c15ecdfb279a0a567b063"
|
|
107
107
|
}
|