Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
davidje13 committed Nov 9, 2024
1 parent cad1b6a commit e58181b
Show file tree
Hide file tree
Showing 9 changed files with 781 additions and 2,192 deletions.
326 changes: 181 additions & 145 deletions backend/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"pg": "8.x",
"pwd-hasher": "2.x",
"shared-reducer": "5.x",
"tslib": "2.7.x",
"tslib": "2.8.x",
"websocket-express": "3.x",
"ws": "8.x"
},
Expand All @@ -30,7 +30,7 @@
"devDependencies": {
"@rollup/plugin-json": "6.x",
"@rollup/plugin-node-resolve": "15.x",
"@rollup/plugin-typescript": "11.x",
"@rollup/plugin-typescript": "12.x",
"@tsconfig/strictest": "2.x",
"@types/node": "20.x",
"http-proxy-middleware": "3.x",
Expand Down
6 changes: 3 additions & 3 deletions backend/src/api-tests/sso.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ describe('/api/sso/service', () => {
const MOCK_SSO = testServerRunner(() => {
const ssoApp = new WebSocketExpress();
ssoApp.use(WebSocketExpress.urlencoded({ extended: false }));
ssoApp.get('/', (_, res) =>
ssoApp.get('/', (_, res) => {
res.json({
aud: 'my-client-id',
sub: 'my-external-id',
}),
);
});
});
return { run: ssoApp.createServer() };
});

Expand Down
4 changes: 3 additions & 1 deletion backend/src/routers/ApiConfigRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export class ApiConfigRouter extends Router {
giphy: serverConfig.giphy.apiKey !== '',
};

this.get('/', (_, res) => res.json(clientConfig));
this.get('/', (_, res) => {
res.json(clientConfig);
});
}
}
3 changes: 1 addition & 2 deletions backend/src/tokens/TokenManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ export class TokenManager {
publicKey: KeyLike,
): JsonData | null {
try {
// https://github.com/hokaccha/node-jwt-simple/pull/98
return jwt.decode(token, publicKey as any, false, this.algorithm);
return jwt.decode(token, publicKey, false, this.algorithm);
} catch (e) {
return null;
}
Expand Down
40 changes: 40 additions & 0 deletions backend/src/types/jwt-simple/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
declare module 'jwt-simple' {
import { KeyLike } from 'node:crypto';

export type TAlgorithm = 'HS256' | 'HS384' | 'HS512' | 'RS256';

export interface IOptions {
header: any;
}

function decode(
token: string,
key: string | Buffer,
noVerify?: boolean,
algorithm?: TAlgorithm,
): any;

// https://github.com/hokaccha/node-jwt-simple/pull/98/files
function decode(token: string, key: KeyLike, noVerify: true): any;

function decode(
token: string,
key: KeyLike,
noVerify: boolean,
algorithm: TAlgorithm,
): any;

function encode(
payload: any,
key: KeyLike,
algorithm?: TAlgorithm,
options?: IOptions,
): string;

const jwt: {
decode: typeof decode;
encode: typeof encode;
};

export default jwt;
}
128 changes: 62 additions & 66 deletions e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"@tsconfig/strictest": "2.x",
"@types/node": "20.x",
"@types/selenium-webdriver": "4.x",
"chromedriver": "128.x",
"geckodriver": "4.4.x",
"chromedriver": "130.x",
"geckodriver": "5.0.x",
"lean-test": "2.x",
"prettier": "3.3.3",
"selenium-webdriver": "4.25.x",
"selenium-webdriver": "4.26.x",
"typescript": "5.6.x"
}
}
Loading

0 comments on commit e58181b

Please sign in to comment.