@uipath/rpa-legacy-tool 1.201.0 → 1.202.0-preview.136

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.
@@ -3,8 +3,8 @@ import {
3
3
  } from "./tool-0gctz400.js";
4
4
  import {
5
5
  AUTH_CANCELLED_ERROR_CODE
6
- } from "./tool-q42rrs00.js";
7
- import"./tool-0v6na3yp.js";
6
+ } from "./tool-yc4kw997.js";
7
+ import"./tool-1de529jm.js";
8
8
 
9
9
  // ../auth/src/strategies/browser-strategy.ts
10
10
  class BrowserAuthStrategy {
@@ -1,4 +1,4 @@
1
- import"./tool-0v6na3yp.js";
1
+ import"./tool-1de529jm.js";
2
2
 
3
3
  // ../../node_modules/@jmespath-community/jmespath/dist/index.mjs
4
4
  var isObject = (obj) => {
@@ -2027,32 +2027,32 @@ var jmespath = {
2027
2027
  TYPE_STRING
2028
2028
  };
2029
2029
  export {
2030
- unregisterFunction,
2031
- tokenize,
2032
- search,
2033
- registerFunction,
2034
- register,
2035
- jmespath,
2036
- isRegistered,
2037
- getRegisteredFunctions,
2038
- getCustomFunctions,
2039
- jmespath as default,
2040
- compile,
2041
- clearCustomFunctions,
2042
- TreeInterpreter2 as TreeInterpreter,
2043
- TYPE_STRING,
2044
- TYPE_OBJECT,
2045
- TYPE_NUMBER,
2046
- TYPE_NULL,
2047
- TYPE_EXPREF,
2048
- TYPE_BOOLEAN,
2049
- TYPE_ARRAY_STRING,
2050
- TYPE_ARRAY_OBJECT,
2051
- TYPE_ARRAY_NUMBER,
2052
- TYPE_ARRAY_ARRAY,
2053
- TYPE_ARRAY,
2030
+ Scope,
2054
2031
  TYPE_ANY,
2055
- Scope
2032
+ TYPE_ARRAY,
2033
+ TYPE_ARRAY_ARRAY,
2034
+ TYPE_ARRAY_NUMBER,
2035
+ TYPE_ARRAY_OBJECT,
2036
+ TYPE_ARRAY_STRING,
2037
+ TYPE_BOOLEAN,
2038
+ TYPE_EXPREF,
2039
+ TYPE_NULL,
2040
+ TYPE_NUMBER,
2041
+ TYPE_OBJECT,
2042
+ TYPE_STRING,
2043
+ TreeInterpreter2 as TreeInterpreter,
2044
+ clearCustomFunctions,
2045
+ compile,
2046
+ jmespath as default,
2047
+ getCustomFunctions,
2048
+ getRegisteredFunctions,
2049
+ isRegistered,
2050
+ jmespath,
2051
+ register,
2052
+ registerFunction,
2053
+ search,
2054
+ tokenize,
2055
+ unregisterFunction
2056
2056
  };
2057
2057
 
2058
- //# debugId=FA9FB28BF9A093C864756E2164756E21
2058
+ //# debugId=046020B702C7051664756E2164756E21
@@ -8,19 +8,20 @@ import {
8
8
  } from "./tool-qa9gftnj.js";
9
9
  import {
10
10
  getFileSystem
11
- } from "./tool-gs7x78kn.js";
11
+ } from "./tool-g0hcxnae.js";
12
12
  import {
13
13
  AUTH_CANCELLED_ERROR_CODE,
14
14
  AUTH_FILENAME,
15
+ AUTH_RECLAIMED_ERROR_CODE,
15
16
  AUTH_TIMEOUT_ERROR_CODE,
16
17
  DEFAULT_AUTH_TIMEOUT_MS,
17
18
  DEFAULT_BASE_URL,
18
19
  DEFAULT_REDIRECT_URI,
19
20
  UIPATH_HOME_DIR
20
- } from "./tool-q42rrs00.js";
21
+ } from "./tool-yc4kw997.js";
21
22
  import {
22
23
  __require
23
- } from "./tool-0v6na3yp.js";
24
+ } from "./tool-1de529jm.js";
24
25
 
