@appwarden/middleware 1.4.1 → 1.4.2

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
@@ -1,6 +1,6 @@
1
1
  # @appwarden/middleware
2
2
 
3
- ![Test Coverage](https://img.shields.io/badge/coverage-90.01%25-brightgreen)
3
+ ![Test Coverage](https://img.shields.io/badge/coverage-92.74%25-brightgreen)
4
4
  [![npm version](https://img.shields.io/npm/v/@appwarden/middleware.svg)](https://www.npmjs.com/package/@appwarden/middleware)
5
5
  [![npm provenance](https://img.shields.io/badge/npm-provenance-green)](https://docs.npmjs.com/generating-provenance-statements)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
package/cloudflare.js CHANGED
@@ -201,7 +201,7 @@ var APIError = class extends Error {
201
201
  var syncEdgeValue = async (context) => {
202
202
  debug(`syncing with api`);
203
203
  try {
204
- const response = await fetch(new URL("/v1/status/check", "https://bot-gateway.appwarden.io"), {
204
+ const response = await fetch(new URL("/v1/status/check", "https://api.appwarden.io"), {
205
205
  method: "POST",
206
206
  headers: { "content-type": "application/json" },
207
207
  body: JSON.stringify({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appwarden/middleware",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Instantly shut off access your app deployed on Cloudflare or Vercel",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -37,8 +37,9 @@
37
37
  "default": "./cloudflare.js"
38
38
  }
39
39
  },
40
+ "packageManager": "pnpm@10.4.1",
40
41
  "engines": {
41
- "node": ">=20"
42
+ "node": ">=24"
42
43
  },
43
44
  "dependencies": {
44
45
  "@cloudflare/next-on-pages": "1.13.12",
@@ -54,16 +55,20 @@
54
55
  "optional": true
55
56
  }
56
57
  },
58
+ "lint-staged": {
59
+ "*.{ts,tsx,js,jsx,json,md,yml,yaml}": [
60
+ "prettier --write"
61
+ ]
62
+ },
57
63
  "pnpm": {
58
64
  "overrides": {
59
65
  "cookie@<0.7.0": ">=0.7.0",
60
66
  "esbuild@<=0.24.2": ">=0.25.0",
61
- "tar@<=7.5.2": ">=7.5.3",
62
- "tar@<=7.5.3": ">=7.5.4",
63
- "undici@<5.29.0": ">=5.29.0",
67
+ "path-to-regexp@>=4.0.0 <6.3.0": ">=6.3.0",
68
+ "tar@<7.5.7": ">=7.5.7",
64
69
  "undici@<6.23.0": ">=6.23.0",
65
- "undici@>=4.5.0 <5.28.5": ">=5.28.5",
66
- "path-to-regexp@>=4.0.0 <6.3.0": ">=6.3.0"
70
+ "body-parser@>=2.2.0 <2.2.1": ">=2.2.1",
71
+ "jws@=4.0.0": ">=4.0.1"
67
72
  }
68
73
  }
69
74
  }
package/vercel.js CHANGED
@@ -161,7 +161,7 @@ var APIError = class extends Error {
161
161
  var syncEdgeValue = async (context) => {
162
162
  debug(`syncing with api`);
163
163
  try {
164
- const response = await fetch(new URL("/v1/status/check", "https://bot-gateway.appwarden.io"), {
164
+ const response = await fetch(new URL("/v1/status/check", "https://api.appwarden.io"), {
165
165
  method: "POST",
166
166
  headers: { "content-type": "application/json" },
167
167
  body: JSON.stringify({
@@ -229,7 +229,7 @@ var AppwardenConfigSchema = BaseNextJsConfigSchema.refine(
229
229
  path: ["cacheUrl"]
230
230
  }
231
231
  ).superRefine((data, ctx) => {
232
- if (!isValidCacheUrl.edgeConfig(data.cacheUrl) && isValidCacheUrl.upstash(data.cacheUrl)) {
232
+ if (isCacheUrl.edgeConfig(data.cacheUrl) && !isValidCacheUrl.edgeConfig(data.cacheUrl)) {
233
233
  ctx.addIssue({
234
234
  code: "custom",
235
235
  message: printMessage(
@@ -239,7 +239,7 @@ var AppwardenConfigSchema = BaseNextJsConfigSchema.refine(
239
239
  });
240
240
  return false;
241
241
  }
242
- if (!isValidCacheUrl.upstash(data.cacheUrl) && isValidCacheUrl.edgeConfig(data.cacheUrl)) {
242
+ if (isCacheUrl.upstash(data.cacheUrl) && !isValidCacheUrl.upstash(data.cacheUrl)) {
243
243
  ctx.addIssue({
244
244
  code: "custom",
245
245
  message: printMessage(