@camstack/server 1.2.878 → 1.2.879
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/CHANGELOG.md +6 -0
- package/package.json +6 -8
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.mjs +281 -281
- package/system/dist/index.mjs +1 -1
- package/system/dist/{restore-archive-D_K6PqRk.mjs → restore-archive-waz532L0.mjs} +81 -81
- package/system/package.json +1 -1
|
@@ -15,7 +15,7 @@ import os from "node:os";
|
|
|
15
15
|
import { fileURLToPath } from "node:url";
|
|
16
16
|
import { lstatSync, readdir as readdir$1, readdirSync as readdirSync$1, readlinkSync, realpathSync } from "fs";
|
|
17
17
|
import "path";
|
|
18
|
-
import
|
|
18
|
+
import Pe from "node:stream";
|
|
19
19
|
import * as tls from "node:tls";
|
|
20
20
|
import { EventEmitter } from "node:events";
|
|
21
21
|
import { StringDecoder } from "node:string_decoder";
|
|
@@ -21498,8 +21498,8 @@ var require_kleur = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
21498
21498
|
var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
21499
21499
|
var kleur = require_kleur();
|
|
21500
21500
|
var os$17 = __require("os");
|
|
21501
|
-
var path$
|
|
21502
|
-
var fs$
|
|
21501
|
+
var path$40 = __require("path");
|
|
21502
|
+
var fs$20 = __require("fs");
|
|
21503
21503
|
var { TimeoutError } = require_errors$2();
|
|
21504
21504
|
var lut = [];
|
|
21505
21505
|
for (let i = 0; i < 256; i++) lut[i] = (i < 16 ? "0" : "") + i.toString(16);
|
|
@@ -21790,9 +21790,9 @@ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
21790
21790
|
* @param {String} p - directory path
|
|
21791
21791
|
*/
|
|
21792
21792
|
makeDirs(p) {
|
|
21793
|
-
p.split(path$
|
|
21794
|
-
const currentPath = path$
|
|
21795
|
-
if (!fs$
|
|
21793
|
+
p.split(path$40.sep).reduce((prevPath, folder) => {
|
|
21794
|
+
const currentPath = path$40.join(prevPath, folder, path$40.sep);
|
|
21795
|
+
if (!fs$20.existsSync(currentPath)) fs$20.mkdirSync(currentPath);
|
|
21796
21796
|
return currentPath;
|
|
21797
21797
|
}, "");
|
|
21798
21798
|
},
|
|
@@ -23017,8 +23017,8 @@ var require_csv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
23017
23017
|
var BaseReporter = require_base$8();
|
|
23018
23018
|
var { makeDirs } = require_utils$3();
|
|
23019
23019
|
var _ = require_lodash();
|
|
23020
|
-
var path$
|
|
23021
|
-
var fs$
|
|
23020
|
+
var path$39 = __require("path");
|
|
23021
|
+
var fs$19 = __require("fs");
|
|
23022
23022
|
var METRIC = require_constants$6();
|
|
23023
23023
|
var MODE_METRIC = "metric";
|
|
23024
23024
|
var MODE_LABEL = "label";
|
|
@@ -23071,7 +23071,7 @@ var require_csv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
23071
23071
|
this.timer = setInterval(() => this.flush(), this.opts.interval * 1e3);
|
|
23072
23072
|
this.timer.unref();
|
|
23073
23073
|
}
|
|
23074
|
-
this.folder = path$
|
|
23074
|
+
this.folder = path$39.resolve(this.opts.folder);
|
|
23075
23075
|
makeDirs(this.folder);
|
|
23076
23076
|
}
|
|
23077
23077
|
/**
|
|
@@ -23096,10 +23096,10 @@ var require_csv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
23096
23096
|
const metricName = this.formatMetricName(metric.name);
|
|
23097
23097
|
if (this.opts.filenameFormatter) return this.opts.filenameFormatter.call(this, metricName, metric, item);
|
|
23098
23098
|
switch (this.opts.mode) {
|
|
23099
|
-
case MODE_METRIC: return path$
|
|
23099
|
+
case MODE_METRIC: return path$39.join(this.folder, `${metricName}.csv`);
|
|
23100
23100
|
case MODE_LABEL: {
|
|
23101
23101
|
const labelStr = this.labelsToStr(item.labels);
|
|
23102
|
-
return path$
|
|
23102
|
+
return path$39.join(this.folder, metricName, `${metricName}${labelStr ? "--" + labelStr : ""}.csv`);
|
|
23103
23103
|
}
|
|
23104
23104
|
}
|
|
23105
23105
|
}
|
|
@@ -23120,7 +23120,7 @@ var require_csv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
23120
23120
|
metric.values.forEach((item) => {
|
|
23121
23121
|
if (!this.lastChanges.has([metric.name, this.labelsToStr(item.labels)].join("|"))) return;
|
|
23122
23122
|
const filename = this.getFilename(metric, item);
|
|
23123
|
-
makeDirs(path$
|
|
23123
|
+
makeDirs(path$39.dirname(filename));
|
|
23124
23124
|
const metricName = this.formatMetricName(metric.name);
|
|
23125
23125
|
let headers = ["Timestamp", "Metric"];
|
|
23126
23126
|
let data = [item.timestamp, metricName];
|
|
@@ -23177,8 +23177,8 @@ var require_csv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
23177
23177
|
*/
|
|
23178
23178
|
writeRow(filename, headers, fields) {
|
|
23179
23179
|
try {
|
|
23180
|
-
if (!fs$
|
|
23181
|
-
fs$
|
|
23180
|
+
if (!fs$19.existsSync(filename)) fs$19.writeFileSync(filename, headers.join(this.opts.delimiter) + this.opts.rowDelimiter);
|
|
23181
|
+
fs$19.appendFileSync(filename, fields.join(this.opts.delimiter) + this.opts.rowDelimiter);
|
|
23182
23182
|
} catch (err) {
|
|
23183
23183
|
/* istanbul ignore next */
|
|
23184
23184
|
this.logger.error(`Unable to write metrics values to the '${filename}' file. Error: ${err.message}`, fields, err);
|
|
@@ -26250,7 +26250,7 @@ var require_latency = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
26250
26250
|
//#region ../../node_modules/lru-cache/dist/commonjs/node/index.min.js
|
|
26251
26251
|
var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
26252
26252
|
var j = (c, t) => () => (t || c((t = { exports: {} }).exports, t), t.exports);
|
|
26253
|
-
var I$
|
|
26253
|
+
var I$1 = j((O) => {
|
|
26254
26254
|
"use strict";
|
|
26255
26255
|
Object.defineProperty(O, "__esModule", { value: !0 });
|
|
26256
26256
|
O.tracing = O.metrics = void 0;
|
|
@@ -26266,7 +26266,7 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
26266
26266
|
});
|
|
26267
26267
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
26268
26268
|
exports.LRUCache = void 0;
|
|
26269
|
-
var g = I$
|
|
26269
|
+
var g = I$1(), N = P(), C = () => g.metrics.hasSubscribers || g.tracing.hasSubscribers, k = /* @__PURE__ */ new Set(), G = typeof process == "object" && process ? process : {}, V = (c, t, e, i) => {
|
|
26270
26270
|
typeof G.emitWarning == "function" ? G.emitWarning(c, t, e, i) : console.error(`[${e}] ${t}: ${c}`);
|
|
26271
26271
|
}, q = (c) => !k.has(c);
|
|
26272
26272
|
var T = (c) => !!c && c === Math.floor(c) && c > 0 && isFinite(c), H = (c) => T(c) ? c <= Math.pow(2, 8) ? Uint8Array : c <= Math.pow(2, 16) ? Uint16Array : c <= Math.pow(2, 32) ? Uint32Array : c <= Number.MAX_SAFE_INTEGER ? W : null : null, W = class extends Array {
|
|
@@ -31210,7 +31210,7 @@ var require_process$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31210
31210
|
//#endregion
|
|
31211
31211
|
//#region ../../node_modules/detect-libc/lib/filesystem.js
|
|
31212
31212
|
var require_filesystem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
31213
|
-
var fs$
|
|
31213
|
+
var fs$18 = __require("fs");
|
|
31214
31214
|
var LDD_PATH = "/usr/bin/ldd";
|
|
31215
31215
|
var SELF_PATH = "/proc/self/exe";
|
|
31216
31216
|
var MAX_LENGTH = 2048;
|
|
@@ -31221,10 +31221,10 @@ var require_filesystem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31221
31221
|
* @returns {Buffer}
|
|
31222
31222
|
*/
|
|
31223
31223
|
var readFileSync = (path) => {
|
|
31224
|
-
const fd = fs$
|
|
31224
|
+
const fd = fs$18.openSync(path, "r");
|
|
31225
31225
|
const buffer = Buffer.alloc(MAX_LENGTH);
|
|
31226
|
-
const bytesRead = fs$
|
|
31227
|
-
fs$
|
|
31226
|
+
const bytesRead = fs$18.readSync(fd, buffer, 0, MAX_LENGTH, 0);
|
|
31227
|
+
fs$18.close(fd, () => {});
|
|
31228
31228
|
return buffer.subarray(0, bytesRead);
|
|
31229
31229
|
};
|
|
31230
31230
|
/**
|
|
@@ -31234,13 +31234,13 @@ var require_filesystem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31234
31234
|
* @returns {Promise<Buffer>}
|
|
31235
31235
|
*/
|
|
31236
31236
|
var readFile = (path) => new Promise((resolve, reject) => {
|
|
31237
|
-
fs$
|
|
31237
|
+
fs$18.open(path, "r", (err, fd) => {
|
|
31238
31238
|
if (err) reject(err);
|
|
31239
31239
|
else {
|
|
31240
31240
|
const buffer = Buffer.alloc(MAX_LENGTH);
|
|
31241
|
-
fs$
|
|
31241
|
+
fs$18.read(fd, buffer, 0, MAX_LENGTH, 0, (_, bytesRead) => {
|
|
31242
31242
|
resolve(buffer.subarray(0, bytesRead));
|
|
31243
|
-
fs$
|
|
31243
|
+
fs$18.close(fd, () => {});
|
|
31244
31244
|
});
|
|
31245
31245
|
}
|
|
31246
31246
|
});
|
|
@@ -31493,8 +31493,8 @@ var require_detect_libc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31493
31493
|
//#endregion
|
|
31494
31494
|
//#region ../../node_modules/node-gyp-build-optional-packages/index.js
|
|
31495
31495
|
var require_node_gyp_build_optional_packages = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
31496
|
-
var fs$
|
|
31497
|
-
var path$
|
|
31496
|
+
var fs$17 = __require("fs");
|
|
31497
|
+
var path$38 = __require("path");
|
|
31498
31498
|
var url$2 = __require("url");
|
|
31499
31499
|
var vars = process.config && process.config.variables || {};
|
|
31500
31500
|
var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
|
|
@@ -31513,27 +31513,27 @@ var require_node_gyp_build_optional_packages = /* @__PURE__ */ __commonJSMin(((e
|
|
|
31513
31513
|
else return __require(load.path(dir));
|
|
31514
31514
|
}
|
|
31515
31515
|
load.path = function(dir) {
|
|
31516
|
-
dir = path$
|
|
31516
|
+
dir = path$38.resolve(dir || ".");
|
|
31517
31517
|
var packageName = "";
|
|
31518
31518
|
try {
|
|
31519
|
-
if (typeof __webpack_require__ === "function") packageName = __non_webpack_require__(path$
|
|
31520
|
-
else packageName = __require(path$
|
|
31519
|
+
if (typeof __webpack_require__ === "function") packageName = __non_webpack_require__(path$38.join(dir, "package.json")).name;
|
|
31520
|
+
else packageName = __require(path$38.join(dir, "package.json")).name;
|
|
31521
31521
|
var varName = packageName.toUpperCase().replace(/-/g, "_") + "_PREBUILD";
|
|
31522
31522
|
if (process.env[varName]) dir = process.env[varName];
|
|
31523
31523
|
} catch (err) {}
|
|
31524
31524
|
if (!prebuildsOnly) {
|
|
31525
|
-
var release = getFirst(path$
|
|
31525
|
+
var release = getFirst(path$38.join(dir, "build/Release"), matchBuild);
|
|
31526
31526
|
if (release) return release;
|
|
31527
|
-
var debug = getFirst(path$
|
|
31527
|
+
var debug = getFirst(path$38.join(dir, "build/Debug"), matchBuild);
|
|
31528
31528
|
if (debug) return debug;
|
|
31529
31529
|
}
|
|
31530
31530
|
var prebuild = resolve(dir);
|
|
31531
31531
|
if (prebuild) return prebuild;
|
|
31532
|
-
var nearby = resolve(path$
|
|
31532
|
+
var nearby = resolve(path$38.dirname(process.execPath));
|
|
31533
31533
|
if (nearby) return nearby;
|
|
31534
31534
|
var platformPackage = (packageName[0] == "@" ? "" : "@" + packageName + "/") + packageName + "-" + platform + "-" + arch;
|
|
31535
31535
|
try {
|
|
31536
|
-
return resolveFile(path$
|
|
31536
|
+
return resolveFile(path$38.dirname(__require("module").createRequire(url$2.pathToFileURL(path$38.join(dir, "package.json"))).resolve(platformPackage)));
|
|
31537
31537
|
} catch (error) {}
|
|
31538
31538
|
var target = [
|
|
31539
31539
|
"platform=" + platform,
|
|
@@ -31549,25 +31549,25 @@ var require_node_gyp_build_optional_packages = /* @__PURE__ */ __commonJSMin(((e
|
|
|
31549
31549
|
].filter(Boolean).join(" ");
|
|
31550
31550
|
throw new Error("No native build was found for " + target + "\n attempted loading from: " + dir + " and package: " + platformPackage + "\n");
|
|
31551
31551
|
function resolve(dir) {
|
|
31552
|
-
var tuple = readdirSync(path$
|
|
31552
|
+
var tuple = readdirSync(path$38.join(dir, "prebuilds")).map(parseTuple).filter(matchTuple(platform, arch)).sort(compareTuples)[0];
|
|
31553
31553
|
if (!tuple) return;
|
|
31554
|
-
return resolveFile(path$
|
|
31554
|
+
return resolveFile(path$38.join(dir, "prebuilds", tuple.name));
|
|
31555
31555
|
}
|
|
31556
31556
|
function resolveFile(prebuilds) {
|
|
31557
31557
|
var winner = readdirSync(prebuilds).map(parseTags).filter(matchTags(runtime, abi)).sort(compareTags(runtime))[0];
|
|
31558
|
-
if (winner) return path$
|
|
31558
|
+
if (winner) return path$38.join(prebuilds, winner.file);
|
|
31559
31559
|
}
|
|
31560
31560
|
};
|
|
31561
31561
|
function readdirSync(dir) {
|
|
31562
31562
|
try {
|
|
31563
|
-
return fs$
|
|
31563
|
+
return fs$17.readdirSync(dir);
|
|
31564
31564
|
} catch (err) {
|
|
31565
31565
|
return [];
|
|
31566
31566
|
}
|
|
31567
31567
|
}
|
|
31568
31568
|
function getFirst(dir, filter) {
|
|
31569
31569
|
var files = readdirSync(dir).filter(filter);
|
|
31570
|
-
return files[0] && path$
|
|
31570
|
+
return files[0] && path$38.join(dir, files[0]);
|
|
31571
31571
|
}
|
|
31572
31572
|
function matchBuild(name) {
|
|
31573
31573
|
return /\.node$/.test(name);
|
|
@@ -37039,8 +37039,8 @@ var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37039
37039
|
var require_file$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
37040
37040
|
var FormattedLogger = require_formatted();
|
|
37041
37041
|
var _ = require_lodash();
|
|
37042
|
-
var fs$
|
|
37043
|
-
var path$
|
|
37042
|
+
var fs$16 = __require("fs/promises");
|
|
37043
|
+
var path$37 = __require("path");
|
|
37044
37044
|
var os$11 = __require("os");
|
|
37045
37045
|
var { makeDirs } = require_utils$3();
|
|
37046
37046
|
/**
|
|
@@ -37086,7 +37086,7 @@ var require_file$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37086
37086
|
*/
|
|
37087
37087
|
init(loggerFactory) {
|
|
37088
37088
|
super.init(loggerFactory);
|
|
37089
|
-
this.logFolder = path$
|
|
37089
|
+
this.logFolder = path$37.resolve(this.render(this.opts.folder, {
|
|
37090
37090
|
nodeID: this.broker.nodeID,
|
|
37091
37091
|
namespace: this.broker.namespace
|
|
37092
37092
|
}));
|
|
@@ -37111,7 +37111,7 @@ var require_file$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37111
37111
|
*/
|
|
37112
37112
|
getFilename() {
|
|
37113
37113
|
const date = (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
|
|
37114
|
-
return path$
|
|
37114
|
+
return path$37.join(this.logFolder, this.render(this.opts.filename, {
|
|
37115
37115
|
date,
|
|
37116
37116
|
nodeID: this.broker.nodeID,
|
|
37117
37117
|
namespace: this.broker.namespace
|
|
@@ -37143,7 +37143,7 @@ var require_file$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37143
37143
|
const rows = Array.from(this.queue);
|
|
37144
37144
|
this.queue.length = 0;
|
|
37145
37145
|
const buf = rows.join(this.opts.eol) + this.opts.eol;
|
|
37146
|
-
return fs$
|
|
37146
|
+
return fs$16.appendFile(filename, buf).catch((err) => {
|
|
37147
37147
|
/* istanbul ignore next */
|
|
37148
37148
|
console.debug("Unable to write log file:", filename, err);
|
|
37149
37149
|
});
|
|
@@ -37492,7 +37492,7 @@ var require_layouts = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37492
37492
|
var dateFormat = require_lib$5();
|
|
37493
37493
|
var os$10 = __require("os");
|
|
37494
37494
|
var util$3 = __require("util");
|
|
37495
|
-
var path$
|
|
37495
|
+
var path$36 = __require("path");
|
|
37496
37496
|
var styles = {
|
|
37497
37497
|
bold: [1, 22],
|
|
37498
37498
|
italic: [3, 23],
|
|
@@ -37658,8 +37658,8 @@ var require_layouts = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37658
37658
|
let filename = loggingEvent.fileName || "";
|
|
37659
37659
|
if (specifier) {
|
|
37660
37660
|
const fileDepth = parseInt(specifier, 10);
|
|
37661
|
-
const fileList = filename.split(path$
|
|
37662
|
-
if (fileList.length > fileDepth) filename = fileList.slice(-fileDepth).join(path$
|
|
37661
|
+
const fileList = filename.split(path$36.sep);
|
|
37662
|
+
if (fileList.length > fileDepth) filename = fileList.slice(-fileDepth).join(path$36.sep);
|
|
37663
37663
|
}
|
|
37664
37664
|
return filename;
|
|
37665
37665
|
}
|
|
@@ -38661,7 +38661,7 @@ var require_clone = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38661
38661
|
//#endregion
|
|
38662
38662
|
//#region ../../node_modules/graceful-fs/graceful-fs.js
|
|
38663
38663
|
var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
38664
|
-
var fs$
|
|
38664
|
+
var fs$15 = __require("fs");
|
|
38665
38665
|
var polyfills = require_polyfills();
|
|
38666
38666
|
var legacy = require_legacy_streams();
|
|
38667
38667
|
var clone = require_clone();
|
|
@@ -38690,36 +38690,36 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38690
38690
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
38691
38691
|
console.error(m);
|
|
38692
38692
|
};
|
|
38693
|
-
if (!fs$
|
|
38694
|
-
publishQueue(fs$
|
|
38695
|
-
fs$
|
|
38693
|
+
if (!fs$15[gracefulQueue]) {
|
|
38694
|
+
publishQueue(fs$15, global[gracefulQueue] || []);
|
|
38695
|
+
fs$15.close = (function(fs$close) {
|
|
38696
38696
|
function close(fd, cb) {
|
|
38697
|
-
return fs$close.call(fs$
|
|
38697
|
+
return fs$close.call(fs$15, fd, function(err) {
|
|
38698
38698
|
if (!err) resetQueue();
|
|
38699
38699
|
if (typeof cb === "function") cb.apply(this, arguments);
|
|
38700
38700
|
});
|
|
38701
38701
|
}
|
|
38702
38702
|
Object.defineProperty(close, previousSymbol, { value: fs$close });
|
|
38703
38703
|
return close;
|
|
38704
|
-
})(fs$
|
|
38705
|
-
fs$
|
|
38704
|
+
})(fs$15.close);
|
|
38705
|
+
fs$15.closeSync = (function(fs$closeSync) {
|
|
38706
38706
|
function closeSync(fd) {
|
|
38707
|
-
fs$closeSync.apply(fs$
|
|
38707
|
+
fs$closeSync.apply(fs$15, arguments);
|
|
38708
38708
|
resetQueue();
|
|
38709
38709
|
}
|
|
38710
38710
|
Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync });
|
|
38711
38711
|
return closeSync;
|
|
38712
|
-
})(fs$
|
|
38712
|
+
})(fs$15.closeSync);
|
|
38713
38713
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) process.on("exit", function() {
|
|
38714
|
-
debug(fs$
|
|
38715
|
-
__require("assert").equal(fs$
|
|
38714
|
+
debug(fs$15[gracefulQueue]);
|
|
38715
|
+
__require("assert").equal(fs$15[gracefulQueue].length, 0);
|
|
38716
38716
|
});
|
|
38717
38717
|
}
|
|
38718
|
-
if (!global[gracefulQueue]) publishQueue(global, fs$
|
|
38719
|
-
module.exports = patch(clone(fs$
|
|
38720
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$
|
|
38721
|
-
module.exports = patch(fs$
|
|
38722
|
-
fs$
|
|
38718
|
+
if (!global[gracefulQueue]) publishQueue(global, fs$15[gracefulQueue]);
|
|
38719
|
+
module.exports = patch(clone(fs$15));
|
|
38720
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$15.__patched) {
|
|
38721
|
+
module.exports = patch(fs$15);
|
|
38722
|
+
fs$15.__patched = true;
|
|
38723
38723
|
}
|
|
38724
38724
|
function patch(fs) {
|
|
38725
38725
|
polyfills(fs);
|
|
@@ -38974,23 +38974,23 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38974
38974
|
}
|
|
38975
38975
|
function enqueue(elem) {
|
|
38976
38976
|
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
38977
|
-
fs$
|
|
38977
|
+
fs$15[gracefulQueue].push(elem);
|
|
38978
38978
|
retry();
|
|
38979
38979
|
}
|
|
38980
38980
|
var retryTimer;
|
|
38981
38981
|
function resetQueue() {
|
|
38982
38982
|
var now = Date.now();
|
|
38983
|
-
for (var i = 0; i < fs$
|
|
38984
|
-
fs$
|
|
38985
|
-
fs$
|
|
38983
|
+
for (var i = 0; i < fs$15[gracefulQueue].length; ++i) if (fs$15[gracefulQueue][i].length > 2) {
|
|
38984
|
+
fs$15[gracefulQueue][i][3] = now;
|
|
38985
|
+
fs$15[gracefulQueue][i][4] = now;
|
|
38986
38986
|
}
|
|
38987
38987
|
retry();
|
|
38988
38988
|
}
|
|
38989
38989
|
function retry() {
|
|
38990
38990
|
clearTimeout(retryTimer);
|
|
38991
38991
|
retryTimer = void 0;
|
|
38992
|
-
if (fs$
|
|
38993
|
-
var elem = fs$
|
|
38992
|
+
if (fs$15[gracefulQueue].length === 0) return;
|
|
38993
|
+
var elem = fs$15[gracefulQueue].shift();
|
|
38994
38994
|
var fn = elem[0];
|
|
38995
38995
|
var args = elem[1];
|
|
38996
38996
|
var err = elem[2];
|
|
@@ -39009,7 +39009,7 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39009
39009
|
if (sinceAttempt >= Math.min(sinceStart * 1.2, 100)) {
|
|
39010
39010
|
debug("RETRY", fn.name, args);
|
|
39011
39011
|
fn.apply(null, args.concat([startTime]));
|
|
39012
|
-
} else fs$
|
|
39012
|
+
} else fs$15[gracefulQueue].push(elem);
|
|
39013
39013
|
}
|
|
39014
39014
|
if (retryTimer === void 0) retryTimer = setTimeout(retry, 0);
|
|
39015
39015
|
}
|
|
@@ -39097,9 +39097,9 @@ var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
39097
39097
|
//#endregion
|
|
39098
39098
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/mkdirs/win32.js
|
|
39099
39099
|
var require_win32 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39100
|
-
var path$
|
|
39100
|
+
var path$35 = __require("path");
|
|
39101
39101
|
function getRootPath(p) {
|
|
39102
|
-
p = path$
|
|
39102
|
+
p = path$35.normalize(path$35.resolve(p)).split(path$35.sep);
|
|
39103
39103
|
if (p.length > 0) return p[0];
|
|
39104
39104
|
return null;
|
|
39105
39105
|
}
|
|
@@ -39118,7 +39118,7 @@ var require_win32 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39118
39118
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/mkdirs/mkdirs.js
|
|
39119
39119
|
var require_mkdirs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39120
39120
|
var fs = require_graceful_fs();
|
|
39121
|
-
var path$
|
|
39121
|
+
var path$34 = __require("path");
|
|
39122
39122
|
var invalidWin32Path = require_win32().invalidWin32Path;
|
|
39123
39123
|
var o777 = parseInt("0777", 8);
|
|
39124
39124
|
function mkdirs(p, opts, callback, made) {
|
|
@@ -39136,7 +39136,7 @@ var require_mkdirs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39136
39136
|
if (mode === void 0) mode = o777 & ~process.umask();
|
|
39137
39137
|
if (!made) made = null;
|
|
39138
39138
|
callback = callback || function() {};
|
|
39139
|
-
p = path$
|
|
39139
|
+
p = path$34.resolve(p);
|
|
39140
39140
|
xfs.mkdir(p, mode, (er) => {
|
|
39141
39141
|
if (!er) {
|
|
39142
39142
|
made = made || p;
|
|
@@ -39144,8 +39144,8 @@ var require_mkdirs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39144
39144
|
}
|
|
39145
39145
|
switch (er.code) {
|
|
39146
39146
|
case "ENOENT":
|
|
39147
|
-
if (path$
|
|
39148
|
-
mkdirs(path$
|
|
39147
|
+
if (path$34.dirname(p) === p) return callback(er);
|
|
39148
|
+
mkdirs(path$34.dirname(p), opts, (er, made) => {
|
|
39149
39149
|
if (er) callback(er, made);
|
|
39150
39150
|
else mkdirs(p, opts, callback, made);
|
|
39151
39151
|
});
|
|
@@ -39165,7 +39165,7 @@ var require_mkdirs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39165
39165
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js
|
|
39166
39166
|
var require_mkdirs_sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39167
39167
|
var fs = require_graceful_fs();
|
|
39168
|
-
var path$
|
|
39168
|
+
var path$33 = __require("path");
|
|
39169
39169
|
var invalidWin32Path = require_win32().invalidWin32Path;
|
|
39170
39170
|
var o777 = parseInt("0777", 8);
|
|
39171
39171
|
function mkdirsSync(p, opts, made) {
|
|
@@ -39179,14 +39179,14 @@ var require_mkdirs_sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39179
39179
|
}
|
|
39180
39180
|
if (mode === void 0) mode = o777 & ~process.umask();
|
|
39181
39181
|
if (!made) made = null;
|
|
39182
|
-
p = path$
|
|
39182
|
+
p = path$33.resolve(p);
|
|
39183
39183
|
try {
|
|
39184
39184
|
xfs.mkdirSync(p, mode);
|
|
39185
39185
|
made = made || p;
|
|
39186
39186
|
} catch (err0) {
|
|
39187
39187
|
if (err0.code === "ENOENT") {
|
|
39188
|
-
if (path$
|
|
39189
|
-
made = mkdirsSync(path$
|
|
39188
|
+
if (path$33.dirname(p) === p) throw err0;
|
|
39189
|
+
made = mkdirsSync(path$33.dirname(p), opts, made);
|
|
39190
39190
|
mkdirsSync(p, opts, made);
|
|
39191
39191
|
} else {
|
|
39192
39192
|
let stat;
|
|
@@ -39222,10 +39222,10 @@ var require_mkdirs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39222
39222
|
var require_utimes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39223
39223
|
var fs = require_graceful_fs();
|
|
39224
39224
|
var os$9 = __require("os");
|
|
39225
|
-
var path$
|
|
39225
|
+
var path$32 = __require("path");
|
|
39226
39226
|
function hasMillisResSync() {
|
|
39227
|
-
let tmpfile = path$
|
|
39228
|
-
tmpfile = path$
|
|
39227
|
+
let tmpfile = path$32.join("millis-test-sync" + Date.now().toString() + Math.random().toString().slice(2));
|
|
39228
|
+
tmpfile = path$32.join(os$9.tmpdir(), tmpfile);
|
|
39229
39229
|
const d = /* @__PURE__ */ new Date(1435410243862);
|
|
39230
39230
|
fs.writeFileSync(tmpfile, "https://github.com/jprichardson/node-fs-extra/pull/141");
|
|
39231
39231
|
const fd = fs.openSync(tmpfile, "r+");
|
|
@@ -39234,8 +39234,8 @@ var require_utimes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39234
39234
|
return fs.statSync(tmpfile).mtime > 1435410243e3;
|
|
39235
39235
|
}
|
|
39236
39236
|
function hasMillisRes(callback) {
|
|
39237
|
-
let tmpfile = path$
|
|
39238
|
-
tmpfile = path$
|
|
39237
|
+
let tmpfile = path$32.join("millis-test" + Date.now().toString() + Math.random().toString().slice(2));
|
|
39238
|
+
tmpfile = path$32.join(os$9.tmpdir(), tmpfile);
|
|
39239
39239
|
const d = /* @__PURE__ */ new Date(1435410243862);
|
|
39240
39240
|
fs.writeFile(tmpfile, "https://github.com/jprichardson/node-fs-extra/pull/141", (err) => {
|
|
39241
39241
|
if (err) return callback(err);
|
|
@@ -39286,7 +39286,7 @@ var require_utimes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39286
39286
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/util/stat.js
|
|
39287
39287
|
var require_stat = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39288
39288
|
var fs = require_graceful_fs();
|
|
39289
|
-
var path$
|
|
39289
|
+
var path$31 = __require("path");
|
|
39290
39290
|
var NODE_VERSION_MAJOR_WITH_BIGINT = 10;
|
|
39291
39291
|
var NODE_VERSION_MINOR_WITH_BIGINT = 5;
|
|
39292
39292
|
var NODE_VERSION_PATCH_WITH_BIGINT = 0;
|
|
@@ -39379,9 +39379,9 @@ var require_stat = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39379
39379
|
};
|
|
39380
39380
|
}
|
|
39381
39381
|
function checkParentPaths(src, srcStat, dest, funcName, cb) {
|
|
39382
|
-
const srcParent = path$
|
|
39383
|
-
const destParent = path$
|
|
39384
|
-
if (destParent === srcParent || destParent === path$
|
|
39382
|
+
const srcParent = path$31.resolve(path$31.dirname(src));
|
|
39383
|
+
const destParent = path$31.resolve(path$31.dirname(dest));
|
|
39384
|
+
if (destParent === srcParent || destParent === path$31.parse(destParent).root) return cb();
|
|
39385
39385
|
if (nodeSupportsBigInt()) fs.stat(destParent, { bigint: true }, (err, destStat) => {
|
|
39386
39386
|
if (err) {
|
|
39387
39387
|
if (err.code === "ENOENT") return cb();
|
|
@@ -39400,9 +39400,9 @@ var require_stat = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39400
39400
|
});
|
|
39401
39401
|
}
|
|
39402
39402
|
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
39403
|
-
const srcParent = path$
|
|
39404
|
-
const destParent = path$
|
|
39405
|
-
if (destParent === srcParent || destParent === path$
|
|
39403
|
+
const srcParent = path$31.resolve(path$31.dirname(src));
|
|
39404
|
+
const destParent = path$31.resolve(path$31.dirname(dest));
|
|
39405
|
+
if (destParent === srcParent || destParent === path$31.parse(destParent).root) return;
|
|
39406
39406
|
let destStat;
|
|
39407
39407
|
try {
|
|
39408
39408
|
if (nodeSupportsBigInt()) destStat = fs.statSync(destParent, { bigint: true });
|
|
@@ -39415,8 +39415,8 @@ var require_stat = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39415
39415
|
return checkParentPathsSync(src, srcStat, destParent, funcName);
|
|
39416
39416
|
}
|
|
39417
39417
|
function isSrcSubdir(src, dest) {
|
|
39418
|
-
const srcArr = path$
|
|
39419
|
-
const destArr = path$
|
|
39418
|
+
const srcArr = path$31.resolve(src).split(path$31.sep).filter((i) => i);
|
|
39419
|
+
const destArr = path$31.resolve(dest).split(path$31.sep).filter((i) => i);
|
|
39420
39420
|
return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true);
|
|
39421
39421
|
}
|
|
39422
39422
|
function errMsg(src, dest, funcName) {
|
|
@@ -39446,7 +39446,7 @@ var require_buffer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39446
39446
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/copy-sync/copy-sync.js
|
|
39447
39447
|
var require_copy_sync$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39448
39448
|
var fs = require_graceful_fs();
|
|
39449
|
-
var path$
|
|
39449
|
+
var path$30 = __require("path");
|
|
39450
39450
|
var mkdirpSync = require_mkdirs().mkdirsSync;
|
|
39451
39451
|
var utimesSync = require_utimes().utimesMillisSync;
|
|
39452
39452
|
var stat = require_stat();
|
|
@@ -39463,7 +39463,7 @@ var require_copy_sync$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39463
39463
|
}
|
|
39464
39464
|
function handleFilterAndCopy(destStat, src, dest, opts) {
|
|
39465
39465
|
if (opts.filter && !opts.filter(src, dest)) return;
|
|
39466
|
-
const destParent = path$
|
|
39466
|
+
const destParent = path$30.dirname(dest);
|
|
39467
39467
|
if (!fs.existsSync(destParent)) mkdirpSync(destParent);
|
|
39468
39468
|
return startCopy(destStat, src, dest, opts);
|
|
39469
39469
|
}
|
|
@@ -39525,14 +39525,14 @@ var require_copy_sync$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39525
39525
|
fs.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
|
|
39526
39526
|
}
|
|
39527
39527
|
function copyDirItem(item, src, dest, opts) {
|
|
39528
|
-
const srcItem = path$
|
|
39529
|
-
const destItem = path$
|
|
39528
|
+
const srcItem = path$30.join(src, item);
|
|
39529
|
+
const destItem = path$30.join(dest, item);
|
|
39530
39530
|
const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy");
|
|
39531
39531
|
return startCopy(destStat, srcItem, destItem, opts);
|
|
39532
39532
|
}
|
|
39533
39533
|
function onLink(destStat, src, dest, opts) {
|
|
39534
39534
|
let resolvedSrc = fs.readlinkSync(src);
|
|
39535
|
-
if (opts.dereference) resolvedSrc = path$
|
|
39535
|
+
if (opts.dereference) resolvedSrc = path$30.resolve(process.cwd(), resolvedSrc);
|
|
39536
39536
|
if (!destStat) return fs.symlinkSync(resolvedSrc, dest);
|
|
39537
39537
|
else {
|
|
39538
39538
|
let resolvedDest;
|
|
@@ -39542,7 +39542,7 @@ var require_copy_sync$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39542
39542
|
if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs.symlinkSync(resolvedSrc, dest);
|
|
39543
39543
|
throw err;
|
|
39544
39544
|
}
|
|
39545
|
-
if (opts.dereference) resolvedDest = path$
|
|
39545
|
+
if (opts.dereference) resolvedDest = path$30.resolve(process.cwd(), resolvedDest);
|
|
39546
39546
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
39547
39547
|
if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
|
|
39548
39548
|
return copyLink(resolvedSrc, dest);
|
|
@@ -39576,7 +39576,7 @@ var require_path_exists = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39576
39576
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/copy/copy.js
|
|
39577
39577
|
var require_copy$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39578
39578
|
var fs = require_graceful_fs();
|
|
39579
|
-
var path$
|
|
39579
|
+
var path$29 = __require("path");
|
|
39580
39580
|
var mkdirp = require_mkdirs().mkdirs;
|
|
39581
39581
|
var pathExists = require_path_exists().pathExists;
|
|
39582
39582
|
var utimes = require_utimes().utimesMillis;
|
|
@@ -39603,7 +39603,7 @@ var require_copy$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39603
39603
|
});
|
|
39604
39604
|
}
|
|
39605
39605
|
function checkParentDir(destStat, src, dest, opts, cb) {
|
|
39606
|
-
const destParent = path$
|
|
39606
|
+
const destParent = path$29.dirname(dest);
|
|
39607
39607
|
pathExists(destParent, (err, dirExists) => {
|
|
39608
39608
|
if (err) return cb(err);
|
|
39609
39609
|
if (dirExists) return startCopy(destStat, src, dest, opts, cb);
|
|
@@ -39690,8 +39690,8 @@ var require_copy$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39690
39690
|
return copyDirItem(items, item, src, dest, opts, cb);
|
|
39691
39691
|
}
|
|
39692
39692
|
function copyDirItem(items, item, src, dest, opts, cb) {
|
|
39693
|
-
const srcItem = path$
|
|
39694
|
-
const destItem = path$
|
|
39693
|
+
const srcItem = path$29.join(src, item);
|
|
39694
|
+
const destItem = path$29.join(dest, item);
|
|
39695
39695
|
stat.checkPaths(srcItem, destItem, "copy", (err, stats) => {
|
|
39696
39696
|
if (err) return cb(err);
|
|
39697
39697
|
const { destStat } = stats;
|
|
@@ -39704,14 +39704,14 @@ var require_copy$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39704
39704
|
function onLink(destStat, src, dest, opts, cb) {
|
|
39705
39705
|
fs.readlink(src, (err, resolvedSrc) => {
|
|
39706
39706
|
if (err) return cb(err);
|
|
39707
|
-
if (opts.dereference) resolvedSrc = path$
|
|
39707
|
+
if (opts.dereference) resolvedSrc = path$29.resolve(process.cwd(), resolvedSrc);
|
|
39708
39708
|
if (!destStat) return fs.symlink(resolvedSrc, dest, cb);
|
|
39709
39709
|
else fs.readlink(dest, (err, resolvedDest) => {
|
|
39710
39710
|
if (err) {
|
|
39711
39711
|
if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs.symlink(resolvedSrc, dest, cb);
|
|
39712
39712
|
return cb(err);
|
|
39713
39713
|
}
|
|
39714
|
-
if (opts.dereference) resolvedDest = path$
|
|
39714
|
+
if (opts.dereference) resolvedDest = path$29.resolve(process.cwd(), resolvedDest);
|
|
39715
39715
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) return cb(/* @__PURE__ */ new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`));
|
|
39716
39716
|
if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) return cb(/* @__PURE__ */ new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`));
|
|
39717
39717
|
return copyLink(resolvedSrc, dest, cb);
|
|
@@ -39736,7 +39736,7 @@ var require_copy = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39736
39736
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/remove/rimraf.js
|
|
39737
39737
|
var require_rimraf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39738
39738
|
var fs = require_graceful_fs();
|
|
39739
|
-
var path$
|
|
39739
|
+
var path$28 = __require("path");
|
|
39740
39740
|
var assert$2 = __require("assert");
|
|
39741
39741
|
var isWindows = process.platform === "win32";
|
|
39742
39742
|
function defaults(options) {
|
|
@@ -39851,7 +39851,7 @@ var require_rimraf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39851
39851
|
let errState;
|
|
39852
39852
|
if (n === 0) return options.rmdir(p, cb);
|
|
39853
39853
|
files.forEach((f) => {
|
|
39854
|
-
rimraf(path$
|
|
39854
|
+
rimraf(path$28.join(p, f), options, (er) => {
|
|
39855
39855
|
if (errState) return;
|
|
39856
39856
|
if (er) return cb(errState = er);
|
|
39857
39857
|
if (--n === 0) options.rmdir(p, cb);
|
|
@@ -39898,7 +39898,7 @@ var require_rimraf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39898
39898
|
function rmkidsSync(p, options) {
|
|
39899
39899
|
assert$2(p);
|
|
39900
39900
|
assert$2(options);
|
|
39901
|
-
options.readdirSync(p).forEach((f) => rimrafSync(path$
|
|
39901
|
+
options.readdirSync(p).forEach((f) => rimrafSync(path$28.join(p, f), options));
|
|
39902
39902
|
if (isWindows) {
|
|
39903
39903
|
const startTime = Date.now();
|
|
39904
39904
|
do
|
|
@@ -39926,14 +39926,14 @@ var require_remove = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39926
39926
|
var require_empty = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39927
39927
|
var u = require_universalify().fromCallback;
|
|
39928
39928
|
var fs = require_graceful_fs();
|
|
39929
|
-
var path$
|
|
39929
|
+
var path$27 = __require("path");
|
|
39930
39930
|
var mkdir = require_mkdirs();
|
|
39931
39931
|
var remove = require_remove();
|
|
39932
39932
|
var emptyDir = u(function emptyDir(dir, callback) {
|
|
39933
39933
|
callback = callback || function() {};
|
|
39934
39934
|
fs.readdir(dir, (err, items) => {
|
|
39935
39935
|
if (err) return mkdir.mkdirs(dir, callback);
|
|
39936
|
-
items = items.map((item) => path$
|
|
39936
|
+
items = items.map((item) => path$27.join(dir, item));
|
|
39937
39937
|
deleteItem();
|
|
39938
39938
|
function deleteItem() {
|
|
39939
39939
|
const item = items.pop();
|
|
@@ -39953,7 +39953,7 @@ var require_empty = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39953
39953
|
return mkdir.mkdirsSync(dir);
|
|
39954
39954
|
}
|
|
39955
39955
|
items.forEach((item) => {
|
|
39956
|
-
item = path$
|
|
39956
|
+
item = path$27.join(dir, item);
|
|
39957
39957
|
remove.removeSync(item);
|
|
39958
39958
|
});
|
|
39959
39959
|
}
|
|
@@ -39968,7 +39968,7 @@ var require_empty = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39968
39968
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/ensure/file.js
|
|
39969
39969
|
var require_file$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39970
39970
|
var u = require_universalify().fromCallback;
|
|
39971
|
-
var path$
|
|
39971
|
+
var path$26 = __require("path");
|
|
39972
39972
|
var fs = require_graceful_fs();
|
|
39973
39973
|
var mkdir = require_mkdirs();
|
|
39974
39974
|
var pathExists = require_path_exists().pathExists;
|
|
@@ -39981,7 +39981,7 @@ var require_file$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39981
39981
|
}
|
|
39982
39982
|
fs.stat(file, (err, stats) => {
|
|
39983
39983
|
if (!err && stats.isFile()) return callback();
|
|
39984
|
-
const dir = path$
|
|
39984
|
+
const dir = path$26.dirname(file);
|
|
39985
39985
|
pathExists(dir, (err, dirExists) => {
|
|
39986
39986
|
if (err) return callback(err);
|
|
39987
39987
|
if (dirExists) return makeFile();
|
|
@@ -39998,7 +39998,7 @@ var require_file$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39998
39998
|
stats = fs.statSync(file);
|
|
39999
39999
|
} catch (e) {}
|
|
40000
40000
|
if (stats && stats.isFile()) return;
|
|
40001
|
-
const dir = path$
|
|
40001
|
+
const dir = path$26.dirname(file);
|
|
40002
40002
|
if (!fs.existsSync(dir)) mkdir.mkdirsSync(dir);
|
|
40003
40003
|
fs.writeFileSync(file, "");
|
|
40004
40004
|
}
|
|
@@ -40011,7 +40011,7 @@ var require_file$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40011
40011
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/ensure/link.js
|
|
40012
40012
|
var require_link = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40013
40013
|
var u = require_universalify().fromCallback;
|
|
40014
|
-
var path$
|
|
40014
|
+
var path$25 = __require("path");
|
|
40015
40015
|
var fs = require_graceful_fs();
|
|
40016
40016
|
var mkdir = require_mkdirs();
|
|
40017
40017
|
var pathExists = require_path_exists().pathExists;
|
|
@@ -40030,7 +40030,7 @@ var require_link = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40030
40030
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
40031
40031
|
return callback(err);
|
|
40032
40032
|
}
|
|
40033
|
-
const dir = path$
|
|
40033
|
+
const dir = path$25.dirname(dstpath);
|
|
40034
40034
|
pathExists(dir, (err, dirExists) => {
|
|
40035
40035
|
if (err) return callback(err);
|
|
40036
40036
|
if (dirExists) return makeLink(srcpath, dstpath);
|
|
@@ -40050,7 +40050,7 @@ var require_link = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40050
40050
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
40051
40051
|
throw err;
|
|
40052
40052
|
}
|
|
40053
|
-
const dir = path$
|
|
40053
|
+
const dir = path$25.dirname(dstpath);
|
|
40054
40054
|
if (fs.existsSync(dir)) return fs.linkSync(srcpath, dstpath);
|
|
40055
40055
|
mkdir.mkdirsSync(dir);
|
|
40056
40056
|
return fs.linkSync(srcpath, dstpath);
|
|
@@ -40063,7 +40063,7 @@ var require_link = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40063
40063
|
//#endregion
|
|
40064
40064
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/ensure/symlink-paths.js
|
|
40065
40065
|
var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40066
|
-
var path$
|
|
40066
|
+
var path$24 = __require("path");
|
|
40067
40067
|
var fs = require_graceful_fs();
|
|
40068
40068
|
var pathExists = require_path_exists().pathExists;
|
|
40069
40069
|
/**
|
|
@@ -40088,7 +40088,7 @@ var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
40088
40088
|
* the ability to pass in `relative to current working direcotry` paths.
|
|
40089
40089
|
*/
|
|
40090
40090
|
function symlinkPaths(srcpath, dstpath, callback) {
|
|
40091
|
-
if (path$
|
|
40091
|
+
if (path$24.isAbsolute(srcpath)) return fs.lstat(srcpath, (err) => {
|
|
40092
40092
|
if (err) {
|
|
40093
40093
|
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
40094
40094
|
return callback(err);
|
|
@@ -40099,8 +40099,8 @@ var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
40099
40099
|
});
|
|
40100
40100
|
});
|
|
40101
40101
|
else {
|
|
40102
|
-
const dstdir = path$
|
|
40103
|
-
const relativeToDst = path$
|
|
40102
|
+
const dstdir = path$24.dirname(dstpath);
|
|
40103
|
+
const relativeToDst = path$24.join(dstdir, srcpath);
|
|
40104
40104
|
return pathExists(relativeToDst, (err, exists) => {
|
|
40105
40105
|
if (err) return callback(err);
|
|
40106
40106
|
if (exists) return callback(null, {
|
|
@@ -40114,7 +40114,7 @@ var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
40114
40114
|
}
|
|
40115
40115
|
return callback(null, {
|
|
40116
40116
|
"toCwd": srcpath,
|
|
40117
|
-
"toDst": path$
|
|
40117
|
+
"toDst": path$24.relative(dstdir, srcpath)
|
|
40118
40118
|
});
|
|
40119
40119
|
});
|
|
40120
40120
|
});
|
|
@@ -40122,7 +40122,7 @@ var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
40122
40122
|
}
|
|
40123
40123
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
40124
40124
|
let exists;
|
|
40125
|
-
if (path$
|
|
40125
|
+
if (path$24.isAbsolute(srcpath)) {
|
|
40126
40126
|
exists = fs.existsSync(srcpath);
|
|
40127
40127
|
if (!exists) throw new Error("absolute srcpath does not exist");
|
|
40128
40128
|
return {
|
|
@@ -40130,8 +40130,8 @@ var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
40130
40130
|
"toDst": srcpath
|
|
40131
40131
|
};
|
|
40132
40132
|
} else {
|
|
40133
|
-
const dstdir = path$
|
|
40134
|
-
const relativeToDst = path$
|
|
40133
|
+
const dstdir = path$24.dirname(dstpath);
|
|
40134
|
+
const relativeToDst = path$24.join(dstdir, srcpath);
|
|
40135
40135
|
exists = fs.existsSync(relativeToDst);
|
|
40136
40136
|
if (exists) return {
|
|
40137
40137
|
"toCwd": relativeToDst,
|
|
@@ -40142,7 +40142,7 @@ var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
40142
40142
|
if (!exists) throw new Error("relative srcpath does not exist");
|
|
40143
40143
|
return {
|
|
40144
40144
|
"toCwd": srcpath,
|
|
40145
|
-
"toDst": path$
|
|
40145
|
+
"toDst": path$24.relative(dstdir, srcpath)
|
|
40146
40146
|
};
|
|
40147
40147
|
}
|
|
40148
40148
|
}
|
|
@@ -40185,7 +40185,7 @@ var require_symlink_type = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40185
40185
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/ensure/symlink.js
|
|
40186
40186
|
var require_symlink = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40187
40187
|
var u = require_universalify().fromCallback;
|
|
40188
|
-
var path$
|
|
40188
|
+
var path$23 = __require("path");
|
|
40189
40189
|
var fs = require_graceful_fs();
|
|
40190
40190
|
var _mkdirs = require_mkdirs();
|
|
40191
40191
|
var mkdirs = _mkdirs.mkdirs;
|
|
@@ -40208,7 +40208,7 @@ var require_symlink = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40208
40208
|
srcpath = relative.toDst;
|
|
40209
40209
|
symlinkType(relative.toCwd, type, (err, type) => {
|
|
40210
40210
|
if (err) return callback(err);
|
|
40211
|
-
const dir = path$
|
|
40211
|
+
const dir = path$23.dirname(dstpath);
|
|
40212
40212
|
pathExists(dir, (err, dirExists) => {
|
|
40213
40213
|
if (err) return callback(err);
|
|
40214
40214
|
if (dirExists) return fs.symlink(srcpath, dstpath, type, callback);
|
|
@@ -40226,7 +40226,7 @@ var require_symlink = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40226
40226
|
const relative = symlinkPathsSync(srcpath, dstpath);
|
|
40227
40227
|
srcpath = relative.toDst;
|
|
40228
40228
|
type = symlinkTypeSync(relative.toCwd, type);
|
|
40229
|
-
const dir = path$
|
|
40229
|
+
const dir = path$23.dirname(dstpath);
|
|
40230
40230
|
if (fs.existsSync(dir)) return fs.symlinkSync(srcpath, dstpath, type);
|
|
40231
40231
|
mkdirsSync(dir);
|
|
40232
40232
|
return fs.symlinkSync(srcpath, dstpath, type);
|
|
@@ -40366,7 +40366,7 @@ var require_jsonfile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40366
40366
|
//#endregion
|
|
40367
40367
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/json/output-json.js
|
|
40368
40368
|
var require_output_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40369
|
-
var path$
|
|
40369
|
+
var path$22 = __require("path");
|
|
40370
40370
|
var mkdir = require_mkdirs();
|
|
40371
40371
|
var pathExists = require_path_exists().pathExists;
|
|
40372
40372
|
var jsonFile = require_jsonfile();
|
|
@@ -40375,7 +40375,7 @@ var require_output_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40375
40375
|
callback = options;
|
|
40376
40376
|
options = {};
|
|
40377
40377
|
}
|
|
40378
|
-
const dir = path$
|
|
40378
|
+
const dir = path$22.dirname(file);
|
|
40379
40379
|
pathExists(dir, (err, itDoes) => {
|
|
40380
40380
|
if (err) return callback(err);
|
|
40381
40381
|
if (itDoes) return jsonFile.writeJson(file, data, options, callback);
|
|
@@ -40391,11 +40391,11 @@ var require_output_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40391
40391
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/json/output-json-sync.js
|
|
40392
40392
|
var require_output_json_sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40393
40393
|
var fs = require_graceful_fs();
|
|
40394
|
-
var path$
|
|
40394
|
+
var path$21 = __require("path");
|
|
40395
40395
|
var mkdir = require_mkdirs();
|
|
40396
40396
|
var jsonFile = require_jsonfile();
|
|
40397
40397
|
function outputJsonSync(file, data, options) {
|
|
40398
|
-
const dir = path$
|
|
40398
|
+
const dir = path$21.dirname(file);
|
|
40399
40399
|
if (!fs.existsSync(dir)) mkdir.mkdirsSync(dir);
|
|
40400
40400
|
jsonFile.writeJsonSync(file, data, options);
|
|
40401
40401
|
}
|
|
@@ -40420,7 +40420,7 @@ var require_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40420
40420
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/move-sync/move-sync.js
|
|
40421
40421
|
var require_move_sync$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40422
40422
|
var fs = require_graceful_fs();
|
|
40423
|
-
var path$
|
|
40423
|
+
var path$20 = __require("path");
|
|
40424
40424
|
var copySync = require_copy_sync().copySync;
|
|
40425
40425
|
var removeSync = require_remove().removeSync;
|
|
40426
40426
|
var mkdirpSync = require_mkdirs().mkdirpSync;
|
|
@@ -40430,7 +40430,7 @@ var require_move_sync$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40430
40430
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
40431
40431
|
const { srcStat } = stat.checkPathsSync(src, dest, "move");
|
|
40432
40432
|
stat.checkParentPathsSync(src, srcStat, dest, "move");
|
|
40433
|
-
mkdirpSync(path$
|
|
40433
|
+
mkdirpSync(path$20.dirname(dest));
|
|
40434
40434
|
return doRename(src, dest, overwrite);
|
|
40435
40435
|
}
|
|
40436
40436
|
function doRename(src, dest, overwrite) {
|
|
@@ -40467,7 +40467,7 @@ var require_move_sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40467
40467
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/move/move.js
|
|
40468
40468
|
var require_move$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40469
40469
|
var fs = require_graceful_fs();
|
|
40470
|
-
var path$
|
|
40470
|
+
var path$19 = __require("path");
|
|
40471
40471
|
var copy = require_copy().copy;
|
|
40472
40472
|
var remove = require_remove().remove;
|
|
40473
40473
|
var mkdirp = require_mkdirs().mkdirp;
|
|
@@ -40484,7 +40484,7 @@ var require_move$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40484
40484
|
const { srcStat } = stats;
|
|
40485
40485
|
stat.checkParentPaths(src, srcStat, dest, "move", (err) => {
|
|
40486
40486
|
if (err) return cb(err);
|
|
40487
|
-
mkdirp(path$
|
|
40487
|
+
mkdirp(path$19.dirname(dest), (err) => {
|
|
40488
40488
|
if (err) return cb(err);
|
|
40489
40489
|
return doRename(src, dest, overwrite, cb);
|
|
40490
40490
|
});
|
|
@@ -40531,7 +40531,7 @@ var require_move = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40531
40531
|
var require_output = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40532
40532
|
var u = require_universalify().fromCallback;
|
|
40533
40533
|
var fs = require_graceful_fs();
|
|
40534
|
-
var path$
|
|
40534
|
+
var path$18 = __require("path");
|
|
40535
40535
|
var mkdir = require_mkdirs();
|
|
40536
40536
|
var pathExists = require_path_exists().pathExists;
|
|
40537
40537
|
function outputFile(file, data, encoding, callback) {
|
|
@@ -40539,7 +40539,7 @@ var require_output = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40539
40539
|
callback = encoding;
|
|
40540
40540
|
encoding = "utf8";
|
|
40541
40541
|
}
|
|
40542
|
-
const dir = path$
|
|
40542
|
+
const dir = path$18.dirname(file);
|
|
40543
40543
|
pathExists(dir, (err, itDoes) => {
|
|
40544
40544
|
if (err) return callback(err);
|
|
40545
40545
|
if (itDoes) return fs.writeFile(file, data, encoding, callback);
|
|
@@ -40550,7 +40550,7 @@ var require_output = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40550
40550
|
});
|
|
40551
40551
|
}
|
|
40552
40552
|
function outputFileSync(file, ...args) {
|
|
40553
|
-
const dir = path$
|
|
40553
|
+
const dir = path$18.dirname(file);
|
|
40554
40554
|
if (fs.existsSync(dir)) return fs.writeFileSync(file, ...args);
|
|
40555
40555
|
mkdir.mkdirsSync(dir);
|
|
40556
40556
|
fs.writeFileSync(file, ...args);
|
|
@@ -40564,9 +40564,9 @@ var require_output = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40564
40564
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/index.js
|
|
40565
40565
|
var require_lib$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40566
40566
|
module.exports = Object.assign({}, require_fs(), require_copy_sync(), require_copy(), require_empty(), require_ensure(), require_json(), require_mkdirs(), require_move_sync(), require_move(), require_output(), require_path_exists(), require_remove());
|
|
40567
|
-
var fs$
|
|
40568
|
-
if (Object.getOwnPropertyDescriptor(fs$
|
|
40569
|
-
return fs$
|
|
40567
|
+
var fs$14 = __require("fs");
|
|
40568
|
+
if (Object.getOwnPropertyDescriptor(fs$14, "promises")) Object.defineProperty(module.exports, "promises", { get() {
|
|
40569
|
+
return fs$14.promises;
|
|
40570
40570
|
} });
|
|
40571
40571
|
}));
|
|
40572
40572
|
//#endregion
|
|
@@ -40731,11 +40731,11 @@ var require_lib$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40731
40731
|
//#region ../../node_modules/streamroller/lib/fileNameFormatter.js
|
|
40732
40732
|
var require_fileNameFormatter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40733
40733
|
var debug = require_src()("streamroller:fileNameFormatter");
|
|
40734
|
-
var path$
|
|
40734
|
+
var path$17 = __require("path");
|
|
40735
40735
|
var FILENAME_SEP = ".";
|
|
40736
40736
|
var ZIP_EXT = ".gz";
|
|
40737
40737
|
module.exports = ({ file, keepFileExt, needsIndex, alwaysIncludeDate, compress }) => {
|
|
40738
|
-
const dirAndName = path$
|
|
40738
|
+
const dirAndName = path$17.join(file.dir, file.name);
|
|
40739
40739
|
const ext = (f) => f + file.ext;
|
|
40740
40740
|
const index = (f, i, d) => (needsIndex || !d) && i ? f + FILENAME_SEP + i : f;
|
|
40741
40741
|
const date = (f, i, d) => {
|
|
@@ -40880,7 +40880,7 @@ var require_moveAndMaybeCompressFile = /* @__PURE__ */ __commonJSMin(((exports,
|
|
|
40880
40880
|
var require_RollingFileWriteStream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40881
40881
|
var debug = require_src()("streamroller:RollingFileWriteStream");
|
|
40882
40882
|
var fs = require_lib$4();
|
|
40883
|
-
var path$
|
|
40883
|
+
var path$16 = __require("path");
|
|
40884
40884
|
var newNow = require_now();
|
|
40885
40885
|
var format = require_lib$3();
|
|
40886
40886
|
var { Writable: Writable$1 } = __require("stream");
|
|
@@ -40911,8 +40911,8 @@ var require_RollingFileWriteStream = /* @__PURE__ */ __commonJSMin(((exports, mo
|
|
|
40911
40911
|
debug(`constructor: creating RollingFileWriteStream. path=${filePath}`);
|
|
40912
40912
|
super(options);
|
|
40913
40913
|
this.options = this._parseOption(options);
|
|
40914
|
-
this.fileObject = path$
|
|
40915
|
-
if (this.fileObject.dir === "") this.fileObject = path$
|
|
40914
|
+
this.fileObject = path$16.parse(filePath);
|
|
40915
|
+
if (this.fileObject.dir === "") this.fileObject = path$16.parse(path$16.join(process.cwd(), filePath));
|
|
40916
40916
|
this.fileFormatter = fileNameFormatter({
|
|
40917
40917
|
file: this.fileObject,
|
|
40918
40918
|
alwaysIncludeDate: this.options.alwaysIncludePattern,
|
|
@@ -41049,7 +41049,7 @@ var require_RollingFileWriteStream = /* @__PURE__ */ __commonJSMin(((exports, mo
|
|
|
41049
41049
|
const existingFileDetails = await this._getExistingFiles();
|
|
41050
41050
|
debug(`_clean: numToKeep = ${this.options.numToKeep}, existingFiles = ${existingFileDetails.length}`);
|
|
41051
41051
|
debug("_clean: existing files are: ", existingFileDetails);
|
|
41052
|
-
if (this._tooManyFiles(existingFileDetails.length)) await deleteFiles(existingFileDetails.slice(0, existingFileDetails.length - this.options.numToKeep - 1).map((f) => path$
|
|
41052
|
+
if (this._tooManyFiles(existingFileDetails.length)) await deleteFiles(existingFileDetails.slice(0, existingFileDetails.length - this.options.numToKeep - 1).map((f) => path$16.format({
|
|
41053
41053
|
dir: this.fileObject.dir,
|
|
41054
41054
|
base: f.filename
|
|
41055
41055
|
})));
|
|
@@ -41123,7 +41123,7 @@ var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41123
41123
|
//#region ../../node_modules/log4js/lib/appenders/file.js
|
|
41124
41124
|
var require_file = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
41125
41125
|
var debug = require_src()("log4js:file");
|
|
41126
|
-
var path$
|
|
41126
|
+
var path$15 = __require("path");
|
|
41127
41127
|
var streams = require_lib$2();
|
|
41128
41128
|
var eol$2 = __require("os").EOL;
|
|
41129
41129
|
function openTheStream(file, fileSize, numFiles, options) {
|
|
@@ -41150,7 +41150,7 @@ var require_file = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41150
41150
|
* @param timezoneOffset - optional timezone offset in minutes (default system local)
|
|
41151
41151
|
*/
|
|
41152
41152
|
function fileAppender(file, layout, logSize, numBackups, options, timezoneOffset) {
|
|
41153
|
-
file = path$
|
|
41153
|
+
file = path$15.normalize(file);
|
|
41154
41154
|
numBackups = numBackups === void 0 ? 5 : numBackups;
|
|
41155
41155
|
numBackups = numBackups === 0 ? 1 : numBackups;
|
|
41156
41156
|
debug("Creating file appender (", file, ", ", logSize, ", ", numBackups, ", ", options, ", ", timezoneOffset, ")");
|
|
@@ -41229,13 +41229,13 @@ var require_dateFile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41229
41229
|
//#region ../../node_modules/log4js/lib/appenders/fileSync.js
|
|
41230
41230
|
var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
41231
41231
|
var debug = require_src()("log4js:fileSync");
|
|
41232
|
-
var path$
|
|
41233
|
-
var fs$
|
|
41232
|
+
var path$14 = __require("path");
|
|
41233
|
+
var fs$13 = __require("fs");
|
|
41234
41234
|
var eol = __require("os").EOL || "\n";
|
|
41235
41235
|
function touchFile(file, options) {
|
|
41236
|
-
if (fs$
|
|
41237
|
-
const id = fs$
|
|
41238
|
-
fs$
|
|
41236
|
+
if (fs$13.existsSync(file)) return;
|
|
41237
|
+
const id = fs$13.openSync(file, options.flags, options.mode);
|
|
41238
|
+
fs$13.closeSync(id);
|
|
41239
41239
|
}
|
|
41240
41240
|
var RollingFileSync = class {
|
|
41241
41241
|
constructor(filename, size, backups, options) {
|
|
@@ -41252,7 +41252,7 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41252
41252
|
function currentFileSize(file) {
|
|
41253
41253
|
let fileSize = 0;
|
|
41254
41254
|
try {
|
|
41255
|
-
fileSize = fs$
|
|
41255
|
+
fileSize = fs$13.statSync(file).size;
|
|
41256
41256
|
} catch (e) {
|
|
41257
41257
|
touchFile(file, options);
|
|
41258
41258
|
}
|
|
@@ -41266,12 +41266,12 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41266
41266
|
}
|
|
41267
41267
|
roll(filename) {
|
|
41268
41268
|
const that = this;
|
|
41269
|
-
const nameMatcher = new RegExp(`^${path$
|
|
41269
|
+
const nameMatcher = new RegExp(`^${path$14.basename(filename)}`);
|
|
41270
41270
|
function justTheseFiles(item) {
|
|
41271
41271
|
return nameMatcher.test(item);
|
|
41272
41272
|
}
|
|
41273
41273
|
function index(filename_) {
|
|
41274
|
-
return parseInt(filename_.substring(`${path$
|
|
41274
|
+
return parseInt(filename_.substring(`${path$14.basename(filename)}.`.length), 10) || 0;
|
|
41275
41275
|
}
|
|
41276
41276
|
function byIndex(a, b) {
|
|
41277
41277
|
if (index(a) > index(b)) return 1;
|
|
@@ -41283,15 +41283,15 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41283
41283
|
debug(`Index of ${fileToRename} is ${idx}`);
|
|
41284
41284
|
if (idx < that.backups) {
|
|
41285
41285
|
try {
|
|
41286
|
-
fs$
|
|
41286
|
+
fs$13.unlinkSync(`${filename}.${idx + 1}`);
|
|
41287
41287
|
} catch (e) {}
|
|
41288
41288
|
debug(`Renaming ${fileToRename} -> ${filename}.${idx + 1}`);
|
|
41289
|
-
fs$
|
|
41289
|
+
fs$13.renameSync(path$14.join(path$14.dirname(filename), fileToRename), `${filename}.${idx + 1}`);
|
|
41290
41290
|
}
|
|
41291
41291
|
}
|
|
41292
41292
|
function renameTheFiles() {
|
|
41293
41293
|
debug("Renaming the old files");
|
|
41294
|
-
fs$
|
|
41294
|
+
fs$13.readdirSync(path$14.dirname(filename)).filter(justTheseFiles).sort(byIndex).reverse().forEach(increaseFileIndex);
|
|
41295
41295
|
}
|
|
41296
41296
|
debug("Rolling, rolling, rolling");
|
|
41297
41297
|
renameTheFiles();
|
|
@@ -41301,7 +41301,7 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41301
41301
|
function writeTheChunk() {
|
|
41302
41302
|
debug("writing the chunk to the file");
|
|
41303
41303
|
that.currentSize += chunk.length;
|
|
41304
|
-
fs$
|
|
41304
|
+
fs$13.appendFileSync(that.filename, chunk);
|
|
41305
41305
|
}
|
|
41306
41306
|
debug("in write");
|
|
41307
41307
|
if (this.shouldRoll()) {
|
|
@@ -41327,7 +41327,7 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41327
41327
|
*/
|
|
41328
41328
|
function fileAppender(file, layout, logSize, numBackups, timezoneOffset, options) {
|
|
41329
41329
|
debug("fileSync appender created");
|
|
41330
|
-
file = path$
|
|
41330
|
+
file = path$14.normalize(file);
|
|
41331
41331
|
numBackups = numBackups === void 0 ? 5 : numBackups;
|
|
41332
41332
|
numBackups = numBackups === 0 ? 1 : numBackups;
|
|
41333
41333
|
function openTheStream(filePath, fileSize, numFiles) {
|
|
@@ -41336,7 +41336,7 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41336
41336
|
else stream = ((f) => {
|
|
41337
41337
|
touchFile(f, options);
|
|
41338
41338
|
return { write(data) {
|
|
41339
|
-
fs$
|
|
41339
|
+
fs$13.appendFileSync(f, data);
|
|
41340
41340
|
} };
|
|
41341
41341
|
})(filePath);
|
|
41342
41342
|
return stream;
|
|
@@ -41361,7 +41361,7 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41361
41361
|
//#endregion
|
|
41362
41362
|
//#region ../../node_modules/log4js/lib/appenders/index.js
|
|
41363
41363
|
var require_appenders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
41364
|
-
var path$
|
|
41364
|
+
var path$13 = __require("path");
|
|
41365
41365
|
var debug = require_src()("log4js:appenders");
|
|
41366
41366
|
var configuration = require_configuration();
|
|
41367
41367
|
var clustering = require_clustering();
|
|
@@ -41388,7 +41388,7 @@ var require_appenders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41388
41388
|
return;
|
|
41389
41389
|
}
|
|
41390
41390
|
};
|
|
41391
|
-
var loadAppenderModule = (type, config) => coreAppenders.get(type) || tryLoading(`./${type}`, config) || tryLoading(type, config) || __require.main && tryLoading(path$
|
|
41391
|
+
var loadAppenderModule = (type, config) => coreAppenders.get(type) || tryLoading(`./${type}`, config) || tryLoading(type, config) || __require.main && tryLoading(path$13.join(path$13.dirname(__require.main.filename), type), config) || tryLoading(path$13.join(process.cwd(), type), config);
|
|
41392
41392
|
var appendersLoading = /* @__PURE__ */ new Set();
|
|
41393
41393
|
var getAppender = (name, config) => {
|
|
41394
41394
|
if (appenders.has(name)) return appenders.get(name);
|
|
@@ -41935,7 +41935,7 @@ var require_log4js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41935
41935
|
* Website: http://log4js.berlios.de
|
|
41936
41936
|
*/
|
|
41937
41937
|
var debug = require_src()("log4js:main");
|
|
41938
|
-
var fs$
|
|
41938
|
+
var fs$12 = __require("fs");
|
|
41939
41939
|
var deepClone = require_rfdc()({ proto: true });
|
|
41940
41940
|
var configuration = require_configuration();
|
|
41941
41941
|
var layouts = require_layouts();
|
|
@@ -41956,7 +41956,7 @@ var require_log4js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41956
41956
|
function loadConfigurationFile(filename) {
|
|
41957
41957
|
debug(`Loading configuration from ${filename}`);
|
|
41958
41958
|
try {
|
|
41959
|
-
return JSON.parse(fs$
|
|
41959
|
+
return JSON.parse(fs$12.readFileSync(filename, "utf8"));
|
|
41960
41960
|
} catch (e) {
|
|
41961
41961
|
throw new Error(`Problem reading config from file "${filename}". Error was ${e.message}`, e);
|
|
41962
41962
|
}
|
|
@@ -43044,10 +43044,10 @@ var require_atomic_sleep = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43044
43044
|
//#endregion
|
|
43045
43045
|
//#region ../../node_modules/sonic-boom/index.js
|
|
43046
43046
|
var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
43047
|
-
var fs$
|
|
43047
|
+
var fs$11 = __require("fs");
|
|
43048
43048
|
var EventEmitter$8 = __require("events");
|
|
43049
43049
|
var inherits = __require("util").inherits;
|
|
43050
|
-
var path$
|
|
43050
|
+
var path$12 = __require("path");
|
|
43051
43051
|
var sleep = require_atomic_sleep();
|
|
43052
43052
|
var assert$1 = __require("assert");
|
|
43053
43053
|
var BUSY_WRITE_TIMEOUT = 100;
|
|
@@ -43087,17 +43087,17 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43087
43087
|
const flags = sonic.append ? "a" : "w";
|
|
43088
43088
|
const mode = sonic.mode;
|
|
43089
43089
|
if (sonic.sync) try {
|
|
43090
|
-
if (sonic.mkdir) fs$
|
|
43091
|
-
fileOpened(null, fs$
|
|
43090
|
+
if (sonic.mkdir) fs$11.mkdirSync(path$12.dirname(file), { recursive: true });
|
|
43091
|
+
fileOpened(null, fs$11.openSync(file, flags, mode));
|
|
43092
43092
|
} catch (err) {
|
|
43093
43093
|
fileOpened(err);
|
|
43094
43094
|
throw err;
|
|
43095
43095
|
}
|
|
43096
|
-
else if (sonic.mkdir) fs$
|
|
43096
|
+
else if (sonic.mkdir) fs$11.mkdir(path$12.dirname(file), { recursive: true }, (err) => {
|
|
43097
43097
|
if (err) return fileOpened(err);
|
|
43098
|
-
fs$
|
|
43098
|
+
fs$11.open(file, flags, mode, fileOpened);
|
|
43099
43099
|
});
|
|
43100
|
-
else fs$
|
|
43100
|
+
else fs$11.open(file, flags, mode, fileOpened);
|
|
43101
43101
|
}
|
|
43102
43102
|
function SonicBoom(opts) {
|
|
43103
43103
|
if (!(this instanceof SonicBoom)) return new SonicBoom(opts);
|
|
@@ -43135,8 +43135,8 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43135
43135
|
this.flush = flushBuffer;
|
|
43136
43136
|
this.flushSync = flushBufferSync;
|
|
43137
43137
|
this._actualWrite = actualWriteBuffer;
|
|
43138
|
-
fsWriteSync = () => fs$
|
|
43139
|
-
fsWrite = () => fs$
|
|
43138
|
+
fsWriteSync = () => fs$11.writeSync(this.fd, this._writingBuf);
|
|
43139
|
+
fsWrite = () => fs$11.write(this.fd, this._writingBuf, this.release);
|
|
43140
43140
|
} else if (contentMode === void 0 || contentMode === kContentModeUtf8) {
|
|
43141
43141
|
this._writingBuf = "";
|
|
43142
43142
|
this.write = write;
|
|
@@ -43144,12 +43144,12 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43144
43144
|
this.flushSync = flushSync;
|
|
43145
43145
|
this._actualWrite = actualWrite;
|
|
43146
43146
|
fsWriteSync = () => {
|
|
43147
|
-
if (Buffer.isBuffer(this._writingBuf)) return fs$
|
|
43148
|
-
return fs$
|
|
43147
|
+
if (Buffer.isBuffer(this._writingBuf)) return fs$11.writeSync(this.fd, this._writingBuf);
|
|
43148
|
+
return fs$11.writeSync(this.fd, this._writingBuf, "utf8");
|
|
43149
43149
|
};
|
|
43150
43150
|
fsWrite = () => {
|
|
43151
|
-
if (Buffer.isBuffer(this._writingBuf)) return fs$
|
|
43152
|
-
return fs$
|
|
43151
|
+
if (Buffer.isBuffer(this._writingBuf)) return fs$11.write(this.fd, this._writingBuf, this.release);
|
|
43152
|
+
return fs$11.write(this.fd, this._writingBuf, "utf8", this.release);
|
|
43153
43153
|
};
|
|
43154
43154
|
} else throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`);
|
|
43155
43155
|
if (typeof fd === "number") {
|
|
@@ -43194,7 +43194,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43194
43194
|
return;
|
|
43195
43195
|
}
|
|
43196
43196
|
}
|
|
43197
|
-
if (this._fsync) fs$
|
|
43197
|
+
if (this._fsync) fs$11.fsyncSync(this.fd);
|
|
43198
43198
|
const len = this._len;
|
|
43199
43199
|
if (this._reopening) {
|
|
43200
43200
|
this._writing = false;
|
|
@@ -43291,7 +43291,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43291
43291
|
this._flushPending = true;
|
|
43292
43292
|
const onDrain = () => {
|
|
43293
43293
|
if (!this._fsync) try {
|
|
43294
|
-
fs$
|
|
43294
|
+
fs$11.fsync(this.fd, (err) => {
|
|
43295
43295
|
this._flushPending = false;
|
|
43296
43296
|
cb(err);
|
|
43297
43297
|
});
|
|
@@ -43368,7 +43368,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43368
43368
|
if (this._writing) return;
|
|
43369
43369
|
const fd = this.fd;
|
|
43370
43370
|
this.once("ready", () => {
|
|
43371
|
-
if (fd !== this.fd) fs$
|
|
43371
|
+
if (fd !== this.fd) fs$11.close(fd, (err) => {
|
|
43372
43372
|
if (err) return this.emit("error", err);
|
|
43373
43373
|
});
|
|
43374
43374
|
});
|
|
@@ -43399,7 +43399,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43399
43399
|
while (this._bufs.length || buf.length) {
|
|
43400
43400
|
if (buf.length <= 0) buf = this._bufs[0];
|
|
43401
43401
|
try {
|
|
43402
|
-
const n = Buffer.isBuffer(buf) ? fs$
|
|
43402
|
+
const n = Buffer.isBuffer(buf) ? fs$11.writeSync(this.fd, buf) : fs$11.writeSync(this.fd, buf, "utf8");
|
|
43403
43403
|
const releasedBufObj = releaseWritingBuf(buf, this._len, n);
|
|
43404
43404
|
buf = releasedBufObj.writingBuf;
|
|
43405
43405
|
this._len = releasedBufObj.len;
|
|
@@ -43410,7 +43410,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43410
43410
|
}
|
|
43411
43411
|
}
|
|
43412
43412
|
try {
|
|
43413
|
-
fs$
|
|
43413
|
+
fs$11.fsyncSync(this.fd);
|
|
43414
43414
|
} catch {}
|
|
43415
43415
|
}
|
|
43416
43416
|
function flushBufferSync() {
|
|
@@ -43424,7 +43424,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43424
43424
|
while (this._bufs.length || buf.length) {
|
|
43425
43425
|
if (buf.length <= 0) buf = mergeBuf(this._bufs[0], this._lens[0]);
|
|
43426
43426
|
try {
|
|
43427
|
-
const n = fs$
|
|
43427
|
+
const n = fs$11.writeSync(this.fd, buf);
|
|
43428
43428
|
buf = buf.subarray(n);
|
|
43429
43429
|
this._len = Math.max(this._len - n, 0);
|
|
43430
43430
|
if (buf.length <= 0) {
|
|
@@ -43446,24 +43446,24 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43446
43446
|
this._writing = true;
|
|
43447
43447
|
this._writingBuf = this._writingBuf.length ? this._writingBuf : this._bufs.shift() || "";
|
|
43448
43448
|
if (this.sync) try {
|
|
43449
|
-
release(null, Buffer.isBuffer(this._writingBuf) ? fs$
|
|
43449
|
+
release(null, Buffer.isBuffer(this._writingBuf) ? fs$11.writeSync(this.fd, this._writingBuf) : fs$11.writeSync(this.fd, this._writingBuf, "utf8"));
|
|
43450
43450
|
} catch (err) {
|
|
43451
43451
|
release(err);
|
|
43452
43452
|
}
|
|
43453
|
-
else fs$
|
|
43453
|
+
else fs$11.write(this.fd, this._writingBuf, release);
|
|
43454
43454
|
}
|
|
43455
43455
|
function actualWriteBuffer() {
|
|
43456
43456
|
const release = this.release;
|
|
43457
43457
|
this._writing = true;
|
|
43458
43458
|
this._writingBuf = this._writingBuf.length ? this._writingBuf : mergeBuf(this._bufs.shift(), this._lens.shift());
|
|
43459
43459
|
if (this.sync) try {
|
|
43460
|
-
release(null, fs$
|
|
43460
|
+
release(null, fs$11.writeSync(this.fd, this._writingBuf));
|
|
43461
43461
|
} catch (err) {
|
|
43462
43462
|
release(err);
|
|
43463
43463
|
}
|
|
43464
43464
|
else {
|
|
43465
43465
|
if (kCopyBuffer) this._writingBuf = Buffer.from(this._writingBuf);
|
|
43466
|
-
fs$
|
|
43466
|
+
fs$11.write(this.fd, this._writingBuf, release);
|
|
43467
43467
|
}
|
|
43468
43468
|
}
|
|
43469
43469
|
function actualClose(sonic) {
|
|
@@ -43477,10 +43477,10 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43477
43477
|
sonic._lens = [];
|
|
43478
43478
|
assert$1(typeof sonic.fd === "number", `sonic.fd must be a number, got ${typeof sonic.fd}`);
|
|
43479
43479
|
try {
|
|
43480
|
-
fs$
|
|
43480
|
+
fs$11.fsync(sonic.fd, closeWrapped);
|
|
43481
43481
|
} catch {}
|
|
43482
43482
|
function closeWrapped() {
|
|
43483
|
-
if (sonic.fd !== 1 && sonic.fd !== 2) fs$
|
|
43483
|
+
if (sonic.fd !== 1 && sonic.fd !== 2) fs$11.close(sonic.fd, done);
|
|
43484
43484
|
else done();
|
|
43485
43485
|
}
|
|
43486
43486
|
function done(err) {
|
|
@@ -72277,7 +72277,7 @@ var require_tcp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
72277
72277
|
var Transporter = require_base$1();
|
|
72278
72278
|
var _ = require_lodash();
|
|
72279
72279
|
var { isObject, isString } = require_utils$3();
|
|
72280
|
-
var fs$
|
|
72280
|
+
var fs$10 = __require("fs");
|
|
72281
72281
|
var kleur = require_kleur();
|
|
72282
72282
|
var Node = require_node();
|
|
72283
72283
|
var P = require_packets();
|
|
@@ -72424,7 +72424,7 @@ var require_tcp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
72424
72424
|
if (isString(str) && str.startsWith("file://")) {
|
|
72425
72425
|
const fName = str.replace("file://", "");
|
|
72426
72426
|
this.logger.debug(`Load nodes list from file '${fName}'...`);
|
|
72427
|
-
let content = fs$
|
|
72427
|
+
let content = fs$10.readFileSync(fName);
|
|
72428
72428
|
if (content && content.length > 0) {
|
|
72429
72429
|
const str = content.toString().trim();
|
|
72430
72430
|
if (str.startsWith("{") || str.startsWith("[")) return JSON.parse(str);
|
|
@@ -74914,15 +74914,15 @@ var require_ttl = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
74914
74914
|
//#region ../../node_modules/recursive-watch/index.js
|
|
74915
74915
|
var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
74916
74916
|
var os$5 = __require("os");
|
|
74917
|
-
var fs$
|
|
74918
|
-
var path$
|
|
74917
|
+
var fs$9 = __require("fs");
|
|
74918
|
+
var path$11 = __require("path");
|
|
74919
74919
|
var Cache = require_ttl();
|
|
74920
74920
|
var watchDirectory = os$5.platform() === "linux" ? watchFallback : watchRecursive;
|
|
74921
74921
|
module.exports = watch;
|
|
74922
74922
|
function watch(name, onchange) {
|
|
74923
74923
|
var clear = null;
|
|
74924
74924
|
var stopped = false;
|
|
74925
|
-
fs$
|
|
74925
|
+
fs$9.lstat(name, function(_, st) {
|
|
74926
74926
|
if (!st || stopped) {
|
|
74927
74927
|
stopped = true;
|
|
74928
74928
|
return;
|
|
@@ -74938,8 +74938,8 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
74938
74938
|
function watchFile(filename, onchange) {
|
|
74939
74939
|
var prev = null;
|
|
74940
74940
|
var prevTime = 0;
|
|
74941
|
-
var w = fs$
|
|
74942
|
-
fs$
|
|
74941
|
+
var w = fs$9.watch(filename, function() {
|
|
74942
|
+
fs$9.lstat(filename, function(_, st) {
|
|
74943
74943
|
var now = Date.now();
|
|
74944
74944
|
if (now - prevTime > 2e3 || !same(st, prev)) onchange(filename);
|
|
74945
74945
|
prevTime = now;
|
|
@@ -74951,9 +74951,9 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
74951
74951
|
};
|
|
74952
74952
|
}
|
|
74953
74953
|
function watchRecursive(directory, onchange) {
|
|
74954
|
-
var w = fs$
|
|
74954
|
+
var w = fs$9.watch(directory, { recursive: true }, function(change, filename) {
|
|
74955
74955
|
if (!filename) return;
|
|
74956
|
-
onchange(path$
|
|
74956
|
+
onchange(path$11.join(directory, filename));
|
|
74957
74957
|
});
|
|
74958
74958
|
return function() {
|
|
74959
74959
|
w.close();
|
|
@@ -74981,7 +74981,7 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
74981
74981
|
}
|
|
74982
74982
|
function update() {
|
|
74983
74983
|
var filename = queued[0];
|
|
74984
|
-
fs$
|
|
74984
|
+
fs$9.lstat(filename, function(err, st) {
|
|
74985
74985
|
var w = watching[filename];
|
|
74986
74986
|
if (err && w) {
|
|
74987
74987
|
w.close();
|
|
@@ -74990,30 +74990,30 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
74990
74990
|
var prevSt = prevs.get(filename);
|
|
74991
74991
|
if (!prevSt || !same(st, prevSt)) onchange(filename);
|
|
74992
74992
|
prevs.put(filename, st);
|
|
74993
|
-
visit(path$
|
|
74993
|
+
visit(path$11.relative(directory, filename), function() {
|
|
74994
74994
|
queued.shift();
|
|
74995
74995
|
if (queued.length) update();
|
|
74996
74996
|
});
|
|
74997
74997
|
});
|
|
74998
74998
|
}
|
|
74999
74999
|
function visit(next, cb) {
|
|
75000
|
-
var dir = path$
|
|
75001
|
-
fs$
|
|
75000
|
+
var dir = path$11.join(directory, next);
|
|
75001
|
+
fs$9.lstat(dir, function(err, st) {
|
|
75002
75002
|
if (err || !st.isDirectory()) return cb();
|
|
75003
75003
|
if (watching[dir]) return cb();
|
|
75004
75004
|
if (loaded) emit(dir);
|
|
75005
|
-
var w = fs$
|
|
75006
|
-
filename = path$
|
|
75007
|
-
emit(path$
|
|
75005
|
+
var w = fs$9.watch(dir, function(change, filename) {
|
|
75006
|
+
filename = path$11.join(next, filename);
|
|
75007
|
+
emit(path$11.join(directory, filename));
|
|
75008
75008
|
});
|
|
75009
75009
|
w.on("error", noop);
|
|
75010
75010
|
watching[dir] = w;
|
|
75011
|
-
fs$
|
|
75011
|
+
fs$9.readdir(dir, function(err, list) {
|
|
75012
75012
|
if (err) return cb(err);
|
|
75013
75013
|
loop();
|
|
75014
75014
|
function loop() {
|
|
75015
75015
|
if (!list.length) return cb();
|
|
75016
|
-
visit(path$
|
|
75016
|
+
visit(path$11.join(next, list.shift()), loop);
|
|
75017
75017
|
}
|
|
75018
75018
|
});
|
|
75019
75019
|
});
|
|
@@ -75028,9 +75028,9 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
75028
75028
|
//#endregion
|
|
75029
75029
|
//#region ../../node_modules/moleculer/src/middlewares/hot-reload.js
|
|
75030
75030
|
var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
75031
|
-
var fs$
|
|
75031
|
+
var fs$8 = __require("fs");
|
|
75032
75032
|
var kleur = require_kleur();
|
|
75033
|
-
var path$
|
|
75033
|
+
var path$10 = __require("path");
|
|
75034
75034
|
var watch = require_recursive_watch();
|
|
75035
75035
|
var _ = require_lodash();
|
|
75036
75036
|
var { clearRequireCache, makeDirs, isFunction, isString, uniq } = require_utils$3();
|
|
@@ -75042,10 +75042,10 @@ var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
75042
75042
|
let hotReloadModules = [];
|
|
75043
75043
|
let extraFiles = null;
|
|
75044
75044
|
function hotReloadService(service) {
|
|
75045
|
-
const relPath = path$
|
|
75045
|
+
const relPath = path$10.relative(process.cwd(), service.__filename);
|
|
75046
75046
|
broker.logger.info(`Hot reload '${service.name}' service...`, kleur.grey(relPath));
|
|
75047
75047
|
return broker.destroyService(service).then(() => {
|
|
75048
|
-
if (fs$
|
|
75048
|
+
if (fs$8.existsSync(service.__filename)) try {
|
|
75049
75049
|
return broker.loadService(service.__filename);
|
|
75050
75050
|
} catch (err) {
|
|
75051
75051
|
broker.logger.error(`Failed to load service '${service.__filename}'`, err);
|
|
@@ -75077,7 +75077,7 @@ var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
75077
75077
|
});
|
|
75078
75078
|
broker.logger.info(kleur.bgMagenta().white().bold(`Reload ${needToReloadDedup.length} service(s)`));
|
|
75079
75079
|
needToReloadDedup.forEach((svc) => {
|
|
75080
|
-
if (typeof svc == "string") if (fs$
|
|
75080
|
+
if (typeof svc == "string") if (fs$8.existsSync(svc)) return broker.loadService(svc);
|
|
75081
75081
|
else return;
|
|
75082
75082
|
return hotReloadService(svc);
|
|
75083
75083
|
});
|
|
@@ -75087,19 +75087,19 @@ var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
75087
75087
|
broker.logger.debug("");
|
|
75088
75088
|
broker.logger.debug(kleur.yellow().bold("Watching the following project files:"));
|
|
75089
75089
|
projectFiles.forEach((watchItem, fName) => {
|
|
75090
|
-
if (!fs$
|
|
75090
|
+
if (!fs$8.existsSync(fName)) projectFiles.delete(fName);
|
|
75091
75091
|
});
|
|
75092
75092
|
projectFiles.forEach((watchItem, fName) => {
|
|
75093
|
-
const relPath = path$
|
|
75093
|
+
const relPath = path$10.relative(process.cwd(), fName);
|
|
75094
75094
|
if (watchItem.brokerRestart) broker.logger.debug(` ${relPath}:`, kleur.grey("restart broker."));
|
|
75095
75095
|
else if (watchItem.allServices) broker.logger.debug(` ${relPath}:`, kleur.grey("reload all services."));
|
|
75096
75096
|
else if (watchItem.services.length > 0) {
|
|
75097
75097
|
broker.logger.debug(` ${relPath}:`, kleur.grey(`reload ${watchItem.services.length} service(s) & ${watchItem.others.length} other(s).`));
|
|
75098
75098
|
watchItem.services.forEach((svcFullname) => broker.logger.debug(kleur.grey(` ${svcFullname}`)));
|
|
75099
|
-
watchItem.others.forEach((filename) => broker.logger.debug(kleur.grey(` ${path$
|
|
75099
|
+
watchItem.others.forEach((filename) => broker.logger.debug(kleur.grey(` ${path$10.relative(process.cwd(), filename)}`)));
|
|
75100
75100
|
}
|
|
75101
|
-
watchItem.watcher = fs$
|
|
75102
|
-
const relPath = path$
|
|
75101
|
+
watchItem.watcher = fs$8.watch(fName, (eventType) => {
|
|
75102
|
+
const relPath = path$10.relative(process.cwd(), fName);
|
|
75103
75103
|
broker.logger.info(kleur.magenta().bold(`The '${relPath}' file is changed. (Event: ${eventType})`));
|
|
75104
75104
|
clearRequireCache(fName);
|
|
75105
75105
|
if (watchItem.others.length > 0) watchItem.others.forEach((f) => clearRequireCache(f));
|
|
@@ -75217,16 +75217,16 @@ var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
75217
75217
|
broker.logger.debug(kleur.yellow().bold("Watching the following folder(s):"));
|
|
75218
75218
|
folders.forEach((folder) => {
|
|
75219
75219
|
makeDirs(folder);
|
|
75220
|
-
broker.logger.debug(` ${path$
|
|
75220
|
+
broker.logger.debug(` ${path$10.relative(process.cwd(), folder)}/`);
|
|
75221
75221
|
folderWatchers.push({
|
|
75222
75222
|
path: folder,
|
|
75223
75223
|
watcher: watch(folder, (filename) => {
|
|
75224
75224
|
if (filename.endsWith(".service.js") || filename.endsWith(".service.ts")) {
|
|
75225
|
-
broker.logger.debug(`There is changes in '${folder}' folder: `, path$
|
|
75225
|
+
broker.logger.debug(`There is changes in '${folder}' folder: `, path$10.basename(filename));
|
|
75226
75226
|
const isLoaded = broker.services.some((svc) => svc.__filename == filename);
|
|
75227
|
-
const fileExists = fs$
|
|
75227
|
+
const fileExists = fs$8.existsSync(filename);
|
|
75228
75228
|
if (!isLoaded && fileExists) {
|
|
75229
|
-
broker.logger.debug("Loading new file: ", path$
|
|
75229
|
+
broker.logger.debug("Loading new file: ", path$10.basename(filename));
|
|
75230
75230
|
needToLoad.add(filename);
|
|
75231
75231
|
loadServices();
|
|
75232
75232
|
}
|
|
@@ -75402,8 +75402,8 @@ var require_compression = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
75402
75402
|
var require_transit_logger = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
75403
75403
|
var _ = require_lodash();
|
|
75404
75404
|
var kleur = require_kleur();
|
|
75405
|
-
var fs$
|
|
75406
|
-
var path$
|
|
75405
|
+
var fs$7 = __require("fs");
|
|
75406
|
+
var path$9 = __require("path");
|
|
75407
75407
|
var { makeDirs, safetyObject } = require_utils$3();
|
|
75408
75408
|
module.exports = function TransitLoggerMiddleware(opts) {
|
|
75409
75409
|
opts = _.defaultsDeep(opts, {
|
|
@@ -75428,7 +75428,7 @@ var require_transit_logger = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
75428
75428
|
} catch {
|
|
75429
75429
|
data = JSON.stringify(safetyObject(payload), payload instanceof Error ? Object.getOwnPropertyNames(payload) : null, 4);
|
|
75430
75430
|
}
|
|
75431
|
-
fs$
|
|
75431
|
+
fs$7.writeFile(path$9.join(targetFolder, filename), data, () => {});
|
|
75432
75432
|
}
|
|
75433
75433
|
const coloringSend = opts.colors && opts.colors.send ? opts.colors.send.split(".").reduce((a, b) => a[b] || a()[b], kleur) : (s) => s;
|
|
75434
75434
|
const coloringReceive = opts.colors && opts.colors.receive ? opts.colors.receive.split(".").reduce((a, b) => a[b] || a()[b], kleur) : (s) => s;
|
|
@@ -75439,7 +75439,7 @@ var require_transit_logger = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
75439
75439
|
logger = opts.logger || broker.getLogger("debug");
|
|
75440
75440
|
nodeID = broker.nodeID;
|
|
75441
75441
|
if (opts.folder) {
|
|
75442
|
-
targetFolder = path$
|
|
75442
|
+
targetFolder = path$9.join(opts.folder, nodeID);
|
|
75443
75443
|
makeDirs(targetFolder);
|
|
75444
75444
|
}
|
|
75445
75445
|
logFn = opts.logLevel ? logger[opts.logLevel] : null;
|
|
@@ -75476,8 +75476,8 @@ var require_transit_logger = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
75476
75476
|
var require_action_logger = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
75477
75477
|
var _ = require_lodash();
|
|
75478
75478
|
var kleur = require_kleur();
|
|
75479
|
-
var fs$
|
|
75480
|
-
var path$
|
|
75479
|
+
var fs$6 = __require("fs");
|
|
75480
|
+
var path$8 = __require("path");
|
|
75481
75481
|
var { makeDirs, match, isObject, safetyObject } = require_utils$3();
|
|
75482
75482
|
module.exports = function ActionLoggerMiddleware(opts) {
|
|
75483
75483
|
opts = _.defaultsDeep(opts, {
|
|
@@ -75506,7 +75506,7 @@ var require_action_logger = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
75506
75506
|
} catch {
|
|
75507
75507
|
data = JSON.stringify(safetyObject(payload), payload instanceof Error ? Object.getOwnPropertyNames(payload) : null, 4);
|
|
75508
75508
|
}
|
|
75509
|
-
fs$
|
|
75509
|
+
fs$6.writeFile(path$8.join(targetFolder, filename), data, () => {});
|
|
75510
75510
|
}
|
|
75511
75511
|
function isWhiteListed(actionName) {
|
|
75512
75512
|
return !!opts.whitelist.find((pattern) => match(actionName, pattern));
|
|
@@ -75521,7 +75521,7 @@ var require_action_logger = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
75521
75521
|
logger = opts.logger || broker.getLogger("debug");
|
|
75522
75522
|
nodeID = broker.nodeID;
|
|
75523
75523
|
if (opts.folder) {
|
|
75524
|
-
targetFolder = path$
|
|
75524
|
+
targetFolder = path$8.join(opts.folder, nodeID);
|
|
75525
75525
|
makeDirs(targetFolder);
|
|
75526
75526
|
}
|
|
75527
75527
|
logFn = opts.logLevel ? logger[opts.logLevel] : null;
|
|
@@ -78723,7 +78723,7 @@ var require_service_broker = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
78723
78723
|
var EventEmitter2 = require_eventemitter2().EventEmitter2;
|
|
78724
78724
|
var _ = require_lodash();
|
|
78725
78725
|
var { globSync } = require_index_min$1();
|
|
78726
|
-
var path$
|
|
78726
|
+
var path$7 = __require("path");
|
|
78727
78727
|
var { format } = __require("util");
|
|
78728
78728
|
var Transit = require_transit();
|
|
78729
78729
|
var Registry = require_registry();
|
|
@@ -79272,7 +79272,7 @@ var require_service_broker = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
79272
79272
|
loadServices(folder = "./services", fileMask = "**/*.service.js") {
|
|
79273
79273
|
this.logger.debug(`Search services in '${folder}/${fileMask}'...`);
|
|
79274
79274
|
let serviceFiles;
|
|
79275
|
-
if (Array.isArray(fileMask)) serviceFiles = fileMask.map((f) => path$
|
|
79275
|
+
if (Array.isArray(fileMask)) serviceFiles = fileMask.map((f) => path$7.join(folder, f));
|
|
79276
79276
|
else serviceFiles = globSync(folder + "/" + fileMask);
|
|
79277
79277
|
if (serviceFiles) serviceFiles.forEach((filename) => this.loadService(filename));
|
|
79278
79278
|
return serviceFiles.length;
|
|
@@ -79288,8 +79288,8 @@ var require_service_broker = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
79288
79288
|
loadService(filePath) {
|
|
79289
79289
|
let fName, schema;
|
|
79290
79290
|
try {
|
|
79291
|
-
fName = __require.resolve(path$
|
|
79292
|
-
this.logger.debug(`Load service '${path$
|
|
79291
|
+
fName = __require.resolve(path$7.resolve(filePath));
|
|
79292
|
+
this.logger.debug(`Load service '${path$7.basename(fName)}'...`);
|
|
79293
79293
|
const r = __require(fName);
|
|
79294
79294
|
schema = r.default != null ? r.default : r;
|
|
79295
79295
|
let svc;
|
|
@@ -82272,7 +82272,7 @@ var require_leven = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82272
82272
|
//#region ../../node_modules/args/lib/utils.js
|
|
82273
82273
|
var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
82274
82274
|
var { spawn } = __require("child_process");
|
|
82275
|
-
var path$
|
|
82275
|
+
var path$6 = __require("path");
|
|
82276
82276
|
var camelcase = require_camelcase();
|
|
82277
82277
|
var leven = require_leven();
|
|
82278
82278
|
function similarityBestMatch(mainString, targetStrings) {
|
|
@@ -82433,10 +82433,10 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82433
82433
|
break;
|
|
82434
82434
|
}
|
|
82435
82435
|
if (process.platform === "win32") {
|
|
82436
|
-
const binaryExt = path$
|
|
82436
|
+
const binaryExt = path$6.extname(this.binary);
|
|
82437
82437
|
const mainModule = process.env.APPVEYOR ? "_fixture" : process.mainModule.filename;
|
|
82438
82438
|
full = `${mainModule}-${subCommand}`;
|
|
82439
|
-
if (path$
|
|
82439
|
+
if (path$6.extname(this.binary)) full = `${mainModule.replace(binaryExt, "")}-${subCommand}${binaryExt}`;
|
|
82440
82440
|
args.unshift(full);
|
|
82441
82441
|
this.child = spawn(process.execPath, args, { stdio: "inherit" });
|
|
82442
82442
|
} else this.child = spawn(full, args, { stdio: "inherit" });
|
|
@@ -82629,7 +82629,7 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82629
82629
|
//#endregion
|
|
82630
82630
|
//#region ../../node_modules/args/lib/parse.js
|
|
82631
82631
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
82632
|
-
var path$
|
|
82632
|
+
var path$5 = __require("path");
|
|
82633
82633
|
var parser = require_lib$1();
|
|
82634
82634
|
module.exports = function(argv, options) {
|
|
82635
82635
|
Object.assign(this.config, options);
|
|
@@ -82644,7 +82644,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82644
82644
|
}
|
|
82645
82645
|
else this.printSubColor = this.printSubColor[this.config.subColor];
|
|
82646
82646
|
this.raw = parser(argv.slice(1), this.config.mri || this.config.minimist);
|
|
82647
|
-
this.binary = path$
|
|
82647
|
+
this.binary = path$5.basename(this.raw._[0]);
|
|
82648
82648
|
if (this.config.version) this.checkVersion();
|
|
82649
82649
|
if (this.config.help) this.checkHelp();
|
|
82650
82650
|
const subCommand = this.raw._[1];
|
|
@@ -82729,8 +82729,8 @@ var require_help = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82729
82729
|
//#endregion
|
|
82730
82730
|
//#region ../../node_modules/args/lib/version.js
|
|
82731
82731
|
var require_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
82732
|
-
var fs$
|
|
82733
|
-
var path$
|
|
82732
|
+
var fs$5 = __require("fs");
|
|
82733
|
+
var path$4 = __require("path");
|
|
82734
82734
|
/**
|
|
82735
82735
|
* Retrieves the main module package.json information.
|
|
82736
82736
|
*
|
|
@@ -82741,13 +82741,13 @@ var require_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82741
82741
|
* An object containing the package.json contents or NULL if it could not be found.
|
|
82742
82742
|
*/
|
|
82743
82743
|
function findPackage(directory) {
|
|
82744
|
-
const file = path$
|
|
82745
|
-
if (fs$
|
|
82746
|
-
const parent = path$
|
|
82744
|
+
const file = path$4.resolve(directory, "package.json");
|
|
82745
|
+
if (fs$5.existsSync(file) && fs$5.statSync(file).isFile()) return __require(file);
|
|
82746
|
+
const parent = path$4.resolve(directory, "..");
|
|
82747
82747
|
return parent === directory ? null : findPackage(parent);
|
|
82748
82748
|
}
|
|
82749
82749
|
module.exports = function() {
|
|
82750
|
-
const pkg = findPackage(path$
|
|
82750
|
+
const pkg = findPackage(path$4.dirname(process.mainModule.filename));
|
|
82751
82751
|
const version = pkg && pkg.version || "-/-";
|
|
82752
82752
|
console.log(version);
|
|
82753
82753
|
if (this.config.exit && this.config.exit.version) process.exit();
|
|
@@ -82804,8 +82804,8 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82804
82804
|
//#endregion
|
|
82805
82805
|
//#region ../../node_modules/dotenv/lib/main.js
|
|
82806
82806
|
var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
82807
|
-
var fs$
|
|
82808
|
-
var path$
|
|
82807
|
+
var fs$4 = __require("fs");
|
|
82808
|
+
var path$3 = __require("path");
|
|
82809
82809
|
var os$3 = __require("os");
|
|
82810
82810
|
var crypto = __require("crypto");
|
|
82811
82811
|
var TIPS = [
|
|
@@ -82932,14 +82932,14 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82932
82932
|
function _vaultPath(options) {
|
|
82933
82933
|
let possibleVaultPath = null;
|
|
82934
82934
|
if (options && options.path && options.path.length > 0) if (Array.isArray(options.path)) {
|
|
82935
|
-
for (const filepath of options.path) if (fs$
|
|
82935
|
+
for (const filepath of options.path) if (fs$4.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
|
|
82936
82936
|
} else possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
82937
|
-
else possibleVaultPath = path$
|
|
82938
|
-
if (fs$
|
|
82937
|
+
else possibleVaultPath = path$3.resolve(process.cwd(), ".env.vault");
|
|
82938
|
+
if (fs$4.existsSync(possibleVaultPath)) return possibleVaultPath;
|
|
82939
82939
|
return null;
|
|
82940
82940
|
}
|
|
82941
82941
|
function _resolveHome(envPath) {
|
|
82942
|
-
return envPath[0] === "~" ? path$
|
|
82942
|
+
return envPath[0] === "~" ? path$3.join(os$3.homedir(), envPath.slice(1)) : envPath;
|
|
82943
82943
|
}
|
|
82944
82944
|
function _configVault(options) {
|
|
82945
82945
|
const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
|
|
@@ -82952,7 +82952,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82952
82952
|
return { parsed };
|
|
82953
82953
|
}
|
|
82954
82954
|
function configDotenv(options) {
|
|
82955
|
-
const dotenvPath = path$
|
|
82955
|
+
const dotenvPath = path$3.resolve(process.cwd(), ".env");
|
|
82956
82956
|
let encoding = "utf8";
|
|
82957
82957
|
let processEnv = process.env;
|
|
82958
82958
|
if (options && options.processEnv != null) processEnv = options.processEnv;
|
|
@@ -82969,7 +82969,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82969
82969
|
let lastError;
|
|
82970
82970
|
const parsedAll = {};
|
|
82971
82971
|
for (const path of optionPaths) try {
|
|
82972
|
-
const parsed = DotenvModule.parse(fs$
|
|
82972
|
+
const parsed = DotenvModule.parse(fs$4.readFileSync(path, { encoding }));
|
|
82973
82973
|
DotenvModule.populate(parsedAll, parsed, options);
|
|
82974
82974
|
} catch (e) {
|
|
82975
82975
|
if (debug) _debug(`failed to load ${path} ${e.message}`);
|
|
@@ -82982,7 +82982,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82982
82982
|
const keysCount = Object.keys(populated).length;
|
|
82983
82983
|
const shortPaths = [];
|
|
82984
82984
|
for (const filePath of optionPaths) try {
|
|
82985
|
-
const relative = path$
|
|
82985
|
+
const relative = path$3.relative(process.cwd(), filePath);
|
|
82986
82986
|
shortPaths.push(relative);
|
|
82987
82987
|
} catch (e) {
|
|
82988
82988
|
if (debug) _debug(`failed to load ${filePath} ${e.message}`);
|
|
@@ -83081,8 +83081,8 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
83081
83081
|
*/
|
|
83082
83082
|
var ServiceBroker = require_service_broker();
|
|
83083
83083
|
var utils = require_utils$3();
|
|
83084
|
-
var fs$
|
|
83085
|
-
var path$
|
|
83084
|
+
var fs$3 = __require("fs");
|
|
83085
|
+
var path$2 = __require("path");
|
|
83086
83086
|
var { globSync } = require_index_min$1();
|
|
83087
83087
|
var inspect = __require("util").inspect;
|
|
83088
83088
|
var _ = require_lodash();
|
|
@@ -83210,17 +83210,17 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
83210
83210
|
let filePath;
|
|
83211
83211
|
const configPath = process.env["MOLECULER_CONFIG"] || this.flags.config;
|
|
83212
83212
|
if (configPath != null) {
|
|
83213
|
-
if (path$
|
|
83213
|
+
if (path$2.isAbsolute(configPath)) filePath = this.tryConfigPath(configPath);
|
|
83214
83214
|
else {
|
|
83215
|
-
filePath = this.tryConfigPath(path$
|
|
83215
|
+
filePath = this.tryConfigPath(path$2.resolve(process.cwd(), configPath));
|
|
83216
83216
|
if (filePath == null) filePath = this.tryConfigPath(configPath, true);
|
|
83217
83217
|
}
|
|
83218
83218
|
if (filePath == null) return Promise.reject(/* @__PURE__ */ new Error(`Config file not found: ${configPath}`));
|
|
83219
83219
|
}
|
|
83220
|
-
if (filePath == null) filePath = this.tryConfigPath(path$
|
|
83221
|
-
if (filePath == null) filePath = this.tryConfigPath(path$
|
|
83220
|
+
if (filePath == null) filePath = this.tryConfigPath(path$2.resolve(process.cwd(), "moleculer.config.js"));
|
|
83221
|
+
if (filePath == null) filePath = this.tryConfigPath(path$2.resolve(process.cwd(), "moleculer.config.json"));
|
|
83222
83222
|
if (filePath == null) return Promise.resolve({});
|
|
83223
|
-
const ext = path$
|
|
83223
|
+
const ext = path$2.extname(filePath);
|
|
83224
83224
|
switch (ext) {
|
|
83225
83225
|
case ".json":
|
|
83226
83226
|
case ".js":
|
|
@@ -83306,7 +83306,7 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
83306
83306
|
*/
|
|
83307
83307
|
isDirectory(p) {
|
|
83308
83308
|
try {
|
|
83309
|
-
return fs$
|
|
83309
|
+
return fs$3.lstatSync(p).isDirectory();
|
|
83310
83310
|
} catch {}
|
|
83311
83311
|
return false;
|
|
83312
83312
|
}
|
|
@@ -83318,7 +83318,7 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
83318
83318
|
*/
|
|
83319
83319
|
isServiceFile(p) {
|
|
83320
83320
|
try {
|
|
83321
|
-
return !fs$
|
|
83321
|
+
return !fs$3.lstatSync(p).isDirectory();
|
|
83322
83322
|
} catch {}
|
|
83323
83323
|
return false;
|
|
83324
83324
|
}
|
|
@@ -83343,7 +83343,7 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
83343
83343
|
this.watchFolders.length = 0;
|
|
83344
83344
|
const fileMask = this.flags.mask || "**/*.service.js";
|
|
83345
83345
|
const serviceDir = process.env.SERVICEDIR || "";
|
|
83346
|
-
const svcDir = path$
|
|
83346
|
+
const svcDir = path$2.isAbsolute(serviceDir) ? serviceDir : path$2.resolve(process.cwd(), serviceDir);
|
|
83347
83347
|
let patterns = this.servicePaths;
|
|
83348
83348
|
if (process.env.SERVICES || process.env.SERVICEDIR) {
|
|
83349
83349
|
if (this.isDirectory(svcDir) && !process.env.SERVICES) {
|
|
@@ -83359,7 +83359,7 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
83359
83359
|
if (p.startsWith("npm:")) this.loadNpmModule(p.slice(4));
|
|
83360
83360
|
else {
|
|
83361
83361
|
let files;
|
|
83362
|
-
const svcPath = path$
|
|
83362
|
+
const svcPath = path$2.isAbsolute(p) ? p : path$2.resolve(svcDir, p);
|
|
83363
83363
|
if (this.isDirectory(svcPath)) {
|
|
83364
83364
|
if (this.config.hotReload) this.watchFolders.push(svcPath);
|
|
83365
83365
|
files = globSync(svcPath + "/" + fileMask, { absolute: true });
|
|
@@ -83531,12 +83531,12 @@ var Gt = (n, t, e) => {
|
|
|
83531
83531
|
}
|
|
83532
83532
|
return h;
|
|
83533
83533
|
};
|
|
83534
|
-
var fe = "\0SLASH" + Math.random() + "\0", ue = "\0OPEN" + Math.random() + "\0", qt = "\0CLOSE" + Math.random() + "\0", de = "\0COMMA" + Math.random() + "\0", pe = "\0PERIOD" + Math.random() + "\0", is = new RegExp(fe, "g"), rs = new RegExp(ue, "g"), ns = new RegExp(qt, "g"), os$1 = new RegExp(de, "g"), hs = new RegExp(pe, "g"), as = /\\\\/g, ls = /\\{/g, cs = /\\}/g, fs$
|
|
83534
|
+
var fe = "\0SLASH" + Math.random() + "\0", ue = "\0OPEN" + Math.random() + "\0", qt = "\0CLOSE" + Math.random() + "\0", de = "\0COMMA" + Math.random() + "\0", pe = "\0PERIOD" + Math.random() + "\0", is = new RegExp(fe, "g"), rs = new RegExp(ue, "g"), ns = new RegExp(qt, "g"), os$1 = new RegExp(de, "g"), hs = new RegExp(pe, "g"), as = /\\\\/g, ls = /\\{/g, cs = /\\}/g, fs$2 = /\\,/g, us = /\\./g, ds = 1e5;
|
|
83535
83535
|
function Ht(n) {
|
|
83536
83536
|
return isNaN(n) ? n.charCodeAt(0) : parseInt(n, 10);
|
|
83537
83537
|
}
|
|
83538
83538
|
function ps(n) {
|
|
83539
|
-
return n.replace(as, fe).replace(ls, ue).replace(cs, qt).replace(fs$
|
|
83539
|
+
return n.replace(as, fe).replace(ls, ue).replace(cs, qt).replace(fs$2, de).replace(us, pe);
|
|
83540
83540
|
}
|
|
83541
83541
|
function ms(n) {
|
|
83542
83542
|
return n.replace(is, "\\").replace(rs, "{").replace(ns, "}").replace(os$1, ",").replace(hs, ".");
|
|
@@ -83710,7 +83710,7 @@ var xs = new Set([
|
|
|
83710
83710
|
"+",
|
|
83711
83711
|
"*",
|
|
83712
83712
|
"@"
|
|
83713
|
-
]), be = (n) => xs.has(n), vs = "(?!(?:^|/)\\.\\.?(?:$|/))", Ct = "(?!\\.)", Cs = new Set(["[", "."]), Ts = new Set(["..", "."]), As
|
|
83713
|
+
]), be = (n) => xs.has(n), vs = "(?!(?:^|/)\\.\\.?(?:$|/))", Ct = "(?!\\.)", Cs = new Set(["[", "."]), Ts = new Set(["..", "."]), As = /* @__PURE__ */ new Set("().*{}+?[]^$\\!"), ks = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), Kt = "[^/]", Se = Kt + "*?", Ee = Kt + "+?", Q = class n {
|
|
83714
83714
|
type;
|
|
83715
83715
|
#t;
|
|
83716
83716
|
#s;
|
|
@@ -83917,7 +83917,7 @@ var xs = new Set([
|
|
|
83917
83917
|
for (let a = 0; a < t.length; a++) {
|
|
83918
83918
|
let l = t.charAt(a);
|
|
83919
83919
|
if (i) {
|
|
83920
|
-
i = !1, r += (As
|
|
83920
|
+
i = !1, r += (As.has(l) ? "\\" : "") + l;
|
|
83921
83921
|
continue;
|
|
83922
83922
|
}
|
|
83923
83923
|
if (l === "*") {
|
|
@@ -84901,7 +84901,7 @@ var q = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n), De = (n) => q(n
|
|
|
84901
84901
|
var Ne = typeof process == "object" && process ? process : {
|
|
84902
84902
|
stdout: null,
|
|
84903
84903
|
stderr: null
|
|
84904
|
-
}, oi = (n) => !!n && typeof n == "object" && (n instanceof V || n instanceof
|
|
84904
|
+
}, oi = (n) => !!n && typeof n == "object" && (n instanceof V || n instanceof Pe || hi(n) || ai(n)), hi = (n) => !!n && typeof n == "object" && n instanceof EventEmitter && typeof n.pipe == "function" && n.pipe !== Pe.Writable.prototype.pipe, ai = (n) => !!n && typeof n == "object" && n instanceof EventEmitter && typeof n.write == "function" && typeof n.end == "function", G = Symbol("EOF"), H = Symbol("maybeEmitEnd"), K = Symbol("emittedEnd"), kt = Symbol("emittingEnd"), ut = Symbol("emittedError"), Rt = Symbol("closed"), _e = Symbol("read"), Ot = Symbol("flush"), Le = Symbol("flushChunk"), P = Symbol("encoding"), et = Symbol("decoder"), v = Symbol("flowing"), dt = Symbol("paused"), st = Symbol("resume"), C = Symbol("buffer"), F = Symbol("pipes"), T = Symbol("bufferLength"), Yt = Symbol("bufferPush"), Ft = Symbol("bufferShift"), k = Symbol("objectMode"), x = Symbol("destroyed"), Xt = Symbol("error"), Jt = Symbol("emitData"), We = Symbol("emitEnd"), Zt = Symbol("emitEnd2"), B = Symbol("async"), Qt = Symbol("abort"), Dt = Symbol("aborted"), pt = Symbol("signal"), Y = Symbol("dataListeners"), M = Symbol("discarded"), mt = (n) => Promise.resolve().then(n), li = (n) => n(), ci = (n) => n === "end" || n === "finish" || n === "prefinish", fi = (n) => n instanceof ArrayBuffer || !!n && typeof n == "object" && n.constructor && n.constructor.name === "ArrayBuffer" && n.byteLength >= 0, ui = (n) => !Buffer.isBuffer(n) && ArrayBuffer.isView(n), Mt = class {
|
|
84905
84905
|
src;
|
|
84906
84906
|
dest;
|
|
84907
84907
|
opts;
|
|
@@ -86459,7 +86459,7 @@ var Li = (n, t) => typeof n == "string" ? new ot([n], t) : Array.isArray(n) ? ne
|
|
|
86459
86459
|
return this.path.isUnknown() && this.path.lstatSync(), this.walkCBSync(this.path, this.patterns, () => this.results.end()), this.results;
|
|
86460
86460
|
}
|
|
86461
86461
|
};
|
|
86462
|
-
var Pi = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux", I
|
|
86462
|
+
var Pi = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux", I = class {
|
|
86463
86463
|
absolute;
|
|
86464
86464
|
cwd;
|
|
86465
86465
|
root;
|
|
@@ -86584,22 +86584,22 @@ var le = (n, t = {}) => {
|
|
|
86584
86584
|
return !1;
|
|
86585
86585
|
};
|
|
86586
86586
|
function Bt(n, t = {}) {
|
|
86587
|
-
return new I
|
|
86587
|
+
return new I(n, t).streamSync();
|
|
86588
86588
|
}
|
|
86589
86589
|
function Qe(n, t = {}) {
|
|
86590
|
-
return new I
|
|
86590
|
+
return new I(n, t).stream();
|
|
86591
86591
|
}
|
|
86592
86592
|
function ts(n, t = {}) {
|
|
86593
|
-
return new I
|
|
86593
|
+
return new I(n, t).walkSync();
|
|
86594
86594
|
}
|
|
86595
86595
|
async function Je(n, t = {}) {
|
|
86596
|
-
return new I
|
|
86596
|
+
return new I(n, t).walk();
|
|
86597
86597
|
}
|
|
86598
86598
|
function Ut(n, t = {}) {
|
|
86599
|
-
return new I
|
|
86599
|
+
return new I(n, t).iterateSync();
|
|
86600
86600
|
}
|
|
86601
86601
|
function es(n, t = {}) {
|
|
86602
|
-
return new I
|
|
86602
|
+
return new I(n, t).iterate();
|
|
86603
86603
|
}
|
|
86604
86604
|
var ji = Bt, Ii = Object.assign(Qe, { sync: Bt }), zi = Ut, Bi = Object.assign(es, { sync: Ut }), Ui = Object.assign(ts, {
|
|
86605
86605
|
stream: Bt,
|
|
@@ -86616,7 +86616,7 @@ var ji = Bt, Ii = Object.assign(Qe, { sync: Bt }), zi = Ut, Bi = Object.assign(e
|
|
|
86616
86616
|
iterate: Bi,
|
|
86617
86617
|
globIterateSync: Ut,
|
|
86618
86618
|
iterateSync: zi,
|
|
86619
|
-
Glob: I
|
|
86619
|
+
Glob: I,
|
|
86620
86620
|
hasMagic: le,
|
|
86621
86621
|
escape: tt,
|
|
86622
86622
|
unescape: W
|