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
+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();