@uipath/filesystem 1.199.0 → 1.201.0-preview.115

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 (2) hide show
  1. package/dist/index.js +249 -190
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,33 +1,21 @@
1
- // src/node.ts
2
- import { randomUUID } from "node:crypto";
3
- import { existsSync } from "node:fs";
4
- import * as fs6 from "node:fs/promises";
5
- import * as os2 from "node:os";
6
- import * as path2 from "node:path";
7
-
8
- // ../../node_modules/open/index.js
9
- import process8 from "node:process";
10
- import path from "node:path";
11
- import { fileURLToPath } from "node:url";
12
- import childProcess3 from "node:child_process";
13
- import fs5, { constants as fsConstants2 } from "node:fs/promises";
14
-
15
- // ../../node_modules/wsl-utils/index.js
16
- import { promisify as promisify2 } from "node:util";
17
- import childProcess2 from "node:child_process";
18
- import fs4, { constants as fsConstants } from "node:fs/promises";
19
-
20
- // ../../node_modules/wsl-utils/node_modules/is-wsl/index.js
21
- import process2 from "node:process";
22
- import os from "node:os";
23
- import fs3 from "node:fs";
24
-
25
- // ../../node_modules/is-inside-container/index.js
26
- import fs2 from "node:fs";
1
+ var __defProp = Object.defineProperty;
2
+ var __returnValue = (v) => v;
3
+ function __exportSetter(name, newValue) {
4
+ this[name] = __returnValue.bind(null, newValue);
5
+ }
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true,
11
+ configurable: true,
12
+ set: __exportSetter.bind(all, name)
13
+ });
14
+ };
15
+ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
27
16
 
28
17
  // ../../node_modules/is-inside-container/node_modules/is-docker/index.js
29
18
  import fs from "node:fs";
