@shad0wz7/nestjs-pdf 2.5.3 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -25,22 +25,29 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
25
  let node_path = require("node:path");
26
26
  let _nestjs_common = require("@nestjs/common");
27
27
  let pdf_lib = require("pdf-lib");
28
- let _gboutte_nestjs_hbs = require("@gboutte/nestjs-hbs");
29
- let p_limit = require("p-limit");
30
- p_limit = __toESM(p_limit);
31
28
  let deepmerge_ts = require("deepmerge-ts");
32
29
  let node_fs = require("node:fs");
33
30
  let _puppeteer_browsers = require("@puppeteer/browsers");
34
31
  let puppeteer = require("puppeteer");
35
32
  let ejs = require("ejs");
33
+ ejs = __toESM(ejs, 1);
36
34
  let eta = require("eta");
35
+ let handlebars = require("handlebars");
36
+ handlebars = __toESM(handlebars, 1);
37
37
  let mjml = require("mjml");
38
- mjml = __toESM(mjml);
38
+ mjml = __toESM(mjml, 1);
39
39
  let mustache = require("mustache");
40
- mustache = __toESM(mustache);
40
+ mustache = __toESM(mustache, 1);
41
41
  let nunjucks = require("nunjucks");
42
- nunjucks = __toESM(nunjucks);
42
+ nunjucks = __toESM(nunjucks, 1);
43
43
  let pug = require("pug");
44
+ pug = __toESM(pug, 1);
45
+ let _nestjs_common_utils_shared_utils_js = require("@nestjs/common/utils/shared.utils.js");
46
+ let fs = require("fs");
47
+ fs = __toESM(fs, 1);
48
+ let path = require("path");
49
+ let rxjs = require("rxjs");
50
+ let crypto = require("crypto");
44
51
  //#region src/helpers/getRelativePath.helper.ts
45
52
  /**
46
53
  * Get the relative path to a value from the module directory.
@@ -196,6 +203,133 @@ async function addSignatureFieldUsingAnchor(pdf, fieldName = "SignatureDebtor",
196
203
  return await pdfDoc.save();
197
204
  }
198
205
  //#endregion
206
+ //#region node_modules/.pnpm/yocto-queue@1.2.2/node_modules/yocto-queue/index.js
207
+ var Node = class {
208
+ value;
209
+ next;
210
+ constructor(value) {
211
+ this.value = value;
212
+ }
213
+ };
214
+ var Queue = class {
215
+ #head;
216
+ #tail;
217
+ #size;
218
+ constructor() {
219
+ this.clear();
220
+ }
221
+ enqueue(value) {
222
+ const node = new Node(value);
223
+ if (this.#head) {
224
+ this.#tail.next = node;
225
+ this.#tail = node;
226
+ } else {
227
+ this.#head = node;
228
+ this.#tail = node;
229
+ }
230
+ this.#size++;
231
+ }
232
+ dequeue() {
233
+ const current = this.#head;
234
+ if (!current) return;
235
+ this.#head = this.#head.next;
236
+ this.#size--;
237
+ if (!this.#head) this.#tail = void 0;
238
+ return current.value;
239
+ }
240
+ peek() {
241
+ if (!this.#head) return;
242
+ return this.#head.value;
243
+ }
244
+ clear() {
245
+ this.#head = void 0;
246
+ this.#tail = void 0;
247
+ this.#size = 0;
248
+ }
249
+ get size() {
250
+ return this.#size;
251
+ }
252
+ *[Symbol.iterator]() {
253
+ let current = this.#head;
254
+ while (current) {
255
+ yield current.value;
256
+ current = current.next;
257
+ }
258
+ }
259
+ *drain() {
260
+ while (this.#head) yield this.dequeue();
261
+ }
262
+ };
263
+ //#endregion
264
+ //#region node_modules/.pnpm/p-limit@7.3.2/node_modules/p-limit/index.js
265
+ function pLimit(concurrency) {
266
+ let rejectOnClear = false;
267
+ if (typeof concurrency === "object") ({concurrency, rejectOnClear = false} = concurrency);
268
+ validateConcurrency(concurrency);
269
+ if (typeof rejectOnClear !== "boolean") throw new TypeError("Expected `rejectOnClear` to be a boolean");
270
+ const queue = new Queue();
271
+ let activeCount = 0;
272
+ const resumeNext = () => {
273
+ if (activeCount < concurrency && queue.size > 0) {
274
+ activeCount++;
275
+ queue.dequeue().run();
276
+ }
277
+ };
278
+ const next = () => {
279
+ activeCount--;
280
+ resumeNext();
281
+ };
282
+ const run = async (function_, resolve, arguments_) => {
283
+ const result = (async () => function_(...arguments_))();
284
+ resolve(result);
285
+ try {
286
+ await result;
287
+ } catch {}
288
+ next();
289
+ };
290
+ const enqueue = (function_, resolve, reject, arguments_) => {
291
+ const queueItem = { reject };
292
+ new Promise((internalResolve) => {
293
+ queueItem.run = internalResolve;
294
+ queue.enqueue(queueItem);
295
+ }).then(run.bind(void 0, function_, resolve, arguments_));
296
+ if (activeCount < concurrency) resumeNext();
297
+ };
298
+ const generator = (function_, ...arguments_) => new Promise((resolve, reject) => {
299
+ enqueue(function_, resolve, reject, arguments_);
300
+ });
301
+ Object.defineProperties(generator, {
302
+ activeCount: { get: () => activeCount },
303
+ pendingCount: { get: () => queue.size },
304
+ clearQueue: { value() {
305
+ if (!rejectOnClear) {
306
+ queue.clear();
307
+ return;
308
+ }
309
+ const abortError = AbortSignal.abort().reason;
310
+ while (queue.size > 0) queue.dequeue().reject(abortError);
311
+ } },
312
+ concurrency: {
313
+ get: () => concurrency,
314
+ set(newConcurrency) {
315
+ validateConcurrency(newConcurrency);
316
+ concurrency = newConcurrency;
317
+ queueMicrotask(() => {
318
+ while (activeCount < concurrency && queue.size > 0) resumeNext();
319
+ });
320
+ }
321
+ },
322
+ map: { async value(iterable, function_) {
323
+ const promises = Array.from(iterable, (value, index) => generator(function_, value, index));
324
+ return Promise.all(promises);
325
+ } }
326
+ });
327
+ return generator;
328
+ }
329
+ function validateConcurrency(concurrency) {
330
+ if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) throw new TypeError("Expected `concurrency` to be a number from 1 and up");
331
+ }
332
+ //#endregion
199
333
  //#region src/helpers/deepMergePdfparams.ts
200
334
  function mergePuppeteerParameters(defaults, overrides) {
201
335
  if (!overrides) return { ...defaults };
@@ -204,7 +338,6 @@ function mergePuppeteerParameters(defaults, overrides) {
204
338
  //#endregion
205
339
  //#region src/helpers/tokens.ts
206
340
  const PDF_PARAMETERS = "PDF_PARAMETERS";
207
- const HANDLEBARS_PARAMETERS = "HANDLEBARS_PARAMETERS";
208
341
  //#endregion
209
342
  //#region \0@oxc-project+runtime@0.142.0/helpers/esm/decorateMetadata.js
210
343
  function __decorateMetadata(k, v) {
@@ -219,7 +352,7 @@ function __decorateParam(paramIndex, decorator) {
219
352
  }
220
353
  //#endregion
221
354
  //#region \0@oxc-project+runtime@0.142.0/helpers/esm/decorate.js
222
- function __decorate(decorators, target, key, desc) {
355
+ function __decorate$3(decorators, target, key, desc) {
223
356
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
224
357
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
225
358
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -278,7 +411,7 @@ let BrowserService = class BrowserService {
278
411
  } catch (error) {
279
412
  _nestjs_common.Logger.warn(`Failed to close browser on module destroy: ${error instanceof Error ? error.message : String(error)}`);
280
413
  }
281
- await this.cleanupCacheBestEffort();
414
+ if (this.options?.cleanupBrowserCacheOnExit !== false) await this.cleanupCacheBestEffort();
282
415
  }
283
416
  /** Wait until no PDF job is in flight, or until the timeout elapses. */
