@ellx/framework
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "@ellx/framework", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Ellx full stack framework", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -87,3 +87,3 @@ import http from 'http'; | ||
const id = 'file://' + pathname; | ||
const id = 'file://' + pathname.replaceAll('/ellx_modules/', '/node_modules/'); | ||
if (id in artefacts) { | ||
@@ -93,5 +93,4 @@ res.setHeader('Content-Type', mime.getType(id)); | ||
} | ||
if (!artefacts.mainPage) { | ||
artefacts.mainPage = buildMainPage(artefacts, hashes, bootstrapCode, devEntryPoint); | ||
} | ||
artefacts.mainPage ??= buildMainPage(artefacts, hashes, bootstrapCode, devEntryPoint); | ||
res.end(artefacts.mainPage); | ||
@@ -98,0 +97,0 @@ }); |
@@ -31,4 +31,4 @@ import { writeFile, mkdir, rm } from 'fs/promises'; | ||
await Promise.all(Object.entries(artefacts) | ||
.map(([url, body]) => makeOne(join(distDir, fileURLToPath(url)), body)) | ||
.map(([url, body]) => makeOne(join(distDir, fileURLToPath(url).replaceAll('/node_modules/', '/ellx_modules/')), body)) | ||
); | ||
} |
@@ -7,5 +7,9 @@ export function bootstrap(modules, { conclureId, resolverId, mainPageId, entryPoint }) { | ||
for (let url in modules) { | ||
const src = modules[url]; | ||
let source = modules[url]; | ||
const source = typeof src === 'string' ? fetch(url.slice(7) + '?h=' + src).then(res => res.text()) : src; | ||
if (typeof source === 'string') { | ||
source = fetch(url.slice(7).replaceAll('/node_modules/', '/ellx_modules/') + '?h=' + source) | ||
.then(res => res.text()); | ||
} | ||
registry.set(url, createModuleNode(url, source)); | ||
@@ -12,0 +16,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35992
1027