@cedarjs/mailer-renderer-mjml-react 9.0.0-canary.1784 → 9.0.0-canary.3124

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
@@ -1,11 +1,11 @@
1
- import { renderToMjml } from '@faire/mjml-react/utils/renderToMjml';
1
+ import { renderToMjml } from '@faire/mjml-react/utils/renderToMjml.js';
2
2
  import mjml2html from 'mjml';
3
3
  import type { MailRenderedContent, MailUtilities, MailRendererOptions } from '@cedarjs/mailer-core';
4
4
  import { AbstractMailRenderer } from '@cedarjs/mailer-core';
5
5
  export type SupportedOutputFormats = 'html';
6
6
  export type RendererOptions = MailRendererOptions<SupportedOutputFormats> & Parameters<typeof mjml2html>[1];
7
7
  export declare class MJMLReactRenderer extends AbstractMailRenderer {
8
- render(template: Parameters<typeof renderToMjml>[0], options: RendererOptions, _utilities?: MailUtilities): MailRenderedContent;
8
+ render(template: Parameters<typeof renderToMjml>[0], options: RendererOptions, _utilities?: MailUtilities): Promise<MailRenderedContent>;
9
9
  internal(): Record<string, unknown>;
10
10
  }
11
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAA;AACnE,OAAO,SAAS,MAAM,MAAM,CAAA;AAE5B,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,CAAA;AAC3C,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC,sBAAsB,CAAC,GACvE,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;AAEjC,qBAAa,iBAAkB,SAAQ,oBAAoB;IACzD,MAAM,CACJ,QAAQ,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,EAC5C,OAAO,EAAE,eAAe,EACxB,UAAU,CAAC,EAAE,aAAa,GACzB,mBAAmB;IAStB,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,YAAY,EAAE,MAAM,yCAAyC,CAAA;AACtE,OAAO,SAAS,MAAM,MAAM,CAAA;AAE5B,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,CAAA;AAC3C,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC,sBAAsB,CAAC,GACvE,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;AAEjC,qBAAa,iBAAkB,SAAQ,oBAAoB;IACnD,MAAM,CACV,QAAQ,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,EAC5C,OAAO,EAAE,eAAe,EACxB,UAAU,CAAC,EAAE,aAAa,GACzB,OAAO,CAAC,mBAAmB,CAAC;IAS/B,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAGpC"}
package/dist/index.js CHANGED
@@ -1,42 +1,9 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var src_exports = {};
30
- __export(src_exports, {
31
- MJMLReactRenderer: () => MJMLReactRenderer
32
- });
33
- module.exports = __toCommonJS(src_exports);
34
- var import_renderToMjml = require("@faire/mjml-react/utils/renderToMjml");
35
- var import_mjml = __toESM(require("mjml"));
36
- var import_mailer_core = require("@cedarjs/mailer-core");
37
- class MJMLReactRenderer extends import_mailer_core.AbstractMailRenderer {
38
- render(template, options, _utilities) {
39
- const renderingResult = (0, import_mjml.default)((0, import_renderToMjml.renderToMjml)(template), options);
1
+ import { renderToMjml } from "@faire/mjml-react/utils/renderToMjml.js";
2
+ import mjml2html from "mjml";
3
+ import { AbstractMailRenderer } from "@cedarjs/mailer-core";
4
+ class MJMLReactRenderer extends AbstractMailRenderer {
5
+ async render(template, options, _utilities) {
6
+ const renderingResult = await mjml2html(renderToMjml(template), options);
40
7
  if (renderingResult.errors.length > 0) {
41
8
  throw new Error(renderingResult.errors.join("\n"));
42
9
  }
@@ -47,7 +14,6 @@ class MJMLReactRenderer extends import_mailer_core.AbstractMailRenderer {
47
14
  return {};
48
15
  }
49
16
  }
50
- // Annotate the CommonJS export names for ESM import in node:
51
- 0 && (module.exports = {
17
+ export {
52
18
  MJMLReactRenderer
53
- });
19
+ };
package/package.json CHANGED
@@ -1,37 +1,37 @@
1
1
  {
2
2
  "name": "@cedarjs/mailer-renderer-mjml-react",
3
- "version": "9.0.0-canary.1784+baa47810a",
3
+ "version": "9.0.0-canary.3124",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
7
7
  "directory": "packages/mailer/renderers/mjml-react"
8
8
  },
9
9
  "license": "MIT",
10
+ "type": "module",
10
11
  "main": "./dist/index.js",
11
12
  "types": "./dist/index.d.ts",
12
13
  "files": [
13
14
  "dist"
14
15
  ],
15
16
  "scripts": {
16
- "build": "tsx ./build.mts && yarn build:types",
17
+ "build": "node ./build.mts",
17
18
  "build:pack": "yarn pack -o cedarjs-mailer-renderer-mjml-react.tgz",
18
- "build:types": "tsc --build --verbose",
19
+ "build:types": "tsc --build --verbose ./tsconfig.build.json",
19
20
  "build:watch": "nodemon --watch src --ext \"js,jsx,ts,tsx\" --ignore dist --exec \"yarn build\"",
20
21
  "prepublishOnly": "NODE_ENV=production yarn build"
21
22
  },
22
23
  "dependencies": {
23
- "@cedarjs/mailer-core": "9.0.0-canary.1784",
24
- "@faire/mjml-react": "3.5.3",
25
- "mjml": "4.18.0"
24
+ "@cedarjs/mailer-core": "9.0.0-canary.3124",
25
+ "@faire/mjml-react": "4.0.1",
26
+ "mjml": "5.4.0"
26
27
  },
27
28
  "devDependencies": {
28
- "@cedarjs/framework-tools": "9.0.0-canary.1784",
29
- "@types/mjml": "4",
30
- "tsx": "4.21.0",
29
+ "@cedarjs/framework-tools": "9.0.0-canary.3124",
30
+ "@types/mjml": "5",
31
31
  "typescript": "5.9.3"
32
32
  },
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
- "gitHead": "baa47810a7defb73de27fdf513b815d679509b5e"
36
+ "gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
37
37
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Cedar
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.