-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbuilder.d.ts
45 lines (45 loc) · 2.17 KB
/
builder.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import type { DevServerBuilderOutput } from '@angular/build';
import { type IndexHtmlTransform } from '@angular/build/private';
import type { BuilderContext } from '@angular-devkit/architect';
import type { Plugin } from 'esbuild';
import type http from 'node:http';
import { Observable } from 'rxjs';
import type { ExecutionTransformer } from '../../transforms';
import type { Schema as DevServerBuilderOptions } from './schema';
/**
* A Builder that executes a development server based on the provided browser target option.
*
* Usage of the `transforms` and/or `extensions` parameters is NOT supported and may cause
* unexpected build output or build failures.
*
* @param options Dev Server options.
* @param context The build context.
* @param transforms A map of transforms that can be used to hook into some logic (such as
* transforming webpack configuration before passing it to webpack).
* @param extensions An optional object containing an array of build plugins (esbuild-based)
* and/or HTTP request middleware.
*
* @experimental Direct usage of this function is considered experimental.
*/
export declare function execute(options: DevServerBuilderOptions, context: BuilderContext, transforms?: {
webpackConfiguration?: ExecutionTransformer<import('webpack').Configuration>;
logging?: import('@angular-devkit/build-webpack').WebpackLoggingCallback;
indexHtml?: IndexHtmlTransform;
}, extensions?: {
buildPlugins?: Plugin[];
middleware?: ((req: http.IncomingMessage, res: http.ServerResponse, next: (err?: unknown) => void) => void)[];
builderSelector?: (info: BuilderSelectorInfo, logger: BuilderContext['logger']) => string;
}): Observable<DevServerBuilderOutput>;
export declare function isEsbuildBased(builderName: string): builderName is '@angular/build:application' | '@angular-devkit/build-angular:application' | '@angular-devkit/build-angular:browser-esbuild';
interface BuilderSelectorInfo {
builderName: string;
forceEsbuild: boolean;
}
export {};