@uipath/orchestrator-tool 0.1.13 → 0.2.0

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.
Files changed (3) hide show
  1. package/README.md +32 -18
  2. package/dist/tool.js +42 -25
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -1,29 +1,43 @@
1
- # Orchestration Tool
1
+ # Orchestrator Tool
2
2
 
3
- `uip` plugin for managing UiPath Orchestrator resources.
3
+ `uip` tool for managing UiPath Orchestrator resources.
4
4
 
5
5
  ## Usage
6
6
 
7
- ### Commands
7
+ ### Command Groups
8
+
9
+ | Group | Description |
10
+ |-------|-------------|
11
+ | `folders` | List, create, get, delete, move, edit folders |
12
+ | `jobs` | Start, stop, restart, resume, list, get jobs |
13
+ | `processes` | List, get, create, update-version, edit, rollback |
14
+ | `packages` | List, get, versions, entry-points, upload |
15
+ | `machines` | List, get, create, edit, delete, assign, unassign |
16
+ | `users` | List, get, create, delete, assign, edit, current |
17
+ | `roles` | List, get, create, edit, delete roles and permissions |
18
+ | `licenses` | List, toggle, info |
19
+ | `feeds` | List |
20
+ | `settings` | List, get, update, execution, timezones |
21
+ | `credential-stores` | List, get |
22
+ | `calendars` | List, get, create, update, delete |
23
+ | `attachments` | List, download |
24
+ | `audit-logs` | List |
25
+
26
+ ### Examples
8
27
 
9
- **Folders:**
10
28
  ```bash
11
- uip or folders list <tenant-name> [options]
12
- uip or folders create <tenant-name> <name> [options]
13
- uip or folders get <tenant-name> <id>
14
- uip or folders delete <tenant-name> <id>
15
- uip or folders move <tenant-name> <id> <targetParentId>
16
- uip or folders edit <tenant-name> <id> [options]
29
+ uip or folders list
30
+ uip or jobs start --process-name "MyProcess" --folder-path /Default
31
+ uip or processes list --folder-path /Default
32
+ uip or packages upload ./MyPackage.nupkg
33
+ uip or users list --folder-path /Default
17
34
  ```
18
35
 
36
+ ### Common Options
19
37
 
20
- **Options:**
21
- - `--output <format>` - Output format: table, json, yaml, plain (default: table)
22
- - `--filter <filter>` - OData filter expression
38
+ - `--output <format>` - Output format: table, json, yaml, csv, tsv (default: table)
39
+ - `--folder-path <path>` - Folder path for folder-scoped commands
40
+ - `--folder-key <key>` - Folder key for folder-scoped commands
41
+ - `-t, --tenant <name>` - Tenant name
23
42
  - `--limit <number>` - Number of items to return
24
43
  - `--offset <number>` - Number of items to skip
