@uipath/rpa-tool 0.1.8 → 0.1.9
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/tool.js +29 -33
- package/package.json +57 -57
package/dist/tool.js
CHANGED
|
@@ -2423,7 +2423,7 @@ var init_dist = __esm(() => {
|
|
|
2423
2423
|
|
|
2424
2424
|
// node_modules/@uipath/coreipc/index.js
|
|
2425
2425
|
var require_coreipc = __commonJS((exports, module) => {
|
|
2426
|
-
var __dirname = "
|
|
2426
|
+
var __dirname = "D:\\a\\1\\s\\RpaTool\\rpa-tool\\node_modules\\@uipath\\coreipc";
|
|
2427
2427
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2428
2428
|
(function(e, t) {
|
|
2429
2429
|
typeof exports == "object" && typeof module == "object" ? module.exports = t() : typeof define == "function" && define.amd ? define([], t) : typeof exports == "object" ? exports.ipc = t() : e.ipc = t();
|
|
@@ -39629,11 +39629,11 @@ You can specify the URL via:
|
|
|
39629
39629
|
|
|
39630
39630
|
// src/tool.ts
|
|
39631
39631
|
import { logger as logger3 } from "@uipath/common";
|
|
39632
|
-
import { Option as Option8 } from "commander";
|
|
39632
|
+
import { Command as Command2, Option as Option8 } from "commander";
|
|
39633
39633
|
// package.json
|
|
39634
39634
|
var package_default = {
|
|
39635
39635
|
name: "@uipath/rpa-tool",
|
|
39636
|
-
version: "0.1.
|
|
39636
|
+
version: "0.1.9",
|
|
39637
39637
|
description: "Tool for creating and managing UiPath RPA projects via Studio IPC",
|
|
39638
39638
|
keywords: [
|
|
39639
39639
|
"uipcli-tool",
|
|
@@ -39663,7 +39663,7 @@ var package_default = {
|
|
|
39663
39663
|
directory: "RpaTool/rpa-tool"
|
|
39664
39664
|
},
|
|
39665
39665
|
publishConfig: {
|
|
39666
|
-
registry: "https://
|
|
39666
|
+
registry: "https://npm.pkg.github.com"
|
|
39667
39667
|
},
|
|
39668
39668
|
scripts: {
|
|
39669
39669
|
build: "bunx tsc --noEmit && bun build ./src/packager-tool.ts --outdir dist --format esm --target node --external @uipath/solutionpackager-tool-core && bun build ./src/tool.ts --outdir dist --format esm --target node --external '*/packager-tool.js' --external commander --external @uipath/common --external applicationinsights && bun build ./src/index.ts --outdir dist --format esm --target node --external '*/tool.js' --external commander --external @uipath/common --external applicationinsights",
|
|
@@ -39811,23 +39811,9 @@ function discoverInstances() {
|
|
|
39811
39811
|
};
|
|
39812
39812
|
}
|
|
39813
39813
|
|
|
39814
|
-
// src/telemetry-events.ts
|
|
39815
|
-
var RpaTelemetryEvents = {
|
|
39816
|
-
ListInstances: "Rpa.ListInstances",
|
|
39817
|
-
StartStudio: "Rpa.StartStudio",
|
|
39818
|
-
Restore: "Rpa.Restore",
|
|
39819
|
-
Analyze: "Rpa.Analyze",
|
|
39820
|
-
Build: "Rpa.Build",
|
|
39821
|
-
Pack: "Rpa.Pack"
|
|
39822
|
-
};
|
|
39823
|
-
function mcpToolEvent(toolName) {
|
|
39824
|
-
const pascal = toolName.split("-").map((s) => s.charAt(0).toUpperCase() + s.slice(1)).join("");
|
|
39825
|
-
return `Rpa.${pascal}`;
|
|
39826
|
-
}
|
|
39827
|
-
|
|
39828
39814
|
// src/commands/list-instances.ts
|
|
39829
39815
|
var registerListInstancesCommand = (program) => {
|
|
39830
|
-
program.command("list-instances", { hidden: true }).description("List running UiPath Studio instances and their status").trackedAction(processContext,
|
|
39816
|
+
program.command("list-instances", { hidden: true }).description("List running UiPath Studio instances and their status").trackedAction(processContext, async () => {
|
|
39831
39817
|
const { instances, timing } = discoverInstances();
|
|
39832
39818
|
if (instances.length === 0) {
|
|
39833
39819
|
console.log("No running Studio instances found.");
|
|
@@ -41437,7 +41423,7 @@ async function runPackagerCommand(opts, config) {
|
|
|
41437
41423
|
function registerAnalyzeCommand(program) {
|
|
41438
41424
|
const cmd = program.command("analyze").description("Validate and analyze a UiPath project");
|
|
41439
41425
|
cmd.argument("<projectDir>", "Path to the UiPath project directory");
|
|
41440
|
-
addCommonPackagerOptions(cmd).option("--skip-analyze", "Skip the analysis step").option("--default-severity <level>", "Default severity for analysis rules").option("--governance-file-path <path>", "Path to governance/policy rules file").addOption(new Option2("--governance-file-type <type>", "Type of governance file").choices(GOVERNANCE_FILE_TYPES)).option("--detailed-log-path <path>", "Path where detailed log file is written").trackedAction(processContext2,
|
|
41426
|
+
addCommonPackagerOptions(cmd).option("--skip-analyze", "Skip the analysis step").option("--default-severity <level>", "Default severity for analysis rules").option("--governance-file-path <path>", "Path to governance/policy rules file").addOption(new Option2("--governance-file-type <type>", "Type of governance file").choices(GOVERNANCE_FILE_TYPES)).option("--detailed-log-path <path>", "Path where detailed log file is written").trackedAction(processContext2, async (projectDir, opts) => {
|
|
41441
41427
|
opts.projectDir = projectDir;
|
|
41442
41428
|
const success = await runPackagerCommand(opts, {
|
|
41443
41429
|
label: "Analyze",
|
|
@@ -41472,7 +41458,7 @@ import { Option as Option3 } from "commander";
|
|
|
41472
41458
|
function registerBuildCommand(program) {
|
|
41473
41459
|
const cmd = program.command("build").description("Build (compile) a UiPath project");
|
|
41474
41460
|
cmd.argument("<projectDir>", "Path to the UiPath project directory");
|
|
41475
|
-
addCommonPackagerOptions(cmd).option("--skip-analyze", "Skip the analysis step").option("--governance-file-path <path>", "Path to governance/policy rules file").addOption(new Option3("--governance-file-type <type>", "Type of governance file").choices(GOVERNANCE_FILE_TYPES)).option("--detailed-log-path <path>", "Path where detailed log file is written").trackedAction(processContext3,
|
|
41461
|
+
addCommonPackagerOptions(cmd).option("--skip-analyze", "Skip the analysis step").option("--governance-file-path <path>", "Path to governance/policy rules file").addOption(new Option3("--governance-file-type <type>", "Type of governance file").choices(GOVERNANCE_FILE_TYPES)).option("--detailed-log-path <path>", "Path where detailed log file is written").trackedAction(processContext3, async (projectDir, opts) => {
|
|
41476
41462
|
opts.projectDir = projectDir;
|
|
41477
41463
|
const success = await runPackagerCommand(opts, {
|
|
41478
41464
|
label: "Build",
|
|
@@ -41504,7 +41490,7 @@ import { Option as Option4 } from "commander";
|
|
|
41504
41490
|
function registerPackCommand(program) {
|
|
41505
41491
|
const cmd = program.command("pack").description("Build and package a UiPath project into a .nupkg");
|
|
41506
41492
|
cmd.argument("<projectDir>", "Path to the UiPath project directory").argument("<outputPath>", "Directory where .nupkg is written");
|
|
41507
|
-
addCommonPackagerOptions(cmd).option("--package-id <id>", "NuGet package ID").option("--package-version <version>", "NuGet package version").option("--package-author <author>", "NuGet package author").option("--package-description <desc>", "NuGet package description").option("--skip-analyze", "Skip the analysis step").option("--skip-dependency-optimization", "Skip dependency optimization").option("--include-sources", "Include source files in the package").option("--split-packages", "Split into multiple packages").option("--governance-file-path <path>", "Path to governance/policy rules file").addOption(new Option4("--governance-file-type <type>", "Type of governance file").choices(GOVERNANCE_FILE_TYPES)).option("--detailed-log-path <path>", "Path where detailed log file is written").option("--signing-certificate-path <path>", "Path to .pfx certificate file").option("--signing-certificate-password <password>", "Certificate password").option("--signing-timestamp-server <url>", "Timestamp server URL").trackedAction(processContext4,
|
|
41493
|
+
addCommonPackagerOptions(cmd).option("--package-id <id>", "NuGet package ID").option("--package-version <version>", "NuGet package version").option("--package-author <author>", "NuGet package author").option("--package-description <desc>", "NuGet package description").option("--skip-analyze", "Skip the analysis step").option("--skip-dependency-optimization", "Skip dependency optimization").option("--include-sources", "Include source files in the package").option("--split-packages", "Split into multiple packages").option("--governance-file-path <path>", "Path to governance/policy rules file").addOption(new Option4("--governance-file-type <type>", "Type of governance file").choices(GOVERNANCE_FILE_TYPES)).option("--detailed-log-path <path>", "Path where detailed log file is written").option("--signing-certificate-path <path>", "Path to .pfx certificate file").option("--signing-certificate-password <password>", "Certificate password").option("--signing-timestamp-server <url>", "Timestamp server URL").trackedAction(processContext4, async (projectDir, outputPath, opts) => {
|
|
41508
41494
|
opts.projectDir = projectDir;
|
|
41509
41495
|
opts.outputPath = outputPath;
|
|
41510
41496
|
const success = await runPackagerCommand(opts, {
|
|
@@ -41561,7 +41547,7 @@ import { processContext as processContext5 } from "@uipath/common";
|
|
|
41561
41547
|
function registerRestoreCommand(program) {
|
|
41562
41548
|
const cmd = program.command("restore").description("Restore NuGet dependencies for a UiPath project");
|
|
41563
41549
|
cmd.argument("<projectDir>", "Path to the UiPath project directory").argument("[outputPath]", "Directory where dependencies are restored (defaults to project directory)");
|
|
41564
|
-
addCommonPackagerOptions(cmd).trackedAction(processContext5,
|
|
41550
|
+
addCommonPackagerOptions(cmd).trackedAction(processContext5, async (projectDir, outputPath, opts) => {
|
|
41565
41551
|
opts.projectDir = projectDir;
|
|
41566
41552
|
const success = await runPackagerCommand(opts, {
|
|
41567
41553
|
label: "Restore",
|
|
@@ -41810,7 +41796,7 @@ async function registerMcpCommands(program, client) {
|
|
|
41810
41796
|
}
|
|
41811
41797
|
const usagePattern = buildUsagePattern(cliCmd.flags);
|
|
41812
41798
|
usagePattern && sub.usage(usagePattern);
|
|
41813
|
-
sub.trackedAction(processContext6,
|
|
41799
|
+
sub.trackedAction(processContext6, async (opts) => {
|
|
41814
41800
|
const request = packToolCall(tool.name, cliCmd, opts);
|
|
41815
41801
|
const result = await client.callTool(request.name, request.arguments);
|
|
41816
41802
|
if (result === undefined) {
|
|
@@ -42556,7 +42542,7 @@ class StudioSession {
|
|
|
42556
42542
|
}
|
|
42557
42543
|
// src/commands/start-studio.ts
|
|
42558
42544
|
function registerStartStudioCommand(program2, options) {
|
|
42559
|
-
program2.command("start-studio").description("Ensure a Studio instance is running (additional commands may become available)").trackedAction(processContext7,
|
|
42545
|
+
program2.command("start-studio").description("Ensure a Studio instance is running (additional commands may become available)").trackedAction(processContext7, async () => {
|
|
42560
42546
|
if (!options) {
|
|
42561
42547
|
throw new Error("Cannot start Studio without project context. Provide --project-dir.");
|
|
42562
42548
|
}
|
|
@@ -42772,7 +42758,7 @@ function registerExternalCliCommands(program2, projectDir, config2, deps, sessio
|
|
|
42772
42758
|
} catch {
|
|
42773
42759
|
group.allowUnknownOption();
|
|
42774
42760
|
group.allowExcessArguments(true);
|
|
42775
|
-
group.trackedAction(processContext8,
|
|
42761
|
+
group.trackedAction(processContext8, async () => {
|
|
42776
42762
|
throw new Error(`'${config2.commandName}' requires the '${config2.packageId}' package. ` + `Ensure the package is installed and the project has been restored.`);
|
|
42777
42763
|
});
|
|
42778
42764
|
return;
|
|
@@ -42814,8 +42800,7 @@ function registerCommand(parent, exePath, projectDir, cmd, config2, deps, comman
|
|
|
42814
42800
|
if (usagePattern)
|
|
42815
42801
|
sub2.usage(usagePattern);
|
|
42816
42802
|
const supportsFormat = commandSupportsFormat(cmd, config2);
|
|
42817
|
-
|
|
42818
|
-
sub2.trackedAction(processContext8, telemetryName, async (opts) => {
|
|
42803
|
+
sub2.trackedAction(processContext8, async (opts) => {
|
|
42819
42804
|
const effectiveProjectDir = opts.projectDir ?? projectDir;
|
|
42820
42805
|
const effectiveFormat = opts.format ?? defaultFormat;
|
|
42821
42806
|
if (effectiveFormat && !supportsFormat) {
|
|
@@ -44926,13 +44911,24 @@ console.warn = (...args) => {
|
|
|
44926
44911
|
};
|
|
44927
44912
|
try {
|
|
44928
44913
|
await import("./packager-tool.js");
|
|
44929
|
-
} catch
|
|
44930
|
-
if (!(e instanceof Error) || !e.message.includes("already registered")) {
|
|
44931
|
-
throw e;
|
|
44932
|
-
}
|
|
44933
|
-
} finally {
|
|
44914
|
+
} catch {} finally {
|
|
44934
44915
|
console.warn = _warn;
|
|
44935
44916
|
}
|
|
44917
|
+
if (!Command2.prototype.trackedAction) {
|
|
44918
|
+
Command2.prototype.trackedAction = function(context, fn) {
|
|
44919
|
+
return this.action(async (...args) => {
|
|
44920
|
+
try {
|
|
44921
|
+
await fn(...args);
|
|
44922
|
+
} catch (error48) {
|
|
44923
|
+
const message = error48 instanceof Error ? error48.message : String(error48);
|
|
44924
|
+
process.stderr.write(`Result: Failure
|
|
44925
|
+
Message: ${message}
|
|
44926
|
+
`);
|
|
44927
|
+
context.exit(1);
|
|
44928
|
+
}
|
|
44929
|
+
});
|
|
44930
|
+
};
|
|
44931
|
+
}
|
|
44936
44932
|
var metadata = {
|
|
44937
44933
|
name: "rpa-tool",
|
|
44938
44934
|
version: package_default.version,
|
package/package.json
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@uipath/rpa-tool",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Tool for creating and managing UiPath RPA projects via Studio IPC",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"uipcli-tool",
|
|
7
|
-
"rpa",
|
|
8
|
-
"studio"
|
|
9
|
-
],
|
|
10
|
-
"type": "module",
|
|
11
|
-
"main": "./dist/tool.js",
|
|
12
|
-
"exports": {
|
|
13
|
-
".": "./dist/tool.js"
|
|
14
|
-
},
|
|
15
|
-
"private": false,
|
|
16
|
-
"maintainers": [
|
|
17
|
-
"vlad-uipath",
|
|
18
|
-
"andrei.balint",
|
|
19
|
-
"andrei.singeorzan"
|
|
20
|
-
],
|
|
21
|
-
"bin": {
|
|
22
|
-
"rpa-tool": "dist/index.js"
|
|
23
|
-
},
|
|
24
|
-
"files": [
|
|
25
|
-
"dist"
|
|
26
|
-
],
|
|
27
|
-
"repository": {
|
|
28
|
-
"type": "git",
|
|
29
|
-
"url": "git+https://github.com/UiPath/Studio.git",
|
|
30
|
-
"directory": "RpaTool/rpa-tool"
|
|
31
|
-
},
|
|
32
|
-
"publishConfig": {
|
|
33
|
-
"registry": "https://
|
|
34
|
-
},
|
|
35
|
-
"scripts": {
|
|
36
|
-
"build": "bunx tsc --noEmit && bun build ./src/packager-tool.ts --outdir dist --format esm --target node --external @uipath/solutionpackager-tool-core && bun build ./src/tool.ts --outdir dist --format esm --target node --external '*/packager-tool.js' --external commander --external @uipath/common --external applicationinsights && bun build ./src/index.ts --outdir dist --format esm --target node --external '*/tool.js' --external commander --external @uipath/common --external applicationinsights",
|
|
37
|
-
"package": "bun run build && bun pm pack",
|
|
38
|
-
"generate-docs": "bun run scripts/generate-docs.ts",
|
|
39
|
-
"test": "bun test",
|
|
40
|
-
"lint": "bunx @biomejs/biome check src",
|
|
41
|
-
"lint:fix": "bunx @biomejs/biome check --write src"
|
|
42
|
-
},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"@biomejs/biome": "^2.4.10",
|
|
45
|
-
"@types/bun": "^1.1.14",
|
|
46
|
-
"@types/node": "^25.1.0",
|
|
47
|
-
"@uipath/coreipc": "^2.5.1-20260324-07",
|
|
48
|
-
"@uipath/project-packager": "^1.1.10",
|
|
49
|
-
"@uipath/tool-workflowcompiler": "^0.0.14",
|
|
50
|
-
"camelcase-keys": "^10.0.2",
|
|
51
|
-
"typescript": "^5.7.2",
|
|
52
|
-
"@uipath/auth": "^0.1.12",
|
|
53
|
-
"@uipath/solutionpackager-tool-core": "^0.0.31",
|
|
54
|
-
"@uipath/common": "^0.1.15",
|
|
55
|
-
"commander": "^14.0.3"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@uipath/rpa-tool",
|
|
3
|
+
"version": "0.1.9",
|
|
4
|
+
"description": "Tool for creating and managing UiPath RPA projects via Studio IPC",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"uipcli-tool",
|
|
7
|
+
"rpa",
|
|
8
|
+
"studio"
|
|
9
|
+
],
|
|
10
|
+
"type": "module",
|
|
11
|
+
"main": "./dist/tool.js",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": "./dist/tool.js"
|
|
14
|
+
},
|
|
15
|
+
"private": false,
|
|
16
|
+
"maintainers": [
|
|
17
|
+
"vlad-uipath",
|
|
18
|
+
"andrei.balint",
|
|
19
|
+
"andrei.singeorzan"
|
|
20
|
+
],
|
|
21
|
+
"bin": {
|
|
22
|
+
"rpa-tool": "dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/UiPath/Studio.git",
|
|
30
|
+
"directory": "RpaTool/rpa-tool"
|
|
31
|
+
},
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"registry": "https://npm.pkg.github.com"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "bunx tsc --noEmit && bun build ./src/packager-tool.ts --outdir dist --format esm --target node --external @uipath/solutionpackager-tool-core && bun build ./src/tool.ts --outdir dist --format esm --target node --external '*/packager-tool.js' --external commander --external @uipath/common --external applicationinsights && bun build ./src/index.ts --outdir dist --format esm --target node --external '*/tool.js' --external commander --external @uipath/common --external applicationinsights",
|
|
37
|
+
"package": "bun run build && bun pm pack",
|
|
38
|
+
"generate-docs": "bun run scripts/generate-docs.ts",
|
|
39
|
+
"test": "bun test",
|
|
40
|
+
"lint": "bunx @biomejs/biome check src",
|
|
41
|
+
"lint:fix": "bunx @biomejs/biome check --write src"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@biomejs/biome": "^2.4.10",
|
|
45
|
+
"@types/bun": "^1.1.14",
|
|
46
|
+
"@types/node": "^25.1.0",
|
|
47
|
+
"@uipath/coreipc": "^2.5.1-20260324-07",
|
|
48
|
+
"@uipath/project-packager": "^1.1.10",
|
|
49
|
+
"@uipath/tool-workflowcompiler": "^0.0.14",
|
|
50
|
+
"camelcase-keys": "^10.0.2",
|
|
51
|
+
"typescript": "^5.7.2",
|
|
52
|
+
"@uipath/auth": "^0.1.12",
|
|
53
|
+
"@uipath/solutionpackager-tool-core": "^0.0.31",
|
|
54
|
+
"@uipath/common": "^0.1.15",
|
|
55
|
+
"commander": "^14.0.3"
|
|
56
|
+
}
|
|
57
|
+
}
|