hot-updater 0.22.2 → 0.23.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/dist/config.cjs +8 -6
- package/dist/config.d.cts +16 -1
- package/dist/config.d.ts +16 -1
- package/dist/config.js +2 -2
- package/dist/index.cjs +858 -345
- package/dist/index.js +513 -1
- package/dist/{fingerprint-B-Krd3Gt.cjs → keyGeneration-BsF6FbpU.cjs} +216 -73
- package/dist/{fingerprint-CrCon-HQ.js → keyGeneration-D_2zTEmt.js} +207 -91
- package/package.json +12 -12
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const require_chunk = require('./chunk-DWy1uDak.cjs');
|
|
3
|
-
const
|
|
3
|
+
const require_keyGeneration = require('./keyGeneration-BsF6FbpU.cjs');
|
|
4
4
|
let node_events = require("node:events");
|
|
5
5
|
node_events = require_chunk.__toESM(node_events);
|
|
6
6
|
let node_child_process = require("node:child_process");
|
|
@@ -59,6 +59,8 @@ let __hot_updater_console = require("@hot-updater/console");
|
|
|
59
59
|
__hot_updater_console = require_chunk.__toESM(__hot_updater_console);
|
|
60
60
|
let node_net = require("node:net");
|
|
61
61
|
node_net = require_chunk.__toESM(node_net);
|
|
62
|
+
let node_crypto = require("node:crypto");
|
|
63
|
+
node_crypto = require_chunk.__toESM(node_crypto);
|
|
62
64
|
let __hot_updater_server = require("@hot-updater/server");
|
|
63
65
|
__hot_updater_server = require_chunk.__toESM(__hot_updater_server);
|
|
64
66
|
let __hot_updater_server_adapters_kysely = require("@hot-updater/server/adapters/kysely");
|
|
@@ -1089,7 +1091,7 @@ var require_suggestSimilar = /* @__PURE__ */ require_chunk.__commonJS({ "../../n
|
|
|
1089
1091
|
var require_command = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/commander@14.0.0/node_modules/commander/lib/command.js": ((exports) => {
|
|
1090
1092
|
const EventEmitter$1 = require("node:events").EventEmitter;
|
|
1091
1093
|
const childProcess$1 = require("node:child_process");
|
|
1092
|
-
const path$
|
|
1094
|
+
const path$27 = require("node:path");
|
|
1093
1095
|
const fs$19 = require("node:fs");
|
|
1094
1096
|
const process$15 = require("node:process");
|
|
1095
1097
|
const { Argument: Argument$2, humanReadableArgName } = require_argument();
|
|
@@ -2006,9 +2008,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2006
2008
|
".cjs"
|
|
2007
2009
|
];
|
|
2008
2010
|
function findFile(baseDir, baseName) {
|
|
2009
|
-
const localBin = path$
|
|
2011
|
+
const localBin = path$27.resolve(baseDir, baseName);
|
|
2010
2012
|
if (fs$19.existsSync(localBin)) return localBin;
|
|
2011
|
-
if (sourceExt.includes(path$
|
|
2013
|
+
if (sourceExt.includes(path$27.extname(baseName))) return void 0;
|
|
2012
2014
|
const foundExt = sourceExt.find((ext) => fs$19.existsSync(`${localBin}${ext}`));
|
|
2013
2015
|
if (foundExt) return `${localBin}${foundExt}`;
|
|
2014
2016
|
}
|
|
@@ -2023,17 +2025,17 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2023
2025
|
} catch {
|
|
2024
2026
|
resolvedScriptPath = this._scriptPath;
|
|
2025
2027
|
}
|
|
2026
|
-
executableDir = path$
|
|
2028
|
+
executableDir = path$27.resolve(path$27.dirname(resolvedScriptPath), executableDir);
|
|
2027
2029
|
}
|
|
2028
2030
|
if (executableDir) {
|
|
2029
2031
|
let localFile = findFile(executableDir, executableFile);
|
|
2030
2032
|
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
2031
|
-
const legacyName = path$
|
|
2033
|
+
const legacyName = path$27.basename(this._scriptPath, path$27.extname(this._scriptPath));
|
|
2032
2034
|
if (legacyName !== this._name) localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);
|
|
2033
2035
|
}
|
|
2034
2036
|
executableFile = localFile || executableFile;
|
|
2035
2037
|
}
|
|
2036
|
-
launchWithNode = sourceExt.includes(path$
|
|
2038
|
+
launchWithNode = sourceExt.includes(path$27.extname(executableFile));
|
|
2037
2039
|
let proc;
|
|
2038
2040
|
if (process$15.platform !== "win32") if (launchWithNode) {
|
|
2039
2041
|
args.unshift(executableFile);
|
|
@@ -2802,7 +2804,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2802
2804
|
* @return {Command}
|
|
2803
2805
|
*/
|
|
2804
2806
|
nameFromFilename(filename) {
|
|
2805
|
-
this._name = path$
|
|
2807
|
+
this._name = path$27.basename(filename, path$27.extname(filename));
|
|
2806
2808
|
return this;
|
|
2807
2809
|
}
|
|
2808
2810
|
/**
|
|
@@ -2816,9 +2818,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2816
2818
|
* @param {string} [path]
|
|
2817
2819
|
* @return {(string|null|Command)}
|
|
2818
2820
|
*/
|
|
2819
|
-
executableDir(path$
|
|
2820
|
-
if (path$
|
|
2821
|
-
this._executableDir = path$
|
|
2821
|
+
executableDir(path$28) {
|
|
2822
|
+
if (path$28 === void 0) return this._executableDir;
|
|
2823
|
+
this._executableDir = path$28;
|
|
2822
2824
|
return this;
|
|
2823
2825
|
}
|
|
2824
2826
|
/**
|
|
@@ -3777,16 +3779,16 @@ var require_range = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
3777
3779
|
};
|
|
3778
3780
|
const replaceTilde = (comp, options) => {
|
|
3779
3781
|
const r = options.loose ? re$3[t$3.TILDELOOSE] : re$3[t$3.TILDE];
|
|
3780
|
-
return comp.replace(r, (_, M, m$1, p$
|
|
3781
|
-
debug$7("tilde", comp, _, M, m$1, p$
|
|
3782
|
+
return comp.replace(r, (_, M, m$1, p$16, pr) => {
|
|
3783
|
+
debug$7("tilde", comp, _, M, m$1, p$16, pr);
|
|
3782
3784
|
let ret;
|
|
3783
3785
|
if (isX(M)) ret = "";
|
|
3784
3786
|
else if (isX(m$1)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
3785
|
-
else if (isX(p$
|
|
3787
|
+
else if (isX(p$16)) ret = `>=${M}.${m$1}.0 <${M}.${+m$1 + 1}.0-0`;
|
|
3786
3788
|
else if (pr) {
|
|
3787
3789
|
debug$7("replaceTilde pr", pr);
|
|
3788
|
-
ret = `>=${M}.${m$1}.${p$
|
|
3789
|
-
} else ret = `>=${M}.${m$1}.${p$
|
|
3790
|
+
ret = `>=${M}.${m$1}.${p$16}-${pr} <${M}.${+m$1 + 1}.0-0`;
|
|
3791
|
+
} else ret = `>=${M}.${m$1}.${p$16} <${M}.${+m$1 + 1}.0-0`;
|
|
3790
3792
|
debug$7("tilde return", ret);
|
|
3791
3793
|
return ret;
|
|
3792
3794
|
});
|
|
@@ -3798,23 +3800,23 @@ var require_range = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
3798
3800
|
debug$7("caret", comp, options);
|
|
3799
3801
|
const r = options.loose ? re$3[t$3.CARETLOOSE] : re$3[t$3.CARET];
|
|
3800
3802
|
const z = options.includePrerelease ? "-0" : "";
|
|
3801
|
-
return comp.replace(r, (_, M, m$1, p$
|
|
3802
|
-
debug$7("caret", comp, _, M, m$1, p$
|
|
3803
|
+
return comp.replace(r, (_, M, m$1, p$16, pr) => {
|
|
3804
|
+
debug$7("caret", comp, _, M, m$1, p$16, pr);
|
|
3803
3805
|
let ret;
|
|
3804
3806
|
if (isX(M)) ret = "";
|
|
3805
3807
|
else if (isX(m$1)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
3806
|
-
else if (isX(p$
|
|
3808
|
+
else if (isX(p$16)) if (M === "0") ret = `>=${M}.${m$1}.0${z} <${M}.${+m$1 + 1}.0-0`;
|
|
3807
3809
|
else ret = `>=${M}.${m$1}.0${z} <${+M + 1}.0.0-0`;
|
|
3808
3810
|
else if (pr) {
|
|
3809
3811
|
debug$7("replaceCaret pr", pr);
|
|
3810
|
-
if (M === "0") if (m$1 === "0") ret = `>=${M}.${m$1}.${p$
|
|
3811
|
-
else ret = `>=${M}.${m$1}.${p$
|
|
3812
|
-
else ret = `>=${M}.${m$1}.${p$
|
|
3812
|
+
if (M === "0") if (m$1 === "0") ret = `>=${M}.${m$1}.${p$16}-${pr} <${M}.${m$1}.${+p$16 + 1}-0`;
|
|
3813
|
+
else ret = `>=${M}.${m$1}.${p$16}-${pr} <${M}.${+m$1 + 1}.0-0`;
|
|
3814
|
+
else ret = `>=${M}.${m$1}.${p$16}-${pr} <${+M + 1}.0.0-0`;
|
|
3813
3815
|
} else {
|
|
3814
3816
|
debug$7("no pr");
|
|
3815
|
-
if (M === "0") if (m$1 === "0") ret = `>=${M}.${m$1}.${p$
|
|
3816
|
-
else ret = `>=${M}.${m$1}.${p$
|
|
3817
|
-
else ret = `>=${M}.${m$1}.${p$
|
|
3817
|
+
if (M === "0") if (m$1 === "0") ret = `>=${M}.${m$1}.${p$16}${z} <${M}.${m$1}.${+p$16 + 1}-0`;
|
|
3818
|
+
else ret = `>=${M}.${m$1}.${p$16}${z} <${M}.${+m$1 + 1}.0-0`;
|
|
3819
|
+
else ret = `>=${M}.${m$1}.${p$16} <${+M + 1}.0.0-0`;
|
|
3818
3820
|
}
|
|
3819
3821
|
debug$7("caret return", ret);
|
|
3820
3822
|
return ret;
|
|
@@ -3827,11 +3829,11 @@ var require_range = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
3827
3829
|
const replaceXRange = (comp, options) => {
|
|
3828
3830
|
comp = comp.trim();
|
|
3829
3831
|
const r = options.loose ? re$3[t$3.XRANGELOOSE] : re$3[t$3.XRANGE];
|
|
3830
|
-
return comp.replace(r, (ret, gtlt, M, m$1, p$
|
|
3831
|
-
debug$7("xRange", comp, ret, gtlt, M, m$1, p$
|
|
3832
|
+
return comp.replace(r, (ret, gtlt, M, m$1, p$16, pr) => {
|
|
3833
|
+
debug$7("xRange", comp, ret, gtlt, M, m$1, p$16, pr);
|
|
3832
3834
|
const xM = isX(M);
|
|
3833
3835
|
const xm = xM || isX(m$1);
|
|
3834
|
-
const xp = xm || isX(p$
|
|
3836
|
+
const xp = xm || isX(p$16);
|
|
3835
3837
|
const anyX = xp;
|
|
3836
3838
|
if (gtlt === "=" && anyX) gtlt = "";
|
|
3837
3839
|
pr = options.includePrerelease ? "-0" : "";
|
|
@@ -3839,16 +3841,16 @@ var require_range = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
3839
3841
|
else ret = "*";
|
|
3840
3842
|
else if (gtlt && anyX) {
|
|
3841
3843
|
if (xm) m$1 = 0;
|
|
3842
|
-
p$
|
|
3844
|
+
p$16 = 0;
|
|
3843
3845
|
if (gtlt === ">") {
|
|
3844
3846
|
gtlt = ">=";
|
|
3845
3847
|
if (xm) {
|
|
3846
3848
|
M = +M + 1;
|
|
3847
3849
|
m$1 = 0;
|
|
3848
|
-
p$
|
|
3850
|
+
p$16 = 0;
|
|
3849
3851
|
} else {
|
|
3850
3852
|
m$1 = +m$1 + 1;
|
|
3851
|
-
p$
|
|
3853
|
+
p$16 = 0;
|
|
3852
3854
|
}
|
|
3853
3855
|
} else if (gtlt === "<=") {
|
|
3854
3856
|
gtlt = "<";
|
|
@@ -3856,7 +3858,7 @@ var require_range = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
3856
3858
|
else m$1 = +m$1 + 1;
|
|
3857
3859
|
}
|
|
3858
3860
|
if (gtlt === "<") pr = "-0";
|
|
3859
|
-
ret = `${gtlt + M}.${m$1}.${p$
|
|
3861
|
+
ret = `${gtlt + M}.${m$1}.${p$16}${pr}`;
|
|
3860
3862
|
} else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
3861
3863
|
else if (xp) ret = `>=${M}.${m$1}.0${pr} <${M}.${+m$1 + 1}.0-0`;
|
|
3862
3864
|
debug$7("xRange return", ret);
|
|
@@ -4714,28 +4716,28 @@ var require_windows = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
|
|
|
4714
4716
|
module.exports = isexe$3;
|
|
4715
4717
|
isexe$3.sync = sync$2;
|
|
4716
4718
|
var fs$18 = require("fs");
|
|
4717
|
-
function checkPathExt(path$
|
|
4719
|
+
function checkPathExt(path$28, options) {
|
|
4718
4720
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
4719
4721
|
if (!pathext) return true;
|
|
4720
4722
|
pathext = pathext.split(";");
|
|
4721
4723
|
if (pathext.indexOf("") !== -1) return true;
|
|
4722
4724
|
for (var i$1 = 0; i$1 < pathext.length; i$1++) {
|
|
4723
|
-
var p$
|
|
4724
|
-
if (p$
|
|
4725
|
+
var p$16 = pathext[i$1].toLowerCase();
|
|
4726
|
+
if (p$16 && path$28.substr(-p$16.length).toLowerCase() === p$16) return true;
|
|
4725
4727
|
}
|
|
4726
4728
|
return false;
|
|
4727
4729
|
}
|
|
4728
|
-
function checkStat$1(stat, path$
|
|
4730
|
+
function checkStat$1(stat, path$28, options) {
|
|
4729
4731
|
if (!stat.isSymbolicLink() && !stat.isFile()) return false;
|
|
4730
|
-
return checkPathExt(path$
|
|
4732
|
+
return checkPathExt(path$28, options);
|
|
4731
4733
|
}
|
|
4732
|
-
function isexe$3(path$
|
|
4733
|
-
fs$18.stat(path$
|
|
4734
|
-
cb(er, er ? false : checkStat$1(stat, path$
|
|
4734
|
+
function isexe$3(path$28, options, cb) {
|
|
4735
|
+
fs$18.stat(path$28, function(er, stat) {
|
|
4736
|
+
cb(er, er ? false : checkStat$1(stat, path$28, options));
|
|
4735
4737
|
});
|
|
4736
4738
|
}
|
|
4737
|
-
function sync$2(path$
|
|
4738
|
-
return checkStat$1(fs$18.statSync(path$
|
|
4739
|
+
function sync$2(path$28, options) {
|
|
4740
|
+
return checkStat$1(fs$18.statSync(path$28), path$28, options);
|
|
4739
4741
|
}
|
|
4740
4742
|
}) });
|
|
4741
4743
|
|
|
@@ -4745,13 +4747,13 @@ var require_mode = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_module
|
|
|
4745
4747
|
module.exports = isexe$2;
|
|
4746
4748
|
isexe$2.sync = sync$1;
|
|
4747
4749
|
var fs$17 = require("fs");
|
|
4748
|
-
function isexe$2(path$
|
|
4749
|
-
fs$17.stat(path$
|
|
4750
|
+
function isexe$2(path$28, options, cb) {
|
|
4751
|
+
fs$17.stat(path$28, function(er, stat) {
|
|
4750
4752
|
cb(er, er ? false : checkStat(stat, options));
|
|
4751
4753
|
});
|
|
4752
4754
|
}
|
|
4753
|
-
function sync$1(path$
|
|
4754
|
-
return checkStat(fs$17.statSync(path$
|
|
4755
|
+
function sync$1(path$28, options) {
|
|
4756
|
+
return checkStat(fs$17.statSync(path$28), options);
|
|
4755
4757
|
}
|
|
4756
4758
|
function checkStat(stat, options) {
|
|
4757
4759
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -4779,7 +4781,7 @@ var require_isexe = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
4779
4781
|
else core = require_mode();
|
|
4780
4782
|
module.exports = isexe$1;
|
|
4781
4783
|
isexe$1.sync = sync;
|
|
4782
|
-
function isexe$1(path$
|
|
4784
|
+
function isexe$1(path$28, options, cb) {
|
|
4783
4785
|
if (typeof options === "function") {
|
|
4784
4786
|
cb = options;
|
|
4785
4787
|
options = {};
|
|
@@ -4787,13 +4789,13 @@ var require_isexe = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
4787
4789
|
if (!cb) {
|
|
4788
4790
|
if (typeof Promise !== "function") throw new TypeError("callback not provided");
|
|
4789
4791
|
return new Promise(function(resolve, reject) {
|
|
4790
|
-
isexe$1(path$
|
|
4792
|
+
isexe$1(path$28, options || {}, function(er, is) {
|
|
4791
4793
|
if (er) reject(er);
|
|
4792
4794
|
else resolve(is);
|
|
4793
4795
|
});
|
|
4794
4796
|
});
|
|
4795
4797
|
}
|
|
4796
|
-
core(path$
|
|
4798
|
+
core(path$28, options || {}, function(er, is) {
|
|
4797
4799
|
if (er) {
|
|
4798
4800
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
4799
4801
|
er = null;
|
|
@@ -4803,9 +4805,9 @@ var require_isexe = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
4803
4805
|
cb(er, is);
|
|
4804
4806
|
});
|
|
4805
4807
|
}
|
|
4806
|
-
function sync(path$
|
|
4808
|
+
function sync(path$28, options) {
|
|
4807
4809
|
try {
|
|
4808
|
-
return core.sync(path$
|
|
4810
|
+
return core.sync(path$28, options || {});
|
|
4809
4811
|
} catch (er) {
|
|
4810
4812
|
if (options && options.ignoreErrors || er.code === "EACCES") return false;
|
|
4811
4813
|
else throw er;
|
|
@@ -4817,7 +4819,7 @@ var require_isexe = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
4817
4819
|
//#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
4818
4820
|
var require_which = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js": ((exports, module) => {
|
|
4819
4821
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
4820
|
-
const path$
|
|
4822
|
+
const path$26 = require("path");
|
|
4821
4823
|
const COLON = isWindows ? ";" : ":";
|
|
4822
4824
|
const isexe = require_isexe();
|
|
4823
4825
|
const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -4847,16 +4849,16 @@ var require_which = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
4847
4849
|
if (i$1 === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
4848
4850
|
const ppRaw = pathEnv[i$1];
|
|
4849
4851
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
4850
|
-
const pCmd = path$
|
|
4852
|
+
const pCmd = path$26.join(pathPart, cmd);
|
|
4851
4853
|
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i$1, 0));
|
|
4852
4854
|
});
|
|
4853
|
-
const subStep = (p$
|
|
4855
|
+
const subStep = (p$16, i$1, ii) => new Promise((resolve, reject) => {
|
|
4854
4856
|
if (ii === pathExt.length) return resolve(step(i$1 + 1));
|
|
4855
4857
|
const ext = pathExt[ii];
|
|
4856
|
-
isexe(p$
|
|
4857
|
-
if (!er && is) if (opt.all) found.push(p$
|
|
4858
|
-
else return resolve(p$
|
|
4859
|
-
return resolve(subStep(p$
|
|
4858
|
+
isexe(p$16 + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
4859
|
+
if (!er && is) if (opt.all) found.push(p$16 + ext);
|
|
4860
|
+
else return resolve(p$16 + ext);
|
|
4861
|
+
return resolve(subStep(p$16, i$1, ii + 1));
|
|
4860
4862
|
});
|
|
4861
4863
|
});
|
|
4862
4864
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -4868,10 +4870,10 @@ var require_which = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
4868
4870
|
for (let i$1 = 0; i$1 < pathEnv.length; i$1++) {
|
|
4869
4871
|
const ppRaw = pathEnv[i$1];
|
|
4870
4872
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
4871
|
-
const pCmd = path$
|
|
4872
|
-
const p$
|
|
4873
|
+
const pCmd = path$26.join(pathPart, cmd);
|
|
4874
|
+
const p$16 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
4873
4875
|
for (let j = 0; j < pathExt.length; j++) {
|
|
4874
|
-
const cur = p$
|
|
4876
|
+
const cur = p$16 + pathExt[j];
|
|
4875
4877
|
try {
|
|
4876
4878
|
if (isexe.sync(cur, { pathExt: pathExtExe })) if (opt.all) found.push(cur);
|
|
4877
4879
|
else return cur;
|
|
@@ -4901,7 +4903,7 @@ var require_path_key = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mo
|
|
|
4901
4903
|
//#endregion
|
|
4902
4904
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
4903
4905
|
var require_resolveCommand = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js": ((exports, module) => {
|
|
4904
|
-
const path$
|
|
4906
|
+
const path$25 = require("path");
|
|
4905
4907
|
const which = require_which();
|
|
4906
4908
|
const getPathKey = require_path_key();
|
|
4907
4909
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -4916,12 +4918,12 @@ var require_resolveCommand = /* @__PURE__ */ require_chunk.__commonJS({ "../../n
|
|
|
4916
4918
|
try {
|
|
4917
4919
|
resolved = which.sync(parsed.command, {
|
|
4918
4920
|
path: env$2[getPathKey({ env: env$2 })],
|
|
4919
|
-
pathExt: withoutPathExt ? path$
|
|
4921
|
+
pathExt: withoutPathExt ? path$25.delimiter : void 0
|
|
4920
4922
|
});
|
|
4921
4923
|
} catch (e) {} finally {
|
|
4922
4924
|
if (shouldSwitchCwd) process.chdir(cwd);
|
|
4923
4925
|
}
|
|
4924
|
-
if (resolved) resolved = path$
|
|
4926
|
+
if (resolved) resolved = path$25.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
4925
4927
|
return resolved;
|
|
4926
4928
|
}
|
|
4927
4929
|
function resolveCommand$1(parsed) {
|
|
@@ -4964,8 +4966,8 @@ var require_shebang_command = /* @__PURE__ */ require_chunk.__commonJS({ "../../
|
|
|
4964
4966
|
module.exports = (string = "") => {
|
|
4965
4967
|
const match = string.match(shebangRegex);
|
|
4966
4968
|
if (!match) return null;
|
|
4967
|
-
const [path$
|
|
4968
|
-
const binary = path$
|
|
4969
|
+
const [path$28, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
4970
|
+
const binary = path$28.split("/").pop();
|
|
4969
4971
|
if (binary === "env") return argument;
|
|
4970
4972
|
return argument ? `${binary} ${argument}` : binary;
|
|
4971
4973
|
};
|
|
@@ -4993,7 +4995,7 @@ var require_readShebang = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
|
|
|
4993
4995
|
//#endregion
|
|
4994
4996
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
4995
4997
|
var require_parse$4 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js": ((exports, module) => {
|
|
4996
|
-
const path$
|
|
4998
|
+
const path$24 = require("path");
|
|
4997
4999
|
const resolveCommand = require_resolveCommand();
|
|
4998
5000
|
const escape = require_escape();
|
|
4999
5001
|
const readShebang = require_readShebang();
|
|
@@ -5016,7 +5018,7 @@ var require_parse$4 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
|
|
|
5016
5018
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
5017
5019
|
if (parsed.options.forceShell || needsShell) {
|
|
5018
5020
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
5019
|
-
parsed.command = path$
|
|
5021
|
+
parsed.command = path$24.normalize(parsed.command);
|
|
5020
5022
|
parsed.command = escape.command(parsed.command);
|
|
5021
5023
|
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
5022
5024
|
parsed.args = [
|
|
@@ -8101,12 +8103,12 @@ const logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encodin
|
|
|
8101
8103
|
}
|
|
8102
8104
|
};
|
|
8103
8105
|
const writeToFiles = (serializedResult, stdioItems, outputFiles) => {
|
|
8104
|
-
for (const { path: path$
|
|
8105
|
-
const pathString = typeof path$
|
|
8106
|
-
if (append || outputFiles.has(pathString)) (0, node_fs.appendFileSync)(path$
|
|
8106
|
+
for (const { path: path$28, append } of stdioItems.filter(({ type: type$1 }) => FILE_TYPES.has(type$1))) {
|
|
8107
|
+
const pathString = typeof path$28 === "string" ? path$28 : path$28.toString();
|
|
8108
|
+
if (append || outputFiles.has(pathString)) (0, node_fs.appendFileSync)(path$28, serializedResult);
|
|
8107
8109
|
else {
|
|
8108
8110
|
outputFiles.add(pathString);
|
|
8109
|
-
(0, node_fs.writeFileSync)(path$
|
|
8111
|
+
(0, node_fs.writeFileSync)(path$28, serializedResult);
|
|
8110
8112
|
}
|
|
8111
8113
|
}
|
|
8112
8114
|
};
|
|
@@ -8914,8 +8916,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
8914
8916
|
const listeners = this.#process.listeners(sig);
|
|
8915
8917
|
let { count: count$1 } = this.#emitter;
|
|
8916
8918
|
/* c8 ignore start */
|
|
8917
|
-
const p$
|
|
8918
|
-
if (typeof p$
|
|
8919
|
+
const p$16 = process$16;
|
|
8920
|
+
if (typeof p$16.__signal_exit_emitter__ === "object" && typeof p$16.__signal_exit_emitter__.count === "number") count$1 += p$16.__signal_exit_emitter__.count;
|
|
8919
8921
|
/* c8 ignore stop */
|
|
8920
8922
|
if (listeners.length === count$1) {
|
|
8921
8923
|
this.unload();
|
|
@@ -10383,8 +10385,8 @@ function findUpSync(name, { cwd = node_process.default.cwd(), type: type$1 = "fi
|
|
|
10383
10385
|
//#endregion
|
|
10384
10386
|
//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
10385
10387
|
var require_picocolors = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": ((exports, module) => {
|
|
10386
|
-
let p$
|
|
10387
|
-
let isColorSupported$1 = !(!!env$1.NO_COLOR || argv.includes("--no-color")) && (!!env$1.FORCE_COLOR || argv.includes("--color") || p$
|
|
10388
|
+
let p$13 = process || {}, argv = p$13.argv || [], env$1 = p$13.env || {};
|
|
10389
|
+
let isColorSupported$1 = !(!!env$1.NO_COLOR || argv.includes("--no-color")) && (!!env$1.FORCE_COLOR || argv.includes("--color") || p$13.platform === "win32" || (p$13.stdout || {}).isTTY && env$1.TERM !== "dumb" || !!env$1.CI);
|
|
10388
10390
|
let formatter = (open$1, close, replace = open$1) => (input) => {
|
|
10389
10391
|
let string = "" + input, index = string.indexOf(close, open$1.length);
|
|
10390
10392
|
return ~index ? open$1 + replaceClose(string, close, replace, index) + close : open$1 + string + close;
|
|
@@ -11596,21 +11598,21 @@ var require_lib$3 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
11596
11598
|
return typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors.isColorSupported;
|
|
11597
11599
|
}
|
|
11598
11600
|
const compose = (f, g) => (v) => f(g(v));
|
|
11599
|
-
function buildDefs(colors$
|
|
11601
|
+
function buildDefs(colors$7) {
|
|
11600
11602
|
return {
|
|
11601
|
-
keyword: colors$
|
|
11602
|
-
capitalized: colors$
|
|
11603
|
-
jsxIdentifier: colors$
|
|
11604
|
-
punctuator: colors$
|
|
11605
|
-
number: colors$
|
|
11606
|
-
string: colors$
|
|
11607
|
-
regex: colors$
|
|
11608
|
-
comment: colors$
|
|
11609
|
-
invalid: compose(compose(colors$
|
|
11610
|
-
gutter: colors$
|
|
11611
|
-
marker: compose(colors$
|
|
11612
|
-
message: compose(colors$
|
|
11613
|
-
reset: colors$
|
|
11603
|
+
keyword: colors$7.cyan,
|
|
11604
|
+
capitalized: colors$7.yellow,
|
|
11605
|
+
jsxIdentifier: colors$7.yellow,
|
|
11606
|
+
punctuator: colors$7.yellow,
|
|
11607
|
+
number: colors$7.magenta,
|
|
11608
|
+
string: colors$7.green,
|
|
11609
|
+
regex: colors$7.magenta,
|
|
11610
|
+
comment: colors$7.gray,
|
|
11611
|
+
invalid: compose(compose(colors$7.white, colors$7.bgRed), colors$7.bold),
|
|
11612
|
+
gutter: colors$7.gray,
|
|
11613
|
+
marker: compose(colors$7.red, colors$7.bold),
|
|
11614
|
+
message: compose(colors$7.red, colors$7.bold),
|
|
11615
|
+
reset: colors$7.reset
|
|
11614
11616
|
};
|
|
11615
11617
|
}
|
|
11616
11618
|
const defsOn = buildDefs(picocolors.createColors(true));
|
|
@@ -13659,7 +13661,7 @@ var require_commonjs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mo
|
|
|
13659
13661
|
return c$1.#tail;
|
|
13660
13662
|
},
|
|
13661
13663
|
free: c$1.#free,
|
|
13662
|
-
isBackgroundFetch: (p$
|
|
13664
|
+
isBackgroundFetch: (p$16) => c$1.#isBackgroundFetch(p$16),
|
|
13663
13665
|
backgroundFetch: (k, index, options, context) => c$1.#backgroundFetch(k, index, options, context),
|
|
13664
13666
|
moveToTail: (index) => c$1.#moveToTail(index),
|
|
13665
13667
|
indexes: (options) => c$1.#indexes(options),
|
|
@@ -14267,8 +14269,8 @@ var require_commonjs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mo
|
|
|
14267
14269
|
if (ignoreAbort) options.status.fetchAbortIgnored = true;
|
|
14268
14270
|
} else options.status.fetchResolved = true;
|
|
14269
14271
|
if (aborted$1 && !ignoreAbort && !updateCache) return fetchFail(ac.signal.reason);
|
|
14270
|
-
const bf$1 = p$
|
|
14271
|
-
if (this.#valList[index] === p$
|
|
14272
|
+
const bf$1 = p$16;
|
|
14273
|
+
if (this.#valList[index] === p$16) if (v$1 === void 0) if (bf$1.__staleWhileFetching) this.#valList[index] = bf$1.__staleWhileFetching;
|
|
14272
14274
|
else this.delete(k);
|
|
14273
14275
|
else {
|
|
14274
14276
|
if (options.status) options.status.fetchUpdated = true;
|
|
@@ -14288,8 +14290,8 @@ var require_commonjs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mo
|
|
|
14288
14290
|
const allowStaleAborted = aborted$1 && options.allowStaleOnFetchAbort;
|
|
14289
14291
|
const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
|
|
14290
14292
|
const noDelete = allowStale || options.noDeleteOnFetchRejection;
|
|
14291
|
-
const bf$1 = p$
|
|
14292
|
-
if (this.#valList[index] === p$
|
|
14293
|
+
const bf$1 = p$16;
|
|
14294
|
+
if (this.#valList[index] === p$16) {
|
|
14293
14295
|
if (!noDelete || bf$1.__staleWhileFetching === void 0) this.delete(k);
|
|
14294
14296
|
else if (!allowStaleAborted) this.#valList[index] = bf$1.__staleWhileFetching;
|
|
14295
14297
|
}
|
|
@@ -14309,8 +14311,8 @@ var require_commonjs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mo
|
|
|
14309
14311
|
});
|
|
14310
14312
|
};
|
|
14311
14313
|
if (options.status) options.status.fetchDispatched = true;
|
|
14312
|
-
const p$
|
|
14313
|
-
const bf = Object.assign(p$
|
|
14314
|
+
const p$16 = new Promise(pcall).then(cb, eb);
|
|
14315
|
+
const bf = Object.assign(p$16, {
|
|
14314
14316
|
__abortController: ac,
|
|
14315
14317
|
__staleWhileFetching: v,
|
|
14316
14318
|
__returned: void 0
|
|
@@ -14324,9 +14326,9 @@ var require_commonjs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mo
|
|
|
14324
14326
|
} else this.#valList[index] = bf;
|
|
14325
14327
|
return bf;
|
|
14326
14328
|
}
|
|
14327
|
-
#isBackgroundFetch(p$
|
|
14329
|
+
#isBackgroundFetch(p$16) {
|
|
14328
14330
|
if (!this.#hasFetchMethod) return false;
|
|
14329
|
-
const b = p$
|
|
14331
|
+
const b = p$16;
|
|
14330
14332
|
return !!b && b instanceof Promise && b.hasOwnProperty("__staleWhileFetching") && b.__abortController instanceof AC;
|
|
14331
14333
|
}
|
|
14332
14334
|
async fetch(k, fetchOptions = {}) {
|
|
@@ -14359,8 +14361,8 @@ var require_commonjs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mo
|
|
|
14359
14361
|
let index = this.#keyMap.get(k);
|
|
14360
14362
|
if (index === void 0) {
|
|
14361
14363
|
if (status) status.fetch = "miss";
|
|
14362
|
-
const p$
|
|
14363
|
-
return p$
|
|
14364
|
+
const p$16 = this.#backgroundFetch(k, index, options, context);
|
|
14365
|
+
return p$16.__returned = p$16;
|
|
14364
14366
|
} else {
|
|
14365
14367
|
const v = this.#valList[index];
|
|
14366
14368
|
if (this.#isBackgroundFetch(v)) {
|
|
@@ -14379,13 +14381,13 @@ var require_commonjs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mo
|
|
|
14379
14381
|
if (status) this.#statusTTL(status, index);
|
|
14380
14382
|
return v;
|
|
14381
14383
|
}
|
|
14382
|
-
const p$
|
|
14383
|
-
const staleVal = p$
|
|
14384
|
+
const p$16 = this.#backgroundFetch(k, index, options, context);
|
|
14385
|
+
const staleVal = p$16.__staleWhileFetching !== void 0 && allowStale;
|
|
14384
14386
|
if (status) {
|
|
14385
14387
|
status.fetch = isStale ? "stale" : "refresh";
|
|
14386
14388
|
if (staleVal && isStale) status.returnedStale = true;
|
|
14387
14389
|
}
|
|
14388
|
-
return staleVal ? p$
|
|
14390
|
+
return staleVal ? p$16.__staleWhileFetching : p$16.__returned = p$16;
|
|
14389
14391
|
}
|
|
14390
14392
|
}
|
|
14391
14393
|
/**
|
|
@@ -14420,9 +14422,9 @@ var require_commonjs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mo
|
|
|
14420
14422
|
}
|
|
14421
14423
|
} else if (status) status.get = "miss";
|
|
14422
14424
|
}
|
|
14423
|
-
#connect(p$
|
|
14424
|
-
this.#prev[n$1] = p$
|
|
14425
|
-
this.#next[p$
|
|
14425
|
+
#connect(p$16, n$1) {
|
|
14426
|
+
this.#prev[n$1] = p$16;
|
|
14427
|
+
this.#next[p$16] = n$1;
|
|
14426
14428
|
}
|
|
14427
14429
|
#moveToTail(index) {
|
|
14428
14430
|
if (index !== this.#tail) {
|
|
@@ -14527,13 +14529,13 @@ var require_hosts = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
14527
14529
|
const defaults = {
|
|
14528
14530
|
sshtemplate: ({ domain, user, project, committish }) => `git@${domain}:${user}/${project}.git${maybeJoin("#", committish)}`,
|
|
14529
14531
|
sshurltemplate: ({ domain, user, project, committish }) => `git+ssh://git@${domain}/${user}/${project}.git${maybeJoin("#", committish)}`,
|
|
14530
|
-
edittemplate: ({ domain, user, project, committish, editpath, path: path$
|
|
14532
|
+
edittemplate: ({ domain, user, project, committish, editpath, path: path$28 }) => `https://${domain}/${user}/${project}${maybeJoin("/", editpath, "/", maybeEncode(committish || "HEAD"), "/", path$28)}`,
|
|
14531
14533
|
browsetemplate: ({ domain, user, project, committish, treepath }) => `https://${domain}/${user}/${project}${maybeJoin("/", treepath, "/", maybeEncode(committish))}`,
|
|
14532
|
-
browsetreetemplate: ({ domain, user, project, committish, treepath, path: path$
|
|
14533
|
-
browseblobtemplate: ({ domain, user, project, committish, blobpath, path: path$
|
|
14534
|
+
browsetreetemplate: ({ domain, user, project, committish, treepath, path: path$28, fragment, hashformat }) => `https://${domain}/${user}/${project}/${treepath}/${maybeEncode(committish || "HEAD")}/${path$28}${maybeJoin("#", hashformat(fragment || ""))}`,
|
|
14535
|
+
browseblobtemplate: ({ domain, user, project, committish, blobpath, path: path$28, fragment, hashformat }) => `https://${domain}/${user}/${project}/${blobpath}/${maybeEncode(committish || "HEAD")}/${path$28}${maybeJoin("#", hashformat(fragment || ""))}`,
|
|
14534
14536
|
docstemplate: ({ domain, user, project, treepath, committish }) => `https://${domain}/${user}/${project}${maybeJoin("/", treepath, "/", maybeEncode(committish))}#readme`,
|
|
14535
14537
|
httpstemplate: ({ auth, domain, user, project, committish }) => `git+https://${maybeJoin(auth, "@")}${domain}/${user}/${project}.git${maybeJoin("#", committish)}`,
|
|
14536
|
-
filetemplate: ({ domain, user, project, committish, path: path$
|
|
14538
|
+
filetemplate: ({ domain, user, project, committish, path: path$28 }) => `https://${domain}/${user}/${project}/raw/${maybeEncode(committish || "HEAD")}/${path$28}`,
|
|
14537
14539
|
shortcuttemplate: ({ type: type$1, user, project, committish }) => `${type$1}:${user}/${project}${maybeJoin("#", committish)}`,
|
|
14538
14540
|
pathtemplate: ({ user, project, committish }) => `${user}/${project}${maybeJoin("#", committish)}`,
|
|
14539
14541
|
bugstemplate: ({ domain, user, project }) => `https://${domain}/${user}/${project}/issues`,
|
|
@@ -14553,7 +14555,7 @@ var require_hosts = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
14553
14555
|
treepath: "tree",
|
|
14554
14556
|
blobpath: "blob",
|
|
14555
14557
|
editpath: "edit",
|
|
14556
|
-
filetemplate: ({ auth, user, project, committish, path: path$
|
|
14558
|
+
filetemplate: ({ auth, user, project, committish, path: path$28 }) => `https://${maybeJoin(auth, "@")}raw.githubusercontent.com/${user}/${project}/${maybeEncode(committish || "HEAD")}/${path$28}`,
|
|
14557
14559
|
gittemplate: ({ auth, domain, user, project, committish }) => `git://${maybeJoin(auth, "@")}${domain}/${user}/${project}.git${maybeJoin("#", committish)}`,
|
|
14558
14560
|
tarballtemplate: ({ domain, user, project, committish }) => `https://codeload.${domain}/${user}/${project}/tar.gz/${maybeEncode(committish || "HEAD")}`,
|
|
14559
14561
|
extract: (url$2) => {
|
|
@@ -14580,7 +14582,7 @@ var require_hosts = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
14580
14582
|
treepath: "src",
|
|
14581
14583
|
blobpath: "src",
|
|
14582
14584
|
editpath: "?mode=edit",
|
|
14583
|
-
edittemplate: ({ domain, user, project, committish, treepath, path: path$
|
|
14585
|
+
edittemplate: ({ domain, user, project, committish, treepath, path: path$28, editpath }) => `https://${domain}/${user}/${project}${maybeJoin("/", treepath, "/", maybeEncode(committish || "HEAD"), "/", path$28, editpath)}`,
|
|
14584
14586
|
tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/get/${maybeEncode(committish || "HEAD")}.tar.gz`,
|
|
14585
14587
|
extract: (url$2) => {
|
|
14586
14588
|
let [, user, project, aux] = url$2.pathname.split("/", 4);
|
|
@@ -14608,9 +14610,9 @@ var require_hosts = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
14608
14610
|
httpstemplate: ({ auth, domain, user, project, committish }) => `git+https://${maybeJoin(auth, "@")}${domain}/${user}/${project}.git${maybeJoin("#", committish)}`,
|
|
14609
14611
|
tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/repository/archive.tar.gz?ref=${maybeEncode(committish || "HEAD")}`,
|
|
14610
14612
|
extract: (url$2) => {
|
|
14611
|
-
const path$
|
|
14612
|
-
if (path$
|
|
14613
|
-
const segments = path$
|
|
14613
|
+
const path$28 = url$2.pathname.slice(1);
|
|
14614
|
+
if (path$28.includes("/-/") || path$28.includes("/archive.tar.gz")) return;
|
|
14615
|
+
const segments = path$28.split("/");
|
|
14614
14616
|
let project = segments.pop();
|
|
14615
14617
|
if (project.endsWith(".git")) project = project.slice(0, -4);
|
|
14616
14618
|
const user = segments.join("/");
|
|
@@ -14636,11 +14638,11 @@ var require_hosts = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
14636
14638
|
sshurltemplate: ({ domain, project, committish }) => `git+ssh://git@${domain}/${project}.git${maybeJoin("#", committish)}`,
|
|
14637
14639
|
edittemplate: ({ domain, user, project, committish, editpath }) => `https://${domain}/${user}/${project}${maybeJoin("/", maybeEncode(committish))}/${editpath}`,
|
|
14638
14640
|
browsetemplate: ({ domain, project, committish }) => `https://${domain}/${project}${maybeJoin("/", maybeEncode(committish))}`,
|
|
14639
|
-
browsetreetemplate: ({ domain, project, committish, path: path$
|
|
14640
|
-
browseblobtemplate: ({ domain, project, committish, path: path$
|
|
14641
|
+
browsetreetemplate: ({ domain, project, committish, path: path$28, hashformat }) => `https://${domain}/${project}${maybeJoin("/", maybeEncode(committish))}${maybeJoin("#", hashformat(path$28))}`,
|
|
14642
|
+
browseblobtemplate: ({ domain, project, committish, path: path$28, hashformat }) => `https://${domain}/${project}${maybeJoin("/", maybeEncode(committish))}${maybeJoin("#", hashformat(path$28))}`,
|
|
14641
14643
|
docstemplate: ({ domain, project, committish }) => `https://${domain}/${project}${maybeJoin("/", maybeEncode(committish))}`,
|
|
14642
14644
|
httpstemplate: ({ domain, project, committish }) => `git+https://${domain}/${project}.git${maybeJoin("#", committish)}`,
|
|
14643
|
-
filetemplate: ({ user, project, committish, path: path$
|
|
14645
|
+
filetemplate: ({ user, project, committish, path: path$28 }) => `https://gist.githubusercontent.com/${user}/${project}/raw${maybeJoin("/", maybeEncode(committish))}/${path$28}`,
|
|
14644
14646
|
shortcuttemplate: ({ type: type$1, project, committish }) => `${type$1}:${project}${maybeJoin("#", committish)}`,
|
|
14645
14647
|
pathtemplate: ({ project, committish }) => `${project}${maybeJoin("#", committish)}`,
|
|
14646
14648
|
bugstemplate: ({ domain, project }) => `https://${domain}/${project}`,
|
|
@@ -14670,7 +14672,7 @@ var require_hosts = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
14670
14672
|
domain: "git.sr.ht",
|
|
14671
14673
|
treepath: "tree",
|
|
14672
14674
|
blobpath: "tree",
|
|
14673
|
-
filetemplate: ({ domain, user, project, committish, path: path$
|
|
14675
|
+
filetemplate: ({ domain, user, project, committish, path: path$28 }) => `https://${domain}/${user}/${project}/blob/${maybeEncode(committish) || "HEAD"}/${path$28}`,
|
|
14674
14676
|
httpstemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}.git${maybeJoin("#", committish)}`,
|
|
14675
14677
|
tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/archive/${maybeEncode(committish) || "HEAD"}.tar.gz`,
|
|
14676
14678
|
bugstemplate: () => null,
|
|
@@ -14880,27 +14882,27 @@ var require_lib$2 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
14880
14882
|
sshurl(opts) {
|
|
14881
14883
|
return this.#fill(this.sshurltemplate, opts);
|
|
14882
14884
|
}
|
|
14883
|
-
browse(path$
|
|
14884
|
-
if (typeof path$
|
|
14885
|
+
browse(path$28, ...args) {
|
|
14886
|
+
if (typeof path$28 !== "string") return this.#fill(this.browsetemplate, path$28);
|
|
14885
14887
|
if (typeof args[0] !== "string") return this.#fill(this.browsetreetemplate, {
|
|
14886
14888
|
...args[0],
|
|
14887
|
-
path: path$
|
|
14889
|
+
path: path$28
|
|
14888
14890
|
});
|
|
14889
14891
|
return this.#fill(this.browsetreetemplate, {
|
|
14890
14892
|
...args[1],
|
|
14891
14893
|
fragment: args[0],
|
|
14892
|
-
path: path$
|
|
14894
|
+
path: path$28
|
|
14893
14895
|
});
|
|
14894
14896
|
}
|
|
14895
|
-
browseFile(path$
|
|
14897
|
+
browseFile(path$28, ...args) {
|
|
14896
14898
|
if (typeof args[0] !== "string") return this.#fill(this.browseblobtemplate, {
|
|
14897
14899
|
...args[0],
|
|
14898
|
-
path: path$
|
|
14900
|
+
path: path$28
|
|
14899
14901
|
});
|
|
14900
14902
|
return this.#fill(this.browseblobtemplate, {
|
|
14901
14903
|
...args[1],
|
|
14902
14904
|
fragment: args[0],
|
|
14903
|
-
path: path$
|
|
14905
|
+
path: path$28
|
|
14904
14906
|
});
|
|
14905
14907
|
}
|
|
14906
14908
|
docs(opts) {
|
|
@@ -14927,16 +14929,16 @@ var require_lib$2 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
14927
14929
|
noCommittish: false
|
|
14928
14930
|
});
|
|
14929
14931
|
}
|
|
14930
|
-
file(path$
|
|
14932
|
+
file(path$28, opts) {
|
|
14931
14933
|
return this.#fill(this.filetemplate, {
|
|
14932
14934
|
...opts,
|
|
14933
|
-
path: path$
|
|
14935
|
+
path: path$28
|
|
14934
14936
|
});
|
|
14935
14937
|
}
|
|
14936
|
-
edit(path$
|
|
14938
|
+
edit(path$28, opts) {
|
|
14937
14939
|
return this.#fill(this.edittemplate, {
|
|
14938
14940
|
...opts,
|
|
14939
|
-
path: path$
|
|
14941
|
+
path: path$28
|
|
14940
14942
|
});
|
|
14941
14943
|
}
|
|
14942
14944
|
getDefaultRepresentation() {
|
|
@@ -16965,8 +16967,8 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
16965
16967
|
1634: (t$8, e$1, r$1) => {
|
|
16966
16968
|
var n$2 = r$1(6473), o$1 = r$1(9631), i$1 = r$1(6152), a$1 = r$1(3226), s$1 = r$1(9045), u$1 = r$1(7598), c$1 = Object.prototype.hasOwnProperty;
|
|
16967
16969
|
t$8.exports = function(t$9, e$2) {
|
|
16968
|
-
var r$2 = i$1(t$9), l = !r$2 && o$1(t$9), f = !r$2 && !l && a$1(t$9), p$
|
|
16969
|
-
for (var y$1 in t$9) !e$2 && !c$1.call(t$9, y$1) || d$1 && ("length" == y$1 || f && ("offset" == y$1 || "parent" == y$1) || p$
|
|
16970
|
+
var r$2 = i$1(t$9), l = !r$2 && o$1(t$9), f = !r$2 && !l && a$1(t$9), p$16 = !r$2 && !l && !f && u$1(t$9), d$1 = r$2 || l || f || p$16, h$2 = d$1 ? n$2(t$9.length, String) : [], v = h$2.length;
|
|
16971
|
+
for (var y$1 in t$9) !e$2 && !c$1.call(t$9, y$1) || d$1 && ("length" == y$1 || f && ("offset" == y$1 || "parent" == y$1) || p$16 && ("buffer" == y$1 || "byteLength" == y$1 || "byteOffset" == y$1) || s$1(y$1, v)) || h$2.push(y$1);
|
|
16970
16972
|
return h$2;
|
|
16971
16973
|
};
|
|
16972
16974
|
},
|
|
@@ -17046,7 +17048,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
17046
17048
|
};
|
|
17047
17049
|
},
|
|
17048
17050
|
8874: (t$8, e$1, r$1) => {
|
|
17049
|
-
var n$2 = r$1(6571), o$1 = r$1(2517), i$1 = r$1(91), a$1 = r$1(7993), s$1 = r$1(5906), u$1 = r$1(2175), c$1 = r$1(1522), l = r$1(7680), f = r$1(9987), p$
|
|
17051
|
+
var n$2 = r$1(6571), o$1 = r$1(2517), i$1 = r$1(91), a$1 = r$1(7993), s$1 = r$1(5906), u$1 = r$1(2175), c$1 = r$1(1522), l = r$1(7680), f = r$1(9987), p$16 = r$1(3483), d$1 = r$1(6939), h$2 = r$1(940), v = r$1(9917), y$1 = r$1(8222), m$1 = r$1(8725), T = r$1(6152), E = r$1(3226), _ = r$1(4714), g = r$1(9259), O = r$1(3679), R$2 = r$1(249), A = r$1(8582), I = "[object Arguments]", x = "[object Function]", N = "[object Object]", P = {};
|
|
17050
17052
|
P[I] = P["[object Array]"] = P["[object ArrayBuffer]"] = P["[object DataView]"] = P["[object Boolean]"] = P["[object Date]"] = P["[object Float32Array]"] = P["[object Float64Array]"] = P["[object Int8Array]"] = P["[object Int16Array]"] = P["[object Int32Array]"] = P["[object Map]"] = P["[object Number]"] = P[N] = P["[object RegExp]"] = P["[object Set]"] = P["[object String]"] = P["[object Symbol]"] = P["[object Uint8Array]"] = P["[object Uint8ClampedArray]"] = P["[object Uint16Array]"] = P["[object Uint32Array]"] = !0, P["[object Error]"] = P[x] = P["[object WeakMap]"] = !1, t$8.exports = function t$9(e$2, r$2, S, b, k, L) {
|
|
17051
17053
|
var C, M = 1 & r$2, D = 2 & r$2, w$1 = 4 & r$2;
|
|
17052
17054
|
if (S && (C = k ? S(e$2, b, k, L) : S(e$2)), void 0 !== C) return C;
|
|
@@ -17072,7 +17074,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
17072
17074
|
})) : _(e$2) && e$2.forEach((function(n$3, o$2) {
|
|
17073
17075
|
C.set(o$2, t$9(n$3, r$2, S, o$2, e$2, L));
|
|
17074
17076
|
}));
|
|
17075
|
-
var G = F ? void 0 : (w$1 ? D ? d$1 : p$
|
|
17077
|
+
var G = F ? void 0 : (w$1 ? D ? d$1 : p$16 : D ? A : R$2)(e$2);
|
|
17076
17078
|
return o$1(G || e$2, (function(n$3, o$2) {
|
|
17077
17079
|
G && (n$3 = e$2[o$2 = n$3]), i$1(C, o$2, t$9(n$3, r$2, S, o$2, e$2, L));
|
|
17078
17080
|
})), C;
|
|
@@ -17094,12 +17096,12 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
17094
17096
|
5246: (t$8, e$1, r$1) => {
|
|
17095
17097
|
var n$2 = r$1(5386), o$1 = r$1(8333), i$1 = r$1(4893), a$1 = r$1(343), s$1 = r$1(7826), u$1 = r$1(9950);
|
|
17096
17098
|
t$8.exports = function(t$9, e$2, r$2, c$1) {
|
|
17097
|
-
var l = -1, f = o$1, p$
|
|
17099
|
+
var l = -1, f = o$1, p$16 = !0, d$1 = t$9.length, h$2 = [], v = e$2.length;
|
|
17098
17100
|
if (!d$1) return h$2;
|
|
17099
|
-
r$2 && (e$2 = a$1(e$2, s$1(r$2))), c$1 ? (f = i$1, p$
|
|
17101
|
+
r$2 && (e$2 = a$1(e$2, s$1(r$2))), c$1 ? (f = i$1, p$16 = !1) : e$2.length >= 200 && (f = u$1, p$16 = !1, e$2 = new n$2(e$2));
|
|
17100
17102
|
t: for (; ++l < d$1;) {
|
|
17101
17103
|
var y$1 = t$9[l], m$1 = null == r$2 ? y$1 : r$2(y$1);
|
|
17102
|
-
if (y$1 = c$1 || 0 !== y$1 ? y$1 : 0, p$
|
|
17104
|
+
if (y$1 = c$1 || 0 !== y$1 ? y$1 : 0, p$16 && m$1 == m$1) {
|
|
17103
17105
|
for (var T = v; T--;) if (e$2[T] === m$1) continue t;
|
|
17104
17106
|
h$2.push(y$1);
|
|
17105
17107
|
} else f(e$2, m$1, c$1) || h$2.push(y$1);
|
|
@@ -17205,9 +17207,9 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
17205
17207
|
};
|
|
17206
17208
|
},
|
|
17207
17209
|
1952: (t$8, e$1, r$1) => {
|
|
17208
|
-
var n$2 = r$1(6571), o$1 = r$1(4871), i$1 = r$1(1491), a$1 = r$1(7416), s$1 = r$1(940), u$1 = r$1(6152), c$1 = r$1(3226), l = r$1(7598), f = "[object Arguments]", p$
|
|
17210
|
+
var n$2 = r$1(6571), o$1 = r$1(4871), i$1 = r$1(1491), a$1 = r$1(7416), s$1 = r$1(940), u$1 = r$1(6152), c$1 = r$1(3226), l = r$1(7598), f = "[object Arguments]", p$16 = "[object Array]", d$1 = "[object Object]", h$2 = Object.prototype.hasOwnProperty;
|
|
17209
17211
|
t$8.exports = function(t$9, e$2, r$2, v, y$1, m$1) {
|
|
17210
|
-
var T = u$1(t$9), E = u$1(e$2), _ = T ? p$
|
|
17212
|
+
var T = u$1(t$9), E = u$1(e$2), _ = T ? p$16 : s$1(t$9), g = E ? p$16 : s$1(e$2), O = (_ = _ == f ? d$1 : _) == d$1, R$2 = (g = g == f ? d$1 : g) == d$1, A = _ == g;
|
|
17211
17213
|
if (A && c$1(t$9)) {
|
|
17212
17214
|
if (!c$1(e$2)) return !1;
|
|
17213
17215
|
T = !0, O = !1;
|
|
@@ -17239,13 +17241,13 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
17239
17241
|
if (u$1 && c$1[2] ? c$1[1] !== t$9[c$1[0]] : !(c$1[0] in t$9)) return !1;
|
|
17240
17242
|
}
|
|
17241
17243
|
for (; ++a$1 < s$1;) {
|
|
17242
|
-
var l = (c$1 = r$2[a$1])[0], f = t$9[l], p$
|
|
17244
|
+
var l = (c$1 = r$2[a$1])[0], f = t$9[l], p$16 = c$1[1];
|
|
17243
17245
|
if (u$1 && c$1[2]) {
|
|
17244
17246
|
if (void 0 === f && !(l in t$9)) return !1;
|
|
17245
17247
|
} else {
|
|
17246
17248
|
var d$1 = new n$2();
|
|
17247
|
-
if (i$1) var h$2 = i$1(f, p$
|
|
17248
|
-
if (!(void 0 === h$2 ? o$1(p$
|
|
17249
|
+
if (i$1) var h$2 = i$1(f, p$16, l, t$9, e$2, d$1);
|
|
17250
|
+
if (!(void 0 === h$2 ? o$1(p$16, f, 3, i$1, d$1) : h$2)) return !1;
|
|
17249
17251
|
}
|
|
17250
17252
|
}
|
|
17251
17253
|
return !0;
|
|
@@ -17257,9 +17259,9 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
17257
17259
|
};
|
|
17258
17260
|
},
|
|
17259
17261
|
6840: (t$8, e$1, r$1) => {
|
|
17260
|
-
var n$2 = r$1(1049), o$1 = r$1(7394), i$1 = r$1(9259), a$1 = r$1(7035), s$1 = /^\[object .+?Constructor\]$/, u$1 = Function.prototype, c$1 = Object.prototype, l = u$1.toString, f = c$1.hasOwnProperty, p$
|
|
17262
|
+
var n$2 = r$1(1049), o$1 = r$1(7394), i$1 = r$1(9259), a$1 = r$1(7035), s$1 = /^\[object .+?Constructor\]$/, u$1 = Function.prototype, c$1 = Object.prototype, l = u$1.toString, f = c$1.hasOwnProperty, p$16 = RegExp("^" + l.call(f).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
17261
17263
|
t$8.exports = function(t$9) {
|
|
17262
|
-
return !(!i$1(t$9) || o$1(t$9)) && (n$2(t$9) ? p$
|
|
17264
|
+
return !(!i$1(t$9) || o$1(t$9)) && (n$2(t$9) ? p$16 : s$1).test(a$1(t$9));
|
|
17263
17265
|
};
|
|
17264
17266
|
},
|
|
17265
17267
|
4333: (t$8, e$1, r$1) => {
|
|
@@ -17373,14 +17375,14 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
17373
17375
|
var n$2 = r$1(91), o$1 = r$1(7297), i$1 = r$1(9045), a$1 = r$1(9259), s$1 = r$1(3812);
|
|
17374
17376
|
t$8.exports = function(t$9, e$2, r$2, u$1) {
|
|
17375
17377
|
if (!a$1(t$9)) return t$9;
|
|
17376
|
-
for (var c$1 = -1, l = (e$2 = o$1(e$2, t$9)).length, f = l - 1, p$
|
|
17378
|
+
for (var c$1 = -1, l = (e$2 = o$1(e$2, t$9)).length, f = l - 1, p$16 = t$9; null != p$16 && ++c$1 < l;) {
|
|
17377
17379
|
var d$1 = s$1(e$2[c$1]), h$2 = r$2;
|
|
17378
17380
|
if ("__proto__" === d$1 || "constructor" === d$1 || "prototype" === d$1) return t$9;
|
|
17379
17381
|
if (c$1 != f) {
|
|
17380
|
-
var v = p$
|
|
17381
|
-
void 0 === (h$2 = u$1 ? u$1(v, d$1, p$
|
|
17382
|
+
var v = p$16[d$1];
|
|
17383
|
+
void 0 === (h$2 = u$1 ? u$1(v, d$1, p$16) : void 0) && (h$2 = a$1(v) ? v : i$1(e$2[c$1 + 1]) ? [] : {});
|
|
17382
17384
|
}
|
|
17383
|
-
n$2(p$
|
|
17385
|
+
n$2(p$16, d$1, h$2), p$16 = p$16[d$1];
|
|
17384
17386
|
}
|
|
17385
17387
|
return t$9;
|
|
17386
17388
|
};
|
|
@@ -17445,16 +17447,16 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
17445
17447
|
7326: (t$8, e$1, r$1) => {
|
|
17446
17448
|
var n$2 = r$1(5386), o$1 = r$1(8333), i$1 = r$1(4893), a$1 = r$1(9950), s$1 = r$1(8803), u$1 = r$1(4207);
|
|
17447
17449
|
t$8.exports = function(t$9, e$2, r$2) {
|
|
17448
|
-
var c$1 = -1, l = o$1, f = t$9.length, p$
|
|
17449
|
-
if (r$2) p$
|
|
17450
|
+
var c$1 = -1, l = o$1, f = t$9.length, p$16 = !0, d$1 = [], h$2 = d$1;
|
|
17451
|
+
if (r$2) p$16 = !1, l = i$1;
|
|
17450
17452
|
else if (f >= 200) {
|
|
17451
17453
|
var v = e$2 ? null : s$1(t$9);
|
|
17452
17454
|
if (v) return u$1(v);
|
|
17453
|
-
p$
|
|
17455
|
+
p$16 = !1, l = a$1, h$2 = new n$2();
|
|
17454
17456
|
} else h$2 = e$2 ? [] : d$1;
|
|
17455
17457
|
t: for (; ++c$1 < f;) {
|
|
17456
17458
|
var y$1 = t$9[c$1], m$1 = e$2 ? e$2(y$1) : y$1;
|
|
17457
|
-
if (y$1 = r$2 || 0 !== y$1 ? y$1 : 0, p$
|
|
17459
|
+
if (y$1 = r$2 || 0 !== y$1 ? y$1 : 0, p$16 && m$1 == m$1) {
|
|
17458
17460
|
for (var T = h$2.length; T--;) if (h$2[T] === m$1) continue t;
|
|
17459
17461
|
e$2 && h$2.push(m$1), d$1.push(y$1);
|
|
17460
17462
|
} else l(h$2, m$1, r$2) || (h$2 !== d$1 && h$2.push(m$1), d$1.push(y$1));
|
|
@@ -17661,8 +17663,8 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
17661
17663
|
t$8.exports = function(t$9, e$2, r$2, a$1, s$1, u$1) {
|
|
17662
17664
|
var c$1 = 1 & r$2, l = t$9.length, f = e$2.length;
|
|
17663
17665
|
if (l != f && !(c$1 && f > l)) return !1;
|
|
17664
|
-
var p$
|
|
17665
|
-
if (p$
|
|
17666
|
+
var p$16 = u$1.get(t$9), d$1 = u$1.get(e$2);
|
|
17667
|
+
if (p$16 && d$1) return p$16 == e$2 && d$1 == t$9;
|
|
17666
17668
|
var h$2 = -1, v = !0, y$1 = 2 & r$2 ? new n$2() : void 0;
|
|
17667
17669
|
for (u$1.set(t$9, e$2), u$1.set(e$2, t$9); ++h$2 < l;) {
|
|
17668
17670
|
var m$1 = t$9[h$2], T = e$2[h$2];
|
|
@@ -17689,7 +17691,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
17689
17691
|
},
|
|
17690
17692
|
1491: (t$8, e$1, r$1) => {
|
|
17691
17693
|
var n$2 = r$1(857), o$1 = r$1(9162), i$1 = r$1(1225), a$1 = r$1(4871), s$1 = r$1(5179), u$1 = r$1(4207), c$1 = n$2 ? n$2.prototype : void 0, l = c$1 ? c$1.valueOf : void 0;
|
|
17692
|
-
t$8.exports = function(t$9, e$2, r$2, n$3, c$2, f, p$
|
|
17694
|
+
t$8.exports = function(t$9, e$2, r$2, n$3, c$2, f, p$16) {
|
|
17693
17695
|
switch (r$2) {
|
|
17694
17696
|
case "[object DataView]":
|
|
17695
17697
|
if (t$9.byteLength != e$2.byteLength || t$9.byteOffset != e$2.byteOffset) return !1;
|
|
@@ -17705,11 +17707,11 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
17705
17707
|
case "[object Set]":
|
|
17706
17708
|
var h$2 = 1 & n$3;
|
|
17707
17709
|
if (d$1 || (d$1 = u$1), t$9.size != e$2.size && !h$2) return !1;
|
|
17708
|
-
var v = p$
|
|
17710
|
+
var v = p$16.get(t$9);
|
|
17709
17711
|
if (v) return v == e$2;
|
|
17710
|
-
n$3 |= 2, p$
|
|
17711
|
-
var y$1 = a$1(d$1(t$9), d$1(e$2), n$3, c$2, f, p$
|
|
17712
|
-
return p$
|
|
17712
|
+
n$3 |= 2, p$16.set(t$9, e$2);
|
|
17713
|
+
var y$1 = a$1(d$1(t$9), d$1(e$2), n$3, c$2, f, p$16);
|
|
17714
|
+
return p$16.delete(t$9), y$1;
|
|
17713
17715
|
case "[object Symbol]": if (l) return l.call(t$9) == l.call(e$2);
|
|
17714
17716
|
}
|
|
17715
17717
|
return !1;
|
|
@@ -17721,21 +17723,21 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
17721
17723
|
var u$1 = 1 & r$2, c$1 = n$2(t$9), l = c$1.length;
|
|
17722
17724
|
if (l != n$2(e$2).length && !u$1) return !1;
|
|
17723
17725
|
for (var f = l; f--;) {
|
|
17724
|
-
var p$
|
|
17725
|
-
if (!(u$1 ? p$
|
|
17726
|
+
var p$16 = c$1[f];
|
|
17727
|
+
if (!(u$1 ? p$16 in e$2 : o$1.call(e$2, p$16))) return !1;
|
|
17726
17728
|
}
|
|
17727
17729
|
var d$1 = s$1.get(t$9), h$2 = s$1.get(e$2);
|
|
17728
17730
|
if (d$1 && h$2) return d$1 == e$2 && h$2 == t$9;
|
|
17729
17731
|
var v = !0;
|
|
17730
17732
|
s$1.set(t$9, e$2), s$1.set(e$2, t$9);
|
|
17731
17733
|
for (var y$1 = u$1; ++f < l;) {
|
|
17732
|
-
var m$1 = t$9[p$
|
|
17733
|
-
if (i$1) var E = u$1 ? i$1(T, m$1, p$
|
|
17734
|
+
var m$1 = t$9[p$16 = c$1[f]], T = e$2[p$16];
|
|
17735
|
+
if (i$1) var E = u$1 ? i$1(T, m$1, p$16, e$2, t$9, s$1) : i$1(m$1, T, p$16, t$9, e$2, s$1);
|
|
17734
17736
|
if (!(void 0 === E ? m$1 === T || a$1(m$1, T, r$2, i$1, s$1) : E)) {
|
|
17735
17737
|
v = !1;
|
|
17736
17738
|
break;
|
|
17737
17739
|
}
|
|
17738
|
-
y$1 || (y$1 = "constructor" == p$
|
|
17740
|
+
y$1 || (y$1 = "constructor" == p$16);
|
|
17739
17741
|
}
|
|
17740
17742
|
if (v && !y$1) {
|
|
17741
17743
|
var _ = t$9.constructor, g = e$2.constructor;
|
|
@@ -17818,14 +17820,14 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
17818
17820
|
} : a$1;
|
|
17819
17821
|
},
|
|
17820
17822
|
940: (t$8, e$1, r$1) => {
|
|
17821
|
-
var n$2 = r$1(9515), o$1 = r$1(326), i$1 = r$1(2760), a$1 = r$1(2143), s$1 = r$1(3215), u$1 = r$1(3366), c$1 = r$1(7035), l = "[object Map]", f = "[object Promise]", p$
|
|
17822
|
-
(n$2 && _(new n$2(/* @__PURE__ */ new ArrayBuffer(1))) != h$2 || o$1 && _(new o$1()) != l || i$1 && _(i$1.resolve()) != f || a$1 && _(new a$1()) != p$
|
|
17823
|
+
var n$2 = r$1(9515), o$1 = r$1(326), i$1 = r$1(2760), a$1 = r$1(2143), s$1 = r$1(3215), u$1 = r$1(3366), c$1 = r$1(7035), l = "[object Map]", f = "[object Promise]", p$16 = "[object Set]", d$1 = "[object WeakMap]", h$2 = "[object DataView]", v = c$1(n$2), y$1 = c$1(o$1), m$1 = c$1(i$1), T = c$1(a$1), E = c$1(s$1), _ = u$1;
|
|
17824
|
+
(n$2 && _(new n$2(/* @__PURE__ */ new ArrayBuffer(1))) != h$2 || o$1 && _(new o$1()) != l || i$1 && _(i$1.resolve()) != f || a$1 && _(new a$1()) != p$16 || s$1 && _(new s$1()) != d$1) && (_ = function(t$9) {
|
|
17823
17825
|
var e$2 = u$1(t$9), r$2 = "[object Object]" == e$2 ? t$9.constructor : void 0, n$3 = r$2 ? c$1(r$2) : "";
|
|
17824
17826
|
if (n$3) switch (n$3) {
|
|
17825
17827
|
case v: return h$2;
|
|
17826
17828
|
case y$1: return l;
|
|
17827
17829
|
case m$1: return f;
|
|
17828
|
-
case T: return p$
|
|
17830
|
+
case T: return p$16;
|
|
17829
17831
|
case E: return d$1;
|
|
17830
17832
|
}
|
|
17831
17833
|
return e$2;
|
|
@@ -17840,11 +17842,11 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
17840
17842
|
var n$2 = r$1(7297), o$1 = r$1(9631), i$1 = r$1(6152), a$1 = r$1(9045), s$1 = r$1(1158), u$1 = r$1(3812);
|
|
17841
17843
|
t$8.exports = function(t$9, e$2, r$2) {
|
|
17842
17844
|
for (var c$1 = -1, l = (e$2 = n$2(e$2, t$9)).length, f = !1; ++c$1 < l;) {
|
|
17843
|
-
var p$
|
|
17844
|
-
if (!(f = null != t$9 && r$2(t$9, p$
|
|
17845
|
-
t$9 = t$9[p$
|
|
17845
|
+
var p$16 = u$1(e$2[c$1]);
|
|
17846
|
+
if (!(f = null != t$9 && r$2(t$9, p$16))) break;
|
|
17847
|
+
t$9 = t$9[p$16];
|
|
17846
17848
|
}
|
|
17847
|
-
return f || ++c$1 != l ? f : !!(l = null == t$9 ? 0 : t$9.length) && s$1(l) && a$1(p$
|
|
17849
|
+
return f || ++c$1 != l ? f : !!(l = null == t$9 ? 0 : t$9.length) && s$1(l) && a$1(p$16, l) && (i$1(t$9) || o$1(t$9));
|
|
17848
17850
|
};
|
|
17849
17851
|
},
|
|
17850
17852
|
3880: (t$8) => {
|
|
@@ -18295,8 +18297,8 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
18295
18297
|
t$8.exports = n$2((function(t$9, e$2) {
|
|
18296
18298
|
t$9 = Object(t$9);
|
|
18297
18299
|
var r$2 = -1, n$3 = e$2.length, c$1 = n$3 > 2 ? e$2[2] : void 0;
|
|
18298
|
-
for (c$1 && i$1(e$2[0], e$2[1], c$1) && (n$3 = 1); ++r$2 < n$3;) for (var l = e$2[r$2], f = a$1(l), p$
|
|
18299
|
-
var h$2 = f[p$
|
|
18300
|
+
for (c$1 && i$1(e$2[0], e$2[1], c$1) && (n$3 = 1); ++r$2 < n$3;) for (var l = e$2[r$2], f = a$1(l), p$16 = -1, d$1 = f.length; ++p$16 < d$1;) {
|
|
18301
|
+
var h$2 = f[p$16], v = t$9[h$2];
|
|
18300
18302
|
(void 0 === v || o$1(v, s$1[h$2]) && !u$1.call(t$9, h$2)) && (t$9[h$2] = l[h$2]);
|
|
18301
18303
|
}
|
|
18302
18304
|
return t$9;
|
|
@@ -19216,15 +19218,15 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
19216
19218
|
i$1(" "),
|
|
19217
19219
|
i$1("")
|
|
19218
19220
|
];
|
|
19219
|
-
function p$
|
|
19220
|
-
return p$
|
|
19221
|
+
function p$16() {}
|
|
19222
|
+
return p$16.prototype.visitChildren = function(t$10) {
|
|
19221
19223
|
for (var e$3 in t$10) {
|
|
19222
19224
|
var r$3 = t$10[e$3];
|
|
19223
19225
|
t$10.hasOwnProperty(e$3) && (void 0 !== r$3.type ? this.visit(r$3) : Array.isArray(r$3) && r$3.forEach((function(t$11) {
|
|
19224
19226
|
this.visit(t$11);
|
|
19225
19227
|
}), this));
|
|
19226
19228
|
}
|
|
19227
|
-
}, p$
|
|
19229
|
+
}, p$16.prototype.visit = function(t$10) {
|
|
19228
19230
|
switch (t$10.type) {
|
|
19229
19231
|
case "Pattern":
|
|
19230
19232
|
this.visitPattern(t$10);
|
|
@@ -19271,9 +19273,9 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
19271
19273
|
case "Quantifier": this.visitQuantifier(t$10);
|
|
19272
19274
|
}
|
|
19273
19275
|
this.visitChildren(t$10);
|
|
19274
|
-
}, p$
|
|
19276
|
+
}, p$16.prototype.visitPattern = function(t$10) {}, p$16.prototype.visitFlags = function(t$10) {}, p$16.prototype.visitDisjunction = function(t$10) {}, p$16.prototype.visitAlternative = function(t$10) {}, p$16.prototype.visitStartAnchor = function(t$10) {}, p$16.prototype.visitEndAnchor = function(t$10) {}, p$16.prototype.visitWordBoundary = function(t$10) {}, p$16.prototype.visitNonWordBoundary = function(t$10) {}, p$16.prototype.visitLookahead = function(t$10) {}, p$16.prototype.visitNegativeLookahead = function(t$10) {}, p$16.prototype.visitCharacter = function(t$10) {}, p$16.prototype.visitSet = function(t$10) {}, p$16.prototype.visitGroup = function(t$10) {}, p$16.prototype.visitGroupBackReference = function(t$10) {}, p$16.prototype.visitQuantifier = function(t$10) {}, {
|
|
19275
19277
|
RegExpParser: t$9,
|
|
19276
|
-
BaseRegExpVisitor: p$
|
|
19278
|
+
BaseRegExpVisitor: p$16,
|
|
19277
19279
|
VERSION: "0.5.0"
|
|
19278
19280
|
};
|
|
19279
19281
|
}) ? r$1.apply(e$1, []) : r$1) || (t$8.exports = n$2);
|
|
@@ -19315,7 +19317,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
19315
19317
|
return t$9 && t$9.__esModule ? t$9 : { default: t$9 };
|
|
19316
19318
|
};
|
|
19317
19319
|
Object.defineProperty(e$1, "__esModule", { value: !0 }), e$1.validateRedundantMethods = e$1.validateMissingCstMethods = e$1.validateVisitor = e$1.CstVisitorDefinitionError = e$1.createBaseVisitorConstructorWithDefaults = e$1.createBaseSemanticVisitorConstructor = e$1.defaultVisit = void 0;
|
|
19318
|
-
var o$1, i$1 = n$2(r$1(5455)), a$1 = n$2(r$1(417)), s$1 = n$2(r$1(6152)), u$1 = n$2(r$1(6760)), c$1 = n$2(r$1(9756)), l = n$2(r$1(882)), f = n$2(r$1(249)), p$
|
|
19320
|
+
var o$1, i$1 = n$2(r$1(5455)), a$1 = n$2(r$1(417)), s$1 = n$2(r$1(6152)), u$1 = n$2(r$1(6760)), c$1 = n$2(r$1(9756)), l = n$2(r$1(882)), f = n$2(r$1(249)), p$16 = n$2(r$1(1049)), d$1 = n$2(r$1(4336)), h$2 = n$2(r$1(1886)), v = r$1(4105);
|
|
19319
19321
|
function y$1(t$9, e$2) {
|
|
19320
19322
|
for (var r$2 = (0, f.default)(t$9), n$3 = r$2.length, o$2 = 0; o$2 < n$3; o$2++) for (var i$2 = t$9[r$2[o$2]], a$2 = i$2.length, s$2 = 0; s$2 < a$2; s$2++) {
|
|
19321
19323
|
var u$2 = i$2[s$2];
|
|
@@ -19328,7 +19330,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
19328
19330
|
}
|
|
19329
19331
|
function T(t$9, e$2) {
|
|
19330
19332
|
var r$2 = (0, l.default)(e$2, (function(e$3) {
|
|
19331
|
-
return !1 === (0, p$
|
|
19333
|
+
return !1 === (0, p$16.default)(t$9[e$3]);
|
|
19332
19334
|
})), n$3 = (0, u$1.default)(r$2, (function(e$3) {
|
|
19333
19335
|
return {
|
|
19334
19336
|
msg: "Missing visitor method: <".concat(e$3, "> on ").concat(t$9.constructor.name, " CST Visitor."),
|
|
@@ -19371,7 +19373,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
19371
19373
|
];
|
|
19372
19374
|
function _(t$9, e$2) {
|
|
19373
19375
|
var r$2 = [];
|
|
19374
|
-
for (var n$3 in t$9) !(0, p$
|
|
19376
|
+
for (var n$3 in t$9) !(0, p$16.default)(t$9[n$3]) || (0, h$2.default)(E, n$3) || (0, h$2.default)(e$2, n$3) || r$2.push({
|
|
19375
19377
|
msg: "Redundant visitor method: <".concat(n$3, "> on ").concat(t$9.constructor.name, " CST Visitor\n") + "There is no Grammar Rule corresponding to this method's name.\n",
|
|
19376
19378
|
type: o$1.REDUNDANT_METHOD,
|
|
19377
19379
|
methodName: n$3
|
|
@@ -19404,10 +19406,10 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
19404
19406
|
return "[".concat((0, a$1.default)(t$10, (function(t$11) {
|
|
19405
19407
|
return (0, o$1.tokenLabel)(t$11);
|
|
19406
19408
|
})).join(", "), "]");
|
|
19407
|
-
})), p$
|
|
19409
|
+
})), p$16 = (0, a$1.default)(f, (function(t$10, e$3) {
|
|
19408
19410
|
return " ".concat(e$3 + 1, ". ").concat(t$10);
|
|
19409
19411
|
}));
|
|
19410
|
-
return u$2 + "one of these possible Token sequences:\n".concat(p$
|
|
19412
|
+
return u$2 + "one of these possible Token sequences:\n".concat(p$16.join("\n")) + c$2;
|
|
19411
19413
|
},
|
|
19412
19414
|
buildEarlyExitMessage: function(t$9) {
|
|
19413
19415
|
var e$2 = t$9.expectedIterationPaths, r$2 = t$9.actual, n$3 = t$9.customUserDescription, s$2 = (t$9.ruleName, "Expecting: "), u$2 = "\nbut found: '" + (0, i$1.default)(r$2).image + "'";
|
|
@@ -19423,8 +19425,8 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
19423
19425
|
return "Invalid grammar, reference to a rule which is not defined: ->" + e$2.nonTerminalName + "<-\ninside top level rule: ->" + t$9.name + "<-";
|
|
19424
19426
|
} }, e$1.defaultGrammarValidatorErrorProvider = {
|
|
19425
19427
|
buildDuplicateFoundError: function(t$9, e$2) {
|
|
19426
|
-
var r$2, n$3 = t$9.name, o$2 = (0, i$1.default)(e$2), a$2 = o$2.idx, s$2 = (0, c$1.getProductionDslName)(o$2), l = (r$2 = o$2) instanceof u$1.Terminal ? r$2.terminalType.name : r$2 instanceof u$1.NonTerminal ? r$2.nonTerminalName : "", f = a$2 > 0, p$
|
|
19427
|
-
return (p$
|
|
19428
|
+
var r$2, n$3 = t$9.name, o$2 = (0, i$1.default)(e$2), a$2 = o$2.idx, s$2 = (0, c$1.getProductionDslName)(o$2), l = (r$2 = o$2) instanceof u$1.Terminal ? r$2.terminalType.name : r$2 instanceof u$1.NonTerminal ? r$2.nonTerminalName : "", f = a$2 > 0, p$16 = "->".concat(s$2).concat(f ? a$2 : "", "<- ").concat(l ? "with argument: ->".concat(l, "<-") : "", "\n appears more than once (").concat(e$2.length, " times) in the top level rule: ->").concat(n$3, "<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n ");
|
|
19429
|
+
return (p$16 = p$16.replace(/[ \t]+/g, " ")).replace(/\s\s+/g, "\n");
|
|
19428
19430
|
},
|
|
19429
19431
|
buildNamespaceConflictError: function(t$9) {
|
|
19430
19432
|
return "Namespace conflict found in grammar.\n" + "The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <".concat(t$9.name, ">.\n") + "To resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.";
|
|
@@ -19495,7 +19497,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
19495
19497
|
Object.freeze(f), e$1.isRecognitionException = function(t$9) {
|
|
19496
19498
|
return (0, a$1.default)(f, t$9.name);
|
|
19497
19499
|
};
|
|
19498
|
-
var p$
|
|
19500
|
+
var p$16 = function(t$9) {
|
|
19499
19501
|
function e$2(e$3, r$2) {
|
|
19500
19502
|
var n$3 = this.constructor, o$2 = t$9.call(this, e$3) || this;
|
|
19501
19503
|
return o$2.token = r$2, o$2.resyncedTokens = [], Object.setPrototypeOf(o$2, n$3.prototype), Error.captureStackTrace && Error.captureStackTrace(o$2, o$2.constructor), o$2;
|
|
@@ -19508,28 +19510,28 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
19508
19510
|
return o$2.previousToken = n$3, o$2.name = s$1, o$2;
|
|
19509
19511
|
}
|
|
19510
19512
|
return o$1(e$2, t$9), e$2;
|
|
19511
|
-
}(p$
|
|
19513
|
+
}(p$16);
|
|
19512
19514
|
e$1.NoViableAltException = function(t$9) {
|
|
19513
19515
|
function e$2(e$3, r$2, n$3) {
|
|
19514
19516
|
var o$2 = t$9.call(this, e$3, r$2) || this;
|
|
19515
19517
|
return o$2.previousToken = n$3, o$2.name = u$1, o$2;
|
|
19516
19518
|
}
|
|
19517
19519
|
return o$1(e$2, t$9), e$2;
|
|
19518
|
-
}(p$
|
|
19520
|
+
}(p$16);
|
|
19519
19521
|
e$1.NotAllInputParsedException = function(t$9) {
|
|
19520
19522
|
function e$2(e$3, r$2) {
|
|
19521
19523
|
var n$3 = t$9.call(this, e$3, r$2) || this;
|
|
19522
19524
|
return n$3.name = l, n$3;
|
|
19523
19525
|
}
|
|
19524
19526
|
return o$1(e$2, t$9), e$2;
|
|
19525
|
-
}(p$
|
|
19527
|
+
}(p$16);
|
|
19526
19528
|
e$1.EarlyExitException = function(t$9) {
|
|
19527
19529
|
function e$2(e$3, r$2, n$3) {
|
|
19528
19530
|
var o$2 = t$9.call(this, e$3, r$2) || this;
|
|
19529
19531
|
return o$2.previousToken = n$3, o$2.name = c$1, o$2;
|
|
19530
19532
|
}
|
|
19531
19533
|
return o$1(e$2, t$9), e$2;
|
|
19532
|
-
}(p$
|
|
19534
|
+
}(p$16);
|
|
19533
19535
|
},
|
|
19534
19536
|
3870: function(t$8, e$1, r$1) {
|
|
19535
19537
|
var n$2, o$1 = this && this.__extends || (n$2 = function(t$9, e$2) {
|
|
@@ -19548,7 +19550,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
19548
19550
|
return t$9 && t$9.__esModule ? t$9 : { default: t$9 };
|
|
19549
19551
|
};
|
|
19550
19552
|
Object.defineProperty(e$1, "__esModule", { value: !0 }), e$1.checkPrefixAlternativesAmbiguities = e$1.validateSomeNonEmptyLookaheadPath = e$1.validateTooManyAlts = e$1.RepetitionCollector = e$1.validateAmbiguousAlternationAlternatives = e$1.validateEmptyOrAlternative = e$1.getFirstNoneTerminal = e$1.validateNoLeftRecursion = e$1.validateRuleIsOverridden = e$1.validateRuleDoesNotAlreadyExist = e$1.OccurrenceValidationCollector = e$1.identifyProductionForDuplicates = e$1.validateGrammar = void 0;
|
|
19551
|
-
var a$1 = i$1(r$1(3237)), s$1 = i$1(r$1(5455)), u$1 = i$1(r$1(7264)), c$1 = i$1(r$1(5676)), l = i$1(r$1(882)), f = i$1(r$1(2070)), p$
|
|
19553
|
+
var a$1 = i$1(r$1(3237)), s$1 = i$1(r$1(5455)), u$1 = i$1(r$1(7264)), c$1 = i$1(r$1(5676)), l = i$1(r$1(882)), f = i$1(r$1(2070)), p$16 = i$1(r$1(7335)), d$1 = i$1(r$1(6760)), h$2 = i$1(r$1(9756)), v = i$1(r$1(3440)), y$1 = i$1(r$1(8215)), m$1 = i$1(r$1(2208)), T = i$1(r$1(8346)), E = i$1(r$1(1886)), _ = i$1(r$1(5838)), g = i$1(r$1(4004)), O = r$1(2941), R$2 = r$1(7729), A = r$1(4677), I = r$1(9985), x = r$1(7729), N = r$1(7729), P = i$1(r$1(4934)), S = i$1(r$1(417)), b = r$1(1201);
|
|
19552
19554
|
function k(t$9) {
|
|
19553
19555
|
return "".concat((0, R$2.getProductionDslName)(t$9), "_#_").concat(t$9.idx, "_#_").concat(L(t$9));
|
|
19554
19556
|
}
|
|
@@ -19582,7 +19584,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
19582
19584
|
})), l$1 = (0, _.default)(t$9, (function(t$10) {
|
|
19583
19585
|
return U(t$10, e$2, n$3);
|
|
19584
19586
|
})), f$1 = W(t$9, e$2, n$3));
|
|
19585
|
-
var p$
|
|
19587
|
+
var p$17 = function(t$10, e$3, r$3) {
|
|
19586
19588
|
var n$4 = [], o$3 = (0, d$1.default)(e$3, (function(t$11) {
|
|
19587
19589
|
return t$11.name;
|
|
19588
19590
|
}));
|
|
@@ -19602,7 +19604,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
19602
19604
|
})), g$1 = (0, _.default)(t$9, (function(e$3) {
|
|
19603
19605
|
return M(e$3, t$9, o$2, n$3);
|
|
19604
19606
|
}));
|
|
19605
|
-
return i$2.concat(f$1, u$2, c$2, l$1, p$
|
|
19607
|
+
return i$2.concat(f$1, u$2, c$2, l$1, p$17, y$2, g$1);
|
|
19606
19608
|
}, e$1.identifyProductionForDuplicates = k;
|
|
19607
19609
|
var C = function(t$9) {
|
|
19608
19610
|
function e$2() {
|
|
@@ -19657,7 +19659,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
19657
19659
|
type: O.ParserDefinitionErrorType.LEFT_RECURSION,
|
|
19658
19660
|
ruleName: a$2
|
|
19659
19661
|
});
|
|
19660
|
-
var u$2 = (0, p$
|
|
19662
|
+
var u$2 = (0, p$16.default)(i$2, n$3.concat([t$9])), c$2 = (0, _.default)(u$2, (function(e$3) {
|
|
19661
19663
|
var o$3 = (0, g.default)(n$3);
|
|
19662
19664
|
return o$3.push(e$3), D(t$9, e$3, r$2, o$3);
|
|
19663
19665
|
}));
|
|
@@ -19855,7 +19857,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
19855
19857
|
var o$1 = n$2(r$1(5676)), i$1 = n$2(r$1(5652)), a$1 = n$2(r$1(6760)), s$1 = r$1(7729), u$1 = r$1(7729);
|
|
19856
19858
|
function c$1(t$9) {
|
|
19857
19859
|
if (t$9 instanceof s$1.NonTerminal) return c$1(t$9.referencedRule);
|
|
19858
|
-
if (t$9 instanceof s$1.Terminal) return p$
|
|
19860
|
+
if (t$9 instanceof s$1.Terminal) return p$16(t$9);
|
|
19859
19861
|
if ((0, u$1.isSequenceProd)(t$9)) return l(t$9);
|
|
19860
19862
|
if ((0, u$1.isBranchingProd)(t$9)) return f(t$9);
|
|
19861
19863
|
throw Error("non exhaustive match");
|
|
@@ -19870,10 +19872,10 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
19870
19872
|
}));
|
|
19871
19873
|
return (0, i$1.default)((0, o$1.default)(e$2));
|
|
19872
19874
|
}
|
|
19873
|
-
function p$
|
|
19875
|
+
function p$16(t$9) {
|
|
19874
19876
|
return [t$9.terminalType];
|
|
19875
19877
|
}
|
|
19876
|
-
e$1.first = c$1, e$1.firstForSequence = l, e$1.firstForBranching = f, e$1.firstForTerminal = p$
|
|
19878
|
+
e$1.first = c$1, e$1.firstForSequence = l, e$1.firstForBranching = f, e$1.firstForTerminal = p$16;
|
|
19877
19879
|
},
|
|
19878
19880
|
4917: function(t$8, e$1, r$1) {
|
|
19879
19881
|
var n$2, o$1 = this && this.__extends || (n$2 = function(t$9, e$2) {
|
|
@@ -19892,7 +19894,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
19892
19894
|
return t$9 && t$9.__esModule ? t$9 : { default: t$9 };
|
|
19893
19895
|
};
|
|
19894
19896
|
Object.defineProperty(e$1, "__esModule", { value: !0 }), e$1.buildInProdFollowPrefix = e$1.buildBetweenProdsFollowPrefix = e$1.computeAllProdsFollows = e$1.ResyncFollowsWalker = void 0;
|
|
19895
|
-
var a$1 = r$1(8567), s$1 = r$1(8052), u$1 = i$1(r$1(9756)), c$1 = i$1(r$1(19)), l = r$1(3710), f = r$1(7729), p$
|
|
19897
|
+
var a$1 = r$1(8567), s$1 = r$1(8052), u$1 = i$1(r$1(9756)), c$1 = i$1(r$1(19)), l = r$1(3710), f = r$1(7729), p$16 = function(t$9) {
|
|
19896
19898
|
function e$2(e$3) {
|
|
19897
19899
|
var r$2 = t$9.call(this) || this;
|
|
19898
19900
|
return r$2.topProd = e$3, r$2.follows = {}, r$2;
|
|
@@ -19907,10 +19909,10 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
19907
19909
|
function d$1(t$9, e$2) {
|
|
19908
19910
|
return t$9.name + e$2 + l.IN;
|
|
19909
19911
|
}
|
|
19910
|
-
e$1.ResyncFollowsWalker = p$
|
|
19912
|
+
e$1.ResyncFollowsWalker = p$16, e$1.computeAllProdsFollows = function(t$9) {
|
|
19911
19913
|
var e$2 = {};
|
|
19912
19914
|
return (0, u$1.default)(t$9, (function(t$10) {
|
|
19913
|
-
var r$2 = new p$
|
|
19915
|
+
var r$2 = new p$16(t$10).startWalking();
|
|
19914
19916
|
(0, c$1.default)(e$2, r$2);
|
|
19915
19917
|
})), e$2;
|
|
19916
19918
|
}, e$1.buildBetweenProdsFollowPrefix = d$1, e$1.buildInProdFollowPrefix = function(t$9) {
|
|
@@ -19949,7 +19951,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
19949
19951
|
return t$9 && t$9.__esModule ? t$9 : { default: t$9 };
|
|
19950
19952
|
};
|
|
19951
19953
|
Object.defineProperty(e$1, "__esModule", { value: !0 }), e$1.nextPossibleTokensAfter = e$1.possiblePathsFrom = e$1.NextTerminalAfterAtLeastOneSepWalker = e$1.NextTerminalAfterAtLeastOneWalker = e$1.NextTerminalAfterManySepWalker = e$1.NextTerminalAfterManyWalker = e$1.AbstractNextTerminalAfterProductionWalker = e$1.NextAfterTokenWalker = e$1.AbstractNextPossibleTokensWalker = void 0;
|
|
19952
|
-
var a$1 = r$1(8567), s$1 = i$1(r$1(3237)), u$1 = i$1(r$1(5455)), c$1 = i$1(r$1(4934)), l = i$1(r$1(7264)), f = i$1(r$1(6974)), p$
|
|
19954
|
+
var a$1 = r$1(8567), s$1 = i$1(r$1(3237)), u$1 = i$1(r$1(5455)), c$1 = i$1(r$1(4934)), l = i$1(r$1(7264)), f = i$1(r$1(6974)), p$16 = i$1(r$1(9756)), d$1 = i$1(r$1(4004)), h$2 = r$1(8052), v = r$1(7729), y$1 = function(t$9) {
|
|
19953
19955
|
function e$2(e$3, r$2) {
|
|
19954
19956
|
var n$3 = t$9.call(this) || this;
|
|
19955
19957
|
return n$3.topProd = e$3, n$3.path = r$2, n$3.possibleTokTypes = [], n$3.nextProductionName = "", n$3.nextProductionOccurrence = 0, n$3.found = !1, n$3.isAtEndOfPath = !1, n$3;
|
|
@@ -20070,7 +20072,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
20070
20072
|
o$2 = a$2(c$2);
|
|
20071
20073
|
} else if (s$2 instanceof v.Repetition) c$2 = s$2.definition.concat([new v.Repetition({ definition: s$2.definition })]), o$2 = a$2(c$2);
|
|
20072
20074
|
else {
|
|
20073
|
-
if (s$2 instanceof v.Alternation) return (0, p$
|
|
20075
|
+
if (s$2 instanceof v.Alternation) return (0, p$16.default)(s$2.definition, (function(t$10) {
|
|
20074
20076
|
!1 === (0, u$1.default)(t$10.definition) && (o$2 = a$2(t$10.definition));
|
|
20075
20077
|
})), o$2;
|
|
20076
20078
|
if (!(s$2 instanceof v.Terminal)) throw Error("non exhaustive match");
|
|
@@ -20084,7 +20086,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
20084
20086
|
suffixDef: (0, l.default)(e$2, i$2)
|
|
20085
20087
|
}), o$2;
|
|
20086
20088
|
}, e$1.nextPossibleTokensAfter = function(t$9, e$2, r$2, n$3) {
|
|
20087
|
-
var o$2 = "EXIT_NONE_TERMINAL", i$2 = [o$2], a$2 = "EXIT_ALTERNATIVE", s$2 = !1, p$
|
|
20089
|
+
var o$2 = "EXIT_NONE_TERMINAL", i$2 = [o$2], a$2 = "EXIT_ALTERNATIVE", s$2 = !1, p$17 = e$2.length, h$3 = p$17 - n$3 - 1, y$2 = [], m$1 = [];
|
|
20088
20090
|
for (m$1.push({
|
|
20089
20091
|
idx: -1,
|
|
20090
20092
|
def: t$9,
|
|
@@ -20104,7 +20106,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
20104
20106
|
occurrenceStack: (0, c$1.default)(O$1)
|
|
20105
20107
|
};
|
|
20106
20108
|
m$1.push(I);
|
|
20107
|
-
} else if (A instanceof v.Terminal) if (_ < p$
|
|
20109
|
+
} else if (A instanceof v.Terminal) if (_ < p$17 - 1) {
|
|
20108
20110
|
var x = _ + 1;
|
|
20109
20111
|
r$2(e$2[x], A.terminalType) && (I = {
|
|
20110
20112
|
idx: x,
|
|
@@ -20113,7 +20115,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
20113
20115
|
occurrenceStack: O$1
|
|
20114
20116
|
}, m$1.push(I));
|
|
20115
20117
|
} else {
|
|
20116
|
-
if (_ !== p$
|
|
20118
|
+
if (_ !== p$17 - 1) throw Error("non exhaustive match");
|
|
20117
20119
|
y$2.push({
|
|
20118
20120
|
nextTokenType: A.terminalType,
|
|
20119
20121
|
nextTokenOccurrence: A.idx,
|
|
@@ -20246,7 +20248,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
20246
20248
|
return t$9 && t$9.__esModule ? t$9 : { default: t$9 };
|
|
20247
20249
|
};
|
|
20248
20250
|
Object.defineProperty(e$1, "__esModule", { value: !0 }), e$1.areTokenCategoriesNotUsed = e$1.isStrictPrefixOfPath = e$1.containsPath = e$1.getLookaheadPathsForOptionalProd = e$1.getLookaheadPathsForOr = e$1.lookAheadSequenceFromAlternatives = e$1.buildSingleAlternativeLookaheadFunction = e$1.buildAlternativesLookAheadFunc = e$1.buildLookaheadFuncForOptionalProd = e$1.buildLookaheadFuncForOr = e$1.getProdType = e$1.PROD_TYPE = void 0;
|
|
20249
|
-
var a$1, s$1 = i$1(r$1(5455)), u$1 = i$1(r$1(5676)), c$1 = i$1(r$1(9794)), l = i$1(r$1(6760)), f = i$1(r$1(9756)), p$
|
|
20251
|
+
var a$1, s$1 = i$1(r$1(5455)), u$1 = i$1(r$1(5676)), c$1 = i$1(r$1(9794)), l = i$1(r$1(6760)), f = i$1(r$1(9756)), p$16 = i$1(r$1(3352)), d$1 = i$1(r$1(8215)), h$2 = r$1(9985), v = r$1(8567), y$1 = r$1(1201), m$1 = r$1(7729), T = r$1(7729);
|
|
20250
20252
|
(function(t$9) {
|
|
20251
20253
|
t$9[t$9.OPTION = 0] = "OPTION", t$9[t$9.REPETITION = 1] = "REPETITION", t$9[t$9.REPETITION_MANDATORY = 2] = "REPETITION_MANDATORY", t$9[t$9.REPETITION_MANDATORY_WITH_SEPARATOR = 3] = "REPETITION_MANDATORY_WITH_SEPARATOR", t$9[t$9.REPETITION_WITH_SEPARATOR = 4] = "REPETITION_WITH_SEPARATOR", t$9[t$9.ALTERNATION = 5] = "ALTERNATION";
|
|
20252
20254
|
})(a$1 = e$1.PROD_TYPE || (e$1.PROD_TYPE = {})), e$1.getProdType = function(t$9) {
|
|
@@ -20275,7 +20277,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
20275
20277
|
})), i$3 = 0; i$3 < o$2; i$3++) {
|
|
20276
20278
|
var a$3 = t$9[i$3], s$3 = a$3.length, u$2 = n$4[i$3];
|
|
20277
20279
|
if (void 0 === u$2 || !1 !== u$2.call(this)) t: for (var c$2 = 0; c$2 < s$3; c$2++) {
|
|
20278
|
-
for (var f$1 = a$3[c$2], p$
|
|
20280
|
+
for (var f$1 = a$3[c$2], p$17 = f$1.length, d$2 = 0; d$2 < p$17; d$2++) if (!1 === r$2(this.LA(d$2 + 1), f$1[d$2])) continue t;
|
|
20279
20281
|
return i$3;
|
|
20280
20282
|
}
|
|
20281
20283
|
}
|
|
@@ -20285,8 +20287,8 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
20285
20287
|
return (0, u$1.default)(t$10);
|
|
20286
20288
|
})), s$2 = (0, d$1.default)(a$2, (function(t$10, e$3, r$3) {
|
|
20287
20289
|
return (0, f.default)(e$3, (function(e$4) {
|
|
20288
|
-
(0, p$
|
|
20289
|
-
(0, p$
|
|
20290
|
+
(0, p$16.default)(t$10, e$4.tokenTypeIdx) || (t$10[e$4.tokenTypeIdx] = r$3), (0, f.default)(e$4.categoryMatches, (function(e$5) {
|
|
20291
|
+
(0, p$16.default)(t$10, e$5) || (t$10[e$5] = r$3);
|
|
20290
20292
|
}));
|
|
20291
20293
|
})), t$10;
|
|
20292
20294
|
}), {});
|
|
@@ -20413,8 +20415,8 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
20413
20415
|
i$2 = g(u$2.length);
|
|
20414
20416
|
for (var c$2 = function(t$10) {
|
|
20415
20417
|
for (var r$3 = u$2[t$10], c$3 = 0; c$3 < r$3.length; c$3++) {
|
|
20416
|
-
var l$1 = r$3[c$3].partialPath, p$
|
|
20417
|
-
if (R$2(o$2, d$2, t$10) || (0, s$1.default)(p$
|
|
20418
|
+
var l$1 = r$3[c$3].partialPath, p$18 = r$3[c$3].suffixDef, d$2 = O(l$1);
|
|
20419
|
+
if (R$2(o$2, d$2, t$10) || (0, s$1.default)(p$18) || l$1.length === e$2) {
|
|
20418
20420
|
var v$1 = n$3[t$10];
|
|
20419
20421
|
if (!1 === N(v$1, l$1)) {
|
|
20420
20422
|
v$1.push(l$1);
|
|
@@ -20424,7 +20426,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
20424
20426
|
}
|
|
20425
20427
|
}
|
|
20426
20428
|
} else {
|
|
20427
|
-
var T$1 = (0, h$2.possiblePathsFrom)(p$
|
|
20429
|
+
var T$1 = (0, h$2.possiblePathsFrom)(p$18, a$2 + 1, l$1);
|
|
20428
20430
|
i$2[t$10] = i$2[t$10].concat(T$1), (0, f.default)(T$1, (function(e$3) {
|
|
20429
20431
|
var r$4 = O(e$3.partialPath);
|
|
20430
20432
|
(0, f.default)(r$4, (function(e$4) {
|
|
@@ -20433,7 +20435,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
20433
20435
|
}));
|
|
20434
20436
|
}
|
|
20435
20437
|
}
|
|
20436
|
-
}, p$
|
|
20438
|
+
}, p$17 = 0; p$17 < u$2.length; p$17++) c$2(p$17);
|
|
20437
20439
|
}
|
|
20438
20440
|
return n$3;
|
|
20439
20441
|
}
|
|
@@ -20596,7 +20598,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
20596
20598
|
return t$9 && t$9.__esModule ? t$9 : { default: t$9 };
|
|
20597
20599
|
};
|
|
20598
20600
|
Object.defineProperty(e$1, "__esModule", { value: !0 }), e$1.EmbeddedActionsParser = e$1.CstParser = e$1.Parser = e$1.EMPTY_ALT = e$1.ParserDefinitionErrorType = e$1.DEFAULT_RULE_CONFIG = e$1.DEFAULT_PARSER_CONFIG = e$1.END_OF_FILE = void 0;
|
|
20599
|
-
var a$1, s$1 = i$1(r$1(5455)), u$1 = i$1(r$1(6760)), c$1 = i$1(r$1(9756)), l = i$1(r$1(8346)), f = i$1(r$1(3352)), p$
|
|
20601
|
+
var a$1, s$1 = i$1(r$1(5455)), u$1 = i$1(r$1(6760)), c$1 = i$1(r$1(9756)), l = i$1(r$1(8346)), f = i$1(r$1(3352)), p$16 = i$1(r$1(4004)), d$1 = r$1(7146), h$2 = r$1(4917), v = r$1(6736), y$1 = r$1(1007), m$1 = r$1(1665), T = r$1(9992), E = r$1(161), _ = r$1(3225), g = r$1(598), O = r$1(8503), R$2 = r$1(3273), A = r$1(9464), I = r$1(1625), x = r$1(6688), N = r$1(146), P = r$1(4803);
|
|
20600
20602
|
e$1.END_OF_FILE = (0, v.createTokenInstance)(v.EOF, "", NaN, NaN, NaN, NaN, NaN, NaN), Object.freeze(e$1.END_OF_FILE), e$1.DEFAULT_PARSER_CONFIG = Object.freeze({
|
|
20601
20603
|
recoveryEnabled: !1,
|
|
20602
20604
|
maxLookahead: 3,
|
|
@@ -20682,7 +20684,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
20682
20684
|
e$1.CstParser = function(t$9) {
|
|
20683
20685
|
function r$2(r$3, n$3) {
|
|
20684
20686
|
void 0 === n$3 && (n$3 = e$1.DEFAULT_PARSER_CONFIG);
|
|
20685
|
-
var o$2 = (0, p$
|
|
20687
|
+
var o$2 = (0, p$16.default)(n$3);
|
|
20686
20688
|
return o$2.outputCst = !0, t$9.call(this, r$3, o$2) || this;
|
|
20687
20689
|
}
|
|
20688
20690
|
return o$1(r$2, t$9), r$2;
|
|
@@ -20690,7 +20692,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
20690
20692
|
e$1.EmbeddedActionsParser = function(t$9) {
|
|
20691
20693
|
function r$2(r$3, n$3) {
|
|
20692
20694
|
void 0 === n$3 && (n$3 = e$1.DEFAULT_PARSER_CONFIG);
|
|
20693
|
-
var o$2 = (0, p$
|
|
20695
|
+
var o$2 = (0, p$16.default)(n$3);
|
|
20694
20696
|
return o$2.outputCst = !1, t$9.call(this, r$3, o$2) || this;
|
|
20695
20697
|
}
|
|
20696
20698
|
return o$1(r$2, t$9), r$2;
|
|
@@ -20767,13 +20769,13 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
20767
20769
|
return t$9 && t$9.__esModule ? t$9 : { default: t$9 };
|
|
20768
20770
|
};
|
|
20769
20771
|
Object.defineProperty(e$1, "__esModule", { value: !0 }), e$1.GastRecorder = void 0;
|
|
20770
|
-
var o$1 = n$2(r$1(6974)), i$1 = n$2(r$1(6152)), a$1 = n$2(r$1(1525)), s$1 = n$2(r$1(9756)), u$1 = n$2(r$1(1049)), c$1 = n$2(r$1(3352)), l = r$1(7729), f = r$1(9027), p$
|
|
20772
|
+
var o$1 = n$2(r$1(6974)), i$1 = n$2(r$1(6152)), a$1 = n$2(r$1(1525)), s$1 = n$2(r$1(9756)), u$1 = n$2(r$1(1049)), c$1 = n$2(r$1(3352)), l = r$1(7729), f = r$1(9027), p$16 = r$1(1201), d$1 = r$1(6736), h$2 = r$1(2941), v = r$1(8209), y$1 = { description: "This Object indicates the Parser is during Recording Phase" };
|
|
20771
20773
|
Object.freeze(y$1);
|
|
20772
20774
|
var m$1 = Math.pow(2, v.BITS_FOR_OCCURRENCE_IDX) - 1, T = (0, d$1.createToken)({
|
|
20773
20775
|
name: "RECORDING_PHASE_TOKEN",
|
|
20774
20776
|
pattern: f.Lexer.NA
|
|
20775
20777
|
});
|
|
20776
|
-
(0, p$
|
|
20778
|
+
(0, p$16.augmentTokenTypes)([T]);
|
|
20777
20779
|
var E = (0, d$1.createTokenInstance)(T, "This IToken indicates the Parser is in Recording Phase\n See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details", -1, -1, -1, -1, -1, -1);
|
|
20778
20780
|
Object.freeze(E);
|
|
20779
20781
|
var _ = {
|
|
@@ -20875,7 +20877,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
20875
20877
|
});
|
|
20876
20878
|
return i$2.definition.push(s$2), this.outputCst ? _ : y$1;
|
|
20877
20879
|
}, t$9.prototype.consumeInternalRecord = function(t$10, e$2, r$2) {
|
|
20878
|
-
if (I(e$2), !(0, p$
|
|
20880
|
+
if (I(e$2), !(0, p$16.hasShortKeyProperty)(t$10)) {
|
|
20879
20881
|
var n$3 = new Error("<CONSUME".concat(A(e$2), "> argument is invalid") + " expecting a TokenType reference but got: <".concat(JSON.stringify(t$10), ">") + "\n inside top level rule: <".concat(this.recordingProdStack[0].name, ">"));
|
|
20880
20882
|
throw n$3.KNOWN_RECORDER_ERROR = !0, n$3;
|
|
20881
20883
|
}
|
|
@@ -20898,15 +20900,15 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
20898
20900
|
function R$2(t$9, e$2) {
|
|
20899
20901
|
var r$2 = this;
|
|
20900
20902
|
I(e$2);
|
|
20901
|
-
var n$3 = (0, o$1.default)(this.recordingProdStack), f$1 = !1 === (0, i$1.default)(t$9), p$
|
|
20903
|
+
var n$3 = (0, o$1.default)(this.recordingProdStack), f$1 = !1 === (0, i$1.default)(t$9), p$17 = !1 === f$1 ? t$9 : t$9.DEF, d$2 = new l.Alternation({
|
|
20902
20904
|
definition: [],
|
|
20903
20905
|
idx: e$2,
|
|
20904
20906
|
ignoreAmbiguities: f$1 && !0 === t$9.IGNORE_AMBIGUITIES
|
|
20905
20907
|
});
|
|
20906
20908
|
(0, c$1.default)(t$9, "MAX_LOOKAHEAD") && (d$2.maxLookahead = t$9.MAX_LOOKAHEAD);
|
|
20907
|
-
return d$2.hasPredicates = (0, a$1.default)(p$
|
|
20909
|
+
return d$2.hasPredicates = (0, a$1.default)(p$17, (function(t$10) {
|
|
20908
20910
|
return (0, u$1.default)(t$10.GATE);
|
|
20909
|
-
})), n$3.definition.push(d$2), (0, s$1.default)(p$
|
|
20911
|
+
})), n$3.definition.push(d$2), (0, s$1.default)(p$17, (function(t$10) {
|
|
20910
20912
|
var e$3 = new l.Alternative({ definition: [] });
|
|
20911
20913
|
d$2.definition.push(e$3), (0, c$1.default)(t$10, "IGNORE_AMBIGUITIES") ? e$3.ignoreAmbiguities = t$10.IGNORE_AMBIGUITIES : (0, c$1.default)(t$10, "GATE") && (e$3.ignoreAmbiguities = !0), r$2.recordingProdStack.push(e$3), t$10.ALT.call(r$2), r$2.recordingProdStack.pop();
|
|
20912
20914
|
})), y$1;
|
|
@@ -20976,7 +20978,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
20976
20978
|
return t$9 && t$9.__esModule ? t$9 : { default: t$9 };
|
|
20977
20979
|
};
|
|
20978
20980
|
Object.defineProperty(e$1, "__esModule", { value: !0 }), e$1.collectMethods = e$1.LooksAhead = void 0;
|
|
20979
|
-
var a$1 = r$1(4677), s$1 = i$1(r$1(9756)), u$1 = i$1(r$1(3352)), c$1 = r$1(2941), l = r$1(8209), f = r$1(7729), p$
|
|
20981
|
+
var a$1 = r$1(4677), s$1 = i$1(r$1(9756)), u$1 = i$1(r$1(3352)), c$1 = r$1(2941), l = r$1(8209), f = r$1(7729), p$16 = r$1(7729);
|
|
20980
20982
|
e$1.LooksAhead = function() {
|
|
20981
20983
|
function t$9() {}
|
|
20982
20984
|
return t$9.prototype.initLooksAhead = function(t$10) {
|
|
@@ -20988,20 +20990,20 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
20988
20990
|
var r$2 = v(t$11), n$3 = r$2.alternation, o$2 = r$2.repetition, i$2 = r$2.option, u$2 = r$2.repetitionMandatory, c$2 = r$2.repetitionMandatoryWithSeparator, f$1 = r$2.repetitionWithSeparator;
|
|
20989
20991
|
(0, s$1.default)(n$3, (function(r$3) {
|
|
20990
20992
|
var n$4 = 0 === r$3.idx ? "" : r$3.idx;
|
|
20991
|
-
e$2.TRACE_INIT("".concat((0, p$
|
|
20993
|
+
e$2.TRACE_INIT("".concat((0, p$16.getProductionDslName)(r$3)).concat(n$4), (function() {
|
|
20992
20994
|
var n$5 = (0, a$1.buildLookaheadFuncForOr)(r$3.idx, t$11, r$3.maxLookahead || e$2.maxLookahead, r$3.hasPredicates, e$2.dynamicTokensEnabled, e$2.lookAheadBuilderForAlternatives), o$3 = (0, l.getKeyForAutomaticLookahead)(e$2.fullRuleNameToShort[t$11.name], l.OR_IDX, r$3.idx);
|
|
20993
20995
|
e$2.setLaFuncCache(o$3, n$5);
|
|
20994
20996
|
}));
|
|
20995
20997
|
})), (0, s$1.default)(o$2, (function(r$3) {
|
|
20996
|
-
e$2.computeLookaheadFunc(t$11, r$3.idx, l.MANY_IDX, a$1.PROD_TYPE.REPETITION, r$3.maxLookahead, (0, p$
|
|
20998
|
+
e$2.computeLookaheadFunc(t$11, r$3.idx, l.MANY_IDX, a$1.PROD_TYPE.REPETITION, r$3.maxLookahead, (0, p$16.getProductionDslName)(r$3));
|
|
20997
20999
|
})), (0, s$1.default)(i$2, (function(r$3) {
|
|
20998
|
-
e$2.computeLookaheadFunc(t$11, r$3.idx, l.OPTION_IDX, a$1.PROD_TYPE.OPTION, r$3.maxLookahead, (0, p$
|
|
21000
|
+
e$2.computeLookaheadFunc(t$11, r$3.idx, l.OPTION_IDX, a$1.PROD_TYPE.OPTION, r$3.maxLookahead, (0, p$16.getProductionDslName)(r$3));
|
|
20999
21001
|
})), (0, s$1.default)(u$2, (function(r$3) {
|
|
21000
|
-
e$2.computeLookaheadFunc(t$11, r$3.idx, l.AT_LEAST_ONE_IDX, a$1.PROD_TYPE.REPETITION_MANDATORY, r$3.maxLookahead, (0, p$
|
|
21002
|
+
e$2.computeLookaheadFunc(t$11, r$3.idx, l.AT_LEAST_ONE_IDX, a$1.PROD_TYPE.REPETITION_MANDATORY, r$3.maxLookahead, (0, p$16.getProductionDslName)(r$3));
|
|
21001
21003
|
})), (0, s$1.default)(c$2, (function(r$3) {
|
|
21002
|
-
e$2.computeLookaheadFunc(t$11, r$3.idx, l.AT_LEAST_ONE_SEP_IDX, a$1.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR, r$3.maxLookahead, (0, p$
|
|
21004
|
+
e$2.computeLookaheadFunc(t$11, r$3.idx, l.AT_LEAST_ONE_SEP_IDX, a$1.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR, r$3.maxLookahead, (0, p$16.getProductionDslName)(r$3));
|
|
21003
21005
|
})), (0, s$1.default)(f$1, (function(r$3) {
|
|
21004
|
-
e$2.computeLookaheadFunc(t$11, r$3.idx, l.MANY_SEP_IDX, a$1.PROD_TYPE.REPETITION_WITH_SEPARATOR, r$3.maxLookahead, (0, p$
|
|
21006
|
+
e$2.computeLookaheadFunc(t$11, r$3.idx, l.MANY_SEP_IDX, a$1.PROD_TYPE.REPETITION_WITH_SEPARATOR, r$3.maxLookahead, (0, p$16.getProductionDslName)(r$3));
|
|
21005
21007
|
}));
|
|
21006
21008
|
}));
|
|
21007
21009
|
}));
|
|
@@ -21320,7 +21322,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
21320
21322
|
return t$9 && t$9.__esModule ? t$9 : { default: t$9 };
|
|
21321
21323
|
};
|
|
21322
21324
|
Object.defineProperty(e$1, "__esModule", { value: !0 }), e$1.RecognizerEngine = void 0;
|
|
21323
|
-
var o$1 = n$2(r$1(5455)), i$1 = n$2(r$1(6152)), a$1 = n$2(r$1(5676)), s$1 = n$2(r$1(9794)), u$1 = n$2(r$1(5652)), c$1 = n$2(r$1(9259)), l = n$2(r$1(3352)), f = n$2(r$1(8346)), p$
|
|
21325
|
+
var o$1 = n$2(r$1(5455)), i$1 = n$2(r$1(6152)), a$1 = n$2(r$1(5676)), s$1 = n$2(r$1(9794)), u$1 = n$2(r$1(5652)), c$1 = n$2(r$1(9259)), l = n$2(r$1(3352)), f = n$2(r$1(8346)), p$16 = n$2(r$1(8215)), d$1 = n$2(r$1(4004)), h$2 = r$1(8209), v = r$1(643), y$1 = r$1(4677), m$1 = r$1(9985), T = r$1(2941), E = r$1(9992), _ = r$1(6736), g = r$1(1201);
|
|
21324
21326
|
e$1.RecognizerEngine = function() {
|
|
21325
21327
|
function t$9() {}
|
|
21326
21328
|
return t$9.prototype.initRecognizerEngine = function(t$10, e$2) {
|
|
@@ -21329,12 +21331,12 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
21329
21331
|
if ((0, o$1.default)(t$10)) throw Error("A Token Vocabulary cannot be empty.\n Note that the first argument for the parser constructor\n is no longer a Token vector (since v4.0).");
|
|
21330
21332
|
if ("number" == typeof t$10[0].startOffset) throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n For Further details.");
|
|
21331
21333
|
}
|
|
21332
|
-
if ((0, i$1.default)(t$10)) this.tokensMap = (0, p$
|
|
21334
|
+
if ((0, i$1.default)(t$10)) this.tokensMap = (0, p$16.default)(t$10, (function(t$11, e$3) {
|
|
21333
21335
|
return t$11[e$3.name] = e$3, t$11;
|
|
21334
21336
|
}), {});
|
|
21335
21337
|
else if ((0, l.default)(t$10, "modes") && (0, s$1.default)((0, a$1.default)((0, f.default)(t$10.modes)), g.isTokenType)) {
|
|
21336
21338
|
var r$2 = (0, a$1.default)((0, f.default)(t$10.modes)), n$3 = (0, u$1.default)(r$2);
|
|
21337
|
-
this.tokensMap = (0, p$
|
|
21339
|
+
this.tokensMap = (0, p$16.default)(n$3, (function(t$11, e$3) {
|
|
21338
21340
|
return t$11[e$3.name] = e$3, t$11;
|
|
21339
21341
|
}), {});
|
|
21340
21342
|
} else {
|
|
@@ -21574,7 +21576,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
21574
21576
|
return t$9 && t$9.__esModule ? t$9 : { default: t$9 };
|
|
21575
21577
|
};
|
|
21576
21578
|
Object.defineProperty(e$1, "__esModule", { value: !0 }), e$1.attemptInRepetitionRecovery = e$1.Recoverable = e$1.InRuleRecoveryException = e$1.IN_RULE_RECOVERY_EXCEPTION = e$1.EOF_FOLLOW_KEY = void 0;
|
|
21577
|
-
var a$1 = r$1(6736), s$1 = i$1(r$1(5455)), u$1 = i$1(r$1(4934)), c$1 = i$1(r$1(5676)), l = i$1(r$1(6760)), f = i$1(r$1(5281)), p$
|
|
21579
|
+
var a$1 = r$1(6736), s$1 = i$1(r$1(5455)), u$1 = i$1(r$1(4934)), c$1 = i$1(r$1(5676)), l = i$1(r$1(6760)), f = i$1(r$1(5281)), p$16 = i$1(r$1(3352)), d$1 = i$1(r$1(1886)), h$2 = i$1(r$1(4004)), v = r$1(643), y$1 = r$1(3710), m$1 = r$1(2941);
|
|
21578
21580
|
e$1.EOF_FOLLOW_KEY = {}, e$1.IN_RULE_RECOVERY_EXCEPTION = "InRuleRecoveryException";
|
|
21579
21581
|
var T = function(t$9) {
|
|
21580
21582
|
function r$2(r$3) {
|
|
@@ -21587,7 +21589,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
21587
21589
|
var E = function() {
|
|
21588
21590
|
function t$9() {}
|
|
21589
21591
|
return t$9.prototype.initRecoverable = function(t$10) {
|
|
21590
|
-
this.firstAfterRepMap = {}, this.resyncFollows = {}, this.recoveryEnabled = (0, p$
|
|
21592
|
+
this.firstAfterRepMap = {}, this.resyncFollows = {}, this.recoveryEnabled = (0, p$16.default)(t$10, "recoveryEnabled") ? t$10.recoveryEnabled : m$1.DEFAULT_PARSER_CONFIG.recoveryEnabled, this.recoveryEnabled && (this.attemptInRepetitionRecovery = _);
|
|
21591
21593
|
}, t$9.prototype.getTokenToInsert = function(t$10) {
|
|
21592
21594
|
var e$2 = (0, a$1.createTokenInstance)(t$10, "", NaN, NaN, NaN, NaN, NaN, NaN);
|
|
21593
21595
|
return e$2.isInsertedInRecovery = !0, e$2;
|
|
@@ -21596,7 +21598,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
21596
21598
|
}, t$9.prototype.canTokenTypeBeDeletedInRecovery = function(t$10) {
|
|
21597
21599
|
return !0;
|
|
21598
21600
|
}, t$9.prototype.tryInRepetitionRecovery = function(t$10, e$2, r$2, n$3) {
|
|
21599
|
-
for (var o$2 = this, i$2 = this.findReSyncTokenType(), a$2 = this.exportLexerState(), s$2 = [], c$2 = !1, l$1 = this.LA(1), f$1 = this.LA(1), p$
|
|
21601
|
+
for (var o$2 = this, i$2 = this.findReSyncTokenType(), a$2 = this.exportLexerState(), s$2 = [], c$2 = !1, l$1 = this.LA(1), f$1 = this.LA(1), p$17 = function() {
|
|
21600
21602
|
var t$11 = o$2.LA(0), e$3 = o$2.errorMessageProvider.buildMismatchTokenMessage({
|
|
21601
21603
|
expected: n$3,
|
|
21602
21604
|
actual: l$1,
|
|
@@ -21605,8 +21607,8 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
21605
21607
|
}), r$3 = new v.MismatchedTokenException(e$3, l$1, o$2.LA(0));
|
|
21606
21608
|
r$3.resyncedTokens = (0, u$1.default)(s$2), o$2.SAVE_ERROR(r$3);
|
|
21607
21609
|
}; !c$2;) {
|
|
21608
|
-
if (this.tokenMatcher(f$1, n$3)) return void p$
|
|
21609
|
-
if (r$2.call(this)) return p$
|
|
21610
|
+
if (this.tokenMatcher(f$1, n$3)) return void p$17();
|
|
21611
|
+
if (r$2.call(this)) return p$17(), void t$10.apply(this, e$2);
|
|
21610
21612
|
this.tokenMatcher(f$1, i$2) ? c$2 = !0 : (f$1 = this.SKIP_TOKEN(), this.addToResyncTokens(f$1, s$2));
|
|
21611
21613
|
}
|
|
21612
21614
|
this.importLexerState(a$2);
|
|
@@ -21696,8 +21698,8 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
21696
21698
|
var l$1 = this.getCurrRuleFullName();
|
|
21697
21699
|
c$2 = new i$2(this.getGAstProductions()[l$1], o$2).startWalking(), this.firstAfterRepMap[u$2] = c$2;
|
|
21698
21700
|
}
|
|
21699
|
-
var f$1 = c$2.token, p$
|
|
21700
|
-
1 === this.RULE_STACK.length && d$2 && void 0 === f$1 && (f$1 = a$1.EOF, p$
|
|
21701
|
+
var f$1 = c$2.token, p$17 = c$2.occurrence, d$2 = c$2.isEndOfRule;
|
|
21702
|
+
1 === this.RULE_STACK.length && d$2 && void 0 === f$1 && (f$1 = a$1.EOF, p$17 = 1), void 0 !== f$1 && void 0 !== p$17 && this.shouldInRepetitionRecoveryBeTried(f$1, p$17, s$2) && this.tryInRepetitionRecovery(t$9, e$2, r$2, f$1);
|
|
21701
21703
|
}
|
|
21702
21704
|
e$1.Recoverable = E, e$1.attemptInRepetitionRecovery = _;
|
|
21703
21705
|
},
|
|
@@ -21820,7 +21822,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
21820
21822
|
return t$9 && t$9.__esModule ? t$9 : { default: t$9 };
|
|
21821
21823
|
};
|
|
21822
21824
|
Object.defineProperty(e$1, "__esModule", { value: !0 }), e$1.charCodeToOptimizedIndex = e$1.minOptimizationVal = e$1.buildLineBreakIssueMessage = e$1.LineTerminatorOptimizedTester = e$1.isShortPattern = e$1.isCustomPattern = e$1.cloneEmptyGroups = e$1.performWarningRuntimeChecks = e$1.performRuntimeChecks = e$1.addStickyFlag = e$1.addStartOfInput = e$1.findUnreachablePatterns = e$1.findModesThatDoNotExist = e$1.findInvalidGroupType = e$1.findDuplicatePatterns = e$1.findUnsupportedFlags = e$1.findStartOfInputAnchor = e$1.findEmptyMatchRegExps = e$1.findEndOfInputAnchor = e$1.findInvalidPatterns = e$1.findMissingPatterns = e$1.validatePatterns = e$1.analyzeTokenTypes = e$1.enableSticky = e$1.disableSticky = e$1.SUPPORT_STICKY = e$1.MODES = e$1.DEFAULT_MODE = void 0;
|
|
21823
|
-
var a$1 = r$1(4844), s$1 = r$1(9027), u$1 = i$1(r$1(3237)), c$1 = i$1(r$1(5455)), l = i$1(r$1(417)), f = i$1(r$1(6152)), p$
|
|
21825
|
+
var a$1 = r$1(4844), s$1 = r$1(9027), u$1 = i$1(r$1(3237)), c$1 = i$1(r$1(5455)), l = i$1(r$1(417)), f = i$1(r$1(6152)), p$16 = i$1(r$1(8346)), d$1 = i$1(r$1(5676)), h$2 = i$1(r$1(2070)), v = i$1(r$1(7335)), y$1 = i$1(r$1(3493)), m$1 = i$1(r$1(6760)), T = i$1(r$1(9756)), E = i$1(r$1(5505)), _ = i$1(r$1(1049)), g = i$1(r$1(4336)), O = i$1(r$1(5281)), R$2 = i$1(r$1(3352)), A = i$1(r$1(249)), I = i$1(r$1(859)), x = i$1(r$1(882)), N = i$1(r$1(4573)), P = i$1(r$1(8215)), S = i$1(r$1(1886)), b = r$1(7146), k = r$1(1480), L = r$1(3067);
|
|
21824
21826
|
function C(t$9) {
|
|
21825
21827
|
var e$2 = (0, x.default)(t$9, (function(t$10) {
|
|
21826
21828
|
return !(0, R$2.default)(t$10, "PATTERN");
|
|
@@ -21879,7 +21881,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
21879
21881
|
return t$10.PATTERN === s$1.Lexer.NA;
|
|
21880
21882
|
}));
|
|
21881
21883
|
}));
|
|
21882
|
-
var i$2, a$2, u$2, l$1, p$
|
|
21884
|
+
var i$2, a$2, u$2, l$1, p$17, d$2, v$1, O$1, A$1, x$1, L$1, C$1 = !1;
|
|
21883
21885
|
o$2("Transform Patterns", (function() {
|
|
21884
21886
|
C$1 = !1, i$2 = (0, m$1.default)(n$3, (function(t$10) {
|
|
21885
21887
|
var e$2 = t$10.PATTERN;
|
|
@@ -21928,7 +21930,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
21928
21930
|
if (e$2) return (0, f.default)(e$2) ? (0, m$1.default)(e$2, (function(t$11) {
|
|
21929
21931
|
return (0, y$1.default)(n$3, t$11);
|
|
21930
21932
|
})) : [(0, y$1.default)(n$3, e$2)];
|
|
21931
|
-
})), p$
|
|
21933
|
+
})), p$17 = (0, m$1.default)(n$3, (function(t$10) {
|
|
21932
21934
|
return t$10.PUSH_MODE;
|
|
21933
21935
|
})), d$2 = (0, m$1.default)(n$3, (function(t$10) {
|
|
21934
21936
|
return (0, R$2.default)(t$10, "POP_MODE");
|
|
@@ -21952,7 +21954,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
21952
21954
|
isCustom: O$1[e$2],
|
|
21953
21955
|
short: A$1[e$2],
|
|
21954
21956
|
group: u$2[e$2],
|
|
21955
|
-
push: p$
|
|
21957
|
+
push: p$17[e$2],
|
|
21956
21958
|
pop: d$2[e$2],
|
|
21957
21959
|
tokenTypeIdx: a$2[e$2],
|
|
21958
21960
|
tokenType: n$3[e$2]
|
|
@@ -22245,7 +22247,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
22245
22247
|
}));
|
|
22246
22248
|
})), o$2;
|
|
22247
22249
|
}, e$1.performWarningRuntimeChecks = function(t$9, e$2, r$2) {
|
|
22248
|
-
var n$3 = [], o$2 = !1, i$2 = (0, l.default)((0, d$1.default)((0, p$
|
|
22250
|
+
var n$3 = [], o$2 = !1, i$2 = (0, l.default)((0, d$1.default)((0, p$16.default)(t$9.modes))), a$2 = (0, h$2.default)(i$2, (function(t$10) {
|
|
22249
22251
|
return t$10.PATTERN === s$1.Lexer.NA;
|
|
22250
22252
|
})), u$2 = Q(r$2);
|
|
22251
22253
|
return e$2 && (0, T.default)(a$2, (function(t$10) {
|
|
@@ -22301,7 +22303,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
22301
22303
|
return t$9 && t$9.__esModule ? t$9 : { default: t$9 };
|
|
22302
22304
|
};
|
|
22303
22305
|
Object.defineProperty(e$1, "__esModule", { value: !0 }), e$1.Lexer = e$1.LexerDefinitionErrorType = void 0;
|
|
22304
|
-
var o$1, i$1 = r$1(6178), a$1 = n$2(r$1(4291)), s$1 = n$2(r$1(5455)), u$1 = n$2(r$1(6152)), c$1 = n$2(r$1(6974)), l = n$2(r$1(2070)), f = n$2(r$1(6760)), p$
|
|
22306
|
+
var o$1, i$1 = r$1(6178), a$1 = n$2(r$1(4291)), s$1 = n$2(r$1(5455)), u$1 = n$2(r$1(6152)), c$1 = n$2(r$1(6974)), l = n$2(r$1(2070)), f = n$2(r$1(6760)), p$16 = n$2(r$1(9756)), d$1 = n$2(r$1(249)), h$2 = n$2(r$1(4336)), v = n$2(r$1(3059)), y$1 = n$2(r$1(19)), m$1 = n$2(r$1(8215)), T = n$2(r$1(4004)), E = r$1(7146), _ = r$1(1201), g = r$1(495), O = r$1(3067);
|
|
22305
22307
|
(o$1 = e$1.LexerDefinitionErrorType || (e$1.LexerDefinitionErrorType = {}))[o$1.MISSING_PATTERN = 0] = "MISSING_PATTERN", o$1[o$1.INVALID_PATTERN = 1] = "INVALID_PATTERN", o$1[o$1.EOI_ANCHOR_FOUND = 2] = "EOI_ANCHOR_FOUND", o$1[o$1.UNSUPPORTED_FLAGS_FOUND = 3] = "UNSUPPORTED_FLAGS_FOUND", o$1[o$1.DUPLICATE_PATTERNS_FOUND = 4] = "DUPLICATE_PATTERNS_FOUND", o$1[o$1.INVALID_GROUP_TYPE_FOUND = 5] = "INVALID_GROUP_TYPE_FOUND", o$1[o$1.PUSH_MODE_DOES_NOT_EXIST = 6] = "PUSH_MODE_DOES_NOT_EXIST", o$1[o$1.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE = 7] = "MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE", o$1[o$1.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY = 8] = "MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY", o$1[o$1.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST = 9] = "MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST", o$1[o$1.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED = 10] = "LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED", o$1[o$1.SOI_ANCHOR_FOUND = 11] = "SOI_ANCHOR_FOUND", o$1[o$1.EMPTY_MATCH_PATTERN = 12] = "EMPTY_MATCH_PATTERN", o$1[o$1.NO_LINE_BREAKS_FLAGS = 13] = "NO_LINE_BREAKS_FLAGS", o$1[o$1.UNREACHABLE_PATTERN = 14] = "UNREACHABLE_PATTERN", o$1[o$1.IDENTIFY_TERMINATOR = 15] = "IDENTIFY_TERMINATOR", o$1[o$1.CUSTOM_LINE_BREAK = 16] = "CUSTOM_LINE_BREAK";
|
|
22306
22308
|
var R$2 = {
|
|
22307
22309
|
deferDefinitionErrorsHandling: !1,
|
|
@@ -22345,13 +22347,13 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
22345
22347
|
r$2.lexerDefinitionErrors = r$2.lexerDefinitionErrors.concat((0, i$1.performRuntimeChecks)(n$4, r$2.trackStartLines, r$2.config.lineTerminatorCharacters));
|
|
22346
22348
|
})), r$2.TRACE_INIT("performWarningRuntimeChecks", (function() {
|
|
22347
22349
|
r$2.lexerDefinitionWarning = r$2.lexerDefinitionWarning.concat((0, i$1.performWarningRuntimeChecks)(n$4, r$2.trackStartLines, r$2.config.lineTerminatorCharacters));
|
|
22348
|
-
}))), n$4.modes = n$4.modes ? n$4.modes : {}, (0, p$
|
|
22350
|
+
}))), n$4.modes = n$4.modes ? n$4.modes : {}, (0, p$16.default)(n$4.modes, (function(t$11, e$3) {
|
|
22349
22351
|
n$4.modes[e$3] = (0, l.default)(t$11, (function(t$12) {
|
|
22350
22352
|
return (0, h$2.default)(t$12);
|
|
22351
22353
|
}));
|
|
22352
22354
|
}));
|
|
22353
22355
|
var c$2 = (0, d$1.default)(n$4.modes);
|
|
22354
|
-
if ((0, p$
|
|
22356
|
+
if ((0, p$16.default)(n$4.modes, (function(t$11, n$5) {
|
|
22355
22357
|
r$2.TRACE_INIT("Mode: <".concat(n$5, "> processing"), (function() {
|
|
22356
22358
|
var o$3;
|
|
22357
22359
|
r$2.modes.push(n$5), !1 === r$2.config.skipValidations && r$2.TRACE_INIT("validatePatterns", (function() {
|
|
@@ -22372,7 +22374,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
22372
22374
|
})).join("-----------------------\n");
|
|
22373
22375
|
throw new Error("Errors detected in definition of Lexer:\n" + g$1);
|
|
22374
22376
|
}
|
|
22375
|
-
(0, p$
|
|
22377
|
+
(0, p$16.default)(r$2.lexerDefinitionWarning, (function(t$11) {
|
|
22376
22378
|
(0, E.PRINT_WARNING)(t$11.message);
|
|
22377
22379
|
})), r$2.TRACE_INIT("Choosing sub-methods implementations", (function() {
|
|
22378
22380
|
if (i$1.SUPPORT_STICKY ? (r$2.chopInput = v.default, r$2.match = r$2.matchWithTest) : (r$2.updateLastIndex = a$1.default, r$2.match = r$2.matchWithExec), o$2 && (r$2.handleModes = a$1.default), !1 === r$2.trackStartLines && (r$2.computeNewColumn = v.default), !1 === r$2.trackEndLines && (r$2.updateTokenEndLineColumnLocation = a$1.default), /full/i.test(r$2.config.positionTracking)) r$2.createTokenInstance = r$2.createFullToken;
|
|
@@ -22403,7 +22405,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
22403
22405
|
}
|
|
22404
22406
|
return this.tokenizeInternal(t$10, e$2);
|
|
22405
22407
|
}, t$9.prototype.tokenizeInternal = function(t$10, e$2) {
|
|
22406
|
-
var r$2, n$3, o$2, a$2, s$2, u$2, l$1, f$1, p$
|
|
22408
|
+
var r$2, n$3, o$2, a$2, s$2, u$2, l$1, f$1, p$17, d$2, h$3, v$1, y$2, m$2, T$1, E$1, _$1 = this, g$1 = t$10, O$1 = g$1.length, R$3 = 0, A = 0, I = this.hasCustom ? 0 : Math.floor(t$10.length / 10), x = new Array(I), N = [], P = this.trackStartLines ? 1 : void 0, S = this.trackStartLines ? 1 : void 0, b = (0, i$1.cloneEmptyGroups)(this.emptyGroups), k = this.trackStartLines, L = this.config.lineTerminatorsPattern, C = 0, M = [], D = [], w$1 = [], F = [];
|
|
22407
22409
|
function j() {
|
|
22408
22410
|
return M;
|
|
22409
22411
|
}
|
|
@@ -22455,13 +22457,13 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
22455
22457
|
}
|
|
22456
22458
|
}
|
|
22457
22459
|
if (null !== u$2) {
|
|
22458
|
-
if (p$
|
|
22460
|
+
if (p$17 = u$2.length, void 0 !== (d$2 = B.group) && (h$3 = B.tokenTypeIdx, v$1 = this.createTokenInstance(u$2, R$3, h$3, B.tokenType, P, S, p$17), this.handlePayload(v$1, l$1), !1 === d$2 ? A = this.addToken(x, A, v$1) : b[d$2].push(v$1)), t$10 = this.chopInput(t$10, p$17), R$3 += p$17, S = this.computeNewColumn(S, p$17), !0 === k && !0 === B.canLineTerminator) {
|
|
22459
22461
|
var $$1 = 0, Q = void 0, Z = void 0;
|
|
22460
22462
|
L.lastIndex = 0;
|
|
22461
22463
|
do
|
|
22462
22464
|
!0 === (Q = L.test(u$2)) && (Z = L.lastIndex - 1, $$1++);
|
|
22463
22465
|
while (!0 === Q);
|
|
22464
|
-
0 !== $$1 && (P += $$1, S = p$
|
|
22466
|
+
0 !== $$1 && (P += $$1, S = p$17 - Z, this.updateTokenEndLineColumnLocation(v$1, d$2, Z, $$1, P, S, p$17));
|
|
22465
22467
|
}
|
|
22466
22468
|
this.handleModes(B, G, W, v$1);
|
|
22467
22469
|
} else {
|
|
@@ -22556,7 +22558,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
22556
22558
|
return t$9 && t$9.__esModule ? t$9 : { default: t$9 };
|
|
22557
22559
|
};
|
|
22558
22560
|
Object.defineProperty(e$1, "__esModule", { value: !0 }), e$1.canMatchCharCode = e$1.firstCharOptimizedIndices = e$1.getOptimizedStartCodesIndices = e$1.failedOptimizationPrefixMsg = void 0;
|
|
22559
|
-
var a$1 = r$1(4844), s$1 = i$1(r$1(6152)), u$1 = i$1(r$1(9794)), c$1 = i$1(r$1(9756)), l = i$1(r$1(5281)), f = i$1(r$1(8346)), p$
|
|
22561
|
+
var a$1 = r$1(4844), s$1 = i$1(r$1(6152)), u$1 = i$1(r$1(9794)), c$1 = i$1(r$1(9756)), l = i$1(r$1(5281)), f = i$1(r$1(8346)), p$16 = i$1(r$1(1886)), d$1 = r$1(7146), h$2 = r$1(3067), v = r$1(6178), y$1 = "Complement Sets are not supported for first char optimization";
|
|
22560
22562
|
function m$1(t$9, e$2, r$2) {
|
|
22561
22563
|
switch (t$9.type) {
|
|
22562
22564
|
case "Disjunction":
|
|
@@ -22620,7 +22622,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
22620
22622
|
}
|
|
22621
22623
|
function E(t$9, e$2) {
|
|
22622
22624
|
return (0, l.default)(t$9.value, (function(t$10) {
|
|
22623
|
-
if ("number" == typeof t$10) return (0, p$
|
|
22625
|
+
if ("number" == typeof t$10) return (0, p$16.default)(e$2, t$10);
|
|
22624
22626
|
var r$2 = t$10;
|
|
22625
22627
|
return void 0 !== (0, l.default)(e$2, (function(t$11) {
|
|
22626
22628
|
return r$2.from <= t$11 && t$11 <= r$2.to;
|
|
@@ -22663,7 +22665,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
22663
22665
|
t$9.prototype.visitChildren.call(this, e$3);
|
|
22664
22666
|
}
|
|
22665
22667
|
}, e$2.prototype.visitCharacter = function(t$10) {
|
|
22666
|
-
(0, p$
|
|
22668
|
+
(0, p$16.default)(this.targetCharCodes, t$10.value) && (this.found = !0);
|
|
22667
22669
|
}, e$2.prototype.visitSet = function(t$10) {
|
|
22668
22670
|
t$10.complement ? void 0 === E(t$10, this.targetCharCodes) && (this.found = !0) : void 0 !== E(t$10, this.targetCharCodes) && (this.found = !0);
|
|
22669
22671
|
}, e$2;
|
|
@@ -22674,7 +22676,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
22674
22676
|
return n$3.visit(r$2), n$3.found;
|
|
22675
22677
|
}
|
|
22676
22678
|
return void 0 !== (0, l.default)(e$2, (function(e$3) {
|
|
22677
|
-
return (0, p$
|
|
22679
|
+
return (0, p$16.default)(t$9, e$3.charCodeAt(0));
|
|
22678
22680
|
}));
|
|
22679
22681
|
};
|
|
22680
22682
|
},
|
|
@@ -22695,7 +22697,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
22695
22697
|
return t$9 && t$9.__esModule ? t$9 : { default: t$9 };
|
|
22696
22698
|
};
|
|
22697
22699
|
Object.defineProperty(e$1, "__esModule", { value: !0 }), e$1.isTokenType = e$1.hasExtendingTokensTypesMapProperty = e$1.hasExtendingTokensTypesProperty = e$1.hasCategoriesProperty = e$1.hasShortKeyProperty = e$1.singleAssignCategoriesToksMap = e$1.assignCategoriesMapProp = e$1.assignCategoriesTokensProp = e$1.assignTokenDefaultProps = e$1.expandCategories = e$1.augmentTokenTypes = e$1.tokenIdxToClass = e$1.tokenShortNameIdx = e$1.tokenStructuredMatcherNoCategories = e$1.tokenStructuredMatcher = void 0;
|
|
22698
|
-
var o$1 = n$2(r$1(5455)), i$1 = n$2(r$1(417)), a$1 = n$2(r$1(6152)), s$1 = n$2(r$1(5676)), u$1 = n$2(r$1(7335)), c$1 = n$2(r$1(6760)), l = n$2(r$1(9756)), f = n$2(r$1(3352)), p$
|
|
22700
|
+
var o$1 = n$2(r$1(5455)), i$1 = n$2(r$1(417)), a$1 = n$2(r$1(6152)), s$1 = n$2(r$1(5676)), u$1 = n$2(r$1(7335)), c$1 = n$2(r$1(6760)), l = n$2(r$1(9756)), f = n$2(r$1(3352)), p$16 = n$2(r$1(1886)), d$1 = n$2(r$1(4004));
|
|
22699
22701
|
function h$2(t$9) {
|
|
22700
22702
|
for (var e$2 = (0, d$1.default)(t$9), r$2 = t$9, n$3 = !0; n$3;) {
|
|
22701
22703
|
r$2 = (0, i$1.default)((0, s$1.default)((0, c$1.default)(r$2, (function(t$10) {
|
|
@@ -22728,7 +22730,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
22728
22730
|
e$2.categoryMatchesMap[t$10.tokenTypeIdx] = !0;
|
|
22729
22731
|
})), (0, l.default)(e$2.CATEGORIES, (function(r$2) {
|
|
22730
22732
|
var n$3 = t$9.concat(e$2);
|
|
22731
|
-
(0, p$
|
|
22733
|
+
(0, p$16.default)(n$3, r$2) || T(n$3, r$2);
|
|
22732
22734
|
}));
|
|
22733
22735
|
}
|
|
22734
22736
|
function E(t$9) {
|
|
@@ -22829,7 +22831,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
22829
22831
|
function f(t$9) {
|
|
22830
22832
|
return (0, c$1.default)(t$9) + "CstNode";
|
|
22831
22833
|
}
|
|
22832
|
-
function p$
|
|
22834
|
+
function p$16(t$9) {
|
|
22833
22835
|
return (0, c$1.default)(t$9) + "CstChildren";
|
|
22834
22836
|
}
|
|
22835
22837
|
e$1.genDts = function(t$9, e$2) {
|
|
@@ -22837,10 +22839,10 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
22837
22839
|
return c$2 = (c$2 = c$2.concat("import type { CstNode, ICstVisitor, IToken } from \"chevrotain\";")).concat((0, o$1.default)((0, a$1.default)(t$9, (function(t$10) {
|
|
22838
22840
|
return function(t$11) {
|
|
22839
22841
|
return [function(t$12) {
|
|
22840
|
-
var e$3 = f(t$12.name), r$3 = p$
|
|
22842
|
+
var e$3 = f(t$12.name), r$3 = p$16(t$12.name);
|
|
22841
22843
|
return "export interface ".concat(e$3, " extends CstNode {\n name: \"").concat(t$12.name, "\";\n children: ").concat(r$3, ";\n}");
|
|
22842
22844
|
}(t$11), function(t$12) {
|
|
22843
|
-
var e$3 = p$
|
|
22845
|
+
var e$3 = p$16(t$12.name);
|
|
22844
22846
|
return "export type ".concat(e$3, " = {\n ").concat((0, a$1.default)(t$12.properties, (function(t$13) {
|
|
22845
22847
|
return function(t$14) {
|
|
22846
22848
|
var e$4 = function(t$15) {
|
|
@@ -22861,7 +22863,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
22861
22863
|
}(t$10);
|
|
22862
22864
|
})))), e$2.includeVisitorInterface && (c$2 = c$2.concat((r$2 = e$2.visitorInterfaceName, n$3 = t$9, "export interface ".concat(r$2, "<IN, OUT> extends ICstVisitor<IN, OUT> {\n ").concat((0, a$1.default)(n$3, (function(t$10) {
|
|
22863
22865
|
return function(t$11) {
|
|
22864
|
-
var e$3 = p$
|
|
22866
|
+
var e$3 = p$16(t$11.name);
|
|
22865
22867
|
return "".concat(t$11.name, "(children: ").concat(e$3, ", param?: IN): OUT;");
|
|
22866
22868
|
}(t$10);
|
|
22867
22869
|
})).join("\n "), "\n}")))), c$2.join("\n\n") + "\n";
|
|
@@ -22884,7 +22886,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
22884
22886
|
return t$9 && t$9.__esModule ? t$9 : { default: t$9 };
|
|
22885
22887
|
};
|
|
22886
22888
|
Object.defineProperty(e$1, "__esModule", { value: !0 }), e$1.buildModel = void 0;
|
|
22887
|
-
var a$1 = r$1(7729), s$1 = i$1(r$1(6760)), u$1 = i$1(r$1(5676)), c$1 = i$1(r$1(8346)), l = i$1(r$1(1525)), f = i$1(r$1(3440)), p$
|
|
22889
|
+
var a$1 = r$1(7729), s$1 = i$1(r$1(6760)), u$1 = i$1(r$1(5676)), c$1 = i$1(r$1(8346)), l = i$1(r$1(1525)), f = i$1(r$1(3440)), p$16 = i$1(r$1(19));
|
|
22888
22890
|
e$1.buildModel = function(t$9) {
|
|
22889
22891
|
var e$2 = new d$1(), r$2 = (0, c$1.default)(t$9);
|
|
22890
22892
|
return (0, s$1.default)(r$2, (function(t$10) {
|
|
@@ -22950,7 +22952,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
22950
22952
|
}];
|
|
22951
22953
|
}, e$2.prototype.visitEachAndOverrideWith = function(t$10, e$3) {
|
|
22952
22954
|
return (0, s$1.default)(this.visitEach(t$10), (function(t$11) {
|
|
22953
|
-
return (0, p$
|
|
22955
|
+
return (0, p$16.default)({}, t$11, e$3);
|
|
22954
22956
|
}));
|
|
22955
22957
|
}, e$2.prototype.visitEach = function(t$10) {
|
|
22956
22958
|
var e$3 = this;
|
|
@@ -23106,7 +23108,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
23106
23108
|
};
|
|
23107
23109
|
Object.defineProperty(e$1, "__esModule", { value: !0 }), e$1.serializeProduction = e$1.serializeGrammar = e$1.Terminal = e$1.Alternation = e$1.RepetitionWithSeparator = e$1.Repetition = e$1.RepetitionMandatoryWithSeparator = e$1.RepetitionMandatory = e$1.Option = e$1.Alternative = e$1.Rule = e$1.NonTerminal = e$1.AbstractProduction = void 0;
|
|
23108
23110
|
var a$1 = i$1(r$1(6760)), s$1 = i$1(r$1(9756)), u$1 = i$1(r$1(5505)), c$1 = i$1(r$1(859)), l = i$1(r$1(2208)), f = i$1(r$1(19));
|
|
23109
|
-
var p$
|
|
23111
|
+
var p$16 = function() {
|
|
23110
23112
|
function t$9(t$10) {
|
|
23111
23113
|
this._definition = t$10;
|
|
23112
23114
|
}
|
|
@@ -23125,7 +23127,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
23125
23127
|
}));
|
|
23126
23128
|
}, t$9;
|
|
23127
23129
|
}();
|
|
23128
|
-
e$1.AbstractProduction = p$
|
|
23130
|
+
e$1.AbstractProduction = p$16;
|
|
23129
23131
|
var d$1 = function(t$9) {
|
|
23130
23132
|
function e$2(e$3) {
|
|
23131
23133
|
var r$2 = t$9.call(this, []) || this;
|
|
@@ -23143,7 +23145,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
23143
23145
|
}), e$2.prototype.accept = function(t$10) {
|
|
23144
23146
|
t$10.visit(this);
|
|
23145
23147
|
}, e$2;
|
|
23146
|
-
}(p$
|
|
23148
|
+
}(p$16);
|
|
23147
23149
|
e$1.NonTerminal = d$1;
|
|
23148
23150
|
var h$2 = function(t$9) {
|
|
23149
23151
|
function e$2(e$3) {
|
|
@@ -23153,7 +23155,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
23153
23155
|
}))), r$2;
|
|
23154
23156
|
}
|
|
23155
23157
|
return o$1(e$2, t$9), e$2;
|
|
23156
|
-
}(p$
|
|
23158
|
+
}(p$16);
|
|
23157
23159
|
e$1.Rule = h$2;
|
|
23158
23160
|
var v = function(t$9) {
|
|
23159
23161
|
function e$2(e$3) {
|
|
@@ -23163,7 +23165,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
23163
23165
|
}))), r$2;
|
|
23164
23166
|
}
|
|
23165
23167
|
return o$1(e$2, t$9), e$2;
|
|
23166
|
-
}(p$
|
|
23168
|
+
}(p$16);
|
|
23167
23169
|
e$1.Alternative = v;
|
|
23168
23170
|
var y$1 = function(t$9) {
|
|
23169
23171
|
function e$2(e$3) {
|
|
@@ -23173,7 +23175,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
23173
23175
|
}))), r$2;
|
|
23174
23176
|
}
|
|
23175
23177
|
return o$1(e$2, t$9), e$2;
|
|
23176
|
-
}(p$
|
|
23178
|
+
}(p$16);
|
|
23177
23179
|
e$1.Option = y$1;
|
|
23178
23180
|
var m$1 = function(t$9) {
|
|
23179
23181
|
function e$2(e$3) {
|
|
@@ -23183,7 +23185,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
23183
23185
|
}))), r$2;
|
|
23184
23186
|
}
|
|
23185
23187
|
return o$1(e$2, t$9), e$2;
|
|
23186
|
-
}(p$
|
|
23188
|
+
}(p$16);
|
|
23187
23189
|
e$1.RepetitionMandatory = m$1;
|
|
23188
23190
|
var T = function(t$9) {
|
|
23189
23191
|
function e$2(e$3) {
|
|
@@ -23193,7 +23195,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
23193
23195
|
}))), r$2;
|
|
23194
23196
|
}
|
|
23195
23197
|
return o$1(e$2, t$9), e$2;
|
|
23196
|
-
}(p$
|
|
23198
|
+
}(p$16);
|
|
23197
23199
|
e$1.RepetitionMandatoryWithSeparator = T;
|
|
23198
23200
|
var E = function(t$9) {
|
|
23199
23201
|
function e$2(e$3) {
|
|
@@ -23203,7 +23205,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
23203
23205
|
}))), r$2;
|
|
23204
23206
|
}
|
|
23205
23207
|
return o$1(e$2, t$9), e$2;
|
|
23206
|
-
}(p$
|
|
23208
|
+
}(p$16);
|
|
23207
23209
|
e$1.Repetition = E;
|
|
23208
23210
|
var _ = function(t$9) {
|
|
23209
23211
|
function e$2(e$3) {
|
|
@@ -23213,7 +23215,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
23213
23215
|
}))), r$2;
|
|
23214
23216
|
}
|
|
23215
23217
|
return o$1(e$2, t$9), e$2;
|
|
23216
|
-
}(p$
|
|
23218
|
+
}(p$16);
|
|
23217
23219
|
e$1.RepetitionWithSeparator = _;
|
|
23218
23220
|
var g = function(t$9) {
|
|
23219
23221
|
function e$2(e$3) {
|
|
@@ -23232,7 +23234,7 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
23232
23234
|
enumerable: !1,
|
|
23233
23235
|
configurable: !0
|
|
23234
23236
|
}), e$2;
|
|
23235
|
-
}(p$
|
|
23237
|
+
}(p$16);
|
|
23236
23238
|
e$1.Alternation = g;
|
|
23237
23239
|
var O = function() {
|
|
23238
23240
|
function t$9(t$10) {
|
|
@@ -23601,11 +23603,11 @@ var require_chevrotain = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
|
|
|
23601
23603
|
return f.GAstVisitor;
|
|
23602
23604
|
}
|
|
23603
23605
|
});
|
|
23604
|
-
var p$
|
|
23606
|
+
var p$16 = r(8962);
|
|
23605
23607
|
Object.defineProperty(t$8, "generateCstDts", {
|
|
23606
23608
|
enumerable: !0,
|
|
23607
23609
|
get: function() {
|
|
23608
|
-
return p$
|
|
23610
|
+
return p$16.generateCstDts;
|
|
23609
23611
|
}
|
|
23610
23612
|
}), t$8.clearCache = function() {
|
|
23611
23613
|
console.warn("The clearCache function was 'soft' removed from the Chevrotain API.\n It performs no action other than printing this message.\n Please avoid using it as it will be completely removed in the future");
|
|
@@ -24480,7 +24482,7 @@ var require_json = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_module
|
|
|
24480
24482
|
return result;
|
|
24481
24483
|
};
|
|
24482
24484
|
var __exportStar$1 = exports && exports.__exportStar || function(m$1, exports$1) {
|
|
24483
|
-
for (var p$
|
|
24485
|
+
for (var p$16 in m$1) if (p$16 !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p$16)) __createBinding$23(exports$1, m$1, p$16);
|
|
24484
24486
|
};
|
|
24485
24487
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24486
24488
|
exports.build = exports.parse = void 0;
|
|
@@ -27879,7 +27881,7 @@ var require_build$2 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
|
|
|
27879
27881
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
27880
27882
|
};
|
|
27881
27883
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27882
|
-
const base64_js_1 = __importDefault$8(
|
|
27884
|
+
const base64_js_1 = __importDefault$8(require_keyGeneration.require_base64_js());
|
|
27883
27885
|
const xmlbuilder_1 = __importDefault$8(require_lib$1());
|
|
27884
27886
|
/**
|
|
27885
27887
|
* Accepts a `Date` instance and returns an ISO date string.
|
|
@@ -28104,7 +28106,7 @@ var require_dom = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules
|
|
|
28104
28106
|
};
|
|
28105
28107
|
}
|
|
28106
28108
|
function copy(src$2, dest) {
|
|
28107
|
-
for (var p$
|
|
28109
|
+
for (var p$16 in src$2) if (Object.prototype.hasOwnProperty.call(src$2, p$16)) dest[p$16] = src$2[p$16];
|
|
28108
28110
|
}
|
|
28109
28111
|
/**
|
|
28110
28112
|
^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));?
|
|
@@ -31518,13 +31520,13 @@ var require_sax = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules
|
|
|
31518
31520
|
start = end$1;
|
|
31519
31521
|
}
|
|
31520
31522
|
}
|
|
31521
|
-
function position$1(p$
|
|
31522
|
-
while (p$
|
|
31523
|
+
function position$1(p$16, m$1) {
|
|
31524
|
+
while (p$16 >= lineEnd && (m$1 = linePattern.exec(source))) {
|
|
31523
31525
|
lineStart = m$1.index;
|
|
31524
31526
|
lineEnd = lineStart + m$1[0].length;
|
|
31525
31527
|
locator.lineNumber++;
|
|
31526
31528
|
}
|
|
31527
|
-
locator.columnNumber = p$
|
|
31529
|
+
locator.columnNumber = p$16 - lineStart + 1;
|
|
31528
31530
|
}
|
|
31529
31531
|
var lineStart = 0;
|
|
31530
31532
|
var lineEnd = 0;
|
|
@@ -31633,14 +31635,14 @@ var require_sax = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules
|
|
|
31633
31635
|
}
|
|
31634
31636
|
var attrName;
|
|
31635
31637
|
var value;
|
|
31636
|
-
var p$
|
|
31638
|
+
var p$16 = ++start;
|
|
31637
31639
|
var s$1 = S_TAG;
|
|
31638
31640
|
while (true) {
|
|
31639
|
-
var c$1 = source.charAt(p$
|
|
31641
|
+
var c$1 = source.charAt(p$16);
|
|
31640
31642
|
switch (c$1) {
|
|
31641
31643
|
case "=":
|
|
31642
31644
|
if (s$1 === S_ATTR) {
|
|
31643
|
-
attrName = source.slice(start, p$
|
|
31645
|
+
attrName = source.slice(start, p$16);
|
|
31644
31646
|
s$1 = S_EQ;
|
|
31645
31647
|
} else if (s$1 === S_ATTR_SPACE) s$1 = S_EQ;
|
|
31646
31648
|
else throw new Error("attribute equal must after attrName");
|
|
@@ -31650,26 +31652,26 @@ var require_sax = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules
|
|
|
31650
31652
|
if (s$1 === S_EQ || s$1 === S_ATTR) {
|
|
31651
31653
|
if (s$1 === S_ATTR) {
|
|
31652
31654
|
errorHandler.warning("attribute value must after \"=\"");
|
|
31653
|
-
attrName = source.slice(start, p$
|
|
31655
|
+
attrName = source.slice(start, p$16);
|
|
31654
31656
|
}
|
|
31655
|
-
start = p$
|
|
31656
|
-
p$
|
|
31657
|
-
if (p$
|
|
31658
|
-
value = source.slice(start, p$
|
|
31657
|
+
start = p$16 + 1;
|
|
31658
|
+
p$16 = source.indexOf(c$1, start);
|
|
31659
|
+
if (p$16 > 0) {
|
|
31660
|
+
value = source.slice(start, p$16).replace(/&#?\w+;/g, entityReplacer);
|
|
31659
31661
|
addAttribute(attrName, value, start - 1);
|
|
31660
31662
|
s$1 = S_ATTR_END;
|
|
31661
31663
|
} else throw new Error("attribute value no end '" + c$1 + "' match");
|
|
31662
31664
|
} else if (s$1 == S_ATTR_NOQUOT_VALUE) {
|
|
31663
|
-
value = source.slice(start, p$
|
|
31665
|
+
value = source.slice(start, p$16).replace(/&#?\w+;/g, entityReplacer);
|
|
31664
31666
|
addAttribute(attrName, value, start);
|
|
31665
31667
|
errorHandler.warning("attribute \"" + attrName + "\" missed start quot(" + c$1 + ")!!");
|
|
31666
|
-
start = p$
|
|
31668
|
+
start = p$16 + 1;
|
|
31667
31669
|
s$1 = S_ATTR_END;
|
|
31668
31670
|
} else throw new Error("attribute value must after \"=\"");
|
|
31669
31671
|
break;
|
|
31670
31672
|
case "/":
|
|
31671
31673
|
switch (s$1) {
|
|
31672
|
-
case S_TAG: el.setTagName(source.slice(start, p$
|
|
31674
|
+
case S_TAG: el.setTagName(source.slice(start, p$16));
|
|
31673
31675
|
case S_ATTR_END:
|
|
31674
31676
|
case S_TAG_SPACE:
|
|
31675
31677
|
case S_TAG_CLOSE:
|
|
@@ -31685,17 +31687,17 @@ var require_sax = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules
|
|
|
31685
31687
|
break;
|
|
31686
31688
|
case "":
|
|
31687
31689
|
errorHandler.error("unexpected end of input");
|
|
31688
|
-
if (s$1 == S_TAG) el.setTagName(source.slice(start, p$
|
|
31689
|
-
return p$
|
|
31690
|
+
if (s$1 == S_TAG) el.setTagName(source.slice(start, p$16));
|
|
31691
|
+
return p$16;
|
|
31690
31692
|
case ">":
|
|
31691
31693
|
switch (s$1) {
|
|
31692
|
-
case S_TAG: el.setTagName(source.slice(start, p$
|
|
31694
|
+
case S_TAG: el.setTagName(source.slice(start, p$16));
|
|
31693
31695
|
case S_ATTR_END:
|
|
31694
31696
|
case S_TAG_SPACE:
|
|
31695
31697
|
case S_TAG_CLOSE: break;
|
|
31696
31698
|
case S_ATTR_NOQUOT_VALUE:
|
|
31697
31699
|
case S_ATTR:
|
|
31698
|
-
value = source.slice(start, p$
|
|
31700
|
+
value = source.slice(start, p$16);
|
|
31699
31701
|
if (value.slice(-1) === "/") {
|
|
31700
31702
|
el.closed = true;
|
|
31701
31703
|
value = value.slice(0, -1);
|
|
@@ -31712,19 +31714,19 @@ var require_sax = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules
|
|
|
31712
31714
|
break;
|
|
31713
31715
|
case S_EQ: throw new Error("attribute value missed!!");
|
|
31714
31716
|
}
|
|
31715
|
-
return p$
|
|
31717
|
+
return p$16;
|
|
31716
31718
|
case "": c$1 = " ";
|
|
31717
31719
|
default: if (c$1 <= " ") switch (s$1) {
|
|
31718
31720
|
case S_TAG:
|
|
31719
|
-
el.setTagName(source.slice(start, p$
|
|
31721
|
+
el.setTagName(source.slice(start, p$16));
|
|
31720
31722
|
s$1 = S_TAG_SPACE;
|
|
31721
31723
|
break;
|
|
31722
31724
|
case S_ATTR:
|
|
31723
|
-
attrName = source.slice(start, p$
|
|
31725
|
+
attrName = source.slice(start, p$16);
|
|
31724
31726
|
s$1 = S_ATTR_SPACE;
|
|
31725
31727
|
break;
|
|
31726
31728
|
case S_ATTR_NOQUOT_VALUE:
|
|
31727
|
-
var value = source.slice(start, p$
|
|
31729
|
+
var value = source.slice(start, p$16).replace(/&#?\w+;/g, entityReplacer);
|
|
31728
31730
|
errorHandler.warning("attribute \"" + value + "\" missed quot(\")!!");
|
|
31729
31731
|
addAttribute(attrName, value, start);
|
|
31730
31732
|
case S_ATTR_END:
|
|
@@ -31736,22 +31738,22 @@ var require_sax = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules
|
|
|
31736
31738
|
el.tagName;
|
|
31737
31739
|
if (!NAMESPACE$1.isHTML(currentNSMap[""]) || !attrName.match(/^(?:disabled|checked|selected)$/i)) errorHandler.warning("attribute \"" + attrName + "\" missed value!! \"" + attrName + "\" instead2!!");
|
|
31738
31740
|
addAttribute(attrName, attrName, start);
|
|
31739
|
-
start = p$
|
|
31741
|
+
start = p$16;
|
|
31740
31742
|
s$1 = S_ATTR;
|
|
31741
31743
|
break;
|
|
31742
31744
|
case S_ATTR_END: errorHandler.warning("attribute space is required\"" + attrName + "\"!!");
|
|
31743
31745
|
case S_TAG_SPACE:
|
|
31744
31746
|
s$1 = S_ATTR;
|
|
31745
|
-
start = p$
|
|
31747
|
+
start = p$16;
|
|
31746
31748
|
break;
|
|
31747
31749
|
case S_EQ:
|
|
31748
31750
|
s$1 = S_ATTR_NOQUOT_VALUE;
|
|
31749
|
-
start = p$
|
|
31751
|
+
start = p$16;
|
|
31750
31752
|
break;
|
|
31751
31753
|
case S_TAG_CLOSE: throw new Error("elements closed character '/' and '>' must be connected to");
|
|
31752
31754
|
}
|
|
31753
31755
|
}
|
|
31754
|
-
p$
|
|
31756
|
+
p$16++;
|
|
31755
31757
|
}
|
|
31756
31758
|
}
|
|
31757
31759
|
/**
|
|
@@ -33535,8 +33537,8 @@ var require_XcodeProject = /* @__PURE__ */ require_chunk.__commonJS({ "../../nod
|
|
|
33535
33537
|
const json$3 = __importStar$3(require_types());
|
|
33536
33538
|
const constants_1$2 = require_constants();
|
|
33537
33539
|
const debug$1 = require_src()("xcparse:model:XcodeProject");
|
|
33538
|
-
function uuidForPath(path$
|
|
33539
|
-
return "XX" + crypto_1.default.createHash("md5").update(path$
|
|
33540
|
+
function uuidForPath(path$28) {
|
|
33541
|
+
return "XX" + crypto_1.default.createHash("md5").update(path$28).digest("hex").toUpperCase().slice(0, 20) + "XX";
|
|
33540
33542
|
}
|
|
33541
33543
|
const KNOWN_ISA = {
|
|
33542
33544
|
[json$3.ISA.PBXBuildFile]: () => require_PBXBuildFile().PBXBuildFile,
|
|
@@ -33897,8 +33899,8 @@ var require_PBXFileReference = /* @__PURE__ */ require_chunk.__commonJS({ "../..
|
|
|
33897
33899
|
getProxyContainers() {
|
|
33898
33900
|
return Array.from(this.getXcodeProject().values()).filter((object) => PBXContainerItemProxy_1$1.PBXContainerItemProxy.is(object) && object.props.containerPortal.uuid === this.uuid);
|
|
33899
33901
|
}
|
|
33900
|
-
setPath(path$
|
|
33901
|
-
if (path$
|
|
33902
|
+
setPath(path$28) {
|
|
33903
|
+
if (path$28) setPathWithSourceTree(this, path$28, this.props.sourceTree);
|
|
33902
33904
|
else this.props.path = void 0;
|
|
33903
33905
|
}
|
|
33904
33906
|
getBuildFiles() {
|
|
@@ -34024,8 +34026,8 @@ var require_AbstractGroup = /* @__PURE__ */ require_chunk.__commonJS({ "../../no
|
|
|
34024
34026
|
* @return `PBXGroup` the group if found.
|
|
34025
34027
|
* @return `null` if the `path` could not be found and `shouldCreate` is `false`.
|
|
34026
34028
|
*/
|
|
34027
|
-
mkdir(path$
|
|
34028
|
-
let pathArr = typeof path$
|
|
34029
|
+
mkdir(path$28, { recursive } = {}) {
|
|
34030
|
+
let pathArr = typeof path$28 === "string" ? path$28.split("/") : path$28;
|
|
34029
34031
|
if (!pathArr.length) return this;
|
|
34030
34032
|
let childName = pathArr.shift();
|
|
34031
34033
|
let child = this.getChildGroups().find((c$1) => c$1.getDisplayName() === childName);
|
|
@@ -34033,7 +34035,7 @@ var require_AbstractGroup = /* @__PURE__ */ require_chunk.__commonJS({ "../../no
|
|
|
34033
34035
|
if (!recursive) return null;
|
|
34034
34036
|
child = this.createGroup({ path: childName });
|
|
34035
34037
|
}
|
|
34036
|
-
if (!path$
|
|
34038
|
+
if (!path$28.length) return child;
|
|
34037
34039
|
return child.mkdir(pathArr, { recursive });
|
|
34038
34040
|
}
|
|
34039
34041
|
getChildGroups() {
|
|
@@ -34043,9 +34045,9 @@ var require_AbstractGroup = /* @__PURE__ */ require_chunk.__commonJS({ "../../no
|
|
|
34043
34045
|
let prefix = "";
|
|
34044
34046
|
if (type$1 == "staticLibrary") prefix = "lib";
|
|
34045
34047
|
let extension = constants_1.PRODUCT_UTI_EXTENSIONS[type$1];
|
|
34046
|
-
let path$
|
|
34047
|
-
if (extension) path$
|
|
34048
|
-
let ref = newReference(this, path$
|
|
34048
|
+
let path$28 = `${prefix}${productBaseName}`;
|
|
34049
|
+
if (extension) path$28 += `.${extension}`;
|
|
34050
|
+
let ref = newReference(this, path$28, "BUILT_PRODUCTS_DIR");
|
|
34049
34051
|
ref.props.includeInIndex = 0;
|
|
34050
34052
|
ref.setExplicitFileType();
|
|
34051
34053
|
return ref;
|
|
@@ -34404,7 +34406,7 @@ var require_build = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
34404
34406
|
o$1[k2] = m$1[k];
|
|
34405
34407
|
}));
|
|
34406
34408
|
var __exportStar = exports && exports.__exportStar || function(m$1, exports$1) {
|
|
34407
|
-
for (var p$
|
|
34409
|
+
for (var p$16 in m$1) if (p$16 !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p$16)) __createBinding(exports$1, m$1, p$16);
|
|
34408
34410
|
};
|
|
34409
34411
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34410
34412
|
__exportStar(require_api(), exports);
|
|
@@ -34413,8 +34415,8 @@ var require_build = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
34413
34415
|
//#endregion
|
|
34414
34416
|
//#region src/utils/getIosAppTargetDirectoryName.ts
|
|
34415
34417
|
var import_build = /* @__PURE__ */ require_chunk.__toESM(require_build(), 1);
|
|
34416
|
-
var import_plist = /* @__PURE__ */ require_chunk.__toESM(
|
|
34417
|
-
var import_out$1 = /* @__PURE__ */ require_chunk.__toESM(
|
|
34418
|
+
var import_plist = /* @__PURE__ */ require_chunk.__toESM(require_keyGeneration.require_plist(), 1);
|
|
34419
|
+
var import_out$1 = /* @__PURE__ */ require_chunk.__toESM(require_keyGeneration.require_out(), 1);
|
|
34418
34420
|
const getIosAppTargetDirectoryName = () => {
|
|
34419
34421
|
const iosDirectory = path.default.join((0, __hot_updater_cli_tools.getCwd)(), "ios");
|
|
34420
34422
|
const [xcodeprojPath] = import_out$1.default.globSync("*.xcodeproj/project.pbxproj", {
|
|
@@ -34427,11 +34429,11 @@ const getIosAppTargetDirectoryName = () => {
|
|
|
34427
34429
|
|
|
34428
34430
|
//#endregion
|
|
34429
34431
|
//#region src/utils/version/getIOSVersion.ts
|
|
34430
|
-
var import_out = /* @__PURE__ */ require_chunk.__toESM(
|
|
34432
|
+
var import_out = /* @__PURE__ */ require_chunk.__toESM(require_keyGeneration.require_out(), 1);
|
|
34431
34433
|
var import_valid$3 = /* @__PURE__ */ require_chunk.__toESM(require_valid$2(), 1);
|
|
34432
|
-
const isFileExist = async (path$
|
|
34434
|
+
const isFileExist = async (path$28) => {
|
|
34433
34435
|
try {
|
|
34434
|
-
await fs_promises.default.access(path$
|
|
34436
|
+
await fs_promises.default.access(path$28);
|
|
34435
34437
|
return true;
|
|
34436
34438
|
} catch {
|
|
34437
34439
|
return false;
|
|
@@ -34517,12 +34519,12 @@ const nativeBuild = async (options) => {
|
|
|
34517
34519
|
};
|
|
34518
34520
|
if (config.updateStrategy === "fingerprint") {
|
|
34519
34521
|
const s$1 = __hot_updater_cli_tools.p.spinner();
|
|
34520
|
-
const localFingerprint = (await
|
|
34522
|
+
const localFingerprint = (await require_keyGeneration.readLocalFingerprint())?.[platform$2];
|
|
34521
34523
|
if (!localFingerprint) __hot_updater_cli_tools.p.log.warn(`Resolving fingerprint for ${platform$2} failed. Building native will generate it.`);
|
|
34522
34524
|
s$1.start(`Fingerprinting (${platform$2})`);
|
|
34523
|
-
const generatedFingerprint = (await
|
|
34525
|
+
const generatedFingerprint = (await require_keyGeneration.createAndInjectFingerprintFiles()).fingerprint[platform$2];
|
|
34524
34526
|
s$1.stop(`Fingerprint(${platform$2}): ${generatedFingerprint}`);
|
|
34525
|
-
if (!
|
|
34527
|
+
if (!require_keyGeneration.isFingerprintEquals(localFingerprint, generatedFingerprint)) __hot_updater_cli_tools.p.log.info(`${__hot_updater_cli_tools.colors.blue(`fingerprint.json, ${platform$2} fingerprint config files`)} have been changed.`);
|
|
34526
34528
|
target.fingerprintHash = generatedFingerprint.hash;
|
|
34527
34529
|
} else if (config.updateStrategy === "appVersion") {
|
|
34528
34530
|
const s$1 = __hot_updater_cli_tools.p.spinner();
|
|
@@ -35465,6 +35467,92 @@ const appendOutputDirectoryIntoGitignore = ({ cwd } = {}) => {
|
|
|
35465
35467
|
});
|
|
35466
35468
|
};
|
|
35467
35469
|
|
|
35470
|
+
//#endregion
|
|
35471
|
+
//#region src/utils/signing/bundleSigning.ts
|
|
35472
|
+
/**
|
|
35473
|
+
* Sign bundle fileHash with private key.
|
|
35474
|
+
* @param fileHash SHA-256 hash of bundle (hex string)
|
|
35475
|
+
* @param privateKeyPath Path to private key file
|
|
35476
|
+
* @returns Base64-encoded RSA-SHA256 signature
|
|
35477
|
+
*/
|
|
35478
|
+
async function signBundle(fileHash, privateKeyPath) {
|
|
35479
|
+
const privateKeyPEM = await require_keyGeneration.loadPrivateKey(privateKeyPath);
|
|
35480
|
+
const fileHashBuffer = Buffer.from(fileHash, "hex");
|
|
35481
|
+
const sign = node_crypto.default.createSign("RSA-SHA256");
|
|
35482
|
+
sign.update(fileHashBuffer);
|
|
35483
|
+
sign.end();
|
|
35484
|
+
return sign.sign(privateKeyPEM).toString("base64");
|
|
35485
|
+
}
|
|
35486
|
+
|
|
35487
|
+
//#endregion
|
|
35488
|
+
//#region src/utils/signing/validateSigningConfig.ts
|
|
35489
|
+
const ANDROID_KEY$1 = "hot_updater_public_key";
|
|
35490
|
+
const IOS_KEY$1 = "HOT_UPDATER_PUBLIC_KEY";
|
|
35491
|
+
/**
|
|
35492
|
+
* Validates signing configuration consistency between config file and native files.
|
|
35493
|
+
* Detects mismatches that would cause OTA updates to fail.
|
|
35494
|
+
*/
|
|
35495
|
+
async function validateSigningConfig(config) {
|
|
35496
|
+
const signingEnabled = config.signing?.enabled ?? false;
|
|
35497
|
+
const iosParser = new require_keyGeneration.IosConfigParser(config.platform.ios.infoPlistPaths);
|
|
35498
|
+
const androidParser = new require_keyGeneration.AndroidConfigParser(config.platform.android.stringResourcePaths);
|
|
35499
|
+
const [iosExists, androidExists] = await Promise.all([iosParser.exists(), androidParser.exists()]);
|
|
35500
|
+
const [iosResult, androidResult] = await Promise.all([iosExists ? iosParser.get(IOS_KEY$1) : Promise.resolve({
|
|
35501
|
+
value: null,
|
|
35502
|
+
paths: []
|
|
35503
|
+
}), androidExists ? androidParser.get(ANDROID_KEY$1) : Promise.resolve({
|
|
35504
|
+
value: null,
|
|
35505
|
+
paths: []
|
|
35506
|
+
})]);
|
|
35507
|
+
const issues = [];
|
|
35508
|
+
if (signingEnabled) {
|
|
35509
|
+
if (!iosResult.value && iosExists) issues.push({
|
|
35510
|
+
type: "error",
|
|
35511
|
+
platform: "ios",
|
|
35512
|
+
code: "MISSING_PUBLIC_KEY",
|
|
35513
|
+
message: "Signing is enabled but HOT_UPDATER_PUBLIC_KEY is missing from Info.plist",
|
|
35514
|
+
resolution: "Run `npx hot-updater keys export-public` to add the public key, then rebuild your iOS app."
|
|
35515
|
+
});
|
|
35516
|
+
if (!androidResult.value && androidExists) issues.push({
|
|
35517
|
+
type: "error",
|
|
35518
|
+
platform: "android",
|
|
35519
|
+
code: "MISSING_PUBLIC_KEY",
|
|
35520
|
+
message: "Signing is enabled but hot_updater_public_key is missing from strings.xml",
|
|
35521
|
+
resolution: "Run `npx hot-updater keys export-public` to add the public key, then rebuild your Android app."
|
|
35522
|
+
});
|
|
35523
|
+
} else {
|
|
35524
|
+
if (iosResult.value) issues.push({
|
|
35525
|
+
type: "warning",
|
|
35526
|
+
platform: "ios",
|
|
35527
|
+
code: "ORPHAN_PUBLIC_KEY",
|
|
35528
|
+
message: "Signing is disabled but HOT_UPDATER_PUBLIC_KEY exists in Info.plist. This will cause OTA updates to be rejected.",
|
|
35529
|
+
resolution: "Run `npx hot-updater keys remove` to remove public keys, or enable signing in hot-updater.config.ts"
|
|
35530
|
+
});
|
|
35531
|
+
if (androidResult.value) issues.push({
|
|
35532
|
+
type: "warning",
|
|
35533
|
+
platform: "android",
|
|
35534
|
+
code: "ORPHAN_PUBLIC_KEY",
|
|
35535
|
+
message: "Signing is disabled but hot_updater_public_key exists in strings.xml. This will cause OTA updates to be rejected.",
|
|
35536
|
+
resolution: "Run `npx hot-updater keys remove` to remove public keys, or enable signing in hot-updater.config.ts"
|
|
35537
|
+
});
|
|
35538
|
+
}
|
|
35539
|
+
return {
|
|
35540
|
+
isValid: issues.filter((i$1) => i$1.type === "error").length === 0,
|
|
35541
|
+
signingEnabled,
|
|
35542
|
+
nativePublicKeys: {
|
|
35543
|
+
ios: {
|
|
35544
|
+
exists: !!iosResult.value,
|
|
35545
|
+
paths: iosResult.paths
|
|
35546
|
+
},
|
|
35547
|
+
android: {
|
|
35548
|
+
exists: !!androidResult.value,
|
|
35549
|
+
paths: androidResult.paths
|
|
35550
|
+
}
|
|
35551
|
+
},
|
|
35552
|
+
issues
|
|
35553
|
+
};
|
|
35554
|
+
}
|
|
35555
|
+
|
|
35468
35556
|
//#endregion
|
|
35469
35557
|
//#region src/utils/version/getDefaultTargetAppVersion.ts
|
|
35470
35558
|
var import_valid$2 = /* @__PURE__ */ require_chunk.__toESM(require_valid$2(), 1);
|
|
@@ -35484,6 +35572,64 @@ const getDefaultTargetAppVersion = async (platform$2) => {
|
|
|
35484
35572
|
return version$1;
|
|
35485
35573
|
};
|
|
35486
35574
|
|
|
35575
|
+
//#endregion
|
|
35576
|
+
//#region src/signedHashUtils.ts
|
|
35577
|
+
/**
|
|
35578
|
+
* Utilities for handling signed file hashes in Hot Updater.
|
|
35579
|
+
*
|
|
35580
|
+
* The signed hash format uses a simple prefix to indicate signing:
|
|
35581
|
+
* - Signed: `sig:<base64_signature>`
|
|
35582
|
+
* - Unsigned: `<hex_hash>` (plain SHA256)
|
|
35583
|
+
*
|
|
35584
|
+
* Signature verification implicitly verifies hash integrity,
|
|
35585
|
+
* so we only need to store the signature for signed bundles.
|
|
35586
|
+
*
|
|
35587
|
+
* @module signedHashUtils
|
|
35588
|
+
*/
|
|
35589
|
+
/**
|
|
35590
|
+
* Prefix indicating a signed file hash.
|
|
35591
|
+
* @example "sig:MEUCIQDx..."
|
|
35592
|
+
*/
|
|
35593
|
+
const SIGNED_HASH_PREFIX = "sig:";
|
|
35594
|
+
/**
|
|
35595
|
+
* Custom error class for signed hash format errors.
|
|
35596
|
+
*/
|
|
35597
|
+
var SignedHashFormatError = class extends Error {
|
|
35598
|
+
/**
|
|
35599
|
+
* Creates a new SignedHashFormatError.
|
|
35600
|
+
*
|
|
35601
|
+
* @param message - Description of the format error
|
|
35602
|
+
* @param input - The malformed input string that caused the error
|
|
35603
|
+
*/
|
|
35604
|
+
constructor(message, input) {
|
|
35605
|
+
super(message);
|
|
35606
|
+
this.input = input;
|
|
35607
|
+
this.name = "SignedHashFormatError";
|
|
35608
|
+
}
|
|
35609
|
+
};
|
|
35610
|
+
/**
|
|
35611
|
+
* Creates a signed file hash from a signature.
|
|
35612
|
+
*
|
|
35613
|
+
* The format is: `sig:<base64_signature>`
|
|
35614
|
+
*
|
|
35615
|
+
* Note: The hash is not stored because signature verification
|
|
35616
|
+
* implicitly verifies the hash (the signature is computed over the hash).
|
|
35617
|
+
*
|
|
35618
|
+
* @param signature - The Base64-encoded RSA-SHA256 signature
|
|
35619
|
+
* @returns The signed file hash string
|
|
35620
|
+
* @throws {SignedHashFormatError} If the signature is empty
|
|
35621
|
+
*
|
|
35622
|
+
* @example
|
|
35623
|
+
* ```typescript
|
|
35624
|
+
* const signedHash = createSignedFileHash("MEUCIQDx...");
|
|
35625
|
+
* // Returns: "sig:MEUCIQDx..."
|
|
35626
|
+
* ```
|
|
35627
|
+
*/
|
|
35628
|
+
function createSignedFileHash(signature) {
|
|
35629
|
+
if (!signature || signature.trim().length === 0) throw new SignedHashFormatError("Invalid signature: signature cannot be empty", signature ?? "");
|
|
35630
|
+
return `${SIGNED_HASH_PREFIX}${signature}`;
|
|
35631
|
+
}
|
|
35632
|
+
|
|
35487
35633
|
//#endregion
|
|
35488
35634
|
//#region src/commands/deploy.ts
|
|
35489
35635
|
var import_valid$1 = /* @__PURE__ */ require_chunk.__toESM(require_valid$2(), 1);
|
|
@@ -35515,6 +35661,31 @@ const deploy = async (options) => {
|
|
|
35515
35661
|
console.error("No config found. Please run `hot-updater init` first.");
|
|
35516
35662
|
process.exit(1);
|
|
35517
35663
|
}
|
|
35664
|
+
const signingValidation = await validateSigningConfig(config);
|
|
35665
|
+
if (signingValidation.issues.length > 0) {
|
|
35666
|
+
const errors = signingValidation.issues.filter((i$1) => i$1.type === "error");
|
|
35667
|
+
const warnings = signingValidation.issues.filter((i$1) => i$1.type === "warning");
|
|
35668
|
+
if (errors.length > 0) {
|
|
35669
|
+
console.log("");
|
|
35670
|
+
__hot_updater_cli_tools.p.log.error("Signing configuration error:");
|
|
35671
|
+
for (const issue of errors) {
|
|
35672
|
+
__hot_updater_cli_tools.p.log.error(` ${issue.message}`);
|
|
35673
|
+
__hot_updater_cli_tools.p.log.info(` Resolution: ${issue.resolution}`);
|
|
35674
|
+
}
|
|
35675
|
+
console.log("");
|
|
35676
|
+
__hot_updater_cli_tools.p.log.error("Deployment blocked. Fix the signing configuration and try again.");
|
|
35677
|
+
process.exit(1);
|
|
35678
|
+
}
|
|
35679
|
+
if (warnings.length > 0) {
|
|
35680
|
+
console.log("");
|
|
35681
|
+
__hot_updater_cli_tools.p.log.warn("Signing configuration warning:");
|
|
35682
|
+
for (const warning of warnings) {
|
|
35683
|
+
__hot_updater_cli_tools.p.log.warn(` ${warning.message}`);
|
|
35684
|
+
__hot_updater_cli_tools.p.log.info(` Resolution: ${warning.resolution}`);
|
|
35685
|
+
}
|
|
35686
|
+
console.log("");
|
|
35687
|
+
}
|
|
35688
|
+
}
|
|
35518
35689
|
const target = {
|
|
35519
35690
|
appVersion: null,
|
|
35520
35691
|
fingerprintHash: null
|
|
@@ -35527,15 +35698,15 @@ const deploy = async (options) => {
|
|
|
35527
35698
|
s$1.stop("Fingerprint.json not found. Please run 'hot-updater fingerprint create' to update fingerprint.json", 1);
|
|
35528
35699
|
process.exit(1);
|
|
35529
35700
|
}
|
|
35530
|
-
const newFingerprint = await
|
|
35701
|
+
const newFingerprint = await require_keyGeneration.nativeFingerprint(cwd, {
|
|
35531
35702
|
platform: platform$2,
|
|
35532
35703
|
...config.fingerprint
|
|
35533
35704
|
});
|
|
35534
|
-
const projectFingerprint = await
|
|
35535
|
-
if (!
|
|
35705
|
+
const projectFingerprint = await require_keyGeneration.readLocalFingerprint();
|
|
35706
|
+
if (!require_keyGeneration.isFingerprintEquals(newFingerprint, projectFingerprint?.[platform$2])) {
|
|
35536
35707
|
s$1.stop("Fingerprint mismatch. 'hot-updater fingerprint create' to update fingerprint.json", 1);
|
|
35537
35708
|
if (projectFingerprint?.[platform$2]) try {
|
|
35538
|
-
|
|
35709
|
+
require_keyGeneration.showFingerprintDiff(await require_keyGeneration.getFingerprintDiff(projectFingerprint[platform$2], {
|
|
35539
35710
|
platform: platform$2,
|
|
35540
35711
|
...config.fingerprint
|
|
35541
35712
|
}), platform$2 === "ios" ? "iOS" : "Android");
|
|
@@ -35618,6 +35789,20 @@ const deploy = async (options) => {
|
|
|
35618
35789
|
}
|
|
35619
35790
|
bundleId = taskRef.buildResult.bundleId;
|
|
35620
35791
|
fileHash = await getFileHashFromFile(bundlePath);
|
|
35792
|
+
if (config.signing?.enabled) {
|
|
35793
|
+
if (!config.signing.privateKeyPath) throw new Error("privateKeyPath is required when signing is enabled. Please provide a valid path to your RSA private key in hot-updater.config.ts");
|
|
35794
|
+
const s$1 = __hot_updater_cli_tools.p.spinner();
|
|
35795
|
+
s$1.start("Signing bundle");
|
|
35796
|
+
try {
|
|
35797
|
+
fileHash = createSignedFileHash(await signBundle(fileHash, config.signing.privateKeyPath));
|
|
35798
|
+
s$1.stop("Bundle signed successfully");
|
|
35799
|
+
} catch (error) {
|
|
35800
|
+
s$1.stop("Failed to sign bundle", 1);
|
|
35801
|
+
__hot_updater_cli_tools.p.log.error(`Signing error: ${error.message}`);
|
|
35802
|
+
__hot_updater_cli_tools.p.log.error("Ensure private key path is correct and file has proper permissions");
|
|
35803
|
+
throw error;
|
|
35804
|
+
}
|
|
35805
|
+
}
|
|
35621
35806
|
__hot_updater_cli_tools.p.log.success(`Bundle stored at ${__hot_updater_cli_tools.colors.blueBright(path.default.relative(cwd, bundlePath))}`);
|
|
35622
35807
|
return `✅ Build Complete (${buildPlugin.name})`;
|
|
35623
35808
|
}
|
|
@@ -35919,21 +36104,21 @@ function merge(target, source) {
|
|
|
35919
36104
|
const DEFAULT_CHANNEL$1 = "production";
|
|
35920
36105
|
const setAndroidChannel = async (channel) => {
|
|
35921
36106
|
const customPaths = (await (0, __hot_updater_cli_tools.loadConfig)(null)).platform.android.stringResourcePaths;
|
|
35922
|
-
return await new
|
|
36107
|
+
return await new require_keyGeneration.AndroidConfigParser(customPaths).set("hot_updater_channel", channel);
|
|
35923
36108
|
};
|
|
35924
36109
|
const getAndroidChannel = async () => {
|
|
35925
36110
|
const customPaths = (await (0, __hot_updater_cli_tools.loadConfig)(null)).platform.android.stringResourcePaths;
|
|
35926
|
-
const androidParser = new
|
|
36111
|
+
const androidParser = new require_keyGeneration.AndroidConfigParser(customPaths);
|
|
35927
36112
|
if (!await androidParser.exists()) throw new Error("No Android strings.xml files found");
|
|
35928
36113
|
return merge({ value: DEFAULT_CHANNEL$1 }, await androidParser.get("hot_updater_channel"));
|
|
35929
36114
|
};
|
|
35930
36115
|
const setIosChannel = async (channel) => {
|
|
35931
36116
|
const customPaths = (await (0, __hot_updater_cli_tools.loadConfig)(null)).platform.ios.infoPlistPaths;
|
|
35932
|
-
return await new
|
|
36117
|
+
return await new require_keyGeneration.IosConfigParser(customPaths).set("HOT_UPDATER_CHANNEL", channel);
|
|
35933
36118
|
};
|
|
35934
36119
|
const getIosChannel = async () => {
|
|
35935
36120
|
const customPaths = (await (0, __hot_updater_cli_tools.loadConfig)(null)).platform.ios.infoPlistPaths;
|
|
35936
|
-
const iosParser = new
|
|
36121
|
+
const iosParser = new require_keyGeneration.IosConfigParser(customPaths);
|
|
35937
36122
|
if (!await iosParser.exists()) throw new Error("No iOS Info.plist files found");
|
|
35938
36123
|
return merge({ value: DEFAULT_CHANNEL$1 }, await iosParser.get("HOT_UPDATER_CHANNEL"));
|
|
35939
36124
|
};
|
|
@@ -35965,13 +36150,13 @@ const handleSetChannel = async (channel) => {
|
|
|
35965
36150
|
__hot_updater_cli_tools.p.log.success(`Set Android channel to: ${__hot_updater_cli_tools.colors.green(channel)}`);
|
|
35966
36151
|
if (androidPaths.length > 0) {
|
|
35967
36152
|
__hot_updater_cli_tools.p.log.info(__hot_updater_cli_tools.colors.bold("Changed Android paths:"));
|
|
35968
|
-
for (const path$
|
|
36153
|
+
for (const path$28 of androidPaths) __hot_updater_cli_tools.p.log.info(` ${__hot_updater_cli_tools.colors.green(path$28)}`);
|
|
35969
36154
|
}
|
|
35970
36155
|
const { paths: iosPaths } = await setChannel("ios", channel);
|
|
35971
36156
|
__hot_updater_cli_tools.p.log.success(`Set iOS channel to: ${__hot_updater_cli_tools.colors.green(channel)}`);
|
|
35972
36157
|
if (iosPaths.length > 0) {
|
|
35973
36158
|
__hot_updater_cli_tools.p.log.info(__hot_updater_cli_tools.colors.bold("Changed iOS paths:"));
|
|
35974
|
-
for (const path$
|
|
36159
|
+
for (const path$28 of iosPaths) __hot_updater_cli_tools.p.log.info(` ${__hot_updater_cli_tools.colors.green(path$28)}`);
|
|
35975
36160
|
}
|
|
35976
36161
|
__hot_updater_cli_tools.p.log.success("You need to rebuild the native app if the channel has changed.");
|
|
35977
36162
|
};
|
|
@@ -36704,7 +36889,7 @@ const handleDoctor = async ({ fix }) => {
|
|
|
36704
36889
|
const handleFingerprint = async () => {
|
|
36705
36890
|
const s$1 = __hot_updater_cli_tools.p.spinner();
|
|
36706
36891
|
s$1.start("Generating fingerprints");
|
|
36707
|
-
const fingerPrintRef = await
|
|
36892
|
+
const fingerPrintRef = await require_keyGeneration.generateFingerprints();
|
|
36708
36893
|
s$1.stop(`Fingerprint generated. iOS: ${fingerPrintRef.ios.hash}, Android: ${fingerPrintRef.android.hash}`);
|
|
36709
36894
|
const localFingerprintPath = path.default.join((0, __hot_updater_cli_tools.getCwd)(), "fingerprint.json");
|
|
36710
36895
|
if (!fs.default.existsSync(localFingerprintPath)) return;
|
|
@@ -36714,7 +36899,7 @@ const handleFingerprint = async () => {
|
|
|
36714
36899
|
if (localFingerprint.ios.hash !== fingerPrintRef.ios?.hash) {
|
|
36715
36900
|
__hot_updater_cli_tools.p.log.error("iOS fingerprint mismatch. Please update using 'hot-updater fingerprint create' command.");
|
|
36716
36901
|
try {
|
|
36717
|
-
|
|
36902
|
+
require_keyGeneration.showFingerprintDiff(await require_keyGeneration.getFingerprintDiff(localFingerprint.ios, {
|
|
36718
36903
|
platform: "ios",
|
|
36719
36904
|
...fingerprintConfig
|
|
36720
36905
|
}), "iOS");
|
|
@@ -36726,7 +36911,7 @@ const handleFingerprint = async () => {
|
|
|
36726
36911
|
if (localFingerprint.android.hash !== fingerPrintRef.android?.hash) {
|
|
36727
36912
|
__hot_updater_cli_tools.p.log.error("Android fingerprint mismatch. Please update using 'hot-updater fingerprint create' command.");
|
|
36728
36913
|
try {
|
|
36729
|
-
|
|
36914
|
+
require_keyGeneration.showFingerprintDiff(await require_keyGeneration.getFingerprintDiff(localFingerprint.android, {
|
|
36730
36915
|
platform: "android",
|
|
36731
36916
|
...fingerprintConfig
|
|
36732
36917
|
}), "Android");
|
|
@@ -36744,9 +36929,9 @@ const handleCreateFingerprint = async () => {
|
|
|
36744
36929
|
const s$1 = __hot_updater_cli_tools.p.spinner();
|
|
36745
36930
|
s$1.start("Creating fingerprint.json");
|
|
36746
36931
|
try {
|
|
36747
|
-
localFingerprint = await
|
|
36748
|
-
result = await
|
|
36749
|
-
if (!
|
|
36932
|
+
localFingerprint = await require_keyGeneration.readLocalFingerprint();
|
|
36933
|
+
result = await require_keyGeneration.createAndInjectFingerprintFiles();
|
|
36934
|
+
if (!require_keyGeneration.isFingerprintEquals(localFingerprint, result.fingerprint)) diffChanged = true;
|
|
36750
36935
|
s$1.stop("Created fingerprint.json");
|
|
36751
36936
|
} catch (error) {
|
|
36752
36937
|
if (error instanceof Error) __hot_updater_cli_tools.p.log.error(error.message);
|
|
@@ -36756,21 +36941,21 @@ const handleCreateFingerprint = async () => {
|
|
|
36756
36941
|
if (diffChanged && result) {
|
|
36757
36942
|
if (result.androidPaths.length > 0) {
|
|
36758
36943
|
__hot_updater_cli_tools.p.log.info(__hot_updater_cli_tools.colors.bold("Changed Android paths:"));
|
|
36759
|
-
for (const path$
|
|
36944
|
+
for (const path$28 of result.androidPaths) __hot_updater_cli_tools.p.log.info(` ${__hot_updater_cli_tools.colors.green(path$28)}`);
|
|
36760
36945
|
}
|
|
36761
36946
|
if (result.iosPaths.length > 0) {
|
|
36762
36947
|
__hot_updater_cli_tools.p.log.info(__hot_updater_cli_tools.colors.bold("Changed iOS paths:"));
|
|
36763
|
-
for (const path$
|
|
36948
|
+
for (const path$28 of result.iosPaths) __hot_updater_cli_tools.p.log.info(` ${__hot_updater_cli_tools.colors.green(path$28)}`);
|
|
36764
36949
|
}
|
|
36765
36950
|
__hot_updater_cli_tools.p.log.success(__hot_updater_cli_tools.colors.bold(`${__hot_updater_cli_tools.colors.blue("fingerprint.json")} has changed, you need to rebuild the native app.`));
|
|
36766
36951
|
if (localFingerprint && result.fingerprint) {
|
|
36767
36952
|
const fingerprintConfig = (await (0, __hot_updater_cli_tools.loadConfig)(null)).fingerprint;
|
|
36768
36953
|
try {
|
|
36769
|
-
if (localFingerprint.ios && localFingerprint.ios.hash !== result.fingerprint.ios.hash)
|
|
36954
|
+
if (localFingerprint.ios && localFingerprint.ios.hash !== result.fingerprint.ios.hash) require_keyGeneration.showFingerprintDiff(await require_keyGeneration.getFingerprintDiff(localFingerprint.ios, {
|
|
36770
36955
|
platform: "ios",
|
|
36771
36956
|
...fingerprintConfig
|
|
36772
36957
|
}), "iOS");
|
|
36773
|
-
if (localFingerprint.android && localFingerprint.android.hash !== result.fingerprint.android.hash)
|
|
36958
|
+
if (localFingerprint.android && localFingerprint.android.hash !== result.fingerprint.android.hash) require_keyGeneration.showFingerprintDiff(await require_keyGeneration.getFingerprintDiff(localFingerprint.android, {
|
|
36774
36959
|
platform: "android",
|
|
36775
36960
|
...fingerprintConfig
|
|
36776
36961
|
}), "Android");
|
|
@@ -37295,6 +37480,323 @@ async function generateStandaloneSQL(options) {
|
|
|
37295
37480
|
}
|
|
37296
37481
|
}
|
|
37297
37482
|
|
|
37483
|
+
//#endregion
|
|
37484
|
+
//#region src/commands/keys.ts
|
|
37485
|
+
const ANDROID_KEY = "hot_updater_public_key";
|
|
37486
|
+
const IOS_KEY = "HOT_UPDATER_PUBLIC_KEY";
|
|
37487
|
+
/**
|
|
37488
|
+
* Generate RSA key pair for code signing.
|
|
37489
|
+
* Usage: npx hot-updater keys:generate [--output ./keys] [--key-size 4096]
|
|
37490
|
+
*/
|
|
37491
|
+
const keysGenerate = async (options = {}) => {
|
|
37492
|
+
const cwd = (0, __hot_updater_cli_tools.getCwd)();
|
|
37493
|
+
const outputDir = options.output ? node_path.default.isAbsolute(options.output) ? options.output : node_path.default.join(cwd, options.output) : node_path.default.join(cwd, "keys");
|
|
37494
|
+
const keySize = options.keySize ?? 4096;
|
|
37495
|
+
__hot_updater_cli_tools.p.log.info(`Generating ${keySize}-bit RSA key pair...`);
|
|
37496
|
+
const spinner = __hot_updater_cli_tools.p.spinner();
|
|
37497
|
+
spinner.start("Generating keys");
|
|
37498
|
+
try {
|
|
37499
|
+
await require_keyGeneration.saveKeyPair(await require_keyGeneration.generateKeyPair(keySize), outputDir);
|
|
37500
|
+
spinner.stop("Keys generated successfully");
|
|
37501
|
+
__hot_updater_cli_tools.p.log.success(`Private key: ${node_path.default.join(outputDir, "private-key.pem")}`);
|
|
37502
|
+
__hot_updater_cli_tools.p.log.success(`Public key: ${node_path.default.join(outputDir, "public-key.pem")}`);
|
|
37503
|
+
const keysDir = node_path.default.basename(outputDir);
|
|
37504
|
+
if (appendToProjectRootGitignore({
|
|
37505
|
+
cwd,
|
|
37506
|
+
globLines: [`${keysDir}/`]
|
|
37507
|
+
})) __hot_updater_cli_tools.p.log.success(`Added ${keysDir}/ to .gitignore`);
|
|
37508
|
+
console.log("");
|
|
37509
|
+
__hot_updater_cli_tools.p.log.warn("⚠️ Keep private key secure!");
|
|
37510
|
+
__hot_updater_cli_tools.p.log.warn(" - Use secure storage for CI/CD (AWS Secrets Manager, etc.)");
|
|
37511
|
+
console.log("");
|
|
37512
|
+
__hot_updater_cli_tools.p.log.info("Next steps:");
|
|
37513
|
+
__hot_updater_cli_tools.p.log.info("1. Add to hot-updater.config.ts:");
|
|
37514
|
+
__hot_updater_cli_tools.p.log.info(" signing: { enabled: true, privateKeyPath: \"./keys/private-key.pem\" }");
|
|
37515
|
+
__hot_updater_cli_tools.p.log.info("2. Run: npx hot-updater keys export-public");
|
|
37516
|
+
__hot_updater_cli_tools.p.log.info("3. Embed public key in iOS Info.plist and Android strings.xml");
|
|
37517
|
+
__hot_updater_cli_tools.p.log.info("4. Rebuild native app");
|
|
37518
|
+
} catch (error) {
|
|
37519
|
+
spinner.stop("Failed to generate keys", 1);
|
|
37520
|
+
__hot_updater_cli_tools.p.log.error(error.message);
|
|
37521
|
+
process.exit(1);
|
|
37522
|
+
}
|
|
37523
|
+
};
|
|
37524
|
+
async function writePublicKeyToAndroid(publicKey, customPaths) {
|
|
37525
|
+
try {
|
|
37526
|
+
const androidParser = new require_keyGeneration.AndroidConfigParser(customPaths);
|
|
37527
|
+
if (!await androidParser.exists()) return {
|
|
37528
|
+
platform: "android",
|
|
37529
|
+
paths: [],
|
|
37530
|
+
success: false,
|
|
37531
|
+
error: "No strings.xml files found"
|
|
37532
|
+
};
|
|
37533
|
+
return {
|
|
37534
|
+
platform: "android",
|
|
37535
|
+
paths: (await androidParser.set(ANDROID_KEY, publicKey)).paths,
|
|
37536
|
+
success: true
|
|
37537
|
+
};
|
|
37538
|
+
} catch (error) {
|
|
37539
|
+
return {
|
|
37540
|
+
platform: "android",
|
|
37541
|
+
paths: [],
|
|
37542
|
+
success: false,
|
|
37543
|
+
error: error.message
|
|
37544
|
+
};
|
|
37545
|
+
}
|
|
37546
|
+
}
|
|
37547
|
+
async function writePublicKeyToIos(publicKey, customPaths) {
|
|
37548
|
+
try {
|
|
37549
|
+
const iosParser = new require_keyGeneration.IosConfigParser(customPaths);
|
|
37550
|
+
if (!await iosParser.exists()) return {
|
|
37551
|
+
platform: "ios",
|
|
37552
|
+
paths: [],
|
|
37553
|
+
success: false,
|
|
37554
|
+
error: "No Info.plist files found"
|
|
37555
|
+
};
|
|
37556
|
+
return {
|
|
37557
|
+
platform: "ios",
|
|
37558
|
+
paths: (await iosParser.set(IOS_KEY, publicKey)).paths,
|
|
37559
|
+
success: true
|
|
37560
|
+
};
|
|
37561
|
+
} catch (error) {
|
|
37562
|
+
return {
|
|
37563
|
+
platform: "ios",
|
|
37564
|
+
paths: [],
|
|
37565
|
+
success: false,
|
|
37566
|
+
error: error.message
|
|
37567
|
+
};
|
|
37568
|
+
}
|
|
37569
|
+
}
|
|
37570
|
+
function printPublicKeyInstructions(publicKeyPEM) {
|
|
37571
|
+
console.log("");
|
|
37572
|
+
console.log(__hot_updater_cli_tools.colors.cyan("═══════════════════════════════════════════════════════"));
|
|
37573
|
+
console.log(__hot_updater_cli_tools.colors.cyan("Public Key (embed in native configuration)"));
|
|
37574
|
+
console.log(__hot_updater_cli_tools.colors.cyan("═══════════════════════════════════════════════════════"));
|
|
37575
|
+
console.log("");
|
|
37576
|
+
console.log(publicKeyPEM);
|
|
37577
|
+
console.log("");
|
|
37578
|
+
console.log(__hot_updater_cli_tools.colors.yellow("iOS Configuration (Info.plist):"));
|
|
37579
|
+
console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
|
|
37580
|
+
console.log("<key>HOT_UPDATER_PUBLIC_KEY</key>");
|
|
37581
|
+
console.log(`<string>${publicKeyPEM.trim().replace(/\n/g, "\\n")}</string>`);
|
|
37582
|
+
console.log("");
|
|
37583
|
+
console.log(__hot_updater_cli_tools.colors.yellow("Android Configuration (res/values/strings.xml):"));
|
|
37584
|
+
console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
|
|
37585
|
+
console.log("<string name=\"hot_updater_public_key\">");
|
|
37586
|
+
console.log(publicKeyPEM.trim());
|
|
37587
|
+
console.log("</string>");
|
|
37588
|
+
console.log("");
|
|
37589
|
+
console.log(__hot_updater_cli_tools.colors.cyan("═══════════════════════════════════════════════════════"));
|
|
37590
|
+
}
|
|
37591
|
+
/**
|
|
37592
|
+
* Export public key for embedding in native configuration.
|
|
37593
|
+
* By default, writes the public key to iOS Info.plist and Android strings.xml.
|
|
37594
|
+
* Use --print-only to only display the key without modifying files.
|
|
37595
|
+
*
|
|
37596
|
+
* The private key path is read from hot-updater.config.ts (signing.privateKeyPath)
|
|
37597
|
+
* unless overridden with --input.
|
|
37598
|
+
*
|
|
37599
|
+
* Usage: npx hot-updater keys export-public [--input ./keys/private-key.pem] [--print-only] [--yes]
|
|
37600
|
+
*/
|
|
37601
|
+
const keysExportPublic = async (options = {}) => {
|
|
37602
|
+
const cwd = (0, __hot_updater_cli_tools.getCwd)();
|
|
37603
|
+
const config = await (0, __hot_updater_cli_tools.loadConfig)(null);
|
|
37604
|
+
const configPrivateKeyPath = config.signing?.privateKeyPath;
|
|
37605
|
+
let privateKeyPath;
|
|
37606
|
+
if (options.input) privateKeyPath = node_path.default.isAbsolute(options.input) ? options.input : node_path.default.join(cwd, options.input);
|
|
37607
|
+
else if (configPrivateKeyPath) privateKeyPath = node_path.default.isAbsolute(configPrivateKeyPath) ? configPrivateKeyPath : node_path.default.join(cwd, configPrivateKeyPath);
|
|
37608
|
+
else privateKeyPath = node_path.default.join(cwd, "keys", "private-key.pem");
|
|
37609
|
+
try {
|
|
37610
|
+
const publicKeyPEM = require_keyGeneration.getPublicKeyFromPrivate(await require_keyGeneration.loadPrivateKey(privateKeyPath));
|
|
37611
|
+
if (options.printOnly) {
|
|
37612
|
+
printPublicKeyInstructions(publicKeyPEM);
|
|
37613
|
+
return;
|
|
37614
|
+
}
|
|
37615
|
+
__hot_updater_cli_tools.p.log.info("Preparing to write public key to native configuration files...");
|
|
37616
|
+
const androidParser = new require_keyGeneration.AndroidConfigParser(config.platform.android.stringResourcePaths);
|
|
37617
|
+
const iosParser = new require_keyGeneration.IosConfigParser(config.platform.ios.infoPlistPaths);
|
|
37618
|
+
const androidExists = await androidParser.exists();
|
|
37619
|
+
const iosExists = await iosParser.exists();
|
|
37620
|
+
if (!androidExists && !iosExists) {
|
|
37621
|
+
__hot_updater_cli_tools.p.log.error("No native configuration files found.");
|
|
37622
|
+
__hot_updater_cli_tools.p.log.info("Tip: Use --print-only to display the key for manual configuration.");
|
|
37623
|
+
process.exit(1);
|
|
37624
|
+
}
|
|
37625
|
+
console.log("");
|
|
37626
|
+
__hot_updater_cli_tools.p.log.step("Files to be updated:");
|
|
37627
|
+
if (androidExists) {
|
|
37628
|
+
const androidPaths = config.platform.android.stringResourcePaths;
|
|
37629
|
+
if (androidPaths.length === 1) __hot_updater_cli_tools.p.log.info(` Android: ${androidPaths[0]} (${ANDROID_KEY})`);
|
|
37630
|
+
else {
|
|
37631
|
+
__hot_updater_cli_tools.p.log.info(` Android (${ANDROID_KEY}):`);
|
|
37632
|
+
for (const androidPath of androidPaths) __hot_updater_cli_tools.p.log.info(` - ${androidPath}`);
|
|
37633
|
+
}
|
|
37634
|
+
}
|
|
37635
|
+
if (iosExists) {
|
|
37636
|
+
const iosPaths = config.platform.ios.infoPlistPaths;
|
|
37637
|
+
if (iosPaths.length === 1) __hot_updater_cli_tools.p.log.info(` iOS: ${iosPaths[0]} (${IOS_KEY})`);
|
|
37638
|
+
else {
|
|
37639
|
+
__hot_updater_cli_tools.p.log.info(` iOS (${IOS_KEY}):`);
|
|
37640
|
+
for (const iosPath of iosPaths) __hot_updater_cli_tools.p.log.info(` - ${iosPath}`);
|
|
37641
|
+
}
|
|
37642
|
+
}
|
|
37643
|
+
console.log("");
|
|
37644
|
+
if (!options.yes) {
|
|
37645
|
+
const shouldContinue = await __hot_updater_cli_tools.p.confirm({
|
|
37646
|
+
message: "Write public key to native files?",
|
|
37647
|
+
initialValue: true
|
|
37648
|
+
});
|
|
37649
|
+
if (__hot_updater_cli_tools.p.isCancel(shouldContinue) || !shouldContinue) {
|
|
37650
|
+
__hot_updater_cli_tools.p.cancel("Operation cancelled");
|
|
37651
|
+
process.exit(0);
|
|
37652
|
+
}
|
|
37653
|
+
}
|
|
37654
|
+
const results = [];
|
|
37655
|
+
if (androidExists) results.push(await writePublicKeyToAndroid(publicKeyPEM.trim(), config.platform.android.stringResourcePaths));
|
|
37656
|
+
if (iosExists) results.push(await writePublicKeyToIos(publicKeyPEM.trim(), config.platform.ios.infoPlistPaths));
|
|
37657
|
+
console.log("");
|
|
37658
|
+
for (const result of results) if (result.success) __hot_updater_cli_tools.p.log.success(`${result.platform}: Updated ${result.paths.join(", ")}`);
|
|
37659
|
+
else __hot_updater_cli_tools.p.log.error(`${result.platform}: ${result.error}`);
|
|
37660
|
+
const successCount = results.filter((r) => r.success).length;
|
|
37661
|
+
console.log("");
|
|
37662
|
+
if (successCount === results.length) {
|
|
37663
|
+
__hot_updater_cli_tools.p.log.success("Public key written to all native files!");
|
|
37664
|
+
__hot_updater_cli_tools.p.log.info("Next step: Rebuild your native app to apply the changes.");
|
|
37665
|
+
} else if (successCount > 0) __hot_updater_cli_tools.p.log.warn("Public key written to some files. Check errors above.");
|
|
37666
|
+
else {
|
|
37667
|
+
__hot_updater_cli_tools.p.log.error("Failed to write public key to any native files.");
|
|
37668
|
+
process.exit(1);
|
|
37669
|
+
}
|
|
37670
|
+
} catch (error) {
|
|
37671
|
+
__hot_updater_cli_tools.p.log.error(`Failed to export public key: ${error.message}`);
|
|
37672
|
+
process.exit(1);
|
|
37673
|
+
}
|
|
37674
|
+
};
|
|
37675
|
+
async function removePublicKeyFromAndroid(customPaths) {
|
|
37676
|
+
try {
|
|
37677
|
+
const androidParser = new require_keyGeneration.AndroidConfigParser(customPaths);
|
|
37678
|
+
if (!await androidParser.exists()) return {
|
|
37679
|
+
platform: "android",
|
|
37680
|
+
paths: [],
|
|
37681
|
+
success: true,
|
|
37682
|
+
found: false
|
|
37683
|
+
};
|
|
37684
|
+
const existing = await androidParser.get(ANDROID_KEY);
|
|
37685
|
+
if (!existing.value) return {
|
|
37686
|
+
platform: "android",
|
|
37687
|
+
paths: existing.paths,
|
|
37688
|
+
success: true,
|
|
37689
|
+
found: false
|
|
37690
|
+
};
|
|
37691
|
+
return {
|
|
37692
|
+
platform: "android",
|
|
37693
|
+
paths: (await androidParser.remove(ANDROID_KEY)).paths,
|
|
37694
|
+
success: true,
|
|
37695
|
+
found: true
|
|
37696
|
+
};
|
|
37697
|
+
} catch (error) {
|
|
37698
|
+
return {
|
|
37699
|
+
platform: "android",
|
|
37700
|
+
paths: [],
|
|
37701
|
+
success: false,
|
|
37702
|
+
found: true,
|
|
37703
|
+
error: error.message
|
|
37704
|
+
};
|
|
37705
|
+
}
|
|
37706
|
+
}
|
|
37707
|
+
async function removePublicKeyFromIos(customPaths) {
|
|
37708
|
+
try {
|
|
37709
|
+
const iosParser = new require_keyGeneration.IosConfigParser(customPaths);
|
|
37710
|
+
if (!await iosParser.exists()) return {
|
|
37711
|
+
platform: "ios",
|
|
37712
|
+
paths: [],
|
|
37713
|
+
success: true,
|
|
37714
|
+
found: false
|
|
37715
|
+
};
|
|
37716
|
+
const existing = await iosParser.get(IOS_KEY);
|
|
37717
|
+
if (!existing.value) return {
|
|
37718
|
+
platform: "ios",
|
|
37719
|
+
paths: existing.paths,
|
|
37720
|
+
success: true,
|
|
37721
|
+
found: false
|
|
37722
|
+
};
|
|
37723
|
+
return {
|
|
37724
|
+
platform: "ios",
|
|
37725
|
+
paths: (await iosParser.remove(IOS_KEY)).paths,
|
|
37726
|
+
success: true,
|
|
37727
|
+
found: true
|
|
37728
|
+
};
|
|
37729
|
+
} catch (error) {
|
|
37730
|
+
return {
|
|
37731
|
+
platform: "ios",
|
|
37732
|
+
paths: [],
|
|
37733
|
+
success: false,
|
|
37734
|
+
found: true,
|
|
37735
|
+
error: error.message
|
|
37736
|
+
};
|
|
37737
|
+
}
|
|
37738
|
+
}
|
|
37739
|
+
/**
|
|
37740
|
+
* Remove public keys from native configuration files.
|
|
37741
|
+
* Automatically detects and removes keys from both iOS and Android.
|
|
37742
|
+
*
|
|
37743
|
+
* Usage: npx hot-updater keys remove [--yes]
|
|
37744
|
+
*/
|
|
37745
|
+
const keysRemove = async (options = {}) => {
|
|
37746
|
+
const config = await (0, __hot_updater_cli_tools.loadConfig)(null);
|
|
37747
|
+
const androidParser = new require_keyGeneration.AndroidConfigParser(config.platform.android.stringResourcePaths);
|
|
37748
|
+
const iosParser = new require_keyGeneration.IosConfigParser(config.platform.ios.infoPlistPaths);
|
|
37749
|
+
const [androidExists, iosExists] = await Promise.all([androidParser.exists(), iosParser.exists()]);
|
|
37750
|
+
if (!androidExists && !iosExists) {
|
|
37751
|
+
__hot_updater_cli_tools.p.log.info("No native configuration files found.");
|
|
37752
|
+
return;
|
|
37753
|
+
}
|
|
37754
|
+
const [androidKey, iosKey] = await Promise.all([androidExists ? androidParser.get(ANDROID_KEY) : Promise.resolve({
|
|
37755
|
+
value: null,
|
|
37756
|
+
paths: []
|
|
37757
|
+
}), iosExists ? iosParser.get(IOS_KEY) : Promise.resolve({
|
|
37758
|
+
value: null,
|
|
37759
|
+
paths: []
|
|
37760
|
+
})]);
|
|
37761
|
+
const foundKeys = [];
|
|
37762
|
+
if (iosKey.value) foundKeys.push(`iOS: ${iosKey.paths.join(", ")}`);
|
|
37763
|
+
if (androidKey.value) foundKeys.push(`Android: ${androidKey.paths.join(", ")}`);
|
|
37764
|
+
if (foundKeys.length === 0) {
|
|
37765
|
+
__hot_updater_cli_tools.p.log.info("No public keys found in native files.");
|
|
37766
|
+
return;
|
|
37767
|
+
}
|
|
37768
|
+
console.log("");
|
|
37769
|
+
__hot_updater_cli_tools.p.log.step("Found public keys in:");
|
|
37770
|
+
for (const key of foundKeys) __hot_updater_cli_tools.p.log.info(` • ${key}`);
|
|
37771
|
+
console.log("");
|
|
37772
|
+
if (!options.yes) {
|
|
37773
|
+
const shouldContinue = await __hot_updater_cli_tools.p.confirm({
|
|
37774
|
+
message: "Remove public keys from these files?",
|
|
37775
|
+
initialValue: false
|
|
37776
|
+
});
|
|
37777
|
+
if (__hot_updater_cli_tools.p.isCancel(shouldContinue) || !shouldContinue) {
|
|
37778
|
+
__hot_updater_cli_tools.p.cancel("Operation cancelled");
|
|
37779
|
+
return;
|
|
37780
|
+
}
|
|
37781
|
+
}
|
|
37782
|
+
const results = [];
|
|
37783
|
+
if (iosKey.value) results.push(await removePublicKeyFromIos(config.platform.ios.infoPlistPaths));
|
|
37784
|
+
if (androidKey.value) results.push(await removePublicKeyFromAndroid(config.platform.android.stringResourcePaths));
|
|
37785
|
+
console.log("");
|
|
37786
|
+
for (const result of results) if (result.success && result.found) __hot_updater_cli_tools.p.log.success(`Removed ${result.platform === "ios" ? IOS_KEY : ANDROID_KEY} from ${result.paths.join(", ")}`);
|
|
37787
|
+
else if (!result.success) __hot_updater_cli_tools.p.log.error(`${result.platform}: ${result.error}`);
|
|
37788
|
+
const successCount = results.filter((r) => r.success && r.found).length;
|
|
37789
|
+
console.log("");
|
|
37790
|
+
if (successCount > 0) {
|
|
37791
|
+
__hot_updater_cli_tools.p.log.success("Public keys removed from native files!");
|
|
37792
|
+
console.log("");
|
|
37793
|
+
__hot_updater_cli_tools.p.log.info("Next steps:");
|
|
37794
|
+
__hot_updater_cli_tools.p.log.info(" 1. Rebuild your native apps");
|
|
37795
|
+
__hot_updater_cli_tools.p.log.info(" 2. Release to app stores");
|
|
37796
|
+
__hot_updater_cli_tools.p.log.info(" 3. Deploy unsigned bundles with `npx hot-updater deploy`");
|
|
37797
|
+
}
|
|
37798
|
+
};
|
|
37799
|
+
|
|
37298
37800
|
//#endregion
|
|
37299
37801
|
//#region src/commands/migrate.ts
|
|
37300
37802
|
/**
|
|
@@ -37476,6 +37978,17 @@ fingerprintCommand.command("create").description("Create fingerprint").action(ha
|
|
|
37476
37978
|
const channelCommand = program.command("channel").description("Manage channels");
|
|
37477
37979
|
channelCommand.action(handleChannel);
|
|
37478
37980
|
channelCommand.command("set").description("Set the channel for Android (BuildConfig) and iOS (Info.plist)").argument("<channel>", "the channel to set").action(handleSetChannel);
|
|
37981
|
+
const keysCommand = program.command("keys").description("Code signing key management");
|
|
37982
|
+
keysCommand.command("generate").description("Generate RSA key pair for code signing").option("-o, --output <dir>", "output directory for keys", "./keys").option("-k, --key-size <size>", "key size (2048 or 4096)", (value) => {
|
|
37983
|
+
const size = Number.parseInt(value, 10);
|
|
37984
|
+
if (size !== 2048 && size !== 4096) {
|
|
37985
|
+
__hot_updater_cli_tools.p.log.error("Key size must be 2048 or 4096");
|
|
37986
|
+
process.exit(1);
|
|
37987
|
+
}
|
|
37988
|
+
return size;
|
|
37989
|
+
}, 4096).action(keysGenerate);
|
|
37990
|
+
keysCommand.command("export-public").description("Export public key for native configuration").option("-i, --input <path>", "path to private key file (default: from config signing.privateKeyPath in hot-updater.config.ts)").option("-p, --print-only", "only print the public key without writing to native files").option("-y, --yes", "skip confirmation prompt when writing to native files").action(keysExportPublic);
|
|
37991
|
+
keysCommand.command("remove").description("Remove public keys from native configuration files").option("-y, --yes", "skip confirmation prompt").action(keysRemove);
|
|
37479
37992
|
program.command("deploy").description("deploy a new version").addOption(platformCommandOption).addOption(new Option("-t, --target-app-version <targetAppVersion>", "specify the target app version (semver format e.g. 1.0.0, 1.x.x)").argParser((value) => {
|
|
37480
37993
|
if (!(0, import_valid.default)(value)) {
|
|
37481
37994
|
__hot_updater_cli_tools.p.log.error("Invalid semver format (e.g. 1.0.0, 1.x.x)");
|