@uipath/rpa-tool 1.202.0 → 1.202.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.
Files changed (2) hide show
  1. package/dist/tool.js +44 -9
  2. package/package.json +7 -7
package/dist/tool.js CHANGED
@@ -44559,7 +44559,7 @@ var {
44559
44559
  // package.json
44560
44560
  var package_default = {
44561
44561
  name: "@uipath/rpa-tool",
44562
- version: "1.202.0",
44562
+ version: "1.202.1",
44563
44563
  description: "Tool for creating and managing UiPath RPA projects",
44564
44564
  keywords: [
44565
44565
  "uipcli-tool",
@@ -46909,6 +46909,8 @@ function detectRuntimeArchMismatchFailure(label, rawMessage, probe = probeDotnet
46909
46909
 
46910
46910
  // src/commands/packager/packager-shared.ts
46911
46911
  var LOG_LEVEL_NAMES = ["Debug", "Info", "Warn", "Error"];
46912
+ var PROJECT_METADATA_FOLDER = ".project";
46913
+ var DESIGN_DATA_FILE = "design.json";
46912
46914
  var GOVERNANCE_FILE_TYPES = ["Default", "AutomationOps", "Studio"];
46913
46915
  var GOVERNANCE_FILE_TYPE_PLACEHOLDER = `<${GOVERNANCE_FILE_TYPES.join(" | ")}>`;
46914
46916
  var GOVERNANCE_FILE_TYPE_DESCRIPTION = "With AutomationOps and no governance file path, the policy published for " + "the signed-in tenant is downloaded from AutomationOps; without a cloud " + "'uip login' it falls back to Default with a warning.";
@@ -47043,6 +47045,33 @@ function readFeedSourcesFromFile(path4) {
47043
47045
  return null;
47044
47046
  }
47045
47047
  }
47048
+ function readProjectDesignData(projectDirectory) {
47049
+ const designDataPath = join13(projectDirectory, PROJECT_METADATA_FOLDER, DESIGN_DATA_FILE);
47050
+ let raw;
47051
+ try {
47052
+ raw = readFileSync6(designDataPath, "utf8");
47053
+ } catch (error) {
47054
+ if (error?.code !== "ENOENT") {
47055
+ logger.warn(`Could not read ${designDataPath}; falling back to defaults: ${error instanceof Error ? error.message : String(error)}`);
47056
+ }
47057
+ return;
47058
+ }
47059
+ try {
47060
+ const parsed = JSON.parse(raw.replace(/^/, ""));
47061
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
47062
+ logger.warn(`Ignoring ${designDataPath}: expected a JSON object; falling back to defaults.`);
47063
+ return;
47064
+ }
47065
+ return parsed;
47066
+ } catch (error) {
47067
+ logger.warn(`Could not parse ${designDataPath}; falling back to defaults: ${error instanceof Error ? error.message : String(error)}`);
47068
+ return;
47069
+ }
47070
+ }
47071
+ function designDataBoolean(designData, field) {
47072
+ const value = designData?.[field];
47073
+ return typeof value === "boolean" ? value : undefined;
47074
+ }
47046
47075
  async function assembleFeedsConfig(opts) {
47047
47076
  let userFeeds;
47048
47077
  if (opts.nugetSourcesConfigPath) {
@@ -47456,7 +47485,7 @@ import { isAbsolute as isAbsolute7, resolve as resolve8 } from "node:path";
47456
47485
  function registerPackCommand(program4, defaultProjectDir) {
47457
47486
  const cmd = program4.command("pack").description("Pack a UiPath project into a .nupkg (compiles, validates, and bundles).");
47458
47487
  cmd.argument("[project-dir]", "Path to the UiPath project directory, project.json file, or .uip archive. Defaults to --project-dir, or the current directory.").argument("[output-path]", "Directory where .nupkg is written. Required — pass it here or as --output-path.");
47459
- addCommonPackagerOptions(cmd).option("--output-path <path>", "Directory where .nupkg is written. Alternative to the positional argument; required when the positional is omitted.").option("--package-id <id>", "NuGet package ID").option("--package-version <version>", "NuGet package version").option("--package-author <author>", "NuGet package author").option("--package-description <desc>", "NuGet package description").option("--skip-analyze", "Skip the analysis step").option("--skip-dependency-optimization", "Skip dependency optimization").option("--include-sources", "Include source files in the package").option("--split-packages", "Split into multiple packages").option("--governance-file-path <path>", GOVERNANCE_FILE_PATH_DESCRIPTION).addOption(new Option2(`--governance-file-type ${GOVERNANCE_FILE_TYPE_PLACEHOLDER}`, GOVERNANCE_FILE_TYPE_DESCRIPTION).choices(GOVERNANCE_FILE_TYPES)).option("--detailed-log-path <path>", "Path where detailed log file is written").option("--signing-certificate-path <path>", "Path to .pfx certificate file").option("--signing-certificate-password <password>", "Certificate password").option("--signing-timestamp-server <url>", "Timestamp server URL").addOption(new Option2("--output-type <type>", "Package output type (Pipeline Build parity)").choices(OUTPUT_TYPES)).option("--project-url <url>", "Project URL package metadata").option("--repository-type <type>", "Repository type package metadata").option("--repository-url <url>", "Repository URL package metadata").option("--repository-branch <branch>", "Repository branch package metadata").option("--repository-commit <commit>", "Repository commit package metadata").option("--release-notes <text>", "Package release notes").trackedAction(processContext, async (projectDirArg, outputPathArg, opts) => {
47488
+ addCommonPackagerOptions(cmd).option("--output-path <path>", "Directory where .nupkg is written. Alternative to the positional argument; required when the positional is omitted.").option("--package-id <id>", "NuGet package ID").option("--package-version <version>", "NuGet package version").option("--package-author <author>", "NuGet package author").option("--package-description <desc>", "NuGet package description").option("--skip-analyze", "Skip the analysis step").option("--skip-dependency-optimization", "Skip dependency optimization. Unpassed, the project's SeparateRuntimeDependencies applies.").option("--include-sources", "Include source files in the package. Unpassed, .project/design.json decides, defaulting to on.").option("--no-include-sources", "Exclude source files, overriding the project's own setting.").option("--split-packages", "Split into multiple packages").option("--governance-file-path <path>", GOVERNANCE_FILE_PATH_DESCRIPTION).addOption(new Option2(`--governance-file-type ${GOVERNANCE_FILE_TYPE_PLACEHOLDER}`, GOVERNANCE_FILE_TYPE_DESCRIPTION).choices(GOVERNANCE_FILE_TYPES)).option("--detailed-log-path <path>", "Path where detailed log file is written").option("--signing-certificate-path <path>", "Path to .pfx certificate file").option("--signing-certificate-password <password>", "Certificate password").option("--signing-timestamp-server <url>", "Timestamp server URL").addOption(new Option2("--output-type <type>", "Package output type (Pipeline Build parity)").choices(OUTPUT_TYPES)).option("--project-url <url>", "Project URL package metadata").option("--repository-type <type>", "Repository type package metadata").option("--repository-url <url>", "Repository URL package metadata").option("--repository-branch <branch>", "Repository branch package metadata").option("--repository-commit <commit>", "Repository commit package metadata").option("--release-notes <text>", "Package release notes").trackedAction(processContext, async (projectDirArg, outputPathArg, opts) => {
47460
47489
  const outputPath = outputPathArg ?? opts.outputPath;
47461
47490
  if (!outputPath) {
47462
47491
  OutputFormatter.error(new FailureOutput("Failure", "Pack failed: an output path is required.", "Pass it as the second argument (`pack <project-dir> <output-path>`) or as `--output-path <path>`. It must be a directory outside the project tree."));
@@ -47473,6 +47502,14 @@ function registerPackCommand(program4, defaultProjectDir) {
47473
47502
  processContext.exit(1);
47474
47503
  return;
47475
47504
  }
47505
+ if (projectDirectory !== undefined) {
47506
+ const designData = readProjectDesignData(projectDirectory);
47507
+ opts.includeSources = opts.includeSources ?? designDataBoolean(designData, "IncludeSources") ?? true;
47508
+ const separateRuntimeDependencies = designDataBoolean(designData, "SeparateRuntimeDependencies");
47509
+ if (separateRuntimeDependencies !== undefined) {
47510
+ opts.skipDependencyOptimization = opts.skipDependencyOptimization ?? !separateRuntimeDependencies;
47511
+ }
47512
+ }
47476
47513
  const success = await runPackagerCommand(opts, {
47477
47514
  label: "Pack",
47478
47515
  hint: "Check project path and pack configuration.",
@@ -47502,13 +47539,11 @@ function registerPackCommand(program4, defaultProjectDir) {
47502
47539
  if (opts2.governanceFileType) {
47503
47540
  options.validateOptions.governanceFileType = opts2.governanceFileType;
47504
47541
  }
47505
- if (opts2.skipDependencyOptimization || opts2.includeSources || opts2.splitPackages) {
47506
- options.packOptions = {
47507
- skipDependencyOptimization: opts2.skipDependencyOptimization ?? false,
47508
- includeSources: opts2.includeSources ?? false,
47509
- splitPackages: opts2.splitPackages ?? false
47510
- };
47511
- }
47542
+ options.packOptions = {
47543
+ skipDependencyOptimization: opts2.skipDependencyOptimization ?? false,
47544
+ includeSources: opts2.includeSources ?? false,
47545
+ splitPackages: opts2.splitPackages ?? false
47546
+ };
47512
47547
  if (opts2.detailedLogPath) {
47513
47548
  options.detailedLogPath = opts2.detailedLogPath;
47514
47549
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/rpa-tool",
3
- "version": "1.202.0",
3
+ "version": "1.202.1",
4
4
  "description": "Tool for creating and managing UiPath RPA projects",
5
5
  "keywords": [
6
6
  "uipcli-tool",
@@ -63,11 +63,11 @@
63
63
  "typescript": "^5.7.2"
64
64
  },
65
65
  "optionalDependencies": {
66
- "@uipath/studio-helm-win32-x64": "1.202.0",
67
- "@uipath/studio-helm-win32-arm64": "1.202.0",
68
- "@uipath/studio-helm-linux-x64": "1.202.0",
69
- "@uipath/studio-helm-linux-arm64": "1.202.0",
70
- "@uipath/studio-helm-darwin-x64": "1.202.0",
71
- "@uipath/studio-helm-darwin-arm64": "1.202.0"
66
+ "@uipath/studio-helm-win32-x64": "1.202.1",
67
+ "@uipath/studio-helm-win32-arm64": "1.202.1",
68
+ "@uipath/studio-helm-linux-x64": "1.202.1",
69
+ "@uipath/studio-helm-linux-arm64": "1.202.1",
70
+ "@uipath/studio-helm-darwin-x64": "1.202.1",
71
+ "@uipath/studio-helm-darwin-arm64": "1.202.1"
72
72
  }
73
73
  }