ng-alain 19.2.0 → 20.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/application/files/i18n/el-GR.json +1 -1
- package/application/files/i18n/en-US.json +1 -1
- package/application/files/i18n/es-ES.json +1 -1
- package/application/files/i18n/fr-FR.json +1 -1
- package/application/files/i18n/hr-HR.json +1 -1
- package/application/files/i18n/it-IT.json +1 -1
- package/application/files/i18n/ko-KR.json +1 -1
- package/application/files/i18n/pl-PL.json +1 -1
- package/application/files/i18n/sl-SI.json +1 -1
- package/application/files/i18n/tr-TR.json +1 -1
- package/application/files/i18n/zh-CN.json +1 -1
- package/application/files/i18n/zh-TW.json +1 -1
- package/application/files/root/.nvmrc +1 -1
- package/application/files/src/app/app.component.ts +8 -7
- package/application/files/src/app/core/i18n/i18n.service.ts +2 -3
- package/application/files/src/app/layout/basic/widgets/i18n.component.ts +1 -2
- package/application/files/src/app/routes/passport/login/login.component.html +12 -9
- package/application/files/src/app/shared/shared-imports.ts +1 -3
- package/application/files/src/assets/style.compact.css +1 -1
- package/application/files/src/assets/style.dark.css +1 -1
- package/application/files/src/assets/tmp/app-data.json +2 -2
- package/application/files/src/assets/tmp/i18n/el-GR.json +1 -1
- package/application/files/src/assets/tmp/i18n/en-US.json +1 -1
- package/application/files/src/assets/tmp/i18n/es-ES.json +1 -1
- package/application/files/src/assets/tmp/i18n/fr-FR.json +1 -1
- package/application/files/src/assets/tmp/i18n/hr-HR.json +1 -1
- package/application/files/src/assets/tmp/i18n/it-IT.json +1 -1
- package/application/files/src/assets/tmp/i18n/ko-KR.json +1 -1
- package/application/files/src/assets/tmp/i18n/pl-PL.json +1 -1
- package/application/files/src/assets/tmp/i18n/sl-SI.json +1 -1
- package/application/files/src/assets/tmp/i18n/tr-TR.json +1 -1
- package/application/files/src/assets/tmp/i18n/zh-CN.json +1 -1
- package/application/files/src/assets/tmp/i18n/zh-TW.json +1 -1
- package/application/index.js +1 -1
- package/application/index.ts +1 -1
- package/migration.json +4 -4
- package/ng-add/index.js +1 -1
- package/ng-add/index.ts +1 -1
- package/ng-update/data/attribute-selectors.js +1 -1
- package/ng-update/data/attribute-selectors.ts +1 -1
- package/ng-update/data/class-names.js +1 -1
- package/ng-update/data/class-names.ts +1 -1
- package/ng-update/data/constructor-checks.js +1 -1
- package/ng-update/data/constructor-checks.ts +1 -1
- package/ng-update/data/css-selectors.js +1 -1
- package/ng-update/data/css-selectors.ts +1 -1
- package/ng-update/data/css-tokens.js +1 -1
- package/ng-update/data/css-tokens.ts +1 -1
- package/ng-update/data/element-selectors.js +1 -1
- package/ng-update/data/element-selectors.ts +1 -1
- package/ng-update/data/input-names.js +1 -1
- package/ng-update/data/input-names.ts +1 -1
- package/ng-update/data/method-call-checks.js +1 -1
- package/ng-update/data/method-call-checks.ts +1 -1
- package/ng-update/data/output-names.js +1 -1
- package/ng-update/data/output-names.ts +1 -1
- package/ng-update/data/property-names.js +1 -1
- package/ng-update/data/property-names.ts +1 -1
- package/ng-update/index.js +4 -4
- package/ng-update/index.ts +3 -3
- package/ng-update/upgrade-rules/{V19 → V20}/index.js +4 -26
- package/ng-update/upgrade-rules/V20/index.js.map +1 -0
- package/ng-update/upgrade-rules/V20/index.spec.ts +34 -0
- package/ng-update/upgrade-rules/V20/index.ts +24 -0
- package/package.json +3 -3
- package/utils/html.js +5 -1
- package/utils/html.js.map +1 -1
- package/utils/html.ts +6 -1
- package/utils/lib-versions.js +2 -2
- package/utils/lib-versions.ts +2 -2
- package/utils/versions.js +8 -9
- package/utils/versions.js.map +1 -1
- package/utils/versions.ts +8 -9
- package/ng-update/upgrade-rules/V19/index.js.map +0 -1
- package/ng-update/upgrade-rules/V19/index.spec.ts +0 -34
- package/ng-update/upgrade-rules/V19/index.ts +0 -47
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"app": {
|
|
3
|
-
"name": "
|
|
3
|
+
"name": "NG-ALAIN",
|
|
4
4
|
"description": "Ng-zorro admin panel front-end framework"
|
|
5
5
|
},
|
|
6
6
|
"user": {
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
]
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
|
-
"text": "
|
|
62
|
+
"text": "NG-ALAIN",
|
|
63
63
|
"i18n": "menu.alain",
|
|
64
64
|
"group": true,
|
|
65
65
|
"hideInBreadcrumb": true,
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"menu.dashboard.workplace": "Χώρος εργασίας",
|
|
13
13
|
"menu.shortcut": "Συντομεύσεις",
|
|
14
14
|
"menu.widgets": "Γραφικά στοιχεία",
|
|
15
|
-
"menu.alain": "
|
|
15
|
+
"menu.alain": "NG-ALAIN",
|
|
16
16
|
"menu.style": "Στυλ",
|
|
17
17
|
"menu.style.typography": "Τυπογραφία",
|
|
18
18
|
"menu.style.gridmasonry": "Πλέγμα Masonry",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"menu.dashboard.workplace": "Workplace",
|
|
13
13
|
"menu.shortcut": "Shortcut",
|
|
14
14
|
"menu.widgets": "Widgets",
|
|
15
|
-
"menu.alain": "
|
|
15
|
+
"menu.alain": "NG-ALAIN",
|
|
16
16
|
"menu.style": "Style",
|
|
17
17
|
"menu.style.typography": "Typography",
|
|
18
18
|
"menu.style.gridmasonry": "Grid Masonry",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"menu.dashboard.workplace": "Espacio de trabajo",
|
|
13
13
|
"menu.shortcut": "Atajo",
|
|
14
14
|
"menu.widgets": "Complementos",
|
|
15
|
-
"menu.alain": "
|
|
15
|
+
"menu.alain": "NG-ALAIN",
|
|
16
16
|
"menu.style": "Estilo",
|
|
17
17
|
"menu.style.typography": "Tipografía",
|
|
18
18
|
"menu.style.gridmasonry": "Grid Masonry",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"menu.dashboard.workplace": "Lieu de travail",
|
|
13
13
|
"menu.shortcut": "Raccourci",
|
|
14
14
|
"menu.widgets": "Widgets",
|
|
15
|
-
"menu.alain": "
|
|
15
|
+
"menu.alain": "NG-ALAIN",
|
|
16
16
|
"menu.style": "Style",
|
|
17
17
|
"menu.style.typography": "Typographie",
|
|
18
18
|
"menu.style.gridmasonry": "Grille de maçonnerie",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"menu.dashboard.workplace": "Radni prostor",
|
|
13
13
|
"menu.shortcut": "Prečica",
|
|
14
14
|
"menu.widgets": "Programčić",
|
|
15
|
-
"menu.alain": "
|
|
15
|
+
"menu.alain": "NG-ALAIN",
|
|
16
16
|
"menu.style": "Stil",
|
|
17
17
|
"menu.style.typography": "Tipografija",
|
|
18
18
|
"menu.style.gridmasonry": "Mreža",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"menu.dashboard.workplace": "Luogo di lavoro",
|
|
13
13
|
"menu.shortcut": "Scorciatoia",
|
|
14
14
|
"menu.widgets": "Widgets",
|
|
15
|
-
"menu.alain": "
|
|
15
|
+
"menu.alain": "NG-ALAIN",
|
|
16
16
|
"menu.style": "Stile",
|
|
17
17
|
"menu.style.typography": "Tipografia",
|
|
18
18
|
"menu.style.gridmasonry": "Muratura Griglia",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"menu.dashboard.workplace": "Miejsce pracy",
|
|
13
13
|
"menu.shortcut": "Skrót",
|
|
14
14
|
"menu.widgets": "Widżety",
|
|
15
|
-
"menu.alain": "
|
|
15
|
+
"menu.alain": "NG-ALAIN",
|
|
16
16
|
"menu.style": "Styl",
|
|
17
17
|
"menu.style.typography": "Typografia",
|
|
18
18
|
"menu.style.gridmasonry": "Grid Masonry",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"menu.dashboard.workplace": "Delovno mesto",
|
|
13
13
|
"menu.shortcut": "Bližnjica",
|
|
14
14
|
"menu.widgets": "Pripomočki",
|
|
15
|
-
"menu.alain": "
|
|
15
|
+
"menu.alain": "NG-ALAIN",
|
|
16
16
|
"menu.style": "Slog",
|
|
17
17
|
"menu.style.typography": "Pisava",
|
|
18
18
|
"menu.style.gridmasonry": "Mreža",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"menu.dashboard.workplace": "Çalışma Alanı",
|
|
13
13
|
"menu.shortcut": "Kısayol",
|
|
14
14
|
"menu.widgets": "Araçlar",
|
|
15
|
-
"menu.alain": "
|
|
15
|
+
"menu.alain": "NG-ALAIN",
|
|
16
16
|
"menu.style": "Stil",
|
|
17
17
|
"menu.style.typography": "Tipografi",
|
|
18
18
|
"menu.style.gridmasonry": "Masonry Izgara",
|
package/application/index.js
CHANGED
|
@@ -142,7 +142,7 @@ function addCodeStylesToPackageJson() {
|
|
|
142
142
|
// dependencies
|
|
143
143
|
(0, utils_1.addPackage)(tree, [
|
|
144
144
|
`husky@^9.1.7`,
|
|
145
|
-
`lint-staged@^
|
|
145
|
+
`lint-staged@^16.1.0`,
|
|
146
146
|
`prettier@^3.5.3`,
|
|
147
147
|
`stylelint@^16.18.0`,
|
|
148
148
|
`stylelint-config-standard@^38.0.0`,
|
package/application/index.ts
CHANGED
package/migration.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
3
|
"schematics": {
|
|
4
|
-
"migration-
|
|
5
|
-
"version": "
|
|
6
|
-
"description": "Updates NG-ALAIN to
|
|
7
|
-
"factory": "./ng-update/index#
|
|
4
|
+
"migration-v20": {
|
|
5
|
+
"version": "20",
|
|
6
|
+
"description": "Updates NG-ALAIN to v20 [https://github.com/ng-alain/ng-alain/issues/2562]",
|
|
7
|
+
"factory": "./ng-update/index#updateToV20"
|
|
8
8
|
},
|
|
9
9
|
"ng-post-update": {
|
|
10
10
|
"description": "Performs cleanup after ng-update.",
|
package/ng-add/index.js
CHANGED
|
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
|
6
6
|
const colors = require("ansi-colors");
|
|
7
7
|
const utils_1 = require("../utils");
|
|
8
8
|
const node_1 = require("../utils/node");
|
|
9
|
-
const V =
|
|
9
|
+
const V = 20;
|
|
10
10
|
function genRules(options) {
|
|
11
11
|
return () => {
|
|
12
12
|
const rules = [];
|
package/ng-add/index.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { DEFAULT_WORKSPACE_PATH, readJSON, readPackage } from '../utils';
|
|
|
7
7
|
import { Schema as NgAddOptions } from './schema';
|
|
8
8
|
import { getNodeMajorVersion } from '../utils/node';
|
|
9
9
|
|
|
10
|
-
const V =
|
|
10
|
+
const V = 20;
|
|
11
11
|
|
|
12
12
|
function genRules(options: NgAddOptions): Rule {
|
|
13
13
|
return () => {
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.attributeSelectors = void 0;
|
|
4
4
|
const schematics_1 = require("@angular/cdk/schematics");
|
|
5
5
|
exports.attributeSelectors = {
|
|
6
|
-
[schematics_1.TargetVersion.
|
|
6
|
+
[schematics_1.TargetVersion.V20]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=attribute-selectors.js.map
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.classNames = void 0;
|
|
4
4
|
const schematics_1 = require("@angular/cdk/schematics");
|
|
5
5
|
exports.classNames = {
|
|
6
|
-
[schematics_1.TargetVersion.
|
|
6
|
+
[schematics_1.TargetVersion.V20]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=class-names.js.map
|
|
@@ -8,6 +8,6 @@ const schematics_1 = require("@angular/cdk/schematics");
|
|
|
8
8
|
* automatically through type checking.
|
|
9
9
|
*/
|
|
10
10
|
exports.constructorChecks = {
|
|
11
|
-
[schematics_1.TargetVersion.
|
|
11
|
+
[schematics_1.TargetVersion.V20]: []
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=constructor-checks.js.map
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.cssSelectors = void 0;
|
|
4
4
|
const schematics_1 = require("@angular/cdk/schematics");
|
|
5
5
|
exports.cssSelectors = {
|
|
6
|
-
[schematics_1.TargetVersion.
|
|
6
|
+
[schematics_1.TargetVersion.V20]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=css-selectors.js.map
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.cssTokens = void 0;
|
|
4
4
|
const schematics_1 = require("@angular/cdk/schematics");
|
|
5
5
|
exports.cssTokens = {
|
|
6
|
-
[schematics_1.TargetVersion.
|
|
6
|
+
[schematics_1.TargetVersion.V20]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=css-tokens.js.map
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.elementSelectors = void 0;
|
|
4
4
|
const schematics_1 = require("@angular/cdk/schematics");
|
|
5
5
|
exports.elementSelectors = {
|
|
6
|
-
[schematics_1.TargetVersion.
|
|
6
|
+
[schematics_1.TargetVersion.V20]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=element-selectors.js.map
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.inputNames = void 0;
|
|
4
4
|
const schematics_1 = require("@angular/cdk/schematics");
|
|
5
5
|
exports.inputNames = {
|
|
6
|
-
[schematics_1.TargetVersion.
|
|
6
|
+
[schematics_1.TargetVersion.V20]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=input-names.js.map
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.methodCallChecks = void 0;
|
|
4
4
|
const schematics_1 = require("@angular/cdk/schematics");
|
|
5
5
|
exports.methodCallChecks = {
|
|
6
|
-
[schematics_1.TargetVersion.
|
|
6
|
+
[schematics_1.TargetVersion.V20]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=method-call-checks.js.map
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.outputNames = void 0;
|
|
4
4
|
const schematics_1 = require("@angular/cdk/schematics");
|
|
5
5
|
exports.outputNames = {
|
|
6
|
-
[schematics_1.TargetVersion.
|
|
6
|
+
[schematics_1.TargetVersion.V20]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=output-names.js.map
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.propertyNames = void 0;
|
|
4
4
|
const schematics_1 = require("@angular/cdk/schematics");
|
|
5
5
|
exports.propertyNames = {
|
|
6
|
-
[schematics_1.TargetVersion.
|
|
6
|
+
[schematics_1.TargetVersion.V20]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=property-names.js.map
|
package/ng-update/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.updateToV20 = updateToV20;
|
|
4
4
|
exports.postUpdate = postUpdate;
|
|
5
5
|
const schematics_1 = require("@angular/cdk/schematics");
|
|
6
6
|
const schematics_2 = require("@angular-devkit/schematics");
|
|
7
7
|
const upgrade_data_1 = require("./upgrade-data");
|
|
8
|
-
const
|
|
8
|
+
const V20_1 = require("./upgrade-rules/V20");
|
|
9
9
|
const migrations = [];
|
|
10
|
-
function
|
|
11
|
-
return (0, schematics_2.chain)([(0,
|
|
10
|
+
function updateToV20() {
|
|
11
|
+
return (0, schematics_2.chain)([(0, V20_1.v20Rule)(), (0, schematics_1.createMigrationSchematicRule)(schematics_1.TargetVersion.V20, migrations, upgrade_data_1.ruleUpgradeData, postUpdate)]);
|
|
12
12
|
}
|
|
13
13
|
/** Post-update schematic to be called when update is finished. */
|
|
14
14
|
function postUpdate(context, targetVersion, hasFailures) {
|
package/ng-update/index.ts
CHANGED
|
@@ -3,12 +3,12 @@ import { createMigrationSchematicRule, NullableDevkitMigration, TargetVersion }
|
|
|
3
3
|
import { chain, Rule, SchematicContext } from '@angular-devkit/schematics';
|
|
4
4
|
|
|
5
5
|
import { ruleUpgradeData } from './upgrade-data';
|
|
6
|
-
import {
|
|
6
|
+
import { v20Rule } from './upgrade-rules/V20';
|
|
7
7
|
|
|
8
8
|
const migrations: NullableDevkitMigration[] = [];
|
|
9
9
|
|
|
10
|
-
export function
|
|
11
|
-
return chain([
|
|
10
|
+
export function updateToV20(): Rule {
|
|
11
|
+
return chain([v20Rule(), createMigrationSchematicRule(TargetVersion.V20, migrations, ruleUpgradeData, postUpdate)]);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/** Post-update schematic to be called when update is finished. */
|
|
@@ -9,44 +9,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.v20Rule = v20Rule;
|
|
13
13
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
14
14
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
15
15
|
const utils_1 = require("../../../utils");
|
|
16
16
|
const versions_1 = require("../../../utils/versions");
|
|
17
|
-
function addDPVNU() {
|
|
18
|
-
return (tree) => {
|
|
19
|
-
const filePath = '.stylelintrc.js';
|
|
20
|
-
const content = tree.read(filePath);
|
|
21
|
-
if (!content) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
let contentStr = content.toString('utf-8');
|
|
25
|
-
if (contentStr.includes('declaration-property-value-no-unknown')) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
// 在 'order/order' 之前插入 'declaration-property-value-no-unknown': null,
|
|
29
|
-
const findContent = ` 'order/order'`;
|
|
30
|
-
const idx = contentStr.indexOf(findContent.trim());
|
|
31
|
-
if (idx === -1) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
const insertContent = ` 'declaration-property-value-no-unknown': null,\n`;
|
|
35
|
-
contentStr = contentStr.replace(findContent, `${insertContent}${findContent}`);
|
|
36
|
-
tree.overwrite(filePath, contentStr);
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
17
|
function finished() {
|
|
40
18
|
return (_tree, context) => {
|
|
41
19
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
42
|
-
(0, utils_1.logFinished)(context, `Congratulations, Abort more detail please refer to upgrade guide https://github.com/ng-alain/ng-alain/issues/
|
|
20
|
+
(0, utils_1.logFinished)(context, `Congratulations, Abort more detail please refer to upgrade guide https://github.com/ng-alain/ng-alain/issues/2562`);
|
|
43
21
|
};
|
|
44
22
|
}
|
|
45
|
-
function
|
|
23
|
+
function v20Rule() {
|
|
46
24
|
return (tree, context) => __awaiter(this, void 0, void 0, function* () {
|
|
47
25
|
(0, versions_1.UpgradeMainVersions)(tree);
|
|
48
26
|
(0, utils_1.logInfo)(context, `Upgrade dependency version number`);
|
|
49
|
-
return (0, schematics_1.chain)([
|
|
27
|
+
return (0, schematics_1.chain)([finished()]);
|
|
50
28
|
});
|
|
51
29
|
}
|
|
52
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/V20/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAiBA,0BAMC;AAvBD,2DAAiF;AACjF,4DAA0E;AAE1E,0CAAsD;AACtD,sDAA8D;AAE9D,SAAS,QAAQ;IACf,OAAO,CAAC,KAAW,EAAE,OAAyB,EAAE,EAAE;QAChD,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;QAE9C,IAAA,mBAAW,EACT,OAAO,EACP,mHAAmH,CACpH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,OAAO;IACrB,OAAO,CAAO,IAAU,EAAE,OAAyB,EAAE,EAAE;QACrD,IAAA,8BAAmB,EAAC,IAAI,CAAC,CAAC;QAC1B,IAAA,eAAO,EAAC,OAAO,EAAE,mCAAmC,CAAC,CAAC;QACtD,OAAO,IAAA,kBAAK,EAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC7B,CAAC,CAAA,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
|
|
2
|
+
|
|
3
|
+
// import { tryAddFile } from '../../../utils';
|
|
4
|
+
// import { createAlainApp, migrationCollection } from '../../../utils/testing';
|
|
5
|
+
|
|
6
|
+
// describe('Schematic: ng-update: v20Rule', () => {
|
|
7
|
+
// let runner: SchematicTestRunner;
|
|
8
|
+
// let tree: UnitTestTree;
|
|
9
|
+
// const logs: string[] = [];
|
|
10
|
+
|
|
11
|
+
// beforeEach(async () => {
|
|
12
|
+
// ({ runner, tree } = await createAlainApp());
|
|
13
|
+
// });
|
|
14
|
+
|
|
15
|
+
// async function runMigration(): Promise<void> {
|
|
16
|
+
// logs.length = 0;
|
|
17
|
+
// runner = new SchematicTestRunner('schematics', migrationCollection);
|
|
18
|
+
// runner.logger.subscribe(e => logs.push(e.message));
|
|
19
|
+
// await runner.runSchematic('migration-v20', {}, tree);
|
|
20
|
+
// }
|
|
21
|
+
|
|
22
|
+
// it('add declaration-property-value-no-unknown', async () => {
|
|
23
|
+
// const filePath = '/.stylelintrc.js';
|
|
24
|
+
// tryAddFile(
|
|
25
|
+
// tree,
|
|
26
|
+
// filePath,
|
|
27
|
+
// ` 'media-query-no-invalid': null,
|
|
28
|
+
// 'order/order': [`
|
|
29
|
+
// );
|
|
30
|
+
// await runMigration();
|
|
31
|
+
// const content = tree.readContent(filePath);
|
|
32
|
+
// expect(content).toContain(`declaration-property-value-no-unknown`);
|
|
33
|
+
// });
|
|
34
|
+
// });
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { chain, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
2
|
+
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
|
|
3
|
+
|
|
4
|
+
import { logFinished, logInfo } from '../../../utils';
|
|
5
|
+
import { UpgradeMainVersions } from '../../../utils/versions';
|
|
6
|
+
|
|
7
|
+
function finished(): Rule {
|
|
8
|
+
return (_tree: Tree, context: SchematicContext) => {
|
|
9
|
+
context.addTask(new NodePackageInstallTask());
|
|
10
|
+
|
|
11
|
+
logFinished(
|
|
12
|
+
context,
|
|
13
|
+
`Congratulations, Abort more detail please refer to upgrade guide https://github.com/ng-alain/ng-alain/issues/2562`
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function v20Rule(): Rule {
|
|
19
|
+
return async (tree: Tree, context: SchematicContext) => {
|
|
20
|
+
UpgradeMainVersions(tree);
|
|
21
|
+
logInfo(context, `Upgrade dependency version number`);
|
|
22
|
+
return chain([finished()]);
|
|
23
|
+
};
|
|
24
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ng-alain",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Schematics specific to
|
|
3
|
+
"version": "20.0.0",
|
|
4
|
+
"description": "Schematics specific to NG-ALAIN",
|
|
5
5
|
"author": "cipchk<cipchk@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"swagger-typescript-api": "^12.0.4",
|
|
26
26
|
"ng-alain-sts": "^0.0.2",
|
|
27
27
|
"ng-alain-plugin-theme": "^18.0.0",
|
|
28
|
-
"@angular/cdk": "^
|
|
28
|
+
"@angular/cdk": "^20.0.2"
|
|
29
29
|
},
|
|
30
30
|
"ng-update": {
|
|
31
31
|
"migrations": "./migration.json",
|
package/utils/html.js
CHANGED
|
@@ -12,11 +12,15 @@ const change_1 = require("@schematics/angular/utility/change");
|
|
|
12
12
|
const parse5 = require("parse5");
|
|
13
13
|
const workspace_1 = require("./workspace");
|
|
14
14
|
/** Gets the app index.html file */
|
|
15
|
-
function getIndexHtmlPath(
|
|
15
|
+
function getIndexHtmlPath(host, project) {
|
|
16
16
|
const targetOptions = (0, workspace_1.getProjectTarget)(project, workspace_1.BUILD_TARGET_BUILD);
|
|
17
17
|
if (typeof targetOptions.index === 'string' && targetOptions.index.endsWith('index.html')) {
|
|
18
18
|
return targetOptions.index;
|
|
19
19
|
}
|
|
20
|
+
const htmlPath = `${project.sourceRoot}/index.html`;
|
|
21
|
+
if (host.exists(htmlPath)) {
|
|
22
|
+
return htmlPath;
|
|
23
|
+
}
|
|
20
24
|
throw new schematics_1.SchematicsException('No index.html file was found.');
|
|
21
25
|
}
|
|
22
26
|
/**
|
package/utils/html.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html.js","sourceRoot":"","sources":["../../../schematics/utils/html.ts"],"names":[],"mappings":";;AAQA,
|
|
1
|
+
{"version":3,"file":"html.js","sourceRoot":"","sources":["../../../schematics/utils/html.ts"],"names":[],"mappings":";;AAQA,4CAaC;AAKD,wBAgCC;AAED,gCA6BC;AAKD,kDAWC;AAKD,kCAUC;AAKD,oCAUC;AAKD,sCAUC;AArJD,2DAAuE;AACvE,+DAAkE;AAClE,iCAAiC;AAEjC,2CAAmE;AAEnE,mCAAmC;AACnC,SAAgB,gBAAgB,CAAC,IAAU,EAAE,OAA0B;IACrE,MAAM,aAAa,GAAG,IAAA,4BAAgB,EAAC,OAAO,EAAE,8BAAkB,CAAC,CAAC;IAEpE,IAAI,OAAO,aAAa,CAAC,KAAK,KAAK,QAAQ,IAAI,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,CA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G,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAC7C,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;QACpD,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa,CAAC,IAAU,EAAE,OAA0B,EAAE,IAAY;IAChF,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAE9D,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QACvC,MAAM,SAAS,GAAG,IAAI,qBAAY,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QACpE,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAC7C,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;QACpD,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC"}
|
package/utils/html.ts
CHANGED
|
@@ -6,13 +6,18 @@ import * as parse5 from 'parse5';
|
|
|
6
6
|
import { BUILD_TARGET_BUILD, getProjectTarget } from './workspace';
|
|
7
7
|
|
|
8
8
|
/** Gets the app index.html file */
|
|
9
|
-
export function getIndexHtmlPath(
|
|
9
|
+
export function getIndexHtmlPath(host: Tree, project: ProjectDefinition): string {
|
|
10
10
|
const targetOptions = getProjectTarget(project, BUILD_TARGET_BUILD);
|
|
11
11
|
|
|
12
12
|
if (typeof targetOptions.index === 'string' && targetOptions.index.endsWith('index.html')) {
|
|
13
13
|
return targetOptions.index;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
const htmlPath = `${project.sourceRoot}/index.html`;
|
|
17
|
+
if (host.exists(htmlPath)) {
|
|
18
|
+
return htmlPath;
|
|
19
|
+
}
|
|
20
|
+
|
|
16
21
|
throw new SchematicsException('No index.html file was found.');
|
|
17
22
|
}
|
|
18
23
|
|
package/utils/lib-versions.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ZORROVERSION = exports.VERSION = void 0;
|
|
4
|
-
exports.VERSION = '^
|
|
5
|
-
exports.ZORROVERSION = '^
|
|
4
|
+
exports.VERSION = '^20.0.0';
|
|
5
|
+
exports.ZORROVERSION = '^20.0.0';
|
|
6
6
|
//# sourceMappingURL=lib-versions.js.map
|
package/utils/lib-versions.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '^
|
|
2
|
-
export const ZORROVERSION = '^
|
|
1
|
+
export const VERSION = '^20.0.0';
|
|
2
|
+
export const ZORROVERSION = '^20.0.0';
|