@uipath/cli 1.205.0-preview.276 → 1.206.0-preview.279

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-q6fp9ccp.js +23 -0
  4. package/dist/contentStore-c51xqdn2.js +41 -0
  5. package/dist/environmentInfo-fn0za9jw.js +71 -0
  6. package/dist/feedbackPrompts-t1enxv1x.js +144 -0
  7. package/dist/handlers-93z27zrr.js +805 -0
  8. package/dist/index-16d4evd1.js +1051 -0
  9. package/dist/index-1vyte4ma.js +14 -0
  10. package/dist/index-21kns9qg.js +10 -0
  11. package/dist/{index-yhj4pgvt.js → index-2j7ss97f.js} +331 -2595
  12. package/dist/index-2k8rhmad.js +274 -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-68xmrb9x.js +237 -0
  18. package/dist/index-6wj58qka.js +59 -0
  19. package/dist/index-898c4tfz.js +668 -0
  20. package/dist/index-8gr7ny79.js +365 -0
  21. package/dist/index-99emfvtm.js +13 -0
  22. package/dist/{index-pj3g8ftz.js → index-9db5vwx9.js} +2429 -1693
  23. package/dist/index-ayg25v46.js +151 -0
  24. package/dist/index-bf0e4evz.js +6180 -0
  25. package/dist/index-bpqx6f8h.js +92 -0
  26. package/dist/index-bpxh3fqv.js +392 -0
  27. package/dist/index-cc653qc1.js +1327 -0
  28. package/dist/{index-m5nwse9v.js → index-cj4v0jct.js} +21 -69
  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-yb4er9vd.js → index-jjejkkg4.js} +474 -528
  32. package/dist/index-kg1xrq51.js +171 -0
  33. package/dist/index-m8vqyv3g.js +72 -0
  34. package/dist/index-mzqm6xfh.js +45 -0
  35. package/dist/index-nsrrst23.js +44 -0
  36. package/dist/{index-h8cph72k.js → index-nzr4mx5p.js} +2 -22
  37. package/dist/index-p9s0gyrw.js +72 -0
  38. package/dist/index-qadhm1gn.js +271 -0
  39. package/dist/index-qwbyt2q5.js +95 -0
  40. package/dist/index-rbna3w6k.js +200 -0
  41. package/dist/index-rr5hdtcy.js +95 -0
  42. package/dist/{index-qa9gftnj.js → index-xd2w5pct.js} +3 -3
  43. package/dist/index-xpdtagqw.js +30 -0
  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-hxbzt92e.js +13 -0
  57. package/dist/{server-nfjr7xrb.js → server-gkr3c7hv.js} +28 -43
  58. package/dist/skillCatalog-fvw4wgw1.js +22 -0
  59. package/dist/skillsService-20es18vs.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-pq7pkd42.js +522 -0
  64. package/dist/updateService.skills-4t1s7z45.js +22 -0
  65. package/dist/updateService.tools-f7tr6kc6.js +16 -0
  66. package/package.json +2 -2
  67. package/dist/cli-r7998zeh.js +0 -19
  68. package/dist/index-0gctz400.js +0 -17
  69. package/dist/index-2dp7m4r8.js +0 -9867
  70. package/dist/index-4cq44eth.js +0 -19427
  71. package/dist/index-7tshyfxx.js +0 -157
  72. package/dist/index-g8ck9tv6.js +0 -2
  73. package/dist/index-ngs0a2he.js +0 -15
  74. package/dist/index-yc4kw997.js +0 -13
  75. package/dist/js-yaml-69tsdrrf.js +0 -37
  76. package/dist/updateService-nrmb1tsc.js +0 -14
