@angular/ssr
Advanced tools
Comparing version 19.0.0-next.6 to 19.0.0-next.7
@@ -158,2 +158,6 @@ import type { ApplicationRef } from '@angular/core'; | ||
serverRoutesConfig?: ServerRoute[] | null; | ||
/** | ||
* A list of errors encountered during the route extraction process. | ||
*/ | ||
errors: string[]; | ||
} | ||
@@ -457,2 +461,9 @@ | ||
/** | ||
* Extracts the path segments from a given route string. | ||
* | ||
* @param route - The route string from which to extract segments. | ||
* @returns An array of path segments. | ||
*/ | ||
private getPathSegments; | ||
/** | ||
* Recursively traverses the route tree from a given node, attempting to match the remaining route segments. | ||
@@ -660,5 +671,12 @@ * If the node is a leaf node (no more segments to match) and contains metadata, the node is yielded. | ||
* to handle prerendering paths. Defaults to `false`. | ||
* @returns A promise that resolves to a populated `RouteTree` containing all extracted routes from the Angular application. | ||
* @param includePrerenderFallbackRoutes - A flag indicating whether to include fallback routes in the result. Defaults to `true`. | ||
* | ||
* @returns A promise that resolves to an object containing: | ||
* - `routeTree`: A populated `RouteTree` containing all extracted routes from the Angular application. | ||
* - `errors`: An array of strings representing any errors encountered during the route extraction process. | ||
*/ | ||
export declare function ɵextractRoutesAndCreateRouteTree(url: URL, manifest?: AngularAppManifest, invokeGetPrerenderParams?: boolean): Promise<RouteTree>; | ||
export declare function ɵextractRoutesAndCreateRouteTree(url: URL, manifest?: AngularAppManifest, invokeGetPrerenderParams?: boolean, includePrerenderFallbackRoutes?: boolean): Promise<{ | ||
routeTree: RouteTree; | ||
errors: string[]; | ||
}>; | ||
@@ -678,3 +696,3 @@ /** | ||
* and retrieves routes from the Angular router configuration. It handles both module-based | ||
* and function-based bootstrapping. It yields the resulting routes as `RouteTreeNodeMetadata` objects. | ||
* and function-based bootstrapping. It yields the resulting routes as `RouteTreeNodeMetadata` objects or errors. | ||
* | ||
@@ -688,8 +706,7 @@ * @param bootstrap - A function that returns a promise resolving to an `ApplicationRef` or an Angular module to bootstrap. | ||
* to handle prerendering paths. Defaults to `false`. | ||
* See: | ||
* - https://github.com/angular/angular/blob/d608b857c689d17a7ffa33bbb510301014d24a17/packages/platform-server/src/location.ts#L51 | ||
* - https://github.com/angular/angular/blob/6882cc7d9eed26d3caeedca027452367ba25f2b9/packages/platform-server/src/http.ts#L44 | ||
* @returns A promise that resolves to an object of type `AngularRouterConfigResult`. | ||
* @param includePrerenderFallbackRoutes - A flag indicating whether to include fallback routes in the result. Defaults to `true`. | ||
* | ||
* @returns A promise that resolves to an object of type `AngularRouterConfigResult` or errors. | ||
*/ | ||
export declare function ɵgetRoutesFromAngularRouterConfig(bootstrap: AngularBootstrap, document: string, url: URL, invokeGetPrerenderParams?: boolean): Promise<AngularRouterConfigResult>; | ||
export declare function ɵgetRoutesFromAngularRouterConfig(bootstrap: AngularBootstrap, document: string, url: URL, invokeGetPrerenderParams?: boolean, includePrerenderFallbackRoutes?: boolean): Promise<AngularRouterConfigResult>; | ||
@@ -696,0 +713,0 @@ export declare class ɵInlineCriticalCssProcessor extends CrittersBase { |
@@ -52,3 +52,3 @@ import { ApplicationRef } from '@angular/core'; | ||
* // Apply the retrieved headers to the response | ||
* for (const { key, value } of headers) { | ||
* for (const [key, value] of headers) { | ||
* res.setHeader(key, value); | ||
@@ -122,3 +122,22 @@ * } | ||
/** | ||
* Determines whether the provided URL represents the main entry point module. | ||
* | ||
* This function checks if the provided URL corresponds to the main ESM module being executed directly. | ||
* It's useful for conditionally executing code that should only run when a module is the entry point, | ||
* such as starting a server or initializing an application. | ||
* | ||
* It performs two key checks: | ||
* 1. Verifies if the URL starts with 'file:', ensuring it is a local file. | ||
* 2. Compares the URL's resolved file path with the first command-line argument (`process.argv[1]`), | ||
* which points to the file being executed. | ||
* | ||
* @param url The URL of the module to check. This should typically be `import.meta.url`. | ||
* @returns `true` if the provided URL represents the main entry point, otherwise `false`. | ||
* @developerPreview | ||
*/ | ||
export declare function isMainModule(url: string): boolean; | ||
/** | ||
* Streams a web-standard `Response` into a Node.js `ServerResponse`. | ||
@@ -125,0 +144,0 @@ * |
{ | ||
"name": "@angular/ssr", | ||
"version": "19.0.0-next.6", | ||
"version": "19.0.0-next.7", | ||
"description": "Angular server side rendering utilities", | ||
@@ -25,8 +25,8 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@angular/common": "19.0.0-next.5", | ||
"@angular/compiler": "19.0.0-next.5", | ||
"@angular/core": "19.0.0-next.5", | ||
"@angular/platform-browser": "19.0.0-next.5", | ||
"@angular/platform-server": "19.0.0-next.5", | ||
"@angular/router": "19.0.0-next.5", | ||
"@angular/common": "19.0.0-next.6", | ||
"@angular/compiler": "19.0.0-next.6", | ||
"@angular/core": "19.0.0-next.6", | ||
"@angular/platform-browser": "19.0.0-next.6", | ||
"@angular/platform-server": "19.0.0-next.6", | ||
"@angular/router": "19.0.0-next.6", | ||
"@bazel/runfiles": "^5.8.1" | ||
@@ -33,0 +33,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1456296
16161