25
26
  // ../auth/src/config.ts
26
27
  var DEFAULT_CLIENT_ID = "36dea5b8-e8bb-423d-8e7b-c808df8f1c00";
@@ -38,7 +39,7 @@ class InvalidBaseUrlError extends Error {
38
39
  super(`Invalid base URL: "${url}"
39
40
  ` + `Reason: ${reason}
40
41
 
41
- ` + `Expected format: an https:// URL, e.g. https://cloud.uipath.com (commercial), https://govcloud.uipath.us (Public Sector), or your Automation Suite host (https://<your-host>).
42
+ ` + `Expected format: an https:// URL (or bare host — https:// is assumed), e.g. https://cloud.uipath.com (commercial), https://govcloud.uipath.us (Public Sector), or your Automation Suite host (https://<your-host>).
42
43
  ` + `You can specify the URL via:
43
44
  ` + ` • --authority flag
44
45
  ` + ` • UIPATH_URL environment variable
@@ -59,10 +60,16 @@ var normalizeAndValidateBaseUrl = (rawUrl) => {
59
60
  while (baseUrl.endsWith("/")) {
60
61
  baseUrl = baseUrl.slice(0, -1);
61
62
  }
63
+ const hasScheme = /^[a-z][a-z0-9+.-]*:\/\//i.test(baseUrl);
64
+ const [hostCandidate] = baseUrl.split(/[/?#]/, 1);
65
+ if (!hasScheme && hostCandidate.includes(".")) {
66
+ baseUrl = `https://${baseUrl}`;
67
+ }
62
68
  const resolvedBaseUrl = baseUrl;
63
69
  const [urlError, url] = catchError(() => new URL(resolvedBaseUrl));
64
70
  if (urlError) {
65
- throw new InvalidBaseUrlError(baseUrl, `Malformed URL. ${urlError instanceof Error ? urlError.message : "Unknown error"}`);
71
+ const shapeHint = !hasScheme && !hostCandidate.includes(".") ? ` "${rawUrl.trim()}" is not a URL or a host name. Pass the full authority URL — https://<host>, or just <host> (https:// is assumed).` : ` ${urlError instanceof Error ? urlError.message : "Unknown error"}`;
72
+ throw new InvalidBaseUrlError(baseUrl, `Malformed URL.${shapeHint}`);
66
73
  }
67
74
  if (url.protocol !== "https:") {
68
75
  throw new InvalidBaseUrlError(baseUrl, `Authority must use https:// scheme, got ${url.protocol}//. OIDC token exchange requires TLS end-to-end.`);
@@ -196,17 +203,6 @@ function b64u(input) {
196
203
  }
197
204
  return encodeBase64Url(input);
198
205
  }
199
-
200
- class UnsupportedOperationError extends Error {
201
- code;
202
- constructor(message, options) {
203
- super(message, options);
204
- this.name = this.constructor.name;
205
- this.code = UNSUPPORTED_OPERATION;
206
- Error.captureStackTrace?.(this, this.constructor);
207
- }
208
- }
209
-
210
206
  class OperationProcessingError extends Error {
211
207
  code;
212
208
  constructor(message, options) {
@@ -221,60 +217,6 @@ class OperationProcessingError extends Error {
221
217
  function OPE(message, code, cause) {
222
218
  return new OperationProcessingError(message, { code, cause });
223
219
  }
224
- async function calculateJwkThumbprint(jwk) {
225
- let components;
226
- switch (jwk.kty) {
227
- case "EC":
228
- components = {
229
- crv: jwk.crv,
230
- kty: jwk.kty,
231
- x: jwk.x,
232
- y: jwk.y
233
- };
234
- break;
235
- case "OKP":
236
- components = {
237
- crv: jwk.crv,
238
- kty: jwk.kty,
239
- x: jwk.x
240
- };
241
- break;
242
- case "AKP":
243
- components = {
244
- alg: jwk.alg,
245
- kty: jwk.kty,
246
- pub: jwk.pub
247
- };
248
- break;
249
- case "RSA":
250
- components = {
251
- e: jwk.e,
252
- kty: jwk.kty,
253
- n: jwk.n
254
- };
255
- break;
256
- default:
257
- throw new UnsupportedOperationError("unsupported JWK key type", { cause: jwk });
258
- }
259
- return b64u(await crypto.subtle.digest("SHA-256", buf(JSON.stringify(components))));
260
- }
261
- function assertCryptoKey(key, it) {
262
- if (!(key instanceof CryptoKey)) {
263
- throw CodedTypeError(`${it} must be a CryptoKey`, ERR_INVALID_ARG_TYPE);
264
- }
265
- }
266
- function assertPrivateKey(key, it) {
267
- assertCryptoKey(key, it);
268
- if (key.type !== "private") {
269
- throw CodedTypeError(`${it} must be a private CryptoKey`, ERR_INVALID_ARG_VALUE);
270
- }
271
- }
272
- function assertPublicKey(key, it) {
273
- assertCryptoKey(key, it);
274
- if (key.type !== "public") {
275
- throw CodedTypeError(`${it} must be a public CryptoKey`, ERR_INVALID_ARG_VALUE);
276
- }
277
- }
278
220
  function assertString(input, it, code, cause) {
279
221
  try {
280
222
  if (typeof input !== "string") {
@@ -303,72 +245,6 @@ async function calculatePKCECodeChallenge(codeVerifier) {
303
245
  assertString(codeVerifier, "codeVerifier");
304
246
  return b64u(await crypto.subtle.digest("SHA-256", buf(codeVerifier)));
305
247
  }
306
- function psAlg(key) {
307
- switch (key.algorithm.hash.name) {
308
- case "SHA-256":
309
- return "PS256";
310
- case "SHA-384":
311
- return "PS384";
312
- case "SHA-512":
313
- return "PS512";
314
- default:
315
- throw new UnsupportedOperationError("unsupported RsaHashedKeyAlgorithm hash name", {
316
- cause: key
317
- });
318
- }
319
- }
320
- function rsAlg(key) {
321
- switch (key.algorithm.hash.name) {
322
- case "SHA-256":
323
- return "RS256";
324
- case "SHA-384":
325
- return "RS384";
326
- case "SHA-512":
327
- return "RS512";
328
- default:
329
- throw new UnsupportedOperationError("unsupported RsaHashedKeyAlgorithm hash name", {
330
- cause: key
331
- });
332
- }
333
- }
334
- function esAlg(key) {
335
- switch (key.algorithm.namedCurve) {
336
- case "P-256":
337
- return "ES256";
338
- case "P-384":
339
- return "ES384";
340
- case "P-521":
341
- return "ES512";
342
- default:
343
- throw new UnsupportedOperationError("unsupported EcKeyAlgorithm namedCurve", { cause: key });
344
- }
345
- }
346
- function keyToJws(key) {
347
- switch (key.algorithm.name) {
348
- case "RSA-PSS":
349
- return psAlg(key);
350
- case "RSASSA-PKCS1-v1_5":
351
- return rsAlg(key);
352
- case "ECDSA":
353
- return esAlg(key);
354
- case "Ed25519":
355
- case "ML-DSA-44":
356
- case "ML-DSA-65":
357
- case "ML-DSA-87":
358
- return key.algorithm.name;
359
- case "EdDSA":
360
- return "Ed25519";
361
- default:
362
- throw new UnsupportedOperationError("unsupported CryptoKey algorithm name", { cause: key });
363
- }
364
- }
365
- function getClockSkew(client) {
366
- const skew = client?.[clockSkew];
367
- return typeof skew === "number" && Number.isFinite(skew) ? skew : 0;
368
- }
369
- function epochTime() {
370
- return Math.floor(Date.now() / 1000);
371
- }
372
248
  function ClientSecretPost(clientSecret) {
373
249
  assertString(clientSecret, '"clientSecret"');
374
250
  return (_as, client, body, _headers) => {
@@ -381,27 +257,6 @@ function None() {
381
257
  body.set("client_id", client.client_id);
382
258
  };
383
259
  }
384
- async function signJwt(header, payload, key) {
385
- if (!key.usages.includes("sign")) {
386
- throw CodedTypeError('CryptoKey instances used for signing assertions must include "sign" in their "usages"', ERR_INVALID_ARG_VALUE);
387
- }
388
- const input = `${b64u(buf(JSON.stringify(header)))}.${b64u(buf(JSON.stringify(payload)))}`;
389
- const signature = b64u(await crypto.subtle.sign(keyToSubtle(key), key, buf(input)));
390
- return `${input}.${signature}`;
391
- }
392
- var jwkCache;
393
- async function getSetPublicJwkCache(key, alg) {
394
- const { kty, e, n, x, y, crv, pub } = await crypto.subtle.exportKey("jwk", key);
395
- const jwk = { kty, e, n, x, y, crv, pub };
396
- if (kty === "AKP")
397
- jwk.alg = alg;
398
- jwkCache.set(key, jwk);
399
- return jwk;
400
- }
401
- async function publicJwk(key, alg) {
402
- jwkCache ||= new WeakMap;
403
- return jwkCache.get(key) || getSetPublicJwkCache(key, alg);
404
- }
405
260
  var URLParse = URL.parse ? (url, base) => URL.parse(url, base) : (url, base) => {
406
261
  try {
407
262
  return new URL(url, base);
@@ -409,79 +264,6 @@ var URLParse = URL.parse ? (url, base) => URL.parse(url, base) : (url, base) =>
409
264
  return null;
410
265
  }
411
266
  };
412
- class DPoPHandler {
413
- #header;
414
- #privateKey;
415
- #publicKey;
416
- #clockSkew;
417
- #modifyAssertion;
418
- #map;
419
- #jkt;
420
- constructor(client, keyPair, options) {
421
- assertPrivateKey(keyPair?.privateKey, '"DPoP.privateKey"');
422
- assertPublicKey(keyPair?.publicKey, '"DPoP.publicKey"');
423
- if (!keyPair.publicKey.extractable) {
424
- throw CodedTypeError('"DPoP.publicKey.extractable" must be true', ERR_INVALID_ARG_VALUE);
425
- }
426
- this.#modifyAssertion = options?.[modifyAssertion];
427
- this.#clockSkew = getClockSkew(client);
428
- this.#privateKey = keyPair.privateKey;
429
- this.#publicKey = keyPair.publicKey;
430
- branded.add(this);
431
- }
432
- #get(key) {
433
- this.#map ||= new Map;
434
- let item = this.#map.get(key);
435
- if (item) {
436
- this.#map.delete(key);
437
- this.#map.set(key, item);
438
- }
439
- return item;
440
- }
441
- #set(key, val) {
442
- this.#map ||= new Map;
443
- this.#map.delete(key);
444
- if (this.#map.size === 100) {
445
- this.#map.delete(this.#map.keys().next().value);
446
- }
447
- this.#map.set(key, val);
448
- }
449
- async calculateThumbprint() {
450
- if (!this.#jkt) {
451
- const jwk = await crypto.subtle.exportKey("jwk", this.#publicKey);
452
- this.#jkt ||= await calculateJwkThumbprint(jwk);
453
- }
454
- return this.#jkt;
455
- }
456
- async addProof(url, headers, htm, accessToken) {
457
- const alg = keyToJws(this.#privateKey);
458
- this.#header ||= {
459
- alg,
460
- typ: "dpop+jwt",
461
- jwk: await publicJwk(this.#publicKey, alg)
462
- };
463
- const nonce = this.#get(url.origin);
464
- const now = epochTime() + this.#clockSkew;
465
- const payload = {
466
- iat: now,
467
- jti: randomBytes(),
468
- htm,
469
- nonce,
470
- htu: `${url.origin}${url.pathname}`,
471
- ath: accessToken ? b64u(await crypto.subtle.digest("SHA-256", buf(accessToken))) : undefined
472
- };
473
- this.#modifyAssertion?.(this.#header, payload);
474
- headers.set("dpop", await signJwt(this.#header, payload, this.#privateKey));
475
- }
476
- cacheNonce(response, url) {
477
- try {
478
- const nonce = response.headers.get("dpop-nonce");
479
- if (nonce) {
480
- this.#set(url.origin, nonce);
481
- }
482
- } catch {}
483
- }
484
- }
485
267
  var tokenMatch = "[a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+";
486
268
  var token68Match = "[a-zA-Z0-9\\-\\._\\~\\+\\/]+={0,2}";
487
269
  var quotedMatch = '"((?:[^"\\\\]|\\\\[\\s\\S])*)"';
@@ -498,60 +280,6 @@ var branded = new WeakSet;
498
280
  var nopkce = Symbol();
499
281
  var expectNoNonce = Symbol();
500
282
  var skipAuthTimeCheck = Symbol();
501
- var UNSUPPORTED_OPERATION = "OAUTH_UNSUPPORTED_OPERATION";
502
- function checkRsaKeyAlgorithm(key) {
503
- const { algorithm } = key;
504
- if (typeof algorithm.modulusLength !== "number" || algorithm.modulusLength < 2048) {
505
- throw new UnsupportedOperationError(`unsupported ${algorithm.name} modulusLength`, {
506
- cause: key
507
- });
508
- }
509
- }
510
- function ecdsaHashName(key) {
511
- const { algorithm } = key;
512
- switch (algorithm.namedCurve) {
513
- case "P-256":
514
- return "SHA-256";
515
- case "P-384":
516
- return "SHA-384";
517
- case "P-521":
518
- return "SHA-512";
519
- default:
520
- throw new UnsupportedOperationError("unsupported ECDSA namedCurve", { cause: key });
521
- }
522
- }
523
- function keyToSubtle(key) {
524
- switch (key.algorithm.name) {
525
- case "ECDSA":
526
- return {
527
- name: key.algorithm.name,
528
- hash: ecdsaHashName(key)
529
- };
530
- case "RSA-PSS": {
531
- checkRsaKeyAlgorithm(key);
532
- switch (key.algorithm.hash.name) {
533
- case "SHA-256":
534
- case "SHA-384":
535
- case "SHA-512":
536
- return {
537
- name: key.algorithm.name,
538
- saltLength: parseInt(key.algorithm.hash.name.slice(-3), 10) >> 3
539
- };
540
- default:
541
- throw new UnsupportedOperationError("unsupported RSA-PSS hash name", { cause: key });
542
- }
543
- }
544
- case "RSASSA-PKCS1-v1_5":
545
- checkRsaKeyAlgorithm(key);
546
- return key.algorithm.name;
547
- case "ML-DSA-44":
548
- case "ML-DSA-65":
549
- case "ML-DSA-87":
550
- case "Ed25519":
551
- return key.algorithm.name;
552
- }
553
- throw new UnsupportedOperationError("unsupported CryptoKey algorithm name", { cause: key });
554
- }
555
283
  var skipStateCheck = Symbol();
556
284
  var expectNoState = Symbol();
557
285
  var _nodiscoverycheck = Symbol();
@@ -1004,6 +732,17 @@ var requireEnv = (name) => {
1004
732
  }
1005
733
  return value;
1006
734
  };
735
+ var OPAQUE_TOKEN_BASE_URL_VAR = "UIPATH_URL";
736
+ var resolveBaseUrl = (rawUrl, failureContext) => {
737
+ const [baseUrlError, baseUrl] = catchError(() => normalizeAndValidateBaseUrl(rawUrl));
738
+ if (baseUrlError) {
739
+ if (baseUrlError instanceof InvalidBaseUrlError) {
740
+ throw baseUrlError;
741
+ }
742
+ throw new EnvAuthConfigError(`${failureContext}: ` + `${baseUrlError instanceof Error ? baseUrlError.message : String(baseUrlError)}`);
743
+ }
744
+ return baseUrl;
745
+ };
1007
746
  var readAuthFromEnv = () => {
1008
747
  const accessToken = requireEnv(ENV_AUTH_VARS.token);
1009
748
  const organizationName = requireEnv(ENV_AUTH_VARS.organizationName);
@@ -1012,19 +751,29 @@ var readAuthFromEnv = () => {
1012
751
  const tenantId = requireEnv(ENV_AUTH_VARS.tenantId);
1013
752
  const [parseError, payload] = catchError(() => parseJWT(accessToken));
1014
753
  if (parseError) {
1015
- throw new EnvAuthConfigError(`${ENV_AUTH_VARS.token} is not a valid JWT: ` + `${parseError instanceof Error ? parseError.message : String(parseError)}`);
754
+ const parseErrorMessage = parseError instanceof Error ? parseError.message : String(parseError);
755
+ const rawUrl = process.env[OPAQUE_TOKEN_BASE_URL_VAR];
756
+ if (!rawUrl) {
757
+ throw new EnvAuthConfigError(`${ENV_AUTH_VARS.token} is not a JWT (treating it as an opaque token, ` + `e.g. a Personal Access Token). Set ${OPAQUE_TOKEN_BASE_URL_VAR} to the ` + `UiPath base URL if this is a PAT, or fix the token if it was meant to ` + `be a JWT (parse error: ${parseErrorMessage}).`);
758
+ }
759
+ const baseUrl2 = resolveBaseUrl(rawUrl, `Failed to validate ${OPAQUE_TOKEN_BASE_URL_VAR}`);
760
+ return {
761
+ loginStatus: "Logged in",
762
+ accessToken,
763
+ baseUrl: baseUrl2,
764
+ organizationName,
765
+ organizationId,
766
+ tenantName,
767
+ tenantId,
768
+ source: "env-vars" /* EnvironmentVariables */,
769
+ hint: "Token is opaque (not a JWT) - expiration and identity cannot be " + "determined locally. Commands will fail with 401 once it is revoked or " + `expired. If this was meant to be a JWT instead of a PAT, note: ${parseErrorMessage}`
770
+ };
1016
771
  }
1017
772
  const iss = payload.iss;
1018
773
  if (typeof iss !== "string" || iss.length === 0) {
1019
774
  throw new EnvAuthConfigError(`${ENV_AUTH_VARS.token} has no 'iss' claim; cannot determine ` + `the UiPath server. Ensure the token was issued by a UiPath identity server.`);
1020
775
  }
1021
- const [baseUrlError, baseUrl] = catchError(() => normalizeAndValidateBaseUrl(iss));
1022
- if (baseUrlError) {
1023
- if (baseUrlError instanceof InvalidBaseUrlError) {
1024
- throw baseUrlError;
1025
- }
1026
- throw new EnvAuthConfigError(`Failed to derive server URL from token 'iss' claim: ` + `${baseUrlError instanceof Error ? baseUrlError.message : String(baseUrlError)}`);
1027
- }
776
+ const baseUrl = resolveBaseUrl(iss, "Failed to derive server URL from token 'iss' claim");
1028
777
  const expiration = getTokenExpiration(accessToken);
1029
778
  const loginStatus = expiration && expiration <= new Date ? "Expired" : "Logged in";
1030
779
  const identity = resolveSessionIdentity(accessToken);
@@ -2352,7 +2101,11 @@ var interactiveLoginWithDeps = async (options, deps) => {
2352
2101
  timeoutMs,
2353
2102
  noBrowser,
2354
2103
  signal,
2355
- onAuthUrl: noBrowser ? (url) => deliverAuthUrl(url) : undefined
2104
+ onAuthUrl: noBrowser ? (url) => deliverAuthUrl(url) : undefined,
2105
+ onPortReclaimed: ({ pid }) => emit({
2106
+ type: "port-reclaimed",
2107
+ message: `A previous 'uip login'${pid === undefined ? "" : ` (PID ${pid})`} was still holding the callback port ` + `(${new URL(DEFAULT_REDIRECT_URI).port}) and was released; continuing with this login.`
2108
+ })
2356
2109
  });
2357
2110
  return {
2358
2111
  UIPATH_ACCESS_TOKEN: authTokens.accessToken,
@@ -2506,7 +2259,8 @@ var authenticate = async ({
2506
2259
  timeoutMs,
2507
2260
  noBrowser,
2508
2261
  onAuthUrl,
2509
- signal
2262
+ signal,
2263
+ onPortReclaimed
2510
2264
  }) => {
2511
2265
  const config = await resolveConfigAsync({
2512
2266
  customAuthority: baseUrl,
@@ -2550,17 +2304,18 @@ var authenticate = async ({
2550
2304
  const authUrl = `${authorizationEndpoint}?${authParams.toString()}`;
2551
2305
  let strategy;
2552
2306
  if (isBrowser()) {
2553
- const { BrowserAuthStrategy } = await import("./browser-strategy-m6mmy8ee.js");
2307
+ const { BrowserAuthStrategy } = await import("./browser-strategy-tyy1nbjg.js");
2554
2308
  strategy = new BrowserAuthStrategy;
2555
2309
  } else {
2556
- const { NodeAuthStrategy } = await import("./node-strategy-8xakk79y.js");
2310
+ const { NodeAuthStrategy } = await import("./node-strategy-e5xy4ztb.js");
2557
2311
  strategy = new NodeAuthStrategy;
2558
2312
  }
2559
2313
  const code = await strategy.execute(authUrl, effectiveRedirectUriUrl, state, {
2560
2314
  timeoutMs,
2561
2315
  noBrowser,
2562
2316
  onAuthUrl,
2563
- signal
2317
+ signal,
2318
+ onPortReclaimed
2564
2319
  });
2565
2320
  return await exchangeCodeForTokens({
2566
2321
  code,
@@ -2572,70 +2327,71 @@ var authenticate = async ({
2572
2327
  });
2573
2328
  };
2574
2329
  export {
2575
- setAuthFileConfig,
2576
- setActiveAuthProfile,
2577
- selectTenantWithDeps,
2578
- saveRefreshBreaker,
2579
- saveEnvFileAsync,
2580
- runWithAuthProfile,
2581
- resolveSessionIdentity,
2582
- resolveEnvFilePathAsync,
2583
- resolveEnvFileLocationAsync,
2584
- resolveAuthProfileFilePath,
2585
- registerRobotClientLoader,
2586
- refreshTokenFingerprint,
2587
- refreshAccessToken,
2588
- readAuthFromEnv,
2589
- parseJWT,
2590
- parseAuthFlow,
2591
- normalizeAuthProfileName,
2592
- logoutWithDeps,
2593
- logout,
2594
- loadRefreshBreaker,
2595
- loadEnvFileAsync,
2596
- isTokenRefreshOAuthFailure,
2597
- isTenantSelectionError,
2598
- isRobotAuthEnforced,
2599
- isNode,
2600
- isEnvAuthEnabled,
2601
- isBrowser,
2602
- interactiveLoginWithDeps,
2603
- interactiveLogin,
2604
- getLoginStatusWithDeps,
2605
- getLoginStatusAsync,
2606
- getAuthEnv,
2607
- getAuthContext,
2608
- getActiveAuthProfileFilePath,
2609
- getActiveAuthProfile,
2610
- fetchTenantsAndOrganizations,
2611
- federatedCredentialsLogin,
2612
- clientCredentialsLogin,
2613
- clearRefreshBreaker,
2614
- clearActiveAuthProfile,
2615
- authenticate,
2616
- TokenRefreshOAuthError,
2617
- TenantSelectionRequiredError,
2618
- TenantSelectionError,
2619
- TENANT_SELECTION_REQUIRED_CODE,
2620
- JWT_BEARER_ASSERTION_TYPE,
2621
- InvalidTenantError,
2622
- InvalidBaseUrlError,
2623
- INVALID_TENANT_CODE,
2624
- FederatedCredentialsAuthenticationError,
2625
- EnvAuthConfigError,
2626
- ENV_AUTH_VARS,
2627
- ENV_AUTH_ENABLE_VAR,
2628
- ENFORCE_ROBOT_AUTH_VAR,
2629
- DEFAULT_ENV_FILENAME,
2630
- DEFAULT_AUTH_TIMEOUT_MS,
2631
- DEFAULT_AUTH_PROFILE,
2632
- DEFAULT_AUTH_FILENAME,
2633
- CredentialSource,
2634
- ClientCredentialsAuthenticationError,
2635
- AuthProfileValidationError,
2636
- AUTH_TIMEOUT_ERROR_CODE,
2330
+ AUTH_CANCELLED_ERROR_CODE,
2637
2331
  AUTH_FLOW_ENV_VAR,
2638
- AUTH_CANCELLED_ERROR_CODE
2332
+ AUTH_RECLAIMED_ERROR_CODE,
2333
+ AUTH_TIMEOUT_ERROR_CODE,
2334
+ AuthProfileValidationError,
2335
+ ClientCredentialsAuthenticationError,
2336
+ CredentialSource,
2337
+ DEFAULT_AUTH_FILENAME,
2338
+ DEFAULT_AUTH_PROFILE,
2339
+ DEFAULT_AUTH_TIMEOUT_MS,
2340
+ DEFAULT_ENV_FILENAME,
2341
+ ENFORCE_ROBOT_AUTH_VAR,
2342
+ ENV_AUTH_ENABLE_VAR,
2343
+ ENV_AUTH_VARS,
2344
+ EnvAuthConfigError,
2345
+ FederatedCredentialsAuthenticationError,
2346
+ INVALID_TENANT_CODE,
2347
+ InvalidBaseUrlError,
2348
+ InvalidTenantError,
2349
+ JWT_BEARER_ASSERTION_TYPE,
2350
+ TENANT_SELECTION_REQUIRED_CODE,
2351
+ TenantSelectionError,
2352
+ TenantSelectionRequiredError,
2353
+ TokenRefreshOAuthError,
2354
+ authenticate,
2355
+ clearActiveAuthProfile,
2356
+ clearRefreshBreaker,
2357
+ clientCredentialsLogin,
2358
+ federatedCredentialsLogin,
2359
+ fetchTenantsAndOrganizations,
2360
+ getActiveAuthProfile,
2361
+ getActiveAuthProfileFilePath,
2362
+ getAuthContext,
2363
+ getAuthEnv,
2364
+ getLoginStatusAsync,
2365
+ getLoginStatusWithDeps,
2366
+ interactiveLogin,
2367
+ interactiveLoginWithDeps,
2368
+ isBrowser,
2369
+ isEnvAuthEnabled,
2370
+ isNode,
2371
+ isRobotAuthEnforced,
2372
+ isTenantSelectionError,
2373
+ isTokenRefreshOAuthFailure,
2374
+ loadEnvFileAsync,
2375
+ loadRefreshBreaker,
2376
+ logout,
2377
+ logoutWithDeps,
2378
+ normalizeAuthProfileName,
2379
+ parseAuthFlow,
2380
+ parseJWT,
2381
+ readAuthFromEnv,
2382
+ refreshAccessToken,
2383
+ refreshTokenFingerprint,
2384
+ registerRobotClientLoader,
2385
+ resolveAuthProfileFilePath,
2386
+ resolveEnvFileLocationAsync,
2387
+ resolveEnvFilePathAsync,
2388
+ resolveSessionIdentity,
2389
+ runWithAuthProfile,
2390
+ saveEnvFileAsync,
2391
+ saveRefreshBreaker,
2392
+ selectTenantWithDeps,
2393
+ setActiveAuthProfile,
2394
+ setAuthFileConfig
2639
2395
  };
2640
2396
 
2641
- //# debugId=4C67EB70D831F78C64756E2164756E21
2397
+ //# debugId=655B85D3B06C262B64756E2164756E21
@@ -1,4 +1,4 @@
1
- import"./tool-0v6na3yp.js";
1
+ import"./tool-1de529jm.js";
2
2
 
3
3
  // ../../node_modules/open/index.js
4
4
  import process7 from "node:process";
@@ -626,9 +626,9 @@ defineLazyProperty(apps, "safari", () => detectPlatformBinary({
626
626
  }));
627
627
  var open_default = open;
628
628
  export {
629
- openApp,
629
+ apps,
630
630
  open_default as default,
631
- apps
631
+ openApp
632
632
  };
633
633
 
634
- //# debugId=75EAFE8AF98B350C64756E2164756E21
634
+ //# debugId=42C9AEC59ECC644E64756E2164756E21