ng-alain 13.5.2 → 14.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/root/.eslintrc.js +3 -2
- package/application/files/src/app/core/i18n/i18n.service.spec.ts +2 -2
- package/application/files/src/app/core/net/default.interceptor.ts +18 -17
- package/application/files/src/app/routes/exception/trigger.component.ts +4 -4
- package/application/files/src/app/routes/passport/lock/lock.component.ts +8 -12
- package/application/files/src/app/routes/passport/login/login.component.ts +28 -39
- package/application/files/src/app/routes/passport/register/register.component.ts +24 -39
- package/application/index.js +7 -5
- package/application/index.js.map +1 -1
- package/application/index.ts +9 -5
- package/migration.json +5 -0
- package/ng-add/index.js +3 -3
- package/ng-add/index.js.map +1 -1
- package/ng-add/index.ts +2 -3
- package/ng-update/index.js +6 -1
- package/ng-update/index.js.map +1 -1
- package/ng-update/index.ts +5 -0
- package/ng-update/upgrade-rules/v12/index.js +4 -4
- package/ng-update/upgrade-rules/v12/index.js.map +1 -1
- package/ng-update/upgrade-rules/v12/index.spec.ts +3 -23
- package/ng-update/upgrade-rules/v12/index.ts +2 -3
- package/ng-update/upgrade-rules/v13/index.js +4 -4
- package/ng-update/upgrade-rules/v13/index.js.map +1 -1
- package/ng-update/upgrade-rules/v13/index.ts +2 -3
- package/ng-update/upgrade-rules/v14/index.js +65 -0
- package/ng-update/upgrade-rules/v14/index.js.map +1 -0
- package/ng-update/upgrade-rules/v14/index.spec.ts +157 -0
- package/ng-update/upgrade-rules/v14/index.ts +71 -0
- package/package.json +2 -2
- package/sta/index.js +10 -10
- package/sta/index.js.map +1 -1
- package/sta/index.spec.ts +2 -1
- package/sta/index.ts +1 -1
- package/utils/lib-versions.js +2 -2
- package/utils/lib-versions.ts +2 -2
- package/utils/log.js +4 -4
- package/utils/log.js.map +1 -1
- package/utils/log.ts +1 -2
- package/utils/versions.js +16 -19
- package/utils/versions.js.map +1 -1
- package/utils/versions.ts +16 -19
- package/utils/workspace.js +38 -11
- package/utils/workspace.js.map +1 -1
- package/utils/workspace.ts +29 -16
|
@@ -12,7 +12,7 @@ module.exports = {
|
|
|
12
12
|
project: ['tsconfig.json'],
|
|
13
13
|
createDefaultProgram: true
|
|
14
14
|
},
|
|
15
|
-
plugins: ['@typescript-eslint', 'jsdoc', 'import'],
|
|
15
|
+
plugins: ['@typescript-eslint', 'jsdoc', 'import', 'deprecation'],
|
|
16
16
|
extends: [
|
|
17
17
|
'plugin:@angular-eslint/recommended',
|
|
18
18
|
'plugin:@angular-eslint/template/process-inline-templates',
|
|
@@ -105,7 +105,8 @@ module.exports = {
|
|
|
105
105
|
'prefer-object-spread': 'error',
|
|
106
106
|
'prefer-template': 'error',
|
|
107
107
|
'prefer-const': 'off',
|
|
108
|
-
'max-len': 'off'
|
|
108
|
+
'max-len': 'off',
|
|
109
|
+
'deprecation/deprecation': 'warn'
|
|
109
110
|
}
|
|
110
111
|
},
|
|
111
112
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
|
2
|
-
import { TestBed
|
|
2
|
+
import { TestBed } from '@angular/core/testing';
|
|
3
3
|
import { DelonLocaleService, SettingsService } from '@delon/theme';
|
|
4
4
|
import { NzSafeAny } from 'ng-zorro-antd/core/types';
|
|
5
5
|
import { NzI18nService } from 'ng-zorro-antd/i18n';
|
|
@@ -8,7 +8,7 @@ import { of } from 'rxjs';
|
|
|
8
8
|
import { I18NService } from './i18n.service';
|
|
9
9
|
|
|
10
10
|
describe('Service: I18n', () => {
|
|
11
|
-
let injector:
|
|
11
|
+
let injector: TestBed;
|
|
12
12
|
let srv: I18NService;
|
|
13
13
|
const MockSettingsService: NzSafeAny = {
|
|
14
14
|
layout: {
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import { Injectable, Injector } from '@angular/core';
|
|
11
11
|
import { Router } from '@angular/router';
|
|
12
12
|
import { DA_SERVICE_TOKEN, ITokenService } from '@delon/auth';
|
|
13
|
-
import { ALAIN_I18N_TOKEN, _HttpClient } from '@delon/theme';
|
|
13
|
+
import { ALAIN_I18N_TOKEN, IGNORE_BASE_URL, _HttpClient, CUSTOM_ERROR, RAW_BODY } from '@delon/theme';
|
|
14
14
|
import { environment } from '@env/environment';
|
|
15
15
|
import { NzNotificationService } from 'ng-zorro-antd/notification';
|
|
16
16
|
import { BehaviorSubject, Observable, of, throwError, catchError, filter, mergeMap, switchMap, take } from 'rxjs';
|
|
@@ -88,7 +88,7 @@ export class DefaultInterceptor implements HttpInterceptor {
|
|
|
88
88
|
// 1、若请求为刷新Token请求,表示来自刷新Token可以直接跳转登录页
|
|
89
89
|
if ([`/api/auth/refresh`].some(url => req.url.includes(url))) {
|
|
90
90
|
this.toLogin();
|
|
91
|
-
return throwError(ev);
|
|
91
|
+
return throwError(() => ev);
|
|
92
92
|
}
|
|
93
93
|
// 2、如果 `refreshToking` 为 `true` 表示已经在请求刷新 Token 中,后续所有请求转入等待状态,直至结果返回后再重新发起请求
|
|
94
94
|
if (this.refreshToking) {
|
|
@@ -115,7 +115,7 @@ export class DefaultInterceptor implements HttpInterceptor {
|
|
|
115
115
|
catchError(err => {
|
|
116
116
|
this.refreshToking = false;
|
|
117
117
|
this.toLogin();
|
|
118
|
-
return throwError(err);
|
|
118
|
+
return throwError(() => err);
|
|
119
119
|
})
|
|
120
120
|
);
|
|
121
121
|
}
|
|
@@ -152,15 +152,15 @@ export class DefaultInterceptor implements HttpInterceptor {
|
|
|
152
152
|
return this.refreshTokenRequest();
|
|
153
153
|
})
|
|
154
154
|
)
|
|
155
|
-
.subscribe(
|
|
156
|
-
res => {
|
|
155
|
+
.subscribe({
|
|
156
|
+
next: res => {
|
|
157
157
|
// TODO: Mock expired value
|
|
158
158
|
res.expired = +new Date() + 1000 * 60 * 5;
|
|
159
159
|
this.refreshToking = false;
|
|
160
160
|
this.tokenSrv.set(res);
|
|
161
161
|
},
|
|
162
|
-
() => this.toLogin()
|
|
163
|
-
);
|
|
162
|
+
error: () => this.toLogin()
|
|
163
|
+
});
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
// #endregion
|
|
@@ -183,13 +183,14 @@ export class DefaultInterceptor implements HttpInterceptor {
|
|
|
183
183
|
// if (ev instanceof HttpResponse) {
|
|
184
184
|
// const body = ev.body;
|
|
185
185
|
// if (body && body.status !== 0) {
|
|
186
|
-
//
|
|
187
|
-
//
|
|
188
|
-
// //
|
|
189
|
-
//
|
|
186
|
+
// const customError = req.context.get(CUSTOM_ERROR);
|
|
187
|
+
// if (customError) this.injector.get(NzMessageService).error(body.msg);
|
|
188
|
+
// // 注意:这里如果继续抛出错误会被行258的 catchError 二次拦截,导致外部实现的 Pipe、subscribe 操作被中断,例如:this.http.get('/').subscribe() 不会触发
|
|
189
|
+
// // 如果你希望外部实现,需要手动移除行259
|
|
190
|
+
// return if (customError) throwError({}) : of({});
|
|
190
191
|
// } else {
|
|
191
|
-
// //
|
|
192
|
-
// if (ev.body instanceof Blob) {
|
|
192
|
+
// // 返回原始返回体
|
|
193
|
+
// if (req.context.get(RAW_BODY) || ev.body instanceof Blob) {
|
|
193
194
|
// return of(ev);
|
|
194
195
|
// }
|
|
195
196
|
// // 重新修改 `body` 内容为 `response` 内容,对于绝大多数场景已经无须再关心业务状态码
|
|
@@ -220,7 +221,7 @@ export class DefaultInterceptor implements HttpInterceptor {
|
|
|
220
221
|
break;
|
|
221
222
|
}
|
|
222
223
|
if (ev instanceof HttpErrorResponse) {
|
|
223
|
-
return throwError(ev);
|
|
224
|
+
return throwError(() => ev);
|
|
224
225
|
} else {
|
|
225
226
|
return of(ev);
|
|
226
227
|
}
|
|
@@ -239,7 +240,7 @@ export class DefaultInterceptor implements HttpInterceptor {
|
|
|
239
240
|
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
|
240
241
|
// 统一加上服务端前缀
|
|
241
242
|
let url = req.url;
|
|
242
|
-
if (!url.startsWith('https://') && !url.startsWith('http://')) {
|
|
243
|
+
if (!req.context.get(IGNORE_BASE_URL) && !url.startsWith('https://') && !url.startsWith('http://')) {
|
|
243
244
|
const { baseUrl } = environment.api;
|
|
244
245
|
url = baseUrl + (baseUrl.endsWith('/') && url.startsWith('/') ? url.substring(1) : url);
|
|
245
246
|
}
|
|
@@ -253,8 +254,8 @@ export class DefaultInterceptor implements HttpInterceptor {
|
|
|
253
254
|
}
|
|
254
255
|
// 若一切都正常,则后续操作
|
|
255
256
|
return of(ev);
|
|
256
|
-
})
|
|
257
|
-
catchError((err: HttpErrorResponse) => this.handleData(err, newReq, next))
|
|
257
|
+
})
|
|
258
|
+
// catchError((err: HttpErrorResponse) => this.handleData(err, newReq, next))
|
|
258
259
|
);
|
|
259
260
|
}
|
|
260
261
|
}
|
|
@@ -25,11 +25,11 @@ export class ExceptionTriggerComponent {
|
|
|
25
25
|
refresh(): void {
|
|
26
26
|
this.tokenService.set({ token: 'invalid-token' });
|
|
27
27
|
// 必须提供一个后端地址,无法通过 Mock 来模拟
|
|
28
|
-
this.http.post(`https://localhost:5001/auth`).subscribe(
|
|
29
|
-
res => console.warn('成功', res),
|
|
30
|
-
err => {
|
|
28
|
+
this.http.post(`https://localhost:5001/auth`).subscribe({
|
|
29
|
+
next: res => console.warn('成功', res),
|
|
30
|
+
error: err => {
|
|
31
31
|
console.log('最后结果失败', err);
|
|
32
32
|
}
|
|
33
|
-
);
|
|
33
|
+
});
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, Inject } from '@angular/core';
|
|
2
|
-
import { FormBuilder,
|
|
2
|
+
import { FormBuilder, Validators } from '@angular/forms';
|
|
3
3
|
import { Router } from '@angular/router';
|
|
4
4
|
import { DA_SERVICE_TOKEN, ITokenService } from '@delon/auth';
|
|
5
5
|
import { SettingsService, User } from '@delon/theme';
|
|
@@ -10,28 +10,24 @@ import { SettingsService, User } from '@delon/theme';
|
|
|
10
10
|
styleUrls: ['./lock.component.less']
|
|
11
11
|
})
|
|
12
12
|
export class UserLockComponent {
|
|
13
|
-
f
|
|
13
|
+
f = this.fb.group({
|
|
14
|
+
password: [null, Validators.required]
|
|
15
|
+
});
|
|
14
16
|
|
|
15
17
|
get user(): User {
|
|
16
18
|
return this.settings.user;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
constructor(
|
|
20
|
-
fb: FormBuilder,
|
|
22
|
+
private fb: FormBuilder,
|
|
21
23
|
@Inject(DA_SERVICE_TOKEN) private tokenService: ITokenService,
|
|
22
24
|
private settings: SettingsService,
|
|
23
25
|
private router: Router
|
|
24
|
-
) {
|
|
25
|
-
this.f = fb.group({
|
|
26
|
-
password: [null, Validators.required]
|
|
27
|
-
});
|
|
28
|
-
}
|
|
26
|
+
) {}
|
|
29
27
|
|
|
30
28
|
submit(): void {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
this.f.controls[i].updateValueAndValidity();
|
|
34
|
-
}
|
|
29
|
+
this.f.controls.password.markAsDirty();
|
|
30
|
+
this.f.controls.password.updateValueAndValidity();
|
|
35
31
|
if (this.f.valid) {
|
|
36
32
|
console.log('Valid!');
|
|
37
33
|
console.log(this.f.value);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, OnDestroy, Optional } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { FormBuilder, Validators } from '@angular/forms';
|
|
3
3
|
import { Router } from '@angular/router';
|
|
4
4
|
import { StartupService } from '@core';
|
|
5
5
|
import { ReuseTabService } from '@delon/abc/reuse-tab';
|
|
@@ -18,7 +18,7 @@ import { finalize } from 'rxjs';
|
|
|
18
18
|
})
|
|
19
19
|
export class UserLoginComponent implements OnDestroy {
|
|
20
20
|
constructor(
|
|
21
|
-
fb: FormBuilder,
|
|
21
|
+
private fb: FormBuilder,
|
|
22
22
|
private router: Router,
|
|
23
23
|
private settingsService: SettingsService,
|
|
24
24
|
private socialService: SocialService,
|
|
@@ -29,31 +29,17 @@ export class UserLoginComponent implements OnDestroy {
|
|
|
29
29
|
private startupSrv: StartupService,
|
|
30
30
|
private http: _HttpClient,
|
|
31
31
|
private cdr: ChangeDetectorRef
|
|
32
|
-
) {
|
|
33
|
-
this.form = fb.group({
|
|
34
|
-
userName: [null, [Validators.required, Validators.pattern(/^(admin|user)$/)]],
|
|
35
|
-
password: [null, [Validators.required, Validators.pattern(/^(ng\-alain\.com)$/)]],
|
|
36
|
-
mobile: [null, [Validators.required, Validators.pattern(/^1\d{10}$/)]],
|
|
37
|
-
captcha: [null, [Validators.required]],
|
|
38
|
-
remember: [true]
|
|
39
|
-
});
|
|
40
|
-
}
|
|
32
|
+
) {}
|
|
41
33
|
|
|
42
34
|
// #region fields
|
|
43
35
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return this.form.get('mobile')!;
|
|
52
|
-
}
|
|
53
|
-
get captcha(): AbstractControl {
|
|
54
|
-
return this.form.get('captcha')!;
|
|
55
|
-
}
|
|
56
|
-
form: FormGroup;
|
|
36
|
+
form = this.fb.group({
|
|
37
|
+
userName: [null, [Validators.required, Validators.pattern(/^(admin|user)$/)]],
|
|
38
|
+
password: [null, [Validators.required, Validators.pattern(/^(ng\-alain\.com)$/)]],
|
|
39
|
+
mobile: [null, [Validators.required, Validators.pattern(/^1\d{10}$/)]],
|
|
40
|
+
captcha: [null, [Validators.required]],
|
|
41
|
+
remember: [true]
|
|
42
|
+
});
|
|
57
43
|
error = '';
|
|
58
44
|
type = 0;
|
|
59
45
|
loading = false;
|
|
@@ -70,9 +56,10 @@ export class UserLoginComponent implements OnDestroy {
|
|
|
70
56
|
}
|
|
71
57
|
|
|
72
58
|
getCaptcha(): void {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
59
|
+
const mobile = this.form.controls.mobile;
|
|
60
|
+
if (mobile.invalid) {
|
|
61
|
+
mobile.markAsDirty({ onlySelf: true });
|
|
62
|
+
mobile.updateValueAndValidity({ onlySelf: true });
|
|
76
63
|
return;
|
|
77
64
|
}
|
|
78
65
|
this.count = 59;
|
|
@@ -89,19 +76,21 @@ export class UserLoginComponent implements OnDestroy {
|
|
|
89
76
|
submit(): void {
|
|
90
77
|
this.error = '';
|
|
91
78
|
if (this.type === 0) {
|
|
92
|
-
this.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
79
|
+
const { userName, password } = this.form.controls;
|
|
80
|
+
userName.markAsDirty();
|
|
81
|
+
userName.updateValueAndValidity();
|
|
82
|
+
password.markAsDirty();
|
|
83
|
+
password.updateValueAndValidity();
|
|
84
|
+
if (userName.invalid || password.invalid) {
|
|
97
85
|
return;
|
|
98
86
|
}
|
|
99
87
|
} else {
|
|
100
|
-
this.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
88
|
+
const { mobile, captcha } = this.form.controls;
|
|
89
|
+
mobile.markAsDirty();
|
|
90
|
+
mobile.updateValueAndValidity();
|
|
91
|
+
captcha.markAsDirty();
|
|
92
|
+
captcha.updateValueAndValidity();
|
|
93
|
+
if (mobile.invalid || captcha.invalid) {
|
|
105
94
|
return;
|
|
106
95
|
}
|
|
107
96
|
}
|
|
@@ -113,8 +102,8 @@ export class UserLoginComponent implements OnDestroy {
|
|
|
113
102
|
this.http
|
|
114
103
|
.post('/login/account?_allow_anonymous=true', {
|
|
115
104
|
type: this.type,
|
|
116
|
-
userName: this.
|
|
117
|
-
password: this.
|
|
105
|
+
userName: this.form.value.userName,
|
|
106
|
+
password: this.form.value.password
|
|
118
107
|
})
|
|
119
108
|
.pipe(
|
|
120
109
|
finalize(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy } from '@angular/core';
|
|
2
|
-
import { AbstractControl, FormBuilder, FormControl,
|
|
2
|
+
import { AbstractControl, FormBuilder, FormControl, Validators } from '@angular/forms';
|
|
3
3
|
import { Router } from '@angular/router';
|
|
4
4
|
import { _HttpClient } from '@delon/theme';
|
|
5
5
|
import { MatchControl } from '@delon/util/form';
|
|
@@ -13,40 +13,23 @@ import { finalize } from 'rxjs';
|
|
|
13
13
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
14
14
|
})
|
|
15
15
|
export class UserRegisterComponent implements OnDestroy {
|
|
16
|
-
constructor(fb: FormBuilder, private router: Router, private http: _HttpClient, private cdr: ChangeDetectorRef) {
|
|
17
|
-
this.form = fb.group(
|
|
18
|
-
{
|
|
19
|
-
mail: [null, [Validators.required, Validators.email]],
|
|
20
|
-
password: [null, [Validators.required, Validators.minLength(6), UserRegisterComponent.checkPassword.bind(this)]],
|
|
21
|
-
confirm: [null, [Validators.required, Validators.minLength(6)]],
|
|
22
|
-
mobilePrefix: ['+86'],
|
|
23
|
-
mobile: [null, [Validators.required, Validators.pattern(/^1\d{10}$/)]],
|
|
24
|
-
captcha: [null, [Validators.required]]
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
validators: MatchControl('password', 'confirm')
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
}
|
|
16
|
+
constructor(private fb: FormBuilder, private router: Router, private http: _HttpClient, private cdr: ChangeDetectorRef) {}
|
|
31
17
|
|
|
32
18
|
// #region fields
|
|
33
19
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return this.form.get('captcha')!;
|
|
48
|
-
}
|
|
49
|
-
form: FormGroup;
|
|
20
|
+
form = this.fb.group(
|
|
21
|
+
{
|
|
22
|
+
mail: [null, [Validators.required, Validators.email]],
|
|
23
|
+
password: [null, [Validators.required, Validators.minLength(6), UserRegisterComponent.checkPassword.bind(this)]],
|
|
24
|
+
confirm: [null, [Validators.required, Validators.minLength(6)]],
|
|
25
|
+
mobilePrefix: ['+86'],
|
|
26
|
+
mobile: [null, [Validators.required, Validators.pattern(/^1\d{10}$/)]],
|
|
27
|
+
captcha: [null, [Validators.required]]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
validators: MatchControl('password', 'confirm')
|
|
31
|
+
}
|
|
32
|
+
);
|
|
50
33
|
error = '';
|
|
51
34
|
type = 0;
|
|
52
35
|
loading = false;
|
|
@@ -64,14 +47,14 @@ export class UserRegisterComponent implements OnDestroy {
|
|
|
64
47
|
// #region get captcha
|
|
65
48
|
|
|
66
49
|
count = 0;
|
|
67
|
-
interval$:
|
|
50
|
+
interval$: NzSafeAny;
|
|
68
51
|
|
|
69
52
|
static checkPassword(control: FormControl): NzSafeAny {
|
|
70
53
|
if (!control) {
|
|
71
54
|
return null;
|
|
72
55
|
}
|
|
73
56
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
74
|
-
const self:
|
|
57
|
+
const self: NzSafeAny = this;
|
|
75
58
|
self.visible = !!control.value;
|
|
76
59
|
if (control.value && control.value.length > 9) {
|
|
77
60
|
self.status = 'ok';
|
|
@@ -87,9 +70,10 @@ export class UserRegisterComponent implements OnDestroy {
|
|
|
87
70
|
}
|
|
88
71
|
|
|
89
72
|
getCaptcha(): void {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
73
|
+
const { mobile } = this.form.controls;
|
|
74
|
+
if (mobile.invalid) {
|
|
75
|
+
mobile.markAsDirty({ onlySelf: true });
|
|
76
|
+
mobile.updateValueAndValidity({ onlySelf: true });
|
|
93
77
|
return;
|
|
94
78
|
}
|
|
95
79
|
this.count = 59;
|
|
@@ -108,8 +92,9 @@ export class UserRegisterComponent implements OnDestroy {
|
|
|
108
92
|
submit(): void {
|
|
109
93
|
this.error = '';
|
|
110
94
|
Object.keys(this.form.controls).forEach(key => {
|
|
111
|
-
this.form.controls[key]
|
|
112
|
-
|
|
95
|
+
const control = (this.form.controls as NzSafeAny)[key] as AbstractControl;
|
|
96
|
+
control.markAsDirty();
|
|
97
|
+
control.updateValueAndValidity();
|
|
113
98
|
});
|
|
114
99
|
if (this.form.invalid) {
|
|
115
100
|
return;
|
package/application/index.js
CHANGED
|
@@ -58,13 +58,14 @@ function fixAngularJson(options) {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
(0, utils_1.addStylePreprocessorOptionsToAllProject)(workspace);
|
|
61
|
+
(0, utils_1.addSchematicCollections)(workspace);
|
|
61
62
|
}));
|
|
62
63
|
}
|
|
63
64
|
function addDependenciesToPackageJson(options) {
|
|
64
65
|
return (tree) => {
|
|
65
66
|
(0, versions_1.UpgradeMainVersions)(tree);
|
|
66
67
|
// 3rd
|
|
67
|
-
(0, utils_1.addPackage)(tree, ['screenfull@^6.0.
|
|
68
|
+
(0, utils_1.addPackage)(tree, ['screenfull@^6.0.2']);
|
|
68
69
|
return tree;
|
|
69
70
|
};
|
|
70
71
|
}
|
|
@@ -124,12 +125,12 @@ function addCodeStylesToPackageJson() {
|
|
|
124
125
|
// dependencies
|
|
125
126
|
(0, utils_1.addPackage)(tree, [
|
|
126
127
|
`husky@^7.0.4`,
|
|
127
|
-
`lint-staged@^
|
|
128
|
-
`prettier@^2.
|
|
129
|
-
`stylelint@^14.
|
|
128
|
+
`lint-staged@^13.0.3`,
|
|
129
|
+
`prettier@^2.7.1`,
|
|
130
|
+
`stylelint@^14.10.0`,
|
|
130
131
|
`stylelint-config-prettier@^9.0.3`,
|
|
131
132
|
`stylelint-config-rational-order@^0.1.2`,
|
|
132
|
-
`stylelint-config-standard@^
|
|
133
|
+
`stylelint-config-standard@^28.0.0`,
|
|
133
134
|
`stylelint-declaration-block-no-ignored-properties@^2.5.0`,
|
|
134
135
|
`stylelint-order@^5.0.0`
|
|
135
136
|
], 'devDependencies');
|
|
@@ -281,6 +282,7 @@ function default_1(options) {
|
|
|
281
282
|
// Configuring CommonJS dependencies
|
|
282
283
|
// https://angular.io/guide/build#configuring-commonjs-dependencies
|
|
283
284
|
(0, utils_1.addAllowedCommonJsDependencies)([]),
|
|
285
|
+
(0, utils_1.addAllowSyntheticDefaultImports)(),
|
|
284
286
|
// ci
|
|
285
287
|
addRunScriptToPackageJson(),
|
|
286
288
|
addPathsToTsConfig(),
|
package/application/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/application/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAA2D;AAE3D,2DAaoC;AACpC,qEAAwE;AAExE,qDAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/application/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAA2D;AAE3D,2DAaoC;AACpC,qEAAwE;AAExE,qDAAkD;AAClD,oCAsBkB;AAClB,gDAAuE;AAGvE,IAAI,OAA0B,CAAC;AAE/B,mCAAmC;AACnC,SAAS,kBAAkB;IACzB,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB;YACE,GAAG,OAAO,CAAC,IAAI,YAAY;YAC3B,GAAG,OAAO,CAAC,UAAU,UAAU;YAC/B,GAAG,OAAO,CAAC,UAAU,UAAU;YAC/B,GAAG,OAAO,CAAC,UAAU,mCAAmC;YACxD,GAAG,OAAO,CAAC,UAAU,8BAA8B;YACnD,GAAG,OAAO,CAAC,UAAU,cAAc;YACnC,GAAG,OAAO,CAAC,UAAU,cAAc;YACnC,GAAG,OAAO,CAAC,UAAU,oBAAoB;YACzC,GAAG,OAAO,CAAC,UAAU,4BAA4B;YACjD,GAAG,OAAO,CAAC,UAAU,uBAAuB;YAC5C,GAAG,OAAO,CAAC,UAAU,yBAAyB;YAC9C,GAAG,OAAO,CAAC,UAAU,yBAAyB;YAC9C,GAAG,OAAO,CAAC,UAAU,4BAA4B;SAClD;aACE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,C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GAAG,CAAC,MAAM,IAAA,kBAAU,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;QAC5D,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;QACvD,OAAO,IAAA,kBAAK,EAAC;YACX,wBAAwB;YACxB,4BAA4B,CAAC,OAAO,CAAC;YACrC,oCAAoC;YACpC,mEAAmE;YACnE,IAAA,sCAA8B,EAAC,EAAE,CAAC;YAClC,IAAA,uCAA+B,GAAE;YACjC,KAAK;YACL,yBAAyB,EAAE;YAC3B,kBAAkB,EAAE;YACpB,aAAa;YACb,0BAA0B,EAAE;YAC5B,aAAa,CAAC,OAAO,CAAC;YACtB,IAAA,wBAAa,EAAC,OAAO,EAAE,KAAK,CAAC;YAC7B,QAAQ;YACR,kBAAkB,EAAE;YACpB,cAAc,CAAC,OAAO,CAAC;YACvB,SAAS,EAAE;YACX,QAAQ,EAAE;YACV,OAAO,CAAC,OAAO,CAAC;YAChB,SAAS,EAAE;YACX,cAAc,CAAC,OAAO,CAAC;SACxB,CAAC,CAAC;IACL,CAAC,CAAA,CAAC;AACJ,CAAC;AA5BD,4BA4BC"}
|
package/application/index.ts
CHANGED
|
@@ -19,10 +19,12 @@ import { updateWorkspace } from '@schematics/angular/utility/workspace';
|
|
|
19
19
|
import { getLangData } from '../core/lang.config';
|
|
20
20
|
import {
|
|
21
21
|
addAllowedCommonJsDependencies,
|
|
22
|
+
addAllowSyntheticDefaultImports,
|
|
22
23
|
addAssetsToTarget,
|
|
23
24
|
addHeadStyle,
|
|
24
25
|
addHtmlToBody,
|
|
25
26
|
addPackage,
|
|
27
|
+
addSchematicCollections,
|
|
26
28
|
addStylePreprocessorOptionsToAllProject,
|
|
27
29
|
BUILD_TARGET_BUILD,
|
|
28
30
|
BUILD_TARGET_SERVE,
|
|
@@ -89,6 +91,7 @@ function fixAngularJson(options: ApplicationOptions): Rule {
|
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
addStylePreprocessorOptionsToAllProject(workspace);
|
|
94
|
+
addSchematicCollections(workspace);
|
|
92
95
|
});
|
|
93
96
|
}
|
|
94
97
|
|
|
@@ -96,7 +99,7 @@ function addDependenciesToPackageJson(options: ApplicationOptions): Rule {
|
|
|
96
99
|
return (tree: Tree) => {
|
|
97
100
|
UpgradeMainVersions(tree);
|
|
98
101
|
// 3rd
|
|
99
|
-
addPackage(tree, ['screenfull@^6.0.
|
|
102
|
+
addPackage(tree, ['screenfull@^6.0.2']);
|
|
100
103
|
return tree;
|
|
101
104
|
};
|
|
102
105
|
}
|
|
@@ -156,12 +159,12 @@ function addCodeStylesToPackageJson(): Rule {
|
|
|
156
159
|
tree,
|
|
157
160
|
[
|
|
158
161
|
`husky@^7.0.4`,
|
|
159
|
-
`lint-staged@^
|
|
160
|
-
`prettier@^2.
|
|
161
|
-
`stylelint@^14.
|
|
162
|
+
`lint-staged@^13.0.3`,
|
|
163
|
+
`prettier@^2.7.1`,
|
|
164
|
+
`stylelint@^14.10.0`,
|
|
162
165
|
`stylelint-config-prettier@^9.0.3`,
|
|
163
166
|
`stylelint-config-rational-order@^0.1.2`,
|
|
164
|
-
`stylelint-config-standard@^
|
|
167
|
+
`stylelint-config-standard@^28.0.0`,
|
|
165
168
|
`stylelint-declaration-block-no-ignored-properties@^2.5.0`,
|
|
166
169
|
`stylelint-order@^5.0.0`
|
|
167
170
|
],
|
|
@@ -353,6 +356,7 @@ export default function (options: ApplicationOptions): Rule {
|
|
|
353
356
|
// Configuring CommonJS dependencies
|
|
354
357
|
// https://angular.io/guide/build#configuring-commonjs-dependencies
|
|
355
358
|
addAllowedCommonJsDependencies([]),
|
|
359
|
+
addAllowSyntheticDefaultImports(),
|
|
356
360
|
// ci
|
|
357
361
|
addRunScriptToPackageJson(),
|
|
358
362
|
addPathsToTsConfig(),
|
package/migration.json
CHANGED
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
"description": "Updates NG-ALAIN to v13 [https://github.com/ng-alain/ng-alain/issues/2174]",
|
|
12
12
|
"factory": "./ng-update/index#updateToV13"
|
|
13
13
|
},
|
|
14
|
+
"migration-v14": {
|
|
15
|
+
"version": "14",
|
|
16
|
+
"description": "Updates NG-ALAIN to v14 [https://github.com/ng-alain/ng-alain/issues/2285]",
|
|
17
|
+
"factory": "./ng-update/index#updateToV14"
|
|
18
|
+
},
|
|
14
19
|
"ng-post-update": {
|
|
15
20
|
"description": "Performs cleanup after ng-update.",
|
|
16
21
|
"factory": "./ng-update/index#postUpdate",
|
package/ng-add/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const color_1 = require("@angular/cli/utilities/color");
|
|
4
3
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
4
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
|
+
const colors = require("ansi-colors");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
7
|
const node_1 = require("../utils/node");
|
|
8
|
-
const V =
|
|
8
|
+
const V = 14;
|
|
9
9
|
function genRules(options) {
|
|
10
10
|
return () => {
|
|
11
11
|
const rules = [];
|
|
@@ -45,7 +45,7 @@ function isYarn(tree) {
|
|
|
45
45
|
function finished() {
|
|
46
46
|
return (_, context) => {
|
|
47
47
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
48
|
-
context.logger.info(
|
|
48
|
+
context.logger.info(colors.green(`
|
|
49
49
|
✓ Congratulations, NG-ALAIN scaffold generation complete 🎉.
|
|
50
50
|
|
|
51
51
|
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":";;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":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AAW,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE;YACnC,aAAa,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;SAC5C;QACD,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YACtC,MAAM,IAAI,gCAAmB,CAC3B,oDAAoD,CAAC,kFAAkF,CAAC,+CAA+C,CAAC,IAAI,CAC7L,CAAC;SACH;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;AAjCD,4BAiCC"}
|
package/ng-add/index.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { colors } from '@angular/cli/utilities/color';
|
|
2
|
-
|
|
3
1
|
import { chain, Rule, schematic, Tree, SchematicContext, SchematicsException } from '@angular-devkit/schematics';
|
|
4
2
|
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
|
|
3
|
+
import * as colors from 'ansi-colors';
|
|
5
4
|
|
|
6
5
|
import { Schema as ApplicationOptions } from '../application/schema';
|
|
7
6
|
import { readJSON, readPackage } from '../utils';
|
|
8
7
|
import { getNodeMajorVersion } from '../utils/node';
|
|
9
8
|
import { Schema as NgAddOptions } from './schema';
|
|
10
9
|
|
|
11
|
-
const V =
|
|
10
|
+
const V = 14;
|
|
12
11
|
|
|
13
12
|
function genRules(options: NgAddOptions): Rule {
|
|
14
13
|
return () => {
|
package/ng-update/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.postUpdate = exports.updateToV13 = exports.updateToV12 = void 0;
|
|
3
|
+
exports.postUpdate = exports.updateToV14 = 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
8
|
const v12_1 = require("./upgrade-rules/v12");
|
|
9
9
|
const v13_1 = require("./upgrade-rules/v13");
|
|
10
|
+
const v14_1 = require("./upgrade-rules/v14");
|
|
10
11
|
const migrations = [_src_to_nz_image_rule_1.SrcToNzImageRule];
|
|
11
12
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
13
|
function updateToV12(schema) {
|
|
@@ -18,6 +19,10 @@ function updateToV13() {
|
|
|
18
19
|
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
|
}
|
|
20
21
|
exports.updateToV13 = updateToV13;
|
|
22
|
+
function updateToV14() {
|
|
23
|
+
return (0, schematics_2.chain)([(0, v14_1.v14Rule)(), (0, schematics_1.createMigrationSchematicRule)(schematics_1.TargetVersion.V14, migrations, upgrade_data_1.ruleUpgradeData, postUpdate)]);
|
|
24
|
+
}
|
|
25
|
+
exports.updateToV14 = updateToV14;
|
|
21
26
|
/** Post-update schematic to be called when update is finished. */
|
|
22
27
|
function postUpdate(context, targetVersion, hasFailures) {
|
|
23
28
|
context.logger.info('');
|