fix(core): update
This commit is contained in:
+1
-3
@@ -15,8 +15,6 @@ node_modules/
|
||||
|
||||
# builds
|
||||
dist/
|
||||
dist_web/
|
||||
dist_serve/
|
||||
dist_ts_web/
|
||||
dist_*/
|
||||
|
||||
# custom
|
||||
+32
-15
@@ -4,13 +4,13 @@ image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
cache:
|
||||
paths:
|
||||
- .npmci_cache/
|
||||
key: "$CI_BUILD_STAGE"
|
||||
key: '$CI_BUILD_STAGE'
|
||||
|
||||
stages:
|
||||
- security
|
||||
- test
|
||||
- release
|
||||
- metadata
|
||||
- security
|
||||
- test
|
||||
- release
|
||||
- metadata
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
@@ -19,20 +19,35 @@ mirror:
|
||||
stage: security
|
||||
script:
|
||||
- npmci git mirror
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
snyk:
|
||||
auditProductionDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install -g snyk
|
||||
- npmci command npm install --ignore-scripts
|
||||
- npmci command snyk test
|
||||
- npmci command npm install --production --ignore-scripts
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command npm audit --audit-level=high --only=prod --production
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
auditDevDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install --ignore-scripts
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command npm audit --audit-level=high --only=dev
|
||||
tags:
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
# ====================
|
||||
# test stage
|
||||
@@ -48,7 +63,6 @@ testStable:
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
- priv
|
||||
|
||||
testBuild:
|
||||
stage: test
|
||||
@@ -60,7 +74,6 @@ testBuild:
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
release:
|
||||
stage: release
|
||||
@@ -70,6 +83,7 @@ release:
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
@@ -79,12 +93,15 @@ release:
|
||||
codequality:
|
||||
stage: metadata
|
||||
allow_failure: true
|
||||
only:
|
||||
- tags
|
||||
script:
|
||||
- npmci command npm install -g tslint typescript
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- priv
|
||||
|
||||
@@ -95,20 +112,20 @@ trigger:
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
pages:
|
||||
image: hosttoday/ht-docker-dbase:npmci
|
||||
services:
|
||||
- docker:stable-dind
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci node install lts
|
||||
- npmci command npm install -g @gitzone/tsdoc
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command tsdoc
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
only:
|
||||
|
||||
Vendored
+29
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "current file",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"${relativeFile}"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
},
|
||||
{
|
||||
"name": "test.ts",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"test/test.ts"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"json.schemas": [
|
||||
{
|
||||
"fileMatch": ["/npmextra.json"],
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"npmci": {
|
||||
"type": "object",
|
||||
"description": "settings for npmci"
|
||||
},
|
||||
"gitzone": {
|
||||
"type": "object",
|
||||
"description": "settings for gitzone",
|
||||
"properties": {
|
||||
"projectType": {
|
||||
"type": "string",
|
||||
"enum": ["website", "element", "service", "npm", "wcc"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"gitzone": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "pushrocks",
|
||||
|
||||
Generated
+65
-30
@@ -1232,6 +1232,33 @@
|
||||
"integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==",
|
||||
"dev": true
|
||||
},
|
||||
"@open-wc/dedupe-mixin": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://verdaccio.lossless.one/@open-wc%2fdedupe-mixin/-/dedupe-mixin-1.3.0.tgz",
|
||||
"integrity": "sha512-UfdK1MPnR6T7f3svzzYBfu3qBkkZ/KsPhcpc3JYhsUY4hbpwNF9wEQtD4Z+/mRqMTJrKg++YSxIxE0FBhY3RIw==",
|
||||
"dev": true
|
||||
},
|
||||
"@open-wc/scoped-elements": {
|
||||
"version": "1.3.3",
|
||||
"resolved": "https://verdaccio.lossless.one/@open-wc%2fscoped-elements/-/scoped-elements-1.3.3.tgz",
|
||||
"integrity": "sha512-vFIQVYYjFw67odUE4JzZOpctnF7S/2DX+S+clrL3bQPql7HvEnV0wMFwOWUavQTuCJi0rfU8GTcNMiUybio+Yg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@open-wc/dedupe-mixin": "^1.3.0",
|
||||
"lit-html": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"@open-wc/testing-helpers": {
|
||||
"version": "1.8.12",
|
||||
"resolved": "https://verdaccio.lossless.one/@open-wc%2ftesting-helpers/-/testing-helpers-1.8.12.tgz",
|
||||
"integrity": "sha512-+4exEHYvnFqI1RGDDIKFHPZ7Ws5NK1epvEku3zLaOYN3zc+huX19SndNc5+X++v8A+quN/iXbHlh80ROyNaYDA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@open-wc/scoped-elements": "^1.2.4",
|
||||
"lit-element": "^2.2.1",
|
||||
"lit-html": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"@parcel/fs": {
|
||||
"version": "1.11.0",
|
||||
"resolved": "https://verdaccio.lossless.one/@parcel%2ffs/-/fs-1.11.0.tgz",
|
||||
@@ -1381,20 +1408,13 @@
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartcrypto": {
|
||||
"version": "1.0.9",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartcrypto/-/smartcrypto-1.0.9.tgz",
|
||||
"integrity": "sha512-zu4ZYPu0/eeFvtE9L+mX9yIy8zwfT0Tmrl4tEvrHPS/ijzAH7MBf63SzoaLPmujVw6tnHsMejfPh1XUm1qLmnA==",
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartcrypto/-/smartcrypto-1.0.11.tgz",
|
||||
"integrity": "sha512-jMrHxtXeGutVugoq+RQcYV8pbhepNIy/NX6um4Ty+unyj91bf+MK4gRhceG466AYCtu/q4OGq9lTeasDzlZF4A==",
|
||||
"requires": {
|
||||
"@pushrocks/smartpromise": "^3.0.5",
|
||||
"@types/node-forge": "^0.8.6",
|
||||
"node-forge": "^0.9.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/smartpromise": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-3.1.3.tgz",
|
||||
"integrity": "sha512-KENdm++8uuzxDz1cbUbXtz6InfReP28TYC5zxRgRtwsXh7ZWUkSA+/82IbO97PcSCAfIpg7dwj77G6KGSsTKEQ=="
|
||||
}
|
||||
"@pushrocks/smartpromise": "^3.1.3",
|
||||
"@types/node-forge": "^0.9.7",
|
||||
"node-forge": "^0.10.0"
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartdelay": {
|
||||
@@ -1890,8 +1910,7 @@
|
||||
"@pushrocks/smartpromise": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-3.1.3.tgz",
|
||||
"integrity": "sha512-KENdm++8uuzxDz1cbUbXtz6InfReP28TYC5zxRgRtwsXh7ZWUkSA+/82IbO97PcSCAfIpg7dwj77G6KGSsTKEQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-KENdm++8uuzxDz1cbUbXtz6InfReP28TYC5zxRgRtwsXh7ZWUkSA+/82IbO97PcSCAfIpg7dwj77G6KGSsTKEQ=="
|
||||
},
|
||||
"@pushrocks/smartpuppeteer": {
|
||||
"version": "1.0.21",
|
||||
@@ -2024,11 +2043,12 @@
|
||||
}
|
||||
},
|
||||
"@pushrocks/tapbundle": {
|
||||
"version": "3.2.10",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.2.10.tgz",
|
||||
"integrity": "sha512-EPFSiFMx6uxWcZgANT1yDigTknVl1FCRIaiuf2AEkpg4vR5ZIZQKDIWkrFZY0ajUWJ6vCM631TmIcJvUnyWJXw==",
|
||||
"version": "3.2.14",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.2.14.tgz",
|
||||
"integrity": "sha512-Hu7SHFww6i17mZ3F8orvzXV7B8nPBRY6PB2Lw2sRfq9+ZbrvUvz7qmbc7d7mXkTGcLx7/7wbH3NHo1V5mplMCQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@open-wc/testing-helpers": "^1.8.12",
|
||||
"@pushrocks/smartdelay": "^2.0.10",
|
||||
"@pushrocks/smartenv": "^4.0.16",
|
||||
"@pushrocks/smartpromise": "^3.1.3",
|
||||
@@ -2169,9 +2189,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/chai": {
|
||||
"version": "4.2.14",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fchai/-/chai-4.2.14.tgz",
|
||||
"integrity": "sha512-G+ITQPXkwTrslfG5L/BksmbLUA0M1iybEsmCWPqzSxsRRhJZimBKJkoMi8fr/CPygPTj4zO5pJH7I2/cm9M7SQ==",
|
||||
"version": "4.2.15",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fchai/-/chai-4.2.15.tgz",
|
||||
"integrity": "sha512-rYff6FI+ZTKAPkJUoyz7Udq3GaoDZnxYDEvdEdFZASiA7PoErltHezDishqQiSDWrGxvxmplH304jyzQmjp0AQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/chai-as-promised": {
|
||||
@@ -2356,14 +2376,14 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "14.14.25",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-14.14.25.tgz",
|
||||
"integrity": "sha512-EPpXLOVqDvisVxtlbvzfyqSsFeQxltFbluZNRndIb8tr9KiBnYNLzrc1N3pyKUCww2RNrfHDViqDWWE1LCJQtQ=="
|
||||
"version": "14.14.31",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-14.14.31.tgz",
|
||||
"integrity": "sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g=="
|
||||
},
|
||||
"@types/node-forge": {
|
||||
"version": "0.8.7",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode-forge/-/node-forge-0.8.7.tgz",
|
||||
"integrity": "sha512-xDtriZLWYx21QvMeTUD7EYQ+kPUxsKzNK+3Wl037RsRotR57MwrzTv6jy2vOJtWQV7S7jMI/hqMxunEqdLHK8Q==",
|
||||
"version": "0.9.7",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode-forge/-/node-forge-0.9.7.tgz",
|
||||
"integrity": "sha512-AX7Mqk5ztzSvxqsA/q8y0k0/znJpW6QAqnoLQMEi7A3tio+laRmC/8Q3gbATHT4kZnvhnDmGAy1CpWFzlzCfeA==",
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
@@ -7202,6 +7222,21 @@
|
||||
"type-check": "~0.3.2"
|
||||
}
|
||||
},
|
||||
"lit-element": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://verdaccio.lossless.one/lit-element/-/lit-element-2.4.0.tgz",
|
||||
"integrity": "sha512-pBGLglxyhq/Prk2H91nA0KByq/hx/wssJBQFiYqXhGDvEnY31PRGYf1RglVzyLeRysu0IHm2K0P196uLLWmwFg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lit-html": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"lit-html": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://verdaccio.lossless.one/lit-html/-/lit-html-1.3.0.tgz",
|
||||
"integrity": "sha512-0Q1bwmaFH9O14vycPHw8C/IeHMk/uSDldVLIefu/kfbTBGIc44KGH6A8p1bDfxUfHdc8q6Ct7kQklWoHgr4t1Q==",
|
||||
"dev": true
|
||||
},
|
||||
"locate-path": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/locate-path/-/locate-path-5.0.0.tgz",
|
||||
@@ -7716,9 +7751,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node-forge": {
|
||||
"version": "0.9.2",
|
||||
"resolved": "https://verdaccio.lossless.one/node-forge/-/node-forge-0.9.2.tgz",
|
||||
"integrity": "sha512-naKSScof4Wn+aoHU6HBsifh92Zeicm1GDQKd1vp3Y/kOi8ub0DozCa9KpvYNCXslFHYRmLNiqRopGdTGwNLpNw=="
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://verdaccio.lossless.one/node-forge/-/node-forge-0.10.0.tgz",
|
||||
"integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA=="
|
||||
},
|
||||
"node-libs-browser": {
|
||||
"version": "2.2.1",
|
||||
|
||||
+13
-9
@@ -15,25 +15,29 @@
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.25",
|
||||
"@gitzone/tstest": "^1.0.52",
|
||||
"@pushrocks/tapbundle": "^3.2.10",
|
||||
"@types/node": "^14.14.25",
|
||||
"@pushrocks/tapbundle": "^3.2.14",
|
||||
"@types/node": "^14.14.31",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.15.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/smartcrypto": "^1.0.9",
|
||||
"@pushrocks/smartcrypto": "^1.0.11",
|
||||
"@types/jsonwebtoken": "^8.5.0",
|
||||
"jsonwebtoken": "^8.5.1"
|
||||
},
|
||||
"files": [
|
||||
"ts/*",
|
||||
"ts_web/*",
|
||||
"dist/*",
|
||||
"dist_web/*",
|
||||
"dist_ts_web/*",
|
||||
"assets/*",
|
||||
"ts/**/*",
|
||||
"ts_web/**/*",
|
||||
"dist/**/*",
|
||||
"dist_*/**/*",
|
||||
"dist_ts/**/*",
|
||||
"dist_ts_web/**/*",
|
||||
"assets/**/*",
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
],
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
]
|
||||
}
|
||||
@@ -8,16 +8,28 @@ a package for handling jwt
|
||||
* [docs (typedoc)](https://pushrocks.gitlab.io/smartjwt/)
|
||||
|
||||
## Status for master
|
||||
[](https://gitlab.com/pushrocks/smartjwt/commits/master)
|
||||
[](https://gitlab.com/pushrocks/smartjwt/commits/master)
|
||||
[](https://www.npmjs.com/package/@pushrocks/smartjwt)
|
||||
[](https://snyk.io/test/npm/@pushrocks/smartjwt)
|
||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[](https://prettier.io/)
|
||||
|
||||
Status Category | Status Badge
|
||||
-- | --
|
||||
GitLab Pipelines | [](https://lossless.cloud)
|
||||
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
||||
npm | [](https://lossless.cloud)
|
||||
Snyk | [](https://lossless.cloud)
|
||||
TypeScript Support | [](https://lossless.cloud)
|
||||
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
Code Style | [](https://lossless.cloud)
|
||||
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||
Platform support | [](https://lossless.cloud) [](https://lossless.cloud)
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
## Contribution
|
||||
|
||||
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
|
||||
@@ -20,7 +20,7 @@ export class SmartJwt<T extends object = any> {
|
||||
*/
|
||||
public async createJWT(payloadArg: T) {
|
||||
return plugins.jsonwebtoken.sign(payloadArg, this.privateKey.toPemString(), {
|
||||
algorithm: 'RS256'
|
||||
algorithm: 'RS256',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ export class SmartJwt<T extends object = any> {
|
||||
*/
|
||||
public async verifyJWTAndGetData(jwtArg: string): Promise<T> {
|
||||
const result = plugins.jsonwebtoken.verify(jwtArg, this.publicKey.toPemString(), {
|
||||
algorithms: ['RS256']
|
||||
algorithms: ['RS256'],
|
||||
});
|
||||
return result as any;
|
||||
}
|
||||
@@ -54,7 +54,7 @@ export class SmartJwt<T extends object = any> {
|
||||
public getKeyPairAsJson(): ISmartJWTJSONKeypair {
|
||||
return {
|
||||
privatePem: this.privateKey.toPemString(),
|
||||
publicPem: this.publicKey.toPemString()
|
||||
publicPem: this.publicKey.toPemString(),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user