@uipath/packager-tool-bpmn 1.196.0 → 1.197.0-preview.64

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.
@@ -20,10 +20,6 @@ export declare class BpmnTool extends ProjectTool {
20
20
  * Create operate.json file if it doesn't already exist
21
21
  */
22
22
  private createOperateFile;
23
- /**
24
- * Create the operate.json file with project configuration
25
- */
26
- private createOperateJsonFile;
27
23
  /**
28
24
  * Create package-descriptor.json file.
29
25
  * Lists standard packaging files and .bpmn files from content/.
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
- export {};
1
+ import { BpmnToolFactory } from "./bpmn-tool-factory.js";
2
+ export { BpmnToolFactory };
package/dist/index.js CHANGED
@@ -3822,6 +3822,7 @@ function decodeXmlEntities(value) {
3822
3822
 
3823
3823
  // src/bpmn-tool.ts
3824
3824
  import {
3825
+ ensureContentOperateFile,
3825
3826
  NugetConstants,
3826
3827
  NugetPackager,
3827
3828
  Path,
@@ -3950,39 +3951,12 @@ class BpmnTool extends ProjectTool {
3950
3951
  }
3951
3952
  }
3952
3953
  async createOperateFile(options, contentFolder) {
3953
- const operateJsonFilePath = Path.join(contentFolder, NugetConstants.OperateFileName);
3954
- const exists = await this.fileSystem.exists(operateJsonFilePath);
3955
- if (!exists) {
3956
- await this.createOperateJsonFile(contentFolder, options.projectStorageId ?? "", operateJsonFilePath);
3957
- }
3958
- }
3959
- async createOperateJsonFile(projectPath, projectId, filePath) {
3960
- const entryPointsFilePath = Path.join(projectPath, BpmnConstants.EntryPointsFileName);
3961
- let mainPath = "";
3962
- const entryPointsExists = await this.fileSystem.exists(entryPointsFilePath);
3963
- if (entryPointsExists) {
3964
- const entryPointsContent = await this.fileSystem.readFile(entryPointsFilePath);
3965
- if (entryPointsContent) {
3966
- try {
3967
- const entryPointsText = new TextDecoder().decode(entryPointsContent);
3968
- const entryPoints = JSON.parse(entryPointsText);
3969
- mainPath = entryPoints.entryPoints?.[0]?.filePath ?? "";
3970
- } catch {}
3971
- }
3972
- }
3973
- const operateFileModel = {
3974
- $schema: "https://cloud.uipath.com/draft/2024-12/operate",
3975
- contentType: ProjectTypes.ProcessOrchestration,
3976
- projectId,
3977
- main: mainPath,
3978
- targetFramework: "Portable",
3979
- runtimeOptions: {
3980
- isAttended: false,
3981
- requiresUserInteraction: false
3982
- }
3983
- };
3984
- const operateJsonString = JSON.stringify(operateFileModel, null, 2);
3985
- await this.fileSystem.writeFile(filePath, operateJsonString);
3954
+ await ensureContentOperateFile(this.fileSystem, {
3955
+ contentFolder,
3956
+ projectPath: options.projectPath,
3957
+ projectStorageId: options.projectStorageId,
3958
+ contentType: ProjectTypes.ProcessOrchestration
3959
+ });
3986
3960
  }
3987
3961
  async createPackageDescriptor(localBuildFolder, contentFolder) {
3988
3962
  const descriptorFiles = {};
@@ -4017,3 +3991,8 @@ class BpmnToolFactory {
4017
3991
 
4018
3992
  // src/index.ts
4019
3993
  toolsFactoryRepository.registerProjectToolFactory(new BpmnToolFactory);
3994
+ export {
3995
+ BpmnToolFactory
3996
+ };
3997
+
3998
+ //# debugId=44BFEEFD91BBE09264756E2164756E21
package/package.json CHANGED
@@ -1,45 +1,34 @@
1
1
  {
2
- "name": "@uipath/packager-tool-bpmn",
3
- "version": "1.196.0",
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
- "files": [
22
- "dist",
23
- "!dist/**/*.map",
24
- "src"
25
- ],
26
- "author": "",
27
- "license": "ISC",
28
- "peerDependencies": {
29
- "@uipath/solutionpackager-tool-core": "1.196.0"
30
- },
31
- "dependencies": {
32
- "@uipath/maestro-sdk": "1.196.0"
33
- },
34
- "devDependencies": {
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",
40
- "playwright": "^1.57.0",
41
- "typescript": "^6.0.2",
42
- "vitest": "^4.1.6"
43
- },
44
- "gitHead": "bed2b46f1ec33a47a7dcae2e6d4b7ab99bd06981"
2
+ "name": "@uipath/packager-tool-bpmn",
3
+ "version": "1.197.0-preview.64",
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
+ "files": [
22
+ "dist",
23
+ "src"
24
+ ],
25
+ "author": "",
26
+ "license": "ISC",
27
+ "peerDependencies": {
28
+ "@uipath/solutionpackager-tool-core": "1.197.0"
29
+ },
30
+ "dependencies": {
31
+ "@uipath/maestro-sdk": "1.197.0"
32
+ },
33
+ "gitHead": "3977b977945bf519336258da69fd271433eaaef4"
45
34
  }