@@ -0,0 +1,30 @@
1
+ import {
2
+ dist_default
3
+ } from "./index-5j0bfd3e.js";
4
+ import {
5
+ ALL_AGENTS,
6
+ AGENT_DISPLAY_NAMES,
7
+ AGENT_DEFS,
8
+ getSkillsDestinationHint
9
+ } from "./index-898c4tfz.js";
10
+
11
+ // src/commands/skills/prompt.ts
12
+ async function promptAgentSelection2(operation, isLocal, preselected = [], isDefaultSource = true) {
13
+ const visible = ALL_AGENTS.filter((a) => !(isLocal && isDefaultSource && AGENT_DEFS[a].globalOnly));
14
+ const preselectedSet = new Set(preselected);
15
+ return dist_default({
16
+ message: `Select agents to ${operation} skills for`,
17
+ choices: visible.map((a) => ({
18
+ name: AGENT_DISPLAY_NAMES[a],
19
+ value: a,
20
+ description: getSkillsDestinationHint(a, isLocal),
21
+ checked: preselectedSet.has(a)
22
+ })),
23
+ required: true,
24
+ shortcuts: { all: "a", invert: "i" }
25
+ });
26
+ }
27
+
28
+ export { promptAgentSelection2 };
29
+
30
+ //# debugId=ECCC92788B3ABC3A64756E2164756E21
@@ -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
@@ -1,9 +1,5 @@
1
- import {
2
- __require
3
- } from "./index-1yh8g550.js";
4
-
5
1
  // ../filesystem/src/node.ts
6
- import { randomUUID } from "node:crypto";
2
+ import { createHash, randomUUID } from "node:crypto";
7
3
  import { existsSync } from "node:fs";
8
4
  import * as fs from "node:fs/promises";
9
5
  import * as os from "node:os";
@@ -14,6 +10,9 @@ var LOCK_MAX_WAIT_MS = 20000;
14
10
  var LOCK_MAX_HOLD_MS = 60000;
15
11
  var LOCK_RETRY_MIN_MS = 100;
16
12
  var LOCK_RETRY_JITTER_MS = 200;
13
+ var HASH_CHUNK_BYTES = 256 * 1024;
14
+ var hashBuffers = [];
15
+ var HASH_BUFFERS_KEPT = 64;
17
16
 
