@absolutejs/absolute 0.19.0-beta.760 → 0.19.0-beta.761

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/build.js CHANGED
@@ -45104,7 +45104,10 @@ import {
45104
45104
  import { basename as basename7, dirname as dirname11, join as join20, relative as relative10, resolve as resolve18 } from "path";
45105
45105
  import { cwd, env as env2, exit } from "process";
45106
45106
  var {build: bunBuild7, Glob: Glob7 } = globalThis.Bun;
45107
- var isDev, collectConventionSourceFiles = (entry) => {
45107
+ var isDev, isBuildTraceEnabled = () => {
45108
+ const value2 = env2.ABSOLUTE_BUILD_TRACE?.toLowerCase();
45109
+ return value2 === "1" || value2 === "true" || value2 === "yes";
45110
+ }, collectConventionSourceFiles = (entry) => {
45108
45111
  if (!entry)
45109
45112
  return [];
45110
45113
  const files = [];
@@ -45430,7 +45433,53 @@ ${content.slice(firstUseIdx)}`;
45430
45433
  }) => {
45431
45434
  const buildStart = performance.now();
45432
45435
  const projectRoot = cwd();
45433
- await resolveAbsoluteVersion();
45436
+ const traceEnabled = isBuildTraceEnabled();
45437
+ const traceEvents = [];
45438
+ let traceFrameworkNames = [];
45439
+ const tracePhase = async (name, fn, metadata) => {
45440
+ if (!traceEnabled)
45441
+ return await fn();
45442
+ const phaseStart = performance.now();
45443
+ try {
45444
+ const result = await fn();
45445
+ traceEvents.push({
45446
+ durationMs: performance.now() - phaseStart,
45447
+ metadata,
45448
+ name,
45449
+ ok: true,
45450
+ startMs: phaseStart - buildStart
45451
+ });
45452
+ return result;
45453
+ } catch (error) {
45454
+ traceEvents.push({
45455
+ durationMs: performance.now() - phaseStart,
45456
+ metadata: {
45457
+ ...metadata,
45458
+ error: error instanceof Error ? error.message : String(error)
45459
+ },
45460
+ name,
45461
+ ok: false,
45462
+ startMs: phaseStart - buildStart
45463
+ });
45464
+ throw error;
45465
+ }
45466
+ };
45467
+ const writeBuildTrace = (buildPath2) => {
45468
+ if (!traceEnabled)
45469
+ return;
45470
+ const traceDir = join20(buildPath2, ".absolute-trace");
45471
+ const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
45472
+ mkdirSync10(traceDir, { recursive: true });
45473
+ writeFileSync7(join20(traceDir, `build-trace-${timestamp}.json`), JSON.stringify({
45474
+ events: traceEvents,
45475
+ frameworks: traceFrameworkNames,
45476
+ generatedAt: new Date().toISOString(),
45477
+ mode: mode ?? (isDev ? "development" : "production"),
45478
+ totalDurationMs: performance.now() - buildStart,
45479
+ version: 1
45480
+ }, null, 2));
45481
+ };
45482
+ await tracePhase("absolute/version", () => resolveAbsoluteVersion());
45434
45483
  const isIncremental = incrementalFiles && incrementalFiles.length > 0;
45435
45484
  const styleTransformConfig = createStyleTransformConfig(stylePreprocessors, postcss);
45436
45485
  const stylePreprocessorPlugin2 = createStylePreprocessorPlugin(styleTransformConfig);
@@ -45475,6 +45524,7 @@ ${content.slice(firstUseIdx)}`;
45475
45524
  vueDir && "vue",
45476
45525
  angularDir && "angular"
45477
45526
  ].filter((name) => Boolean(name));
45527
+ traceFrameworkNames = frameworkNames;
45478
45528
  sendTelemetryEvent("build:start", {
45479
45529
  framework: frameworkNames[0],
45480
45530
  frameworks: frameworkNames,
@@ -45516,9 +45566,9 @@ ${content.slice(firstUseIdx)}`;
45516
45566
  serverOutDir = buildPath;
45517
45567
  }
45518
45568
  const publicPath = publicDirectory && validateSafePath(publicDirectory, projectRoot);
45519
- mkdirSync10(buildPath, { recursive: true });
45569
+ await tracePhase("build-dir/create", () => mkdirSync10(buildPath, { recursive: true }));
45520
45570
  if (publicPath)
45521
- cpSync(publicPath, buildPath, { force: true, recursive: true });
45571
+ await tracePhase("public/copy", () => cpSync(publicPath, buildPath, { force: true, recursive: true }));
45522
45572
  const filterToIncrementalEntries = (entryPoints, mapToSource) => {
45523
45573
  if (!isIncremental || !incrementalFiles)
45524
45574
  return entryPoints;
@@ -45535,15 +45585,15 @@ ${content.slice(firstUseIdx)}`;
45535
45585
  return matchingEntries;
45536
45586
  };
45537
45587
  if (reactIndexesPath && reactPagesPath) {
45538
- await generateReactIndexFiles(reactPagesPath, reactIndexesPath, hmr);
45588
+ await tracePhase("react/index-generation", () => generateReactIndexFiles(reactPagesPath, reactIndexesPath, hmr));
45539
45589
  }
45540
45590
  if (assetsPath && (!isIncremental || normalizedIncrementalFiles?.some((f) => f.includes("/assets/")))) {
45541
- cpSync(assetsPath, join20(buildPath, "assets"), {
45591
+ await tracePhase("assets/copy", () => cpSync(assetsPath, join20(buildPath, "assets"), {
45542
45592
  force: true,
45543
45593
  recursive: true
45544
- });
45594
+ }));
45545
45595
  }
45546
- const tailwindPromise = tailwind && (!isIncremental || normalizedIncrementalFiles?.some(isStylePath)) ? compileTailwindConfig(tailwind, buildPath, styleTransformConfig) : undefined;
45596
+ const tailwindPromise = tailwind && (!isIncremental || normalizedIncrementalFiles?.some(isStylePath)) ? tracePhase("tailwind/build", () => compileTailwindConfig(tailwind, buildPath, styleTransformConfig)) : undefined;
45547
45597
  const emptyConventionResult = {
45548
45598
  conventions: undefined,
45549
45599
  pageFiles: []
@@ -45559,13 +45609,13 @@ ${content.slice(firstUseIdx)}`;
45559
45609
  allGlobalCssEntries
45560
45610
  ] = await Promise.all([
45561
45611
  tailwindPromise,
45562
- reactIndexesPath ? scanEntryPoints(reactIndexesPath, "*.tsx") : [],
45563
- htmlScriptsPath ? scanEntryPoints(htmlScriptsPath, "*.{js,ts}") : [],
45564
- reactPagesPath ? scanConventions(reactPagesPath, "*.tsx") : emptyConventionResult,
45565
- sveltePagesPath ? scanConventions(sveltePagesPath, "*.svelte") : emptyConventionResult,
45566
- vuePagesPath ? scanConventions(vuePagesPath, "*.vue") : emptyConventionResult,
45567
- angularPagesPath ? scanConventions(angularPagesPath, "*.ts") : emptyConventionResult,
45568
- stylesDir ? scanCssEntryPoints(stylesDir, stylesIgnore) : []
45612
+ reactIndexesPath ? tracePhase("scan/react-indexes", () => scanEntryPoints(reactIndexesPath, "*.tsx")) : [],
45613
+ htmlScriptsPath ? tracePhase("scan/html-scripts", () => scanEntryPoints(htmlScriptsPath, "*.{js,ts}")) : [],
45614
+ reactPagesPath ? tracePhase("scan/react-conventions", () => scanConventions(reactPagesPath, "*.tsx")) : emptyConventionResult,
45615
+ sveltePagesPath ? tracePhase("scan/svelte-conventions", () => scanConventions(sveltePagesPath, "*.svelte")) : emptyConventionResult,
45616
+ vuePagesPath ? tracePhase("scan/vue-conventions", () => scanConventions(vuePagesPath, "*.vue")) : emptyConventionResult,
45617
+ angularPagesPath ? tracePhase("scan/angular-conventions", () => scanConventions(angularPagesPath, "*.ts")) : emptyConventionResult,
45618
+ stylesDir ? tracePhase("scan/css", () => scanCssEntryPoints(stylesDir, stylesIgnore)) : []
45569
45619
  ]);
45570
45620
  const allSvelteEntries = svelteConventionResult.pageFiles;
45571
45621
  const allVueEntries = vueConventionResult.pageFiles;
@@ -45605,12 +45655,12 @@ ${content.slice(firstUseIdx)}`;
45605
45655
  htmlDir,
45606
45656
  htmxDir
45607
45657
  ].filter((dir) => Boolean(dir));
45608
- const urlReferencedFilesPromise = scanWorkerReferences(allFrameworkDirs);
45658
+ const urlReferencedFilesPromise = tracePhase("scan/worker-references", () => scanWorkerReferences(allFrameworkDirs));
45609
45659
  const shouldCompileSvelte = svelteDir && svelteEntries.length > 0;
45610
45660
  const shouldCompileVue = vueDir && vueEntries.length > 0;
45611
45661
  const shouldCompileAngular = angularDir && angularEntries.length > 0;
45612
45662
  const emptyStringArray = [];
45613
- const islandBuildInfo = islandRegistryPath ? await loadIslandRegistryBuildInfo(islandRegistryPath) : null;
45663
+ const islandBuildInfo = islandRegistryPath ? await tracePhase("islands/registry", () => loadIslandRegistryBuildInfo(islandRegistryPath)) : null;
45614
45664
  const islandFrameworkSources = islandBuildInfo ? collectIslandFrameworkSources(islandBuildInfo) : {};
45615
45665
  const islandSvelteSources = islandFrameworkSources.svelte ?? emptyStringArray;
45616
45666
  const islandVueSources = islandFrameworkSources.vue ?? emptyStringArray;
@@ -45626,28 +45676,28 @@ ${content.slice(firstUseIdx)}`;
45626
45676
  { vueClientPaths: islandVueClientPaths },
45627
45677
  { clientPaths: islandAngularClientPaths }
45628
45678
  ] = await Promise.all([
45629
- shouldCompileSvelte ? Promise.resolve().then(() => (init_compileSvelte(), exports_compileSvelte)).then((mod) => mod.compileSvelte(svelteEntries, svelteDir, new Map, hmr, styleTransformConfig)) : {
45679
+ shouldCompileSvelte ? tracePhase("compile/svelte", () => Promise.resolve().then(() => (init_compileSvelte(), exports_compileSvelte)).then((mod) => mod.compileSvelte(svelteEntries, svelteDir, new Map, hmr, styleTransformConfig))) : {
45630
45680
  svelteClientPaths: [...emptyStringArray],
45631
45681
  svelteIndexPaths: [...emptyStringArray],
45632
45682
  svelteServerPaths: [...emptyStringArray]
45633
45683
  },
45634
- shouldCompileVue ? Promise.resolve().then(() => (init_compileVue(), exports_compileVue)).then((mod) => mod.compileVue(vueEntries, vueDir, hmr, styleTransformConfig)) : {
45684
+ shouldCompileVue ? tracePhase("compile/vue", () => Promise.resolve().then(() => (init_compileVue(), exports_compileVue)).then((mod) => mod.compileVue(vueEntries, vueDir, hmr, styleTransformConfig))) : {
45635
45685
  vueClientPaths: [...emptyStringArray],
45636
45686
  vueCssPaths: [...emptyStringArray],
45637
45687
  vueIndexPaths: [...emptyStringArray],
45638
45688
  vueServerPaths: [...emptyStringArray]
45639
45689
  },
45640
- shouldCompileAngular ? Promise.resolve().then(() => (init_compileAngular(), exports_compileAngular)).then((mod) => mod.compileAngular(angularEntries, angularDir, hmr, styleTransformConfig)) : {
45690
+ shouldCompileAngular ? tracePhase("compile/angular", () => Promise.resolve().then(() => (init_compileAngular(), exports_compileAngular)).then((mod) => mod.compileAngular(angularEntries, angularDir, hmr, styleTransformConfig))) : {
45641
45691
  clientPaths: [...emptyStringArray],
45642
45692
  serverPaths: [...emptyStringArray]
45643
45693
  },
45644
- shouldCompileIslandSvelte ? Promise.resolve().then(() => (init_compileSvelte(), exports_compileSvelte)).then((mod) => mod.compileSvelte(islandSvelteSources, svelteDir, new Map, hmr, styleTransformConfig)) : {
45694
+ shouldCompileIslandSvelte ? tracePhase("compile/island-svelte", () => Promise.resolve().then(() => (init_compileSvelte(), exports_compileSvelte)).then((mod) => mod.compileSvelte(islandSvelteSources, svelteDir, new Map, hmr, styleTransformConfig))) : {
45645
45695
  svelteClientPaths: [...emptyStringArray]
45646
45696
  },
45647
- shouldCompileIslandVue ? Promise.resolve().then(() => (init_compileVue(), exports_compileVue)).then((mod) => mod.compileVue(islandVueSources, vueDir, hmr, styleTransformConfig)) : {
45697
+ shouldCompileIslandVue ? tracePhase("compile/island-vue", () => Promise.resolve().then(() => (init_compileVue(), exports_compileVue)).then((mod) => mod.compileVue(islandVueSources, vueDir, hmr, styleTransformConfig))) : {
45648
45698
  vueClientPaths: [...emptyStringArray]
45649
45699
  },
45650
- shouldCompileIslandAngular ? Promise.resolve().then(() => (init_compileAngular(), exports_compileAngular)).then((mod) => mod.compileAngular(islandAngularSources, angularDir, hmr, styleTransformConfig)) : {
45700
+ shouldCompileIslandAngular ? tracePhase("compile/island-angular", () => Promise.resolve().then(() => (init_compileAngular(), exports_compileAngular)).then((mod) => mod.compileAngular(islandAngularSources, angularDir, hmr, styleTransformConfig))) : {
45651
45701
  clientPaths: [...emptyStringArray]
45652
45702
  }
45653
45703
  ]);
@@ -45679,8 +45729,8 @@ ${content.slice(firstUseIdx)}`;
45679
45729
  const vueConventionSources = collectConventionSourceFiles(conventionsMap.vue);
45680
45730
  if (svelteConventionSources.length > 0 || vueConventionSources.length > 0) {
45681
45731
  const [svelteConvResult, vueConvResult] = await Promise.all([
45682
- svelteConventionSources.length > 0 && svelteDir ? Promise.resolve().then(() => (init_compileSvelte(), exports_compileSvelte)).then((mod) => mod.compileSvelte(svelteConventionSources, svelteDir, new Map, false, styleTransformConfig)) : { svelteServerPaths: emptyStringArray },
45683
- vueConventionSources.length > 0 && vueDir ? Promise.resolve().then(() => (init_compileVue(), exports_compileVue)).then((mod) => mod.compileVue(vueConventionSources, vueDir, false, styleTransformConfig)) : { vueServerPaths: emptyStringArray }
45732
+ svelteConventionSources.length > 0 && svelteDir ? tracePhase("compile/convention-svelte", () => Promise.resolve().then(() => (init_compileSvelte(), exports_compileSvelte)).then((mod) => mod.compileSvelte(svelteConventionSources, svelteDir, new Map, false, styleTransformConfig))) : { svelteServerPaths: emptyStringArray },
45733
+ vueConventionSources.length > 0 && vueDir ? tracePhase("compile/convention-vue", () => Promise.resolve().then(() => (init_compileVue(), exports_compileVue)).then((mod) => mod.compileVue(vueConventionSources, vueDir, false, styleTransformConfig))) : { vueServerPaths: emptyStringArray }
45684
45734
  ]);
45685
45735
  const copyConventionFiles = (framework, sources, compiledPaths) => {
45686
45736
  const destDir = join20(buildPath, "conventions", framework);
@@ -45715,7 +45765,7 @@ ${content.slice(firstUseIdx)}`;
45715
45765
  ...islandBootstrapPath ? [islandBootstrapPath] : [],
45716
45766
  ...urlReferencedFiles
45717
45767
  ];
45718
- const islandEntryResult = islandBuildInfo ? await generateIslandEntryPoints({
45768
+ const islandEntryResult = islandBuildInfo ? await tracePhase("islands/client-entry-generation", () => generateIslandEntryPoints({
45719
45769
  buildInfo: islandBuildInfo,
45720
45770
  buildPath,
45721
45771
  clientPathMaps: {
@@ -45723,7 +45773,7 @@ ${content.slice(firstUseIdx)}`;
45723
45773
  svelte: islandSvelteClientPathMap,
45724
45774
  vue: islandVueClientPathMap
45725
45775
  }
45726
- }) : {
45776
+ })) : {
45727
45777
  entries: [],
45728
45778
  generatedRoot: join20(buildPath, "_island_entries")
45729
45779
  };
