@angular-devkit/build-angular 12.1.0-next.3 → 12.1.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/package.json +40 -39
- package/src/app-shell/index.js +28 -8
- package/src/babel/plugins/adjust-static-class-members.d.ts +25 -0
- package/src/babel/plugins/adjust-static-class-members.js +251 -0
- package/src/babel/plugins/adjust-typescript-enums.d.ts +21 -0
- package/src/babel/plugins/adjust-typescript-enums.js +123 -0
- package/src/babel/plugins/elide-angular-metadata.d.ts +21 -0
- package/src/babel/plugins/elide-angular-metadata.js +68 -0
- package/src/babel/plugins/pure-toplevel-functions.d.ts +14 -0
- package/src/babel/plugins/pure-toplevel-functions.js +86 -0
- package/src/babel/presets/application.d.ts +1 -0
- package/src/babel/presets/application.js +23 -3
- package/src/babel/webpack-loader.js +39 -1
- package/src/browser/index.d.ts +1 -4
- package/src/browser/index.js +26 -36
- package/src/browser/schema.d.ts +1 -1
- package/src/browser/schema.json +1 -1
- package/src/dev-server/index.d.ts +1 -1
- package/src/dev-server/index.js +68 -47
- package/src/dev-server/tests/execute-fetch.js +4 -1
- package/src/extract-i18n/empty-loader.d.ts +8 -0
- package/src/extract-i18n/empty-loader.js +13 -0
- package/src/extract-i18n/index.d.ts +1 -1
- package/src/extract-i18n/index.js +46 -18
- package/src/extract-i18n/ivy-extract-loader.js +20 -1
- package/src/karma/find-tests.js +20 -1
- package/src/karma/index.js +21 -1
- package/src/karma/schema.d.ts +1 -1
- package/src/karma/schema.json +1 -1
- package/src/karma/tests/setup.d.ts +18 -0
- package/src/karma/tests/setup.js +29 -0
- package/src/ng-packagr/index.js +21 -2
- package/src/protractor/index.js +21 -2
- package/src/sass/sass-service.d.ts +0 -3
- package/src/sass/sass-service.js +8 -9
- package/src/sass/worker.js +4 -2
- package/src/server/index.d.ts +1 -1
- package/src/server/index.js +20 -1
- package/src/server/schema.d.ts +1 -1
- package/src/server/schema.json +1 -1
- package/src/tslint/index.js +22 -3
- package/src/typings.d.ts +6 -0
- package/src/utils/action-cache.js +21 -2
- package/src/utils/action-executor.js +21 -2
- package/src/utils/build-browser-features.js +25 -3
- package/src/utils/cache-path.js +5 -2
- package/src/utils/check-port.js +20 -1
- package/src/utils/color.js +20 -1
- package/src/utils/copy-assets.js +26 -4
- package/src/utils/copy-file.js +20 -1
- package/src/utils/delete-output-dir.js +2 -2
- package/src/utils/environment-options.d.ts +1 -0
- package/src/utils/environment-options.js +26 -2
- package/src/utils/find-up.js +20 -1
- package/src/utils/i18n-inlining.js +21 -2
- package/src/utils/i18n-options.js +23 -5
- package/src/utils/index-file/html-rewriting-stream.js +20 -1
- package/src/utils/index-file/index-html-generator.js +20 -1
- package/src/utils/index-file/inline-critical-css.js +20 -1
- package/src/utils/index-file/inline-fonts.js +27 -5
- package/src/utils/is-directory.js +20 -1
- package/src/utils/load-translations.js +26 -7
- package/src/utils/process-bundle.js +34 -12
- package/src/utils/read-tsconfig.js +20 -1
- package/src/utils/service-worker.js +21 -2
- package/src/utils/spinner.d.ts +2 -0
- package/src/utils/spinner.js +18 -2
- package/src/utils/webpack-browser-config.js +21 -2
- package/src/webpack/configs/analytics.d.ts +11 -0
- package/src/webpack/configs/analytics.js +29 -0
- package/src/webpack/configs/common.js +96 -45
- package/src/webpack/configs/dev-server.js +20 -1
- package/src/webpack/configs/index.d.ts +1 -0
- package/src/webpack/configs/index.js +1 -0
- package/src/webpack/configs/server.js +8 -0
- package/src/webpack/configs/stats.d.ts +6 -14
- package/src/webpack/configs/stats.js +5 -8
- package/src/webpack/configs/styles.js +28 -2
- package/src/webpack/configs/test.js +32 -3
- package/src/webpack/configs/typescript.d.ts +2 -9
- package/src/webpack/configs/typescript.js +16 -14
- package/src/webpack/plugins/any-component-style-budget-checker.js +20 -1
- package/src/webpack/plugins/builder-watch-plugin.d.ts +0 -2
- package/src/webpack/plugins/builder-watch-plugin.js +2 -7
- package/src/webpack/plugins/index.js +4 -1
- package/src/webpack/plugins/karma/karma-context.html +1 -1
- package/src/webpack/plugins/karma/karma-debug.html +1 -1
- package/src/webpack/plugins/karma/karma.js +27 -5
- package/src/webpack/plugins/postcss-cli-resources.js +21 -2
- package/src/webpack/plugins/scripts-webpack-plugin.js +20 -1
- package/src/webpack/utils/async-chunks.js +9 -5
- package/src/webpack/utils/helpers.js +20 -1
- package/src/webpack/utils/stats.d.ts +2 -3
- package/src/webpack/utils/stats.js +50 -15
- package/src/extract-i18n/empty-export-default.js +0 -1
|
@@ -6,11 +6,30 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.BundleActionCache = void 0;
|
|
11
|
-
const cacache = require("cacache");
|
|
30
|
+
const cacache = __importStar(require("cacache"));
|
|
12
31
|
const crypto_1 = require("crypto");
|
|
13
|
-
const fs = require("fs");
|
|
32
|
+
const fs = __importStar(require("fs"));
|
|
14
33
|
const copy_file_1 = require("./copy-file");
|
|
15
34
|
const environment_options_1 = require("./environment-options");
|
|
16
35
|
const packageVersion = require('../../package.json').version;
|
|
@@ -6,11 +6,30 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.BundleActionExecutor = void 0;
|
|
11
30
|
const jest_worker_1 = require("jest-worker");
|
|
12
|
-
const os = require("os");
|
|
13
|
-
const path = require("path");
|
|
31
|
+
const os = __importStar(require("os"));
|
|
32
|
+
const path = __importStar(require("path"));
|
|
14
33
|
const v8_1 = require("v8");
|
|
15
34
|
const action_cache_1 = require("./action-cache");
|
|
16
35
|
const environment_options_1 = require("./environment-options");
|
|
@@ -6,15 +6,37 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
9
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
32
|
exports.BuildBrowserFeatures = void 0;
|
|
11
|
-
const
|
|
33
|
+
const browserslist_1 = __importDefault(require("browserslist"));
|
|
12
34
|
const caniuse_lite_1 = require("caniuse-lite");
|
|
13
|
-
const ts = require("typescript");
|
|
35
|
+
const ts = __importStar(require("typescript"));
|
|
14
36
|
class BuildBrowserFeatures {
|
|
15
37
|
constructor(projectRoot) {
|
|
16
38
|
this.projectRoot = projectRoot;
|
|
17
|
-
this.supportedBrowsers =
|
|
39
|
+
this.supportedBrowsers = browserslist_1.default(undefined, { path: this.projectRoot });
|
|
18
40
|
}
|
|
19
41
|
/**
|
|
20
42
|
* True, when one or more browsers requires ES5
|
package/src/utils/cache-path.js
CHANGED
|
@@ -6,9 +6,12 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
+
};
|
|
9
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
13
|
exports.findCachePath = void 0;
|
|
11
|
-
const
|
|
14
|
+
const find_cache_dir_1 = __importDefault(require("find-cache-dir"));
|
|
12
15
|
const os_1 = require("os");
|
|
13
16
|
const path_1 = require("path");
|
|
14
17
|
const environment_options_1 = require("./environment-options");
|
|
@@ -16,6 +19,6 @@ function findCachePath(name) {
|
|
|
16
19
|
if (environment_options_1.cachingBasePath) {
|
|
17
20
|
return path_1.resolve(environment_options_1.cachingBasePath, name);
|
|
18
21
|
}
|
|
19
|
-
return
|
|
22
|
+
return find_cache_dir_1.default({ name }) || os_1.tmpdir();
|
|
20
23
|
}
|
|
21
24
|
exports.findCachePath = findCachePath;
|
package/src/utils/check-port.js
CHANGED
|
@@ -6,10 +6,29 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.checkPort = void 0;
|
|
11
30
|
const inquirer_1 = require("inquirer");
|
|
12
|
-
const net = require("net");
|
|
31
|
+
const net = __importStar(require("net"));
|
|
13
32
|
const tty_1 = require("./tty");
|
|
14
33
|
function createInUseError(port) {
|
|
15
34
|
return new Error(`Port ${port} is already in use. Use '--port' to specify a different port.`);
|
package/src/utils/color.js
CHANGED
|
@@ -6,9 +6,28 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.colors = exports.removeColor = void 0;
|
|
11
|
-
const ansiColors = require("ansi-colors");
|
|
30
|
+
const ansiColors = __importStar(require("ansi-colors"));
|
|
12
31
|
const tty_1 = require("tty");
|
|
13
32
|
const supportsColor = process.stdout instanceof tty_1.WriteStream && process.stdout.getColorDepth() > 1;
|
|
14
33
|
function removeColor(text) {
|
package/src/utils/copy-assets.js
CHANGED
|
@@ -6,14 +6,36 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
9
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
32
|
exports.copyAssets = void 0;
|
|
11
|
-
const fs = require("fs");
|
|
12
|
-
const
|
|
13
|
-
const path = require("path");
|
|
33
|
+
const fs = __importStar(require("fs"));
|
|
34
|
+
const glob_1 = __importDefault(require("glob"));
|
|
35
|
+
const path = __importStar(require("path"));
|
|
14
36
|
const copy_file_1 = require("./copy-file");
|
|
15
37
|
function globAsync(pattern, options) {
|
|
16
|
-
return new Promise((resolve, reject) =>
|
|
38
|
+
return new Promise((resolve, reject) => glob_1.default(pattern, options, (e, m) => (e ? reject(e) : resolve(m))));
|
|
17
39
|
}
|
|
18
40
|
async function copyAssets(entries, basePaths, root, changed) {
|
|
19
41
|
const defaultIgnore = ['.gitkeep', '**/.DS_Store', '**/Thumbs.db'];
|
package/src/utils/copy-file.js
CHANGED
|
@@ -6,9 +6,28 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.copyFile = void 0;
|
|
11
|
-
const fs = require("fs");
|
|
30
|
+
const fs = __importStar(require("fs"));
|
|
12
31
|
// Workaround Node.js issue prior to 10.16 with copyFile on macOS
|
|
13
32
|
// https://github.com/angular/angular-cli/issues/15544 & https://github.com/nodejs/node/pull/27241
|
|
14
33
|
let copyFileWorkaround = false;
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.deleteOutputDir = void 0;
|
|
11
|
+
const fs_1 = require("fs");
|
|
11
12
|
const path_1 = require("path");
|
|
12
|
-
const rimraf = require("rimraf");
|
|
13
13
|
/**
|
|
14
14
|
* Delete an output directory, but error out if it's the root of the project.
|
|
15
15
|
*/
|
|
@@ -18,6 +18,6 @@ function deleteOutputDir(root, outputPath) {
|
|
|
18
18
|
if (resolvedOutputPath === root) {
|
|
19
19
|
throw new Error('Output path MUST not be project root directory!');
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
fs_1.rmdirSync(resolvedOutputPath, { recursive: true, maxRetries: 3 });
|
|
22
22
|
}
|
|
23
23
|
exports.deleteOutputDir = deleteOutputDir;
|
|
@@ -10,5 +10,6 @@ export declare const shouldBeautify: boolean;
|
|
|
10
10
|
export declare const allowMinify: boolean;
|
|
11
11
|
export declare const cachingDisabled: boolean;
|
|
12
12
|
export declare const cachingBasePath: string | null;
|
|
13
|
+
export declare const persistentBuildCacheEnabled: boolean;
|
|
13
14
|
export declare const profilingEnabled: boolean;
|
|
14
15
|
export declare const maxWorkers: number;
|
|
@@ -6,9 +6,28 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.maxWorkers = exports.profilingEnabled = exports.cachingBasePath = exports.cachingDisabled = exports.allowMinify = exports.shouldBeautify = exports.allowMangle = void 0;
|
|
11
|
-
const path = require("path");
|
|
29
|
+
exports.maxWorkers = exports.profilingEnabled = exports.persistentBuildCacheEnabled = exports.cachingBasePath = exports.cachingDisabled = exports.allowMinify = exports.shouldBeautify = exports.allowMangle = void 0;
|
|
30
|
+
const path = __importStar(require("path"));
|
|
12
31
|
function isDisabled(variable) {
|
|
13
32
|
return variable === '0' || variable.toLowerCase() === 'false';
|
|
14
33
|
}
|
|
@@ -69,6 +88,11 @@ exports.cachingBasePath = (() => {
|
|
|
69
88
|
}
|
|
70
89
|
return cacheVariable;
|
|
71
90
|
})();
|
|
91
|
+
// Persistent build cache
|
|
92
|
+
const persistentBuildCacheVariable = process.env['NG_PERSISTENT_BUILD_CACHE'];
|
|
93
|
+
exports.persistentBuildCacheEnabled = !exports.cachingDisabled &&
|
|
94
|
+
isPresent(persistentBuildCacheVariable) &&
|
|
95
|
+
isEnabled(persistentBuildCacheVariable);
|
|
72
96
|
// Build profiling
|
|
73
97
|
const profilingVariable = process.env['NG_BUILD_PROFILING'];
|
|
74
98
|
exports.profilingEnabled = isPresent(profilingVariable) && isEnabled(profilingVariable);
|
package/src/utils/find-up.js
CHANGED
|
@@ -6,10 +6,29 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.findAllNodeModules = void 0;
|
|
11
30
|
const fs_1 = require("fs");
|
|
12
|
-
const path = require("path");
|
|
31
|
+
const path = __importStar(require("path"));
|
|
13
32
|
const is_directory_1 = require("./is-directory");
|
|
14
33
|
function findAllNodeModules(from, root) {
|
|
15
34
|
const nodeModules = [];
|
|
@@ -6,10 +6,29 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.i18nInlineEmittedFiles = void 0;
|
|
11
|
-
const fs = require("fs");
|
|
12
|
-
const path = require("path");
|
|
30
|
+
const fs = __importStar(require("fs"));
|
|
31
|
+
const path = __importStar(require("path"));
|
|
13
32
|
const action_executor_1 = require("./action-executor");
|
|
14
33
|
const copy_assets_1 = require("./copy-assets");
|
|
15
34
|
const spinner_1 = require("./spinner");
|
|
@@ -6,13 +6,31 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.configureI18nBuild = exports.createI18nOptions = void 0;
|
|
11
30
|
const core_1 = require("@angular-devkit/core");
|
|
12
|
-
const fs = require("fs");
|
|
13
|
-
const os = require("os");
|
|
14
|
-
const path = require("path");
|
|
15
|
-
const rimraf = require("rimraf");
|
|
31
|
+
const fs = __importStar(require("fs"));
|
|
32
|
+
const os = __importStar(require("os"));
|
|
33
|
+
const path = __importStar(require("path"));
|
|
16
34
|
const read_tsconfig_1 = require("../utils/read-tsconfig");
|
|
17
35
|
const load_translations_1 = require("./load-translations");
|
|
18
36
|
function normalizeTranslationFileOption(option, locale, expectObjectInError) {
|
|
@@ -197,7 +215,7 @@ async function configureI18nBuild(context, options) {
|
|
|
197
215
|
// Remove temporary directory used for i18n processing
|
|
198
216
|
process.on('exit', () => {
|
|
199
217
|
try {
|
|
200
|
-
|
|
218
|
+
fs.rmdirSync(tempPath, { recursive: true, maxRetries: 3 });
|
|
201
219
|
}
|
|
202
220
|
catch { }
|
|
203
221
|
});
|
|
@@ -6,12 +6,31 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.htmlRewritingStream = void 0;
|
|
11
30
|
const stream_1 = require("stream");
|
|
12
31
|
async function htmlRewritingStream(content) {
|
|
13
32
|
const chunks = [];
|
|
14
|
-
const rewriter = new (await Promise.resolve().then(() => require('parse5-html-rewriting-stream')))();
|
|
33
|
+
const rewriter = new (await Promise.resolve().then(() => __importStar(require('parse5-html-rewriting-stream')))).default();
|
|
15
34
|
return {
|
|
16
35
|
rewriter,
|
|
17
36
|
transformedContent: new Promise((resolve) => {
|
|
@@ -6,9 +6,28 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.IndexHtmlGenerator = void 0;
|
|
11
|
-
const fs = require("fs");
|
|
30
|
+
const fs = __importStar(require("fs"));
|
|
12
31
|
const path_1 = require("path");
|
|
13
32
|
const strip_bom_1 = require("../strip-bom");
|
|
14
33
|
const augment_index_html_1 = require("./augment-index-html");
|
|
@@ -6,9 +6,28 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.InlineCriticalCssProcessor = void 0;
|
|
11
|
-
const fs = require("fs");
|
|
30
|
+
const fs = __importStar(require("fs"));
|
|
12
31
|
const Critters = require('critters');
|
|
13
32
|
class CrittersExtended extends Critters {
|
|
14
33
|
constructor(optionsExtended) {
|
|
@@ -6,12 +6,34 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
9
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
32
|
exports.InlineFontsProcessor = void 0;
|
|
11
|
-
const cacache = require("cacache");
|
|
12
|
-
const fs = require("fs");
|
|
13
|
-
const https = require("https");
|
|
14
|
-
const
|
|
33
|
+
const cacache = __importStar(require("cacache"));
|
|
34
|
+
const fs = __importStar(require("fs"));
|
|
35
|
+
const https = __importStar(require("https"));
|
|
36
|
+
const https_proxy_agent_1 = __importDefault(require("https-proxy-agent"));
|
|
15
37
|
const url_1 = require("url");
|
|
16
38
|
const cache_path_1 = require("../cache-path");
|
|
17
39
|
const environment_options_1 = require("../environment-options");
|
|
@@ -81,7 +103,7 @@ class InlineFontsProcessor {
|
|
|
81
103
|
let agent;
|
|
82
104
|
const httpsProxy = (_a = process.env.HTTPS_PROXY) !== null && _a !== void 0 ? _a : process.env.https_proxy;
|
|
83
105
|
if (httpsProxy) {
|
|
84
|
-
agent =
|
|
106
|
+
agent = https_proxy_agent_1.default(httpsProxy);
|
|
85
107
|
}
|
|
86
108
|
const data = await new Promise((resolve, reject) => {
|
|
87
109
|
let rawResponse = '';
|
|
@@ -6,10 +6,29 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
9
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
29
|
exports.isDirectory = void 0;
|
|
11
30
|
// TODO: cleanup this file, it's copied as is from Angular CLI.
|
|
12
|
-
const fs = require("fs");
|
|
31
|
+
const fs = __importStar(require("fs"));
|
|
13
32
|
function isDirectory(path) {
|
|
14
33
|
try {
|
|
15
34
|
return fs.statSync(path).isDirectory();
|