@patchstack/connect 0.5.26 → 0.5.30
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/AGENT-INSTALL.md +34 -19
- package/README.md +73 -17
- package/dist/{chunk-YG5C7HYB.js → chunk-52IV7LN7.js} +1 -1
- package/dist/{chunk-YG5C7HYB.js.map → chunk-52IV7LN7.js.map} +1 -1
- package/dist/cli.js +2755 -371
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +33 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +33 -12
- package/dist/index.js.map +1 -1
- package/dist/protect/templates/astro-middleware.ts +5 -4
- package/dist/protect/templates/express-guard.cjs +5 -8
- package/dist/protect/templates/express-guard.js +5 -8
- package/dist/protect/templates/express-guard.ts +5 -8
- package/dist/protect/templates/fastify-plugin.cjs +52 -6
- package/dist/protect/templates/fastify-plugin.js +52 -6
- package/dist/protect/templates/fastify-plugin.ts +53 -7
- package/dist/protect/templates/fetch-guard.ts +52 -0
- package/dist/protect/templates/generic-guard.cjs +6 -5
- package/dist/protect/templates/generic-guard.js +6 -5
- package/dist/protect/templates/generic-guard.ts +5 -8
- package/dist/protect/templates/guard.ts +4 -7
- package/dist/protect/templates/next-guard.ts +5 -4
- package/dist/protect/templates/next-middleware.ts +5 -4
- package/dist/protect/templates/nuxt-middleware.ts +5 -4
- package/dist/protect/templates/sveltekit-hooks.ts +5 -4
- package/dist/protect.cjs +33 -12
- package/dist/protect.cjs.map +1 -1
- package/dist/protect.d.cts +1 -1
- package/dist/protect.d.ts +1 -1
- package/dist/protect.edge.js +2 -2
- package/dist/protect.edge.js.map +1 -1
- package/dist/protect.js +4 -4
- package/dist/protect.js.map +1 -1
- package/dist/{refresh-manifest-OMRDCNFD.js → refresh-manifest-EBORKM75.js} +33 -12
- package/dist/refresh-manifest-EBORKM75.js.map +1 -0
- package/package.json +5 -2
- package/dist/refresh-manifest-OMRDCNFD.js.map +0 -1
package/dist/protect.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
readBoundedJson,
|
|
7
7
|
readBuildStamp,
|
|
8
8
|
safeBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-52IV7LN7.js";
|
|
10
10
|
|
|
11
11
|
// src/protect/client-ip.js
|
|
12
12
|
var ZONE = /^[A-Za-z0-9._-]{1,64}$/;
|
|
@@ -6975,10 +6975,10 @@ async function createProtection(options = {}) {
|
|
|
6975
6975
|
},
|
|
6976
6976
|
// Wrap a fetch handler: screens the request, then the response (redact/block).
|
|
6977
6977
|
fetch(handler) {
|
|
6978
|
-
return async (request, ...rest)
|
|
6978
|
+
return async function(request, ...rest) {
|
|
6979
6979
|
const { blocked, client } = await screenFetchRequest(request, rest);
|
|
6980
6980
|
if (blocked) return blocked;
|
|
6981
|
-
const response = await handler(request, ...rest);
|
|
6981
|
+
const response = await handler.call(this, request, ...rest);
|
|
6982
6982
|
return screenResp(response, reqContextFromFetch(request, client));
|
|
6983
6983
|
};
|
|
6984
6984
|
},
|
|
@@ -7089,7 +7089,7 @@ async function createProtection(options = {}) {
|
|
|
7089
7089
|
let reporter = null;
|
|
7090
7090
|
if (refreshable && options.siteUuid && options.reportManifest !== false && cwd) {
|
|
7091
7091
|
try {
|
|
7092
|
-
({ reportManifest: reporter } = await import("./refresh-manifest-
|
|
7092
|
+
({ reportManifest: reporter } = await import("./refresh-manifest-EBORKM75.js"));
|
|
7093
7093
|
} catch (err) {
|
|
7094
7094
|
notify(onError, err, "onError");
|
|
7095
7095
|
}
|