c64-ready 0.6.1 → 0.6.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/bin/headless.mjs CHANGED
File without changes
package/bin/serve.mjs CHANGED
@@ -117,9 +117,12 @@ const server = createServer((req, res) => {
117
117
  }
118
118
 
119
119
  // All other requests are resolved against dist/ directly.
120
- // e.g. /c64-ready/assets/index-xxx.js → dist/c64-ready/assets/index-xxx.js
121
- // /c64.wasm → dist/c64.wasm
122
- const relative = urlPath.startsWith('/') ? urlPath.slice(1) : urlPath;
120
+ // Vite bakes base='/c64-ready/' into all asset URLs, so strip that prefix
121
+ // before resolving so the path maps into dist/ correctly:
122
+ // /c64-ready/assets/index-xxx.js → dist/assets/index-xxx.js
123
+ // /c64.wasm → dist/c64.wasm
124
+ const stripped = urlPath.startsWith('/c64-ready/') ? urlPath.slice('/c64-ready/'.length) : urlPath;
125
+ const relative = stripped.startsWith('/') ? stripped.slice(1) : stripped;
123
126
  const filePath = resolve(DIST_DIR, normalize(relative));
124
127
 
125
128
  // Path traversal guard
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "retro"
11
11
  ],
12
12
  "license": "MIT",
13
- "version": "0.6.1",
13
+ "version": "0.6.2",
14
14
  "type": "module",
15
15
  "engines": {
16
16
  "node": ">=24.14"