@absolutejs/absolute 0.19.0-beta.54 → 0.19.0-beta.56
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/.claude/settings.local.json +5 -1
- package/dist/build.js +22 -10
- package/dist/build.js.map +4 -4
- package/dist/index.js +22 -10
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -202353,11 +202353,12 @@ __export(exports_moduleServer, {
|
|
|
202353
202353
|
});
|
|
202354
202354
|
import { existsSync as existsSync13, readFileSync as readFileSync9, statSync } from "fs";
|
|
202355
202355
|
import { basename as basename7, dirname as dirname7, extname as extname3, resolve as resolve18, relative as relative7 } from "path";
|
|
202356
|
-
var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
|
|
202356
|
+
var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
|
|
202357
|
+
const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
|
|
202357
202358
|
const allExports = [];
|
|
202358
202359
|
let match;
|
|
202359
202360
|
ALL_EXPORTS_RE.lastIndex = 0;
|
|
202360
|
-
while ((match = ALL_EXPORTS_RE.exec(
|
|
202361
|
+
while ((match = ALL_EXPORTS_RE.exec(codeOnly)) !== null) {
|
|
202361
202362
|
if (match[1])
|
|
202362
202363
|
allExports.push(match[1]);
|
|
202363
202364
|
}
|
|
@@ -202891,6 +202892,7 @@ var init_moduleServer = __esm(() => {
|
|
|
202891
202892
|
});
|
|
202892
202893
|
TRANSPILABLE = new Set([".ts", ".tsx", ".js", ".jsx", ".mjs"]);
|
|
202893
202894
|
ALL_EXPORTS_RE = /export\s+(?:type|interface|const|let|var|function|class|enum|abstract\s+class)\s+(\w+)/g;
|
|
202895
|
+
STRING_CONTENTS_RE = /`(?:[^`\\]|\\.)*`|'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"/gs;
|
|
202894
202896
|
REACT_EXTENSIONS = new Set([".tsx", ".jsx"]);
|
|
202895
202897
|
mtimeCache = new Map;
|
|
202896
202898
|
HOOK_NAMES = new Set([
|
|
@@ -203442,12 +203444,22 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
203442
203444
|
for (const file4 of reactFiles) {
|
|
203443
203445
|
state.fileHashes.set(resolve21(file4), computeFileHash(file4));
|
|
203444
203446
|
}
|
|
203445
|
-
const
|
|
203446
|
-
|
|
203447
|
-
|
|
203448
|
-
|
|
203449
|
-
|
|
203450
|
-
|
|
203447
|
+
const primaryFile = reactFiles.find((f) => !f.replace(/\\/g, "/").includes("/pages/")) ?? reactFiles[0];
|
|
203448
|
+
if (!primaryFile) {
|
|
203449
|
+
onRebuildComplete({
|
|
203450
|
+
hmrState: state,
|
|
203451
|
+
manifest: state.manifest
|
|
203452
|
+
});
|
|
203453
|
+
return state.manifest;
|
|
203454
|
+
}
|
|
203455
|
+
for (const file4 of reactFiles) {
|
|
203456
|
+
const { invalidateModule: invalidateModule2 } = await Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
|
|
203457
|
+
invalidateModule2(file4);
|
|
203458
|
+
}
|
|
203459
|
+
const pageModuleUrl = await getReactModuleUrl(primaryFile);
|
|
203460
|
+
if (pageModuleUrl) {
|
|
203461
|
+
const serverDuration = Date.now() - startTime;
|
|
203462
|
+
state.lastHmrPath = relative8(process.cwd(), primaryFile).replace(/\\/g, "/");
|
|
203451
203463
|
state.lastHmrFramework = "react";
|
|
203452
203464
|
broadcastToClients(state, {
|
|
203453
203465
|
data: {
|
|
@@ -203456,7 +203468,7 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
203456
203468
|
hasCSSChanges: false,
|
|
203457
203469
|
manifest: state.manifest,
|
|
203458
203470
|
pageModuleUrl,
|
|
203459
|
-
primarySource:
|
|
203471
|
+
primarySource: primaryFile,
|
|
203460
203472
|
serverDuration,
|
|
203461
203473
|
sourceFiles: reactFiles
|
|
203462
203474
|
},
|
|
@@ -205213,5 +205225,5 @@ export {
|
|
|
205213
205225
|
ANGULAR_INIT_TIMEOUT_MS
|
|
205214
205226
|
};
|
|
205215
205227
|
|
|
205216
|
-
//# debugId=
|
|
205228
|
+
//# debugId=6CF4E1E884434C2664756E2164756E21
|
|
205217
205229
|
//# sourceMappingURL=index.js.map
|