@ihk-gfi/lux-components-update 16.4.1 → 16.5.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/add-lux-components/index.js +4 -0
- package/collection.json +10 -0
- package/package.json +2 -2
- package/updates/16.4.2/index.d.ts +2 -0
- package/updates/16.4.2/index.js +18 -0
- package/updates/16.4.2/schema.json +23 -0
- package/updates/16.5.0/index.d.ts +4 -0
- package/updates/16.5.0/index.js +64 -0
- package/updates/16.5.0/schema.json +23 -0
|
@@ -17,6 +17,8 @@ const index_5 = require("../updates/16.2.0/index");
|
|
|
17
17
|
const index_6 = require("../updates/16.3.0/index");
|
|
18
18
|
const index_7 = require("../updates/16.4.0/index");
|
|
19
19
|
const index_8 = require("../updates/16.4.1/index");
|
|
20
|
+
const index_9 = require("../updates/16.4.2/index");
|
|
21
|
+
const index_10 = require("../updates/16.5.0/index");
|
|
20
22
|
const files_1 = require("../utility/files");
|
|
21
23
|
const json_1 = require("../utility/json");
|
|
22
24
|
const logging_1 = require("../utility/logging");
|
|
@@ -92,6 +94,8 @@ function addLuxComponents(options) {
|
|
|
92
94
|
(0, index_6.update160300)(options, false),
|
|
93
95
|
(0, index_7.update160400)(options, false),
|
|
94
96
|
(0, index_8.update160401)(options, false),
|
|
97
|
+
(0, index_9.update160402)(options, false),
|
|
98
|
+
(0, index_10.update160500)(options, false),
|
|
95
99
|
(0, util_1.finish)(true, `Die LUX-Components ${index_2.updateMajorVersion} wurden erfolgreich eingerichtet.`, `${chalk.yellowBright('Fertig!')}`)
|
|
96
100
|
]);
|
|
97
101
|
};
|
package/collection.json
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
3
|
"schematics": {
|
|
4
|
+
"update-16.5.0": {
|
|
5
|
+
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 16.5.0",
|
|
6
|
+
"factory": "./updates/16.5.0/index#update160500",
|
|
7
|
+
"schema": "./updates/16.5.0/schema.json"
|
|
8
|
+
},
|
|
9
|
+
"update-16.4.2": {
|
|
10
|
+
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 16.4.2",
|
|
11
|
+
"factory": "./updates/16.4.2/index#update160402",
|
|
12
|
+
"schema": "./updates/16.4.2/schema.json"
|
|
13
|
+
},
|
|
4
14
|
"update-16.4.1": {
|
|
5
15
|
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 16.4.1",
|
|
6
16
|
"factory": "./updates/16.4.1/index#update160401",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ihk-gfi/lux-components-update",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.5.0",
|
|
4
4
|
"description": "Schematics für die Aktualisierung von LUX-Applikationen",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run clean && tsc -p tsconfig.json",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@types/semver": "^7.5.8",
|
|
40
40
|
"@types/jsdom": "^21.1.6",
|
|
41
41
|
"chalk": "^4.1.2",
|
|
42
|
-
"cheerio": "
|
|
42
|
+
"cheerio": "1.0.0-rc.12",
|
|
43
43
|
"htmlparser2": "^9.1.0",
|
|
44
44
|
"jasmine": "4.6.0",
|
|
45
45
|
"jsdom": "^24.0.0",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.update160402 = update160402;
|
|
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 update160402(_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 16.4.2 aktualisiert...`),
|
|
12
|
+
(0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
|
|
13
|
+
(0, index_1.updateDep)('@ihk-gfi/lux-components', '16.4.2', false),
|
|
14
|
+
(0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 16.4.2 aktualisiert.`),
|
|
15
|
+
(0, util_1.finish)(runNpmInstall, `${chalk.yellowBright('Fertig!')}`)
|
|
16
|
+
]);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "luxupdate160402Schema",
|
|
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
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.update160500 = update160500;
|
|
4
|
+
exports.updateAngularJson = updateAngularJson;
|
|
5
|
+
exports.updateAppModuleTs = updateAppModuleTs;
|
|
6
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
7
|
+
const chalk = require("chalk");
|
|
8
|
+
const index_1 = require("../../update-dependencies/index");
|
|
9
|
+
const util_1 = require("../../utility/util");
|
|
10
|
+
const files_1 = require("../../utility/files");
|
|
11
|
+
const logging_1 = require("../../utility/logging");
|
|
12
|
+
function update160500(options, runNpmInstall = true) {
|
|
13
|
+
return (_tree, _context) => {
|
|
14
|
+
return (0, schematics_1.chain)([
|
|
15
|
+
(0, util_1.messageInfoRule)(`Die LUX-Components werden auf die Version 16.5.0 aktualisiert...`),
|
|
16
|
+
(0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
|
|
17
|
+
(0, index_1.updateDep)('@ihk-gfi/lux-components', '16.5.0', false),
|
|
18
|
+
(0, index_1.updateDep)('@ihk-gfi/lux-components-theme', '16.3.0', false),
|
|
19
|
+
(0, index_1.updateDevDep)('@angular-devkit/build-angular', '16.2.15', false),
|
|
20
|
+
(0, index_1.updateDevDep)('@angular/cli', '16.2.15', false),
|
|
21
|
+
(0, index_1.updateDevDep)('@compodoc/compodoc', '1.1.25', true),
|
|
22
|
+
(0, index_1.updateDep)('ng2-pdf-viewer', '10.3.0', true),
|
|
23
|
+
(0, index_1.deleteDep)('pdfjs-dist'),
|
|
24
|
+
(0, index_1.deleteDevDep)('pdfjs-dist'),
|
|
25
|
+
updateAngularJson(options),
|
|
26
|
+
updateAppModuleTs(options),
|
|
27
|
+
(0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 16.5.0 aktualisiert.`),
|
|
28
|
+
(0, util_1.finish)(runNpmInstall, ``, `${chalk.yellowBright('Wichtig für Apps, welche die LUX-File-Preview (PDF-Vorschau) einsetzen')}`, `${chalk.yellowBright('----------------------------------------------------------------------')}`, `${chalk.gray('Die Abhängigkeit "ng2-pdf-viewer" wurde aktualisiert.')}`, `${chalk.gray('Diese Library verwendet intern die Abhängigkeit "pdfjs-dist@4.6.82".')}`, `${chalk.gray('Sollte der PDF-Worker NICHT mit der App ausgeliefert werden')}`, `${chalk.gray('siehe https://github.com/IHK-GfI/lux-components/wiki/lux%E2%80%90file%E2%80%90preview-v16')}`, `${chalk.gray('müssen die CSP-Abschnitte in den Konfigurationsdateien (ui-service/src/main/resources/application*.yml) im UI-Service angepasst werden!')}`, ``, `${chalk.yellowBright('Bitte einmal den "node_modules"-Ordner und die "package-lock.json"-Datei löschen und noch einmal "npm install" ausführen')}`, ``, `${chalk.greenBright('Fertig!')}`)
|
|
29
|
+
]);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function updateAngularJson(options) {
|
|
33
|
+
return (0, schematics_1.chain)([
|
|
34
|
+
(0, util_1.messageInfoRule)(`Die Datei angular.json wird verarbeitet...`),
|
|
35
|
+
(tree, _context) => {
|
|
36
|
+
(0, files_1.iterateFilesAndModifyContent)(tree, options.path, (filePath, content) => {
|
|
37
|
+
let result = content;
|
|
38
|
+
result = (0, util_1.replaceAll)(result, 'pdf.worker.min.js', 'pdf.worker.min.mjs');
|
|
39
|
+
result = (0, util_1.replaceAll)(result, 'node_modules/ng2-pdf-viewer/node_modules/pdfjs-dist/build', 'node_modules/pdfjs-dist/build');
|
|
40
|
+
if (content !== result) {
|
|
41
|
+
(0, logging_1.logInfo)(filePath + ' wurde angepasst.');
|
|
42
|
+
tree.overwrite(filePath, result);
|
|
43
|
+
}
|
|
44
|
+
}, 'angular.json');
|
|
45
|
+
},
|
|
46
|
+
(0, util_1.messageSuccessRule)(`Die Datei angular.json wurde verarbeitet.`)
|
|
47
|
+
]);
|
|
48
|
+
}
|
|
49
|
+
function updateAppModuleTs(options) {
|
|
50
|
+
return (0, schematics_1.chain)([
|
|
51
|
+
(0, util_1.messageInfoRule)(`Die Datei app.module.ts wird verarbeitet...`),
|
|
52
|
+
(tree, _context) => {
|
|
53
|
+
(0, files_1.iterateFilesAndModifyContent)(tree, options.path, (filePath, content) => {
|
|
54
|
+
let result = content;
|
|
55
|
+
result = (0, util_1.replaceAll)(result, 'pdf.worker.min.js', 'pdf.worker.min.mjs');
|
|
56
|
+
if (content !== result) {
|
|
57
|
+
(0, logging_1.logInfo)(filePath + ' wurde angepasst.');
|
|
58
|
+
tree.overwrite(filePath, result);
|
|
59
|
+
}
|
|
60
|
+
}, 'app.module.ts');
|
|
61
|
+
},
|
|
62
|
+
(0, util_1.messageSuccessRule)(`Die Datei app.module.ts wurde verarbeitet.`)
|
|
63
|
+
]);
|
|
64
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "luxupdate160500Schema",
|
|
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
|
+
}
|