@js-recon/js-recon 2.0.1-beta.3 → 2.0.1-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/dependabot.yml +1 -1
- package/.github/workflows/publish-js-recon.yml +2 -2
- package/AGENTS.md +4 -6
- package/CHANGELOG.md +37 -0
- package/Dockerfile +1 -2
- package/README.md +3 -1
- package/build/cliProgram.js +5 -1
- package/build/cliProgram.js.map +1 -1
- package/build/config/applicationConfig.js +6 -4
- package/build/config/applicationConfig.js.map +1 -1
- package/build/globalConfig.js +1 -1
- package/build/lazyLoad/nuxt_js/nuxt_astParse.js +60 -47
- package/build/lazyLoad/nuxt_js/nuxt_astParse.js.map +1 -1
- package/build/lazyLoad/techDetect/index.js +37 -5
- package/build/lazyLoad/techDetect/index.js.map +1 -1
- package/build/map/vue_js/crossFileResolver.js +43 -10
- package/build/map/vue_js/crossFileResolver.js.map +1 -1
- package/build/map/vue_js/taint_utils.js +57 -24
- package/build/map/vue_js/taint_utils.js.map +1 -1
- package/build/map/vue_js/vue_resolveFetch.js +177 -162
- package/build/map/vue_js/vue_resolveFetch.js.map +1 -1
- package/build/map/vue_js/vue_resolveXhr.js +3 -4
- package/build/map/vue_js/vue_resolveXhr.js.map +1 -1
- package/build/proxy/index.js +35 -4
- package/build/proxy/index.js.map +1 -1
- package/build/proxy/oxylabsFallback.js +18 -2
- package/build/proxy/oxylabsFallback.js.map +1 -1
- package/build/proxy/oxylabsProxy.js +44 -2
- package/build/proxy/oxylabsProxy.js.map +1 -1
- package/build/proxy/resolveProxyConfig.js +27 -1
- package/build/proxy/resolveProxyConfig.js.map +1 -1
- package/build/refactor/react/index.js +13 -1
- package/build/refactor/react/index.js.map +1 -1
- package/build/run/index.js +18 -24
- package/build/run/index.js.map +1 -1
- package/build/utility/banner.js +11 -1
- package/build/utility/banner.js.map +1 -1
- package/build/utility/configureProxy.js +15 -7
- package/build/utility/configureProxy.js.map +1 -1
- package/build/utility/fatalHandlers.js +32 -0
- package/build/utility/fatalHandlers.js.map +1 -1
- package/build/utility/globals.js.map +1 -1
- package/build/utility/makeReq.js +16 -12
- package/build/utility/makeReq.js.map +1 -1
- package/build/utility/runSandboxed.js +7 -0
- package/build/utility/runSandboxed.js.map +1 -1
- package/config.dist.yaml +5 -1
- package/package.json +61 -63
- package/scripts/postinstall-patch.mjs +21 -0
- package/patches/puppeteer-extra-plugin-user-data-dir+2.4.1.patch +0 -31
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Makes puppeteer-extra-plugin-user-data-dir@2.4.1 work with the rimraf@6 override: rimraf@6 dropped the
|
|
3
|
+
// callback API, so its temp profile cleanup is switched to fs.rm. Replaces patch-package, whose
|
|
4
|
+
// micromatch -> braces chain has no patched release. Idempotent; must never fail the parent `npm install`.
|
|
5
|
+
|
|
6
|
+
import fs from "fs";
|
|
7
|
+
import { createRequire } from "module";
|
|
8
|
+
|
|
9
|
+
try {
|
|
10
|
+
const file = createRequire(import.meta.url).resolve("puppeteer-extra-plugin-user-data-dir");
|
|
11
|
+
const source = fs.readFileSync(file, "utf8");
|
|
12
|
+
if (source.includes("require('rimraf')")) {
|
|
13
|
+
const patched = source
|
|
14
|
+
.replace("const rimraf = require('rimraf')\n", "")
|
|
15
|
+
.replace(" rimraf(\n", " fs.rm(\n")
|
|
16
|
+
.replace("maxBusyTries: 4", "recursive: true,\n force: true,\n maxRetries: 4");
|
|
17
|
+
fs.writeFileSync(file, patched);
|
|
18
|
+
}
|
|
19
|
+
} catch (err) {
|
|
20
|
+
console.log(`[!] js-recon: could not patch puppeteer-extra-plugin-user-data-dir: ${err.message}`);
|
|
21
|
+
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
diff --git a/node_modules/puppeteer-extra-plugin-user-data-dir/index.js b/node_modules/puppeteer-extra-plugin-user-data-dir/index.js
|
|
2
|
-
index 935505a..86754d3 100644
|
|
3
|
-
--- a/node_modules/puppeteer-extra-plugin-user-data-dir/index.js
|
|
4
|
-
+++ b/node_modules/puppeteer-extra-plugin-user-data-dir/index.js
|
|
5
|
-
@@ -5,7 +5,6 @@ const fs = require('fs')
|
|
6
|
-
const fse = require('fs-extra')
|
|
7
|
-
const os = require('os')
|
|
8
|
-
const path = require('path')
|
|
9
|
-
-const rimraf = require('rimraf')
|
|
10
|
-
const debug = require('debug')('puppeteer-extra-plugin:user-data-dir')
|
|
11
|
-
const mkdtempAsync = util.promisify(fs.mkdtemp)
|
|
12
|
-
const { PuppeteerExtraPlugin } = require('puppeteer-extra-plugin')
|
|
13
|
-
@@ -71,12 +70,14 @@ class Plugin extends PuppeteerExtraPlugin {
|
|
14
|
-
return
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
- // We're using rimraf here because it throw errors and don't seem to freeze the process
|
|
18
|
-
- // If ressources busy or locked by chrome try again 4 times, then give up. overall a timout of 400ms
|
|
19
|
-
- rimraf(
|
|
20
|
-
+ // We're using fs.rm here because it throws errors and doesn't seem to freeze the process
|
|
21
|
-
+ // If resources are busy or locked by chrome, retry a few times, then give up.
|
|
22
|
-
+ fs.rm(
|
|
23
|
-
this._userDataDir,
|
|
24
|
-
{
|
|
25
|
-
- maxBusyTries: 4
|
|
26
|
-
+ recursive: true,
|
|
27
|
-
+ force: true,
|
|
28
|
-
+ maxRetries: 4
|
|
29
|
-
},
|
|
30
|
-
err => {
|
|
31
|
-
debug(err)
|