@uipath/solution-tool 1.200.0-preview.109 → 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 (29) hide show
  1. package/dist/{browser-strategy-brs3w53e.js → browser-strategy-yccf8mtd.js} +1 -1
  2. package/dist/deploy.js +5 -5
  3. package/dist/index-2fj08e7n.js +2058 -0
  4. package/dist/index-w03qc9m8.js +634 -0
  5. package/dist/index.js +11 -11
  6. package/dist/init.js +5 -5
  7. package/dist/js-yaml-4ypbq2tt.js +3145 -0
  8. package/dist/node-strategy-12qfy0nv.js +348 -0
  9. package/dist/pack.js +8 -20
  10. package/dist/{packager-tool-1ps2qeqg.js → packager-tool-5arsyj36.js} +3 -2
  11. package/dist/packager-tool-7eva0peq.js +265 -0
  12. package/dist/{packager-tool-kfzzznjr.js → packager-tool-85x8cje1.js} +2 -2
  13. package/dist/{packager-tool-sdhdmkt8.js → packager-tool-9vehmnke.js} +2 -1
  14. package/dist/{packager-tool-gnmkvkz3.js → packager-tool-9x8dbxbn.js} +675 -29
  15. package/dist/{packager-tool-gkwmyc48.js → packager-tool-arbagkf2.js} +28 -13
  16. package/dist/{packager-tool-rdxaysxe.js → packager-tool-c84z58bt.js} +65 -8
  17. package/dist/{packager-tool-br2aa2fh.js → packager-tool-n49qbf8m.js} +10 -18
  18. package/dist/{packager-tool-37g19zk3.js → packager-tool-ngh4qwjv.js} +4 -4
  19. package/dist/{packager-tool-y4wacqkp.js → packager-tool-r9n45rjm.js} +1059 -6017
  20. package/dist/{packager-tool-7efxm815.js → packager-tool-y35nbbkm.js} +6243 -5846
  21. package/dist/packager-tool.js +1 -1
  22. package/dist/publish.js +5 -5
  23. package/dist/resource.js +4 -4
  24. package/dist/services/feed-resolver.d.ts +4 -5
  25. package/dist/templates/AGENTS.md +2 -1
  26. package/dist/tool.js +11 -11
  27. package/package.json +2 -2
  28. package/dist/node-strategy-a4n0d6dx.js +0 -63
  29. package/dist/packager-tool-q90kqh83.js +0 -1161
