fix(core): update
This commit is contained in:
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartsign',
|
||||
version: '1.0.3',
|
||||
version: '1.0.4',
|
||||
description: 'sign documents'
|
||||
}
|
||||
|
13
ts/classes.envelope.ts
Normal file
13
ts/classes.envelope.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import type { SmartSign } from './classes.smartsign.js';
|
||||
import * as plugins from './smartsign.plugins.js';
|
||||
|
||||
export class SigningEnvelope {
|
||||
public pdf: plugins.smartpdf.IPdf;
|
||||
constructor(smartsignRef: SmartSign, originalPdf: plugins.smartpdf.IPdf) {
|
||||
this.pdf = originalPdf;
|
||||
}
|
||||
|
||||
exportSignedPdf() {
|
||||
|
||||
}
|
||||
}
|
22
ts/classes.smartsign.ts
Normal file
22
ts/classes.smartsign.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import { SigningEnvelope } from './classes.envelope.js';
|
||||
import * as plugins from './smartsign.plugins.js';
|
||||
|
||||
export class SmartSign {
|
||||
public p12Cert: Buffer;
|
||||
public smartpdfInstance: plugins.smartpdf.SmartPdf;
|
||||
constructor(p12CertBuffer: Buffer) {
|
||||
this.p12Cert = p12CertBuffer;
|
||||
}
|
||||
|
||||
public async start() {
|
||||
this.smartpdfInstance = new plugins.smartpdf.SmartPdf();
|
||||
await this.smartpdfInstance.start();
|
||||
}
|
||||
public async stop() {
|
||||
await this.smartpdfInstance.stop();
|
||||
}
|
||||
|
||||
public async createEnvelopeFromPdf(pdfArg: plugins.smartpdf.IPdf) {
|
||||
return new SigningEnvelope(this, pdfArg);
|
||||
}
|
||||
}
|
@ -1,3 +1 @@
|
||||
import * as plugins from './smartsign.plugins.js';
|
||||
|
||||
export let demoExport = 'Hi there! :) This is an exported string';
|
||||
export * from './classes.smartsign.js';
|
@ -1,4 +1,15 @@
|
||||
const removeme = {};
|
||||
// @push.rocks scope
|
||||
import * as smartpdf from '@push.rocks/smartpdf';
|
||||
|
||||
export {
|
||||
removeme
|
||||
smartpdf,
|
||||
}
|
||||
|
||||
// thirdparty scope
|
||||
import * as signpdf from '@signpdf/signpdf';
|
||||
import * as signerP12 from '@signpdf/signer-p12';
|
||||
|
||||
export {
|
||||
signpdf,
|
||||
signerP12,
|
||||
}
|
Reference in New Issue
Block a user