@uipath/integrationservice-sdk 1.195.0 → 1.196.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.
Files changed (2) hide show
  1. package/dist/index.js +21 -12
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -19833,7 +19833,7 @@ class TextApiResponse2 {
19833
19833
  var package_default = {
19834
19834
  name: "@uipath/integrationservice-sdk",
19835
19835
  license: "MIT",
19836
- version: "1.195.0",
19836
+ version: "1.196.0",
19837
19837
  repository: {
19838
19838
  type: "git",
19839
19839
  url: "https://github.com/UiPath/cli.git",
@@ -39088,11 +39088,11 @@ var parseResourceUrl = (url) => {
39088
39088
  if (error || !parsed)
39089
39089
  return;
39090
39090
  const segments = parsed.pathname.split("/").filter(Boolean);
39091
- const organizationName = segments[0];
39092
- const tenantName = segments[1];
39093
- if (!organizationName || !tenantName)
39094
- return;
39095
- return { baseUrl: parsed.origin, organizationName, tenantName };
39091
+ return {
39092
+ baseUrl: parsed.origin,
39093
+ organizationName: segments[0],
39094
+ tenantName: segments[1]
39095
+ };
39096
39096
  };
39097
39097
  var defaultLoadModule = async () => {
39098
39098
  const [error, mod] = await catchError(() => Promise.resolve().then(() => __toESM(require_dist(), 1)));
@@ -39143,6 +39143,7 @@ var tryRobotClientFallback = async (options = {}) => {
39143
39143
  }
39144
39144
  let organizationIdFromToken;
39145
39145
  let tenantIdFromToken;
39146
+ let issuerFromToken;
39146
39147
  const [jwtError, claims] = catchError(() => parseJWT(accessToken));
39147
39148
  if (!jwtError && claims) {
39148
39149
  const rawOrgId = claims.prtId ?? claims.organizationId ?? claims.prt_id;
@@ -39153,6 +39154,10 @@ var tryRobotClientFallback = async (options = {}) => {
39153
39154
  if (typeof tenantClaim === "string" && tenantClaim.length > 0) {
39154
39155
  tenantIdFromToken = tenantClaim;
39155
39156
  }
39157
+ const issClaim = claims.iss;
39158
+ if (typeof issClaim === "string" && issClaim.length > 0) {
39159
+ issuerFromToken = issClaim;
39160
+ }
39156
39161
  }
39157
39162
  printNoticeOnce();
39158
39163
  return {
@@ -39161,7 +39166,8 @@ var tryRobotClientFallback = async (options = {}) => {
39161
39166
  organizationName: parsedUrl.organizationName,
39162
39167
  organizationId: organizationIdFromToken ?? parsedUrl.organizationName,
39163
39168
  tenantName: parsedUrl.tenantName,
39164
- tenantId: tenantIdFromToken
39169
+ tenantId: tenantIdFromToken,
39170
+ issuer: issuerFromToken
39165
39171
  };
39166
39172
  } catch {
39167
39173
  return;
@@ -39263,7 +39269,7 @@ var probeAsync = async (fs7, candidate) => {
39263
39269
  };
39264
39270
  }
39265
39271
  };
39266
- var resolveEnvFileLocationAsync = async (envFilePath = DEFAULT_ENV_FILENAME) => {
39272
+ var resolveEnvFileLocationAsync = async (envFilePath = DEFAULT_ENV_FILENAME, opts) => {
39267
39273
  const fs7 = getFileSystem();
39268
39274
  if (fs7.path.isAbsolute(envFilePath)) {
39269
39275
  const probe2 = await probeAsync(fs7, envFilePath);
@@ -39274,7 +39280,7 @@ var resolveEnvFileLocationAsync = async (envFilePath = DEFAULT_ENV_FILENAME) =>
39274
39280
  ...probe2.unusable ? { unusable: probe2.unusable } : {}
39275
39281
  };
39276
39282
  }
39277
- const cwd = fs7.env.cwd();
39283
+ const cwd = opts?.cwd ?? fs7.env.cwd();
39278
39284
  let searchDir = cwd;
39279
39285
  while (true) {
39280
39286
  const candidate = fs7.path.join(searchDir, envFilePath);
@@ -39304,8 +39310,8 @@ var resolveEnvFileLocationAsync = async (envFilePath = DEFAULT_ENV_FILENAME) =>
39304
39310
  ...probe.unusable ? { unusable: probe.unusable } : {}
39305
39311
  };
39306
39312
  };
39307
- var resolveEnvFilePathAsync = async (envFilePath = DEFAULT_ENV_FILENAME) => {
39308
- const location = await resolveEnvFileLocationAsync(envFilePath);
39313
+ var resolveEnvFilePathAsync = async (envFilePath = DEFAULT_ENV_FILENAME, opts) => {
39314
+ const location = await resolveEnvFileLocationAsync(envFilePath, opts);
39309
39315
  if (location.exists) {
39310
39316
  return { absolutePath: location.absolutePath };
39311
39317
  }
@@ -39537,6 +39543,7 @@ var getLoginStatusWithDeps = async (options = {}, deps = {}) => {
39537
39543
  organizationId: robotCreds.organizationId,
39538
39544
  tenantName: robotCreds.tenantName,
39539
39545
  tenantId: robotCreds.tenantId,
39546
+ issuer: robotCreds.issuer,
39540
39547
  expiration: expiration2,
39541
39548
  source: "robot" /* Robot */
39542
39549
  };
@@ -39558,6 +39565,7 @@ var getLoginStatusWithDeps = async (options = {}, deps = {}) => {
39558
39565
  organizationId: robotCreds.organizationId,
39559
39566
  tenantName: robotCreds.tenantName,
39560
39567
  tenantId: robotCreds.tenantId,
39568
+ issuer: robotCreds.issuer,
39561
39569
  expiration: expiration2,
39562
39570
  source: "robot" /* Robot */
39563
39571
  };
@@ -39715,7 +39723,8 @@ var getLoginStatusAsync = async (options = {}) => {
39715
39723
  // ../auth/src/authContext.ts
39716
39724
  var getAuthContext = async (options = {}) => {
39717
39725
  const status = await getLoginStatusAsync({
39718
- ensureTokenValidityMinutes: options.ensureTokenValidityMinutes
39726
+ ensureTokenValidityMinutes: options.ensureTokenValidityMinutes,
39727
+ envFilePath: options.envFilePath
39719
39728
  });
39720
39729
  if (status.loginStatus !== "Logged in" || !status.baseUrl || !status.accessToken) {
39721
39730
  throw new Error(status.hint ? `Not logged in. ${status.hint}` : "Not logged in. Run 'uip login' first.");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/integrationservice-sdk",
3
3
  "license": "MIT",
4
- "version": "1.195.0",
4
+ "version": "1.196.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/UiPath/cli.git",
@@ -27,5 +27,5 @@
27
27
  "files": [
28
28
  "dist"
29
29
  ],
30
- "gitHead": "eecf5713cd579b15783c770d1923e44e730271ea"
30
+ "gitHead": "94d71f9c52214980a1f0ae62b3f5372095788553"
31
31
  }