@uipath/insights-tool 1.206.0-preview.312 → 1.206.0-preview.323

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.
@@ -8,7 +8,7 @@ import {
8
8
  MAESTRO_DASHBOARD_SOURCE_TYPE,
9
9
  resolveInsightsConfig,
10
10
  writeInsightsFailure
11
- } from "./tool-8t107k66.js";
11
+ } from "./tool-qjvjz5sn.js";
12
12
  import {
13
13
  findUnknownTables,
14
14
  serializeJsonFile,
@@ -26,7 +26,7 @@ import {
26
26
  defaultedFilterValuesSentence,
27
27
  projectWriteOutcome,
28
28
  postDashboardCreate
29
- } from "./tool-v6nd1a3d.js";
29
+ } from "./tool-vmg0kwdc.js";
30
30
  import {
31
31
  FROM_PROCESS_KEY_FLAG,
32
32
  TO_PROCESS_KEY_FLAG
@@ -21,12 +21,12 @@ import {
21
21
  writeInsightsError,
22
22
  asRecord,
23
23
  pickScalar
24
- } from "./tool-8t107k66.js";
24
+ } from "./tool-qjvjz5sn.js";
25
25
  import {
26
26
  AlertContractError,
27
27
  ALERTS_FAMILY,
28
28
  projectAlertDefinition
29
- } from "./tool-wd3284dx.js";
29
+ } from "./tool-8agwj920.js";
30
30
  import {
31
31
  writeJsonFile,
32
32
  DASHBOARDS_FAMILY,
@@ -43,7 +43,7 @@ import {
43
43
  readSlot,
44
44
  readBackFailure,
45
45
  writeReadBackFailed
46
- } from "./tool-v6nd1a3d.js";
46
+ } from "./tool-vmg0kwdc.js";
47
47
 
48
48
  // src/utils/dashboard-delete.ts
49
49
  function confirmationOperation(target) {
@@ -15,7 +15,7 @@ import {
15
15
  resolveInsightsConfig,
16
16
  writeInsightsFailure,
17
17
  writeInsightsError
18
- } from "./tool-8t107k66.js";
18
+ } from "./tool-qjvjz5sn.js";
19
19
  import {
20
20
  findBodyTenantMismatch,
21
21
  DEFINITION_FILE_RECOVERY,
@@ -38,7 +38,7 @@ import {
38
38
  readAoDashboard,
39
39
  readSlot,
40
40
  writeReadBackFailed
41
- } from "./tool-v6nd1a3d.js";
41
+ } from "./tool-vmg0kwdc.js";
42
42
 
43
43
  // src/utils/dashboard-update.ts
44
44
  var VERSION_CAVEAT = "The --expected-version check is a best-effort client-side compare, not server concurrency control: this route accepts no If-Match or version precondition, so a write landing between the preflight read and the PUT is not detected and the last writer wins.";
@@ -18,10 +18,10 @@ import {
18
18
  executeInsightsGet,
19
19
  asRecord,
20
20
  createContractGuards
21
- } from "./tool-8t107k66.js";
21
+ } from "./tool-qjvjz5sn.js";
22
22
  import {
23
23
  unwrapPortalEnvelope
24
- } from "./tool-r4r44rs7.js";
24
+ } from "./tool-8x7dk987.js";
25
25
 
26
26
  // src/utils/export-configurations.ts
27
27
  class ExportContractError extends Error {
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  Command
4
- } from "./tool-8t107k66.js";
5
- import"./tool-wd3284dx.js";
6
- import"./tool-v6nd1a3d.js";
4
+ } from "./tool-qjvjz5sn.js";
5
+ import"./tool-8agwj920.js";
6
+ import"./tool-vmg0kwdc.js";
7
7
  import {
8
8
  metadata2,
9
9
  registerCommands2
10
- } from "./tool-m745h695.js";
11
- import"./tool-r4r44rs7.js";
10
+ } from "./tool-ehw4w0ne.js";
11
+ import"./tool-8x7dk987.js";
12
12
 
13
13
  // src/index.ts
14
14
  var program = new Command;
@@ -21,7 +21,7 @@ import {
21
21
  asRecord,
22
22
  pickScalar,
23
23
  createContractGuards
24
- } from "./tool-8t107k66.js";
24
+ } from "./tool-qjvjz5sn.js";
25
25
 
