@absolutejs/absolute 0.19.0-beta.761 → 0.19.0-beta.762
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/angular/index.js +92 -79
- package/dist/angular/index.js.map +3 -3
- package/dist/angular/server.js +92 -79
- package/dist/angular/server.js.map +3 -3
- package/dist/build.js +108 -80
- package/dist/build.js.map +4 -4
- package/dist/index.js +108 -80
- package/dist/index.js.map +4 -4
- package/package.json +7 -7
package/dist/build.js
CHANGED
|
@@ -43509,7 +43509,10 @@ __export(exports_compileAngular, {
|
|
|
43509
43509
|
import { existsSync as existsSync16, readFileSync as readFileSync9, promises as fs2 } from "fs";
|
|
43510
43510
|
import { join as join15, basename as basename6, sep as sep3, dirname as dirname10, resolve as resolve16, relative as relative9 } from "path";
|
|
43511
43511
|
import ts2 from "typescript";
|
|
43512
|
-
var
|
|
43512
|
+
var traceAngularPhase = async (name, fn, metadata) => {
|
|
43513
|
+
const tracePhase = globalThis.__absoluteBuildTracePhase;
|
|
43514
|
+
return tracePhase ? tracePhase(`compile/angular/${name}`, fn, metadata) : await fn();
|
|
43515
|
+
}, readTsconfigPathAliases = () => {
|
|
43513
43516
|
try {
|
|
43514
43517
|
const configPath2 = resolve16(process.cwd(), "tsconfig.json");
|
|
43515
43518
|
const config = ts2.readConfigFile(configPath2, ts2.sys.readFile).config;
|
|
@@ -43759,18 +43762,20 @@ ${registrations}
|
|
|
43759
43762
|
await Promise.all(inputPaths.map((inputPath) => transformFile(inputPath)));
|
|
43760
43763
|
return transformedSources;
|
|
43761
43764
|
}, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
|
|
43762
|
-
const islandMetadataByOutputPath = new Map(inputPaths.map((inputPath) => {
|
|
43765
|
+
const islandMetadataByOutputPath = await traceAngularPhase("aot/island-metadata", () => new Map(inputPaths.map((inputPath) => {
|
|
43763
43766
|
const outputPath = resolve16(join15(outDir, relative9(process.cwd(), resolve16(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
|
|
43764
43767
|
return [
|
|
43765
43768
|
outputPath,
|
|
43766
43769
|
buildIslandMetadataExports(readFileSync9(inputPath, "utf-8"))
|
|
43767
43770
|
];
|
|
43768
|
-
}));
|
|
43769
|
-
const { readConfiguration, performCompilation, EmitFlags } = await import("@angular/compiler-cli");
|
|
43770
|
-
const
|
|
43771
|
-
|
|
43772
|
-
|
|
43773
|
-
|
|
43771
|
+
})), { entries: inputPaths.length });
|
|
43772
|
+
const { readConfiguration, performCompilation, EmitFlags } = await traceAngularPhase("aot/import-compiler-cli", () => import("@angular/compiler-cli"));
|
|
43773
|
+
const tsLibDir = await traceAngularPhase("aot/resolve-typescript-lib", () => {
|
|
43774
|
+
const tsPath = __require.resolve("typescript");
|
|
43775
|
+
const tsRootDir = dirname10(tsPath);
|
|
43776
|
+
return tsRootDir.endsWith("lib") ? tsRootDir : resolve16(tsRootDir, "lib");
|
|
43777
|
+
});
|
|
43778
|
+
const config = await traceAngularPhase("aot/read-configuration", () => readConfiguration("./tsconfig.json"));
|
|
43774
43779
|
const options = {
|
|
43775
43780
|
emitDecoratorMetadata: true,
|
|
43776
43781
|
esModuleInterop: true,
|
|
@@ -43793,7 +43798,7 @@ ${registrations}
|
|
|
43793
43798
|
options.incremental = false;
|
|
43794
43799
|
options.tsBuildInfoFile = undefined;
|
|
43795
43800
|
options.rootDir = process.cwd();
|
|
43796
|
-
const host = ts2.createCompilerHost(options);
|
|
43801
|
+
const host = await traceAngularPhase("aot/create-compiler-host", () => ts2.createCompilerHost(options));
|
|
43797
43802
|
const originalGetDefaultLibLocation = host.getDefaultLibLocation;
|
|
43798
43803
|
host.getDefaultLibLocation = () => tsLibDir || (originalGetDefaultLibLocation ? originalGetDefaultLibLocation() : "");
|
|
43799
43804
|
const originalGetDefaultLibFileName = host.getDefaultLibFileName;
|
|
@@ -43816,7 +43821,7 @@ ${registrations}
|
|
|
43816
43821
|
emitted[relativePath] = text;
|
|
43817
43822
|
};
|
|
43818
43823
|
const originalReadFile = host.readFile;
|
|
43819
|
-
const aotTransformedSources = await precomputeAotResourceTransforms(inputPaths, originalReadFile?.bind(host), stylePreprocessors);
|
|
43824
|
+
const aotTransformedSources = await traceAngularPhase("aot/precompute-resources", () => precomputeAotResourceTransforms(inputPaths, originalReadFile?.bind(host), stylePreprocessors), { entries: inputPaths.length });
|
|
43820
43825
|
host.readFile = (fileName) => {
|
|
43821
43826
|
const source = originalReadFile ? originalReadFile.call(host, fileName) : undefined;
|
|
43822
43827
|
if (typeof source !== "string")
|
|
@@ -43837,42 +43842,46 @@ ${registrations}
|
|
|
43837
43842
|
};
|
|
43838
43843
|
let diagnostics;
|
|
43839
43844
|
try {
|
|
43840
|
-
({ diagnostics } = performCompilation({
|
|
43845
|
+
({ diagnostics } = await traceAngularPhase("aot/perform-compilation", () => performCompilation({
|
|
43841
43846
|
emitFlags: EmitFlags.Default,
|
|
43842
43847
|
host,
|
|
43843
43848
|
options,
|
|
43844
43849
|
rootNames: inputPaths
|
|
43845
|
-
}));
|
|
43850
|
+
}), { entries: inputPaths.length }));
|
|
43846
43851
|
} finally {
|
|
43847
43852
|
host.readFile = originalReadFile;
|
|
43848
43853
|
host.getSourceFile = originalGetSourceFileForCompile;
|
|
43849
43854
|
}
|
|
43850
|
-
throwOnCompilationErrors(diagnostics);
|
|
43851
|
-
const
|
|
43852
|
-
content
|
|
43853
|
-
|
|
43854
|
-
|
|
43855
|
-
|
|
43856
|
-
|
|
43857
|
-
|
|
43858
|
-
|
|
43859
|
-
|
|
43860
|
-
|
|
43861
|
-
|
|
43862
|
-
|
|
43863
|
-
|
|
43864
|
-
|
|
43865
|
-
|
|
43866
|
-
|
|
43867
|
-
|
|
43855
|
+
await traceAngularPhase("aot/check-diagnostics", () => throwOnCompilationErrors(diagnostics));
|
|
43856
|
+
const entries = await traceAngularPhase("aot/postprocess-emitted-js", () => {
|
|
43857
|
+
const rawEntries = Object.entries(emitted).filter(([fileName]) => fileName.endsWith(".js")).map(([fileName, content]) => ({
|
|
43858
|
+
content,
|
|
43859
|
+
target: join15(outDir, fileName)
|
|
43860
|
+
}));
|
|
43861
|
+
const outputFiles = new Set(rawEntries.map(({ target }) => resolve16(target)));
|
|
43862
|
+
return rawEntries.map(({ content, target }) => {
|
|
43863
|
+
let processedContent = content.replace(/from\s+(['"])(\.\.?\/[^'"]+)(\1)/g, (match, quote, path2) => {
|
|
43864
|
+
const rewritten = rewriteRelativeJsSpecifier(target, path2, outputFiles);
|
|
43865
|
+
if (rewritten !== path2) {
|
|
43866
|
+
return `from ${quote}${rewritten}${quote}`;
|
|
43867
|
+
}
|
|
43868
|
+
return match;
|
|
43869
|
+
});
|
|
43870
|
+
processedContent = processedContent.replace(/\u0275\u0275domElementStart/g, "\u0275\u0275elementStart").replace(/\u0275\u0275domElementEnd/g, "\u0275\u0275elementEnd").replace(/\u0275\u0275domElement\(/g, "\u0275\u0275element(").replace(/\u0275\u0275domProperty/g, "\u0275\u0275property").replace(/\u0275\u0275domListener/g, "\u0275\u0275listener");
|
|
43871
|
+
processedContent = processedContent.replace(/import\s*{\s*([^}]*)\bInjectFlags\b([^}]*)\s*}\s*from\s*['"]@angular\/core['"]/g, (match, before, after) => {
|
|
43872
|
+
const cleaned = (before + after).replace(/,\s*,/g, ",").replace(/^\s*,\s*/, "").replace(/,\s*$/, "");
|
|
43873
|
+
return cleaned ? `import { ${cleaned}, InternalInjectFlags } from '@angular/core'` : `import { InternalInjectFlags } from '@angular/core'`;
|
|
43874
|
+
});
|
|
43875
|
+
processedContent = processedContent.replace(/\b(?<!Internal)InjectFlags\b/g, "InternalInjectFlags");
|
|
43876
|
+
processedContent += islandMetadataByOutputPath.get(resolve16(target)) ?? "";
|
|
43877
|
+
return { content: processedContent, target };
|
|
43868
43878
|
});
|
|
43869
|
-
processedContent = processedContent.replace(/\b(?<!Internal)InjectFlags\b/g, "InternalInjectFlags");
|
|
43870
|
-
processedContent += islandMetadataByOutputPath.get(resolve16(target)) ?? "";
|
|
43871
|
-
return { content: processedContent, target };
|
|
43872
43879
|
});
|
|
43873
|
-
await Promise.all(entries.map(({ target }) =>
|
|
43874
|
-
|
|
43875
|
-
|
|
43880
|
+
await traceAngularPhase("aot/write-output", () => Promise.all(entries.map(async ({ target, content }) => {
|
|
43881
|
+
await fs2.mkdir(dirname10(target), { recursive: true });
|
|
43882
|
+
await fs2.writeFile(target, content, "utf-8");
|
|
43883
|
+
})), { outputs: entries.length });
|
|
43884
|
+
return await traceAngularPhase("aot/collect-output-paths", () => entries.map(({ target }) => target), { outputs: entries.length });
|
|
43876
43885
|
}, compileAngularFile = async (inputPath, outDir, stylePreprocessors) => compileAngularFiles([inputPath], outDir, stylePreprocessors), jitContentCache, wrapperOutputCache, escapeTemplateContent = (content) => content.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${"), findUncommentedMatch = (source, pattern) => {
|
|
43877
43886
|
const re2 = new RegExp(pattern.source, pattern.flags.includes("g") ? pattern.flags : pattern.flags + "g");
|
|
43878
43887
|
let match;
|
|
@@ -43961,31 +43970,31 @@ ${importLine}${source.slice(insertAt)}`;
|
|
|
43961
43970
|
}
|
|
43962
43971
|
return parts.join("");
|
|
43963
43972
|
}, buildDeferSlotTemplateResolver = () => ` __absoluteDeferTemplateExpressionCache = new Map<string, string>();
|
|
43964
|
-
__absoluteDeferResolveTemplateExpression(expression: string) {
|
|
43965
|
-
const cached = this.__absoluteDeferTemplateExpressionCache.get(expression);
|
|
43966
|
-
if (cached !== undefined) return cached;
|
|
43967
|
-
|
|
43968
|
-
const scope = new Proxy(this, {
|
|
43969
|
-
get: (_target, property) => {
|
|
43970
|
-
const value = (this as Record<PropertyKey, unknown>)[property];
|
|
43971
|
-
return typeof value === "function" ? value.bind(this) : value;
|
|
43972
|
-
}
|
|
43973
|
-
});
|
|
43974
|
-
let value = '';
|
|
43975
|
-
try {
|
|
43976
|
-
const evaluate = new Function(
|
|
43977
|
-
'scope',
|
|
43978
|
-
"with (scope) { return (" + expression + "); }"
|
|
43979
|
-
);
|
|
43980
|
-
|
|
43981
|
-
const resolvedValue = evaluate(scope);
|
|
43982
|
-
value = resolvedValue == null ? '' : String(resolvedValue);
|
|
43983
|
-
} catch (_error) {
|
|
43984
|
-
value = '';
|
|
43985
|
-
}
|
|
43986
|
-
this.__absoluteDeferTemplateExpressionCache.set(expression, value);
|
|
43987
|
-
return value;
|
|
43988
|
-
}
|
|
43973
|
+
` + ` __absoluteDeferResolveTemplateExpression(expression: string) {
|
|
43974
|
+
` + ` const cached = this.__absoluteDeferTemplateExpressionCache.get(expression);
|
|
43975
|
+
` + ` if (cached !== undefined) return cached;
|
|
43976
|
+
` + `
|
|
43977
|
+
` + ` const scope = new Proxy(this, {
|
|
43978
|
+
` + ` get: (_target, property) => {
|
|
43979
|
+
` + ` const value = (this as Record<PropertyKey, unknown>)[property];
|
|
43980
|
+
` + ` return typeof value === "function" ? value.bind(this) : value;
|
|
43981
|
+
` + ` }
|
|
43982
|
+
` + ` });
|
|
43983
|
+
` + ` let value = '';
|
|
43984
|
+
` + ` try {
|
|
43985
|
+
` + ` const evaluate = new Function(
|
|
43986
|
+
` + ` 'scope',
|
|
43987
|
+
` + ` "with (scope) { return (" + expression + "); }"
|
|
43988
|
+
` + ` );
|
|
43989
|
+
` + `
|
|
43990
|
+
` + ` const resolvedValue = evaluate(scope);
|
|
43991
|
+
` + ` value = resolvedValue == null ? '' : String(resolvedValue);
|
|
43992
|
+
` + ` } catch (_error) {
|
|
43993
|
+
` + ` value = '';
|
|
43994
|
+
` + ` }
|
|
43995
|
+
` + ` this.__absoluteDeferTemplateExpressionCache.set(expression, value);
|
|
43996
|
+
` + ` return value;
|
|
43997
|
+
` + ` }
|
|
43989
43998
|
|
|
43990
43999
|
`, buildDeferSlotFields = (slots) => [
|
|
43991
44000
|
buildDeferSlotTemplateResolver(),
|
|
@@ -43999,8 +44008,8 @@ ${slot.resolvedBindings.map((binding) => ` "${binding.key}": this.__absoluteDef
|
|
|
43999
44008
|
` : ` __absoluteDeferData${index} = () => ({});
|
|
44000
44009
|
`;
|
|
44001
44010
|
return `${htmlField + dataField} __absoluteDeferResolvePayload${index} = () => new Promise<any>((resolve) => {
|
|
44002
|
-
setTimeout(() => resolve({ kind: 'angular-defer', state: 'resolved', html: this.__absoluteDeferHtml${index}(), data: this.__absoluteDeferData${index}() }), ${slot.delayMs});
|
|
44003
|
-
});
|
|
44011
|
+
` + ` setTimeout(() => resolve({ kind: 'angular-defer', state: 'resolved', html: this.__absoluteDeferHtml${index}(), data: this.__absoluteDeferData${index}() }), ${slot.delayMs});
|
|
44012
|
+
` + ` });
|
|
44004
44013
|
`;
|
|
44005
44014
|
})
|
|
44006
44015
|
].join(`
|
|
@@ -44280,14 +44289,16 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
44280
44289
|
}
|
|
44281
44290
|
const compiledRoot = compiledParent;
|
|
44282
44291
|
const indexesDir = join15(compiledParent, "indexes");
|
|
44283
|
-
await fs2.mkdir(indexesDir, { recursive: true });
|
|
44284
|
-
const aotOutputs = hmr ? [] : await compileAngularFiles(entryPoints.map((entry) => resolve16(entry)), compiledRoot, stylePreprocessors);
|
|
44285
|
-
const usesLegacyAngularAnimations = createLegacyAngularAnimationUsageResolver(outRoot);
|
|
44292
|
+
await traceAngularPhase("setup/create-indexes-dir", () => fs2.mkdir(indexesDir, { recursive: true }));
|
|
44293
|
+
const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve16(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
|
|
44294
|
+
const usesLegacyAngularAnimations = await traceAngularPhase("setup/legacy-animation-resolver", () => createLegacyAngularAnimationUsageResolver(outRoot));
|
|
44286
44295
|
const compileTasks = entryPoints.map(async (entry) => {
|
|
44287
44296
|
const resolvedEntry = resolve16(entry);
|
|
44288
44297
|
const relativeEntry = relative9(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
|
|
44289
44298
|
const compileEntry = () => compileAngularFileJIT(resolvedEntry, compiledRoot, outRoot, stylePreprocessors);
|
|
44290
|
-
let outputs = hmr ? await
|
|
44299
|
+
let outputs = hmr ? await traceAngularPhase("jit/compile-entry", compileEntry, {
|
|
44300
|
+
entry: resolvedEntry
|
|
44301
|
+
}) : aotOutputs;
|
|
44291
44302
|
const fileBase = basename6(resolvedEntry).replace(/\.[tj]s$/, "");
|
|
44292
44303
|
const jsName = `${fileBase}.js`;
|
|
44293
44304
|
const compiledFallbackPaths = [
|
|
@@ -44309,13 +44320,13 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
44309
44320
|
}
|
|
44310
44321
|
return candidate;
|
|
44311
44322
|
};
|
|
44312
|
-
let rawServerFile = resolveRawServerFile(outputs);
|
|
44323
|
+
let rawServerFile = await traceAngularPhase("wrapper/resolve-server-output", () => resolveRawServerFile(outputs), { entry: resolvedEntry });
|
|
44313
44324
|
if (!rawServerFile) {
|
|
44314
|
-
rawServerFile = resolveRawServerFile([]);
|
|
44325
|
+
rawServerFile = await traceAngularPhase("wrapper/resolve-server-output-fallback", () => resolveRawServerFile([]), { entry: resolvedEntry });
|
|
44315
44326
|
}
|
|
44316
44327
|
if (rawServerFile && !existsSync16(rawServerFile)) {
|
|
44317
44328
|
outputs = hmr ? await compileEntry() : aotOutputs;
|
|
44318
|
-
rawServerFile = resolveRawServerFile(outputs);
|
|
44329
|
+
rawServerFile = await traceAngularPhase("wrapper/resolve-server-output-retry", () => resolveRawServerFile(outputs), { entry: resolvedEntry });
|
|
44319
44330
|
}
|
|
44320
44331
|
if (!rawServerFile || !existsSync16(rawServerFile)) {
|
|
44321
44332
|
throw new Error(`Compiled output not found for ${entry}. Looking for: ${jsName}. Available: ${[
|
|
@@ -44323,7 +44334,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
44323
44334
|
...compiledFallbackPaths
|
|
44324
44335
|
].join(", ")}`);
|
|
44325
44336
|
}
|
|
44326
|
-
const original = await fs2.readFile(rawServerFile, "utf-8");
|
|
44337
|
+
const original = await traceAngularPhase("wrapper/read-server-output", () => fs2.readFile(rawServerFile, "utf-8"), { entry: resolvedEntry });
|
|
44327
44338
|
const detectExportedComponentClass = (source, fallback) => {
|
|
44328
44339
|
const defaultMatch = source.match(/export\s+default\s+([A-Za-z_$][\w$]*)\s*;/);
|
|
44329
44340
|
if (defaultMatch)
|
|
@@ -44333,8 +44344,8 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
44333
44344
|
return exportClassMatch[1];
|
|
44334
44345
|
return fallback;
|
|
44335
44346
|
};
|
|
44336
|
-
const componentClassName = detectExportedComponentClass(original, `${toPascal(fileBase)}Component`);
|
|
44337
|
-
const usesLegacyAnimations = await usesLegacyAngularAnimations(resolvedEntry);
|
|
44347
|
+
const componentClassName = await traceAngularPhase("wrapper/detect-component-class", () => detectExportedComponentClass(original, `${toPascal(fileBase)}Component`), { entry: resolvedEntry });
|
|
44348
|
+
const usesLegacyAnimations = await traceAngularPhase("wrapper/detect-legacy-animations", () => usesLegacyAngularAnimations(resolvedEntry), { entry: resolvedEntry });
|
|
44338
44349
|
const serverContentHash = Bun.hash(original).toString(BASE_36_RADIX);
|
|
44339
44350
|
const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
|
|
44340
44351
|
const clientFile = join15(indexesDir, jsName);
|
|
@@ -44378,7 +44389,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
44378
44389
|
`);
|
|
44379
44390
|
await fs2.writeFile(ssrDepsFile, ssrDepsContent, "utf-8");
|
|
44380
44391
|
}
|
|
44381
|
-
await fs2.writeFile(rawServerFile, rewritten, "utf-8");
|
|
44392
|
+
await traceAngularPhase("wrapper/write-server-output", () => fs2.writeFile(rawServerFile, rewritten, "utf-8"), { entry: resolvedEntry });
|
|
44382
44393
|
const relativePath = relative9(indexesDir, rawServerFile).replace(/\\/g, "/");
|
|
44383
44394
|
const normalizedImportPath = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
|
|
44384
44395
|
const hmrPreamble = hmr ? `window.__HMR_FRAMEWORK__ = "angular";
|
|
@@ -44557,7 +44568,7 @@ if (pageHasRawStreamingSlots) {
|
|
|
44557
44568
|
`.trim();
|
|
44558
44569
|
const indexHash = Bun.hash(hydration).toString(BASE_36_RADIX);
|
|
44559
44570
|
const indexUnchanged = cachedWrapper?.indexHash === indexHash;
|
|
44560
|
-
await fs2.writeFile(clientFile, hydration, "utf-8");
|
|
44571
|
+
await traceAngularPhase("wrapper/write-client-index", () => fs2.writeFile(clientFile, hydration, "utf-8"), { entry: resolvedEntry });
|
|
44561
44572
|
wrapperOutputCache.set(resolvedEntry, {
|
|
44562
44573
|
indexHash,
|
|
44563
44574
|
serverHash: serverContentHash
|
|
@@ -44568,9 +44579,11 @@ if (pageHasRawStreamingSlots) {
|
|
|
44568
44579
|
serverPath: rawServerFile
|
|
44569
44580
|
};
|
|
44570
44581
|
});
|
|
44571
|
-
const results = await Promise.all(compileTasks);
|
|
44572
|
-
const serverPaths =
|
|
44573
|
-
|
|
44582
|
+
const results = await traceAngularPhase("wrapper/process-entries", () => Promise.all(compileTasks), { entries: entryPoints.length });
|
|
44583
|
+
const { clientPaths, serverPaths } = await traceAngularPhase("wrapper/collect-paths", () => ({
|
|
44584
|
+
clientPaths: results.map((r) => r.clientPath),
|
|
44585
|
+
serverPaths: results.map((r) => r.serverPath)
|
|
44586
|
+
}), { entries: results.length });
|
|
44574
44587
|
return {
|
|
44575
44588
|
allIndexesUnchanged: hmr && results.every((r) => r.indexUnchanged),
|
|
44576
44589
|
clientPaths,
|
|
@@ -45436,6 +45449,15 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45436
45449
|
const traceEnabled = isBuildTraceEnabled();
|
|
45437
45450
|
const traceEvents = [];
|
|
45438
45451
|
let traceFrameworkNames = [];
|
|
45452
|
+
const traceGlobal = globalThis;
|
|
45453
|
+
const previousTracePhase = traceGlobal.__absoluteBuildTracePhase;
|
|
45454
|
+
const restoreTracePhase = () => {
|
|
45455
|
+
if (previousTracePhase) {
|
|
45456
|
+
traceGlobal.__absoluteBuildTracePhase = previousTracePhase;
|
|
45457
|
+
} else {
|
|
45458
|
+
delete traceGlobal.__absoluteBuildTracePhase;
|
|
45459
|
+
}
|
|
45460
|
+
};
|
|
45439
45461
|
const tracePhase = async (name, fn, metadata) => {
|
|
45440
45462
|
if (!traceEnabled)
|
|
45441
45463
|
return await fn();
|
|
@@ -45464,9 +45486,14 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45464
45486
|
throw error;
|
|
45465
45487
|
}
|
|
45466
45488
|
};
|
|
45489
|
+
if (traceEnabled) {
|
|
45490
|
+
traceGlobal.__absoluteBuildTracePhase = tracePhase;
|
|
45491
|
+
}
|
|
45467
45492
|
const writeBuildTrace = (buildPath2) => {
|
|
45468
|
-
if (!traceEnabled)
|
|
45493
|
+
if (!traceEnabled) {
|
|
45494
|
+
restoreTracePhase();
|
|
45469
45495
|
return;
|
|
45496
|
+
}
|
|
45470
45497
|
const traceDir = join20(buildPath2, ".absolute-trace");
|
|
45471
45498
|
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
45472
45499
|
mkdirSync10(traceDir, { recursive: true });
|
|
@@ -45478,6 +45505,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45478
45505
|
totalDurationMs: performance.now() - buildStart,
|
|
45479
45506
|
version: 1
|
|
45480
45507
|
}, null, 2));
|
|
45508
|
+
restoreTracePhase();
|
|
45481
45509
|
};
|
|
45482
45510
|
await tracePhase("absolute/version", () => resolveAbsoluteVersion());
|
|
45483
45511
|
const isIncremental = incrementalFiles && incrementalFiles.length > 0;
|
|
@@ -50185,5 +50213,5 @@ export {
|
|
|
50185
50213
|
build
|
|
50186
50214
|
};
|
|
50187
50215
|
|
|
50188
|
-
//# debugId=
|
|
50216
|
+
//# debugId=361E23C79CF9F13864756E2164756E21
|
|
50189
50217
|
//# sourceMappingURL=build.js.map
|