Skip to content

Commit

Permalink
fix: fix ci issues from 16.3 (#728)
Browse files Browse the repository at this point in the history
* test: fix cross-framework test

* docs: fix fastify example
  • Loading branch information
porcellus authored Oct 25, 2023
1 parent 02c2958 commit 8d59466
Show file tree
Hide file tree
Showing 7 changed files with 34,322 additions and 3,190 deletions.
8 changes: 2 additions & 6 deletions examples/fastify/with-emailpassword/backend/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,8 @@ fastify.register(cors, {
credentials: true,
});

(async () => {
await fastify.register(formDataPlugin);
await fastify.register(plugin);

await fastify.listen(8000);
})();
fastify.register(formDataPlugin);
fastify.register(plugin);

fastify.setErrorHandler(errorHandler());

Expand Down
37,458 changes: 34,296 additions & 3,162 deletions examples/fastify/with-emailpassword/package-lock.json

Large diffs are not rendered by default.

29 changes: 14 additions & 15 deletions examples/fastify/with-emailpassword/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,35 @@
"author": "",
"license": "ISC",
"dependencies": {
"@fastify/cors": "^8.3.0",
"@fastify/formbody": "^7.4.0",
"fastify": "^4.19.1",
"@fastify/cors": "^7.0.0",
"@fastify/formbody": "^6.0.1",
"axios": "^0.21.0",
"fastify": "3.18.1",
"helmet": "^5.1.0",
"morgan": "^1.10.0",
"typescript": "^4.7.2",
"axios": "^0.21.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.2.1",
"react-scripts": "5.0.1",
"supertokens-auth-react": "latest",
"supertokens-node": "file:../../../lib/build",
"typescript": "^4.8.2",
"web-vitals": "^2.1.4",
"supertokens-node": "file:../../../lib/build"
"web-vitals": "^2.1.4"
},
"devDependencies": {
"npm-run-all": "^4.1.5",
"ts-node-dev": "^2.0.0",
"isomorphic-fetch": "^3.0.0",
"jsdom-global": "^3.0.2",
"mocha": "^6.1.4",
"puppeteer": "^11.0.0",
"@types/node": "^16.11.38",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2",
"@types/node": "^16.11.38",
"@types/react": "^18.0.18",
"@types/react-dom": "^18.0.6",
"nodemon": "^2.0.16"
"isomorphic-fetch": "^3.0.0",
"jsdom-global": "^3.0.2",
"mocha": "^6.1.4",
"nodemon": "^2.0.16",
"npm-run-all": "^4.1.5",
"puppeteer": "^11.0.0",
"ts-node-dev": "^2.0.0"
}
}
11 changes: 7 additions & 4 deletions lib/build/framework/fastify/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
// @ts-nocheck
/// <reference types="node" />
export type { SessionRequest } from "./framework";
export declare const plugin: import("fastify").FastifyPluginCallback<Record<never, never>, import("http").Server>;
export declare const plugin: import("fastify").FastifyPluginCallback<
Record<never, never>,
import("fastify").RawServerDefault
>;
export declare const errorHandler: () => (
err: any,
req: import("fastify").FastifyRequest<
import("fastify/types/route").RouteGenericInterface,
import("http").Server,
import("fastify").RawServerDefault,
import("http").IncomingMessage
>,
res: import("fastify").FastifyReply<
import("http").Server,
import("fastify").RawServerDefault,
import("http").IncomingMessage,
import("http").ServerResponse,
import("http").ServerResponse<import("http").IncomingMessage>,
import("fastify/types/route").RouteGenericInterface,
unknown
>
Expand Down
2 changes: 1 addition & 1 deletion lib/build/framework/utils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export declare function setCookieForServerResponse(
expires: number,
path: string,
sameSite: "strict" | "lax" | "none"
): ServerResponse;
): ServerResponse<IncomingMessage>;
export declare function getCookieValueToSetInHeader(
prev: string | string[] | undefined,
val: string | string[],
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion test/framework/crossframework/unauthorised.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ addCrossFrameworkTests(
{
path: "/create-throw",
method: "post",
handler: async (req, res, next) => {
handler: async (req, res, _session, next) => {
await Session.createNewSession(
req,
res,
Expand Down

0 comments on commit 8d59466

Please sign in to comment.