@uipath/cli 1.205.0-preview.281 → 1.206.0-preview.282

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 (76) hide show
  1. package/dist/{applicationinsights-s28k1t0d.js → applicationinsights-pwe8sf3y.js} +1269 -1269
  2. package/dist/{browser-strategy-6atc7v8s.js → browser-strategy-p5fhwxqj.js} +6 -7
  3. package/dist/cli-s27j1n5p.js +23 -0
  4. package/dist/contentStore-m1z06vbp.js +41 -0
  5. package/dist/environmentInfo-687282b3.js +71 -0
  6. package/dist/feedbackPrompts-t1enxv1x.js +144 -0
  7. package/dist/handlers-93z27zrr.js +805 -0
  8. package/dist/index-090cbg51.js +72 -0
  9. package/dist/index-16d4evd1.js +1051 -0
  10. package/dist/index-1vyte4ma.js +14 -0
  11. package/dist/index-1z45q8dr.js +365 -0
  12. package/dist/index-21kns9qg.js +10 -0
  13. package/dist/{index-30618bjs.js → index-2mm750yx.js} +174 -234
  14. package/dist/{index-622x1qb5.js → index-3fvbddpw.js} +7092 -7092
  15. package/dist/{index-d3w0wn6k.js → index-5gce5wfd.js} +16 -16
  16. package/dist/index-5j0bfd3e.js +4744 -0
  17. package/dist/index-5r4q8h0q.js +30 -0
  18. package/dist/index-68xmrb9x.js +237 -0
  19. package/dist/index-6wj58qka.js +59 -0
  20. package/dist/index-99emfvtm.js +13 -0
  21. package/dist/{index-pj3g8ftz.js → index-9db5vwx9.js} +2429 -1693
  22. package/dist/index-ayg25v46.js +151 -0
  23. package/dist/index-bf0e4evz.js +6180 -0
  24. package/dist/index-bpqx6f8h.js +92 -0
  25. package/dist/index-bpxh3fqv.js +392 -0
  26. package/dist/index-c6fsnn8s.js +200 -0
  27. package/dist/{index-m5nwse9v.js → index-cj4v0jct.js} +21 -69
  28. package/dist/index-ckafghar.js +274 -0
  29. package/dist/{index-469jgr1w.js → index-dsj3jrm0.js} +105 -106
  30. package/dist/{index-1yh8g550.js → index-epsr41wx.js} +8 -12
  31. package/dist/index-gbdz3pb5.js +668 -0
  32. package/dist/{index-yb4er9vd.js → index-jjejkkg4.js} +474 -528
  33. package/dist/index-jmz7bmca.js +1327 -0
  34. package/dist/{index-wwyf05nx.js → index-k9t8g78x.js} +331 -2595
  35. package/dist/index-kg1xrq51.js +171 -0
  36. package/dist/index-m8vqyv3g.js +72 -0
  37. package/dist/index-nht90rae.js +45 -0
  38. package/dist/index-nsrrst23.js +44 -0
  39. package/dist/{index-h8cph72k.js → index-nzr4mx5p.js} +2 -22
  40. package/dist/index-qadhm1gn.js +271 -0
  41. package/dist/index-qwbyt2q5.js +95 -0
  42. package/dist/index-rr5hdtcy.js +95 -0
  43. package/dist/{index-qa9gftnj.js → index-xd2w5pct.js} +3 -3
  44. package/dist/{index-925304r7.js → index-y085rpen.js} +29 -25
  45. package/dist/index-y5ncb93a.js +240 -0
  46. package/dist/index-y7d0cth0.js +93 -0
  47. package/dist/{index-hdxtgckw.js → index-z070caqq.js} +56 -12
  48. package/dist/index-zdqbp34f.js +14 -0
  49. package/dist/index.js +38 -36
  50. package/dist/install-3gw33jcf.js +558 -0
  51. package/dist/{jmespath-e4a59c8w.js → jmespath-ab6tdc42.js} +1 -1
  52. package/dist/js-yaml-0c4svjwq.js +36 -0
  53. package/dist/{mcp-jssaz3wr.js → mcp-s50h6d56.js} +236 -472
  54. package/dist/{node-strategy-ggx3nmyj.js → node-strategy-p1n8wr5s.js} +16 -19
  55. package/dist/project-context-285hydnd.js +94 -0
  56. package/dist/prompt-yxpm7mfr.js +13 -0
  57. package/dist/{server-7jza1fyx.js → server-900wc6vc.js} +28 -43
  58. package/dist/skillCatalog-d1t2qec8.js +22 -0
  59. package/dist/skillsService-tpvbx5g8.js +29 -0
  60. package/dist/{stdio-tmngemcz.js → stdio-kpsab5bz.js} +2 -4
  61. package/dist/{telemetry-drain-r92f0e4r.js → telemetry-drain-bw59e8f5.js} +8 -9
  62. package/dist/tree-j4w7p0pg.js +17 -0
  63. package/dist/updateService-mt6d51p1.js +522 -0
  64. package/dist/updateService.skills-491vfgt8.js +22 -0
  65. package/dist/updateService.tools-f7tr6kc6.js +16 -0
  66. package/package.json +2 -2
  67. package/dist/cli-kyp49kdm.js +0 -19
  68. package/dist/index-0gctz400.js +0 -17
  69. package/dist/index-4cq44eth.js +0 -19427
  70. package/dist/index-7tshyfxx.js +0 -157
  71. package/dist/index-g8ck9tv6.js +0 -2
  72. package/dist/index-ngs0a2he.js +0 -15
  73. package/dist/index-pr8kzdte.js +0 -9867
  74. package/dist/index-yc4kw997.js +0 -13
  75. package/dist/js-yaml-69tsdrrf.js +0 -37
  76. package/dist/updateService-t3yq8936.js +0 -14
