fix(build): modernize package configuration and simplify tests for the current toolchain

This commit is contained in:
2026-05-01 18:57:42 +00:00
parent e58a54f8c6
commit 831cb6734d
13 changed files with 6899 additions and 4679 deletions
+38
View File
@@ -0,0 +1,38 @@
{
"@ship.zone/szci": {
"npmGlobalTools": [],
"npmRegistryUrl": "registry.npmjs.org"
},
"@git.zone/cli": {
"projectType": "npm",
"module": {
"githost": "code.foss.global",
"gitscope": "push.rocks",
"gitrepo": "smartsign",
"shortDescription": "PDF document signing utilities",
"description": "A library for signing PDF documents.",
"npmPackagename": "@push.rocks/smartsign",
"license": "MIT",
"keywords": [
"PDF signing",
"document signing",
"smartpdf",
"signpdf",
"typescript",
"node.js",
"certificate",
"P12 cert"
]
},
"release": {
"registries": [
"https://verdaccio.lossless.digital",
"https://registry.npmjs.org"
],
"accessLevel": "public"
}
},
"@git.zone/tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
}
}
+36
View File
@@ -0,0 +1,36 @@
# Changelog
## 2026-05-01 - 1.0.6 - fix(build)
modernize package configuration and simplify tests for the current toolchain
- add package exports and include project config files in published artifacts
- update build and test tooling dependencies and enable stricter TypeScript compiler settings
- replace certificate-generation test setup with a simple Node-based instantiation test
- refresh npmextra metadata structure and repository issue URL
## 2024-05-29 - 1.0.5 - maintenance
Maintenance-only updates across 1.0.5 with no user-facing changes.
- Refined project description
- Updated TypeScript configuration
- Adjusted npmextra.json githost settings
## 2023-11-25 - 1.0.4 - core
Core update release.
- Applied a core fix/update
## 2023-11-24 - 1.0.3 - core
Core update release.
- Applied a core fix/update
## 2023-11-24 - 1.0.2 - core
Core update release.
- Applied a core fix/update
## 2023-11-24 - 1.0.1 - core
Initial recorded core update.
- Applied a core fix/update
+19
View File
@@ -0,0 +1,19 @@
Copyright (c) 2026 Task Venture Capital GmbH <hello@task.vc>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+15 -8
View File
@@ -1,14 +1,18 @@
{ {
"gitzone": { "@ship.zone/szci": {
"npmGlobalTools": [],
"npmRegistryUrl": "registry.npmjs.org"
},
"@git.zone/cli": {
"projectType": "npm", "projectType": "npm",
"module": { "module": {
"githost": "code.foss.global", "githost": "code.foss.global",
"gitscope": "push.rocks", "gitscope": "push.rocks",
"gitrepo": "smartsign", "gitrepo": "smartsign",
"shortDescription": "PDF document signing utilities",
"description": "A library for signing PDF documents.", "description": "A library for signing PDF documents.",
"npmPackagename": "@push.rocks/smartsign", "npmPackagename": "@push.rocks/smartsign",
"license": "MIT", "license": "MIT",
"projectDomain": "push.rocks",
"keywords": [ "keywords": [
"PDF signing", "PDF signing",
"document signing", "document signing",
@@ -19,13 +23,16 @@
"certificate", "certificate",
"P12 cert" "P12 cert"
] ]
},
"release": {
"registries": [
"https://verdaccio.lossless.digital",
"https://registry.npmjs.org"
],
"accessLevel": "public"
} }
}, },
"npmci": { "@git.zone/tsdoc": {
"npmGlobalTools": [],
"npmAccessLevel": "public"
},
"tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n" "legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
} }
} }
+18 -17
View File
@@ -3,37 +3,36 @@
"version": "1.0.5", "version": "1.0.5",
"private": false, "private": false,
"description": "A library for signing PDF documents.", "description": "A library for signing PDF documents.",
"exports": {
".": "./dist_ts/index.js"
},
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts", "typings": "dist_ts/index.d.ts",
"type": "module", "type": "module",
"author": "Task Venture Capital GmbH", "author": "Task Venture Capital GmbH <hello@task.vc>",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"test": "(tstest test/ --web)", "test": "tstest test/",
"build": "(tsbuild --web --allowimplicitany)", "build": "tsbuild",
"buildDocs": "(tsdoc)" "buildDocs": "tsdoc"
}, },
"devDependencies": { "devDependencies": {
"@git.zone/tsbuild": "^2.1.25", "@git.zone/tsbuild": "^4.4.0",
"@git.zone/tsbundle": "^2.0.5", "@git.zone/tstest": "^3.6.3",
"@git.zone/tsrun": "^1.2.46", "@types/node": "^25.6.0",
"@git.zone/tstest": "^1.0.44", "@types/pngjs": "^6.0.5"
"@push.rocks/tapbundle": "^5.0.15",
"@types/node": "^20.8.7"
}, },
"dependencies": { "dependencies": {
"@push.rocks/smartfile": "^11.0.4", "@push.rocks/smartpdf": "^4.2.2",
"@push.rocks/smartpdf": "^3.0.16", "@signpdf/signer-p12": "^3.3.0",
"@push.rocks/smartshell": "^3.0.3", "@signpdf/signpdf": "^3.3.0"
"@signpdf/signer-p12": "^3.1.0",
"@signpdf/signpdf": "^3.1.0"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://code.foss.global/push.rocks/smartsign.git" "url": "https://code.foss.global/push.rocks/smartsign.git"
}, },
"bugs": { "bugs": {
"url": "https://gitlab.com/push.rocks/smartsign/issues" "url": "https://code.foss.global/push.rocks/smartsign/issues"
}, },
"homepage": "https://code.foss.global/push.rocks/smartsign", "homepage": "https://code.foss.global/push.rocks/smartsign",
"browserslist": [ "browserslist": [
@@ -48,6 +47,8 @@
"dist_ts_web/**/*", "dist_ts_web/**/*",
"assets/**/*", "assets/**/*",
"cli.js", "cli.js",
".smartconfig.json",
"license",
"npmextra.json", "npmextra.json",
"readme.md" "readme.md"
], ],
@@ -61,4 +62,4 @@
"certificate", "certificate",
"P12 cert" "P12 cert"
] ]
} }
+6750 -4618
View File
File diff suppressed because it is too large Load Diff
+11
View File
@@ -0,0 +1,11 @@
import { expect, tap } from '@git.zone/tstest/tapbundle';
import * as smartsign from '../ts/index.js';
let testSmartSign: smartsign.SmartSign;
tap.test('should create a new SmartSign instance', async () => {
testSmartSign = new smartsign.SmartSign(Buffer.from('test certificate'));
expect(testSmartSign).toBeInstanceOf(smartsign.SmartSign);
});
export default tap.start();
-26
View File
@@ -1,26 +0,0 @@
import { expect, expectAsync, tap } from '@push.rocks/tapbundle';
import * as smartsign from '../ts/index.js';
import * as smartfile from '@push.rocks/smartfile';
import * as smartshell from '@push.rocks/smartshell';
tap.preTask('create signing certificate', async () => {
const certExists = await smartfile.fs.fileExists('./.nogit/certificate.p12');
console.log('certExists:', certExists);
if (!certExists) {
const smartshellInstance = new smartshell.Smartshell({
executor: 'bash',
});
await smartshellInstance.exec(`bash -x ./scripts/create.p12.sh`)
}
})
let testSmartSign: smartsign.SmartSign;
tap.test('should create a new SmartSign instance', async () => {
const certSmartfile = await smartfile.SmartFile.fromFilePath('./.nogit/certificate.p12');
testSmartSign = new smartsign.SmartSign(certSmartfile.contentBuffer);
expect(testSmartSign).toBeInstanceOf(smartsign.SmartSign);
})
await tap.start();
+3 -3
View File
@@ -1,8 +1,8 @@
/** /**
* autocreated commitinfo by @pushrocks/commitinfo * autocreated commitinfo by @push.rocks/commitinfo
*/ */
export const commitinfo = { export const commitinfo = {
name: '@push.rocks/smartsign', name: '@push.rocks/smartsign',
version: '1.0.5', version: '1.0.6',
description: 'sign documents' description: 'A library for signing PDF documents.'
} }
+2 -2
View File
@@ -8,6 +8,6 @@ export class SigningEnvelope {
} }
exportSignedPdf() { exportSignedPdf() {
// TODO: implement PDF signing once the envelope API is finalized.
} }
} }
+2 -2
View File
@@ -3,7 +3,7 @@ import * as plugins from './smartsign.plugins.js';
export class SmartSign { export class SmartSign {
public p12Cert: Buffer; public p12Cert: Buffer;
public smartpdfInstance: plugins.smartpdf.SmartPdf; public smartpdfInstance!: plugins.smartpdf.SmartPdf;
constructor(p12CertBuffer: Buffer) { constructor(p12CertBuffer: Buffer) {
this.p12Cert = p12CertBuffer; this.p12Cert = p12CertBuffer;
} }
@@ -19,4 +19,4 @@ export class SmartSign {
public async createEnvelopeFromPdf(pdfArg: plugins.smartpdf.IPdf) { public async createEnvelopeFromPdf(pdfArg: plugins.smartpdf.IPdf) {
return new SigningEnvelope(this, pdfArg); return new SigningEnvelope(this, pdfArg);
} }
} }
+2 -2
View File
@@ -3,7 +3,7 @@ import * as smartpdf from '@push.rocks/smartpdf';
export { export {
smartpdf, smartpdf,
} };
// thirdparty scope // thirdparty scope
import * as signpdf from '@signpdf/signpdf'; import * as signpdf from '@signpdf/signpdf';
@@ -12,4 +12,4 @@ import * as signerP12 from '@signpdf/signer-p12';
export { export {
signpdf, signpdf,
signerP12, signerP12,
} };
+3 -1
View File
@@ -5,8 +5,10 @@
"target": "ES2022", "target": "ES2022",
"module": "NodeNext", "module": "NodeNext",
"moduleResolution": "NodeNext", "moduleResolution": "NodeNext",
"noImplicitAny": true,
"esModuleInterop": true, "esModuleInterop": true,
"verbatimModuleSyntax": true "verbatimModuleSyntax": true,
"types": ["node"]
}, },
"exclude": [ "exclude": [
"dist_*/**/*.d.ts" "dist_*/**/*.d.ts"