@angular-devkit/build-angular 18.1.0-next.0 → 18.1.0-next.2
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/README.md +14 -14
- package/package.json +38 -30
- package/plugins/karma.d.ts +1 -1
- package/plugins/karma.js +1 -1
- package/src/babel-bazel.d.ts +1 -1
- package/src/builders/app-shell/index.d.ts +1 -1
- package/src/builders/app-shell/index.js +1 -1
- package/src/builders/app-shell/render-worker.d.ts +1 -1
- package/src/builders/app-shell/render-worker.js +1 -1
- package/src/builders/browser/index.d.ts +1 -1
- package/src/builders/browser/index.js +3 -3
- package/src/builders/browser-esbuild/builder-status-warnings.d.ts +1 -1
- package/src/builders/browser-esbuild/builder-status-warnings.js +2 -3
- package/src/builders/browser-esbuild/index.d.ts +1 -1
- package/src/builders/browser-esbuild/index.js +2 -3
- package/src/builders/dev-server/builder.d.ts +1 -2
- package/src/builders/dev-server/builder.js +3 -4
- package/src/builders/dev-server/index.d.ts +1 -1
- package/src/builders/dev-server/index.js +1 -1
- package/src/builders/dev-server/options.d.ts +5 -1
- package/src/builders/dev-server/options.js +27 -3
- package/src/builders/dev-server/schema.d.ts +10 -0
- package/src/builders/dev-server/schema.json +11 -0
- package/src/builders/dev-server/webpack-server.d.ts +1 -1
- package/src/builders/dev-server/webpack-server.js +4 -4
- package/src/builders/extract-i18n/application-extraction.d.ts +1 -1
- package/src/builders/extract-i18n/application-extraction.js +2 -3
- package/src/builders/extract-i18n/builder.d.ts +1 -1
- package/src/builders/extract-i18n/builder.js +2 -3
- package/src/builders/extract-i18n/empty-loader.d.ts +1 -1
- package/src/builders/extract-i18n/empty-loader.js +2 -2
- package/src/builders/extract-i18n/index.d.ts +1 -1
- package/src/builders/extract-i18n/index.js +1 -1
- package/src/builders/extract-i18n/ivy-extract-loader.d.ts +1 -1
- package/src/builders/extract-i18n/ivy-extract-loader.js +2 -2
- package/src/builders/extract-i18n/options.d.ts +1 -1
- package/src/builders/extract-i18n/options.js +2 -3
- package/src/builders/extract-i18n/webpack-extraction.d.ts +1 -1
- package/src/builders/extract-i18n/webpack-extraction.js +2 -3
- package/src/builders/jest/index.d.ts +1 -1
- package/src/builders/jest/index.js +1 -1
- package/src/builders/jest/init-test-bed.mjs +5 -2
- package/src/builders/jest/jest-global.mjs +2 -2
- package/src/builders/jest/jest.config.mjs +1 -1
- package/src/builders/jest/options.d.ts +1 -1
- package/src/builders/jest/options.js +2 -3
- package/src/builders/karma/find-tests-plugin.d.ts +1 -1
- package/src/builders/karma/find-tests-plugin.js +1 -1
- package/src/builders/karma/index.d.ts +1 -1
- package/src/builders/karma/index.js +2 -3
- package/src/builders/ng-packagr/index.d.ts +1 -1
- package/src/builders/ng-packagr/index.js +2 -3
- package/src/builders/prerender/index.d.ts +1 -1
- package/src/builders/prerender/index.js +2 -3
- package/src/builders/prerender/render-worker.d.ts +1 -1
- package/src/builders/prerender/render-worker.js +1 -1
- package/src/builders/prerender/routes-extractor-worker.d.ts +1 -1
- package/src/builders/prerender/routes-extractor-worker.js +1 -1
- package/src/builders/protractor/index.d.ts +1 -1
- package/src/builders/protractor/index.js +2 -3
- package/src/builders/server/index.d.ts +1 -1
- package/src/builders/server/index.js +2 -3
- package/src/builders/server/platform-server-exports-loader.d.ts +1 -1
- package/src/builders/server/platform-server-exports-loader.js +2 -2
- package/src/builders/ssr-dev-server/index.d.ts +1 -1
- package/src/builders/ssr-dev-server/index.js +3 -4
- package/src/builders/ssr-dev-server/utils.d.ts +1 -2
- package/src/builders/ssr-dev-server/utils.js +4 -5
- package/src/builders/web-test-runner/builder-status-warnings.d.ts +1 -1
- package/src/builders/web-test-runner/builder-status-warnings.js +2 -3
- package/src/builders/web-test-runner/index.d.ts +1 -1
- package/src/builders/web-test-runner/index.js +1 -1
- package/src/builders/web-test-runner/jasmine_runner.js +1 -1
- package/src/builders/web-test-runner/options.d.ts +1 -1
- package/src/builders/web-test-runner/options.js +2 -3
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/tools/babel/babel-loader.d.ts +1 -1
- package/src/tools/babel/presets/application.d.ts +1 -1
- package/src/tools/babel/presets/application.js +3 -4
- package/src/tools/babel/webpack-loader.d.ts +1 -1
- package/src/tools/babel/webpack-loader.js +1 -1
- package/src/tools/webpack/configs/common.d.ts +1 -1
- package/src/tools/webpack/configs/common.js +2 -3
- package/src/tools/webpack/configs/dev-server.d.ts +1 -1
- package/src/tools/webpack/configs/dev-server.js +3 -4
- package/src/tools/webpack/configs/index.d.ts +1 -1
- package/src/tools/webpack/configs/index.js +1 -1
- package/src/tools/webpack/configs/styles.d.ts +1 -1
- package/src/tools/webpack/configs/styles.js +2 -3
- package/src/tools/webpack/plugins/any-component-style-budget-checker.d.ts +1 -1
- package/src/tools/webpack/plugins/any-component-style-budget-checker.js +1 -1
- package/src/tools/webpack/plugins/builder-watch-plugin.d.ts +1 -1
- package/src/tools/webpack/plugins/builder-watch-plugin.js +1 -1
- package/src/tools/webpack/plugins/common-js-usage-warn-plugin.d.ts +1 -1
- package/src/tools/webpack/plugins/common-js-usage-warn-plugin.js +1 -1
- package/src/tools/webpack/plugins/css-optimizer-plugin.d.ts +1 -1
- package/src/tools/webpack/plugins/css-optimizer-plugin.js +1 -1
- package/src/tools/webpack/plugins/dedupe-module-resolve-plugin.d.ts +1 -1
- package/src/tools/webpack/plugins/dedupe-module-resolve-plugin.js +1 -1
- package/src/tools/webpack/plugins/devtools-ignore-plugin.d.ts +1 -1
- package/src/tools/webpack/plugins/devtools-ignore-plugin.js +1 -1
- package/src/tools/webpack/plugins/esbuild-executor.d.ts +1 -1
- package/src/tools/webpack/plugins/esbuild-executor.js +1 -1
- package/src/tools/webpack/plugins/hmr/hmr-accept.d.ts +1 -1
- package/src/tools/webpack/plugins/hmr/hmr-accept.js +2 -2
- package/src/tools/webpack/plugins/hmr/hmr-loader.d.ts +1 -1
- package/src/tools/webpack/plugins/hmr/hmr-loader.js +2 -2
- package/src/tools/webpack/plugins/index-html-webpack-plugin.d.ts +1 -1
- package/src/tools/webpack/plugins/index-html-webpack-plugin.js +1 -1
- package/src/tools/webpack/plugins/index.d.ts +1 -1
- package/src/tools/webpack/plugins/index.js +1 -1
- package/src/tools/webpack/plugins/javascript-optimizer-plugin.d.ts +1 -1
- package/src/tools/webpack/plugins/javascript-optimizer-plugin.js +1 -1
- package/src/tools/webpack/plugins/javascript-optimizer-worker.d.ts +1 -1
- package/src/tools/webpack/plugins/javascript-optimizer-worker.js +2 -2
- package/src/tools/webpack/plugins/json-stats-plugin.d.ts +1 -1
- package/src/tools/webpack/plugins/json-stats-plugin.js +1 -1
- package/src/tools/webpack/plugins/karma/karma.d.ts +1 -1
- package/src/tools/webpack/plugins/karma/karma.js +1 -1
- package/src/tools/webpack/plugins/named-chunks-plugin.d.ts +1 -1
- package/src/tools/webpack/plugins/named-chunks-plugin.js +1 -1
- package/src/tools/webpack/plugins/occurrences-plugin.d.ts +1 -1
- package/src/tools/webpack/plugins/occurrences-plugin.js +1 -1
- package/src/tools/webpack/plugins/postcss-cli-resources.d.ts +1 -1
- package/src/tools/webpack/plugins/postcss-cli-resources.js +2 -2
- package/src/tools/webpack/plugins/progress-plugin.d.ts +1 -1
- package/src/tools/webpack/plugins/progress-plugin.js +1 -1
- package/src/tools/webpack/plugins/remove-hash-plugin.d.ts +1 -1
- package/src/tools/webpack/plugins/remove-hash-plugin.js +1 -1
- package/src/tools/webpack/plugins/scripts-webpack-plugin.d.ts +1 -1
- package/src/tools/webpack/plugins/scripts-webpack-plugin.js +1 -1
- package/src/tools/webpack/plugins/service-worker-plugin.d.ts +1 -1
- package/src/tools/webpack/plugins/service-worker-plugin.js +1 -1
- package/src/tools/webpack/plugins/styles-webpack-plugin.d.ts +1 -1
- package/src/tools/webpack/plugins/styles-webpack-plugin.js +1 -1
- package/src/tools/webpack/plugins/suppress-entry-chunks-webpack-plugin.d.ts +1 -1
- package/src/tools/webpack/plugins/suppress-entry-chunks-webpack-plugin.js +1 -1
- package/src/tools/webpack/plugins/transfer-size-plugin.d.ts +1 -1
- package/src/tools/webpack/plugins/transfer-size-plugin.js +1 -1
- package/src/tools/webpack/plugins/typescript.d.ts +1 -1
- package/src/tools/webpack/plugins/typescript.js +2 -3
- package/src/tools/webpack/plugins/watch-files-logs-plugin.d.ts +1 -1
- package/src/tools/webpack/plugins/watch-files-logs-plugin.js +1 -1
- package/src/tools/webpack/utils/async-chunks.d.ts +1 -1
- package/src/tools/webpack/utils/async-chunks.js +2 -3
- package/src/tools/webpack/utils/helpers.d.ts +1 -1
- package/src/tools/webpack/utils/helpers.js +11 -12
- package/src/tools/webpack/utils/stats.d.ts +1 -1
- package/src/tools/webpack/utils/stats.js +8 -9
- package/src/transforms.d.ts +1 -1
- package/src/transforms.js +1 -1
- package/src/utils/action-executor.d.ts +1 -1
- package/src/utils/action-executor.js +1 -1
- package/src/utils/build-options.d.ts +1 -1
- package/src/utils/build-options.js +1 -1
- package/src/utils/bundle-inline-options.d.ts +1 -1
- package/src/utils/bundle-inline-options.js +1 -1
- package/src/utils/color.d.ts +1 -1
- package/src/utils/color.js +1 -1
- package/src/utils/copy-assets.d.ts +1 -1
- package/src/utils/copy-assets.js +2 -3
- package/src/utils/default-progress.d.ts +1 -1
- package/src/utils/default-progress.js +2 -3
- package/src/utils/environment-options.d.ts +1 -1
- package/src/utils/environment-options.js +1 -1
- package/src/utils/error.d.ts +1 -1
- package/src/utils/error.js +2 -3
- package/src/utils/i18n-inlining.d.ts +1 -1
- package/src/utils/i18n-inlining.js +2 -3
- package/src/utils/i18n-webpack.d.ts +1 -1
- package/src/utils/i18n-webpack.js +3 -3
- package/src/utils/index.d.ts +1 -1
- package/src/utils/index.js +1 -1
- package/src/utils/load-esm.d.ts +1 -1
- package/src/utils/load-esm.js +2 -3
- package/src/utils/normalize-asset-patterns.d.ts +1 -1
- package/src/utils/normalize-asset-patterns.js +3 -3
- package/src/utils/normalize-builder-schema.d.ts +1 -1
- package/src/utils/normalize-builder-schema.js +2 -3
- package/src/utils/normalize-cache.d.ts +1 -1
- package/src/utils/normalize-cache.js +3 -4
- package/src/utils/normalize-file-replacements.d.ts +1 -1
- package/src/utils/normalize-file-replacements.js +3 -3
- package/src/utils/normalize-optimization.d.ts +1 -1
- package/src/utils/normalize-optimization.js +2 -3
- package/src/utils/normalize-polyfills.d.ts +1 -1
- package/src/utils/normalize-polyfills.js +2 -3
- package/src/utils/normalize-source-maps.d.ts +1 -1
- package/src/utils/normalize-source-maps.js +2 -3
- package/src/utils/output-paths.d.ts +1 -1
- package/src/utils/output-paths.js +2 -3
- package/src/utils/package-chunk-sort.d.ts +1 -1
- package/src/utils/package-chunk-sort.js +2 -3
- package/src/utils/package-version.d.ts +1 -1
- package/src/utils/package-version.js +1 -1
- package/src/utils/process-bundle.d.ts +3 -3
- package/src/utils/process-bundle.js +2 -3
- package/src/utils/read-tsconfig.d.ts +1 -1
- package/src/utils/read-tsconfig.js +2 -3
- package/src/utils/run-module-as-observable-fork.d.ts +1 -1
- package/src/utils/run-module-as-observable-fork.js +2 -3
- package/src/utils/run-module-worker.js +1 -1
- package/src/utils/spinner.d.ts +1 -1
- package/src/utils/spinner.js +1 -1
- package/src/utils/tailwind.d.ts +1 -1
- package/src/utils/tailwind.js +2 -3
- package/src/utils/test-files.d.ts +1 -1
- package/src/utils/test-files.js +2 -3
- package/src/utils/tty.d.ts +1 -1
- package/src/utils/tty.js +2 -3
- package/src/utils/url.d.ts +1 -1
- package/src/utils/url.js +2 -3
- package/src/utils/webpack-browser-config.d.ts +1 -1
- package/src/utils/webpack-browser-config.js +6 -7
- package/src/utils/webpack-diagnostics.d.ts +1 -1
- package/src/utils/webpack-diagnostics.js +3 -4
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -33,7 +33,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
33
33
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
34
|
};
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.execute =
|
|
36
|
+
exports.execute = execute;
|
|
37
37
|
const private_1 = require("@angular/build/private");
|
|
38
38
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
39
39
|
const node_path_1 = __importDefault(require("node:path"));
|
|
@@ -119,7 +119,6 @@ async function execute(options, context, transforms) {
|
|
|
119
119
|
}
|
|
120
120
|
return { success: true, outputPath: normalizedOptions.outFile };
|
|
121
121
|
}
|
|
122
|
-
exports.execute = execute;
|
|
123
122
|
async function createSerializer(localizeToolsModule, format, sourceLocale, basePath, useLegacyIds, diagnostics) {
|
|
124
123
|
const { XmbTranslationSerializer, LegacyMessageIdMigrationSerializer, ArbTranslationSerializer, Xliff1TranslationSerializer, Xliff2TranslationSerializer, SimpleJsonTranslationSerializer, } = localizeToolsModule;
|
|
125
124
|
switch (format) {
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
export default function (): string;
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.default = default_1;
|
|
10
11
|
function default_1() {
|
|
11
12
|
return `export default '';`;
|
|
12
13
|
}
|
|
13
|
-
exports.default = default_1;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { execute } from './builder';
|
|
9
9
|
import type { Schema as ExtractI18nBuilderOptions } from './schema';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.execute = void 0;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
type LoaderSourceMap = Parameters<import('webpack').LoaderDefinitionFunction>[1];
|
|
9
9
|
interface LocalizeExtractLoaderOptions {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -30,6 +30,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
30
30
|
return result;
|
|
31
31
|
};
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.default = localizeExtractLoader;
|
|
33
34
|
const nodePath = __importStar(require("path"));
|
|
34
35
|
const load_esm_1 = require("../../utils/load-esm");
|
|
35
36
|
function localizeExtractLoader(content, map) {
|
|
@@ -46,7 +47,6 @@ function localizeExtractLoader(content, map) {
|
|
|
46
47
|
callback(error);
|
|
47
48
|
});
|
|
48
49
|
}
|
|
49
|
-
exports.default = localizeExtractLoader;
|
|
50
50
|
async function extract(loaderContext, content, map, options) {
|
|
51
51
|
// Try to load the `@angular/localize` message extractor.
|
|
52
52
|
// All the localize usages are setup to first try the ESM entry point then fallback to the deep imports.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { BuilderContext } from '@angular-devkit/architect';
|
|
9
9
|
import { Schema as ExtractI18nOptions, Format } from './schema';
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.normalizeOptions =
|
|
13
|
+
exports.normalizeOptions = normalizeOptions;
|
|
14
14
|
const private_1 = require("@angular/build/private");
|
|
15
15
|
const architect_1 = require("@angular-devkit/architect");
|
|
16
16
|
const node_assert_1 = require("node:assert");
|
|
@@ -64,7 +64,6 @@ async function normalizeOptions(context, projectName, options) {
|
|
|
64
64
|
progress: options.progress ?? true,
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
exports.normalizeOptions = normalizeOptions;
|
|
68
67
|
function getDefaultOutFile(format) {
|
|
69
68
|
switch (format) {
|
|
70
69
|
case schema_1.Format.Xmb:
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import type { ɵParsedMessage as LocalizeMessage } from '@angular/localize';
|
|
9
9
|
import { BuilderContext } from '@angular-devkit/architect';
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.extractMessages =
|
|
13
|
+
exports.extractMessages = extractMessages;
|
|
14
14
|
const build_webpack_1 = require("@angular-devkit/build-webpack");
|
|
15
15
|
const rxjs_1 = require("rxjs");
|
|
16
16
|
const webpack_1 = __importDefault(require("webpack"));
|
|
@@ -96,4 +96,3 @@ async function extractMessages(options, builderName, context, transforms = {}) {
|
|
|
96
96
|
useLegacyIds,
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
exports.extractMessages = extractMessages;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { Schema as JestBuilderSchema } from './schema';
|
|
9
9
|
/** Main execution function for the Jest builder. */
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -3,14 +3,17 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
// TODO(dgp1130): These imports likely don't resolve in stricter package environments like `pnpm`, since they are resolved relative to
|
|
10
10
|
// `@angular-devkit/build-angular` rather than the user's workspace. Should look into virtual modules to support those use cases.
|
|
11
11
|
|
|
12
12
|
import { getTestBed } from '@angular/core/testing';
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
BrowserDynamicTestingModule,
|
|
15
|
+
platformBrowserDynamicTesting,
|
|
16
|
+
} from '@angular/platform-browser-dynamic/testing';
|
|
14
17
|
|
|
15
18
|
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
16
19
|
errorOnUnknownElements: true,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* execution. When running ESM code, Jest does _not_ inject the global `jest` symbol, so Zone.js would not normally know it is running
|
|
12
12
|
* within Jest as users are supposed to import from `@jest/globals` or use `import.meta.jest`. Zone.js is not currently aware of this, so we
|
|
13
13
|
* manually set this global to get Zone.js to run correctly.
|
|
14
|
-
*
|
|
14
|
+
*
|
|
15
15
|
* TODO(dgp1130): Update Zone.js to directly support Jest ESM executions so we can drop this.
|
|
16
16
|
*/
|
|
17
17
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
// Empty config file, everything is specified via CLI options right now.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { Schema as JestBuilderSchema } from './schema';
|
|
9
9
|
/**
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.normalizeOptions =
|
|
10
|
+
exports.normalizeOptions = normalizeOptions;
|
|
11
11
|
/**
|
|
12
12
|
* Normalizes input options validated by the schema to a more precise and useful
|
|
13
13
|
* options type in {@link JestBuilderOptions}.
|
|
@@ -22,4 +22,3 @@ function normalizeOptions(schema) {
|
|
|
22
22
|
...schema,
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
exports.normalizeOptions = normalizeOptions;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import type { Compiler } from 'webpack';
|
|
9
9
|
export interface FindTestsPluginOptions {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
|
|
9
9
|
import type { ConfigOptions } from 'karma';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -30,7 +30,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
30
30
|
return result;
|
|
31
31
|
};
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.execute =
|
|
33
|
+
exports.execute = execute;
|
|
34
34
|
const private_1 = require("@angular/build/private");
|
|
35
35
|
const architect_1 = require("@angular-devkit/architect");
|
|
36
36
|
const core_1 = require("@angular-devkit/core");
|
|
@@ -152,7 +152,6 @@ function execute(options, context, transforms = {}) {
|
|
|
152
152
|
};
|
|
153
153
|
})), (0, rxjs_1.defaultIfEmpty)({ success: false }));
|
|
154
154
|
}
|
|
155
|
-
exports.execute = execute;
|
|
156
155
|
function getBuiltInKarmaConfig(workspaceRoot, projectName) {
|
|
157
156
|
let coverageFolderName = projectName.charAt(0) === '@' ? projectName.slice(1) : projectName;
|
|
158
157
|
if (/[A-Z]/.test(coverageFolderName)) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
|
|
9
9
|
import { Observable } from 'rxjs';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -30,7 +30,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
30
30
|
return result;
|
|
31
31
|
};
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.execute =
|
|
33
|
+
exports.execute = execute;
|
|
34
34
|
const private_1 = require("@angular/build/private");
|
|
35
35
|
const architect_1 = require("@angular-devkit/architect");
|
|
36
36
|
const node_path_1 = require("node:path");
|
|
@@ -63,5 +63,4 @@ function execute(options, context) {
|
|
|
63
63
|
return { packager, ngPackagrOptions };
|
|
64
64
|
})()).pipe((0, rxjs_1.switchMap)(({ packager, ngPackagrOptions }) => options.watch ? packager.watch(ngPackagrOptions) : packager.build(ngPackagrOptions)), (0, rxjs_1.map)(() => ({ success: true })), (0, rxjs_1.catchError)((err) => (0, rxjs_1.of)({ success: false, error: err.message })));
|
|
65
65
|
}
|
|
66
|
-
exports.execute = execute;
|
|
67
66
|
exports.default = (0, architect_1.createBuilder)(execute);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
|
|
9
9
|
import { Schema } from './schema';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -33,7 +33,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
33
33
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
34
|
};
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.execute =
|
|
36
|
+
exports.execute = execute;
|
|
37
37
|
const private_1 = require("@angular/build/private");
|
|
38
38
|
const architect_1 = require("@angular-devkit/architect");
|
|
39
39
|
const fs = __importStar(require("fs"));
|
|
@@ -219,5 +219,4 @@ async function execute(options, context) {
|
|
|
219
219
|
}
|
|
220
220
|
return _renderUniversal(options, context, browserResult, serverResult, browserOptions);
|
|
221
221
|
}
|
|
222
|
-
exports.execute = execute;
|
|
223
222
|
exports.default = (0, architect_1.createBuilder)(execute);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
export interface RenderOptions {
|
|
9
9
|
indexFile: string;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
export interface RoutesExtractorWorkerData {
|
|
9
9
|
zonePackage: string;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
|
|
9
9
|
import { json } from '@angular-devkit/core';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -30,7 +30,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
30
30
|
return result;
|
|
31
31
|
};
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.execute =
|
|
33
|
+
exports.execute = execute;
|
|
34
34
|
const architect_1 = require("@angular-devkit/architect");
|
|
35
35
|
const core_1 = require("@angular-devkit/core");
|
|
36
36
|
const path_1 = require("path");
|
|
@@ -163,5 +163,4 @@ async function execute(options, context) {
|
|
|
163
163
|
await server?.stop();
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
exports.execute = execute;
|
|
167
166
|
exports.default = (0, architect_1.createBuilder)(execute);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
|
|
9
9
|
import { Observable } from 'rxjs';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -30,7 +30,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
30
30
|
return result;
|
|
31
31
|
};
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.execute =
|
|
33
|
+
exports.execute = execute;
|
|
34
34
|
const private_1 = require("@angular/build/private");
|
|
35
35
|
const architect_1 = require("@angular-devkit/architect");
|
|
36
36
|
const build_webpack_1 = require("@angular-devkit/build-webpack");
|
|
@@ -129,7 +129,6 @@ function execute(options, context, transforms = {}) {
|
|
|
129
129
|
};
|
|
130
130
|
}));
|
|
131
131
|
}
|
|
132
|
-
exports.execute = execute;
|
|
133
132
|
exports.default = (0, architect_1.createBuilder)(execute);
|
|
134
133
|
async function initialize(options, context, webpackConfigurationTransform) {
|
|
135
134
|
// Purge old build disk cache.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* This loader is needed to add additional exports and is a workaround for a Webpack bug that doesn't
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.default = default_1;
|
|
10
11
|
const node_fs_1 = require("node:fs");
|
|
11
12
|
const node_path_1 = require("node:path");
|
|
12
13
|
/**
|
|
@@ -27,4 +28,3 @@ function default_1(content, map) {
|
|
|
27
28
|
this.callback(null, source, map);
|
|
28
29
|
return;
|
|
29
30
|
}
|
|
30
|
-
exports.default = default_1;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
|
|
9
9
|
import { json, logging } from '@angular-devkit/core';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
@@ -30,7 +30,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
30
30
|
return result;
|
|
31
31
|
};
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.
|
|
33
|
+
exports.execute = execute;
|
|
34
|
+
exports.log = log;
|
|
34
35
|
const private_1 = require("@angular/build/private");
|
|
35
36
|
const architect_1 = require("@angular-devkit/architect");
|
|
36
37
|
const core_1 = require("@angular-devkit/core");
|
|
@@ -140,7 +141,6 @@ function execute(options, context) {
|
|
|
140
141
|
error: mapErrorToMessage(error),
|
|
141
142
|
})));
|
|
142
143
|
}
|
|
143
|
-
exports.execute = execute;
|
|
144
144
|
// Logs output to the terminal.
|
|
145
145
|
// Removes any trailing new lines from the output.
|
|
146
146
|
function log({ stderr, stdout }, logger) {
|
|
@@ -152,7 +152,6 @@ function log({ stderr, stdout }, logger) {
|
|
|
152
152
|
logger.info(stdout.replace(/\n?$/, ''));
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
exports.log = log;
|
|
156
155
|
function startNodeServer(serverOutput, port, logger, inspectMode = false) {
|
|
157
156
|
const outputPath = serverOutput.outputPath;
|
|
158
157
|
const path = (0, path_1.join)(outputPath, 'main.js');
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
-
/// <reference types="node" />
|
|
9
8
|
import { SpawnOptions } from 'child_process';
|
|
10
9
|
import { Observable } from 'rxjs';
|
|
11
10
|
export declare function getAvailablePort(): Promise<number>;
|
|
@@ -4,13 +4,15 @@
|
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
5
5
|
*
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
-
* found in the LICENSE file at https://angular.
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.
|
|
13
|
+
exports.getAvailablePort = getAvailablePort;
|
|
14
|
+
exports.spawnAsObservable = spawnAsObservable;
|
|
15
|
+
exports.waitUntilServerIsListening = waitUntilServerIsListening;
|
|
14
16
|
const child_process_1 = require("child_process");
|
|
15
17
|
const net_1 = require("net");
|
|
16
18
|
const rxjs_1 = require("rxjs");
|
|
@@ -27,7 +29,6 @@ function getAvailablePort() {
|
|
|
27
29
|
});
|
|
28
30
|
});
|
|
29
31
|
}
|
|
30
|
-
exports.getAvailablePort = getAvailablePort;
|
|
31
32
|
function spawnAsObservable(command, args = [], options = {}) {
|
|
32
33
|
return new rxjs_1.Observable((obs) => {
|
|
33
34
|
const proc = (0, child_process_1.spawn)(command, args, options);
|
|
@@ -52,7 +53,6 @@ function spawnAsObservable(command, args = [], options = {}) {
|
|
|
52
53
|
};
|
|
53
54
|
});
|
|
54
55
|
}
|
|
55
|
-
exports.spawnAsObservable = spawnAsObservable;
|
|
56
56
|
function waitUntilServerIsListening(port, host) {
|
|
57
57
|
const allowedErrorCodes = ['ECONNREFUSED', 'ECONNRESET'];
|
|
58
58
|
return new rxjs_1.Observable((obs) => {
|
|
@@ -71,4 +71,3 @@ function waitUntilServerIsListening(port, host) {
|
|
|
71
71
|
: (0, rxjs_1.timer)(100 * (attempts * 1));
|
|
72
72
|
}))));
|
|
73
73
|
}
|
|
74
|
-
exports.waitUntilServerIsListening = waitUntilServerIsListening;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { BuilderContext } from '@angular-devkit/architect';
|
|
9
9
|
import { Schema as WtrBuilderOptions } from './schema';
|