@appwarden/middleware 3.13.4 → 3.14.1

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/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![GitHub](https://img.shields.io/badge/GitHub-appwarden%2Fmiddleware-181717?logo=github&logoColor=white)](https://github.com/appwarden/middleware)
5
5
  [![npm version](https://img.shields.io/npm/v/@appwarden/middleware.svg)](https://www.npmjs.com/package/@appwarden/middleware)
6
6
  [![npm provenance](https://img.shields.io/badge/npm-provenance-green)](https://docs.npmjs.com/generating-provenance-statements)
7
- ![Test Coverage](https://img.shields.io/badge/coverage-93.24%25-brightgreen)
7
+ ![Test Coverage](https://img.shields.io/badge/coverage-93.34%25-brightgreen)
8
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
9
9
 
10
10
  ## Core Features
@@ -9,8 +9,9 @@ import {
9
9
  HEARTBEAT_CONTRACT_VERSION,
10
10
  HEARTBEAT_RESPONSE_BODY_MAX_SERIALIZED_BYTES,
11
11
  LOCKDOWN_TEST_EXPIRY_MS,
12
+ MIDDLEWARE_VERSION,
12
13
  validateHeartbeatResponseBody
13
- } from "./chunk-OIEAURS7.js";
14
+ } from "./chunk-LDKC5DRW.js";
14
15
 
15
16
  // src/utils/build-lock-page-url.ts
16
17
  function normalizeLockPageSlug(lockPageSlug) {
@@ -121,9 +122,6 @@ var MemoryCache = class {
121
122
  };
122
123
  };
123
124
 
124
- // src/version.ts
125
- var MIDDLEWARE_VERSION = "3.13.2";
126
-
127
125
  // src/utils/heartbeat.ts
128
126
  var DEFAULT_HEARTBEAT_CONFIG_ERROR_CODE = "custom";
129
127
  var DEFAULT_HEARTBEAT_CONFIG_ERROR_MESSAGE = "Appwarden configuration validation failed";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useContentSecurityPolicy
3
- } from "./chunk-HZRLFCGV.js";
3
+ } from "./chunk-DM57ZOTI.js";
4
4
 
5
5
  // src/utils/apply-content-security-policy-to-response.ts
6
6
  var applyContentSecurityPolicyToResponse = async ({
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  isHTMLResponse,
3
3
  makeCSPHeader
4
- } from "./chunk-PSOS33UD.js";
4
+ } from "./chunk-2FSRHIPY.js";
5
5
  import {
6
6
  UseCSPInputSchema
7
- } from "./chunk-OIEAURS7.js";
7
+ } from "./chunk-LDKC5DRW.js";
8
8
 
9
9
  // src/middlewares/use-content-security-policy.ts
10
10
  var AppendAttribute = (attribute, nonce) => ({
@@ -3,7 +3,7 @@ import {
3
3
  AppwardenApiTokenSchema,
4
4
  BooleanSchema,
5
5
  UseCSPInputSchema
6
- } from "./chunk-OIEAURS7.js";
6
+ } from "./chunk-LDKC5DRW.js";
7
7
 
8
8
  // src/schemas/use-appwarden.ts
9
9
  import { z } from "zod";
@@ -1,3 +1,6 @@
1
+ // src/version.ts
2
+ var MIDDLEWARE_VERSION = "3.14.0";
3
+
1
4
  // src/constants.ts
2
5
  var LOCKDOWN_TEST_EXPIRY_MS = 5 * 60 * 1e3;
3
6
  var errors = { badCacheConnection: "BAD_CACHE_CONNECTION" };
@@ -14,6 +17,8 @@ var HEARTBEAT_CONFIG_ERRORS_MAX_SERIALIZED_BYTES = 12 * 1024;
14
17
  var HEARTBEAT_RESPONSE_BODY_MAX_SERIALIZED_BYTES = 32 * 1024;
15
18
  var HEARTBEAT_CONFIG_ERROR_MAX_PATH_SEGMENT_LENGTH = 100;
16
19
  var APPWARDEN_CACHE_KEY = "appwarden-lock";
20
+ var APPWARDEN_MIDDLEWARE_USER_AGENT_PREFIX = "Appwarden/";
21
+ var APPWARDEN_MIDDLEWARE_USER_AGENT = `${APPWARDEN_MIDDLEWARE_USER_AGENT_PREFIX}${MIDDLEWARE_VERSION}`;
17
22
  var HEARTBEAT_SERVICE_VALUES = [
18
23
  "cloudflare",
19
24
  "cloudflare-astro",
@@ -192,6 +197,7 @@ var UseCSPInputSchema = z4.object({
192
197
  });
193
198
 
194
199
  export {
200
+ MIDDLEWARE_VERSION,
195
201
  LOCKDOWN_TEST_EXPIRY_MS,
196
202
  errors,
197
203
  globalErrors,
@@ -207,6 +213,8 @@ export {
207
213
  HEARTBEAT_RESPONSE_BODY_MAX_SERIALIZED_BYTES,
208
214
  HEARTBEAT_CONFIG_ERROR_MAX_PATH_SEGMENT_LENGTH,
209
215
  APPWARDEN_CACHE_KEY,
216
+ APPWARDEN_MIDDLEWARE_USER_AGENT_PREFIX,
217
+ APPWARDEN_MIDDLEWARE_USER_AGENT,
210
218
  HEARTBEAT_SERVICE_VALUES,
211
219
  HEARTBEAT_SERVICES,
212
220
  BooleanSchema,
@@ -2,12 +2,13 @@ import {
2
2
  MemoryCache,
3
3
  debug,
4
4
  printMessage
5
- } from "./chunk-PSOS33UD.js";
5
+ } from "./chunk-2FSRHIPY.js";
6
6
  import {
7
7
  APPWARDEN_CACHE_KEY,
8
+ APPWARDEN_MIDDLEWARE_USER_AGENT,
8
9
  APPWARDEN_TEST_ROUTE,
9
10
  LockValue
10
- } from "./chunk-OIEAURS7.js";
11
+ } from "./chunk-LDKC5DRW.js";
11
12
 
12
13
  // src/utils/cloudflare/cloudflare-cache.ts
13
14
  var store = {
@@ -127,7 +128,10 @@ var syncEdgeValue = async (context) => {
127
128
  try {
128
129
  const response = await fetch(new URL("/v1/appwarden/status", apiHostname), {
129
130
  method: "POST",
130
- headers: { "content-type": "application/json" },
131
+ headers: {
132
+ "content-type": "application/json",
133
+ "user-agent": APPWARDEN_MIDDLEWARE_USER_AGENT
134
+ },
131
135
  body: JSON.stringify({
132
136
  service: "cloudflare",
133
137
  provider: context.provider,
@@ -1,4 +1,3 @@
1
- import { Runtime } from '@astrojs/cloudflare';
2
1
  import { MiddlewareHandler } from 'astro';
3
2
  import { z } from 'zod';
4
3
 
@@ -352,12 +351,19 @@ type AstroCloudflareConfig = z.infer<typeof AstroCloudflareConfigSchema>;
352
351
  type AstroCloudflareConfigInput = z.input<typeof AstroCloudflareConfigSchema>;
353
352
 
354
353
  /**
355
- * Cloudflare runtime context provided by Astro on Cloudflare Workers.
356
- * This is extracted from the locals object when using @astrojs/cloudflare adapter.
354
+ * Normalized Cloudflare runtime context exposed to Appwarden config functions.
357
355
  *
358
- * Note: Uses generic CloudflareEnv which should be defined in the user's project.
356
+ * Astro v6 no longer exposes the old `locals.runtime` shape, so we compose the
357
+ * runtime from current Cloudflare primitives instead:
358
+ * - bindings from `cloudflare:workers`
359
+ * - cache storage from the global `caches`
360
+ * - execution context from `context.locals.cfContext`
359
361
  */
360
- type AstroCloudflareRuntime = Runtime<CloudflareEnv>["runtime"];
362
+ interface AstroCloudflareRuntime {
363
+ env: CloudflareEnv;
364
+ caches: CacheStorage;
365
+ ctx: ExecutionContext;
366
+ }
361
367
  /**
362
368
  * Configuration for the Appwarden middleware.
363
369
  *
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  applyContentSecurityPolicyToResponse,
3
3
  isResponseLike
4
- } from "../chunk-2ZF7A6Z3.js";
5
- import "../chunk-HZRLFCGV.js";
4
+ } from "../chunk-7BZFEX4Z.js";
5
+ import "../chunk-DM57ZOTI.js";
6
6
  import {
7
7
  getNowMs,
8
8
  logElapsed
9
9
  } from "../chunk-G6BMPIYD.js";
10
10
  import {
11
11
  checkLockStatus
12
- } from "../chunk-BIGBX7II.js";
12
+ } from "../chunk-PCWFMNHW.js";
13
13
  import {
14
14
  TEMPORARY_REDIRECT_STATUS,
15
15
  buildLockPageUrl,
@@ -22,17 +22,17 @@ import {
22
22
  isOnLockPage,
23
23
  printMessage,
24
24
  sanitizeConfigErrors
25
- } from "../chunk-PSOS33UD.js";
25
+ } from "../chunk-2FSRHIPY.js";
26
26
  import {
27
27
  AppwardenApiHostnameSchema,
28
28
  AppwardenApiTokenSchema,
29
29
  BooleanSchema,
30
30
  HEARTBEAT_SERVICES,
31
31
  UseCSPInputSchema
32
- } from "../chunk-OIEAURS7.js";
32
+ } from "../chunk-LDKC5DRW.js";
33
33
 
34
34
  // src/adapters/astro-cloudflare.ts
35
- import { waitUntil } from "cloudflare:workers";
35
+ import { env as cloudflareEnv, waitUntil } from "cloudflare:workers";
36
36
 
37
37
  // src/schemas/astro-cloudflare.ts
38
38
  import { z } from "zod";
@@ -87,6 +87,16 @@ var createAstroHeartbeatResponse = (request, runtime, configFn) => {
87
87
  );
88
88
  }
89
89
  };
90
+ var getAstroCloudflareRuntime = (locals) => {
91
+ if (!locals.cfContext) {
92
+ return void 0;
93
+ }
94
+ return {
95
+ env: cloudflareEnv,
96
+ caches,
97
+ ctx: locals.cfContext
98
+ };
99
+ };
90
100
  function createAppwardenMiddleware(configFn) {
91
101
  return async (context, next) => {
92
102
  const startTime = getNowMs();
@@ -117,15 +127,15 @@ function createAppwardenMiddleware(configFn) {
117
127
  }
118
128
  };
119
129
  const locals = context.locals;
130
+ const runtime = getAstroCloudflareRuntime(locals);
120
131
  if (isHeartbeatRequest(request, requestUrl)) {
121
- return createAstroHeartbeatResponse(request, locals.runtime, configFn);
132
+ return createAstroHeartbeatResponse(request, runtime, configFn);
122
133
  }
123
134
  try {
124
- const runtime = locals.runtime;
125
135
  if (!runtime) {
126
136
  console.error(
127
137
  printMessage(
128
- "Cloudflare runtime not found. Ensure @astrojs/cloudflare adapter is configured."
138
+ "Cloudflare context not found. Ensure @astrojs/cloudflare adapter is configured."
129
139
  )
130
140
  );
131
141
  return next();
@@ -7,7 +7,7 @@ import {
7
7
  } from "../chunk-G6BMPIYD.js";
8
8
  import {
9
9
  checkLockStatus
10
- } from "../chunk-BIGBX7II.js";
10
+ } from "../chunk-PCWFMNHW.js";
11
11
  import {
12
12
  TEMPORARY_REDIRECT_STATUS,
13
13
  buildLockPageUrl,
@@ -20,14 +20,14 @@ import {
20
20
  makeCSPHeader,
21
21
  printMessage,
22
22
  sanitizeConfigErrors
23
- } from "../chunk-PSOS33UD.js";
23
+ } from "../chunk-2FSRHIPY.js";
24
24
  import {
25
25
  AppwardenApiHostnameSchema,
26
26
  AppwardenApiTokenSchema,
27
27
  BooleanSchema,
28
28
  HEARTBEAT_SERVICES,
29
29
  UseCSPInputSchema
30
- } from "../chunk-OIEAURS7.js";
30
+ } from "../chunk-LDKC5DRW.js";
31
31
 
32
32
  // src/adapters/nextjs-cloudflare.ts
33
33
  import { getCloudflareContext } from "@opennextjs/cloudflare";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  applyContentSecurityPolicyToResponse,
3
3
  isResponseLike
4
- } from "../chunk-2ZF7A6Z3.js";
5
- import "../chunk-HZRLFCGV.js";
4
+ } from "../chunk-7BZFEX4Z.js";
5
+ import "../chunk-DM57ZOTI.js";
6
6
  import {
7
7
  getNowMs,
8
8
  logElapsed
9
9
  } from "../chunk-G6BMPIYD.js";
10
10
  import {
11
11
  checkLockStatus
12
- } from "../chunk-BIGBX7II.js";
12
+ } from "../chunk-PCWFMNHW.js";
13
13
  import {
14
14
  buildLockPageUrl,
15
15
  createHeartbeatConfigError,
@@ -21,14 +21,14 @@ import {
21
21
  isOnLockPage,
22
22
  printMessage,
23
23
  sanitizeConfigErrors
24
- } from "../chunk-PSOS33UD.js";
24
+ } from "../chunk-2FSRHIPY.js";
25
25
  import {
26
26
  AppwardenApiHostnameSchema,
27
27
  AppwardenApiTokenSchema,
28
28
  BooleanSchema,
29
29
  HEARTBEAT_SERVICES,
30
30
  UseCSPInputSchema
31
- } from "../chunk-OIEAURS7.js";
31
+ } from "../chunk-LDKC5DRW.js";
32
32
 
33
33
  // src/adapters/react-router-cloudflare.ts
34
34
  import { waitUntil } from "cloudflare:workers";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  applyContentSecurityPolicyToResponse,
3
3
  isResponseLike
4
- } from "../chunk-2ZF7A6Z3.js";
5
- import "../chunk-HZRLFCGV.js";
4
+ } from "../chunk-7BZFEX4Z.js";
5
+ import "../chunk-DM57ZOTI.js";
6
6
  import {
7
7
  getNowMs,
8
8
  logElapsed
9
9
  } from "../chunk-G6BMPIYD.js";
10
10
  import {
11
11
  checkLockStatus
12
- } from "../chunk-BIGBX7II.js";
12
+ } from "../chunk-PCWFMNHW.js";
13
13
  import {
14
14
  buildLockPageUrl,
15
15
  createHeartbeatConfigError,
@@ -21,14 +21,14 @@ import {
21
21
  isOnLockPage,
22
22
  printMessage,
23
23
  sanitizeConfigErrors
24
- } from "../chunk-PSOS33UD.js";
24
+ } from "../chunk-2FSRHIPY.js";
25
25
  import {
26
26
  AppwardenApiHostnameSchema,
27
27
  AppwardenApiTokenSchema,
28
28
  BooleanSchema,
29
29
  HEARTBEAT_SERVICES,
30
30
  UseCSPInputSchema
31
- } from "../chunk-OIEAURS7.js";
31
+ } from "../chunk-LDKC5DRW.js";
32
32
 
33
33
  // src/adapters/tanstack-start-cloudflare.ts
34
34
  import { waitUntil } from "cloudflare:workers";
package/cloudflare.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  UseAppwardenInputSchema,
3
3
  lockPageSlugRefinement
4
- } from "./chunk-UBWPR24M.js";
4
+ } from "./chunk-JJOX4UAG.js";
5
5
  import {
6
6
  getErrors
7
7
  } from "./chunk-NV7K5PRA.js";
8
8
  import {
9
9
  useContentSecurityPolicy
10
- } from "./chunk-HZRLFCGV.js";
10
+ } from "./chunk-DM57ZOTI.js";
11
11
  import {
12
12
  checkLockStatus
13
- } from "./chunk-BIGBX7II.js";
13
+ } from "./chunk-PCWFMNHW.js";
14
14
  import {
15
15
  buildLockPageUrl,
16
16
  createHeartbeatConfigError,
@@ -22,10 +22,10 @@ import {
22
22
  isOnLockPage,
23
23
  printMessage,
24
24
  sanitizeConfigErrors
25
- } from "./chunk-PSOS33UD.js";
25
+ } from "./chunk-2FSRHIPY.js";
26
26
  import {
27
27
  HEARTBEAT_SERVICES
28
- } from "./chunk-OIEAURS7.js";
28
+ } from "./chunk-LDKC5DRW.js";
29
29
 
30
30
  // src/runners/appwarden-on-cloudflare.ts
31
31
  import { ZodError } from "zod";
package/index.d.ts CHANGED
@@ -33,6 +33,8 @@ declare const HEARTBEAT_RESPONSE_BODY_MAX_SERIALIZED_BYTES: number;
33
33
  */
34
34
  declare const HEARTBEAT_CONFIG_ERROR_MAX_PATH_SEGMENT_LENGTH = 100;
35
35
  declare const APPWARDEN_CACHE_KEY: "appwarden-lock";
36
+ declare const APPWARDEN_MIDDLEWARE_USER_AGENT_PREFIX = "Appwarden/";
37
+ declare const APPWARDEN_MIDDLEWARE_USER_AGENT: string;
36
38
  declare const HEARTBEAT_SERVICE_VALUES: readonly ["cloudflare", "cloudflare-astro", "cloudflare-react-router", "cloudflare-tanstack-start", "cloudflare-nextjs", "vercel"];
37
39
  /**
38
40
  * Service identifiers for different middleware adapters.
@@ -936,4 +938,4 @@ declare const LockValue: z.ZodObject<{
936
938
  }>;
937
939
  type LockValueType = z.infer<typeof LockValue>;
938
940
 
939
- export { APPWARDEN_CACHE_KEY, APPWARDEN_HEARTBEAT_ROUTE, HEARTBEAT_CONFIG_ERRORS_MAX_SERIALIZED_BYTES, HEARTBEAT_CONFIG_ERROR_MAX_CODE_LENGTH, HEARTBEAT_CONFIG_ERROR_MAX_COUNT, HEARTBEAT_CONFIG_ERROR_MAX_MESSAGE_LENGTH, HEARTBEAT_CONFIG_ERROR_MAX_PATH_DEPTH, HEARTBEAT_CONFIG_ERROR_MAX_PATH_SEGMENT_LENGTH, HEARTBEAT_CONTRACT_VERSION, HEARTBEAT_RESPONSE_BODY_MAX_SERIALIZED_BYTES, HEARTBEAT_SERVICES, HEARTBEAT_SERVICE_VALUES, HEARTBEAT_VERSION_MAX_LENGTH, type HeartbeatConfigError, HeartbeatConfigErrorSchema, type HeartbeatResponseBody, HeartbeatResponseBodySchema, type HeartbeatService, LOCKDOWN_TEST_EXPIRY_MS, type LockValueType, UseAppwardenInputSchema, getEdgeConfigId, isCacheUrl, isValidCacheUrl, validateHeartbeatResponseBody };
941
+ export { APPWARDEN_CACHE_KEY, APPWARDEN_HEARTBEAT_ROUTE, APPWARDEN_MIDDLEWARE_USER_AGENT, APPWARDEN_MIDDLEWARE_USER_AGENT_PREFIX, HEARTBEAT_CONFIG_ERRORS_MAX_SERIALIZED_BYTES, HEARTBEAT_CONFIG_ERROR_MAX_CODE_LENGTH, HEARTBEAT_CONFIG_ERROR_MAX_COUNT, HEARTBEAT_CONFIG_ERROR_MAX_MESSAGE_LENGTH, HEARTBEAT_CONFIG_ERROR_MAX_PATH_DEPTH, HEARTBEAT_CONFIG_ERROR_MAX_PATH_SEGMENT_LENGTH, HEARTBEAT_CONTRACT_VERSION, HEARTBEAT_RESPONSE_BODY_MAX_SERIALIZED_BYTES, HEARTBEAT_SERVICES, HEARTBEAT_SERVICE_VALUES, HEARTBEAT_VERSION_MAX_LENGTH, type HeartbeatConfigError, HeartbeatConfigErrorSchema, type HeartbeatResponseBody, HeartbeatResponseBodySchema, type HeartbeatService, LOCKDOWN_TEST_EXPIRY_MS, type LockValueType, UseAppwardenInputSchema, getEdgeConfigId, isCacheUrl, isValidCacheUrl, validateHeartbeatResponseBody };
package/index.js CHANGED
@@ -5,10 +5,12 @@ import {
5
5
  } from "./chunk-QEFORWCW.js";
6
6
  import {
7
7
  UseAppwardenInputSchema
8
- } from "./chunk-UBWPR24M.js";
8
+ } from "./chunk-JJOX4UAG.js";
9
9
  import {
10
10
  APPWARDEN_CACHE_KEY,
11
11
  APPWARDEN_HEARTBEAT_ROUTE,
12
+ APPWARDEN_MIDDLEWARE_USER_AGENT,
13
+ APPWARDEN_MIDDLEWARE_USER_AGENT_PREFIX,
12
14
  CSPDirectivesSchema,
13
15
  CSPModeSchema,
14
16
  HEARTBEAT_CONFIG_ERRORS_MAX_SERIALIZED_BYTES,
@@ -26,10 +28,12 @@ import {
26
28
  HeartbeatResponseBodySchema,
27
29
  LOCKDOWN_TEST_EXPIRY_MS,
28
30
  validateHeartbeatResponseBody
29
- } from "./chunk-OIEAURS7.js";
31
+ } from "./chunk-LDKC5DRW.js";
30
32
  export {
31
33
  APPWARDEN_CACHE_KEY,
32
34
  APPWARDEN_HEARTBEAT_ROUTE,
35
+ APPWARDEN_MIDDLEWARE_USER_AGENT,
36
+ APPWARDEN_MIDDLEWARE_USER_AGENT_PREFIX,
33
37
  CSPDirectivesSchema,
34
38
  CSPModeSchema,
35
39
  HEARTBEAT_CONFIG_ERRORS_MAX_SERIALIZED_BYTES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appwarden/middleware",
3
- "version": "3.13.4",
3
+ "version": "3.14.1",
4
4
  "description": "Instantly disable all user interaction with your app deployed on Cloudflare or Vercel",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "packageManager": "pnpm@10.4.1",
57
57
  "engines": {
58
- "node": ">=24"
58
+ "node": ">=22.14.0"
59
59
  },
60
60
  "dependencies": {
61
61
  "@upstash/redis": "^1.37.0",
@@ -104,12 +104,18 @@
104
104
  "body-parser@>=2.2.0 <2.2.1": ">=2.2.1",
105
105
  "cookie@<0.7.0": ">=0.7.0",
106
106
  "devalue@<5.6.4": ">=5.6.4",
107
+ "dompurify@<=3.3.1": ">=3.3.2",
107
108
  "esbuild@<=0.24.2": ">=0.25.0",
108
- "fast-xml-parser@>=4.0.0-beta.3 <=5.5.5": ">=5.5.6",
109
+ "fast-xml-parser@5.3.4": "5.5.10",
110
+ "flatted@<3.4.2": ">=3.4.2",
109
111
  "h3@<1.15.6": ">=1.15.6",
110
112
  "h3@>=2.0.0 <=2.0.1-rc.14": ">=2.0.1-rc.15",
113
+ "handlebars@4.7.8": "4.7.9",
111
114
  "js-yaml@<3.14.2": ">=3.14.2",
112
115
  "jws@=4.0.0": ">=4.0.1",
116
+ "lodash@>=4.0.0 <=4.17.23": ">=4.18.1",
117
+ "lodash-es@>=4.0.0 <=4.17.23": ">=4.18.1",
118
+ "mermaid@<10.9.5": ">=10.9.5",
113
119
  "minimatch@<10.2.1": ">=10.2.3",
114
120
  "next@>=10.0.0 <16.1.7": ">=16.1.7",
115
121
  "npm@<=11.8.0": ">=11.9.0",
@@ -122,7 +128,17 @@
122
128
  "tar@<=7.5.10": ">=7.5.11",
123
129
  "undici@<7.24.0": ">=7.24.0",
124
130
  "wrangler@>=4.0.0 <4.59.1": ">=4.59.1",
125
- "@tanstack/start-server-core@1.163.2>h3-v2": "npm:h3@2.0.1-rc.16"
131
+ "@tanstack/start-server-core@1.163.2>h3-v2": "npm:h3@2.0.1-rc.16",
132
+ "h3@>=2.0.0-beta.0 <=2.0.1-rc.16": ">=2.0.1-rc.17",
133
+ "h3@>=2.0.0-beta.4 <2.0.1-rc.18": ">=2.0.1-rc.18",
134
+ "h3@>=2.0.1-alpha.0 <=2.0.1-rc.16": ">=2.0.1-rc.17",
135
+ "defu@<=6.1.4": ">=6.1.5",
136
+ "vite@<=6.4.1": ">=6.4.2",
137
+ "vite@>=7.0.0 <=7.3.1": ">=7.3.2",
138
+ "vite@>=7.1.0 <=7.3.1": ">=7.3.2",
139
+ "vite@>=6.0.0 <=6.4.1": ">=6.4.2",
140
+ "next@>=16.0.0-beta.0 <16.2.3": ">=16.2.3",
141
+ "follow-redirects@<=1.15.11": ">=1.16.0"
126
142
  }
127
143
  }
128
144
  }
package/vercel.js CHANGED
@@ -20,9 +20,10 @@ import {
20
20
  makeCSPHeader,
21
21
  printMessage,
22
22
  sanitizeConfigErrors
23
- } from "./chunk-PSOS33UD.js";
23
+ } from "./chunk-2FSRHIPY.js";
24
24
  import {
25
25
  APPWARDEN_CACHE_KEY,
26
+ APPWARDEN_MIDDLEWARE_USER_AGENT,
26
27
  AppwardenApiHostnameSchema,
27
28
  CSPDirectivesSchema,
28
29
  CSPModeSchema,
@@ -30,7 +31,7 @@ import {
30
31
  LockValue,
31
32
  errors,
32
33
  globalErrors
33
- } from "./chunk-OIEAURS7.js";
34
+ } from "./chunk-LDKC5DRW.js";
34
35
 
35
36
  // src/runners/appwarden-on-vercel.ts
36
37
  import { waitUntil } from "@vercel/functions";
@@ -116,7 +117,10 @@ var syncEdgeValue = async (context) => {
116
117
  const apiHostname = context.appwardenApiHostname ?? "https://api.appwarden.io";
117
118
  const response = await fetch(new URL("/v1/appwarden/status", apiHostname), {
118
119
  method: "POST",
119
- headers: { "content-type": "application/json" },
120
+ headers: {
121
+ "content-type": "application/json",
122
+ "user-agent": APPWARDEN_MIDDLEWARE_USER_AGENT
123
+ },
120
124
  body: JSON.stringify({
121
125
  service: "vercel",
122
126
  cacheUrl: context.cacheUrl,