@@ -45757,6 +45807,7 @@ ${content.slice(firstUseIdx)}`;
45757
45807
  vue: allVueEntries.length
45758
45808
  }
45759
45809
  });
45810
+ writeBuildTrace(buildPath);
45760
45811
  return {};
45761
45812
  }
45762
45813
  if (hmr && reactIndexesPath && reactClientEntryPoints.length > 0) {
@@ -45840,7 +45891,7 @@ ${content.slice(firstUseIdx)}`;
45840
45891
  globalCssResult,
45841
45892
  vueCssResult
45842
45893
  ] = await Promise.all([
45843
- serverEntryPoints.length > 0 ? bunBuild7({
45894
+ serverEntryPoints.length > 0 ? tracePhase("bun/server", () => bunBuild7({
45844
45895
  entrypoints: serverEntryPoints,
45845
45896
  external: [
45846
45897
  "react",
@@ -45862,9 +45913,9 @@ ${content.slice(firstUseIdx)}`;
45862
45913
  target: "bun",
45863
45914
  throw: false,
45864
45915
  tsconfig: "./tsconfig.json"
45865
- }) : undefined,
45866
- reactBuildConfig ? bunBuild7(reactBuildConfig) : undefined,
45867
- nonReactClientEntryPoints.length > 0 ? bunBuild7({
45916
+ })) : undefined,
45917
+ reactBuildConfig ? tracePhase("bun/react-client", () => bunBuild7(reactBuildConfig)) : undefined,
45918
+ nonReactClientEntryPoints.length > 0 ? tracePhase("bun/non-react-client", () => bunBuild7({
45868
45919
  define: vueDirectory ? vueFeatureFlags : undefined,
45869
45920
  entrypoints: nonReactClientEntryPoints,
45870
45921
  external: Object.keys(nonReactExternalPaths),
@@ -45882,8 +45933,8 @@ ${content.slice(firstUseIdx)}`;
45882
45933
  target: "browser",
45883
45934
  throw: false,
45884
45935
  tsconfig: "./tsconfig.json"
45885
- }) : undefined,
45886
- islandClientEntryPoints.length > 0 ? bunBuild7({
45936
+ })) : undefined,
45937
+ islandClientEntryPoints.length > 0 ? tracePhase("bun/island-client", () => bunBuild7({
45887
45938
  define: vueDirectory ? vueFeatureFlags : undefined,
45888
45939
  entrypoints: islandClientEntryPoints,
45889
45940
  external: Object.keys(nonReactExternalPaths),
@@ -45900,8 +45951,8 @@ ${content.slice(firstUseIdx)}`;
45900
45951
  target: "browser",
45901
45952
  throw: false,
45902
45953
  tsconfig: "./tsconfig.json"
45903
- }) : undefined,
45904
- globalCssEntries.length > 0 ? bunBuild7({
45954
+ })) : undefined,
45955
+ globalCssEntries.length > 0 ? tracePhase("bun/global-css", () => bunBuild7({
45905
45956
  entrypoints: globalCssEntries,
45906
45957
  naming: `[dir]/[name].[hash].[ext]`,
45907
45958
  outdir: stylesDir ? join20(buildPath, basename7(stylesDir)) : buildPath,
@@ -45909,14 +45960,14 @@ ${content.slice(firstUseIdx)}`;
45909
45960
  root: stylesDir || clientRoot,
45910
45961
  target: "browser",
45911
45962
  throw: false
45912
- }) : undefined,
45913
- vueCssPaths.length > 0 ? bunBuild7({
45963
+ })) : undefined,
45964
+ vueCssPaths.length > 0 ? tracePhase("bun/vue-css", () => bunBuild7({
45914
45965
  entrypoints: vueCssPaths,
45915
45966
  naming: `[name].[hash].[ext]`,
45916
45967
  outdir: join20(buildPath, assetsPath ? basename7(assetsPath) : "assets", "css"),
45917
45968
  target: "browser",
45918
45969
  throw: false
45919
- }) : undefined
45970
+ })) : undefined
45920
45971
  ]);
45921
45972
  const serverLogs = serverResult?.logs ?? [];
45922
45973
  const serverOutputs = serverResult?.outputs ?? [];
@@ -45930,10 +45981,10 @@ ${content.slice(firstUseIdx)}`;
45930
45981
  }
45931
45982
  const reactClientOutputPaths = reactClientOutputs.map((artifact) => artifact.path);
45932
45983
  if (vendorPaths && reactClientOutputPaths.length > 0) {
45933
- await rewriteReactImports(reactClientOutputPaths, vendorPaths);
45984
+ await tracePhase("postprocess/react-imports", () => rewriteReactImports(reactClientOutputPaths, vendorPaths));
45934
45985
  }
45935
45986
  if (hmr && reactClientOutputPaths.length > 0) {
45936
- await patchRefreshGlobals(reactClientOutputPaths);
45987
+ await tracePhase("postprocess/react-refresh-globals", () => patchRefreshGlobals(reactClientOutputPaths));
45937
45988
  }
45938
45989
  const nonReactClientLogs = nonReactClientResult?.logs ?? [];
45939
45990
  const nonReactClientOutputs = nonReactClientResult?.outputs ?? [];
@@ -45942,16 +45993,16 @@ ${content.slice(firstUseIdx)}`;
45942
45993
  const islandClientOutputs = islandClientResult?.outputs ?? [];
45943
45994
  const islandClientOutputPaths = islandClientOutputs.map((artifact) => artifact.path);
45944
45995
  if (vendorPaths && nonReactClientOutputPaths.length > 0) {
45945
- await rewriteReactImports(nonReactClientOutputPaths, vendorPaths);
45996
+ await tracePhase("postprocess/non-react-react-imports", () => rewriteReactImports(nonReactClientOutputPaths, vendorPaths));
45946
45997
  }
45947
45998
  if (hmr && nonReactClientOutputPaths.length > 0) {
45948
- await patchRefreshGlobals(nonReactClientOutputPaths);
45999
+ await tracePhase("postprocess/non-react-refresh-globals", () => patchRefreshGlobals(nonReactClientOutputPaths));
45949
46000
  }
45950
46001
  if (vendorPaths && islandClientOutputPaths.length > 0) {
45951
- await rewriteReactImports(islandClientOutputPaths, vendorPaths);
46002
+ await tracePhase("postprocess/island-react-imports", () => rewriteReactImports(islandClientOutputPaths, vendorPaths));
45952
46003
  }
45953
46004
  if (hmr && islandClientOutputPaths.length > 0) {
45954
- await patchRefreshGlobals(islandClientOutputPaths);
46005
+ await tracePhase("postprocess/island-refresh-globals", () => patchRefreshGlobals(islandClientOutputPaths));
45955
46006
  }
45956
46007
  if (nonReactClientResult && !nonReactClientResult.success && nonReactClientLogs.length > 0) {
45957
46008
  extractBuildError(nonReactClientLogs, "non-react-client", "Non-React client", frameworkNames, isIncremental, throwOnError);
@@ -45971,11 +46022,11 @@ ${content.slice(firstUseIdx)}`;
45971
46022
  };
45972
46023
  if (nonReactClientOutputs.length > 0 && Object.keys(allNonReactVendorPaths).length > 0) {
45973
46024
  const { rewriteImports: rewriteImports2 } = await Promise.resolve().then(() => (init_rewriteImports(), exports_rewriteImports));
45974
- await rewriteImports2(nonReactClientOutputs.map((artifact) => artifact.path), allNonReactVendorPaths);
46025
+ await tracePhase("postprocess/non-react-vendor-imports", () => rewriteImports2(nonReactClientOutputs.map((artifact) => artifact.path), allNonReactVendorPaths));
45975
46026
  }
45976
46027
  if (islandClientOutputs.length > 0 && Object.keys(allIslandVendorPaths).length > 0) {
45977
46028
  const { rewriteImports: rewriteImports2 } = await Promise.resolve().then(() => (init_rewriteImports(), exports_rewriteImports));
45978
- await rewriteImports2(islandClientOutputs.map((artifact) => artifact.path), allIslandVendorPaths);
46029
+ await tracePhase("postprocess/island-vendor-imports", () => rewriteImports2(islandClientOutputs.map((artifact) => artifact.path), allIslandVendorPaths));
45979
46030
  }
45980
46031
  const cssLogs = [
45981
46032
  ...globalCssResult?.logs ?? [],
@@ -45997,11 +46048,11 @@ ${content.slice(firstUseIdx)}`;
45997
46048
  ];
45998
46049
  if (urlReferencedFiles.length > 0) {
45999
46050
  const urlFileMap = buildUrlFileMap(urlReferencedFiles, hmr, projectRoot, buildPath, nonReactClientOutputs);
46000
- rewriteUrlReferences(allClientOutputPaths, urlFileMap);
46051
+ await tracePhase("postprocess/url-references", () => rewriteUrlReferences(allClientOutputPaths, urlFileMap));
46001
46052
  }
46002
46053
  const vueOutputPaths = nonReactClientOutputs.map((artifact) => artifact.path).filter((path2) => path2.includes("/vue/"));
46003
46054
  if (hmr && vueDirectory) {
46004
- vueOutputPaths.forEach((outputPath) => injectVueComposableTracking(outputPath, projectRoot));
46055
+ await tracePhase("postprocess/vue-hmr", () => vueOutputPaths.forEach((outputPath) => injectVueComposableTracking(outputPath, projectRoot)));
46005
46056
  }
46006
46057
  const allLogs = [
46007
46058
  ...serverLogs,
@@ -46091,18 +46142,21 @@ ${content.slice(firstUseIdx)}`;
46091
46142
  manifest[fileName] = htmxFile;
46092
46143
  }
46093
46144
  };
46094
- await Promise.all([processHtmlPages(), processHtmxPages()]);
46145
+ await Promise.all([
46146
+ tracePhase("postprocess/html-pages", processHtmlPages),
46147
+ tracePhase("postprocess/htmx-pages", processHtmxPages)
46148
+ ]);
46095
46149
  if (!isIncremental) {
46096
- await cleanStaleOutputs(buildPath, [
46150
+ await tracePhase("cleanup/stale-outputs", () => cleanStaleOutputs(buildPath, [
46097
46151
  ...serverOutputs.map((a) => a.path),
46098
46152
  ...reactClientOutputs.map((a) => a.path),
46099
46153
  ...nonReactClientOutputs.map((a) => a.path),
46100
46154
  ...islandClientOutputs.map((a) => a.path),
46101
46155
  ...cssOutputs.map((a) => a.path)
46102
- ]);
46156
+ ]));
46103
46157
  }
46104
46158
  if (hmr) {
46105
- await copyDevIndexes({
46159
+ await tracePhase("dev/copy-indexes", () => copyDevIndexes({
46106
46160
  buildPath,
46107
46161
  reactIndexesPath,
46108
46162
  reactPagesPath,
@@ -46112,14 +46166,14 @@ ${content.slice(firstUseIdx)}`;
46112
46166
  vueDir,
46113
46167
  vueEntries,
46114
46168
  vuePagesPath
46115
- });
46169
+ }));
46116
46170
  }
