@uipath/maestro-builder-sdk 6.14.4 → 6.15.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.
Files changed (47) hide show
  1. package/dist/api-index.md +129 -129
  2. package/dist/api-members.md +420 -416
  3. package/dist/bpmn/bpmn-sdk.d.ts +16 -0
  4. package/dist/bpmn/bpmn-sdk.js +2 -0
  5. package/dist/bpmn/check-cli.js +22 -5
  6. package/dist/bpmn/check.d.ts +15 -1
  7. package/dist/bpmn/check.js +69 -2
  8. package/dist/bpmn/compile-cli.js +24 -14
  9. package/dist/bpmn/connector.js +29 -14
  10. package/dist/bpmn/intsvc.js +5 -2
  11. package/dist/bpmn/serialize.d.ts +2 -0
  12. package/dist/bpmn/serialize.js +1 -1
  13. package/dist/case/compile-cli.js +6 -9
  14. package/dist/case/serialize.js +1 -1
  15. package/dist/check-cli.js +6 -35
  16. package/dist/check.d.ts +16 -148
  17. package/dist/check.js +53 -711
  18. package/dist/cli/commands/bpmn.js +15 -0
  19. package/dist/cli-library.d.ts +6 -25
  20. package/dist/cli-library.js +6 -73
  21. package/dist/compile-cli.js +14 -8
  22. package/dist/core/actions.d.ts +19 -0
  23. package/dist/core/cli-library.d.ts +47 -0
  24. package/dist/core/cli-library.js +150 -0
  25. package/dist/core/connector-checks.d.ts +226 -0
  26. package/dist/core/connector-checks.js +518 -0
  27. package/dist/core/connector-inputs.d.ts +80 -0
  28. package/dist/core/connector-inputs.js +453 -0
  29. package/dist/core/event-checks.d.ts +137 -0
  30. package/dist/core/event-checks.js +321 -0
  31. package/dist/decompile.js +1 -1
  32. package/dist/registry/generators/markdown/sections/example.d.ts +7 -1
  33. package/dist/registry/generators/markdown/sections/example.js +70 -5
  34. package/dist/registry/generators/markdown/sections/lookups.js +29 -8
  35. package/dist/registry/prepare/messages.js +6 -1
  36. package/dist/registry/prepare/source-import.d.ts +3 -3
  37. package/dist/registry/prepare/source-import.js +15 -4
  38. package/dist/registry/prepare/source-labels.js +31 -4
  39. package/dist/serialize.d.ts +11 -11
  40. package/dist/serialize.js +285 -428
  41. package/lib/README.md +1 -0
  42. package/lib/library-json.samples/index.json +9 -0
  43. package/lib/library-json.samples/uipath-uipath-airdk/web-search@1.0.0.json +118 -0
  44. package/lib/library-json.samples/uipath-uipath-airdk/web-search@1.0.0.v1def.json +258 -0
  45. package/package.json +2 -2
  46. /package/dist/{event-filters.d.ts → core/event-filters.d.ts} +0 -0
  47. /package/dist/{event-filters.js → core/event-filters.js} +0 -0
@@ -46,7 +46,15 @@ import { GUID_RE } from "../../core/binding-messages.js";
46
46
  import { relativePosix } from "../compat/paths.js";
47
47
  import { canonicalPath, flowSources, isRelativeSpecifier } from "./source-import.js";
48
48
  import { inWorkDir } from "../../workdir.js";
49
- const CALLEES = new Set(["connector", "onEvent", "waitForEvent"]);
49
+ const CALLEES = new Set([
50
+ "connector", "onEvent", "waitForEvent", "eventTrigger", "dataService",
51
+ ]);
52
+ /**
53
+ * Data Fabric's connector key, spelled here rather than imported from
54
+ * `bpmn/data-service.ts` — `registry/` does not depend on a family's emitter.
55
+ * `.dataService()` is the one call that binds a connection without naming one.
56
+ */
57
+ const DATA_SERVICE_KEY = "uipath-uipath-dataservice";
50
58
  function isFile(path) {
51
59
  try {
52
60
  return statSync(path).isFile();
@@ -81,7 +89,8 @@ export function sourceBindingLabels(options) {
81
89
  catch {
82
90
  continue; // unreadable: it cannot be the author's working source
83
91
  }
84
- readFile(file, relativePosix(root, file), text, options.connectorKey, moduleDirs, result);
92
+ const family = file.endsWith(".bpmn.ts") ? "bpmn" : "flow";
93
+ readFile(file, relativePosix(root, file), text, options.connectorKey, moduleDirs, result, family);
85
94
  }
86
95
  return result;
87
96
  }
@@ -115,7 +124,7 @@ function propertyName(name) {
115
124
  return name.text;
116
125
  return undefined;
117
126
  }
118
- function readFile(file, shown, text, connectorKey, moduleDirs, result) {
127
+ function readFile(file, shown, text, connectorKey, moduleDirs, result, family) {
119
128
  const sf = ts.createSourceFile(file, text, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
120
129
  // `parseDiagnostics` is where the scanner records syntax problems (see core/expr-check.ts).
121
130
  const problems = sf.parseDiagnostics;
@@ -316,6 +325,24 @@ function readFile(file, shown, text, connectorKey, moduleDirs, result) {
316
325
  unplaceable(at, args.why);
317
326
  else if (args.length === 0)
318
327
  unplaceable(at, "spreads an empty array");
328
+ else if (family === "bpmn") {
329
+ // Every BPMN call leads with the ELEMENT ID, so the key is one further
330
+ // along than Flow's and the options are last. `.dataService()` names no
331
+ // connector at all — there is only one it can mean.
332
+ if (callee === "dataService") {
333
+ record(DATA_SERVICE_KEY, args[1], at);
334
+ }
335
+ else if (callee === "connector" || callee === "eventTrigger" || callee === "waitForEvent") {
336
+ const key = constString(args[1]);
337
+ // A computed key is not a reason to distrust the whole file here: a
338
+ // BPMN options object is a literal at the call site, and the label
339
+ // this reads is the author's own name for a binding, not a fact the
340
+ // emitter depends on. Flow's `unplaceable` exists because its first
341
+ // argument may be a DESCRIPTOR whose key decides everything.
342
+ if (key !== undefined)
343
+ record(key, args[callee === "connector" ? 4 : 3], at);
344
+ }
345
+ }
319
346
  else if (callee === "connector") {
320
347
  const [first] = args;
321
348
  const literalKey = constString(first);
@@ -325,7 +352,7 @@ function readFile(file, shown, text, connectorKey, moduleDirs, result) {
325
352
  else
326
353
  record(key, args[literalKey !== undefined ? 3 : 2], at);
327
354
  }
328
- else {
355
+ else if (callee === "onEvent" || callee === "waitForEvent") {
329
356
  const [first] = args;
330
357
  const subscription = constObject(first);
331
358
  if (subscription) {
@@ -1,7 +1,16 @@
1
1
  import type { BuiltFlow } from './flow-sdk.js';
2
- import type { Library, ResolvedConnector } from './library.js';
2
+ import type { Library } from './library.js';
3
3
  import type { Bindings } from './bindings.js';
4
- import { type LookupResolutions, type LookupSpec } from './core/lookups.js';
4
+ import { connectorInputErrors as coreConnectorInputErrors } from './core/connector-inputs.js';
5
+ /**
6
+ * What `compile` would refuse these connector inputs with, or `undefined` when it
7
+ * would accept them — Flow's binding of the shared validator.
8
+ *
9
+ * `render` is not optional here: `renderDeep` is what REFUSES a lookup token in a
10
+ * position no lookup is resolved from (inside an opaque `object` input, say), and
11
+ * dropping it would make `check` quietly accept what `compile` throws on.
12
+ */
13
+ export declare function connectorInputErrors(rc: Parameters<typeof coreConnectorInputErrors>[0], inputs: Record<string, unknown>, resolutions?: Parameters<typeof coreConnectorInputErrors>[2], lookups?: Parameters<typeof coreConnectorInputErrors>[3]): string | undefined;
5
14
  /**
6
15
  * A compile-time observation that does not stop emission. `check()` has its
7
16
  * diagnostics; this is the serializer's own channel for things it can only see
@@ -82,12 +91,3 @@ export declare function serialize(built: BuiltFlow, opts?: SerializeOpts): any;
82
91
  * placeholder and the step that carries it.
83
92
  */
84
93
  export declare function assertBindingPlaceholdersResolve(flow: any): void;
85
- /**
86
- * What `compile` would refuse these connector inputs with, or `undefined` when it
87
- * would accept them — the SAME code path `buildConnectorInputs` runs at emit time,
88
- * so `check` and `compile` cannot disagree about a missing required field, an
89
- * unknown or mistyped input, or a container part passed as a value. Unresolved
90
- * lookups are the one thing skipped: `check` already reports them as
91
- * LOOKUP_UNRESOLVED with the resolution recipe.
92
- */
93
- export declare function connectorInputErrors(rc: ResolvedConnector, inputs: Record<string, unknown>, resolutions?: LookupResolutions, lookups?: Readonly<Record<string, LookupSpec>>): string | undefined;