@uipath/orchestrator-tool 0.1.5 → 0.1.7
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 +28 -28
- package/dist/index.js +140 -96
- package/dist/tool.js +141 -97
- package/package.json +45 -46
package/dist/tool.js
CHANGED
|
@@ -4,25 +4,43 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
function __accessProp(key) {
|
|
8
|
+
return this[key];
|
|
9
|
+
}
|
|
10
|
+
var __toESMCache_node;
|
|
11
|
+
var __toESMCache_esm;
|
|
7
12
|
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
+
var canCache = mod != null && typeof mod === "object";
|
|
14
|
+
if (canCache) {
|
|
15
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
+
var cached = cache.get(mod);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
8
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
22
|
for (let key of __getOwnPropNames(mod))
|
|
11
23
|
if (!__hasOwnProp.call(to, key))
|
|
12
24
|
__defProp(to, key, {
|
|
13
|
-
get: (
|
|
25
|
+
get: __accessProp.bind(mod, key),
|
|
14
26
|
enumerable: true
|
|
15
27
|
});
|
|
28
|
+
if (canCache)
|
|
29
|
+
cache.set(mod, to);
|
|
16
30
|
return to;
|
|
17
31
|
};
|
|
18
32
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
33
|
+
var __returnValue = (v) => v;
|
|
34
|
+
function __exportSetter(name, newValue) {
|
|
35
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
36
|
+
}
|
|
19
37
|
var __export = (target, all) => {
|
|
20
38
|
for (var name in all)
|
|
21
39
|
__defProp(target, name, {
|
|
22
40
|
get: all[name],
|
|
23
41
|
enumerable: true,
|
|
24
42
|
configurable: true,
|
|
25
|
-
set: (
|
|
43
|
+
set: __exportSetter.bind(all, name)
|
|
26
44
|
});
|
|
27
45
|
};
|
|
28
46
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -4662,7 +4680,7 @@ class SimpleLogger {
|
|
|
4662
4680
|
return 0 /* DEBUG */;
|
|
4663
4681
|
}
|
|
4664
4682
|
} catch {}
|
|
4665
|
-
return
|
|
4683
|
+
return DEFAULT_LOG_LEVEL;
|
|
4666
4684
|
}
|
|
4667
4685
|
static parseLevel(value) {
|
|
4668
4686
|
switch (value.toLowerCase()) {
|
|
@@ -4795,7 +4813,7 @@ class SimpleLogger {
|
|
|
4795
4813
|
function getLogFilePath() {
|
|
4796
4814
|
return logger.getLogFilePath();
|
|
4797
4815
|
}
|
|
4798
|
-
var GLOBAL_KEY = "__uipcli_log_file_path__", logger;
|
|
4816
|
+
var GLOBAL_KEY = "__uipcli_log_file_path__", DEFAULT_LOG_LEVEL = 3 /* ERROR */, logger;
|
|
4799
4817
|
var init_logger = __esm(() => {
|
|
4800
4818
|
init_output_context();
|
|
4801
4819
|
logger = SimpleLogger.getInstance();
|
|
@@ -5066,7 +5084,7 @@ var init_telemetry = __esm(() => {
|
|
|
5066
5084
|
init_logger_telemetry_provider();
|
|
5067
5085
|
init_node_appinsights_telemetry_provider();
|
|
5068
5086
|
sessionId = getOrCreateSessionId();
|
|
5069
|
-
DEFAULT_AI_CONNECTION_STRING = Buffer.from("
|
|
5087
|
+
DEFAULT_AI_CONNECTION_STRING = Buffer.from("SW5zdHJ1bWVudGF0aW9uS2V5PTliZDM3NDgyLTgxMGUtNDQyYS1hYWE2LWQzOGVmNjVjNjY3NDtJbmdlc3Rpb25FbmRwb2ludD1odHRwczovL3dlc3RldXJvcGUtNS5pbi5hcHBsaWNhdGlvbmluc2lnaHRzLmF6dXJlLmNvbS87TGl2ZUVuZHBvaW50PWh0dHBzOi8vd2VzdGV1cm9wZS5saXZlZGlhZ25vc3RpY3MubW9uaXRvci5henVyZS5jb20vO0FwcGxpY2F0aW9uSWQ9MzU2OTdlZjEtOGJkMC00ZjE5LWEyN2MtZDg3Y2NhYzY2ZDJj", "base64").toString("utf-8");
|
|
5070
5088
|
telemetry = new Proxy({}, {
|
|
5071
5089
|
get(_, prop) {
|
|
5072
5090
|
const instance = getTelemetryInstance();
|
|
@@ -5080,7 +5098,7 @@ var init_telemetry = __esm(() => {
|
|
|
5080
5098
|
var CommonTelemetryEvents;
|
|
5081
5099
|
var init_telemetry_events = __esm(() => {
|
|
5082
5100
|
CommonTelemetryEvents = {
|
|
5083
|
-
Error: "
|
|
5101
|
+
Error: "uip.error"
|
|
5084
5102
|
};
|
|
5085
5103
|
});
|
|
5086
5104
|
|
|
@@ -5131,11 +5149,6 @@ function logOutput(data, format = "table") {
|
|
|
5131
5149
|
printOutput(data, format, (msg) => sink.writeOut(`${msg}
|
|
5132
5150
|
`));
|
|
5133
5151
|
}
|
|
5134
|
-
function errorOutput(data, format = "table") {
|
|
5135
|
-
const sink = getOutputSink();
|
|
5136
|
-
printOutput(data, format, (msg) => sink.writeErr(`${msg}
|
|
5137
|
-
`));
|
|
5138
|
-
}
|
|
5139
5152
|
function printTable(data, logFn = console.log, externalLogValue) {
|
|
5140
5153
|
if (data.length === 0)
|
|
5141
5154
|
return;
|
|
@@ -5198,7 +5211,7 @@ var init_formatter = __esm(() => {
|
|
|
5198
5211
|
result: data.Result,
|
|
5199
5212
|
message: data.Message
|
|
5200
5213
|
});
|
|
5201
|
-
|
|
5214
|
+
logOutput(data, getOutputFormat());
|
|
5202
5215
|
}
|
|
5203
5216
|
OutputFormatter.error = error;
|
|
5204
5217
|
function log(data) {
|
|
@@ -5236,6 +5249,12 @@ var init_command_help = __esm(() => {
|
|
|
5236
5249
|
init_output_format_context();
|
|
5237
5250
|
});
|
|
5238
5251
|
|
|
5252
|
+
// ../common/src/constants.ts
|
|
5253
|
+
var UIPATH_HOME_DIR = ".uipath", AUTH_FILENAME = ".auth", CONFIG_FILENAME = "config.json", LOCAL_CONFIG_FILENAME = "uipath.config.json", DEFAULT_BASE_URL = "https://cloud.uipath.com", DEFAULT_PAGE_SIZE = 50, DEFAULT_AUTH_TIMEOUT_MS;
|
|
5254
|
+
var init_constants = __esm(() => {
|
|
5255
|
+
DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
|
|
5256
|
+
});
|
|
5257
|
+
|
|
5239
5258
|
// ../../node_modules/jsonpath-plus/dist/index-node-esm.js
|
|
5240
5259
|
import vm from "vm";
|
|
5241
5260
|
|
|
@@ -6642,12 +6661,35 @@ var init_jsonpath = __esm(() => {
|
|
|
6642
6661
|
});
|
|
6643
6662
|
// ../common/src/trackedAction.ts
|
|
6644
6663
|
import { Command } from "commander";
|
|
6664
|
+
function deriveCommandPath(cmd) {
|
|
6665
|
+
const parts = [];
|
|
6666
|
+
let current = cmd;
|
|
6667
|
+
while (current) {
|
|
6668
|
+
const name = current.name();
|
|
6669
|
+
if (name) {
|
|
6670
|
+
parts.unshift(name);
|
|
6671
|
+
}
|
|
6672
|
+
current = current.parent;
|
|
6673
|
+
}
|
|
6674
|
+
if (parts.length > 1) {
|
|
6675
|
+
parts.shift();
|
|
6676
|
+
}
|
|
6677
|
+
return ["uip", ...parts.filter((p) => p !== "uip")].join(".");
|
|
6678
|
+
}
|
|
6679
|
+
var processContext;
|
|
6645
6680
|
var init_trackedAction = __esm(() => {
|
|
6646
6681
|
init_formatter();
|
|
6647
6682
|
init_logger();
|
|
6648
6683
|
init_telemetry();
|
|
6649
|
-
|
|
6684
|
+
processContext = {
|
|
6685
|
+
exit: (code) => {
|
|
6686
|
+
process.exitCode = code;
|
|
6687
|
+
}
|
|
6688
|
+
};
|
|
6689
|
+
Command.prototype.trackedAction = function(context, fn, properties) {
|
|
6690
|
+
const command = this;
|
|
6650
6691
|
return this.action(async (...args) => {
|
|
6692
|
+
const telemetryName = deriveCommandPath(command);
|
|
6651
6693
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
6652
6694
|
const startTime = performance.now();
|
|
6653
6695
|
let errorMessage;
|
|
@@ -6678,6 +6720,7 @@ var init_trackedAction = __esm(() => {
|
|
|
6678
6720
|
var init_src = __esm(() => {
|
|
6679
6721
|
init_node_appinsights_telemetry_provider();
|
|
6680
6722
|
init_command_help();
|
|
6723
|
+
init_constants();
|
|
6681
6724
|
init_formatter();
|
|
6682
6725
|
init_jsonpath();
|
|
6683
6726
|
init_logger();
|
|
@@ -6685,7 +6728,6 @@ var init_src = __esm(() => {
|
|
|
6685
6728
|
init_output_format_context();
|
|
6686
6729
|
init_registry();
|
|
6687
6730
|
init_telemetry();
|
|
6688
|
-
init_telemetry_events();
|
|
6689
6731
|
init_trackedAction();
|
|
6690
6732
|
});
|
|
6691
6733
|
|
|
@@ -7516,8 +7558,8 @@ var require_src = __commonJS((exports, module) => {
|
|
|
7516
7558
|
// package.json
|
|
7517
7559
|
var package_default = {
|
|
7518
7560
|
name: "@uipath/orchestrator-tool",
|
|
7519
|
-
version: "0.1.
|
|
7520
|
-
description: "
|
|
7561
|
+
version: "0.1.7",
|
|
7562
|
+
description: "Manage Orchestrator folders, jobs, processes, and releases.",
|
|
7521
7563
|
private: false,
|
|
7522
7564
|
maintainers: [
|
|
7523
7565
|
"aoltean16",
|
|
@@ -7530,7 +7572,7 @@ var package_default = {
|
|
|
7530
7572
|
directory: "packages/orchestrator-tool"
|
|
7531
7573
|
},
|
|
7532
7574
|
publishConfig: {
|
|
7533
|
-
registry: "https://
|
|
7575
|
+
registry: "https://registry.npmjs.org/"
|
|
7534
7576
|
},
|
|
7535
7577
|
keywords: [
|
|
7536
7578
|
"uipcli-tool"
|
|
@@ -7550,8 +7592,7 @@ var package_default = {
|
|
|
7550
7592
|
build: "bun build ./src/tool.ts --outdir dist --format esm --target node --external commander && bun build ./src/index.ts --outdir dist --format esm --target node",
|
|
7551
7593
|
package: "bun run build && bun pm pack",
|
|
7552
7594
|
lint: "biome check .",
|
|
7553
|
-
"lint:fix": "biome check --write ."
|
|
7554
|
-
e2e: "vitest run --config ../../vitest.e2e.base.config.ts"
|
|
7595
|
+
"lint:fix": "biome check --write ."
|
|
7555
7596
|
},
|
|
7556
7597
|
dependencies: {
|
|
7557
7598
|
commander: "^14.0.3"
|
|
@@ -11278,6 +11319,12 @@ class ReleasesApi extends BaseAPI {
|
|
|
11278
11319
|
return await response.value();
|
|
11279
11320
|
}
|
|
11280
11321
|
}
|
|
11322
|
+
// ../auth/src/index.ts
|
|
11323
|
+
init_src();
|
|
11324
|
+
|
|
11325
|
+
// ../auth/src/config.ts
|
|
11326
|
+
init_src();
|
|
11327
|
+
|
|
11281
11328
|
// ../auth/src/utils/loadConfig.ts
|
|
11282
11329
|
init_src();
|
|
11283
11330
|
|
|
@@ -24864,11 +24911,11 @@ var loadConfigAsync = async () => {
|
|
|
24864
24911
|
const fs7 = await getFs();
|
|
24865
24912
|
let configPath = fs7.env.getenv("UIPATH_CONFIG_PATH");
|
|
24866
24913
|
if (!configPath) {
|
|
24867
|
-
const localPath = fs7.path.join(fs7.env.cwd(),
|
|
24914
|
+
const localPath = fs7.path.join(fs7.env.cwd(), LOCAL_CONFIG_FILENAME);
|
|
24868
24915
|
if (await fs7.exists(localPath)) {
|
|
24869
24916
|
configPath = localPath;
|
|
24870
24917
|
} else {
|
|
24871
|
-
configPath = fs7.path.join(fs7.env.homedir(),
|
|
24918
|
+
configPath = fs7.path.join(fs7.env.homedir(), UIPATH_HOME_DIR, CONFIG_FILENAME);
|
|
24872
24919
|
}
|
|
24873
24920
|
}
|
|
24874
24921
|
if (!await fs7.exists(configPath)) {
|
|
@@ -24901,7 +24948,6 @@ Please ensure your config file contains valid JSON.`;
|
|
|
24901
24948
|
};
|
|
24902
24949
|
|
|
24903
24950
|
// ../auth/src/config.ts
|
|
24904
|
-
var DEFAULT_BASE_URL = "https://cloud.uipath.com";
|
|
24905
24951
|
var DEFAULT_CLIENT_ID = "36dea5b8-e8bb-423d-8e7b-c808df8f1c00";
|
|
24906
24952
|
|
|
24907
24953
|
class InvalidBaseUrlError extends Error {
|
|
@@ -24996,10 +25042,10 @@ init_src2();
|
|
|
24996
25042
|
|
|
24997
25043
|
// ../auth/src/telemetry-events.ts
|
|
24998
25044
|
var AuthTelemetryEvents = {
|
|
24999
|
-
Login: "
|
|
25000
|
-
TenantSelected: "
|
|
25001
|
-
TokenRefresh: "
|
|
25002
|
-
Logout: "
|
|
25045
|
+
Login: "uip.auth.login",
|
|
25046
|
+
TenantSelected: "uip.auth.tenant-selected",
|
|
25047
|
+
TokenRefresh: "uip.auth.token-refresh",
|
|
25048
|
+
Logout: "uip.auth.logout"
|
|
25003
25049
|
};
|
|
25004
25050
|
|
|
25005
25051
|
// ../auth/src/tenantSelection.ts
|
|
@@ -25520,9 +25566,7 @@ var Qe = `${t("gray", h)} `;
|
|
|
25520
25566
|
// ../auth/src/utils/envFile.ts
|
|
25521
25567
|
init_src();
|
|
25522
25568
|
init_src2();
|
|
25523
|
-
var
|
|
25524
|
-
var DEFAULT_AUTH_DIR = ".uipath";
|
|
25525
|
-
var DEFAULT_ENV_FILENAME = `${DEFAULT_AUTH_DIR}/${DEFAULT_AUTH_FILENAME}`;
|
|
25569
|
+
var DEFAULT_ENV_FILENAME = `${UIPATH_HOME_DIR}/${AUTH_FILENAME}`;
|
|
25526
25570
|
var resolveEnvFilePathAsync = async (envFilePath = DEFAULT_ENV_FILENAME) => {
|
|
25527
25571
|
const fs7 = getFileSystem();
|
|
25528
25572
|
if (fs7.path.isAbsolute(envFilePath)) {
|
|
@@ -25880,7 +25924,7 @@ async function extractErrorMessage(error48) {
|
|
|
25880
25924
|
// src/commands/folders.ts
|
|
25881
25925
|
var registerFoldersCommand = (program) => {
|
|
25882
25926
|
const folders = program.command("folders").description("Manage UiPath Orchestrator folders").option("--format <format>", "Output format (table, json, yaml, plain)", "table");
|
|
25883
|
-
folders.command("list").description("List all folders").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("-f, --filter <filter>", "OData filter").option("-l, --limit <number>", "Number of items to return",
|
|
25927
|
+
folders.command("list").description("List all folders").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("-f, --filter <filter>", "OData filter").option("-l, --limit <number>", "Number of items to return", String(DEFAULT_PAGE_SIZE)).option("--offset <number>", "Number of items to skip", "0").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext, async (options) => {
|
|
25884
25928
|
const [apiError, api2] = await catchError(createApiClient(FoldersApi, options));
|
|
25885
25929
|
if (apiError) {
|
|
25886
25930
|
OutputFormatter.error({
|
|
@@ -25888,7 +25932,7 @@ var registerFoldersCommand = (program) => {
|
|
|
25888
25932
|
Message: "Error listing folders",
|
|
25889
25933
|
Instructions: await extractErrorMessage(apiError)
|
|
25890
25934
|
});
|
|
25891
|
-
|
|
25935
|
+
processContext.exit(1);
|
|
25892
25936
|
return;
|
|
25893
25937
|
}
|
|
25894
25938
|
const [getError, result] = await catchError(api2.foldersGet({
|
|
@@ -25902,7 +25946,7 @@ var registerFoldersCommand = (program) => {
|
|
|
25902
25946
|
Message: "Error listing folders",
|
|
25903
25947
|
Instructions: await extractErrorMessage(getError)
|
|
25904
25948
|
});
|
|
25905
|
-
|
|
25949
|
+
processContext.exit(1);
|
|
25906
25950
|
return;
|
|
25907
25951
|
}
|
|
25908
25952
|
if (result.value && result.value.length > 0) {
|
|
@@ -25927,7 +25971,7 @@ var registerFoldersCommand = (program) => {
|
|
|
25927
25971
|
});
|
|
25928
25972
|
}
|
|
25929
25973
|
});
|
|
25930
|
-
folders.command("create").description("Create a new folder").argument("<name>", "Folder name").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("-d, --description <description>", "Folder description").option("-p, --parent <parentId>", "Parent folder ID").
|
|
25974
|
+
folders.command("create").description("Create a new folder").argument("<name>", "Folder name").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("-d, --description <description>", "Folder description").option("-p, --parent <parentId>", "Parent folder ID").trackedAction(processContext, async (name, options) => {
|
|
25931
25975
|
const [apiError, api2] = await catchError(createApiClient(FoldersApi, {
|
|
25932
25976
|
tenant: options.tenant
|
|
25933
25977
|
}));
|
|
@@ -25937,7 +25981,7 @@ var registerFoldersCommand = (program) => {
|
|
|
25937
25981
|
Message: "Error creating folder",
|
|
25938
25982
|
Instructions: await extractErrorMessage(apiError)
|
|
25939
25983
|
});
|
|
25940
|
-
|
|
25984
|
+
processContext.exit(1);
|
|
25941
25985
|
return;
|
|
25942
25986
|
}
|
|
25943
25987
|
const folderData = {
|
|
@@ -25955,7 +25999,7 @@ var registerFoldersCommand = (program) => {
|
|
|
25955
25999
|
Message: "Error creating folder",
|
|
25956
26000
|
Instructions: await extractErrorMessage(createError)
|
|
25957
26001
|
});
|
|
25958
|
-
|
|
26002
|
+
processContext.exit(1);
|
|
25959
26003
|
return;
|
|
25960
26004
|
}
|
|
25961
26005
|
OutputFormatter.success({
|
|
@@ -25968,7 +26012,7 @@ var registerFoldersCommand = (program) => {
|
|
|
25968
26012
|
}
|
|
25969
26013
|
});
|
|
25970
26014
|
});
|
|
25971
|
-
folders.command("get").description("Get folder by ID").argument("<id>", "Folder ID").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").
|
|
26015
|
+
folders.command("get").description("Get folder by ID").argument("<id>", "Folder ID").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").trackedAction(processContext, async (id, options) => {
|
|
25972
26016
|
const [apiError, api2] = await catchError(createApiClient(FoldersApi, {
|
|
25973
26017
|
tenant: options.tenant
|
|
25974
26018
|
}));
|
|
@@ -25978,7 +26022,7 @@ var registerFoldersCommand = (program) => {
|
|
|
25978
26022
|
Message: "Error getting folder",
|
|
25979
26023
|
Instructions: await extractErrorMessage(apiError)
|
|
25980
26024
|
});
|
|
25981
|
-
|
|
26025
|
+
processContext.exit(1);
|
|
25982
26026
|
return;
|
|
25983
26027
|
}
|
|
25984
26028
|
const [getError, folder] = await catchError(api2.foldersGetById({
|
|
@@ -25990,7 +26034,7 @@ var registerFoldersCommand = (program) => {
|
|
|
25990
26034
|
Message: "Error getting folder",
|
|
25991
26035
|
Instructions: await extractErrorMessage(getError)
|
|
25992
26036
|
});
|
|
25993
|
-
|
|
26037
|
+
processContext.exit(1);
|
|
25994
26038
|
return;
|
|
25995
26039
|
}
|
|
25996
26040
|
OutputFormatter.success({
|
|
@@ -26011,7 +26055,7 @@ var registerFoldersCommand = (program) => {
|
|
|
26011
26055
|
}
|
|
26012
26056
|
});
|
|
26013
26057
|
});
|
|
26014
|
-
folders.command("get-all-for-current-user").description("Get all folders for current user").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("--take <number>", "Number of items to return",
|
|
26058
|
+
folders.command("get-all-for-current-user").description("Get all folders for current user").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("--take <number>", "Number of items to return", String(DEFAULT_PAGE_SIZE)).option("--skip <number>", "Number of items to skip", "0").trackedAction(processContext, async (options) => {
|
|
26015
26059
|
const [apiError, api2] = await catchError(createApiClient(FoldersApi, {
|
|
26016
26060
|
tenant: options.tenant
|
|
26017
26061
|
}));
|
|
@@ -26021,7 +26065,7 @@ var registerFoldersCommand = (program) => {
|
|
|
26021
26065
|
Message: "Error getting folders for current user",
|
|
26022
26066
|
Instructions: await extractErrorMessage(apiError)
|
|
26023
26067
|
});
|
|
26024
|
-
|
|
26068
|
+
processContext.exit(1);
|
|
26025
26069
|
return;
|
|
26026
26070
|
}
|
|
26027
26071
|
const [getError, response] = await catchError(api2.foldersGetAllForCurrentUser({
|
|
@@ -26034,7 +26078,7 @@ var registerFoldersCommand = (program) => {
|
|
|
26034
26078
|
Message: "Error getting folders for current user",
|
|
26035
26079
|
Instructions: await extractErrorMessage(getError)
|
|
26036
26080
|
});
|
|
26037
|
-
|
|
26081
|
+
processContext.exit(1);
|
|
26038
26082
|
return;
|
|
26039
26083
|
}
|
|
26040
26084
|
if (response.pageItems && response.pageItems.length > 0) {
|
|
@@ -26061,7 +26105,7 @@ var registerFoldersCommand = (program) => {
|
|
|
26061
26105
|
});
|
|
26062
26106
|
}
|
|
26063
26107
|
});
|
|
26064
|
-
folders.command("delete").description("Delete a folder by ID").argument("<id>", "Folder ID").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").
|
|
26108
|
+
folders.command("delete").description("Delete a folder by ID").argument("<id>", "Folder ID").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").trackedAction(processContext, async (id, options) => {
|
|
26065
26109
|
const [apiError, api2] = await catchError(createApiClient(FoldersApi, {
|
|
26066
26110
|
tenant: options.tenant
|
|
26067
26111
|
}));
|
|
@@ -26071,7 +26115,7 @@ var registerFoldersCommand = (program) => {
|
|
|
26071
26115
|
Message: "Error deleting folder",
|
|
26072
26116
|
Instructions: await extractErrorMessage(apiError)
|
|
26073
26117
|
});
|
|
26074
|
-
|
|
26118
|
+
processContext.exit(1);
|
|
26075
26119
|
return;
|
|
26076
26120
|
}
|
|
26077
26121
|
const [deleteError] = await catchError(api2.foldersDeleteById({ key: parseInt(id, 10) }));
|
|
@@ -26081,7 +26125,7 @@ var registerFoldersCommand = (program) => {
|
|
|
26081
26125
|
Message: "Error deleting folder",
|
|
26082
26126
|
Instructions: await extractErrorMessage(deleteError)
|
|
26083
26127
|
});
|
|
26084
|
-
|
|
26128
|
+
processContext.exit(1);
|
|
26085
26129
|
return;
|
|
26086
26130
|
}
|
|
26087
26131
|
OutputFormatter.success({
|
|
@@ -26093,7 +26137,7 @@ var registerFoldersCommand = (program) => {
|
|
|
26093
26137
|
}
|
|
26094
26138
|
});
|
|
26095
26139
|
});
|
|
26096
|
-
folders.command("move").description("Move folder to a new parent").argument("<id>", "Folder ID to move").argument("<parent-folder-id>", "Target parent folder ID").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").
|
|
26140
|
+
folders.command("move").description("Move folder to a new parent").argument("<id>", "Folder ID to move").argument("<parent-folder-id>", "Target parent folder ID").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").trackedAction(processContext, async (id, targetParentId, options) => {
|
|
26097
26141
|
const [apiError, api2] = await catchError(createApiClient(FoldersApi, {
|
|
26098
26142
|
tenant: options.tenant
|
|
26099
26143
|
}));
|
|
@@ -26103,7 +26147,7 @@ var registerFoldersCommand = (program) => {
|
|
|
26103
26147
|
Message: "Error moving folder",
|
|
26104
26148
|
Instructions: await extractErrorMessage(apiError)
|
|
26105
26149
|
});
|
|
26106
|
-
|
|
26150
|
+
processContext.exit(1);
|
|
26107
26151
|
return;
|
|
26108
26152
|
}
|
|
26109
26153
|
const [moveError] = await catchError(api2.foldersMoveFolderByFolderid({
|
|
@@ -26116,7 +26160,7 @@ var registerFoldersCommand = (program) => {
|
|
|
26116
26160
|
Message: "Error moving folder",
|
|
26117
26161
|
Instructions: await extractErrorMessage(moveError)
|
|
26118
26162
|
});
|
|
26119
|
-
|
|
26163
|
+
processContext.exit(1);
|
|
26120
26164
|
return;
|
|
26121
26165
|
}
|
|
26122
26166
|
OutputFormatter.success({
|
|
@@ -26129,7 +26173,7 @@ var registerFoldersCommand = (program) => {
|
|
|
26129
26173
|
}
|
|
26130
26174
|
});
|
|
26131
26175
|
});
|
|
26132
|
-
folders.command("edit").description("Edit folder").argument("<id>", "Folder ID").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("-k, --key <key>", "Unique key for the folder").option("-n, --name <name>", "Display name for the folder").option("-q, --qualified-name <name>", "Fully qualified name").option("-d, --description <description>", "Description of folder").option("--folder-type <type>", "Folder type (Standard, Personal, Virtual, Solution, DebugSolution)").option("-p, --provision-type <type>", "Robot provisioning type (Manual, Automatic)").option("-m, --permission-model <model>", "Folder permissions model (InheritFromTenant, FineGrained)").option("--parent-folder-id <id>", "Id of parent folder").option("--parent-key <key>", "Unique key for the parent folder").option("-f, --feed-type <type>", "Folder feed type (Undefined, Processes, Libraries, PersonalWorkspace, FolderHierarchy)").
|
|
26176
|
+
folders.command("edit").description("Edit folder").argument("<id>", "Folder ID").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("-k, --key <key>", "Unique key for the folder").option("-n, --name <name>", "Display name for the folder").option("-q, --qualified-name <name>", "Fully qualified name").option("-d, --description <description>", "Description of folder").option("--folder-type <type>", "Folder type (Standard, Personal, Virtual, Solution, DebugSolution)").option("-p, --provision-type <type>", "Robot provisioning type (Manual, Automatic)").option("-m, --permission-model <model>", "Folder permissions model (InheritFromTenant, FineGrained)").option("--parent-folder-id <id>", "Id of parent folder").option("--parent-key <key>", "Unique key for the parent folder").option("-f, --feed-type <type>", "Folder feed type (Undefined, Processes, Libraries, PersonalWorkspace, FolderHierarchy)").trackedAction(processContext, async (id, options) => {
|
|
26133
26177
|
const [apiError, api2] = await catchError(createApiClient(FoldersApi, {
|
|
26134
26178
|
tenant: options.tenant
|
|
26135
26179
|
}));
|
|
@@ -26139,7 +26183,7 @@ var registerFoldersCommand = (program) => {
|
|
|
26139
26183
|
Message: "Error editing folder",
|
|
26140
26184
|
Instructions: await extractErrorMessage(apiError)
|
|
26141
26185
|
});
|
|
26142
|
-
|
|
26186
|
+
processContext.exit(1);
|
|
26143
26187
|
return;
|
|
26144
26188
|
}
|
|
26145
26189
|
const updateData = {};
|
|
@@ -26165,7 +26209,7 @@ var registerFoldersCommand = (program) => {
|
|
|
26165
26209
|
Message: `Invalid folder type. Must be one of: ${validFolderTypes.join(", ")}`,
|
|
26166
26210
|
Instructions: `Invalid folder type. Must be one of: ${validFolderTypes.join(", ")}`
|
|
26167
26211
|
});
|
|
26168
|
-
|
|
26212
|
+
processContext.exit(1);
|
|
26169
26213
|
return;
|
|
26170
26214
|
}
|
|
26171
26215
|
updateData.folderType = options.folderType;
|
|
@@ -26178,7 +26222,7 @@ var registerFoldersCommand = (program) => {
|
|
|
26178
26222
|
Message: `Invalid provision type. Must be one of: ${validProvisionTypes.join(", ")}`,
|
|
26179
26223
|
Instructions: `Invalid provision type. Must be one of: ${validProvisionTypes.join(", ")}`
|
|
26180
26224
|
});
|
|
26181
|
-
|
|
26225
|
+
processContext.exit(1);
|
|
26182
26226
|
return;
|
|
26183
26227
|
}
|
|
26184
26228
|
updateData.provisionType = options.provisionType;
|
|
@@ -26194,7 +26238,7 @@ var registerFoldersCommand = (program) => {
|
|
|
26194
26238
|
Message: `Invalid permission model. Must be one of: ${validPermissionModels.join(", ")}`,
|
|
26195
26239
|
Instructions: `Invalid permission model. Must be one of: ${validPermissionModels.join(", ")}`
|
|
26196
26240
|
});
|
|
26197
|
-
|
|
26241
|
+
processContext.exit(1);
|
|
26198
26242
|
return;
|
|
26199
26243
|
}
|
|
26200
26244
|
updateData.permissionModel = options.permissionModel;
|
|
@@ -26217,7 +26261,7 @@ var registerFoldersCommand = (program) => {
|
|
|
26217
26261
|
Message: `Invalid feed type. Must be one of: ${validFeedTypes.join(", ")}`,
|
|
26218
26262
|
Instructions: `Invalid feed type. Must be one of: ${validFeedTypes.join(", ")}`
|
|
26219
26263
|
});
|
|
26220
|
-
|
|
26264
|
+
processContext.exit(1);
|
|
26221
26265
|
return;
|
|
26222
26266
|
}
|
|
26223
26267
|
updateData.feedType = options.feedType;
|
|
@@ -26232,7 +26276,7 @@ var registerFoldersCommand = (program) => {
|
|
|
26232
26276
|
Message: "Error editing folder",
|
|
26233
26277
|
Instructions: await extractErrorMessage(editError)
|
|
26234
26278
|
});
|
|
26235
|
-
|
|
26279
|
+
processContext.exit(1);
|
|
26236
26280
|
return;
|
|
26237
26281
|
}
|
|
26238
26282
|
OutputFormatter.success({
|
|
@@ -26264,7 +26308,7 @@ function formatJob(job) {
|
|
|
26264
26308
|
}
|
|
26265
26309
|
var registerJobsCommand = (program) => {
|
|
26266
26310
|
const jobs = program.command("jobs").description("Manage UiPath Orchestrator jobs").option("--format <format>", "Output format (table, json, yaml, plain)", "table");
|
|
26267
|
-
jobs.command("list").description("List all jobs").argument("<folder-id>", "Folder (organization unit) ID").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("-f, --filter <filter>", "OData filter").option("-l, --limit <number>", "Number of items to return",
|
|
26311
|
+
jobs.command("list").description("List all jobs").argument("<folder-id>", "Folder (organization unit) ID").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("-f, --filter <filter>", "OData filter").option("-l, --limit <number>", "Number of items to return", String(DEFAULT_PAGE_SIZE)).option("--offset <number>", "Number of items to skip", "0").option("--order-by <orderby>", "OData $orderby expression").option("--expand <expand>", "OData $expand expression").trackedAction(processContext, async (folderId, options) => {
|
|
26268
26312
|
const parsedFolderId = parseInt(folderId, 10);
|
|
26269
26313
|
if (Number.isNaN(parsedFolderId)) {
|
|
26270
26314
|
OutputFormatter.error({
|
|
@@ -26272,7 +26316,7 @@ var registerJobsCommand = (program) => {
|
|
|
26272
26316
|
Message: "Error listing jobs",
|
|
26273
26317
|
Instructions: `Received invalid folder ID: ${folderId}.`
|
|
26274
26318
|
});
|
|
26275
|
-
|
|
26319
|
+
processContext.exit(1);
|
|
26276
26320
|
return;
|
|
26277
26321
|
}
|
|
26278
26322
|
const [apiError, api2] = await catchError(createApiClient(JobsApi, {
|
|
@@ -26285,7 +26329,7 @@ var registerJobsCommand = (program) => {
|
|
|
26285
26329
|
Message: "Error listing jobs",
|
|
26286
26330
|
Instructions: apiError.message
|
|
26287
26331
|
});
|
|
26288
|
-
|
|
26332
|
+
processContext.exit(1);
|
|
26289
26333
|
return;
|
|
26290
26334
|
}
|
|
26291
26335
|
const [error48, result] = await catchError(api2.jobsGet({
|
|
@@ -26302,7 +26346,7 @@ var registerJobsCommand = (program) => {
|
|
|
26302
26346
|
Message: "Error listing jobs",
|
|
26303
26347
|
Instructions: errorMessage
|
|
26304
26348
|
});
|
|
26305
|
-
|
|
26349
|
+
processContext.exit(1);
|
|
26306
26350
|
return;
|
|
26307
26351
|
}
|
|
26308
26352
|
if (result.value && result.value.length > 0) {
|
|
@@ -26322,7 +26366,7 @@ var registerJobsCommand = (program) => {
|
|
|
26322
26366
|
});
|
|
26323
26367
|
}
|
|
26324
26368
|
});
|
|
26325
|
-
jobs.command("get").description("Get job by ID").argument("<folder-id>", "Folder (organization unit) ID").argument("<job-id>", "Job ID").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("--expand <expand>", "OData $expand expression").
|
|
26369
|
+
jobs.command("get").description("Get job by ID").argument("<folder-id>", "Folder (organization unit) ID").argument("<job-id>", "Job ID").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("--expand <expand>", "OData $expand expression").trackedAction(processContext, async (folderId, jobId, options) => {
|
|
26326
26370
|
const parsedFolderId = parseInt(folderId, 10);
|
|
26327
26371
|
if (Number.isNaN(parsedFolderId)) {
|
|
26328
26372
|
OutputFormatter.error({
|
|
@@ -26330,7 +26374,7 @@ var registerJobsCommand = (program) => {
|
|
|
26330
26374
|
Message: "Error getting job",
|
|
26331
26375
|
Instructions: `Received invalid folder ID: ${folderId}.`
|
|
26332
26376
|
});
|
|
26333
|
-
|
|
26377
|
+
processContext.exit(1);
|
|
26334
26378
|
return;
|
|
26335
26379
|
}
|
|
26336
26380
|
const [apiError, api2] = await catchError(createApiClient(JobsApi, {
|
|
@@ -26343,7 +26387,7 @@ var registerJobsCommand = (program) => {
|
|
|
26343
26387
|
Message: `Error getting job: ${apiError.message}`,
|
|
26344
26388
|
Instructions: apiError.message
|
|
26345
26389
|
});
|
|
26346
|
-
|
|
26390
|
+
processContext.exit(1);
|
|
26347
26391
|
return;
|
|
26348
26392
|
}
|
|
26349
26393
|
const [error48, job] = await catchError(api2.jobsGetById({
|
|
@@ -26357,7 +26401,7 @@ var registerJobsCommand = (program) => {
|
|
|
26357
26401
|
Message: `Error getting job: ${errorMessage}`,
|
|
26358
26402
|
Instructions: `${error48 instanceof Error ? error48.message : String(error48)}`
|
|
26359
26403
|
});
|
|
26360
|
-
|
|
26404
|
+
processContext.exit(1);
|
|
26361
26405
|
return;
|
|
26362
26406
|
}
|
|
26363
26407
|
OutputFormatter.success({
|
|
@@ -26382,7 +26426,7 @@ var registerJobsCommand = (program) => {
|
|
|
26382
26426
|
}
|
|
26383
26427
|
});
|
|
26384
26428
|
});
|
|
26385
|
-
jobs.command("start").description("Start a job for a given release").argument("<folder-id>", "Folder (organization unit) ID").argument("<release-key>", "Release key (UUID) to start").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("--strategy <strategy>", "Execution strategy (ModernJobsCount, All, Specific, JobsCount)", "ModernJobsCount").option("--jobs-count <number>", "Number of jobs to create (for JobsCount/ModernJobsCount strategy)", "1").option("--input-arguments <json>", "Input arguments as JSON string").option("--job-priority <priority>", "Job priority (Low, Normal, High)").option("--reference <reference>", "User-specified reference for the job").
|
|
26429
|
+
jobs.command("start").description("Start a job for a given release").argument("<folder-id>", "Folder (organization unit) ID").argument("<release-key>", "Release key (UUID) to start").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("--strategy <strategy>", "Execution strategy (ModernJobsCount, All, Specific, JobsCount)", "ModernJobsCount").option("--jobs-count <number>", "Number of jobs to create (for JobsCount/ModernJobsCount strategy)", "1").option("--input-arguments <json>", "Input arguments as JSON string").option("--job-priority <priority>", "Job priority (Low, Normal, High)").option("--reference <reference>", "User-specified reference for the job").trackedAction(processContext, async (folderId, releaseKey, options) => {
|
|
26386
26430
|
const parsedFolderId = parseInt(folderId, 10);
|
|
26387
26431
|
if (Number.isNaN(parsedFolderId)) {
|
|
26388
26432
|
OutputFormatter.error({
|
|
@@ -26390,7 +26434,7 @@ var registerJobsCommand = (program) => {
|
|
|
26390
26434
|
Message: "Error starting job",
|
|
26391
26435
|
Instructions: `Received invalid folder ID: ${folderId}.`
|
|
26392
26436
|
});
|
|
26393
|
-
|
|
26437
|
+
processContext.exit(1);
|
|
26394
26438
|
return;
|
|
26395
26439
|
}
|
|
26396
26440
|
const [apiError, api2] = await catchError(createApiClient(JobsApi, {
|
|
@@ -26403,7 +26447,7 @@ var registerJobsCommand = (program) => {
|
|
|
26403
26447
|
Message: `Error starting job: ${apiError.message}`,
|
|
26404
26448
|
Instructions: apiError.message
|
|
26405
26449
|
});
|
|
26406
|
-
|
|
26450
|
+
processContext.exit(1);
|
|
26407
26451
|
return;
|
|
26408
26452
|
}
|
|
26409
26453
|
const startInfo = {
|
|
@@ -26426,7 +26470,7 @@ var registerJobsCommand = (program) => {
|
|
|
26426
26470
|
Message: `Error starting job: ${errorMessage}`,
|
|
26427
26471
|
Instructions: `${error48 instanceof Error ? error48.message : String(error48)}`
|
|
26428
26472
|
});
|
|
26429
|
-
|
|
26473
|
+
processContext.exit(1);
|
|
26430
26474
|
return;
|
|
26431
26475
|
}
|
|
26432
26476
|
if (result.value && result.value.length > 0) {
|
|
@@ -26444,7 +26488,7 @@ var registerJobsCommand = (program) => {
|
|
|
26444
26488
|
});
|
|
26445
26489
|
}
|
|
26446
26490
|
});
|
|
26447
|
-
jobs.command("stop").description("Stop a job by ID").argument("<folder-id>", "Folder (organization unit) ID").argument("<job-id>", "Job ID to stop").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("--strategy <strategy>", "Stop strategy (SoftStop, Kill)", "SoftStop").
|
|
26491
|
+
jobs.command("stop").description("Stop a job by ID").argument("<folder-id>", "Folder (organization unit) ID").argument("<job-id>", "Job ID to stop").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("--strategy <strategy>", "Stop strategy (SoftStop, Kill)", "SoftStop").trackedAction(processContext, async (folderId, jobId, options) => {
|
|
26448
26492
|
const parsedFolderId = parseInt(folderId, 10);
|
|
26449
26493
|
if (Number.isNaN(parsedFolderId)) {
|
|
26450
26494
|
OutputFormatter.error({
|
|
@@ -26452,7 +26496,7 @@ var registerJobsCommand = (program) => {
|
|
|
26452
26496
|
Message: "Error stopping job",
|
|
26453
26497
|
Instructions: `Received invalid folder ID: ${folderId}.`
|
|
26454
26498
|
});
|
|
26455
|
-
|
|
26499
|
+
processContext.exit(1);
|
|
26456
26500
|
return;
|
|
26457
26501
|
}
|
|
26458
26502
|
const [apiError, api2] = await catchError(createApiClient(JobsApi, {
|
|
@@ -26465,7 +26509,7 @@ var registerJobsCommand = (program) => {
|
|
|
26465
26509
|
Message: `Error stopping job: ${apiError.message}`,
|
|
26466
26510
|
Instructions: apiError.message
|
|
26467
26511
|
});
|
|
26468
|
-
|
|
26512
|
+
processContext.exit(1);
|
|
26469
26513
|
return;
|
|
26470
26514
|
}
|
|
26471
26515
|
const body = {
|
|
@@ -26482,7 +26526,7 @@ var registerJobsCommand = (program) => {
|
|
|
26482
26526
|
Message: `Error stopping job: ${errorMessage}`,
|
|
26483
26527
|
Instructions: `${error48 instanceof Error ? error48.message : String(error48)}`
|
|
26484
26528
|
});
|
|
26485
|
-
|
|
26529
|
+
processContext.exit(1);
|
|
26486
26530
|
return;
|
|
26487
26531
|
}
|
|
26488
26532
|
OutputFormatter.success({
|
|
@@ -26495,7 +26539,7 @@ var registerJobsCommand = (program) => {
|
|
|
26495
26539
|
}
|
|
26496
26540
|
});
|
|
26497
26541
|
});
|
|
26498
|
-
jobs.command("stop-multiple").description("Stop multiple jobs by IDs").argument("<folder-id>", "Folder (organization unit) ID").argument("<job-ids>", "Comma-separated list of job IDs to stop").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("--strategy <strategy>", "Stop strategy (SoftStop, Kill)", "SoftStop").
|
|
26542
|
+
jobs.command("stop-multiple").description("Stop multiple jobs by IDs").argument("<folder-id>", "Folder (organization unit) ID").argument("<job-ids>", "Comma-separated list of job IDs to stop").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("--strategy <strategy>", "Stop strategy (SoftStop, Kill)", "SoftStop").trackedAction(processContext, async (folderId, jobIdsArg, options) => {
|
|
26499
26543
|
const parsedFolderId = parseInt(folderId, 10);
|
|
26500
26544
|
if (Number.isNaN(parsedFolderId)) {
|
|
26501
26545
|
OutputFormatter.error({
|
|
@@ -26503,7 +26547,7 @@ var registerJobsCommand = (program) => {
|
|
|
26503
26547
|
Message: "Error stopping jobs",
|
|
26504
26548
|
Instructions: `Received invalid folder ID: ${folderId}.`
|
|
26505
26549
|
});
|
|
26506
|
-
|
|
26550
|
+
processContext.exit(1);
|
|
26507
26551
|
return;
|
|
26508
26552
|
}
|
|
26509
26553
|
const jobIds = jobIdsArg.split(",").map((id) => parseInt(id.trim(), 10));
|
|
@@ -26513,7 +26557,7 @@ var registerJobsCommand = (program) => {
|
|
|
26513
26557
|
Message: "Error stopping jobs",
|
|
26514
26558
|
Instructions: `Received invalid job IDs: ${jobIdsArg}. Expected comma-separated numbers.`
|
|
26515
26559
|
});
|
|
26516
|
-
|
|
26560
|
+
processContext.exit(1);
|
|
26517
26561
|
return;
|
|
26518
26562
|
}
|
|
26519
26563
|
const [apiError, api2] = await catchError(createApiClient(JobsApi, {
|
|
@@ -26526,7 +26570,7 @@ var registerJobsCommand = (program) => {
|
|
|
26526
26570
|
Message: `Error stopping jobs: ${apiError.message}`,
|
|
26527
26571
|
Instructions: apiError.message
|
|
26528
26572
|
});
|
|
26529
|
-
|
|
26573
|
+
processContext.exit(1);
|
|
26530
26574
|
return;
|
|
26531
26575
|
}
|
|
26532
26576
|
const body = {
|
|
@@ -26541,7 +26585,7 @@ var registerJobsCommand = (program) => {
|
|
|
26541
26585
|
Message: `Error stopping jobs: ${errorMessage}`,
|
|
26542
26586
|
Instructions: `${error48 instanceof Error ? error48.message : String(error48)}`
|
|
26543
26587
|
});
|
|
26544
|
-
|
|
26588
|
+
processContext.exit(1);
|
|
26545
26589
|
return;
|
|
26546
26590
|
}
|
|
26547
26591
|
OutputFormatter.success({
|
|
@@ -26554,7 +26598,7 @@ var registerJobsCommand = (program) => {
|
|
|
26554
26598
|
}
|
|
26555
26599
|
});
|
|
26556
26600
|
});
|
|
26557
|
-
jobs.command("restart").description("Restart a faulted or stopped job").argument("<folder-id>", "Folder (organization unit) ID").argument("<job-id>", "Job ID to restart").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").
|
|
26601
|
+
jobs.command("restart").description("Restart a faulted or stopped job").argument("<folder-id>", "Folder (organization unit) ID").argument("<job-id>", "Job ID to restart").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").trackedAction(processContext, async (folderId, jobId, options) => {
|
|
26558
26602
|
const parsedFolderId = parseInt(folderId, 10);
|
|
26559
26603
|
if (Number.isNaN(parsedFolderId)) {
|
|
26560
26604
|
OutputFormatter.error({
|
|
@@ -26562,7 +26606,7 @@ var registerJobsCommand = (program) => {
|
|
|
26562
26606
|
Message: "Error restarting job",
|
|
26563
26607
|
Instructions: `Received invalid folder ID: ${folderId}.`
|
|
26564
26608
|
});
|
|
26565
|
-
|
|
26609
|
+
processContext.exit(1);
|
|
26566
26610
|
return;
|
|
26567
26611
|
}
|
|
26568
26612
|
const [apiError, api2] = await catchError(createApiClient(JobsApi, {
|
|
@@ -26575,7 +26619,7 @@ var registerJobsCommand = (program) => {
|
|
|
26575
26619
|
Message: `Error restarting job: ${apiError.message}`,
|
|
26576
26620
|
Instructions: apiError.message
|
|
26577
26621
|
});
|
|
26578
|
-
|
|
26622
|
+
processContext.exit(1);
|
|
26579
26623
|
return;
|
|
26580
26624
|
}
|
|
26581
26625
|
const body = {
|
|
@@ -26589,7 +26633,7 @@ var registerJobsCommand = (program) => {
|
|
|
26589
26633
|
Message: `Error restarting job: ${errorMessage}`,
|
|
26590
26634
|
Instructions: `${error48 instanceof Error ? error48.message : String(error48)}`
|
|
26591
26635
|
});
|
|
26592
|
-
|
|
26636
|
+
processContext.exit(1);
|
|
26593
26637
|
return;
|
|
26594
26638
|
}
|
|
26595
26639
|
OutputFormatter.success({
|
|
@@ -26603,7 +26647,7 @@ var registerJobsCommand = (program) => {
|
|
|
26603
26647
|
}
|
|
26604
26648
|
});
|
|
26605
26649
|
});
|
|
26606
|
-
jobs.command("resume").description("Resume a suspended job").argument("<folder-id>", "Folder (organization unit) ID").argument("<job-key>", "Job key (UUID) to resume").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("--input-arguments <json>", "Input arguments as JSON string").
|
|
26650
|
+
jobs.command("resume").description("Resume a suspended job").argument("<folder-id>", "Folder (organization unit) ID").argument("<job-key>", "Job key (UUID) to resume").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("--input-arguments <json>", "Input arguments as JSON string").trackedAction(processContext, async (folderId, jobKey, options) => {
|
|
26607
26651
|
const parsedFolderId = parseInt(folderId, 10);
|
|
26608
26652
|
if (Number.isNaN(parsedFolderId)) {
|
|
26609
26653
|
OutputFormatter.error({
|
|
@@ -26611,7 +26655,7 @@ var registerJobsCommand = (program) => {
|
|
|
26611
26655
|
Message: "Error resuming job",
|
|
26612
26656
|
Instructions: `Received invalid folder ID: ${folderId}.`
|
|
26613
26657
|
});
|
|
26614
|
-
|
|
26658
|
+
processContext.exit(1);
|
|
26615
26659
|
return;
|
|
26616
26660
|
}
|
|
26617
26661
|
const [apiError, api2] = await catchError(createApiClient(JobsApi, {
|
|
@@ -26624,7 +26668,7 @@ var registerJobsCommand = (program) => {
|
|
|
26624
26668
|
Message: `Error resuming job: ${apiError.message}`,
|
|
26625
26669
|
Instructions: apiError.message
|
|
26626
26670
|
});
|
|
26627
|
-
|
|
26671
|
+
processContext.exit(1);
|
|
26628
26672
|
return;
|
|
26629
26673
|
}
|
|
26630
26674
|
const body = {
|
|
@@ -26639,7 +26683,7 @@ var registerJobsCommand = (program) => {
|
|
|
26639
26683
|
Message: `Error resuming job: ${errorMessage}`,
|
|
26640
26684
|
Instructions: `${error48 instanceof Error ? error48.message : String(error48)}`
|
|
26641
26685
|
});
|
|
26642
|
-
|
|
26686
|
+
processContext.exit(1);
|
|
26643
26687
|
return;
|
|
26644
26688
|
}
|
|
26645
26689
|
OutputFormatter.success({
|
|
@@ -26674,7 +26718,7 @@ function formatProcess(proc) {
|
|
|
26674
26718
|
}
|
|
26675
26719
|
var registerProcessesCommand = (program) => {
|
|
26676
26720
|
const processes = program.command("processes").description("Manage UiPath Orchestrator processes (packages)").option("--format <format>", "Output format (table, json, yaml, plain)", "table");
|
|
26677
|
-
processes.command("list").description("List all processes").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("-s, --search <term>", "Search term").option("--feed-id <feedId>", "Feed ID").option("-f, --filter <filter>", "OData filter").option("-l, --limit <number>", "Number of items to return",
|
|
26721
|
+
processes.command("list").description("List all processes").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("-s, --search <term>", "Search term").option("--feed-id <feedId>", "Feed ID").option("-f, --filter <filter>", "OData filter").option("-l, --limit <number>", "Number of items to return", String(DEFAULT_PAGE_SIZE)).option("--offset <number>", "Number of items to skip", "0").option("--order-by <orderby>", "OData $orderby expression").option("--expand <expand>", "OData $expand expression").trackedAction(processContext, async (options) => {
|
|
26678
26722
|
const [apiError, api2] = await catchError(createApiClient(ProcessesApi, {
|
|
26679
26723
|
tenant: options.tenant
|
|
26680
26724
|
}));
|
|
@@ -26684,7 +26728,7 @@ var registerProcessesCommand = (program) => {
|
|
|
26684
26728
|
Message: "Error listing processes",
|
|
26685
26729
|
Instructions: apiError.message
|
|
26686
26730
|
});
|
|
26687
|
-
|
|
26731
|
+
processContext.exit(1);
|
|
26688
26732
|
return;
|
|
26689
26733
|
}
|
|
26690
26734
|
const [error48, result] = await catchError(api2.processesGet({
|
|
@@ -26703,7 +26747,7 @@ var registerProcessesCommand = (program) => {
|
|
|
26703
26747
|
Message: "Error listing processes",
|
|
26704
26748
|
Instructions: errorMessage
|
|
26705
26749
|
});
|
|
26706
|
-
|
|
26750
|
+
processContext.exit(1);
|
|
26707
26751
|
return;
|
|
26708
26752
|
}
|
|
26709
26753
|
if (result.value && result.value.length > 0) {
|
|
@@ -26723,7 +26767,7 @@ var registerProcessesCommand = (program) => {
|
|
|
26723
26767
|
});
|
|
26724
26768
|
}
|
|
26725
26769
|
});
|
|
26726
|
-
processes.command("get").description("Get a specific process version by key").argument("<key>", 'Process version key (format: "ProcessId:Version")').option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("--feed-id <feedId>", "Feed ID").option("--expand <expand>", "OData $expand expression").
|
|
26770
|
+
processes.command("get").description("Get a specific process version by key").argument("<key>", 'Process version key (format: "ProcessId:Version")').option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("--feed-id <feedId>", "Feed ID").option("--expand <expand>", "OData $expand expression").trackedAction(processContext, async (key, options) => {
|
|
26727
26771
|
const [apiError, api2] = await catchError(createApiClient(ProcessesApi, {
|
|
26728
26772
|
tenant: options.tenant
|
|
26729
26773
|
}));
|
|
@@ -26733,7 +26777,7 @@ var registerProcessesCommand = (program) => {
|
|
|
26733
26777
|
Message: "Error getting process",
|
|
26734
26778
|
Instructions: apiError.message
|
|
26735
26779
|
});
|
|
26736
|
-
|
|
26780
|
+
processContext.exit(1);
|
|
26737
26781
|
return;
|
|
26738
26782
|
}
|
|
26739
26783
|
const [error48, proc] = await catchError(api2.processesGetProcessVersionByKey({
|
|
@@ -26748,7 +26792,7 @@ var registerProcessesCommand = (program) => {
|
|
|
26748
26792
|
Message: `Error getting process: ${errorMessage}`,
|
|
26749
26793
|
Instructions: `${error48 instanceof Error ? error48.message : String(error48)}`
|
|
26750
26794
|
});
|
|
26751
|
-
|
|
26795
|
+
processContext.exit(1);
|
|
26752
26796
|
return;
|
|
26753
26797
|
}
|
|
26754
26798
|
OutputFormatter.success({
|
|
@@ -26770,7 +26814,7 @@ var registerProcessesCommand = (program) => {
|
|
|
26770
26814
|
}
|
|
26771
26815
|
});
|
|
26772
26816
|
});
|
|
26773
|
-
processes.command("versions").description("List all versions of a process").argument("<process-id>", "Process ID").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("--feed-id <feedId>", "Feed ID").option("-f, --filter <filter>", "OData filter").option("-l, --limit <number>", "Number of items to return",
|
|
26817
|
+
processes.command("versions").description("List all versions of a process").argument("<process-id>", "Process ID").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("--feed-id <feedId>", "Feed ID").option("-f, --filter <filter>", "OData filter").option("-l, --limit <number>", "Number of items to return", String(DEFAULT_PAGE_SIZE)).option("--offset <number>", "Number of items to skip", "0").option("--order-by <orderby>", "OData $orderby expression").option("--expand <expand>", "OData $expand expression").trackedAction(processContext, async (processId, options) => {
|
|
26774
26818
|
const [apiError, api2] = await catchError(createApiClient(ProcessesApi, {
|
|
26775
26819
|
tenant: options.tenant
|
|
26776
26820
|
}));
|
|
@@ -26780,7 +26824,7 @@ var registerProcessesCommand = (program) => {
|
|
|
26780
26824
|
Message: "Error listing process versions",
|
|
26781
26825
|
Instructions: apiError.message
|
|
26782
26826
|
});
|
|
26783
|
-
|
|
26827
|
+
processContext.exit(1);
|
|
26784
26828
|
return;
|
|
26785
26829
|
}
|
|
26786
26830
|
const [error48, result] = await catchError(api2.processesGetProcessVersionsByProcessid({
|
|
@@ -26799,7 +26843,7 @@ var registerProcessesCommand = (program) => {
|
|
|
26799
26843
|
Message: "Error listing process versions",
|
|
26800
26844
|
Instructions: errorMessage
|
|
26801
26845
|
});
|
|
26802
|
-
|
|
26846
|
+
processContext.exit(1);
|
|
26803
26847
|
return;
|
|
26804
26848
|
}
|
|
26805
26849
|
if (result.value && result.value.length > 0) {
|
|
@@ -26836,7 +26880,7 @@ function formatRelease(release) {
|
|
|
26836
26880
|
}
|
|
26837
26881
|
var registerReleasesCommand = (program) => {
|
|
26838
26882
|
const releases = program.command("releases").description("Manage UiPath Orchestrator releases").option("--format <format>", "Output format (table, json, yaml, plain)", "table");
|
|
26839
|
-
releases.command("list").description("List all releases").argument("<folder-id>", "Folder (organization unit) ID").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("-f, --filter <filter>", "OData filter").option("-l, --limit <number>", "Number of items to return",
|
|
26883
|
+
releases.command("list").description("List all releases").argument("<folder-id>", "Folder (organization unit) ID").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth").option("-f, --filter <filter>", "OData filter").option("-l, --limit <number>", "Number of items to return", String(DEFAULT_PAGE_SIZE)).option("--offset <number>", "Number of items to skip", "0").option("--order-by <orderby>", "OData $orderby expression").option("--expand <expand>", "OData $expand expression").trackedAction(processContext, async (folderId, options) => {
|
|
26840
26884
|
const parsedFolderId = parseInt(folderId, 10);
|
|
26841
26885
|
if (Number.isNaN(parsedFolderId)) {
|
|
26842
26886
|
OutputFormatter.error({
|
|
@@ -26844,7 +26888,7 @@ var registerReleasesCommand = (program) => {
|
|
|
26844
26888
|
Message: "Error listing releases",
|
|
26845
26889
|
Instructions: `Received invalid folder ID: ${folderId}.`
|
|
26846
26890
|
});
|
|
26847
|
-
|
|
26891
|
+
processContext.exit(1);
|
|
26848
26892
|
return;
|
|
26849
26893
|
}
|
|
26850
26894
|
const [apiError, api2] = await catchError(createApiClient(ReleasesApi, {
|
|
@@ -26857,7 +26901,7 @@ var registerReleasesCommand = (program) => {
|
|
|
26857
26901
|
Message: "Error listing releases",
|
|
26858
26902
|
Instructions: apiError.message
|
|
26859
26903
|
});
|
|
26860
|
-
|
|
26904
|
+
processContext.exit(1);
|
|
26861
26905
|
return;
|
|
26862
26906
|
}
|
|
26863
26907
|
const [error48, result] = await catchError(api2.releasesGet({
|
|
@@ -26874,7 +26918,7 @@ var registerReleasesCommand = (program) => {
|
|
|
26874
26918
|
Message: "Error listing releases",
|
|
26875
26919
|
Instructions: errorMessage
|
|
26876
26920
|
});
|
|
26877
|
-
|
|
26921
|
+
processContext.exit(1);
|
|
26878
26922
|
return;
|
|
26879
26923
|
}
|
|
26880
26924
|
if (result.value && result.value.length > 0) {
|
|
@@ -26900,7 +26944,7 @@ var registerReleasesCommand = (program) => {
|
|
|
26900
26944
|
var metadata = {
|
|
26901
26945
|
name: "orchestrator-tool",
|
|
26902
26946
|
version: package_default.version,
|
|
26903
|
-
description: "
|
|
26947
|
+
description: "Manage Orchestrator folders, jobs, processes, and releases.",
|
|
26904
26948
|
commandPrefix: "or"
|
|
26905
26949
|
};
|
|
26906
26950
|
var registerCommands = async (program) => {
|