284
417
  async waitForIdle(timeoutMs) {
@@ -389,9 +522,6 @@ let BrowserService = class BrowserService {
389
522
  else browser = this.options.browser;
390
523
  this.browser = browser;
391
524
  }
392
- setBrowser(browser) {
393
- this.browser = browser;
394
- }
395
525
  getBrowser() {
396
526
  return this.browser;
397
527
  }
@@ -417,9 +547,6 @@ let BrowserService = class BrowserService {
417
547
  getBuildId() {
418
548
  return this.buildId;
419
549
  }
420
- setBuildId(value) {
421
- this.buildId = value;
422
- }
423
550
  loadUseLockedBrowser() {
424
551
  let useLockedBrowser;
425
552
  if (this.options?.useLockedBrowser === void 0) useLockedBrowser = false;
@@ -483,7 +610,7 @@ let BrowserService = class BrowserService {
483
610
  return null;
484
611
  }
485
612
  };
486
- BrowserService = __decorate([
613
+ BrowserService = __decorate$3([
487
614
  (0, _nestjs_common.Injectable)(),
488
615
  __decorateParam(0, (0, _nestjs_common.Inject)("PDF_PARAMETERS")),
489
616
  __decorateMetadata("design:paramtypes", [Object])
@@ -493,7 +620,7 @@ BrowserService = __decorate([
493
620
  let EjsService = class EjsService {
494
621
  async render(template, data = {}, options) {
495
622
  try {
496
- return await (0, ejs.render)(template, data, {
623
+ return await ejs.default.render(template, data, {
497
624
  async: true,
498
625
  ...options
499
626
  });
@@ -503,7 +630,7 @@ let EjsService = class EjsService {
503
630
  }
504
631
  async renderFile(filePath, data = {}, options) {
505
632
  try {
506
- return await (0, ejs.renderFile)(filePath, data, {
633
+ return await ejs.default.renderFile(filePath, data, {
507
634
  async: true,
508
635
  ...options
509
636
  });
@@ -512,7 +639,7 @@ let EjsService = class EjsService {
512
639
  }
513
640
  }
514
641
  };
515
- EjsService = __decorate([(0, _nestjs_common.Injectable)()], EjsService);
642
+ EjsService = __decorate$3([(0, _nestjs_common.Injectable)()], EjsService);
516
643
  //#endregion
517
644
  //#region src/puppeteer/engines/eta/eta.service.ts
518
645
  let EtaService = class EtaService {
@@ -581,7 +708,58 @@ let EtaService = class EtaService {
581
708
  return this.templateCache.size;
582
709
  }
583
710
  };
584
- EtaService = __decorate([(0, _nestjs_common.Injectable)(), __decorateMetadata("design:paramtypes", [])], EtaService);
711
+ EtaService = __decorate$3([(0, _nestjs_common.Injectable)(), __decorateMetadata("design:paramtypes", [])], EtaService);
712
+ //#endregion
713
+ //#region src/puppeteer/engines/handlebars/handlebars.service.ts
714
+ let HandlebarsService = class HandlebarsService {
715
+ cachedOptions;
716
+ cachedEnv;
717
+ render(template, parameters = {}, options = {}) {
718
+ try {
719
+ return this.getEnv(options).compile(template, options.compileOptions)(parameters, options.templateOptions);
720
+ } catch (error) {
721
+ throw new Error(`Handlebars rendering failed: ${String(error)}`, { cause: error });
722
+ }
723
+ }
724
+ renderFile(file, parameters = {}, options = {}) {
725
+ if (options.templateDirectory === void 0) throw new Error("Handlebars file rendering failed: option `templateDirectory` is not set");
726
+ const baseDir = (0, node_path.resolve)(process.cwd(), options.templateDirectory);
727
+ const templatePath = (0, node_path.resolve)(baseDir, file);
728
+ if (templatePath !== baseDir && !templatePath.startsWith(baseDir + node_path.sep)) throw new Error(`Handlebars file rendering failed: ’${file}’ resolves outside \`templateDirectory\``);
729
+ let template;
730
+ try {
731
+ template = (0, node_fs.readFileSync)(templatePath, "utf8");
732
+ } catch (error) {
733
+ throw new Error(`Handlebars file rendering failed: ${String(error)}`, { cause: error });
734
+ }
735
+ return this.render(template, parameters, options);
736
+ }
737
+ /**
738
+ * Build an isolated Handlebars environment with the given helpers/partials so
739
+ * nothing leaks into the global Handlebars. Memoised for the common case where
740
+ * the same options object is reused across calls (e.g. the module `hbsOptions`).
741
+ */
742
+ getEnv(options) {
743
+ if (this.cachedEnv && this.cachedOptions === options) return this.cachedEnv;
744
+ const env = handlebars.default.create();
745
+ for (const helper of options.helpers ?? []) env.registerHelper(helper.name, helper.fn);
746
+ this.registerPartials(env, options.partialDirectory);
747
+ this.cachedOptions = options;
748
+ this.cachedEnv = env;
749
+ return env;
750
+ }
751
+ registerPartials(env, partialDirectory) {
752
+ if (partialDirectory === void 0) return;
753
+ const partialPath = (0, node_path.join)(process.cwd(), partialDirectory);
754
+ if (!(0, node_fs.existsSync)(partialPath)) throw new Error(`Handlebars partial directory does not exist: ${partialPath}`);
755
+ for (const entry of (0, node_fs.readdirSync)(partialPath)) {
756
+ const filePath = (0, node_path.join)(partialPath, entry);
757
+ if (!(0, node_fs.statSync)(filePath).isFile()) continue;
758
+ env.registerPartial((0, node_path.basename)(entry, (0, node_path.extname)(entry)), (0, node_fs.readFileSync)(filePath, "utf8"));
759
+ }
760
+ }
761
+ };
762
+ HandlebarsService = __decorate$3([(0, _nestjs_common.Injectable)()], HandlebarsService);
585
763
  //#endregion
586
764
  //#region src/puppeteer/engines/mjml/mjml.service.ts
587
765
  let MjmlService = class MjmlService {
@@ -594,7 +772,7 @@ let MjmlService = class MjmlService {
594
772
  return await this.render(template, options);
595
773
  }
596
774
  };
597
- MjmlService = __decorate([(0, _nestjs_common.Injectable)()], MjmlService);
775
+ MjmlService = __decorate$3([(0, _nestjs_common.Injectable)()], MjmlService);
598
776
  //#endregion
599
777
  //#region src/puppeteer/engines/mustache/mustache.service.ts
600
778
  let MustacheService = class MustacheService {
@@ -652,7 +830,7 @@ let MustacheService = class MustacheService {
652
830
  return this.templateCache.size;
653
831
  }
654
832
  };
655
- MustacheService = __decorate([(0, _nestjs_common.Injectable)()], MustacheService);
833
+ MustacheService = __decorate$3([(0, _nestjs_common.Injectable)()], MustacheService);
656
834
  //#endregion
657
835
  //#region src/puppeteer/engines/nunjucks/nunjucks.service.ts
658
836
  let NunjucksService = class NunjucksService {
@@ -698,13 +876,13 @@ let NunjucksService = class NunjucksService {
698
876
  }
699
877
  }
700
878
  };
701
- NunjucksService = __decorate([(0, _nestjs_common.Injectable)(), __decorateMetadata("design:paramtypes", [])], NunjucksService);
879
+ NunjucksService = __decorate$3([(0, _nestjs_common.Injectable)(), __decorateMetadata("design:paramtypes", [])], NunjucksService);
702
880
  //#endregion
703
881
  //#region src/puppeteer/engines/pug/pug.service.ts
704
882
  let PugService = class PugService {
705
883
  render(template, data = {}, options) {
706
884
  try {
707
- return (0, pug.compile)(template, { ...options })(data);
885
+ return pug.default.compile(template, { ...options })(data);
708
886
  } catch (error) {
709
887
  throw new Error(`Pug rendering failed: ${String(error)}`, { cause: error });
710
888
  }
@@ -718,7 +896,7 @@ let PugService = class PugService {
718
896
  }
719
897
  }
720
898
  };
721
- PugService = __decorate([(0, _nestjs_common.Injectable)()], PugService);
899
+ PugService = __decorate$3([(0, _nestjs_common.Injectable)()], PugService);
722
900
  //#endregion
723
901
  //#region src/puppeteer/libs/requireService.utils.ts
724
902
  function requireService(service, name) {
@@ -748,7 +926,7 @@ let PuppeteerService = class PuppeteerService {
748
926
  this.etaService = etaService;
749
927
  this.mustacheService = mustacheService;
750
928
  }
751
- limit = (0, p_limit.default)(3);
929
+ limit = pLimit(3);
752
930
  async generatePdfFromHtml(html, options) {
753
931
  return this.limit(async () => {
754
932
  const mergePuppeteerOptions = mergePuppeteerParameters(this.options, options);
@@ -821,11 +999,11 @@ let PuppeteerService = class PuppeteerService {
821
999
  });
822
1000
  }
823
1001
  async generatePdfFromTemplateHbsString(template, parameters = {}, options) {
824
- const html = requireService(this.hbsService, "Handlebars").render(template, parameters);
1002
+ const html = requireService(this.hbsService, "Handlebars").render(template, parameters, options?.hbsOptions ?? this.options.hbsOptions);
825
1003
  return this.generatePdfFromHtml(html, options);
826
1004
  }
827
1005
  async generatePdfFromTemplateHbsFile(file, parameters = {}, options) {
828
- const html = requireService(this.hbsService, "Handlebars").renderFile(file, parameters);
1006
+ const html = requireService(this.hbsService, "Handlebars").renderFile(file, parameters, options?.hbsOptions ?? this.options.hbsOptions);
829
1007
  return this.generatePdfFromHtml(html, options);
830
1008
  }
831
1009
  async generatePdfFromMjmlString(template, options) {
@@ -877,7 +1055,7 @@ let PuppeteerService = class PuppeteerService {
877
1055
  return this.generatePdfFromHtml(html, options);
878
1056
  }
879
1057
  };
880
- PuppeteerService = __decorate([
1058
+ PuppeteerService = __decorate$3([
881
1059
  (0, _nestjs_common.Injectable)(),
882
1060
  __decorateParam(1, (0, _nestjs_common.Inject)(PDF_PARAMETERS)),
883
1061
  __decorateParam(2, (0, _nestjs_common.Optional)()),
@@ -890,7 +1068,7 @@ PuppeteerService = __decorate([
890
1068
  __decorateMetadata("design:paramtypes", [
891
1069
  typeof BrowserService === "undefined" ? Object : BrowserService,
892
1070
  Object,
893
- typeof _gboutte_nestjs_hbs.HandlebarsService === "undefined" ? Object : _gboutte_nestjs_hbs.HandlebarsService,
1071
+ typeof HandlebarsService === "undefined" ? Object : HandlebarsService,
894
1072
  typeof MjmlService === "undefined" ? Object : MjmlService,
895
1073
  typeof PugService === "undefined" ? Object : PugService,
896
1074
  typeof EjsService === "undefined" ? Object : EjsService,
@@ -1079,14 +1257,603 @@ let NestjsPdfService = class NestjsPdfService {
1079
1257
  return await addSignatureFieldUsingAnchor(pdf, fieldName, anchorText);
1080
1258
  }
1081
1259
  };
1082
- NestjsPdfService = __decorate([(0, _nestjs_common.Injectable)(), __decorateMetadata("design:paramtypes", [typeof PuppeteerService === "undefined" ? Object : PuppeteerService])], NestjsPdfService);
1260
+ NestjsPdfService = __decorate$3([(0, _nestjs_common.Injectable)(), __decorateMetadata("design:paramtypes", [typeof PuppeteerService === "undefined" ? Object : PuppeteerService])], NestjsPdfService);
1261
+ //#endregion
1262
+ //#region node_modules/.pnpm/@nestjs+config@12.0.0_@nestjs+common@12.0.1_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/config.constants.js
1263
+ var import_main = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
1264
+ function _resolveEscapeSequences(value) {
1265
+ return value.replace(/\\\$/g, "$");
1266
+ }
1267
+ function expandValue(value, processEnv, runningParsed) {
1268
+ const env = {
1269
+ ...runningParsed,
1270
+ ...processEnv
1271
+ };
1272
+ const regex = /(?<!\\)\${([^{}]+)}|(?<!\\)\$([A-Za-z_][A-Za-z0-9_]*)/g;
1273
+ let result = value;
1274
+ let match;
1275
+ const seen = /* @__PURE__ */ new Set();
1276
+ while ((match = regex.exec(result)) !== null) {
1277
+ seen.add(result);
1278
+ const [template, bracedExpression, unbracedExpression] = match;
1279
+ const expression = bracedExpression || unbracedExpression;
1280
+ const opMatch = expression.match(/(:\+|\+|:-|-)/);
1281
+ const splitter = opMatch ? opMatch[0] : null;
1282
+ const r = expression.split(splitter);
1283
+ let defaultValue;
1284
+ let value;
1285
+ const key = r.shift();
1286
+ if ([":+", "+"].includes(splitter)) {
1287
+ defaultValue = env[key] ? r.join(splitter) : "";
1288
+ value = null;
1289
+ } else {
1290
+ defaultValue = r.join(splitter);
1291
+ value = env[key];
1292
+ }
1293
+ if (value) if (seen.has(value)) result = result.replace(template, defaultValue);
1294
+ else result = result.replace(template, value);
1295
+ else result = result.replace(template, defaultValue);
1296
+ if (result === runningParsed[key]) break;
1297
+ regex.lastIndex = 0;
1298
+ }
1299
+ return result;
1300
+ }
1301
+ function expand(options) {
1302
+ const runningParsed = {};
1303
+ let processEnv = process.env;
1304
+ if (options && options.processEnv != null) processEnv = options.processEnv;
1305
+ for (const key in options.parsed) {
1306
+ let value = options.parsed[key];
1307
+ if (processEnv[key] && processEnv[key] !== value) value = processEnv[key];
1308
+ else value = expandValue(value, processEnv, runningParsed);
1309
+ options.parsed[key] = _resolveEscapeSequences(value);
1310
+ runningParsed[key] = _resolveEscapeSequences(value);
1311
+ }
1312
+ for (const processKey in options.parsed) processEnv[processKey] = options.parsed[processKey];
1313
+ return options;
1314
+ }
1315
+ module.exports.expand = expand;
1316
+ })))();
1317
+ /**
1318
+ * Injection tokens
1319
+ */
1320
+ const CONFIGURATION_SERVICE_TOKEN = Symbol("CONFIG_SERVICE");
1321
+ const CONFIGURATION_TOKEN = "CONFIGURATION_TOKEN";
1322
+ const CONFIGURATION_LOADER = "CONFIGURATION_LOADER";
1323
+ const VALIDATED_ENV_LOADER = "VALIDATED_ENV_LOADER";
1324
+ const PARTIAL_CONFIGURATION_KEY = "PARTIAL_CONFIGURATION_KEY";
1325
+ const VALIDATED_ENV_PROPNAME = "_PROCESS_ENV_VALIDATED";
1326
+ //#endregion
1327
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
1328
+ /**
1329
+ * Checks if a property key is unsafe to access or copy directly.
1330
+ *
1331
+ * This function is used in functions like `get`, `unset`, and `merge` to prevent
1332
+ * prototype pollution attacks by identifying `__proto__`, which modifies the object's
1333
+ * prototype chain. `constructor` and `prototype` stay accessible here because lodash
1334
+ * keeps reads of them unrestricted; write paths use `isUnsafeToWriteProperty` instead,
1335
+ * which also blocks those keys.
1336
+ *
1337
+ * @param key - The property key to check
1338
+ * @returns `true` if the property is unsafe to access directly, `false` otherwise
1339
+ * @internal
1340
+ */
1341
+ function isUnsafeProperty(key) {
1342
+ return key === "__proto__";
1343
+ }
1344
+ //#endregion
1345
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs
1346
+ /** Matches any deep property path. Examples: `a.b`, `a[0]`, `a["b"]` */
1347
+ const regexIsDeepProp$1 = /\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;
1348
+ /**
1349
+ * Checks if a given key is a deep key.
1350
+ *
1351
+ * A deep key is a string that contains a dot (.) or square brackets with a property accessor.
1352
+ *
1353
+ * @param {PropertyKey} key - The key to check.
1354
+ * @returns {boolean} - Returns true if the key is a deep key, otherwise false.
1355
+ *
1356
+ * Examples:
1357
+ *
1358
+ * isDeepKey('a.b') // true
1359
+ * isDeepKey('a[b]') // true
1360
+ * isDeepKey('a') // false
1361
+ * isDeepKey(123) // false
1362
+ * isDeepKey('a.b.c') // true
1363
+ * isDeepKey('a[b][c]') // true
1364
+ * isDeepKey('a.') // false
1365
+ * isDeepKey('.a') // false
1366
+ * isDeepKey('a[b') // false
1367
+ * isDeepKey('a]b]') // false
1368
+ * isDeepKey('a][b') // false
1369
+ * isDeepKey('') // false
1370
+ * isDeepKey('a[0]') // true
1371
+ *
1372
+ */
1373
+ function isDeepKey(key) {
1374
+ switch (typeof key) {
1375
+ case "number":
1376
+ case "symbol": return false;
1377
+ case "string":
1378
+ if (key === "" || key.startsWith(".") || key.endsWith(".")) return false;
1379
+ return regexIsDeepProp$1.test(key);
1380
+ default: return false;
1381
+ }
1382
+ }
1383
+ //#endregion
1384
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/_internal/toKey.mjs
1385
+ /**
1386
+ * Converts `value` to a string key if it's not a string or symbol.
1387
+ *
1388
+ * @private
1389
+ * @param {unknown} value The value to inspect.
1390
+ * @returns {string|symbol} Returns the key.
1391
+ */
1392
+ function toKey(value) {
1393
+ if (typeof value === "string" || typeof value === "symbol") return value;
1394
+ if (Object.is(value?.valueOf?.(), -0)) return "-0";
1395
+ return String(value);
1396
+ }
1397
+ //#endregion
1398
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/util/toString.mjs
1399
+ /**
1400
+ * Converts `value` to a string.
1401
+ *
1402
+ * An empty string is returned for `null` and `undefined` values.
1403
+ * The sign of `-0` is preserved.
1404
+ *
1405
+ * @param value - The value to convert.
1406
+ * @returns Returns the converted string.
1407
+ *
1408
+ * @example
1409
+ * toString(null) // returns ''
1410
+ * toString(undefined) // returns ''
1411
+ * toString(-0) // returns '-0'
1412
+ * toString([1, 2, -0]) // returns '1,2,-0'
1413
+ * toString([Symbol('a'), Symbol('b')]) // returns 'Symbol(a),Symbol(b)'
1414
+ */
1415
+ function toString(value) {
1416
+ if (value == null) return "";
1417
+ return baseToString(value);
1418
+ }
1419
+ function baseToString(value) {
1420
+ if (typeof value === "string") return value;
1421
+ if (Array.isArray(value)) return value.map(baseToString).join(",");
1422
+ const result = String(value);
1423
+ if (result === "0" && Object.is(Number(value), -0)) return "-0";
1424
+ return result;
1425
+ }
1426
+ //#endregion
1427
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/util/toPath.mjs
1428
+ /**
1429
+ * Converts a deep key string into an array of path segments.
1430
+ *
1431
+ * This function takes a string representing a deep key (e.g., 'a.b.c' or 'a[b][c]') and breaks it down into an array of strings, each representing a segment of the path.
1432
+ *
1433
+ * @param deepKey - The deep key string to convert.
1434
+ * @returns An array of strings, each representing a segment of the path.
1435
+ *
1436
+ * Examples:
1437
+ *
1438
+ * toPath('a.b.c') // Returns ['a', 'b', 'c']
1439
+ * toPath('a[b][c]') // Returns ['a', 'b', 'c']
1440
+ * toPath('.a.b.c') // Returns ['', 'a', 'b', 'c']
1441
+ * toPath('a["b.c"].d') // Returns ['a', 'b.c', 'd']
1442
+ * toPath('') // Returns []
1443
+ * toPath('.a[b].c.d[e]["f.g"].h') // Returns ['', 'a', 'b', 'c', 'd', 'e', 'f.g', 'h']
1444
+ */
1445
+ function toPath(deepKey) {
1446
+ if (Array.isArray(deepKey)) return deepKey.map(toKey);
1447
+ if (typeof deepKey === "symbol") return [deepKey];
1448
+ deepKey = toString(deepKey);
1449
+ const result = [];
1450
+ const length = deepKey.length;
1451
+ if (length === 0) return result;
1452
+ let index = 0;
1453
+ let key = "";
1454
+ let quoteChar = "";
1455
+ let bracket = false;
1456
+ let bracketHadQuote = false;
1457
+ const bracketNumberRegex = /^-?\d+(?:\.\d+)?$/;
1458
+ if (deepKey.charCodeAt(0) === 46) result.push("");
1459
+ while (index < length) {
1460
+ const char = deepKey[index];
1461
+ if (quoteChar) if (char === "\\" && index + 1 < length) {
1462
+ index++;
1463
+ key += deepKey[index];
1464
+ } else if (char === quoteChar) quoteChar = "";
1465
+ else key += char;
1466
+ else if (bracket) if (char === "\"" || char === "'") {
1467
+ quoteChar = char;
1468
+ bracketHadQuote = true;
1469
+ } else if (char === "]") {
1470
+ bracket = false;
1471
+ if (!bracketHadQuote && key.includes(".") && !bracketNumberRegex.test(key)) {
1472
+ const segments = key.split(".");
1473
+ for (let i = 0; i < segments.length; i++) if (segments[i] !== "") result.push(segments[i]);
1474
+ } else result.push(key);
1475
+ key = "";
1476
+ } else key += char;
1477
+ else if (char === "[") {
1478
+ bracket = true;
1479
+ bracketHadQuote = false;
1480
+ if (key) {
1481
+ result.push(key);
1482
+ key = "";
1483
+ }
1484
+ } else if (char === ".") {
1485
+ if (key) {
1486
+ result.push(key);
1487
+ key = "";
1488
+ }
1489
+ const next = deepKey[index + 1];
1490
+ if (next === void 0 || next === ".") result.push("");
1491
+ } else key += char;
1492
+ index++;
1493
+ }
1494
+ if (key) result.push(key);
1495
+ return result;
1496
+ }
1497
+ //#endregion
1498
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/object/get.mjs
1499
+ /**
1500
+ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
1501
+ *
1502
+ * @param object - The object to query.
1503
+ * @param path - The path of the property to get.
1504
+ * @param [defaultValue] - The value returned if the resolved value is undefined.
1505
+ * @returns Returns the resolved value.
1506
+ *
1507
+ * @example
1508
+ * const object = { a: { b: { c: 1 } } };
1509
+ * get(object, 'a.b.c');
1510
+ * // => 1
1511
+ *
1512
+ * get(object, ['a', 'b', 'c']);
1513
+ * // => 1
1514
+ *
1515
+ * get(object, 'a.b.d', 'default');
1516
+ * // => 'default'
1517
+ */
1518
+ function get(object, path, defaultValue) {
1519
+ if (object == null) return defaultValue;
1520
+ switch (typeof path) {
1521
+ case "string": {
1522
+ if (isUnsafeProperty(path)) return defaultValue;
1523
+ const result = object[path];
1524
+ if (result === void 0) if (isDeepKey(path) && !Object.hasOwn(object, path)) return get(object, toPath(path), defaultValue);
1525
+ else return defaultValue;
1526
+ return result;
1527
+ }
1528
+ case "number":
1529
+ case "symbol": {
1530
+ if (typeof path === "number") path = toKey(path);
1531
+ const result = object[path];
1532
+ if (result === void 0) return defaultValue;
1533
+ return result;
1534
+ }
1535
+ default: {
1536
+ if (Array.isArray(path)) return getWithPath(object, path, defaultValue);
1537
+ if (Object.is(path?.valueOf(), -0)) path = "-0";
1538
+ else path = String(path);
1539
+ if (isUnsafeProperty(path)) return defaultValue;
1540
+ const result = object[path];
1541
+ if (result === void 0) return defaultValue;
1542
+ return result;
1543
+ }
1544
+ }
1545
+ }
1546
+ function getWithPath(object, path, defaultValue) {
1547
+ if (path.length === 0) return defaultValue;
1548
+ let current = object;
1549
+ for (let index = 0; index < path.length; index++) {
1550
+ if (current == null) return defaultValue;
1551
+ if (isUnsafeProperty(path[index])) return defaultValue;
1552
+ current = current[path[index]];
1553
+ }
1554
+ if (current === void 0) return defaultValue;
1555
+ return current;
1556
+ }
1557
+ //#endregion
1558
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/_internal/isIndex.mjs
1559
+ const IS_UNSIGNED_INTEGER = /^(?:0|[1-9]\d*)$/;
1560
+ function isIndex(value, length = Number.MAX_SAFE_INTEGER) {
1561
+ switch (typeof value) {
1562
+ case "number": return Number.isInteger(value) && value >= 0 && value < length;
1563
+ case "symbol": return false;
1564
+ case "string": return IS_UNSIGNED_INTEGER.test(value);
1565
+ }
1566
+ }
1567
+ //#endregion
1568
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
1569
+ /**
1570
+ * Gets the `toStringTag` of `value`.
1571
+ *
1572
+ * @private
1573
+ * @param {T} value The value to query.
1574
+ * @returns {string} Returns the `Object.prototype.toString.call` result.
1575
+ */
1576
+ function getTag(value) {
1577
+ if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
1578
+ return Object.prototype.toString.call(value);
1579
+ }
1580
+ //#endregion
1581
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
1582
+ /**
1583
+ * Checks if the given value is an arguments object.
1584
+ *
1585
+ * This function tests whether the provided value is an arguments object or not.
1586
+ * It returns `true` if the value is an arguments object, and `false` otherwise.
1587
+ *
1588
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an arguments object.
1589
+ *
1590
+ * @param value - The value to test if it is an arguments object.
1591
+ * @returns `true` if the value is an arguments, `false` otherwise.
1592
+ *
1593
+ * @example
1594
+ * const args = (function() { return arguments; })();
1595
+ * const strictArgs = (function() { 'use strict'; return arguments; })();
1596
+ * const value = [1, 2, 3];
1597
+ *
1598
+ * console.log(isArguments(args)); // true
1599
+ * console.log(isArguments(strictArgs)); // true
1600
+ * console.log(isArguments(value)); // false
1601
+ */
1602
+ function isArguments(value) {
1603
+ return value !== null && typeof value === "object" && getTag(value) === "[object Arguments]";
1604
+ }
1605
+ //#endregion
1606
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/object/has.mjs
1607
+ /**
1608
+ * Checks if a given path exists within an object.
1609
+ *
1610
+ * You can provide the path as a single property key, an array of property keys,
1611
+ * or a string representing a deep path.
1612
+ *
1613
+ * If the path is an index and the object is an array or an arguments object, the function will verify
1614
+ * if the index is valid and within the bounds of the array or arguments object, even if the array or
1615
+ * arguments object is sparse (i.e., not all indexes are defined).
1616
+ *
1617
+ * @param object - The object to query.
1618
+ * @param path - The path to check. This can be a single property key,
1619
+ * an array of property keys, or a string representing a deep path.
1620
+ * @returns Returns `true` if the path exists in the object, `false` otherwise.
1621
+ *
1622
+ * @example
1623
+ *
1624
+ * const obj = { a: { b: { c: 3 } } };
1625
+ *
1626
+ * has(obj, 'a'); // true
1627
+ * has(obj, ['a', 'b']); // true
1628
+ * has(obj, ['a', 'b', 'c']); // true
1629
+ * has(obj, 'a.b.c'); // true
1630
+ * has(obj, 'a.b.d'); // false
1631
+ * has(obj, ['a', 'b', 'c', 'd']); // false
1632
+ * has([], 0); // false
1633
+ * has([1, 2, 3], 2); // true
1634
+ * has([1, 2, 3], 5); // false
1635
+ */
1636
+ function has(object, path) {
1637
+ let resolvedPath;
1638
+ if (Array.isArray(path)) resolvedPath = path;
1639
+ else if (typeof path === "string" && isDeepKey(path) && !(path in Object(object))) resolvedPath = toPath(path);
1640
+ else resolvedPath = [path];
1641
+ if (resolvedPath.length === 0) return false;
1642
+ let current = object;
1643
+ for (let i = 0; i < resolvedPath.length; i++) {
1644
+ const key = resolvedPath[i];
1645
+ if (current == null || !Object.hasOwn(current, key)) {
1646
+ if (!((Array.isArray(current) || isArguments(current)) && isIndex(key) && key < current.length)) return false;
1647
+ }
1648
+ current = current[key];
1649
+ }
1650
+ return true;
1651
+ }
1652
+ //#endregion
1653
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/predicate/isObject.mjs
1654
+ /**
1655
+ * Checks if the given value is an object. An object is a value that is
1656
+ * not a primitive type (string, number, boolean, symbol, null, or undefined).
1657
+ *
1658
+ * This function tests whether the provided value is an object or not.
1659
+ * It returns `true` if the value is an object, and `false` otherwise.
1660
+ *
1661
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an object value.
1662
+ *
1663
+ * @param value - The value to check if it is an object.
1664
+ * @returns `true` if the value is an object, `false` otherwise.
1665
+ *
1666
+ * @example
1667
+ * const value1 = {};
1668
+ * const value2 = [1, 2, 3];
1669
+ * const value3 = () => {};
1670
+ * const value4 = null;
1671
+ *
1672
+ * console.log(isObject(value1)); // true
1673
+ * console.log(isObject(value2)); // true
1674
+ * console.log(isObject(value3)); // true
1675
+ * console.log(isObject(value4)); // false
1676
+ */
1677
+ function isObject$1(value) {
1678
+ return value !== null && (typeof value === "object" || typeof value === "function");
1679
+ }
1680
+ //#endregion
1681
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/predicate/isSymbol.mjs
1682
+ /**
1683
+ * Check whether a value is a symbol.
1684
+ *
1685
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `symbol`.
1686
+ *
1687
+ * @param value The value to check.
1688
+ * @returns Returns `true` if `value` is a symbol, else `false`.
1689
+ * @example
1690
+ * isSymbol(Symbol.iterator);
1691
+ * // => true
1692
+ *
1693
+ * isSymbol('abc');
1694
+ * // => false
1695
+ */
1696
+ function isSymbol(value) {
1697
+ return typeof value === "symbol" || value instanceof Symbol;
1698
+ }
1699
+ //#endregion
1700
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/_internal/isKey.mjs
1701
+ /** Matches any deep property path. (e.g. `a.b[0].c`)*/
1702
+ const regexIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
1703
+ /** Matches any word character (alphanumeric & underscore).*/
1704
+ const regexIsPlainProp = /^\w*$/;
1705
+ /**
1706
+ * Checks if `value` is a property name and not a property path. (It's ok that the `value` is not in the keys of the `object`)
1707
+ * @param {unknown} value The value to check.
1708
+ * @param {unknown} object The object to query.
1709
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
1710
+ *
1711
+ * @example
1712
+ * isKey('a', { a: 1 });
1713
+ * // => true
1714
+ *
1715
+ * isKey('a.b', { a: { b: 2 } });
1716
+ * // => false
1717
+ */
1718
+ function isKey(value, object) {
1719
+ if (Array.isArray(value)) return false;
1720
+ if (typeof value === "number" || typeof value === "boolean" || value == null || isSymbol(value)) return true;
1721
+ return typeof value === "string" && (regexIsPlainProp.test(value) || !regexIsDeepProp.test(value)) || object != null && Object.hasOwn(object, value);
1722
+ }
1723
+ //#endregion
1724
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/util/eq.mjs
1725
+ /**
1726
+ * Performs a `SameValueZero` comparison between two values to determine if they are equivalent.
1727
+ *
1728
+ * @param value The value to compare.
1729
+ * @param other The other value to compare.
1730
+ * @returns Returns `true` if the values are equivalent, else `false`.
1731
+ *
1732
+ * @example
1733
+ * eq(1, 1); // true
1734
+ * eq(0, -0); // true
1735
+ * eq(NaN, NaN); // true
1736
+ * eq('a', Object('a')); // false
1737
+ */
1738
+ function eq(value, other) {
1739
+ return value === other || Number.isNaN(value) && Number.isNaN(other);
1740
+ }
1741
+ //#endregion
1742
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/_internal/assignValue.mjs
1743
+ const assignValue = (object, key, value) => {
1744
+ const objValue = object[key];
1745
+ if (!(Object.hasOwn(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) object[key] = value;
1746
+ };
1747
+ //#endregion
1748
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/_internal/isUnsafeToWriteProperty.mjs
1749
+ /**
1750
+ * Checks if a property key is unsafe to write to.
1751
+ *
1752
+ * Writing through `__proto__`, `constructor`, or `prototype` can reach
1753
+ * `Object.prototype` and pollute every object, so write paths like `set`,
1754
+ * `update`, and `zipObjectDeep` abort when a path segment matches one of
1755
+ * these keys, matching lodash's behavior.
1756
+ *
1757
+ * Read paths like `get` and `unset` use `isUnsafeProperty` instead, which
1758
+ * only blocks `__proto__`; lodash keeps reads of `constructor` and
1759
+ * `prototype` unrestricted.
1760
+ *
1761
+ * @param key - The property key to check
1762
+ * @returns `true` if the property is unsafe to write to, `false` otherwise
1763
+ * @internal
1764
+ */
1765
+ function isUnsafeToWriteProperty(key) {
1766
+ return key === "__proto__" || key === "constructor" || key === "prototype";
1767
+ }
1768
+ //#endregion
1769
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/object/updateWith.mjs
1770
+ /**
1771
+ * Updates the value at the specified path of the given object using an updater function and a customizer.
1772
+ * If any part of the path does not exist, it will be created.
1773
+ *
1774
+ * @template T - The type of the object.
1775
+ * @template R - The type of the return value.
1776
+ * @param obj - The object to modify.
1777
+ * @param path - The path of the property to update.
1778
+ * @param updater - The function to produce the updated value.
1779
+ * @param customizer - The function to customize the update process.
1780
+ * @returns The modified object.
1781
+ *
1782
+ * @example
1783
+ * const object = { 'a': [{ 'b': { 'c': 3 } }] };
1784
+ * updateWith(object, 'a[0].b.c', (n) => n * n);
1785
+ * // => { 'a': [{ 'b': { 'c': 9 } }] }
1786
+ */
1787
+ function updateWith(obj, path, updater, customizer) {
1788
+ if (obj == null && !isObject$1(obj)) return obj;
1789
+ let resolvedPath;
1790
+ if (isKey(path, obj)) resolvedPath = [path];
1791
+ else if (Array.isArray(path)) resolvedPath = path;
1792
+ else resolvedPath = toPath(path);
1793
+ const updateValue = updater(get(obj, resolvedPath));
1794
+ let current = obj;
1795
+ for (let i = 0; i < resolvedPath.length && current != null; i++) {
1796
+ const key = toKey(resolvedPath[i]);
1797
+ if (isUnsafeToWriteProperty(key)) return obj;
1798
+ let newValue;
1799
+ if (i === resolvedPath.length - 1) newValue = updateValue;
1800
+ else {
1801
+ const objValue = current[key];
1802
+ const customizerResult = customizer?.(objValue, key, obj);
1803
+ newValue = customizerResult !== void 0 ? customizerResult : isObject$1(objValue) ? objValue : isIndex(resolvedPath[i + 1]) ? [] : {};
1804
+ }
1805
+ assignValue(current, key, newValue);
1806
+ current = current[key];
1807
+ }
1808
+ return obj;
1809
+ }
1810
+ //#endregion
1811
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/object/set.mjs
1812
+ /**
1813
+ * Sets the value at the specified path of the given object. If any part of the path does not exist, it will be created.
1814
+ *
1815
+ * @template T - The type of the object.
1816
+ * @param obj - The object to modify.
1817
+ * @param path - The path of the property to set.
1818
+ * @param value - The value to set.
1819
+ * @returns The modified object.
1820
+ *
1821
+ * @example
1822
+ * // Set a value in a nested object
1823
+ * const obj = { a: { b: { c: 3 } } };
1824
+ * set(obj, 'a.b.c', 4);
1825
+ * console.log(obj.a.b.c); // 4
1826
+ *
1827
+ * @example
1828
+ * // Set a value in an array
1829
+ * const arr = [1, 2, 3];
1830
+ * set(arr, 1, 4);
1831
+ * console.log(arr[1]); // 4
1832
+ *
1833
+ * @example
1834
+ * // Create non-existent path and set value
1835
+ * const obj = {};
1836
+ * set(obj, 'a.b.c', 4);
1837
+ * console.log(obj); // { a: { b: { c: 4 } } }
1838
+ */
1839
+ function set(obj, path, value) {
1840
+ return updateWith(obj, path, () => value, () => void 0);
1841
+ }
1842
+ //#endregion
1843
+ //#region node_modules/.pnpm/@nestjs+config@12.0.0_@nestjs+common@12.0.1_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/utils/get-config-token.util.js
1844
+ /**
1845
+ * @publicApi
1846
+ */
1847
+ function getConfigToken(token) {
1848
+ return `CONFIGURATION(${token.toString()})`;
1849
+ }
1083
1850
  //#endregion
1084
- //#region node_modules/.pnpm/dotenv@17.4.1/node_modules/dotenv/lib/main.js
1085
- var require_main$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1086
- const fs$1 = require("fs");
1087
- const path = require("path");
1851
+ //#region node_modules/.pnpm/@nestjs+config@12.0.0_@nestjs+common@12.0.1_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/utils/get-default-parser.util.js
1852
+ var import_main$1 = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
1853
+ const fs$2 = require("fs");
1854
+ const path$1 = require("path");
1088
1855
  const os = require("os");
1089
- const crypto = require("crypto");
1856
+ const crypto$1 = require("crypto");
1090
1857
  const TIPS = [
1091
1858
  "◈ encrypted .env [www.dotenvx.com]",
1092
1859
  "◈ secrets for agents [www.dotenvx.com]",
@@ -1211,14 +1978,14 @@ var require_main$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1211
1978
  function _vaultPath(options) {
1212
1979
  let possibleVaultPath = null;
1213
1980
  if (options && options.path && options.path.length > 0) if (Array.isArray(options.path)) {
1214
- for (const filepath of options.path) if (fs$1.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
1981
+ for (const filepath of options.path) if (fs$2.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
1215
1982
  } else possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
1216
- else possibleVaultPath = path.resolve(process.cwd(), ".env.vault");
1217
- if (fs$1.existsSync(possibleVaultPath)) return possibleVaultPath;
1983
+ else possibleVaultPath = path$1.resolve(process.cwd(), ".env.vault");
1984
+ if (fs$2.existsSync(possibleVaultPath)) return possibleVaultPath;
1218
1985
  return null;
1219
1986
  }
1220
1987
  function _resolveHome(envPath) {
1221
- return envPath[0] === "~" ? path.join(os.homedir(), envPath.slice(1)) : envPath;
1988
+ return envPath[0] === "~" ? path$1.join(os.homedir(), envPath.slice(1)) : envPath;
1222
1989
  }
1223
1990
  function _configVault(options) {
1224
1991
  const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
@@ -1231,7 +1998,7 @@ var require_main$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1231
1998
  return { parsed };
1232
1999
  }
1233
2000
  function configDotenv(options) {
1234
- const dotenvPath = path.resolve(process.cwd(), ".env");
2001
+ const dotenvPath = path$1.resolve(process.cwd(), ".env");
1235
2002
  let encoding = "utf8";
1236
2003
  let processEnv = process.env;
1237
2004
  if (options && options.processEnv != null) processEnv = options.processEnv;
@@ -1247,11 +2014,11 @@ var require_main$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1247
2014
  }
1248
2015
  let lastError;
1249
2016
  const parsedAll = {};
1250
- for (const path of optionPaths) try {
1251
- const parsed = DotenvModule.parse(fs$1.readFileSync(path, { encoding }));
2017
+ for (const path$2 of optionPaths) try {
2018
+ const parsed = DotenvModule.parse(fs$2.readFileSync(path$2, { encoding }));
1252
2019
  DotenvModule.populate(parsedAll, parsed, options);
1253
2020
  } catch (e) {
1254
- if (debug) _debug(`failed to load ${path} ${e.message}`);
2021
+ if (debug) _debug(`failed to load ${path$2} ${e.message}`);
1255
2022
  lastError = e;
1256
2023
  }
1257
2024
  const populated = DotenvModule.populate(processEnv, parsedAll, options);
@@ -1261,7 +2028,7 @@ var require_main$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1261
2028
  const keysCount = Object.keys(populated).length;
1262
2029
  const shortPaths = [];
1263
2030
  for (const filePath of optionPaths) try {
1264
- const relative = path.relative(process.cwd(), filePath);
2031
+ const relative = path$1.relative(process.cwd(), filePath);
1265
2032
  shortPaths.push(relative);
1266
2033
  } catch (e) {
1267
2034
  if (debug) _debug(`failed to load ${filePath} ${e.message}`);
@@ -1291,7 +2058,7 @@ var require_main$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1291
2058
  const authTag = ciphertext.subarray(-16);
1292
2059
  ciphertext = ciphertext.subarray(12, -16);
1293
2060
  try {
1294
- const aesgcm = crypto.createDecipheriv("aes-256-gcm", key, nonce);
2061
+ const aesgcm = crypto$1.createDecipheriv("aes-256-gcm", key, nonce);
1295
2062
  aesgcm.setAuthTag(authTag);
1296
2063
  return `${aesgcm.update(ciphertext)}${aesgcm.final()}`;
1297
2064
  } catch (error) {
@@ -1348,2299 +2115,413 @@ var require_main$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1348
2115
  module.exports.parse = DotenvModule.parse;
1349
2116
  module.exports.populate = DotenvModule.populate;
1350
2117
  module.exports = DotenvModule;
1351
- }));
2118
+ })))(), 1);
2119
+ const getDefaultParser = () => import_main$1.parse;
1352
2120
  //#endregion
1353
- //#region node_modules/.pnpm/dotenv-expand@12.0.3/node_modules/dotenv-expand/lib/main.js
1354
- var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1355
- function _resolveEscapeSequences(value) {
1356
- return value.replace(/\\\$/g, "$");
2121
+ //#region node_modules/.pnpm/@nestjs+config@12.0.0_@nestjs+common@12.0.1_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/config.service.js
2122
+ var __decorate$2 = function(decorators, target, key, desc) {
2123
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2124
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2125
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2126
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
2127
+ };
2128
+ var __metadata = function(k, v) {
2129
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
2130
+ };
2131
+ var __param = function(paramIndex, decorator) {
2132
+ return function(target, key) {
2133
+ decorator(target, key, paramIndex);
2134
+ };
2135
+ };
2136
+ /**
2137
+ * @publicApi
2138
+ */
2139
+ let ConfigService = class ConfigService {
2140
+ set isCacheEnabled(value) {
2141
+ this._isCacheEnabled = value;
2142
+ }
2143
+ get isCacheEnabled() {
2144
+ return this._isCacheEnabled;
2145
+ }
2146
+ set skipProcessEnv(value) {
2147
+ this._skipProcessEnv = value;
2148
+ }
2149
+ get skipProcessEnv() {
2150
+ return this._skipProcessEnv;
2151
+ }
2152
+ constructor(internalConfig = {}) {
2153
+ this.internalConfig = internalConfig;
2154
+ this.cache = {};
2155
+ this._changes$ = new rxjs.Subject();
2156
+ this._skipProcessEnv = false;
2157
+ this._isCacheEnabled = false;
2158
+ this.envFilePaths = [];
2159
+ this.parser = getDefaultParser();
2160
+ }
2161
+ /**
2162
+ * Returns a stream of configuration changes.
2163
+ * Each event contains the attribute path, the old value and the new value.
2164
+ */
2165
+ get changes$() {
2166
+ return this._changes$.asObservable();
2167
+ }
2168
+ /**
2169
+ * Get a configuration value (either custom configuration or process environment variable)
2170
+ * based on property path (you can use dot notation to traverse nested object, e.g. "database.host").
2171
+ * It returns a default value if the key does not exist.
2172
+ * @param propertyPath
2173
+ * @param defaultValueOrOptions
2174
+ */
2175
+ get(propertyPath, defaultValueOrOptions, options) {
2176
+ const internalValue = this.getFromInternalConfig(propertyPath);
2177
+ if (!(0, _nestjs_common_utils_shared_utils_js.isUndefined)(internalValue)) return internalValue;
2178
+ const validatedEnvValue = this.getFromValidatedEnv(propertyPath);
2179
+ if (!(0, _nestjs_common_utils_shared_utils_js.isUndefined)(validatedEnvValue)) return validatedEnvValue;
2180
+ const defaultValue = this.isGetOptionsObject(defaultValueOrOptions) && !options ? void 0 : defaultValueOrOptions;
2181
+ if (!this._skipProcessEnv) {
2182
+ const processEnvValue = this.getFromProcessEnv(propertyPath, defaultValue);
2183
+ if (!(0, _nestjs_common_utils_shared_utils_js.isUndefined)(processEnvValue)) return processEnvValue;
2184
+ }
2185
+ return defaultValue;
2186
+ }
2187
+ /**
2188
+ * Get a configuration value (either custom configuration or process environment variable)
2189
+ * based on property path (you can use dot notation to traverse nested object, e.g. "database.host").
2190
+ * It returns a default value if the key does not exist.
2191
+ * If the default value is undefined an exception will be thrown.
2192
+ * @param propertyPath
2193
+ * @param defaultValueOrOptions
2194
+ */
2195
+ getOrThrow(propertyPath, defaultValueOrOptions, options) {
2196
+ const value = this.get(propertyPath, defaultValueOrOptions, options);
2197
+ if ((0, _nestjs_common_utils_shared_utils_js.isUndefined)(value)) throw new TypeError(`Configuration key "${propertyPath.toString()}" does not exist`);
2198
+ return value;
2199
+ }
2200
+ /**
2201
+ * Sets a configuration value based on property path.
2202
+ * @param propertyPath
2203
+ * @param value
2204
+ */
2205
+ set(propertyPath, value) {
2206
+ const oldValue = this.get(propertyPath);
2207
+ set(this.internalConfig, propertyPath, value);
2208
+ if (typeof propertyPath === "string") {
2209
+ process.env[propertyPath] = String(value);
2210
+ this.updateInterpolatedEnv(propertyPath, String(value));
2211
+ }
2212
+ if (this.isCacheEnabled) this.setInCacheIfDefined(propertyPath, value);
2213
+ this._changes$.next({
2214
+ path: propertyPath,
2215
+ oldValue,
2216
+ newValue: value
2217
+ });
1357
2218
  }
1358
- function expandValue(value, processEnv, runningParsed) {
1359
- const env = {
1360
- ...runningParsed,
1361
- ...processEnv
1362
- };
1363
- const regex = /(?<!\\)\${([^{}]+)}|(?<!\\)\$([A-Za-z_][A-Za-z0-9_]*)/g;
1364
- let result = value;
1365
- let match;
1366
- const seen = /* @__PURE__ */ new Set();
1367
- while ((match = regex.exec(result)) !== null) {
1368
- seen.add(result);
1369
- const [template, bracedExpression, unbracedExpression] = match;
1370
- const expression = bracedExpression || unbracedExpression;
1371
- const opMatch = expression.match(/(:\+|\+|:-|-)/);
1372
- const splitter = opMatch ? opMatch[0] : null;
1373
- const r = expression.split(splitter);
1374
- let defaultValue;
1375
- let value;
1376
- const key = r.shift();
1377
- if ([":+", "+"].includes(splitter)) {
1378
- defaultValue = env[key] ? r.join(splitter) : "";
1379
- value = null;
1380
- } else {
1381
- defaultValue = r.join(splitter);
1382
- value = env[key];
1383
- }
1384
- if (value) if (seen.has(value)) result = result.replace(template, defaultValue);
1385
- else result = result.replace(template, value);
1386
- else result = result.replace(template, defaultValue);
1387
- if (result === runningParsed[key]) break;
1388
- regex.lastIndex = 0;
1389
- }
1390
- return result;
2219
+ /**
2220
+ * Sets env file paths from `config.module.ts` to parse.
2221
+ * @param paths
2222
+ */
2223
+ setEnvFilePaths(paths) {
2224
+ this.envFilePaths = paths;
1391
2225
  }
1392
- function expand(options) {
1393
- const runningParsed = {};
1394
- let processEnv = process.env;
1395
- if (options && options.processEnv != null) processEnv = options.processEnv;
1396
- for (const key in options.parsed) {
1397
- let value = options.parsed[key];
1398
- if (processEnv[key] && processEnv[key] !== value) value = processEnv[key];
1399
- else value = expandValue(value, processEnv, runningParsed);
1400
- options.parsed[key] = _resolveEscapeSequences(value);
1401
- runningParsed[key] = _resolveEscapeSequences(value);
1402
- }
1403
- for (const processKey in options.parsed) processEnv[processKey] = options.parsed[processKey];
1404
- return options;
1405
- }
1406
- module.exports.expand = expand;
1407
- }));
1408
- //#endregion
1409
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/config.constants.js
1410
- var require_config_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
1411
- Object.defineProperty(exports, "__esModule", { value: true });
1412
- exports.AS_PROVIDER_METHOD_KEY = exports.VALIDATED_ENV_PROPNAME = exports.PARTIAL_CONFIGURATION_PROPNAME = exports.PARTIAL_CONFIGURATION_KEY = exports.VALIDATED_ENV_LOADER = exports.CONFIGURATION_LOADER = exports.CONFIGURATION_TOKEN = exports.CONFIGURATION_SERVICE_TOKEN = void 0;
1413
- /**
1414
- * Injection tokens
1415
- */
1416
- exports.CONFIGURATION_SERVICE_TOKEN = Symbol("CONFIG_SERVICE");
1417
- exports.CONFIGURATION_TOKEN = "CONFIGURATION_TOKEN";
1418
- exports.CONFIGURATION_LOADER = "CONFIGURATION_LOADER";
1419
- exports.VALIDATED_ENV_LOADER = "VALIDATED_ENV_LOADER";
1420
- exports.PARTIAL_CONFIGURATION_KEY = "PARTIAL_CONFIGURATION_KEY";
1421
- exports.PARTIAL_CONFIGURATION_PROPNAME = "KEY";
1422
- exports.VALIDATED_ENV_PROPNAME = "_PROCESS_ENV_VALIDATED";
1423
- exports.AS_PROVIDER_METHOD_KEY = "asProvider";
1424
- }));
1425
- //#endregion
1426
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isArray.js
1427
- var require_isArray = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1428
- module.exports = Array.isArray;
1429
- }));
1430
- //#endregion
1431
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_freeGlobal.js
1432
- var require__freeGlobal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1433
- module.exports = typeof global == "object" && global && global.Object === Object && global;
1434
- }));
1435
- //#endregion
1436
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_root.js
1437
- var require__root = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1438
- var freeGlobal = require__freeGlobal();
1439
- /** Detect free variable `self`. */
1440
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
1441
- module.exports = freeGlobal || freeSelf || Function("return this")();
1442
- }));
1443
- //#endregion
1444
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Symbol.js
1445
- var require__Symbol = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1446
- module.exports = require__root().Symbol;
1447
- }));
1448
- //#endregion
1449
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getRawTag.js
1450
- var require__getRawTag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1451
- var Symbol = require__Symbol();
1452
- /** Used for built-in method references. */
1453
- var objectProto = Object.prototype;
1454
- /** Used to check objects for own properties. */
1455
- var hasOwnProperty = objectProto.hasOwnProperty;
1456
- /**
1457
- * Used to resolve the
1458
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
1459
- * of values.
1460
- */
1461
- var nativeObjectToString = objectProto.toString;
1462
- /** Built-in value references. */
1463
- var symToStringTag = Symbol ? Symbol.toStringTag : void 0;
1464
- /**
1465
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
1466
- *
1467
- * @private
1468
- * @param {*} value The value to query.
1469
- * @returns {string} Returns the raw `toStringTag`.
1470
- */
1471
- function getRawTag(value) {
1472
- var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
1473
- try {
1474
- value[symToStringTag] = void 0;
1475
- var unmasked = true;
1476
- } catch (e) {}
1477
- var result = nativeObjectToString.call(value);
1478
- if (unmasked) if (isOwn) value[symToStringTag] = tag;
1479
- else delete value[symToStringTag];
1480
- return result;
1481
- }
1482
- module.exports = getRawTag;
1483
- }));
1484
- //#endregion
1485
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_objectToString.js
1486
- var require__objectToString = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1487
- /**
1488
- * Used to resolve the
1489
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
1490
- * of values.
1491
- */
1492
- var nativeObjectToString = Object.prototype.toString;
1493
- /**
1494
- * Converts `value` to a string using `Object.prototype.toString`.
1495
- *
1496
- * @private
1497
- * @param {*} value The value to convert.
1498
- * @returns {string} Returns the converted string.
1499
- */
1500
- function objectToString(value) {
1501
- return nativeObjectToString.call(value);
1502
- }
1503
- module.exports = objectToString;
1504
- }));
1505
- //#endregion
1506
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGetTag.js
1507
- var require__baseGetTag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1508
- var Symbol = require__Symbol();
1509
- var getRawTag = require__getRawTag();
1510
- var objectToString = require__objectToString();
1511
- /** `Object#toString` result references. */
1512
- var nullTag = "[object Null]";
1513
- var undefinedTag = "[object Undefined]";
1514
- /** Built-in value references. */
1515
- var symToStringTag = Symbol ? Symbol.toStringTag : void 0;
1516
- /**
1517
- * The base implementation of `getTag` without fallbacks for buggy environments.
1518
- *
1519
- * @private
1520
- * @param {*} value The value to query.
1521
- * @returns {string} Returns the `toStringTag`.
1522
- */
1523
- function baseGetTag(value) {
1524
- if (value == null) return value === void 0 ? undefinedTag : nullTag;
1525
- return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
1526
- }
1527
- module.exports = baseGetTag;
1528
- }));
1529
- //#endregion
1530
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObjectLike.js
1531
- var require_isObjectLike = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1532
- /**
1533
- * Checks if `value` is object-like. A value is object-like if it's not `null`
1534
- * and has a `typeof` result of "object".
1535
- *
1536
- * @static
1537
- * @memberOf _
1538
- * @since 4.0.0
1539
- * @category Lang
1540
- * @param {*} value The value to check.
1541
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
1542
- * @example
1543
- *
1544
- * _.isObjectLike({});
1545
- * // => true
1546
- *
1547
- * _.isObjectLike([1, 2, 3]);
1548
- * // => true
1549
- *
1550
- * _.isObjectLike(_.noop);
1551
- * // => false
1552
- *
1553
- * _.isObjectLike(null);
1554
- * // => false
1555
- */
1556
- function isObjectLike(value) {
1557
- return value != null && typeof value == "object";
1558
- }
1559
- module.exports = isObjectLike;
1560
- }));
1561
- //#endregion
1562
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isSymbol.js
1563
- var require_isSymbol = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1564
- var baseGetTag = require__baseGetTag();
1565
- var isObjectLike = require_isObjectLike();
1566
- /** `Object#toString` result references. */
1567
- var symbolTag = "[object Symbol]";
1568
- /**
1569
- * Checks if `value` is classified as a `Symbol` primitive or object.
1570
- *
1571
- * @static
1572
- * @memberOf _
1573
- * @since 4.0.0
1574
- * @category Lang
1575
- * @param {*} value The value to check.
1576
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
1577
- * @example
1578
- *
1579
- * _.isSymbol(Symbol.iterator);
1580
- * // => true
1581
- *
1582
- * _.isSymbol('abc');
1583
- * // => false
1584
- */
1585
- function isSymbol(value) {
1586
- return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
1587
- }
1588
- module.exports = isSymbol;
1589
- }));
1590
- //#endregion
1591
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isKey.js
1592
- var require__isKey = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1593
- var isArray = require_isArray();
1594
- var isSymbol = require_isSymbol();
1595
- /** Used to match property names within property paths. */
1596
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
1597
- var reIsPlainProp = /^\w*$/;
1598
- /**
1599
- * Checks if `value` is a property name and not a property path.
1600
- *
1601
- * @private
1602
- * @param {*} value The value to check.
1603
- * @param {Object} [object] The object to query keys on.
1604
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
1605
- */
1606
- function isKey(value, object) {
1607
- if (isArray(value)) return false;
1608
- var type = typeof value;
1609
- if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) return true;
1610
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
1611
- }
1612
- module.exports = isKey;
1613
- }));
1614
- //#endregion
1615
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObject.js
1616
- var require_isObject = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1617
- /**
1618
- * Checks if `value` is the
1619
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
1620
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
1621
- *
1622
- * @static
1623
- * @memberOf _
1624
- * @since 0.1.0
1625
- * @category Lang
1626
- * @param {*} value The value to check.
1627
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
1628
- * @example
1629
- *
1630
- * _.isObject({});
1631
- * // => true
1632
- *
1633
- * _.isObject([1, 2, 3]);
1634
- * // => true
1635
- *
1636
- * _.isObject(_.noop);
1637
- * // => true
1638
- *
1639
- * _.isObject(null);
1640
- * // => false
1641
- */
1642
- function isObject(value) {
1643
- var type = typeof value;
1644
- return value != null && (type == "object" || type == "function");
1645
- }
1646
- module.exports = isObject;
1647
- }));
1648
- //#endregion
1649
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isFunction.js
1650
- var require_isFunction = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1651
- var baseGetTag = require__baseGetTag();
1652
- var isObject = require_isObject();
1653
- /** `Object#toString` result references. */
1654
- var asyncTag = "[object AsyncFunction]";
1655
- var funcTag = "[object Function]";
1656
- var genTag = "[object GeneratorFunction]";
1657
- var proxyTag = "[object Proxy]";
1658
- /**
1659
- * Checks if `value` is classified as a `Function` object.
1660
- *
1661
- * @static
1662
- * @memberOf _
1663
- * @since 0.1.0
1664
- * @category Lang
1665
- * @param {*} value The value to check.
1666
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
1667
- * @example
1668
- *
1669
- * _.isFunction(_);
1670
- * // => true
1671
- *
1672
- * _.isFunction(/abc/);
1673
- * // => false
1674
- */
1675
- function isFunction(value) {
1676
- if (!isObject(value)) return false;
1677
- var tag = baseGetTag(value);
1678
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
1679
- }
1680
- module.exports = isFunction;
1681
- }));
1682
- //#endregion
1683
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_coreJsData.js
1684
- var require__coreJsData = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1685
- module.exports = require__root()["__core-js_shared__"];
1686
- }));
1687
- //#endregion
1688
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isMasked.js
1689
- var require__isMasked = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1690
- var coreJsData = require__coreJsData();
1691
- /** Used to detect methods masquerading as native. */
1692
- var maskSrcKey = function() {
1693
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
1694
- return uid ? "Symbol(src)_1." + uid : "";
1695
- }();
1696
- /**
1697
- * Checks if `func` has its source masked.
1698
- *
1699
- * @private
1700
- * @param {Function} func The function to check.
1701
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
1702
- */
1703
- function isMasked(func) {
1704
- return !!maskSrcKey && maskSrcKey in func;
1705
- }
1706
- module.exports = isMasked;
1707
- }));
1708
- //#endregion
1709
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_toSource.js
1710
- var require__toSource = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1711
- /** Used to resolve the decompiled source of functions. */
1712
- var funcToString = Function.prototype.toString;
1713
- /**
1714
- * Converts `func` to its source code.
1715
- *
1716
- * @private
1717
- * @param {Function} func The function to convert.
1718
- * @returns {string} Returns the source code.
1719
- */
1720
- function toSource(func) {
1721
- if (func != null) {
1722
- try {
1723
- return funcToString.call(func);
1724
- } catch (e) {}
1725
- try {
1726
- return func + "";
1727
- } catch (e) {}
1728
- }
1729
- return "";
1730
- }
1731
- module.exports = toSource;
1732
- }));
1733
- //#endregion
1734
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsNative.js
1735
- var require__baseIsNative = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1736
- var isFunction = require_isFunction();
1737
- var isMasked = require__isMasked();
1738
- var isObject = require_isObject();
1739
- var toSource = require__toSource();
1740
- /**
1741
- * Used to match `RegExp`
1742
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
1743
- */
1744
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
1745
- /** Used to detect host constructors (Safari). */
1746
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
1747
- /** Used for built-in method references. */
1748
- var funcProto = Function.prototype;
1749
- var objectProto = Object.prototype;
1750
- /** Used to resolve the decompiled source of functions. */
1751
- var funcToString = funcProto.toString;
1752
- /** Used to check objects for own properties. */
1753
- var hasOwnProperty = objectProto.hasOwnProperty;
1754
- /** Used to detect if a method is native. */
1755
- var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
1756
- /**
1757
- * The base implementation of `_.isNative` without bad shim checks.
1758
- *
1759
- * @private
1760
- * @param {*} value The value to check.
1761
- * @returns {boolean} Returns `true` if `value` is a native function,
1762
- * else `false`.
1763
- */
1764
- function baseIsNative(value) {
1765
- if (!isObject(value) || isMasked(value)) return false;
1766
- return (isFunction(value) ? reIsNative : reIsHostCtor).test(toSource(value));
1767
- }
1768
- module.exports = baseIsNative;
1769
- }));
1770
- //#endregion
1771
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getValue.js
1772
- var require__getValue = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1773
- /**
1774
- * Gets the value at `key` of `object`.
1775
- *
1776
- * @private
1777
- * @param {Object} [object] The object to query.
1778
- * @param {string} key The key of the property to get.
1779
- * @returns {*} Returns the property value.
1780
- */
1781
- function getValue(object, key) {
1782
- return object == null ? void 0 : object[key];
1783
- }
1784
- module.exports = getValue;
1785
- }));
1786
- //#endregion
1787
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getNative.js
1788
- var require__getNative = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1789
- var baseIsNative = require__baseIsNative();
1790
- var getValue = require__getValue();
1791
- /**
1792
- * Gets the native function at `key` of `object`.
1793
- *
1794
- * @private
1795
- * @param {Object} object The object to query.
1796
- * @param {string} key The key of the method to get.
1797
- * @returns {*} Returns the function if it's native, else `undefined`.
1798
- */
1799
- function getNative(object, key) {
1800
- var value = getValue(object, key);
1801
- return baseIsNative(value) ? value : void 0;
1802
- }
1803
- module.exports = getNative;
1804
- }));
1805
- //#endregion
1806
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_nativeCreate.js
1807
- var require__nativeCreate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1808
- module.exports = require__getNative()(Object, "create");
1809
- }));
1810
- //#endregion
1811
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashClear.js
1812
- var require__hashClear = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1813
- var nativeCreate = require__nativeCreate();
1814
- /**
1815
- * Removes all key-value entries from the hash.
1816
- *
1817
- * @private
1818
- * @name clear
1819
- * @memberOf Hash
1820
- */
1821
- function hashClear() {
1822
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
1823
- this.size = 0;
1824
- }
1825
- module.exports = hashClear;
1826
- }));
1827
- //#endregion
1828
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashDelete.js
1829
- var require__hashDelete = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1830
- /**
1831
- * Removes `key` and its value from the hash.
1832
- *
1833
- * @private
1834
- * @name delete
1835
- * @memberOf Hash
1836
- * @param {Object} hash The hash to modify.
1837
- * @param {string} key The key of the value to remove.
1838
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1839
- */
1840
- function hashDelete(key) {
1841
- var result = this.has(key) && delete this.__data__[key];
1842
- this.size -= result ? 1 : 0;
1843
- return result;
1844
- }
1845
- module.exports = hashDelete;
1846
- }));
1847
- //#endregion
1848
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashGet.js
1849
- var require__hashGet = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1850
- var nativeCreate = require__nativeCreate();
1851
- /** Used to stand-in for `undefined` hash values. */
1852
- var HASH_UNDEFINED = "__lodash_hash_undefined__";
1853
- /** Used to check objects for own properties. */
1854
- var hasOwnProperty = Object.prototype.hasOwnProperty;
1855
- /**
1856
- * Gets the hash value for `key`.
1857
- *
1858
- * @private
1859
- * @name get
1860
- * @memberOf Hash
1861
- * @param {string} key The key of the value to get.
1862
- * @returns {*} Returns the entry value.
1863
- */
1864
- function hashGet(key) {
1865
- var data = this.__data__;
1866
- if (nativeCreate) {
1867
- var result = data[key];
1868
- return result === HASH_UNDEFINED ? void 0 : result;
1869
- }
1870
- return hasOwnProperty.call(data, key) ? data[key] : void 0;
1871
- }
1872
- module.exports = hashGet;
1873
- }));
1874
- //#endregion
1875
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashHas.js
1876
- var require__hashHas = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1877
- var nativeCreate = require__nativeCreate();
1878
- /** Used to check objects for own properties. */
1879
- var hasOwnProperty = Object.prototype.hasOwnProperty;
1880
- /**
1881
- * Checks if a hash value for `key` exists.
1882
- *
1883
- * @private
1884
- * @name has
1885
- * @memberOf Hash
1886
- * @param {string} key The key of the entry to check.
1887
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1888
- */
1889
- function hashHas(key) {
1890
- var data = this.__data__;
1891
- return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
1892
- }
1893
- module.exports = hashHas;
1894
- }));
1895
- //#endregion
1896
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashSet.js
1897
- var require__hashSet = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1898
- var nativeCreate = require__nativeCreate();
1899
- /** Used to stand-in for `undefined` hash values. */
1900
- var HASH_UNDEFINED = "__lodash_hash_undefined__";
1901
- /**
1902
- * Sets the hash `key` to `value`.
1903
- *
1904
- * @private
1905
- * @name set
1906
- * @memberOf Hash
1907
- * @param {string} key The key of the value to set.
1908
- * @param {*} value The value to set.
1909
- * @returns {Object} Returns the hash instance.
1910
- */
1911
- function hashSet(key, value) {
1912
- var data = this.__data__;
1913
- this.size += this.has(key) ? 0 : 1;
1914
- data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
1915
- return this;
1916
- }
1917
- module.exports = hashSet;
1918
- }));
1919
- //#endregion
1920
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Hash.js
1921
- var require__Hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1922
- var hashClear = require__hashClear();
1923
- var hashDelete = require__hashDelete();
1924
- var hashGet = require__hashGet();
1925
- var hashHas = require__hashHas();
1926
- var hashSet = require__hashSet();
1927
- /**
1928
- * Creates a hash object.
1929
- *
1930
- * @private
1931
- * @constructor
1932
- * @param {Array} [entries] The key-value pairs to cache.
1933
- */
1934
- function Hash(entries) {
1935
- var index = -1, length = entries == null ? 0 : entries.length;
1936
- this.clear();
1937
- while (++index < length) {
1938
- var entry = entries[index];
1939
- this.set(entry[0], entry[1]);
1940
- }
1941
- }
1942
- Hash.prototype.clear = hashClear;
1943
- Hash.prototype["delete"] = hashDelete;
1944
- Hash.prototype.get = hashGet;
1945
- Hash.prototype.has = hashHas;
1946
- Hash.prototype.set = hashSet;
1947
- module.exports = Hash;
1948
- }));
1949
- //#endregion
1950
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheClear.js
1951
- var require__listCacheClear = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1952
- /**
1953
- * Removes all key-value entries from the list cache.
1954
- *
1955
- * @private
1956
- * @name clear
1957
- * @memberOf ListCache
1958
- */
1959
- function listCacheClear() {
1960
- this.__data__ = [];
1961
- this.size = 0;
1962
- }
1963
- module.exports = listCacheClear;
1964
- }));
1965
- //#endregion
1966
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/eq.js
1967
- var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1968
- /**
1969
- * Performs a
1970
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1971
- * comparison between two values to determine if they are equivalent.
1972
- *
1973
- * @static
1974
- * @memberOf _
1975
- * @since 4.0.0
1976
- * @category Lang
1977
- * @param {*} value The value to compare.
1978
- * @param {*} other The other value to compare.
1979
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1980
- * @example
1981
- *
1982
- * var object = { 'a': 1 };
1983
- * var other = { 'a': 1 };
1984
- *
1985
- * _.eq(object, object);
1986
- * // => true
1987
- *
1988
- * _.eq(object, other);
1989
- * // => false
1990
- *
1991
- * _.eq('a', 'a');
1992
- * // => true
1993
- *
1994
- * _.eq('a', Object('a'));
1995
- * // => false
1996
- *
1997
- * _.eq(NaN, NaN);
1998
- * // => true
1999
- */
2000
- function eq(value, other) {
2001
- return value === other || value !== value && other !== other;
2002
- }
2003
- module.exports = eq;
2004
- }));
2005
- //#endregion
2006
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_assocIndexOf.js
2007
- var require__assocIndexOf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2008
- var eq = require_eq();
2009
- /**
2010
- * Gets the index at which the `key` is found in `array` of key-value pairs.
2011
- *
2012
- * @private
2013
- * @param {Array} array The array to inspect.
2014
- * @param {*} key The key to search for.
2015
- * @returns {number} Returns the index of the matched value, else `-1`.
2016
- */
2017
- function assocIndexOf(array, key) {
2018
- var length = array.length;
2019
- while (length--) if (eq(array[length][0], key)) return length;
2020
- return -1;
2021
- }
2022
- module.exports = assocIndexOf;
2023
- }));
2024
- //#endregion
2025
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheDelete.js
2026
- var require__listCacheDelete = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2027
- var assocIndexOf = require__assocIndexOf();
2028
- /** Built-in value references. */
2029
- var splice = Array.prototype.splice;
2030
- /**
2031
- * Removes `key` and its value from the list cache.
2032
- *
2033
- * @private
2034
- * @name delete
2035
- * @memberOf ListCache
2036
- * @param {string} key The key of the value to remove.
2037
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
2038
- */
2039
- function listCacheDelete(key) {
2040
- var data = this.__data__, index = assocIndexOf(data, key);
2041
- if (index < 0) return false;
2042
- if (index == data.length - 1) data.pop();
2043
- else splice.call(data, index, 1);
2044
- --this.size;
2045
- return true;
2046
- }
2047
- module.exports = listCacheDelete;
2048
- }));
2049
- //#endregion
2050
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheGet.js
2051
- var require__listCacheGet = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2052
- var assocIndexOf = require__assocIndexOf();
2053
- /**
2054
- * Gets the list cache value for `key`.
2055
- *
2056
- * @private
2057
- * @name get
2058
- * @memberOf ListCache
2059
- * @param {string} key The key of the value to get.
2060
- * @returns {*} Returns the entry value.
2061
- */
2062
- function listCacheGet(key) {
2063
- var data = this.__data__, index = assocIndexOf(data, key);
2064
- return index < 0 ? void 0 : data[index][1];
2065
- }
2066
- module.exports = listCacheGet;
2067
- }));
2068
- //#endregion
2069
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheHas.js
2070
- var require__listCacheHas = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2071
- var assocIndexOf = require__assocIndexOf();
2072
- /**
2073
- * Checks if a list cache value for `key` exists.
2074
- *
2075
- * @private
2076
- * @name has
2077
- * @memberOf ListCache
2078
- * @param {string} key The key of the entry to check.
2079
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2080
- */
2081
- function listCacheHas(key) {
2082
- return assocIndexOf(this.__data__, key) > -1;
2083
- }
2084
- module.exports = listCacheHas;
2085
- }));
2086
- //#endregion
2087
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheSet.js
2088
- var require__listCacheSet = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2089
- var assocIndexOf = require__assocIndexOf();
2090
- /**
2091
- * Sets the list cache `key` to `value`.
2092
- *
2093
- * @private
2094
- * @name set
2095
- * @memberOf ListCache
2096
- * @param {string} key The key of the value to set.
2097
- * @param {*} value The value to set.
2098
- * @returns {Object} Returns the list cache instance.
2099
- */
2100
- function listCacheSet(key, value) {
2101
- var data = this.__data__, index = assocIndexOf(data, key);
2102
- if (index < 0) {
2103
- ++this.size;
2104
- data.push([key, value]);
2105
- } else data[index][1] = value;
2106
- return this;
2107
- }
2108
- module.exports = listCacheSet;
2109
- }));
2110
- //#endregion
2111
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_ListCache.js
2112
- var require__ListCache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2113
- var listCacheClear = require__listCacheClear();
2114
- var listCacheDelete = require__listCacheDelete();
2115
- var listCacheGet = require__listCacheGet();
2116
- var listCacheHas = require__listCacheHas();
2117
- var listCacheSet = require__listCacheSet();
2118
- /**
2119
- * Creates an list cache object.
2120
- *
2121
- * @private
2122
- * @constructor
2123
- * @param {Array} [entries] The key-value pairs to cache.
2124
- */
2125
- function ListCache(entries) {
2126
- var index = -1, length = entries == null ? 0 : entries.length;
2127
- this.clear();
2128
- while (++index < length) {
2129
- var entry = entries[index];
2130
- this.set(entry[0], entry[1]);
2131
- }
2132
- }
2133
- ListCache.prototype.clear = listCacheClear;
2134
- ListCache.prototype["delete"] = listCacheDelete;
2135
- ListCache.prototype.get = listCacheGet;
2136
- ListCache.prototype.has = listCacheHas;
2137
- ListCache.prototype.set = listCacheSet;
2138
- module.exports = ListCache;
2139
- }));
2140
- //#endregion
2141
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Map.js
2142
- var require__Map = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2143
- module.exports = require__getNative()(require__root(), "Map");
2144
- }));
2145
- //#endregion
2146
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheClear.js
2147
- var require__mapCacheClear = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2148
- var Hash = require__Hash();
2149
- var ListCache = require__ListCache();
2150
- var Map = require__Map();
2151
- /**
2152
- * Removes all key-value entries from the map.
2153
- *
2154
- * @private
2155
- * @name clear
2156
- * @memberOf MapCache
2157
- */
2158
- function mapCacheClear() {
2159
- this.size = 0;
2160
- this.__data__ = {
2161
- "hash": new Hash(),
2162
- "map": new (Map || ListCache)(),
2163
- "string": new Hash()
2164
- };
2165
- }
2166
- module.exports = mapCacheClear;
2167
- }));
2168
- //#endregion
2169
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isKeyable.js
2170
- var require__isKeyable = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2171
- /**
2172
- * Checks if `value` is suitable for use as unique object key.
2173
- *
2174
- * @private
2175
- * @param {*} value The value to check.
2176
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
2177
- */
2178
- function isKeyable(value) {
2179
- var type = typeof value;
2180
- return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
2181
- }
2182
- module.exports = isKeyable;
2183
- }));
2184
- //#endregion
2185
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getMapData.js
2186
- var require__getMapData = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2187
- var isKeyable = require__isKeyable();
2188
- /**
2189
- * Gets the data for `map`.
2190
- *
2191
- * @private
2192
- * @param {Object} map The map to query.
2193
- * @param {string} key The reference key.
2194
- * @returns {*} Returns the map data.
2195
- */
2196
- function getMapData(map, key) {
2197
- var data = map.__data__;
2198
- return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
2199
- }
2200
- module.exports = getMapData;
2201
- }));
2202
- //#endregion
2203
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheDelete.js
2204
- var require__mapCacheDelete = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2205
- var getMapData = require__getMapData();
2206
- /**
2207
- * Removes `key` and its value from the map.
2208
- *
2209
- * @private
2210
- * @name delete
2211
- * @memberOf MapCache
2212
- * @param {string} key The key of the value to remove.
2213
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
2214
- */
2215
- function mapCacheDelete(key) {
2216
- var result = getMapData(this, key)["delete"](key);
2217
- this.size -= result ? 1 : 0;
2218
- return result;
2219
- }
2220
- module.exports = mapCacheDelete;
2221
- }));
2222
- //#endregion
2223
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheGet.js
2224
- var require__mapCacheGet = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2225
- var getMapData = require__getMapData();
2226
- /**
2227
- * Gets the map value for `key`.
2228
- *
2229
- * @private
2230
- * @name get
2231
- * @memberOf MapCache
2232
- * @param {string} key The key of the value to get.
2233
- * @returns {*} Returns the entry value.
2234
- */
2235
- function mapCacheGet(key) {
2236
- return getMapData(this, key).get(key);
2237
- }
2238
- module.exports = mapCacheGet;
2239
- }));
2240
- //#endregion
2241
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheHas.js
2242
- var require__mapCacheHas = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2243
- var getMapData = require__getMapData();
2244
- /**
2245
- * Checks if a map value for `key` exists.
2246
- *
2247
- * @private
2248
- * @name has
2249
- * @memberOf MapCache
2250
- * @param {string} key The key of the entry to check.
2251
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2252
- */
2253
- function mapCacheHas(key) {
2254
- return getMapData(this, key).has(key);
2255
- }
2256
- module.exports = mapCacheHas;
2257
- }));
2258
- //#endregion
2259
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheSet.js
2260
- var require__mapCacheSet = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2261
- var getMapData = require__getMapData();
2262
- /**
2263
- * Sets the map `key` to `value`.
2264
- *
2265
- * @private
2266
- * @name set
2267
- * @memberOf MapCache
2268
- * @param {string} key The key of the value to set.
2269
- * @param {*} value The value to set.
2270
- * @returns {Object} Returns the map cache instance.
2271
- */
2272
- function mapCacheSet(key, value) {
2273
- var data = getMapData(this, key), size = data.size;
2274
- data.set(key, value);
2275
- this.size += data.size == size ? 0 : 1;
2276
- return this;
2277
- }
2278
- module.exports = mapCacheSet;
2279
- }));
2280
- //#endregion
2281
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_MapCache.js
2282
- var require__MapCache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2283
- var mapCacheClear = require__mapCacheClear();
2284
- var mapCacheDelete = require__mapCacheDelete();
2285
- var mapCacheGet = require__mapCacheGet();
2286
- var mapCacheHas = require__mapCacheHas();
2287
- var mapCacheSet = require__mapCacheSet();
2288
- /**
2289
- * Creates a map cache object to store key-value pairs.
2290
- *
2291
- * @private
2292
- * @constructor
2293
- * @param {Array} [entries] The key-value pairs to cache.
2294
- */
2295
- function MapCache(entries) {
2296
- var index = -1, length = entries == null ? 0 : entries.length;
2297
- this.clear();
2298
- while (++index < length) {
2299
- var entry = entries[index];
2300
- this.set(entry[0], entry[1]);
2301
- }
2302
- }
2303
- MapCache.prototype.clear = mapCacheClear;
2304
- MapCache.prototype["delete"] = mapCacheDelete;
2305
- MapCache.prototype.get = mapCacheGet;
2306
- MapCache.prototype.has = mapCacheHas;
2307
- MapCache.prototype.set = mapCacheSet;
2308
- module.exports = MapCache;
2309
- }));
2310
- //#endregion
2311
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/memoize.js
2312
- var require_memoize = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2313
- var MapCache = require__MapCache();
2314
- /** Error message constants. */
2315
- var FUNC_ERROR_TEXT = "Expected a function";
2316
- /**
2317
- * Creates a function that memoizes the result of `func`. If `resolver` is
2318
- * provided, it determines the cache key for storing the result based on the
2319
- * arguments provided to the memoized function. By default, the first argument
2320
- * provided to the memoized function is used as the map cache key. The `func`
2321
- * is invoked with the `this` binding of the memoized function.
2322
- *
2323
- * **Note:** The cache is exposed as the `cache` property on the memoized
2324
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
2325
- * constructor with one whose instances implement the
2326
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
2327
- * method interface of `clear`, `delete`, `get`, `has`, and `set`.
2328
- *
2329
- * @static
2330
- * @memberOf _
2331
- * @since 0.1.0
2332
- * @category Function
2333
- * @param {Function} func The function to have its output memoized.
2334
- * @param {Function} [resolver] The function to resolve the cache key.
2335
- * @returns {Function} Returns the new memoized function.
2336
- * @example
2337
- *
2338
- * var object = { 'a': 1, 'b': 2 };
2339
- * var other = { 'c': 3, 'd': 4 };
2340
- *
2341
- * var values = _.memoize(_.values);
2342
- * values(object);
2343
- * // => [1, 2]
2344
- *
2345
- * values(other);
2346
- * // => [3, 4]
2347
- *
2348
- * object.a = 2;
2349
- * values(object);
2350
- * // => [1, 2]
2351
- *
2352
- * // Modify the result cache.
2353
- * values.cache.set(object, ['a', 'b']);
2354
- * values(object);
2355
- * // => ['a', 'b']
2356
- *
2357
- * // Replace `_.memoize.Cache`.
2358
- * _.memoize.Cache = WeakMap;
2359
- */
2360
- function memoize(func, resolver) {
2361
- if (typeof func != "function" || resolver != null && typeof resolver != "function") throw new TypeError(FUNC_ERROR_TEXT);
2362
- var memoized = function() {
2363
- var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
2364
- if (cache.has(key)) return cache.get(key);
2365
- var result = func.apply(this, args);
2366
- memoized.cache = cache.set(key, result) || cache;
2367
- return result;
2368
- };
2369
- memoized.cache = new (memoize.Cache || MapCache)();
2370
- return memoized;
2371
- }
2372
- memoize.Cache = MapCache;
2373
- module.exports = memoize;
2374
- }));
2375
- //#endregion
2376
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_memoizeCapped.js
2377
- var require__memoizeCapped = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2378
- var memoize = require_memoize();
2379
- /** Used as the maximum memoize cache size. */
2380
- var MAX_MEMOIZE_SIZE = 500;
2381
- /**
2382
- * A specialized version of `_.memoize` which clears the memoized function's
2383
- * cache when it exceeds `MAX_MEMOIZE_SIZE`.
2384
- *
2385
- * @private
2386
- * @param {Function} func The function to have its output memoized.
2387
- * @returns {Function} Returns the new memoized function.
2388
- */
2389
- function memoizeCapped(func) {
2390
- var result = memoize(func, function(key) {
2391
- if (cache.size === MAX_MEMOIZE_SIZE) cache.clear();
2392
- return key;
2393
- });
2394
- var cache = result.cache;
2395
- return result;
2396
- }
2397
- module.exports = memoizeCapped;
2398
- }));
2399
- //#endregion
2400
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stringToPath.js
2401
- var require__stringToPath = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2402
- var memoizeCapped = require__memoizeCapped();
2403
- /** Used to match property names within property paths. */
2404
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
2405
- /** Used to match backslashes in property paths. */
2406
- var reEscapeChar = /\\(\\)?/g;
2407
- module.exports = memoizeCapped(function(string) {
2408
- var result = [];
2409
- if (string.charCodeAt(0) === 46) result.push("");
2410
- string.replace(rePropName, function(match, number, quote, subString) {
2411
- result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
2412
- });
2413
- return result;
2414
- });
2415
- }));
2416
- //#endregion
2417
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayMap.js
2418
- var require__arrayMap = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2419
- /**
2420
- * A specialized version of `_.map` for arrays without support for iteratee
2421
- * shorthands.
2422
- *
2423
- * @private
2424
- * @param {Array} [array] The array to iterate over.
2425
- * @param {Function} iteratee The function invoked per iteration.
2426
- * @returns {Array} Returns the new mapped array.
2427
- */
2428
- function arrayMap(array, iteratee) {
2429
- var index = -1, length = array == null ? 0 : array.length, result = Array(length);
2430
- while (++index < length) result[index] = iteratee(array[index], index, array);
2431
- return result;
2432
- }
2433
- module.exports = arrayMap;
2434
- }));
2435
- //#endregion
2436
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseToString.js
2437
- var require__baseToString = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2438
- var Symbol = require__Symbol();
2439
- var arrayMap = require__arrayMap();
2440
- var isArray = require_isArray();
2441
- var isSymbol = require_isSymbol();
2442
- /** Used as references for various `Number` constants. */
2443
- var INFINITY = Infinity;
2444
- /** Used to convert symbols to primitives and strings. */
2445
- var symbolProto = Symbol ? Symbol.prototype : void 0;
2446
- var symbolToString = symbolProto ? symbolProto.toString : void 0;
2447
- /**
2448
- * The base implementation of `_.toString` which doesn't convert nullish
2449
- * values to empty strings.
2450
- *
2451
- * @private
2452
- * @param {*} value The value to process.
2453
- * @returns {string} Returns the string.
2454
- */
2455
- function baseToString(value) {
2456
- if (typeof value == "string") return value;
2457
- if (isArray(value)) return arrayMap(value, baseToString) + "";
2458
- if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
2459
- var result = value + "";
2460
- return result == "0" && 1 / value == -INFINITY ? "-0" : result;
2461
- }
2462
- module.exports = baseToString;
2463
- }));
2464
- //#endregion
2465
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/toString.js
2466
- var require_toString = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2467
- var baseToString = require__baseToString();
2468
- /**
2469
- * Converts `value` to a string. An empty string is returned for `null`
2470
- * and `undefined` values. The sign of `-0` is preserved.
2471
- *
2472
- * @static
2473
- * @memberOf _
2474
- * @since 4.0.0
2475
- * @category Lang
2476
- * @param {*} value The value to convert.
2477
- * @returns {string} Returns the converted string.
2478
- * @example
2479
- *
2480
- * _.toString(null);
2481
- * // => ''
2482
- *
2483
- * _.toString(-0);
2484
- * // => '-0'
2485
- *
2486
- * _.toString([1, 2, 3]);
2487
- * // => '1,2,3'
2488
- */
2489
- function toString(value) {
2490
- return value == null ? "" : baseToString(value);
2491
- }
2492
- module.exports = toString;
2493
- }));
2494
- //#endregion
2495
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_castPath.js
2496
- var require__castPath = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2497
- var isArray = require_isArray();
2498
- var isKey = require__isKey();
2499
- var stringToPath = require__stringToPath();
2500
- var toString = require_toString();
2501
- /**
2502
- * Casts `value` to a path array if it's not one.
2503
- *
2504
- * @private
2505
- * @param {*} value The value to inspect.
2506
- * @param {Object} [object] The object to query keys on.
2507
- * @returns {Array} Returns the cast property path array.
2508
- */
2509
- function castPath(value, object) {
2510
- if (isArray(value)) return value;
2511
- return isKey(value, object) ? [value] : stringToPath(toString(value));
2512
- }
2513
- module.exports = castPath;
2514
- }));
2515
- //#endregion
2516
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_toKey.js
2517
- var require__toKey = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2518
- var isSymbol = require_isSymbol();
2519
- /** Used as references for various `Number` constants. */
2520
- var INFINITY = Infinity;
2521
- /**
2522
- * Converts `value` to a string key if it's not a string or symbol.
2523
- *
2524
- * @private
2525
- * @param {*} value The value to inspect.
2526
- * @returns {string|symbol} Returns the key.
2527
- */
2528
- function toKey(value) {
2529
- if (typeof value == "string" || isSymbol(value)) return value;
2530
- var result = value + "";
2531
- return result == "0" && 1 / value == -INFINITY ? "-0" : result;
2532
- }
2533
- module.exports = toKey;
2534
- }));
2535
- //#endregion
2536
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGet.js
2537
- var require__baseGet = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2538
- var castPath = require__castPath();
2539
- var toKey = require__toKey();
2540
- /**
2541
- * The base implementation of `_.get` without support for default values.
2542
- *
2543
- * @private
2544
- * @param {Object} object The object to query.
2545
- * @param {Array|string} path The path of the property to get.
2546
- * @returns {*} Returns the resolved value.
2547
- */
2548
- function baseGet(object, path) {
2549
- path = castPath(path, object);
2550
- var index = 0, length = path.length;
2551
- while (object != null && index < length) object = object[toKey(path[index++])];
2552
- return index && index == length ? object : void 0;
2553
- }
2554
- module.exports = baseGet;
2555
- }));
2556
- //#endregion
2557
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/get.js
2558
- var require_get = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2559
- var baseGet = require__baseGet();
2560
- /**
2561
- * Gets the value at `path` of `object`. If the resolved value is
2562
- * `undefined`, the `defaultValue` is returned in its place.
2563
- *
2564
- * @static
2565
- * @memberOf _
2566
- * @since 3.7.0
2567
- * @category Object
2568
- * @param {Object} object The object to query.
2569
- * @param {Array|string} path The path of the property to get.
2570
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
2571
- * @returns {*} Returns the resolved value.
2572
- * @example
2573
- *
2574
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
2575
- *
2576
- * _.get(object, 'a[0].b.c');
2577
- * // => 3
2578
- *
2579
- * _.get(object, ['a', '0', 'b', 'c']);
2580
- * // => 3
2581
- *
2582
- * _.get(object, 'a.b.c', 'default');
2583
- * // => 'default'
2584
- */
2585
- function get(object, path, defaultValue) {
2586
- var result = object == null ? void 0 : baseGet(object, path);
2587
- return result === void 0 ? defaultValue : result;
2588
- }
2589
- module.exports = get;
2590
- }));
2591
- //#endregion
2592
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseHas.js
2593
- var require__baseHas = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2594
- /** Used to check objects for own properties. */
2595
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2596
2226
  /**
2597
- * The base implementation of `_.has` without support for deep paths.
2598
- *
2599
- * @private
2600
- * @param {Object} [object] The object to query.
2601
- * @param {Array|string} key The key to check.
2602
- * @returns {boolean} Returns `true` if `key` exists, else `false`.
2603
- */
2604
- function baseHas(object, key) {
2605
- return object != null && hasOwnProperty.call(object, key);
2606
- }
2607
- module.exports = baseHas;
2608
- }));
2609
- //#endregion
2610
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsArguments.js
2611
- var require__baseIsArguments = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2612
- var baseGetTag = require__baseGetTag();
2613
- var isObjectLike = require_isObjectLike();
2614
- /** `Object#toString` result references. */
2615
- var argsTag = "[object Arguments]";
2616
- /**
2617
- * The base implementation of `_.isArguments`.
2618
- *
2619
- * @private
2620
- * @param {*} value The value to check.
2621
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
2227
+ * Sets parser from `config.module.ts`.
2228
+ * @param parser
2622
2229
  */
