tthr 0.3.18 → 0.3.20

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 (56) hide show
  1. package/dist/{chunk-DR6CWO75.js → chunk-5S4QNCO2.js} +1 -1
  2. package/dist/{generate-26HERX3T.js → generate-FEUPHOUR.js} +1 -1
  3. package/dist/index.js +3 -3
  4. package/package.json +8 -8
  5. package/dist/chunk-2IDRK6NG.js +0 -416
  6. package/dist/chunk-2OI6PDXE.js +0 -491
  7. package/dist/chunk-2QPN6NDY.js +0 -721
  8. package/dist/chunk-6PDXNJZH.js +0 -721
  9. package/dist/chunk-CPBP6GSK.js +0 -684
  10. package/dist/chunk-E5LJW52C.js +0 -465
  11. package/dist/chunk-EIJEC3SG.js +0 -468
  12. package/dist/chunk-FBTKIMH3.js +0 -546
  13. package/dist/chunk-FUIPVG5Y.js +0 -692
  14. package/dist/chunk-GKELUQ44.js +0 -502
  15. package/dist/chunk-GYMF5VG7.js +0 -617
  16. package/dist/chunk-HNRJ3DYB.js +0 -542
  17. package/dist/chunk-JPZQRYD3.js +0 -502
  18. package/dist/chunk-LXODXQ5V.js +0 -418
  19. package/dist/chunk-MCKGQKYU.js +0 -15
  20. package/dist/chunk-NDEYB3IH.js +0 -538
  21. package/dist/chunk-QAZWXLPE.js +0 -491
  22. package/dist/chunk-QNUE3MEY.js +0 -709
  23. package/dist/chunk-QOJ5HQFG.js +0 -481
  24. package/dist/chunk-QUS263RB.js +0 -653
  25. package/dist/chunk-T4NH3NQS.js +0 -471
  26. package/dist/chunk-TU5LOAQ5.js +0 -418
  27. package/dist/chunk-VBD4DOWS.js +0 -649
  28. package/dist/chunk-WVCYYQ3X.js +0 -649
  29. package/dist/chunk-Z6EHWFL2.js +0 -469
  30. package/dist/chunk-ZWLVHKNL.js +0 -414
  31. package/dist/generate-56PV7NJX.js +0 -8
  32. package/dist/generate-5AY6JNCG.js +0 -8
  33. package/dist/generate-7DINPVQ5.js +0 -8
  34. package/dist/generate-BBHML7RQ.js +0 -8
  35. package/dist/generate-C3VMXUXE.js +0 -8
  36. package/dist/generate-CQIJJTKG.js +0 -8
  37. package/dist/generate-DYQ67MHG.js +0 -8
  38. package/dist/generate-F7VDD6JW.js +0 -8
  39. package/dist/generate-FTLMBVLH.js +0 -8
  40. package/dist/generate-HRIVNCH3.js +0 -8
  41. package/dist/generate-IJY2CQM4.js +0 -8
  42. package/dist/generate-KAPPABOL.js +0 -8
  43. package/dist/generate-KZ2UQ2E6.js +0 -8
  44. package/dist/generate-LVU4IEMB.js +0 -8
  45. package/dist/generate-M7G5AXMR.js +0 -8
  46. package/dist/generate-O66KTG5U.js +0 -8
  47. package/dist/generate-OAXWQ64W.js +0 -8
  48. package/dist/generate-OIXJM3VV.js +0 -8
  49. package/dist/generate-OKE6YGA3.js +0 -8
  50. package/dist/generate-PQY2ELXC.js +0 -8
  51. package/dist/generate-Q4MUBHHO.js +0 -8
  52. package/dist/generate-RVYWR72S.js +0 -8
  53. package/dist/generate-YQ4QRPXF.js +0 -8
  54. package/dist/generate-ZHAYHYVW.js +0 -8
  55. package/dist/generate-ZY23LDYI.js +0 -8
  56. package/dist/open-OC46UHP7.js +0 -344
