ng-alain 12.4.1 → 13.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/src/app/core/i18n/i18n.service.ts +1 -1
- package/application/files/src/app/core/net/default.interceptor.ts +1 -1
- package/application/files/src/app/layout/basic/widgets/clear-storage.component.ts +1 -1
- package/application/files/src/app/layout/basic/widgets/fullscreen.component.ts +5 -8
- package/application/files/src/app/layout/basic/widgets/i18n.component.ts +3 -0
- package/application/files/src/app/layout/passport/passport.component.less +1 -1
- package/application/files/src/app/routes/exception/exception.component.ts +1 -1
- package/application/files/src/app/routes/passport/callback.component.ts +1 -1
- package/application/files/src/app/routes/passport/login/login.component.less +1 -1
- package/application/files/src/app/routes/passport/login/login.component.ts +4 -4
- package/application/files/src/app/routes/passport/register/register.component.less +1 -1
- package/application/files/src/app/routes/passport/register/register.component.ts +5 -5
- package/application/files/src/app/routes/passport/register-result/register-result.component.ts +1 -1
- package/application/files/src/styles/theme.less +1 -1
- package/application/files/src/styles.less +5 -5
- package/application/files/src/test.ts +3 -1
- package/application/index.js +44 -43
- package/application/index.js.map +1 -1
- package/application/index.ts +11 -8
- package/application/schema.json +1 -1
- package/collection.json +2 -3
- package/curd/index.js +2 -2
- package/curd/index.js.map +1 -1
- package/curd/schema.json +34 -27
- package/docs/generate.en-US.md +7 -7
- package/docs/generate.zh-CN.md +7 -7
- package/docs/plugin.en-US.md +0 -13
- package/docs/plugin.zh-CN.md +0 -13
- package/edit/index.js +1 -1
- package/edit/index.js.map +1 -1
- package/edit/schema.json +2 -7
- package/empty/index.js +1 -1
- package/empty/index.js.map +1 -1
- package/empty/schema.json +2 -7
- package/list/index.js +1 -1
- package/list/index.js.map +1 -1
- package/list/schema.json +2 -7
- package/migration.json +5 -10
- package/module/index.js +18 -18
- package/module/index.js.map +1 -1
- package/module/schema.json +1 -1
- package/ng-add/index.js +24 -26
- package/ng-add/index.js.map +1 -1
- package/ng-add/index.spec.ts +13 -3
- package/ng-add/index.ts +19 -21
- package/ng-add/schema.json +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/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 +8 -13
- package/ng-update/index.js.map +1 -1
- package/ng-update/index.ts +5 -10
- package/ng-update/upgrade-data.js +3 -1
- package/ng-update/upgrade-data.js.map +1 -1
- package/ng-update/upgrade-data.ts +3 -2
- package/ng-update/upgrade-rules/checks/_src-to-nz-image-rule.js +1 -1
- package/ng-update/upgrade-rules/checks/_src-to-nz-image-rule.js.map +1 -1
- package/ng-update/upgrade-rules/v12/index.js +32 -32
- package/ng-update/upgrade-rules/v12/index.js.map +1 -1
- package/ng-update/upgrade-rules/v12/index.ts +1 -5
- package/ng-update/upgrade-rules/v12/schema.json +1 -1
- package/ng-update/upgrade-rules/v13/index.js +100 -0
- package/ng-update/upgrade-rules/v13/index.js.map +1 -0
- package/ng-update/upgrade-rules/v13/index.spec.ts +39 -0
- package/ng-update/upgrade-rules/v13/index.ts +111 -0
- package/package.json +1 -1
- package/plugin/files/rtl/layout/basic/widgets/rtl.component.ts +1 -1
- package/plugin/index.js +10 -14
- package/plugin/index.js.map +1 -1
- package/plugin/index.ts +0 -4
- package/plugin/plugin.code-style.js +2 -2
- package/plugin/plugin.code-style.js.map +1 -1
- package/plugin/plugin.default-language.js +3 -3
- package/plugin/plugin.default-language.js.map +1 -1
- package/plugin/plugin.default-language.ts +1 -1
- package/plugin/plugin.docker.js +6 -6
- package/plugin/plugin.docker.js.map +1 -1
- package/plugin/plugin.icon.js +7 -7
- package/plugin/plugin.icon.js.map +1 -1
- package/plugin/plugin.icon.ts +2 -2
- package/plugin/plugin.rtl.js +11 -11
- package/plugin/plugin.rtl.js.map +1 -1
- package/plugin/plugin.sts.js +1 -1
- package/plugin/plugin.sts.js.map +1 -1
- package/plugin/schema.json +1 -1
- package/schema.json +10 -0
- package/sta/index.js +13 -13
- package/sta/index.js.map +1 -1
- package/sta/schema.json +1 -1
- package/tpl/index.js +2 -2
- package/tpl/index.js.map +1 -1
- package/tpl/index.ts +1 -1
- package/tpl/schema.json +3 -8
- package/utils/alain.js +17 -18
- package/utils/alain.js.map +1 -1
- package/utils/alain.ts +1 -2
- package/utils/file.js +2 -2
- package/utils/file.js.map +1 -1
- package/utils/html.js +1 -1
- package/utils/html.js.map +1 -1
- package/utils/json.js +1 -1
- package/utils/json.js.map +1 -1
- package/utils/lib-versions.js +2 -2
- package/utils/lib-versions.ts +2 -2
- package/utils/log.js +3 -3
- package/utils/log.js.map +1 -1
- package/utils/log.ts +3 -3
- package/utils/node.js +8 -0
- package/utils/node.js.map +1 -0
- package/utils/node.ts +3 -0
- package/utils/package.js +4 -4
- package/utils/package.js.map +1 -1
- package/utils/package.ts +2 -2
- package/utils/testing.js +3 -3
- package/utils/testing.js.map +1 -1
- package/utils/versions.js +24 -20
- package/utils/versions.js.map +1 -1
- package/utils/versions.ts +20 -16
- package/utils/workspace.js +25 -6
- package/utils/workspace.js.map +1 -1
- package/utils/workspace.ts +15 -0
- package/view/index.js +1 -1
- package/view/index.js.map +1 -1
- package/view/schema.json +2 -7
- package/ng-update/upgrade-rules/v11/files-tpl/main.js +0 -31
- package/ng-update/upgrade-rules/v11/files-tpl/main.js.map +0 -1
- package/ng-update/upgrade-rules/v11/files-tpl/main.ts +0 -28
- package/ng-update/upgrade-rules/v11/hmr.js +0 -103
- package/ng-update/upgrade-rules/v11/hmr.js.map +0 -1
- package/ng-update/upgrade-rules/v11/hmr.ts +0 -109
- package/ng-update/upgrade-rules/v11/index.js +0 -72
- package/ng-update/upgrade-rules/v11/index.js.map +0 -1
- package/ng-update/upgrade-rules/v11/index.spec.ts +0 -51
- package/ng-update/upgrade-rules/v11/index.ts +0 -80
- package/ng-update/upgrade-rules/v11/layout.js +0 -39
- package/ng-update/upgrade-rules/v11/layout.js.map +0 -1
- package/ng-update/upgrade-rules/v11/layout.ts +0 -47
- package/ng-update/upgrade-rules/v117/index.js +0 -82
- package/ng-update/upgrade-rules/v117/index.js.map +0 -1
- package/ng-update/upgrade-rules/v117/index.spec.ts +0 -58
- package/ng-update/upgrade-rules/v117/index.ts +0 -71
- package/plugin/files/ie/tsconfig-es5.app.js +0 -9
- package/plugin/files/ie/tsconfig-es5.app.js.map +0 -1
- package/plugin/files/ie/tsconfig-es5.spec.js +0 -9
- package/plugin/files/ie/tsconfig-es5.spec.js.map +0 -1
- package/plugin/plugin.ie.js +0 -128
- package/plugin/plugin.ie.js.map +0 -1
- package/plugin/plugin.ie.spec.ts +0 -35
- package/plugin/plugin.ie.ts +0 -144
package/ng-add/index.spec.ts
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
|
|
2
2
|
|
|
3
|
+
import * as nodeUtils from '../utils/node';
|
|
3
4
|
import { createAlainApp } from '../utils/testing';
|
|
4
5
|
|
|
5
6
|
describe('Schematic: ng-add', () => {
|
|
6
7
|
let runner: SchematicTestRunner;
|
|
7
8
|
let tree: UnitTestTree;
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
it('should dependencies @delon of an application', () => {
|
|
10
|
+
it('should dependencies @delon of an application', async () => {
|
|
11
|
+
({ runner, tree } = await createAlainApp());
|
|
12
12
|
const packageJson = JSON.parse(tree.readContent('package.json'));
|
|
13
13
|
expect(packageJson.dependencies['@delon/theme']).toBeDefined();
|
|
14
14
|
});
|
|
15
|
+
|
|
16
|
+
it('should throw errr when node version is not valid range', async () => {
|
|
17
|
+
spyOn(nodeUtils, 'getNodeMajorVersion').and.returnValue(10);
|
|
18
|
+
try {
|
|
19
|
+
await createAlainApp();
|
|
20
|
+
expect(true).toBe(false);
|
|
21
|
+
} catch (ex) {
|
|
22
|
+
expect(true).toBe(true);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
15
25
|
});
|
package/ng-add/index.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { colors } from '@angular/cli/utilities/color';
|
|
2
2
|
|
|
3
|
-
import { chain, Rule, schematic, Tree, SchematicContext } from '@angular-devkit/schematics';
|
|
3
|
+
import { chain, Rule, schematic, Tree, SchematicContext, SchematicsException } from '@angular-devkit/schematics';
|
|
4
4
|
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
|
|
5
|
-
import { readdirSync, statSync } from 'fs';
|
|
6
|
-
import { join } from 'path';
|
|
7
5
|
|
|
8
6
|
import { Schema as ApplicationOptions } from '../application/schema';
|
|
9
|
-
import { readPackage } from '../utils';
|
|
7
|
+
import { readJSON, readPackage } from '../utils';
|
|
8
|
+
import { getNodeMajorVersion } from '../utils/node';
|
|
10
9
|
import { Schema as NgAddOptions } from './schema';
|
|
11
10
|
|
|
12
|
-
const V =
|
|
11
|
+
const V = 13;
|
|
13
12
|
|
|
14
13
|
function genRules(options: NgAddOptions): Rule {
|
|
15
14
|
return () => {
|
|
@@ -56,16 +55,8 @@ function genRules(options: NgAddOptions): Rule {
|
|
|
56
55
|
};
|
|
57
56
|
}
|
|
58
57
|
|
|
59
|
-
function
|
|
60
|
-
|
|
61
|
-
if (!statSync(nodeModulesPath).isDirectory()) return [];
|
|
62
|
-
return readdirSync(nodeModulesPath) || [];
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function isUseCNPM(): boolean {
|
|
66
|
-
const names = getFiles();
|
|
67
|
-
const res = ['_@angular', '_ng-zorro-antd'].every(prefix => names.findIndex(w => w.startsWith(prefix)) !== -1);
|
|
68
|
-
return res;
|
|
58
|
+
function isYarn(tree: Tree): boolean {
|
|
59
|
+
return readJSON(tree, '/angular.json')?.cli?.packageManager === 'yarn';
|
|
69
60
|
}
|
|
70
61
|
|
|
71
62
|
function finished(): Rule {
|
|
@@ -84,24 +75,31 @@ NG-ALAIN documentation site: https://ng-alain.com
|
|
|
84
75
|
|
|
85
76
|
export default function (options: NgAddOptions): Rule {
|
|
86
77
|
return (tree: Tree, context: SchematicContext) => {
|
|
87
|
-
if (
|
|
88
|
-
|
|
89
|
-
|
|
78
|
+
if (!isYarn(tree)) {
|
|
79
|
+
context.logger.warn(`TIPS:: Please use yarn instead of NPM to install dependencies`);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const nodeVersion = getNodeMajorVersion();
|
|
83
|
+
const allowNodeVersions = [12, 14, 16];
|
|
84
|
+
if (!allowNodeVersions.some(v => nodeVersion === v)) {
|
|
85
|
+
const versions = allowNodeVersions.join(', ');
|
|
86
|
+
throw new SchematicsException(
|
|
87
|
+
`Sorry, currently only supports ${versions} major version number of node (Got ${process.version}), pls refer to https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3`
|
|
90
88
|
);
|
|
91
89
|
}
|
|
92
90
|
|
|
93
91
|
const pkg = readPackage(tree);
|
|
94
92
|
|
|
95
93
|
if (pkg.devDependencies['ng-alain']) {
|
|
96
|
-
throw new
|
|
94
|
+
throw new SchematicsException(`Already an NG-ALAIN project and can't be executed again: ng add ng-alain`);
|
|
97
95
|
}
|
|
98
96
|
|
|
99
97
|
let ngCoreVersion = pkg.dependencies['@angular/core'] as string;
|
|
100
98
|
if (/^[\^|\~]/g.test(ngCoreVersion)) {
|
|
101
|
-
ngCoreVersion = ngCoreVersion.
|
|
99
|
+
ngCoreVersion = ngCoreVersion.substring(1);
|
|
102
100
|
}
|
|
103
101
|
if (!ngCoreVersion.startsWith(`${V}.`)) {
|
|
104
|
-
throw new
|
|
102
|
+
throw new SchematicsException(
|
|
105
103
|
`Sorry, the current version only supports angular ${V}.x, pls downgrade the global Anguar-cli version: [yarn global add @angular/cli@${V}] (or via npm: [npm install -g @angular/cli@${V}])`
|
|
106
104
|
);
|
|
107
105
|
}
|
package/ng-add/schema.json
CHANGED
|
@@ -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.V13]: []
|
|
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.V13]: []
|
|
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.V13]: []
|
|
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.V13]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=css-selectors.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.V13]: []
|
|
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.V13]: []
|
|
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.V13]: []
|
|
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.V13]: []
|
|
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.V13]: []
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=property-names.js.map
|
package/ng-update/index.js
CHANGED
|
@@ -1,28 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.postUpdate = exports.
|
|
3
|
+
exports.postUpdate = exports.updateToV13 = exports.updateToV12 = void 0;
|
|
4
4
|
const schematics_1 = require("@angular/cdk/schematics");
|
|
5
5
|
const schematics_2 = require("@angular-devkit/schematics");
|
|
6
6
|
const upgrade_data_1 = require("./upgrade-data");
|
|
7
7
|
const _src_to_nz_image_rule_1 = require("./upgrade-rules/checks/_src-to-nz-image-rule");
|
|
8
|
-
const v11_1 = require("./upgrade-rules/v11");
|
|
9
|
-
const v117_1 = require("./upgrade-rules/v117");
|
|
10
8
|
const v12_1 = require("./upgrade-rules/v12");
|
|
9
|
+
const v13_1 = require("./upgrade-rules/v13");
|
|
11
10
|
const migrations = [_src_to_nz_image_rule_1.SrcToNzImageRule];
|
|
12
|
-
function updateToV11() {
|
|
13
|
-
return schematics_2.chain([v11_1.v11Rule]);
|
|
14
|
-
}
|
|
15
|
-
exports.updateToV11 = updateToV11;
|
|
16
|
-
function updateToV117() {
|
|
17
|
-
return schematics_2.chain([v117_1.v117Rule]);
|
|
18
|
-
}
|
|
19
|
-
exports.updateToV117 = updateToV117;
|
|
20
11
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
12
|
function updateToV12(schema) {
|
|
22
|
-
const rule = v12_1.v12Rule(schema);
|
|
23
|
-
return schematics_2.chain([rule, schematics_1.createMigrationSchematicRule(schematics_1.TargetVersion.V12, migrations, upgrade_data_1.ruleUpgradeData, postUpdate)]);
|
|
13
|
+
const rule = (0, v12_1.v12Rule)(schema);
|
|
14
|
+
return (0, schematics_2.chain)([rule, (0, schematics_1.createMigrationSchematicRule)(schematics_1.TargetVersion.V12, migrations, upgrade_data_1.ruleUpgradeData, postUpdate)]);
|
|
24
15
|
}
|
|
25
16
|
exports.updateToV12 = updateToV12;
|
|
17
|
+
function updateToV13() {
|
|
18
|
+
return (0, schematics_2.chain)([(0, v13_1.v13Rule)(), (0, schematics_1.createMigrationSchematicRule)(schematics_1.TargetVersion.V13, migrations, upgrade_data_1.ruleUpgradeData, postUpdate)]);
|
|
19
|
+
}
|
|
20
|
+
exports.updateToV13 = updateToV13;
|
|
26
21
|
/** Post-update schematic to be called when update is finished. */
|
|
27
22
|
function postUpdate(context, targetVersion, hasFailures) {
|
|
28
23
|
context.logger.info('');
|
package/ng-update/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-update/index.ts"],"names":[],"mappings":";;;AAAA,wDAA+G;AAE/G,2DAA2E;AAE3E,iDAAiD;AACjD,wFAAgF;AAChF,6CAA8C;AAC9C
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-update/index.ts"],"names":[],"mappings":";;;AAAA,wDAA+G;AAE/G,2DAA2E;AAE3E,iDAAiD;AACjD,wFAAgF;AAChF,6CAA8C;AAC9C,6CAA8C;AAE9C,MAAM,UAAU,GAA8B,CAAC,wCAAgB,CAAC,CAAC;AAEjE,8DAA8D;AAC9D,SAAgB,WAAW,CAAC,MAAW;IACrC,MAAM,IAAI,GAAG,IAAA,aAAO,EAAC,MAAM,CAAC,CAAC;IAC7B,OAAO,IAAA,kBAAK,EAAC,CAAC,IAAI,EAAE,IAAA,yCAA4B,EAAC,0BAAa,CAAC,GAAG,EAAE,UAAU,EAAE,8BAAe,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;AACjH,CAAC;AAHD,kCAGC;AAED,SAAgB,WAAW;IACzB,OAAO,IAAA,kBAAK,EAAC,CAAC,IAAA,aAAO,GAAE,EAAE,IAAA,yCAA4B,EAAC,0BAAa,CAAC,GAAG,EAAE,UAAU,EAAE,8BAAe,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;AACtH,CAAC;AAFD,kCAEC;AAED,kEAAkE;AAClE,SAAgB,UAAU,CAAC,OAAyB,EAAE,aAA4B,EAAE,WAAoB;IACtG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,4BAA4B,aAAa,EAAE,CAAC,CAAC;IACjE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAExB,IAAI,WAAW,EAAE;QACf,OAAO,CAAC,MAAM,CAAC,IAAI,CACjB,wFAAwF;YACtF,6CAA6C,CAChD,CAAC;KACH;AACH,CAAC;AAXD,gCAWC"}
|
package/ng-update/index.ts
CHANGED
|
@@ -4,26 +4,21 @@ import { chain, Rule, SchematicContext } from '@angular-devkit/schematics';
|
|
|
4
4
|
|
|
5
5
|
import { ruleUpgradeData } from './upgrade-data';
|
|
6
6
|
import { SrcToNzImageRule } from './upgrade-rules/checks/_src-to-nz-image-rule';
|
|
7
|
-
import { v11Rule } from './upgrade-rules/v11';
|
|
8
|
-
import { v117Rule } from './upgrade-rules/v117';
|
|
9
7
|
import { v12Rule } from './upgrade-rules/v12';
|
|
8
|
+
import { v13Rule } from './upgrade-rules/v13';
|
|
10
9
|
|
|
11
10
|
const migrations: NullableDevkitMigration[] = [SrcToNzImageRule];
|
|
12
11
|
|
|
13
|
-
export function updateToV11(): Rule {
|
|
14
|
-
return chain([v11Rule]);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function updateToV117(): Rule {
|
|
18
|
-
return chain([v117Rule]);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
12
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
13
|
export function updateToV12(schema: any): Rule {
|
|
23
14
|
const rule = v12Rule(schema);
|
|
24
15
|
return chain([rule, createMigrationSchematicRule(TargetVersion.V12, migrations, ruleUpgradeData, postUpdate)]);
|
|
25
16
|
}
|
|
26
17
|
|
|
18
|
+
export function updateToV13(): Rule {
|
|
19
|
+
return chain([v13Rule(), createMigrationSchematicRule(TargetVersion.V13, migrations, ruleUpgradeData, postUpdate)]);
|
|
20
|
+
}
|
|
21
|
+
|
|
27
22
|
/** Post-update schematic to be called when update is finished. */
|
|
28
23
|
export function postUpdate(context: SchematicContext, targetVersion: TargetVersion, hasFailures: boolean): void {
|
|
29
24
|
context.logger.info('');
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ruleUpgradeData = void 0;
|
|
4
|
+
const schematics_1 = require("@angular/cdk/schematics");
|
|
4
5
|
const data_1 = require("./data");
|
|
5
6
|
exports.ruleUpgradeData = {
|
|
6
7
|
attributeSelectors: data_1.attributeSelectors,
|
|
@@ -11,6 +12,7 @@ exports.ruleUpgradeData = {
|
|
|
11
12
|
inputNames: data_1.inputNames,
|
|
12
13
|
methodCallChecks: data_1.methodCallChecks,
|
|
13
14
|
outputNames: data_1.outputNames,
|
|
14
|
-
propertyNames: data_1.propertyNames
|
|
15
|
+
propertyNames: data_1.propertyNames,
|
|
16
|
+
symbolRemoval: schematics_1.symbolRemoval
|
|
15
17
|
};
|
|
16
18
|
//# sourceMappingURL=upgrade-data.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade-data.js","sourceRoot":"","sources":["../../../schematics/ng-update/upgrade-data.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"upgrade-data.js","sourceRoot":"","sources":["../../../schematics/ng-update/upgrade-data.ts"],"names":[],"mappings":";;;AAAA,wDAAqE;AAErE,iCAUgB;AAEH,QAAA,eAAe,GAAgB;IAC1C,kBAAkB,EAAlB,yBAAkB;IAClB,UAAU,EAAV,iBAAU;IACV,iBAAiB,EAAjB,wBAAiB;IACjB,YAAY,EAAZ,mBAAY;IACZ,gBAAgB,EAAhB,uBAAgB;IAChB,UAAU,EAAV,iBAAU;IACV,gBAAgB,EAAhB,uBAAgB;IAChB,WAAW,EAAX,kBAAW;IACX,aAAa,EAAb,oBAAa;IACb,aAAa,EAAb,0BAAa;CACd,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UpgradeData } from '@angular/cdk/schematics';
|
|
1
|
+
import { symbolRemoval, UpgradeData } from '@angular/cdk/schematics';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
attributeSelectors,
|
|
@@ -21,5 +21,6 @@ export const ruleUpgradeData: UpgradeData = {
|
|
|
21
21
|
inputNames,
|
|
22
22
|
methodCallChecks,
|
|
23
23
|
outputNames,
|
|
24
|
-
propertyNames
|
|
24
|
+
propertyNames,
|
|
25
|
+
symbolRemoval
|
|
25
26
|
};
|
|
@@ -9,7 +9,7 @@ class SrcToNzImageRule extends schematics_1.Migration {
|
|
|
9
9
|
}
|
|
10
10
|
visitTemplate(template) {
|
|
11
11
|
const deprecatedComponent = (deprecated) => {
|
|
12
|
-
schematics_1.findInputsOnElementWithAttr(template.content, '_src', [deprecated]).forEach(offset => {
|
|
12
|
+
(0, schematics_1.findInputsOnElementWithAttr)(template.content, '_src', [deprecated]).forEach(offset => {
|
|
13
13
|
this.failures.push({
|
|
14
14
|
filePath: template.filePath,
|
|
15
15
|
position: template.getCharacterAndLineOfPosition(offset),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_src-to-nz-image-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/_src-to-nz-image-rule.ts"],"names":[],"mappings":";;;AAAA,wDAMiC;AAEjC,MAAa,gBAAiB,SAAQ,sBAAsB;IAA5D;;QACE,YAAO,GAAG,IAAI,CAAC,aAAa,KAAK,0BAAa,CAAC,GAAG,CAAC;IAgBrD,CAAC;IAdC,aAAa,CAAC,QAA0B;QACtC,MAAM,mBAAmB,GAAG,CAAC,UAAkB,EAAQ,EAAE;YACvD,wCAA2B,
|
|
1
|
+
{"version":3,"file":"_src-to-nz-image-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/_src-to-nz-image-rule.ts"],"names":[],"mappings":";;;AAAA,wDAMiC;AAEjC,MAAa,gBAAiB,SAAQ,sBAAsB;IAA5D;;QACE,YAAO,GAAG,IAAI,CAAC,aAAa,KAAK,0BAAa,CAAC,GAAG,CAAC;IAgBrD,CAAC;IAdC,aAAa,CAAC,QAA0B;QACtC,MAAM,mBAAmB,GAAG,CAAC,UAAkB,EAAQ,EAAE;YACvD,IAAA,wCAA2B,EAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;gBACnF,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;oBACjB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;oBAC3B,QAAQ,EAAE,QAAQ,CAAC,6BAA6B,CAAC,MAAM,CAAC;oBACxD,OAAO,EAAE,qBAAqB,UAAU,gDAAgD;iBACzF,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QAEF,mBAAmB,CAAC,MAAM,CAAC,CAAC;QAC5B,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;CACF;AAjBD,4CAiBC"}
|
|
@@ -18,7 +18,7 @@ const code_style_1 = require("../../../utils/code-style");
|
|
|
18
18
|
const versions_1 = require("../../../utils/versions");
|
|
19
19
|
// 修正 angular.json 的格式
|
|
20
20
|
function fixAngularJson(context) {
|
|
21
|
-
return workspace_1.updateWorkspace((workspace) => __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
return (0, workspace_1.updateWorkspace)((workspace) => __awaiter(this, void 0, void 0, function* () {
|
|
22
22
|
workspace.projects.forEach((project, name) => {
|
|
23
23
|
const removeKeys = [
|
|
24
24
|
'aot',
|
|
@@ -54,62 +54,62 @@ function fixAngularJson(context) {
|
|
|
54
54
|
};
|
|
55
55
|
serve.defaultConfiguration = 'development';
|
|
56
56
|
});
|
|
57
|
-
utils_1.logStart(context, `Fix angular.json`);
|
|
57
|
+
(0, utils_1.logStart)(context, `Fix angular.json`);
|
|
58
58
|
}));
|
|
59
59
|
}
|
|
60
60
|
function upgradeThirdVersion() {
|
|
61
61
|
return (tree, context) => {
|
|
62
|
-
utils_1.addPackage(tree, [`
|
|
63
|
-
utils_1.logStart(context, `Upgrade third libs (ngx-ueditor, ngx-tinymce) version number`);
|
|
62
|
+
(0, utils_1.addPackage)(tree, [`ngx-ueditor@^13.0.0`, `ngx-tinymce@^13.0.0`], 'dependencies');
|
|
63
|
+
(0, utils_1.logStart)(context, `Upgrade third libs (ngx-ueditor, ngx-tinymce) version number`);
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
function removeThird() {
|
|
67
67
|
return (tree, context) => {
|
|
68
|
-
utils_1.removePackage(tree, [`ngx-countdown`], 'dependencies');
|
|
69
|
-
utils_1.removePackage(tree, ['nz-tslint-rules', 'ng-alain-codelyzer'], 'devDependencies');
|
|
70
|
-
utils_1.logStart(context, `Remove redundant dependencies: ngx-countdown, ng-alain-codelyzer, nz-tslint-rules`);
|
|
68
|
+
(0, utils_1.removePackage)(tree, [`ngx-countdown`], 'dependencies');
|
|
69
|
+
(0, utils_1.removePackage)(tree, ['nz-tslint-rules', 'ng-alain-codelyzer'], 'devDependencies');
|
|
70
|
+
(0, utils_1.logStart)(context, `Remove redundant dependencies: ngx-countdown, ng-alain-codelyzer, nz-tslint-rules`);
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
function migrateESLint(tree, context) {
|
|
74
|
-
return workspace_1.updateWorkspace(_ => {
|
|
75
|
-
utils_1.logStart(context, `Migrate to ESLint`);
|
|
74
|
+
return (0, workspace_1.updateWorkspace)(_ => {
|
|
75
|
+
(0, utils_1.logStart)(context, `Migrate to ESLint`);
|
|
76
76
|
// 新增 .eslintignore, .eslintrc.js
|
|
77
77
|
['.eslintignore', '.eslintrc.js'].forEach(f => {
|
|
78
|
-
utils_1.overwriteFile({
|
|
78
|
+
(0, utils_1.overwriteFile)({
|
|
79
79
|
tree,
|
|
80
80
|
filePath: f,
|
|
81
|
-
content: utils_1.getFileContentInApplicationFiles(`root/${f}`),
|
|
81
|
+
content: (0, utils_1.getFileContentInApplicationFiles)(`root/${f}`),
|
|
82
82
|
overwrite: true,
|
|
83
83
|
contentIsString: true
|
|
84
84
|
});
|
|
85
85
|
});
|
|
86
|
-
utils_1.logInfo(context, `Add .eslintignore, .eslintrc.js`);
|
|
86
|
+
(0, utils_1.logInfo)(context, `Add .eslintignore, .eslintrc.js`);
|
|
87
87
|
// 重命名 .prettierr -> .prettierr.js 并修正内容
|
|
88
|
-
utils_1.tryDelFile(tree, '.prettierrc');
|
|
89
|
-
utils_1.overwriteFile({
|
|
88
|
+
(0, utils_1.tryDelFile)(tree, '.prettierrc');
|
|
89
|
+
(0, utils_1.overwriteFile)({
|
|
90
90
|
tree,
|
|
91
91
|
filePath: '.prettierrc.js',
|
|
92
|
-
content: utils_1.getFileContentInApplicationFiles(`root/.prettierrc.js`),
|
|
92
|
+
content: (0, utils_1.getFileContentInApplicationFiles)(`root/.prettierrc.js`),
|
|
93
93
|
overwrite: true,
|
|
94
94
|
contentIsString: true
|
|
95
95
|
});
|
|
96
|
-
utils_1.logInfo(context, `Rename .prettierrc -> .prettierrc.js`);
|
|
96
|
+
(0, utils_1.logInfo)(context, `Rename .prettierrc -> .prettierrc.js`);
|
|
97
97
|
// 更新 .vscode/settings 的 source.fixAll.tslint 为 source.fixAll.eslint
|
|
98
98
|
const vscodeSettingFilePath = `.vscode/settings.json`;
|
|
99
99
|
if (tree.exists(vscodeSettingFilePath)) {
|
|
100
|
-
const vscodeSettingContent = utils_1.readContent(tree, vscodeSettingFilePath).replace(`source.fixAll.tslint`, `source.fixAll.eslint`);
|
|
101
|
-
utils_1.writeFile(tree, vscodeSettingFilePath, vscodeSettingContent);
|
|
102
|
-
utils_1.logInfo(context, `Update .vscode/settings`);
|
|
100
|
+
const vscodeSettingContent = (0, utils_1.readContent)(tree, vscodeSettingFilePath).replace(`source.fixAll.tslint`, `source.fixAll.eslint`);
|
|
101
|
+
(0, utils_1.writeFile)(tree, vscodeSettingFilePath, vscodeSettingContent);
|
|
102
|
+
(0, utils_1.logInfo)(context, `Update .vscode/settings`);
|
|
103
103
|
}
|
|
104
104
|
// 移除 tslint.json
|
|
105
|
-
utils_1.tryDelFile(tree, 'tslint.json');
|
|
106
|
-
utils_1.logInfo(context, `Remove tslint.json`);
|
|
105
|
+
(0, utils_1.tryDelFile)(tree, 'tslint.json');
|
|
106
|
+
(0, utils_1.logInfo)(context, `Remove tslint.json`);
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
109
|
function upgradeHusky() {
|
|
110
110
|
return (tree, context) => {
|
|
111
|
-
utils_1.logStart(context, `Upgrade husky to 6.0`);
|
|
112
|
-
const packageJson = utils_1.readPackage(tree);
|
|
111
|
+
(0, utils_1.logStart)(context, `Upgrade husky to 6.0`);
|
|
112
|
+
const packageJson = (0, utils_1.readPackage)(tree);
|
|
113
113
|
delete packageJson.scripts['pretty-quick'];
|
|
114
114
|
delete packageJson.scripts['tslint-check'];
|
|
115
115
|
packageJson.scripts['prepare'] = 'husky install';
|
|
@@ -117,22 +117,22 @@ function upgradeHusky() {
|
|
|
117
117
|
delete packageJson['husky'];
|
|
118
118
|
packageJson[code_style_1.LINT_STAGED] = code_style_1.LINT_STAGED_CONFIG;
|
|
119
119
|
['.husky/.gitignore', '.husky/pre-commit'].forEach(f => {
|
|
120
|
-
utils_1.overwriteFile({
|
|
120
|
+
(0, utils_1.overwriteFile)({
|
|
121
121
|
tree,
|
|
122
122
|
filePath: f,
|
|
123
|
-
content: utils_1.getFileContentInApplicationFiles(`root/${f}`),
|
|
123
|
+
content: (0, utils_1.getFileContentInApplicationFiles)(`root/${f}`),
|
|
124
124
|
overwrite: true,
|
|
125
125
|
contentIsString: true
|
|
126
126
|
});
|
|
127
127
|
});
|
|
128
|
-
utils_1.writePackage(tree, packageJson);
|
|
128
|
+
(0, utils_1.writePackage)(tree, packageJson);
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
function formatJson() {
|
|
132
132
|
return (tree) => {
|
|
133
133
|
const angularJson = `angular.json`;
|
|
134
|
-
const json = utils_1.readJSON(tree, angularJson);
|
|
135
|
-
utils_1.writeJSON(tree, angularJson, json);
|
|
134
|
+
const json = (0, utils_1.readJSON)(tree, angularJson);
|
|
135
|
+
(0, utils_1.writeJSON)(tree, angularJson, json);
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
138
|
function finished() {
|
|
@@ -143,11 +143,11 @@ function finished() {
|
|
|
143
143
|
}
|
|
144
144
|
function v12Rule(options) {
|
|
145
145
|
return (tree, context) => __awaiter(this, void 0, void 0, function* () {
|
|
146
|
-
utils_1.logStart(context, `Upgrade @delon/* version number ${JSON.stringify(options)}`);
|
|
147
|
-
versions_1.UpgradeMainVersions(tree);
|
|
146
|
+
(0, utils_1.logStart)(context, `Upgrade @delon/* version number ${JSON.stringify(options)}`);
|
|
147
|
+
(0, versions_1.UpgradeMainVersions)(tree);
|
|
148
148
|
const rules = [
|
|
149
149
|
migrateESLint(tree, context),
|
|
150
|
-
versions_1.addESLintRule(context),
|
|
150
|
+
(0, versions_1.addESLintRule)(context),
|
|
151
151
|
upgradeThirdVersion(),
|
|
152
152
|
removeThird(),
|
|
153
153
|
upgradeHusky(),
|
|
@@ -157,7 +157,7 @@ function v12Rule(options) {
|
|
|
157
157
|
if (options.fixAngularJson !== false) {
|
|
158
158
|
rules.splice(0, 0, fixAngularJson(context));
|
|
159
159
|
}
|
|
160
|
-
return schematics_1.chain(rules);
|
|
160
|
+
return (0, schematics_1.chain)(rules);
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
exports.v12Rule = v12Rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/v12/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAAsD;AAEtD,2DAAiF;AACjF,qEAAwE;AAExE,0CAiBwB;AACxB,0DAA4E;AAC5E,sDAA6E;AAG7E,sBAAsB;AACtB,SAAS,cAAc,CAAC,OAAyB;IAC/C,OAAO,2BAAe,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/v12/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAAsD;AAEtD,2DAAiF;AACjF,qEAAwE;AAExE,0CAiBwB;AACxB,0DAA4E;AAC5E,sDAA6E;AAG7E,sBAAsB;AACtB,SAAS,cAAc,CAAC,OAAyB;IAC/C,OAAO,IAAA,2BAAe,EAAC,CAAM,SAAS,EAAC,EAAE;QACvC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;YAC3C,MAAM,UAAU,GAAG;gBACjB,KAAK;gBACL,aAAa;gBACb,iBAAiB;gBACjB,gBAAgB;gBAChB,WAAW;gBACX,cAAc;gBACd,aAAa;aACd,CAAC;YACF,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,0BAAkB,CAAC,CAAC;YACtD,IAAI,KAAK,IAAI,IAAI;gBAAE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;YAC5E,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC;YACnC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;YACpD,MAAM,kBAAkB,GAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,CAAC,UAAU,CAAC;YAC5D,UAAU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): Rule {
|
|
70
70
|
return (tree: Tree, context: SchematicContext) => {
|
|
71
|
-
addPackage(
|
|
72
|
-
tree,
|
|
73
|
-
[`tslib@^2.2.0`, `ngx-ueditor@^12.0.0`, `ngx-tinymce@^12.0.0`],
|
|
74
|
-
'dependencies'
|
|
75
|
-
);
|
|
71
|
+
addPackage(tree, [`ngx-ueditor@^13.0.0`, `ngx-tinymce@^13.0.0`], 'dependencies');
|
|
76
72
|
logStart(context, `Upgrade third libs (ngx-ueditor, ngx-tinymce) version number`);
|
|
77
73
|
};
|
|
78
74
|
}
|