@camstack/server 1.2.806 → 1.2.807
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 +10 -6
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.mjs +277 -277
- package/system/dist/index.js +2 -2
- package/system/dist/index.mjs +3 -3
- package/system/dist/{restore-archive-BcsSlHR8.mjs → restore-archive-D_191hoC.mjs} +77 -77
- package/system/package.json +1 -1
|
@@ -21487,8 +21487,8 @@ var require_kleur = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
21487
21487
|
var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
21488
21488
|
var kleur = require_kleur();
|
|
21489
21489
|
var os$17 = __require("os");
|
|
21490
|
-
var path$
|
|
21491
|
-
var fs$
|
|
21490
|
+
var path$39 = __require("path");
|
|
21491
|
+
var fs$19 = __require("fs");
|
|
21492
21492
|
var { TimeoutError } = require_errors$2();
|
|
21493
21493
|
var lut = [];
|
|
21494
21494
|
for (let i = 0; i < 256; i++) lut[i] = (i < 16 ? "0" : "") + i.toString(16);
|
|
@@ -21779,9 +21779,9 @@ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
21779
21779
|
* @param {String} p - directory path
|
|
21780
21780
|
*/
|
|
21781
21781
|
makeDirs(p) {
|
|
21782
|
-
p.split(path$
|
|
21783
|
-
const currentPath = path$
|
|
21784
|
-
if (!fs$
|
|
21782
|
+
p.split(path$39.sep).reduce((prevPath, folder) => {
|
|
21783
|
+
const currentPath = path$39.join(prevPath, folder, path$39.sep);
|
|
21784
|
+
if (!fs$19.existsSync(currentPath)) fs$19.mkdirSync(currentPath);
|
|
21785
21785
|
return currentPath;
|
|
21786
21786
|
}, "");
|
|
21787
21787
|
},
|
|
@@ -23006,8 +23006,8 @@ var require_csv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
23006
23006
|
var BaseReporter = require_base$8();
|
|
23007
23007
|
var { makeDirs } = require_utils$3();
|
|
23008
23008
|
var _ = require_lodash();
|
|
23009
|
-
var path$
|
|
23010
|
-
var fs$
|
|
23009
|
+
var path$38 = __require("path");
|
|
23010
|
+
var fs$18 = __require("fs");
|
|
23011
23011
|
var METRIC = require_constants$6();
|
|
23012
23012
|
var MODE_METRIC = "metric";
|
|
23013
23013
|
var MODE_LABEL = "label";
|
|
@@ -23060,7 +23060,7 @@ var require_csv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
23060
23060
|
this.timer = setInterval(() => this.flush(), this.opts.interval * 1e3);
|
|
23061
23061
|
this.timer.unref();
|
|
23062
23062
|
}
|
|
23063
|
-
this.folder = path$
|
|
23063
|
+
this.folder = path$38.resolve(this.opts.folder);
|
|
23064
23064
|
makeDirs(this.folder);
|
|
23065
23065
|
}
|
|
23066
23066
|
/**
|
|
@@ -23085,10 +23085,10 @@ var require_csv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
23085
23085
|
const metricName = this.formatMetricName(metric.name);
|
|
23086
23086
|
if (this.opts.filenameFormatter) return this.opts.filenameFormatter.call(this, metricName, metric, item);
|
|
23087
23087
|
switch (this.opts.mode) {
|
|
23088
|
-
case MODE_METRIC: return path$
|
|
23088
|
+
case MODE_METRIC: return path$38.join(this.folder, `${metricName}.csv`);
|
|
23089
23089
|
case MODE_LABEL: {
|
|
23090
23090
|
const labelStr = this.labelsToStr(item.labels);
|
|
23091
|
-
return path$
|
|
23091
|
+
return path$38.join(this.folder, metricName, `${metricName}${labelStr ? "--" + labelStr : ""}.csv`);
|
|
23092
23092
|
}
|
|
23093
23093
|
}
|
|
23094
23094
|
}
|
|
@@ -23109,7 +23109,7 @@ var require_csv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
23109
23109
|
metric.values.forEach((item) => {
|
|
23110
23110
|
if (!this.lastChanges.has([metric.name, this.labelsToStr(item.labels)].join("|"))) return;
|
|
23111
23111
|
const filename = this.getFilename(metric, item);
|
|
23112
|
-
makeDirs(path$
|
|
23112
|
+
makeDirs(path$38.dirname(filename));
|
|
23113
23113
|
const metricName = this.formatMetricName(metric.name);
|
|
23114
23114
|
let headers = ["Timestamp", "Metric"];
|
|
23115
23115
|
let data = [item.timestamp, metricName];
|
|
@@ -23166,8 +23166,8 @@ var require_csv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
23166
23166
|
*/
|
|
23167
23167
|
writeRow(filename, headers, fields) {
|
|
23168
23168
|
try {
|
|
23169
|
-
if (!fs$
|
|
23170
|
-
fs$
|
|
23169
|
+
if (!fs$18.existsSync(filename)) fs$18.writeFileSync(filename, headers.join(this.opts.delimiter) + this.opts.rowDelimiter);
|
|
23170
|
+
fs$18.appendFileSync(filename, fields.join(this.opts.delimiter) + this.opts.rowDelimiter);
|
|
23171
23171
|
} catch (err) {
|
|
23172
23172
|
/* istanbul ignore next */
|
|
23173
23173
|
this.logger.error(`Unable to write metrics values to the '${filename}' file. Error: ${err.message}`, fields, err);
|
|
@@ -26239,7 +26239,7 @@ var require_latency = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
26239
26239
|
//#region ../../node_modules/lru-cache/dist/commonjs/node/index.min.js
|
|
26240
26240
|
var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
26241
26241
|
var j = (c, t) => () => (t || c((t = { exports: {} }).exports, t), t.exports);
|
|
26242
|
-
var I$
|
|
26242
|
+
var I$2 = j((O) => {
|
|
26243
26243
|
"use strict";
|
|
26244
26244
|
Object.defineProperty(O, "__esModule", { value: !0 });
|
|
26245
26245
|
O.tracing = O.metrics = void 0;
|
|
@@ -26255,7 +26255,7 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
26255
26255
|
});
|
|
26256
26256
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
26257
26257
|
exports.LRUCache = void 0;
|
|
26258
|
-
var g = I$
|
|
26258
|
+
var g = I$2(), N = P(), C = () => g.metrics.hasSubscribers || g.tracing.hasSubscribers, k = /* @__PURE__ */ new Set(), G = typeof process == "object" && process ? process : {}, V = (c, t, e, i) => {
|
|
26259
26259
|
typeof G.emitWarning == "function" ? G.emitWarning(c, t, e, i) : console.error(`[${e}] ${t}: ${c}`);
|
|
26260
26260
|
}, q = (c) => !k.has(c);
|
|
26261
26261
|
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 {
|
|
@@ -31199,7 +31199,7 @@ var require_process$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31199
31199
|
//#endregion
|
|
31200
31200
|
//#region ../../node_modules/detect-libc/lib/filesystem.js
|
|
31201
31201
|
var require_filesystem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
31202
|
-
var fs$
|
|
31202
|
+
var fs$17 = __require("fs");
|
|
31203
31203
|
var LDD_PATH = "/usr/bin/ldd";
|
|
31204
31204
|
var SELF_PATH = "/proc/self/exe";
|
|
31205
31205
|
var MAX_LENGTH = 2048;
|
|
@@ -31210,10 +31210,10 @@ var require_filesystem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31210
31210
|
* @returns {Buffer}
|
|
31211
31211
|
*/
|
|
31212
31212
|
var readFileSync = (path) => {
|
|
31213
|
-
const fd = fs$
|
|
31213
|
+
const fd = fs$17.openSync(path, "r");
|
|
31214
31214
|
const buffer = Buffer.alloc(MAX_LENGTH);
|
|
31215
|
-
const bytesRead = fs$
|
|
31216
|
-
fs$
|
|
31215
|
+
const bytesRead = fs$17.readSync(fd, buffer, 0, MAX_LENGTH, 0);
|
|
31216
|
+
fs$17.close(fd, () => {});
|
|
31217
31217
|
return buffer.subarray(0, bytesRead);
|
|
31218
31218
|
};
|
|
31219
31219
|
/**
|
|
@@ -31223,13 +31223,13 @@ var require_filesystem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31223
31223
|
* @returns {Promise<Buffer>}
|
|
31224
31224
|
*/
|
|
31225
31225
|
var readFile = (path) => new Promise((resolve, reject) => {
|
|
31226
|
-
fs$
|
|
31226
|
+
fs$17.open(path, "r", (err, fd) => {
|
|
31227
31227
|
if (err) reject(err);
|
|
31228
31228
|
else {
|
|
31229
31229
|
const buffer = Buffer.alloc(MAX_LENGTH);
|
|
31230
|
-
fs$
|
|
31230
|
+
fs$17.read(fd, buffer, 0, MAX_LENGTH, 0, (_, bytesRead) => {
|
|
31231
31231
|
resolve(buffer.subarray(0, bytesRead));
|
|
31232
|
-
fs$
|
|
31232
|
+
fs$17.close(fd, () => {});
|
|
31233
31233
|
});
|
|
31234
31234
|
}
|
|
31235
31235
|
});
|
|
@@ -31482,8 +31482,8 @@ var require_detect_libc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31482
31482
|
//#endregion
|
|
31483
31483
|
//#region ../../node_modules/node-gyp-build-optional-packages/index.js
|
|
31484
31484
|
var require_node_gyp_build_optional_packages = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
31485
|
-
var fs$
|
|
31486
|
-
var path$
|
|
31485
|
+
var fs$16 = __require("fs");
|
|
31486
|
+
var path$37 = __require("path");
|
|
31487
31487
|
var url$2 = __require("url");
|
|
31488
31488
|
var vars = process.config && process.config.variables || {};
|
|
31489
31489
|
var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
|
|
@@ -31502,27 +31502,27 @@ var require_node_gyp_build_optional_packages = /* @__PURE__ */ __commonJSMin(((e
|
|
|
31502
31502
|
else return __require(load.path(dir));
|
|
31503
31503
|
}
|
|
31504
31504
|
load.path = function(dir) {
|
|
31505
|
-
dir = path$
|
|
31505
|
+
dir = path$37.resolve(dir || ".");
|
|
31506
31506
|
var packageName = "";
|
|
31507
31507
|
try {
|
|
31508
|
-
if (typeof __webpack_require__ === "function") packageName = __non_webpack_require__(path$
|
|
31509
|
-
else packageName = __require(path$
|
|
31508
|
+
if (typeof __webpack_require__ === "function") packageName = __non_webpack_require__(path$37.join(dir, "package.json")).name;
|
|
31509
|
+
else packageName = __require(path$37.join(dir, "package.json")).name;
|
|
31510
31510
|
var varName = packageName.toUpperCase().replace(/-/g, "_") + "_PREBUILD";
|
|
31511
31511
|
if (process.env[varName]) dir = process.env[varName];
|
|
31512
31512
|
} catch (err) {}
|
|
31513
31513
|
if (!prebuildsOnly) {
|
|
31514
|
-
var release = getFirst(path$
|
|
31514
|
+
var release = getFirst(path$37.join(dir, "build/Release"), matchBuild);
|
|
31515
31515
|
if (release) return release;
|
|
31516
|
-
var debug = getFirst(path$
|
|
31516
|
+
var debug = getFirst(path$37.join(dir, "build/Debug"), matchBuild);
|
|
31517
31517
|
if (debug) return debug;
|
|
31518
31518
|
}
|
|
31519
31519
|
var prebuild = resolve(dir);
|
|
31520
31520
|
if (prebuild) return prebuild;
|
|
31521
|
-
var nearby = resolve(path$
|
|
31521
|
+
var nearby = resolve(path$37.dirname(process.execPath));
|
|
31522
31522
|
if (nearby) return nearby;
|
|
31523
31523
|
var platformPackage = (packageName[0] == "@" ? "" : "@" + packageName + "/") + packageName + "-" + platform + "-" + arch;
|
|
31524
31524
|
try {
|
|
31525
|
-
return resolveFile(path$
|
|
31525
|
+
return resolveFile(path$37.dirname(__require("module").createRequire(url$2.pathToFileURL(path$37.join(dir, "package.json"))).resolve(platformPackage)));
|
|
31526
31526
|
} catch (error) {}
|
|
31527
31527
|
var target = [
|
|
31528
31528
|
"platform=" + platform,
|
|
@@ -31538,25 +31538,25 @@ var require_node_gyp_build_optional_packages = /* @__PURE__ */ __commonJSMin(((e
|
|
|
31538
31538
|
].filter(Boolean).join(" ");
|
|
31539
31539
|
throw new Error("No native build was found for " + target + "\n attempted loading from: " + dir + " and package: " + platformPackage + "\n");
|
|
31540
31540
|
function resolve(dir) {
|
|
31541
|
-
var tuple = readdirSync(path$
|
|
31541
|
+
var tuple = readdirSync(path$37.join(dir, "prebuilds")).map(parseTuple).filter(matchTuple(platform, arch)).sort(compareTuples)[0];
|
|
31542
31542
|
if (!tuple) return;
|
|
31543
|
-
return resolveFile(path$
|
|
31543
|
+
return resolveFile(path$37.join(dir, "prebuilds", tuple.name));
|
|
31544
31544
|
}
|
|
31545
31545
|
function resolveFile(prebuilds) {
|
|
31546
31546
|
var winner = readdirSync(prebuilds).map(parseTags).filter(matchTags(runtime, abi)).sort(compareTags(runtime))[0];
|
|
31547
|
-
if (winner) return path$
|
|
31547
|
+
if (winner) return path$37.join(prebuilds, winner.file);
|
|
31548
31548
|
}
|
|
31549
31549
|
};
|
|
31550
31550
|
function readdirSync(dir) {
|
|
31551
31551
|
try {
|
|
31552
|
-
return fs$
|
|
31552
|
+
return fs$16.readdirSync(dir);
|
|
31553
31553
|
} catch (err) {
|
|
31554
31554
|
return [];
|
|
31555
31555
|
}
|
|
31556
31556
|
}
|
|
31557
31557
|
function getFirst(dir, filter) {
|
|
31558
31558
|
var files = readdirSync(dir).filter(filter);
|
|
31559
|
-
return files[0] && path$
|
|
31559
|
+
return files[0] && path$37.join(dir, files[0]);
|
|
31560
31560
|
}
|
|
31561
31561
|
function matchBuild(name) {
|
|
31562
31562
|
return /\.node$/.test(name);
|
|
@@ -37028,8 +37028,8 @@ var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37028
37028
|
var require_file$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
37029
37029
|
var FormattedLogger = require_formatted();
|
|
37030
37030
|
var _ = require_lodash();
|
|
37031
|
-
var fs$
|
|
37032
|
-
var path$
|
|
37031
|
+
var fs$15 = __require("fs/promises");
|
|
37032
|
+
var path$36 = __require("path");
|
|
37033
37033
|
var os$11 = __require("os");
|
|
37034
37034
|
var { makeDirs } = require_utils$3();
|
|
37035
37035
|
/**
|
|
@@ -37075,7 +37075,7 @@ var require_file$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37075
37075
|
*/
|
|
37076
37076
|
init(loggerFactory) {
|
|
37077
37077
|
super.init(loggerFactory);
|
|
37078
|
-
this.logFolder = path$
|
|
37078
|
+
this.logFolder = path$36.resolve(this.render(this.opts.folder, {
|
|
37079
37079
|
nodeID: this.broker.nodeID,
|
|
37080
37080
|
namespace: this.broker.namespace
|
|
37081
37081
|
}));
|
|
@@ -37100,7 +37100,7 @@ var require_file$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37100
37100
|
*/
|
|
37101
37101
|
getFilename() {
|
|
37102
37102
|
const date = (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
|
|
37103
|
-
return path$
|
|
37103
|
+
return path$36.join(this.logFolder, this.render(this.opts.filename, {
|
|
37104
37104
|
date,
|
|
37105
37105
|
nodeID: this.broker.nodeID,
|
|
37106
37106
|
namespace: this.broker.namespace
|
|
@@ -37132,7 +37132,7 @@ var require_file$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37132
37132
|
const rows = Array.from(this.queue);
|
|
37133
37133
|
this.queue.length = 0;
|
|
37134
37134
|
const buf = rows.join(this.opts.eol) + this.opts.eol;
|
|
37135
|
-
return fs$
|
|
37135
|
+
return fs$15.appendFile(filename, buf).catch((err) => {
|
|
37136
37136
|
/* istanbul ignore next */
|
|
37137
37137
|
console.debug("Unable to write log file:", filename, err);
|
|
37138
37138
|
});
|
|
@@ -37481,7 +37481,7 @@ var require_layouts = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37481
37481
|
var dateFormat = require_lib$5();
|
|
37482
37482
|
var os$10 = __require("os");
|
|
37483
37483
|
var util$3 = __require("util");
|
|
37484
|
-
var path$
|
|
37484
|
+
var path$35 = __require("path");
|
|
37485
37485
|
var styles = {
|
|
37486
37486
|
bold: [1, 22],
|
|
37487
37487
|
italic: [3, 23],
|
|
@@ -37647,8 +37647,8 @@ var require_layouts = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37647
37647
|
let filename = loggingEvent.fileName || "";
|
|
37648
37648
|
if (specifier) {
|
|
37649
37649
|
const fileDepth = parseInt(specifier, 10);
|
|
37650
|
-
const fileList = filename.split(path$
|
|
37651
|
-
if (fileList.length > fileDepth) filename = fileList.slice(-fileDepth).join(path$
|
|
37650
|
+
const fileList = filename.split(path$35.sep);
|
|
37651
|
+
if (fileList.length > fileDepth) filename = fileList.slice(-fileDepth).join(path$35.sep);
|
|
37652
37652
|
}
|
|
37653
37653
|
return filename;
|
|
37654
37654
|
}
|
|
@@ -38650,7 +38650,7 @@ var require_clone = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38650
38650
|
//#endregion
|
|
38651
38651
|
//#region ../../node_modules/graceful-fs/graceful-fs.js
|
|
38652
38652
|
var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
38653
|
-
var fs$
|
|
38653
|
+
var fs$14 = __require("fs");
|
|
38654
38654
|
var polyfills = require_polyfills();
|
|
38655
38655
|
var legacy = require_legacy_streams();
|
|
38656
38656
|
var clone = require_clone();
|
|
@@ -38679,36 +38679,36 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38679
38679
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
38680
38680
|
console.error(m);
|
|
38681
38681
|
};
|
|
38682
|
-
if (!fs$
|
|
38683
|
-
publishQueue(fs$
|
|
38684
|
-
fs$
|
|
38682
|
+
if (!fs$14[gracefulQueue]) {
|
|
38683
|
+
publishQueue(fs$14, global[gracefulQueue] || []);
|
|
38684
|
+
fs$14.close = (function(fs$close) {
|
|
38685
38685
|
function close(fd, cb) {
|
|
38686
|
-
return fs$close.call(fs$
|
|
38686
|
+
return fs$close.call(fs$14, fd, function(err) {
|
|
38687
38687
|
if (!err) resetQueue();
|
|
38688
38688
|
if (typeof cb === "function") cb.apply(this, arguments);
|
|
38689
38689
|
});
|
|
38690
38690
|
}
|
|
38691
38691
|
Object.defineProperty(close, previousSymbol, { value: fs$close });
|
|
38692
38692
|
return close;
|
|
38693
|
-
})(fs$
|
|
38694
|
-
fs$
|
|
38693
|
+
})(fs$14.close);
|
|
38694
|
+
fs$14.closeSync = (function(fs$closeSync) {
|
|
38695
38695
|
function closeSync(fd) {
|
|
38696
|
-
fs$closeSync.apply(fs$
|
|
38696
|
+
fs$closeSync.apply(fs$14, arguments);
|
|
38697
38697
|
resetQueue();
|
|
38698
38698
|
}
|
|
38699
38699
|
Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync });
|
|
38700
38700
|
return closeSync;
|
|
38701
|
-
})(fs$
|
|
38701
|
+
})(fs$14.closeSync);
|
|
38702
38702
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) process.on("exit", function() {
|
|
38703
|
-
debug(fs$
|
|
38704
|
-
__require("assert").equal(fs$
|
|
38703
|
+
debug(fs$14[gracefulQueue]);
|
|
38704
|
+
__require("assert").equal(fs$14[gracefulQueue].length, 0);
|
|
38705
38705
|
});
|
|
38706
38706
|
}
|
|
38707
|
-
if (!global[gracefulQueue]) publishQueue(global, fs$
|
|
38708
|
-
module.exports = patch(clone(fs$
|
|
38709
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$
|
|
38710
|
-
module.exports = patch(fs$
|
|
38711
|
-
fs$
|
|
38707
|
+
if (!global[gracefulQueue]) publishQueue(global, fs$14[gracefulQueue]);
|
|
38708
|
+
module.exports = patch(clone(fs$14));
|
|
38709
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$14.__patched) {
|
|
38710
|
+
module.exports = patch(fs$14);
|
|
38711
|
+
fs$14.__patched = true;
|
|
38712
38712
|
}
|
|
38713
38713
|
function patch(fs) {
|
|
38714
38714
|
polyfills(fs);
|
|
@@ -38963,23 +38963,23 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38963
38963
|
}
|
|
38964
38964
|
function enqueue(elem) {
|
|
38965
38965
|
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
38966
|
-
fs$
|
|
38966
|
+
fs$14[gracefulQueue].push(elem);
|
|
38967
38967
|
retry();
|
|
38968
38968
|
}
|
|
38969
38969
|
var retryTimer;
|
|
38970
38970
|
function resetQueue() {
|
|
38971
38971
|
var now = Date.now();
|
|
38972
|
-
for (var i = 0; i < fs$
|
|
38973
|
-
fs$
|
|
38974
|
-
fs$
|
|
38972
|
+
for (var i = 0; i < fs$14[gracefulQueue].length; ++i) if (fs$14[gracefulQueue][i].length > 2) {
|
|
38973
|
+
fs$14[gracefulQueue][i][3] = now;
|
|
38974
|
+
fs$14[gracefulQueue][i][4] = now;
|
|
38975
38975
|
}
|
|
38976
38976
|
retry();
|
|
38977
38977
|
}
|
|
38978
38978
|
function retry() {
|
|
38979
38979
|
clearTimeout(retryTimer);
|
|
38980
38980
|
retryTimer = void 0;
|
|
38981
|
-
if (fs$
|
|
38982
|
-
var elem = fs$
|
|
38981
|
+
if (fs$14[gracefulQueue].length === 0) return;
|
|
38982
|
+
var elem = fs$14[gracefulQueue].shift();
|
|
38983
38983
|
var fn = elem[0];
|
|
38984
38984
|
var args = elem[1];
|
|
38985
38985
|
var err = elem[2];
|
|
@@ -38998,7 +38998,7 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38998
38998
|
if (sinceAttempt >= Math.min(sinceStart * 1.2, 100)) {
|
|
38999
38999
|
debug("RETRY", fn.name, args);
|
|
39000
39000
|
fn.apply(null, args.concat([startTime]));
|
|
39001
|
-
} else fs$
|
|
39001
|
+
} else fs$14[gracefulQueue].push(elem);
|
|
39002
39002
|
}
|
|
39003
39003
|
if (retryTimer === void 0) retryTimer = setTimeout(retry, 0);
|
|
39004
39004
|
}
|
|
@@ -39086,9 +39086,9 @@ var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
39086
39086
|
//#endregion
|
|
39087
39087
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/mkdirs/win32.js
|
|
39088
39088
|
var require_win32 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39089
|
-
var path$
|
|
39089
|
+
var path$34 = __require("path");
|
|
39090
39090
|
function getRootPath(p) {
|
|
39091
|
-
p = path$
|
|
39091
|
+
p = path$34.normalize(path$34.resolve(p)).split(path$34.sep);
|
|
39092
39092
|
if (p.length > 0) return p[0];
|
|
39093
39093
|
return null;
|
|
39094
39094
|
}
|
|
@@ -39107,7 +39107,7 @@ var require_win32 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39107
39107
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/mkdirs/mkdirs.js
|
|
39108
39108
|
var require_mkdirs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39109
39109
|
var fs = require_graceful_fs();
|
|
39110
|
-
var path$
|
|
39110
|
+
var path$33 = __require("path");
|
|
39111
39111
|
var invalidWin32Path = require_win32().invalidWin32Path;
|
|
39112
39112
|
var o777 = parseInt("0777", 8);
|
|
39113
39113
|
function mkdirs(p, opts, callback, made) {
|
|
@@ -39125,7 +39125,7 @@ var require_mkdirs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39125
39125
|
if (mode === void 0) mode = o777 & ~process.umask();
|
|
39126
39126
|
if (!made) made = null;
|
|
39127
39127
|
callback = callback || function() {};
|
|
39128
|
-
p = path$
|
|
39128
|
+
p = path$33.resolve(p);
|
|
39129
39129
|
xfs.mkdir(p, mode, (er) => {
|
|
39130
39130
|
if (!er) {
|
|
39131
39131
|
made = made || p;
|
|
@@ -39133,8 +39133,8 @@ var require_mkdirs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39133
39133
|
}
|
|
39134
39134
|
switch (er.code) {
|
|
39135
39135
|
case "ENOENT":
|
|
39136
|
-
if (path$
|
|
39137
|
-
mkdirs(path$
|
|
39136
|
+
if (path$33.dirname(p) === p) return callback(er);
|
|
39137
|
+
mkdirs(path$33.dirname(p), opts, (er, made) => {
|
|
39138
39138
|
if (er) callback(er, made);
|
|
39139
39139
|
else mkdirs(p, opts, callback, made);
|
|
39140
39140
|
});
|
|
@@ -39154,7 +39154,7 @@ var require_mkdirs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39154
39154
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js
|
|
39155
39155
|
var require_mkdirs_sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39156
39156
|
var fs = require_graceful_fs();
|
|
39157
|
-
var path$
|
|
39157
|
+
var path$32 = __require("path");
|
|
39158
39158
|
var invalidWin32Path = require_win32().invalidWin32Path;
|
|
39159
39159
|
var o777 = parseInt("0777", 8);
|
|
39160
39160
|
function mkdirsSync(p, opts, made) {
|
|
@@ -39168,14 +39168,14 @@ var require_mkdirs_sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39168
39168
|
}
|
|
39169
39169
|
if (mode === void 0) mode = o777 & ~process.umask();
|
|
39170
39170
|
if (!made) made = null;
|
|
39171
|
-
p = path$
|
|
39171
|
+
p = path$32.resolve(p);
|
|
39172
39172
|
try {
|
|
39173
39173
|
xfs.mkdirSync(p, mode);
|
|
39174
39174
|
made = made || p;
|
|
39175
39175
|
} catch (err0) {
|
|
39176
39176
|
if (err0.code === "ENOENT") {
|
|
39177
|
-
if (path$
|
|
39178
|
-
made = mkdirsSync(path$
|
|
39177
|
+
if (path$32.dirname(p) === p) throw err0;
|
|
39178
|
+
made = mkdirsSync(path$32.dirname(p), opts, made);
|
|
39179
39179
|
mkdirsSync(p, opts, made);
|
|
39180
39180
|
} else {
|
|
39181
39181
|
let stat;
|
|
@@ -39211,10 +39211,10 @@ var require_mkdirs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39211
39211
|
var require_utimes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39212
39212
|
var fs = require_graceful_fs();
|
|
39213
39213
|
var os$9 = __require("os");
|
|
39214
|
-
var path$
|
|
39214
|
+
var path$31 = __require("path");
|
|
39215
39215
|
function hasMillisResSync() {
|
|
39216
|
-
let tmpfile = path$
|
|
39217
|
-
tmpfile = path$
|
|
39216
|
+
let tmpfile = path$31.join("millis-test-sync" + Date.now().toString() + Math.random().toString().slice(2));
|
|
39217
|
+
tmpfile = path$31.join(os$9.tmpdir(), tmpfile);
|
|
39218
39218
|
const d = /* @__PURE__ */ new Date(1435410243862);
|
|
39219
39219
|
fs.writeFileSync(tmpfile, "https://github.com/jprichardson/node-fs-extra/pull/141");
|
|
39220
39220
|
const fd = fs.openSync(tmpfile, "r+");
|
|
@@ -39223,8 +39223,8 @@ var require_utimes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39223
39223
|
return fs.statSync(tmpfile).mtime > 1435410243e3;
|
|
39224
39224
|
}
|
|
39225
39225
|
function hasMillisRes(callback) {
|
|
39226
|
-
let tmpfile = path$
|
|
39227
|
-
tmpfile = path$
|
|
39226
|
+
let tmpfile = path$31.join("millis-test" + Date.now().toString() + Math.random().toString().slice(2));
|
|
39227
|
+
tmpfile = path$31.join(os$9.tmpdir(), tmpfile);
|
|
39228
39228
|
const d = /* @__PURE__ */ new Date(1435410243862);
|
|
39229
39229
|
fs.writeFile(tmpfile, "https://github.com/jprichardson/node-fs-extra/pull/141", (err) => {
|
|
39230
39230
|
if (err) return callback(err);
|
|
@@ -39275,7 +39275,7 @@ var require_utimes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39275
39275
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/util/stat.js
|
|
39276
39276
|
var require_stat = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39277
39277
|
var fs = require_graceful_fs();
|
|
39278
|
-
var path$
|
|
39278
|
+
var path$30 = __require("path");
|
|
39279
39279
|
var NODE_VERSION_MAJOR_WITH_BIGINT = 10;
|
|
39280
39280
|
var NODE_VERSION_MINOR_WITH_BIGINT = 5;
|
|
39281
39281
|
var NODE_VERSION_PATCH_WITH_BIGINT = 0;
|
|
@@ -39368,9 +39368,9 @@ var require_stat = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39368
39368
|
};
|
|
39369
39369
|
}
|
|
39370
39370
|
function checkParentPaths(src, srcStat, dest, funcName, cb) {
|
|
39371
|
-
const srcParent = path$
|
|
39372
|
-
const destParent = path$
|
|
39373
|
-
if (destParent === srcParent || destParent === path$
|
|
39371
|
+
const srcParent = path$30.resolve(path$30.dirname(src));
|
|
39372
|
+
const destParent = path$30.resolve(path$30.dirname(dest));
|
|
39373
|
+
if (destParent === srcParent || destParent === path$30.parse(destParent).root) return cb();
|
|
39374
39374
|
if (nodeSupportsBigInt()) fs.stat(destParent, { bigint: true }, (err, destStat) => {
|
|
39375
39375
|
if (err) {
|
|
39376
39376
|
if (err.code === "ENOENT") return cb();
|
|
@@ -39389,9 +39389,9 @@ var require_stat = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39389
39389
|
});
|
|
39390
39390
|
}
|
|
39391
39391
|
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
39392
|
-
const srcParent = path$
|
|
39393
|
-
const destParent = path$
|
|
39394
|
-
if (destParent === srcParent || destParent === path$
|
|
39392
|
+
const srcParent = path$30.resolve(path$30.dirname(src));
|
|
39393
|
+
const destParent = path$30.resolve(path$30.dirname(dest));
|
|
39394
|
+
if (destParent === srcParent || destParent === path$30.parse(destParent).root) return;
|
|
39395
39395
|
let destStat;
|
|
39396
39396
|
try {
|
|
39397
39397
|
if (nodeSupportsBigInt()) destStat = fs.statSync(destParent, { bigint: true });
|
|
@@ -39404,8 +39404,8 @@ var require_stat = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39404
39404
|
return checkParentPathsSync(src, srcStat, destParent, funcName);
|
|
39405
39405
|
}
|
|
39406
39406
|
function isSrcSubdir(src, dest) {
|
|
39407
|
-
const srcArr = path$
|
|
39408
|
-
const destArr = path$
|
|
39407
|
+
const srcArr = path$30.resolve(src).split(path$30.sep).filter((i) => i);
|
|
39408
|
+
const destArr = path$30.resolve(dest).split(path$30.sep).filter((i) => i);
|
|
39409
39409
|
return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true);
|
|
39410
39410
|
}
|
|
39411
39411
|
function errMsg(src, dest, funcName) {
|
|
@@ -39435,7 +39435,7 @@ var require_buffer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39435
39435
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/copy-sync/copy-sync.js
|
|
39436
39436
|
var require_copy_sync$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39437
39437
|
var fs = require_graceful_fs();
|
|
39438
|
-
var path$
|
|
39438
|
+
var path$29 = __require("path");
|
|
39439
39439
|
var mkdirpSync = require_mkdirs().mkdirsSync;
|
|
39440
39440
|
var utimesSync = require_utimes().utimesMillisSync;
|
|
39441
39441
|
var stat = require_stat();
|
|
@@ -39452,7 +39452,7 @@ var require_copy_sync$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39452
39452
|
}
|
|
39453
39453
|
function handleFilterAndCopy(destStat, src, dest, opts) {
|
|
39454
39454
|
if (opts.filter && !opts.filter(src, dest)) return;
|
|
39455
|
-
const destParent = path$
|
|
39455
|
+
const destParent = path$29.dirname(dest);
|
|
39456
39456
|
if (!fs.existsSync(destParent)) mkdirpSync(destParent);
|
|
39457
39457
|
return startCopy(destStat, src, dest, opts);
|
|
39458
39458
|
}
|
|
@@ -39514,14 +39514,14 @@ var require_copy_sync$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39514
39514
|
fs.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
|
|
39515
39515
|
}
|
|
39516
39516
|
function copyDirItem(item, src, dest, opts) {
|
|
39517
|
-
const srcItem = path$
|
|
39518
|
-
const destItem = path$
|
|
39517
|
+
const srcItem = path$29.join(src, item);
|
|
39518
|
+
const destItem = path$29.join(dest, item);
|
|
39519
39519
|
const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy");
|
|
39520
39520
|
return startCopy(destStat, srcItem, destItem, opts);
|
|
39521
39521
|
}
|
|
39522
39522
|
function onLink(destStat, src, dest, opts) {
|
|
39523
39523
|
let resolvedSrc = fs.readlinkSync(src);
|
|
39524
|
-
if (opts.dereference) resolvedSrc = path$
|
|
39524
|
+
if (opts.dereference) resolvedSrc = path$29.resolve(process.cwd(), resolvedSrc);
|
|
39525
39525
|
if (!destStat) return fs.symlinkSync(resolvedSrc, dest);
|
|
39526
39526
|
else {
|
|
39527
39527
|
let resolvedDest;
|
|
@@ -39531,7 +39531,7 @@ var require_copy_sync$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39531
39531
|
if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs.symlinkSync(resolvedSrc, dest);
|
|
39532
39532
|
throw err;
|
|
39533
39533
|
}
|
|
39534
|
-
if (opts.dereference) resolvedDest = path$
|
|
39534
|
+
if (opts.dereference) resolvedDest = path$29.resolve(process.cwd(), resolvedDest);
|
|
39535
39535
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
39536
39536
|
if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
|
|
39537
39537
|
return copyLink(resolvedSrc, dest);
|
|
@@ -39565,7 +39565,7 @@ var require_path_exists = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39565
39565
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/copy/copy.js
|
|
39566
39566
|
var require_copy$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39567
39567
|
var fs = require_graceful_fs();
|
|
39568
|
-
var path$
|
|
39568
|
+
var path$28 = __require("path");
|
|
39569
39569
|
var mkdirp = require_mkdirs().mkdirs;
|
|
39570
39570
|
var pathExists = require_path_exists().pathExists;
|
|
39571
39571
|
var utimes = require_utimes().utimesMillis;
|
|
@@ -39592,7 +39592,7 @@ var require_copy$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39592
39592
|
});
|
|
39593
39593
|
}
|
|
39594
39594
|
function checkParentDir(destStat, src, dest, opts, cb) {
|
|
39595
|
-
const destParent = path$
|
|
39595
|
+
const destParent = path$28.dirname(dest);
|
|
39596
39596
|
pathExists(destParent, (err, dirExists) => {
|
|
39597
39597
|
if (err) return cb(err);
|
|
39598
39598
|
if (dirExists) return startCopy(destStat, src, dest, opts, cb);
|
|
@@ -39679,8 +39679,8 @@ var require_copy$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39679
39679
|
return copyDirItem(items, item, src, dest, opts, cb);
|
|
39680
39680
|
}
|
|
39681
39681
|
function copyDirItem(items, item, src, dest, opts, cb) {
|
|
39682
|
-
const srcItem = path$
|
|
39683
|
-
const destItem = path$
|
|
39682
|
+
const srcItem = path$28.join(src, item);
|
|
39683
|
+
const destItem = path$28.join(dest, item);
|
|
39684
39684
|
stat.checkPaths(srcItem, destItem, "copy", (err, stats) => {
|
|
39685
39685
|
if (err) return cb(err);
|
|
39686
39686
|
const { destStat } = stats;
|
|
@@ -39693,14 +39693,14 @@ var require_copy$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39693
39693
|
function onLink(destStat, src, dest, opts, cb) {
|
|
39694
39694
|
fs.readlink(src, (err, resolvedSrc) => {
|
|
39695
39695
|
if (err) return cb(err);
|
|
39696
|
-
if (opts.dereference) resolvedSrc = path$
|
|
39696
|
+
if (opts.dereference) resolvedSrc = path$28.resolve(process.cwd(), resolvedSrc);
|
|
39697
39697
|
if (!destStat) return fs.symlink(resolvedSrc, dest, cb);
|
|
39698
39698
|
else fs.readlink(dest, (err, resolvedDest) => {
|
|
39699
39699
|
if (err) {
|
|
39700
39700
|
if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs.symlink(resolvedSrc, dest, cb);
|
|
39701
39701
|
return cb(err);
|
|
39702
39702
|
}
|
|
39703
|
-
if (opts.dereference) resolvedDest = path$
|
|
39703
|
+
if (opts.dereference) resolvedDest = path$28.resolve(process.cwd(), resolvedDest);
|
|
39704
39704
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) return cb(/* @__PURE__ */ new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`));
|
|
39705
39705
|
if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) return cb(/* @__PURE__ */ new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`));
|
|
39706
39706
|
return copyLink(resolvedSrc, dest, cb);
|
|
@@ -39725,7 +39725,7 @@ var require_copy = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39725
39725
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/remove/rimraf.js
|
|
39726
39726
|
var require_rimraf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39727
39727
|
var fs = require_graceful_fs();
|
|
39728
|
-
var path$
|
|
39728
|
+
var path$27 = __require("path");
|
|
39729
39729
|
var assert$2 = __require("assert");
|
|
39730
39730
|
var isWindows = process.platform === "win32";
|
|
39731
39731
|
function defaults(options) {
|
|
@@ -39840,7 +39840,7 @@ var require_rimraf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39840
39840
|
let errState;
|
|
39841
39841
|
if (n === 0) return options.rmdir(p, cb);
|
|
39842
39842
|
files.forEach((f) => {
|
|
39843
|
-
rimraf(path$
|
|
39843
|
+
rimraf(path$27.join(p, f), options, (er) => {
|
|
39844
39844
|
if (errState) return;
|
|
39845
39845
|
if (er) return cb(errState = er);
|
|
39846
39846
|
if (--n === 0) options.rmdir(p, cb);
|
|
@@ -39887,7 +39887,7 @@ var require_rimraf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39887
39887
|
function rmkidsSync(p, options) {
|
|
39888
39888
|
assert$2(p);
|
|
39889
39889
|
assert$2(options);
|
|
39890
|
-
options.readdirSync(p).forEach((f) => rimrafSync(path$
|
|
39890
|
+
options.readdirSync(p).forEach((f) => rimrafSync(path$27.join(p, f), options));
|
|
39891
39891
|
if (isWindows) {
|
|
39892
39892
|
const startTime = Date.now();
|
|
39893
39893
|
do
|
|
@@ -39915,14 +39915,14 @@ var require_remove = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39915
39915
|
var require_empty = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39916
39916
|
var u = require_universalify().fromCallback;
|
|
39917
39917
|
var fs = require_graceful_fs();
|
|
39918
|
-
var path$
|
|
39918
|
+
var path$26 = __require("path");
|
|
39919
39919
|
var mkdir = require_mkdirs();
|
|
39920
39920
|
var remove = require_remove();
|
|
39921
39921
|
var emptyDir = u(function emptyDir(dir, callback) {
|
|
39922
39922
|
callback = callback || function() {};
|
|
39923
39923
|
fs.readdir(dir, (err, items) => {
|
|
39924
39924
|
if (err) return mkdir.mkdirs(dir, callback);
|
|
39925
|
-
items = items.map((item) => path$
|
|
39925
|
+
items = items.map((item) => path$26.join(dir, item));
|
|
39926
39926
|
deleteItem();
|
|
39927
39927
|
function deleteItem() {
|
|
39928
39928
|
const item = items.pop();
|
|
@@ -39942,7 +39942,7 @@ var require_empty = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39942
39942
|
return mkdir.mkdirsSync(dir);
|
|
39943
39943
|
}
|
|
39944
39944
|
items.forEach((item) => {
|
|
39945
|
-
item = path$
|
|
39945
|
+
item = path$26.join(dir, item);
|
|
39946
39946
|
remove.removeSync(item);
|
|
39947
39947
|
});
|
|
39948
39948
|
}
|
|
@@ -39957,7 +39957,7 @@ var require_empty = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39957
39957
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/ensure/file.js
|
|
39958
39958
|
var require_file$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
39959
39959
|
var u = require_universalify().fromCallback;
|
|
39960
|
-
var path$
|
|
39960
|
+
var path$25 = __require("path");
|
|
39961
39961
|
var fs = require_graceful_fs();
|
|
39962
39962
|
var mkdir = require_mkdirs();
|
|
39963
39963
|
var pathExists = require_path_exists().pathExists;
|
|
@@ -39970,7 +39970,7 @@ var require_file$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39970
39970
|
}
|
|
39971
39971
|
fs.stat(file, (err, stats) => {
|
|
39972
39972
|
if (!err && stats.isFile()) return callback();
|
|
39973
|
-
const dir = path$
|
|
39973
|
+
const dir = path$25.dirname(file);
|
|
39974
39974
|
pathExists(dir, (err, dirExists) => {
|
|
39975
39975
|
if (err) return callback(err);
|
|
39976
39976
|
if (dirExists) return makeFile();
|
|
@@ -39987,7 +39987,7 @@ var require_file$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39987
39987
|
stats = fs.statSync(file);
|
|
39988
39988
|
} catch (e) {}
|
|
39989
39989
|
if (stats && stats.isFile()) return;
|
|
39990
|
-
const dir = path$
|
|
39990
|
+
const dir = path$25.dirname(file);
|
|
39991
39991
|
if (!fs.existsSync(dir)) mkdir.mkdirsSync(dir);
|
|
39992
39992
|
fs.writeFileSync(file, "");
|
|
39993
39993
|
}
|
|
@@ -40000,7 +40000,7 @@ var require_file$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40000
40000
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/ensure/link.js
|
|
40001
40001
|
var require_link = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40002
40002
|
var u = require_universalify().fromCallback;
|
|
40003
|
-
var path$
|
|
40003
|
+
var path$24 = __require("path");
|
|
40004
40004
|
var fs = require_graceful_fs();
|
|
40005
40005
|
var mkdir = require_mkdirs();
|
|
40006
40006
|
var pathExists = require_path_exists().pathExists;
|
|
@@ -40019,7 +40019,7 @@ var require_link = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40019
40019
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
40020
40020
|
return callback(err);
|
|
40021
40021
|
}
|
|
40022
|
-
const dir = path$
|
|
40022
|
+
const dir = path$24.dirname(dstpath);
|
|
40023
40023
|
pathExists(dir, (err, dirExists) => {
|
|
40024
40024
|
if (err) return callback(err);
|
|
40025
40025
|
if (dirExists) return makeLink(srcpath, dstpath);
|
|
@@ -40039,7 +40039,7 @@ var require_link = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40039
40039
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
40040
40040
|
throw err;
|
|
40041
40041
|
}
|
|
40042
|
-
const dir = path$
|
|
40042
|
+
const dir = path$24.dirname(dstpath);
|
|
40043
40043
|
if (fs.existsSync(dir)) return fs.linkSync(srcpath, dstpath);
|
|
40044
40044
|
mkdir.mkdirsSync(dir);
|
|
40045
40045
|
return fs.linkSync(srcpath, dstpath);
|
|
@@ -40052,7 +40052,7 @@ var require_link = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40052
40052
|
//#endregion
|
|
40053
40053
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/ensure/symlink-paths.js
|
|
40054
40054
|
var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40055
|
-
var path$
|
|
40055
|
+
var path$23 = __require("path");
|
|
40056
40056
|
var fs = require_graceful_fs();
|
|
40057
40057
|
var pathExists = require_path_exists().pathExists;
|
|
40058
40058
|
/**
|
|
@@ -40077,7 +40077,7 @@ var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
40077
40077
|
* the ability to pass in `relative to current working direcotry` paths.
|
|
40078
40078
|
*/
|
|
40079
40079
|
function symlinkPaths(srcpath, dstpath, callback) {
|
|
40080
|
-
if (path$
|
|
40080
|
+
if (path$23.isAbsolute(srcpath)) return fs.lstat(srcpath, (err) => {
|
|
40081
40081
|
if (err) {
|
|
40082
40082
|
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
40083
40083
|
return callback(err);
|
|
@@ -40088,8 +40088,8 @@ var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
40088
40088
|
});
|
|
40089
40089
|
});
|
|
40090
40090
|
else {
|
|
40091
|
-
const dstdir = path$
|
|
40092
|
-
const relativeToDst = path$
|
|
40091
|
+
const dstdir = path$23.dirname(dstpath);
|
|
40092
|
+
const relativeToDst = path$23.join(dstdir, srcpath);
|
|
40093
40093
|
return pathExists(relativeToDst, (err, exists) => {
|
|
40094
40094
|
if (err) return callback(err);
|
|
40095
40095
|
if (exists) return callback(null, {
|
|
@@ -40103,7 +40103,7 @@ var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
40103
40103
|
}
|
|
40104
40104
|
return callback(null, {
|
|
40105
40105
|
"toCwd": srcpath,
|
|
40106
|
-
"toDst": path$
|
|
40106
|
+
"toDst": path$23.relative(dstdir, srcpath)
|
|
40107
40107
|
});
|
|
40108
40108
|
});
|
|
40109
40109
|
});
|
|
@@ -40111,7 +40111,7 @@ var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
40111
40111
|
}
|
|
40112
40112
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
40113
40113
|
let exists;
|
|
40114
|
-
if (path$
|
|
40114
|
+
if (path$23.isAbsolute(srcpath)) {
|
|
40115
40115
|
exists = fs.existsSync(srcpath);
|
|
40116
40116
|
if (!exists) throw new Error("absolute srcpath does not exist");
|
|
40117
40117
|
return {
|
|
@@ -40119,8 +40119,8 @@ var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
40119
40119
|
"toDst": srcpath
|
|
40120
40120
|
};
|
|
40121
40121
|
} else {
|
|
40122
|
-
const dstdir = path$
|
|
40123
|
-
const relativeToDst = path$
|
|
40122
|
+
const dstdir = path$23.dirname(dstpath);
|
|
40123
|
+
const relativeToDst = path$23.join(dstdir, srcpath);
|
|
40124
40124
|
exists = fs.existsSync(relativeToDst);
|
|
40125
40125
|
if (exists) return {
|
|
40126
40126
|
"toCwd": relativeToDst,
|
|
@@ -40131,7 +40131,7 @@ var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
40131
40131
|
if (!exists) throw new Error("relative srcpath does not exist");
|
|
40132
40132
|
return {
|
|
40133
40133
|
"toCwd": srcpath,
|
|
40134
|
-
"toDst": path$
|
|
40134
|
+
"toDst": path$23.relative(dstdir, srcpath)
|
|
40135
40135
|
};
|
|
40136
40136
|
}
|
|
40137
40137
|
}
|
|
@@ -40174,7 +40174,7 @@ var require_symlink_type = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40174
40174
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/ensure/symlink.js
|
|
40175
40175
|
var require_symlink = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40176
40176
|
var u = require_universalify().fromCallback;
|
|
40177
|
-
var path$
|
|
40177
|
+
var path$22 = __require("path");
|
|
40178
40178
|
var fs = require_graceful_fs();
|
|
40179
40179
|
var _mkdirs = require_mkdirs();
|
|
40180
40180
|
var mkdirs = _mkdirs.mkdirs;
|
|
@@ -40197,7 +40197,7 @@ var require_symlink = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40197
40197
|
srcpath = relative.toDst;
|
|
40198
40198
|
symlinkType(relative.toCwd, type, (err, type) => {
|
|
40199
40199
|
if (err) return callback(err);
|
|
40200
|
-
const dir = path$
|
|
40200
|
+
const dir = path$22.dirname(dstpath);
|
|
40201
40201
|
pathExists(dir, (err, dirExists) => {
|
|
40202
40202
|
if (err) return callback(err);
|
|
40203
40203
|
if (dirExists) return fs.symlink(srcpath, dstpath, type, callback);
|
|
@@ -40215,7 +40215,7 @@ var require_symlink = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40215
40215
|
const relative = symlinkPathsSync(srcpath, dstpath);
|
|
40216
40216
|
srcpath = relative.toDst;
|
|
40217
40217
|
type = symlinkTypeSync(relative.toCwd, type);
|
|
40218
|
-
const dir = path$
|
|
40218
|
+
const dir = path$22.dirname(dstpath);
|
|
40219
40219
|
if (fs.existsSync(dir)) return fs.symlinkSync(srcpath, dstpath, type);
|
|
40220
40220
|
mkdirsSync(dir);
|
|
40221
40221
|
return fs.symlinkSync(srcpath, dstpath, type);
|
|
@@ -40355,7 +40355,7 @@ var require_jsonfile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40355
40355
|
//#endregion
|
|
40356
40356
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/json/output-json.js
|
|
40357
40357
|
var require_output_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40358
|
-
var path$
|
|
40358
|
+
var path$21 = __require("path");
|
|
40359
40359
|
var mkdir = require_mkdirs();
|
|
40360
40360
|
var pathExists = require_path_exists().pathExists;
|
|
40361
40361
|
var jsonFile = require_jsonfile();
|
|
@@ -40364,7 +40364,7 @@ var require_output_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40364
40364
|
callback = options;
|
|
40365
40365
|
options = {};
|
|
40366
40366
|
}
|
|
40367
|
-
const dir = path$
|
|
40367
|
+
const dir = path$21.dirname(file);
|
|
40368
40368
|
pathExists(dir, (err, itDoes) => {
|
|
40369
40369
|
if (err) return callback(err);
|
|
40370
40370
|
if (itDoes) return jsonFile.writeJson(file, data, options, callback);
|
|
@@ -40380,11 +40380,11 @@ var require_output_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40380
40380
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/json/output-json-sync.js
|
|
40381
40381
|
var require_output_json_sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40382
40382
|
var fs = require_graceful_fs();
|
|
40383
|
-
var path$
|
|
40383
|
+
var path$20 = __require("path");
|
|
40384
40384
|
var mkdir = require_mkdirs();
|
|
40385
40385
|
var jsonFile = require_jsonfile();
|
|
40386
40386
|
function outputJsonSync(file, data, options) {
|
|
40387
|
-
const dir = path$
|
|
40387
|
+
const dir = path$20.dirname(file);
|
|
40388
40388
|
if (!fs.existsSync(dir)) mkdir.mkdirsSync(dir);
|
|
40389
40389
|
jsonFile.writeJsonSync(file, data, options);
|
|
40390
40390
|
}
|
|
@@ -40409,7 +40409,7 @@ var require_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40409
40409
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/move-sync/move-sync.js
|
|
40410
40410
|
var require_move_sync$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40411
40411
|
var fs = require_graceful_fs();
|
|
40412
|
-
var path$
|
|
40412
|
+
var path$19 = __require("path");
|
|
40413
40413
|
var copySync = require_copy_sync().copySync;
|
|
40414
40414
|
var removeSync = require_remove().removeSync;
|
|
40415
40415
|
var mkdirpSync = require_mkdirs().mkdirpSync;
|
|
@@ -40419,7 +40419,7 @@ var require_move_sync$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40419
40419
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
40420
40420
|
const { srcStat } = stat.checkPathsSync(src, dest, "move");
|
|
40421
40421
|
stat.checkParentPathsSync(src, srcStat, dest, "move");
|
|
40422
|
-
mkdirpSync(path$
|
|
40422
|
+
mkdirpSync(path$19.dirname(dest));
|
|
40423
40423
|
return doRename(src, dest, overwrite);
|
|
40424
40424
|
}
|
|
40425
40425
|
function doRename(src, dest, overwrite) {
|
|
@@ -40456,7 +40456,7 @@ var require_move_sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40456
40456
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/move/move.js
|
|
40457
40457
|
var require_move$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40458
40458
|
var fs = require_graceful_fs();
|
|
40459
|
-
var path$
|
|
40459
|
+
var path$18 = __require("path");
|
|
40460
40460
|
var copy = require_copy().copy;
|
|
40461
40461
|
var remove = require_remove().remove;
|
|
40462
40462
|
var mkdirp = require_mkdirs().mkdirp;
|
|
@@ -40473,7 +40473,7 @@ var require_move$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40473
40473
|
const { srcStat } = stats;
|
|
40474
40474
|
stat.checkParentPaths(src, srcStat, dest, "move", (err) => {
|
|
40475
40475
|
if (err) return cb(err);
|
|
40476
|
-
mkdirp(path$
|
|
40476
|
+
mkdirp(path$18.dirname(dest), (err) => {
|
|
40477
40477
|
if (err) return cb(err);
|
|
40478
40478
|
return doRename(src, dest, overwrite, cb);
|
|
40479
40479
|
});
|
|
@@ -40520,7 +40520,7 @@ var require_move = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40520
40520
|
var require_output = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40521
40521
|
var u = require_universalify().fromCallback;
|
|
40522
40522
|
var fs = require_graceful_fs();
|
|
40523
|
-
var path$
|
|
40523
|
+
var path$17 = __require("path");
|
|
40524
40524
|
var mkdir = require_mkdirs();
|
|
40525
40525
|
var pathExists = require_path_exists().pathExists;
|
|
40526
40526
|
function outputFile(file, data, encoding, callback) {
|
|
@@ -40528,7 +40528,7 @@ var require_output = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40528
40528
|
callback = encoding;
|
|
40529
40529
|
encoding = "utf8";
|
|
40530
40530
|
}
|
|
40531
|
-
const dir = path$
|
|
40531
|
+
const dir = path$17.dirname(file);
|
|
40532
40532
|
pathExists(dir, (err, itDoes) => {
|
|
40533
40533
|
if (err) return callback(err);
|
|
40534
40534
|
if (itDoes) return fs.writeFile(file, data, encoding, callback);
|
|
@@ -40539,7 +40539,7 @@ var require_output = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40539
40539
|
});
|
|
40540
40540
|
}
|
|
40541
40541
|
function outputFileSync(file, ...args) {
|
|
40542
|
-
const dir = path$
|
|
40542
|
+
const dir = path$17.dirname(file);
|
|
40543
40543
|
if (fs.existsSync(dir)) return fs.writeFileSync(file, ...args);
|
|
40544
40544
|
mkdir.mkdirsSync(dir);
|
|
40545
40545
|
fs.writeFileSync(file, ...args);
|
|
@@ -40553,9 +40553,9 @@ var require_output = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40553
40553
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/index.js
|
|
40554
40554
|
var require_lib$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40555
40555
|
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());
|
|
40556
|
-
var fs$
|
|
40557
|
-
if (Object.getOwnPropertyDescriptor(fs$
|
|
40558
|
-
return fs$
|
|
40556
|
+
var fs$13 = __require("fs");
|
|
40557
|
+
if (Object.getOwnPropertyDescriptor(fs$13, "promises")) Object.defineProperty(module.exports, "promises", { get() {
|
|
40558
|
+
return fs$13.promises;
|
|
40559
40559
|
} });
|
|
40560
40560
|
}));
|
|
40561
40561
|
//#endregion
|
|
@@ -40720,11 +40720,11 @@ var require_lib$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40720
40720
|
//#region ../../node_modules/streamroller/lib/fileNameFormatter.js
|
|
40721
40721
|
var require_fileNameFormatter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40722
40722
|
var debug = require_src()("streamroller:fileNameFormatter");
|
|
40723
|
-
var path$
|
|
40723
|
+
var path$16 = __require("path");
|
|
40724
40724
|
var FILENAME_SEP = ".";
|
|
40725
40725
|
var ZIP_EXT = ".gz";
|
|
40726
40726
|
module.exports = ({ file, keepFileExt, needsIndex, alwaysIncludeDate, compress }) => {
|
|
40727
|
-
const dirAndName = path$
|
|
40727
|
+
const dirAndName = path$16.join(file.dir, file.name);
|
|
40728
40728
|
const ext = (f) => f + file.ext;
|
|
40729
40729
|
const index = (f, i, d) => (needsIndex || !d) && i ? f + FILENAME_SEP + i : f;
|
|
40730
40730
|
const date = (f, i, d) => {
|
|
@@ -40869,7 +40869,7 @@ var require_moveAndMaybeCompressFile = /* @__PURE__ */ __commonJSMin(((exports,
|
|
|
40869
40869
|
var require_RollingFileWriteStream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40870
40870
|
var debug = require_src()("streamroller:RollingFileWriteStream");
|
|
40871
40871
|
var fs = require_lib$4();
|
|
40872
|
-
var path$
|
|
40872
|
+
var path$15 = __require("path");
|
|
40873
40873
|
var newNow = require_now();
|
|
40874
40874
|
var format = require_lib$3();
|
|
40875
40875
|
var { Writable: Writable$1 } = __require("stream");
|
|
@@ -40900,8 +40900,8 @@ var require_RollingFileWriteStream = /* @__PURE__ */ __commonJSMin(((exports, mo
|
|
|
40900
40900
|
debug(`constructor: creating RollingFileWriteStream. path=${filePath}`);
|
|
40901
40901
|
super(options);
|
|
40902
40902
|
this.options = this._parseOption(options);
|
|
40903
|
-
this.fileObject = path$
|
|
40904
|
-
if (this.fileObject.dir === "") this.fileObject = path$
|
|
40903
|
+
this.fileObject = path$15.parse(filePath);
|
|
40904
|
+
if (this.fileObject.dir === "") this.fileObject = path$15.parse(path$15.join(process.cwd(), filePath));
|
|
40905
40905
|
this.fileFormatter = fileNameFormatter({
|
|
40906
40906
|
file: this.fileObject,
|
|
40907
40907
|
alwaysIncludeDate: this.options.alwaysIncludePattern,
|
|
@@ -41038,7 +41038,7 @@ var require_RollingFileWriteStream = /* @__PURE__ */ __commonJSMin(((exports, mo
|
|
|
41038
41038
|
const existingFileDetails = await this._getExistingFiles();
|
|
41039
41039
|
debug(`_clean: numToKeep = ${this.options.numToKeep}, existingFiles = ${existingFileDetails.length}`);
|
|
41040
41040
|
debug("_clean: existing files are: ", existingFileDetails);
|
|
41041
|
-
if (this._tooManyFiles(existingFileDetails.length)) await deleteFiles(existingFileDetails.slice(0, existingFileDetails.length - this.options.numToKeep - 1).map((f) => path$
|
|
41041
|
+
if (this._tooManyFiles(existingFileDetails.length)) await deleteFiles(existingFileDetails.slice(0, existingFileDetails.length - this.options.numToKeep - 1).map((f) => path$15.format({
|
|
41042
41042
|
dir: this.fileObject.dir,
|
|
41043
41043
|
base: f.filename
|
|
41044
41044
|
})));
|
|
@@ -41112,7 +41112,7 @@ var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41112
41112
|
//#region ../../node_modules/log4js/lib/appenders/file.js
|
|
41113
41113
|
var require_file = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
41114
41114
|
var debug = require_src()("log4js:file");
|
|
41115
|
-
var path$
|
|
41115
|
+
var path$14 = __require("path");
|
|
41116
41116
|
var streams = require_lib$2();
|
|
41117
41117
|
var eol$2 = __require("os").EOL;
|
|
41118
41118
|
function openTheStream(file, fileSize, numFiles, options) {
|
|
@@ -41139,7 +41139,7 @@ var require_file = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41139
41139
|
* @param timezoneOffset - optional timezone offset in minutes (default system local)
|
|
41140
41140
|
*/
|
|
41141
41141
|
function fileAppender(file, layout, logSize, numBackups, options, timezoneOffset) {
|
|
41142
|
-
file = path$
|
|
41142
|
+
file = path$14.normalize(file);
|
|
41143
41143
|
numBackups = numBackups === void 0 ? 5 : numBackups;
|
|
41144
41144
|
numBackups = numBackups === 0 ? 1 : numBackups;
|
|
41145
41145
|
debug("Creating file appender (", file, ", ", logSize, ", ", numBackups, ", ", options, ", ", timezoneOffset, ")");
|
|
@@ -41218,13 +41218,13 @@ var require_dateFile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41218
41218
|
//#region ../../node_modules/log4js/lib/appenders/fileSync.js
|
|
41219
41219
|
var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
41220
41220
|
var debug = require_src()("log4js:fileSync");
|
|
41221
|
-
var path$
|
|
41222
|
-
var fs$
|
|
41221
|
+
var path$13 = __require("path");
|
|
41222
|
+
var fs$12 = __require("fs");
|
|
41223
41223
|
var eol = __require("os").EOL || "\n";
|
|
41224
41224
|
function touchFile(file, options) {
|
|
41225
|
-
if (fs$
|
|
41226
|
-
const id = fs$
|
|
41227
|
-
fs$
|
|
41225
|
+
if (fs$12.existsSync(file)) return;
|
|
41226
|
+
const id = fs$12.openSync(file, options.flags, options.mode);
|
|
41227
|
+
fs$12.closeSync(id);
|
|
41228
41228
|
}
|
|
41229
41229
|
var RollingFileSync = class {
|
|
41230
41230
|
constructor(filename, size, backups, options) {
|
|
@@ -41241,7 +41241,7 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41241
41241
|
function currentFileSize(file) {
|
|
41242
41242
|
let fileSize = 0;
|
|
41243
41243
|
try {
|
|
41244
|
-
fileSize = fs$
|
|
41244
|
+
fileSize = fs$12.statSync(file).size;
|
|
41245
41245
|
} catch (e) {
|
|
41246
41246
|
touchFile(file, options);
|
|
41247
41247
|
}
|
|
@@ -41255,12 +41255,12 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41255
41255
|
}
|
|
41256
41256
|
roll(filename) {
|
|
41257
41257
|
const that = this;
|
|
41258
|
-
const nameMatcher = new RegExp(`^${path$
|
|
41258
|
+
const nameMatcher = new RegExp(`^${path$13.basename(filename)}`);
|
|
41259
41259
|
function justTheseFiles(item) {
|
|
41260
41260
|
return nameMatcher.test(item);
|
|
41261
41261
|
}
|
|
41262
41262
|
function index(filename_) {
|
|
41263
|
-
return parseInt(filename_.substring(`${path$
|
|
41263
|
+
return parseInt(filename_.substring(`${path$13.basename(filename)}.`.length), 10) || 0;
|
|
41264
41264
|
}
|
|
41265
41265
|
function byIndex(a, b) {
|
|
41266
41266
|
if (index(a) > index(b)) return 1;
|
|
@@ -41272,15 +41272,15 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41272
41272
|
debug(`Index of ${fileToRename} is ${idx}`);
|
|
41273
41273
|
if (idx < that.backups) {
|
|
41274
41274
|
try {
|
|
41275
|
-
fs$
|
|
41275
|
+
fs$12.unlinkSync(`${filename}.${idx + 1}`);
|
|
41276
41276
|
} catch (e) {}
|
|
41277
41277
|
debug(`Renaming ${fileToRename} -> ${filename}.${idx + 1}`);
|
|
41278
|
-
fs$
|
|
41278
|
+
fs$12.renameSync(path$13.join(path$13.dirname(filename), fileToRename), `${filename}.${idx + 1}`);
|
|
41279
41279
|
}
|
|
41280
41280
|
}
|
|
41281
41281
|
function renameTheFiles() {
|
|
41282
41282
|
debug("Renaming the old files");
|
|
41283
|
-
fs$
|
|
41283
|
+
fs$12.readdirSync(path$13.dirname(filename)).filter(justTheseFiles).sort(byIndex).reverse().forEach(increaseFileIndex);
|
|
41284
41284
|
}
|
|
41285
41285
|
debug("Rolling, rolling, rolling");
|
|
41286
41286
|
renameTheFiles();
|
|
@@ -41290,7 +41290,7 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41290
41290
|
function writeTheChunk() {
|
|
41291
41291
|
debug("writing the chunk to the file");
|
|
41292
41292
|
that.currentSize += chunk.length;
|
|
41293
|
-
fs$
|
|
41293
|
+
fs$12.appendFileSync(that.filename, chunk);
|
|
41294
41294
|
}
|
|
41295
41295
|
debug("in write");
|
|
41296
41296
|
if (this.shouldRoll()) {
|
|
@@ -41316,7 +41316,7 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41316
41316
|
*/
|
|
41317
41317
|
function fileAppender(file, layout, logSize, numBackups, timezoneOffset, options) {
|
|
41318
41318
|
debug("fileSync appender created");
|
|
41319
|
-
file = path$
|
|
41319
|
+
file = path$13.normalize(file);
|
|
41320
41320
|
numBackups = numBackups === void 0 ? 5 : numBackups;
|
|
41321
41321
|
numBackups = numBackups === 0 ? 1 : numBackups;
|
|
41322
41322
|
function openTheStream(filePath, fileSize, numFiles) {
|
|
@@ -41325,7 +41325,7 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41325
41325
|
else stream = ((f) => {
|
|
41326
41326
|
touchFile(f, options);
|
|
41327
41327
|
return { write(data) {
|
|
41328
|
-
fs$
|
|
41328
|
+
fs$12.appendFileSync(f, data);
|
|
41329
41329
|
} };
|
|
41330
41330
|
})(filePath);
|
|
41331
41331
|
return stream;
|
|
@@ -41350,7 +41350,7 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41350
41350
|
//#endregion
|
|
41351
41351
|
//#region ../../node_modules/log4js/lib/appenders/index.js
|
|
41352
41352
|
var require_appenders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
41353
|
-
var path$
|
|
41353
|
+
var path$12 = __require("path");
|
|
41354
41354
|
var debug = require_src()("log4js:appenders");
|
|
41355
41355
|
var configuration = require_configuration();
|
|
41356
41356
|
var clustering = require_clustering();
|
|
@@ -41377,7 +41377,7 @@ var require_appenders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41377
41377
|
return;
|
|
41378
41378
|
}
|
|
41379
41379
|
};
|
|
41380
|
-
var loadAppenderModule = (type, config) => coreAppenders.get(type) || tryLoading(`./${type}`, config) || tryLoading(type, config) || __require.main && tryLoading(path$
|
|
41380
|
+
var loadAppenderModule = (type, config) => coreAppenders.get(type) || tryLoading(`./${type}`, config) || tryLoading(type, config) || __require.main && tryLoading(path$12.join(path$12.dirname(__require.main.filename), type), config) || tryLoading(path$12.join(process.cwd(), type), config);
|
|
41381
41381
|
var appendersLoading = /* @__PURE__ */ new Set();
|
|
41382
41382
|
var getAppender = (name, config) => {
|
|
41383
41383
|
if (appenders.has(name)) return appenders.get(name);
|
|
@@ -41924,7 +41924,7 @@ var require_log4js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41924
41924
|
* Website: http://log4js.berlios.de
|
|
41925
41925
|
*/
|
|
41926
41926
|
var debug = require_src()("log4js:main");
|
|
41927
|
-
var fs$
|
|
41927
|
+
var fs$11 = __require("fs");
|
|
41928
41928
|
var deepClone = require_rfdc()({ proto: true });
|
|
41929
41929
|
var configuration = require_configuration();
|
|
41930
41930
|
var layouts = require_layouts();
|
|
@@ -41945,7 +41945,7 @@ var require_log4js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41945
41945
|
function loadConfigurationFile(filename) {
|
|
41946
41946
|
debug(`Loading configuration from ${filename}`);
|
|
41947
41947
|
try {
|
|
41948
|
-
return JSON.parse(fs$
|
|
41948
|
+
return JSON.parse(fs$11.readFileSync(filename, "utf8"));
|
|
41949
41949
|
} catch (e) {
|
|
41950
41950
|
throw new Error(`Problem reading config from file "${filename}". Error was ${e.message}`, e);
|
|
41951
41951
|
}
|
|
@@ -43033,10 +43033,10 @@ var require_atomic_sleep = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43033
43033
|
//#endregion
|
|
43034
43034
|
//#region ../../node_modules/sonic-boom/index.js
|
|
43035
43035
|
var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
43036
|
-
var fs$
|
|
43036
|
+
var fs$10 = __require("fs");
|
|
43037
43037
|
var EventEmitter$8 = __require("events");
|
|
43038
43038
|
var inherits = __require("util").inherits;
|
|
43039
|
-
var path$
|
|
43039
|
+
var path$11 = __require("path");
|
|
43040
43040
|
var sleep = require_atomic_sleep();
|
|
43041
43041
|
var assert$1 = __require("assert");
|
|
43042
43042
|
var BUSY_WRITE_TIMEOUT = 100;
|
|
@@ -43076,17 +43076,17 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43076
43076
|
const flags = sonic.append ? "a" : "w";
|
|
43077
43077
|
const mode = sonic.mode;
|
|
43078
43078
|
if (sonic.sync) try {
|
|
43079
|
-
if (sonic.mkdir) fs$
|
|
43080
|
-
fileOpened(null, fs$
|
|
43079
|
+
if (sonic.mkdir) fs$10.mkdirSync(path$11.dirname(file), { recursive: true });
|
|
43080
|
+
fileOpened(null, fs$10.openSync(file, flags, mode));
|
|
43081
43081
|
} catch (err) {
|
|
43082
43082
|
fileOpened(err);
|
|
43083
43083
|
throw err;
|
|
43084
43084
|
}
|
|
43085
|
-
else if (sonic.mkdir) fs$
|
|
43085
|
+
else if (sonic.mkdir) fs$10.mkdir(path$11.dirname(file), { recursive: true }, (err) => {
|
|
43086
43086
|
if (err) return fileOpened(err);
|
|
43087
|
-
fs$
|
|
43087
|
+
fs$10.open(file, flags, mode, fileOpened);
|
|
43088
43088
|
});
|
|
43089
|
-
else fs$
|
|
43089
|
+
else fs$10.open(file, flags, mode, fileOpened);
|
|
43090
43090
|
}
|
|
43091
43091
|
function SonicBoom(opts) {
|
|
43092
43092
|
if (!(this instanceof SonicBoom)) return new SonicBoom(opts);
|
|
@@ -43124,8 +43124,8 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43124
43124
|
this.flush = flushBuffer;
|
|
43125
43125
|
this.flushSync = flushBufferSync;
|
|
43126
43126
|
this._actualWrite = actualWriteBuffer;
|
|
43127
|
-
fsWriteSync = () => fs$
|
|
43128
|
-
fsWrite = () => fs$
|
|
43127
|
+
fsWriteSync = () => fs$10.writeSync(this.fd, this._writingBuf);
|
|
43128
|
+
fsWrite = () => fs$10.write(this.fd, this._writingBuf, this.release);
|
|
43129
43129
|
} else if (contentMode === void 0 || contentMode === kContentModeUtf8) {
|
|
43130
43130
|
this._writingBuf = "";
|
|
43131
43131
|
this.write = write;
|
|
@@ -43133,12 +43133,12 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43133
43133
|
this.flushSync = flushSync;
|
|
43134
43134
|
this._actualWrite = actualWrite;
|
|
43135
43135
|
fsWriteSync = () => {
|
|
43136
|
-
if (Buffer.isBuffer(this._writingBuf)) return fs$
|
|
43137
|
-
return fs$
|
|
43136
|
+
if (Buffer.isBuffer(this._writingBuf)) return fs$10.writeSync(this.fd, this._writingBuf);
|
|
43137
|
+
return fs$10.writeSync(this.fd, this._writingBuf, "utf8");
|
|
43138
43138
|
};
|
|
43139
43139
|
fsWrite = () => {
|
|
43140
|
-
if (Buffer.isBuffer(this._writingBuf)) return fs$
|
|
43141
|
-
return fs$
|
|
43140
|
+
if (Buffer.isBuffer(this._writingBuf)) return fs$10.write(this.fd, this._writingBuf, this.release);
|
|
43141
|
+
return fs$10.write(this.fd, this._writingBuf, "utf8", this.release);
|
|
43142
43142
|
};
|
|
43143
43143
|
} else throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`);
|
|
43144
43144
|
if (typeof fd === "number") {
|
|
@@ -43183,7 +43183,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43183
43183
|
return;
|
|
43184
43184
|
}
|
|
43185
43185
|
}
|
|
43186
|
-
if (this._fsync) fs$
|
|
43186
|
+
if (this._fsync) fs$10.fsyncSync(this.fd);
|
|
43187
43187
|
const len = this._len;
|
|
43188
43188
|
if (this._reopening) {
|
|
43189
43189
|
this._writing = false;
|
|
@@ -43280,7 +43280,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43280
43280
|
this._flushPending = true;
|
|
43281
43281
|
const onDrain = () => {
|
|
43282
43282
|
if (!this._fsync) try {
|
|
43283
|
-
fs$
|
|
43283
|
+
fs$10.fsync(this.fd, (err) => {
|
|
43284
43284
|
this._flushPending = false;
|
|
43285
43285
|
cb(err);
|
|
43286
43286
|
});
|
|
@@ -43357,7 +43357,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43357
43357
|
if (this._writing) return;
|
|
43358
43358
|
const fd = this.fd;
|
|
43359
43359
|
this.once("ready", () => {
|
|
43360
|
-
if (fd !== this.fd) fs$
|
|
43360
|
+
if (fd !== this.fd) fs$10.close(fd, (err) => {
|
|
43361
43361
|
if (err) return this.emit("error", err);
|
|
43362
43362
|
});
|
|
43363
43363
|
});
|
|
@@ -43388,7 +43388,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43388
43388
|
while (this._bufs.length || buf.length) {
|
|
43389
43389
|
if (buf.length <= 0) buf = this._bufs[0];
|
|
43390
43390
|
try {
|
|
43391
|
-
const n = Buffer.isBuffer(buf) ? fs$
|
|
43391
|
+
const n = Buffer.isBuffer(buf) ? fs$10.writeSync(this.fd, buf) : fs$10.writeSync(this.fd, buf, "utf8");
|
|
43392
43392
|
const releasedBufObj = releaseWritingBuf(buf, this._len, n);
|
|
43393
43393
|
buf = releasedBufObj.writingBuf;
|
|
43394
43394
|
this._len = releasedBufObj.len;
|
|
@@ -43399,7 +43399,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43399
43399
|
}
|
|
43400
43400
|
}
|
|
43401
43401
|
try {
|
|
43402
|
-
fs$
|
|
43402
|
+
fs$10.fsyncSync(this.fd);
|
|
43403
43403
|
} catch {}
|
|
43404
43404
|
}
|
|
43405
43405
|
function flushBufferSync() {
|
|
@@ -43413,7 +43413,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43413
43413
|
while (this._bufs.length || buf.length) {
|
|
43414
43414
|
if (buf.length <= 0) buf = mergeBuf(this._bufs[0], this._lens[0]);
|
|
43415
43415
|
try {
|
|
43416
|
-
const n = fs$
|
|
43416
|
+
const n = fs$10.writeSync(this.fd, buf);
|
|
43417
43417
|
buf = buf.subarray(n);
|
|
43418
43418
|
this._len = Math.max(this._len - n, 0);
|
|
43419
43419
|
if (buf.length <= 0) {
|
|
@@ -43435,24 +43435,24 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43435
43435
|
this._writing = true;
|
|
43436
43436
|
this._writingBuf = this._writingBuf.length ? this._writingBuf : this._bufs.shift() || "";
|
|
43437
43437
|
if (this.sync) try {
|
|
43438
|
-
release(null, Buffer.isBuffer(this._writingBuf) ? fs$
|
|
43438
|
+
release(null, Buffer.isBuffer(this._writingBuf) ? fs$10.writeSync(this.fd, this._writingBuf) : fs$10.writeSync(this.fd, this._writingBuf, "utf8"));
|
|
43439
43439
|
} catch (err) {
|
|
43440
43440
|
release(err);
|
|
43441
43441
|
}
|
|
43442
|
-
else fs$
|
|
43442
|
+
else fs$10.write(this.fd, this._writingBuf, release);
|
|
43443
43443
|
}
|
|
43444
43444
|
function actualWriteBuffer() {
|
|
43445
43445
|
const release = this.release;
|
|
43446
43446
|
this._writing = true;
|
|
43447
43447
|
this._writingBuf = this._writingBuf.length ? this._writingBuf : mergeBuf(this._bufs.shift(), this._lens.shift());
|
|
43448
43448
|
if (this.sync) try {
|
|
43449
|
-
release(null, fs$
|
|
43449
|
+
release(null, fs$10.writeSync(this.fd, this._writingBuf));
|
|
43450
43450
|
} catch (err) {
|
|
43451
43451
|
release(err);
|
|
43452
43452
|
}
|
|
43453
43453
|
else {
|
|
43454
43454
|
if (kCopyBuffer) this._writingBuf = Buffer.from(this._writingBuf);
|
|
43455
|
-
fs$
|
|
43455
|
+
fs$10.write(this.fd, this._writingBuf, release);
|
|
43456
43456
|
}
|
|
43457
43457
|
}
|
|
43458
43458
|
function actualClose(sonic) {
|
|
@@ -43466,10 +43466,10 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43466
43466
|
sonic._lens = [];
|
|
43467
43467
|
assert$1(typeof sonic.fd === "number", `sonic.fd must be a number, got ${typeof sonic.fd}`);
|
|
43468
43468
|
try {
|
|
43469
|
-
fs$
|
|
43469
|
+
fs$10.fsync(sonic.fd, closeWrapped);
|
|
43470
43470
|
} catch {}
|
|
43471
43471
|
function closeWrapped() {
|
|
43472
|
-
if (sonic.fd !== 1 && sonic.fd !== 2) fs$
|
|
43472
|
+
if (sonic.fd !== 1 && sonic.fd !== 2) fs$10.close(sonic.fd, done);
|
|
43473
43473
|
else done();
|
|
43474
43474
|
}
|
|
43475
43475
|
function done(err) {
|
|
@@ -72266,7 +72266,7 @@ var require_tcp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
72266
72266
|
var Transporter = require_base$1();
|
|
72267
72267
|
var _ = require_lodash();
|
|
72268
72268
|
var { isObject, isString } = require_utils$3();
|
|
72269
|
-
var fs$
|
|
72269
|
+
var fs$9 = __require("fs");
|
|
72270
72270
|
var kleur = require_kleur();
|
|
72271
72271
|
var Node = require_node();
|
|
72272
72272
|
var P = require_packets();
|
|
@@ -72413,7 +72413,7 @@ var require_tcp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
72413
72413
|
if (isString(str) && str.startsWith("file://")) {
|
|
72414
72414
|
const fName = str.replace("file://", "");
|
|
72415
72415
|
this.logger.debug(`Load nodes list from file '${fName}'...`);
|
|
72416
|
-
let content = fs$
|
|
72416
|
+
let content = fs$9.readFileSync(fName);
|
|
72417
72417
|
if (content && content.length > 0) {
|
|
72418
72418
|
const str = content.toString().trim();
|
|
72419
72419
|
if (str.startsWith("{") || str.startsWith("[")) return JSON.parse(str);
|
|
@@ -74903,15 +74903,15 @@ var require_ttl = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
74903
74903
|
//#region ../../node_modules/recursive-watch/index.js
|
|
74904
74904
|
var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
74905
74905
|
var os$5 = __require("os");
|
|
74906
|
-
var fs$
|
|
74907
|
-
var path$
|
|
74906
|
+
var fs$8 = __require("fs");
|
|
74907
|
+
var path$10 = __require("path");
|
|
74908
74908
|
var Cache = require_ttl();
|
|
74909
74909
|
var watchDirectory = os$5.platform() === "linux" ? watchFallback : watchRecursive;
|
|
74910
74910
|
module.exports = watch;
|
|
74911
74911
|
function watch(name, onchange) {
|
|
74912
74912
|
var clear = null;
|
|
74913
74913
|
var stopped = false;
|
|
74914
|
-
fs$
|
|
74914
|
+
fs$8.lstat(name, function(_, st) {
|
|
74915
74915
|
if (!st || stopped) {
|
|
74916
74916
|
stopped = true;
|
|
74917
74917
|
return;
|
|
@@ -74927,8 +74927,8 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
74927
74927
|
function watchFile(filename, onchange) {
|
|
74928
74928
|
var prev = null;
|
|
74929
74929
|
var prevTime = 0;
|
|
74930
|
-
var w = fs$
|
|
74931
|
-
fs$
|
|
74930
|
+
var w = fs$8.watch(filename, function() {
|
|
74931
|
+
fs$8.lstat(filename, function(_, st) {
|
|
74932
74932
|
var now = Date.now();
|
|
74933
74933
|
if (now - prevTime > 2e3 || !same(st, prev)) onchange(filename);
|
|
74934
74934
|
prevTime = now;
|
|
@@ -74940,9 +74940,9 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
74940
74940
|
};
|
|
74941
74941
|
}
|
|
74942
74942
|
function watchRecursive(directory, onchange) {
|
|
74943
|
-
var w = fs$
|
|
74943
|
+
var w = fs$8.watch(directory, { recursive: true }, function(change, filename) {
|
|
74944
74944
|
if (!filename) return;
|
|
74945
|
-
onchange(path$
|
|
74945
|
+
onchange(path$10.join(directory, filename));
|
|
74946
74946
|
});
|
|
74947
74947
|
return function() {
|
|
74948
74948
|
w.close();
|
|
@@ -74970,7 +74970,7 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
74970
74970
|
}
|
|
74971
74971
|
function update() {
|
|
74972
74972
|
var filename = queued[0];
|
|
74973
|
-
fs$
|
|
74973
|
+
fs$8.lstat(filename, function(err, st) {
|
|
74974
74974
|
var w = watching[filename];
|
|
74975
74975
|
if (err && w) {
|
|
74976
74976
|
w.close();
|
|
@@ -74979,30 +74979,30 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
74979
74979
|
var prevSt = prevs.get(filename);
|
|
74980
74980
|
if (!prevSt || !same(st, prevSt)) onchange(filename);
|
|
74981
74981
|
prevs.put(filename, st);
|
|
74982
|
-
visit(path$
|
|
74982
|
+
visit(path$10.relative(directory, filename), function() {
|
|
74983
74983
|
queued.shift();
|
|
74984
74984
|
if (queued.length) update();
|
|
74985
74985
|
});
|
|
74986
74986
|
});
|
|
74987
74987
|
}
|
|
74988
74988
|
function visit(next, cb) {
|
|
74989
|
-
var dir = path$
|
|
74990
|
-
fs$
|
|
74989
|
+
var dir = path$10.join(directory, next);
|
|
74990
|
+
fs$8.lstat(dir, function(err, st) {
|
|
74991
74991
|
if (err || !st.isDirectory()) return cb();
|
|
74992
74992
|
if (watching[dir]) return cb();
|
|
74993
74993
|
if (loaded) emit(dir);
|
|
74994
|
-
var w = fs$
|
|
74995
|
-
filename = path$
|
|
74996
|
-
emit(path$
|
|
74994
|
+
var w = fs$8.watch(dir, function(change, filename) {
|
|
74995
|
+
filename = path$10.join(next, filename);
|
|
74996
|
+
emit(path$10.join(directory, filename));
|
|
74997
74997
|
});
|
|
74998
74998
|
w.on("error", noop);
|
|
74999
74999
|
watching[dir] = w;
|
|
75000
|
-
fs$
|
|
75000
|
+
fs$8.readdir(dir, function(err, list) {
|
|
75001
75001
|
if (err) return cb(err);
|
|
75002
75002
|
loop();
|
|
75003
75003
|
function loop() {
|
|
75004
75004
|
if (!list.length) return cb();
|
|
75005
|
-
visit(path$
|
|
75005
|
+
visit(path$10.join(next, list.shift()), loop);
|
|
75006
75006
|
}
|
|
75007
75007
|
});
|
|
75008
75008
|
});
|
|
@@ -75017,9 +75017,9 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
75017
75017
|
//#endregion
|
|
75018
75018
|
//#region ../../node_modules/moleculer/src/middlewares/hot-reload.js
|
|
75019
75019
|
var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
75020
|
-
var fs$
|
|
75020
|
+
var fs$7 = __require("fs");
|
|
75021
75021
|
var kleur = require_kleur();
|
|
75022
|
-
var path$
|
|
75022
|
+
var path$9 = __require("path");
|
|
75023
75023
|
var watch = require_recursive_watch();
|
|
75024
75024
|
var _ = require_lodash();
|
|
75025
75025
|
var { clearRequireCache, makeDirs, isFunction, isString, uniq } = require_utils$3();
|
|
@@ -75031,10 +75031,10 @@ var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
75031
75031
|
let hotReloadModules = [];
|
|
75032
75032
|
let extraFiles = null;
|
|
75033
75033
|
function hotReloadService(service) {
|
|
75034
|
-
const relPath = path$
|
|
75034
|
+
const relPath = path$9.relative(process.cwd(), service.__filename);
|
|
75035
75035
|
broker.logger.info(`Hot reload '${service.name}' service...`, kleur.grey(relPath));
|
|
75036
75036
|
return broker.destroyService(service).then(() => {
|
|
75037
|
-
if (fs$
|
|
75037
|
+
if (fs$7.existsSync(service.__filename)) try {
|
|
75038
75038
|
return broker.loadService(service.__filename);
|
|
75039
75039
|
} catch (err) {
|
|
75040
75040
|
broker.logger.error(`Failed to load service '${service.__filename}'`, err);
|
|
@@ -75066,7 +75066,7 @@ var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
75066
75066
|
});
|
|
75067
75067
|
broker.logger.info(kleur.bgMagenta().white().bold(`Reload ${needToReloadDedup.length} service(s)`));
|
|
75068
75068
|
needToReloadDedup.forEach((svc) => {
|
|
75069
|
-
if (typeof svc == "string") if (fs$
|
|
75069
|
+
if (typeof svc == "string") if (fs$7.existsSync(svc)) return broker.loadService(svc);
|
|
75070
75070
|
else return;
|
|
75071
75071
|
return hotReloadService(svc);
|
|
75072
75072
|
});
|
|
@@ -75076,19 +75076,19 @@ var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
75076
75076
|
broker.logger.debug("");
|
|
75077
75077
|
broker.logger.debug(kleur.yellow().bold("Watching the following project files:"));
|
|
75078
75078
|
projectFiles.forEach((watchItem, fName) => {
|
|
75079
|
-
if (!fs$
|
|
75079
|
+
if (!fs$7.existsSync(fName)) projectFiles.delete(fName);
|
|
75080
75080
|
});
|
|
75081
75081
|
projectFiles.forEach((watchItem, fName) => {
|
|
75082
|
-
const relPath = path$
|
|
75082
|
+
const relPath = path$9.relative(process.cwd(), fName);
|
|
75083
75083
|
if (watchItem.brokerRestart) broker.logger.debug(` ${relPath}:`, kleur.grey("restart broker."));
|
|
75084
75084
|
else if (watchItem.allServices) broker.logger.debug(` ${relPath}:`, kleur.grey("reload all services."));
|
|
75085
75085
|
else if (watchItem.services.length > 0) {
|
|
75086
75086
|
broker.logger.debug(` ${relPath}:`, kleur.grey(`reload ${watchItem.services.length} service(s) & ${watchItem.others.length} other(s).`));
|
|
75087
75087
|
watchItem.services.forEach((svcFullname) => broker.logger.debug(kleur.grey(` ${svcFullname}`)));
|
|
75088
|
-
watchItem.others.forEach((filename) => broker.logger.debug(kleur.grey(` ${path$
|
|
75088
|
+
watchItem.others.forEach((filename) => broker.logger.debug(kleur.grey(` ${path$9.relative(process.cwd(), filename)}`)));
|
|
75089
75089
|
}
|
|
75090
|
-
watchItem.watcher = fs$
|
|
75091
|
-
const relPath = path$
|
|
75090
|
+
watchItem.watcher = fs$7.watch(fName, (eventType) => {
|
|
75091
|
+
const relPath = path$9.relative(process.cwd(), fName);
|
|
75092
75092
|
broker.logger.info(kleur.magenta().bold(`The '${relPath}' file is changed. (Event: ${eventType})`));
|
|
75093
75093
|
clearRequireCache(fName);
|
|
75094
75094
|
if (watchItem.others.length > 0) watchItem.others.forEach((f) => clearRequireCache(f));
|
|
@@ -75206,16 +75206,16 @@ var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
75206
75206
|
broker.logger.debug(kleur.yellow().bold("Watching the following folder(s):"));
|
|
75207
75207
|
folders.forEach((folder) => {
|
|
75208
75208
|
makeDirs(folder);
|
|
75209
|
-
broker.logger.debug(` ${path$
|
|
75209
|
+
broker.logger.debug(` ${path$9.relative(process.cwd(), folder)}/`);
|
|
75210
75210
|
folderWatchers.push({
|
|
75211
75211
|
path: folder,
|
|
75212
75212
|
watcher: watch(folder, (filename) => {
|
|
75213
75213
|
if (filename.endsWith(".service.js") || filename.endsWith(".service.ts")) {
|
|
75214
|
-
broker.logger.debug(`There is changes in '${folder}' folder: `, path$
|
|
75214
|
+
broker.logger.debug(`There is changes in '${folder}' folder: `, path$9.basename(filename));
|
|
75215
75215
|
const isLoaded = broker.services.some((svc) => svc.__filename == filename);
|
|
75216
|
-
const fileExists = fs$
|
|
75216
|
+
const fileExists = fs$7.existsSync(filename);
|
|
75217
75217
|
if (!isLoaded && fileExists) {
|
|
75218
|
-
broker.logger.debug("Loading new file: ", path$
|
|
75218
|
+
broker.logger.debug("Loading new file: ", path$9.basename(filename));
|
|
75219
75219
|
needToLoad.add(filename);
|
|
75220
75220
|
loadServices();
|
|
75221
75221
|
}
|
|
@@ -75391,8 +75391,8 @@ var require_compression = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
75391
75391
|
var require_transit_logger = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
75392
75392
|
var _ = require_lodash();
|
|
75393
75393
|
var kleur = require_kleur();
|
|
75394
|
-
var fs$
|
|
75395
|
-
var path$
|
|
75394
|
+
var fs$6 = __require("fs");
|
|
75395
|
+
var path$8 = __require("path");
|
|
75396
75396
|
var { makeDirs, safetyObject } = require_utils$3();
|
|
75397
75397
|
module.exports = function TransitLoggerMiddleware(opts) {
|
|
75398
75398
|
opts = _.defaultsDeep(opts, {
|
|
@@ -75417,7 +75417,7 @@ var require_transit_logger = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
75417
75417
|
} catch {
|
|
75418
75418
|
data = JSON.stringify(safetyObject(payload), payload instanceof Error ? Object.getOwnPropertyNames(payload) : null, 4);
|
|
75419
75419
|
}
|
|
75420
|
-
fs$
|
|
75420
|
+
fs$6.writeFile(path$8.join(targetFolder, filename), data, () => {});
|
|
75421
75421
|
}
|
|
75422
75422
|
const coloringSend = opts.colors && opts.colors.send ? opts.colors.send.split(".").reduce((a, b) => a[b] || a()[b], kleur) : (s) => s;
|
|
75423
75423
|
const coloringReceive = opts.colors && opts.colors.receive ? opts.colors.receive.split(".").reduce((a, b) => a[b] || a()[b], kleur) : (s) => s;
|
|
@@ -75428,7 +75428,7 @@ var require_transit_logger = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
75428
75428
|
logger = opts.logger || broker.getLogger("debug");
|
|
75429
75429
|
nodeID = broker.nodeID;
|
|
75430
75430
|
if (opts.folder) {
|
|
75431
|
-
targetFolder = path$
|
|
75431
|
+
targetFolder = path$8.join(opts.folder, nodeID);
|
|
75432
75432
|
makeDirs(targetFolder);
|
|
75433
75433
|
}
|
|
75434
75434
|
logFn = opts.logLevel ? logger[opts.logLevel] : null;
|
|
@@ -75465,8 +75465,8 @@ var require_transit_logger = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
75465
75465
|
var require_action_logger = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
75466
75466
|
var _ = require_lodash();
|
|
75467
75467
|
var kleur = require_kleur();
|
|
75468
|
-
var fs$
|
|
75469
|
-
var path$
|
|
75468
|
+
var fs$5 = __require("fs");
|
|
75469
|
+
var path$7 = __require("path");
|
|
75470
75470
|
var { makeDirs, match, isObject, safetyObject } = require_utils$3();
|
|
75471
75471
|
module.exports = function ActionLoggerMiddleware(opts) {
|
|
75472
75472
|
opts = _.defaultsDeep(opts, {
|
|
@@ -75495,7 +75495,7 @@ var require_action_logger = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
75495
75495
|
} catch {
|
|
75496
75496
|
data = JSON.stringify(safetyObject(payload), payload instanceof Error ? Object.getOwnPropertyNames(payload) : null, 4);
|
|
75497
75497
|
}
|
|
75498
|
-
fs$
|
|
75498
|
+
fs$5.writeFile(path$7.join(targetFolder, filename), data, () => {});
|
|
75499
75499
|
}
|
|
75500
75500
|
function isWhiteListed(actionName) {
|
|
75501
75501
|
return !!opts.whitelist.find((pattern) => match(actionName, pattern));
|
|
@@ -75510,7 +75510,7 @@ var require_action_logger = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
75510
75510
|
logger = opts.logger || broker.getLogger("debug");
|
|
75511
75511
|
nodeID = broker.nodeID;
|
|
75512
75512
|
if (opts.folder) {
|
|
75513
|
-
targetFolder = path$
|
|
75513
|
+
targetFolder = path$7.join(opts.folder, nodeID);
|
|
75514
75514
|
makeDirs(targetFolder);
|
|
75515
75515
|
}
|
|
75516
75516
|
logFn = opts.logLevel ? logger[opts.logLevel] : null;
|
|
@@ -78712,7 +78712,7 @@ var require_service_broker = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
78712
78712
|
var EventEmitter2 = require_eventemitter2().EventEmitter2;
|
|
78713
78713
|
var _ = require_lodash();
|
|
78714
78714
|
var { globSync } = require_index_min$1();
|
|
78715
|
-
var path$
|
|
78715
|
+
var path$6 = __require("path");
|
|
78716
78716
|
var { format } = __require("util");
|
|
78717
78717
|
var Transit = require_transit();
|
|
78718
78718
|
var Registry = require_registry();
|
|
@@ -79261,7 +79261,7 @@ var require_service_broker = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
79261
79261
|
loadServices(folder = "./services", fileMask = "**/*.service.js") {
|
|
79262
79262
|
this.logger.debug(`Search services in '${folder}/${fileMask}'...`);
|
|
79263
79263
|
let serviceFiles;
|
|
79264
|
-
if (Array.isArray(fileMask)) serviceFiles = fileMask.map((f) => path$
|
|
79264
|
+
if (Array.isArray(fileMask)) serviceFiles = fileMask.map((f) => path$6.join(folder, f));
|
|
79265
79265
|
else serviceFiles = globSync(folder + "/" + fileMask);
|
|
79266
79266
|
if (serviceFiles) serviceFiles.forEach((filename) => this.loadService(filename));
|
|
79267
79267
|
return serviceFiles.length;
|
|
@@ -79277,8 +79277,8 @@ var require_service_broker = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
79277
79277
|
loadService(filePath) {
|
|
79278
79278
|
let fName, schema;
|
|
79279
79279
|
try {
|
|
79280
|
-
fName = __require.resolve(path$
|
|
79281
|
-
this.logger.debug(`Load service '${path$
|
|
79280
|
+
fName = __require.resolve(path$6.resolve(filePath));
|
|
79281
|
+
this.logger.debug(`Load service '${path$6.basename(fName)}'...`);
|
|
79282
79282
|
const r = __require(fName);
|
|
79283
79283
|
schema = r.default != null ? r.default : r;
|
|
79284
79284
|
let svc;
|
|
@@ -82261,7 +82261,7 @@ var require_leven = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82261
82261
|
//#region ../../node_modules/args/lib/utils.js
|
|
82262
82262
|
var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
82263
82263
|
var { spawn } = __require("child_process");
|
|
82264
|
-
var path$
|
|
82264
|
+
var path$5 = __require("path");
|
|
82265
82265
|
var camelcase = require_camelcase();
|
|
82266
82266
|
var leven = require_leven();
|
|
82267
82267
|
function similarityBestMatch(mainString, targetStrings) {
|
|
@@ -82422,10 +82422,10 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82422
82422
|
break;
|
|
82423
82423
|
}
|
|
82424
82424
|
if (process.platform === "win32") {
|
|
82425
|
-
const binaryExt = path$
|
|
82425
|
+
const binaryExt = path$5.extname(this.binary);
|
|
82426
82426
|
const mainModule = process.env.APPVEYOR ? "_fixture" : process.mainModule.filename;
|
|
82427
82427
|
full = `${mainModule}-${subCommand}`;
|
|
82428
|
-
if (path$
|
|
82428
|
+
if (path$5.extname(this.binary)) full = `${mainModule.replace(binaryExt, "")}-${subCommand}${binaryExt}`;
|
|
82429
82429
|
args.unshift(full);
|
|
82430
82430
|
this.child = spawn(process.execPath, args, { stdio: "inherit" });
|
|
82431
82431
|
} else this.child = spawn(full, args, { stdio: "inherit" });
|
|
@@ -82618,7 +82618,7 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82618
82618
|
//#endregion
|
|
82619
82619
|
//#region ../../node_modules/args/lib/parse.js
|
|
82620
82620
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
82621
|
-
var path$
|
|
82621
|
+
var path$4 = __require("path");
|
|
82622
82622
|
var parser = require_lib$1();
|
|
82623
82623
|
module.exports = function(argv, options) {
|
|
82624
82624
|
Object.assign(this.config, options);
|
|
@@ -82633,7 +82633,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82633
82633
|
}
|
|
82634
82634
|
else this.printSubColor = this.printSubColor[this.config.subColor];
|
|
82635
82635
|
this.raw = parser(argv.slice(1), this.config.mri || this.config.minimist);
|
|
82636
|
-
this.binary = path$
|
|
82636
|
+
this.binary = path$4.basename(this.raw._[0]);
|
|
82637
82637
|
if (this.config.version) this.checkVersion();
|
|
82638
82638
|
if (this.config.help) this.checkHelp();
|
|
82639
82639
|
const subCommand = this.raw._[1];
|
|
@@ -82718,8 +82718,8 @@ var require_help = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82718
82718
|
//#endregion
|
|
82719
82719
|
//#region ../../node_modules/args/lib/version.js
|
|
82720
82720
|
var require_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
82721
|
-
var fs$
|
|
82722
|
-
var path$
|
|
82721
|
+
var fs$4 = __require("fs");
|
|
82722
|
+
var path$3 = __require("path");
|
|
82723
82723
|
/**
|
|
82724
82724
|
* Retrieves the main module package.json information.
|
|
82725
82725
|
*
|
|
@@ -82730,13 +82730,13 @@ var require_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82730
82730
|
* An object containing the package.json contents or NULL if it could not be found.
|
|
82731
82731
|
*/
|
|
82732
82732
|
function findPackage(directory) {
|
|
82733
|
-
const file = path$
|
|
82734
|
-
if (fs$
|
|
82735
|
-
const parent = path$
|
|
82733
|
+
const file = path$3.resolve(directory, "package.json");
|
|
82734
|
+
if (fs$4.existsSync(file) && fs$4.statSync(file).isFile()) return __require(file);
|
|
82735
|
+
const parent = path$3.resolve(directory, "..");
|
|
82736
82736
|
return parent === directory ? null : findPackage(parent);
|
|
82737
82737
|
}
|
|
82738
82738
|
module.exports = function() {
|
|
82739
|
-
const pkg = findPackage(path$
|
|
82739
|
+
const pkg = findPackage(path$3.dirname(process.mainModule.filename));
|
|
82740
82740
|
const version = pkg && pkg.version || "-/-";
|
|
82741
82741
|
console.log(version);
|
|
82742
82742
|
if (this.config.exit && this.config.exit.version) process.exit();
|
|
@@ -82793,8 +82793,8 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82793
82793
|
//#endregion
|
|
82794
82794
|
//#region ../../node_modules/dotenv/lib/main.js
|
|
82795
82795
|
var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
82796
|
-
var fs$
|
|
82797
|
-
var path$
|
|
82796
|
+
var fs$3 = __require("fs");
|
|
82797
|
+
var path$2 = __require("path");
|
|
82798
82798
|
var os$3 = __require("os");
|
|
82799
82799
|
var crypto = __require("crypto");
|
|
82800
82800
|
var TIPS = [
|
|
@@ -82921,14 +82921,14 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82921
82921
|
function _vaultPath(options) {
|
|
82922
82922
|
let possibleVaultPath = null;
|
|
82923
82923
|
if (options && options.path && options.path.length > 0) if (Array.isArray(options.path)) {
|
|
82924
|
-
for (const filepath of options.path) if (fs$
|
|
82924
|
+
for (const filepath of options.path) if (fs$3.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
|
|
82925
82925
|
} else possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
82926
|
-
else possibleVaultPath = path$
|
|
82927
|
-
if (fs$
|
|
82926
|
+
else possibleVaultPath = path$2.resolve(process.cwd(), ".env.vault");
|
|
82927
|
+
if (fs$3.existsSync(possibleVaultPath)) return possibleVaultPath;
|
|
82928
82928
|
return null;
|
|
82929
82929
|
}
|
|
82930
82930
|
function _resolveHome(envPath) {
|
|
82931
|
-
return envPath[0] === "~" ? path$
|
|
82931
|
+
return envPath[0] === "~" ? path$2.join(os$3.homedir(), envPath.slice(1)) : envPath;
|
|
82932
82932
|
}
|
|
82933
82933
|
function _configVault(options) {
|
|
82934
82934
|
const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
|
|
@@ -82941,7 +82941,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82941
82941
|
return { parsed };
|
|
82942
82942
|
}
|
|
82943
82943
|
function configDotenv(options) {
|
|
82944
|
-
const dotenvPath = path$
|
|
82944
|
+
const dotenvPath = path$2.resolve(process.cwd(), ".env");
|
|
82945
82945
|
let encoding = "utf8";
|
|
82946
82946
|
let processEnv = process.env;
|
|
82947
82947
|
if (options && options.processEnv != null) processEnv = options.processEnv;
|
|
@@ -82958,7 +82958,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82958
82958
|
let lastError;
|
|
82959
82959
|
const parsedAll = {};
|
|
82960
82960
|
for (const path of optionPaths) try {
|
|
82961
|
-
const parsed = DotenvModule.parse(fs$
|
|
82961
|
+
const parsed = DotenvModule.parse(fs$3.readFileSync(path, { encoding }));
|
|
82962
82962
|
DotenvModule.populate(parsedAll, parsed, options);
|
|
82963
82963
|
} catch (e) {
|
|
82964
82964
|
if (debug) _debug(`failed to load ${path} ${e.message}`);
|
|
@@ -82971,7 +82971,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82971
82971
|
const keysCount = Object.keys(populated).length;
|
|
82972
82972
|
const shortPaths = [];
|
|
82973
82973
|
for (const filePath of optionPaths) try {
|
|
82974
|
-
const relative = path$
|
|
82974
|
+
const relative = path$2.relative(process.cwd(), filePath);
|
|
82975
82975
|
shortPaths.push(relative);
|
|
82976
82976
|
} catch (e) {
|
|
82977
82977
|
if (debug) _debug(`failed to load ${filePath} ${e.message}`);
|
|
@@ -83070,8 +83070,8 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
83070
83070
|
*/
|
|
83071
83071
|
var ServiceBroker = require_service_broker();
|
|
83072
83072
|
var utils = require_utils$3();
|
|
83073
|
-
var fs$
|
|
83074
|
-
var path$
|
|
83073
|
+
var fs$2 = __require("fs");
|
|
83074
|
+
var path$1 = __require("path");
|
|
83075
83075
|
var { globSync } = require_index_min$1();
|
|
83076
83076
|
var inspect = __require("util").inspect;
|
|
83077
83077
|
var _ = require_lodash();
|
|
@@ -83199,17 +83199,17 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
83199
83199
|
let filePath;
|
|
83200
83200
|
const configPath = process.env["MOLECULER_CONFIG"] || this.flags.config;
|
|
83201
83201
|
if (configPath != null) {
|
|
83202
|
-
if (path$
|
|
83202
|
+
if (path$1.isAbsolute(configPath)) filePath = this.tryConfigPath(configPath);
|
|
83203
83203
|
else {
|
|
83204
|
-
filePath = this.tryConfigPath(path$
|
|
83204
|
+
filePath = this.tryConfigPath(path$1.resolve(process.cwd(), configPath));
|
|
83205
83205
|
if (filePath == null) filePath = this.tryConfigPath(configPath, true);
|
|
83206
83206
|
}
|
|
83207
83207
|
if (filePath == null) return Promise.reject(/* @__PURE__ */ new Error(`Config file not found: ${configPath}`));
|
|
83208
83208
|
}
|
|
83209
|
-
if (filePath == null) filePath = this.tryConfigPath(path$
|
|
83210
|
-
if (filePath == null) filePath = this.tryConfigPath(path$
|
|
83209
|
+
if (filePath == null) filePath = this.tryConfigPath(path$1.resolve(process.cwd(), "moleculer.config.js"));
|
|
83210
|
+
if (filePath == null) filePath = this.tryConfigPath(path$1.resolve(process.cwd(), "moleculer.config.json"));
|
|
83211
83211
|
if (filePath == null) return Promise.resolve({});
|
|
83212
|
-
const ext = path$
|
|
83212
|
+
const ext = path$1.extname(filePath);
|
|
83213
83213
|
switch (ext) {
|
|
83214
83214
|
case ".json":
|
|
83215
83215
|
case ".js":
|
|
@@ -83295,7 +83295,7 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
83295
83295
|
*/
|
|
83296
83296
|
isDirectory(p) {
|
|
83297
83297
|
try {
|
|
83298
|
-
return fs$
|
|
83298
|
+
return fs$2.lstatSync(p).isDirectory();
|
|
83299
83299
|
} catch {}
|
|
83300
83300
|
return false;
|
|
83301
83301
|
}
|
|
@@ -83307,7 +83307,7 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
83307
83307
|
*/
|
|
83308
83308
|
isServiceFile(p) {
|
|
83309
83309
|
try {
|
|
83310
|
-
return !fs$
|
|
83310
|
+
return !fs$2.lstatSync(p).isDirectory();
|
|
83311
83311
|
} catch {}
|
|
83312
83312
|
return false;
|
|
83313
83313
|
}
|
|
@@ -83332,7 +83332,7 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
83332
83332
|
this.watchFolders.length = 0;
|
|
83333
83333
|
const fileMask = this.flags.mask || "**/*.service.js";
|
|
83334
83334
|
const serviceDir = process.env.SERVICEDIR || "";
|
|
83335
|
-
const svcDir = path$
|
|
83335
|
+
const svcDir = path$1.isAbsolute(serviceDir) ? serviceDir : path$1.resolve(process.cwd(), serviceDir);
|
|
83336
83336
|
let patterns = this.servicePaths;
|
|
83337
83337
|
if (process.env.SERVICES || process.env.SERVICEDIR) {
|
|
83338
83338
|
if (this.isDirectory(svcDir) && !process.env.SERVICES) {
|
|
@@ -83348,7 +83348,7 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
83348
83348
|
if (p.startsWith("npm:")) this.loadNpmModule(p.slice(4));
|
|
83349
83349
|
else {
|
|
83350
83350
|
let files;
|
|
83351
|
-
const svcPath = path$
|
|
83351
|
+
const svcPath = path$1.isAbsolute(p) ? p : path$1.resolve(svcDir, p);
|
|
83352
83352
|
if (this.isDirectory(svcPath)) {
|
|
83353
83353
|
if (this.config.hotReload) this.watchFolders.push(svcPath);
|
|
83354
83354
|
files = globSync(svcPath + "/" + fileMask, { absolute: true });
|
|
@@ -83520,12 +83520,12 @@ var Gt = (n, t, e) => {
|
|
|
83520
83520
|
}
|
|
83521
83521
|
return h;
|
|
83522
83522
|
};
|
|
83523
|
-
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$
|
|
83523
|
+
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$1 = /\\,/g, us = /\\./g, ds = 1e5;
|
|
83524
83524
|
function Ht(n) {
|
|
83525
83525
|
return isNaN(n) ? n.charCodeAt(0) : parseInt(n, 10);
|
|
83526
83526
|
}
|
|
83527
83527
|
function ps(n) {
|
|
83528
|
-
return n.replace(as, fe).replace(ls, ue).replace(cs, qt).replace(fs$
|
|
83528
|
+
return n.replace(as, fe).replace(ls, ue).replace(cs, qt).replace(fs$1, de).replace(us, pe);
|
|
83529
83529
|
}
|
|
83530
83530
|
function ms(n) {
|
|
83531
83531
|
return n.replace(is, "\\").replace(rs, "{").replace(ns, "}").replace(os$1, ",").replace(hs, ".");
|
|
@@ -86448,7 +86448,7 @@ var Li = (n, t) => typeof n == "string" ? new ot([n], t) : Array.isArray(n) ? ne
|
|
|
86448
86448
|
return this.path.isUnknown() && this.path.lstatSync(), this.walkCBSync(this.path, this.patterns, () => this.results.end()), this.results;
|
|
86449
86449
|
}
|
|
86450
86450
|
};
|
|
86451
|
-
var Pi = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux", I = class {
|
|
86451
|
+
var Pi = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux", I$1 = class {
|
|
86452
86452
|
absolute;
|
|
86453
86453
|
cwd;
|
|
86454
86454
|
root;
|
|
@@ -86573,22 +86573,22 @@ var le = (n, t = {}) => {
|
|
|
86573
86573
|
return !1;
|
|
86574
86574
|
};
|
|
86575
86575
|
function Bt(n, t = {}) {
|
|
86576
|
-
return new I(n, t).streamSync();
|
|
86576
|
+
return new I$1(n, t).streamSync();
|
|
86577
86577
|
}
|
|
86578
86578
|
function Qe(n, t = {}) {
|
|
86579
|
-
return new I(n, t).stream();
|
|
86579
|
+
return new I$1(n, t).stream();
|
|
86580
86580
|
}
|
|
86581
86581
|
function ts(n, t = {}) {
|
|
86582
|
-
return new I(n, t).walkSync();
|
|
86582
|
+
return new I$1(n, t).walkSync();
|
|
86583
86583
|
}
|
|
86584
86584
|
async function Je(n, t = {}) {
|
|
86585
|
-
return new I(n, t).walk();
|
|
86585
|
+
return new I$1(n, t).walk();
|
|
86586
86586
|
}
|
|
86587
86587
|
function Ut(n, t = {}) {
|
|
86588
|
-
return new I(n, t).iterateSync();
|
|
86588
|
+
return new I$1(n, t).iterateSync();
|
|
86589
86589
|
}
|
|
86590
86590
|
function es(n, t = {}) {
|
|
86591
|
-
return new I(n, t).iterate();
|
|
86591
|
+
return new I$1(n, t).iterate();
|
|
86592
86592
|
}
|
|
86593
86593
|
var ji = Bt, Ii = Object.assign(Qe, { sync: Bt }), zi = Ut, Bi = Object.assign(es, { sync: Ut }), Ui = Object.assign(ts, {
|
|
86594
86594
|
stream: Bt,
|
|
@@ -86605,7 +86605,7 @@ var ji = Bt, Ii = Object.assign(Qe, { sync: Bt }), zi = Ut, Bi = Object.assign(e
|
|
|
86605
86605
|
iterate: Bi,
|
|
86606
86606
|
globIterateSync: Ut,
|
|
86607
86607
|
iterateSync: zi,
|
|
86608
|
-
Glob: I,
|
|
86608
|
+
Glob: I$1,
|
|
86609
86609
|
hasMagic: le,
|
|
86610
86610
|
escape: tt,
|
|
86611
86611
|
unescape: W
|