@patchstack/connect 0.5.7 → 0.5.9
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 +5 -4
- package/README.md +6 -5
- package/dist/{chunk-2K5SHFUM.js → chunk-YG5C7HYB.js} +1 -1
- package/dist/{chunk-2K5SHFUM.js.map → chunk-YG5C7HYB.js.map} +1 -1
- package/dist/cli.js +140 -14
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +106 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -4
- package/dist/index.d.ts +27 -4
- package/dist/index.js +106 -8
- package/dist/index.js.map +1 -1
- package/dist/protect.cjs +111 -9
- package/dist/protect.cjs.map +1 -1
- package/dist/protect.edge.js +4 -0
- package/dist/protect.edge.js.map +1 -1
- package/dist/protect.js +6 -2
- package/dist/protect.js.map +1 -1
- package/dist/{refresh-manifest-3YWIYENU.js → refresh-manifest-PPV22Q2E.js} +108 -10
- package/dist/refresh-manifest-PPV22Q2E.js.map +1 -0
- package/package.json +1 -1
- package/dist/refresh-manifest-3YWIYENU.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-YG5C7HYB.js";
|
|
10
10
|
|
|
11
11
|
// src/protect/client-ip.js
|
|
12
12
|
var ZONE = /^[A-Za-z0-9._-]{1,64}$/;
|
|
@@ -2728,6 +2728,7 @@ var DEFAULT_BASE_URL2 = "https://api.patchstack.com/monitor/pulse";
|
|
|
2728
2728
|
var DEFAULT_CACHE_TTL2 = 3e5;
|
|
2729
2729
|
var BUILD_VERDICT_HEADER = "X-Patchstack-Build-Match";
|
|
2730
2730
|
var BUILD_IDENTITY_HEADER = "X-Patchstack-Build-ID";
|
|
2731
|
+
var PER_RULE_DRY_RUN_HEADER = "X-Patchstack-Per-Rule-Dry-Run";
|
|
2731
2732
|
var JITTER_FRACTION2 = 0.1;
|
|
2732
2733
|
var PulseRuleClient = class {
|
|
2733
2734
|
#siteUuid;
|
|
@@ -2772,6 +2773,9 @@ var PulseRuleClient = class {
|
|
|
2772
2773
|
if (this.#buildId !== null && typeof auth.Authorization === "string") {
|
|
2773
2774
|
headers["X-Patchstack-Build"] = this.#buildId;
|
|
2774
2775
|
}
|
|
2776
|
+
if (typeof auth.Authorization === "string") {
|
|
2777
|
+
headers[PER_RULE_DRY_RUN_HEADER] = "1";
|
|
2778
|
+
}
|
|
2775
2779
|
if (this.#etag) headers["If-None-Match"] = this.#etag;
|
|
2776
2780
|
const response = await fetch(url, { method: "GET", headers, signal: AbortSignal.timeout(this.#timeoutMs) });
|
|
2777
2781
|
if (response.status === 304) {
|
|
@@ -6099,7 +6103,7 @@ async function createProtection(options = {}) {
|
|
|
6099
6103
|
let reporter = null;
|
|
6100
6104
|
if (refreshable && options.siteUuid && options.reportManifest !== false && cwd) {
|
|
6101
6105
|
try {
|
|
6102
|
-
({ reportManifest: reporter } = await import("./refresh-manifest-
|
|
6106
|
+
({ reportManifest: reporter } = await import("./refresh-manifest-PPV22Q2E.js"));
|
|
6103
6107
|
} catch (err) {
|
|
6104
6108
|
notify(onError, err, "onError");
|
|
6105
6109
|
}
|