@uipath/gov-tool 1.198.0-preview.90 → 1.199.0-preview.91

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 +108 -19
  2. package/package.json +2 -2
package/dist/tool.js CHANGED
@@ -21230,7 +21230,7 @@ var require_commander = __commonJS((exports) => {
21230
21230
  var package_default = {
21231
21231
  name: "@uipath/gov-tool",
21232
21232
  license: "MIT",
21233
- version: "1.198.0-preview.90",
21233
+ version: "1.199.0-preview.91",
21234
21234
  description: "Manage UiPath governance — AOps policies, Access policies, and compliance packs.",
21235
21235
  private: false,
21236
21236
  repository: {
@@ -21636,7 +21636,7 @@ class VoidApiResponse {
21636
21636
  var package_default2 = {
21637
21637
  name: "@uipath/authz-sdk",
21638
21638
  license: "MIT",
21639
- version: "1.198.0",
21639
+ version: "1.199.0",
21640
21640
  description: "SDK for the UiPath Authorization Service API.",
21641
21641
  repository: {
21642
21642
  type: "git",
@@ -22325,6 +22325,7 @@ var resolveConfigAsync = async ({
22325
22325
  customAuthority,
22326
22326
  customClientId,
22327
22327
  customClientSecret,
22328
+ customClientAssertion,
22328
22329
  customScopes
22329
22330
  } = {}) => {
22330
22331
  const fileAuth = getAuthFileConfig();
@@ -22350,7 +22351,7 @@ var resolveConfigAsync = async ({
22350
22351
  if (!clientSecret && fileAuth.clientSecret) {
22351
22352
  clientSecret = fileAuth.clientSecret;
22352
22353
  }
22353
- const isExternalAppAuth = clientId !== DEFAULT_CLIENT_ID && Boolean(clientSecret);
22354
+ const isExternalAppAuth = clientId !== DEFAULT_CLIENT_ID && (Boolean(clientSecret) || Boolean(customClientAssertion));
22354
22355
  const scopes = resolveScopes(isExternalAppAuth, customScopes, fileAuth.scopes);
22355
22356
  return {
22356
22357
  clientId,
@@ -23436,7 +23437,6 @@ function normalizeTokenRefreshUnavailableFailure() {
23436
23437
  function errorMessage(error) {
23437
23438
  return error instanceof Error ? error.message : String(error);
23438
23439
  }
23439
-
23440
23440
  // ../../auth/src/index.ts
23441
23441
  init_constants();
23442
23442
 
@@ -23530,6 +23530,7 @@ function settlePromiseLike2(thenable) {
23530
23530
  var DEFAULT_401 = "Unauthorized (401). Run `uip login` to authenticate.";
23531
23531
  var DEFAULT_403 = "Forbidden (403). Ensure the account has the required permissions.";
23532
23532
  var DEFAULT_405 = "Method Not Allowed (405). The endpoint may not exist or the base URL may be incorrect.";
23533
+ var DEFAULT_413 = "Payload too large (413). The upload exceeded the server or CDN size limit. Reduce the package size — for example, exclude unused dependencies or remove large files from the project — and try again.";
23533
23534
  var HTML_RESPONSE_MESSAGE = "Received HTML instead of the expected JSON response.";
23534
23535
  var NETWORK_ERROR_CODES = new Set([
23535
23536
  "ECONNREFUSED",
@@ -23631,6 +23632,9 @@ function classifyError(status, error) {
23631
23632
  if (status === 405) {
23632
23633
  return { errorCode: "method_not_allowed", retry: "RetryWillNotFix" };
23633
23634
  }
23635
+ if (status === 413) {
23636
+ return { errorCode: "invalid_argument", retry: "RetryWillNotFix" };
23637
+ }
23634
23638
  if (status === 408) {
23635
23639
  return { errorCode: "timeout", retry: "RetryLater" };
23636
23640
  }
@@ -23708,6 +23712,8 @@ async function extractErrorDetails(error, options) {
23708
23712
  result = "AuthenticationError";
23709
23713
  } else if (status === 405) {
23710
23714
  message = DEFAULT_405;
23715
+ } else if (status === 413) {
23716
+ message = DEFAULT_413;
23711
23717
  } else if (status === 400 || status === 422) {
23712
23718
  message = formatHttpStatusMessage(status, rawMessage, extractedMessage, inferredStatus);
23713
23719
  result = "ValidationError";
@@ -30326,6 +30332,7 @@ var SKILL_ATTRIBUTION = attributionRecord([
30326
30332
  var KNOWN_SKILL_NAMES = new Set(Object.keys(SKILL_ATTRIBUTION));
30327
30333
  var COMMAND_ATTRIBUTION = commandAttribution([
30328
30334
  ["cli", "troubleshoot", ["uip.feedback"]],
30335
+ ["llm-gateway", "operate", ["uip.llm-gateway"]],
30329
30336
  ["llm-gateway", "operate", ["uip.llm-configuration", "uip.model-hub"]],
30330
30337
  ["context-grounding", "build", ["uip.context-grounding"]],
30331
30338
  ["api-workflow", "build", ["uip.api-workflow"]],
@@ -31418,7 +31425,7 @@ class TextApiResponse {
31418
31425
  var package_default3 = {
31419
31426
  name: "@uipath/aops-policy-sdk",
31420
31427
  license: "MIT",
31421
- version: "1.198.0",
31428
+ version: "1.199.0",
31422
31429
  description: "SDK for the UiPath AOps Governance API — policy management and deployment.",
31423
31430
  repository: {
31424
31431
  type: "git",
@@ -57204,7 +57211,7 @@ class VoidApiResponse3 {
57204
57211
  var package_default4 = {
57205
57212
  name: "@uipath/compliance-packs-sdk",
57206
57213
  license: "MIT",
57207
- version: "1.198.0",
57214
+ version: "1.199.0",
57208
57215
  description: "SDK for the UiPath Governance Server Compliance Packs API.",
57209
57216
  repository: {
57210
57217
  type: "git",
@@ -57261,7 +57268,8 @@ function ControlEntryFromJSONTyped(json2, ignoreDiscriminator) {
57261
57268
  recommendedSetting: json2["recommendedSetting"],
57262
57269
  configLocation: json2["configLocation"],
57263
57270
  impact: json2["impact"],
57264
- contributionKeys: json2["contributionKeys"]
57271
+ contributionKeys: json2["contributionKeys"],
57272
+ isManualConfigNeeded: json2["isManualConfigNeeded"] == null ? undefined : json2["isManualConfigNeeded"]
57265
57273
  };
57266
57274
  }
57267
57275
  function ControlPredicateEqFromJSON(json2) {
@@ -57356,7 +57364,8 @@ function PackListEntryFromJSONTyped(json2, ignoreDiscriminator) {
57356
57364
  packLongName: json2["packLongName"] == null ? undefined : json2["packLongName"],
57357
57365
  packVersion: json2["packVersion"],
57358
57366
  description: json2["description"],
57359
- publishedAt: new Date(json2["publishedAt"]),
57367
+ available: json2["available"],
57368
+ publishedAt: json2["publishedAt"] == null ? null : new Date(json2["publishedAt"]),
57360
57369
  summary: PackSummaryCountsFromJSON(json2["summary"])
57361
57370
  };
57362
57371
  }
@@ -57371,6 +57380,36 @@ function CatalogListResponseFromJSONTyped(json2, ignoreDiscriminator) {
57371
57380
  packs: json2["packs"].map(PackListEntryFromJSON)
57372
57381
  };
57373
57382
  }
57383
+ function ControlCoverageFromJSON(json2) {
57384
+ return ControlCoverageFromJSONTyped(json2, false);
57385
+ }
57386
+ function ControlCoverageFromJSONTyped(json2, ignoreDiscriminator) {
57387
+ if (json2 == null) {
57388
+ return json2;
57389
+ }
57390
+ return {
57391
+ controlDisplayName: json2["controlDisplayName"],
57392
+ productIdentifier: json2["productIdentifier"],
57393
+ impact: json2["impact"],
57394
+ recommendedSetting: json2["recommendedSetting"],
57395
+ status: json2["status"]
57396
+ };
57397
+ }
57398
+ function ManualConfigCheckFromJSON(json2) {
57399
+ return ManualConfigCheckFromJSONTyped(json2, false);
57400
+ }
57401
+ function ManualConfigCheckFromJSONTyped(json2, ignoreDiscriminator) {
57402
+ if (json2 == null) {
57403
+ return json2;
57404
+ }
57405
+ return {
57406
+ controlDisplayName: json2["controlDisplayName"],
57407
+ productIdentifier: json2["productIdentifier"],
57408
+ key: json2["key"],
57409
+ expected: ControlPredicateFromJSON(json2["expected"]),
57410
+ actual: json2["actual"] == null ? undefined : json2["actual"]
57411
+ };
57412
+ }
57374
57413
  function ClauseCoverageFromJSON(json2) {
57375
57414
  return ClauseCoverageFromJSONTyped(json2, false);
57376
57415
  }
@@ -57380,7 +57419,24 @@ function ClauseCoverageFromJSONTyped(json2, ignoreDiscriminator) {
57380
57419
  }
57381
57420
  return {
57382
57421
  clauseId: json2["clauseId"],
57383
- status: json2["status"]
57422
+ status: json2["status"],
57423
+ deployedControlCount: json2["deployedControlCount"],
57424
+ checkableControlCount: json2["checkableControlCount"],
57425
+ manualConfigChecks: json2["manualConfigChecks"] == null ? undefined : json2["manualConfigChecks"].map(ManualConfigCheckFromJSON),
57426
+ controls: json2["controls"] == null ? undefined : json2["controls"].map(ControlCoverageFromJSON)
57427
+ };
57428
+ }
57429
+ function ClauseSummaryFromJSON(json2) {
57430
+ return ClauseSummaryFromJSONTyped(json2, false);
57431
+ }
57432
+ function ClauseSummaryFromJSONTyped(json2, ignoreDiscriminator) {
57433
+ if (json2 == null) {
57434
+ return json2;
57435
+ }
57436
+ return {
57437
+ fullyDeployedCount: json2["fullyDeployedCount"],
57438
+ partiallyDeployedCount: json2["partiallyDeployedCount"],
57439
+ notDeployedCount: json2["notDeployedCount"]
57384
57440
  };
57385
57441
  }
57386
57442
  function CoverageSummaryFromJSON(json2) {
@@ -57393,7 +57449,8 @@ function CoverageSummaryFromJSONTyped(json2, ignoreDiscriminator) {
57393
57449
  return {
57394
57450
  deploymentPolicyCount: json2["deploymentPolicyCount"],
57395
57451
  inPlaceCount: json2["inPlaceCount"],
57396
- newCount: json2["newCount"]
57452
+ newCount: json2["newCount"],
57453
+ clauseSummary: ClauseSummaryFromJSON(json2["clauseSummary"])
57397
57454
  };
57398
57455
  }
57399
57456
  function DeploymentPolicyCoverageFromJSON(json2) {
@@ -57422,6 +57479,19 @@ function DeploymentPolicyEntryFromJSONTyped(json2, ignoreDiscriminator) {
57422
57479
  policyFile: json2["policyFile"]
57423
57480
  };
57424
57481
  }
57482
+ function UnsupportedClauseFromJSON(json2) {
57483
+ return UnsupportedClauseFromJSONTyped(json2, false);
57484
+ }
57485
+ function UnsupportedClauseFromJSONTyped(json2, ignoreDiscriminator) {
57486
+ if (json2 == null) {
57487
+ return json2;
57488
+ }
57489
+ return {
57490
+ clauseId: json2["clauseId"],
57491
+ clauseName: json2["clauseName"],
57492
+ description: json2["description"] == null ? undefined : json2["description"]
57493
+ };
57494
+ }
57425
57495
  function PackCatalogDetailFromJSON(json2) {
57426
57496
  return PackCatalogDetailFromJSONTyped(json2, false);
57427
57497
  }
@@ -57438,7 +57508,9 @@ function PackCatalogDetailFromJSONTyped(json2, ignoreDiscriminator) {
57438
57508
  publishedAt: new Date(json2["publishedAt"]),
57439
57509
  summary: PackSummaryCountsFromJSON(json2["summary"]),
57440
57510
  deploymentPolicies: json2["deploymentPolicies"].map(DeploymentPolicyEntryFromJSON),
57441
- clauses: json2["clauses"].map(CatalogClauseFromJSON)
57511
+ clauses: json2["clauses"].map(CatalogClauseFromJSON),
57512
+ documentationUrl: json2["documentationUrl"] == null ? undefined : json2["documentationUrl"],
57513
+ unsupportedClauses: json2["unsupportedClauses"].map(UnsupportedClauseFromJSON)
57442
57514
  };
57443
57515
  }
57444
57516
  function PackCoverageResponseFromJSON(json2) {
@@ -57453,8 +57525,8 @@ function PackCoverageResponseFromJSONTyped(json2, ignoreDiscriminator) {
57453
57525
  scopeLevel: json2["scopeLevel"],
57454
57526
  scopeTargetId: json2["scopeTargetId"],
57455
57527
  summary: CoverageSummaryFromJSON(json2["summary"]),
57456
- deploymentPolicies: json2["deploymentPolicies"].map(DeploymentPolicyCoverageFromJSON),
57457
- clauses: json2["clauses"].map(ClauseCoverageFromJSON)
57528
+ deploymentPolicies: json2["deploymentPolicies"] == null ? undefined : json2["deploymentPolicies"].map(DeploymentPolicyCoverageFromJSON),
57529
+ clauses: json2["clauses"] == null ? undefined : json2["clauses"].map(ClauseCoverageFromJSON)
57458
57530
  };
57459
57531
  }
57460
57532
  function PackPolicyDtoFromJSON(json2) {
@@ -57483,7 +57555,7 @@ function PackStateDetailDtoFromJSONTyped(json2, ignoreDiscriminator) {
57483
57555
  packId: json2["packId"],
57484
57556
  packVersion: json2["packVersion"],
57485
57557
  active: json2["active"],
57486
- lastToggledAt: new Date(json2["lastToggledAt"]),
57558
+ lastToggledAt: json2["lastToggledAt"] == null ? null : new Date(json2["lastToggledAt"]),
57487
57559
  lastToggledBy: json2["lastToggledBy"],
57488
57560
  policies: json2["policies"].map(PackPolicyDtoFromJSON)
57489
57561
  };
@@ -57789,6 +57861,7 @@ var resolveConfigAsync2 = async ({
57789
57861
  customAuthority,
57790
57862
  customClientId,
57791
57863
  customClientSecret,
57864
+ customClientAssertion,
57792
57865
  customScopes
57793
57866
  } = {}) => {
57794
57867
  const fileAuth = getAuthFileConfig2();
@@ -57814,7 +57887,7 @@ var resolveConfigAsync2 = async ({
57814
57887
  if (!clientSecret && fileAuth.clientSecret) {
57815
57888
  clientSecret = fileAuth.clientSecret;
57816
57889
  }
57817
- const isExternalAppAuth = clientId !== DEFAULT_CLIENT_ID2 && Boolean(clientSecret);
57890
+ const isExternalAppAuth = clientId !== DEFAULT_CLIENT_ID2 && (Boolean(clientSecret) || Boolean(customClientAssertion));
57818
57891
  const scopes = resolveScopes2(isExternalAppAuth, customScopes, fileAuth.scopes);
57819
57892
  return {
57820
57893
  clientId,
@@ -59050,13 +59123,18 @@ var registerCatalogCommands = (compliancePacks) => {
59050
59123
 
59051
59124
  // src/commands/compliance-pack/state.ts
59052
59125
  var LOGIN_INSTRUCTIONS7 = "Ensure you are logged in with 'uip login' and have access to the compliance packs service.";
59126
+ var CONFLICT_INSTRUCTIONS = "Another operation for this pack is still in progress. Wait a few seconds and retry.";
59053
59127
  async function runCommand(operation, successCode, errorInstructions) {
59054
59128
  const [error, result] = await catchError2(operation());
59055
59129
  if (error) {
59130
+ const details = await extractErrorDetails(error);
59131
+ const isConflict = details.context?.httpStatus === 409;
59056
59132
  OutputFormatter.error({
59057
59133
  Result: RESULTS.Failure,
59058
- Message: await extractErrorMessage(error),
59059
- Instructions: errorInstructions
59134
+ Message: details.message,
59135
+ Instructions: isConflict ? CONFLICT_INSTRUCTIONS : errorInstructions,
59136
+ ...details.context ? { Context: details.context } : {},
59137
+ ...isConflict ? { Retry: "RetryAfter10Seconds" } : {}
59060
59138
  });
59061
59139
  processContext.exit(1);
59062
59140
  return;
@@ -59067,6 +59145,17 @@ async function runCommand(operation, successCode, errorInstructions) {
59067
59145
  Data: result
59068
59146
  });
59069
59147
  }
59148
+ function normalizeCoverage(res) {
59149
+ return {
59150
+ ...res,
59151
+ deploymentPolicies: res.deploymentPolicies ?? [],
59152
+ clauses: (res.clauses ?? []).map((clause) => ({
59153
+ ...clause,
59154
+ manualConfigChecks: clause.manualConfigChecks ?? [],
59155
+ controls: clause.controls ?? []
59156
+ }))
59157
+ };
59158
+ }
59070
59159
  var SCOPE_DESCRIPTION = "Scope level for the pack state ('tenant' or 'organization'). Currently 'tenant' is the routinely used level.";
59071
59160
  var TARGET_ID_DESCRIPTION = "The tenant ID (UUID) when scope=tenant, or org ID when scope=organization.";
59072
59161
  var PACK_ID_DESCRIPTION = "Pack identifier (e.g. iso-42001-2023). Use 'catalog list' to see available pack IDs.";
@@ -59273,7 +59362,7 @@ var registerStateCommands = (compliancePacks) => {
59273
59362
  scopeLevel,
59274
59363
  scopeTargetId,
59275
59364
  packId
59276
- })), "CompliancePacksStateCoverage", "Check the pack identifier with 'uip gov compliance-packs catalog list'. A 502 means the Aops state could not be fetched."));
59365
+ }).then(normalizeCoverage)), "CompliancePacksStateCoverage", "Check the pack identifier with 'uip gov compliance-packs catalog list'. A 502 means the Aops state could not be fetched."));
59277
59366
  };
59278
59367
 
59279
59368
  // src/tool.ts
@@ -59309,4 +59398,4 @@ export {
59309
59398
  metadata
59310
59399
  };
59311
59400
 
59312
- //# debugId=7EDB5F244F9E7AAE64756E2164756E21
59401
+ //# debugId=933A39AE1C21F52164756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/gov-tool",
3
3
  "license": "MIT",
4
- "version": "1.198.0-preview.90",
4
+ "version": "1.199.0-preview.91",
5
5
  "description": "Manage UiPath governance — AOps policies, Access policies, and compliance packs.",
6
6
  "private": false,
7
7
  "repository": {
@@ -23,5 +23,5 @@
23
23
  "files": [
24
24
  "dist"
25
25
  ],
26
- "gitHead": "7fa615fb10f91f98f796a038ea70569336611f42"
26
+ "gitHead": "f428cb1e61ba89ad18394b0c6106784055699f02"
27
27
  }