@camstack/system 1.2.396 → 1.2.397

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.
@@ -1,7 +1,7 @@
1
1
  import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
2
2
  import { Br as makeSecretMarker, Dr as customAction, Lr as isSecretClear, Nr as hydrateSchema, Or as defineCustomActions, Qr as secretTreeFromSchema, Rr as isSecretMarker, dr as BaseAddon, ni as transformSecretWrite, ur as errMsg } from "../../dist-0P1gm4Gd.mjs";
3
3
  import { n as require_safe_buffer, t as require_ms } from "../../ms-DlIWNkkk.mjs";
4
- import { a as MESH_CA_FIELD, c as MESH_CA_VALIDITY_DAYS, f as CLUSTER_SECRET_REF, i as MESH_CA_COMMON_NAME, l as MESH_JOIN_TOKEN_MAX_TTL_SEC, n as DEFAULT_HUB_TCP_PORT, o as MESH_CA_KEY_REF, r as DEFAULT_HUB_TLS_TCP_PORT, s as MESH_CA_SETTINGS_KEY, t as CLIENT_AUTH_OID, u as SERVER_AUTH_OID, x as setProcessClusterSecretGate, y as hashClusterSecret } from "../../constants-C1WoQ0E8.mjs";
4
+ import { a as MESH_CA_KEY_REF, b as setProcessClusterSecretGate, c as MESH_JOIN_TOKEN_MAX_TTL_SEC, d as CLUSTER_SECRET_REF, i as MESH_CA_FIELD, l as SERVER_AUTH_OID, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID, v as hashClusterSecret } from "../../constants-5vADty9I.mjs";
5
5
  import { a as KeyUsagesExtension, c as Pkcs10CertificateRequestGenerator, d as X509Certificate$1, f as X509CertificateGenerator, i as KeyUsageFlags, n as BasicConstraintsExtension, o as PemConverter, p as cryptoProvider, r as ExtendedKeyUsageExtension, s as Pkcs10CertificateRequest, t as AuthorityKeyIdentifierExtension, u as SubjectKeyIdentifierExtension } from "../../x509.es-Xf3K_brW.mjs";
6
6
  import { z } from "zod";
7
7
  import { X509Certificate, createHash, createHmac, randomBytes, timingSafeEqual, webcrypto } from "node:crypto";
@@ -598,67 +598,23 @@ function processMeshCrl() {
598
598
  return crl;
599
599
  }
600
600
  //#endregion