package/src/bpmn-tool.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import type { BpmnValidationFileSystem } from "@uipath/maestro-sdk/bpmn-validation";
2
2
  import { BpmnValidateService } from "@uipath/maestro-sdk/bpmn-validation";
3
3
  import type {
4
- EntryPointsFileModel,
5
4
  IProjectBuildOptions,
6
5
  IProjectPackOptions,
7
6
  IProjectRestoreOptions,
8
7
  IProjectValidateOptions,
9
8
  } from "@uipath/solutionpackager-tool-core";
10
9
  import {
10
+ ensureContentOperateFile,
11
11
  type IFileSystem,
12
12
  type IToolLogger,
13
13
  NugetConstants,
@@ -225,68 +225,12 @@ export class BpmnTool extends ProjectTool {
225
225
  options: IProjectBuildOptions,
226
226
  contentFolder: string,
227
227
  ): Promise<void> {
228
- const operateJsonFilePath = Path.join(
228
+ await ensureContentOperateFile(this.fileSystem, {
229
229
  contentFolder,
230
- NugetConstants.OperateFileName,
231
- );
232
-
233
- const exists = await this.fileSystem.exists(operateJsonFilePath);
234
- if (!exists) {
235
- await this.createOperateJsonFile(
236
- contentFolder,
237
- options.projectStorageId ?? "",
238
- operateJsonFilePath,
239
- );
240
- }
241
- }
242
-
243
- /**
244
- * Create the operate.json file with project configuration
245
- */
246
- private async createOperateJsonFile(
247
- projectPath: string,
248
- projectId: string,
249
- filePath: string,
250
- ): Promise<void> {
251
- const entryPointsFilePath = Path.join(
252
- projectPath,
253
- BpmnConstants.EntryPointsFileName,
254
- );
255
- let mainPath = "";
256
-
257
- const entryPointsExists =
258
- await this.fileSystem.exists(entryPointsFilePath);
259
- if (entryPointsExists) {
260
- const entryPointsContent =
261
- await this.fileSystem.readFile(entryPointsFilePath);
262
- if (entryPointsContent) {
263
- try {
264
- const entryPointsText = new TextDecoder().decode(
265
- entryPointsContent,
266
- );
267
- const entryPoints: EntryPointsFileModel =
268
- JSON.parse(entryPointsText);
269
- mainPath = entryPoints.entryPoints?.[0]?.filePath ?? "";
270
- } catch {
271
- // Ignore parsing errors, use empty mainPath
272
- }
273
- }
274
- }
275
-
276
- const operateFileModel = {
277
- $schema: "https://cloud.uipath.com/draft/2024-12/operate",
230
+ projectPath: options.projectPath,
231
+ projectStorageId: options.projectStorageId,
278
232
  contentType: ProjectTypes.ProcessOrchestration,
279
- projectId: projectId,
280
- main: mainPath,
281
- targetFramework: "Portable",
282
- runtimeOptions: {
283
- isAttended: false,
284
- requiresUserInteraction: false,
285
- },
286
- };
287
-
288
- const operateJsonString = JSON.stringify(operateFileModel, null, 2);
289
- await this.fileSystem.writeFile(filePath, operateJsonString);
233
+ });
290
234
  }
291
235
 
292
236
  /**
package/src/index.ts CHANGED
@@ -1,5 +1,13 @@
1
- // Self-register BPMN (ProcessOrchestration) tool factory with the singleton repository
1
+ // BPMN (ProcessOrchestration) tool factory.
2
+ //
3
+ // Self-registers on import so micro-frontend consumers (whose MFEs UiPath does
4
+ // not control) that load this package via a side-effect import get the factory
5
+ // registered automatically — StudioWeb does not reference this package, so it
6
+ // relies on self-registration. Also exported for consumers that register
7
+ // explicitly; re-registering the same factory class is an idempotent no-op.
2
8
  import { toolsFactoryRepository } from "@uipath/solutionpackager-tool-core";
3
9
  import { BpmnToolFactory } from "./bpmn-tool-factory.js";
4
10
 
5
11
  toolsFactoryRepository.registerProjectToolFactory(new BpmnToolFactory());
12
+
13
+ export { BpmnToolFactory };