@nrwl/angular 13.7.2 → 13.8.1
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/generators.d.ts +4 -0
- package/generators.js +4 -0
- package/generators.js.map +1 -1
- package/generators.json +2 -2
- package/migrations.json +6 -0
- package/package.json +6 -6
- package/src/builders/webpack-browser/schema.json +6 -0
- package/src/generators/application/lib/add-mfe.js +1 -0
- package/src/generators/application/lib/add-mfe.js.map +1 -1
- package/src/generators/application/schema.json +2 -2
- package/src/generators/library/schema.json +1 -1
- package/src/generators/setup-mfe/lib/add-cypress-workaround.d.ts +3 -0
- package/src/generators/setup-mfe/lib/add-cypress-workaround.js +37 -0
- package/src/generators/setup-mfe/lib/add-cypress-workaround.js.map +1 -0
- package/src/generators/setup-mfe/lib/index.d.ts +1 -0
- package/src/generators/setup-mfe/lib/index.js +1 -0
- package/src/generators/setup-mfe/lib/index.js.map +1 -1
- package/src/generators/setup-mfe/schema.d.ts +1 -0
- package/src/generators/setup-mfe/schema.json +4 -0
- package/src/generators/setup-mfe/setup-mfe.js +1 -0
- package/src/generators/setup-mfe/setup-mfe.js.map +1 -1
- package/src/generators/setup-tailwind/schema.json +4 -4
- package/src/migrations/update-13-8-1/add-cypress-mfe-workaround.d.ts +2 -0
- package/src/migrations/update-13-8-1/add-cypress-mfe-workaround.js +38 -0
- package/src/migrations/update-13-8-1/add-cypress-mfe-workaround.js.map +1 -0
- package/src/utils/get-mfe-projects.d.ts +2 -0
- package/src/utils/get-mfe-projects.js +30 -0
- package/src/utils/get-mfe-projects.js.map +1 -0
- package/src/utils/versions.js +1 -1
package/generators.d.ts
CHANGED
|
@@ -18,3 +18,7 @@ export * from './src/generators/setup-mfe/setup-mfe';
|
|
|
18
18
|
export * from './src/generators/scam/scam';
|
|
19
19
|
export * from './src/generators/scam-directive/scam-directive';
|
|
20
20
|
export * from './src/generators/scam-pipe/scam-pipe';
|
|
21
|
+
export * from './src/generators/add-linting/add-linting';
|
|
22
|
+
export * from './src/generators/component-cypress-spec/component-cypress-spec';
|
|
23
|
+
export * from './src/generators/component-story/component-story';
|
|
24
|
+
export * from './src/generators/web-worker/web-worker';
|
package/generators.js
CHANGED
|
@@ -21,4 +21,8 @@ const tslib_1 = require("tslib");
|
|
|
21
21
|
(0, tslib_1.__exportStar)(require("./src/generators/scam/scam"), exports);
|
|
22
22
|
(0, tslib_1.__exportStar)(require("./src/generators/scam-directive/scam-directive"), exports);
|
|
23
23
|
(0, tslib_1.__exportStar)(require("./src/generators/scam-pipe/scam-pipe"), exports);
|
|
24
|
+
(0, tslib_1.__exportStar)(require("./src/generators/add-linting/add-linting"), exports);
|
|
25
|
+
(0, tslib_1.__exportStar)(require("./src/generators/component-cypress-spec/component-cypress-spec"), exports);
|
|
26
|
+
(0, tslib_1.__exportStar)(require("./src/generators/component-story/component-story"), exports);
|
|
27
|
+
(0, tslib_1.__exportStar)(require("./src/generators/web-worker/web-worker"), exports);
|
|
24
28
|
//# sourceMappingURL=generators.js.map
|
package/generators.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generators.js","sourceRoot":"","sources":["../../../packages/angular/generators.ts"],"names":[],"mappings":";;;AAAA,wFAAyD;AACzD,kHAAmF;AACnF,kGAAmE;AACnE,0EAA2C;AAC3C,4EAA6C;AAC7C,4FAA6D;AAC7D,gFAAiD;AACjD,4HAA6F;AAC7F,0EAA2C;AAC3C,0EAA2C;AAC3C,8FAA+D;AAC/D,gFAAiD;AACjD,gHAAiF;AACjF,oIAAqG;AACrG,wHAAyF;AACzF,8FAA+D;AAC/D,oFAAqD;AACrD,0EAA2C;AAC3C,8FAA+D;AAC/D,oFAAqD"}
|
|
1
|
+
{"version":3,"file":"generators.js","sourceRoot":"","sources":["../../../packages/angular/generators.ts"],"names":[],"mappings":";;;AAAA,wFAAyD;AACzD,kHAAmF;AACnF,kGAAmE;AACnE,0EAA2C;AAC3C,4EAA6C;AAC7C,4FAA6D;AAC7D,gFAAiD;AACjD,4HAA6F;AAC7F,0EAA2C;AAC3C,0EAA2C;AAC3C,8FAA+D;AAC/D,gFAAiD;AACjD,gHAAiF;AACjF,oIAAqG;AACrG,wHAAyF;AACzF,8FAA+D;AAC/D,oFAAqD;AACrD,0EAA2C;AAC3C,8FAA+D;AAC/D,oFAAqD;AACrD,wFAAyD;AACzD,8GAA+E;AAC/E,gGAAiE;AACjE,sFAAuD"}
|
package/generators.json
CHANGED
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"setup-tailwind": {
|
|
103
103
|
"factory": "./src/generators/setup-tailwind/compat",
|
|
104
104
|
"schema": "./src/generators/setup-tailwind/schema.json",
|
|
105
|
-
"description": "Configures
|
|
105
|
+
"description": "Configures Tailwind CSS for an application or a buildable/publishable library."
|
|
106
106
|
},
|
|
107
107
|
"stories": {
|
|
108
108
|
"factory": "./src/generators/stories/compat",
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
"setup-tailwind": {
|
|
236
236
|
"factory": "./src/generators/setup-tailwind/setup-tailwind",
|
|
237
237
|
"schema": "./src/generators/setup-tailwind/schema.json",
|
|
238
|
-
"description": "Configures
|
|
238
|
+
"description": "Configures Tailwind CSS for an application or a buildable/publishable library."
|
|
239
239
|
},
|
|
240
240
|
"stories": {
|
|
241
241
|
"factory": "./src/generators/stories/stories",
|
package/migrations.json
CHANGED
|
@@ -144,6 +144,12 @@
|
|
|
144
144
|
"version": "13.5.0-beta.0",
|
|
145
145
|
"description": "A lot of changes to how MFEs operate were discovered and merged without appropriate migrations. This should cover migrating existing MFEs to the latest, using ESM and optmized production bundles.",
|
|
146
146
|
"factory": "./src/migrations/update-13-5-0/update-mfe-configs"
|
|
147
|
+
},
|
|
148
|
+
"add-cypress-mfe-workaround": {
|
|
149
|
+
"cli": "nx",
|
|
150
|
+
"version": "13.8.1",
|
|
151
|
+
"description": "Angular doesn't attach styles.js to index.html with type=module in dev mode, meaning an error is written to the console. Cypress falls over on this error. Add logic to Cypress e2e projects to ignore this error.",
|
|
152
|
+
"factory": "./src/migrations/update-13-8-1/add-cypress-mfe-workaround"
|
|
147
153
|
}
|
|
148
154
|
},
|
|
149
155
|
"packageJsonUpdates": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/angular",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.8.1",
|
|
4
4
|
"description": "Angular Plugin for Nx",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@angular-devkit/schematics": "~13.2.0",
|
|
59
|
-
"@nrwl/cypress": "13.
|
|
60
|
-
"@nrwl/devkit": "13.
|
|
61
|
-
"@nrwl/jest": "13.
|
|
62
|
-
"@nrwl/linter": "13.
|
|
63
|
-
"@nrwl/storybook": "13.
|
|
59
|
+
"@nrwl/cypress": "13.8.1",
|
|
60
|
+
"@nrwl/devkit": "13.8.1",
|
|
61
|
+
"@nrwl/jest": "13.8.1",
|
|
62
|
+
"@nrwl/linter": "13.8.1",
|
|
63
|
+
"@nrwl/storybook": "13.8.1",
|
|
64
64
|
"@schematics/angular": "~13.2.0",
|
|
65
65
|
"@phenomnomnominal/tsquery": "4.1.1",
|
|
66
66
|
"ignore": "^5.0.4",
|
|
@@ -220,6 +220,12 @@
|
|
|
220
220
|
"enum": ["warning", "error", "ignore"],
|
|
221
221
|
"default": "warning"
|
|
222
222
|
},
|
|
223
|
+
"i18nDuplicateTranslation": {
|
|
224
|
+
"type": "string",
|
|
225
|
+
"description": "How to handle duplicate translations for i18n.",
|
|
226
|
+
"enum": ["warning", "error", "ignore"],
|
|
227
|
+
"default": "warning"
|
|
228
|
+
},
|
|
223
229
|
"localize": {
|
|
224
230
|
"description": "Translate the bundles in one or more locales.",
|
|
225
231
|
"oneOf": [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-mfe.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/add-mfe.ts"],"names":[],"mappings":";;;;AAGA,yDAAqD;AAErD,SAAsB,MAAM,CAAC,IAAU,EAAE,OAAyB;;QAChE,MAAM,IAAA,oBAAQ,EAAC,IAAI,EAAE;YACnB,OAAO,EAAE,OAAO,CAAC,IAAI;YACrB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,UAAU,EAAE,IAAI;YAChB,eAAe,EAAE,OAAO,CAAC,eAAe;
|
|
1
|
+
{"version":3,"file":"add-mfe.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/application/lib/add-mfe.ts"],"names":[],"mappings":";;;;AAGA,yDAAqD;AAErD,SAAsB,MAAM,CAAC,IAAU,EAAE,OAAyB;;QAChE,MAAM,IAAA,oBAAQ,EAAC,IAAI,EAAE;YACnB,OAAO,EAAE,OAAO,CAAC,IAAI;YACrB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,UAAU,EAAE,IAAI;YAChB,eAAe,EAAE,OAAO,CAAC,eAAe;YACxC,cAAc,EAAE,OAAO,CAAC,cAAc;SACvC,CAAC,CAAC;IACL,CAAC;CAAA;AAZD,wBAYC"}
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"viewEncapsulation": {
|
|
69
69
|
"description": "Specifies the view encapsulation strategy.",
|
|
70
|
-
"enum": ["Emulated", "
|
|
70
|
+
"enum": ["Emulated", "None", "ShadowDom"],
|
|
71
71
|
"type": "string"
|
|
72
72
|
},
|
|
73
73
|
"prefix": {
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
},
|
|
158
158
|
"addTailwind": {
|
|
159
159
|
"type": "boolean",
|
|
160
|
-
"description": "Whether to configure
|
|
160
|
+
"description": "Whether to configure Tailwind CSS for the application.",
|
|
161
161
|
"default": false
|
|
162
162
|
}
|
|
163
163
|
},
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
},
|
|
116
116
|
"addTailwind": {
|
|
117
117
|
"type": "boolean",
|
|
118
|
-
"description": "Whether to configure
|
|
118
|
+
"description": "Whether to configure Tailwind CSS for the application. It can only be used with buildable and publishable libraries. Non-buildable libraries will use the application's Tailwind configuration.",
|
|
119
119
|
"default": false
|
|
120
120
|
},
|
|
121
121
|
"skipModule": {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This is a temporary workaround to prevent cypress erroring
|
|
3
|
+
// as Angular attempt to figure out how to fix HMR when styles.js
|
|
4
|
+
// is attached to the index.html with type=module
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.addCypressOnErrorWorkaround = void 0;
|
|
7
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
8
|
+
function addCypressOnErrorWorkaround(tree, schema) {
|
|
9
|
+
var _a;
|
|
10
|
+
const e2eProjectName = (_a = schema.e2eProjectName) !== null && _a !== void 0 ? _a : `${schema.appName}-e2e`;
|
|
11
|
+
let e2eProject;
|
|
12
|
+
try {
|
|
13
|
+
e2eProject = (0, devkit_1.readProjectConfiguration)(tree, e2eProjectName);
|
|
14
|
+
}
|
|
15
|
+
catch (_b) {
|
|
16
|
+
devkit_1.logger.warn(`Could not find an associated e2e project for ${schema.appName} with name ${e2eProjectName}.
|
|
17
|
+
If the app does have an associated Cypress e2e project, you can pass the name of it to the generator using --e2eProjectName.`);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (e2eProject.targets.e2e.executor !== '@nrwl/cypress:cypress') {
|
|
21
|
+
// Not a cypress e2e project, skip
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const commandToAdd = `Cypress.on('uncaught:exception', err => {
|
|
25
|
+
if (err.message.includes(\`Cannot use 'import.meta' outside a module\`)) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
return true;
|
|
29
|
+
});`;
|
|
30
|
+
const pathToCommandsFile = (0, devkit_1.joinPathFragments)(e2eProject.sourceRoot, 'support/index.ts');
|
|
31
|
+
const commandsContent = tree.exists(pathToCommandsFile)
|
|
32
|
+
? tree.read(pathToCommandsFile, 'utf-8')
|
|
33
|
+
: '';
|
|
34
|
+
tree.write(pathToCommandsFile, `${commandsContent}\n${commandToAdd}`);
|
|
35
|
+
}
|
|
36
|
+
exports.addCypressOnErrorWorkaround = addCypressOnErrorWorkaround;
|
|
37
|
+
//# sourceMappingURL=add-cypress-workaround.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-cypress-workaround.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mfe/lib/add-cypress-workaround.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,iEAAiE;AACjE,iDAAiD;;;AAKjD,yCAIsB;AAEtB,SAAgB,2BAA2B,CAAC,IAAU,EAAE,MAAc;;IACpE,MAAM,cAAc,GAAG,MAAA,MAAM,CAAC,cAAc,mCAAI,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC;IACxE,IAAI,UAAgC,CAAC;IAErC,IAAI;QACF,UAAU,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;KAC7D;IAAC,WAAM;QACN,eAAM,CAAC,IAAI,CAAC,gDAAgD,MAAM,CAAC,OAAO,cAAc,cAAc;iIACuB,CAAC,CAAC;QAC/H,OAAO;KACR;IAED,IAAI,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,uBAAuB,EAAE;QAC/D,kCAAkC;QAClC,OAAO;KACR;IAED,MAAM,YAAY,GAAG;;;;;MAKjB,CAAC;IAEL,MAAM,kBAAkB,GAAG,IAAA,0BAAiB,EAC1C,UAAU,CAAC,UAAU,EACrB,kBAAkB,CACnB,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC;QACrD,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC;QACxC,CAAC,CAAC,EAAE,CAAC;IACP,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,GAAG,eAAe,KAAK,YAAY,EAAE,CAAC,CAAC;AACxE,CAAC;AAjCD,kEAiCC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
(0, tslib_1.__exportStar)(require("./add-cypress-workaround"), exports);
|
|
4
5
|
(0, tslib_1.__exportStar)(require("./add-entry-module"), exports);
|
|
5
6
|
(0, tslib_1.__exportStar)(require("./add-implicit-deps"), exports);
|
|
6
7
|
(0, tslib_1.__exportStar)(require("./add-remote-to-host"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mfe/lib/index.ts"],"names":[],"mappings":";;;AAAA,kEAAmC;AACnC,mEAAoC;AACpC,oEAAqC;AACrC,qEAAsC;AACtC,+DAAgC;AAChC,iEAAkC;AAClC,wEAAyC;AACzC,qEAAsC;AACtC,oEAAqC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/setup-mfe/lib/index.ts"],"names":[],"mappings":";;;AAAA,wEAAyC;AACzC,kEAAmC;AACnC,mEAAoC;AACpC,oEAAqC;AACrC,qEAAsC;AACtC,+DAAgC;AAChC,iEAAkC;AAClC,wEAAyC;AACzC,qEAAsC;AACtC,oEAAqC"}
|
|
@@ -45,6 +45,10 @@
|
|
|
45
45
|
"type": "boolean",
|
|
46
46
|
"default": false,
|
|
47
47
|
"description": "Do not add dependencies to `package.json`."
|
|
48
|
+
},
|
|
49
|
+
"e2eProjectName": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"description": "The project name of the associated e2e project for the application. This is only required for Cypress e2e projects that do not follow the naming convention `<appName>-e2e`."
|
|
48
52
|
}
|
|
49
53
|
},
|
|
50
54
|
"required": ["appName", "mfeType"],
|
|
@@ -17,6 +17,7 @@ function setupMfe(host, options) {
|
|
|
17
17
|
(0, lib_1.updateTsConfigTarget)(host, options);
|
|
18
18
|
(0, lib_1.setupServeTarget)(host, options);
|
|
19
19
|
(0, lib_1.fixBootstrap)(host, projectConfig.root);
|
|
20
|
+
(0, lib_1.addCypressOnErrorWorkaround)(host, options);
|
|
20
21
|
let installPackages = () => { };
|
|
21
22
|
if (!options.skipPackageJson) {
|
|
22
23
|
// add package to install
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-mfe.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/setup-mfe/setup-mfe.ts"],"names":[],"mappings":";;;;AAGA,yCAIsB;AAEtB,+
|
|
1
|
+
{"version":3,"file":"setup-mfe.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/setup-mfe/setup-mfe.ts"],"names":[],"mappings":";;;;AAGA,yCAIsB;AAEtB,+BAWe;AACf,mDAAsF;AAEtF,SAAsB,QAAQ,CAAC,IAAU,EAAE,OAAe;;QACxD,MAAM,aAAa,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAEtE,MAAM,gBAAgB,GAAG,IAAA,yBAAmB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC5D,IAAA,qBAAe,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE/B,IAAA,2BAAqB,EAAC,IAAI,EAAE,OAAO,EAAE,aAAa,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QAE3E,IAAA,oBAAc,EAAC,IAAI,EAAE,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;QAClD,IAAA,qBAAe,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC/B,IAAA,uBAAiB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACjC,IAAA,0BAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACpC,IAAA,sBAAgB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAEhC,IAAA,kBAAY,EAAC,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;QAEvC,IAAA,iCAA2B,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE3C,IAAI,eAAe,GAAsB,GAAG,EAAE,GAAE,CAAC,CAAC;QAClD,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE;YAC5B,yBAAyB;YACzB,eAAe,GAAG,IAAA,qCAA4B,EAC5C,IAAI,EACJ;gBACE,uCAAuC,EACrC,yDAA8C;aACjD,EACD,EAAE,CACH,CAAC;SACH;QAED,eAAe;QACf,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,eAAe,CAAC;IACzB,CAAC;CAAA;AArCD,4BAqCC;AAED,kBAAe,QAAQ,CAAC"}
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "NxAngularTailwindSetupGenerator",
|
|
4
4
|
"cli": "nx",
|
|
5
|
-
"title": "Configures
|
|
6
|
-
"description": "Adds the
|
|
5
|
+
"title": "Configures Tailwind CSS for an application or a buildable/publishable library.",
|
|
6
|
+
"description": "Adds the Tailwind CSS configuration files for a given Angular project and installs, if needed, the packages required for Tailwind CSS to work.",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
|
9
9
|
"project": {
|
|
10
10
|
"type": "string",
|
|
11
|
-
"description": "The name of the project to add the
|
|
11
|
+
"description": "The name of the project to add the Tailwind CSS setup for.",
|
|
12
12
|
"$default": {
|
|
13
13
|
"$source": "argv",
|
|
14
14
|
"index": 0
|
|
15
15
|
},
|
|
16
|
-
"x-prompt": "What project would you like to add the
|
|
16
|
+
"x-prompt": "What project would you like to add the Tailwind CSS setup?"
|
|
17
17
|
},
|
|
18
18
|
"buildTarget": {
|
|
19
19
|
"type": "string",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
+
const get_mfe_projects_1 = require("../../utils/get-mfe-projects");
|
|
6
|
+
function default_1(tree) {
|
|
7
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
8
|
+
const projects = (0, get_mfe_projects_1.getMfeProjects)(tree);
|
|
9
|
+
for (const project of projects) {
|
|
10
|
+
const e2eProjectName = `${project}-e2e`;
|
|
11
|
+
let e2eProject;
|
|
12
|
+
try {
|
|
13
|
+
e2eProject = (0, devkit_1.readProjectConfiguration)(tree, e2eProjectName);
|
|
14
|
+
}
|
|
15
|
+
catch (_a) {
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
if (e2eProject.targets.e2e.executor !== '@nrwl/cypress:cypress') {
|
|
19
|
+
// Not a cypress e2e project, skip
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const commandToAdd = `Cypress.on('uncaught:exception', err => {
|
|
23
|
+
if (err.message.includes(\`Cannot use 'import.meta' outside a module\`)) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
return true;
|
|
27
|
+
});`;
|
|
28
|
+
const pathToCommandsFile = (0, devkit_1.joinPathFragments)(e2eProject.sourceRoot, 'support/index.ts');
|
|
29
|
+
const commandsContent = tree.exists(pathToCommandsFile)
|
|
30
|
+
? tree.read(pathToCommandsFile, 'utf-8')
|
|
31
|
+
: '';
|
|
32
|
+
tree.write(pathToCommandsFile, `${commandsContent}\n${commandToAdd}`);
|
|
33
|
+
}
|
|
34
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
exports.default = default_1;
|
|
38
|
+
//# sourceMappingURL=add-cypress-mfe-workaround.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-cypress-mfe-workaround.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/migrations/update-13-8-1/add-cypress-mfe-workaround.ts"],"names":[],"mappings":";;;AACA,yCAIsB;AACtB,mEAA8D;AAE9D,mBAA+B,IAAU;;QACvC,MAAM,QAAQ,GAAG,IAAA,iCAAc,EAAC,IAAI,CAAC,CAAC;QAEtC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;YAC9B,MAAM,cAAc,GAAG,GAAG,OAAO,MAAM,CAAC;YACxC,IAAI,UAAgC,CAAC;YACrC,IAAI;gBACF,UAAU,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;aAC7D;YAAC,WAAM;gBACN,SAAS;aACV;YAED,IAAI,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,uBAAuB,EAAE;gBAC/D,kCAAkC;gBAClC,OAAO;aACR;YAED,MAAM,YAAY,GAAG;;;;;UAKf,CAAC;YAEP,MAAM,kBAAkB,GAAG,IAAA,0BAAiB,EAC1C,UAAU,CAAC,UAAU,EACrB,kBAAkB,CACnB,CAAC;YAEF,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC;gBACrD,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC;gBACxC,CAAC,CAAC,EAAE,CAAC;YACP,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,GAAG,eAAe,KAAK,YAAY,EAAE,CAAC,CAAC;SACvE;QAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AApCD,4BAoCC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMfeProjects = void 0;
|
|
4
|
+
const tsquery_1 = require("@phenomnomnominal/tsquery");
|
|
5
|
+
const executor_options_utils_1 = require("@nrwl/workspace/src/utilities/executor-options-utils");
|
|
6
|
+
function getMfeProjects(tree) {
|
|
7
|
+
const NRWL_WEBPACK_BROWSER_BUILDER = '@nrwl/angular:webpack-browser';
|
|
8
|
+
const CUSTOM_WEBPACK_OPTION = 'customWebpackConfig';
|
|
9
|
+
const projects = [];
|
|
10
|
+
(0, executor_options_utils_1.forEachExecutorOptions)(tree, NRWL_WEBPACK_BROWSER_BUILDER, (opts, projectName) => {
|
|
11
|
+
var _a;
|
|
12
|
+
const webpackPath = (_a = opts[CUSTOM_WEBPACK_OPTION]) === null || _a === void 0 ? void 0 : _a.path;
|
|
13
|
+
if (!webpackPath || !tree.exists(webpackPath)) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const webpackConfig = tree.read(webpackPath, 'utf-8');
|
|
17
|
+
const ast = tsquery_1.tsquery.ast(webpackConfig);
|
|
18
|
+
const moduleFederationWebpackConfig = (0, tsquery_1.tsquery)(ast, 'Identifier[name=ModuleFederationPlugin]', {
|
|
19
|
+
visitAllChildren: true,
|
|
20
|
+
});
|
|
21
|
+
if (!moduleFederationWebpackConfig ||
|
|
22
|
+
moduleFederationWebpackConfig.length === 0) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
projects.push(projectName);
|
|
26
|
+
});
|
|
27
|
+
return projects;
|
|
28
|
+
}
|
|
29
|
+
exports.getMfeProjects = getMfeProjects;
|
|
30
|
+
//# sourceMappingURL=get-mfe-projects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-mfe-projects.js","sourceRoot":"","sources":["../../../../../packages/angular/src/utils/get-mfe-projects.ts"],"names":[],"mappings":";;;AACA,uDAAoD;AACpD,iGAA8F;AAE9F,SAAgB,cAAc,CAAC,IAAU;IACvC,MAAM,4BAA4B,GAAG,+BAA+B,CAAC;IACrE,MAAM,qBAAqB,GAAG,qBAAqB,CAAC;IAEpD,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,IAAA,+CAAsB,EACpB,IAAI,EACJ,4BAA4B,EAC5B,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE;;QACpB,MAAM,WAAW,GAAG,MAAA,IAAI,CAAC,qBAAqB,CAAC,0CAAE,IAAI,CAAC;QACtD,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE;YAC7C,OAAO;SACR;QACD,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QACtD,MAAM,GAAG,GAAG,iBAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACvC,MAAM,6BAA6B,GAAG,IAAA,iBAAO,EAC3C,GAAG,EACH,yCAAyC,EACzC;YACE,gBAAgB,EAAE,IAAI;SACvB,CACF,CAAC;QACF,IACE,CAAC,6BAA6B;YAC9B,6BAA6B,CAAC,MAAM,KAAK,CAAC,EAC1C;YACA,OAAO;SACR;QAED,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7B,CAAC,CACF,CAAC;IAEF,OAAO,QAAQ,CAAC;AAClB,CAAC;AAlCD,wCAkCC"}
|
package/src/utils/versions.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.autoprefixerVersion = exports.postcssVersion = exports.tailwindVersion = exports.angularArchitectsModuleFederationPluginVersion = exports.angularEslintVersion = exports.jestPresetAngularVersion = exports.rxjsVersion = exports.ngrxVersion = exports.angularJsVersion = exports.angularDevkitVersion = exports.angularVersion = exports.nxVersion = void 0;
|
|
4
|
-
exports.nxVersion = '13.
|
|
4
|
+
exports.nxVersion = '13.8.1';
|
|
5
5
|
exports.angularVersion = '~13.2.0';
|
|
6
6
|
exports.angularDevkitVersion = '~13.2.0';
|
|
7
7
|
exports.angularJsVersion = '1.7.9';
|