2623
- function baseIsArguments(value) {
2624
- return isObjectLike(value) && baseGetTag(value) == argsTag;
2230
+ setParser(parser) {
2231
+ this.parser = parser;
2625
2232
  }
2626
- module.exports = baseIsArguments;
2627
- }));
2628
- //#endregion
2629
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isArguments.js
2630
- var require_isArguments = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2631
- var baseIsArguments = require__baseIsArguments();
2632
- var isObjectLike = require_isObjectLike();
2633
- /** Used for built-in method references. */
2634
- var objectProto = Object.prototype;
2635
- /** Used to check objects for own properties. */
2636
- var hasOwnProperty = objectProto.hasOwnProperty;
2637
- /** Built-in value references. */
2638
- var propertyIsEnumerable = objectProto.propertyIsEnumerable;
2639
- module.exports = baseIsArguments(function() {
2640
- return arguments;
2641
- }()) ? baseIsArguments : function(value) {
2642
- return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
2643
- };
2644
- }));
2645
- //#endregion
2646
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isIndex.js
2647
- var require__isIndex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2648
- /** Used as references for various `Number` constants. */
2649
- var MAX_SAFE_INTEGER = 9007199254740991;
2650
- /** Used to detect unsigned integer values. */
2651
- var reIsUint = /^(?:0|[1-9]\d*)$/;
2652
- /**
2653
- * Checks if `value` is a valid array-like index.
2654
- *
2655
- * @private
2656
- * @param {*} value The value to check.
2657
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
2658
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
2659
- */
2660
- function isIndex(value, length) {
2661
- var type = typeof value;
2662
- length = length == null ? MAX_SAFE_INTEGER : length;
2663
- return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
2233
+ getFromCache(propertyPath, defaultValue) {
2234
+ const cachedValue = get(this.cache, propertyPath);
2235
+ return (0, _nestjs_common_utils_shared_utils_js.isUndefined)(cachedValue) ? defaultValue : cachedValue;
2664
2236
  }
2665
- module.exports = isIndex;
2666
- }));
2667
- //#endregion
2668
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isLength.js
2669
- var require_isLength = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2670
- /** Used as references for various `Number` constants. */
2671
- var MAX_SAFE_INTEGER = 9007199254740991;
2672
- /**
2673
- * Checks if `value` is a valid array-like length.
2674
- *
2675
- * **Note:** This method is loosely based on
2676
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
2677
- *
2678
- * @static
2679
- * @memberOf _
2680
- * @since 4.0.0
2681
- * @category Lang
2682
- * @param {*} value The value to check.
2683
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
2684
- * @example
2685
- *
2686
- * _.isLength(3);
2687
- * // => true
2688
- *
2689
- * _.isLength(Number.MIN_VALUE);
2690
- * // => false
2691
- *
2692
- * _.isLength(Infinity);
2693
- * // => false
2694
- *
2695
- * _.isLength('3');
2696
- * // => false
2697
- */
2698
- function isLength(value) {
2699
- return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
2237
+ getFromValidatedEnv(propertyPath) {
2238
+ return get(this.internalConfig[VALIDATED_ENV_PROPNAME], propertyPath);
2700
2239
  }
2701
- module.exports = isLength;
2702
- }));
2703
- //#endregion
2704
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hasPath.js
2705
- var require__hasPath = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2706
- var castPath = require__castPath();
2707
- var isArguments = require_isArguments();
2708
- var isArray = require_isArray();
2709
- var isIndex = require__isIndex();
2710
- var isLength = require_isLength();
2711
- var toKey = require__toKey();
2712
- /**
2713
- * Checks if `path` exists on `object`.
2714
- *
2715
- * @private
2716
- * @param {Object} object The object to query.
2717
- * @param {Array|string} path The path to check.
2718
- * @param {Function} hasFunc The function to check properties.
2719
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
2720
- */
2721
- function hasPath(object, path, hasFunc) {
2722
- path = castPath(path, object);
2723
- var index = -1, length = path.length, result = false;
2724
- while (++index < length) {
2725
- var key = toKey(path[index]);
2726
- if (!(result = object != null && hasFunc(object, key))) break;
2727
- object = object[key];
2240
+ getFromProcessEnv(propertyPath, defaultValue) {
2241
+ if (this.isCacheEnabled && has(this.cache, propertyPath)) {
2242
+ const cachedValue = this.getFromCache(propertyPath, defaultValue);
2243
+ return !(0, _nestjs_common_utils_shared_utils_js.isUndefined)(cachedValue) ? cachedValue : defaultValue;
2728
2244
  }
2729
- if (result || ++index != length) return result;
2730
- length = object == null ? 0 : object.length;
2731
- return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
2732
- }
2733
- module.exports = hasPath;
2734
- }));
2735
- //#endregion
2736
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/has.js
2737
- var require_has = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2738
- var baseHas = require__baseHas();
2739
- var hasPath = require__hasPath();
2740
- /**
2741
- * Checks if `path` is a direct property of `object`.
2742
- *
2743
- * @static
2744
- * @since 0.1.0
2745
- * @memberOf _
2746
- * @category Object
2747
- * @param {Object} object The object to query.
2748
- * @param {Array|string} path The path to check.
2749
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
2750
- * @example
2751
- *
2752
- * var object = { 'a': { 'b': 2 } };
2753
- * var other = _.create({ 'a': _.create({ 'b': 2 }) });
2754
- *
2755
- * _.has(object, 'a');
2756
- * // => true
2757
- *
2758
- * _.has(object, 'a.b');
2759
- * // => true
2760
- *
2761
- * _.has(object, ['a', 'b']);
2762
- * // => true
2763
- *
2764
- * _.has(other, 'a');
2765
- * // => false
2766
- */
2767
- function has(object, path) {
2768
- return object != null && hasPath(object, path, baseHas);
2245
+ const processValue = get(process.env, propertyPath);
2246
+ this.setInCacheIfDefined(propertyPath, processValue);
2247
+ return processValue;
2769
2248
  }
