@uipath/orchestrator-tool 1.206.0-preview.283 → 1.206.0-preview.288
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/{tool-xbjjd7dt.js → tool-ba7m0gyw.js} +89 -43
- package/dist/tool.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -91,7 +91,7 @@ var package_default = {
|
|
|
91
91
|
name: "@uipath/orchestrator-tool",
|
|
92
92
|
author: "UiPath",
|
|
93
93
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
94
|
-
version: "1.206.0-preview.
|
|
94
|
+
version: "1.206.0-preview.288",
|
|
95
95
|
description: "Manage Orchestrator folders, jobs, processes, and releases.",
|
|
96
96
|
private: false,
|
|
97
97
|
repository: {
|
|
@@ -166,6 +166,18 @@ async function resolveQueueByKey(api, key) {
|
|
|
166
166
|
}
|
|
167
167
|
return queue;
|
|
168
168
|
}
|
|
169
|
+
async function resolveQueueByKeyInFolder(api, key, folderLabel) {
|
|
170
|
+
validateUuid(key, "queue");
|
|
171
|
+
const result = await api.queueDefinitionsListQueues({
|
|
172
|
+
$filter: `QueueDefinitionKey eq ${key}`,
|
|
173
|
+
$top: 1
|
|
174
|
+
});
|
|
175
|
+
const id = result.value?.[0]?.queueDefinitionId;
|
|
176
|
+
if (id == null) {
|
|
177
|
+
throw Object.assign(new Error(`Queue not found for key: '${key}' in folder '${folderLabel}'.`), { errorCode: "not_found", retry: "RetryWillNotFix" });
|
|
178
|
+
}
|
|
179
|
+
return { id };
|
|
180
|
+
}
|
|
169
181
|
var QUEUE_NAME_PAGE_SIZE = 100;
|
|
170
182
|
var QUEUE_NAME_MAX_PAGES = 20;
|
|
171
183
|
async function collectQueuesNamed(api, name, folderId) {
|
|
@@ -1275,12 +1287,16 @@ function invalidArgument(message) {
|
|
|
1275
1287
|
retry: "RetryWillNotFix"
|
|
1276
1288
|
});
|
|
1277
1289
|
}
|
|
1290
|
+
function bothFolderSelectorsError(scope) {
|
|
1291
|
+
return scope.folderPath !== undefined && scope.folderKey !== undefined ? invalidArgument("Provide either --folder-path or --folder-key, not both.") : undefined;
|
|
1292
|
+
}
|
|
1278
1293
|
async function assertEntityInFolder(kind, key, entityFolderIds, scope) {
|
|
1279
1294
|
if (scope.folderPath === undefined && scope.folderKey === undefined) {
|
|
1280
1295
|
return;
|
|
1281
1296
|
}
|
|
1282
|
-
|
|
1283
|
-
|
|
1297
|
+
const bothSelectors = bothFolderSelectorsError(scope);
|
|
1298
|
+
if (bothSelectors) {
|
|
1299
|
+
throw bothSelectors;
|
|
1284
1300
|
}
|
|
1285
1301
|
const folder = await resolveFolder({ folderPath: scope.folderPath, folderKey: scope.folderKey }, { tenant: scope.tenant });
|
|
1286
1302
|
if (folder !== undefined && entityFolderIds.includes(folder.id)) {
|
|
@@ -10751,6 +10767,43 @@ function formatQueueStats(s) {
|
|
|
10751
10767
|
QueueFoldersCount: s.queueFoldersCount ?? 0
|
|
10752
10768
|
};
|
|
10753
10769
|
}
|
|
10770
|
+
var CROSS_FOLDER_MISS_HINT = " If the queue was just created, pass its folder with --folder-path or --folder-key: the lookup without a folder can take a while to list a queue in a new folder.";
|
|
10771
|
+
async function resolveQueueTarget(queueKey, options, errorMessage) {
|
|
10772
|
+
if (options.folderPath !== undefined || options.folderKey !== undefined) {
|
|
10773
|
+
const bothSelectors = bothFolderSelectorsError(options);
|
|
10774
|
+
if (bothSelectors) {
|
|
10775
|
+
await reportFailure(errorMessage, bothSelectors);
|
|
10776
|
+
return;
|
|
10777
|
+
}
|
|
10778
|
+
const scope = {
|
|
10779
|
+
tenant: options.tenant,
|
|
10780
|
+
folderPath: options.folderPath,
|
|
10781
|
+
folderKey: options.folderKey
|
|
10782
|
+
};
|
|
10783
|
+
const folderLabel = options.folderPath ?? options.folderKey;
|
|
10784
|
+
const resolved = await resolveEntityOrFail(QueueDefinitionsApi, scope, (api, key) => resolveQueueByKeyInFolder(api, key, folderLabel), queueKey, errorMessage);
|
|
10785
|
+
return resolved ? { id: resolved.entity.id, scope } : undefined;
|
|
10786
|
+
}
|
|
10787
|
+
const resolved = await resolveEntityOrFail(QueueDefinitionsApi, { tenant: options.tenant }, resolveQueueByKey, queueKey, errorMessage, (instructions) => instructions.startsWith("Queue not found") ? instructions + CROSS_FOLDER_MISS_HINT : instructions);
|
|
10788
|
+
if (!resolved)
|
|
10789
|
+
return;
|
|
10790
|
+
if (resolved.entity.organizationUnitId == null) {
|
|
10791
|
+
OutputFormatter.error({
|
|
10792
|
+
Result: RESULTS.Failure,
|
|
10793
|
+
Message: errorMessage,
|
|
10794
|
+
Instructions: `Queue '${queueKey}' is missing folder context.`
|
|
10795
|
+
});
|
|
10796
|
+
processContext.exit(1);
|
|
10797
|
+
return;
|
|
10798
|
+
}
|
|
10799
|
+
return {
|
|
10800
|
+
id: resolved.entity.id,
|
|
10801
|
+
scope: {
|
|
10802
|
+
tenant: options.tenant,
|
|
10803
|
+
folderId: resolved.entity.organizationUnitId.toString()
|
|
10804
|
+
}
|
|
10805
|
+
};
|
|
10806
|
+
}
|
|
10754
10807
|
var QUEUES_LIST_EXAMPLES = [
|
|
10755
10808
|
{
|
|
10756
10809
|
Description: "List queues in a folder",
|
|
@@ -10903,6 +10956,27 @@ var QUEUES_UPDATE_EXAMPLES = [
|
|
|
10903
10956
|
id: 1206025
|
|
10904
10957
|
}
|
|
10905
10958
|
}
|
|
10959
|
+
},
|
|
10960
|
+
{
|
|
10961
|
+
Description: "Update a queue just created in a new folder, looking the key up in that folder",
|
|
10962
|
+
Command: "uip or queues update a1b2c3d4-0000-0000-0000-000000000001 --folder-path Finance --description 'Invoices to process'",
|
|
10963
|
+
Output: {
|
|
10964
|
+
Code: "QueueUpdated",
|
|
10965
|
+
Data: {
|
|
10966
|
+
key: "a1b2c3d4-0000-0000-0000-000000000001",
|
|
10967
|
+
name: "Invoices",
|
|
10968
|
+
description: "Invoices to process",
|
|
10969
|
+
maxNumberOfRetries: 0,
|
|
10970
|
+
acceptAutomaticallyRetry: true,
|
|
10971
|
+
retryAbandonedItems: false,
|
|
10972
|
+
enforceUniqueReference: false,
|
|
10973
|
+
encrypted: false,
|
|
10974
|
+
creationTime: "2026-01-15T10:00:00.000Z",
|
|
10975
|
+
foldersCount: 1,
|
|
10976
|
+
tags: [],
|
|
10977
|
+
id: 1206025
|
|
10978
|
+
}
|
|
10979
|
+
}
|
|
10906
10980
|
}
|
|
10907
10981
|
];
|
|
10908
10982
|
var QUEUES_DELETE_EXAMPLES = [
|
|
@@ -11229,7 +11303,7 @@ var registerQueuesCommand = (program) => {
|
|
|
11229
11303
|
Data: queue
|
|
11230
11304
|
});
|
|
11231
11305
|
});
|
|
11232
|
-
queues.command("update").description("Update queue properties by key (GUID). No folder needed -- resolves cross-folder. " + "Only provided fields are changed. " + "Archive retention needs a storage bucket (--retention-bucket / --stale-retention-bucket); the current bucket is kept while the action stays Archive and cleared when it changes. " + "Use 'queues list' to retrieve the key.").argument("<queue-key>", "Queue key (GUID)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("-n, --name <name>", "New queue name").option("-d, --description <text>", "Description of the queue").option("--max-retries <number>", "Maximum number of retry attempts for failed items").option("--sla-in-minutes <minutes>", "Queue item processing SLA in minutes").option("--risk-sla-in-minutes <minutes>", "Queue item processing risk SLA in minutes").option("--auto-retry", "Enable automatic retry of failed items").option("--no-auto-retry", "Disable automatic retry of failed items").option("--retry-abandoned-items", "Enable automatic retry of abandoned items").option("--no-retry-abandoned-items", "Disable automatic retry of abandoned items").option("--enforce-unique-reference", "Enforce unique reference values for queue items").option("--no-enforce-unique-reference", "Disable unique reference enforcement for queue items").option("--encrypted", "Store queue item data in encrypted format").option("--retention-action <action>", "Action for completed items, one of: Delete, Archive, None (e.g. --retention-action Archive). Switching to Archive requires --retention-bucket unless the queue already archives").option("--retention-period <days>", "Retention period in days for completed items").option("--retention-bucket <bucket-key>", "Storage bucket key (GUID) for archived completed items. Omit to keep the current bucket; it is cleared automatically when the action is no longer Archive. The bucket must be in, or shared to, the queue's folder. Use 'buckets list' to retrieve the key").option("--stale-retention-action <action>", "Action for uncompleted items, one of: Delete, Archive, None (e.g. --stale-retention-action Archive). Switching to Archive requires --stale-retention-bucket unless the queue already archives them").option("--stale-retention-period <days>", "Retention period in days for uncompleted items").option("--stale-retention-bucket <bucket-key>", "Storage bucket key (GUID) for archived uncompleted items. Omit to keep the current bucket; it is cleared automatically when the action is no longer Archive. The bucket must be in, or shared to, the queue's folder. Use 'buckets list' to retrieve the key").examples(QUEUES_UPDATE_EXAMPLES).trackedAction(processContext, async (queueKey, options) => {
|
|
11306
|
+
queues.command("update").description("Update queue properties by key (GUID). No folder needed -- resolves cross-folder; pass --folder-path or --folder-key to look the key up in that folder instead. " + "Only provided fields are changed. " + "Archive retention needs a storage bucket (--retention-bucket / --stale-retention-bucket); the current bucket is kept while the action stays Archive and cleared when it changes. " + "Use 'queues list' to retrieve the key.").argument("<queue-key>", "Queue key (GUID)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--folder-path <path>", "Path of the folder that holds the queue (e.g., 'Shared'). Looks the key up in that folder only").option("--folder-key <key>", "Key (GUID) of the folder that holds the queue. Looks the key up in that folder only").option("-n, --name <name>", "New queue name").option("-d, --description <text>", "Description of the queue").option("--max-retries <number>", "Maximum number of retry attempts for failed items").option("--sla-in-minutes <minutes>", "Queue item processing SLA in minutes").option("--risk-sla-in-minutes <minutes>", "Queue item processing risk SLA in minutes").option("--auto-retry", "Enable automatic retry of failed items").option("--no-auto-retry", "Disable automatic retry of failed items").option("--retry-abandoned-items", "Enable automatic retry of abandoned items").option("--no-retry-abandoned-items", "Disable automatic retry of abandoned items").option("--enforce-unique-reference", "Enforce unique reference values for queue items").option("--no-enforce-unique-reference", "Disable unique reference enforcement for queue items").option("--encrypted", "Store queue item data in encrypted format").option("--retention-action <action>", "Action for completed items, one of: Delete, Archive, None (e.g. --retention-action Archive). Switching to Archive requires --retention-bucket unless the queue already archives").option("--retention-period <days>", "Retention period in days for completed items").option("--retention-bucket <bucket-key>", "Storage bucket key (GUID) for archived completed items. Omit to keep the current bucket; it is cleared automatically when the action is no longer Archive. The bucket must be in, or shared to, the queue's folder. Use 'buckets list' to retrieve the key").option("--stale-retention-action <action>", "Action for uncompleted items, one of: Delete, Archive, None (e.g. --stale-retention-action Archive). Switching to Archive requires --stale-retention-bucket unless the queue already archives them").option("--stale-retention-period <days>", "Retention period in days for uncompleted items").option("--stale-retention-bucket <bucket-key>", "Storage bucket key (GUID) for archived uncompleted items. Omit to keep the current bucket; it is cleared automatically when the action is no longer Archive. The bucket must be in, or shared to, the queue's folder. Use 'buckets list' to retrieve the key").examples(QUEUES_UPDATE_EXAMPLES).trackedAction(processContext, async (queueKey, options) => {
|
|
11233
11307
|
const slaInMinutes = parseOptionalMinutes(options.slaInMinutes, "--sla-in-minutes", "Error updating queue");
|
|
11234
11308
|
if (options.slaInMinutes !== undefined && slaInMinutes === undefined) {
|
|
11235
11309
|
return;
|
|
@@ -11264,23 +11338,10 @@ var registerQueuesCommand = (program) => {
|
|
|
11264
11338
|
reportRetentionFailure(bucketPrecheck);
|
|
11265
11339
|
return;
|
|
11266
11340
|
}
|
|
11267
|
-
const
|
|
11268
|
-
if (!
|
|
11341
|
+
const existing = await resolveQueueTarget(queueKey, options, "Error updating queue");
|
|
11342
|
+
if (!existing)
|
|
11269
11343
|
return;
|
|
11270
|
-
const
|
|
11271
|
-
if (existing.organizationUnitId == null) {
|
|
11272
|
-
OutputFormatter.error({
|
|
11273
|
-
Result: RESULTS.Failure,
|
|
11274
|
-
Message: "Error updating queue",
|
|
11275
|
-
Instructions: `Queue '${queueKey}' is missing folder context.`
|
|
11276
|
-
});
|
|
11277
|
-
processContext.exit(1);
|
|
11278
|
-
return;
|
|
11279
|
-
}
|
|
11280
|
-
const [folderApiError, api] = await catchError(createApiClient(QueueDefinitionsApi, {
|
|
11281
|
-
tenant: options.tenant,
|
|
11282
|
-
folderId: existing.organizationUnitId.toString()
|
|
11283
|
-
}));
|
|
11344
|
+
const [folderApiError, api] = await catchError(createApiClient(QueueDefinitionsApi, existing.scope));
|
|
11284
11345
|
if (folderApiError) {
|
|
11285
11346
|
await reportFailure("Error updating queue", folderApiError);
|
|
11286
11347
|
return;
|
|
@@ -11329,32 +11390,20 @@ var registerQueuesCommand = (program) => {
|
|
|
11329
11390
|
Data: updated
|
|
11330
11391
|
});
|
|
11331
11392
|
});
|
|
11332
|
-
queues.command("delete").description("Delete a queue by key (GUID). No folder needed -- resolves cross-folder. " + "Refuses to delete a queue that still has items unless you pass --force " + "(deleting the queue deletes its items too). " + "Use 'queues list' to retrieve the key.").argument("<queue-key>", "Queue key (GUID) to delete").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").option("-f, --force", "Delete the queue even if it still has items (the items are deleted too; implies --yes)").examples(QUEUES_DELETE_EXAMPLES).trackedAction(processContext, async (queueKey, options) => {
|
|
11393
|
+
queues.command("delete").description("Delete a queue by key (GUID). No folder needed -- resolves cross-folder; pass --folder-path or --folder-key to look the key up in that folder instead. " + "Refuses to delete a queue that still has items unless you pass --force " + "(deleting the queue deletes its items too). " + "Use 'queues list' to retrieve the key.").argument("<queue-key>", "Queue key (GUID) to delete").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--folder-path <path>", "Path of the folder that holds the queue (e.g., 'Shared'). Looks the key up in that folder only").option("--folder-key <key>", "Key (GUID) of the folder that holds the queue. Looks the key up in that folder only").option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").option("-f, --force", "Delete the queue even if it still has items (the items are deleted too; implies --yes)").examples(QUEUES_DELETE_EXAMPLES).trackedAction(processContext, async (queueKey, options) => {
|
|
11333
11394
|
if (!requireConfirmation(options, `delete queue '${queueKey}'`))
|
|
11334
11395
|
return;
|
|
11335
|
-
const
|
|
11336
|
-
if (!
|
|
11337
|
-
return;
|
|
11338
|
-
if (resolved.entity.organizationUnitId == null) {
|
|
11339
|
-
OutputFormatter.error({
|
|
11340
|
-
Result: RESULTS.Failure,
|
|
11341
|
-
Message: "Error deleting queue",
|
|
11342
|
-
Instructions: `Queue '${queueKey}' is missing folder context.`
|
|
11343
|
-
});
|
|
11344
|
-
processContext.exit(1);
|
|
11396
|
+
const target = await resolveQueueTarget(queueKey, options, "Error deleting queue");
|
|
11397
|
+
if (!target)
|
|
11345
11398
|
return;
|
|
11346
|
-
}
|
|
11347
11399
|
if (!options.force) {
|
|
11348
|
-
const [itemsApiError, itemsApi] = await catchError(createApiClient(QueueItemsApi,
|
|
11349
|
-
tenant: options.tenant,
|
|
11350
|
-
folderId: resolved.entity.organizationUnitId.toString()
|
|
11351
|
-
}));
|
|
11400
|
+
const [itemsApiError, itemsApi] = await catchError(createApiClient(QueueItemsApi, target.scope));
|
|
11352
11401
|
if (itemsApiError) {
|
|
11353
11402
|
await reportFailure("Error deleting queue", itemsApiError);
|
|
11354
11403
|
return;
|
|
11355
11404
|
}
|
|
11356
11405
|
const [countError, itemsResult] = await catchError(itemsApi.queueItemsGet({
|
|
11357
|
-
$filter: `QueueDefinitionId eq ${
|
|
11406
|
+
$filter: `QueueDefinitionId eq ${target.id} and Status ne 'Deleted'`,
|
|
11358
11407
|
$top: 1
|
|
11359
11408
|
}));
|
|
11360
11409
|
if (countError) {
|
|
@@ -11371,16 +11420,13 @@ var registerQueuesCommand = (program) => {
|
|
|
11371
11420
|
return;
|
|
11372
11421
|
}
|
|
11373
11422
|
}
|
|
11374
|
-
const [folderApiError, folderApi] = await catchError(createApiClient(QueueDefinitionsApi,
|
|
11375
|
-
tenant: options.tenant,
|
|
11376
|
-
folderId: resolved.entity.organizationUnitId.toString()
|
|
11377
|
-
}));
|
|
11423
|
+
const [folderApiError, folderApi] = await catchError(createApiClient(QueueDefinitionsApi, target.scope));
|
|
11378
11424
|
if (folderApiError) {
|
|
11379
11425
|
await reportFailure("Error deleting queue", folderApiError);
|
|
11380
11426
|
return;
|
|
11381
11427
|
}
|
|
11382
11428
|
const [deleteError] = await catchError(folderApi.queueDefinitionsDeleteById({
|
|
11383
|
-
key:
|
|
11429
|
+
key: target.id
|
|
11384
11430
|
}));
|
|
11385
11431
|
if (deleteError) {
|
|
11386
11432
|
await reportFailure("Error deleting queue", deleteError);
|
|
@@ -16371,4 +16417,4 @@ var registerCommands2 = async (program) => {
|
|
|
16371
16417
|
|
|
16372
16418
|
export { metadata2, registerCommands2 };
|
|
16373
16419
|
|
|
16374
|
-
//# debugId=
|
|
16420
|
+
//# debugId=B36A38700B4D46D464756E2164756E21
|
package/dist/tool.js
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uipath/orchestrator-tool",
|
|
3
3
|
"author": "UiPath",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
-
"version": "1.206.0-preview.
|
|
5
|
+
"version": "1.206.0-preview.288",
|
|
6
6
|
"description": "Manage Orchestrator folders, jobs, processes, and releases.",
|
|
7
7
|
"private": false,
|
|
8
8
|
"repository": {
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"files": [
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "6373f3d15398939c22598d1874a6df01e872bc0a"
|
|
31
31
|
}
|