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