@@ -0,0 +1,634 @@
1
+ import"./packager-tool-0v6na3yp.js";
2
+
3
+ // ../../node_modules/open/index.js
4
+ import process7 from "node:process";
5
+ import path from "node:path";
6
+ import { fileURLToPath } from "node:url";
7
+ import childProcess3 from "node:child_process";
8
+ import fs5, { constants as fsConstants2 } from "node:fs/promises";
9
+
10
+ // ../../node_modules/wsl-utils/index.js
11
+ import { promisify as promisify2 } from "node:util";
12
+ import childProcess2 from "node:child_process";
13
+ import fs4, { constants as fsConstants } from "node:fs/promises";
14
+
15
+ // ../../node_modules/wsl-utils/node_modules/is-wsl/index.js
16
+ import process from "node:process";
17
+ import os from "node:os";
18
+ import fs3 from "node:fs";
19
+
20
+ // ../../node_modules/is-inside-container/index.js
21
+ import fs2 from "node:fs";
22
+
23
+ // ../../node_modules/is-inside-container/node_modules/is-docker/index.js
24
+ import fs from "node:fs";
25
+ var isDockerCached;
26
+ function hasDockerEnv() {
27
+ try {
28
+ fs.statSync("/.dockerenv");
29
+ return true;
30
+ } catch {
31
+ return false;
32
+ }
33
+ }
34
+ function hasDockerCGroup() {
35
+ try {
36
+ return fs.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
37
+ } catch {
38
+ return false;
39
+ }
40
+ }
41
+ function isDocker() {
42
+ if (isDockerCached === undefined) {
43
+ isDockerCached = hasDockerEnv() || hasDockerCGroup();
44
+ }
45
+ return isDockerCached;
46
+ }
47
+
48
+ // ../../node_modules/is-inside-container/index.js
49
+ var cachedResult;
50
+ var hasContainerEnv = () => {
51
+ try {
52
+ fs2.statSync("/run/.containerenv");
53
+ return true;
54
+ } catch {
55
+ return false;
56
+ }
57
+ };
58
+ function isInsideContainer() {
59
+ if (cachedResult === undefined) {
60
+ cachedResult = hasContainerEnv() || isDocker();
61
+ }
62
+ return cachedResult;
63
+ }
64
+
65
+ // ../../node_modules/wsl-utils/node_modules/is-wsl/index.js
66
+ var isWsl = () => {
67
+ if (process.platform !== "linux") {
68
+ return false;
69
+ }
70
+ if (os.release().toLowerCase().includes("microsoft")) {
71
+ if (isInsideContainer()) {
72
+ return false;
73
+ }
74
+ return true;
75
+ }
76
+ try {
77
+ if (fs3.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft")) {
78
+ return !isInsideContainer();
79
+ }
80
+ } catch {}
81
+ if (fs3.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop") || fs3.existsSync("/run/WSL")) {
82
+ return !isInsideContainer();
83
+ }
84
+ return false;
85
+ };
86
+ var is_wsl_default = process.env.__IS_WSL_TEST__ ? isWsl : isWsl();
87
+
88
+ // ../../node_modules/powershell-utils/index.js
89
+ import process2 from "node:process";
90
+ import { Buffer } from "node:buffer";
91
+ import { promisify } from "node:util";
92
+ import childProcess from "node:child_process";
93
+ var execFile = promisify(childProcess.execFile);
94
+ var powerShellPath = () => `${process2.env.SYSTEMROOT || process2.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
95
+ var executePowerShell = async (command, options = {}) => {
96
+ const {
97
+ powerShellPath: psPath,
98
+ ...execFileOptions
99
+ } = options;
100
+ const encodedCommand = executePowerShell.encodeCommand(command);
101
+ return execFile(psPath ?? powerShellPath(), [
102
+ ...executePowerShell.argumentsPrefix,
103
+ encodedCommand
104
+ ], {
105
+ encoding: "utf8",
106
+ ...execFileOptions
107
+ });
108
+ };
109
+ executePowerShell.argumentsPrefix = [
110
+ "-NoProfile",
111
+ "-NonInteractive",
112
+ "-ExecutionPolicy",
113
+ "Bypass",
114
+ "-EncodedCommand"
115
+ ];
116
+ executePowerShell.encodeCommand = (command) => Buffer.from(command, "utf16le").toString("base64");
117
+ executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
118
+
119
+ // ../../node_modules/wsl-utils/utilities.js
120
+ function parseMountPointFromConfig(content) {
121
+ for (const line of content.split(`
122
+ `)) {
123
+ if (/^\s*#/.test(line)) {
124
+ continue;
125
+ }
126
+ const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line);
127
+ if (!match) {
128
+ continue;
129
+ }
130
+ return match.groups.mountPoint.trim().replaceAll(/^["']|["']$/g, "");
131
+ }
132
+ }
133
+
134
+ // ../../node_modules/wsl-utils/index.js
135
+ var execFile2 = promisify2(childProcess2.execFile);
136
+ var wslDrivesMountPoint = (() => {
137
+ const defaultMountPoint = "/mnt/";
138
+ let mountPoint;
139
+ return async function() {
140
+ if (mountPoint) {
141
+ return mountPoint;
142
+ }
143
+ const configFilePath = "/etc/wsl.conf";
144
+ let isConfigFileExists = false;
145
+ try {
146
+ await fs4.access(configFilePath, fsConstants.F_OK);
147
+ isConfigFileExists = true;
148
+ } catch {}
149
+ if (!isConfigFileExists) {
150
+ return defaultMountPoint;
151
+ }
152
+ const configContent = await fs4.readFile(configFilePath, { encoding: "utf8" });
153
+ const parsedMountPoint = parseMountPointFromConfig(configContent);
154
+ if (parsedMountPoint === undefined) {
155
+ return defaultMountPoint;
156
+ }
157
+ mountPoint = parsedMountPoint;
158
+ mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
159
+ return mountPoint;
160
+ };
161
+ })();
162
+ var powerShellPathFromWsl = async () => {
163
+ const mountPoint = await wslDrivesMountPoint();
164
+ return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
165
+ };
166
+ var powerShellPath2 = is_wsl_default ? powerShellPathFromWsl : powerShellPath;
167
+ var canAccessPowerShellPromise;
168
+ var canAccessPowerShell = async () => {
169
+ canAccessPowerShellPromise ??= (async () => {
170
+ try {
171
+ const psPath = await powerShellPath2();
172
+ await fs4.access(psPath, fsConstants.X_OK);
173
+ return true;
174
+ } catch {
175
+ return false;
176
+ }
177
+ })();
178
+ return canAccessPowerShellPromise;
179
+ };
180
+ var wslDefaultBrowser = async () => {
181
+ const psPath = await powerShellPath2();
182
+ const command = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`;
183
+ const { stdout } = await executePowerShell(command, { powerShellPath: psPath });
184
+ return stdout.trim();
185
+ };
186
+ var convertWslPathToWindows = async (path) => {
187
+ if (/^[a-z]+:\/\//i.test(path)) {
188
+ return path;
189
+ }
190
+ try {
191
+ const { stdout } = await execFile2("wslpath", ["-aw", path], { encoding: "utf8" });
192
+ return stdout.trim();
193
+ } catch {
194
+ return path;
195
+ }
196
+ };
197
+
198
+ // ../../node_modules/open/node_modules/define-lazy-prop/index.js
199
+ function defineLazyProperty(object, propertyName, valueGetter) {
200
+ const define = (value) => Object.defineProperty(object, propertyName, { value, enumerable: true, writable: true });
201
+ Object.defineProperty(object, propertyName, {
202
+ configurable: true,
203
+ enumerable: true,
204
+ get() {
205
+ const result = valueGetter();
206
+ define(result);
207
+ return result;
208
+ },
209
+ set(value) {
210
+ define(value);
211
+ }
212
+ });
213
+ return object;
214
+ }
215
+
216
+ // ../../node_modules/default-browser/index.js
217
+ import { promisify as promisify6 } from "node:util";
218
+ import process5 from "node:process";
219
+ import { execFile as execFile6 } from "node:child_process";
220
+
221
+ // ../../node_modules/default-browser-id/index.js
222
+ import { promisify as promisify3 } from "node:util";
223
+ import process3 from "node:process";
224
+ import { execFile as execFile3 } from "node:child_process";
225
+ var execFileAsync = promisify3(execFile3);
226
+ async function defaultBrowserId() {
227
+ if (process3.platform !== "darwin") {
228
+ throw new Error("macOS only");
229
+ }
230
+ const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
231
+ const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
232
+ const browserId = match?.groups.id ?? "com.apple.Safari";
233
+ if (browserId === "com.apple.safari") {
234
+ return "com.apple.Safari";
235
+ }
236
+ return browserId;
237
+ }
238
+
239
+ // ../../node_modules/run-applescript/index.js
240
+ import process4 from "node:process";
241
+ import { promisify as promisify4 } from "node:util";
242
+ import { execFile as execFile4, execFileSync } from "node:child_process";
243
+ var execFileAsync2 = promisify4(execFile4);
244
+ async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
245
+ if (process4.platform !== "darwin") {
246
+ throw new Error("macOS only");
247
+ }
248
+ const outputArguments = humanReadableOutput ? [] : ["-ss"];
249
+ const execOptions = {};
250
+ if (signal) {
251
+ execOptions.signal = signal;
252
+ }
253
+ const { stdout } = await execFileAsync2("osascript", ["-e", script, outputArguments], execOptions);
254
+ return stdout.trim();
255
+ }
256
+
257
+ // ../../node_modules/bundle-name/index.js
258
+ async function bundleName(bundleId) {
259
+ return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string
260
+ tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
261
+ }
262
+
263
+ // ../../node_modules/default-browser/windows.js
264
+ import { promisify as promisify5 } from "node:util";
265
+ import { execFile as execFile5 } from "node:child_process";
266
+ var execFileAsync3 = promisify5(execFile5);
267
+ var windowsBrowserProgIds = {
268
+ MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
269
+ MSEdgeBHTML: { name: "Edge Beta", id: "com.microsoft.edge.beta" },
270
+ MSEdgeDHTML: { name: "Edge Dev", id: "com.microsoft.edge.dev" },
271
+ AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
272
+ ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
273
+ ChromeBHTML: { name: "Chrome Beta", id: "com.google.chrome.beta" },
274
+ ChromeDHTML: { name: "Chrome Dev", id: "com.google.chrome.dev" },
275
+ ChromiumHTM: { name: "Chromium", id: "org.chromium.Chromium" },
276
+ BraveHTML: { name: "Brave", id: "com.brave.Browser" },
277
+ BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
278
+ BraveDHTML: { name: "Brave Dev", id: "com.brave.Browser.dev" },
279
+ BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" },
280
+ FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
281
+ OperaStable: { name: "Opera", id: "com.operasoftware.Opera" },
282
+ VivaldiHTM: { name: "Vivaldi", id: "com.vivaldi.Vivaldi" },
283
+ "IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" }
284
+ };
285
+ var _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
286
+
287
+ class UnknownBrowserError extends Error {
288
+ }
289
+ async function defaultBrowser(_execFileAsync = execFileAsync3) {
290
+ const { stdout } = await _execFileAsync("reg", [
291
+ "QUERY",
292
+ " HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
293
+ "/v",
294
+ "ProgId"
295
+ ]);
296
+ const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
297
+ if (!match) {
298
+ throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
299
+ }
300
+ const { id } = match.groups;
301
+ const dotIndex = id.lastIndexOf(".");
302
+ const hyphenIndex = id.lastIndexOf("-");
303
+ const baseIdByDot = dotIndex === -1 ? undefined : id.slice(0, dotIndex);
304
+ const baseIdByHyphen = hyphenIndex === -1 ? undefined : id.slice(0, hyphenIndex);
305
+ return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? { name: id, id };
306
+ }
307
+
308
+ // ../../node_modules/default-browser/index.js
309
+ var execFileAsync4 = promisify6(execFile6);
310
+ var titleize = (string) => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x) => x.toUpperCase());
311
+ async function defaultBrowser2() {
312
+ if (process5.platform === "darwin") {
313
+ const id = await defaultBrowserId();
314
+ const name = await bundleName(id);
315
+ return { name, id };
316
+ }
317
+ if (process5.platform === "linux") {
318
+ const { stdout } = await execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]);
319
+ const id = stdout.trim();
320
+ const name = titleize(id.replace(/.desktop$/, "").replace("-", " "));
321
+ return { name, id };
322
+ }
323
+ if (process5.platform === "win32") {
324
+ return defaultBrowser();
325
+ }
326
+ throw new Error("Only macOS, Linux, and Windows are supported");
327
+ }
328
+
329
+ // ../../node_modules/is-in-ssh/index.js
330
+ import process6 from "node:process";
331
+ var isInSsh = Boolean(process6.env.SSH_CONNECTION || process6.env.SSH_CLIENT || process6.env.SSH_TTY);
332
+ var is_in_ssh_default = isInSsh;
333
+
334
+ // ../../node_modules/open/index.js
335
+ var fallbackAttemptSymbol = Symbol("fallbackAttempt");
336
+ var __dirname2 = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
337
+ var localXdgOpenPath = path.join(__dirname2, "xdg-open");
338
+ var { platform, arch } = process7;
339
+ var tryEachApp = async (apps, opener) => {
340
+ if (apps.length === 0) {
341
+ return;
342
+ }
343
+ const errors = [];
344
+ for (const app of apps) {
345
+ try {
346
+ return await opener(app);
347
+ } catch (error) {
348
+ errors.push(error);
349
+ }
350
+ }
351
+ throw new AggregateError(errors, "Failed to open in all supported apps");
352
+ };
353
+ var baseOpen = async (options) => {
354
+ options = {
355
+ wait: false,
356
+ background: false,
357
+ newInstance: false,
358
+ allowNonzeroExitCode: false,
359
+ ...options
360
+ };
361
+ const isFallbackAttempt = options[fallbackAttemptSymbol] === true;
362
+ delete options[fallbackAttemptSymbol];
363
+ if (Array.isArray(options.app)) {
364
+ return tryEachApp(options.app, (singleApp) => baseOpen({
365
+ ...options,
366
+ app: singleApp,
367
+ [fallbackAttemptSymbol]: true
368
+ }));
369
+ }
370
+ let { name: app, arguments: appArguments = [] } = options.app ?? {};
371
+ appArguments = [...appArguments];
372
+ if (Array.isArray(app)) {
373
+ return tryEachApp(app, (appName) => baseOpen({
374
+ ...options,
375
+ app: {
376
+ name: appName,
377
+ arguments: appArguments
378
+ },
379
+ [fallbackAttemptSymbol]: true
380
+ }));
381
+ }
382
+ if (app === "browser" || app === "browserPrivate") {
383
+ const ids = {
384
+ "com.google.chrome": "chrome",
385
+ "google-chrome.desktop": "chrome",
386
+ "com.brave.browser": "brave",
387
+ "org.mozilla.firefox": "firefox",
388
+ "firefox.desktop": "firefox",
389
+ "com.microsoft.msedge": "edge",
390
+ "com.microsoft.edge": "edge",
391
+ "com.microsoft.edgemac": "edge",
392
+ "microsoft-edge.desktop": "edge",
393
+ "com.apple.safari": "safari"
394
+ };
395
+ const flags = {
396
+ chrome: "--incognito",
397
+ brave: "--incognito",
398
+ firefox: "--private-window",
399
+ edge: "--inPrivate"
400
+ };
401
+ let browser;
402
+ if (is_wsl_default) {
403
+ const progId = await wslDefaultBrowser();
404
+ const browserInfo = _windowsBrowserProgIdMap.get(progId);
405
+ browser = browserInfo ?? {};
406
+ } else {
407
+ browser = await defaultBrowser2();
408
+ }
409
+ if (browser.id in ids) {
410
+ const browserName = ids[browser.id.toLowerCase()];
411
+ if (app === "browserPrivate") {
412
+ if (browserName === "safari") {
413
+ throw new Error("Safari doesn't support opening in private mode via command line");
414
+ }
415
+ appArguments.push(flags[browserName]);
416
+ }
417
+ return baseOpen({
418
+ ...options,
419
+ app: {
420
+ name: apps[browserName],
421
+ arguments: appArguments
422
+ }
423
+ });
424
+ }
425
+ throw new Error(`${browser.name} is not supported as a default browser`);
426
+ }
427
+ let command;
428
+ const cliArguments = [];
429
+ const childProcessOptions = {};
430
+ let shouldUseWindowsInWsl = false;
431
+ if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) {
432
+ shouldUseWindowsInWsl = await canAccessPowerShell();
433
+ }
434
+ if (platform === "darwin") {
435
+ command = "open";
436
+ if (options.wait) {
437
+ cliArguments.push("--wait-apps");
438
+ }
439
+ if (options.background) {
440
+ cliArguments.push("--background");
441
+ }
442
+ if (options.newInstance) {
443
+ cliArguments.push("--new");
444
+ }
445
+ if (app) {
446
+ cliArguments.push("-a", app);
447
+ }
448
+ } else if (platform === "win32" || shouldUseWindowsInWsl) {
449
+ command = await powerShellPath2();
450
+ cliArguments.push(...executePowerShell.argumentsPrefix);
451
+ if (!is_wsl_default) {
452
+ childProcessOptions.windowsVerbatimArguments = true;
453
+ }
454
+ if (is_wsl_default && options.target) {
455
+ options.target = await convertWslPathToWindows(options.target);
456
+ }
457
+ const encodedArguments = ["$ProgressPreference = 'SilentlyContinue';", "Start"];
458
+ if (options.wait) {
459
+ encodedArguments.push("-Wait");
460
+ }
461
+ if (app) {
462
+ encodedArguments.push(executePowerShell.escapeArgument(app));
463
+ if (options.target) {
464
+ appArguments.push(options.target);
465
+ }
466
+ } else if (options.target) {
467
+ encodedArguments.push(executePowerShell.escapeArgument(options.target));
468
+ }
469
+ if (appArguments.length > 0) {
470
+ appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));
471
+ encodedArguments.push("-ArgumentList", appArguments.join(","));
472
+ }
473
+ options.target = executePowerShell.encodeCommand(encodedArguments.join(" "));
474
+ if (!options.wait) {
475
+ childProcessOptions.stdio = "ignore";
476
+ }
477
+ } else {
478
+ if (app) {
479
+ command = app;
480
+ } else {
481
+ const isBundled = !__dirname2 || __dirname2 === "/";
482
+ let exeLocalXdgOpen = false;
483
+ try {
484
+ await fs5.access(localXdgOpenPath, fsConstants2.X_OK);
485
+ exeLocalXdgOpen = true;
486
+ } catch {}
487
+ const useSystemXdgOpen = process7.versions.electron ?? (platform === "android" || isBundled || !exeLocalXdgOpen);
488
+ command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
489
+ }
490
+ if (appArguments.length > 0) {
491
+ cliArguments.push(...appArguments);
492
+ }
493
+ if (!options.wait) {
494
+ childProcessOptions.stdio = "ignore";
495
+ childProcessOptions.detached = true;
496
+ }
497
+ }
498
+ if (platform === "darwin" && appArguments.length > 0) {
499
+ cliArguments.push("--args", ...appArguments);
500
+ }
501
+ if (options.target) {
502
+ cliArguments.push(options.target);
503
+ }
504
+ const subprocess = childProcess3.spawn(command, cliArguments, childProcessOptions);
505
+ if (options.wait) {
506
+ return new Promise((resolve, reject) => {
507
+ subprocess.once("error", reject);
508
+ subprocess.once("close", (exitCode) => {
509
+ if (!options.allowNonzeroExitCode && exitCode !== 0) {
510
+ reject(new Error(`Exited with code ${exitCode}`));
511
+ return;
512
+ }
513
+ resolve(subprocess);
514
+ });
515
+ });
516
+ }
517
+ if (isFallbackAttempt) {
518
+ return new Promise((resolve, reject) => {
519
+ subprocess.once("error", reject);
520
+ subprocess.once("spawn", () => {
521
+ subprocess.once("close", (exitCode) => {
522
+ subprocess.off("error", reject);
523
+ if (exitCode !== 0) {
524
+ reject(new Error(`Exited with code ${exitCode}`));
525
+ return;
526
+ }
527
+ subprocess.unref();
528
+ resolve(subprocess);
529
+ });
530
+ });
531
+ });
532
+ }
533
+ subprocess.unref();
534
+ return new Promise((resolve, reject) => {
535
+ subprocess.once("error", reject);
536
+ subprocess.once("spawn", () => {
537
+ subprocess.off("error", reject);
538
+ resolve(subprocess);
539
+ });
540
+ });
541
+ };
542
+ var open = (target, options) => {
543
+ if (typeof target !== "string") {
544
+ throw new TypeError("Expected a `target`");
545
+ }
546
+ return baseOpen({
547
+ ...options,
548
+ target
549
+ });
550
+ };
551
+ var openApp = (name, options) => {
552
+ if (typeof name !== "string" && !Array.isArray(name)) {
553
+ throw new TypeError("Expected a valid `name`");
554
+ }
555
+ const { arguments: appArguments = [] } = options ?? {};
556
+ if (appArguments !== undefined && appArguments !== null && !Array.isArray(appArguments)) {
557
+ throw new TypeError("Expected `appArguments` as Array type");
558
+ }
559
+ return baseOpen({
560
+ ...options,
561
+ app: {
562
+ name,
563
+ arguments: appArguments
564
+ }
565
+ });
566
+ };
567
+ function detectArchBinary(binary) {
568
+ if (typeof binary === "string" || Array.isArray(binary)) {
569
+ return binary;
570
+ }
571
+ const { [arch]: archBinary } = binary;
572
+ if (!archBinary) {
573
+ throw new Error(`${arch} is not supported`);
574
+ }
575
+ return archBinary;
576
+ }
577
+ function detectPlatformBinary({ [platform]: platformBinary }, { wsl } = {}) {
578
+ if (wsl && is_wsl_default) {
579
+ return detectArchBinary(wsl);
580
+ }
581
+ if (!platformBinary) {
582
+ throw new Error(`${platform} is not supported`);
583
+ }
584
+ return detectArchBinary(platformBinary);
585
+ }
586
+ var apps = {
587
+ browser: "browser",
588
+ browserPrivate: "browserPrivate"
589
+ };
590
+ defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
591
+ darwin: "google chrome",
592
+ win32: "chrome",
593
+ linux: ["google-chrome", "google-chrome-stable", "chromium", "chromium-browser"]
594
+ }, {
595
+ wsl: {
596
+ ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
597
+ x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
598
+ }
599
+ }));
600
+ defineLazyProperty(apps, "brave", () => detectPlatformBinary({
601
+ darwin: "brave browser",
602
+ win32: "brave",
603
+ linux: ["brave-browser", "brave"]
604
+ }, {
605
+ wsl: {
606
+ ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
607
+ x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
608
+ }
609
+ }));
610
+ defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
611
+ darwin: "firefox",
612
+ win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
613
+ linux: "firefox"
614
+ }, {
615
+ wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
616
+ }));
617
+ defineLazyProperty(apps, "edge", () => detectPlatformBinary({
618
+ darwin: "microsoft edge",
619
+ win32: "msedge",
620
+ linux: ["microsoft-edge", "microsoft-edge-dev"]
621
+ }, {
622
+ wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
623
+ }));
624
+ defineLazyProperty(apps, "safari", () => detectPlatformBinary({
625
+ darwin: "Safari"
626
+ }));
627
+ var open_default = open;
628
+ export {
629
+ openApp,
630
+ open_default as default,
631
+ apps
632
+ };
633
+
634
+ //# debugId=75EAFE8AF98B350C64756E2164756E21
package/dist/index.js CHANGED
@@ -2,21 +2,21 @@
2
2
  import {
3
3
  metadata,
4
4
  registerCommands
5
- } from "./packager-tool-gnmkvkz3.js";
6
- import"./packager-tool-br2aa2fh.js";
7
- import"./packager-tool-kfzzznjr.js";
8
- import"./packager-tool-7efxm815.js";
9
- import"./packager-tool-sdhdmkt8.js";
10
- import"./packager-tool-rdxaysxe.js";
11
- import"./packager-tool-gkwmyc48.js";
12
- import"./packager-tool-37g19zk3.js";
5
+ } from "./packager-tool-9x8dbxbn.js";
6
+ import"./packager-tool-n49qbf8m.js";
7
+ import"./packager-tool-85x8cje1.js";
8
+ import"./packager-tool-y35nbbkm.js";
9
+ import"./packager-tool-9vehmnke.js";
10
+ import"./packager-tool-c84z58bt.js";
11
+ import"./packager-tool-arbagkf2.js";
12
+ import"./packager-tool-ngh4qwjv.js";
13
13
  import"./packager-tool-vpr77gre.js";
