@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/index.js
CHANGED
|
@@ -6,25 +6,43 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
6
6
|
var __defProp = Object.defineProperty;
|
|
7
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
function __accessProp(key) {
|
|
10
|
+
return this[key];
|
|
11
|
+
}
|
|
12
|
+
var __toESMCache_node;
|
|
13
|
+
var __toESMCache_esm;
|
|
9
14
|
var __toESM = (mod, isNodeMode, target) => {
|
|
15
|
+
var canCache = mod != null && typeof mod === "object";
|
|
16
|
+
if (canCache) {
|
|
17
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
18
|
+
var cached = cache.get(mod);
|
|
19
|
+
if (cached)
|
|
20
|
+
return cached;
|
|
21
|
+
}
|
|
10
22
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
11
23
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
12
24
|
for (let key of __getOwnPropNames(mod))
|
|
13
25
|
if (!__hasOwnProp.call(to, key))
|
|
14
26
|
__defProp(to, key, {
|
|
15
|
-
get: (
|
|
27
|
+
get: __accessProp.bind(mod, key),
|
|
16
28
|
enumerable: true
|
|
17
29
|
});
|
|
30
|
+
if (canCache)
|
|
31
|
+
cache.set(mod, to);
|
|
18
32
|
return to;
|
|
19
33
|
};
|
|
20
34
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
35
|
+
var __returnValue = (v) => v;
|
|
36
|
+
function __exportSetter(name, newValue) {
|
|
37
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
38
|
+
}
|
|
21
39
|
var __export = (target, all) => {
|
|
22
40
|
for (var name in all)
|
|
23
41
|
__defProp(target, name, {
|
|
24
42
|
get: all[name],
|
|
25
43
|
enumerable: true,
|
|
26
44
|
configurable: true,
|
|
27
|
-
set: (
|
|
45
|
+
set: __exportSetter.bind(all, name)
|
|
28
46
|
});
|
|
29
47
|
};
|
|
30
48
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -6776,7 +6794,7 @@ class SimpleLogger {
|
|
|
6776
6794
|
return 0 /* DEBUG */;
|
|
6777
6795
|
}
|
|
6778
6796
|
} catch {}
|
|
6779
|
-
return
|
|
6797
|
+
return DEFAULT_LOG_LEVEL;
|
|
6780
6798
|
}
|
|
6781
6799
|
static parseLevel(value) {
|
|
6782
6800
|
switch (value.toLowerCase()) {
|
|
@@ -6909,7 +6927,7 @@ class SimpleLogger {
|
|
|
6909
6927
|
function getLogFilePath() {
|
|
6910
6928
|
return logger.getLogFilePath();
|
|
6911
6929
|
}
|
|
6912
|
-
var GLOBAL_KEY = "__uipcli_log_file_path__", logger;
|
|
6930
|
+
var GLOBAL_KEY = "__uipcli_log_file_path__", DEFAULT_LOG_LEVEL = 3 /* ERROR */, logger;
|
|
6913
6931
|
var init_logger = __esm(() => {
|
|
6914
6932
|
init_output_context();
|
|
6915
6933
|
logger = SimpleLogger.getInstance();
|
|
@@ -7180,7 +7198,7 @@ var init_telemetry = __esm(() => {
|
|
|
7180
7198
|
init_logger_telemetry_provider();
|
|
7181
7199
|
init_node_appinsights_telemetry_provider();
|
|
7182
7200
|
sessionId = getOrCreateSessionId();
|
|
7183
|
-
DEFAULT_AI_CONNECTION_STRING = Buffer.from("
|
|
7201
|
+
DEFAULT_AI_CONNECTION_STRING = Buffer.from("SW5zdHJ1bWVudGF0aW9uS2V5PTliZDM3NDgyLTgxMGUtNDQyYS1hYWE2LWQzOGVmNjVjNjY3NDtJbmdlc3Rpb25FbmRwb2ludD1odHRwczovL3dlc3RldXJvcGUtNS5pbi5hcHBsaWNhdGlvbmluc2lnaHRzLmF6dXJlLmNvbS87TGl2ZUVuZHBvaW50PWh0dHBzOi8vd2VzdGV1cm9wZS5saXZlZGlhZ25vc3RpY3MubW9uaXRvci5henVyZS5jb20vO0FwcGxpY2F0aW9uSWQ9MzU2OTdlZjEtOGJkMC00ZjE5LWEyN2MtZDg3Y2NhYzY2ZDJj", "base64").toString("utf-8");
|
|
7184
7202
|
telemetry = new Proxy({}, {
|
|
7185
7203
|
get(_, prop) {
|
|
7186
7204
|
const instance = getTelemetryInstance();
|
|
@@ -7194,7 +7212,7 @@ var init_telemetry = __esm(() => {
|
|
|
7194
7212
|
var CommonTelemetryEvents;
|
|
7195
7213
|
var init_telemetry_events = __esm(() => {
|
|
7196
7214
|
CommonTelemetryEvents = {
|
|
7197
|
-
Error: "
|
|
7215
|
+
Error: "uip.error"
|
|
7198
7216
|
};
|
|
7199
7217
|
});
|
|
7200
7218
|
|
|
@@ -7245,11 +7263,6 @@ function logOutput(data, format = "table") {
|
|
|
7245
7263
|
printOutput(data, format, (msg) => sink.writeOut(`${msg}
|
|
7246
7264
|
`));
|
|
7247
7265
|
}
|
|
7248
|
-
function errorOutput(data, format = "table") {
|
|
7249
|
-
const sink = getOutputSink();
|
|
7250
|
-
printOutput(data, format, (msg) => sink.writeErr(`${msg}
|
|
7251
|
-
`));
|
|
7252
|
-
}
|
|
7253
7266
|
function printTable(data, logFn = console.log, externalLogValue) {
|
|
7254
7267
|
if (data.length === 0)
|
|
7255
7268
|
return;
|
|
@@ -7312,7 +7325,7 @@ var init_formatter = __esm(() => {
|
|
|
7312
7325
|
result: data.Result,
|
|
7313
7326
|
message: data.Message
|
|
7314
7327
|
});
|
|
7315
|
-
|
|
7328
|
+
logOutput(data, getOutputFormat());
|
|
7316
7329
|
}
|
|
7317
7330
|
OutputFormatter.error = error;
|
|
7318
7331
|
function log(data) {
|
|
@@ -7350,6 +7363,12 @@ var init_command_help = __esm(() => {
|
|
|
7350
7363
|
init_output_format_context();
|
|
7351
7364
|
});
|
|
7352
7365
|
|
|
7366
|
+
// ../common/src/constants.ts
|
|
7367
|
+
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;
|
|
7368
|
+
var init_constants = __esm(() => {
|
|
7369
|
+
DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
|
|
7370
|
+
});
|
|
7371
|
+
|
|
7353
7372
|
// ../../node_modules/jsonpath-plus/dist/index-node-esm.js
|
|
7354
7373
|
import vm from "vm";
|
|
7355
7374
|
|
|
@@ -8755,13 +8774,36 @@ var init_jsonpath = __esm(() => {
|
|
|
8755
8774
|
init_index_node_esm();
|
|
8756
8775
|
});
|
|
8757
8776
|
// ../common/src/trackedAction.ts
|
|
8777
|
+
function deriveCommandPath(cmd) {
|
|
8778
|
+
const parts = [];
|
|
8779
|
+
let current = cmd;
|
|
8780
|
+
while (current) {
|
|
8781
|
+
const name = current.name();
|
|
8782
|
+
if (name) {
|
|
8783
|
+
parts.unshift(name);
|
|
8784
|
+
}
|
|
8785
|
+
current = current.parent;
|
|
8786
|
+
}
|
|
8787
|
+
if (parts.length > 1) {
|
|
8788
|
+
parts.shift();
|
|
8789
|
+
}
|
|
8790
|
+
return ["uip", ...parts.filter((p) => p !== "uip")].join(".");
|
|
8791
|
+
}
|
|
8792
|
+
var processContext;
|
|
8758
8793
|
var init_trackedAction = __esm(() => {
|
|
8759
8794
|
init_esm();
|
|
8760
8795
|
init_formatter();
|
|
8761
8796
|
init_logger();
|
|
8762
8797
|
init_telemetry();
|
|
8763
|
-
|
|
8798
|
+
processContext = {
|
|
8799
|
+
exit: (code) => {
|
|
8800
|
+
process.exitCode = code;
|
|
8801
|
+
}
|
|
8802
|
+
};
|
|
8803
|
+
Command2.prototype.trackedAction = function(context, fn, properties) {
|
|
8804
|
+
const command = this;
|
|
8764
8805
|
return this.action(async (...args) => {
|
|
8806
|
+
const telemetryName = deriveCommandPath(command);
|
|
8765
8807
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
8766
8808
|
const startTime = performance.now();
|
|
8767
8809
|
let errorMessage;
|
|
@@ -8792,6 +8834,7 @@ var init_trackedAction = __esm(() => {
|
|
|
8792
8834
|
var init_src = __esm(() => {
|
|
8793
8835
|
init_node_appinsights_telemetry_provider();
|
|
8794
8836
|
init_command_help();
|
|
8837
|
+
init_constants();
|
|
8795
8838
|
init_formatter();
|
|
8796
8839
|
init_jsonpath();
|
|
8797
8840
|
init_logger();
|
|
@@ -8799,7 +8842,6 @@ var init_src = __esm(() => {
|
|
|
8799
8842
|
init_output_format_context();
|
|
8800
8843
|
init_registry();
|
|
8801
8844
|
init_telemetry();
|
|
8802
|
-
init_telemetry_events();
|
|
8803
8845
|
init_trackedAction();
|
|
8804
8846
|
});
|
|
8805
8847
|
|
|
@@ -9646,8 +9688,8 @@ var {
|
|
|
9646
9688
|
// package.json
|
|
9647
9689
|
var package_default = {
|
|
9648
9690
|
name: "@uipath/orchestrator-tool",
|
|
9649
|
-
version: "0.1.
|
|
9650
|
-
description: "
|
|
9691
|
+
version: "0.1.7",
|
|
9692
|
+
description: "Manage Orchestrator folders, jobs, processes, and releases.",
|
|
9651
9693
|
private: false,
|
|
9652
9694
|
maintainers: [
|
|
9653
9695
|
"aoltean16",
|
|
@@ -9660,7 +9702,7 @@ var package_default = {
|
|
|
9660
9702
|
directory: "packages/orchestrator-tool"
|
|
9661
9703
|
},
|
|
9662
9704
|
publishConfig: {
|
|
9663
|
-
registry: "https://
|
|
9705
|
+
registry: "https://registry.npmjs.org/"
|
|
9664
9706
|
},
|
|
9665
9707
|
keywords: [
|
|
9666
9708
|
"uipcli-tool"
|
|
@@ -9680,8 +9722,7 @@ var package_default = {
|
|
|
9680
9722
|
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",
|
|
9681
9723
|
package: "bun run build && bun pm pack",
|
|
9682
9724
|
lint: "biome check .",
|
|
9683
|
-
"lint:fix": "biome check --write ."
|
|
9684
|
-
e2e: "vitest run --config ../../vitest.e2e.base.config.ts"
|
|
9725
|
+
"lint:fix": "biome check --write ."
|
|
9685
9726
|
},
|
|
9686
9727
|
dependencies: {
|
|
9687
9728
|
commander: "^14.0.3"
|
|
@@ -13408,6 +13449,12 @@ class ReleasesApi extends BaseAPI {
|
|
|
13408
13449
|
return await response.value();
|
|
13409
13450
|
}
|
|
13410
13451
|
}
|
|
13452
|
+
// ../auth/src/index.ts
|
|
13453
|
+
init_src();
|
|
13454
|
+
|
|
13455
|
+
// ../auth/src/config.ts
|
|
13456
|
+
init_src();
|
|
13457
|
+
|
|
13411
13458
|
// ../auth/src/utils/loadConfig.ts
|
|
13412
13459
|
init_src();
|
|
13413
13460
|
|
|
@@ -26994,11 +27041,11 @@ var loadConfigAsync = async () => {
|
|
|
26994
27041
|
const fs7 = await getFs();
|
|
26995
27042
|
let configPath = fs7.env.getenv("UIPATH_CONFIG_PATH");
|
|
26996
27043
|
if (!configPath) {
|
|
26997
|
-
const localPath = fs7.path.join(fs7.env.cwd(),
|
|
27044
|
+
const localPath = fs7.path.join(fs7.env.cwd(), LOCAL_CONFIG_FILENAME);
|
|
26998
27045
|
if (await fs7.exists(localPath)) {
|
|
26999
27046
|
configPath = localPath;
|
|
27000
27047
|
} else {
|
|
27001
|
-
configPath = fs7.path.join(fs7.env.homedir(),
|
|
27048
|
+
configPath = fs7.path.join(fs7.env.homedir(), UIPATH_HOME_DIR, CONFIG_FILENAME);
|
|
27002
27049
|
}
|
|
27003
27050
|
}
|
|
27004
27051
|
if (!await fs7.exists(configPath)) {
|
|
@@ -27031,7 +27078,6 @@ Please ensure your config file contains valid JSON.`;
|
|
|
27031
27078
|
};
|
|
27032
27079
|
|
|
27033
27080
|
// ../auth/src/config.ts
|
|
27034
|
-
var DEFAULT_BASE_URL = "https://cloud.uipath.com";
|
|
27035
27081
|
var DEFAULT_CLIENT_ID = "36dea5b8-e8bb-423d-8e7b-c808df8f1c00";
|
|
27036
27082
|
|
|
27037
27083
|
class InvalidBaseUrlError extends Error {
|
|
@@ -27126,10 +27172,10 @@ init_src2();
|
|
|
27126
27172
|
|
|
27127
27173
|
// ../auth/src/telemetry-events.ts
|
|
27128
27174
|
var AuthTelemetryEvents = {
|
|
27129
|
-
Login: "
|
|
27130
|
-
TenantSelected: "
|
|
27131
|
-
TokenRefresh: "
|
|
27132
|
-
Logout: "
|
|
27175
|
+
Login: "uip.auth.login",
|
|
27176
|
+
TenantSelected: "uip.auth.tenant-selected",
|
|
27177
|
+
TokenRefresh: "uip.auth.token-refresh",
|
|
27178
|
+
Logout: "uip.auth.logout"
|
|
27133
27179
|
};
|
|
27134
27180
|
|
|
27135
27181
|
// ../auth/src/tenantSelection.ts
|
|
@@ -27650,9 +27696,7 @@ var Qe = `${t("gray", h)} `;
|
|
|
27650
27696
|
// ../auth/src/utils/envFile.ts
|
|
27651
27697
|
init_src();
|
|
27652
27698
|
init_src2();
|
|
27653
|
-
var
|
|
27654
|
-
var DEFAULT_AUTH_DIR = ".uipath";
|
|
27655
|
-
var DEFAULT_ENV_FILENAME = `${DEFAULT_AUTH_DIR}/${DEFAULT_AUTH_FILENAME}`;
|
|
27699
|
+
var DEFAULT_ENV_FILENAME = `${UIPATH_HOME_DIR}/${AUTH_FILENAME}`;
|
|
27656
27700
|
var resolveEnvFilePathAsync = async (envFilePath = DEFAULT_ENV_FILENAME) => {
|
|
27657
27701
|
const fs7 = getFileSystem();
|
|
27658
27702
|
if (fs7.path.isAbsolute(envFilePath)) {
|
|
@@ -28010,7 +28054,7 @@ async function extractErrorMessage(error48) {
|
|
|
28010
28054
|
// src/commands/folders.ts
|
|
28011
28055
|
var registerFoldersCommand = (program3) => {
|
|
28012
28056
|
const folders = program3.command("folders").description("Manage UiPath Orchestrator folders").option("--format <format>", "Output format (table, json, yaml, plain)", "table");
|
|
28013
|
-
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",
|
|
28057
|
+
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) => {
|
|
28014
28058
|
const [apiError, api2] = await catchError(createApiClient(FoldersApi, options));
|
|
28015
28059
|
if (apiError) {
|
|
28016
28060
|
OutputFormatter.error({
|
|
@@ -28018,7 +28062,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28018
28062
|
Message: "Error listing folders",
|
|
28019
28063
|
Instructions: await extractErrorMessage(apiError)
|
|
28020
28064
|
});
|
|
28021
|
-
|
|
28065
|
+
processContext.exit(1);
|
|
28022
28066
|
return;
|
|
28023
28067
|
}
|
|
28024
28068
|
const [getError, result] = await catchError(api2.foldersGet({
|
|
@@ -28032,7 +28076,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28032
28076
|
Message: "Error listing folders",
|
|
28033
28077
|
Instructions: await extractErrorMessage(getError)
|
|
28034
28078
|
});
|
|
28035
|
-
|
|
28079
|
+
processContext.exit(1);
|
|
28036
28080
|
return;
|
|
28037
28081
|
}
|
|
28038
28082
|
if (result.value && result.value.length > 0) {
|
|
@@ -28057,7 +28101,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28057
28101
|
});
|
|
28058
28102
|
}
|
|
28059
28103
|
});
|
|
28060
|
-
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").
|
|
28104
|
+
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) => {
|
|
28061
28105
|
const [apiError, api2] = await catchError(createApiClient(FoldersApi, {
|
|
28062
28106
|
tenant: options.tenant
|
|
28063
28107
|
}));
|
|
@@ -28067,7 +28111,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28067
28111
|
Message: "Error creating folder",
|
|
28068
28112
|
Instructions: await extractErrorMessage(apiError)
|
|
28069
28113
|
});
|
|
28070
|
-
|
|
28114
|
+
processContext.exit(1);
|
|
28071
28115
|
return;
|
|
28072
28116
|
}
|
|
28073
28117
|
const folderData = {
|
|
@@ -28085,7 +28129,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28085
28129
|
Message: "Error creating folder",
|
|
28086
28130
|
Instructions: await extractErrorMessage(createError)
|
|
28087
28131
|
});
|
|
28088
|
-
|
|
28132
|
+
processContext.exit(1);
|
|
28089
28133
|
return;
|
|
28090
28134
|
}
|
|
28091
28135
|
OutputFormatter.success({
|
|
@@ -28098,7 +28142,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28098
28142
|
}
|
|
28099
28143
|
});
|
|
28100
28144
|
});
|
|
28101
|
-
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").
|
|
28145
|
+
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) => {
|
|
28102
28146
|
const [apiError, api2] = await catchError(createApiClient(FoldersApi, {
|
|
28103
28147
|
tenant: options.tenant
|
|
28104
28148
|
}));
|
|
@@ -28108,7 +28152,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28108
28152
|
Message: "Error getting folder",
|
|
28109
28153
|
Instructions: await extractErrorMessage(apiError)
|
|
28110
28154
|
});
|
|
28111
|
-
|
|
28155
|
+
processContext.exit(1);
|
|
28112
28156
|
return;
|
|
28113
28157
|
}
|
|
28114
28158
|
const [getError, folder] = await catchError(api2.foldersGetById({
|
|
@@ -28120,7 +28164,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28120
28164
|
Message: "Error getting folder",
|
|
28121
28165
|
Instructions: await extractErrorMessage(getError)
|
|
28122
28166
|
});
|
|
28123
|
-
|
|
28167
|
+
processContext.exit(1);
|
|
28124
28168
|
return;
|
|
28125
28169
|
}
|
|
28126
28170
|
OutputFormatter.success({
|
|
@@ -28141,7 +28185,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28141
28185
|
}
|
|
28142
28186
|
});
|
|
28143
28187
|
});
|
|
28144
|
-
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",
|
|
28188
|
+
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) => {
|
|
28145
28189
|
const [apiError, api2] = await catchError(createApiClient(FoldersApi, {
|
|
28146
28190
|
tenant: options.tenant
|
|
28147
28191
|
}));
|
|
@@ -28151,7 +28195,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28151
28195
|
Message: "Error getting folders for current user",
|
|
28152
28196
|
Instructions: await extractErrorMessage(apiError)
|
|
28153
28197
|
});
|
|
28154
|
-
|
|
28198
|
+
processContext.exit(1);
|
|
28155
28199
|
return;
|
|
28156
28200
|
}
|
|
28157
28201
|
const [getError, response] = await catchError(api2.foldersGetAllForCurrentUser({
|
|
@@ -28164,7 +28208,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28164
28208
|
Message: "Error getting folders for current user",
|
|
28165
28209
|
Instructions: await extractErrorMessage(getError)
|
|
28166
28210
|
});
|
|
28167
|
-
|
|
28211
|
+
processContext.exit(1);
|
|
28168
28212
|
return;
|
|
28169
28213
|
}
|
|
28170
28214
|
if (response.pageItems && response.pageItems.length > 0) {
|
|
@@ -28191,7 +28235,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28191
28235
|
});
|
|
28192
28236
|
}
|
|
28193
28237
|
});
|
|
28194
|
-
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").
|
|
28238
|
+
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) => {
|
|
28195
28239
|
const [apiError, api2] = await catchError(createApiClient(FoldersApi, {
|
|
28196
28240
|
tenant: options.tenant
|
|
28197
28241
|
}));
|
|
@@ -28201,7 +28245,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28201
28245
|
Message: "Error deleting folder",
|
|
28202
28246
|
Instructions: await extractErrorMessage(apiError)
|
|
28203
28247
|
});
|
|
28204
|
-
|
|
28248
|
+
processContext.exit(1);
|
|
28205
28249
|
return;
|
|
28206
28250
|
}
|
|
28207
28251
|
const [deleteError] = await catchError(api2.foldersDeleteById({ key: parseInt(id, 10) }));
|
|
@@ -28211,7 +28255,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28211
28255
|
Message: "Error deleting folder",
|
|
28212
28256
|
Instructions: await extractErrorMessage(deleteError)
|
|
28213
28257
|
});
|
|
28214
|
-
|
|
28258
|
+
processContext.exit(1);
|
|
28215
28259
|
return;
|
|
28216
28260
|
}
|
|
28217
28261
|
OutputFormatter.success({
|
|
@@ -28223,7 +28267,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28223
28267
|
}
|
|
28224
28268
|
});
|
|
28225
28269
|
});
|
|
28226
|
-
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").
|
|
28270
|
+
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) => {
|
|
28227
28271
|
const [apiError, api2] = await catchError(createApiClient(FoldersApi, {
|
|
28228
28272
|
tenant: options.tenant
|
|
28229
28273
|
}));
|
|
@@ -28233,7 +28277,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28233
28277
|
Message: "Error moving folder",
|
|
28234
28278
|
Instructions: await extractErrorMessage(apiError)
|
|
28235
28279
|
});
|
|
28236
|
-
|
|
28280
|
+
processContext.exit(1);
|
|
28237
28281
|
return;
|
|
28238
28282
|
}
|
|
28239
28283
|
const [moveError] = await catchError(api2.foldersMoveFolderByFolderid({
|
|
@@ -28246,7 +28290,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28246
28290
|
Message: "Error moving folder",
|
|
28247
28291
|
Instructions: await extractErrorMessage(moveError)
|
|
28248
28292
|
});
|
|
28249
|
-
|
|
28293
|
+
processContext.exit(1);
|
|
28250
28294
|
return;
|
|
28251
28295
|
}
|
|
28252
28296
|
OutputFormatter.success({
|
|
@@ -28259,7 +28303,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28259
28303
|
}
|
|
28260
28304
|
});
|
|
28261
28305
|
});
|
|
28262
|
-
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)").
|
|
28306
|
+
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) => {
|
|
28263
28307
|
const [apiError, api2] = await catchError(createApiClient(FoldersApi, {
|
|
28264
28308
|
tenant: options.tenant
|
|
28265
28309
|
}));
|
|
@@ -28269,7 +28313,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28269
28313
|
Message: "Error editing folder",
|
|
28270
28314
|
Instructions: await extractErrorMessage(apiError)
|
|
28271
28315
|
});
|
|
28272
|
-
|
|
28316
|
+
processContext.exit(1);
|
|
28273
28317
|
return;
|
|
28274
28318
|
}
|
|
28275
28319
|
const updateData = {};
|
|
@@ -28295,7 +28339,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28295
28339
|
Message: `Invalid folder type. Must be one of: ${validFolderTypes.join(", ")}`,
|
|
28296
28340
|
Instructions: `Invalid folder type. Must be one of: ${validFolderTypes.join(", ")}`
|
|
28297
28341
|
});
|
|
28298
|
-
|
|
28342
|
+
processContext.exit(1);
|
|
28299
28343
|
return;
|
|
28300
28344
|
}
|
|
28301
28345
|
updateData.folderType = options.folderType;
|
|
@@ -28308,7 +28352,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28308
28352
|
Message: `Invalid provision type. Must be one of: ${validProvisionTypes.join(", ")}`,
|
|
28309
28353
|
Instructions: `Invalid provision type. Must be one of: ${validProvisionTypes.join(", ")}`
|
|
28310
28354
|
});
|
|
28311
|
-
|
|
28355
|
+
processContext.exit(1);
|
|
28312
28356
|
return;
|
|
28313
28357
|
}
|
|
28314
28358
|
updateData.provisionType = options.provisionType;
|
|
@@ -28324,7 +28368,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28324
28368
|
Message: `Invalid permission model. Must be one of: ${validPermissionModels.join(", ")}`,
|
|
28325
28369
|
Instructions: `Invalid permission model. Must be one of: ${validPermissionModels.join(", ")}`
|
|
28326
28370
|
});
|
|
28327
|
-
|
|
28371
|
+
processContext.exit(1);
|
|
28328
28372
|
return;
|
|
28329
28373
|
}
|
|
28330
28374
|
updateData.permissionModel = options.permissionModel;
|
|
@@ -28347,7 +28391,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28347
28391
|
Message: `Invalid feed type. Must be one of: ${validFeedTypes.join(", ")}`,
|
|
28348
28392
|
Instructions: `Invalid feed type. Must be one of: ${validFeedTypes.join(", ")}`
|
|
28349
28393
|
});
|
|
28350
|
-
|
|
28394
|
+
processContext.exit(1);
|
|
28351
28395
|
return;
|
|
28352
28396
|
}
|
|
28353
28397
|
updateData.feedType = options.feedType;
|
|
@@ -28362,7 +28406,7 @@ var registerFoldersCommand = (program3) => {
|
|
|
28362
28406
|
Message: "Error editing folder",
|
|
28363
28407
|
Instructions: await extractErrorMessage(editError)
|
|
28364
28408
|
});
|
|
28365
|
-
|
|
28409
|
+
processContext.exit(1);
|
|
28366
28410
|
return;
|
|
28367
28411
|
}
|
|
28368
28412
|
OutputFormatter.success({
|
|
@@ -28394,7 +28438,7 @@ function formatJob(job) {
|
|
|
28394
28438
|
}
|
|
28395
28439
|
var registerJobsCommand = (program3) => {
|
|
28396
28440
|
const jobs = program3.command("jobs").description("Manage UiPath Orchestrator jobs").option("--format <format>", "Output format (table, json, yaml, plain)", "table");
|
|
28397
|
-
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",
|
|
28441
|
+
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) => {
|
|
28398
28442
|
const parsedFolderId = parseInt(folderId, 10);
|
|
28399
28443
|
if (Number.isNaN(parsedFolderId)) {
|
|
28400
28444
|
OutputFormatter.error({
|
|
@@ -28402,7 +28446,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28402
28446
|
Message: "Error listing jobs",
|
|
28403
28447
|
Instructions: `Received invalid folder ID: ${folderId}.`
|
|
28404
28448
|
});
|
|
28405
|
-
|
|
28449
|
+
processContext.exit(1);
|
|
28406
28450
|
return;
|
|
28407
28451
|
}
|
|
28408
28452
|
const [apiError, api2] = await catchError(createApiClient(JobsApi, {
|
|
@@ -28415,7 +28459,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28415
28459
|
Message: "Error listing jobs",
|
|
28416
28460
|
Instructions: apiError.message
|
|
28417
28461
|
});
|
|
28418
|
-
|
|
28462
|
+
processContext.exit(1);
|
|
28419
28463
|
return;
|
|
28420
28464
|
}
|
|
28421
28465
|
const [error48, result] = await catchError(api2.jobsGet({
|
|
@@ -28432,7 +28476,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28432
28476
|
Message: "Error listing jobs",
|
|
28433
28477
|
Instructions: errorMessage
|
|
28434
28478
|
});
|
|
28435
|
-
|
|
28479
|
+
processContext.exit(1);
|
|
28436
28480
|
return;
|
|
28437
28481
|
}
|
|
28438
28482
|
if (result.value && result.value.length > 0) {
|
|
@@ -28452,7 +28496,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28452
28496
|
});
|
|
28453
28497
|
}
|
|
28454
28498
|
});
|
|
28455
|
-
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").
|
|
28499
|
+
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) => {
|
|
28456
28500
|
const parsedFolderId = parseInt(folderId, 10);
|
|
28457
28501
|
if (Number.isNaN(parsedFolderId)) {
|
|
28458
28502
|
OutputFormatter.error({
|
|
@@ -28460,7 +28504,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28460
28504
|
Message: "Error getting job",
|
|
28461
28505
|
Instructions: `Received invalid folder ID: ${folderId}.`
|
|
28462
28506
|
});
|
|
28463
|
-
|
|
28507
|
+
processContext.exit(1);
|
|
28464
28508
|
return;
|
|
28465
28509
|
}
|
|
28466
28510
|
const [apiError, api2] = await catchError(createApiClient(JobsApi, {
|
|
@@ -28473,7 +28517,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28473
28517
|
Message: `Error getting job: ${apiError.message}`,
|
|
28474
28518
|
Instructions: apiError.message
|
|
28475
28519
|
});
|
|
28476
|
-
|
|
28520
|
+
processContext.exit(1);
|
|
28477
28521
|
return;
|
|
28478
28522
|
}
|
|
28479
28523
|
const [error48, job] = await catchError(api2.jobsGetById({
|
|
@@ -28487,7 +28531,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28487
28531
|
Message: `Error getting job: ${errorMessage}`,
|
|
28488
28532
|
Instructions: `${error48 instanceof Error ? error48.message : String(error48)}`
|
|
28489
28533
|
});
|
|
28490
|
-
|
|
28534
|
+
processContext.exit(1);
|
|
28491
28535
|
return;
|
|
28492
28536
|
}
|
|
28493
28537
|
OutputFormatter.success({
|
|
@@ -28512,7 +28556,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28512
28556
|
}
|
|
28513
28557
|
});
|
|
28514
28558
|
});
|
|
28515
|
-
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").
|
|
28559
|
+
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) => {
|
|
28516
28560
|
const parsedFolderId = parseInt(folderId, 10);
|
|
28517
28561
|
if (Number.isNaN(parsedFolderId)) {
|
|
28518
28562
|
OutputFormatter.error({
|
|
@@ -28520,7 +28564,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28520
28564
|
Message: "Error starting job",
|
|
28521
28565
|
Instructions: `Received invalid folder ID: ${folderId}.`
|
|
28522
28566
|
});
|
|
28523
|
-
|
|
28567
|
+
processContext.exit(1);
|
|
28524
28568
|
return;
|
|
28525
28569
|
}
|
|
28526
28570
|
const [apiError, api2] = await catchError(createApiClient(JobsApi, {
|
|
@@ -28533,7 +28577,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28533
28577
|
Message: `Error starting job: ${apiError.message}`,
|
|
28534
28578
|
Instructions: apiError.message
|
|
28535
28579
|
});
|
|
28536
|
-
|
|
28580
|
+
processContext.exit(1);
|
|
28537
28581
|
return;
|
|
28538
28582
|
}
|
|
28539
28583
|
const startInfo = {
|
|
@@ -28556,7 +28600,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28556
28600
|
Message: `Error starting job: ${errorMessage}`,
|
|
28557
28601
|
Instructions: `${error48 instanceof Error ? error48.message : String(error48)}`
|
|
28558
28602
|
});
|
|
28559
|
-
|
|
28603
|
+
processContext.exit(1);
|
|
28560
28604
|
return;
|
|
28561
28605
|
}
|
|
28562
28606
|
if (result.value && result.value.length > 0) {
|
|
@@ -28574,7 +28618,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28574
28618
|
});
|
|
28575
28619
|
}
|
|
28576
28620
|
});
|
|
28577
|
-
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").
|
|
28621
|
+
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) => {
|
|
28578
28622
|
const parsedFolderId = parseInt(folderId, 10);
|
|
28579
28623
|
if (Number.isNaN(parsedFolderId)) {
|
|
28580
28624
|
OutputFormatter.error({
|
|
@@ -28582,7 +28626,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28582
28626
|
Message: "Error stopping job",
|
|
28583
28627
|
Instructions: `Received invalid folder ID: ${folderId}.`
|
|
28584
28628
|
});
|
|
28585
|
-
|
|
28629
|
+
processContext.exit(1);
|
|
28586
28630
|
return;
|
|
28587
28631
|
}
|
|
28588
28632
|
const [apiError, api2] = await catchError(createApiClient(JobsApi, {
|
|
@@ -28595,7 +28639,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28595
28639
|
Message: `Error stopping job: ${apiError.message}`,
|
|
28596
28640
|
Instructions: apiError.message
|
|
28597
28641
|
});
|
|
28598
|
-
|
|
28642
|
+
processContext.exit(1);
|
|
28599
28643
|
return;
|
|
28600
28644
|
}
|
|
28601
28645
|
const body = {
|
|
@@ -28612,7 +28656,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28612
28656
|
Message: `Error stopping job: ${errorMessage}`,
|
|
28613
28657
|
Instructions: `${error48 instanceof Error ? error48.message : String(error48)}`
|
|
28614
28658
|
});
|
|
28615
|
-
|
|
28659
|
+
processContext.exit(1);
|
|
28616
28660
|
return;
|
|
28617
28661
|
}
|
|
28618
28662
|
OutputFormatter.success({
|
|
@@ -28625,7 +28669,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28625
28669
|
}
|
|
28626
28670
|
});
|
|
28627
28671
|
});
|
|
28628
|
-
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").
|
|
28672
|
+
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) => {
|
|
28629
28673
|
const parsedFolderId = parseInt(folderId, 10);
|
|
28630
28674
|
if (Number.isNaN(parsedFolderId)) {
|
|
28631
28675
|
OutputFormatter.error({
|
|
@@ -28633,7 +28677,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28633
28677
|
Message: "Error stopping jobs",
|
|
28634
28678
|
Instructions: `Received invalid folder ID: ${folderId}.`
|
|
28635
28679
|
});
|
|
28636
|
-
|
|
28680
|
+
processContext.exit(1);
|
|
28637
28681
|
return;
|
|
28638
28682
|
}
|
|
28639
28683
|
const jobIds = jobIdsArg.split(",").map((id) => parseInt(id.trim(), 10));
|
|
@@ -28643,7 +28687,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28643
28687
|
Message: "Error stopping jobs",
|
|
28644
28688
|
Instructions: `Received invalid job IDs: ${jobIdsArg}. Expected comma-separated numbers.`
|
|
28645
28689
|
});
|
|
28646
|
-
|
|
28690
|
+
processContext.exit(1);
|
|
28647
28691
|
return;
|
|
28648
28692
|
}
|
|
28649
28693
|
const [apiError, api2] = await catchError(createApiClient(JobsApi, {
|
|
@@ -28656,7 +28700,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28656
28700
|
Message: `Error stopping jobs: ${apiError.message}`,
|
|
28657
28701
|
Instructions: apiError.message
|
|
28658
28702
|
});
|
|
28659
|
-
|
|
28703
|
+
processContext.exit(1);
|
|
28660
28704
|
return;
|
|
28661
28705
|
}
|
|
28662
28706
|
const body = {
|
|
@@ -28671,7 +28715,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28671
28715
|
Message: `Error stopping jobs: ${errorMessage}`,
|
|
28672
28716
|
Instructions: `${error48 instanceof Error ? error48.message : String(error48)}`
|
|
28673
28717
|
});
|
|
28674
|
-
|
|
28718
|
+
processContext.exit(1);
|
|
28675
28719
|
return;
|
|
28676
28720
|
}
|
|
28677
28721
|
OutputFormatter.success({
|
|
@@ -28684,7 +28728,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28684
28728
|
}
|
|
28685
28729
|
});
|
|
28686
28730
|
});
|
|
28687
|
-
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").
|
|
28731
|
+
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) => {
|
|
28688
28732
|
const parsedFolderId = parseInt(folderId, 10);
|
|
28689
28733
|
if (Number.isNaN(parsedFolderId)) {
|
|
28690
28734
|
OutputFormatter.error({
|
|
@@ -28692,7 +28736,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28692
28736
|
Message: "Error restarting job",
|
|
28693
28737
|
Instructions: `Received invalid folder ID: ${folderId}.`
|
|
28694
28738
|
});
|
|
28695
|
-
|
|
28739
|
+
processContext.exit(1);
|
|
28696
28740
|
return;
|
|
28697
28741
|
}
|
|
28698
28742
|
const [apiError, api2] = await catchError(createApiClient(JobsApi, {
|
|
@@ -28705,7 +28749,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28705
28749
|
Message: `Error restarting job: ${apiError.message}`,
|
|
28706
28750
|
Instructions: apiError.message
|
|
28707
28751
|
});
|
|
28708
|
-
|
|
28752
|
+
processContext.exit(1);
|
|
28709
28753
|
return;
|
|
28710
28754
|
}
|
|
28711
28755
|
const body = {
|
|
@@ -28719,7 +28763,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28719
28763
|
Message: `Error restarting job: ${errorMessage}`,
|
|
28720
28764
|
Instructions: `${error48 instanceof Error ? error48.message : String(error48)}`
|
|
28721
28765
|
});
|
|
28722
|
-
|
|
28766
|
+
processContext.exit(1);
|
|
28723
28767
|
return;
|
|
28724
28768
|
}
|
|
28725
28769
|
OutputFormatter.success({
|
|
@@ -28733,7 +28777,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28733
28777
|
}
|
|
28734
28778
|
});
|
|
28735
28779
|
});
|
|
28736
|
-
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").
|
|
28780
|
+
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) => {
|
|
28737
28781
|
const parsedFolderId = parseInt(folderId, 10);
|
|
28738
28782
|
if (Number.isNaN(parsedFolderId)) {
|
|
28739
28783
|
OutputFormatter.error({
|
|
@@ -28741,7 +28785,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28741
28785
|
Message: "Error resuming job",
|
|
28742
28786
|
Instructions: `Received invalid folder ID: ${folderId}.`
|
|
28743
28787
|
});
|
|
28744
|
-
|
|
28788
|
+
processContext.exit(1);
|
|
28745
28789
|
return;
|
|
28746
28790
|
}
|
|
28747
28791
|
const [apiError, api2] = await catchError(createApiClient(JobsApi, {
|
|
@@ -28754,7 +28798,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28754
28798
|
Message: `Error resuming job: ${apiError.message}`,
|
|
28755
28799
|
Instructions: apiError.message
|
|
28756
28800
|
});
|
|
28757
|
-
|
|
28801
|
+
processContext.exit(1);
|
|
28758
28802
|
return;
|
|
28759
28803
|
}
|
|
28760
28804
|
const body = {
|
|
@@ -28769,7 +28813,7 @@ var registerJobsCommand = (program3) => {
|
|
|
28769
28813
|
Message: `Error resuming job: ${errorMessage}`,
|
|
28770
28814
|
Instructions: `${error48 instanceof Error ? error48.message : String(error48)}`
|
|
28771
28815
|
});
|
|
28772
|
-
|
|
28816
|
+
processContext.exit(1);
|
|
28773
28817
|
return;
|
|
28774
28818
|
}
|
|
28775
28819
|
OutputFormatter.success({
|
|
@@ -28804,7 +28848,7 @@ function formatProcess(proc) {
|
|
|
28804
28848
|
}
|
|
28805
28849
|
var registerProcessesCommand = (program3) => {
|
|
28806
28850
|
const processes = program3.command("processes").description("Manage UiPath Orchestrator processes (packages)").option("--format <format>", "Output format (table, json, yaml, plain)", "table");
|
|
28807
|
-
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",
|
|
28851
|
+
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) => {
|
|
28808
28852
|
const [apiError, api2] = await catchError(createApiClient(ProcessesApi, {
|
|
28809
28853
|
tenant: options.tenant
|
|
28810
28854
|
}));
|
|
@@ -28814,7 +28858,7 @@ var registerProcessesCommand = (program3) => {
|
|
|
28814
28858
|
Message: "Error listing processes",
|
|
28815
28859
|
Instructions: apiError.message
|
|
28816
28860
|
});
|
|
28817
|
-
|
|
28861
|
+
processContext.exit(1);
|
|
28818
28862
|
return;
|
|
28819
28863
|
}
|
|
28820
28864
|
const [error48, result] = await catchError(api2.processesGet({
|
|
@@ -28833,7 +28877,7 @@ var registerProcessesCommand = (program3) => {
|
|
|
28833
28877
|
Message: "Error listing processes",
|
|
28834
28878
|
Instructions: errorMessage
|
|
28835
28879
|
});
|
|
28836
|
-
|
|
28880
|
+
processContext.exit(1);
|
|
28837
28881
|
return;
|
|
28838
28882
|
}
|
|
28839
28883
|
if (result.value && result.value.length > 0) {
|
|
@@ -28853,7 +28897,7 @@ var registerProcessesCommand = (program3) => {
|
|
|
28853
28897
|
});
|
|
28854
28898
|
}
|
|
28855
28899
|
});
|
|
28856
|
-
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").
|
|
28900
|
+
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) => {
|
|
28857
28901
|
const [apiError, api2] = await catchError(createApiClient(ProcessesApi, {
|
|
28858
28902
|
tenant: options.tenant
|
|
28859
28903
|
}));
|
|
@@ -28863,7 +28907,7 @@ var registerProcessesCommand = (program3) => {
|
|
|
28863
28907
|
Message: "Error getting process",
|
|
28864
28908
|
Instructions: apiError.message
|
|
28865
28909
|
});
|
|
28866
|
-
|
|
28910
|
+
processContext.exit(1);
|
|
28867
28911
|
return;
|
|
28868
28912
|
}
|
|
28869
28913
|
const [error48, proc] = await catchError(api2.processesGetProcessVersionByKey({
|
|
@@ -28878,7 +28922,7 @@ var registerProcessesCommand = (program3) => {
|
|
|
28878
28922
|
Message: `Error getting process: ${errorMessage}`,
|
|
28879
28923
|
Instructions: `${error48 instanceof Error ? error48.message : String(error48)}`
|
|
28880
28924
|
});
|
|
28881
|
-
|
|
28925
|
+
processContext.exit(1);
|
|
28882
28926
|
return;
|
|
28883
28927
|
}
|
|
28884
28928
|
OutputFormatter.success({
|
|
@@ -28900,7 +28944,7 @@ var registerProcessesCommand = (program3) => {
|
|
|
28900
28944
|
}
|
|
28901
28945
|
});
|
|
28902
28946
|
});
|
|
28903
|
-
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",
|
|
28947
|
+
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) => {
|
|
28904
28948
|
const [apiError, api2] = await catchError(createApiClient(ProcessesApi, {
|
|
28905
28949
|
tenant: options.tenant
|
|
28906
28950
|
}));
|
|
@@ -28910,7 +28954,7 @@ var registerProcessesCommand = (program3) => {
|
|
|
28910
28954
|
Message: "Error listing process versions",
|
|
28911
28955
|
Instructions: apiError.message
|
|
28912
28956
|
});
|
|
28913
|
-
|
|
28957
|
+
processContext.exit(1);
|
|
28914
28958
|
return;
|
|
28915
28959
|
}
|
|
28916
28960
|
const [error48, result] = await catchError(api2.processesGetProcessVersionsByProcessid({
|
|
@@ -28929,7 +28973,7 @@ var registerProcessesCommand = (program3) => {
|
|
|
28929
28973
|
Message: "Error listing process versions",
|
|
28930
28974
|
Instructions: errorMessage
|
|
28931
28975
|
});
|
|
28932
|
-
|
|
28976
|
+
processContext.exit(1);
|
|
28933
28977
|
return;
|
|
28934
28978
|
}
|
|
28935
28979
|
if (result.value && result.value.length > 0) {
|
|
@@ -28966,7 +29010,7 @@ function formatRelease(release) {
|
|
|
28966
29010
|
}
|
|
28967
29011
|
var registerReleasesCommand = (program3) => {
|
|
28968
29012
|
const releases = program3.command("releases").description("Manage UiPath Orchestrator releases").option("--format <format>", "Output format (table, json, yaml, plain)", "table");
|
|
28969
|
-
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",
|
|
29013
|
+
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) => {
|
|
28970
29014
|
const parsedFolderId = parseInt(folderId, 10);
|
|
28971
29015
|
if (Number.isNaN(parsedFolderId)) {
|
|
28972
29016
|
OutputFormatter.error({
|
|
@@ -28974,7 +29018,7 @@ var registerReleasesCommand = (program3) => {
|
|
|
28974
29018
|
Message: "Error listing releases",
|
|
28975
29019
|
Instructions: `Received invalid folder ID: ${folderId}.`
|
|
28976
29020
|
});
|
|
28977
|
-
|
|
29021
|
+
processContext.exit(1);
|
|
28978
29022
|
return;
|
|
28979
29023
|
}
|
|
28980
29024
|
const [apiError, api2] = await catchError(createApiClient(ReleasesApi, {
|
|
@@ -28987,7 +29031,7 @@ var registerReleasesCommand = (program3) => {
|
|
|
28987
29031
|
Message: "Error listing releases",
|
|
28988
29032
|
Instructions: apiError.message
|
|
28989
29033
|
});
|
|
28990
|
-
|
|
29034
|
+
processContext.exit(1);
|
|
28991
29035
|
return;
|
|
28992
29036
|
}
|
|
28993
29037
|
const [error48, result] = await catchError(api2.releasesGet({
|
|
@@ -29004,7 +29048,7 @@ var registerReleasesCommand = (program3) => {
|
|
|
29004
29048
|
Message: "Error listing releases",
|
|
29005
29049
|
Instructions: errorMessage
|
|
29006
29050
|
});
|
|
29007
|
-
|
|
29051
|
+
processContext.exit(1);
|
|
29008
29052
|
return;
|
|
29009
29053
|
}
|
|
29010
29054
|
if (result.value && result.value.length > 0) {
|