fix(core): update

This commit is contained in:
Philipp Kunz 2024-02-13 01:18:57 +01:00
parent d124e5807c
commit 8825ca7c09
7 changed files with 1030 additions and 952 deletions

View File

@ -119,6 +119,6 @@ jobs:
run: | run: |
npmci node install stable npmci node install stable
npmci npm install npmci npm install
pnpm install -g @gitzone/tsdoc pnpm install -g @git.zone/tsdoc
npmci command tsdoc npmci command tsdoc
continue-on-error: true continue-on-error: true

View File

@ -9,20 +9,20 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"test": "(tstest test/)", "test": "(tstest test/)",
"build": "(tsbuild)", "build": "(tsbuild)"
"buildDocs": "tsdoc"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.66", "@git.zone/tsbuild": "^2.1.72",
"@gitzone/tsrun": "^1.2.44", "@git.zone/tsrun": "^1.2.46",
"@gitzone/tstest": "^1.0.77", "@git.zone/tstest": "^1.0.86",
"@push.rocks/tapbundle": "^5.0.15", "@push.rocks/tapbundle": "^5.0.15",
"@types/node": "^20.5.1" "@types/node": "^20.11.17"
}, },
"dependencies": { "dependencies": {
"@push.rocks/smartcrypto": "^2.0.2", "@push.rocks/smartcrypto": "^2.0.4",
"@types/jsonwebtoken": "^9.0.2", "@tsclass/tsclass": "^4.0.51",
"jsonwebtoken": "^9.0.1" "@types/jsonwebtoken": "^9.0.5",
"jsonwebtoken": "^9.0.2"
}, },
"files": [ "files": [
"ts/**/*", "ts/**/*",

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@push.rocks/smartjwt', name: '@push.rocks/smartjwt',
version: '2.0.3', version: '2.0.4',
description: 'a package for handling jwt' description: 'a package for handling jwt'
} }

View File

@ -1,10 +1,5 @@
import * as plugins from './smartjwt.plugins.js'; import * as plugins from './smartjwt.plugins.js';
export interface ISmartJWTJSONKeypair {
privatePem: string;
publicPem: string;
}
/** /**
* A class to create and validate JWTs and their keys * A class to create and validate JWTs and their keys
*/ */
@ -51,7 +46,7 @@ export class SmartJwt<T extends object = any> {
/** /**
* gets the currently set kaypair as json * gets the currently set kaypair as json
*/ */
public getKeyPairAsJson(): ISmartJWTJSONKeypair { public getKeyPairAsJson(): plugins.tsclass.network.IJwtKeypair {
return { return {
privatePem: this.privateKey.toPemString(), privatePem: this.privateKey.toPemString(),
publicPem: this.publicKey.toPemString(), publicPem: this.publicKey.toPemString(),
@ -61,7 +56,7 @@ export class SmartJwt<T extends object = any> {
/** /**
* sets the currently set keypair as json * sets the currently set keypair as json
*/ */
public setKeyPairAsJson(jsonKeyPair: ISmartJWTJSONKeypair) { public setKeyPairAsJson(jsonKeyPair: plugins.tsclass.network.IJwtKeypair) {
this.privateKey = plugins.smartcrypto.PrivateKey.fromPemString(jsonKeyPair.privatePem); this.privateKey = plugins.smartcrypto.PrivateKey.fromPemString(jsonKeyPair.privatePem);
this.publicKey = plugins.smartcrypto.PublicKey.fromPemString(jsonKeyPair.publicPem); this.publicKey = plugins.smartcrypto.PublicKey.fromPemString(jsonKeyPair.publicPem);
} }

View File

@ -6,3 +6,10 @@ export { smartcrypto };
// thirdparty scope // thirdparty scope
import jsonwebtoken from 'jsonwebtoken'; import jsonwebtoken from 'jsonwebtoken';
export { jsonwebtoken }; export { jsonwebtoken };
// @tsclass scope
import * as tsclass from '@tsclass/tsclass';
export {
tsclass
};

View File

@ -3,8 +3,8 @@
"experimentalDecorators": true, "experimentalDecorators": true,
"useDefineForClassFields": false, "useDefineForClassFields": false,
"target": "ES2022", "target": "ES2022",
"module": "ES2022", "module": "NodeNext",
"moduleResolution": "nodenext", "moduleResolution": "NodeNext",
"esModuleInterop": true, "esModuleInterop": true,
"verbatimModuleSyntax": true "verbatimModuleSyntax": true
}, },