30
- var isDockerCached;
31
19
  function hasDockerEnv() {
32
20
  try {
33
21
  fs.statSync("/.dockerenv");
@@ -49,10 +37,18 @@ function isDocker() {
49
37
  }
50
38
  return isDockerCached;
51
39
  }
40
+ var isDockerCached;
41
+ var init_is_docker = () => {};
52
42
 
53
43
  // ../../node_modules/is-inside-container/index.js
54
- var cachedResult;
55
- var hasContainerEnv = () => {
44
+ import fs2 from "node:fs";
45
+ function isInsideContainer() {
46
+ if (cachedResult === undefined) {
47
+ cachedResult = hasContainerEnv() || isDocker();
48
+ }
49
+ return cachedResult;
50
+ }
51
+ var cachedResult, hasContainerEnv = () => {
56
52
  try {
57
53
  fs2.statSync("/run/.containerenv");
58
54
  return true;
@@ -60,14 +56,14 @@ var hasContainerEnv = () => {
60
56
  return false;
61
57
  }
62
58
  };
63
- function isInsideContainer() {
64
- if (cachedResult === undefined) {
65
- cachedResult = hasContainerEnv() || isDocker();
66
- }
67
- return cachedResult;
68
- }
59
+ var init_is_inside_container = __esm(() => {
60
+ init_is_docker();
61
+ });
69
62
 
70
63
  // ../../node_modules/wsl-utils/node_modules/is-wsl/index.js
64
+ import process2 from "node:process";
65
+ import os from "node:os";
66
+ import fs3 from "node:fs";
71
67
  var isWsl = () => {
72
68
  if (process2.platform !== "linux") {
73
69
  return false;
@@ -87,17 +83,18 @@ var isWsl = () => {
87
83
  return !isInsideContainer();
88
84
  }
89
85
  return false;
90
- };
91
- var is_wsl_default = process2.env.__IS_WSL_TEST__ ? isWsl : isWsl();
86
+ }, is_wsl_default;
87
+ var init_is_wsl = __esm(() => {
88
+ init_is_inside_container();
89
+ is_wsl_default = process2.env.__IS_WSL_TEST__ ? isWsl : isWsl();
90
+ });
92
91
 
93
92
  // ../../node_modules/powershell-utils/index.js
94
93
  import process3 from "node:process";
95
94
  import { Buffer } from "node:buffer";
96
95
  import { promisify } from "node:util";
97
96
  import childProcess from "node:child_process";
98
- var execFile = promisify(childProcess.execFile);
99
- var powerShellPath = () => `${process3.env.SYSTEMROOT || process3.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
100
- var executePowerShell = async (command, options = {}) => {
97
+ var execFile, powerShellPath = () => `${process3.env.SYSTEMROOT || process3.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`, executePowerShell = async (command, options = {}) => {
101
98
  const {
102
99
  powerShellPath: psPath,
103
100
  ...execFileOptions
@@ -111,15 +108,18 @@ var executePowerShell = async (command, options = {}) => {
111
108
  ...execFileOptions
112
109
  });
113
110
  };
114
- executePowerShell.argumentsPrefix = [
115
- "-NoProfile",
116
- "-NonInteractive",
117
- "-ExecutionPolicy",
118
- "Bypass",
119
- "-EncodedCommand"
120
- ];
121
- executePowerShell.encodeCommand = (command) => Buffer.from(command, "utf16le").toString("base64");
122
- executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
111
+ var init_powershell_utils = __esm(() => {
112
+ execFile = promisify(childProcess.execFile);
113
+ executePowerShell.argumentsPrefix = [
114
+ "-NoProfile",
115
+ "-NonInteractive",
116
+ "-ExecutionPolicy",
117
+ "Bypass",
118
+ "-EncodedCommand"
119
+ ];
120
+ executePowerShell.encodeCommand = (command) => Buffer.from(command, "utf16le").toString("base64");
121
+ executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
122
+ });
123
123
 
124
124
  // ../../node_modules/wsl-utils/utilities.js
125
125
  function parseMountPointFromConfig(content) {
@@ -137,40 +137,13 @@ function parseMountPointFromConfig(content) {
137
137
  }
138
138
 
139
139
  // ../../node_modules/wsl-utils/index.js
140
- var execFile2 = promisify2(childProcess2.execFile);
141
- var wslDrivesMountPoint = (() => {
142
- const defaultMountPoint = "/mnt/";
143
- let mountPoint;
144
- return async function() {
145
- if (mountPoint) {
146
- return mountPoint;
147
- }
148
- const configFilePath = "/etc/wsl.conf";
149
- let isConfigFileExists = false;
150
- try {
151
- await fs4.access(configFilePath, fsConstants.F_OK);
152
- isConfigFileExists = true;
153
- } catch {}
154
- if (!isConfigFileExists) {
155
- return defaultMountPoint;
156
- }
157
- const configContent = await fs4.readFile(configFilePath, { encoding: "utf8" });
158
- const parsedMountPoint = parseMountPointFromConfig(configContent);
159
- if (parsedMountPoint === undefined) {
160
- return defaultMountPoint;
161
- }
162
- mountPoint = parsedMountPoint;
163
- mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
164
- return mountPoint;
165
- };
166
- })();
167
- var powerShellPathFromWsl = async () => {
140
+ import { promisify as promisify2 } from "node:util";
141
+ import childProcess2 from "node:child_process";
142
+ import fs4, { constants as fsConstants } from "node:fs/promises";
143
+ var execFile2, wslDrivesMountPoint, powerShellPathFromWsl = async () => {
168
144
  const mountPoint = await wslDrivesMountPoint();
169
145
  return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
170
- };
171
- var powerShellPath2 = is_wsl_default ? powerShellPathFromWsl : powerShellPath;
172
- var canAccessPowerShellPromise;
173
- var canAccessPowerShell = async () => {
146
+ }, powerShellPath2, canAccessPowerShellPromise, canAccessPowerShell = async () => {
174
147
  canAccessPowerShellPromise ??= (async () => {
175
148
  try {
176
149
  const psPath = await powerShellPath2();
@@ -181,14 +154,12 @@ var canAccessPowerShell = async () => {
181
154
  }
182
155
  })();
183
156
  return canAccessPowerShellPromise;
184
- };
185
- var wslDefaultBrowser = async () => {
157
+ }, wslDefaultBrowser = async () => {
186
158
  const psPath = await powerShellPath2();
187
159
  const command = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`;
188
160
  const { stdout } = await executePowerShell(command, { powerShellPath: psPath });
189
161
  return stdout.trim();
190
- };
191
- var convertWslPathToWindows = async (path) => {
162
+ }, convertWslPathToWindows = async (path) => {
192
163
  if (/^[a-z]+:\/\//i.test(path)) {
193
164
  return path;
194
165
  }
@@ -199,6 +170,39 @@ var convertWslPathToWindows = async (path) => {
199
170
  return path;
200
171
  }
201
172
  };
173
+ var init_wsl_utils = __esm(() => {
174
+ init_is_wsl();
175
+ init_powershell_utils();
176
+ init_is_wsl();
177
+ execFile2 = promisify2(childProcess2.execFile);
178
+ wslDrivesMountPoint = (() => {
179
+ const defaultMountPoint = "/mnt/";
180
+ let mountPoint;
181
+ return async function() {
182
+ if (mountPoint) {
183
+ return mountPoint;
184
+ }
185
+ const configFilePath = "/etc/wsl.conf";
186
+ let isConfigFileExists = false;
187
+ try {
188
+ await fs4.access(configFilePath, fsConstants.F_OK);
189
+ isConfigFileExists = true;
190
+ } catch {}
191
+ if (!isConfigFileExists) {
192
+ return defaultMountPoint;
193
+ }
194
+ const configContent = await fs4.readFile(configFilePath, { encoding: "utf8" });
195
+ const parsedMountPoint = parseMountPointFromConfig(configContent);
196
+ if (parsedMountPoint === undefined) {
197
+ return defaultMountPoint;
198
+ }
199
+ mountPoint = parsedMountPoint;
200
+ mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
201
+ return mountPoint;
202
+ };
203
+ })();
204
+ powerShellPath2 = is_wsl_default ? powerShellPathFromWsl : powerShellPath;
205
+ });
202
206
 
203
207
  // ../../node_modules/open/node_modules/define-lazy-prop/index.js
204
208
  function defineLazyProperty(object, propertyName, valueGetter) {
@@ -218,16 +222,10 @@ function defineLazyProperty(object, propertyName, valueGetter) {
218
222
  return object;
219
223
  }
220
224
 
221
- // ../../node_modules/default-browser/index.js
222
- import { promisify as promisify6 } from "node:util";
223
- import process6 from "node:process";
224
- import { execFile as execFile6 } from "node:child_process";
225
-
226
225
  // ../../node_modules/default-browser-id/index.js
227
226
  import { promisify as promisify3 } from "node:util";
228
227
  import process4 from "node:process";
229
228
  import { execFile as execFile3 } from "node:child_process";
230
- var execFileAsync = promisify3(execFile3);
231
229
  async function defaultBrowserId() {
232
230
  if (process4.platform !== "darwin") {
233
231
  throw new Error("macOS only");
@@ -240,12 +238,15 @@ async function defaultBrowserId() {
240
238
  }
241
239
  return browserId;
242
240
  }
241
+ var execFileAsync;
242
+ var init_default_browser_id = __esm(() => {
243
+ execFileAsync = promisify3(execFile3);
244
+ });
243
245
 
244
246
  // ../../node_modules/run-applescript/index.js
245
247
  import process5 from "node:process";
246
248
  import { promisify as promisify4 } from "node:util";
247
249
  import { execFile as execFile4, execFileSync } from "node:child_process";
248
- var execFileAsync2 = promisify4(execFile4);
249
250
  async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
250
251
  if (process5.platform !== "darwin") {
251
252
  throw new Error("macOS only");
@@ -258,39 +259,23 @@ async function runAppleScript(script, { humanReadableOutput = true, signal } = {
258
259
  const { stdout } = await execFileAsync2("osascript", ["-e", script, outputArguments], execOptions);
259
260
  return stdout.trim();
260
261
  }
262
+ var execFileAsync2;
263
+ var init_run_applescript = __esm(() => {
264
+ execFileAsync2 = promisify4(execFile4);
265
+ });
261
266
 
262
267
  // ../../node_modules/bundle-name/index.js
263
268
  async function bundleName(bundleId) {
264
269
  return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string
265
270
  tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
266
271
  }
272
+ var init_bundle_name = __esm(() => {
273
+ init_run_applescript();
274
+ });
267
275
 
268
276
  // ../../node_modules/default-browser/windows.js
269
277
  import { promisify as promisify5 } from "node:util";
270
278
  import { execFile as execFile5 } from "node:child_process";
271
- var execFileAsync3 = promisify5(execFile5);
272
- var windowsBrowserProgIds = {
273
- MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
274
- MSEdgeBHTML: { name: "Edge Beta", id: "com.microsoft.edge.beta" },
275
- MSEdgeDHTML: { name: "Edge Dev", id: "com.microsoft.edge.dev" },
276
- AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
277
- ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
278
- ChromeBHTML: { name: "Chrome Beta", id: "com.google.chrome.beta" },
279
- ChromeDHTML: { name: "Chrome Dev", id: "com.google.chrome.dev" },
280
- ChromiumHTM: { name: "Chromium", id: "org.chromium.Chromium" },
281
- BraveHTML: { name: "Brave", id: "com.brave.Browser" },
282
- BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
283
- BraveDHTML: { name: "Brave Dev", id: "com.brave.Browser.dev" },
284
- BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" },
285
- FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
286
- OperaStable: { name: "Opera", id: "com.operasoftware.Opera" },
287
- VivaldiHTM: { name: "Vivaldi", id: "com.vivaldi.Vivaldi" },
288
- "IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" }
289
- };
290
- var _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
291
-
292
- class UnknownBrowserError extends Error {
293
- }
294
279
  async function defaultBrowser(_execFileAsync = execFileAsync3) {
295
280
  const { stdout } = await _execFileAsync("reg", [
296
281
  "QUERY",
@@ -309,10 +294,36 @@ async function defaultBrowser(_execFileAsync = execFileAsync3) {
309
294
  const baseIdByHyphen = hyphenIndex === -1 ? undefined : id.slice(0, hyphenIndex);
310
295
  return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? { name: id, id };
311
296
  }
297
+ var execFileAsync3, windowsBrowserProgIds, _windowsBrowserProgIdMap, UnknownBrowserError;
298
+ var init_windows = __esm(() => {
299
+ execFileAsync3 = promisify5(execFile5);
300
+ windowsBrowserProgIds = {
301
+ MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
302
+ MSEdgeBHTML: { name: "Edge Beta", id: "com.microsoft.edge.beta" },
303
+ MSEdgeDHTML: { name: "Edge Dev", id: "com.microsoft.edge.dev" },
304
+ AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
305
+ ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
306
+ ChromeBHTML: { name: "Chrome Beta", id: "com.google.chrome.beta" },
307
+ ChromeDHTML: { name: "Chrome Dev", id: "com.google.chrome.dev" },
308
+ ChromiumHTM: { name: "Chromium", id: "org.chromium.Chromium" },
309
+ BraveHTML: { name: "Brave", id: "com.brave.Browser" },
310
+ BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
311
+ BraveDHTML: { name: "Brave Dev", id: "com.brave.Browser.dev" },
312
+ BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" },
313
+ FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
314
+ OperaStable: { name: "Opera", id: "com.operasoftware.Opera" },
315
+ VivaldiHTM: { name: "Vivaldi", id: "com.vivaldi.Vivaldi" },
316
+ "IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" }
317
+ };
318
+ _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
319
+ UnknownBrowserError = class UnknownBrowserError extends Error {
320
+ };
321
+ });
312
322
 
313
323
  // ../../node_modules/default-browser/index.js
314
- var execFileAsync4 = promisify6(execFile6);
315
- var titleize = (string) => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x) => x.toUpperCase());
324
+ import { promisify as promisify6 } from "node:util";
325
+ import process6 from "node:process";
326
+ import { execFile as execFile6 } from "node:child_process";
316
327
  async function defaultBrowser2() {
317
328
  if (process6.platform === "darwin") {
318
329
  const id = await defaultBrowserId();
@@ -330,18 +341,55 @@ async function defaultBrowser2() {
330
341
  }
331
342
  throw new Error("Only macOS, Linux, and Windows are supported");
332
343
  }
344
+ var execFileAsync4, titleize = (string) => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x) => x.toUpperCase());
345
+ var init_default_browser = __esm(() => {
346
+ init_default_browser_id();
347
+ init_bundle_name();
348
+ init_windows();
349
+ init_windows();
350
+ execFileAsync4 = promisify6(execFile6);
351
+ });
333
352
 
334
353
  // ../../node_modules/is-in-ssh/index.js
335
354
  import process7 from "node:process";
336
- var isInSsh = Boolean(process7.env.SSH_CONNECTION || process7.env.SSH_CLIENT || process7.env.SSH_TTY);
337
- var is_in_ssh_default = isInSsh;
355
+ var isInSsh, is_in_ssh_default;
356
+ var init_is_in_ssh = __esm(() => {
357
+ isInSsh = Boolean(process7.env.SSH_CONNECTION || process7.env.SSH_CLIENT || process7.env.SSH_TTY);
358
+ is_in_ssh_default = isInSsh;
359
+ });
338
360
 
339
361
  // ../../node_modules/open/index.js
340
- var fallbackAttemptSymbol = Symbol("fallbackAttempt");
341
- var __dirname2 = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
342
- var localXdgOpenPath = path.join(__dirname2, "xdg-open");
343
- var { platform, arch } = process8;
344
- var tryEachApp = async (apps, opener) => {
362
+ var exports_open = {};
363
+ __export(exports_open, {
364
+ openApp: () => openApp,
365
+ default: () => open_default,
366
+ apps: () => apps
367
+ });
368
+ import process8 from "node:process";
369
+ import path from "node:path";
370
+ import { fileURLToPath } from "node:url";
371
+ import childProcess3 from "node:child_process";
372
+ import fs5, { constants as fsConstants2 } from "node:fs/promises";
373
+ function detectArchBinary(binary) {
374
+ if (typeof binary === "string" || Array.isArray(binary)) {
375
+ return binary;
376
+ }
377
+ const { [arch]: archBinary } = binary;
378
+ if (!archBinary) {
379
+ throw new Error(`${arch} is not supported`);
380
+ }
381
+ return archBinary;
382
+ }
383
+ function detectPlatformBinary({ [platform]: platformBinary }, { wsl } = {}) {
384
+ if (wsl && is_wsl_default) {
385
+ return detectArchBinary(wsl);
386
+ }
387
+ if (!platformBinary) {
388
+ throw new Error(`${platform} is not supported`);
389
+ }
390
+ return detectArchBinary(platformBinary);
391
+ }
392
+ var fallbackAttemptSymbol, __dirname2, localXdgOpenPath, platform, arch, tryEachApp = async (apps, opener) => {
345
393
  if (apps.length === 0) {
346
394
  return;
347
395
  }
@@ -354,8 +402,7 @@ var tryEachApp = async (apps, opener) => {
354
402
  }
355
403
  }
356
404
  throw new AggregateError(errors, "Failed to open in all supported apps");
357
- };
358
- var baseOpen = async (options) => {
405
+ }, baseOpen = async (options) => {
359
406
  options = {
360
407
  wait: false,
361
408
  background: false,
@@ -543,8 +590,7 @@ var baseOpen = async (options) => {
543
590
  resolve(subprocess);
544
591
  });
545
592
  });
546
- };
547
- var open = (target, options) => {
593
+ }, open = (target, options) => {
548
594
  if (typeof target !== "string") {
549
595
  throw new TypeError("Expected a `target`");
550
596
  }
@@ -552,70 +598,82 @@ var open = (target, options) => {
552
598
  ...options,
553
599
  target
554
600
  });
555
- };
556
- function detectArchBinary(binary) {
557
- if (typeof binary === "string" || Array.isArray(binary)) {
558
- return binary;
601
+ }, openApp = (name, options) => {
602
+ if (typeof name !== "string" && !Array.isArray(name)) {
603
+ throw new TypeError("Expected a valid `name`");
559
604
  }
560
- const { [arch]: archBinary } = binary;
561
- if (!archBinary) {
562
- throw new Error(`${arch} is not supported`);
563
- }
564
- return archBinary;
565
- }
566
- function detectPlatformBinary({ [platform]: platformBinary }, { wsl } = {}) {
567
- if (wsl && is_wsl_default) {
568
- return detectArchBinary(wsl);
605
+ const { arguments: appArguments = [] } = options ?? {};
606
+ if (appArguments !== undefined && appArguments !== null && !Array.isArray(appArguments)) {
607
+ throw new TypeError("Expected `appArguments` as Array type");
569
608
  }
570
- if (!platformBinary) {
571
- throw new Error(`${platform} is not supported`);
572
- }
573
- return detectArchBinary(platformBinary);
574
- }
575
- var apps = {
576
- browser: "browser",
577
- browserPrivate: "browserPrivate"
578
- };
579
- defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
580
- darwin: "google chrome",
581
- win32: "chrome",
582
- linux: ["google-chrome", "google-chrome-stable", "chromium", "chromium-browser"]
583
- }, {
584
- wsl: {
585
- ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
586
- x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
587
- }
588
- }));
589
- defineLazyProperty(apps, "brave", () => detectPlatformBinary({
590
- darwin: "brave browser",
591
- win32: "brave",
592
- linux: ["brave-browser", "brave"]
593
- }, {
594
- wsl: {
595
- ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
596
- x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
597
- }
598
- }));
599
- defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
600
- darwin: "firefox",
601
- win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
602
- linux: "firefox"
603
- }, {
604
- wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
605
- }));
606
- defineLazyProperty(apps, "edge", () => detectPlatformBinary({
607
- darwin: "microsoft edge",
608
- win32: "msedge",
609
- linux: ["microsoft-edge", "microsoft-edge-dev"]
610
- }, {
611
- wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
612
- }));
613
- defineLazyProperty(apps, "safari", () => detectPlatformBinary({
614
- darwin: "Safari"
615
- }));
616
- var open_default = open;
609
+ return baseOpen({
610
+ ...options,
611
+ app: {
612
+ name,
613
+ arguments: appArguments
614
+ }
615
+ });
616
+ }, apps, open_default;
617
+ var init_open = __esm(() => {
618
+ init_wsl_utils();
619
+ init_powershell_utils();
620
+ init_default_browser();
621
+ init_is_inside_container();
622
+ init_is_in_ssh();
623
+ fallbackAttemptSymbol = Symbol("fallbackAttempt");
624
+ __dirname2 = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
625
+ localXdgOpenPath = path.join(__dirname2, "xdg-open");
626
+ ({ platform, arch } = process8);
627
+ apps = {
628
+ browser: "browser",
629
+ browserPrivate: "browserPrivate"
630
+ };
631
+ defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
632
+ darwin: "google chrome",
633
+ win32: "chrome",
634
+ linux: ["google-chrome", "google-chrome-stable", "chromium", "chromium-browser"]
635
+ }, {
636
+ wsl: {
637
+ ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
638
+ x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
639
+ }
640
+ }));
641
+ defineLazyProperty(apps, "brave", () => detectPlatformBinary({
642
+ darwin: "brave browser",
643
+ win32: "brave",
644
+ linux: ["brave-browser", "brave"]
645
+ }, {
646
+ wsl: {
647
+ ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
648
+ x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
649
+ }
650
+ }));
651
+ defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
652
+ darwin: "firefox",
653
+ win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
654
+ linux: "firefox"
655
+ }, {
656
+ wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
657
+ }));
658
+ defineLazyProperty(apps, "edge", () => detectPlatformBinary({
659
+ darwin: "microsoft edge",
660
+ win32: "msedge",
661
+ linux: ["microsoft-edge", "microsoft-edge-dev"]
662
+ }, {
663
+ wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
664
+ }));
665
+ defineLazyProperty(apps, "safari", () => detectPlatformBinary({
666
+ darwin: "Safari"
667
+ }));
668
+ open_default = open;
669
+ });
617
670
 
