@ihk-gfi/lux-components-update 16.6.1 → 18.0.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.
Files changed (44) hide show
  1. package/README.md +3 -3
  2. package/add-lux-components/files/src/main.ts +0 -5
  3. package/add-lux-components/index.js +9 -19
  4. package/collection.json +4 -49
  5. package/package.json +10 -10
  6. package/update-dependencies/index.js +45 -46
  7. package/updates/18.0.0/index.d.ts +13 -0
  8. package/updates/18.0.0/index.js +125 -0
  9. package/utility/files.d.ts +2 -0
  10. package/utility/files.js +26 -2
  11. package/utility/replace-item.d.ts +18 -0
  12. package/utility/replace-item.js +35 -0
  13. package/utility/util.d.ts +2 -0
  14. package/utility/util.js +8 -0
  15. package/updates/16.0.0/index.d.ts +0 -9
  16. package/updates/16.0.0/index.js +0 -66
  17. package/updates/16.0.1/index.d.ts +0 -2
  18. package/updates/16.0.1/index.js +0 -18
  19. package/updates/16.0.1/schema.json +0 -23
  20. package/updates/16.1.0/index.d.ts +0 -2
  21. package/updates/16.1.0/index.js +0 -19
  22. package/updates/16.1.0/schema.json +0 -23
  23. package/updates/16.2.0/index.d.ts +0 -2
  24. package/updates/16.2.0/index.js +0 -21
  25. package/updates/16.2.0/schema.json +0 -23
  26. package/updates/16.3.0/index.d.ts +0 -2
  27. package/updates/16.3.0/index.js +0 -19
  28. package/updates/16.3.0/schema.json +0 -23
  29. package/updates/16.4.0/index.d.ts +0 -2
  30. package/updates/16.4.0/index.js +0 -19
  31. package/updates/16.4.0/schema.json +0 -23
  32. package/updates/16.4.1/index.d.ts +0 -2
  33. package/updates/16.4.1/index.js +0 -18
  34. package/updates/16.4.1/schema.json +0 -23
  35. package/updates/16.4.2/index.d.ts +0 -2
  36. package/updates/16.4.2/index.js +0 -18
  37. package/updates/16.4.2/schema.json +0 -23
  38. package/updates/16.5.0/index.d.ts +0 -4
  39. package/updates/16.5.0/index.js +0 -59
  40. package/updates/16.5.0/schema.json +0 -23
  41. package/updates/16.6.0/index.d.ts +0 -4
  42. package/updates/16.6.0/index.js +0 -55
  43. package/updates/16.6.0/schema.json +0 -23
  44. /package/updates/{16.0.0 → 18.0.0}/schema.json +0 -0
