@xyo-network/wallet-xl1-cli 0.1.10 → 0.1.12
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/bin/wallet.mjs +240 -65
- package/package.json +2 -2
package/dist/bin/wallet.mjs
CHANGED
|
@@ -9884,7 +9884,7 @@ var init_locales = __esmMin((() => {
|
|
|
9884
9884
|
}));
|
|
9885
9885
|
//#endregion
|
|
9886
9886
|
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.js
|
|
9887
|
-
function registry$
|
|
9887
|
+
function registry$3() {
|
|
9888
9888
|
return new $ZodRegistry();
|
|
9889
9889
|
}
|
|
9890
9890
|
var _a$5, $output, $input, $ZodRegistry, globalRegistry;
|
|
@@ -9930,7 +9930,7 @@ var init_registries = __esmMin((() => {
|
|
|
9930
9930
|
return this._map.has(schema);
|
|
9931
9931
|
}
|
|
9932
9932
|
};
|
|
9933
|
-
(_a$5 = globalThis).__zod_globalRegistry ?? (_a$5.__zod_globalRegistry = registry$
|
|
9933
|
+
(_a$5 = globalThis).__zod_globalRegistry ?? (_a$5.__zod_globalRegistry = registry$3());
|
|
9934
9934
|
globalRegistry = globalThis.__zod_globalRegistry;
|
|
9935
9935
|
}));
|
|
9936
9936
|
//#endregion
|
|
@@ -12080,7 +12080,7 @@ var core_exports = /* @__PURE__ */ __exportAll({
|
|
|
12080
12080
|
prettifyError: () => prettifyError,
|
|
12081
12081
|
process: () => process$4,
|
|
12082
12082
|
regexes: () => regexes_exports,
|
|
12083
|
-
registry: () => registry$
|
|
12083
|
+
registry: () => registry$3,
|
|
12084
12084
|
safeDecode: () => safeDecode$1,
|
|
12085
12085
|
safeDecodeAsync: () => safeDecodeAsync$1,
|
|
12086
12086
|
safeEncode: () => safeEncode$1,
|
|
@@ -16883,15 +16883,15 @@ function algorithmFromAddress(address) {
|
|
|
16883
16883
|
return algorithm;
|
|
16884
16884
|
}
|
|
16885
16885
|
function registerVerifier(algorithm, fn) {
|
|
16886
|
-
registry$
|
|
16886
|
+
registry$2[algorithm] = fn;
|
|
16887
16887
|
}
|
|
16888
16888
|
async function verifySignature(address, hash, signature) {
|
|
16889
16889
|
const algorithm = algorithmFromAddress(address);
|
|
16890
|
-
const fn = registry$
|
|
16890
|
+
const fn = registry$2[algorithm];
|
|
16891
16891
|
if (!fn) throw new Error(`No verifier registered for algorithm [${algorithm}]. Did you import the account package?`);
|
|
16892
16892
|
return await fn(address, hash, signature);
|
|
16893
16893
|
}
|
|
16894
|
-
var isPhraseInitializationConfig, isPrivateKeyInitializationConfig, isMnemonicInitializationConfig, isAccountInstance, AlgorithmHrpEntries, AccountAlgorithmHrp, HrpToAlgorithm, JwtAlg, JwtTyp, JwtSchema, registry$
|
|
16894
|
+
var isPhraseInitializationConfig, isPrivateKeyInitializationConfig, isMnemonicInitializationConfig, isAccountInstance, AlgorithmHrpEntries, AccountAlgorithmHrp, HrpToAlgorithm, JwtAlg, JwtTyp, JwtSchema, registry$2;
|
|
16895
16895
|
var init_account_model = __esmMin((() => {
|
|
16896
16896
|
init_node$4();
|
|
16897
16897
|
init_address$5();
|
|
@@ -16917,7 +16917,7 @@ var init_account_model = __esmMin((() => {
|
|
|
16917
16917
|
JwtAlg = Enum({ ES256K: "ES256K" });
|
|
16918
16918
|
JwtTyp = Enum({ JWT: "JWT" });
|
|
16919
16919
|
JwtSchema = Enum({ Signin: "network.xyo.auth.signin" });
|
|
16920
|
-
registry$
|
|
16920
|
+
registry$2 = {};
|
|
16921
16921
|
}));
|
|
16922
16922
|
//#endregion
|
|
16923
16923
|
//#region ../../node_modules/.pnpm/@bitauth+libauth@3.0.0/node_modules/@bitauth/libauth/build/lib/format/error.js
|
|
@@ -73845,7 +73845,7 @@ var require_node$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
73845
73845
|
* Module dependencies.
|
|
73846
73846
|
*/
|
|
73847
73847
|
const tty$1 = __require$1("tty");
|
|
73848
|
-
const util$
|
|
73848
|
+
const util$3 = __require$1("util");
|
|
73849
73849
|
/**
|
|
73850
73850
|
* This is the Node.js implementation of `debug()`.
|
|
73851
73851
|
*/
|
|
@@ -73855,7 +73855,7 @@ var require_node$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
73855
73855
|
exports.save = save;
|
|
73856
73856
|
exports.load = load;
|
|
73857
73857
|
exports.useColors = useColors;
|
|
73858
|
-
exports.destroy = util$
|
|
73858
|
+
exports.destroy = util$3.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
73859
73859
|
/**
|
|
73860
73860
|
* Colors.
|
|
73861
73861
|
*/
|
|
@@ -73996,7 +73996,7 @@ var require_node$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
73996
73996
|
* Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
|
|
73997
73997
|
*/
|
|
73998
73998
|
function log(...args) {
|
|
73999
|
-
return process.stderr.write(util$
|
|
73999
|
+
return process.stderr.write(util$3.formatWithOptions(exports.inspectOpts, ...args) + "\n");
|
|
74000
74000
|
}
|
|
74001
74001
|
/**
|
|
74002
74002
|
* Save `namespaces`.
|
|
@@ -74035,14 +74035,14 @@ var require_node$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
74035
74035
|
*/
|
|
74036
74036
|
formatters.o = function(v) {
|
|
74037
74037
|
this.inspectOpts.colors = this.useColors;
|
|
74038
|
-
return util$
|
|
74038
|
+
return util$3.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
74039
74039
|
};
|
|
74040
74040
|
/**
|
|
74041
74041
|
* Map %O to `util.inspect()`, allowing multiple lines if needed.
|
|
74042
74042
|
*/
|
|
74043
74043
|
formatters.O = function(v) {
|
|
74044
74044
|
this.inspectOpts.colors = this.useColors;
|
|
74045
|
-
return util$
|
|
74045
|
+
return util$3.inspect(v, this.inspectOpts);
|
|
74046
74046
|
};
|
|
74047
74047
|
}));
|
|
74048
74048
|
//#endregion
|
|
@@ -74629,7 +74629,7 @@ var init_dist_esm = __esmMin((() => {
|
|
|
74629
74629
|
init_unsubscribe();
|
|
74630
74630
|
}));
|
|
74631
74631
|
//#endregion
|
|
74632
|
-
//#region ../../node_modules/.pnpm/@ariestools+threads@8.1.
|
|
74632
|
+
//#region ../../node_modules/.pnpm/@ariestools+threads@8.1.3_@opentelemetry+api@1.9.1_observable-fns@0.6.1_supports-color@10.2.2_zod@4.4.3/node_modules/@ariestools/threads/dist/node/master/index-node.mjs
|
|
74633
74633
|
function resolveScriptPath(scriptPath, baseURL) {
|
|
74634
74634
|
const makeAbsolute = (filePath) => {
|
|
74635
74635
|
return path.isAbsolute(filePath) ? filePath : path.join(baseURL ?? cwd(), filePath);
|
|
@@ -74637,7 +74637,6 @@ function resolveScriptPath(scriptPath, baseURL) {
|
|
|
74637
74637
|
return makeAbsolute(scriptPath);
|
|
74638
74638
|
}
|
|
74639
74639
|
function initWorkerThreadsWorker() {
|
|
74640
|
-
let allWorkers = [];
|
|
74641
74640
|
class Worker3 extends Worker {
|
|
74642
74641
|
mappedEventListeners;
|
|
74643
74642
|
constructor(scriptPath, options) {
|
|
@@ -74648,7 +74647,10 @@ function initWorkerThreadsWorker() {
|
|
|
74648
74647
|
});
|
|
74649
74648
|
else super(resolvedScriptPath, options);
|
|
74650
74649
|
this.mappedEventListeners = /* @__PURE__ */ new WeakMap();
|
|
74651
|
-
allWorkers.push(this);
|
|
74650
|
+
registry$1.allWorkers.push(this);
|
|
74651
|
+
this.once("exit", () => {
|
|
74652
|
+
registry$1.allWorkers = registry$1.allWorkers.filter((worker) => worker !== this);
|
|
74653
|
+
});
|
|
74652
74654
|
}
|
|
74653
74655
|
addEventListener(eventName, rawListener) {
|
|
74654
74656
|
const listener = (message) => {
|
|
@@ -74662,19 +74664,6 @@ function initWorkerThreadsWorker() {
|
|
|
74662
74664
|
this.off(eventName, listener);
|
|
74663
74665
|
}
|
|
74664
74666
|
}
|
|
74665
|
-
const terminateWorkersAndMaster = () => {
|
|
74666
|
-
(async () => {
|
|
74667
|
-
try {
|
|
74668
|
-
await Promise.all(allWorkers.map((worker) => worker.terminate()));
|
|
74669
|
-
process.exit(0);
|
|
74670
|
-
} catch {
|
|
74671
|
-
process.exit(1);
|
|
74672
|
-
}
|
|
74673
|
-
})();
|
|
74674
|
-
allWorkers = [];
|
|
74675
|
-
};
|
|
74676
|
-
process.on("SIGINT", () => terminateWorkersAndMaster());
|
|
74677
|
-
process.on("SIGTERM", () => terminateWorkersAndMaster());
|
|
74678
74667
|
class BlobWorker2 extends Worker3 {
|
|
74679
74668
|
constructor(blob, options) {
|
|
74680
74669
|
super(Buffer.from(blob).toString("utf-8"), {
|
|
@@ -74935,13 +74924,17 @@ async function spawn$1(worker, options) {
|
|
|
74935
74924
|
const type = exposed.type;
|
|
74936
74925
|
throw new Error(`Worker init message states unexpected type of expose(): ${type}`);
|
|
74937
74926
|
}
|
|
74938
|
-
var import_src$13, import_src$14, import_src$15, implementation, defaultPoolSize2, PoolEventType, $errors, $events, $terminate, $transferable, $worker, Thread, nextPoolID, WorkerPool, Pool, DefaultErrorSerializer, isSerializedError, doNothing, doNothing2, returnInput, runDeferred, ObservablePromise, debugMessages, nextJobUID, dedupe, isJobErrorMessage, isJobResultMessage, isJobStartMessage, debugMessages2, debugSpawn, debugThreadUtils, isInitMessage, isUncaughtErrorMessage, workerInitTimeout, initMessageTimeout, Worker2;
|
|
74927
|
+
var import_src$13, import_src$14, import_src$15, registry$1, implementation, defaultPoolSize2, PoolEventType, $errors, $events, $terminate, $transferable, $worker, Thread, nextPoolID, WorkerPool, Pool, DefaultErrorSerializer, isSerializedError, doNothing, doNothing2, returnInput, runDeferred, ObservablePromise, debugMessages, nextJobUID, dedupe, isJobErrorMessage, isJobResultMessage, isJobStartMessage, debugMessages2, debugSpawn, debugThreadUtils, isInitMessage, isUncaughtErrorMessage, workerInitTimeout, initMessageTimeout, Worker2;
|
|
74939
74928
|
var init_index_node = __esmMin((() => {
|
|
74940
74929
|
import_src$13 = /* @__PURE__ */ __toESM(require_src$17(), 1);
|
|
74941
74930
|
init_dist_esm();
|
|
74942
74931
|
import_src$14 = /* @__PURE__ */ __toESM(require_src$17(), 1);
|
|
74943
74932
|
import_src$15 = /* @__PURE__ */ __toESM(require_src$17(), 1);
|
|
74944
74933
|
cpus().length;
|
|
74934
|
+
registry$1 = {
|
|
74935
|
+
allWorkers: [],
|
|
74936
|
+
signalHandlers: /* @__PURE__ */ new Map()
|
|
74937
|
+
};
|
|
74945
74938
|
defaultPoolSize2 = typeof navigator !== "undefined" && navigator.hardwareConcurrency !== 0 ? navigator.hardwareConcurrency : 4;
|
|
74946
74939
|
PoolEventType = /* @__PURE__ */ ((PoolEventType2) => {
|
|
74947
74940
|
PoolEventType2["initialized"] = "initialized";
|
|
@@ -87858,7 +87851,7 @@ var require_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
87858
87851
|
};
|
|
87859
87852
|
}));
|
|
87860
87853
|
//#endregion
|
|
87861
|
-
//#region ../../node_modules/.pnpm/fast-uri@3.1.
|
|
87854
|
+
//#region ../../node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/utils.js
|
|
87862
87855
|
var require_utils$7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
87863
87856
|
/** @type {(value: string) => boolean} */
|
|
87864
87857
|
const isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
@@ -88230,7 +88223,7 @@ var require_utils$7 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
88230
88223
|
};
|
|
88231
88224
|
}));
|
|
88232
88225
|
//#endregion
|
|
88233
|
-
//#region ../../node_modules/.pnpm/fast-uri@3.1.
|
|
88226
|
+
//#region ../../node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/schemes.js
|
|
88234
88227
|
var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
88235
88228
|
const { isUUID } = require_utils$7();
|
|
88236
88229
|
const URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
@@ -88413,7 +88406,7 @@ var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
88413
88406
|
};
|
|
88414
88407
|
}));
|
|
88415
88408
|
//#endregion
|
|
88416
|
-
//#region ../../node_modules/.pnpm/fast-uri@3.1.
|
|
88409
|
+
//#region ../../node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/index.js
|
|
88417
88410
|
var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
88418
88411
|
const { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils$7();
|
|
88419
88412
|
const { SCHEMES, getSchemeHandler } = require_schemes();
|
|
@@ -88552,6 +88545,7 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
88552
88545
|
return uriTokens.join("");
|
|
88553
88546
|
}
|
|
88554
88547
|
const URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
88548
|
+
const AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
|
|
88555
88549
|
/**
|
|
88556
88550
|
* @param {import('./types/index').URIComponent} parsed
|
|
88557
88551
|
* @param {RegExpMatchArray} matches
|
|
@@ -88582,6 +88576,11 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
88582
88576
|
let isIP = false;
|
|
88583
88577
|
if (options.reference === "suffix") if (options.scheme) uri = options.scheme + ":" + uri;
|
|
88584
88578
|
else uri = "//" + uri;
|
|
88579
|
+
const authorityMatch = uri.match(AUTHORITY_PREFIX);
|
|
88580
|
+
if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
|
|
88581
|
+
parsed.error = "URI authority must not contain a literal backslash.";
|
|
88582
|
+
malformedAuthorityOrPort = true;
|
|
88583
|
+
}
|
|
88585
88584
|
const matches = uri.match(URI_PARSE);
|
|
88586
88585
|
if (matches) {
|
|
88587
88586
|
parsed.scheme = matches[1];
|
|
@@ -99155,7 +99154,7 @@ var external_exports = /* @__PURE__ */ __exportAll({
|
|
|
99155
99154
|
refine: () => refine$1,
|
|
99156
99155
|
regex: () => _regex,
|
|
99157
99156
|
regexes: () => regexes_exports,
|
|
99158
|
-
registry: () => registry$
|
|
99157
|
+
registry: () => registry$3,
|
|
99159
99158
|
safeDecode: () => safeDecode,
|
|
99160
99159
|
safeDecodeAsync: () => safeDecodeAsync,
|
|
99161
99160
|
safeEncode: () => safeEncode,
|
|
@@ -100949,7 +100948,7 @@ var require_is_arrayish = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
100949
100948
|
//#endregion
|
|
100950
100949
|
//#region ../../node_modules/.pnpm/error-ex@1.3.4/node_modules/error-ex/index.js
|
|
100951
100950
|
var require_error_ex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
100952
|
-
var util$
|
|
100951
|
+
var util$2 = __require$1("util");
|
|
100953
100952
|
var isArrayish = require_is_arrayish();
|
|
100954
100953
|
var errorEx = function errorEx(name, properties) {
|
|
100955
100954
|
if (!name || name.constructor !== String) {
|
|
@@ -101010,7 +101009,7 @@ var require_error_ex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
101010
101009
|
if (Object.setPrototypeOf) {
|
|
101011
101010
|
Object.setPrototypeOf(errorExError.prototype, Error.prototype);
|
|
101012
101011
|
Object.setPrototypeOf(errorExError, Error);
|
|
101013
|
-
} else util$
|
|
101012
|
+
} else util$2.inherits(errorExError, Error);
|
|
101014
101013
|
return errorExError;
|
|
101015
101014
|
};
|
|
101016
101015
|
errorEx.append = function(str, def) {
|
|
@@ -261549,7 +261548,7 @@ var init_dist_node = __esmMin((() => {
|
|
|
261549
261548
|
init_version$1();
|
|
261550
261549
|
}));
|
|
261551
261550
|
//#endregion
|
|
261552
|
-
//#region ../../node_modules/.pnpm/@metamask+superstruct@3.
|
|
261551
|
+
//#region ../../node_modules/.pnpm/@metamask+superstruct@3.4.1/node_modules/@metamask/superstruct/dist/error.mjs
|
|
261553
261552
|
var StructError;
|
|
261554
261553
|
var init_error = __esmMin((() => {
|
|
261555
261554
|
StructError = class extends TypeError {
|
|
@@ -261569,7 +261568,7 @@ var init_error = __esmMin((() => {
|
|
|
261569
261568
|
};
|
|
261570
261569
|
}));
|
|
261571
261570
|
//#endregion
|
|
261572
|
-
//#region ../../node_modules/.pnpm/@metamask+superstruct@3.
|
|
261571
|
+
//#region ../../node_modules/.pnpm/@metamask+superstruct@3.4.1/node_modules/@metamask/superstruct/dist/utils.mjs
|
|
261573
261572
|
/**
|
|
261574
261573
|
* Check if a value is an iterator.
|
|
261575
261574
|
*
|
|
@@ -261718,7 +261717,7 @@ function* run(value, struct, options = {}) {
|
|
|
261718
261717
|
}
|
|
261719
261718
|
var init_utils$5 = __esmMin((() => {}));
|
|
261720
261719
|
//#endregion
|
|
261721
|
-
//#region ../../node_modules/.pnpm/@metamask+superstruct@3.
|
|
261720
|
+
//#region ../../node_modules/.pnpm/@metamask+superstruct@3.4.1/node_modules/@metamask/superstruct/dist/struct.mjs
|
|
261722
261721
|
/**
|
|
261723
261722
|
* Assert that a value passes a struct, throwing if it doesn't.
|
|
261724
261723
|
*
|
|
@@ -261812,6 +261811,7 @@ var init_struct = __esmMin((() => {
|
|
|
261812
261811
|
return toFailures(refiner(value, context), context, this, value);
|
|
261813
261812
|
};
|
|
261814
261813
|
else this.refiner = () => [];
|
|
261814
|
+
for (const sym of Object.getOwnPropertySymbols(props)) Object.defineProperty(this, sym, Object.getOwnPropertyDescriptor(props, sym));
|
|
261815
261815
|
}
|
|
261816
261816
|
/**
|
|
261817
261817
|
* Assert that a value passes the struct's validation, throwing if it doesn't.
|
|
@@ -261865,7 +261865,124 @@ var init_struct = __esmMin((() => {
|
|
|
261865
261865
|
};
|
|
261866
261866
|
}));
|
|
261867
261867
|
//#endregion
|
|
261868
|
-
//#region ../../node_modules/.pnpm/@metamask+superstruct@3.
|
|
261868
|
+
//#region ../../node_modules/.pnpm/@metamask+superstruct@3.4.1/node_modules/@metamask/superstruct/dist/structs/sensitive.mjs
|
|
261869
|
+
/**
|
|
261870
|
+
* Check whether a struct was created by `sensitive()`, or wraps one.
|
|
261871
|
+
*
|
|
261872
|
+
* @param struct - The struct to check.
|
|
261873
|
+
* @returns `true` if the struct carries the sensitive brand.
|
|
261874
|
+
*/
|
|
261875
|
+
function isSensitiveStruct(struct) {
|
|
261876
|
+
return Object.prototype.hasOwnProperty.call(struct, SENSITIVE_BRAND);
|
|
261877
|
+
}
|
|
261878
|
+
/**
|
|
261879
|
+
* Return a shallow copy of `sourceObj` with each key in `keys` replaced by
|
|
261880
|
+
* the redaction placeholder.
|
|
261881
|
+
*
|
|
261882
|
+
* @param sourceObj - The source object to copy and redact.
|
|
261883
|
+
* @param keys - The property names to redact.
|
|
261884
|
+
* @returns A shallow copy with the specified keys replaced.
|
|
261885
|
+
*/
|
|
261886
|
+
function redactKeys(sourceObj, keys) {
|
|
261887
|
+
const redacted = { ...sourceObj };
|
|
261888
|
+
for (const key of keys) if (key in redacted) redacted[key] = SENSITIVE_REDACTED;
|
|
261889
|
+
return redacted;
|
|
261890
|
+
}
|
|
261891
|
+
/**
|
|
261892
|
+
* Wrap a struct so that every failure it emits has any occurrence of
|
|
261893
|
+
* `parentObj` in `failure.branch` replaced with a sanitised copy where
|
|
261894
|
+
* `sensitiveKeys` are redacted. This prevents the parent object (which holds
|
|
261895
|
+
* secret field values) from leaking through sibling-field failures.
|
|
261896
|
+
*
|
|
261897
|
+
* The wrapping propagates recursively through `entries` so that failures from
|
|
261898
|
+
* deeply nested sibling structs are covered too.
|
|
261899
|
+
*
|
|
261900
|
+
* @param struct - The struct whose failures should be patched.
|
|
261901
|
+
* @param parentObj - The parent-object reference to look for in branch arrays.
|
|
261902
|
+
* @param sensitiveKeys - Keys to redact from `parentObj` when it appears.
|
|
261903
|
+
* @returns The wrapped struct.
|
|
261904
|
+
*/
|
|
261905
|
+
function withRedactedBranch(struct, parentObj, sensitiveKeys) {
|
|
261906
|
+
function* redactBranch(failures) {
|
|
261907
|
+
for (const failure of failures) {
|
|
261908
|
+
if (!isObject$1(parentObj)) {
|
|
261909
|
+
yield failure;
|
|
261910
|
+
continue;
|
|
261911
|
+
}
|
|
261912
|
+
const parentIndex = failure.branch.indexOf(parentObj);
|
|
261913
|
+
if (parentIndex === -1) {
|
|
261914
|
+
yield failure;
|
|
261915
|
+
continue;
|
|
261916
|
+
}
|
|
261917
|
+
const branch = [...failure.branch];
|
|
261918
|
+
branch[parentIndex] = redactKeys(parentObj, sensitiveKeys);
|
|
261919
|
+
for (let ancestorIndex = parentIndex - 1; ancestorIndex >= 0; ancestorIndex--) {
|
|
261920
|
+
const ancestor = branch[ancestorIndex];
|
|
261921
|
+
if (!isObject$1(ancestor)) break;
|
|
261922
|
+
const child = failure.branch[ancestorIndex + 1];
|
|
261923
|
+
const childSanitized = branch[ancestorIndex + 1];
|
|
261924
|
+
if (Array.isArray(ancestor)) {
|
|
261925
|
+
const childIndex = ancestor.indexOf(child);
|
|
261926
|
+
if (childIndex === -1) break;
|
|
261927
|
+
const copy = [...ancestor];
|
|
261928
|
+
copy[childIndex] = childSanitized;
|
|
261929
|
+
branch[ancestorIndex] = copy;
|
|
261930
|
+
} else if (ancestor instanceof Map) {
|
|
261931
|
+
let childFound = false;
|
|
261932
|
+
let childKey;
|
|
261933
|
+
for (const [entryKey, entryValue] of ancestor) if (entryValue === child) {
|
|
261934
|
+
childKey = entryKey;
|
|
261935
|
+
childFound = true;
|
|
261936
|
+
break;
|
|
261937
|
+
}
|
|
261938
|
+
if (!childFound) break;
|
|
261939
|
+
const copy = new Map(ancestor);
|
|
261940
|
+
copy.set(childKey, childSanitized);
|
|
261941
|
+
branch[ancestorIndex] = copy;
|
|
261942
|
+
} else {
|
|
261943
|
+
const childKey = Object.keys(ancestor).find((key) => ancestor[key] === child);
|
|
261944
|
+
if (childKey === void 0) break;
|
|
261945
|
+
branch[ancestorIndex] = {
|
|
261946
|
+
...ancestor,
|
|
261947
|
+
[childKey]: childSanitized
|
|
261948
|
+
};
|
|
261949
|
+
}
|
|
261950
|
+
}
|
|
261951
|
+
yield {
|
|
261952
|
+
...failure,
|
|
261953
|
+
branch
|
|
261954
|
+
};
|
|
261955
|
+
}
|
|
261956
|
+
}
|
|
261957
|
+
return new Struct({
|
|
261958
|
+
...struct,
|
|
261959
|
+
validator(value, context) {
|
|
261960
|
+
return redactBranch(struct.validator(value, context));
|
|
261961
|
+
},
|
|
261962
|
+
refiner(value, context) {
|
|
261963
|
+
return redactBranch(struct.refiner(value, context));
|
|
261964
|
+
},
|
|
261965
|
+
*entries(value, context) {
|
|
261966
|
+
for (const entry of struct.entries(value, context)) {
|
|
261967
|
+
const [fieldKey, fieldValue, fieldStruct] = entry;
|
|
261968
|
+
yield [
|
|
261969
|
+
fieldKey,
|
|
261970
|
+
fieldValue,
|
|
261971
|
+
withRedactedBranch(fieldStruct, parentObj, sensitiveKeys)
|
|
261972
|
+
];
|
|
261973
|
+
}
|
|
261974
|
+
}
|
|
261975
|
+
});
|
|
261976
|
+
}
|
|
261977
|
+
var SENSITIVE_REDACTED, SENSITIVE_BRAND;
|
|
261978
|
+
var init_sensitive = __esmMin((() => {
|
|
261979
|
+
init_struct();
|
|
261980
|
+
init_utils$5();
|
|
261981
|
+
SENSITIVE_REDACTED = "***";
|
|
261982
|
+
SENSITIVE_BRAND = Symbol.for("superstruct.sensitive");
|
|
261983
|
+
}));
|
|
261984
|
+
//#endregion
|
|
261985
|
+
//#region ../../node_modules/.pnpm/@metamask+superstruct@3.4.1/node_modules/@metamask/superstruct/dist/structs/utilities.mjs
|
|
261869
261986
|
/**
|
|
261870
261987
|
* Define a new struct type with a custom validation function.
|
|
261871
261988
|
*
|
|
@@ -261885,7 +262002,39 @@ var init_utilities = __esmMin((() => {
|
|
|
261885
262002
|
init_types$1();
|
|
261886
262003
|
}));
|
|
261887
262004
|
//#endregion
|
|
261888
|
-
//#region ../../node_modules/.pnpm/@metamask+superstruct@3.
|
|
262005
|
+
//#region ../../node_modules/.pnpm/@metamask+superstruct@3.4.1/node_modules/@metamask/superstruct/dist/structs/types.mjs
|
|
262006
|
+
/**
|
|
262007
|
+
* Wrap a base struct so that entry-level failures from sibling fields have the
|
|
262008
|
+
* parent object's sensitive keys redacted from their branch. If `schema`
|
|
262009
|
+
* contains no sensitive-marked fields, `base` is returned as-is to avoid the
|
|
262010
|
+
* overhead of wrapping every entry.
|
|
262011
|
+
*
|
|
262012
|
+
* Used by both `object()` and `type()` to share the sensitive-entry wrapping
|
|
262013
|
+
* logic without duplication.
|
|
262014
|
+
*
|
|
262015
|
+
* @param base - The base struct to potentially wrap.
|
|
262016
|
+
* @param schema - The object schema to inspect for sensitive fields.
|
|
262017
|
+
* @returns The wrapped struct, or `base` unchanged when no sensitive fields
|
|
262018
|
+
* are present.
|
|
262019
|
+
*/
|
|
262020
|
+
function withSensitiveEntries(base, schema) {
|
|
262021
|
+
const sensitiveKeys = Object.keys(schema).filter((key) => schema[key] !== void 0 && isSensitiveStruct(schema[key]));
|
|
262022
|
+
if (sensitiveKeys.length === 0) return base;
|
|
262023
|
+
return new Struct({
|
|
262024
|
+
...base,
|
|
262025
|
+
*entries(value, context) {
|
|
262026
|
+
const parentInBranch = context.branch[context.branch.length - 1] ?? value;
|
|
262027
|
+
for (const entry of base.entries(value, context)) {
|
|
262028
|
+
const [fieldKey, fieldValue, fieldStruct] = entry;
|
|
262029
|
+
yield [
|
|
262030
|
+
fieldKey,
|
|
262031
|
+
fieldValue,
|
|
262032
|
+
withRedactedBranch(fieldStruct, parentInBranch, sensitiveKeys)
|
|
262033
|
+
];
|
|
262034
|
+
}
|
|
262035
|
+
}
|
|
262036
|
+
});
|
|
262037
|
+
}
|
|
261889
262038
|
/**
|
|
261890
262039
|
* Ensure that any value passes validation.
|
|
261891
262040
|
*
|
|
@@ -262014,7 +262163,7 @@ function number() {
|
|
|
262014
262163
|
function object$1(schema) {
|
|
262015
262164
|
const knowns = schema ? Object.keys(schema) : [];
|
|
262016
262165
|
const Never = never();
|
|
262017
|
-
|
|
262166
|
+
const base = new Struct({
|
|
262018
262167
|
type: "object",
|
|
262019
262168
|
schema: schema ?? null,
|
|
262020
262169
|
*entries(value) {
|
|
@@ -262044,6 +262193,8 @@ function object$1(schema) {
|
|
|
262044
262193
|
return isObject$1(value) ? { ...value } : value;
|
|
262045
262194
|
}
|
|
262046
262195
|
});
|
|
262196
|
+
if (!schema) return base;
|
|
262197
|
+
return withSensitiveEntries(base, schema);
|
|
262047
262198
|
}
|
|
262048
262199
|
/**
|
|
262049
262200
|
* Augment a struct to allow `undefined` values.
|
|
@@ -262148,10 +262299,11 @@ function unknown() {
|
|
|
262148
262299
|
var init_types$1 = __esmMin((() => {
|
|
262149
262300
|
init_struct();
|
|
262150
262301
|
init_utils$5();
|
|
262302
|
+
init_sensitive();
|
|
262151
262303
|
init_utilities();
|
|
262152
262304
|
}));
|
|
262153
262305
|
//#endregion
|
|
262154
|
-
//#region ../../node_modules/.pnpm/@metamask+superstruct@3.
|
|
262306
|
+
//#region ../../node_modules/.pnpm/@metamask+superstruct@3.4.1/node_modules/@metamask/superstruct/dist/structs/coercions.mjs
|
|
262155
262307
|
/**
|
|
262156
262308
|
* Augment a `Struct` to add an additional coercion step to its input.
|
|
262157
262309
|
*
|
|
@@ -262182,7 +262334,7 @@ var init_coercions = __esmMin((() => {
|
|
|
262182
262334
|
init_types$1();
|
|
262183
262335
|
}));
|
|
262184
262336
|
//#endregion
|
|
262185
|
-
//#region ../../node_modules/.pnpm/@metamask+superstruct@3.
|
|
262337
|
+
//#region ../../node_modules/.pnpm/@metamask+superstruct@3.4.1/node_modules/@metamask/superstruct/dist/structs/refinements.mjs
|
|
262186
262338
|
/**
|
|
262187
262339
|
* Ensure that a string matches a regular expression.
|
|
262188
262340
|
*
|
|
@@ -262250,12 +262402,13 @@ var init_refinements = __esmMin((() => {
|
|
|
262250
262402
|
init_utils$5();
|
|
262251
262403
|
}));
|
|
262252
262404
|
//#endregion
|
|
262253
|
-
//#region ../../node_modules/.pnpm/@metamask+superstruct@3.
|
|
262405
|
+
//#region ../../node_modules/.pnpm/@metamask+superstruct@3.4.1/node_modules/@metamask/superstruct/dist/index.mjs
|
|
262254
262406
|
var init_dist$5 = __esmMin((() => {
|
|
262255
262407
|
init_error();
|
|
262256
262408
|
init_struct();
|
|
262257
262409
|
init_coercions();
|
|
262258
262410
|
init_refinements();
|
|
262411
|
+
init_sensitive();
|
|
262259
262412
|
init_types$1();
|
|
262260
262413
|
init_utilities();
|
|
262261
262414
|
}));
|
|
@@ -347727,7 +347880,7 @@ var require_server = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
347727
347880
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
347728
347881
|
exports.Server = void 0;
|
|
347729
347882
|
const http2 = __require$1("http2");
|
|
347730
|
-
const util
|
|
347883
|
+
const util = __require$1("util");
|
|
347731
347884
|
const constants_1 = require_constants();
|
|
347732
347885
|
const server_call_1 = require_server_call();
|
|
347733
347886
|
const server_credentials_1 = require_server_credentials();
|
|
@@ -347755,7 +347908,7 @@ var require_server = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
347755
347908
|
*/
|
|
347756
347909
|
function deprecate(message) {
|
|
347757
347910
|
return function(target, context) {
|
|
347758
|
-
return util
|
|
347911
|
+
return util.deprecate(target, message);
|
|
347759
347912
|
};
|
|
347760
347913
|
}
|
|
347761
347914
|
function getUnimplementedStatusResponse(methodName) {
|
|
@@ -354953,7 +355106,7 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
354953
355106
|
exports.getProcessMemoryData = getProcessMemoryData;
|
|
354954
355107
|
}));
|
|
354955
355108
|
//#endregion
|
|
354956
|
-
//#region ../../node_modules/.pnpm/systeminformation@5.
|
|
355109
|
+
//#region ../../node_modules/.pnpm/systeminformation@5.33.0/node_modules/systeminformation/lib/util.js
|
|
354957
355110
|
var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
354958
355111
|
const os$2 = __require$1("os");
|
|
354959
355112
|
const fs$1 = __require$1("fs");
|
|
@@ -354961,7 +355114,7 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
354961
355114
|
const spawn = __require$1("child_process").spawn;
|
|
354962
355115
|
const exec$1 = __require$1("child_process").exec;
|
|
354963
355116
|
const execSync$1 = __require$1("child_process").execSync;
|
|
354964
|
-
|
|
355117
|
+
__require$1("util");
|
|
354965
355118
|
const _platform = process.platform;
|
|
354966
355119
|
const _linux = _platform === "linux" || _platform === "android";
|
|
354967
355120
|
const _darwin = _platform === "darwin";
|
|
@@ -355110,7 +355263,8 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
355110
355263
|
const parts = t.split(splitter);
|
|
355111
355264
|
if (parts.length >= 2) {
|
|
355112
355265
|
if (parts[2]) parts[1] += parts[2];
|
|
355113
|
-
|
|
355266
|
+
const p1 = (parts[1] || "").toLowerCase();
|
|
355267
|
+
let isPM = p1.indexOf("pm") > -1 || p1.indexOf("p.m.") > -1 || p1.indexOf("p. m.") > -1 || p1.indexOf("n") > -1 || p1.indexOf("ch") > -1 || p1.indexOf("ös") > -1 || pmDesignator && p1.indexOf(pmDesignator) > -1;
|
|
355114
355268
|
hour = parseInt(parts[0], 10);
|
|
355115
355269
|
min = parseInt(parts[1], 10);
|
|
355116
355270
|
hour = isPM && hour < 12 ? hour + 12 : hour;
|
|
@@ -355211,7 +355365,8 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
355211
355365
|
}
|
|
355212
355366
|
}
|
|
355213
355367
|
function getVboxmanage() {
|
|
355214
|
-
|
|
355368
|
+
const vboxPath = (process.env.VBOX_INSTALL_PATH || process.env.VBOX_MSI_INSTALL_PATH || "").replace(/["%!^&|<>`$;\r\n]/g, "");
|
|
355369
|
+
return _windows ? `"${vboxPath}\\VBoxManage.exe"` : "vboxmanage";
|
|
355215
355370
|
}
|
|
355216
355371
|
function powerShellProceedResults(data) {
|
|
355217
355372
|
let id = "";
|
|
@@ -355435,9 +355590,7 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
355435
355590
|
}
|
|
355436
355591
|
if (_linux || _darwin || _freebsd || _openbsd || _netbsd) try {
|
|
355437
355592
|
_smartMonToolsInstalled = execSync$1("which smartctl 2>/dev/null", execOptsLinux).toString().split("\r\n").length > 0;
|
|
355438
|
-
} catch {
|
|
355439
|
-
util.noop();
|
|
355440
|
-
}
|
|
355593
|
+
} catch {}
|
|
355441
355594
|
return _smartMonToolsInstalled;
|
|
355442
355595
|
}
|
|
355443
355596
|
function isRaspberry(cpuinfo) {
|
|
@@ -355517,9 +355670,17 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
355517
355670
|
const s = str || "";
|
|
355518
355671
|
let result = "";
|
|
355519
355672
|
const l = mathMin(s.length, 2e3);
|
|
355520
|
-
for (let i = 0; i <= l; i++) if (!(s[i] === void 0 || s[i] === ">" || s[i] === "<" || s[i] === "*" || s[i] === "?" || s[i] === "[" || s[i] === "]" || s[i] === "|" || s[i] === "˚" || s[i] === "$" || s[i] === ";" || s[i] === "&" || s[i] === "]" || s[i] === "#" || s[i] === "\\" || s[i] === " " || s[i] === "\n" || s[i] === "\r" || s[i] === "'" || s[i] === "`" || s[i] === "\"" || s[i].length > 1 || strict && s[i] === "(" || strict && s[i] === ")" || strict && s[i] === "@" || strict && s[i] === " " || strict && s[i] === "{" || strict && s[i] === ";" || strict && s[i] === "}")) result = result + s[i];
|
|
355673
|
+
for (let i = 0; i <= l; i++) if (!(s[i] === void 0 || s[i] === ">" || s[i] === "<" || s[i] === "*" || s[i] === "?" || s[i] === "[" || s[i] === "]" || s[i] === "|" || s[i] === "˚" || s[i] === "$" || s[i] === ";" || s[i] === "&" || s[i] === "]" || s[i] === "#" || s[i] === "%" || s[i] === "!" || s[i] === "^" || s[i] === "\\" || s[i] === " " || s[i] === "\n" || s[i] === "\r" || s[i] === "'" || s[i] === "`" || s[i] === "\"" || s[i].length > 1 || strict && s[i] === "(" || strict && s[i] === ")" || strict && s[i] === "@" || strict && s[i] === " " || strict && s[i] === "{" || strict && s[i] === ";" || strict && s[i] === "}")) result = result + s[i];
|
|
355521
355674
|
return result;
|
|
355522
355675
|
}
|
|
355676
|
+
function sanitizeContainerID(str) {
|
|
355677
|
+
const s = String(str || "").substring(0, 2e3).replace(/[^a-zA-Z0-9_.,*-]/g, "");
|
|
355678
|
+
return s.indexOf("..") === -1 ? s : "";
|
|
355679
|
+
}
|
|
355680
|
+
function sanitizeImageID(str) {
|
|
355681
|
+
const s = String(str || "").substring(0, 2e3).replace(/[^a-zA-Z0-9_.,:@/-]/g, "");
|
|
355682
|
+
return s.indexOf("..") === -1 ? s : "";
|
|
355683
|
+
}
|
|
355523
355684
|
function isPrototypePolluted() {
|
|
355524
355685
|
const s = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
355525
355686
|
let notPolluted = true;
|
|
@@ -355989,7 +356150,7 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
355989
356150
|
inTagEnd = false;
|
|
355990
356151
|
if (metaData[depth].tagEnd && tags.indexOf(metaData[depth].tagEnd.substr(1)) >= 0) if (metaData[depth].tagEnd === "/dict" || metaData[depth].tagEnd === "/array") {
|
|
355991
356152
|
if (depth > 1 && metaData[depth - 2].tagStart === "array") metaData[depth - 2].data.push(metaData[depth - 1].data);
|
|
355992
|
-
if (depth > 1 && metaData[depth - 2].tagStart === "dict") metaData[depth - 2].data[metaData[depth - 1].key] = metaData[depth - 1].data;
|
|
356153
|
+
if (depth > 1 && metaData[depth - 2].tagStart === "dict" && !isProtoKey(metaData[depth - 1].key)) metaData[depth - 2].data[metaData[depth - 1].key] = metaData[depth - 1].data;
|
|
355993
356154
|
depth--;
|
|
355994
356155
|
metaData.pop();
|
|
355995
356156
|
metaData[depth].tagContent = "";
|
|
@@ -356004,7 +356165,7 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
356004
356165
|
if (metaData[depth].tagEnd === "/boolean") metaData[depth].data = metaData[depth].tagContent || false;
|
|
356005
356166
|
if (metaData[depth].tagEnd === "/arrayEmpty") metaData[depth].data = metaData[depth].tagContent || [];
|
|
356006
356167
|
if (depth > 0 && metaData[depth - 1].tagStart === "array") metaData[depth - 1].data.push(metaData[depth].data);
|
|
356007
|
-
if (depth > 0 && metaData[depth - 1].tagStart === "dict") metaData[depth - 1].data[metaData[depth].key] = metaData[depth].data;
|
|
356168
|
+
if (depth > 0 && metaData[depth - 1].tagStart === "dict" && !isProtoKey(metaData[depth].key)) metaData[depth - 1].data[metaData[depth].key] = metaData[depth].data;
|
|
356008
356169
|
}
|
|
356009
356170
|
metaData[depth].tagContent = "";
|
|
356010
356171
|
metaData[depth].tagStart = "";
|
|
@@ -356056,8 +356217,8 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
356056
356217
|
}
|
|
356057
356218
|
function semverCompare(v1, v2) {
|
|
356058
356219
|
let res = 0;
|
|
356059
|
-
const parts1 = v1.split(".");
|
|
356060
|
-
const parts2 = v2.split(".");
|
|
356220
|
+
const parts1 = v1.split(".").map((p) => parseInt(p, 10) || 0);
|
|
356221
|
+
const parts2 = v2.split(".").map((p) => parseInt(p, 10) || 0);
|
|
356061
356222
|
if (parts1[0] < parts2[0]) res = 1;
|
|
356062
356223
|
else if (parts1[0] > parts2[0]) res = -1;
|
|
356063
356224
|
else if (parts1[0] === parts2[0] && parts1.length >= 2 && parts2.length >= 2) {
|
|
@@ -357378,6 +357539,9 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
357378
357539
|
return str.split("\n").filter((line) => line.includes(pattern)).join("\n");
|
|
357379
357540
|
}
|
|
357380
357541
|
function noop() {}
|
|
357542
|
+
function isProtoKey(key) {
|
|
357543
|
+
return key === "__proto__" || key === "constructor" || key === "prototype";
|
|
357544
|
+
}
|
|
357381
357545
|
exports.toInt = toInt;
|
|
357382
357546
|
exports.splitByNumber = splitByNumber;
|
|
357383
357547
|
exports.execOptsWin = execOptsWin;
|
|
@@ -357406,6 +357570,8 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
357406
357570
|
exports.isRaspberry = isRaspberry;
|
|
357407
357571
|
exports.isRaspbian = isRaspbian;
|
|
357408
357572
|
exports.sanitizeShellString = sanitizeShellString;
|
|
357573
|
+
exports.sanitizeContainerID = sanitizeContainerID;
|
|
357574
|
+
exports.sanitizeImageID = sanitizeImageID;
|
|
357409
357575
|
exports.isPrototypePolluted = isPrototypePolluted;
|
|
357410
357576
|
exports.sanitizeString = sanitizeString;
|
|
357411
357577
|
exports.decodePiCpuinfo = decodePiCpuinfo;
|
|
@@ -357436,7 +357602,7 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
357436
357602
|
exports.getPowershell = getPowershell;
|
|
357437
357603
|
}));
|
|
357438
357604
|
//#endregion
|
|
357439
|
-
//#region ../../node_modules/.pnpm/systeminformation@5.
|
|
357605
|
+
//#region ../../node_modules/.pnpm/systeminformation@5.33.0/node_modules/systeminformation/lib/network.js
|
|
357440
357606
|
var require_network = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
357441
357607
|
const os$1 = __require$1("os");
|
|
357442
357608
|
const exec = __require$1("child_process").exec;
|
|
@@ -357831,8 +357997,10 @@ var require_network = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
357831
357997
|
return "";
|
|
357832
357998
|
}
|
|
357833
357999
|
}
|
|
357834
|
-
function checkLinuxDCHPInterfaces(file) {
|
|
358000
|
+
function checkLinuxDCHPInterfaces(file, depth) {
|
|
357835
358001
|
let result = [];
|
|
358002
|
+
depth = depth || 0;
|
|
358003
|
+
if (depth > 10) return result;
|
|
357836
358004
|
try {
|
|
357837
358005
|
readFileSync$2(file, { encoding: "utf8" }).split("\n").filter((l) => /iface|source/.test(l)).forEach((line) => {
|
|
357838
358006
|
const parts = line.replace(/\s+/g, " ").trim().split(" ");
|
|
@@ -357841,7 +358009,7 @@ var require_network = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
357841
358009
|
}
|
|
357842
358010
|
if (line.toLowerCase().includes("source")) {
|
|
357843
358011
|
const file = line.split(" ")[1];
|
|
357844
|
-
result = result.concat(checkLinuxDCHPInterfaces(file));
|
|
358012
|
+
result = result.concat(checkLinuxDCHPInterfaces(file, depth + 1));
|
|
357845
358013
|
}
|
|
357846
358014
|
});
|
|
357847
358015
|
} catch {
|
|
@@ -358482,7 +358650,7 @@ var require_network = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
358482
358650
|
}
|
|
358483
358651
|
return new Promise((resolve) => {
|
|
358484
358652
|
process.nextTick(() => {
|
|
358485
|
-
const ifaceSanitized = util.sanitizeString(iface);
|
|
358653
|
+
const ifaceSanitized = util.sanitizeString(iface, true);
|
|
358486
358654
|
let result = {
|
|
358487
358655
|
iface: ifaceSanitized,
|
|
358488
358656
|
operstate: "unknown",
|
|
@@ -358534,7 +358702,7 @@ var require_network = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
358534
358702
|
if (line[6].trim() !== "-") rx_dropped = rx_dropped + parseInt(line[6]);
|
|
358535
358703
|
if (line[5].trim() !== "-") rx_errors = rx_errors + parseInt(line[5]);
|
|
358536
358704
|
tx_bytes = tx_bytes + parseInt(line[10]);
|
|
358537
|
-
if (line[12].trim() !== "-") tx_dropped = tx_dropped + parseInt(line[12]);
|
|
358705
|
+
if (line[12] && line[12].trim() !== "-") tx_dropped = tx_dropped + parseInt(line[12]);
|
|
358538
358706
|
if (line[9].trim() !== "-") tx_errors = tx_errors + parseInt(line[9]);
|
|
358539
358707
|
operstate = "up";
|
|
358540
358708
|
}
|
|
@@ -358756,9 +358924,9 @@ var require_network = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
358756
358924
|
const hasState = states.indexOf(line[5]) >= 0;
|
|
358757
358925
|
const connstate = hasState ? line[5] : "UNKNOWN";
|
|
358758
358926
|
let pidField = "";
|
|
358759
|
-
if (line[line.length - 9].indexOf(":") >= 0) pidField = line[line.length - 9].split(":")[1];
|
|
358927
|
+
if (line[line.length - 9] && line[line.length - 9].indexOf(":") >= 0) pidField = line[line.length - 9].split(":")[1];
|
|
358760
358928
|
else {
|
|
358761
|
-
pidField = line[pidPos + (hasState ? 0 : -1)];
|
|
358929
|
+
pidField = line[pidPos + (hasState ? 0 : -1)] || "";
|
|
358762
358930
|
if (pidField.indexOf(":") >= 0) pidField = pidField.split(":")[1];
|
|
358763
358931
|
}
|
|
358764
358932
|
const pid = parseInt(pidField, 10);
|
|
@@ -358777,6 +358945,10 @@ var require_network = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
358777
358945
|
if (callback) callback(result);
|
|
358778
358946
|
resolve(result);
|
|
358779
358947
|
});
|
|
358948
|
+
else {
|
|
358949
|
+
if (callback) callback(result);
|
|
358950
|
+
resolve(result);
|
|
358951
|
+
}
|
|
358780
358952
|
});
|
|
358781
358953
|
}
|
|
358782
358954
|
if (_windows) {
|
|
@@ -358840,6 +359012,9 @@ var require_network = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
358840
359012
|
});
|
|
358841
359013
|
if (callback) callback(result);
|
|
358842
359014
|
resolve(result);
|
|
359015
|
+
} else {
|
|
359016
|
+
if (callback) callback(result);
|
|
359017
|
+
resolve(result);
|
|
358843
359018
|
}
|
|
358844
359019
|
});
|
|
358845
359020
|
} catch {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/wallet-xl1-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "Standalone XL1 Wallet CLI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xyo",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"eslint": "~10.7.0",
|
|
33
33
|
"rolldown": "~1.2.0",
|
|
34
34
|
"typescript": "~6.0.3",
|
|
35
|
-
"@xyo-network/wallet-xl1-cli-lib": "~0.1.
|
|
35
|
+
"@xyo-network/wallet-xl1-cli-lib": "~0.1.12"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
38
|
"node": ">=18.17.1"
|