@livestore/livestore 0.0.57 → 0.0.58-dev.1
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/.tsbuildinfo +1 -1
- package/dist/__tests__/react/fixture.d.ts +0 -2
- package/dist/__tests__/react/fixture.d.ts.map +1 -1
- package/dist/__tests__/react/fixture.js +1 -0
- package/dist/__tests__/react/fixture.js.map +1 -1
- package/dist/effect/LiveStore.d.ts +10 -1
- package/dist/effect/LiveStore.d.ts.map +1 -1
- package/dist/effect/LiveStore.js +3 -2
- package/dist/effect/LiveStore.js.map +1 -1
- package/dist/react/LiveStoreProvider.d.ts +10 -1
- package/dist/react/LiveStoreProvider.d.ts.map +1 -1
- package/dist/react/LiveStoreProvider.js +18 -5
- package/dist/react/LiveStoreProvider.js.map +1 -1
- package/dist/store.d.ts +3 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +3 -1
- package/dist/store.js.map +1 -1
- package/package.json +5 -5
- package/src/__tests__/react/fixture.tsx +1 -0
- package/src/effect/LiveStore.ts +12 -1
- package/src/react/LiveStoreProvider.tsx +27 -3
- package/src/store.ts +6 -1
package/src/store.ts
CHANGED
|
@@ -65,6 +65,7 @@ export type StoreOptions<
|
|
|
65
65
|
> = {
|
|
66
66
|
adapter: StoreAdapter
|
|
67
67
|
schema: TSchema
|
|
68
|
+
storeId: string
|
|
68
69
|
// TODO remove graphql-related stuff from store and move to GraphQL query directly
|
|
69
70
|
graphQLOptions?: GraphQLOptions<TGraphQLContext>
|
|
70
71
|
otelOptions: OtelOptions
|
|
@@ -615,6 +616,7 @@ export class Store<
|
|
|
615
616
|
export type CreateStoreOptions<TGraphQLContext extends BaseGraphQLContext, TSchema extends LiveStoreSchema> = {
|
|
616
617
|
schema: TSchema
|
|
617
618
|
adapter: StoreAdapterFactory
|
|
619
|
+
storeId: string
|
|
618
620
|
reactivityGraph?: ReactivityGraph
|
|
619
621
|
graphQLOptions?: GraphQLOptions<TGraphQLContext>
|
|
620
622
|
otelOptions?: Partial<OtelOptions>
|
|
@@ -661,9 +663,10 @@ export const createStore = <
|
|
|
661
663
|
TSchema extends LiveStoreSchema = LiveStoreSchema,
|
|
662
664
|
>({
|
|
663
665
|
schema,
|
|
666
|
+
adapter: adapterFactory,
|
|
667
|
+
storeId,
|
|
664
668
|
graphQLOptions,
|
|
665
669
|
otelOptions,
|
|
666
|
-
adapter: adapterFactory,
|
|
667
670
|
boot,
|
|
668
671
|
reactivityGraph = globalReactivityGraph,
|
|
669
672
|
batchUpdates,
|
|
@@ -733,6 +736,7 @@ export const createStore = <
|
|
|
733
736
|
|
|
734
737
|
const adapter: StoreAdapter = yield* adapterFactory({
|
|
735
738
|
schema,
|
|
739
|
+
storeId,
|
|
736
740
|
devtoolsEnabled: disableDevtools !== true,
|
|
737
741
|
bootStatusQueue,
|
|
738
742
|
shutdown,
|
|
@@ -828,6 +832,7 @@ export const createStore = <
|
|
|
828
832
|
fiberSet,
|
|
829
833
|
runtime,
|
|
830
834
|
batchUpdates: batchUpdates ?? ((run) => run()),
|
|
835
|
+
storeId,
|
|
831
836
|
},
|
|
832
837
|
span,
|
|
833
838
|
)
|