forked from panva/jose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
169 lines (169 loc) · 8.44 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
{
"name": "jose",
"version": "4.5.0",
"description": "'JSON Web Almost Everything' - JWA, JWS, JWE, JWT, JWK, JWKS with no dependencies using runtime's native crypto",
"keywords": [
"browser",
"cloudflare",
"compact",
"decode",
"decrypt",
"deno",
"detached",
"ec",
"ecdsa",
"eddsa",
"electron",
"embedded",
"encrypt",
"flattened",
"general",
"isomorphic",
"jose",
"json web token",
"jsonwebtoken",
"jwa",
"jwe",
"jwk",
"jwks",
"jws",
"jwt",
"oct",
"okp",
"payload",
"pem",
"pkcs8",
"rsa",
"secp256k1",
"sign",
"signature",
"spki",
"universal",
"validate",
"verify",
"webcrypto",
"workers",
"x509"
],
"homepage": "https://github.com/panva/jose",
"repository": "panva/jose",
"funding": {
"url": "https://github.com/sponsors/panva"
},
"license": "MIT",
"author": "Filip Skokan <[email protected]>",
"sideEffects": false,
"imports": {
"#dist": {
"import": "./dist/node/esm/index.js",
"require": "./dist/node/cjs/index.js"
},
"#dist/*": {
"import": "./dist/node/esm/*.js",
"require": "./dist/node/cjs/*.js"
},
"#dist/webcrypto/*": {
"import": "./dist/node/webcrypto/esm/*.js",
"require": "./dist/node/webcrypto/cjs/*.js"
},
"#dist/webcrypto": {
"import": "./dist/node/webcrypto/esm/index.js",
"require": "./dist/node/webcrypto/cjs/index.js"
}
},
"exports": {
".": {
"browser": "./dist/browser/index.js",
"import": "./dist/node/esm/index.js",
"require": "./dist/node/cjs/index.js"
},
"./package.json": "./package.json"
},
"main": "./dist/node/cjs/index.js",
"browser": "./dist/browser/index.js",
"types": "./dist/types/index.d.ts",
"files": [
"dist/**/package.json",
"dist/**/*.js",
"dist/types/**/*.d.ts",
"!dist/**/*.bundle.js",
"!dist/**/*.umd.js",
"!dist/**/*.min.js",
"!dist/node/webcrypto/**/*",
"!dist/types/runtime/*",
"!dist/types/lib/*"
],
"scripts": {
"build": "tsc",
"build-all": "run-s clear build:*",
"build-fast-all": "run-s clear build-fast:*",
"build-fast:browser": "npm run-script runtime-browser && npm run-script -s esbuild-find | xargs -0 esbuild --log-level=warning --target=es2018 --outdir=dist/browser --format=esm && echo '{\"type\": \"module\"}'> dist/browser/package.json",
"build-fast:browser-bundle": "npm run-script build:browser-bundle",
"build-fast:browser-bundle-min": "npm run-script build:browser-bundle-min",
"build-fast:build:browser-umd": "npm run-script build:build:browser-umd",
"build-fast:deno": "npm run-script build:deno",
"build-fast:node-cjs": "npm run-script runtime-node && npm run-script -s esbuild-find | xargs -0 esbuild --log-level=warning --platform=node --target=node12 --outdir=dist/node/cjs --format=cjs",
"build-fast:node-esm": "npm run-script runtime-node && npm run-script -s esbuild-find | xargs -0 esbuild --log-level=warning --platform=node --target=node12 --outdir=dist/node/esm --format=esm && echo '{\"type\": \"module\"}'> dist/node/esm/package.json",
"build-fast:node-webcrypto-cjs": "npm run-script runtime-node-webcrypto && npm run-script -s esbuild-find | xargs -0 esbuild --log-level=warning --platform=node --target=esnext --outdir=dist/node/webcrypto/cjs --format=cjs",
"build-fast:node-webcrypto-esm": "npm run-script runtime-node-webcrypto && npm run-script -s esbuild-find | xargs -0 esbuild --log-level=warning --platform=node --target=esnext --outdir=dist/node/webcrypto/esm --format=esm && echo '{\"type\": \"module\"}'> dist/node/webcrypto/esm/package.json",
"build:browser": "run-s runtime-browser 'build -- -p ./tsconfig/browser.json' && echo '{\"type\": \"module\"}'> dist/browser/package.json",
"build:browser-bundle": "npx esbuild --bundle dist/browser/index.js --format=esm --target=es2018 --outfile=dist/browser/index.bundle.js",
"build:browser-bundle-min": "npx esbuild --minify --bundle dist/browser/index.js --format=esm --target=es2018 --outfile=dist/browser/index.bundle.min.js",
"build:browser-umd": "npx rollup dist/browser/index.bundle.js --format umd --name jose -o dist/browser/index.umd.js && npx rollup dist/browser/index.bundle.min.js --compact --format umd --name jose -o dist/browser/index.umd.min.js",
"build:deno": "npm run-script runtime-deno && find dist/deno -name '*.ts' -type f -print0 | xargs -0 sed -i '' -e \"s/@deno\\-expect\\-error/@ts-ignore/g\" -e \"s/\\.js'/.ts'/g\" -e \"s/\\.d'/.d.ts'/g\"",
"build:types": "npm run-script build -- -p ./tsconfig/types.json && cd src && find . -name '*.d.ts' -maxdepth 2 -type f -exec gcp --parents \"{}\" ../dist/types \\; && cd .. && node ./tools/strip-dts-comments && run-s -s types:find | xargs -0 sed -i '' -e \"s/\\.js'/'/g\" -e \"s/\\.d'/'/g\"",
"build:node-cjs": "run-s runtime-node 'build -- -p ./tsconfig/node-cjs.json'",
"build:node-esm": "run-s runtime-node 'build -- -p ./tsconfig/node-esm.json' && echo '{\"type\": \"module\"}'> dist/node/esm/package.json",
"build:node-webcrypto-cjs": "run-s runtime-node-webcrypto 'build -- -p ./tsconfig/node-webcrypto-cjs.json'",
"build:node-webcrypto-esm": "run-s runtime-node-webcrypto 'build -- -p ./tsconfig/node-webcrypto-esm.json' && echo '{\"type\": \"module\"}'> dist/node/webcrypto/esm/package.json",
"clear": "rm -rf dist",
"coverage": "npm run-script runtime-node && c8 npm run-script test",
"coverage-cryptokey": "npm run-script runtime-node && c8 npm run-script test-cryptokey",
"coverage-webcrypto": "npm run-script runtime-node-webcrypto && c8 npm run-script test-webcrypto",
"docs": "run-s docs:*",
"docs:generate": "typedoc --allReflectionsHaveOwnDocument --disableSources --excludePrivate --excludeProtected --gitRevision main --readme none --plugin typedoc-plugin-markdown --out docs --excludeExternals --tsconfig ./tsconfig/browser.json --hideGenerator --hideBreadcrumbs src/types.d.ts src/jwt/*.ts src/jwe/**/*.ts src/jws/**/*.ts src/jwk/*.ts src/jwks/*.ts src/util/*.ts src/key/*.ts",
"esbuild-find": "find src -type f -name '*.ts' -not -path '*/runtime/*/*' -not -name '*.d.ts' -print0",
"runtime-browser": "run-s runtime:clear runtime:browser:* runtime:refs",
"runtime-deno": "npm run-script runtime-browser && mkdir -p dist/deno && cp -r src/. dist/deno && rm -r dist/deno/runtime/browser dist/deno/runtime/node",
"runtime-node": "run-s runtime:clear runtime:node:* runtime:refs",
"runtime-node-webcrypto": "run-s runtime:clear runtime:browser:* && cp ./src/runtime/node/webcrypto.ts ./src/runtime/ && cp ./src/runtime/node/fetch_jwks.ts ./src/runtime/ && cp ./src/runtime/node/base64url.ts ./src/runtime/ && cp ./src/runtime/node/zlib.ts ./src/runtime/ && run-s runtime:refs",
"runtime:browser:copy": "cp ./src/runtime/browser/*.ts ./src/runtime",
"runtime:clear": "run-s -s runtime:find | xargs -0 rm -f",
"runtime:find": "find src/runtime -not -name '*.d.ts' -maxdepth 1 -type f -print0",
"types:find": "find dist/types -name '*.d.ts' -type f -print0",
"runtime:node:copy": "cp ./src/runtime/node/*.ts ./src/runtime",
"runtime:refs": "run-s -s runtime:find | xargs -0 sed -i '' -e \"s/'\\.\\.\\//'\\.\\//g\" -e \"s/'\\.\\/\\.\\./'../g\"",
"test": "ava",
"test-cloudflare-workers": "ava --timeout=5m --config ./test-cloudflare-workers.config.cjs",
"test-deno": "deno test --reload --jobs --allow-net --allow-read test-deno",
"test-browsers": "find test-browser -type f -name '*.js' -print0 | xargs -0 npx esbuild --log-level=warning --outdir=dist-browser-tests --bundle && karma start",
"test-cryptokey": "CRYPTOKEY=true npm test",
"test-webcrypto": "WEBCRYPTO=true npm test",
"prettier": "npx prettier --loglevel silent --write ./test ./src ./tools ./test-browser ./test-deno ./test-cloudflare-workers"
},
"devDependencies": {
"@types/node": "^16.11.1",
"ava": "^3.15.0",
"bowser": "^2.11.0",
"c8": "^7.10.0",
"esbuild": "^0.14.3",
"glob": "^7.1.7",
"got": "^11.8.2",
"karma": "^6.3.4",
"karma-browserstack-launcher": "1.6.0",
"karma-qunit": "^4.1.2",
"karma-summary-reporter": "^3.0.0",
"nock": "^13.1.3",
"npm-run-all": "^4.1.5",
"p-throttle": "^5.0.0",
"patch-package": "^6.4.7",
"prettier": "^2.4.1",
"qunit": "^2.17.2",
"rollup": "^2.58.0",
"tar": "^6.1.11",
"timekeeper": "^2.2.0",
"typedoc": "~0.21.9",
"typedoc-plugin-markdown": "~3.10.4",
"typescript": "^4.4.3"
}
}