2770
- module.exports = has;
2771
- }));
2772
- //#endregion
2773
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_defineProperty.js
2774
- var require__defineProperty = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2775
- var getNative = require__getNative();
2776
- module.exports = function() {
2777
- try {
2778
- var func = getNative(Object, "defineProperty");
2779
- func({}, "", {});
2780
- return func;
2781
- } catch (e) {}
2782
- }();
2783
- }));
2784
- //#endregion
2785
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseAssignValue.js
2786
- var require__baseAssignValue = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2787
- var defineProperty = require__defineProperty();
2788
- /**
2789
- * The base implementation of `assignValue` and `assignMergeValue` without
2790
- * value checks.
2791
- *
2792
- * @private
2793
- * @param {Object} object The object to modify.
2794
- * @param {string} key The key of the property to assign.
2795
- * @param {*} value The value to assign.
2796
- */
2797
- function baseAssignValue(object, key, value) {
2798
- if (key == "__proto__" && defineProperty) defineProperty(object, key, {
2799
- "configurable": true,
2800
- "enumerable": true,
2801
- "value": value,
2802
- "writable": true
2803
- });
2804
- else object[key] = value;
2249
+ getFromInternalConfig(propertyPath) {
2250
+ return get(this.internalConfig, propertyPath);
2805
2251
  }
2806
- module.exports = baseAssignValue;
2807
- }));
2808
- //#endregion
2809
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_assignValue.js
2810
- var require__assignValue = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2811
- var baseAssignValue = require__baseAssignValue();
2812
- var eq = require_eq();
2813
- /** Used to check objects for own properties. */
2814
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2815
- /**
2816
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
2817
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
2818
- * for equality comparisons.
2819
- *
2820
- * @private
2821
- * @param {Object} object The object to modify.
2822
- * @param {string} key The key of the property to assign.
2823
- * @param {*} value The value to assign.
2824
- */
2825
- function assignValue(object, key, value) {
2826
- var objValue = object[key];
2827
- if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) baseAssignValue(object, key, value);
2252
+ setInCacheIfDefined(propertyPath, value) {
2253
+ if (typeof value === "undefined") return;
2254
+ set(this.cache, propertyPath, value);
2828
2255
  }
