@patchstack/connect 0.5.7 → 0.5.8

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/dist/protect.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  readBoundedJson,
7
7
  readBuildStamp,
8
8
  safeBaseUrl
9
- } from "./chunk-2K5SHFUM.js";
9
+ } from "./chunk-4OHAYSV2.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-3YWIYENU.js"));
6106
+ ({ reportManifest: reporter } = await import("./refresh-manifest-IE6SPHG6.js"));
6103
6107
  } catch (err) {
6104
6108
  notify(onError, err, "onError");
6105
6109
  }