@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.
Files changed (40) hide show
  1. package/AGENT-INSTALL.md +34 -19
  2. package/README.md +73 -17
  3. package/dist/{chunk-YG5C7HYB.js → chunk-52IV7LN7.js} +1 -1
  4. package/dist/{chunk-YG5C7HYB.js.map → chunk-52IV7LN7.js.map} +1 -1
  5. package/dist/cli.js +2755 -371
  6. package/dist/cli.js.map +1 -1
  7. package/dist/index.cjs +33 -12
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.d.cts +5 -0
  10. package/dist/index.d.ts +5 -0
  11. package/dist/index.js +33 -12
  12. package/dist/index.js.map +1 -1
  13. package/dist/protect/templates/astro-middleware.ts +5 -4
  14. package/dist/protect/templates/express-guard.cjs +5 -8
  15. package/dist/protect/templates/express-guard.js +5 -8
  16. package/dist/protect/templates/express-guard.ts +5 -8
  17. package/dist/protect/templates/fastify-plugin.cjs +52 -6
  18. package/dist/protect/templates/fastify-plugin.js +52 -6
  19. package/dist/protect/templates/fastify-plugin.ts +53 -7
  20. package/dist/protect/templates/fetch-guard.ts +52 -0
  21. package/dist/protect/templates/generic-guard.cjs +6 -5
  22. package/dist/protect/templates/generic-guard.js +6 -5
  23. package/dist/protect/templates/generic-guard.ts +5 -8
  24. package/dist/protect/templates/guard.ts +4 -7
  25. package/dist/protect/templates/next-guard.ts +5 -4
  26. package/dist/protect/templates/next-middleware.ts +5 -4
  27. package/dist/protect/templates/nuxt-middleware.ts +5 -4
  28. package/dist/protect/templates/sveltekit-hooks.ts +5 -4
  29. package/dist/protect.cjs +33 -12
  30. package/dist/protect.cjs.map +1 -1
  31. package/dist/protect.d.cts +1 -1
  32. package/dist/protect.d.ts +1 -1
  33. package/dist/protect.edge.js +2 -2
  34. package/dist/protect.edge.js.map +1 -1
  35. package/dist/protect.js +4 -4
  36. package/dist/protect.js.map +1 -1
  37. package/dist/{refresh-manifest-OMRDCNFD.js → refresh-manifest-EBORKM75.js} +33 -12
  38. package/dist/refresh-manifest-EBORKM75.js.map +1 -0
  39. package/package.json +5 -2
  40. 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-YG5C7HYB.js";
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-OMRDCNFD.js"));
7092
+ ({ reportManifest: reporter } = await import("./refresh-manifest-EBORKM75.js"));
7093
7093
  } catch (err) {
7094
7094
  notify(onError, err, "onError");
7095
7095
  }