2829
- module.exports = assignValue;
2830
- }));
2831
- //#endregion
2832
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseSet.js
2833
- var require__baseSet = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2834
- var assignValue = require__assignValue();
2835
- var castPath = require__castPath();
2836
- var isIndex = require__isIndex();
2837
- var isObject = require_isObject();
2838
- var toKey = require__toKey();
2839
- /**
2840
- * The base implementation of `_.set`.
2841
- *
2842
- * @private
2843
- * @param {Object} object The object to modify.
2844
- * @param {Array|string} path The path of the property to set.
2845
- * @param {*} value The value to set.
2846
- * @param {Function} [customizer] The function to customize path creation.
2847
- * @returns {Object} Returns `object`.
2848
- */
2849
- function baseSet(object, path, value, customizer) {
2850
- if (!isObject(object)) return object;
2851
- path = castPath(path, object);
2852
- var index = -1, length = path.length, lastIndex = length - 1, nested = object;
2853
- while (nested != null && ++index < length) {
2854
- var key = toKey(path[index]), newValue = value;
2855
- if (key === "__proto__" || key === "constructor" || key === "prototype") return object;
2856
- if (index != lastIndex) {
2857
- var objValue = nested[key];
2858
- newValue = customizer ? customizer(objValue, key, nested) : void 0;
2859
- if (newValue === void 0) newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
2860
- }
2861
- assignValue(nested, key, newValue);
2862
- nested = nested[key];
2863
- }
2864
- return object;
2256
+ isGetOptionsObject(options) {
2257
+ return options && options?.infer && Object.keys(options).length === 1;
2865
2258
  }
2866
- module.exports = baseSet;
2867
- }));
2868
- //#endregion
2869
- //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/set.js
2870
- var require_set = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2871
- var baseSet = require__baseSet();
2872
- /**
2873
- * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
2874
- * it's created. Arrays are created for missing index properties while objects
2875
- * are created for all other missing properties. Use `_.setWith` to customize
2876
- * `path` creation.
2877
- *
2878
- * **Note:** This method mutates `object`.
2879
- *
2880
- * @static
2881
- * @memberOf _
2882
- * @since 3.7.0
2883
- * @category Object
2884
- * @param {Object} object The object to modify.
2885
- * @param {Array|string} path The path of the property to set.
2886
- * @param {*} value The value to set.
2887
- * @returns {Object} Returns `object`.
2888
- * @example
2889
- *
2890
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
2891
- *
2892
- * _.set(object, 'a[0].b.c', 4);
2893
- * console.log(object.a[0].b.c);
2894
- * // => 4
2895
- *
2896
- * _.set(object, ['x', '0', 'y', 'z'], 5);
2897
- * console.log(object.x[0].y.z);
2898
- * // => 5
2899
- */
2900
- function set(object, path, value) {
2901
- return object == null ? object : baseSet(object, path, value);
2259
+ updateInterpolatedEnv(propertyPath, value) {
2260
+ let config = {};
2261
+ for (const envFilePath of this.envFilePaths) if (fs.default.existsSync(envFilePath)) config = Object.assign(this.parser(fs.default.readFileSync(envFilePath)), config);
2262
+ const regex = new RegExp(`\\$\\{?${propertyPath}\\}?`, "g");
2263
+ for (const [k, v] of Object.entries(config)) if (regex.test(v)) process.env[k] = v.replace(regex, value);
2902
2264
  }
2903
- module.exports = set;
2904
- }));
2905
- //#endregion
2906
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/config.service.js
2907
- var require_config_service = /* @__PURE__ */ __commonJSMin(((exports) => {
2908
- var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
2909
- if (k2 === void 0) k2 = k;
2910
- var desc = Object.getOwnPropertyDescriptor(m, k);
2911
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
2912
- enumerable: true,
2913
- get: function() {
2914
- return m[k];
2915
- }
2916
- };
2917
- Object.defineProperty(o, k2, desc);
2918
- }) : (function(o, m, k, k2) {
2919
- if (k2 === void 0) k2 = k;
2920
- o[k2] = m[k];
2921
- }));
2922
- var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
2923
- Object.defineProperty(o, "default", {
2924
- enumerable: true,
2925
- value: v
2926
- });
2927
- }) : function(o, v) {
2928
- o["default"] = v;
2929
- });
2930
- var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) {
2931
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2932
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2933
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2934
- return c > 3 && r && Object.defineProperty(target, key, r), r;
2935
- };
2936
- var __importStar = exports && exports.__importStar || (function() {
2937
- var ownKeys = function(o) {
2938
- ownKeys = Object.getOwnPropertyNames || function(o) {
2939
- var ar = [];
2940
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
2941
- return ar;
2942
- };
2943
- return ownKeys(o);
2944
- };
2945
- return function(mod) {
2946
- if (mod && mod.__esModule) return mod;
2947
- var result = {};
2948
- if (mod != null) {
2949
- for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
2950
- }
2951
- __setModuleDefault(result, mod);
2952
- return result;
2953
- };
2954
- })();
2955
- var __metadata = exports && exports.__metadata || function(k, v) {
2956
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
2957
- };
2958
- var __param = exports && exports.__param || function(paramIndex, decorator) {
2959
- return function(target, key) {
2960
- decorator(target, key, paramIndex);
2961
- };
2962
- };
2963
- var __importDefault = exports && exports.__importDefault || function(mod) {
2964
- return mod && mod.__esModule ? mod : { "default": mod };
2965
- };
2966
- Object.defineProperty(exports, "__esModule", { value: true });
2967
- exports.ConfigService = void 0;
2968
- const common_1$3 = require("@nestjs/common");
2969
- const shared_utils_1$1 = require("@nestjs/common/utils/shared.utils");
2970
- const dotenv = __importStar(require_main$1());
2971
- const fs_1 = __importDefault(require("fs"));
2972
- const get_1 = __importDefault(require_get());
2973
- const has_1 = __importDefault(require_has());
2974
- const set_1 = __importDefault(require_set());
2975
- const rxjs_1 = require("rxjs");
2976
- const config_constants_1 = require_config_constants();
2977
- /**
2978
- * @publicApi
2979
- */
2980
- let ConfigService = class ConfigService {
2981
- set isCacheEnabled(value) {
2982
- this._isCacheEnabled = value;
2983
- }
2984
- get isCacheEnabled() {
2985
- return this._isCacheEnabled;
2986
- }
2987
- set skipProcessEnv(value) {
2988
- this._skipProcessEnv = value;
2989
- }
2990
- get skipProcessEnv() {
2991
- return this._skipProcessEnv;
2992
- }
2993
- constructor(internalConfig = {}) {
2994
- this.internalConfig = internalConfig;
2995
- this.cache = {};
2996
- this._changes$ = new rxjs_1.Subject();
2997
- this._skipProcessEnv = false;
2998
- this._isCacheEnabled = false;
2999
- this.envFilePaths = [];
3000
- }
3001
- /**
3002
- * Returns a stream of configuration changes.
3003
- * Each event contains the attribute path, the old value and the new value.
3004
- */
3005
- get changes$() {
3006
- return this._changes$.asObservable();
3007
- }
3008
- /**
3009
- * Get a configuration value (either custom configuration or process environment variable)
3010
- * based on property path (you can use dot notation to traverse nested object, e.g. "database.host").
3011
- * It returns a default value if the key does not exist.
3012
- * @param propertyPath
3013
- * @param defaultValueOrOptions
3014
- */
3015
- get(propertyPath, defaultValueOrOptions, options) {
3016
- const internalValue = this.getFromInternalConfig(propertyPath);
3017
- if (!(0, shared_utils_1$1.isUndefined)(internalValue)) return internalValue;
3018
- const validatedEnvValue = this.getFromValidatedEnv(propertyPath);
3019
- if (!(0, shared_utils_1$1.isUndefined)(validatedEnvValue)) return validatedEnvValue;
3020
- const defaultValue = this.isGetOptionsObject(defaultValueOrOptions) && !options ? void 0 : defaultValueOrOptions;
3021
- if (!this._skipProcessEnv) {
3022
- const processEnvValue = this.getFromProcessEnv(propertyPath, defaultValue);
3023
- if (!(0, shared_utils_1$1.isUndefined)(processEnvValue)) return processEnvValue;
3024
- }
3025
- return defaultValue;
3026
- }
3027
- /**
3028
- * Get a configuration value (either custom configuration or process environment variable)
3029
- * based on property path (you can use dot notation to traverse nested object, e.g. "database.host").
3030
- * It returns a default value if the key does not exist.
3031
- * If the default value is undefined an exception will be thrown.
3032
- * @param propertyPath
3033
- * @param defaultValueOrOptions
3034
- */
3035
- getOrThrow(propertyPath, defaultValueOrOptions, options) {
3036
- const value = this.get(propertyPath, defaultValueOrOptions, options);
3037
- if ((0, shared_utils_1$1.isUndefined)(value)) throw new TypeError(`Configuration key "${propertyPath.toString()}" does not exist`);
3038
- return value;
3039
- }
3040
- /**
3041
- * Sets a configuration value based on property path.
3042
- * @param propertyPath
3043
- * @param value
3044
- */
3045
- set(propertyPath, value) {
3046
- const oldValue = this.get(propertyPath);
3047
- (0, set_1.default)(this.internalConfig, propertyPath, value);
3048
- if (typeof propertyPath === "string") {
3049
- process.env[propertyPath] = String(value);
3050
- this.updateInterpolatedEnv(propertyPath, String(value));
3051
- }
3052
- if (this.isCacheEnabled) this.setInCacheIfDefined(propertyPath, value);
3053
- this._changes$.next({
3054
- path: propertyPath,
3055
- oldValue,
3056
- newValue: value
3057
- });
3058
- }
3059
- /**
3060
- * Sets env file paths from `config.module.ts` to parse.
3061
- * @param paths
3062
- */
3063
- setEnvFilePaths(paths) {
3064
- this.envFilePaths = paths;
3065
- }
3066
- getFromCache(propertyPath, defaultValue) {
3067
- const cachedValue = (0, get_1.default)(this.cache, propertyPath);
3068
- return (0, shared_utils_1$1.isUndefined)(cachedValue) ? defaultValue : cachedValue;
3069
- }
3070
- getFromValidatedEnv(propertyPath) {
3071
- return (0, get_1.default)(this.internalConfig[config_constants_1.VALIDATED_ENV_PROPNAME], propertyPath);
3072
- }
3073
- getFromProcessEnv(propertyPath, defaultValue) {
3074
- if (this.isCacheEnabled && (0, has_1.default)(this.cache, propertyPath)) {
3075
- const cachedValue = this.getFromCache(propertyPath, defaultValue);
3076
- return !(0, shared_utils_1$1.isUndefined)(cachedValue) ? cachedValue : defaultValue;
3077
- }
3078
- const processValue = (0, get_1.default)(process.env, propertyPath);
3079
- this.setInCacheIfDefined(propertyPath, processValue);
3080
- return processValue;
3081
- }
3082
- getFromInternalConfig(propertyPath) {
3083
- return (0, get_1.default)(this.internalConfig, propertyPath);
3084
- }
3085
- setInCacheIfDefined(propertyPath, value) {
3086
- if (typeof value === "undefined") return;
3087
- (0, set_1.default)(this.cache, propertyPath, value);
3088
- }
3089
- isGetOptionsObject(options) {
3090
- return options && options?.infer && Object.keys(options).length === 1;
3091
- }
3092
- updateInterpolatedEnv(propertyPath, value) {
3093
- let config = {};
3094
- for (const envFilePath of this.envFilePaths) if (fs_1.default.existsSync(envFilePath)) config = Object.assign(dotenv.parse(fs_1.default.readFileSync(envFilePath)), config);
3095
- const regex = new RegExp(`\\$\\{?${propertyPath}\\}?`, "g");
3096
- for (const [k, v] of Object.entries(config)) if (regex.test(v)) process.env[k] = v.replace(regex, value);
3097
- }
3098
- };
3099
- exports.ConfigService = ConfigService;
3100
- exports.ConfigService = ConfigService = __decorate([
3101
- (0, common_1$3.Injectable)(),
3102
- __param(0, (0, common_1$3.Optional)()),
3103
- __param(0, (0, common_1$3.Inject)(config_constants_1.CONFIGURATION_TOKEN)),
3104
- __metadata("design:paramtypes", [Object])
3105
- ], ConfigService);
3106
- }));
2265
+ };
2266
+ ConfigService = __decorate$2([
2267
+ (0, _nestjs_common.Injectable)(),
2268
+ __param(0, (0, _nestjs_common.Optional)()),
2269
+ __param(0, (0, _nestjs_common.Inject)(CONFIGURATION_TOKEN)),
2270
+ __metadata("design:paramtypes", [Object])
2271
+ ], ConfigService);
3107
2272
  //#endregion
