diff --git a/eslint-configs/eslint-config-base/package.json b/eslint-configs/eslint-config-base/package.json index b0d83b65..dbca313b 100644 --- a/eslint-configs/eslint-config-base/package.json +++ b/eslint-configs/eslint-config-base/package.json @@ -1,7 +1,7 @@ { "name": "@inrupt/eslint-config-base", "description": "Shared eslint config for Javascript at @inrupt", - "version": "2.0.1", + "version": "2.0.2", "publishConfig": { "access": "public" }, diff --git a/eslint-configs/eslint-config-lib/package.json b/eslint-configs/eslint-config-lib/package.json index 65461e2f..6a851571 100644 --- a/eslint-configs/eslint-config-lib/package.json +++ b/eslint-configs/eslint-config-lib/package.json @@ -1,7 +1,7 @@ { "name": "@inrupt/eslint-config-lib", "description": "Shared eslint config for Typescript Libraries used at @inrupt", - "version": "2.0.1", + "version": "2.0.2", "publishConfig": { "access": "public" }, diff --git a/eslint-configs/eslint-config-react/package.json b/eslint-configs/eslint-config-react/package.json index d57d48b6..c9974c5f 100644 --- a/eslint-configs/eslint-config-react/package.json +++ b/eslint-configs/eslint-config-react/package.json @@ -1,7 +1,7 @@ { "name": "@inrupt/eslint-config-react", "description": "Shared eslint config for React projects at @inrupt", - "version": "2.0.1", + "version": "2.0.2", "publishConfig": { "access": "public" }, diff --git a/lerna.json b/lerna.json index 0566f0a2..00bd52ec 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { "useNx": true, "useWorkspaces": true, - "version": "2.0.1" + "version": "2.0.2" } diff --git a/package-lock.json b/package-lock.json index a5f64811..d14cd597 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ }, "eslint-configs/eslint-config-base": { "name": "@inrupt/eslint-config-base", - "version": "2.0.1", + "version": "2.0.2", "license": "MIT", "dependencies": { "eslint": ">=8.43.0", @@ -84,7 +84,7 @@ }, "eslint-configs/eslint-config-lib": { "name": "@inrupt/eslint-config-lib", - "version": "2.0.1", + "version": "2.0.2", "license": "MIT", "dependencies": { "@inrupt/eslint-config-base": "file:../eslint-config-base", @@ -95,7 +95,7 @@ }, "eslint-configs/eslint-config-react": { "name": "@inrupt/eslint-config-react", - "version": "2.0.1", + "version": "2.0.2", "license": "MIT", "dependencies": { "@babel/eslint-parser": "^7.22.5", @@ -14594,11 +14594,11 @@ }, "packages/internal-playwright-helpers": { "name": "@inrupt/internal-playwright-helpers", - "version": "2.0.1", + "version": "2.0.2", "license": "MIT", "dependencies": { - "@inrupt/internal-playwright-testids": "2.0.1", - "@inrupt/internal-test-env": "2.0.1" + "@inrupt/internal-playwright-testids": "2.0.2", + "@inrupt/internal-test-env": "2.0.2" }, "peerDependencies": { "@playwright/test": "^1.28.1" @@ -14606,12 +14606,12 @@ }, "packages/internal-playwright-testids": { "name": "@inrupt/internal-playwright-testids", - "version": "2.0.1", + "version": "2.0.2", "license": "MIT" }, "packages/internal-test-env": { "name": "@inrupt/internal-test-env", - "version": "2.0.1", + "version": "2.0.2", "license": "MIT", "dependencies": { "@inrupt/solid-client": "^1.29.0", @@ -14624,7 +14624,7 @@ }, "packages/jest-jsdom-polyfills": { "name": "@inrupt/jest-jsdom-polyfills", - "version": "2.0.1", + "version": "2.0.2", "license": "MIT", "dependencies": { "@peculiar/webcrypto": "^1.4.0", @@ -15180,8 +15180,8 @@ "@inrupt/internal-playwright-helpers": { "version": "file:packages/internal-playwright-helpers", "requires": { - "@inrupt/internal-playwright-testids": "2.0.1", - "@inrupt/internal-test-env": "2.0.1" + "@inrupt/internal-playwright-testids": "2.0.2", + "@inrupt/internal-test-env": "2.0.2" } }, "@inrupt/internal-playwright-testids": { diff --git a/packages/internal-playwright-helpers/package.json b/packages/internal-playwright-helpers/package.json index 52bead48..159d1be9 100644 --- a/packages/internal-playwright-helpers/package.json +++ b/packages/internal-playwright-helpers/package.json @@ -1,6 +1,6 @@ { "name": "@inrupt/internal-playwright-helpers", - "version": "2.0.1", + "version": "2.0.2", "description": "This package provides page models for known common elements of the sdk testable UIs", "main": "dist/index.js", "module": "dist/index.es.js", @@ -20,8 +20,8 @@ } }, "dependencies": { - "@inrupt/internal-playwright-testids": "2.0.1", - "@inrupt/internal-test-env": "2.0.1" + "@inrupt/internal-playwright-testids": "2.0.2", + "@inrupt/internal-test-env": "2.0.2" }, "peerDependencies": { "@playwright/test": "^1.28.1" diff --git a/packages/internal-playwright-testids/package.json b/packages/internal-playwright-testids/package.json index 91e3e233..b84b394e 100644 --- a/packages/internal-playwright-testids/package.json +++ b/packages/internal-playwright-testids/package.json @@ -1,6 +1,6 @@ { "name": "@inrupt/internal-playwright-testids", - "version": "2.0.1", + "version": "2.0.2", "description": "Shared identifiers between browser-based tests and test app.", "main": "dist/index.js", "module": "dist/index.es.js", diff --git a/packages/internal-test-env/index.ts b/packages/internal-test-env/index.ts index 75a7fa2f..e2ffe664 100644 --- a/packages/internal-test-env/index.ts +++ b/packages/internal-test-env/index.ts @@ -21,7 +21,7 @@ import { config } from "dotenv"; import { join } from "path"; import { Session } from "@inrupt/solid-client-authn-node"; -import { getAuthenticatedFetch } from '@jeswr/css-auth-utils'; +import { getAuthenticatedFetch } from "@jeswr/css-auth-utils"; import merge from "deepmerge-json"; import { createContainerInContainer, @@ -39,6 +39,7 @@ import { import { isValidUrl } from "./utils"; export const availableEnvironments = [ + "ESS Dev-2.2" as const, "ESS Dev-Next" as const, "ESS PodSpaces" as const, "NSS" as const, @@ -53,16 +54,18 @@ export type AvailableEnvironments = typeof availableEnvironments extends Array< export interface TestingEnvironmentNode extends TestingEnvironmentBase { clientCredentials: { - owner: { - type: "ESS Client Credentials", - id: string; - secret: string; - } | { - type: "CSS Client Credentials", - login: string; - password: string; - email: string; - }; + owner: + | { + type: "ESS Client Credentials"; + id: string; + secret: string; + } + | { + type: "CSS Client Credentials"; + login: string; + password: string; + email: string; + }; requestor?: { id?: string; secret?: string; @@ -130,9 +133,11 @@ function getBaseTestingEnvironment( // Load and validate target environment name. const targetEnvName = process.env.E2E_TEST_ENVIRONMENT; if (!availableEnvironments.includes(targetEnvName as AvailableEnvironments)) { - throw new Error(`Unknown environment: [${targetEnvName}]\n\nAvailable environments are ${ - availableEnvironments.map(env => `[${env}]`).join(', ') - }`); + throw new Error( + `Unknown environment: [${targetEnvName}]\n\nAvailable environments are ${availableEnvironments + .map((env) => `[${env}]`) + .join(", ")}` + ); } // Load and validate target OpenID Provider. @@ -318,18 +323,21 @@ function validateLibVars(varsToValidate: LibraryVariables): object { notificationProtocol: process.env.E2E_TEST_NOTIFICATION_PROTOCOL, vcProvider: process.env.E2E_TEST_VC_PROVIDER, clientCredentials: { - owner: process.env.E2E_TEST_ENVIRONMENT !== "CSS" ? { - type: "ESS Client Credentials", - id: process.env.E2E_TEST_OWNER_CLIENT_ID, - secret: process.env.E2E_TEST_OWNER_CLIENT_SECRET, - login: process.env.E2E_TEST_USER, - password: process.env.E2E_TEST_PASSWORD - } : { - type: "CSS Client Credentials", - login: process.env.E2E_TEST_USER, - password: process.env.E2E_TEST_PASSWORD, - email: process.env.E2E_TEST_EMAIL, - }, + owner: + process.env.E2E_TEST_ENVIRONMENT !== "CSS" + ? { + type: "ESS Client Credentials", + id: process.env.E2E_TEST_OWNER_CLIENT_ID, + secret: process.env.E2E_TEST_OWNER_CLIENT_SECRET, + login: process.env.E2E_TEST_USER, + password: process.env.E2E_TEST_PASSWORD, + } + : { + type: "CSS Client Credentials", + login: process.env.E2E_TEST_USER, + password: process.env.E2E_TEST_PASSWORD, + email: process.env.E2E_TEST_EMAIL, + }, requestor: { id: process.env.E2E_TEST_REQUESTOR_CLIENT_ID, secret: process.env.E2E_TEST_REQUESTOR_CLIENT_SECRET, @@ -349,8 +357,8 @@ export async function getAuthenticatedSession( isLoggedIn: true, // CSS WebIds are always minted in this format // with the configs that are currently available - webId: authDetails.idp + owner.login + '/profile/card#me', - sessionId: '', + webId: authDetails.idp + owner.login + "/profile/card#me", + sessionId: "", }, fetch: await getAuthenticatedFetch({ podName: owner.login, @@ -361,11 +369,10 @@ export async function getAuthenticatedSession( logout() { this.info.isLoggedIn = false; this.fetch = globalThis.fetch; - } + }, } as Session; } - const session = new Session(); await session.login({ @@ -389,26 +396,24 @@ export async function addCssPimStorage( const session = await getAuthenticatedSession(authDetails); const webId = session.info.webId; - if (!webId) - throw new Error("WebId cannot be found in session") + if (!webId) throw new Error("WebId cannot be found in session"); let dataset = await getSolidDataset(webId, { fetch: session.fetch }); const thing = getThing(dataset, webId); if (!thing) - throw new Error("WebId cannot be found in WebId profile document") - + throw new Error("WebId cannot be found in WebId profile document"); dataset = setThing( dataset, setIri( thing, "http://www.w3.org/ns/pim/space#storage", - webId.replace('profile/card#me', '') + webId.replace("profile/card#me", "") ) - ) + ); - await saveSolidDatasetAt(webId, dataset, { fetch: session.fetch }) + await saveSolidDatasetAt(webId, dataset, { fetch: session.fetch }); } export async function getPodRoot(session: Session) { diff --git a/packages/internal-test-env/package.json b/packages/internal-test-env/package.json index e7c5ad56..3c4c7fe2 100644 --- a/packages/internal-test-env/package.json +++ b/packages/internal-test-env/package.json @@ -1,6 +1,6 @@ { "name": "@inrupt/internal-test-env", - "version": "2.0.1", + "version": "2.0.2", "description": "This package provides various test environment utilities needed for jest when using the Inrupt SDKs", "main": "dist/index.js", "module": "dist/index.es.js", diff --git a/packages/jest-jsdom-polyfills/package.json b/packages/jest-jsdom-polyfills/package.json index 3fa9219d..35ce46d8 100644 --- a/packages/jest-jsdom-polyfills/package.json +++ b/packages/jest-jsdom-polyfills/package.json @@ -1,6 +1,6 @@ { "name": "@inrupt/jest-jsdom-polyfills", - "version": "2.0.1", + "version": "2.0.2", "description": "This package provides various polyfills needed on jest/jsdom when using the Inrupt SDKs", "main": "index.js", "publishConfig": {