@uipath/data-fabric-tool 1.206.0-preview.311 → 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.
@@ -10,7 +10,7 @@ import {
10
10
  unsupportedSolutionProjectType,
11
11
  validateSchemaMetadata,
12
12
  validateFieldsPayload
13
- } from "./packager-tool-gj7vsn2f.js";
13
+ } from "./packager-tool-51drc0mg.js";
14
14
  import {
15
15
  catchError,
16
16
  validateNameFormat
@@ -47,7 +47,7 @@ import {
47
47
  failWithCode,
48
48
  requireDestructiveConfirmation,
49
49
  readJsonInput
50
- } from "./packager-tool-cbbznax3.js";
50
+ } from "./packager-tool-kksht576.js";
51
51
  import {
52
52
  __toESM,
53
53
  __commonJS
@@ -537,7 +537,7 @@ var package_default = {
537
537
  name: "@uipath/solution-sdk",
538
538
  author: "UiPath",
539
539
  license: "SEE LICENSE IN LICENSE.txt",
540
- version: "1.206.0-preview.311",
540
+ version: "1.206.0-preview.323",
541
541
  repository: {
542
542
  type: "git",
543
543
  url: "https://github.com/UiPath/cli.git",
@@ -2789,4 +2789,4 @@ export {
2789
2789
  runLocalValidate
2790
2790
  };
2791
2791
 
2792
- //# debugId=6444E16B81EEE0BF64756E2164756E21
2792
+ //# debugId=CE43B160D18668B164756E2164756E21
@@ -2,7 +2,7 @@ import {
2
2
  getSdkUserAgentToken,
3
3
  addSdkUserAgentHeader,
4
4
  installSdkUserAgentHeader
5
- } from "./packager-tool-gj7vsn2f.js";
5
+ } from "./packager-tool-51drc0mg.js";
6
6
  import {
7
7
  catchError,
8
8
  validateName
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  getAuthContext,
12
12
  EntityFieldDataType
13
- } from "./packager-tool-b1anyew3.js";
13
+ } from "./packager-tool-m3ja9hfs.js";
14
14
 
15
15
  // ../integrationservice-sdk/generated/connections/src/runtime.ts
16
16
  var BASE_PATH = "https://alpha.uipath.com/entity/Azure/connections_".replace(/\/+$/, "");
@@ -543,7 +543,7 @@ var package_default = {
543
543
  name: "@uipath/integrationservice-sdk",
544
544
  author: "UiPath",
545
545
  license: "SEE LICENSE IN LICENSE.txt",
546
- version: "1.206.0-preview.311",
546
+ version: "1.206.0-preview.323",
547
547
  repository: {
548
548
  type: "git",
549
549
  url: "https://github.com/UiPath/cli.git",
@@ -7365,4 +7365,4 @@ export {
7365
7365
  validateFederatedTopology
7366
7366
  };
7367
7367
 
7368
- //# debugId=4D4AED135AC85A8864756E2164756E21
7368
+ //# debugId=18C5859DF34CA16664756E2164756E21
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env bun
2
2
  import {
3
3
  Command
4
- } from "./packager-tool-gj7vsn2f.js";
4
+ } from "./packager-tool-51drc0mg.js";
5
5
  import"./packager-tool-8h3n7zh5.js";
6
- import"./packager-tool-b1anyew3.js";
6
+ import"./packager-tool-m3ja9hfs.js";
7
7
  import {
8
8
  metadata2,
9
9
  registerCommands2
10
- } from "./packager-tool-ycs22xzc.js";
11
- import"./packager-tool-cbbznax3.js";
10
+ } from "./packager-tool-cejkqap7.js";
11
+ import"./packager-tool-kksht576.js";
12
12
 
13
13
  // src/index.ts
14
14
  var program = new Command;
@@ -2319,12 +2319,26 @@ class NodeFileSystem {
2319
2319
  throw error;
2320
2320
  }
2321
2321
  }