@@ -0,0 +1,95 @@
1
+ import {
2
+ logger
3
+ } from "./index-9db5vwx9.js";
4
+
5
+ // src/system-ca.ts
6
+ function installSystemCaTrust(tlsModule) {
7
+ const getCertificates = tlsModule.getCACertificates;
8
+ const setDefaultCertificates = tlsModule.setDefaultCACertificates;
9
+ if (typeof getCertificates !== "function" || typeof setDefaultCertificates !== "function") {
10
+ return "unsupported";
11
+ }
12
+ try {
13
+ const system = getCertificates.call(tlsModule, "system");
14
+ if (!Array.isArray(system) || system.length === 0) {
15
+ return "empty";
16
+ }
17
+ const current = getCertificates.call(tlsModule, "default") ?? [];
18
+ setDefaultCertificates.call(tlsModule, [...current, ...system]);
19
+ return "applied";
20
+ } catch {
21
+ return "error";
22
+ }
23
+ }
24
+ var loadNodeTls = async () => await import("node:tls");
25
+ var cachedResult = "deferred";
26
+ var inFlight;
27
+ async function ensureSystemCaTrustAsync(loadTls = loadNodeTls) {
28
+ if (cachedResult !== "deferred") {
29
+ return cachedResult;
30
+ }
31
+ inFlight ??= (async () => {
32
+ cachedResult = installSystemCaTrust(await loadTls());
33
+ logger.debug(`OS certificate-store trust: ${cachedResult}`);
34
+ return cachedResult;
35
+ })();
36
+ return inFlight;
37
+ }
38
+ var NODE_USE_SYSTEM_CA_ENV = "NODE_USE_SYSTEM_CA";
39
+ function withSystemCaEnv(env = process.env) {
40
+ const alreadySet = Object.keys(env).some((key) => process.platform === "win32" ? key.toUpperCase() === NODE_USE_SYSTEM_CA_ENV : key === NODE_USE_SYSTEM_CA_ENV);
41
+ return alreadySet ? env : { ...env, [NODE_USE_SYSTEM_CA_ENV]: "1" };
42
+ }
43
+
44
+ // src/services/childEnv.ts
45
+ function mergeEnvCaseInsensitive(base, overrides) {
46
+ const overridden = new Set(Object.keys(overrides).map((key) => key.toLowerCase()));
47
+ const merged = {};
48
+ for (const [key, value] of Object.entries(base)) {
49
+ if (!overridden.has(key.toLowerCase()))
50
+ merged[key] = value;
51
+ }
52
+ return { ...merged, ...overrides };
53
+ }
54
+
55
+ // src/services/registryTls.ts
56
+ var REGISTRY_TLS_INSTRUCTIONS = "The registry's TLS certificate is not trusted. This is usually a " + "corporate proxy that re-signs HTTPS with its own root CA. On Node " + "22.19+ / 24.6+ uip already lets npm trust the OS certificate store, so " + "either that CA is not in the OS store or this Node is older: upgrade " + "Node, or point NODE_EXTRA_CA_CERTS (or `cafile` in .npmrc) at the CA's " + "PEM file. Then re-run.";
57
+ var TLS_TRUST_CODES = new Set([
58
+ "SELF_SIGNED_CERT_IN_CHAIN",
59
+ "DEPTH_ZERO_SELF_SIGNED_CERT",
60
+ "UNABLE_TO_VERIFY_LEAF_SIGNATURE",
61
+ "UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
62
+ "UNABLE_TO_GET_ISSUER_CERT",
63
+ "CERT_UNTRUSTED"
64
+ ]);
65
+ var NPM_FETCH_RETRY_ENV = {
66
+ npm_config_fetch_retries: "2",
67
+ npm_config_fetch_retry_mintimeout: "2000",
68
+ npm_config_fetch_retry_maxtimeout: "8000"
69
+ };
70
+
71
+ class RegistryTlsError extends Error {
72
+ code;
73
+ instructions = REGISTRY_TLS_INSTRUCTIONS;
74
+ constructor(context, code) {
75
+ super(`${context}: the registry's TLS certificate is not trusted (${code})`);
76
+ this.code = code;
77
+ this.name = "RegistryTlsError";
78
+ }
79
+ }
80
+ function isRegistryTlsError(error) {
81
+ return error instanceof Error && error.name === "RegistryTlsError" && typeof error.code === "string";
82
+ }
83
+ function npmTlsErrorCode(stderr, stdout) {
84
+ const pattern = /(?:npm (?:error|ERR!) code |"code":\s*")([A-Z0-9_]+)/g;
85
+ for (const match of `${stderr}
86
+ ${stdout}`.matchAll(pattern)) {
87
+ if (TLS_TRUST_CODES.has(match[1]))
88
+ return match[1];
89
+ }
90
+ return;
91
+ }
92
+
93
+ export { ensureSystemCaTrustAsync, withSystemCaEnv, mergeEnvCaseInsensitive, REGISTRY_TLS_INSTRUCTIONS, NPM_FETCH_RETRY_ENV, RegistryTlsError, isRegistryTlsError, npmTlsErrorCode };
94
+
95
+ //# debugId=07F73CD766A13C9164756E2164756E21
@@ -0,0 +1,95 @@
1
+ import {
2
+ dist_default4
3
+ } from "./index-5j0bfd3e.js";
4
+ import {
5
+ isBrowser2
6
+ } from "./index-zdqbp34f.js";
7
+
8
+ // src/services/promptSelect.ts
9
+ var promptSelect = async (options, message) => {
10
+ try {
11
+ return await dist_default4({
12
+ message,
13
+ choices: options.map((name, value) => ({ name, value }))
14
+ });
15
+ } catch (error) {
16
+ if (error instanceof Error && error.name === "ExitPromptError") {
17
+ const cancellation = Object.assign(new Error("Selection cancelled by user"), {
18
+ exitCode: 130,
19
+ terminalSignal: "SIGINT"
20
+ });
21
+ cancellation.name = "ExitPromptError";
22
+ throw cancellation;
23
+ }
24
+ throw error;
25
+ }
26
+ };
27
+
28
+ // src/services/auth.ts
29
+ class NodeAuth {
30
+ async interactiveLogin(options) {
31
+ const { interactiveLogin } = await import("./index-y7d0cth0.js");
32
+ return await interactiveLogin({
33
+ ...options,
34
+ selectFromList: promptSelect
35
+ });
36
+ }
37
+ async clientCredentialsLogin(options) {
38
+ const { clientCredentialsLogin } = await import("./index-y7d0cth0.js");
39
+ return await clientCredentialsLogin(options);
40
+ }
41
+ async getLoginStatus(options) {
42
+ const { getLoginStatusAsync } = await import("./index-y7d0cth0.js");
43
+ return getLoginStatusAsync(options);
44
+ }
45
+ async fetchTenants(baseUrl, accessToken, organizationId) {
46
+ const { fetchTenantsAndOrganizations } = await import("./index-y7d0cth0.js");
47
+ return fetchTenantsAndOrganizations(baseUrl, accessToken, organizationId);
48
+ }
49
+ async saveTenantSelection(envFilePath, tenantName, tenantId) {
50
+ const { saveEnvFileAsync } = await import("./index-y7d0cth0.js");
51
+ await saveEnvFileAsync({
52
+ envPath: envFilePath,
53
+ data: {
54
+ UIPATH_TENANT_NAME: tenantName,
55
+ UIPATH_TENANT_ID: tenantId
56
+ },
57
+ merge: true
58
+ });
59
+ }
60
+ }
61
+
62
+ class BrowserAuth {
63
+ async interactiveLogin(options) {
64
+ const { interactiveLogin } = await import("./index-y7d0cth0.js");
65
+ return await interactiveLogin(options);
66
+ }
67
+ async clientCredentialsLogin(options) {
68
+ const { clientCredentialsLogin } = await import("./index-y7d0cth0.js");
69
+ return await clientCredentialsLogin(options);
70
+ }
71
+ async getLoginStatus(options) {
72
+ const { getLoginStatusAsync } = await import("./index-y7d0cth0.js");
73
+ return getLoginStatusAsync(options);
74
+ }
75
+ async fetchTenants(baseUrl, accessToken, organizationId) {
76
+ const { fetchTenantsAndOrganizations } = await import("./index-y7d0cth0.js");
77
+ return fetchTenantsAndOrganizations(baseUrl, accessToken, organizationId);
78
+ }
79
+ async saveTenantSelection(envFilePath, tenantName, tenantId) {
80
+ const { saveEnvFileAsync } = await import("./index-y7d0cth0.js");
81
+ await saveEnvFileAsync({
82
+ envPath: envFilePath,
83
+ data: {
84
+ UIPATH_TENANT_NAME: tenantName,
85
+ UIPATH_TENANT_ID: tenantId
86
+ },
87
+ merge: true
88
+ });
89
+ }
90
+ }
91
+ var auth = isBrowser2() ? new BrowserAuth : new NodeAuth;
92
+
93
+ export { auth };
94
+
95
+ //# debugId=3AC60F438922B2DA64756E2164756E21
@@ -2,7 +2,7 @@
2
2
  function isPromiseLike(value) {
3
3
  return value !== null && typeof value === "object" && typeof value.then === "function";
4
4
  }
5
- function catchError(fnOrPromise) {
5
+ function catchError2(fnOrPromise) {
6
6
  if (isPromiseLike(fnOrPromise)) {
7
7
  return settlePromiseLike(fnOrPromise);
8
8
  }
@@ -26,6 +26,6 @@ function settlePromiseLike(thenable) {
26
26
  ]);
27
27
  }
28
28
 
29
- export { catchError };
29
+ export { catchError2 };
30
30
 
31
- //# debugId=CD090F76722F72E364756E2164756E21
31
+ //# debugId=5BBFFF71F3FAF6A164756E2164756E21
@@ -1,24 +1,28 @@
1
1
  import {
2
- _enum,
2
+ _isoDateTime,
3
+ string,
4
+ ZodISODateTime,
5
+ number,
6
+ boolean,
3
7
  _null,
8
+ unknown,
4
9
  array,
5
- boolean,
6
- custom,
10
+ object,
11
+ looseObject,
12
+ union,
7
13
  discriminatedUnion,
8
- exports_iso,
9
14
  intersection,
15
+ record,
16
+ _enum,
10
17
  literal,
11
- looseObject,
12
- number,
13
- object,
14
18
  optional,
15
- preprocess,
16
- record,
17
- string,
18
- union,
19
- unknown
20
- } from "./index-4cq44eth.js";
21
-
19
+ custom,
20
+ preprocess
21
+ } from "./index-bf0e4evz.js";
22
+ // ../../node_modules/zod/v4/classic/iso.js
23
+ function datetime(params) {
24
+ return _isoDateTime(ZodISODateTime, params);
25
+ }
22
26
  // ../../node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
