@uipath/packager-tool-workflowcompiler-browser 0.0.29 → 0.0.33

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.
@@ -7,14 +7,16 @@ import {
7
7
  type IToolLogger,
8
8
  type ProjectOperationContext,
9
9
  ProjectTool,
10
+ ToolErrorCodes,
10
11
  ToolResult,
11
12
  } from "@uipath/solutionpackager-tool-core";
12
13
  import type { IProjectBundleExecutor } from "./project-bundle-executor.js";
13
14
 
14
15
  /**
15
16
  * Browser workflow compiler tool implementation.
16
- * DUMMY: Logs messages indicating where robot/remote agent integration will be added.
17
- * Future: Will send pack commands to robot which starts remote agent to pack projects.
17
+ * Delegates pack and validate to a bundle executor that coordinates a
18
+ * single remote-agent invocation across all compatible projects in the
19
+ * solution via SignalR.
18
20
  */
19
21
  export class WorkflowCompilerTool extends ProjectTool {
20
22
  constructor(
@@ -37,13 +39,17 @@ export class WorkflowCompilerTool extends ProjectTool {
37
39
  }
38
40
 
39
41
  async validateAsync(
40
- _options: IProjectValidateOptions,
42
+ options: IProjectValidateOptions,
41
43
  _cancellationToken?: AbortSignal,
42
44
  ): Promise<ToolResult> {
43
- this.logger.warn(
44
- "Validate operation is not supported in browser environment",
45
- );
46
- return ToolResult.success();
45
+ if (!this.context) {
46
+ return ToolResult.error(
47
+ ToolErrorCodes.InternalError,
48
+ "Validate operation requires a project operation context",
49
+ );
50
+ }
51
+
52
+ return this.bundleExecutor.validateAsync(options, this.context);
47
53
  }
48
54
 
49
55
  async buildAsync(
@@ -61,10 +67,10 @@ export class WorkflowCompilerTool extends ProjectTool {
61
67
  _cancellationToken?: AbortSignal,
62
68
  ): Promise<ToolResult> {
63
69
  if (!this.context) {
64
- this.logger.warn(
70
+ return ToolResult.error(
71
+ ToolErrorCodes.InternalError,
65
72
  "Pack operation requires a project operation context",
66
73
  );
67
- return ToolResult.success();
68
74
  }
69
75
 
70
76
  return this.bundleExecutor.packAsync(options, this.context);