Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Typescript Port. #67

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,6 @@ dist
lib

.npmignore
fakeBrowserUserData*/__fakebrowser_fakeDD.json
script/*.json
test/__tests__/*.png
21 changes: 21 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest: current file",
//"env": { "NODE_ENV": "test" },
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["${fileBasenameNoExtension}", "--config", "jest.config.js"],
"console": "integratedTerminal",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
}
}
]
}
29 changes: 19 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
},
"author": "kkoooqqq",
"license": "LGPLv3",
"main": "dist/cjs/FakeBrowser.js",
"module": "dist/esm/FakeBrowser.js",
"main": "dist/cjs/core/FakeBrowser.js",
"module": "dist/esm/core/FakeBrowser.js",
"scripts": {
"clean-dist": "rimraf dist",
"test": "jest --force-exit --detectOpenHandles --config=./jest.config.js",
"importer": "ts-node script/importer.ts",
"build": "npm run tsc",
"tsc": "npm run clean-dist && npm run tsc-cjs && npm run tsc-esm",
"tsc-cjs": "tsc -b src/tsconfig.cjs.json",
"tsc-esm": "tsc -b src/tsconfig.esm.json",
"postbuild": "cpy --cwd=src --parents plugins ../dist"
"tsc-cjs": "rimraf dist/cjs && tsc -b src/tsconfig.cjs.json && cpy src/plugins/evasions/_utils/index.js dist/cjs/plugins/evasions/_utils/",
"tsc-esm": "rimraf dist/esm && tsc -b src/tsconfig.esm.json && cpy src/plugins/evasions/_utils/index.js dist/esm/plugins/evasions/_utils/"
},
"keywords": [
"bot",
Expand Down Expand Up @@ -49,23 +49,32 @@
"font-list": "*",
"fs-extra": "*",
"pidtree": "*",
"puppeteer-extra": "*",
"puppeteer-extra-plugin": "*",
"puppeteer-extra-plugin-user-preferences": "*",
"puppeteer-extra": "link:..\\puppeteer-extra-ts\\packages\\puppeteer-extra",
"puppeteer-extra-plugin": "link:..\\puppeteer-extra-ts\\packages\\puppeteer-extra-plugin",
"puppeteer-extra-plugin-user-preferences": "link:..\\puppeteer-extra-ts\\packages\\puppeteer-extra-plugin-user-preferences",
"url-toolkit": "*"
},
"peerDependencies": {
"axios": "*",
"puppeteer": "*"
},
"devDependencies": {
"@types/axios": "*",
"@types/chrome": "^0.0.190",
"@types/fs-extra": "^9.0.13",
"@types/puppeteer": "*",
"@types/koa": "^2.13.4",
"@types/koa-static": "^4.0.2",
"@types/node": "*",
"@types/offscreencanvas": "^2019.7.0",
"axios": "^0.24.0",
"cpy-cli": "^3.1.1",
"cross-env": "^7.0.3",
"jest": "^27.3.1",
"jest-environment-node": "27.3.1",
"koa": "^2.13.4",
"koa-body": "^5.0.0",
"koa-static": "^5.0.0",
"mkdirp": "^1.0.4",
"npm": "^8.13.1",
"puppeteer": "^11.0.0",
"rimraf": "^3.0.2",
"ts-node": "^10.4.0",
Expand Down
Loading