New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

idea-html2pdf

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

idea-html2pdf - npm Package Compare versions

Comparing version 2.1.6 to 2.1.7

7

dist/src/html2pdf.d.ts

@@ -0,1 +1,2 @@

/// <reference types="node" />
import * as Handlebars from 'handlebars';

@@ -34,3 +35,3 @@ import { Languages, SignedURL } from 'idea-toolbox';

*/
create(params: HTML2PDFCreateParameters): Promise<Uint8Array>;
create(params: HTML2PDFCreateParameters): Promise<Buffer>;
/**

@@ -41,5 +42,5 @@ * Create a new PDF created by an HTML source.

* @param params the parameters to create the PDF
* @return the PDF data (buffer)
* @return the PDF data (Buffer)
*/
createViaS3Bucket(params: HTML2PDFCreateViaS3BucketParameters): Promise<any>;
createViaS3Bucket(params: HTML2PDFCreateViaS3BucketParameters): Promise<Buffer>;
/**

@@ -46,0 +47,0 @@ * Create the signedURL to a new PDF created by an HTML source.

@@ -129,3 +129,3 @@ "use strict";

const { Payload } = await lambda.send(command);
return Payload;
return Buffer.from(Buffer.from(Payload).toString(), 'base64');
}

@@ -142,3 +142,3 @@ catch (err) {

* @param params the parameters to create the PDF
* @return the PDF data (buffer)
* @return the PDF data (Buffer)
*/

@@ -153,3 +153,3 @@ async createViaS3Bucket(params) {

const { Payload } = await lambda.send(invokeCommand);
const s3params = JSON.parse(Payload.transformToString());
const s3params = JSON.parse(Buffer.from(Payload).toString());
const getObjCommand = new client_s3_1.GetObjectCommand(s3params);

@@ -171,6 +171,8 @@ const { Body } = await s3.send(getObjCommand);

const pdfData = await this.create(params);
console.log(pdfData);
const Bucket = params.s3Bucket;
const Key = params.s3Prefix.concat('/', Date.now().toString().concat(Math.random().toString(36).slice(2)), '.pdf');
const upload = new lib_storage_1.Upload({ client: s3, params: { Bucket, Key, Body: pdfData } });
const upload = new lib_storage_1.Upload({
client: s3,
params: { Bucket, Key, Body: pdfData, ContentType: 'application/pdf' }
});
await upload.done();

@@ -177,0 +179,0 @@ const getCommand = new client_s3_1.GetObjectCommand({ Bucket, Key });

{
"name": "idea-html2pdf",
"version": "2.1.6",
"version": "2.1.7",
"description": "IDEA helper for generating a PDF from HTML contents",

@@ -5,0 +5,0 @@ "engines": {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc