@tapni/auth 0.0.52 → 0.0.53
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/dist/TapniAuth.es.js +217 -209
- package/dist/TapniAuth.umd.js +10 -10
- package/package.json +3 -2
- package/src/install.js +7 -1
- package/src/main.js +3 -0
- package/src/mixins/auth.mixin.js +3 -0
- package/src/services/Api.js +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tapni/auth",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.53",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/TapniAuth.umd.js",
|
|
6
6
|
"module": "./dist/TapniAuth.es.js",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"dev": "vite",
|
|
20
20
|
"build": "vite build --mode standalone",
|
|
21
21
|
"preview": "vite preview",
|
|
22
|
-
"build-lib": "vite build --config=vite-lib.config.js"
|
|
22
|
+
"build-lib": "vite build --config=vite-lib.config.js",
|
|
23
|
+
"publish": "npm publish"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
25
26
|
"@braintree/sanitize-url": "^7.0.0",
|
package/src/install.js
CHANGED
|
@@ -5,7 +5,13 @@ import ReactiveStorage from '@tapni/capacitor-reactive-localstorage-vue3'
|
|
|
5
5
|
export default {
|
|
6
6
|
TapniAuth: App,
|
|
7
7
|
install: (app, options) => {
|
|
8
|
-
if (options && options.API_ROOT)
|
|
8
|
+
if (options && options.API_ROOT) {
|
|
9
|
+
App.mixin({
|
|
10
|
+
created() {
|
|
11
|
+
this.API_ROOT = options.API_ROOT;
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
}
|
|
9
15
|
app.component('TapniAuth', App);
|
|
10
16
|
}
|
|
11
17
|
};
|
package/src/main.js
CHANGED
package/src/mixins/auth.mixin.js
CHANGED
package/src/services/Api.js
CHANGED
|
@@ -7,8 +7,9 @@ export default (storage, refreshTokenAction = false) => {
|
|
|
7
7
|
const appInfo = version;
|
|
8
8
|
let baseURL = import.meta.env.VITE_APP_API_ROOT + '/v1/';
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
const apiRoot = AuthMixin.methods.apiRootGet();
|
|
11
|
+
if (apiRoot) {
|
|
12
|
+
baseURL = apiRoot
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
let apiInstance = axios.create({
|