Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions goldens/public-api/angular/ssr/node/index.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
```ts

import { ApplicationRef } from '@angular/core';
import type { IncomingMessage } from 'node:http';
import type { ServerResponse } from 'node:http';
import { StaticProvider } from '@angular/core';
import { Type } from '@angular/core';

Expand Down Expand Up @@ -35,6 +37,12 @@ export interface CommonEngineRenderOptions {
url?: string;
}

// @public
export function createWebRequestFromNodeRequest(nodeRequest: IncomingMessage): Request;

// @public
export function writeResponseToNodeResponse(source: Response, destination: ServerResponse): Promise<void>;

// (No @packageDocumentation comment for this package)

```
3 changes: 3 additions & 0 deletions packages/angular/ssr/node/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ export {
type CommonEngineRenderOptions,
type CommonEngineOptions,
} from './src/common-engine/common-engine';

export { writeResponseToNodeResponse } from './src/response';
export { createWebRequestFromNodeRequest } from './src/request';
1 change: 1 addition & 0 deletions packages/angular/ssr/node/src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type { IncomingHttpHeaders, IncomingMessage } from 'node:http';
*
* @param nodeRequest - The Node.js `IncomingMessage` object to convert.
* @returns A Web Standard `Request` object.
* @developerPreview
*/
export function createWebRequestFromNodeRequest(nodeRequest: IncomingMessage): Request {
const { headers, method = 'GET' } = nodeRequest;
Expand Down
1 change: 1 addition & 0 deletions packages/angular/ssr/node/src/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type { ServerResponse } from 'node:http';
* @param source - The web-standard `Response` object to stream from.
* @param destination - The Node.js `ServerResponse` object to stream into.
* @returns A promise that resolves once the streaming operation is complete.
* @developerPreview
*/
export async function writeResponseToNodeResponse(
source: Response,
Expand Down