@uipath/packager-tool-workflowcompiler-browser 1.204.0-preview.255 → 1.205.0-preview.256

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.
@@ -1,12 +1,22 @@
1
- import { type IFileSystem, type IProjectToolFactory, type IToolLogger, type ProjectOperationContext, type ProjectTool, type ProjectType } from "@uipath/solutionpackager-tool-core";
1
+ import { type IRemoteAgentBundleExecutor, type IRemoteAgentToolFactory } from "@uipath/packager-remote-agent-browser";
2
+ import { type IFileSystem, type IToolLogger, type ProjectOperationContext, type ProjectTool, type ProjectType } from "@uipath/solutionpackager-tool-core";
2
3
  /**
3
4
  * Factory for creating a browser workflow compiler tool.
4
5
  * Handles Process, Library, WebApp, and Tests project types.
5
6
  * Always creates WorkflowCompilerTool (browser-only package).
7
+ *
8
+ * Its tools hand their projects to the shared remote-agent bundle executor,
9
+ * so they share one agent job with every other remote project of the pack
10
+ * (Functions included, when their browser tool is registered too).
6
11
  */
7
- export declare class WorkflowCompilerToolFactory implements IProjectToolFactory {
8
- private bundleExecutor?;
12
+ export declare class WorkflowCompilerToolFactory implements IRemoteAgentToolFactory {
13
+ private readonly bundleExecutor?;
14
+ readonly delegatesToRemoteAgent = true;
9
15
  readonly supportedTypes: readonly ProjectType[];
16
+ /**
17
+ * @param bundleExecutor Executor to delegate to; defaults to the shared
18
+ * one. Tests pass their own.
19
+ */
20
+ constructor(bundleExecutor?: IRemoteAgentBundleExecutor | undefined);
10
21
  createAsync(logger: IToolLogger, fileSystem: IFileSystem, context?: ProjectOperationContext): Promise<ProjectTool>;
11
- private getBundleExecutor;
12
22
  }
@@ -1,5 +1,5 @@
1
+ import type { IRemoteAgentBundleExecutor } from "@uipath/packager-remote-agent-browser";
1
2
  import { type IFileSystem, type IProjectBuildOptions, type IProjectCleanupOptions, type IProjectPackOptions, type IProjectRestoreOptions, type IProjectValidateOptions, type IToolLogger, type ProjectOperationContext, ProjectTool, ToolResult } from "@uipath/solutionpackager-tool-core";
2
- import type { IProjectBundleExecutor } from "./project-bundle-executor.js";
3
3
  /**
4
4
  * Browser workflow compiler tool implementation.
5
5
  * Delegates pack and validate to a bundle executor that coordinates a
@@ -9,7 +9,7 @@ import type { IProjectBundleExecutor } from "./project-bundle-executor.js";
9
9
  export declare class WorkflowCompilerTool extends ProjectTool {
10
10
  private readonly bundleExecutor;
11
11
  private readonly context?;
12
- constructor(fileSystem: IFileSystem, logger: IToolLogger, bundleExecutor: IProjectBundleExecutor, context?: ProjectOperationContext | undefined);
12
+ constructor(fileSystem: IFileSystem, logger: IToolLogger, bundleExecutor: IRemoteAgentBundleExecutor, context?: ProjectOperationContext | undefined);
13
13
  restoreAsync(_options: IProjectRestoreOptions, _cancellationToken?: AbortSignal): Promise<ToolResult>;
14
14
  validateAsync(options: IProjectValidateOptions, _cancellationToken?: AbortSignal): Promise<ToolResult>;
15
15
  buildAsync(_options: IProjectBuildOptions, _cancellationToken?: AbortSignal): Promise<ToolResult>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/packager-tool-workflowcompiler-browser",
3
- "version": "1.204.0-preview.255",
3
+ "version": "1.205.0-preview.256",
4
4
  "description": "UiPath Workflow Compiler tool - browser implementation",
5
5
  "type": "module",
6
6
  "exports": {
@@ -21,8 +21,8 @@
21
21
  "author": "UiPath",
22
22
  "license": "SEE LICENSE IN LICENSE.txt",
23
23
  "peerDependencies": {
24
- "@uipath/solutionpackager-tool-core": "1.204.0",
25
- "@microsoft/signalr": ">=7 <11"
24
+ "@uipath/packager-remote-agent-browser": "1.204.0",
25
+ "@uipath/solutionpackager-tool-core": "1.205.0"
26
26
  },
27
- "gitHead": "699c58dabb59414557755a8933bcbe40aa420df3"
27
+ "gitHead": "63740c6cbb7ff282fa9118cc16a148eb030b245f"
28
28
  }
@@ -1,7 +0,0 @@
1
- /**
2
- * i18n module for tool-workflowcompiler-browser package.
3
- * Registers tool-workflowcompiler-browser-specific translations.
4
- */
5
- import { en } from "./locales/en.js";
6
- export type { TranslationKeys } from "./locales/en.js";
7
- export { en };
@@ -1,46 +0,0 @@
1
- /**
2
- * English translations for tool-workflowcompiler-browser package.
3
- * These translations are registered alongside core translations via I18nManager.
4
- */
5
- export declare const en: {
6
- readonly toolWorkflowCompilerBrowser: {
7
- readonly info: {
8
- readonly startingRemoteAgent: "Starting remote {operation} agent for {count} project(s): {paths}";
9
- readonly connectingToHub: "Connecting to SignalR hub: {url}";
10
- readonly remoteAgentStartedExecution: "Remote agent started execution";
11
- readonly downloadingArchive: "Downloading pack result archive from bucket {bucketId}";
12
- readonly extractingArchive: "Extracting archive ({size} bytes) to {path}";
13
- readonly distributingPackages: "Distributing packages for {count} project(s)";
14
- readonly skippingRemoteCompilation: "No connection info available — skipping remote compilation for workflow compiler projects";
15
- readonly cleaningUpTempDir: "Cleaning up temporary directory {path}";
16
- readonly deletingBucket: "Deleting temporary storage bucket {bucketId}";
17
- readonly copyingFiles: "Copying {count} file(s) for project {designId} to {path}";
18
- readonly offloadingInputArguments: "Input arguments are too large ({length} chars) to send inline; uploading them as a file attachment";
19
- };
20
- readonly errors: {
21
- readonly missingConnectionInfo: "Missing connection info (cloudUrl, accessToken, or folderId)";
22
- readonly signalRConnectionFailed: "Failed to connect to SignalR hub";
23
- readonly hubConnectionFailed: "Failed to connect to SignalR hub at {url}: {message}";
24
- readonly packSucceededNoBucket: "Pack succeeded but no BucketId was returned";
25
- readonly agentFailed: "{operation} agent failed with status {status} (code {errorCode})";
26
- readonly noResultForProject: "No result for project";
27
- readonly beginSessionFailed: "BeginSession failed ({status}): {errorText}";
28
- readonly hubConnectionClosed: "Hub connection closed unexpectedly";
29
- readonly packAgentDisconnected: "Pack agent disconnected unexpectedly";
30
- readonly deleteBucketFailed: "Unable to delete temporary storage bucket on Orchestrator: {statusText}";
31
- readonly cleanupBucketFailed: "Unable to cleanup remote bucket {bucketId}: {message}";
32
- readonly getBucketUriFailed: "Failed to get bucket read URI ({status}): {errorText}";
33
- readonly downloadArchiveFailed: "Failed to download archive from bucket ({status}): {statusText}";
34
- readonly noMatchingProject: "No matching project found for path: {projectPath}";
35
- readonly noOutputForProject: "No output found for project {designId}";
36
- readonly distributePackagesFailed: "Failed to distribute packages for {designId}: {message}";
37
- readonly sessionTimeout: "Session timed out waiting for projects: received {received} of {expected} expected projects";
38
- readonly bundleOperationMismatch: "Cannot mix {sessionOperation} and {entryOperation} in the same context";
39
- readonly createAttachmentFailed: "Failed to create input arguments attachment ({status}): {errorText}";
40
- readonly attachmentResponseMalformed: "Attachment creation response did not include an id and blob URI";
41
- readonly uploadInputArgumentsFailed: "Failed to upload input arguments file ({status}): {statusText}";
42
- };
43
- };
44
- };
45
- /** @public */
46
- export type TranslationKeys = typeof en;
@@ -1,17 +0,0 @@
1
- import { type IFileSystem, type IProjectPackOptions, type IToolLogger, type IZipService, type ProjectOperationContext, ToolResult } from "@uipath/solutionpackager-tool-core";
2
- interface ProjectResultEntry {
3
- options: IProjectPackOptions;
4
- }
5
- export declare class PackResultProcessor {
6
- private readonly fileSystem;
7
- private readonly logger?;
8
- private readonly zipService;
9
- constructor(fileSystem: IFileSystem, logger?: IToolLogger | undefined, zipService?: IZipService);
10
- processAsync(bucketId: number, projects: Map<string, ProjectResultEntry>, context: ProjectOperationContext): Promise<Map<string, ToolResult>>;
11
- private downloadArchiveAsync;
12
- private deleteBucketAsync;
13
- private getReadUriAsync;
14
- private downloadBlobAsync;
15
- private distributePackages;
16
- }
17
- export {};
@@ -1,33 +0,0 @@
1
- import { type IToolLogger } from "@uipath/solutionpackager-tool-core";
2
- import type { RemoteProjectCleanup } from "./cleanup-result.js";
3
- /** @public */
4
- export declare enum CompletedStatus {
5
- Succeeded = 0,
6
- Stopped = 1,
7
- Failed = 2
8
- }
9
- export interface PackAgentResult {
10
- errorCode: number;
11
- status: CompletedStatus;
12
- message?: string;
13
- bucketId?: number;
14
- /** Cleanup only: files changed per project design id, relative to each project. */
15
- changedFilesByProject?: Record<string, string[]>;
16
- /** Cleanup only: raw per-project cleanup payload, keyed by project design id. */
17
- unusedDependenciesByProject?: Record<string, RemoteProjectCleanup>;
18
- }
19
- export declare class PackagerHubConnection {
20
- private readonly logger?;
21
- private hubConnection;
22
- private completionResolve;
23
- private completionReject;
24
- constructor(logger?: IToolLogger | undefined);
25
- connectAsync(hubUrl: string, accessToken: string): Promise<void>;
26
- private buildConnection;
27
- private registerOnClose;
28
- waitForCompletionAsync(): Promise<PackAgentResult>;
29
- disconnectAsync(): Promise<void>;
30
- private registerHandlers;
31
- private onLogMessage;
32
- private onExecutionCompleted;
33
- }
@@ -1,54 +0,0 @@
1
- import { type IFileSystem, type IProjectCleanupOptions, type IProjectPackOptions, type IProjectToolFactory, type IProjectValidateOptions, type ProjectOperationContext, ToolResult } from "@uipath/solutionpackager-tool-core";
2
- export declare enum BundleOperation {
3
- Pack = "Pack",
4
- Validate = "Validate",
5
- Cleanup = "Cleanup"
6
- }
7
- export interface IProjectBundleExecutor {
8
- packAsync(options: IProjectPackOptions, context: ProjectOperationContext): Promise<ToolResult>;
9
- validateAsync(options: IProjectValidateOptions, context: ProjectOperationContext): Promise<ToolResult>;
10
- cleanupAsync(options: IProjectCleanupOptions, context: ProjectOperationContext): Promise<ToolResult>;
11
- }
12
- export declare class ProjectBundleExecutor implements IProjectBundleExecutor {
13
- private readonly toolFactory;
14
- private readonly fileSystem;
15
- static readonly SESSION_TIMEOUT_MS = 1800000;
16
- /**
17
- * Maximum length (in characters) of the inline `inputArguments` payload
18
- * accepted by the serverless jobs endpoint. Beyond this the arguments must
19
- * be uploaded as a file attachment and referenced via `inputFile`.
20
- */
21
- static readonly MAX_INLINE_INPUT_ARGUMENTS_LENGTH = 10000;
22
- private readonly sessions;
23
- private readonly pendingSessionCreations;
24
- constructor(toolFactory: IProjectToolFactory, fileSystem: IFileSystem);
25
- packAsync(options: IProjectPackOptions, context: ProjectOperationContext): Promise<ToolResult>;
26
- validateAsync(options: IProjectValidateOptions, context: ProjectOperationContext): Promise<ToolResult>;
27
- cleanupAsync(options: IProjectCleanupOptions, context: ProjectOperationContext): Promise<ToolResult>;
28
- private enqueueAsync;
29
- private getSessionAsync;
30
- private createSessionAsync;
31
- private runAgentAsync;
32
- private connectToHubAsync;
33
- private handleAgentResultAsync;
34
- /**
35
- * The agent removed unused items in-place and (for cloud solutions) saved the
36
- * solution back to StudioWeb; there is no bucket to download. Resolve each
37
- * project with its own result carrying the changed files (the full map, which
38
- * solution-cleanup-service unions) and that project's cleanup payload mapped
39
- * to the generic {@link toProjectCleanupInfo} shape.
40
- */
41
- private resolveCleanup;
42
- private handlePackBucketAsync;
43
- private sendBeginSessionAsync;
44
- /**
45
- * Uploads the input arguments JSON as a file attachment and returns the
46
- * attachment id, to be passed as `inputFile` on the serverless job request.
47
- * Mirrors the two-step flow used by the Orchestrator UI: create the
48
- * attachment (which returns a signed blob write URI) then PUT the contents
49
- * to that URI using the storage-provided headers.
50
- */
51
- private uploadInputArgumentsFileAsync;
52
- private resolveAll;
53
- private countCompatibleProjects;
54
- }