@shad0wz7/nestjs-pdf 2.5.1 → 2.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -39,6 +39,7 @@ mjml = __toESM(mjml);
39
39
  let mustache = require("mustache");
40
40
  mustache = __toESM(mustache);
41
41
  let nunjucks = require("nunjucks");
42
+ nunjucks = __toESM(nunjucks);
42
43
  let pug = require("pug");
43
44
  //#region src/helpers/getRelativePath.helper.ts
44
45
  /**
@@ -662,7 +663,7 @@ MustacheService = __decorate([(0, _nestjs_common.Injectable)()], MustacheService
662
663
  //#region src/puppeteer/engines/nunjucks/nunjucks.service.ts
663
664
  let NunjucksService = class NunjucksService {
664
665
  constructor() {
665
- (0, nunjucks.configure)({
666
+ nunjucks.default.configure({
666
667
  noCache: true,
667
668
  trimBlocks: true,
668
669
  lstripBlocks: true
@@ -678,9 +679,9 @@ let NunjucksService = class NunjucksService {
678
679
  trimBlocks: options.trimBlocks ?? true,
679
680
  lstripBlocks: options.lstripBlocks ?? true
680
681
  };
681
- (0, nunjucks.configure)(configOptions);
682
+ nunjucks.default.configure(configOptions);
682
683
  }
683
- return (0, nunjucks.renderString)(template, data);
684
+ return nunjucks.default.renderString(template, data);
684
685
  } catch (error) {
685
686
  throw new Error(`Nunjucks rendering failed: ${String(error)}`, { cause: error });
686
687
  }
@@ -695,9 +696,9 @@ let NunjucksService = class NunjucksService {
695
696
  trimBlocks: options.trimBlocks ?? true,
696
697
  lstripBlocks: options.lstripBlocks ?? true
697
698
  };
698
- (0, nunjucks.configure)(configOptions);
699
+ nunjucks.default.configure(configOptions);
699
700
  }
700
- return (0, nunjucks.render)(filePath, data);
701
+ return nunjucks.default.render(filePath, data);
701
702
  } catch (error) {
702
703
  throw new Error(`Nunjucks file rendering failed: ${String(error)}`, { cause: error });
703
704
  }
package/dist/index.mjs CHANGED
@@ -12,7 +12,7 @@ import { render, renderFile } from "ejs";
12
12
  import { Eta } from "eta";
13
13
  import mjml from "mjml";
14
14
  import mustache from "mustache";
15
- import { configure, render as render$1, renderString } from "nunjucks";
15
+ import nunjucks from "nunjucks";
16
16
  import { compile } from "pug";
17
17
  //#region \0rolldown/runtime.js
18
18
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
@@ -640,7 +640,7 @@ MustacheService = __decorate([Injectable()], MustacheService);
640
640
  //#region src/puppeteer/engines/nunjucks/nunjucks.service.ts
641
641
  let NunjucksService = class NunjucksService {
642
642
  constructor() {
643
- configure({
643
+ nunjucks.configure({
644
644
  noCache: true,
645
645
  trimBlocks: true,
646
646
  lstripBlocks: true
@@ -656,9 +656,9 @@ let NunjucksService = class NunjucksService {
656
656
  trimBlocks: options.trimBlocks ?? true,
657
657
  lstripBlocks: options.lstripBlocks ?? true
658
658
  };
659
- configure(configOptions);
659
+ nunjucks.configure(configOptions);
660
660
  }
661
- return renderString(template, data);
661
+ return nunjucks.renderString(template, data);
662
662
  } catch (error) {
663
663
  throw new Error(`Nunjucks rendering failed: ${String(error)}`, { cause: error });
664
664
  }
@@ -673,9 +673,9 @@ let NunjucksService = class NunjucksService {
673
673
  trimBlocks: options.trimBlocks ?? true,
674
674
  lstripBlocks: options.lstripBlocks ?? true
675
675
  };
676
- configure(configOptions);
676
+ nunjucks.configure(configOptions);
677
677
  }
678
- return render$1(filePath, data);
678
+ return nunjucks.render(filePath, data);
679
679
  } catch (error) {
680
680
  throw new Error(`Nunjucks file rendering failed: ${String(error)}`, { cause: error });
681
681
  }