@angular-devkit/build-angular 21.1.0-next.3 → 21.1.0-rc.0
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/LICENSE +1 -1
- package/package.json +12 -12
- package/src/builders/karma/browser_builder.d.ts +4 -5
- package/src/builders/karma/browser_builder.js +92 -51
- package/src/builders/karma/browser_builder.js.map +1 -1
- package/src/builders/karma/index.d.ts +2 -3
- package/src/builders/karma/index.js +17 -33
- package/src/builders/karma/index.js.map +1 -1
- package/src/index.d.ts +12 -1
- package/src/index.js +10 -3
- package/src/index.js.map +1 -1
- package/src/tools/webpack/plugins/karma/karma.js +23 -109
- package/src/tools/webpack/plugins/karma/karma.js.map +1 -1
- package/src/utils/normalize-cache.js +1 -1
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2010-
|
|
3
|
+
Copyright (c) 2010-2026 Google LLC. https://angular.dev/license
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/build-angular",
|
|
3
|
-
"version": "21.1.0-
|
|
3
|
+
"version": "21.1.0-rc.0",
|
|
4
4
|
"description": "Angular Webpack Build Facade",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"typings": "src/index.d.ts",
|
|
7
7
|
"builders": "builders.json",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@ampproject/remapping": "2.3.0",
|
|
10
|
-
"@angular-devkit/architect": "0.2101.0-
|
|
11
|
-
"@angular-devkit/build-webpack": "0.2101.0-
|
|
12
|
-
"@angular-devkit/core": "21.1.0-
|
|
13
|
-
"@angular/build": "21.1.0-
|
|
10
|
+
"@angular-devkit/architect": "0.2101.0-rc.0",
|
|
11
|
+
"@angular-devkit/build-webpack": "0.2101.0-rc.0",
|
|
12
|
+
"@angular-devkit/core": "21.1.0-rc.0",
|
|
13
|
+
"@angular/build": "21.1.0-rc.0",
|
|
14
14
|
"@babel/core": "7.28.5",
|
|
15
15
|
"@babel/generator": "7.28.5",
|
|
16
16
|
"@babel/helper-annotate-as-pure": "7.27.3",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"@babel/preset-env": "7.28.5",
|
|
22
22
|
"@babel/runtime": "7.28.4",
|
|
23
23
|
"@discoveryjs/json-ext": "0.6.3",
|
|
24
|
-
"@ngtools/webpack": "21.1.0-
|
|
24
|
+
"@ngtools/webpack": "21.1.0-rc.0",
|
|
25
25
|
"ansi-colors": "4.1.3",
|
|
26
26
|
"autoprefixer": "10.4.23",
|
|
27
27
|
"babel-loader": "10.0.0",
|
|
28
28
|
"browserslist": "^4.26.0",
|
|
29
29
|
"copy-webpack-plugin": "13.0.1",
|
|
30
30
|
"css-loader": "7.1.2",
|
|
31
|
-
"esbuild-wasm": "0.27.
|
|
31
|
+
"esbuild-wasm": "0.27.2",
|
|
32
32
|
"http-proxy-middleware": "3.0.5",
|
|
33
33
|
"istanbul-lib-instrument": "6.0.3",
|
|
34
34
|
"jsonc-parser": "3.3.1",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"postcss-loader": "8.2.0",
|
|
47
47
|
"resolve-url-loader": "5.0.0",
|
|
48
48
|
"rxjs": "7.8.2",
|
|
49
|
-
"sass": "1.97.
|
|
49
|
+
"sass": "1.97.1",
|
|
50
50
|
"sass-loader": "16.0.6",
|
|
51
51
|
"semver": "7.7.3",
|
|
52
52
|
"source-map-loader": "5.0.0",
|
|
@@ -55,14 +55,14 @@
|
|
|
55
55
|
"tinyglobby": "0.2.15",
|
|
56
56
|
"tree-kill": "1.2.2",
|
|
57
57
|
"tslib": "2.8.1",
|
|
58
|
-
"webpack": "5.104.
|
|
58
|
+
"webpack": "5.104.1",
|
|
59
59
|
"webpack-dev-middleware": "7.4.5",
|
|
60
60
|
"webpack-dev-server": "5.2.2",
|
|
61
61
|
"webpack-merge": "6.0.1",
|
|
62
62
|
"webpack-subresource-integrity": "5.1.0"
|
|
63
63
|
},
|
|
64
64
|
"optionalDependencies": {
|
|
65
|
-
"esbuild": "0.27.
|
|
65
|
+
"esbuild": "0.27.2"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@angular/core": "^21.0.0 || ^21.1.0-next.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@angular/platform-browser": "^21.0.0 || ^21.1.0-next.0",
|
|
72
72
|
"@angular/platform-server": "^21.0.0 || ^21.1.0-next.0",
|
|
73
73
|
"@angular/service-worker": "^21.0.0 || ^21.1.0-next.0",
|
|
74
|
-
"@angular/ssr": "^21.1.0-
|
|
74
|
+
"@angular/ssr": "^21.1.0-rc.0",
|
|
75
75
|
"@web/test-runner": "^0.20.0",
|
|
76
76
|
"browser-sync": "^3.0.2",
|
|
77
77
|
"jest": "^30.2.0",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"type": "git",
|
|
138
138
|
"url": "https://github.com/angular/angular-cli.git"
|
|
139
139
|
},
|
|
140
|
-
"packageManager": "pnpm@10.
|
|
140
|
+
"packageManager": "pnpm@10.27.0",
|
|
141
141
|
"engines": {
|
|
142
142
|
"node": "^20.19.0 || ^22.12.0 || >=24.0.0",
|
|
143
143
|
"npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
|
|
@@ -5,12 +5,11 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
-
import { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
|
|
8
|
+
import type { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
|
|
9
9
|
import type { ConfigOptions } from 'karma';
|
|
10
|
-
import { Observable } from 'rxjs';
|
|
11
10
|
import { Configuration } from 'webpack';
|
|
12
|
-
import { ExecutionTransformer } from '../../transforms';
|
|
13
|
-
import { Schema as KarmaBuilderOptions } from './schema';
|
|
11
|
+
import type { ExecutionTransformer } from '../../transforms';
|
|
12
|
+
import type { Schema as KarmaBuilderOptions } from './schema';
|
|
14
13
|
export type KarmaConfigOptions = ConfigOptions & {
|
|
15
14
|
buildWebpack?: unknown;
|
|
16
15
|
configFile?: string;
|
|
@@ -18,4 +17,4 @@ export type KarmaConfigOptions = ConfigOptions & {
|
|
|
18
17
|
export declare function execute(options: KarmaBuilderOptions, context: BuilderContext, karmaOptions: KarmaConfigOptions, transforms?: {
|
|
19
18
|
webpackConfiguration?: ExecutionTransformer<Configuration>;
|
|
20
19
|
karmaOptions?: (options: KarmaConfigOptions) => KarmaConfigOptions;
|
|
21
|
-
}):
|
|
20
|
+
}): AsyncIterable<BuilderOutput>;
|
|
@@ -39,68 +39,109 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
39
39
|
return result;
|
|
40
40
|
};
|
|
41
41
|
})();
|
|
42
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
43
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
44
|
+
};
|
|
42
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
46
|
exports.execute = execute;
|
|
44
47
|
const private_1 = require("@angular/build/private");
|
|
45
48
|
const path = __importStar(require("node:path"));
|
|
46
|
-
const
|
|
49
|
+
const webpack_1 = __importDefault(require("webpack"));
|
|
47
50
|
const configs_1 = require("../../tools/webpack/configs");
|
|
48
51
|
const webpack_browser_config_1 = require("../../utils/webpack-browser-config");
|
|
49
52
|
const schema_1 = require("../browser/schema");
|
|
50
53
|
const find_tests_plugin_1 = require("./find-tests-plugin");
|
|
51
54
|
function execute(options, context, karmaOptions, transforms = {}) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
55
|
+
let karmaServer;
|
|
56
|
+
let isCancelled = false;
|
|
57
|
+
return new ReadableStream({
|
|
58
|
+
async start(controller) {
|
|
59
|
+
const [karma, webpackConfig] = await initializeBrowser(options, context, transforms.webpackConfiguration);
|
|
60
|
+
if (isCancelled) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const projectName = context.target?.project;
|
|
64
|
+
if (!projectName) {
|
|
65
|
+
throw new Error(`The 'karma' builder requires a target to be specified.`);
|
|
66
|
+
}
|
|
67
|
+
const projectMetadata = await context.getProjectMetadata(projectName);
|
|
68
|
+
const sourceRoot = (projectMetadata.sourceRoot ?? projectMetadata.root ?? '');
|
|
69
|
+
if (!options.main) {
|
|
70
|
+
webpackConfig.entry ??= {};
|
|
71
|
+
if (typeof webpackConfig.entry === 'object' && !Array.isArray(webpackConfig.entry)) {
|
|
72
|
+
if (Array.isArray(webpackConfig.entry['main'])) {
|
|
73
|
+
webpackConfig.entry['main'].push(getBuiltInMainFile());
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
webpackConfig.entry['main'] = [getBuiltInMainFile()];
|
|
77
|
+
}
|
|
67
78
|
}
|
|
68
79
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
webpackConfig
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
//
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
80
|
+
webpackConfig.plugins ??= [];
|
|
81
|
+
webpackConfig.plugins.push(new find_tests_plugin_1.FindTestsPlugin({
|
|
82
|
+
include: options.include,
|
|
83
|
+
exclude: options.exclude,
|
|
84
|
+
workspaceRoot: context.workspaceRoot,
|
|
85
|
+
projectSourceRoot: path.join(context.workspaceRoot, sourceRoot),
|
|
86
|
+
}));
|
|
87
|
+
const KARMA_APPLICATION_PATH = '_karma_webpack_';
|
|
88
|
+
webpackConfig.output ??= {};
|
|
89
|
+
webpackConfig.output.path = `/${KARMA_APPLICATION_PATH}/`;
|
|
90
|
+
webpackConfig.output.publicPath = `/${KARMA_APPLICATION_PATH}/`;
|
|
91
|
+
if (karmaOptions.singleRun) {
|
|
92
|
+
webpackConfig.plugins.unshift({
|
|
93
|
+
apply: (compiler) => {
|
|
94
|
+
compiler.hooks.afterEnvironment.tap('karma', () => {
|
|
95
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
96
|
+
compiler.watchFileSystem = { watch: () => { } };
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
// Remove the watch option to avoid the [DEP_WEBPACK_WATCH_WITHOUT_CALLBACK] warning.
|
|
102
|
+
// The compiler is initialized in watch mode by webpack-dev-middleware.
|
|
103
|
+
delete webpackConfig.watch;
|
|
104
|
+
const compiler = (0, webpack_1.default)(webpackConfig);
|
|
105
|
+
karmaOptions.buildWebpack = {
|
|
106
|
+
options,
|
|
107
|
+
compiler,
|
|
108
|
+
logger: context.logger,
|
|
109
|
+
};
|
|
110
|
+
const parsedKarmaConfig = await karma.config.parseConfig(options.karmaConfig && path.resolve(context.workspaceRoot, options.karmaConfig), transforms.karmaOptions ? transforms.karmaOptions(karmaOptions) : karmaOptions, { promiseConfig: true, throwErrors: true });
|
|
111
|
+
if (isCancelled) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
const enqueue = (value) => {
|
|
115
|
+
try {
|
|
116
|
+
controller.enqueue(value);
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
// Controller is already closed
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
const close = () => {
|
|
123
|
+
try {
|
|
124
|
+
controller.close();
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
// Controller is already closed
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
// Close the stream once the Karma server returns.
|
|
131
|
+
karmaServer = new karma.Server(parsedKarmaConfig, (exitCode) => {
|
|
132
|
+
enqueue({ success: exitCode === 0 });
|
|
133
|
+
close();
|
|
134
|
+
});
|
|
135
|
+
karmaServer.on('run_complete', (_, results) => {
|
|
136
|
+
enqueue({ success: results.exitCode === 0 });
|
|
137
|
+
});
|
|
138
|
+
await karmaServer.start();
|
|
139
|
+
},
|
|
140
|
+
async cancel() {
|
|
141
|
+
isCancelled = true;
|
|
142
|
+
await karmaServer?.stop();
|
|
143
|
+
},
|
|
144
|
+
});
|
|
104
145
|
}
|
|
105
146
|
async function initializeBrowser(options, context, webpackConfigurationTransformer) {
|
|
106
147
|
// Purge old build disk cache.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser_builder.js","sourceRoot":"","sources":["browser_builder.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"browser_builder.js","sourceRoot":"","sources":["browser_builder.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBH,0BA6HC;AA9ID,oDAA8D;AAG9D,gDAAkC;AAClC,sDAAiD;AACjD,yDAA+E;AAE/E,+EAA6F;AAC7F,8CAAwF;AACxF,2DAAsD;AAQtD,SAAgB,OAAO,CACrB,OAA4B,EAC5B,OAAuB,EACvB,YAAgC,EAChC,aAII,EAAE;IAEN,IAAI,WAAmB,CAAC;IACxB,IAAI,WAAW,GAAG,KAAK,CAAC;IAExB,OAAO,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E;IAErE,8BAA8B;IAC9B,MAAM,IAAA,8BAAoB,EAAC,OAAO,CAAC,CAAC;IAEpC,MAAM,KAAK,GAAG,wDAAa,OAAO,GAAC,CAAC;IAEpC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAA,gEAAuC;IAC9D,mCAAmC;IACnC,0CAA0C;IAC1C,6DAA6D;IAC7D;QACE,GAAI,OAA4C;QAChD,UAAU,EAAE,EAAE;QACd,OAAO,EAAE,SAAS;QAClB,YAAY,EAAE,KAAK;QACnB,cAAc,EAAE,KAAK;QACrB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,IAAI;QACjB,eAAe,EAAE,KAAK;QACtB,aAAa,EAAE,sBAAa,CAAC,IAAI;QACjC,iFAAiF;QACjF,oFAAoF;QACpF,mHAAmH;QACnH,6GAA6G;QAC7G,KAAK,EAAE,IAAI;KACZ,EACD,OAAO,EACP,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,IAAA,yBAAe,EAAC,GAAG,CAAC,EAAE,IAAA,yBAAe,EAAC,GAAG,CAAC,CAAC,CACtD,CAAC;IAEF,OAAO,CAAC,KAAK,EAAE,CAAC,MAAM,+BAA+B,EAAE,CAAC,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,kBAAkB;IACzB,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CACzB;;;;;;;;;;;;;;;;;;CAkBH,CACE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAErB,OAAO,oDAAoD,OAAO,EAAE,CAAC;AACvE,CAAC"}
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
|
|
9
9
|
import type { ConfigOptions } from 'karma';
|
|
10
|
-
import { Observable } from 'rxjs';
|
|
11
10
|
import { Configuration } from 'webpack';
|
|
12
11
|
import { ExecutionTransformer } from '../../transforms';
|
|
13
12
|
import { Schema as KarmaBuilderOptions } from './schema';
|
|
@@ -21,7 +20,7 @@ export type KarmaConfigOptions = ConfigOptions & {
|
|
|
21
20
|
export declare function execute(options: KarmaBuilderOptions, context: BuilderContext, transforms?: {
|
|
22
21
|
webpackConfiguration?: ExecutionTransformer<Configuration>;
|
|
23
22
|
karmaOptions?: (options: KarmaConfigOptions) => KarmaConfigOptions;
|
|
24
|
-
}):
|
|
23
|
+
}): AsyncIterable<BuilderOutput>;
|
|
25
24
|
export type { KarmaBuilderOptions };
|
|
26
|
-
declare const _default: import("@angular-devkit/architect").Builder<
|
|
25
|
+
declare const _default: import("@angular-devkit/architect").Builder<KarmaBuilderOptions & import("@angular-devkit/core").JsonObject>;
|
|
27
26
|
export default _default;
|
|
@@ -46,35 +46,32 @@ const architect_1 = require("@angular-devkit/architect");
|
|
|
46
46
|
const core_1 = require("@angular-devkit/core");
|
|
47
47
|
const node_module_1 = require("node:module");
|
|
48
48
|
const path = __importStar(require("node:path"));
|
|
49
|
-
const rxjs_1 = require("rxjs");
|
|
50
49
|
const utils_1 = require("../../utils");
|
|
51
50
|
const schema_1 = require("./schema");
|
|
52
51
|
/**
|
|
53
52
|
* @experimental Direct usage of this function is considered experimental.
|
|
54
53
|
*/
|
|
55
|
-
function execute(options, context, transforms = {}) {
|
|
54
|
+
async function* execute(options, context, transforms = {}) {
|
|
56
55
|
// Check Angular version.
|
|
57
56
|
(0, private_1.assertCompatibleAngularVersion)(context.workspaceRoot);
|
|
58
|
-
|
|
59
|
-
if (
|
|
60
|
-
|
|
61
|
-
context.logger.warn(`This build is using the application builder but transforms.webpackConfiguration was provided. The transform will be ignored.`);
|
|
62
|
-
}
|
|
63
|
-
if (options.fileReplacements) {
|
|
64
|
-
options.fileReplacements = (0, utils_1.normalizeFileReplacements)(options.fileReplacements, './');
|
|
65
|
-
}
|
|
66
|
-
if (typeof options.polyfills === 'string') {
|
|
67
|
-
options.polyfills = [options.polyfills];
|
|
68
|
-
}
|
|
69
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
70
|
-
return executeWithBuilder(options, context, transforms);
|
|
57
|
+
if (await checkForEsbuild(options, context)) {
|
|
58
|
+
if (transforms.webpackConfiguration) {
|
|
59
|
+
context.logger.warn(`This build is using the application builder but transforms.webpackConfiguration was provided. The transform will be ignored.`);
|
|
71
60
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
75
|
-
return executeWithBuilder(options, context, karmaOptions, transforms);
|
|
61
|
+
if (options.fileReplacements) {
|
|
62
|
+
options.fileReplacements = (0, utils_1.normalizeFileReplacements)(options.fileReplacements, './');
|
|
76
63
|
}
|
|
77
|
-
|
|
64
|
+
if (typeof options.polyfills === 'string') {
|
|
65
|
+
options.polyfills = [options.polyfills];
|
|
66
|
+
}
|
|
67
|
+
const { executeKarmaBuilder } = await Promise.resolve().then(() => __importStar(require('@angular/build')));
|
|
68
|
+
yield* executeKarmaBuilder(options, context, transforms);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
const karmaOptions = getBaseKarmaOptions(options, context);
|
|
72
|
+
const { execute } = await Promise.resolve().then(() => __importStar(require('./browser_builder')));
|
|
73
|
+
yield* execute(options, context, karmaOptions, transforms);
|
|
74
|
+
}
|
|
78
75
|
}
|
|
79
76
|
function getBaseKarmaOptions(options, context) {
|
|
80
77
|
let singleRun;
|
|
@@ -156,19 +153,6 @@ function getBuiltInKarmaConfig(workspaceRoot, projectName) {
|
|
|
156
153
|
};
|
|
157
154
|
}
|
|
158
155
|
exports.default = (0, architect_1.createBuilder)(execute);
|
|
159
|
-
async function getExecuteWithBuilder(options, context) {
|
|
160
|
-
const useEsbuild = await checkForEsbuild(options, context);
|
|
161
|
-
let execute;
|
|
162
|
-
if (useEsbuild) {
|
|
163
|
-
const { executeKarmaBuilder } = await Promise.resolve().then(() => __importStar(require('@angular/build')));
|
|
164
|
-
execute = executeKarmaBuilder;
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
const browserBuilderModule = await Promise.resolve().then(() => __importStar(require('./browser_builder')));
|
|
168
|
-
execute = browserBuilderModule.execute;
|
|
169
|
-
}
|
|
170
|
-
return [useEsbuild, execute];
|
|
171
|
-
}
|
|
172
156
|
async function checkForEsbuild(options, context) {
|
|
173
157
|
if (options.builderMode !== schema_1.BuilderMode.Detect) {
|
|
174
158
|
return options.builderMode === schema_1.BuilderMode.Application;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BH,0BAwCC;AAhED,oDAAwE;AACxE,yDAKmC;AACnC,+CAA+C;AAE/C,6CAA4C;AAC5C,gDAAkC;AAGlC,uCAAwD;AACxD,qCAAsE;AAOtE;;GAEG;AACI,KAAK,SAAS,CAAC,CAAC,OAAO,CAC5B,OAA4B,EAC5B,OAAuB,EACvB,aAII,EAAE;IAEN,yBAAyB;IACzB,IAAA,wCAA8B,EAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAEtD,IAAI,MAAM,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC;QAC5C,IAAI,UAAU,CAAC,oBAAoB,EAAE,CAAC;YACpC,OAAO,CAAC,MAAM,CAAC,IAAI,CACjB,8HAA8H,CAC/H,CAAC;QACJ,CAAC;QAED,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;YAC7B,OAAO,CAAC,gBAAgB,GAAG,IAAA,iCAAyB,EAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;QACvF,CAAC;QAED,IAAI,OAAO,OAAO,CAA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G,eAAe,CAAC;IAC7C,MAAM,WAAW,GAAG,IAAA,kCAAsB,EACxC,oBAAoB,EACpB,OAAO,CAAC,MAAM,EAAE,OAAO,EACvB,OAAO,CACR,CAAC;IAEF,IAAI,CAAC;QACH,MAAM,sBAAsB,GAAG,MAAM,OAAO,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC;QAElF,OAAO,cAAc,CAAC,sBAAsB,CAAC,CAAC;IAChD,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,CAAC,CAAC,CAAC,YAAY,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK,gCAAgC,EAAE,CAAC;YAC5E,MAAM,CAAC,CAAC;QACV,CAAC;QACD,iEAAiE;QACjE,MAAM,IAAI,KAAK,CACb,0FAA0F,CAC3F,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CACrB,WAAmB;IAKnB,IACE,WAAW,KAAK,4BAA4B;QAC5C,WAAW,KAAK,2CAA2C;QAC3D,WAAW,KAAK,+CAA+C,EAC/D,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/src/index.d.ts
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
+
import type { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
|
|
9
|
+
import { type Observable } from 'rxjs';
|
|
10
|
+
import { type KarmaBuilderOptions, type KarmaConfigOptions } from './builders/karma';
|
|
11
|
+
import type { ExecutionTransformer } from './transforms';
|
|
8
12
|
export * from './transforms';
|
|
9
13
|
export { CrossOrigin, OutputHashing, Type } from './builders/browser/schema';
|
|
10
14
|
export type { AssetPattern, AssetPatternClass as AssetPatternObject, Budget, FileReplacement, OptimizationClass as OptimizationObject, OptimizationUnion, Schema as BrowserBuilderOptions, SourceMapClass as SourceMapObject, SourceMapUnion, StylePreprocessorOptions, } from './builders/browser/schema';
|
|
@@ -12,7 +16,14 @@ export { buildWebpackBrowser as executeBrowserBuilder, type BrowserBuilderOutput
|
|
|
12
16
|
export { buildApplication, type ApplicationBuilderOptions } from '@angular/build';
|
|
13
17
|
export { executeDevServerBuilder, type DevServerBuilderOptions, type DevServerBuilderOutput, } from './builders/dev-server';
|
|
14
18
|
export { execute as executeExtractI18nBuilder, type ExtractI18nBuilderOptions, } from './builders/extract-i18n';
|
|
15
|
-
|
|
19
|
+
/**
|
|
20
|
+
* @experimental Direct usage of this function is considered experimental.
|
|
21
|
+
*/
|
|
22
|
+
export declare function executeKarmaBuilder(options: KarmaBuilderOptions, context: BuilderContext, transforms?: {
|
|
23
|
+
webpackConfiguration?: ExecutionTransformer<import('webpack').Configuration>;
|
|
24
|
+
karmaOptions?: (options: KarmaConfigOptions) => KarmaConfigOptions;
|
|
25
|
+
}): Observable<BuilderOutput>;
|
|
26
|
+
export { type KarmaBuilderOptions, type KarmaConfigOptions };
|
|
16
27
|
export { execute as executeProtractorBuilder, type ProtractorBuilderOptions, } from './builders/protractor';
|
|
17
28
|
export { execute as executeServerBuilder, type ServerBuilderOptions, type ServerBuilderOutput, } from './builders/server';
|
|
18
29
|
export { execute as executeSSRDevServerBuilder, type SSRDevServerBuilderOptions, type SSRDevServerBuilderOutput, } from './builders/ssr-dev-server';
|
package/src/index.js
CHANGED
|
@@ -21,7 +21,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
21
21
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.executeNgPackagrBuilder = exports.executeSSRDevServerBuilder = exports.executeServerBuilder = exports.executeProtractorBuilder = exports.
|
|
24
|
+
exports.executeNgPackagrBuilder = exports.executeSSRDevServerBuilder = exports.executeServerBuilder = exports.executeProtractorBuilder = exports.executeExtractI18nBuilder = exports.executeDevServerBuilder = exports.buildApplication = exports.executeBrowserBuilder = exports.Type = exports.OutputHashing = exports.CrossOrigin = void 0;
|
|
25
|
+
exports.executeKarmaBuilder = executeKarmaBuilder;
|
|
26
|
+
const rxjs_1 = require("rxjs");
|
|
27
|
+
const karma_1 = require("./builders/karma");
|
|
25
28
|
__exportStar(require("./transforms"), exports);
|
|
26
29
|
var schema_1 = require("./builders/browser/schema");
|
|
27
30
|
Object.defineProperty(exports, "CrossOrigin", { enumerable: true, get: function () { return schema_1.CrossOrigin; } });
|
|
@@ -35,8 +38,12 @@ var dev_server_1 = require("./builders/dev-server");
|
|
|
35
38
|
Object.defineProperty(exports, "executeDevServerBuilder", { enumerable: true, get: function () { return dev_server_1.executeDevServerBuilder; } });
|
|
36
39
|
var extract_i18n_1 = require("./builders/extract-i18n");
|
|
37
40
|
Object.defineProperty(exports, "executeExtractI18nBuilder", { enumerable: true, get: function () { return extract_i18n_1.execute; } });
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
/**
|
|
42
|
+
* @experimental Direct usage of this function is considered experimental.
|
|
43
|
+
*/
|
|
44
|
+
function executeKarmaBuilder(options, context, transforms) {
|
|
45
|
+
return (0, rxjs_1.from)((0, karma_1.execute)(options, context, transforms));
|
|
46
|
+
}
|
|
40
47
|
var protractor_1 = require("./builders/protractor");
|
|
41
48
|
Object.defineProperty(exports, "executeProtractorBuilder", { enumerable: true, get: function () { return protractor_1.execute; } });
|
|
42
49
|
var server_1 = require("./builders/server");
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;AAgDH,kDASC;AAtDD,+BAA6C;AAC7C,4CAI0B;AAG1B,+CAA6B;AAE7B,oDAA6E;AAApE,qGAAA,WAAW,OAAA;AAAE,uGAAA,aAAa,OAAA;AAAE,8FAAA,IAAI,OAAA;AAczC,8CAG4B;AAF1B,gHAAA,mBAAmB,OAAyB;AAI9C,wCAAkF;AAAzE,yGAAA,gBAAgB,OAAA;AAEzB,oDAI+B;AAH7B,qHAAA,uBAAuB,OAAA;AAKzB,wDAGiC;AAF/B,yHAAA,OAAO,OAA6B;AAItC;;GAEG;AACH,SAAgB,mBAAmB,CACjC,OAA4B,EAC5B,OAAuB,EACvB,UAGC;IAED,OAAO,IAAA,WAAI,EAAC,IAAA,eAA2B,EAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AACzE,CAAC;AAID,oDAG+B;AAF7B,sHAAA,OAAO,OAA4B;AAIrC,4CAI2B;AAHzB,8GAAA,OAAO,OAAwB;AAKjC,4DAImC;AAHjC,4HAAA,OAAO,OAA8B;AAKvC,oDAG+B;AAF7B,qHAAA,OAAO,OAA2B"}
|
|
@@ -44,27 +44,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
44
44
|
};
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
46
|
const path = __importStar(require("node:path"));
|
|
47
|
-
const webpack_1 = __importDefault(require("webpack"));
|
|
48
47
|
const webpack_dev_middleware_1 = __importDefault(require("webpack-dev-middleware"));
|
|
49
48
|
const stats_1 = require("../../utils/stats");
|
|
50
|
-
const node_1 = require("@angular-devkit/core/node");
|
|
51
49
|
const index_1 = require("../../../../utils/index");
|
|
52
|
-
const node_assert_1 = __importDefault(require("node:assert"));
|
|
53
50
|
const KARMA_APPLICATION_PATH = '_karma_webpack_';
|
|
54
|
-
let blocked = [];
|
|
55
|
-
let isBlocked = false;
|
|
56
51
|
let webpackMiddleware;
|
|
57
|
-
let successCb;
|
|
58
|
-
let failureCb;
|
|
59
52
|
const init = (config, emitter) => {
|
|
60
53
|
if (!config.buildWebpack) {
|
|
61
54
|
throw new Error(`The '@angular-devkit/build-angular/plugins/karma' karma plugin is meant to` +
|
|
62
55
|
` be used from within Angular CLI and will not work correctly outside of it.`);
|
|
63
56
|
}
|
|
64
57
|
const options = config.buildWebpack.options;
|
|
65
|
-
const logger = config.buildWebpack.logger
|
|
66
|
-
successCb = config.buildWebpack.successCb;
|
|
67
|
-
failureCb = config.buildWebpack.failureCb;
|
|
58
|
+
const logger = config.buildWebpack.logger;
|
|
68
59
|
// Add a reporter that fixes sourcemap urls.
|
|
69
60
|
if ((0, index_1.normalizeSourceMaps)(options.sourceMap).scripts) {
|
|
70
61
|
config.reporters.unshift('@angular-devkit/build-angular--sourcemap-reporter');
|
|
@@ -80,122 +71,63 @@ const init = (config, emitter) => {
|
|
|
80
71
|
watched: false,
|
|
81
72
|
}, { pattern: path.join(ksmsPath, 'client.js'), included: true, served: true, watched: false });
|
|
82
73
|
}
|
|
83
|
-
config.reporters.unshift('@angular-devkit/build-angular--event-reporter');
|
|
84
74
|
// When using code-coverage, auto-add karma-coverage.
|
|
85
75
|
if (options.codeCoverage &&
|
|
86
76
|
!config.reporters.some((r) => r === 'coverage' || r === 'coverage-istanbul')) {
|
|
87
77
|
config.reporters.push('coverage');
|
|
88
78
|
}
|
|
89
|
-
|
|
90
|
-
const webpackConfig = config.buildWebpack.webpackConfig;
|
|
79
|
+
const compiler = config.buildWebpack.compiler;
|
|
91
80
|
const webpackMiddlewareConfig = {
|
|
92
81
|
// Hide webpack output because its noisy.
|
|
93
82
|
stats: false,
|
|
94
83
|
publicPath: `/${KARMA_APPLICATION_PATH}/`,
|
|
95
84
|
};
|
|
96
|
-
// Use existing config if any.
|
|
97
|
-
config.webpack = { ...webpackConfig, ...config.webpack };
|
|
98
85
|
config.webpackMiddleware = { ...webpackMiddlewareConfig, ...config.webpackMiddleware };
|
|
99
86
|
// Our custom context and debug files list the webpack bundles directly instead of using
|
|
100
87
|
// the karma files array.
|
|
101
88
|
config.customContextFile = `${__dirname}/karma-context.html`;
|
|
102
89
|
config.customDebugFile = `${__dirname}/karma-debug.html`;
|
|
103
|
-
// Add the
|
|
104
|
-
config.beforeMiddleware = config.beforeMiddleware || [];
|
|
105
|
-
config.beforeMiddleware.push('@angular-devkit/build-angular--blocker');
|
|
90
|
+
// Add the webpack server fallback.
|
|
106
91
|
config.middleware = config.middleware || [];
|
|
107
92
|
config.middleware.push('@angular-devkit/build-angular--fallback');
|
|
108
|
-
if (config.singleRun) {
|
|
109
|
-
// There's no option to turn off file watching in webpack-dev-server, but
|
|
110
|
-
// we can override the file watcher instead.
|
|
111
|
-
webpackConfig.plugins.unshift({
|
|
112
|
-
apply: (compiler) => {
|
|
113
|
-
compiler.hooks.afterEnvironment.tap('karma', () => {
|
|
114
|
-
compiler.watchFileSystem = { watch: () => { } };
|
|
115
|
-
});
|
|
116
|
-
},
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
// Files need to be served from a custom path for Karma.
|
|
120
|
-
webpackConfig.output.path = `/${KARMA_APPLICATION_PATH}/`;
|
|
121
|
-
webpackConfig.output.publicPath = `/${KARMA_APPLICATION_PATH}/`;
|
|
122
|
-
const compiler = (0, webpack_1.default)(webpackConfig, (error, stats) => {
|
|
123
|
-
if (error) {
|
|
124
|
-
throw error;
|
|
125
|
-
}
|
|
126
|
-
if (stats?.hasErrors()) {
|
|
127
|
-
// Only generate needed JSON stats and when needed.
|
|
128
|
-
const statsJson = stats?.toJson({
|
|
129
|
-
all: false,
|
|
130
|
-
children: true,
|
|
131
|
-
errors: true,
|
|
132
|
-
warnings: true,
|
|
133
|
-
});
|
|
134
|
-
logger.error((0, stats_1.statsErrorsToString)(statsJson, { colors: true }));
|
|
135
|
-
if (config.singleRun) {
|
|
136
|
-
// Notify potential listeners of the compile error.
|
|
137
|
-
emitter.emit('load_error');
|
|
138
|
-
}
|
|
139
|
-
// Finish Karma run early in case of compilation error.
|
|
140
|
-
emitter.emit('run_complete', [], { exitCode: 1 });
|
|
141
|
-
// Emit a failure build event if there are compilation errors.
|
|
142
|
-
failureCb();
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
function handler(callback) {
|
|
146
|
-
isBlocked = true;
|
|
147
|
-
callback?.();
|
|
148
|
-
}
|
|
149
|
-
(0, node_assert_1.default)(compiler, 'Webpack compiler factory did not return a compiler instance.');
|
|
150
|
-
compiler.hooks.invalid.tap('karma', () => handler());
|
|
151
|
-
compiler.hooks.watchRun.tapAsync('karma', (_, callback) => handler(callback));
|
|
152
|
-
compiler.hooks.run.tapAsync('karma', (_, callback) => handler(callback));
|
|
153
93
|
webpackMiddleware = (0, webpack_dev_middleware_1.default)(compiler, webpackMiddlewareConfig);
|
|
154
94
|
emitter.on('exit', (done) => {
|
|
155
|
-
webpackMiddleware.close();
|
|
156
|
-
compiler.close(() => done());
|
|
95
|
+
webpackMiddleware.close(() => compiler.close(() => done()));
|
|
157
96
|
});
|
|
158
|
-
function unblock() {
|
|
159
|
-
isBlocked = false;
|
|
160
|
-
blocked.forEach((cb) => cb());
|
|
161
|
-
blocked = [];
|
|
162
|
-
}
|
|
163
97
|
let lastCompilationHash;
|
|
164
|
-
let isFirstRun = true;
|
|
165
98
|
return new Promise((resolve) => {
|
|
166
99
|
compiler.hooks.done.tap('karma', (stats) => {
|
|
167
|
-
if (isFirstRun) {
|
|
168
|
-
// This is needed to block Karma from launching browsers before Webpack writes the assets in memory.
|
|
169
|
-
// See the below:
|
|
170
|
-
// https://github.com/karma-runner/karma-chrome-launcher/issues/154#issuecomment-986661937
|
|
171
|
-
// https://github.com/angular/angular-cli/issues/22495
|
|
172
|
-
isFirstRun = false;
|
|
173
|
-
resolve();
|
|
174
|
-
}
|
|
175
100
|
if (stats.hasErrors()) {
|
|
176
101
|
lastCompilationHash = undefined;
|
|
102
|
+
// Only generate needed JSON stats and when needed.
|
|
103
|
+
const statsJson = stats.toJson({
|
|
104
|
+
all: false,
|
|
105
|
+
children: true,
|
|
106
|
+
errors: true,
|
|
107
|
+
warnings: true,
|
|
108
|
+
});
|
|
109
|
+
logger.error((0, stats_1.statsErrorsToString)(statsJson, { colors: true }));
|
|
110
|
+
if (config.singleRun) {
|
|
111
|
+
// Notify potential listeners of the compile error.
|
|
112
|
+
emitter.emit('load_error');
|
|
113
|
+
}
|
|
114
|
+
// Finish Karma run early in case of compilation error.
|
|
115
|
+
emitter.emit('run_complete', [], { exitCode: 1 });
|
|
177
116
|
}
|
|
178
117
|
else if (stats.hash != lastCompilationHash) {
|
|
179
118
|
// Refresh karma only when there are no webpack errors, and if the compilation changed.
|
|
180
119
|
lastCompilationHash = stats.hash;
|
|
181
120
|
emitter.refreshFiles();
|
|
182
121
|
}
|
|
183
|
-
|
|
122
|
+
// This is needed to block Karma from launching browsers before Webpack writes the assets in memory.
|
|
123
|
+
// See the below:
|
|
124
|
+
// https://github.com/karma-runner/karma-chrome-launcher/issues/154#issuecomment-986661937
|
|
125
|
+
// https://github.com/angular/angular-cli/issues/22495
|
|
126
|
+
resolve();
|
|
184
127
|
});
|
|
185
128
|
});
|
|
186
129
|
};
|
|
187
130
|
init.$inject = ['config', 'emitter'];
|
|
188
|
-
// Block requests until the Webpack compilation is done.
|
|
189
|
-
function requestBlocker() {
|
|
190
|
-
return function (_request, _response, next) {
|
|
191
|
-
if (isBlocked) {
|
|
192
|
-
blocked.push(next);
|
|
193
|
-
}
|
|
194
|
-
else {
|
|
195
|
-
next();
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
131
|
// Copied from "karma-jasmine-diff-reporter" source code:
|
|
200
132
|
// In case, when multiple reporters are used in conjunction
|
|
201
133
|
// with initSourcemapReporter, they both will show repetitive log
|
|
@@ -211,22 +143,6 @@ function muteDuplicateReporterLogging(context, config) {
|
|
|
211
143
|
context.writeCommonMsg = () => { };
|
|
212
144
|
}
|
|
213
145
|
}
|
|
214
|
-
// Emits builder events.
|
|
215
|
-
const eventReporter = function (baseReporterDecorator, config) {
|
|
216
|
-
baseReporterDecorator(this);
|
|
217
|
-
muteDuplicateReporterLogging(this, config);
|
|
218
|
-
this.onRunComplete = function (_browsers, results) {
|
|
219
|
-
if (results.exitCode === 0) {
|
|
220
|
-
successCb();
|
|
221
|
-
}
|
|
222
|
-
else {
|
|
223
|
-
failureCb();
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
// avoid duplicate failure message
|
|
227
|
-
this.specFailure = () => { };
|
|
228
|
-
};
|
|
229
|
-
eventReporter.$inject = ['baseReporterDecorator', 'config'];
|
|
230
146
|
// Strip the server address and webpack scheme (webpack://) from error log.
|
|
231
147
|
const sourceMapReporter = function (baseReporterDecorator, config) {
|
|
232
148
|
baseReporterDecorator(this);
|
|
@@ -275,8 +191,6 @@ function fallbackMiddleware() {
|
|
|
275
191
|
module.exports = {
|
|
276
192
|
'framework:@angular-devkit/build-angular': ['factory', init],
|
|
277
193
|
'reporter:@angular-devkit/build-angular--sourcemap-reporter': ['type', sourceMapReporter],
|
|
278
|
-
'reporter:@angular-devkit/build-angular--event-reporter': ['type', eventReporter],
|
|
279
|
-
'middleware:@angular-devkit/build-angular--blocker': ['factory', requestBlocker],
|
|
280
194
|
'middleware:@angular-devkit/build-angular--fallback': ['factory', fallbackMiddleware],
|
|
281
195
|
};
|
|
282
196
|
//# sourceMappingURL=karma.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"karma.js","sourceRoot":"","sources":["karma.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKH,gDAAkC;
|
|
1
|
+
{"version":3,"file":"karma.js","sourceRoot":"","sources":["karma.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKH,gDAAkC;AAElC,oFAA0D;AAE1D,6CAAwD;AAGxD,mDAA8D;AAE9D,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;AAEjD,IAAI,iBAA4E,CAAC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AAG,CAAC;YAC3D,CAAC;YACD,iBAAiB,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE;gBACxC,MAAM,WAAW,GAAG;oBAClB,IAAI,sBAAsB,aAAa;oBACvC,IAAI,sBAAsB,eAAe;oBACzC,IAAI,sBAAsB,aAAa;oBACvC,IAAI,sBAAsB,aAAa;oBACvC,IAAI,sBAAsB,YAAY;iBACvC,CAAC;gBACF,IAAI,OAAO,CAAC,GAAG,IAAI,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;oBACrD,QAAQ,CAAC,UAAU,GAAG,GAAG,CAAC;oBAC1B,QAAQ,CAAC,GAAG,EAAE,CAAC;gBACjB,CAAC;qBAAM,CAAC;oBACN,IAAI,EAAE,CAAC;gBACT,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,IAAI,EAAE,CAAC;QACT,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,OAAO,GAAG;IACf,yCAAyC,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC5D,4DAA4D,EAAE,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACzF,oDAAoD,EAAE,CAAC,SAAS,EAAE,kBAAkB,CAAC;CACtF,CAAC"}
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.normalizeCacheOptions = normalizeCacheOptions;
|
|
11
11
|
const node_path_1 = require("node:path");
|
|
12
12
|
/** Version placeholder is replaced during the build process with actual package version */
|
|
13
|
-
const VERSION = '21.1.0-
|
|
13
|
+
const VERSION = '21.1.0-rc.0';
|
|
14
14
|
function hasCacheMetadata(value) {
|
|
15
15
|
return (!!value &&
|
|
16
16
|
typeof value === 'object' &&
|