@ihk-gfi/lux-components-update 21.1.0 → 21.2.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/collection.json +10 -0
- package/package.json +1 -1
- package/src/migrate-i18n-keys/index.js +3 -3
- package/src/updates/19.0.0/index.js +1 -1
- package/src/updates/19.7.0/index.js +420 -0
- package/src/updates/19.7.0/schema.json +23 -0
- package/src/updates/21.0.0/index.js +3 -3
- package/src/updates/21.2.0/index.js +19 -0
- package/src/updates/21.2.0/schema.json +23 -0
- package/src/utility/files.js +52 -26
- package/src/utility/logging.js +15 -6
- package/src/utility/types.js +2 -0
package/collection.json
CHANGED
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
"factory": "./src/update-standalone-imports/index#updateStandAloneImports",
|
|
7
7
|
"schema": "./src/update-standalone-imports/schema.json"
|
|
8
8
|
},
|
|
9
|
+
"update-21.2.0": {
|
|
10
|
+
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 21.2.0",
|
|
11
|
+
"factory": "./src/updates/21.2.0/index#update210200",
|
|
12
|
+
"schema": "./src/updates/21.2.0/schema.json"
|
|
13
|
+
},
|
|
9
14
|
"update-21.1.0": {
|
|
10
15
|
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 21.1.0",
|
|
11
16
|
"factory": "./src/updates/21.1.0/index#update210100",
|
|
@@ -16,6 +21,11 @@
|
|
|
16
21
|
"factory": "./src/updates/21.0.0/index#update210000",
|
|
17
22
|
"schema": "./src/updates/21.0.0/schema.json"
|
|
18
23
|
},
|
|
24
|
+
"update-19.7.0": {
|
|
25
|
+
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 19.7.0",
|
|
26
|
+
"factory": "./src/updates/19.7.0/index#update190700",
|
|
27
|
+
"schema": "./src/updates/19.7.0/schema.json"
|
|
28
|
+
},
|
|
19
29
|
"update-19.6.0": {
|
|
20
30
|
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 19.6.0",
|
|
21
31
|
"factory": "./src/updates/19.6.0/index#update190600",
|
package/package.json
CHANGED
|
@@ -14,8 +14,8 @@ function migrateI18nKeys(options) {
|
|
|
14
14
|
}
|
|
15
15
|
function migrateI18nKeysIntern(options) {
|
|
16
16
|
return (tree, _context) => {
|
|
17
|
-
(0, files_1.iterateFilesAndModifyContent)(tree, options.path, (filePath, content) => {
|
|
18
|
-
|
|
17
|
+
(0, files_1.iterateFilesAndModifyContent)(tree, options.path, !!options.verbose, (filePath, content) => {
|
|
18
|
+
const result = transformContent(content);
|
|
19
19
|
if (result.changed) {
|
|
20
20
|
(0, logging_1.logInfo)(filePath + ' wurde angepasst.');
|
|
21
21
|
tree.overwrite(filePath, result.content);
|
|
@@ -31,7 +31,7 @@ function transformContent(content) {
|
|
|
31
31
|
// (?:([\w:-]+)="[^"]*"\s+i18n-\2|i18n-([\w:-]+))="@@?([^"]+)"
|
|
32
32
|
// Group 2 or 3 = attribute name; group 4 = key
|
|
33
33
|
const attrRegex = /(\s)(?:([\w:-]+)="[^"]*"\s+i18n-\2|i18n-([\w:-]+))="@@?([^"]+)"/g;
|
|
34
|
-
content = content.replace(attrRegex, (
|
|
34
|
+
content = content.replace(attrRegex, (_m, ws, attrWithValue, attrOnly, key) => {
|
|
35
35
|
const attrName = attrWithValue || attrOnly;
|
|
36
36
|
changed = true;
|
|
37
37
|
return `${ws}${attrName}="{{ '${key}' | transloco }}"`;
|
|
@@ -45,7 +45,7 @@ function updateProject(options) {
|
|
|
45
45
|
updateKarmaConfJs(options),
|
|
46
46
|
updateMainTs(options),
|
|
47
47
|
updateTestTs(options),
|
|
48
|
-
(0, files_1.deleteFile)(options
|
|
48
|
+
(0, files_1.deleteFile)(options, '.eslintrc.json'),
|
|
49
49
|
updateMessages(options),
|
|
50
50
|
(0, util_1.messageSuccessRule)(`LUX-Components ${exports.updateMajorVersion} wurden aktualisiert.`)
|
|
51
51
|
]);
|
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.update190700 = update190700;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const chalk = require("chalk");
|
|
6
|
+
const index_1 = require("../../update-dependencies/index");
|
|
7
|
+
const files_1 = require("../../utility/files");
|
|
8
|
+
const replace_item_1 = require("../../utility/replace-item");
|
|
9
|
+
const util_1 = require("../../utility/util");
|
|
10
|
+
function update190700(options, runNpmInstall = true) {
|
|
11
|
+
return (_tree, _context) => {
|
|
12
|
+
return (0, schematics_1.chain)([
|
|
13
|
+
(0, util_1.messageInfoRule)(`Die LUX-Components werden auf die Version 19.7.0 aktualisiert...`),
|
|
14
|
+
(0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
|
|
15
|
+
(0, index_1.updateDep)('@ihk-gfi/lux-components', '19.7.0', false),
|
|
16
|
+
updateMessages(options),
|
|
17
|
+
(0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 19.7.0 aktualisiert.`),
|
|
18
|
+
(0, util_1.finish)(runNpmInstall, `${chalk.yellowBright('Fertig!')}`)
|
|
19
|
+
]);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function updateMessages(options) {
|
|
23
|
+
return (_tree, _context) => {
|
|
24
|
+
const deFilePath = (options.path ?? '') + '/src/locale/messages.xlf';
|
|
25
|
+
const enFilePath = (options.path ?? '') + '/src/locale/messages.en.xlf';
|
|
26
|
+
const beforeId = `luxc.filter.title`;
|
|
27
|
+
const deFilterButton = `<trans-unit id="luxc.consent.essential.name" datatype="html">
|
|
28
|
+
<source>Notwendig</source>
|
|
29
|
+
<context-group purpose="location">
|
|
30
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
31
|
+
<context context-type="linenumber">6</context>
|
|
32
|
+
</context-group>
|
|
33
|
+
</trans-unit>
|
|
34
|
+
<trans-unit id="luxc.consent.essential.hint" datatype="html">
|
|
35
|
+
<source>Notwendige Cookies helfen dabei, eine Webseite nutzbar zu machen, indem sie Grundfunktionen wie Seitennavigation und Zugriff auf sichere Bereiche der Webseite ermöglichen. Die Webseite kann ohne diese Cookies nicht richtig funktionieren.</source>
|
|
36
|
+
<context-group purpose="location">
|
|
37
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
38
|
+
<context context-type="linenumber">9</context>
|
|
39
|
+
</context-group>
|
|
40
|
+
</trans-unit>
|
|
41
|
+
<trans-unit id="luxc.consent.preferences.name" datatype="html">
|
|
42
|
+
<source>Präferenzen</source>
|
|
43
|
+
<context-group purpose="location">
|
|
44
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
45
|
+
<context context-type="linenumber">13</context>
|
|
46
|
+
</context-group>
|
|
47
|
+
</trans-unit>
|
|
48
|
+
<trans-unit id="luxc.consent.preferences.hint" datatype="html">
|
|
49
|
+
<source>Präferenz-Cookies ermöglichen einer Webseite sich an Informationen zu erinnern, die die Art beeinflussen, wie sich eine Webseite verhält oder aussieht, wie z. B. Ihre bevorzugte Sprache oder die Region in der Sie sich befinden.</source>
|
|
50
|
+
<context-group purpose="location">
|
|
51
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
52
|
+
<context context-type="linenumber">16</context>
|
|
53
|
+
</context-group>
|
|
54
|
+
</trans-unit>
|
|
55
|
+
<trans-unit id="luxc.consent.statistics.name" datatype="html">
|
|
56
|
+
<source>Statistiken</source>
|
|
57
|
+
<context-group purpose="location">
|
|
58
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
59
|
+
<context context-type="linenumber">20</context>
|
|
60
|
+
</context-group>
|
|
61
|
+
</trans-unit>
|
|
62
|
+
<trans-unit id="luxc.consent.statistics.hint" datatype="html">
|
|
63
|
+
<source>Statistik-Cookies helfen Webseiten-Besitzern zu verstehen, wie Besucher mit Webseiten interagieren, indem Informationen anonym gesammelt und gemeldet werden.</source>
|
|
64
|
+
<context-group purpose="location">
|
|
65
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
66
|
+
<context context-type="linenumber">23</context>
|
|
67
|
+
</context-group>
|
|
68
|
+
</trans-unit>
|
|
69
|
+
<trans-unit id="luxc.consent.marketing.name" datatype="html">
|
|
70
|
+
<source>Marketing</source>
|
|
71
|
+
<context-group purpose="location">
|
|
72
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
73
|
+
<context context-type="linenumber">27</context>
|
|
74
|
+
</context-group>
|
|
75
|
+
</trans-unit>
|
|
76
|
+
<trans-unit id="luxc.consent.marketing.hint" datatype="html">
|
|
77
|
+
<source>Marketing-Cookies werden verwendet, um Besuchern auf Webseiten zu folgen. Die Absicht ist, Anzeigen zu zeigen, die relevant und ansprechend für den einzelnen Benutzer sind und daher wertvoller für Publisher und werbetreibende Drittparteien sind.</source>
|
|
78
|
+
<context-group purpose="location">
|
|
79
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
80
|
+
<context context-type="linenumber">30</context>
|
|
81
|
+
</context-group>
|
|
82
|
+
</trans-unit>
|
|
83
|
+
<trans-unit id="luxc.consent.other.name" datatype="html">
|
|
84
|
+
<source>Nicht klassifiziert</source>
|
|
85
|
+
<context-group purpose="location">
|
|
86
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
87
|
+
<context context-type="linenumber">34</context>
|
|
88
|
+
</context-group>
|
|
89
|
+
</trans-unit>
|
|
90
|
+
<trans-unit id="luxc.consent.other.hint" datatype="html">
|
|
91
|
+
<source>Nicht klassifizierte Cookies sind Cookies, die wir gerade versuchen zu klassifizieren, zusammen mit Anbietern von individuellen Cookies.</source>
|
|
92
|
+
<context-group purpose="location">
|
|
93
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
94
|
+
<context context-type="linenumber">37</context>
|
|
95
|
+
</context-group>
|
|
96
|
+
</trans-unit>
|
|
97
|
+
<trans-unit id="luxc.consent.link_back" datatype="html">
|
|
98
|
+
<source>Zurück</source>
|
|
99
|
+
<context-group purpose="location">
|
|
100
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
101
|
+
<context context-type="linenumber">1,2</context>
|
|
102
|
+
</context-group>
|
|
103
|
+
</trans-unit>
|
|
104
|
+
<trans-unit id="luxc.consent.hide_details" datatype="html">
|
|
105
|
+
<source>Zurück</source>
|
|
106
|
+
<context-group purpose="location">
|
|
107
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
108
|
+
<context context-type="linenumber">1,2</context>
|
|
109
|
+
</context-group>
|
|
110
|
+
</trans-unit>
|
|
111
|
+
<trans-unit id="luxc.consent.show_details" datatype="html">
|
|
112
|
+
<source>Details</source>
|
|
113
|
+
<context-group purpose="location">
|
|
114
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
115
|
+
<context context-type="linenumber">1,2</context>
|
|
116
|
+
</context-group>
|
|
117
|
+
</trans-unit>
|
|
118
|
+
<trans-unit id="luxc.consent.link_datenschutz" datatype="html">
|
|
119
|
+
<source>Datenschutz</source>
|
|
120
|
+
<context-group purpose="location">
|
|
121
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
122
|
+
<context context-type="linenumber">1,2</context>
|
|
123
|
+
</context-group>
|
|
124
|
+
</trans-unit>
|
|
125
|
+
<trans-unit id="luxc.consent.link_impressum" datatype="html">
|
|
126
|
+
<source>Impressum</source>
|
|
127
|
+
<context-group purpose="location">
|
|
128
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
129
|
+
<context context-type="linenumber">1,2</context>
|
|
130
|
+
</context-group>
|
|
131
|
+
</trans-unit>
|
|
132
|
+
<trans-unit id="luxc.consent.button_close" datatype="html">
|
|
133
|
+
<source>Schließen</source>
|
|
134
|
+
<context-group purpose="location">
|
|
135
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
136
|
+
<context context-type="linenumber">1,2</context>
|
|
137
|
+
</context-group>
|
|
138
|
+
</trans-unit>
|
|
139
|
+
<trans-unit id="luxc.consent.title" datatype="html">
|
|
140
|
+
<source>Standardhinweis</source>
|
|
141
|
+
<context-group purpose="location">
|
|
142
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
143
|
+
<context context-type="linenumber">1,2</context>
|
|
144
|
+
</context-group>
|
|
145
|
+
</trans-unit>
|
|
146
|
+
<trans-unit id="luxc.consent.description" datatype="html">
|
|
147
|
+
<source> Wir verwenden Cookies, um die Bereitstellung unserer Dienste zu erleichtern. Cookies sind kleine Textdateien, die von Webseiten verwendet werden, um die Benutzererfahrung effizienter zu gestalten. Laut Gesetz können wir Cookies auf Ihrem Gerät speichern, wenn diese für den Betrieb dieser Seite unbedingt notwendig sind. Für alle anderen Cookie-Typen benötigen wir Ihre Erlaubnis. Diese Seite verwendet unterschiedliche Cookie-Typen. Einige Cookies werden von Drittparteien platziert, die auf unseren Seiten erscheinen. Sie können Ihre Einwilligung jederzeit von der Cookie-Erklärung auf unserer Website ändern oder widerrufen. </source>
|
|
148
|
+
<context-group purpose="location">
|
|
149
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
150
|
+
<context context-type="linenumber">1,10</context>
|
|
151
|
+
</context-group>
|
|
152
|
+
</trans-unit>
|
|
153
|
+
<trans-unit id="luxc.consent.purposes_title" datatype="html">
|
|
154
|
+
<source>Zweckarten</source>
|
|
155
|
+
<context-group purpose="location">
|
|
156
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
157
|
+
<context context-type="linenumber">1,2</context>
|
|
158
|
+
</context-group>
|
|
159
|
+
</trans-unit>
|
|
160
|
+
<trans-unit id="luxc.consent.cookies_used_title" datatype="html">
|
|
161
|
+
<source>Verwendete Cookies</source>
|
|
162
|
+
<context-group purpose="location">
|
|
163
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
164
|
+
<context context-type="linenumber">1,2</context>
|
|
165
|
+
</context-group>
|
|
166
|
+
</trans-unit>
|
|
167
|
+
<trans-unit id="luxc.consent.table_header_name" datatype="html">
|
|
168
|
+
<source>Name</source>
|
|
169
|
+
<context-group purpose="location">
|
|
170
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
171
|
+
<context context-type="linenumber">1,2</context>
|
|
172
|
+
</context-group>
|
|
173
|
+
</trans-unit>
|
|
174
|
+
<trans-unit id="luxc.consent.table_header_duration" datatype="html">
|
|
175
|
+
<source>Dauer</source>
|
|
176
|
+
<context-group purpose="location">
|
|
177
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
178
|
+
<context context-type="linenumber">1,2</context>
|
|
179
|
+
</context-group>
|
|
180
|
+
</trans-unit>
|
|
181
|
+
<trans-unit id="luxc.consent.table_header_description" datatype="html">
|
|
182
|
+
<source>Beschreibung</source>
|
|
183
|
+
<context-group purpose="location">
|
|
184
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
185
|
+
<context context-type="linenumber">1,2</context>
|
|
186
|
+
</context-group>
|
|
187
|
+
</trans-unit>
|
|
188
|
+
<trans-unit id="luxc.consent.button_decline_optional" datatype="html">
|
|
189
|
+
<source>Optionale ablehnen</source>
|
|
190
|
+
<context-group purpose="location">
|
|
191
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
192
|
+
<context context-type="linenumber">1,2</context>
|
|
193
|
+
</context-group>
|
|
194
|
+
</trans-unit>
|
|
195
|
+
<trans-unit id="luxc.consent.button_accept_selected" datatype="html">
|
|
196
|
+
<source>Auswahl akzeptieren</source>
|
|
197
|
+
<context-group purpose="location">
|
|
198
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
199
|
+
<context context-type="linenumber">1,2</context>
|
|
200
|
+
</context-group>
|
|
201
|
+
</trans-unit>
|
|
202
|
+
<trans-unit id="luxc.consent.button_accept_all" datatype="html">
|
|
203
|
+
<source>Alle akzeptieren</source>
|
|
204
|
+
<context-group purpose="location">
|
|
205
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
206
|
+
<context context-type="linenumber">1,2</context>
|
|
207
|
+
</context-group>
|
|
208
|
+
</trans-unit>`;
|
|
209
|
+
const enFilterButton = `<trans-unit id="luxc.consent.essential.name" datatype="html">
|
|
210
|
+
<source>Notwendig</source>
|
|
211
|
+
<target>Essential</target>
|
|
212
|
+
<context-group purpose="location">
|
|
213
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
214
|
+
<context context-type="linenumber">6</context>
|
|
215
|
+
</context-group>
|
|
216
|
+
</trans-unit>
|
|
217
|
+
<trans-unit id="luxc.consent.essential.hint" datatype="html">
|
|
218
|
+
<source>Notwendige Cookies helfen dabei, eine Webseite nutzbar zu machen, indem sie Grundfunktionen wie Seitennavigation und Zugriff auf sichere Bereiche der Webseite ermöglichen. Die Webseite kann ohne diese Cookies nicht richtig funktionieren.</source>
|
|
219
|
+
<target>Essential cookies help to make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.</target>
|
|
220
|
+
<context-group purpose="location">
|
|
221
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
222
|
+
<context context-type="linenumber">9</context>
|
|
223
|
+
</context-group>
|
|
224
|
+
</trans-unit>
|
|
225
|
+
<trans-unit id="luxc.consent.preferences.name" datatype="html">
|
|
226
|
+
<source>Präferenzen</source>
|
|
227
|
+
<target>Preferences</target>
|
|
228
|
+
<context-group purpose="location">
|
|
229
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
230
|
+
<context context-type="linenumber">13</context>
|
|
231
|
+
</context-group>
|
|
232
|
+
</trans-unit>
|
|
233
|
+
<trans-unit id="luxc.consent.preferences.hint" datatype="html">
|
|
234
|
+
<source>Präferenz-Cookies ermöglichen einer Webseite sich an Informationen zu erinnern, die die Art beeinflussen, wie sich eine Webseite verhält oder aussieht, wie z. B. Ihre bevorzugte Sprache oder die Region in der Sie sich befinden.</source>
|
|
235
|
+
<target>Preference cookies enable a website to remember information that changes the way the website behaves or looks, like your preferred language or the region that you are in.</target>
|
|
236
|
+
<context-group purpose="location">
|
|
237
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
238
|
+
<context context-type="linenumber">16</context>
|
|
239
|
+
</context-group>
|
|
240
|
+
</trans-unit>
|
|
241
|
+
<trans-unit id="luxc.consent.statistics.name" datatype="html">
|
|
242
|
+
<source>Statistiken</source>
|
|
243
|
+
<target>Statistics</target>
|
|
244
|
+
<context-group purpose="location">
|
|
245
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
246
|
+
<context context-type="linenumber">20</context>
|
|
247
|
+
</context-group>
|
|
248
|
+
</trans-unit>
|
|
249
|
+
<trans-unit id="luxc.consent.statistics.hint" datatype="html">
|
|
250
|
+
<source>Statistik-Cookies helfen Webseiten-Besitzern zu verstehen, wie Besucher mit Webseiten interagieren, indem Informationen anonym gesammelt und gemeldet werden.</source>
|
|
251
|
+
<target>Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.</target>
|
|
252
|
+
<context-group purpose="location">
|
|
253
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
254
|
+
<context context-type="linenumber">23</context>
|
|
255
|
+
</context-group>
|
|
256
|
+
</trans-unit>
|
|
257
|
+
<trans-unit id="luxc.consent.marketing.name" datatype="html">
|
|
258
|
+
<source>Marketing</source>
|
|
259
|
+
<target>Marketing</target>
|
|
260
|
+
<context-group purpose="location">
|
|
261
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
262
|
+
<context context-type="linenumber">27</context>
|
|
263
|
+
</context-group>
|
|
264
|
+
</trans-unit>
|
|
265
|
+
<trans-unit id="luxc.consent.marketing.hint" datatype="html">
|
|
266
|
+
<source>Marketing-Cookies werden verwendet, um Besuchern auf Webseiten zu folgen. Die Absicht ist, Anzeigen zu zeigen, die relevant und ansprechend für den einzelnen Benutzer sind und daher wertvoller für Publisher und werbetreibende Drittparteien sind.</source>
|
|
267
|
+
<target>Marketing cookies are used to track visitors across websites. The intention is to show ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third-party advertisers.</target>
|
|
268
|
+
<context-group purpose="location">
|
|
269
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
270
|
+
<context context-type="linenumber">30</context>
|
|
271
|
+
</context-group>
|
|
272
|
+
</trans-unit>
|
|
273
|
+
<trans-unit id="luxc.consent.other.name" datatype="html">
|
|
274
|
+
<source>Nicht klassifiziert</source>
|
|
275
|
+
<target>Unclassified</target>
|
|
276
|
+
<context-group purpose="location">
|
|
277
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
278
|
+
<context context-type="linenumber">34</context>
|
|
279
|
+
</context-group>
|
|
280
|
+
</trans-unit>
|
|
281
|
+
<trans-unit id="luxc.consent.other.hint" datatype="html">
|
|
282
|
+
<source>Nicht klassifizierte Cookies sind Cookies, die wir gerade versuchen zu klassifizieren, zusammen mit Anbietern von individuellen Cookies.</source>
|
|
283
|
+
<target>Unclassified cookies are cookies that we are in the process of classifying, together with the providers of individual cookies.</target>
|
|
284
|
+
<context-group purpose="location">
|
|
285
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-categories.ts</context>
|
|
286
|
+
<context context-type="linenumber">37</context>
|
|
287
|
+
</context-group>
|
|
288
|
+
</trans-unit>
|
|
289
|
+
<trans-unit id="luxc.consent.link_back" datatype="html">
|
|
290
|
+
<source>Zurück</source>
|
|
291
|
+
<target>Back</target>
|
|
292
|
+
<context-group purpose="location">
|
|
293
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
294
|
+
<context context-type="linenumber">1,2</context>
|
|
295
|
+
</context-group>
|
|
296
|
+
</trans-unit>
|
|
297
|
+
<trans-unit id="luxc.consent.hide_details" datatype="html">
|
|
298
|
+
<source>Zurück</source>
|
|
299
|
+
<target>Back</target>
|
|
300
|
+
<context-group purpose="location">
|
|
301
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
302
|
+
<context context-type="linenumber">1,2</context>
|
|
303
|
+
</context-group>
|
|
304
|
+
</trans-unit>
|
|
305
|
+
<trans-unit id="luxc.consent.show_details" datatype="html">
|
|
306
|
+
<source>Details</source>
|
|
307
|
+
<target>Details</target>
|
|
308
|
+
<context-group purpose="location">
|
|
309
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
310
|
+
<context context-type="linenumber">1,2</context>
|
|
311
|
+
</context-group>
|
|
312
|
+
</trans-unit>
|
|
313
|
+
<trans-unit id="luxc.consent.link_datenschutz" datatype="html">
|
|
314
|
+
<source>Datenschutz</source>
|
|
315
|
+
<target>Privacy Policy</target>
|
|
316
|
+
<context-group purpose="location">
|
|
317
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
318
|
+
<context context-type="linenumber">1,2</context>
|
|
319
|
+
</context-group>
|
|
320
|
+
</trans-unit>
|
|
321
|
+
<trans-unit id="luxc.consent.link_impressum" datatype="html">
|
|
322
|
+
<source>Impressum</source>
|
|
323
|
+
<target>Legal Notice</target>
|
|
324
|
+
<context-group purpose="location">
|
|
325
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
326
|
+
<context context-type="linenumber">1,2</context>
|
|
327
|
+
</context-group>
|
|
328
|
+
</trans-unit>
|
|
329
|
+
<trans-unit id="luxc.consent.button_close" datatype="html">
|
|
330
|
+
<source>Schließen</source>
|
|
331
|
+
<target>Close</target>
|
|
332
|
+
<context-group purpose="location">
|
|
333
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
334
|
+
<context context-type="linenumber">1,2</context>
|
|
335
|
+
</context-group>
|
|
336
|
+
</trans-unit>
|
|
337
|
+
<trans-unit id="luxc.consent.title" datatype="html">
|
|
338
|
+
<source>Standardhinweis</source>
|
|
339
|
+
<target>Default Notice</target>
|
|
340
|
+
<context-group purpose="location">
|
|
341
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
342
|
+
<context context-type="linenumber">1,2</context>
|
|
343
|
+
</context-group>
|
|
344
|
+
</trans-unit>
|
|
345
|
+
<trans-unit id="luxc.consent.description" datatype="html">
|
|
346
|
+
<source> Wir verwenden Cookies, um die Bereitstellung unserer Dienste zu erleichtern. Cookies sind kleine Textdateien, die von Webseiten verwendet werden, um die Benutzererfahrung effizienter zu gestalten. Laut Gesetz können wir Cookies auf Ihrem Gerät speichern, wenn diese für den Betrieb dieser Seite unbedingt notwendig sind. Für alle anderen Cookie-Typen benötigen wir Ihre Erlaubnis. Diese Seite verwendet unterschiedliche Cookie-Typen. Einige Cookies werden von Drittparteien platziert, die auf unseren Seiten erscheinen. Sie können Ihre Einwilligung jederzeit von der Cookie-Erklärung auf unserer Website ändern oder widerrufen. </source>
|
|
347
|
+
<target> We use cookies to facilitate the provision of our services. Cookies are small text files that are used by websites to make the user experience more efficient. By law, we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies, we need your permission. This site uses different types of cookies. Some cookies are placed by third parties who appear on our pages. You can change or withdraw your consent at any time from the cookie declaration on our website. </target>
|
|
348
|
+
<context-group purpose="location">
|
|
349
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
350
|
+
<context context-type="linenumber">1,10</context>
|
|
351
|
+
</context-group>
|
|
352
|
+
</trans-unit>
|
|
353
|
+
<trans-unit id="luxc.consent.purposes_title" datatype="html">
|
|
354
|
+
<source>Zweckarten</source>
|
|
355
|
+
<target>Purpose types</target>
|
|
356
|
+
<context-group purpose="location">
|
|
357
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
358
|
+
<context context-type="linenumber">1,2</context>
|
|
359
|
+
</context-group>
|
|
360
|
+
</trans-unit>
|
|
361
|
+
<trans-unit id="luxc.consent.cookies_used_title" datatype="html">
|
|
362
|
+
<source>Verwendete Cookies</source>
|
|
363
|
+
<context-group purpose="location">
|
|
364
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
365
|
+
<context context-type="linenumber">1,2</context>
|
|
366
|
+
</context-group>
|
|
367
|
+
</trans-unit>
|
|
368
|
+
<trans-unit id="luxc.consent.table_header_name" datatype="html">
|
|
369
|
+
<source>Name</source>
|
|
370
|
+
<target>Name</target>
|
|
371
|
+
<context-group purpose="location">
|
|
372
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
373
|
+
<context context-type="linenumber">1,2</context>
|
|
374
|
+
</context-group>
|
|
375
|
+
</trans-unit>
|
|
376
|
+
<trans-unit id="luxc.consent.table_header_duration" datatype="html">
|
|
377
|
+
<source>Dauer</source>
|
|
378
|
+
<target>Duration</target>
|
|
379
|
+
<context-group purpose="location">
|
|
380
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
381
|
+
<context context-type="linenumber">1,2</context>
|
|
382
|
+
</context-group>
|
|
383
|
+
</trans-unit>
|
|
384
|
+
<trans-unit id="luxc.consent.table_header_description" datatype="html">
|
|
385
|
+
<source>Beschreibung</source>
|
|
386
|
+
<target>Description</target>
|
|
387
|
+
<context-group purpose="location">
|
|
388
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
389
|
+
<context context-type="linenumber">1,2</context>
|
|
390
|
+
</context-group>
|
|
391
|
+
</trans-unit>
|
|
392
|
+
<trans-unit id="luxc.consent.button_decline_optional" datatype="html">
|
|
393
|
+
<source>Optionale ablehnen</source>
|
|
394
|
+
<context-group purpose="location">
|
|
395
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
396
|
+
<context context-type="linenumber">1,2</context>
|
|
397
|
+
</context-group>
|
|
398
|
+
</trans-unit>
|
|
399
|
+
<trans-unit id="luxc.consent.button_accept_selected" datatype="html">
|
|
400
|
+
<source>Auswahl akzeptieren</source>
|
|
401
|
+
<target>Accept selected</target>
|
|
402
|
+
<context-group purpose="location">
|
|
403
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
404
|
+
<context context-type="linenumber">1,2</context>
|
|
405
|
+
</context-group>
|
|
406
|
+
</trans-unit>
|
|
407
|
+
<trans-unit id="luxc.consent.button_accept_all" datatype="html">
|
|
408
|
+
<source>Alle akzeptieren</source>
|
|
409
|
+
<target>Accept all</target>
|
|
410
|
+
<context-group purpose="location">
|
|
411
|
+
<context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-consent/lux-consent-dialog.component.html</context>
|
|
412
|
+
<context context-type="linenumber">1,2</context>
|
|
413
|
+
</context-group>
|
|
414
|
+
</trans-unit>`;
|
|
415
|
+
return (0, schematics_1.chain)([
|
|
416
|
+
(0, files_1.replaceRule)(options, `Messages (de) werden angepasst...`, `Messages (de) wurden angepasst.`, deFilePath, new replace_item_1.AddTransUnitItem(beforeId, deFilterButton)),
|
|
417
|
+
(0, files_1.replaceRule)(options, `Messages (en) werden angepasst...`, `Messages (en) wurden angepasst.`, enFilePath, new replace_item_1.AddTransUnitItem(beforeId, enFilterButton))
|
|
418
|
+
]);
|
|
419
|
+
};
|
|
420
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "luxupdate190700Schema",
|
|
4
|
+
"title": "Aktualisiert das LUX-Componentsprojekt",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"description": "Aktualisiert das LUX-Componentsprojekt",
|
|
7
|
+
"properties": {
|
|
8
|
+
"project": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "Der Projektname",
|
|
11
|
+
"$default": {
|
|
12
|
+
"$source": "projectName"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"verbose": {
|
|
16
|
+
"type": "boolean",
|
|
17
|
+
"description": "Generiert mehr Logausgaben",
|
|
18
|
+
"default": false
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": [],
|
|
22
|
+
"additionalProperties": false
|
|
23
|
+
}
|
|
@@ -22,7 +22,7 @@ const typescript_1 = require("../../utility/typescript");
|
|
|
22
22
|
const util_1 = require("../../utility/util");
|
|
23
23
|
const validation_1 = require("../../utility/validation");
|
|
24
24
|
exports.updateMajorVersion = '21';
|
|
25
|
-
exports.updateMinVersion = '19.
|
|
25
|
+
exports.updateMinVersion = '19.7.0';
|
|
26
26
|
exports.updateNodeMinVersion = '20.0.0';
|
|
27
27
|
exports.addOrUpdate = false;
|
|
28
28
|
function update210000(options) {
|
|
@@ -82,7 +82,7 @@ function updatePackageJsonTransloco(options) {
|
|
|
82
82
|
(0, json_1.deleteJsonValue)(packageJson, ['scripts', 'xi18n']),
|
|
83
83
|
(0, json_1.deleteJsonValue)(packageJson, ['scripts', 'start-en']),
|
|
84
84
|
(0, files_1.replaceRule)(options, `--localize wird entfernt...`, `--localize wurde entfernt.`, packageJson, new replace_item_1.ReplaceItem(' --localize', '', true)),
|
|
85
|
-
(0, files_1.deleteFile)(options
|
|
85
|
+
(0, files_1.deleteFile)(options, 'move-de-files.js'),
|
|
86
86
|
(0, files_1.moveFilesToDirectory)(options, 'files/scripts', '/scripts'),
|
|
87
87
|
(0, files_1.moveFilesToDirectory)(options, 'files/transloco/base', '/src/app'),
|
|
88
88
|
(0, files_1.moveFilesToDirectory)(options, 'files/transloco/i18n', '/src/locale'),
|
|
@@ -177,7 +177,7 @@ function updateAngularJsonTransloco(options) {
|
|
|
177
177
|
}
|
|
178
178
|
function updateMainTsAndTestTs(options) {
|
|
179
179
|
return (tree, _context) => {
|
|
180
|
-
(0, files_1.iterateFilesAndModifyContent)(tree, options.path, (filePath, content) => {
|
|
180
|
+
(0, files_1.iterateFilesAndModifyContent)(tree, options.path, !!options.verbose, (filePath, content) => {
|
|
181
181
|
let result = content;
|
|
182
182
|
result = (0, util_1.replaceAll)(result, `/// <reference types="@angular/localize" />`, ``);
|
|
183
183
|
if (content !== result) {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.update210200 = update210200;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const chalk = require("chalk");
|
|
6
|
+
const index_1 = require("../../update-dependencies/index");
|
|
7
|
+
const util_1 = require("../../utility/util");
|
|
8
|
+
function update210200(_options, runNpmInstall = true) {
|
|
9
|
+
return (_tree, _context) => {
|
|
10
|
+
return (0, schematics_1.chain)([
|
|
11
|
+
(0, util_1.messageInfoRule)(`Die LUX-Components werden auf die Version 21.2.0 aktualisiert...`),
|
|
12
|
+
(0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
|
|
13
|
+
(0, index_1.updateDep)('@ihk-gfi/lux-components', '21.2.0', false),
|
|
14
|
+
(0, index_1.updateDep)('@ihk-gfi/lux-components-theme', '21.2.0', false),
|
|
15
|
+
(0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 21.2.0 aktualisiert.`),
|
|
16
|
+
(0, util_1.finish)(runNpmInstall, `${chalk.yellowBright('Fertig!')}`)
|
|
17
|
+
]);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "luxupdate210200Schema",
|
|
4
|
+
"title": "Aktualisiert das LUX-Componentsprojekt",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"description": "Aktualisiert das LUX-Componentsprojekt",
|
|
7
|
+
"properties": {
|
|
8
|
+
"project": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "Der Projektname",
|
|
11
|
+
"$default": {
|
|
12
|
+
"$source": "projectName"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"verbose": {
|
|
16
|
+
"type": "boolean",
|
|
17
|
+
"description": "Generiert mehr Logausgaben",
|
|
18
|
+
"default": false
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": [],
|
|
22
|
+
"additionalProperties": false
|
|
23
|
+
}
|
package/src/utility/files.js
CHANGED
|
@@ -60,9 +60,6 @@ function deleteLineFromFile(tree, _context, filePath, searchString, withLog = tr
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
// Doppelte Zeilenumbrüche entfernen
|
|
64
|
-
content = content.replace(new RegExp('\r\n', 'g'), '\r\n');
|
|
65
|
-
content = content.replace(new RegExp('\r\n\r\n', 'g'), '\r\n');
|
|
66
63
|
tree.overwrite(filePath, content);
|
|
67
64
|
changed = true;
|
|
68
65
|
}
|
|
@@ -105,6 +102,37 @@ function writeLinesToFile(tree, _context, filePath, ...lines) {
|
|
|
105
102
|
(0, logging_1.logInfo)(`Erstelle die Datei "${filePath}" und füge Inhalt hinzu.`);
|
|
106
103
|
}
|
|
107
104
|
}
|
|
105
|
+
function isIgnoredPath(filePath, ignoreSpecFiles = false) {
|
|
106
|
+
if (['/node_modules/', '/.idea/', '/coverage/', '/dist/', '/.git/', '/.angular/', '/.cache/', '/tmp/', '/out/', '/src-gen/'].some((segment) => filePath.includes(segment))) {
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
return ignoreSpecFiles && filePath.endsWith('.spec.ts');
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Traversiert Verzeichnisse rekursiv, bricht aber früh ab, wenn ein Verzeichnis
|
|
113
|
+
* in den Ignore-Regeln ist. Dadurch wird das Betreten großer Ordner wie
|
|
114
|
+
* node_modules verhindert und die Laufzeit erheblich verbessert.
|
|
115
|
+
*/
|
|
116
|
+
function visitWithPrune(tree, startDirPath, fileCallback, ignoreSpecFiles = false) {
|
|
117
|
+
const dir = tree.getDir(startDirPath);
|
|
118
|
+
if (!dir) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
// Prüfen, ob das gesamte Verzeichnis ignoriert werden soll
|
|
122
|
+
if (isIgnoredPath(dir.path + '/', ignoreSpecFiles)) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
// Dateien im aktuellen Verzeichnis verarbeiten
|
|
126
|
+
dir.subfiles.forEach((fileName) => {
|
|
127
|
+
const filePath = (0, core_1.join)(dir.path, fileName);
|
|
128
|
+
fileCallback(filePath);
|
|
129
|
+
});
|
|
130
|
+
// Rekursiv in Unterverzeichnisse gehen (nur die erlaubten)
|
|
131
|
+
dir.subdirs.forEach((subdir) => {
|
|
132
|
+
const subdirPath = `${dir.path}/${subdir}`;
|
|
133
|
+
visitWithPrune(tree, subdirPath, fileCallback, ignoreSpecFiles);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
108
136
|
/**
|
|
109
137
|
* Iteriert über alle Dateien vom Root-Pfad aus.
|
|
110
138
|
* Über die filePathEndings lassen sich Einschränkungen bzgl. des Datei-Typs festlegen (z.B. .html).
|
|
@@ -114,18 +142,15 @@ function writeLinesToFile(tree, _context, filePath, ...lines) {
|
|
|
114
142
|
* @param callback(filePath, content)
|
|
115
143
|
* @param filePathEndings Z.B. .html, .ts, src/styles.scss,...
|
|
116
144
|
*/
|
|
117
|
-
function iterateFilesAndModifyContent(tree, rootPath = '', callback, ...filePathEndings) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
filePath.startsWith('/dist/')) {
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
145
|
+
function iterateFilesAndModifyContent(tree, rootPath = '', verbose = false, callback, ...filePathEndings) {
|
|
146
|
+
const normalizedRootPath = rootPath && rootPath.trim() ? rootPath.trim() : '/';
|
|
147
|
+
if (verbose) {
|
|
148
|
+
(0, logging_1.logDebug)(`Suche nach "${filePathEndings.length > 0 ? filePathEndings.join(', ') : 'allen'}" Dateien unter dem Pfad "${normalizedRootPath}"...`);
|
|
149
|
+
}
|
|
150
|
+
visitWithPrune(tree, normalizedRootPath, (filePath) => {
|
|
126
151
|
// Endung der Datei mit erlaubten Endungen abgleichen
|
|
127
152
|
let modifyFile = false;
|
|
128
|
-
for (
|
|
153
|
+
for (const fileEnding of filePathEndings) {
|
|
129
154
|
if (filePath.endsWith(fileEnding)) {
|
|
130
155
|
modifyFile = true;
|
|
131
156
|
break;
|
|
@@ -133,8 +158,14 @@ function iterateFilesAndModifyContent(tree, rootPath = '', callback, ...filePath
|
|
|
133
158
|
}
|
|
134
159
|
// Besitzt die Datei die richtige Endung?
|
|
135
160
|
if (!modifyFile) {
|
|
161
|
+
if (verbose) {
|
|
162
|
+
(0, logging_1.logDebug)(`${filePath} wurde übersprungen...`);
|
|
163
|
+
}
|
|
136
164
|
return;
|
|
137
165
|
}
|
|
166
|
+
if (verbose) {
|
|
167
|
+
(0, logging_1.logDebug)(`${filePath} wird verarbeitet...`);
|
|
168
|
+
}
|
|
138
169
|
// Inhalt auslesen
|
|
139
170
|
const content = tree.read(filePath);
|
|
140
171
|
// Wenn die Datei keinen Inhalt hat, die nächste Datei aufrufen
|
|
@@ -143,6 +174,9 @@ function iterateFilesAndModifyContent(tree, rootPath = '', callback, ...filePath
|
|
|
143
174
|
}
|
|
144
175
|
// Callback mit aktuellem Pfad + Inhalt der Datei aufrufen
|
|
145
176
|
callback(filePath, content.toString());
|
|
177
|
+
if (verbose) {
|
|
178
|
+
(0, logging_1.logInfo)(`${filePath} wurde verarbeitet.`);
|
|
179
|
+
}
|
|
146
180
|
});
|
|
147
181
|
}
|
|
148
182
|
/**
|
|
@@ -216,18 +250,10 @@ function deleteFilesInDirectory(options, path, exclude) {
|
|
|
216
250
|
};
|
|
217
251
|
}
|
|
218
252
|
function searchInComponentAndModifyModule(tree, rootPath, searchStrings, callback, ...filePathEndings) {
|
|
219
|
-
tree
|
|
220
|
-
// Ignoriere folende Odner
|
|
221
|
-
if (filePath.startsWith('/node_modules/') ||
|
|
222
|
-
filePath.startsWith('/.idea/') ||
|
|
223
|
-
filePath.startsWith('/coverage/') ||
|
|
224
|
-
filePath.startsWith('/dist/') ||
|
|
225
|
-
filePath.endsWith('.spec.ts')) {
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
253
|
+
visitWithPrune(tree, rootPath, (filePath) => {
|
|
228
254
|
// Endung der Datei mit erlaubten Endungen abgleichen
|
|
229
255
|
let modifyFile = false;
|
|
230
|
-
for (
|
|
256
|
+
for (const fileEnding of filePathEndings) {
|
|
231
257
|
if (filePath.endsWith(fileEnding)) {
|
|
232
258
|
modifyFile = true;
|
|
233
259
|
break;
|
|
@@ -255,12 +281,12 @@ function searchInComponentAndModifyModule(tree, rootPath, searchStrings, callbac
|
|
|
255
281
|
// den Ordner der gefundenen Datei nehmen
|
|
256
282
|
const fileDir = filePath.substring(0, filePath.lastIndexOf('/'));
|
|
257
283
|
const modulePath = findModule(tree, fileDir);
|
|
258
|
-
|
|
284
|
+
const moduleContent = tree.read(modulePath);
|
|
259
285
|
if (moduleContent) {
|
|
260
286
|
// Callback mit aktuellem Pfad + Inhalt der Datei aufrufen
|
|
261
287
|
callback(modulePath, moduleContent.toString());
|
|
262
288
|
}
|
|
263
|
-
});
|
|
289
|
+
}, true);
|
|
264
290
|
}
|
|
265
291
|
/**
|
|
266
292
|
* Function to find the "closest" module to a generated file's path.
|
|
@@ -315,7 +341,7 @@ function replaceRule(options, startMsg, endMsg, filePattern, ...replaceItems) {
|
|
|
315
341
|
return (0, schematics_1.chain)([
|
|
316
342
|
(0, util_1.messageInfoRule)(startMsg),
|
|
317
343
|
(tree, _context) => {
|
|
318
|
-
iterateFilesAndModifyContent(tree, options.path, (filePath, content) => {
|
|
344
|
+
iterateFilesAndModifyContent(tree, options.path, !!options.verbose, (filePath, content) => {
|
|
319
345
|
let result = content;
|
|
320
346
|
replaceItems.forEach((item) => {
|
|
321
347
|
if (typeof item.find === 'string') {
|
package/src/utility/logging.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formattedSchematicsException = exports.logError = exports.logWarn = exports.logSuccess = exports.logInfo = exports.logInfoWithDescriptor = exports.TAB = void 0;
|
|
3
|
+
exports.formattedSchematicsException = exports.logError = exports.logWarn = exports.logSuccess = exports.logInfo = exports.logDebug = exports.logInfoWithDescriptor = exports.TAB = void 0;
|
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
5
|
const chalk = require("chalk");
|
|
6
6
|
exports.TAB = '\t ';
|
|
@@ -9,16 +9,25 @@ exports.TAB = '\t ';
|
|
|
9
9
|
* @param messages
|
|
10
10
|
*/
|
|
11
11
|
const logInfoWithDescriptor = (...messages) => {
|
|
12
|
-
|
|
12
|
+
const message = generateLogMessage(...messages);
|
|
13
13
|
console.log(chalk.blueBright(`[INFO]${exports.TAB}${message}`));
|
|
14
14
|
};
|
|
15
15
|
exports.logInfoWithDescriptor = logInfoWithDescriptor;
|
|
16
|
+
/**
|
|
17
|
+
* Erzeugt eine Info-Log-Ausgabe in hellem Weiß ohne Icon.
|
|
18
|
+
* @param messages
|
|
19
|
+
*/
|
|
20
|
+
const logDebug = (...messages) => {
|
|
21
|
+
const message = generateLogMessage(...messages);
|
|
22
|
+
console.log(chalk.grey(`${exports.TAB}${message}`));
|
|
23
|
+
};
|
|
24
|
+
exports.logDebug = logDebug;
|
|
16
25
|
/**
|
|
17
26
|
* Erzeugt eine Info-Log-Ausgabe in hellem Weiß ohne Icon.
|
|
18
27
|
* @param messages
|
|
19
28
|
*/
|
|
20
29
|
const logInfo = (...messages) => {
|
|
21
|
-
|
|
30
|
+
const message = generateLogMessage(...messages);
|
|
22
31
|
console.log(chalk.whiteBright(`${exports.TAB}${message}`));
|
|
23
32
|
};
|
|
24
33
|
exports.logInfo = logInfo;
|
|
@@ -27,7 +36,7 @@ exports.logInfo = logInfo;
|
|
|
27
36
|
* @param messages
|
|
28
37
|
*/
|
|
29
38
|
const logSuccess = (...messages) => {
|
|
30
|
-
|
|
39
|
+
const message = generateLogMessage(...messages);
|
|
31
40
|
console.log(chalk.yellowBright(`[SUCCESS] ${message}`));
|
|
32
41
|
};
|
|
33
42
|
exports.logSuccess = logSuccess;
|
|
@@ -36,7 +45,7 @@ exports.logSuccess = logSuccess;
|
|
|
36
45
|
* @param messages
|
|
37
46
|
*/
|
|
38
47
|
const logWarn = (...messages) => {
|
|
39
|
-
|
|
48
|
+
const message = generateLogMessage(...messages);
|
|
40
49
|
console.log(chalk.yellowBright(`[WARN] ${message}`));
|
|
41
50
|
};
|
|
42
51
|
exports.logWarn = logWarn;
|
|
@@ -56,7 +65,7 @@ exports.logError = logError;
|
|
|
56
65
|
* @constructor
|
|
57
66
|
*/
|
|
58
67
|
const formattedSchematicsException = (...messages) => {
|
|
59
|
-
|
|
68
|
+
const message = generateLogMessage(...messages);
|
|
60
69
|
// Die eigentliche Exception zum Aufrufer zurückgeben '
|
|
61
70
|
return new schematics_1.SchematicsException(`[ERROR] ${message}`);
|
|
62
71
|
};
|