Skip to content

Commit

Permalink
Release/2.0.2 (#234)
Browse files Browse the repository at this point in the history
* chore(release): publish 2.0.2
  • Loading branch information
chelseapinka authored Jun 26, 2023
1 parent 8d3d6cd commit c3d0fbc
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 58 deletions.
2 changes: 1 addition & 1 deletion eslint-configs/eslint-config-base/package.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion eslint-configs/eslint-config-lib/package.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion eslint-configs/eslint-config-react/package.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"useNx": true,
"useWorkspaces": true,
"version": "2.0.1"
"version": "2.0.2"
}
22 changes: 11 additions & 11 deletions 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 packages/internal-playwright-helpers/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/internal-playwright-testids/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
79 changes: 42 additions & 37 deletions packages/internal-test-env/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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;
Expand Down Expand Up @@ -130,9 +133,11 @@ function getBaseTestingEnvironment<T extends LibraryVariables>(
// 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.
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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({
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion packages/internal-test-env/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-jsdom-polyfills/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit c3d0fbc

Please sign in to comment.