@ngtools/webpack 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 +1 -1
- package/package.json +11 -3
- package/src/benchmark.d.ts +1 -1
- package/src/benchmark.js +3 -4
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/ivy/cache.d.ts +1 -1
- package/src/ivy/cache.js +1 -1
- package/src/ivy/diagnostics.d.ts +1 -1
- package/src/ivy/diagnostics.js +4 -5
- package/src/ivy/host.d.ts +1 -1
- package/src/ivy/host.js +8 -9
- package/src/ivy/index.d.ts +1 -1
- package/src/ivy/index.js +1 -1
- package/src/ivy/loader.d.ts +1 -1
- package/src/ivy/loader.js +5 -4
- package/src/ivy/paths.d.ts +1 -1
- package/src/ivy/paths.js +3 -3
- package/src/ivy/plugin.d.ts +1 -1
- package/src/ivy/plugin.js +1 -1
- package/src/ivy/symbol.d.ts +1 -1
- package/src/ivy/symbol.js +1 -1
- package/src/ivy/system.d.ts +1 -1
- package/src/ivy/system.js +2 -3
- package/src/ivy/transformation.d.ts +1 -1
- package/src/ivy/transformation.js +5 -6
- package/src/loaders/inline-resource.d.ts +1 -1
- package/src/loaders/inline-resource.js +2 -2
- package/src/paths-plugin.d.ts +1 -1
- package/src/paths-plugin.js +1 -1
- package/src/resource_loader.d.ts +1 -1
- package/src/resource_loader.js +1 -1
- package/src/transformers/elide_imports.d.ts +1 -1
- package/src/transformers/elide_imports.js +2 -3
- package/src/transformers/find_image_domains.d.ts +1 -1
- package/src/transformers/find_image_domains.js +2 -3
- package/src/transformers/index.d.ts +1 -1
- package/src/transformers/index.js +1 -1
- package/src/transformers/remove-ivy-jit-support-calls.d.ts +1 -1
- package/src/transformers/remove-ivy-jit-support-calls.js +2 -3
- package/src/transformers/replace_resources.d.ts +1 -1
- package/src/transformers/replace_resources.js +4 -4
- package/src/transformers/spec_helpers.d.ts +1 -1
- package/src/transformers/spec_helpers.js +3 -4
package/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Webpack 5.x plugin for the Angular Ahead-of-Time compiler. The plugin also supports Angular JIT mode.
|
4
4
|
When this plugin is used outside of the Angular CLI, the Ivy linker will also be needed to support
|
5
5
|
the usage of Angular libraries. An example configuration of the Babel-based Ivy linker is provided
|
6
|
-
in the linker section. For additional information regarding the linker, please see: https://
|
6
|
+
in the linker section. For additional information regarding the linker, please see: https://angular.dev/tools/libraries/creating-libraries#consuming-partial-ivy-code-outside-the-angular-cli
|
7
7
|
|
8
8
|
## Usage
|
9
9
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ngtools/webpack",
|
3
|
-
"version": "18.1.0-next.
|
3
|
+
"version": "18.1.0-next.2",
|
4
4
|
"description": "Webpack plugin that AoT compiles your Angular components and modules.",
|
5
5
|
"main": "./src/index.js",
|
6
6
|
"typings": "src/index.d.ts",
|
@@ -24,15 +24,23 @@
|
|
24
24
|
"url": "https://github.com/angular/angular-cli/issues"
|
25
25
|
},
|
26
26
|
"homepage": "https://github.com/angular/angular-cli",
|
27
|
-
"dependencies": {},
|
28
27
|
"peerDependencies": {
|
29
28
|
"@angular/compiler-cli": "^18.0.0 || ^18.1.0-next.0",
|
30
|
-
"typescript": ">=5.4 <5.
|
29
|
+
"typescript": ">=5.4 <5.6",
|
31
30
|
"webpack": "^5.54.0"
|
32
31
|
},
|
32
|
+
"packageManager": "yarn@4.2.2",
|
33
33
|
"engines": {
|
34
34
|
"node": "^18.19.1 || ^20.11.1 || >=22.0.0",
|
35
35
|
"npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
|
36
36
|
"yarn": ">= 1.13.0"
|
37
|
+
},
|
38
|
+
"dependenciesMeta": {
|
39
|
+
"esbuild": {
|
40
|
+
"built": true
|
41
|
+
},
|
42
|
+
"puppeteer": {
|
43
|
+
"built": true
|
44
|
+
}
|
37
45
|
}
|
38
46
|
}
|
package/src/benchmark.d.ts
CHANGED
@@ -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 declare function time(label: string): void;
|
9
9
|
export declare function timeEnd(label: string): void;
|
package/src/benchmark.js
CHANGED
@@ -4,10 +4,11 @@
|
|
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.
|
10
|
+
exports.time = time;
|
11
|
+
exports.timeEnd = timeEnd;
|
11
12
|
// Internal benchmark reporting flag.
|
12
13
|
// Use with CLI --no-progress flag for best results.
|
13
14
|
// This should be false for commited code.
|
@@ -18,10 +19,8 @@ function time(label) {
|
|
18
19
|
console.time(label);
|
19
20
|
}
|
20
21
|
}
|
21
|
-
exports.time = time;
|
22
22
|
function timeEnd(label) {
|
23
23
|
if (_benchmark) {
|
24
24
|
console.timeEnd(label);
|
25
25
|
}
|
26
26
|
}
|
27
|
-
exports.timeEnd = timeEnd;
|
package/src/index.d.ts
CHANGED
@@ -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 { AngularWebpackLoaderPath, AngularWebpackPlugin, AngularWebpackPluginOptions, imageDomains, default, } from './ivy';
|
package/src/index.js
CHANGED
@@ -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 __importDefault = (this && this.__importDefault) || function (mod) {
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
package/src/ivy/cache.d.ts
CHANGED
@@ -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 * as ts from 'typescript';
|
9
9
|
export declare class SourceFileCache extends Map<string, ts.SourceFile> {
|
package/src/ivy/cache.js
CHANGED
@@ -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.SourceFileCache = void 0;
|
package/src/ivy/diagnostics.d.ts
CHANGED
@@ -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 { Diagnostic } from 'typescript';
|
9
9
|
import type { Compilation } from 'webpack';
|
package/src/ivy/diagnostics.js
CHANGED
@@ -4,10 +4,12 @@
|
|
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.
|
10
|
+
exports.createDiagnosticsReporter = createDiagnosticsReporter;
|
11
|
+
exports.addWarning = addWarning;
|
12
|
+
exports.addError = addError;
|
11
13
|
const typescript_1 = require("typescript");
|
12
14
|
function createDiagnosticsReporter(compilation, formatter) {
|
13
15
|
return (diagnostics) => {
|
@@ -22,12 +24,9 @@ function createDiagnosticsReporter(compilation, formatter) {
|
|
22
24
|
}
|
23
25
|
};
|
24
26
|
}
|
25
|
-
exports.createDiagnosticsReporter = createDiagnosticsReporter;
|
26
27
|
function addWarning(compilation, message) {
|
27
28
|
compilation.warnings.push(new compilation.compiler.webpack.WebpackError(message));
|
28
29
|
}
|
29
|
-
exports.addWarning = addWarning;
|
30
30
|
function addError(compilation, message) {
|
31
31
|
compilation.errors.push(new compilation.compiler.webpack.WebpackError(message));
|
32
32
|
}
|
33
|
-
exports.addError = addError;
|
package/src/ivy/host.d.ts
CHANGED
@@ -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 * as ts from 'typescript';
|
9
9
|
import { WebpackResourceLoader } from '../resource_loader';
|
package/src/ivy/host.js
CHANGED
@@ -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,13 @@ 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.augmentHostWithResources = augmentHostWithResources;
|
34
|
+
exports.augmentHostWithDependencyCollection = augmentHostWithDependencyCollection;
|
35
|
+
exports.augmentHostWithReplacements = augmentHostWithReplacements;
|
36
|
+
exports.augmentHostWithSubstitutions = augmentHostWithSubstitutions;
|
37
|
+
exports.augmentHostWithVersioning = augmentHostWithVersioning;
|
38
|
+
exports.augmentProgramWithVersioning = augmentProgramWithVersioning;
|
39
|
+
exports.augmentHostWithCaching = augmentHostWithCaching;
|
34
40
|
const crypto_1 = require("crypto");
|
35
41
|
const path = __importStar(require("path"));
|
36
42
|
const ts = __importStar(require("typescript"));
|
@@ -70,7 +76,6 @@ function augmentHostWithResources(host, resourceLoader, options = {}) {
|
|
70
76
|
return null;
|
71
77
|
};
|
72
78
|
}
|
73
|
-
exports.augmentHostWithResources = augmentHostWithResources;
|
74
79
|
function augmentResolveModuleNames(host, resolvedModuleModifier, moduleResolutionCache) {
|
75
80
|
if (host.resolveModuleNames) {
|
76
81
|
const baseResolveModuleNames = host.resolveModuleNames;
|
@@ -143,7 +148,6 @@ function augmentHostWithDependencyCollection(host, dependencies, moduleResolutio
|
|
143
148
|
};
|
144
149
|
}
|
145
150
|
}
|
146
|
-
exports.augmentHostWithDependencyCollection = augmentHostWithDependencyCollection;
|
147
151
|
function augmentHostWithReplacements(host, replacements, moduleResolutionCache) {
|
148
152
|
if (Object.keys(replacements).length === 0) {
|
149
153
|
return;
|
@@ -166,7 +170,6 @@ function augmentHostWithReplacements(host, replacements, moduleResolutionCache)
|
|
166
170
|
};
|
167
171
|
augmentResolveModuleNames(host, tryReplace, moduleResolutionCache);
|
168
172
|
}
|
169
|
-
exports.augmentHostWithReplacements = augmentHostWithReplacements;
|
170
173
|
function augmentHostWithSubstitutions(host, substitutions) {
|
171
174
|
const regexSubstitutions = [];
|
172
175
|
for (const [key, value] of Object.entries(substitutions)) {
|
@@ -186,7 +189,6 @@ function augmentHostWithSubstitutions(host, substitutions) {
|
|
186
189
|
return file;
|
187
190
|
};
|
188
191
|
}
|
189
|
-
exports.augmentHostWithSubstitutions = augmentHostWithSubstitutions;
|
190
192
|
function augmentHostWithVersioning(host) {
|
191
193
|
const baseGetSourceFile = host.getSourceFile;
|
192
194
|
host.getSourceFile = function (...parameters) {
|
@@ -197,7 +199,6 @@ function augmentHostWithVersioning(host) {
|
|
197
199
|
return file;
|
198
200
|
};
|
199
201
|
}
|
200
|
-
exports.augmentHostWithVersioning = augmentHostWithVersioning;
|
201
202
|
function augmentProgramWithVersioning(program) {
|
202
203
|
const baseGetSourceFiles = program.getSourceFiles;
|
203
204
|
program.getSourceFiles = function (...parameters) {
|
@@ -210,7 +211,6 @@ function augmentProgramWithVersioning(program) {
|
|
210
211
|
return files;
|
211
212
|
};
|
212
213
|
}
|
213
|
-
exports.augmentProgramWithVersioning = augmentProgramWithVersioning;
|
214
214
|
function augmentHostWithCaching(host, cache) {
|
215
215
|
const baseGetSourceFile = host.getSourceFile;
|
216
216
|
host.getSourceFile = function (fileName, languageVersion, onError, shouldCreateNewSourceFile, ...parameters) {
|
@@ -224,4 +224,3 @@ function augmentHostWithCaching(host, cache) {
|
|
224
224
|
return file;
|
225
225
|
};
|
226
226
|
}
|
227
|
-
exports.augmentHostWithCaching = augmentHostWithCaching;
|
package/src/ivy/index.d.ts
CHANGED
@@ -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 { angularWebpackLoader as default } from './loader';
|
9
9
|
export { AngularWebpackPluginOptions, AngularWebpackPlugin, imageDomains } from './plugin';
|
package/src/ivy/index.js
CHANGED
@@ -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.AngularWebpackLoaderPath = exports.imageDomains = exports.AngularWebpackPlugin = exports.default = void 0;
|
package/src/ivy/loader.d.ts
CHANGED
@@ -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 { LoaderContext } from 'webpack';
|
9
9
|
export declare function angularWebpackLoader(this: LoaderContext<unknown>, content: string, map: string): void;
|
package/src/ivy/loader.js
CHANGED
@@ -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,10 @@ 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.angularWebpackLoader = angularWebpackLoader;
|
34
|
+
exports.default = angularWebpackLoader;
|
35
|
+
exports.angularWebpackLoader = angularWebpackLoader;
|
36
|
+
exports.default = angularWebpackLoader;
|
34
37
|
const path = __importStar(require("path"));
|
35
38
|
const symbol_1 = require("./symbol");
|
36
39
|
const JS_FILE_REGEXP = /\.[cm]?js$/;
|
@@ -81,5 +84,3 @@ function angularWebpackLoader(content, map) {
|
|
81
84
|
callback(new Error(message));
|
82
85
|
});
|
83
86
|
}
|
84
|
-
exports.angularWebpackLoader = angularWebpackLoader;
|
85
|
-
exports.default = angularWebpackLoader;
|
package/src/ivy/paths.d.ts
CHANGED
@@ -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 declare function normalizePath(path: string): string;
|
9
9
|
export declare const externalizePath: (path: string) => string;
|
package/src/ivy/paths.js
CHANGED
@@ -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.externalizePath =
|
33
|
+
exports.externalizePath = void 0;
|
34
|
+
exports.normalizePath = normalizePath;
|
34
35
|
const nodePath = __importStar(require("path"));
|
35
36
|
const normalizationCache = new Map();
|
36
37
|
function normalizePath(path) {
|
@@ -41,7 +42,6 @@ function normalizePath(path) {
|
|
41
42
|
}
|
42
43
|
return result;
|
43
44
|
}
|
44
|
-
exports.normalizePath = normalizePath;
|
45
45
|
const externalizationCache = new Map();
|
46
46
|
function externalizeForWindows(path) {
|
47
47
|
let result = externalizationCache.get(path);
|
package/src/ivy/plugin.d.ts
CHANGED
@@ -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 { CompilerOptions } from '@angular/compiler-cli';
|
9
9
|
import type { Compiler } from 'webpack';
|
package/src/ivy/plugin.js
CHANGED
@@ -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;
|
package/src/ivy/symbol.d.ts
CHANGED
@@ -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 declare const AngularPluginSymbol: unique symbol;
|
9
9
|
export interface EmitFileResult {
|
package/src/ivy/symbol.js
CHANGED
@@ -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.FileEmitterCollection = exports.FileEmitterRegistration = exports.AngularPluginSymbol = void 0;
|
package/src/ivy/system.d.ts
CHANGED
@@ -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 * as ts from 'typescript';
|
9
9
|
import { Compiler } from 'webpack';
|
package/src/ivy/system.js
CHANGED
@@ -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.createWebpackSystem =
|
33
|
+
exports.createWebpackSystem = createWebpackSystem;
|
34
34
|
const ts = __importStar(require("typescript"));
|
35
35
|
const paths_1 = require("./paths");
|
36
36
|
function shouldNotWrite() {
|
@@ -102,4 +102,3 @@ function createWebpackSystem(input, currentDirectory) {
|
|
102
102
|
};
|
103
103
|
return system;
|
104
104
|
}
|
105
|
-
exports.createWebpackSystem = createWebpackSystem;
|
@@ -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 * as ts from 'typescript';
|
9
9
|
export declare function createAotTransformers(builder: ts.BuilderProgram, options: {
|
@@ -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,10 @@ 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.createAotTransformers = createAotTransformers;
|
34
|
+
exports.createJitTransformers = createJitTransformers;
|
35
|
+
exports.mergeTransformers = mergeTransformers;
|
36
|
+
exports.replaceBootstrap = replaceBootstrap;
|
34
37
|
const ts = __importStar(require("typescript"));
|
35
38
|
const elide_imports_1 = require("../transformers/elide_imports");
|
36
39
|
const find_image_domains_1 = require("../transformers/find_image_domains");
|
@@ -51,7 +54,6 @@ function createAotTransformers(builder, options, imageDomains) {
|
|
51
54
|
}
|
52
55
|
return transformers;
|
53
56
|
}
|
54
|
-
exports.createAotTransformers = createAotTransformers;
|
55
57
|
function createJitTransformers(builder, compilerCli, options) {
|
56
58
|
const getTypeChecker = () => builder.getProgram().getTypeChecker();
|
57
59
|
return {
|
@@ -61,7 +63,6 @@ function createJitTransformers(builder, compilerCli, options) {
|
|
61
63
|
],
|
62
64
|
};
|
63
65
|
}
|
64
|
-
exports.createJitTransformers = createJitTransformers;
|
65
66
|
function mergeTransformers(first, second) {
|
66
67
|
const result = {};
|
67
68
|
if (first.before || second.before) {
|
@@ -78,7 +79,6 @@ function mergeTransformers(first, second) {
|
|
78
79
|
}
|
79
80
|
return result;
|
80
81
|
}
|
81
|
-
exports.mergeTransformers = mergeTransformers;
|
82
82
|
/**
|
83
83
|
* The name of the Angular platform that should be replaced within
|
84
84
|
* bootstrap call expressions to support AOT.
|
@@ -124,4 +124,3 @@ function replaceBootstrap(getTypeChecker) {
|
|
124
124
|
};
|
125
125
|
};
|
126
126
|
}
|
127
|
-
exports.replaceBootstrap = replaceBootstrap;
|
@@ -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 { Compilation, LoaderContext } from 'webpack';
|
9
9
|
export declare const InlineAngularResourceLoaderPath: string;
|
@@ -4,10 +4,11 @@
|
|
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.InlineAngularResourceSymbol = exports.InlineAngularResourceLoaderPath = void 0;
|
11
|
+
exports.default = default_1;
|
11
12
|
exports.InlineAngularResourceLoaderPath = __filename;
|
12
13
|
exports.InlineAngularResourceSymbol = Symbol('@ngtools/webpack[angular-resource]');
|
13
14
|
function default_1() {
|
@@ -21,4 +22,3 @@ function default_1() {
|
|
21
22
|
callback(undefined, content);
|
22
23
|
}
|
23
24
|
}
|
24
|
-
exports.default = default_1;
|
package/src/paths-plugin.d.ts
CHANGED
@@ -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 { CompilerOptions } from 'typescript';
|
9
9
|
import type { Resolver } from 'webpack';
|
package/src/paths-plugin.js
CHANGED
@@ -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;
|
package/src/resource_loader.d.ts
CHANGED
@@ -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 { Compilation } from 'webpack';
|
9
9
|
export declare class WebpackResourceLoader {
|
package/src/resource_loader.js
CHANGED
@@ -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 * as ts from 'typescript';
|
9
9
|
export declare function elideImports(sourceFile: ts.SourceFile, removedNodes: ts.Node[], getTypeChecker: () => ts.TypeChecker, compilerOptions: ts.CompilerOptions): Set<ts.Node>;
|
@@ -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.elideImports =
|
33
|
+
exports.elideImports = elideImports;
|
34
34
|
const ts = __importStar(require("typescript"));
|
35
35
|
// Remove imports for which all identifiers have been removed.
|
36
36
|
// Needs type checker, and works even if it's not the first transformer.
|
@@ -153,4 +153,3 @@ function elideImports(sourceFile, removedNodes, getTypeChecker, compilerOptions)
|
|
153
153
|
}
|
154
154
|
return importNodeRemovals;
|
155
155
|
}
|
156
|
-
exports.elideImports = elideImports;
|
@@ -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 * as ts from 'typescript';
|
9
9
|
export declare function findImageDomains(imageDomains: Set<string>): ts.TransformerFactory<ts.SourceFile>;
|
@@ -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.findImageDomains =
|
33
|
+
exports.findImageDomains = findImageDomains;
|
34
34
|
const ts = __importStar(require("typescript"));
|
35
35
|
const TARGET_TEXT = '@NgModule';
|
36
36
|
const BUILTIN_LOADERS = new Set([
|
@@ -150,4 +150,3 @@ function findImageDomains(imageDomains) {
|
|
150
150
|
};
|
151
151
|
};
|
152
152
|
}
|
153
|
-
exports.findImageDomains = findImageDomains;
|
@@ -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 * from './elide_imports';
|
9
9
|
export * from './replace_resources';
|
@@ -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 * as ts from 'typescript';
|
9
9
|
export declare function removeIvyJitSupportCalls(classMetadata: boolean, ngModuleScope: boolean, debugInfo: boolean, getTypeChecker: () => ts.TypeChecker): ts.TransformerFactory<ts.SourceFile>;
|
@@ -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.removeIvyJitSupportCalls =
|
33
|
+
exports.removeIvyJitSupportCalls = removeIvyJitSupportCalls;
|
34
34
|
const ts = __importStar(require("typescript"));
|
35
35
|
const elide_imports_1 = require("./elide_imports");
|
36
36
|
function removeIvyJitSupportCalls(classMetadata, ngModuleScope, debugInfo, getTypeChecker) {
|
@@ -81,7 +81,6 @@ function removeIvyJitSupportCalls(classMetadata, ngModuleScope, debugInfo, getTy
|
|
81
81
|
};
|
82
82
|
};
|
83
83
|
}
|
84
|
-
exports.removeIvyJitSupportCalls = removeIvyJitSupportCalls;
|
85
84
|
// Each Ivy private call expression is inside an IIFE
|
86
85
|
function getIifeExpression(exprStmt) {
|
87
86
|
const expression = exprStmt.expression;
|
@@ -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 * as ts from 'typescript';
|
9
9
|
export declare const NG_COMPONENT_RESOURCE_QUERY = "ngResource";
|
@@ -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,9 @@ 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.NG_COMPONENT_RESOURCE_QUERY = void 0;
|
34
|
+
exports.replaceResources = replaceResources;
|
35
|
+
exports.getResourceUrl = getResourceUrl;
|
34
36
|
const ts = __importStar(require("typescript"));
|
35
37
|
const inline_resource_1 = require("../loaders/inline-resource");
|
36
38
|
exports.NG_COMPONENT_RESOURCE_QUERY = 'ngResource';
|
@@ -69,7 +71,6 @@ function replaceResources(shouldTransform, getTypeChecker, inlineStyleFileExtens
|
|
69
71
|
};
|
70
72
|
};
|
71
73
|
}
|
72
|
-
exports.replaceResources = replaceResources;
|
73
74
|
function visitDecorator(nodeFactory, node, typeChecker, resourceImportDeclarations, moduleKind, inlineStyleFileExtension) {
|
74
75
|
if (!isComponentDecorator(node, typeChecker)) {
|
75
76
|
return node;
|
@@ -173,7 +174,6 @@ function getResourceUrl(node) {
|
|
173
174
|
}
|
174
175
|
return `${/^\.?\.\//.test(node.text) ? '' : './'}${node.text}?${exports.NG_COMPONENT_RESOURCE_QUERY}`;
|
175
176
|
}
|
176
|
-
exports.getResourceUrl = getResourceUrl;
|
177
177
|
function isComponentDecorator(node, typeChecker) {
|
178
178
|
if (!ts.isDecorator(node)) {
|
179
179
|
return false;
|
@@ -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 * as ts from 'typescript';
|
9
9
|
export declare function createTypescriptContext(content: string, additionalFiles?: Record<string, string>, useLibs?: boolean, extraCompilerOptions?: ts.CompilerOptions, jsxFile?: boolean): {
|
@@ -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.createTypescriptContext = createTypescriptContext;
|
34
|
+
exports.transformTypescript = transformTypescript;
|
34
35
|
const path_1 = require("path");
|
35
36
|
const ts = __importStar(require("typescript"));
|
36
37
|
// Test transform helpers.
|
@@ -76,7 +77,6 @@ function createTypescriptContext(content, additionalFiles, useLibs = false, extr
|
|
76
77
|
const program = ts.createProgram([fileName], compilerOptions, compilerHost);
|
77
78
|
return { compilerHost, program };
|
78
79
|
}
|
79
|
-
exports.createTypescriptContext = createTypescriptContext;
|
80
80
|
function transformTypescript(content, transformers, program, compilerHost) {
|
81
81
|
// Use given context or create a new one.
|
82
82
|
if (content !== undefined) {
|
@@ -106,4 +106,3 @@ function transformTypescript(content, transformers, program, compilerHost) {
|
|
106
106
|
// Return the transpiled js.
|
107
107
|
return outputContent;
|
108
108
|
}
|
109
|
-
exports.transformTypescript = transformTypescript;
|