@stacksjs/rpx 0.4.0 → 0.4.1
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.
- package/README.md +34 -34
- package/dist/cli.js +7 -7
- package/dist/https.d.ts +2 -3
- package/dist/index.d.ts +7 -1
- package/dist/index.js +244 -238
- package/dist/start.d.ts +1 -1
- package/dist/types.d.ts +27 -14
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -16,80 +16,12 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
// src/
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
import
|
|
25
|
-
import process2 from "process";
|
|
26
|
-
function deepMerge(target, source) {
|
|
27
|
-
if (Array.isArray(source) && !Array.isArray(target)) {
|
|
28
|
-
return source;
|
|
29
|
-
}
|
|
30
|
-
if (Array.isArray(source) && Array.isArray(target)) {
|
|
31
|
-
return source.map((sourceItem, index) => {
|
|
32
|
-
const targetItem = target[index];
|
|
33
|
-
if (isObject(sourceItem) && isObject(targetItem)) {
|
|
34
|
-
return deepMerge(targetItem, sourceItem);
|
|
35
|
-
}
|
|
36
|
-
return sourceItem;
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
if (!isObject(source) || !isObject(target)) {
|
|
40
|
-
return source;
|
|
41
|
-
}
|
|
42
|
-
const merged = { ...target };
|
|
43
|
-
for (const key in source) {
|
|
44
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
45
|
-
const sourceValue = source[key];
|
|
46
|
-
const targetValue = merged[key];
|
|
47
|
-
if (sourceValue === null || sourceValue === undefined) {
|
|
48
|
-
merged[key] = sourceValue;
|
|
49
|
-
} else if (isObject(sourceValue) && isObject(targetValue)) {
|
|
50
|
-
merged[key] = deepMerge(targetValue, sourceValue);
|
|
51
|
-
} else {
|
|
52
|
-
merged[key] = sourceValue;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return merged;
|
|
57
|
-
}
|
|
58
|
-
function isObject(item) {
|
|
59
|
-
return Boolean(item && typeof item === "object" && !Array.isArray(item));
|
|
60
|
-
}
|
|
61
|
-
async function loadConfig({ name, cwd, defaultConfig }) {
|
|
62
|
-
const configPath = resolve(cwd || process2.cwd(), `${name}.config`);
|
|
63
|
-
try {
|
|
64
|
-
const importedConfig = await import(configPath);
|
|
65
|
-
const loadedConfig = importedConfig.default || importedConfig;
|
|
66
|
-
return deepMerge(defaultConfig, loadedConfig);
|
|
67
|
-
} catch (error) {
|
|
68
|
-
return defaultConfig;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// src/config.ts
|
|
73
|
-
var config = await loadConfig({
|
|
74
|
-
name: "reverse-proxy",
|
|
75
|
-
defaultConfig: {
|
|
76
|
-
from: "localhost:5173",
|
|
77
|
-
to: "stacks.localhost",
|
|
78
|
-
https: {
|
|
79
|
-
caCertPath: path.join(os.homedir(), ".stacks", "ssl", `stacks.localhost.ca.crt`),
|
|
80
|
-
certPath: path.join(os.homedir(), ".stacks", "ssl", `stacks.localhost.crt`),
|
|
81
|
-
keyPath: path.join(os.homedir(), ".stacks", "ssl", `stacks.localhost.crt.key`)
|
|
82
|
-
},
|
|
83
|
-
etcHostsCleanup: true,
|
|
84
|
-
verbose: true
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
// src/hosts.ts
|
|
88
|
-
import { spawn } from "child_process";
|
|
89
|
-
import fs3 from "fs";
|
|
90
|
-
import os7 from "os";
|
|
91
|
-
import path6 from "path";
|
|
92
|
-
import process3 from "process";
|
|
19
|
+
// src/start.ts
|
|
20
|
+
import * as fs5 from "fs";
|
|
21
|
+
import * as http from "http";
|
|
22
|
+
import * as https from "https";
|
|
23
|
+
import * as net from "net";
|
|
24
|
+
import process20 from "process";
|
|
93
25
|
|
|
94
26
|
// node_modules/@stacksjs/cli/dist/index.js
|
|
95
27
|
import { formatWithOptions } from "util";
|
|
@@ -125,7 +57,7 @@ import p2 from "process";
|
|
|
125
57
|
import process10 from "process";
|
|
126
58
|
import process18 from "process";
|
|
127
59
|
import process11 from "process";
|
|
128
|
-
import
|
|
60
|
+
import os from "os";
|
|
129
61
|
import tty3 from "tty";
|
|
130
62
|
import process14 from "process";
|
|
131
63
|
import process13 from "process";
|
|
@@ -160,11 +92,11 @@ var __export = (target, all) => {
|
|
|
160
92
|
});
|
|
161
93
|
};
|
|
162
94
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
163
|
-
function
|
|
95
|
+
function isObject(value) {
|
|
164
96
|
return value !== null && typeof value === "object";
|
|
165
97
|
}
|
|
166
98
|
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
167
|
-
if (!
|
|
99
|
+
if (!isObject(defaults)) {
|
|
168
100
|
return _defu(baseObject, {}, namespace, merger);
|
|
169
101
|
}
|
|
170
102
|
const object = Object.assign({}, defaults);
|
|
@@ -181,7 +113,7 @@ function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
|
181
113
|
}
|
|
182
114
|
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
183
115
|
object[key] = [...value, ...object[key]];
|
|
184
|
-
} else if (
|
|
116
|
+
} else if (isObject(value) && isObject(object[key])) {
|
|
185
117
|
object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
|
|
186
118
|
} else {
|
|
187
119
|
object[key] = value;
|
|
@@ -11060,10 +10992,10 @@ class CACError extends Error {
|
|
|
11060
10992
|
}
|
|
11061
10993
|
|
|
11062
10994
|
class Option {
|
|
11063
|
-
constructor(rawName, description,
|
|
10995
|
+
constructor(rawName, description, config) {
|
|
11064
10996
|
this.rawName = rawName;
|
|
11065
10997
|
this.description = description;
|
|
11066
|
-
this.config = Object.assign({},
|
|
10998
|
+
this.config = Object.assign({}, config);
|
|
11067
10999
|
rawName = rawName.replace(/\.\*/g, "");
|
|
11068
11000
|
this.negated = false;
|
|
11069
11001
|
this.names = removeBrackets(rawName).split(",").map((v2) => {
|
|
@@ -11091,10 +11023,10 @@ var processArgs = process.argv;
|
|
|
11091
11023
|
var platformInfo = `${process.platform}-${process.arch} node-${process.version}`;
|
|
11092
11024
|
|
|
11093
11025
|
class Command {
|
|
11094
|
-
constructor(rawName, description,
|
|
11026
|
+
constructor(rawName, description, config = {}, cli) {
|
|
11095
11027
|
this.rawName = rawName;
|
|
11096
11028
|
this.description = description;
|
|
11097
|
-
this.config =
|
|
11029
|
+
this.config = config;
|
|
11098
11030
|
this.cli = cli;
|
|
11099
11031
|
this.options = [];
|
|
11100
11032
|
this.aliasNames = [];
|
|
@@ -11123,8 +11055,8 @@ class Command {
|
|
|
11123
11055
|
this.examples.push(example);
|
|
11124
11056
|
return this;
|
|
11125
11057
|
}
|
|
11126
|
-
option(rawName, description,
|
|
11127
|
-
const option = new Option(rawName, description,
|
|
11058
|
+
option(rawName, description, config) {
|
|
11059
|
+
const option = new Option(rawName, description, config);
|
|
11128
11060
|
this.options.push(option);
|
|
11129
11061
|
return this;
|
|
11130
11062
|
}
|
|
@@ -11279,14 +11211,14 @@ class CAC extends EventEmitter {
|
|
|
11279
11211
|
this.globalCommand.usage(text2);
|
|
11280
11212
|
return this;
|
|
11281
11213
|
}
|
|
11282
|
-
command(rawName, description,
|
|
11283
|
-
const command = new Command(rawName, description || "",
|
|
11214
|
+
command(rawName, description, config) {
|
|
11215
|
+
const command = new Command(rawName, description || "", config, this);
|
|
11284
11216
|
command.globalCommand = this.globalCommand;
|
|
11285
11217
|
this.commands.push(command);
|
|
11286
11218
|
return command;
|
|
11287
11219
|
}
|
|
11288
|
-
option(rawName, description,
|
|
11289
|
-
this.globalCommand.option(rawName, description,
|
|
11220
|
+
option(rawName, description, config) {
|
|
11221
|
+
this.globalCommand.option(rawName, description, config);
|
|
11290
11222
|
return this;
|
|
11291
11223
|
}
|
|
11292
11224
|
help(callback) {
|
|
@@ -11864,7 +11796,7 @@ pluralize.addIrregularRule = (single, plural) => {
|
|
|
11864
11796
|
/pox$/i,
|
|
11865
11797
|
/sheep$/i
|
|
11866
11798
|
].forEach(pluralize.addUncountableRule);
|
|
11867
|
-
var charMap = JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\
|
|
11799
|
+
var charMap = JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E'","\u0538":"Y'","\u0539":"T'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C'","\u053F":"K","\u0540":"H","\u0541":"D'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P'","\u0554":"Q'","\u0555":"O''","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}`);
|
|
11868
11800
|
var locales = JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');
|
|
11869
11801
|
init_consola_36c0034f();
|
|
11870
11802
|
init_core();
|
|
@@ -11960,7 +11892,7 @@ function projectPath(filePath = "", options) {
|
|
|
11960
11892
|
function storagePath(path2) {
|
|
11961
11893
|
return projectPath(`storage/${path2 || ""}`);
|
|
11962
11894
|
}
|
|
11963
|
-
var
|
|
11895
|
+
var config = {
|
|
11964
11896
|
ai: {
|
|
11965
11897
|
deploy: false,
|
|
11966
11898
|
models: [
|
|
@@ -12537,7 +12469,7 @@ var config2 = {
|
|
|
12537
12469
|
}
|
|
12538
12470
|
}
|
|
12539
12471
|
};
|
|
12540
|
-
var defaults_default =
|
|
12472
|
+
var defaults_default = config;
|
|
12541
12473
|
var ai_default = {
|
|
12542
12474
|
default: "meta.llama2-70b-chat-v1",
|
|
12543
12475
|
models: [
|
|
@@ -16822,7 +16754,7 @@ var ui_default = {
|
|
|
16822
16754
|
}
|
|
16823
16755
|
}
|
|
16824
16756
|
};
|
|
16825
|
-
var
|
|
16757
|
+
var config2 = {
|
|
16826
16758
|
ai: ai_default,
|
|
16827
16759
|
analytics: analytics_default,
|
|
16828
16760
|
app: app_default,
|
|
@@ -16849,7 +16781,7 @@ var config22 = {
|
|
|
16849
16781
|
team: team_default,
|
|
16850
16782
|
ui: ui_default
|
|
16851
16783
|
};
|
|
16852
|
-
var overrides_default =
|
|
16784
|
+
var overrides_default = config2;
|
|
16853
16785
|
async function localTunnel(options) {
|
|
16854
16786
|
const port = 3000;
|
|
16855
16787
|
if (!options?.port)
|
|
@@ -17997,7 +17929,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
17997
17929
|
return min;
|
|
17998
17930
|
}
|
|
17999
17931
|
if (process11.platform === "win32") {
|
|
18000
|
-
const osRelease =
|
|
17932
|
+
const osRelease = os.release().split(".");
|
|
18001
17933
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
18002
17934
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
18003
17935
|
}
|
|
@@ -19013,7 +18945,7 @@ function deleteKeys(obj, ...keys) {
|
|
|
19013
18945
|
});
|
|
19014
18946
|
}
|
|
19015
18947
|
var isArray = (item) => Array.isArray(item);
|
|
19016
|
-
function
|
|
18948
|
+
function isObject2(item) {
|
|
19017
18949
|
return typeof item === "object" && !Array.isArray(item) && item !== null;
|
|
19018
18950
|
}
|
|
19019
18951
|
var isFunction = (item) => typeof item === "function";
|
|
@@ -19794,7 +19726,7 @@ class Collection {
|
|
|
19794
19726
|
}
|
|
19795
19727
|
return new this.constructor(this.items.splice(-count));
|
|
19796
19728
|
}
|
|
19797
|
-
if (
|
|
19729
|
+
if (isObject2(this.items)) {
|
|
19798
19730
|
const keys = Object.keys(this.items);
|
|
19799
19731
|
if (count === 1) {
|
|
19800
19732
|
const key = keys[keys.length - 1];
|
|
@@ -19939,7 +19871,7 @@ class Collection {
|
|
|
19939
19871
|
};
|
|
19940
19872
|
if (isArray(this.items)) {
|
|
19941
19873
|
result = this.items.findIndex(find);
|
|
19942
|
-
} else if (
|
|
19874
|
+
} else if (isObject2(this.items)) {
|
|
19943
19875
|
result = Object.keys(this.items).find((key) => find(this.items[key], key));
|
|
19944
19876
|
}
|
|
19945
19877
|
if (result === undefined || result < 0) {
|
|
@@ -19957,7 +19889,7 @@ class Collection {
|
|
|
19957
19889
|
}
|
|
19958
19890
|
return new this.constructor(this.items.splice(0, count));
|
|
19959
19891
|
}
|
|
19960
|
-
if (
|
|
19892
|
+
if (isObject2(this.items)) {
|
|
19961
19893
|
if (count === 1) {
|
|
19962
19894
|
const key = Object.keys(this.items)[0];
|
|
19963
19895
|
const value = this.items[key];
|
|
@@ -19990,7 +19922,7 @@ class Collection {
|
|
|
19990
19922
|
return this;
|
|
19991
19923
|
}
|
|
19992
19924
|
skip(number) {
|
|
19993
|
-
if (
|
|
19925
|
+
if (isObject2(this.items)) {
|
|
19994
19926
|
return new this.constructor(Object.keys(this.items).reduce((accumulator, key, index) => {
|
|
19995
19927
|
if (index + 1 > number) {
|
|
19996
19928
|
accumulator[key] = this.items[key];
|
|
@@ -20015,7 +19947,7 @@ class Collection {
|
|
|
20015
19947
|
return previous;
|
|
20016
19948
|
});
|
|
20017
19949
|
}
|
|
20018
|
-
if (
|
|
19950
|
+
if (isObject2(this.items)) {
|
|
20019
19951
|
items = Object.keys(this.items).reduce((acc, key) => {
|
|
20020
19952
|
if (previous !== true) {
|
|
20021
19953
|
previous = callback(this.items[key]);
|
|
@@ -20043,7 +19975,7 @@ class Collection {
|
|
|
20043
19975
|
return previous;
|
|
20044
19976
|
});
|
|
20045
19977
|
}
|
|
20046
|
-
if (
|
|
19978
|
+
if (isObject2(this.items)) {
|
|
20047
19979
|
items = Object.keys(this.items).reduce((acc, key) => {
|
|
20048
19980
|
if (previous !== true) {
|
|
20049
19981
|
previous = !callback(this.items[key]);
|
|
@@ -20206,7 +20138,7 @@ class Collection {
|
|
|
20206
20138
|
return previous;
|
|
20207
20139
|
});
|
|
20208
20140
|
}
|
|
20209
|
-
if (
|
|
20141
|
+
if (isObject2(this.items)) {
|
|
20210
20142
|
items = Object.keys(this.items).reduce((acc, key) => {
|
|
20211
20143
|
if (previous !== false) {
|
|
20212
20144
|
previous = !callback(this.items[key]);
|
|
@@ -20234,7 +20166,7 @@ class Collection {
|
|
|
20234
20166
|
return previous;
|
|
20235
20167
|
});
|
|
20236
20168
|
}
|
|
20237
|
-
if (
|
|
20169
|
+
if (isObject2(this.items)) {
|
|
20238
20170
|
items = Object.keys(this.items).reduce((acc, key) => {
|
|
20239
20171
|
if (previous !== false) {
|
|
20240
20172
|
previous = callback(this.items[key]);
|
|
@@ -20489,7 +20421,7 @@ var buildKeyPathMap = function buildKeyPathMap2(items) {
|
|
|
20489
20421
|
const keyPaths = {};
|
|
20490
20422
|
items.forEach((item, index) => {
|
|
20491
20423
|
function buildKeyPath(val, keyPath) {
|
|
20492
|
-
if (
|
|
20424
|
+
if (isObject2(val)) {
|
|
20493
20425
|
Object.keys(val).forEach((prop) => {
|
|
20494
20426
|
buildKeyPath(val[prop], `${keyPath}.${prop}`);
|
|
20495
20427
|
});
|
|
@@ -20535,10 +20467,19 @@ var quotes = collect([
|
|
|
20535
20467
|
"Security is mostly a superstition. Life is either a daring adventure or nothing."
|
|
20536
20468
|
]);
|
|
20537
20469
|
var export_prompts = import_prompts.default;
|
|
20470
|
+
// package.json
|
|
20471
|
+
var version = "0.4.1";
|
|
20472
|
+
|
|
20473
|
+
// src/hosts.ts
|
|
20474
|
+
import { spawn } from "child_process";
|
|
20475
|
+
import fs3 from "fs";
|
|
20476
|
+
import os7 from "os";
|
|
20477
|
+
import path7 from "path";
|
|
20478
|
+
import process9 from "process";
|
|
20538
20479
|
|
|
20539
20480
|
// src/https.ts
|
|
20540
20481
|
import os5 from "os";
|
|
20541
|
-
import
|
|
20482
|
+
import path6 from "path";
|
|
20542
20483
|
|
|
20543
20484
|
// node_modules/@stacksjs/tlsx/dist/index.js
|
|
20544
20485
|
import fs2 from "fs";
|
|
@@ -20577,7 +20518,7 @@ import process8 from "process";
|
|
|
20577
20518
|
import process102 from "process";
|
|
20578
20519
|
import process182 from "process";
|
|
20579
20520
|
import process112 from "process";
|
|
20580
|
-
import
|
|
20521
|
+
import os2 from "os";
|
|
20581
20522
|
import tty32 from "tty";
|
|
20582
20523
|
import process142 from "process";
|
|
20583
20524
|
import process132 from "process";
|
|
@@ -20586,11 +20527,11 @@ import process162 from "process";
|
|
|
20586
20527
|
import process172 from "process";
|
|
20587
20528
|
import process192 from "process";
|
|
20588
20529
|
import os22 from "os";
|
|
20589
|
-
import
|
|
20590
|
-
import { resolve
|
|
20591
|
-
import
|
|
20530
|
+
import path from "path";
|
|
20531
|
+
import { resolve } from "path";
|
|
20532
|
+
import process2 from "process";
|
|
20592
20533
|
import fs from "fs";
|
|
20593
|
-
import
|
|
20534
|
+
import path2 from "path";
|
|
20594
20535
|
var __create3 = Object.create;
|
|
20595
20536
|
var __getProtoOf3 = Object.getPrototypeOf;
|
|
20596
20537
|
var __defProp3 = Object.defineProperty;
|
|
@@ -32652,14 +32593,14 @@ var require_tls = __commonJS2((exports, module) => {
|
|
|
32652
32593
|
c2.version = c2.session.version = session.version;
|
|
32653
32594
|
c2.session.sp = session.sp;
|
|
32654
32595
|
} else {
|
|
32655
|
-
var
|
|
32596
|
+
var version2;
|
|
32656
32597
|
for (var i = 1;i < tls.SupportedVersions.length; ++i) {
|
|
32657
|
-
|
|
32658
|
-
if (
|
|
32598
|
+
version2 = tls.SupportedVersions[i];
|
|
32599
|
+
if (version2.minor <= msg.version.minor) {
|
|
32659
32600
|
break;
|
|
32660
32601
|
}
|
|
32661
32602
|
}
|
|
32662
|
-
c2.version = { major:
|
|
32603
|
+
c2.version = { major: version2.major, minor: version2.minor };
|
|
32663
32604
|
c2.session.version = c2.version;
|
|
32664
32605
|
}
|
|
32665
32606
|
if (session !== null) {
|
|
@@ -32830,8 +32771,8 @@ var require_tls = __commonJS2((exports, module) => {
|
|
|
32830
32771
|
try {
|
|
32831
32772
|
var sp = c2.session.sp;
|
|
32832
32773
|
sp.pre_master_secret = privateKey.decrypt(msg.enc_pre_master_secret);
|
|
32833
|
-
var
|
|
32834
|
-
if (
|
|
32774
|
+
var version2 = c2.session.clientHelloVersion;
|
|
32775
|
+
if (version2.major !== sp.pre_master_secret.charCodeAt(0) || version2.minor !== sp.pre_master_secret.charCodeAt(1)) {
|
|
32835
32776
|
throw new Error("TLS version rollback attack detected.");
|
|
32836
32777
|
}
|
|
32837
32778
|
} catch (ex) {
|
|
@@ -38809,16 +38750,16 @@ var require_isIP2 = __commonJS22((exports, module) => {
|
|
|
38809
38750
|
var IPv6SegmentFormat = "(?:[0-9a-fA-F]{1,4})";
|
|
38810
38751
|
var IPv6AddressRegExp = new RegExp("^(" + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ")(%[0-9a-zA-Z-.:]{1,})?$");
|
|
38811
38752
|
function isIP(str) {
|
|
38812
|
-
var
|
|
38753
|
+
var version2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
38813
38754
|
(0, _assertString.default)(str);
|
|
38814
|
-
|
|
38815
|
-
if (!
|
|
38755
|
+
version2 = String(version2);
|
|
38756
|
+
if (!version2) {
|
|
38816
38757
|
return isIP(str, 4) || isIP(str, 6);
|
|
38817
38758
|
}
|
|
38818
|
-
if (
|
|
38759
|
+
if (version2 === "4") {
|
|
38819
38760
|
return IPv4AddressRegExp.test(str);
|
|
38820
38761
|
}
|
|
38821
|
-
if (
|
|
38762
|
+
if (version2 === "6") {
|
|
38822
38763
|
return IPv6AddressRegExp.test(str);
|
|
38823
38764
|
}
|
|
38824
38765
|
return false;
|
|
@@ -39341,9 +39282,9 @@ var require_isUUID2 = __commonJS22((exports, module) => {
|
|
|
39341
39282
|
7: /^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
|
|
39342
39283
|
all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i
|
|
39343
39284
|
};
|
|
39344
|
-
function isUUID(str,
|
|
39285
|
+
function isUUID(str, version2) {
|
|
39345
39286
|
(0, _assertString.default)(str);
|
|
39346
|
-
var pattern = uuid[![undefined, null].includes(
|
|
39287
|
+
var pattern = uuid[![undefined, null].includes(version2) ? version2 : "all"];
|
|
39347
39288
|
return !!pattern && pattern.test(str);
|
|
39348
39289
|
}
|
|
39349
39290
|
module.exports = exports.default;
|
|
@@ -41361,7 +41302,7 @@ var require_prompt3 = __commonJS22((exports, module) => {
|
|
|
41361
41302
|
module.exports = Prompt;
|
|
41362
41303
|
});
|
|
41363
41304
|
var require_text3 = __commonJS22((exports, module) => {
|
|
41364
|
-
function asyncGeneratorStep(gen,
|
|
41305
|
+
function asyncGeneratorStep(gen, resolve3, reject, _next, _throw, key, arg) {
|
|
41365
41306
|
try {
|
|
41366
41307
|
var info = gen[key](arg);
|
|
41367
41308
|
var value = info.value;
|
|
@@ -41370,7 +41311,7 @@ var require_text3 = __commonJS22((exports, module) => {
|
|
|
41370
41311
|
return;
|
|
41371
41312
|
}
|
|
41372
41313
|
if (info.done) {
|
|
41373
|
-
|
|
41314
|
+
resolve3(value);
|
|
41374
41315
|
} else {
|
|
41375
41316
|
Promise.resolve(value).then(_next, _throw);
|
|
41376
41317
|
}
|
|
@@ -41378,13 +41319,13 @@ var require_text3 = __commonJS22((exports, module) => {
|
|
|
41378
41319
|
function _asyncToGenerator(fn) {
|
|
41379
41320
|
return function() {
|
|
41380
41321
|
var self2 = this, args = arguments;
|
|
41381
|
-
return new Promise(function(
|
|
41322
|
+
return new Promise(function(resolve3, reject) {
|
|
41382
41323
|
var gen = fn.apply(self2, args);
|
|
41383
41324
|
function _next(value) {
|
|
41384
|
-
asyncGeneratorStep(gen,
|
|
41325
|
+
asyncGeneratorStep(gen, resolve3, reject, _next, _throw, "next", value);
|
|
41385
41326
|
}
|
|
41386
41327
|
function _throw(err2) {
|
|
41387
|
-
asyncGeneratorStep(gen,
|
|
41328
|
+
asyncGeneratorStep(gen, resolve3, reject, _next, _throw, "throw", err2);
|
|
41388
41329
|
}
|
|
41389
41330
|
_next(undefined);
|
|
41390
41331
|
});
|
|
@@ -42076,7 +42017,7 @@ var require_dateparts3 = __commonJS22((exports, module) => {
|
|
|
42076
42017
|
};
|
|
42077
42018
|
});
|
|
42078
42019
|
var require_date3 = __commonJS22((exports, module) => {
|
|
42079
|
-
function asyncGeneratorStep(gen,
|
|
42020
|
+
function asyncGeneratorStep(gen, resolve3, reject, _next, _throw, key, arg) {
|
|
42080
42021
|
try {
|
|
42081
42022
|
var info = gen[key](arg);
|
|
42082
42023
|
var value = info.value;
|
|
@@ -42085,7 +42026,7 @@ var require_date3 = __commonJS22((exports, module) => {
|
|
|
42085
42026
|
return;
|
|
42086
42027
|
}
|
|
42087
42028
|
if (info.done) {
|
|
42088
|
-
|
|
42029
|
+
resolve3(value);
|
|
42089
42030
|
} else {
|
|
42090
42031
|
Promise.resolve(value).then(_next, _throw);
|
|
42091
42032
|
}
|
|
@@ -42093,13 +42034,13 @@ var require_date3 = __commonJS22((exports, module) => {
|
|
|
42093
42034
|
function _asyncToGenerator(fn) {
|
|
42094
42035
|
return function() {
|
|
42095
42036
|
var self2 = this, args = arguments;
|
|
42096
|
-
return new Promise(function(
|
|
42037
|
+
return new Promise(function(resolve3, reject) {
|
|
42097
42038
|
var gen = fn.apply(self2, args);
|
|
42098
42039
|
function _next(value) {
|
|
42099
|
-
asyncGeneratorStep(gen,
|
|
42040
|
+
asyncGeneratorStep(gen, resolve3, reject, _next, _throw, "next", value);
|
|
42100
42041
|
}
|
|
42101
42042
|
function _throw(err2) {
|
|
42102
|
-
asyncGeneratorStep(gen,
|
|
42043
|
+
asyncGeneratorStep(gen, resolve3, reject, _next, _throw, "throw", err2);
|
|
42103
42044
|
}
|
|
42104
42045
|
_next(undefined);
|
|
42105
42046
|
});
|
|
@@ -42301,7 +42242,7 @@ ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l3)}`, ``);
|
|
|
42301
42242
|
module.exports = DatePrompt;
|
|
42302
42243
|
});
|
|
42303
42244
|
var require_number3 = __commonJS22((exports, module) => {
|
|
42304
|
-
function asyncGeneratorStep(gen,
|
|
42245
|
+
function asyncGeneratorStep(gen, resolve3, reject, _next, _throw, key, arg) {
|
|
42305
42246
|
try {
|
|
42306
42247
|
var info = gen[key](arg);
|
|
42307
42248
|
var value = info.value;
|
|
@@ -42310,7 +42251,7 @@ var require_number3 = __commonJS22((exports, module) => {
|
|
|
42310
42251
|
return;
|
|
42311
42252
|
}
|
|
42312
42253
|
if (info.done) {
|
|
42313
|
-
|
|
42254
|
+
resolve3(value);
|
|
42314
42255
|
} else {
|
|
42315
42256
|
Promise.resolve(value).then(_next, _throw);
|
|
42316
42257
|
}
|
|
@@ -42318,13 +42259,13 @@ var require_number3 = __commonJS22((exports, module) => {
|
|
|
42318
42259
|
function _asyncToGenerator(fn) {
|
|
42319
42260
|
return function() {
|
|
42320
42261
|
var self2 = this, args = arguments;
|
|
42321
|
-
return new Promise(function(
|
|
42262
|
+
return new Promise(function(resolve3, reject) {
|
|
42322
42263
|
var gen = fn.apply(self2, args);
|
|
42323
42264
|
function _next(value) {
|
|
42324
|
-
asyncGeneratorStep(gen,
|
|
42265
|
+
asyncGeneratorStep(gen, resolve3, reject, _next, _throw, "next", value);
|
|
42325
42266
|
}
|
|
42326
42267
|
function _throw(err2) {
|
|
42327
|
-
asyncGeneratorStep(gen,
|
|
42268
|
+
asyncGeneratorStep(gen, resolve3, reject, _next, _throw, "throw", err2);
|
|
42328
42269
|
}
|
|
42329
42270
|
_next(undefined);
|
|
42330
42271
|
});
|
|
@@ -42756,7 +42697,7 @@ Instructions:
|
|
|
42756
42697
|
module.exports = MultiselectPrompt;
|
|
42757
42698
|
});
|
|
42758
42699
|
var require_autocomplete3 = __commonJS22((exports, module) => {
|
|
42759
|
-
function asyncGeneratorStep(gen,
|
|
42700
|
+
function asyncGeneratorStep(gen, resolve3, reject, _next, _throw, key, arg) {
|
|
42760
42701
|
try {
|
|
42761
42702
|
var info = gen[key](arg);
|
|
42762
42703
|
var value = info.value;
|
|
@@ -42765,7 +42706,7 @@ var require_autocomplete3 = __commonJS22((exports, module) => {
|
|
|
42765
42706
|
return;
|
|
42766
42707
|
}
|
|
42767
42708
|
if (info.done) {
|
|
42768
|
-
|
|
42709
|
+
resolve3(value);
|
|
42769
42710
|
} else {
|
|
42770
42711
|
Promise.resolve(value).then(_next, _throw);
|
|
42771
42712
|
}
|
|
@@ -42773,13 +42714,13 @@ var require_autocomplete3 = __commonJS22((exports, module) => {
|
|
|
42773
42714
|
function _asyncToGenerator(fn) {
|
|
42774
42715
|
return function() {
|
|
42775
42716
|
var self2 = this, args = arguments;
|
|
42776
|
-
return new Promise(function(
|
|
42717
|
+
return new Promise(function(resolve3, reject) {
|
|
42777
42718
|
var gen = fn.apply(self2, args);
|
|
42778
42719
|
function _next(value) {
|
|
42779
|
-
asyncGeneratorStep(gen,
|
|
42720
|
+
asyncGeneratorStep(gen, resolve3, reject, _next, _throw, "next", value);
|
|
42780
42721
|
}
|
|
42781
42722
|
function _throw(err2) {
|
|
42782
|
-
asyncGeneratorStep(gen,
|
|
42723
|
+
asyncGeneratorStep(gen, resolve3, reject, _next, _throw, "throw", err2);
|
|
42783
42724
|
}
|
|
42784
42725
|
_next(undefined);
|
|
42785
42726
|
});
|
|
@@ -43428,7 +43369,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
43428
43369
|
arr2[i] = arr[i];
|
|
43429
43370
|
return arr2;
|
|
43430
43371
|
}
|
|
43431
|
-
function asyncGeneratorStep(gen,
|
|
43372
|
+
function asyncGeneratorStep(gen, resolve3, reject, _next, _throw, key, arg) {
|
|
43432
43373
|
try {
|
|
43433
43374
|
var info = gen[key](arg);
|
|
43434
43375
|
var value = info.value;
|
|
@@ -43437,7 +43378,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
43437
43378
|
return;
|
|
43438
43379
|
}
|
|
43439
43380
|
if (info.done) {
|
|
43440
|
-
|
|
43381
|
+
resolve3(value);
|
|
43441
43382
|
} else {
|
|
43442
43383
|
Promise.resolve(value).then(_next, _throw);
|
|
43443
43384
|
}
|
|
@@ -43445,13 +43386,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
43445
43386
|
function _asyncToGenerator(fn) {
|
|
43446
43387
|
return function() {
|
|
43447
43388
|
var self2 = this, args = arguments;
|
|
43448
|
-
return new Promise(function(
|
|
43389
|
+
return new Promise(function(resolve3, reject) {
|
|
43449
43390
|
var gen = fn.apply(self2, args);
|
|
43450
43391
|
function _next(value) {
|
|
43451
|
-
asyncGeneratorStep(gen,
|
|
43392
|
+
asyncGeneratorStep(gen, resolve3, reject, _next, _throw, "next", value);
|
|
43452
43393
|
}
|
|
43453
43394
|
function _throw(err2) {
|
|
43454
|
-
asyncGeneratorStep(gen,
|
|
43395
|
+
asyncGeneratorStep(gen, resolve3, reject, _next, _throw, "throw", err2);
|
|
43455
43396
|
}
|
|
43456
43397
|
_next(undefined);
|
|
43457
43398
|
});
|
|
@@ -48042,7 +47983,7 @@ pluralize2.addIrregularRule = (single, plural) => {
|
|
|
48042
47983
|
/pox$/i,
|
|
48043
47984
|
/sheep$/i
|
|
48044
47985
|
].forEach(pluralize2.addUncountableRule);
|
|
48045
|
-
var charMap2 = JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\
|
|
47986
|
+
var charMap2 = JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E'","\u0538":"Y'","\u0539":"T'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C'","\u053F":"K","\u0540":"H","\u0541":"D'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P'","\u0554":"Q'","\u0555":"O''","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}`);
|
|
48046
47987
|
var locales2 = JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');
|
|
48047
47988
|
init_consola_36c0034f2();
|
|
48048
47989
|
init_core2();
|
|
@@ -48114,29 +48055,29 @@ var log2 = {
|
|
|
48114
48055
|
},
|
|
48115
48056
|
echo: (...args) => console.log(...args)
|
|
48116
48057
|
};
|
|
48117
|
-
function userDatabasePath2(
|
|
48118
|
-
return projectPath2(`database/${
|
|
48058
|
+
function userDatabasePath2(path22) {
|
|
48059
|
+
return projectPath2(`database/${path22 || ""}`);
|
|
48119
48060
|
}
|
|
48120
|
-
function appPath2(
|
|
48121
|
-
return projectPath2(`app/${
|
|
48061
|
+
function appPath2(path22) {
|
|
48062
|
+
return projectPath2(`app/${path22 || ""}`);
|
|
48122
48063
|
}
|
|
48123
|
-
function commandsPath2(
|
|
48124
|
-
return appPath2(`Commands/${
|
|
48064
|
+
function commandsPath2(path22) {
|
|
48065
|
+
return appPath2(`Commands/${path22 || ""}`);
|
|
48125
48066
|
}
|
|
48126
|
-
function logsPath2(
|
|
48127
|
-
return storagePath2(`logs/${
|
|
48067
|
+
function logsPath2(path22) {
|
|
48068
|
+
return storagePath2(`logs/${path22 || ""}`);
|
|
48128
48069
|
}
|
|
48129
48070
|
function projectPath2(filePath = "", options2) {
|
|
48130
|
-
let
|
|
48131
|
-
while (
|
|
48132
|
-
|
|
48133
|
-
const finalPath = resolve22(
|
|
48071
|
+
let path22 = process52.cwd();
|
|
48072
|
+
while (path22.includes("storage"))
|
|
48073
|
+
path22 = resolve22(path22, "..");
|
|
48074
|
+
const finalPath = resolve22(path22, filePath);
|
|
48134
48075
|
if (options2?.relative)
|
|
48135
48076
|
return relative2(process52.cwd(), finalPath);
|
|
48136
48077
|
return finalPath;
|
|
48137
48078
|
}
|
|
48138
|
-
function storagePath2(
|
|
48139
|
-
return projectPath2(`storage/${
|
|
48079
|
+
function storagePath2(path22) {
|
|
48080
|
+
return projectPath2(`storage/${path22 || ""}`);
|
|
48140
48081
|
}
|
|
48141
48082
|
var config4 = {
|
|
48142
48083
|
ai: {
|
|
@@ -51608,7 +51549,7 @@ var uuidRule2 = createRule2((value, options2, field) => {
|
|
|
51608
51549
|
field.report(messages2.uuid, "uuid", field);
|
|
51609
51550
|
}
|
|
51610
51551
|
} else {
|
|
51611
|
-
const matchesAnyVersion = options2.version.find((
|
|
51552
|
+
const matchesAnyVersion = options2.version.find((version2) => helpers32.isUUID(value, version2));
|
|
51612
51553
|
if (!matchesAnyVersion) {
|
|
51613
51554
|
field.report(messages2.uuid, "uuid", field, options2);
|
|
51614
51555
|
}
|
|
@@ -51703,8 +51644,8 @@ var VineString2 = class _VineString2 extends BaseLiteralType2 {
|
|
|
51703
51644
|
mobile(...args) {
|
|
51704
51645
|
return this.use(mobileRule2(...args));
|
|
51705
51646
|
}
|
|
51706
|
-
ipAddress(
|
|
51707
|
-
return this.use(ipAddressRule2(
|
|
51647
|
+
ipAddress(version2) {
|
|
51648
|
+
return this.use(ipAddressRule2(version2 ? { version: version2 } : undefined));
|
|
51708
51649
|
}
|
|
51709
51650
|
hexCode() {
|
|
51710
51651
|
return this.use(hexCodeRule2());
|
|
@@ -53000,7 +52941,7 @@ var ui_default2 = {
|
|
|
53000
52941
|
}
|
|
53001
52942
|
}
|
|
53002
52943
|
};
|
|
53003
|
-
var
|
|
52944
|
+
var config22 = {
|
|
53004
52945
|
ai: ai_default2,
|
|
53005
52946
|
analytics: analytics_default2,
|
|
53006
52947
|
app: app_default2,
|
|
@@ -53027,7 +52968,7 @@ var config23 = {
|
|
|
53027
52968
|
team: team_default2,
|
|
53028
52969
|
ui: ui_default2
|
|
53029
52970
|
};
|
|
53030
|
-
var overrides_default2 =
|
|
52971
|
+
var overrides_default2 = config22;
|
|
53031
52972
|
async function localTunnel2(options2) {
|
|
53032
52973
|
const port = 3000;
|
|
53033
52974
|
if (!options2?.port)
|
|
@@ -53335,11 +53276,11 @@ var createNeverThrowError2 = (message, result, config5 = defaultErrorConfig2) =>
|
|
|
53335
53276
|
};
|
|
53336
53277
|
function __awaiter2(thisArg, _arguments, P22, generator) {
|
|
53337
53278
|
function adopt(value) {
|
|
53338
|
-
return value instanceof P22 ? value : new P22(function(
|
|
53339
|
-
|
|
53279
|
+
return value instanceof P22 ? value : new P22(function(resolve3) {
|
|
53280
|
+
resolve3(value);
|
|
53340
53281
|
});
|
|
53341
53282
|
}
|
|
53342
|
-
return new (P22 || (P22 = Promise))(function(
|
|
53283
|
+
return new (P22 || (P22 = Promise))(function(resolve3, reject) {
|
|
53343
53284
|
function fulfilled(value) {
|
|
53344
53285
|
try {
|
|
53345
53286
|
step(generator.next(value));
|
|
@@ -53355,7 +53296,7 @@ function __awaiter2(thisArg, _arguments, P22, generator) {
|
|
|
53355
53296
|
}
|
|
53356
53297
|
}
|
|
53357
53298
|
function step(result) {
|
|
53358
|
-
result.done ?
|
|
53299
|
+
result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
53359
53300
|
}
|
|
53360
53301
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
53361
53302
|
});
|
|
@@ -53443,14 +53384,14 @@ function __asyncValues2(o) {
|
|
|
53443
53384
|
}, i);
|
|
53444
53385
|
function verb(n) {
|
|
53445
53386
|
i[n] = o[n] && function(v22) {
|
|
53446
|
-
return new Promise(function(
|
|
53447
|
-
v22 = o[n](v22), settle(
|
|
53387
|
+
return new Promise(function(resolve3, reject) {
|
|
53388
|
+
v22 = o[n](v22), settle(resolve3, reject, v22.done, v22.value);
|
|
53448
53389
|
});
|
|
53449
53390
|
};
|
|
53450
53391
|
}
|
|
53451
|
-
function settle(
|
|
53392
|
+
function settle(resolve3, reject, d, v22) {
|
|
53452
53393
|
Promise.resolve(v22).then(function(v3) {
|
|
53453
|
-
|
|
53394
|
+
resolve3({ value: v3, done: d });
|
|
53454
53395
|
}, reject);
|
|
53455
53396
|
}
|
|
53456
53397
|
}
|
|
@@ -54223,7 +54164,7 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
54223
54164
|
return min;
|
|
54224
54165
|
}
|
|
54225
54166
|
if (process112.platform === "win32") {
|
|
54226
|
-
const osRelease =
|
|
54167
|
+
const osRelease = os2.release().split(".");
|
|
54227
54168
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
54228
54169
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
54229
54170
|
}
|
|
@@ -55239,7 +55180,7 @@ function deleteKeys2(obj, ...keys) {
|
|
|
55239
55180
|
});
|
|
55240
55181
|
}
|
|
55241
55182
|
var isArray2 = (item) => Array.isArray(item);
|
|
55242
|
-
function
|
|
55183
|
+
function isObject22(item) {
|
|
55243
55184
|
return typeof item === "object" && !Array.isArray(item) && item !== null;
|
|
55244
55185
|
}
|
|
55245
55186
|
var isFunction2 = (item) => typeof item === "function";
|
|
@@ -56020,7 +55961,7 @@ class Collection2 {
|
|
|
56020
55961
|
}
|
|
56021
55962
|
return new this.constructor(this.items.splice(-count));
|
|
56022
55963
|
}
|
|
56023
|
-
if (
|
|
55964
|
+
if (isObject22(this.items)) {
|
|
56024
55965
|
const keys = Object.keys(this.items);
|
|
56025
55966
|
if (count === 1) {
|
|
56026
55967
|
const key = keys[keys.length - 1];
|
|
@@ -56165,7 +56106,7 @@ class Collection2 {
|
|
|
56165
56106
|
};
|
|
56166
56107
|
if (isArray2(this.items)) {
|
|
56167
56108
|
result = this.items.findIndex(find);
|
|
56168
|
-
} else if (
|
|
56109
|
+
} else if (isObject22(this.items)) {
|
|
56169
56110
|
result = Object.keys(this.items).find((key) => find(this.items[key], key));
|
|
56170
56111
|
}
|
|
56171
56112
|
if (result === undefined || result < 0) {
|
|
@@ -56183,7 +56124,7 @@ class Collection2 {
|
|
|
56183
56124
|
}
|
|
56184
56125
|
return new this.constructor(this.items.splice(0, count));
|
|
56185
56126
|
}
|
|
56186
|
-
if (
|
|
56127
|
+
if (isObject22(this.items)) {
|
|
56187
56128
|
if (count === 1) {
|
|
56188
56129
|
const key = Object.keys(this.items)[0];
|
|
56189
56130
|
const value = this.items[key];
|
|
@@ -56216,7 +56157,7 @@ class Collection2 {
|
|
|
56216
56157
|
return this;
|
|
56217
56158
|
}
|
|
56218
56159
|
skip(number) {
|
|
56219
|
-
if (
|
|
56160
|
+
if (isObject22(this.items)) {
|
|
56220
56161
|
return new this.constructor(Object.keys(this.items).reduce((accumulator, key, index) => {
|
|
56221
56162
|
if (index + 1 > number) {
|
|
56222
56163
|
accumulator[key] = this.items[key];
|
|
@@ -56241,7 +56182,7 @@ class Collection2 {
|
|
|
56241
56182
|
return previous;
|
|
56242
56183
|
});
|
|
56243
56184
|
}
|
|
56244
|
-
if (
|
|
56185
|
+
if (isObject22(this.items)) {
|
|
56245
56186
|
items = Object.keys(this.items).reduce((acc, key) => {
|
|
56246
56187
|
if (previous !== true) {
|
|
56247
56188
|
previous = callback(this.items[key]);
|
|
@@ -56269,7 +56210,7 @@ class Collection2 {
|
|
|
56269
56210
|
return previous;
|
|
56270
56211
|
});
|
|
56271
56212
|
}
|
|
56272
|
-
if (
|
|
56213
|
+
if (isObject22(this.items)) {
|
|
56273
56214
|
items = Object.keys(this.items).reduce((acc, key) => {
|
|
56274
56215
|
if (previous !== true) {
|
|
56275
56216
|
previous = !callback(this.items[key]);
|
|
@@ -56432,7 +56373,7 @@ class Collection2 {
|
|
|
56432
56373
|
return previous;
|
|
56433
56374
|
});
|
|
56434
56375
|
}
|
|
56435
|
-
if (
|
|
56376
|
+
if (isObject22(this.items)) {
|
|
56436
56377
|
items = Object.keys(this.items).reduce((acc, key) => {
|
|
56437
56378
|
if (previous !== false) {
|
|
56438
56379
|
previous = !callback(this.items[key]);
|
|
@@ -56460,7 +56401,7 @@ class Collection2 {
|
|
|
56460
56401
|
return previous;
|
|
56461
56402
|
});
|
|
56462
56403
|
}
|
|
56463
|
-
if (
|
|
56404
|
+
if (isObject22(this.items)) {
|
|
56464
56405
|
items = Object.keys(this.items).reduce((acc, key) => {
|
|
56465
56406
|
if (previous !== false) {
|
|
56466
56407
|
previous = callback(this.items[key]);
|
|
@@ -56715,7 +56656,7 @@ var buildKeyPathMap3 = function buildKeyPathMap22(items) {
|
|
|
56715
56656
|
const keyPaths = {};
|
|
56716
56657
|
items.forEach((item, index) => {
|
|
56717
56658
|
function buildKeyPath(val, keyPath) {
|
|
56718
|
-
if (
|
|
56659
|
+
if (isObject22(val)) {
|
|
56719
56660
|
Object.keys(val).forEach((prop) => {
|
|
56720
56661
|
buildKeyPath(val[prop], `${keyPath}.${prop}`);
|
|
56721
56662
|
});
|
|
@@ -56762,7 +56703,7 @@ var quotes2 = collect2([
|
|
|
56762
56703
|
]);
|
|
56763
56704
|
var export_prompts2 = import_prompts2.default;
|
|
56764
56705
|
var import_node_forge2 = __toESM3(require_lib2(), 1);
|
|
56765
|
-
function
|
|
56706
|
+
function deepMerge(target, source) {
|
|
56766
56707
|
if (Array.isArray(source) && !Array.isArray(target)) {
|
|
56767
56708
|
return source;
|
|
56768
56709
|
}
|
|
@@ -56770,7 +56711,7 @@ function deepMerge2(target, source) {
|
|
|
56770
56711
|
return source.map((sourceItem, index) => {
|
|
56771
56712
|
const targetItem = target[index];
|
|
56772
56713
|
if (isObject32(sourceItem) && isObject32(targetItem)) {
|
|
56773
|
-
return
|
|
56714
|
+
return deepMerge(targetItem, sourceItem);
|
|
56774
56715
|
}
|
|
56775
56716
|
return sourceItem;
|
|
56776
56717
|
});
|
|
@@ -56786,7 +56727,7 @@ function deepMerge2(target, source) {
|
|
|
56786
56727
|
if (sourceValue === null || sourceValue === undefined) {
|
|
56787
56728
|
merged[key] = sourceValue;
|
|
56788
56729
|
} else if (isObject32(sourceValue) && isObject32(targetValue)) {
|
|
56789
|
-
merged[key] =
|
|
56730
|
+
merged[key] = deepMerge(targetValue, sourceValue);
|
|
56790
56731
|
} else {
|
|
56791
56732
|
merged[key] = sourceValue;
|
|
56792
56733
|
}
|
|
@@ -56797,17 +56738,17 @@ function deepMerge2(target, source) {
|
|
|
56797
56738
|
function isObject32(item) {
|
|
56798
56739
|
return Boolean(item && typeof item === "object" && !Array.isArray(item));
|
|
56799
56740
|
}
|
|
56800
|
-
async function
|
|
56801
|
-
const configPath =
|
|
56741
|
+
async function loadConfig({ name, cwd, defaultConfig }) {
|
|
56742
|
+
const configPath = resolve(cwd || process2.cwd(), `${name}.config`);
|
|
56802
56743
|
try {
|
|
56803
56744
|
const importedConfig = await import(configPath);
|
|
56804
56745
|
const loadedConfig = importedConfig.default || importedConfig;
|
|
56805
|
-
return
|
|
56746
|
+
return deepMerge(defaultConfig, loadedConfig);
|
|
56806
56747
|
} catch (error) {
|
|
56807
56748
|
return defaultConfig;
|
|
56808
56749
|
}
|
|
56809
56750
|
}
|
|
56810
|
-
var config42 = await
|
|
56751
|
+
var config42 = await loadConfig({
|
|
56811
56752
|
name: "tls",
|
|
56812
56753
|
defaultConfig: {
|
|
56813
56754
|
altNameIPs: ["127.0.0.1"],
|
|
@@ -56821,9 +56762,9 @@ var config42 = await loadConfig2({
|
|
|
56821
56762
|
hostCertCN: "stacks.localhost",
|
|
56822
56763
|
domain: "stacks.localhost",
|
|
56823
56764
|
rootCAObject: { certificate: "", privateKey: "" },
|
|
56824
|
-
caCertPath:
|
|
56825
|
-
certPath:
|
|
56826
|
-
keyPath:
|
|
56765
|
+
caCertPath: path.join(os22.homedir(), ".stacks", "ssl", `stacks.localhost.ca.crt`),
|
|
56766
|
+
certPath: path.join(os22.homedir(), ".stacks", "ssl", `stacks.localhost.crt`),
|
|
56767
|
+
keyPath: path.join(os22.homedir(), ".stacks", "ssl", `stacks.localhost.crt.key`),
|
|
56827
56768
|
verbose: false
|
|
56828
56769
|
}
|
|
56829
56770
|
});
|
|
@@ -56841,7 +56782,7 @@ function findFoldersWithFile(rootDir, fileName) {
|
|
|
56841
56782
|
try {
|
|
56842
56783
|
const files = fs.readdirSync(dir);
|
|
56843
56784
|
for (const file of files) {
|
|
56844
|
-
const filePath =
|
|
56785
|
+
const filePath = path2.join(dir, file);
|
|
56845
56786
|
const stats = fs.lstatSync(filePath);
|
|
56846
56787
|
if (stats.isDirectory()) {
|
|
56847
56788
|
search(filePath);
|
|
@@ -57076,6 +57017,75 @@ var export_tls = import_node_forge2.tls;
|
|
|
57076
57017
|
var export_pki = import_node_forge2.pki;
|
|
57077
57018
|
var export_forge = import_node_forge2.default;
|
|
57078
57019
|
|
|
57020
|
+
// src/config.ts
|
|
57021
|
+
import os3 from "os";
|
|
57022
|
+
import path4 from "path";
|
|
57023
|
+
|
|
57024
|
+
// node_modules/bun-config/dist/index.js
|
|
57025
|
+
import { resolve as resolve3 } from "path";
|
|
57026
|
+
import process3 from "process";
|
|
57027
|
+
function deepMerge2(target, source) {
|
|
57028
|
+
if (Array.isArray(source) && !Array.isArray(target)) {
|
|
57029
|
+
return source;
|
|
57030
|
+
}
|
|
57031
|
+
if (Array.isArray(source) && Array.isArray(target)) {
|
|
57032
|
+
return source.map((sourceItem, index) => {
|
|
57033
|
+
const targetItem = target[index];
|
|
57034
|
+
if (isObject5(sourceItem) && isObject5(targetItem)) {
|
|
57035
|
+
return deepMerge2(targetItem, sourceItem);
|
|
57036
|
+
}
|
|
57037
|
+
return sourceItem;
|
|
57038
|
+
});
|
|
57039
|
+
}
|
|
57040
|
+
if (!isObject5(source) || !isObject5(target)) {
|
|
57041
|
+
return source;
|
|
57042
|
+
}
|
|
57043
|
+
const merged = { ...target };
|
|
57044
|
+
for (const key in source) {
|
|
57045
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
57046
|
+
const sourceValue = source[key];
|
|
57047
|
+
const targetValue = merged[key];
|
|
57048
|
+
if (sourceValue === null || sourceValue === undefined) {
|
|
57049
|
+
merged[key] = sourceValue;
|
|
57050
|
+
} else if (isObject5(sourceValue) && isObject5(targetValue)) {
|
|
57051
|
+
merged[key] = deepMerge2(targetValue, sourceValue);
|
|
57052
|
+
} else {
|
|
57053
|
+
merged[key] = sourceValue;
|
|
57054
|
+
}
|
|
57055
|
+
}
|
|
57056
|
+
}
|
|
57057
|
+
return merged;
|
|
57058
|
+
}
|
|
57059
|
+
function isObject5(item) {
|
|
57060
|
+
return Boolean(item && typeof item === "object" && !Array.isArray(item));
|
|
57061
|
+
}
|
|
57062
|
+
async function loadConfig2({ name, cwd, defaultConfig }) {
|
|
57063
|
+
const configPath = resolve3(cwd || process3.cwd(), `${name}.config`);
|
|
57064
|
+
try {
|
|
57065
|
+
const importedConfig = await import(configPath);
|
|
57066
|
+
const loadedConfig = importedConfig.default || importedConfig;
|
|
57067
|
+
return deepMerge2(defaultConfig, loadedConfig);
|
|
57068
|
+
} catch (error) {
|
|
57069
|
+
return defaultConfig;
|
|
57070
|
+
}
|
|
57071
|
+
}
|
|
57072
|
+
|
|
57073
|
+
// src/config.ts
|
|
57074
|
+
var config6 = await loadConfig2({
|
|
57075
|
+
name: "reverse-proxy",
|
|
57076
|
+
defaultConfig: {
|
|
57077
|
+
from: "localhost:5173",
|
|
57078
|
+
to: "stacks.localhost",
|
|
57079
|
+
https: {
|
|
57080
|
+
caCertPath: path4.join(os3.homedir(), ".stacks", "ssl", `stacks.localhost.ca.crt`),
|
|
57081
|
+
certPath: path4.join(os3.homedir(), ".stacks", "ssl", `stacks.localhost.crt`),
|
|
57082
|
+
keyPath: path4.join(os3.homedir(), ".stacks", "ssl", `stacks.localhost.crt.key`)
|
|
57083
|
+
},
|
|
57084
|
+
etcHostsCleanup: true,
|
|
57085
|
+
verbose: false
|
|
57086
|
+
}
|
|
57087
|
+
});
|
|
57088
|
+
|
|
57079
57089
|
// src/https.ts
|
|
57080
57090
|
var cachedSSLConfig = null;
|
|
57081
57091
|
function isMultiProxyConfig(options3) {
|
|
@@ -57092,14 +57102,14 @@ function generateWildcardPatterns(domain) {
|
|
|
57092
57102
|
}
|
|
57093
57103
|
function generateBaseConfig(options3, verbose) {
|
|
57094
57104
|
const domains = extractDomains(options3);
|
|
57095
|
-
const sslBase =
|
|
57105
|
+
const sslBase = path6.join(os5.homedir(), ".stacks", "ssl");
|
|
57096
57106
|
const httpsConfig = options3.https === true ? {
|
|
57097
|
-
caCertPath:
|
|
57098
|
-
certPath:
|
|
57099
|
-
keyPath:
|
|
57100
|
-
} : typeof
|
|
57107
|
+
caCertPath: path6.join(sslBase, "rpx-ca.crt"),
|
|
57108
|
+
certPath: path6.join(sslBase, "rpx.crt"),
|
|
57109
|
+
keyPath: path6.join(sslBase, "rpx.key")
|
|
57110
|
+
} : typeof config6.https === "object" ? {
|
|
57101
57111
|
...options3.https,
|
|
57102
|
-
...
|
|
57112
|
+
...config6.https
|
|
57103
57113
|
} : {};
|
|
57104
57114
|
debugLog2("ssl", `Extracted domains: ${domains.join(", ")}`, verbose);
|
|
57105
57115
|
debugLog2("ssl", `Using SSL base path: ${sslBase}`, verbose);
|
|
@@ -57116,9 +57126,9 @@ function generateBaseConfig(options3, verbose) {
|
|
|
57116
57126
|
return {
|
|
57117
57127
|
domain: domains[0],
|
|
57118
57128
|
hostCertCN: domains[0],
|
|
57119
|
-
caCertPath: httpsConfig?.caCertPath ??
|
|
57120
|
-
certPath: httpsConfig?.certPath ??
|
|
57121
|
-
keyPath: httpsConfig?.keyPath ??
|
|
57129
|
+
caCertPath: httpsConfig?.caCertPath ?? path6.join(sslBase, "rpx-ca.crt"),
|
|
57130
|
+
certPath: httpsConfig?.certPath ?? path6.join(sslBase, "rpx.crt"),
|
|
57131
|
+
keyPath: httpsConfig?.keyPath ?? path6.join(sslBase, "rpx.key"),
|
|
57122
57132
|
altNameIPs: httpsConfig?.altNameIPs ?? ["127.0.0.1", "::1"],
|
|
57123
57133
|
altNameURIs: httpsConfig?.altNameURIs ?? [],
|
|
57124
57134
|
commonName: httpsConfig?.commonName ?? domains[0],
|
|
@@ -57134,14 +57144,14 @@ function generateBaseConfig(options3, verbose) {
|
|
|
57134
57144
|
}))
|
|
57135
57145
|
};
|
|
57136
57146
|
}
|
|
57137
|
-
function generateRootCAConfig() {
|
|
57138
|
-
const sslBase =
|
|
57147
|
+
function generateRootCAConfig(verbose = false) {
|
|
57148
|
+
const sslBase = path6.join(os5.homedir(), ".stacks", "ssl");
|
|
57139
57149
|
return {
|
|
57140
57150
|
domain: "stacks.localhost",
|
|
57141
57151
|
hostCertCN: "stacks.localhost",
|
|
57142
|
-
caCertPath:
|
|
57143
|
-
certPath:
|
|
57144
|
-
keyPath:
|
|
57152
|
+
caCertPath: path6.join(sslBase, "rpx-root-ca.crt"),
|
|
57153
|
+
certPath: path6.join(sslBase, "rpx-certificate.crt"),
|
|
57154
|
+
keyPath: path6.join(sslBase, "rpx-certificate.key"),
|
|
57145
57155
|
altNameIPs: ["127.0.0.1", "::1"],
|
|
57146
57156
|
altNameURIs: [],
|
|
57147
57157
|
organizationName: "Stacks Local Development",
|
|
@@ -57150,7 +57160,7 @@ function generateRootCAConfig() {
|
|
|
57150
57160
|
localityName: "Playa Vista",
|
|
57151
57161
|
commonName: "stacks.localhost",
|
|
57152
57162
|
validityDays: 3650,
|
|
57153
|
-
verbose
|
|
57163
|
+
verbose
|
|
57154
57164
|
};
|
|
57155
57165
|
}
|
|
57156
57166
|
function httpsConfig(options3) {
|
|
@@ -57165,7 +57175,7 @@ async function generateCertificate2(options3) {
|
|
|
57165
57175
|
const domains = isMultiProxyConfig(options3) ? [options3.proxies[0].to, ...options3.proxies.map((proxy) => proxy.to)] : [options3.to];
|
|
57166
57176
|
const verbose = isMultiProxyConfig(options3) ? options3.verbose : options3.verbose;
|
|
57167
57177
|
debugLog2("ssl", `Generating certificate for domains: ${domains.join(", ")}`, verbose);
|
|
57168
|
-
const rootCAConfig = generateRootCAConfig();
|
|
57178
|
+
const rootCAConfig = generateRootCAConfig(verbose);
|
|
57169
57179
|
log.info("Generating Root CA certificate...");
|
|
57170
57180
|
const caCert = await createRootCA(rootCAConfig);
|
|
57171
57181
|
const hostConfig = generateBaseConfig(options3, verbose);
|
|
@@ -57208,14 +57218,14 @@ function extractDomains(options3) {
|
|
|
57208
57218
|
}
|
|
57209
57219
|
|
|
57210
57220
|
// src/hosts.ts
|
|
57211
|
-
var hostsFilePath =
|
|
57221
|
+
var hostsFilePath = process9.platform === "win32" ? path7.join(process9.env.windir || "C:\\Windows", "System32", "drivers", "etc", "hosts") : "/etc/hosts";
|
|
57212
57222
|
async function sudoWrite(operation, content) {
|
|
57213
57223
|
return new Promise((resolve4, reject) => {
|
|
57214
|
-
if (
|
|
57224
|
+
if (process9.platform === "win32") {
|
|
57215
57225
|
reject(new Error("Administrator privileges required on Windows"));
|
|
57216
57226
|
return;
|
|
57217
57227
|
}
|
|
57218
|
-
const tmpFile =
|
|
57228
|
+
const tmpFile = path7.join(os7.tmpdir(), "hosts.tmp");
|
|
57219
57229
|
try {
|
|
57220
57230
|
if (operation === "append") {
|
|
57221
57231
|
const currentContent = fs3.readFileSync(hostsFilePath, "utf8");
|
|
@@ -57281,7 +57291,7 @@ async function addHosts(hosts, verbose) {
|
|
|
57281
57291
|
log.warn("Please add these entries to your hosts file manually:");
|
|
57282
57292
|
hostEntries.split(`
|
|
57283
57293
|
`).forEach((entry) => log.warn(entry));
|
|
57284
|
-
if (
|
|
57294
|
+
if (process9.platform === "win32") {
|
|
57285
57295
|
log.warn(`
|
|
57286
57296
|
On Windows:`);
|
|
57287
57297
|
log.warn("1. Run notepad as administrator");
|
|
@@ -57338,7 +57348,7 @@ async function removeHosts(hosts, verbose) {
|
|
|
57338
57348
|
log.warn(`127.0.0.1 ${host}`);
|
|
57339
57349
|
log.warn(`::1 ${host}`);
|
|
57340
57350
|
});
|
|
57341
|
-
if (
|
|
57351
|
+
if (process9.platform === "win32") {
|
|
57342
57352
|
log.warn(`
|
|
57343
57353
|
On Windows:`);
|
|
57344
57354
|
log.warn("1. Run notepad as administrator");
|
|
@@ -57369,14 +57379,6 @@ async function checkHosts(hosts, verbose) {
|
|
|
57369
57379
|
return content.includes(ipv4Entry) || content.includes(ipv6Entry);
|
|
57370
57380
|
});
|
|
57371
57381
|
}
|
|
57372
|
-
// src/start.ts
|
|
57373
|
-
import * as fs5 from "fs";
|
|
57374
|
-
import * as http from "http";
|
|
57375
|
-
import * as https from "https";
|
|
57376
|
-
import * as net from "net";
|
|
57377
|
-
import process9 from "process";
|
|
57378
|
-
// package.json
|
|
57379
|
-
var version = "0.4.0";
|
|
57380
57382
|
|
|
57381
57383
|
// src/start.ts
|
|
57382
57384
|
var activeServers = new Set;
|
|
@@ -57410,16 +57412,16 @@ async function cleanup(options3) {
|
|
|
57410
57412
|
await Promise.all(cleanupPromises);
|
|
57411
57413
|
debugLog2("cleanup", "All cleanup tasks completed successfully", options3?.verbose);
|
|
57412
57414
|
log.success("All cleanup tasks completed successfully");
|
|
57413
|
-
|
|
57415
|
+
process20.exit(0);
|
|
57414
57416
|
} catch (err3) {
|
|
57415
57417
|
debugLog2("cleanup", `Error during cleanup: ${err3}`, options3?.verbose);
|
|
57416
57418
|
log.error("Error during cleanup:", err3);
|
|
57417
|
-
|
|
57419
|
+
process20.exit(1);
|
|
57418
57420
|
}
|
|
57419
57421
|
}
|
|
57420
|
-
|
|
57421
|
-
|
|
57422
|
-
|
|
57422
|
+
process20.on("SIGINT", cleanup);
|
|
57423
|
+
process20.on("SIGTERM", cleanup);
|
|
57424
|
+
process20.on("uncaughtException", (err3) => {
|
|
57423
57425
|
debugLog2("process", `Uncaught exception: ${err3}`, true);
|
|
57424
57426
|
log.error("Uncaught exception:", err3);
|
|
57425
57427
|
cleanup();
|
|
@@ -57530,7 +57532,7 @@ async function startServer(options3) {
|
|
|
57530
57532
|
log.warn("You can manually add this entry to your hosts file:");
|
|
57531
57533
|
log.warn(`127.0.0.1 ${toUrl.hostname}`);
|
|
57532
57534
|
log.warn(`::1 ${toUrl.hostname}`);
|
|
57533
|
-
if (
|
|
57535
|
+
if (process20.platform === "win32") {
|
|
57534
57536
|
log.warn("On Windows:");
|
|
57535
57537
|
log.warn("1. Run notepad as administrator");
|
|
57536
57538
|
log.warn("2. Open C:\\Windows\\System32\\drivers\\etc\\hosts");
|
|
@@ -57551,7 +57553,7 @@ async function startServer(options3) {
|
|
|
57551
57553
|
} catch (err3) {
|
|
57552
57554
|
debugLog2("server", `Connection test failed: ${err3}`, options3.verbose);
|
|
57553
57555
|
log.error(err3.message);
|
|
57554
|
-
|
|
57556
|
+
process20.exit(1);
|
|
57555
57557
|
}
|
|
57556
57558
|
let sslConfig = options3._cachedSSLConfig || null;
|
|
57557
57559
|
if (options3.https) {
|
|
@@ -57792,9 +57794,9 @@ async function startProxies(options3) {
|
|
|
57792
57794
|
etcHostsCleanup: isMultiProxyConfig2(options3) ? options3.etcHostsCleanup : options3.etcHostsCleanup || false,
|
|
57793
57795
|
verbose: isMultiProxyConfig2(options3) ? options3.verbose : options3.verbose || false
|
|
57794
57796
|
});
|
|
57795
|
-
|
|
57796
|
-
|
|
57797
|
-
|
|
57797
|
+
process20.on("SIGINT", cleanupHandler);
|
|
57798
|
+
process20.on("SIGTERM", cleanupHandler);
|
|
57799
|
+
process20.on("uncaughtException", (err3) => {
|
|
57798
57800
|
debugLog2("process", `Uncaught exception: ${err3}`, true);
|
|
57799
57801
|
log.error("Uncaught exception:", err3);
|
|
57800
57802
|
cleanupHandler();
|
|
@@ -57821,6 +57823,9 @@ async function startProxies(options3) {
|
|
|
57821
57823
|
function isMultiProxyConfig2(options3) {
|
|
57822
57824
|
return "proxies" in options3;
|
|
57823
57825
|
}
|
|
57826
|
+
|
|
57827
|
+
// src/index.ts
|
|
57828
|
+
var src_default = startProxies;
|
|
57824
57829
|
export {
|
|
57825
57830
|
startServer,
|
|
57826
57831
|
startProxy,
|
|
@@ -57834,8 +57839,9 @@ export {
|
|
|
57834
57839
|
getSSLConfig,
|
|
57835
57840
|
generateCertificate2 as generateCertificate,
|
|
57836
57841
|
extractDomains,
|
|
57842
|
+
src_default as default,
|
|
57837
57843
|
debugLog2 as debugLog,
|
|
57838
|
-
config,
|
|
57844
|
+
config6 as config,
|
|
57839
57845
|
cleanup,
|
|
57840
57846
|
checkHosts,
|
|
57841
57847
|
addHosts
|