diff --git a/.github/workflows/publish-staging-packages.yaml b/.github/workflows/publish-staging-packages.yaml index c6daf816..c4451859 100644 --- a/.github/workflows/publish-staging-packages.yaml +++ b/.github/workflows/publish-staging-packages.yaml @@ -6,8 +6,9 @@ on: - staging jobs: - npm-publish: + npm-publish-staging: runs-on: ubuntu-22.04 + environment: staging steps: - uses: actions/checkout@v3 diff --git a/lerna.json b/lerna.json index 8c51a867..c3e14247 100644 --- a/lerna.json +++ b/lerna.json @@ -3,7 +3,7 @@ "packages/*" ], "npmClient": "yarn", - "version": "1.0.6", + "version": "1.0.7", "changelogPreset": { "name": "conventionalcommits", "issuePrefixes": [ diff --git a/packages/actions/package.json b/packages/actions/package.json index f075f9dc..30ba797f 100644 --- a/packages/actions/package.json +++ b/packages/actions/package.json @@ -1,6 +1,6 @@ { "name": "@p0tion/actions", - "version": "1.0.6", + "version": "1.0.7", "description": "A set of actions and helpers for CLI commands", "repository": "git@github.com:privacy-scaling-explorations/p0tion.git", "homepage": "https://github.com/privacy-scaling-explorations/p0tion", @@ -55,10 +55,6 @@ "firebase": "^9.21.0", "firebase-admin": "^11.8.0", "googleapis": "^118.0.0", - "puppeteer": "^20.1.2", - "puppeteer-extra": "^3.3.6", - "puppeteer-extra-plugin-anonymize-ua": "^2.4.6", - "puppeteer-extra-plugin-stealth": "^2.11.2", "rimraf": "^5.0.0", "rollup": "^3.21.6", "snarkjs": "^0.6.11", diff --git a/packages/actions/test/unit/security.test.ts b/packages/actions/test/unit/security.test.ts index d0753fe2..ea805feb 100644 --- a/packages/actions/test/unit/security.test.ts +++ b/packages/actions/test/unit/security.test.ts @@ -5,11 +5,9 @@ import { signOut, signInWithEmailAndPassword, OAuthCredential, - GithubAuthProvider, signInAnonymously } from "firebase/auth" import { where } from "firebase/firestore" -import { createOAuthDeviceAuth } from "@octokit/auth-oauth-device" import { randomBytes } from "crypto" import { fakeCeremoniesData, fakeCircuitsData, fakeParticipantsData, fakeUsersData } from "../data/samples" import { @@ -60,7 +58,6 @@ import { mockCeremoniesCleanup, deleteAdminApp } from "../utils" -import { simulateOnVerification } from "../utils/authentication" chai.use(chaiAsPromised) @@ -861,66 +858,6 @@ describe("Security", () => { "Firebase: Invalid IdP response/credential: http://localhost?&providerId=undefined (auth/invalid-credential-or-provider-id)." ) }) - /// @note If a token has been invalidated, this shuold not allow to access Firebase again - /// @todo might not be able to test this in code since it requires revoking access on GitHub - it.skip("should not be able to authenticate with a token after this is invalidated", async () => { - const auth = createOAuthDeviceAuth({ - clientType, - clientId, - scopes: ["gist"], - onVerification: simulateOnVerification - }) - const { token } = await auth({ - type: tokenType - }) - // Get and exchange credentials. - const userFirebaseCredentials = GithubAuthProvider.credential(token) - await signInToFirebaseWithCredentials(userApp, userFirebaseCredentials) - const user = getCurrentFirebaseAuthUser(userApp) - userId = user.uid - - await signOut(userAuth) - - // @todo how to revoke the token programmatically? - await signInToFirebaseWithCredentials(userApp, userFirebaseCredentials) - }) - /// @note A malicious user should not be able to create multiple malicious accounts - /// to spam a ceremony - // @todo requires adding the checks to the cloud function - it("should prevent a user with a non reputable GitHub account from authenticating to the Firebase", async () => {}) - /// @note If a coordinator disables an account, this should not be allowed to authenticate - /// @note test requires a working OAuth2 emulation (puppeteer) - it.skip("should prevent a disabled account from loggin in (OAuth2)", async () => { - const auth = createOAuthDeviceAuth({ - clientType, - clientId, - scopes: ["gist"], - onVerification: simulateOnVerification - }) - const { token } = await auth({ - type: tokenType - }) - // Get and exchange credentials. - const userFirebaseCredentials = GithubAuthProvider.credential(token) - await signInToFirebaseWithCredentials(userApp, userFirebaseCredentials) - - const user = getCurrentFirebaseAuthUser(userApp) - userId = user.uid - // Disable user. - const disabledRecord = await adminAuth.updateUser(user.uid, { disabled: true }) - expect(disabledRecord.disabled).to.be.true - - await signOut(userAuth) - - await expect(signInToFirebaseWithCredentials(userApp, userFirebaseCredentials)).to.be.rejectedWith( - "Firebase: Error (auth/user-disabled)." - ) - - // Re-enable user. - // Disable user. - const reEnabledRecord = await adminAuth.updateUser(user.uid, { disabled: false }) - expect(reEnabledRecord.disabled).to.be.false - }) /// @note Firebase should lock out an account after a large number of failed authentication attempts /// to prevent brute force attacks it("should lock out an account after a large number of failed attempts", async () => { @@ -939,34 +876,6 @@ describe("Security", () => { "FirebaseError: Firebase: Access to this account has been temporarily disabled due to many failed login attempts. You can immediately restore it by resetting your password or you can try again later. (auth/too-many-requests)." ) }) - it.skip("should error out and prevent further authentication attempts after authenticating with the correct OAuth2 token many times (could prevent other users from authenticating)", async () => { - let err: any - const auth = createOAuthDeviceAuth({ - clientType, - clientId, - scopes: ["gist"], - onVerification: simulateOnVerification - }) - const { token } = await auth({ - type: tokenType - }) - // Get and exchange credentials. - const userFirebaseCredentials = GithubAuthProvider.credential(token) - for (let i = 0; i < 1000; i++) { - try { - await signInToFirebaseWithCredentials(userApp, userFirebaseCredentials) - } catch (error: any) { - err = error - break - } - } - expect( - err.toString() === "FirebaseError: Firebase: Error (auth/user-disabled)." || - err.toString() === "FirebaseError: Firebase: Error (auth/network-request-failed)." || - err.toString() === - "FirebaseError: Firebase: Malformed response cannot be parsed from github.com for USER_INFO (auth/invalid-credential)." - ).to.be.true - }) /// @note Firebase should enforce rate limiting to prevent denial of service or consumption of resources /// scenario where one user tries to authenticate many times consecutively with the correct details /// to try and block the authentication service for other users diff --git a/packages/actions/test/utils/authentication.ts b/packages/actions/test/utils/authentication.ts index d9046f48..9e33214b 100644 --- a/packages/actions/test/utils/authentication.ts +++ b/packages/actions/test/utils/authentication.ts @@ -1,15 +1,8 @@ -import { Verification } from "@octokit/auth-oauth-device/dist-types/types.js" -import { PuppeteerExtra } from "puppeteer-extra" -import { expect } from "chai" -import stealthMode from "puppeteer-extra-plugin-stealth" -import anonUserAgent from "puppeteer-extra-plugin-anonymize-ua" import { google } from "googleapis" -import { createOAuthDeviceAuth } from "@octokit/auth-oauth-device" -import { createUserWithEmailAndPassword, getAuth, GithubAuthProvider, UserCredential } from "firebase/auth" +import { createUserWithEmailAndPassword, getAuth, UserCredential } from "firebase/auth" import { FirebaseApp } from "firebase/app" import { Auth } from "firebase-admin/auth" -import { getCurrentFirebaseAuthUser, isCoordinator, signInToFirebaseWithCredentials } from "../../src/index" -import { getAuthenticationConfiguration } from "./configs" +import { getCurrentFirebaseAuthUser } from "../../src/index" import { UserDocumentReferenceAndData } from "../../src/types/index" /** @@ -92,431 +85,6 @@ export const getLastGithubVerificationCode = async ( return otp } -/** - * Simulate callback to manage the data requested for Github OAuth2.0 device flow. - * @param verification - the data from Github OAuth2.0 device flow. - * @todo this method will not be used for testing right now. See PR #286 and #289 for info. - */ -export const simulateOnVerification = async (verification: Verification): Promise => { - // 0.A Prepare data and plugins. - const { userEmail, githubUserPw, gmailClientId, gmailClientSecret, gmailRedirectUrl, gmailRefreshToken } = - getAuthenticationConfiguration() - const puppeteerExtra = new PuppeteerExtra() - puppeteerExtra.use(stealthMode()) - puppeteerExtra.use(anonUserAgent({ stripHeadless: true })) - - // 0.B Browser and page. - const args = [ - "--no-sandbox", - "--disable-setuid-sandbox", - // Get rid of cache and temp files. - "--aggressive-cache-discard", - "--disable-cache", - "--disable-application-cache", - "--disable-offline-load-stale-cache", - "--disable-gpu-shader-disk-cache", - "--media-cache-size=0", - "--disk-cache-size=0", - // Increase speed and network throughput. - "--disable-extensions", - "--disable-component-extensions-with-background-pages", - "--disable-default-apps", - "--mute-audio", - "--no-default-browser-check", - "--autoplay-policy=user-gesture-required", - "--disable-background-timer-throttling", - "--disable-backgrounding-occluded-windows", - "--disable-notifications", - "--disable-background-networking", - "--disable-breakpad", - "--disable-component-update", - "--disable-domain-reliability", - "--disable-sync" - ] - - // Switch to 'headless: false' to debug using the Chrome browser. - const browser = await puppeteerExtra.launch({ args, headless: true, channel: "chrome" }) - const ghPage = await browser.newPage() - - // 1. Navigate to Github login to execute device flow OAuth. - ghPage.goto(verification.verification_uri) - await Promise.race([ - ghPage.waitForNavigation({ waitUntil: "domcontentloaded" }), - ghPage.waitForNavigation({ waitUntil: "load" }) - ]) - - // Type data. - await ghPage.waitForSelector(`.js-login-field`, { visible: true }) - await ghPage.waitForSelector(`.js-password-field`, { visible: true }) - - await ghPage.type(".js-login-field", userEmail, { delay: 100 }) - await ghPage.type(".js-password-field", githubUserPw, { delay: 100 }) - - // Confirm. - await Promise.all([await ghPage.keyboard.press("Enter"), await ghPage.waitForNavigation()]) - - await sleep(2000) // 2sec. to receive email. - - if ((await ghPage.$(`.js-verification-code-input-auto-submit`)) !== null) { - // 2. Get verification code from GMail using APIs. - const verificationCode = await getLastGithubVerificationCode( - userEmail, - gmailClientId, - gmailClientSecret, - gmailRedirectUrl, - gmailRefreshToken - ) - - // 1.3 Input verification code and complete sign-in. - await ghPage.waitForSelector(`.js-verification-code-input-auto-submit`, { timeout: 10000, visible: true }) - await ghPage.type(".js-verification-code-input-auto-submit", verificationCode, { delay: 100 }) - // Confirm. - await Promise.all([await ghPage.keyboard.press("Enter"), await ghPage.waitForNavigation()]) - } - - // 2. Insert code for device activation. - // Get input slots for digits besides the fourth ('-' char). - const userCode0 = await ghPage.$("#user-code-0") - const userCode1 = await ghPage.$("#user-code-1") - const userCode2 = await ghPage.$("#user-code-2") - const userCode3 = await ghPage.$("#user-code-3") - const userCode5 = await ghPage.$("#user-code-5") - const userCode6 = await ghPage.$("#user-code-6") - const userCode7 = await ghPage.$("#user-code-7") - const userCode8 = await ghPage.$("#user-code-8") - // Type digits. - await userCode0?.type(verification.user_code[0], { delay: 100 }) - await userCode1?.type(verification.user_code[1], { delay: 100 }) - await userCode2?.type(verification.user_code[2], { delay: 100 }) - await userCode3?.type(verification.user_code[3], { delay: 100 }) - await userCode5?.type(verification.user_code[5], { delay: 100 }) - await userCode6?.type(verification.user_code[6], { delay: 100 }) - await userCode7?.type(verification.user_code[7], { delay: 100 }) - await userCode8?.type(verification.user_code[8], { delay: 100 }) - // Progress. - const continueButton = await ghPage.$('[name="commit"]') - await Promise.all([await continueButton?.click(), ghPage.waitForNavigation()]) - - // 3. Confirm authorization for association of account and application. - await sleep(2000) // wait for authorize button be clickable. - - const authorizeButton = await ghPage.$('[id="js-oauth-authorize-btn"]') - await Promise.all([await authorizeButton?.click(), ghPage.waitForNavigation()]) - - // 4. Check for completion and close browser. - const completedTextElem = await ghPage.$("p[class='text-center']") - await Promise.all([ - expect(await (await completedTextElem?.getProperty("textContent"))?.jsonValue()).to.be.equal( - "Your device is now connected." - ), - await browser.close() // Close browser. - ]) -} - -/** - * Simulate callback to cancel authorization for Github OAuth2.0 device flow. - * @param verification - the data from Github OAuth2.0 device flow. - * @todo this method will not be used for testing right now. See PR #286 and #289 for info. - */ -export const simulateCancelledOnVerification = async (verification: Verification): Promise => { - // 0.A Prepare data and plugins. - const { userEmail, githubUserPw, gmailClientId, gmailClientSecret, gmailRedirectUrl, gmailRefreshToken } = - getAuthenticationConfiguration() - const puppeteerExtra = new PuppeteerExtra() - puppeteerExtra.use(stealthMode()) - puppeteerExtra.use(anonUserAgent({ stripHeadless: true })) - - // 0.B Browser and page. - const args = [ - "--no-sandbox", - "--disable-setuid-sandbox", - // Get rid of cache and temp files. - "--aggressive-cache-discard", - "--disable-cache", - "--disable-application-cache", - "--disable-offline-load-stale-cache", - "--disable-gpu-shader-disk-cache", - "--media-cache-size=0", - "--disk-cache-size=0", - // Increase speed and network throughput. - "--disable-extensions", - "--disable-component-extensions-with-background-pages", - "--disable-default-apps", - "--mute-audio", - "--no-default-browser-check", - "--autoplay-policy=user-gesture-required", - "--disable-background-timer-throttling", - "--disable-backgrounding-occluded-windows", - "--disable-notifications", - "--disable-background-networking", - "--disable-breakpad", - "--disable-component-update", - "--disable-domain-reliability", - "--disable-sync" - ] - - // Switch to 'headless: false' to debug using the Chrome browser. - const browser = await puppeteerExtra.launch({ args, headless: true, channel: "chrome" }) - const ghPage = await browser.newPage() - - // 1. Navigate to Github login to execute device flow OAuth. - ghPage.goto(verification.verification_uri) - await Promise.race([ - ghPage.waitForNavigation({ waitUntil: "domcontentloaded" }), - ghPage.waitForNavigation({ waitUntil: "load" }) - ]) - - // Type data. - await ghPage.waitForSelector(`.js-login-field`, { visible: true }) - await ghPage.waitForSelector(`.js-password-field`, { visible: true }) - - await ghPage.type(".js-login-field", userEmail, { delay: 100 }) - await ghPage.type(".js-password-field", githubUserPw, { delay: 100 }) - - // Confirm. - await Promise.all([await ghPage.keyboard.press("Enter"), await ghPage.waitForNavigation()]) - - await sleep(2000) // 2sec. to receive email. - - if ((await ghPage.$(`.js-verification-code-input-auto-submit`)) !== null) { - // 2. Get verification code from GMail using APIs. - const verificationCode = await getLastGithubVerificationCode( - userEmail, - gmailClientId, - gmailClientSecret, - gmailRedirectUrl, - gmailRefreshToken - ) - - // 1.3 Input verification code and complete sign-in. - await ghPage.waitForSelector(`.js-verification-code-input-auto-submit`, { timeout: 10000, visible: true }) - await ghPage.type(".js-verification-code-input-auto-submit", verificationCode, { delay: 100 }) - // Confirm. - await Promise.all([await ghPage.keyboard.press("Enter"), await ghPage.waitForNavigation()]) - } - - // 2. Insert code for device activation. - // Get input slots for digits besides the fourth ('-' char). - const userCode0 = await ghPage.$("#user-code-0") - const userCode1 = await ghPage.$("#user-code-1") - const userCode2 = await ghPage.$("#user-code-2") - const userCode3 = await ghPage.$("#user-code-3") - const userCode5 = await ghPage.$("#user-code-5") - const userCode6 = await ghPage.$("#user-code-6") - const userCode7 = await ghPage.$("#user-code-7") - const userCode8 = await ghPage.$("#user-code-8") - // Type digits. - await userCode0?.type(verification.user_code[0], { delay: 100 }) - await userCode1?.type(verification.user_code[1], { delay: 100 }) - await userCode2?.type(verification.user_code[2], { delay: 100 }) - await userCode3?.type(verification.user_code[3], { delay: 100 }) - await userCode5?.type(verification.user_code[5], { delay: 100 }) - await userCode6?.type(verification.user_code[6], { delay: 100 }) - await userCode7?.type(verification.user_code[7], { delay: 100 }) - await userCode8?.type(verification.user_code[8], { delay: 100 }) - // Progress. - const continueButton = await ghPage.$('[name="commit"]') - await Promise.all([await continueButton?.click(), ghPage.waitForNavigation()]) - - // 3. Confirm authorization for association of account and application. - await sleep(2000) // wait for authorize button be clickable. - - const cancelButton = await ghPage.$('button[value="0"]') - await Promise.all([await cancelButton?.click(), ghPage.waitForNavigation()]) - - await browser.close() -} - -/** - * Simulate callback sending an invalid device code for Github OAuth2.0 device flow. - * @param verification - the data from Github OAuth2.0 device flow. - * @todo this method will not be used for testing right now. See PR #286 and #289 for info. - */ -export const simulateInvalidTokenOnVerification = async (verification: Verification): Promise => { - // 0.A Prepare data and plugins. - const { userEmail, githubUserPw, gmailClientId, gmailClientSecret, gmailRedirectUrl, gmailRefreshToken } = - getAuthenticationConfiguration() - const puppeteerExtra = new PuppeteerExtra() - puppeteerExtra.use(stealthMode()) - puppeteerExtra.use(anonUserAgent({ stripHeadless: true })) - - // 0.B Browser and page. - const args = [ - "--no-sandbox", - "--disable-setuid-sandbox", - // Get rid of cache and temp files. - "--aggressive-cache-discard", - "--disable-cache", - "--disable-application-cache", - "--disable-offline-load-stale-cache", - "--disable-gpu-shader-disk-cache", - "--media-cache-size=0", - "--disk-cache-size=0", - // Increase speed and network throughput. - "--disable-extensions", - "--disable-component-extensions-with-background-pages", - "--disable-default-apps", - "--mute-audio", - "--no-default-browser-check", - "--autoplay-policy=user-gesture-required", - "--disable-background-timer-throttling", - "--disable-backgrounding-occluded-windows", - "--disable-notifications", - "--disable-background-networking", - "--disable-breakpad", - "--disable-component-update", - "--disable-domain-reliability", - "--disable-sync" - ] - - // Switch to 'headless: false' to debug using the Chrome browser. - const browser = await puppeteerExtra.launch({ args, headless: true, channel: "chrome" }) - const ghPage = await browser.newPage() - - // 1. Navigate to Github login to execute device flow OAuth. - ghPage.goto(verification.verification_uri) - await Promise.race([ - ghPage.waitForNavigation({ waitUntil: "domcontentloaded" }), - ghPage.waitForNavigation({ waitUntil: "load" }) - ]) - - // Type data. - await ghPage.waitForSelector(`.js-login-field`, { visible: true }) - await ghPage.waitForSelector(`.js-password-field`, { visible: true }) - - await ghPage.type(".js-login-field", userEmail, { delay: 100 }) - await ghPage.type(".js-password-field", githubUserPw, { delay: 100 }) - - // Confirm. - await Promise.all([await ghPage.keyboard.press("Enter"), await ghPage.waitForNavigation()]) - - await sleep(2000) // 2sec. to receive email. - - if ((await ghPage.$(`.js-verification-code-input-auto-submit`)) !== null) { - // 2. Get verification code from GMail using APIs. - const verificationCode = await getLastGithubVerificationCode( - userEmail, - gmailClientId, - gmailClientSecret, - gmailRedirectUrl, - gmailRefreshToken - ) - - // 1.3 Input verification code and complete sign-in. - await ghPage.waitForSelector(`.js-verification-code-input-auto-submit`, { timeout: 10000, visible: true }) - await ghPage.type(".js-verification-code-input-auto-submit", verificationCode, { delay: 100 }) - // Confirm. - await Promise.all([await ghPage.keyboard.press("Enter"), await ghPage.waitForNavigation()]) - } - - // 2. Insert code for device activation. - // Get input slots for digits besides the fourth ('-' char). - const userCode0 = await ghPage.$("#user-code-0") - const userCode1 = await ghPage.$("#user-code-1") - const userCode2 = await ghPage.$("#user-code-2") - const userCode3 = await ghPage.$("#user-code-3") - const userCode5 = await ghPage.$("#user-code-5") - const userCode6 = await ghPage.$("#user-code-6") - const userCode7 = await ghPage.$("#user-code-7") - const userCode8 = await ghPage.$("#user-code-8") - // @test Type wrong digits - await userCode0?.type("1", { delay: 100 }) - await userCode1?.type("2", { delay: 100 }) - await userCode2?.type("3", { delay: 100 }) - await userCode3?.type("4", { delay: 100 }) - await userCode5?.type("5", { delay: 100 }) - await userCode6?.type("6", { delay: 100 }) - await userCode7?.type("7", { delay: 100 }) - await userCode8?.type("8", { delay: 100 }) - // Progress. - const continueButton = await ghPage.$('[name="commit"]') - await Promise.all([await continueButton?.click(), ghPage.waitForNavigation()]) - - await browser.close() -} - -/** - * Simulate callback for unreachable GitHub website for Github OAuth2.0 device flow. - * @param verification - the data from Github OAuth2.0 device flow. - * @todo this method will not be used for testing right now. See PR #286 and #289 for info. - */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -export const simulateUnreachablePageOnVerification = async (verification: Verification): Promise => { - const puppeteerExtra = new PuppeteerExtra() - puppeteerExtra.use(stealthMode()) - puppeteerExtra.use(anonUserAgent({ stripHeadless: true })) - - // 0.B Browser and page. - const args = [ - "--no-sandbox", - "--disable-setuid-sandbox", - // Get rid of cache and temp files. - "--aggressive-cache-discard", - "--disable-cache", - "--disable-application-cache", - "--disable-offline-load-stale-cache", - "--disable-gpu-shader-disk-cache", - "--media-cache-size=0", - "--disk-cache-size=0", - // Increase speed and network throughput. - "--disable-extensions", - "--disable-component-extensions-with-background-pages", - "--disable-default-apps", - "--mute-audio", - "--no-default-browser-check", - "--autoplay-policy=user-gesture-required", - "--disable-background-timer-throttling", - "--disable-backgrounding-occluded-windows", - "--disable-notifications", - "--disable-background-networking", - "--disable-breakpad", - "--disable-component-update", - "--disable-domain-reliability", - "--disable-sync" - ] - - // Switch to 'headless: false' to debug using the Chrome browser. - const browser = await puppeteerExtra.launch({ args, headless: true, channel: "chrome" }) - const ghPage = await browser.newPage() - - await sleep(2000) // 2sec. to receive email. - - // 1. Navigate to Github login to execute device flow OAuth. - ghPage.goto("https://g1thub.com/login/device") - - await sleep(2000) - - await browser.close() -} - -/** - * Reproduce the Github Device Flow OAuth2.0 and Firebase credential handshake to authenticate a user. - * @notice This works only in production environment. (nb. we need to address the issue on the 'onVerification' before using this). - * @param userApp - the Firebase user Application instance. - * @param clientId - the Github client id. - * @returns > - the credential of the user after the handshake with Firebase. - * @todo this method will not be used for testing right now. See PR #286 and #289 for info. - */ -export const authenticateUserWithGithub = async (userApp: FirebaseApp, clientId: string): Promise => { - const clientType = "oauth-app" - const tokenType = "oauth" - - const auth = createOAuthDeviceAuth({ - clientType, - clientId, - scopes: ["gist"], - onVerification: simulateOnVerification - }) - - // Get the access token. - const { token } = await auth({ - type: tokenType - }) - - // Get and exchange credentials. - const userFirebaseCredentials = GithubAuthProvider.credential(token) - return signInToFirebaseWithCredentials(userApp, userFirebaseCredentials) -} /** * Test function to set custom claims of a user. diff --git a/packages/actions/test/utils/index.ts b/packages/actions/test/utils/index.ts index 7f81447e..d46eaa3c 100644 --- a/packages/actions/test/utils/index.ts +++ b/packages/actions/test/utils/index.ts @@ -33,6 +33,5 @@ export { generateUserPasswords, setCustomClaims, sleep, - authenticateUserWithGithub, generatePseudoRandomStringOfNumbers } from "./authentication" diff --git a/packages/backend/package.json b/packages/backend/package.json index 631890fa..9a4bee8f 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "@p0tion/backend", - "version": "1.0.6", + "version": "1.0.7", "description": "MPC Phase 2 backend for Firebase services management", "repository": "git@github.com:privacy-scaling-explorations/p0tion.git", "homepage": "https://github.com/privacy-scaling-explorations/p0tion", @@ -67,7 +67,7 @@ "@aws-sdk/client-ssm": "^3.357.0", "@aws-sdk/middleware-endpoint": "^3.329.0", "@aws-sdk/s3-request-presigner": "^3.329.0", - "@p0tion/actions": "^1.0.6", + "@p0tion/actions": "^1.0.7", "blakejs": "^1.2.1", "dotenv": "^16.0.3", "ethers": "5.7.2", diff --git a/packages/backend/src/functions/timeout.ts b/packages/backend/src/functions/timeout.ts index 42cfe9e7..fef42461 100644 --- a/packages/backend/src/functions/timeout.ts +++ b/packages/backend/src/functions/timeout.ts @@ -281,7 +281,8 @@ export const resumeContributionAfterTimeoutExpiration = functions if (status === ParticipantStatus.EXHUMED) await participantDoc.ref.update({ status: ParticipantStatus.READY, - lastUpdated: getCurrentServerTimestampInMillis() + lastUpdated: getCurrentServerTimestampInMillis(), + tempContributionData: {} }) else logAndThrowError(SPECIFIC_ERRORS.SE_CONTRIBUTE_CANNOT_PROGRESS_TO_NEXT_CIRCUIT) diff --git a/packages/phase2cli/package.json b/packages/phase2cli/package.json index ab13dfe0..6654b19b 100644 --- a/packages/phase2cli/package.json +++ b/packages/phase2cli/package.json @@ -1,7 +1,7 @@ { "name": "@p0tion/phase2cli", "type": "module", - "version": "1.0.6", + "version": "1.0.7", "description": "All-in-one interactive command-line for interfacing with zkSNARK Phase 2 Trusted Setup ceremonies", "repository": "git@github.com:privacy-scaling-explorations/p0tion.git", "homepage": "https://github.com/privacy-scaling-explorations/p0tion", @@ -68,7 +68,7 @@ "@octokit/auth-oauth-app": "^5.0.5", "@octokit/auth-oauth-device": "^4.0.4", "@octokit/request": "^6.2.3", - "@p0tion/actions": "^1.0.6", + "@p0tion/actions": "^1.0.7", "blakejs": "^1.2.1", "boxen": "^7.1.0", "chalk": "^5.2.0", diff --git a/packages/phase2cli/src/commands/finalize.ts b/packages/phase2cli/src/commands/finalize.ts index 4509c907..c7184f9a 100644 --- a/packages/phase2cli/src/commands/finalize.ts +++ b/packages/phase2cli/src/commands/finalize.ts @@ -36,9 +36,9 @@ import { sleep, terminate } from "../lib/utils.js" -import { bootstrapCommandExecutionAndServices, checkAuth } from "../lib/services.js" +import { authWithToken, bootstrapCommandExecutionAndServices, checkAuth } from "../lib/services.js" import { - getAttestationLocalFilePath, + getFinalAttestationLocalFilePath, getFinalZkeyLocalFilePath, getVerificationKeyLocalFilePath, getVerifierContractLocalFilePath, @@ -112,7 +112,7 @@ export const handleVerifierSmartContract = async ( ? `${dirname( fileURLToPath(import.meta.url) )}/../../../../node_modules/snarkjs/templates/verifier_groth16.sol.ejs` - : `${dirname(fileURLToPath(import.meta.url))}/../../../node_modules/snarkjs/templates/verifier_groth16.sol.ejs` + : `${dirname(fileURLToPath(import.meta.url))}/../node_modules/snarkjs/templates/verifier_groth16.sol.ejs` // Export the Solidity verifier smart contract. const verifierCode = await exportVerifierContract(finalZkeyLocalFilePath, verifierPath) @@ -241,11 +241,12 @@ export const handleCircuitFinalization = async ( * @dev For proper execution, the command requires the coordinator to be authenticated with a GitHub account (run auth command first) in order to * handle sybil-resistance and connect to GitHub APIs to publish the gist containing the final public attestation. */ -const finalize = async () => { +const finalize = async (opt: any) => { const { firebaseApp, firebaseFunctions, firestoreDatabase } = await bootstrapCommandExecutionAndServices() // Check for authentication. - const { user, providerUserId, token: coordinatorAccessToken } = await checkAuth(firebaseApp) + const auth = opt.auth + const { user, providerUserId, token: coordinatorAccessToken } = auth ? await authWithToken(firebaseApp, auth) : await checkAuth(firebaseApp) // Preserve command execution only for coordinators. if (!(await isCoordinator(user))) showError(COMMAND_ERRORS.COMMAND_NOT_COORDINATOR, true) @@ -344,7 +345,7 @@ const finalize = async () => { // Write public attestation locally. writeFile( - getAttestationLocalFilePath( + getFinalAttestationLocalFilePath( `${prefix}_${finalContributionIndex}_${commonTerms.foldersAndPathsTerms.attestation}.log` ), Buffer.from(publicAttestation) diff --git a/packages/phase2cli/src/index.ts b/packages/phase2cli/src/index.ts index b2a55e5f..dc6f385e 100755 --- a/packages/phase2cli/src/index.ts +++ b/packages/phase2cli/src/index.ts @@ -62,6 +62,7 @@ ceremony .description( "finalize a Phase2 Trusted Setup ceremony by applying a beacon, exporting verification key and verifier contract" ) + .option("-a, --auth ", "the Github OAuth 2.0 token", "") .action(finalize) program.parseAsync(process.argv) diff --git a/yarn.lock b/yarn.lock index ebd456a7..59ee31b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6140,7 +6140,7 @@ __metadata: languageName: node linkType: hard -"@p0tion/actions@^1.0.6, @p0tion/actions@workspace:packages/actions": +"@p0tion/actions@^1.0.7, @p0tion/actions@workspace:packages/actions": version: 0.0.0-use.local resolution: "@p0tion/actions@workspace:packages/actions" dependencies: @@ -6167,10 +6167,6 @@ __metadata: firebase-admin: ^11.8.0 googleapis: ^118.0.0 hardhat: ^2.14.0 - puppeteer: ^20.1.2 - puppeteer-extra: ^3.3.6 - puppeteer-extra-plugin-anonymize-ua: ^2.4.6 - puppeteer-extra-plugin-stealth: ^2.11.2 rimraf: ^5.0.0 rollup: ^3.21.6 rollup-plugin-auto-external: ^2.0.0 @@ -6195,7 +6191,7 @@ __metadata: "@aws-sdk/middleware-endpoint": ^3.329.0 "@aws-sdk/s3-request-presigner": ^3.329.0 "@firebase/rules-unit-testing": ^2.0.7 - "@p0tion/actions": ^1.0.6 + "@p0tion/actions": ^1.0.7 "@types/rollup-plugin-auto-external": ^2.0.2 "@types/uuid": ^9.0.1 blakejs: ^1.2.1 @@ -6229,7 +6225,7 @@ __metadata: "@octokit/auth-oauth-app": ^5.0.5 "@octokit/auth-oauth-device": ^4.0.4 "@octokit/request": ^6.2.3 - "@p0tion/actions": ^1.0.6 + "@p0tion/actions": ^1.0.7 "@types/clear": ^0.1.2 "@types/cli-progress": ^3.11.0 "@types/figlet": ^1.5.6 @@ -6382,30 +6378,6 @@ __metadata: languageName: node linkType: hard -"@puppeteer/browsers@npm:1.1.0": - version: 1.1.0 - resolution: "@puppeteer/browsers@npm:1.1.0" - dependencies: - debug: 4.3.4 - extract-zip: 2.0.1 - http-proxy-agent: 5.0.0 - https-proxy-agent: 5.0.1 - progress: 2.0.3 - proxy-from-env: 1.1.0 - tar-fs: 2.1.1 - unbzip2-stream: 1.4.3 - yargs: 17.7.1 - peerDependencies: - typescript: ">= 4.7.4" - peerDependenciesMeta: - typescript: - optional: true - bin: - browsers: lib/cjs/main-cli.js - checksum: 9f7497e5d38552a912444ed41fee0ce7fa2ebb33bbdd89f900e5dc103b01baf9a2d5aed568e7604c20574c90b1447714d8f409c980a32130d6498cf913e519bd - languageName: node - linkType: hard - "@rollup/plugin-typescript@npm:^11.1.0": version: 11.1.0 resolution: "@rollup/plugin-typescript@npm:11.1.0" @@ -6812,15 +6784,6 @@ __metadata: languageName: node linkType: hard -"@types/debug@npm:^4.1.0": - version: 4.1.7 - resolution: "@types/debug@npm:4.1.7" - dependencies: - "@types/ms": "*" - checksum: 0a7b89d8ed72526858f0b61c6fd81f477853e8c4415bb97f48b1b5545248d2ae389931680b94b393b993a7cfe893537a200647d93defe6d87159b96812305adc - languageName: node - linkType: hard - "@types/duplexify@npm:^3.6.0": version: 3.6.1 resolution: "@types/duplexify@npm:3.6.1" @@ -7035,13 +6998,6 @@ __metadata: languageName: node linkType: hard -"@types/ms@npm:*": - version: 0.7.31 - resolution: "@types/ms@npm:0.7.31" - checksum: daadd354aedde024cce6f5aa873fefe7b71b22cd0e28632a69e8b677aeb48ae8caa1c60e5919bb781df040d116b01cb4316335167a3fc0ef6a63fa3614c0f6da - languageName: node - linkType: hard - "@types/node-emoji@npm:^1.8.2": version: 1.8.2 resolution: "@types/node-emoji@npm:1.8.2" @@ -7230,15 +7186,6 @@ __metadata: languageName: node linkType: hard -"@types/yauzl@npm:^2.9.1": - version: 2.10.0 - resolution: "@types/yauzl@npm:2.10.0" - dependencies: - "@types/node": "*" - checksum: 55d27ae5d346ea260e40121675c24e112ef0247649073848e5d4e03182713ae4ec8142b98f61a1c6cbe7d3b72fa99bbadb65d8b01873e5e605cdc30f1ff70ef2 - languageName: node - linkType: hard - "@typescript-eslint/eslint-plugin@npm:^5.59.5": version: 5.59.5 resolution: "@typescript-eslint/eslint-plugin@npm:5.59.5" @@ -7774,13 +7721,6 @@ __metadata: languageName: node linkType: hard -"arr-union@npm:^3.1.0": - version: 3.1.0 - resolution: "arr-union@npm:3.1.0" - checksum: b5b0408c6eb7591143c394f3be082fee690ddd21f0fdde0a0a01106799e847f67fcae1b7e56b0a0c173290e29c6aca9562e82b300708a268bc8f88f3d6613cb9 - languageName: node - linkType: hard - "array-buffer-byte-length@npm:^1.0.0": version: 1.0.0 resolution: "array-buffer-byte-length@npm:1.0.0" @@ -8482,7 +8422,7 @@ __metadata: languageName: node linkType: hard -"buffer-crc32@npm:^0.2.1, buffer-crc32@npm:^0.2.13, buffer-crc32@npm:~0.2.3": +"buffer-crc32@npm:^0.2.1, buffer-crc32@npm:^0.2.13": version: 0.2.13 resolution: "buffer-crc32@npm:0.2.13" checksum: 06252347ae6daca3453b94e4b2f1d3754a3b146a111d81c68924c22d91889a40623264e95e67955b1cb4a68cbedf317abeabb5140a9766ed248973096db5ce1c @@ -8510,7 +8450,7 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^5.2.1, buffer@npm:^5.5.0": +"buffer@npm:^5.5.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" dependencies: @@ -8810,13 +8750,6 @@ __metadata: languageName: node linkType: hard -"chownr@npm:^1.1.1": - version: 1.1.4 - resolution: "chownr@npm:1.1.4" - checksum: 115648f8eb38bac5e41c3857f3e663f9c39ed6480d1349977c4d96c95a47266fcacc5a5aabf3cb6c481e22d72f41992827db47301851766c4fd77ac21a4f081d - languageName: node - linkType: hard - "chownr@npm:^2.0.0": version: 2.0.0 resolution: "chownr@npm:2.0.0" @@ -8824,17 +8757,6 @@ __metadata: languageName: node linkType: hard -"chromium-bidi@npm:0.4.7": - version: 0.4.7 - resolution: "chromium-bidi@npm:0.4.7" - dependencies: - mitt: 3.0.0 - peerDependencies: - devtools-protocol: "*" - checksum: eec7581e2eddd2c95014c6edc5aae0b036c79bbeadee05166436b16139b6932c902c5ce21d95ed919a592f58d3a47c5469dc5f3de2a300700b2748ab119ad65e - languageName: node - linkType: hard - "ci-info@npm:^2.0.0": version: 2.0.0 resolution: "ci-info@npm:2.0.0" @@ -9044,19 +8966,6 @@ __metadata: languageName: node linkType: hard -"clone-deep@npm:^0.2.4": - version: 0.2.4 - resolution: "clone-deep@npm:0.2.4" - dependencies: - for-own: ^0.1.3 - is-plain-object: ^2.0.1 - kind-of: ^3.0.2 - lazy-cache: ^1.0.3 - shallow-clone: ^0.1.2 - checksum: bcf9752052130c270c47d3e1c357497354b91d682f507e0079bec5950975b3293b619d9e100d70874606d716f2376e84956b045759a09af703e1038ecad6c438 - languageName: node - linkType: hard - "clone@npm:^1.0.2": version: 1.0.4 resolution: "clone@npm:1.0.4" @@ -9506,7 +9415,7 @@ __metadata: languageName: node linkType: hard -"cosmiconfig@npm:8.1.3, cosmiconfig@npm:^8.0.0": +"cosmiconfig@npm:^8.0.0": version: 8.1.3 resolution: "cosmiconfig@npm:8.1.3" dependencies: @@ -9583,15 +9492,6 @@ __metadata: languageName: node linkType: hard -"cross-fetch@npm:3.1.5": - version: 3.1.5 - resolution: "cross-fetch@npm:3.1.5" - dependencies: - node-fetch: 2.6.7 - checksum: f6b8c6ee3ef993ace6277fd789c71b6acf1b504fd5f5c7128df4ef2f125a429e29cd62dc8c127523f04a5f2fa4771ed80e3f3d9695617f441425045f505cf3bb - languageName: node - linkType: hard - "cross-spawn@npm:^6.0.5": version: 6.0.5 resolution: "cross-spawn@npm:6.0.5" @@ -9913,13 +9813,6 @@ __metadata: languageName: node linkType: hard -"devtools-protocol@npm:0.0.1120988": - version: 0.0.1120988 - resolution: "devtools-protocol@npm:0.0.1120988" - checksum: 68eb7aa6a2fe20f8321168f9381849296b203355a5c052461b7ed95e8787b34458029dd64c8d4a8640d9fd329138a6d82f41237f5331ea4267c090dcbf6581f7 - languageName: node - linkType: hard - "diff-sequences@npm:^29.4.3": version: 29.4.3 resolution: "diff-sequences@npm:29.4.3" @@ -10879,23 +10772,6 @@ __metadata: languageName: node linkType: hard -"extract-zip@npm:2.0.1": - version: 2.0.1 - resolution: "extract-zip@npm:2.0.1" - dependencies: - "@types/yauzl": ^2.9.1 - debug: ^4.1.1 - get-stream: ^5.1.0 - yauzl: ^2.10.0 - dependenciesMeta: - "@types/yauzl": - optional: true - bin: - extract-zip: cli.js - checksum: 8cbda9debdd6d6980819cc69734d874ddd71051c9fe5bde1ef307ebcedfe949ba57b004894b585f758b7c9eeeea0e3d87f2dda89b7d25320459c2c9643ebb635 - languageName: node - linkType: hard - "extsprintf@npm:1.3.0": version: 1.3.0 resolution: "extsprintf@npm:1.3.0" @@ -11016,15 +10892,6 @@ __metadata: languageName: node linkType: hard -"fd-slicer@npm:~1.1.0": - version: 1.1.0 - resolution: "fd-slicer@npm:1.1.0" - dependencies: - pend: ~1.2.0 - checksum: c8585fd5713f4476eb8261150900d2cb7f6ff2d87f8feb306ccc8a1122efd152f1783bdb2b8dc891395744583436bfd8081d8e63ece0ec8687eeefea394d4ff2 - languageName: node - linkType: hard - "fecha@npm:^4.2.0": version: 4.2.3 resolution: "fecha@npm:4.2.3" @@ -11423,29 +11290,6 @@ __metadata: languageName: node linkType: hard -"for-in@npm:^0.1.3": - version: 0.1.8 - resolution: "for-in@npm:0.1.8" - checksum: f5bdad7811700ee6a0f96b33d72a1db966aea75a1f03c7245d147f8369305e709f53a55ee7ae8eaddcfa85c7c89bca78472be8f1bc605475ce5bb2c70f77f8da - languageName: node - linkType: hard - -"for-in@npm:^1.0.1": - version: 1.0.2 - resolution: "for-in@npm:1.0.2" - checksum: 09f4ae93ce785d253ac963d94c7f3432d89398bf25ac7a24ed034ca393bf74380bdeccc40e0f2d721a895e54211b07c8fad7132e8157827f6f7f059b70b4043d - languageName: node - linkType: hard - -"for-own@npm:^0.1.3": - version: 0.1.5 - resolution: "for-own@npm:0.1.5" - dependencies: - for-in: ^1.0.1 - checksum: 07eb0a2e98eb55ce13b56dd11ef4fb5e619ba7380aaec388b9eec1946153d74fa734ce409e8434020557e9489a50c34bc004d55754f5863bf7d77b441d8dee8c - languageName: node - linkType: hard - "foreground-child@npm:^3.1.0": version: 3.1.1 resolution: "foreground-child@npm:3.1.1" @@ -11787,15 +11631,6 @@ __metadata: languageName: node linkType: hard -"get-stream@npm:^5.1.0": - version: 5.2.0 - resolution: "get-stream@npm:5.2.0" - dependencies: - pump: ^3.0.0 - checksum: 8bc1a23174a06b2b4ce600df38d6c98d2ef6d84e020c1ddad632ad75bac4e092eeb40e4c09e0761c35fc2dbc5e7fff5dab5e763a383582c4a167dd69a905bd12 - languageName: node - linkType: hard - "get-stream@npm:^6.0.0, get-stream@npm:^6.0.1": version: 6.0.1 resolution: "get-stream@npm:6.0.1" @@ -12471,25 +12306,25 @@ __metadata: languageName: node linkType: hard -"http-proxy-agent@npm:5.0.0, http-proxy-agent@npm:^5.0.0": - version: 5.0.0 - resolution: "http-proxy-agent@npm:5.0.0" +"http-proxy-agent@npm:^4.0.0, http-proxy-agent@npm:^4.0.1": + version: 4.0.1 + resolution: "http-proxy-agent@npm:4.0.1" dependencies: - "@tootallnate/once": 2 + "@tootallnate/once": 1 agent-base: 6 debug: 4 - checksum: e2ee1ff1656a131953839b2a19cd1f3a52d97c25ba87bd2559af6ae87114abf60971e498021f9b73f9fd78aea8876d1fb0d4656aac8a03c6caa9fc175f22b786 + checksum: c6a5da5a1929416b6bbdf77b1aca13888013fe7eb9d59fc292e25d18e041bb154a8dfada58e223fc7b76b9b2d155a87e92e608235201f77d34aa258707963a82 languageName: node linkType: hard -"http-proxy-agent@npm:^4.0.0, http-proxy-agent@npm:^4.0.1": - version: 4.0.1 - resolution: "http-proxy-agent@npm:4.0.1" +"http-proxy-agent@npm:^5.0.0": + version: 5.0.0 + resolution: "http-proxy-agent@npm:5.0.0" dependencies: - "@tootallnate/once": 1 + "@tootallnate/once": 2 agent-base: 6 debug: 4 - checksum: c6a5da5a1929416b6bbdf77b1aca13888013fe7eb9d59fc292e25d18e041bb154a8dfada58e223fc7b76b9b2d155a87e92e608235201f77d34aa258707963a82 + checksum: e2ee1ff1656a131953839b2a19cd1f3a52d97c25ba87bd2559af6ae87114abf60971e498021f9b73f9fd78aea8876d1fb0d4656aac8a03c6caa9fc175f22b786 languageName: node linkType: hard @@ -12504,7 +12339,7 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:5, https-proxy-agent@npm:5.0.1, https-proxy-agent@npm:^5.0.0": +"https-proxy-agent@npm:5, https-proxy-agent@npm:^5.0.0": version: 5.0.1 resolution: "https-proxy-agent@npm:5.0.1" dependencies: @@ -12814,13 +12649,6 @@ __metadata: languageName: node linkType: hard -"is-buffer@npm:^1.0.2, is-buffer@npm:^1.1.5": - version: 1.1.6 - resolution: "is-buffer@npm:1.1.6" - checksum: 4a186d995d8bbf9153b4bd9ff9fd04ae75068fe695d29025d25e592d9488911eeece84eefbd8fa41b8ddcc0711058a71d4c466dcf6f1f6e1d83830052d8ca707 - languageName: node - linkType: hard - "is-buffer@npm:^2.0.5": version: 2.0.5 resolution: "is-buffer@npm:2.0.5" @@ -12893,13 +12721,6 @@ __metadata: languageName: node linkType: hard -"is-extendable@npm:^0.1.1": - version: 0.1.1 - resolution: "is-extendable@npm:0.1.1" - checksum: 3875571d20a7563772ecc7a5f36cb03167e9be31ad259041b4a8f73f33f885441f778cee1f1fe0085eb4bc71679b9d8c923690003a36a6a5fdf8023e6e3f0672 - languageName: node - linkType: hard - "is-extglob@npm:^2.1.1": version: 2.1.1 resolution: "is-extglob@npm:2.1.1" @@ -13044,15 +12865,6 @@ __metadata: languageName: node linkType: hard -"is-plain-object@npm:^2.0.1": - version: 2.0.4 - resolution: "is-plain-object@npm:2.0.4" - dependencies: - isobject: ^3.0.1 - checksum: 2a401140cfd86cabe25214956ae2cfee6fbd8186809555cd0e84574f88de7b17abacb2e477a6a658fa54c6083ecbda1e6ae404c7720244cd198903848fca70ca - languageName: node - linkType: hard - "is-plain-object@npm:^5.0.0": version: 5.0.0 resolution: "is-plain-object@npm:5.0.0" @@ -13246,13 +13058,6 @@ __metadata: languageName: node linkType: hard -"isobject@npm:^3.0.1": - version: 3.0.1 - resolution: "isobject@npm:3.0.1" - checksum: db85c4c970ce30693676487cca0e61da2ca34e8d4967c2e1309143ff910c207133a969f9e4ddb2dc6aba670aabce4e0e307146c310350b298e74a31f7d464703 - languageName: node - linkType: hard - "isomorphic-fetch@npm:^3.0.0": version: 3.0.0 resolution: "isomorphic-fetch@npm:3.0.0" @@ -14174,24 +13979,6 @@ __metadata: languageName: node linkType: hard -"kind-of@npm:^2.0.1": - version: 2.0.1 - resolution: "kind-of@npm:2.0.1" - dependencies: - is-buffer: ^1.0.2 - checksum: 043df2943e113bca612d26224947395e9673bb3808d94aed30e47fbf0bafd618e2a29ff0ca2d5498f64332c320fff07f0aa9d6edfc20906a93c1b8792f11759c - languageName: node - linkType: hard - -"kind-of@npm:^3.0.2": - version: 3.2.2 - resolution: "kind-of@npm:3.2.2" - dependencies: - is-buffer: ^1.1.5 - checksum: e898df8ca2f31038f27d24f0b8080da7be274f986bc6ed176f37c77c454d76627619e1681f6f9d2e8d2fd7557a18ecc419a6bb54e422abcbb8da8f1a75e4b386 - languageName: node - linkType: hard - "kind-of@npm:^6.0.3": version: 6.0.3 resolution: "kind-of@npm:6.0.3" @@ -14234,20 +14021,6 @@ __metadata: languageName: node linkType: hard -"lazy-cache@npm:^0.2.3": - version: 0.2.7 - resolution: "lazy-cache@npm:0.2.7" - checksum: b4538aff20db586c354f31de3ed59ea2c8d5dc4f01141bf49f07601e7ca0d7ed43a3f49362ade49b1e18ab1f3d121df0f2c9ea9b599b44dd54fb0c0db253c8b9 - languageName: node - linkType: hard - -"lazy-cache@npm:^1.0.3": - version: 1.0.4 - resolution: "lazy-cache@npm:1.0.4" - checksum: e6650c22e5de1cc3f4a0c25d2b35fe9cd400473c1b3562be9fceadf8f368d708b54d24f5aa51b321b090da65b36426823a8f706b8dbdd68270db0daba812c5d3 - languageName: node - linkType: hard - "lazystream@npm:^1.0.0": version: 1.0.1 resolution: "lazystream@npm:1.0.1" @@ -14923,17 +14696,6 @@ __metadata: languageName: node linkType: hard -"merge-deep@npm:^3.0.1": - version: 3.0.3 - resolution: "merge-deep@npm:3.0.3" - dependencies: - arr-union: ^3.1.0 - clone-deep: ^0.2.4 - kind-of: ^3.0.2 - checksum: d2eb367b8300327c66a3e1e01eb06251f51b440bf5bfa5f0f8065ae95bf3af620d21fcd0ab2eb50e74f5119aac40ffd26c85e3bf82f79082e8757675f5885d3d - languageName: node - linkType: hard - "merge-descriptors@npm:1.0.1": version: 1.0.1 resolution: "merge-descriptors@npm:1.0.1" @@ -15211,30 +14973,6 @@ __metadata: languageName: node linkType: hard -"mitt@npm:3.0.0": - version: 3.0.0 - resolution: "mitt@npm:3.0.0" - checksum: f7be5049d27d18b1dbe9408452d66376fa60ae4a79fe9319869d1b90ae8cbaedadc7e9dab30b32d781411256d468be5538996bb7368941c09009ef6bbfa6bfc7 - languageName: node - linkType: hard - -"mixin-object@npm:^2.0.1": - version: 2.0.1 - resolution: "mixin-object@npm:2.0.1" - dependencies: - for-in: ^0.1.3 - is-extendable: ^0.1.1 - checksum: 7d0eb7c2f06435fcc01d132824b4c973a0df689a117d8199d79911b506363b6f4f86a84458a63f3acfa7388f3052612cfe27105400b4932678452925a9739a4c - languageName: node - linkType: hard - -"mkdirp-classic@npm:^0.5.2": - version: 0.5.3 - resolution: "mkdirp-classic@npm:0.5.3" - checksum: 3f4e088208270bbcc148d53b73e9a5bd9eef05ad2cbf3b3d0ff8795278d50dd1d11a8ef1875ff5aea3fa888931f95bfcb2ad5b7c1061cfefd6284d199e6776ac - languageName: node - linkType: hard - "mkdirp@npm:^0.5.6": version: 0.5.6 resolution: "mkdirp@npm:0.5.6" @@ -16176,13 +15914,6 @@ __metadata: languageName: node linkType: hard -"pend@npm:~1.2.0": - version: 1.2.0 - resolution: "pend@npm:1.2.0" - checksum: 6c72f5243303d9c60bd98e6446ba7d30ae29e3d56fdb6fae8767e8ba6386f33ee284c97efe3230a0d0217e2b1723b8ab490b1bbf34fcbb2180dbc8a9de47850d - languageName: node - linkType: hard - "perf-regexes@npm:^1.0.1": version: 1.0.1 resolution: "perf-regexes@npm:1.0.1" @@ -16295,7 +16026,7 @@ __metadata: languageName: node linkType: hard -"progress@npm:2.0.3, progress@npm:^2.0.3": +"progress@npm:^2.0.3": version: 2.0.3 resolution: "progress@npm:2.0.3" checksum: f67403fe7b34912148d9252cb7481266a354bd99ce82c835f79070643bb3c6583d10dbcfda4d41e04bbc1d8437e9af0fb1e1f2135727878f5308682a579429b7 @@ -16465,7 +16196,7 @@ __metadata: languageName: node linkType: hard -"proxy-from-env@npm:1.1.0, proxy-from-env@npm:^1.0.0": +"proxy-from-env@npm:^1.0.0": version: 1.1.0 resolution: "proxy-from-env@npm:1.1.0" checksum: ed7fcc2ba0a33404958e34d95d18638249a68c430e30fcb6c478497d72739ba64ce9810a24f53a7d921d0c065e5b78e3822759800698167256b04659366ca4d4 @@ -16519,154 +16250,6 @@ __metadata: languageName: node linkType: hard -"puppeteer-core@npm:20.1.2": - version: 20.1.2 - resolution: "puppeteer-core@npm:20.1.2" - dependencies: - "@puppeteer/browsers": 1.1.0 - chromium-bidi: 0.4.7 - cross-fetch: 3.1.5 - debug: 4.3.4 - devtools-protocol: 0.0.1120988 - ws: 8.13.0 - peerDependencies: - typescript: ">= 4.7.4" - peerDependenciesMeta: - typescript: - optional: true - checksum: c9570721d54dadbd55138b94bc199dfccd9da6f6d7a0a58f0a7d0792af9099470f114b34274f73396001bdb6ca70f7db5b8aa186a3164b557f50328a47b6aa27 - languageName: node - linkType: hard - -"puppeteer-extra-plugin-anonymize-ua@npm:^2.4.6": - version: 2.4.6 - resolution: "puppeteer-extra-plugin-anonymize-ua@npm:2.4.6" - dependencies: - debug: ^4.1.1 - puppeteer-extra-plugin: ^3.2.3 - peerDependencies: - playwright-extra: "*" - puppeteer-extra: "*" - peerDependenciesMeta: - playwright-extra: - optional: true - puppeteer-extra: - optional: true - checksum: 5db1c5d823ca867e418aa21f20b4d8a6a7cb5c550391553317d2efeac1016c2cdc350f272aca96c5f2e31a35cac7cfea5802c06935c3685aefbd60f8218a001f - languageName: node - linkType: hard - -"puppeteer-extra-plugin-stealth@npm:^2.11.2": - version: 2.11.2 - resolution: "puppeteer-extra-plugin-stealth@npm:2.11.2" - dependencies: - debug: ^4.1.1 - puppeteer-extra-plugin: ^3.2.3 - puppeteer-extra-plugin-user-preferences: ^2.4.1 - peerDependencies: - playwright-extra: "*" - puppeteer-extra: "*" - peerDependenciesMeta: - playwright-extra: - optional: true - puppeteer-extra: - optional: true - checksum: 13ab2b906c1cd1a75bb346074e6ed75dd33da426e9b7d2e111dee6d497ae9ff42f44c2e5b0d48a04b545e862f9d27d8ecf61fa1863201afc8a9410121ed65a4b - languageName: node - linkType: hard - -"puppeteer-extra-plugin-user-data-dir@npm:^2.4.1": - version: 2.4.1 - resolution: "puppeteer-extra-plugin-user-data-dir@npm:2.4.1" - dependencies: - debug: ^4.1.1 - fs-extra: ^10.0.0 - puppeteer-extra-plugin: ^3.2.3 - rimraf: ^3.0.2 - peerDependencies: - playwright-extra: "*" - puppeteer-extra: "*" - peerDependenciesMeta: - playwright-extra: - optional: true - puppeteer-extra: - optional: true - checksum: f360b3bb22eeb899b23b6e2a38412ddfeda4b2333e08f77452732e16f094f33725272ee81150428e2c20b39d4d88edc87584d8344bd761c9ef8ae5d681968399 - languageName: node - linkType: hard - -"puppeteer-extra-plugin-user-preferences@npm:^2.4.1": - version: 2.4.1 - resolution: "puppeteer-extra-plugin-user-preferences@npm:2.4.1" - dependencies: - debug: ^4.1.1 - deepmerge: ^4.2.2 - puppeteer-extra-plugin: ^3.2.3 - puppeteer-extra-plugin-user-data-dir: ^2.4.1 - peerDependencies: - playwright-extra: "*" - puppeteer-extra: "*" - peerDependenciesMeta: - playwright-extra: - optional: true - puppeteer-extra: - optional: true - checksum: e0e50145d1d32626a8bb75afeb0dc238d63c05a8d264e12bb249b06aa34f7c116f6ec531335e964ea715837759dacd505d2fa8f6c9d478e983303eb2cb701ec9 - languageName: node - linkType: hard - -"puppeteer-extra-plugin@npm:^3.2.3": - version: 3.2.3 - resolution: "puppeteer-extra-plugin@npm:3.2.3" - dependencies: - "@types/debug": ^4.1.0 - debug: ^4.1.1 - merge-deep: ^3.0.1 - peerDependencies: - playwright-extra: "*" - puppeteer-extra: "*" - peerDependenciesMeta: - playwright-extra: - optional: true - puppeteer-extra: - optional: true - checksum: 18c2780a151e023ed145cd7768a6cf2dba1c124bce920de5f7815dcd872550288554161b1474037e8819969b1adfad41bdc09a9aadfd155338abc6d22699b7ed - languageName: node - linkType: hard - -"puppeteer-extra@npm:^3.3.6": - version: 3.3.6 - resolution: "puppeteer-extra@npm:3.3.6" - dependencies: - "@types/debug": ^4.1.0 - debug: ^4.1.1 - deepmerge: ^4.2.2 - peerDependencies: - "@types/puppeteer": "*" - puppeteer: "*" - puppeteer-core: "*" - peerDependenciesMeta: - "@types/puppeteer": - optional: true - puppeteer: - optional: true - puppeteer-core: - optional: true - checksum: d3097a16957dbc7c23e960429020b4c32b3d56d54e80103781ce8cc17b3eebda4554caad454744ff212ff69c19653cc0d4978d6f35381ffdfd1db1cedd0c61a6 - languageName: node - linkType: hard - -"puppeteer@npm:^20.1.2": - version: 20.1.2 - resolution: "puppeteer@npm:20.1.2" - dependencies: - "@puppeteer/browsers": 1.1.0 - cosmiconfig: 8.1.3 - puppeteer-core: 20.1.2 - checksum: b2b9afe422cfb745fccc5805e10c32fda6644dbc123755dac126731d88fcfec26937f0ddfce0a90068477ef25d362bcaebbc33e0504881aa360f223987f43f25 - languageName: node - linkType: hard - "pure-rand@npm:^6.0.0": version: 6.0.1 resolution: "pure-rand@npm:6.0.1" @@ -17588,18 +17171,6 @@ __metadata: languageName: node linkType: hard -"shallow-clone@npm:^0.1.2": - version: 0.1.2 - resolution: "shallow-clone@npm:0.1.2" - dependencies: - is-extendable: ^0.1.1 - kind-of: ^2.0.1 - lazy-cache: ^0.2.3 - mixin-object: ^2.0.1 - checksum: cc4c85c6e42186fec33a81a85622c48dbcfdf280f3a7bd0800b4de57df8e365a8760aa2e31dd79df365b317dddb2fd0bbd92be0aab14dbd2de6a65992eab2177 - languageName: node - linkType: hard - "shebang-command@npm:^1.2.0": version: 1.2.0 resolution: "shebang-command@npm:1.2.0" @@ -18299,19 +17870,7 @@ __metadata: languageName: node linkType: hard -"tar-fs@npm:2.1.1": - version: 2.1.1 - resolution: "tar-fs@npm:2.1.1" - dependencies: - chownr: ^1.1.1 - mkdirp-classic: ^0.5.2 - pump: ^3.0.0 - tar-stream: ^2.1.4 - checksum: f5b9a70059f5b2969e65f037b4e4da2daf0fa762d3d232ffd96e819e3f94665dbbbe62f76f084f1acb4dbdcce16c6e4dac08d12ffc6d24b8d76720f4d9cf032d - languageName: node - linkType: hard - -"tar-stream@npm:^2.1.4, tar-stream@npm:^2.2.0": +"tar-stream@npm:^2.2.0": version: 2.2.0 resolution: "tar-stream@npm:2.2.0" dependencies: @@ -18848,16 +18407,6 @@ __metadata: languageName: node linkType: hard -"unbzip2-stream@npm:1.4.3": - version: 1.4.3 - resolution: "unbzip2-stream@npm:1.4.3" - dependencies: - buffer: ^5.2.1 - through: ^2.3.8 - checksum: 0e67c4a91f4fa0fc7b4045f8b914d3498c2fc2e8c39c359977708ec85ac6d6029840e97f508675fdbdf21fcb8d276ca502043406f3682b70f075e69aae626d1d - languageName: node - linkType: hard - "underscore@npm:~1.13.2": version: 1.13.6 resolution: "underscore@npm:1.13.6" @@ -19452,21 +19001,6 @@ __metadata: languageName: node linkType: hard -"ws@npm:8.13.0": - version: 8.13.0 - resolution: "ws@npm:8.13.0" - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ">=5.0.2" - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: 53e991bbf928faf5dc6efac9b8eb9ab6497c69feeb94f963d648b7a3530a720b19ec2e0ec037344257e05a4f35bd9ad04d9de6f289615ffb133282031b18c61c - languageName: node - linkType: hard - "ws@npm:^7.2.3, ws@npm:^7.4.6": version: 7.5.9 resolution: "ws@npm:7.5.9" @@ -19593,7 +19127,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:17.7.1, yargs@npm:^17.0.0, yargs@npm:^17.3.1": +"yargs@npm:^17.0.0, yargs@npm:^17.3.1": version: 17.7.1 resolution: "yargs@npm:17.7.1" dependencies: @@ -19608,16 +19142,6 @@ __metadata: languageName: node linkType: hard -"yauzl@npm:^2.10.0": - version: 2.10.0 - resolution: "yauzl@npm:2.10.0" - dependencies: - buffer-crc32: ~0.2.3 - fd-slicer: ~1.1.0 - checksum: 7f21fe0bbad6e2cb130044a5d1d0d5a0e5bf3d8d4f8c4e6ee12163ce798fee3de7388d22a7a0907f563ac5f9d40f8699a223d3d5c1718da90b0156da6904022b - languageName: node - linkType: hard - "yn@npm:3.1.1": version: 3.1.1 resolution: "yn@npm:3.1.1"