@nkzw/fate-indexeddb 1.7.7 → 1.8.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 +11 -11
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -437,8 +437,8 @@ ViewRefs carry a set of view names they can resolve. `useView` throws if a ref d
437
437
  A view can take parameters. Define the selection with a function, then bind its parameters where you request or compose the view:
438
438
 
439
439
  ```tsx
440
- import { alias, useRequest, useView, view, when, type ViewRef } from 'react-fate';
441
440
  import type { User } from '@your-org/server/views';
441
+ import { alias, useRequest, useView, view, when, type ViewRef } from 'react-fate';
442
442
 
443
443
  const AccountView = view<User>()({ email: true });
444
444
 
@@ -1391,8 +1391,8 @@ export const fate = createFateServer({
1391
1391
  The equivalent tRPC mutation lives in your router and returns the selected shape that the client asked for:
1392
1392
 
1393
1393
  ```tsx
1394
- import { z } from 'zod';
1395
1394
  import { connectionArgs, createResolver } from '@nkzw/fate/server';
1395
+ import { z } from 'zod';
1396
1396
  import { procedure, router } from '../init.ts';
1397
1397
  import { postDataView, PostItem } from '../views.ts';
1398
1398
 
@@ -1525,8 +1525,8 @@ vp add @nkzw/fate-indexeddb
1525
1525
  Then pass `persistence` when creating the client:
1526
1526
 
1527
1527
  ```tsx
1528
- import { createPersistence } from '@nkzw/fate/persistence';
1529
1528
  import { createIndexedDBStorage } from '@nkzw/fate-indexeddb';
1529
+ import { createPersistence } from '@nkzw/fate/persistence';
1530
1530
  import { createFateClient } from 'react-fate/client';
1531
1531
 
1532
1532
  const fate = createFateClient({
@@ -1863,9 +1863,9 @@ If your server lives in a separate package, install `@nkzw/fate` there as a runt
1863
1863
  Use the Vue adapter's Vite plugin in the client app:
1864
1864
 
1865
1865
  ```ts
1866
- import { fate } from 'vue-fate/vite';
1867
- import { defineConfig } from 'vite';
1868
1866
  import vue from '@vitejs/plugin-vue';
1867
+ import { defineConfig } from 'vite';
1868
+ import { fate } from 'vue-fate/vite';
1869
1869
 
1870
1870
  export default defineConfig({
1871
1871
  plugins: [
@@ -2213,8 +2213,8 @@ export default defineConfig({
2213
2213
 
2214
2214
  ```ts [Vue]
2215
2215
  import vue from '@vitejs/plugin-vue';
2216
- import { fate } from 'vue-fate/vite';
2217
2216
  import { defineConfig } from 'vite';
2217
+ import { fate } from 'vue-fate/vite';
2218
2218
 
2219
2219
  export default defineConfig({
2220
2220
  plugins: [
@@ -2737,8 +2737,8 @@ export default defineConfig({
2737
2737
 
2738
2738
  ```ts [Vue]
2739
2739
  import vue from '@vitejs/plugin-vue';
2740
- import { fate } from 'vue-fate/vite';
2741
2740
  import { defineConfig } from 'vite';
2741
+ import { fate } from 'vue-fate/vite';
2742
2742
 
2743
2743
  export default defineConfig({
2744
2744
  plugins: [
@@ -2877,8 +2877,8 @@ Pass the `Root` export from `views.ts` to fate in your tRPC `init.ts` file. fate
2877
2877
  Use `createPrismaFate` from `@nkzw/fate/server/prisma` next to your tRPC helpers. By default, fate reads Prisma delegates from `ctx.prisma` using each data view's type name:
2878
2878
 
2879
2879
  ```tsx
2880
- import { initTRPC } from '@trpc/server';
2881
2880
  import { createPrismaFate } from '@nkzw/fate/server/prisma';
2881
+ import { initTRPC } from '@trpc/server';
2882
2882
  import type { AppContext } from './context.ts';
2883
2883
  import { Root } from './views.ts';
2884
2884
 
@@ -2926,8 +2926,8 @@ return plan.resolve(post);
2926
2926
  Use `createDrizzleFate` from `@nkzw/fate/server/drizzle`. fate matches data view type names to Drizzle tables from your schema. The `db` option can be a Drizzle database object or a function that receives your tRPC context and returns a request-scoped database object:
2927
2927
 
2928
2928
  ```tsx
2929
- import { initTRPC } from '@trpc/server';
2930
2929
  import { createDrizzleFate } from '@nkzw/fate/server/drizzle';
2930
+ import { initTRPC } from '@trpc/server';
2931
2931
  import db from '../drizzle/db.ts';
2932
2932
  import schema from '../drizzle/schema.ts';
2933
2933
  import type { AppContext } from './context.ts';
@@ -3168,8 +3168,8 @@ export default defineConfig({
3168
3168
 
3169
3169
  ```ts [Vue]
3170
3170
  import vue from '@vitejs/plugin-vue';
3171
- import { fate } from 'vue-fate/vite';
3172
3171
  import { defineConfig } from 'vite';
3172
+ import { fate } from 'vue-fate/vite';
3173
3173
 
3174
3174
  export default defineConfig({
3175
3175
  plugins: [
@@ -3327,9 +3327,9 @@ export default defineConfig({
3327
3327
 
3328
3328
  ```ts [Vue]
3329
3329
  import { voidVue } from '@void/vue/plugin';
3330
- import { fate } from 'vue-fate/vite';
3331
3330
  import { defineConfig } from 'vite-plus';
3332
3331
  import { voidPlugin } from 'void';
3332
+ import { fate } from 'vue-fate/vite';
3333
3333
 
3334
3334
  export default defineConfig({
3335
3335
  plugins: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nkzw/fate-indexeddb",
3
- "version": "1.7.7",
3
+ "version": "1.8.0",
4
4
  "description": "Optional IndexedDB persistence adapter for fate.",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -16,13 +16,13 @@
16
16
  }
17
17
  },
18
18
  "dependencies": {
19
- "idb": "^8.0.3"
19
+ "idb": "^8.0.4"
20
20
  },
21
21
  "devDependencies": {
22
- "@nkzw/fate": "1.7.7",
22
+ "@nkzw/fate": "1.8.0",
23
23
  "fake-indexeddb": "^6.2.5",
24
- "vite": "npm:@voidzero-dev/vite-plus-core@1.0.0",
25
- "vite-plus": "1.0.0"
24
+ "vite": "npm:@voidzero-dev/vite-plus-core@1.2.0",
25
+ "vite-plus": "1.2.0"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@nkzw/fate": "^1.5.1"