@nrwl/angular 13.10.0-beta.1 → 13.10.0-beta.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/esm2020/mfe/index.mjs +2 -0
- package/esm2020/mfe/mfe.mjs +45 -0
- package/esm2020/mfe/nrwl-angular-mfe.mjs +5 -0
- package/esm2020/src/runtime/nx/data-persistence.mjs +3 -3
- package/esm2020/src/runtime/nx/nx.module.mjs +4 -4
- package/executors.js +3 -3
- package/executors.js.map +1 -1
- package/executors.json +4 -4
- package/fesm2015/nrwl-angular-mfe.mjs +57 -0
- package/fesm2015/nrwl-angular-mfe.mjs.map +1 -0
- package/fesm2015/nrwl-angular.mjs +7 -7
- package/fesm2020/nrwl-angular-mfe.mjs +51 -0
- package/fesm2020/nrwl-angular-mfe.mjs.map +1 -0
- package/fesm2020/nrwl-angular.mjs +7 -7
- package/generators.js +26 -26
- package/generators.js.map +1 -1
- package/generators.json +10 -0
- package/mfe/index.d.ts +1 -0
- package/mfe/index.js +7 -0
- package/mfe/index.js.map +1 -0
- package/mfe/mfe.d.ts +4 -0
- package/mfe/mfe.js +56 -0
- package/mfe/mfe.js.map +1 -0
- package/mfe/ng-package.json +6 -0
- package/mfe/nrwl-angular-mfe.d.ts +5 -0
- package/mfe/package.json +10 -0
- package/module-federation/index.d.ts +1 -0
- package/module-federation/index.js +6 -0
- package/module-federation/index.js.map +1 -0
- package/package.json +15 -7
- package/scripts/nx-cli-warning.js +1 -1
- package/src/builders/webpack-browser/schema.json +3 -2
- package/src/builders/webpack-browser/webpack-browser.impl.js +5 -5
- package/src/builders/webpack-browser/webpack-browser.impl.js.map +1 -1
- package/src/builders/webpack-server/lib/index.js +1 -1
- package/src/builders/webpack-server/lib/index.js.map +1 -1
- package/src/builders/webpack-server/schema.json +3 -2
- package/src/builders/webpack-server/webpack-server.impl.js +2 -3
- package/src/builders/webpack-server/webpack-server.impl.js.map +1 -1
- package/src/executors/delegate-build/delegate-build.impl.js +6 -6
- package/src/executors/delegate-build/delegate-build.impl.js.map +1 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.transform.js +1 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/entry-point.transform.js +2 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-package.transform.js +2 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ngc/compile-source-files.js +1 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/styles/stylesheet-processor.js +3 -3
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ts/cache-compiler-host.js +2 -2
- package/src/executors/ng-packagr-lite/ng-packagr-lite.impl.js +1 -1
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.transform.js +1 -1
- package/src/executors/package/ng-packagr-adjustments/ngc/compile-source-files.js +1 -1
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.js +3 -3
- package/src/executors/package/ng-packagr-adjustments/ts/cache-compiler-host.js +2 -2
- package/src/executors/package/package.impl.js +9 -9
- package/src/executors/package/package.impl.js.map +1 -1
- package/src/executors/utilities/tailwindcss.js +3 -3
- package/src/executors/utilities/tailwindcss.js.map +1 -1
- package/src/generators/add-linting/add-linting.js +1 -1
- package/src/generators/application/application.js +1 -1
- package/src/generators/application/lib/add-e2e.js +1 -1
- package/src/generators/application/lib/add-linting.js +1 -1
- package/src/generators/application/lib/add-mfe.js +1 -1
- package/src/generators/application/lib/add-protractor.js +1 -1
- package/src/generators/application/lib/add-unit-test-runner.js +1 -1
- package/src/generators/application/lib/index.js +20 -20
- package/src/generators/application/lib/index.js.map +1 -1
- package/src/generators/application/lib/update-config-files.js +1 -1
- package/src/generators/application/lib/update-config-files.js.map +1 -1
- package/src/generators/component/component.js +1 -1
- package/src/generators/convert-to-with-mf/convert-to-with-mf.compat.d.ts +2 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.compat.js +6 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.compat.js.map +1 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.d.ts +3 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.js +32 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.js.map +1 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.test-data.d.ts +5 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.test-data.js +449 -0
- package/src/generators/convert-to-with-mf/convert-to-with-mf.test-data.js.map +1 -0
- package/src/generators/convert-to-with-mf/lib/check-name-matches.d.ts +2 -0
- package/src/generators/convert-to-with-mf/lib/check-name-matches.js +24 -0
- package/src/generators/convert-to-with-mf/lib/check-name-matches.js.map +1 -0
- package/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.d.ts +2 -0
- package/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.js +49 -0
- package/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.js.map +1 -0
- package/src/generators/convert-to-with-mf/lib/get-webpack-config-path.d.ts +2 -0
- package/src/generators/convert-to-with-mf/lib/get-webpack-config-path.js +20 -0
- package/src/generators/convert-to-with-mf/lib/get-webpack-config-path.js.map +1 -0
- package/src/generators/convert-to-with-mf/lib/index.d.ts +6 -0
- package/src/generators/convert-to-with-mf/lib/index.js +10 -0
- package/src/generators/convert-to-with-mf/lib/index.js.map +1 -0
- package/src/generators/convert-to-with-mf/lib/is-host-remote-config.d.ts +5 -0
- package/src/generators/convert-to-with-mf/lib/is-host-remote-config.js +63 -0
- package/src/generators/convert-to-with-mf/lib/is-host-remote-config.js.map +1 -0
- package/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.d.ts +2 -0
- package/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.js +13 -0
- package/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.js.map +1 -0
- package/src/generators/convert-to-with-mf/lib/write-new-webpack-config.d.ts +3 -0
- package/src/generators/convert-to-with-mf/lib/write-new-webpack-config.js +48 -0
- package/src/generators/convert-to-with-mf/lib/write-new-webpack-config.js.map +1 -0
- package/src/generators/convert-to-with-mf/schema.d.ts +3 -0
- package/src/generators/convert-to-with-mf/schema.json +20 -0
- package/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.js +4 -4
- package/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.js.map +1 -1
- package/src/generators/downgrade-module/downgrade-module.js +1 -1
- package/src/generators/downgrade-module/lib/index.js +4 -4
- package/src/generators/downgrade-module/lib/index.js.map +1 -1
- package/src/generators/init/init.js +1 -1
- package/src/generators/karma-project/karma-project.js +1 -1
- package/src/generators/library/lib/update-project.js +2 -2
- package/src/generators/library/lib/update-project.js.map +1 -1
- package/src/generators/library/library.js +3 -3
- package/src/generators/library-secondary-entry-point/lib/index.js +4 -4
- package/src/generators/library-secondary-entry-point/lib/index.js.map +1 -1
- package/src/generators/library-secondary-entry-point/library-secondary-entry-point.js +1 -1
- package/src/generators/mfe-host/mfe-host.js +1 -1
- package/src/generators/mfe-host/schema.json +1 -1
- package/src/generators/mfe-remote/mfe-remote.js +15 -2
- package/src/generators/mfe-remote/mfe-remote.js.map +1 -1
- package/src/generators/mfe-remote/schema.json +1 -1
- package/src/generators/move/lib/update-ng-package.js +2 -2
- package/src/generators/move/lib/update-ng-package.js.map +1 -1
- package/src/generators/move/move.js +1 -1
- package/src/generators/ng-add/files/decorate-angular-cli/decorate-angular-cli.js__tmpl__ +1 -1
- package/src/generators/ng-add/files/root/nx.json__tmpl__ +1 -1
- package/src/generators/ng-add/migrate-from-angular-cli.js +4 -10
- package/src/generators/ng-add/migrate-from-angular-cli.js.map +1 -1
- package/src/generators/ng-add/ng-add.js +1 -1
- package/src/generators/ngrx/ngrx.js +1 -1
- package/src/generators/scam/scam.js +2 -2
- package/src/generators/scam/scam.js.map +1 -1
- package/src/generators/scam-directive/scam-directive.js +2 -2
- package/src/generators/scam-directive/scam-directive.js.map +1 -1
- package/src/generators/scam-pipe/scam-pipe.js +2 -2
- package/src/generators/scam-pipe/scam-pipe.js.map +1 -1
- package/src/generators/setup-mfe/files/webpack/webpack.config.js__tmpl__ +8 -59
- package/src/generators/setup-mfe/lib/add-remote-to-host.d.ts +1 -0
- package/src/generators/setup-mfe/lib/add-remote-to-host.js +15 -6
- package/src/generators/setup-mfe/lib/add-remote-to-host.js.map +1 -1
- package/src/generators/setup-mfe/lib/generate-config.js +1 -12
- package/src/generators/setup-mfe/lib/generate-config.js.map +1 -1
- package/src/generators/setup-mfe/lib/index.js +10 -10
- package/src/generators/setup-mfe/lib/index.js.map +1 -1
- package/src/generators/setup-mfe/setup-mfe.d.ts +2 -2
- package/src/generators/setup-mfe/setup-mfe.js +1 -10
- package/src/generators/setup-mfe/setup-mfe.js.map +1 -1
- package/src/generators/setup-tailwind/lib/index.js +6 -6
- package/src/generators/setup-tailwind/lib/index.js.map +1 -1
- package/src/generators/setup-tailwind/setup-tailwind.js +1 -1
- package/src/generators/storybook-configuration/lib/generate-storybook-configuration.js +1 -1
- package/src/generators/storybook-configuration/storybook-configuration.js +1 -1
- package/src/generators/storybook-migrate-stories-to-6-2/migrate-stories-to-6-2.js +1 -1
- package/src/generators/upgrade-module/lib/index.js +4 -4
- package/src/generators/upgrade-module/lib/index.js.map +1 -1
- package/src/generators/upgrade-module/upgrade-module.js +1 -1
- package/src/generators/utils/index.js +1 -1
- package/src/generators/utils/index.js.map +1 -1
- package/src/generators/utils/testing.js +1 -1
- package/src/generators/web-worker/lib/index.js +2 -2
- package/src/generators/web-worker/lib/index.js.map +1 -1
- package/src/generators/web-worker/web-worker.js +2 -2
- package/src/generators/web-worker/web-worker.js.map +1 -1
- package/src/migrations/update-10-3-0/update-10-3-0.js +1 -1
- package/src/migrations/update-10-4-0/update-10-4-0.js +1 -1
- package/src/migrations/update-10-5-0/add-template-support-and-presets-to-eslint.js +3 -3
- package/src/migrations/update-10-5-0/add-template-support-and-presets-to-eslint.js.map +1 -1
- package/src/migrations/update-12-3-0/convert-webpack-browser-build-target-to-delegate-build.js +3 -3
- package/src/migrations/update-12-3-0/convert-webpack-browser-build-target-to-delegate-build.js.map +1 -1
- package/src/migrations/update-12-3-0/update-angular-eslint-rules.js +1 -1
- package/src/migrations/update-12-3-0/update-storybook.js +1 -1
- package/src/migrations/update-12-3-0/update-webpack-browser-config.js +1 -1
- package/src/migrations/update-12-9-0/update-invalid-import-paths.js +1 -1
- package/src/migrations/update-13-0-0/add-postcss-packages.js +1 -1
- package/src/migrations/update-13-2-0/opt-out-testbed-teardown.js +1 -1
- package/src/migrations/update-13-2-0/update-angular-config.js +1 -1
- package/src/migrations/update-13-2-0/update-angular-jest-config.js +1 -1
- package/src/migrations/update-13-2-0/update-libraries.js +1 -1
- package/src/migrations/update-13-2-0/update-testing-imports.js +1 -1
- package/src/migrations/update-13-3-0/update-mfe-webpack-config.js +1 -1
- package/src/migrations/update-13-5-0/remove-library-generator-style-default.js +1 -1
- package/src/migrations/update-13-5-0/update-mfe-configs.js +1 -1
- package/src/migrations/update-13-8-1/add-cypress-mfe-workaround.js +1 -1
- package/src/migrations/update-13-8-4/migrate-karma-conf.js +1 -1
- package/src/migrations/update-13-9-0/set-build-libs-from-source.js +1 -1
- package/src/runtime/nx/data-persistence.js +2 -2
- package/src/runtime/nx/data-persistence.js.map +1 -1
- package/src/runtime/nx/nx.module.js +1 -1
- package/src/utils/get-mfe-projects.d.ts +3 -1
- package/src/utils/get-mfe-projects.js +5 -2
- package/src/utils/get-mfe-projects.js.map +1 -1
- package/src/utils/mfe/mfe-webpack.js +2 -3
- package/src/utils/mfe/mfe-webpack.js.map +1 -1
- package/src/utils/mfe/with-module-federation.js +8 -11
- package/src/utils/mfe/with-module-federation.js.map +1 -1
- package/src/utils/versions.d.ts +0 -1
- package/src/utils/versions.js +2 -3
- package/src/utils/versions.js.map +1 -1
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
if (path.basename(root) === 'workspace.json') {
|
|
7
7
|
const workspaceJson = JSON.parse(fs.readFileSync(root));
|
|
8
8
|
if (Object.keys(workspaceJson.projects).length === 0) {
|
|
9
|
-
const output = require('
|
|
9
|
+
const output = require('nx/src/utils/output').output;
|
|
10
10
|
output.warn({
|
|
11
11
|
title: '@nrwl/angular added to a Nx workspace powered by the Nx CLI.',
|
|
12
12
|
bodyLines: [
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
-
"title": "
|
|
4
|
-
"description": "
|
|
3
|
+
"title": "Schema for Webpack Browser",
|
|
4
|
+
"description": "The webpack-browser executor is very similar to the standard browser builder provided by the Angular Devkit. It allows you to build your Angular application to a build artifact that can be hosted online. There are some key differences: \n- Supports Custom Webpack Configurations \n- Supports Incremental Building",
|
|
5
|
+
"examplesFile": "../../../docs/webpack-browser-examples.md",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"properties": {
|
|
7
8
|
"assets": {
|
|
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const architect_1 = require("@angular-devkit/architect");
|
|
5
5
|
const build_angular_1 = require("@angular-devkit/build-angular");
|
|
6
6
|
const devkit_1 = require("@nrwl/devkit");
|
|
7
|
-
const
|
|
7
|
+
const devkit_2 = require("@nrwl/devkit");
|
|
8
8
|
const buildable_libs_utils_1 = require("@nrwl/workspace/src/utilities/buildable-libs-utils");
|
|
9
9
|
const fs_1 = require("fs");
|
|
10
10
|
const path_1 = require("path");
|
|
@@ -13,7 +13,7 @@ const operators_1 = require("rxjs/operators");
|
|
|
13
13
|
const webpack_merge_1 = require("webpack-merge");
|
|
14
14
|
const webpack_1 = require("../utilities/webpack");
|
|
15
15
|
function buildApp(options, context) {
|
|
16
|
-
const { buildLibsFromSource, customWebpackConfig } = options, delegateOptions = tslib_1.__rest(options, ["buildLibsFromSource", "customWebpackConfig"]);
|
|
16
|
+
const { buildLibsFromSource, customWebpackConfig } = options, delegateOptions = (0, tslib_1.__rest)(options, ["buildLibsFromSource", "customWebpackConfig"]);
|
|
17
17
|
// If there is a path to custom webpack config
|
|
18
18
|
// Invoke our own support for custom webpack config
|
|
19
19
|
if (customWebpackConfig && customWebpackConfig.path) {
|
|
@@ -29,7 +29,7 @@ function buildApp(options, context) {
|
|
|
29
29
|
}
|
|
30
30
|
function buildAppWithCustomWebpackConfiguration(options, context, pathToWebpackConfig) {
|
|
31
31
|
return (0, build_angular_1.executeBrowserBuilder)(options, context, {
|
|
32
|
-
webpackConfiguration: (baseWebpackConfig) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
webpackConfiguration: (baseWebpackConfig) => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
33
33
|
const customWebpackConfiguration = (0, webpack_1.resolveCustomWebpackConfig)(pathToWebpackConfig, options.tsConfig);
|
|
34
34
|
// The extra Webpack configuration file can also export a Promise, for instance:
|
|
35
35
|
// `module.exports = new Promise(...)`. If it exports a single object, but not a Promise,
|
|
@@ -38,7 +38,7 @@ function buildAppWithCustomWebpackConfiguration(options, context, pathToWebpackC
|
|
|
38
38
|
// The extra Webpack configuration file can export a synchronous or asynchronous function,
|
|
39
39
|
// for instance: `module.exports = async config => { ... }`.
|
|
40
40
|
if (typeof config === 'function') {
|
|
41
|
-
return
|
|
41
|
+
return config(baseWebpackConfig, options, context.target);
|
|
42
42
|
}
|
|
43
43
|
else {
|
|
44
44
|
return (0, webpack_merge_1.merge)(baseWebpackConfig, config);
|
|
@@ -51,7 +51,7 @@ function run(options, context) {
|
|
|
51
51
|
(_a = options.buildLibsFromSource) !== null && _a !== void 0 ? _a : (options.buildLibsFromSource = true);
|
|
52
52
|
let dependencies;
|
|
53
53
|
if (!options.buildLibsFromSource) {
|
|
54
|
-
const result = (0, buildable_libs_utils_1.calculateProjectDependencies)((0,
|
|
54
|
+
const result = (0, buildable_libs_utils_1.calculateProjectDependencies)((0, devkit_2.readCachedProjectGraph)(), context.workspaceRoot, context.target.project, context.target.target, context.target.configuration);
|
|
55
55
|
dependencies = result.dependencies;
|
|
56
56
|
options.tsConfig = (0, buildable_libs_utils_1.createTmpTsConfig)((0, path_1.join)(context.workspaceRoot, options.tsConfig), context.workspaceRoot, result.target.data.root, dependencies);
|
|
57
57
|
process.env.NX_TSCONFIG_PATH = options.tsConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack-browser.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/webpack-browser/webpack-browser.impl.ts"],"names":[],"mappings":";;;AAAA,yDAImC;AACnC,iEAAsE;AAGtE,yCAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"webpack-browser.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/webpack-browser/webpack-browser.impl.ts"],"names":[],"mappings":";;;AAAA,yDAImC;AACnC,iEAAsE;AAGtE,yCAAiD;AACjD,yCAAsD;AACtD,6FAK4D;AAC5D,2BAAgC;AAChC,+BAA4B;AAC5B,+BAAsC;AACtC,8CAA2C;AAC3C,iDAAsC;AACtC,kDAAkE;AASlE,SAAS,QAAQ,CACf,OAA6B,EAC7B,OAAuB;IAEvB,MAAM,EAAE,mBAAmB,EAAE,mBAAmB,KAC9C,OAAO,EAD4C,eAAe,uBAClE,OAAO,EADH,8CAAgE,CAC7D,CAAC;IACV,8CAA8C;IAC9C,mDAAmD;IACnD,IAAI,mBAAmB,IAAI,mBAAmB,CAAC,IAAI,EAAE;QACnD,MAAM,mBAAmB,GAAG,IAAA,0BAAiB,EAC3C,OAAO,CAAC,aAAa,EACrB,mBAAmB,CAAC,IAAI,CACzB,CAAC;QAEF,IAAI,IAAA,eAAU,EAAC,mBAAmB,CAAC,EAAE;YACnC,OAAO,sCAAsC,CAC3C,eAAe,EACf,OAAO,EACP,mBAAmB,CACpB,CAAC;SACH;aAAM;YACL,MAAM,IAAI,KAAK,CACb,0IAA0I,mBAAmB,EAAE,CAChK,CAAC;SACH;KACF;IAED,OAAO,IAAA,qCAAqB,EAA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Q,CAAC,EAC7C,OAAO,CAAC,aAAa,EACrB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EACvB,YAAY,CACb,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC;KACjD;IAED,OAAO,IAAA,SAAE,EACP,CAAC,OAAO,CAAC,mBAAmB;QAC1B,CAAC,CAAC,IAAA,0DAAmC,EACjC,OAAO,CAAC,aAAa,EACrB,OAAO,CAAC,MAAM,CAAC,OAAO,EACtB,OAAO,CAAC,MAAM,CAAC,MAAM,EACrB,YAAY,CACb;QACH,CAAC,CAAC,IAAI,CACT,CAAC,IAAI,CACJ,IAAA,qBAAS,EAAC,CAAC,MAAM,EAAE,EAAE;QACnB,IAAI,MAAM,EAAE;YACV,OAAO,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;SACnC;aAAM;YACL,0BAA0B;YAC1B,OAAO,IAAA,SAAE,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;SAC/B;IACH,CAAC,CAAC,CACH,CAAC;AACJ,CAAC;AAED,kBAAe,IAAA,yBAAa,EAAoC,GAAG,CAAQ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./normalize-options"), exports);
|
|
4
|
+
(0, tslib_1.__exportStar)(require("./normalize-options"), exports);
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/builders/webpack-server/lib/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/builders/webpack-server/lib/index.ts"],"names":[],"mappings":";;;AAAA,mEAAoC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
-
"title": "Webpack Server
|
|
4
|
-
"description": "
|
|
3
|
+
"title": "Schema for Webpack Server",
|
|
4
|
+
"description": "The webpack-server executor is very similar to the standard dev server builder provided by the Angular Devkit. It is usually used in tandem with `@nrwl/angular:webpack-browser` when your Angular application uses a custom webpack configuration.",
|
|
5
|
+
"examplesFile": "../../../docs/webpack-server-examples.md",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"properties": {
|
|
7
8
|
"browserTarget": {
|
|
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const architect_1 = require("@angular-devkit/architect");
|
|
6
6
|
const dev_server_1 = require("@angular-devkit/build-angular/src/builders/dev-server");
|
|
7
7
|
const devkit_1 = require("@nrwl/devkit");
|
|
8
|
-
const workspace_1 = require("nx/src/shared/workspace");
|
|
9
8
|
const fs_1 = require("fs");
|
|
10
9
|
const webpack_merge_1 = require("webpack-merge");
|
|
11
10
|
const webpack_1 = require("../utilities/webpack");
|
|
@@ -14,7 +13,7 @@ function webpackServer(schema, context) {
|
|
|
14
13
|
var _a;
|
|
15
14
|
process.env.NX_TSCONFIG_PATH = (0, devkit_1.joinPathFragments)(context.workspaceRoot, 'tsconfig.base.json');
|
|
16
15
|
const options = (0, lib_1.normalizeOptions)(schema);
|
|
17
|
-
const workspaceConfig = new
|
|
16
|
+
const workspaceConfig = new devkit_1.Workspaces(context.workspaceRoot).readWorkspaceConfiguration();
|
|
18
17
|
const parsedBrowserTarget = (0, devkit_1.parseTargetString)(options.browserTarget);
|
|
19
18
|
const buildTarget = workspaceConfig.projects[parsedBrowserTarget.project].targets[parsedBrowserTarget.target];
|
|
20
19
|
const selectedConfiguration = parsedBrowserTarget.configuration
|
|
@@ -27,7 +26,7 @@ function webpackServer(schema, context) {
|
|
|
27
26
|
const pathToWebpackConfig = (0, devkit_1.joinPathFragments)(context.workspaceRoot, customWebpackConfig.path);
|
|
28
27
|
if ((0, fs_1.existsSync)(pathToWebpackConfig)) {
|
|
29
28
|
return (0, dev_server_1.serveWebpackBrowser)(options, context, {
|
|
30
|
-
webpackConfiguration: (baseWebpackConfig) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
webpackConfiguration: (baseWebpackConfig) => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
31
30
|
const customWebpackConfiguration = (0, webpack_1.resolveCustomWebpackConfig)(pathToWebpackConfig, buildTarget.options.tsConfig);
|
|
32
31
|
// The extra Webpack configuration file can also export a Promise, for instance:
|
|
33
32
|
// `module.exports = new Promise(...)`. If it exports a single object, but not a Promise,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack-server.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/webpack-server/webpack-server.impl.ts"],"names":[],"mappings":";;;;AAAA,yDAA0E;AAC1E,sFAG+D;AAE/D,
|
|
1
|
+
{"version":3,"file":"webpack-server.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/builders/webpack-server/webpack-server.impl.ts"],"names":[],"mappings":";;;;AAAA,yDAA0E;AAC1E,sFAG+D;AAE/D,yCAAgF;AAChF,2BAAgC;AAChC,iDAAsC;AACtC,kDAAkE;AAClE,+BAAyC;AAGzC,SAAgB,aAAa,CAAC,MAAc,EAAE,OAAuB;;IACnE,OAAO,CAAC,GAAG,CAAC,gBAAgB,GAAG,IAAA,0BAAiB,EAC9C,OAAO,CAAC,aAAa,EACrB,oBAAoB,CACrB,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,sBAAgB,EAAC,MAAM,CAAC,CAAC;IACzC,MAAM,eAAe,GAAG,IAAI,mBAAU,CACpC,OAAO,CAAC,aAAa,CACtB,CAAC,0BAA0B,EAAE,CAAC;IAE/B,MAAM,mBAAmB,GAAG,IAAA,0BAAiB,EAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACrE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CAAC,CAAC;qBACzC;gBACH,CAAC,CAAA;aACF,CACF,CAAC;SACH;aAAM;YACL,MAAM,IAAI,KAAK,CACb,0IAA0I,mBAAmB,EAAE,CAChK,CAAC;SACH;KACF;IAED,OAAO,IAAA,gCAAmB,EACxB,OAAkC,EAClC,OAAc,CACf,CAAC;AACJ,CAAC;AAzED,sCAyEC;AAED,kBAAe,IAAA,yBAAa,EAAsB,aAAa,CAAQ,CAAC"}
|
|
@@ -3,18 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.delegateBuildExecutor = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
-
const
|
|
6
|
+
const devkit_2 = require("@nrwl/devkit");
|
|
7
7
|
const buildable_libs_utils_1 = require("@nrwl/workspace/src/utilities/buildable-libs-utils");
|
|
8
8
|
function delegateBuildExecutor(options, context) {
|
|
9
|
-
return tslib_1.__asyncGenerator(this, arguments, function* delegateBuildExecutor_1() {
|
|
10
|
-
const { target, dependencies } = (0, buildable_libs_utils_1.calculateProjectDependencies)((0,
|
|
9
|
+
return (0, tslib_1.__asyncGenerator)(this, arguments, function* delegateBuildExecutor_1() {
|
|
10
|
+
const { target, dependencies } = (0, buildable_libs_utils_1.calculateProjectDependencies)((0, devkit_2.readCachedProjectGraph)(), context.root, context.projectName, context.targetName, context.configurationName);
|
|
11
11
|
options.tsConfig = (0, buildable_libs_utils_1.createTmpTsConfig)((0, devkit_1.joinPathFragments)(context.root, options.tsConfig), context.root, target.data.root, dependencies);
|
|
12
12
|
if (!(0, buildable_libs_utils_1.checkDependentProjectsHaveBeenBuilt)(context.root, context.projectName, context.targetName, dependencies)) {
|
|
13
|
-
return yield tslib_1.__await({ success: false });
|
|
13
|
+
return yield (0, tslib_1.__await)({ success: false });
|
|
14
14
|
}
|
|
15
|
-
const { buildTarget } = options, targetOptions = tslib_1.__rest(options, ["buildTarget"]);
|
|
15
|
+
const { buildTarget } = options, targetOptions = (0, tslib_1.__rest)(options, ["buildTarget"]);
|
|
16
16
|
const delegateTarget = (0, devkit_1.parseTargetString)(buildTarget);
|
|
17
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(yield tslib_1.__await((0, devkit_1.runExecutor)(delegateTarget, targetOptions, context)))));
|
|
17
|
+
yield (0, tslib_1.__await)(yield* (0, tslib_1.__asyncDelegator)((0, tslib_1.__asyncValues)(yield (0, tslib_1.__await)((0, devkit_1.runExecutor)(delegateTarget, targetOptions, context)))));
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
exports.delegateBuildExecutor = delegateBuildExecutor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegate-build.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/delegate-build/delegate-build.impl.ts"],"names":[],"mappings":";;;;AACA,yCAIsB;AACtB,
|
|
1
|
+
{"version":3,"file":"delegate-build.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/delegate-build/delegate-build.impl.ts"],"names":[],"mappings":";;;;AACA,yCAIsB;AACtB,yCAAsD;AACtD,6FAI4D;AAG5D,SAAuB,qBAAqB,CAC1C,OAAoC,EACpC,OAAwB;;QAExB,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,mDAA4B,EAC3D,IAAA,+BAAsB,GAAE,EACxB,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,WAAW,EACnB,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,iBAAiB,CAC1B,CAAC;QAEF,OAAO,CAAC,QAAQ,GAAG,IAAA,wCAAiB,EAClC,IAAA,0BAAiB,EAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,EACjD,OAAO,CAAC,IAAI,EACZ,MAAM,CAAC,IAAI,CAAC,IAAI,EAChB,YAAY,CACb,CAAC;QAEF,IACE,CAAC,IAAA,0DAAmC,EAClC,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,WAAW,EACnB,OAAO,CAAC,UAAU,EAClB,YAAY,CACb,EACD;YACA,kCAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAC;SAC3B;QAED,MAAM,EAAE,WAAW,KAAuB,OAAO,EAAzB,aAAa,uBAAK,OAAO,EAA3C,eAAiC,CAAU,CAAC;QAClD,MAAM,cAAc,GAAG,IAAA,0BAAiB,EAAC,WAAW,CAAC,CAAC;QAEtD,2BAAA,KAAK,CAAC,CAAC,8BAAA,2BAAA,2BAAM,IAAA,oBAAW,EAAC,cAAc,EAAE,aAAa,EAAE,OAAO,CAAC,CAAA,CAAA,CAAA,CAAA,CAAC;IACnE,CAAC;CAAA;AAlCD,sDAkCC;AAED,kBAAe,qBAAqB,CAAC"}
|
|
@@ -16,7 +16,7 @@ const path = require("path");
|
|
|
16
16
|
const ts = require("typescript");
|
|
17
17
|
const compile_source_files_1 = require("../../ngc/compile-source-files");
|
|
18
18
|
const nxCompileNgcTransformFactory = (StylesheetProcessor, options) => {
|
|
19
|
-
return (0, transform_1.transformFromPromise)((graph) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
19
|
+
return (0, transform_1.transformFromPromise)((graph) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
|
20
20
|
var _a;
|
|
21
21
|
var _b;
|
|
22
22
|
try {
|
|
@@ -36,7 +36,7 @@ const rxjs_1 = require("rxjs");
|
|
|
36
36
|
* @param compileTs Transformation compiling typescript sources to ES2020 modules.
|
|
37
37
|
* @param writePackage Transformation writing a distribution-ready `package.json` (for publishing to npm registry).
|
|
38
38
|
*/
|
|
39
|
-
const nxEntryPointTransformFactory = (compileTs, writePackage) => (0, rxjs_1.pipe)((0, transform_1.transformFromPromise)((graph) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
39
|
+
const nxEntryPointTransformFactory = (compileTs, writePackage) => (0, rxjs_1.pipe)((0, transform_1.transformFromPromise)((graph) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
|
40
40
|
// Peek the first entry point from the graph
|
|
41
41
|
const entryPoint = graph.find((0, nodes_1.byEntryPoint)().and(select_1.isInProgress));
|
|
42
42
|
devkit_1.logger.info('\n------------------------------------------------------------------------------');
|
|
@@ -46,7 +46,7 @@ const nxEntryPointTransformFactory = (compileTs, writePackage) => (0, rxjs_1.pip
|
|
|
46
46
|
// TypeScript sources compilation
|
|
47
47
|
compileTs,
|
|
48
48
|
// After TypeScript: write package
|
|
49
|
-
writePackage, (0, transform_1.transformFromPromise)((graph) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
49
|
+
writePackage, (0, transform_1.transformFromPromise)((graph) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
|
50
50
|
const entryPoint = graph.find((0, nodes_1.byEntryPoint)().and(select_1.isInProgress));
|
|
51
51
|
entryPoint.state = node_1.STATE_DONE;
|
|
52
52
|
})));
|
|
@@ -17,7 +17,7 @@ const fs_1 = require("ng-packagr/lib/utils/fs");
|
|
|
17
17
|
const glob_1 = require("ng-packagr/lib/utils/glob");
|
|
18
18
|
const path_1 = require("ng-packagr/lib/utils/path");
|
|
19
19
|
const path = require("path");
|
|
20
|
-
const nxWritePackageTransform = (options) => (0, transform_1.transformFromPromise)((graph) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
+
const nxWritePackageTransform = (options) => (0, transform_1.transformFromPromise)((graph) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
|
21
21
|
var _a;
|
|
22
22
|
const entryPoint = graph.find((0, nodes_1.isEntryPointInProgress)());
|
|
23
23
|
const ngEntryPoint = entryPoint.data.entryPoint;
|
|
@@ -113,7 +113,7 @@ exports.nxWritePackageTransform = nxWritePackageTransform;
|
|
|
113
113
|
*/
|
|
114
114
|
function writePackageJson(entryPoint, pkg, additionalProperties, isWatchMode) {
|
|
115
115
|
var _a, _b, _c;
|
|
116
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
116
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
117
117
|
// set additional properties
|
|
118
118
|
const packageJson = Object.assign(Object.assign({}, entryPoint.packageJson), additionalProperties);
|
|
119
119
|
// read tslib version from `@angular/compiler` so that our tslib
|
|
@@ -17,7 +17,7 @@ const ng_compiler_cli_1 = require("ng-packagr/lib/utils/ng-compiler-cli");
|
|
|
17
17
|
const ts = require("typescript");
|
|
18
18
|
const cache_compiler_host_2 = require("../ts/cache-compiler-host");
|
|
19
19
|
function compileSourceFiles(graph, tsConfig, moduleResolutionCache, extraOptions, stylesheetProcessor, ngccProcessor, watch) {
|
|
20
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
21
21
|
const { NgtscProgram, formatDiagnostics } = yield (0, ng_compiler_cli_1.ngCompilerCli)();
|
|
22
22
|
const tsConfigOptions = Object.assign(Object.assign({}, tsConfig.options), extraOptions);
|
|
23
23
|
const entryPoint = graph.find((0, nodes_1.isEntryPointInProgress)());
|
|
@@ -71,7 +71,7 @@ class StylesheetProcessor {
|
|
|
71
71
|
this.postCssProcessor = this.createPostCssPlugins();
|
|
72
72
|
}
|
|
73
73
|
process({ filePath, content, }) {
|
|
74
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
75
75
|
let key;
|
|
76
76
|
if (this.cacheDirectory &&
|
|
77
77
|
!content.includes('@import') &&
|
|
@@ -138,7 +138,7 @@ class StylesheetProcessor {
|
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
getCachedResult(key) {
|
|
141
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
142
142
|
const cachedResult = yield (0, cache_1.readCacheEntry)(this.cacheDirectory, key);
|
|
143
143
|
if (cachedResult) {
|
|
144
144
|
cachedResult.warnings.forEach((msg) => log.warn(msg));
|
|
@@ -166,7 +166,7 @@ class StylesheetProcessor {
|
|
|
166
166
|
return postcss(postCssPlugins);
|
|
167
167
|
}
|
|
168
168
|
renderCss(filePath, css) {
|
|
169
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
169
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
170
170
|
const ext = (0, path_1.extname)(filePath);
|
|
171
171
|
switch (ext) {
|
|
172
172
|
case '.sass':
|
|
@@ -80,7 +80,7 @@ function cacheCompilerHost(graph, entryPoint, compilerOptions, moduleResolutionC
|
|
|
80
80
|
const resourceNode = getNode(resourcePath);
|
|
81
81
|
containingNode.dependsOn(resourceNode);
|
|
82
82
|
return resourcePath;
|
|
83
|
-
}, readResource: (fileName) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
}, readResource: (fileName) => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
84
84
|
addDependee(fileName);
|
|
85
85
|
const cache = sourcesFileCache.getOrCreate(fileName);
|
|
86
86
|
if (cache.content === undefined) {
|
|
@@ -101,7 +101,7 @@ function cacheCompilerHost(graph, entryPoint, compilerOptions, moduleResolutionC
|
|
|
101
101
|
cache.exists = true;
|
|
102
102
|
}
|
|
103
103
|
return cache.content;
|
|
104
|
-
}), transformResource: (data, context) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
}), transformResource: (data, context) => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
105
105
|
if (context.resourceFile || context.type !== 'style') {
|
|
106
106
|
return null;
|
|
107
107
|
}
|
|
@@ -10,7 +10,7 @@ const entry_point_di_1 = require("./ng-packagr-adjustments/ng-package/entry-poin
|
|
|
10
10
|
const options_di_1 = require("./ng-packagr-adjustments/ng-package/options.di");
|
|
11
11
|
const package_di_1 = require("./ng-packagr-adjustments/ng-package/package.di");
|
|
12
12
|
function initializeNgPackgrLite(options, context, projectDependencies) {
|
|
13
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
13
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
14
14
|
const packager = new ng_packagr_1.NgPackagr([
|
|
15
15
|
// Add default providers to this list.
|
|
16
16
|
...package_di_1.NX_PACKAGE_PROVIDERS,
|
package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.transform.js
CHANGED
|
@@ -18,7 +18,7 @@ const path = require("path");
|
|
|
18
18
|
const ts = require("typescript");
|
|
19
19
|
const compile_source_files_1 = require("../../ngc/compile-source-files");
|
|
20
20
|
const compileNgcTransformFactory = (StylesheetProcessor, options) => {
|
|
21
|
-
return (0, transform_1.transformFromPromise)((graph) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
return (0, transform_1.transformFromPromise)((graph) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
|
22
22
|
var _a;
|
|
23
23
|
var _b;
|
|
24
24
|
const spinner = ora({
|
|
@@ -15,7 +15,7 @@ const ng_compiler_cli_1 = require("ng-packagr/lib/utils/ng-compiler-cli");
|
|
|
15
15
|
const ts = require("typescript");
|
|
16
16
|
const cache_compiler_host_1 = require("../ts/cache-compiler-host");
|
|
17
17
|
function compileSourceFiles(graph, tsConfig, moduleResolutionCache, extraOptions, stylesheetProcessor, ngccProcessor, watch) {
|
|
18
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
19
19
|
const { NgtscProgram, formatDiagnostics } = yield (0, ng_compiler_cli_1.ngCompilerCli)();
|
|
20
20
|
const tsConfigOptions = Object.assign(Object.assign({}, tsConfig.options), extraOptions);
|
|
21
21
|
const entryPoint = graph.find((0, nodes_1.isEntryPointInProgress)());
|
|
@@ -71,7 +71,7 @@ class StylesheetProcessor {
|
|
|
71
71
|
this.postCssProcessor = this.createPostCssPlugins();
|
|
72
72
|
}
|
|
73
73
|
process({ filePath, content, }) {
|
|
74
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
75
75
|
let key;
|
|
76
76
|
if (this.cacheDirectory &&
|
|
77
77
|
!content.includes('@import') &&
|
|
@@ -138,7 +138,7 @@ class StylesheetProcessor {
|
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
getCachedResult(key) {
|
|
141
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
142
142
|
const cachedResult = yield (0, cache_1.readCacheEntry)(this.cacheDirectory, key);
|
|
143
143
|
if (cachedResult) {
|
|
144
144
|
cachedResult.warnings.forEach((msg) => log.warn(msg));
|
|
@@ -166,7 +166,7 @@ class StylesheetProcessor {
|
|
|
166
166
|
return postcss(postCssPlugins);
|
|
167
167
|
}
|
|
168
168
|
renderCss(filePath, css) {
|
|
169
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
169
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
170
170
|
const ext = (0, path_1.extname)(filePath);
|
|
171
171
|
switch (ext) {
|
|
172
172
|
case '.sass':
|
|
@@ -80,7 +80,7 @@ function cacheCompilerHost(graph, entryPoint, compilerOptions, moduleResolutionC
|
|
|
80
80
|
const resourceNode = getNode(resourcePath);
|
|
81
81
|
containingNode.dependsOn(resourceNode);
|
|
82
82
|
return resourcePath;
|
|
83
|
-
}, readResource: (fileName) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
}, readResource: (fileName) => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
84
84
|
addDependee(fileName);
|
|
85
85
|
const cache = sourcesFileCache.getOrCreate(fileName);
|
|
86
86
|
if (cache.content === undefined) {
|
|
@@ -101,7 +101,7 @@ function cacheCompilerHost(graph, entryPoint, compilerOptions, moduleResolutionC
|
|
|
101
101
|
cache.exists = true;
|
|
102
102
|
}
|
|
103
103
|
return cache.content;
|
|
104
|
-
}), transformResource: (data, context) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
}), transformResource: (data, context) => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
105
105
|
if (context.resourceFile || context.type !== 'style') {
|
|
106
106
|
return null;
|
|
107
107
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.packageExecutor = exports.createLibraryExecutor = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
const buildable_libs_utils_1 = require("@nrwl/workspace/src/utilities/buildable-libs-utils");
|
|
7
7
|
const path_1 = require("path");
|
|
8
8
|
const rxjs_1 = require("rxjs");
|
|
@@ -12,7 +12,7 @@ const entry_point_di_1 = require("./ng-packagr-adjustments/ng-package/entry-poin
|
|
|
12
12
|
const options_di_1 = require("./ng-packagr-adjustments/ng-package/options.di");
|
|
13
13
|
const package_di_1 = require("./ng-packagr-adjustments/ng-package/package.di");
|
|
14
14
|
function initializeNgPackagr(options, context, projectDependencies) {
|
|
15
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
16
16
|
const packager = new (yield Promise.resolve().then(() => require('ng-packagr'))).NgPackagr([
|
|
17
17
|
...package_di_1.NX_PACKAGE_PROVIDERS,
|
|
18
18
|
...entry_point_di_1.NX_ENTRY_POINT_PROVIDERS,
|
|
@@ -37,21 +37,21 @@ function initializeNgPackagr(options, context, projectDependencies) {
|
|
|
37
37
|
*/
|
|
38
38
|
function createLibraryExecutor(initializeNgPackagr) {
|
|
39
39
|
return function (options, context) {
|
|
40
|
-
return tslib_1.__asyncGenerator(this, arguments, function* () {
|
|
41
|
-
const { target, dependencies } = (0, buildable_libs_utils_1.calculateProjectDependencies)((0,
|
|
40
|
+
return (0, tslib_1.__asyncGenerator)(this, arguments, function* () {
|
|
41
|
+
const { target, dependencies, topLevelDependencies } = (0, buildable_libs_utils_1.calculateProjectDependencies)((0, devkit_1.readCachedProjectGraph)(), context.root, context.projectName, context.targetName, context.configurationName);
|
|
42
42
|
if (!(0, buildable_libs_utils_1.checkDependentProjectsHaveBeenBuilt)(context.root, context.projectName, context.targetName, dependencies)) {
|
|
43
|
-
return yield tslib_1.__await(Promise.resolve({ success: false }));
|
|
43
|
+
return yield (0, tslib_1.__await)(Promise.resolve({ success: false }));
|
|
44
44
|
}
|
|
45
45
|
function updatePackageJson() {
|
|
46
|
-
if (
|
|
46
|
+
if (topLevelDependencies.length > 0 &&
|
|
47
47
|
options.updateBuildableProjectDepsInPackageJson) {
|
|
48
|
-
(0, buildable_libs_utils_1.updateBuildableProjectPackageJsonDependencies)(context.root, context.projectName, context.targetName, context.configurationName, target,
|
|
48
|
+
(0, buildable_libs_utils_1.updateBuildableProjectPackageJsonDependencies)(context.root, context.projectName, context.targetName, context.configurationName, target, topLevelDependencies, options.buildableProjectDepsInPackageJsonType);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
if (options.watch) {
|
|
52
|
-
return yield tslib_1.__await(yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues((0, rxjs_for_await_1.eachValueFrom)((0, rxjs_1.from)(initializeNgPackagr(options, context, dependencies)).pipe((0, operators_1.switchMap)((packagr) => packagr.watch()), (0, operators_1.tap)(() => updatePackageJson()), (0, operators_1.mapTo)({ success: true })))))));
|
|
52
|
+
return yield (0, tslib_1.__await)(yield (0, tslib_1.__await)(yield* (0, tslib_1.__asyncDelegator)((0, tslib_1.__asyncValues)((0, rxjs_for_await_1.eachValueFrom)((0, rxjs_1.from)(initializeNgPackagr(options, context, dependencies)).pipe((0, operators_1.switchMap)((packagr) => packagr.watch()), (0, operators_1.tap)(() => updatePackageJson()), (0, operators_1.mapTo)({ success: true })))))));
|
|
53
53
|
}
|
|
54
|
-
return yield tslib_1.__await((0, rxjs_1.from)(initializeNgPackagr(options, context, dependencies))
|
|
54
|
+
return yield (0, tslib_1.__await)((0, rxjs_1.from)(initializeNgPackagr(options, context, dependencies))
|
|
55
55
|
.pipe((0, operators_1.switchMap)((packagr) => packagr.build()), (0, operators_1.tap)(() => updatePackageJson()), (0, operators_1.mapTo)({ success: true }))
|
|
56
56
|
.toPromise());
|
|
57
57
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/package/package.impl.ts"],"names":[],"mappings":";;;;AACA,
|
|
1
|
+
{"version":3,"file":"package.impl.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/package/package.impl.ts"],"names":[],"mappings":";;;;AACA,yCAAsD;AACtD,6FAM4D;AAE5D,+BAA+B;AAC/B,+BAA4B;AAC5B,mDAA+C;AAC/C,8CAAuD;AACvD,mGAA0G;AAC1G,+EAAkF;AAClF,+EAGwD;AAGxD,SAAe,mBAAmB,CAChC,OAA2C,EAC3C,OAAwB,EACxB,mBAAoD;;QAEpD,MAAM,QAAQ,GAAG,IAAI,CAAC,2CAAa,YAAY,EAAC,CAAC,CAAC,SAAS,CAAC;YAC1D,GAAG,iCAAoB;YACvB,GAAG,yCAAwB;YAC3B,IAAA,6BAAgB,EAAC;gBACf,cAAc,EAAE,OAAO,CAAC,cAAc;gBACtC,KAAK,EAAE,OAAO,CAAC,KAAK;aACrB,CAAC;SACH,CAAC,CAAC;QAEH,QAAQ,CAAC,UAAU,CAAC,IAAA,cAAO,EAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5D,QAAQ,CAAC,kBAAkB,CAAC,iCAAoB,CAAC,OAAO,CAAC,CAAC;QA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AA,IAAA,8BAAa,EACzB,IAAA,WAAI,EAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,IAAI,CAC5D,IAAA,qBAAS,EAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,EACvC,IAAA,eAAG,EAAC,GAAG,EAAE,CAAC,iBAAiB,EAAE,CAAC,EAC9B,IAAA,iBAAK,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CACzB,CACF,CAAA,CAAA,CAAA,EAAC;aACH;YAED,kCAAO,IAAA,WAAI,EAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;iBAC7D,IAAI,CACH,IAAA,qBAAS,EAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,EACvC,IAAA,eAAG,EAAC,GAAG,EAAE,CAAC,iBAAiB,EAAE,CAAC,EAC9B,IAAA,iBAAK,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CACzB;iBACA,SAAS,EAAE,EAAC;QACjB,CAAC;KAAA,CAAC;AACJ,CAAC;AAjED,sDAiEC;AAEY,QAAA,eAAe,GAAG,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;AAE1E,kBAAe,uBAAe,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getTailwindPostCssPlugins = exports.getTailwindSetup = exports.tailwindDirectives = void 0;
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
-
const
|
|
5
|
+
const devkit_2 = require("@nrwl/devkit");
|
|
6
6
|
const fs_1 = require("fs");
|
|
7
7
|
const path_1 = require("path");
|
|
8
8
|
const postcssImport = require("postcss-import");
|
|
@@ -19,7 +19,7 @@ function getTailwindSetup(basePath, tailwindConfig) {
|
|
|
19
19
|
if (!tailwindConfigPath) {
|
|
20
20
|
// Try to find TailwindCSS configuration file in the project or workspace root.
|
|
21
21
|
const tailwindConfigFile = 'tailwind.config.js';
|
|
22
|
-
for (const path of [basePath,
|
|
22
|
+
for (const path of [basePath, devkit_2.appRootPath]) {
|
|
23
23
|
const fullPath = (0, path_1.join)(path, tailwindConfigFile);
|
|
24
24
|
if ((0, fs_1.existsSync)(fullPath)) {
|
|
25
25
|
tailwindConfigPath = fullPath;
|
|
@@ -36,7 +36,7 @@ function getTailwindSetup(basePath, tailwindConfig) {
|
|
|
36
36
|
tailwindPackagePath = require.resolve('tailwindcss');
|
|
37
37
|
}
|
|
38
38
|
catch (_a) {
|
|
39
|
-
const relativeTailwindConfigPath = (0, path_1.relative)(
|
|
39
|
+
const relativeTailwindConfigPath = (0, path_1.relative)(devkit_2.appRootPath, tailwindConfigPath);
|
|
40
40
|
devkit_1.logger.warn(`Tailwind CSS configuration file found (${relativeTailwindConfigPath})` +
|
|
41
41
|
` but the 'tailwindcss' package is not installed.` +
|
|
42
42
|
` To enable Tailwind CSS, please install the 'tailwindcss' package.`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwindcss.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/utilities/tailwindcss.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"tailwindcss.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/utilities/tailwindcss.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,yCAA2C;AAC3C,2BAAgC;AAChC,+BAAsC;AACtC,gDAAgD;AAOnC,QAAA,kBAAkB,GAAG;IAChC,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,aAAa;IACb,SAAS;CACV,CAAC;AAEF,SAAgB,gBAAgB,CAC9B,QAAgB,EAChB,cAAuB;IAEvB,IAAI,kBAAkB,GAAG,cAAc,CAAC;IAExC,IAAI,CAAC,kBAAkB,EAAE;QACvB,+EA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,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;SACzE,CAAC;QACF,OAAO,CAAC,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;KAC7D,CAAC;AACJ,CAAC;AAhBD,8DAgBC"}
|
|
@@ -8,7 +8,7 @@ const add_angular_eslint_dependencies_1 = require("./lib/add-angular-eslint-depe
|
|
|
8
8
|
const add_project_lint_target_1 = require("./lib/add-project-lint-target");
|
|
9
9
|
const create_eslint_configuration_1 = require("./lib/create-eslint-configuration");
|
|
10
10
|
function addLintingGenerator(tree, options) {
|
|
11
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
11
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
12
12
|
const installTask = (0, linter_1.lintInitGenerator)(tree, {
|
|
13
13
|
linter: linter_1.Linter.EsLint,
|
|
14
14
|
skipPackageJson: options.skipPackageJson,
|
|
@@ -9,7 +9,7 @@ const init_1 = require("../init/init");
|
|
|
9
9
|
const setup_tailwind_1 = require("../setup-tailwind/setup-tailwind");
|
|
10
10
|
const lib_1 = require("./lib");
|
|
11
11
|
function applicationGenerator(host, schema) {
|
|
12
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
13
13
|
const options = (0, lib_1.normalizeOptions)(host, schema);
|
|
14
14
|
yield (0, init_1.angularInitGenerator)(host, Object.assign(Object.assign({}, options), { skipFormat: true }));
|
|
15
15
|
const angularAppSchematic = (0, ngcli_adapter_1.wrapAngularDevkitSchematic)('@schematics/angular', 'application');
|
|
@@ -11,7 +11,7 @@ const linter_1 = require("@nrwl/linter");
|
|
|
11
11
|
const devkit_1 = require("@nrwl/devkit");
|
|
12
12
|
function addE2e(tree, options) {
|
|
13
13
|
var _a;
|
|
14
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
14
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
15
15
|
if (options.e2eTestRunner === "protractor" /* Protractor */) {
|
|
16
16
|
yield (0, add_protractor_1.addProtractor)(tree, options);
|
|
17
17
|
}
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const linter_1 = require("@nrwl/linter");
|
|
6
6
|
const add_linting_1 = require("../../add-linting/add-linting");
|
|
7
7
|
function addLinting(host, options) {
|
|
8
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
9
9
|
if (options.linter === linter_1.Linter.None) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
@@ -4,7 +4,7 @@ exports.addMfe = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const setup_mfe_1 = require("../../setup-mfe/setup-mfe");
|
|
6
6
|
function addMfe(host, options) {
|
|
7
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
7
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
8
8
|
yield (0, setup_mfe_1.setupMfe)(host, {
|
|
9
9
|
appName: options.name,
|
|
10
10
|
mfeType: options.mfeType,
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const devkit_1 = require("@nrwl/devkit");
|
|
6
6
|
const ngcli_adapter_1 = require("@nrwl/devkit/ngcli-adapter");
|
|
7
7
|
function addProtractor(host, options) {
|
|
8
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
9
9
|
const protractorSchematic = (0, ngcli_adapter_1.wrapAngularDevkitSchematic)('@schematics/angular', 'e2e');
|
|
10
10
|
yield protractorSchematic(host, {
|
|
11
11
|
relatedAppName: options.name,
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const jest_1 = require("@nrwl/jest");
|
|
6
6
|
const karma_project_1 = require("../../karma-project/karma-project");
|
|
7
7
|
function addUnitTestRunner(host, options) {
|
|
8
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
9
9
|
if (options.unitTestRunner === "jest" /* Jest */) {
|
|
10
10
|
yield (0, jest_1.jestProjectGenerator)(host, {
|
|
11
11
|
project: options.name,
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./add-e2e"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./add-linting"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./add-mfe"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./add-protractor"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./add-proxy-config"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./add-unit-test-runner"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./create-files"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./enable-strict-type-checking"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./normalize-options"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./normalized-schema"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./nrwl-home-tpl"), exports);
|
|
15
|
-
tslib_1.__exportStar(require("./remove-scaffolded-e2e"), exports);
|
|
16
|
-
tslib_1.__exportStar(require("./root-router-config"), exports);
|
|
17
|
-
tslib_1.__exportStar(require("./set-app-strict-default"), exports);
|
|
18
|
-
tslib_1.__exportStar(require("./update-component-spec"), exports);
|
|
19
|
-
tslib_1.__exportStar(require("./update-app-component-template"), exports);
|
|
20
|
-
tslib_1.__exportStar(require("./update-nx-component-template"), exports);
|
|
21
|
-
tslib_1.__exportStar(require("./update-config-files"), exports);
|
|
22
|
-
tslib_1.__exportStar(require("./update-e2e-project"), exports);
|
|
23
|
-
tslib_1.__exportStar(require("./update-editor-tsconfig"), exports);
|
|
4
|
+
(0, tslib_1.__exportStar)(require("./add-e2e"), exports);
|
|
5
|
+
(0, tslib_1.__exportStar)(require("./add-linting"), exports);
|
|
6
|
+
(0, tslib_1.__exportStar)(require("./add-mfe"), exports);
|
|
7
|
+
(0, tslib_1.__exportStar)(require("./add-protractor"), exports);
|
|
8
|
+
(0, tslib_1.__exportStar)(require("./add-proxy-config"), exports);
|
|
9
|
+
(0, tslib_1.__exportStar)(require("./add-unit-test-runner"), exports);
|
|
10
|
+
(0, tslib_1.__exportStar)(require("./create-files"), exports);
|
|
11
|
+
(0, tslib_1.__exportStar)(require("./enable-strict-type-checking"), exports);
|
|
12
|
+
(0, tslib_1.__exportStar)(require("./normalize-options"), exports);
|
|
13
|
+
(0, tslib_1.__exportStar)(require("./normalized-schema"), exports);
|
|
14
|
+
(0, tslib_1.__exportStar)(require("./nrwl-home-tpl"), exports);
|
|
15
|
+
(0, tslib_1.__exportStar)(require("./remove-scaffolded-e2e"), exports);
|
|
16
|
+
(0, tslib_1.__exportStar)(require("./root-router-config"), exports);
|
|
17
|
+
(0, tslib_1.__exportStar)(require("./set-app-strict-default"), exports);
|
|
18
|
+
(0, tslib_1.__exportStar)(require("./update-component-spec"), exports);
|
|
19
|
+
(0, tslib_1.__exportStar)(require("./update-app-component-template"), exports);
|
|
20
|
+
(0, tslib_1.__exportStar)(require("./update-nx-component-template"), exports);
|
|
21
|
+
(0, tslib_1.__exportStar)(require("./update-config-files"), exports);
|
|
22
|
+
(0, tslib_1.__exportStar)(require("./update-e2e-project"), exports);
|
|
23
|
+
(0, tslib_1.__exportStar)(require("./update-editor-tsconfig"), exports);
|
|
24
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/index.ts"],"names":[],"mappings":";;;AAAA,yDAA0B;AAC1B,6DAA8B;AAC9B,yDAA0B;AAC1B,gEAAiC;AACjC,kEAAmC;AACnC,sEAAuC;AACvC,8DAA+B;AAC/B,6EAA8C;AAC9C,mEAAoC;AACpC,mEAAoC;AACpC,+DAAgC;AAChC,uEAAwC;AACxC,oEAAqC;AACrC,wEAAyC;AACzC,uEAAwC;AACxC,+EAAgD;AAChD,8EAA+C;AAC/C,qEAAsC;AACtC,oEAAqC;AACrC,wEAAyC"}
|