@ihk-gfi/lux-components-update 14.8.0 → 15.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.
- package/README.md +4 -2
- package/add-lux-components/files/app/app.component.html +34 -0
- package/{src/add-lux-components → add-lux-components}/files/app/app.component.spec.ts +4 -2
- package/{src/add-lux-components → add-lux-components}/files/app/app.component.ts +1 -1
- package/add-lux-components/files/src/main.ts +17 -0
- package/{src/add-lux-components → add-lux-components}/index.js +29 -30
- package/add-lux-components/schema.json +23 -0
- package/collection.json +35 -0
- package/package.json +27 -27
- package/{src/theme → theme}/change-theme-to-authentic/index.js +0 -1
- package/theme/change-theme-to-authentic/schema.json +23 -0
- package/{src/theme → theme}/change-to-lux-icons/index.js +0 -1
- package/theme/change-to-lux-icons/schema.json +23 -0
- package/{src/update-dependencies → update-dependencies}/index.d.ts +1 -0
- package/update-dependencies/index.js +92 -0
- package/update-dependencies/schema.json +23 -0
- package/{src/update-en-messages → update-en-messages}/index.js +0 -1
- package/update-en-messages/schema.json +23 -0
- package/updates/15.0.0/index.d.ts +8 -0
- package/updates/15.0.0/index.js +109 -0
- package/updates/15.0.0/schema.json +23 -0
- package/{src/utility → utility}/dependencies.js +0 -1
- package/{src/utility → utility}/files.js +0 -1
- package/{src/utility → utility}/html/hit.js +0 -1
- package/{src/utility → utility}/html/html-manipulator.js +0 -1
- package/{src/utility → utility}/html/manipulator-functions.js +0 -1
- package/{src/utility → utility}/json.d.ts +2 -0
- package/{src/utility → utility}/json.js +16 -8
- package/{src/utility → utility}/logging.js +0 -1
- package/{src/utility → utility}/test.js +0 -1
- package/{src/utility → utility}/typescript.js +0 -1
- package/{src/utility → utility}/util.js +0 -1
- package/{src/utility → utility}/validation.js +0 -1
- package/src/add-lux-components/files/app/app.component.html +0 -32
- package/src/add-lux-components/files/app/base/license-hint/license-hint.component.html +0 -7
- package/src/add-lux-components/files/app/base/license-hint/license-hint.component.ts +0 -18
- package/src/add-lux-components/files/app/error/error.component.html +0 -10
- package/src/add-lux-components/files/app/error/error.component.scss +0 -3
- package/src/add-lux-components/files/app/error/error.component.spec.ts +0 -49
- package/src/add-lux-components/files/app/error/error.component.ts +0 -17
- package/src/add-lux-components/files/app/home/home.component.html +0 -7
- package/src/add-lux-components/files/app/home/home.component.scss +0 -3
- package/src/add-lux-components/files/app/home/home.component.ts +0 -13
- package/src/add-lux-components/files/app/profil/profil.component.html +0 -1
- package/src/add-lux-components/files/app/profil/profil.component.scss +0 -0
- package/src/add-lux-components/files/app/profil/profil.component.spec.ts +0 -24
- package/src/add-lux-components/files/app/profil/profil.component.ts +0 -11
- package/src/add-lux-components/files/assets/svg/Example.svg +0 -6
- package/src/add-lux-components/files/assets/svg/android.svg +0 -2
- package/src/add-lux-components/files/assets/svg/box.svg +0 -690
- package/src/add-lux-components/files/assets/svg/demoAppLogo.svg +0 -1
- package/src/add-lux-components/files/assets/svg/red_power_button.svg +0 -67
- package/src/add-lux-components/files/assets/svg/svg2009.svg +0 -57457
- package/src/add-lux-components/files/src/polyfills.ts +0 -58
- package/src/add-lux-components/index.js.map +0 -1
- package/src/add-lux-components/index.ts +0 -293
- package/src/add-lux-components/index_spec.d.ts +0 -1
- package/src/add-lux-components/index_spec.js +0 -51
- package/src/add-lux-components/index_spec.js.map +0 -1
- package/src/add-lux-components/index_spec.ts +0 -55
- package/src/add-lux-components/schema.json +0 -23
- package/src/collection.json +0 -75
- package/src/theme/change-theme-to-authentic/index.js.map +0 -1
- package/src/theme/change-theme-to-authentic/index.ts +0 -131
- package/src/theme/change-theme-to-authentic/index_spec.d.ts +0 -1
- package/src/theme/change-theme-to-authentic/index_spec.js +0 -300
- package/src/theme/change-theme-to-authentic/index_spec.js.map +0 -1
- package/src/theme/change-theme-to-authentic/index_spec.ts +0 -321
- package/src/theme/change-theme-to-authentic/schema.json +0 -23
- package/src/theme/change-to-lux-icons/index.js.map +0 -1
- package/src/theme/change-to-lux-icons/index.ts +0 -392
- package/src/theme/change-to-lux-icons/index_spec.d.ts +0 -1
- package/src/theme/change-to-lux-icons/index_spec.js +0 -128
- package/src/theme/change-to-lux-icons/index_spec.js.map +0 -1
- package/src/theme/change-to-lux-icons/index_spec.ts +0 -130
- package/src/theme/change-to-lux-icons/schema.json +0 -23
- package/src/update-dependencies/index.js +0 -88
- package/src/update-dependencies/index.js.map +0 -1
- package/src/update-dependencies/index.ts +0 -86
- package/src/update-dependencies/schema.json +0 -23
- package/src/update-en-messages/index.js.map +0 -1
- package/src/update-en-messages/index.ts +0 -83
- package/src/update-en-messages/index_spec.d.ts +0 -1
- package/src/update-en-messages/index_spec.js +0 -174
- package/src/update-en-messages/index_spec.js.map +0 -1
- package/src/update-en-messages/index_spec.ts +0 -182
- package/src/update-en-messages/schema.json +0 -23
- package/src/updates/update140000/files/src/polyfills.ts +0 -70
- package/src/updates/update140000/index.d.ts +0 -14
- package/src/updates/update140000/index.js +0 -95
- package/src/updates/update140000/index.js.map +0 -1
- package/src/updates/update140000/index.ts +0 -110
- package/src/updates/update140000/index_spec.d.ts +0 -1
- package/src/updates/update140000/index_spec.js +0 -165
- package/src/updates/update140000/index_spec.js.map +0 -1
- package/src/updates/update140000/index_spec.ts +0 -171
- package/src/updates/update140000/schema.json +0 -23
- package/src/updates/update140100/index.d.ts +0 -5
- package/src/updates/update140100/index.js +0 -62
- package/src/updates/update140100/index.js.map +0 -1
- package/src/updates/update140100/index.ts +0 -60
- package/src/updates/update140100/index_spec.d.ts +0 -1
- package/src/updates/update140100/index_spec.js +0 -124
- package/src/updates/update140100/index_spec.js.map +0 -1
- package/src/updates/update140100/index_spec.ts +0 -137
- package/src/updates/update140100/schema.json +0 -23
- package/src/updates/update140200/index.d.ts +0 -8
- package/src/updates/update140200/index.js +0 -40
- package/src/updates/update140200/index.js.map +0 -1
- package/src/updates/update140200/index.ts +0 -38
- package/src/updates/update140200/index_spec.d.ts +0 -1
- package/src/updates/update140200/index_spec.js +0 -75
- package/src/updates/update140200/index_spec.js.map +0 -1
- package/src/updates/update140200/index_spec.ts +0 -81
- package/src/updates/update140200/schema.json +0 -23
- package/src/updates/update140300/index.d.ts +0 -10
- package/src/updates/update140300/index.js +0 -85
- package/src/updates/update140300/index.js.map +0 -1
- package/src/updates/update140300/index.ts +0 -86
- package/src/updates/update140300/index_spec.d.ts +0 -1
- package/src/updates/update140300/index_spec.js +0 -145
- package/src/updates/update140300/index_spec.js.map +0 -1
- package/src/updates/update140300/index_spec.ts +0 -177
- package/src/updates/update140300/schema.json +0 -23
- package/src/updates/update140400/index.d.ts +0 -2
- package/src/updates/update140400/index.js +0 -22
- package/src/updates/update140400/index.js.map +0 -1
- package/src/updates/update140400/index.ts +0 -18
- package/src/updates/update140400/index_spec.d.ts +0 -1
- package/src/updates/update140400/index_spec.js +0 -75
- package/src/updates/update140400/index_spec.js.map +0 -1
- package/src/updates/update140400/index_spec.ts +0 -81
- package/src/updates/update140400/schema.json +0 -23
- package/src/updates/update140500/index.d.ts +0 -2
- package/src/updates/update140500/index.js +0 -21
- package/src/updates/update140500/index.js.map +0 -1
- package/src/updates/update140500/index.ts +0 -17
- package/src/updates/update140500/index_spec.d.ts +0 -1
- package/src/updates/update140500/index_spec.js +0 -73
- package/src/updates/update140500/index_spec.js.map +0 -1
- package/src/updates/update140500/index_spec.ts +0 -78
- package/src/updates/update140500/schema.json +0 -23
- package/src/updates/update140600/index.d.ts +0 -2
- package/src/updates/update140600/index.js +0 -39
- package/src/updates/update140600/index.js.map +0 -1
- package/src/updates/update140600/index.ts +0 -35
- package/src/updates/update140600/index_spec.d.ts +0 -1
- package/src/updates/update140600/index_spec.js +0 -71
- package/src/updates/update140600/index_spec.js.map +0 -1
- package/src/updates/update140600/index_spec.ts +0 -75
- package/src/updates/update140600/schema.json +0 -23
- package/src/updates/update140700/index.d.ts +0 -2
- package/src/updates/update140700/index.js +0 -22
- package/src/updates/update140700/index.js.map +0 -1
- package/src/updates/update140700/index.ts +0 -18
- package/src/updates/update140700/index_spec.d.ts +0 -1
- package/src/updates/update140700/index_spec.js +0 -75
- package/src/updates/update140700/index_spec.js.map +0 -1
- package/src/updates/update140700/index_spec.ts +0 -79
- package/src/updates/update140700/schema.json +0 -23
- package/src/updates/update140800/index.d.ts +0 -2
- package/src/updates/update140800/index.js +0 -22
- package/src/updates/update140800/index.js.map +0 -1
- package/src/updates/update140800/index.ts +0 -18
- package/src/updates/update140800/index_spec.d.ts +0 -1
- package/src/updates/update140800/index_spec.js +0 -76
- package/src/updates/update140800/index_spec.js.map +0 -1
- package/src/updates/update140800/index_spec.ts +0 -82
- package/src/updates/update140800/schema.json +0 -23
- package/src/utility/dependencies.js.map +0 -1
- package/src/utility/dependencies.ts +0 -144
- package/src/utility/files.js.map +0 -1
- package/src/utility/files.ts +0 -368
- package/src/utility/html/hit.js.map +0 -1
- package/src/utility/html/hit.ts +0 -28
- package/src/utility/html/html-manipulator.js.map +0 -1
- package/src/utility/html/html-manipulator.ts +0 -156
- package/src/utility/html/html_spec.d.ts +0 -1
- package/src/utility/html/html_spec.js +0 -692
- package/src/utility/html/html_spec.js.map +0 -1
- package/src/utility/html/html_spec.ts +0 -751
- package/src/utility/html/manipulator-functions.js.map +0 -1
- package/src/utility/html/manipulator-functions.ts +0 -149
- package/src/utility/json.js.map +0 -1
- package/src/utility/json.ts +0 -288
- package/src/utility/json_spec.d.ts +0 -1
- package/src/utility/json_spec.js +0 -326
- package/src/utility/json_spec.js.map +0 -1
- package/src/utility/json_spec.ts +0 -446
- package/src/utility/logging.js.map +0 -1
- package/src/utility/logging.ts +0 -80
- package/src/utility/test.js.map +0 -1
- package/src/utility/test.ts +0 -24
- package/src/utility/typescript.js.map +0 -1
- package/src/utility/typescript.ts +0 -598
- package/src/utility/typescript_spec.d.ts +0 -1
- package/src/utility/typescript_spec.js +0 -1005
- package/src/utility/typescript_spec.js.map +0 -1
- package/src/utility/typescript_spec.ts +0 -1265
- package/src/utility/util.js.map +0 -1
- package/src/utility/util.ts +0 -145
- package/src/utility/validation.js.map +0 -1
- package/src/utility/validation.ts +0 -48
- package/tsconfig.json +0 -35
- /package/{src/add-lux-components → add-lux-components}/files/app/app-routing.module.ts +0 -0
- /package/{src/add-lux-components → add-lux-components}/files/app/app.module.ts +0 -0
- /package/{src/add-lux-components → add-lux-components}/files/environments/environment.prod.ts +0 -0
- /package/{src/add-lux-components → add-lux-components}/files/environments/environment.ts +0 -0
- /package/{src/add-lux-components → add-lux-components}/files/locale/messages.en.xlf +0 -0
- /package/{src/add-lux-components → add-lux-components}/files/locale/messages.xlf +0 -0
- /package/{src/add-lux-components → add-lux-components}/files/src/index.html +0 -0
- /package/{src/add-lux-components → add-lux-components}/index.d.ts +0 -0
- /package/{src/theme → theme}/change-theme-to-authentic/index.d.ts +0 -0
- /package/{src/theme → theme}/change-to-lux-icons/index.d.ts +0 -0
- /package/{src/update-en-messages → update-en-messages}/index.d.ts +0 -0
- /package/{src/utility → utility}/dependencies.d.ts +0 -0
- /package/{src/utility → utility}/files.d.ts +0 -0
- /package/{src/utility → utility}/html/hit.d.ts +0 -0
- /package/{src/utility → utility}/html/html-manipulator.d.ts +0 -0
- /package/{src/utility → utility}/html/manipulator-functions.d.ts +0 -0
- /package/{src/utility → utility}/logging.d.ts +0 -0
- /package/{src/utility → utility}/test.d.ts +0 -0
- /package/{src/utility → utility}/typescript.d.ts +0 -0
- /package/{src/utility → utility}/util.d.ts +0 -0
- /package/{src/utility → utility}/validation.d.ts +0 -0
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
13
|
-
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
14
|
-
const path = require("path");
|
|
15
|
-
const rxjs_1 = require("rxjs");
|
|
16
|
-
const dependencies_1 = require("../../utility/dependencies");
|
|
17
|
-
const test_1 = require("../../utility/test");
|
|
18
|
-
const util_1 = require("../../utility/util");
|
|
19
|
-
const index_1 = require("./index");
|
|
20
|
-
const collectionPath = path.join(__dirname, '../../collection.json');
|
|
21
|
-
describe('update140300', () => {
|
|
22
|
-
let appTree;
|
|
23
|
-
let runner;
|
|
24
|
-
let context;
|
|
25
|
-
const testOptions = {};
|
|
26
|
-
beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
27
|
-
runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
|
28
|
-
appTree = yield runner.runExternalSchematicAsync('@schematics/angular', 'workspace', test_1.workspaceOptions).toPromise();
|
|
29
|
-
appTree = yield runner.runExternalSchematicAsync('@schematics/angular', 'application', test_1.appOptions, appTree).toPromise();
|
|
30
|
-
util_1.UtilConfig.defaultWaitMS = 0;
|
|
31
|
-
const collection = runner.engine.createCollection(collectionPath);
|
|
32
|
-
const schematic = runner.engine.createSchematic('update-14.3.0', collection);
|
|
33
|
-
context = runner.engine.createContext(schematic);
|
|
34
|
-
testOptions.project = test_1.appOptions.name;
|
|
35
|
-
testOptions.path = test_1.workspaceOptions.newProjectRoot + '/' + test_1.appOptions.name;
|
|
36
|
-
testOptions.verbose = true;
|
|
37
|
-
}));
|
|
38
|
-
describe('[Rule] update140300', () => {
|
|
39
|
-
it('Sollte die Abhängigkeiten aktualisieren', (done) => {
|
|
40
|
-
appTree.overwrite('/package.json', `
|
|
41
|
-
{
|
|
42
|
-
"name": "Lorem ipsum",
|
|
43
|
-
"version": "0.0.32",
|
|
44
|
-
"scripts": {
|
|
45
|
-
"build": "tsc -p tsconfig.json",
|
|
46
|
-
"test": "npm run build && jasmine src/**/*_spec.js"
|
|
47
|
-
},
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"@angular/animations": "14.3.7",
|
|
50
|
-
"@angular/cdk": "14.3.7",
|
|
51
|
-
"@angular/common": "14.3.7",
|
|
52
|
-
"@ihk-gfi/lux-components": "14.2.0",
|
|
53
|
-
"@ihk-gfi/lux-components-theme": "14.2.0",
|
|
54
|
-
"@angular/compiler": "14.3.7",
|
|
55
|
-
"@ihk-gfi/lux-components-icons-and-fonts": "1.3.0"
|
|
56
|
-
},
|
|
57
|
-
"devDependencies": {
|
|
58
|
-
"@angular-devkit/build-angular": "14.3.5",
|
|
59
|
-
"@angular-eslint/builder": "14.2.1"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
`);
|
|
63
|
-
(0, schematics_1.callRule)((0, index_1.update140300)(testOptions), (0, rxjs_1.of)(appTree), context).subscribe(() => {
|
|
64
|
-
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components').version).not.toEqual('14.2.0');
|
|
65
|
-
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components').version).toEqual('14.3.0');
|
|
66
|
-
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components-theme').version).not.toEqual('14.2.0');
|
|
67
|
-
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components-theme').version).toEqual('14.4.0');
|
|
68
|
-
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components-icons-and-fonts').version).not.toEqual('1.3.0');
|
|
69
|
-
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components-icons-and-fonts').version).toEqual('1.4.0');
|
|
70
|
-
done();
|
|
71
|
-
}, (reason) => expect(reason).toBeUndefined());
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
describe('[Rule] updateStylesScss', () => {
|
|
75
|
-
it('Sollte die Datei "styles.scss" aktualisieren 01', (done) => {
|
|
76
|
-
const filePath = testOptions.path + '/src/styles.scss';
|
|
77
|
-
appTree.overwrite(filePath, updateStylesScssInit01);
|
|
78
|
-
(0, schematics_1.callRule)((0, index_1.updateStylesScss)(testOptions), (0, rxjs_1.of)(appTree), context).subscribe((success) => {
|
|
79
|
-
var _a;
|
|
80
|
-
const content = (_a = success.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
|
|
81
|
-
expect(content).toEqual(updateStylesScssResult01);
|
|
82
|
-
done();
|
|
83
|
-
}, (reason) => expect(reason).toBeUndefined());
|
|
84
|
-
});
|
|
85
|
-
it('Sollte die Datei "styles.scss" aktualisieren 02', (done) => {
|
|
86
|
-
const filePath = testOptions.path + '/src/styles.scss';
|
|
87
|
-
appTree.overwrite(filePath, updateStylesScssInit02);
|
|
88
|
-
(0, schematics_1.callRule)((0, index_1.updateStylesScss)(testOptions), (0, rxjs_1.of)(appTree), context).subscribe((success) => {
|
|
89
|
-
var _a;
|
|
90
|
-
const content = (_a = success.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
|
|
91
|
-
expect(content).toEqual(updateStylesScssResult02);
|
|
92
|
-
done();
|
|
93
|
-
}, (reason) => expect(reason).toBeUndefined());
|
|
94
|
-
});
|
|
95
|
-
it('Sollte die Datei "styles.scss" aktualisieren 03', (done) => {
|
|
96
|
-
const filePath = testOptions.path + '/src/styles.scss';
|
|
97
|
-
appTree.overwrite(filePath, updateStylesScssInit03);
|
|
98
|
-
(0, schematics_1.callRule)((0, index_1.updateStylesScss)(testOptions), (0, rxjs_1.of)(appTree), context).subscribe((success) => {
|
|
99
|
-
var _a;
|
|
100
|
-
const content = (_a = success.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
|
|
101
|
-
expect(content).toEqual(updateStylesScssResult03);
|
|
102
|
-
done();
|
|
103
|
-
}, (reason) => expect(reason).toBeUndefined());
|
|
104
|
-
});
|
|
105
|
-
it('Sollte einen Fehler werfen, wenn die Datei "styles.scss" fehlt', (done) => {
|
|
106
|
-
const filePath = testOptions.path + '/src/styles.scss';
|
|
107
|
-
appTree.delete(filePath);
|
|
108
|
-
(0, schematics_1.callRule)((0, index_1.updateStylesScss)(testOptions), (0, rxjs_1.of)(appTree), context).subscribe(() => { }, (reason) => {
|
|
109
|
-
expect(reason).toEqual(new Error(`Die Datei ${filePath} konnte nicht gefunden werden.`));
|
|
110
|
-
done();
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
const updateStylesScssInit01 = `/* You can add global styles to this file, and also import other style files */
|
|
116
|
-
`;
|
|
117
|
-
const updateStylesScssResult01 = `/* You can add global styles to this file, and also import other style files */
|
|
118
|
-
@import '@ihk-gfi/lux-components-theme/src/base/luxfonts';
|
|
119
|
-
|
|
120
|
-
$basepath: '/';
|
|
121
|
-
@include web-fonts($basepath);
|
|
122
|
-
`;
|
|
123
|
-
const updateStylesScssInit02 = ``;
|
|
124
|
-
const updateStylesScssResult02 = `@import '@ihk-gfi/lux-components-theme/src/base/luxfonts';
|
|
125
|
-
|
|
126
|
-
$basepath: '/';
|
|
127
|
-
@include web-fonts($basepath);
|
|
128
|
-
`;
|
|
129
|
-
const updateStylesScssInit03 = `/* You can add global styles to this file, and also import other style files */
|
|
130
|
-
|
|
131
|
-
.test {
|
|
132
|
-
width: 12px;
|
|
133
|
-
}
|
|
134
|
-
`;
|
|
135
|
-
const updateStylesScssResult03 = `/* You can add global styles to this file, and also import other style files */
|
|
136
|
-
@import '@ihk-gfi/lux-components-theme/src/base/luxfonts';
|
|
137
|
-
|
|
138
|
-
.test {
|
|
139
|
-
width: 12px;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
$basepath: '/';
|
|
143
|
-
@include web-fonts($basepath);
|
|
144
|
-
`;
|
|
145
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CAAC,SAAS,CAC/E,GAAG,EAAE,GAAE,CAAC,EACR,CAAC,MAAM,EAAE,EAAE;gBACT,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,aAAa,QAAQ,gCAAgC,CAAC,CAAC,CAAC;gBACzF,IAAI,EAAE,CAAC;YACT,CAAC,CACF,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,sBAAsB,GAAG;CAC9B,CAAC;AAEF,MAAM,wBAAwB,GAAG;;;;;CAKhC,CAAC;AAEF,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAElC,MAAM,wBAAwB,GAAG;;;;CAIhC,CAAC;AAEF,MAAM,sBAAsB,GAAG;;;;;CAK9B,CAAC;AAEF,MAAM,wBAAwB,GAAG;;;;;;;;;CAShC,CAAC"}
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import { callRule, SchematicContext } from '@angular-devkit/schematics';
|
|
2
|
-
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
|
|
3
|
-
import * as path from 'path';
|
|
4
|
-
import { of as observableOf } from 'rxjs';
|
|
5
|
-
import { getPackageJsonDependency } from '../../utility/dependencies';
|
|
6
|
-
import { appOptions, workspaceOptions } from '../../utility/test';
|
|
7
|
-
import { UtilConfig } from '../../utility/util';
|
|
8
|
-
import { update140300, updateStylesScss } from './index';
|
|
9
|
-
|
|
10
|
-
const collectionPath = path.join(__dirname, '../../collection.json');
|
|
11
|
-
|
|
12
|
-
describe('update140300', () => {
|
|
13
|
-
let appTree: UnitTestTree;
|
|
14
|
-
let runner: SchematicTestRunner;
|
|
15
|
-
let context: SchematicContext;
|
|
16
|
-
|
|
17
|
-
const testOptions: any = {};
|
|
18
|
-
|
|
19
|
-
beforeEach(async () => {
|
|
20
|
-
runner = new SchematicTestRunner('schematics', collectionPath);
|
|
21
|
-
|
|
22
|
-
appTree = await runner.runExternalSchematicAsync('@schematics/angular', 'workspace', workspaceOptions).toPromise();
|
|
23
|
-
appTree = await runner.runExternalSchematicAsync('@schematics/angular', 'application', appOptions, appTree).toPromise();
|
|
24
|
-
|
|
25
|
-
UtilConfig.defaultWaitMS = 0;
|
|
26
|
-
|
|
27
|
-
const collection = runner.engine.createCollection(collectionPath);
|
|
28
|
-
const schematic = runner.engine.createSchematic('update-14.3.0', collection);
|
|
29
|
-
context = runner.engine.createContext(schematic);
|
|
30
|
-
|
|
31
|
-
testOptions.project = appOptions.name;
|
|
32
|
-
testOptions.path = workspaceOptions.newProjectRoot + '/' + appOptions.name;
|
|
33
|
-
testOptions.verbose = true;
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
describe('[Rule] update140300', () => {
|
|
37
|
-
it('Sollte die Abhängigkeiten aktualisieren', (done) => {
|
|
38
|
-
appTree.overwrite(
|
|
39
|
-
'/package.json',
|
|
40
|
-
`
|
|
41
|
-
{
|
|
42
|
-
"name": "Lorem ipsum",
|
|
43
|
-
"version": "0.0.32",
|
|
44
|
-
"scripts": {
|
|
45
|
-
"build": "tsc -p tsconfig.json",
|
|
46
|
-
"test": "npm run build && jasmine src/**/*_spec.js"
|
|
47
|
-
},
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"@angular/animations": "14.3.7",
|
|
50
|
-
"@angular/cdk": "14.3.7",
|
|
51
|
-
"@angular/common": "14.3.7",
|
|
52
|
-
"@ihk-gfi/lux-components": "14.2.0",
|
|
53
|
-
"@ihk-gfi/lux-components-theme": "14.2.0",
|
|
54
|
-
"@angular/compiler": "14.3.7",
|
|
55
|
-
"@ihk-gfi/lux-components-icons-and-fonts": "1.3.0"
|
|
56
|
-
},
|
|
57
|
-
"devDependencies": {
|
|
58
|
-
"@angular-devkit/build-angular": "14.3.5",
|
|
59
|
-
"@angular-eslint/builder": "14.2.1"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
`
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
callRule(update140300(testOptions), observableOf(appTree), context).subscribe(
|
|
66
|
-
() => {
|
|
67
|
-
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).not.toEqual('14.2.0');
|
|
68
|
-
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).toEqual('14.3.0');
|
|
69
|
-
|
|
70
|
-
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-theme').version).not.toEqual('14.2.0');
|
|
71
|
-
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-theme').version).toEqual('14.4.0');
|
|
72
|
-
|
|
73
|
-
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-icons-and-fonts').version).not.toEqual('1.3.0');
|
|
74
|
-
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-icons-and-fonts').version).toEqual('1.4.0');
|
|
75
|
-
done();
|
|
76
|
-
},
|
|
77
|
-
(reason) => expect(reason).toBeUndefined()
|
|
78
|
-
);
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
describe('[Rule] updateStylesScss', () => {
|
|
83
|
-
it('Sollte die Datei "styles.scss" aktualisieren 01', (done) => {
|
|
84
|
-
const filePath = testOptions.path + '/src/styles.scss';
|
|
85
|
-
appTree.overwrite(filePath, updateStylesScssInit01);
|
|
86
|
-
|
|
87
|
-
callRule(updateStylesScss(testOptions), observableOf(appTree), context).subscribe(
|
|
88
|
-
(success) => {
|
|
89
|
-
const content = success.read(filePath)?.toString();
|
|
90
|
-
|
|
91
|
-
expect(content).toEqual(updateStylesScssResult01);
|
|
92
|
-
done();
|
|
93
|
-
},
|
|
94
|
-
(reason) => expect(reason).toBeUndefined()
|
|
95
|
-
);
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
it('Sollte die Datei "styles.scss" aktualisieren 02', (done) => {
|
|
99
|
-
const filePath = testOptions.path + '/src/styles.scss';
|
|
100
|
-
appTree.overwrite(filePath, updateStylesScssInit02);
|
|
101
|
-
|
|
102
|
-
callRule(updateStylesScss(testOptions), observableOf(appTree), context).subscribe(
|
|
103
|
-
(success) => {
|
|
104
|
-
const content = success.read(filePath)?.toString();
|
|
105
|
-
|
|
106
|
-
expect(content).toEqual(updateStylesScssResult02);
|
|
107
|
-
done();
|
|
108
|
-
},
|
|
109
|
-
(reason) => expect(reason).toBeUndefined()
|
|
110
|
-
);
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
it('Sollte die Datei "styles.scss" aktualisieren 03', (done) => {
|
|
114
|
-
const filePath = testOptions.path + '/src/styles.scss';
|
|
115
|
-
appTree.overwrite(filePath, updateStylesScssInit03);
|
|
116
|
-
|
|
117
|
-
callRule(updateStylesScss(testOptions), observableOf(appTree), context).subscribe(
|
|
118
|
-
(success) => {
|
|
119
|
-
const content = success.read(filePath)?.toString();
|
|
120
|
-
|
|
121
|
-
expect(content).toEqual(updateStylesScssResult03);
|
|
122
|
-
done();
|
|
123
|
-
},
|
|
124
|
-
(reason) => expect(reason).toBeUndefined()
|
|
125
|
-
);
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
it('Sollte einen Fehler werfen, wenn die Datei "styles.scss" fehlt', (done) => {
|
|
129
|
-
const filePath = testOptions.path + '/src/styles.scss';
|
|
130
|
-
appTree.delete(filePath);
|
|
131
|
-
|
|
132
|
-
callRule(updateStylesScss(testOptions), observableOf(appTree), context).subscribe(
|
|
133
|
-
() => {},
|
|
134
|
-
(reason) => {
|
|
135
|
-
expect(reason).toEqual(new Error(`Die Datei ${filePath} konnte nicht gefunden werden.`));
|
|
136
|
-
done();
|
|
137
|
-
}
|
|
138
|
-
);
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
const updateStylesScssInit01 = `/* You can add global styles to this file, and also import other style files */
|
|
144
|
-
`;
|
|
145
|
-
|
|
146
|
-
const updateStylesScssResult01 = `/* You can add global styles to this file, and also import other style files */
|
|
147
|
-
@import '@ihk-gfi/lux-components-theme/src/base/luxfonts';
|
|
148
|
-
|
|
149
|
-
$basepath: '/';
|
|
150
|
-
@include web-fonts($basepath);
|
|
151
|
-
`;
|
|
152
|
-
|
|
153
|
-
const updateStylesScssInit02 = ``;
|
|
154
|
-
|
|
155
|
-
const updateStylesScssResult02 = `@import '@ihk-gfi/lux-components-theme/src/base/luxfonts';
|
|
156
|
-
|
|
157
|
-
$basepath: '/';
|
|
158
|
-
@include web-fonts($basepath);
|
|
159
|
-
`;
|
|
160
|
-
|
|
161
|
-
const updateStylesScssInit03 = `/* You can add global styles to this file, and also import other style files */
|
|
162
|
-
|
|
163
|
-
.test {
|
|
164
|
-
width: 12px;
|
|
165
|
-
}
|
|
166
|
-
`;
|
|
167
|
-
|
|
168
|
-
const updateStylesScssResult03 = `/* You can add global styles to this file, and also import other style files */
|
|
169
|
-
@import '@ihk-gfi/lux-components-theme/src/base/luxfonts';
|
|
170
|
-
|
|
171
|
-
.test {
|
|
172
|
-
width: 12px;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
$basepath: '/';
|
|
176
|
-
@include web-fonts($basepath);
|
|
177
|
-
`;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"$id": "luxUpdate130200Schema",
|
|
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,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.update140400 = void 0;
|
|
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 update140400(_options) {
|
|
9
|
-
return (_tree, _context) => {
|
|
10
|
-
return (0, schematics_1.chain)([
|
|
11
|
-
(0, util_1.messageInfoRule)(`Die LUX-Components werden auf die Version 14.4.0 aktualisiert...`),
|
|
12
|
-
(0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
|
|
13
|
-
(0, index_1.updateDep)('@ihk-gfi/lux-components', '14.4.0', false),
|
|
14
|
-
(0, index_1.updateDep)('@ihk-gfi/lux-components-theme', '14.5.0', false),
|
|
15
|
-
(0, index_1.updateDep)('@ihk-gfi/lux-components-icons-and-fonts', '1.5.0', false),
|
|
16
|
-
(0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 14.4.0 aktualisiert.`),
|
|
17
|
-
(0, util_1.finish)(true, `${chalk.yellowBright('Fertig!')}`)
|
|
18
|
-
]);
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
exports.update140400 = update140400;
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,2DAAiF;AACjF,+BAA+B;AAC/B,2DAA4D;AAC5D,6CAAiF;AAEjF,SAAgB,YAAY,CAAC,QAAa;IACxC,OAAO,CAAC,KAAW,EAAE,QAA0B,EAAE,EAAE;QACjD,OAAO,IAAA,kBAAK,EAAC;YACX,IAAA,sBAAe,EAAC,kEAAkE,CAAC;YACnF,IAAA,sBAAe,EAAC,4CAA4C,CAAC;YAC7D,IAAA,iBAAS,EAAC,yBAAyB,EAAE,QAAQ,EAAE,KAAK,CAAC;YACrD,IAAA,iBAAS,EAAC,+BAA+B,EAAE,QAAQ,EAAE,KAAK,CAAC;YAC3D,IAAA,iBAAS,EAAC,yCAAyC,EAAE,OAAO,EAAE,KAAK,CAAC;YACpE,IAAA,yBAAkB,EAAC,gEAAgE,CAAC;YACpF,IAAA,aAAM,EAAC,IAAI,EAAE,GAAG,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,CAAC;SACjD,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAZD,oCAYC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { chain, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
2
|
-
import * as chalk from 'chalk';
|
|
3
|
-
import { updateDep } from '../../update-dependencies/index';
|
|
4
|
-
import { finish, messageInfoRule, messageSuccessRule } from '../../utility/util';
|
|
5
|
-
|
|
6
|
-
export function update140400(_options: any): Rule {
|
|
7
|
-
return (_tree: Tree, _context: SchematicContext) => {
|
|
8
|
-
return chain([
|
|
9
|
-
messageInfoRule(`Die LUX-Components werden auf die Version 14.4.0 aktualisiert...`),
|
|
10
|
-
messageInfoRule(`Die Datei "package.json" wird angepasst...`),
|
|
11
|
-
updateDep('@ihk-gfi/lux-components', '14.4.0', false),
|
|
12
|
-
updateDep('@ihk-gfi/lux-components-theme', '14.5.0', false),
|
|
13
|
-
updateDep('@ihk-gfi/lux-components-icons-and-fonts', '1.5.0', false),
|
|
14
|
-
messageSuccessRule(`Die LUX-Components wurden auf die Version 14.4.0 aktualisiert.`),
|
|
15
|
-
finish(true, `${chalk.yellowBright('Fertig!')}`)
|
|
16
|
-
]);
|
|
17
|
-
};
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
13
|
-
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
14
|
-
const path = require("path");
|
|
15
|
-
const rxjs_1 = require("rxjs");
|
|
16
|
-
const dependencies_1 = require("../../utility/dependencies");
|
|
17
|
-
const test_1 = require("../../utility/test");
|
|
18
|
-
const util_1 = require("../../utility/util");
|
|
19
|
-
const index_1 = require("./index");
|
|
20
|
-
const collectionPath = path.join(__dirname, '../../collection.json');
|
|
21
|
-
describe('update140400', () => {
|
|
22
|
-
let appTree;
|
|
23
|
-
let runner;
|
|
24
|
-
let context;
|
|
25
|
-
const testOptions = {};
|
|
26
|
-
beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
27
|
-
runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
|
28
|
-
appTree = yield runner.runExternalSchematicAsync('@schematics/angular', 'workspace', test_1.workspaceOptions).toPromise();
|
|
29
|
-
appTree = yield runner.runExternalSchematicAsync('@schematics/angular', 'application', test_1.appOptions, appTree).toPromise();
|
|
30
|
-
util_1.UtilConfig.defaultWaitMS = 0;
|
|
31
|
-
const collection = runner.engine.createCollection(collectionPath);
|
|
32
|
-
const schematic = runner.engine.createSchematic('update-14.4.0', collection);
|
|
33
|
-
context = runner.engine.createContext(schematic);
|
|
34
|
-
testOptions.project = test_1.appOptions.name;
|
|
35
|
-
testOptions.path = test_1.workspaceOptions.newProjectRoot + '/' + test_1.appOptions.name;
|
|
36
|
-
testOptions.verbose = true;
|
|
37
|
-
}));
|
|
38
|
-
describe('[Rule] update140400', () => {
|
|
39
|
-
it('Sollte die Abhängigkeiten aktualisieren', (done) => {
|
|
40
|
-
appTree.overwrite('/package.json', `
|
|
41
|
-
{
|
|
42
|
-
"name": "Lorem ipsum",
|
|
43
|
-
"version": "0.0.32",
|
|
44
|
-
"scripts": {
|
|
45
|
-
"build": "tsc -p tsconfig.json",
|
|
46
|
-
"test": "npm run build && jasmine src/**/*_spec.js"
|
|
47
|
-
},
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"@angular/animations": "14.3.7",
|
|
50
|
-
"@angular/cdk": "14.3.7",
|
|
51
|
-
"@angular/common": "14.3.7",
|
|
52
|
-
"@ihk-gfi/lux-components": "14.2.0",
|
|
53
|
-
"@ihk-gfi/lux-components-theme": "14.4.0",
|
|
54
|
-
"@angular/compiler": "14.3.7",
|
|
55
|
-
"@ihk-gfi/lux-components-icons-and-fonts": "1.4.0"
|
|
56
|
-
},
|
|
57
|
-
"devDependencies": {
|
|
58
|
-
"@angular-devkit/build-angular": "14.3.5",
|
|
59
|
-
"@angular-eslint/builder": "14.2.1"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
`);
|
|
63
|
-
(0, schematics_1.callRule)((0, index_1.update140400)(testOptions), (0, rxjs_1.of)(appTree), context).subscribe(() => {
|
|
64
|
-
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components').version).not.toEqual('14.3.0');
|
|
65
|
-
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components').version).toEqual('14.4.0');
|
|
66
|
-
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components-theme').version).not.toEqual('14.4.0');
|
|
67
|
-
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components-theme').version).toEqual('14.5.0');
|
|
68
|
-
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components-icons-and-fonts').version).not.toEqual('1.4.0');
|
|
69
|
-
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components-icons-and-fonts').version).toEqual('1.5.0');
|
|
70
|
-
done();
|
|
71
|
-
}, (reason) => expect(reason).toBeUndefined());
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
//# sourceMappingURL=index_spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAAwE;AACxE,gEAAuF;AACvF,6BAA6B;AAC7B,+BAA0C;AAC1C,6DAAsE;AACtE,6CAAkE;AAClE,6CAAgD;AAChD,mCAAuC;AAEvC,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC;AAErE,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,IAAI,OAAqB,CAAC;IAC1B,IAAI,MAA2B,CAAC;IAChC,IAAI,OAAyB,CAAC;IAE9B,MAAM,WAAW,GAAQ,EAAE,CAAC;IAE5B,UAAU,CAAC,GAAS,EAAE;QACpB,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QAE/D,OAAO,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC,qBAAqB,EAAE,WAAW,EAAE,uBAAgB,CAAC,CAAC,SAAS,EAAE,CAAC;QACnH,OAAO,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC,qBAAqB,EAAE,aAAa,EAAE,iBAAU,EAAE,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC;QAExH,iBAAU,CAAC,aAAa,GAAG,CAAC,CAAC;QAE7B,MAAM,UAAU,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C,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;gBAErG,MAAM,CAAC,IAAA,uCAAwB,EAAC,OAAO,EAAE,yCAAyC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gBAClH,MAAM,CAAC,IAAA,uCAAwB,EAAC,OAAO,EAAE,yCAAyC,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gBAC9G,IAAI,EAAE,CAAC;YACT,CAAC,EACD,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,CAC3C,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { callRule, SchematicContext } from '@angular-devkit/schematics';
|
|
2
|
-
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
|
|
3
|
-
import * as path from 'path';
|
|
4
|
-
import { of as observableOf } from 'rxjs';
|
|
5
|
-
import { getPackageJsonDependency } from '../../utility/dependencies';
|
|
6
|
-
import { appOptions, workspaceOptions } from '../../utility/test';
|
|
7
|
-
import { UtilConfig } from '../../utility/util';
|
|
8
|
-
import { update140400 } from './index';
|
|
9
|
-
|
|
10
|
-
const collectionPath = path.join(__dirname, '../../collection.json');
|
|
11
|
-
|
|
12
|
-
describe('update140400', () => {
|
|
13
|
-
let appTree: UnitTestTree;
|
|
14
|
-
let runner: SchematicTestRunner;
|
|
15
|
-
let context: SchematicContext;
|
|
16
|
-
|
|
17
|
-
const testOptions: any = {};
|
|
18
|
-
|
|
19
|
-
beforeEach(async () => {
|
|
20
|
-
runner = new SchematicTestRunner('schematics', collectionPath);
|
|
21
|
-
|
|
22
|
-
appTree = await runner.runExternalSchematicAsync('@schematics/angular', 'workspace', workspaceOptions).toPromise();
|
|
23
|
-
appTree = await runner.runExternalSchematicAsync('@schematics/angular', 'application', appOptions, appTree).toPromise();
|
|
24
|
-
|
|
25
|
-
UtilConfig.defaultWaitMS = 0;
|
|
26
|
-
|
|
27
|
-
const collection = runner.engine.createCollection(collectionPath);
|
|
28
|
-
const schematic = runner.engine.createSchematic('update-14.4.0', collection);
|
|
29
|
-
context = runner.engine.createContext(schematic);
|
|
30
|
-
|
|
31
|
-
testOptions.project = appOptions.name;
|
|
32
|
-
testOptions.path = workspaceOptions.newProjectRoot + '/' + appOptions.name;
|
|
33
|
-
testOptions.verbose = true;
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
describe('[Rule] update140400', () => {
|
|
37
|
-
it('Sollte die Abhängigkeiten aktualisieren', (done) => {
|
|
38
|
-
appTree.overwrite(
|
|
39
|
-
'/package.json',
|
|
40
|
-
`
|
|
41
|
-
{
|
|
42
|
-
"name": "Lorem ipsum",
|
|
43
|
-
"version": "0.0.32",
|
|
44
|
-
"scripts": {
|
|
45
|
-
"build": "tsc -p tsconfig.json",
|
|
46
|
-
"test": "npm run build && jasmine src/**/*_spec.js"
|
|
47
|
-
},
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"@angular/animations": "14.3.7",
|
|
50
|
-
"@angular/cdk": "14.3.7",
|
|
51
|
-
"@angular/common": "14.3.7",
|
|
52
|
-
"@ihk-gfi/lux-components": "14.2.0",
|
|
53
|
-
"@ihk-gfi/lux-components-theme": "14.4.0",
|
|
54
|
-
"@angular/compiler": "14.3.7",
|
|
55
|
-
"@ihk-gfi/lux-components-icons-and-fonts": "1.4.0"
|
|
56
|
-
},
|
|
57
|
-
"devDependencies": {
|
|
58
|
-
"@angular-devkit/build-angular": "14.3.5",
|
|
59
|
-
"@angular-eslint/builder": "14.2.1"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
`
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
callRule(update140400(testOptions), observableOf(appTree), context).subscribe(
|
|
66
|
-
() => {
|
|
67
|
-
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).not.toEqual('14.3.0');
|
|
68
|
-
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).toEqual('14.4.0');
|
|
69
|
-
|
|
70
|
-
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-theme').version).not.toEqual('14.4.0');
|
|
71
|
-
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-theme').version).toEqual('14.5.0');
|
|
72
|
-
|
|
73
|
-
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-icons-and-fonts').version).not.toEqual('1.4.0');
|
|
74
|
-
expect(getPackageJsonDependency(appTree, '@ihk-gfi/lux-components-icons-and-fonts').version).toEqual('1.5.0');
|
|
75
|
-
done();
|
|
76
|
-
},
|
|
77
|
-
(reason) => expect(reason).toBeUndefined()
|
|
78
|
-
);
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"$id": "luxUpdate130200Schema",
|
|
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,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.update140500 = void 0;
|
|
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 update140500(_options) {
|
|
9
|
-
return (_tree, _context) => {
|
|
10
|
-
return (0, schematics_1.chain)([
|
|
11
|
-
(0, util_1.messageInfoRule)(`Die LUX-Components werden auf die Version 14.5.0 aktualisiert...`),
|
|
12
|
-
(0, util_1.messageInfoRule)(`Die Datei "package.json" wird angepasst...`),
|
|
13
|
-
(0, index_1.updateDep)('@ihk-gfi/lux-components', '14.5.0', false),
|
|
14
|
-
(0, index_1.updateDep)('@ihk-gfi/lux-components-theme', '14.6.0', false),
|
|
15
|
-
(0, util_1.messageSuccessRule)(`Die LUX-Components wurden auf die Version 14.5.0 aktualisiert.`),
|
|
16
|
-
(0, util_1.finish)(true, `${chalk.yellowBright('Fertig!')}`)
|
|
17
|
-
]);
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
exports.update140500 = update140500;
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,2DAAiF;AACjF,+BAA+B;AAC/B,2DAA4D;AAC5D,6CAAiF;AAEjF,SAAgB,YAAY,CAAC,QAAa;IACxC,OAAO,CAAC,KAAW,EAAE,QAA0B,EAAE,EAAE;QACjD,OAAO,IAAA,kBAAK,EAAC;YACX,IAAA,sBAAe,EAAC,kEAAkE,CAAC;YACnF,IAAA,sBAAe,EAAC,4CAA4C,CAAC;YAC7D,IAAA,iBAAS,EAAC,yBAAyB,EAAE,QAAQ,EAAE,KAAK,CAAC;YACrD,IAAA,iBAAS,EAAC,+BAA+B,EAAE,QAAQ,EAAE,KAAK,CAAC;YAC3D,IAAA,yBAAkB,EAAC,gEAAgE,CAAC;YACpF,IAAA,aAAM,EAAC,IAAI,EAAE,GAAG,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,CAAC;SACjD,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAXD,oCAWC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { chain, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
2
|
-
import * as chalk from 'chalk';
|
|
3
|
-
import { updateDep } from '../../update-dependencies/index';
|
|
4
|
-
import { finish, messageInfoRule, messageSuccessRule } from '../../utility/util';
|
|
5
|
-
|
|
6
|
-
export function update140500(_options: any): Rule {
|
|
7
|
-
return (_tree: Tree, _context: SchematicContext) => {
|
|
8
|
-
return chain([
|
|
9
|
-
messageInfoRule(`Die LUX-Components werden auf die Version 14.5.0 aktualisiert...`),
|
|
10
|
-
messageInfoRule(`Die Datei "package.json" wird angepasst...`),
|
|
11
|
-
updateDep('@ihk-gfi/lux-components', '14.5.0', false),
|
|
12
|
-
updateDep('@ihk-gfi/lux-components-theme', '14.6.0', false),
|
|
13
|
-
messageSuccessRule(`Die LUX-Components wurden auf die Version 14.5.0 aktualisiert.`),
|
|
14
|
-
finish(true, `${chalk.yellowBright('Fertig!')}`)
|
|
15
|
-
]);
|
|
16
|
-
};
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|