azot 5.0.0-alpha.12 → 5.0.0-alpha.13

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.
@@ -0,0 +1,555 @@
1
+ const require_chunk = require('./chunk-BmvPcxpV.cjs');
2
+ let node_util = require("node:util");
3
+ let node_fs = require("node:fs");
4
+ node_fs = require_chunk.__toESM(node_fs);
5
+ let node_path = require("node:path");
6
+ node_path = require_chunk.__toESM(node_path);
7
+ let node_os = require("node:os");
8
+ node_os = require_chunk.__toESM(node_os);
9
+ let node_fs_promises = require("node:fs/promises");
10
+ node_fs_promises = require_chunk.__toESM(node_fs_promises);
11
+ let node_process = require("node:process");
12
+ node_process = require_chunk.__toESM(node_process);
13
+ let node_child_process = require("node:child_process");
14
+ node_child_process = require_chunk.__toESM(node_child_process);
15
+ let node_url = require("node:url");
16
+ let node_buffer = require("node:buffer");
17
+
18
+ //#region ../../node_modules/.pnpm/is-docker@3.0.0/node_modules/is-docker/index.js
19
+ let isDockerCached;
20
+ function hasDockerEnv() {
21
+ try {
22
+ node_fs.default.statSync("/.dockerenv");
23
+ return true;
24
+ } catch {
25
+ return false;
26
+ }
27
+ }
28
+ function hasDockerCGroup() {
29
+ try {
30
+ return node_fs.default.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
31
+ } catch {
32
+ return false;
33
+ }
34
+ }
35
+ function isDocker() {
36
+ if (isDockerCached === void 0) isDockerCached = hasDockerEnv() || hasDockerCGroup();
37
+ return isDockerCached;
38
+ }
39
+
40
+ //#endregion
41
+ //#region ../../node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.js
42
+ let cachedResult;
43
+ const hasContainerEnv = () => {
44
+ try {
45
+ node_fs.default.statSync("/run/.containerenv");
46
+ return true;
47
+ } catch {
48
+ return false;
49
+ }
50
+ };
51
+ function isInsideContainer() {
52
+ if (cachedResult === void 0) cachedResult = hasContainerEnv() || isDocker();
53
+ return cachedResult;
54
+ }
55
+
56
+ //#endregion
57
+ //#region ../../node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js
58
+ const isWsl = () => {
59
+ if (node_process.default.platform !== "linux") return false;
60
+ if (node_os.default.release().toLowerCase().includes("microsoft")) {
61
+ if (isInsideContainer()) return false;
62
+ return true;
63
+ }
64
+ try {
65
+ return node_fs.default.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
66
+ } catch {
67
+ return false;
68
+ }
69
+ };
70
+ var is_wsl_default = node_process.default.env.__IS_WSL_TEST__ ? isWsl : isWsl();
71
+
72
+ //#endregion
73
+ //#region ../../node_modules/.pnpm/powershell-utils@0.1.0/node_modules/powershell-utils/index.js
74
+ const execFile$5 = (0, node_util.promisify)(node_child_process.default.execFile);
75
+ const powerShellPath$1 = () => `${node_process.default.env.SYSTEMROOT || node_process.default.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
76
+ const executePowerShell = async (command, options = {}) => {
77
+ const { powerShellPath: psPath, ...execFileOptions } = options;
78
+ const encodedCommand = executePowerShell.encodeCommand(command);
79
+ return execFile$5(psPath ?? powerShellPath$1(), [...executePowerShell.argumentsPrefix, encodedCommand], {
80
+ encoding: "utf8",
81
+ ...execFileOptions
82
+ });
83
+ };
84
+ executePowerShell.argumentsPrefix = [
85
+ "-NoProfile",
86
+ "-NonInteractive",
87
+ "-ExecutionPolicy",
88
+ "Bypass",
89
+ "-EncodedCommand"
90
+ ];
91
+ executePowerShell.encodeCommand = (command) => node_buffer.Buffer.from(command, "utf16le").toString("base64");
92
+ executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
93
+
94
+ //#endregion
95
+ //#region ../../node_modules/.pnpm/wsl-utils@0.3.1/node_modules/wsl-utils/utilities.js
96
+ function parseMountPointFromConfig(content) {
97
+ for (const line of content.split("\n")) {
98
+ if (/^\s*#/.test(line)) continue;
99
+ const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line);
100
+ if (!match) continue;
101
+ return match.groups.mountPoint.trim().replaceAll(/^["']|["']$/g, "");
102
+ }
103
+ }
104
+
105
+ //#endregion
106
+ //#region ../../node_modules/.pnpm/wsl-utils@0.3.1/node_modules/wsl-utils/index.js
107
+ const execFile$4 = (0, node_util.promisify)(node_child_process.default.execFile);
108
+ const wslDrivesMountPoint = (() => {
109
+ const defaultMountPoint = "/mnt/";
110
+ let mountPoint;
111
+ return async function() {
112
+ if (mountPoint) return mountPoint;
113
+ const configFilePath = "/etc/wsl.conf";
114
+ let isConfigFileExists = false;
115
+ try {
116
+ await node_fs_promises.default.access(configFilePath, node_fs_promises.constants.F_OK);
117
+ isConfigFileExists = true;
118
+ } catch {}
119
+ if (!isConfigFileExists) return defaultMountPoint;
120
+ const parsedMountPoint = parseMountPointFromConfig(await node_fs_promises.default.readFile(configFilePath, { encoding: "utf8" }));
121
+ if (parsedMountPoint === void 0) return defaultMountPoint;
122
+ mountPoint = parsedMountPoint;
123
+ mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
124
+ return mountPoint;
125
+ };
126
+ })();
127
+ const powerShellPathFromWsl = async () => {
128
+ return `${await wslDrivesMountPoint()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
129
+ };
130
+ const powerShellPath = is_wsl_default ? powerShellPathFromWsl : powerShellPath$1;
131
+ let canAccessPowerShellPromise;
132
+ const canAccessPowerShell = async () => {
133
+ canAccessPowerShellPromise ??= (async () => {
134
+ try {
135
+ const psPath = await powerShellPath();
136
+ await node_fs_promises.default.access(psPath, node_fs_promises.constants.X_OK);
137
+ return true;
138
+ } catch {
139
+ return false;
140
+ }
141
+ })();
142
+ return canAccessPowerShellPromise;
143
+ };
144
+ const wslDefaultBrowser = async () => {
145
+ const psPath = await powerShellPath();
146
+ const { stdout } = await executePowerShell(String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`, { powerShellPath: psPath });
147
+ return stdout.trim();
148
+ };
149
+ const convertWslPathToWindows = async (path) => {
150
+ if (/^[a-z]+:\/\//i.test(path)) return path;
151
+ try {
152
+ const { stdout } = await execFile$4("wslpath", ["-aw", path], { encoding: "utf8" });
153
+ return stdout.trim();
154
+ } catch {
155
+ return path;
156
+ }
157
+ };
158
+
159
+ //#endregion
160
+ //#region ../../node_modules/.pnpm/define-lazy-prop@3.0.0/node_modules/define-lazy-prop/index.js
161
+ function defineLazyProperty(object, propertyName, valueGetter) {
162
+ const define = (value) => Object.defineProperty(object, propertyName, {
163
+ value,
164
+ enumerable: true,
165
+ writable: true
166
+ });
167
+ Object.defineProperty(object, propertyName, {
168
+ configurable: true,
169
+ enumerable: true,
170
+ get() {
171
+ const result = valueGetter();
172
+ define(result);
173
+ return result;
174
+ },
175
+ set(value) {
176
+ define(value);
177
+ }
178
+ });
179
+ return object;
180
+ }
181
+
182
+ //#endregion
183
+ //#region ../../node_modules/.pnpm/default-browser-id@5.0.0/node_modules/default-browser-id/index.js
184
+ const execFileAsync$3 = (0, node_util.promisify)(node_child_process.execFile);
185
+ async function defaultBrowserId() {
186
+ if (node_process.default.platform !== "darwin") throw new Error("macOS only");
187
+ const { stdout } = await execFileAsync$3("defaults", [
188
+ "read",
189
+ "com.apple.LaunchServices/com.apple.launchservices.secure",
190
+ "LSHandlers"
191
+ ]);
192
+ return /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout)?.groups.id ?? "com.apple.Safari";
193
+ }
194
+
195
+ //#endregion
196
+ //#region ../../node_modules/.pnpm/run-applescript@7.0.0/node_modules/run-applescript/index.js
197
+ const execFileAsync$2 = (0, node_util.promisify)(node_child_process.execFile);
198
+ async function runAppleScript(script, { humanReadableOutput = true } = {}) {
199
+ if (node_process.default.platform !== "darwin") throw new Error("macOS only");
200
+ const { stdout } = await execFileAsync$2("osascript", [
201
+ "-e",
202
+ script,
203
+ humanReadableOutput ? [] : ["-ss"]
204
+ ]);
205
+ return stdout.trim();
206
+ }
207
+
208
+ //#endregion
209
+ //#region ../../node_modules/.pnpm/bundle-name@4.1.0/node_modules/bundle-name/index.js
210
+ async function bundleName(bundleId) {
211
+ return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string\ntell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
212
+ }
213
+
214
+ //#endregion
215
+ //#region ../../node_modules/.pnpm/default-browser@5.5.0/node_modules/default-browser/windows.js
216
+ const execFileAsync$1 = (0, node_util.promisify)(node_child_process.execFile);
217
+ const windowsBrowserProgIds = {
218
+ MSEdgeHTM: {
219
+ name: "Edge",
220
+ id: "com.microsoft.edge"
221
+ },
222
+ MSEdgeBHTML: {
223
+ name: "Edge Beta",
224
+ id: "com.microsoft.edge.beta"
225
+ },
226
+ MSEdgeDHTML: {
227
+ name: "Edge Dev",
228
+ id: "com.microsoft.edge.dev"
229
+ },
230
+ AppXq0fevzme2pys62n3e0fbqa7peapykr8v: {
231
+ name: "Edge",
232
+ id: "com.microsoft.edge.old"
233
+ },
234
+ ChromeHTML: {
235
+ name: "Chrome",
236
+ id: "com.google.chrome"
237
+ },
238
+ ChromeBHTML: {
239
+ name: "Chrome Beta",
240
+ id: "com.google.chrome.beta"
241
+ },
242
+ ChromeDHTML: {
243
+ name: "Chrome Dev",
244
+ id: "com.google.chrome.dev"
245
+ },
246
+ ChromiumHTM: {
247
+ name: "Chromium",
248
+ id: "org.chromium.Chromium"
249
+ },
250
+ BraveHTML: {
251
+ name: "Brave",
252
+ id: "com.brave.Browser"
253
+ },
254
+ BraveBHTML: {
255
+ name: "Brave Beta",
256
+ id: "com.brave.Browser.beta"
257
+ },
258
+ BraveDHTML: {
259
+ name: "Brave Dev",
260
+ id: "com.brave.Browser.dev"
261
+ },
262
+ BraveSSHTM: {
263
+ name: "Brave Nightly",
264
+ id: "com.brave.Browser.nightly"
265
+ },
266
+ FirefoxURL: {
267
+ name: "Firefox",
268
+ id: "org.mozilla.firefox"
269
+ },
270
+ OperaStable: {
271
+ name: "Opera",
272
+ id: "com.operasoftware.Opera"
273
+ },
274
+ VivaldiHTM: {
275
+ name: "Vivaldi",
276
+ id: "com.vivaldi.Vivaldi"
277
+ },
278
+ "IE.HTTP": {
279
+ name: "Internet Explorer",
280
+ id: "com.microsoft.ie"
281
+ }
282
+ };
283
+ const _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
284
+ var UnknownBrowserError = class extends Error {};
285
+ async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
286
+ const { stdout } = await _execFileAsync("reg", [
287
+ "QUERY",
288
+ " HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
289
+ "/v",
290
+ "ProgId"
291
+ ]);
292
+ const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
293
+ if (!match) throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
294
+ const { id } = match.groups;
295
+ const dotIndex = id.lastIndexOf(".");
296
+ const hyphenIndex = id.lastIndexOf("-");
297
+ const baseIdByDot = dotIndex === -1 ? void 0 : id.slice(0, dotIndex);
298
+ const baseIdByHyphen = hyphenIndex === -1 ? void 0 : id.slice(0, hyphenIndex);
299
+ return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? {
300
+ name: id,
301
+ id
302
+ };
303
+ }
304
+
305
+ //#endregion
306
+ //#region ../../node_modules/.pnpm/default-browser@5.5.0/node_modules/default-browser/index.js
307
+ const execFileAsync = (0, node_util.promisify)(node_child_process.execFile);
308
+ const titleize = (string) => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x) => x.toUpperCase());
309
+ async function defaultBrowser() {
310
+ if (node_process.default.platform === "darwin") {
311
+ const id = await defaultBrowserId();
312
+ return {
313
+ name: await bundleName(id),
314
+ id
315
+ };
316
+ }
317
+ if (node_process.default.platform === "linux") {
318
+ const { stdout } = await execFileAsync("xdg-mime", [
319
+ "query",
320
+ "default",
321
+ "x-scheme-handler/http"
322
+ ]);
323
+ const id = stdout.trim();
324
+ return {
325
+ name: titleize(id.replace(/.desktop$/, "").replace("-", " ")),
326
+ id
327
+ };
328
+ }
329
+ if (node_process.default.platform === "win32") return defaultBrowser$1();
330
+ throw new Error("Only macOS, Linux, and Windows are supported");
331
+ }
332
+
333
+ //#endregion
334
+ //#region ../../node_modules/.pnpm/is-in-ssh@1.0.0/node_modules/is-in-ssh/index.js
335
+ const isInSsh = Boolean(node_process.default.env.SSH_CONNECTION || node_process.default.env.SSH_CLIENT || node_process.default.env.SSH_TTY);
336
+
337
+ //#endregion
338
+ //#region ../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js
339
+ const fallbackAttemptSymbol = Symbol("fallbackAttempt");
340
+ const __dirname$1 = require("url").pathToFileURL(__filename).href ? node_path.default.dirname((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href)) : "";
341
+ const localXdgOpenPath = node_path.default.join(__dirname$1, "xdg-open");
342
+ const { platform, arch } = node_process.default;
343
+ const tryEachApp = async (apps, opener) => {
344
+ if (apps.length === 0) return;
345
+ const errors = [];
346
+ for (const app of apps) try {
347
+ return await opener(app);
348
+ } catch (error) {
349
+ errors.push(error);
350
+ }
351
+ throw new AggregateError(errors, "Failed to open in all supported apps");
352
+ };
353
+ const 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)) return tryEachApp(options.app, (singleApp) => baseOpen({
364
+ ...options,
365
+ app: singleApp,
366
+ [fallbackAttemptSymbol]: true
367
+ }));
368
+ let { name: app, arguments: appArguments = [] } = options.app ?? {};
369
+ appArguments = [...appArguments];
370
+ if (Array.isArray(app)) return tryEachApp(app, (appName) => baseOpen({
371
+ ...options,
372
+ app: {
373
+ name: appName,
374
+ arguments: appArguments
375
+ },
376
+ [fallbackAttemptSymbol]: true
377
+ }));
378
+ if (app === "browser" || app === "browserPrivate") {
379
+ const ids = {
380
+ "com.google.chrome": "chrome",
381
+ "google-chrome.desktop": "chrome",
382
+ "com.brave.browser": "brave",
383
+ "org.mozilla.firefox": "firefox",
384
+ "firefox.desktop": "firefox",
385
+ "com.microsoft.msedge": "edge",
386
+ "com.microsoft.edge": "edge",
387
+ "com.microsoft.edgemac": "edge",
388
+ "microsoft-edge.desktop": "edge",
389
+ "com.apple.safari": "safari"
390
+ };
391
+ const flags = {
392
+ chrome: "--incognito",
393
+ brave: "--incognito",
394
+ firefox: "--private-window",
395
+ edge: "--inPrivate"
396
+ };
397
+ let browser;
398
+ if (is_wsl_default) {
399
+ const progId = await wslDefaultBrowser();
400
+ browser = _windowsBrowserProgIdMap.get(progId) ?? {};
401
+ } else browser = await defaultBrowser();
402
+ if (browser.id in ids) {
403
+ const browserName = ids[browser.id.toLowerCase()];
404
+ if (app === "browserPrivate") {
405
+ if (browserName === "safari") throw new Error("Safari doesn't support opening in private mode via command line");
406
+ appArguments.push(flags[browserName]);
407
+ }
408
+ return baseOpen({
409
+ ...options,
410
+ app: {
411
+ name: apps[browserName],
412
+ arguments: appArguments
413
+ }
414
+ });
415
+ }
416
+ throw new Error(`${browser.name} is not supported as a default browser`);
417
+ }
418
+ let command;
419
+ const cliArguments = [];
420
+ const childProcessOptions = {};
421
+ let shouldUseWindowsInWsl = false;
422
+ if (is_wsl_default && !isInsideContainer() && !isInSsh && !app) shouldUseWindowsInWsl = await canAccessPowerShell();
423
+ if (platform === "darwin") {
424
+ command = "open";
425
+ if (options.wait) cliArguments.push("--wait-apps");
426
+ if (options.background) cliArguments.push("--background");
427
+ if (options.newInstance) cliArguments.push("--new");
428
+ if (app) cliArguments.push("-a", app);
429
+ } else if (platform === "win32" || shouldUseWindowsInWsl) {
430
+ command = await powerShellPath();
431
+ cliArguments.push(...executePowerShell.argumentsPrefix);
432
+ if (!is_wsl_default) childProcessOptions.windowsVerbatimArguments = true;
433
+ if (is_wsl_default && options.target) options.target = await convertWslPathToWindows(options.target);
434
+ const encodedArguments = ["$ProgressPreference = 'SilentlyContinue';", "Start"];
435
+ if (options.wait) encodedArguments.push("-Wait");
436
+ if (app) {
437
+ encodedArguments.push(executePowerShell.escapeArgument(app));
438
+ if (options.target) appArguments.push(options.target);
439
+ } else if (options.target) encodedArguments.push(executePowerShell.escapeArgument(options.target));
440
+ if (appArguments.length > 0) {
441
+ appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));
442
+ encodedArguments.push("-ArgumentList", appArguments.join(","));
443
+ }
444
+ options.target = executePowerShell.encodeCommand(encodedArguments.join(" "));
445
+ if (!options.wait) childProcessOptions.stdio = "ignore";
446
+ } else {
447
+ if (app) command = app;
448
+ else {
449
+ const isBundled = !__dirname$1 || __dirname$1 === "/";
450
+ let exeLocalXdgOpen = false;
451
+ try {
452
+ await node_fs_promises.default.access(localXdgOpenPath, node_fs_promises.constants.X_OK);
453
+ exeLocalXdgOpen = true;
454
+ } catch {}
455
+ command = node_process.default.versions.electron ?? (platform === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
456
+ }
457
+ if (appArguments.length > 0) cliArguments.push(...appArguments);
458
+ if (!options.wait) {
459
+ childProcessOptions.stdio = "ignore";
460
+ childProcessOptions.detached = true;
461
+ }
462
+ }
463
+ if (platform === "darwin" && appArguments.length > 0) cliArguments.push("--args", ...appArguments);
464
+ if (options.target) cliArguments.push(options.target);
465
+ const subprocess = node_child_process.default.spawn(command, cliArguments, childProcessOptions);
466
+ if (options.wait) return new Promise((resolve, reject) => {
467
+ subprocess.once("error", reject);
468
+ subprocess.once("close", (exitCode) => {
469
+ if (!options.allowNonzeroExitCode && exitCode !== 0) {
470
+ reject(/* @__PURE__ */ new Error(`Exited with code ${exitCode}`));
471
+ return;
472
+ }
473
+ resolve(subprocess);
474
+ });
475
+ });
476
+ if (isFallbackAttempt) return new Promise((resolve, reject) => {
477
+ subprocess.once("error", reject);
478
+ subprocess.once("spawn", () => {
479
+ subprocess.once("close", (exitCode) => {
480
+ subprocess.off("error", reject);
481
+ if (exitCode !== 0) {
482
+ reject(/* @__PURE__ */ new Error(`Exited with code ${exitCode}`));
483
+ return;
484
+ }
485
+ subprocess.unref();
486
+ resolve(subprocess);
487
+ });
488
+ });
489
+ });
490
+ subprocess.unref();
491
+ return new Promise((resolve, reject) => {
492
+ subprocess.once("error", reject);
493
+ subprocess.once("spawn", () => {
494
+ subprocess.off("error", reject);
495
+ resolve(subprocess);
496
+ });
497
+ });
498
+ };
499
+ const open = (target, options) => {
500
+ if (typeof target !== "string") throw new TypeError("Expected a `target`");
501
+ return baseOpen({
502
+ ...options,
503
+ target
504
+ });
505
+ };
506
+ function detectArchBinary(binary) {
507
+ if (typeof binary === "string" || Array.isArray(binary)) return binary;
508
+ const { [arch]: archBinary } = binary;
509
+ if (!archBinary) throw new Error(`${arch} is not supported`);
510
+ return archBinary;
511
+ }
512
+ function detectPlatformBinary({ [platform]: platformBinary }, { wsl } = {}) {
513
+ if (wsl && is_wsl_default) return detectArchBinary(wsl);
514
+ if (!platformBinary) throw new Error(`${platform} is not supported`);
515
+ return detectArchBinary(platformBinary);
516
+ }
517
+ const apps = {
518
+ browser: "browser",
519
+ browserPrivate: "browserPrivate"
520
+ };
521
+ defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
522
+ darwin: "google chrome",
523
+ win32: "chrome",
524
+ linux: [
525
+ "google-chrome",
526
+ "google-chrome-stable",
527
+ "chromium",
528
+ "chromium-browser"
529
+ ]
530
+ }, { wsl: {
531
+ ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
532
+ x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
533
+ } }));
534
+ defineLazyProperty(apps, "brave", () => detectPlatformBinary({
535
+ darwin: "brave browser",
536
+ win32: "brave",
537
+ linux: ["brave-browser", "brave"]
538
+ }, { wsl: {
539
+ ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
540
+ x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
541
+ } }));
542
+ defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
543
+ darwin: "firefox",
544
+ win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
545
+ linux: "firefox"
546
+ }, { wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe" }));
547
+ defineLazyProperty(apps, "edge", () => detectPlatformBinary({
548
+ darwin: "microsoft edge",
549
+ win32: "msedge",
550
+ linux: ["microsoft-edge", "microsoft-edge-dev"]
551
+ }, { wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe" }));
552
+ defineLazyProperty(apps, "safari", () => detectPlatformBinary({ darwin: "Safari" }));
553
+
554
+ //#endregion
555
+ exports.default = open;
package/dist/vitest.cjs CHANGED
@@ -1 +1,15 @@
1
- require(`./chunk-350yNsax.cjs`);const e=require(`./context-DJcvCJWU.cjs`);require(`./context.cjs`);let t=require(`vitest`);t.vi.mock(`azot`,()=>{let n=e.t();return Object.entries(n).forEach(([e,n])=>{t.vi.stubGlobal(e,n)}),n.Azot});
1
+ const require_chunk = require('./chunk-BmvPcxpV.cjs');
2
+ const require_context = require('./context-AYnteC1j.cjs');
3
+ require('./context.cjs');
4
+ let vitest = require("vitest");
5
+
6
+ //#region src/vitest.ts
7
+ vitest.vi.mock("azot", () => {
8
+ const context = require_context.createContext();
9
+ Object.entries(context).forEach(([key, value]) => {
10
+ vitest.vi.stubGlobal(key, value);
11
+ });
12
+ return context.Azot;
13
+ });
14
+
15
+ //#endregion
package/dist/vitest.mjs CHANGED
@@ -1 +1,15 @@
1
- import{t as e}from"./context-BhNE2Whq.mjs";import"./context.mjs";import{vi as t}from"vitest";t.mock(`azot`,()=>{let n=e();return Object.entries(n).forEach(([e,n])=>{t.stubGlobal(e,n)}),n.Azot});export{};
1
+ import { t as createContext } from "./context-BJuUj_Q4.mjs";
2
+ import "./context.mjs";
3
+ import { vi } from "vitest";
4
+
5
+ //#region src/vitest.ts
6
+ vi.mock("azot", () => {
7
+ const context = createContext();
8
+ Object.entries(context).forEach(([key, value]) => {
9
+ vi.stubGlobal(key, value);
10
+ });
11
+ return context.Azot;
12
+ });
13
+
14
+ //#endregion
15
+ export { };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azot",
3
- "version": "5.0.0-alpha.12",
3
+ "version": "5.0.0-alpha.13",
4
4
  "description": "Build extensions for Azot with Node.js",
5
5
  "keywords": [
6
6
  "api",
@@ -1 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
@@ -1 +0,0 @@
1
- import{createRequire as e}from"node:module";var t=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),n=e(import.meta.url);export{n,t};