Commit Graph

19 Commits

Author SHA1 Message Date
Tony
6d901cb7dc style(eslint): add eslint-unicorn (#14257)
* style: add eslint-unicorn

* style: fix unicorn/no-useless-spread

* style: fix unicorn/no-useless-promise-resolve-reject

* style: fix unicorn/no-for-loop

* fix: codeql bad HTML filtering regexp

* fix: codeql incomplete replace

* fix: unicorn/no-abusive-eslint-disable

* style: fix unicorn/no-new-array

* style: fix unicorn/no-typeof-undefined

* style: fix unicorn/no-zero-fractions

* style: fix unicorn/no-empty-file

* style: fix unicorn/prefer-date-now

* revert: auto fix unicorn/prefer-switch on lib/v2/kuaidi100/utils.js

* style: fix unicorn/prefer-array-find

* style: fix unicorn/prefer-array-flat

* style: fix unicorn/prefer-array-flat-map

* style: fix unicorn/prefer-at

* style: fix unicorn/prefer-string-starts-ends-with

* style: fix unicorn/prefer-includes

* fix: codeql URL substring sanitization

* style: fix unicorn/prefer-optional-catch-binding

* style: fix unicorn/catch-error-name

* style: fix unicorn/escape-case

* style: fix unicorn/prefer-native-coercion-functions

* style: fix unicorn/prefer-regexp-test

* style: fix unicorn/require-array-join-separator

* style: fix unicorn/prefer-math-trunc

* style: fix unicorn/prefer-negative-index

* style: fix unicorn/prefer-dom-node-dataset

* style: fix unicorn/prefer-dom-node-text-content

* style: fix unicorn/prefer-query-selector

* style: fix unicorn/no-array-for-each

* style: fix unicorn/no-negated-condition

* style: fix unicorn/prefer-add-event-listener

* style: fix unicorn/import-style

* style: fix prefer-regex-literals

* style: disable unicorn/no-useless-switch-case

* style: disable unicorn/text-encoding-identifier-case

* style: fix unicorn/prefer-set-has

* style: fix unicorn/prefer-spread

* revert: auto fix on lib/routes/universities/ynnu/edu/base64.js

* style: fix unicorn/no-useless-undefined

* style: fix unicorn/no-array-push-push

* style: fix unicorn/no-useless-undefined again

* style: fix unicorn/no-lonely-if

* style: fix unicorn/prefer-reflect-apply

* style: fix unicorn/switch-case-braces

* style: fix unicorn/prefer-switch

* style: fix unicorn/prefer-array-some

* fix: deepscan UNUSED_VAR_ASSIGN

* style: fix unicorn/prefer-ternary

* fix: follow-up of unicorn/prefer-ternary

* revert: auto fix of unicorn/prefer-string-slice for substring()

* style: disable unicorn/prefer-string-slice

fix: auto fix slice over deprecated substr

* style: fix unicorn/throw-new-error

* style: fix unicorn/filename-case

* test: fix dateParser renaming

* style: fix unicorn/better-regex

* style: fix unicorn/prefer-string-replace-all

* fix(deps): add sanitize-html

* style: fix no-prototype-builtins

* style: fix unicorn/consistent-destructuring

* style: fix unicorn/consistent-function-scoping

* style: fix unicorn/prefer-regexp-test

* style: fix unicorn/prefer-logical-operator-over-ternary

* style: fix unicorn/no-array-callback-reference

* style: add prefer-object-has-own

* style: warn unicorn/no-empty-file

* style: fix unicorn/prefer-number-properties

* style: fix no-useless-undefined again

* style: fix unicorn/numeric-separators-style

* style: disable unicorn/no-array-callback-reference

false postive with cheerio
2024-01-18 20:43:40 +08:00
Tony
a0ea328013 build: fix pnpm pptr postinstall (#12450)
* chore: fix chrome not found in jest

* chore: explicitly require deps for stealth plugin
2023-05-05 23:58:29 +08:00
dependabot[bot]
3ff763ee8d chore(deps): bump puppeteer from 19.8.3 to 19.11.0 (#12385)
* chore(deps): bump puppeteer from 19.8.3 to 19.11.0

Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 19.8.3 to 19.11.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v19.8.3...puppeteer-v19.11.0)

---
updated-dependencies:
- dependency-name: puppeteer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* test: fix puppeteer exitCode

* feat: use new headless chrome

https://developer.chrome.com/articles/new-headless/

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-26 03:14:45 +08:00
Rongrong
d60d89ea87 feat(core): unify proxy; optimize request-wrapper (#11472)
* feat(core): unify proxy; optimize request-wrapper

Signed-off-by: Rongrong <i@rong.moe>

* Fix DeepScan issue

Signed-off-by: Rongrong <i@rong.moe>

* Simplify protocol existence judgment

Signed-off-by: Rongrong <i@rong.moe>

* chore: regenerate yarn.lock

Signed-off-by: Rongrong <i@rong.moe>
2022-12-23 01:13:01 +08:00
Rongrong
1381377e91 fix(core/utils/puppeteer): proxy-chain error (#11470)
HTTPS/SOCKS proxy is not supported by proxy-chain and will cause an
error unconditionally. If an HTTPS/SOCKS proxy does not need
authentication, explicitly bypassing proxy-chain is a must. If it does
need, making a warning and continuing without proxy seems to be the best
choice.

Signed-off-by: Rongrong <i@rong.moe>

Signed-off-by: Rongrong <i@rong.moe>
2022-12-19 23:39:11 +08:00
DIYgod
9329a44c80 feat(core): support proxy config for pupperteer (#10714)
* feat: support proxy config for pupperteer

* test: add puppeteer proxy detection

* fix: package.json

* test: fix regex
2022-09-07 00:07:04 +08:00
Tony
a5fd8de30e fix(docker): puppeteer stealth not working in docker (#9896) 2022-06-05 17:09:34 +08:00
Tony
0b544e1395 feat(utils): puppeteer-extra-plugin-stealth (#9676) 2022-05-03 01:17:17 +08:00
Rongrong
7a6be9a229 feat(core): customizable Chromium executable path (#9670)
* feat(core): customizable Chromium executable path

also build Chromium-bundled Docker image for arm/arm64

Signed-off-by: Rongrong <i@rong.moe>

* chore: fix typo

Signed-off-by: Rongrong <i@rong.moe>

* chore(CI/test): using build matrix

Signed-off-by: Rongrong <i@rong.moe>

* docs(install): fix punctuation

Signed-off-by: Rongrong <i@rong.moe>
2022-05-01 21:00:29 +08:00
Tony
2c2bf4ed09 fix: typo in puppeteer options 2022-03-06 23:42:32 +08:00
DIYgod
35c9834049 fix: puppeteer userDataDir 2021-11-28 01:21:42 +00:00
Sukka
6e3b58ed1d refactor: avoid promise overhead (#8028) 2021-08-16 11:45:53 -07:00
DIYgod
ae529572d7 feat: longer closing puppeteer page time 2020-06-14 22:28:43 +08:00
DIYgod
4445443946 feat: use dynamical config 2019-09-18 17:45:21 +08:00
DIYgod
70c9546871 fix: puppeteer close error 2019-09-03 23:04:42 +08:00
DIYgod
749ede3af8 test: puppeteer auto close 2019-06-13 18:37:55 +08:00
DIYgod
e2badbfa98 chore: module alias for all routes 2019-05-15 15:27:15 +08:00
DIYgod
9ff646c066 fix douyin 2019-04-11 14:35:16 +08:00
DIYgod
38a90e29b0 optimize directory structure 2018-12-26 18:35:10 +08:00