@netlify/blobs
Advanced tools
Comparing version
@@ -11,3 +11,3 @@ import { | ||
setEnvironmentContext | ||
} from "./chunk-O22O2XCC.js"; | ||
} from "./chunk-SGXOM2EY.js"; | ||
@@ -49,3 +49,3 @@ // src/lambda_compat.ts | ||
if (![200, 204, 404].includes(res.status)) { | ||
throw new BlobsInternalError(res.status); | ||
throw new BlobsInternalError(res); | ||
} | ||
@@ -60,3 +60,3 @@ } | ||
if (res.status !== 200) { | ||
throw new BlobsInternalError(res.status); | ||
throw new BlobsInternalError(res); | ||
} | ||
@@ -78,3 +78,3 @@ if (type === void 0 || type === "text") { | ||
} | ||
throw new BlobsInternalError(res.status); | ||
throw new BlobsInternalError(res); | ||
} | ||
@@ -87,3 +87,3 @@ async getMetadata(key, { consistency } = {}) { | ||
if (res.status !== 200 && res.status !== 304) { | ||
throw new BlobsInternalError(res.status); | ||
throw new BlobsInternalError(res); | ||
} | ||
@@ -112,3 +112,3 @@ const etag = res?.headers.get("etag") ?? void 0; | ||
if (res.status !== 200 && res.status !== 304) { | ||
throw new BlobsInternalError(res.status); | ||
throw new BlobsInternalError(res); | ||
} | ||
@@ -166,3 +166,3 @@ const responseETag = res?.headers.get("etag") ?? void 0; | ||
if (res.status !== 200) { | ||
throw new BlobsInternalError(res.status); | ||
throw new BlobsInternalError(res); | ||
} | ||
@@ -185,3 +185,3 @@ } | ||
if (res.status !== 200) { | ||
throw new BlobsInternalError(res.status); | ||
throw new BlobsInternalError(res); | ||
} | ||
@@ -188,0 +188,0 @@ } |
@@ -7,3 +7,3 @@ import { | ||
isNodeError | ||
} from "./chunk-O22O2XCC.js"; | ||
} from "./chunk-SGXOM2EY.js"; | ||
@@ -22,2 +22,3 @@ // src/server.ts | ||
var LEGACY_DEFAULT_STORE = "production"; | ||
var REGION_PREFIX = "region:"; | ||
var Operation = /* @__PURE__ */ ((Operation2) => { | ||
@@ -210,3 +211,7 @@ Operation2["DELETE"] = "delete"; | ||
} | ||
const [, siteID, rawStoreName, ...key] = url.pathname.split("/"); | ||
let parts = url.pathname.split("/").slice(1); | ||
if (parts[0].startsWith(REGION_PREFIX)) { | ||
parts = parts.slice(1); | ||
} | ||
const [siteID, rawStoreName, ...key] = parts; | ||
if (!siteID) { | ||
@@ -213,0 +218,0 @@ return {}; |
{ | ||
"name": "@netlify/blobs", | ||
"version": "7.2.0", | ||
"version": "7.3.0", | ||
"description": "A JavaScript client for the Netlify Blob Store", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
113542
0.52%2571
0.94%