@lolyjs/core 0.3.0-alpha.3 → 0.3.0-alpha.5
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/cli.cjs +40 -5
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +40 -5
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +162 -125
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +162 -125
- package/dist/index.mjs.map +1 -1
- package/dist/runtime.cjs +118 -116
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.mjs +118 -116
- package/dist/runtime.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -11323,7 +11323,14 @@ var FilesystemRouteLoader = class {
|
|
|
11323
11323
|
if (hasFilesChanged(this.appDir, this.projectRoot, this.cache.fileStats) || this.cache.apiRoutes.length === 0) {
|
|
11324
11324
|
const files = getRelevantFiles(this.appDir, this.projectRoot);
|
|
11325
11325
|
const fileStats = buildFileStats(files);
|
|
11326
|
-
|
|
11326
|
+
const apiRoutes = await loadApiRoutes(this.appDir);
|
|
11327
|
+
if (!this.cache) {
|
|
11328
|
+
await this.loadRoutes();
|
|
11329
|
+
if (!this.cache) {
|
|
11330
|
+
throw new Error("Failed to initialize route cache");
|
|
11331
|
+
}
|
|
11332
|
+
}
|
|
11333
|
+
this.cache.apiRoutes = apiRoutes;
|
|
11327
11334
|
this.cache.fileStats = fileStats;
|
|
11328
11335
|
this.cache.timestamp = Date.now();
|
|
11329
11336
|
}
|
|
@@ -11340,7 +11347,14 @@ var FilesystemRouteLoader = class {
|
|
|
11340
11347
|
if (hasFilesChanged(this.appDir, this.projectRoot, this.cache.fileStats) || this.cache.wssRoutes.length === 0) {
|
|
11341
11348
|
const files = getRelevantFiles(this.appDir, this.projectRoot);
|
|
11342
11349
|
const fileStats = buildFileStats(files);
|
|
11343
|
-
|
|
11350
|
+
const wssRoutes = await loadWssRoutes(this.appDir);
|
|
11351
|
+
if (!this.cache) {
|
|
11352
|
+
await this.loadRoutes();
|
|
11353
|
+
if (!this.cache) {
|
|
11354
|
+
throw new Error("Failed to initialize route cache");
|
|
11355
|
+
}
|
|
11356
|
+
}
|
|
11357
|
+
this.cache.wssRoutes = wssRoutes;
|
|
11344
11358
|
this.cache.fileStats = fileStats;
|
|
11345
11359
|
this.cache.timestamp = Date.now();
|
|
11346
11360
|
}
|
|
@@ -11357,7 +11371,14 @@ var FilesystemRouteLoader = class {
|
|
|
11357
11371
|
if (hasFilesChanged(this.appDir, this.projectRoot, this.cache.fileStats) || this.cache.notFoundRoute === void 0) {
|
|
11358
11372
|
const files = getRelevantFiles(this.appDir, this.projectRoot);
|
|
11359
11373
|
const fileStats = buildFileStats(files);
|
|
11360
|
-
|
|
11374
|
+
const notFoundRoute = await loadNotFoundRouteFromFilesystem(this.appDir, this.projectRoot);
|
|
11375
|
+
if (!this.cache) {
|
|
11376
|
+
await this.loadRoutes();
|
|
11377
|
+
if (!this.cache) {
|
|
11378
|
+
throw new Error("Failed to initialize route cache");
|
|
11379
|
+
}
|
|
11380
|
+
}
|
|
11381
|
+
this.cache.notFoundRoute = notFoundRoute;
|
|
11361
11382
|
this.cache.fileStats = fileStats;
|
|
11362
11383
|
this.cache.timestamp = Date.now();
|
|
11363
11384
|
}
|
|
@@ -11374,7 +11395,14 @@ var FilesystemRouteLoader = class {
|
|
|
11374
11395
|
if (hasFilesChanged(this.appDir, this.projectRoot, this.cache.fileStats) || this.cache.errorRoute === void 0) {
|
|
11375
11396
|
const files = getRelevantFiles(this.appDir, this.projectRoot);
|
|
11376
11397
|
const fileStats = buildFileStats(files);
|
|
11377
|
-
|
|
11398
|
+
const errorRoute = await loadErrorRouteFromFilesystem(this.appDir, this.projectRoot);
|
|
11399
|
+
if (!this.cache) {
|
|
11400
|
+
await this.loadRoutes();
|
|
11401
|
+
if (!this.cache) {
|
|
11402
|
+
throw new Error("Failed to initialize route cache");
|
|
11403
|
+
}
|
|
11404
|
+
}
|
|
11405
|
+
this.cache.errorRoute = errorRoute;
|
|
11378
11406
|
this.cache.fileStats = fileStats;
|
|
11379
11407
|
this.cache.timestamp = Date.now();
|
|
11380
11408
|
}
|
|
@@ -12922,7 +12950,7 @@ function createDocumentTree(options) {
|
|
|
12922
12950
|
}),
|
|
12923
12951
|
...extraMetaTags,
|
|
12924
12952
|
...linkTags,
|
|
12925
|
-
...entrypointFiles.length > 0 ? entrypointFiles.
|
|
12953
|
+
...entrypointFiles.length > 0 ? entrypointFiles.map(
|
|
12926
12954
|
(file) => React.createElement("link", {
|
|
12927
12955
|
key: `preload-${file}`,
|
|
12928
12956
|
rel: "preload",
|
|
@@ -12943,6 +12971,13 @@ function createDocumentTree(options) {
|
|
|
12943
12971
|
href: faviconPath,
|
|
12944
12972
|
type: faviconType || (faviconPath.endsWith(".ico") ? "image/x-icon" : "image/png")
|
|
12945
12973
|
}),
|
|
12974
|
+
// Preload CSS para evitar bloqueo de renderizado
|
|
12975
|
+
React.createElement("link", {
|
|
12976
|
+
key: "preload-css",
|
|
12977
|
+
rel: "preload",
|
|
12978
|
+
href: clientCssPath,
|
|
12979
|
+
as: "style"
|
|
12980
|
+
}),
|
|
12946
12981
|
React.createElement("link", {
|
|
12947
12982
|
rel: "stylesheet",
|
|
12948
12983
|
href: clientCssPath
|