@absolutejs/absolute 0.19.0-beta.967 → 0.19.0-beta.968
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/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +156 -102
- package/dist/angular/index.js.map +7 -6
- package/dist/angular/server.js +156 -102
- package/dist/angular/server.js.map +7 -6
- package/dist/build.js +1392 -954
- package/dist/build.js.map +9 -5
- package/dist/index.js +1437 -999
- package/dist/index.js.map +9 -5
- package/dist/src/angular/loadRouteMounts.d.ts +3 -0
- package/dist/src/angular/pageHandler.d.ts +9 -0
- package/dist/src/build/emitAngularProvidersFiles.d.ts +18 -0
- package/dist/src/build/emitAngularRouteMounts.d.ts +3 -0
- package/dist/src/build/runAngularHandlerScan.d.ts +10 -0
- package/dist/src/build/scanAngularHandlerCalls.d.ts +35 -0
- package/dist/types/angular.d.ts +11 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-uGMY2D/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-uGMY2D/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
|
48
48
|
getWarningController()?.maybeWarn(primitiveName);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
// .angular-partial-tmp-
|
|
51
|
+
// .angular-partial-tmp-uGMY2D/src/core/streamingSlotRegistry.ts
|
|
52
52
|
var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
|
|
53
53
|
var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
|
|
54
54
|
var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
|
package/dist/angular/index.js
CHANGED
|
@@ -2960,6 +2960,16 @@ var init_logger = __esm(() => {
|
|
|
2960
2960
|
};
|
|
2961
2961
|
});
|
|
2962
2962
|
|
|
2963
|
+
// src/utils/generatedDir.ts
|
|
2964
|
+
var exports_generatedDir = {};
|
|
2965
|
+
__export(exports_generatedDir, {
|
|
2966
|
+
getGeneratedRoot: () => getGeneratedRoot,
|
|
2967
|
+
getFrameworkGeneratedDir: () => getFrameworkGeneratedDir
|
|
2968
|
+
});
|
|
2969
|
+
import { join as join6 } from "path";
|
|
2970
|
+
var GENERATED_DIR_NAME = "generated", ABSOLUTE_CACHE_DIR_NAME = ".absolutejs", getGeneratedRoot = (projectRoot = process.cwd()) => join6(projectRoot, ABSOLUTE_CACHE_DIR_NAME, GENERATED_DIR_NAME), getFrameworkGeneratedDir = (framework, projectRoot = process.cwd()) => join6(getGeneratedRoot(projectRoot), framework);
|
|
2971
|
+
var init_generatedDir = () => {};
|
|
2972
|
+
|
|
2963
2973
|
// src/islands/sourceMetadata.ts
|
|
2964
2974
|
var islandFrameworks2, islandHydrationModes2, isIslandFramework2 = (value) => islandFrameworks2.some((framework) => framework === value), isIslandHydrate2 = (value) => islandHydrationModes2.some((hydrate) => hydrate === value), parseIslandTagAttributes = (attributeString) => {
|
|
2965
2975
|
const frameworkMatch = attributeString.match(/\bframework\s*=\s*["']([^"']+)["']/);
|
|
@@ -3498,16 +3508,6 @@ var init_lowerDeferSyntax = __esm(() => {
|
|
|
3498
3508
|
init_constants();
|
|
3499
3509
|
});
|
|
3500
3510
|
|
|
3501
|
-
// src/utils/generatedDir.ts
|
|
3502
|
-
var exports_generatedDir = {};
|
|
3503
|
-
__export(exports_generatedDir, {
|
|
3504
|
-
getGeneratedRoot: () => getGeneratedRoot,
|
|
3505
|
-
getFrameworkGeneratedDir: () => getFrameworkGeneratedDir
|
|
3506
|
-
});
|
|
3507
|
-
import { join as join6 } from "path";
|
|
3508
|
-
var GENERATED_DIR_NAME = "generated", ABSOLUTE_CACHE_DIR_NAME = ".absolutejs", getGeneratedRoot = (projectRoot = process.cwd()) => join6(projectRoot, ABSOLUTE_CACHE_DIR_NAME, GENERATED_DIR_NAME), getFrameworkGeneratedDir = (framework, projectRoot = process.cwd()) => join6(getGeneratedRoot(projectRoot), framework);
|
|
3509
|
-
var init_generatedDir = () => {};
|
|
3510
|
-
|
|
3511
3511
|
// src/build/compileAngular.ts
|
|
3512
3512
|
var exports_compileAngular = {};
|
|
3513
3513
|
__export(exports_compileAngular, {
|
|
@@ -3517,8 +3517,8 @@ __export(exports_compileAngular, {
|
|
|
3517
3517
|
compileAngularFile: () => compileAngularFile,
|
|
3518
3518
|
compileAngular: () => compileAngular
|
|
3519
3519
|
});
|
|
3520
|
-
import { existsSync as
|
|
3521
|
-
import { join as
|
|
3520
|
+
import { existsSync as existsSync5, readFileSync as readFileSync4, promises as fs } from "fs";
|
|
3521
|
+
import { join as join8, basename as basename3, sep, dirname as dirname4, resolve as resolve6, relative as relative4 } from "path";
|
|
3522
3522
|
var {Glob } = globalThis.Bun;
|
|
3523
3523
|
import ts from "typescript";
|
|
3524
3524
|
var traceAngularPhase = async (name, fn, metadata) => {
|
|
@@ -3561,12 +3561,12 @@ var traceAngularPhase = async (name, fn, metadata) => {
|
|
|
3561
3561
|
`${candidate}.tsx`,
|
|
3562
3562
|
`${candidate}.js`,
|
|
3563
3563
|
`${candidate}.jsx`,
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3564
|
+
join8(candidate, "index.ts"),
|
|
3565
|
+
join8(candidate, "index.tsx"),
|
|
3566
|
+
join8(candidate, "index.js"),
|
|
3567
|
+
join8(candidate, "index.jsx")
|
|
3568
3568
|
];
|
|
3569
|
-
return candidates.find((file) =>
|
|
3569
|
+
return candidates.find((file) => existsSync5(file));
|
|
3570
3570
|
}, createLegacyAngularAnimationUsageResolver = (rootDir) => {
|
|
3571
3571
|
const baseDir = resolve6(rootDir);
|
|
3572
3572
|
const tsconfigAliases = readTsconfigPathAliases();
|
|
@@ -3600,9 +3600,9 @@ var traceAngularPhase = async (name, fn, metadata) => {
|
|
|
3600
3600
|
});
|
|
3601
3601
|
}
|
|
3602
3602
|
const resolved = resolve6(actualPath);
|
|
3603
|
-
const
|
|
3604
|
-
if (
|
|
3605
|
-
return
|
|
3603
|
+
const cached2 = scanCache.get(resolved);
|
|
3604
|
+
if (cached2)
|
|
3605
|
+
return cached2;
|
|
3606
3606
|
const promise = (async () => {
|
|
3607
3607
|
let sourceCode;
|
|
3608
3608
|
try {
|
|
@@ -3647,11 +3647,11 @@ var traceAngularPhase = async (name, fn, metadata) => {
|
|
|
3647
3647
|
}, resolveDevClientDir = () => {
|
|
3648
3648
|
const projectRoot = process.cwd();
|
|
3649
3649
|
const fromSource = resolve6(import.meta.dir, "../dev/client");
|
|
3650
|
-
if (
|
|
3650
|
+
if (existsSync5(fromSource) && fromSource.startsWith(projectRoot)) {
|
|
3651
3651
|
return fromSource;
|
|
3652
3652
|
}
|
|
3653
3653
|
const fromNodeModules = resolve6(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
|
|
3654
|
-
if (
|
|
3654
|
+
if (existsSync5(fromNodeModules))
|
|
3655
3655
|
return fromNodeModules;
|
|
3656
3656
|
return resolve6(import.meta.dir, "./dev/client");
|
|
3657
3657
|
}, devClientDir, hmrClientPath, formatDiagnosticMessage = (diagnostic) => {
|
|
@@ -3697,11 +3697,11 @@ var traceAngularPhase = async (name, fn, metadata) => {
|
|
|
3697
3697
|
return `${path}${query}`;
|
|
3698
3698
|
const importerDir = dirname4(importerOutputPath);
|
|
3699
3699
|
const fileCandidate = resolve6(importerDir, `${path}.js`);
|
|
3700
|
-
if (outputFiles?.has(fileCandidate) ||
|
|
3700
|
+
if (outputFiles?.has(fileCandidate) || existsSync5(fileCandidate)) {
|
|
3701
3701
|
return `${path}.js${query}`;
|
|
3702
3702
|
}
|
|
3703
3703
|
const indexCandidate = resolve6(importerDir, path, "index.js");
|
|
3704
|
-
if (outputFiles?.has(indexCandidate) ||
|
|
3704
|
+
if (outputFiles?.has(indexCandidate) || existsSync5(indexCandidate)) {
|
|
3705
3705
|
return `${path}/index.js${query}`;
|
|
3706
3706
|
}
|
|
3707
3707
|
return `${path}.js${query}`;
|
|
@@ -3734,12 +3734,12 @@ var traceAngularPhase = async (name, fn, metadata) => {
|
|
|
3734
3734
|
`${basePath}.tsx`,
|
|
3735
3735
|
`${basePath}.mts`,
|
|
3736
3736
|
`${basePath}.cts`,
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3737
|
+
join8(basePath, "index.ts"),
|
|
3738
|
+
join8(basePath, "index.tsx"),
|
|
3739
|
+
join8(basePath, "index.mts"),
|
|
3740
|
+
join8(basePath, "index.cts")
|
|
3741
3741
|
];
|
|
3742
|
-
return candidates.map((candidate) => resolve6(candidate)).find((candidate) =>
|
|
3742
|
+
return candidates.map((candidate) => resolve6(candidate)).find((candidate) => existsSync5(candidate) && !candidate.endsWith(".d.ts")) ?? null;
|
|
3743
3743
|
}, readFileForAotTransform = async (fileName, readFile2) => {
|
|
3744
3744
|
const hostSource = readFile2?.(fileName);
|
|
3745
3745
|
if (typeof hostSource === "string")
|
|
@@ -3763,15 +3763,15 @@ var traceAngularPhase = async (name, fn, metadata) => {
|
|
|
3763
3763
|
const paths = [];
|
|
3764
3764
|
const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
|
|
3765
3765
|
if (templateUrlMatch?.[1])
|
|
3766
|
-
paths.push(
|
|
3766
|
+
paths.push(join8(fileDir, templateUrlMatch[1]));
|
|
3767
3767
|
const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
|
|
3768
3768
|
if (styleUrlMatch?.[1])
|
|
3769
|
-
paths.push(
|
|
3769
|
+
paths.push(join8(fileDir, styleUrlMatch[1]));
|
|
3770
3770
|
const styleUrlsMatch = findUncommentedMatch(source, /styleUrls\s*:\s*\[([^\]]+)\]/);
|
|
3771
3771
|
const urlMatches = styleUrlsMatch?.[1]?.match(/['"]([^'"]+)['"]/g);
|
|
3772
3772
|
if (urlMatches) {
|
|
3773
3773
|
for (const urlMatch of urlMatches) {
|
|
3774
|
-
paths.push(
|
|
3774
|
+
paths.push(join8(fileDir, urlMatch.replace(/['"]/g, "")));
|
|
3775
3775
|
}
|
|
3776
3776
|
}
|
|
3777
3777
|
return paths.map((path) => resolve6(path));
|
|
@@ -3805,7 +3805,7 @@ var traceAngularPhase = async (name, fn, metadata) => {
|
|
|
3805
3805
|
safeStableStringify(stylePreprocessors ?? null)
|
|
3806
3806
|
].join("\x00");
|
|
3807
3807
|
const cacheKey = Bun.hash(cacheInput).toString(BASE_36_RADIX);
|
|
3808
|
-
return
|
|
3808
|
+
return join8(process.cwd(), ".absolutejs", "cache", "angular-resources", `${cacheKey}.json`);
|
|
3809
3809
|
}, precomputeAotResourceTransforms = async (inputPaths, readFile2, stylePreprocessors) => {
|
|
3810
3810
|
const transformedSources = new Map;
|
|
3811
3811
|
const visited = new Set;
|
|
@@ -3820,16 +3820,16 @@ var traceAngularPhase = async (name, fn, metadata) => {
|
|
|
3820
3820
|
if (visited.has(resolvedPath))
|
|
3821
3821
|
return;
|
|
3822
3822
|
visited.add(resolvedPath);
|
|
3823
|
-
if (!
|
|
3823
|
+
if (!existsSync5(resolvedPath) || resolvedPath.endsWith(".d.ts"))
|
|
3824
3824
|
return;
|
|
3825
3825
|
stats.filesVisited += 1;
|
|
3826
3826
|
const source = await readFileForAotTransform(resolvedPath, readFile2);
|
|
3827
3827
|
const cachePath = await resolveResourceTransformCachePath(resolvedPath, source, stylePreprocessors);
|
|
3828
|
-
const
|
|
3828
|
+
const cached2 = await readResourceCacheFile(cachePath);
|
|
3829
3829
|
let transformedSource;
|
|
3830
|
-
if (
|
|
3830
|
+
if (cached2) {
|
|
3831
3831
|
stats.cacheHits += 1;
|
|
3832
|
-
transformedSource =
|
|
3832
|
+
transformedSource = cached2.source;
|
|
3833
3833
|
} else {
|
|
3834
3834
|
stats.cacheMisses += 1;
|
|
3835
3835
|
const transformed = await inlineResources(source, dirname4(resolvedPath), stylePreprocessors);
|
|
@@ -3851,7 +3851,7 @@ var traceAngularPhase = async (name, fn, metadata) => {
|
|
|
3851
3851
|
return { stats, transformedSources };
|
|
3852
3852
|
}, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
|
|
3853
3853
|
const islandMetadataByOutputPath = await traceAngularPhase("aot/island-metadata", () => new Map(inputPaths.map((inputPath) => {
|
|
3854
|
-
const outputPath = resolve6(
|
|
3854
|
+
const outputPath = resolve6(join8(outDir, relative4(process.cwd(), resolve6(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
|
|
3855
3855
|
return [
|
|
3856
3856
|
outputPath,
|
|
3857
3857
|
buildIslandMetadataExports(readFileSync4(inputPath, "utf-8"))
|
|
@@ -3898,7 +3898,7 @@ var traceAngularPhase = async (name, fn, metadata) => {
|
|
|
3898
3898
|
const originalGetSourceFile = host.getSourceFile;
|
|
3899
3899
|
host.getSourceFile = (fileName, languageVersion, onError) => {
|
|
3900
3900
|
if (fileName.startsWith("lib.") && fileName.endsWith(".d.ts") && tsLibDir) {
|
|
3901
|
-
const resolvedPath =
|
|
3901
|
+
const resolvedPath = join8(tsLibDir, fileName);
|
|
3902
3902
|
return originalGetSourceFile?.call(host, resolvedPath, languageVersion, onError);
|
|
3903
3903
|
}
|
|
3904
3904
|
return originalGetSourceFile?.call(host, fileName, languageVersion, onError);
|
|
@@ -3953,7 +3953,7 @@ var traceAngularPhase = async (name, fn, metadata) => {
|
|
|
3953
3953
|
const entries = await traceAngularPhase("aot/postprocess-emitted-js", () => {
|
|
3954
3954
|
const rawEntries = Object.entries(emitted).filter(([fileName]) => fileName.endsWith(".js")).map(([fileName, content]) => ({
|
|
3955
3955
|
content,
|
|
3956
|
-
target:
|
|
3956
|
+
target: join8(outDir, fileName)
|
|
3957
3957
|
}));
|
|
3958
3958
|
const outputFiles = new Set(rawEntries.map(({ target }) => resolve6(target)));
|
|
3959
3959
|
return rawEntries.map(({ content, target }) => {
|
|
@@ -3994,7 +3994,7 @@ var traceAngularPhase = async (name, fn, metadata) => {
|
|
|
3994
3994
|
return null;
|
|
3995
3995
|
}, resolveAngularDeferImportSpecifier = () => {
|
|
3996
3996
|
const sourceEntry = resolve6(import.meta.dir, "../angular/components/index.ts");
|
|
3997
|
-
if (
|
|
3997
|
+
if (existsSync5(sourceEntry)) {
|
|
3998
3998
|
return sourceEntry.replace(/\\/g, "/");
|
|
3999
3999
|
}
|
|
4000
4000
|
return "@absolutejs/absolute/angular/components";
|
|
@@ -4122,7 +4122,7 @@ ${slot.resolvedBindings.map((binding) => ` "${binding.key}": this.__absoluteDef
|
|
|
4122
4122
|
${fields}
|
|
4123
4123
|
`);
|
|
4124
4124
|
}, readAndEscapeFile = async (filePath, stylePreprocessors) => {
|
|
4125
|
-
if (!
|
|
4125
|
+
if (!existsSync5(filePath)) {
|
|
4126
4126
|
throw new Error(`Unable to inline Angular style resource: file not found at ${filePath}`);
|
|
4127
4127
|
}
|
|
4128
4128
|
const content = await compileStyleFileIfNeeded(filePath, stylePreprocessors);
|
|
@@ -4130,8 +4130,8 @@ ${fields}
|
|
|
4130
4130
|
}, inlineTemplateAndLowerDefer = async (source, fileDir) => {
|
|
4131
4131
|
const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
|
|
4132
4132
|
if (templateUrlMatch?.[1]) {
|
|
4133
|
-
const templatePath =
|
|
4134
|
-
if (!
|
|
4133
|
+
const templatePath = join8(fileDir, templateUrlMatch[1]);
|
|
4134
|
+
if (!existsSync5(templatePath)) {
|
|
4135
4135
|
throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
|
|
4136
4136
|
}
|
|
4137
4137
|
const templateRaw2 = await fs.readFile(templatePath, "utf-8");
|
|
@@ -4161,8 +4161,8 @@ ${fields}
|
|
|
4161
4161
|
}, inlineTemplateAndLowerDeferSync = (source, fileDir) => {
|
|
4162
4162
|
const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
|
|
4163
4163
|
if (templateUrlMatch?.[1]) {
|
|
4164
|
-
const templatePath =
|
|
4165
|
-
if (!
|
|
4164
|
+
const templatePath = join8(fileDir, templateUrlMatch[1]);
|
|
4165
|
+
if (!existsSync5(templatePath)) {
|
|
4166
4166
|
throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
|
|
4167
4167
|
}
|
|
4168
4168
|
const templateRaw2 = readFileSync4(templatePath, "utf-8");
|
|
@@ -4198,7 +4198,7 @@ ${fields}
|
|
|
4198
4198
|
return source;
|
|
4199
4199
|
const stylePromises = urlMatches.map((urlMatch) => {
|
|
4200
4200
|
const styleUrl = urlMatch.replace(/['"]/g, "");
|
|
4201
|
-
return readAndEscapeFile(
|
|
4201
|
+
return readAndEscapeFile(join8(fileDir, styleUrl), stylePreprocessors);
|
|
4202
4202
|
});
|
|
4203
4203
|
const results = await Promise.all(stylePromises);
|
|
4204
4204
|
const inlinedStyles = results.filter(Boolean).map((escaped) => `\`${escaped}\``);
|
|
@@ -4209,7 +4209,7 @@ ${fields}
|
|
|
4209
4209
|
const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
|
|
4210
4210
|
if (!styleUrlMatch?.[1])
|
|
4211
4211
|
return source;
|
|
4212
|
-
const escaped = await readAndEscapeFile(
|
|
4212
|
+
const escaped = await readAndEscapeFile(join8(fileDir, styleUrlMatch[1]), stylePreprocessors);
|
|
4213
4213
|
if (!escaped)
|
|
4214
4214
|
return source;
|
|
4215
4215
|
return source.slice(0, styleUrlMatch.index) + `styles: [\`${escaped}\`]` + source.slice(styleUrlMatch.index + styleUrlMatch[0].length);
|
|
@@ -4245,12 +4245,12 @@ ${fields}
|
|
|
4245
4245
|
`${candidate}.js`,
|
|
4246
4246
|
`${candidate}.jsx`,
|
|
4247
4247
|
`${candidate}.json`,
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4248
|
+
join8(candidate, "index.ts"),
|
|
4249
|
+
join8(candidate, "index.tsx"),
|
|
4250
|
+
join8(candidate, "index.js"),
|
|
4251
|
+
join8(candidate, "index.jsx")
|
|
4252
4252
|
];
|
|
4253
|
-
return candidates.find((file) =>
|
|
4253
|
+
return candidates.find((file) => existsSync5(file));
|
|
4254
4254
|
};
|
|
4255
4255
|
const resolveLocalImport = (specifier, fromDir) => {
|
|
4256
4256
|
if (specifier.startsWith(".") || specifier.startsWith("/")) {
|
|
@@ -4275,7 +4275,7 @@ ${fields}
|
|
|
4275
4275
|
const inputDir = dirname4(sourcePath);
|
|
4276
4276
|
const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
|
|
4277
4277
|
const fileBase = basename3(sourcePath).replace(/\.[cm]?[tj]sx?$/, ".js");
|
|
4278
|
-
return
|
|
4278
|
+
return join8(outDir, relativeDir, fileBase);
|
|
4279
4279
|
};
|
|
4280
4280
|
const withCacheBuster = (specifier) => {
|
|
4281
4281
|
if (!cacheBuster)
|
|
@@ -4322,11 +4322,11 @@ ${fields}
|
|
|
4322
4322
|
if (visited.has(resolved))
|
|
4323
4323
|
return;
|
|
4324
4324
|
visited.add(resolved);
|
|
4325
|
-
if (resolved.endsWith(".json") &&
|
|
4325
|
+
if (resolved.endsWith(".json") && existsSync5(resolved)) {
|
|
4326
4326
|
const inputDir2 = dirname4(resolved);
|
|
4327
4327
|
const relativeDir2 = inputDir2.startsWith(baseDir) ? inputDir2.substring(baseDir.length + 1) : inputDir2;
|
|
4328
|
-
const targetDir2 =
|
|
4329
|
-
const targetPath2 =
|
|
4328
|
+
const targetDir2 = join8(outDir, relativeDir2);
|
|
4329
|
+
const targetPath2 = join8(targetDir2, basename3(resolved));
|
|
4330
4330
|
await fs.mkdir(targetDir2, { recursive: true });
|
|
4331
4331
|
await fs.copyFile(resolved, targetPath2);
|
|
4332
4332
|
allOutputs.push(targetPath2);
|
|
@@ -4335,7 +4335,7 @@ ${fields}
|
|
|
4335
4335
|
let actualPath = resolved;
|
|
4336
4336
|
if (!actualPath.endsWith(".ts"))
|
|
4337
4337
|
actualPath += ".ts";
|
|
4338
|
-
if (!
|
|
4338
|
+
if (!existsSync5(actualPath))
|
|
4339
4339
|
return;
|
|
4340
4340
|
let sourceCode = await fs.readFile(actualPath, "utf-8");
|
|
4341
4341
|
const inlined = await inlineResources(sourceCode, dirname4(actualPath), stylePreprocessors);
|
|
@@ -4343,7 +4343,7 @@ ${fields}
|
|
|
4343
4343
|
const inputDir = dirname4(actualPath);
|
|
4344
4344
|
const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
|
|
4345
4345
|
const fileBase = basename3(actualPath).replace(/\.[cm]?[tj]sx?$/, ".js");
|
|
4346
|
-
const targetDir =
|
|
4346
|
+
const targetDir = join8(outDir, relativeDir);
|
|
4347
4347
|
const targetPath = toOutputPath(actualPath);
|
|
4348
4348
|
const localImports = [];
|
|
4349
4349
|
const importRewrites = new Map;
|
|
@@ -4373,7 +4373,7 @@ ${fields}
|
|
|
4373
4373
|
const isEntry = resolve6(actualPath) === resolve6(entryPath);
|
|
4374
4374
|
const contentHash = Bun.hash(sourceCode).toString(BASE_36_RADIX);
|
|
4375
4375
|
const cacheKey = actualPath;
|
|
4376
|
-
const shouldWriteFile = cacheBuster && isEntry ? true : jitContentCache.get(cacheKey) !== contentHash || !
|
|
4376
|
+
const shouldWriteFile = cacheBuster && isEntry ? true : jitContentCache.get(cacheKey) !== contentHash || !existsSync5(targetPath);
|
|
4377
4377
|
if (shouldWriteFile) {
|
|
4378
4378
|
const processedContent = transpileAndRewrite(sourceCode, relativeDir, actualPath, importRewrites);
|
|
4379
4379
|
await fs.mkdir(targetDir, { recursive: true });
|
|
@@ -4385,7 +4385,7 @@ ${fields}
|
|
|
4385
4385
|
};
|
|
4386
4386
|
await transpileFile(inputPath);
|
|
4387
4387
|
const entryOutputPath = toOutputPath(entryPath);
|
|
4388
|
-
if (
|
|
4388
|
+
if (existsSync5(entryOutputPath)) {
|
|
4389
4389
|
const entryOutput = await fs.readFile(entryOutputPath, "utf-8");
|
|
4390
4390
|
const withoutLegacyFlag = entryOutput.replace(/\nexport const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;\n?/g, `
|
|
4391
4391
|
`);
|
|
@@ -4404,23 +4404,23 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
4404
4404
|
return { clientPaths: [...emptyPaths], serverPaths: [...emptyPaths] };
|
|
4405
4405
|
}
|
|
4406
4406
|
const compiledRoot = compiledParent;
|
|
4407
|
-
const indexesDir =
|
|
4407
|
+
const indexesDir = join8(compiledParent, "indexes");
|
|
4408
4408
|
await traceAngularPhase("setup/create-indexes-dir", () => fs.mkdir(indexesDir, { recursive: true }));
|
|
4409
4409
|
const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve6(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
|
|
4410
4410
|
if (!hmr) {
|
|
4411
4411
|
await traceAngularPhase("aot/copy-json-resources", async () => {
|
|
4412
4412
|
const cwd = process.cwd();
|
|
4413
4413
|
const angularSrcDir = resolve6(outRoot);
|
|
4414
|
-
if (!
|
|
4414
|
+
if (!existsSync5(angularSrcDir))
|
|
4415
4415
|
return;
|
|
4416
4416
|
const jsonGlob = new Glob("**/*.json");
|
|
4417
4417
|
for (const rel of jsonGlob.scanSync({
|
|
4418
4418
|
absolute: false,
|
|
4419
4419
|
cwd: angularSrcDir
|
|
4420
4420
|
})) {
|
|
4421
|
-
const sourcePath =
|
|
4421
|
+
const sourcePath = join8(angularSrcDir, rel);
|
|
4422
4422
|
const cwdRel = relative4(cwd, sourcePath);
|
|
4423
|
-
const targetPath =
|
|
4423
|
+
const targetPath = join8(compiledRoot, cwdRel);
|
|
4424
4424
|
await fs.mkdir(dirname4(targetPath), { recursive: true });
|
|
4425
4425
|
await fs.copyFile(sourcePath, targetPath);
|
|
4426
4426
|
}
|
|
@@ -4437,24 +4437,24 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
4437
4437
|
const fileBase = basename3(resolvedEntry).replace(/\.[tj]s$/, "");
|
|
4438
4438
|
const jsName = `${fileBase}.js`;
|
|
4439
4439
|
const compiledFallbackPaths = [
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4440
|
+
join8(compiledRoot, relativeEntry),
|
|
4441
|
+
join8(compiledRoot, "pages", jsName),
|
|
4442
|
+
join8(compiledRoot, jsName)
|
|
4443
4443
|
].map((file) => resolve6(file));
|
|
4444
4444
|
const resolveRawServerFile = (candidatePaths) => {
|
|
4445
4445
|
const normalizedCandidates = [
|
|
4446
4446
|
...candidatePaths.map((file) => resolve6(file)),
|
|
4447
4447
|
...compiledFallbackPaths
|
|
4448
4448
|
];
|
|
4449
|
-
let candidate = normalizedCandidates.find((file) =>
|
|
4449
|
+
let candidate = normalizedCandidates.find((file) => existsSync5(file) && file.endsWith(`${sep}${relativeEntry}`));
|
|
4450
4450
|
if (!candidate) {
|
|
4451
|
-
candidate = normalizedCandidates.find((file) =>
|
|
4451
|
+
candidate = normalizedCandidates.find((file) => existsSync5(file) && file.endsWith(`${sep}pages${sep}${jsName}`));
|
|
4452
4452
|
}
|
|
4453
4453
|
if (!candidate) {
|
|
4454
|
-
candidate = normalizedCandidates.find((file) =>
|
|
4454
|
+
candidate = normalizedCandidates.find((file) => existsSync5(file) && file.endsWith(`${sep}${jsName}`));
|
|
4455
4455
|
}
|
|
4456
4456
|
if (!candidate) {
|
|
4457
|
-
candidate = normalizedCandidates.find((file) =>
|
|
4457
|
+
candidate = normalizedCandidates.find((file) => existsSync5(file));
|
|
4458
4458
|
}
|
|
4459
4459
|
return candidate;
|
|
4460
4460
|
};
|
|
@@ -4462,11 +4462,11 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
4462
4462
|
if (!rawServerFile) {
|
|
4463
4463
|
rawServerFile = await traceAngularPhase("wrapper/resolve-server-output-fallback", () => resolveRawServerFile([]), { entry: resolvedEntry });
|
|
4464
4464
|
}
|
|
4465
|
-
if (rawServerFile && !
|
|
4465
|
+
if (rawServerFile && !existsSync5(rawServerFile)) {
|
|
4466
4466
|
outputs = hmr ? await compileEntry() : aotOutputs;
|
|
4467
4467
|
rawServerFile = await traceAngularPhase("wrapper/resolve-server-output-retry", () => resolveRawServerFile(outputs), { entry: resolvedEntry });
|
|
4468
4468
|
}
|
|
4469
|
-
if (!rawServerFile || !
|
|
4469
|
+
if (!rawServerFile || !existsSync5(rawServerFile)) {
|
|
4470
4470
|
throw new Error(`Compiled output not found for ${entry}. Looking for: ${jsName}. Available: ${[
|
|
4471
4471
|
...outputs,
|
|
4472
4472
|
...compiledFallbackPaths
|
|
@@ -4487,8 +4487,8 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
4487
4487
|
const usesLegacyAnimations = await traceAngularPhase("wrapper/detect-legacy-animations", () => usesLegacyAngularAnimations(resolvedEntry), { entry: resolvedEntry });
|
|
4488
4488
|
const serverContentHash = Bun.hash(original).toString(BASE_36_RADIX);
|
|
4489
4489
|
const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
|
|
4490
|
-
const clientFile =
|
|
4491
|
-
if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash &&
|
|
4490
|
+
const clientFile = join8(indexesDir, jsName);
|
|
4491
|
+
if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash && existsSync5(clientFile) && (usesLegacyAnimations || !original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__")) && (!usesLegacyAnimations || original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__"))) {
|
|
4492
4492
|
return {
|
|
4493
4493
|
clientPath: clientFile,
|
|
4494
4494
|
indexUnchanged: true,
|
|
@@ -4515,6 +4515,14 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
|
4515
4515
|
await traceAngularPhase("wrapper/write-server-output", () => fs.writeFile(rawServerFile, rewritten, "utf-8"), { entry: resolvedEntry });
|
|
4516
4516
|
const relativePath = relative4(indexesDir, rawServerFile).replace(/\\/g, "/");
|
|
4517
4517
|
const normalizedImportPath = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
|
|
4518
|
+
const manifestKeyForProviders = toPascal(fileBase);
|
|
4519
|
+
const providersFilePath = join8(compiledParent, "providers", `${manifestKeyForProviders}.providers.ts`);
|
|
4520
|
+
const hasGeneratedProviders = existsSync5(providersFilePath);
|
|
4521
|
+
const providersImportPath = hasGeneratedProviders ? (() => {
|
|
4522
|
+
const rel = relative4(indexesDir, providersFilePath.replace(/\.ts$/, "")).replace(/\\/g, "/");
|
|
4523
|
+
return rel.startsWith(".") ? rel : `./${rel}`;
|
|
4524
|
+
})() : null;
|
|
4525
|
+
const generatedProvidersImport = providersImportPath ? `import { providers as generatedProviders } from '${providersImportPath}';` : "var generatedProviders = null;";
|
|
4518
4526
|
const hmrPreamble = hmr ? `window.__HMR_FRAMEWORK__ = "angular";
|
|
4519
4527
|
import "${hmrClientPath}";
|
|
4520
4528
|
` : "";
|
|
@@ -4525,6 +4533,7 @@ import { provideClientHydration } from '@angular/platform-browser';
|
|
|
4525
4533
|
import { withHttpTransferCacheOptions } from '@angular/platform-browser';
|
|
4526
4534
|
import { provideZonelessChangeDetection, REQUEST_CONTEXT } from '@angular/core';
|
|
4527
4535
|
import * as pageModule from '${normalizedImportPath}';
|
|
4536
|
+
${generatedProvidersImport}
|
|
4528
4537
|
|
|
4529
4538
|
var ${componentClassName} = pageModule.default;
|
|
4530
4539
|
// REQUEST_CONTEXT is hydrated from the SSR-serialized payload so client-side
|
|
@@ -4538,12 +4547,15 @@ var pageHasIslands = Boolean(pageModule.__ABSOLUTE_PAGE_HAS_ISLANDS__) || Boolea
|
|
|
4538
4547
|
var pageHasRawStreamingSlots = Boolean(document.querySelector('[data-absolute-raw-slot="true"]'));
|
|
4539
4548
|
var pageHasStreamingSlots = Boolean(document.querySelector('[data-absolute-slot="true"]'));
|
|
4540
4549
|
var contextProviders = [{ provide: REQUEST_CONTEXT, useValue: requestContext }];
|
|
4541
|
-
// Page-level providers
|
|
4542
|
-
//
|
|
4543
|
-
//
|
|
4544
|
-
//
|
|
4545
|
-
|
|
4546
|
-
var
|
|
4550
|
+
// Page-level providers come from the build-generated providers file
|
|
4551
|
+
// (emitted by \`runAngularHandlerScan\` based on the page's
|
|
4552
|
+
// \`handleAngularPageRequest({...})\` call). Falls back to the legacy
|
|
4553
|
+
// \`export const providers\` on the page module for projects that
|
|
4554
|
+
// haven't migrated yet.
|
|
4555
|
+
var legacyPageProviders = Reflect.get(pageModule, 'providers');
|
|
4556
|
+
var pageProviders = Array.isArray(generatedProviders)
|
|
4557
|
+
? generatedProviders
|
|
4558
|
+
: (Array.isArray(legacyPageProviders) ? legacyPageProviders : []);
|
|
4547
4559
|
var absoluteHttpTransferCacheOptions = {
|
|
4548
4560
|
includePostRequests: false,
|
|
4549
4561
|
includeRequestsWithAuthHeaders: false,
|
|
@@ -4620,6 +4632,7 @@ import { provideClientHydration } from '@angular/platform-browser';
|
|
|
4620
4632
|
import { withHttpTransferCacheOptions } from '@angular/platform-browser';
|
|
4621
4633
|
import { enableProdMode, provideZonelessChangeDetection, REQUEST_CONTEXT } from '@angular/core';
|
|
4622
4634
|
import * as pageModule from '${normalizedImportPath}';
|
|
4635
|
+
${generatedProvidersImport}
|
|
4623
4636
|
|
|
4624
4637
|
var ${componentClassName} = pageModule.default;
|
|
4625
4638
|
// REQUEST_CONTEXT is hydrated from the SSR-serialized payload so client-side
|
|
@@ -4633,12 +4646,15 @@ var pageHasIslands = Boolean(pageModule.__ABSOLUTE_PAGE_HAS_ISLANDS__) || Boolea
|
|
|
4633
4646
|
var pageHasRawStreamingSlots = Boolean(document.querySelector('[data-absolute-raw-slot="true"]'));
|
|
4634
4647
|
var pageHasStreamingSlots = Boolean(document.querySelector('[data-absolute-slot="true"]'));
|
|
4635
4648
|
var contextProviders = [{ provide: REQUEST_CONTEXT, useValue: requestContext }];
|
|
4636
|
-
// Page-level providers
|
|
4637
|
-
//
|
|
4638
|
-
//
|
|
4639
|
-
//
|
|
4640
|
-
|
|
4641
|
-
var
|
|
4649
|
+
// Page-level providers come from the build-generated providers file
|
|
4650
|
+
// (emitted by \`runAngularHandlerScan\` based on the page's
|
|
4651
|
+
// \`handleAngularPageRequest({...})\` call). Falls back to the legacy
|
|
4652
|
+
// \`export const providers\` on the page module for projects that
|
|
4653
|
+
// haven't migrated yet.
|
|
4654
|
+
var legacyPageProviders = Reflect.get(pageModule, 'providers');
|
|
4655
|
+
var pageProviders = Array.isArray(generatedProviders)
|
|
4656
|
+
? generatedProviders
|
|
4657
|
+
: (Array.isArray(legacyPageProviders) ? legacyPageProviders : []);
|
|
4642
4658
|
var absoluteHttpTransferCacheOptions = {
|
|
4643
4659
|
includePostRequests: false,
|
|
4644
4660
|
includeRequestsWithAuthHeaders: false,
|
|
@@ -4707,7 +4723,7 @@ var init_compileAngular = __esm(() => {
|
|
|
4707
4723
|
init_stylePreprocessor();
|
|
4708
4724
|
init_generatedDir();
|
|
4709
4725
|
devClientDir = resolveDevClientDir();
|
|
4710
|
-
hmrClientPath =
|
|
4726
|
+
hmrClientPath = join8(devClientDir, "hmrClient.ts").replace(/\\/g, "/");
|
|
4711
4727
|
jitContentCache = new Map;
|
|
4712
4728
|
wrapperOutputCache = new Map;
|
|
4713
4729
|
});
|
|
@@ -13818,7 +13834,7 @@ init_constants();
|
|
|
13818
13834
|
import { AsyncLocalStorage as AsyncLocalStorage3 } from "async_hooks";
|
|
13819
13835
|
import { mkdir as mkdir3, symlink } from "fs/promises";
|
|
13820
13836
|
import { tmpdir } from "os";
|
|
13821
|
-
import { basename as basename4, dirname as dirname5, join as
|
|
13837
|
+
import { basename as basename4, dirname as dirname5, join as join9, resolve as resolve7 } from "path";
|
|
13822
13838
|
import { pathToFileURL as pathToFileURL2 } from "url";
|
|
13823
13839
|
|
|
13824
13840
|
// src/core/islandPageContext.ts
|
|
@@ -14655,6 +14671,38 @@ var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage(
|
|
|
14655
14671
|
|
|
14656
14672
|
// src/angular/pageHandler.ts
|
|
14657
14673
|
init_ssrRender();
|
|
14674
|
+
|
|
14675
|
+
// src/angular/loadRouteMounts.ts
|
|
14676
|
+
init_generatedDir();
|
|
14677
|
+
import { existsSync as existsSync4 } from "fs";
|
|
14678
|
+
import { join as join7 } from "path";
|
|
14679
|
+
var cached = null;
|
|
14680
|
+
var loadAngularRouteMounts = async () => {
|
|
14681
|
+
if (cached)
|
|
14682
|
+
return cached;
|
|
14683
|
+
const filePath = join7(getFrameworkGeneratedDir("angular", process.cwd()), "route-mounts.ts");
|
|
14684
|
+
if (!existsSync4(filePath)) {
|
|
14685
|
+
cached = [];
|
|
14686
|
+
return cached;
|
|
14687
|
+
}
|
|
14688
|
+
try {
|
|
14689
|
+
const mod = await import(filePath);
|
|
14690
|
+
cached = mod.routeMounts ?? [];
|
|
14691
|
+
} catch (error) {
|
|
14692
|
+
console.warn("[absolute/angular] failed to load route-mounts:", error);
|
|
14693
|
+
cached = [];
|
|
14694
|
+
}
|
|
14695
|
+
return cached;
|
|
14696
|
+
};
|
|
14697
|
+
var matchAngularBasePath = (mounts, urlPath) => {
|
|
14698
|
+
for (const mount of mounts) {
|
|
14699
|
+
if (mount.pattern.test(urlPath))
|
|
14700
|
+
return mount.basePath;
|
|
14701
|
+
}
|
|
14702
|
+
return "/";
|
|
14703
|
+
};
|
|
14704
|
+
|
|
14705
|
+
// src/angular/pageHandler.ts
|
|
14658
14706
|
var lastSelector = "angular-page";
|
|
14659
14707
|
var isRecord5 = (value) => typeof value === "object" && value !== null;
|
|
14660
14708
|
var isAngularComponent2 = (value) => typeof value === "function";
|
|
@@ -14675,11 +14723,11 @@ var ensureAngularCompiler = () => {
|
|
|
14675
14723
|
return compilerImportPromise;
|
|
14676
14724
|
};
|
|
14677
14725
|
var readAngularPageModule = (value) => isRecord5(value) ? value : null;
|
|
14678
|
-
var resolveAngularSsrOutDir = () => process.env.ABSOLUTE_ANGULAR_SSR_OUTDIR ??
|
|
14726
|
+
var resolveAngularSsrOutDir = () => process.env.ABSOLUTE_ANGULAR_SSR_OUTDIR ?? join9(tmpdir(), "absolutejs", "generated", "angular-ssr");
|
|
14679
14727
|
var createAngularRuntimeCacheBuster = () => `${Date.now().toString(BASE_36_RADIX)}.${Math.random().toString(BASE_36_RADIX).substring(2, RANDOM_ID_END_INDEX)}`;
|
|
14680
14728
|
var ensureAngularSsrNodeModules = async (outDir) => {
|
|
14681
14729
|
const outRoot = resolve7(dirname5(dirname5(outDir)));
|
|
14682
|
-
const nodeModulesLink =
|
|
14730
|
+
const nodeModulesLink = join9(outRoot, "node_modules");
|
|
14683
14731
|
if (process.env.ABSOLUTE_ANGULAR_SSR_OUTDIR) {
|
|
14684
14732
|
return;
|
|
14685
14733
|
}
|
|
@@ -14754,11 +14802,6 @@ var resolveRequestRenderUrl = (request) => {
|
|
|
14754
14802
|
return "/";
|
|
14755
14803
|
}
|
|
14756
14804
|
};
|
|
14757
|
-
var assertNoHandlerProviders = (input) => {
|
|
14758
|
-
if (!("providers" in input))
|
|
14759
|
-
return;
|
|
14760
|
-
throw new Error("Angular handler providers are not supported. Export `providers` from the Angular page module, or inject REQUEST / REQUEST_CONTEXT for request-scoped data.");
|
|
14761
|
-
};
|
|
14762
14805
|
var angularSsrContext = new AsyncLocalStorage3;
|
|
14763
14806
|
setSsrContextGetter(() => angularSsrContext.getStore());
|
|
14764
14807
|
var handleAngularPageRequest = async (input) => {
|
|
@@ -14777,7 +14820,6 @@ var handleAngularPageRequest = async (input) => {
|
|
|
14777
14820
|
requestContext: maybeRequestContext
|
|
14778
14821
|
});
|
|
14779
14822
|
try {
|
|
14780
|
-
assertNoHandlerProviders(input);
|
|
14781
14823
|
const handlerCallsite = options?.collectStreamingSlots === true ? undefined : getCurrentRouteRegistrationCallsite() ?? captureStreamingSlotWarningCallsite();
|
|
14782
14824
|
const renderPageResponse = async () => {
|
|
14783
14825
|
const baseDeps = await getAngularDeps();
|
|
@@ -14799,11 +14841,23 @@ var handleAngularPageRequest = async (input) => {
|
|
|
14799
14841
|
const htmlString = `<!DOCTYPE html><html>${resolvedHeadTag}<body><${selector}></${selector}></body></html>`;
|
|
14800
14842
|
resetSsrSanitizer();
|
|
14801
14843
|
const sanitizer = getSsrSanitizer(deps);
|
|
14802
|
-
const
|
|
14803
|
-
const
|
|
14844
|
+
const handlerProviders = Array.isArray(input.providers) ? input.providers : [];
|
|
14845
|
+
const legacyProvidersExport = Reflect.get(pageModule, "providers");
|
|
14846
|
+
const legacyPageProviders = handlerProviders.length > 0 ? [] : Array.isArray(legacyProvidersExport) ? legacyProvidersExport : [];
|
|
14847
|
+
const routeMounts = await loadAngularRouteMounts();
|
|
14848
|
+
const requestUrlPath = input.request ? new URL(input.request.url).pathname : "/";
|
|
14849
|
+
const inferredBasePath = matchAngularBasePath(routeMounts, requestUrlPath);
|
|
14850
|
+
const inferredBasePathProvider = inferredBasePath === "/" ? [] : [
|
|
14851
|
+
{
|
|
14852
|
+
provide: deps.APP_BASE_HREF,
|
|
14853
|
+
useValue: inferredBasePath
|
|
14854
|
+
}
|
|
14855
|
+
];
|
|
14804
14856
|
const combinedProviders = [
|
|
14805
14857
|
...await buildRouterRedirectProviders(deps, responseInit),
|
|
14806
|
-
...
|
|
14858
|
+
...inferredBasePathProvider,
|
|
14859
|
+
...handlerProviders,
|
|
14860
|
+
...legacyPageProviders,
|
|
14807
14861
|
...await buildServerAnimationProviders(usesLegacyAnimations)
|
|
14808
14862
|
];
|
|
14809
14863
|
const providers = buildProviders(deps, sanitizer, input.request, maybeRequestContext, responseInit, combinedProviders);
|
|
@@ -15343,5 +15397,5 @@ export {
|
|
|
15343
15397
|
ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
|
|
15344
15398
|
};
|
|
15345
15399
|
|
|
15346
|
-
//# debugId=
|
|
15400
|
+
//# debugId=611222AD0534104464756E2164756E21
|
|
15347
15401
|
//# sourceMappingURL=index.js.map
|