3108
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/config-host.module.js
3109
- var require_config_host_module = /* @__PURE__ */ __commonJSMin(((exports) => {
3110
- var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) {
3111
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3112
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3113
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3114
- return c > 3 && r && Object.defineProperty(target, key, r), r;
2273
+ //#region node_modules/.pnpm/@nestjs+config@12.0.0_@nestjs+common@12.0.1_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/config-host.module.js
2274
+ var __decorate$1 = function(decorators, target, key, desc) {
2275
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2276
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2277
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2278
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
2279
+ };
2280
+ /**
2281
+ * @publicApi
2282
+ */
2283
+ let ConfigHostModule = class ConfigHostModule {};
2284
+ ConfigHostModule = __decorate$1([(0, _nestjs_common.Global)(), (0, _nestjs_common.Module)({
2285
+ providers: [{
2286
+ provide: CONFIGURATION_TOKEN,
2287
+ useFactory: () => ({})
2288
+ }, {
2289
+ provide: CONFIGURATION_SERVICE_TOKEN,
2290
+ useClass: ConfigService
2291
+ }],
2292
+ exports: [CONFIGURATION_TOKEN, CONFIGURATION_SERVICE_TOKEN]
2293
+ })], ConfigHostModule);
2294
+ //#endregion
2295
+ //#region node_modules/.pnpm/@nestjs+config@12.0.0_@nestjs+common@12.0.1_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/utils/create-config-factory.util.js
2296
+ /**
2297
+ * @publicApi
2298
+ */
2299
+ function createConfigProvider(factory) {
2300
+ return {
2301
+ provide: factory.KEY || getConfigToken((0, crypto.randomUUID)()),
2302
+ useFactory: factory,
2303
+ inject: []
3115
2304
  };
3116
- Object.defineProperty(exports, "__esModule", { value: true });
3117
- exports.ConfigHostModule = void 0;
3118
- const common_1$2 = require("@nestjs/common");
3119
- const config_constants_1 = require_config_constants();
3120
- const config_service_1 = require_config_service();
3121
- /**
3122
- * @publicApi
3123
- */
3124
- let ConfigHostModule = class ConfigHostModule {};
3125
- exports.ConfigHostModule = ConfigHostModule;
3126
- exports.ConfigHostModule = ConfigHostModule = __decorate([(0, common_1$2.Global)(), (0, common_1$2.Module)({
3127
- providers: [{
3128
- provide: config_constants_1.CONFIGURATION_TOKEN,
3129
- useFactory: () => ({})
3130
- }, {
3131
- provide: config_constants_1.CONFIGURATION_SERVICE_TOKEN,
3132
- useClass: config_service_1.ConfigService
3133
- }],
3134
- exports: [config_constants_1.CONFIGURATION_TOKEN, config_constants_1.CONFIGURATION_SERVICE_TOKEN]
3135
- })], ConfigHostModule);
3136
- }));
3137
- //#endregion
3138
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/utils/get-config-token.util.js
3139
- var require_get_config_token_util = /* @__PURE__ */ __commonJSMin(((exports) => {
3140
- Object.defineProperty(exports, "__esModule", { value: true });
3141
- exports.getConfigToken = getConfigToken;
3142
- /**
3143
- * @publicApi
3144
- */
3145
- function getConfigToken(token) {
3146
- return `CONFIGURATION(${token.toString()})`;
3147
- }
3148
- }));
2305
+ }
3149
2306
  //#endregion
