juxscript 1.0.76 → 1.0.77
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/machinery/compiler.js +3 -2
- package/machinery/verifier.js +2 -1
- package/package.json +1 -1
package/machinery/compiler.js
CHANGED
|
@@ -409,10 +409,11 @@ function generateRouterBundle(views, routes, sharedModules = new Map(), allImpor
|
|
|
409
409
|
}
|
|
410
410
|
if (joinedPath.includes('lib/components')) return 'juxscript/components';
|
|
411
411
|
|
|
412
|
-
//
|
|
412
|
+
// Fix: Ensure local relative paths ALWAYS start with ./
|
|
413
413
|
let normalized = joinedPath.replace(/\\/g, '/');
|
|
414
414
|
// If it's a bare filename like "file.js", prefix it to "./file.js"
|
|
415
|
-
|
|
415
|
+
// Also check for ":" to avoid messing up URLs like http:// or data:
|
|
416
|
+
if (!normalized.startsWith('.') && !normalized.startsWith('/') && !normalized.includes(':')) {
|
|
416
417
|
normalized = './' + normalized;
|
|
417
418
|
}
|
|
418
419
|
return normalized;
|
package/machinery/verifier.js
CHANGED
|
@@ -67,6 +67,7 @@ export function verifyStaticBuild(distDir) {
|
|
|
67
67
|
|
|
68
68
|
// ✅ FIX: Check if the file exists locally in dist (e.g. copied assets)
|
|
69
69
|
// If it exists on disk, it's not a ghost dependency from node_modules
|
|
70
|
+
// This handles cases where a file was copied but imported as a bare specifier (though compiler should fix that too)
|
|
70
71
|
if (fs.existsSync(path.join(distDir, source))) {
|
|
71
72
|
return;
|
|
72
73
|
}
|
|
@@ -122,7 +123,7 @@ export function verifyRuntime(port) {
|
|
|
122
123
|
check('/main.js', 'application/javascript'),
|
|
123
124
|
]).then(() => {
|
|
124
125
|
if (errors.length > 0) {
|
|
125
|
-
console.error(`\n💥 RUNTIME VERIFICATION FAILED (
|
|
126
|
+
console.error(`\n💥 RUNTIME VERIFICATION FAILED (${errors.length} errors):`);
|
|
126
127
|
errors.forEach(e => console.error(` - ${e}`));
|
|
127
128
|
console.log('');
|
|
128
129
|
resolve(false);
|