601
- //#region src/kernel/moleculer/mesh-mtls/mesh-clear-port.ts
602
- /** The field key inside the `cluster` section. */
603
- var MESH_CLEAR_PORT_FIELD = "meshClearPort";
604
- function isMeshClearPortMode(value) {
605
- return value === "on" || value === "off";
606
- }
607
- /** A stored value that is not a mode reads as `on`: never cut the mesh on a typo. */
608
- function parseMeshClearPortMode(value) {
609
- return isMeshClearPortMode(value) ? value : "on";
610
- }
611
- /** Pure: may the clear port be switched off right now? */
612
- function decideMeshClearPortOff(control) {
613
- if (control === null) return {
614
- allowed: false,
615
- blocking: [],
616
- error: "The clear mesh port can only be switched off on the hub (no mesh transport here)."
617
- };
618
- if (!control.isTlsListening()) return {
619
- allowed: false,
620
- blocking: [],
621
- error: "Refusing to close the clear mesh port: the TLS listener (:6443) is not up yet, so no node could reach the hub."
622
- };
623
- const blocking = control.listOnlineAgents().filter((agent) => agent.transport !== "tls").map((agent) => agent.nodeId).toSorted();
624
- if (blocking.length > 0) return {
625
- allowed: false,
626
- blocking,
627
- error: `Refusing to close the clear mesh port: ${blocking.join(", ")} still ${blocking.length === 1 ? "connects" : "connect"} in clear. Enroll ${blocking.length === 1 ? "it" : "each"} with a join token first (System → Cluster → Add agent).`
628
- };
629
- return { allowed: true };
601
+ //#region src/kernel/moleculer/mesh-mtls/mesh-peer-transport.ts
602
+ var LOOKUP_SLOT = Symbol.for("camstack.cluster.mesh-peer-transport-lookup");
603
+ /** Published by the hub broker owner; cleared on shutdown. */
604
+ function setProcessMeshPeerTransportLookup(lookup) {
605
+ if (lookup === null) Reflect.deleteProperty(globalThis, LOOKUP_SLOT);
606
+ else Reflect.set(globalThis, LOOKUP_SLOT, lookup);
630
607
  }
631
- var CONTROL_SLOT = Symbol.for("camstack.cluster.mesh-clear-port-control");
632
- /** Published by the hub's broker owner; cleared on shutdown. */
633
- function setProcessMeshClearPortControl(control) {
634
- if (control === null) Reflect.deleteProperty(globalThis, CONTROL_SLOT);
635
- else Reflect.set(globalThis, CONTROL_SLOT, control);
608
+ function isMeshPeerTransportLookup(value) {
609
+ return value !== null && typeof value === "object" && typeof Reflect.get(value, "transportOf") === "function";
636
610
  }
637
- function isMeshClearPortControl(value) {
638
- return value !== null && typeof value === "object" && typeof Reflect.get(value, "listOnlineAgents") === "function" && typeof Reflect.get(value, "isTlsListening") === "function" && typeof Reflect.get(value, "apply") === "function" && typeof Reflect.get(value, "transportOf") === "function";
639
- }
640
- function getProcessMeshClearPortControl() {
641
- const value = Reflect.get(globalThis, CONTROL_SLOT);
642
- return isMeshClearPortControl(value) ? value : null;
611
+ function getProcessMeshPeerTransportLookup() {
612
+ const value = Reflect.get(globalThis, LOOKUP_SLOT);
613
+ return isMeshPeerTransportLookup(value) ? value : null;
643
614
  }
644
615
  /** `tls` / `clear` for an agent as the hub sees it; `undefined` off the hub. */
645
616
  function getProcessNodeMeshTransport(nodeId) {
646
- return getProcessMeshClearPortControl()?.transportOf(nodeId);
647
- }
648
- /**
649
- * Validate a requested mode against the live mesh. `on` is always allowed; `off`
650
- * only when {@link decideMeshClearPortOff} allows. Does NOT apply it.
651
- */
652
- function checkProcessMeshClearPort(mode) {
653
- if (mode === "on") return { allowed: true };
654
- return decideMeshClearPortOff(getProcessMeshClearPortControl());
655
- }
656
- /** Apply a mode that {@link checkProcessMeshClearPort} allowed. No-op where nobody can. */
657
- async function applyProcessMeshClearPort(mode) {
658
- const control = getProcessMeshClearPortControl();
659
- if (control === null) return false;
660
- await control.apply(mode);
661
- return true;
617
+ return getProcessMeshPeerTransportLookup()?.transportOf(nodeId);
662
618
  }
663
619
  //#endregion
664
620
  //#region ../../node_modules/jose/dist/webapi/lib/buffer_utils.js
@@ -21506,8 +21462,8 @@ var require_kleur = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21506
21462
  var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21507
21463
  var kleur = require_kleur();
21508
21464
  var os$17 = __require("os");
21509
- var path$39 = __require("path");
21510
- var fs$18 = __require("fs");
21465
+ var path$40 = __require("path");
21466
+ var fs$19 = __require("fs");
21511
21467
  var { TimeoutError } = require_errors$2();
21512
21468
  var lut = [];
21513
21469
  for (let i = 0; i < 256; i++) lut[i] = (i < 16 ? "0" : "") + i.toString(16);
@@ -21798,9 +21754,9 @@ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21798
21754
  * @param {String} p - directory path
21799
21755
  */
21800
21756
  makeDirs(p) {
21801
- p.split(path$39.sep).reduce((prevPath, folder) => {
21802
- const currentPath = path$39.join(prevPath, folder, path$39.sep);
21803
- if (!fs$18.existsSync(currentPath)) fs$18.mkdirSync(currentPath);
21757
+ p.split(path$40.sep).reduce((prevPath, folder) => {
21758
+ const currentPath = path$40.join(prevPath, folder, path$40.sep);
21759
+ if (!fs$19.existsSync(currentPath)) fs$19.mkdirSync(currentPath);
21804
21760
  return currentPath;
21805
21761
  }, "");
21806
21762
  },
@@ -23025,8 +22981,8 @@ var require_csv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
23025
22981
  var BaseReporter = require_base$8();
23026
22982
  var { makeDirs } = require_utils$3();
23027
22983
  var _ = require_lodash();
23028
- var path$38 = __require("path");
23029
- var fs$17 = __require("fs");
22984
+ var path$39 = __require("path");
22985
+ var fs$18 = __require("fs");
23030
22986
  var METRIC = require_constants$6();
23031
22987
  var MODE_METRIC = "metric";
23032
22988
  var MODE_LABEL = "label";
@@ -23079,7 +23035,7 @@ var require_csv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
23079
23035
  this.timer = setInterval(() => this.flush(), this.opts.interval * 1e3);
23080
23036
  this.timer.unref();
23081
23037
  }
23082
- this.folder = path$38.resolve(this.opts.folder);
23038
+ this.folder = path$39.resolve(this.opts.folder);
23083
23039
  makeDirs(this.folder);
23084
23040
  }
23085
23041
  /**
@@ -23104,10 +23060,10 @@ var require_csv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
23104
23060
  const metricName = this.formatMetricName(metric.name);
23105
23061
  if (this.opts.filenameFormatter) return this.opts.filenameFormatter.call(this, metricName, metric, item);
23106
23062
  switch (this.opts.mode) {
23107
- case MODE_METRIC: return path$38.join(this.folder, `${metricName}.csv`);
23063
+ case MODE_METRIC: return path$39.join(this.folder, `${metricName}.csv`);
23108
23064
  case MODE_LABEL: {
23109
23065
  const labelStr = this.labelsToStr(item.labels);
23110
- return path$38.join(this.folder, metricName, `${metricName}${labelStr ? "--" + labelStr : ""}.csv`);
23066
+ return path$39.join(this.folder, metricName, `${metricName}${labelStr ? "--" + labelStr : ""}.csv`);
23111
23067
  }
23112
23068
  }
23113
23069
  }
@@ -23128,7 +23084,7 @@ var require_csv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
23128
23084
  metric.values.forEach((item) => {
23129
23085
  if (!this.lastChanges.has([metric.name, this.labelsToStr(item.labels)].join("|"))) return;
23130
23086
  const filename = this.getFilename(metric, item);
23131
- makeDirs(path$38.dirname(filename));
23087
+ makeDirs(path$39.dirname(filename));
23132
23088
  const metricName = this.formatMetricName(metric.name);
23133
23089
  let headers = ["Timestamp", "Metric"];
23134
23090
  let data = [item.timestamp, metricName];
@@ -23185,8 +23141,8 @@ var require_csv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
23185
23141
  */
23186
23142
  writeRow(filename, headers, fields) {
23187
23143
  try {
23188
- if (!fs$17.existsSync(filename)) fs$17.writeFileSync(filename, headers.join(this.opts.delimiter) + this.opts.rowDelimiter);
23189
- fs$17.appendFileSync(filename, fields.join(this.opts.delimiter) + this.opts.rowDelimiter);
23144
+ if (!fs$18.existsSync(filename)) fs$18.writeFileSync(filename, headers.join(this.opts.delimiter) + this.opts.rowDelimiter);
23145
+ fs$18.appendFileSync(filename, fields.join(this.opts.delimiter) + this.opts.rowDelimiter);
23190
23146
  } catch (err) {
23191
23147
  /* istanbul ignore next */
23192
23148
  this.logger.error(`Unable to write metrics values to the '${filename}' file. Error: ${err.message}`, fields, err);
@@ -26258,7 +26214,7 @@ var require_latency = /* @__PURE__ */ __commonJSMin(((exports, module) => {
26258
26214
  //#region ../../node_modules/lru-cache/dist/commonjs/node/index.min.js
26259
26215
  var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
26260
26216
  var j = (c, t) => () => (t || c((t = { exports: {} }).exports, t), t.exports);
26261
- var I$2 = j((O) => {
26217
+ var I$1 = j((O) => {
26262
26218
  "use strict";
26263
26219
  Object.defineProperty(O, "__esModule", { value: !0 });
26264
26220
  O.tracing = O.metrics = void 0;
@@ -26274,7 +26230,7 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
26274
26230
  });
26275
26231
  Object.defineProperty(exports, "__esModule", { value: !0 });
26276
26232
  exports.LRUCache = void 0;
26277
- 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) => {
26233
+ var g = I$1(), N = P(), C = () => g.metrics.hasSubscribers || g.tracing.hasSubscribers, k = /* @__PURE__ */ new Set(), G = typeof process == "object" && process ? process : {}, V = (c, t, e, i) => {
26278
26234
  typeof G.emitWarning == "function" ? G.emitWarning(c, t, e, i) : console.error(`[${e}] ${t}: ${c}`);
26279
26235
  }, q = (c) => !k.has(c);
26280
26236
  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 {
@@ -31218,7 +31174,7 @@ var require_process$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
31218
31174
  //#endregion
31219
31175
  //#region ../../node_modules/detect-libc/lib/filesystem.js
31220
31176
  var require_filesystem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
31221
- var fs$16 = __require("fs");
31177
+ var fs$17 = __require("fs");
31222
31178
  var LDD_PATH = "/usr/bin/ldd";
31223
31179
  var SELF_PATH = "/proc/self/exe";
31224
31180
  var MAX_LENGTH = 2048;
@@ -31229,10 +31185,10 @@ var require_filesystem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
31229
31185
  * @returns {Buffer}
31230
31186
  */
31231
31187
  var readFileSync = (path) => {
31232
- const fd = fs$16.openSync(path, "r");
31188
+ const fd = fs$17.openSync(path, "r");
31233
31189
  const buffer = Buffer.alloc(MAX_LENGTH);
31234
- const bytesRead = fs$16.readSync(fd, buffer, 0, MAX_LENGTH, 0);
31235
- fs$16.close(fd, () => {});
31190
+ const bytesRead = fs$17.readSync(fd, buffer, 0, MAX_LENGTH, 0);
31191
+ fs$17.close(fd, () => {});
31236
31192
  return buffer.subarray(0, bytesRead);
31237
31193
  };
31238
31194
  /**
@@ -31242,13 +31198,13 @@ var require_filesystem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
31242
31198
  * @returns {Promise<Buffer>}
31243
31199
  */
31244
31200
  var readFile = (path) => new Promise((resolve, reject) => {
31245
- fs$16.open(path, "r", (err, fd) => {
31201
+ fs$17.open(path, "r", (err, fd) => {
31246
31202
  if (err) reject(err);
31247
31203
  else {
31248
31204
  const buffer = Buffer.alloc(MAX_LENGTH);
31249
- fs$16.read(fd, buffer, 0, MAX_LENGTH, 0, (_, bytesRead) => {
31205
+ fs$17.read(fd, buffer, 0, MAX_LENGTH, 0, (_, bytesRead) => {
31250
31206
  resolve(buffer.subarray(0, bytesRead));
31251
- fs$16.close(fd, () => {});
31207
+ fs$17.close(fd, () => {});
31252
31208
  });
31253
31209
  }
31254
31210
  });
@@ -31501,8 +31457,8 @@ var require_detect_libc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
31501
31457
  //#endregion
31502
31458
  //#region ../../node_modules/node-gyp-build-optional-packages/index.js
31503
31459
  var require_node_gyp_build_optional_packages = /* @__PURE__ */ __commonJSMin(((exports, module) => {
31504
- var fs$15 = __require("fs");
31505
- var path$37 = __require("path");
31460
+ var fs$16 = __require("fs");
31461
+ var path$38 = __require("path");
31506
31462
  var url$2 = __require("url");
31507
31463
  var vars = process.config && process.config.variables || {};
31508
31464
  var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
@@ -31521,27 +31477,27 @@ var require_node_gyp_build_optional_packages = /* @__PURE__ */ __commonJSMin(((e
31521
31477
  else return __require(load.path(dir));
31522
31478
  }
31523
31479
  load.path = function(dir) {
31524
- dir = path$37.resolve(dir || ".");
31480
+ dir = path$38.resolve(dir || ".");
31525
31481
  var packageName = "";
31526
31482
  try {
31527
- if (typeof __webpack_require__ === "function") packageName = __non_webpack_require__(path$37.join(dir, "package.json")).name;
31528
- else packageName = __require(path$37.join(dir, "package.json")).name;
31483
+ if (typeof __webpack_require__ === "function") packageName = __non_webpack_require__(path$38.join(dir, "package.json")).name;
31484
+ else packageName = __require(path$38.join(dir, "package.json")).name;
31529
31485
  var varName = packageName.toUpperCase().replace(/-/g, "_") + "_PREBUILD";
31530
31486
  if (process.env[varName]) dir = process.env[varName];
31531
31487
  } catch (err) {}
31532
31488
  if (!prebuildsOnly) {
31533
- var release = getFirst(path$37.join(dir, "build/Release"), matchBuild);
31489
+ var release = getFirst(path$38.join(dir, "build/Release"), matchBuild);
31534
31490
  if (release) return release;
31535
- var debug = getFirst(path$37.join(dir, "build/Debug"), matchBuild);
31491
+ var debug = getFirst(path$38.join(dir, "build/Debug"), matchBuild);
31536
31492
  if (debug) return debug;
31537
31493
  }
31538
31494
  var prebuild = resolve(dir);
31539
31495
  if (prebuild) return prebuild;
31540
- var nearby = resolve(path$37.dirname(process.execPath));
31496
+ var nearby = resolve(path$38.dirname(process.execPath));
31541
31497
  if (nearby) return nearby;
31542
31498
  var platformPackage = (packageName[0] == "@" ? "" : "@" + packageName + "/") + packageName + "-" + platform + "-" + arch;
31543
31499
  try {
31544
- return resolveFile(path$37.dirname(__require("module").createRequire(url$2.pathToFileURL(path$37.join(dir, "package.json"))).resolve(platformPackage)));
31500
+ return resolveFile(path$38.dirname(__require("module").createRequire(url$2.pathToFileURL(path$38.join(dir, "package.json"))).resolve(platformPackage)));
31545
31501
  } catch (error) {}
31546
31502
  var target = [
31547
31503
  "platform=" + platform,
@@ -31557,25 +31513,25 @@ var require_node_gyp_build_optional_packages = /* @__PURE__ */ __commonJSMin(((e
31557
31513
  ].filter(Boolean).join(" ");
31558
31514
  throw new Error("No native build was found for " + target + "\n attempted loading from: " + dir + " and package: " + platformPackage + "\n");
31559
31515
  function resolve(dir) {
31560
- var tuple = readdirSync(path$37.join(dir, "prebuilds")).map(parseTuple).filter(matchTuple(platform, arch)).sort(compareTuples)[0];
31516
+ var tuple = readdirSync(path$38.join(dir, "prebuilds")).map(parseTuple).filter(matchTuple(platform, arch)).sort(compareTuples)[0];
31561
31517
  if (!tuple) return;
31562
- return resolveFile(path$37.join(dir, "prebuilds", tuple.name));
31518
+ return resolveFile(path$38.join(dir, "prebuilds", tuple.name));
31563
31519
  }
31564
31520
  function resolveFile(prebuilds) {
31565
31521
  var winner = readdirSync(prebuilds).map(parseTags).filter(matchTags(runtime, abi)).sort(compareTags(runtime))[0];
31566
- if (winner) return path$37.join(prebuilds, winner.file);
31522
+ if (winner) return path$38.join(prebuilds, winner.file);
31567
31523
  }
31568
31524
  };
31569
31525
  function readdirSync(dir) {
31570
31526
  try {
31571
- return fs$15.readdirSync(dir);
31527
+ return fs$16.readdirSync(dir);
31572
31528
  } catch (err) {
31573
31529
  return [];
31574
31530
  }
31575
31531
  }
31576
31532
  function getFirst(dir, filter) {
31577
31533
  var files = readdirSync(dir).filter(filter);
31578
- return files[0] && path$37.join(dir, files[0]);
31534
+ return files[0] && path$38.join(dir, files[0]);
31579
31535
  }
31580
31536
  function matchBuild(name) {
31581
31537
  return /\.node$/.test(name);
@@ -37753,8 +37709,8 @@ var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
37753
37709
  var require_file$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
37754
37710
  var FormattedLogger = require_formatted();
37755
37711
  var _ = require_lodash();
37756
- var fs$14 = __require("fs/promises");
37757
- var path$36 = __require("path");
37712
+ var fs$15 = __require("fs/promises");
37713
+ var path$37 = __require("path");
37758
37714
  var os$10 = __require("os");
37759
37715
  var { makeDirs } = require_utils$3();
37760
37716
  /**
@@ -37800,7 +37756,7 @@ var require_file$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
37800
37756
  */
37801
37757
  init(loggerFactory) {
37802
37758
  super.init(loggerFactory);
37803
- this.logFolder = path$36.resolve(this.render(this.opts.folder, {
37759
+ this.logFolder = path$37.resolve(this.render(this.opts.folder, {
37804
37760
  nodeID: this.broker.nodeID,
37805
37761
  namespace: this.broker.namespace
37806
37762
  }));
@@ -37825,7 +37781,7 @@ var require_file$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
37825
37781
  */
37826
37782
  getFilename() {
37827
37783
  const date = (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
37828
- return path$36.join(this.logFolder, this.render(this.opts.filename, {
37784
+ return path$37.join(this.logFolder, this.render(this.opts.filename, {
37829
37785
  date,
37830
37786
  nodeID: this.broker.nodeID,
37831
37787
  namespace: this.broker.namespace
@@ -37857,7 +37813,7 @@ var require_file$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
37857
37813
  const rows = Array.from(this.queue);
37858
37814
  this.queue.length = 0;
37859
37815
  const buf = rows.join(this.opts.eol) + this.opts.eol;
37860
- return fs$14.appendFile(filename, buf).catch((err) => {
37816
+ return fs$15.appendFile(filename, buf).catch((err) => {
37861
37817
  /* istanbul ignore next */
37862
37818
  console.debug("Unable to write log file:", filename, err);
37863
37819
  });
@@ -38206,7 +38162,7 @@ var require_layouts = /* @__PURE__ */ __commonJSMin(((exports, module) => {
38206
38162
  var dateFormat = require_lib$5();
38207
38163
  var os$9 = __require("os");
38208
38164
  var util$3 = __require("util");
38209
- var path$35 = __require("path");
38165
+ var path$36 = __require("path");
38210
38166
  var styles = {
38211
38167
  bold: [1, 22],
38212
38168
  italic: [3, 23],
@@ -38372,8 +38328,8 @@ var require_layouts = /* @__PURE__ */ __commonJSMin(((exports, module) => {
38372
38328
  let filename = loggingEvent.fileName || "";
38373
38329
  if (specifier) {
38374
38330
  const fileDepth = parseInt(specifier, 10);
38375
- const fileList = filename.split(path$35.sep);
38376
- if (fileList.length > fileDepth) filename = fileList.slice(-fileDepth).join(path$35.sep);
38331
+ const fileList = filename.split(path$36.sep);
38332
+ if (fileList.length > fileDepth) filename = fileList.slice(-fileDepth).join(path$36.sep);
38377
38333
  }
38378
38334
  return filename;
38379
38335
  }
@@ -39375,7 +39331,7 @@ var require_clone = /* @__PURE__ */ __commonJSMin(((exports, module) => {
39375
39331
  //#endregion
39376
39332
  //#region ../../node_modules/graceful-fs/graceful-fs.js
39377
39333
  var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
39378
- var fs$13 = __require("fs");
39334
+ var fs$14 = __require("fs");
39379
39335
  var polyfills = require_polyfills();
39380
39336
  var legacy = require_legacy_streams();
39381
39337
  var clone = require_clone();
@@ -39404,36 +39360,36 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
39404
39360
  m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
39405
39361
  console.error(m);
39406
39362
  };
39407
- if (!fs$13[gracefulQueue]) {
39408
- publishQueue(fs$13, global[gracefulQueue] || []);
39409
- fs$13.close = (function(fs$close) {
39363
+ if (!fs$14[gracefulQueue]) {
39364
+ publishQueue(fs$14, global[gracefulQueue] || []);
39365
+ fs$14.close = (function(fs$close) {
39410
39366
  function close(fd, cb) {
39411
- return fs$close.call(fs$13, fd, function(err) {
39367
+ return fs$close.call(fs$14, fd, function(err) {
39412
39368
  if (!err) resetQueue();
39413
39369
  if (typeof cb === "function") cb.apply(this, arguments);
39414
39370
  });
39415
39371
  }
39416
39372
  Object.defineProperty(close, previousSymbol, { value: fs$close });
39417
39373
  return close;
39418
- })(fs$13.close);
39419
- fs$13.closeSync = (function(fs$closeSync) {
39374
+ })(fs$14.close);
39375
+ fs$14.closeSync = (function(fs$closeSync) {
39420
39376
  function closeSync(fd) {
39421
- fs$closeSync.apply(fs$13, arguments);
39377
+ fs$closeSync.apply(fs$14, arguments);
39422
39378
  resetQueue();
39423
39379
  }
39424
39380
  Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync });
39425
39381
  return closeSync;
39426
- })(fs$13.closeSync);
39382
+ })(fs$14.closeSync);
39427
39383
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) process.on("exit", function() {
39428
- debug(fs$13[gracefulQueue]);
39429
- __require("assert").equal(fs$13[gracefulQueue].length, 0);
39384
+ debug(fs$14[gracefulQueue]);
39385
+ __require("assert").equal(fs$14[gracefulQueue].length, 0);
39430
39386
  });
39431
39387
  }
39432
- if (!global[gracefulQueue]) publishQueue(global, fs$13[gracefulQueue]);
39433
- module.exports = patch(clone(fs$13));
39434
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$13.__patched) {
39435
- module.exports = patch(fs$13);
39436
- fs$13.__patched = true;
39388
+ if (!global[gracefulQueue]) publishQueue(global, fs$14[gracefulQueue]);
39389
+ module.exports = patch(clone(fs$14));
39390
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$14.__patched) {
39391
+ module.exports = patch(fs$14);
39392
+ fs$14.__patched = true;
39437
39393
  }
39438
39394
  function patch(fs) {
39439
39395
  polyfills(fs);
@@ -39688,23 +39644,23 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
39688
39644
  }
39689
39645
  function enqueue(elem) {
39690
39646
  debug("ENQUEUE", elem[0].name, elem[1]);
39691
- fs$13[gracefulQueue].push(elem);
39647
+ fs$14[gracefulQueue].push(elem);
39692
39648
  retry();
39693
39649
  }
39694
39650
  var retryTimer;
39695
39651
  function resetQueue() {
39696
39652
  var now = Date.now();
39697
- for (var i = 0; i < fs$13[gracefulQueue].length; ++i) if (fs$13[gracefulQueue][i].length > 2) {
39698
- fs$13[gracefulQueue][i][3] = now;
39699
- fs$13[gracefulQueue][i][4] = now;
39653
+ for (var i = 0; i < fs$14[gracefulQueue].length; ++i) if (fs$14[gracefulQueue][i].length > 2) {
39654
+ fs$14[gracefulQueue][i][3] = now;
39655
+ fs$14[gracefulQueue][i][4] = now;
39700
39656
  }
39701
39657
  retry();
39702
39658
  }
39703
39659
  function retry() {
39704
39660
  clearTimeout(retryTimer);
39705
39661
  retryTimer = void 0;
39706
- if (fs$13[gracefulQueue].length === 0) return;
39707
- var elem = fs$13[gracefulQueue].shift();
39662
+ if (fs$14[gracefulQueue].length === 0) return;
39663
+ var elem = fs$14[gracefulQueue].shift();
39708
39664
  var fn = elem[0];
39709
39665
  var args = elem[1];
39710
39666
  var err = elem[2];
@@ -39723,7 +39679,7 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
39723
39679
  if (sinceAttempt >= Math.min(sinceStart * 1.2, 100)) {
39724
39680
  debug("RETRY", fn.name, args);
39725
39681
  fn.apply(null, args.concat([startTime]));
39726
- } else fs$13[gracefulQueue].push(elem);
39682
+ } else fs$14[gracefulQueue].push(elem);
39727
39683
  }
39728
39684
  if (retryTimer === void 0) retryTimer = setTimeout(retry, 0);
39729
39685
  }
@@ -39811,9 +39767,9 @@ var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
39811
39767
  //#endregion
39812
39768
  //#region ../../node_modules/streamroller/node_modules/fs-extra/lib/mkdirs/win32.js
39813
39769
  var require_win32 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
39814
- var path$34 = __require("path");
39770
+ var path$35 = __require("path");
39815
39771
  function getRootPath(p) {
39816
- p = path$34.normalize(path$34.resolve(p)).split(path$34.sep);
39772
+ p = path$35.normalize(path$35.resolve(p)).split(path$35.sep);
39817
39773
  if (p.length > 0) return p[0];
39818
39774
  return null;
39819
39775
  }
@@ -39832,7 +39788,7 @@ var require_win32 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
39832
39788
  //#region ../../node_modules/streamroller/node_modules/fs-extra/lib/mkdirs/mkdirs.js
39833
39789
  var require_mkdirs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
39834
39790
  var fs = require_graceful_fs();
39835
- var path$33 = __require("path");
39791
+ var path$34 = __require("path");
39836
39792
  var invalidWin32Path = require_win32().invalidWin32Path;
39837
39793
  var o777 = parseInt("0777", 8);
39838
39794
  function mkdirs(p, opts, callback, made) {
@@ -39850,7 +39806,7 @@ var require_mkdirs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
39850
39806
  if (mode === void 0) mode = o777 & ~process.umask();
39851
39807
  if (!made) made = null;
39852
39808
  callback = callback || function() {};
39853
- p = path$33.resolve(p);
39809
+ p = path$34.resolve(p);
39854
39810
  xfs.mkdir(p, mode, (er) => {
39855
39811
  if (!er) {
39856
39812
  made = made || p;
@@ -39858,8 +39814,8 @@ var require_mkdirs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
39858
39814
  }
39859
39815
  switch (er.code) {
39860
39816
  case "ENOENT":
39861
- if (path$33.dirname(p) === p) return callback(er);
39862
- mkdirs(path$33.dirname(p), opts, (er, made) => {
39817
+ if (path$34.dirname(p) === p) return callback(er);
39818
+ mkdirs(path$34.dirname(p), opts, (er, made) => {
39863
39819
  if (er) callback(er, made);
39864
39820
  else mkdirs(p, opts, callback, made);
39865
39821
  });
@@ -39879,7 +39835,7 @@ var require_mkdirs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
39879
39835
  //#region ../../node_modules/streamroller/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js
39880
39836
  var require_mkdirs_sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
39881
39837
  var fs = require_graceful_fs();
39882
- var path$32 = __require("path");
39838
+ var path$33 = __require("path");
39883
39839
  var invalidWin32Path = require_win32().invalidWin32Path;
39884
39840
  var o777 = parseInt("0777", 8);
39885
39841
  function mkdirsSync(p, opts, made) {
@@ -39893,14 +39849,14 @@ var require_mkdirs_sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
39893
39849
  }
39894
39850
  if (mode === void 0) mode = o777 & ~process.umask();
39895
39851
  if (!made) made = null;
39896
- p = path$32.resolve(p);
39852
+ p = path$33.resolve(p);
39897
39853
  try {
39898
39854
  xfs.mkdirSync(p, mode);
39899
39855
  made = made || p;
39900
39856
  } catch (err0) {
39901
39857
  if (err0.code === "ENOENT") {
39902
- if (path$32.dirname(p) === p) throw err0;
39903
- made = mkdirsSync(path$32.dirname(p), opts, made);
39858
+ if (path$33.dirname(p) === p) throw err0;
39859
+ made = mkdirsSync(path$33.dirname(p), opts, made);
39904
39860
  mkdirsSync(p, opts, made);
39905
39861
  } else {
39906
39862
  let stat;
@@ -39936,10 +39892,10 @@ var require_mkdirs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
39936
39892
  var require_utimes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
39937
39893
  var fs = require_graceful_fs();
39938
39894
  var os$8 = __require("os");
39939
- var path$31 = __require("path");
39895
+ var path$32 = __require("path");
39940
39896
  function hasMillisResSync() {
39941
- let tmpfile = path$31.join("millis-test-sync" + Date.now().toString() + Math.random().toString().slice(2));
39942
- tmpfile = path$31.join(os$8.tmpdir(), tmpfile);
39897
+ let tmpfile = path$32.join("millis-test-sync" + Date.now().toString() + Math.random().toString().slice(2));
39898
+ tmpfile = path$32.join(os$8.tmpdir(), tmpfile);
39943
39899
  const d = /* @__PURE__ */ new Date(1435410243862);
39944
39900
  fs.writeFileSync(tmpfile, "https://github.com/jprichardson/node-fs-extra/pull/141");
39945
39901
  const fd = fs.openSync(tmpfile, "r+");
@@ -39948,8 +39904,8 @@ var require_utimes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
39948
39904
  return fs.statSync(tmpfile).mtime > 1435410243e3;
39949
39905
  }
39950
39906
  function hasMillisRes(callback) {
39951
- let tmpfile = path$31.join("millis-test" + Date.now().toString() + Math.random().toString().slice(2));
39952
- tmpfile = path$31.join(os$8.tmpdir(), tmpfile);
39907
+ let tmpfile = path$32.join("millis-test" + Date.now().toString() + Math.random().toString().slice(2));
39908
+ tmpfile = path$32.join(os$8.tmpdir(), tmpfile);
39953
39909
  const d = /* @__PURE__ */ new Date(1435410243862);
39954
39910
  fs.writeFile(tmpfile, "https://github.com/jprichardson/node-fs-extra/pull/141", (err) => {
39955
39911
  if (err) return callback(err);
@@ -40000,7 +39956,7 @@ var require_utimes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40000
39956
  //#region ../../node_modules/streamroller/node_modules/fs-extra/lib/util/stat.js
40001
39957
  var require_stat = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40002
39958
  var fs = require_graceful_fs();
40003
- var path$30 = __require("path");
39959
+ var path$31 = __require("path");
40004
39960
  var NODE_VERSION_MAJOR_WITH_BIGINT = 10;
40005
39961
  var NODE_VERSION_MINOR_WITH_BIGINT = 5;
40006
39962
  var NODE_VERSION_PATCH_WITH_BIGINT = 0;
@@ -40093,9 +40049,9 @@ var require_stat = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40093
40049
  };
40094
40050
  }
40095
40051
  function checkParentPaths(src, srcStat, dest, funcName, cb) {
40096
- const srcParent = path$30.resolve(path$30.dirname(src));
40097
- const destParent = path$30.resolve(path$30.dirname(dest));
40098
- if (destParent === srcParent || destParent === path$30.parse(destParent).root) return cb();
40052
+ const srcParent = path$31.resolve(path$31.dirname(src));
40053
+ const destParent = path$31.resolve(path$31.dirname(dest));
40054
+ if (destParent === srcParent || destParent === path$31.parse(destParent).root) return cb();
40099
40055
  if (nodeSupportsBigInt()) fs.stat(destParent, { bigint: true }, (err, destStat) => {
40100
40056
  if (err) {
40101
40057
  if (err.code === "ENOENT") return cb();
@@ -40114,9 +40070,9 @@ var require_stat = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40114
40070
  });
40115
40071
  }
40116
40072
  function checkParentPathsSync(src, srcStat, dest, funcName) {
40117
- const srcParent = path$30.resolve(path$30.dirname(src));
40118
- const destParent = path$30.resolve(path$30.dirname(dest));
40119
- if (destParent === srcParent || destParent === path$30.parse(destParent).root) return;
40073
+ const srcParent = path$31.resolve(path$31.dirname(src));
40074
+ const destParent = path$31.resolve(path$31.dirname(dest));
40075
+ if (destParent === srcParent || destParent === path$31.parse(destParent).root) return;
40120
40076
  let destStat;
40121
40077
  try {
40122
40078
  if (nodeSupportsBigInt()) destStat = fs.statSync(destParent, { bigint: true });
@@ -40129,8 +40085,8 @@ var require_stat = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40129
40085
  return checkParentPathsSync(src, srcStat, destParent, funcName);
40130
40086
  }
40131
40087
  function isSrcSubdir(src, dest) {
40132
- const srcArr = path$30.resolve(src).split(path$30.sep).filter((i) => i);
40133
- const destArr = path$30.resolve(dest).split(path$30.sep).filter((i) => i);
40088
+ const srcArr = path$31.resolve(src).split(path$31.sep).filter((i) => i);
40089
+ const destArr = path$31.resolve(dest).split(path$31.sep).filter((i) => i);
40134
40090
  return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true);
40135
40091
  }
40136
40092
  function errMsg(src, dest, funcName) {
@@ -40160,7 +40116,7 @@ var require_buffer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40160
40116
  //#region ../../node_modules/streamroller/node_modules/fs-extra/lib/copy-sync/copy-sync.js
40161
40117
  var require_copy_sync$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40162
40118
  var fs = require_graceful_fs();
40163
- var path$29 = __require("path");
40119
+ var path$30 = __require("path");
40164
40120
  var mkdirpSync = require_mkdirs().mkdirsSync;
40165
40121
  var utimesSync = require_utimes().utimesMillisSync;
40166
40122
  var stat = require_stat();
@@ -40177,7 +40133,7 @@ var require_copy_sync$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40177
40133
  }
40178
40134
  function handleFilterAndCopy(destStat, src, dest, opts) {
40179
40135
  if (opts.filter && !opts.filter(src, dest)) return;
40180
- const destParent = path$29.dirname(dest);
40136
+ const destParent = path$30.dirname(dest);
40181
40137
  if (!fs.existsSync(destParent)) mkdirpSync(destParent);
40182
40138
  return startCopy(destStat, src, dest, opts);
40183
40139
  }
@@ -40239,14 +40195,14 @@ var require_copy_sync$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40239
40195
  fs.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
40240
40196
  }
40241
40197
  function copyDirItem(item, src, dest, opts) {
40242
- const srcItem = path$29.join(src, item);
40243
- const destItem = path$29.join(dest, item);
40198
+ const srcItem = path$30.join(src, item);
40199
+ const destItem = path$30.join(dest, item);
40244
40200
  const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy");
40245
40201
  return startCopy(destStat, srcItem, destItem, opts);
40246
40202
  }
40247
40203
  function onLink(destStat, src, dest, opts) {
40248
40204
  let resolvedSrc = fs.readlinkSync(src);
40249
- if (opts.dereference) resolvedSrc = path$29.resolve(process.cwd(), resolvedSrc);
40205
+ if (opts.dereference) resolvedSrc = path$30.resolve(process.cwd(), resolvedSrc);
40250
40206
  if (!destStat) return fs.symlinkSync(resolvedSrc, dest);
40251
40207
  else {
40252
40208
  let resolvedDest;
@@ -40256,7 +40212,7 @@ var require_copy_sync$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40256
40212
  if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs.symlinkSync(resolvedSrc, dest);
40257
40213
  throw err;
40258
40214
  }
40259
- if (opts.dereference) resolvedDest = path$29.resolve(process.cwd(), resolvedDest);
40215
+ if (opts.dereference) resolvedDest = path$30.resolve(process.cwd(), resolvedDest);
40260
40216
  if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
40261
40217
  if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
40262
40218
  return copyLink(resolvedSrc, dest);
@@ -40290,7 +40246,7 @@ var require_path_exists = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40290
40246
  //#region ../../node_modules/streamroller/node_modules/fs-extra/lib/copy/copy.js
40291
40247
  var require_copy$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40292
40248
  var fs = require_graceful_fs();
40293
- var path$28 = __require("path");
40249
+ var path$29 = __require("path");
40294
40250
  var mkdirp = require_mkdirs().mkdirs;
40295
40251
  var pathExists = require_path_exists().pathExists;
40296
40252
  var utimes = require_utimes().utimesMillis;
@@ -40317,7 +40273,7 @@ var require_copy$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40317
40273
  });
40318
40274
  }
40319
40275
  function checkParentDir(destStat, src, dest, opts, cb) {
40320
- const destParent = path$28.dirname(dest);
40276
+ const destParent = path$29.dirname(dest);
40321
40277
  pathExists(destParent, (err, dirExists) => {
40322
40278
  if (err) return cb(err);
40323
40279
  if (dirExists) return startCopy(destStat, src, dest, opts, cb);
@@ -40404,8 +40360,8 @@ var require_copy$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40404
40360
  return copyDirItem(items, item, src, dest, opts, cb);
40405
40361
  }
40406
40362
  function copyDirItem(items, item, src, dest, opts, cb) {
40407
- const srcItem = path$28.join(src, item);
40408
- const destItem = path$28.join(dest, item);
40363
+ const srcItem = path$29.join(src, item);
40364
+ const destItem = path$29.join(dest, item);
40409
40365
  stat.checkPaths(srcItem, destItem, "copy", (err, stats) => {
40410
40366
  if (err) return cb(err);
40411
40367
  const { destStat } = stats;
@@ -40418,14 +40374,14 @@ var require_copy$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40418
40374
  function onLink(destStat, src, dest, opts, cb) {
40419
40375
  fs.readlink(src, (err, resolvedSrc) => {
40420
40376
  if (err) return cb(err);
40421
- if (opts.dereference) resolvedSrc = path$28.resolve(process.cwd(), resolvedSrc);
40377
+ if (opts.dereference) resolvedSrc = path$29.resolve(process.cwd(), resolvedSrc);
40422
40378
  if (!destStat) return fs.symlink(resolvedSrc, dest, cb);
40423
40379
  else fs.readlink(dest, (err, resolvedDest) => {
40424
40380
  if (err) {
40425
40381
  if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs.symlink(resolvedSrc, dest, cb);
40426
40382
  return cb(err);
40427
40383
  }
40428
- if (opts.dereference) resolvedDest = path$28.resolve(process.cwd(), resolvedDest);
40384
+ if (opts.dereference) resolvedDest = path$29.resolve(process.cwd(), resolvedDest);
40429
40385
  if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) return cb(/* @__PURE__ */ new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`));
40430
40386
  if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) return cb(/* @__PURE__ */ new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`));
40431
40387
  return copyLink(resolvedSrc, dest, cb);
@@ -40450,7 +40406,7 @@ var require_copy = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40450
40406
  //#region ../../node_modules/streamroller/node_modules/fs-extra/lib/remove/rimraf.js
40451
40407
  var require_rimraf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40452
40408
  var fs = require_graceful_fs();
40453
- var path$27 = __require("path");
40409
+ var path$28 = __require("path");
40454
40410
  var assert$2 = __require("assert");
40455
40411
  var isWindows = process.platform === "win32";
40456
40412
  function defaults(options) {
@@ -40565,7 +40521,7 @@ var require_rimraf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40565
40521
  let errState;
40566
40522
  if (n === 0) return options.rmdir(p, cb);
40567
40523
  files.forEach((f) => {
40568
- rimraf(path$27.join(p, f), options, (er) => {
40524
+ rimraf(path$28.join(p, f), options, (er) => {
40569
40525
  if (errState) return;
40570
40526
  if (er) return cb(errState = er);
40571
40527
  if (--n === 0) options.rmdir(p, cb);
@@ -40612,7 +40568,7 @@ var require_rimraf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40612
40568
  function rmkidsSync(p, options) {
40613
40569
  assert$2(p);
40614
40570
  assert$2(options);
40615
- options.readdirSync(p).forEach((f) => rimrafSync(path$27.join(p, f), options));
40571
+ options.readdirSync(p).forEach((f) => rimrafSync(path$28.join(p, f), options));
40616
40572
  if (isWindows) {
40617
40573
  const startTime = Date.now();
40618
40574
  do
@@ -40640,14 +40596,14 @@ var require_remove = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40640
40596
  var require_empty = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40641
40597
  var u = require_universalify().fromCallback;
40642
40598
  var fs = require_graceful_fs();
40643
- var path$26 = __require("path");
40599
+ var path$27 = __require("path");
40644
40600
  var mkdir = require_mkdirs();
40645
40601
  var remove = require_remove();
40646
40602
  var emptyDir = u(function emptyDir(dir, callback) {
40647
40603
  callback = callback || function() {};
40648
40604
  fs.readdir(dir, (err, items) => {
40649
40605
  if (err) return mkdir.mkdirs(dir, callback);
40650
- items = items.map((item) => path$26.join(dir, item));
40606
+ items = items.map((item) => path$27.join(dir, item));
40651
40607
  deleteItem();
40652
40608
  function deleteItem() {
40653
40609
  const item = items.pop();
@@ -40667,7 +40623,7 @@ var require_empty = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40667
40623
  return mkdir.mkdirsSync(dir);
40668
40624
  }
40669
40625
  items.forEach((item) => {
40670
- item = path$26.join(dir, item);
40626
+ item = path$27.join(dir, item);
40671
40627
  remove.removeSync(item);
40672
40628
  });
40673
40629
  }
@@ -40682,7 +40638,7 @@ var require_empty = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40682
40638
  //#region ../../node_modules/streamroller/node_modules/fs-extra/lib/ensure/file.js
40683
40639
  var require_file$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40684
40640
  var u = require_universalify().fromCallback;
40685
- var path$25 = __require("path");
40641
+ var path$26 = __require("path");
40686
40642
  var fs = require_graceful_fs();
40687
40643
  var mkdir = require_mkdirs();
40688
40644
  var pathExists = require_path_exists().pathExists;
@@ -40695,7 +40651,7 @@ var require_file$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40695
40651
  }
40696
40652
  fs.stat(file, (err, stats) => {
40697
40653
  if (!err && stats.isFile()) return callback();
40698
- const dir = path$25.dirname(file);
40654
+ const dir = path$26.dirname(file);
40699
40655
  pathExists(dir, (err, dirExists) => {
40700
40656
  if (err) return callback(err);
40701
40657
  if (dirExists) return makeFile();
@@ -40712,7 +40668,7 @@ var require_file$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40712
40668
  stats = fs.statSync(file);
40713
40669
  } catch (e) {}
40714
40670
  if (stats && stats.isFile()) return;
40715
- const dir = path$25.dirname(file);
40671
+ const dir = path$26.dirname(file);
40716
40672
  if (!fs.existsSync(dir)) mkdir.mkdirsSync(dir);
40717
40673
  fs.writeFileSync(file, "");
40718
40674
  }
@@ -40725,7 +40681,7 @@ var require_file$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40725
40681
  //#region ../../node_modules/streamroller/node_modules/fs-extra/lib/ensure/link.js
40726
40682
  var require_link = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40727
40683
  var u = require_universalify().fromCallback;
40728
- var path$24 = __require("path");
40684
+ var path$25 = __require("path");
40729
40685
  var fs = require_graceful_fs();
40730
40686
  var mkdir = require_mkdirs();
40731
40687
  var pathExists = require_path_exists().pathExists;
@@ -40744,7 +40700,7 @@ var require_link = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40744
40700
  err.message = err.message.replace("lstat", "ensureLink");
40745
40701
  return callback(err);
40746
40702
  }
40747
- const dir = path$24.dirname(dstpath);
40703
+ const dir = path$25.dirname(dstpath);
40748
40704
  pathExists(dir, (err, dirExists) => {
40749
40705
  if (err) return callback(err);
40750
40706
  if (dirExists) return makeLink(srcpath, dstpath);
@@ -40764,7 +40720,7 @@ var require_link = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40764
40720
  err.message = err.message.replace("lstat", "ensureLink");
40765
40721
  throw err;
40766
40722
  }
40767
- const dir = path$24.dirname(dstpath);
40723
+ const dir = path$25.dirname(dstpath);
40768
40724
  if (fs.existsSync(dir)) return fs.linkSync(srcpath, dstpath);
40769
40725
  mkdir.mkdirsSync(dir);
40770
40726
  return fs.linkSync(srcpath, dstpath);
@@ -40777,7 +40733,7 @@ var require_link = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40777
40733
  //#endregion
40778
40734
  //#region ../../node_modules/streamroller/node_modules/fs-extra/lib/ensure/symlink-paths.js
40779
40735
  var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40780
- var path$23 = __require("path");
40736
+ var path$24 = __require("path");
40781
40737
  var fs = require_graceful_fs();
40782
40738
  var pathExists = require_path_exists().pathExists;
40783
40739
  /**
@@ -40802,7 +40758,7 @@ var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) =>
40802
40758
  * the ability to pass in `relative to current working direcotry` paths.
40803
40759
  */
40804
40760
  function symlinkPaths(srcpath, dstpath, callback) {
40805
- if (path$23.isAbsolute(srcpath)) return fs.lstat(srcpath, (err) => {
40761
+ if (path$24.isAbsolute(srcpath)) return fs.lstat(srcpath, (err) => {
40806
40762
  if (err) {
40807
40763
  err.message = err.message.replace("lstat", "ensureSymlink");
40808
40764
  return callback(err);
@@ -40813,8 +40769,8 @@ var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) =>
40813
40769
  });
40814
40770
  });
40815
40771
  else {
40816
- const dstdir = path$23.dirname(dstpath);
40817
- const relativeToDst = path$23.join(dstdir, srcpath);
40772
+ const dstdir = path$24.dirname(dstpath);
40773
+ const relativeToDst = path$24.join(dstdir, srcpath);
40818
40774
  return pathExists(relativeToDst, (err, exists) => {
40819
40775
  if (err) return callback(err);
40820
40776
  if (exists) return callback(null, {
@@ -40828,7 +40784,7 @@ var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) =>
40828
40784
  }
40829
40785
  return callback(null, {
40830
40786
  "toCwd": srcpath,
40831
- "toDst": path$23.relative(dstdir, srcpath)
40787
+ "toDst": path$24.relative(dstdir, srcpath)
40832
40788
  });
40833
40789
  });
40834
40790
  });
@@ -40836,7 +40792,7 @@ var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) =>
40836
40792
  }
40837
40793
  function symlinkPathsSync(srcpath, dstpath) {
40838
40794
  let exists;
40839
- if (path$23.isAbsolute(srcpath)) {
40795
+ if (path$24.isAbsolute(srcpath)) {
40840
40796
  exists = fs.existsSync(srcpath);
40841
40797
  if (!exists) throw new Error("absolute srcpath does not exist");
40842
40798
  return {
@@ -40844,8 +40800,8 @@ var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) =>
40844
40800
  "toDst": srcpath
40845
40801
  };
40846
40802
  } else {
40847
- const dstdir = path$23.dirname(dstpath);
40848
- const relativeToDst = path$23.join(dstdir, srcpath);
40803
+ const dstdir = path$24.dirname(dstpath);
40804
+ const relativeToDst = path$24.join(dstdir, srcpath);
40849
40805
  exists = fs.existsSync(relativeToDst);
40850
40806
  if (exists) return {
40851
40807
  "toCwd": relativeToDst,
@@ -40856,7 +40812,7 @@ var require_symlink_paths = /* @__PURE__ */ __commonJSMin(((exports, module) =>
40856
40812
  if (!exists) throw new Error("relative srcpath does not exist");
40857
40813
  return {
40858
40814
  "toCwd": srcpath,
40859
- "toDst": path$23.relative(dstdir, srcpath)
40815
+ "toDst": path$24.relative(dstdir, srcpath)
40860
40816
  };
40861
40817
  }
40862
40818
  }
@@ -40899,7 +40855,7 @@ var require_symlink_type = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40899
40855
  //#region ../../node_modules/streamroller/node_modules/fs-extra/lib/ensure/symlink.js
40900
40856
  var require_symlink = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40901
40857
  var u = require_universalify().fromCallback;
40902
- var path$22 = __require("path");
40858
+ var path$23 = __require("path");
40903
40859
  var fs = require_graceful_fs();
40904
40860
  var _mkdirs = require_mkdirs();
40905
40861
  var mkdirs = _mkdirs.mkdirs;
@@ -40922,7 +40878,7 @@ var require_symlink = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40922
40878
  srcpath = relative.toDst;
40923
40879
  symlinkType(relative.toCwd, type, (err, type) => {
40924
40880
  if (err) return callback(err);
40925
- const dir = path$22.dirname(dstpath);
40881
+ const dir = path$23.dirname(dstpath);
40926
40882
  pathExists(dir, (err, dirExists) => {
40927
40883
  if (err) return callback(err);
40928
40884
  if (dirExists) return fs.symlink(srcpath, dstpath, type, callback);
@@ -40940,7 +40896,7 @@ var require_symlink = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40940
40896
  const relative = symlinkPathsSync(srcpath, dstpath);
40941
40897
  srcpath = relative.toDst;
40942
40898
  type = symlinkTypeSync(relative.toCwd, type);
40943
- const dir = path$22.dirname(dstpath);
40899
+ const dir = path$23.dirname(dstpath);
40944
40900
  if (fs.existsSync(dir)) return fs.symlinkSync(srcpath, dstpath, type);
40945
40901
  mkdirsSync(dir);
40946
40902
  return fs.symlinkSync(srcpath, dstpath, type);
@@ -41080,7 +41036,7 @@ var require_jsonfile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41080
41036
  //#endregion
41081
41037
  //#region ../../node_modules/streamroller/node_modules/fs-extra/lib/json/output-json.js
41082
41038
  var require_output_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41083
- var path$21 = __require("path");
41039
+ var path$22 = __require("path");
41084
41040
  var mkdir = require_mkdirs();
41085
41041
  var pathExists = require_path_exists().pathExists;
41086
41042
  var jsonFile = require_jsonfile();
@@ -41089,7 +41045,7 @@ var require_output_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41089
41045
  callback = options;
41090
41046
  options = {};
41091
41047
  }
41092
- const dir = path$21.dirname(file);
41048
+ const dir = path$22.dirname(file);
41093
41049
  pathExists(dir, (err, itDoes) => {
41094
41050
  if (err) return callback(err);
41095
41051
  if (itDoes) return jsonFile.writeJson(file, data, options, callback);
@@ -41105,11 +41061,11 @@ var require_output_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41105
41061
  //#region ../../node_modules/streamroller/node_modules/fs-extra/lib/json/output-json-sync.js
41106
41062
  var require_output_json_sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41107
41063
  var fs = require_graceful_fs();
41108
- var path$20 = __require("path");
41064
+ var path$21 = __require("path");
41109
41065
  var mkdir = require_mkdirs();
41110
41066
  var jsonFile = require_jsonfile();
41111
41067
  function outputJsonSync(file, data, options) {
41112
- const dir = path$20.dirname(file);
41068
+ const dir = path$21.dirname(file);
41113
41069
  if (!fs.existsSync(dir)) mkdir.mkdirsSync(dir);
41114
41070
  jsonFile.writeJsonSync(file, data, options);
41115
41071
  }
@@ -41134,7 +41090,7 @@ var require_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41134
41090
  //#region ../../node_modules/streamroller/node_modules/fs-extra/lib/move-sync/move-sync.js
41135
41091
  var require_move_sync$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41136
41092
  var fs = require_graceful_fs();
41137
- var path$19 = __require("path");
41093
+ var path$20 = __require("path");
41138
41094
  var copySync = require_copy_sync().copySync;
41139
41095
  var removeSync = require_remove().removeSync;
41140
41096
  var mkdirpSync = require_mkdirs().mkdirpSync;
@@ -41144,7 +41100,7 @@ var require_move_sync$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41144
41100
  const overwrite = opts.overwrite || opts.clobber || false;
41145
41101
  const { srcStat } = stat.checkPathsSync(src, dest, "move");
41146
41102
  stat.checkParentPathsSync(src, srcStat, dest, "move");
41147
- mkdirpSync(path$19.dirname(dest));
41103
+ mkdirpSync(path$20.dirname(dest));
41148
41104
  return doRename(src, dest, overwrite);
41149
41105
  }
41150
41106
  function doRename(src, dest, overwrite) {
@@ -41181,7 +41137,7 @@ var require_move_sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41181
41137
  //#region ../../node_modules/streamroller/node_modules/fs-extra/lib/move/move.js
41182
41138
  var require_move$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41183
41139
  var fs = require_graceful_fs();
41184
- var path$18 = __require("path");
41140
+ var path$19 = __require("path");
41185
41141
  var copy = require_copy().copy;
41186
41142
  var remove = require_remove().remove;
41187
41143
  var mkdirp = require_mkdirs().mkdirp;
@@ -41198,7 +41154,7 @@ var require_move$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41198
41154
  const { srcStat } = stats;
41199
41155
  stat.checkParentPaths(src, srcStat, dest, "move", (err) => {
41200
41156
  if (err) return cb(err);
41201
- mkdirp(path$18.dirname(dest), (err) => {
41157
+ mkdirp(path$19.dirname(dest), (err) => {
41202
41158
  if (err) return cb(err);
41203
41159
  return doRename(src, dest, overwrite, cb);
41204
41160
  });
@@ -41245,7 +41201,7 @@ var require_move = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41245
41201
  var require_output = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41246
41202
  var u = require_universalify().fromCallback;
41247
41203
  var fs = require_graceful_fs();
41248
- var path$17 = __require("path");
41204
+ var path$18 = __require("path");
41249
41205
  var mkdir = require_mkdirs();
41250
41206
  var pathExists = require_path_exists().pathExists;
41251
41207
  function outputFile(file, data, encoding, callback) {
@@ -41253,7 +41209,7 @@ var require_output = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41253
41209
  callback = encoding;
41254
41210
  encoding = "utf8";
41255
41211
  }
41256
- const dir = path$17.dirname(file);
41212
+ const dir = path$18.dirname(file);
41257
41213
  pathExists(dir, (err, itDoes) => {
41258
41214
  if (err) return callback(err);
41259
41215
  if (itDoes) return fs.writeFile(file, data, encoding, callback);
@@ -41264,7 +41220,7 @@ var require_output = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41264
41220
  });
41265
41221
  }
41266
41222
  function outputFileSync(file, ...args) {
41267
- const dir = path$17.dirname(file);
41223
+ const dir = path$18.dirname(file);
41268
41224
  if (fs.existsSync(dir)) return fs.writeFileSync(file, ...args);
41269
41225
  mkdir.mkdirsSync(dir);
41270
41226
  fs.writeFileSync(file, ...args);
@@ -41278,9 +41234,9 @@ var require_output = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41278
41234
  //#region ../../node_modules/streamroller/node_modules/fs-extra/lib/index.js
41279
41235
  var require_lib$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41280
41236
  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());
41281
- var fs$12 = __require("fs");
41282
- if (Object.getOwnPropertyDescriptor(fs$12, "promises")) Object.defineProperty(module.exports, "promises", { get() {
41283
- return fs$12.promises;
41237
+ var fs$13 = __require("fs");
41238
+ if (Object.getOwnPropertyDescriptor(fs$13, "promises")) Object.defineProperty(module.exports, "promises", { get() {
41239
+ return fs$13.promises;
41284
41240
  } });
41285
41241
  }));
41286
41242
  //#endregion
@@ -41445,11 +41401,11 @@ var require_lib$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41445
41401
  //#region ../../node_modules/streamroller/lib/fileNameFormatter.js
41446
41402
  var require_fileNameFormatter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41447
41403
  var debug = require_src()("streamroller:fileNameFormatter");
41448
- var path$16 = __require("path");
41404
+ var path$17 = __require("path");
41449
41405
  var FILENAME_SEP = ".";
41450
41406
  var ZIP_EXT = ".gz";
41451
41407
  module.exports = ({ file, keepFileExt, needsIndex, alwaysIncludeDate, compress }) => {
41452
- const dirAndName = path$16.join(file.dir, file.name);
41408
+ const dirAndName = path$17.join(file.dir, file.name);
41453
41409
  const ext = (f) => f + file.ext;
41454
41410
  const index = (f, i, d) => (needsIndex || !d) && i ? f + FILENAME_SEP + i : f;
41455
41411
  const date = (f, i, d) => {
@@ -41594,7 +41550,7 @@ var require_moveAndMaybeCompressFile = /* @__PURE__ */ __commonJSMin(((exports,
41594
41550
  var require_RollingFileWriteStream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41595
41551
  var debug = require_src()("streamroller:RollingFileWriteStream");
41596
41552
  var fs = require_lib$4();
41597
- var path$15 = __require("path");
41553
+ var path$16 = __require("path");
41598
41554
  var newNow = require_now();
41599
41555
  var format = require_lib$3();
41600
41556
  var { Writable: Writable$1 } = __require("stream");
@@ -41625,8 +41581,8 @@ var require_RollingFileWriteStream = /* @__PURE__ */ __commonJSMin(((exports, mo
41625
41581
  debug(`constructor: creating RollingFileWriteStream. path=${filePath}`);
41626
41582
  super(options);
41627
41583
  this.options = this._parseOption(options);
41628
- this.fileObject = path$15.parse(filePath);
41629
- if (this.fileObject.dir === "") this.fileObject = path$15.parse(path$15.join(process.cwd(), filePath));
41584
+ this.fileObject = path$16.parse(filePath);
41585
+ if (this.fileObject.dir === "") this.fileObject = path$16.parse(path$16.join(process.cwd(), filePath));
41630
41586
  this.fileFormatter = fileNameFormatter({
41631
41587
  file: this.fileObject,
41632
41588
  alwaysIncludeDate: this.options.alwaysIncludePattern,
@@ -41763,7 +41719,7 @@ var require_RollingFileWriteStream = /* @__PURE__ */ __commonJSMin(((exports, mo
41763
41719
  const existingFileDetails = await this._getExistingFiles();
41764
41720
  debug(`_clean: numToKeep = ${this.options.numToKeep}, existingFiles = ${existingFileDetails.length}`);
41765
41721
  debug("_clean: existing files are: ", existingFileDetails);
41766
- if (this._tooManyFiles(existingFileDetails.length)) await deleteFiles(existingFileDetails.slice(0, existingFileDetails.length - this.options.numToKeep - 1).map((f) => path$15.format({
41722
+ if (this._tooManyFiles(existingFileDetails.length)) await deleteFiles(existingFileDetails.slice(0, existingFileDetails.length - this.options.numToKeep - 1).map((f) => path$16.format({
41767
41723
  dir: this.fileObject.dir,
41768
41724
  base: f.filename
41769
41725
  })));
@@ -41837,7 +41793,7 @@ var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41837
41793
  //#region ../../node_modules/log4js/lib/appenders/file.js
41838
41794
  var require_file = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41839
41795
  var debug = require_src()("log4js:file");
41840
- var path$14 = __require("path");
41796
+ var path$15 = __require("path");
41841
41797
  var streams = require_lib$2();
41842
41798
  var eol$2 = __require("os").EOL;
41843
41799
  function openTheStream(file, fileSize, numFiles, options) {
@@ -41864,7 +41820,7 @@ var require_file = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41864
41820
  * @param timezoneOffset - optional timezone offset in minutes (default system local)
41865
41821
  */
41866
41822
  function fileAppender(file, layout, logSize, numBackups, options, timezoneOffset) {
41867
- file = path$14.normalize(file);
41823
+ file = path$15.normalize(file);
41868
41824
  numBackups = numBackups === void 0 ? 5 : numBackups;
41869
41825
  numBackups = numBackups === 0 ? 1 : numBackups;
41870
41826
  debug("Creating file appender (", file, ", ", logSize, ", ", numBackups, ", ", options, ", ", timezoneOffset, ")");
@@ -41943,13 +41899,13 @@ var require_dateFile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41943
41899
  //#region ../../node_modules/log4js/lib/appenders/fileSync.js
41944
41900
  var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41945
41901
  var debug = require_src()("log4js:fileSync");
41946
- var path$13 = __require("path");
41947
- var fs$11 = __require("fs");
41902
+ var path$14 = __require("path");
41903
+ var fs$12 = __require("fs");
41948
41904
  var eol = __require("os").EOL || "\n";
41949
41905
  function touchFile(file, options) {
41950
- if (fs$11.existsSync(file)) return;
41951
- const id = fs$11.openSync(file, options.flags, options.mode);
41952
- fs$11.closeSync(id);
41906
+ if (fs$12.existsSync(file)) return;
41907
+ const id = fs$12.openSync(file, options.flags, options.mode);
41908
+ fs$12.closeSync(id);
41953
41909
  }
41954
41910
  var RollingFileSync = class {
41955
41911
  constructor(filename, size, backups, options) {
@@ -41966,7 +41922,7 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41966
41922
  function currentFileSize(file) {
41967
41923
  let fileSize = 0;
41968
41924
  try {
41969
- fileSize = fs$11.statSync(file).size;
41925
+ fileSize = fs$12.statSync(file).size;
41970
41926
  } catch (e) {
41971
41927
  touchFile(file, options);
41972
41928
  }
@@ -41980,12 +41936,12 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41980
41936
  }
41981
41937
  roll(filename) {
41982
41938
  const that = this;
41983
- const nameMatcher = new RegExp(`^${path$13.basename(filename)}`);
41939
+ const nameMatcher = new RegExp(`^${path$14.basename(filename)}`);
41984
41940
  function justTheseFiles(item) {
41985
41941
  return nameMatcher.test(item);
41986
41942
  }
41987
41943
  function index(filename_) {
41988
- return parseInt(filename_.substring(`${path$13.basename(filename)}.`.length), 10) || 0;
41944
+ return parseInt(filename_.substring(`${path$14.basename(filename)}.`.length), 10) || 0;
41989
41945
  }
41990
41946
  function byIndex(a, b) {
41991
41947
  if (index(a) > index(b)) return 1;
@@ -41997,15 +41953,15 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41997
41953
  debug(`Index of ${fileToRename} is ${idx}`);
41998
41954
  if (idx < that.backups) {
41999
41955
  try {
42000
- fs$11.unlinkSync(`${filename}.${idx + 1}`);
41956
+ fs$12.unlinkSync(`${filename}.${idx + 1}`);
42001
41957
  } catch (e) {}
42002
41958
  debug(`Renaming ${fileToRename} -> ${filename}.${idx + 1}`);
42003
- fs$11.renameSync(path$13.join(path$13.dirname(filename), fileToRename), `${filename}.${idx + 1}`);
41959
+ fs$12.renameSync(path$14.join(path$14.dirname(filename), fileToRename), `${filename}.${idx + 1}`);
42004
41960
  }
42005
41961
  }
42006
41962
  function renameTheFiles() {
42007
41963
  debug("Renaming the old files");
42008
- fs$11.readdirSync(path$13.dirname(filename)).filter(justTheseFiles).sort(byIndex).reverse().forEach(increaseFileIndex);
41964
+ fs$12.readdirSync(path$14.dirname(filename)).filter(justTheseFiles).sort(byIndex).reverse().forEach(increaseFileIndex);
42009
41965
  }
42010
41966
  debug("Rolling, rolling, rolling");
42011
41967
  renameTheFiles();
@@ -42015,7 +41971,7 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
42015
41971
  function writeTheChunk() {
42016
41972
  debug("writing the chunk to the file");
42017
41973
  that.currentSize += chunk.length;
42018
- fs$11.appendFileSync(that.filename, chunk);
41974
+ fs$12.appendFileSync(that.filename, chunk);
42019
41975
  }
42020
41976
  debug("in write");
42021
41977
  if (this.shouldRoll()) {
@@ -42041,7 +41997,7 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
42041
41997
  */
42042
41998
  function fileAppender(file, layout, logSize, numBackups, timezoneOffset, options) {
42043
41999
  debug("fileSync appender created");
42044
- file = path$13.normalize(file);
42000
+ file = path$14.normalize(file);
42045
42001
  numBackups = numBackups === void 0 ? 5 : numBackups;
42046
42002
  numBackups = numBackups === 0 ? 1 : numBackups;
42047
42003
  function openTheStream(filePath, fileSize, numFiles) {
@@ -42050,7 +42006,7 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
42050
42006
  else stream = ((f) => {
42051
42007
  touchFile(f, options);
42052
42008
  return { write(data) {
42053
- fs$11.appendFileSync(f, data);
42009
+ fs$12.appendFileSync(f, data);
42054
42010
  } };
42055
42011
  })(filePath);
42056
42012
  return stream;
@@ -42075,7 +42031,7 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
42075
42031
  //#endregion
42076
42032
  //#region ../../node_modules/log4js/lib/appenders/index.js
42077
42033
  var require_appenders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
42078
- var path$12 = __require("path");
42034
+ var path$13 = __require("path");
42079
42035
  var debug = require_src()("log4js:appenders");
42080
42036
  var configuration = require_configuration();
42081
42037
  var clustering = require_clustering();
@@ -42102,7 +42058,7 @@ var require_appenders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
42102
42058
  return;
42103
42059
  }
42104
42060
  };
42105
- 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);
42061
+ var loadAppenderModule = (type, config) => coreAppenders.get(type) || tryLoading(`./${type}`, config) || tryLoading(type, config) || __require.main && tryLoading(path$13.join(path$13.dirname(__require.main.filename), type), config) || tryLoading(path$13.join(process.cwd(), type), config);
42106
42062
  var appendersLoading = /* @__PURE__ */ new Set();
42107
42063
  var getAppender = (name, config) => {
42108
42064
  if (appenders.has(name)) return appenders.get(name);
@@ -42649,7 +42605,7 @@ var require_log4js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
42649
42605
  * Website: http://log4js.berlios.de
42650
42606
  */
42651
42607
  var debug = require_src()("log4js:main");
42652
- var fs$10 = __require("fs");
42608
+ var fs$11 = __require("fs");
42653
42609
  var deepClone = require_rfdc()({ proto: true });
42654
42610
  var configuration = require_configuration();
42655
42611
  var layouts = require_layouts();
@@ -42670,7 +42626,7 @@ var require_log4js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
42670
42626
  function loadConfigurationFile(filename) {
42671
42627
  debug(`Loading configuration from ${filename}`);
42672
42628
  try {
42673
- return JSON.parse(fs$10.readFileSync(filename, "utf8"));
42629
+ return JSON.parse(fs$11.readFileSync(filename, "utf8"));
42674
42630
  } catch (e) {
42675
42631
  throw new Error(`Problem reading config from file "${filename}". Error was ${e.message}`, e);
42676
42632
  }
@@ -43758,10 +43714,10 @@ var require_atomic_sleep = /* @__PURE__ */ __commonJSMin(((exports, module) => {
43758
43714
  //#endregion
43759
43715
  //#region ../../node_modules/sonic-boom/index.js
43760
43716
  var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
43761
- var fs$9 = __require("fs");
43717
+ var fs$10 = __require("fs");
43762
43718
  var EventEmitter$8 = __require("events");
43763
43719
  var inherits = __require("util").inherits;
43764
- var path$11 = __require("path");
43720
+ var path$12 = __require("path");
43765
43721
  var sleep = require_atomic_sleep();
43766
43722
  var assert$1 = __require("assert");
43767
43723
  var BUSY_WRITE_TIMEOUT = 100;
@@ -43801,17 +43757,17 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
43801
43757
  const flags = sonic.append ? "a" : "w";
43802
43758
  const mode = sonic.mode;
43803
43759
  if (sonic.sync) try {
43804
- if (sonic.mkdir) fs$9.mkdirSync(path$11.dirname(file), { recursive: true });
43805
- fileOpened(null, fs$9.openSync(file, flags, mode));
43760
+ if (sonic.mkdir) fs$10.mkdirSync(path$12.dirname(file), { recursive: true });
43761
+ fileOpened(null, fs$10.openSync(file, flags, mode));
43806
43762
  } catch (err) {
43807
43763
  fileOpened(err);
43808
43764
  throw err;
43809
43765
  }
43810
- else if (sonic.mkdir) fs$9.mkdir(path$11.dirname(file), { recursive: true }, (err) => {
43766
+ else if (sonic.mkdir) fs$10.mkdir(path$12.dirname(file), { recursive: true }, (err) => {
43811
43767
  if (err) return fileOpened(err);
43812
- fs$9.open(file, flags, mode, fileOpened);
43768
+ fs$10.open(file, flags, mode, fileOpened);
43813
43769
  });
43814
- else fs$9.open(file, flags, mode, fileOpened);
43770
+ else fs$10.open(file, flags, mode, fileOpened);
43815
43771
  }
43816
43772
  function SonicBoom(opts) {
43817
43773
  if (!(this instanceof SonicBoom)) return new SonicBoom(opts);
@@ -43849,8 +43805,8 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
43849
43805
  this.flush = flushBuffer;
43850
43806
  this.flushSync = flushBufferSync;
43851
43807
  this._actualWrite = actualWriteBuffer;
43852
- fsWriteSync = () => fs$9.writeSync(this.fd, this._writingBuf);
43853
- fsWrite = () => fs$9.write(this.fd, this._writingBuf, this.release);
43808
+ fsWriteSync = () => fs$10.writeSync(this.fd, this._writingBuf);
43809
+ fsWrite = () => fs$10.write(this.fd, this._writingBuf, this.release);
43854
43810
  } else if (contentMode === void 0 || contentMode === kContentModeUtf8) {
43855
43811
  this._writingBuf = "";
43856
43812
  this.write = write;
@@ -43858,12 +43814,12 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
43858
43814
  this.flushSync = flushSync;
43859
43815
  this._actualWrite = actualWrite;
43860
43816
  fsWriteSync = () => {
43861
- if (Buffer.isBuffer(this._writingBuf)) return fs$9.writeSync(this.fd, this._writingBuf);
43862
- return fs$9.writeSync(this.fd, this._writingBuf, "utf8");
43817
+ if (Buffer.isBuffer(this._writingBuf)) return fs$10.writeSync(this.fd, this._writingBuf);
43818
+ return fs$10.writeSync(this.fd, this._writingBuf, "utf8");
43863
43819
  };
43864
43820
  fsWrite = () => {
43865
- if (Buffer.isBuffer(this._writingBuf)) return fs$9.write(this.fd, this._writingBuf, this.release);
43866
- return fs$9.write(this.fd, this._writingBuf, "utf8", this.release);
43821
+ if (Buffer.isBuffer(this._writingBuf)) return fs$10.write(this.fd, this._writingBuf, this.release);
43822
+ return fs$10.write(this.fd, this._writingBuf, "utf8", this.release);
43867
43823
  };
43868
43824
  } else throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`);
43869
43825
  if (typeof fd === "number") {
@@ -43908,7 +43864,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
43908
43864
  return;
43909
43865
  }
43910
43866
  }
43911
- if (this._fsync) fs$9.fsyncSync(this.fd);
43867
+ if (this._fsync) fs$10.fsyncSync(this.fd);
43912
43868
  const len = this._len;
43913
43869
  if (this._reopening) {
43914
43870
  this._writing = false;
@@ -44005,7 +43961,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
44005
43961
  this._flushPending = true;
44006
43962
  const onDrain = () => {
44007
43963
  if (!this._fsync) try {
44008
- fs$9.fsync(this.fd, (err) => {
43964
+ fs$10.fsync(this.fd, (err) => {
44009
43965
  this._flushPending = false;
44010
43966
  cb(err);
44011
43967
  });
@@ -44082,7 +44038,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
44082
44038
  if (this._writing) return;
44083
44039
  const fd = this.fd;
44084
44040
  this.once("ready", () => {
44085
- if (fd !== this.fd) fs$9.close(fd, (err) => {
44041
+ if (fd !== this.fd) fs$10.close(fd, (err) => {
44086
44042
  if (err) return this.emit("error", err);
44087
44043
  });
44088
44044
  });
@@ -44113,7 +44069,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
44113
44069
  while (this._bufs.length || buf.length) {
44114
44070
  if (buf.length <= 0) buf = this._bufs[0];
44115
44071
  try {
44116
- const n = Buffer.isBuffer(buf) ? fs$9.writeSync(this.fd, buf) : fs$9.writeSync(this.fd, buf, "utf8");
44072
+ const n = Buffer.isBuffer(buf) ? fs$10.writeSync(this.fd, buf) : fs$10.writeSync(this.fd, buf, "utf8");
44117
44073
  const releasedBufObj = releaseWritingBuf(buf, this._len, n);
44118
44074
  buf = releasedBufObj.writingBuf;
44119
44075
  this._len = releasedBufObj.len;
@@ -44124,7 +44080,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
44124
44080
  }
44125
44081
  }
44126
44082
  try {
44127
- fs$9.fsyncSync(this.fd);
44083
+ fs$10.fsyncSync(this.fd);
44128
44084
  } catch {}
44129
44085
  }
44130
44086
  function flushBufferSync() {
@@ -44138,7 +44094,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
44138
44094
  while (this._bufs.length || buf.length) {
44139
44095
  if (buf.length <= 0) buf = mergeBuf(this._bufs[0], this._lens[0]);
44140
44096
  try {
44141
- const n = fs$9.writeSync(this.fd, buf);
44097
+ const n = fs$10.writeSync(this.fd, buf);
44142
44098
  buf = buf.subarray(n);
44143
44099
  this._len = Math.max(this._len - n, 0);
44144
44100
  if (buf.length <= 0) {
@@ -44160,24 +44116,24 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
44160
44116
  this._writing = true;
44161
44117
  this._writingBuf = this._writingBuf.length ? this._writingBuf : this._bufs.shift() || "";
44162
44118
  if (this.sync) try {
44163
- release(null, Buffer.isBuffer(this._writingBuf) ? fs$9.writeSync(this.fd, this._writingBuf) : fs$9.writeSync(this.fd, this._writingBuf, "utf8"));
44119
+ release(null, Buffer.isBuffer(this._writingBuf) ? fs$10.writeSync(this.fd, this._writingBuf) : fs$10.writeSync(this.fd, this._writingBuf, "utf8"));
44164
44120
  } catch (err) {
44165
44121
  release(err);
44166
44122
  }
44167
- else fs$9.write(this.fd, this._writingBuf, release);
44123
+ else fs$10.write(this.fd, this._writingBuf, release);
44168
44124
  }
44169
44125
  function actualWriteBuffer() {
44170
44126
  const release = this.release;
44171
44127
  this._writing = true;
44172
44128
  this._writingBuf = this._writingBuf.length ? this._writingBuf : mergeBuf(this._bufs.shift(), this._lens.shift());
44173
44129
  if (this.sync) try {
44174
- release(null, fs$9.writeSync(this.fd, this._writingBuf));
44130
+ release(null, fs$10.writeSync(this.fd, this._writingBuf));
44175
44131
  } catch (err) {
44176
44132
  release(err);
44177
44133
  }
44178
44134
  else {
44179
44135
  if (kCopyBuffer) this._writingBuf = Buffer.from(this._writingBuf);
44180
- fs$9.write(this.fd, this._writingBuf, release);
44136
+ fs$10.write(this.fd, this._writingBuf, release);
44181
44137
  }
44182
44138
  }
44183
44139
  function actualClose(sonic) {
@@ -44191,10 +44147,10 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
44191
44147
  sonic._lens = [];
44192
44148
  assert$1(typeof sonic.fd === "number", `sonic.fd must be a number, got ${typeof sonic.fd}`);
44193
44149
  try {
44194
- fs$9.fsync(sonic.fd, closeWrapped);
44150
+ fs$10.fsync(sonic.fd, closeWrapped);
44195
44151
  } catch {}
44196
44152
  function closeWrapped() {
44197
- if (sonic.fd !== 1 && sonic.fd !== 2) fs$9.close(sonic.fd, done);
44153
+ if (sonic.fd !== 1 && sonic.fd !== 2) fs$10.close(sonic.fd, done);
44198
44154
  else done();
44199
44155
  }
44200
44156
  function done(err) {
@@ -72991,7 +72947,7 @@ var require_tcp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
72991
72947
  var Transporter = require_base$1();
72992
72948
  var _ = require_lodash();
72993
72949
  var { isObject, isString } = require_utils$3();
72994
- var fs$8 = __require("fs");
72950
+ var fs$9 = __require("fs");
72995
72951
  var kleur = require_kleur();
72996
72952
  var Node = require_node$1();
72997
72953
  var P = require_packets();
@@ -73138,7 +73094,7 @@ var require_tcp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
73138
73094
  if (isString(str) && str.startsWith("file://")) {
73139
73095
  const fName = str.replace("file://", "");
73140
73096
  this.logger.debug(`Load nodes list from file '${fName}'...`);
73141
- let content = fs$8.readFileSync(fName);
73097
+ let content = fs$9.readFileSync(fName);
73142
73098
  if (content && content.length > 0) {
73143
73099
  const str = content.toString().trim();
73144
73100
  if (str.startsWith("{") || str.startsWith("[")) return JSON.parse(str);
@@ -75628,15 +75584,15 @@ var require_ttl = /* @__PURE__ */ __commonJSMin(((exports, module) => {
75628
75584
  //#region ../../node_modules/recursive-watch/index.js
75629
75585
  var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
75630
75586
  var os$4 = __require("os");
75631
- var fs$7 = __require("fs");
75632
- var path$10 = __require("path");
75587
+ var fs$8 = __require("fs");
75588
+ var path$11 = __require("path");
75633
75589
  var Cache = require_ttl();
75634
75590
  var watchDirectory = os$4.platform() === "linux" ? watchFallback : watchRecursive;
75635
75591
  module.exports = watch;
75636
75592
  function watch(name, onchange) {
75637
75593
  var clear = null;
75638
75594
  var stopped = false;
75639
- fs$7.lstat(name, function(_, st) {
75595
+ fs$8.lstat(name, function(_, st) {
75640
75596
  if (!st || stopped) {
75641
75597
  stopped = true;
75642
75598
  return;
@@ -75652,8 +75608,8 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
75652
75608
  function watchFile(filename, onchange) {
75653
75609
  var prev = null;
75654
75610
  var prevTime = 0;
75655
- var w = fs$7.watch(filename, function() {
75656
- fs$7.lstat(filename, function(_, st) {
75611
+ var w = fs$8.watch(filename, function() {
75612
+ fs$8.lstat(filename, function(_, st) {
75657
75613
  var now = Date.now();
75658
75614
  if (now - prevTime > 2e3 || !same(st, prev)) onchange(filename);
75659
75615
  prevTime = now;
@@ -75665,9 +75621,9 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
75665
75621
  };
75666
75622
  }
75667
75623
  function watchRecursive(directory, onchange) {
75668
- var w = fs$7.watch(directory, { recursive: true }, function(change, filename) {
75624
+ var w = fs$8.watch(directory, { recursive: true }, function(change, filename) {
75669
75625
  if (!filename) return;
75670
- onchange(path$10.join(directory, filename));
75626
+ onchange(path$11.join(directory, filename));
75671
75627
  });
75672
75628
  return function() {
75673
75629
  w.close();
@@ -75695,7 +75651,7 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
75695
75651
  }
75696
75652
  function update() {
75697
75653
  var filename = queued[0];
75698
- fs$7.lstat(filename, function(err, st) {
75654
+ fs$8.lstat(filename, function(err, st) {
75699
75655
  var w = watching[filename];
75700
75656
  if (err && w) {
75701
75657
  w.close();
@@ -75704,30 +75660,30 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
75704
75660
  var prevSt = prevs.get(filename);
75705
75661
  if (!prevSt || !same(st, prevSt)) onchange(filename);
75706
75662
  prevs.put(filename, st);
75707
- visit(path$10.relative(directory, filename), function() {
75663
+ visit(path$11.relative(directory, filename), function() {
75708
75664
  queued.shift();
75709
75665
  if (queued.length) update();
75710
75666
  });
75711
75667
  });
75712
75668
  }
75713
75669
  function visit(next, cb) {
75714
- var dir = path$10.join(directory, next);
75715
- fs$7.lstat(dir, function(err, st) {
75670
+ var dir = path$11.join(directory, next);
75671
+ fs$8.lstat(dir, function(err, st) {
75716
75672
  if (err || !st.isDirectory()) return cb();
75717
75673
  if (watching[dir]) return cb();
75718
75674
  if (loaded) emit(dir);
75719
- var w = fs$7.watch(dir, function(change, filename) {
75720
- filename = path$10.join(next, filename);
75721
- emit(path$10.join(directory, filename));
75675
+ var w = fs$8.watch(dir, function(change, filename) {
75676
+ filename = path$11.join(next, filename);
75677
+ emit(path$11.join(directory, filename));
75722
75678
  });
75723
75679
  w.on("error", noop);
75724
75680
  watching[dir] = w;
75725
- fs$7.readdir(dir, function(err, list) {
75681
+ fs$8.readdir(dir, function(err, list) {
75726
75682
  if (err) return cb(err);
75727
75683
  loop();
75728
75684
  function loop() {
75729
75685
  if (!list.length) return cb();
75730
- visit(path$10.join(next, list.shift()), loop);
75686
+ visit(path$11.join(next, list.shift()), loop);
75731
75687
  }
75732
75688
  });
75733
75689
  });
@@ -75742,9 +75698,9 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
75742
75698
  //#endregion
75743
75699
  //#region ../../node_modules/moleculer/src/middlewares/hot-reload.js
75744
75700
  var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
75745
- var fs$6 = __require("fs");
75701
+ var fs$7 = __require("fs");
75746
75702
  var kleur = require_kleur();
75747
- var path$9 = __require("path");
75703
+ var path$10 = __require("path");
75748
75704
  var watch = require_recursive_watch();
75749
75705
  var _ = require_lodash();
75750
75706
  var { clearRequireCache, makeDirs, isFunction, isString, uniq } = require_utils$3();
@@ -75756,10 +75712,10 @@ var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
75756
75712
  let hotReloadModules = [];
75757
75713
  let extraFiles = null;
75758
75714
  function hotReloadService(service) {
75759
- const relPath = path$9.relative(process.cwd(), service.__filename);
75715
+ const relPath = path$10.relative(process.cwd(), service.__filename);
75760
75716
  broker.logger.info(`Hot reload '${service.name}' service...`, kleur.grey(relPath));
75761
75717
  return broker.destroyService(service).then(() => {
75762
- if (fs$6.existsSync(service.__filename)) try {
75718
+ if (fs$7.existsSync(service.__filename)) try {
75763
75719
  return broker.loadService(service.__filename);
75764
75720
  } catch (err) {
75765
75721
  broker.logger.error(`Failed to load service '${service.__filename}'`, err);
@@ -75791,7 +75747,7 @@ var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
75791
75747
  });
75792
75748
  broker.logger.info(kleur.bgMagenta().white().bold(`Reload ${needToReloadDedup.length} service(s)`));
75793
75749
  needToReloadDedup.forEach((svc) => {
75794
- if (typeof svc == "string") if (fs$6.existsSync(svc)) return broker.loadService(svc);
75750
+ if (typeof svc == "string") if (fs$7.existsSync(svc)) return broker.loadService(svc);
75795
75751
  else return;
75796
75752
  return hotReloadService(svc);
75797
75753
  });
@@ -75801,19 +75757,19 @@ var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
75801
75757
  broker.logger.debug("");
75802
75758
  broker.logger.debug(kleur.yellow().bold("Watching the following project files:"));
75803
75759
  projectFiles.forEach((watchItem, fName) => {
75804
- if (!fs$6.existsSync(fName)) projectFiles.delete(fName);
75760
+ if (!fs$7.existsSync(fName)) projectFiles.delete(fName);
75805
75761
  });
75806
75762
  projectFiles.forEach((watchItem, fName) => {
75807
- const relPath = path$9.relative(process.cwd(), fName);
75763
+ const relPath = path$10.relative(process.cwd(), fName);
75808
75764
  if (watchItem.brokerRestart) broker.logger.debug(` ${relPath}:`, kleur.grey("restart broker."));
75809
75765
  else if (watchItem.allServices) broker.logger.debug(` ${relPath}:`, kleur.grey("reload all services."));
75810
75766
  else if (watchItem.services.length > 0) {
75811
75767
  broker.logger.debug(` ${relPath}:`, kleur.grey(`reload ${watchItem.services.length} service(s) & ${watchItem.others.length} other(s).`));
75812
75768
  watchItem.services.forEach((svcFullname) => broker.logger.debug(kleur.grey(` ${svcFullname}`)));
75813
- watchItem.others.forEach((filename) => broker.logger.debug(kleur.grey(` ${path$9.relative(process.cwd(), filename)}`)));
75769
+ watchItem.others.forEach((filename) => broker.logger.debug(kleur.grey(` ${path$10.relative(process.cwd(), filename)}`)));
75814
75770
  }
75815
- watchItem.watcher = fs$6.watch(fName, (eventType) => {
75816
- const relPath = path$9.relative(process.cwd(), fName);
75771
+ watchItem.watcher = fs$7.watch(fName, (eventType) => {
75772
+ const relPath = path$10.relative(process.cwd(), fName);
75817
75773
  broker.logger.info(kleur.magenta().bold(`The '${relPath}' file is changed. (Event: ${eventType})`));
75818
75774
  clearRequireCache(fName);
75819
75775
  if (watchItem.others.length > 0) watchItem.others.forEach((f) => clearRequireCache(f));
@@ -75931,16 +75887,16 @@ var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
75931
75887
  broker.logger.debug(kleur.yellow().bold("Watching the following folder(s):"));
75932
75888
  folders.forEach((folder) => {
75933
75889
  makeDirs(folder);
75934
- broker.logger.debug(` ${path$9.relative(process.cwd(), folder)}/`);
75890
+ broker.logger.debug(` ${path$10.relative(process.cwd(), folder)}/`);
75935
75891
  folderWatchers.push({
75936
75892
  path: folder,
75937
75893
  watcher: watch(folder, (filename) => {
75938
75894
  if (filename.endsWith(".service.js") || filename.endsWith(".service.ts")) {
75939
- broker.logger.debug(`There is changes in '${folder}' folder: `, path$9.basename(filename));
75895
+ broker.logger.debug(`There is changes in '${folder}' folder: `, path$10.basename(filename));
75940
75896
  const isLoaded = broker.services.some((svc) => svc.__filename == filename);
75941
- const fileExists = fs$6.existsSync(filename);
75897
+ const fileExists = fs$7.existsSync(filename);
75942
75898
  if (!isLoaded && fileExists) {
75943
- broker.logger.debug("Loading new file: ", path$9.basename(filename));
75899
+ broker.logger.debug("Loading new file: ", path$10.basename(filename));
75944
75900
  needToLoad.add(filename);
75945
75901
  loadServices();
75946
75902
  }
@@ -76116,8 +76072,8 @@ var require_compression = /* @__PURE__ */ __commonJSMin(((exports, module) => {
76116
76072
  var require_transit_logger = /* @__PURE__ */ __commonJSMin(((exports, module) => {
76117
76073
  var _ = require_lodash();
76118
76074
  var kleur = require_kleur();
76119
- var fs$5 = __require("fs");
76120
- var path$8 = __require("path");
76075
+ var fs$6 = __require("fs");
76076
+ var path$9 = __require("path");
76121
76077
  var { makeDirs, safetyObject } = require_utils$3();
76122
76078
  module.exports = function TransitLoggerMiddleware(opts) {
76123
76079
  opts = _.defaultsDeep(opts, {
@@ -76142,7 +76098,7 @@ var require_transit_logger = /* @__PURE__ */ __commonJSMin(((exports, module) =>
76142
76098
  } catch {
76143
76099
  data = JSON.stringify(safetyObject(payload), payload instanceof Error ? Object.getOwnPropertyNames(payload) : null, 4);
76144
76100
  }
76145
- fs$5.writeFile(path$8.join(targetFolder, filename), data, () => {});
76101
+ fs$6.writeFile(path$9.join(targetFolder, filename), data, () => {});
76146
76102
  }
76147
76103
  const coloringSend = opts.colors && opts.colors.send ? opts.colors.send.split(".").reduce((a, b) => a[b] || a()[b], kleur) : (s) => s;
76148
76104
  const coloringReceive = opts.colors && opts.colors.receive ? opts.colors.receive.split(".").reduce((a, b) => a[b] || a()[b], kleur) : (s) => s;
@@ -76153,7 +76109,7 @@ var require_transit_logger = /* @__PURE__ */ __commonJSMin(((exports, module) =>
76153
76109
  logger = opts.logger || broker.getLogger("debug");
76154
76110
  nodeID = broker.nodeID;
76155
76111
  if (opts.folder) {
76156
- targetFolder = path$8.join(opts.folder, nodeID);
76112
+ targetFolder = path$9.join(opts.folder, nodeID);
76157
76113
  makeDirs(targetFolder);
76158
76114
  }
76159
76115
  logFn = opts.logLevel ? logger[opts.logLevel] : null;
@@ -76190,8 +76146,8 @@ var require_transit_logger = /* @__PURE__ */ __commonJSMin(((exports, module) =>
76190
76146
  var require_action_logger = /* @__PURE__ */ __commonJSMin(((exports, module) => {
76191
76147
  var _ = require_lodash();
76192
76148
  var kleur = require_kleur();
76193
- var fs$4 = __require("fs");
76194
- var path$7 = __require("path");
76149
+ var fs$5 = __require("fs");
76150
+ var path$8 = __require("path");
76195
76151
  var { makeDirs, match, isObject, safetyObject } = require_utils$3();
76196
76152
  module.exports = function ActionLoggerMiddleware(opts) {
76197
76153
  opts = _.defaultsDeep(opts, {
@@ -76220,7 +76176,7 @@ var require_action_logger = /* @__PURE__ */ __commonJSMin(((exports, module) =>
76220
76176
  } catch {
76221
76177
  data = JSON.stringify(safetyObject(payload), payload instanceof Error ? Object.getOwnPropertyNames(payload) : null, 4);
76222
76178
  }
76223
- fs$4.writeFile(path$7.join(targetFolder, filename), data, () => {});
76179
+ fs$5.writeFile(path$8.join(targetFolder, filename), data, () => {});
76224
76180
  }
76225
76181
  function isWhiteListed(actionName) {
76226
76182
  return !!opts.whitelist.find((pattern) => match(actionName, pattern));
@@ -76235,7 +76191,7 @@ var require_action_logger = /* @__PURE__ */ __commonJSMin(((exports, module) =>
76235
76191
  logger = opts.logger || broker.getLogger("debug");
76236
76192
  nodeID = broker.nodeID;
76237
76193
  if (opts.folder) {
76238
- targetFolder = path$7.join(opts.folder, nodeID);
76194
+ targetFolder = path$8.join(opts.folder, nodeID);
76239
76195
  makeDirs(targetFolder);
76240
76196
  }
76241
76197
  logFn = opts.logLevel ? logger[opts.logLevel] : null;
@@ -79437,7 +79393,7 @@ var require_service_broker = /* @__PURE__ */ __commonJSMin(((exports, module) =>
79437
79393
  var EventEmitter2 = require_eventemitter2().EventEmitter2;
79438
79394
  var _ = require_lodash();
79439
79395
  var { globSync } = require_index_min$1();
79440
- var path$6 = __require("path");
79396
+ var path$7 = __require("path");
79441
79397
  var { format } = __require("util");
79442
79398
  var Transit = require_transit();
79443
79399
  var Registry = require_registry();
@@ -79986,7 +79942,7 @@ var require_service_broker = /* @__PURE__ */ __commonJSMin(((exports, module) =>
79986
79942
  loadServices(folder = "./services", fileMask = "**/*.service.js") {
79987
79943
  this.logger.debug(`Search services in '${folder}/${fileMask}'...`);
79988
79944
  let serviceFiles;
79989
- if (Array.isArray(fileMask)) serviceFiles = fileMask.map((f) => path$6.join(folder, f));
79945
+ if (Array.isArray(fileMask)) serviceFiles = fileMask.map((f) => path$7.join(folder, f));
79990
79946
  else serviceFiles = globSync(folder + "/" + fileMask);
79991
79947
  if (serviceFiles) serviceFiles.forEach((filename) => this.loadService(filename));
79992
79948
  return serviceFiles.length;
@@ -80002,8 +79958,8 @@ var require_service_broker = /* @__PURE__ */ __commonJSMin(((exports, module) =>
80002
79958
  loadService(filePath) {
80003
79959
  let fName, schema;
80004
79960
  try {
80005
- fName = __require.resolve(path$6.resolve(filePath));
80006
- this.logger.debug(`Load service '${path$6.basename(fName)}'...`);
79961
+ fName = __require.resolve(path$7.resolve(filePath));
79962
+ this.logger.debug(`Load service '${path$7.basename(fName)}'...`);
80007
79963
  const r = __require(fName);
80008
79964
  schema = r.default != null ? r.default : r;
80009
79965
  let svc;
@@ -82986,7 +82942,7 @@ var require_leven = /* @__PURE__ */ __commonJSMin(((exports, module) => {
82986
82942
  //#region ../../node_modules/args/lib/utils.js
82987
82943
  var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
82988
82944
  var { spawn } = __require("child_process");
82989
- var path$5 = __require("path");
82945
+ var path$6 = __require("path");
82990
82946
  var camelcase = require_camelcase();
82991
82947
  var leven = require_leven();
82992
82948
  function similarityBestMatch(mainString, targetStrings) {
@@ -83147,10 +83103,10 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
83147
83103
  break;
83148
83104
  }
83149
83105
  if (process.platform === "win32") {
83150
- const binaryExt = path$5.extname(this.binary);
83106
+ const binaryExt = path$6.extname(this.binary);
83151
83107
  const mainModule = process.env.APPVEYOR ? "_fixture" : process.mainModule.filename;
83152
83108
  full = `${mainModule}-${subCommand}`;
83153
- if (path$5.extname(this.binary)) full = `${mainModule.replace(binaryExt, "")}-${subCommand}${binaryExt}`;
83109
+ if (path$6.extname(this.binary)) full = `${mainModule.replace(binaryExt, "")}-${subCommand}${binaryExt}`;
83154
83110
  args.unshift(full);
83155
83111
  this.child = spawn(process.execPath, args, { stdio: "inherit" });
83156
83112
  } else this.child = spawn(full, args, { stdio: "inherit" });
@@ -83343,7 +83299,7 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
83343
83299
  //#endregion
83344
83300
  //#region ../../node_modules/args/lib/parse.js
83345
83301
  var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
83346
- var path$4 = __require("path");
83302
+ var path$5 = __require("path");
83347
83303
  var parser = require_lib$1();
83348
83304
  module.exports = function(argv, options) {
83349
83305
  Object.assign(this.config, options);
@@ -83358,7 +83314,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
83358
83314
  }
83359
83315
  else this.printSubColor = this.printSubColor[this.config.subColor];
83360
83316
  this.raw = parser(argv.slice(1), this.config.mri || this.config.minimist);
83361
- this.binary = path$4.basename(this.raw._[0]);
83317
+ this.binary = path$5.basename(this.raw._[0]);
83362
83318
  if (this.config.version) this.checkVersion();
83363
83319
  if (this.config.help) this.checkHelp();
83364
83320
  const subCommand = this.raw._[1];
@@ -83443,8 +83399,8 @@ var require_help = /* @__PURE__ */ __commonJSMin(((exports, module) => {
83443
83399
  //#endregion
83444
83400
  //#region ../../node_modules/args/lib/version.js
83445
83401
  var require_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
83446
- var fs$3 = __require("fs");
83447
- var path$3 = __require("path");
83402
+ var fs$4 = __require("fs");
83403
+ var path$4 = __require("path");
83448
83404
  /**
83449
83405
  * Retrieves the main module package.json information.
83450
83406
  *
@@ -83455,13 +83411,13 @@ var require_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
83455
83411
  * An object containing the package.json contents or NULL if it could not be found.
83456
83412
  */
83457
83413
  function findPackage(directory) {
83458
- const file = path$3.resolve(directory, "package.json");
83459
- if (fs$3.existsSync(file) && fs$3.statSync(file).isFile()) return __require(file);
83460
- const parent = path$3.resolve(directory, "..");
83414
+ const file = path$4.resolve(directory, "package.json");
83415
+ if (fs$4.existsSync(file) && fs$4.statSync(file).isFile()) return __require(file);
83416
+ const parent = path$4.resolve(directory, "..");
83461
83417
  return parent === directory ? null : findPackage(parent);
83462
83418
  }
83463
83419
  module.exports = function() {
83464
- const pkg = findPackage(path$3.dirname(process.mainModule.filename));
83420
+ const pkg = findPackage(path$4.dirname(process.mainModule.filename));
83465
83421
  const version = pkg && pkg.version || "-/-";
83466
83422
  console.log(version);
83467
83423
  if (this.config.exit && this.config.exit.version) process.exit();
@@ -83518,8 +83474,8 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
83518
83474
  //#endregion
83519
83475
  //#region ../../node_modules/dotenv/lib/main.js
83520
83476
  var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
83521
- var fs$2 = __require("fs");
83522
- var path$2 = __require("path");
83477
+ var fs$3 = __require("fs");
83478
+ var path$3 = __require("path");
83523
83479
  var os$2 = __require("os");
83524
83480
  var crypto$1 = __require("crypto");
83525
83481
  var TIPS = [
@@ -83646,14 +83602,14 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
83646
83602
  function _vaultPath(options) {
83647
83603
  let possibleVaultPath = null;
83648
83604
  if (options && options.path && options.path.length > 0) if (Array.isArray(options.path)) {
83649
- for (const filepath of options.path) if (fs$2.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
83605
+ for (const filepath of options.path) if (fs$3.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
83650
83606
  } else possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
83651
- else possibleVaultPath = path$2.resolve(process.cwd(), ".env.vault");
83652
- if (fs$2.existsSync(possibleVaultPath)) return possibleVaultPath;
83607
+ else possibleVaultPath = path$3.resolve(process.cwd(), ".env.vault");
83608
+ if (fs$3.existsSync(possibleVaultPath)) return possibleVaultPath;
83653
83609
  return null;
83654
83610
  }
83655
83611
  function _resolveHome(envPath) {
83656
- return envPath[0] === "~" ? path$2.join(os$2.homedir(), envPath.slice(1)) : envPath;
83612
+ return envPath[0] === "~" ? path$3.join(os$2.homedir(), envPath.slice(1)) : envPath;
83657
83613
  }
83658
83614
  function _configVault(options) {
83659
83615
  const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
@@ -83666,7 +83622,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
83666
83622
  return { parsed };
83667
83623
  }
83668
83624
  function configDotenv(options) {
83669
- const dotenvPath = path$2.resolve(process.cwd(), ".env");
83625
+ const dotenvPath = path$3.resolve(process.cwd(), ".env");
83670
83626
  let encoding = "utf8";
83671
83627
  let processEnv = process.env;
83672
83628
  if (options && options.processEnv != null) processEnv = options.processEnv;
@@ -83683,7 +83639,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
83683
83639
  let lastError;
83684
83640
  const parsedAll = {};
83685
83641
  for (const path of optionPaths) try {
83686
- const parsed = DotenvModule.parse(fs$2.readFileSync(path, { encoding }));
83642
+ const parsed = DotenvModule.parse(fs$3.readFileSync(path, { encoding }));
83687
83643
  DotenvModule.populate(parsedAll, parsed, options);
83688
83644
  } catch (e) {
83689
83645
  if (debug) _debug(`failed to load ${path} ${e.message}`);
@@ -83696,7 +83652,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
83696
83652
  const keysCount = Object.keys(populated).length;
83697
83653
  const shortPaths = [];
83698
83654
  for (const filePath of optionPaths) try {
83699
- const relative = path$2.relative(process.cwd(), filePath);
83655
+ const relative = path$3.relative(process.cwd(), filePath);
83700
83656
  shortPaths.push(relative);
83701
83657
  } catch (e) {
83702
83658
  if (debug) _debug(`failed to load ${filePath} ${e.message}`);
@@ -83795,8 +83751,8 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
83795
83751
  */
83796
83752
  var ServiceBroker = require_service_broker();
83797
83753
  var utils = require_utils$3();
83798
- var fs$1 = __require("fs");
83799
- var path$1 = __require("path");
83754
+ var fs$2 = __require("fs");
83755
+ var path$2 = __require("path");
83800
83756
  var { globSync } = require_index_min$1();
83801
83757
  var inspect = __require("util").inspect;
83802
83758
  var _ = require_lodash();
@@ -83924,17 +83880,17 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
83924
83880
  let filePath;
83925
83881
  const configPath = process.env["MOLECULER_CONFIG"] || this.flags.config;
83926
83882
  if (configPath != null) {
83927
- if (path$1.isAbsolute(configPath)) filePath = this.tryConfigPath(configPath);
83883
+ if (path$2.isAbsolute(configPath)) filePath = this.tryConfigPath(configPath);
83928
83884
  else {
83929
- filePath = this.tryConfigPath(path$1.resolve(process.cwd(), configPath));
83885
+ filePath = this.tryConfigPath(path$2.resolve(process.cwd(), configPath));
83930
83886
  if (filePath == null) filePath = this.tryConfigPath(configPath, true);
83931
83887
  }
83932
83888
  if (filePath == null) return Promise.reject(/* @__PURE__ */ new Error(`Config file not found: ${configPath}`));
83933
83889
  }
83934
- if (filePath == null) filePath = this.tryConfigPath(path$1.resolve(process.cwd(), "moleculer.config.js"));
83935
- if (filePath == null) filePath = this.tryConfigPath(path$1.resolve(process.cwd(), "moleculer.config.json"));
83890
+ if (filePath == null) filePath = this.tryConfigPath(path$2.resolve(process.cwd(), "moleculer.config.js"));
83891
+ if (filePath == null) filePath = this.tryConfigPath(path$2.resolve(process.cwd(), "moleculer.config.json"));
83936
83892
  if (filePath == null) return Promise.resolve({});
83937
- const ext = path$1.extname(filePath);
83893
+ const ext = path$2.extname(filePath);
83938
83894
  switch (ext) {
83939
83895
  case ".json":
83940
83896
  case ".js":
@@ -84020,7 +83976,7 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
84020
83976
  */
84021
83977
  isDirectory(p) {
84022
83978
  try {
84023
- return fs$1.lstatSync(p).isDirectory();
83979
+ return fs$2.lstatSync(p).isDirectory();
84024
83980
  } catch {}
84025
83981
  return false;
84026
83982
  }
@@ -84032,7 +83988,7 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
84032
83988
  */
84033
83989
  isServiceFile(p) {
84034
83990
  try {
84035
- return !fs$1.lstatSync(p).isDirectory();
83991
+ return !fs$2.lstatSync(p).isDirectory();
84036
83992
  } catch {}
84037
83993
  return false;
84038
83994
  }
@@ -84057,7 +84013,7 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
84057
84013
  this.watchFolders.length = 0;
84058
84014
  const fileMask = this.flags.mask || "**/*.service.js";
84059
84015
  const serviceDir = process.env.SERVICEDIR || "";
84060
- const svcDir = path$1.isAbsolute(serviceDir) ? serviceDir : path$1.resolve(process.cwd(), serviceDir);
84016
+ const svcDir = path$2.isAbsolute(serviceDir) ? serviceDir : path$2.resolve(process.cwd(), serviceDir);
84061
84017
  let patterns = this.servicePaths;
84062
84018
  if (process.env.SERVICES || process.env.SERVICEDIR) {
84063
84019
  if (this.isDirectory(svcDir) && !process.env.SERVICES) {
@@ -84073,7 +84029,7 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
84073
84029
  if (p.startsWith("npm:")) this.loadNpmModule(p.slice(4));
84074
84030
  else {
84075
84031
  let files;
84076
- const svcPath = path$1.isAbsolute(p) ? p : path$1.resolve(svcDir, p);
84032
+ const svcPath = path$2.isAbsolute(p) ? p : path$2.resolve(svcDir, p);
84077
84033
  if (this.isDirectory(svcPath)) {
84078
84034
  if (this.config.hotReload) this.watchFolders.push(svcPath);
84079
84035
  files = globSync(svcPath + "/" + fileMask, { absolute: true });
@@ -84245,12 +84201,12 @@ var Gt = (n, t, e) => {
84245
84201
  }
84246
84202
  return h;
84247
84203
  };
84248
- 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 = new RegExp(de, "g"), hs = new RegExp(pe, "g"), as = /\\\\/g, ls = /\\{/g, cs = /\\}/g, fs = /\\,/g, us = /\\./g, ds = 1e5;
84204
+ 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 = new RegExp(de, "g"), hs = new RegExp(pe, "g"), as = /\\\\/g, ls = /\\{/g, cs = /\\}/g, fs$1 = /\\,/g, us = /\\./g, ds = 1e5;
84249
84205
  function Ht(n) {
84250
84206
  return isNaN(n) ? n.charCodeAt(0) : parseInt(n, 10);
84251
84207
  }
84252
84208
  function ps(n) {
84253
- return n.replace(as, fe).replace(ls, ue).replace(cs, qt).replace(fs, de).replace(us, pe);
84209
+ return n.replace(as, fe).replace(ls, ue).replace(cs, qt).replace(fs$1, de).replace(us, pe);
84254
84210
  }
84255
84211
  function ms(n) {
84256
84212
  return n.replace(is, "\\").replace(rs, "{").replace(ns, "}").replace(os, ",").replace(hs, ".");
@@ -87173,7 +87129,7 @@ var Li = (n, t) => typeof n == "string" ? new ot([n], t) : Array.isArray(n) ? ne
87173
87129
  return this.path.isUnknown() && this.path.lstatSync(), this.walkCBSync(this.path, this.patterns, () => this.results.end()), this.results;
87174
87130
  }
87175
87131
  };
87176
- var Pi = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux", I$1 = class {
87132
+ var Pi = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux", I = class {
87177
87133
  absolute;
87178
87134
  cwd;
87179
87135
  root;
@@ -87298,22 +87254,22 @@ var le = (n, t = {}) => {
87298
87254
  return !1;
87299
87255
  };
87300
87256
  function Bt(n, t = {}) {
87301
- return new I$1(n, t).streamSync();
87257
+ return new I(n, t).streamSync();
87302
87258
  }
87303
87259
  function Qe(n, t = {}) {
87304
- return new I$1(n, t).stream();
87260
+ return new I(n, t).stream();
87305
87261
  }
87306
87262
  function ts(n, t = {}) {
87307
- return new I$1(n, t).walkSync();
87263
+ return new I(n, t).walkSync();
87308
87264
  }
87309
87265
  async function Je(n, t = {}) {
87310
- return new I$1(n, t).walk();
87266
+ return new I(n, t).walk();
87311
87267
  }
87312
87268
  function Ut(n, t = {}) {
87313
- return new I$1(n, t).iterateSync();
87269
+ return new I(n, t).iterateSync();
87314
87270
  }
87315
87271
  function es(n, t = {}) {
87316
- return new I$1(n, t).iterate();
87272
+ return new I(n, t).iterate();
87317
87273
  }
87318
87274
  var ji = Bt, Ii = Object.assign(Qe, { sync: Bt }), zi = Ut, Bi = Object.assign(es, { sync: Ut }), Ui = Object.assign(ts, {
87319
87275
  stream: Bt,
@@ -87330,7 +87286,7 @@ var ji = Bt, Ii = Object.assign(Qe, { sync: Bt }), zi = Ut, Bi = Object.assign(e
87330
87286
  iterate: Bi,
87331
87287
  globIterateSync: Ut,
87332
87288
  iterateSync: zi,
87333
- Glob: I$1,
87289
+ Glob: I,
87334
87290
  hasMagic: le,
87335
87291
  escape: tt,
87336
87292
  unescape: W
@@ -87460,11 +87416,12 @@ import_moleculer.default.Validators;
87460
87416
  //#endregion
87461
87417
  //#region src/kernel/moleculer/mesh-mtls/tls-tcp-transporter.ts
87462
87418
  /**
87463
- * Moleculer TCP transporter with a second mTLS listener (Release A).
87419
+ * Moleculer TCP transporter with a mutual-TLS listener (D826).
87464
87420
  *
87465
- * Hub rollout: clear TCP stays on `port` (default 6000); TLS 1.3 mutual auth
87466
- * listens on `tlsPort` (default 6443). Agents without a certificate keep using
87467
- * 6000. On a TLS socket, any packet whose `sender` ≠ the peer certificate CN
87421
+ * Hub: `hubTlsOnly` — no clear TCP reader and no UDP discovery; TLS 1.3 on
87422
+ * `tlsPort` (default 6443) once mesh material is ready. Agents without mesh
87423
+ * material use clear TCP on their own listen port and dial the hub on TLS when
87424
+ * enrolled. On a TLS socket, any packet whose `sender` ≠ the peer certificate CN
87468
87425
  * is dropped.
87469
87426
  */
87470
87427
  var TcpTransporterBase = Transporters.TCP;
@@ -87508,6 +87465,7 @@ var TlsTcpTransporter = class extends TcpTransporterBase {
87508
87465
  /** Node id (certificate CN) → serial of every peer that completed a mutual-TLS handshake. */
87509
87466
  tlsPeers = /* @__PURE__ */ new Map();
87510
87467
  clearDisabled = false;
87468
+ hubTlsOnly;
87511
87469
  /** Clear-text `TcpWriter.connect` captured once before the TLS wrap (A→B). */
87512
87470
  clearWriterConnect = null;
87513
87471
  writerTlsPatched = false;
@@ -87515,6 +87473,7 @@ var TlsTcpTransporter = class extends TcpTransporterBase {
87515
87473
  super({ ...opts });
87516
87474
  this.meshTls = opts.meshTls ?? null;
87517
87475
  this.crl = opts.crl ?? processMeshCrl();
87476
+ this.hubTlsOnly = opts.hubTlsOnly === true;
87518
87477
  if (this.opts.tlsPort === void 0) this.opts.tlsPort = DEFAULT_HUB_TLS_TCP_PORT;
87519
87478
  }
87520
87479
  startTcpServer() {
@@ -87525,7 +87484,9 @@ var TlsTcpTransporter = class extends TcpTransporterBase {
87525
87484
  connect() {
87526
87485
  return this.Promise.resolve().then(() => {
87527
87486
  if (this.opts.urls) return this.loadUrls();
87528
- }).then(() => this.startTcpServer()).then(() => this.startTlsServerIfReady()).then(() => this.startUdpServer()).then(() => this.startTimers()).then(() => {
87487
+ }).then(() => this.startTcpServer()).then(() => {
87488
+ if (this.hubTlsOnly) this.disableClearTransport();
87489
+ }).then(() => this.startTlsServerIfReady()).then(() => this.hubTlsOnly ? this.Promise.resolve() : this.startUdpServer()).then(() => this.startTimers()).then(() => {
87529
87490
  this.logger.info("TCP Transporter started.");
87530
87491
  this.connected = true;
87531
87492
  this.nodes.localNode.port = this.opts.port;
@@ -87675,6 +87636,7 @@ var TlsTcpTransporter = class extends TcpTransporterBase {
87675
87636
  }
87676
87637
  /** The switch back: listen on the clear port again and restart UDP discovery. Idempotent. */
87677
87638
  async enableClearTransport() {
87639
+ if (this.hubTlsOnly) return;
87678
87640
  if (!this.clearDisabled) return;
87679
87641
  this.clearDisabled = false;
87680
87642
  if (this.reader !== null && this.reader.server?.listening !== true) await this.reader.listen();
@@ -87961,7 +87923,7 @@ var mintJoinTokenInputSchema = z.object({
87961
87923
  nodeId: z.string().min(1).optional(),
87962
87924
  /** Override hub HTTPS base (default: local-network publicEndpoint). */
87963
87925
  hubUrl: z.string().url().optional(),
87964
- /** Override `host:6000` clear mesh address carried in the token. */
87926
+ /** Override `host:6443` TLS mesh address carried in the token. */
87965
87927
  hubMeshAddress: z.string().min(3).optional(),
87966
87928
  /** Seconds until expiry; capped at 1 h. */
87967
87929
  ttlSec: z.number().int().positive().max(3600).optional()
@@ -88062,9 +88024,7 @@ var KEY_TO_SECTION = {
88062
88024
  trustedProxies: "auth",
88063
88025
  trustedNetworks: "auth",
88064
88026
  [CLUSTER_SECRET_FIELD]: "cluster",
88065
- [MESH_AUTH_MODE_FIELD]: "cluster",
88066
- [MESH_CLEAR_PORT_FIELD]: "cluster",
88067
- [AGENT_DASHBOARD_ORIGINS_FIELD]: "cluster"
88027
+ [MESH_AUTH_MODE_FIELD]: "cluster"
88068
88028
  };
88069
88029
  /** Bytes of a generated cluster secret (D802) — 256 bits, base64url (43 chars). */
88070
88030
  var GENERATED_SECRET_BYTES = 32;
@@ -88092,8 +88052,6 @@ var SystemConfigAddon = class extends BaseAddon {
88092
88052
  id = "system-config";
88093
88053
  clusterSecretKeeper = null;
88094
88054
  meshCaKeeper = null;
88095
- /** One warn per process when a retired cutover key is posted with a cluster save. */
88096
- retiredClusterCutoverPatchWarned = false;
88097
88055
  constructor() {
88098
88056
  super({});
88099
88057
  }
@@ -88122,7 +88080,6 @@ var SystemConfigAddon = class extends BaseAddon {
88122
88080
  onReady: (ca) => this.onMeshCaReady(ca)
88123
88081
  });
88124
88082
  await this.meshCaKeeper.start();
88125
- await this.applyStoredClearPort();
88126
88083
  this.ctx.logger.info("Initialized — exposes yml-backed sections via getGlobalSettings");
88127
88084
  return {
88128
88085
  customActions: systemConfigMeshActions,
@@ -88139,20 +88096,6 @@ var SystemConfigAddon = class extends BaseAddon {
88139
88096
  this.clusterSecretKeeper?.stop();
88140
88097
  this.clusterSecretKeeper = null;
88141
88098
  }
88142
- /**
88143
- * Boot: a stored `meshClearPort: off` is the operator's standing choice, so it
88144
- * is applied WITHOUT the agents gate (nobody is connected yet to be checked).
88145
- * Default `on` changes nothing.
88146
- */
88147
- async applyStoredClearPort() {
88148
- try {
88149
- const stored = (await this.ctx.settings?.getSection("cluster"))?.[MESH_CLEAR_PORT_FIELD];
88150
- if (parseMeshClearPortMode(stored) !== "off") return;
88151
- if (await applyProcessMeshClearPort("off")) this.ctx.logger.info("Mesh clear port is OFF (cluster.meshClearPort)");
88152
- } catch (err) {
88153
- this.ctx.logger.warn("could not apply cluster.meshClearPort at boot", { meta: { error: errMsg(err) } });
88154
- }
88155
- }
88156
88099
  async onMeshCaReady(ca) {
88157
88100
  const hubLeaf = await issueMeshLeafForNode(ca, "hub");
88158
88101
  await requestProcessMeshTlsEnable({
@@ -88230,10 +88173,10 @@ var SystemConfigAddon = class extends BaseAddon {
88230
88173
  async resolveHubMeshAddress() {
88231
88174
  try {
88232
88175
  const base = (await this.ctx.api?.localNetwork?.getAddresses?.query({}))?.roles?.internal?.resolved;
88233
- if (typeof base === "string" && base.length > 0) return `${new URL(base).hostname}:${DEFAULT_HUB_TCP_PORT}`;
88176
+ if (typeof base === "string" && base.length > 0) return `${new URL(base).hostname}:${DEFAULT_HUB_TLS_TCP_PORT}`;
88234
88177
  } catch {}
88235
88178
  const host = (await this.ctx.settings?.getSection("server"))?.["host"];
88236
- return `${typeof host === "string" && host.length > 0 && host !== "0.0.0.0" ? host : "127.0.0.1"}:${DEFAULT_HUB_TCP_PORT}`;
88179
+ return `${typeof host === "string" && host.length > 0 && host !== "0.0.0.0" ? host : "127.0.0.1"}:${DEFAULT_HUB_TLS_TCP_PORT}`;
88237
88180
  }
88238
88181
  /** The keychain handle for owner `system`; `null` where there is no door. */
88239
88182
  systemSecrets() {
@@ -88374,6 +88317,14 @@ var SystemConfigAddon = class extends BaseAddon {
88374
88317
  if (!this.ctx.settings) throw new Error("system-config: ctx.settings not available — cannot write sections");
88375
88318
  const perSection = /* @__PURE__ */ new Map();
88376
88319
  for (const [key, value] of Object.entries(patch)) {
88320
+ if (key === "meshClearPort") {
88321
+ this.ctx.logger.warn("cluster.meshClearPort is retired (D826) — the hub mesh is TLS-only; ignoring this patch");
88322
+ continue;
88323
+ }
88324
+ if (key === "agentDashboardOrigins") {
88325
+ this.ctx.logger.warn("cluster.agentDashboardOrigins is no longer writable from settings — ignoring this patch");
88326
+ continue;
88327
+ }
88377
88328
  const section = KEY_TO_SECTION[key];
88378
88329
  if (section === void 0) {
88379
88330
  this.ctx.logger.warn("update ignored unknown key (not mapped to any section)", { meta: { key } });
@@ -88414,8 +88365,7 @@ var SystemConfigAddon = class extends BaseAddon {
88414
88365
  * enforced (D821) — a legacy `meshAuth` in the patch is ignored.
88415
88366
  */
88416
88367
  async writeClusterSection(patch) {
88417
- const { [MESH_AUTH_MODE_FIELD]: _legacyMode, [MESH_CLEAR_PORT_FIELD]: clearPort, [AGENT_DASHBOARD_ORIGINS_FIELD]: dashboardOrigins, ...secretPatch } = patch;
88418
- if (clearPort !== void 0 || dashboardOrigins !== void 0) this.warnRetiredClusterCutoverPatch(clearPort !== void 0, dashboardOrigins !== void 0);
88368
+ const { [MESH_AUTH_MODE_FIELD]: _legacyMode, ...secretPatch } = patch;
88419
88369
  await this.writeMeshAuthMode("enforced");
88420
88370
  if (Object.keys(secretPatch).length === 0) return;
88421
88371
  if (isSecretClear(secretPatch["clusterSecret"])) throw new Error("The cluster secret is mandatory and cannot be cleared — save a new value to rotate it");
@@ -88423,15 +88373,6 @@ var SystemConfigAddon = class extends BaseAddon {
88423
88373
  this.ctx.logger.info("Cluster secret updated");
88424
88374
  await this.clusterSecretKeeper?.reload();
88425
88375
  }
88426
- /** Cutover keys were removed from the Cluster form; ignore stray posts from stale clients. */
88427
- warnRetiredClusterCutoverPatch(hadMeshClearPort, hadAgentDashboardOrigins) {
88428
- if (this.retiredClusterCutoverPatchWarned) return;
88429
- this.retiredClusterCutoverPatchWarned = true;
88430
- this.ctx.logger.warn("cluster save ignored retired cutover field(s) — use Pipeline → Cluster / Nodes", { meta: {
88431
- meshClearPort: hadMeshClearPort,
88432
- agentDashboardOrigins: hadAgentDashboardOrigins
88433
- } });
88434
- }
88435
88376
  /** Persist + publish mesh auth mode (always `enforced` after D821). */
88436
88377
  async writeMeshAuthMode(mode) {
88437
88378
  await this.ctx.settings.setSection("cluster", { [MESH_AUTH_MODE_FIELD]: mode });
@@ -88510,4 +88451,4 @@ function readJwtExp(token) {
88510
88451
  return typeof exp === "number" ? exp : 0;
88511
88452
  }
88512
88453
  //#endregion
88513
- export { loadMeshCa as A, MESH_AUTH_MODE_FIELD as B, caFingerprintCompact as C, generateMeshKeyPair as D, generateMeshCa as E, UnlockTicketJtiStore as F, requestProcessMeshEnforcement as G, getProcessMeshAuthStatus as H, isAllowedAgentDashboardReturnTo as I, setProcessMeshEnforcer as J, setProcessMeshAuthMode as K, mintAgentUiUnlockTicket as L, AGENT_UI_UNLOCK_DOMAIN as M, AGENT_UI_UNLOCK_TTL_MS as N, issueMeshLeafForNode as O, AGENT_UI_UNLOCK_VERSION as P, readCidrSetting as Q, parseAgentDashboardOrigins as R, caFingerprint as S, SYSTEM_CONFIG_CLUSTER_SECTION_ID, SystemConfigAddon, SystemConfigAddon as default, exportMeshPrivateKeyPem as T, isMeshAuthMode as U, getProcessMeshAuthMode as V, parseMeshAuthMode as W, normalizeIp as X, createCidrMatcher as Y, parseCidrList as Z, MeshCrl as _, setProcessMeshTlsEnabler as a, getProcessMeshCaState as b, mintMeshJoinToken as c, MESH_CLEAR_PORT_FIELD as d, applyProcessMeshClearPort as f, setProcessMeshClearPortControl as g, getProcessNodeMeshTransport as h, ServiceBroker as i, AGENT_DASHBOARD_ORIGINS_FIELD as j, issueMeshLeafFromCsr as k, processJoinTokenJtiStore as l, decideMeshClearPortOff as m, TlsTcpTransporter as n, enrollMeshNode as o, checkProcessMeshClearPort as p, setProcessMeshAuthStatusSource as q, Errors as r, JoinTokenJtiStore as s, systemConfigMeshActions as t, verifyMeshJoinToken as u, processMeshCrl as v, createMeshCsrPem as w, requireProcessMeshCa as x, MeshCaKeeper as y, verifyAgentUiUnlockTicket as z };
88454
+ export { AGENT_UI_UNLOCK_VERSION as A, parseMeshAuthMode as B, generateMeshKeyPair as C, AGENT_DASHBOARD_ORIGINS_FIELD as D, loadMeshCa as E, verifyAgentUiUnlockTicket as F, createCidrMatcher as G, setProcessMeshAuthMode as H, MESH_AUTH_MODE_FIELD as I, readCidrSetting as J, normalizeIp as K, getProcessMeshAuthMode as L, isAllowedAgentDashboardReturnTo as M, mintAgentUiUnlockTicket as N, AGENT_UI_UNLOCK_DOMAIN as O, parseAgentDashboardOrigins as P, getProcessMeshAuthStatus as R, generateMeshCa as S, SYSTEM_CONFIG_CLUSTER_SECTION_ID, SystemConfigAddon, SystemConfigAddon as default, issueMeshLeafFromCsr as T, setProcessMeshAuthStatusSource as U, requestProcessMeshEnforcement as V, setProcessMeshEnforcer as W, requireProcessMeshCa as _, setProcessMeshTlsEnabler as a, createMeshCsrPem as b, mintMeshJoinToken as c, getProcessNodeMeshTransport as d, setProcessMeshPeerTransportLookup as f, getProcessMeshCaState as g, MeshCaKeeper as h, ServiceBroker as i, UnlockTicketJtiStore as j, AGENT_UI_UNLOCK_TTL_MS as k, processJoinTokenJtiStore as l, processMeshCrl as m, TlsTcpTransporter as n, enrollMeshNode as o, MeshCrl as p, parseCidrList as q, Errors as r, JoinTokenJtiStore as s, systemConfigMeshActions as t, verifyMeshJoinToken as u, caFingerprint as v, issueMeshLeafForNode as w, exportMeshPrivateKeyPem as x, caFingerprintCompact as y, isMeshAuthMode as z };