@uipath/api-workflow-tool 0.1.16 → 0.2.0

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 +35 -24
  2. package/package.json +4 -4
package/dist/tool.js CHANGED
@@ -11469,6 +11469,23 @@ class ProjectPackager {
11469
11469
  }
11470
11470
  });
11471
11471
  }
11472
+ async findNupkgInParentDir(packagePath) {
11473
+ const dirName = Path3.basename(packagePath);
11474
+ const parentDir = Path3.dirname(packagePath);
11475
+ const parentFiles = await this.fileSystem.readdir(parentDir);
11476
+ const matchingFiles = parentFiles.filter((f) => f.endsWith(".nupkg") && f.startsWith(`${dirName}.`));
11477
+ return { dir: parentDir, files: matchingFiles };
11478
+ }
11479
+ async copyFileToDestination(sourcePath, destinationPath) {
11480
+ const fileName = Path3.basename(sourcePath);
11481
+ const destPath = Path3.join(destinationPath, fileName);
11482
+ const data = await this.fileSystem.readFile(sourcePath);
11483
+ if (!data) {
11484
+ throw new Error(translate6.t("solutionpackager.packager.errors.failedToReadPackage", { path: sourcePath }));
11485
+ }
11486
+ await this.fileSystem.writeFile(destPath, data);
11487
+ return destPath;
11488
+ }
11472
11489
  async copyPackagesToDestination(packagePaths, destinationPath, packageInfo) {
11473
11490
  await this.fileSystem.mkdir(destinationPath);
11474
11491
  const destinationPackages = [];
@@ -11480,33 +11497,27 @@ class ProjectPackager {
11480
11497
  if (nupkgFiles.length > 0) {
11481
11498
  for (const nupkgFile of nupkgFiles) {
11482
11499
  const filePath = Path3.join(packagePath, nupkgFile);
11483
- const destPath = Path3.join(destinationPath, nupkgFile);
11484
- const data = await this.fileSystem.readFile(filePath);
11485
- if (!data) {
11486
- throw new Error(translate6.t("solutionpackager.packager.errors.failedToReadPackage", {
11487
- path: filePath
11488
- }));
11489
- }
11490
- await this.fileSystem.writeFile(destPath, data);
11491
- destinationPackages.push(destPath);
11500
+ const dest = await this.copyFileToDestination(filePath, destinationPath);
11501
+ destinationPackages.push(dest);
11492
11502
  }
11493
11503
  } else {
11494
- const nupkgFileName = `${packageInfo.id}.${packageInfo.version}.nupkg`;
11495
- const destPath = Path3.join(destinationPath, nupkgFileName);
11496
- const packResult = await this.nugetPackager.packAsync(packagePath, packageInfo, destPath);
11497
- destinationPackages.push(packResult.outputPath);
11504
+ const parent = await this.findNupkgInParentDir(packagePath);
11505
+ if (parent.files.length > 0) {
11506
+ for (const nupkgFile of parent.files) {
11507
+ const filePath = Path3.join(parent.dir, nupkgFile);
11508
+ const dest = await this.copyFileToDestination(filePath, destinationPath);
11509
+ destinationPackages.push(dest);
11510
+ }
11511
+ } else {
11512
+ const nupkgFileName = `${packageInfo.id}.${packageInfo.version}.nupkg`;
11513
+ const destPath = Path3.join(destinationPath, nupkgFileName);
11514
+ const packResult = await this.nugetPackager.packAsync(packagePath, packageInfo, destPath);
11515
+ destinationPackages.push(packResult.outputPath);
11516
+ }
11498
11517
  }
11499
11518
  } else {
11500
- const fileName = packagePath.split(/[\\/]/).pop() || packagePath;
11501
- const destPath = Path3.join(destinationPath, fileName);
11502
- const data = await this.fileSystem.readFile(packagePath);
11503
- if (!data) {
11504
- throw new Error(translate6.t("solutionpackager.packager.errors.failedToReadPackage", {
11505
- path: packagePath
11506
- }));
11507
- }
11508
- await this.fileSystem.writeFile(destPath, data);
11509
- destinationPackages.push(destPath);
11519
+ const dest = await this.copyFileToDestination(packagePath, destinationPath);
11520
+ destinationPackages.push(dest);
11510
11521
  }
11511
11522
  }
11512
11523
  return destinationPackages;
@@ -34590,7 +34601,7 @@ import"./packager-tool.js";
34590
34601
  // package.json
34591
34602
  var package_default = {
34592
34603
  name: "@uipath/api-workflow-tool",
34593
- version: "0.1.16",
34604
+ version: "0.2.0",
34594
34605
  description: "Run UiPath API Workflows locally.",
34595
34606
  private: false,
34596
34607
  repository: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/api-workflow-tool",
3
- "version": "0.1.16",
3
+ "version": "0.2.0",
4
4
  "description": "Run UiPath API Workflows locally.",
5
5
  "private": false,
6
6
  "repository": {
@@ -36,9 +36,9 @@
36
36
  "devDependencies": {
37
37
  "@types/node": "^25.5.0",
38
38
  "@uipath/api-workflow-executor": "12.10.2",
39
- "@uipath/auth": "0.1.11",
40
- "@uipath/common": "0.1.15",
41
- "@uipath/filesystem": "0.1.7",
39
+ "@uipath/auth": "0.2.0",
40
+ "@uipath/common": "0.2.0",
41
+ "@uipath/filesystem": "0.2.0",
42
42
  "@uipath/packager-tool-apiworkflow": "0.0.17",
43
43
  "@uipath/project-packager": "1.1.10",
44
44
  "commander": "^14.0.3",