@sveltejs/kit 2.5.13 → 2.5.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/kit",
3
- "version": "2.5.13",
3
+ "version": "2.5.14",
4
4
  "description": "The fastest way to build Svelte apps",
5
5
  "keywords": [
6
6
  "framework",
@@ -27,12 +27,13 @@ export function read(asset) {
27
27
  }
28
28
 
29
29
  // handle inline assets internally
30
- if (asset.startsWith('data:')) {
31
- const [prelude, data] = asset.split(';');
32
- const type = prelude.slice(5) || 'application/octet-stream';
30
+ const match = /^data:([^;,]+)?(;base64)?,/.exec(asset);
31
+ if (match) {
32
+ const type = match[1] ?? 'application/octet-stream';
33
+ const data = asset.slice(match[0].length);
33
34
 
34
- if (data.startsWith('base64,')) {
35
- const decoded = b64_decode(data.slice(7));
35
+ if (match[2] !== undefined) {
36
+ const decoded = b64_decode(data);
36
37
 
37
38
  return new Response(decoded, {
38
39
  headers: {
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // generated during release, do not modify
2
2
 
3
3
  /** @type {string} */
4
- export const VERSION = '2.5.13';
4
+ export const VERSION = '2.5.14';