@noy-db/in-pinia 0.7.0-pre.9 → 0.7.0

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.
Files changed (2) hide show
  1. package/README.md +7 -4
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -24,7 +24,7 @@ interface Invoice {
24
24
  }
25
25
 
26
26
  export const useInvoices = defineNoydbStore<Invoice>('invoices', {
27
- compartment: 'C101',
27
+ vault: 'C101',
28
28
  });
29
29
  ```
30
30
 
@@ -37,10 +37,13 @@ import { toFile } from '@noy-db/to-file';
37
37
  import { setActiveNoydb } from '@noy-db/in-pinia';
38
38
  import App from './App.vue';
39
39
 
40
+ // `createNoydb` takes the resolved secret string. (The `secret: () => …`
41
+ // thunk form belongs to `createNoydbPiniaPlugin`, which resolves it for you
42
+ // — use that path when the secret comes from a prompt at plugin-install time.)
40
43
  const db = await createNoydb({
41
- adapter: toFile({ dir: './data' }),
44
+ store: toFile({ dir: './data' }),
42
45
  user: 'owner',
43
- secret: () => prompt('Secret')!,
46
+ secret: prompt('Secret')!,
44
47
  });
45
48
 
46
49
  setActiveNoydb(db);
@@ -115,7 +118,7 @@ const InvoiceSchema = z.object({
115
118
  });
116
119
 
117
120
  export const useInvoices = defineNoydbStore<z.infer<typeof InvoiceSchema>>('invoices', {
118
- compartment: 'C101',
121
+ vault: 'C101',
119
122
  schema: InvoiceSchema,
120
123
  });
121
124
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noy-db/in-pinia",
3
- "version": "0.7.0-pre.9",
3
+ "version": "0.7.0",
4
4
  "description": "Pinia integration for noy-db — defineNoydbStore() and the augmentation plugin for existing stores",
5
5
  "license": "MIT",
6
6
  "author": "vLannaAi <vicio@lanna.ai>",
@@ -34,16 +34,16 @@
34
34
  "peerDependencies": {
35
35
  "pinia": "^2.1.0 || ^3.0.0",
36
36
  "vue": "^3.4.0",
37
- "@noy-db/hub": "^0.7.0-pre.9",
38
- "@noy-db/in-vue": "0.7.0-pre.9"
37
+ "@noy-db/hub": "^0.7.0",
38
+ "@noy-db/in-vue": "^0.7.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@vue/test-utils": "^2.4.6",
42
- "happy-dom": "^15.11.7",
42
+ "happy-dom": "^18.0.0",
43
43
  "pinia": "^3.0.1",
44
44
  "vue": "^3.5.32",
45
- "@noy-db/hub": "0.7.0-pre.9",
46
- "@noy-db/in-vue": "0.7.0-pre.9"
45
+ "@noy-db/in-vue": "0.7.0",
46
+ "@noy-db/hub": "0.7.0"
47
47
  },
48
48
  "keywords": [
49
49
  "noy-db",