14
14
  import {
15
15
  Command
16
- } from "./packager-tool-y4wacqkp.js";
16
+ } from "./packager-tool-r9n45rjm.js";
17
17
  import"./packager-tool-9qecd4wb.js";
18
- import"./packager-tool-q90kqh83.js";
19
- import"./packager-tool-1ps2qeqg.js";
18
+ import"./packager-tool-7eva0peq.js";
19
+ import"./packager-tool-5arsyj36.js";
20
20
  import"./packager-tool-129wn232.js";
21
21
  import"./packager-tool-0v6na3yp.js";
22
22
 
package/dist/init.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  SolutionInitError,
3
3
  solutionInitAsync
4
- } from "./packager-tool-kfzzznjr.js";
4
+ } from "./packager-tool-85x8cje1.js";
5
5
  import {
6
6
  addProjectArtifactsToSolutionAsync
7
- } from "./packager-tool-37g19zk3.js";
7
+ } from "./packager-tool-ngh4qwjv.js";
8
8
  import"./packager-tool-vpr77gre.js";
9
- import"./packager-tool-y4wacqkp.js";
9
+ import"./packager-tool-r9n45rjm.js";
10
10
  import"./packager-tool-9qecd4wb.js";
11
- import"./packager-tool-q90kqh83.js";
12
- import"./packager-tool-1ps2qeqg.js";
11
+ import"./packager-tool-7eva0peq.js";
12
+ import"./packager-tool-5arsyj36.js";
13
13
  import"./packager-tool-129wn232.js";
14
14
  import"./packager-tool-0v6na3yp.js";
15
15
  export {