2322
- async writeFile(filePath, data) {
2322
+ async writeFile(filePath, data, options) {
2323
2323
  const dir = path.dirname(filePath);
2324
2324
  if (dir) {
2325
2325
  await fs.mkdir(dir, { recursive: true });
2326
2326
  }
2327
- await fs.writeFile(filePath, data);
2327
+ if (options?.mode === undefined || process.platform === "win32") {
2328
+ if (options?.exclusive) {
2329
+ await fs.writeFile(filePath, data, { flag: "wx" });
2330
+ } else {
2331
+ await fs.writeFile(filePath, data);
2332
+ }
2333
+ return;
2334
+ }
2335
+ const handle = await fs.open(filePath, options.exclusive ? "wx" : "w", options.mode);
2336
+ try {
2337
+ await handle.chmod(options.mode);
2338
+ await handle.writeFile(data);
2339
+ } finally {
2340
+ await handle.close();
2341
+ }
2328
2342
  }
2329
2343
  async appendFile(filePath, data) {
2330
2344
  const dir = path.dirname(filePath);
@@ -2359,7 +2373,8 @@ class NodeFileSystem {
2359
2373
  isDirectory: () => stats.isDirectory(),
2360
2374
  size: stats.size,
2361
2375
  mtimeMs: stats.mtimeMs,
2362
- ctimeMs: stats.ctimeMs
2376
+ ctimeMs: stats.ctimeMs,
2377
+ mode: stats.mode
2363
2378
  };
2364
2379
  } catch (error) {
2365
2380
  if (this.isEnoent(error))
@@ -2370,8 +2385,13 @@ class NodeFileSystem {
2370
2385
  async exists(filePath) {
2371
2386
  return existsSync(filePath);
2372
2387
  }
2373
- async mkdir(dirPath) {
2374
- await fs.mkdir(dirPath, { recursive: true });
2388
+ async mkdir(dirPath, options) {
2389
+ await fs.mkdir(dirPath, { recursive: true, mode: options?.mode });
2390
+ }
2391
+ async chmod(targetPath, mode) {
2392
+ if (process.platform === "win32")
2393
+ return;
2394
+ await fs.chmod(targetPath, mode);
2375
2395
  }
2376
2396
  async acquireLock(lockPath) {
2377
2397
  const canonicalPath = await this.canonicalizeLockTarget(lockPath);
@@ -6687,4 +6707,4 @@ function validateFieldsPayload(fields, entityName, isNewEntity = false) {
6687
6707
 
6688
6708
  export { getFileSystem, extractErrorMessage, runChecks, RESULTS, Command, Option, logger, OutputFormatter, processContext, requireConfirmation, warnDeprecatedOptionAlias, createHiddenDeprecatedTenantOption, getSdkUserAgentToken, addSdkUserAgentHeader, installSdkUserAgentHeader, quoteForShell, unsupportedSolutionProjectType, readStdin, validateSchemaMetadata, findInvalidFieldMetadata, validateChoiceValueName, validateChoiceValueDisplayName, validateQueryFilter, validateQueryAggregates, findFilePayloadKeys, findIsUniqueInUpdateFields, validateFieldsPayload };
6689
6709
 
6690
- //# debugId=C6EC12BF1466A42E64756E2164756E21
6710
+ //# debugId=85D7459D46789C4D64756E2164756E21
@@ -17,7 +17,7 @@ import {
17
17
  findFilePayloadKeys,
18
18
  findIsUniqueInUpdateFields,
19
19
  validateFieldsPayload
20
- } from "./packager-tool-gj7vsn2f.js";
20
+ } from "./packager-tool-51drc0mg.js";
21
21
  import {
22
22
  catchError,
23
23
  validateName
@@ -28,20 +28,20 @@ import {
28
28
  EntityClass,
29
29
  DataFabricDirectoryEntityTypeName,
30
30
  UiPath
31
- } from "./packager-tool-b1anyew3.js";
31
+ } from "./packager-tool-m3ja9hfs.js";
32
32
  import {
33
33
  fail,
34
34
  failInvalidArgument,
35
35
  requireDestructiveConfirmation,
36
36
  readFileBinary,
37
37
  readJsonInput
38
- } from "./packager-tool-cbbznax3.js";
38
+ } from "./packager-tool-kksht576.js";
39
39
  // package.json
40
40
  var package_default = {
41
41
  name: "@uipath/data-fabric-tool",
42
42
  author: "UiPath",
43
43
  license: "SEE LICENSE IN LICENSE.txt",
44
- version: "1.206.0-preview.311",
44
+ version: "1.206.0-preview.323",
45
45
  description: "Manage Data Fabric entities and records.",
46
46
  publishConfig: {
47
47
  registry: "https://npm.pkg.github.com/"
@@ -1126,7 +1126,7 @@ async function loadLocalHandlersAsync() {
1126
1126
  runLocalList,
1127
1127
  runLocalUpdate,
1128
1128
  runLocalValidate
1129
- } = await import("./entities-inline-pmjnh3pe.js");
1129
+ } = await import("./entities-inline-pp3j5vbx.js");
1130
1130
  if (LOCAL_AUTHORING_AVAILABLE !== true) {
1131
1131
  failInvalidArgument("--local is not available in this environment", "Local authoring reads and writes the solution on disk, which this build cannot reach. Run the command with the uip CLI on a machine that has the solution checked out.");
1132
1132
  return;
@@ -1289,7 +1289,7 @@ var registerEntitiesCommand = (program) => {
1289
1289
  createFederatedMetadataProvider,
1290
1290
  expandFederatedCreate,
1291
1291
  validateFederatedTopology
1292
- } = await import("./federated-payload-gq9dd4tc.js");
1292
+ } = await import("./federated-payload-t83tjzpa.js");
1293
1293
  try {
1294
1294
  validateFederatedTopology(definition.externalFields, definition.joins ?? []);
1295
1295
  } catch (err) {
@@ -1490,7 +1490,7 @@ var registerEntitiesCommand = (program) => {
1490
1490
  existingSources,
1491
1491
  expandFederatedUpdate,
1492
1492
  sourceKey
1493
- } = await import("./federated-payload-gq9dd4tc.js");
1493
+ } = await import("./federated-payload-t83tjzpa.js");
1494
1494
  const [entityErr, entity] = await catchError(sdk.entities.getById(id, options.folderKey ? { folderKey: options.folderKey } : undefined));
1495
1495
  if (entityErr || !entity) {
1496
1496
  return fail(`Could not read entity '${id}' to build the federated update`, "Check the entity id exists and you have access — 'df entities get <id>' (add --folder-key for a folder-scoped entity). If it exists, the service may be briefly unavailable; retry.");
@@ -2341,4 +2341,4 @@ var registerCommands2 = async (program) => {
2341
2341
 
2342
2342
  export { metadata2, registerCommands2 };
2343
2343
 
2344
- //# debugId=7D9109CCE962B7F564756E2164756E21
2344
+ //# debugId=F3D057D2B01243AA64756E2164756E21
@@ -6,7 +6,7 @@ import {
6
6
  requireConfirmation,
7
7
  warnDeprecatedOptionAlias,
8
8
  readStdin
9
- } from "./packager-tool-gj7vsn2f.js";
9
+ } from "./packager-tool-51drc0mg.js";
10
10
 
11
11
  // src/utils/output.ts
12
12
  function fail(message, instructions) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getFileSystem
3
- } from "./packager-tool-gj7vsn2f.js";
3
+ } from "./packager-tool-51drc0mg.js";
4
4
  import {
5
5
  require_src
6
6
  } from "./packager-tool-4b88bsfh.js";
@@ -17077,6 +17077,8 @@ function settlePromiseLike(thenable) {
17077
17077
  // ../auth/src/constants.ts
17078
17078
  var UIPATH_HOME_DIR = ".uipath";
17079
17079
  var AUTH_FILENAME = ".auth";
17080
+ var AUTH_FILE_MODE = 384;
17081
+ var AUTH_DIR_MODE = 448;
17080
17082
  var DEFAULT_BASE_URL = "https://cloud.uipath.com";
17081
17083
  var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
17082
17084
 
@@ -17900,6 +17902,38 @@ var loadEnvFileAsync = async ({ envPath }) => {
17900
17902
  }
17901
17903
  return parseEnvContent(content);
17902
17904
  };
17905
+ var findAuthHomeDir = (fs, dir) => {
17906
+ let current = dir;
17907
+ for (;; ) {
17908
+ if (fs.path.basename(current) === UIPATH_HOME_DIR)
17909
+ return current;
17910
+ const parent = fs.path.dirname(current);
17911
+ if (parent === current)
17912
+ return;
17913
+ current = parent;
17914
+ }
17915
+ };
17916
+ var TEMP_FILE_ATTEMPTS = 5;
17917
+ var isFileExists = (error) => error instanceof Error && error.code === "EEXIST";
17918
+ var writeTempFile = async (fs, targetPath, content) => {
17919
+ for (let attempt = 1;; attempt++) {
17920
+ const tempPath = `${targetPath}.${crypto.randomUUID()}.tmp`;
17921
+ try {
17922
+ await fs.writeFile(tempPath, content, {
17923
+ mode: AUTH_FILE_MODE,
17924
+ exclusive: true
17925
+ });
17926
+ return tempPath;
17927
+ } catch (error) {
17928
+ if (!isFileExists(error)) {
17929
+ await fs.rm(tempPath).catch(() => {});
17930
+ throw error;
17931
+ }
17932
+ if (attempt === TEMP_FILE_ATTEMPTS)
17933
+ throw error;
17934
+ }
17935
+ }
17936
+ };
17903
17937
  var saveEnvFileAsync = async ({
17904
17938
  envPath,
17905
17939
  data,
@@ -17927,10 +17961,18 @@ var saveEnvFileAsync = async ({
17927
17961
  `)}
17928
17962
  `;
17929
17963
  const dir = fs.path.dirname(absolutePath);
17930
- await fs.mkdir(dir);
17931
- const tempPath = `${absolutePath}.tmp`;
17932
- await fs.writeFile(tempPath, content);
17933
- await fs.rename(tempPath, absolutePath);
17964
+ await fs.mkdir(dir, { mode: AUTH_DIR_MODE });
17965
+ const authHomeDir = findAuthHomeDir(fs, dir);
17966
+ if (authHomeDir !== undefined) {
17967
+ await fs.chmod?.(authHomeDir, AUTH_DIR_MODE);
17968
+ }
17969
+ const tempPath = await writeTempFile(fs, absolutePath, content);
17970
+ try {
17971
+ await fs.rename(tempPath, absolutePath);
17972
+ } catch (error) {
17973
+ await fs.rm(tempPath).catch(() => {});
17974
+ throw error;
17975
+ }
17934
17976
  };
17935
17977
 
17936
17978
  // ../auth/src/loginStatus.ts
@@ -18527,4 +18569,4 @@ var TENANT_SELECTION_CODES = new Set([
18527
18569
  ]);
18528
18570
  export { getAuthContext, EntityFieldDataType, EntityClass, DataFabricDirectoryEntityTypeName, UiPath };
18529
18571
 
18530
- //# debugId=5429927AC4419CDF64756E2164756E21
18572
+ //# debugId=DCCD544AFC55DC0064756E2164756E21
package/dist/tool.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  metadata2,
3
3
  registerCommands2
4
- } from "./packager-tool-ycs22xzc.js";
5
- import"./packager-tool-b1anyew3.js";
6
- import"./packager-tool-cbbznax3.js";
7
- import"./packager-tool-gj7vsn2f.js";
4
+ } from "./packager-tool-cejkqap7.js";
5
+ import"./packager-tool-m3ja9hfs.js";
6
+ import"./packager-tool-kksht576.js";
7
+ import"./packager-tool-51drc0mg.js";
8
8
  import"./packager-tool-8h3n7zh5.js";
9
9
  export {
10
10
  metadata2 as metadata,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@uipath/data-fabric-tool",
3
3
  "author": "UiPath",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
- "version": "1.206.0-preview.311",
5
+ "version": "1.206.0-preview.323",
6
6
  "description": "Manage Data Fabric entities and records.",
7
7
  "publishConfig": {
8
8
  "registry": "https://registry.npmjs.org/"
@@ -19,5 +19,5 @@
19
19
  "files": [
20
20
  "dist"
21
21
  ],
22
- "gitHead": "562a7f94aae12bb340f2b18932e8809c3d76a3e0"
22
+ "gitHead": "a752d8a8d78de138e3be0a19642620fec7893d99"
23
23
  }