@uipath/packager-tool-bpmn 0.0.7 → 1.196.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/packager-tool-bpmn",
3
- "version": "0.0.7",
3
+ "version": "1.196.0",
4
4
  "description": "UiPath ProcessOrchestration (BPMN) tool implementation",
5
5
  "type": "module",
6
6
  "exports": {
@@ -18,23 +18,6 @@
18
18
  "registry": "https://registry.npmjs.org/"
19
19
  },
20
20
  "types": "./dist/index.d.ts",
21
- "scripts": {
22
- "build": "bun build ./src/index.ts --outdir dist --format esm --target browser --external @uipath/solutionpackager-tool-core && tsc --emitDeclarationOnly --outDir dist",
23
- "dev": "bun build ./src/index.ts --outdir dist --format esm --target browser --external @uipath/solutionpackager-tool-core --watch",
24
- "test": "vitest run",
25
- "test:browser": "vitest run --config=vitest.browser.config.ts",
26
- "test:coverage": "vitest run --coverage",
27
- "test:browser:coverage": "vitest run --config=vitest.browser.config.ts --coverage",
28
- "test:all": "bun run test && bun run test:browser",
29
- "test:all:coverage": "bun run test:coverage && bun run test:browser:coverage",
30
- "prepack": "bun run build",
31
- "publish:dry": "bun publish --dry-run",
32
- "publish:gh": "bun publish",
33
- "version:patch": "bun version patch --no-git-tag-version",
34
- "version:minor": "bun version minor --no-git-tag-version",
35
- "version:major": "bun version major --no-git-tag-version",
36
- "lint": "biome check ."
37
- },
38
21
  "files": [
39
22
  "dist",
40
23
  "!dist/**/*.map",
@@ -43,16 +26,20 @@
43
26
  "author": "",
44
27
  "license": "ISC",
45
28
  "peerDependencies": {
46
- "@uipath/solutionpackager-tool-core": "0.0.31"
29
+ "@uipath/solutionpackager-tool-core": "1.196.0"
30
+ },
31
+ "dependencies": {
32
+ "@uipath/maestro-sdk": "1.196.0"
47
33
  },
48
34
  "devDependencies": {
49
- "@types/node": "^25.5.0",
50
- "@uipath/solutionpackager-tool-core": "0.0.31",
51
- "@vitest/browser": "^4.0.14",
52
- "@vitest/browser-playwright": "^4.0.14",
53
- "@vitest/coverage-v8": "^4.0.14",
35
+ "@types/node": "^25.5.2",
36
+ "@uipath/solutionpackager-tool-core": "1.196.0",
37
+ "@vitest/browser": "^4.1.6",
38
+ "@vitest/browser-playwright": "^4.1.6",
39
+ "@vitest/coverage-v8": "^4.1.6",
54
40
  "playwright": "^1.57.0",
55
- "typescript": "^5.9.3",
56
- "vitest": "^4.0.14"
57
- }
41
+ "typescript": "^6.0.2",
42
+ "vitest": "^4.1.6"
43
+ },
44
+ "gitHead": "bed2b46f1ec33a47a7dcae2e6d4b7ab99bd06981"
58
45
  }
@@ -14,6 +14,7 @@ import { BpmnTool } from "./bpmn-tool.js";
14
14
  export class BpmnToolFactory implements IProjectToolFactory {
15
15
  readonly supportedTypes: readonly ProjectType[] = [
16
16
  ProjectTypes.ProcessOrchestration,
17
+ "processOrchestration",
17
18
  ];
18
19
 
19
20
  async createAsync(
package/src/bpmn-tool.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import type { BpmnValidationFileSystem } from "@uipath/maestro-sdk/bpmn-validation";
2
+ import { BpmnValidateService } from "@uipath/maestro-sdk/bpmn-validation";
1
3
  import type {
2
4
  EntryPointsFileModel,
3
5
  IProjectBuildOptions,
@@ -27,15 +29,30 @@ const BpmnConstants = {
27
29
  BindingsV2FileName: "bindings_v2.json",
28
30
  } as const;
29
31
 
32
+ function createBpmnValidationFileSystem(
33
+ fileSystem: IFileSystem,
34
+ ): BpmnValidationFileSystem {
35
+ return {
36
+ readdir: (path) => fileSystem.readdir(path),
37
+ readFile: (path) => fileSystem.readFile(path),
38
+ exists: (path) => fileSystem.exists(path),
39
+ joinPath: (...segments) => Path.join(...segments),
40
+ };
41
+ }
42
+
30
43
  /**
31
44
  * ProcessOrchestration (BPMN) project tool implementation
32
45
  */
33
46
  export class BpmnTool extends ProjectTool {
34
47
  private readonly _temporaryStorage: TemporaryStorageService;
48
+ private readonly _validateService: BpmnValidateService;
35
49
 
36
50
  constructor(fileSystem: IFileSystem, logger: IToolLogger) {
37
51
  super(fileSystem, logger);
38
52
  this._temporaryStorage = new TemporaryStorageService(fileSystem);
53
+ this._validateService = new BpmnValidateService(
54
+ createBpmnValidationFileSystem(fileSystem),
55
+ );
39
56
  }
40
57
 
41
58
  override async restoreAsync(
@@ -49,12 +66,26 @@ export class BpmnTool extends ProjectTool {
49
66
  }
50
67
 
51
68
  override async validateAsync(
52
- _options: IProjectValidateOptions,
69
+ options: IProjectValidateOptions,
53
70
  _cancellationToken?: AbortSignal,
54
71
  ): Promise<ToolResult> {
55
- this.logger.info(
56
- "Validate operation is not required for ProcessOrchestration projects",
72
+ this.logger.info("Validating ProcessOrchestration BPMN project...");
73
+ const result = await this._validateService.validateProject(
74
+ options.projectPath,
57
75
  );
76
+ if (!result.isValid) {
77
+ if (result.message) {
78
+ this.logger.error(result.message);
79
+ }
80
+ return ToolResult.error(
81
+ result.errorCode ?? ToolErrorCodes.InternalError,
82
+ result.message,
83
+ );
84
+ }
85
+ if (result.message) {
86
+ this.logger.warn(result.message);
87
+ }
88
+ this.logger.info("ProcessOrchestration BPMN validation completed");
58
89
  return ToolResult.success();
59
90
  }
60
91
 
@@ -73,6 +104,22 @@ export class BpmnTool extends ProjectTool {
73
104
  );
74
105
 
75
106
  try {
107
+ if (!options.skipValidate) {
108
+ const validationResult = await this.validateAsync({
109
+ projectPath: options.projectPath,
110
+ excludeConfiguredSources: options.excludeConfiguredSources,
111
+ skipAnalyze: options.skipAnalyze,
112
+ skipValidate: options.skipValidate,
113
+ detailedLogPath: options.detailedLogPath,
114
+ policyFilePath: options.policyFilePath,
115
+ logLevel: options.logLevel,
116
+ nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
117
+ });
118
+ if (!validationResult.isSuccess) {
119
+ return validationResult;
120
+ }
121
+ }
122
+
76
123
  this.logger.progress("Copying files...");
77
124
  await this.copyFiles(options.projectPath, contentFolder);
78
125