Socket
Socket
Sign inDemoInstall

@muil/templates-renderer

Package Overview
Dependencies
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@muil/templates-renderer - npm Package Compare versions

Comparing version 2.0.0 to 2.1.1

12

package.json
{
"name": "@muil/templates-renderer",
"version": "2.0.0",
"version": "2.1.1",
"license": "MIT",

@@ -22,7 +22,4 @@ "main": "src/index.js",

"puppeteer-core": "^22.6.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"reflect-metadata": "^0.1.13",
"rxjs": "^6.5.4",
"styled-components": "^6.1.11",
"uuid": "^8.3.1"

@@ -35,3 +32,8 @@ },

},
"gitHead": "eaccfeb02fc6c121d295ee9533b0315be0f1aa45"
"peerDependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1",
"styled-components": "^6.1.11"
},
"gitHead": "a1523c47bd2f7435d6f88bf25479d4cb001c76ef"
}

@@ -1,4 +0,3 @@

/// <reference types="node" />
import * as puppeteer from 'puppeteer-core';
export declare const generatePdf: (html: string, format?: puppeteer.PaperFormat, orientation?: 'portrait' | 'landscape') => Promise<Buffer>;
export declare const generatePng: (html: string) => Promise<Buffer>;

@@ -1,4 +0,3 @@

/// <reference types="node" />
import { RenderOptions } from './types';
declare const renderTemplate: ({ type, templatePath, templateCssPath, props, styleCollectors, shadowSupport, inlineCss, minifyHtml, pdfFormat, pdfOrientation, }: RenderOptions) => Promise<string | Buffer | void>;
export default renderTemplate;

@@ -31,2 +31,3 @@ "use strict";

const fs = __importStar(require("fs"));
const path = __importStar(require("path"));
const he_1 = __importDefault(require("he"));

@@ -45,3 +46,3 @@ const html_minifier_1 = require("html-minifier");

await fs.promises.copyFile(templatePath, tempFileName);
const ReactComponent = await (_a = tempFileName, Promise.resolve().then(() => __importStar(require(_a))));
const ReactComponent = await (_a = path.join(process.cwd(), tempFileName), Promise.resolve().then(() => __importStar(require(_a))));
const ReactElement = (0, react_1.createElement)(ReactComponent.default, props);

@@ -48,0 +49,0 @@ await fs.promises.unlink(tempFileName);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc