@uipath/packager-tool-workflowcompiler 1.199.0-preview.97 → 1.199.0
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
|
@@ -656,6 +656,30 @@ import {
|
|
|
656
656
|
translate as translate6
|
|
657
657
|
} from "@uipath/solutionpackager-tool-core";
|
|
658
658
|
|
|
659
|
+
// src/workflow-compiler-config.ts
|
|
660
|
+
var DEFAULT_WORKFLOW_COMPILER_VERSION = "26.0.198-alpha.24031";
|
|
661
|
+
var DEFAULT_DOTNET_PATH = "dotnet";
|
|
662
|
+
var workflowCompilerConfig = {
|
|
663
|
+
workflowCompilerPath: undefined,
|
|
664
|
+
workflowCompilerVersion: DEFAULT_WORKFLOW_COMPILER_VERSION,
|
|
665
|
+
dotnetPath: DEFAULT_DOTNET_PATH,
|
|
666
|
+
dotnetEnv: undefined
|
|
667
|
+
};
|
|
668
|
+
function setupWorkflowCompiler(options) {
|
|
669
|
+
if (options.compilerPath !== undefined) {
|
|
670
|
+
workflowCompilerConfig.workflowCompilerPath = options.compilerPath;
|
|
671
|
+
}
|
|
672
|
+
if (options.version !== undefined) {
|
|
673
|
+
workflowCompilerConfig.workflowCompilerVersion = options.version;
|
|
674
|
+
}
|
|
675
|
+
if (options.dotnetPath !== undefined) {
|
|
676
|
+
workflowCompilerConfig.dotnetPath = options.dotnetPath;
|
|
677
|
+
}
|
|
678
|
+
if (options.dotnetEnv !== undefined) {
|
|
679
|
+
workflowCompilerConfig.dotnetEnv = options.dotnetEnv;
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
|
|
659
683
|
// ../packager-orchestrator-client/dist/index.js
|
|
660
684
|
import { I18nManager as I18nManager2 } from "@uipath/solutionpackager-tool-core";
|
|
661
685
|
import {
|
|
@@ -960,29 +984,6 @@ import {
|
|
|
960
984
|
translate as translate5
|
|
961
985
|
} from "@uipath/solutionpackager-tool-core";
|
|
962
986
|
|
|
963
|
-
// src/workflow-compiler-config.ts
|
|
964
|
-
var DEFAULT_WORKFLOW_COMPILER_VERSION = "26.0.198-alpha.24031";
|
|
965
|
-
var workflowCompilerConfig = {
|
|
966
|
-
workflowCompilerPath: undefined,
|
|
967
|
-
workflowCompilerVersion: DEFAULT_WORKFLOW_COMPILER_VERSION,
|
|
968
|
-
dotnetPath: "dotnet",
|
|
969
|
-
dotnetEnv: undefined
|
|
970
|
-
};
|
|
971
|
-
function setupWorkflowCompiler(options) {
|
|
972
|
-
if (options.compilerPath !== undefined) {
|
|
973
|
-
workflowCompilerConfig.workflowCompilerPath = options.compilerPath;
|
|
974
|
-
}
|
|
975
|
-
if (options.version !== undefined) {
|
|
976
|
-
workflowCompilerConfig.workflowCompilerVersion = options.version;
|
|
977
|
-
}
|
|
978
|
-
if (options.dotnetPath !== undefined) {
|
|
979
|
-
workflowCompilerConfig.dotnetPath = options.dotnetPath;
|
|
980
|
-
}
|
|
981
|
-
if (options.dotnetEnv !== undefined) {
|
|
982
|
-
workflowCompilerConfig.dotnetEnv = options.dotnetEnv;
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
|
-
|
|
986
987
|
// src/workflow-compiler-path-resolver.ts
|
|
987
988
|
import { execFileSync } from "node:child_process";
|
|
988
989
|
import { homedir, platform } from "node:os";
|
|
@@ -1637,11 +1638,14 @@ class WorkflowCompilerToolFactory {
|
|
|
1637
1638
|
ProjectTypes.WebApp
|
|
1638
1639
|
];
|
|
1639
1640
|
async createAsync(logger, fileSystem, context) {
|
|
1640
|
-
if (!this.isDotnetAvailable()) {
|
|
1641
|
+
if (!this.isPinnedByCaller() && !this.isDotnetAvailable()) {
|
|
1641
1642
|
throw new Error(translate6.t("toolWorkflowcompiler.errors.dotnetNotAvailable"));
|
|
1642
1643
|
}
|
|
1643
1644
|
return new WorkflowCompilerTool(fileSystem, logger, context);
|
|
1644
1645
|
}
|
|
1646
|
+
isPinnedByCaller() {
|
|
1647
|
+
return workflowCompilerConfig.workflowCompilerPath !== undefined && workflowCompilerConfig.dotnetPath !== DEFAULT_DOTNET_PATH;
|
|
1648
|
+
}
|
|
1645
1649
|
isDotnetAvailable() {
|
|
1646
1650
|
if (WorkflowCompilerToolFactory.cachedDotnetAvailable !== undefined) {
|
|
1647
1651
|
return WorkflowCompilerToolFactory.cachedDotnetAvailable;
|
|
@@ -1662,4 +1666,4 @@ export {
|
|
|
1662
1666
|
WorkflowCompilerToolFactory
|
|
1663
1667
|
};
|
|
1664
1668
|
|
|
1665
|
-
//# debugId=
|
|
1669
|
+
//# debugId=D679068934126E3664756E2164756E21
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const DEFAULT_WORKFLOW_COMPILER_VERSION = "26.0.198-alpha.24031";
|
|
2
|
+
/** The dotnet host used when no consumer pins one: whatever `dotnet` PATH resolves to. */
|
|
3
|
+
export declare const DEFAULT_DOTNET_PATH = "dotnet";
|
|
2
4
|
export declare const workflowCompilerConfig: {
|
|
3
5
|
workflowCompilerPath: string | undefined;
|
|
4
6
|
workflowCompilerVersion: string;
|
|
@@ -12,5 +12,17 @@ export declare class WorkflowCompilerToolFactory implements IProjectToolFactory
|
|
|
12
12
|
private static cachedDotnetAvailable;
|
|
13
13
|
readonly supportedTypes: readonly ProjectType[];
|
|
14
14
|
createAsync(logger: IToolLogger, fileSystem: IFileSystem, context?: ProjectOperationContext): Promise<ProjectTool>;
|
|
15
|
+
/**
|
|
16
|
+
* True when the caller has supplied both the compiler and the dotnet host to
|
|
17
|
+
* run it with — i.e. it resolved its own .NET and neither the NuGet-restore
|
|
18
|
+
* fallback nor a machine-wide install is involved.
|
|
19
|
+
*
|
|
20
|
+
* The preflight below asks PATH for an SDK. A pinned host is typically a
|
|
21
|
+
* runtime-only bundle (Studio/Robot ship the runtime, never the SDK), which
|
|
22
|
+
* cannot answer `dotnet --version` at all — that is an SDK verb. Probing it
|
|
23
|
+
* can therefore only reject a configuration that works, so a caller that has
|
|
24
|
+
* pinned both is trusted and the tool is created unconditionally.
|
|
25
|
+
*/
|
|
26
|
+
private isPinnedByCaller;
|
|
15
27
|
private isDotnetAvailable;
|
|
16
28
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/packager-tool-workflowcompiler",
|
|
3
|
-
"version": "1.199.0
|
|
3
|
+
"version": "1.199.0",
|
|
4
4
|
"description": "UiPath Workflow Compiler tool implementation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"@uipath/solutionpackager-tool-core": "1.199.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "723e6801b77b5926ba75e75b6a756cc38b1b7adc"
|
|
32
32
|
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
export const DEFAULT_WORKFLOW_COMPILER_VERSION = "26.0.198-alpha.24031";
|
|
2
2
|
|
|
3
|
+
/** The dotnet host used when no consumer pins one: whatever `dotnet` PATH resolves to. */
|
|
4
|
+
export const DEFAULT_DOTNET_PATH = "dotnet";
|
|
5
|
+
|
|
3
6
|
export const workflowCompilerConfig = {
|
|
4
7
|
workflowCompilerPath: undefined as string | undefined,
|
|
5
8
|
workflowCompilerVersion: DEFAULT_WORKFLOW_COMPILER_VERSION as string,
|
|
6
9
|
// The dotnet host used to launch `UiPath.WorkflowCompiler.dll`. Defaults to `dotnet` on PATH.
|
|
7
10
|
// Consumers that ship a bundled runtime (e.g. rpa-tool resolving Robot/Studio's .NET) point this
|
|
8
11
|
// at the bundled muxer so the compiler runs under that runtime instead of a machine-wide install.
|
|
9
|
-
dotnetPath:
|
|
12
|
+
dotnetPath: DEFAULT_DOTNET_PATH as string,
|
|
10
13
|
// Extra environment variables for the compiler process (e.g. DOTNET_ROOT / DOTNET_MULTILEVEL_LOOKUP).
|
|
11
14
|
// Merged over the inherited process env. Undefined means inherit the parent env unchanged.
|
|
12
15
|
dotnetEnv: undefined as Record<string, string> | undefined,
|
|
@@ -9,6 +9,10 @@ import {
|
|
|
9
9
|
ProjectTypes,
|
|
10
10
|
translate,
|
|
11
11
|
} from "@uipath/solutionpackager-tool-core";
|
|
12
|
+
import {
|
|
13
|
+
DEFAULT_DOTNET_PATH,
|
|
14
|
+
workflowCompilerConfig,
|
|
15
|
+
} from "./workflow-compiler-config.js";
|
|
12
16
|
import { WorkflowCompilerTool } from "./workflow-compiler-tool.js";
|
|
13
17
|
|
|
14
18
|
/**
|
|
@@ -35,7 +39,7 @@ export class WorkflowCompilerToolFactory implements IProjectToolFactory {
|
|
|
35
39
|
fileSystem: IFileSystem,
|
|
36
40
|
context?: ProjectOperationContext,
|
|
37
41
|
): Promise<ProjectTool> {
|
|
38
|
-
if (!this.isDotnetAvailable()) {
|
|
42
|
+
if (!this.isPinnedByCaller() && !this.isDotnetAvailable()) {
|
|
39
43
|
throw new Error(
|
|
40
44
|
translate.t("toolWorkflowcompiler.errors.dotnetNotAvailable"),
|
|
41
45
|
);
|
|
@@ -43,6 +47,24 @@ export class WorkflowCompilerToolFactory implements IProjectToolFactory {
|
|
|
43
47
|
return new WorkflowCompilerTool(fileSystem, logger, context);
|
|
44
48
|
}
|
|
45
49
|
|
|
50
|
+
/**
|
|
51
|
+
* True when the caller has supplied both the compiler and the dotnet host to
|
|
52
|
+
* run it with — i.e. it resolved its own .NET and neither the NuGet-restore
|
|
53
|
+
* fallback nor a machine-wide install is involved.
|
|
54
|
+
*
|
|
55
|
+
* The preflight below asks PATH for an SDK. A pinned host is typically a
|
|
56
|
+
* runtime-only bundle (Studio/Robot ship the runtime, never the SDK), which
|
|
57
|
+
* cannot answer `dotnet --version` at all — that is an SDK verb. Probing it
|
|
58
|
+
* can therefore only reject a configuration that works, so a caller that has
|
|
59
|
+
* pinned both is trusted and the tool is created unconditionally.
|
|
60
|
+
*/
|
|
61
|
+
private isPinnedByCaller(): boolean {
|
|
62
|
+
return (
|
|
63
|
+
workflowCompilerConfig.workflowCompilerPath !== undefined &&
|
|
64
|
+
workflowCompilerConfig.dotnetPath !== DEFAULT_DOTNET_PATH
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
46
68
|
private isDotnetAvailable(): boolean {
|
|
47
69
|
if (WorkflowCompilerToolFactory.cachedDotnetAvailable !== undefined) {
|
|
48
70
|
return WorkflowCompilerToolFactory.cachedDotnetAvailable;
|