From a7539a51b961add9a5f889a7eb2e9ef036fb653f Mon Sep 17 00:00:00 2001 From: mrkvon Date: Thu, 30 Jan 2025 02:17:25 +0100 Subject: [PATCH] chore: upgrade css-authn to v0.1.0 --- package.json | 2 +- src/test/helpers/index.ts | 4 ++-- src/test/setup.ts | 8 ++++---- yarn.lock | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index bccb401..d067074 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@types/nodemailer": "^6.4.9", "ajv": "^8.12.0", "ajv-formats": "^2.1.1", - "css-authn": "^0.0.16", + "css-authn": "^0.1.0", "dotenv": "^16.0.0", "handlebars": "^4.7.8", "jsonwebtoken": "^9.0.2", diff --git a/src/test/helpers/index.ts b/src/test/helpers/index.ts index eb12e8b..dfdb655 100644 --- a/src/test/helpers/index.ts +++ b/src/test/helpers/index.ts @@ -1,5 +1,5 @@ import * as cheerio from 'cheerio' -import { createAccount } from 'css-authn/dist/7.x.js' +import { v7 } from 'css-authn' import { randomUUID } from 'node:crypto' import * as puppeteer from 'puppeteer' import { expect, vi } from 'vitest' @@ -13,7 +13,7 @@ export const createRandomAccount = ({ }: { solidServer: string }) => { - return createAccount({ + return v7.createAccount({ username: randomUUID(), password: randomUUID(), email: randomUUID() + '@example.com', diff --git a/src/test/setup.ts b/src/test/setup.ts index c827ddf..d2af9c8 100644 --- a/src/test/setup.ts +++ b/src/test/setup.ts @@ -1,6 +1,6 @@ import * as css from '@solid/community-server' import fetch from 'cross-fetch' -import { getAuthenticatedFetch } from 'css-authn/dist/7.x.js' +import { v7 } from 'css-authn' import { IncomingMessage, Server, ServerResponse } from 'http' import MailDev from 'maildev' import { HttpResponse, http } from 'msw' @@ -87,7 +87,7 @@ afterAll(async () => { */ beforeEach(async () => { person = await createRandomAccount({ solidServer: 'http://localhost:3456' }) - authenticatedFetch = await getAuthenticatedFetch({ + authenticatedFetch = await v7.getAuthenticatedFetch({ email: person.email, password: person.password, provider: 'http://localhost:3456', @@ -96,14 +96,14 @@ beforeEach(async () => { otherPerson = await createRandomAccount({ solidServer: 'http://localhost:3456', }) - otherAuthenticatedFetch = await getAuthenticatedFetch({ + otherAuthenticatedFetch = await v7.getAuthenticatedFetch({ email: otherPerson.email, password: otherPerson.password, provider: 'http://localhost:3456', }) person3 = await createRandomAccount({ solidServer: 'http://localhost:3456' }) - authenticatedFetch3 = await getAuthenticatedFetch({ + authenticatedFetch3 = await v7.getAuthenticatedFetch({ ...person3, provider: 'http://localhost:3456', }) diff --git a/yarn.lock b/yarn.lock index db2afcc..eea39fa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4606,10 +4606,10 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -css-authn@^0.0.16: - version "0.0.16" - resolved "https://registry.npmjs.org/css-authn/-/css-authn-0.0.16.tgz#0c21d464bea29dac0bd911979ac73c71839c940a" - integrity sha512-vYXH8MGi7hPpetvYPjgLARhrDu9qYMdvWZHPsvitvrhNj4kct6u5TNQV+Fg3syNT4BQE468jXnekT9KKmQ+eAA== +css-authn@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/css-authn/-/css-authn-0.1.0.tgz#0551a86baa0245d6cc04cf8fa6e565faf0a0e022" + integrity sha512-T13bwWeaPZOLm/LAwKdXg6Fc3snLKQclcy/mrg6zkb3yJylsco2QcoXO+7YAtEiMBJ78JYFTPQFpznuGcZePcA== dependencies: "@inrupt/solid-client-authn-core" "^1.17.5" tough-cookie "^4.1.3"