3150
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/utils/create-config-factory.util.js
3151
- var require_create_config_factory_util = /* @__PURE__ */ __commonJSMin(((exports) => {
3152
- Object.defineProperty(exports, "__esModule", { value: true });
3153
- exports.createConfigProvider = createConfigProvider;
3154
- const get_config_token_util_1 = require_get_config_token_util();
3155
- const crypto_1 = require("crypto");
3156
- /**
3157
- * @publicApi
3158
- */
3159
- function createConfigProvider(factory) {
3160
- return {
3161
- provide: factory.KEY || (0, get_config_token_util_1.getConfigToken)((0, crypto_1.randomUUID)()),
3162
- useFactory: factory,
3163
- inject: []
3164
- };
3165
- }
3166
- }));
2307
+ //#region node_modules/.pnpm/@nestjs+config@12.0.0_@nestjs+common@12.0.1_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/utils/get-registration-token.util.js
2308
+ /**
2309
+ * @publicApi
2310
+ */
2311
+ function getRegistrationToken(config) {
2312
+ return config[PARTIAL_CONFIGURATION_KEY];
2313
+ }
3167
2314
  //#endregion
3168
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/utils/get-registration-token.util.js
3169
- var require_get_registration_token_util = /* @__PURE__ */ __commonJSMin(((exports) => {
3170
- Object.defineProperty(exports, "__esModule", { value: true });
3171
- exports.getRegistrationToken = getRegistrationToken;
3172
- const config_constants_1 = require_config_constants();
3173
- /**
3174
- * @publicApi
3175
- */
3176
- function getRegistrationToken(config) {
3177
- return config[config_constants_1.PARTIAL_CONFIGURATION_KEY];
2315
+ //#region node_modules/.pnpm/@nestjs+config@12.0.0_@nestjs+common@12.0.1_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/utils/merge-configs.util.js
2316
+ /**
2317
+ * @publicApi
2318
+ */
2319
+ function mergeConfigObject(host, partial, token) {
2320
+ if (token) {
2321
+ set(host, token, partial);
2322
+ return partial;
3178
2323
  }
3179
- }));
2324
+ Object.assign(host, partial);
2325
+ }
3180
2326
  //#endregion
3181
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/utils/merge-configs.util.js
3182
- var require_merge_configs_util = /* @__PURE__ */ __commonJSMin(((exports) => {
3183
- var __importDefault = exports && exports.__importDefault || function(mod) {
3184
- return mod && mod.__esModule ? mod : { "default": mod };
2327
+ //#region node_modules/.pnpm/@nestjs+config@12.0.0_@nestjs+common@12.0.1_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/utils/validate-with-schema.util.js
2328
+ /**
2329
+ * Joi defaults to `allowUnknown: false` and `abortEarly: true`, which would
2330
+ * reject the unrelated variables that are always present in `process.env` and
2331
+ * report only the first failure. Previous versions of this package overrode
2332
+ * both, so they remain the defaults for Joi schemas unless the user opts out.
2333
+ */
2334
+ const JOI_DEFAULT_LIBRARY_OPTIONS = {
2335
+ abortEarly: false,
2336
+ allowUnknown: true
2337
+ };
2338
+ /**
2339
+ * Validates config using a Standard Schema (e.g. Zod, Arktype).
2340
+ * @see https://standardschema.dev/
2341
+ */
2342
+ async function validateWithStandardSchema(schema, config, options) {
2343
+ const result = await schema["~standard"].validate(config, getLibraryOptions(schema, options));
2344
+ if (result.issues) return {
2345
+ error: new Error(formatIssues(result.issues)),
2346
+ value: config
3185
2347
  };
3186
- Object.defineProperty(exports, "__esModule", { value: true });
3187
- exports.mergeConfigObject = mergeConfigObject;
3188
- const set_1 = __importDefault(require_set());
3189
- /**
3190
- * @publicApi
3191
- */
3192
- function mergeConfigObject(host, partial, token) {
3193
- if (token) {
3194
- (0, set_1.default)(host, token, partial);
3195
- return partial;
2348
+ return { value: result.value };
2349
+ }
2350
+ function getLibraryOptions(schema, options) {
2351
+ if (schema["~standard"].vendor !== "joi") return options;
2352
+ return {
2353
+ ...options,
2354
+ libraryOptions: {
2355
+ ...JOI_DEFAULT_LIBRARY_OPTIONS,
2356
+ ...options?.libraryOptions
3196
2357
  }
3197
- Object.assign(host, partial);
3198
- }
3199
- }));
3200
- //#endregion
3201
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/config.module.js
3202
- var require_config_module = /* @__PURE__ */ __commonJSMin(((exports) => {
3203
- var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
3204
- if (k2 === void 0) k2 = k;
3205
- var desc = Object.getOwnPropertyDescriptor(m, k);
3206
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
3207
- enumerable: true,
3208
- get: function() {
3209
- return m[k];
3210
- }
3211
- };
3212
- Object.defineProperty(o, k2, desc);
3213
- }) : (function(o, m, k, k2) {
3214
- if (k2 === void 0) k2 = k;
3215
- o[k2] = m[k];
3216
- }));
3217
- var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
3218
- Object.defineProperty(o, "default", {
3219
- enumerable: true,
3220
- value: v
3221
- });
3222
- }) : function(o, v) {
3223
- o["default"] = v;
3224
- });
3225
- var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) {
3226
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3227
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3228
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3229
- return c > 3 && r && Object.defineProperty(target, key, r), r;
3230
2358
  };
