@uipath/maestro-builder-sdk 6.5.1 → 6.6.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.
@@ -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.0",
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": "fde2e4ef67894bab9ddb61be204f4d0775c08ea1"
91
91
  }