@cedarjs/mailer-renderer-mjml-react 6.0.0-canary.2750 → 6.0.0-canary.2758
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 +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -41
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
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;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"}
|
package/dist/index.js
CHANGED
|
@@ -1,42 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 index_exports = {};
|
|
30
|
-
__export(index_exports, {
|
|
31
|
-
MJMLReactRenderer: () => MJMLReactRenderer
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(index_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 {
|
|
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 {
|
|
38
5
|
render(template, options, _utilities) {
|
|
39
|
-
const renderingResult = (
|
|
6
|
+
const renderingResult = 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
|
-
|
|
51
|
-
0 && (module.exports = {
|
|
17
|
+
export {
|
|
52
18
|
MJMLReactRenderer
|
|
53
|
-
}
|
|
19
|
+
};
|
package/package.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/mailer-renderer-mjml-react",
|
|
3
|
-
"version": "6.0.0-canary.
|
|
3
|
+
"version": "6.0.0-canary.2758",
|
|
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": "
|
|
10
|
+
"type": "module",
|
|
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",
|
|
18
18
|
"build:pack": "yarn pack -o cedarjs-mailer-renderer-mjml-react.tgz",
|
|
19
|
-
"build:types": "tsc --build --verbose",
|
|
19
|
+
"build:types": "tsc --build --verbose ./tsconfig.build.json",
|
|
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": "6.0.0-canary.
|
|
24
|
+
"@cedarjs/mailer-core": "6.0.0-canary.2758",
|
|
25
25
|
"@faire/mjml-react": "3.5.4",
|
|
26
26
|
"mjml": "4.18.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@cedarjs/framework-tools": "6.0.0-canary.
|
|
29
|
+
"@cedarjs/framework-tools": "6.0.0-canary.2758",
|
|
30
30
|
"@types/mjml": "4",
|
|
31
31
|
"typescript": "5.9.3"
|
|
32
32
|
},
|