From d1ba559909c11d54abb75ef8c6976c7c501be5bc Mon Sep 17 00:00:00 2001 From: Sergey Date: Wed, 18 Oct 2023 17:06:34 +0300 Subject: [PATCH] fix import puppeteer (#23) * fix import puppeteer (#21) * The puppeteer version is fixed * The puppeteer version is fixed * The puppeteer version is fixed * fix import puppeteer * fix import puppeteer * fix uses puppeteer * fix test (#22) * The puppeteer version is fixed * The puppeteer version is fixed * The puppeteer version is fixed * fix import puppeteer * fix import puppeteer * fix uses puppeteer * fix test * recompiled js (#25) * The puppeteer version is fixed * The puppeteer version is fixed * The puppeteer version is fixed * fix import puppeteer * fix import puppeteer * fix uses puppeteer * fix test * recompiled js * removed testing library validator (#27) * removed testing library validator --- dist/hstest/environment/page.js | 4 + dist/hstest/environment/page.js.map | 2 +- dist/hstest/stage/stageTest.js.map | 2 +- dist/package.json | 43 +- hstest/environment/page.ts | 14 +- hstest/stage/checkerLibraryVersion.ts | 51 -- hstest/stage/stageTest.ts | 9 +- package-lock.json | 436 +++++++++++++----- package.json | 7 +- tests/vanilla/page/client/downloads/hello.txt | 1 + tests/vanilla/page/client/index.html | 60 +++ tests/vanilla/page/client/style.css | 52 +++ .../client/testPageInstanceClientSend.mjs | 43 ++ 13 files changed, 530 insertions(+), 194 deletions(-) delete mode 100644 hstest/stage/checkerLibraryVersion.ts create mode 100644 tests/vanilla/page/client/downloads/hello.txt create mode 100644 tests/vanilla/page/client/index.html create mode 100644 tests/vanilla/page/client/style.css create mode 100644 tests/vanilla/page/client/testPageInstanceClientSend.mjs diff --git a/dist/hstest/environment/page.js b/dist/hstest/environment/page.js index 3fccc00..52b4006 100644 --- a/dist/hstest/environment/page.js +++ b/dist/hstest/environment/page.js @@ -66,6 +66,10 @@ class Page { const bodySelector = 'body'; return await element_js_1.default.new(await this.pageInstance.$(bodySelector), null, this.pageInstance); } + async getClient() { + await this.open(); + return this.pageInstance; + } async findById(id) { return await (await this._getBodyTag()).findById(id); } diff --git a/dist/hstest/environment/page.js.map b/dist/hstest/environment/page.js.map index b72c42b..51ac37e 100644 --- a/dist/hstest/environment/page.js.map +++ b/dist/hstest/environment/page.js.map @@ -1 +1 @@ -{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../hstest/environment/page.ts"],"names":[],"mappings":";;;;;AAEA,6FAAkE;AAClE,+EAAoD;AACpD,yFAA8D;AAC9D,uFAA4D;AAC5D,8DAAmC;AACnC,iFAAsD;AAEtD,MAAM,IAAI;IAQN,YAAY,GAAW,EAAE,OAAgB,EAAE,WAAqC;QAC5E,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,IAAI;QACN,IAAI,IAAI,CAAC,QAAQ,EAAE;YACf,OAAO;SACV;QACD,IAAI,CAAC,YAAY,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QACjD,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QACzD,MAAM,+BAAkB,CAAC,qBAAqB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAClE,MAAM,+BAAkB,CAAC,kBAAkB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC/D,MAAM,IAAI,CAAC,uBAAuB,EAAE,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACzB,CAAC;IAED,uBAAuB;QACnB,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,EAAC,OAAO,EAAC,EAAE;YAC5C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;IACP,CAAC;IAED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C,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,YAAoB,EAAE,IAAoB;QAC3D,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;CACJ;AAED,kBAAe,IAAI,CAAC"} \ No newline at end of file +{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../hstest/environment/page.ts"],"names":[],"mappings":";;;;;AAEA,6FAAkE;AAClE,+EAAoD;AACpD,yFAA8D;AAC9D,uFAA4D;AAC5D,8DAAmC;AACnC,iFAAsD;AAGtD,MAAM,IAAI;IAQN,YAAY,GAAW,EAAE,OAAgB,EAAE,WAAqC;QAC5E,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,IAAI;QACN,IAAI,IAAI,CAAC,QAAQ,EAAE;YACf,OAAO;SACV;QACD,IAAI,CAAC,YAAY,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QACjD,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QACzD,MAAM,+BAAkB,CAAC,qBAAqB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAClE,MAAM,+BAAkB,CAAC,kBAAkB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC/D,MAAM,IAAI,CAAC,uBAAuB,EAAE,CAAC;QACrC,IAAI,CAAC,QAAQ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AC;IAC1C,CAAC;IAED,KAAK,CAAC,OAAO;QACT,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;YAC3B,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;IAED,UAAU;QACN,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,SAAiB,EAAE,OAAO,GAAG,KAAK;QACjD,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,OAAO,yBAAY,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,YAAoB,EAAE,IAAoB;QAC3D,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;CACJ;AAED,kBAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/dist/hstest/stage/stageTest.js.map b/dist/hstest/stage/stageTest.js.map index 6af1551..9b05f9d 100644 --- a/dist/hstest/stage/stageTest.js.map +++ b/dist/hstest/stage/stageTest.js.map @@ -1 +1 @@ -{"version":3,"file":"stageTest.js","sourceRoot":"","sources":["../../../hstest/stage/stageTest.ts"],"names":[],"mappings":";;;;;AAAA,qEAAqD;AACrD,uEAA4C;AAE5C,gFAAqD;AACrD,+EAAoD;AACpD,qEAA0C;AAC1C,iGAAsE;AAEtE,qFAA0D;AAC1D,yFAA8D;AAC9D,qGAA0E;AAG1E,MAAM,SAAS;IAAf;QAEI,SAAI,GAAoB,IAAI,iBAAe,EAAE,CAAC;QAC9C,WAAM,GAAe,IAAI,qBAAQ,EAAE,CAAC;QACpC,UAAK,GAAqB,EAAE,CAAC;IAgFjC,CAAC;IA9EG,OAAO,CAAC,GAAW,EAAE,UAAoC,EAAE;QACvD,OA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IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;SACvC;gBAAS;YACN,IAAI;gBACA,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;aAChC;YAAC,OAAO,GAAQ,EAAE;gBACf,MAAM,IAAI,KAAK,CAAC,IAAI,mCAAsB,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;aACzE;SACJ;IACL,CAAC;CACJ;AAED,kBAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/package.json b/dist/package.json index 801df45..bf8fc0e 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "hs-test-web-ts", - "version": "4.0.1", + "version": "4.1.1", "description": "Hyperskill Testing Library on TypeScript", "main": "dist/hstest/index.js", "scripts": { @@ -11,33 +11,32 @@ "keywords": [], "author": "Vladimir Turov & Ainur Gimadeev", "dependencies": { - "@types/callsite": "^1.0.31", + "@types/callsite": "^1.0.32", "callsite": "^1.0.0", - "puppeteer": "^13.0.0", - "puppeteer-element2selector": "^0.0.3" + "puppeteer": "21.0.0", + "puppeteer-element2selector": "0.0.3" }, "devDependencies": { "@babel/core": ">=7.9.6", "@babel/preset-env": ">=7.9.6", "@babel/preset-react": ">=7.9.4", - "@types/puppeteer": "^5.4.4", - "@types/webpack": "4.4.17", - "@types/webpack-dev-server": "3.1.1", - "@typescript-eslint/eslint-plugin": "^5.10.0", - "@typescript-eslint/parser": "^5.10.0", - "babel-loader": "^8.2.3", - "chai": "^4.3.4", - "css-loader": "^5.2.1", - "eslint": "^8.7.0", + "@types/webpack": "5.28.2", + "@types/webpack-dev-server": "4.7.2", + "@typescript-eslint/eslint-plugin": "^6.6.0", + "@typescript-eslint/parser": "^6.6.0", + "babel-loader": "^9.1.3", + "chai": "^4.3.8", + "css-loader": "^6.8.1", + "eslint": "^8.48.0", "file-loader": ">=6.0.0", - "mocha": "^9.1.3", - "react": "^16.13.1", - "react-dom": "^16.13.1", - "style-loader": "^1.2.1", + "mocha": "10.1.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "style-loader": "^3.3.3", "ts-node": "^10.4.0", - "typescript": "^4.5.4", - "webpack": "^4.46.0", - "webpack-cli": "^3.3.11", - "webpack-dev-server": "^4.11.1" + "typescript": "^5.2.2", + "webpack": "^5.88.2", + "webpack-cli": "^5.1.4", + "webpack-dev-server": "^4.15.1" } -} +} \ No newline at end of file diff --git a/hstest/environment/page.ts b/hstest/environment/page.ts index ae6a6d6..30c8b58 100644 --- a/hstest/environment/page.ts +++ b/hstest/environment/page.ts @@ -1,4 +1,4 @@ -import puppeteer, {ElementHandle, EvaluateFn} from 'puppeteer'; +import {ElementHandle, EvaluateFunc} from 'puppeteer'; import Browser from "../chromium/browser.js"; import BrowserPageHandler from "../handler/browserPageHandler.js"; import CheckResult from "../outcome/checkResult.js"; @@ -6,8 +6,9 @@ import WrongAnswer from "../exception/outcome/WrongAnswer.js"; import TestPassed from "../exception/outcome/TestPassed.js"; import Element from "./element.js"; import EventHandler from "../handler/eventHandler.js"; +import * as puppeteer from 'puppeteer'; -class Page { +class Page{ url: string; browser: Browser; isOpened: boolean; @@ -44,7 +45,7 @@ class Page { execute(func: NoArgsFunction): NoArgsFunction { return async () => { await this.open(); - const result = await this.pageInstance.evaluate(func as EvaluateFn); + const result = await this.pageInstance.evaluate(func as EvaluateFunc); return CheckResult.fromJson(result); }; } @@ -61,7 +62,7 @@ class Page { async evaluate(func: NoArgsFunction): Promise { await this.open(); - const evaluationResult = await this.pageInstance.evaluate(func as EvaluateFn); + const evaluationResult = await this.pageInstance.evaluate(func as EvaluateFunc); if (CheckResult.isCheckResult(evaluationResult)) { if (!evaluationResult.isCorrect) { throw new WrongAnswer(evaluationResult.feedback); @@ -82,6 +83,11 @@ class Page { ); } + async getClient(): Promise { + await this.open(); + return this.pageInstance; + } + async findById(id: string): Promise { return await (await this._getBodyTag()).findById(id); } diff --git a/hstest/stage/checkerLibraryVersion.ts b/hstest/stage/checkerLibraryVersion.ts deleted file mode 100644 index 024d3c9..0000000 --- a/hstest/stage/checkerLibraryVersion.ts +++ /dev/null @@ -1,51 +0,0 @@ -import packageJson from "../../package.json"; - -/** - * CheckerLibraryVersion is a class responsible for comparing the local library - * version with the remote version available on GitHub. - * - * It helps to ensure that the user is using the latest version of the library. - */ -class CheckerLibraryVersion { - - constructor() {} - - /** - * Compares the local library version with the remote version on GitHub. - * - * If the versions are different, an error message will be logged to the console, - * or an Error will be thrown if the throwError flag is set to true. - * - * @param throwError {boolean} - Optional flag to indicate if an Error should be - * thrown when versions are different. Default is false. - * @returns {Promise} - A promise that resolves when the check is complete. - */ - async checkLibraryVersion(throwError = false): Promise { - - const libraryVersionUrl = "https://github.com/hyperskill/hs-test-web/blob/master/package.json"; - try { - const response = await fetch(libraryVersionUrl); - const packageRemoteJson = await response.json(); - const remoteVersion = packageRemoteJson.version; - const localVersion = packageJson.version; - if (remoteVersion !== localVersion) { - const errorMsg = `The version of the local library (${localVersion}) is different from the version on GitHub (${remoteVersion}). - Please update your local version. - You can download the new version of the library at the link: https://github.com/hyperskill/hs-test-web/archive/release.tar.gz - To upgrade, install the new version using the command: npm install /path/to/your/archive/hs-test-web-release.tar.gz`; - if (throwError) { - throw new Error(errorMsg); - } else { - console.error(errorMsg); - } - } - } catch (error) { - console.error("Error while checking library version:\n", error); - if (throwError) { - throw error; - } - } - } -} - -export default CheckerLibraryVersion; \ No newline at end of file diff --git a/hstest/stage/stageTest.ts b/hstest/stage/stageTest.ts index c04faa5..ace8615 100644 --- a/hstest/stage/stageTest.ts +++ b/hstest/stage/stageTest.ts @@ -9,8 +9,7 @@ import Outcome from "../outcome/outcome.js"; import OutcomeFactory from "../outcome/outcomeFactory.js"; import WrongAnswer from "../exception/outcome/WrongAnswer.js"; import UnexpectedErrorOutcome from "../outcome/unexpectedErrorOutcome.js"; -import CheckerLibraryVersion from "./checkerLibraryVersion"; -import puppeteer from "puppeteer"; +import * as puppeteer from 'puppeteer'; class StageTest { @@ -18,13 +17,7 @@ class StageTest { runner: TestRunner = new JsRunner(); tests: NoArgsFunction[] = []; - checkerLibraryVersion: CheckerLibraryVersion = new CheckerLibraryVersion(); - constructor() { - // Perform the library version check upon class instantiation - this.checkerLibraryVersion.checkLibraryVersion().catch((error) => { - console.error("Error while checking library version:", error); - }); } getPage(url: string, options: puppeteer.WaitForOptions = {}): Page { diff --git a/package-lock.json b/package-lock.json index 152246c..a742777 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,23 +1,22 @@ { "name": "hs-test-web-ts", - "version": "4.0.1", + "version": "4.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "hs-test-web-ts", - "version": "4.0.1", + "version": "4.1.1", "dependencies": { "@types/callsite": "^1.0.32", "callsite": "^1.0.0", - "puppeteer": "^21.1.1", - "puppeteer-element2selector": "^0.0.3" + "puppeteer": "21.0.0", + "puppeteer-element2selector": "0.0.3" }, "devDependencies": { "@babel/core": ">=7.9.6", "@babel/preset-env": ">=7.9.6", "@babel/preset-react": ">=7.9.4", - "@types/puppeteer": "^7.0.4", "@types/webpack": "5.28.2", "@types/webpack-dev-server": "4.7.2", "@typescript-eslint/eslint-plugin": "^6.6.0", @@ -1996,14 +1995,15 @@ } }, "node_modules/@puppeteer/browsers": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.7.0.tgz", - "integrity": "sha512-sl7zI0IkbQGak/+IE3VEEZab5SSOlI5F6558WvzWGC1n3+C722rfewC1ZIkcF9dsoGSsxhsONoseVlNQG4wWvQ==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.7.1.tgz", + "integrity": "sha512-nIb8SOBgDEMFY2iS2MdnUZOg2ikcYchRrBoF+wtdjieRFKR2uGRipHY/oFLo+2N6anDualyClPzGywTHRGrLfw==", + "peer": true, "dependencies": { "debug": "4.3.4", "extract-zip": "2.0.1", "progress": "2.0.3", - "proxy-agent": "6.3.0", + "proxy-agent": "6.3.1", "tar-fs": "3.0.4", "unbzip2-stream": "1.4.3", "yargs": "17.7.1" @@ -2019,6 +2019,7 @@ "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "peer": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -2032,6 +2033,7 @@ "version": "17.7.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", + "peer": true, "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -2049,6 +2051,7 @@ "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "peer": true, "engines": { "node": ">=12" } @@ -2201,16 +2204,6 @@ "integrity": "sha512-DWNcCHolDq0ZKGizjx2DZjR/PqsYwAcYUJmfMWqtVU2MBMG5Mo+xFZrhGId5r/O5HOuMPyQEcM6KUBp5lBZZBg==", "devOptional": true }, - "node_modules/@types/puppeteer": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@types/puppeteer/-/puppeteer-7.0.4.tgz", - "integrity": "sha512-ja78vquZc8y+GM2al07GZqWDKQskQXygCDiu0e3uO0DMRKqE0MjrFBFmTulfPYzLB6WnL7Kl2tFPy0WXSpPomg==", - "deprecated": "This is a stub types definition. puppeteer provides its own type definitions, so you do not need this installed.", - "dev": true, - "dependencies": { - "puppeteer": "*" - } - }, "node_modules/@types/qs": { "version": "6.9.7", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", @@ -3435,11 +3428,13 @@ } }, "node_modules/chromium-bidi": { - "version": "0.4.22", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.22.tgz", - "integrity": "sha512-wR7Y9Ioez+cNXT4ZP7VNM1HRTljpNnMSLw4/RnwhhZUP4yCU7kIQND00YiktuHekch68jklGPK1q9Jkb29+fQg==", + "version": "0.4.31", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.31.tgz", + "integrity": "sha512-OtvEg2JMRQrHsmLx4FV3u1Hf9waYxB5PmL+yM0HkFpc9H2x3TMbUqS+GP2/fC4399hzOO+EQF8uVU43By9ILag==", + "peer": true, "dependencies": { - "mitt": "3.0.1" + "mitt": "3.0.1", + "urlpattern-polyfill": "9.0.0" }, "peerDependencies": { "devtools-protocol": "*" @@ -3756,9 +3751,9 @@ } }, "node_modules/data-uri-to-buffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-5.0.1.tgz", - "integrity": "sha512-a9l6T1qqDogvvnw0nKlfZzqsyikEBZBClF39V3TFoKhDtGBqHu2HkuomJc02j5zft8zrUaXEuoicLeW54RkzPg==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.1.tgz", + "integrity": "sha512-MZd3VlchQkp8rdend6vrx7MmVDJzSNTBvghvKjirLkD+WTChA3KUf0jkE68Q4UyctNqI11zZO9/x2Yx+ub5Cvg==", "engines": { "node": ">= 14" } @@ -3885,9 +3880,10 @@ "dev": true }, "node_modules/devtools-protocol": { - "version": "0.0.1159816", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1159816.tgz", - "integrity": "sha512-2cZlHxC5IlgkIWe2pSDmCrDiTzbSJWywjbDDnupOImEBcG31CQgBLV8wWE+5t+C4rimcjHsbzy7CBzf9oFjboA==" + "version": "0.0.1179426", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1179426.tgz", + "integrity": "sha512-KKC7IGwdOr7u9kTGgjUvGTov/z1s2H7oHi3zKCdR9eSDyCPia5CBi4aRhtp7d8uR7l0GS5UTDw3TjKGu5CqINg==", + "peer": true }, "node_modules/diff": { "version": "5.0.0", @@ -4856,12 +4852,12 @@ } }, "node_modules/get-uri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.1.tgz", - "integrity": "sha512-7ZqONUVqaabogsYNWlYj0t3YZaL6dhuEueZXGF+/YVmf6dHmaFg8/6psJKqhx9QykIDKzpGcy2cn4oV4YC7V/Q==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.2.tgz", + "integrity": "sha512-5KLucCJobh8vBY1K07EFV4+cPZH3mrV9YeAruUseCQKHB58SGjjT2l9/eA9LD082IiuMjSlFJEcdJ27TXvbZNw==", "dependencies": { "basic-ftp": "^5.0.2", - "data-uri-to-buffer": "^5.0.1", + "data-uri-to-buffer": "^6.0.0", "debug": "^4.3.4", "fs-extra": "^8.1.0" }, @@ -6771,18 +6767,19 @@ } }, "node_modules/proxy-agent": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.0.tgz", - "integrity": "sha512-0LdR757eTj/JfuU7TL2YCuAZnxWXu3tkJbg4Oq3geW/qFNT/32T0sp2HnZ9O0lMR4q3vwAt0+xCA8SR0WAD0og==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.1.tgz", + "integrity": "sha512-Rb5RVBy1iyqOtNl15Cw/llpeLH8bsb37gM1FUfKQ+Wck6xHlbAhWGUFiTRHtkjqGTA5pSHz6+0hrPW/oECihPQ==", + "peer": true, "dependencies": { "agent-base": "^7.0.2", "debug": "^4.3.4", "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", "lru-cache": "^7.14.1", - "pac-proxy-agent": "^7.0.0", + "pac-proxy-agent": "^7.0.1", "proxy-from-env": "^1.1.0", - "socks-proxy-agent": "^8.0.1" + "socks-proxy-agent": "^8.0.2" }, "engines": { "node": ">= 14" @@ -6812,30 +6809,31 @@ } }, "node_modules/puppeteer": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-21.1.1.tgz", - "integrity": "sha512-2TLntjGA4qLrI9/8N0UK/5OoZJ2Ue7QgphN2SD+RsaHiha12AEiVyMGsB+i6LY1IoPAtEgYIjblQ7lw3kWDNRw==", + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-21.0.0.tgz", + "integrity": "sha512-a3rpCJuKQ7mzlwMJzKX6GhvGeg4CUn4d9+dv+riQDpY4mns32Q9OnmkfTZ3VlbDhGyrdBf1xXF1Z4y0of00WYg==", "hasInstallScript": true, "dependencies": { - "@puppeteer/browsers": "1.7.0", + "@puppeteer/browsers": "1.5.0", "cosmiconfig": "8.2.0", - "puppeteer-core": "21.1.1" + "puppeteer-core": "21.0.0" }, "engines": { "node": ">=16.3.0" } }, "node_modules/puppeteer-core": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-21.1.1.tgz", - "integrity": "sha512-Tlcajcf44zwfa9Sbwv3T8BtaNMJ69wtpHIxwl2NOBTyTK3D1wppQovXTjfw0TDOm3a16eCfQ+5BMi3vRQ4kuAQ==", + "version": "21.3.8", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-21.3.8.tgz", + "integrity": "sha512-yv12E/+zZ7Lei5tJB4sUkSrsuqKibuYpYxLGbmtLUjjYIqGE5HKz9OUI2I/RFHEvF+pHi2bTbv5bWydeCGJ6Mw==", + "peer": true, "dependencies": { - "@puppeteer/browsers": "1.7.0", - "chromium-bidi": "0.4.22", + "@puppeteer/browsers": "1.7.1", + "chromium-bidi": "0.4.31", "cross-fetch": "4.0.0", "debug": "4.3.4", - "devtools-protocol": "0.0.1159816", - "ws": "8.13.0" + "devtools-protocol": "0.0.1179426", + "ws": "8.14.2" }, "engines": { "node": ">=16.3.0" @@ -6852,6 +6850,134 @@ "puppeteer-core": ">= 2.1.0" } }, + "node_modules/puppeteer/node_modules/@puppeteer/browsers": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.5.0.tgz", + "integrity": "sha512-za318PweGINh5LnHSph7C4xhs0tmRjCD8EPpzcKlw4nzSPhnULj+LTG3+TGefZvW1ti5gjw2JkdQvQsivBeZlg==", + "dependencies": { + "debug": "4.3.4", + "extract-zip": "2.0.1", + "progress": "2.0.3", + "proxy-agent": "6.3.0", + "tar-fs": "3.0.4", + "unbzip2-stream": "1.4.3", + "yargs": "17.7.1" + }, + "bin": { + "browsers": "lib/cjs/main-cli.js" + }, + "engines": { + "node": ">=16.3.0" + } + }, + "node_modules/puppeteer/node_modules/chromium-bidi": { + "version": "0.4.20", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.20.tgz", + "integrity": "sha512-ruHgVZFEv00mAQMz1tQjfjdG63jiPWrQPF6HLlX2ucqLqVTJoWngeBEKHaJ6n1swV/HSvgnBNbtTRIlcVyW3Fw==", + "dependencies": { + "mitt": "3.0.1" + }, + "peerDependencies": { + "devtools-protocol": "*" + } + }, + "node_modules/puppeteer/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/puppeteer/node_modules/devtools-protocol": { + "version": "0.0.1147663", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1147663.tgz", + "integrity": "sha512-hyWmRrexdhbZ1tcJUGpO95ivbRhWXz++F4Ko+n21AY5PNln2ovoJw+8ZMNDTtip+CNFQfrtLVh/w4009dXO/eQ==" + }, + "node_modules/puppeteer/node_modules/proxy-agent": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.0.tgz", + "integrity": "sha512-0LdR757eTj/JfuU7TL2YCuAZnxWXu3tkJbg4Oq3geW/qFNT/32T0sp2HnZ9O0lMR4q3vwAt0+xCA8SR0WAD0og==", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.0", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.0.0", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/puppeteer/node_modules/puppeteer-core": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-21.0.0.tgz", + "integrity": "sha512-frnAOQ0pKrwxlYLziy+aB8q7cOm8Ym9Y5VqbdE7alOaOPIK3ynpYLi/1D6XJSKw3WExHmeI2z6TVO85SUxpVAQ==", + "dependencies": { + "@puppeteer/browsers": "1.5.0", + "chromium-bidi": "0.4.20", + "cross-fetch": "4.0.0", + "debug": "4.3.4", + "devtools-protocol": "0.0.1147663", + "ws": "8.13.0" + }, + "engines": { + "node": ">=16.3.0" + } + }, + "node_modules/puppeteer/node_modules/ws": { + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", + "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/puppeteer/node_modules/yargs": { + "version": "17.7.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", + "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/puppeteer/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + }, "node_modules/qs": { "version": "6.10.3", "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", @@ -8154,6 +8280,12 @@ "punycode": "^2.1.0" } }, + "node_modules/urlpattern-polyfill": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-9.0.0.tgz", + "integrity": "sha512-WHN8KDQblxd32odxeIgo83rdVDE2bvdkb86it7bMhYZwWKJz0+O0RK/eZiHYnM+zgt/U7hAHOlCQGfjjvSkw2g==", + "peer": true + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -8585,9 +8717,9 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", "engines": { "node": ">=10.0.0" }, @@ -10077,14 +10209,15 @@ } }, "@puppeteer/browsers": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.7.0.tgz", - "integrity": "sha512-sl7zI0IkbQGak/+IE3VEEZab5SSOlI5F6558WvzWGC1n3+C722rfewC1ZIkcF9dsoGSsxhsONoseVlNQG4wWvQ==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.7.1.tgz", + "integrity": "sha512-nIb8SOBgDEMFY2iS2MdnUZOg2ikcYchRrBoF+wtdjieRFKR2uGRipHY/oFLo+2N6anDualyClPzGywTHRGrLfw==", + "peer": true, "requires": { "debug": "4.3.4", "extract-zip": "2.0.1", "progress": "2.0.3", - "proxy-agent": "6.3.0", + "proxy-agent": "6.3.1", "tar-fs": "3.0.4", "unbzip2-stream": "1.4.3", "yargs": "17.7.1" @@ -10094,6 +10227,7 @@ "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "peer": true, "requires": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -10104,6 +10238,7 @@ "version": "17.7.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", + "peer": true, "requires": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -10117,7 +10252,8 @@ "yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==" + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "peer": true } } }, @@ -10269,15 +10405,6 @@ "integrity": "sha512-DWNcCHolDq0ZKGizjx2DZjR/PqsYwAcYUJmfMWqtVU2MBMG5Mo+xFZrhGId5r/O5HOuMPyQEcM6KUBp5lBZZBg==", "devOptional": true }, - "@types/puppeteer": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@types/puppeteer/-/puppeteer-7.0.4.tgz", - "integrity": "sha512-ja78vquZc8y+GM2al07GZqWDKQskQXygCDiu0e3uO0DMRKqE0MjrFBFmTulfPYzLB6WnL7Kl2tFPy0WXSpPomg==", - "dev": true, - "requires": { - "puppeteer": "*" - } - }, "@types/qs": { "version": "6.9.7", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", @@ -11174,11 +11301,13 @@ "dev": true }, "chromium-bidi": { - "version": "0.4.22", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.22.tgz", - "integrity": "sha512-wR7Y9Ioez+cNXT4ZP7VNM1HRTljpNnMSLw4/RnwhhZUP4yCU7kIQND00YiktuHekch68jklGPK1q9Jkb29+fQg==", + "version": "0.4.31", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.31.tgz", + "integrity": "sha512-OtvEg2JMRQrHsmLx4FV3u1Hf9waYxB5PmL+yM0HkFpc9H2x3TMbUqS+GP2/fC4399hzOO+EQF8uVU43By9ILag==", + "peer": true, "requires": { - "mitt": "3.0.1" + "mitt": "3.0.1", + "urlpattern-polyfill": "9.0.0" } }, "cliui": { @@ -11425,9 +11554,9 @@ "dev": true }, "data-uri-to-buffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-5.0.1.tgz", - "integrity": "sha512-a9l6T1qqDogvvnw0nKlfZzqsyikEBZBClF39V3TFoKhDtGBqHu2HkuomJc02j5zft8zrUaXEuoicLeW54RkzPg==" + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.1.tgz", + "integrity": "sha512-MZd3VlchQkp8rdend6vrx7MmVDJzSNTBvghvKjirLkD+WTChA3KUf0jkE68Q4UyctNqI11zZO9/x2Yx+ub5Cvg==" }, "debug": { "version": "4.3.4", @@ -11512,9 +11641,10 @@ "dev": true }, "devtools-protocol": { - "version": "0.0.1159816", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1159816.tgz", - "integrity": "sha512-2cZlHxC5IlgkIWe2pSDmCrDiTzbSJWywjbDDnupOImEBcG31CQgBLV8wWE+5t+C4rimcjHsbzy7CBzf9oFjboA==" + "version": "0.0.1179426", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1179426.tgz", + "integrity": "sha512-KKC7IGwdOr7u9kTGgjUvGTov/z1s2H7oHi3zKCdR9eSDyCPia5CBi4aRhtp7d8uR7l0GS5UTDw3TjKGu5CqINg==", + "peer": true }, "diff": { "version": "5.0.0", @@ -12227,12 +12357,12 @@ } }, "get-uri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.1.tgz", - "integrity": "sha512-7ZqONUVqaabogsYNWlYj0t3YZaL6dhuEueZXGF+/YVmf6dHmaFg8/6psJKqhx9QykIDKzpGcy2cn4oV4YC7V/Q==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.2.tgz", + "integrity": "sha512-5KLucCJobh8vBY1K07EFV4+cPZH3mrV9YeAruUseCQKHB58SGjjT2l9/eA9LD082IiuMjSlFJEcdJ27TXvbZNw==", "requires": { "basic-ftp": "^5.0.2", - "data-uri-to-buffer": "^5.0.1", + "data-uri-to-buffer": "^6.0.0", "debug": "^4.3.4", "fs-extra": "^8.1.0" } @@ -13601,18 +13731,19 @@ } }, "proxy-agent": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.0.tgz", - "integrity": "sha512-0LdR757eTj/JfuU7TL2YCuAZnxWXu3tkJbg4Oq3geW/qFNT/32T0sp2HnZ9O0lMR4q3vwAt0+xCA8SR0WAD0og==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.1.tgz", + "integrity": "sha512-Rb5RVBy1iyqOtNl15Cw/llpeLH8bsb37gM1FUfKQ+Wck6xHlbAhWGUFiTRHtkjqGTA5pSHz6+0hrPW/oECihPQ==", + "peer": true, "requires": { "agent-base": "^7.0.2", "debug": "^4.3.4", "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", "lru-cache": "^7.14.1", - "pac-proxy-agent": "^7.0.0", + "pac-proxy-agent": "^7.0.1", "proxy-from-env": "^1.1.0", - "socks-proxy-agent": "^8.0.1" + "socks-proxy-agent": "^8.0.2" } }, "proxy-from-env": { @@ -13636,26 +13767,119 @@ "dev": true }, "puppeteer": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-21.1.1.tgz", - "integrity": "sha512-2TLntjGA4qLrI9/8N0UK/5OoZJ2Ue7QgphN2SD+RsaHiha12AEiVyMGsB+i6LY1IoPAtEgYIjblQ7lw3kWDNRw==", + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-21.0.0.tgz", + "integrity": "sha512-a3rpCJuKQ7mzlwMJzKX6GhvGeg4CUn4d9+dv+riQDpY4mns32Q9OnmkfTZ3VlbDhGyrdBf1xXF1Z4y0of00WYg==", "requires": { - "@puppeteer/browsers": "1.7.0", + "@puppeteer/browsers": "1.5.0", "cosmiconfig": "8.2.0", - "puppeteer-core": "21.1.1" + "puppeteer-core": "21.0.0" + }, + "dependencies": { + "@puppeteer/browsers": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.5.0.tgz", + "integrity": "sha512-za318PweGINh5LnHSph7C4xhs0tmRjCD8EPpzcKlw4nzSPhnULj+LTG3+TGefZvW1ti5gjw2JkdQvQsivBeZlg==", + "requires": { + "debug": "4.3.4", + "extract-zip": "2.0.1", + "progress": "2.0.3", + "proxy-agent": "6.3.0", + "tar-fs": "3.0.4", + "unbzip2-stream": "1.4.3", + "yargs": "17.7.1" + } + }, + "chromium-bidi": { + "version": "0.4.20", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.20.tgz", + "integrity": "sha512-ruHgVZFEv00mAQMz1tQjfjdG63jiPWrQPF6HLlX2ucqLqVTJoWngeBEKHaJ6n1swV/HSvgnBNbtTRIlcVyW3Fw==", + "requires": { + "mitt": "3.0.1" + } + }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "devtools-protocol": { + "version": "0.0.1147663", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1147663.tgz", + "integrity": "sha512-hyWmRrexdhbZ1tcJUGpO95ivbRhWXz++F4Ko+n21AY5PNln2ovoJw+8ZMNDTtip+CNFQfrtLVh/w4009dXO/eQ==" + }, + "proxy-agent": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.0.tgz", + "integrity": "sha512-0LdR757eTj/JfuU7TL2YCuAZnxWXu3tkJbg4Oq3geW/qFNT/32T0sp2HnZ9O0lMR4q3vwAt0+xCA8SR0WAD0og==", + "requires": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.0", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.0.0", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.1" + } + }, + "puppeteer-core": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-21.0.0.tgz", + "integrity": "sha512-frnAOQ0pKrwxlYLziy+aB8q7cOm8Ym9Y5VqbdE7alOaOPIK3ynpYLi/1D6XJSKw3WExHmeI2z6TVO85SUxpVAQ==", + "requires": { + "@puppeteer/browsers": "1.5.0", + "chromium-bidi": "0.4.20", + "cross-fetch": "4.0.0", + "debug": "4.3.4", + "devtools-protocol": "0.0.1147663", + "ws": "8.13.0" + } + }, + "ws": { + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", + "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "requires": {} + }, + "yargs": { + "version": "17.7.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", + "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==" + } } }, "puppeteer-core": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-21.1.1.tgz", - "integrity": "sha512-Tlcajcf44zwfa9Sbwv3T8BtaNMJ69wtpHIxwl2NOBTyTK3D1wppQovXTjfw0TDOm3a16eCfQ+5BMi3vRQ4kuAQ==", + "version": "21.3.8", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-21.3.8.tgz", + "integrity": "sha512-yv12E/+zZ7Lei5tJB4sUkSrsuqKibuYpYxLGbmtLUjjYIqGE5HKz9OUI2I/RFHEvF+pHi2bTbv5bWydeCGJ6Mw==", + "peer": true, "requires": { - "@puppeteer/browsers": "1.7.0", - "chromium-bidi": "0.4.22", + "@puppeteer/browsers": "1.7.1", + "chromium-bidi": "0.4.31", "cross-fetch": "4.0.0", "debug": "4.3.4", - "devtools-protocol": "0.0.1159816", - "ws": "8.13.0" + "devtools-protocol": "0.0.1179426", + "ws": "8.14.2" } }, "puppeteer-element2selector": { @@ -14628,6 +14852,12 @@ "punycode": "^2.1.0" } }, + "urlpattern-polyfill": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-9.0.0.tgz", + "integrity": "sha512-WHN8KDQblxd32odxeIgo83rdVDE2bvdkb86it7bMhYZwWKJz0+O0RK/eZiHYnM+zgt/U7hAHOlCQGfjjvSkw2g==", + "peer": true + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -14933,9 +15163,9 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", "requires": {} }, "y18n": { diff --git a/package.json b/package.json index 55d07eb..fdaace4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hs-test-web-ts", - "version": "4.0.1", + "version": "4.1.1", "description": "Hyperskill Testing Library on TypeScript", "main": "dist/hstest/index.js", "scripts": { @@ -13,14 +13,13 @@ "dependencies": { "@types/callsite": "^1.0.32", "callsite": "^1.0.0", - "puppeteer": "^21.1.1", - "puppeteer-element2selector": "^0.0.3" + "puppeteer": "21.0.0", + "puppeteer-element2selector": "0.0.3" }, "devDependencies": { "@babel/core": ">=7.9.6", "@babel/preset-env": ">=7.9.6", "@babel/preset-react": ">=7.9.4", - "@types/puppeteer": "^7.0.4", "@types/webpack": "5.28.2", "@types/webpack-dev-server": "4.7.2", "@typescript-eslint/eslint-plugin": "^6.6.0", diff --git a/tests/vanilla/page/client/downloads/hello.txt b/tests/vanilla/page/client/downloads/hello.txt new file mode 100644 index 0000000..1a41653 --- /dev/null +++ b/tests/vanilla/page/client/downloads/hello.txt @@ -0,0 +1 @@ +Lorem ipsum is simply dummy text of the printing and typesetting industry. Lorem ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \ No newline at end of file diff --git a/tests/vanilla/page/client/index.html b/tests/vanilla/page/client/index.html new file mode 100644 index 0000000..f55c3d0 --- /dev/null +++ b/tests/vanilla/page/client/index.html @@ -0,0 +1,60 @@ + + + + + Case Converter + + + +
Case Converter
+ + + + + diff --git a/tests/vanilla/page/client/style.css b/tests/vanilla/page/client/style.css new file mode 100644 index 0000000..ac95daf --- /dev/null +++ b/tests/vanilla/page/client/style.css @@ -0,0 +1,52 @@ +body { + display: flex; + flex-direction: column; + position: relative; + padding: 10px; +} + +.title { + font-family: Inter, sans-serif; + font-style: normal; + font-size: 40px; +} + +textarea { + width: 98vw; + height: 80vh; + border: black solid 1px; + align-self: center; + margin-top: 6px; +} + +.footer { + display: flex; + position: relative; + margin-top: 15px; +} + +button { + background-color: coral; + font-size: 25px; + margin-left: 20px; +} + +#upper-case { + +} + +#lower-case { + +} + +#proper-case { + +} + +#sentence-case { + +} + +#save-text-file { + +} \ No newline at end of file diff --git a/tests/vanilla/page/client/testPageInstanceClientSend.mjs b/tests/vanilla/page/client/testPageInstanceClientSend.mjs new file mode 100644 index 0000000..75f178e --- /dev/null +++ b/tests/vanilla/page/client/testPageInstanceClientSend.mjs @@ -0,0 +1,43 @@ +import {StageTest, correct, wrong} from "../../../../dist/hstest/index.js" +import path from 'path' +const workingDir = path.join(import.meta.url, '../') +const pagePath = path.join(import.meta.url, '../index.html') + +//const {StageTest, correct, wrong} = require('hs-test-web'); + +class ConverterTest extends StageTest { + + page = this.getPage(pagePath) + tests = [ + + this.page.execute(async () => { + return correct(); + } + ), + this.node.execute(async () => { + + const client = await this.page.pageInstance.target().createCDPSession() + await client.send( + 'Page.setDownloadBehavior', { + behavior: 'allow', + downloadPath: workingDir + path.sep + "downloads" + } + ); + return correct() + }), + ] +} + +it('Test client', async function () { + try { + this.timeout(30000) + } catch (ignored) { + } + try { + await new ConverterTest().runTests(); + } catch (e) { + console.log(e); + throw new Error("The test should pass all test cases!"); + } +}, 30000) +