@uipath/packager-tool-functions 1.201.0-preview.132 → 1.202.0-preview.134
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/functions-tool.d.ts +2 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +11 -13
- package/package.json +3 -3
- package/src/functions-tool.ts +1 -1
- package/src/index.ts +4 -0
package/dist/functions-tool.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IProjectBuildOptions, IProjectPackOptions, IProjectRestoreOptions, IProjectValidateOptions } from "@uipath/solutionpackager-tool-core";
|
|
2
2
|
import { type IFileSystem, type IToolLogger, ProjectTool, ToolResult } from "@uipath/solutionpackager-tool-core";
|
|
3
|
+
import { type Language } from "./types.js";
|
|
3
4
|
export declare class FunctionsTool extends ProjectTool {
|
|
4
5
|
private readonly _temporaryStorage;
|
|
5
6
|
constructor(fileSystem: IFileSystem, logger: IToolLogger);
|
|
@@ -8,5 +9,5 @@ export declare class FunctionsTool extends ProjectTool {
|
|
|
8
9
|
buildAsync(options: IProjectBuildOptions, _cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
9
10
|
packAsync(options: IProjectPackOptions, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
10
11
|
dispose(): Promise<void>;
|
|
11
|
-
|
|
12
|
+
protected detectLanguage(projectPath: string): Promise<Language>;
|
|
12
13
|
}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
// src/functions-tool-factory.ts
|
|
2
|
-
import {
|
|
3
|
-
ProjectTypes
|
|
4
|
-
} from "@uipath/solutionpackager-tool-core";
|
|
5
|
-
|
|
6
1
|
// src/functions-tool.ts
|
|
7
2
|
import {
|
|
8
3
|
ensureProjectId,
|
|
@@ -60,11 +55,10 @@ async function buildFunctionsPackage(fs, options) {
|
|
|
60
55
|
}
|
|
61
56
|
const entryPoints = JSON.parse(entryPointsRaw);
|
|
62
57
|
const bindingsRaw = await fs.readFile(fs.path.join(projectPath, "bindings_v2.json"), "utf-8");
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
};
|
|
58
|
+
if (!bindingsRaw) {
|
|
59
|
+
throw new Error("bindings_v2.json not found. Run 'uipath-functions pack' to generate it.");
|
|
60
|
+
}
|
|
61
|
+
const bindings = JSON.parse(bindingsRaw);
|
|
68
62
|
const packageJsonRaw = await fs.readFile(fs.path.join(projectPath, "package.json"), "utf-8");
|
|
69
63
|
const packageDependencies = packageJsonRaw ? JSON.parse(packageJsonRaw).dependencies ?? {} : {};
|
|
70
64
|
const targetRuntime = detectRuntime(uipathJson.functions);
|
|
@@ -439,8 +433,10 @@ class FunctionsTool extends ProjectTool {
|
|
|
439
433
|
return Languages.JavaScript;
|
|
440
434
|
}
|
|
441
435
|
}
|
|
442
|
-
|
|
443
436
|
// src/functions-tool-factory.ts
|
|
437
|
+
import {
|
|
438
|
+
ProjectTypes
|
|
439
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
444
440
|
class FunctionsToolFactory {
|
|
445
441
|
supportedTypes = [ProjectTypes.Function];
|
|
446
442
|
async createAsync(logger, fileSystem) {
|
|
@@ -448,7 +444,9 @@ class FunctionsToolFactory {
|
|
|
448
444
|
}
|
|
449
445
|
}
|
|
450
446
|
export {
|
|
451
|
-
|
|
447
|
+
FunctionsTool,
|
|
448
|
+
FunctionsToolFactory,
|
|
449
|
+
Languages
|
|
452
450
|
};
|
|
453
451
|
|
|
454
|
-
//# debugId=
|
|
452
|
+
//# debugId=79823B003B2CADC564756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/packager-tool-functions",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.202.0-preview.134",
|
|
4
4
|
"description": "UiPath Functions tool implementation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"author": "",
|
|
26
26
|
"license": "ISC",
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@uipath/solutionpackager-tool-core": "1.
|
|
28
|
+
"@uipath/solutionpackager-tool-core": "1.202.0"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "a335728adbdb02f28308e4f55d8936d0b150444b"
|
|
31
31
|
}
|
package/src/functions-tool.ts
CHANGED
|
@@ -149,7 +149,7 @@ export class FunctionsTool extends ProjectTool {
|
|
|
149
149
|
// Mirrors detectProjectKind() in @uipath/tool-agent (Agents repo):
|
|
150
150
|
// primary: uipath.json functions map extension (.ts/.js → javascript, .py → python)
|
|
151
151
|
// fallback: pyproject.toml presence → python (same signal Agents uses)
|
|
152
|
-
|
|
152
|
+
protected async detectLanguage(projectPath: string): Promise<Language> {
|
|
153
153
|
const uipathJsonContent = await this.fileSystem.readFile(
|
|
154
154
|
Path.join(projectPath, "uipath.json"),
|
|
155
155
|
"utf-8",
|
package/src/index.ts
CHANGED
|
@@ -3,4 +3,8 @@
|
|
|
3
3
|
// `toolsFactoryRepository.registerProjectToolFactory(new FunctionsToolFactory())`.
|
|
4
4
|
// ============================================================================
|
|
5
5
|
|
|
6
|
+
// Base tool + language detection, subclassable by Node-only hosts that add
|
|
7
|
+
// manifest generation before packing (function-tool's packager entry).
|
|
8
|
+
export { FunctionsTool } from "./functions-tool.js";
|
|
6
9
|
export { FunctionsToolFactory } from "./functions-tool-factory.js";
|
|
10
|
+
export { type Language, Languages } from "./types.js";
|