@uipath/codedapp-tool 1.204.1-preview.250 → 1.204.1-preview.255

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.
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  metadata,
4
4
  registerCommands
5
- } from "./packager-tool-3tjt4ztk.js";
5
+ } from "./packager-tool-zy0bgdq8.js";
6
6
  import"./packager-tool-zzg1ddjd.js";
7
7
  import"./packager-tool-nd0vpsgx.js";
8
8
  import"./packager-tool-cakm5nqb.js";
@@ -20628,7 +20628,7 @@ var package_default = {
20628
20628
  name: "@uipath/codedapp-tool",
20629
20629
  author: "UiPath",
20630
20630
  license: "SEE LICENSE IN LICENSE.txt",
20631
- version: "1.204.1-preview.250",
20631
+ version: "1.204.1-preview.255",
20632
20632
  description: "Build, pack, publish, deploy, and manage UiPath Coded Web Applications.",
20633
20633
  keywords: [
20634
20634
  "cli-tool",
@@ -21417,6 +21417,7 @@ var ACTION_SCHEMA_CONSTANTS = {
21417
21417
  ACTION_SCHEMA_FILENAME: "action-schema.json"
21418
21418
  };
21419
21419
  var DEFAULT_APP_VERSION = "1.0.0";
21420
+ var MAX_CODED_APP_NAME_LENGTH = 64;
21420
21421
  // src/constants/messages.ts
21421
21422
  var MESSAGES = {
21422
21423
  ERRORS: {
@@ -21429,6 +21430,7 @@ var MESSAGES = {
21429
21430
  ACCESS_DENIED: "Access denied. You may not have permission to access this tenant/organization",
21430
21431
  API_ENDPOINT_NOT_FOUND: "API endpoint not found. Please check your UIPATH_BASE_URL configuration",
21431
21432
  APPS_SERVICE_APP_TOKEN_HINT: "The UiPath Apps service rejected this external application's token: it is missing the Apps.Read and Apps.Write scopes. Grant them to the external application (Admin > External Applications), then add them to 'uip login --scope'.",
21433
+ APPS_SERVICE_APP_TOKEN_READ_HINT: "The UiPath Apps service rejected this external application's token: it is missing the Apps.Read scope. Grant it to the external application (Admin > External Applications), then add it to 'uip login --scope'.",
21432
21434
  SERVER_ERROR: "Server error occurred. Please try again later or contact UiPath support",
21433
21435
  SERVICES_UNAVAILABLE: "UiPath services are temporarily unavailable. Please try again later",
21434
21436
  RATE_LIMIT_EXCEEDED: "Rate limit exceeded. Please wait and try again",
@@ -21448,7 +21450,6 @@ var MESSAGES = {
21448
21450
  APP_UPGRADE_FAILED: "❌ App upgrade failed",
21449
21451
  PERSONAL_WORKSPACE_FEED_MISSING: "❌ Could not resolve your Personal Workspace feed. Ensure Personal Workspaces are enabled for your account, or omit --personal-workspace to publish into the tenant feed.",
21450
21452
  APP_NOT_PUBLISHED: '❌ App has not been published yet, or the published app is still being indexed. If publish just succeeded, wait a few seconds and rerun "uip codedapp deploy"; otherwise run "uip codedapp publish" first.',
21451
- APP_NAME_ALREADY_EXISTS: "❌ This app name is already deployed in this folder. Please choose a different name.",
21452
21453
  DEPLOY_VERSION_NOT_FOUND: "❌ Could not determine deploy version from the server. Please re-run publish first.",
21453
21454
  DEPLOYMENT_ID_NOT_FOUND: "❌ Could not find deployment ID for the app",
21454
21455
  ALL_REGISTERED_PORTS_IN_USE: "All registered ports are in use",
@@ -21641,6 +21642,8 @@ var MESSAGES = {
21641
21642
  var MESSAGE_BUILDERS = {
21642
21643
  APP_NAME_SANITIZED: (original, sanitized) => `⚠️ App name "${original}" contains invalid characters. Using sanitized name: "${sanitized}"`,
21643
21644
  APP_NAME_TOO_LONG: (name, length, maxLength) => `App name '${name}' is ${length} characters; limit is ${maxLength}. Use --name with a shorter app name and try again.`,
21645
+ PATH_NAME_TOO_LONG: (pathName, length, maxLength) => `Path name '${pathName}' is ${length} characters; limit is ${maxLength}. Pass a shorter --path-name.`,
21646
+ PATH_NAME_TAKEN: (pathName) => `❌ Path name '${pathName}' is already taken in this organization. Pass a different --path-name. To check whether a path name is free, run 'uip codedapp validate --path-name <name>'.`,
21644
21647
  SDK_CONFIG_CREATED: (configPath) => `⚠️ uipath.json not found — created at ${configPath} with empty values.`
21645
21648
  };
21646
21649
  var getHttpErrorMessage = (status, context) => {
@@ -21678,6 +21681,7 @@ var PUSH_IGNORE_PATTERNS = [
21678
21681
  "node_modules/",
21679
21682
  ".uipath/",
21680
21683
  ".gitignore",
21684
+ ".uipignore",
21681
21685
  ".uipathignore",
21682
21686
  ".env",
21683
21687
  ".env.local",
@@ -21801,7 +21805,11 @@ function buildAppUrl(params) {
21801
21805
  }
21802
21806
 
21803
21807
  // src/utils/error-handler.ts
21804
- var APPS_SCOPE_PREFIX = "Apps.";
21808
+ var APPS_SCOPE = "Apps";
21809
+ var APPS_SCOPE_PREFIX = `${APPS_SCOPE}.`;
21810
+ function isAppsScope(scope) {
21811
+ return scope === APPS_SCOPE || scope.startsWith(APPS_SCOPE_PREFIX);
21812
+ }
21805
21813
  function appsServiceHint(status, appsServiceToken) {
21806
21814
  if (status !== 401 || !appsServiceToken)
21807
21815
  return;
@@ -21809,7 +21817,7 @@ function appsServiceHint(status, appsServiceToken) {
21809
21817
  return;
21810
21818
  }
21811
21819
  const scopes = readTokenScopes(appsServiceToken) ?? [];
21812
- if (scopes.some((scope) => scope.startsWith(APPS_SCOPE_PREFIX))) {
21820
+ if (scopes.some(isAppsScope)) {
21813
21821
  return;
21814
21822
  }
21815
21823
  return MESSAGES.ERRORS.APPS_SERVICE_APP_TOKEN_HINT;
@@ -21827,14 +21835,17 @@ HTTP ${response.status}: ${MESSAGES.ERRORS.NO_ERROR_DETAILS}`;
21827
21835
  }
21828
21836
  return fullMessage;
21829
21837
  }
21830
- async function handleHttpError(response, context, appsServiceToken) {
21838
+ async function createHttpError(response, context, appsServiceToken) {
21831
21839
  const errorMessage = await createHttpErrorMessage(response, context, appsServiceToken);
21832
21840
  const error = new Error(errorMessage);
21833
21841
  if (appsServiceHint(response.status, appsServiceToken)) {
21834
21842
  const errorCode = "permission_denied";
21835
21843
  Object.assign(error, { errorCode });
21836
21844
  }
21837
- throw error;
21845
+ return error;
21846
+ }
21847
+ async function handleHttpError(response, context, appsServiceToken) {
21848
+ throw await createHttpError(response, context, appsServiceToken);
21838
21849
  }
21839
21850
 
21840
21851
  // src/services/deployed-apps.ts
@@ -21884,8 +21895,8 @@ async function checkPathName(pathName, envConfig, errorContext = MESSAGES.ERROR_
21884
21895
  })
21885
21896
  });
21886
21897
  if (!response.ok) {
21887
- const message = await createHttpErrorMessage(response, errorContext);
21888
- throw Object.assign(new Error(message), { status: response.status });
21898
+ const error = await createHttpError(response, errorContext, envConfig.accessToken);
21899
+ throw Object.assign(error, { status: response.status });
21889
21900
  }
21890
21901
  const data = await response.json();
21891
21902
  return { available: data.isUnique, occupiedBy: data.occupiedBy ?? null };
@@ -28864,7 +28875,6 @@ async function getPublishedAppWithRetry(appNames, envConfig, version, onRetry) {
28864
28875
  function sleep(delayMs) {
28865
28876
  return new Promise((resolve) => setTimeout(resolve, delayMs));
28866
28877
  }
28867
- var MAX_CODED_APP_NAME_LENGTH = 32;
28868
28878
  function validateAppNameLength(name) {
28869
28879
  if (name.length <= MAX_CODED_APP_NAME_LENGTH)
28870
28880
  return;
@@ -28873,7 +28883,7 @@ function validateAppNameLength(name) {
28873
28883
  async function checkAppNameUniqueness(appName, envConfig) {
28874
28884
  const { available } = await checkPathName(appName, envConfig, MESSAGES.ERROR_CONTEXT.APP_DEPLOYMENT);
28875
28885
  if (!available) {
28876
- throw new Error(MESSAGES.ERRORS.APP_NAME_ALREADY_EXISTS);
28886
+ throw new Error(MESSAGE_BUILDERS.PATH_NAME_TAKEN(appName));
28877
28887
  }
28878
28888
  }
28879
28889
  async function deployNewApp(appName, routingName, systemName, deployVersion, envConfig, tags, clientId) {
@@ -29521,7 +29531,7 @@ var package_default2 = {
29521
29531
  name: "@uipath/solution-sdk",
29522
29532
  author: "UiPath",
29523
29533
  license: "SEE LICENSE IN LICENSE.txt",
29524
- version: "1.204.0-preview.250",
29534
+ version: "1.204.0-preview.255",
29525
29535
  repository: {
29526
29536
  type: "git",
29527
29537
  url: "https://github.com/UiPath/cli.git",
@@ -29577,6 +29587,7 @@ var package_default2 = {
29577
29587
  "@uipath/studioweb-sdk": "workspace:*",
29578
29588
  "@types/node": "^25.5.2",
29579
29589
  fflate: "^0.8.2",
29590
+ ignore: "^5.3.2",
29580
29591
  typescript: "^7.0.2"
29581
29592
  }
29582
29593
  };
@@ -29808,6 +29819,7 @@ function querystringSingleKey2(key, value, keyPrefix = "") {
29808
29819
  var API_PROJECT_TYPES = new Set(["api", "apiautomation"]);
29809
29820
 
29810
29821
  // ../solution-sdk/src/zip-utils.ts
29822
+ var import_ignore = __toESM(require_ignore(), 1);
29811
29823
  var DEFAULT_EXCLUDED_DIR_NAMES = new Set([
29812
29824
  ".venv",
29813
29825
  "node_modules",
@@ -31981,7 +31993,7 @@ async function cleanupEmptyFolders(config, remoteContentRoot, fetchStructure, lo
31981
31993
  }
31982
31994
 
31983
31995
  // src/core/webapp-file-handler/local-files.ts
31984
- var import_ignore = __toESM(require_ignore(), 1);
31996
+ var import_ignore2 = __toESM(require_ignore(), 1);
31985
31997
 
31986
31998
  // src/core/webapp-file-handler/pull-utils.ts
31987
31999
  var PROJECT_ROOT_MARKERS = [
@@ -32080,7 +32092,14 @@ function getFolderPathsForFiles(filesMap) {
32080
32092
 
32081
32093
  // src/core/webapp-file-handler/local-files.ts
32082
32094
  var GITIGNORE_FILENAME = ".gitignore";
32083
- var UIPATHIGNORE_FILENAME = ".uipathignore";
32095
+ var UIPIGNORE_FILENAME2 = ".uipignore";
32096
+ var LEGACY_UIPATHIGNORE_FILENAME = ".uipathignore";
32097
+ var IGNORE_FILENAMES = [
32098
+ GITIGNORE_FILENAME,
32099
+ LEGACY_UIPATHIGNORE_FILENAME,
32100
+ UIPIGNORE_FILENAME2
32101
+ ];
32102
+ var warnedLegacyIgnoreFile = false;
32084
32103
  function extname(filePath) {
32085
32104
  const base = filePath.split("/").pop() ?? filePath;
32086
32105
  const dotIndex = base.lastIndexOf(".");
@@ -32092,17 +32111,18 @@ async function sha256(data) {
32092
32111
  }
32093
32112
  async function buildPushIgnoreFilter(rootDir) {
32094
32113
  const fs = getFileSystem();
32095
- const ig = import_ignore.default();
32114
+ const ig = import_ignore2.default();
32096
32115
  ig.add([...PUSH_IGNORE_PATTERNS]);
32097
- const gitignorePath = fs.path.join(rootDir, GITIGNORE_FILENAME);
32098
- const gitignoreContent = await fs.readFile(gitignorePath, "utf-8");
32099
- if (gitignoreContent !== null) {
32100
- ig.add(gitignoreContent);
32101
- }
32102
- const uipathignorePath = fs.path.join(rootDir, UIPATHIGNORE_FILENAME);
32103
- const uipathignoreContent = await fs.readFile(uipathignorePath, "utf-8");
32104
- if (uipathignoreContent !== null) {
32105
- ig.add(uipathignoreContent);
32116
+ for (const fileName of IGNORE_FILENAMES) {
32117
+ const content = await fs.readFile(fs.path.join(rootDir, fileName), "utf-8");
32118
+ if (content === null) {
32119
+ continue;
32120
+ }
32121
+ if (fileName === LEGACY_UIPATHIGNORE_FILENAME && !warnedLegacyIgnoreFile) {
32122
+ warnedLegacyIgnoreFile = true;
32123
+ logger.warn(`${LEGACY_UIPATHIGNORE_FILENAME} is deprecated and will stop being read in a future release. Rename it to ${UIPIGNORE_FILENAME2} (same syntax); when both exist, ${UIPIGNORE_FILENAME2} takes precedence.`);
32124
+ }
32125
+ ig.add(content);
32106
32126
  }
32107
32127
  return ig;
32108
32128
  }
@@ -34077,6 +34097,9 @@ async function executeValidatePathName(options) {
34077
34097
  if (!pathName) {
34078
34098
  throw new Error(MESSAGES.VALIDATIONS.PATH_NAME_REQUIRED);
34079
34099
  }
34100
+ if (pathName.length > MAX_CODED_APP_NAME_LENGTH) {
34101
+ throw new Error(MESSAGE_BUILDERS.PATH_NAME_TOO_LONG(pathName, pathName.length, MAX_CODED_APP_NAME_LENGTH));
34102
+ }
34080
34103
  if (isModified) {
34081
34104
  logger2.log(source_default.yellow(MESSAGE_BUILDERS.APP_NAME_SANITIZED(options.pathName, pathName)));
34082
34105
  }
@@ -34137,9 +34160,13 @@ var VALIDATE_EXAMPLES = [
34137
34160
  }
34138
34161
  ];
34139
34162
  function parsePathNameOption(raw) {
34140
- if (!sanitizeAppName(raw).sanitized) {
34163
+ const { sanitized } = sanitizeAppName(raw);
34164
+ if (!sanitized) {
34141
34165
  throw new InvalidArgumentError(MESSAGES.VALIDATIONS.PATH_NAME_REQUIRED);
34142
34166
  }
34167
+ if (sanitized.length > MAX_CODED_APP_NAME_LENGTH) {
34168
+ throw new InvalidArgumentError(MESSAGE_BUILDERS.PATH_NAME_TOO_LONG(sanitized, sanitized.length, MAX_CODED_APP_NAME_LENGTH));
34169
+ }
34143
34170
  return raw;
34144
34171
  }
34145
34172
  function instructionsForFailure2(errorCode) {
@@ -34170,11 +34197,12 @@ async function reportCheckFailure(error2) {
34170
34197
  return;
34171
34198
  }
34172
34199
  const details = await extractErrorDetails(error2);
34200
+ const carriedCode = carriedErrorCode(error2);
34173
34201
  OutputFormatter.error({
34174
34202
  Result: details.result,
34175
- ErrorCode: details.errorCode,
34203
+ ErrorCode: carriedCode ?? details.errorCode,
34176
34204
  Message: `Could not check the path name: ${details.message}`,
34177
- Instructions: instructionsForFailure2(details.errorCode),
34205
+ Instructions: carriedCode === "permission_denied" ? MESSAGES.ERRORS.APPS_SERVICE_APP_TOKEN_READ_HINT : instructionsForFailure2(details.errorCode),
34178
34206
  Retry: details.retry
34179
34207
  });
34180
34208
  processContext.exit(EXIT_CODES[details.result] ?? 1);
@@ -34259,4 +34287,4 @@ var registerCommands = async (program) => {
34259
34287
 
34260
34288
  export { metadata, registerCommands };
34261
34289
 
34262
- //# debugId=E6216744A7D44B5364756E2164756E21
34290
+ //# debugId=B51F03B37528E96064756E2164756E21
package/dist/tool.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  metadata,
3
3
  registerCommands
4
- } from "./packager-tool-3tjt4ztk.js";
4
+ } from "./packager-tool-zy0bgdq8.js";
5
5
  import"./packager-tool-zzg1ddjd.js";
6
6
  import"./packager-tool-nd0vpsgx.js";
7
7
  import"./packager-tool-cakm5nqb.js";
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@uipath/codedapp-tool",
3
3
  "author": "UiPath",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
- "version": "1.204.1-preview.250",
5
+ "version": "1.204.1-preview.255",
6
6
  "description": "Build, pack, publish, deploy, and manage UiPath Coded Web Applications.",
7
7
  "keywords": [
8
8
  "cli-tool",
@@ -29,5 +29,5 @@
29
29
  "publishConfig": {
30
30
  "registry": "https://registry.npmjs.org/"
31
31
  },
32
- "gitHead": "80ffb08b3e58d7ca233b16fae8521163b1dcd635"
32
+ "gitHead": "699c58dabb59414557755a8933bcbe40aa420df3"
33
33
  }