18
17
  class NodeFileSystem {
19
18
  path = {
@@ -32,7 +31,7 @@ class NodeFileSystem {
32
31
  };
33
32
  utils = {
34
33
  open: async (url) => {
35
- const { default: open } = await import("./index-h8cph72k.js");
34
+ const { default: open } = await import("./index-nzr4mx5p.js");
36
35
  await open(url);
37
36
  }
38
37
  };
@@ -71,6 +70,15 @@ class NodeFileSystem {
71
70
  throw error;
72
71
  }
73
72
  }
73
+ async readdirEntries(dirPath) {
74
+ try {
75
+ return await fs.readdir(dirPath, { withFileTypes: true });
76
+ } catch (error) {
77
+ if (this.isEnoent(error))
78
+ return [];
79
+ throw error;
80
+ }
81
+ }
74
82
  async stat(filePath) {
75
83
  try {
76
84
  const stats = await fs.stat(filePath);
@@ -78,7 +86,8 @@ class NodeFileSystem {
78
86
  isFile: () => stats.isFile(),
79
87
  isDirectory: () => stats.isDirectory(),
80
88
  size: stats.size,
81
- mtimeMs: stats.mtimeMs
89
+ mtimeMs: stats.mtimeMs,
90
+ ctimeMs: stats.ctimeMs
82
91
  };
83
92
  } catch (error) {
84
93
  if (this.isEnoent(error))
@@ -192,6 +201,42 @@ class NodeFileSystem {
192
201
  throw error;
193
202
  }
194
203
  }
204
+ async hashFile(filePath) {
205
+ let handle;
206
+ try {
207
+ handle = await fs.open(filePath, "r");
208
+ } catch (error) {
209
+ if (this.isEnoent(error))
210
+ return null;
211
+ throw error;
212
+ }
213
+ const buffer = hashBuffers.pop() ?? Buffer.allocUnsafe(HASH_CHUNK_BYTES);
214
+ try {
215
+ const opened = await handle.stat();
216
+ const stats = {
217
+ isFile: () => opened.isFile(),
218
+ isDirectory: () => opened.isDirectory(),
219
+ size: opened.size,
220
+ mtimeMs: opened.mtimeMs,
221
+ ctimeMs: opened.ctimeMs
222
+ };
223
+ const hash = createHash("sha256");
224
+ let size = 0;
225
+ for (;; ) {
226
+ const { bytesRead } = await handle.read(buffer, 0, buffer.byteLength, null);
227
+ if (bytesRead === 0)
228
+ break;
229
+ hash.update(buffer.subarray(0, bytesRead));
230
+ size += bytesRead;
231
+ }
232
+ return { sha256: hash.digest("hex"), size, stats };
233
+ } finally {
234
+ if (hashBuffers.length < HASH_BUFFERS_KEPT) {
235
+ hashBuffers.push(buffer);
236
+ }
237
+ await handle.close();
238
+ }
239
+ }
195
240
  async realpath(filePath) {
196
241
  try {
197
242
  return await fs.realpath(filePath);
@@ -240,10 +285,9 @@ class NodeFileSystem {
240
285
 
241
286
  // ../filesystem/src/index.ts
242
287
  var fsInstance = new NodeFileSystem;
243
- var setFileSystem = (_fs) => () => {};
244
- var getFileSystem = () => fsInstance;
245
- var getFileSystemAsync = async () => fsInstance;
288
+ var getFileSystem2 = () => fsInstance;
289
+ var getFileSystemAsync2 = async () => fsInstance;
246
290
 
247
- export { NodeFileSystem, setFileSystem, getFileSystem, getFileSystemAsync };
291
+ export { getFileSystem2, getFileSystemAsync2 };
248
292
 
249
- //# debugId=1DD0126610F78D8964756E2164756E21
293
+ //# debugId=69A68E101956586864756E2164756E21
@@ -0,0 +1,14 @@
1
+ // ../auth/src/utils/platform.ts
2
+ function isBrowser2() {
3
+ return typeof globalThis !== "undefined" && "window" in globalThis && "document" in globalThis;
4
+ }
5
+ function getGlobalThis() {
6
+ if (typeof globalThis !== "undefined") {
7
+ return globalThis;
8
+ }
9
+ return;
10
+ }
11
+
12
+ export { isBrowser2, getGlobalThis };
13
+
14
+ //# debugId=BB900EA7514A888D64756E2164756E21
package/dist/index.js CHANGED
@@ -1,37 +1,41 @@
1
1
  #!/usr/bin/env node
2
+ import"./index-z070caqq.js";
2
3
  import {
3
- runNode
4
- } from "./index-yhj4pgvt.js";
5
- import {
6
- registerRobotClientLoader
7
- } from "./index-30618bjs.js";
8
- import {
9
- ensureSystemCaTrustAsync
10
- } from "./index-2dp7m4r8.js";
11
- import {
12
- TELEMETRY_DRAIN_ARGV,
13
- configureLogger,
14
- createPollAbortController,
15
- getExitCode,
16
- installConsoleGuard,
17
4
  logger,
5
+ configureLogger,
6
+ recordHostExit,
18
7
  makeTrackedFetch,
19
- setExitCode,
20
- setProcessContextPollSignal,
21
8
  setProxyAuthHttpsAgent,
22
- setTelemetrySidecarEntry
23
- } from "./index-pj3g8ftz.js";
24
- import"./index-g8ck9tv6.js";
25
- import"./index-4cq44eth.js";
26
- import"./index-d3w0wn6k.js";
27
- import"./index-0gctz400.js";
28
- import"./index-qa9gftnj.js";
29
- import"./index-hdxtgckw.js";
30
- import"./index-yc4kw997.js";
9
+ TELEMETRY_DRAIN_ARGV,
10
+ setTelemetrySidecarEntry,
11
+ setProcessContextPollSignal,
12
+ installConsoleGuard,
13
+ createPollAbortController
14
+ } from "./index-9db5vwx9.js";
15
+ import"./index-99emfvtm.js";
31
16
  import {
32
- __require,
33
- __toESM
34
- } from "./index-1yh8g550.js";
17
+ registerRobotClientLoader2
18
+ } from "./index-2mm750yx.js";
19
+ import {
20
+ runNode
21
+ } from "./index-2j7ss97f.js";
22
+ import"./index-qadhm1gn.js";
23
+ import"./index-bpxh3fqv.js";
24
+ import"./index-68xmrb9x.js";
25
+ import"./index-898c4tfz.js";
26
+ import {
27
+ ensureSystemCaTrustAsync
28
+ } from "./index-qwbyt2q5.js";
29
+ import"./index-16d4evd1.js";
30
+ import"./index-kg1xrq51.js";
31
+ import"./index-mzqm6xfh.js";
32
+ import"./index-6wj58qka.js";
33
+ import"./index-bpqx6f8h.js";
34
+ import"./index-ayg25v46.js";
35
+ import {
36
+ __toESM,
37
+ __require
38
+ } from "./index-epsr41wx.js";
35
39
 
36
40
  // src/suppress-dep-warnings.ts
37
41
  var originalEmitWarning = process.emitWarning;
@@ -54,7 +58,7 @@ if (typeof realFetch === "function") {
54
58
  }
55
59
 
56
60
  // src/register-robot-client.ts
57
- registerRobotClientLoader(() => import("./index-622x1qb5.js").then((m)=>__toESM(m.default,1)));
61
+ registerRobotClientLoader2(() => import("./index-3fvbddpw.js").then((m)=>__toESM(m.default,1)));
58
62
 
59
63
  // src/proxy-support.ts
60
64
  var hasProxy = process.env.HTTP_PROXY || process.env.HTTPS_PROXY || process.env.http_proxy || process.env.https_proxy;
@@ -64,7 +68,7 @@ function isModuleNotFound(e) {
64
68
  async function setUpIntegratedProxyAuth() {
65
69
  let undici;
66
70
  try {
67
- undici = await import("./index-yb4er9vd.js");
71
+ undici = await import("./index-jjejkkg4.js");
68
72
  } catch (e) {
69
73
  if (isModuleNotFound(e)) {
70
74
  undici = undefined;
@@ -72,7 +76,7 @@ async function setUpIntegratedProxyAuth() {
72
76
  throw e;
73
77
  }
74
78
  }
75
- const { installIntegratedProxyAuth } = await import("./index-469jgr1w.js");
79
+ const { installIntegratedProxyAuth } = await import("./index-dsj3jrm0.js");
76
80
  const result = await installIntegratedProxyAuth(undici);
77
81
  if (result.status === "installed") {
78
82
  setProxyAuthHttpsAgent(result.httpsAgent);
@@ -143,9 +147,7 @@ var run = async (args) => {
143
147
  isInteractive: process.stdout.isTTY ?? false
144
148
  },
145
149
  exit: (code) => {
146
- if (code !== 0 || getExitCode() === 0) {
147
- setExitCode(code);
148
- }
150
+ recordHostExit(code);
149
151
  },
150
152
  capabilities: {
151
153
  isBrowser: false
@@ -160,7 +162,7 @@ var isMain = __require.main == __require.module ?? process.argv[1] === currentFi
160
162
  if (isMain) {
161
163
  setTelemetrySidecarEntry(currentFile);
162
164
  if (process.argv[2] === TELEMETRY_DRAIN_ARGV) {
163
- const { drainPendingTelemetry } = await import("./telemetry-drain-r92f0e4r.js");
165
+ const { drainPendingTelemetry } = await import("./telemetry-drain-bw59e8f5.js");
164
166
  await drainPendingTelemetry();
165
167
  process.exit(0);
166
168
  }
@@ -171,4 +173,4 @@ export {
171
173
  run
172
174
  };
173
175
 
174
- //# debugId=91184DEA89EACF1D64756E2164756E21
176
+ //# debugId=629241929F9AB3BC64756E2164756E21