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