23
27
  var LATEST_PROTOCOL_VERSION = "2025-11-25";
24
28
  var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
@@ -81,15 +85,15 @@ var JSONRPCResultResponseSchema = object({
81
85
  }).strict();
82
86
  var isJSONRPCResultResponse = (value) => JSONRPCResultResponseSchema.safeParse(value).success;
83
87
  var ErrorCode;
84
- (function(ErrorCode2) {
85
- ErrorCode2[ErrorCode2["ConnectionClosed"] = -32000] = "ConnectionClosed";
86
- ErrorCode2[ErrorCode2["RequestTimeout"] = -32001] = "RequestTimeout";
87
- ErrorCode2[ErrorCode2["ParseError"] = -32700] = "ParseError";
88
- ErrorCode2[ErrorCode2["InvalidRequest"] = -32600] = "InvalidRequest";
89
- ErrorCode2[ErrorCode2["MethodNotFound"] = -32601] = "MethodNotFound";
90
- ErrorCode2[ErrorCode2["InvalidParams"] = -32602] = "InvalidParams";
91
- ErrorCode2[ErrorCode2["InternalError"] = -32603] = "InternalError";
92
- ErrorCode2[ErrorCode2["UrlElicitationRequired"] = -32042] = "UrlElicitationRequired";
88
+ (function(ErrorCode) {
89
+ ErrorCode[ErrorCode["ConnectionClosed"] = -32000] = "ConnectionClosed";
90
+ ErrorCode[ErrorCode["RequestTimeout"] = -32001] = "RequestTimeout";
91
+ ErrorCode[ErrorCode["ParseError"] = -32700] = "ParseError";
92
+ ErrorCode[ErrorCode["InvalidRequest"] = -32600] = "InvalidRequest";
93
+ ErrorCode[ErrorCode["MethodNotFound"] = -32601] = "MethodNotFound";
94
+ ErrorCode[ErrorCode["InvalidParams"] = -32602] = "InvalidParams";
95
+ ErrorCode[ErrorCode["InternalError"] = -32603] = "InternalError";
96
+ ErrorCode[ErrorCode["UrlElicitationRequired"] = -32042] = "UrlElicitationRequired";
93
97
  })(ErrorCode || (ErrorCode = {}));
94
98
  var JSONRPCErrorResponseSchema = object({
95
99
  jsonrpc: literal(JSONRPC_VERSION),
@@ -316,7 +320,7 @@ var RoleSchema = _enum(["user", "assistant"]);
316
320
  var AnnotationsSchema = object({
317
321
  audience: array(RoleSchema).optional(),
318
322
  priority: number().min(0).max(1).optional(),
319
- lastModified: exports_iso.datetime({ offset: true }).optional()
323
+ lastModified: datetime({ offset: true }).optional()
320
324
  });
321
325
  var ResourceSchema = object({
322
326
  ...BaseMetadataSchema.shape,
@@ -866,4 +870,4 @@ class UrlElicitationRequiredError extends McpError {
866
870
 
867
871
  export { LATEST_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, RELATED_TASK_META_KEY, isTaskAugmentedRequestParams, isJSONRPCRequest, isJSONRPCNotification, isJSONRPCResultResponse, ErrorCode, isJSONRPCErrorResponse, JSONRPCMessageSchema, EmptyResultSchema, CancelledNotificationSchema, InitializeRequestSchema, InitializedNotificationSchema, PingRequestSchema, ProgressNotificationSchema, CreateTaskResultSchema, TaskStatusNotificationSchema, GetTaskRequestSchema, GetTaskResultSchema, GetTaskPayloadRequestSchema, ListTasksRequestSchema, ListTasksResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, ListResourcesRequestSchema, ListResourceTemplatesRequestSchema, ReadResourceRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema, ListToolsRequestSchema, CallToolResultSchema, CallToolRequestSchema, LoggingLevelSchema, SetLevelRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, ElicitResultSchema, CompleteRequestSchema, assertCompleteRequestPrompt, assertCompleteRequestResourceTemplate, ListRootsResultSchema, McpError };
868
872
 
869
- //# debugId=3FBA7A8EBE79840B64756E2164756E21
873
+ //# debugId=A1769E243E6334F864756E2164756E21
@@ -0,0 +1,240 @@
1
+ import {
2
+ getFileSystem2
3
+ } from "./index-z070caqq.js";
4
+ import {
5
+ catchError,
6
+ logger
7
+ } from "./index-9db5vwx9.js";
8
+ import {
9
+ compareSemver,
10
+ resolveToolPackageName,
11
+ getEffectiveRegistry,
12
+ toolService
13
+ } from "./index-16d4evd1.js";
14
+ import {
15
+ pinnedPrefix,
16
+ formatVersionPin
17
+ } from "./index-qadhm1gn.js";
18
+ import {
19
+ getInstalledTools,
20
+ describeSearchedRegistry,
21
+ describeMissingLine,
22
+ describeDowngradeReason,
23
+ recordToolUpdateDate
24
+ } from "./index-kg1xrq51.js";
25
+
26
+ // src/services/updateService.tools.ts
27
+ var TOOLS_UPDATE_PHASES2 = {
28
+ Checking: "checking",
29
+ Installing: "installing"
30
+ };
31
+ function formatTargetLine(prefix) {
32
+ const trimmed = prefix.endsWith(".") ? prefix.slice(0, -1) : prefix;
33
+ return `${trimmed}.x`;
34
+ }
35
+ function buildToolUpdatePolicy(opts, cliVersionPrefix) {
36
+ const pin = opts.pin ?? null;
37
+ if (pin) {
38
+ const targetLine = formatTargetLine(pinnedPrefix(pin));
39
+ const renderedPin = formatVersionPin(pin);
40
+ return {
41
+ resolvedBy: "core.version",
42
+ targetLine,
43
+ reason: `Using core.version ${renderedPin}; tools resolve within ${targetLine}.`
44
+ };
45
+ }
46
+ const targetLine = formatTargetLine(cliVersionPrefix);
47
+ return {
48
+ resolvedBy: "cli-version",
49
+ targetLine,
50
+ reason: `Using CLI version line ${targetLine}; tools resolve within ${targetLine}.`
51
+ };
52
+ }
53
+ function withPolicy(entry, policy) {
54
+ const result = {
55
+ ...entry,
56
+ resolvedBy: policy.resolvedBy,
57
+ reason: policy.reason
58
+ };
59
+ if (policy.targetLine !== undefined) {
60
+ result.targetLine = policy.targetLine;
61
+ }
62
+ return result;
63
+ }
64
+ async function runToolsUpdate2(opts, state) {
65
+ const installed = getInstalledTools(state);
66
+ if (installed.length === 0) {
67
+ return {
68
+ entries: [],
69
+ fatal: {
70
+ code: "NO_TOOLS_INSTALLED",
71
+ result: "ConfigError",
72
+ message: "No tools installed.",
73
+ instructions: "Use 'uip tools install <package>' to install a tool."
74
+ }
75
+ };
76
+ }
77
+ const [locationError, location] = await catchError(state.resolveInstallPath());
78
+ if (locationError) {
79
+ return {
80
+ entries: [],
81
+ fatal: {
82
+ code: "LOCATION_ERROR",
83
+ result: "ConfigError",
84
+ message: locationError.message,
85
+ instructions: "Please ensure the CLI is installed correctly."
86
+ }
87
+ };
88
+ }
89
+ const resolvedName = opts.name ? resolveToolPackageName(opts.name) : undefined;
90
+ const toUpdate = resolvedName ? installed.filter((t) => t.name === resolvedName || `@uipath/${t.name}` === resolvedName) : installed;
91
+ if (resolvedName && toUpdate.length === 0) {
92
+ return {
93
+ entries: [],
94
+ fatal: {
95
+ code: "NAME_NOT_INSTALLED",
96
+ result: "ValidationError",
97
+ message: `Tool '${opts.name}' is not installed.`,
98
+ instructions: "Use 'uip tools list' to see installed tools."
99
+ }
100
+ };
101
+ }
102
+ const entries = [];
103
+ const previousVersions = new Map(toUpdate.map((t) => [t.name, t.version]));
104
+ const total = toUpdate.length;
105
+ const pin = opts.pin ?? null;
106
+ const cliVersionPrefix = opts.cliVersionPrefix ?? state.getCliVersionPrefix();
107
+ const policy = buildToolUpdatePolicy(opts, cliVersionPrefix);
108
+ let index = 0;
109
+ for (const tool of toUpdate) {
110
+ index++;
111
+ const fullName = `@uipath/${tool.name}`;
112
+ opts.onProgress?.({
113
+ current: index,
114
+ total,
115
+ tool: tool.name,
116
+ phase: TOOLS_UPDATE_PHASES2.Checking
117
+ });
118
+ const [updateError] = await catchError((async () => {
119
+ const prefix = pin ? pinnedPrefix(pin) : cliVersionPrefix;
120
+ const targetVersion = await toolService.searchLatestVersion(fullName, prefix, { channel: opts.channel });
121
+ if (!targetVersion) {
122
+ const searched = await getEffectiveRegistry(fullName);
123
+ entries.push(withPolicy({
124
+ name: tool.name,
125
+ status: "failed",
126
+ from: tool.version,
127
+ error: pin ? describeMissingLine({
128
+ pin,
129
+ origin: opts.pinOrigin,
130
+ targetLine: formatTargetLine(prefix),
131
+ searched
132
+ }) : `No compatible ${opts.channel} version found in the CLI's ${formatTargetLine(prefix)} line${describeSearchedRegistry(searched)}`,
133
+ errorKind: pin ? "pinned-line-missing" : undefined,
134
+ ...searched ? { searchedRegistry: searched } : {}
135
+ }, policy));
136
+ return;
137
+ }
138
+ const currentVersion = tool.version;
139
+ if (currentVersion === targetVersion) {
140
+ entries.push(withPolicy({
141
+ name: tool.name,
142
+ status: "up-to-date",
143
+ from: currentVersion,
144
+ to: currentVersion
145
+ }, policy));
146
+ return;
147
+ }
148
+ if (pin && compareSemver(targetVersion, currentVersion) < 0) {
149
+ logger.info(`Downgrading ${tool.name} ${currentVersion} → ${targetVersion} to match ${describeDowngradeReason(opts.pinOrigin)}.`);
150
+ }
151
+ if (opts.dryRun) {
152
+ entries.push(withPolicy({
153
+ name: tool.name,
154
+ status: "updated",
155
+ from: currentVersion,
156
+ to: targetVersion
157
+ }, policy));
158
+ return;
159
+ }
160
+ opts.onProgress?.({
161
+ current: index,
162
+ total,
163
+ tool: tool.name,
164
+ phase: TOOLS_UPDATE_PHASES2.Installing
165
+ });
166
+ const packageName = `${fullName}@${targetVersion}`;
167
+ await toolService.install(packageName, location.path, {
168
+ global: location.global,
169
+ prefix: location.prefix
170
+ });
171
+ })());
172
+ if (updateError) {
173
+ entries.push(withPolicy({
174
+ name: tool.name,
175
+ status: "failed",
176
+ from: previousVersions.get(tool.name),
177
+ error: updateError.message
178
+ }, policy));
179
+ }
180
+ }
181
+ if (opts.dryRun) {
182
+ return { entries, instructions: policy.reason };
183
+ }
184
+ const fs = getFileSystem2();
185
+ const updatedVersions = new Map;
186
+ for (const dir of state.toolsDirs) {
187
+ for (const tool of toUpdate) {
188
+ const name = tool.name;
189
+ if (updatedVersions.has(name))
190
+ continue;
191
+ const pkgPath = fs.path.join(dir, name, "package.json");
192
+ if (!await fs.exists(pkgPath))
193
+ continue;
194
+ const [readError, raw] = await catchError(fs.readFile(pkgPath, "utf-8"));
195
+ if (readError || !raw)
196
+ continue;
197
+ const [parseError, pkg] = catchError(() => JSON.parse(raw));
198
+ if (parseError || !pkg.version)
199
+ continue;
200
+ updatedVersions.set(name, pkg.version);
201
+ }
202
+ }
203
+ const recordedNames = new Set(entries.map((r) => r.name));
204
+ for (const tool of toUpdate) {
205
+ const name = tool.name;
206
+ if (recordedNames.has(name))
207
+ continue;
208
+ const from = previousVersions.get(name) ?? "unknown";
209
+ const to = updatedVersions.get(name) ?? from;
210
+ if (from === to) {
211
+ entries.push(withPolicy({
212
+ name,
213
+ status: "failed",
214
+ from,
215
+ to,
216
+ error: `Version unchanged after install (still ${from})`
217
+ }, policy));
218
+ } else {
219
+ entries.push(withPolicy({ name, status: "updated", from, to }, policy));
220
+ }
221
+ }
222
+ const failed = entries.filter((r) => r.status === "failed");
223
+ if (failed.length > 0) {
224
+ logger.debug(`Failed to update ${failed.length} tool(s): ${failed.map((f) => `${f.name}: ${f.error}`).join("; ")}`);
225
+ }
226
+ for (const entry of entries) {
227
+ if (entry.status !== "updated" && entry.status !== "up-to-date") {
228
+ continue;
229
+ }
230
+ const [markerErr, persisted] = await catchError(recordToolUpdateDate(entry.name));
231
+ if (markerErr || !persisted) {
232
+ logger.debug(`Could not persist the daily update marker for '${entry.name}'${markerErr ? `: ${markerErr.message}` : ""}`);
233
+ }
234
+ }
235
+ return { entries, instructions: policy.reason };
236
+ }
237
+
238
+ export { TOOLS_UPDATE_PHASES2, runToolsUpdate2 };
239
+
240
+ //# debugId=6B9F7D1C7C2243DB64756E2164756E21
@@ -0,0 +1,93 @@
1
+ import {
2
+ setAuthFileConfig2,
3
+ DEFAULT_AUTH_PROFILE2,
4
+ INHERITED_AUTH_PROFILE_ENV2,
5
+ AuthProfileValidationError2,
6
+ normalizeAuthProfileName2,
7
+ setActiveAuthProfile2,
8
+ getActiveAuthProfile2,
9
+ runWithAuthProfile2,
10
+ getActiveAuthProfileFilePath2,
11
+ listAuthProfileNamesAsync2,
12
+ authProfileExistsAsync2,
13
+ deleteAuthProfileAsync2,
14
+ parseJWT2,
15
+ parseAuthFlow2,
16
+ ENV_AUTH_ENABLE_VAR2,
17
+ ENV_AUTH_VARS2,
18
+ EnvAuthConfigError2,
19
+ isEnvAuthEnabled2,
20
+ readAuthFromEnv2,
21
+ registerRobotClientLoader2,
22
+ fetchTenantsAndOrganizations2,
23
+ AUTH_FLOW_ENV_VAR2,
24
+ DEFAULT_AUTH_FILENAME2,
25
+ DEFAULT_ENV_FILENAME2,
26
+ resolveEnvFileLocationAsync2,
27
+ resolveEnvFilePathAsync2,
28
+ loadEnvFileAsync2,
29
+ saveEnvFileAsync2,
30
+ CredentialSource2,
31
+ getLoginStatusAsync2,
32
+ describeAuthProfilesAsync2,
33
+ clientCredentialsLogin2,
34
+ isTenantSelectionError2,
35
+ interactiveLogin2,
36
+ logout2,
37
+ authenticate2
38
+ } from "./index-2mm750yx.js";
39
+ import {
40
+ isBrowser2
41
+ } from "./index-zdqbp34f.js";
42
+ import"./index-z070caqq.js";
43
+ import {
44
+ DEFAULT_AUTH_TIMEOUT_MS2,
45
+ AUTH_TIMEOUT_ERROR_CODE2,
46
+ AUTH_CANCELLED_ERROR_CODE2,
47
+ AUTH_RECLAIMED_ERROR_CODE2
48
+ } from "./index-99emfvtm.js";
49
+ export {
50
+ AUTH_CANCELLED_ERROR_CODE2 as AUTH_CANCELLED_ERROR_CODE,
51
+ AUTH_FLOW_ENV_VAR2 as AUTH_FLOW_ENV_VAR,
52
+ AUTH_RECLAIMED_ERROR_CODE2 as AUTH_RECLAIMED_ERROR_CODE,
53
+ AUTH_TIMEOUT_ERROR_CODE2 as AUTH_TIMEOUT_ERROR_CODE,
54
+ AuthProfileValidationError2 as AuthProfileValidationError,
55
+ CredentialSource2 as CredentialSource,
56
+ DEFAULT_AUTH_FILENAME2 as DEFAULT_AUTH_FILENAME,
57
+ DEFAULT_AUTH_PROFILE2 as DEFAULT_AUTH_PROFILE,
58
+ DEFAULT_AUTH_TIMEOUT_MS2 as DEFAULT_AUTH_TIMEOUT_MS,
59
+ DEFAULT_ENV_FILENAME2 as DEFAULT_ENV_FILENAME,
60
+ ENV_AUTH_ENABLE_VAR2 as ENV_AUTH_ENABLE_VAR,
61
+ ENV_AUTH_VARS2 as ENV_AUTH_VARS,
62
+ EnvAuthConfigError2 as EnvAuthConfigError,
63
+ INHERITED_AUTH_PROFILE_ENV2 as INHERITED_AUTH_PROFILE_ENV,
64
+ authProfileExistsAsync2 as authProfileExistsAsync,
65
+ authenticate2 as authenticate,
66
+ clientCredentialsLogin2 as clientCredentialsLogin,
67
+ deleteAuthProfileAsync2 as deleteAuthProfileAsync,
68
+ describeAuthProfilesAsync2 as describeAuthProfilesAsync,
69
+ fetchTenantsAndOrganizations2 as fetchTenantsAndOrganizations,
70
+ getActiveAuthProfile2 as getActiveAuthProfile,
71
+ getActiveAuthProfileFilePath2 as getActiveAuthProfileFilePath,
72
+ getLoginStatusAsync2 as getLoginStatusAsync,
73
+ interactiveLogin2 as interactiveLogin,
74
+ isBrowser2 as isBrowser,
75
+ isEnvAuthEnabled2 as isEnvAuthEnabled,
76
+ isTenantSelectionError2 as isTenantSelectionError,
77
+ listAuthProfileNamesAsync2 as listAuthProfileNamesAsync,
78
+ loadEnvFileAsync2 as loadEnvFileAsync,
79
+ logout2 as logout,
80
+ normalizeAuthProfileName2 as normalizeAuthProfileName,
81
+ parseAuthFlow2 as parseAuthFlow,
82
+ parseJWT2 as parseJWT,
83
+ readAuthFromEnv2 as readAuthFromEnv,
84
+ registerRobotClientLoader2 as registerRobotClientLoader,
85
+ resolveEnvFileLocationAsync2 as resolveEnvFileLocationAsync,
86
+ resolveEnvFilePathAsync2 as resolveEnvFilePathAsync,
87
+ runWithAuthProfile2 as runWithAuthProfile,
88
+ saveEnvFileAsync2 as saveEnvFileAsync,
89
+ setActiveAuthProfile2 as setActiveAuthProfile,
90
+ setAuthFileConfig2 as setAuthFileConfig
91
+ };
92
+
93
+ //# debugId=229181B84AFBC77464756E2164756E21