@drax/identity-front 0.0.8 → 0.0.9
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/package.json
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.9",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./src/index.ts",
|
|
9
9
|
"module": "./src/index.ts",
|
|
10
|
+
"types": "./src/index.ts",
|
|
10
11
|
"files": [
|
|
11
12
|
"src"
|
|
12
13
|
],
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
"format": "prettier --write src/"
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
26
|
-
"@drax/common-front": "^0.0.
|
|
27
|
+
"@drax/common-front": "^0.0.9"
|
|
27
28
|
},
|
|
28
29
|
"peerDependencies": {
|
|
29
30
|
"pinia": "^2.1.7",
|
|
@@ -58,5 +59,5 @@
|
|
|
58
59
|
"vue-tsc": "^2.0.11",
|
|
59
60
|
"vuetify": "^3.6.4"
|
|
60
61
|
},
|
|
61
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "26465c7ca403bae9b9a67fa249aee660fb4f3dd4"
|
|
62
63
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type {IGqlClientInterface, IHttpClientInterface} from '@drax/common-front'
|
|
2
2
|
import {GqlApolloClientFactory, HttpFetchClientFactory} from '@drax/common-front';
|
|
3
3
|
import type {IAuthProviderInterface} from "@/core/interfaces/IAuthProviderInterface";
|
|
4
|
-
import AuthRestProvider from "@/core/providers/
|
|
4
|
+
import AuthRestProvider from "@/core/providers/rest/AuthRestProvider";
|
|
5
5
|
import AuthGqlProvider from "@/core/providers/gql/AuthGqlProvider";
|
|
6
6
|
class AuthProviderFactory{
|
|
7
7
|
static create(type: string = 'rest'): IAuthProviderInterface {
|
|
@@ -12,12 +12,13 @@ class AuthProviderFactory{
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
static createGql(): IAuthProviderInterface {
|
|
15
|
-
const gqlClient: IGqlClientInterface = GqlApolloClientFactory.create()
|
|
15
|
+
const gqlClient: IGqlClientInterface = GqlApolloClientFactory.create('/graphql')
|
|
16
16
|
return new AuthGqlProvider(gqlClient)
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
static createRest(): IAuthProviderInterface {
|
|
20
|
-
const baseUrl =
|
|
20
|
+
const baseUrl = import.meta.env.API_URL ? import.meta.env.API_URL : ''
|
|
21
|
+
console.log("baseUrl",baseUrl)
|
|
21
22
|
const baseHeaders = new Headers()
|
|
22
23
|
const httpClient: IHttpClientInterface = HttpFetchClientFactory.create(baseUrl,baseHeaders)
|
|
23
24
|
return new AuthRestProvider(httpClient)
|
package/src/index.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import IdentityLogin from "
|
|
1
|
+
import IdentityLogin from "@/components/IdentityLogin/IdentityLogin.vue";
|
|
2
2
|
import AuthSystem from "./core/system/AuthSystem.js"
|
|
3
3
|
import AuthRestProvider from "./core/providers/rest/AuthRestProvider.js";
|
|
4
4
|
import AuthGqlProvider from "./core/providers/gql/AuthGqlProvider.js";
|
|
5
5
|
import {useAuthStore} from "./stores/auth/AuthStore.js";
|
|
6
6
|
|
|
7
|
+
import type {IAuthProviderInterface} from "./core/interfaces/IAuthProviderInterface"
|
|
8
|
+
|
|
9
|
+
export type {
|
|
10
|
+
IAuthProviderInterface
|
|
11
|
+
}
|
|
12
|
+
|
|
7
13
|
export {
|
|
8
14
|
//Vue Components
|
|
9
15
|
IdentityLogin,
|