@uipath/codedapp-tool 1.204.1-preview.228 → 1.204.1-preview.232
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,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
metadata,
|
|
4
4
|
registerCommands
|
|
5
|
-
} from "./packager-tool-
|
|
5
|
+
} from "./packager-tool-3x32nxvy.js";
|
|
6
6
|
import"./packager-tool-zzg1ddjd.js";
|
|
7
7
|
import"./packager-tool-nd0vpsgx.js";
|
|
8
|
-
import"./packager-tool-
|
|
8
|
+
import"./packager-tool-cakm5nqb.js";
|
|
9
9
|
import {
|
|
10
10
|
Command
|
|
11
11
|
} from "./packager-tool-cfc7qtm7.js";
|
|
@@ -11,8 +11,10 @@ import {
|
|
|
11
11
|
ACTION_SCHEMA_FILE_NAME,
|
|
12
12
|
WEBAPP_MANIFEST_FILE_NAME,
|
|
13
13
|
WebAppToolFactory,
|
|
14
|
-
parseActionSchema
|
|
15
|
-
|
|
14
|
+
parseActionSchema,
|
|
15
|
+
readProjectName,
|
|
16
|
+
validateActionSchema
|
|
17
|
+
} from "./packager-tool-cakm5nqb.js";
|
|
16
18
|
import {
|
|
17
19
|
CommandDimensions,
|
|
18
20
|
ConfigurationError,
|
|
@@ -20626,7 +20628,7 @@ var package_default = {
|
|
|
20626
20628
|
name: "@uipath/codedapp-tool",
|
|
20627
20629
|
author: "UiPath",
|
|
20628
20630
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
20629
|
-
version: "1.204.1-preview.
|
|
20631
|
+
version: "1.204.1-preview.232",
|
|
20630
20632
|
description: "Build, pack, publish, deploy, and manage UiPath Coded Web Applications.",
|
|
20631
20633
|
keywords: [
|
|
20632
20634
|
"cli-tool",
|
|
@@ -21469,6 +21471,7 @@ var MESSAGES = {
|
|
|
21469
21471
|
PUSH_DISALLOWED_EXTENSIONS: "Push blocked: files with disallowed extensions found. Only web-related file types are allowed.",
|
|
21470
21472
|
PUSH_FILE_TOO_LARGE: "Push blocked: one or more files exceed the 10 MB size limit. Consider uploading large assets to cloud storage and referencing them in your code instead.",
|
|
21471
21473
|
PUSH_LARGE_FILES_DECLINED: "Push cancelled by user.",
|
|
21474
|
+
PUSH_ALLOW_LARGE_FILES_REQUIRED: "Push blocked: one or more files exceed 2 MB. Pass --allow-large-files to push them.",
|
|
21472
21475
|
PUSH_BUILD_DIR_NOT_FOUND: "Build directory not found.",
|
|
21473
21476
|
PUSH_BUILD_DIR_NOT_DIRECTORY: "Build path is not a directory.",
|
|
21474
21477
|
PUSH_BUILD_DIR_STEPS: `Steps:
|
|
@@ -29518,7 +29521,7 @@ var package_default2 = {
|
|
|
29518
29521
|
name: "@uipath/solution-sdk",
|
|
29519
29522
|
author: "UiPath",
|
|
29520
29523
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
29521
|
-
version: "1.204.0-preview.
|
|
29524
|
+
version: "1.204.0-preview.232",
|
|
29522
29525
|
repository: {
|
|
29523
29526
|
type: "git",
|
|
29524
29527
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -30544,7 +30547,13 @@ var registerPackCommand = (program) => {
|
|
|
30544
30547
|
};
|
|
30545
30548
|
|
|
30546
30549
|
// src/utils/action-schema.ts
|
|
30547
|
-
async function readAndParseActionSchema() {
|
|
30550
|
+
async function readAndParseActionSchema(appName) {
|
|
30551
|
+
return parseActionSchema(await readActionSchemaFile(), appName);
|
|
30552
|
+
}
|
|
30553
|
+
async function validateActionSchemaFile() {
|
|
30554
|
+
validateActionSchema(await readActionSchemaFile());
|
|
30555
|
+
}
|
|
30556
|
+
async function readActionSchemaFile() {
|
|
30548
30557
|
const fs = getFileSystem();
|
|
30549
30558
|
const cwd = fs.env.cwd();
|
|
30550
30559
|
const actionSchemaPath = fs.path.join(cwd, ACTION_SCHEMA_FILE_NAME);
|
|
@@ -30552,7 +30561,7 @@ async function readAndParseActionSchema() {
|
|
|
30552
30561
|
if (raw === null) {
|
|
30553
30562
|
throw new Error(`action-schema.json not found at ${actionSchemaPath}`);
|
|
30554
30563
|
}
|
|
30555
|
-
return
|
|
30564
|
+
return raw;
|
|
30556
30565
|
}
|
|
30557
30566
|
|
|
30558
30567
|
// src/actions/publish.ts
|
|
@@ -30645,7 +30654,8 @@ async function registerCodedApp(metadata, envConfig, isActionApp, feedId, logger
|
|
|
30645
30654
|
const url = appendQueryParams(`${envConfig.baseUrl}/${envConfig.orgId}${API_ENDPOINTS.PUBLISH_CODED_APP}`, BASIC_ORIGIN_QUERY_PARAMS);
|
|
30646
30655
|
let actionSchema = {};
|
|
30647
30656
|
if (isActionApp) {
|
|
30648
|
-
const
|
|
30657
|
+
const appName = feedId ? `${metadata.packageName}@${feedId}` : metadata.packageName;
|
|
30658
|
+
const [schemaError, parsedSchema] = await catchError(readAndParseActionSchema(appName));
|
|
30649
30659
|
if (schemaError) {
|
|
30650
30660
|
logger2.log("");
|
|
30651
30661
|
logger2.log(source_default.red(`${MESSAGES.ERRORS.FAILED_TO_PARSE_ACTION_SCHEMA} ${schemaError instanceof Error ? schemaError.message : MESSAGES.ERRORS.UNKNOWN_ERROR}`));
|
|
@@ -33569,7 +33579,8 @@ async function runUpdateResourceConfiguration(config) {
|
|
|
33569
33579
|
if (!await fs.exists(schemaPath)) {
|
|
33570
33580
|
config.logger.log(source_default.yellow(MESSAGES.ERRORS.ACTION_SCHEMA_REQUIRED_REMOTE));
|
|
33571
33581
|
} else {
|
|
33572
|
-
const
|
|
33582
|
+
const appName = await readProjectName(fs, config.rootDir, projectName);
|
|
33583
|
+
const parsedSchema = await readAndParseActionSchema(appName);
|
|
33573
33584
|
payload.actionSchema = JSON.stringify(parsedSchema);
|
|
33574
33585
|
}
|
|
33575
33586
|
}
|
|
@@ -33619,6 +33630,7 @@ function validateExtensions(allFiles, logger2) {
|
|
|
33619
33630
|
});
|
|
33620
33631
|
if (disallowed.length === 0)
|
|
33621
33632
|
return;
|
|
33633
|
+
logger2.stopSpinner?.();
|
|
33622
33634
|
logger2.log(source_default.red(`
|
|
33623
33635
|
Files with disallowed extensions:`));
|
|
33624
33636
|
for (const f of disallowed) {
|
|
@@ -33631,6 +33643,7 @@ function validateOversized(allFiles, logger2) {
|
|
|
33631
33643
|
const oversized = allFiles.filter((f) => f.content.length >= PUSH_FILE_SIZE_BLOCK_BYTES);
|
|
33632
33644
|
if (oversized.length === 0)
|
|
33633
33645
|
return;
|
|
33646
|
+
logger2.stopSpinner?.();
|
|
33634
33647
|
logger2.log(source_default.red(`
|
|
33635
33648
|
Files exceeding 10 MB size limit:`));
|
|
33636
33649
|
for (const f of oversized) {
|
|
@@ -33643,6 +33656,7 @@ async function validateLargeFiles(allFiles, logger2) {
|
|
|
33643
33656
|
const large = allFiles.filter((f) => f.content.length >= PUSH_FILE_SIZE_WARN_BYTES && f.content.length < PUSH_FILE_SIZE_BLOCK_BYTES);
|
|
33644
33657
|
if (large.length === 0)
|
|
33645
33658
|
return;
|
|
33659
|
+
logger2.stopSpinner?.();
|
|
33646
33660
|
logger2.log(source_default.yellow(`
|
|
33647
33661
|
Large files detected (> 2 MB):`));
|
|
33648
33662
|
for (const f of large) {
|
|
@@ -33651,7 +33665,7 @@ Large files detected (> 2 MB):`));
|
|
|
33651
33665
|
logger2.log(source_default.yellow(`Consider uploading large assets to cloud storage instead.
|
|
33652
33666
|
`));
|
|
33653
33667
|
if (!canPrompt()) {
|
|
33654
|
-
throw new Error(MESSAGES.ERRORS.
|
|
33668
|
+
throw new Error(MESSAGES.ERRORS.PUSH_ALLOW_LARGE_FILES_REQUIRED);
|
|
33655
33669
|
}
|
|
33656
33670
|
const { proceed } = await esm_default15.prompt([
|
|
33657
33671
|
{
|
|
@@ -33664,18 +33678,19 @@ Large files detected (> 2 MB):`));
|
|
|
33664
33678
|
if (!proceed) {
|
|
33665
33679
|
throw new Error(MESSAGES.ERRORS.PUSH_LARGE_FILES_DECLINED);
|
|
33666
33680
|
}
|
|
33681
|
+
logger2.startSpinner?.("Pushing...");
|
|
33667
33682
|
}
|
|
33668
|
-
async function
|
|
33683
|
+
async function validateActionSchema2(rootDir) {
|
|
33669
33684
|
const fs = getFileSystem();
|
|
33670
33685
|
const schemaPath = fs.path.join(rootDir, ACTION_SCHEMA_CONSTANTS.ACTION_SCHEMA_FILENAME);
|
|
33671
33686
|
if (!await fs.exists(schemaPath))
|
|
33672
33687
|
return;
|
|
33673
|
-
const [schemaErr] = await catchError(
|
|
33688
|
+
const [schemaErr] = await catchError(validateActionSchemaFile());
|
|
33674
33689
|
if (schemaErr) {
|
|
33675
33690
|
throw new Error(`${MESSAGES.ERRORS.INVALID_ACTION_SCHEMA} ${schemaErr.message}`);
|
|
33676
33691
|
}
|
|
33677
33692
|
}
|
|
33678
|
-
async function validatePushFiles(rootDir, bundlePath, logger2) {
|
|
33693
|
+
async function validatePushFiles(rootDir, bundlePath, logger2, options = {}) {
|
|
33679
33694
|
const buildFiles = await collectLocalFiles(rootDir, bundlePath);
|
|
33680
33695
|
const sourceFiles = await collectSourceFiles(rootDir, bundlePath);
|
|
33681
33696
|
const allFiles = [...buildFiles, ...sourceFiles];
|
|
@@ -33683,8 +33698,10 @@ async function validatePushFiles(rootDir, bundlePath, logger2) {
|
|
|
33683
33698
|
return;
|
|
33684
33699
|
validateExtensions(allFiles, logger2);
|
|
33685
33700
|
validateOversized(allFiles, logger2);
|
|
33686
|
-
|
|
33687
|
-
|
|
33701
|
+
if (!options.allowLargeFiles) {
|
|
33702
|
+
await validateLargeFiles(allFiles, logger2);
|
|
33703
|
+
}
|
|
33704
|
+
await validateActionSchema2(rootDir);
|
|
33688
33705
|
}
|
|
33689
33706
|
|
|
33690
33707
|
// src/actions/push.ts
|
|
@@ -33986,7 +34003,9 @@ async function executePush(options) {
|
|
|
33986
34003
|
if (preconditionErr) {
|
|
33987
34004
|
throw new Error(preconditionErr.message || MESSAGES.ERRORS.PUSH_VALIDATION_FAILED);
|
|
33988
34005
|
}
|
|
33989
|
-
await validatePushFiles(rootDir, bundlePath, logger2
|
|
34006
|
+
await validatePushFiles(rootDir, bundlePath, logger2, {
|
|
34007
|
+
allowLargeFiles: options.allowLargeFiles
|
|
34008
|
+
});
|
|
33990
34009
|
const handler = new WebAppFileHandler(config);
|
|
33991
34010
|
await handler.push();
|
|
33992
34011
|
await handler.importReferencedResources(options.ignoreResources ?? false);
|
|
@@ -34011,7 +34030,7 @@ var PUSH_EXAMPLES = [
|
|
|
34011
34030
|
}
|
|
34012
34031
|
];
|
|
34013
34032
|
var registerPushCommand = (program) => {
|
|
34014
|
-
program.command("push").description("Push local source code to Studio Web").option("--project-id <id>", "WebApp Project ID").option("--build-dir <dir>", "Build output directory", "dist").option("--ignore-resources", "Skip importing referenced resources").option("-v, --version <version>", "Set an explicit code version (e.g. 2.0.0)").option("--verbose", "Show detailed progress logs").option("--base-url <url>", "UiPath base URL").option("--org-id <id>", "Organization ID").option("--tenant-id <id>", "Tenant ID").option("--access-token <token>", "Access token").examples(PUSH_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
34033
|
+
program.command("push").description("Push local source code to Studio Web").option("--project-id <id>", "WebApp Project ID").option("--build-dir <dir>", "Build output directory", "dist").option("--ignore-resources", "Skip importing referenced resources").option("--allow-large-files", "Allow pushing files between 2 MB and 10 MB").option("-v, --version <version>", "Set an explicit code version (e.g. 2.0.0)").option("--verbose", "Show detailed progress logs").option("--base-url <url>", "UiPath base URL").option("--org-id <id>", "Organization ID").option("--tenant-id <id>", "Tenant ID").option("--access-token <token>", "Access token").examples(PUSH_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
34015
34034
|
const verbose = options.verbose ?? false;
|
|
34016
34035
|
getOutputSink().writeErr(`${source_default.blue(MESSAGES.INFO.PUSH_HEADER)}
|
|
34017
34036
|
|
|
@@ -34021,6 +34040,7 @@ var registerPushCommand = (program) => {
|
|
|
34021
34040
|
projectId: options.projectId,
|
|
34022
34041
|
buildDir: options.buildDir,
|
|
34023
34042
|
ignoreResources: options.ignoreResources,
|
|
34043
|
+
allowLargeFiles: options.allowLargeFiles,
|
|
34024
34044
|
codeVersion: options.version,
|
|
34025
34045
|
baseUrl: options.baseUrl,
|
|
34026
34046
|
orgId: options.orgId,
|
|
@@ -34239,4 +34259,4 @@ var registerCommands = async (program) => {
|
|
|
34239
34259
|
|
|
34240
34260
|
export { metadata, registerCommands };
|
|
34241
34261
|
|
|
34242
|
-
//# debugId=
|
|
34262
|
+
//# debugId=3759029EC34DCD9764756E2164756E21
|
|
@@ -720,6 +720,15 @@ function appSubTypeFor(manifest) {
|
|
|
720
720
|
const row = SUBTYPE_BY_VARIANT[manifest?.type ?? "Coded" /* Coded */];
|
|
721
721
|
return isActionApp(manifest) ? row.action : row.app;
|
|
722
722
|
}
|
|
723
|
+
async function readProjectName(fs, projectDir, fallbackName) {
|
|
724
|
+
const uiprojPath = fs.path.join(projectDir, ProjectTool.ProjectFileName);
|
|
725
|
+
const [readError, raw] = await catchError(fs.readFile(uiprojPath, "utf-8"));
|
|
726
|
+
if (readError || !raw)
|
|
727
|
+
return fallbackName;
|
|
728
|
+
const [parseError, parsed] = catchError(() => JSON.parse(raw));
|
|
729
|
+
const name = parseError ? undefined : parsed?.Name;
|
|
730
|
+
return typeof name === "string" && name.length > 0 ? name : fallbackName;
|
|
731
|
+
}
|
|
723
732
|
|
|
724
733
|
// ../../node_modules/zod/v4/classic/external.js
|
|
725
734
|
var exports_external = {};
|
|
@@ -15051,10 +15060,16 @@ var JsonActionSchemaValidator = exports_external.object({
|
|
|
15051
15060
|
});
|
|
15052
15061
|
|
|
15053
15062
|
// ../packager/packager-tool-webapp/src/action-schema/parse.ts
|
|
15054
|
-
function parseActionSchema(raw) {
|
|
15063
|
+
function parseActionSchema(raw, appName) {
|
|
15064
|
+
if (typeof appName !== "string" || appName.length === 0) {
|
|
15065
|
+
throw new Error("parseActionSchema needs the app name to derive the schema key.");
|
|
15066
|
+
}
|
|
15055
15067
|
const parsed = JSON.parse(raw);
|
|
15056
15068
|
const validated = validate(parsed);
|
|
15057
|
-
return transformToParsedSchema(validated);
|
|
15069
|
+
return transformToParsedSchema(validated, appName);
|
|
15070
|
+
}
|
|
15071
|
+
function validateActionSchema(raw) {
|
|
15072
|
+
transformSections(validate(JSON.parse(raw)));
|
|
15058
15073
|
}
|
|
15059
15074
|
function validate(schema) {
|
|
15060
15075
|
try {
|
|
@@ -15144,7 +15159,7 @@ function transformProperty(path, name, propDef) {
|
|
|
15144
15159
|
properties
|
|
15145
15160
|
};
|
|
15146
15161
|
}
|
|
15147
|
-
function
|
|
15162
|
+
function transformSections(schema) {
|
|
15148
15163
|
const transformSection = (section, sectionName) => section?.properties ? Object.keys(section.properties).map((name) => transformProperty(`${sectionName}.${name}`, name, section.properties[name])) : [];
|
|
15149
15164
|
const outcomes = schema.outcomes?.properties ? Object.keys(schema.outcomes.properties).map((name) => ({
|
|
15150
15165
|
name,
|
|
@@ -15157,17 +15172,22 @@ function transformToParsedSchema(schema) {
|
|
|
15157
15172
|
version: 0
|
|
15158
15173
|
})) : [];
|
|
15159
15174
|
return {
|
|
15160
|
-
key: deterministicUuid("root"),
|
|
15161
|
-
version: 0,
|
|
15162
|
-
description: "Action Schema",
|
|
15163
|
-
id: `ID${deterministicUuid("root.id").replace(/-/g, "")}`,
|
|
15164
|
-
name: "ActionSchema",
|
|
15165
15175
|
inputs: transformSection(schema.inputs, "inputs"),
|
|
15166
15176
|
outputs: transformSection(schema.outputs, "outputs"),
|
|
15167
15177
|
inOuts: transformSection(schema.inOuts, "inOuts"),
|
|
15168
15178
|
outcomes
|
|
15169
15179
|
};
|
|
15170
15180
|
}
|
|
15181
|
+
function transformToParsedSchema(schema, appName) {
|
|
15182
|
+
return {
|
|
15183
|
+
key: deterministicUuid(`root:${appName}`),
|
|
15184
|
+
version: 0,
|
|
15185
|
+
description: "Action Schema",
|
|
15186
|
+
id: `ID${deterministicUuid(`root.id:${appName}`).replace(/-/g, "")}`,
|
|
15187
|
+
name: "ActionSchema",
|
|
15188
|
+
...transformSections(schema)
|
|
15189
|
+
};
|
|
15190
|
+
}
|
|
15171
15191
|
|
|
15172
15192
|
// ../packager/packager-tool-webapp/src/action-schema/describe-action-app.ts
|
|
15173
15193
|
var ARTEFACT_KIND_APP = "app";
|
|
@@ -15225,7 +15245,8 @@ async function describeActionApp(projectDir, fs) {
|
|
|
15225
15245
|
]
|
|
15226
15246
|
};
|
|
15227
15247
|
}
|
|
15228
|
-
const
|
|
15248
|
+
const appName = await readProjectName(fs, projectDir, fs.path.basename(projectDir));
|
|
15249
|
+
const [parseError, parsed] = catchError(() => parseActionSchema(raw, appName));
|
|
15229
15250
|
if (parseError) {
|
|
15230
15251
|
return {
|
|
15231
15252
|
projectSubType,
|
|
@@ -15255,6 +15276,6 @@ class WebAppContributingToolFactory extends WebAppToolFactory {
|
|
|
15255
15276
|
return describeActionApp(projectDir, fs);
|
|
15256
15277
|
}
|
|
15257
15278
|
}
|
|
15258
|
-
export { WEBAPP_MANIFEST_FILE_NAME, ACTION_SCHEMA_FILE_NAME, parseActionSchema, WebAppToolFactory, WebAppContributingToolFactory };
|
|
15279
|
+
export { WEBAPP_MANIFEST_FILE_NAME, ACTION_SCHEMA_FILE_NAME, readProjectName, parseActionSchema, validateActionSchema, WebAppToolFactory, WebAppContributingToolFactory };
|
|
15259
15280
|
|
|
15260
|
-
//# debugId=
|
|
15281
|
+
//# debugId=87A97AEB77F6A92664756E2164756E21
|
package/dist/packager-tool.js
CHANGED
package/dist/tool.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
metadata,
|
|
3
3
|
registerCommands
|
|
4
|
-
} from "./packager-tool-
|
|
4
|
+
} from "./packager-tool-3x32nxvy.js";
|
|
5
5
|
import"./packager-tool-zzg1ddjd.js";
|
|
6
6
|
import"./packager-tool-nd0vpsgx.js";
|
|
7
|
-
import"./packager-tool-
|
|
7
|
+
import"./packager-tool-cakm5nqb.js";
|
|
8
8
|
import"./packager-tool-cfc7qtm7.js";
|
|
9
9
|
import"./packager-tool-0gctz400.js";
|
|
10
10
|
import"./packager-tool-qa9gftnj.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.
|
|
5
|
+
"version": "1.204.1-preview.232",
|
|
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": "3a47900cbb3905da7fdd700a9a7c8ceafd618972"
|
|
33
33
|
}
|