@camstack/server 1.2.932 → 1.2.934
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/api/trpc/generated-cap-routers.js +20 -0
- package/package.json +8 -7
- package/system/dist/addon-utils.mjs +1 -1
- package/system/dist/{base-device-IuM1AwXZ.mjs → base-device-Bwiblqmn.mjs} +1 -1
- package/system/dist/{base-device-2sL1DMm1.js → base-device-C1z4zYGR.js} +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +3 -3
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +4 -4
- package/system/dist/builtins/alerts/alerts.addon.js +2 -2
- package/system/dist/builtins/alerts/alerts.addon.mjs +4 -4
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +4 -4
- package/system/dist/builtins/camera-grid/index.js +2 -2
- package/system/dist/builtins/camera-grid/index.mjs +2 -2
- package/system/dist/builtins/composer/composer.addon.js +5 -5
- package/system/dist/builtins/composer/composer.addon.mjs +5 -5
- package/system/dist/builtins/core-blocks/cap-links.d.ts +34 -0
- package/system/dist/builtins/core-blocks/core-blocks.addon.d.ts +4 -0
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +282 -8
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +282 -8
- package/system/dist/builtins/device-manager/device-manager.addon.js +18 -4
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +18 -4
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +3 -3
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +9 -9
- package/system/dist/builtins/platform-probe/index.mjs +9 -9
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +19 -19
- package/system/dist/builtins/system-config/system-config.addon.mjs +113 -113
- package/system/dist/{composition-sources-BEUWn2s_.mjs → composition-sources-B0QW4g86.mjs} +2 -2
- package/system/dist/{composition-sources-acfR4hDq.js → composition-sources-BtUx1MfU.js} +2 -2
- package/system/dist/{coral-accelerators-zTMTEd-8.mjs → coral-accelerators-BKcXP59c.mjs} +6 -6
- package/system/dist/{core-blocks.cap-BRPsLAij.mjs → core-blocks.cap-CnwBuf7E.mjs} +1524 -1267
- package/system/dist/{core-blocks.cap-BMeMCBrx.js → core-blocks.cap-DlEuHq-S.js} +1555 -1268
- package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
- package/system/dist/{error.cap-CSM_SRfR.mjs → error.cap-5zNPAgU2.mjs} +19 -2
- package/system/dist/{error.cap-DBhgPeWK.js → error.cap-BCqzFlo2.js} +24 -1
- package/system/dist/{hub-identity-_IOgPJ00.mjs → hub-identity-DjMN9Ac2.mjs} +9 -9
- package/system/dist/{hub-mdns-ciao-Dk7ts_Uk.mjs → hub-mdns-ciao-DBrtHOcc.mjs} +1 -1
- package/system/dist/index.js +2 -2
- package/system/dist/index.mjs +214 -214
- package/system/dist/{prefix-walk-ifwg_ukx.mjs → prefix-walk-CRnbYJcC.mjs} +2 -2
- package/system/dist/{prefix-walk-BkMxoXpL.js → prefix-walk-DD1BM923.js} +2 -2
- package/system/dist/{rename-composition-block-BJsL58Ih.js → rename-composition-block-BRgyBO25.js} +20 -2
- package/system/dist/{rename-composition-block-OAtErZgq.mjs → rename-composition-block-BYRBlx-V.mjs} +20 -2
- package/system/dist/{restore-archive-kSFNjkWY.mjs → restore-archive-CjAyKpgX.mjs} +93 -93
- package/system/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { n as ServerNameSchema, r as shortHostname } from "../../server-name-BIh
|
|
|
5
5
|
import { n as defineCustomActions, t as customAction } from "../../custom-actions-BFUSalC9.mjs";
|
|
6
6
|
import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
|
|
7
7
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension } from "../../x509.es-BRiJgOvu.mjs";
|
|
8
|
-
import { B as AGENT_HTTPS_NAMES_COLLECTION, G as systemConfigRecordKinds, H as AgentHttpsNames, I as isLocalOnlyHostname, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, m as isPrivateAddress, r as isAnnouncedHubId } from "../../hub-identity-
|
|
8
|
+
import { B as AGENT_HTTPS_NAMES_COLLECTION, G as systemConfigRecordKinds, H as AgentHttpsNames, I as isLocalOnlyHostname, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, m as isPrivateAddress, r as isAnnouncedHubId } from "../../hub-identity-DjMN9Ac2.mjs";
|
|
9
9
|
import { a as MESH_CA_KEY_REF, c as MESH_LEAF_NOT_AFTER, 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 } from "../../constants-DB4piTD5.mjs";
|
|
10
10
|
import { t as require_src } from "../../src-hG4grMU4.mjs";
|
|
11
11
|
import { z } from "zod";
|
|
@@ -21502,7 +21502,7 @@ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
21502
21502
|
var kleur = require_kleur();
|
|
21503
21503
|
var os$17 = __require("os");
|
|
21504
21504
|
var path$39 = __require("path");
|
|
21505
|
-
var fs$
|
|
21505
|
+
var fs$19 = __require("fs");
|
|
21506
21506
|
var { TimeoutError } = require_errors$2();
|
|
21507
21507
|
var lut = [];
|
|
21508
21508
|
for (let i = 0; i < 256; i++) lut[i] = (i < 16 ? "0" : "") + i.toString(16);
|
|
@@ -21795,7 +21795,7 @@ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
21795
21795
|
makeDirs(p) {
|
|
21796
21796
|
p.split(path$39.sep).reduce((prevPath, folder) => {
|
|
21797
21797
|
const currentPath = path$39.join(prevPath, folder, path$39.sep);
|
|
21798
|
-
if (!fs$
|
|
21798
|
+
if (!fs$19.existsSync(currentPath)) fs$19.mkdirSync(currentPath);
|
|
21799
21799
|
return currentPath;
|
|
21800
21800
|
}, "");
|
|
21801
21801
|
},
|
|
@@ -23021,7 +23021,7 @@ var require_csv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
23021
23021
|
var { makeDirs } = require_utils$3();
|
|
23022
23022
|
var _ = require_lodash();
|
|
23023
23023
|
var path$38 = __require("path");
|
|
23024
|
-
var fs$
|
|
23024
|
+
var fs$18 = __require("fs");
|
|
23025
23025
|
var METRIC = require_constants$6();
|
|
23026
23026
|
var MODE_METRIC = "metric";
|
|
23027
23027
|
var MODE_LABEL = "label";
|
|
@@ -23180,8 +23180,8 @@ var require_csv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
23180
23180
|
*/
|
|
23181
23181
|
writeRow(filename, headers, fields) {
|
|
23182
23182
|
try {
|
|
23183
|
-
if (!fs$
|
|
23184
|
-
fs$
|
|
23183
|
+
if (!fs$18.existsSync(filename)) fs$18.writeFileSync(filename, headers.join(this.opts.delimiter) + this.opts.rowDelimiter);
|
|
23184
|
+
fs$18.appendFileSync(filename, fields.join(this.opts.delimiter) + this.opts.rowDelimiter);
|
|
23185
23185
|
} catch (err) {
|
|
23186
23186
|
/* istanbul ignore next */
|
|
23187
23187
|
this.logger.error(`Unable to write metrics values to the '${filename}' file. Error: ${err.message}`, fields, err);
|
|
@@ -31213,7 +31213,7 @@ var require_process$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31213
31213
|
//#endregion
|
|
31214
31214
|
//#region ../../node_modules/detect-libc/lib/filesystem.js
|
|
31215
31215
|
var require_filesystem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
31216
|
-
var fs$
|
|
31216
|
+
var fs$17 = __require("fs");
|
|
31217
31217
|
var LDD_PATH = "/usr/bin/ldd";
|
|
31218
31218
|
var SELF_PATH = "/proc/self/exe";
|
|
31219
31219
|
var MAX_LENGTH = 2048;
|
|
@@ -31224,10 +31224,10 @@ var require_filesystem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31224
31224
|
* @returns {Buffer}
|
|
31225
31225
|
*/
|
|
31226
31226
|
var readFileSync = (path) => {
|
|
31227
|
-
const fd = fs$
|
|
31227
|
+
const fd = fs$17.openSync(path, "r");
|
|
31228
31228
|
const buffer = Buffer.alloc(MAX_LENGTH);
|
|
31229
|
-
const bytesRead = fs$
|
|
31230
|
-
fs$
|
|
31229
|
+
const bytesRead = fs$17.readSync(fd, buffer, 0, MAX_LENGTH, 0);
|
|
31230
|
+
fs$17.close(fd, () => {});
|
|
31231
31231
|
return buffer.subarray(0, bytesRead);
|
|
31232
31232
|
};
|
|
31233
31233
|
/**
|
|
@@ -31237,13 +31237,13 @@ var require_filesystem = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31237
31237
|
* @returns {Promise<Buffer>}
|
|
31238
31238
|
*/
|
|
31239
31239
|
var readFile = (path) => new Promise((resolve, reject) => {
|
|
31240
|
-
fs$
|
|
31240
|
+
fs$17.open(path, "r", (err, fd) => {
|
|
31241
31241
|
if (err) reject(err);
|
|
31242
31242
|
else {
|
|
31243
31243
|
const buffer = Buffer.alloc(MAX_LENGTH);
|
|
31244
|
-
fs$
|
|
31244
|
+
fs$17.read(fd, buffer, 0, MAX_LENGTH, 0, (_, bytesRead) => {
|
|
31245
31245
|
resolve(buffer.subarray(0, bytesRead));
|
|
31246
|
-
fs$
|
|
31246
|
+
fs$17.close(fd, () => {});
|
|
31247
31247
|
});
|
|
31248
31248
|
}
|
|
31249
31249
|
});
|
|
@@ -31496,7 +31496,7 @@ var require_detect_libc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31496
31496
|
//#endregion
|
|
31497
31497
|
//#region ../../node_modules/node-gyp-build-optional-packages/index.js
|
|
31498
31498
|
var require_node_gyp_build_optional_packages = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
31499
|
-
var fs$
|
|
31499
|
+
var fs$16 = __require("fs");
|
|
31500
31500
|
var path$37 = __require("path");
|
|
31501
31501
|
var url$2 = __require("url");
|
|
31502
31502
|
var vars = process.config && process.config.variables || {};
|
|
@@ -31563,7 +31563,7 @@ var require_node_gyp_build_optional_packages = /* @__PURE__ */ __commonJSMin(((e
|
|
|
31563
31563
|
};
|
|
31564
31564
|
function readdirSync(dir) {
|
|
31565
31565
|
try {
|
|
31566
|
-
return fs$
|
|
31566
|
+
return fs$16.readdirSync(dir);
|
|
31567
31567
|
} catch (err) {
|
|
31568
31568
|
return [];
|
|
31569
31569
|
}
|
|
@@ -37042,7 +37042,7 @@ var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37042
37042
|
var require_file$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
37043
37043
|
var FormattedLogger = require_formatted();
|
|
37044
37044
|
var _ = require_lodash();
|
|
37045
|
-
var fs$
|
|
37045
|
+
var fs$15 = __require("fs/promises");
|
|
37046
37046
|
var path$36 = __require("path");
|
|
37047
37047
|
var os$11 = __require("os");
|
|
37048
37048
|
var { makeDirs } = require_utils$3();
|
|
@@ -37146,7 +37146,7 @@ var require_file$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
37146
37146
|
const rows = Array.from(this.queue);
|
|
37147
37147
|
this.queue.length = 0;
|
|
37148
37148
|
const buf = rows.join(this.opts.eol) + this.opts.eol;
|
|
37149
|
-
return fs$
|
|
37149
|
+
return fs$15.appendFile(filename, buf).catch((err) => {
|
|
37150
37150
|
/* istanbul ignore next */
|
|
37151
37151
|
console.debug("Unable to write log file:", filename, err);
|
|
37152
37152
|
});
|
|
@@ -38664,7 +38664,7 @@ var require_clone = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38664
38664
|
//#endregion
|
|
38665
38665
|
//#region ../../node_modules/graceful-fs/graceful-fs.js
|
|
38666
38666
|
var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
38667
|
-
var fs$
|
|
38667
|
+
var fs$14 = __require("fs");
|
|
38668
38668
|
var polyfills = require_polyfills();
|
|
38669
38669
|
var legacy = require_legacy_streams();
|
|
38670
38670
|
var clone = require_clone();
|
|
@@ -38693,36 +38693,36 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38693
38693
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
38694
38694
|
console.error(m);
|
|
38695
38695
|
};
|
|
38696
|
-
if (!fs$
|
|
38697
|
-
publishQueue(fs$
|
|
38698
|
-
fs$
|
|
38696
|
+
if (!fs$14[gracefulQueue]) {
|
|
38697
|
+
publishQueue(fs$14, global[gracefulQueue] || []);
|
|
38698
|
+
fs$14.close = (function(fs$close) {
|
|
38699
38699
|
function close(fd, cb) {
|
|
38700
|
-
return fs$close.call(fs$
|
|
38700
|
+
return fs$close.call(fs$14, fd, function(err) {
|
|
38701
38701
|
if (!err) resetQueue();
|
|
38702
38702
|
if (typeof cb === "function") cb.apply(this, arguments);
|
|
38703
38703
|
});
|
|
38704
38704
|
}
|
|
38705
38705
|
Object.defineProperty(close, previousSymbol, { value: fs$close });
|
|
38706
38706
|
return close;
|
|
38707
|
-
})(fs$
|
|
38708
|
-
fs$
|
|
38707
|
+
})(fs$14.close);
|
|
38708
|
+
fs$14.closeSync = (function(fs$closeSync) {
|
|
38709
38709
|
function closeSync(fd) {
|
|
38710
|
-
fs$closeSync.apply(fs$
|
|
38710
|
+
fs$closeSync.apply(fs$14, arguments);
|
|
38711
38711
|
resetQueue();
|
|
38712
38712
|
}
|
|
38713
38713
|
Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync });
|
|
38714
38714
|
return closeSync;
|
|
38715
|
-
})(fs$
|
|
38715
|
+
})(fs$14.closeSync);
|
|
38716
38716
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) process.on("exit", function() {
|
|
38717
|
-
debug(fs$
|
|
38718
|
-
__require("assert").equal(fs$
|
|
38717
|
+
debug(fs$14[gracefulQueue]);
|
|
38718
|
+
__require("assert").equal(fs$14[gracefulQueue].length, 0);
|
|
38719
38719
|
});
|
|
38720
38720
|
}
|
|
38721
|
-
if (!global[gracefulQueue]) publishQueue(global, fs$
|
|
38722
|
-
module.exports = patch(clone(fs$
|
|
38723
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$
|
|
38724
|
-
module.exports = patch(fs$
|
|
38725
|
-
fs$
|
|
38721
|
+
if (!global[gracefulQueue]) publishQueue(global, fs$14[gracefulQueue]);
|
|
38722
|
+
module.exports = patch(clone(fs$14));
|
|
38723
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$14.__patched) {
|
|
38724
|
+
module.exports = patch(fs$14);
|
|
38725
|
+
fs$14.__patched = true;
|
|
38726
38726
|
}
|
|
38727
38727
|
function patch(fs) {
|
|
38728
38728
|
polyfills(fs);
|
|
@@ -38977,23 +38977,23 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38977
38977
|
}
|
|
38978
38978
|
function enqueue(elem) {
|
|
38979
38979
|
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
38980
|
-
fs$
|
|
38980
|
+
fs$14[gracefulQueue].push(elem);
|
|
38981
38981
|
retry();
|
|
38982
38982
|
}
|
|
38983
38983
|
var retryTimer;
|
|
38984
38984
|
function resetQueue() {
|
|
38985
38985
|
var now = Date.now();
|
|
38986
|
-
for (var i = 0; i < fs$
|
|
38987
|
-
fs$
|
|
38988
|
-
fs$
|
|
38986
|
+
for (var i = 0; i < fs$14[gracefulQueue].length; ++i) if (fs$14[gracefulQueue][i].length > 2) {
|
|
38987
|
+
fs$14[gracefulQueue][i][3] = now;
|
|
38988
|
+
fs$14[gracefulQueue][i][4] = now;
|
|
38989
38989
|
}
|
|
38990
38990
|
retry();
|
|
38991
38991
|
}
|
|
38992
38992
|
function retry() {
|
|
38993
38993
|
clearTimeout(retryTimer);
|
|
38994
38994
|
retryTimer = void 0;
|
|
38995
|
-
if (fs$
|
|
38996
|
-
var elem = fs$
|
|
38995
|
+
if (fs$14[gracefulQueue].length === 0) return;
|
|
38996
|
+
var elem = fs$14[gracefulQueue].shift();
|
|
38997
38997
|
var fn = elem[0];
|
|
38998
38998
|
var args = elem[1];
|
|
38999
38999
|
var err = elem[2];
|
|
@@ -39012,7 +39012,7 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
39012
39012
|
if (sinceAttempt >= Math.min(sinceStart * 1.2, 100)) {
|
|
39013
39013
|
debug("RETRY", fn.name, args);
|
|
39014
39014
|
fn.apply(null, args.concat([startTime]));
|
|
39015
|
-
} else fs$
|
|
39015
|
+
} else fs$14[gracefulQueue].push(elem);
|
|
39016
39016
|
}
|
|
39017
39017
|
if (retryTimer === void 0) retryTimer = setTimeout(retry, 0);
|
|
39018
39018
|
}
|
|
@@ -40567,9 +40567,9 @@ var require_output = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
40567
40567
|
//#region ../../node_modules/streamroller/node_modules/fs-extra/lib/index.js
|
|
40568
40568
|
var require_lib$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40569
40569
|
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());
|
|
40570
|
-
var fs$
|
|
40571
|
-
if (Object.getOwnPropertyDescriptor(fs$
|
|
40572
|
-
return fs$
|
|
40570
|
+
var fs$13 = __require("fs");
|
|
40571
|
+
if (Object.getOwnPropertyDescriptor(fs$13, "promises")) Object.defineProperty(module.exports, "promises", { get() {
|
|
40572
|
+
return fs$13.promises;
|
|
40573
40573
|
} });
|
|
40574
40574
|
}));
|
|
40575
40575
|
//#endregion
|
|
@@ -41233,12 +41233,12 @@ var require_dateFile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41233
41233
|
var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
41234
41234
|
var debug = require_src()("log4js:fileSync");
|
|
41235
41235
|
var path$13 = __require("path");
|
|
41236
|
-
var fs$
|
|
41236
|
+
var fs$12 = __require("fs");
|
|
41237
41237
|
var eol = __require("os").EOL || "\n";
|
|
41238
41238
|
function touchFile(file, options) {
|
|
41239
|
-
if (fs$
|
|
41240
|
-
const id = fs$
|
|
41241
|
-
fs$
|
|
41239
|
+
if (fs$12.existsSync(file)) return;
|
|
41240
|
+
const id = fs$12.openSync(file, options.flags, options.mode);
|
|
41241
|
+
fs$12.closeSync(id);
|
|
41242
41242
|
}
|
|
41243
41243
|
var RollingFileSync = class {
|
|
41244
41244
|
constructor(filename, size, backups, options) {
|
|
@@ -41255,7 +41255,7 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41255
41255
|
function currentFileSize(file) {
|
|
41256
41256
|
let fileSize = 0;
|
|
41257
41257
|
try {
|
|
41258
|
-
fileSize = fs$
|
|
41258
|
+
fileSize = fs$12.statSync(file).size;
|
|
41259
41259
|
} catch (e) {
|
|
41260
41260
|
touchFile(file, options);
|
|
41261
41261
|
}
|
|
@@ -41286,15 +41286,15 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41286
41286
|
debug(`Index of ${fileToRename} is ${idx}`);
|
|
41287
41287
|
if (idx < that.backups) {
|
|
41288
41288
|
try {
|
|
41289
|
-
fs$
|
|
41289
|
+
fs$12.unlinkSync(`${filename}.${idx + 1}`);
|
|
41290
41290
|
} catch (e) {}
|
|
41291
41291
|
debug(`Renaming ${fileToRename} -> ${filename}.${idx + 1}`);
|
|
41292
|
-
fs$
|
|
41292
|
+
fs$12.renameSync(path$13.join(path$13.dirname(filename), fileToRename), `${filename}.${idx + 1}`);
|
|
41293
41293
|
}
|
|
41294
41294
|
}
|
|
41295
41295
|
function renameTheFiles() {
|
|
41296
41296
|
debug("Renaming the old files");
|
|
41297
|
-
fs$
|
|
41297
|
+
fs$12.readdirSync(path$13.dirname(filename)).filter(justTheseFiles).sort(byIndex).reverse().forEach(increaseFileIndex);
|
|
41298
41298
|
}
|
|
41299
41299
|
debug("Rolling, rolling, rolling");
|
|
41300
41300
|
renameTheFiles();
|
|
@@ -41304,7 +41304,7 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41304
41304
|
function writeTheChunk() {
|
|
41305
41305
|
debug("writing the chunk to the file");
|
|
41306
41306
|
that.currentSize += chunk.length;
|
|
41307
|
-
fs$
|
|
41307
|
+
fs$12.appendFileSync(that.filename, chunk);
|
|
41308
41308
|
}
|
|
41309
41309
|
debug("in write");
|
|
41310
41310
|
if (this.shouldRoll()) {
|
|
@@ -41339,7 +41339,7 @@ var require_fileSync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41339
41339
|
else stream = ((f) => {
|
|
41340
41340
|
touchFile(f, options);
|
|
41341
41341
|
return { write(data) {
|
|
41342
|
-
fs$
|
|
41342
|
+
fs$12.appendFileSync(f, data);
|
|
41343
41343
|
} };
|
|
41344
41344
|
})(filePath);
|
|
41345
41345
|
return stream;
|
|
@@ -41938,7 +41938,7 @@ var require_log4js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41938
41938
|
* Website: http://log4js.berlios.de
|
|
41939
41939
|
*/
|
|
41940
41940
|
var debug = require_src()("log4js:main");
|
|
41941
|
-
var fs$
|
|
41941
|
+
var fs$11 = __require("fs");
|
|
41942
41942
|
var deepClone = require_rfdc()({ proto: true });
|
|
41943
41943
|
var configuration = require_configuration();
|
|
41944
41944
|
var layouts = require_layouts();
|
|
@@ -41959,7 +41959,7 @@ var require_log4js$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
41959
41959
|
function loadConfigurationFile(filename) {
|
|
41960
41960
|
debug(`Loading configuration from ${filename}`);
|
|
41961
41961
|
try {
|
|
41962
|
-
return JSON.parse(fs$
|
|
41962
|
+
return JSON.parse(fs$11.readFileSync(filename, "utf8"));
|
|
41963
41963
|
} catch (e) {
|
|
41964
41964
|
throw new Error(`Problem reading config from file "${filename}". Error was ${e.message}`, e);
|
|
41965
41965
|
}
|
|
@@ -43047,7 +43047,7 @@ var require_atomic_sleep = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43047
43047
|
//#endregion
|
|
43048
43048
|
//#region ../../node_modules/sonic-boom/index.js
|
|
43049
43049
|
var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
43050
|
-
var fs$
|
|
43050
|
+
var fs$10 = __require("fs");
|
|
43051
43051
|
var EventEmitter$8 = __require("events");
|
|
43052
43052
|
var inherits = __require("util").inherits;
|
|
43053
43053
|
var path$11 = __require("path");
|
|
@@ -43090,17 +43090,17 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43090
43090
|
const flags = sonic.append ? "a" : "w";
|
|
43091
43091
|
const mode = sonic.mode;
|
|
43092
43092
|
if (sonic.sync) try {
|
|
43093
|
-
if (sonic.mkdir) fs$
|
|
43094
|
-
fileOpened(null, fs$
|
|
43093
|
+
if (sonic.mkdir) fs$10.mkdirSync(path$11.dirname(file), { recursive: true });
|
|
43094
|
+
fileOpened(null, fs$10.openSync(file, flags, mode));
|
|
43095
43095
|
} catch (err) {
|
|
43096
43096
|
fileOpened(err);
|
|
43097
43097
|
throw err;
|
|
43098
43098
|
}
|
|
43099
|
-
else if (sonic.mkdir) fs$
|
|
43099
|
+
else if (sonic.mkdir) fs$10.mkdir(path$11.dirname(file), { recursive: true }, (err) => {
|
|
43100
43100
|
if (err) return fileOpened(err);
|
|
43101
|
-
fs$
|
|
43101
|
+
fs$10.open(file, flags, mode, fileOpened);
|
|
43102
43102
|
});
|
|
43103
|
-
else fs$
|
|
43103
|
+
else fs$10.open(file, flags, mode, fileOpened);
|
|
43104
43104
|
}
|
|
43105
43105
|
function SonicBoom(opts) {
|
|
43106
43106
|
if (!(this instanceof SonicBoom)) return new SonicBoom(opts);
|
|
@@ -43138,8 +43138,8 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43138
43138
|
this.flush = flushBuffer;
|
|
43139
43139
|
this.flushSync = flushBufferSync;
|
|
43140
43140
|
this._actualWrite = actualWriteBuffer;
|
|
43141
|
-
fsWriteSync = () => fs$
|
|
43142
|
-
fsWrite = () => fs$
|
|
43141
|
+
fsWriteSync = () => fs$10.writeSync(this.fd, this._writingBuf);
|
|
43142
|
+
fsWrite = () => fs$10.write(this.fd, this._writingBuf, this.release);
|
|
43143
43143
|
} else if (contentMode === void 0 || contentMode === kContentModeUtf8) {
|
|
43144
43144
|
this._writingBuf = "";
|
|
43145
43145
|
this.write = write;
|
|
@@ -43147,12 +43147,12 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43147
43147
|
this.flushSync = flushSync;
|
|
43148
43148
|
this._actualWrite = actualWrite;
|
|
43149
43149
|
fsWriteSync = () => {
|
|
43150
|
-
if (Buffer.isBuffer(this._writingBuf)) return fs$
|
|
43151
|
-
return fs$
|
|
43150
|
+
if (Buffer.isBuffer(this._writingBuf)) return fs$10.writeSync(this.fd, this._writingBuf);
|
|
43151
|
+
return fs$10.writeSync(this.fd, this._writingBuf, "utf8");
|
|
43152
43152
|
};
|
|
43153
43153
|
fsWrite = () => {
|
|
43154
|
-
if (Buffer.isBuffer(this._writingBuf)) return fs$
|
|
43155
|
-
return fs$
|
|
43154
|
+
if (Buffer.isBuffer(this._writingBuf)) return fs$10.write(this.fd, this._writingBuf, this.release);
|
|
43155
|
+
return fs$10.write(this.fd, this._writingBuf, "utf8", this.release);
|
|
43156
43156
|
};
|
|
43157
43157
|
} else throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`);
|
|
43158
43158
|
if (typeof fd === "number") {
|
|
@@ -43197,7 +43197,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43197
43197
|
return;
|
|
43198
43198
|
}
|
|
43199
43199
|
}
|
|
43200
|
-
if (this._fsync) fs$
|
|
43200
|
+
if (this._fsync) fs$10.fsyncSync(this.fd);
|
|
43201
43201
|
const len = this._len;
|
|
43202
43202
|
if (this._reopening) {
|
|
43203
43203
|
this._writing = false;
|
|
@@ -43294,7 +43294,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43294
43294
|
this._flushPending = true;
|
|
43295
43295
|
const onDrain = () => {
|
|
43296
43296
|
if (!this._fsync) try {
|
|
43297
|
-
fs$
|
|
43297
|
+
fs$10.fsync(this.fd, (err) => {
|
|
43298
43298
|
this._flushPending = false;
|
|
43299
43299
|
cb(err);
|
|
43300
43300
|
});
|
|
@@ -43371,7 +43371,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43371
43371
|
if (this._writing) return;
|
|
43372
43372
|
const fd = this.fd;
|
|
43373
43373
|
this.once("ready", () => {
|
|
43374
|
-
if (fd !== this.fd) fs$
|
|
43374
|
+
if (fd !== this.fd) fs$10.close(fd, (err) => {
|
|
43375
43375
|
if (err) return this.emit("error", err);
|
|
43376
43376
|
});
|
|
43377
43377
|
});
|
|
@@ -43402,7 +43402,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43402
43402
|
while (this._bufs.length || buf.length) {
|
|
43403
43403
|
if (buf.length <= 0) buf = this._bufs[0];
|
|
43404
43404
|
try {
|
|
43405
|
-
const n = Buffer.isBuffer(buf) ? fs$
|
|
43405
|
+
const n = Buffer.isBuffer(buf) ? fs$10.writeSync(this.fd, buf) : fs$10.writeSync(this.fd, buf, "utf8");
|
|
43406
43406
|
const releasedBufObj = releaseWritingBuf(buf, this._len, n);
|
|
43407
43407
|
buf = releasedBufObj.writingBuf;
|
|
43408
43408
|
this._len = releasedBufObj.len;
|
|
@@ -43413,7 +43413,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43413
43413
|
}
|
|
43414
43414
|
}
|
|
43415
43415
|
try {
|
|
43416
|
-
fs$
|
|
43416
|
+
fs$10.fsyncSync(this.fd);
|
|
43417
43417
|
} catch {}
|
|
43418
43418
|
}
|
|
43419
43419
|
function flushBufferSync() {
|
|
@@ -43427,7 +43427,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43427
43427
|
while (this._bufs.length || buf.length) {
|
|
43428
43428
|
if (buf.length <= 0) buf = mergeBuf(this._bufs[0], this._lens[0]);
|
|
43429
43429
|
try {
|
|
43430
|
-
const n = fs$
|
|
43430
|
+
const n = fs$10.writeSync(this.fd, buf);
|
|
43431
43431
|
buf = buf.subarray(n);
|
|
43432
43432
|
this._len = Math.max(this._len - n, 0);
|
|
43433
43433
|
if (buf.length <= 0) {
|
|
@@ -43449,24 +43449,24 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43449
43449
|
this._writing = true;
|
|
43450
43450
|
this._writingBuf = this._writingBuf.length ? this._writingBuf : this._bufs.shift() || "";
|
|
43451
43451
|
if (this.sync) try {
|
|
43452
|
-
release(null, Buffer.isBuffer(this._writingBuf) ? fs$
|
|
43452
|
+
release(null, Buffer.isBuffer(this._writingBuf) ? fs$10.writeSync(this.fd, this._writingBuf) : fs$10.writeSync(this.fd, this._writingBuf, "utf8"));
|
|
43453
43453
|
} catch (err) {
|
|
43454
43454
|
release(err);
|
|
43455
43455
|
}
|
|
43456
|
-
else fs$
|
|
43456
|
+
else fs$10.write(this.fd, this._writingBuf, release);
|
|
43457
43457
|
}
|
|
43458
43458
|
function actualWriteBuffer() {
|
|
43459
43459
|
const release = this.release;
|
|
43460
43460
|
this._writing = true;
|
|
43461
43461
|
this._writingBuf = this._writingBuf.length ? this._writingBuf : mergeBuf(this._bufs.shift(), this._lens.shift());
|
|
43462
43462
|
if (this.sync) try {
|
|
43463
|
-
release(null, fs$
|
|
43463
|
+
release(null, fs$10.writeSync(this.fd, this._writingBuf));
|
|
43464
43464
|
} catch (err) {
|
|
43465
43465
|
release(err);
|
|
43466
43466
|
}
|
|
43467
43467
|
else {
|
|
43468
43468
|
if (kCopyBuffer) this._writingBuf = Buffer.from(this._writingBuf);
|
|
43469
|
-
fs$
|
|
43469
|
+
fs$10.write(this.fd, this._writingBuf, release);
|
|
43470
43470
|
}
|
|
43471
43471
|
}
|
|
43472
43472
|
function actualClose(sonic) {
|
|
@@ -43480,10 +43480,10 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43480
43480
|
sonic._lens = [];
|
|
43481
43481
|
assert$1(typeof sonic.fd === "number", `sonic.fd must be a number, got ${typeof sonic.fd}`);
|
|
43482
43482
|
try {
|
|
43483
|
-
fs$
|
|
43483
|
+
fs$10.fsync(sonic.fd, closeWrapped);
|
|
43484
43484
|
} catch {}
|
|
43485
43485
|
function closeWrapped() {
|
|
43486
|
-
if (sonic.fd !== 1 && sonic.fd !== 2) fs$
|
|
43486
|
+
if (sonic.fd !== 1 && sonic.fd !== 2) fs$10.close(sonic.fd, done);
|
|
43487
43487
|
else done();
|
|
43488
43488
|
}
|
|
43489
43489
|
function done(err) {
|
|
@@ -72280,7 +72280,7 @@ var require_tcp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
72280
72280
|
var Transporter = require_base$1();
|
|
72281
72281
|
var _ = require_lodash();
|
|
72282
72282
|
var { isObject, isString } = require_utils$3();
|
|
72283
|
-
var fs$
|
|
72283
|
+
var fs$9 = __require("fs");
|
|
72284
72284
|
var kleur = require_kleur();
|
|
72285
72285
|
var Node = require_node();
|
|
72286
72286
|
var P = require_packets();
|
|
@@ -72427,7 +72427,7 @@ var require_tcp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
72427
72427
|
if (isString(str) && str.startsWith("file://")) {
|
|
72428
72428
|
const fName = str.replace("file://", "");
|
|
72429
72429
|
this.logger.debug(`Load nodes list from file '${fName}'...`);
|
|
72430
|
-
let content = fs$
|
|
72430
|
+
let content = fs$9.readFileSync(fName);
|
|
72431
72431
|
if (content && content.length > 0) {
|
|
72432
72432
|
const str = content.toString().trim();
|
|
72433
72433
|
if (str.startsWith("{") || str.startsWith("[")) return JSON.parse(str);
|
|
@@ -74917,7 +74917,7 @@ var require_ttl = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
74917
74917
|
//#region ../../node_modules/recursive-watch/index.js
|
|
74918
74918
|
var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
74919
74919
|
var os$5 = __require("os");
|
|
74920
|
-
var fs$
|
|
74920
|
+
var fs$8 = __require("fs");
|
|
74921
74921
|
var path$10 = __require("path");
|
|
74922
74922
|
var Cache = require_ttl();
|
|
74923
74923
|
var watchDirectory = os$5.platform() === "linux" ? watchFallback : watchRecursive;
|
|
@@ -74925,7 +74925,7 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
74925
74925
|
function watch(name, onchange) {
|
|
74926
74926
|
var clear = null;
|
|
74927
74927
|
var stopped = false;
|
|
74928
|
-
fs$
|
|
74928
|
+
fs$8.lstat(name, function(_, st) {
|
|
74929
74929
|
if (!st || stopped) {
|
|
74930
74930
|
stopped = true;
|
|
74931
74931
|
return;
|
|
@@ -74941,8 +74941,8 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
74941
74941
|
function watchFile(filename, onchange) {
|
|
74942
74942
|
var prev = null;
|
|
74943
74943
|
var prevTime = 0;
|
|
74944
|
-
var w = fs$
|
|
74945
|
-
fs$
|
|
74944
|
+
var w = fs$8.watch(filename, function() {
|
|
74945
|
+
fs$8.lstat(filename, function(_, st) {
|
|
74946
74946
|
var now = Date.now();
|
|
74947
74947
|
if (now - prevTime > 2e3 || !same(st, prev)) onchange(filename);
|
|
74948
74948
|
prevTime = now;
|
|
@@ -74954,7 +74954,7 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
74954
74954
|
};
|
|
74955
74955
|
}
|
|
74956
74956
|
function watchRecursive(directory, onchange) {
|
|
74957
|
-
var w = fs$
|
|
74957
|
+
var w = fs$8.watch(directory, { recursive: true }, function(change, filename) {
|
|
74958
74958
|
if (!filename) return;
|
|
74959
74959
|
onchange(path$10.join(directory, filename));
|
|
74960
74960
|
});
|
|
@@ -74984,7 +74984,7 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
74984
74984
|
}
|
|
74985
74985
|
function update() {
|
|
74986
74986
|
var filename = queued[0];
|
|
74987
|
-
fs$
|
|
74987
|
+
fs$8.lstat(filename, function(err, st) {
|
|
74988
74988
|
var w = watching[filename];
|
|
74989
74989
|
if (err && w) {
|
|
74990
74990
|
w.close();
|
|
@@ -75001,17 +75001,17 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
75001
75001
|
}
|
|
75002
75002
|
function visit(next, cb) {
|
|
75003
75003
|
var dir = path$10.join(directory, next);
|
|
75004
|
-
fs$
|
|
75004
|
+
fs$8.lstat(dir, function(err, st) {
|
|
75005
75005
|
if (err || !st.isDirectory()) return cb();
|
|
75006
75006
|
if (watching[dir]) return cb();
|
|
75007
75007
|
if (loaded) emit(dir);
|
|
75008
|
-
var w = fs$
|
|
75008
|
+
var w = fs$8.watch(dir, function(change, filename) {
|
|
75009
75009
|
filename = path$10.join(next, filename);
|
|
75010
75010
|
emit(path$10.join(directory, filename));
|
|
75011
75011
|
});
|
|
75012
75012
|
w.on("error", noop);
|
|
75013
75013
|
watching[dir] = w;
|
|
75014
|
-
fs$
|
|
75014
|
+
fs$8.readdir(dir, function(err, list) {
|
|
75015
75015
|
if (err) return cb(err);
|
|
75016
75016
|
loop();
|
|
75017
75017
|
function loop() {
|
|
@@ -75031,7 +75031,7 @@ var require_recursive_watch = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
75031
75031
|
//#endregion
|
|
75032
75032
|
//#region ../../node_modules/moleculer/src/middlewares/hot-reload.js
|
|
75033
75033
|
var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
75034
|
-
var fs$
|
|
75034
|
+
var fs$7 = __require("fs");
|
|
75035
75035
|
var kleur = require_kleur();
|
|
75036
75036
|
var path$9 = __require("path");
|
|
75037
75037
|
var watch = require_recursive_watch();
|
|
@@ -75048,7 +75048,7 @@ var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
75048
75048
|
const relPath = path$9.relative(process.cwd(), service.__filename);
|
|
75049
75049
|
broker.logger.info(`Hot reload '${service.name}' service...`, kleur.grey(relPath));
|
|
75050
75050
|
return broker.destroyService(service).then(() => {
|
|
75051
|
-
if (fs$
|
|
75051
|
+
if (fs$7.existsSync(service.__filename)) try {
|
|
75052
75052
|
return broker.loadService(service.__filename);
|
|
75053
75053
|
} catch (err) {
|
|
75054
75054
|
broker.logger.error(`Failed to load service '${service.__filename}'`, err);
|
|
@@ -75080,7 +75080,7 @@ var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
75080
75080
|
});
|
|
75081
75081
|
broker.logger.info(kleur.bgMagenta().white().bold(`Reload ${needToReloadDedup.length} service(s)`));
|
|
75082
75082
|
needToReloadDedup.forEach((svc) => {
|
|
75083
|
-
if (typeof svc == "string") if (fs$
|
|
75083
|
+
if (typeof svc == "string") if (fs$7.existsSync(svc)) return broker.loadService(svc);
|
|
75084
75084
|
else return;
|
|
75085
75085
|
return hotReloadService(svc);
|
|
75086
75086
|
});
|
|
@@ -75090,7 +75090,7 @@ var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
75090
75090
|
broker.logger.debug("");
|
|
75091
75091
|
broker.logger.debug(kleur.yellow().bold("Watching the following project files:"));
|
|
75092
75092
|
projectFiles.forEach((watchItem, fName) => {
|
|
75093
|
-
if (!fs$
|
|
75093
|
+
if (!fs$7.existsSync(fName)) projectFiles.delete(fName);
|
|
75094
75094
|
});
|
|
75095
75095
|
projectFiles.forEach((watchItem, fName) => {
|
|
75096
75096
|
const relPath = path$9.relative(process.cwd(), fName);
|
|
@@ -75101,7 +75101,7 @@ var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
75101
75101
|
watchItem.services.forEach((svcFullname) => broker.logger.debug(kleur.grey(` ${svcFullname}`)));
|
|
75102
75102
|
watchItem.others.forEach((filename) => broker.logger.debug(kleur.grey(` ${path$9.relative(process.cwd(), filename)}`)));
|
|
75103
75103
|
}
|
|
75104
|
-
watchItem.watcher = fs$
|
|
75104
|
+
watchItem.watcher = fs$7.watch(fName, (eventType) => {
|
|
75105
75105
|
const relPath = path$9.relative(process.cwd(), fName);
|
|
75106
75106
|
broker.logger.info(kleur.magenta().bold(`The '${relPath}' file is changed. (Event: ${eventType})`));
|
|
75107
75107
|
clearRequireCache(fName);
|
|
@@ -75227,7 +75227,7 @@ var require_hot_reload = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
75227
75227
|
if (filename.endsWith(".service.js") || filename.endsWith(".service.ts")) {
|
|
75228
75228
|
broker.logger.debug(`There is changes in '${folder}' folder: `, path$9.basename(filename));
|
|
75229
75229
|
const isLoaded = broker.services.some((svc) => svc.__filename == filename);
|
|
75230
|
-
const fileExists = fs$
|
|
75230
|
+
const fileExists = fs$7.existsSync(filename);
|
|
75231
75231
|
if (!isLoaded && fileExists) {
|
|
75232
75232
|
broker.logger.debug("Loading new file: ", path$9.basename(filename));
|
|
75233
75233
|
needToLoad.add(filename);
|
|
@@ -75405,7 +75405,7 @@ var require_compression = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
75405
75405
|
var require_transit_logger = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
75406
75406
|
var _ = require_lodash();
|
|
75407
75407
|
var kleur = require_kleur();
|
|
75408
|
-
var fs$
|
|
75408
|
+
var fs$6 = __require("fs");
|
|
75409
75409
|
var path$8 = __require("path");
|
|
75410
75410
|
var { makeDirs, safetyObject } = require_utils$3();
|
|
75411
75411
|
module.exports = function TransitLoggerMiddleware(opts) {
|
|
@@ -75431,7 +75431,7 @@ var require_transit_logger = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
75431
75431
|
} catch {
|
|
75432
75432
|
data = JSON.stringify(safetyObject(payload), payload instanceof Error ? Object.getOwnPropertyNames(payload) : null, 4);
|
|
75433
75433
|
}
|
|
75434
|
-
fs$
|
|
75434
|
+
fs$6.writeFile(path$8.join(targetFolder, filename), data, () => {});
|
|
75435
75435
|
}
|
|
75436
75436
|
const coloringSend = opts.colors && opts.colors.send ? opts.colors.send.split(".").reduce((a, b) => a[b] || a()[b], kleur) : (s) => s;
|
|
75437
75437
|
const coloringReceive = opts.colors && opts.colors.receive ? opts.colors.receive.split(".").reduce((a, b) => a[b] || a()[b], kleur) : (s) => s;
|
|
@@ -75479,7 +75479,7 @@ var require_transit_logger = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
75479
75479
|
var require_action_logger = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
75480
75480
|
var _ = require_lodash();
|
|
75481
75481
|
var kleur = require_kleur();
|
|
75482
|
-
var fs$
|
|
75482
|
+
var fs$5 = __require("fs");
|
|
75483
75483
|
var path$7 = __require("path");
|
|
75484
75484
|
var { makeDirs, match, isObject, safetyObject } = require_utils$3();
|
|
75485
75485
|
module.exports = function ActionLoggerMiddleware(opts) {
|
|
@@ -75509,7 +75509,7 @@ var require_action_logger = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
75509
75509
|
} catch {
|
|
75510
75510
|
data = JSON.stringify(safetyObject(payload), payload instanceof Error ? Object.getOwnPropertyNames(payload) : null, 4);
|
|
75511
75511
|
}
|
|
75512
|
-
fs$
|
|
75512
|
+
fs$5.writeFile(path$7.join(targetFolder, filename), data, () => {});
|
|
75513
75513
|
}
|
|
75514
75514
|
function isWhiteListed(actionName) {
|
|
75515
75515
|
return !!opts.whitelist.find((pattern) => match(actionName, pattern));
|
|
@@ -82732,7 +82732,7 @@ var require_help = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82732
82732
|
//#endregion
|
|
82733
82733
|
//#region ../../node_modules/args/lib/version.js
|
|
82734
82734
|
var require_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
82735
|
-
var fs$
|
|
82735
|
+
var fs$4 = __require("fs");
|
|
82736
82736
|
var path$3 = __require("path");
|
|
82737
82737
|
/**
|
|
82738
82738
|
* Retrieves the main module package.json information.
|
|
@@ -82745,7 +82745,7 @@ var require_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82745
82745
|
*/
|
|
82746
82746
|
function findPackage(directory) {
|
|
82747
82747
|
const file = path$3.resolve(directory, "package.json");
|
|
82748
|
-
if (fs$
|
|
82748
|
+
if (fs$4.existsSync(file) && fs$4.statSync(file).isFile()) return __require(file);
|
|
82749
82749
|
const parent = path$3.resolve(directory, "..");
|
|
82750
82750
|
return parent === directory ? null : findPackage(parent);
|
|
82751
82751
|
}
|
|
@@ -82807,7 +82807,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82807
82807
|
//#endregion
|
|
82808
82808
|
//#region ../../node_modules/dotenv/lib/main.js
|
|
82809
82809
|
var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
82810
|
-
var fs$
|
|
82810
|
+
var fs$3 = __require("fs");
|
|
82811
82811
|
var path$2 = __require("path");
|
|
82812
82812
|
var os$3 = __require("os");
|
|
82813
82813
|
var crypto = __require("crypto");
|
|
@@ -82935,10 +82935,10 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82935
82935
|
function _vaultPath(options) {
|
|
82936
82936
|
let possibleVaultPath = null;
|
|
82937
82937
|
if (options && options.path && options.path.length > 0) if (Array.isArray(options.path)) {
|
|
82938
|
-
for (const filepath of options.path) if (fs$
|
|
82938
|
+
for (const filepath of options.path) if (fs$3.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
|
|
82939
82939
|
} else possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
82940
82940
|
else possibleVaultPath = path$2.resolve(process.cwd(), ".env.vault");
|
|
82941
|
-
if (fs$
|
|
82941
|
+
if (fs$3.existsSync(possibleVaultPath)) return possibleVaultPath;
|
|
82942
82942
|
return null;
|
|
82943
82943
|
}
|
|
82944
82944
|
function _resolveHome(envPath) {
|
|
@@ -82972,7 +82972,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
82972
82972
|
let lastError;
|
|
82973
82973
|
const parsedAll = {};
|
|
82974
82974
|
for (const path of optionPaths) try {
|
|
82975
|
-
const parsed = DotenvModule.parse(fs$
|
|
82975
|
+
const parsed = DotenvModule.parse(fs$3.readFileSync(path, { encoding }));
|
|
82976
82976
|
DotenvModule.populate(parsedAll, parsed, options);
|
|
82977
82977
|
} catch (e) {
|
|
82978
82978
|
if (debug) _debug(`failed to load ${path} ${e.message}`);
|
|
@@ -83084,7 +83084,7 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
83084
83084
|
*/
|
|
83085
83085
|
var ServiceBroker = require_service_broker();
|
|
83086
83086
|
var utils = require_utils$3();
|
|
83087
|
-
var fs$
|
|
83087
|
+
var fs$2 = __require("fs");
|
|
83088
83088
|
var path$1 = __require("path");
|
|
83089
83089
|
var { globSync } = require_index_min$1();
|
|
83090
83090
|
var inspect = __require("util").inspect;
|
|
@@ -83309,7 +83309,7 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
83309
83309
|
*/
|
|
83310
83310
|
isDirectory(p) {
|
|
83311
83311
|
try {
|
|
83312
|
-
return fs$
|
|
83312
|
+
return fs$2.lstatSync(p).isDirectory();
|
|
83313
83313
|
} catch {}
|
|
83314
83314
|
return false;
|
|
83315
83315
|
}
|
|
@@ -83321,7 +83321,7 @@ var require_runner = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
83321
83321
|
*/
|
|
83322
83322
|
isServiceFile(p) {
|
|
83323
83323
|
try {
|
|
83324
|
-
return !fs$
|
|
83324
|
+
return !fs$2.lstatSync(p).isDirectory();
|
|
83325
83325
|
} catch {}
|
|
83326
83326
|
return false;
|
|
83327
83327
|
}
|
|
@@ -83534,12 +83534,12 @@ var Gt = (n, t, e) => {
|
|
|
83534
83534
|
}
|
|
83535
83535
|
return h;
|
|
83536
83536
|
};
|
|
83537
|
-
var fe = "\0SLASH" + Math.random() + "\0", ue = "\0OPEN" + Math.random() + "\0", qt = "\0CLOSE" + Math.random() + "\0", de = "\0COMMA" + Math.random() + "\0", pe = "\0PERIOD" + Math.random() + "\0", is = new RegExp(fe, "g"), rs = new RegExp(ue, "g"), ns = new RegExp(qt, "g"), os$1 = new RegExp(de, "g"), hs = new RegExp(pe, "g"), as = /\\\\/g, ls = /\\{/g, cs = /\\}/g, fs = /\\,/g, us = /\\./g, ds = 1e5;
|
|
83537
|
+
var fe = "\0SLASH" + Math.random() + "\0", ue = "\0OPEN" + Math.random() + "\0", qt = "\0CLOSE" + Math.random() + "\0", de = "\0COMMA" + Math.random() + "\0", pe = "\0PERIOD" + Math.random() + "\0", is = new RegExp(fe, "g"), rs = new RegExp(ue, "g"), ns = new RegExp(qt, "g"), os$1 = new RegExp(de, "g"), hs = new RegExp(pe, "g"), as = /\\\\/g, ls = /\\{/g, cs = /\\}/g, fs$1 = /\\,/g, us = /\\./g, ds = 1e5;
|
|
83538
83538
|
function Ht(n) {
|
|
83539
83539
|
return isNaN(n) ? n.charCodeAt(0) : parseInt(n, 10);
|
|
83540
83540
|
}
|
|
83541
83541
|
function ps(n) {
|
|
83542
|
-
return n.replace(as, fe).replace(ls, ue).replace(cs, qt).replace(fs, de).replace(us, pe);
|
|
83542
|
+
return n.replace(as, fe).replace(ls, ue).replace(cs, qt).replace(fs$1, de).replace(us, pe);
|
|
83543
83543
|
}
|
|
83544
83544
|
function ms(n) {
|
|
83545
83545
|
return n.replace(is, "\\").replace(rs, "{").replace(ns, "}").replace(os$1, ",").replace(hs, ".");
|
|
@@ -83713,7 +83713,7 @@ var xs = new Set([
|
|
|
83713
83713
|
"+",
|
|
83714
83714
|
"*",
|
|
83715
83715
|
"@"
|
|
83716
|
-
]), be = (n) => xs.has(n), vs = "(?!(?:^|/)\\.\\.?(?:$|/))", Ct = "(?!\\.)", Cs = new Set(["[", "."]), Ts = new Set(["..", "."]), As$1 = /* @__PURE__ */ new Set("().*{}+?[]^$\\!"), ks = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), Kt
|
|
83716
|
+
]), be = (n) => xs.has(n), vs = "(?!(?:^|/)\\.\\.?(?:$|/))", Ct = "(?!\\.)", Cs = new Set(["[", "."]), Ts = new Set(["..", "."]), As$1 = /* @__PURE__ */ new Set("().*{}+?[]^$\\!"), ks = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), Kt = "[^/]", Se = Kt + "*?", Ee = Kt + "+?", Q = class n {
|
|
83717
83717
|
type;
|
|
83718
83718
|
#t;
|
|
83719
83719
|
#s;
|
|
@@ -83940,7 +83940,7 @@ var xs = new Set([
|
|
|
83940
83940
|
}
|
|
83941
83941
|
}
|
|
83942
83942
|
if (l === "?") {
|
|
83943
|
-
r += Kt
|
|
83943
|
+
r += Kt, e = !0;
|
|
83944
83944
|
continue;
|
|
83945
83945
|
}
|
|
83946
83946
|
r += ks(l);
|