@ronas-it/nx-generators 0.11.1 → 0.12.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 +1 -1
- package/src/generators/code-checks/files/.eslint.ronasit.cjs.template +337 -0
- package/src/generators/code-checks/files/eslint.config.cjs.template +204 -0
- package/src/generators/code-checks/files/eslint.constraints.json.template +30 -0
- package/src/generators/code-checks/generator.js +1 -10
- package/src/generators/code-checks/generator.js.map +1 -1
- package/src/generators/code-checks/scripts.js +1 -1
- package/src/generators/code-checks/scripts.js.map +1 -1
- package/src/generators/lib-move/generator.js +5 -2
- package/src/generators/lib-move/generator.js.map +1 -1
- package/src/generators/lib-rename/generator.js +5 -1
- package/src/generators/lib-rename/generator.js.map +1 -1
- package/src/generators/lib-tags/generator.js +4 -12
- package/src/generators/lib-tags/generator.js.map +1 -1
- package/src/generators/lib-tags/interfaces/context.d.ts +0 -5
- package/src/generators/lib-tags/utils/check-lib-tags.js +4 -9
- package/src/generators/lib-tags/utils/check-lib-tags.js.map +1 -1
- package/src/shared/templates/config-template.json +29 -41
- package/src/shared/utils/config-utils.d.ts +3 -11
- package/src/shared/utils/config-utils.js +57 -78
- package/src/shared/utils/config-utils.js.map +1 -1
- package/src/generators/code-checks/files/.eslint.ronasit.json.template +0 -183
- package/src/generators/code-checks/files/.eslintrc.json.template +0 -178
- package/src/generators/repo-config/files/.env.template +0 -1
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.libRenameGenerator = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const child_process_1 = require("child_process");
|
|
6
|
+
const path = require("path");
|
|
6
7
|
const utils_1 = require("../../shared/utils");
|
|
7
8
|
function libRenameGenerator(tree, options) {
|
|
8
9
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -14,7 +15,10 @@ function libRenameGenerator(tree, options) {
|
|
|
14
15
|
libPathSegments.shift();
|
|
15
16
|
libPathSegments.push(destLibraryName);
|
|
16
17
|
const destLibraryPath = `libs/${libPathSegments.join('/')}`;
|
|
17
|
-
|
|
18
|
+
const newLibImportPath = path.normalize(libPathSegments.join('/'));
|
|
19
|
+
const fullLibraryPath = `${(0, utils_1.getImportPathPrefix)(tree)}/${newLibImportPath}`;
|
|
20
|
+
const fullLibraryName = newLibImportPath.split('/').join('-');
|
|
21
|
+
(0, child_process_1.execSync)(`npx nx g mv --projectName=${currentLibraryName} --newProjectName=${fullLibraryName} --destination=${destLibraryPath} --importPath=${fullLibraryPath}`, { stdio: 'inherit' });
|
|
18
22
|
});
|
|
19
23
|
}
|
|
20
24
|
exports.libRenameGenerator = libRenameGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/lib-rename/generator.ts"],"names":[],"mappings":";;;;AAAA,iDAAyC;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/lib-rename/generator.ts"],"names":[],"mappings":";;;;AAAA,iDAAyC;AACzC,6BAA6B;AAE7B,8CAA+F;AAG/F,SAAsB,kBAAkB,CAAC,IAAU,EAAE,OAAiC;;QACpF,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,MAAM,IAAA,+BAAuB,EAC1F,IAAI,EACJ,OAAO,CAAC,cAAc,CACvB,CAAC;QAEF,MAAM,eAAe,GAAG,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACtD,MAAM,sBAAsB,GAAG,eAAe,CAAC,GAAG,EAAE,CAAC;QACrD,MAAM,eAAe,GACnB,OAAO,CAAC,UAAU,IAAI,CAAC,MAAM,IAAA,mBAAW,EAAC,4BAA4B,EAAE,sBAAsB,CAAC,CAAC,CAAC;QAElG,8BAA8B;QAC9B,eAAe,CAAC,KAAK,EAAE,CAAC;QACxB,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAEtC,MAAM,eAAe,GAAG,QAAQ,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAC5D,MAAM,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QACnE,MAAM,eAAe,GAAG,GAAG,IAAA,2BAAmB,EAAC,IAAI,CAAC,IAAI,gBAAgB,EAAE,CAAC;QAC3E,MAAM,eAAe,GAAG,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAE9D,IAAA,wBAAQ,EAAC,6BAA6B,kBAAkB,qBAAqB,eAAe,kBAAkB,eAAe,iBAAiB,eAAe,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACzL,CAAC;CAAA;AArBD,gDAqBC;AAED,kBAAe,kBAAkB,CAAC"}
|
|
@@ -8,13 +8,7 @@ const lodash_1 = require("lodash");
|
|
|
8
8
|
const utils_1 = require("../../shared/utils");
|
|
9
9
|
const utils_2 = require("./utils");
|
|
10
10
|
const context = {
|
|
11
|
-
|
|
12
|
-
rules: [],
|
|
13
|
-
log: console.log,
|
|
14
|
-
reload: (tree) => {
|
|
15
|
-
context.config = (0, utils_1.readESLintConfig)(tree).config;
|
|
16
|
-
context.rules = (0, utils_1.getNxRules)(context.config);
|
|
17
|
-
},
|
|
11
|
+
log: console.log
|
|
18
12
|
};
|
|
19
13
|
function libTagsGenerator(tree, options) {
|
|
20
14
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -30,13 +24,12 @@ function libTagsGenerator(tree, options) {
|
|
|
30
24
|
}
|
|
31
25
|
// #1 Check eslint config nx-boundaries rule
|
|
32
26
|
devkit_1.output.log({ title: devkit_1.output.bold('1. Checking eslint config nx-boundaries rule...') });
|
|
33
|
-
|
|
34
|
-
// #2 Check
|
|
35
|
-
devkit_1.output.log({ title: devkit_1.output.bold('
|
|
27
|
+
(0, utils_1.verifyESLintConstraintsConfig)(tree);
|
|
28
|
+
// #2 Check project tags
|
|
29
|
+
devkit_1.output.log({ title: devkit_1.output.bold('Checking projects tags...') });
|
|
36
30
|
const projects = (0, devkit_1.getProjects)(tree);
|
|
37
31
|
const applications = [];
|
|
38
32
|
const libraries = [];
|
|
39
|
-
context.rules = (0, utils_1.getNxRules)(context.config);
|
|
40
33
|
projects.forEach((project) => {
|
|
41
34
|
if (project.projectType === 'application') {
|
|
42
35
|
applications.push(project);
|
|
@@ -46,7 +39,6 @@ function libTagsGenerator(tree, options) {
|
|
|
46
39
|
}
|
|
47
40
|
});
|
|
48
41
|
applications.forEach((application) => (0, utils_2.checkApplicationTags)(application, tree, context));
|
|
49
|
-
context.reload(tree);
|
|
50
42
|
libraries.forEach((library) => (0, utils_2.checkLibraryTags)(library, tree, context));
|
|
51
43
|
yield (0, devkit_1.formatFiles)(tree);
|
|
52
44
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/lib-tags/generator.ts"],"names":[],"mappings":";;;;AAAA,iDAAyC;AACzC,uCAA0F;AAC1F,mCAA8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/lib-tags/generator.ts"],"names":[],"mappings":";;;;AAAA,iDAAyC;AACzC,uCAA0F;AAC1F,mCAA8B;AAC9B,8CAAgF;AAGhF,mCAAiE;AAEjE,MAAM,OAAO,GAAmB;IAC9B,GAAG,EAAE,OAAO,CAAC,GAAG;CACjB,CAAC;AAEF,SAAsB,gBAAgB,CAAC,IAAU,EAAE,OAA+B;;QAChF,MAAM,kBAAkB,GAAG,CAAC,OAAO,CAAC,aAAa,IAAI,IAAA,wBAAQ,EAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAEhG,IAAI,kBAAkB,EAAE,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,EAAE,CAAC,IAAA,wBAAgB,EAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;QAEzE,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AAzCD,4CAyCC;AAED,kBAAe,gBAAgB,CAAC"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import { Tree } from '@nx/devkit';
|
|
2
|
-
import { Constraint } from '../../../shared/utils';
|
|
3
1
|
export interface LibTagsContext {
|
|
4
|
-
config: Record<string, any>;
|
|
5
|
-
rules: Array<Constraint>;
|
|
6
2
|
log: (message: any, ...optionalParams: Array<any>) => void;
|
|
7
|
-
reload: (tree: Tree) => void;
|
|
8
3
|
}
|
|
@@ -20,7 +20,7 @@ const verifyLibraryTag = ({ project, tree, tag, tagType, context, ruleNotFoundCa
|
|
|
20
20
|
throw new Error(`Missing ${tagType} tag rule for ${tag}. Please add it to the ESLint config file.`);
|
|
21
21
|
};
|
|
22
22
|
if (tag) {
|
|
23
|
-
const tagRule =
|
|
23
|
+
const tagRule = (0, utils_1.readConstraints)(tree).find((rule) => rule.sourceTag === tag);
|
|
24
24
|
if (!tagRule) {
|
|
25
25
|
const callback = ruleNotFoundCallback || defaultRuleNotFoundCallback;
|
|
26
26
|
callback();
|
|
@@ -35,7 +35,6 @@ const verifyLibraryTag = ({ project, tree, tag, tagType, context, ruleNotFoundCa
|
|
|
35
35
|
(0, devkit_1.updateProjectConfiguration)(tree, project.name, project);
|
|
36
36
|
if (tagType === 'scope') {
|
|
37
37
|
(0, utils_1.addNxScopeTag)(tree, tagFromLibPath);
|
|
38
|
-
context.reload(tree);
|
|
39
38
|
}
|
|
40
39
|
verifyLibraryTag({
|
|
41
40
|
project,
|
|
@@ -51,15 +50,14 @@ const verifyLibraryTag = ({ project, tree, tag, tagType, context, ruleNotFoundCa
|
|
|
51
50
|
project = (0, devkit_1.readProjectConfiguration)(tree, project.name);
|
|
52
51
|
const tag = getTagFromLibPath(project.root, tagType);
|
|
53
52
|
if (tagType === 'type') {
|
|
54
|
-
const typeTagRule =
|
|
53
|
+
const typeTagRule = (0, utils_1.readConstraints)(tree).find((rule) => rule.sourceTag === `type:${tag}`);
|
|
55
54
|
if (!typeTagRule) {
|
|
56
|
-
throw new Error(`Missing type tag rule for ${tag}. Please add it to the ESLint config file.`);
|
|
55
|
+
throw new Error(`Missing type tag rule for ${tag}. Please add it to the ESLint constraints config file.`);
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
58
|
(0, devkit_1.updateProjectConfiguration)(tree, project.name, Object.assign(Object.assign({}, project), { tags: [...(project.tags || []), `${tagType}:${tag}`] }));
|
|
60
59
|
if (tagType === 'scope') {
|
|
61
60
|
(0, utils_1.addNxScopeTag)(tree, tag);
|
|
62
|
-
context.reload(tree);
|
|
63
61
|
}
|
|
64
62
|
}
|
|
65
63
|
};
|
|
@@ -68,11 +66,10 @@ const checkApplicationTags = (project, tree, context) => {
|
|
|
68
66
|
const appTag = tags === null || tags === void 0 ? void 0 : tags.find((tag) => tag.startsWith('app:'));
|
|
69
67
|
const hasTypeTag = tags === null || tags === void 0 ? void 0 : tags.includes('type:app');
|
|
70
68
|
if (appTag) {
|
|
71
|
-
const appTagRule =
|
|
69
|
+
const appTagRule = (0, utils_1.readConstraints)(tree).find((rule) => rule.sourceTag === appTag);
|
|
72
70
|
if (!appTagRule) {
|
|
73
71
|
context.log(`Missing app tag rule for ${appTag}. Adding...\n`);
|
|
74
72
|
(0, utils_1.addNxAppTag)(tree, appTag.replace('app:', ''));
|
|
75
|
-
context.reload(tree);
|
|
76
73
|
}
|
|
77
74
|
}
|
|
78
75
|
else {
|
|
@@ -80,7 +77,6 @@ const checkApplicationTags = (project, tree, context) => {
|
|
|
80
77
|
const projectAppTag = project.root.split('/').pop();
|
|
81
78
|
(0, devkit_1.updateProjectConfiguration)(tree, project.name, Object.assign(Object.assign({}, project), { tags: [...(project.tags || []), `app:${projectAppTag}`] }));
|
|
82
79
|
(0, utils_1.addNxAppTag)(tree, projectAppTag);
|
|
83
|
-
context.reload(tree);
|
|
84
80
|
}
|
|
85
81
|
if (!hasTypeTag) {
|
|
86
82
|
context.log(`Missing type tag for ${project.name}. Adding...`);
|
|
@@ -104,7 +100,6 @@ const checkLibraryTags = (project, tree, context) => {
|
|
|
104
100
|
ruleNotFoundCallback: () => {
|
|
105
101
|
context.log(`Missing scope tag rule for ${scopeTag}. Adding...`);
|
|
106
102
|
(0, utils_1.addNxScopeTag)(tree, scopeTag === null || scopeTag === void 0 ? void 0 : scopeTag.replace('scope:', ''));
|
|
107
|
-
context.reload(tree);
|
|
108
103
|
},
|
|
109
104
|
});
|
|
110
105
|
verifyLibraryTag({ project, tree, tag: typeTag, tagType: 'type', context });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-lib-tags.js","sourceRoot":"","sources":["../../../../../../plugin/src/generators/lib-tags/utils/check-lib-tags.ts"],"names":[],"mappings":";;;AAAA,uCAA8G;AAC9G,
|
|
1
|
+
{"version":3,"file":"check-lib-tags.js","sourceRoot":"","sources":["../../../../../../plugin/src/generators/lib-tags/utils/check-lib-tags.ts"],"names":[],"mappings":";;;AAAA,uCAA8G;AAC9G,iDAA+F;AAI/F,MAAM,iBAAiB,GAAG,CAAC,OAAe,EAAE,IAAa,EAAU,EAAE;IACnE,MAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAE5C,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,KAAK;YACR,OAAO,aAAa,CAAC;QACvB,KAAK,OAAO;YACV,OAAO,aAAa,KAAK,iBAAS,CAAC,WAAW,CAAC,CAAC,CAAC,iBAAS,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACjG,KAAK,MAAM;YACT,OAAO,aAAa,KAAK,iBAAS,CAAC,WAAW,CAAC,CAAC,CAAC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,CAAC;QACf,OAAO;QACP,IAAI;QACJ,GAAG,EAAE,QAAQ;QACb,OAAO,EAAE,OAAO;QAChB,OAAO;QACP,oBAAoB,EAAE,GAAG,EAAE;YACzB,OAAO,CAAC,GAAG,CAAC,8BAA8B,QAAQ,aAAa,CAAC,CAAC;YACjE,IAAA,qBAAa,EAAC,IAAI,EAAE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAW,CAAC,CAAC;QACjE,CAAC;KACF,CAAC,CAAC;IACH,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;AAC9E,CAAC,CAAC;AAnBW,QAAA,gBAAgB,oBAmB3B"}
|
|
@@ -1,42 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"sourceTag": "type:features",
|
|
32
|
-
"onlyDependOnLibsWithTags": ["type:features", "type:data-access", "type:ui", "type:utils"]
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"sourceTag": "type:ui",
|
|
36
|
-
"onlyDependOnLibsWithTags": ["type:ui", "type:utils"]
|
|
37
|
-
}
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
]
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"sourceTag": "app:shared",
|
|
4
|
+
"onlyDependOnLibsWithTags": ["app:shared"]
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"sourceTag": "scope:shared",
|
|
8
|
+
"onlyDependOnLibsWithTags": ["scope:*"]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"sourceTag": "type:app",
|
|
12
|
+
"onlyDependOnLibsWithTags": ["type:features", "type:ui", "type:utils", "type:data-access"]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"sourceTag": "type:utils",
|
|
16
|
+
"onlyDependOnLibsWithTags": ["type:utils"]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"sourceTag": "type:data-access",
|
|
20
|
+
"onlyDependOnLibsWithTags": ["type:data-access", "type:utils"]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"sourceTag": "type:features",
|
|
24
|
+
"onlyDependOnLibsWithTags": ["type:features", "type:data-access", "type:ui", "type:utils"]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"sourceTag": "type:ui",
|
|
28
|
+
"onlyDependOnLibsWithTags": ["type:ui", "type:utils"]
|
|
41
29
|
}
|
|
42
|
-
|
|
30
|
+
]
|
|
@@ -3,17 +3,9 @@ export interface Constraint {
|
|
|
3
3
|
sourceTag: string;
|
|
4
4
|
onlyDependOnLibsWithTags: Array<string>;
|
|
5
5
|
}
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
8
|
-
rules: Record<string, any>;
|
|
9
|
-
};
|
|
10
|
-
export declare const getNxRulesStatus: (config: Record<string, any>) => string;
|
|
11
|
-
export declare const getNxRules: (config: Record<string, any>) => Array<Constraint>;
|
|
12
|
-
export declare const readESLintConfig: (tree: Tree) => {
|
|
13
|
-
config: Record<string, any>;
|
|
14
|
-
path: string;
|
|
15
|
-
};
|
|
6
|
+
export declare const readConstraints: (tree: Tree) => Array<Constraint>;
|
|
7
|
+
export declare const writeConstraints: (tree: Tree, constraints: Array<Constraint>) => void;
|
|
16
8
|
export declare const addNxAppTag: (tree: Tree, appDirectory: string) => void;
|
|
17
9
|
export declare const addNxScopeTag: (tree: Tree, scope: string) => void;
|
|
18
10
|
export declare const getImportPathPrefix: (tree: Tree) => string;
|
|
19
|
-
export declare const
|
|
11
|
+
export declare const verifyESLintConstraintsConfig: (tree: Tree) => void;
|
|
@@ -1,57 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.verifyESLintConstraintsConfig = exports.getImportPathPrefix = exports.addNxScopeTag = exports.addNxAppTag = exports.writeConstraints = exports.readConstraints = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (!config) {
|
|
10
|
-
throw new Error('ESLint config not found');
|
|
5
|
+
const constraintsConfigPath = 'eslint.constraints.json';
|
|
6
|
+
const readConstraints = (tree) => {
|
|
7
|
+
if (!tree.exists(constraintsConfigPath)) {
|
|
8
|
+
throw new Error(`ESLint constraints config not found: ${constraintsConfigPath}`);
|
|
11
9
|
}
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
throw new Error(`ESLint: can't find '@nx/enforce-module-boundaries' rule`);
|
|
15
|
-
}
|
|
16
|
-
return entryWithRules;
|
|
17
|
-
};
|
|
18
|
-
exports.getNxRulesEntryOrThrowError = getNxRulesEntryOrThrowError;
|
|
19
|
-
const getNxRulesStatus = (config) => {
|
|
20
|
-
return (0, exports.getNxRulesEntryOrThrowError)(config).rules['@nx/enforce-module-boundaries'][0];
|
|
21
|
-
};
|
|
22
|
-
exports.getNxRulesStatus = getNxRulesStatus;
|
|
23
|
-
const getNxRules = (config) => {
|
|
24
|
-
return (0, exports.getNxRulesEntryOrThrowError)(config).rules['@nx/enforce-module-boundaries'][1].depConstraints;
|
|
10
|
+
const config = (0, devkit_1.readJson)(tree, constraintsConfigPath);
|
|
11
|
+
return config;
|
|
25
12
|
};
|
|
26
|
-
exports.
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
let path = defaultEsLintConfigPath;
|
|
30
|
-
const checkConfigExists = (path) => {
|
|
31
|
-
if (!tree.exists(path)) {
|
|
32
|
-
throw new Error(`ESLint config not found: ${path}`);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
checkConfigExists(path);
|
|
36
|
-
let config = (0, devkit_1.readJson)(tree, path);
|
|
37
|
-
if (getNxRulesEntry(config)) {
|
|
38
|
-
return { config, path };
|
|
39
|
-
}
|
|
40
|
-
if ((_a = config.extends) === null || _a === void 0 ? void 0 : _a.length) {
|
|
41
|
-
path = config.extends[0];
|
|
42
|
-
checkConfigExists(path);
|
|
43
|
-
config = (0, devkit_1.readJson)(tree, config.extends[0]);
|
|
44
|
-
}
|
|
45
|
-
return { config, path };
|
|
13
|
+
exports.readConstraints = readConstraints;
|
|
14
|
+
const writeConstraints = (tree, constraints) => {
|
|
15
|
+
(0, devkit_1.writeJson)(tree, constraintsConfigPath, constraints);
|
|
46
16
|
};
|
|
47
|
-
exports.
|
|
17
|
+
exports.writeConstraints = writeConstraints;
|
|
48
18
|
const getNpmScope = (tree) => {
|
|
49
19
|
const { name } = tree.exists('package.json') ? (0, devkit_1.readJson)(tree, 'package.json') : { name: null };
|
|
50
20
|
return (name === null || name === void 0 ? void 0 : name.startsWith('@')) ? name.split('/')[0].substring(1) : undefined;
|
|
51
21
|
};
|
|
52
22
|
const addNxAppTag = (tree, appDirectory) => {
|
|
53
|
-
const
|
|
54
|
-
const constraints = (0, exports.getNxRules)(config);
|
|
23
|
+
const constraints = (0, exports.readConstraints)(tree);
|
|
55
24
|
const doesTagExist = !!constraints.find((constraint) => constraint.sourceTag === `app:${appDirectory}`);
|
|
56
25
|
if (doesTagExist) {
|
|
57
26
|
return;
|
|
@@ -60,18 +29,17 @@ const addNxAppTag = (tree, appDirectory) => {
|
|
|
60
29
|
sourceTag: `app:${appDirectory}`,
|
|
61
30
|
onlyDependOnLibsWithTags: [`app:${appDirectory}`, 'app:shared'],
|
|
62
31
|
});
|
|
63
|
-
(0,
|
|
32
|
+
(0, exports.writeConstraints)(tree, constraints);
|
|
64
33
|
};
|
|
65
34
|
exports.addNxAppTag = addNxAppTag;
|
|
66
35
|
const addNxScopeTag = (tree, scope) => {
|
|
67
|
-
const
|
|
68
|
-
const constraints = (0, exports.getNxRules)(config);
|
|
36
|
+
const constraints = (0, exports.readConstraints)(tree);
|
|
69
37
|
const doesTagExist = !!constraints.find((constraint) => constraint.sourceTag === `scope:${scope}`);
|
|
70
38
|
if (doesTagExist) {
|
|
71
39
|
return;
|
|
72
40
|
}
|
|
73
41
|
constraints.push({ sourceTag: `scope:${scope}`, onlyDependOnLibsWithTags: [`scope:${scope}`, 'scope:shared'] });
|
|
74
|
-
(0,
|
|
42
|
+
(0, exports.writeConstraints)(tree, constraints);
|
|
75
43
|
};
|
|
76
44
|
exports.addNxScopeTag = addNxScopeTag;
|
|
77
45
|
const getImportPathPrefix = (tree) => {
|
|
@@ -79,8 +47,41 @@ const getImportPathPrefix = (tree) => {
|
|
|
79
47
|
return npmScope ? `${npmScope === '@' ? '' : '@'}${npmScope}` : '';
|
|
80
48
|
};
|
|
81
49
|
exports.getImportPathPrefix = getImportPathPrefix;
|
|
82
|
-
const
|
|
83
|
-
|
|
50
|
+
const verifyESLintConstraintsConfig = (tree) => {
|
|
51
|
+
let constraints = [];
|
|
52
|
+
try {
|
|
53
|
+
constraints = (0, exports.readConstraints)(tree);
|
|
54
|
+
}
|
|
55
|
+
catch (_a) {
|
|
56
|
+
devkit_1.output.warn({ title: devkit_1.output.bold('ESLint constraints config not found. Generating default rules...') });
|
|
57
|
+
const defaultConstraints = require('../templates/config-template.json');
|
|
58
|
+
(0, exports.writeConstraints)(tree, defaultConstraints);
|
|
59
|
+
devkit_1.output.note({
|
|
60
|
+
title: 'Configure NX boundaries',
|
|
61
|
+
bodyLines: [
|
|
62
|
+
'To complete setup add the following changes in your ESLint config (eslint.config.cjs):',
|
|
63
|
+
'```',
|
|
64
|
+
devkit_1.output.bold(`const constraints = require('./eslint.constraints.json');`),
|
|
65
|
+
'```',
|
|
66
|
+
'module.exports = [',
|
|
67
|
+
'```',
|
|
68
|
+
` {
|
|
69
|
+
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
70
|
+
rules: {
|
|
71
|
+
'@nx/enforce-module-boundaries': [
|
|
72
|
+
'error',
|
|
73
|
+
{
|
|
74
|
+
enforceBuildableLibDependency: true,
|
|
75
|
+
allow: [],
|
|
76
|
+
depConstraints: ${devkit_1.output.bold('constraints')},
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
},`,
|
|
81
|
+
'```'
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
}
|
|
84
85
|
const importantTags = [
|
|
85
86
|
'app:shared',
|
|
86
87
|
'scope:shared',
|
|
@@ -90,35 +91,13 @@ const verifyEsLintConfig = (tree) => {
|
|
|
90
91
|
'type:ui',
|
|
91
92
|
'type:utils',
|
|
92
93
|
];
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const areRulesDisabled = rulesEntry[1].depConstraints.find((rule) => rule.sourceTag === '*' && rule.onlyDependOnLibsWithTags.includes('*'));
|
|
100
|
-
const areRulesBroken = !importantTags.every((tag) => tags.includes(tag));
|
|
101
|
-
if (rulesEntry[0] !== 'error') {
|
|
102
|
-
rulesEntry[0] = 'error';
|
|
103
|
-
}
|
|
104
|
-
if (areRulesDisabled || areRulesBroken) {
|
|
105
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
106
|
-
const esLintConfigTemplate = require('../templates/config-template.json');
|
|
107
|
-
const templateRules = esLintConfigTemplate.rules['@nx/enforce-module-boundaries'];
|
|
108
|
-
rulesEntry[0] = templateRules[0];
|
|
109
|
-
rulesEntry[1] = templateRules[1];
|
|
110
|
-
(0, devkit_1.writeJson)(tree, path, config);
|
|
111
|
-
}
|
|
112
|
-
// TODO: use custom errors
|
|
94
|
+
const tags = constraints.map((rule) => rule.sourceTag);
|
|
95
|
+
const areRulesBroken = !importantTags.every((tag) => tags.includes(tag));
|
|
96
|
+
if (areRulesBroken) {
|
|
97
|
+
const defaultConstraints = require('../templates/config-template.json');
|
|
98
|
+
(0, exports.writeConstraints)(tree, defaultConstraints);
|
|
99
|
+
devkit_1.output.warn({ title: devkit_1.output.bold('ESLint constraints config is incorrect. Restoring default rules...') });
|
|
113
100
|
}
|
|
114
|
-
catch (_a) {
|
|
115
|
-
devkit_1.output.warn({ title: devkit_1.output.bold('ESLint config has no @nx/enforce-module-boundaries rule. Updating rules...') });
|
|
116
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
117
|
-
const esLintConfigRulesTemplate = require('../templates/config-template.json');
|
|
118
|
-
config.overrides.push(esLintConfigRulesTemplate);
|
|
119
|
-
(0, devkit_1.writeJson)(tree, path, config);
|
|
120
|
-
}
|
|
121
|
-
return config;
|
|
122
101
|
};
|
|
123
|
-
exports.
|
|
102
|
+
exports.verifyESLintConstraintsConfig = verifyESLintConstraintsConfig;
|
|
124
103
|
//# sourceMappingURL=config-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-utils.js","sourceRoot":"","sources":["../../../../../plugin/src/shared/utils/config-utils.ts"],"names":[],"mappings":";;;AAAA,uCAA+D;
|
|
1
|
+
{"version":3,"file":"config-utils.js","sourceRoot":"","sources":["../../../../../plugin/src/shared/utils/config-utils.ts"],"names":[],"mappings":";;;AAAA,uCAA+D;AAE/D,MAAM,qBAAqB,GAAG,yBAAyB,CAAC;AAOjD,MAAM,eAAe,GAAG,CAAC,IAAU,EAAqB,EAAE;IAC/D,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,wCAAwC,qBAAq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