@absolutejs/absolute 0.19.0-beta.31 → 0.19.0-beta.33
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/.absolutejs/tsconfig.tsbuildinfo +1 -1
- package/dist/build.js +29 -6
- package/dist/build.js.map +4 -4
- package/dist/index.js +31 -6
- package/dist/index.js.map +5 -5
- package/dist/src/dev/moduleServer.d.ts +3 -0
- package/native/packages/darwin-arm64/package.json +1 -1
- package/native/packages/darwin-x64/package.json +1 -1
- package/native/packages/linux-arm64/package.json +1 -1
- package/native/packages/linux-x64/package.json +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -202157,6 +202157,8 @@ var init_transformCache = __esm(() => {
|
|
|
202157
202157
|
// src/dev/moduleServer.ts
|
|
202158
202158
|
var exports_moduleServer = {};
|
|
202159
202159
|
__export(exports_moduleServer, {
|
|
202160
|
+
warmCache: () => warmCache,
|
|
202161
|
+
setGlobalModuleServer: () => setGlobalModuleServer,
|
|
202160
202162
|
invalidateModule: () => invalidateModule,
|
|
202161
202163
|
createModuleServer: () => createModuleServer,
|
|
202162
202164
|
SRC_URL_PREFIX: () => SRC_URL_PREFIX
|
|
@@ -202339,8 +202341,19 @@ export default {};
|
|
|
202339
202341
|
if (!pathname.startsWith(SRC_PREFIX))
|
|
202340
202342
|
return;
|
|
202341
202343
|
const relPath = pathname.slice(SRC_PREFIX.length);
|
|
202342
|
-
|
|
202343
|
-
|
|
202344
|
+
let filePath = resolve17(projectRoot, relPath);
|
|
202345
|
+
let ext = extname3(filePath);
|
|
202346
|
+
if (!ext) {
|
|
202347
|
+
const tryExts = [".tsx", ".ts", ".jsx", ".js"];
|
|
202348
|
+
for (const tryExt of tryExts) {
|
|
202349
|
+
try {
|
|
202350
|
+
statSync2(filePath + tryExt);
|
|
202351
|
+
filePath += tryExt;
|
|
202352
|
+
ext = tryExt;
|
|
202353
|
+
break;
|
|
202354
|
+
} catch {}
|
|
202355
|
+
}
|
|
202356
|
+
}
|
|
202344
202357
|
try {
|
|
202345
202358
|
if (ext === ".css") {
|
|
202346
202359
|
return new Response(handleCssRequest(filePath), {
|
|
@@ -202383,7 +202396,15 @@ export default {};
|
|
|
202383
202396
|
});
|
|
202384
202397
|
}
|
|
202385
202398
|
};
|
|
202386
|
-
}, invalidateModule,
|
|
202399
|
+
}, invalidateModule, warmCache = (pathname) => {
|
|
202400
|
+
if (!pathname.startsWith(SRC_PREFIX))
|
|
202401
|
+
return;
|
|
202402
|
+
if (!globalModuleServer)
|
|
202403
|
+
return;
|
|
202404
|
+
globalModuleServer(pathname);
|
|
202405
|
+
}, globalModuleServer = null, setGlobalModuleServer = (handler) => {
|
|
202406
|
+
globalModuleServer = handler;
|
|
202407
|
+
}, SRC_URL_PREFIX;
|
|
202387
202408
|
var init_moduleServer = __esm(() => {
|
|
202388
202409
|
init_transformCache();
|
|
202389
202410
|
jsTranspiler2 = new Bun.Transpiler({
|
|
@@ -202912,10 +202933,12 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202912
202933
|
Object.assign(state.manifest, clientManifest);
|
|
202913
202934
|
await populateAssetStore(state.assetStore, clientManifest, buildDir);
|
|
202914
202935
|
}, getReactModuleUrl = async (pageFile) => {
|
|
202915
|
-
const { invalidateModule: invalidateModule2, SRC_URL_PREFIX: SRC_URL_PREFIX2 } = await Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
|
|
202936
|
+
const { invalidateModule: invalidateModule2, warmCache: warmCache2, SRC_URL_PREFIX: SRC_URL_PREFIX2 } = await Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
|
|
202916
202937
|
invalidateModule2(pageFile);
|
|
202917
202938
|
const rel = relative8(process.cwd(), pageFile).replace(/\\/g, "/");
|
|
202918
|
-
|
|
202939
|
+
const url = `${SRC_URL_PREFIX2}${rel}`;
|
|
202940
|
+
warmCache2(url);
|
|
202941
|
+
return url;
|
|
202919
202942
|
}, handleReactFastPath = async (state, config, filesToRebuild, startTime, onRebuildComplete) => {
|
|
202920
202943
|
const reactDir = config.reactDirectory ?? "";
|
|
202921
202944
|
const reactPagesPath = resolve20(reactDir, "pages");
|
|
@@ -204361,10 +204384,12 @@ var prepare = async (configOrPath) => {
|
|
|
204361
204384
|
...getAngularVendorPaths2() ?? {},
|
|
204362
204385
|
...depVendorPaths
|
|
204363
204386
|
};
|
|
204387
|
+
const { setGlobalModuleServer: setGlobalModuleServer2 } = await Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
|
|
204364
204388
|
const moduleHandler = createModuleServer2({
|
|
204365
204389
|
projectRoot: process.cwd(),
|
|
204366
204390
|
vendorPaths: allVendorPaths
|
|
204367
204391
|
});
|
|
204392
|
+
setGlobalModuleServer2(moduleHandler);
|
|
204368
204393
|
const hmrPlugin = hmr2(result.hmrState, result.manifest, moduleHandler);
|
|
204369
204394
|
const { SRC_URL_PREFIX: SRC_URL_PREFIX2 } = await Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
|
|
204370
204395
|
const devIndexDir = resolve22(buildDir, "_src_indexes");
|
|
@@ -204542,5 +204567,5 @@ export {
|
|
|
204542
204567
|
ANGULAR_INIT_TIMEOUT_MS
|
|
204543
204568
|
};
|
|
204544
204569
|
|
|
204545
|
-
//# debugId=
|
|
204570
|
+
//# debugId=68D105519379CD5364756E2164756E21
|
|
204546
204571
|
//# sourceMappingURL=index.js.map
|