@uipath/codedapp-tool 1.204.1-preview.254 → 1.204.1
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
|
@@ -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
|
|
20631
|
+
version: "1.204.1",
|
|
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) => {
|
|
@@ -21802,7 +21805,11 @@ function buildAppUrl(params) {
|
|
|
21802
21805
|
}
|
|
21803
21806
|
|
|
21804
21807
|
// src/utils/error-handler.ts
|
|
21805
|
-
var
|
|
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
|
+
}
|
|
21806
21813
|
function appsServiceHint(status, appsServiceToken) {
|
|
21807
21814
|
if (status !== 401 || !appsServiceToken)
|
|
21808
21815
|
return;
|
|
@@ -21810,7 +21817,7 @@ function appsServiceHint(status, appsServiceToken) {
|
|
|
21810
21817
|
return;
|
|
21811
21818
|
}
|
|
21812
21819
|
const scopes = readTokenScopes(appsServiceToken) ?? [];
|
|
21813
|
-
if (scopes.some(
|
|
21820
|
+
if (scopes.some(isAppsScope)) {
|
|
21814
21821
|
return;
|
|
21815
21822
|
}
|
|
21816
21823
|
return MESSAGES.ERRORS.APPS_SERVICE_APP_TOKEN_HINT;
|
|
@@ -21828,14 +21835,17 @@ HTTP ${response.status}: ${MESSAGES.ERRORS.NO_ERROR_DETAILS}`;
|
|
|
21828
21835
|
}
|
|
21829
21836
|
return fullMessage;
|
|
21830
21837
|
}
|
|
21831
|
-
async function
|
|
21838
|
+
async function createHttpError(response, context, appsServiceToken) {
|
|
21832
21839
|
const errorMessage = await createHttpErrorMessage(response, context, appsServiceToken);
|
|
21833
21840
|
const error = new Error(errorMessage);
|
|
21834
21841
|
if (appsServiceHint(response.status, appsServiceToken)) {
|
|
21835
21842
|
const errorCode = "permission_denied";
|
|
21836
21843
|
Object.assign(error, { errorCode });
|
|
21837
21844
|
}
|
|
21838
|
-
|
|
21845
|
+
return error;
|
|
21846
|
+
}
|
|
21847
|
+
async function handleHttpError(response, context, appsServiceToken) {
|
|
21848
|
+
throw await createHttpError(response, context, appsServiceToken);
|
|
21839
21849
|
}
|
|
21840
21850
|
|
|
21841
21851
|
// src/services/deployed-apps.ts
|
|
@@ -21885,8 +21895,8 @@ async function checkPathName(pathName, envConfig, errorContext = MESSAGES.ERROR_
|
|
|
21885
21895
|
})
|
|
21886
21896
|
});
|
|
21887
21897
|
if (!response.ok) {
|
|
21888
|
-
const
|
|
21889
|
-
throw Object.assign(
|
|
21898
|
+
const error = await createHttpError(response, errorContext, envConfig.accessToken);
|
|
21899
|
+
throw Object.assign(error, { status: response.status });
|
|
21890
21900
|
}
|
|
21891
21901
|
const data = await response.json();
|
|
21892
21902
|
return { available: data.isUnique, occupiedBy: data.occupiedBy ?? null };
|
|
@@ -28865,7 +28875,6 @@ async function getPublishedAppWithRetry(appNames, envConfig, version, onRetry) {
|
|
|
28865
28875
|
function sleep(delayMs) {
|
|
28866
28876
|
return new Promise((resolve) => setTimeout(resolve, delayMs));
|
|
28867
28877
|
}
|
|
28868
|
-
var MAX_CODED_APP_NAME_LENGTH = 32;
|
|
28869
28878
|
function validateAppNameLength(name) {
|
|
28870
28879
|
if (name.length <= MAX_CODED_APP_NAME_LENGTH)
|
|
28871
28880
|
return;
|
|
@@ -28874,7 +28883,7 @@ function validateAppNameLength(name) {
|
|
|
28874
28883
|
async function checkAppNameUniqueness(appName, envConfig) {
|
|
28875
28884
|
const { available } = await checkPathName(appName, envConfig, MESSAGES.ERROR_CONTEXT.APP_DEPLOYMENT);
|
|
28876
28885
|
if (!available) {
|
|
28877
|
-
throw new Error(
|
|
28886
|
+
throw new Error(MESSAGE_BUILDERS.PATH_NAME_TAKEN(appName));
|
|
28878
28887
|
}
|
|
28879
28888
|
}
|
|
28880
28889
|
async function deployNewApp(appName, routingName, systemName, deployVersion, envConfig, tags, clientId) {
|
|
@@ -29522,7 +29531,7 @@ var package_default2 = {
|
|
|
29522
29531
|
name: "@uipath/solution-sdk",
|
|
29523
29532
|
author: "UiPath",
|
|
29524
29533
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
29525
|
-
version: "1.204.0
|
|
29534
|
+
version: "1.204.0",
|
|
29526
29535
|
repository: {
|
|
29527
29536
|
type: "git",
|
|
29528
29537
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -34088,6 +34097,9 @@ async function executeValidatePathName(options) {
|
|
|
34088
34097
|
if (!pathName) {
|
|
34089
34098
|
throw new Error(MESSAGES.VALIDATIONS.PATH_NAME_REQUIRED);
|
|
34090
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
|
+
}
|
|
34091
34103
|
if (isModified) {
|
|
34092
34104
|
logger2.log(source_default.yellow(MESSAGE_BUILDERS.APP_NAME_SANITIZED(options.pathName, pathName)));
|
|
34093
34105
|
}
|
|
@@ -34148,9 +34160,13 @@ var VALIDATE_EXAMPLES = [
|
|
|
34148
34160
|
}
|
|
34149
34161
|
];
|
|
34150
34162
|
function parsePathNameOption(raw) {
|
|
34151
|
-
|
|
34163
|
+
const { sanitized } = sanitizeAppName(raw);
|
|
34164
|
+
if (!sanitized) {
|
|
34152
34165
|
throw new InvalidArgumentError(MESSAGES.VALIDATIONS.PATH_NAME_REQUIRED);
|
|
34153
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
|
+
}
|
|
34154
34170
|
return raw;
|
|
34155
34171
|
}
|
|
34156
34172
|
function instructionsForFailure2(errorCode) {
|
|
@@ -34181,11 +34197,12 @@ async function reportCheckFailure(error2) {
|
|
|
34181
34197
|
return;
|
|
34182
34198
|
}
|
|
34183
34199
|
const details = await extractErrorDetails(error2);
|
|
34200
|
+
const carriedCode = carriedErrorCode(error2);
|
|
34184
34201
|
OutputFormatter.error({
|
|
34185
34202
|
Result: details.result,
|
|
34186
|
-
ErrorCode: details.errorCode,
|
|
34203
|
+
ErrorCode: carriedCode ?? details.errorCode,
|
|
34187
34204
|
Message: `Could not check the path name: ${details.message}`,
|
|
34188
|
-
Instructions: instructionsForFailure2(details.errorCode),
|
|
34205
|
+
Instructions: carriedCode === "permission_denied" ? MESSAGES.ERRORS.APPS_SERVICE_APP_TOKEN_READ_HINT : instructionsForFailure2(details.errorCode),
|
|
34189
34206
|
Retry: details.retry
|
|
34190
34207
|
});
|
|
34191
34208
|
processContext.exit(EXIT_CODES[details.result] ?? 1);
|
|
@@ -34270,4 +34287,4 @@ var registerCommands = async (program) => {
|
|
|
34270
34287
|
|
|
34271
34288
|
export { metadata, registerCommands };
|
|
34272
34289
|
|
|
34273
|
-
//# debugId=
|
|
34290
|
+
//# debugId=265ED5C9436AB0A164756E2164756E21
|
package/dist/tool.js
CHANGED
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
|
|
5
|
+
"version": "1.204.1",
|
|
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": "
|
|
32
|
+
"gitHead": "699c58dabb59414557755a8933bcbe40aa420df3"
|
|
33
33
|
}
|