@o3r/schematics 11.1.0-prerelease.4 → 11.1.0-prerelease.40
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@o3r/schematics",
|
3
|
-
"version": "11.1.0-prerelease.
|
3
|
+
"version": "11.1.0-prerelease.40",
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
@@ -30,7 +30,7 @@
|
|
30
30
|
"@angular-devkit/core": "~18.0.0",
|
31
31
|
"@angular-devkit/schematics": "~18.0.0",
|
32
32
|
"@angular/cli": "~18.0.0",
|
33
|
-
"@o3r/telemetry": "^11.1.0-prerelease.
|
33
|
+
"@o3r/telemetry": "^11.1.0-prerelease.40",
|
34
34
|
"@schematics/angular": "~18.0.0",
|
35
35
|
"eslint": "^8.57.0",
|
36
36
|
"rxjs": "^7.8.1",
|
@@ -85,23 +85,23 @@
|
|
85
85
|
"@nx/eslint-plugin": "~19.3.0",
|
86
86
|
"@nx/jest": "~19.3.0",
|
87
87
|
"@nx/js": "~19.3.0",
|
88
|
-
"@o3r/build-helpers": "^11.1.0-prerelease.
|
89
|
-
"@o3r/eslint-plugin": "^11.1.0-prerelease.
|
90
|
-
"@o3r/telemetry": "^11.1.0-prerelease.
|
88
|
+
"@o3r/build-helpers": "^11.1.0-prerelease.40",
|
89
|
+
"@o3r/eslint-plugin": "^11.1.0-prerelease.40",
|
90
|
+
"@o3r/telemetry": "^11.1.0-prerelease.40",
|
91
91
|
"@schematics/angular": "~18.0.0",
|
92
92
|
"@stylistic/eslint-plugin-ts": "^2.0.0",
|
93
93
|
"@types/inquirer": "~8.2.10",
|
94
94
|
"@types/jest": "~29.5.2",
|
95
95
|
"@types/node": "^20.0.0",
|
96
96
|
"@types/semver": "^7.3.13",
|
97
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
98
|
-
"@typescript-eslint/parser": "^7.
|
99
|
-
"@typescript-eslint/utils": "
|
97
|
+
"@typescript-eslint/eslint-plugin": "^7.14.1",
|
98
|
+
"@typescript-eslint/parser": "^7.14.1",
|
99
|
+
"@typescript-eslint/utils": "^7.14.1",
|
100
100
|
"cpy-cli": "^5.0.0",
|
101
101
|
"eslint": "^8.57.0",
|
102
102
|
"eslint-import-resolver-node": "^0.3.9",
|
103
103
|
"eslint-plugin-jest": "~28.6.0",
|
104
|
-
"eslint-plugin-jsdoc": "~48.
|
104
|
+
"eslint-plugin-jsdoc": "~48.8.0",
|
105
105
|
"eslint-plugin-prefer-arrow": "~1.2.3",
|
106
106
|
"eslint-plugin-unicorn": "^54.0.0",
|
107
107
|
"jest": "~29.7.0",
|
@@ -110,7 +110,7 @@
|
|
110
110
|
"jsonschema": "~1.4.1",
|
111
111
|
"nx": "~19.3.0",
|
112
112
|
"rxjs": "^7.8.1",
|
113
|
-
"ts-jest": "~29.
|
113
|
+
"ts-jest": "~29.2.0",
|
114
114
|
"ts-node": "~10.9.2",
|
115
115
|
"type-fest": "^4.10.2",
|
116
116
|
"typescript": "~5.4.2",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"gitignore.d.ts","sourceRoot":"","sources":["../../../src/utility/gitignore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAEvD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAC,EAAE,
|
1
|
+
{"version":3,"file":"gitignore.d.ts","sourceRoot":"","sources":["../../../src/utility/gitignore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAEvD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAC,EAAE,gEA2BrG"}
|
package/src/utility/gitignore.js
CHANGED
@@ -7,20 +7,24 @@ exports.ignorePatterns = void 0;
|
|
7
7
|
* @param patternsToAdd List of patterns with description to add to gitignore files
|
8
8
|
*/
|
9
9
|
function ignorePatterns(tree, patternsToAdd) {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
gitIgnoreFile = gitIgnoreFile + `\n# ${description}\n${patterns.join('\n')}\n`;
|
19
|
-
});
|
20
|
-
if (found) {
|
21
|
-
tree.overwrite('/.gitignore', gitIgnoreFile);
|
22
|
-
}
|
10
|
+
const gitIgnoreFileName = '/.gitignore';
|
11
|
+
const isGitIgnorePresent = tree.exists(gitIgnoreFileName);
|
12
|
+
let gitIgnoreFileContent = isGitIgnorePresent ? tree.readText(gitIgnoreFileName) : '';
|
13
|
+
const filteredPatternsToAdd = patternsToAdd
|
14
|
+
.map(({ description, patterns }) => ({ description, patterns: patterns.filter((pattern) => !new RegExp('^' + pattern.replace(/([*/\\.])/g, '\\$1')).test(gitIgnoreFileContent)) }))
|
15
|
+
.filter(({ patterns }) => patterns.length);
|
16
|
+
if (!filteredPatternsToAdd.length) {
|
17
|
+
return tree;
|
23
18
|
}
|
19
|
+
gitIgnoreFileContent += '\n' + filteredPatternsToAdd
|
20
|
+
.map(({ description, patterns }) => (description ? `# ${description}\n` : '')
|
21
|
+
+ patterns.join('\n'))
|
22
|
+
.join('\n');
|
23
|
+
if (isGitIgnorePresent) {
|
24
|
+
tree.overwrite(gitIgnoreFileName, gitIgnoreFileContent);
|
25
|
+
return tree;
|
26
|
+
}
|
27
|
+
tree.create(gitIgnoreFileName, gitIgnoreFileContent);
|
24
28
|
return tree;
|
25
29
|
}
|
26
30
|
exports.ignorePatterns = ignorePatterns;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"gitignore.js","sourceRoot":"","sources":["../../../src/utility/gitign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