@pdfme/generator
Advanced tools
Comparing version 1.0.18 to 1.1.0
{ | ||
"name": "@pdfme/generator", | ||
"version": "1.0.18", | ||
"version": "1.1.0", | ||
"sideEffects": false, | ||
"author": "hand-dot", | ||
@@ -23,5 +24,11 @@ "license": "MIT", | ||
}, | ||
"main": "dist/index.js", | ||
"module": "dist/index.js", | ||
"types": "dist/types/index.d.ts", | ||
"main": "dist/cjs/src/index.js", | ||
"module": "dist/esm/src/index.js", | ||
"types": "dist/types/src/index.d.ts", | ||
"exports": { | ||
".": { | ||
"import": "./dist/esm/src/index.js", | ||
"require": "./dist/cjs/src/index.js" | ||
} | ||
}, | ||
"engines": { | ||
@@ -31,4 +38,6 @@ "node": ">=14" | ||
"scripts": { | ||
"develop": "webpack --watch --mode development", | ||
"build": "NODE_ENV=production webpack --mode production", | ||
"develop": "tsc -w", | ||
"build": "npm run build:cjs && npm run build:esm", | ||
"build:cjs": "tsc -p tsconfig.cjs.json", | ||
"build:esm": "tsc -p tsconfig.esm.json", | ||
"clean": "rimraf dist", | ||
@@ -45,3 +54,3 @@ "lint": "tsc --noEmit", | ||
"atob": "^2.1.2", | ||
"bwip-js": "^2.1.3", | ||
"bwip-js": "^3.2.2", | ||
"pdf-lib": "^1.17.1" | ||
@@ -53,3 +62,2 @@ }, | ||
"jsqr": "^1.4.0", | ||
"node-polyfill-webpack-plugin": "^1.1.4", | ||
"pdf2json": "^2.0.0", | ||
@@ -59,5 +67,3 @@ "pngjs": "^6.0.0" | ||
"jest": { | ||
"moduleNameMapper": { | ||
"\\.(ttf)$": "<rootDir>/../../fontTransformer.js" | ||
}, | ||
"resolver": "ts-jest-resolver", | ||
"moduleFileExtensions": [ | ||
@@ -72,3 +78,3 @@ "js", | ||
"ts-jest": { | ||
"tsconfig": "tsconfig.json" | ||
"tsconfig": "tsconfig.esm.json" | ||
} | ||
@@ -75,0 +81,0 @@ }, |
@@ -11,4 +11,4 @@ import { PDFDocument } from 'pdf-lib'; | ||
InputImageCache, | ||
} from './helper'; | ||
import { TOOL_NAME } from './constants'; | ||
} from './helper.js'; | ||
import { TOOL_NAME } from './constants.js'; | ||
@@ -15,0 +15,0 @@ const preprocessing = async (arg: { |
@@ -12,5 +12,3 @@ import { | ||
} from 'pdf-lib'; | ||
import { ToBufferOptions } from 'bwip-js'; | ||
import bwipjsNode from 'bwip-js/dist/node-bwipjs'; | ||
import bwipjsBrowser from 'bwip-js/dist/bwip-js'; | ||
import bwipjs, { ToBufferOptions } from 'bwip-js'; | ||
import { | ||
@@ -64,7 +62,7 @@ getB64BasePdf, | ||
const canvas = document.createElement('canvas'); | ||
bwipjsBrowser.toCanvas(canvas, bwipjsArg); | ||
bwipjs.toCanvas(canvas, bwipjsArg); | ||
const dataUrl = canvas.toDataURL('image/png'); | ||
res = b64toUint8Array(dataUrl).buffer as Buffer; | ||
} else { | ||
res = await bwipjsNode.toBuffer(bwipjsArg); | ||
res = await bwipjs.toBuffer(bwipjsArg); | ||
} | ||
@@ -71,0 +69,0 @@ |
@@ -1,2 +0,2 @@ | ||
import generate from './generate'; | ||
import generate from './generate.js'; | ||
@@ -3,0 +3,0 @@ export { generate }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
5
44
0
100
222278
3928
2
1
+ Addedbwip-js@3.4.5(transitive)
- Removedbwip-js@2.1.3(transitive)
Updatedbwip-js@^3.2.2