@uipath/maestro-builder-sdk 6.5.1 → 6.6.1

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.
@@ -688,8 +688,7 @@ export class Library {
688
688
  build(dir, e, nodeType, opts = {}) {
689
689
  const entryPath = join(dir, e.path);
690
690
  const entry = JSON.parse(readFileSync(entryPath, 'utf8'));
691
- const v1defRaw = JSON.parse(readFileSync(entryPath.replace(/\.json$/, '.v1def.json'), 'utf8'));
692
- const v1def = Array.isArray(v1defRaw) ? v1defRaw[0] : v1defRaw;
691
+ const v1def = readV1def(entryPath);
693
692
  // A stamped object (case 4) reaches here with the index entry's `objectName`
694
693
  // replaced but the sibling's FILE on disk — so restate the object and derive
695
694
  // the endpoint from the sibling's own template, rather than shipping a node
@@ -805,10 +804,30 @@ function deriveObjectPath(operation, objectName) {
805
804
  }
806
805
  return out;
807
806
  }
808
- /** Read the `.v1def.json` sidecar beside a library entry file. */
807
+ /**
808
+ * Read the `.v1def.json` sidecar beside a library entry file, with a connection
809
+ * definition's `model.bindings.resource` in the designer's canonical casing.
810
+ *
811
+ * The registry serves raw node data in two casings — `uipath-microsoft-outlook365`
812
+ * `trigger-email-received` says `Connection`, its siblings `connection` — and the
813
+ * sidecar keeps whatever it was given. The designer never ships the raw value: its
814
+ * connector mapper builds every definition with `CONNECTION_BINDING_RESOURCE`
815
+ * (`'connection'`, flow-v1 `flow-schema/src/connection-binding.ts`), and the v1.1→v1.2
816
+ * migration lowercased every `.flow` on disk. Studio Web's unresolved-binding check
817
+ * (`matchContextBindings`) filters the flow's `bindings[]` by that string EXACTLY, and
818
+ * since MST-15010 an unresolved placeholder blocks publish. A `Connection` definition
819
+ * beside our `connection` registry entries therefore matched nothing, and the node
820
+ * reported both its connection and `FolderKey` as "not configured" (UV-16774) while
821
+ * validate and debug — which fold the case — passed.
822
+ */
809
823
  function readV1def(entryPath) {
810
824
  const raw = JSON.parse(readFileSync(entryPath.replace(/\.json$/, '.v1def.json'), 'utf8'));
811
- return Array.isArray(raw) ? raw[0] : raw;
825
+ const v1def = Array.isArray(raw) ? raw[0] : raw;
826
+ const bindings = v1def?.model?.bindings;
827
+ if (typeof bindings?.resource === 'string' && bindings.resource.toLowerCase() === 'connection') {
828
+ bindings.resource = 'connection';
829
+ }
830
+ return v1def;
812
831
  }
813
832
  /**
814
833
  * The platform's `connectorDetail.configuration` blob — the designer's own
@@ -1 +1,23 @@
1
+ /**
2
+ * Selects which published library a pull resolves to when `--url` is absent.
3
+ *
4
+ * Unset or `latest` means the stable alias above. A build number
5
+ * (`connectors-library-2026.09.9`, or just `2026.09.9`) means that build's
6
+ * immutable copy under `versions/`.
7
+ *
8
+ * It is an environment variable, not only a flag, because the pull that
9
+ * matters is often not the one a person types. An agent following the skill
10
+ * runs a bare `uip maestro registry pull`, which would otherwise always resolve
11
+ * to the stable alias and repoint the shared cache at whatever is there. When
12
+ * the alias was overwritten with a 2-connector build on 2026-09-22, every such
13
+ * pull switched to it. With this set, a pinned environment (an eval image, a CI
14
+ * job) stays on the build it chose, whoever runs the pull.
15
+ */
16
+ export declare const CONNECTORS_LIBRARY_VERSION_ENV = "CONNECTORS_LIBRARY_VERSION";
17
+ /**
18
+ * The archive URL a pull fetches: `--url` wins, then `CONNECTORS_LIBRARY_VERSION`,
19
+ * then the stable alias. A version that is not a build number is refused
20
+ * rather than guessed at, so a typo cannot fall back to "latest" silently.
21
+ */
22
+ export declare function connectorsLibraryUrl(argv: string[], env?: Record<string, string | undefined>): string;
1
23
  export declare function run(argv: string[]): Promise<number>;
@@ -23,6 +23,45 @@ import { curatedOverlayIdentity } from "./curated-overlay.js";
23
23
  * the trees somewhere specific instead of in the cache.
24
24
  */
25
25
  const DEFAULT_URL = "https://download.uipath.com/maestro/registry/library-json.zip";
26
+ /** Where each published build is kept, immutably, beside the stable alias. */
27
+ const VERSIONS_URL = "https://download.uipath.com/maestro/registry/versions";
28
+ /**
29
+ * Selects which published library a pull resolves to when `--url` is absent.
30
+ *
31
+ * Unset or `latest` means the stable alias above. A build number
32
+ * (`connectors-library-2026.09.9`, or just `2026.09.9`) means that build's
33
+ * immutable copy under `versions/`.
34
+ *
35
+ * It is an environment variable, not only a flag, because the pull that
36
+ * matters is often not the one a person types. An agent following the skill
37
+ * runs a bare `uip maestro registry pull`, which would otherwise always resolve
38
+ * to the stable alias and repoint the shared cache at whatever is there. When
39
+ * the alias was overwritten with a 2-connector build on 2026-09-22, every such
40
+ * pull switched to it. With this set, a pinned environment (an eval image, a CI
41
+ * job) stays on the build it chose, whoever runs the pull.
42
+ */
43
+ export const CONNECTORS_LIBRARY_VERSION_ENV = "CONNECTORS_LIBRARY_VERSION";
44
+ const BUILD_NUMBER = /^(?:connectors-library-)?(\d{4}\.\d{2}\.\d+)$/;
45
+ /**
46
+ * The archive URL a pull fetches: `--url` wins, then `CONNECTORS_LIBRARY_VERSION`,
47
+ * then the stable alias. A version that is not a build number is refused
48
+ * rather than guessed at, so a typo cannot fall back to "latest" silently.
49
+ */
50
+ export function connectorsLibraryUrl(argv, env = process.env) {
51
+ const explicit = value(argv, "--url");
52
+ if (explicit)
53
+ return explicit;
54
+ const version = env[CONNECTORS_LIBRARY_VERSION_ENV]?.trim();
55
+ if (!version || version.toLowerCase() === "latest")
56
+ return DEFAULT_URL;
57
+ const build = BUILD_NUMBER.exec(version);
58
+ if (!build) {
59
+ throw new Error(`${CONNECTORS_LIBRARY_VERSION_ENV}=${JSON.stringify(version)} is not a connectors library build. ` +
60
+ "Use \"latest\" or a build number such as connectors-library-2026.09.9 " +
61
+ `(the folders under ${VERSIONS_URL}/).`);
62
+ }
63
+ return `${VERSIONS_URL}/connectors-library-${build[1]}/library-json.zip`;
64
+ }
26
65
  /** Provenance for a cache entry, written inside its library-json. */
27
66
  const SOURCE_FILE = ".registry-source.json";
28
67
  const USAGE = [
@@ -30,6 +69,9 @@ const USAGE = [
30
69
  " [--library <dir>] [--library-md <dir>]",
31
70
  " [--url <url>] [--archive <zip>] [--force]",
32
71
  " [--import <specifier>] [--triggers <path>] [--root <prefix>]",
72
+ "",
73
+ 'Without --url, CONNECTORS_LIBRARY_VERSION selects the library: unset or "latest" for',
74
+ "the current published build, or a build number such as connectors-library-2026.09.9.",
33
75
  ].join("\n");
34
76
  /** Flags from the Python era, accepted for one release and ignored. */
35
77
  const IGNORED = ["--python", "--extractor", "--generator"];
@@ -111,7 +153,11 @@ async function resolveArchive(argv, cacheDir, force) {
111
153
  }
112
154
  return { path: local };
113
155
  }
114
- const url = value(argv, "--url") ?? DEFAULT_URL;
156
+ const url = connectorsLibraryUrl(argv);
157
+ if (url !== DEFAULT_URL) {
158
+ // Said every time, so a pinned pull is visible in any log that captured it.
159
+ console.error(`registry pull: library from ${url}`);
160
+ }
115
161
  warnAboutProxy();
116
162
  const checksumResponse = await fetch(`${url}.sha256`);
117
163
  if (!checksumResponse.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.5.1",
3
+ "version": "6.6.1",
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",
@@ -87,5 +87,5 @@
87
87
  "@types/node": "^22.7.0",
88
88
  "esbuild": "^0.28.1"
89
89
  },
90
- "gitref": "36199b5fb7b1c265f284595f177884008e404a4f"
90
+ "gitref": "cd125317bcecb3a004dfe47cf11ef6b9878fe331"
91
91
  }