@shad0wz7/nestjs-pdf 2.5.4 → 3.0.1

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
@@ -179,6 +204,133 @@ async function addSignatureFieldUsingAnchor(pdf, fieldName = "SignatureDebtor",
179
204
  return await pdfDoc.save();
180
205
  }
181
206
  //#endregion
207
+ //#region node_modules/.pnpm/yocto-queue@1.2.2/node_modules/yocto-queue/index.js
208
+ var Node = class {
209
+ value;
210
+ next;
211
+ constructor(value) {
212
+ this.value = value;
213
+ }
214
+ };
215
+ var Queue = class {
216
+ #head;
217
+ #tail;
218
+ #size;
219
+ constructor() {
220
+ this.clear();
221
+ }
222
+ enqueue(value) {
223
+ const node = new Node(value);
224
+ if (this.#head) {
225
+ this.#tail.next = node;
226
+ this.#tail = node;
227
+ } else {
228
+ this.#head = node;
229
+ this.#tail = node;
230
+ }
231
+ this.#size++;
232
+ }
233
+ dequeue() {
234
+ const current = this.#head;
235
+ if (!current) return;
236
+ this.#head = this.#head.next;
237
+ this.#size--;
238
+ if (!this.#head) this.#tail = void 0;
239
+ return current.value;
240
+ }
241
+ peek() {
242
+ if (!this.#head) return;
243
+ return this.#head.value;
244
+ }
245
+ clear() {
246
+ this.#head = void 0;
247
+ this.#tail = void 0;
248
+ this.#size = 0;
249
+ }
250
+ get size() {
251
+ return this.#size;
252
+ }
253
+ *[Symbol.iterator]() {
254
+ let current = this.#head;
255
+ while (current) {
256
+ yield current.value;
257
+ current = current.next;
258
+ }
259
+ }
260
+ *drain() {
261
+ while (this.#head) yield this.dequeue();
262
+ }
263
+ };
264
+ //#endregion
265
+ //#region node_modules/.pnpm/p-limit@7.3.2/node_modules/p-limit/index.js
266
+ function pLimit(concurrency) {
267
+ let rejectOnClear = false;
268
+ if (typeof concurrency === "object") ({concurrency, rejectOnClear = false} = concurrency);
269
+ validateConcurrency(concurrency);
270
+ if (typeof rejectOnClear !== "boolean") throw new TypeError("Expected `rejectOnClear` to be a boolean");
271
+ const queue = new Queue();
272
+ let activeCount = 0;
273
+ const resumeNext = () => {
274
+ if (activeCount < concurrency && queue.size > 0) {
275
+ activeCount++;
276
+ queue.dequeue().run();
277
+ }
278
+ };
279
+ const next = () => {
280
+ activeCount--;
281
+ resumeNext();
282
+ };
283
+ const run = async (function_, resolve, arguments_) => {
284
+ const result = (async () => function_(...arguments_))();
285
+ resolve(result);
286
+ try {
287
+ await result;
288
+ } catch {}
289
+ next();
290
+ };
291
+ const enqueue = (function_, resolve, reject, arguments_) => {
292
+ const queueItem = { reject };
293
+ new Promise((internalResolve) => {
294
+ queueItem.run = internalResolve;
295
+ queue.enqueue(queueItem);
296
+ }).then(run.bind(void 0, function_, resolve, arguments_));
297
+ if (activeCount < concurrency) resumeNext();
298
+ };
299
+ const generator = (function_, ...arguments_) => new Promise((resolve, reject) => {
300
+ enqueue(function_, resolve, reject, arguments_);
301
+ });
302
+ Object.defineProperties(generator, {
303
+ activeCount: { get: () => activeCount },
304
+ pendingCount: { get: () => queue.size },
305
+ clearQueue: { value() {
306
+ if (!rejectOnClear) {
307
+ queue.clear();
308
+ return;
309
+ }
310
+ const abortError = AbortSignal.abort().reason;
311
+ while (queue.size > 0) queue.dequeue().reject(abortError);
312
+ } },
313
+ concurrency: {
314
+ get: () => concurrency,
315
+ set(newConcurrency) {
316
+ validateConcurrency(newConcurrency);
317
+ concurrency = newConcurrency;
318
+ queueMicrotask(() => {
319
+ while (activeCount < concurrency && queue.size > 0) resumeNext();
320
+ });
321
+ }
322
+ },
323
+ map: { async value(iterable, function_) {
324
+ const promises = Array.from(iterable, (value, index) => generator(function_, value, index));
325
+ return Promise.all(promises);
326
+ } }
327
+ });
328
+ return generator;
329
+ }
330
+ function validateConcurrency(concurrency) {
331
+ if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) throw new TypeError("Expected `concurrency` to be a number from 1 and up");
332
+ }
333
+ //#endregion
182
334
  //#region src/helpers/deepMergePdfparams.ts
183
335
  function mergePuppeteerParameters(defaults, overrides) {
184
336
  if (!overrides) return { ...defaults };
@@ -187,22 +339,21 @@ function mergePuppeteerParameters(defaults, overrides) {
187
339
  //#endregion
188
340
  //#region src/helpers/tokens.ts
189
341
  const PDF_PARAMETERS = "PDF_PARAMETERS";
190
- const HANDLEBARS_PARAMETERS = "HANDLEBARS_PARAMETERS";
191
342
  //#endregion
192
- //#region \0@oxc-project+runtime@0.142.0/helpers/esm/decorateMetadata.js
343
+ //#region \0@oxc-project+runtime@0.149.0/helpers/esm/decorateMetadata.js
193
344
  function __decorateMetadata(k, v) {
194
345
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
195
346
  }
196
347
  //#endregion
197
- //#region \0@oxc-project+runtime@0.142.0/helpers/esm/decorateParam.js
348
+ //#region \0@oxc-project+runtime@0.149.0/helpers/esm/decorateParam.js
198
349
  function __decorateParam(paramIndex, decorator) {
199
350
  return function(target, key) {
200
351
  decorator(target, key, paramIndex);
201
352
  };
202
353
  }
203
354
  //#endregion
204
- //#region \0@oxc-project+runtime@0.142.0/helpers/esm/decorate.js
205
- function __decorate(decorators, target, key, desc) {
355
+ //#region \0@oxc-project+runtime@0.149.0/helpers/esm/decorate.js
356
+ function __decorate$3(decorators, target, key, desc) {
206
357
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
207
358
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
208
359
  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;
@@ -261,7 +412,7 @@ let BrowserService = class BrowserService {
261
412
  } catch (error) {
262
413
  Logger.warn(`Failed to close browser on module destroy: ${error instanceof Error ? error.message : String(error)}`);
263
414
  }
264
- await this.cleanupCacheBestEffort();
415
+ if (this.options?.cleanupBrowserCacheOnExit !== false) await this.cleanupCacheBestEffort();
265
416
  }
266
417
  /** Wait until no PDF job is in flight, or until the timeout elapses. */
267
418
  async waitForIdle(timeoutMs) {
@@ -372,17 +523,15 @@ let BrowserService = class BrowserService {
372
523
  else browser = this.options.browser;
373
524
  this.browser = browser;
374
525
  }
375
- setBrowser(browser) {
376
- this.browser = browser;
377
- }
378
526
  getBrowser() {
379
527
  return this.browser;
380
528
  }
381
529
  loadBrowserTag() {
382
530
  let versionTag;
383
- if (this.options?.browserTag === void 0) if (this.browser === Browser.CHROMIUM) versionTag = "latest";
384
- else versionTag = "stable";
385
- else versionTag = this.options.browserTag;
531
+ if (this.options?.browserTag === void 0) {
532
+ if (this.browser === Browser.CHROMIUM) versionTag = "latest";
533
+ else versionTag = "stable";
534
+ } else versionTag = this.options.browserTag;
386
535
  this.browserTag = versionTag;
387
536
  }
388
537
  loadBuildId() {
@@ -400,9 +549,6 @@ let BrowserService = class BrowserService {
400
549
  getBuildId() {
401
550
  return this.buildId;
402
551
  }
403
- setBuildId(value) {
404
- this.buildId = value;
405
- }
406
552
  loadUseLockedBrowser() {
407
553
  let useLockedBrowser;
408
554
  if (this.options?.useLockedBrowser === void 0) useLockedBrowser = false;
@@ -466,7 +612,7 @@ let BrowserService = class BrowserService {
466
612
  return null;
467
613
  }
468
614
  };
469
- BrowserService = __decorate([
615
+ BrowserService = __decorate$3([
470
616
  Injectable(),
471
617
  __decorateParam(0, Inject("PDF_PARAMETERS")),
472
618
  __decorateMetadata("design:paramtypes", [Object])
@@ -476,7 +622,7 @@ BrowserService = __decorate([
476
622
  let EjsService = class EjsService {
477
623
  async render(template, data = {}, options) {
478
624
  try {
479
- return await render(template, data, {
625
+ return await ejs.render(template, data, {
480
626
  async: true,
481
627
  ...options
482
628
  });
@@ -486,7 +632,7 @@ let EjsService = class EjsService {
486
632
  }
487
633
  async renderFile(filePath, data = {}, options) {
488
634
  try {
489
- return await renderFile(filePath, data, {
635
+ return await ejs.renderFile(filePath, data, {
490
636
  async: true,
491
637
  ...options
492
638
  });
@@ -495,7 +641,7 @@ let EjsService = class EjsService {
495
641
  }
496
642
  }
497
643
  };
498
- EjsService = __decorate([Injectable()], EjsService);
644
+ EjsService = __decorate$3([Injectable()], EjsService);
499
645
  //#endregion
500
646
  //#region src/puppeteer/engines/eta/eta.service.ts
501
647
  let EtaService = class EtaService {
@@ -564,7 +710,58 @@ let EtaService = class EtaService {
564
710
  return this.templateCache.size;
565
711
  }
566
712
  };
567
- EtaService = __decorate([Injectable(), __decorateMetadata("design:paramtypes", [])], EtaService);
713
+ EtaService = __decorate$3([Injectable(), __decorateMetadata("design:paramtypes", [])], EtaService);
714
+ //#endregion
715
+ //#region src/puppeteer/engines/handlebars/handlebars.service.ts
716
+ let HandlebarsService = class HandlebarsService {
717
+ cachedOptions;
718
+ cachedEnv;
719
+ render(template, parameters = {}, options = {}) {
720
+ try {
721
+ return this.getEnv(options).compile(template, options.compileOptions)(parameters, options.templateOptions);
722
+ } catch (error) {
723
+ throw new Error(`Handlebars rendering failed: ${String(error)}`, { cause: error });
724
+ }
725
+ }
726
+ renderFile(file, parameters = {}, options = {}) {
727
+ if (options.templateDirectory === void 0) throw new Error("Handlebars file rendering failed: option `templateDirectory` is not set");
728
+ const baseDir = resolve(process.cwd(), options.templateDirectory);
729
+ const templatePath = resolve(baseDir, file);
730
+ if (templatePath !== baseDir && !templatePath.startsWith(baseDir + sep)) throw new Error(`Handlebars file rendering failed: ’${file}’ resolves outside \`templateDirectory\``);
731
+ let template;
732
+ try {
733
+ template = readFileSync(templatePath, "utf8");
734
+ } catch (error) {
735
+ throw new Error(`Handlebars file rendering failed: ${String(error)}`, { cause: error });
736
+ }
737
+ return this.render(template, parameters, options);
738
+ }
739
+ /**
740
+ * Build an isolated Handlebars environment with the given helpers/partials so
741
+ * nothing leaks into the global Handlebars. Memoised for the common case where
742
+ * the same options object is reused across calls (e.g. the module `hbsOptions`).
743
+ */
744
+ getEnv(options) {
745
+ if (this.cachedEnv && this.cachedOptions === options) return this.cachedEnv;
746
+ const env = Handlebars.create();
747
+ for (const helper of options.helpers ?? []) env.registerHelper(helper.name, helper.fn);
748
+ this.registerPartials(env, options.partialDirectory);
749
+ this.cachedOptions = options;
750
+ this.cachedEnv = env;
751
+ return env;
752
+ }
753
+ registerPartials(env, partialDirectory) {
754
+ if (partialDirectory === void 0) return;
755
+ const partialPath = join(process.cwd(), partialDirectory);
756
+ if (!existsSync(partialPath)) throw new Error(`Handlebars partial directory does not exist: ${partialPath}`);
757
+ for (const entry of readdirSync(partialPath)) {
758
+ const filePath = join(partialPath, entry);
759
+ if (!statSync(filePath).isFile()) continue;
760
+ env.registerPartial(basename(entry, extname(entry)), readFileSync(filePath, "utf8"));
761
+ }
762
+ }
763
+ };
764
+ HandlebarsService = __decorate$3([Injectable()], HandlebarsService);
568
765
  //#endregion
569
766
  //#region src/puppeteer/engines/mjml/mjml.service.ts
570
767
  let MjmlService = class MjmlService {
@@ -577,7 +774,7 @@ let MjmlService = class MjmlService {
577
774
  return await this.render(template, options);
578
775
  }
579
776
  };
580
- MjmlService = __decorate([Injectable()], MjmlService);
777
+ MjmlService = __decorate$3([Injectable()], MjmlService);
581
778
  //#endregion
582
779
  //#region src/puppeteer/engines/mustache/mustache.service.ts
583
780
  let MustacheService = class MustacheService {
@@ -635,7 +832,7 @@ let MustacheService = class MustacheService {
635
832
  return this.templateCache.size;
636
833
  }
637
834
  };
638
- MustacheService = __decorate([Injectable()], MustacheService);
835
+ MustacheService = __decorate$3([Injectable()], MustacheService);
639
836
  //#endregion
640
837
  //#region src/puppeteer/engines/nunjucks/nunjucks.service.ts
641
838
  let NunjucksService = class NunjucksService {
@@ -681,13 +878,13 @@ let NunjucksService = class NunjucksService {
681
878
  }
682
879
  }
683
880
  };
684
- NunjucksService = __decorate([Injectable(), __decorateMetadata("design:paramtypes", [])], NunjucksService);
881
+ NunjucksService = __decorate$3([Injectable(), __decorateMetadata("design:paramtypes", [])], NunjucksService);
685
882
  //#endregion
686
883
  //#region src/puppeteer/engines/pug/pug.service.ts
687
884
  let PugService = class PugService {
688
885
  render(template, data = {}, options) {
689
886
  try {
690
- return compile(template, { ...options })(data);
887
+ return pug.compile(template, { ...options })(data);
691
888
  } catch (error) {
692
889
  throw new Error(`Pug rendering failed: ${String(error)}`, { cause: error });
693
890
  }
@@ -701,7 +898,7 @@ let PugService = class PugService {
701
898
  }
702
899
  }
703
900
  };
704
- PugService = __decorate([Injectable()], PugService);
901
+ PugService = __decorate$3([Injectable()], PugService);
705
902
  //#endregion
706
903
  //#region src/puppeteer/libs/requireService.utils.ts
707
904
  function requireService(service, name) {
@@ -788,6 +985,7 @@ let PuppeteerService = class PuppeteerService {
788
985
  idleTime: 500,
789
986
  timeout: 3e4
790
987
  });
988
+ /* v8 ignore next */
791
989
  await page.evaluate(() => document.fonts.ready);
792
990
  return await page.pdf(pdfOptions);
793
991
  } catch (e) {
@@ -804,11 +1002,11 @@ let PuppeteerService = class PuppeteerService {
804
1002
  });
805
1003
  }
806
1004
  async generatePdfFromTemplateHbsString(template, parameters = {}, options) {
807
- const html = requireService(this.hbsService, "Handlebars").render(template, parameters);
1005
+ const html = requireService(this.hbsService, "Handlebars").render(template, parameters, options?.hbsOptions ?? this.options.hbsOptions);
808
1006
  return this.generatePdfFromHtml(html, options);
809
1007
  }
810
1008
  async generatePdfFromTemplateHbsFile(file, parameters = {}, options) {
811
- const html = requireService(this.hbsService, "Handlebars").renderFile(file, parameters);
1009
+ const html = requireService(this.hbsService, "Handlebars").renderFile(file, parameters, options?.hbsOptions ?? this.options.hbsOptions);
812
1010
  return this.generatePdfFromHtml(html, options);
813
1011
  }
814
1012
  async generatePdfFromMjmlString(template, options) {
@@ -860,7 +1058,7 @@ let PuppeteerService = class PuppeteerService {
860
1058
  return this.generatePdfFromHtml(html, options);
861
1059
  }
862
1060
  };
863
- PuppeteerService = __decorate([
1061
+ PuppeteerService = __decorate$3([
864
1062
  Injectable(),
865
1063
  __decorateParam(1, Inject(PDF_PARAMETERS)),
866
1064
  __decorateParam(2, Optional()),
@@ -1062,11 +1260,601 @@ let NestjsPdfService = class NestjsPdfService {
1062
1260
  return await addSignatureFieldUsingAnchor(pdf, fieldName, anchorText);
1063
1261
  }
1064
1262
  };
1065
- NestjsPdfService = __decorate([Injectable(), __decorateMetadata("design:paramtypes", [typeof PuppeteerService === "undefined" ? Object : PuppeteerService])], NestjsPdfService);
1263
+ NestjsPdfService = __decorate$3([Injectable(), __decorateMetadata("design:paramtypes", [typeof PuppeteerService === "undefined" ? Object : PuppeteerService])], NestjsPdfService);
1264
+ //#endregion
1265
+ //#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
1266
+ var import_main = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
1267
+ function _resolveEscapeSequences(value) {
1268
+ return value.replace(/\\\$/g, "$");
1269
+ }
1270
+ function expandValue(value, processEnv, runningParsed) {
1271
+ const env = {
1272
+ ...runningParsed,
1273
+ ...processEnv
1274
+ };
1275
+ const regex = /(?<!\\)\${([^{}]+)}|(?<!\\)\$([A-Za-z_][A-Za-z0-9_]*)/g;
1276
+ let result = value;
1277
+ let match;
1278
+ const seen = /* @__PURE__ */ new Set();
1279
+ while ((match = regex.exec(result)) !== null) {
1280
+ seen.add(result);
1281
+ const [template, bracedExpression, unbracedExpression] = match;
1282
+ const expression = bracedExpression || unbracedExpression;
1283
+ const opMatch = expression.match(/(:\+|\+|:-|-)/);
1284
+ const splitter = opMatch ? opMatch[0] : null;
1285
+ const r = expression.split(splitter);
1286
+ let defaultValue;
1287
+ let value;
1288
+ const key = r.shift();
1289
+ if ([":+", "+"].includes(splitter)) {
1290
+ defaultValue = env[key] ? r.join(splitter) : "";
1291
+ value = null;
1292
+ } else {
1293
+ defaultValue = r.join(splitter);
1294
+ value = env[key];
1295
+ }
1296
+ if (value) {
1297
+ if (seen.has(value)) result = result.replace(template, defaultValue);
1298
+ else result = result.replace(template, value);
1299
+ } else result = result.replace(template, defaultValue);
1300
+ if (result === runningParsed[key]) break;
1301
+ regex.lastIndex = 0;
1302
+ }
1303
+ return result;
1304
+ }
1305
+ function expand(options) {
1306
+ const runningParsed = {};
1307
+ let processEnv = process.env;
1308
+ if (options && options.processEnv != null) processEnv = options.processEnv;
1309
+ for (const key in options.parsed) {
1310
+ let value = options.parsed[key];
1311
+ if (processEnv[key] && processEnv[key] !== value) value = processEnv[key];
1312
+ else value = expandValue(value, processEnv, runningParsed);
1313
+ options.parsed[key] = _resolveEscapeSequences(value);
1314
+ runningParsed[key] = _resolveEscapeSequences(value);
1315
+ }
1316
+ for (const processKey in options.parsed) processEnv[processKey] = options.parsed[processKey];
1317
+ return options;
1318
+ }
1319
+ module.exports.expand = expand;
1320
+ })))();
1321
+ /**
1322
+ * Injection tokens
1323
+ */
1324
+ const CONFIGURATION_SERVICE_TOKEN = Symbol("CONFIG_SERVICE");
1325
+ const CONFIGURATION_TOKEN = "CONFIGURATION_TOKEN";
1326
+ const CONFIGURATION_LOADER = "CONFIGURATION_LOADER";
1327
+ const VALIDATED_ENV_LOADER = "VALIDATED_ENV_LOADER";
1328
+ const PARTIAL_CONFIGURATION_KEY = "PARTIAL_CONFIGURATION_KEY";
1329
+ const VALIDATED_ENV_PROPNAME = "_PROCESS_ENV_VALIDATED";
1330
+ //#endregion
1331
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
1332
+ /**
1333
+ * Checks if a property key is unsafe to access or copy directly.
1334
+ *
1335
+ * This function is used in functions like `get`, `unset`, and `merge` to prevent
1336
+ * prototype pollution attacks by identifying `__proto__`, which modifies the object's
1337
+ * prototype chain. `constructor` and `prototype` stay accessible here because lodash
1338
+ * keeps reads of them unrestricted; write paths use `isUnsafeToWriteProperty` instead,
1339
+ * which also blocks those keys.
1340
+ *
1341
+ * @param key - The property key to check
1342
+ * @returns `true` if the property is unsafe to access directly, `false` otherwise
1343
+ * @internal
1344
+ */
1345
+ function isUnsafeProperty(key) {
1346
+ return key === "__proto__";
1347
+ }
1348
+ //#endregion
1349
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs
1350
+ /** Matches any deep property path. Examples: `a.b`, `a[0]`, `a["b"]` */
1351
+ const regexIsDeepProp$1 = /\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;
1352
+ /**
1353
+ * Checks if a given key is a deep key.
1354
+ *
1355
+ * A deep key is a string that contains a dot (.) or square brackets with a property accessor.
1356
+ *
1357
+ * @param {PropertyKey} key - The key to check.
1358
+ * @returns {boolean} - Returns true if the key is a deep key, otherwise false.
1359
+ *
1360
+ * Examples:
1361
+ *
1362
+ * isDeepKey('a.b') // true
1363
+ * isDeepKey('a[b]') // true
1364
+ * isDeepKey('a') // false
1365
+ * isDeepKey(123) // false
1366
+ * isDeepKey('a.b.c') // true
1367
+ * isDeepKey('a[b][c]') // true
1368
+ * isDeepKey('a.') // false
1369
+ * isDeepKey('.a') // false
1370
+ * isDeepKey('a[b') // false
1371
+ * isDeepKey('a]b]') // false
1372
+ * isDeepKey('a][b') // false
1373
+ * isDeepKey('') // false
1374
+ * isDeepKey('a[0]') // true
1375
+ *
1376
+ */
1377
+ function isDeepKey(key) {
1378
+ switch (typeof key) {
1379
+ case "number":
1380
+ case "symbol": return false;
1381
+ case "string":
1382
+ if (key === "" || key.startsWith(".") || key.endsWith(".")) return false;
1383
+ return regexIsDeepProp$1.test(key);
1384
+ default: return false;
1385
+ }
1386
+ }
1387
+ //#endregion
1388
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/_internal/toKey.mjs
1389
+ /**
1390
+ * Converts `value` to a string key if it's not a string or symbol.
1391
+ *
1392
+ * @private
1393
+ * @param {unknown} value The value to inspect.
1394
+ * @returns {string|symbol} Returns the key.
1395
+ */
1396
+ function toKey(value) {
1397
+ if (typeof value === "string" || typeof value === "symbol") return value;
1398
+ if (Object.is(value?.valueOf?.(), -0)) return "-0";
1399
+ return String(value);
1400
+ }
1401
+ //#endregion
1402
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/util/toString.mjs
1403
+ /**
1404
+ * Converts `value` to a string.
1405
+ *
1406
+ * An empty string is returned for `null` and `undefined` values.
1407
+ * The sign of `-0` is preserved.
1408
+ *
1409
+ * @param value - The value to convert.
1410
+ * @returns Returns the converted string.
1411
+ *
1412
+ * @example
1413
+ * toString(null) // returns ''
1414
+ * toString(undefined) // returns ''
1415
+ * toString(-0) // returns '-0'
1416
+ * toString([1, 2, -0]) // returns '1,2,-0'
1417
+ * toString([Symbol('a'), Symbol('b')]) // returns 'Symbol(a),Symbol(b)'
1418
+ */
1419
+ function toString(value) {
1420
+ if (value == null) return "";
1421
+ return baseToString(value);
1422
+ }
1423
+ function baseToString(value) {
1424
+ if (typeof value === "string") return value;
1425
+ if (Array.isArray(value)) return value.map(baseToString).join(",");
1426
+ const result = String(value);
1427
+ if (result === "0" && Object.is(Number(value), -0)) return "-0";
1428
+ return result;
1429
+ }
1430
+ //#endregion
1431
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/util/toPath.mjs
1432
+ /**
1433
+ * Converts a deep key string into an array of path segments.
1434
+ *
1435
+ * 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.
1436
+ *
1437
+ * @param deepKey - The deep key string to convert.
1438
+ * @returns An array of strings, each representing a segment of the path.
1439
+ *
1440
+ * Examples:
1441
+ *
1442
+ * toPath('a.b.c') // Returns ['a', 'b', 'c']
1443
+ * toPath('a[b][c]') // Returns ['a', 'b', 'c']
1444
+ * toPath('.a.b.c') // Returns ['', 'a', 'b', 'c']
1445
+ * toPath('a["b.c"].d') // Returns ['a', 'b.c', 'd']
1446
+ * toPath('') // Returns []
1447
+ * toPath('.a[b].c.d[e]["f.g"].h') // Returns ['', 'a', 'b', 'c', 'd', 'e', 'f.g', 'h']
1448
+ */
1449
+ function toPath(deepKey) {
1450
+ if (Array.isArray(deepKey)) return deepKey.map(toKey);
1451
+ if (typeof deepKey === "symbol") return [deepKey];
1452
+ deepKey = toString(deepKey);
1453
+ const result = [];
1454
+ const length = deepKey.length;
1455
+ if (length === 0) return result;
1456
+ let index = 0;
1457
+ let key = "";
1458
+ let quoteChar = "";
1459
+ let bracket = false;
1460
+ let bracketHadQuote = false;
1461
+ const bracketNumberRegex = /^-?\d+(?:\.\d+)?$/;
1462
+ if (deepKey.charCodeAt(0) === 46) result.push("");
1463
+ while (index < length) {
1464
+ const char = deepKey[index];
1465
+ if (quoteChar) if (char === "\\" && index + 1 < length) {
1466
+ index++;
1467
+ key += deepKey[index];
1468
+ } else if (char === quoteChar) quoteChar = "";
1469
+ else key += char;
1470
+ else if (bracket) if (char === "\"" || char === "'") {
1471
+ quoteChar = char;
1472
+ bracketHadQuote = true;
1473
+ } else if (char === "]") {
1474
+ bracket = false;
1475
+ if (!bracketHadQuote && key.includes(".") && !bracketNumberRegex.test(key)) {
1476
+ const segments = key.split(".");
1477
+ for (let i = 0; i < segments.length; i++) if (segments[i] !== "") result.push(segments[i]);
1478
+ } else result.push(key);
1479
+ key = "";
1480
+ } else key += char;
1481
+ else if (char === "[") {
1482
+ bracket = true;
1483
+ bracketHadQuote = false;
1484
+ if (key) {
1485
+ result.push(key);
1486
+ key = "";
1487
+ }
1488
+ } else if (char === ".") {
1489
+ if (key) {
1490
+ result.push(key);
1491
+ key = "";
1492
+ }
1493
+ const next = deepKey[index + 1];
1494
+ if (next === void 0 || next === ".") result.push("");
1495
+ } else key += char;
1496
+ index++;
1497
+ }
1498
+ if (key) result.push(key);
1499
+ return result;
1500
+ }
1501
+ //#endregion
1502
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/object/get.mjs
1503
+ /**
1504
+ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
1505
+ *
1506
+ * @param object - The object to query.
1507
+ * @param path - The path of the property to get.
1508
+ * @param [defaultValue] - The value returned if the resolved value is undefined.
1509
+ * @returns Returns the resolved value.
1510
+ *
1511
+ * @example
1512
+ * const object = { a: { b: { c: 1 } } };
1513
+ * get(object, 'a.b.c');
1514
+ * // => 1
1515
+ *
1516
+ * get(object, ['a', 'b', 'c']);
1517
+ * // => 1
1518
+ *
1519
+ * get(object, 'a.b.d', 'default');
1520
+ * // => 'default'
1521
+ */
1522
+ function get(object, path, defaultValue) {
1523
+ if (object == null) return defaultValue;
1524
+ switch (typeof path) {
1525
+ case "string": {
1526
+ if (isUnsafeProperty(path)) return defaultValue;
1527
+ const result = object[path];
1528
+ if (result === void 0) if (isDeepKey(path) && !Object.hasOwn(object, path)) return get(object, toPath(path), defaultValue);
1529
+ else return defaultValue;
1530
+ return result;
1531
+ }
1532
+ case "number":
1533
+ case "symbol": {
1534
+ if (typeof path === "number") path = toKey(path);
1535
+ const result = object[path];
1536
+ if (result === void 0) return defaultValue;
1537
+ return result;
1538
+ }
1539
+ default: {
1540
+ if (Array.isArray(path)) return getWithPath(object, path, defaultValue);
1541
+ if (Object.is(path?.valueOf(), -0)) path = "-0";
1542
+ else path = String(path);
1543
+ if (isUnsafeProperty(path)) return defaultValue;
1544
+ const result = object[path];
1545
+ if (result === void 0) return defaultValue;
1546
+ return result;
1547
+ }
1548
+ }
1549
+ }
1550
+ function getWithPath(object, path, defaultValue) {
1551
+ if (path.length === 0) return defaultValue;
1552
+ let current = object;
1553
+ for (let index = 0; index < path.length; index++) {
1554
+ if (current == null) return defaultValue;
1555
+ if (isUnsafeProperty(path[index])) return defaultValue;
1556
+ current = current[path[index]];
1557
+ }
1558
+ if (current === void 0) return defaultValue;
1559
+ return current;
1560
+ }
1561
+ //#endregion
1562
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/_internal/isIndex.mjs
1563
+ const IS_UNSIGNED_INTEGER = /^(?:0|[1-9]\d*)$/;
1564
+ function isIndex(value, length = Number.MAX_SAFE_INTEGER) {
1565
+ switch (typeof value) {
1566
+ case "number": return Number.isInteger(value) && value >= 0 && value < length;
1567
+ case "symbol": return false;
1568
+ case "string": return IS_UNSIGNED_INTEGER.test(value);
1569
+ }
1570
+ }
1571
+ //#endregion
1572
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
1573
+ /**
1574
+ * Gets the `toStringTag` of `value`.
1575
+ *
1576
+ * @private
1577
+ * @param {T} value The value to query.
1578
+ * @returns {string} Returns the `Object.prototype.toString.call` result.
1579
+ */
1580
+ function getTag(value) {
1581
+ if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
1582
+ return Object.prototype.toString.call(value);
1583
+ }
1584
+ //#endregion
1585
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
1586
+ /**
1587
+ * Checks if the given value is an arguments object.
1588
+ *
1589
+ * This function tests whether the provided value is an arguments object or not.
1590
+ * It returns `true` if the value is an arguments object, and `false` otherwise.
1591
+ *
1592
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an arguments object.
1593
+ *
1594
+ * @param value - The value to test if it is an arguments object.
1595
+ * @returns `true` if the value is an arguments, `false` otherwise.
1596
+ *
1597
+ * @example
1598
+ * const args = (function() { return arguments; })();
1599
+ * const strictArgs = (function() { 'use strict'; return arguments; })();
1600
+ * const value = [1, 2, 3];
1601
+ *
1602
+ * console.log(isArguments(args)); // true
1603
+ * console.log(isArguments(strictArgs)); // true
1604
+ * console.log(isArguments(value)); // false
1605
+ */
1606
+ function isArguments(value) {
1607
+ return value !== null && typeof value === "object" && getTag(value) === "[object Arguments]";
1608
+ }
1609
+ //#endregion
1610
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/object/has.mjs
1611
+ /**
1612
+ * Checks if a given path exists within an object.
1613
+ *
1614
+ * You can provide the path as a single property key, an array of property keys,
1615
+ * or a string representing a deep path.
1616
+ *
1617
+ * If the path is an index and the object is an array or an arguments object, the function will verify
1618
+ * if the index is valid and within the bounds of the array or arguments object, even if the array or
1619
+ * arguments object is sparse (i.e., not all indexes are defined).
1620
+ *
1621
+ * @param object - The object to query.
1622
+ * @param path - The path to check. This can be a single property key,
1623
+ * an array of property keys, or a string representing a deep path.
1624
+ * @returns Returns `true` if the path exists in the object, `false` otherwise.
1625
+ *
1626
+ * @example
1627
+ *
1628
+ * const obj = { a: { b: { c: 3 } } };
1629
+ *
1630
+ * has(obj, 'a'); // true
1631
+ * has(obj, ['a', 'b']); // true
1632
+ * has(obj, ['a', 'b', 'c']); // true
1633
+ * has(obj, 'a.b.c'); // true
1634
+ * has(obj, 'a.b.d'); // false
1635
+ * has(obj, ['a', 'b', 'c', 'd']); // false
1636
+ * has([], 0); // false
1637
+ * has([1, 2, 3], 2); // true
1638
+ * has([1, 2, 3], 5); // false
1639
+ */
1640
+ function has(object, path) {
1641
+ let resolvedPath;
1642
+ if (Array.isArray(path)) resolvedPath = path;
1643
+ else if (typeof path === "string" && isDeepKey(path) && !(path in Object(object))) resolvedPath = toPath(path);
1644
+ else resolvedPath = [path];
1645
+ if (resolvedPath.length === 0) return false;
1646
+ let current = object;
1647
+ for (let i = 0; i < resolvedPath.length; i++) {
1648
+ const key = resolvedPath[i];
1649
+ if (current == null || !Object.hasOwn(current, key)) {
1650
+ if (!((Array.isArray(current) || isArguments(current)) && isIndex(key) && key < current.length)) return false;
1651
+ }
1652
+ current = current[key];
1653
+ }
1654
+ return true;
1655
+ }
1656
+ //#endregion
1657
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/predicate/isObject.mjs
1658
+ /**
1659
+ * Checks if the given value is an object. An object is a value that is
1660
+ * not a primitive type (string, number, boolean, symbol, null, or undefined).
1661
+ *
1662
+ * This function tests whether the provided value is an object or not.
1663
+ * It returns `true` if the value is an object, and `false` otherwise.
1664
+ *
1665
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an object value.
1666
+ *
1667
+ * @param value - The value to check if it is an object.
1668
+ * @returns `true` if the value is an object, `false` otherwise.
1669
+ *
1670
+ * @example
1671
+ * const value1 = {};
1672
+ * const value2 = [1, 2, 3];
1673
+ * const value3 = () => {};
1674
+ * const value4 = null;
1675
+ *
1676
+ * console.log(isObject(value1)); // true
1677
+ * console.log(isObject(value2)); // true
1678
+ * console.log(isObject(value3)); // true
1679
+ * console.log(isObject(value4)); // false
1680
+ */
1681
+ function isObject$1(value) {
1682
+ return value !== null && (typeof value === "object" || typeof value === "function");
1683
+ }
1684
+ //#endregion
1685
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/predicate/isSymbol.mjs
1686
+ /**
1687
+ * Check whether a value is a symbol.
1688
+ *
1689
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `symbol`.
1690
+ *
1691
+ * @param value The value to check.
1692
+ * @returns Returns `true` if `value` is a symbol, else `false`.
1693
+ * @example
1694
+ * isSymbol(Symbol.iterator);
1695
+ * // => true
1696
+ *
1697
+ * isSymbol('abc');
1698
+ * // => false
1699
+ */
1700
+ function isSymbol(value) {
1701
+ return typeof value === "symbol" || value instanceof Symbol;
1702
+ }
1703
+ //#endregion
1704
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/_internal/isKey.mjs
1705
+ /** Matches any deep property path. (e.g. `a.b[0].c`)*/
1706
+ const regexIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
1707
+ /** Matches any word character (alphanumeric & underscore).*/
1708
+ const regexIsPlainProp = /^\w*$/;
1709
+ /**
1710
+ * 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`)
1711
+ * @param {unknown} value The value to check.
1712
+ * @param {unknown} object The object to query.
1713
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
1714
+ *
1715
+ * @example
1716
+ * isKey('a', { a: 1 });
1717
+ * // => true
1718
+ *
1719
+ * isKey('a.b', { a: { b: 2 } });
1720
+ * // => false
1721
+ */
1722
+ function isKey(value, object) {
1723
+ if (Array.isArray(value)) return false;
1724
+ if (typeof value === "number" || typeof value === "boolean" || value == null || isSymbol(value)) return true;
1725
+ return typeof value === "string" && (regexIsPlainProp.test(value) || !regexIsDeepProp.test(value)) || object != null && Object.hasOwn(object, value);
1726
+ }
1727
+ //#endregion
1728
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/util/eq.mjs
1729
+ /**
1730
+ * Performs a `SameValueZero` comparison between two values to determine if they are equivalent.
1731
+ *
1732
+ * @param value The value to compare.
1733
+ * @param other The other value to compare.
1734
+ * @returns Returns `true` if the values are equivalent, else `false`.
1735
+ *
1736
+ * @example
1737
+ * eq(1, 1); // true
1738
+ * eq(0, -0); // true
1739
+ * eq(NaN, NaN); // true
1740
+ * eq('a', Object('a')); // false
1741
+ */
1742
+ function eq(value, other) {
1743
+ return value === other || Number.isNaN(value) && Number.isNaN(other);
1744
+ }
1745
+ //#endregion
1746
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/_internal/assignValue.mjs
1747
+ const assignValue = (object, key, value) => {
1748
+ const objValue = object[key];
1749
+ if (!(Object.hasOwn(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) object[key] = value;
1750
+ };
1751
+ //#endregion
1752
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/_internal/isUnsafeToWriteProperty.mjs
1753
+ /**
1754
+ * Checks if a property key is unsafe to write to.
1755
+ *
1756
+ * Writing through `__proto__`, `constructor`, or `prototype` can reach
1757
+ * `Object.prototype` and pollute every object, so write paths like `set`,
1758
+ * `update`, and `zipObjectDeep` abort when a path segment matches one of
1759
+ * these keys, matching lodash's behavior.
1760
+ *
1761
+ * Read paths like `get` and `unset` use `isUnsafeProperty` instead, which
1762
+ * only blocks `__proto__`; lodash keeps reads of `constructor` and
1763
+ * `prototype` unrestricted.
1764
+ *
1765
+ * @param key - The property key to check
1766
+ * @returns `true` if the property is unsafe to write to, `false` otherwise
1767
+ * @internal
1768
+ */
1769
+ function isUnsafeToWriteProperty(key) {
1770
+ return key === "__proto__" || key === "constructor" || key === "prototype";
1771
+ }
1772
+ //#endregion
1773
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/object/updateWith.mjs
1774
+ /**
1775
+ * Updates the value at the specified path of the given object using an updater function and a customizer.
1776
+ * If any part of the path does not exist, it will be created.
1777
+ *
1778
+ * @template T - The type of the object.
1779
+ * @template R - The type of the return value.
1780
+ * @param obj - The object to modify.
1781
+ * @param path - The path of the property to update.
1782
+ * @param updater - The function to produce the updated value.
1783
+ * @param customizer - The function to customize the update process.
1784
+ * @returns The modified object.
1785
+ *
1786
+ * @example
1787
+ * const object = { 'a': [{ 'b': { 'c': 3 } }] };
1788
+ * updateWith(object, 'a[0].b.c', (n) => n * n);
1789
+ * // => { 'a': [{ 'b': { 'c': 9 } }] }
1790
+ */
1791
+ function updateWith(obj, path, updater, customizer) {
1792
+ if (obj == null && !isObject$1(obj)) return obj;
1793
+ let resolvedPath;
1794
+ if (isKey(path, obj)) resolvedPath = [path];
1795
+ else if (Array.isArray(path)) resolvedPath = path;
1796
+ else resolvedPath = toPath(path);
1797
+ const updateValue = updater(get(obj, resolvedPath));
1798
+ let current = obj;
1799
+ for (let i = 0; i < resolvedPath.length && current != null; i++) {
1800
+ const key = toKey(resolvedPath[i]);
1801
+ if (isUnsafeToWriteProperty(key)) return obj;
1802
+ let newValue;
1803
+ if (i === resolvedPath.length - 1) newValue = updateValue;
1804
+ else {
1805
+ const objValue = current[key];
1806
+ const customizerResult = customizer?.(objValue, key, obj);
1807
+ newValue = customizerResult !== void 0 ? customizerResult : isObject$1(objValue) ? objValue : isIndex(resolvedPath[i + 1]) ? [] : {};
1808
+ }
1809
+ assignValue(current, key, newValue);
1810
+ current = current[key];
1811
+ }
1812
+ return obj;
1813
+ }
1814
+ //#endregion
1815
+ //#region node_modules/.pnpm/es-toolkit@1.51.0/node_modules/es-toolkit/dist/compat/object/set.mjs
1816
+ /**
1817
+ * Sets the value at the specified path of the given object. If any part of the path does not exist, it will be created.
1818
+ *
1819
+ * @template T - The type of the object.
1820
+ * @param obj - The object to modify.
1821
+ * @param path - The path of the property to set.
1822
+ * @param value - The value to set.
1823
+ * @returns The modified object.
1824
+ *
1825
+ * @example
1826
+ * // Set a value in a nested object
1827
+ * const obj = { a: { b: { c: 3 } } };
1828
+ * set(obj, 'a.b.c', 4);
1829
+ * console.log(obj.a.b.c); // 4
1830
+ *
1831
+ * @example
1832
+ * // Set a value in an array
1833
+ * const arr = [1, 2, 3];
1834
+ * set(arr, 1, 4);
1835
+ * console.log(arr[1]); // 4
1836
+ *
1837
+ * @example
1838
+ * // Create non-existent path and set value
1839
+ * const obj = {};
1840
+ * set(obj, 'a.b.c', 4);
1841
+ * console.log(obj); // { a: { b: { c: 4 } } }
1842
+ */
1843
+ function set(obj, path, value) {
1844
+ return updateWith(obj, path, () => value, () => void 0);
1845
+ }
1846
+ //#endregion
1847
+ //#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
1848
+ /**
1849
+ * @publicApi
1850
+ */
1851
+ function getConfigToken(token) {
1852
+ return `CONFIGURATION(${token.toString()})`;
1853
+ }
1066
1854
  //#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");
1855
+ //#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
1856
+ var import_main$1 = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
1857
+ const fs$2 = __require("fs");
1070
1858
  const path = __require("path");
1071
1859
  const os = __require("os");
1072
1860
  const crypto = __require("crypto");
@@ -1193,11 +1981,12 @@ var require_main$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1193
1981
  }
1194
1982
  function _vaultPath(options) {
1195
1983
  let possibleVaultPath = null;
1196
- 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`;
1198
- } else possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
1199
- else possibleVaultPath = path.resolve(process.cwd(), ".env.vault");
1200
- if (fs$1.existsSync(possibleVaultPath)) return possibleVaultPath;
1984
+ if (options && options.path && options.path.length > 0) {
1985
+ if (Array.isArray(options.path)) {
1986
+ for (const filepath of options.path) if (fs$2.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
1987
+ } else possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
1988
+ } else possibleVaultPath = path.resolve(process.cwd(), ".env.vault");
1989
+ if (fs$2.existsSync(possibleVaultPath)) return possibleVaultPath;
1201
1990
  return null;
1202
1991
  }
1203
1992
  function _resolveHome(envPath) {
@@ -1223,15 +2012,17 @@ var require_main$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1223
2012
  if (options && options.encoding) encoding = options.encoding;
1224
2013
  else if (debug) _debug("no encoding is specified (UTF-8 is used by default)");
1225
2014
  let optionPaths = [dotenvPath];
1226
- if (options && options.path) if (!Array.isArray(options.path)) optionPaths = [_resolveHome(options.path)];
1227
- else {
1228
- optionPaths = [];
1229
- for (const filepath of options.path) optionPaths.push(_resolveHome(filepath));
2015
+ if (options && options.path) {
2016
+ if (!Array.isArray(options.path)) optionPaths = [_resolveHome(options.path)];
2017
+ else {
2018
+ optionPaths = [];
2019
+ for (const filepath of options.path) optionPaths.push(_resolveHome(filepath));
2020
+ }
1230
2021
  }
1231
2022
  let lastError;
1232
2023
  const parsedAll = {};
1233
2024
  for (const path of optionPaths) try {
1234
- const parsed = DotenvModule.parse(fs$1.readFileSync(path, { encoding }));
2025
+ const parsed = DotenvModule.parse(fs$2.readFileSync(path, { encoding }));
1235
2026
  DotenvModule.populate(parsedAll, parsed, options);
1236
2027
  } catch (e) {
1237
2028
  if (debug) _debug(`failed to load ${path} ${e.message}`);
@@ -1306,8 +2097,10 @@ var require_main$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1306
2097
  processEnv[key] = parsed[key];
1307
2098
  populated[key] = parsed[key];
1308
2099
  }
1309
- if (debug) if (override === true) _debug(`"${key}" is already defined and WAS overwritten`);
1310
- else _debug(`"${key}" is already defined and was NOT overwritten`);
2100
+ if (debug) {
2101
+ if (override === true) _debug(`"${key}" is already defined and WAS overwritten`);
2102
+ else _debug(`"${key}" is already defined and was NOT overwritten`);
2103
+ }
1311
2104
  } else {
1312
2105
  processEnv[key] = parsed[key];
1313
2106
  populated[key] = parsed[key];
@@ -1331,2299 +2124,413 @@ var require_main$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1331
2124
  module.exports.parse = DotenvModule.parse;
1332
2125
  module.exports.populate = DotenvModule.populate;
1333
2126
  module.exports = DotenvModule;
1334
- }));
2127
+ })))(), 1);
2128
+ const getDefaultParser = () => import_main$1.parse;
1335
2129
  //#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, "$");
2130
+ //#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
2131
+ var __decorate$2 = function(decorators, target, key, desc) {
2132
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2133
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2134
+ 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;
2135
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
2136
+ };
2137
+ var __metadata = function(k, v) {
2138
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
2139
+ };
2140
+ var __param = function(paramIndex, decorator) {
2141
+ return function(target, key) {
2142
+ decorator(target, key, paramIndex);
2143
+ };
2144
+ };
2145
+ /**
2146
+ * @publicApi
2147
+ */
2148
+ let ConfigService = class ConfigService {
2149
+ set isCacheEnabled(value) {
2150
+ this._isCacheEnabled = value;
2151
+ }
2152
+ get isCacheEnabled() {
2153
+ return this._isCacheEnabled;
2154
+ }
2155
+ set skipProcessEnv(value) {
2156
+ this._skipProcessEnv = value;
2157
+ }
2158
+ get skipProcessEnv() {
2159
+ return this._skipProcessEnv;
2160
+ }
2161
+ constructor(internalConfig = {}) {
2162
+ this.internalConfig = internalConfig;
2163
+ this.cache = {};
2164
+ this._changes$ = new Subject();
2165
+ this._skipProcessEnv = false;
2166
+ this._isCacheEnabled = false;
2167
+ this.envFilePaths = [];
2168
+ this.parser = getDefaultParser();
2169
+ }
2170
+ /**
2171
+ * Returns a stream of configuration changes.
2172
+ * Each event contains the attribute path, the old value and the new value.
2173
+ */
2174
+ get changes$() {
2175
+ return this._changes$.asObservable();
2176
+ }
2177
+ /**
2178
+ * Get a configuration value (either custom configuration or process environment variable)
2179
+ * based on property path (you can use dot notation to traverse nested object, e.g. "database.host").
2180
+ * It returns a default value if the key does not exist.
2181
+ * @param propertyPath
2182
+ * @param defaultValueOrOptions
2183
+ */
2184
+ get(propertyPath, defaultValueOrOptions, options) {
2185
+ const internalValue = this.getFromInternalConfig(propertyPath);
2186
+ if (!isUndefined(internalValue)) return internalValue;
2187
+ const validatedEnvValue = this.getFromValidatedEnv(propertyPath);
2188
+ if (!isUndefined(validatedEnvValue)) return validatedEnvValue;
2189
+ const defaultValue = this.isGetOptionsObject(defaultValueOrOptions) && !options ? void 0 : defaultValueOrOptions;
2190
+ if (!this._skipProcessEnv) {
2191
+ const processEnvValue = this.getFromProcessEnv(propertyPath, defaultValue);
2192
+ if (!isUndefined(processEnvValue)) return processEnvValue;
2193
+ }
2194
+ return defaultValue;
2195
+ }
2196
+ /**
2197
+ * Get a configuration value (either custom configuration or process environment variable)
2198
+ * based on property path (you can use dot notation to traverse nested object, e.g. "database.host").
2199
+ * It returns a default value if the key does not exist.
2200
+ * If the default value is undefined an exception will be thrown.
2201
+ * @param propertyPath
2202
+ * @param defaultValueOrOptions
2203
+ */
2204
+ getOrThrow(propertyPath, defaultValueOrOptions, options) {
2205
+ const value = this.get(propertyPath, defaultValueOrOptions, options);
2206
+ if (isUndefined(value)) throw new TypeError(`Configuration key "${propertyPath.toString()}" does not exist`);
2207
+ return value;
2208
+ }
2209
+ /**
2210
+ * Sets a configuration value based on property path.
2211
+ * @param propertyPath
2212
+ * @param value
2213
+ */
2214
+ set(propertyPath, value) {
2215
+ const oldValue = this.get(propertyPath);
2216
+ set(this.internalConfig, propertyPath, value);
2217
+ if (typeof propertyPath === "string") {
2218
+ process.env[propertyPath] = String(value);
2219
+ this.updateInterpolatedEnv(propertyPath, String(value));
2220
+ }
2221
+ if (this.isCacheEnabled) this.setInCacheIfDefined(propertyPath, value);
2222
+ this._changes$.next({
2223
+ path: propertyPath,
2224
+ oldValue,
2225
+ newValue: value
2226
+ });
1340
2227
  }
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;
2228
+ /**
2229
+ * Sets env file paths from `config.module.ts` to parse.
2230
+ * @param paths
2231
+ */
2232
+ setEnvFilePaths(paths) {
2233
+ this.envFilePaths = paths;
1374
2234
  }
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
- /**
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`.
2586
- */
2587
- function baseHas(object, key) {
2588
- return object != null && hasOwnProperty.call(object, key);
2589
- }
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
2235
  /**
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,
2236
+ * Sets parser from `config.module.ts`.
2237
+ * @param parser
2605
2238
  */
2606
- function baseIsArguments(value) {
2607
- return isObjectLike(value) && baseGetTag(value) == argsTag;
2239
+ setParser(parser) {
2240
+ this.parser = parser;
2608
2241
  }
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;
2242
+ getFromCache(propertyPath, defaultValue) {
2243
+ const cachedValue = get(this.cache, propertyPath);
2244
+ return isUndefined(cachedValue) ? defaultValue : cachedValue;
2647
2245
  }
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;
2246
+ getFromValidatedEnv(propertyPath) {
2247
+ return get(this.internalConfig[VALIDATED_ENV_PROPNAME], propertyPath);
2683
2248
  }
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];
2249
+ getFromProcessEnv(propertyPath, defaultValue) {
2250
+ if (this.isCacheEnabled && has(this.cache, propertyPath)) {
2251
+ const cachedValue = this.getFromCache(propertyPath, defaultValue);
2252
+ return !isUndefined(cachedValue) ? cachedValue : defaultValue;
2711
2253
  }
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);
2254
+ const processValue = get(process.env, propertyPath);
2255
+ this.setInCacheIfDefined(propertyPath, processValue);
2256
+ return processValue;
2752
2257
  }
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;
2258
+ getFromInternalConfig(propertyPath) {
2259
+ return get(this.internalConfig, propertyPath);
2788
2260
  }
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);
2261
+ setInCacheIfDefined(propertyPath, value) {
2262
+ if (typeof value === "undefined") return;
2263
+ set(this.cache, propertyPath, value);
2811
2264
  }
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;
2265
+ isGetOptionsObject(options) {
2266
+ return options && options?.infer && Object.keys(options).length === 1;
2848
2267
  }
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);
2268
+ updateInterpolatedEnv(propertyPath, value) {
2269
+ let config = {};
2270
+ for (const envFilePath of this.envFilePaths) if (fs.existsSync(envFilePath)) config = Object.assign(this.parser(fs.readFileSync(envFilePath)), config);
2271
+ const regex = new RegExp(`\\$\\{?${propertyPath}\\}?`, "g");
2272
+ for (const [k, v] of Object.entries(config)) if (regex.test(v)) process.env[k] = v.replace(regex, value);
2885
2273
  }
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
- }));
2274
+ };
2275
+ ConfigService = __decorate$2([
2276
+ Injectable(),
2277
+ __param(0, Optional()),
2278
+ __param(0, Inject(CONFIGURATION_TOKEN)),
2279
+ __metadata("design:paramtypes", [Object])
2280
+ ], ConfigService);
3090
2281
  //#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;
2282
+ //#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
2283
+ var __decorate$1 = function(decorators, target, key, desc) {
2284
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2285
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2286
+ 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;
2287
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
2288
+ };
2289
+ /**
2290
+ * @publicApi
2291
+ */
2292
+ let ConfigHostModule = class ConfigHostModule {};
2293
+ ConfigHostModule = __decorate$1([Global(), Module({
2294
+ providers: [{
2295
+ provide: CONFIGURATION_TOKEN,
2296
+ useFactory: () => ({})
2297
+ }, {
2298
+ provide: CONFIGURATION_SERVICE_TOKEN,
2299
+ useClass: ConfigService
2300
+ }],
2301
+ exports: [CONFIGURATION_TOKEN, CONFIGURATION_SERVICE_TOKEN]
2302
+ })], ConfigHostModule);
2303
+ //#endregion
2304
+ //#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
2305
+ /**
2306
+ * @publicApi
2307
+ */
2308
+ function createConfigProvider(factory) {
2309
+ return {
2310
+ provide: factory.KEY || getConfigToken(randomUUID()),
2311
+ useFactory: factory,
2312
+ inject: []
3098
2313
  };
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
- }));
2314
+ }
3132
2315
  //#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
- }));
2316
+ //#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
2317
+ /**
2318
+ * @publicApi
2319
+ */
2320
+ function getRegistrationToken(config) {
2321
+ return config[PARTIAL_CONFIGURATION_KEY];
2322
+ }
3150
2323
  //#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];
2324
+ //#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
2325
+ /**
2326
+ * @publicApi
2327
+ */
2328
+ function mergeConfigObject(host, partial, token) {
2329
+ if (token) {
2330
+ set(host, token, partial);
2331
+ return partial;
3161
2332
  }
3162
- }));
2333
+ Object.assign(host, partial);
2334
+ }
3163
2335
  //#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 };
2336
+ //#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
2337
+ /**
2338
+ * Joi defaults to `allowUnknown: false` and `abortEarly: true`, which would
2339
+ * reject the unrelated variables that are always present in `process.env` and
2340
+ * report only the first failure. Previous versions of this package overrode
2341
+ * both, so they remain the defaults for Joi schemas unless the user opts out.
2342
+ */
2343
+ const JOI_DEFAULT_LIBRARY_OPTIONS = {
2344
+ abortEarly: false,
2345
+ allowUnknown: true
2346
+ };
2347
+ /**
2348
+ * Validates config using a Standard Schema (e.g. Zod, Arktype).
2349
+ * @see https://standardschema.dev/
2350
+ */
2351
+ async function validateWithStandardSchema(schema, config, options) {
2352
+ const result = await schema["~standard"].validate(config, getLibraryOptions(schema, options));
2353
+ if (result.issues) return {
2354
+ error: new Error(formatIssues(result.issues)),
2355
+ value: config
3168
2356
  };
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;
2357
+ return { value: result.value };
2358
+ }
2359
+ function getLibraryOptions(schema, options) {
2360
+ if (schema["~standard"].vendor !== "joi") return options;
2361
+ return {
2362
+ ...options,
2363
+ libraryOptions: {
2364
+ ...JOI_DEFAULT_LIBRARY_OPTIONS,
2365
+ ...options?.libraryOptions
3179
2366
  }
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
2367
  };
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;
2368
+ }
2369
+ function formatIssues(issues) {
2370
+ return issues.map((issue) => {
2371
+ const path = formatIssuePath(issue.path);
2372
+ return path ? `${path}: ${issue.message}` : issue.message;
2373
+ }).join("\n");
2374
+ }
2375
+ function formatIssuePath(path) {
2376
+ return (path ?? []).map((segment) => typeof segment === "object" && segment !== null ? String(segment.key) : String(segment)).join(".");
2377
+ }
2378
+ //#endregion
2379
+ //#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
2380
+ var __decorate = function(decorators, target, key, desc) {
2381
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2382
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2383
+ 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;
2384
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
2385
+ };
2386
+ var ConfigModule_1;
2387
+ /**
2388
+ * @publicApi
2389
+ */
2390
+ let ConfigModule = ConfigModule_1 = class ConfigModule {
2391
+ /**
2392
+ * This promise resolves when parser completes loading environment variables.
2393
+ * When "ignoreEnvFile" is set to true, then it will resolve immediately after the
2394
+ * "ConfigModule#forRoot" method is called.
2395
+ */
2396
+ static get envVariablesLoaded() {
2397
+ return this._envVariablesLoaded;
2398
+ }
2399
+ /**
2400
+ * Loads environment variables based on the "ignoreEnvFile" flag and "envFilePath" value.
2401
+ * Additionally, registers custom configurations globally.
2402
+ * @param options
2403
+ */
2404
+ static async forRoot(options = {}) {
2405
+ const envFilePaths = Array.isArray(options.envFilePath) ? options.envFilePath : [options.envFilePath || resolve$1(process.cwd(), ".env")];
2406
+ const parser = options.parser ?? getDefaultParser();
2407
+ let validatedEnvConfig = void 0;
2408
+ let config = options.ignoreEnvFile ? {} : this.loadEnvFile(envFilePaths, parser, options);
2409
+ if (!options.ignoreEnvVars && options.validatePredefined !== false) config = options.override ? {
2410
+ ...process.env,
2411
+ ...config
2412
+ } : {
2413
+ ...config,
2414
+ ...process.env
3231
2415
  };
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 = {
2416
+ if (options.validate) {
2417
+ const validatedConfig = options.validate(config);
2418
+ validatedEnvConfig = validatedConfig;
2419
+ this.assignVariablesToProcess(validatedConfig, options.override);
2420
+ } else if (options.validationSchema) {
2421
+ const { error, value: validatedConfig } = await validateWithStandardSchema(options.validationSchema, config, options.validationOptions);
2422
+ if (error) throw new Error(`Config validation error: ${error.message}`);
2423
+ validatedEnvConfig = {
3270
2424
  ...config,
3271
- ...process.env
2425
+ ...validatedConfig
3272
2426
  };
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;
2427
+ this.assignVariablesToProcess(validatedEnvConfig, options.override);
2428
+ } else this.assignVariablesToProcess(config, options.override);
2429
+ const isConfigToLoad = options.load && options.load.length;
2430
+ const providers = (await Promise.all(options.load || [])).map((factory) => createConfigProvider(factory)).filter((item) => item);
2431
+ const configProviderTokens = providers.map((item) => item.provide);
2432
+ const configServiceProvider = {
2433
+ provide: ConfigService,
2434
+ useFactory: (configService) => {
2435
+ const untypedConfigService = configService;
2436
+ if (options.cache) untypedConfigService.isCacheEnabled = true;
2437
+ if (options.skipProcessEnv) untypedConfigService.skipProcessEnv = true;
2438
+ configService.setEnvFilePaths(envFilePaths);
2439
+ configService.setParser(parser);
2440
+ return configService;
2441
+ },
2442
+ inject: [CONFIGURATION_SERVICE_TOKEN, ...configProviderTokens]
2443
+ };
2444
+ providers.push(configServiceProvider);
2445
+ if (validatedEnvConfig) {
2446
+ const validatedEnvConfigLoader = {
2447
+ provide: VALIDATED_ENV_LOADER,
2448
+ useFactory: (host) => {
2449
+ host[VALIDATED_ENV_PROPNAME] = validatedEnvConfig;
3295
2450
  },
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: []
2451
+ inject: [CONFIGURATION_TOKEN]
3431
2452
  };
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;
2453
+ providers.push(validatedEnvConfigLoader);
3445
2454
  }
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
- }
2455
+ this.environmentVariablesLoadedSignal();
2456
+ return {
2457
+ module: ConfigModule_1,
2458
+ global: options.isGlobal,
2459
+ providers: isConfigToLoad ? [...providers, {
2460
+ provide: CONFIGURATION_LOADER,
2461
+ useFactory: (host, ...configurations) => {
2462
+ configurations.forEach((item, index) => this.mergePartial(host, item, providers[index]));
2463
+ },
2464
+ inject: [CONFIGURATION_TOKEN, ...configProviderTokens]
2465
+ }] : providers,
2466
+ exports: [ConfigService, ...configProviderTokens]
3479
2467
  };
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();
2468
+ }
3502
2469
  /**
3503
- * @publicApi
3504
- *
3505
- * Registers the configuration object behind a specified token.
2470
+ * Registers configuration object (partial registration).
2471
+ * @param config
3506
2472
  */
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
- }
2473
+ static forFeature(config) {
2474
+ const configProvider = createConfigProvider(config);
2475
+ const serviceProvider = {
2476
+ provide: ConfigService,
2477
+ useFactory: (configService) => configService,
2478
+ inject: [CONFIGURATION_SERVICE_TOKEN, configProvider.provide]
3537
2479
  };
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
- }
2480
+ return {
2481
+ module: ConfigModule_1,
2482
+ providers: [
2483
+ configProvider,
2484
+ serviceProvider,
2485
+ {
2486
+ provide: CONFIGURATION_LOADER,
2487
+ useFactory: (host, partialConfig) => {
2488
+ this.mergePartial(host, partialConfig, configProvider);
2489
+ },
2490
+ inject: [CONFIGURATION_TOKEN, configProvider.provide]
2491
+ }
2492
+ ],
2493
+ exports: [ConfigService, configProvider.provide]
3576
2494
  };
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];
2495
+ }
2496
+ static loadEnvFile(envFilePaths, parser, options) {
2497
+ let config = {};
2498
+ for (const envFilePath of envFilePaths) if (fs$1.existsSync(envFilePath)) {
2499
+ config = Object.assign(parser(fs$1.readFileSync(envFilePath)), config);
2500
+ if (options.expandVariables) {
2501
+ const expandOptions = typeof options.expandVariables === "object" ? options.expandVariables : {};
2502
+ config = (0, import_main.expand)({
2503
+ ...expandOptions,
2504
+ parsed: config
2505
+ }).parsed || config;
3600
2506
  }
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
- }));
2507
+ }
2508
+ return config;
2509
+ }
2510
+ static assignVariablesToProcess(config, override) {
2511
+ if (!isObject(config)) return;
2512
+ (override ? Object.keys(config) : Object.keys(config).filter((key) => !(key in process.env))).forEach((key) => {
2513
+ const value = config[key];
2514
+ if (typeof value === "string") process.env[key] = value;
2515
+ else if (typeof value === "boolean" || typeof value === "number") process.env[key] = `${value}`;
2516
+ });
2517
+ }
2518
+ static mergePartial(host, item, provider) {
2519
+ const factoryRef = provider.useFactory;
2520
+ mergeConfigObject(host, item, getRegistrationToken(factoryRef));
2521
+ }
2522
+ };
2523
+ ConfigModule._envVariablesLoaded = new Promise((resolve) => ConfigModule_1.environmentVariablesLoadedSignal = resolve);
2524
+ ConfigModule = ConfigModule_1 = __decorate([Module({
2525
+ imports: [ConfigHostModule],
2526
+ providers: [{
2527
+ provide: ConfigService,
2528
+ useExisting: CONFIGURATION_SERVICE_TOKEN
2529
+ }],
2530
+ exports: [ConfigHostModule, ConfigService]
2531
+ })], ConfigModule);
3618
2532
  //#endregion