618
671
  // src/node.ts
672
+ import { randomUUID } from "node:crypto";
673
+ import { existsSync } from "node:fs";
674
+ import * as fs6 from "node:fs/promises";
675
+ import * as os2 from "node:os";
676
+ import * as path2 from "node:path";
619
677
  var LOCK_HEARTBEAT_MS = 5000;
620
678
  var LOCK_STALE_MS = 15000;
621
679
  var LOCK_MAX_WAIT_MS = 20000;
@@ -640,7 +698,8 @@ class NodeFileSystem {
640
698
  };
641
699
  utils = {
642
700
  open: async (url) => {
643
- await open_default(url);
701
+ const { default: open2 } = await Promise.resolve().then(() => (init_open(), exports_open));
702
+ await open2(url);
644
703
  }
645
704
  };
646
705
  async readFile(path3, options) {
@@ -847,4 +906,4 @@ export {
847
906
  NodeFileSystem
848
907
  };
849
908
 
850
- //# debugId=D0E58AB3184276FA64756E2164756E21
909
+ //# debugId=5A440D26E480513164756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/filesystem",
3
3
  "license": "MIT",
4
- "version": "1.199.0",
4
+ "version": "1.201.0-preview.115",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/UiPath/cli.git",
@@ -37,5 +37,5 @@
37
37
  "mihaigirleanu",
38
38
  "vlad-uipath"
39
39
  ],
40
- "gitHead": "723e6801b77b5926ba75e75b6a756cc38b1b7adc"
40
+ "gitHead": "f1086b73654d7728cb71f280588b3e0c77d535fc"
41
41
  }