@noy-db/in-vue 0.4.0-pre.1 → 0.4.0-pre.10
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/README.md +6 -6
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -16,12 +16,12 @@ pnpm add @noy-db/hub @noy-db/to-browser-idb @noy-db/in-vue
|
|
|
16
16
|
// main.ts
|
|
17
17
|
import { createApp } from 'vue'
|
|
18
18
|
import { NoydbPlugin } from '@noy-db/in-vue'
|
|
19
|
-
import {
|
|
19
|
+
import { toBrowserIdb } from '@noy-db/to-browser-idb'
|
|
20
20
|
import App from './App.vue'
|
|
21
21
|
|
|
22
22
|
createApp(App)
|
|
23
23
|
.use(NoydbPlugin, {
|
|
24
|
-
adapter:
|
|
24
|
+
adapter: toBrowserIdb({ obfuscate: true }),
|
|
25
25
|
userId: 'alice',
|
|
26
26
|
})
|
|
27
27
|
.mount('#app')
|
|
@@ -39,8 +39,8 @@ const { db, unlock, locked } = useNoydb()
|
|
|
39
39
|
const { items, put, remove } = useCollection<Invoice>('C101', 'invoices')
|
|
40
40
|
const { push, pull, status } = useSync()
|
|
41
41
|
|
|
42
|
-
async function login(
|
|
43
|
-
await unlock(
|
|
42
|
+
async function login(secret: string) {
|
|
43
|
+
await unlock(secret)
|
|
44
44
|
}
|
|
45
45
|
</script>
|
|
46
46
|
|
|
@@ -57,9 +57,9 @@ async function login(passphrase: string) {
|
|
|
57
57
|
```ts
|
|
58
58
|
import { enrollBiometric, unlockWithBiometric } from '@noy-db/in-vue'
|
|
59
59
|
|
|
60
|
-
await enrollBiometric('alice',
|
|
60
|
+
await enrollBiometric('alice', secret)
|
|
61
61
|
// …later, on another session:
|
|
62
|
-
const
|
|
62
|
+
const secret = await unlockWithBiometric('alice')
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
## License
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noy-db/in-vue",
|
|
3
|
-
"version": "0.4.0-pre.
|
|
3
|
+
"version": "0.4.0-pre.10",
|
|
4
4
|
"description": "Vue 3 / Nuxt composables for noy-db — reactive useNoydb, useCollection, useSync, and biometric plugin",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "vLannaAi <vicio@lanna.ai>",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"vue": "^3.0.0",
|
|
36
|
-
"@noy-db/hub": "0.4.0-pre.
|
|
36
|
+
"@noy-db/hub": "0.4.0-pre.10"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"vue": "^3.5.32",
|
|
40
|
-
"@noy-db/hub": "0.4.0-pre.
|
|
40
|
+
"@noy-db/hub": "0.4.0-pre.10"
|
|
41
41
|
},
|
|
42
42
|
"keywords": [
|
|
43
43
|
"noy-db",
|