@tapni/auth 0.0.118 → 0.0.121
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/.vite/manifest.json +7 -13
- package/dist/{Account-5DndxBQe.js → Account-J0z1Zat6.js} +1 -1
- package/dist/{QR-rB8KdJig.js → QR-zoSiF1uz.js} +1 -1
- package/dist/TapniAuth.es.js +3 -2
- package/dist/TapniAuth.umd.js +41 -41
- package/dist/{install-QOxCq9FJ.js → install-V51PR5HP.js} +4425 -3737
- package/package.json +1 -1
- package/src/App.vue +2 -0
- package/src/install.js +7 -1
- package/dist/web-AImUTDQQ.js +0 -54
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -96,8 +96,10 @@ import {EventBus} from "./store/event-bus.js";
|
|
|
96
96
|
import AuthMixin from "@/mixins/auth.mixin.js";
|
|
97
97
|
import Language from "@/components/Language.vue";
|
|
98
98
|
import ReactiveStorage from '@tapni/capacitor-reactive-localstorage-vue3'
|
|
99
|
+
import store from './store/store.js';
|
|
99
100
|
|
|
100
101
|
export default {
|
|
102
|
+
store,
|
|
101
103
|
name: 'TapniAuth',
|
|
102
104
|
mixins: [ReactiveStorage, AuthMixin],
|
|
103
105
|
data () {
|
package/src/install.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
import Vue from 'vue'; // Import Vue
|
|
1
2
|
import App from "./App.vue";
|
|
2
|
-
import
|
|
3
|
+
import store from './store/store.js';
|
|
4
|
+
import AuthMixin from './mixins/auth.mixin.js';
|
|
5
|
+
|
|
6
|
+
// Register Vuex globally
|
|
7
|
+
Vue.use(store);
|
|
3
8
|
|
|
4
9
|
// Export the component by default
|
|
5
10
|
export default {
|
|
6
11
|
TapniAuth: App,
|
|
7
12
|
AuthMixin: AuthMixin,
|
|
8
13
|
install: (app, options) => {
|
|
14
|
+
// Register the component
|
|
9
15
|
app.component('TapniAuth', App);
|
|
10
16
|
}
|
|
11
17
|
};
|
package/dist/web-AImUTDQQ.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { WebPlugin as p } from "@capacitor/core";
|
|
2
|
-
class f extends p {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(...arguments), this.group = "CapacitorStorage";
|
|
5
|
-
}
|
|
6
|
-
async configure({ group: e }) {
|
|
7
|
-
typeof e == "string" && (this.group = e);
|
|
8
|
-
}
|
|
9
|
-
async get(e) {
|
|
10
|
-
return { value: this.impl.getItem(this.applyPrefix(e.key)) };
|
|
11
|
-
}
|
|
12
|
-
async set(e) {
|
|
13
|
-
this.impl.setItem(this.applyPrefix(e.key), e.value);
|
|
14
|
-
}
|
|
15
|
-
async remove(e) {
|
|
16
|
-
this.impl.removeItem(this.applyPrefix(e.key));
|
|
17
|
-
}
|
|
18
|
-
async keys() {
|
|
19
|
-
return { keys: this.rawKeys().map((t) => t.substring(this.prefix.length)) };
|
|
20
|
-
}
|
|
21
|
-
async clear() {
|
|
22
|
-
for (const e of this.rawKeys())
|
|
23
|
-
this.impl.removeItem(e);
|
|
24
|
-
}
|
|
25
|
-
async migrate() {
|
|
26
|
-
var e;
|
|
27
|
-
const t = [], s = [], n = "_cap_", o = Object.keys(this.impl).filter((i) => i.indexOf(n) === 0);
|
|
28
|
-
for (const i of o) {
|
|
29
|
-
const r = i.substring(n.length), a = (e = this.impl.getItem(i)) !== null && e !== void 0 ? e : "", { value: l } = await this.get({ key: r });
|
|
30
|
-
typeof l == "string" ? s.push(r) : (await this.set({ key: r, value: a }), t.push(r));
|
|
31
|
-
}
|
|
32
|
-
return { migrated: t, existing: s };
|
|
33
|
-
}
|
|
34
|
-
async removeOld() {
|
|
35
|
-
const e = "_cap_", t = Object.keys(this.impl).filter((s) => s.indexOf(e) === 0);
|
|
36
|
-
for (const s of t)
|
|
37
|
-
this.impl.removeItem(s);
|
|
38
|
-
}
|
|
39
|
-
get impl() {
|
|
40
|
-
return window.localStorage;
|
|
41
|
-
}
|
|
42
|
-
get prefix() {
|
|
43
|
-
return this.group === "NativeStorage" ? "" : `${this.group}.`;
|
|
44
|
-
}
|
|
45
|
-
rawKeys() {
|
|
46
|
-
return Object.keys(this.impl).filter((e) => e.indexOf(this.prefix) === 0);
|
|
47
|
-
}
|
|
48
|
-
applyPrefix(e) {
|
|
49
|
-
return this.prefix + e;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
export {
|
|
53
|
-
f as PreferencesWeb
|
|
54
|
-
};
|