@uipath/project-packager 1.206.0-preview.306 → 1.207.0-preview.307

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
@@ -63,7 +63,7 @@ __export(exports_buffer, {
63
63
  File: () => File,
64
64
  INSPECT_MAX_BYTES: () => INSPECT_MAX_BYTES,
65
65
  atob: () => atob,
66
- btoa: () => btoa,
66
+ btoa: () => btoa2,
67
67
  constants: () => constants,
68
68
  default: () => buffer_default,
69
69
  isAscii: () => isAscii,
@@ -740,7 +740,7 @@ function notimpl(name) {
740
740
  throw Error(name + " is not implemented for node:buffer browser polyfill");
741
741
  };
742
742
  }
743
- var lookup, revLookup, code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i, len, customInspectSymbol, INSPECT_MAX_BYTES = 50, kMaxLength = 2147483647, kStringMaxLength = 536870888, btoa, atob, File, Blob2, constants, ERR_BUFFER_OUT_OF_BOUNDS, ERR_INVALID_ARG_TYPE, ERR_OUT_OF_RANGE, MAX_ARGUMENTS_LENGTH = 4096, INVALID_BASE64_RE, hexSliceLookupTable, resolveObjectURL, isUtf8, isAscii = (str) => {
743
+ var lookup, revLookup, code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i, len, customInspectSymbol, INSPECT_MAX_BYTES = 50, kMaxLength = 2147483647, kStringMaxLength = 536870888, btoa2, atob, File, Blob2, constants, ERR_BUFFER_OUT_OF_BOUNDS, ERR_INVALID_ARG_TYPE, ERR_OUT_OF_RANGE, MAX_ARGUMENTS_LENGTH = 4096, INVALID_BASE64_RE, hexSliceLookupTable, resolveObjectURL, isUtf8, isAscii = (str) => {
744
744
  for (let char of str)
745
745
  if (char.charCodeAt(0) > 127)
746
746
  return false;
@@ -754,7 +754,7 @@ var init_buffer = __esm(() => {
754
754
  revLookup[45] = 62;
755
755
  revLookup[95] = 63;
756
756
  customInspectSymbol = typeof Symbol === "function" && typeof Symbol.for === "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
757
- btoa = globalThis.btoa;
757
+ btoa2 = globalThis.btoa;
758
758
  atob = globalThis.atob;
759
759
  File = globalThis.File;
760
760
  Blob2 = globalThis.Blob;
@@ -18153,7 +18153,8 @@ var de_default = {
18153
18153
  pathRequired: "Project directory path is required",
18154
18154
  noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
18155
18155
  readFailed: "Failed to read project file: {path}",
18156
- invalidProject: "Invalid project file: {path}. Missing ProjectType field."
18156
+ invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
18157
+ invalidJson: "Project file {path} is not a JSON object. {reason}"
18157
18158
  }
18158
18159
  },
18159
18160
  validator: {
@@ -18244,7 +18245,8 @@ var en = {
18244
18245
  pathRequired: "Project directory path is required",
18245
18246
  noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
18246
18247
  readFailed: "Failed to read project file: {path}",
18247
- invalidProject: "Invalid project file: {path}. Missing ProjectType field."
18248
+ invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
18249
+ invalidJson: "Project file {path} is not a JSON object. {reason}"
18248
18250
  }
18249
18251
  },
18250
18252
  validator: {
@@ -18335,7 +18337,8 @@ var es_default = {
18335
18337
  pathRequired: "Project directory path is required",
18336
18338
  noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
18337
18339
  readFailed: "Failed to read project file: {path}",
18338
- invalidProject: "Invalid project file: {path}. Missing ProjectType field."
18340
+ invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
18341
+ invalidJson: "Project file {path} is not a JSON object. {reason}"
18339
18342
  }
18340
18343
  },
18341
18344
  validator: {
@@ -18425,7 +18428,8 @@ var es_MX_default = {
18425
18428
  pathRequired: "Project directory path is required",
18426
18429
  noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
18427
18430
  readFailed: "Failed to read project file: {path}",
18428
- invalidProject: "Invalid project file: {path}. Missing ProjectType field."
18431
+ invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
18432
+ invalidJson: "Project file {path} is not a JSON object. {reason}"
18429
18433
  }
18430
18434
  },
18431
18435
  validator: {
@@ -18515,7 +18519,8 @@ var fr_default = {
18515
18519
  pathRequired: "Project directory path is required",
18516
18520
  noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
18517
18521
  readFailed: "Failed to read project file: {path}",
18518
- invalidProject: "Invalid project file: {path}. Missing ProjectType field."
18522
+ invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
18523
+ invalidJson: "Project file {path} is not a JSON object. {reason}"
18519
18524
  }
18520
18525
  },
18521
18526
  validator: {
@@ -18605,7 +18610,8 @@ var ja_default = {
18605
18610
  pathRequired: "Project directory path is required",
18606
18611
  noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
18607
18612
  readFailed: "Failed to read project file: {path}",
18608
- invalidProject: "Invalid project file: {path}. Missing ProjectType field."
18613
+ invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
18614
+ invalidJson: "Project file {path} is not a JSON object. {reason}"
18609
18615
  }
18610
18616
  },
18611
18617
  validator: {
@@ -18695,7 +18701,8 @@ var ko_default = {
18695
18701
  pathRequired: "Project directory path is required",
18696
18702
  noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
18697
18703
  readFailed: "Failed to read project file: {path}",
18698
- invalidProject: "Invalid project file: {path}. Missing ProjectType field."
18704
+ invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
18705
+ invalidJson: "Project file {path} is not a JSON object. {reason}"
18699
18706
  }
18700
18707
  },
18701
18708
  validator: {
@@ -18785,7 +18792,8 @@ var pt_default = {
18785
18792
  pathRequired: "Project directory path is required",
18786
18793
  noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
18787
18794
  readFailed: "Failed to read project file: {path}",
18788
- invalidProject: "Invalid project file: {path}. Missing ProjectType field."
18795
+ invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
18796
+ invalidJson: "Project file {path} is not a JSON object. {reason}"
18789
18797
  }
18790
18798
  },
18791
18799
  validator: {
@@ -18875,7 +18883,8 @@ var pt_BR_default = {
18875
18883
  pathRequired: "Project directory path is required",
18876
18884
  noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
18877
18885
  readFailed: "Failed to read project file: {path}",
18878
- invalidProject: "Invalid project file: {path}. Missing ProjectType field."
18886
+ invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
18887
+ invalidJson: "Project file {path} is not a JSON object. {reason}"
18879
18888
  }
18880
18889
  },
18881
18890
  validator: {
@@ -18965,7 +18974,8 @@ var ro_default = {
18965
18974
  pathRequired: "Project directory path is required",
18966
18975
  noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
18967
18976
  readFailed: "Failed to read project file: {path}",
18968
- invalidProject: "Invalid project file: {path}. Missing ProjectType field."
18977
+ invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
18978
+ invalidJson: "Project file {path} is not a JSON object. {reason}"
18969
18979
  }
18970
18980
  },
18971
18981
  validator: {
@@ -19055,7 +19065,8 @@ var ru_default = {
19055
19065
  pathRequired: "Project directory path is required",
19056
19066
  noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
19057
19067
  readFailed: "Failed to read project file: {path}",
19058
- invalidProject: "Invalid project file: {path}. Missing ProjectType field."
19068
+ invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
19069
+ invalidJson: "Project file {path} is not a JSON object. {reason}"
19059
19070
  }
19060
19071
  },
19061
19072
  validator: {
@@ -19145,7 +19156,8 @@ var tr_default = {
19145
19156
  pathRequired: "Project directory path is required",
19146
19157
  noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
19147
19158
  readFailed: "Failed to read project file: {path}",
19148
- invalidProject: "Invalid project file: {path}. Missing ProjectType field."
19159
+ invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
19160
+ invalidJson: "Project file {path} is not a JSON object. {reason}"
19149
19161
  }
19150
19162
  },
19151
19163
  validator: {
@@ -19235,7 +19247,8 @@ var zh_CN_default = {
19235
19247
  pathRequired: "Project directory path is required",
19236
19248
  noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
19237
19249
  readFailed: "Failed to read project file: {path}",
19238
- invalidProject: "Invalid project file: {path}. Missing ProjectType field."
19250
+ invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
19251
+ invalidJson: "Project file {path} is not a JSON object. {reason}"
19239
19252
  }
19240
19253
  },
19241
19254
  validator: {
@@ -19325,7 +19338,8 @@ var zh_TW_default = {
19325
19338
  pathRequired: "Project directory path is required",
19326
19339
  noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
19327
19340
  readFailed: "Failed to read project file: {path}",
19328
- invalidProject: "Invalid project file: {path}. Missing ProjectType field."
19341
+ invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
19342
+ invalidJson: "Project file {path} is not a JSON object. {reason}"
19329
19343
  }
19330
19344
  },
19331
19345
  validator: {
@@ -19415,7 +19429,8 @@ var zu_default = {
19415
19429
  pathRequired: "Project directory path is required",
19416
19430
  noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
19417
19431
  readFailed: "Failed to read project file: {path}",
19418
- invalidProject: "Invalid project file: {path}. Missing ProjectType field."
19432
+ invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
19433
+ invalidJson: "Project file {path} is not a JSON object. {reason}"
19419
19434
  }
19420
19435
  },
19421
19436
  validator: {
@@ -21194,13 +21209,15 @@ var ProjectDimensions = {
21194
21209
  SolutionKey: "SolutionKey",
21195
21210
  SolutionProjectKey: "SolutionProjectKey",
21196
21211
  SolutionIdentityStatus: "SolutionIdentityStatus",
21197
- PreviousSolutionKey: "PreviousSolutionKey"
21212
+ PreviousSolutionKey: "PreviousSolutionKey",
21213
+ PreviousProjectKey: "PreviousProjectKey"
21198
21214
  };
21199
21215
  var GUID_KEY_DIMENSIONS = new Set([
21200
21216
  ProjectDimensions.ProjectKey,
21201
21217
  ProjectDimensions.SolutionKey,
21202
21218
  ProjectDimensions.SolutionProjectKey,
21203
- ProjectDimensions.PreviousSolutionKey
21219
+ ProjectDimensions.PreviousSolutionKey,
21220
+ ProjectDimensions.PreviousProjectKey
21204
21221
  ]);
21205
21222
  var ShipDimensions = {
21206
21223
  ShipKind: "ShipKind",
@@ -21635,9 +21652,7 @@ async function withinProjectIdentityBudget(work, onTimeout) {
21635
21652
  }
21636
21653
  }
21637
21654
 
21638
- // ../../common/src/telemetry/pseudonymize.ts
21639
- var PSEUDONYM_DOMAIN = "uipath-cli/telemetry/pseudonym/v1:";
21640
- var PSEUDONYM_HEX_LENGTH = 32;
21655
+ // ../../common/src/sha256.ts
21641
21656
  var SHA256_K = new Uint32Array([
21642
21657
  1116352408,
21643
21658
  1899447441,
@@ -21717,7 +21732,7 @@ var SHA256_INITIAL_STATE = new Uint32Array([
21717
21732
  function rotr(value, bits) {
21718
21733
  return (value >>> bits | value << 32 - bits) >>> 0;
21719
21734
  }
21720
- function sha256Hex(input) {
21735
+ function sha256Words(input) {
21721
21736
  const bytes = new TextEncoder().encode(input);
21722
21737
  const paddedLength = bytes.length + 9 + 63 >> 6 << 6;
21723
21738
  const buffer = new Uint8Array(paddedLength);
@@ -21773,12 +21788,19 @@ function sha256Hex(input) {
21773
21788
  state[6] = state[6] + g >>> 0;
21774
21789
  state[7] = state[7] + h >>> 0;
21775
21790
  }
21791
+ return state;
21792
+ }
21793
+ function sha256Hex(input) {
21776
21794
  let hex = "";
21777
- for (const word of state) {
21795
+ for (const word of sha256Words(input)) {
21778
21796
  hex += word.toString(16).padStart(8, "0");
21779
21797
  }
21780
21798
  return hex;
21781
21799
  }
21800
+
21801
+ // ../../common/src/telemetry/pseudonymize.ts
21802
+ var PSEUDONYM_DOMAIN = "uipath-cli/telemetry/pseudonym/v1:";
21803
+ var PSEUDONYM_HEX_LENGTH = 32;
21782
21804
  function resolveSha256Hex() {
21783
21805
  try {
21784
21806
  const nodeCrypto = (init_crypto(), __toCommonJS(exports_crypto));
@@ -22746,7 +22768,7 @@ var package_default = {
22746
22768
  name: "@uipath/project-packager",
22747
22769
  author: "UiPath",
22748
22770
  license: "SEE LICENSE IN LICENSE.txt",
22749
- version: "1.206.0-preview.306",
22771
+ version: "1.207.0-preview.307",
22750
22772
  description: "UiPath Project Packager - core library for packing individual UiPath projects",
22751
22773
  type: "module",
22752
22774
  main: "./dist/index.js",
@@ -22802,7 +22824,7 @@ var package_default = {
22802
22824
  },
22803
22825
  devDependencies: {
22804
22826
  "@types/node": "^25.5.2",
22805
- "@uipath/resource-builder-tool": "2025.11.0-alpha6004-4107",
22827
+ "@uipath/resource-builder-tool": "1.0.0-s207-18596",
22806
22828
  "@uipath/tool-agent": "^2.0.0",
22807
22829
  "@uipath/packager-tool-apiworkflow": "workspace:*",
22808
22830
  "@uipath/packager-tool-connector": "workspace:*",
@@ -23585,28 +23607,54 @@ class ProjectLoader {
23585
23607
  path: projectFilePath
23586
23608
  }));
23587
23609
  }
23588
- const json = typeof fileContent === "string" ? fileContent : new TextDecoder("utf-8").decode(fileContent);
23589
- const projectData = JSON.parse(json);
23610
+ const projectData = this.parseProjectFile(fileContent, projectFilePath);
23590
23611
  const projectJson = useProjectJson ? projectData : undefined;
23591
- const outputType = projectJson?.designOptions?.outputType;
23592
- const projectType = outputType ?? (projectData?.ProjectType || projectData?.type);
23593
- if (!projectData || !projectType) {
23612
+ const designOptions = projectJson?.designOptions;
23613
+ const outputType = designOptions && typeof designOptions === "object" ? text(designOptions.outputType) : undefined;
23614
+ const projectType = outputType ?? (text(projectData?.ProjectType) || text(projectData?.type));
23615
+ if (!projectType) {
23594
23616
  throw new Error(translate8.t("solutionpackager.projectLoader.errors.invalidProject", {
23595
23617
  path: projectFilePath
23596
23618
  }));
23597
23619
  }
23598
- const declaredName = projectJson?.name?.trim() || projectData.Name;
23599
- const declaredDescription = projectJson?.description?.trim() || projectData.Description?.trim() || undefined;
23600
- const declaredAuthor = projectJson?.author?.trim() || projectData.Author?.trim() || undefined;
23620
+ const declaredName = text(projectJson?.name) || text(projectData.Name);
23621
+ const declaredDescription = text(projectJson?.description) || text(projectData.Description) || undefined;
23622
+ const declaredAuthor = text(projectJson?.author) || text(projectData.Author) || undefined;
23623
+ const declaredVersion = useProjectJson ? text(projectData.projectVersion) : await this.readProjectJsonVersion(projectPath);
23601
23624
  return {
23602
23625
  type: projectType,
23603
23626
  name: declaredName || Path2.basename(projectPath),
23604
23627
  projectPath,
23605
23628
  projectFilePath,
23606
23629
  description: declaredDescription,
23607
- author: declaredAuthor
23630
+ author: declaredAuthor,
23631
+ version: declaredVersion || undefined
23608
23632
  };
23609
23633
  }
23634
+ parseProjectFile(fileContent, projectFilePath) {
23635
+ const json = typeof fileContent === "string" ? fileContent : new TextDecoder("utf-8").decode(fileContent);
23636
+ const [reason, parsed] = parseJson(json);
23637
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
23638
+ throw new Error(translate8.t("solutionpackager.projectLoader.errors.invalidJson", {
23639
+ path: projectFilePath,
23640
+ reason: reason ?? ""
23641
+ }).trim());
23642
+ }
23643
+ return parsed;
23644
+ }
23645
+ async readProjectJsonVersion(projectPath) {
23646
+ const projectJsonPath = Path2.join(projectPath, ProjectLoader.ProjectJsonFileName);
23647
+ if (!await this.fileSystem.exists(projectJsonPath))
23648
+ return;
23649
+ const fileContent = await this.fileSystem.readFile(projectJsonPath);
23650
+ if (!fileContent)
23651
+ return;
23652
+ try {
23653
+ return text(this.parseProjectFile(fileContent, projectJsonPath).projectVersion);
23654
+ } catch {
23655
+ return;
23656
+ }
23657
+ }
23610
23658
  loadFromWebAppManifest(projectPath, webAppManifestPath) {
23611
23659
  const folderName = Path2.basename(projectPath);
23612
23660
  return {
@@ -23617,6 +23665,19 @@ class ProjectLoader {
23617
23665
  };
23618
23666
  }
23619
23667
  }
23668
+ function parseJson(json) {
23669
+ try {
23670
+ return [undefined, JSON.parse(json)];
23671
+ } catch (error) {
23672
+ return [
23673
+ error instanceof Error ? error.message : String(error),
23674
+ undefined
23675
+ ];
23676
+ }
23677
+ }
23678
+ function text(value) {
23679
+ return typeof value === "string" ? value.trim() : undefined;
23680
+ }
23620
23681
  // ../../common/src/catch-error.ts
23621
23682
  var MAX_SERIALIZED_LENGTH = 500;
23622
23683
  var TRUNCATION_SUFFIX = "…(truncated)";
@@ -23675,10 +23736,12 @@ function settlePromiseLike(thenable) {
23675
23736
  // ../../common/src/error-codes.ts
23676
23737
  var CLI_ERROR_CODES = [
23677
23738
  "invalid_argument",
23739
+ "confirmation_required",
23678
23740
  "authentication_required",
23679
23741
  "permission_denied",
23680
23742
  "local_permission_denied",
23681
23743
  "not_found",
23744
+ "not_enabled",
23682
23745
  "rate_limited",
23683
23746
  "network_error",
23684
23747
  "timeout",
@@ -23807,7 +23870,8 @@ class ProjectPackOptionsBuilder {
23807
23870
  package: packageInfo,
23808
23871
  skipDependencyOptimization: parameters.packOptions?.skipDependencyOptimization ?? false,
23809
23872
  includeSources: parameters.packOptions?.includeSources ?? false,
23810
- splitPackages: parameters.packOptions?.splitPackages ?? false
23873
+ splitPackages: parameters.packOptions?.splitPackages ?? false,
23874
+ skipBuild: parameters.packOptions?.skipBuild ?? false
23811
23875
  };
23812
23876
  }
23813
23877
  }
@@ -24257,4 +24321,4 @@ export {
24257
24321
  signNupkgsAsync
24258
24322
  };
24259
24323
 
24260
- //# debugId=832E739AD535043D64756E2164756E21
24324
+ //# debugId=322AE1A54E10275564756E2164756E21