26
26
  // src/utils/alerts.ts
27
27
  class AlertContractError extends Error {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  asRecord
3
- } from "./tool-8t107k66.js";
3
+ } from "./tool-qjvjz5sn.js";
4
4
 
5
5
  // src/utils/portal-envelope.ts
6
6
  function unwrapPortalEnvelope(raw, subject, newError) {
@@ -81,7 +81,7 @@ import {
81
81
  asRecord,
82
82
  pickScalar,
83
83
  createContractGuards
84
- } from "./tool-8t107k66.js";
84
+ } from "./tool-qjvjz5sn.js";
85
85
  import {
86
86
  parseRouteId,
87
87
  executeAlertsList,
@@ -90,7 +90,7 @@ import {
90
90
  executeAlertHistoryList,
91
91
  executeAlertHistoryMetrics,
92
92
  executeAlertDeliveryGet
93
- } from "./tool-wd3284dx.js";
93
+ } from "./tool-8agwj920.js";
94
94
  import {
95
95
  TIME_GROUPING_SIZES,
96
96
  validateTimeSelection,
@@ -105,20 +105,20 @@ import {
105
105
  executeDashboardGet,
106
106
  executeDashboardFiltersList,
107
107
  executeDashboardCreate
108
- } from "./tool-v6nd1a3d.js";
108
+ } from "./tool-vmg0kwdc.js";
109
109
  import {
110
110
  FROM_PROCESS_KEY_FLAG,
111
111
  TO_PROCESS_KEY_FLAG
112
112
  } from "./tool-tmssew70.js";
113
113
  import {
114
114
  unwrapPortalEnvelope
115
- } from "./tool-r4r44rs7.js";
115
+ } from "./tool-8x7dk987.js";
116
116
  // package.json
