Skip to content

Commit

Permalink
Merge 7749d8d into 13b071e
Browse files Browse the repository at this point in the history
  • Loading branch information
vbuch committed Mar 15, 2024
2 parents 13b071e + 7749d8d commit b81129d
Show file tree
Hide file tree
Showing 17 changed files with 246 additions and 67 deletions.
14 changes: 11 additions & 3 deletions packages/placeholder-pdf-lib/dist/pdflibAddPlaceholder.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
export function pdflibAddPlaceholder({ pdfDoc, pdfPage, reason, contactInfo, name, location, signingTime, signatureLength, byteRangePlaceholder, subFilter, widgetRect, appName, }: InputType): void;
export type PDFDocument = import('pdf-lib').PDFDocument;
export type InputType = {
pdfDoc: PDFDocument;
pdfPage: PDFPage;
export type PDFPage = import('pdf-lib').PDFPage;
export type CommonInputType = {
pdfDoc?: PDFDocument;
pdfPage?: PDFPage;
reason: string;
contactInfo: string;
name: string;
Expand All @@ -23,4 +24,11 @@ export type InputType = {
*/
appName?: string;
};
export type DocInputType = {
pdfDoc: PDFDocument;
};
export type PageInputType = {
pdfPage: PDFPage;
};
export type InputType = CommonInputType & (DocInputType | PageInputType);
//# sourceMappingURL=pdflibAddPlaceholder.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 29 additions & 11 deletions packages/placeholder-pdf-lib/dist/pdflibAddPlaceholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,37 @@ var _pdfLib = require("pdf-lib");
*/

/**
* @typedef {object} InputType
* @typedef {import('pdf-lib').PDFPage} PDFPage
*/

/**
* @typedef {object} CommonInputType
* @property {PDFDocument} [pdfDoc]
* @property {PDFPage} [pdfPage]
* @property {string} reason
* @property {string} contactInfo
* @property {string} name
* @property {string} location
* @property {Date} [signingTime]
* @property {number} [signatureLength]
* @property {string} [byteRangePlaceholder]
* @property {string} [subFilter] One of SUBFILTER_* from \@signpdf/utils
* @property {number[]} [widgetRect] [x1, y1, x2, y2] widget rectangle
* @property {string} [appName] Name of the application generating the signature
*/

/**
* @typedef {object} DocInputType
* @property {PDFDocument} pdfDoc
*/

/**
* @typedef {object} PageInputType
* @property {PDFPage} pdfPage
* @property {string} reason
* @property {string} contactInfo
* @property {string} name
* @property {string} location
* @property {Date} [signingTime]
* @property {number} [signatureLength]
* @property {string} [byteRangePlaceholder]
* @property {string} [subFilter] One of SUBFILTER_* from \@signpdf/utils
* @property {number[]} [widgetRect] [x1, y1, x2, y2] widget rectangle
* @property {string} [appName] Name of the application generating the signature
*/

/**
* @typedef {CommonInputType & (DocInputType | PageInputType)} InputType
*/

/**
Expand Down
1 change: 1 addition & 0 deletions packages/placeholder-pdf-lib/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './dist/pdflibAddPlaceholder'
19 changes: 13 additions & 6 deletions packages/placeholder-pdf-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"digital signature"
],
"funding": [
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
],
"main": "dist/pdflibAddPlaceholder.js",
"types": "dist/pdflibAddPlaceholder.d.ts",
Expand All @@ -40,8 +40,14 @@
},
"scripts": {
"test": "jest",
"build": "rm -rf ./dist/* & babel ./src -d ./dist --ignore \"**/*.test.js\" & tsc",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./"
"build": "yarn build:clean && yarn build:compile && yarn build:types",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./",

"build:clean": "rm -rf ./dist/*",
"build:compile": "babel ./src -d ./dist --ignore \"**/*.test.js\"",
"build:types": "yarn build:types:compile && yarn build:types:verify",
"build:types:compile": "tsc",
"build:types:verify": "tsd --files=index.test-d.ts"
},
"dependencies": {
"@signpdf/utils": "^3.2.3"
Expand Down Expand Up @@ -73,6 +79,7 @@
"jest": "^27.3.1",
"node-forge": "^1.2.1",
"pdf-lib": "^1.17.1",
"tsd": "^0.30.7",
"typescript": "^5.2.2"
},
"gitHead": "56f621c5b6b240f363927cdab47ec8e0bb9fa180"
Expand Down
40 changes: 29 additions & 11 deletions packages/placeholder-pdf-lib/src/pdflibAddPlaceholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,37 @@ import {
*/

/**
* @typedef {object} InputType
* @typedef {import('pdf-lib').PDFPage} PDFPage
*/

/**
* @typedef {object} CommonInputType
* @property {PDFDocument} [pdfDoc]
* @property {PDFPage} [pdfPage]
* @property {string} reason
* @property {string} contactInfo
* @property {string} name
* @property {string} location
* @property {Date} [signingTime]
* @property {number} [signatureLength]
* @property {string} [byteRangePlaceholder]
* @property {string} [subFilter] One of SUBFILTER_* from \@signpdf/utils
* @property {number[]} [widgetRect] [x1, y1, x2, y2] widget rectangle
* @property {string} [appName] Name of the application generating the signature
*/

/**
* @typedef {object} DocInputType
* @property {PDFDocument} pdfDoc
*/

/**
* @typedef {object} PageInputType
* @property {PDFPage} pdfPage
* @property {string} reason
* @property {string} contactInfo
* @property {string} name
* @property {string} location
* @property {Date} [signingTime]
* @property {number} [signatureLength]
* @property {string} [byteRangePlaceholder]
* @property {string} [subFilter] One of SUBFILTER_* from \@signpdf/utils
* @property {number[]} [widgetRect] [x1, y1, x2, y2] widget rectangle
* @property {string} [appName] Name of the application generating the signature
*/

/**
* @typedef {CommonInputType & (DocInputType | PageInputType)} InputType
*/

/**
Expand Down
1 change: 1 addition & 0 deletions packages/placeholder-pdfkit/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './dist'
19 changes: 13 additions & 6 deletions packages/placeholder-pdfkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"digital signature"
],
"funding": [
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -40,8 +40,14 @@
},
"scripts": {
"test": "jest",
"build": "rm -rf ./dist/* & babel ./src -d ./dist --ignore \"**/*.test.js\" & tsc",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./"
"build": "yarn build:clean && yarn build:compile && yarn build:types",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./",

"build:clean": "rm -rf ./dist/*",
"build:compile": "babel ./src -d ./dist --ignore \"**/*.test.js\"",
"build:types": "yarn build:types:compile && yarn build:types:verify",
"build:types:compile": "tsc",
"build:types:verify": "tsd --files=index.test-d.ts"
},
"dependencies": {
"@signpdf/utils": "^3.2.3"
Expand Down Expand Up @@ -73,6 +79,7 @@
"jest": "^27.3.1",
"node-forge": "^1.2.1",
"pdfkit": "^0.11.0",
"tsd": "^0.30.7",
"typescript": "^5.2.2"
}
}
1 change: 1 addition & 0 deletions packages/placeholder-pdfkit010/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './dist'
19 changes: 13 additions & 6 deletions packages/placeholder-pdfkit010/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"digital signature"
],
"funding": [
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -40,8 +40,14 @@
},
"scripts": {
"test": "jest",
"build": "rm -rf ./dist/* & babel ./src -d ./dist --ignore \"**/*.test.js\" & tsc",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./"
"build": "yarn build:clean && yarn build:compile && yarn build:types",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./",

"build:clean": "rm -rf ./dist/*",
"build:compile": "babel ./src -d ./dist --ignore \"**/*.test.js\"",
"build:types": "yarn build:types:compile && yarn build:types:verify",
"build:types:compile": "tsc",
"build:types:verify": "tsd --files=index.test-d.ts"
},
"dependencies": {
"@signpdf/utils": "^3.2.3"
Expand Down Expand Up @@ -73,6 +79,7 @@
"jest": "^27.3.1",
"node-forge": "^1.2.1",
"pdfkit": "~0.10.0",
"tsd": "^0.30.7",
"typescript": "^5.2.2"
},
"gitHead": "5d5ec00c21e072613acb9776c7c6ac7697314955"
Expand Down
1 change: 1 addition & 0 deletions packages/placeholder-plain/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './dist/plainAddPlaceholder'
20 changes: 14 additions & 6 deletions packages/placeholder-plain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
"digital signature"
],
"funding": [
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
],
"main": "dist/plainAddPlaceholder.js",
"types": "dist/plainAddPlaceholder.d.ts",
"files": [
"dist",
"LICENSE",
Expand All @@ -38,8 +39,14 @@
},
"scripts": {
"test": "./node_modules/.bin/jest",
"build": "rm -rf ./dist/* & ./node_modules/.bin/babel ./src -d ./dist --ignore \"**/*.test.js\" & tsc",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./"
"build": "yarn build:clean && yarn build:compile && yarn build:types",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./",

"build:clean": "rm -rf ./dist/*",
"build:compile": "babel ./src -d ./dist --ignore \"**/*.test.js\"",
"build:types": "yarn build:types:compile && yarn build:types:verify",
"build:types:compile": "tsc",
"build:types:verify": "tsd --files=index.test-d.ts"
},
"dependencies": {
"@signpdf/placeholder-pdfkit010": "^3.2.3",
Expand Down Expand Up @@ -68,6 +75,7 @@
"jest": "^27.3.1",
"node-forge": "^1.2.1",
"pdfkit": "~0.10.0",
"tsd": "^0.30.7",
"typescript": "^5.2.2"
},
"gitHead": "5d5ec00c21e072613acb9776c7c6ac7697314955"
Expand Down
1 change: 1 addition & 0 deletions packages/signer-p12/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './dist/P12Signer'
19 changes: 13 additions & 6 deletions packages/signer-p12/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"digital signature"
],
"funding": [
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
],
"main": "dist/P12Signer.js",
"types": "dist/P12Signer.d.ts",
Expand All @@ -41,8 +41,14 @@
},
"scripts": {
"test": "jest",
"build": "rm -rf ./dist/* & babel ./src -d ./dist --ignore \"**/*.test.js\" & tsc",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./"
"build": "yarn build:clean && yarn build:compile && yarn build:types",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./",

"build:clean": "rm -rf ./dist/*",
"build:compile": "babel ./src -d ./dist --ignore \"**/*.test.js\"",
"build:types": "yarn build:types:compile && yarn build:types:verify",
"build:types:compile": "tsc",
"build:types:verify": "tsd --files=index.test-d.ts"
},
"dependencies": {
"@signpdf/utils": "^3.2.3"
Expand Down Expand Up @@ -74,6 +80,7 @@
"jest": "^27.3.1",
"node-forge": "^1.2.1",
"pdfkit": "~0.10.0",
"tsd": "^0.30.7",
"typescript": "^5.2.2"
},
"gitHead": "5d5ec00c21e072613acb9776c7c6ac7697314955"
Expand Down
1 change: 1 addition & 0 deletions packages/signpdf/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './dist/signpdf'
20 changes: 14 additions & 6 deletions packages/signpdf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
"digital signature"
],
"funding": [
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
{
"type": "individual",
"url": "https://buymeacoffee.com/vbuch?utm_source=npm-funding-signpdf"
}
],
"main": "dist/signpdf.js",
"types": "dist/signpdf.d.ts",
"files": [
"dist",
"LICENSE",
Expand All @@ -38,8 +39,14 @@
},
"scripts": {
"test": "./node_modules/.bin/jest",
"build": "rm -rf ./dist/* & ./node_modules/.bin/babel ./src -d ./dist --ignore \"**/*.test.js\" & tsc",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./"
"build": "yarn build:clean && yarn build:compile && yarn build:types",
"lint": "eslint -c .eslintrc --ignore-path ../../.eslintignore ./",

"build:clean": "rm -rf ./dist/*",
"build:compile": "babel ./src -d ./dist --ignore \"**/*.test.js\"",
"build:types": "yarn build:types:compile && yarn build:types:verify",
"build:types:compile": "tsc",
"build:types:verify": "tsd --files=index.test-d.ts"
},
"dependencies": {
"@signpdf/utils": "^3.2.3"
Expand Down Expand Up @@ -71,6 +78,7 @@
"jest": "^27.3.1",
"node-forge": "^1.2.1",
"pdfkit": "~0.10.0",
"tsd": "^0.30.7",
"typescript": "^5.2.2"
},
"gitHead": "5d5ec00c21e072613acb9776c7c6ac7697314955"
Expand Down
Loading

0 comments on commit b81129d

Please sign in to comment.