@uipath/codedapp-tool 1.198.0 → 1.199.0-preview.105

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 +207 -83
  2. package/package.json +2 -2
package/dist/tool.js CHANGED
@@ -10934,7 +10934,7 @@ var require_utf32 = __commonJS((exports) => {
10934
10934
  }
10935
10935
  Utf32Encoder.prototype.write = function(str2) {
10936
10936
  var src = Buffer3.from(str2, "ucs2");
10937
- var dst = Buffer3.alloc(src.length * 2);
10937
+ var dst = Buffer3.alloc(src.length * 2 + 4);
10938
10938
  var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE;
10939
10939
  var offset = 0;
10940
10940
  for (var i = 0;i < src.length; i += 2) {
@@ -11001,9 +11001,9 @@ var require_utf32 = __commonJS((exports) => {
11001
11001
  }
11002
11002
  if (overflow.length === 4) {
11003
11003
  if (isLE) {
11004
- codepoint = overflow[i] | overflow[i + 1] << 8 | overflow[i + 2] << 16 | overflow[i + 3] << 24;
11004
+ codepoint = overflow[0] | overflow[1] << 8 | overflow[2] << 16 | overflow[3] << 24;
11005
11005
  } else {
11006
- codepoint = overflow[i + 3] | overflow[i + 2] << 8 | overflow[i + 1] << 16 | overflow[i] << 24;
11006
+ codepoint = overflow[3] | overflow[2] << 8 | overflow[1] << 16 | overflow[0] << 24;
11007
11007
  }
11008
11008
  overflow.length = 0;
11009
11009
  offset = _writeCodepoint(dst, offset, codepoint, badChar);
@@ -11038,7 +11038,11 @@ var require_utf32 = __commonJS((exports) => {
11038
11038
  return offset;
11039
11039
  }
11040
11040
  Utf32Decoder.prototype.end = function() {
11041
+ if (this.overflow.length === 0) {
11042
+ return;
11043
+ }
11041
11044
  this.overflow.length = 0;
11045
+ return String.fromCharCode(this.badChar);
11042
11046
  };
11043
11047
  exports.utf32 = Utf32AutoCodec;
11044
11048
  exports.ucs4 = "utf32";
@@ -11655,6 +11659,8 @@ var require_sbcs_data = __commonJS((exports, module) => {
11655
11659
  elot928: "iso88597",
11656
11660
  hebrew: "iso88598",
11657
11661
  hebrew8: "iso88598",
11662
+ iso88598i: "iso88598",
11663
+ iso88598e: "iso88598",
11658
11664
  turkish: "iso88599",
11659
11665
  turkish8: "iso88599",
11660
11666
  thai: "iso885911",
@@ -37168,7 +37174,7 @@ var require_asynckit = __commonJS((exports, module) => {
37168
37174
  };
37169
37175
  });
37170
37176
 
37171
- // ../../node_modules/get-intrinsic/node_modules/es-object-atoms/index.js
37177
+ // ../../node_modules/es-object-atoms/index.js
37172
37178
  var require_es_object_atoms = __commonJS((exports, module) => {
37173
37179
  module.exports = Object;
37174
37180
  });
@@ -37362,14 +37368,9 @@ var require_Reflect_getPrototypeOf = __commonJS((exports, module) => {
37362
37368
  module.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
37363
37369
  });
37364
37370
 
37365
- // ../../node_modules/get-proto/node_modules/es-object-atoms/index.js
37366
- var require_es_object_atoms2 = __commonJS((exports, module) => {
37367
- module.exports = Object;
37368
- });
37369
-
37370
37371
  // ../../node_modules/get-proto/Object.getPrototypeOf.js
37371
37372
  var require_Object_getPrototypeOf = __commonJS((exports, module) => {
37372
- var $Object = require_es_object_atoms2();
37373
+ var $Object = require_es_object_atoms();
37373
37374
  module.exports = $Object.getPrototypeOf || null;
37374
37375
  });
37375
37376
 
@@ -37520,7 +37521,7 @@ var require_get_proto = __commonJS((exports, module) => {
37520
37521
  } : null;
37521
37522
  });
37522
37523
 
37523
- // ../../node_modules/get-intrinsic/node_modules/hasown/index.js
37524
+ // ../../node_modules/hasown/index.js
37524
37525
  var require_hasown = __commonJS((exports, module) => {
37525
37526
  var call = Function.prototype.call;
37526
37527
  var $hasOwn = Object.prototype.hasOwnProperty;
@@ -37862,20 +37863,12 @@ var require_shams2 = __commonJS((exports, module) => {
37862
37863
  };
37863
37864
  });
37864
37865
 
37865
- // ../../node_modules/es-set-tostringtag/node_modules/hasown/index.js
37866
- var require_hasown2 = __commonJS((exports, module) => {
37867
- var call = Function.prototype.call;
37868
- var $hasOwn = Object.prototype.hasOwnProperty;
37869
- var bind = require_function_bind();
37870
- module.exports = bind.call(call, $hasOwn);
37871
- });
37872
-
37873
37866
  // ../../node_modules/es-set-tostringtag/index.js
37874
37867
  var require_es_set_tostringtag = __commonJS((exports, module) => {
37875
37868
  var GetIntrinsic = require_get_intrinsic();
37876
37869
  var $defineProperty = GetIntrinsic("%Object.defineProperty%", true);
37877
37870
  var hasToStringTag = require_shams2()();
37878
- var hasOwn = require_hasown2();
37871
+ var hasOwn = require_hasown();
37879
37872
  var $TypeError = require_type();
37880
37873
  var toStringTag = hasToStringTag ? Symbol.toStringTag : null;
37881
37874
  module.exports = function setToStringTag(object2, value) {
@@ -37899,14 +37892,6 @@ var require_es_set_tostringtag = __commonJS((exports, module) => {
37899
37892
  };
37900
37893
  });
37901
37894
 
37902
- // ../../node_modules/form-data/node_modules/hasown/index.js
37903
- var require_hasown3 = __commonJS((exports, module) => {
37904
- var call = Function.prototype.call;
37905
- var $hasOwn = Object.prototype.hasOwnProperty;
37906
- var bind = require_function_bind();
37907
- module.exports = bind.call(call, $hasOwn);
37908
- });
37909
-
37910
37895
  // ../../node_modules/form-data/lib/populate.js
37911
37896
  var require_populate = __commonJS((exports, module) => {
37912
37897
  module.exports = function(dst, src3) {
@@ -37931,7 +37916,7 @@ var require_form_data = __commonJS((exports, module) => {
37931
37916
  var mime = require_mime_types();
37932
37917
  var asynckit = require_asynckit();
37933
37918
  var setToStringTag = require_es_set_tostringtag();
37934
- var hasOwn = require_hasown3();
37919
+ var hasOwn = require_hasown();
37935
37920
  var populate = require_populate();
37936
37921
  function escapeHeaderParam(str2) {
37937
37922
  return String(str2).replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/"/g, "%22");
@@ -38560,6 +38545,7 @@ var DEFAULT_CLIENT_ID = "36dea5b8-e8bb-423d-8e7b-c808df8f1c00", AUTH_FILE_CONFIG
38560
38545
  customAuthority,
38561
38546
  customClientId,
38562
38547
  customClientSecret,
38548
+ customClientAssertion,
38563
38549
  customScopes
38564
38550
  } = {}) => {
38565
38551
  const fileAuth = getAuthFileConfig();
@@ -38585,7 +38571,7 @@ var DEFAULT_CLIENT_ID = "36dea5b8-e8bb-423d-8e7b-c808df8f1c00", AUTH_FILE_CONFIG
38585
38571
  if (!clientSecret && fileAuth.clientSecret) {
38586
38572
  clientSecret = fileAuth.clientSecret;
38587
38573
  }
38588
- const isExternalAppAuth = clientId !== DEFAULT_CLIENT_ID && Boolean(clientSecret);
38574
+ const isExternalAppAuth = clientId !== DEFAULT_CLIENT_ID && (Boolean(clientSecret) || Boolean(customClientAssertion));
38589
38575
  const scopes = resolveScopes(isExternalAppAuth, customScopes, fileAuth.scopes);
38590
38576
  return {
38591
38577
  clientId,
@@ -58621,8 +58607,76 @@ var init_authContext = __esm(() => {
58621
58607
  init_loginStatus();
58622
58608
  });
58623
58609
 
58610
+ // ../auth/src/tokenGrant.ts
58611
+ var requestClientCredentialsToken = async ({
58612
+ tokenEndpoint,
58613
+ baseUrl,
58614
+ params,
58615
+ buildError
58616
+ }) => {
58617
+ const tokenResponse = await fetch(tokenEndpoint, {
58618
+ method: "POST",
58619
+ headers: {
58620
+ "Content-Type": "application/x-www-form-urlencoded"
58621
+ },
58622
+ body: new URLSearchParams(params)
58623
+ });
58624
+ const [parseError, tokenData] = await catchError2(tokenResponse.json());
58625
+ if (!tokenResponse.ok) {
58626
+ const data = parseError ? {} : tokenData ?? {};
58627
+ throw buildError({
58628
+ status: tokenResponse.status,
58629
+ errorType: data.error || "authentication_failed",
58630
+ errorDesc: data.error_description || "Unknown error"
58631
+ });
58632
+ }
58633
+ if (parseError || !tokenData) {
58634
+ throw buildError({
58635
+ status: tokenResponse.status,
58636
+ errorType: "invalid_response",
58637
+ errorDesc: "Token endpoint returned a non-JSON response."
58638
+ });
58639
+ }
58640
+ if (!tokenData.access_token) {
58641
+ throw buildError({
58642
+ status: tokenResponse.status,
58643
+ errorType: "invalid_response",
58644
+ errorDesc: "Token endpoint response did not include an access_token."
58645
+ });
58646
+ }
58647
+ return {
58648
+ UIPATH_ACCESS_TOKEN: tokenData.access_token,
58649
+ UIPATH_URL: baseUrl
58650
+ };
58651
+ };
58652
+ var init_tokenGrant = () => {};
58653
+
58624
58654
  // ../auth/src/clientCredentials.ts
58625
- var ClientCredentialsAuthenticationError, clientCredentialsLogin = async ({
58655
+ var ClientCredentialsAuthenticationError, buildClientCredentialsError = ({
58656
+ status,
58657
+ errorType,
58658
+ errorDesc
58659
+ }) => {
58660
+ let troubleshooting = "";
58661
+ if (errorType === "invalid_client" || status === 401) {
58662
+ troubleshooting = `
58663
+
58664
+ Troubleshooting:` + `
58665
+ • Verify your Client ID is correct` + `
58666
+ • Ensure your Client Secret hasn't expired` + `
58667
+ • Check that the external application is enabled in UiPath` + `
58668
+ • Confirm you're using the correct authority URL`;
58669
+ } else if (errorType === "invalid_scope") {
58670
+ troubleshooting = `
58671
+
58672
+ Troubleshooting:` + `
58673
+ • The requested scopes may not be available for your account` + `
58674
+ • Try using default scopes or contact your UiPath administrator`;
58675
+ }
58676
+ return new ClientCredentialsAuthenticationError(`Client Credentials authentication failed (${status})
58677
+ ` + `Error: ${errorType}
58678
+ ` + `Details: ${errorDesc}${troubleshooting}`, status);
58679
+ }, clientCredentialsLogin = async ({
58626
58680
  clientId,
58627
58681
  clientSecret,
58628
58682
  scope,
@@ -58642,49 +58696,89 @@ var ClientCredentialsAuthenticationError, clientCredentialsLogin = async ({
58642
58696
  if (config3.scopes.length > 0) {
58643
58697
  params.scope = config3.scopes.join(" ");
58644
58698
  }
58645
- const tokenResponse = await fetch(config3.tokenEndpoint, {
58646
- method: "POST",
58647
- headers: {
58648
- "Content-Type": "application/x-www-form-urlencoded"
58649
- },
58650
- body: new URLSearchParams(params)
58699
+ return await requestClientCredentialsToken({
58700
+ tokenEndpoint: config3.tokenEndpoint,
58701
+ baseUrl: config3.baseUrl,
58702
+ params,
58703
+ buildError: buildClientCredentialsError
58651
58704
  });
58652
- const tokenData = await tokenResponse.json();
58653
- if (!tokenResponse.ok) {
58654
- const errorType = tokenData.error || "authentication_failed";
58655
- const errorDesc = tokenData.error_description || "Unknown error";
58656
- let troubleshooting = "";
58657
- if (errorType === "invalid_client" || tokenResponse.status === 401) {
58658
- troubleshooting = `
58705
+ };
58706
+ var init_clientCredentials = __esm(() => {
58707
+ init_config();
58708
+ init_tokenGrant();
58709
+ ClientCredentialsAuthenticationError = class ClientCredentialsAuthenticationError extends Error {
58710
+ status;
58711
+ constructor(message, status) {
58712
+ super(message);
58713
+ this.name = "ClientCredentialsAuthenticationError";
58714
+ this.status = status;
58715
+ }
58716
+ };
58717
+ });
58718
+
58719
+ // ../auth/src/federatedCredentials.ts
58720
+ var JWT_BEARER_ASSERTION_TYPE = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer", FederatedCredentialsAuthenticationError, buildFederatedError = ({
58721
+ status,
58722
+ errorType,
58723
+ errorDesc
58724
+ }) => {
58725
+ let troubleshooting = "";
58726
+ if (errorType === "invalid_client" || errorType === "invalid_grant" || errorType === "invalid_request" || status === 401) {
58727
+ troubleshooting = `
58659
58728
 
58660
58729
  Troubleshooting:` + `
58661
- • Verify your Client ID is correct` + `
58662
- Ensure your Client Secret hasn't expired` + `
58663
- Check that the external application is enabled in UiPath` + `
58730
+ • Verify your Client ID matches the external application` + `
58731
+ Confirm a federated credential is registered on the app whose` + `
58732
+ issuer, audience, and subject exactly match the token's claims` + `
58733
+ (list them: uip admin external-apps federated-credentials list <client-id>)` + `
58734
+ • Check the token was issued by the expected provider and has not expired` + `
58664
58735
  • Confirm you're using the correct authority URL`;
58665
- } else if (errorType === "invalid_scope") {
58666
- troubleshooting = `
58736
+ } else if (errorType === "invalid_scope") {
58737
+ troubleshooting = `
58667
58738
 
58668
58739
  Troubleshooting:` + `
58669
- • The requested scopes may not be available for your account` + `
58740
+ • The requested scopes may not be available for your application` + `
58670
58741
  • Try using default scopes or contact your UiPath administrator`;
58671
- }
58672
- throw new ClientCredentialsAuthenticationError(`Client Credentials authentication failed (${tokenResponse.status})
58673
- ` + `Error: ${errorType}
58674
- ` + `Details: ${errorDesc}${troubleshooting}`, tokenResponse.status);
58675
58742
  }
58676
- return {
58677
- UIPATH_ACCESS_TOKEN: tokenData.access_token,
58678
- UIPATH_URL: config3.baseUrl
58743
+ return new FederatedCredentialsAuthenticationError(`Federated Credentials authentication failed (${status})
58744
+ ` + `Error: ${errorType}
58745
+ ` + `Details: ${errorDesc}${troubleshooting}`, status);
58746
+ }, federatedCredentialsLogin = async ({
58747
+ clientId,
58748
+ clientAssertion,
58749
+ scope,
58750
+ authority
58751
+ }) => {
58752
+ const config3 = await resolveConfigAsync({
58753
+ customAuthority: authority,
58754
+ customClientId: clientId,
58755
+ customClientAssertion: clientAssertion,
58756
+ customScopes: scope
58757
+ });
58758
+ const params = {
58759
+ grant_type: "client_credentials",
58760
+ client_id: config3.clientId,
58761
+ client_assertion: clientAssertion,
58762
+ client_assertion_type: JWT_BEARER_ASSERTION_TYPE
58679
58763
  };
58764
+ if (config3.scopes.length > 0) {
58765
+ params.scope = config3.scopes.join(" ");
58766
+ }
58767
+ return await requestClientCredentialsToken({
58768
+ tokenEndpoint: config3.tokenEndpoint,
58769
+ baseUrl: config3.baseUrl,
58770
+ params,
58771
+ buildError: buildFederatedError
58772
+ });
58680
58773
  };
58681
- var init_clientCredentials = __esm(() => {
58774
+ var init_federatedCredentials = __esm(() => {
58682
58775
  init_config();
58683
- ClientCredentialsAuthenticationError = class ClientCredentialsAuthenticationError extends Error {
58776
+ init_tokenGrant();
58777
+ FederatedCredentialsAuthenticationError = class FederatedCredentialsAuthenticationError extends Error {
58684
58778
  status;
58685
58779
  constructor(message, status) {
58686
58780
  super(message);
58687
- this.name = "ClientCredentialsAuthenticationError";
58781
+ this.name = "FederatedCredentialsAuthenticationError";
58688
58782
  this.status = status;
58689
58783
  }
58690
58784
  };
@@ -58789,6 +58883,7 @@ var interactiveLoginWithDeps = async (options, deps) => {
58789
58883
  const {
58790
58884
  resolveConfig = resolveConfigAsync,
58791
58885
  clientCredentials = clientCredentialsLogin,
58886
+ federatedCredentials = federatedCredentialsLogin,
58792
58887
  auth: auth2 = authenticate,
58793
58888
  saveEnvFile = saveEnvFileAsync,
58794
58889
  loadEnvFile = loadEnvFileAsync,
@@ -58803,6 +58898,7 @@ var interactiveLoginWithDeps = async (options, deps) => {
58803
58898
  authority,
58804
58899
  clientId,
58805
58900
  clientSecret,
58901
+ clientAssertion,
58806
58902
  tenant,
58807
58903
  organization,
58808
58904
  interactive,
@@ -58828,14 +58924,22 @@ var interactiveLoginWithDeps = async (options, deps) => {
58828
58924
  const config3 = await resolveConfig({
58829
58925
  customAuthority: authority,
58830
58926
  customClientId: clientId,
58831
- customClientSecret: clientSecret
58927
+ customClientSecret: clientSecret,
58928
+ customClientAssertion: clientAssertion
58832
58929
  });
58833
58930
  const { clientSecret: resolvedSecret } = config3;
58834
- if (noBrowser && !resolvedSecret && !onEvent) {
58931
+ if (noBrowser && !resolvedSecret && !clientAssertion && !onEvent) {
58835
58932
  throw new Error("noBrowser login requires an onEvent subscriber to receive the " + "auth-url event — the authorize URL is delivered through it.");
58836
58933
  }
58837
- const authFlow = resolvedSecret ? "client_credentials" : "authorization_code";
58838
- const authPromise = resolvedSecret ? (async () => {
58934
+ const authFlow = clientAssertion ? "federated_credentials" : resolvedSecret ? "client_credentials" : "authorization_code";
58935
+ const authPromise = clientAssertion ? (async () => {
58936
+ return await federatedCredentials({
58937
+ clientId: config3.clientId,
58938
+ clientAssertion,
58939
+ authority: config3.baseUrl,
58940
+ scope
58941
+ });
58942
+ })() : resolvedSecret ? (async () => {
58839
58943
  return await clientCredentials({
58840
58944
  clientId: config3.clientId,
58841
58945
  clientSecret: resolvedSecret,
@@ -58869,6 +58973,9 @@ var interactiveLoginWithDeps = async (options, deps) => {
58869
58973
  UIPATH_URL: config3.baseUrl,
58870
58974
  [AUTH_FLOW_ENV_VAR]: authFlow
58871
58975
  };
58976
+ if (authFlow !== "authorization_code") {
58977
+ credentials.UIPATH_REFRESH_TOKEN = undefined;
58978
+ }
58872
58979
  try {
58873
58980
  const tokenData = jwtParser(tokens.UIPATH_ACCESS_TOKEN);
58874
58981
  const orgId = tokenData.prtId || tokenData.organizationId || tokenData.prt_id;
@@ -58952,6 +59059,7 @@ var init_interactive = __esm(() => {
58952
59059
  init_src();
58953
59060
  init_clientCredentials();
58954
59061
  init_config();
59062
+ init_federatedCredentials();
58955
59063
  init_src2();
58956
59064
  init_selectTenant();
58957
59065
  init_envFile();
@@ -59480,6 +59588,7 @@ __export(exports_src, {
59480
59588
  getActiveAuthProfileFilePath: () => getActiveAuthProfileFilePath,
59481
59589
  getActiveAuthProfile: () => getActiveAuthProfile,
59482
59590
  fetchTenantsAndOrganizations: () => fetchTenantsAndOrganizations,
59591
+ federatedCredentialsLogin: () => federatedCredentialsLogin,
59483
59592
  clientCredentialsLogin: () => clientCredentialsLogin,
59484
59593
  clearRefreshBreaker: () => clearRefreshBreaker,
59485
59594
  clearActiveAuthProfile: () => clearActiveAuthProfile,
@@ -59489,9 +59598,11 @@ __export(exports_src, {
59489
59598
  TenantSelectionError: () => TenantSelectionError,
59490
59599
  TENANT_SELECTION_REQUIRED_CODE: () => TENANT_SELECTION_REQUIRED_CODE,
59491
59600
  LoginStatusSource: () => LoginStatusSource,
59601
+ JWT_BEARER_ASSERTION_TYPE: () => JWT_BEARER_ASSERTION_TYPE,
59492
59602
  InvalidTenantError: () => InvalidTenantError,
59493
59603
  InvalidBaseUrlError: () => InvalidBaseUrlError,
59494
59604
  INVALID_TENANT_CODE: () => INVALID_TENANT_CODE,
59605
+ FederatedCredentialsAuthenticationError: () => FederatedCredentialsAuthenticationError,
59495
59606
  EnvAuthConfigError: () => EnvAuthConfigError,
59496
59607
  ENV_AUTH_VARS: () => ENV_AUTH_VARS,
59497
59608
  ENV_AUTH_ENABLE_VAR: () => ENV_AUTH_ENABLE_VAR,
@@ -59587,6 +59698,7 @@ var init_src2 = __esm(() => {
59587
59698
  init_config();
59588
59699
  init_constants();
59589
59700
  init_envAuth();
59701
+ init_federatedCredentials();
59590
59702
  init_refreshCircuitBreaker();
59591
59703
  init_selectTenant();
59592
59704
  init_server();
@@ -59604,7 +59716,7 @@ var init_src2 = __esm(() => {
59604
59716
  var package_default = {
59605
59717
  name: "@uipath/codedapp-tool",
59606
59718
  license: "MIT",
59607
- version: "1.198.0",
59719
+ version: "1.199.0-preview.105",
59608
59720
  description: "Build, pack, publish, deploy, and manage UiPath Coded Web Applications.",
59609
59721
  keywords: [
59610
59722
  "cli-tool",
@@ -66540,6 +66652,7 @@ var SKILL_ATTRIBUTION = attributionRecord([
66540
66652
  var KNOWN_SKILL_NAMES = new Set(Object.keys(SKILL_ATTRIBUTION));
66541
66653
  var COMMAND_ATTRIBUTION = commandAttribution([
66542
66654
  ["cli", "troubleshoot", ["uip.feedback"]],
66655
+ ["llm-gateway", "operate", ["uip.llm-gateway"]],
66543
66656
  ["llm-gateway", "operate", ["uip.llm-configuration", "uip.model-hub"]],
66544
66657
  ["context-grounding", "build", ["uip.context-grounding"]],
66545
66658
  ["api-workflow", "build", ["uip.api-workflow"]],
@@ -73157,8 +73270,9 @@ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
73157
73270
 
73158
73271
  // ../../node_modules/ora/node_modules/string-width/index.js
73159
73272
  var segmenter = new Intl.Segmenter;
73160
- var zeroWidthClusterRegex = /^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Format}|\p{Mark}|\p{Surrogate})+$/v;
73161
- var leadingNonPrintingRegex = /^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}\p{Surrogate}]+/v;
73273
+ var zeroWidthClusterRegex = /^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Format}|\p{Nonspacing_Mark}|\p{Enclosing_Mark}|\p{Surrogate})+$/v;
73274
+ var leadingNonPrintingRegex = /^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Nonspacing_Mark}\p{Enclosing_Mark}\p{Surrogate}]+/v;
73275
+ var spacingMarkRegex = /\p{Spacing_Mark}/v;
73162
73276
  var rgiEmojiRegex = /^\p{RGI_Emoji}$/v;
73163
73277
  var unqualifiedKeycapRegex = /^[\d#*]\u20E3$/;
73164
73278
  var extendedPictographicRegex = /\p{Extended_Pictographic}/gu;
@@ -73225,7 +73339,7 @@ function hangulClusterWidth(visibleSegment, eastAsianWidthOptions) {
73225
73339
  }
73226
73340
  return width;
73227
73341
  }
73228
- function trailingHalfwidthWidth(visibleSegment, eastAsianWidthOptions) {
73342
+ function trailingWidth(visibleSegment, eastAsianWidthOptions) {
73229
73343
  let extra = 0;
73230
73344
  let first = true;
73231
73345
  for (const character of visibleSegment) {
@@ -73233,7 +73347,7 @@ function trailingHalfwidthWidth(visibleSegment, eastAsianWidthOptions) {
73233
73347
  first = false;
73234
73348
  continue;
73235
73349
  }
73236
- if (character >= "＀" && character <= "￯") {
73350
+ if (spacingMarkRegex.test(character) || character >= "＀" && character <= "￯") {
73237
73351
  extra += eastAsianWidth(character.codePointAt(0), eastAsianWidthOptions);
73238
73352
  }
73239
73353
  }
@@ -73275,7 +73389,7 @@ function stringWidth(input, options = {}) {
73275
73389
  }
73276
73390
  const codePoint = visibleSegment.codePointAt(0);
73277
73391
  width += eastAsianWidth(codePoint, eastAsianWidthOptions);
73278
- width += trailingHalfwidthWidth(visibleSegment, eastAsianWidthOptions);
73392
+ width += trailingWidth(visibleSegment, eastAsianWidthOptions);
73279
73393
  }
73280
73394
  return width;
73281
73395
  }
@@ -73727,7 +73841,7 @@ class Ora {
73727
73841
  return this;
73728
73842
  }
73729
73843
  start(text) {
73730
- if (text) {
73844
+ if (text !== undefined) {
73731
73845
  this.text = text;
73732
73846
  }
73733
73847
  if (this.isSilent) {
@@ -89985,14 +90099,22 @@ function appendQueryParams(url2, params) {
89985
90099
  const separator = url2.includes("?") ? "&" : "?";
89986
90100
  return `${url2}${separator}${serialized}`;
89987
90101
  }
90102
+ var GUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
90103
+ function toHostLabel(orgName) {
90104
+ if (GUID_REGEX.test(orgName)) {
90105
+ return orgName;
90106
+ }
90107
+ return orgName.replace(/_/g, "-");
90108
+ }
89988
90109
  function buildAppUrl(baseUrl, orgName, routingName) {
89989
90110
  const urlWithoutProtocol = baseUrl.replace(/^https?:\/\//, "").replace(/\/$/, "");
89990
90111
  const match = urlWithoutProtocol.match(/^([^.]+)\.uipath\.com/);
89991
90112
  const environment = match ? match[1] : "cloud";
90113
+ const host = toHostLabel(orgName);
89992
90114
  if (environment === "cloud") {
89993
- return `https://${orgName}.uipath.host/${routingName}`;
90115
+ return `https://${host}.uipath.host/${routingName}`;
89994
90116
  }
89995
- return `https://${orgName}.${environment}.uipath.host/${routingName}`;
90117
+ return `https://${host}.${environment}.uipath.host/${routingName}`;
89996
90118
  }
89997
90119
 
89998
90120
  // src/utils/app-config.ts
@@ -90935,7 +91057,7 @@ function querystringSingleKey(key, value, keyPrefix = "") {
90935
91057
  var package_default2 = {
90936
91058
  name: "@uipath/solution-sdk",
90937
91059
  license: "MIT",
90938
- version: "1.198.0",
91060
+ version: "1.199.0-preview.105",
90939
91061
  repository: {
90940
91062
  type: "git",
90941
91063
  url: "https://github.com/UiPath/cli.git",
@@ -91132,7 +91254,7 @@ ${readDirError.message}`)
91132
91254
  registration: {
91133
91255
  Status: "Skipped",
91134
91256
  Message: "Project registration skipped.",
91135
- Instructions: `Found multiple .uipx files in ${currentDir}: ${solutionFiles.join(", ")}. Run 'uip solution project add "${projectDir}" <solution.uipx>' to choose one.`
91257
+ Instructions: `Found multiple .uipx files in ${currentDir}: ${solutionFiles.join(", ")}. Run 'uip solution projects add "${projectDir}" <solution.uipx>' to choose one.`
91136
91258
  }
91137
91259
  };
91138
91260
  }
@@ -91243,7 +91365,7 @@ async function readSolutionManifest(fs8, solutionFile) {
91243
91365
  const projectRelativePath = readString(project.ProjectRelativePath);
91244
91366
  if (!projectRelativePath) {
91245
91367
  return [
91246
- new Error(`Invalid solution file: Projects[${index}] is missing ProjectRelativePath. Use 'uip solution project add' to repair the manifest.`),
91368
+ new Error(`Invalid solution file: Projects[${index}] is missing ProjectRelativePath. Use 'uip solution projects add' to repair the manifest.`),
91247
91369
  null
91248
91370
  ];
91249
91371
  }
@@ -91270,7 +91392,7 @@ function buildRegistrationSuccessInstructions(solutionDir) {
91270
91392
  function buildRegistrationFailureInstructions(projectDir, details) {
91271
91393
  return [
91272
91394
  "Automatic solution registration could not complete.",
91273
- `Run 'uip solution project add "${projectDir}" <solution.uipx>' after checking the project and solution files.`,
91395
+ `Run 'uip solution projects add "${projectDir}" <solution.uipx>' after checking the project and solution files.`,
91274
91396
  `Details: ${details}`
91275
91397
  ].join(`
91276
91398
  `);
@@ -91279,14 +91401,14 @@ function buildStandaloneInstructions(projectDir) {
91279
91401
  return [
91280
91402
  "No parent solution was found by walking ancestor directories.",
91281
91403
  "Studio Web upload, `flow debug`, and packaging require an enclosing solution.",
91282
- `To link this project to a solution, run 'uip solution init "<SolutionName>"' then 'uip solution project add "${projectDir}" <SolutionName>.uipx'.`
91404
+ `To link this project to a solution, run 'uip solution init "<SolutionName>"' then 'uip solution projects add "${projectDir}" <SolutionName>.uipx'.`
91283
91405
  ].join(`
91284
91406
  `);
91285
91407
  }
91286
91408
  function buildOptedOutInstructions(projectDir) {
91287
91409
  return [
91288
91410
  "Automatic solution registration was skipped because --skip-solution-registration was passed.",
91289
- `To register this project later, run 'uip solution project add "${projectDir}" <SolutionName>.uipx' from within the solution.`
91411
+ `To register this project later, run 'uip solution projects add "${projectDir}" <SolutionName>.uipx' from within the solution.`
91290
91412
  ].join(`
91291
91413
  `);
91292
91414
  }
@@ -94193,10 +94315,12 @@ class ToolResult2 {
94193
94315
  message;
94194
94316
  packages;
94195
94317
  details;
94196
- constructor(errorCode, message, packages = []) {
94318
+ instructions;
94319
+ constructor(errorCode, message, packages = [], instructions) {
94197
94320
  this.errorCode = errorCode;
94198
94321
  this.message = message;
94199
94322
  this.packages = packages;
94323
+ this.instructions = instructions;
94200
94324
  }
94201
94325
  get isSuccess() {
94202
94326
  return this.errorCode === "SUCCESS";
@@ -94204,8 +94328,8 @@ class ToolResult2 {
94204
94328
  static success() {
94205
94329
  return new ToolResult2("SUCCESS");
94206
94330
  }
94207
- static error(errorCode, message) {
94208
- return new ToolResult2(errorCode, message);
94331
+ static error(errorCode, message, instructions) {
94332
+ return new ToolResult2(errorCode, message, [], instructions);
94209
94333
  }
94210
94334
  }
94211
94335
  function escapeXml(str2) {
@@ -98879,4 +99003,4 @@ export {
98879
99003
  metadata
98880
99004
  };
98881
99005
 
98882
- //# debugId=3A918173ECD33A3D64756E2164756E21
99006
+ //# debugId=5BA755D90B30B2E764756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/codedapp-tool",
3
3
  "license": "MIT",
4
- "version": "1.198.0",
4
+ "version": "1.199.0-preview.105",
5
5
  "description": "Build, pack, publish, deploy, and manage UiPath Coded Web Applications.",
6
6
  "keywords": [
7
7
  "cli-tool",
@@ -27,5 +27,5 @@
27
27
  "publishConfig": {
28
28
  "registry": "https://registry.npmjs.org/"
29
29
  },
30
- "gitHead": "1fadf03d7a8dd102742571dff569fdac11808afb"
30
+ "gitHead": "30a83200f41e8bb994929322e33176b4355f6707"
31
31
  }