@uipath/packager-tool-bpmn 0.0.7

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.
@@ -0,0 +1,8 @@
1
+ import { type IFileSystem, type IProjectToolFactory, type IToolLogger, type ProjectTool, type ProjectType } from "@uipath/solutionpackager-tool-core";
2
+ /**
3
+ * Factory for creating ProcessOrchestration (BPMN) project tools
4
+ */
5
+ export declare class BpmnToolFactory implements IProjectToolFactory {
6
+ readonly supportedTypes: readonly ProjectType[];
7
+ createAsync(logger: IToolLogger, fileSystem: IFileSystem): Promise<ProjectTool>;
8
+ }
@@ -0,0 +1,31 @@
1
+ import type { IProjectBuildOptions, IProjectPackOptions, IProjectRestoreOptions, IProjectValidateOptions } from "@uipath/solutionpackager-tool-core";
2
+ import { type IFileSystem, type IToolLogger, ProjectTool, ToolResult } from "@uipath/solutionpackager-tool-core";
3
+ /**
4
+ * ProcessOrchestration (BPMN) project tool implementation
5
+ */
6
+ export declare class BpmnTool extends ProjectTool {
7
+ private readonly _temporaryStorage;
8
+ constructor(fileSystem: IFileSystem, logger: IToolLogger);
9
+ restoreAsync(_options: IProjectRestoreOptions, _cancellationToken?: AbortSignal): Promise<ToolResult>;
10
+ validateAsync(_options: IProjectValidateOptions, _cancellationToken?: AbortSignal): Promise<ToolResult>;
11
+ buildAsync(options: IProjectBuildOptions, _cancellationToken?: AbortSignal): Promise<ToolResult>;
12
+ packAsync(options: IProjectPackOptions, cancellationToken?: AbortSignal): Promise<ToolResult>;
13
+ dispose(): Promise<void>;
14
+ /**
15
+ * Copy all files from source path to content folder
16
+ */
17
+ private copyFiles;
18
+ /**
19
+ * Create operate.json file if it doesn't already exist
20
+ */
21
+ private createOperateFile;
22
+ /**
23
+ * Create the operate.json file with project configuration
24
+ */
25
+ private createOperateJsonFile;
26
+ /**
27
+ * Create package-descriptor.json file.
28
+ * Lists standard packaging files and .bpmn files from content/.
29
+ */
30
+ private createPackageDescriptor;
31
+ }
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,168 @@
1
+ // src/index.ts
2
+ import { toolsFactoryRepository } from "@uipath/solutionpackager-tool-core";
3
+
4
+ // src/bpmn-tool-factory.ts
5
+ import {
6
+ ProjectTypes as ProjectTypes2
7
+ } from "@uipath/solutionpackager-tool-core";
8
+
9
+ // src/bpmn-tool.ts
10
+ import {
11
+ NugetConstants,
12
+ NugetPackager,
13
+ Path,
14
+ ProjectTool,
15
+ ProjectTypes,
16
+ TemporaryStorageService,
17
+ ToolErrorCodes,
18
+ ToolResult
19
+ } from "@uipath/solutionpackager-tool-core";
20
+ var BpmnConstants = {
21
+ EntryPointsFileName: "entry-points.json",
22
+ BindingsV2FileName: "bindings_v2.json"
23
+ };
24
+
25
+ class BpmnTool extends ProjectTool {
26
+ _temporaryStorage;
27
+ constructor(fileSystem, logger) {
28
+ super(fileSystem, logger);
29
+ this._temporaryStorage = new TemporaryStorageService(fileSystem);
30
+ }
31
+ async restoreAsync(_options, _cancellationToken) {
32
+ this.logger.info("Restore operation is not required for ProcessOrchestration projects");
33
+ return ToolResult.success();
34
+ }
35
+ async validateAsync(_options, _cancellationToken) {
36
+ this.logger.info("Validate operation is not required for ProcessOrchestration projects");
37
+ return ToolResult.success();
38
+ }
39
+ async buildAsync(options, _cancellationToken) {
40
+ const tempFolder = await this._temporaryStorage.getTempFolderPath();
41
+ const localBuildFolder = Path.join(tempFolder, NugetConstants.OutputFolderName);
42
+ const contentFolder = Path.join(localBuildFolder, NugetConstants.ContentFolderName);
43
+ try {
44
+ this.logger.progress("Copying files...");
45
+ await this.copyFiles(options.projectPath, contentFolder);
46
+ this.logger.progress("Creating operate.json file...");
47
+ await this.createOperateFile(options, contentFolder);
48
+ this.logger.progress("Creating package-descriptor.json file...");
49
+ await this.createPackageDescriptor(localBuildFolder, contentFolder);
50
+ return new ToolResult(ToolErrorCodes.Success, "done", [
51
+ localBuildFolder
52
+ ]);
53
+ } catch (error) {
54
+ const errorMessage = error instanceof Error ? error.toString() : String(error);
55
+ this.logger.error(errorMessage);
56
+ return ToolResult.error(ToolErrorCodes.InternalError, "An error occurred while building ProcessOrchestration project files");
57
+ }
58
+ }
59
+ async packAsync(options, cancellationToken) {
60
+ const buildResult = await this.buildAsync(options, cancellationToken);
61
+ if (!buildResult.isSuccess) {
62
+ return buildResult;
63
+ }
64
+ const localBuildFolder = buildResult.packages[0];
65
+ try {
66
+ this.logger.progress("Creating NuGet package...");
67
+ const nupkgFileName = `${options.package.id}.${options.package.version}.nupkg`;
68
+ const nupkgPath = Path.join(options.outputPath, nupkgFileName);
69
+ const packager = new NugetPackager(this.fileSystem);
70
+ const result = await packager.packAsync(localBuildFolder, options.package, nupkgPath);
71
+ this.logger.progress("Package created successfully");
72
+ return new ToolResult(ToolErrorCodes.Success, "done", [
73
+ result.outputPath
74
+ ]);
75
+ } catch (error) {
76
+ const errorMessage = error instanceof Error ? error.toString() : String(error);
77
+ this.logger.error(errorMessage);
78
+ return ToolResult.error(ToolErrorCodes.InternalError, "An error occurred while packing ProcessOrchestration project");
79
+ }
80
+ }
81
+ async dispose() {
82
+ this.logger.info("Disposing ProcessOrchestration Tool");
83
+ try {
84
+ await this._temporaryStorage.cleanup();
85
+ } catch {}
86
+ }
87
+ async copyFiles(sourcePath, destinationPath) {
88
+ await this.fileSystem.mkdir(destinationPath);
89
+ const files = await this.fileSystem.readdir(sourcePath);
90
+ for (const file of files) {
91
+ const sourceFile = Path.join(sourcePath, file);
92
+ const destinationFile = Path.join(destinationPath, file);
93
+ const stat = await this.fileSystem.stat(sourceFile);
94
+ if (stat?.isFile()) {
95
+ const content = await this.fileSystem.readFile(sourceFile);
96
+ if (content) {
97
+ await this.fileSystem.writeFile(destinationFile, content);
98
+ }
99
+ }
100
+ }
101
+ }
102
+ async createOperateFile(options, contentFolder) {
103
+ const operateJsonFilePath = Path.join(contentFolder, NugetConstants.OperateFileName);
104
+ const exists = await this.fileSystem.exists(operateJsonFilePath);
105
+ if (!exists) {
106
+ await this.createOperateJsonFile(contentFolder, options.projectStorageId ?? "", operateJsonFilePath);
107
+ }
108
+ }
109
+ async createOperateJsonFile(projectPath, projectId, filePath) {
110
+ const entryPointsFilePath = Path.join(projectPath, BpmnConstants.EntryPointsFileName);
111
+ let mainPath = "";
112
+ const entryPointsExists = await this.fileSystem.exists(entryPointsFilePath);
113
+ if (entryPointsExists) {
114
+ const entryPointsContent = await this.fileSystem.readFile(entryPointsFilePath);
115
+ if (entryPointsContent) {
116
+ try {
117
+ const entryPointsText = new TextDecoder().decode(entryPointsContent);
118
+ const entryPoints = JSON.parse(entryPointsText);
119
+ mainPath = entryPoints.entryPoints?.[0]?.filePath ?? "";
120
+ } catch {}
121
+ }
122
+ }
123
+ const operateFileModel = {
124
+ $schema: "https://cloud.uipath.com/draft/2024-12/operate",
125
+ contentType: ProjectTypes.ProcessOrchestration,
126
+ projectId,
127
+ main: mainPath,
128
+ targetFramework: "Portable",
129
+ runtimeOptions: {
130
+ isAttended: false,
131
+ requiresUserInteraction: false
132
+ }
133
+ };
134
+ const operateJsonString = JSON.stringify(operateFileModel, null, 2);
135
+ await this.fileSystem.writeFile(filePath, operateJsonString);
136
+ }
137
+ async createPackageDescriptor(localBuildFolder, contentFolder) {
138
+ const descriptorFiles = {};
139
+ descriptorFiles[NugetConstants.OperateFileName] = Path.join(NugetConstants.ContentFolderName, NugetConstants.OperateFileName);
140
+ descriptorFiles[BpmnConstants.EntryPointsFileName] = Path.join(NugetConstants.ContentFolderName, BpmnConstants.EntryPointsFileName);
141
+ descriptorFiles[NugetConstants.BindingsFileId] = Path.join(NugetConstants.ContentFolderName, BpmnConstants.BindingsV2FileName);
142
+ const contentFiles = await this.fileSystem.readdir(contentFolder);
143
+ for (const file of contentFiles) {
144
+ if (file.endsWith(".bpmn")) {
145
+ descriptorFiles[file] = Path.join(NugetConstants.ContentFolderName, file);
146
+ }
147
+ }
148
+ const packageDescriptorPath = Path.join(localBuildFolder, NugetConstants.ContentFolderName, NugetConstants.PackageDescriptorFileName);
149
+ const packageDescriptorJson = JSON.stringify({
150
+ $schema: "https://cloud.uipath.com/draft/2024-12/package-descriptor",
151
+ files: descriptorFiles
152
+ }, null, 2);
153
+ await this.fileSystem.writeFile(packageDescriptorPath, packageDescriptorJson);
154
+ }
155
+ }
156
+
157
+ // src/bpmn-tool-factory.ts
158
+ class BpmnToolFactory {
159
+ supportedTypes = [
160
+ ProjectTypes2.ProcessOrchestration
161
+ ];
162
+ async createAsync(logger, fileSystem) {
163
+ return new BpmnTool(fileSystem, logger);
164
+ }
165
+ }
166
+
167
+ // src/index.ts
168
+ toolsFactoryRepository.registerProjectToolFactory(new BpmnToolFactory);
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@uipath/packager-tool-bpmn",
3
+ "version": "0.0.7",
4
+ "description": "UiPath ProcessOrchestration (BPMN) tool implementation",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "source": "./src/index.ts",
9
+ "default": "./dist/index.js"
10
+ }
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/UiPath/cli.git",
15
+ "directory": "packages/packager/packager-tool-bpmn"
16
+ },
17
+ "publishConfig": {
18
+ "registry": "https://registry.npmjs.org/"
19
+ },
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
+ "files": [
39
+ "dist",
40
+ "!dist/**/*.map",
41
+ "src"
42
+ ],
43
+ "author": "",
44
+ "license": "ISC",
45
+ "peerDependencies": {
46
+ "@uipath/solutionpackager-tool-core": "0.0.31"
47
+ },
48
+ "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",
54
+ "playwright": "^1.57.0",
55
+ "typescript": "^5.9.3",
56
+ "vitest": "^4.0.14"
57
+ }
58
+ }
@@ -0,0 +1,25 @@
1
+ import {
2
+ type IFileSystem,
3
+ type IProjectToolFactory,
4
+ type IToolLogger,
5
+ type ProjectTool,
6
+ type ProjectType,
7
+ ProjectTypes,
8
+ } from "@uipath/solutionpackager-tool-core";
9
+ import { BpmnTool } from "./bpmn-tool.js";
10
+
11
+ /**
12
+ * Factory for creating ProcessOrchestration (BPMN) project tools
13
+ */
14
+ export class BpmnToolFactory implements IProjectToolFactory {
15
+ readonly supportedTypes: readonly ProjectType[] = [
16
+ ProjectTypes.ProcessOrchestration,
17
+ ];
18
+
19
+ async createAsync(
20
+ logger: IToolLogger,
21
+ fileSystem: IFileSystem,
22
+ ): Promise<ProjectTool> {
23
+ return new BpmnTool(fileSystem, logger);
24
+ }
25
+ }
@@ -0,0 +1,299 @@
1
+ import type {
2
+ EntryPointsFileModel,
3
+ IProjectBuildOptions,
4
+ IProjectPackOptions,
5
+ IProjectRestoreOptions,
6
+ IProjectValidateOptions,
7
+ } from "@uipath/solutionpackager-tool-core";
8
+ import {
9
+ type IFileSystem,
10
+ type IToolLogger,
11
+ NugetConstants,
12
+ NugetPackager,
13
+ Path,
14
+ ProjectTool,
15
+ ProjectTypes,
16
+ TemporaryStorageService,
17
+ ToolErrorCodes,
18
+ ToolResult,
19
+ } from "@uipath/solutionpackager-tool-core";
20
+
21
+ /**
22
+ * BPMN-specific file names (same conventions as Flow)
23
+ * ProcessOrchestration projects use 'entry-points.json' (with dash) and 'bindings_v2.json' (with underscore)
24
+ */
25
+ const BpmnConstants = {
26
+ EntryPointsFileName: "entry-points.json",
27
+ BindingsV2FileName: "bindings_v2.json",
28
+ } as const;
29
+
30
+ /**
31
+ * ProcessOrchestration (BPMN) project tool implementation
32
+ */
33
+ export class BpmnTool extends ProjectTool {
34
+ private readonly _temporaryStorage: TemporaryStorageService;
35
+
36
+ constructor(fileSystem: IFileSystem, logger: IToolLogger) {
37
+ super(fileSystem, logger);
38
+ this._temporaryStorage = new TemporaryStorageService(fileSystem);
39
+ }
40
+
41
+ override async restoreAsync(
42
+ _options: IProjectRestoreOptions,
43
+ _cancellationToken?: AbortSignal,
44
+ ): Promise<ToolResult> {
45
+ this.logger.info(
46
+ "Restore operation is not required for ProcessOrchestration projects",
47
+ );
48
+ return ToolResult.success();
49
+ }
50
+
51
+ override async validateAsync(
52
+ _options: IProjectValidateOptions,
53
+ _cancellationToken?: AbortSignal,
54
+ ): Promise<ToolResult> {
55
+ this.logger.info(
56
+ "Validate operation is not required for ProcessOrchestration projects",
57
+ );
58
+ return ToolResult.success();
59
+ }
60
+
61
+ override async buildAsync(
62
+ options: IProjectBuildOptions,
63
+ _cancellationToken?: AbortSignal,
64
+ ): Promise<ToolResult> {
65
+ const tempFolder = await this._temporaryStorage.getTempFolderPath();
66
+ const localBuildFolder = Path.join(
67
+ tempFolder,
68
+ NugetConstants.OutputFolderName,
69
+ );
70
+ const contentFolder = Path.join(
71
+ localBuildFolder,
72
+ NugetConstants.ContentFolderName,
73
+ );
74
+
75
+ try {
76
+ this.logger.progress("Copying files...");
77
+ await this.copyFiles(options.projectPath, contentFolder);
78
+
79
+ this.logger.progress("Creating operate.json file...");
80
+ await this.createOperateFile(options, contentFolder);
81
+
82
+ this.logger.progress("Creating package-descriptor.json file...");
83
+ await this.createPackageDescriptor(localBuildFolder, contentFolder);
84
+
85
+ return new ToolResult(ToolErrorCodes.Success, "done", [
86
+ localBuildFolder,
87
+ ]);
88
+ } catch (error) {
89
+ const errorMessage =
90
+ error instanceof Error ? error.toString() : String(error);
91
+ this.logger.error(errorMessage);
92
+ return ToolResult.error(
93
+ ToolErrorCodes.InternalError,
94
+ "An error occurred while building ProcessOrchestration project files",
95
+ );
96
+ }
97
+ }
98
+
99
+ override async packAsync(
100
+ options: IProjectPackOptions,
101
+ cancellationToken?: AbortSignal,
102
+ ): Promise<ToolResult> {
103
+ // First, run the build step to prepare the bundle content
104
+ const buildResult = await this.buildAsync(options, cancellationToken);
105
+ if (!buildResult.isSuccess) {
106
+ return buildResult;
107
+ }
108
+
109
+ const localBuildFolder = buildResult.packages[0];
110
+
111
+ try {
112
+ // Create the NuGet package
113
+ this.logger.progress("Creating NuGet package...");
114
+
115
+ const nupkgFileName = `${options.package.id}.${options.package.version}.nupkg`;
116
+ const nupkgPath = Path.join(options.outputPath, nupkgFileName);
117
+
118
+ const packager = new NugetPackager(this.fileSystem);
119
+ const result = await packager.packAsync(
120
+ localBuildFolder,
121
+ options.package,
122
+ nupkgPath,
123
+ );
124
+
125
+ this.logger.progress("Package created successfully");
126
+ return new ToolResult(ToolErrorCodes.Success, "done", [
127
+ result.outputPath,
128
+ ]);
129
+ } catch (error) {
130
+ const errorMessage =
131
+ error instanceof Error ? error.toString() : String(error);
132
+ this.logger.error(errorMessage);
133
+ return ToolResult.error(
134
+ ToolErrorCodes.InternalError,
135
+ "An error occurred while packing ProcessOrchestration project",
136
+ );
137
+ }
138
+ }
139
+
140
+ override async dispose(): Promise<void> {
141
+ this.logger.info("Disposing ProcessOrchestration Tool");
142
+ try {
143
+ await this._temporaryStorage.cleanup();
144
+ } catch {
145
+ // Ignore errors during cleanup
146
+ }
147
+ }
148
+
149
+ /**
150
+ * Copy all files from source path to content folder
151
+ */
152
+ private async copyFiles(
153
+ sourcePath: string,
154
+ destinationPath: string,
155
+ ): Promise<void> {
156
+ await this.fileSystem.mkdir(destinationPath);
157
+
158
+ const files = await this.fileSystem.readdir(sourcePath);
159
+
160
+ for (const file of files) {
161
+ const sourceFile = Path.join(sourcePath, file);
162
+ const destinationFile = Path.join(destinationPath, file);
163
+
164
+ const stat = await this.fileSystem.stat(sourceFile);
165
+ if (stat?.isFile()) {
166
+ const content = await this.fileSystem.readFile(sourceFile);
167
+ if (content) {
168
+ await this.fileSystem.writeFile(destinationFile, content);
169
+ }
170
+ }
171
+ }
172
+ }
173
+
174
+ /**
175
+ * Create operate.json file if it doesn't already exist
176
+ */
177
+ private async createOperateFile(
178
+ options: IProjectBuildOptions,
179
+ contentFolder: string,
180
+ ): Promise<void> {
181
+ const operateJsonFilePath = Path.join(
182
+ contentFolder,
183
+ NugetConstants.OperateFileName,
184
+ );
185
+
186
+ const exists = await this.fileSystem.exists(operateJsonFilePath);
187
+ if (!exists) {
188
+ await this.createOperateJsonFile(
189
+ contentFolder,
190
+ options.projectStorageId ?? "",
191
+ operateJsonFilePath,
192
+ );
193
+ }
194
+ }
195
+
196
+ /**
197
+ * Create the operate.json file with project configuration
198
+ */
199
+ private async createOperateJsonFile(
200
+ projectPath: string,
201
+ projectId: string,
202
+ filePath: string,
203
+ ): Promise<void> {
204
+ const entryPointsFilePath = Path.join(
205
+ projectPath,
206
+ BpmnConstants.EntryPointsFileName,
207
+ );
208
+ let mainPath = "";
209
+
210
+ const entryPointsExists =
211
+ await this.fileSystem.exists(entryPointsFilePath);
212
+ if (entryPointsExists) {
213
+ const entryPointsContent =
214
+ await this.fileSystem.readFile(entryPointsFilePath);
215
+ if (entryPointsContent) {
216
+ try {
217
+ const entryPointsText = new TextDecoder().decode(
218
+ entryPointsContent,
219
+ );
220
+ const entryPoints: EntryPointsFileModel =
221
+ JSON.parse(entryPointsText);
222
+ mainPath = entryPoints.entryPoints?.[0]?.filePath ?? "";
223
+ } catch {
224
+ // Ignore parsing errors, use empty mainPath
225
+ }
226
+ }
227
+ }
228
+
229
+ const operateFileModel = {
230
+ $schema: "https://cloud.uipath.com/draft/2024-12/operate",
231
+ contentType: ProjectTypes.ProcessOrchestration,
232
+ projectId: projectId,
233
+ main: mainPath,
234
+ targetFramework: "Portable",
235
+ runtimeOptions: {
236
+ isAttended: false,
237
+ requiresUserInteraction: false,
238
+ },
239
+ };
240
+
241
+ const operateJsonString = JSON.stringify(operateFileModel, null, 2);
242
+ await this.fileSystem.writeFile(filePath, operateJsonString);
243
+ }
244
+
245
+ /**
246
+ * Create package-descriptor.json file.
247
+ * Lists standard packaging files and .bpmn files from content/.
248
+ */
249
+ private async createPackageDescriptor(
250
+ localBuildFolder: string,
251
+ contentFolder: string,
252
+ ): Promise<void> {
253
+ const descriptorFiles: Record<string, string> = {};
254
+
255
+ // Standard packaging files
256
+ descriptorFiles[NugetConstants.OperateFileName] = Path.join(
257
+ NugetConstants.ContentFolderName,
258
+ NugetConstants.OperateFileName,
259
+ );
260
+ descriptorFiles[BpmnConstants.EntryPointsFileName] = Path.join(
261
+ NugetConstants.ContentFolderName,
262
+ BpmnConstants.EntryPointsFileName,
263
+ );
264
+ descriptorFiles[NugetConstants.BindingsFileId] = Path.join(
265
+ NugetConstants.ContentFolderName,
266
+ BpmnConstants.BindingsV2FileName,
267
+ );
268
+
269
+ // Add .bpmn files from content/
270
+ const contentFiles = await this.fileSystem.readdir(contentFolder);
271
+ for (const file of contentFiles) {
272
+ if (file.endsWith(".bpmn")) {
273
+ descriptorFiles[file] = Path.join(
274
+ NugetConstants.ContentFolderName,
275
+ file,
276
+ );
277
+ }
278
+ }
279
+
280
+ const packageDescriptorPath = Path.join(
281
+ localBuildFolder,
282
+ NugetConstants.ContentFolderName,
283
+ NugetConstants.PackageDescriptorFileName,
284
+ );
285
+ const packageDescriptorJson = JSON.stringify(
286
+ {
287
+ $schema:
288
+ "https://cloud.uipath.com/draft/2024-12/package-descriptor",
289
+ files: descriptorFiles,
290
+ },
291
+ null,
292
+ 2,
293
+ );
294
+ await this.fileSystem.writeFile(
295
+ packageDescriptorPath,
296
+ packageDescriptorJson,
297
+ );
298
+ }
299
+ }
package/src/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ // Self-register BPMN (ProcessOrchestration) tool factory with the singleton repository
2
+ import { toolsFactoryRepository } from "@uipath/solutionpackager-tool-core";
3
+ import { BpmnToolFactory } from "./bpmn-tool-factory.js";
4
+
5
+ toolsFactoryRepository.registerProjectToolFactory(new BpmnToolFactory());