46117
- await cleanup({
46171
+ await tracePhase("cleanup/generated", () => cleanup({
46118
46172
  angularDir,
46119
46173
  reactDir,
46120
46174
  svelteDir,
46121
46175
  vueDir
46122
- });
46176
+ }));
46123
46177
  if (!isIncremental) {
46124
46178
  globalThis.__hmrBuildDuration = performance.now() - buildStart;
46125
46179
  }
@@ -46128,12 +46182,15 @@ ${content.slice(firstUseIdx)}`;
46128
46182
  frameworks: frameworkNames,
46129
46183
  mode: mode ?? (isDev ? "development" : "production")
46130
46184
  });
46131
- if (isIncremental)
46185
+ if (isIncremental) {
46186
+ writeBuildTrace(buildPath);
46132
46187
  return { conventions: conventionsMap, manifest };
46188
+ }
46133
46189
  writeFileSync7(join20(buildPath, "manifest.json"), JSON.stringify(manifest, null, "\t"));
46134
46190
  if (Object.keys(conventionsMap).length > 0) {
46135
46191
  writeFileSync7(join20(buildPath, "conventions.json"), JSON.stringify(conventionsMap, null, "\t"));
46136
46192
  }
46193
+ writeBuildTrace(buildPath);
46137
46194
  return { conventions: conventionsMap, manifest };
46138
46195
  };
46139
46196
  var init_build = __esm(() => {
@@ -50128,5 +50185,5 @@ export {
50128
50185
  build
50129
50186
  };
50130
50187
 
50131
- //# debugId=7C0EA9CE9BD464E064756E2164756E21
50188
+ //# debugId=144672485F2A6C2364756E2164756E21
50132
50189
  //# sourceMappingURL=build.js.map