nitropack-nightly 2.13.0-20251216-111546-8e342728 → 2.13.0-20251216-115630-9617490c
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/meta/index.mjs
CHANGED
package/dist/rollup/index.mjs
CHANGED
|
@@ -1259,6 +1259,14 @@ function publicAssets(nitro) {
|
|
|
1259
1259
|
data: nitro.options.serveStatic === "inline" ? assetData.toString("base64") : void 0
|
|
1260
1260
|
};
|
|
1261
1261
|
}
|
|
1262
|
+
for (const key in assets) {
|
|
1263
|
+
if (/\.(gz|br)$/.test(key)) {
|
|
1264
|
+
const originalKey = key.replace(/\.(gz|br)$/, "");
|
|
1265
|
+
if (assets[originalKey] && assets[originalKey].encoding === void 0) {
|
|
1266
|
+
assets[originalKey].encoding = null;
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1262
1270
|
return `export default ${JSON.stringify(assets, null, 2)};`;
|
|
1263
1271
|
},
|
|
1264
1272
|
// #nitro-internal-virtual/public-assets-node
|
|
@@ -37,9 +37,6 @@ export default eventHandler((event) => {
|
|
|
37
37
|
...encodingHeader.split(",").map((e) => EncodingMap[e.trim()]).filter(Boolean).sort(),
|
|
38
38
|
""
|
|
39
39
|
];
|
|
40
|
-
if (encodings.length > 1) {
|
|
41
|
-
appendResponseHeader(event, "Vary", "Accept-Encoding");
|
|
42
|
-
}
|
|
43
40
|
for (const encoding of encodings) {
|
|
44
41
|
for (const _id of [id + encoding, joinURL(id, "index.html" + encoding)]) {
|
|
45
42
|
const _asset = getAsset(_id);
|
|
@@ -57,6 +54,9 @@ export default eventHandler((event) => {
|
|
|
57
54
|
}
|
|
58
55
|
return;
|
|
59
56
|
}
|
|
57
|
+
if (asset.encoding !== void 0) {
|
|
58
|
+
appendResponseHeader(event, "Vary", "Accept-Encoding");
|
|
59
|
+
}
|
|
60
60
|
const ifNotMatch = getRequestHeader(event, "if-none-match") === asset.etag;
|
|
61
61
|
if (ifNotMatch) {
|
|
62
62
|
setResponseStatus(event, 304, "Not Modified");
|
package/dist/types/index.d.mts
CHANGED
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED