ng-alain 20.1.0 → 21.0.0-next.1
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/root/eslint.config.mjs +0 -1
- package/application/files/src/app/app.config.ts +4 -2
- package/application/files/src/app/layout/basic/basic.component.ts +6 -4
- package/application/files/src/app/shared/shared-zorro.module.ts +2 -2
- package/application/index.js +4 -4
- package/application/index.spec.ts +10 -0
- package/application/index.ts +4 -4
- package/application/schema.json +6 -0
- package/application/schema.ts +1 -0
- package/docs/plugin.en-US.md +0 -1
- package/docs/plugin.zh-CN.md +0 -1
- package/migration.json +4 -4
- package/ng-add/index.js +3 -3
- package/ng-add/index.js.map +1 -1
- package/ng-add/index.spec.ts +3 -4
- package/ng-add/index.ts +3 -3
- package/ng-add/schema.json +6 -0
- package/ng-add/schema.ts +1 -0
- 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/{V20 → V21}/index.js +3 -3
- package/ng-update/upgrade-rules/{V20 → V21}/index.js.map +1 -1
- package/ng-update/upgrade-rules/{V20 → V21}/index.ts +2 -2
- package/package.json +2 -2
- package/sta/index.js +8 -8
- package/sta/index.js.map +1 -1
- package/sta/index.ts +8 -8
- package/utils/lib-versions.js +2 -2
- package/utils/lib-versions.ts +2 -2
- package/utils/log.js +6 -6
- package/utils/log.js.map +1 -1
- package/utils/log.ts +6 -6
- package/utils/versions.js +12 -12
- package/utils/versions.ts +12 -12
- /package/ng-update/upgrade-rules/{V20 → V21}/index.spec.ts +0 -0
|
@@ -7,7 +7,8 @@ import { <% if (i18n) { %>I18NService, <% } %>defaultInterceptor, provideStartup
|
|
|
7
7
|
import { provideCellWidgets } from '@delon/abc/cell';
|
|
8
8
|
import { provideSTWidgets } from '@delon/abc/st';
|
|
9
9
|
import { authSimpleInterceptor, provideAuth } from '@delon/auth';<% if (form) { %>
|
|
10
|
-
import { provideSFConfig } from '@delon/form';<% } %>
|
|
10
|
+
import { provideSFConfig } from '@delon/form';<% } %><% if (reuseTab) { %>
|
|
11
|
+
import { provideReuseTabConfig } from '@delon/abc/reuse-tab';<% } %>
|
|
11
12
|
import { AlainProvideLang, provideAlain, zh_CN as delonLang } from '@delon/theme';
|
|
12
13
|
import { AlainConfig } from '@delon/util/config';
|
|
13
14
|
import { environment } from '@env/environment';
|
|
@@ -45,7 +46,8 @@ if (environment.useHash) routerFeatures.push(withHashLocation());
|
|
|
45
46
|
const providers: Array<Provider | EnvironmentProviders> = [
|
|
46
47
|
provideHttpClient(withInterceptors([...(environment.interceptorFns ?? []), authSimpleInterceptor, defaultInterceptor])),
|
|
47
48
|
provideAnimations(),
|
|
48
|
-
provideRouter(routes, ...routerFeatures)
|
|
49
|
+
provideRouter(routes, ...routerFeatures),<% if (reuseTab) { %>
|
|
50
|
+
provideReuseTabConfig(),<% } %>
|
|
49
51
|
provideAlain({ config: alainConfig, defaultLang<% if (i18n) { %>, i18nClass: I18NService<% } %>, icons: [...ICONS_AUTO, ...ICONS] }),
|
|
50
52
|
provideNzConfig(ngZorroConfig),
|
|
51
53
|
provideAuth(),
|
|
@@ -6,7 +6,7 @@ import { SettingDrawerModule } from '@delon/theme/setting-drawer';
|
|
|
6
6
|
import { ThemeBtnComponent } from '@delon/theme/theme-btn';
|
|
7
7
|
import { environment } from '@env/environment';
|
|
8
8
|
import { NzAvatarModule } from 'ng-zorro-antd/avatar';
|
|
9
|
-
import {
|
|
9
|
+
import { NzDropdownModule } from 'ng-zorro-antd/dropdown';
|
|
10
10
|
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
11
11
|
import { NzMenuModule } from 'ng-zorro-antd/menu';
|
|
12
12
|
|
|
@@ -74,8 +74,10 @@ import { HeaderI18nComponent } from './widgets/i18n.component';<% } %>
|
|
|
74
74
|
</ul>
|
|
75
75
|
</nz-dropdown-menu>
|
|
76
76
|
</ng-template>
|
|
77
|
-
<ng-template #contentTpl
|
|
78
|
-
<
|
|
77
|
+
<ng-template #contentTpl><% if (reuseTab) { %>
|
|
78
|
+
<reuse-tab #reuseTab />
|
|
79
|
+
<router-outlet (activate)="reuseTab.activate($event)" (attach)="reuseTab.activate($event)" /><% } else { %>
|
|
80
|
+
<router-outlet /><% } %>
|
|
79
81
|
</ng-template>
|
|
80
82
|
</layout-default>
|
|
81
83
|
@if (showSettingDrawer) {
|
|
@@ -92,7 +94,7 @@ import { HeaderI18nComponent } from './widgets/i18n.component';<% } %>
|
|
|
92
94
|
ThemeBtnComponent,
|
|
93
95
|
NzIconModule,
|
|
94
96
|
NzMenuModule,
|
|
95
|
-
|
|
97
|
+
NzDropdownModule,
|
|
96
98
|
NzAvatarModule,
|
|
97
99
|
HeaderSearchComponent,
|
|
98
100
|
HeaderClearStorageComponent,
|
|
@@ -4,7 +4,7 @@ import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
|
4
4
|
import { NzCardModule } from 'ng-zorro-antd/card';
|
|
5
5
|
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
|
|
6
6
|
import { NzDrawerModule } from 'ng-zorro-antd/drawer';
|
|
7
|
-
import {
|
|
7
|
+
import { NzDropdownModule } from 'ng-zorro-antd/dropdown';
|
|
8
8
|
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
9
9
|
import { NzGridModule } from 'ng-zorro-antd/grid';
|
|
10
10
|
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
@@ -31,7 +31,7 @@ export const SHARED_ZORRO_MODULES = [
|
|
|
31
31
|
NzSelectModule,
|
|
32
32
|
NzAvatarModule,
|
|
33
33
|
NzCardModule,
|
|
34
|
-
|
|
34
|
+
NzDropdownModule,
|
|
35
35
|
NzPopconfirmModule,
|
|
36
36
|
NzTableModule,
|
|
37
37
|
NzPopoverModule,
|
package/application/index.js
CHANGED
|
@@ -142,10 +142,10 @@ function addCodeStylesToPackageJson() {
|
|
|
142
142
|
// dependencies
|
|
143
143
|
(0, utils_1.addPackage)(tree, [
|
|
144
144
|
`husky@^9.1.7`,
|
|
145
|
-
`lint-staged@^16.
|
|
146
|
-
`prettier@^3.
|
|
147
|
-
`stylelint@^16.
|
|
148
|
-
`stylelint-config-standard@^39.0.
|
|
145
|
+
`lint-staged@^16.2.7`,
|
|
146
|
+
`prettier@^3.7.4`,
|
|
147
|
+
`stylelint@^16.26.1`,
|
|
148
|
+
`stylelint-config-standard@^39.0.1`,
|
|
149
149
|
`stylelint-declaration-block-no-ignored-properties@^2.8.0`,
|
|
150
150
|
`stylelint-config-clean-order@^7.0.0`
|
|
151
151
|
], 'devDependencies');
|
|
@@ -111,6 +111,16 @@ describe('NgAlainSchematic: application', () => {
|
|
|
111
111
|
});
|
|
112
112
|
});
|
|
113
113
|
|
|
114
|
+
describe('#reuse-tab', () => {
|
|
115
|
+
it(`should be working`, async () => {
|
|
116
|
+
({ tree } = await createAlainApp({ reuseTab: true }));
|
|
117
|
+
const appConfig = tree.readContent('/projects/foo/src/app/app.config.ts');
|
|
118
|
+
expect(appConfig).toContain(`provideReuseTabConfig(),`);
|
|
119
|
+
const baseComp = tree.readContent('/projects/foo/src/app/layout/basic/basic.component.ts');
|
|
120
|
+
expect(baseComp).toContain(`<reuse-tab #reuseTab />`);
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
|
|
114
124
|
describe('#multiple-projects', () => {
|
|
115
125
|
let runner: SchematicTestRunner;
|
|
116
126
|
let tree: UnitTestTree;
|
package/application/index.ts
CHANGED
|
@@ -188,10 +188,10 @@ function addCodeStylesToPackageJson(): Rule {
|
|
|
188
188
|
tree,
|
|
189
189
|
[
|
|
190
190
|
`husky@^9.1.7`,
|
|
191
|
-
`lint-staged@^16.
|
|
192
|
-
`prettier@^3.
|
|
193
|
-
`stylelint@^16.
|
|
194
|
-
`stylelint-config-standard@^39.0.
|
|
191
|
+
`lint-staged@^16.2.7`,
|
|
192
|
+
`prettier@^3.7.4`,
|
|
193
|
+
`stylelint@^16.26.1`,
|
|
194
|
+
`stylelint-config-standard@^39.0.1`,
|
|
195
195
|
`stylelint-declaration-block-no-ignored-properties@^2.8.0`,
|
|
196
196
|
`stylelint-config-clean-order@^7.0.0`
|
|
197
197
|
],
|
package/application/schema.json
CHANGED
|
@@ -22,6 +22,12 @@
|
|
|
22
22
|
"default": true,
|
|
23
23
|
"x-prompt": "Would you like to add mock plugin? (default: Y)"
|
|
24
24
|
},
|
|
25
|
+
"reuseTab": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"description": "Generate reuse-tab plugin",
|
|
28
|
+
"default": false,
|
|
29
|
+
"x-prompt": "Would you like to add a multi-tag implementation? (default: N)"
|
|
30
|
+
},
|
|
25
31
|
"i18n": {
|
|
26
32
|
"type": "boolean",
|
|
27
33
|
"description": "Generate i18n plugin",
|
package/application/schema.ts
CHANGED
package/docs/plugin.en-US.md
CHANGED
|
@@ -138,7 +138,6 @@ export class StartupService {
|
|
|
138
138
|
<nz-icon [nzType]="d.status === 'NORMAL' ? 'close1' : 'close2'" />
|
|
139
139
|
<nz-icon nzType="{{ type ? 'arrow-left' : 'arrow-right' }}" />
|
|
140
140
|
<nz-icon nzType="filter" theme="outline" />
|
|
141
|
-
<nz-input-group [nzAddOnBeforeIcon]="focus ? 'anticon anticon-arrow-down' : 'anticon anticon-search'"></nz-input-group>
|
|
142
141
|
```
|
|
143
142
|
|
|
144
143
|
### rtl
|
package/docs/plugin.zh-CN.md
CHANGED
|
@@ -139,7 +139,6 @@ export class StartupService {
|
|
|
139
139
|
<nz-icon [nzType]="d.status === 'NORMAL' ? 'close1' : 'close2'" />
|
|
140
140
|
<nz-icon nzType="{{ type ? 'arrow-left' : 'arrow-right' }}" />
|
|
141
141
|
<nz-icon nzType="filter" theme="outline" />
|
|
142
|
-
<nz-input-group [nzAddOnBeforeIcon]="focus ? 'anticon anticon-arrow-down' : 'anticon anticon-search'"></nz-input-group>
|
|
143
142
|
```
|
|
144
143
|
|
|
145
144
|
### rtl
|
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-v21": {
|
|
5
|
+
"version": "21",
|
|
6
|
+
"description": "Updates NG-ALAIN to v21 [https://github.com/ng-alain/ng-alain/issues/2589]",
|
|
7
|
+
"factory": "./ng-update/index#updateToV21"
|
|
8
8
|
},
|
|
9
9
|
"ng-post-update": {
|
|
10
10
|
"description": "Performs cleanup after ng-update.",
|
package/ng-add/index.js
CHANGED
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.default = default_1;
|
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
5
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
6
|
-
const
|
|
6
|
+
const listr2_1 = require("listr2");
|
|
7
7
|
const utils_1 = require("../utils");
|
|
8
8
|
const node_1 = require("../utils/node");
|
|
9
|
-
const V =
|
|
9
|
+
const V = 21;
|
|
10
10
|
function genRules(options) {
|
|
11
11
|
return () => {
|
|
12
12
|
const rules = [];
|
|
@@ -35,7 +35,7 @@ function isValidProjectName(tree, name) {
|
|
|
35
35
|
function finished() {
|
|
36
36
|
return (_, context) => {
|
|
37
37
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
38
|
-
context.logger.info(
|
|
38
|
+
context.logger.info(listr2_1.color.green(`
|
|
39
39
|
✓ Congratulations, NG-ALAIN scaffold generation complete 🎉.
|
|
40
40
|
|
|
41
41
|
NG-ALAIN documentation site: https://ng-alain.com
|
package/ng-add/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;AA0DA,4BAuCC;AAjGD,2DAAiH;AACjH,4DAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;AA0DA,4BAuCC;AAjGD,2DAAiH;AACjH,4DAA0E;AAC1E,mCAA+B;AAG/B,oCAAyE;AAEzE,wCAAoD;AAEpD,MAAM,CAAC,GAAG,EAAE,CAAC;AAEb,SAAS,QAAQ,CAAC,OAAqB;IACrC,OAAO,GAAG,EAAE;QACV,MAAM,KAAK,GAAW,EAAE,CAAC;QAEzB,MAAM,kBAAkB,qBAA4B,OAAO,CAAE,CAAC;QAC9D,KAAK,CAAC,IAAI,CAAC,IAAA,sBAAS,EAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC,CAAC;QAEzD,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;YACtB,KAAK,CAAC,IAAI,CAAC,IAAA,sBAAS,EAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QACtE,CAAC;QAED,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;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AAI,gCAAmB,CAC3B,kCAAkC,QAAQ,sCAAsC,OAAO,CAAC,OAAO,oFAAoF,CACpL,CAAC;QACJ,CAAC;QAED,MAAM,GAAG,GAAG,IAAA,mBAAW,EAAC,IAAI,CAAC,CAAC;QAE9B,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACpB,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC/C,MAAM,IAAI,gCAAmB,CAAC,sDAAsD,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;YACzG,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,GAAG,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE,CAAC;gBACpC,MAAM,IAAI,gCAAmB,CAAC,0EAA0E,CAAC,CAAC;YAC5G,CAAC;QACH,CAAC;QAED,IAAI,aAAa,GAAG,GAAG,CAAC,YAAY,CAAC,eAAe,CAAW,CAAC;QAChE,IAAI,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;YACnC,aAAa,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAC7C,CAAC;QACD,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACvC,MAAM,IAAI,gCAAmB,CAC3B,oDAAoD,CAAC,iFAAiF,CAAC,GAAG,CAC3I,CAAC;QACJ,CAAC;QAED,OAAO,IAAA,kBAAK,EAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC,CAAC;AACJ,CAAC"}
|
package/ng-add/index.spec.ts
CHANGED
|
@@ -5,18 +5,17 @@ import { createAlainApp } from '../utils/testing';
|
|
|
5
5
|
import { DEFAULT_WORKSPACE_PATH } from '../utils/workspace';
|
|
6
6
|
|
|
7
7
|
describe('Schematic: ng-add', () => {
|
|
8
|
-
|
|
9
|
-
let runner: SchematicTestRunner;
|
|
8
|
+
let _runner: SchematicTestRunner;
|
|
10
9
|
let tree: UnitTestTree;
|
|
11
10
|
|
|
12
11
|
it('should dependencies @delon of an application', async () => {
|
|
13
|
-
({ runner, tree } = await createAlainApp());
|
|
12
|
+
({ runner: _runner, tree } = await createAlainApp());
|
|
14
13
|
const packageJson = JSON.parse(tree.readContent('package.json'));
|
|
15
14
|
expect(packageJson.dependencies['@delon/theme']).toBeDefined();
|
|
16
15
|
});
|
|
17
16
|
|
|
18
17
|
it('#issues-https://github.com/ng-alain/ng-alain/issues/2359', async () => {
|
|
19
|
-
({ runner, tree } = await createAlainApp());
|
|
18
|
+
({ runner: _runner, tree } = await createAlainApp());
|
|
20
19
|
const json = JSON.parse(tree.readContent(DEFAULT_WORKSPACE_PATH));
|
|
21
20
|
const budgets = json.projects['foo'].architect.build.configurations.production.budgets;
|
|
22
21
|
expect(budgets[0].maximumWarning).toBe('2mb');
|
package/ng-add/index.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { chain, Rule, schematic, Tree, SchematicContext, SchematicsException } from '@angular-devkit/schematics';
|
|
2
2
|
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
|
|
3
|
-
import
|
|
3
|
+
import { color } from 'listr2';
|
|
4
4
|
|
|
5
5
|
import { Schema as ApplicationOptions } from '../application/schema';
|
|
6
6
|
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 = 21;
|
|
11
11
|
|
|
12
12
|
function genRules(options: NgAddOptions): Rule {
|
|
13
13
|
return () => {
|
|
@@ -47,7 +47,7 @@ function finished(): Rule {
|
|
|
47
47
|
context.addTask(new NodePackageInstallTask());
|
|
48
48
|
|
|
49
49
|
context.logger.info(
|
|
50
|
-
|
|
50
|
+
color.green(`
|
|
51
51
|
✓ Congratulations, NG-ALAIN scaffold generation complete 🎉.
|
|
52
52
|
|
|
53
53
|
NG-ALAIN documentation site: https://ng-alain.com
|
package/ng-add/schema.json
CHANGED
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"default": true,
|
|
75
75
|
"x-prompt": "Would you like to add mock plugin? (default: Y)"
|
|
76
76
|
},
|
|
77
|
+
"reuseTab": {
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"description": "Generate reuse-tab plugin",
|
|
80
|
+
"default": false,
|
|
81
|
+
"x-prompt": "Would you like to add a multi-tag implementation? (default: N)"
|
|
82
|
+
},
|
|
77
83
|
"i18n": {
|
|
78
84
|
"type": "boolean",
|
|
79
85
|
"description": "Generate i18n plugin",
|
package/ng-add/schema.ts
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.V21]: []
|
|
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.V21]: []
|
|
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.V21]: []
|
|
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.V21]: []
|
|
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.V21]: []
|
|
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.V21]: []
|
|
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.V21]: []
|
|
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.V21]: []
|
|
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.V21]: []
|
|
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.V21]: []
|
|
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.updateToV21 = updateToV21;
|
|
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 V21_1 = require("./upgrade-rules/V21");
|
|
9
9
|
const migrations = [];
|
|
10
|
-
function
|
|
11
|
-
return (0, schematics_2.chain)([(0,
|
|
10
|
+
function updateToV21() {
|
|
11
|
+
return (0, schematics_2.chain)([(0, V21_1.v21Rule)(), (0, schematics_1.createMigrationSchematicRule)(schematics_1.TargetVersion.V21, 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 { v21Rule } from './upgrade-rules/V21';
|
|
7
7
|
|
|
8
8
|
const migrations: NullableDevkitMigration[] = [];
|
|
9
9
|
|
|
10
|
-
export function
|
|
11
|
-
return chain([
|
|
10
|
+
export function updateToV21(): Rule {
|
|
11
|
+
return chain([v21Rule(), createMigrationSchematicRule(TargetVersion.V21, migrations, ruleUpgradeData, postUpdate)]);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/** Post-update schematic to be called when update is finished. */
|
|
@@ -9,7 +9,7 @@ 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.v21Rule = v21Rule;
|
|
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");
|
|
@@ -17,10 +17,10 @@ const versions_1 = require("../../../utils/versions");
|
|
|
17
17
|
function finished() {
|
|
18
18
|
return (_tree, context) => {
|
|
19
19
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
20
|
-
(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/2589`);
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function v21Rule() {
|
|
24
24
|
return (tree, context) => __awaiter(this, void 0, void 0, function* () {
|
|
25
25
|
(0, versions_1.UpgradeMainVersions)(tree);
|
|
26
26
|
(0, utils_1.logInfo)(context, `Upgrade dependency version number`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/V21/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"}
|
|
@@ -10,12 +10,12 @@ function finished(): Rule {
|
|
|
10
10
|
|
|
11
11
|
logFinished(
|
|
12
12
|
context,
|
|
13
|
-
`Congratulations, Abort more detail please refer to upgrade guide https://github.com/ng-alain/ng-alain/issues/
|
|
13
|
+
`Congratulations, Abort more detail please refer to upgrade guide https://github.com/ng-alain/ng-alain/issues/2589`
|
|
14
14
|
);
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export function
|
|
18
|
+
export function v21Rule(): Rule {
|
|
19
19
|
return async (tree: Tree, context: SchematicContext) => {
|
|
20
20
|
UpgradeMainVersions(tree);
|
|
21
21
|
logInfo(context, `Upgrade dependency version number`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ng-alain",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.0-next.1",
|
|
4
4
|
"description": "Schematics specific to NG-ALAIN",
|
|
5
5
|
"author": "cipchk<cipchk@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -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": "^21.0.5"
|
|
29
29
|
},
|
|
30
30
|
"ng-update": {
|
|
31
31
|
"migrations": "./migration.json",
|
package/sta/index.js
CHANGED
|
@@ -12,9 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.default = default_1;
|
|
13
13
|
const core_1 = require("@angular-devkit/core");
|
|
14
14
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
15
|
-
const colors = require("ansi-colors");
|
|
16
15
|
const fs_1 = require("fs");
|
|
17
16
|
const jsonc_parser_1 = require("jsonc-parser");
|
|
17
|
+
const listr2_1 = require("listr2");
|
|
18
18
|
const path_1 = require("path");
|
|
19
19
|
const swagger_typescript_api_1 = require("swagger-typescript-api");
|
|
20
20
|
const json_1 = require("../utils/json");
|
|
@@ -110,18 +110,18 @@ function fix(output, res, tree, context, config) {
|
|
|
110
110
|
function genProxy(config) {
|
|
111
111
|
return (tree, context) => {
|
|
112
112
|
var _a;
|
|
113
|
-
context.logger.info(
|
|
113
|
+
context.logger.info(listr2_1.color.blue(`- Name: ${config.name}`));
|
|
114
114
|
const output = (config.output = (0, path_1.resolve)(process.cwd(), (_a = config.output) !== null && _a !== void 0 ? _a : `./src/app/_${config.name}`));
|
|
115
115
|
const templates = (0, path_1.resolve)(__dirname, './templates');
|
|
116
116
|
if (config.url) {
|
|
117
|
-
context.logger.info(
|
|
117
|
+
context.logger.info(listr2_1.color.blue(`- Using url data: ${config.url}`));
|
|
118
118
|
}
|
|
119
119
|
else if (config.filePath) {
|
|
120
|
-
context.logger.info(
|
|
120
|
+
context.logger.info(listr2_1.color.blue(`- Using file data: ${config.filePath}`));
|
|
121
121
|
}
|
|
122
|
-
context.logger.info(
|
|
122
|
+
context.logger.info(listr2_1.color.blue(`- Output: ${output}`));
|
|
123
123
|
return new Promise(resolve => {
|
|
124
|
-
context.logger.info(
|
|
124
|
+
context.logger.info(listr2_1.color.blue(`Start generating...`));
|
|
125
125
|
const options = Object.assign({ name: `${config.name}.ts`, url: config.url, input: config.filePath, spec: config.spec, output,
|
|
126
126
|
templates, toJS: false, modular: true, cleanOutput: true, generateUnionEnums: true, generateClient: true, extractRequestParams: false, generateResponses: false, generateRouteTypes: true, generateApi: true, silent: true, disableStrictSSL: true, moduleNameFirstTag: true, defaultResponseType: 'any', typePrefix: config.modelTypePrefix, hooks: {
|
|
127
127
|
onInit: (c) => {
|
|
@@ -188,7 +188,7 @@ function genProxy(config) {
|
|
|
188
188
|
}
|
|
189
189
|
function finished() {
|
|
190
190
|
return (_, context) => {
|
|
191
|
-
context.logger.info(
|
|
191
|
+
context.logger.info(listr2_1.color.green(`✓ Finished, refer to: https://ng-alain.com/cli/sta`));
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
194
|
function tryLoadConfig(context, configPath) {
|
|
@@ -196,7 +196,7 @@ function tryLoadConfig(context, configPath) {
|
|
|
196
196
|
return null;
|
|
197
197
|
try {
|
|
198
198
|
const configFile = (0, path_1.resolve)(process.cwd(), configPath);
|
|
199
|
-
context.logger.info(
|
|
199
|
+
context.logger.info(listr2_1.color.blue(`- Use config file: ${configFile}`));
|
|
200
200
|
if ((0, fs_1.existsSync)(configFile)) {
|
|
201
201
|
return (0, jsonc_parser_1.parse)((0, fs_1.readFileSync)(configFile).toString('utf8'));
|
|
202
202
|
}
|
package/sta/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/sta/index.ts"],"names":[],"mappings":";;;;;;;;;;;AA2OA,4BAoBC;AA/PD,+CAAiD;AAEjD,2DAAsG;AACtG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/sta/index.ts"],"names":[],"mappings":";;;;;;;;;;;AA2OA,4BAoBC;AA/PD,+CAAiD;AAEjD,2DAAsG;AACtG,2BAAiE;AACjE,+CAAqC;AACrC,mCAA+B;AAC/B,+BAAqC;AACrC,mEAA2F;AAI3F,wCAA2C;AAC3C,kDAAgE;AAEhE,IAAI,OAA0B,CAAC;AAC/B,IAAI,WAAmB,CAAC;AAExB,MAAM,UAAU,GAAG;;;;;;;;CAQlB,CAAC;AAEF,SAAS,iBAAiB,CAAC,IAAY;IACrC,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,MAAM,YAAY,GAAG,IAAA,0BAAc,EAAC,IAAI,CAAC,CAAC;QAC1C,MAAM,aAAa,GAAG,YAAY,CAAC,CAAC,CAAC,YAAY,WAAW,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QACrE,MAAM,YAAY,GAAG,eAAe,CAAC;QACrC,MAAM,QAAQ,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;QAC9C,IAAA,iBAAU,EAAC,IAAI,EAAE,YAAY,EAAE;YAC7B,IAAI,EAAE,CAAC,GAAG,QAAQ,EAAE,IAAI,IAAI,EAAE,CAAC;YAC/B,KAAK,EAAE,CAAC,GAAG,aAAa,YAAY,IAAI,QAAQ,CAAC;SAClD,CAAC,CAAC;QACH,IAAA,i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ectDefinition } from '@angular-devkit/core/src/workspace';
|
|
3
3
|
import { Rule, SchematicsException, Tree, chain, SchematicContext } from '@angular-devkit/schematics';
|
|
4
|
-
import * as colors from 'ansi-colors';
|
|
5
4
|
import { rmSync, mkdirSync, existsSync, readFileSync } from 'fs';
|
|
6
5
|
import { parse } from 'jsonc-parser';
|
|
6
|
+
import { color } from 'listr2';
|
|
7
7
|
import { resolve, join } from 'path';
|
|
8
8
|
import { generateApi, GenerateApiOutput, GenerateApiParams } from 'swagger-typescript-api';
|
|
9
9
|
|
|
@@ -120,18 +120,18 @@ function fix(output: string, res: GenerateApiOutput, tree: Tree, context: Schema
|
|
|
120
120
|
|
|
121
121
|
function genProxy(config: STAConfig): Rule {
|
|
122
122
|
return (tree: Tree, context: SchematicContext) => {
|
|
123
|
-
context.logger.info(
|
|
123
|
+
context.logger.info(color.blue(`- Name: ${config.name}`));
|
|
124
124
|
const output = (config.output = resolve(process.cwd(), config.output ?? `./src/app/_${config.name}`));
|
|
125
125
|
const templates = resolve(__dirname, './templates');
|
|
126
126
|
if (config.url) {
|
|
127
|
-
context.logger.info(
|
|
127
|
+
context.logger.info(color.blue(`- Using url data: ${config.url}`));
|
|
128
128
|
} else if (config.filePath) {
|
|
129
|
-
context.logger.info(
|
|
129
|
+
context.logger.info(color.blue(`- Using file data: ${config.filePath}`));
|
|
130
130
|
}
|
|
131
|
-
context.logger.info(
|
|
131
|
+
context.logger.info(color.blue(`- Output: ${output}`));
|
|
132
132
|
|
|
133
133
|
return new Promise<void>(resolve => {
|
|
134
|
-
context.logger.info(
|
|
134
|
+
context.logger.info(color.blue(`Start generating...`));
|
|
135
135
|
const options = {
|
|
136
136
|
name: `${config.name}.ts`,
|
|
137
137
|
url: config.url,
|
|
@@ -215,7 +215,7 @@ function genProxy(config: STAConfig): Rule {
|
|
|
215
215
|
|
|
216
216
|
function finished(): Rule {
|
|
217
217
|
return (_: Tree, context: SchematicContext) => {
|
|
218
|
-
context.logger.info(
|
|
218
|
+
context.logger.info(color.green(`✓ Finished, refer to: https://ng-alain.com/cli/sta`));
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
221
|
|
|
@@ -224,7 +224,7 @@ function tryLoadConfig(context: SchematicContext, configPath?: string): STAConfi
|
|
|
224
224
|
|
|
225
225
|
try {
|
|
226
226
|
const configFile = resolve(process.cwd(), configPath);
|
|
227
|
-
context.logger.info(
|
|
227
|
+
context.logger.info(color.blue(`- Use config file: ${configFile}`));
|
|
228
228
|
if (existsSync(configFile)) {
|
|
229
229
|
return parse(readFileSync(configFile).toString('utf8'));
|
|
230
230
|
}
|
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 = '^21.0.0-next.1';
|
|
5
|
+
exports.ZORROVERSION = '^21.0.0-beta.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 = '^21.0.0-next.1';
|
|
2
|
+
export const ZORROVERSION = '^21.0.0-beta.0';
|
package/utils/log.js
CHANGED
|
@@ -5,20 +5,20 @@ exports.logInfo = logInfo;
|
|
|
5
5
|
exports.logWarn = logWarn;
|
|
6
6
|
exports.logEx = logEx;
|
|
7
7
|
exports.logFinished = logFinished;
|
|
8
|
-
const
|
|
8
|
+
const listr2_1 = require("listr2");
|
|
9
9
|
function logStart(context, message) {
|
|
10
|
-
context.logger.info(`${
|
|
10
|
+
context.logger.info(`${listr2_1.color.green('✓')} ${message}`);
|
|
11
11
|
}
|
|
12
12
|
function logInfo(context, message) {
|
|
13
|
-
context.logger.info(` ${
|
|
13
|
+
context.logger.info(` ${listr2_1.color.green('✓')} ${message}`);
|
|
14
14
|
}
|
|
15
15
|
function logWarn(context, message) {
|
|
16
|
-
context.logger.info(` ${
|
|
16
|
+
context.logger.info(` ${listr2_1.color.yellow(`⚠ ${message}`)}`);
|
|
17
17
|
}
|
|
18
18
|
function logEx(context, message) {
|
|
19
|
-
context.logger.error(` ${
|
|
19
|
+
context.logger.error(` ${listr2_1.color.yellow(`x ${message}`)}`);
|
|
20
20
|
}
|
|
21
21
|
function logFinished(context, message) {
|
|
22
|
-
context.logger.info(`${
|
|
22
|
+
context.logger.info(`${listr2_1.color.green(`✓ ${message}`)}`);
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=log.js.map
|
package/utils/log.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../../schematics/utils/log.ts"],"names":[],"mappings":";;AAGA,4BAEC;AAED,0BAEC;AAED,0BAEC;AAED,sBAEC;AAED,kCAEC;AApBD,
|
|
1
|
+
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../../schematics/utils/log.ts"],"names":[],"mappings":";;AAGA,4BAEC;AAED,0BAEC;AAED,0BAEC;AAED,sBAEC;AAED,kCAEC;AApBD,mCAA+B;AAE/B,SAAgB,QAAQ,CAAC,OAAyB,EAAE,OAAe;IACjE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,cAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,OAAO,EAAE,CAAC,CAAC;AACxD,CAAC;AAED,SAAgB,OAAO,CAAC,OAAyB,EAAE,OAAe;IAChE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,cAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,OAAO,EAAE,CAAC,CAAC;AAC1D,CAAC;AAED,SAAgB,OAAO,CAAC,OAAyB,EAAE,OAAe;IAChE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,cAAK,CAAC,MAAM,CAAC,KAAK,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AAC3D,CAAC;AAED,SAAgB,KAAK,CAAC,OAAyB,EAAE,OAAe;IAC9D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,cAAK,CAAC,MAAM,CAAC,KAAK,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AAC5D,CAAC;AAED,SAAgB,WAAW,CAAC,OAAyB,EAAE,OAAe;IACpE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,cAAK,CAAC,KAAK,CAAC,KAAK,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AACxD,CAAC"}
|
package/utils/log.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { SchematicContext } from '@angular-devkit/schematics';
|
|
2
|
-
import
|
|
2
|
+
import { color } from 'listr2';
|
|
3
3
|
|
|
4
4
|
export function logStart(context: SchematicContext, message: string): void {
|
|
5
|
-
context.logger.info(`${
|
|
5
|
+
context.logger.info(`${color.green('✓')} ${message}`);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export function logInfo(context: SchematicContext, message: string): void {
|
|
9
|
-
context.logger.info(` ${
|
|
9
|
+
context.logger.info(` ${color.green('✓')} ${message}`);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export function logWarn(context: SchematicContext, message: string): void {
|
|
13
|
-
context.logger.info(` ${
|
|
13
|
+
context.logger.info(` ${color.yellow(`⚠ ${message}`)}`);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export function logEx(context: SchematicContext, message: string): void {
|
|
17
|
-
context.logger.error(` ${
|
|
17
|
+
context.logger.error(` ${color.yellow(`x ${message}`)}`);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export function logFinished(context: SchematicContext, message: string): void {
|
|
21
|
-
context.logger.info(`${
|
|
21
|
+
context.logger.info(`${color.green(`✓ ${message}`)}`);
|
|
22
22
|
}
|
package/utils/versions.js
CHANGED
|
@@ -21,28 +21,28 @@ const workspace_2 = require("./workspace");
|
|
|
21
21
|
function UpgradeMainVersions(tree, version = lib_versions_1.VERSION) {
|
|
22
22
|
(0, package_1.addPackage)(tree, ['abc', 'acl', 'auth', 'cache', 'form', 'mock', 'theme', 'util', 'chart'].map(name => `@delon/${name}@${version}`));
|
|
23
23
|
(0, package_1.addPackage)(tree, [
|
|
24
|
-
`angular-eslint
|
|
25
|
-
`@typescript-eslint/eslint-plugin@^8.
|
|
26
|
-
`@typescript-eslint/parser@^8.
|
|
27
|
-
`@typescript-eslint/utils@^8.
|
|
28
|
-
`eslint@^9.
|
|
24
|
+
`angular-eslint@21.1.0`,
|
|
25
|
+
`@typescript-eslint/eslint-plugin@^8.50.1`,
|
|
26
|
+
`@typescript-eslint/parser@^8.50.1`,
|
|
27
|
+
`@typescript-eslint/utils@^8.50.1`,
|
|
28
|
+
`eslint@^9.39.1`,
|
|
29
29
|
`eslint-config-prettier@^10.1.8`,
|
|
30
30
|
`eslint-plugin-import@~2.32.0`,
|
|
31
|
-
`eslint-plugin-jsdoc@~61.
|
|
31
|
+
`eslint-plugin-jsdoc@~61.5.0`,
|
|
32
32
|
`eslint-plugin-prefer-arrow@~1.2.3`,
|
|
33
33
|
`eslint-plugin-prettier@~5.5.4`,
|
|
34
|
-
`eslint-plugin-unused-imports@^4.
|
|
35
|
-
`typescript-eslint
|
|
36
|
-
`prettier@^3.
|
|
34
|
+
`eslint-plugin-unused-imports@^4.3.0`,
|
|
35
|
+
`typescript-eslint@8.47.0`,
|
|
36
|
+
`prettier@^3.7.4`,
|
|
37
37
|
`husky@^9.1.7`,
|
|
38
38
|
`ng-alain@${version}`,
|
|
39
39
|
`ng-alain-plugin-theme@^18.0.0`,
|
|
40
40
|
`source-map-explorer@^2.5.3`,
|
|
41
|
-
`ngx-tinymce@^
|
|
42
|
-
`@ng-util/monaco-editor@^
|
|
41
|
+
`ngx-tinymce@^21.0.0`,
|
|
42
|
+
`@ng-util/monaco-editor@^21.0.1`,
|
|
43
43
|
`@delon/testing@${version}`
|
|
44
44
|
], 'devDependencies');
|
|
45
|
-
(0, package_1.addPackage)(tree, [`rxjs@~7.8.0`, `ng-zorro-antd@^
|
|
45
|
+
(0, package_1.addPackage)(tree, [`rxjs@~7.8.0`, `ng-zorro-antd@^21.0.0-beta.0`]);
|
|
46
46
|
}
|
|
47
47
|
function addESLintRule(projectName) {
|
|
48
48
|
return (0, workspace_1.updateWorkspace)((workspace) => __awaiter(this, void 0, void 0, function* () {
|
package/utils/versions.ts
CHANGED
|
@@ -16,30 +16,30 @@ export function UpgradeMainVersions(tree: Tree, version: string = VERSION): void
|
|
|
16
16
|
addPackage(
|
|
17
17
|
tree,
|
|
18
18
|
[
|
|
19
|
-
`angular-eslint
|
|
20
|
-
`@typescript-eslint/eslint-plugin@^8.
|
|
21
|
-
`@typescript-eslint/parser@^8.
|
|
22
|
-
`@typescript-eslint/utils@^8.
|
|
23
|
-
`eslint@^9.
|
|
19
|
+
`angular-eslint@21.1.0`,
|
|
20
|
+
`@typescript-eslint/eslint-plugin@^8.50.1`,
|
|
21
|
+
`@typescript-eslint/parser@^8.50.1`,
|
|
22
|
+
`@typescript-eslint/utils@^8.50.1`,
|
|
23
|
+
`eslint@^9.39.1`,
|
|
24
24
|
`eslint-config-prettier@^10.1.8`,
|
|
25
25
|
`eslint-plugin-import@~2.32.0`,
|
|
26
|
-
`eslint-plugin-jsdoc@~61.
|
|
26
|
+
`eslint-plugin-jsdoc@~61.5.0`,
|
|
27
27
|
`eslint-plugin-prefer-arrow@~1.2.3`,
|
|
28
28
|
`eslint-plugin-prettier@~5.5.4`,
|
|
29
|
-
`eslint-plugin-unused-imports@^4.
|
|
30
|
-
`typescript-eslint
|
|
31
|
-
`prettier@^3.
|
|
29
|
+
`eslint-plugin-unused-imports@^4.3.0`,
|
|
30
|
+
`typescript-eslint@8.47.0`,
|
|
31
|
+
`prettier@^3.7.4`,
|
|
32
32
|
`husky@^9.1.7`,
|
|
33
33
|
`ng-alain@${version}`,
|
|
34
34
|
`ng-alain-plugin-theme@^18.0.0`,
|
|
35
35
|
`source-map-explorer@^2.5.3`,
|
|
36
|
-
`ngx-tinymce@^
|
|
37
|
-
`@ng-util/monaco-editor@^
|
|
36
|
+
`ngx-tinymce@^21.0.0`,
|
|
37
|
+
`@ng-util/monaco-editor@^21.0.1`,
|
|
38
38
|
`@delon/testing@${version}`
|
|
39
39
|
],
|
|
40
40
|
'devDependencies'
|
|
41
41
|
);
|
|
42
|
-
addPackage(tree, [`rxjs@~7.8.0`, `ng-zorro-antd@^
|
|
42
|
+
addPackage(tree, [`rxjs@~7.8.0`, `ng-zorro-antd@^21.0.0-beta.0`]);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export function addESLintRule(projectName: string): Rule {
|
|
File without changes
|