@uipath/admin-tool 1.201.0-preview.115 → 1.201.0-preview.122

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/tool.js +232 -49
  2. package/package.json +2 -2
package/dist/tool.js CHANGED
@@ -16242,7 +16242,7 @@ var require_adm_zip = __commonJS((exports, module) => {
16242
16242
  };
16243
16243
  });
16244
16244
 
16245
- // ../vpngateway-tool/dist/tool-mazas0mp.js
16245
+ // ../vpngateway-tool/dist/tool-1qcwp5tz.js
16246
16246
  init_tool_0v6na3yp();
16247
16247
  import { createRequire as createRequire3 } from "node:module";
16248
16248
  import fs6 from "node:fs";
@@ -18369,7 +18369,7 @@ var require_commander = __commonJS2((exports) => {
18369
18369
  var package_default = {
18370
18370
  name: "@uipath/admin-vpngateway-tool",
18371
18371
  license: "MIT",
18372
- version: "1.201.0-preview.115",
18372
+ version: "1.201.0-preview.122",
18373
18373
  description: "CLI plugin for UiPath VPN Gateway management (Hypervisor service).",
18374
18374
  private: false,
18375
18375
  repository: {
@@ -21612,6 +21612,7 @@ function errorMessage(error) {
21612
21612
  }
21613
21613
  init_constants();
21614
21614
  init_src();
21615
+ var IDENTIFIER_STATUSES = new Set([400, 403, 404]);
21615
21616
  var TENANT_SELECTION_REQUIRED_CODE = "TENANT_SELECTION_REQUIRED";
21616
21617
  var INVALID_TENANT_CODE = "INVALID_TENANT";
21617
21618
  var TENANT_SELECTION_CODES = new Set([
@@ -21928,17 +21929,18 @@ var TLS_ERROR_CODES = new Set([
21928
21929
  ]);
21929
21930
  var TLS_INSTRUCTIONS = "The server's TLS certificate could not be verified. Most often a corporate proxy/firewall re-signs HTTPS with a root CA that Node does " + "not trust — set NODE_EXTRA_CA_CERTS to that CA's PEM file (and HTTPS_PROXY " + "if you connect through a proxy). If the certificate is instead expired or its hostname does not match, fix the endpoint URL or the system clock. Then retry.";
21930
21931
  var NETWORK_INSTRUCTIONS = "Could not reach the UiPath service. Check your network connection and VPN, confirm any HTTP_PROXY/HTTPS_PROXY/NO_PROXY settings are correct, then retry.";
21932
+ var LOCAL_PERMISSION_ERROR_CODES = new Set(["EACCES", "EPERM", "EROFS"]);
21933
+ var LOCAL_PERMISSION_MESSAGE_PATTERN = /\b(EACCES|EPERM|EROFS)\b/;
21934
+ function localPermissionInstructions(code, path4) {
21935
+ const target = path4 !== undefined ? `'${path4}'` : "a local file or resource";
21936
+ if (code === "EROFS") {
21937
+ return `The filesystem containing ${target} is read-only (EROFS), so the CLI could not write to it. This is a local environment problem, ` + "not a UiPath service error — retrying will not help. Use a " + "writable location, or give this environment write access to the path.";
21938
+ }
21939
+ const remedy = process.platform === "win32" ? "Re-run from an elevated terminal, close any program holding the file open, or grant your user access to the path." : "Grant this user (or the sandbox the command runs in) access to the path, or run the command outside the sandbox.";
21940
+ return `The operating system denied access to ${target} (${code}). This is ` + "a local permission problem, not a UiPath service error — retrying " + `without a permission change will not help. ${remedy}`;
21941
+ }
21931
21942
  function describeConnectivityError(error) {
21932
- const queue = [error];
21933
- const seen = new Set;
21934
- for (let steps = 0;queue.length > 0 && steps < 32; steps++) {
21935
- const current = queue.shift();
21936
- if (current === null || typeof current !== "object")
21937
- continue;
21938
- if (seen.has(current))
21939
- continue;
21940
- seen.add(current);
21941
- const cur = current;
21943
+ for (const cur of walkErrorGraph(error)) {
21942
21944
  const code = typeof cur.code === "string" ? cur.code : undefined;
21943
21945
  const message = typeof cur.message === "string" ? cur.message : undefined;
21944
21946
  if (code && TLS_ERROR_CODES.has(code)) {
@@ -21957,6 +21959,49 @@ function describeConnectivityError(error) {
21957
21959
  instructions: NETWORK_INSTRUCTIONS
21958
21960
  };
21959
21961
  }
21962
+ }
21963
+ return;
21964
+ }
21965
+ function describePermissionError(error) {
21966
+ for (const cur of walkErrorGraph(error)) {
21967
+ const message = typeof cur.message === "string" ? cur.message : undefined;
21968
+ const code = matchLocalPermissionCode(cur.code, message);
21969
+ if (!code)
21970
+ continue;
21971
+ const path4 = localPermissionPath(cur.path, message);
21972
+ return {
21973
+ code,
21974
+ message: message ?? code,
21975
+ ...path4 !== undefined ? { path: path4 } : {},
21976
+ instructions: localPermissionInstructions(code, path4)
21977
+ };
21978
+ }
21979
+ return;
21980
+ }
21981
+ function matchLocalPermissionCode(code, message) {
21982
+ if (typeof code === "string" && LOCAL_PERMISSION_ERROR_CODES.has(code)) {
21983
+ return code;
21984
+ }
21985
+ const match = message ? LOCAL_PERMISSION_MESSAGE_PATTERN.exec(message) : null;
21986
+ return match ? match[1] : undefined;
21987
+ }
21988
+ function localPermissionPath(path4, message) {
21989
+ if (typeof path4 === "string")
21990
+ return path4;
21991
+ return message ? /'([^']+)'/.exec(message)?.[1] : undefined;
21992
+ }
21993
+ function* walkErrorGraph(error) {
21994
+ const queue = [error];
21995
+ const seen = new Set;
21996
+ for (let steps = 0;queue.length > 0 && steps < 32; steps++) {
21997
+ const current = queue.shift();
21998
+ if (current === null || typeof current !== "object")
21999
+ continue;
22000
+ if (seen.has(current))
22001
+ continue;
22002
+ seen.add(current);
22003
+ const cur = current;
22004
+ yield cur;
21960
22005
  if (cur.cause !== undefined)
21961
22006
  queue.push(cur.cause);
21962
22007
  if (Array.isArray(cur.errors))
@@ -22017,6 +22062,12 @@ function classifyError(status, error) {
22017
22062
  if (status !== undefined && status >= 500 && status < 600) {
22018
22063
  return { errorCode: "server_error", retry: "RetryLater" };
22019
22064
  }
22065
+ if (status === undefined && describePermissionError(error)) {
22066
+ return {
22067
+ errorCode: "local_permission_denied",
22068
+ retry: "RetryWillNotFix"
22069
+ };
22070
+ }
22020
22071
  const connectivity = describeConnectivityError(error);
22021
22072
  if (connectivity) {
22022
22073
  return {
@@ -22119,6 +22170,16 @@ async function extractErrorDetails(error, options) {
22119
22170
  message = `${message}: ${connectivity.message}`;
22120
22171
  }
22121
22172
  }
22173
+ const permission = status === undefined ? describePermissionError(error) : undefined;
22174
+ if (permission) {
22175
+ if (permission.message !== message && !message.includes(permission.message)) {
22176
+ message = `${message}: ${permission.message}`;
22177
+ }
22178
+ if (!message.includes(permission.instructions)) {
22179
+ const punctuated = message.endsWith(".") ? message : `${message}.`;
22180
+ message = `${punctuated} ${permission.instructions}`;
22181
+ }
22182
+ }
22122
22183
  let details = rawMessage;
22123
22184
  if (rawBody) {
22124
22185
  if (parsedBody) {
@@ -22158,6 +22219,9 @@ async function extractErrorDetails(error, options) {
22158
22219
  if (parsedBody?.traceId && typeof parsedBody.traceId === "string") {
22159
22220
  context.traceId = parsedBody.traceId;
22160
22221
  }
22222
+ if (permission?.path !== undefined) {
22223
+ context.path = permission.path;
22224
+ }
22161
22225
  if (status === 429) {
22162
22226
  const resp = response;
22163
22227
  const headersObj = resp?.headers;
@@ -23342,6 +23406,7 @@ var CLI_ERROR_CODES = [
23342
23406
  "invalid_argument",
23343
23407
  "authentication_required",
23344
23408
  "permission_denied",
23409
+ "local_permission_denied",
23345
23410
  "not_found",
23346
23411
  "rate_limited",
23347
23412
  "network_error",
@@ -23778,12 +23843,16 @@ function defaultErrorCodeForHttpStatus(status) {
23778
23843
  return "server_error";
23779
23844
  return;
23780
23845
  }
23846
+ var LOCAL_PERMISSION_TEXT_PATTERN = /(?:\b|\()(?:EACCES|EPERM|EROFS)(?::\s|\))/;
23781
23847
  function defaultErrorCodeForFailure(data) {
23782
23848
  if (data.Result === RESULTS.Failure) {
23783
23849
  const status = data.Context?.httpStatus ?? parseHttpStatusFromMessage2(data.Message);
23784
23850
  const errorCode2 = defaultErrorCodeForHttpStatus(status);
23785
23851
  if (errorCode2)
23786
23852
  return errorCode2;
23853
+ if (status === undefined && (LOCAL_PERMISSION_TEXT_PATTERN.test(data.Message) || LOCAL_PERMISSION_TEXT_PATTERN.test(data.Instructions))) {
23854
+ return "local_permission_denied";
23855
+ }
23787
23856
  }
23788
23857
  return defaultErrorCodeForResult(data.Result);
23789
23858
  }
@@ -24205,7 +24274,10 @@ function extractHttpStatus(err) {
24205
24274
  if (!err || typeof err !== "object")
24206
24275
  return;
24207
24276
  const e = err;
24208
- return e.response?.status ?? e.status ?? e.statusCode;
24277
+ const structured = e.response?.status ?? e.status ?? e.statusCode;
24278
+ if (structured !== undefined)
24279
+ return structured;
24280
+ return typeof e.message === "string" ? parseHttpStatusFromMessage(e.message) : undefined;
24209
24281
  }
24210
24282
  var GENERIC = "Check authentication and parameters";
24211
24283
  function instructionsFor(ctx, err) {
@@ -24239,6 +24311,10 @@ function instructionsFor(ctx, err) {
24239
24311
  if (status !== undefined && status >= 500 && status < 600) {
24240
24312
  return "Orchestrator returned a server error — retry; if it persists, check service status";
24241
24313
  }
24314
+ const permission = describePermissionError(err);
24315
+ if (permission) {
24316
+ return permission.instructions;
24317
+ }
24242
24318
  const connectivity = describeConnectivityError(err);
24243
24319
  if (connectivity) {
24244
24320
  return connectivity.instructions;
@@ -24302,9 +24378,8 @@ var ScreenLogger;
24302
24378
  ScreenLogger2.progress = progress;
24303
24379
  })(ScreenLogger ||= {});
24304
24380
  var sdkUserAgentHostToken2 = singleton2("SdkUserAgentHostToken");
24305
- var factorySlot = singleton2("PackagerFactoryProvider");
24306
- var moduleSlot = singleton2("ToolModuleProvider");
24307
24381
  var shippedKeysSlot = singleton2("ShipSucceededDedupeKeys");
24382
+ var factorySlot = singleton2("PackagerFactoryProvider");
24308
24383
  var LOCAL_THROW_INSTRUCTIONS = "Review the message above and adjust the command. Run with --help for usage.";
24309
24384
  async function reportError(error, loginInstructions) {
24310
24385
  const details = await extractErrorDetails(error);
@@ -25495,7 +25570,7 @@ init_tool_0v6na3yp();
25495
25570
  var package_default3 = {
25496
25571
  name: "@uipath/apms-tool",
25497
25572
  license: "MIT",
25498
- version: "1.201.0-preview.115",
25573
+ version: "1.201.0-preview.122",
25499
25574
  description: "CLI plugin for the UiPath Access Policy Management Service.",
25500
25575
  private: false,
25501
25576
  repository: {
@@ -28217,6 +28292,8 @@ init_constants2();
28217
28292
 
28218
28293
  // ../../auth/src/interactive.ts
28219
28294
  init_src2();
28295
+ // ../../auth/src/tenantSelection.ts
28296
+ var IDENTIFIER_STATUSES2 = new Set([400, 403, 404]);
28220
28297
 
28221
28298
  // ../../auth/src/selectTenant.ts
28222
28299
  var TENANT_SELECTION_REQUIRED_CODE2 = "TENANT_SELECTION_REQUIRED";
@@ -28330,17 +28407,18 @@ var TLS_ERROR_CODES3 = new Set([
28330
28407
  ]);
28331
28408
  var TLS_INSTRUCTIONS2 = "The server's TLS certificate could not be verified. Most often a " + "corporate proxy/firewall re-signs HTTPS with a root CA that Node does " + "not trust — set NODE_EXTRA_CA_CERTS to that CA's PEM file (and HTTPS_PROXY " + "if you connect through a proxy). If the certificate is instead expired or " + "its hostname does not match, fix the endpoint URL or the system clock. " + "Then retry.";
28332
28409
  var NETWORK_INSTRUCTIONS2 = "Could not reach the UiPath service. Check your network connection and " + "VPN, confirm any HTTP_PROXY/HTTPS_PROXY/NO_PROXY settings are correct, " + "then retry.";
28410
+ var LOCAL_PERMISSION_ERROR_CODES2 = new Set(["EACCES", "EPERM", "EROFS"]);
28411
+ var LOCAL_PERMISSION_MESSAGE_PATTERN2 = /\b(EACCES|EPERM|EROFS)\b/;
28412
+ function localPermissionInstructions2(code, path5) {
28413
+ const target = path5 !== undefined ? `'${path5}'` : "a local file or resource";
28414
+ if (code === "EROFS") {
28415
+ return `The filesystem containing ${target} is read-only (EROFS), so the ` + "CLI could not write to it. This is a local environment problem, " + "not a UiPath service error — retrying will not help. Use a " + "writable location, or give this environment write access to the " + "path.";
28416
+ }
28417
+ const remedy = process.platform === "win32" ? "Re-run from an elevated terminal, close any program holding " + "the file open, or grant your user access to the path." : "Grant this user (or the sandbox the command runs in) access " + "to the path, or run the command outside the sandbox.";
28418
+ return `The operating system denied access to ${target} (${code}). This is ` + "a local permission problem, not a UiPath service error — retrying " + `without a permission change will not help. ${remedy}`;
28419
+ }
28333
28420
  function describeConnectivityError2(error) {
28334
- const queue = [error];
28335
- const seen = new Set;
28336
- for (let steps = 0;queue.length > 0 && steps < 32; steps++) {
28337
- const current = queue.shift();
28338
- if (current === null || typeof current !== "object")
28339
- continue;
28340
- if (seen.has(current))
28341
- continue;
28342
- seen.add(current);
28343
- const cur = current;
28421
+ for (const cur of walkErrorGraph2(error)) {
28344
28422
  const code = typeof cur.code === "string" ? cur.code : undefined;
28345
28423
  const message = typeof cur.message === "string" ? cur.message : undefined;
28346
28424
  if (code && TLS_ERROR_CODES3.has(code)) {
@@ -28359,6 +28437,49 @@ function describeConnectivityError2(error) {
28359
28437
  instructions: NETWORK_INSTRUCTIONS2
28360
28438
  };
28361
28439
  }
28440
+ }
28441
+ return;
28442
+ }
28443
+ function describePermissionError2(error) {
28444
+ for (const cur of walkErrorGraph2(error)) {
28445
+ const message = typeof cur.message === "string" ? cur.message : undefined;
28446
+ const code = matchLocalPermissionCode2(cur.code, message);
28447
+ if (!code)
28448
+ continue;
28449
+ const path5 = localPermissionPath2(cur.path, message);
28450
+ return {
28451
+ code,
28452
+ message: message ?? code,
28453
+ ...path5 !== undefined ? { path: path5 } : {},
28454
+ instructions: localPermissionInstructions2(code, path5)
28455
+ };
28456
+ }
28457
+ return;
28458
+ }
28459
+ function matchLocalPermissionCode2(code, message) {
28460
+ if (typeof code === "string" && LOCAL_PERMISSION_ERROR_CODES2.has(code)) {
28461
+ return code;
28462
+ }
28463
+ const match = message ? LOCAL_PERMISSION_MESSAGE_PATTERN2.exec(message) : null;
28464
+ return match ? match[1] : undefined;
28465
+ }
28466
+ function localPermissionPath2(path5, message) {
28467
+ if (typeof path5 === "string")
28468
+ return path5;
28469
+ return message ? /'([^']+)'/.exec(message)?.[1] : undefined;
28470
+ }
28471
+ function* walkErrorGraph2(error) {
28472
+ const queue = [error];
28473
+ const seen = new Set;
28474
+ for (let steps = 0;queue.length > 0 && steps < 32; steps++) {
28475
+ const current = queue.shift();
28476
+ if (current === null || typeof current !== "object")
28477
+ continue;
28478
+ if (seen.has(current))
28479
+ continue;
28480
+ seen.add(current);
28481
+ const cur = current;
28482
+ yield cur;
28362
28483
  if (cur.cause !== undefined)
28363
28484
  queue.push(cur.cause);
28364
28485
  if (Array.isArray(cur.errors))
@@ -28419,6 +28540,12 @@ function classifyError3(status, error) {
28419
28540
  if (status !== undefined && status >= 500 && status < 600) {
28420
28541
  return { errorCode: "server_error", retry: "RetryLater" };
28421
28542
  }
28543
+ if (status === undefined && describePermissionError2(error)) {
28544
+ return {
28545
+ errorCode: "local_permission_denied",
28546
+ retry: "RetryWillNotFix"
28547
+ };
28548
+ }
28422
28549
  const connectivity = describeConnectivityError2(error);
28423
28550
  if (connectivity) {
28424
28551
  return {
@@ -28521,6 +28648,16 @@ async function extractErrorDetails2(error, options) {
28521
28648
  message = `${message}: ${connectivity.message}`;
28522
28649
  }
28523
28650
  }
28651
+ const permission = status === undefined ? describePermissionError2(error) : undefined;
28652
+ if (permission) {
28653
+ if (permission.message !== message && !message.includes(permission.message)) {
28654
+ message = `${message}: ${permission.message}`;
28655
+ }
28656
+ if (!message.includes(permission.instructions)) {
28657
+ const punctuated = message.endsWith(".") ? message : `${message}.`;
28658
+ message = `${punctuated} ${permission.instructions}`;
28659
+ }
28660
+ }
28524
28661
  let details = rawMessage;
28525
28662
  if (rawBody) {
28526
28663
  if (parsedBody) {
@@ -28560,6 +28697,9 @@ async function extractErrorDetails2(error, options) {
28560
28697
  if (parsedBody?.traceId && typeof parsedBody.traceId === "string") {
28561
28698
  context.traceId = parsedBody.traceId;
28562
28699
  }
28700
+ if (permission?.path !== undefined) {
28701
+ context.path = permission.path;
28702
+ }
28563
28703
  if (status === 429) {
28564
28704
  const resp = response;
28565
28705
  const headersObj = resp?.headers;
@@ -29764,6 +29904,7 @@ var CLI_ERROR_CODES2 = [
29764
29904
  "invalid_argument",
29765
29905
  "authentication_required",
29766
29906
  "permission_denied",
29907
+ "local_permission_denied",
29767
29908
  "not_found",
29768
29909
  "rate_limited",
29769
29910
  "network_error",
@@ -30199,12 +30340,16 @@ function defaultErrorCodeForHttpStatus2(status) {
30199
30340
  return "server_error";
30200
30341
  return;
30201
30342
  }
30343
+ var LOCAL_PERMISSION_TEXT_PATTERN2 = /(?:\b|\()(?:EACCES|EPERM|EROFS)(?::\s|\))/;
30202
30344
  function defaultErrorCodeForFailure2(data) {
30203
30345
  if (data.Result === RESULTS2.Failure) {
30204
30346
  const status = data.Context?.httpStatus ?? parseHttpStatusFromMessage5(data.Message);
30205
30347
  const errorCode3 = defaultErrorCodeForHttpStatus2(status);
30206
30348
  if (errorCode3)
30207
30349
  return errorCode3;
30350
+ if (status === undefined && (LOCAL_PERMISSION_TEXT_PATTERN2.test(data.Message) || LOCAL_PERMISSION_TEXT_PATTERN2.test(data.Instructions))) {
30351
+ return "local_permission_denied";
30352
+ }
30208
30353
  }
30209
30354
  return defaultErrorCodeForResult2(data.Result);
30210
30355
  }
@@ -30707,6 +30852,11 @@ function parseBoundedInt(raw, optionName, bounds) {
30707
30852
  }
30708
30853
  return n;
30709
30854
  }
30855
+ function splitScopeList(raw) {
30856
+ if (!raw)
30857
+ return [];
30858
+ return raw.split(/[\s,]+/).filter((scope) => scope.length > 0);
30859
+ }
30710
30860
  // ../../common/src/polling/types.ts
30711
30861
  var PollOutcome2 = {
30712
30862
  Completed: "completed",
@@ -30750,11 +30900,10 @@ var ScreenLogger2;
30750
30900
  }
30751
30901
  ScreenLogger.progress = progress;
30752
30902
  })(ScreenLogger2 ||= {});
30753
- // ../../common/src/tool-provider.ts
30754
- var factorySlot2 = singleton3("PackagerFactoryProvider");
30755
- var moduleSlot2 = singleton3("ToolModuleProvider");
30756
30903
  // ../../common/src/telemetry/ship-succeeded.ts
30757
30904
  var shippedKeysSlot2 = singleton3("ShipSucceededDedupeKeys");
30905
+ // ../../common/src/tool-provider.ts
30906
+ var factorySlot2 = singleton3("PackagerFactoryProvider");
30758
30907
  // ../apms-tool/src/commands/_shared.ts
30759
30908
  init_src2();
30760
30909
  var LOGIN_INSTRUCTIONS3 = "Ensure you are logged in with 'uip login' and have access to the Access Policy Management service.";
@@ -31898,7 +32047,7 @@ var registerCommands2 = async (program3) => {
31898
32047
  var package_default6 = {
31899
32048
  name: "@uipath/audit-tool",
31900
32049
  license: "MIT",
31901
- version: "1.201.0-preview.115",
32050
+ version: "1.201.0-preview.122",
31902
32051
  description: "CLI plugin for the UiPath Audit Service — query event sources, paginate events, and export ZIPs from the long-term store.",
31903
32052
  private: false,
31904
32053
  repository: {
@@ -33154,7 +33303,7 @@ var registerCommands3 = async (program3) => {
33154
33303
  var package_default8 = {
33155
33304
  name: "@uipath/authz-tool",
33156
33305
  license: "MIT",
33157
- version: "1.201.0-preview.115",
33306
+ version: "1.201.0-preview.122",
33158
33307
  description: "CLI plugin for the UiPath Authorization service.",
33159
33308
  private: false,
33160
33309
  repository: {
@@ -38765,7 +38914,7 @@ var registerCommands4 = async (program3) => {
38765
38914
  var package_default11 = {
38766
38915
  name: "@uipath/identity-tool",
38767
38916
  license: "MIT",
38768
- version: "1.201.0-preview.115",
38917
+ version: "1.201.0-preview.122",
38769
38918
  description: "Manage Identity Server users, groups, robot accounts, and external apps.",
38770
38919
  private: false,
38771
38920
  repository: {
@@ -38998,10 +39147,32 @@ var FED_CRED_DELETE_EXAMPLES = [
38998
39147
  }
38999
39148
  }
39000
39149
  ];
39001
- function parseScopes(csv, type3) {
39002
- if (!csv)
39003
- return [];
39004
- return csv.split(",").map((s) => ({ name: s.trim(), type: type3 }));
39150
+ function parseScopes(list, type3) {
39151
+ return splitScopeList(list).map((name) => ({ name, type: type3 }));
39152
+ }
39153
+ function foldDeprecatedScopeAlias(options) {
39154
+ if (options.scope !== undefined && options.appScope === undefined) {
39155
+ options.appScope = options.scope;
39156
+ return "--scope";
39157
+ }
39158
+ return "--app-scope";
39159
+ }
39160
+ function findBlankScopeOption(options, appScopeOption) {
39161
+ if (options.userScope !== undefined && splitScopeList(options.userScope).length === 0) {
39162
+ return "--user-scope";
39163
+ }
39164
+ if (options.appScope !== undefined && splitScopeList(options.appScope).length === 0) {
39165
+ return appScopeOption;
39166
+ }
39167
+ return;
39168
+ }
39169
+ function reportBlankScopeOption(option) {
39170
+ OutputFormatter2.error({
39171
+ Result: RESULTS2.Failure,
39172
+ Message: `No scope names found in ${option}.`,
39173
+ Instructions: `Pass one or more scopes, comma- or space-separated (e.g. ${option} "OR.Folders,OR.Assets").`
39174
+ });
39175
+ processContext2.exit(1);
39005
39176
  }
39006
39177
  function warnDeprecatedOrganization(org) {
39007
39178
  if (org !== undefined) {
@@ -39065,10 +39236,13 @@ var registerExternalAppsCommand = (program3) => {
39065
39236
  Data: client
39066
39237
  });
39067
39238
  });
39068
- externalApps.command("create").description("Create an external app (confidential by default). " + "Use --non-confidential for public clients (SPAs, mobile apps).").argument("<name>", "App display name").option("--organization <id>", "(deprecated, ignored) organization is derived from login").option("--redirect-uri <uri>", "Redirect URI(s) for OAuth2 flow (comma-separated for multiple)").option("--user-scope <scopes>", "Comma-separated user (delegated) scopes").option("--app-scope <scopes>", "Comma-separated application (app-only) scopes").option("--scope <scopes>", "Alias for --app-scope (deprecated)").option("--non-confidential", "Create a non-confidential (public) app — no client secret, requires redirect URI").option("--no-secret", "Skip generating a client secret on creation").option("--login-validity <minutes>", "Override token validity (minutes)", (v) => Number.parseInt(v, 10)).examples(EXTERNAL_APPS_CREATE_EXAMPLES).trackedAction(processContext2, async (name, options) => {
39239
+ externalApps.command("create").description("Create an external app (confidential by default). " + "Use --non-confidential for public clients (SPAs, mobile apps).").argument("<name>", "App display name").option("--organization <id>", "(deprecated, ignored) organization is derived from login").option("--redirect-uri <uri>", "Redirect URI(s) for OAuth2 flow (comma-separated for multiple)").option("--user-scope <scopes>", "User (delegated) scopes, comma- or space-separated").option("--app-scope <scopes>", "Application (app-only) scopes, comma- or space-separated").option("--scope <scopes>", "Alias for --app-scope (deprecated)").option("--non-confidential", "Create a non-confidential (public) app — no client secret, requires redirect URI").option("--no-secret", "Skip generating a client secret on creation").option("--login-validity <minutes>", "Override token validity (minutes)", (v) => Number.parseInt(v, 10)).examples(EXTERNAL_APPS_CREATE_EXAMPLES).trackedAction(processContext2, async (name, options) => {
39069
39240
  warnDeprecatedOrganization(options.organization);
39070
- if (options.scope && !options.appScope) {
39071
- options.appScope = options.scope;
39241
+ const appScopeOption = foldDeprecatedScopeAlias(options);
39242
+ const blankOption = findBlankScopeOption(options, appScopeOption);
39243
+ if (blankOption) {
39244
+ reportBlankScopeOption(blankOption);
39245
+ return;
39072
39246
  }
39073
39247
  if (!options.userScope && !options.appScope) {
39074
39248
  OutputFormatter2.error({
@@ -39138,11 +39312,9 @@ var registerExternalAppsCommand = (program3) => {
39138
39312
  Data: result
39139
39313
  });
39140
39314
  });
39141
- externalApps.command("update").description("Update an external app. Use 'external-apps list' to retrieve the client ID.").argument("<client-id>", "External app ID").option("--organization <id>", "(deprecated, ignored) organization is derived from login").option("-n, --name <name>", "New display name").option("--redirect-uri <uri>", "Redirect URI(s) for OAuth2 flow (comma-separated for multiple)").option("--user-scope <scopes>", "Comma-separated user (delegated) scopes").option("--app-scope <scopes>", "Comma-separated application (app-only) scopes").option("--scope <scopes>", "Alias for --app-scope (deprecated)").option("--login-validity <minutes>", "Override token validity (minutes)", (v) => Number.parseInt(v, 10)).examples(EXTERNAL_APPS_UPDATE_EXAMPLES).trackedAction(processContext2, async (clientId, options) => {
39315
+ externalApps.command("update").description("Update an external app. Use 'external-apps list' to retrieve the client ID.").argument("<client-id>", "External app ID").option("--organization <id>", "(deprecated, ignored) organization is derived from login").option("-n, --name <name>", "New display name").option("--redirect-uri <uri>", "Redirect URI(s) for OAuth2 flow (comma-separated for multiple)").option("--user-scope <scopes>", "User (delegated) scopes, comma- or space-separated").option("--app-scope <scopes>", "Application (app-only) scopes, comma- or space-separated").option("--scope <scopes>", "Alias for --app-scope (deprecated)").option("--login-validity <minutes>", "Override token validity (minutes)", (v) => Number.parseInt(v, 10)).examples(EXTERNAL_APPS_UPDATE_EXAMPLES).trackedAction(processContext2, async (clientId, options) => {
39142
39316
  warnDeprecatedOrganization(options.organization);
39143
- if (options.scope && !options.appScope) {
39144
- options.appScope = options.scope;
39145
- }
39317
+ const appScopeOption = foldDeprecatedScopeAlias(options);
39146
39318
  const hasScopes = options.userScope !== undefined || options.appScope !== undefined;
39147
39319
  if (options.name === undefined && options.redirectUri === undefined && !hasScopes) {
39148
39320
  OutputFormatter2.error({
@@ -39153,6 +39325,11 @@ var registerExternalAppsCommand = (program3) => {
39153
39325
  processContext2.exit(1);
39154
39326
  return;
39155
39327
  }
39328
+ const blankOption = findBlankScopeOption(options, appScopeOption);
39329
+ if (blankOption) {
39330
+ reportBlankScopeOption(blankOption);
39331
+ return;
39332
+ }
39156
39333
  const [fetchError, fetchResult] = await catchError5((async () => {
39157
39334
  const { api: api2, organizationId } = await createApiClient5(ExternalClientApi, {
39158
39335
  loginValidity: options.loginValidity,
@@ -41134,7 +41311,7 @@ var registerCommands5 = async (program3) => {
41134
41311
  var package_default12 = {
41135
41312
  name: "@uipath/oms-tool",
41136
41313
  license: "MIT",
41137
- version: "1.201.0-preview.115",
41314
+ version: "1.201.0-preview.122",
41138
41315
  description: "CLI plugin for the UiPath Organization Management Service.",
41139
41316
  private: false,
41140
41317
  repository: {
@@ -47367,9 +47544,12 @@ var registerTenantsCommands = (oms) => {
47367
47544
  "List tenants in the caller's organization.",
47368
47545
  "",
47369
47546
  "Pass `--filter <fragment>` to narrow client-side by name (case-insensitive",
47370
- "substring on `name`). The other flags map to server-side filters:",
47547
+ "substring on `name`). The remaining flags:",
47371
47548
  " --service <type> only tenants that have the given service provisioned",
47372
- " --status <s> only tenants whose lifecycle status matches",
47549
+ " (server-side)",
47550
+ " --status <s> only tenants whose lifecycle status matches. Sent",
47551
+ " upstream AND applied client-side, because the",
47552
+ " service currently ignores the query parameter",
47373
47553
  " --include-services return each tenant's `services` array inline",
47374
47554
  "",
47375
47555
  "Use this to look up a tenant's UUID by name before calling `get`, `update`,",
@@ -47398,6 +47578,9 @@ var registerTenantsCommands = (oms) => {
47398
47578
  if (options.environment !== undefined && t.environment !== options.environment) {
47399
47579
  return false;
47400
47580
  }
47581
+ if (options.status !== undefined && t.status !== options.status) {
47582
+ return false;
47583
+ }
47401
47584
  return true;
47402
47585
  });
47403
47586
  OutputFormatter2.success({
@@ -47658,7 +47841,7 @@ var registerCommands6 = async (program3) => {
47658
47841
  var package_default14 = {
47659
47842
  name: "@uipath/resourcecatalog-tool",
47660
47843
  license: "MIT",
47661
- version: "1.201.0-preview.115",
47844
+ version: "1.201.0-preview.122",
47662
47845
  description: "CLI plugin for the UiPath Resource Catalog Service.",
47663
47846
  private: false,
47664
47847
  repository: {
@@ -49606,7 +49789,7 @@ var registerCommands7 = async (program3) => {
49606
49789
  var package_default16 = {
49607
49790
  name: "@uipath/admin-tool",
49608
49791
  license: "MIT",
49609
- version: "1.201.0-preview.115",
49792
+ version: "1.201.0-preview.122",
49610
49793
  description: "Manage UiPath admin resources — Identity Server, Resource Catalog Service, Audit Service, VPN Gateway.",
49611
49794
  private: false,
49612
49795
  repository: {
@@ -49671,4 +49854,4 @@ export {
49671
49854
  metadata8 as metadata
49672
49855
  };
49673
49856
 
49674
- //# debugId=F9F3F522401B272464756E2164756E21
49857
+ //# debugId=FF29941F54AFBC6264756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/admin-tool",
3
3
  "license": "MIT",
4
- "version": "1.201.0-preview.115",
4
+ "version": "1.201.0-preview.122",
5
5
  "description": "Manage UiPath admin resources — Identity Server, Resource Catalog Service, Audit Service, VPN Gateway.",
6
6
  "private": false,
7
7
  "repository": {
@@ -23,5 +23,5 @@
23
23
  "files": [
24
24
  "dist"
25
25
  ],
26
- "gitHead": "f1086b73654d7728cb71f280588b3e0c77d535fc"
26
+ "gitHead": "6c56f56100be96231fccbaa59e99d64d94808d58"
27
27
  }