-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b105a89
commit 15c9e68
Showing
246 changed files
with
4,102 additions
and
1,146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
yarn dlx lint-staged --concurrent false --relative | ||
yarn dlx lint-staged --concurrent false --relative --allow-empty |
Binary file removed
BIN
-34 KB
.yarn/cache/@emotion-is-prop-valid-npm-1.2.1-794afe6a94-7c2aabdf0c.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-442 KB
.yarn/cache/@mswjs-interceptors-npm-0.17.10-c1199a9424-0343a93711.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+42.2 KB
.yarn/cache/@remix-run-v1-route-convention-npm-0.1.4-d336e45418-f9984d9212.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+11.5 KB
.yarn/cache/@szmarczak-http-timer-npm-5.0.1-52261e5986-4629d2fbb2.zip
Binary file not shown.
Binary file added
BIN
+2.32 MB
.yarn/cache/@testing-library-dom-npm-10.0.0-708b4ef7e6-2d12d2a601.zip
Binary file not shown.
Binary file added
BIN
+505 KB
.yarn/cache/@testing-library-user-event-npm-14.5.2-ec9587901c-68a0c2aa28.zip
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-7.4 KB
.yarn/cache/@types-hoist-non-react-statics-npm-3.3.5-98b8d8e47b-2a3b64bf3d.zip
Binary file not shown.
Binary file removed
BIN
-3.85 KB
.yarn/cache/@types-js-levenshtein-npm-1.1.3-417b5f0c21-025f2bd8d8.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-7.87 KB
.yarn/cache/@types-set-cookie-parser-npm-2.4.7-e9d6d979b1-3c4b5168fe.zip
Binary file not shown.
Binary file removed
BIN
-24.2 KB
.yarn/cache/@types-styled-components-npm-5.1.34-c1fd4bac77-5bce93ea2c.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+65.5 KB
.yarn/cache/@vanilla-extract-integration-npm-7.1.2-fadf75bb6c-c4bb99d3ca.zip
Binary file not shown.
Binary file added
BIN
+95 KB
.yarn/cache/@vanilla-extract-sprinkles-npm-1.6.1-e524ee399f-7ddd2ab7c8.zip
Binary file not shown.
Binary file added
BIN
+27.8 KB
.yarn/cache/@vanilla-extract-vite-plugin-npm-4.0.7-55893955b8-1d9dd8bdd7.zip
Binary file not shown.
Binary file renamed
BIN
+100 KB
...ge-v8-npm-1.5.1-12c3829e02-614b0a7ca0.zip → ...ge-v8-npm-1.5.2-0f1947c29f-cc98275396.zip
Binary file not shown.
Binary file renamed
BIN
+141 KB
...xpect-npm-1.5.1-9cc59d304b-4743ca8de3.zip → ...xpect-npm-1.5.2-3b855b8075-4e8400a55f.zip
Binary file not shown.
Binary file renamed
BIN
+64.6 KB
...unner-npm-1.5.1-1bd8a6b0c9-a079c111c9.zip → ...unner-npm-1.5.2-c6689dee82-9fc3e66881.zip
Binary file not shown.
Binary file renamed
BIN
+67.7 KB
...pshot-npm-1.5.1-87cae6bf67-d3d769873b.zip → ...pshot-npm-1.5.2-791e3d9f82-67ae235e59.zip
Binary file not shown.
Binary file renamed
BIN
+18.8 KB
...t-spy-npm-1.5.1-9ec8baf765-865b94bc99.zip → ...t-spy-npm-1.5.2-b9c126ac34-d66de2873f.zip
Binary file not shown.
Binary file renamed
BIN
+817 KB
...st-ui-npm-1.5.1-18a33515ae-efba22a08b.zip → ...st-ui-npm-1.5.2-b335b96316-85fc78e0b3.zip
Binary file not shown.
Binary file renamed
BIN
+155 KB
...utils-npm-1.5.1-e51d68286e-45bef3c3c5.zip → ...utils-npm-1.5.2-7cf804c58e-019eeac016.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-96.8 KB
.yarn/cache/css-to-react-native-npm-3.2.0-46e31a25e3-fde850a511.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+29.8 KB
.yarn/cache/graphql-transform-scalars-npm-1.2.1-419c342fcf-d170e808a2.zip
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-40 KB
.yarn/cache/hoist-non-react-statics-npm-3.3.2-e7b709e6c1-fe0889169e.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-9.83 KB
.yarn/cache/strict-event-emitter-npm-0.2.8-e8b9131760-6891e19fea.zip
Binary file not shown.
Binary file removed
BIN
-15.7 KB
.yarn/cache/strict-event-emitter-npm-0.4.6-b845d23c7d-d0231ef081.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+193 KB
...-node-npm-1.5.1-fd703ad005-d3591d9c30.zip → ...-node-npm-1.5.2-3f4f4e44d5-a5e90ae2b3.zip
Binary file not shown.
Binary file renamed
BIN
+1.37 MB
...itest-npm-1.5.1-da8c0fa81f-85f6b9250c.zip → ...itest-npm-1.5.2-db4ab193ee-1ad3a33d3a.zip
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
diff --git a/build/index.d.ts b/build/index.d.ts | ||
index 575dc0e00c51ac7dac66c4e4885c2414ee98fa91..50717f586aba777a4239b726a90347d9c3dcea45 100644 | ||
--- a/build/index.d.ts | ||
+++ b/build/index.d.ts | ||
@@ -1,5 +1,8 @@ | ||
import { JwtPayload } from 'jsonwebtoken'; | ||
+import { HttpHandler } from 'msw'; | ||
+ | ||
declare const createJWKSMock: (jwksBase: string, jwksPath?: string) => { | ||
+ handler: HttpHandler | ||
start: () => void; | ||
stop: () => void; | ||
kid: () => string; | ||
diff --git a/build/index.js b/build/index.js | ||
index 289a2dac6cd569eef5dbc9329914a7517b442829..bfe7abde0ad358d21b707cc2fa69f721b02b8955 100644 | ||
--- a/build/index.js | ||
+++ b/build/index.js | ||
@@ -1,13 +1,20 @@ | ||
import { createJWKS, createKeyPair, signJwt } from './tools.js'; | ||
import { setupServer } from 'msw/node'; | ||
-import { rest } from 'msw'; | ||
+import { http, HttpResponse } from 'msw'; | ||
+ | ||
const createJWKSMock = (jwksBase, jwksPath = '/.well-known/jwks.json') => { | ||
const keypair = createKeyPair(); | ||
const JWKS = createJWKS({ | ||
...keypair, | ||
jwksOrigin: jwksBase, | ||
}); | ||
- const server = setupServer(rest.get(new URL(jwksPath, jwksBase).href, (_, res, ctx) => res(ctx.status(200), ctx.json(JWKS)))); | ||
+ | ||
+ // we patch & expose the actual msw handler so we can plug it into our own server rather than | ||
+ // creating a conflicting instance. we also bump the msw version to match our own to avoid any | ||
+ // compatibility issues. | ||
+ const handler = http.get(new URL(jwksPath, jwksBase).href, () => HttpResponse.json(JWKS)); | ||
+ | ||
+ const server = setupServer(handler); | ||
const kid = () => JWKS.keys[0].kid; | ||
const start = () => { | ||
server.listen({ onUnhandledRequest: 'bypass' }); | ||
@@ -17,6 +24,7 @@ const createJWKSMock = (jwksBase, jwksPath = '/.well-known/jwks.json') => { | ||
}; | ||
const token = (token = {}) => signJwt(keypair.privateKey, token, kid()); | ||
return { | ||
+ handler, | ||
start, | ||
stop, | ||
kid, | ||
diff --git a/package.json b/package.json | ||
index e5a5c2fc6b6b5dfec0c88bbf2adf4a88ba33e18b..412355319913b9b7a3743974c47d29fb834c9a93 100644 | ||
--- a/package.json | ||
+++ b/package.json | ||
@@ -91,7 +91,7 @@ | ||
"dependencies": { | ||
"base64-url": "^2.3.3", | ||
"jsonwebtoken": "^9.0.0", | ||
- "msw": "^1.2.2", | ||
+ "msw": "2.2.14", | ||
"node-forge": "^1.3.1", | ||
"node-rsa": "^1.1.1" | ||
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.