25
-
26
- ## Versions
27
-
28
- ### orchestrator-tool 0.0.1
29
- - Added `folders` support
package/dist/tool.js CHANGED
@@ -10301,7 +10301,7 @@ var init_src2 = __esm(() => {
10301
10301
  // package.json
10302
10302
  var package_default = {
10303
10303
  name: "@uipath/orchestrator-tool",
10304
- version: "0.1.13",
10304
+ version: "0.2.0",
10305
10305
  description: "Manage Orchestrator folders, jobs, processes, and releases.",
10306
10306
  private: false,
10307
10307
  repository: {
@@ -37689,12 +37689,6 @@ async function resolveRelease(releaseKey, options) {
37689
37689
  folderKey: release.folderKey || ""
37690
37690
  };
37691
37691
  }
37692
- // ../orchestrator-sdk/src/scripts/generate-sdk.ts
37693
- import { join as join2 } from "node:path";
37694
- var OUTPUT_DIR = join2(process.cwd(), "generated");
37695
- var TEMP_DIR = join2(process.cwd(), "temp");
37696
- var GENRATE_DIR = join2(process.cwd(), "swagger");
37697
- if (false) {}
37698
37692
  // src/utils/job-resolver.ts
37699
37693
  init_src();
37700
37694
  async function resolveJob(jobKey, options) {
@@ -38678,15 +38672,23 @@ var registerFoldersCommand = (program2) => {
38678
38672
  });
38679
38673
  folders.command("edit").description("Edit folder properties (display name, description). " + "Use 'folders get' to see current values before editing.").argument("<folder-key-or-path>", "Folder key (GUID) or path — use 'folders list' to find").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth)").option("-n, --name <name>", "New display name for the folder").option("-d, --description <description>", "New description for the folder").trackedAction(processContext, async (folderKeyArg, options) => {
38680
38674
  const folderInput = resolveFolderInput(folderKeyArg);
38681
- const [resolveError, resolved] = await catchError(resolveFolder(folderInput, { tenant: options.tenant }));
38682
- if (resolveError) {
38683
- OutputFormatter.error({
38684
- Result: "Failure",
38685
- Message: "Error resolving folder",
38686
- Instructions: resolveError.message
38687
- });
38688
- processContext.exit(1);
38689
- return;
38675
+ let folderKey;
38676
+ if (folderInput.folderKey) {
38677
+ folderKey = folderInput.folderKey;
38678
+ } else {
38679
+ const [resolveError, resolved] = await catchError(resolveFolder(folderInput, {
38680
+ tenant: options.tenant
38681
+ }));
38682
+ if (resolveError) {
38683
+ OutputFormatter.error({
38684
+ Result: "Failure",
38685
+ Message: "Error resolving folder",
38686
+ Instructions: resolveError.message
38687
+ });
38688
+ processContext.exit(1);
38689
+ return;
38690
+ }
38691
+ folderKey = resolved.key;
38690
38692
  }
38691
38693
  const [apiError, api2] = await catchError(createApiClient(FoldersApi, {
38692
38694
  tenant: options.tenant
@@ -38700,14 +38702,12 @@ var registerFoldersCommand = (program2) => {
38700
38702
  processContext.exit(1);
38701
38703
  return;
38702
38704
  }
38703
- const updateData = {};
38704
- if (options.name)
38705
- updateData.displayName = options.name;
38706
- if (options.description)
38707
- updateData.description = options.description;
38708
- const [editError] = await catchError(api2.foldersPutById({
38709
- key: resolved.id,
38710
- body: updateData
38705
+ const [editError] = await catchError(api2.foldersPatchNameDescription({
38706
+ key: folderKey,
38707
+ body: {
38708
+ name: options.name,
38709
+ description: options.description
38710
+ }
38711
38711
  }));
38712
38712
  if (editError) {
38713
38713
  OutputFormatter.error({
@@ -41457,11 +41457,28 @@ var registerProcessesCommand = (program2) => {
41457
41457
  processContext.exit(1);
41458
41458
  return;
41459
41459
  }
41460
+ const [getError, currentRelease] = await catchError(api2.releasesGetByKeyByIdentifier({
41461
+ identifier: processKey
41462
+ }));
41463
+ if (getError) {
41464
+ OutputFormatter.error({
41465
+ Result: "Failure",
41466
+ Message: "Error reading current process",
41467
+ Instructions: await extractErrorMessage(getError)
41468
+ });
41469
+ processContext.exit(1);
41470
+ return;
41471
+ }
41460
41472
  const body = {
41461
41473
  id: resolved.id,
41462
41474
  processKey: resolved.processKey,
41463
41475
  processVersion: resolved.processVersion,
41464
- name: options.name ?? resolved.name
41476
+ name: options.name ?? resolved.name,
41477
+ retentionPeriod: currentRelease.retentionPeriod,
41478
+ retentionAction: currentRelease.retentionAction,
41479
+ retentionBucketId: currentRelease.retentionBucketId,
41480
+ staleRetentionPeriod: currentRelease.staleRetentionPeriod,
41481
+ staleRetentionAction: currentRelease.staleRetentionAction
41465
41482
  };
41466
41483
  if (options.description !== undefined)
41467
41484
  body.description = options.description;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/orchestrator-tool",
3
- "version": "0.1.13",
3
+ "version": "0.2.0",
4
4
  "description": "Manage Orchestrator folders, jobs, processes, and releases.",
5
5
  "private": false,
6
6
  "repository": {
@@ -34,9 +34,9 @@
34
34
  "lint:fix": "biome check --write ."
35
35
  },
36
36
  "devDependencies": {
37
- "@uipath/common": "0.1.15",
38
- "@uipath/filesystem": "0.1.7",
39
- "@uipath/orchestrator-sdk": "0.1.7",
37
+ "@uipath/common": "0.2.0",
38
+ "@uipath/filesystem": "0.2.0",
39
+ "@uipath/orchestrator-sdk": "0.2.0",
40
40
  "@types/node": "^25.5.0",
41
41
  "commander": "^14.0.3",
42
42
  "typescript": "^5"