@@ -1,66 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.i18nEn = exports.i18nDe = exports.updateNodeMinVersion = exports.updateMinVersion = exports.updateMajorVersion = void 0;
4
- exports.update160000 = update160000;
5
- exports.updateProject = updateProject;
6
- exports.updateI18NFiles = updateI18NFiles;
7
- const schematics_1 = require("@angular-devkit/schematics");
8
- const chalk = require("chalk");
9
- const index_1 = require("../../update-dependencies/index");
10
- const logging_1 = require("../../utility/logging");
11
- const util_1 = require("../../utility/util");
12
- const validation_1 = require("../../utility/validation");
13
- exports.updateMajorVersion = '16';
14
- exports.updateMinVersion = '15.5.1';
15
- exports.updateNodeMinVersion = '18.0.0';
16
- function update160000(options) {
17
- return (_tree, _context) => {
18
- return (0, schematics_1.chain)([
19
- check(options),
20
- (0, util_1.applyRuleIf)(exports.updateMinVersion, updateProject(options)),
21
- (0, util_1.finish)(false, `${chalk.yellowBright('Wichtig!!!')} Hinweise im Update Guide beachten -> https://github.com/IHK-GfI/lux-components/wiki/update-guide-v${exports.updateMajorVersion}`)
22
- ]);
23
- };
24
- }
25
- function updateProject(_options) {
26
- return (_tree, _context) => {
27
- return (0, schematics_1.chain)([
28
- (0, util_1.messageInfoRule)(`LUX-Components ${exports.updateMajorVersion} werden aktualisiert...`),
29
- (0, index_1.updateDependencies)(),
30
- updateI18NFiles(),
31
- (0, util_1.messageSuccessRule)(`LUX-Components ${exports.updateMajorVersion} wurden aktualisiert.`)
32
- ]);
33
- };
34
- }
35
- function check(_options) {
36
- return (tree, _context) => {
37
- (0, logging_1.logInfoWithDescriptor)(`Vorbedingungen werden geprüft...`);
38
- (0, validation_1.validateNodeVersion)(_context, exports.updateNodeMinVersion);
39
- (0, validation_1.validateLuxComponentsVersion)(tree, `${exports.updateMinVersion} || ^${exports.updateMajorVersion}.0.0`);
40
- (0, logging_1.logSuccess)(`Vorbedingungen wurden geprüft.`);
41
- return tree;
42
- };
43
- }
44
- function updateI18NFiles() {
45
- return (tree, _context) => {
46
- (0, util_1.messageInfoRule)(`I18n-Dateien werden angepasst...`),
47
- (0, util_1.updateI18nFile)(tree, 'de', 'luxc.paginator.elements_on_page', exports.i18nDe);
48
- (0, util_1.updateI18nFile)(tree, 'en', 'luxc.paginator.elements_on_page', exports.i18nEn);
49
- (0, util_1.messageInfoRule)(`I18n-Dateien wurden angepasst.`);
50
- };
51
- }
52
- exports.i18nDe = `<trans-unit id="luxc.dialog.btn.close.arialabel" datatype="html">
53
- <source>Dialog schließen</source>
54
- <context-group purpose="location">
55
- <context context-type="sourcefile">src/app/modules/lux-popups/lux-dialog/lux-dialog-structure/lux-dialog-structure.component.html</context>
56
- <context context-type="linenumber">16</context>
57
- </context-group>
58
- </trans-unit>`;
59
- exports.i18nEn = `<trans-unit id="luxc.dialog.btn.close.arialabel" datatype="html">
60
- <source>Dialog schließen</source>
61
- <target>Dialog close</target>
62
- <context-group purpose="location">
63
- <context context-type="sourcefile">src/app/modules/lux-popups/lux-dialog/lux-dialog-structure/lux-dialog-structure.component.html</context>
64
- <context context-type="linenumber">16</context>
65
- </context-group>
66
- </trans-unit>`;
@@ -1,2 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare function update160001(_options: any, runNpmInstall?: boolean): Rule;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.update160001 = update160001;
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 update160001(_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.0.1 aktualisiert...`),
12
- (0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
13
- (0, index_1.updateDep)('@ihk-gfi/lux-components', '16.0.1', false),
14
- (0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 16.0.1 aktualisiert.`),
15
- (0, util_1.finish)(runNpmInstall, `${chalk.yellowBright('Fertig!')}`)
16
- ]);
17
- };
18
- }
@@ -1,23 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "$id": "luxupdate160001Schema",
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
- }
@@ -1,2 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare function update160100(_options: any, runNpmInstall?: boolean): Rule;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.update160100 = update160100;
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 update160100(_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.1.0 aktualisiert...`),
12
- (0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
13
- (0, index_1.updateDep)('@ihk-gfi/lux-components', '16.1.0', false),
14
- (0, index_1.updateDep)('@ihk-gfi/lux-components-theme', '16.0.1', false),
15
- (0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 16.1.0 aktualisiert.`),
16
- (0, util_1.finish)(runNpmInstall, `${chalk.yellowBright('Fertig!')}`)
17
- ]);
18
- };
19
- }
@@ -1,23 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "$id": "luxupdate160100Schema",
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
- }
@@ -1,2 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare function update160200(_options: any, runNpmInstall?: boolean): Rule;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.update160200 = update160200;
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 update160200(_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.2.0 aktualisiert...`),
12
- (0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
13
- (0, index_1.updateDep)('@ihk-gfi/lux-components', '16.2.0', false),
14
- (0, index_1.updateDep)('@ihk-gfi/lux-components-theme', '16.0.2', false),
15
- (0, index_1.updateDevDep)('@angular-devkit/build-angular', '16.2.14', false),
16
- (0, index_1.updateDevDep)('@angular/cli', '16.2.14', false),
17
- (0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 16.2.0 aktualisiert.`),
18
- (0, util_1.finish)(runNpmInstall, `${chalk.yellowBright('Fertig!')}`)
19
- ]);
20
- };
21
- }
@@ -1,23 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "$id": "luxupdate160200Schema",
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
- }
@@ -1,2 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare function update160300(_options: any, runNpmInstall?: boolean): Rule;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.update160300 = update160300;
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 update160300(_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.3.0 aktualisiert...`),
12
- (0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
13
- (0, index_1.updateDep)('@ihk-gfi/lux-components', '16.3.0', false),
14
- (0, index_1.updateDep)('@ihk-gfi/lux-components-theme', '16.1.0', false),
15
- (0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 16.3.0 aktualisiert.`),
16
- (0, util_1.finish)(runNpmInstall, `${chalk.yellowBright('Fertig!')}`)
17
- ]);
18
- };
19
- }
@@ -1,23 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "$id": "luxupdate160300Schema",
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
- }
@@ -1,2 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare function update160400(_options: any, runNpmInstall?: boolean): Rule;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.update160400 = update160400;
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 update160400(_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.0 aktualisiert...`),
12
- (0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
13
- (0, index_1.updateDep)('@ihk-gfi/lux-components', '16.4.0', false),
14
- (0, index_1.updateDep)('@ihk-gfi/lux-components-theme', '16.2.0', false),
15
- (0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 16.4.0 aktualisiert.`),
16
- (0, util_1.finish)(runNpmInstall, `${chalk.yellowBright('Fertig!')}`)
17
- ]);
18
- };
19
- }
@@ -1,23 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "$id": "luxupdate160400Schema",
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
- }
@@ -1,2 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare function update160401(_options: any, runNpmInstall?: boolean): Rule;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.update160401 = update160401;
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 update160401(_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.1 aktualisiert...`),
12
- (0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
13
- (0, index_1.updateDep)('@ihk-gfi/lux-components', '16.4.1', false),
14
- (0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 16.4.1 aktualisiert.`),
15
- (0, util_1.finish)(runNpmInstall, `${chalk.yellowBright('Fertig!')}`)
16
- ]);
17
- };
18
- }
@@ -1,23 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "$id": "luxupdate160401Schema",
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
- }
@@ -1,2 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare function update160402(_options: any, runNpmInstall?: boolean): Rule;
@@ -1,18 +0,0 @@
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
- }
@@ -1,23 +0,0 @@
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
- }
@@ -1,4 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare function update160500(options: any, runNpmInstall?: boolean): Rule;
3
- export declare function updateAngularJson(options: any): Rule;
4
- export declare function updateAppModuleTs(options: any): Rule;
@@ -1,59 +0,0 @@
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 json_1 = require("../../utility/json");
11
- const files_1 = require("../../utility/files");
12
- const logging_1 = require("../../utility/logging");
13
- function update160500(options, runNpmInstall = true) {
14
- return (_tree, _context) => {
15
- return (0, schematics_1.chain)([
16
- (0, util_1.messageInfoRule)(`Die LUX-Components werden auf die Version 16.5.0 aktualisiert...`),
17
- (0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
18
- (0, index_1.updateDep)('@ihk-gfi/lux-components', '16.5.0', false),
19
- (0, index_1.updateDep)('@ihk-gfi/lux-components-theme', '16.3.0', false),
20
- (0, index_1.updateDevDep)('@angular-devkit/build-angular', '16.2.15', false),
21
- (0, index_1.updateDevDep)('@angular/cli', '16.2.15', false),
22
- (0, index_1.updateDevDep)('@compodoc/compodoc', '1.1.25', true),
23
- (0, index_1.updateDep)('ng2-pdf-viewer', '10.3.0', true),
24
- (0, index_1.deleteDep)('pdfjs-dist'),
25
- (0, index_1.deleteDevDep)('pdfjs-dist'),
26
- updateAngularJson(options),
27
- updateAppModuleTs(options),
28
- (0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 16.5.0 aktualisiert.`),
29
- (0, util_1.finish)(runNpmInstall, ``, `${chalk.yellowBright('Die folgenden manuellen Schritte müssen nur ausgeführt werden,')}`, `${chalk.yellowBright('wenn die App die LUX-File-Preview (PDF-Vorschau) einsetzt')}`, `${chalk.yellowBright('----------------------------------------------------------------------')}`, `${chalk.yellowBright('1. Bitte einmal den "node_modules"-Ordner und die "package-lock.json"-Datei löschen und noch einmal "npm install" ausführen.')}`, `${chalk.yellowBright('2. Die Datei "./node_modules/pdfjs-dist/build/pdf.worker.min.mjs" in den Ordner "src/assets/pdf" kopieren.')}`, `${chalk.yellowBright('3. Die Datei "pdf.worker.min.mjs" in "pdf.worker.min.js" umbenennen.')}`, `${chalk.yellowBright('4. Prüfen, ob in der "app.module.ts" die folgende Zeile "(window as any).pdfWorkerSrc = "/assets/pdf/pdf.worker.min.js"; enthalten ist.')}`, `${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.greenBright('Fertig!')}`)
30
- ]);
31
- };
32
- }
33
- function updateAngularJson(options) {
34
- var _a, _b, _c, _d;
35
- return (0, schematics_1.chain)([
36
- (0, util_1.messageInfoRule)(`Die Datei angular.json wird verarbeitet...`),
37
- (0, util_1.applyRuleIfFileExists)((0, json_1.deleteJsonArray)(options.path + '/angular.json', ['projects', options.project, 'architect', 'build', 'options', 'assets'], (node) => (0, json_1.findObjectPropertyInArray)(node, 'glob', 'pdf.worker.min.js')), ((_a = options.path) !== null && _a !== void 0 ? _a : '.') + '/angular.json'),
38
- (0, util_1.applyRuleIfFileExists)((0, json_1.deleteJsonArray)(options.path + '/angular.json', ['projects', options.project, 'architect', 'test', 'options', 'assets'], (node) => (0, json_1.findObjectPropertyInArray)(node, 'glob', 'pdf.worker.min.js')), ((_b = options.path) !== null && _b !== void 0 ? _b : '.') + '/angular.json'),
39
- (0, util_1.applyRuleIfFileExists)((0, json_1.deleteJsonArray)(options.path + '/angular.json', ['projects', options.project, 'architect', 'build', 'options', 'assets'], (node) => (0, json_1.findObjectPropertyInArray)(node, 'glob', 'pdf.worker.min.mjs')), ((_c = options.path) !== null && _c !== void 0 ? _c : '.') + '/angular.json'),
40
- (0, util_1.applyRuleIfFileExists)((0, json_1.deleteJsonArray)(options.path + '/angular.json', ['projects', options.project, 'architect', 'test', 'options', 'assets'], (node) => (0, json_1.findObjectPropertyInArray)(node, 'glob', 'pdf.worker.min.mjs')), ((_d = options.path) !== null && _d !== void 0 ? _d : '.') + '/angular.json'),
41
- (0, util_1.messageSuccessRule)(`Die Datei angular.json wurde verarbeitet.`)
42
- ]);
43
- }
44
- function updateAppModuleTs(options) {
45
- return (0, schematics_1.chain)([
46
- (0, util_1.messageInfoRule)(`Die Datei app.module.ts wird verarbeitet...`),
47
- (tree, _context) => {
48
- (0, files_1.iterateFilesAndModifyContent)(tree, options.path, (filePath, content) => {
49
- let result = content;
50
- result = (0, util_1.replaceAll)(result, 'pdf.worker.min.mjs', 'pdf.worker.min.js');
51
- if (content !== result) {
52
- (0, logging_1.logInfo)(filePath + ' wurde angepasst.');
53
- tree.overwrite(filePath, result);
54
- }
55
- }, 'app.module.ts');
56
- },
57
- (0, util_1.messageSuccessRule)(`Die Datei app.module.ts wurde verarbeitet.`)
58
- ]);
59
- }
@@ -1,23 +0,0 @@
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
- }
@@ -1,4 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare function update160600(options: any, runNpmInstall?: boolean): Rule;
3
- export declare function updateAngularJson(options: any): Rule;
4
- export declare function updateAppModuleTs(options: any): Rule;
@@ -1,55 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.update160600 = update160600;
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
- const json_1 = require("../../utility/json");
13
- function update160600(options, runNpmInstall = true) {
14
- return (_tree, _context) => {
15
- return (0, schematics_1.chain)([
16
- (0, util_1.messageInfoRule)(`Die LUX-Components werden auf die Version 16.6.0 aktualisiert...`),
17
- (0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
18
- (0, index_1.updateDep)('@ihk-gfi/lux-components', '16.6.0', false),
19
- (0, index_1.updateDep)('dompurify', '~3.1.6', true),
20
- (0, index_1.updateDevDep)('@angular-devkit/build-angular', '16.2.16', false),
21
- (0, index_1.updateDevDep)('@angular/cli', '16.2.16', false),
22
- updateAngularJson(options),
23
- updateAppModuleTs(options),
24
- (0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 16.6.0 aktualisiert.`),
25
- (0, util_1.finish)(runNpmInstall, ``, `${chalk.yellowBright('Die folgenden manuellen Schritte müssen nur ausgeführt werden,')}`, `${chalk.yellowBright('wenn die App die LUX-File-Preview (PDF-Vorschau) einsetzt')}`, `${chalk.yellowBright('----------------------------------------------------------------------')}`, `${chalk.yellowBright('1. Bitte einmal den "node_modules"-Ordner und die "package-lock.json"-Datei löschen und noch einmal "npm install" ausführen.')}`, `${chalk.yellowBright('2. Die Datei "./node_modules/pdfjs-dist/build/pdf.worker.min.mjs" in den Ordner "src/assets/pdf" kopieren.')}`, `${chalk.yellowBright('3. Die Datei "pdf.worker.min.mjs" in "pdf.worker.min.js" umbenennen.')}`, `${chalk.yellowBright('4. Prüfen, ob in der "app.module.ts" die folgende Zeile "(window as any).pdfWorkerSrc = "/assets/pdf/pdf.worker.min.js"; enthalten ist.')}`, `${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.greenBright('Fertig!')}`)
26
- ]);
27
- };
28
- }
29
- function updateAngularJson(options) {
30
- var _a, _b, _c, _d;
31
- return (0, schematics_1.chain)([
32
- (0, util_1.messageInfoRule)(`Die Datei angular.json wird verarbeitet...`),
33
- (0, util_1.applyRuleIfFileExists)((0, json_1.deleteJsonArray)(options.path + '/angular.json', ['projects', options.project, 'architect', 'build', 'options', 'assets'], (node) => (0, json_1.findObjectPropertyInArray)(node, 'glob', 'pdf.worker.min.js')), ((_a = options.path) !== null && _a !== void 0 ? _a : '.') + '/angular.json'),
34
- (0, util_1.applyRuleIfFileExists)((0, json_1.deleteJsonArray)(options.path + '/angular.json', ['projects', options.project, 'architect', 'test', 'options', 'assets'], (node) => (0, json_1.findObjectPropertyInArray)(node, 'glob', 'pdf.worker.min.js')), ((_b = options.path) !== null && _b !== void 0 ? _b : '.') + '/angular.json'),
35
- (0, util_1.applyRuleIfFileExists)((0, json_1.deleteJsonArray)(options.path + '/angular.json', ['projects', options.project, 'architect', 'build', 'options', 'assets'], (node) => (0, json_1.findObjectPropertyInArray)(node, 'glob', 'pdf.worker.min.mjs')), ((_c = options.path) !== null && _c !== void 0 ? _c : '.') + '/angular.json'),
36
- (0, util_1.applyRuleIfFileExists)((0, json_1.deleteJsonArray)(options.path + '/angular.json', ['projects', options.project, 'architect', 'test', 'options', 'assets'], (node) => (0, json_1.findObjectPropertyInArray)(node, 'glob', 'pdf.worker.min.mjs')), ((_d = options.path) !== null && _d !== void 0 ? _d : '.') + '/angular.json'),
37
- (0, util_1.messageSuccessRule)(`Die Datei angular.json wurde verarbeitet.`)
38
- ]);
39
- }
40
- function updateAppModuleTs(options) {
41
- return (0, schematics_1.chain)([
42
- (0, util_1.messageInfoRule)(`Die Datei app.module.ts wird verarbeitet...`),
43
- (tree, _context) => {
44
- (0, files_1.iterateFilesAndModifyContent)(tree, options.path, (filePath, content) => {
45
- let result = content;
46
- result = (0, util_1.replaceAll)(result, 'pdf.worker.min.mjs', 'pdf.worker.min.js');
47
- if (content !== result) {
48
- (0, logging_1.logInfo)(filePath + ' wurde angepasst.');
49
- tree.overwrite(filePath, result);
50
- }
51
- }, 'app.module.ts');
52
- },
53
- (0, util_1.messageSuccessRule)(`Die Datei app.module.ts wurde verarbeitet.`)
54
- ]);
55
- }
@@ -1,23 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "$id": "luxupdate160600Schema",
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
- }
File without changes