@verisoft/security-core 18.5.0 → 18.6.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/esm2022/index.mjs +2 -0
- package/esm2022/lib/directives/has-permission.directive.mjs +55 -0
- package/esm2022/lib/directives/has-role.directive.mjs +55 -0
- package/esm2022/lib/directives/index.mjs +3 -0
- package/esm2022/lib/guards/auth.guard.mjs +40 -0
- package/esm2022/lib/guards/index.mjs +2 -0
- package/esm2022/lib/index.mjs +7 -0
- package/esm2022/lib/models/authenticated-user.model.mjs +2 -0
- package/esm2022/lib/models/config.model.mjs +2 -0
- package/esm2022/lib/models/functions.mjs +70 -0
- package/esm2022/lib/models/index.mjs +4 -0
- package/esm2022/lib/provider.mjs +47 -0
- package/esm2022/lib/services/auth-context.service.mjs +36 -0
- package/esm2022/lib/services/index.mjs +8 -0
- package/esm2022/lib/services/local-storage-token-provider.mjs +23 -0
- package/esm2022/lib/services/login.service.mjs +27 -0
- package/esm2022/lib/services/logout.service.mjs +18 -0
- package/esm2022/lib/services/security-initializer.mjs +14 -0
- package/esm2022/lib/services/session-token-provider.mjs +17 -0
- package/esm2022/lib/services/token-provider.mjs +2 -0
- package/esm2022/lib/state/actions.mjs +3 -0
- package/esm2022/lib/state/feature.mjs +8 -0
- package/esm2022/lib/state/index.mjs +5 -0
- package/esm2022/lib/state/reducers.mjs +8 -0
- package/esm2022/lib/state/selectors.mjs +5 -0
- package/esm2022/lib/state/state.mjs +4 -0
- package/esm2022/verisoft-security-core.mjs +5 -0
- package/fesm2022/verisoft-security-core.mjs +382 -0
- package/fesm2022/verisoft-security-core.mjs.map +1 -0
- package/index.d.ts +1 -0
- package/lib/directives/has-permission.directive.d.ts +17 -0
- package/lib/directives/has-role.directive.d.ts +17 -0
- package/{src/lib/directives/index.ts → lib/directives/index.d.ts} +2 -2
- package/lib/guards/auth.guard.d.ts +13 -0
- package/{src/lib/guards/index.ts → lib/guards/index.d.ts} +1 -1
- package/{src/lib/index.ts → lib/index.d.ts} +6 -6
- package/{src/lib/models/authenticated-user.model.ts → lib/models/authenticated-user.model.d.ts} +8 -8
- package/{src/lib/models/config.model.ts → lib/models/config.model.d.ts} +8 -9
- package/lib/models/functions.d.ts +5 -0
- package/{src/lib/models/index.ts → lib/models/index.d.ts} +3 -3
- package/lib/provider.d.ts +14 -0
- package/lib/services/auth-context.service.d.ts +15 -0
- package/{src/lib/services/index.ts → lib/services/index.d.ts} +7 -7
- package/lib/services/local-storage-token-provider.d.ts +11 -0
- package/lib/services/login.service.d.ts +10 -0
- package/lib/services/logout.service.d.ts +8 -0
- package/lib/services/security-initializer.d.ts +5 -0
- package/lib/services/session-token-provider.d.ts +9 -0
- package/{src/lib/services/token-provider.ts → lib/services/token-provider.d.ts} +4 -5
- package/lib/state/actions.d.ts +6 -0
- package/lib/state/feature.d.ts +7 -0
- package/{src/lib/state/index.ts → lib/state/index.d.ts} +4 -4
- package/lib/state/reducers.d.ts +1 -0
- package/lib/state/selectors.d.ts +2 -0
- package/lib/state/state.d.ts +5 -0
- package/package.json +27 -11
- package/.eslintrc.json +0 -48
- package/jest.config.ts +0 -21
- package/ng-package.json +0 -7
- package/project.json +0 -43
- package/src/index.ts +0 -1
- package/src/lib/directives/has-permission.directive.ts +0 -54
- package/src/lib/directives/has-role.directive.ts +0 -54
- package/src/lib/guards/auth.guard.ts +0 -55
- package/src/lib/models/functions.spec.ts +0 -159
- package/src/lib/models/functions.ts +0 -103
- package/src/lib/provider.ts +0 -58
- package/src/lib/services/auth-context.service.ts +0 -38
- package/src/lib/services/local-storage-token-provider.ts +0 -23
- package/src/lib/services/local-token-provider.ts +0 -15
- package/src/lib/services/login.service.ts +0 -23
- package/src/lib/services/logout.service.ts +0 -15
- package/src/lib/services/security-initializer.ts +0 -26
- package/src/lib/services/session-token-provider.ts +0 -15
- package/src/lib/state/actions.ts +0 -7
- package/src/lib/state/feature.ts +0 -10
- package/src/lib/state/reducers.ts +0 -11
- package/src/lib/state/selectors.ts +0 -9
- package/src/lib/state/state.ts +0 -9
- package/src/test-setup.ts +0 -8
- package/tsconfig.json +0 -30
- package/tsconfig.lib.json +0 -17
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -16
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { AuthenticatedUser } from './authenticated-user.model';
|
|
2
|
-
|
|
3
|
-
export function hasRequiredPermission(
|
|
4
|
-
user: AuthenticatedUser | undefined,
|
|
5
|
-
permission: string | string[]
|
|
6
|
-
): boolean {
|
|
7
|
-
return hasItems(user?.permissions, permission);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function hasRequiredRole(
|
|
11
|
-
user: AuthenticatedUser | undefined,
|
|
12
|
-
role: string | string[]
|
|
13
|
-
): boolean {
|
|
14
|
-
return hasItems(user?.roles, role);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function hasItems(
|
|
18
|
-
userItems: string[] | undefined,
|
|
19
|
-
neededItems: string | string[]
|
|
20
|
-
): boolean {
|
|
21
|
-
if (!neededItems || !neededItems.length) {
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (!userItems || !userItems.length) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const userItemsSet = new Set(userItems);
|
|
30
|
-
if (Array.isArray(neededItems)) {
|
|
31
|
-
return neededItems.some((item) => hasItems(userItems, item));
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (neededItems.includes(',')) {
|
|
35
|
-
const splitItems = neededItems.split(',').map((i) => i.trim());
|
|
36
|
-
return splitItems.every((i) => userItemsSet.has(i));
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return userItemsSet.has(neededItems);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function convertJWTToUser(
|
|
43
|
-
base64Token?: string
|
|
44
|
-
): AuthenticatedUser | undefined {
|
|
45
|
-
if (!base64Token) {
|
|
46
|
-
return undefined;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
try {
|
|
50
|
-
const parts = base64Token.split('.');
|
|
51
|
-
if (parts.length < 2) {
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
54
|
-
const payload = decodeJwtPayload(parts[1]);
|
|
55
|
-
|
|
56
|
-
const userName = payload['unique_name'] ?? payload['nameid'];
|
|
57
|
-
if (!userName) {
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const user: AuthenticatedUser = {
|
|
62
|
-
userName,
|
|
63
|
-
userId: payload['nameid'],
|
|
64
|
-
email: payload['email'],
|
|
65
|
-
displayName: payload['name'],
|
|
66
|
-
roles: convertToArray(payload, 'role'),
|
|
67
|
-
permissions: convertToArray(payload, 'permission'),
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
return user;
|
|
71
|
-
} catch (error) {
|
|
72
|
-
return undefined;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export function decodeJwtPayload(jwt: string): any {
|
|
77
|
-
const base64 = jwt.replace(/-/g, '+').replace(/_/g, '/');
|
|
78
|
-
|
|
79
|
-
const jsonPayload = decodeURIComponent(
|
|
80
|
-
atob(base64)
|
|
81
|
-
.split('')
|
|
82
|
-
.map(c => '%' + c.charCodeAt(0).toString(16).padStart(2, '0'))
|
|
83
|
-
.join('')
|
|
84
|
-
);
|
|
85
|
-
|
|
86
|
-
return JSON.parse(jsonPayload);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function convertToArray(
|
|
90
|
-
item: { [key: string]: string | string[] },
|
|
91
|
-
propertyName: string
|
|
92
|
-
): string[] | undefined {
|
|
93
|
-
const rawValue = item[propertyName];
|
|
94
|
-
if (!rawValue) {
|
|
95
|
-
return undefined;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
if (Array.isArray(rawValue)) {
|
|
99
|
-
return rawValue;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return [rawValue];
|
|
103
|
-
}
|
package/src/lib/provider.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
APP_INITIALIZER,
|
|
3
|
-
InjectionToken,
|
|
4
|
-
ModuleWithProviders,
|
|
5
|
-
NgModule,
|
|
6
|
-
Provider,
|
|
7
|
-
} from '@angular/core';
|
|
8
|
-
import { Router } from '@angular/router';
|
|
9
|
-
import { StoreModule } from '@ngrx/store';
|
|
10
|
-
import { AuthGuard } from './guards';
|
|
11
|
-
import { SecurityConfig } from './models';
|
|
12
|
-
import {
|
|
13
|
-
AuthContextService,
|
|
14
|
-
LocalStorageTokenProvider,
|
|
15
|
-
securityInitializerFactory,
|
|
16
|
-
} from './services';
|
|
17
|
-
import { SecurityFeature } from './state/feature';
|
|
18
|
-
|
|
19
|
-
export function provideSecurity(
|
|
20
|
-
config: Partial<SecurityConfig> | undefined = undefined
|
|
21
|
-
): Provider[] {
|
|
22
|
-
const securityConfig: SecurityConfig = {
|
|
23
|
-
tokenStorageKey: 'APP_TOKEN',
|
|
24
|
-
notAuthorizedPage: '/not-authorized',
|
|
25
|
-
...(config ?? {}),
|
|
26
|
-
};
|
|
27
|
-
return [
|
|
28
|
-
AuthGuard,
|
|
29
|
-
SECURITY_INITIALIZER_PROVIDER,
|
|
30
|
-
{ provide: SECURITY_CONTEXT_TOKEN_PROVIDER, useClass: LocalStorageTokenProvider },
|
|
31
|
-
{ provide: SECURITY_CONFIG, useValue: securityConfig },
|
|
32
|
-
];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@NgModule({
|
|
36
|
-
imports: [StoreModule.forFeature(SecurityFeature)],
|
|
37
|
-
})
|
|
38
|
-
export class SecurityModule {
|
|
39
|
-
static forRoot(
|
|
40
|
-
config?: Partial<SecurityConfig>
|
|
41
|
-
): ModuleWithProviders<SecurityModule> {
|
|
42
|
-
return {
|
|
43
|
-
ngModule: SecurityModule,
|
|
44
|
-
providers: [...provideSecurity(config)],
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export const SECURITY_CONTEXT_TOKEN_PROVIDER = new InjectionToken('SECURITY_CONTEXT_TOKEN_PROVIDER');
|
|
50
|
-
|
|
51
|
-
export const SECURITY_CONFIG = new InjectionToken('SECURITY_CONFIG');
|
|
52
|
-
|
|
53
|
-
export const SECURITY_INITIALIZER_PROVIDER: Provider = {
|
|
54
|
-
provide: APP_INITIALIZER,
|
|
55
|
-
useFactory: securityInitializerFactory,
|
|
56
|
-
deps: [SECURITY_CONTEXT_TOKEN_PROVIDER, AuthContextService, SECURITY_CONFIG, Router],
|
|
57
|
-
multi: true,
|
|
58
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { Store } from '@ngrx/store';
|
|
3
|
-
import { map, Observable } from 'rxjs';
|
|
4
|
-
import { AuthenticatedUser } from '../models';
|
|
5
|
-
import { hasRequiredPermission, hasRequiredRole } from '../models/functions';
|
|
6
|
-
import { setUser } from '../state/actions';
|
|
7
|
-
import { selectIsAuthenticated, selectUser } from '../state/selectors';
|
|
8
|
-
|
|
9
|
-
@Injectable({
|
|
10
|
-
providedIn: 'root',
|
|
11
|
-
})
|
|
12
|
-
export class AuthContextService {
|
|
13
|
-
user$: Observable<AuthenticatedUser | undefined>;
|
|
14
|
-
isAuthenticated$: Observable<boolean>;
|
|
15
|
-
|
|
16
|
-
constructor(private store: Store) {
|
|
17
|
-
this.user$ = this.store.select(selectUser);
|
|
18
|
-
this.isAuthenticated$ = this.store.select(selectIsAuthenticated);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
setUser(user: AuthenticatedUser | undefined): void {
|
|
22
|
-
this.store.dispatch(setUser({ user }));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
hasRequiredPermission(
|
|
26
|
-
requiredPermissions: string | string[]
|
|
27
|
-
): Observable<boolean> {
|
|
28
|
-
return this.user$.pipe(
|
|
29
|
-
map((user) => hasRequiredPermission(user, requiredPermissions))
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
hasRequiredRole(requiredPermissions: string | string[]): Observable<boolean> {
|
|
34
|
-
return this.user$.pipe(
|
|
35
|
-
map((user) => hasRequiredRole(user, requiredPermissions))
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { inject, Injectable } from '@angular/core';
|
|
2
|
-
import { Observable, of } from 'rxjs';
|
|
3
|
-
import { SecurityConfig } from '../models';
|
|
4
|
-
import { SECURITY_CONFIG } from '../provider';
|
|
5
|
-
import { TokenProvider } from './token-provider';
|
|
6
|
-
|
|
7
|
-
@Injectable()
|
|
8
|
-
export class LocalStorageTokenProvider implements TokenProvider {
|
|
9
|
-
private config = inject<SecurityConfig>(SECURITY_CONFIG);
|
|
10
|
-
|
|
11
|
-
getToken(): Observable<string | undefined> {
|
|
12
|
-
const token = localStorage.getItem(this.config.tokenStorageKey);
|
|
13
|
-
return of(token ?? undefined);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
setToken(token: string): void {
|
|
17
|
-
localStorage.setItem(this.config.tokenStorageKey, token);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
removeToken(): void {
|
|
21
|
-
localStorage.clear();
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { inject, Injectable } from '@angular/core';
|
|
2
|
-
import { Observable, of } from 'rxjs';
|
|
3
|
-
import { SecurityConfig } from '../models';
|
|
4
|
-
import { SECURITY_CONFIG } from '../provider';
|
|
5
|
-
import { TokenProvider } from './token-provider';
|
|
6
|
-
|
|
7
|
-
@Injectable()
|
|
8
|
-
export class LocalStorageTokenProvider implements TokenProvider {
|
|
9
|
-
private config = inject<SecurityConfig>(SECURITY_CONFIG);
|
|
10
|
-
|
|
11
|
-
getToken(): Observable<string | undefined> {
|
|
12
|
-
const token = localStorage.getItem(this.config.tokenStorageKey);
|
|
13
|
-
return of(token ?? undefined);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { inject, Injectable } from '@angular/core';
|
|
2
|
-
import { Router } from '@angular/router';
|
|
3
|
-
import { convertJWTToUser, SecurityConfig } from '../models';
|
|
4
|
-
import { SECURITY_CONFIG, SECURITY_CONTEXT_TOKEN_PROVIDER } from '../provider';
|
|
5
|
-
import { AuthContextService } from './auth-context.service';
|
|
6
|
-
import { LocalStorageTokenProvider } from './local-storage-token-provider';
|
|
7
|
-
|
|
8
|
-
@Injectable()
|
|
9
|
-
export class LoginService {
|
|
10
|
-
private config = inject<SecurityConfig>(SECURITY_CONFIG);
|
|
11
|
-
private tokenProvider = inject<LocalStorageTokenProvider>(SECURITY_CONTEXT_TOKEN_PROVIDER);
|
|
12
|
-
private authService = inject(AuthContextService);
|
|
13
|
-
private router = inject(Router);
|
|
14
|
-
|
|
15
|
-
login(token?: string): void {
|
|
16
|
-
if (token) {
|
|
17
|
-
this.tokenProvider.setToken(token);
|
|
18
|
-
this.authService.setUser(convertJWTToUser(token));
|
|
19
|
-
} else {
|
|
20
|
-
this.router.navigate([this.config.loginPage]);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { inject, Injectable } from '@angular/core';
|
|
2
|
-
import { SECURITY_CONTEXT_TOKEN_PROVIDER } from '../provider';
|
|
3
|
-
import { AuthContextService } from './auth-context.service';
|
|
4
|
-
import { LocalStorageTokenProvider } from './local-storage-token-provider';
|
|
5
|
-
|
|
6
|
-
@Injectable()
|
|
7
|
-
export class LogoutService {
|
|
8
|
-
private readonly tokenProvider = inject<LocalStorageTokenProvider>(SECURITY_CONTEXT_TOKEN_PROVIDER);
|
|
9
|
-
private readonly authService = inject(AuthContextService);
|
|
10
|
-
|
|
11
|
-
logout(): void {
|
|
12
|
-
this.tokenProvider.removeToken();
|
|
13
|
-
this.authService.setUser(undefined);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Router } from '@angular/router';
|
|
2
|
-
import { firstValueFrom, from, of, switchMap } from 'rxjs';
|
|
3
|
-
import { convertJWTToUser, SecurityConfig } from '../models';
|
|
4
|
-
import { AuthContextService } from './auth-context.service';
|
|
5
|
-
import { TokenProvider } from './token-provider';
|
|
6
|
-
|
|
7
|
-
export function securityInitializerFactory(
|
|
8
|
-
tokenProvider: TokenProvider,
|
|
9
|
-
authService: AuthContextService,
|
|
10
|
-
config: SecurityConfig,
|
|
11
|
-
router: Router
|
|
12
|
-
): () => Promise<unknown> {
|
|
13
|
-
const initializationFn = tokenProvider.getToken().pipe(
|
|
14
|
-
switchMap((token) => {
|
|
15
|
-
const user = convertJWTToUser(token);
|
|
16
|
-
if (config.loginPage && !user) {
|
|
17
|
-
return from(router.navigate([config.loginPage]));
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
authService.setUser(user);
|
|
21
|
-
return of({});
|
|
22
|
-
})
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
return () => firstValueFrom(initializationFn)
|
|
26
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { inject, Injectable } from '@angular/core';
|
|
2
|
-
import { Observable, of } from 'rxjs';
|
|
3
|
-
import { SecurityConfig } from '../models';
|
|
4
|
-
import { SECURITY_CONFIG } from '../provider';
|
|
5
|
-
import { TokenProvider } from './token-provider';
|
|
6
|
-
|
|
7
|
-
@Injectable()
|
|
8
|
-
export class SessionStorageTokenProvider implements TokenProvider {
|
|
9
|
-
private config = inject<SecurityConfig>(SECURITY_CONFIG);
|
|
10
|
-
|
|
11
|
-
getToken(): Observable<string | undefined> {
|
|
12
|
-
const token = sessionStorage.getItem(this.config.tokenStorageKey);
|
|
13
|
-
return of(token ?? undefined);
|
|
14
|
-
}
|
|
15
|
-
}
|
package/src/lib/state/actions.ts
DELETED
package/src/lib/state/feature.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { createReducer, on } from '@ngrx/store';
|
|
2
|
-
import { setUser } from './actions';
|
|
3
|
-
import { initialState } from './state';
|
|
4
|
-
|
|
5
|
-
export const authReducer = createReducer(
|
|
6
|
-
initialState,
|
|
7
|
-
on(setUser, (state, action) => ({
|
|
8
|
-
...state,
|
|
9
|
-
user: action.user
|
|
10
|
-
}))
|
|
11
|
-
);
|
package/src/lib/state/state.ts
DELETED
package/src/test-setup.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// @ts-expect-error https://thymikee.github.io/jest-preset-angular/docs/getting-started/test-environment
|
|
2
|
-
globalThis.ngJest = {
|
|
3
|
-
testEnvironmentOptions: {
|
|
4
|
-
errorOnUnknownElements: true,
|
|
5
|
-
errorOnUnknownProperties: true,
|
|
6
|
-
},
|
|
7
|
-
};
|
|
8
|
-
import 'jest-preset-angular/setup-jest';
|
package/tsconfig.json
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es2022",
|
|
4
|
-
"forceConsistentCasingInFileNames": true,
|
|
5
|
-
"strict": true,
|
|
6
|
-
"noImplicitOverride": true,
|
|
7
|
-
"noPropertyAccessFromIndexSignature": true,
|
|
8
|
-
"noImplicitReturns": true,
|
|
9
|
-
"noFallthroughCasesInSwitch": true
|
|
10
|
-
},
|
|
11
|
-
"files": [],
|
|
12
|
-
"include": [],
|
|
13
|
-
"references": [
|
|
14
|
-
{
|
|
15
|
-
"path": "./tsconfig.lib.json"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"path": "./tsconfig.spec.json"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"extends": "../../../../tsconfig.base.json",
|
|
22
|
-
"angularCompilerOptions": {
|
|
23
|
-
"enableI18nLegacyMessageIdFormat": false,
|
|
24
|
-
"strictInjectionParameters": true,
|
|
25
|
-
"strictInputAccessModifiers": true,
|
|
26
|
-
"strictTemplates": true,
|
|
27
|
-
"compilationMode": "partial",
|
|
28
|
-
"enableIvy": true
|
|
29
|
-
}
|
|
30
|
-
}
|
package/tsconfig.lib.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "../../../../dist/out-tsc",
|
|
5
|
-
"declaration": true,
|
|
6
|
-
"declarationMap": true,
|
|
7
|
-
"inlineSources": true,
|
|
8
|
-
"types": []
|
|
9
|
-
},
|
|
10
|
-
"exclude": [
|
|
11
|
-
"src/**/*.spec.ts",
|
|
12
|
-
"src/test-setup.ts",
|
|
13
|
-
"jest.config.ts",
|
|
14
|
-
"src/**/*.test.ts"
|
|
15
|
-
],
|
|
16
|
-
"include": ["src/**/*.ts"]
|
|
17
|
-
}
|
package/tsconfig.lib.prod.json
DELETED
package/tsconfig.spec.json
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "../../../../dist/out-tsc",
|
|
5
|
-
"module": "commonjs",
|
|
6
|
-
"target": "es2016",
|
|
7
|
-
"types": ["jest", "node"]
|
|
8
|
-
},
|
|
9
|
-
"files": ["src/test-setup.ts"],
|
|
10
|
-
"include": [
|
|
11
|
-
"jest.config.ts",
|
|
12
|
-
"src/**/*.test.ts",
|
|
13
|
-
"src/**/*.spec.ts",
|
|
14
|
-
"src/**/*.d.ts"
|
|
15
|
-
]
|
|
16
|
-
}
|