@uipath/cli 1.204.0 → 1.205.0-preview.256
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/README.md +1 -3
- package/dist/{cli-xe5ef4dr.js → cli-xekt99dc.js} +5 -5
- package/dist/{index-zwnedwxc.js → index-30618bjs.js} +124 -58
- package/dist/{index-mttdq2yn.js → index-7tshyfxx.js} +2 -2
- package/dist/{index-xdxr3ync.js → index-hdxtgckw.js} +11 -1
- package/dist/{index-vqv4011a.js → index-krbz0qa3.js} +410 -428
- package/dist/{index-hhsf00x8.js → index-ngs0a2he.js} +1 -1
- package/dist/{index-trd07rnv.js → index-pj3g8ftz.js} +15 -6
- package/dist/{index-1xqtdfjh.js → index-yx2tptr8.js} +145 -148
- package/dist/index.js +9 -41
- package/dist/{node-strategy-zj25w5zz.js → node-strategy-ggx3nmyj.js} +1 -1
- package/dist/{server-fjpf556z.js → server-fywgvr0v.js} +48 -7
- package/dist/{telemetry-drain-368b7rp3.js → telemetry-drain-r92f0e4r.js} +2 -2
- package/dist/{updateService-2gjddhc9.js → updateService-s1d7wrsy.js} +3 -3
- package/package.json +2 -2
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runWithAuthProfile
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-30618bjs.js";
|
|
4
4
|
import {
|
|
5
5
|
OUTPUT_FORMATS,
|
|
6
6
|
catchError,
|
|
7
7
|
collectCommands,
|
|
8
|
+
getExitCode,
|
|
8
9
|
getOutputSink,
|
|
9
10
|
logger,
|
|
11
|
+
resetExitCode,
|
|
10
12
|
runWithSink,
|
|
11
13
|
setGlobalSink
|
|
12
|
-
} from "./index-
|
|
14
|
+
} from "./index-pj3g8ftz.js";
|
|
13
15
|
import"./index-g8ck9tv6.js";
|
|
14
16
|
import {
|
|
15
17
|
exports_external
|
|
16
18
|
} from "./index-hrt7fpkk.js";
|
|
17
19
|
import"./index-0gctz400.js";
|
|
18
20
|
import"./index-qa9gftnj.js";
|
|
19
|
-
import"./index-
|
|
21
|
+
import"./index-hdxtgckw.js";
|
|
20
22
|
import"./index-yc4kw997.js";
|
|
21
23
|
import {
|
|
22
24
|
__require
|
|
@@ -63,9 +65,22 @@ class ExitError extends Error {
|
|
|
63
65
|
async function executeCommand(command) {
|
|
64
66
|
const args = command.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g) || [];
|
|
65
67
|
const cleanArgs = args.map((a) => a.replace(/^["']|["']$/g, ""));
|
|
68
|
+
return executeArgv([...cleanArgs, "--output", "json"]);
|
|
69
|
+
}
|
|
70
|
+
var queue = Promise.resolve();
|
|
71
|
+
function executeArgv(cleanArgs) {
|
|
72
|
+
const task = queue.then(() => runOne(cleanArgs));
|
|
73
|
+
queue = task.then(() => {
|
|
74
|
+
return;
|
|
75
|
+
}, () => {
|
|
76
|
+
return;
|
|
77
|
+
});
|
|
78
|
+
return task;
|
|
79
|
+
}
|
|
80
|
+
async function runOne(cleanArgs) {
|
|
66
81
|
const sink = new BufferSink;
|
|
67
82
|
let exitCode = 0;
|
|
68
|
-
const syntheticArgv = ["node", "uip", ...cleanArgs
|
|
83
|
+
const syntheticArgv = ["node", "uip", ...cleanArgs];
|
|
69
84
|
const context = {
|
|
70
85
|
args: syntheticArgv,
|
|
71
86
|
output: {
|
|
@@ -82,9 +97,10 @@ async function executeCommand(command) {
|
|
|
82
97
|
}
|
|
83
98
|
};
|
|
84
99
|
const previousSink = getOutputSink();
|
|
100
|
+
resetExitCode();
|
|
85
101
|
setGlobalSink(sink);
|
|
86
102
|
const [error] = await catchError(async () => {
|
|
87
|
-
const { run } = await import("./cli-
|
|
103
|
+
const { run } = await import("./cli-xekt99dc.js");
|
|
88
104
|
await runWithAuthProfile(undefined, () => runWithSink(sink, () => run(context)));
|
|
89
105
|
});
|
|
90
106
|
if (error) {
|
|
@@ -94,7 +110,10 @@ async function executeCommand(command) {
|
|
|
94
110
|
exitCode = 1;
|
|
95
111
|
sink.writeErr(error instanceof Error ? error.message : String(error));
|
|
96
112
|
}
|
|
113
|
+
} else {
|
|
114
|
+
exitCode = getExitCode();
|
|
97
115
|
}
|
|
116
|
+
resetExitCode();
|
|
98
117
|
setGlobalSink(previousSink);
|
|
99
118
|
return { stdout: sink.stdout, stderr: sink.stderr, exitCode };
|
|
100
119
|
}
|
|
@@ -132,7 +151,7 @@ function introspectCommands(program) {
|
|
|
132
151
|
}
|
|
133
152
|
}
|
|
134
153
|
lines.push(`
|
|
135
|
-
Global Options (can be used with any command):`, ` --output <${OUTPUT_FORMATS.join("|")}>: Output format (default: json)`, " --output-filter <expression>: JMESPath expression applied to the Data field of the response envelope", " --log-level <debug|info|warn|error>: Log level threshold (default:
|
|
154
|
+
Global Options (can be used with any command):`, ` --output <${OUTPUT_FORMATS.join("|")}>: Output format (default: json)`, " --output-filter <expression>: JMESPath expression applied to the Data field of the response envelope", " --log-level <debug|info|warn|error>: Log level threshold (default: warn)", " --log-file <path>: Write logs to file instead of stderr", " --profile <name>: Use a named login profile (~/.uipath/profiles/<name>/.auth)", `
|
|
136
155
|
Pass the command without the 'uip' prefix. Example: "login status --output json"`, `Filter example: "tools list --output-filter 'Data[].name'"`);
|
|
137
156
|
return lines.join(`
|
|
138
157
|
`);
|
|
@@ -165,6 +184,28 @@ ${output}` : output
|
|
|
165
184
|
isError
|
|
166
185
|
};
|
|
167
186
|
});
|
|
187
|
+
server.registerTool("run_argv", {
|
|
188
|
+
description: `Run one CLI command given as argv (without 'uip'), e.g. ["is", "connections", "list", "--output", "json"]. Each element is passed through verbatim, so values with spaces or quotes are safe. Nothing is appended: pass your own --output. Returns stdout, stderr and the exit code as separate fields.`,
|
|
189
|
+
inputSchema: {
|
|
190
|
+
args: exports_external.array(exports_external.string()).min(1).describe("The command's arguments, one per element, without the 'uip' prefix.")
|
|
191
|
+
},
|
|
192
|
+
outputSchema: {
|
|
193
|
+
stdout: exports_external.string(),
|
|
194
|
+
stderr: exports_external.string(),
|
|
195
|
+
exitCode: exports_external.number().int()
|
|
196
|
+
}
|
|
197
|
+
}, async ({ args }) => {
|
|
198
|
+
const result = await executeArgv(args);
|
|
199
|
+
return {
|
|
200
|
+
content: [
|
|
201
|
+
{
|
|
202
|
+
type: "text",
|
|
203
|
+
text: JSON.stringify(result)
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
structuredContent: { ...result }
|
|
207
|
+
};
|
|
208
|
+
});
|
|
168
209
|
const transport = new StdioServerTransport;
|
|
169
210
|
await server.connect(transport);
|
|
170
211
|
await new Promise((resolve) => {
|
|
@@ -192,4 +233,4 @@ export {
|
|
|
192
233
|
startMcpServer
|
|
193
234
|
};
|
|
194
235
|
|
|
195
|
-
//# debugId=
|
|
236
|
+
//# debugId=CF2C904DCB425A6764756E2164756E21
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
logger,
|
|
8
8
|
releaseClaimedSpoolFile,
|
|
9
9
|
sweepTelemetrySpool
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
10
|
+
} from "./index-pj3g8ftz.js";
|
|
11
|
+
import"./index-hdxtgckw.js";
|
|
12
12
|
import"./index-1yh8g550.js";
|
|
13
13
|
|
|
14
14
|
// src/services/telemetry-drain.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runUpdate
|
|
3
|
-
} from "./index-
|
|
4
|
-
import"./index-
|
|
3
|
+
} from "./index-yx2tptr8.js";
|
|
4
|
+
import"./index-pj3g8ftz.js";
|
|
5
5
|
import"./index-g8ck9tv6.js";
|
|
6
6
|
import"./index-hrt7fpkk.js";
|
|
7
7
|
import"./index-d3w0wn6k.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-hdxtgckw.js";
|
|
9
9
|
import"./index-1yh8g550.js";
|
|
10
10
|
export {
|
|
11
11
|
runUpdate
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uipath/cli",
|
|
3
3
|
"author": "UiPath",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.205.0-preview.256",
|
|
6
6
|
"description": "Cross platform CLI for UiPath",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"kerberos": "7.0.0",
|
|
37
37
|
"node-expose-sspi": "0.1.60"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "63740c6cbb7ff282fa9118cc16a148eb030b245f"
|
|
40
40
|
}
|