@php-wasm/xdebug-bridge 2.0.16 → 2.0.18
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/cli.cjs +1 -1
- package/cli.js +1 -1
- package/index.cjs +1 -1
- package/index.js +1 -1
- package/package.json +6 -6
- package/{run-cli-Csc9FNng.cjs → run-cli-Bk1CbeEI.cjs} +18 -18
- package/{run-cli-DZhYJb5j.js → run-cli-DSVIAiTE.js} +129 -128
|
@@ -5,7 +5,8 @@ import { format as Wi, inspect as Cs } from "util";
|
|
|
5
5
|
import { fileURLToPath as Is } from "url";
|
|
6
6
|
import { WebSocketServer as Ds } from "ws";
|
|
7
7
|
import Ts from "net";
|
|
8
|
-
import vs from "
|
|
8
|
+
import { createHash as vs } from "crypto";
|
|
9
|
+
import _s from "timers";
|
|
9
10
|
const qi = function() {
|
|
10
11
|
return typeof process < "u" && process.release?.name === "node" ? "NODE" : typeof window < "u" ? "WEB" : (
|
|
11
12
|
// @ts-ignore
|
|
@@ -74,16 +75,16 @@ if (qi === "NODE" && typeof CustomEvent > "u") {
|
|
|
74
75
|
}
|
|
75
76
|
globalThis.CustomEvent = a;
|
|
76
77
|
}
|
|
77
|
-
const
|
|
78
|
+
const Ns = "playground-log", mr = (a, ...t) => {
|
|
78
79
|
Pt.dispatchEvent(
|
|
79
|
-
new CustomEvent(
|
|
80
|
+
new CustomEvent(Ns, {
|
|
80
81
|
detail: {
|
|
81
82
|
log: a,
|
|
82
83
|
args: t
|
|
83
84
|
}
|
|
84
85
|
})
|
|
85
86
|
);
|
|
86
|
-
},
|
|
87
|
+
}, As = (a, ...t) => {
|
|
87
88
|
switch (typeof a.message == "string" ? Reflect.set(a, "message", Hn(a.message)) : a.message.message && typeof a.message.message == "string" && Reflect.set(
|
|
88
89
|
a.message,
|
|
89
90
|
"message",
|
|
@@ -107,15 +108,15 @@ const _s = "playground-log", mr = (a, ...t) => {
|
|
|
107
108
|
default:
|
|
108
109
|
console.log(a.message, ...t);
|
|
109
110
|
}
|
|
110
|
-
},
|
|
111
|
+
}, Ms = (a) => a instanceof Error ? [a.message, a.stack].join(`
|
|
111
112
|
`) : JSON.stringify(a, null, 2), Vi = [], gr = (a) => {
|
|
112
113
|
Vi.push(a);
|
|
113
114
|
}, Vn = (a) => {
|
|
114
115
|
if (a.raw === !0)
|
|
115
116
|
gr(a.message);
|
|
116
117
|
else {
|
|
117
|
-
const t =
|
|
118
|
-
typeof a.message == "object" ?
|
|
118
|
+
const t = Ss(
|
|
119
|
+
typeof a.message == "object" ? Ms(a.message) : a.message,
|
|
119
120
|
a.severity,
|
|
120
121
|
a.prefix ?? ue.JS
|
|
121
122
|
);
|
|
@@ -131,7 +132,7 @@ const _s = "playground-log", mr = (a, ...t) => {
|
|
|
131
132
|
}, ue = {
|
|
132
133
|
JS: "JavaScript"
|
|
133
134
|
};
|
|
134
|
-
class
|
|
135
|
+
class Ps extends EventTarget {
|
|
135
136
|
// constructor
|
|
136
137
|
constructor(t = []) {
|
|
137
138
|
super(), this.fatalErrorEvent = "playground-fatal-error", this.severity = xt.Info, this.handlers = t;
|
|
@@ -252,14 +253,14 @@ class Ms extends EventTarget {
|
|
|
252
253
|
);
|
|
253
254
|
}
|
|
254
255
|
}
|
|
255
|
-
const
|
|
256
|
+
const Ls = () => {
|
|
256
257
|
try {
|
|
257
258
|
if (process.env.NODE_ENV === "test")
|
|
258
259
|
return [Vn, mr];
|
|
259
260
|
} catch {
|
|
260
261
|
}
|
|
261
|
-
return [Vn,
|
|
262
|
-
}, Pt = new
|
|
262
|
+
return [Vn, As, mr];
|
|
263
|
+
}, Pt = new Ps(Ls()), Hn = (a) => a.replace(/\t/g, ""), Ss = (a, t, e) => {
|
|
263
264
|
const n = /* @__PURE__ */ new Date(), s = new Intl.DateTimeFormat("en-GB", {
|
|
264
265
|
year: "numeric",
|
|
265
266
|
month: "short",
|
|
@@ -283,7 +284,7 @@ ce && typeof ce.ownKeys == "function" ? je = ce.ownKeys : Object.getOwnPropertyS
|
|
|
283
284
|
} : je = function(t) {
|
|
284
285
|
return Object.getOwnPropertyNames(t);
|
|
285
286
|
};
|
|
286
|
-
function
|
|
287
|
+
function Fs(a) {
|
|
287
288
|
console && console.warn && console.warn(a);
|
|
288
289
|
}
|
|
289
290
|
var Hi = Number.isNaN || function(t) {
|
|
@@ -293,7 +294,7 @@ function ct() {
|
|
|
293
294
|
ct.init.call(this);
|
|
294
295
|
}
|
|
295
296
|
kn.exports = ct;
|
|
296
|
-
kn.exports.once =
|
|
297
|
+
kn.exports.once = Us;
|
|
297
298
|
ct.EventEmitter = ct;
|
|
298
299
|
ct.prototype._events = void 0;
|
|
299
300
|
ct.prototype._eventsCount = 0;
|
|
@@ -363,7 +364,7 @@ function zi(a, t, e, n) {
|
|
|
363
364
|
else if (typeof r == "function" ? r = i[t] = n ? [e, r] : [r, e] : n ? r.unshift(e) : r.push(e), s = Gi(a), s > 0 && r.length > s && !r.warned) {
|
|
364
365
|
r.warned = !0;
|
|
365
366
|
var o = new Error("Possible EventEmitter memory leak detected. " + r.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
366
|
-
o.name = "MaxListenersExceededWarning", o.emitter = a, o.type = t, o.count = r.length,
|
|
367
|
+
o.name = "MaxListenersExceededWarning", o.emitter = a, o.type = t, o.count = r.length, Fs(o);
|
|
367
368
|
}
|
|
368
369
|
return a;
|
|
369
370
|
}
|
|
@@ -374,12 +375,12 @@ ct.prototype.on = ct.prototype.addListener;
|
|
|
374
375
|
ct.prototype.prependListener = function(t, e) {
|
|
375
376
|
return zi(this, t, e, !0);
|
|
376
377
|
};
|
|
377
|
-
function
|
|
378
|
+
function js() {
|
|
378
379
|
if (!this.fired)
|
|
379
380
|
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
380
381
|
}
|
|
381
382
|
function Yi(a, t, e) {
|
|
382
|
-
var n = { fired: !1, wrapFn: void 0, target: a, type: t, listener: e }, s =
|
|
383
|
+
var n = { fired: !1, wrapFn: void 0, target: a, type: t, listener: e }, s = js.bind(n);
|
|
383
384
|
return s.listener = e, n.wrapFn = s, s;
|
|
384
385
|
}
|
|
385
386
|
ct.prototype.once = function(t, e) {
|
|
@@ -404,7 +405,7 @@ ct.prototype.removeListener = function(t, e) {
|
|
|
404
405
|
}
|
|
405
406
|
if (i < 0)
|
|
406
407
|
return this;
|
|
407
|
-
i === 0 ? n.shift() :
|
|
408
|
+
i === 0 ? n.shift() : Bs(n, i), n.length === 1 && (s[t] = n[0]), s.removeListener !== void 0 && this.emit("removeListener", t, o || e);
|
|
408
409
|
}
|
|
409
410
|
return this;
|
|
410
411
|
};
|
|
@@ -433,7 +434,7 @@ function ki(a, t, e) {
|
|
|
433
434
|
if (n === void 0)
|
|
434
435
|
return [];
|
|
435
436
|
var s = n[t];
|
|
436
|
-
return s === void 0 ? [] : typeof s == "function" ? e ? [s.listener || s] : [s] : e ?
|
|
437
|
+
return s === void 0 ? [] : typeof s == "function" ? e ? [s.listener || s] : [s] : e ? Rs(s) : Qi(s, s.length);
|
|
437
438
|
}
|
|
438
439
|
ct.prototype.listeners = function(t) {
|
|
439
440
|
return ki(this, t, !0);
|
|
@@ -464,17 +465,17 @@ function Qi(a, t) {
|
|
|
464
465
|
e[n] = a[n];
|
|
465
466
|
return e;
|
|
466
467
|
}
|
|
467
|
-
function
|
|
468
|
+
function Bs(a, t) {
|
|
468
469
|
for (; t + 1 < a.length; t++)
|
|
469
470
|
a[t] = a[t + 1];
|
|
470
471
|
a.pop();
|
|
471
472
|
}
|
|
472
|
-
function
|
|
473
|
+
function Rs(a) {
|
|
473
474
|
for (var t = new Array(a.length), e = 0; e < t.length; ++e)
|
|
474
475
|
t[e] = a[e].listener || a[e];
|
|
475
476
|
return t;
|
|
476
477
|
}
|
|
477
|
-
function
|
|
478
|
+
function Us(a, t) {
|
|
478
479
|
return new Promise(function(e, n) {
|
|
479
480
|
function s(r) {
|
|
480
481
|
a.removeListener(t, i), n(r);
|
|
@@ -482,10 +483,10 @@ function Rs(a, t) {
|
|
|
482
483
|
function i() {
|
|
483
484
|
typeof a.removeListener == "function" && a.removeListener("error", s), e([].slice.call(arguments));
|
|
484
485
|
}
|
|
485
|
-
Ji(a, t, i, { once: !0 }), t !== "error" &&
|
|
486
|
+
Ji(a, t, i, { once: !0 }), t !== "error" && Xs(a, s, { once: !0 });
|
|
486
487
|
});
|
|
487
488
|
}
|
|
488
|
-
function
|
|
489
|
+
function Xs(a, t, e) {
|
|
489
490
|
typeof a.on == "function" && Ji(a, "error", t, e);
|
|
490
491
|
}
|
|
491
492
|
function Ji(a, t, e, n) {
|
|
@@ -499,7 +500,7 @@ function Ji(a, t, e, n) {
|
|
|
499
500
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof a);
|
|
500
501
|
}
|
|
501
502
|
var Kn = kn.exports;
|
|
502
|
-
class
|
|
503
|
+
class $s extends Kn.EventEmitter {
|
|
503
504
|
constructor(t = 9229) {
|
|
504
505
|
super(), this.ws = null, this.connected = !1, this.buffer = [], this.wss = new Ds({ port: t }), this.wss.on("connection", (e) => {
|
|
505
506
|
if (this.ws) {
|
|
@@ -541,7 +542,7 @@ class Xs extends Kn.EventEmitter {
|
|
|
541
542
|
this.wss.close();
|
|
542
543
|
}
|
|
543
544
|
}
|
|
544
|
-
class
|
|
545
|
+
class Ws extends Kn.EventEmitter {
|
|
545
546
|
constructor(t = 9003) {
|
|
546
547
|
super(), this.socket = null, this.buffer = "", this.expectedLength = null, this.server = Ts.createServer(), this.server.on("connection", (e) => {
|
|
547
548
|
if (this.socket) {
|
|
@@ -585,11 +586,11 @@ class $s extends Kn.EventEmitter {
|
|
|
585
586
|
this.server.close();
|
|
586
587
|
}
|
|
587
588
|
}
|
|
588
|
-
const
|
|
589
|
-
right:
|
|
590
|
-
center:
|
|
591
|
-
},
|
|
592
|
-
class
|
|
589
|
+
const qs = {
|
|
590
|
+
right: ks,
|
|
591
|
+
center: Ks
|
|
592
|
+
}, Vs = 0, Be = 1, Hs = 2, Re = 3;
|
|
593
|
+
class Gs {
|
|
593
594
|
constructor(t) {
|
|
594
595
|
var e;
|
|
595
596
|
this.width = t.width, this.wrap = (e = t.wrap) !== null && e !== void 0 ? e : !0, this.rows = [];
|
|
@@ -648,7 +649,7 @@ class Hs {
|
|
|
648
649
|
const { width: l } = t[o], E = this.negatePadding(t[o]);
|
|
649
650
|
let m = r;
|
|
650
651
|
if (E > Tt.stringWidth(r) && (m += " ".repeat(E - Tt.stringWidth(r))), t[o].align && t[o].align !== "left" && this.wrap) {
|
|
651
|
-
const y =
|
|
652
|
+
const y = qs[t[o].align];
|
|
652
653
|
m = y(m, E), Tt.stringWidth(m) < E && (m += " ".repeat((l || 0) - Tt.stringWidth(m) - 1));
|
|
653
654
|
}
|
|
654
655
|
const p = t[o].padding || [0, 0, 0, 0];
|
|
@@ -671,7 +672,7 @@ class Hs {
|
|
|
671
672
|
return t.forEach((i, r) => {
|
|
672
673
|
i.width = n[r], this.wrap ? s = Tt.wrap(i.text, this.negatePadding(i), { hard: !0 }).split(`
|
|
673
674
|
`) : s = i.text.split(`
|
|
674
|
-
`), i.border && (s.unshift("." + "-".repeat(this.negatePadding(i) + 2) + "."), s.push("'" + "-".repeat(this.negatePadding(i) + 2) + "'")), i.padding && (s.unshift(...new Array(i.padding[
|
|
675
|
+
`), i.border && (s.unshift("." + "-".repeat(this.negatePadding(i) + 2) + "."), s.push("'" + "-".repeat(this.negatePadding(i) + 2) + "'")), i.padding && (s.unshift(...new Array(i.padding[Vs] || 0).fill("")), s.push(...new Array(i.padding[Hs] || 0).fill(""))), s.forEach((o, l) => {
|
|
675
676
|
e[l] || e.push([]);
|
|
676
677
|
const E = e[l];
|
|
677
678
|
for (let m = 0; m < r; m++)
|
|
@@ -692,33 +693,33 @@ class Hs {
|
|
|
692
693
|
if (r.width)
|
|
693
694
|
return e--, n -= r.width, r.width;
|
|
694
695
|
}), i = e ? Math.floor(n / e) : 0;
|
|
695
|
-
return s.map((r, o) => r === void 0 ? Math.max(i,
|
|
696
|
+
return s.map((r, o) => r === void 0 ? Math.max(i, zs(t[o])) : r);
|
|
696
697
|
}
|
|
697
698
|
}
|
|
698
699
|
function wr(a, t, e) {
|
|
699
700
|
return a.border ? /[.']-+[.']/.test(t) ? "" : t.trim().length !== 0 ? e : " " : "";
|
|
700
701
|
}
|
|
701
|
-
function
|
|
702
|
+
function zs(a) {
|
|
702
703
|
const t = a.padding || [], e = 1 + (t[Re] || 0) + (t[Be] || 0);
|
|
703
704
|
return a.border ? e + 4 : e;
|
|
704
705
|
}
|
|
705
|
-
function
|
|
706
|
+
function Ys() {
|
|
706
707
|
return typeof process == "object" && process.stdout && process.stdout.columns ? process.stdout.columns : 80;
|
|
707
708
|
}
|
|
708
|
-
function
|
|
709
|
+
function ks(a, t) {
|
|
709
710
|
a = a.trim();
|
|
710
711
|
const e = Tt.stringWidth(a);
|
|
711
712
|
return e < t ? " ".repeat(t - e) + a : a;
|
|
712
713
|
}
|
|
713
|
-
function
|
|
714
|
+
function Ks(a, t) {
|
|
714
715
|
a = a.trim();
|
|
715
716
|
const e = Tt.stringWidth(a);
|
|
716
717
|
return e >= t ? a : " ".repeat(t - e >> 1) + a;
|
|
717
718
|
}
|
|
718
719
|
let Tt;
|
|
719
|
-
function
|
|
720
|
-
return Tt = t, new
|
|
721
|
-
width: a?.width ||
|
|
720
|
+
function Qs(a, t) {
|
|
721
|
+
return Tt = t, new Gs({
|
|
722
|
+
width: a?.width || Ys(),
|
|
722
723
|
wrap: a?.wrap
|
|
723
724
|
});
|
|
724
725
|
}
|
|
@@ -726,7 +727,7 @@ const Zi = new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;
|
|
|
726
727
|
function ts(a) {
|
|
727
728
|
return a.replace(Zi, "");
|
|
728
729
|
}
|
|
729
|
-
function
|
|
730
|
+
function Js(a, t) {
|
|
730
731
|
const [e, n] = a.match(Zi) || ["", ""];
|
|
731
732
|
a = ts(a);
|
|
732
733
|
let s = "";
|
|
@@ -735,14 +736,14 @@ function Qs(a, t) {
|
|
|
735
736
|
`), s += a.charAt(i);
|
|
736
737
|
return e && n && (s = `${e}${s}${n}`), s;
|
|
737
738
|
}
|
|
738
|
-
function
|
|
739
|
-
return
|
|
739
|
+
function Zs(a) {
|
|
740
|
+
return Qs(a, {
|
|
740
741
|
stringWidth: (t) => [...t].length,
|
|
741
742
|
stripAnsi: ts,
|
|
742
|
-
wrap:
|
|
743
|
+
wrap: Js
|
|
743
744
|
});
|
|
744
745
|
}
|
|
745
|
-
function
|
|
746
|
+
function to(a, t) {
|
|
746
747
|
let e = le(".", a), n;
|
|
747
748
|
for (Xi(e).isDirectory() || (e = qn(e)); ; ) {
|
|
748
749
|
if (n = t(e, $i(e)), n) return le(e, n);
|
|
@@ -785,7 +786,7 @@ function ns(a) {
|
|
|
785
786
|
* Copyright (c) 2016, Contributors
|
|
786
787
|
* SPDX-License-Identifier: ISC
|
|
787
788
|
*/
|
|
788
|
-
function
|
|
789
|
+
function eo(a) {
|
|
789
790
|
if (Array.isArray(a))
|
|
790
791
|
return a.map((r) => typeof r != "string" ? r + "" : r);
|
|
791
792
|
a = a.trim();
|
|
@@ -815,7 +816,7 @@ var Ft;
|
|
|
815
816
|
* SPDX-License-Identifier: ISC
|
|
816
817
|
*/
|
|
817
818
|
let Xt;
|
|
818
|
-
class
|
|
819
|
+
class no {
|
|
819
820
|
constructor(t) {
|
|
820
821
|
Xt = t;
|
|
821
822
|
}
|
|
@@ -837,7 +838,7 @@ class eo {
|
|
|
837
838
|
number: void 0,
|
|
838
839
|
__: void 0,
|
|
839
840
|
key: void 0
|
|
840
|
-
}, e), s =
|
|
841
|
+
}, e), s = eo(t), i = typeof t == "string", r = ro(Object.assign(/* @__PURE__ */ Object.create(null), n.alias)), o = Object.assign({
|
|
841
842
|
"boolean-negation": !0,
|
|
842
843
|
"camel-case-expansion": !0,
|
|
843
844
|
"combine-arrays": !1,
|
|
@@ -1034,7 +1035,7 @@ class eo {
|
|
|
1034
1035
|
C.aliases[A] && C.aliases[A].length || (C.aliases[A] = [f], w[f] = !0), C.aliases[f] && C.aliases[f].length || S(f, A);
|
|
1035
1036
|
}
|
|
1036
1037
|
function R(A, f, u) {
|
|
1037
|
-
u && (f =
|
|
1038
|
+
u && (f = io(f)), (K(A, C.bools) || K(A, C.counts)) && typeof f == "string" && (f = f === "true");
|
|
1038
1039
|
let c = Array.isArray(f) ? f.map(function(h) {
|
|
1039
1040
|
return $(A, h);
|
|
1040
1041
|
}) : $(A, f);
|
|
@@ -1226,7 +1227,7 @@ class eo {
|
|
|
1226
1227
|
};
|
|
1227
1228
|
}
|
|
1228
1229
|
}
|
|
1229
|
-
function
|
|
1230
|
+
function ro(a) {
|
|
1230
1231
|
const t = [], e = /* @__PURE__ */ Object.create(null);
|
|
1231
1232
|
let n = !0;
|
|
1232
1233
|
for (Object.keys(a).forEach(function(s) {
|
|
@@ -1256,7 +1257,7 @@ function Ve(a) {
|
|
|
1256
1257
|
function Er(a) {
|
|
1257
1258
|
return a === "__proto__" ? "___proto___" : a;
|
|
1258
1259
|
}
|
|
1259
|
-
function
|
|
1260
|
+
function io(a) {
|
|
1260
1261
|
return typeof a == "string" && (a[0] === "'" || a[0] === '"') && a[a.length - 1] === a[0] ? a.substring(1, a.length - 1) : a;
|
|
1261
1262
|
}
|
|
1262
1263
|
/**
|
|
@@ -1271,9 +1272,9 @@ var He, Ge, ze;
|
|
|
1271
1272
|
const xr = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number(process.env.YARGS_MIN_NODE_VERSION) : 12, Or = (Ge = (He = process == null ? void 0 : process.versions) === null || He === void 0 ? void 0 : He.node) !== null && Ge !== void 0 ? Ge : (ze = process == null ? void 0 : process.version) === null || ze === void 0 ? void 0 : ze.slice(1);
|
|
1272
1273
|
if (Or && Number(Or.match(/^([^.]+)/)[1]) < xr)
|
|
1273
1274
|
throw Error(`yargs parser supports a minimum Node.js version of ${xr}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
|
|
1274
|
-
const
|
|
1275
|
+
const so = process ? process.env : {}, rs = new no({
|
|
1275
1276
|
cwd: process.cwd,
|
|
1276
|
-
env: () =>
|
|
1277
|
+
env: () => so,
|
|
1277
1278
|
format: Wi,
|
|
1278
1279
|
normalize: ys,
|
|
1279
1280
|
resolve: le,
|
|
@@ -1296,18 +1297,18 @@ Oe.camelCase = de;
|
|
|
1296
1297
|
Oe.decamelize = es;
|
|
1297
1298
|
Oe.looksLikeNumber = ns;
|
|
1298
1299
|
function is() {
|
|
1299
|
-
return
|
|
1300
|
-
}
|
|
1301
|
-
function so() {
|
|
1302
|
-
return oo() && !process.defaultApp;
|
|
1300
|
+
return oo() ? 0 : 1;
|
|
1303
1301
|
}
|
|
1304
1302
|
function oo() {
|
|
1303
|
+
return ao() && !process.defaultApp;
|
|
1304
|
+
}
|
|
1305
|
+
function ao() {
|
|
1305
1306
|
return !!process.versions.electron;
|
|
1306
1307
|
}
|
|
1307
|
-
function
|
|
1308
|
+
function uo(a) {
|
|
1308
1309
|
return a.slice(is() + 1);
|
|
1309
1310
|
}
|
|
1310
|
-
function
|
|
1311
|
+
function co() {
|
|
1311
1312
|
return process.argv[is()];
|
|
1312
1313
|
}
|
|
1313
1314
|
class gt extends Error {
|
|
@@ -1315,7 +1316,7 @@ class gt extends Error {
|
|
|
1315
1316
|
super(t || "yargs error"), this.name = "YError", Error.captureStackTrace && Error.captureStackTrace(this, gt);
|
|
1316
1317
|
}
|
|
1317
1318
|
}
|
|
1318
|
-
const
|
|
1319
|
+
const lo = {
|
|
1319
1320
|
fs: {
|
|
1320
1321
|
readFileSync: Xe,
|
|
1321
1322
|
writeFile: xs
|
|
@@ -1331,7 +1332,7 @@ const co = {
|
|
|
1331
1332
|
}
|
|
1332
1333
|
};
|
|
1333
1334
|
let St;
|
|
1334
|
-
class
|
|
1335
|
+
class fo {
|
|
1335
1336
|
constructor(t) {
|
|
1336
1337
|
t = t || {}, this.directory = t.directory || "./locales", this.updateFiles = typeof t.updateFiles == "boolean" ? t.updateFiles : !0, this.locale = t.locale || "en", this.fallbackToLanguage = typeof t.fallbackToLanguage == "boolean" ? t.fallbackToLanguage : !0, this.cache = /* @__PURE__ */ Object.create(null), this.writeQueue = [];
|
|
1337
1338
|
}
|
|
@@ -1417,9 +1418,9 @@ class lo {
|
|
|
1417
1418
|
return St.exists(t);
|
|
1418
1419
|
}
|
|
1419
1420
|
}
|
|
1420
|
-
function
|
|
1421
|
+
function ho(a, t) {
|
|
1421
1422
|
St = t;
|
|
1422
|
-
const e = new
|
|
1423
|
+
const e = new fo(a);
|
|
1423
1424
|
return {
|
|
1424
1425
|
__: e.__.bind(e),
|
|
1425
1426
|
__n: e.__n.bind(e),
|
|
@@ -1429,27 +1430,27 @@ function fo(a, t) {
|
|
|
1429
1430
|
locale: e.locale
|
|
1430
1431
|
};
|
|
1431
1432
|
}
|
|
1432
|
-
const
|
|
1433
|
+
const po = (a) => ho(a, lo), mo = "require is not supported by ESM", Cr = "loading a directory of commands is not supported yet for ESM";
|
|
1433
1434
|
let Ee;
|
|
1434
1435
|
try {
|
|
1435
1436
|
Ee = Is(import.meta.url);
|
|
1436
1437
|
} catch {
|
|
1437
1438
|
Ee = process.cwd();
|
|
1438
1439
|
}
|
|
1439
|
-
const
|
|
1440
|
+
const go = Ee.substring(0, Ee.lastIndexOf("node_modules")), yo = {
|
|
1440
1441
|
assert: {
|
|
1441
1442
|
notStrictEqual: gs,
|
|
1442
1443
|
strictEqual: ms
|
|
1443
1444
|
},
|
|
1444
|
-
cliui:
|
|
1445
|
-
findUp:
|
|
1445
|
+
cliui: Zs,
|
|
1446
|
+
findUp: to,
|
|
1446
1447
|
getEnv: (a) => process.env[a],
|
|
1447
1448
|
inspect: Cs,
|
|
1448
1449
|
getCallerFile: () => {
|
|
1449
1450
|
throw new gt(Cr);
|
|
1450
1451
|
},
|
|
1451
|
-
getProcessArgvBin:
|
|
1452
|
-
mainFilename:
|
|
1452
|
+
getProcessArgvBin: co,
|
|
1453
|
+
mainFilename: go || process.cwd(),
|
|
1453
1454
|
Parser: Oe,
|
|
1454
1455
|
path: {
|
|
1455
1456
|
basename: Es,
|
|
@@ -1469,13 +1470,13 @@ const mo = Ee.substring(0, Ee.lastIndexOf("node_modules")), go = {
|
|
|
1469
1470
|
},
|
|
1470
1471
|
readFileSync: Xe,
|
|
1471
1472
|
require: () => {
|
|
1472
|
-
throw new gt(
|
|
1473
|
+
throw new gt(mo);
|
|
1473
1474
|
},
|
|
1474
1475
|
requireDirectory: () => {
|
|
1475
1476
|
throw new gt(Cr);
|
|
1476
1477
|
},
|
|
1477
1478
|
stringWidth: (a) => [...a].length,
|
|
1478
|
-
y18n:
|
|
1479
|
+
y18n: po({
|
|
1479
1480
|
directory: le(Ee, "../../../locales"),
|
|
1480
1481
|
updateFiles: !1
|
|
1481
1482
|
})
|
|
@@ -1512,7 +1513,7 @@ function ye(a) {
|
|
|
1512
1513
|
});
|
|
1513
1514
|
}), i;
|
|
1514
1515
|
}
|
|
1515
|
-
const
|
|
1516
|
+
const bo = ["first", "second", "third", "fourth", "fifth", "sixth"];
|
|
1516
1517
|
function G(a, t, e) {
|
|
1517
1518
|
function n() {
|
|
1518
1519
|
return typeof a == "object" ? [{ demanded: [], optional: [] }, a, t] : [
|
|
@@ -1549,9 +1550,9 @@ function Dr(a) {
|
|
|
1549
1550
|
return Array.isArray(a) ? "array" : a === null ? "null" : typeof a;
|
|
1550
1551
|
}
|
|
1551
1552
|
function Tr(a, t, e) {
|
|
1552
|
-
throw new gt(`Invalid ${
|
|
1553
|
+
throw new gt(`Invalid ${bo[e] || "manyith"} argument. Expected ${t.join(" or ")} but received ${a}.`);
|
|
1553
1554
|
}
|
|
1554
|
-
class
|
|
1555
|
+
class wo {
|
|
1555
1556
|
constructor(t) {
|
|
1556
1557
|
this.globalMiddleware = [], this.frozens = [], this.yargs = t;
|
|
1557
1558
|
}
|
|
@@ -1591,7 +1592,7 @@ class bo {
|
|
|
1591
1592
|
this.globalMiddleware = this.globalMiddleware.filter((t) => t.global);
|
|
1592
1593
|
}
|
|
1593
1594
|
}
|
|
1594
|
-
function
|
|
1595
|
+
function Eo(a) {
|
|
1595
1596
|
return a ? a.map((t) => (t.applyBeforeValidation = !1, t)) : [];
|
|
1596
1597
|
}
|
|
1597
1598
|
function be(a, t, e, n) {
|
|
@@ -1615,16 +1616,16 @@ function we(a, t, e = (n) => {
|
|
|
1615
1616
|
throw n;
|
|
1616
1617
|
}) {
|
|
1617
1618
|
try {
|
|
1618
|
-
const n =
|
|
1619
|
+
const n = xo(a) ? a() : a;
|
|
1619
1620
|
return yt(n) ? n.then((s) => t(s)) : t(n);
|
|
1620
1621
|
} catch (n) {
|
|
1621
1622
|
return e(n);
|
|
1622
1623
|
}
|
|
1623
1624
|
}
|
|
1624
|
-
function
|
|
1625
|
+
function xo(a) {
|
|
1625
1626
|
return typeof a == "function";
|
|
1626
1627
|
}
|
|
1627
|
-
function
|
|
1628
|
+
function Oo(a) {
|
|
1628
1629
|
if (typeof require > "u")
|
|
1629
1630
|
return null;
|
|
1630
1631
|
for (let t = 0, e = Object.keys(require.cache), n; t < e.length; t++)
|
|
@@ -1633,7 +1634,7 @@ function xo(a) {
|
|
|
1633
1634
|
return null;
|
|
1634
1635
|
}
|
|
1635
1636
|
const ie = /(^\*)|(^\$0)/;
|
|
1636
|
-
class
|
|
1637
|
+
class Co {
|
|
1637
1638
|
constructor(t, e, n, s) {
|
|
1638
1639
|
this.requireCache = /* @__PURE__ */ new Set(), this.handlers = {}, this.aliasMap = {}, this.frozens = [], this.shim = s, this.usage = t, this.globalMiddleware = n, this.validation = e;
|
|
1639
1640
|
}
|
|
@@ -1652,15 +1653,15 @@ class Oo {
|
|
|
1652
1653
|
}
|
|
1653
1654
|
addHandler(t, e, n, s, i, r) {
|
|
1654
1655
|
let o = [];
|
|
1655
|
-
const l =
|
|
1656
|
+
const l = Eo(i);
|
|
1656
1657
|
if (s = s || (() => {
|
|
1657
1658
|
}), Array.isArray(t))
|
|
1658
|
-
if (
|
|
1659
|
+
if (Do(t))
|
|
1659
1660
|
[t, ...o] = t;
|
|
1660
1661
|
else
|
|
1661
1662
|
for (const E of t)
|
|
1662
1663
|
this.addHandler(E);
|
|
1663
|
-
else if (
|
|
1664
|
+
else if (vo(t)) {
|
|
1664
1665
|
let E = Array.isArray(t.command) || typeof t.command == "string" ? t.command : this.moduleName(t);
|
|
1665
1666
|
t.aliases && (E = [].concat(E).concat(t.aliases)), this.addHandler(E, this.extractDesc(t), t.builder, t.handler, t.middlewares, t.deprecated);
|
|
1666
1667
|
return;
|
|
@@ -1709,8 +1710,8 @@ class Oo {
|
|
|
1709
1710
|
n.getInternalMethods().getUsageInstance().freeze();
|
|
1710
1711
|
const p = E(n.getInternalMethods().reset(s), l);
|
|
1711
1712
|
if (yt(p))
|
|
1712
|
-
return p.then((y) => (m =
|
|
1713
|
-
} else
|
|
1713
|
+
return p.then((y) => (m = qo(y) ? y : n, this.parseAndUpdateUsage(t, e, m, i, r, o)));
|
|
1714
|
+
} else To(E) && (n.getInternalMethods().getUsageInstance().freeze(), m = n.getInternalMethods().reset(s), Object.keys(e.builder).forEach((p) => {
|
|
1714
1715
|
m.option(p, E[p]);
|
|
1715
1716
|
}));
|
|
1716
1717
|
return this.parseAndUpdateUsage(t, e, m, i, r, o);
|
|
@@ -1845,7 +1846,7 @@ class Oo {
|
|
|
1845
1846
|
});
|
|
1846
1847
|
}
|
|
1847
1848
|
moduleName(t) {
|
|
1848
|
-
const e =
|
|
1849
|
+
const e = Oo(t);
|
|
1849
1850
|
if (!e)
|
|
1850
1851
|
throw new Error(`No command name given for module: ${this.shim.inspect(t)}`);
|
|
1851
1852
|
return this.commandFromFilename(e.filename);
|
|
@@ -1880,22 +1881,22 @@ class Oo {
|
|
|
1880
1881
|
return this.handlers = {}, this.aliasMap = {}, this.defaultCommand = void 0, this.requireCache = /* @__PURE__ */ new Set(), this;
|
|
1881
1882
|
}
|
|
1882
1883
|
}
|
|
1883
|
-
function
|
|
1884
|
-
return new
|
|
1884
|
+
function Io(a, t, e, n) {
|
|
1885
|
+
return new Co(a, t, e, n);
|
|
1885
1886
|
}
|
|
1886
1887
|
function vr(a) {
|
|
1887
1888
|
return typeof a == "object" && !!a.builder && typeof a.handler == "function";
|
|
1888
1889
|
}
|
|
1889
|
-
function
|
|
1890
|
+
function Do(a) {
|
|
1890
1891
|
return a.every((t) => typeof t == "string");
|
|
1891
1892
|
}
|
|
1892
1893
|
function Gn(a) {
|
|
1893
1894
|
return typeof a == "function";
|
|
1894
1895
|
}
|
|
1895
|
-
function
|
|
1896
|
+
function To(a) {
|
|
1896
1897
|
return typeof a == "object";
|
|
1897
1898
|
}
|
|
1898
|
-
function
|
|
1899
|
+
function vo(a) {
|
|
1899
1900
|
return typeof a == "object" && !Array.isArray(a);
|
|
1900
1901
|
}
|
|
1901
1902
|
function xe(a = {}, t = () => !0) {
|
|
@@ -1910,10 +1911,10 @@ function me(a) {
|
|
|
1910
1911
|
e._handle && e.isTTY && typeof e._handle.setBlocking == "function" && e._handle.setBlocking(a);
|
|
1911
1912
|
});
|
|
1912
1913
|
}
|
|
1913
|
-
function
|
|
1914
|
+
function _o(a) {
|
|
1914
1915
|
return typeof a == "boolean";
|
|
1915
1916
|
}
|
|
1916
|
-
function
|
|
1917
|
+
function No(a, t) {
|
|
1917
1918
|
const e = t.y18n.__, n = {}, s = [];
|
|
1918
1919
|
n.failFn = function(R) {
|
|
1919
1920
|
s.push(R);
|
|
@@ -1929,7 +1930,7 @@ function _o(a, t) {
|
|
|
1929
1930
|
if (s.length)
|
|
1930
1931
|
for (let z = s.length - 1; z >= 0; --z) {
|
|
1931
1932
|
const k = s[z];
|
|
1932
|
-
if (
|
|
1933
|
+
if (_o(k)) {
|
|
1933
1934
|
if ($)
|
|
1934
1935
|
throw $;
|
|
1935
1936
|
if (R)
|
|
@@ -2040,7 +2041,7 @@ function _o(a, t) {
|
|
|
2040
2041
|
});
|
|
2041
2042
|
if (K.filter(({ groupName: Q }) => Q !== n.getPositionalGroupName()).some(({ normalizedKeys: Q, switches: x }) => !Q.every((b) => vt(x[b]))) && K.filter(({ groupName: Q }) => Q !== n.getPositionalGroupName()).forEach(({ normalizedKeys: Q, switches: x }) => {
|
|
2042
2043
|
Q.forEach((b) => {
|
|
2043
|
-
vt(x[b]) && (x[b] =
|
|
2044
|
+
vt(x[b]) && (x[b] = Ao(x[b], 4));
|
|
2044
2045
|
});
|
|
2045
2046
|
}), K.forEach(({ groupName: Q, normalizedKeys: x, switches: b }) => {
|
|
2046
2047
|
at.div(Q), x.forEach((j) => {
|
|
@@ -2186,7 +2187,7 @@ function _o(a, t) {
|
|
|
2186
2187
|
function Qn(a) {
|
|
2187
2188
|
return typeof a == "object";
|
|
2188
2189
|
}
|
|
2189
|
-
function
|
|
2190
|
+
function Ao(a, t) {
|
|
2190
2191
|
return Qn(a) ? { text: a.text, indentation: a.indentation + t } : { text: a, indentation: t };
|
|
2191
2192
|
}
|
|
2192
2193
|
function _r(a) {
|
|
@@ -2195,7 +2196,7 @@ function _r(a) {
|
|
|
2195
2196
|
function Ie(a) {
|
|
2196
2197
|
return Qn(a) ? a.text : a;
|
|
2197
2198
|
}
|
|
2198
|
-
const
|
|
2199
|
+
const Mo = `###-begin-{{app_name}}-completions-###
|
|
2199
2200
|
#
|
|
2200
2201
|
# yargs command completion script
|
|
2201
2202
|
#
|
|
@@ -2223,7 +2224,7 @@ _{{app_name}}_yargs_completions()
|
|
|
2223
2224
|
}
|
|
2224
2225
|
complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
|
|
2225
2226
|
###-end-{{app_name}}-completions-###
|
|
2226
|
-
`,
|
|
2227
|
+
`, Po = `#compdef {{app_name}}
|
|
2227
2228
|
###-begin-{{app_name}}-completions-###
|
|
2228
2229
|
#
|
|
2229
2230
|
# yargs command completion script
|
|
@@ -2243,7 +2244,7 @@ _{{app_name}}_yargs_completions()
|
|
|
2243
2244
|
compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
2244
2245
|
###-end-{{app_name}}-completions-###
|
|
2245
2246
|
`;
|
|
2246
|
-
class
|
|
2247
|
+
class Lo {
|
|
2247
2248
|
constructor(t, e, n, s) {
|
|
2248
2249
|
var i, r, o;
|
|
2249
2250
|
this.yargs = t, this.usage = e, this.command = n, this.shim = s, this.completionKey = "get-yargs-completions", this.aliases = null, this.customCompletionFunction = null, this.indexAfterLastReset = 0, this.zshShell = (o = ((i = this.shim.getEnv("SHELL")) === null || i === void 0 ? void 0 : i.includes("zsh")) || ((r = this.shim.getEnv("ZSH_NAME")) === null || r === void 0 ? void 0 : r.includes("zsh"))) !== null && o !== void 0 ? o : !1;
|
|
@@ -2348,7 +2349,7 @@ class Po {
|
|
|
2348
2349
|
e.push(y + E), s && e.push(y + "no-" + E);
|
|
2349
2350
|
}
|
|
2350
2351
|
customCompletion(t, e, n, s) {
|
|
2351
|
-
if (jt(this.customCompletionFunction, null, this.shim),
|
|
2352
|
+
if (jt(this.customCompletionFunction, null, this.shim), Fo(this.customCompletionFunction)) {
|
|
2352
2353
|
const i = this.customCompletionFunction(n, e);
|
|
2353
2354
|
return yt(i) ? i.then((r) => {
|
|
2354
2355
|
this.shim.process.nextTick(() => {
|
|
@@ -2359,7 +2360,7 @@ class Po {
|
|
|
2359
2360
|
s(r, void 0);
|
|
2360
2361
|
});
|
|
2361
2362
|
}) : s(null, i);
|
|
2362
|
-
} else return
|
|
2363
|
+
} else return jo(this.customCompletionFunction) ? this.customCompletionFunction(n, e, (i = s) => this.defaultCompletion(t, e, n, i), (i) => {
|
|
2363
2364
|
s(null, i);
|
|
2364
2365
|
}) : this.customCompletionFunction(n, e, (i) => {
|
|
2365
2366
|
s(null, i);
|
|
@@ -2370,7 +2371,7 @@ class Po {
|
|
|
2370
2371
|
return yt(s) ? s.then(i) : i(s);
|
|
2371
2372
|
}
|
|
2372
2373
|
generateCompletionScript(t, e) {
|
|
2373
|
-
let n = this.zshShell ?
|
|
2374
|
+
let n = this.zshShell ? Po : Mo;
|
|
2374
2375
|
const s = this.shim.path.basename(t);
|
|
2375
2376
|
return t.match(/\.js$/) && (t = `./${t}`), n = n.replace(/{{app_name}}/g, s), n = n.replace(/{{completion_command}}/g, e), n.replace(/{{app_path}}/g, t);
|
|
2376
2377
|
}
|
|
@@ -2381,16 +2382,16 @@ class Po {
|
|
|
2381
2382
|
this.aliases = t.aliases;
|
|
2382
2383
|
}
|
|
2383
2384
|
}
|
|
2384
|
-
function
|
|
2385
|
-
return new
|
|
2385
|
+
function So(a, t, e, n) {
|
|
2386
|
+
return new Lo(a, t, e, n);
|
|
2386
2387
|
}
|
|
2387
|
-
function
|
|
2388
|
+
function Fo(a) {
|
|
2388
2389
|
return a.length < 3;
|
|
2389
2390
|
}
|
|
2390
|
-
function
|
|
2391
|
+
function jo(a) {
|
|
2391
2392
|
return a.length > 3;
|
|
2392
2393
|
}
|
|
2393
|
-
function
|
|
2394
|
+
function Bo(a, t) {
|
|
2394
2395
|
if (a.length === 0)
|
|
2395
2396
|
return t.length;
|
|
2396
2397
|
if (t.length === 0)
|
|
@@ -2408,7 +2409,7 @@ function jo(a, t) {
|
|
|
2408
2409
|
return e[t.length][a.length];
|
|
2409
2410
|
}
|
|
2410
2411
|
const Nr = ["$0", "--", "_"];
|
|
2411
|
-
function
|
|
2412
|
+
function Ro(a, t, e) {
|
|
2412
2413
|
const n = e.y18n.__, s = e.y18n.__n, i = {};
|
|
2413
2414
|
i.nonOptionCount = function(p) {
|
|
2414
2415
|
const y = a.getDemandedCommands(), D = p._.length + (p["--"] ? p["--"].length : 0) - a.getInternalMethods().getContext().commands.length;
|
|
@@ -2520,7 +2521,7 @@ ${D.join(`
|
|
|
2520
2521
|
y = y.sort((C, T) => T.length - C.length);
|
|
2521
2522
|
let D = null, _ = 1 / 0;
|
|
2522
2523
|
for (let C = 0, T; (T = y[C]) !== void 0; C++) {
|
|
2523
|
-
const I =
|
|
2524
|
+
const I = Bo(p, T);
|
|
2524
2525
|
I <= 3 && I < _ && (_ = I, D = T);
|
|
2525
2526
|
}
|
|
2526
2527
|
D && t.fail(n("Did you mean %s?", D));
|
|
@@ -2548,22 +2549,22 @@ function Yn(a, t, e, n) {
|
|
|
2548
2549
|
const i = /\.json|\..*rc$/.test(a.extends);
|
|
2549
2550
|
let r = null;
|
|
2550
2551
|
if (i)
|
|
2551
|
-
r =
|
|
2552
|
+
r = Xo(t, a.extends);
|
|
2552
2553
|
else
|
|
2553
2554
|
try {
|
|
2554
2555
|
r = require.resolve(a.extends);
|
|
2555
2556
|
} catch {
|
|
2556
2557
|
return a;
|
|
2557
2558
|
}
|
|
2558
|
-
|
|
2559
|
+
Uo(r), zn.push(r), s = i ? JSON.parse(ge.readFileSync(r, "utf8")) : require(a.extends), delete a.extends, s = Yn(s, ge.path.dirname(r), e, ge);
|
|
2559
2560
|
}
|
|
2560
2561
|
return zn = [], e ? ss(s, a) : Object.assign({}, s, a);
|
|
2561
2562
|
}
|
|
2562
|
-
function
|
|
2563
|
+
function Uo(a) {
|
|
2563
2564
|
if (zn.indexOf(a) > -1)
|
|
2564
2565
|
throw new gt(`Circular extended configurations: '${a}'.`);
|
|
2565
2566
|
}
|
|
2566
|
-
function
|
|
2567
|
+
function Xo(a, t) {
|
|
2567
2568
|
return ge.path.resolve(a, t);
|
|
2568
2569
|
}
|
|
2569
2570
|
function ss(a, t) {
|
|
@@ -2586,9 +2587,9 @@ var H = function(a, t, e, n, s) {
|
|
|
2586
2587
|
if (typeof t == "function" ? a !== t || !n : !t.has(a)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
2587
2588
|
return e === "m" ? n : e === "a" ? n.call(a) : n ? n.value : t.get(a);
|
|
2588
2589
|
}, mt, zt, fe, _t, Ct, De, Vt, Yt, Te, Nt, ve, At, Bt, It, Mt, _e, se, wt, Y, Ne, Ae, Dt, kt, oe, Kt, Ht, Me, tt, Qt, Jt, Zt, et, Pe, Rt, dt;
|
|
2589
|
-
function
|
|
2590
|
+
function $o(a) {
|
|
2590
2591
|
return (t = [], e = a.process.cwd(), n) => {
|
|
2591
|
-
const s = new
|
|
2592
|
+
const s = new Wo(t, e, n, a);
|
|
2592
2593
|
return Object.defineProperty(s, "argv", {
|
|
2593
2594
|
get: () => s.parse(),
|
|
2594
2595
|
enumerable: !0
|
|
@@ -2596,9 +2597,9 @@ function Xo(a) {
|
|
|
2596
2597
|
};
|
|
2597
2598
|
}
|
|
2598
2599
|
const Ar = Symbol("copyDoubleDash"), Mr = Symbol("copyDoubleDash"), Ye = Symbol("deleteFromParserHintObject"), Pr = Symbol("emitWarning"), Lr = Symbol("freeze"), Sr = Symbol("getDollarZero"), te = Symbol("getParserConfiguration"), Fr = Symbol("getUsageConfiguration"), ke = Symbol("guessLocale"), jr = Symbol("guessVersion"), Br = Symbol("parsePositionalNumbers"), Ke = Symbol("pkgUp"), Gt = Symbol("populateParserHintArray"), ae = Symbol("populateParserHintSingleValueDictionary"), Qe = Symbol("populateParserHintArrayDictionary"), Je = Symbol("populateParserHintDictionary"), Ze = Symbol("sanitizeKey"), tn = Symbol("setKey"), en = Symbol("unfreeze"), Rr = Symbol("validateAsync"), Ur = Symbol("getCommandInstance"), Xr = Symbol("getContext"), $r = Symbol("getHasOutput"), Wr = Symbol("getLoggerInstance"), qr = Symbol("getParseContext"), Vr = Symbol("getUsageInstance"), Hr = Symbol("getValidationInstance"), Le = Symbol("hasParseCallback"), Gr = Symbol("isGlobalContext"), ee = Symbol("postProcess"), zr = Symbol("rebase"), nn = Symbol("reset"), he = Symbol("runYargsParserAndExecuteCommands"), rn = Symbol("runValidation"), Yr = Symbol("setHasOutput"), ne = Symbol("kTrackManuallySetKeys");
|
|
2599
|
-
class
|
|
2600
|
+
class Wo {
|
|
2600
2601
|
constructor(t = [], e, n, s) {
|
|
2601
|
-
this.customScriptName = !1, this.parsed = !1, mt.set(this, void 0), zt.set(this, void 0), fe.set(this, { commands: [], fullCommands: [] }), _t.set(this, null), Ct.set(this, null), De.set(this, "show-hidden"), Vt.set(this, null), Yt.set(this, !0), Te.set(this, {}), Nt.set(this, !0), ve.set(this, []), At.set(this, void 0), Bt.set(this, {}), It.set(this, !1), Mt.set(this, null), _e.set(this, !0), se.set(this, void 0), wt.set(this, ""), Y.set(this, void 0), Ne.set(this, void 0), Ae.set(this, {}), Dt.set(this, null), kt.set(this, null), oe.set(this, {}), Kt.set(this, {}), Ht.set(this, void 0), Me.set(this, !1), tt.set(this, void 0), Qt.set(this, !1), Jt.set(this, !1), Zt.set(this, !1), et.set(this, void 0), Pe.set(this, {}), Rt.set(this, null), dt.set(this, void 0), H(this, tt, s, "f"), H(this, Ht, t, "f"), H(this, zt, e, "f"), H(this, Ne, n, "f"), H(this, At, new
|
|
2602
|
+
this.customScriptName = !1, this.parsed = !1, mt.set(this, void 0), zt.set(this, void 0), fe.set(this, { commands: [], fullCommands: [] }), _t.set(this, null), Ct.set(this, null), De.set(this, "show-hidden"), Vt.set(this, null), Yt.set(this, !0), Te.set(this, {}), Nt.set(this, !0), ve.set(this, []), At.set(this, void 0), Bt.set(this, {}), It.set(this, !1), Mt.set(this, null), _e.set(this, !0), se.set(this, void 0), wt.set(this, ""), Y.set(this, void 0), Ne.set(this, void 0), Ae.set(this, {}), Dt.set(this, null), kt.set(this, null), oe.set(this, {}), Kt.set(this, {}), Ht.set(this, void 0), Me.set(this, !1), tt.set(this, void 0), Qt.set(this, !1), Jt.set(this, !1), Zt.set(this, !1), et.set(this, void 0), Pe.set(this, {}), Rt.set(this, null), dt.set(this, void 0), H(this, tt, s, "f"), H(this, Ht, t, "f"), H(this, zt, e, "f"), H(this, Ne, n, "f"), H(this, At, new wo(this), "f"), this.$0 = this[Sr](), this[nn](), H(this, mt, O(this, mt, "f"), "f"), H(this, et, O(this, et, "f"), "f"), H(this, dt, O(this, dt, "f"), "f"), H(this, Y, O(this, Y, "f"), "f"), O(this, Y, "f").showHiddenOpt = O(this, De, "f"), H(this, se, this[Mr](), "f");
|
|
2602
2603
|
}
|
|
2603
2604
|
addHelpOpt(t, e) {
|
|
2604
2605
|
const n = "help";
|
|
@@ -3264,7 +3265,7 @@ class $o {
|
|
|
3264
3265
|
e[r] = (O(this, Y, "f")[r] || []).filter((o) => !n[o]);
|
|
3265
3266
|
}), i.forEach((r) => {
|
|
3266
3267
|
e[r] = xe(O(this, Y, "f")[r], (o) => !n[o]);
|
|
3267
|
-
}), e.envPrefix = O(this, Y, "f").envPrefix, H(this, Y, e, "f"), H(this, et, O(this, et, "f") ? O(this, et, "f").reset(n) :
|
|
3268
|
+
}), e.envPrefix = O(this, Y, "f").envPrefix, H(this, Y, e, "f"), H(this, et, O(this, et, "f") ? O(this, et, "f").reset(n) : No(this, O(this, tt, "f")), "f"), H(this, dt, O(this, dt, "f") ? O(this, dt, "f").reset(n) : Ro(this, O(this, et, "f"), O(this, tt, "f")), "f"), H(this, mt, O(this, mt, "f") ? O(this, mt, "f").reset() : Io(O(this, et, "f"), O(this, dt, "f"), O(this, At, "f"), O(this, tt, "f")), "f"), O(this, _t, "f") || H(this, _t, So(this, O(this, et, "f"), O(this, mt, "f"), O(this, tt, "f")), "f"), O(this, At, "f").reset(), H(this, Ct, null, "f"), H(this, wt, "", "f"), H(this, Vt, null, "f"), H(this, It, !1, "f"), this.parsed = !1, this;
|
|
3268
3269
|
}
|
|
3269
3270
|
[zr](t, e) {
|
|
3270
3271
|
return O(this, tt, "f").path.relative(t, e);
|
|
@@ -3355,10 +3356,10 @@ class $o {
|
|
|
3355
3356
|
O(this, Y, "f").key[e] = !0;
|
|
3356
3357
|
}
|
|
3357
3358
|
}
|
|
3358
|
-
function
|
|
3359
|
+
function qo(a) {
|
|
3359
3360
|
return !!a && typeof a.getInternalMethods == "function";
|
|
3360
3361
|
}
|
|
3361
|
-
const
|
|
3362
|
+
const Vo = $o(yo);
|
|
3362
3363
|
var sn = {}, kr;
|
|
3363
3364
|
function Jn() {
|
|
3364
3365
|
return kr || (kr = 1, function() {
|
|
@@ -7354,7 +7355,7 @@ function aa() {
|
|
|
7354
7355
|
}
|
|
7355
7356
|
return C.prototype = D.prototype, w.prototype = new C(), w.__super__ = D.prototype, w;
|
|
7356
7357
|
}, y = {}.hasOwnProperty;
|
|
7357
|
-
l = sa(), s = Kn, t = oa(), o = hs(), E =
|
|
7358
|
+
l = sa(), s = Kn, t = oa(), o = hs(), E = _s.setImmediate, e = Jn().defaults, i = function(w) {
|
|
7358
7359
|
return typeof w == "object" && w != null && Object.keys(w).length === 0;
|
|
7359
7360
|
}, r = function(w, D, _) {
|
|
7360
7361
|
var C, T, I;
|
|
@@ -7628,7 +7629,7 @@ class ua {
|
|
|
7628
7629
|
}
|
|
7629
7630
|
getOrCreateScriptId(t) {
|
|
7630
7631
|
let e = this.scriptIdByUrl.get(t);
|
|
7631
|
-
return e || (e =
|
|
7632
|
+
return e || (e = vs("sha256").update(String(this.nextScriptId++)).digest("hex").slice(0, 16), this.scriptIdByUrl.set(t, e)), e;
|
|
7632
7633
|
}
|
|
7633
7634
|
// Utility: escape and quote Xdebug fullname for property_get
|
|
7634
7635
|
formatPropertyFullName(t) {
|
|
@@ -8187,12 +8188,12 @@ class ua {
|
|
|
8187
8188
|
async function ca(a) {
|
|
8188
8189
|
const t = a.cdpPort ?? 9229, e = a.dbgpPort ?? 9003, n = a.cdpHost ?? "localhost", s = a.phpRoot ?? process.cwd(), i = a.breakOnFirstLine ?? !1;
|
|
8189
8190
|
Pt.log("Starting XDebug Bridge...");
|
|
8190
|
-
const r = new
|
|
8191
|
+
const r = new $s(t);
|
|
8191
8192
|
Pt.log("Connect Chrome DevTools to CDP at:"), Pt.log(
|
|
8192
8193
|
`devtools://devtools/bundled/inspector.html?ws=${n}:${t}
|
|
8193
8194
|
`
|
|
8194
8195
|
), await new Promise((p) => r.on("clientConnected", p)), await new Promise((p) => setTimeout(p, 2e3)), Pt.log("Chrome connected! Initializing Xdebug receiver...");
|
|
8195
|
-
const o = new
|
|
8196
|
+
const o = new Ws(e);
|
|
8196
8197
|
Pt.log(`XDebug receiver running on port ${e}`), Pt.log("Running a PHP script with Xdebug enabled...");
|
|
8197
8198
|
function l(p) {
|
|
8198
8199
|
const y = [], w = $i(p);
|
|
@@ -8216,7 +8217,7 @@ const ds = {
|
|
|
8216
8217
|
Debug: { name: "debug", severity: xt.Debug }
|
|
8217
8218
|
};
|
|
8218
8219
|
function la() {
|
|
8219
|
-
return
|
|
8220
|
+
return Vo(uo(process.argv)).usage(
|
|
8220
8221
|
`
|
|
8221
8222
|
XDebug Bridge Server CLI
|
|
8222
8223
|
|
|
@@ -8251,7 +8252,7 @@ Examples:
|
|
|
8251
8252
|
`
|
|
8252
8253
|
).wrap(null).parseSync();
|
|
8253
8254
|
}
|
|
8254
|
-
async function
|
|
8255
|
+
async function Ea() {
|
|
8255
8256
|
const a = la();
|
|
8256
8257
|
if (a.help)
|
|
8257
8258
|
return;
|
|
@@ -8269,9 +8270,9 @@ async function wa() {
|
|
|
8269
8270
|
})).start();
|
|
8270
8271
|
}
|
|
8271
8272
|
export {
|
|
8272
|
-
|
|
8273
|
-
|
|
8273
|
+
$s as C,
|
|
8274
|
+
Ws as D,
|
|
8274
8275
|
ua as X,
|
|
8275
|
-
|
|
8276
|
+
Ea as m,
|
|
8276
8277
|
ca as s
|
|
8277
8278
|
};
|