@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 +114 -57
- package/dist/build.js.map +3 -3
- package/dist/index.js +114 -57
- package/dist/index.js.map +3 -3
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -45296,7 +45296,10 @@ import {
|
|
|
45296
45296
|
import { basename as basename8, dirname as dirname12, join as join20, relative as relative10, resolve as resolve21 } from "path";
|
|
45297
45297
|
import { cwd, env as env3, exit } from "process";
|
|
45298
45298
|
var {build: bunBuild7, Glob: Glob7 } = globalThis.Bun;
|
|
45299
|
-
var isDev2,
|
|
45299
|
+
var isDev2, isBuildTraceEnabled = () => {
|
|
45300
|
+
const value2 = env3.ABSOLUTE_BUILD_TRACE?.toLowerCase();
|
|
45301
|
+
return value2 === "1" || value2 === "true" || value2 === "yes";
|
|
45302
|
+
}, collectConventionSourceFiles = (entry) => {
|
|
45300
45303
|
if (!entry)
|
|
45301
45304
|
return [];
|
|
45302
45305
|
const files = [];
|
|
@@ -45622,7 +45625,53 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45622
45625
|
}) => {
|
|
45623
45626
|
const buildStart = performance.now();
|
|
45624
45627
|
const projectRoot = cwd();
|
|
45625
|
-
|
|
45628
|
+
const traceEnabled = isBuildTraceEnabled();
|
|
45629
|
+
const traceEvents = [];
|
|
45630
|
+
let traceFrameworkNames = [];
|
|
45631
|
+
const tracePhase = async (name, fn, metadata2) => {
|
|
45632
|
+
if (!traceEnabled)
|
|
45633
|
+
return await fn();
|
|
45634
|
+
const phaseStart = performance.now();
|
|
45635
|
+
try {
|
|
45636
|
+
const result = await fn();
|
|
45637
|
+
traceEvents.push({
|
|
45638
|
+
durationMs: performance.now() - phaseStart,
|
|
45639
|
+
metadata: metadata2,
|
|
45640
|
+
name,
|
|
45641
|
+
ok: true,
|
|
45642
|
+
startMs: phaseStart - buildStart
|
|
45643
|
+
});
|
|
45644
|
+
return result;
|
|
45645
|
+
} catch (error) {
|
|
45646
|
+
traceEvents.push({
|
|
45647
|
+
durationMs: performance.now() - phaseStart,
|
|
45648
|
+
metadata: {
|
|
45649
|
+
...metadata2,
|
|
45650
|
+
error: error instanceof Error ? error.message : String(error)
|
|
45651
|
+
},
|
|
45652
|
+
name,
|
|
45653
|
+
ok: false,
|
|
45654
|
+
startMs: phaseStart - buildStart
|
|
45655
|
+
});
|
|
45656
|
+
throw error;
|
|
45657
|
+
}
|
|
45658
|
+
};
|
|
45659
|
+
const writeBuildTrace = (buildPath2) => {
|
|
45660
|
+
if (!traceEnabled)
|
|
45661
|
+
return;
|
|
45662
|
+
const traceDir = join20(buildPath2, ".absolute-trace");
|
|
45663
|
+
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
45664
|
+
mkdirSync10(traceDir, { recursive: true });
|
|
45665
|
+
writeFileSync7(join20(traceDir, `build-trace-${timestamp}.json`), JSON.stringify({
|
|
45666
|
+
events: traceEvents,
|
|
45667
|
+
frameworks: traceFrameworkNames,
|
|
45668
|
+
generatedAt: new Date().toISOString(),
|
|
45669
|
+
mode: mode ?? (isDev2 ? "development" : "production"),
|
|
45670
|
+
totalDurationMs: performance.now() - buildStart,
|
|
45671
|
+
version: 1
|
|
45672
|
+
}, null, 2));
|
|
45673
|
+
};
|
|
45674
|
+
await tracePhase("absolute/version", () => resolveAbsoluteVersion());
|
|
45626
45675
|
const isIncremental = incrementalFiles && incrementalFiles.length > 0;
|
|
45627
45676
|
const styleTransformConfig = createStyleTransformConfig(stylePreprocessors, postcss);
|
|
45628
45677
|
const stylePreprocessorPlugin2 = createStylePreprocessorPlugin(styleTransformConfig);
|
|
@@ -45667,6 +45716,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45667
45716
|
vueDir && "vue",
|
|
45668
45717
|
angularDir && "angular"
|
|
45669
45718
|
].filter((name) => Boolean(name));
|
|
45719
|
+
traceFrameworkNames = frameworkNames;
|
|
45670
45720
|
sendTelemetryEvent("build:start", {
|
|
45671
45721
|
framework: frameworkNames[0],
|
|
45672
45722
|
frameworks: frameworkNames,
|
|
@@ -45708,9 +45758,9 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45708
45758
|
serverOutDir = buildPath;
|
|
45709
45759
|
}
|
|
45710
45760
|
const publicPath = publicDirectory && validateSafePath(publicDirectory, projectRoot);
|
|
45711
|
-
mkdirSync10(buildPath, { recursive: true });
|
|
45761
|
+
await tracePhase("build-dir/create", () => mkdirSync10(buildPath, { recursive: true }));
|
|
45712
45762
|
if (publicPath)
|
|
45713
|
-
cpSync(publicPath, buildPath, { force: true, recursive: true });
|
|
45763
|
+
await tracePhase("public/copy", () => cpSync(publicPath, buildPath, { force: true, recursive: true }));
|
|
45714
45764
|
const filterToIncrementalEntries = (entryPoints, mapToSource) => {
|
|
45715
45765
|
if (!isIncremental || !incrementalFiles)
|
|
45716
45766
|
return entryPoints;
|
|
@@ -45727,15 +45777,15 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45727
45777
|
return matchingEntries;
|
|
45728
45778
|
};
|
|
45729
45779
|
if (reactIndexesPath && reactPagesPath) {
|
|
45730
|
-
await generateReactIndexFiles(reactPagesPath, reactIndexesPath, hmr);
|
|
45780
|
+
await tracePhase("react/index-generation", () => generateReactIndexFiles(reactPagesPath, reactIndexesPath, hmr));
|
|
45731
45781
|
}
|
|
45732
45782
|
if (assetsPath && (!isIncremental || normalizedIncrementalFiles?.some((f) => f.includes("/assets/")))) {
|
|
45733
|
-
cpSync(assetsPath, join20(buildPath, "assets"), {
|
|
45783
|
+
await tracePhase("assets/copy", () => cpSync(assetsPath, join20(buildPath, "assets"), {
|
|
45734
45784
|
force: true,
|
|
45735
45785
|
recursive: true
|
|
45736
|
-
});
|
|
45786
|
+
}));
|
|
45737
45787
|
}
|
|
45738
|
-
const tailwindPromise = tailwind && (!isIncremental || normalizedIncrementalFiles?.some(isStylePath)) ? compileTailwindConfig(tailwind, buildPath, styleTransformConfig) : undefined;
|
|
45788
|
+
const tailwindPromise = tailwind && (!isIncremental || normalizedIncrementalFiles?.some(isStylePath)) ? tracePhase("tailwind/build", () => compileTailwindConfig(tailwind, buildPath, styleTransformConfig)) : undefined;
|
|
45739
45789
|
const emptyConventionResult = {
|
|
45740
45790
|
conventions: undefined,
|
|
45741
45791
|
pageFiles: []
|
|
@@ -45751,13 +45801,13 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45751
45801
|
allGlobalCssEntries
|
|
45752
45802
|
] = await Promise.all([
|
|
45753
45803
|
tailwindPromise,
|
|
45754
|
-
reactIndexesPath ? scanEntryPoints(reactIndexesPath, "*.tsx") : [],
|
|
45755
|
-
htmlScriptsPath ? scanEntryPoints(htmlScriptsPath, "*.{js,ts}") : [],
|
|
45756
|
-
reactPagesPath ? scanConventions(reactPagesPath, "*.tsx") : emptyConventionResult,
|
|
45757
|
-
sveltePagesPath ? scanConventions(sveltePagesPath, "*.svelte") : emptyConventionResult,
|
|
45758
|
-
vuePagesPath ? scanConventions(vuePagesPath, "*.vue") : emptyConventionResult,
|
|
45759
|
-
angularPagesPath ? scanConventions(angularPagesPath, "*.ts") : emptyConventionResult,
|
|
45760
|
-
stylesDir ? scanCssEntryPoints(stylesDir, stylesIgnore) : []
|
|
45804
|
+
reactIndexesPath ? tracePhase("scan/react-indexes", () => scanEntryPoints(reactIndexesPath, "*.tsx")) : [],
|
|
45805
|
+
htmlScriptsPath ? tracePhase("scan/html-scripts", () => scanEntryPoints(htmlScriptsPath, "*.{js,ts}")) : [],
|
|
45806
|
+
reactPagesPath ? tracePhase("scan/react-conventions", () => scanConventions(reactPagesPath, "*.tsx")) : emptyConventionResult,
|
|
45807
|
+
sveltePagesPath ? tracePhase("scan/svelte-conventions", () => scanConventions(sveltePagesPath, "*.svelte")) : emptyConventionResult,
|
|
45808
|
+
vuePagesPath ? tracePhase("scan/vue-conventions", () => scanConventions(vuePagesPath, "*.vue")) : emptyConventionResult,
|
|
45809
|
+
angularPagesPath ? tracePhase("scan/angular-conventions", () => scanConventions(angularPagesPath, "*.ts")) : emptyConventionResult,
|
|
45810
|
+
stylesDir ? tracePhase("scan/css", () => scanCssEntryPoints(stylesDir, stylesIgnore)) : []
|
|
45761
45811
|
]);
|
|
45762
45812
|
const allSvelteEntries = svelteConventionResult.pageFiles;
|
|
45763
45813
|
const allVueEntries = vueConventionResult.pageFiles;
|
|
@@ -45797,12 +45847,12 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45797
45847
|
htmlDir,
|
|
45798
45848
|
htmxDir
|
|
45799
45849
|
].filter((dir) => Boolean(dir));
|
|
45800
|
-
const urlReferencedFilesPromise = scanWorkerReferences(allFrameworkDirs);
|
|
45850
|
+
const urlReferencedFilesPromise = tracePhase("scan/worker-references", () => scanWorkerReferences(allFrameworkDirs));
|
|
45801
45851
|
const shouldCompileSvelte = svelteDir && svelteEntries.length > 0;
|
|
45802
45852
|
const shouldCompileVue = vueDir && vueEntries.length > 0;
|
|
45803
45853
|
const shouldCompileAngular = angularDir && angularEntries.length > 0;
|
|
45804
45854
|
const emptyStringArray = [];
|
|
45805
|
-
const islandBuildInfo = islandRegistryPath ? await loadIslandRegistryBuildInfo(islandRegistryPath) : null;
|
|
45855
|
+
const islandBuildInfo = islandRegistryPath ? await tracePhase("islands/registry", () => loadIslandRegistryBuildInfo(islandRegistryPath)) : null;
|
|
45806
45856
|
const islandFrameworkSources = islandBuildInfo ? collectIslandFrameworkSources(islandBuildInfo) : {};
|
|
45807
45857
|
const islandSvelteSources = islandFrameworkSources.svelte ?? emptyStringArray;
|
|
45808
45858
|
const islandVueSources = islandFrameworkSources.vue ?? emptyStringArray;
|
|
@@ -45818,28 +45868,28 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45818
45868
|
{ vueClientPaths: islandVueClientPaths },
|
|
45819
45869
|
{ clientPaths: islandAngularClientPaths }
|
|
45820
45870
|
] = await Promise.all([
|
|
45821
|
-
shouldCompileSvelte ? Promise.resolve().then(() => (init_compileSvelte(), exports_compileSvelte)).then((mod) => mod.compileSvelte(svelteEntries, svelteDir, new Map, hmr, styleTransformConfig)) : {
|
|
45871
|
+
shouldCompileSvelte ? tracePhase("compile/svelte", () => Promise.resolve().then(() => (init_compileSvelte(), exports_compileSvelte)).then((mod) => mod.compileSvelte(svelteEntries, svelteDir, new Map, hmr, styleTransformConfig))) : {
|
|
45822
45872
|
svelteClientPaths: [...emptyStringArray],
|
|
45823
45873
|
svelteIndexPaths: [...emptyStringArray],
|
|
45824
45874
|
svelteServerPaths: [...emptyStringArray]
|
|
45825
45875
|
},
|
|
45826
|
-
shouldCompileVue ? Promise.resolve().then(() => (init_compileVue(), exports_compileVue)).then((mod) => mod.compileVue(vueEntries, vueDir, hmr, styleTransformConfig)) : {
|
|
45876
|
+
shouldCompileVue ? tracePhase("compile/vue", () => Promise.resolve().then(() => (init_compileVue(), exports_compileVue)).then((mod) => mod.compileVue(vueEntries, vueDir, hmr, styleTransformConfig))) : {
|
|
45827
45877
|
vueClientPaths: [...emptyStringArray],
|
|
45828
45878
|
vueCssPaths: [...emptyStringArray],
|
|
45829
45879
|
vueIndexPaths: [...emptyStringArray],
|
|
45830
45880
|
vueServerPaths: [...emptyStringArray]
|
|
45831
45881
|
},
|
|
45832
|
-
shouldCompileAngular ? Promise.resolve().then(() => (init_compileAngular(), exports_compileAngular)).then((mod) => mod.compileAngular(angularEntries, angularDir, hmr, styleTransformConfig)) : {
|
|
45882
|
+
shouldCompileAngular ? tracePhase("compile/angular", () => Promise.resolve().then(() => (init_compileAngular(), exports_compileAngular)).then((mod) => mod.compileAngular(angularEntries, angularDir, hmr, styleTransformConfig))) : {
|
|
45833
45883
|
clientPaths: [...emptyStringArray],
|
|
45834
45884
|
serverPaths: [...emptyStringArray]
|
|
45835
45885
|
},
|
|
45836
|
-
shouldCompileIslandSvelte ? Promise.resolve().then(() => (init_compileSvelte(), exports_compileSvelte)).then((mod) => mod.compileSvelte(islandSvelteSources, svelteDir, new Map, hmr, styleTransformConfig)) : {
|
|
45886
|
+
shouldCompileIslandSvelte ? tracePhase("compile/island-svelte", () => Promise.resolve().then(() => (init_compileSvelte(), exports_compileSvelte)).then((mod) => mod.compileSvelte(islandSvelteSources, svelteDir, new Map, hmr, styleTransformConfig))) : {
|
|
45837
45887
|
svelteClientPaths: [...emptyStringArray]
|
|
45838
45888
|
},
|
|
45839
|
-
shouldCompileIslandVue ? Promise.resolve().then(() => (init_compileVue(), exports_compileVue)).then((mod) => mod.compileVue(islandVueSources, vueDir, hmr, styleTransformConfig)) : {
|
|
45889
|
+
shouldCompileIslandVue ? tracePhase("compile/island-vue", () => Promise.resolve().then(() => (init_compileVue(), exports_compileVue)).then((mod) => mod.compileVue(islandVueSources, vueDir, hmr, styleTransformConfig))) : {
|
|
45840
45890
|
vueClientPaths: [...emptyStringArray]
|
|
45841
45891
|
},
|
|
45842
|
-
shouldCompileIslandAngular ? Promise.resolve().then(() => (init_compileAngular(), exports_compileAngular)).then((mod) => mod.compileAngular(islandAngularSources, angularDir, hmr, styleTransformConfig)) : {
|
|
45892
|
+
shouldCompileIslandAngular ? tracePhase("compile/island-angular", () => Promise.resolve().then(() => (init_compileAngular(), exports_compileAngular)).then((mod) => mod.compileAngular(islandAngularSources, angularDir, hmr, styleTransformConfig))) : {
|
|
45843
45893
|
clientPaths: [...emptyStringArray]
|
|
45844
45894
|
}
|
|
45845
45895
|
]);
|
|
@@ -45871,8 +45921,8 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45871
45921
|
const vueConventionSources = collectConventionSourceFiles(conventionsMap.vue);
|
|
45872
45922
|
if (svelteConventionSources.length > 0 || vueConventionSources.length > 0) {
|
|
45873
45923
|
const [svelteConvResult, vueConvResult] = await Promise.all([
|
|
45874
|
-
svelteConventionSources.length > 0 && svelteDir ? Promise.resolve().then(() => (init_compileSvelte(), exports_compileSvelte)).then((mod) => mod.compileSvelte(svelteConventionSources, svelteDir, new Map, false, styleTransformConfig)) : { svelteServerPaths: emptyStringArray },
|
|
45875
|
-
vueConventionSources.length > 0 && vueDir ? Promise.resolve().then(() => (init_compileVue(), exports_compileVue)).then((mod) => mod.compileVue(vueConventionSources, vueDir, false, styleTransformConfig)) : { vueServerPaths: emptyStringArray }
|
|
45924
|
+
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 },
|
|
45925
|
+
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 }
|
|
45876
45926
|
]);
|
|
45877
45927
|
const copyConventionFiles = (framework, sources, compiledPaths) => {
|
|
45878
45928
|
const destDir = join20(buildPath, "conventions", framework);
|
|
@@ -45907,7 +45957,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45907
45957
|
...islandBootstrapPath ? [islandBootstrapPath] : [],
|
|
45908
45958
|
...urlReferencedFiles
|
|
45909
45959
|
];
|
|
45910
|
-
const islandEntryResult = islandBuildInfo ? await generateIslandEntryPoints({
|
|
45960
|
+
const islandEntryResult = islandBuildInfo ? await tracePhase("islands/client-entry-generation", () => generateIslandEntryPoints({
|
|
45911
45961
|
buildInfo: islandBuildInfo,
|
|
45912
45962
|
buildPath,
|
|
45913
45963
|
clientPathMaps: {
|
|
@@ -45915,7 +45965,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45915
45965
|
svelte: islandSvelteClientPathMap,
|
|
45916
45966
|
vue: islandVueClientPathMap
|
|
45917
45967
|
}
|
|
45918
|
-
}) : {
|
|
45968
|
+
})) : {
|
|
45919
45969
|
entries: [],
|
|
45920
45970
|
generatedRoot: join20(buildPath, "_island_entries")
|
|
45921
45971
|
};
|
|
@@ -45949,6 +45999,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45949
45999
|
vue: allVueEntries.length
|
|
45950
46000
|
}
|
|
45951
46001
|
});
|
|
46002
|
+
writeBuildTrace(buildPath);
|
|
45952
46003
|
return {};
|
|
45953
46004
|
}
|
|
45954
46005
|
if (hmr && reactIndexesPath && reactClientEntryPoints.length > 0) {
|
|
@@ -46032,7 +46083,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
46032
46083
|
globalCssResult,
|
|
46033
46084
|
vueCssResult
|
|
46034
46085
|
] = await Promise.all([
|
|
46035
|
-
serverEntryPoints.length > 0 ? bunBuild7({
|
|
46086
|
+
serverEntryPoints.length > 0 ? tracePhase("bun/server", () => bunBuild7({
|
|
46036
46087
|
entrypoints: serverEntryPoints,
|
|
46037
46088
|
external: [
|
|
46038
46089
|
"react",
|
|
@@ -46054,9 +46105,9 @@ ${content.slice(firstUseIdx)}`;
|
|
|
46054
46105
|
target: "bun",
|
|
46055
46106
|
throw: false,
|
|
46056
46107
|
tsconfig: "./tsconfig.json"
|
|
46057
|
-
}) : undefined,
|
|
46058
|
-
reactBuildConfig ? bunBuild7(reactBuildConfig) : undefined,
|
|
46059
|
-
nonReactClientEntryPoints.length > 0 ? bunBuild7({
|
|
46108
|
+
})) : undefined,
|
|
46109
|
+
reactBuildConfig ? tracePhase("bun/react-client", () => bunBuild7(reactBuildConfig)) : undefined,
|
|
46110
|
+
nonReactClientEntryPoints.length > 0 ? tracePhase("bun/non-react-client", () => bunBuild7({
|
|
46060
46111
|
define: vueDirectory ? vueFeatureFlags : undefined,
|
|
46061
46112
|
entrypoints: nonReactClientEntryPoints,
|
|
46062
46113
|
external: Object.keys(nonReactExternalPaths),
|
|
@@ -46074,8 +46125,8 @@ ${content.slice(firstUseIdx)}`;
|
|
|
46074
46125
|
target: "browser",
|
|
46075
46126
|
throw: false,
|
|
46076
46127
|
tsconfig: "./tsconfig.json"
|
|
46077
|
-
}) : undefined,
|
|
46078
|
-
islandClientEntryPoints.length > 0 ? bunBuild7({
|
|
46128
|
+
})) : undefined,
|
|
46129
|
+
islandClientEntryPoints.length > 0 ? tracePhase("bun/island-client", () => bunBuild7({
|
|
46079
46130
|
define: vueDirectory ? vueFeatureFlags : undefined,
|
|
46080
46131
|
entrypoints: islandClientEntryPoints,
|
|
46081
46132
|
external: Object.keys(nonReactExternalPaths),
|
|
@@ -46092,8 +46143,8 @@ ${content.slice(firstUseIdx)}`;
|
|
|
46092
46143
|
target: "browser",
|
|
46093
46144
|
throw: false,
|
|
46094
46145
|
tsconfig: "./tsconfig.json"
|
|
46095
|
-
}) : undefined,
|
|
46096
|
-
globalCssEntries.length > 0 ? bunBuild7({
|
|
46146
|
+
})) : undefined,
|
|
46147
|
+
globalCssEntries.length > 0 ? tracePhase("bun/global-css", () => bunBuild7({
|
|
46097
46148
|
entrypoints: globalCssEntries,
|
|
46098
46149
|
naming: `[dir]/[name].[hash].[ext]`,
|
|
46099
46150
|
outdir: stylesDir ? join20(buildPath, basename8(stylesDir)) : buildPath,
|
|
@@ -46101,14 +46152,14 @@ ${content.slice(firstUseIdx)}`;
|
|
|
46101
46152
|
root: stylesDir || clientRoot,
|
|
46102
46153
|
target: "browser",
|
|
46103
46154
|
throw: false
|
|
46104
|
-
}) : undefined,
|
|
46105
|
-
vueCssPaths.length > 0 ? bunBuild7({
|
|
46155
|
+
})) : undefined,
|
|
46156
|
+
vueCssPaths.length > 0 ? tracePhase("bun/vue-css", () => bunBuild7({
|
|
46106
46157
|
entrypoints: vueCssPaths,
|
|
46107
46158
|
naming: `[name].[hash].[ext]`,
|
|
46108
46159
|
outdir: join20(buildPath, assetsPath ? basename8(assetsPath) : "assets", "css"),
|
|
46109
46160
|
target: "browser",
|
|
46110
46161
|
throw: false
|
|
46111
|
-
}) : undefined
|
|
46162
|
+
})) : undefined
|
|
46112
46163
|
]);
|
|
46113
46164
|
const serverLogs = serverResult?.logs ?? [];
|
|
46114
46165
|
const serverOutputs = serverResult?.outputs ?? [];
|
|
@@ -46122,10 +46173,10 @@ ${content.slice(firstUseIdx)}`;
|
|
|
46122
46173
|
}
|
|
46123
46174
|
const reactClientOutputPaths = reactClientOutputs.map((artifact) => artifact.path);
|
|
46124
46175
|
if (vendorPaths && reactClientOutputPaths.length > 0) {
|
|
46125
|
-
await rewriteReactImports(reactClientOutputPaths, vendorPaths);
|
|
46176
|
+
await tracePhase("postprocess/react-imports", () => rewriteReactImports(reactClientOutputPaths, vendorPaths));
|
|
46126
46177
|
}
|
|
46127
46178
|
if (hmr && reactClientOutputPaths.length > 0) {
|
|
46128
|
-
await patchRefreshGlobals(reactClientOutputPaths);
|
|
46179
|
+
await tracePhase("postprocess/react-refresh-globals", () => patchRefreshGlobals(reactClientOutputPaths));
|
|
46129
46180
|
}
|
|
46130
46181
|
const nonReactClientLogs = nonReactClientResult?.logs ?? [];
|
|
46131
46182
|
const nonReactClientOutputs = nonReactClientResult?.outputs ?? [];
|
|
@@ -46134,16 +46185,16 @@ ${content.slice(firstUseIdx)}`;
|
|
|
46134
46185
|
const islandClientOutputs = islandClientResult?.outputs ?? [];
|
|
46135
46186
|
const islandClientOutputPaths = islandClientOutputs.map((artifact) => artifact.path);
|
|
46136
46187
|
if (vendorPaths && nonReactClientOutputPaths.length > 0) {
|
|
46137
|
-
await rewriteReactImports(nonReactClientOutputPaths, vendorPaths);
|
|
46188
|
+
await tracePhase("postprocess/non-react-react-imports", () => rewriteReactImports(nonReactClientOutputPaths, vendorPaths));
|
|
46138
46189
|
}
|
|
46139
46190
|
if (hmr && nonReactClientOutputPaths.length > 0) {
|
|
46140
|
-
await patchRefreshGlobals(nonReactClientOutputPaths);
|
|
46191
|
+
await tracePhase("postprocess/non-react-refresh-globals", () => patchRefreshGlobals(nonReactClientOutputPaths));
|
|
46141
46192
|
}
|
|
46142
46193
|
if (vendorPaths && islandClientOutputPaths.length > 0) {
|
|
46143
|
-
await rewriteReactImports(islandClientOutputPaths, vendorPaths);
|
|
46194
|
+
await tracePhase("postprocess/island-react-imports", () => rewriteReactImports(islandClientOutputPaths, vendorPaths));
|
|
46144
46195
|
}
|
|
46145
46196
|
if (hmr && islandClientOutputPaths.length > 0) {
|
|
46146
|
-
await patchRefreshGlobals(islandClientOutputPaths);
|
|
46197
|
+
await tracePhase("postprocess/island-refresh-globals", () => patchRefreshGlobals(islandClientOutputPaths));
|
|
46147
46198
|
}
|
|
46148
46199
|
if (nonReactClientResult && !nonReactClientResult.success && nonReactClientLogs.length > 0) {
|
|
46149
46200
|
extractBuildError(nonReactClientLogs, "non-react-client", "Non-React client", frameworkNames, isIncremental, throwOnError);
|
|
@@ -46163,11 +46214,11 @@ ${content.slice(firstUseIdx)}`;
|
|
|
46163
46214
|
};
|
|
46164
46215
|
if (nonReactClientOutputs.length > 0 && Object.keys(allNonReactVendorPaths).length > 0) {
|
|
46165
46216
|
const { rewriteImports: rewriteImports2 } = await Promise.resolve().then(() => (init_rewriteImports(), exports_rewriteImports));
|
|
46166
|
-
await rewriteImports2(nonReactClientOutputs.map((artifact) => artifact.path), allNonReactVendorPaths);
|
|
46217
|
+
await tracePhase("postprocess/non-react-vendor-imports", () => rewriteImports2(nonReactClientOutputs.map((artifact) => artifact.path), allNonReactVendorPaths));
|
|
46167
46218
|
}
|
|
46168
46219
|
if (islandClientOutputs.length > 0 && Object.keys(allIslandVendorPaths).length > 0) {
|
|
46169
46220
|
const { rewriteImports: rewriteImports2 } = await Promise.resolve().then(() => (init_rewriteImports(), exports_rewriteImports));
|
|
46170
|
-
await rewriteImports2(islandClientOutputs.map((artifact) => artifact.path), allIslandVendorPaths);
|
|
46221
|
+
await tracePhase("postprocess/island-vendor-imports", () => rewriteImports2(islandClientOutputs.map((artifact) => artifact.path), allIslandVendorPaths));
|
|
46171
46222
|
}
|
|
46172
46223
|
const cssLogs = [
|
|
46173
46224
|
...globalCssResult?.logs ?? [],
|
|
@@ -46189,11 +46240,11 @@ ${content.slice(firstUseIdx)}`;
|
|
|
46189
46240
|
];
|
|
46190
46241
|
if (urlReferencedFiles.length > 0) {
|
|
46191
46242
|
const urlFileMap = buildUrlFileMap(urlReferencedFiles, hmr, projectRoot, buildPath, nonReactClientOutputs);
|
|
46192
|
-
rewriteUrlReferences(allClientOutputPaths, urlFileMap);
|
|
46243
|
+
await tracePhase("postprocess/url-references", () => rewriteUrlReferences(allClientOutputPaths, urlFileMap));
|
|
46193
46244
|
}
|
|
46194
46245
|
const vueOutputPaths = nonReactClientOutputs.map((artifact) => artifact.path).filter((path2) => path2.includes("/vue/"));
|
|
46195
46246
|
if (hmr && vueDirectory) {
|
|
46196
|
-
vueOutputPaths.forEach((outputPath) => injectVueComposableTracking(outputPath, projectRoot));
|
|
46247
|
+
await tracePhase("postprocess/vue-hmr", () => vueOutputPaths.forEach((outputPath) => injectVueComposableTracking(outputPath, projectRoot)));
|
|
46197
46248
|
}
|
|
46198
46249
|
const allLogs = [
|
|
46199
46250
|
...serverLogs,
|
|
@@ -46283,18 +46334,21 @@ ${content.slice(firstUseIdx)}`;
|
|
|
46283
46334
|
manifest[fileName] = htmxFile;
|
|
46284
46335
|
}
|
|
46285
46336
|
};
|
|
46286
|
-
await Promise.all([
|
|
46337
|
+
await Promise.all([
|
|
46338
|
+
tracePhase("postprocess/html-pages", processHtmlPages),
|
|
46339
|
+
tracePhase("postprocess/htmx-pages", processHtmxPages)
|
|
46340
|
+
]);
|
|
46287
46341
|
if (!isIncremental) {
|
|
46288
|
-
await cleanStaleOutputs(buildPath, [
|
|
46342
|
+
await tracePhase("cleanup/stale-outputs", () => cleanStaleOutputs(buildPath, [
|
|
46289
46343
|
...serverOutputs.map((a) => a.path),
|
|
46290
46344
|
...reactClientOutputs.map((a) => a.path),
|
|
46291
46345
|
...nonReactClientOutputs.map((a) => a.path),
|
|
46292
46346
|
...islandClientOutputs.map((a) => a.path),
|
|
46293
46347
|
...cssOutputs.map((a) => a.path)
|
|
46294
|
-
]);
|
|
46348
|
+
]));
|
|
46295
46349
|
}
|
|
46296
46350
|
if (hmr) {
|
|
46297
|
-
await copyDevIndexes({
|
|
46351
|
+
await tracePhase("dev/copy-indexes", () => copyDevIndexes({
|
|
46298
46352
|
buildPath,
|
|
46299
46353
|
reactIndexesPath,
|
|
46300
46354
|
reactPagesPath,
|
|
@@ -46304,14 +46358,14 @@ ${content.slice(firstUseIdx)}`;
|
|
|
46304
46358
|
vueDir,
|
|
46305
46359
|
vueEntries,
|
|
46306
46360
|
vuePagesPath
|
|
46307
|
-
});
|
|
46361
|
+
}));
|
|
46308
46362
|
}
|
|
46309
|
-
await cleanup({
|
|
46363
|
+
await tracePhase("cleanup/generated", () => cleanup({
|
|
46310
46364
|
angularDir,
|
|
46311
46365
|
reactDir,
|
|
46312
46366
|
svelteDir,
|
|
46313
46367
|
vueDir
|
|
46314
|
-
});
|
|
46368
|
+
}));
|
|
46315
46369
|
if (!isIncremental) {
|
|
46316
46370
|
globalThis.__hmrBuildDuration = performance.now() - buildStart;
|
|
46317
46371
|
}
|
|
@@ -46320,12 +46374,15 @@ ${content.slice(firstUseIdx)}`;
|
|
|
46320
46374
|
frameworks: frameworkNames,
|
|
46321
46375
|
mode: mode ?? (isDev2 ? "development" : "production")
|
|
46322
46376
|
});
|
|
46323
|
-
if (isIncremental)
|
|
46377
|
+
if (isIncremental) {
|
|
46378
|
+
writeBuildTrace(buildPath);
|
|
46324
46379
|
return { conventions: conventionsMap, manifest };
|
|
46380
|
+
}
|
|
46325
46381
|
writeFileSync7(join20(buildPath, "manifest.json"), JSON.stringify(manifest, null, "\t"));
|
|
46326
46382
|
if (Object.keys(conventionsMap).length > 0) {
|
|
46327
46383
|
writeFileSync7(join20(buildPath, "conventions.json"), JSON.stringify(conventionsMap, null, "\t"));
|
|
46328
46384
|
}
|
|
46385
|
+
writeBuildTrace(buildPath);
|
|
46329
46386
|
return { conventions: conventionsMap, manifest };
|
|
46330
46387
|
};
|
|
46331
46388
|
var init_build = __esm(() => {
|
|
@@ -58588,5 +58645,5 @@ export {
|
|
|
58588
58645
|
ANGULAR_INIT_TIMEOUT_MS
|
|
58589
58646
|
};
|
|
58590
58647
|
|
|
58591
|
-
//# debugId=
|
|
58648
|
+
//# debugId=4A926E99D028AB1864756E2164756E21
|
|
58592
58649
|
//# sourceMappingURL=index.js.map
|