@uipath/packager-tool-workflowcompiler-browser 0.0.29
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/i18n/index.d.ts +7 -0
- package/dist/i18n/locales/en.d.ts +40 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1104 -0
- package/dist/pack-result-processor.d.ts +17 -0
- package/dist/packager-hub-connection.d.ts +28 -0
- package/dist/project-bundle-executor.d.ts +26 -0
- package/dist/workflow-compiler-tool-factory.d.ts +12 -0
- package/dist/workflow-compiler-tool.d.ts +16 -0
- package/package.json +60 -0
- package/src/i18n/index.ts +45 -0
- package/src/i18n/locales/de.json +34 -0
- package/src/i18n/locales/en.ts +57 -0
- package/src/i18n/locales/es-MX.json +34 -0
- package/src/i18n/locales/es.json +34 -0
- package/src/i18n/locales/fr.json +34 -0
- package/src/i18n/locales/ja.json +34 -0
- package/src/i18n/locales/ko.json +34 -0
- package/src/i18n/locales/pt-BR.json +34 -0
- package/src/i18n/locales/pt.json +34 -0
- package/src/i18n/locales/ro.json +34 -0
- package/src/i18n/locales/ru.json +34 -0
- package/src/i18n/locales/tr.json +34 -0
- package/src/i18n/locales/zh-CN.json +34 -0
- package/src/i18n/locales/zh-TW.json +34 -0
- package/src/i18n/locales/zu.json +34 -0
- package/src/index.ts +7 -0
- package/src/pack-result-processor.ts +309 -0
- package/src/packager-hub-connection.ts +257 -0
- package/src/project-bundle-executor.ts +414 -0
- package/src/workflow-compiler-tool-factory.ts +47 -0
- package/src/workflow-compiler-tool.ts +72 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type IFileSystem,
|
|
3
|
+
type IProjectToolFactory,
|
|
4
|
+
type IToolLogger,
|
|
5
|
+
type ProjectOperationContext,
|
|
6
|
+
type ProjectTool,
|
|
7
|
+
type ProjectType,
|
|
8
|
+
ProjectTypes,
|
|
9
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
10
|
+
import { ProjectBundleExecutor } from "./project-bundle-executor.js";
|
|
11
|
+
import { WorkflowCompilerTool } from "./workflow-compiler-tool.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Factory for creating a browser workflow compiler tool.
|
|
15
|
+
* Handles Process, Library, WebApp, and Tests project types.
|
|
16
|
+
* Always creates WorkflowCompilerTool (browser-only package).
|
|
17
|
+
*/
|
|
18
|
+
export class WorkflowCompilerToolFactory implements IProjectToolFactory {
|
|
19
|
+
private bundleExecutor?: ProjectBundleExecutor;
|
|
20
|
+
|
|
21
|
+
readonly supportedTypes: readonly ProjectType[] = [
|
|
22
|
+
ProjectTypes.Process,
|
|
23
|
+
ProjectTypes.Library,
|
|
24
|
+
ProjectTypes.Tests,
|
|
25
|
+
ProjectTypes.WebApp,
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
async createAsync(
|
|
29
|
+
logger: IToolLogger,
|
|
30
|
+
fileSystem: IFileSystem,
|
|
31
|
+
context?: ProjectOperationContext,
|
|
32
|
+
): Promise<ProjectTool> {
|
|
33
|
+
return new WorkflowCompilerTool(
|
|
34
|
+
fileSystem,
|
|
35
|
+
logger,
|
|
36
|
+
this.getBundleExecutor(fileSystem),
|
|
37
|
+
context,
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
private getBundleExecutor(fileSystem: IFileSystem): ProjectBundleExecutor {
|
|
42
|
+
if (!this.bundleExecutor) {
|
|
43
|
+
this.bundleExecutor = new ProjectBundleExecutor(this, fileSystem);
|
|
44
|
+
}
|
|
45
|
+
return this.bundleExecutor;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type IFileSystem,
|
|
3
|
+
type IProjectBuildOptions,
|
|
4
|
+
type IProjectPackOptions,
|
|
5
|
+
type IProjectRestoreOptions,
|
|
6
|
+
type IProjectValidateOptions,
|
|
7
|
+
type IToolLogger,
|
|
8
|
+
type ProjectOperationContext,
|
|
9
|
+
ProjectTool,
|
|
10
|
+
ToolResult,
|
|
11
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
12
|
+
import type { IProjectBundleExecutor } from "./project-bundle-executor.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 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.
|
|
18
|
+
*/
|
|
19
|
+
export class WorkflowCompilerTool extends ProjectTool {
|
|
20
|
+
constructor(
|
|
21
|
+
fileSystem: IFileSystem,
|
|
22
|
+
logger: IToolLogger,
|
|
23
|
+
private readonly bundleExecutor: IProjectBundleExecutor,
|
|
24
|
+
private readonly context?: ProjectOperationContext,
|
|
25
|
+
) {
|
|
26
|
+
super(fileSystem, logger);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async restoreAsync(
|
|
30
|
+
_options: IProjectRestoreOptions,
|
|
31
|
+
_cancellationToken?: AbortSignal,
|
|
32
|
+
): Promise<ToolResult> {
|
|
33
|
+
this.logger.warn(
|
|
34
|
+
"Restore operation is not supported in browser environment",
|
|
35
|
+
);
|
|
36
|
+
return ToolResult.success();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async validateAsync(
|
|
40
|
+
_options: IProjectValidateOptions,
|
|
41
|
+
_cancellationToken?: AbortSignal,
|
|
42
|
+
): Promise<ToolResult> {
|
|
43
|
+
this.logger.warn(
|
|
44
|
+
"Validate operation is not supported in browser environment",
|
|
45
|
+
);
|
|
46
|
+
return ToolResult.success();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
async buildAsync(
|
|
50
|
+
_options: IProjectBuildOptions,
|
|
51
|
+
_cancellationToken?: AbortSignal,
|
|
52
|
+
): Promise<ToolResult> {
|
|
53
|
+
this.logger.warn(
|
|
54
|
+
"Build operation is not supported in browser environment",
|
|
55
|
+
);
|
|
56
|
+
return ToolResult.success();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async packAsync(
|
|
60
|
+
options: IProjectPackOptions,
|
|
61
|
+
_cancellationToken?: AbortSignal,
|
|
62
|
+
): Promise<ToolResult> {
|
|
63
|
+
if (!this.context) {
|
|
64
|
+
this.logger.warn(
|
|
65
|
+
"Pack operation requires a project operation context",
|
|
66
|
+
);
|
|
67
|
+
return ToolResult.success();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return this.bundleExecutor.packAsync(options, this.context);
|
|
71
|
+
}
|
|
72
|
+
}
|