Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rollup to dev dependencies #3699

Merged
merged 14 commits into from
Sep 30, 2024
4 changes: 3 additions & 1 deletion .github/workflows/e2e-browser.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: End-to-end browser tests

on: [push]
on:
push:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: End-to-end node tests

on:
push:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
2 changes: 1 addition & 1 deletion e2e/node/server/e2e-browser-script.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
import { afterAll, beforeAll, describe, expect, it, jest } from "@jest/globals";
import type { Request } from "@playwright/test";
import { firefox } from "@playwright/test";
import type { ILogoutOptions } from "core";
import type { ILogoutOptions } from "@inrupt/solid-client-authn-core";
import { custom } from "openid-client";
// Here we want to test how the local code behaves, not the already published one.
// eslint-disable-next-line import/no-relative-packages
Expand Down
32 changes: 16 additions & 16 deletions e2e/node/server/express.ts
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out we were not using express quite correctly, and that had never upset TS until now.

Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,19 @@ export function createApp(
// Initialised when the server comes up and is running...
let session: Session;

app.get("/", async (req, res) => {
return res.status(200).end();
app.get("/", (_req, res) => {
res.status(200).end();
});

app.get("/login", async (req, res) => {
const { oidcIssuer, clientId } = req.query;

if (typeof oidcIssuer !== "string") {
return res.status(400).send("oidcIssuer is required").end();
res.status(400).send("oidcIssuer is required").end();
return;
}

return session.login({
await session.login({
redirectUrl: `http://localhost:${CONSTANTS.CLIENT_AUTHN_TEST_PORT}/redirect`,
oidcIssuer,
clientId: typeof clientId === "string" ? clientId : undefined,
Expand All @@ -65,24 +66,23 @@ export function createApp(
);

if (info?.isLoggedIn) {
return res.redirect("/");
res.redirect("/");
return;
}

return res.status(400).send("could not log in").end();
res.status(400).send("could not log in").end();
});

app.get("/fetch", async (req, res) => {
const { resource } = req.query;

if (typeof resource !== "string") {
return res
.status(400)
.send("resource must be provided as a string")
.end();
res.status(400).send("resource must be provided as a string").end();
return;
}

const response = await session.fetch(resource);
return res
res
.status(response.status)
.send(await response.text())
.end();
Expand All @@ -91,27 +91,27 @@ export function createApp(
app.get("/logout", async (_req, res) => {
try {
await session.logout();
return res.status(200).send("successful logout").end();
res.status(200).send("successful logout").end();
} catch (error) {
return res.status(400).send(`Logout processing failed: [${error}]`).end();
res.status(400).send(`Logout processing failed: [${error}]`).end();
}
});

app.get("/postLogoutUrl", async (_req, res) => {
return res.status(200).send("successfully at post logout").end();
res.status(200).send("successfully at post logout").end();
});

app.get("/idplogout", async (_req, res) => {
try {
return await session.logout({
await session.logout({
logoutType: "idp",
postLogoutUrl: `http://localhost:${CONSTANTS.CLIENT_AUTHN_TEST_PORT}/postLogoutUrl`,
handleRedirect: (url) => {
res.redirect(url);
},
});
} catch (error) {
return res.status(400).send(`Logout processing failed: [${error}]`).end();
res.status(400).send(`Logout processing failed: [${error}]`).end();
}
});

Expand Down
252 changes: 248 additions & 4 deletions package-lock.json

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

Loading
Loading