@@ -1,344 +0,0 @@
1
- import {
2
- __commonJS,
3
- __require
4
- } from "./chunk-MCKGQKYU.js";
5
-
6
- // ../../node_modules/open/node_modules/is-docker/index.js
7
- var require_is_docker = __commonJS({
8
- "../../node_modules/open/node_modules/is-docker/index.js"(exports, module) {
9
- "use strict";
10
- var fs = __require("fs");
11
- var isDocker;
12
- function hasDockerEnv() {
13
- try {
14
- fs.statSync("/.dockerenv");
15
- return true;
16
- } catch (_) {
17
- return false;
18
- }
19
- }
20
- function hasDockerCGroup() {
21
- try {
22
- return fs.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
23
- } catch (_) {
24
- return false;
25
- }
26
- }
27
- module.exports = () => {
28
- if (isDocker === void 0) {
29
- isDocker = hasDockerEnv() || hasDockerCGroup();
30
- }
31
- return isDocker;
32
- };
33
- }
34
- });
35
-
36
- // ../../node_modules/open/node_modules/is-wsl/index.js
37
- var require_is_wsl = __commonJS({
38
- "../../node_modules/open/node_modules/is-wsl/index.js"(exports, module) {
39
- "use strict";
40
- var os = __require("os");
41
- var fs = __require("fs");
42
- var isDocker = require_is_docker();
43
- var isWsl = () => {
44
- if (process.platform !== "linux") {
45
- return false;
46
- }
47
- if (os.release().toLowerCase().includes("microsoft")) {
48
- if (isDocker()) {
49
- return false;
50
- }
51
- return true;
52
- }
53
- try {
54
- return fs.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isDocker() : false;
55
- } catch (_) {
56
- return false;
57
- }
58
- };
59
- if (process.env.__IS_WSL_TEST__) {
60
- module.exports = isWsl;
61
- } else {
62
- module.exports = isWsl();
63
- }
64
- }
65
- });
66
-
67
- // ../../node_modules/define-lazy-prop/index.js
68
- var require_define_lazy_prop = __commonJS({
69
- "../../node_modules/define-lazy-prop/index.js"(exports, module) {
70
- "use strict";
71
- module.exports = (object, propertyName, fn) => {
72
- const define = (value) => Object.defineProperty(object, propertyName, { value, enumerable: true, writable: true });
73
- Object.defineProperty(object, propertyName, {
74
- configurable: true,
75
- enumerable: true,
76
- get() {
77
- const result = fn();
78
- define(result);
79
- return result;
80
- },
81
- set(value) {
82
- define(value);
83
- }
84
- });
85
- return object;
86
- };
87
- }
88
- });
89
-
90
- // ../../node_modules/open/index.js
91
- var require_open = __commonJS({
92
- "../../node_modules/open/index.js"(exports, module) {
93
- var path = __require("path");
94
- var childProcess = __require("child_process");
95
- var { promises: fs, constants: fsConstants } = __require("fs");
96
- var isWsl = require_is_wsl();
97
- var isDocker = require_is_docker();
98
- var defineLazyProperty = require_define_lazy_prop();
99
- var localXdgOpenPath = path.join(__dirname, "xdg-open");
100
- var { platform, arch } = process;
101
- var hasContainerEnv = () => {
102
- try {
103
- fs.statSync("/run/.containerenv");
104
- return true;
105
- } catch {
106
- return false;
107
- }
108
- };
109
- var cachedResult;
110
- function isInsideContainer() {
111
- if (cachedResult === void 0) {
112
- cachedResult = hasContainerEnv() || isDocker();
113
- }
114
- return cachedResult;
115
- }
116
- var getWslDrivesMountPoint = /* @__PURE__ */ (() => {
117
- const defaultMountPoint = "/mnt/";
118
- let mountPoint;
119
- return async function() {
120
- if (mountPoint) {
121
- return mountPoint;
122
- }
123
- const configFilePath = "/etc/wsl.conf";
124
- let isConfigFileExists = false;
125
- try {
126
- await fs.access(configFilePath, fsConstants.F_OK);
127
- isConfigFileExists = true;
128
- } catch {
129
- }
130
- if (!isConfigFileExists) {
131
- return defaultMountPoint;
132
- }
133
- const configContent = await fs.readFile(configFilePath, { encoding: "utf8" });
134
- const configMountPoint = /(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(configContent);
135
- if (!configMountPoint) {
136
- return defaultMountPoint;
137
- }
138
- mountPoint = configMountPoint.groups.mountPoint.trim();
139
- mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
140
- return mountPoint;
141
- };
142
- })();
143
- var pTryEach = async (array, mapper) => {
144
- let latestError;
145
- for (const item of array) {
146
- try {
147
- return await mapper(item);
148
- } catch (error) {
149
- latestError = error;
150
- }
151
- }
152
- throw latestError;
153
- };
154
- var baseOpen = async (options) => {
155
- options = {
156
- wait: false,
157
- background: false,
158
- newInstance: false,
159
- allowNonzeroExitCode: false,
160
- ...options
161
- };
162
- if (Array.isArray(options.app)) {
163
- return pTryEach(options.app, (singleApp) => baseOpen({
164
- ...options,
165
- app: singleApp
166
- }));
167
- }
168
- let { name: app, arguments: appArguments = [] } = options.app || {};
169
- appArguments = [...appArguments];
170
- if (Array.isArray(app)) {
171
- return pTryEach(app, (appName) => baseOpen({
172
- ...options,
173
- app: {
174
- name: appName,
175
- arguments: appArguments
176
- }
177
- }));
178
- }
179
- let command;
180
- const cliArguments = [];
181
- const childProcessOptions = {};
182
- if (platform === "darwin") {
183
- command = "open";
184
- if (options.wait) {
185
- cliArguments.push("--wait-apps");
186
- }
187
- if (options.background) {
188
- cliArguments.push("--background");
189
- }
190
- if (options.newInstance) {
191
- cliArguments.push("--new");
192
- }
193
- if (app) {
194
- cliArguments.push("-a", app);
195
- }
196
- } else if (platform === "win32" || isWsl && !isInsideContainer() && !app) {
197
- const mountPoint = await getWslDrivesMountPoint();
198
- command = isWsl ? `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe` : `${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`;
199
- cliArguments.push(
200
- "-NoProfile",
201
- "-NonInteractive",
202
- "\u2013ExecutionPolicy",
203
- "Bypass",
204
- "-EncodedCommand"
205
- );
206
- if (!isWsl) {
207
- childProcessOptions.windowsVerbatimArguments = true;
208
- }
209
- const encodedArguments = ["Start"];
210
- if (options.wait) {
211
- encodedArguments.push("-Wait");
212
- }
213
- if (app) {
214
- encodedArguments.push(`"\`"${app}\`""`, "-ArgumentList");
215
- if (options.target) {
216
- appArguments.unshift(options.target);
217
- }
218
- } else if (options.target) {
219
- encodedArguments.push(`"${options.target}"`);
220
- }
221
- if (appArguments.length > 0) {
222
- appArguments = appArguments.map((arg) => `"\`"${arg}\`""`);
223
- encodedArguments.push(appArguments.join(","));
224
- }
225
- options.target = Buffer.from(encodedArguments.join(" "), "utf16le").toString("base64");
226
- } else {
227
- if (app) {
228
- command = app;
229
- } else {
230
- const isBundled = !__dirname || __dirname === "/";
231
- let exeLocalXdgOpen = false;
232
- try {
233
- await fs.access(localXdgOpenPath, fsConstants.X_OK);
234
- exeLocalXdgOpen = true;
235
- } catch {
236
- }
237
- const useSystemXdgOpen = process.versions.electron || platform === "android" || isBundled || !exeLocalXdgOpen;
238
- command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
239
- }
240
- if (appArguments.length > 0) {
241
- cliArguments.push(...appArguments);
242
- }
243
- if (!options.wait) {
244
- childProcessOptions.stdio = "ignore";
245
- childProcessOptions.detached = true;
246
- }
247
- }
248
- if (options.target) {
249
- cliArguments.push(options.target);
250
- }
251
- if (platform === "darwin" && appArguments.length > 0) {
252
- cliArguments.push("--args", ...appArguments);
253
- }
254
- const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);
255
- if (options.wait) {
256
- return new Promise((resolve, reject) => {
257
- subprocess.once("error", reject);
258
- subprocess.once("close", (exitCode) => {
259
- if (!options.allowNonzeroExitCode && exitCode > 0) {
260
- reject(new Error(`Exited with code ${exitCode}`));
261
- return;
262
- }
263
- resolve(subprocess);
264
- });
265
- });
266
- }
267
- subprocess.unref();
268
- return subprocess;
269
- };
270
- var open = (target, options) => {
271
- if (typeof target !== "string") {
272
- throw new TypeError("Expected a `target`");
273
- }
274
- return baseOpen({
275
- ...options,
276
- target
277
- });
278
- };
279
- var openApp = (name, options) => {
280
- if (typeof name !== "string") {
281
- throw new TypeError("Expected a `name`");
282
- }
283
- const { arguments: appArguments = [] } = options || {};
284
- if (appArguments !== void 0 && appArguments !== null && !Array.isArray(appArguments)) {
285
- throw new TypeError("Expected `appArguments` as Array type");
286
- }
287
- return baseOpen({
288
- ...options,
289
- app: {
290
- name,
291
- arguments: appArguments
292
- }
293
- });
294
- };
295
- function detectArchBinary(binary) {
296
- if (typeof binary === "string" || Array.isArray(binary)) {
297
- return binary;
298
- }
299
- const { [arch]: archBinary } = binary;
300
- if (!archBinary) {
301
- throw new Error(`${arch} is not supported`);
302
- }
303
- return archBinary;
304
- }
305
- function detectPlatformBinary({ [platform]: platformBinary }, { wsl }) {
306
- if (wsl && isWsl) {
307
- return detectArchBinary(wsl);
308
- }
309
- if (!platformBinary) {
310
- throw new Error(`${platform} is not supported`);
311
- }
312
- return detectArchBinary(platformBinary);
313
- }
314
- var apps = {};
315
- defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
316
- darwin: "google chrome",
317
- win32: "chrome",
318
- linux: ["google-chrome", "google-chrome-stable", "chromium"]
319
- }, {
320
- wsl: {
321
- ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
322
- x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
323
- }
324
- }));
325
- defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
326
- darwin: "firefox",
327
- win32: "C:\\Program Files\\Mozilla Firefox\\firefox.exe",
328
- linux: "firefox"
329
- }, {
330
- wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
331
- }));
332
- defineLazyProperty(apps, "edge", () => detectPlatformBinary({
333
- darwin: "microsoft edge",
334
- win32: "msedge",
335
- linux: ["microsoft-edge", "microsoft-edge-dev"]
336
- }, {
337
- wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
338
- }));
339
- open.apps = apps;
340
- open.openApp = openApp;
341
- module.exports = open;
342
- }
343
- });
344
- export default require_open();