@cedarjs/mailer-renderer-react-email 5.0.7-next.338 → 5.0.7

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.d.ts CHANGED
@@ -4,7 +4,7 @@ import { AbstractMailRenderer } from '@cedarjs/mailer-core';
4
4
  export type SupportedOutputFormats = 'both' | 'html' | 'text';
5
5
  export type RendererOptions = MailRendererOptions<SupportedOutputFormats> & Parameters<typeof reactEmailRender>[1];
6
6
  export declare class ReactEmailRenderer extends AbstractMailRenderer {
7
- render(template: Parameters<typeof reactEmailRender>[0], options: RendererOptions, _utilities?: MailUtilities): Promise<MailRenderedContent>;
7
+ render(template: Parameters<typeof reactEmailRender>[0], options: RendererOptions, _utilities?: MailUtilities): MailRenderedContent;
8
8
  internal(): Record<string, unknown>;
9
9
  }
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEhE,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACpB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;AAC7D,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC,sBAAsB,CAAC,GACvE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA;AAExC,qBAAa,kBAAmB,SAAQ,oBAAoB;IACpD,MAAM,CACV,QAAQ,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAChD,OAAO,EAAE,eAAe,EACxB,UAAU,CAAC,EAAE,aAAa,GACzB,OAAO,CAAC,mBAAmB,CAAC;IA2B/B,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAGpC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEhE,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACpB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;AAC7D,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC,sBAAsB,CAAC,GACvE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA;AAExC,qBAAa,kBAAmB,SAAQ,oBAAoB;IAC1D,MAAM,CACJ,QAAQ,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAChD,OAAO,EAAE,eAAe,EACxB,UAAU,CAAC,EAAE,aAAa,GACzB,mBAAmB;IAuBtB,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAGpC"}
package/dist/index.js CHANGED
@@ -1,20 +1,43 @@
1
- import { render as reactEmailRender } from "@react-email/render";
2
- import { AbstractMailRenderer } from "@cedarjs/mailer-core";
3
- class ReactEmailRenderer extends AbstractMailRenderer {
4
- async render(template, options, _utilities) {
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var index_exports = {};
20
+ __export(index_exports, {
21
+ ReactEmailRenderer: () => ReactEmailRenderer
22
+ });
23
+ module.exports = __toCommonJS(index_exports);
24
+ var import_render = require("@react-email/render");
25
+ var import_mailer_core = require("@cedarjs/mailer-core");
26
+ class ReactEmailRenderer extends import_mailer_core.AbstractMailRenderer {
27
+ render(template, options, _utilities) {
5
28
  const outputFormat = options.outputFormat ?? "both";
6
29
  const renderHTML = outputFormat === "both" || outputFormat === "html";
7
30
  const renderText = outputFormat === "both" || outputFormat === "text";
8
31
  return {
9
- html: renderHTML ? await reactEmailRender(template, {
32
+ html: renderHTML ? (0, import_render.render)(template, {
10
33
  pretty: true,
11
- ...options,
12
- plainText: false
34
+ plainText: false,
35
+ ...options
13
36
  }) : "",
14
- text: renderText ? await reactEmailRender(template, {
37
+ text: renderText ? (0, import_render.render)(template, {
15
38
  pretty: true,
16
- ...options,
17
- plainText: true
39
+ plainText: true,
40
+ ...options
18
41
  }) : ""
19
42
  };
20
43
  }
@@ -23,6 +46,7 @@ class ReactEmailRenderer extends AbstractMailRenderer {
23
46
  return {};
24
47
  }
25
48
  }
26
- export {
49
+ // Annotate the CommonJS export names for ESM import in node:
50
+ 0 && (module.exports = {
27
51
  ReactEmailRenderer
28
- };
52
+ });
package/package.json CHANGED
@@ -1,39 +1,33 @@
1
1
  {
2
2
  "name": "@cedarjs/mailer-renderer-react-email",
3
- "version": "5.0.7-next.338",
3
+ "version": "5.0.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
7
7
  "directory": "packages/mailer/renderers/react-email"
8
8
  },
9
9
  "license": "MIT",
10
- "type": "module",
10
+ "type": "commonjs",
11
11
  "main": "./dist/index.js",
12
12
  "types": "./dist/index.d.ts",
13
13
  "files": [
14
14
  "dist"
15
15
  ],
16
16
  "scripts": {
17
- "build": "node ./build.mts",
17
+ "build": "node ./build.mts && yarn build:types",
18
18
  "build:pack": "yarn pack -o cedarjs-mailer-renderer-react-email.tgz",
19
- "build:types": "tsc --build --verbose ./tsconfig.build.json",
19
+ "build:types": "tsc --build --verbose",
20
20
  "build:watch": "nodemon --watch src --ext \"js,jsx,ts,tsx\" --ignore dist --exec \"yarn build\"",
21
21
  "prepublishOnly": "NODE_ENV=production yarn build"
22
22
  },
23
23
  "dependencies": {
24
- "@cedarjs/mailer-core": "5.0.7-next.338",
25
- "@react-email/render": "2.1.0"
24
+ "@cedarjs/mailer-core": "5.0.7",
25
+ "@react-email/render": "0.0.17"
26
26
  },
27
27
  "devDependencies": {
28
- "@cedarjs/framework-tools": "5.0.7-next.338",
29
- "react": "18.3.1",
30
- "react-dom": "18.3.1",
28
+ "@cedarjs/framework-tools": "5.0.7",
31
29
  "typescript": "5.9.3"
32
30
  },
33
- "peerDependencies": {
34
- "react": "18.3.1",
35
- "react-dom": "18.3.1"
36
- },
37
31
  "publishConfig": {
38
32
  "access": "public"
39
33
  },