@uipath/maestro-builder-sdk 6.18.2 → 6.18.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/dist/api-index.md +1 -1
- package/dist/case/check.d.ts +7 -7
- package/dist/case/check.js +2 -1
- package/dist/case/cli-library.d.ts +4 -3
- package/dist/case/cli-library.js +7 -3
- package/dist/case/serialize.js +26 -26
- package/dist/core/lookups.d.ts +7 -10
- package/dist/core/lookups.js +7 -10
- package/package.json +2 -2
package/dist/api-index.md
CHANGED
|
@@ -204,7 +204,7 @@ could hand you spans for a version you do not have.
|
|
|
204
204
|
| `ran` | function | `dist/core/expr.d.ts:95-141` | Expressions and types | Did this step run? |
|
|
205
205
|
| `rawNode` | function | `dist/core/node-classes.d.ts:180-242` | Supporting types | Place a node this SDK has no factory for, carrying its definition verbatim (`uipath.exotic.thing@2.1` and the manifest… |
|
|
206
206
|
| `RawReference` | type | `dist/core/lookups.d.ts:190-198` | Supporting types | |
|
|
207
|
-
| `refuseLookupToken` | function | `dist/core/lookups.d.ts:207-
|
|
207
|
+
| `refuseLookupToken` | function | `dist/core/lookups.d.ts:207-223` | Generated descriptors | Refuse a lookup token where the family cannot resolve one. |
|
|
208
208
|
| `RemoteA2aToolRef` | interface | `dist/core/actions.d.ts:1745-1765` | Supporting types | A remote A2A (agent-to-agent) endpoint the agent may delegate to. |
|
|
209
209
|
| `resolvedValue` | function | `dist/core/lookups.d.ts:172-179` | Generated descriptors | The recorded id for a token, or `undefined`. |
|
|
210
210
|
| `ReturnFieldType` | type | `dist/core/actions.d.ts:1317-1334` | Supporting types | A JSON-schema-ish type for one field of a step's declared `returns`. |
|
package/dist/case/check.d.ts
CHANGED
|
@@ -21,17 +21,17 @@ export interface Diagnostic {
|
|
|
21
21
|
* The connector-library facts Case `check` reads, from the same `Library`
|
|
22
22
|
* instance `compile` serializes against (`caseCheckOpts` in `./cli-library.ts`).
|
|
23
23
|
*
|
|
24
|
-
* Deliberately NARROWER than Flow's
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* compile
|
|
24
|
+
* Deliberately NARROWER than Flow's bag. An error here must be a refusal Case
|
|
25
|
+
* `compile` actually makes. Case `serialize` resolves the connector operation and
|
|
26
|
+
* the event, and validates a connector task's inputs and resolves its lookups
|
|
27
|
+
* through the shared `buildConnectorInputs` (`connectorInputs`, `lookups`,
|
|
28
|
+
* `resolutions`). It does not check binding labels or BYOA, so those hooks stay
|
|
29
|
+
* off until Case compile enforces them.
|
|
30
30
|
*
|
|
31
31
|
* Every hook fails open: without a library, `check` stays a pure function of the
|
|
32
32
|
* built model.
|
|
33
33
|
*/
|
|
34
|
-
export type CaseCheckOpts = Pick<ConnectorCheckOpts, 'connectorResolveError' | 'schemaReadiness'> & {
|
|
34
|
+
export type CaseCheckOpts = Pick<ConnectorCheckOpts, 'connectorResolveError' | 'connectorInputs' | 'lookups' | 'resolutions' | 'schemaReadiness'> & {
|
|
35
35
|
/**
|
|
36
36
|
* What Case `compile` would refuse an event subscription with, or `undefined`
|
|
37
37
|
* when it resolves: `EVENT_UNKNOWN` (the event is not in the library, or
|
package/dist/case/check.js
CHANGED
|
@@ -2,7 +2,7 @@ import { types } from '../core/expr.js';
|
|
|
2
2
|
import { authoredCaseVersion, CASE_FORMAT_PROFILE, CASE_SCHEMA_VERSIONS } from './format-profile.js';
|
|
3
3
|
import { schemaVersionRefusal } from '../schema-version.js';
|
|
4
4
|
import { caseJsonPreservation, caseJsonPreservationErrors } from './preserve.js';
|
|
5
|
-
import { EQUALS_EXPR_DIALECT, checkConnectorContract, checkConnectorSchema, } from '../core/connector-checks.js';
|
|
5
|
+
import { EQUALS_EXPR_DIALECT, checkConnectorContract, checkConnectorLookups, checkConnectorSchema, } from '../core/connector-checks.js';
|
|
6
6
|
const TYPE_NAMES = new Set(Object.values(types));
|
|
7
7
|
// audit-case-coverage: rule-slot table start
|
|
8
8
|
// This runtime table must equal the committed matrix's rejected cells. The audit
|
|
@@ -310,6 +310,7 @@ function checkLibraryConnectors(built, opts, diags) {
|
|
|
310
310
|
if (t.kind === 'connector' && t.connector) {
|
|
311
311
|
const where = `Connector task "${t.name}"`;
|
|
312
312
|
const spec = t.connector;
|
|
313
|
+
checkConnectorLookups(where, spec, opts, EQUALS_EXPR_DIALECT, reporter(where, t.name));
|
|
313
314
|
checkConnectorSchema(where, spec, opts, EQUALS_EXPR_DIALECT, reporter(where, t.name));
|
|
314
315
|
checkConnectorContract(where, spec, opts, reporter(where, t.name));
|
|
315
316
|
}
|
|
@@ -5,9 +5,10 @@ import type { CaseCheckOpts } from './check.js';
|
|
|
5
5
|
*
|
|
6
6
|
* Only the hooks for refusals Case `compile` makes (see {@link CaseCheckOpts}):
|
|
7
7
|
* the operation and event resolution (the event through `resolveCaseSubscription`,
|
|
8
|
-
* compile's own call),
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* compile's own call), a connector task's field contract and lookups (the
|
|
9
|
+
* `=`-expression validator Case compile runs), and the schema-readiness warnings.
|
|
10
|
+
* The binding-label and BYOA hooks of the shared bag are left out, because Case
|
|
11
|
+
* `serialize` does not enforce them.
|
|
11
12
|
*
|
|
12
13
|
* @param library - The library `openCliLibrary` returned, or `undefined`.
|
|
13
14
|
* @returns The options for Case `check`.
|
package/dist/case/cli-library.js
CHANGED
|
@@ -14,9 +14,10 @@ import { EVENT_GENERIC_NO_OBJECT, GenericEventNoObjectError, resolveCaseSubscrip
|
|
|
14
14
|
*
|
|
15
15
|
* Only the hooks for refusals Case `compile` makes (see {@link CaseCheckOpts}):
|
|
16
16
|
* the operation and event resolution (the event through `resolveCaseSubscription`,
|
|
17
|
-
* compile's own call),
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* compile's own call), a connector task's field contract and lookups (the
|
|
18
|
+
* `=`-expression validator Case compile runs), and the schema-readiness warnings.
|
|
19
|
+
* The binding-label and BYOA hooks of the shared bag are left out, because Case
|
|
20
|
+
* `serialize` does not enforce them.
|
|
20
21
|
*
|
|
21
22
|
* @param library - The library `openCliLibrary` returned, or `undefined`.
|
|
22
23
|
* @returns The options for Case `check`.
|
|
@@ -27,6 +28,9 @@ export function caseCheckOpts(library) {
|
|
|
27
28
|
const shared = connectorCheckOpts(library);
|
|
28
29
|
return {
|
|
29
30
|
connectorResolveError: shared.connectorResolveError,
|
|
31
|
+
connectorInputs: shared.connectorInputs,
|
|
32
|
+
lookups: shared.lookups,
|
|
33
|
+
resolutions: shared.resolutions,
|
|
30
34
|
schemaReadiness: shared.schemaReadiness,
|
|
31
35
|
subscriptionError: (kind, sub) => {
|
|
32
36
|
try {
|
package/dist/case/serialize.js
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
* name) are resolved here to the generated ids.
|
|
10
10
|
*/
|
|
11
11
|
import { IdGen } from './ids.js';
|
|
12
|
-
import { transportHttpMethod } from '../core/connector-inputs.js';
|
|
12
|
+
import { buildConnectorInputs, nestConnectorBody, transportHttpMethod } from '../core/connector-inputs.js';
|
|
13
|
+
import { EQUALS_EXPR_DIALECT } from '../core/connector-checks.js';
|
|
13
14
|
import { refuseLookupToken } from '../core/lookups.js';
|
|
14
15
|
import { resolveCaseSubscription } from './subscription.js';
|
|
15
16
|
import { CASE_FORMAT_PROFILE, CASE_SCHEMA_VERSIONS } from './format-profile.js';
|
|
@@ -1083,7 +1084,6 @@ function connectorTaskData(spec, resolver, elementId) {
|
|
|
1083
1084
|
throw new Error(`connector task needs the connector library — pass { library } to serialize or use uip maestro case compile --library.`);
|
|
1084
1085
|
const rc = resolver.library.resolve(spec.key, spec.action, spec.version, spec.object);
|
|
1085
1086
|
const op = rc.entry.operation ?? {};
|
|
1086
|
-
const params = Array.isArray(op.parameters) ? op.parameters : [];
|
|
1087
1087
|
const context = [
|
|
1088
1088
|
io('connectorKey', 'string', { value: rc.connectorKey }),
|
|
1089
1089
|
];
|
|
@@ -1097,31 +1097,31 @@ function connectorTaskData(spec, resolver, elementId) {
|
|
|
1097
1097
|
if (folderRef)
|
|
1098
1098
|
context.push(io('folderKey', 'string', { value: `=bindings.${folderRef.id}` }));
|
|
1099
1099
|
context.push(io('objectName', 'string', { value: op.objectName ?? spec.action }), io('method', 'string', { value: transportHttpMethod(rc.httpMethod) }), io('path', 'string', { value: rc.endpoint }), io('metadata', 'json', { body: connectorMetadata(rc, op) }));
|
|
1100
|
-
// inputs:
|
|
1100
|
+
// inputs: the shared validator (`core/connector-inputs.ts`), the one Flow's and
|
|
1101
|
+
// BPMN's serializers and every family's `check` run. It refuses a missing
|
|
1102
|
+
// required field, an unknown or mistyped input, and swaps a `lookup()` token for
|
|
1103
|
+
// the id `registry prepare --resolve` recorded (refusing one nobody recorded).
|
|
1104
|
+
// Case used to split the inputs itself: an unknown name went to the body
|
|
1105
|
+
// unchecked, and every token was refused, because nothing here read
|
|
1106
|
+
// `resolutions.json` (#1034, #1036).
|
|
1101
1107
|
//
|
|
1102
|
-
//
|
|
1103
|
-
//
|
|
1104
|
-
//
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
}
|
|
1120
|
-
else if (p.type === 'query') {
|
|
1121
|
-
queryParameters[camel] = body[name];
|
|
1122
|
-
delete body[name];
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1108
|
+
// The ROUTING is the library's (a field's location is a property of the
|
|
1109
|
+
// operation); the SPELLING of the path/query keys is Case's own: the Case
|
|
1110
|
+
// designer camelCases them (`send_as` → `sendAs`, see
|
|
1111
|
+
// `fixtures/execute-connector-activity.sample.json`), and the body is nested.
|
|
1112
|
+
const slots = buildConnectorInputs(rc, spec.inputs ?? {}, {
|
|
1113
|
+
dialect: EQUALS_EXPR_DIALECT,
|
|
1114
|
+
resolutions: resolver.library.lookupResolutions,
|
|
1115
|
+
lookups: resolver.library.lookupSpecs(spec.key, spec.action, spec.version, spec.object),
|
|
1116
|
+
});
|
|
1117
|
+
const camelKeys = (slot) => Object.fromEntries(Object.entries(slot ?? {}).map(([name, value]) => [toCamel(name), value]));
|
|
1118
|
+
const pathParameters = camelKeys(slots.pathParameters);
|
|
1119
|
+
const queryParameters = camelKeys(slots.queryParameters);
|
|
1120
|
+
// Case has no multipart wire: a filled file part stays in the body, where it
|
|
1121
|
+
// has always gone.
|
|
1122
|
+
const parts = Object.fromEntries((slots.multipartParameters ?? [])
|
|
1123
|
+
.filter((part) => part.value !== undefined).map((part) => [part.name, part.value]));
|
|
1124
|
+
const body = nestConnectorBody({ ...(slots.bodyParameters ?? {}), ...parts });
|
|
1125
1125
|
const inputs = [
|
|
1126
1126
|
ioSlot('pathParameters', pathParameters, `${elementId}`),
|
|
1127
1127
|
ioSlot('queryParameters', queryParameters, `${elementId}`),
|
package/dist/core/lookups.d.ts
CHANGED
|
@@ -207,16 +207,13 @@ export declare function lookupSpecOf(reference: RawReference, invariant?: Readon
|
|
|
207
207
|
/**
|
|
208
208
|
* Refuse a lookup token where the family cannot resolve one.
|
|
209
209
|
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
* remove; emitting it from the tool that removes it would be the worst possible
|
|
218
|
-
* outcome. Until Case and BPMN read `resolutions.json` too, they refuse the
|
|
219
|
-
* token and say so.
|
|
210
|
+
* Connector-activity inputs resolve their lookups in every family through
|
|
211
|
+
* `buildConnectorInputs` (`core/connector-inputs.ts`), which reads
|
|
212
|
+
* `connectors-local/resolutions.json`. This guard is for the sites that do not
|
|
213
|
+
* go through it yet: a Case event subscription's `where`, whose values Case
|
|
214
|
+
* copies into its emitted payload verbatim. A token reaching one would be
|
|
215
|
+
* embedded as `{"__lookup": {…}}` where the connector expects an id, which is
|
|
216
|
+
* silent wrongness, so it is refused instead.
|
|
220
217
|
*
|
|
221
218
|
* @param value - A connector input value.
|
|
222
219
|
* @param family - The authoring family, for the message.
|
package/dist/core/lookups.js
CHANGED
|
@@ -261,16 +261,13 @@ function byAlias(lookupName) {
|
|
|
261
261
|
/**
|
|
262
262
|
* Refuse a lookup token where the family cannot resolve one.
|
|
263
263
|
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
* remove; emitting it from the tool that removes it would be the worst possible
|
|
272
|
-
* outcome. Until Case and BPMN read `resolutions.json` too, they refuse the
|
|
273
|
-
* token and say so.
|
|
264
|
+
* Connector-activity inputs resolve their lookups in every family through
|
|
265
|
+
* `buildConnectorInputs` (`core/connector-inputs.ts`), which reads
|
|
266
|
+
* `connectors-local/resolutions.json`. This guard is for the sites that do not
|
|
267
|
+
* go through it yet: a Case event subscription's `where`, whose values Case
|
|
268
|
+
* copies into its emitted payload verbatim. A token reaching one would be
|
|
269
|
+
* embedded as `{"__lookup": {…}}` where the connector expects an id, which is
|
|
270
|
+
* silent wrongness, so it is refused instead.
|
|
274
271
|
*
|
|
275
272
|
* @param value - A connector input value.
|
|
276
273
|
* @param family - The authoring family, for the message.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.18.
|
|
3
|
+
"version": "6.18.3",
|
|
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",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"@types/node": "^22.7.0",
|
|
93
93
|
"esbuild": "^0.28.1"
|
|
94
94
|
},
|
|
95
|
-
"gitref": "
|
|
95
|
+
"gitref": "e2e0a41da39b08bb97a105483f436232f0e36c2e"
|
|
96
96
|
}
|