3619
2533
  //#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
2534
  var _PuppeteerModule;
3628
2535
  let PuppeteerModule = _PuppeteerModule = class PuppeteerModule {
3629
2536
  browserService;
@@ -3641,10 +2548,6 @@ let PuppeteerModule = _PuppeteerModule = class PuppeteerModule {
3641
2548
  provide: PDF_PARAMETERS,
3642
2549
  useValue: pdfParameters
3643
2550
  },
3644
- {
3645
- provide: HANDLEBARS_PARAMETERS,
3646
- useValue: pdfParameters.hbsOptions ?? {}
3647
- },
3648
2551
  HandlebarsService,
3649
2552
  MjmlService,
3650
2553
  PugService,
@@ -3655,7 +2558,7 @@ let PuppeteerModule = _PuppeteerModule = class PuppeteerModule {
3655
2558
  ];
3656
2559
  return {
3657
2560
  module: _PuppeteerModule,
3658
- imports: [import_config.ConfigModule.forRoot()],
2561
+ imports: [ConfigModule.forRoot()],
3659
2562
  providers,
3660
2563
  exports: [
3661
2564
  PuppeteerService,
@@ -3674,17 +2577,11 @@ let PuppeteerModule = _PuppeteerModule = class PuppeteerModule {
3674
2577
  inject: options.inject ?? [],
3675
2578
  useFactory: async (...args) => options.useFactory(...args)
3676
2579
  };
3677
- const hbsParamsProvider = {
3678
- provide: HANDLEBARS_PARAMETERS,
3679
- inject: [PDF_PARAMETERS],
3680
- useFactory: (params) => params.hbsOptions ?? {}
3681
- };
3682
2580
  return {
3683
2581
  module: _PuppeteerModule,
3684
- imports: [...options.imports ?? [], import_config.ConfigModule.forRoot()],
2582
+ imports: [...options.imports ?? [], ConfigModule.forRoot()],
3685
2583
  providers: [
3686
2584
  pdfParamsProvider,
3687
- hbsParamsProvider,
3688
2585
  PuppeteerService,
3689
2586
  BrowserService,
3690
2587
  HandlebarsService,
@@ -3707,7 +2604,7 @@ let PuppeteerModule = _PuppeteerModule = class PuppeteerModule {
3707
2604
  };
3708
2605
  }
3709
2606
  };
3710
- PuppeteerModule = _PuppeteerModule = __decorate([
2607
+ PuppeteerModule = _PuppeteerModule = __decorate$3([
3711
2608
  Module({
3712
2609
  providers: [
3713
2610
  PuppeteerService,
@@ -3753,8 +2650,8 @@ let NestjsPdfModule = _NestjsPdfModule = class NestjsPdfModule {
3753
2650
  };
3754
2651
  }
3755
2652
  };
3756
- NestjsPdfModule = _NestjsPdfModule = __decorate([Module({})], NestjsPdfModule);
2653
+ NestjsPdfModule = _NestjsPdfModule = __decorate$3([Module({})], NestjsPdfModule);
3757
2654
  //#endregion
3758
- export { EjsService, EtaService, MjmlService, MustacheService, NestjsPdfModule, NestjsPdfService, NunjucksService, PugService, PuppeteerModule, PuppeteerService, getRelativePathToValue };
2655
+ export { EjsService, EtaService, HandlebarsService, MjmlService, MustacheService, NestjsPdfModule, NestjsPdfService, NunjucksService, PugService, PuppeteerModule, PuppeteerService, getRelativePathToValue };
3759
2656
 
3760
2657
  //# sourceMappingURL=index.mjs.map