@absolutejs/absolute 0.19.0-beta.4 → 0.19.0-beta.40
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 +23 -1
- package/dist/build.js +622 -59
- package/dist/build.js.map +13 -10
- package/dist/cli/index.js +29 -1
- package/dist/dev/client/frameworkDetect.ts +1 -2
- package/dist/dev/client/handlers/react.ts +96 -4
- package/dist/index.js +886 -209
- package/dist/index.js.map +17 -13
- package/dist/react/index.js +86 -1
- package/dist/react/index.js.map +5 -4
- package/dist/src/build/buildDepVendor.d.ts +2 -0
- package/dist/src/dev/clientManager.d.ts +2 -0
- package/dist/src/dev/moduleServer.d.ts +11 -0
- package/dist/src/dev/ssrRenderer.d.ts +7 -0
- package/dist/src/dev/ssrWorker.d.ts +0 -0
- package/dist/src/dev/transformCache.d.ts +4 -0
- package/dist/src/plugins/hmr.d.ts +1 -1
- package/dist/ssrWorker.ts +55 -0
- package/dist/types/messages.d.ts +5 -1
- package/native/packages/darwin-arm64/fast_ops.dylib +0 -0
- package/native/packages/darwin-arm64/package.json +1 -1
- package/native/packages/darwin-x64/fast_ops.dylib +0 -0
- package/native/packages/darwin-x64/package.json +1 -1
- package/native/packages/linux-arm64/package.json +1 -1
- package/native/packages/linux-x64/fast_ops.so +0 -0
- package/native/packages/linux-x64/package.json +1 -1
- package/package.json +6 -6
- package/types/globals.d.ts +1 -0
- package/types/messages.ts +7 -1
- package/types/typeGuards.ts +2 -0
package/dist/build.js
CHANGED
|
@@ -419,7 +419,7 @@ var indexContentCache, resolveDevClientDir = () => {
|
|
|
419
419
|
const hasher = new Bun.CryptoHasher("md5");
|
|
420
420
|
hasher.update(content);
|
|
421
421
|
const contentHash = hasher.digest("hex");
|
|
422
|
-
if (indexContentCache.get(indexPath) === contentHash) {
|
|
422
|
+
if (indexContentCache.get(indexPath) === contentHash && existsSync(indexPath)) {
|
|
423
423
|
return;
|
|
424
424
|
}
|
|
425
425
|
indexContentCache.set(indexPath, contentHash);
|
|
@@ -170927,7 +170927,7 @@ import {
|
|
|
170927
170927
|
rmSync,
|
|
170928
170928
|
writeFileSync as writeFileSync3
|
|
170929
170929
|
} from "fs";
|
|
170930
|
-
import { basename as basename5, join as join11, resolve as resolve9 } from "path";
|
|
170930
|
+
import { basename as basename5, join as join11, relative as relative6, resolve as resolve9 } from "path";
|
|
170931
170931
|
import { cwd, env as env2, exit } from "process";
|
|
170932
170932
|
var {build: bunBuild4, Glob: Glob5 } = globalThis.Bun;
|
|
170933
170933
|
var isDev, extractBuildError = (logs, pass, label, frameworkNames, isIncremental, throwOnError) => {
|
|
@@ -171464,6 +171464,18 @@ var isDev, extractBuildError = (logs, pass, label, frameworkNames, isIncremental
|
|
|
171464
171464
|
...cssOutputs.map((a) => a.path)
|
|
171465
171465
|
]);
|
|
171466
171466
|
}
|
|
171467
|
+
if (hmr && reactIndexesPath && reactPagesPath) {
|
|
171468
|
+
const { readdirSync: readDir } = await import("fs");
|
|
171469
|
+
const devIndexDir = join11(buildPath, "_src_indexes");
|
|
171470
|
+
mkdirSync6(devIndexDir, { recursive: true });
|
|
171471
|
+
const indexFiles = readDir(reactIndexesPath).filter((f) => f.endsWith(".tsx"));
|
|
171472
|
+
const pagesRel = relative6(process.cwd(), resolve9(reactPagesPath)).replace(/\\/g, "/");
|
|
171473
|
+
for (const file3 of indexFiles) {
|
|
171474
|
+
let content = readFileSync5(join11(reactIndexesPath, file3), "utf-8");
|
|
171475
|
+
content = content.replace(/from\s*['"]\.\.\/pages\/([^'"]+)['"]/g, `from '/@src/${pagesRel}/$1'`);
|
|
171476
|
+
writeFileSync3(join11(devIndexDir, file3), content);
|
|
171477
|
+
}
|
|
171478
|
+
}
|
|
171467
171479
|
if (!options?.preserveIntermediateFiles)
|
|
171468
171480
|
await cleanup({
|
|
171469
171481
|
angularDir,
|
|
@@ -172312,6 +172324,8 @@ var isValidHMRClientMessage = (data) => {
|
|
|
172312
172324
|
return true;
|
|
172313
172325
|
case "hydration-error":
|
|
172314
172326
|
return true;
|
|
172327
|
+
case "hmr-timing":
|
|
172328
|
+
return true;
|
|
172315
172329
|
default:
|
|
172316
172330
|
return false;
|
|
172317
172331
|
}
|
|
@@ -172394,6 +172408,18 @@ var trySendMessage = (client, messageStr) => {
|
|
|
172394
172408
|
state.activeFrameworks.add(data.framework);
|
|
172395
172409
|
}
|
|
172396
172410
|
break;
|
|
172411
|
+
case "hmr-timing": {
|
|
172412
|
+
const timing = data;
|
|
172413
|
+
if (timing.duration !== undefined) {
|
|
172414
|
+
const lastPath = state.lastHmrPath ?? "";
|
|
172415
|
+
const breakdown = timing.serverMs !== undefined ? ` (server ${timing.serverMs}ms + fetch ${timing.fetchMs ?? 0}ms + refresh ${timing.refreshMs ?? 0}ms)` : "";
|
|
172416
|
+
logHmrUpdate(lastPath, state.lastHmrFramework, timing.duration);
|
|
172417
|
+
if (breakdown) {
|
|
172418
|
+
console.log(` ${breakdown}`);
|
|
172419
|
+
}
|
|
172420
|
+
}
|
|
172421
|
+
break;
|
|
172422
|
+
}
|
|
172397
172423
|
}
|
|
172398
172424
|
}, handleHMRMessage = (state, client, message) => {
|
|
172399
172425
|
try {
|
|
@@ -172407,7 +172433,9 @@ var trySendMessage = (client, messageStr) => {
|
|
|
172407
172433
|
handleParsedMessage(state, client, parsedData);
|
|
172408
172434
|
} catch {}
|
|
172409
172435
|
};
|
|
172410
|
-
var init_webSocket = () => {
|
|
172436
|
+
var init_webSocket = __esm(() => {
|
|
172437
|
+
init_logger();
|
|
172438
|
+
});
|
|
172411
172439
|
|
|
172412
172440
|
// src/utils/ssrErrorPage.ts
|
|
172413
172441
|
var ssrErrorPage = (framework, error) => {
|
|
@@ -202101,16 +202129,352 @@ var init_pageHandler = __esm(() => {
|
|
|
202101
202129
|
setSsrContextGetter(() => angularSsrContext.getStore());
|
|
202102
202130
|
});
|
|
202103
202131
|
|
|
202132
|
+
// src/dev/transformCache.ts
|
|
202133
|
+
var exports_transformCache = {};
|
|
202134
|
+
__export(exports_transformCache, {
|
|
202135
|
+
setTransformed: () => setTransformed,
|
|
202136
|
+
invalidateAll: () => invalidateAll,
|
|
202137
|
+
invalidate: () => invalidate,
|
|
202138
|
+
getTransformed: () => getTransformed
|
|
202139
|
+
});
|
|
202140
|
+
import { statSync } from "fs";
|
|
202141
|
+
var globalStore, cache, getTransformed = (filePath) => {
|
|
202142
|
+
const entry = cache.get(filePath);
|
|
202143
|
+
if (!entry)
|
|
202144
|
+
return;
|
|
202145
|
+
try {
|
|
202146
|
+
const stat2 = statSync(filePath);
|
|
202147
|
+
if (stat2.mtimeMs === entry.mtime)
|
|
202148
|
+
return entry.content;
|
|
202149
|
+
} catch {
|
|
202150
|
+
cache.delete(filePath);
|
|
202151
|
+
}
|
|
202152
|
+
return;
|
|
202153
|
+
}, setTransformed = (filePath, content, mtime) => {
|
|
202154
|
+
cache.set(filePath, { content, mtime });
|
|
202155
|
+
}, invalidate = (filePath) => {
|
|
202156
|
+
cache.delete(filePath);
|
|
202157
|
+
}, invalidateAll = () => {
|
|
202158
|
+
cache.clear();
|
|
202159
|
+
};
|
|
202160
|
+
var init_transformCache = __esm(() => {
|
|
202161
|
+
globalStore = globalThis;
|
|
202162
|
+
cache = globalStore.__transformCache ?? new Map;
|
|
202163
|
+
globalStore.__transformCache = cache;
|
|
202164
|
+
});
|
|
202165
|
+
|
|
202166
|
+
// src/dev/moduleServer.ts
|
|
202167
|
+
var exports_moduleServer = {};
|
|
202168
|
+
__export(exports_moduleServer, {
|
|
202169
|
+
warmCache: () => warmCache,
|
|
202170
|
+
setGlobalModuleServer: () => setGlobalModuleServer,
|
|
202171
|
+
invalidateModule: () => invalidateModule,
|
|
202172
|
+
createModuleServer: () => createModuleServer,
|
|
202173
|
+
SRC_URL_PREFIX: () => SRC_URL_PREFIX
|
|
202174
|
+
});
|
|
202175
|
+
import { readFileSync as readFileSync9, statSync as statSync2 } from "fs";
|
|
202176
|
+
import { dirname as dirname7, extname as extname3, resolve as resolve16, relative as relative7 } from "path";
|
|
202177
|
+
var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, TRANSPILABLE, ALL_EXPORTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
|
|
202178
|
+
const allExports = [];
|
|
202179
|
+
let match;
|
|
202180
|
+
ALL_EXPORTS_RE.lastIndex = 0;
|
|
202181
|
+
while ((match = ALL_EXPORTS_RE.exec(originalSource)) !== null) {
|
|
202182
|
+
if (match[1])
|
|
202183
|
+
allExports.push(match[1]);
|
|
202184
|
+
}
|
|
202185
|
+
const valueSet = new Set(valueExports);
|
|
202186
|
+
const typeExports = allExports.filter((e) => !valueSet.has(e));
|
|
202187
|
+
if (typeExports.length === 0)
|
|
202188
|
+
return transpiled;
|
|
202189
|
+
const stubs = typeExports.map((name) => `export const ${name} = undefined;`).join(`
|
|
202190
|
+
`);
|
|
202191
|
+
return `${transpiled}
|
|
202192
|
+
${stubs}
|
|
202193
|
+
`;
|
|
202194
|
+
}, REACT_EXTENSIONS, escapeRegex3 = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), buildImportRewriter = (vendorPaths) => {
|
|
202195
|
+
const entries = Object.entries(vendorPaths).sort(([a], [b]) => b.length - a.length);
|
|
202196
|
+
if (entries.length === 0)
|
|
202197
|
+
return null;
|
|
202198
|
+
const alt = entries.map(([spec]) => escapeRegex3(spec)).join("|");
|
|
202199
|
+
const lookup = new Map(entries);
|
|
202200
|
+
const fromRegex = new RegExp(`(from\\s*["'])(${alt})(["'])`, "g");
|
|
202201
|
+
const sideEffectRegex = new RegExp(`(import\\s*["'])(${alt})(["']\\s*;?)`, "g");
|
|
202202
|
+
const dynamicRegex = new RegExp(`(import\\s*\\(\\s*["'])(${alt})(["']\\s*\\))`, "g");
|
|
202203
|
+
return { dynamicRegex, fromRegex, lookup, sideEffectRegex };
|
|
202204
|
+
}, rewriteImports2 = (code, filePath, projectRoot, rewriter) => {
|
|
202205
|
+
let result = code;
|
|
202206
|
+
const bareSpecifierRe = /((?:from|import)\s*["'])([^"'./][^"']*)(["'])/g;
|
|
202207
|
+
result = result.replace(bareSpecifierRe, (_match, prefix, specifier, suffix) => {
|
|
202208
|
+
const webPath = rewriter?.lookup.get(specifier);
|
|
202209
|
+
if (webPath)
|
|
202210
|
+
return `${prefix}${webPath}${suffix}`;
|
|
202211
|
+
return `${prefix}/@stub/${encodeURIComponent(specifier)}${suffix}`;
|
|
202212
|
+
});
|
|
202213
|
+
const fileDir = dirname7(filePath);
|
|
202214
|
+
result = result.replace(/(from\s*["'])(\.\.?\/[^"']+)(["'])/g, (_match, prefix, relPath, suffix) => {
|
|
202215
|
+
const absPath = resolve16(fileDir, relPath);
|
|
202216
|
+
const rel = relative7(projectRoot, absPath);
|
|
202217
|
+
let srcPath = rel;
|
|
202218
|
+
if (!extname3(srcPath)) {
|
|
202219
|
+
const extensions = [".tsx", ".ts", ".jsx", ".js"];
|
|
202220
|
+
for (const ext of extensions) {
|
|
202221
|
+
try {
|
|
202222
|
+
statSync2(resolve16(projectRoot, srcPath + ext));
|
|
202223
|
+
srcPath += ext;
|
|
202224
|
+
break;
|
|
202225
|
+
} catch {}
|
|
202226
|
+
}
|
|
202227
|
+
}
|
|
202228
|
+
return `${prefix}${SRC_PREFIX}${srcPath.replace(/\\/g, "/")}${suffix}`;
|
|
202229
|
+
});
|
|
202230
|
+
result = result.replace(/(import\s*\(\s*["'])(\.\.?\/[^"']+)(["']\s*\))/g, (_match, prefix, relPath, suffix) => {
|
|
202231
|
+
const absPath = resolve16(fileDir, relPath);
|
|
202232
|
+
const rel = relative7(projectRoot, absPath);
|
|
202233
|
+
return `${prefix}${SRC_PREFIX}${rel.replace(/\\/g, "/")}${suffix}`;
|
|
202234
|
+
});
|
|
202235
|
+
result = result.replace(/(import\s*["'])(\.\.?\/[^"']+)(["']\s*;?)/g, (_match, prefix, relPath, suffix) => {
|
|
202236
|
+
const absPath = resolve16(fileDir, relPath);
|
|
202237
|
+
const rel = relative7(projectRoot, absPath);
|
|
202238
|
+
let srcPath = rel;
|
|
202239
|
+
if (!extname3(srcPath)) {
|
|
202240
|
+
const extensions = [".tsx", ".ts", ".jsx", ".js", ".css"];
|
|
202241
|
+
for (const ext of extensions) {
|
|
202242
|
+
try {
|
|
202243
|
+
statSync2(resolve16(projectRoot, srcPath + ext));
|
|
202244
|
+
srcPath += ext;
|
|
202245
|
+
break;
|
|
202246
|
+
} catch {}
|
|
202247
|
+
}
|
|
202248
|
+
}
|
|
202249
|
+
return `${prefix}${SRC_PREFIX}${srcPath.replace(/\\/g, "/")}${suffix}`;
|
|
202250
|
+
});
|
|
202251
|
+
result = result.replace(/((?:from|import)\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["'])/g, (_match, prefix, absPath, _ext, suffix) => {
|
|
202252
|
+
if (absPath.startsWith(projectRoot)) {
|
|
202253
|
+
const rel2 = relative7(projectRoot, absPath).replace(/\\/g, "/");
|
|
202254
|
+
return `${prefix}${SRC_PREFIX}${rel2}${suffix}`;
|
|
202255
|
+
}
|
|
202256
|
+
const rel = relative7(projectRoot, absPath).replace(/\\/g, "/");
|
|
202257
|
+
if (!rel.startsWith("..")) {
|
|
202258
|
+
return `${prefix}${SRC_PREFIX}${rel}${suffix}`;
|
|
202259
|
+
}
|
|
202260
|
+
return _match;
|
|
202261
|
+
});
|
|
202262
|
+
return result;
|
|
202263
|
+
}, HOOK_NAMES, REFRESH_PREAMBLE, JSX_AUTO_RE, JSXS_AUTO_RE, JSX_PROD_RE, FRAGMENT_RE, addJsxImport = (code) => {
|
|
202264
|
+
const imports = [];
|
|
202265
|
+
const jsxDevMatch = JSX_AUTO_RE.exec(code);
|
|
202266
|
+
if (jsxDevMatch) {
|
|
202267
|
+
imports.push(`import { jsxDEV as ${jsxDevMatch[1]} } from "react/jsx-dev-runtime";`);
|
|
202268
|
+
}
|
|
202269
|
+
const jsxsMatch = JSXS_AUTO_RE.exec(code);
|
|
202270
|
+
if (jsxsMatch && (!jsxDevMatch || jsxsMatch[1] !== jsxDevMatch[1])) {
|
|
202271
|
+
imports.push(`import { jsxs as ${jsxsMatch[1]} } from "react/jsx-runtime";`);
|
|
202272
|
+
}
|
|
202273
|
+
const jsxProdMatch = JSX_PROD_RE.exec(code);
|
|
202274
|
+
if (jsxProdMatch) {
|
|
202275
|
+
imports.push(`import { jsx as ${jsxProdMatch[1]} } from "react/jsx-runtime";`);
|
|
202276
|
+
}
|
|
202277
|
+
const fragmentMatch = FRAGMENT_RE.exec(code);
|
|
202278
|
+
if (fragmentMatch) {
|
|
202279
|
+
imports.push(`import { Fragment as ${fragmentMatch[1]} } from "react";`);
|
|
202280
|
+
}
|
|
202281
|
+
if (imports.length === 0)
|
|
202282
|
+
return code;
|
|
202283
|
+
return imports.join(`
|
|
202284
|
+
`) + `
|
|
202285
|
+
` + code;
|
|
202286
|
+
}, reactTranspiler, transformReactFile = (filePath, projectRoot, rewriter) => {
|
|
202287
|
+
const raw = readFileSync9(filePath, "utf-8");
|
|
202288
|
+
const valueExports = tsTranspiler2.scan(raw).exports;
|
|
202289
|
+
let transpiled = reactTranspiler.transformSync(raw);
|
|
202290
|
+
transpiled = preserveTypeExports(raw, transpiled, valueExports);
|
|
202291
|
+
transpiled = addJsxImport(transpiled);
|
|
202292
|
+
transpiled = transpiled.replace(/import\s*\{[^}]*\}\s*from\s*["']react-refresh\/runtime["'];?\n?/, "");
|
|
202293
|
+
transpiled = transpiled.replace(/\$RefreshReg\$_[a-z0-9]+/g, "$RefreshReg$");
|
|
202294
|
+
transpiled = transpiled.replace(/\$RefreshSig\$_[a-z0-9]+/g, "$RefreshSig$");
|
|
202295
|
+
transpiled = `var $RefreshReg$ = window.$RefreshReg$ || function(){};
|
|
202296
|
+
` + `var $RefreshSig$ = window.$RefreshSig$ || function(){ return function(t){ return t; }; };
|
|
202297
|
+
` + transpiled;
|
|
202298
|
+
const relPath = relative7(projectRoot, filePath).replace(/\\/g, "/");
|
|
202299
|
+
transpiled = transpiled.replace(/\binput\.tsx:/g, `${relPath}:`);
|
|
202300
|
+
return rewriteImports2(transpiled, filePath, projectRoot, rewriter);
|
|
202301
|
+
}, transformPlainFile = (filePath, projectRoot, rewriter) => {
|
|
202302
|
+
const raw = readFileSync9(filePath, "utf-8");
|
|
202303
|
+
const ext = extname3(filePath);
|
|
202304
|
+
const isTS = ext === ".ts" || ext === ".tsx";
|
|
202305
|
+
const transpiler3 = isTS ? tsTranspiler2 : jsTranspiler2;
|
|
202306
|
+
const valueExports = isTS ? transpiler3.scan(raw).exports : [];
|
|
202307
|
+
let transpiled = transpiler3.transformSync(raw);
|
|
202308
|
+
if (isTS) {
|
|
202309
|
+
transpiled = preserveTypeExports(raw, transpiled, valueExports);
|
|
202310
|
+
}
|
|
202311
|
+
return rewriteImports2(transpiled, filePath, projectRoot, rewriter);
|
|
202312
|
+
}, handleCssRequest = (filePath) => {
|
|
202313
|
+
const raw = readFileSync9(filePath, "utf-8");
|
|
202314
|
+
const escaped = raw.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
|
|
202315
|
+
return [
|
|
202316
|
+
`const style = document.createElement('style');`,
|
|
202317
|
+
`style.textContent = \`${escaped}\`;`,
|
|
202318
|
+
`style.dataset.hmrId = ${JSON.stringify(filePath)};`,
|
|
202319
|
+
`const existing = document.querySelector(\`style[data-hmr-id="${filePath}"]\`);`,
|
|
202320
|
+
`if (existing) existing.remove();`,
|
|
202321
|
+
`document.head.appendChild(style);`
|
|
202322
|
+
].join(`
|
|
202323
|
+
`);
|
|
202324
|
+
}, createModuleServer = (config) => {
|
|
202325
|
+
const { projectRoot, vendorPaths } = config;
|
|
202326
|
+
const rewriter = buildImportRewriter(vendorPaths);
|
|
202327
|
+
return async (pathname) => {
|
|
202328
|
+
if (pathname.startsWith("/@stub/")) {
|
|
202329
|
+
const specifier = decodeURIComponent(pathname.slice("/@stub/".length));
|
|
202330
|
+
let stubCode = `export default {};
|
|
202331
|
+
`;
|
|
202332
|
+
try {
|
|
202333
|
+
const mod = await import(specifier);
|
|
202334
|
+
const names = Object.keys(mod).filter((k) => k !== "default" && k !== "__esModule");
|
|
202335
|
+
if (names.length > 0) {
|
|
202336
|
+
const noops = names.map((n) => `export const ${n} = () => {};`).join(`
|
|
202337
|
+
`);
|
|
202338
|
+
stubCode = `${noops}
|
|
202339
|
+
export default {};
|
|
202340
|
+
`;
|
|
202341
|
+
}
|
|
202342
|
+
} catch {}
|
|
202343
|
+
return new Response(stubCode, {
|
|
202344
|
+
headers: {
|
|
202345
|
+
"Cache-Control": "public, max-age=31536000, immutable",
|
|
202346
|
+
"Content-Type": "application/javascript"
|
|
202347
|
+
}
|
|
202348
|
+
});
|
|
202349
|
+
}
|
|
202350
|
+
if (!pathname.startsWith(SRC_PREFIX))
|
|
202351
|
+
return;
|
|
202352
|
+
const relPath = pathname.slice(SRC_PREFIX.length);
|
|
202353
|
+
let filePath = resolve16(projectRoot, relPath);
|
|
202354
|
+
let ext = extname3(filePath);
|
|
202355
|
+
if (!ext) {
|
|
202356
|
+
const tryExts = [".tsx", ".ts", ".jsx", ".js"];
|
|
202357
|
+
for (const tryExt of tryExts) {
|
|
202358
|
+
try {
|
|
202359
|
+
statSync2(filePath + tryExt);
|
|
202360
|
+
filePath += tryExt;
|
|
202361
|
+
ext = tryExt;
|
|
202362
|
+
break;
|
|
202363
|
+
} catch {}
|
|
202364
|
+
}
|
|
202365
|
+
}
|
|
202366
|
+
try {
|
|
202367
|
+
if (ext === ".css") {
|
|
202368
|
+
return new Response(handleCssRequest(filePath), {
|
|
202369
|
+
headers: {
|
|
202370
|
+
"Cache-Control": "no-cache",
|
|
202371
|
+
"Content-Type": "application/javascript"
|
|
202372
|
+
}
|
|
202373
|
+
});
|
|
202374
|
+
}
|
|
202375
|
+
if (!TRANSPILABLE.has(ext))
|
|
202376
|
+
return;
|
|
202377
|
+
const cached = getTransformed(filePath);
|
|
202378
|
+
if (cached) {
|
|
202379
|
+
return new Response(cached, {
|
|
202380
|
+
headers: {
|
|
202381
|
+
"Cache-Control": "no-cache",
|
|
202382
|
+
"Content-Type": "application/javascript"
|
|
202383
|
+
}
|
|
202384
|
+
});
|
|
202385
|
+
}
|
|
202386
|
+
const stat2 = statSync2(filePath);
|
|
202387
|
+
let content;
|
|
202388
|
+
if (REACT_EXTENSIONS.has(ext)) {
|
|
202389
|
+
content = transformReactFile(filePath, projectRoot, rewriter);
|
|
202390
|
+
} else {
|
|
202391
|
+
content = transformPlainFile(filePath, projectRoot, rewriter);
|
|
202392
|
+
}
|
|
202393
|
+
setTransformed(filePath, content, stat2.mtimeMs);
|
|
202394
|
+
return new Response(content, {
|
|
202395
|
+
headers: {
|
|
202396
|
+
"Cache-Control": "no-cache",
|
|
202397
|
+
"Content-Type": "application/javascript"
|
|
202398
|
+
}
|
|
202399
|
+
});
|
|
202400
|
+
} catch (err) {
|
|
202401
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
202402
|
+
return new Response(`console.error('[ModuleServer] Transform error:', ${JSON.stringify(message)});`, {
|
|
202403
|
+
headers: { "Content-Type": "application/javascript" },
|
|
202404
|
+
status: 500
|
|
202405
|
+
});
|
|
202406
|
+
}
|
|
202407
|
+
};
|
|
202408
|
+
}, invalidateModule, warmCache = (pathname) => {
|
|
202409
|
+
if (!pathname.startsWith(SRC_PREFIX))
|
|
202410
|
+
return;
|
|
202411
|
+
if (!globalModuleServer)
|
|
202412
|
+
return;
|
|
202413
|
+
globalModuleServer(pathname);
|
|
202414
|
+
}, globalModuleServer = null, setGlobalModuleServer = (handler) => {
|
|
202415
|
+
globalModuleServer = handler;
|
|
202416
|
+
}, SRC_URL_PREFIX;
|
|
202417
|
+
var init_moduleServer = __esm(() => {
|
|
202418
|
+
init_transformCache();
|
|
202419
|
+
jsTranspiler2 = new Bun.Transpiler({
|
|
202420
|
+
loader: "js",
|
|
202421
|
+
trimUnusedImports: true
|
|
202422
|
+
});
|
|
202423
|
+
tsTranspiler2 = new Bun.Transpiler({
|
|
202424
|
+
loader: "tsx",
|
|
202425
|
+
trimUnusedImports: true
|
|
202426
|
+
});
|
|
202427
|
+
TRANSPILABLE = new Set([".ts", ".tsx", ".js", ".jsx", ".mjs"]);
|
|
202428
|
+
ALL_EXPORTS_RE = /export\s+(?:type|interface|const|let|var|function|class|enum|abstract\s+class)\s+(\w+)/g;
|
|
202429
|
+
REACT_EXTENSIONS = new Set([".tsx", ".jsx"]);
|
|
202430
|
+
HOOK_NAMES = new Set([
|
|
202431
|
+
"useState",
|
|
202432
|
+
"useReducer",
|
|
202433
|
+
"useEffect",
|
|
202434
|
+
"useLayoutEffect",
|
|
202435
|
+
"useMemo",
|
|
202436
|
+
"useCallback",
|
|
202437
|
+
"useRef",
|
|
202438
|
+
"useContext",
|
|
202439
|
+
"useImperativeHandle",
|
|
202440
|
+
"useDebugValue",
|
|
202441
|
+
"useDeferredValue",
|
|
202442
|
+
"useTransition",
|
|
202443
|
+
"useId",
|
|
202444
|
+
"useSyncExternalStore",
|
|
202445
|
+
"useInsertionEffect",
|
|
202446
|
+
"useOptimistic",
|
|
202447
|
+
"useFormStatus",
|
|
202448
|
+
"useActionState"
|
|
202449
|
+
]);
|
|
202450
|
+
REFRESH_PREAMBLE = [
|
|
202451
|
+
"var $RefreshReg$ = window.$RefreshReg$ || function(){};",
|
|
202452
|
+
"var $RefreshSig$ = window.$RefreshSig$ || function(){ return function(t){ return t; }; };"
|
|
202453
|
+
].join(`
|
|
202454
|
+
`);
|
|
202455
|
+
JSX_AUTO_RE = /\b(jsxDEV_[a-z0-9]+)\b/;
|
|
202456
|
+
JSXS_AUTO_RE = /\b(jsxs_[a-z0-9]+)\b/;
|
|
202457
|
+
JSX_PROD_RE = /\b(jsx_[a-z0-9]+)\b/;
|
|
202458
|
+
FRAGMENT_RE = /\b(Fragment_[a-z0-9]+)\b/;
|
|
202459
|
+
reactTranspiler = new Bun.Transpiler({
|
|
202460
|
+
loader: "tsx",
|
|
202461
|
+
reactFastRefresh: true,
|
|
202462
|
+
trimUnusedImports: true
|
|
202463
|
+
});
|
|
202464
|
+
invalidateModule = invalidate;
|
|
202465
|
+
SRC_URL_PREFIX = SRC_PREFIX;
|
|
202466
|
+
});
|
|
202467
|
+
|
|
202104
202468
|
// src/dev/simpleHTMLHMR.ts
|
|
202105
202469
|
var exports_simpleHTMLHMR = {};
|
|
202106
202470
|
__export(exports_simpleHTMLHMR, {
|
|
202107
202471
|
handleHTMLUpdate: () => handleHTMLUpdate
|
|
202108
202472
|
});
|
|
202109
|
-
import { resolve as
|
|
202473
|
+
import { resolve as resolve17 } from "path";
|
|
202110
202474
|
var handleHTMLUpdate = async (htmlFilePath) => {
|
|
202111
202475
|
let htmlContent;
|
|
202112
202476
|
try {
|
|
202113
|
-
const resolvedPath =
|
|
202477
|
+
const resolvedPath = resolve17(htmlFilePath);
|
|
202114
202478
|
const file3 = Bun.file(resolvedPath);
|
|
202115
202479
|
if (!await file3.exists()) {
|
|
202116
202480
|
return null;
|
|
@@ -202136,11 +202500,11 @@ var exports_simpleHTMXHMR = {};
|
|
|
202136
202500
|
__export(exports_simpleHTMXHMR, {
|
|
202137
202501
|
handleHTMXUpdate: () => handleHTMXUpdate
|
|
202138
202502
|
});
|
|
202139
|
-
import { resolve as
|
|
202503
|
+
import { resolve as resolve18 } from "path";
|
|
202140
202504
|
var handleHTMXUpdate = async (htmxFilePath) => {
|
|
202141
202505
|
let htmlContent;
|
|
202142
202506
|
try {
|
|
202143
|
-
const resolvedPath =
|
|
202507
|
+
const resolvedPath = resolve18(htmxFilePath);
|
|
202144
202508
|
const file3 = Bun.file(resolvedPath);
|
|
202145
202509
|
if (!await file3.exists()) {
|
|
202146
202510
|
return null;
|
|
@@ -202164,7 +202528,7 @@ var init_simpleHTMXHMR = () => {};
|
|
|
202164
202528
|
// src/dev/rebuildTrigger.ts
|
|
202165
202529
|
import { existsSync as existsSync13 } from "fs";
|
|
202166
202530
|
import { rm as rm6 } from "fs/promises";
|
|
202167
|
-
import { basename as basename7, relative as
|
|
202531
|
+
import { basename as basename7, relative as relative8, resolve as resolve19 } from "path";
|
|
202168
202532
|
var parseErrorLocationFromMessage = (msg) => {
|
|
202169
202533
|
const pathLineCol = msg.match(/^([^\s:]+):(\d+)(?::(\d+))?/);
|
|
202170
202534
|
if (pathLineCol) {
|
|
@@ -202236,7 +202600,7 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202236
202600
|
state.fileHashes.delete(filePathInSet);
|
|
202237
202601
|
try {
|
|
202238
202602
|
const affectedFiles = getAffectedFiles(state.dependencyGraph, filePathInSet);
|
|
202239
|
-
const deletedPathResolved =
|
|
202603
|
+
const deletedPathResolved = resolve19(filePathInSet);
|
|
202240
202604
|
affectedFiles.forEach((affectedFile) => {
|
|
202241
202605
|
if (isValidDeletedAffectedFile(affectedFile, deletedPathResolved, processedFiles)) {
|
|
202242
202606
|
validFiles.push(affectedFile);
|
|
@@ -202280,7 +202644,7 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202280
202644
|
if (storedHash !== undefined && storedHash === fileHash) {
|
|
202281
202645
|
return;
|
|
202282
202646
|
}
|
|
202283
|
-
const normalizedFilePath =
|
|
202647
|
+
const normalizedFilePath = resolve19(filePathInSet);
|
|
202284
202648
|
if (!processedFiles.has(normalizedFilePath)) {
|
|
202285
202649
|
validFiles.push(normalizedFilePath);
|
|
202286
202650
|
processedFiles.add(normalizedFilePath);
|
|
@@ -202371,7 +202735,7 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202371
202735
|
}
|
|
202372
202736
|
if (!graph)
|
|
202373
202737
|
return componentFile;
|
|
202374
|
-
const dependents = graph.dependents.get(
|
|
202738
|
+
const dependents = graph.dependents.get(resolve19(componentFile));
|
|
202375
202739
|
if (!dependents)
|
|
202376
202740
|
return componentFile;
|
|
202377
202741
|
for (const dep of dependents) {
|
|
@@ -202380,7 +202744,7 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202380
202744
|
}
|
|
202381
202745
|
return componentFile;
|
|
202382
202746
|
}, resolveAngularPageEntries = (state, angularFiles, angularPagesPath) => {
|
|
202383
|
-
const pageEntries = angularFiles.filter((file3) => file3.endsWith(".ts") &&
|
|
202747
|
+
const pageEntries = angularFiles.filter((file3) => file3.endsWith(".ts") && resolve19(file3).startsWith(angularPagesPath));
|
|
202384
202748
|
if (pageEntries.length > 0 || !state.dependencyGraph) {
|
|
202385
202749
|
return pageEntries;
|
|
202386
202750
|
}
|
|
@@ -202389,7 +202753,7 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202389
202753
|
const lookupFile = resolveComponentLookupFile(componentFile, state.dependencyGraph);
|
|
202390
202754
|
const affected = getAffectedFiles(state.dependencyGraph, lookupFile);
|
|
202391
202755
|
affected.forEach((file3) => {
|
|
202392
|
-
if (file3.endsWith(".ts") &&
|
|
202756
|
+
if (file3.endsWith(".ts") && resolve19(file3).startsWith(angularPagesPath)) {
|
|
202393
202757
|
resolvedPages.add(file3);
|
|
202394
202758
|
}
|
|
202395
202759
|
});
|
|
@@ -202438,8 +202802,8 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202438
202802
|
return;
|
|
202439
202803
|
}
|
|
202440
202804
|
if (angVendorPaths) {
|
|
202441
|
-
const { rewriteImports:
|
|
202442
|
-
await
|
|
202805
|
+
const { rewriteImports: rewriteImports3 } = await Promise.resolve().then(() => exports_rewriteImports);
|
|
202806
|
+
await rewriteImports3(clientResult.outputs.map((artifact) => artifact.path), angVendorPaths);
|
|
202443
202807
|
}
|
|
202444
202808
|
const clientManifest = generateManifest2(clientResult.outputs, buildDir);
|
|
202445
202809
|
Object.assign(state.manifest, clientManifest);
|
|
@@ -202470,7 +202834,7 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202470
202834
|
const { clientPaths, serverPaths } = await compileAngular2(pageEntries, angularDir, true);
|
|
202471
202835
|
serverPaths.forEach((serverPath) => {
|
|
202472
202836
|
const fileBase = basename7(serverPath, ".js");
|
|
202473
|
-
state.manifest[toPascal(fileBase)] =
|
|
202837
|
+
state.manifest[toPascal(fileBase)] = resolve19(serverPath);
|
|
202474
202838
|
});
|
|
202475
202839
|
if (clientPaths.length > 0) {
|
|
202476
202840
|
await bundleAngularClient(state, clientPaths, state.resolvedPaths.buildDir);
|
|
@@ -202478,14 +202842,14 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202478
202842
|
}, handleAngularFastPath = async (state, config, filesToRebuild, startTime, onRebuildComplete) => {
|
|
202479
202843
|
const angularDir = config.angularDirectory ?? "";
|
|
202480
202844
|
const angularFiles = filesToRebuild.filter((file3) => detectFramework(file3, state.resolvedPaths) === "angular");
|
|
202481
|
-
const angularPagesPath =
|
|
202845
|
+
const angularPagesPath = resolve19(angularDir, "pages");
|
|
202482
202846
|
const pageEntries = resolveAngularPageEntries(state, angularFiles, angularPagesPath);
|
|
202483
202847
|
if (pageEntries.length > 0) {
|
|
202484
202848
|
await compileAndBundleAngular(state, pageEntries, angularDir);
|
|
202485
202849
|
invalidateAngularSsrCache();
|
|
202486
202850
|
}
|
|
202487
202851
|
if (pageEntries.length > 0 && !config.options?.preserveIntermediateFiles) {
|
|
202488
|
-
await rm6(
|
|
202852
|
+
await rm6(resolve19(angularDir, "compiled"), {
|
|
202489
202853
|
force: true,
|
|
202490
202854
|
recursive: true
|
|
202491
202855
|
});
|
|
@@ -202499,7 +202863,7 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202499
202863
|
return manifest;
|
|
202500
202864
|
}, resolveReactEntryForPageFile = (normalized, pagesPathResolved, reactIndexesPath) => {
|
|
202501
202865
|
const pageName = basename7(normalized, ".tsx");
|
|
202502
|
-
const indexPath =
|
|
202866
|
+
const indexPath = resolve19(reactIndexesPath, `${pageName}.tsx`);
|
|
202503
202867
|
if (!existsSync13(indexPath)) {
|
|
202504
202868
|
return;
|
|
202505
202869
|
}
|
|
@@ -202511,13 +202875,13 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202511
202875
|
return;
|
|
202512
202876
|
}
|
|
202513
202877
|
const pageName = basename7(dep, ".tsx");
|
|
202514
|
-
const indexPath =
|
|
202878
|
+
const indexPath = resolve19(reactIndexesPath, `${pageName}.tsx`);
|
|
202515
202879
|
if (existsSync13(indexPath) && !reactEntries.includes(indexPath)) {
|
|
202516
202880
|
reactEntries.push(indexPath);
|
|
202517
202881
|
}
|
|
202518
202882
|
});
|
|
202519
202883
|
}, resolveReactEntryForFile = (state, file3, pagesPathResolved, reactIndexesPath, reactEntries) => {
|
|
202520
|
-
const normalized =
|
|
202884
|
+
const normalized = resolve19(file3);
|
|
202521
202885
|
if (!normalized.startsWith(pagesPathResolved)) {
|
|
202522
202886
|
resolveReactEntriesFromDeps(state, normalized, pagesPathResolved, reactIndexesPath, reactEntries);
|
|
202523
202887
|
return;
|
|
@@ -202528,7 +202892,7 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202528
202892
|
}
|
|
202529
202893
|
}, collectReactEntries = (state, filesToRebuild, reactPagesPath, reactIndexesPath) => {
|
|
202530
202894
|
const reactEntries = [];
|
|
202531
|
-
const pagesPathResolved =
|
|
202895
|
+
const pagesPathResolved = resolve19(reactPagesPath);
|
|
202532
202896
|
filesToRebuild.forEach((file3) => {
|
|
202533
202897
|
resolveReactEntryForFile(state, file3, pagesPathResolved, reactIndexesPath, reactEntries);
|
|
202534
202898
|
});
|
|
@@ -202539,7 +202903,7 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202539
202903
|
const { getDevVendorPaths: getDevVendorPaths2 } = await Promise.resolve().then(() => exports_devVendorPaths);
|
|
202540
202904
|
const { rewriteReactImports: rewriteReactImports2 } = await Promise.resolve().then(() => (init_rewriteReactImports(), exports_rewriteReactImports));
|
|
202541
202905
|
const clientRoot = await computeClientRoot(state.resolvedPaths);
|
|
202542
|
-
const refreshEntry =
|
|
202906
|
+
const refreshEntry = resolve19(reactIndexesPath, "_refresh.tsx");
|
|
202543
202907
|
if (!reactEntries.includes(refreshEntry)) {
|
|
202544
202908
|
reactEntries.push(refreshEntry);
|
|
202545
202909
|
}
|
|
@@ -202551,7 +202915,7 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202551
202915
|
setDevVendorPaths2(vendorPaths);
|
|
202552
202916
|
}
|
|
202553
202917
|
const { rmSync: rmSync2 } = await import("fs");
|
|
202554
|
-
rmSync2(
|
|
202918
|
+
rmSync2(resolve19(buildDir, "react", "indexes"), {
|
|
202555
202919
|
force: true,
|
|
202556
202920
|
recursive: true
|
|
202557
202921
|
});
|
|
@@ -202577,11 +202941,51 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202577
202941
|
const clientManifest = generateManifest2(clientResult.outputs, buildDir);
|
|
202578
202942
|
Object.assign(state.manifest, clientManifest);
|
|
202579
202943
|
await populateAssetStore(state.assetStore, clientManifest, buildDir);
|
|
202944
|
+
}, getReactModule = async (pageFile) => {
|
|
202945
|
+
const { invalidateModule: invalidateModule2, warmCache: warmCache2, SRC_URL_PREFIX: SRC_URL_PREFIX2 } = await Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
|
|
202946
|
+
const { getTransformed: getTransformed2 } = await Promise.resolve().then(() => (init_transformCache(), exports_transformCache));
|
|
202947
|
+
invalidateModule2(pageFile);
|
|
202948
|
+
const rel = relative8(process.cwd(), pageFile).replace(/\\/g, "/");
|
|
202949
|
+
const url = `${SRC_URL_PREFIX2}${rel}`;
|
|
202950
|
+
warmCache2(url);
|
|
202951
|
+
const code = getTransformed2(resolve19(pageFile));
|
|
202952
|
+
return { code, url };
|
|
202580
202953
|
}, handleReactFastPath = async (state, config, filesToRebuild, startTime, onRebuildComplete) => {
|
|
202581
202954
|
const reactDir = config.reactDirectory ?? "";
|
|
202582
|
-
const reactPagesPath =
|
|
202583
|
-
const reactIndexesPath =
|
|
202955
|
+
const reactPagesPath = resolve19(reactDir, "pages");
|
|
202956
|
+
const reactIndexesPath = resolve19(reactDir, "indexes");
|
|
202584
202957
|
const { buildDir } = state.resolvedPaths;
|
|
202958
|
+
const reactFiles = filesToRebuild.filter((file3) => detectFramework(file3, state.resolvedPaths) === "react");
|
|
202959
|
+
if (reactFiles.length > 0) {
|
|
202960
|
+
const [changedFile] = reactFiles;
|
|
202961
|
+
if (changedFile) {
|
|
202962
|
+
const { code, url } = await getReactModule(changedFile);
|
|
202963
|
+
if (url) {
|
|
202964
|
+
const serverDuration = Date.now() - startTime;
|
|
202965
|
+
state.lastHmrPath = changedFile;
|
|
202966
|
+
state.lastHmrFramework = "react";
|
|
202967
|
+
broadcastToClients(state, {
|
|
202968
|
+
data: {
|
|
202969
|
+
code,
|
|
202970
|
+
framework: "react",
|
|
202971
|
+
hasComponentChanges: true,
|
|
202972
|
+
hasCSSChanges: false,
|
|
202973
|
+
manifest: state.manifest,
|
|
202974
|
+
pageModuleUrl: url,
|
|
202975
|
+
primarySource: changedFile,
|
|
202976
|
+
serverDuration,
|
|
202977
|
+
sourceFiles: reactFiles
|
|
202978
|
+
},
|
|
202979
|
+
type: "react-update"
|
|
202980
|
+
});
|
|
202981
|
+
onRebuildComplete({
|
|
202982
|
+
hmrState: state,
|
|
202983
|
+
manifest: state.manifest
|
|
202984
|
+
});
|
|
202985
|
+
return state.manifest;
|
|
202986
|
+
}
|
|
202987
|
+
}
|
|
202988
|
+
}
|
|
202585
202989
|
const { generateReactIndexFiles: generateReactIndexFiles2 } = await Promise.resolve().then(() => (init_generateReactIndexes(), exports_generateReactIndexes));
|
|
202586
202990
|
await generateReactIndexFiles2(reactPagesPath, reactIndexesPath, true);
|
|
202587
202991
|
const reactEntries = collectReactEntries(state, filesToRebuild, reactPagesPath, reactIndexesPath);
|
|
@@ -202591,7 +202995,6 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202591
202995
|
await rm6(reactIndexesPath, { force: true, recursive: true });
|
|
202592
202996
|
const { manifest } = state;
|
|
202593
202997
|
const duration = Date.now() - startTime;
|
|
202594
|
-
const reactFiles = filesToRebuild.filter((file3) => detectFramework(file3, state.resolvedPaths) === "react");
|
|
202595
202998
|
const reactPageFiles = reactFiles.filter((file3) => file3.replace(/\\/g, "/").includes("/pages/"));
|
|
202596
202999
|
const sourceFiles = reactPageFiles.length > 0 ? reactPageFiles : reactFiles;
|
|
202597
203000
|
logHmrUpdate(sourceFiles[0] ?? reactFiles[0] ?? "", "react", duration);
|
|
@@ -202626,7 +203029,7 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202626
203029
|
}, handleSvelteFastPath = async (state, config, filesToRebuild, startTime, onRebuildComplete) => {
|
|
202627
203030
|
const svelteDir = config.svelteDirectory ?? "";
|
|
202628
203031
|
const { buildDir } = state.resolvedPaths;
|
|
202629
|
-
const svelteFiles = filesToRebuild.filter((file3) => file3.endsWith(".svelte") &&
|
|
203032
|
+
const svelteFiles = filesToRebuild.filter((file3) => file3.endsWith(".svelte") && resolve19(file3).startsWith(resolve19(svelteDir, "pages")));
|
|
202630
203033
|
if (svelteFiles.length > 0) {
|
|
202631
203034
|
const { compileSvelte: compileSvelte2 } = await Promise.resolve().then(() => (init_compileSvelte(), exports_compileSvelte));
|
|
202632
203035
|
const { build: bunBuild5 } = await Promise.resolve(globalThis.Bun);
|
|
@@ -202634,8 +203037,8 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202634
203037
|
const { svelteServerPaths, svelteIndexPaths, svelteClientPaths } = await compileSvelte2(svelteFiles, svelteDir, new Map, true);
|
|
202635
203038
|
const serverEntries = [...svelteServerPaths];
|
|
202636
203039
|
const clientEntries = [...svelteIndexPaths, ...svelteClientPaths];
|
|
202637
|
-
const serverRoot =
|
|
202638
|
-
const serverOutDir =
|
|
203040
|
+
const serverRoot = resolve19(svelteDir, "server");
|
|
203041
|
+
const serverOutDir = resolve19(buildDir, basename7(svelteDir));
|
|
202639
203042
|
const [serverResult, clientResult] = await Promise.all([
|
|
202640
203043
|
serverEntries.length > 0 ? bunBuild5({
|
|
202641
203044
|
entrypoints: serverEntries,
|
|
@@ -202661,15 +203064,15 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202661
203064
|
await handleClientManifestUpdate(state, clientResult, buildDir);
|
|
202662
203065
|
}
|
|
202663
203066
|
await Promise.all([
|
|
202664
|
-
rm6(
|
|
203067
|
+
rm6(resolve19(svelteDir, "client"), {
|
|
202665
203068
|
force: true,
|
|
202666
203069
|
recursive: true
|
|
202667
203070
|
}),
|
|
202668
|
-
rm6(
|
|
203071
|
+
rm6(resolve19(svelteDir, "indexes"), {
|
|
202669
203072
|
force: true,
|
|
202670
203073
|
recursive: true
|
|
202671
203074
|
}),
|
|
202672
|
-
rm6(
|
|
203075
|
+
rm6(resolve19(svelteDir, "server"), {
|
|
202673
203076
|
force: true,
|
|
202674
203077
|
recursive: true
|
|
202675
203078
|
})
|
|
@@ -202702,7 +203105,7 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202702
203105
|
}, handleVueFastPath = async (state, config, filesToRebuild, startTime, onRebuildComplete) => {
|
|
202703
203106
|
const vueDir = config.vueDirectory ?? "";
|
|
202704
203107
|
const { buildDir } = state.resolvedPaths;
|
|
202705
|
-
const vueFiles = filesToRebuild.filter((file3) => file3.endsWith(".vue") &&
|
|
203108
|
+
const vueFiles = filesToRebuild.filter((file3) => file3.endsWith(".vue") && resolve19(file3).startsWith(resolve19(vueDir, "pages")));
|
|
202706
203109
|
if (vueFiles.length > 0) {
|
|
202707
203110
|
const { compileVue: compileVue2 } = await Promise.resolve().then(() => (init_compileVue(), exports_compileVue));
|
|
202708
203111
|
const { build: bunBuild5 } = await Promise.resolve(globalThis.Bun);
|
|
@@ -202710,8 +203113,8 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202710
203113
|
const { vueServerPaths, vueIndexPaths, vueClientPaths } = await compileVue2(vueFiles, vueDir, true);
|
|
202711
203114
|
const serverEntries = [...vueServerPaths];
|
|
202712
203115
|
const clientEntries = [...vueIndexPaths, ...vueClientPaths];
|
|
202713
|
-
const serverRoot =
|
|
202714
|
-
const serverOutDir =
|
|
203116
|
+
const serverRoot = resolve19(vueDir, "server");
|
|
203117
|
+
const serverOutDir = resolve19(buildDir, basename7(vueDir));
|
|
202715
203118
|
const vueFeatureFlags2 = {
|
|
202716
203119
|
__VUE_OPTIONS_API__: "true",
|
|
202717
203120
|
__VUE_PROD_DEVTOOLS__: "true",
|
|
@@ -202743,19 +203146,19 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202743
203146
|
await handleClientManifestUpdate(state, clientResult, buildDir);
|
|
202744
203147
|
}
|
|
202745
203148
|
await Promise.all([
|
|
202746
|
-
rm6(
|
|
203149
|
+
rm6(resolve19(vueDir, "client"), {
|
|
202747
203150
|
force: true,
|
|
202748
203151
|
recursive: true
|
|
202749
203152
|
}),
|
|
202750
|
-
rm6(
|
|
203153
|
+
rm6(resolve19(vueDir, "indexes"), {
|
|
202751
203154
|
force: true,
|
|
202752
203155
|
recursive: true
|
|
202753
203156
|
}),
|
|
202754
|
-
rm6(
|
|
203157
|
+
rm6(resolve19(vueDir, "server"), {
|
|
202755
203158
|
force: true,
|
|
202756
203159
|
recursive: true
|
|
202757
203160
|
}),
|
|
202758
|
-
rm6(
|
|
203161
|
+
rm6(resolve19(vueDir, "compiled"), {
|
|
202759
203162
|
force: true,
|
|
202760
203163
|
recursive: true
|
|
202761
203164
|
})
|
|
@@ -202770,7 +203173,7 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202770
203173
|
const cssKey = `${pascalName}CSS`;
|
|
202771
203174
|
const cssUrl = manifest[cssKey] || null;
|
|
202772
203175
|
const vueRoot = config.vueDirectory;
|
|
202773
|
-
const hmrId = vueRoot ?
|
|
203176
|
+
const hmrId = vueRoot ? relative8(vueRoot, vuePagePath).replace(/\\/g, "/").replace(/\.vue$/, "") : baseName;
|
|
202774
203177
|
logHmrUpdate(vuePagePath, "vue", duration);
|
|
202775
203178
|
broadcastToClients(state, {
|
|
202776
203179
|
data: {
|
|
@@ -202875,10 +203278,10 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202875
203278
|
}, computeOutputPagesDir = (state, config, framework) => {
|
|
202876
203279
|
const isSingle = !config.reactDirectory && !config.svelteDirectory && !config.vueDirectory && (framework === "html" ? !config.htmxDirectory : !config.htmlDirectory);
|
|
202877
203280
|
if (isSingle) {
|
|
202878
|
-
return
|
|
203281
|
+
return resolve19(state.resolvedPaths.buildDir, "pages");
|
|
202879
203282
|
}
|
|
202880
203283
|
const dirName = framework === "html" ? basename7(config.htmlDirectory ?? "html") : basename7(config.htmxDirectory ?? "htmx");
|
|
202881
|
-
return
|
|
203284
|
+
return resolve19(state.resolvedPaths.buildDir, dirName, "pages");
|
|
202882
203285
|
}, processHtmlPageUpdate = async (state, pageFile, builtHtmlPagePath, manifest, duration) => {
|
|
202883
203286
|
try {
|
|
202884
203287
|
const { handleHTMLUpdate: handleHTMLUpdate2 } = await Promise.resolve().then(() => (init_simpleHTMLHMR(), exports_simpleHTMLHMR));
|
|
@@ -202914,7 +203317,7 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202914
203317
|
const outputHtmlPages = computeOutputPagesDir(state, config, "html");
|
|
202915
203318
|
for (const pageFile of htmlPageFiles) {
|
|
202916
203319
|
const htmlPageName = basename7(pageFile);
|
|
202917
|
-
const builtHtmlPagePath =
|
|
203320
|
+
const builtHtmlPagePath = resolve19(outputHtmlPages, htmlPageName);
|
|
202918
203321
|
await processHtmlPageUpdate(state, pageFile, builtHtmlPagePath, manifest, duration);
|
|
202919
203322
|
}
|
|
202920
203323
|
}, handleVueCssOnlyUpdate = (state, vueCssFiles, manifest, duration) => {
|
|
@@ -202975,11 +203378,11 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202975
203378
|
const baseName = fileName.replace(/\.vue$/, "");
|
|
202976
203379
|
const pascalName = toPascal(baseName);
|
|
202977
203380
|
const vueRoot = config.vueDirectory;
|
|
202978
|
-
const hmrId = vueRoot ?
|
|
203381
|
+
const hmrId = vueRoot ? relative8(vueRoot, vuePagePath).replace(/\\/g, "/").replace(/\.vue$/, "") : baseName;
|
|
202979
203382
|
const cssKey = `${pascalName}CSS`;
|
|
202980
203383
|
const cssUrl = manifest[cssKey] || null;
|
|
202981
203384
|
const { vueHmrMetadata: vueHmrMetadata2 } = await Promise.resolve().then(() => (init_compileVue(), exports_compileVue));
|
|
202982
|
-
const hmrMeta = vueHmrMetadata2.get(
|
|
203385
|
+
const hmrMeta = vueHmrMetadata2.get(resolve19(vuePagePath));
|
|
202983
203386
|
const changeType = hmrMeta?.changeType ?? "full";
|
|
202984
203387
|
if (changeType === "style-only") {
|
|
202985
203388
|
broadcastVueStyleOnly(state, vuePagePath, baseName, cssUrl, hmrId, manifest, duration);
|
|
@@ -203213,7 +203616,7 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
203213
203616
|
const outputHtmxPages = computeOutputPagesDir(state, config, "htmx");
|
|
203214
203617
|
for (const htmxPageFile of htmxPageFiles) {
|
|
203215
203618
|
const htmxPageName = basename7(htmxPageFile);
|
|
203216
|
-
const builtHtmxPagePath =
|
|
203619
|
+
const builtHtmxPagePath = resolve19(outputHtmxPages, htmxPageName);
|
|
203217
203620
|
await processHtmxPageUpdate(state, htmxPageFile, builtHtmxPagePath, manifest, duration);
|
|
203218
203621
|
}
|
|
203219
203622
|
}, collectUpdatedModulePaths = (allModuleUpdates) => {
|
|
@@ -203425,14 +203828,155 @@ var init_rebuildTrigger = __esm(() => {
|
|
|
203425
203828
|
init_pageHandler();
|
|
203426
203829
|
});
|
|
203427
203830
|
|
|
203831
|
+
// src/build/buildDepVendor.ts
|
|
203832
|
+
var exports_buildDepVendor = {};
|
|
203833
|
+
__export(exports_buildDepVendor, {
|
|
203834
|
+
computeDepVendorPaths: () => computeDepVendorPaths,
|
|
203835
|
+
buildDepVendor: () => buildDepVendor
|
|
203836
|
+
});
|
|
203837
|
+
import { mkdirSync as mkdirSync7 } from "fs";
|
|
203838
|
+
import { join as join14 } from "path";
|
|
203839
|
+
import { rm as rm7 } from "fs/promises";
|
|
203840
|
+
var {build: bunBuild5, Glob: Glob6 } = globalThis.Bun;
|
|
203841
|
+
var toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_").replace(/@/g, "").replace(/-/g, "_"), isResolvable2 = (specifier) => {
|
|
203842
|
+
try {
|
|
203843
|
+
__require.resolve(specifier);
|
|
203844
|
+
return true;
|
|
203845
|
+
} catch {
|
|
203846
|
+
return false;
|
|
203847
|
+
}
|
|
203848
|
+
}, isBareSpecifier = (spec) => !spec.startsWith(".") && !spec.startsWith("/") && !spec.startsWith("@src/"), FRAMEWORK_SPECIFIERS, scanBareImports = async (directories) => {
|
|
203849
|
+
const specifiers = new Set;
|
|
203850
|
+
const transpiler3 = new Bun.Transpiler({ loader: "tsx" });
|
|
203851
|
+
for (const dir of directories) {
|
|
203852
|
+
const glob = new Glob6("**/*.{ts,tsx,js,jsx}");
|
|
203853
|
+
try {
|
|
203854
|
+
for await (const file3 of glob.scan({
|
|
203855
|
+
absolute: true,
|
|
203856
|
+
cwd: dir
|
|
203857
|
+
})) {
|
|
203858
|
+
if (file3.includes("node_modules"))
|
|
203859
|
+
continue;
|
|
203860
|
+
if (file3.includes("/build/"))
|
|
203861
|
+
continue;
|
|
203862
|
+
if (file3.includes("/dist/"))
|
|
203863
|
+
continue;
|
|
203864
|
+
if (file3.includes("/indexes/"))
|
|
203865
|
+
continue;
|
|
203866
|
+
try {
|
|
203867
|
+
const content = await Bun.file(file3).text();
|
|
203868
|
+
const imports = transpiler3.scanImports(content);
|
|
203869
|
+
for (const imp of imports) {
|
|
203870
|
+
if (isBareSpecifier(imp.path) && !FRAMEWORK_SPECIFIERS.has(imp.path)) {
|
|
203871
|
+
specifiers.add(imp.path);
|
|
203872
|
+
}
|
|
203873
|
+
}
|
|
203874
|
+
} catch {}
|
|
203875
|
+
}
|
|
203876
|
+
} catch {}
|
|
203877
|
+
}
|
|
203878
|
+
return Array.from(specifiers).filter(isResolvable2);
|
|
203879
|
+
}, generateEntrySource2 = (specifier) => `export * from '${specifier}';
|
|
203880
|
+
`, computeDepVendorPaths = async (directories) => {
|
|
203881
|
+
const specifiers = await scanBareImports(directories);
|
|
203882
|
+
const paths = {};
|
|
203883
|
+
for (const specifier of specifiers) {
|
|
203884
|
+
paths[specifier] = `/vendor/${toSafeFileName3(specifier)}.js`;
|
|
203885
|
+
}
|
|
203886
|
+
return paths;
|
|
203887
|
+
}, buildDepVendor = async (buildDir, directories) => {
|
|
203888
|
+
const specifiers = await scanBareImports(directories);
|
|
203889
|
+
if (specifiers.length === 0)
|
|
203890
|
+
return {};
|
|
203891
|
+
const vendorDir = join14(buildDir, "vendor");
|
|
203892
|
+
mkdirSync7(vendorDir, { recursive: true });
|
|
203893
|
+
const tmpDir = join14(buildDir, "_dep_vendor_tmp");
|
|
203894
|
+
mkdirSync7(tmpDir, { recursive: true });
|
|
203895
|
+
const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
|
|
203896
|
+
const safeName = toSafeFileName3(specifier);
|
|
203897
|
+
const entryPath = join14(tmpDir, `${safeName}.ts`);
|
|
203898
|
+
const source = await generateEntrySource2(specifier);
|
|
203899
|
+
await Bun.write(entryPath, source);
|
|
203900
|
+
return entryPath;
|
|
203901
|
+
}));
|
|
203902
|
+
const result = await bunBuild5({
|
|
203903
|
+
entrypoints,
|
|
203904
|
+
external: [...FRAMEWORK_SPECIFIERS],
|
|
203905
|
+
format: "esm",
|
|
203906
|
+
minify: false,
|
|
203907
|
+
naming: "[name].[ext]",
|
|
203908
|
+
outdir: vendorDir,
|
|
203909
|
+
splitting: true,
|
|
203910
|
+
target: "browser",
|
|
203911
|
+
throw: false
|
|
203912
|
+
});
|
|
203913
|
+
await rm7(tmpDir, { force: true, recursive: true });
|
|
203914
|
+
if (result.success) {
|
|
203915
|
+
const { readdirSync: readdirSync2, readFileSync: readFileSync10, writeFileSync: writeFileSync5 } = await import("fs");
|
|
203916
|
+
const { computeVendorPaths: computeVendorPaths2 } = await Promise.resolve().then(() => (init_buildReactVendor(), exports_buildReactVendor));
|
|
203917
|
+
const reactPaths = computeVendorPaths2();
|
|
203918
|
+
const files = readdirSync2(vendorDir).filter((f) => f.endsWith(".js"));
|
|
203919
|
+
for (const file3 of files) {
|
|
203920
|
+
const filePath = join14(vendorDir, file3);
|
|
203921
|
+
let content = readFileSync10(filePath, "utf-8");
|
|
203922
|
+
let changed = false;
|
|
203923
|
+
for (const [specifier, webPath] of Object.entries(reactPaths)) {
|
|
203924
|
+
const escaped = specifier.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
203925
|
+
const re = new RegExp(`(from\\s*["'])${escaped}(["'])`, "g");
|
|
203926
|
+
const newContent = content.replace(re, `$1${webPath}$2`);
|
|
203927
|
+
if (newContent !== content) {
|
|
203928
|
+
content = newContent;
|
|
203929
|
+
changed = true;
|
|
203930
|
+
}
|
|
203931
|
+
}
|
|
203932
|
+
if (changed) {
|
|
203933
|
+
writeFileSync5(filePath, content);
|
|
203934
|
+
}
|
|
203935
|
+
}
|
|
203936
|
+
}
|
|
203937
|
+
if (!result.success) {
|
|
203938
|
+
console.warn("\u26A0\uFE0F Dependency vendor build had errors:", result.logs);
|
|
203939
|
+
}
|
|
203940
|
+
const paths = {};
|
|
203941
|
+
for (const specifier of specifiers) {
|
|
203942
|
+
paths[specifier] = `/vendor/${toSafeFileName3(specifier)}.js`;
|
|
203943
|
+
}
|
|
203944
|
+
return paths;
|
|
203945
|
+
};
|
|
203946
|
+
var init_buildDepVendor = __esm(() => {
|
|
203947
|
+
FRAMEWORK_SPECIFIERS = new Set([
|
|
203948
|
+
"react",
|
|
203949
|
+
"react-dom",
|
|
203950
|
+
"react-dom/client",
|
|
203951
|
+
"react-dom/server",
|
|
203952
|
+
"react/jsx-runtime",
|
|
203953
|
+
"react/jsx-dev-runtime",
|
|
203954
|
+
"react-refresh/runtime",
|
|
203955
|
+
"svelte",
|
|
203956
|
+
"svelte/internal",
|
|
203957
|
+
"svelte/internal/client",
|
|
203958
|
+
"svelte/server",
|
|
203959
|
+
"svelte/compiler",
|
|
203960
|
+
"vue",
|
|
203961
|
+
"vue/server-renderer",
|
|
203962
|
+
"@vue/compiler-sfc",
|
|
203963
|
+
"@angular/core",
|
|
203964
|
+
"@angular/common",
|
|
203965
|
+
"@angular/compiler",
|
|
203966
|
+
"@angular/platform-browser",
|
|
203967
|
+
"@angular/platform-server",
|
|
203968
|
+
"@angular/ssr"
|
|
203969
|
+
]);
|
|
203970
|
+
});
|
|
203971
|
+
|
|
203428
203972
|
// src/core/devBuild.ts
|
|
203429
203973
|
var exports_devBuild = {};
|
|
203430
203974
|
__export(exports_devBuild, {
|
|
203431
203975
|
devBuild: () => devBuild
|
|
203432
203976
|
});
|
|
203433
203977
|
import { readdir as readdir3 } from "fs/promises";
|
|
203434
|
-
import { statSync } from "fs";
|
|
203435
|
-
import { resolve as
|
|
203978
|
+
import { statSync as statSync3 } from "fs";
|
|
203979
|
+
import { resolve as resolve20 } from "path";
|
|
203436
203980
|
var FRAMEWORK_DIR_KEYS, parseDirectoryConfig = (source) => {
|
|
203437
203981
|
const config = {};
|
|
203438
203982
|
const dirPattern = /(\w+Directory)\s*:\s*['"]([^'"]+)['"]/g;
|
|
@@ -203445,7 +203989,7 @@ var FRAMEWORK_DIR_KEYS, parseDirectoryConfig = (source) => {
|
|
|
203445
203989
|
return Object.keys(config).length > 0 ? config : null;
|
|
203446
203990
|
}, reloadConfig = async () => {
|
|
203447
203991
|
try {
|
|
203448
|
-
const configPath2 =
|
|
203992
|
+
const configPath2 = resolve20(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
|
|
203449
203993
|
const source = await Bun.file(configPath2).text();
|
|
203450
203994
|
return parseDirectoryConfig(source);
|
|
203451
203995
|
} catch {
|
|
@@ -203518,7 +204062,7 @@ var FRAMEWORK_DIR_KEYS, parseDirectoryConfig = (source) => {
|
|
|
203518
204062
|
state.fileChangeQueue.clear();
|
|
203519
204063
|
}
|
|
203520
204064
|
}, handleCachedReload = async () => {
|
|
203521
|
-
const serverMtime =
|
|
204065
|
+
const serverMtime = statSync3(resolve20(Bun.main)).mtimeMs;
|
|
203522
204066
|
const lastMtime = globalThis.__hmrServerMtime;
|
|
203523
204067
|
globalThis.__hmrServerMtime = serverMtime;
|
|
203524
204068
|
const cached = globalThis.__hmrDevResult;
|
|
@@ -203546,8 +204090,8 @@ var FRAMEWORK_DIR_KEYS, parseDirectoryConfig = (source) => {
|
|
|
203546
204090
|
return true;
|
|
203547
204091
|
}, resolveAbsoluteVersion2 = async () => {
|
|
203548
204092
|
const candidates = [
|
|
203549
|
-
|
|
203550
|
-
|
|
204093
|
+
resolve20(import.meta.dir, "..", "..", "package.json"),
|
|
204094
|
+
resolve20(import.meta.dir, "..", "package.json")
|
|
203551
204095
|
];
|
|
203552
204096
|
for (const candidate of candidates) {
|
|
203553
204097
|
const found = await tryReadPackageVersion(candidate);
|
|
@@ -203560,7 +204104,7 @@ var FRAMEWORK_DIR_KEYS, parseDirectoryConfig = (source) => {
|
|
|
203560
204104
|
const entries = await readdir3(vendorDir).catch(() => emptyStringArray);
|
|
203561
204105
|
await Promise.all(entries.map(async (entry) => {
|
|
203562
204106
|
const webPath = `/${framework}/vendor/${entry}`;
|
|
203563
|
-
const bytes = await Bun.file(
|
|
204107
|
+
const bytes = await Bun.file(resolve20(vendorDir, entry)).bytes();
|
|
203564
204108
|
assetStore.set(webPath, bytes);
|
|
203565
204109
|
}));
|
|
203566
204110
|
}, devBuild = async (config) => {
|
|
@@ -203594,7 +204138,7 @@ var FRAMEWORK_DIR_KEYS, parseDirectoryConfig = (source) => {
|
|
|
203594
204138
|
await populateAssetStore(state.assetStore, manifest ?? {}, state.resolvedPaths.buildDir);
|
|
203595
204139
|
cleanStaleAssets(state.assetStore, manifest ?? {}, state.resolvedPaths.buildDir);
|
|
203596
204140
|
const buildReactVendorTask = config.reactDirectory ? buildReactVendor(state.resolvedPaths.buildDir).then(async () => {
|
|
203597
|
-
const vendorDir =
|
|
204141
|
+
const vendorDir = resolve20(state.resolvedPaths.buildDir, "react", "vendor");
|
|
203598
204142
|
await loadVendorFiles(state.assetStore, vendorDir, "react");
|
|
203599
204143
|
if (!globalThis.__reactModuleRef) {
|
|
203600
204144
|
globalThis.__reactModuleRef = await import("react");
|
|
@@ -203602,11 +204146,30 @@ var FRAMEWORK_DIR_KEYS, parseDirectoryConfig = (source) => {
|
|
|
203602
204146
|
return true;
|
|
203603
204147
|
}) : undefined;
|
|
203604
204148
|
const buildAngularVendorTask = config.angularDirectory ? buildAngularVendor(state.resolvedPaths.buildDir).then(async () => {
|
|
203605
|
-
const vendorDir =
|
|
204149
|
+
const vendorDir = resolve20(state.resolvedPaths.buildDir, "angular", "vendor");
|
|
203606
204150
|
await loadVendorFiles(state.assetStore, vendorDir, "angular");
|
|
203607
204151
|
return true;
|
|
203608
204152
|
}) : undefined;
|
|
203609
|
-
await Promise.
|
|
204153
|
+
const { buildDepVendor: buildDepVendor2 } = await Promise.resolve().then(() => (init_buildDepVendor(), exports_buildDepVendor));
|
|
204154
|
+
const sourceDirs = [
|
|
204155
|
+
config.reactDirectory,
|
|
204156
|
+
config.svelteDirectory,
|
|
204157
|
+
config.vueDirectory,
|
|
204158
|
+
config.angularDirectory,
|
|
204159
|
+
config.htmlDirectory,
|
|
204160
|
+
config.htmxDirectory
|
|
204161
|
+
].filter((dir) => Boolean(dir));
|
|
204162
|
+
const buildDepVendorTask = buildDepVendor2(state.resolvedPaths.buildDir, sourceDirs).then(async (depPaths) => {
|
|
204163
|
+
const vendorDir = resolve20(state.resolvedPaths.buildDir, "vendor");
|
|
204164
|
+
await loadVendorFiles(state.assetStore, vendorDir, "vendor");
|
|
204165
|
+
globalThis.__depVendorPaths = depPaths;
|
|
204166
|
+
return true;
|
|
204167
|
+
});
|
|
204168
|
+
await Promise.all([
|
|
204169
|
+
buildReactVendorTask,
|
|
204170
|
+
buildAngularVendorTask,
|
|
204171
|
+
buildDepVendorTask
|
|
204172
|
+
]);
|
|
203610
204173
|
state.manifest = manifest;
|
|
203611
204174
|
startFileWatching(state, config, (filePath) => {
|
|
203612
204175
|
queueFileChange(state, filePath, config, (newBuildResult) => {
|
|
@@ -203620,7 +204183,7 @@ var FRAMEWORK_DIR_KEYS, parseDirectoryConfig = (source) => {
|
|
|
203620
204183
|
manifest
|
|
203621
204184
|
};
|
|
203622
204185
|
globalThis.__hmrDevResult = result;
|
|
203623
|
-
globalThis.__hmrServerMtime =
|
|
204186
|
+
globalThis.__hmrServerMtime = statSync3(resolve20(Bun.main)).mtimeMs;
|
|
203624
204187
|
return result;
|
|
203625
204188
|
};
|
|
203626
204189
|
var init_devBuild = __esm(() => {
|
|
@@ -203653,5 +204216,5 @@ export {
|
|
|
203653
204216
|
build
|
|
203654
204217
|
};
|
|
203655
204218
|
|
|
203656
|
-
//# debugId=
|
|
204219
|
+
//# debugId=0F1F3A52AED0B75D64756E2164756E21
|
|
203657
204220
|
//# sourceMappingURL=build.js.map
|