@uipath/packager-tool-workflowcompiler 1.198.0-preview.94 → 1.199.0-preview.92

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/dist/index.js CHANGED
@@ -765,7 +765,7 @@ function addSdkUserAgentHeader(headers, userAgent) {
765
765
  }
766
766
  var package_default = {
767
767
  name: "@uipath/packager-orchestrator-client",
768
- version: "1.198.0",
768
+ version: "1.199.0",
769
769
  description: "UiPath packager client for Orchestrator package-feed interaction (feed discovery + NuGet source composition)",
770
770
  type: "module",
771
771
  private: true,
@@ -960,20 +960,13 @@ import {
960
960
  translate as translate5
961
961
  } from "@uipath/solutionpackager-tool-core";
962
962
 
963
- // src/workflow-compiler-path-resolver.ts
964
- import { execFileSync } from "node:child_process";
965
- import { homedir, platform } from "node:os";
966
- import {
967
- Path as Path2,
968
- TemporaryStorageService as TemporaryStorageService2,
969
- translate as translate3
970
- } from "@uipath/solutionpackager-tool-core";
971
-
972
963
  // src/workflow-compiler-config.ts
973
- var DEFAULT_WORKFLOW_COMPILER_VERSION = "26.0.196-cloud.23765";
964
+ var DEFAULT_WORKFLOW_COMPILER_VERSION = "26.0.198-alpha.24031";
974
965
  var workflowCompilerConfig = {
975
966
  workflowCompilerPath: undefined,
976
- workflowCompilerVersion: DEFAULT_WORKFLOW_COMPILER_VERSION
967
+ workflowCompilerVersion: DEFAULT_WORKFLOW_COMPILER_VERSION,
968
+ dotnetPath: "dotnet",
969
+ dotnetEnv: undefined
977
970
  };
978
971
  function setupWorkflowCompiler(options) {
979
972
  if (options.compilerPath !== undefined) {
@@ -982,9 +975,22 @@ function setupWorkflowCompiler(options) {
982
975
  if (options.version !== undefined) {
983
976
  workflowCompilerConfig.workflowCompilerVersion = options.version;
984
977
  }
978
+ if (options.dotnetPath !== undefined) {
979
+ workflowCompilerConfig.dotnetPath = options.dotnetPath;
980
+ }
981
+ if (options.dotnetEnv !== undefined) {
982
+ workflowCompilerConfig.dotnetEnv = options.dotnetEnv;
983
+ }
985
984
  }
986
985
 
987
986
  // src/workflow-compiler-path-resolver.ts
987
+ import { execFileSync } from "node:child_process";
988
+ import { homedir, platform } from "node:os";
989
+ import {
990
+ Path as Path2,
991
+ TemporaryStorageService as TemporaryStorageService2,
992
+ translate as translate3
993
+ } from "@uipath/solutionpackager-tool-core";
988
994
  var NUGET_FEED_URL = "https://uipath.pkgs.visualstudio.com/Public.Feeds/_packaging/UiPath-Internal/nuget/v3/index.json";
989
995
  var WORKFLOW_COMPILER_DLL_NAME = "UiPath.WorkflowCompiler.dll";
990
996
  var PLATFORM_PACKAGE_IDS = {
@@ -1136,7 +1142,6 @@ function camelCaseKeys(obj) {
1136
1142
 
1137
1143
  class WorkflowCompilerExecutor {
1138
1144
  logger;
1139
- static DOTNET_EXECUTABLE = "dotnet";
1140
1145
  pathResolver;
1141
1146
  constructor(logger, fileSystem) {
1142
1147
  this.logger = logger;
@@ -1145,13 +1150,13 @@ class WorkflowCompilerExecutor {
1145
1150
  async executeAsync(operation, args, cancellationToken) {
1146
1151
  const startTime = Date.now();
1147
1152
  const compilerPath = await this.pathResolver.getCompilerPathAsync();
1148
- const executable = WorkflowCompilerExecutor.DOTNET_EXECUTABLE;
1153
+ const executable = workflowCompilerConfig.dotnetPath;
1149
1154
  const commandArgs = [compilerPath, operation, ...args];
1150
1155
  this.logCommandStart(operation, executable, commandArgs);
1151
1156
  return new Promise((resolve) => {
1152
1157
  let result = null;
1153
1158
  const fallbackErrors = [];
1154
- const childProcess = this.spawnProcess(executable, commandArgs);
1159
+ const childProcess = this.spawnProcess(executable, commandArgs, workflowCompilerConfig.dotnetEnv);
1155
1160
  let stdoutEnded = false;
1156
1161
  let stderrEnded = false;
1157
1162
  let processExited = false;
@@ -1202,11 +1207,12 @@ class WorkflowCompilerExecutor {
1202
1207
  this.setupCancellationHandler(childProcess, cancellationToken, resolve);
1203
1208
  });
1204
1209
  }
1205
- spawnProcess(command, args) {
1210
+ spawnProcess(command, args, env) {
1206
1211
  return spawn(command, args, {
1207
1212
  stdio: ["ignore", "pipe", "pipe"],
1208
1213
  shell: false,
1209
- windowsHide: true
1214
+ windowsHide: true,
1215
+ env: env ? { ...process.env, ...env } : undefined
1210
1216
  });
1211
1217
  }
1212
1218
  logCommandStart(operation, executable, commandArgs) {
@@ -1656,4 +1662,4 @@ export {
1656
1662
  WorkflowCompilerToolFactory
1657
1663
  };
1658
1664
 
1659
- //# debugId=34D4B1BF483A641664756E2164756E21
1665
+ //# debugId=DF8E70BC8F5CC6D964756E2164756E21
@@ -1,23 +1,34 @@
1
- export declare const DEFAULT_WORKFLOW_COMPILER_VERSION = "26.0.196-cloud.23765";
1
+ export declare const DEFAULT_WORKFLOW_COMPILER_VERSION = "26.0.198-alpha.24031";
2
2
  export declare const workflowCompilerConfig: {
3
3
  workflowCompilerPath: string | undefined;
4
4
  workflowCompilerVersion: string;
5
+ dotnetPath: string;
6
+ dotnetEnv: Record<string, string> | undefined;
5
7
  };
6
8
  /**
7
9
  * Configure the workflow compiler tool.
8
10
  *
9
11
  * @param options.compilerPath - Explicit path to UiPath.WorkflowCompiler.dll (skips all resolution logic).
10
12
  * @param options.version - NuGet package version to download. Defaults to {@link DEFAULT_WORKFLOW_COMPILER_VERSION}.
13
+ * @param options.dotnetPath - dotnet host to launch the compiler with. Defaults to `dotnet` on PATH.
14
+ * @param options.dotnetEnv - Extra env vars for the compiler process (merged over the inherited env).
11
15
  *
12
16
  * @example
13
17
  * ```ts
14
18
  * import { setupWorkflowCompiler } from "@uipath/packager-tool-workflowcompiler";
15
19
  *
16
20
  * setupWorkflowCompiler({ compilerPath: "/path/to/UiPath.WorkflowCompiler.dll" });
17
- * setupWorkflowCompiler({ version: "26.0.196-cloud.23765" });
21
+ * setupWorkflowCompiler({ version: "26.0.198-alpha.24031" });
22
+ * setupWorkflowCompiler({
23
+ * compilerPath: "/path/to/UiPath.WorkflowCompiler.dll",
24
+ * dotnetPath: "/path/to/bundled/dotnet",
25
+ * dotnetEnv: { DOTNET_ROOT: "/path/to/bundled", DOTNET_MULTILEVEL_LOOKUP: "0" },
26
+ * });
18
27
  * ```
19
28
  */
20
29
  export declare function setupWorkflowCompiler(options: {
21
30
  compilerPath?: string;
22
31
  version?: string;
32
+ dotnetPath?: string;
33
+ dotnetEnv?: Record<string, string>;
23
34
  }): void;
@@ -5,7 +5,6 @@ import { type IFileSystem, type IToolLogger, ToolResult } from "@uipath/solution
5
5
  */
6
6
  export declare class WorkflowCompilerExecutor {
7
7
  private readonly logger;
8
- private static readonly DOTNET_EXECUTABLE;
9
8
  private readonly pathResolver;
10
9
  constructor(logger: IToolLogger, fileSystem: IFileSystem);
11
10
  /**
@@ -16,7 +15,7 @@ export declare class WorkflowCompilerExecutor {
16
15
  * @returns Promise resolving to ToolResult
17
16
  */
18
17
  executeAsync(operation: string, args: string[], cancellationToken?: AbortSignal): Promise<ToolResult>;
19
- protected spawnProcess(command: string, args: string[]): import("node:child_process").ChildProcessByStdio<null, import("node:stream").Readable, import("node:stream").Readable>;
18
+ protected spawnProcess(command: string, args: string[], env?: Record<string, string>): import("node:child_process").ChildProcessByStdio<null, import("node:stream").Readable, import("node:stream").Readable>;
20
19
  private logCommandStart;
21
20
  private setupStdoutHandling;
22
21
  private processOutputLine;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/packager-tool-workflowcompiler",
3
- "version": "1.198.0-preview.94",
3
+ "version": "1.199.0-preview.92",
4
4
  "description": "UiPath Workflow Compiler tool implementation",
5
5
  "type": "module",
6
6
  "exports": {
@@ -25,8 +25,8 @@
25
25
  "author": "",
26
26
  "license": "ISC",
27
27
  "peerDependencies": {
28
- "@uipath/solutionpackager-tool-core": "1.198.0"
28
+ "@uipath/solutionpackager-tool-core": "1.199.0"
29
29
  },
30
30
  "dependencies": {},
31
- "gitHead": "c888e1ce7cd807c1629d556241a0d07ab156841c"
31
+ "gitHead": "d7b66f18f30e2e80a17293b6a0b656b54da35d49"
32
32
  }
@@ -1,8 +1,15 @@
1
- export const DEFAULT_WORKFLOW_COMPILER_VERSION = "26.0.196-cloud.23765";
1
+ export const DEFAULT_WORKFLOW_COMPILER_VERSION = "26.0.198-alpha.24031";
2
2
 
3
3
  export const workflowCompilerConfig = {
4
4
  workflowCompilerPath: undefined as string | undefined,
5
5
  workflowCompilerVersion: DEFAULT_WORKFLOW_COMPILER_VERSION as string,
6
+ // The dotnet host used to launch `UiPath.WorkflowCompiler.dll`. Defaults to `dotnet` on PATH.
7
+ // Consumers that ship a bundled runtime (e.g. rpa-tool resolving Robot/Studio's .NET) point this
8
+ // at the bundled muxer so the compiler runs under that runtime instead of a machine-wide install.
9
+ dotnetPath: "dotnet" as string,
10
+ // Extra environment variables for the compiler process (e.g. DOTNET_ROOT / DOTNET_MULTILEVEL_LOOKUP).
11
+ // Merged over the inherited process env. Undefined means inherit the parent env unchanged.
12
+ dotnetEnv: undefined as Record<string, string> | undefined,
6
13
  };
7
14
 
8
15
  /**
@@ -10,18 +17,27 @@ export const workflowCompilerConfig = {
10
17
  *
11
18
  * @param options.compilerPath - Explicit path to UiPath.WorkflowCompiler.dll (skips all resolution logic).
12
19
  * @param options.version - NuGet package version to download. Defaults to {@link DEFAULT_WORKFLOW_COMPILER_VERSION}.
20
+ * @param options.dotnetPath - dotnet host to launch the compiler with. Defaults to `dotnet` on PATH.
21
+ * @param options.dotnetEnv - Extra env vars for the compiler process (merged over the inherited env).
13
22
  *
14
23
  * @example
15
24
  * ```ts
16
25
  * import { setupWorkflowCompiler } from "@uipath/packager-tool-workflowcompiler";
17
26
  *
18
27
  * setupWorkflowCompiler({ compilerPath: "/path/to/UiPath.WorkflowCompiler.dll" });
19
- * setupWorkflowCompiler({ version: "26.0.196-cloud.23765" });
28
+ * setupWorkflowCompiler({ version: "26.0.198-alpha.24031" });
29
+ * setupWorkflowCompiler({
30
+ * compilerPath: "/path/to/UiPath.WorkflowCompiler.dll",
31
+ * dotnetPath: "/path/to/bundled/dotnet",
32
+ * dotnetEnv: { DOTNET_ROOT: "/path/to/bundled", DOTNET_MULTILEVEL_LOOKUP: "0" },
33
+ * });
20
34
  * ```
21
35
  */
22
36
  export function setupWorkflowCompiler(options: {
23
37
  compilerPath?: string;
24
38
  version?: string;
39
+ dotnetPath?: string;
40
+ dotnetEnv?: Record<string, string>;
25
41
  }): void {
26
42
  if (options.compilerPath !== undefined) {
27
43
  workflowCompilerConfig.workflowCompilerPath = options.compilerPath;
@@ -29,4 +45,10 @@ export function setupWorkflowCompiler(options: {
29
45
  if (options.version !== undefined) {
30
46
  workflowCompilerConfig.workflowCompilerVersion = options.version;
31
47
  }
48
+ if (options.dotnetPath !== undefined) {
49
+ workflowCompilerConfig.dotnetPath = options.dotnetPath;
50
+ }
51
+ if (options.dotnetEnv !== undefined) {
52
+ workflowCompilerConfig.dotnetEnv = options.dotnetEnv;
53
+ }
32
54
  }
@@ -12,6 +12,7 @@ import type {
12
12
  IOutputProgress,
13
13
  IOutputResult,
14
14
  } from "./output-entry.js";
15
+ import { workflowCompilerConfig } from "./workflow-compiler-config.js";
15
16
  import {
16
17
  type IWorkflowCompilerPathResolver,
17
18
  WorkflowCompilerPathResolver,
@@ -44,7 +45,6 @@ function camelCaseKeys(obj: unknown): unknown {
44
45
  * Handles process spawning, output parsing, and logging.
45
46
  */
46
47
  export class WorkflowCompilerExecutor {
47
- private static readonly DOTNET_EXECUTABLE = "dotnet";
48
48
  private readonly pathResolver: IWorkflowCompilerPathResolver;
49
49
 
50
50
  constructor(
@@ -71,7 +71,10 @@ export class WorkflowCompilerExecutor {
71
71
  ): Promise<ToolResult> {
72
72
  const startTime = Date.now();
73
73
  const compilerPath = await this.pathResolver.getCompilerPathAsync();
74
- const executable = WorkflowCompilerExecutor.DOTNET_EXECUTABLE;
74
+ // The compiler ships as a managed .dll, so it always runs via a dotnet host. `dotnetPath`
75
+ // defaults to `dotnet` on PATH; consumers with a bundled runtime (rpa-tool) point it at that
76
+ // muxer so the compiler runs under the bundled .NET instead of requiring a machine-wide install.
77
+ const executable = workflowCompilerConfig.dotnetPath;
75
78
  const commandArgs = [compilerPath, operation, ...args];
76
79
 
77
80
  this.logCommandStart(operation, executable, commandArgs);
@@ -80,7 +83,11 @@ export class WorkflowCompilerExecutor {
80
83
  let result: IOutputResult | null = null;
81
84
  const fallbackErrors: string[] = [];
82
85
 
83
- const childProcess = this.spawnProcess(executable, commandArgs);
86
+ const childProcess = this.spawnProcess(
87
+ executable,
88
+ commandArgs,
89
+ workflowCompilerConfig.dotnetEnv,
90
+ );
84
91
 
85
92
  // Track stream completion
86
93
  let stdoutEnded = false;
@@ -175,11 +182,18 @@ export class WorkflowCompilerExecutor {
175
182
  });
176
183
  }
177
184
 
178
- protected spawnProcess(command: string, args: string[]) {
185
+ protected spawnProcess(
186
+ command: string,
187
+ args: string[],
188
+ env?: Record<string, string>,
189
+ ) {
179
190
  return spawn(command, args, {
180
191
  stdio: ["ignore", "pipe", "pipe"],
181
192
  shell: false,
182
193
  windowsHide: true,
194
+ // Undefined inherits the parent env; a provided env is merged over it (so DOTNET_ROOT
195
+ // et al. are added without dropping PATH and friends the child still needs).
196
+ env: env ? { ...process.env, ...env } : undefined,
183
197
  });
184
198
  }
185
199