@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/index.js
CHANGED
|
@@ -43701,7 +43701,10 @@ __export(exports_compileAngular, {
|
|
|
43701
43701
|
import { existsSync as existsSync16, readFileSync as readFileSync10, promises as fs2 } from "fs";
|
|
43702
43702
|
import { join as join15, basename as basename7, sep as sep3, dirname as dirname11, resolve as resolve19, relative as relative9 } from "path";
|
|
43703
43703
|
import ts2 from "typescript";
|
|
43704
|
-
var
|
|
43704
|
+
var traceAngularPhase = async (name, fn, metadata2) => {
|
|
43705
|
+
const tracePhase = globalThis.__absoluteBuildTracePhase;
|
|
43706
|
+
return tracePhase ? tracePhase(`compile/angular/${name}`, fn, metadata2) : await fn();
|
|
43707
|
+
}, readTsconfigPathAliases = () => {
|
|
43705
43708
|
try {
|
|
43706
43709
|
const configPath2 = resolve19(process.cwd(), "tsconfig.json");
|
|
43707
43710
|
const config = ts2.readConfigFile(configPath2, ts2.sys.readFile).config;
|
|
@@ -43951,18 +43954,20 @@ ${registrations}
|
|
|
43951
43954
|
await Promise.all(inputPaths.map((inputPath) => transformFile(inputPath)));
|
|
43952
43955
|
return transformedSources;
|
|
43953
43956
|
}, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
|
|
43954
|
-
const islandMetadataByOutputPath = new Map(inputPaths.map((inputPath) => {
|
|
43957
|
+
const islandMetadataByOutputPath = await traceAngularPhase("aot/island-metadata", () => new Map(inputPaths.map((inputPath) => {
|
|
43955
43958
|
const outputPath = resolve19(join15(outDir, relative9(process.cwd(), resolve19(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
|
|
43956
43959
|
return [
|
|
43957
43960
|
outputPath,
|
|
43958
43961
|
buildIslandMetadataExports(readFileSync10(inputPath, "utf-8"))
|
|
43959
43962
|
];
|
|
43960
|
-
}));
|
|
43961
|
-
const { readConfiguration, performCompilation, EmitFlags } = await import("@angular/compiler-cli");
|
|
43962
|
-
const
|
|
43963
|
-
|
|
43964
|
-
|
|
43965
|
-
|
|
43963
|
+
})), { entries: inputPaths.length });
|
|
43964
|
+
const { readConfiguration, performCompilation, EmitFlags } = await traceAngularPhase("aot/import-compiler-cli", () => import("@angular/compiler-cli"));
|
|
43965
|
+
const tsLibDir = await traceAngularPhase("aot/resolve-typescript-lib", () => {
|
|
43966
|
+
const tsPath = __require.resolve("typescript");
|
|
43967
|
+
const tsRootDir = dirname11(tsPath);
|
|
43968
|
+
return tsRootDir.endsWith("lib") ? tsRootDir : resolve19(tsRootDir, "lib");
|
|
43969
|
+
});
|
|
43970
|
+
const config = await traceAngularPhase("aot/read-configuration", () => readConfiguration("./tsconfig.json"));
|
|
43966
43971
|
const options = {
|
|
43967
43972
|
emitDecoratorMetadata: true,
|
|
43968
43973
|
esModuleInterop: true,
|
|
@@ -43985,7 +43990,7 @@ ${registrations}
|
|
|
43985
43990
|
options.incremental = false;
|
|
43986
43991
|
options.tsBuildInfoFile = undefined;
|
|
43987
43992
|
options.rootDir = process.cwd();
|
|
43988
|
-
const host = ts2.createCompilerHost(options);
|
|
43993
|
+
const host = await traceAngularPhase("aot/create-compiler-host", () => ts2.createCompilerHost(options));
|
|
43989
43994
|
const originalGetDefaultLibLocation = host.getDefaultLibLocation;
|
|
43990
43995
|
host.getDefaultLibLocation = () => tsLibDir || (originalGetDefaultLibLocation ? originalGetDefaultLibLocation() : "");
|
|
43991
43996
|
const originalGetDefaultLibFileName = host.getDefaultLibFileName;
|
|
@@ -44008,7 +44013,7 @@ ${registrations}
|
|
|
44008
44013
|
emitted[relativePath] = text;
|
|
44009
44014
|
};
|
|
44010
44015
|
const originalReadFile = host.readFile;
|
|
44011
|
-
const aotTransformedSources = await precomputeAotResourceTransforms(inputPaths, originalReadFile?.bind(host), stylePreprocessors);
|
|
44016
|
+
const aotTransformedSources = await traceAngularPhase("aot/precompute-resources", () => precomputeAotResourceTransforms(inputPaths, originalReadFile?.bind(host), stylePreprocessors), { entries: inputPaths.length });
|
|
44012
44017
|
host.readFile = (fileName) => {
|
|
44013
44018
|
const source = originalReadFile ? originalReadFile.call(host, fileName) : undefined;
|
|
44014
44019
|
if (typeof source !== "string")
|
|
@@ -44029,42 +44034,46 @@ ${registrations}
|
|
|
44029
44034
|
};
|
|
44030
44035
|
let diagnostics;
|
|
44031
44036
|
try {
|
|
44032
|
-
({ diagnostics } = performCompilation({
|
|
44037
|
+
({ diagnostics } = await traceAngularPhase("aot/perform-compilation", () => performCompilation({
|
|
44033
44038
|
emitFlags: EmitFlags.Default,
|
|
44034
44039
|
host,
|
|
44035
44040
|
options,
|
|
44036
44041
|
rootNames: inputPaths
|
|
44037
|
-
}));
|
|
44042
|
+
}), { entries: inputPaths.length }));
|
|
44038
44043
|
} finally {
|
|
44039
44044
|
host.readFile = originalReadFile;
|
|
44040
44045
|
host.getSourceFile = originalGetSourceFileForCompile;
|
|
44041
44046
|
}
|
|
44042
|
-
throwOnCompilationErrors(diagnostics);
|
|
44043
|
-
const
|
|
44044
|
-
content
|
|
44045
|
-
|
|
44046
|
-
|
|
44047
|
-
|
|
44048
|
-
|
|
44049
|
-
|
|
44050
|
-
|
|
44051
|
-
|
|
44052
|
-
|
|
44053
|
-
|
|
44054
|
-
|
|
44055
|
-
|
|
44056
|
-
|
|
44057
|
-
|
|
44058
|
-
|
|
44059
|
-
|
|
44047
|
+
await traceAngularPhase("aot/check-diagnostics", () => throwOnCompilationErrors(diagnostics));
|
|
44048
|
+
const entries = await traceAngularPhase("aot/postprocess-emitted-js", () => {
|
|
44049
|
+
const rawEntries = Object.entries(emitted).filter(([fileName]) => fileName.endsWith(".js")).map(([fileName, content]) => ({
|
|
44050
|
+
content,
|
|
44051
|
+
target: join15(outDir, fileName)
|
|
44052
|
+
}));
|
|
44053
|
+
const outputFiles = new Set(rawEntries.map(({ target }) => resolve19(target)));
|
|
44054
|
+
return rawEntries.map(({ content, target }) => {
|
|
44055
|
+
let processedContent = content.replace(/from\s+(['"])(\.\.?\/[^'"]+)(\1)/g, (match, quote, path2) => {
|
|
44056
|
+
const rewritten = rewriteRelativeJsSpecifier(target, path2, outputFiles);
|
|
44057
|
+
if (rewritten !== path2) {
|
|
44058
|
+
return `from ${quote}${rewritten}${quote}`;
|
|
44059
|
+
}
|
|
44060
|
+
return match;
|
|
44061
|
+
});
|
|
44062
|
+
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");
|
|
44063
|
+
processedContent = processedContent.replace(/import\s*{\s*([^}]*)\bInjectFlags\b([^}]*)\s*}\s*from\s*['"]@angular\/core['"]/g, (match, before, after) => {
|
|
44064
|
+
const cleaned = (before + after).replace(/,\s*,/g, ",").replace(/^\s*,\s*/, "").replace(/,\s*$/, "");
|
|
44065
|
+
return cleaned ? `import { ${cleaned}, InternalInjectFlags } from '@angular/core'` : `import { InternalInjectFlags } from '@angular/core'`;
|
|
44066
|
+
});
|
|
44067
|
+
processedContent = processedContent.replace(/\b(?<!Internal)InjectFlags\b/g, "InternalInjectFlags");
|
|
44068
|
+
processedContent += islandMetadataByOutputPath.get(resolve19(target)) ?? "";
|
|
44069
|
+
return { content: processedContent, target };
|
|
44060
44070
|
});
|
|
44061
|
-
processedContent = processedContent.replace(/\b(?<!Internal)InjectFlags\b/g, "InternalInjectFlags");
|
|
44062
|
-
processedContent += islandMetadataByOutputPath.get(resolve19(target)) ?? "";
|
|
44063
|
-
return { content: processedContent, target };
|
|
44064
44071
|
});
|
|
44065
|
-
await Promise.all(entries.map(({ target }) =>
|
|
44066
|
-
|
|
44067
|
-
|
|
44072
|
+
await traceAngularPhase("aot/write-output", () => Promise.all(entries.map(async ({ target, content }) => {
|
|
44073
|
+
await fs2.mkdir(dirname11(target), { recursive: true });
|
|
44074
|
+
await fs2.writeFile(target, content, "utf-8");
|
|
44075
|
+
})), { outputs: entries.length });
|
|
44076
|
+
return await traceAngularPhase("aot/collect-output-paths", () => entries.map(({ target }) => target), { outputs: entries.length });
|
|
44068
44077
|
}, compileAngularFile = async (inputPath, outDir, stylePreprocessors) => compileAngularFiles([inputPath], outDir, stylePreprocessors), jitContentCache, wrapperOutputCache, escapeTemplateContent = (content) => content.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${"), findUncommentedMatch = (source, pattern) => {
|
|
44069
44078
|
const re2 = new RegExp(pattern.source, pattern.flags.includes("g") ? pattern.flags : pattern.flags + "g");
|
|
44070
44079
|
let match;
|
|
@@ -44153,31 +44162,31 @@ ${importLine}${source.slice(insertAt)}`;
|
|
|
44153
44162
|
}
|
|
44154
44163
|
return parts.join("");
|
|
44155
44164
|
}, buildDeferSlotTemplateResolver = () => ` __absoluteDeferTemplateExpressionCache = new Map<string, string>();
|
|
44156
|
-
__absoluteDeferResolveTemplateExpression(expression: string) {
|
|
44157
|
-
const cached = this.__absoluteDeferTemplateExpressionCache.get(expression);
|
|
44158
|
-
if (cached !== undefined) return cached;
|
|
44159
|
-
|
|
44160
|
-
const scope = new Proxy(this, {
|
|
44161
|
-
get: (_target, property) => {
|
|
44162
|
-
const value = (this as Record<PropertyKey, unknown>)[property];
|
|
44163
|
-
return typeof value === "function" ? value.bind(this) : value;
|
|
44164
|
-
}
|
|
44165
|
-
});
|
|
44166
|
-
let value = '';
|
|
44167
|
-
try {
|
|
44168
|
-
const evaluate = new Function(
|
|
44169
|
-
'scope',
|
|
44170
|
-
"with (scope) { return (" + expression + "); }"
|
|
44171
|
-
);
|
|
44172
|
-
|
|
44173
|
-
const resolvedValue = evaluate(scope);
|
|
44174
|
-
value = resolvedValue == null ? '' : String(resolvedValue);
|
|
44175
|
-
} catch (_error) {
|
|
44176
|
-
value = '';
|
|
44177
|
-
}
|
|
44178
|
-
this.__absoluteDeferTemplateExpressionCache.set(expression, value);
|
|
44179
|
-
return value;
|
|
44180
|
-
}
|
|
44165
|
+
` + ` __absoluteDeferResolveTemplateExpression(expression: string) {
|
|
44166
|
+
` + ` const cached = this.__absoluteDeferTemplateExpressionCache.get(expression);
|
|
44167
|
+
` + ` if (cached !== undefined) return cached;
|
|
44168
|
+
` + `
|
|
44169
|
+
` + ` const scope = new Proxy(this, {
|
|
44170
|
+
` + ` get: (_target, property) => {
|
|
44171
|
+
` + ` const value = (this as Record<PropertyKey, unknown>)[property];
|
|
44172
|
+
` + ` return typeof value === "function" ? value.bind(this) : value;
|
|
44173
|
+
` + ` }
|
|
44174
|
+
` + ` });
|
|
44175
|
+
` + ` let value = '';
|
|
44176
|
+
` + ` try {
|
|
44177
|
+
` + ` const evaluate = new Function(
|
|
44178
|
+
` + ` 'scope',
|
|
44179
|
+
` + ` "with (scope) { return (" + expression + "); }"
|
|
44180
|
+
` + ` );
|
|
44181
|
+
` + `
|
|
44182
|
+
` + ` const resolvedValue = evaluate(scope);
|
|
44183
|
+
` + ` value = resolvedValue == null ? '' : String(resolvedValue);
|
|
44184
|
+
` + ` } catch (_error) {
|
|
44185
|
+
` + ` value = '';
|
|
44186
|
+
` + ` }
|
|
44187
|
+
` + ` this.__absoluteDeferTemplateExpressionCache.set(expression, value);
|
|
44188
|
+
` + ` return value;
|
|
44189
|
+
` + ` }
|
|
44181
44190
|
|
|
44182
44191
|
`, buildDeferSlotFields = (slots) => [
|
|
44183
44192
|
buildDeferSlotTemplateResolver(),
|
|
@@ -44191,8 +44200,8 @@ ${slot.resolvedBindings.map((binding) => ` "${binding.key}": this.__absoluteDef
|
|
|
44191
44200
|
` : ` __absoluteDeferData${index} = () => ({});
|
|
44192
44201
|
`;
|
|
44193
44202
|
return `${htmlField + dataField} __absoluteDeferResolvePayload${index} = () => new Promise<any>((resolve) => {
|
|
44194
|
-
setTimeout(() => resolve({ kind: 'angular-defer', state: 'resolved', html: this.__absoluteDeferHtml${index}(), data: this.__absoluteDeferData${index}() }), ${slot.delayMs});
|
|
44195
|
-
});
|
|
44203
|
+
` + ` setTimeout(() => resolve({ kind: 'angular-defer', state: 'resolved', html: this.__absoluteDeferHtml${index}(), data: this.__absoluteDeferData${index}() }), ${slot.delayMs});
|
|
44204
|
+
` + ` });
|
|
44196
44205
|
`;
|
|
44197
44206
|
})
|
|
44198
44207
|
].join(`
|
|
@@ -44472,14 +44481,16 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
44472
44481
|
}
|
|
44473
44482
|
const compiledRoot = compiledParent;
|
|
44474
44483
|
const indexesDir = join15(compiledParent, "indexes");
|
|
44475
|
-
await fs2.mkdir(indexesDir, { recursive: true });
|
|
44476
|
-
const aotOutputs = hmr ? [] : await compileAngularFiles(entryPoints.map((entry) => resolve19(entry)), compiledRoot, stylePreprocessors);
|
|
44477
|
-
const usesLegacyAngularAnimations = createLegacyAngularAnimationUsageResolver(outRoot);
|
|
44484
|
+
await traceAngularPhase("setup/create-indexes-dir", () => fs2.mkdir(indexesDir, { recursive: true }));
|
|
44485
|
+
const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve19(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
|
|
44486
|
+
const usesLegacyAngularAnimations = await traceAngularPhase("setup/legacy-animation-resolver", () => createLegacyAngularAnimationUsageResolver(outRoot));
|
|
44478
44487
|
const compileTasks = entryPoints.map(async (entry) => {
|
|
44479
44488
|
const resolvedEntry = resolve19(entry);
|
|
44480
44489
|
const relativeEntry = relative9(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
|
|
44481
44490
|
const compileEntry = () => compileAngularFileJIT(resolvedEntry, compiledRoot, outRoot, stylePreprocessors);
|
|
44482
|
-
let outputs = hmr ? await
|
|
44491
|
+
let outputs = hmr ? await traceAngularPhase("jit/compile-entry", compileEntry, {
|
|
44492
|
+
entry: resolvedEntry
|
|
44493
|
+
}) : aotOutputs;
|
|
44483
44494
|
const fileBase = basename7(resolvedEntry).replace(/\.[tj]s$/, "");
|
|
44484
44495
|
const jsName = `${fileBase}.js`;
|
|
44485
44496
|
const compiledFallbackPaths = [
|
|
@@ -44501,13 +44512,13 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
44501
44512
|
}
|
|
44502
44513
|
return candidate;
|
|
44503
44514
|
};
|
|
44504
|
-
let rawServerFile = resolveRawServerFile(outputs);
|
|
44515
|
+
let rawServerFile = await traceAngularPhase("wrapper/resolve-server-output", () => resolveRawServerFile(outputs), { entry: resolvedEntry });
|
|
44505
44516
|
if (!rawServerFile) {
|
|
44506
|
-
rawServerFile = resolveRawServerFile([]);
|
|
44517
|
+
rawServerFile = await traceAngularPhase("wrapper/resolve-server-output-fallback", () => resolveRawServerFile([]), { entry: resolvedEntry });
|
|
44507
44518
|
}
|
|
44508
44519
|
if (rawServerFile && !existsSync16(rawServerFile)) {
|
|
44509
44520
|
outputs = hmr ? await compileEntry() : aotOutputs;
|
|
44510
|
-
rawServerFile = resolveRawServerFile(outputs);
|
|
44521
|
+
rawServerFile = await traceAngularPhase("wrapper/resolve-server-output-retry", () => resolveRawServerFile(outputs), { entry: resolvedEntry });
|
|
44511
44522
|
}
|
|
44512
44523
|
if (!rawServerFile || !existsSync16(rawServerFile)) {
|
|
44513
44524
|
throw new Error(`Compiled output not found for ${entry}. Looking for: ${jsName}. Available: ${[
|
|
@@ -44515,7 +44526,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
44515
44526
|
...compiledFallbackPaths
|
|
44516
44527
|
].join(", ")}`);
|
|
44517
44528
|
}
|
|
44518
|
-
const original = await fs2.readFile(rawServerFile, "utf-8");
|
|
44529
|
+
const original = await traceAngularPhase("wrapper/read-server-output", () => fs2.readFile(rawServerFile, "utf-8"), { entry: resolvedEntry });
|
|
44519
44530
|
const detectExportedComponentClass = (source, fallback) => {
|
|
44520
44531
|
const defaultMatch = source.match(/export\s+default\s+([A-Za-z_$][\w$]*)\s*;/);
|
|
44521
44532
|
if (defaultMatch)
|
|
@@ -44525,8 +44536,8 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
44525
44536
|
return exportClassMatch[1];
|
|
44526
44537
|
return fallback;
|
|
44527
44538
|
};
|
|
44528
|
-
const componentClassName = detectExportedComponentClass(original, `${toPascal(fileBase)}Component`);
|
|
44529
|
-
const usesLegacyAnimations = await usesLegacyAngularAnimations(resolvedEntry);
|
|
44539
|
+
const componentClassName = await traceAngularPhase("wrapper/detect-component-class", () => detectExportedComponentClass(original, `${toPascal(fileBase)}Component`), { entry: resolvedEntry });
|
|
44540
|
+
const usesLegacyAnimations = await traceAngularPhase("wrapper/detect-legacy-animations", () => usesLegacyAngularAnimations(resolvedEntry), { entry: resolvedEntry });
|
|
44530
44541
|
const serverContentHash = Bun.hash(original).toString(BASE_36_RADIX);
|
|
44531
44542
|
const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
|
|
44532
44543
|
const clientFile = join15(indexesDir, jsName);
|
|
@@ -44570,7 +44581,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
44570
44581
|
`);
|
|
44571
44582
|
await fs2.writeFile(ssrDepsFile, ssrDepsContent, "utf-8");
|
|
44572
44583
|
}
|
|
44573
|
-
await fs2.writeFile(rawServerFile, rewritten, "utf-8");
|
|
44584
|
+
await traceAngularPhase("wrapper/write-server-output", () => fs2.writeFile(rawServerFile, rewritten, "utf-8"), { entry: resolvedEntry });
|
|
44574
44585
|
const relativePath = relative9(indexesDir, rawServerFile).replace(/\\/g, "/");
|
|
44575
44586
|
const normalizedImportPath = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
|
|
44576
44587
|
const hmrPreamble = hmr ? `window.__HMR_FRAMEWORK__ = "angular";
|
|
@@ -44749,7 +44760,7 @@ if (pageHasRawStreamingSlots) {
|
|
|
44749
44760
|
`.trim();
|
|
44750
44761
|
const indexHash = Bun.hash(hydration).toString(BASE_36_RADIX);
|
|
44751
44762
|
const indexUnchanged = cachedWrapper?.indexHash === indexHash;
|
|
44752
|
-
await fs2.writeFile(clientFile, hydration, "utf-8");
|
|
44763
|
+
await traceAngularPhase("wrapper/write-client-index", () => fs2.writeFile(clientFile, hydration, "utf-8"), { entry: resolvedEntry });
|
|
44753
44764
|
wrapperOutputCache.set(resolvedEntry, {
|
|
44754
44765
|
indexHash,
|
|
44755
44766
|
serverHash: serverContentHash
|
|
@@ -44760,9 +44771,11 @@ if (pageHasRawStreamingSlots) {
|
|
|
44760
44771
|
serverPath: rawServerFile
|
|
44761
44772
|
};
|
|
44762
44773
|
});
|
|
44763
|
-
const results = await Promise.all(compileTasks);
|
|
44764
|
-
const serverPaths =
|
|
44765
|
-
|
|
44774
|
+
const results = await traceAngularPhase("wrapper/process-entries", () => Promise.all(compileTasks), { entries: entryPoints.length });
|
|
44775
|
+
const { clientPaths, serverPaths } = await traceAngularPhase("wrapper/collect-paths", () => ({
|
|
44776
|
+
clientPaths: results.map((r) => r.clientPath),
|
|
44777
|
+
serverPaths: results.map((r) => r.serverPath)
|
|
44778
|
+
}), { entries: results.length });
|
|
44766
44779
|
return {
|
|
44767
44780
|
allIndexesUnchanged: hmr && results.every((r) => r.indexUnchanged),
|
|
44768
44781
|
clientPaths,
|
|
@@ -45628,6 +45641,15 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45628
45641
|
const traceEnabled = isBuildTraceEnabled();
|
|
45629
45642
|
const traceEvents = [];
|
|
45630
45643
|
let traceFrameworkNames = [];
|
|
45644
|
+
const traceGlobal = globalThis;
|
|
45645
|
+
const previousTracePhase = traceGlobal.__absoluteBuildTracePhase;
|
|
45646
|
+
const restoreTracePhase = () => {
|
|
45647
|
+
if (previousTracePhase) {
|
|
45648
|
+
traceGlobal.__absoluteBuildTracePhase = previousTracePhase;
|
|
45649
|
+
} else {
|
|
45650
|
+
delete traceGlobal.__absoluteBuildTracePhase;
|
|
45651
|
+
}
|
|
45652
|
+
};
|
|
45631
45653
|
const tracePhase = async (name, fn, metadata2) => {
|
|
45632
45654
|
if (!traceEnabled)
|
|
45633
45655
|
return await fn();
|
|
@@ -45656,9 +45678,14 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45656
45678
|
throw error;
|
|
45657
45679
|
}
|
|
45658
45680
|
};
|
|
45681
|
+
if (traceEnabled) {
|
|
45682
|
+
traceGlobal.__absoluteBuildTracePhase = tracePhase;
|
|
45683
|
+
}
|
|
45659
45684
|
const writeBuildTrace = (buildPath2) => {
|
|
45660
|
-
if (!traceEnabled)
|
|
45685
|
+
if (!traceEnabled) {
|
|
45686
|
+
restoreTracePhase();
|
|
45661
45687
|
return;
|
|
45688
|
+
}
|
|
45662
45689
|
const traceDir = join20(buildPath2, ".absolute-trace");
|
|
45663
45690
|
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
45664
45691
|
mkdirSync10(traceDir, { recursive: true });
|
|
@@ -45670,6 +45697,7 @@ ${content.slice(firstUseIdx)}`;
|
|
|
45670
45697
|
totalDurationMs: performance.now() - buildStart,
|
|
45671
45698
|
version: 1
|
|
45672
45699
|
}, null, 2));
|
|
45700
|
+
restoreTracePhase();
|
|
45673
45701
|
};
|
|
45674
45702
|
await tracePhase("absolute/version", () => resolveAbsoluteVersion());
|
|
45675
45703
|
const isIncremental = incrementalFiles && incrementalFiles.length > 0;
|
|
@@ -58645,5 +58673,5 @@ export {
|
|
|
58645
58673
|
ANGULAR_INIT_TIMEOUT_MS
|
|
58646
58674
|
};
|
|
58647
58675
|
|
|
58648
|
-
//# debugId=
|
|
58676
|
+
//# debugId=64A59FBF213B352B64756E2164756E21
|
|
58649
58677
|
//# sourceMappingURL=index.js.map
|