3231
- var __importStar = exports && exports.__importStar || (function() {
3232
- var ownKeys = function(o) {
3233
- ownKeys = Object.getOwnPropertyNames || function(o) {
3234
- var ar = [];
3235
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
3236
- return ar;
3237
- };
3238
- return ownKeys(o);
3239
- };
3240
- return function(mod) {
3241
- if (mod && mod.__esModule) return mod;
3242
- var result = {};
3243
- if (mod != null) {
3244
- for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
3245
- }
3246
- __setModuleDefault(result, mod);
3247
- return result;
2359
+ }
2360
+ function formatIssues(issues) {
2361
+ return issues.map((issue) => {
2362
+ const path = formatIssuePath(issue.path);
2363
+ return path ? `${path}: ${issue.message}` : issue.message;
2364
+ }).join("\n");
2365
+ }
2366
+ function formatIssuePath(path) {
2367
+ return (path ?? []).map((segment) => typeof segment === "object" && segment !== null ? String(segment.key) : String(segment)).join(".");
2368
+ }
2369
+ //#endregion
2370
+ //#region node_modules/.pnpm/@nestjs+config@12.0.0_@nestjs+common@12.0.1_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/config.module.js
2371
+ var __decorate = function(decorators, target, key, desc) {
2372
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2373
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2374
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2375
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
2376
+ };
2377
+ var ConfigModule_1;
2378
+ /**
2379
+ * @publicApi
2380
+ */
2381
+ let ConfigModule = ConfigModule_1 = class ConfigModule {
2382
+ /**
2383
+ * This promise resolves when parser completes loading environment variables.
2384
+ * When "ignoreEnvFile" is set to true, then it will resolve immediately after the
2385
+ * "ConfigModule#forRoot" method is called.
2386
+ */
2387
+ static get envVariablesLoaded() {
2388
+ return this._envVariablesLoaded;
2389
+ }
2390
+ /**
2391
+ * Loads environment variables based on the "ignoreEnvFile" flag and "envFilePath" value.
2392
+ * Additionally, registers custom configurations globally.
2393
+ * @param options
2394
+ */
2395
+ static async forRoot(options = {}) {
2396
+ const envFilePaths = Array.isArray(options.envFilePath) ? options.envFilePath : [options.envFilePath || (0, path.resolve)(process.cwd(), ".env")];
2397
+ const parser = options.parser ?? getDefaultParser();
2398
+ let validatedEnvConfig = void 0;
2399
+ let config = options.ignoreEnvFile ? {} : this.loadEnvFile(envFilePaths, parser, options);
2400
+ if (!options.ignoreEnvVars && options.validatePredefined !== false) config = options.override ? {
2401
+ ...process.env,
2402
+ ...config
2403
+ } : {
2404
+ ...config,
2405
+ ...process.env
3248
2406
  };
3249
- })();
3250
- var ConfigModule_1;
3251
- Object.defineProperty(exports, "__esModule", { value: true });
3252
- exports.ConfigModule = void 0;
3253
- const common_1$1 = require("@nestjs/common");
3254
- const shared_utils_1 = require("@nestjs/common/utils/shared.utils");
3255
- const dotenv = __importStar(require_main$1());
3256
- const dotenv_expand_1 = require_main();
3257
- const fs = __importStar(require("fs"));
3258
- const path_1 = require("path");
3259
- const config_host_module_1 = require_config_host_module();
3260
- const config_constants_1 = require_config_constants();
3261
- const config_service_1 = require_config_service();
3262
- const create_config_factory_util_1 = require_create_config_factory_util();
3263
- const get_registration_token_util_1 = require_get_registration_token_util();
3264
- const merge_configs_util_1 = require_merge_configs_util();
3265
- /**
3266
- * @publicApi
3267
- */
3268
- let ConfigModule = ConfigModule_1 = class ConfigModule {
3269
- /**
3270
- * This promise resolves when "dotenv" completes loading environment variables.
3271
- * When "ignoreEnvFile" is set to true, then it will resolve immediately after the
3272
- * "ConfigModule#forRoot" method is called.
3273
- */
3274
- static get envVariablesLoaded() {
3275
- return this._envVariablesLoaded;
3276
- }
3277
- /**
3278
- * Loads environment variables based on the "ignoreEnvFile" flag and "envFilePath" value.
3279
- * Additionally, registers custom configurations globally.
3280
- * @param options
3281
- */
3282
- static async forRoot(options = {}) {
3283
- const envFilePaths = Array.isArray(options.envFilePath) ? options.envFilePath : [options.envFilePath || (0, path_1.resolve)(process.cwd(), ".env")];
3284
- let validatedEnvConfig = void 0;
3285
- let config = options.ignoreEnvFile ? {} : this.loadEnvFile(envFilePaths, options);
3286
- if (!options.ignoreEnvVars && options.validatePredefined !== false) config = {
2407
+ if (options.validate) {
2408
+ const validatedConfig = options.validate(config);
2409
+ validatedEnvConfig = validatedConfig;
2410
+ this.assignVariablesToProcess(validatedConfig, options.override);
2411
+ } else if (options.validationSchema) {
2412
+ const { error, value: validatedConfig } = await validateWithStandardSchema(options.validationSchema, config, options.validationOptions);
2413
+ if (error) throw new Error(`Config validation error: ${error.message}`);
2414
+ validatedEnvConfig = {
3287
2415
  ...config,
3288
- ...process.env
2416
+ ...validatedConfig
3289
2417
  };
3290
- if (options.validate) {
3291
- const validatedConfig = options.validate(config);
3292
- validatedEnvConfig = validatedConfig;
3293
- this.assignVariablesToProcess(validatedConfig);
3294
- } else if (options.validationSchema) {
3295
- const validationOptions = this.getSchemaValidationOptions(options);
3296
- const { error, value: validatedConfig } = options.validationSchema.validate(config, validationOptions);
3297
- if (error) throw new Error(`Config validation error: ${error.message}`);
3298
- validatedEnvConfig = validatedConfig;
3299
- this.assignVariablesToProcess(validatedConfig);
3300
- } else this.assignVariablesToProcess(config);
3301
- const isConfigToLoad = options.load && options.load.length;
3302
- const providers = (await Promise.all(options.load || [])).map((factory) => (0, create_config_factory_util_1.createConfigProvider)(factory)).filter((item) => item);
3303
- const configProviderTokens = providers.map((item) => item.provide);
3304
- const configServiceProvider = {
3305
- provide: config_service_1.ConfigService,
3306
- useFactory: (configService) => {
3307
- const untypedConfigService = configService;
3308
- if (options.cache) untypedConfigService.isCacheEnabled = true;
3309
- if (options.skipProcessEnv) untypedConfigService.skipProcessEnv = true;
3310
- configService.setEnvFilePaths(envFilePaths);
3311
- return configService;
2418
+ this.assignVariablesToProcess(validatedEnvConfig, options.override);
2419
+ } else this.assignVariablesToProcess(config, options.override);
2420
+ const isConfigToLoad = options.load && options.load.length;
2421
+ const providers = (await Promise.all(options.load || [])).map((factory) => createConfigProvider(factory)).filter((item) => item);
2422
+ const configProviderTokens = providers.map((item) => item.provide);
2423
+ const configServiceProvider = {
2424
+ provide: ConfigService,
2425
+ useFactory: (configService) => {
2426
+ const untypedConfigService = configService;
2427
+ if (options.cache) untypedConfigService.isCacheEnabled = true;
2428
+ if (options.skipProcessEnv) untypedConfigService.skipProcessEnv = true;
2429
+ configService.setEnvFilePaths(envFilePaths);
2430
+ configService.setParser(parser);
2431
+ return configService;
2432
+ },
2433
+ inject: [CONFIGURATION_SERVICE_TOKEN, ...configProviderTokens]
2434
+ };
2435
+ providers.push(configServiceProvider);
2436
+ if (validatedEnvConfig) {
2437
+ const validatedEnvConfigLoader = {
2438
+ provide: VALIDATED_ENV_LOADER,
2439
+ useFactory: (host) => {
2440
+ host[VALIDATED_ENV_PROPNAME] = validatedEnvConfig;
3312
2441
  },
3313
- inject: [config_constants_1.CONFIGURATION_SERVICE_TOKEN, ...configProviderTokens]
3314
- };
3315
- providers.push(configServiceProvider);
3316
- if (validatedEnvConfig) {
3317
- const validatedEnvConfigLoader = {
3318
- provide: config_constants_1.VALIDATED_ENV_LOADER,
3319
- useFactory: (host) => {
3320
- host[config_constants_1.VALIDATED_ENV_PROPNAME] = validatedEnvConfig;
3321
- },
3322
- inject: [config_constants_1.CONFIGURATION_TOKEN]
3323
- };
3324
- providers.push(validatedEnvConfigLoader);
3325
- }
3326
- this.environmentVariablesLoadedSignal();
3327
- return {
3328
- module: ConfigModule_1,
3329
- global: options.isGlobal,
3330
- providers: isConfigToLoad ? [...providers, {
3331
- provide: config_constants_1.CONFIGURATION_LOADER,
3332
- useFactory: (host, ...configurations) => {
3333
- configurations.forEach((item, index) => this.mergePartial(host, item, providers[index]));
3334
- },
3335
- inject: [config_constants_1.CONFIGURATION_TOKEN, ...configProviderTokens]
3336
- }] : providers,
3337
- exports: [config_service_1.ConfigService, ...configProviderTokens]
3338
- };
3339
- }
3340
- /**
3341
- * Registers configuration object (partial registration).
3342
- * @param config
3343
- */
3344
- static forFeature(config) {
3345
- const configProvider = (0, create_config_factory_util_1.createConfigProvider)(config);
3346
- const serviceProvider = {
3347
- provide: config_service_1.ConfigService,
3348
- useFactory: (configService) => configService,
3349
- inject: [config_constants_1.CONFIGURATION_SERVICE_TOKEN, configProvider.provide]
3350
- };
3351
- return {
3352
- module: ConfigModule_1,
3353
- providers: [
3354
- configProvider,
3355
- serviceProvider,
3356
- {
3357
- provide: config_constants_1.CONFIGURATION_LOADER,
3358
- useFactory: (host, partialConfig) => {
3359
- this.mergePartial(host, partialConfig, configProvider);
3360
- },
3361
- inject: [config_constants_1.CONFIGURATION_TOKEN, configProvider.provide]
3362
- }
3363
- ],
3364
- exports: [config_service_1.ConfigService, configProvider.provide]
3365
- };
3366
- }
3367
- static loadEnvFile(envFilePaths, options) {
3368
- let config = {};
3369
- for (const envFilePath of envFilePaths) if (fs.existsSync(envFilePath)) {
3370
- config = Object.assign(dotenv.parse(fs.readFileSync(envFilePath)), config);
3371
- if (options.expandVariables) {
3372
- const expandOptions = typeof options.expandVariables === "object" ? options.expandVariables : {};
3373
- config = (0, dotenv_expand_1.expand)({
3374
- ...expandOptions,
3375
- parsed: config
3376
- }).parsed || config;
3377
- }
3378
- }
3379
- return config;
3380
- }
3381
- static assignVariablesToProcess(config) {
3382
- if (!(0, shared_utils_1.isObject)(config)) return;
3383
- Object.keys(config).filter((key) => !(key in process.env)).forEach((key) => {
3384
- const value = config[key];
3385
- if (typeof value === "string") process.env[key] = value;
3386
- else if (typeof value === "boolean" || typeof value === "number") process.env[key] = `${value}`;
3387
- });
3388
- }
3389
- static mergePartial(host, item, provider) {
3390
- const factoryRef = provider.useFactory;
3391
- const token = (0, get_registration_token_util_1.getRegistrationToken)(factoryRef);
3392
- (0, merge_configs_util_1.mergeConfigObject)(host, item, token);
3393
- }
3394
- static getSchemaValidationOptions(options) {
3395
- if (options.validationOptions) {
3396
- if (typeof options.validationOptions.allowUnknown === "undefined") options.validationOptions.allowUnknown = true;
3397
- return options.validationOptions;
3398
- }
3399
- return {
3400
- abortEarly: false,
3401
- allowUnknown: true
3402
- };
3403
- }
3404
- };
3405
- exports.ConfigModule = ConfigModule;
3406
- ConfigModule._envVariablesLoaded = new Promise((resolve) => ConfigModule_1.environmentVariablesLoadedSignal = resolve);
3407
- exports.ConfigModule = ConfigModule = ConfigModule_1 = __decorate([(0, common_1$1.Module)({
3408
- imports: [config_host_module_1.ConfigHostModule],
3409
- providers: [{
3410
- provide: config_service_1.ConfigService,
3411
- useExisting: config_constants_1.CONFIGURATION_SERVICE_TOKEN
3412
- }],
3413
- exports: [config_host_module_1.ConfigHostModule, config_service_1.ConfigService]
3414
- })], ConfigModule);
3415
- }));
3416
- //#endregion
3417
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/conditional.module.js
3418
- var require_conditional_module = /* @__PURE__ */ __commonJSMin(((exports) => {
3419
- Object.defineProperty(exports, "__esModule", { value: true });
3420
- exports.ConditionalModule = void 0;
3421
- const common_1 = require("@nestjs/common");
3422
- const config_module_1 = require_config_module();
3423
- /**
3424
- * Same logic as in `@nestjs/core` package.
3425
- * @param instance The instance which should get the name from
3426
- * @returns The name of an instance or `undefined`
3427
- */
3428
- const getInstanceName = (instance) => {
3429
- if (instance?.forwardRef) return instance.forwardRef()?.name;
3430
- if (instance.module) return instance.module?.name;
3431
- return instance.name;
3432
- };
3433
- exports.ConditionalModule = class ConditionalModule {
3434
- /**
3435
- * @publicApi
3436
- */
3437
- static async registerWhen(module$1, condition, options) {
3438
- const { timeout = 5e3, debug = true } = options ?? {};
3439
- const moduleName = getInstanceName(module$1) || module$1.toString();
3440
- const timer = setTimeout(() => {
3441
- throw new Error(`Nest was not able to resolve the config variables within ${timeout} milliseconds. Bause of this, the ConditionalModule was not able to determine if ${moduleName} should be registered or not`);
3442
- }, timeout);
3443
- timer.unref();
3444
- const returnModule = {
3445
- module: ConditionalModule,
3446
- imports: [],
3447
- exports: []
2442
+ inject: [CONFIGURATION_TOKEN]
3448
2443
  };
3449
- if (typeof condition === "string") {
3450
- const key = condition;
3451
- condition = (env) => {
3452
- return env[key]?.toLowerCase() !== "false";
3453
- };
3454
- }
3455
- await config_module_1.ConfigModule.envVariablesLoaded;
3456
- clearTimeout(timer);
3457
- if (condition(process.env)) {
3458
- returnModule.imports.push(module$1);
3459
- returnModule.exports.push(module$1);
3460
- } else if (debug) common_1.Logger.debug(`${condition.toString()} evaluated to false. Skipping the registration of ${moduleName}`, ConditionalModule.name);
3461
- return returnModule;
2444
+ providers.push(validatedEnvConfigLoader);
3462
2445
  }
3463
- };
3464
- }));
3465
- //#endregion
3466
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/types/config-object.type.js
3467
- var require_config_object_type = /* @__PURE__ */ __commonJSMin(((exports) => {
3468
- Object.defineProperty(exports, "__esModule", { value: true });
3469
- }));
3470
- //#endregion
3471
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/types/config.type.js
3472
- var require_config_type = /* @__PURE__ */ __commonJSMin(((exports) => {
3473
- Object.defineProperty(exports, "__esModule", { value: true });
3474
- }));
3475
- //#endregion
3476
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/types/no-infer.type.js
3477
- var require_no_infer_type = /* @__PURE__ */ __commonJSMin(((exports) => {
3478
- Object.defineProperty(exports, "__esModule", { value: true });
3479
- }));
3480
- //#endregion
3481
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/types/path-value.type.js
3482
- var require_path_value_type = /* @__PURE__ */ __commonJSMin(((exports) => {
3483
- Object.defineProperty(exports, "__esModule", { value: true });
3484
- }));
3485
- //#endregion
3486
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/types/index.js
3487
- var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
3488
- var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
3489
- if (k2 === void 0) k2 = k;
3490
- var desc = Object.getOwnPropertyDescriptor(m, k);
3491
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
3492
- enumerable: true,
3493
- get: function() {
3494
- return m[k];
3495
- }
2446
+ this.environmentVariablesLoadedSignal();
2447
+ return {
2448
+ module: ConfigModule_1,
2449
+ global: options.isGlobal,
2450
+ providers: isConfigToLoad ? [...providers, {
2451
+ provide: CONFIGURATION_LOADER,
2452
+ useFactory: (host, ...configurations) => {
2453
+ configurations.forEach((item, index) => this.mergePartial(host, item, providers[index]));
2454
+ },
2455
+ inject: [CONFIGURATION_TOKEN, ...configProviderTokens]
2456
+ }] : providers,
2457
+ exports: [ConfigService, ...configProviderTokens]
3496
2458
  };
3497
- Object.defineProperty(o, k2, desc);
3498
- }) : (function(o, m, k, k2) {
3499
- if (k2 === void 0) k2 = k;
3500
- o[k2] = m[k];
3501
- }));
3502
- var __exportStar = exports && exports.__exportStar || function(m, exports$4) {
3503
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$4, p)) __createBinding(exports$4, m, p);
3504
- };
3505
- Object.defineProperty(exports, "__esModule", { value: true });
3506
- __exportStar(require_config_object_type(), exports);
3507
- __exportStar(require_config_type(), exports);
3508
- __exportStar(require_no_infer_type(), exports);
3509
- __exportStar(require_path_value_type(), exports);
3510
- }));
3511
- //#endregion
3512
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/utils/register-as.util.js
3513
- var require_register_as_util = /* @__PURE__ */ __commonJSMin(((exports) => {
3514
- Object.defineProperty(exports, "__esModule", { value: true });
3515
- exports.registerAs = registerAs;
3516
- const __1 = require_dist();
3517
- const config_constants_1 = require_config_constants();
3518
- const get_config_token_util_1 = require_get_config_token_util();
2459
+ }
3519
2460
  /**
3520
- * @publicApi
3521
- *
3522
- * Registers the configuration object behind a specified token.
2461
+ * Registers configuration object (partial registration).
2462
+ * @param config
3523
2463
  */
3524
- function registerAs(token, configFactory) {
3525
- const defineProperty = (key, value) => {
3526
- Object.defineProperty(configFactory, key, {
3527
- configurable: false,
3528
- enumerable: false,
3529
- value,
3530
- writable: false
3531
- });
3532
- };
3533
- defineProperty(config_constants_1.PARTIAL_CONFIGURATION_KEY, token);
3534
- defineProperty(config_constants_1.PARTIAL_CONFIGURATION_PROPNAME, (0, get_config_token_util_1.getConfigToken)(token));
3535
- defineProperty(config_constants_1.AS_PROVIDER_METHOD_KEY, () => ({
3536
- imports: [__1.ConfigModule.forFeature(configFactory)],
3537
- useFactory: (config) => config,
3538
- inject: [(0, get_config_token_util_1.getConfigToken)(token)]
3539
- }));
3540
- return configFactory;
3541
- }
3542
- }));
3543
- //#endregion
3544
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/utils/index.js
3545
- var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
3546
- var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
3547
- if (k2 === void 0) k2 = k;
3548
- var desc = Object.getOwnPropertyDescriptor(m, k);
3549
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
3550
- enumerable: true,
3551
- get: function() {
3552
- return m[k];
3553
- }
2464
+ static forFeature(config) {
2465
+ const configProvider = createConfigProvider(config);
2466
+ const serviceProvider = {
2467
+ provide: ConfigService,
2468
+ useFactory: (configService) => configService,
2469
+ inject: [CONFIGURATION_SERVICE_TOKEN, configProvider.provide]
3554
2470
  };
3555
- Object.defineProperty(o, k2, desc);
3556
- }) : (function(o, m, k, k2) {
3557
- if (k2 === void 0) k2 = k;
3558
- o[k2] = m[k];
3559
- }));
3560
- var __exportStar = exports && exports.__exportStar || function(m, exports$3) {
3561
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$3, p)) __createBinding(exports$3, m, p);
3562
- };
3563
- Object.defineProperty(exports, "__esModule", { value: true });
3564
- __exportStar(require_register_as_util(), exports);
3565
- __exportStar(require_get_config_token_util(), exports);
3566
- }));
3567
- //#endregion
3568
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/interfaces/config-change-event.interface.js
3569
- var require_config_change_event_interface = /* @__PURE__ */ __commonJSMin(((exports) => {
3570
- Object.defineProperty(exports, "__esModule", { value: true });
3571
- }));
3572
- //#endregion
3573
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/interfaces/config-factory.interface.js
3574
- var require_config_factory_interface = /* @__PURE__ */ __commonJSMin(((exports) => {
3575
- Object.defineProperty(exports, "__esModule", { value: true });
3576
- }));
3577
- //#endregion
3578
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/interfaces/config-module-options.interface.js
3579
- var require_config_module_options_interface = /* @__PURE__ */ __commonJSMin(((exports) => {
3580
- Object.defineProperty(exports, "__esModule", { value: true });
3581
- }));
3582
- //#endregion
3583
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/interfaces/index.js
3584
- var require_interfaces = /* @__PURE__ */ __commonJSMin(((exports) => {
3585
- var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
3586
- if (k2 === void 0) k2 = k;
3587
- var desc = Object.getOwnPropertyDescriptor(m, k);
3588
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
3589
- enumerable: true,
3590
- get: function() {
3591
- return m[k];
3592
- }
2471
+ return {
2472
+ module: ConfigModule_1,
2473
+ providers: [
2474
+ configProvider,
2475
+ serviceProvider,
2476
+ {
2477
+ provide: CONFIGURATION_LOADER,
2478
+ useFactory: (host, partialConfig) => {
2479
+ this.mergePartial(host, partialConfig, configProvider);
2480
+ },
2481
+ inject: [CONFIGURATION_TOKEN, configProvider.provide]
2482
+ }
2483
+ ],
2484
+ exports: [ConfigService, configProvider.provide]
3593
2485
  };
3594
- Object.defineProperty(o, k2, desc);
3595
- }) : (function(o, m, k, k2) {
3596
- if (k2 === void 0) k2 = k;
3597
- o[k2] = m[k];
3598
- }));
3599
- var __exportStar = exports && exports.__exportStar || function(m, exports$2) {
3600
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$2, p)) __createBinding(exports$2, m, p);
3601
- };
3602
- Object.defineProperty(exports, "__esModule", { value: true });
3603
- __exportStar(require_config_change_event_interface(), exports);
3604
- __exportStar(require_config_factory_interface(), exports);
3605
- __exportStar(require_config_module_options_interface(), exports);
3606
- }));
3607
- //#endregion
3608
- //#region node_modules/.pnpm/@nestjs+config@4.0.4_@nestjs+common@11.1.27_reflect-metadata@0.2.2_rxjs@7.8.2_supports-color@8.1.1__rxjs@7.8.2/node_modules/@nestjs/config/dist/index.js
3609
- var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
3610
- var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
3611
- if (k2 === void 0) k2 = k;
3612
- var desc = Object.getOwnPropertyDescriptor(m, k);
3613
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
3614
- enumerable: true,
3615
- get: function() {
3616
- return m[k];
2486
+ }
2487
+ static loadEnvFile(envFilePaths, parser, options) {
2488
+ let config = {};
2489
+ for (const envFilePath of envFilePaths) if (fs.existsSync(envFilePath)) {
2490
+ config = Object.assign(parser(fs.readFileSync(envFilePath)), config);
2491
+ if (options.expandVariables) {
2492
+ const expandOptions = typeof options.expandVariables === "object" ? options.expandVariables : {};
2493
+ config = (0, import_main.expand)({
2494
+ ...expandOptions,
2495
+ parsed: config
2496
+ }).parsed || config;
3617
2497
  }
3618
- };
3619
- Object.defineProperty(o, k2, desc);
3620
- }) : (function(o, m, k, k2) {
3621
- if (k2 === void 0) k2 = k;
3622
- o[k2] = m[k];
3623
- }));
3624
- var __exportStar = exports && exports.__exportStar || function(m, exports$1) {
3625
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
3626
- };
3627
- Object.defineProperty(exports, "__esModule", { value: true });
3628
- __exportStar(require_conditional_module(), exports);
3629
- __exportStar(require_config_module(), exports);
3630
- __exportStar(require_config_service(), exports);
3631
- __exportStar(require_types(), exports);
3632
- __exportStar(require_utils(), exports);
3633
- __exportStar(require_interfaces(), exports);
3634
- }));
2498
+ }
2499
+ return config;
2500
+ }
2501
+ static assignVariablesToProcess(config, override) {
2502
+ if (!(0, _nestjs_common_utils_shared_utils_js.isObject)(config)) return;
2503
+ (override ? Object.keys(config) : Object.keys(config).filter((key) => !(key in process.env))).forEach((key) => {
2504
+ const value = config[key];
2505
+ if (typeof value === "string") process.env[key] = value;
2506
+ else if (typeof value === "boolean" || typeof value === "number") process.env[key] = `${value}`;
2507
+ });
2508
+ }
2509
+ static mergePartial(host, item, provider) {
2510
+ const factoryRef = provider.useFactory;
2511
+ mergeConfigObject(host, item, getRegistrationToken(factoryRef));
2512
+ }
2513
+ };
2514
+ ConfigModule._envVariablesLoaded = new Promise((resolve) => ConfigModule_1.environmentVariablesLoadedSignal = resolve);
2515
+ ConfigModule = ConfigModule_1 = __decorate([(0, _nestjs_common.Module)({
2516
+ imports: [ConfigHostModule],
2517
+ providers: [{
2518
+ provide: ConfigService,
2519
+ useExisting: CONFIGURATION_SERVICE_TOKEN
2520
+ }],
2521
+ exports: [ConfigHostModule, ConfigService]
2522
+ })], ConfigModule);
3635
2523
  //#endregion
3636
2524
  //#region src/puppeteer/puppeteer.module.ts
3637
- var import_config = (/* @__PURE__ */ __commonJSMin(((exports) => {
3638
- function __export(m) {
3639
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
3640
- }
3641
- exports.__esModule = true;
3642
- __export(require_dist());
3643
- })))();
3644
2525
  var _PuppeteerModule;
3645
2526
  let PuppeteerModule = _PuppeteerModule = class PuppeteerModule {
3646
2527
  browserService;
@@ -3658,11 +2539,7 @@ let PuppeteerModule = _PuppeteerModule = class PuppeteerModule {
3658
2539
  provide: PDF_PARAMETERS,
3659
2540
  useValue: pdfParameters
3660
2541
  },
3661
- {
3662
- provide: HANDLEBARS_PARAMETERS,
3663
- useValue: pdfParameters.hbsOptions ?? {}
3664
- },
3665
- _gboutte_nestjs_hbs.HandlebarsService,
2542
+ HandlebarsService,
3666
2543
  MjmlService,
3667
2544
  PugService,
3668
2545
  EjsService,
@@ -3672,7 +2549,7 @@ let PuppeteerModule = _PuppeteerModule = class PuppeteerModule {
3672
2549
  ];
3673
2550
  return {
3674
2551
  module: _PuppeteerModule,
3675
- imports: [import_config.ConfigModule.forRoot()],
2552
+ imports: [ConfigModule.forRoot()],
3676
2553
  providers,
3677
2554
  exports: [
3678
2555
  PuppeteerService,
@@ -3691,20 +2568,14 @@ let PuppeteerModule = _PuppeteerModule = class PuppeteerModule {
3691
2568
  inject: options.inject ?? [],
3692
2569
  useFactory: async (...args) => options.useFactory(...args)
3693
2570
  };
3694
- const hbsParamsProvider = {
3695
- provide: HANDLEBARS_PARAMETERS,
3696
- inject: [PDF_PARAMETERS],
3697
- useFactory: (params) => params.hbsOptions ?? {}
3698
- };
3699
2571
  return {
3700
2572
  module: _PuppeteerModule,
3701
- imports: [...options.imports ?? [], import_config.ConfigModule.forRoot()],
2573
+ imports: [...options.imports ?? [], ConfigModule.forRoot()],
3702
2574
  providers: [
3703
2575
  pdfParamsProvider,
3704
- hbsParamsProvider,
3705
2576
  PuppeteerService,
3706
2577
  BrowserService,
3707
- _gboutte_nestjs_hbs.HandlebarsService,
2578
+ HandlebarsService,
3708
2579
  MjmlService,
3709
2580
  PugService,
3710
2581
  EjsService,
@@ -3724,7 +2595,7 @@ let PuppeteerModule = _PuppeteerModule = class PuppeteerModule {
3724
2595
  };
3725
2596
  }
3726
2597
  };
3727
- PuppeteerModule = _PuppeteerModule = __decorate([
2598
+ PuppeteerModule = _PuppeteerModule = __decorate$3([
3728
2599
  (0, _nestjs_common.Module)({
3729
2600
  providers: [
3730
2601
  PuppeteerService,
@@ -3770,7 +2641,7 @@ let NestjsPdfModule = _NestjsPdfModule = class NestjsPdfModule {
3770
2641
  };
3771
2642
  }
3772
2643
  };
3773
- NestjsPdfModule = _NestjsPdfModule = __decorate([(0, _nestjs_common.Module)({})], NestjsPdfModule);
2644
+ NestjsPdfModule = _NestjsPdfModule = __decorate$3([(0, _nestjs_common.Module)({})], NestjsPdfModule);
3774
2645
  //#endregion
3775
2646
  Object.defineProperty(exports, "EjsService", {
3776
2647
  enumerable: true,
@@ -3784,6 +2655,12 @@ Object.defineProperty(exports, "EtaService", {
3784
2655
  return EtaService;
3785
2656
  }
3786
2657
  });
2658
+ Object.defineProperty(exports, "HandlebarsService", {
2659
+ enumerable: true,
2660
+ get: function() {
2661
+ return HandlebarsService;
2662
+ }
2663
+ });
3787
2664
  Object.defineProperty(exports, "MjmlService", {
3788
2665
  enumerable: true,
3789
2666
  get: function() {