Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move proxies to secondary entry points #10086

Merged
merged 20 commits into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2595564
feat: add identity/proxy secondary entry point
bnymncoskuner Sep 20, 2021
bd8d150
refactor: move proxies in identity
bnymncoskuner Sep 20, 2021
7be446e
feat: remove profile service from core
bnymncoskuner Sep 21, 2021
78a28ab
feat: use profile service from identity
bnymncoskuner Sep 21, 2021
9d499b3
Merge branch 'dev' of https://github.com/abpframework/abp into feat/1…
bnymncoskuner Sep 21, 2021
ed837d0
build: add identity as dep to account in nx
bnymncoskuner Sep 21, 2021
dfa3cb2
fix: allow importing from proxy entrypoint
bnymncoskuner Sep 21, 2021
80f808b
feat: add account-core/proxy secondary entry point
bnymncoskuner Sep 21, 2021
2aa0fad
feat: delete proxies from account module
bnymncoskuner Sep 21, 2021
5772942
feat: use proxies from account-core in account
bnymncoskuner Sep 21, 2021
dddd171
feat: add proxy entry point in feature-management
bnymncoskuner Sep 21, 2021
a059cc3
feat: delete proxies from feature-management
bnymncoskuner Sep 21, 2021
f7f5345
feat: use proxies from new entry point in feature-mng
bnymncoskuner Sep 21, 2021
242aa83
fix: delete old test failing the build
bnymncoskuner Sep 21, 2021
7d18b0a
feat: delete proxies from permission-management
bnymncoskuner Sep 21, 2021
710bf16
feat: use proxies from secondary entry point in permission-management
bnymncoskuner Sep 21, 2021
7b83275
feat: move tenants service to proxy entry point
bnymncoskuner Sep 21, 2021
9ac3134
refactor: import directly from lib in public-api instead of barrel im…
bnymncoskuner Sep 21, 2021
6d9e09b
Update nx.json
mehmet-erim Sep 22, 2021
f8dcf37
Merge branch 'dev' into feat/10060-proxy
mehmet-erim Sep 23, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions npm/ng-packs/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"allow": ["@abp/**/proxy"],
"depConstraints": [
{
"sourceTag": "*",
Expand All @@ -20,7 +20,7 @@
}
]
}
},
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
Expand Down
6 changes: 3 additions & 3 deletions npm/ng-packs/nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
"appsDir": ""
},
"projects": {
"account": {
"account-core": {
"tags": [],
"implicitDependencies": ["core", "theme-shared"]
},
"account-core": {
"account": {
"tags": [],
"implicitDependencies": ["core", "theme-shared"]
"implicitDependencies": ["core", "theme-shared", "account-core", "identity"]
},
"components": {
"tags": [],
Expand Down
7 changes: 7 additions & 0 deletions npm/ng-packs/packages/account-core/proxy/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/packages/account-core/proxy",
"lib": {
"entryFile": "src/public-api.ts"
}
}
2 changes: 2 additions & 0 deletions npm/ng-packs/packages/account-core/proxy/src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './proxy/account';
export * from './proxy/identity';
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import type { RegisterDto, ResetPasswordDto, SendPasswordResetCodeDto } from './models';
import { RestService } from '@abp/ng.core';
import { Injectable } from '@angular/core';
import type { IdentityUserDto } from '../identity/models';

@Injectable({
providedIn: 'root',
})
export class AccountService {
apiName = 'AbpAccount';

register = (input: RegisterDto) =>
this.restService.request<any, IdentityUserDto>({
method: 'POST',
url: '/api/account/register',
body: input,
},
{ apiName: this.apiName });

resetPassword = (input: ResetPasswordDto) =>
this.restService.request<any, void>({
method: 'POST',
url: '/api/account/reset-password',
body: input,
},
{ apiName: this.apiName });

sendPasswordResetCode = (input: SendPasswordResetCodeDto) =>
this.restService.request<any, void>({
method: 'POST',
url: '/api/account/send-password-reset-code',
body: input,
},
{ apiName: this.apiName });

constructor(private restService: RestService) {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import type { AbpLoginResult, UserLoginInfo } from './models/models';
import { RestService } from '@abp/ng.core';
import { Injectable } from '@angular/core';

@Injectable({
providedIn: 'root',
})
export class AccountService {
apiName = 'AbpAccount';

checkPasswordByLogin = (login: UserLoginInfo) =>
this.restService.request<any, AbpLoginResult>({
method: 'POST',
url: '/api/account/check-password',
body: login,
},
{ apiName: this.apiName });

loginByLogin = (login: UserLoginInfo) =>
this.restService.request<any, AbpLoginResult>({
method: 'POST',
url: '/api/account/login',
body: login,
},
{ apiName: this.apiName });

logout = () =>
this.restService.request<any, void>({
method: 'GET',
url: '/api/account/logout',
},
{ apiName: this.apiName });

constructor(private restService: RestService) {}
}