@absolutejs/absolute 0.20.0-beta.179 → 0.20.0-beta.180
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/CHANGELOG.md +23 -0
- package/changelog.json +45 -0
- package/dist/angular/browser.js +2 -2
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +21 -6
- package/dist/angular/index.js.map +6 -6
- package/dist/angular/server.js +21 -6
- package/dist/angular/server.js.map +6 -6
- package/dist/build.js +5357 -4945
- package/dist/build.js.map +27 -24
- package/dist/cli/build-fntmf42w.js +495 -0
- package/dist/cli/{buildDepVendor-qvsh6dsj.js → buildDepVendor-qnwfct22.js} +5 -3
- package/dist/cli/buildReactServerComponents-fq6mw10d.js +13 -0
- package/dist/cli/{compile-p5yv6ecp.js → compile-54rb8szn.js} +94 -125
- package/dist/cli/config/server.js +10 -5
- package/dist/cli/{dev-2hbcsvkp.js → dev-6s6g5tnk.js} +13 -14
- package/dist/cli/{expoProject-1qtw97js.js → expoProject-acgfaj3f.js} +2 -1
- package/dist/cli/generatedDir-239r7csr.js +9 -0
- package/dist/cli/{index-cksezef8.js → index-0gd30trc.js} +105 -851
- package/dist/cli/index-2wvysvjc.js +40 -0
- package/dist/cli/index-42xjh6gg.js +282 -0
- package/dist/cli/{index-qw98g1p6.js → index-47e8fwha.js} +4 -1
- package/dist/cli/index-65kqn88a.js +8 -0
- package/dist/cli/{index-2bxfhs32.js → index-6f448d7m.js} +0 -26
- package/dist/cli/index-972xxwgj.js +16 -0
- package/dist/cli/index-aqe25w4h.js +39 -0
- package/dist/cli/index-assqancr.js +51 -0
- package/dist/cli/{index-2shf4aya.js → index-c8rcfe5a.js} +4 -6
- package/dist/cli/index-cba1cemz.js +8 -0
- package/dist/cli/{index-3ff5ztt3.js → index-djkrb7pc.js} +1 -7
- package/dist/cli/index-dkfwkpc8.js +138 -0
- package/dist/cli/{index-92g14j47.js → index-dw44xa4x.js} +2 -1
- package/dist/cli/index-evsnq0n2.js +17 -0
- package/dist/cli/index-fxwf3n2v.js +224 -0
- package/dist/cli/{index-zyd80s3h.js → index-js2hksgv.js} +21 -295
- package/dist/cli/{index-bp60baze.js → index-jyap0bhv.js} +1 -1
- package/dist/cli/{index-9dzdbbfc.js → index-kx2d067c.js} +8 -6
- package/dist/cli/index-pb31zan6.js +9 -0
- package/dist/cli/index-sq0478b0.js +281 -0
- package/dist/cli/index-va274tsf.js +7 -0
- package/dist/cli/{index-yd672jyq.js → index-w6xsk8cv.js} +4 -1
- package/dist/cli/index-w79snsxv.js +461 -0
- package/dist/cli/index-x1vvn549.js +835 -0
- package/dist/cli/index-xf9sfr8a.js +243 -0
- package/dist/cli/index-ycqdxy55.js +754 -0
- package/dist/cli/index-z74cqxz0.js +131 -0
- package/dist/cli/index.js +10 -9
- package/dist/cli/{islands-6zgb7501.js → islands-17tfx8jf.js} +6 -17
- package/dist/cli/{ls-0hfx323m.js → ls-0wr74w0b.js} +10 -58
- package/dist/cli/{mobile-93vaawcz.js → mobile-hpqpy61f.js} +11 -8
- package/dist/cli/{prerender-010z771p.js → prerender-w65xp6h8.js} +2 -1
- package/dist/cli/{rewriteImports-z6629aww.js → rewriteImports-np2d2kvc.js} +4 -11
- package/dist/cli/rewriteImportsPlugin-c6hcb3x6.js +12 -0
- package/dist/cli/{start-asxb79rc.js → start-mbn2zgs2.js} +6 -4
- package/dist/cli/staticAnalyzeSpaRoutes-2nev05m1.js +8 -0
- package/dist/cli/staticAnalyzeSpaRoutes-6vgzp0rs.js +8 -0
- package/dist/cli/staticAnalyzeSpaRoutes-f85q9dqk.js +8 -0
- package/dist/cli/staticAnalyzeSpaRoutes-yakmg22g.js +7 -0
- package/dist/cli/{typecheck-m2j4tkdk.js → typecheck-488txsfc.js} +92 -18
- package/dist/cli/vueCompiler-8bzdmf08.js +7 -0
- package/dist/client/chunks/{react-khr6ewhr.js → react-g8r290b8.js} +37 -2
- package/dist/client/chunks/react-g8r290b8.js.map +10 -0
- package/dist/client/chunks/vue-zcpmka32.js +85 -0
- package/dist/client/chunks/vue-zcpmka32.js.map +10 -0
- package/dist/client/index.js +58 -10
- package/dist/client/index.js.map +4 -4
- package/dist/dev/client/handlers/vue.ts +116 -0
- package/dist/index.js +2472 -2058
- package/dist/index.js.map +26 -23
- package/dist/islands/browser.js +2 -2
- package/dist/islands/browser.js.map +3 -3
- package/dist/islands/index.js +2 -2
- package/dist/islands/index.js.map +3 -3
- package/dist/react/browser.js +2 -2
- package/dist/react/browser.js.map +3 -3
- package/dist/react/index.js +42 -11
- package/dist/react/index.js.map +10 -10
- package/dist/react/server.js +42 -11
- package/dist/react/server.js.map +10 -10
- package/dist/src/angular/ssrRender.d.ts +2 -2
- package/dist/src/angular/staticAnalyzeSpaRoutes.d.ts +6 -1
- package/dist/src/build/generateManifest.d.ts +15 -0
- package/dist/src/build/manifestKeys.d.ts +22 -0
- package/dist/src/cli/add/dependencies.d.ts +1 -1
- package/dist/src/cli/scripts/typecheck.d.ts +11 -0
- package/dist/src/client/hydrators/react.d.ts +10 -0
- package/dist/src/client/hydrators/vue.d.ts +13 -0
- package/dist/src/client/islandRuntime.d.ts +1 -1
- package/dist/src/core/islandManifest.d.ts +4 -0
- package/dist/src/core/islandPageContext.d.ts +8 -2
- package/dist/src/core/lookup.d.ts +16 -1
- package/dist/src/dev/importCost/instrument.d.ts +1 -1
- package/dist/src/dev/manifestKeysRefresher.d.ts +6 -0
- package/dist/src/dev/spaRouteRefresh.d.ts +13 -0
- package/dist/src/mobile/androidConformance.d.ts +1 -1
- package/dist/src/react/staticAnalyzeSpaRoutes.d.ts +6 -1
- package/dist/src/svelte/staticAnalyzeSpaRoutes.d.ts +1 -0
- package/dist/src/utils/logger.d.ts +5 -0
- package/dist/src/utils/spaRouteManifest.d.ts +1 -0
- package/dist/src/vue/components/Image.d.ts +4 -4
- package/dist/src/vue/components/StreamSlot.d.ts +1 -1
- package/dist/src/vue/components/SuspenseSlot.d.ts +2 -2
- package/dist/src/vue/staticAnalyzeSpaRoutes.d.ts +4 -0
- package/dist/svelte/browser.js +2 -2
- package/dist/svelte/browser.js.map +3 -3
- package/dist/svelte/index.js +25 -9
- package/dist/svelte/index.js.map +8 -8
- package/dist/svelte/server.js +25 -9
- package/dist/svelte/server.js.map +8 -8
- package/dist/types/globals.d.ts +4 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/island.d.ts +1 -1
- package/dist/types/manifest.d.ts +25 -0
- package/dist/vue/browser.js +2 -2
- package/dist/vue/browser.js.map +3 -3
- package/dist/vue/index.js +21 -6
- package/dist/vue/index.js.map +6 -6
- package/dist/vue/server.js +21 -6
- package/dist/vue/server.js.map +6 -6
- package/package.json +1 -1
- package/dist/client/chunks/react-khr6ewhr.js.map +0 -10
- package/dist/client/chunks/vue-db6ppn1f.js +0 -32
- package/dist/client/chunks/vue-db6ppn1f.js.map +0 -10
|
@@ -6,20 +6,19 @@ import {
|
|
|
6
6
|
maskLiterals,
|
|
7
7
|
compileSpecifierRewriter,
|
|
8
8
|
rewriteContentSpecifiers
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-jyap0bhv.js";
|
|
10
10
|
import {
|
|
11
|
-
createIslandRegistryDefinitionPlugin,
|
|
12
|
-
createBunStringRawUnicodePlugin,
|
|
13
11
|
finalizeAbsoluteMobileCompatibilityBuild,
|
|
14
12
|
createAbsoluteMobileRouteMetadataPlugin,
|
|
15
13
|
createElysiaOpenApiTypeboxPlugin,
|
|
16
14
|
createOptionalPeerPlugin,
|
|
17
15
|
resolveServerBundleExternals
|
|
18
|
-
} from "./index-
|
|
16
|
+
} from "./index-js2hksgv.js";
|
|
19
17
|
import {
|
|
20
18
|
normalizeAbsoluteMobileConfig2
|
|
21
19
|
} from "./index-t7yf3vxs.js";
|
|
22
|
-
import"./index-
|
|
20
|
+
import"./index-ycqdxy55.js";
|
|
21
|
+
import"./index-0gd30trc.js";
|
|
23
22
|
import {
|
|
24
23
|
ABSOLUTE_NATIVE_AUTH_CLIENTS_ENV2,
|
|
25
24
|
installAbsoluteMobileAuthEnvironment2
|
|
@@ -32,7 +31,8 @@ import {
|
|
|
32
31
|
} from "./index-t8jmj8w1.js";
|
|
33
32
|
import {
|
|
34
33
|
prerenderWithServer2
|
|
35
|
-
} from "./index-
|
|
34
|
+
} from "./index-6f448d7m.js";
|
|
35
|
+
import"./index-aqe25w4h.js";
|
|
36
36
|
import {
|
|
37
37
|
withBuildDirectoryLock
|
|
38
38
|
} from "./index-1ewba8ye.js";
|
|
@@ -40,12 +40,19 @@ import {
|
|
|
40
40
|
loadConfig
|
|
41
41
|
} from "./index-wk0pyxrg.js";
|
|
42
42
|
import"./index-43a1vvb7.js";
|
|
43
|
+
import {
|
|
44
|
+
createExternalAssetPlugin
|
|
45
|
+
} from "./index-2wvysvjc.js";
|
|
43
46
|
import {
|
|
44
47
|
isRecord
|
|
45
48
|
} from "./index-tx0kx9zx.js";
|
|
49
|
+
import {
|
|
50
|
+
createIslandRegistryDefinitionPlugin,
|
|
51
|
+
createBunStringRawUnicodePlugin
|
|
52
|
+
} from "./index-42xjh6gg.js";
|
|
46
53
|
import {
|
|
47
54
|
loadIslandRegistryBuildInfo
|
|
48
|
-
} from "./index-
|
|
55
|
+
} from "./index-w6xsk8cv.js";
|
|
49
56
|
import {
|
|
50
57
|
stripStringsAndComments
|
|
51
58
|
} from "./index-prs14ys9.js";
|
|
@@ -245,64 +252,26 @@ var prepareCompiledClientGraph = (directory, serverBundle, publicDirectory) => {
|
|
|
245
252
|
return id;
|
|
246
253
|
};
|
|
247
254
|
|
|
248
|
-
// src/build/externalAssetPlugin.ts
|
|
249
|
-
import { copyFileSync, existsSync as existsSync2, mkdirSync as mkdirSync2, statSync } from "fs";
|
|
250
|
-
import { basename, dirname as dirname2, join as join2, resolve as resolve2 } from "path";
|
|
251
|
-
var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
|
|
252
|
-
name: "absolute-external-asset",
|
|
253
|
-
setup(bld) {
|
|
254
|
-
const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
|
|
255
|
-
const skipRoots = userSourceRoots.map((root) => resolve2(root));
|
|
256
|
-
const isUserSource = (path) => skipRoots.some((root) => path.startsWith(`${root}/`));
|
|
257
|
-
bld.onLoad({ filter: /\.[mc]?[jt]sx?$/ }, async (args) => {
|
|
258
|
-
if (isUserSource(args.path))
|
|
259
|
-
return;
|
|
260
|
-
const source = await Bun.file(args.path).text();
|
|
261
|
-
if (!source.includes("import.meta.url"))
|
|
262
|
-
return;
|
|
263
|
-
urlPattern.lastIndex = 0;
|
|
264
|
-
let match;
|
|
265
|
-
const sourceDir = dirname2(args.path);
|
|
266
|
-
while ((match = urlPattern.exec(source)) !== null) {
|
|
267
|
-
const relPath = match[1];
|
|
268
|
-
if (!relPath)
|
|
269
|
-
continue;
|
|
270
|
-
const assetPath = resolve2(sourceDir, relPath);
|
|
271
|
-
if (!existsSync2(assetPath))
|
|
272
|
-
continue;
|
|
273
|
-
if (!statSync(assetPath).isFile())
|
|
274
|
-
continue;
|
|
275
|
-
const targetPath = join2(outDir, basename(assetPath));
|
|
276
|
-
if (existsSync2(targetPath))
|
|
277
|
-
continue;
|
|
278
|
-
mkdirSync2(dirname2(targetPath), { recursive: true });
|
|
279
|
-
copyFileSync(assetPath, targetPath);
|
|
280
|
-
}
|
|
281
|
-
return;
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
});
|
|
285
|
-
|
|
286
255
|
// src/cli/scripts/compile.ts
|
|
287
256
|
import {
|
|
288
257
|
cpSync,
|
|
289
|
-
existsSync as
|
|
290
|
-
mkdirSync as
|
|
258
|
+
existsSync as existsSync2,
|
|
259
|
+
mkdirSync as mkdirSync2,
|
|
291
260
|
readdirSync as readdirSync2,
|
|
292
261
|
readFileSync as readFileSync2,
|
|
293
262
|
rmSync,
|
|
294
|
-
statSync
|
|
263
|
+
statSync,
|
|
295
264
|
unlinkSync,
|
|
296
265
|
writeFileSync as writeFileSync2
|
|
297
266
|
} from "fs";
|
|
298
267
|
import { createRequire } from "module";
|
|
299
268
|
import {
|
|
300
|
-
basename
|
|
301
|
-
dirname as
|
|
269
|
+
basename,
|
|
270
|
+
dirname as dirname2,
|
|
302
271
|
isAbsolute as isAbsolute2,
|
|
303
|
-
join as
|
|
272
|
+
join as join2,
|
|
304
273
|
relative as relative2,
|
|
305
|
-
resolve as
|
|
274
|
+
resolve as resolve2
|
|
306
275
|
} from "path";
|
|
307
276
|
var cliTag = (color, message) => `\x1B[2m${formatTimestamp2()}\x1B[0m ${color}[cli]\x1B[0m ${color}${message}\x1B[0m`;
|
|
308
277
|
var compileBanner = (version) => {
|
|
@@ -318,7 +287,7 @@ var collectFiles = (dir) => {
|
|
|
318
287
|
const entry = pending.pop();
|
|
319
288
|
if (!entry)
|
|
320
289
|
continue;
|
|
321
|
-
const fullPath =
|
|
290
|
+
const fullPath = join2(entry.parentPath, entry.name);
|
|
322
291
|
if (entry.isDirectory())
|
|
323
292
|
pending = pending.concat(readdirSync2(fullPath, { withFileTypes: true }));
|
|
324
293
|
else
|
|
@@ -339,7 +308,7 @@ var rebaseInlineSourceMap = (filePath) => {
|
|
|
339
308
|
if (!Array.isArray(map.sources))
|
|
340
309
|
return;
|
|
341
310
|
const sourceRoot = typeof map.sourceRoot === "string" ? map.sourceRoot : "";
|
|
342
|
-
const bundleDirectory =
|
|
311
|
+
const bundleDirectory = dirname2(filePath);
|
|
343
312
|
map.sources = map.sources.map((entry) => {
|
|
344
313
|
if (/^[A-Za-z][A-Za-z0-9+.-]*:/.test(entry))
|
|
345
314
|
return entry;
|
|
@@ -348,7 +317,7 @@ var rebaseInlineSourceMap = (filePath) => {
|
|
|
348
317
|
if (/^[A-Za-z][A-Za-z0-9+.-]*:/.test(sourceRoot)) {
|
|
349
318
|
return new URL(entry, sourceRoot).href;
|
|
350
319
|
}
|
|
351
|
-
return
|
|
320
|
+
return resolve2(bundleDirectory, sourceRoot, entry);
|
|
352
321
|
});
|
|
353
322
|
delete map.sourceRoot;
|
|
354
323
|
const rebased = Buffer.from(JSON.stringify(map)).toString("base64");
|
|
@@ -387,7 +356,7 @@ var collectProjectSourceFiles = (dir) => {
|
|
|
387
356
|
const entry = pending.pop();
|
|
388
357
|
if (!entry)
|
|
389
358
|
continue;
|
|
390
|
-
const fullPath =
|
|
359
|
+
const fullPath = join2(entry.parentPath, entry.name);
|
|
391
360
|
if (entry.isDirectory()) {
|
|
392
361
|
if (SERVER_RUNTIME_SCAN_SKIP_DIRS.has(entry.name))
|
|
393
362
|
continue;
|
|
@@ -400,18 +369,18 @@ var collectProjectSourceFiles = (dir) => {
|
|
|
400
369
|
};
|
|
401
370
|
var copyServerRuntimeAssetReferences = (outdir) => {
|
|
402
371
|
const copied = new Set;
|
|
403
|
-
const normalizedOutdir =
|
|
372
|
+
const normalizedOutdir = resolve2(outdir);
|
|
404
373
|
const copyReference = (filePath, relPath) => {
|
|
405
|
-
const assetSource =
|
|
406
|
-
if (!
|
|
374
|
+
const assetSource = resolve2(dirname2(filePath), relPath);
|
|
375
|
+
if (!existsSync2(assetSource) || !statSync(assetSource).isFile())
|
|
407
376
|
return;
|
|
408
|
-
const assetTarget =
|
|
377
|
+
const assetTarget = resolve2(normalizedOutdir, relPath.replace(/^\.\//, ""));
|
|
409
378
|
if (assetTarget !== normalizedOutdir && !assetTarget.startsWith(`${normalizedOutdir}/`))
|
|
410
379
|
return;
|
|
411
380
|
if (copied.has(assetTarget))
|
|
412
381
|
return;
|
|
413
382
|
copied.add(assetTarget);
|
|
414
|
-
|
|
383
|
+
mkdirSync2(dirname2(assetTarget), { recursive: true });
|
|
415
384
|
cpSync(assetSource, assetTarget, { force: true });
|
|
416
385
|
};
|
|
417
386
|
for (const filePath of collectProjectSourceFiles(process.cwd())) {
|
|
@@ -484,18 +453,18 @@ var resolveBuildModule = async (candidates) => {
|
|
|
484
453
|
};
|
|
485
454
|
var resolveJsxDevRuntimeCompatPath = () => {
|
|
486
455
|
const candidates = [
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
456
|
+
resolve2(import.meta.dir, "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
|
|
457
|
+
resolve2(import.meta.dir, "..", "..", "react", "jsxDevRuntimeCompat.js"),
|
|
458
|
+
resolve2(import.meta.dir, "..", "..", "react", "jsxDevRuntimeCompat.ts"),
|
|
459
|
+
resolve2(import.meta.dir, "..", "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
|
|
460
|
+
resolve2(import.meta.dir, "..", "..", "..", "react", "jsxDevRuntimeCompat.js"),
|
|
461
|
+
resolve2(import.meta.dir, "..", "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
|
|
493
462
|
];
|
|
494
463
|
for (const candidate of candidates) {
|
|
495
|
-
if (
|
|
464
|
+
if (existsSync2(candidate))
|
|
496
465
|
return candidate;
|
|
497
466
|
}
|
|
498
|
-
return
|
|
467
|
+
return resolve2(import.meta.dir, "..", "..", "react", "jsxDevRuntimeCompat.js");
|
|
499
468
|
};
|
|
500
469
|
var jsxDevRuntimeCompatPath = resolveJsxDevRuntimeCompatPath();
|
|
501
470
|
var shouldEmbedCompiledAsset = (relativePath, skip = new Set) => {
|
|
@@ -526,7 +495,7 @@ var resolveCompileNativeAssets = (buildConfig) => (buildConfig.compile?.nativeAs
|
|
|
526
495
|
var requireForCompile = createRequire(import.meta.url);
|
|
527
496
|
var resolveNativeAssetForRuntime = (specifier) => {
|
|
528
497
|
if (specifier.startsWith("."))
|
|
529
|
-
return
|
|
498
|
+
return resolve2(process.cwd(), specifier);
|
|
530
499
|
if (specifier.startsWith("/"))
|
|
531
500
|
return specifier;
|
|
532
501
|
return requireForCompile.resolve(specifier, { paths: [process.cwd()] });
|
|
@@ -540,12 +509,12 @@ var resolveCompileNativeAssetEnv = (buildConfig) => {
|
|
|
540
509
|
};
|
|
541
510
|
var tryReadNodePackageJson = (packageDir) => {
|
|
542
511
|
try {
|
|
543
|
-
return JSON.parse(readFileSync2(
|
|
512
|
+
return JSON.parse(readFileSync2(join2(packageDir, "package.json"), "utf-8"));
|
|
544
513
|
} catch {
|
|
545
514
|
return null;
|
|
546
515
|
}
|
|
547
516
|
};
|
|
548
|
-
var resolveProjectPackageDir = (specifier) =>
|
|
517
|
+
var resolveProjectPackageDir = (specifier) => resolve2(process.cwd(), "node_modules", ...specifier.split("/"));
|
|
549
518
|
var copyPackageToBuild = (specifier, outdir, seen) => {
|
|
550
519
|
if (seen.has(specifier))
|
|
551
520
|
return;
|
|
@@ -554,7 +523,7 @@ var copyPackageToBuild = (specifier, outdir, seen) => {
|
|
|
554
523
|
if (!pkg)
|
|
555
524
|
return;
|
|
556
525
|
seen.add(specifier);
|
|
557
|
-
const destDir =
|
|
526
|
+
const destDir = join2(outdir, "node_modules", ...specifier.split("/"));
|
|
558
527
|
rmSync(destDir, { force: true, recursive: true });
|
|
559
528
|
cpSync(srcDir, destDir, {
|
|
560
529
|
force: true,
|
|
@@ -577,8 +546,8 @@ var copyPackageToBuild = (specifier, outdir, seen) => {
|
|
|
577
546
|
var copyAngularRuntimePackages = (buildConfig, outdir) => {
|
|
578
547
|
if (!buildConfig.angularDirectory)
|
|
579
548
|
return;
|
|
580
|
-
const angularScopeDir =
|
|
581
|
-
const angularPackages =
|
|
549
|
+
const angularScopeDir = resolve2(process.cwd(), "node_modules", "@angular");
|
|
550
|
+
const angularPackages = existsSync2(angularScopeDir) ? readdirSync2(angularScopeDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).filter((entry) => entry.name !== "compiler-cli").map((entry) => `@angular/${entry.name}`) : [];
|
|
582
551
|
const roots = new Set([...angularPackages, "rxjs", "tslib", "typescript"]);
|
|
583
552
|
const seen = new Set;
|
|
584
553
|
for (const specifier of roots) {
|
|
@@ -598,15 +567,15 @@ var copyFrameworkRuntimePackages = (buildConfig, outdir) => {
|
|
|
598
567
|
copyChunkReferencedPackages(outdir, seen);
|
|
599
568
|
};
|
|
600
569
|
var collectRuntimePackageSpecifiers = (distDir) => {
|
|
601
|
-
const nodeModulesDir =
|
|
602
|
-
if (!
|
|
570
|
+
const nodeModulesDir = join2(distDir, "node_modules");
|
|
571
|
+
if (!existsSync2(nodeModulesDir))
|
|
603
572
|
return [];
|
|
604
573
|
const specifiers = [];
|
|
605
574
|
for (const entry of readdirSync2(nodeModulesDir, { withFileTypes: true })) {
|
|
606
575
|
if (!entry.isDirectory())
|
|
607
576
|
continue;
|
|
608
577
|
if (entry.name.startsWith("@")) {
|
|
609
|
-
const scopeDir =
|
|
578
|
+
const scopeDir = join2(nodeModulesDir, entry.name);
|
|
610
579
|
for (const scopedEntry of readdirSync2(scopeDir, {
|
|
611
580
|
withFileTypes: true
|
|
612
581
|
})) {
|
|
@@ -621,7 +590,7 @@ var collectRuntimePackageSpecifiers = (distDir) => {
|
|
|
621
590
|
return specifiers.sort((firstSpecifier, secondSpecifier) => secondSpecifier.length - firstSpecifier.length);
|
|
622
591
|
};
|
|
623
592
|
var ensureRelativeModuleSpecifier = (fromFile, toFile) => {
|
|
624
|
-
const rel = relative2(
|
|
593
|
+
const rel = relative2(dirname2(fromFile), toFile).replace(/\\/g, "/");
|
|
625
594
|
return rel.startsWith(".") ? rel : `./${rel}`;
|
|
626
595
|
};
|
|
627
596
|
var pickExportEntry = (value) => {
|
|
@@ -640,18 +609,18 @@ var resolvePackageEntryFile = (distDir, packageSpecifiers, specifier) => {
|
|
|
640
609
|
const packageSpecifier = packageSpecifiers.find((root) => specifier === root || specifier.startsWith(`${root}/`));
|
|
641
610
|
if (!packageSpecifier)
|
|
642
611
|
return null;
|
|
643
|
-
const packageDir =
|
|
612
|
+
const packageDir = join2(distDir, "node_modules", ...packageSpecifier.split("/"));
|
|
644
613
|
const subpath = specifier.slice(packageSpecifier.length);
|
|
645
|
-
const subPackageDir = subpath ?
|
|
646
|
-
const resolvedPackageDir = subPackageDir &&
|
|
647
|
-
const packageJsonPath =
|
|
648
|
-
if (!
|
|
614
|
+
const subPackageDir = subpath ? join2(packageDir, ...subpath.slice(1).split("/")) : null;
|
|
615
|
+
const resolvedPackageDir = subPackageDir && existsSync2(join2(subPackageDir, "package.json")) ? subPackageDir : packageDir;
|
|
616
|
+
const packageJsonPath = join2(resolvedPackageDir, "package.json");
|
|
617
|
+
if (!existsSync2(packageJsonPath))
|
|
649
618
|
return null;
|
|
650
619
|
const pkg = JSON.parse(readFileSync2(packageJsonPath, "utf-8"));
|
|
651
620
|
const exportKey = resolvedPackageDir !== subPackageDir && subpath ? `.${subpath}` : ".";
|
|
652
621
|
const rootExport = pkg.exports?.[exportKey];
|
|
653
622
|
const entry = pickExportEntry(rootExport) ?? (resolvedPackageDir === subPackageDir || !subpath ? pkg.module ?? pkg.main ?? "index.js" : `.${subpath}`);
|
|
654
|
-
return
|
|
623
|
+
return join2(resolvedPackageDir, entry);
|
|
655
624
|
};
|
|
656
625
|
var RUNTIME_JS_EXTENSIONS = [".js", ".mjs", ".cjs"];
|
|
657
626
|
var MODULE_SPECIFIER_RE = /(from\s*|import\s*|import\(\s*|require\(\s*)(["'])([^"']+)\2/g;
|
|
@@ -659,7 +628,7 @@ var isRuntimeJsFile = (filePath) => RUNTIME_JS_EXTENSIONS.some((extension) => fi
|
|
|
659
628
|
var isNodeModulesPath = (filePath) => filePath.split(/[\\/]/).includes("node_modules");
|
|
660
629
|
var isFile = (filePath) => {
|
|
661
630
|
try {
|
|
662
|
-
return
|
|
631
|
+
return statSync(filePath).isFile();
|
|
663
632
|
} catch {
|
|
664
633
|
return false;
|
|
665
634
|
}
|
|
@@ -670,17 +639,17 @@ var resolveRuntimeJsFile = (candidate) => {
|
|
|
670
639
|
const candidates = [
|
|
671
640
|
candidate,
|
|
672
641
|
...RUNTIME_JS_EXTENSIONS.map((extension) => `${candidate}${extension}`),
|
|
673
|
-
...RUNTIME_JS_EXTENSIONS.map((extension) =>
|
|
642
|
+
...RUNTIME_JS_EXTENSIONS.map((extension) => join2(candidate, `index${extension}`))
|
|
674
643
|
];
|
|
675
644
|
return candidates.find((filePath) => isRuntimeJsFile(filePath) && isFile(filePath)) ?? null;
|
|
676
645
|
};
|
|
677
646
|
var findContainingRuntimePackageDir = (filePath) => {
|
|
678
|
-
let dir =
|
|
679
|
-
while (dir !==
|
|
680
|
-
if (isNodeModulesPath(dir) &&
|
|
647
|
+
let dir = dirname2(filePath);
|
|
648
|
+
while (dir !== dirname2(dir)) {
|
|
649
|
+
if (isNodeModulesPath(dir) && existsSync2(join2(dir, "package.json"))) {
|
|
681
650
|
return dir;
|
|
682
651
|
}
|
|
683
|
-
dir =
|
|
652
|
+
dir = dirname2(dir);
|
|
684
653
|
}
|
|
685
654
|
return null;
|
|
686
655
|
};
|
|
@@ -694,15 +663,15 @@ var resolvePackageImportEntryFile = (fromFile, specifier) => {
|
|
|
694
663
|
const entry = pickExportEntry(pkg?.imports?.[specifier]);
|
|
695
664
|
if (!entry)
|
|
696
665
|
return null;
|
|
697
|
-
return
|
|
666
|
+
return join2(packageDir, entry);
|
|
698
667
|
};
|
|
699
668
|
var collectRuntimeRewriteRoots = (distDir) => collectFiles(distDir).filter((filePath) => isRuntimeJsFile(filePath) && !isNodeModulesPath(filePath));
|
|
700
669
|
var toTopLevelPackage = (specifier) => specifier.split("/").slice(0, specifier.startsWith("@") ? 2 : 1).join("/");
|
|
701
670
|
var FRAMEWORK_PACKAGE_NAME = "@absolutejs/absolute";
|
|
702
671
|
var copyChunkReferencedPackages = (distDir, seen) => {
|
|
703
|
-
const distRoot =
|
|
672
|
+
const distRoot = resolve2(distDir);
|
|
704
673
|
for (const filePath of collectRuntimeRewriteRoots(distDir)) {
|
|
705
|
-
if (
|
|
674
|
+
if (resolve2(dirname2(filePath)) === distRoot)
|
|
706
675
|
continue;
|
|
707
676
|
const source = readFileSync2(filePath, "utf-8");
|
|
708
677
|
for (const match of source.matchAll(MODULE_SPECIFIER_RE)) {
|
|
@@ -739,7 +708,7 @@ var rewriteRuntimeModuleSpecifiers = (distDir) => {
|
|
|
739
708
|
const { masked, restore } = maskLiterals(source);
|
|
740
709
|
const rewrittenMasked = masked.replace(MODULE_SPECIFIER_RE, (match, prefix, quote, specifier) => {
|
|
741
710
|
if (typeof specifier === "string" && specifier.startsWith(".")) {
|
|
742
|
-
enqueue(resolveRuntimeJsFile(
|
|
711
|
+
enqueue(resolveRuntimeJsFile(resolve2(dirname2(filePath), specifier)));
|
|
743
712
|
return match;
|
|
744
713
|
}
|
|
745
714
|
const packageImportTarget = resolveRuntimeJsFile(resolvePackageImportEntryFile(filePath, specifier) ?? "");
|
|
@@ -761,7 +730,7 @@ var rewriteRuntimeModuleSpecifiers = (distDir) => {
|
|
|
761
730
|
};
|
|
762
731
|
var generateEntrypoint = (distDir, serverEntry, prerenderMap, version, buildConfig) => {
|
|
763
732
|
const allFiles = collectFiles(distDir);
|
|
764
|
-
const serverBundleName = `${
|
|
733
|
+
const serverBundleName = `${basename(serverEntry).replace(/\.[^.]+$/, "")}.js`;
|
|
765
734
|
const embeddedSkip = new Set(["_compile_entrypoint.ts"]);
|
|
766
735
|
const assetSkip = new Set([
|
|
767
736
|
serverBundleName,
|
|
@@ -784,7 +753,7 @@ var generateEntrypoint = (distDir, serverEntry, prerenderMap, version, buildConf
|
|
|
784
753
|
const nativeAssets = resolveCompileNativeAssets(buildConfig);
|
|
785
754
|
nativeAssets.forEach((asset, idx) => {
|
|
786
755
|
const varName = `__native${idx}`;
|
|
787
|
-
const importSpecifier = asset.import.startsWith(".") ?
|
|
756
|
+
const importSpecifier = asset.import.startsWith(".") ? resolve2(process.cwd(), asset.import) : asset.import;
|
|
788
757
|
nativeImports.push(`import ${varName} from ${JSON.stringify(importSpecifier)} with { type: "file" };`);
|
|
789
758
|
nativeMappings.push(` [${JSON.stringify(asset.env)}, resolveNativeAssetPath(${varName})],`);
|
|
790
759
|
});
|
|
@@ -839,12 +808,12 @@ import { fileURLToPath, pathToFileURL } from "node:url";
|
|
|
839
808
|
// ws.data.*). Wiring it into Bun.serve below is what lets compiled servers
|
|
840
809
|
// serve .ws() routes \u2014 without it every upgrade falls through to a 404.
|
|
841
810
|
import { buildGlobalWSHandler } from "elysia/ws";
|
|
842
|
-
import { createClientAssetArchive } from ${JSON.stringify([
|
|
811
|
+
import { createClientAssetArchive } from ${JSON.stringify([resolve2(import.meta.dir, "../../runtime/clientAssetArchive.ts"), resolve2(import.meta.dir, "../runtime/clientAssetArchive.js")].find((path) => existsSync2(path)))};
|
|
843
812
|
|
|
844
813
|
const SERVER_MODULE = (runtimeDir: string) => import(pathToFileURL(join(runtimeDir, ${JSON.stringify(serverBundleName)})).href);
|
|
845
814
|
const RUNTIME_BUILD_ID = ${JSON.stringify(runtimeBuildId)};
|
|
846
815
|
const RUNTIME_CONFIG_SOURCE = ${JSON.stringify(runtimeConfigSource)};
|
|
847
|
-
const ORIGINAL_BUILD_DIR = ${JSON.stringify(
|
|
816
|
+
const ORIGINAL_BUILD_DIR = ${JSON.stringify(resolve2(distDir))};
|
|
848
817
|
const ORIGINAL_BUILD_DIR_NORMALIZED = ORIGINAL_BUILD_DIR.replace(/\\\\/g, "/");
|
|
849
818
|
const EMBEDDED_NATIVE_AUTH_CLIENTS = ${JSON.stringify(process.env[ABSOLUTE_NATIVE_AUTH_CLIENTS_ENV2])};
|
|
850
819
|
|
|
@@ -1289,26 +1258,26 @@ var createStubPlugin = (options = {}) => ({
|
|
|
1289
1258
|
}
|
|
1290
1259
|
});
|
|
1291
1260
|
var compile = async (serverEntry, outdir, outfile, configPath) => {
|
|
1292
|
-
const resolvedOutdir =
|
|
1261
|
+
const resolvedOutdir = resolve2(outdir ?? "dist");
|
|
1293
1262
|
await withBuildDirectoryLock(resolvedOutdir, () => compileUnlocked(serverEntry, resolvedOutdir, outfile, configPath));
|
|
1294
1263
|
};
|
|
1295
1264
|
var compileUnlocked = async (serverEntry, resolvedOutdir, outfile, configPath) => {
|
|
1296
|
-
rmSync(
|
|
1265
|
+
rmSync(join2(resolvedOutdir, "node_modules"), {
|
|
1297
1266
|
force: true,
|
|
1298
1267
|
recursive: true
|
|
1299
1268
|
});
|
|
1300
1269
|
const configuredPrerenderPort = Number(env.COMPILE_PORT);
|
|
1301
1270
|
const prerenderPort = configuredPrerenderPort > 0 ? configuredPrerenderPort : await findFreePort();
|
|
1302
1271
|
killStaleProcesses(prerenderPort);
|
|
1303
|
-
const entryName =
|
|
1304
|
-
const resolvedOutfile =
|
|
1272
|
+
const entryName = basename(serverEntry).replace(/\.[^.]+$/, "");
|
|
1273
|
+
const resolvedOutfile = resolve2(outfile ?? "compiled-server");
|
|
1305
1274
|
const absoluteVersion = resolvePackageVersion([
|
|
1306
|
-
|
|
1307
|
-
|
|
1275
|
+
resolve2(import.meta.dir, "..", "..", "..", "package.json"),
|
|
1276
|
+
resolve2(import.meta.dir, "..", "..", "package.json")
|
|
1308
1277
|
]);
|
|
1309
1278
|
compileBanner(absoluteVersion);
|
|
1310
1279
|
const totalStart = performance.now();
|
|
1311
|
-
rmSync(
|
|
1280
|
+
rmSync(join2(resolvedOutdir, "_absolute", "assets"), {
|
|
1312
1281
|
force: true,
|
|
1313
1282
|
recursive: true
|
|
1314
1283
|
});
|
|
@@ -1321,8 +1290,8 @@ var compileUnlocked = async (serverEntry, resolvedOutdir, outfile, configPath) =
|
|
|
1321
1290
|
installAbsoluteMobileAuthEnvironment2(process.cwd(), normalizeAbsoluteMobileConfig2(buildConfig.mobile, process.cwd()));
|
|
1322
1291
|
try {
|
|
1323
1292
|
const build = await resolveBuildModule([
|
|
1324
|
-
|
|
1325
|
-
|
|
1293
|
+
resolve2(import.meta.dir, "..", "..", "core", "build"),
|
|
1294
|
+
resolve2(import.meta.dir, "..", "build")
|
|
1326
1295
|
]);
|
|
1327
1296
|
if (!build)
|
|
1328
1297
|
throw new Error("Could not locate build module");
|
|
@@ -1345,11 +1314,11 @@ var compileUnlocked = async (serverEntry, resolvedOutdir, outfile, configPath) =
|
|
|
1345
1314
|
buildConfig.htmxDirectory
|
|
1346
1315
|
].filter((dir) => Boolean(dir));
|
|
1347
1316
|
const islandRegistrySpec = buildConfig.islands?.registry;
|
|
1348
|
-
const islandRegistryPlugin = islandRegistrySpec ? createIslandRegistryDefinitionPlugin(await loadIslandRegistryBuildInfo(
|
|
1349
|
-
const serverBundleEntryDirectory =
|
|
1350
|
-
|
|
1351
|
-
const typeboxSetupEntry =
|
|
1352
|
-
const serverBundleEntry =
|
|
1317
|
+
const islandRegistryPlugin = islandRegistrySpec ? createIslandRegistryDefinitionPlugin(await loadIslandRegistryBuildInfo(resolve2(islandRegistrySpec))) : undefined;
|
|
1318
|
+
const serverBundleEntryDirectory = join2(resolvedOutdir, ".absolutejs-server-entry");
|
|
1319
|
+
mkdirSync2(serverBundleEntryDirectory, { recursive: true });
|
|
1320
|
+
const typeboxSetupEntry = join2(serverBundleEntryDirectory, "_typebox_setup.ts");
|
|
1321
|
+
const serverBundleEntry = join2(serverBundleEntryDirectory, basename(serverEntry));
|
|
1353
1322
|
writeFileSync2(typeboxSetupEntry, `import { setupTypebox } from 'elysia';
|
|
1354
1323
|
import * as compile from 'typebox/compile';
|
|
1355
1324
|
import * as schema from 'typebox/schema';
|
|
@@ -1360,7 +1329,7 @@ import * as value from 'typebox/value';
|
|
|
1360
1329
|
setupTypebox({ typebox: { compile, schema, system, type, value } });
|
|
1361
1330
|
`);
|
|
1362
1331
|
writeFileSync2(serverBundleEntry, `import './_typebox_setup';
|
|
1363
|
-
import * as serverModule from ${JSON.stringify(
|
|
1332
|
+
import * as serverModule from ${JSON.stringify(resolve2(serverEntry))};
|
|
1364
1333
|
|
|
1365
1334
|
export const server = serverModule.server ?? serverModule.app ?? serverModule.default;
|
|
1366
1335
|
export default server;
|
|
@@ -1375,7 +1344,7 @@ export default server;
|
|
|
1375
1344
|
...islandRegistryPlugin ? [islandRegistryPlugin] : [],
|
|
1376
1345
|
...buildConfig.mobile ? [
|
|
1377
1346
|
createAbsoluteMobileRouteMetadataPlugin({
|
|
1378
|
-
entry:
|
|
1347
|
+
entry: resolve2(serverEntry)
|
|
1379
1348
|
})
|
|
1380
1349
|
] : [],
|
|
1381
1350
|
createElysiaOpenApiTypeboxPlugin(),
|
|
@@ -1399,13 +1368,13 @@ export default server;
|
|
|
1399
1368
|
console.error(cliTag("\x1B[31m", "Server bundle failed."));
|
|
1400
1369
|
process.exit(1);
|
|
1401
1370
|
}
|
|
1402
|
-
const outputPath =
|
|
1403
|
-
if (!
|
|
1371
|
+
const outputPath = resolve2(resolvedOutdir, `${entryName}.js`);
|
|
1372
|
+
if (!existsSync2(outputPath)) {
|
|
1404
1373
|
console.error(cliTag("\x1B[31m", `Expected output not found: ${outputPath}`));
|
|
1405
1374
|
process.exit(1);
|
|
1406
1375
|
}
|
|
1407
|
-
if (
|
|
1408
|
-
const vendorDir =
|
|
1376
|
+
if (existsSync2(resolve2(resolvedOutdir, "angular", "vendor", "server"))) {
|
|
1377
|
+
const vendorDir = resolve2(resolvedOutdir, "angular", "vendor", "server");
|
|
1409
1378
|
const vendorEntries = readdirSync2(vendorDir).filter((fileName) => fileName.endsWith(".js"));
|
|
1410
1379
|
const angularServerVendorPaths = {};
|
|
1411
1380
|
for (const file of vendorEntries) {
|
|
@@ -1414,11 +1383,11 @@ export default server;
|
|
|
1414
1383
|
if (scope !== "angular" || rest.length === 0)
|
|
1415
1384
|
continue;
|
|
1416
1385
|
const specifier = `@angular/${rest.join("/")}`;
|
|
1417
|
-
const relPath = relative2(
|
|
1386
|
+
const relPath = relative2(dirname2(outputPath), resolve2(vendorDir, file));
|
|
1418
1387
|
angularServerVendorPaths[specifier] = relPath.startsWith(".") ? relPath : `./${relPath}`;
|
|
1419
1388
|
}
|
|
1420
1389
|
if (Object.keys(angularServerVendorPaths).length > 0) {
|
|
1421
|
-
const { rewriteImports } = await import("./rewriteImports-
|
|
1390
|
+
const { rewriteImports } = await import("./rewriteImports-np2d2kvc.js");
|
|
1422
1391
|
await rewriteImports([outputPath], angularServerVendorPaths);
|
|
1423
1392
|
}
|
|
1424
1393
|
}
|
|
@@ -1426,7 +1395,7 @@ export default server;
|
|
|
1426
1395
|
copyServerRuntimeAssetReferences(resolvedOutdir);
|
|
1427
1396
|
const prerenderStart = performance.now();
|
|
1428
1397
|
process.stdout.write(cliTag("\x1B[36m", "Pre-rendering pages"));
|
|
1429
|
-
rmSync(
|
|
1398
|
+
rmSync(join2(resolvedOutdir, "_prerendered"), {
|
|
1430
1399
|
force: true,
|
|
1431
1400
|
recursive: true
|
|
1432
1401
|
});
|
|
@@ -1456,9 +1425,9 @@ export default server;
|
|
|
1456
1425
|
const compileStart = performance.now();
|
|
1457
1426
|
process.stdout.write(cliTag("\x1B[36m", "Compiling standalone executable"));
|
|
1458
1427
|
const entrypointCode = generateEntrypoint(resolvedOutdir, serverEntry, prerenderMap, absoluteVersion, buildConfig);
|
|
1459
|
-
const entrypointPath =
|
|
1428
|
+
const entrypointPath = join2(resolvedOutdir, "_compile_entrypoint.ts");
|
|
1460
1429
|
await Bun.write(entrypointPath, entrypointCode);
|
|
1461
|
-
|
|
1430
|
+
mkdirSync2(dirname2(resolvedOutfile), { recursive: true });
|
|
1462
1431
|
const result = await Bun.build({
|
|
1463
1432
|
compile: { outfile: resolvedOutfile },
|
|
1464
1433
|
define: resolveProductionServerDefine(buildConfig),
|
|
@@ -1488,7 +1457,7 @@ export default server;
|
|
|
1488
1457
|
const size = (Bun.file(resolvedOutfile).size / BYTES_PER_MB).toFixed(0);
|
|
1489
1458
|
const totalDuration = getDurationString(performance.now() - totalStart);
|
|
1490
1459
|
console.log(cliTag("\x1B[32m", `Compiled to ${resolvedOutfile} (${size}MB) in ${totalDuration}`));
|
|
1491
|
-
console.log(cliTag("\x1B[2m", `Run with: ./${
|
|
1460
|
+
console.log(cliTag("\x1B[2m", `Run with: ./${basename(resolvedOutfile)}`));
|
|
1492
1461
|
sendTelemetryEvent("compile:complete", {
|
|
1493
1462
|
durationMs: Math.round(performance.now() - totalStart),
|
|
1494
1463
|
entry: serverEntry,
|
|
@@ -46484,13 +46484,16 @@ var buildIslandStyleLinks = (manifest, html) => {
|
|
|
46484
46484
|
const renderedKeys = collectRenderedIslandStyleKeys(html);
|
|
46485
46485
|
return getIslandStyleManifestEntries(manifest).filter(([key]) => renderedKeys.has(key)).filter(([, href]) => !html.includes(`href="${href}"`)).map(([key, href]) => `<link rel="stylesheet" href="${href}" data-island-style="${key}"${nonceAttr()}>`).join("");
|
|
46486
46486
|
};
|
|
46487
|
-
var
|
|
46487
|
+
var REACT_HOOK_STAND_IN = "if(!window.__REACT_DEVTOOLS_GLOBAL_HOOK__){var n=0;" + "window.__REACT_DEVTOOLS_GLOBAL_HOOK__={renderers:new Map(),supportsFiber:true," + "inject:function(r){n+=1;this.renderers.set(n,r);return n}," + "onScheduleFiberRoot:function(){},onCommitFiberRoot:function(){},onCommitFiberUnmount:function(){}}}";
|
|
46488
|
+
var buildIslandsHeadMarkup = (manifest, html, host) => {
|
|
46488
46489
|
const styleLinks = buildIslandStyleLinks(manifest, html);
|
|
46489
46490
|
const manifestScript = `<script${nonceAttr()}>window.__ABSOLUTE_MANIFEST__ = ${escapeScriptContent(JSON.stringify(toBrowserManifest(manifest)))}</script>`;
|
|
46490
|
-
const
|
|
46491
|
+
const hostAssignment = host ? `;window.__ABS_ISLAND_HOST__ = ${JSON.stringify(host)}` : "";
|
|
46492
|
+
const islandStateScript = `<script${nonceAttr()}>window.__ABS_ISLAND_STATE__ = ${escapeScriptContent(JSON.stringify(globalThis.__ABS_ISLAND_STATE__ ?? {}))}${hostAssignment}</script>`;
|
|
46493
|
+
const reactHookScript = isProductionRuntime() ? "" : `<script${nonceAttr()}>${REACT_HOOK_STAND_IN}</script>`;
|
|
46491
46494
|
const bootstrapPath = getIslandBootstrapPath(manifest);
|
|
46492
46495
|
const bootstrapScript = bootstrapPath ? `<script${nonceAttr()} type="module" src="${bootstrapPath}"></script>` : "";
|
|
46493
|
-
return `${styleLinks}${manifestScript}${islandStateScript}${bootstrapScript}`;
|
|
46496
|
+
return `${styleLinks}${manifestScript}${islandStateScript}${reactHookScript}${bootstrapScript}`;
|
|
46494
46497
|
};
|
|
46495
46498
|
var injectHeadMarkup = (html, markup) => {
|
|
46496
46499
|
const closingHeadIndex = html.indexOf("</head>");
|
|
@@ -46674,7 +46677,7 @@ var injectIslandPageContextStream = (stream, options) => {
|
|
|
46674
46677
|
const manifest = globalThis.__absoluteManifest;
|
|
46675
46678
|
if (!manifest)
|
|
46676
46679
|
return stream;
|
|
46677
|
-
const markup = buildIslandsHeadMarkup(manifest);
|
|
46680
|
+
const markup = buildIslandsHeadMarkup(manifest, undefined, options?.host);
|
|
46678
46681
|
if (options?.hasIslands === true) {
|
|
46679
46682
|
warnIfBootstrapMissing(manifest);
|
|
46680
46683
|
return pipeStreamWithHeadInjection(stream, markup);
|
|
@@ -48637,7 +48640,9 @@ var handleReactPageRequest = async (input) => {
|
|
|
48637
48640
|
console.error("[SSR] React streaming error:", error);
|
|
48638
48641
|
}
|
|
48639
48642
|
});
|
|
48640
|
-
const htmlStream = injectIslandPageContextStream(stream
|
|
48643
|
+
const htmlStream = injectIslandPageContextStream(stream, {
|
|
48644
|
+
host: "react"
|
|
48645
|
+
});
|
|
48641
48646
|
if (resolveErrorConventionPath("react", pageName) || hasErrorConvention("react")) {
|
|
48642
48647
|
const html = await new Response(htmlStream).text();
|
|
48643
48648
|
return new Response(html, {
|
|
@@ -10,14 +10,10 @@ import {
|
|
|
10
10
|
UNFOUND_INDEX
|
|
11
11
|
} from "./index-t8jmj8w1.js";
|
|
12
12
|
import {
|
|
13
|
-
isTestSourcePath,
|
|
14
13
|
isWorkspacePackageSpecifier,
|
|
15
14
|
workspacePackageDirs
|
|
16
|
-
} from "./index-
|
|
17
|
-
import
|
|
18
|
-
bootTimelineChildEnv,
|
|
19
|
-
markBoot
|
|
20
|
-
} from "./index-2shf4aya.js";
|
|
15
|
+
} from "./index-djkrb7pc.js";
|
|
16
|
+
import"./index-va274tsf.js";
|
|
21
17
|
import {
|
|
22
18
|
resolveDevBunExecutable2
|
|
23
19
|
} from "./index-psvsmg0x.js";
|
|
@@ -37,8 +33,9 @@ import {
|
|
|
37
33
|
loadConfig
|
|
38
34
|
} from "./index-wk0pyxrg.js";
|
|
39
35
|
import {
|
|
36
|
+
normalizePath,
|
|
40
37
|
ensureFileRouteModule
|
|
41
|
-
} from "./index-
|
|
38
|
+
} from "./index-47e8fwha.js";
|
|
42
39
|
import {
|
|
43
40
|
TUNNEL_CONTROL_PATH,
|
|
44
41
|
TUNNEL_FORWARDED_HOST_HEADER,
|
|
@@ -57,9 +54,16 @@ import {
|
|
|
57
54
|
import {
|
|
58
55
|
unrefTimer
|
|
59
56
|
} from "./index-1y5mmnwg.js";
|
|
57
|
+
import {
|
|
58
|
+
bootTimelineChildEnv,
|
|
59
|
+
markBoot
|
|
60
|
+
} from "./index-c8rcfe5a.js";
|
|
60
61
|
import {
|
|
61
62
|
sendTelemetryEvent
|
|
62
63
|
} from "./index-qyxd5n9a.js";
|
|
64
|
+
import {
|
|
65
|
+
isTestSourcePath
|
|
66
|
+
} from "./index-65kqn88a.js";
|
|
63
67
|
import {
|
|
64
68
|
COMPOSE_PATH,
|
|
65
69
|
isWSLEnvironment,
|
|
@@ -569,11 +573,6 @@ var extractDependencies = (filePath) => {
|
|
|
569
573
|
// src/dev/pathUtils.ts
|
|
570
574
|
import { existsSync as existsSync2, readdirSync, readFileSync as readFileSync2 } from "fs";
|
|
571
575
|
import { dirname, resolve as resolve3 } from "path";
|
|
572
|
-
|
|
573
|
-
// src/utils/normalizePath.ts
|
|
574
|
-
var normalizePath = (path) => path.replace(/\\/g, "/");
|
|
575
|
-
|
|
576
|
-
// src/dev/pathUtils.ts
|
|
577
576
|
var collectAngularResourceDirs = (angularDir) => {
|
|
578
577
|
const out = new Set;
|
|
579
578
|
const angularRoot = resolve3(angularDir);
|
|
@@ -822,7 +821,7 @@ var serializeDependencies = (graph) => {
|
|
|
822
821
|
return dependencies;
|
|
823
822
|
};
|
|
824
823
|
var computePayload = async (config, vendorSourceDirs) => {
|
|
825
|
-
const { computeDepVendorPaths } = await import("./buildDepVendor-
|
|
824
|
+
const { computeDepVendorPaths } = await import("./buildDepVendor-qnwfct22.js");
|
|
826
825
|
const vendors = computeDepVendorPaths(vendorSourceDirs);
|
|
827
826
|
const graph = {
|
|
828
827
|
dependencies: new Map,
|
|
@@ -1383,7 +1382,7 @@ var loadAbsoluteMobileDevModules = async () => {
|
|
|
1383
1382
|
expoNativeWatcher
|
|
1384
1383
|
] = await Promise.all([
|
|
1385
1384
|
import("./config-hy5dkexz.js"),
|
|
1386
|
-
import("./expoProject-
|
|
1385
|
+
import("./expoProject-acgfaj3f.js"),
|
|
1387
1386
|
import("./expoDevController-018anvbm.js"),
|
|
1388
1387
|
import("./nativeAuth-ysv0x5dy.js"),
|
|
1389
1388
|
import("./androidEmulatorController-vqc5m2rp.js"),
|