117
117
  var package_default = {
118
118
  name: "@uipath/insights-tool",
119
119
  author: "UiPath",
120
120
  license: "SEE LICENSE IN LICENSE.txt",
121
- version: "1.206.0-preview.312",
121
+ version: "1.206.0-preview.323",
122
122
  description: "Query UiPath Insights data — jobs, failures, and performance metrics.",
123
123
  private: false,
124
124
  repository: {
@@ -443,7 +443,7 @@ function registerDashboardsCommand(program) {
443
443
  if (options.expectedVersion === undefined) {
444
444
  return failValidation("Missing required field: --expected-version.", "Pass the version 'uip insights dashboards get --process-key <guid>' reported for this dashboard.");
445
445
  }
446
- const { executeDashboardUpdate } = await import("./dashboard-update-dyhjzvbs.js");
446
+ const { executeDashboardUpdate } = await import("./dashboard-update-4vn1ax32.js");
447
447
  await executeDashboardUpdate({
448
448
  target,
449
449
  file,
@@ -460,7 +460,7 @@ function registerDashboardsCommand(program) {
460
460
  if (backupFile === undefined) {
461
461
  return;
462
462
  }
463
- const { executeDashboardDelete } = await import("./dashboard-delete-vv1x02gq.js");
463
+ const { executeDashboardDelete } = await import("./dashboard-delete-ha3n0gkt.js");
464
464
  await executeDashboardDelete({
465
465
  target,
466
466
  yes: options.yes,
@@ -483,7 +483,7 @@ function registerDashboardsCommand(program) {
483
483
  if (outputFile === undefined) {
484
484
  return;
485
485
  }
486
- const { executeDashboardCopy } = await import("./dashboard-copy-awhadjby.js");
486
+ const { executeDashboardCopy } = await import("./dashboard-copy-sa18kf2v.js");
487
487
  await executeDashboardCopy({
488
488
  from,
489
489
  to,
@@ -496,7 +496,7 @@ function registerDashboardsCommand(program) {
496
496
  function registerExportConfigurationsCommand(program) {
497
497
  const exportCmd = program.command("export-configurations").description("Read UiPath Insights unified export configurations and check their destinations");
498
498
  exportCmd.command("verify").description("Have Insights test the organization's Azure Event Hub and AWS SQS export destinations with the credentials it has stored; other types come back unprobed. Omit the ID to check every configuration").argument("[configuration-id]", "Export configuration ID (integer); omit to check every configuration except Splunk HEC and unmigrated rows", parseRouteId("[configuration-id]")).trackedAction(processContext, async (configurationId) => {
499
- const { executeExportVerifyAll, executeExportVerifyOne } = await import("./export-configurations-ttrvvb8f.js");
499
+ const { executeExportVerifyAll, executeExportVerifyOne } = await import("./export-configurations-evn99nj1.js");
500
500
  if (configurationId === undefined) {
501
501
  await executeExportVerifyAll();
502
502
  return;
@@ -504,7 +504,7 @@ function registerExportConfigurationsCommand(program) {
504
504
  await executeExportVerifyOne(String(configurationId));
505
505
  });
506
506
  addListPaginationOptions(exportCmd.command("list").description("List the organization's unified export configurations; rows carry no connection string, access key or API key")).trackedAction(processContext, async (options) => {
507
- const { executeExportConfigurationsList } = await import("./export-configurations-ttrvvb8f.js");
507
+ const { executeExportConfigurationsList } = await import("./export-configurations-evn99nj1.js");
508
508
  await executeExportConfigurationsList(options);
509
509
  });
510
510
  }
@@ -3714,4 +3714,4 @@ var registerCommands2 = async (program) => {
3714
3714
 
3715
3715
  export { metadata2, registerCommands2 };
3716
3716
 
3717
- //# debugId=91C8EB337D2B3BA864756E2164756E21
3717
+ //# debugId=0E5FD28EE74F44BB64756E2164756E21
@@ -2127,12 +2127,26 @@ class NodeFileSystem {
2127
2127
  throw error;
2128
2128
  }
2129
2129
  }
2130
- async writeFile(filePath, data) {
2130
+ async writeFile(filePath, data, options) {
2131
2131
  const dir = path.dirname(filePath);
2132
2132
  if (dir) {
2133
2133
  await fs.mkdir(dir, { recursive: true });
2134
2134
  }
2135
- await fs.writeFile(filePath, data);
2135
+ if (options?.mode === undefined || process.platform === "win32") {
2136
+ if (options?.exclusive) {
2137
+ await fs.writeFile(filePath, data, { flag: "wx" });
2138
+ } else {
2139
+ await fs.writeFile(filePath, data);
2140
+ }
2141
+ return;
2142
+ }
2143
+ const handle = await fs.open(filePath, options.exclusive ? "wx" : "w", options.mode);
2144
+ try {
2145
+ await handle.chmod(options.mode);
2146
+ await handle.writeFile(data);
2147
+ } finally {
2148
+ await handle.close();
2149
+ }
2136
2150
  }
2137
2151
  async appendFile(filePath, data) {
2138
2152
  const dir = path.dirname(filePath);
@@ -2167,7 +2181,8 @@ class NodeFileSystem {
2167
2181
  isDirectory: () => stats.isDirectory(),
2168
2182
  size: stats.size,
2169
2183
  mtimeMs: stats.mtimeMs,
2170
- ctimeMs: stats.ctimeMs
2184
+ ctimeMs: stats.ctimeMs,
2185
+ mode: stats.mode
2171
2186
  };
2172
2187
  } catch (error) {
2173
2188
  if (this.isEnoent(error))
@@ -2178,8 +2193,13 @@ class NodeFileSystem {
2178
2193
  async exists(filePath) {
2179
2194
  return existsSync(filePath);
2180
2195
  }
2181
- async mkdir(dirPath) {
2182
- await fs.mkdir(dirPath, { recursive: true });
2196
+ async mkdir(dirPath, options) {
2197
+ await fs.mkdir(dirPath, { recursive: true, mode: options?.mode });
2198
+ }
2199
+ async chmod(targetPath, mode) {
2200
+ if (process.platform === "win32")
2201
+ return;
2202
+ await fs.chmod(targetPath, mode);
2183
2203
  }
2184
2204
  async acquireLock(lockPath) {
2185
2205
  const canonicalPath = await this.canonicalizeLockTarget(lockPath);
@@ -7041,7 +7061,7 @@ var package_default = {
7041
7061
  name: "@uipath/insights-sdk",
7042
7062
  author: "UiPath",
7043
7063
  license: "SEE LICENSE IN LICENSE.txt",
7044
- version: "1.206.0-preview.312",
7064
+ version: "1.206.0-preview.323",
7045
7065
  description: "SDK for the UiPath Insights API — jobs, failures, and performance metrics.",
7046
7066
  repository: {
7047
7067
  type: "git",
@@ -7936,6 +7956,8 @@ function settlePromiseLike2(thenable) {
7936
7956
  // ../auth/src/constants.ts
7937
7957
  var UIPATH_HOME_DIR = ".uipath";
7938
7958
  var AUTH_FILENAME = ".auth";
7959
+ var AUTH_FILE_MODE = 384;
7960
+ var AUTH_DIR_MODE = 448;
7939
7961
  var DEFAULT_BASE_URL = "https://cloud.uipath.com";
7940
7962
  var DEFAULT_AUTH_TIMEOUT_MS2 = 5 * 60 * 1000;
7941
7963
 
@@ -8759,6 +8781,38 @@ var loadEnvFileAsync = async ({ envPath }) => {
8759
8781
  }
8760
8782
  return parseEnvContent(content);
8761
8783
  };
8784
+ var findAuthHomeDir = (fs, dir) => {
8785
+ let current = dir;
8786
+ for (;; ) {
8787
+ if (fs.path.basename(current) === UIPATH_HOME_DIR)
8788
+ return current;
8789
+ const parent = fs.path.dirname(current);
8790
+ if (parent === current)
8791
+ return;
8792
+ current = parent;
8793
+ }
8794
+ };
8795
+ var TEMP_FILE_ATTEMPTS = 5;
8796
+ var isFileExists = (error) => error instanceof Error && error.code === "EEXIST";
8797
+ var writeTempFile = async (fs, targetPath, content) => {
8798
+ for (let attempt = 1;; attempt++) {
8799
+ const tempPath = `${targetPath}.${crypto.randomUUID()}.tmp`;
8800
+ try {
8801
+ await fs.writeFile(tempPath, content, {
8802
+ mode: AUTH_FILE_MODE,
8803
+ exclusive: true
8804
+ });
8805
+ return tempPath;
8806
+ } catch (error) {
8807
+ if (!isFileExists(error)) {
8808
+ await fs.rm(tempPath).catch(() => {});
8809
+ throw error;
8810
+ }
8811
+ if (attempt === TEMP_FILE_ATTEMPTS)
8812
+ throw error;
8813
+ }
8814
+ }
8815
+ };
8762
8816
  var saveEnvFileAsync = async ({
8763
8817
  envPath,
8764
8818
  data,
@@ -8786,10 +8840,18 @@ var saveEnvFileAsync = async ({
8786
8840
  `)}
8787
8841
  `;
8788
8842
  const dir = fs.path.dirname(absolutePath);
8789
- await fs.mkdir(dir);
8790
- const tempPath = `${absolutePath}.tmp`;
8791
- await fs.writeFile(tempPath, content);
8792
- await fs.rename(tempPath, absolutePath);
8843
+ await fs.mkdir(dir, { mode: AUTH_DIR_MODE });
8844
+ const authHomeDir = findAuthHomeDir(fs, dir);
8845
+ if (authHomeDir !== undefined) {
8846
+ await fs.chmod?.(authHomeDir, AUTH_DIR_MODE);
8847
+ }
8848
+ const tempPath = await writeTempFile(fs, absolutePath, content);
8849
+ try {
8850
+ await fs.rename(tempPath, absolutePath);
8851
+ } catch (error) {
8852
+ await fs.rm(tempPath).catch(() => {});
8853
+ throw error;
8854
+ }
8793
8855
  };
8794
8856
 
8795
8857
  // ../auth/src/loginStatus.ts
@@ -10403,4 +10465,4 @@ function createContractGuards(newError) {
10403
10465
 
10404
10466
  export { getFileSystem, catchError, describeConnectivityError, describePermissionError, RESULTS, Command, Option, OutputFormatter, processContext, requireConfirmation, isGuid, createHiddenDeprecatedTenantOption, parseLimit, parseOffset, parseBoundedInt, MODEL_NOT_FOUND_LABEL, DASHBOARD_NOT_FOUND_LABEL, VALIDATION_FAILED_LABEL, CREATE_BACKEND_FAILURE_LABEL, UPDATE_BACKEND_FAILURE_LABEL, PORTAL_ERROR_CODE, LOOKER_USER_UNAVAILABLE_MESSAGE, LOOKER_NO_DASHBOARDS_MESSAGE, InsightsHttpError, InsightsNetworkError, InsightsProtocolError, listAlertDefinitions, listAgenticAlertDefinitions, getAlertDefinition, checkAlertEntitlement, listAlertHistoryDetails, getAlertHistoryMetrics, getDefaultDelivery, insightsPost, createInsightsConfig, DASHBOARD_SLOT_DELIMITER, MAESTRO_DASHBOARD_SOURCE_TYPE, composeDashboardSlotId, isTemplateKeyedDashboardId, getDashboard, listDashboardFilters, DashboardRequestError, createDashboard, updateDashboard, deleteDashboard, listExportConfigurations, verifyAllExportDestinations, verifyExportDestination, listFolderFilters, listProcessFilters, listQueueFilters, listMachineFilters, LOOKER_FOLDERS, LOOKER_THEMES, listLookerDashboards, getLookerDashboardEmbedUrl, parseLookerEnvelope, LookerResolveError, isLookerTemplateDashboardId, readLookerListing, resolveLookerDashboard, getMachineRuntimeMix, getMachineDetails, getMachineAvailabilityTimeline, getMachineTopFailures, getMachineUtilization, getQueueCompletedTimeline, getQueueUncompletedTimeline, getQueueTopFailures, getQueueFailuresByReason, getQueueDetails, getQueueRetryOutcomes, getQueueSummary, getQueueFailureDetails, getQueueSla, getQueueOperationalMetrics, listUsers, getUser, listRoles, getRole, listGroups, getGroup, fail, failValidation, writeNetworkFailure, resolveInsightsConfig, writeInsightsFailure, writeInsightsNotFound, FOLDER_LOOKUP_NOT_FOUND_INSTRUCTIONS, RETRY_LATER_INSTRUCTIONS, writePortalProvisioningNotFound, hasUnreadBody, claimGatedSurface404, writeInsightsError, addMonitoringTimeOptions, validateMonitoringTime, buildMonitoringTimeFields, truncatedNote, pagingCostNote, overPagedNote, EMPTY_LIST_NOTE, joinParts, compareRowKeys, bindInsightsQuery, monitoringDisclosures, monitoringListInstructions, byRowKeys, preserveBackendOrder, claimHttpError, executeInsightsList, executeInsightsGet, isRecord, asRecord, pickScalar, createContractGuards };
10405
10467
 
10406
- //# debugId=D285AE10E4F1DE0B64756E2164756E21
10468
+ //# debugId=82CF3A668C9C2BFC64756E2164756E21
@@ -31,7 +31,7 @@ import {
31
31
  executeInsightsList,
32
32
  isRecord,
33
33
  asRecord
34
- } from "./tool-8t107k66.js";
34
+ } from "./tool-qjvjz5sn.js";
35
35
 
36
36
  // src/utils/validate.ts
37
37
  var TIME_GROUPING_SIZES = ["FifteenMinutes", "Hour", "Day"];
package/dist/tool.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  metadata2,
3
3
  registerCommands2
4
- } from "./tool-m745h695.js";
5
- import"./tool-wd3284dx.js";
6
- import"./tool-r4r44rs7.js";
7
- import"./tool-v6nd1a3d.js";
8
- import"./tool-8t107k66.js";
4
+ } from "./tool-ehw4w0ne.js";
5
+ import"./tool-8agwj920.js";
6
+ import"./tool-8x7dk987.js";
7
+ import"./tool-vmg0kwdc.js";
8
+ import"./tool-qjvjz5sn.js";
9
9
  export {
10
10
  metadata2 as metadata,
11
11
  registerCommands2 as registerCommands
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@uipath/insights-tool",
3
3
  "author": "UiPath",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
- "version": "1.206.0-preview.312",
5
+ "version": "1.206.0-preview.323",
6
6
  "description": "Query UiPath Insights data — jobs, failures, and performance metrics.",
7
7
  "private": false,
8
8
  "repository": {
@@ -27,5 +27,5 @@
27
27
  "files": [
28
28
  "dist"
29
29
  ],
30
- "gitHead": "ee91749054ba110153977dd920a4c84761ce82cd"
30
+ "gitHead": "a752d8a8d78de138e3be0a19642620fec7893d99"
31
31
  }