@ihk-gfi/lux-components-update 19.3.0 → 19.4.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/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-19.4.0": {
10
+ "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 19.4.0",
11
+ "factory": "./src/updates/19.4.0/index#update190400",
12
+ "schema": "./src/updates/19.4.0/schema.json"
13
+ },
9
14
  "update-19.3.0": {
10
15
  "description": "Aktualisiert das LUX-Componentsprojekt auf die Version 19.3.0",
11
16
  "factory": "./src/updates/19.3.0/index#update190300",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ihk-gfi/lux-components-update",
3
- "version": "19.3.0",
3
+ "version": "19.4.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",
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.update190400 = update190400;
4
+ exports.fixEmptySchematicArray = fixEmptySchematicArray;
5
+ const schematics_1 = require("@angular-devkit/schematics");
6
+ const chalk = require("chalk");
7
+ const index_1 = require("../../update-dependencies/index");
8
+ const files_1 = require("../../utility/files");
9
+ const replace_item_1 = require("../../utility/replace-item");
10
+ const util_1 = require("../../utility/util");
11
+ function update190400(options, runNpmInstall = true) {
12
+ return (_tree, _context) => {
13
+ return (0, schematics_1.chain)([
14
+ (0, util_1.messageInfoRule)(`Die LUX-Components werden auf die Version 19.4.0 aktualisiert...`),
15
+ (0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
16
+ (0, index_1.updateDep)('@ihk-gfi/lux-components', '19.4.0', false),
17
+ (0, index_1.updateDep)('@ihk-gfi/lux-components-theme', '19.2.0', false),
18
+ updateMessages(options),
19
+ fixEmptySchematicArray(options),
20
+ (0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 19.4.0 aktualisiert.`),
21
+ (0, util_1.finish)(runNpmInstall, `${chalk.yellowBright('Fertig!')}`)
22
+ ]);
23
+ };
24
+ }
25
+ function updateMessages(options) {
26
+ return (_tree, _context) => {
27
+ const deFilePath = (options.path ?? '') + '/src/locale/messages.xlf';
28
+ const enFilePath = (options.path ?? '') + '/src/locale/messages.en.xlf';
29
+ const beforeId = `luxc.filter.title`;
30
+ const deFilterButton = `<trans-unit id="luxc.filter.trigger.btn" datatype="html">
31
+ <source>Filtereinstellungen</source>
32
+ <context-group purpose="location">
33
+ <context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-filter/lux-filter-form/lux-filter-form.component.html</context>
34
+ <context context-type="linenumber">1</context>
35
+ </context-group>
36
+ </trans-unit>`;
37
+ const enFilterButton = `<trans-unit id="luxc.filter.trigger.btn" datatype="html">
38
+ <source>Filtereinstellungen</source>
39
+ <target>Filter Settings</target>
40
+ <context-group purpose="location">
41
+ <context context-type="sourcefile">projects/lux-components-lib/src/lib/lux-filter/lux-filter-form/lux-filter-form.component.html</context>
42
+ <context context-type="linenumber">1</context>
43
+ </context-group>
44
+ </trans-unit>`;
45
+ return (0, schematics_1.chain)([
46
+ (0, files_1.replaceRule)(options, `Messages (de) werden angepasst...`, `Messages (de) wurden angepasst.`, deFilePath, new replace_item_1.AddTransUnitItem(beforeId, deFilterButton)),
47
+ (0, files_1.replaceRule)(options, `Messages (en) werden angepasst...`, `Messages (en) wurden angepasst.`, enFilePath, new replace_item_1.AddTransUnitItem(beforeId, enFilterButton))
48
+ ]);
49
+ };
50
+ }
51
+ function fixEmptySchematicArray(options) {
52
+ return (tree, _context) => {
53
+ const angularJsonPath = (options.path ?? '') + '/angular.json';
54
+ if (tree.exists(angularJsonPath)) {
55
+ return (0, schematics_1.chain)([
56
+ (0, files_1.replaceRule)(options, 'angular.json wird aktualisiert...', 'angular.json wurde aktualisiert.', angularJsonPath, new replace_item_1.ReplaceItem(/"schematicCollections"\s*:\s*\[\s*\]\s*,?/g, ''))
57
+ ]);
58
+ }
59
+ else {
60
+ return tree;
61
+ }
62
+ };
63
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft-07/schema",
3
+ "$id": "luxupdate190400Schema",
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
+ }