diff --git a/packages/playwright/src/csp.ts b/packages/playwright/src/csp.ts index 5034dc2..e3aeb57 100644 --- a/packages/playwright/src/csp.ts +++ b/packages/playwright/src/csp.ts @@ -4,7 +4,7 @@ import { createHash } from "node:crypto"; /** * Get the CSP script hash. */ -export async function getCSPScriptHash() { +export function getCSPScriptHash() { const hash = createHash("sha256").update(getGlobalScript()).digest("base64"); return `'sha256-${hash}'`; } diff --git a/packages/playwright/src/index.cjs b/packages/playwright/src/index.cjs index 48ae471..27e11e2 100644 --- a/packages/playwright/src/index.cjs +++ b/packages/playwright/src/index.cjs @@ -3,15 +3,3 @@ const argosScreenshot = async (...args) => { return argosScreenshot(...args); }; exports.argosScreenshot = argosScreenshot; - -const getCSPScriptHash = async (...args) => { - const { getCSPScriptHash } = await import("./index.js"); - return getCSPScriptHash(...args); -}; -exports.getCSPScriptHash = getCSPScriptHash; - -const DO_NOT_USE_setMetadataConfig = async (...args) => { - const { DO_NOT_USE_setMetadataConfig } = await import("./index.js"); - return DO_NOT_USE_setMetadataConfig(...args); -}; -exports.DO_NOT_USE_setMetadataConfig = DO_NOT_USE_setMetadataConfig; diff --git a/packages/playwright/src/metadata.ts b/packages/playwright/src/metadata.ts index ecc942d..2987222 100644 --- a/packages/playwright/src/metadata.ts +++ b/packages/playwright/src/metadata.ts @@ -36,7 +36,7 @@ const metadataConfigStorage = new AsyncLocalStorage(); /** * Set the metadata config. */ -export async function setMetadataConfig(metadata: MetadataConfig) { +export function setMetadataConfig(metadata: MetadataConfig) { metadataConfigStorage.enterWith(metadata); } diff --git a/packages/storybook/src/index.ts b/packages/storybook/src/index.ts index 158e1c3..8d76458 100644 --- a/packages/storybook/src/index.ts +++ b/packages/storybook/src/index.ts @@ -70,7 +70,7 @@ export async function argosScreenshot( const version = await getArgosStorybookVersion(); - await DO_NOT_USE_setMetadataConfig({ + DO_NOT_USE_setMetadataConfig({ sdk: { name: "@argos-ci/storybook", version }, playwrightLibraries: ["@storybook/test-runner"], });