@mearie/solid 0.1.1 → 0.2.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/index.cjs +38 -49
- package/dist/index.d.cts +37 -4
- package/dist/{index.d.ts → index.d.mts} +37 -4
- package/dist/{index.js → index.mjs} +28 -14
- package/package.json +14 -9
package/dist/index.cjs
CHANGED
|
@@ -1,32 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
-
key = keys[i];
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
-
get: ((k) => from[k]).bind(null, key),
|
|
13
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
-
value: mod,
|
|
20
|
-
enumerable: true
|
|
21
|
-
}) : target, mod));
|
|
22
|
-
|
|
23
|
-
//#endregion
|
|
24
|
-
let __mearie_core = require("@mearie/core");
|
|
25
|
-
__mearie_core = __toESM(__mearie_core);
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
let _mearie_core = require("@mearie/core");
|
|
26
3
|
let solid_js = require("solid-js");
|
|
27
|
-
|
|
28
|
-
let __mearie_core_stream = require("@mearie/core/stream");
|
|
29
|
-
__mearie_core_stream = __toESM(__mearie_core_stream);
|
|
4
|
+
let _mearie_core_stream = require("@mearie/core/stream");
|
|
30
5
|
|
|
31
6
|
//#region src/client-provider.tsx
|
|
32
7
|
const ClientContext = (0, solid_js.createContext)();
|
|
@@ -41,20 +16,23 @@ const useClient = () => {
|
|
|
41
16
|
|
|
42
17
|
//#endregion
|
|
43
18
|
//#region src/create-query.ts
|
|
44
|
-
const createQuery = (query,
|
|
19
|
+
const createQuery = ((query, variables, options) => {
|
|
45
20
|
const client = useClient();
|
|
46
|
-
const
|
|
47
|
-
const [
|
|
21
|
+
const initialOpts = options?.();
|
|
22
|
+
const [data, setData] = (0, solid_js.createSignal)(initialOpts?.initialData);
|
|
23
|
+
const [loading, setLoading] = (0, solid_js.createSignal)(!initialOpts?.skip && !initialOpts?.initialData);
|
|
48
24
|
const [error, setError] = (0, solid_js.createSignal)();
|
|
49
25
|
let unsubscribe = null;
|
|
26
|
+
let initialized = false;
|
|
50
27
|
const execute = () => {
|
|
51
28
|
unsubscribe?.();
|
|
52
29
|
if (options?.()?.skip) return;
|
|
53
|
-
setLoading(true);
|
|
30
|
+
if (!initialized && initialOpts?.initialData) setLoading(true);
|
|
31
|
+
initialized = true;
|
|
54
32
|
setError(void 0);
|
|
55
|
-
unsubscribe = (0,
|
|
33
|
+
unsubscribe = (0, _mearie_core_stream.pipe)(client.executeQuery(query, typeof variables === "function" ? variables() : variables, options?.()), (0, _mearie_core_stream.subscribe)({ next: (result) => {
|
|
56
34
|
if (result.errors && result.errors.length > 0) {
|
|
57
|
-
setError(new
|
|
35
|
+
setError(new _mearie_core.AggregatedError(result.errors));
|
|
58
36
|
setLoading(false);
|
|
59
37
|
} else {
|
|
60
38
|
setData(() => result.data);
|
|
@@ -84,7 +62,7 @@ const createQuery = (query, ...[variables, options]) => {
|
|
|
84
62
|
},
|
|
85
63
|
refetch
|
|
86
64
|
};
|
|
87
|
-
};
|
|
65
|
+
});
|
|
88
66
|
|
|
89
67
|
//#endregion
|
|
90
68
|
//#region src/create-subscription.ts
|
|
@@ -97,9 +75,9 @@ const createSubscription = (subscription, ...[variables, options]) => {
|
|
|
97
75
|
if (options?.()?.skip) return;
|
|
98
76
|
setLoading(true);
|
|
99
77
|
setError(void 0);
|
|
100
|
-
const unsubscribe = (0,
|
|
78
|
+
const unsubscribe = (0, _mearie_core_stream.pipe)(client.executeSubscription(subscription, typeof variables === "function" ? variables() : variables, options?.()), (0, _mearie_core_stream.subscribe)({ next: (result) => {
|
|
101
79
|
if (result.errors && result.errors.length > 0) {
|
|
102
|
-
const err = new
|
|
80
|
+
const err = new _mearie_core.AggregatedError(result.errors);
|
|
103
81
|
setError(err);
|
|
104
82
|
setLoading(false);
|
|
105
83
|
options?.()?.onError?.(err);
|
|
@@ -139,9 +117,9 @@ const createMutation = (mutation) => {
|
|
|
139
117
|
setLoading(true);
|
|
140
118
|
setError(void 0);
|
|
141
119
|
try {
|
|
142
|
-
const result = await (0,
|
|
120
|
+
const result = await (0, _mearie_core_stream.pipe)(client.executeMutation(mutation, variables, options), (0, _mearie_core_stream.take)(1), _mearie_core_stream.collect);
|
|
143
121
|
if (result.errors && result.errors.length > 0) {
|
|
144
|
-
const err = new
|
|
122
|
+
const err = new _mearie_core.AggregatedError(result.errors);
|
|
145
123
|
setError(err);
|
|
146
124
|
setLoading(false);
|
|
147
125
|
throw err;
|
|
@@ -150,7 +128,7 @@ const createMutation = (mutation) => {
|
|
|
150
128
|
setLoading(false);
|
|
151
129
|
return result.data;
|
|
152
130
|
} catch (err) {
|
|
153
|
-
if (err instanceof
|
|
131
|
+
if (err instanceof _mearie_core.AggregatedError) setError(err);
|
|
154
132
|
setLoading(false);
|
|
155
133
|
throw err;
|
|
156
134
|
}
|
|
@@ -170,14 +148,25 @@ const createMutation = (mutation) => {
|
|
|
170
148
|
|
|
171
149
|
//#endregion
|
|
172
150
|
//#region src/create-fragment.ts
|
|
173
|
-
const createFragment = (fragment, fragmentRef, options) => {
|
|
151
|
+
const createFragment = ((fragment, fragmentRef, options) => {
|
|
174
152
|
const client = useClient();
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
|
|
153
|
+
const initialRef = fragmentRef();
|
|
154
|
+
let initialData;
|
|
155
|
+
if (initialRef == null) initialData = null;
|
|
156
|
+
else {
|
|
157
|
+
const result = (0, _mearie_core_stream.pipe)(client.executeFragment(fragment, initialRef, options?.()), _mearie_core_stream.peek);
|
|
158
|
+
if (result.data === void 0) throw new Error("Fragment data not found");
|
|
159
|
+
initialData = result.data;
|
|
160
|
+
}
|
|
161
|
+
const [data, setData] = (0, solid_js.createSignal)(initialData);
|
|
178
162
|
(0, solid_js.createEffect)(() => {
|
|
179
|
-
const
|
|
180
|
-
|
|
163
|
+
const currentRef = fragmentRef();
|
|
164
|
+
if (currentRef == null) {
|
|
165
|
+
setData(() => null);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
const unsubscribe = (0, _mearie_core_stream.pipe)(client.executeFragment(fragment, currentRef, options?.()), (0, _mearie_core_stream.subscribe)({ next: (result) => {
|
|
169
|
+
if (result.data !== void 0) setData(() => result.data);
|
|
181
170
|
} }));
|
|
182
171
|
(0, solid_js.onCleanup)(() => {
|
|
183
172
|
unsubscribe();
|
|
@@ -186,7 +175,7 @@ const createFragment = (fragment, fragmentRef, options) => {
|
|
|
186
175
|
return { get data() {
|
|
187
176
|
return data();
|
|
188
177
|
} };
|
|
189
|
-
};
|
|
178
|
+
});
|
|
190
179
|
|
|
191
180
|
//#endregion
|
|
192
181
|
exports.ClientProvider = ClientProvider;
|
|
@@ -195,9 +184,9 @@ exports.createMutation = createMutation;
|
|
|
195
184
|
exports.createQuery = createQuery;
|
|
196
185
|
exports.createSubscription = createSubscription;
|
|
197
186
|
exports.useClient = useClient;
|
|
198
|
-
Object.keys(
|
|
187
|
+
Object.keys(_mearie_core).forEach(function (k) {
|
|
199
188
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
200
189
|
enumerable: true,
|
|
201
|
-
get: function () { return
|
|
190
|
+
get: function () { return _mearie_core[k]; }
|
|
202
191
|
});
|
|
203
192
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -11,7 +11,7 @@ declare const ClientProvider: <TMeta extends SchemaMeta = SchemaMeta>(props: Cli
|
|
|
11
11
|
declare const useClient: <TMeta extends SchemaMeta = SchemaMeta>() => Client<TMeta>;
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/create-query.d.ts
|
|
14
|
-
type CreateQueryOptions = QueryOptions & {
|
|
14
|
+
type CreateQueryOptions<T extends Artifact<'query'> = Artifact<'query'>> = QueryOptions<T> & {
|
|
15
15
|
skip?: boolean;
|
|
16
16
|
};
|
|
17
17
|
type Query<T extends Artifact<'query'>> = {
|
|
@@ -30,7 +30,29 @@ type Query<T extends Artifact<'query'>> = {
|
|
|
30
30
|
error: AggregatedError;
|
|
31
31
|
refetch: () => void;
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
type DefinedQuery<T extends Artifact<'query'>> = {
|
|
34
|
+
data: DataOf<T>;
|
|
35
|
+
loading: true;
|
|
36
|
+
error: undefined;
|
|
37
|
+
refetch: () => void;
|
|
38
|
+
} | {
|
|
39
|
+
data: DataOf<T>;
|
|
40
|
+
loading: false;
|
|
41
|
+
error: undefined;
|
|
42
|
+
refetch: () => void;
|
|
43
|
+
} | {
|
|
44
|
+
data: DataOf<T>;
|
|
45
|
+
loading: false;
|
|
46
|
+
error: AggregatedError;
|
|
47
|
+
refetch: () => void;
|
|
48
|
+
};
|
|
49
|
+
type CreateQueryFn = {
|
|
50
|
+
<T extends Artifact<'query'>>(query: T, variables: Accessor<VariablesOf<T>> | undefined, options: Accessor<CreateQueryOptions<T> & {
|
|
51
|
+
initialData: DataOf<T>;
|
|
52
|
+
}>): DefinedQuery<T>;
|
|
53
|
+
<T extends Artifact<'query'>>(query: T, ...[variables, options]: VariablesOf<T> extends Record<string, never> ? [undefined?, Accessor<CreateQueryOptions<T>>?] : [Accessor<VariablesOf<T>>, Accessor<CreateQueryOptions<T>>?]): Query<T>;
|
|
54
|
+
};
|
|
55
|
+
declare const createQuery: CreateQueryFn;
|
|
34
56
|
//#endregion
|
|
35
57
|
//#region src/create-subscription.d.ts
|
|
36
58
|
type Subscription<T extends Artifact<'subscription'>> = {
|
|
@@ -76,6 +98,17 @@ type CreateFragmentOptions = FragmentOptions;
|
|
|
76
98
|
type Fragment<T extends Artifact<'fragment'>> = {
|
|
77
99
|
data: DataOf<T>;
|
|
78
100
|
};
|
|
79
|
-
|
|
101
|
+
type FragmentList<T extends Artifact<'fragment'>> = {
|
|
102
|
+
data: DataOf<T>[];
|
|
103
|
+
};
|
|
104
|
+
type OptionalFragment<T extends Artifact<'fragment'>> = {
|
|
105
|
+
data: DataOf<T> | null;
|
|
106
|
+
};
|
|
107
|
+
type CreateFragmentFn = {
|
|
108
|
+
<T extends Artifact<'fragment'>>(fragment: T, fragmentRef: Accessor<FragmentRefs<T['name']>[]>, options?: Accessor<CreateFragmentOptions>): FragmentList<T>;
|
|
109
|
+
<T extends Artifact<'fragment'>>(fragment: T, fragmentRef: Accessor<FragmentRefs<T['name']>>, options?: Accessor<CreateFragmentOptions>): Fragment<T>;
|
|
110
|
+
<T extends Artifact<'fragment'>>(fragment: T, fragmentRef: Accessor<FragmentRefs<T['name']> | null | undefined>, options?: Accessor<CreateFragmentOptions>): OptionalFragment<T>;
|
|
111
|
+
};
|
|
112
|
+
declare const createFragment: CreateFragmentFn;
|
|
80
113
|
//#endregion
|
|
81
|
-
export { ClientProvider, type ClientProviderProps, type CreateFragmentOptions, type CreateMutationOptions, type CreateQueryOptions, type CreateSubscriptionOptions, type Fragment, type Mutation, type MutationResult, type Query, type Subscription, createFragment, createMutation, createQuery, createSubscription, useClient };
|
|
114
|
+
export { ClientProvider, type ClientProviderProps, type CreateFragmentOptions, type CreateMutationOptions, type CreateQueryOptions, type CreateSubscriptionOptions, type DefinedQuery, type Fragment, type FragmentList, type Mutation, type MutationResult, type OptionalFragment, type Query, type Subscription, createFragment, createMutation, createQuery, createSubscription, useClient };
|
|
@@ -11,7 +11,7 @@ declare const ClientProvider: <TMeta extends SchemaMeta = SchemaMeta>(props: Cli
|
|
|
11
11
|
declare const useClient: <TMeta extends SchemaMeta = SchemaMeta>() => Client<TMeta>;
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/create-query.d.ts
|
|
14
|
-
type CreateQueryOptions = QueryOptions & {
|
|
14
|
+
type CreateQueryOptions<T extends Artifact<'query'> = Artifact<'query'>> = QueryOptions<T> & {
|
|
15
15
|
skip?: boolean;
|
|
16
16
|
};
|
|
17
17
|
type Query<T extends Artifact<'query'>> = {
|
|
@@ -30,7 +30,29 @@ type Query<T extends Artifact<'query'>> = {
|
|
|
30
30
|
error: AggregatedError;
|
|
31
31
|
refetch: () => void;
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
type DefinedQuery<T extends Artifact<'query'>> = {
|
|
34
|
+
data: DataOf<T>;
|
|
35
|
+
loading: true;
|
|
36
|
+
error: undefined;
|
|
37
|
+
refetch: () => void;
|
|
38
|
+
} | {
|
|
39
|
+
data: DataOf<T>;
|
|
40
|
+
loading: false;
|
|
41
|
+
error: undefined;
|
|
42
|
+
refetch: () => void;
|
|
43
|
+
} | {
|
|
44
|
+
data: DataOf<T>;
|
|
45
|
+
loading: false;
|
|
46
|
+
error: AggregatedError;
|
|
47
|
+
refetch: () => void;
|
|
48
|
+
};
|
|
49
|
+
type CreateQueryFn = {
|
|
50
|
+
<T extends Artifact<'query'>>(query: T, variables: Accessor<VariablesOf<T>> | undefined, options: Accessor<CreateQueryOptions<T> & {
|
|
51
|
+
initialData: DataOf<T>;
|
|
52
|
+
}>): DefinedQuery<T>;
|
|
53
|
+
<T extends Artifact<'query'>>(query: T, ...[variables, options]: VariablesOf<T> extends Record<string, never> ? [undefined?, Accessor<CreateQueryOptions<T>>?] : [Accessor<VariablesOf<T>>, Accessor<CreateQueryOptions<T>>?]): Query<T>;
|
|
54
|
+
};
|
|
55
|
+
declare const createQuery: CreateQueryFn;
|
|
34
56
|
//#endregion
|
|
35
57
|
//#region src/create-subscription.d.ts
|
|
36
58
|
type Subscription<T extends Artifact<'subscription'>> = {
|
|
@@ -76,6 +98,17 @@ type CreateFragmentOptions = FragmentOptions;
|
|
|
76
98
|
type Fragment<T extends Artifact<'fragment'>> = {
|
|
77
99
|
data: DataOf<T>;
|
|
78
100
|
};
|
|
79
|
-
|
|
101
|
+
type FragmentList<T extends Artifact<'fragment'>> = {
|
|
102
|
+
data: DataOf<T>[];
|
|
103
|
+
};
|
|
104
|
+
type OptionalFragment<T extends Artifact<'fragment'>> = {
|
|
105
|
+
data: DataOf<T> | null;
|
|
106
|
+
};
|
|
107
|
+
type CreateFragmentFn = {
|
|
108
|
+
<T extends Artifact<'fragment'>>(fragment: T, fragmentRef: Accessor<FragmentRefs<T['name']>[]>, options?: Accessor<CreateFragmentOptions>): FragmentList<T>;
|
|
109
|
+
<T extends Artifact<'fragment'>>(fragment: T, fragmentRef: Accessor<FragmentRefs<T['name']>>, options?: Accessor<CreateFragmentOptions>): Fragment<T>;
|
|
110
|
+
<T extends Artifact<'fragment'>>(fragment: T, fragmentRef: Accessor<FragmentRefs<T['name']> | null | undefined>, options?: Accessor<CreateFragmentOptions>): OptionalFragment<T>;
|
|
111
|
+
};
|
|
112
|
+
declare const createFragment: CreateFragmentFn;
|
|
80
113
|
//#endregion
|
|
81
|
-
export { ClientProvider, type ClientProviderProps, type CreateFragmentOptions, type CreateMutationOptions, type CreateQueryOptions, type CreateSubscriptionOptions, type Fragment, type Mutation, type MutationResult, type Query, type Subscription, createFragment, createMutation, createQuery, createSubscription, useClient };
|
|
114
|
+
export { ClientProvider, type ClientProviderProps, type CreateFragmentOptions, type CreateMutationOptions, type CreateQueryOptions, type CreateSubscriptionOptions, type DefinedQuery, type Fragment, type FragmentList, type Mutation, type MutationResult, type OptionalFragment, type Query, type Subscription, createFragment, createMutation, createQuery, createSubscription, useClient };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AggregatedError } from "@mearie/core";
|
|
2
2
|
import { createContext, createEffect, createSignal, onCleanup, untrack, useContext } from "solid-js";
|
|
3
|
-
import { collect, peek, pipe, subscribe } from "@mearie/core/stream";
|
|
3
|
+
import { collect, peek, pipe, subscribe, take } from "@mearie/core/stream";
|
|
4
4
|
|
|
5
5
|
export * from "@mearie/core"
|
|
6
6
|
|
|
@@ -17,16 +17,19 @@ const useClient = () => {
|
|
|
17
17
|
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/create-query.ts
|
|
20
|
-
const createQuery = (query,
|
|
20
|
+
const createQuery = ((query, variables, options) => {
|
|
21
21
|
const client = useClient();
|
|
22
|
-
const
|
|
23
|
-
const [
|
|
22
|
+
const initialOpts = options?.();
|
|
23
|
+
const [data, setData] = createSignal(initialOpts?.initialData);
|
|
24
|
+
const [loading, setLoading] = createSignal(!initialOpts?.skip && !initialOpts?.initialData);
|
|
24
25
|
const [error, setError] = createSignal();
|
|
25
26
|
let unsubscribe = null;
|
|
27
|
+
let initialized = false;
|
|
26
28
|
const execute = () => {
|
|
27
29
|
unsubscribe?.();
|
|
28
30
|
if (options?.()?.skip) return;
|
|
29
|
-
setLoading(true);
|
|
31
|
+
if (!initialized && initialOpts?.initialData) setLoading(true);
|
|
32
|
+
initialized = true;
|
|
30
33
|
setError(void 0);
|
|
31
34
|
unsubscribe = pipe(client.executeQuery(query, typeof variables === "function" ? variables() : variables, options?.()), subscribe({ next: (result) => {
|
|
32
35
|
if (result.errors && result.errors.length > 0) {
|
|
@@ -60,7 +63,7 @@ const createQuery = (query, ...[variables, options]) => {
|
|
|
60
63
|
},
|
|
61
64
|
refetch
|
|
62
65
|
};
|
|
63
|
-
};
|
|
66
|
+
});
|
|
64
67
|
|
|
65
68
|
//#endregion
|
|
66
69
|
//#region src/create-subscription.ts
|
|
@@ -115,7 +118,7 @@ const createMutation = (mutation) => {
|
|
|
115
118
|
setLoading(true);
|
|
116
119
|
setError(void 0);
|
|
117
120
|
try {
|
|
118
|
-
const result = await pipe(client.executeMutation(mutation, variables, options), collect);
|
|
121
|
+
const result = await pipe(client.executeMutation(mutation, variables, options), take(1), collect);
|
|
119
122
|
if (result.errors && result.errors.length > 0) {
|
|
120
123
|
const err = new AggregatedError(result.errors);
|
|
121
124
|
setError(err);
|
|
@@ -146,14 +149,25 @@ const createMutation = (mutation) => {
|
|
|
146
149
|
|
|
147
150
|
//#endregion
|
|
148
151
|
//#region src/create-fragment.ts
|
|
149
|
-
const createFragment = (fragment, fragmentRef, options) => {
|
|
152
|
+
const createFragment = ((fragment, fragmentRef, options) => {
|
|
150
153
|
const client = useClient();
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
|
|
154
|
+
const initialRef = fragmentRef();
|
|
155
|
+
let initialData;
|
|
156
|
+
if (initialRef == null) initialData = null;
|
|
157
|
+
else {
|
|
158
|
+
const result = pipe(client.executeFragment(fragment, initialRef, options?.()), peek);
|
|
159
|
+
if (result.data === void 0) throw new Error("Fragment data not found");
|
|
160
|
+
initialData = result.data;
|
|
161
|
+
}
|
|
162
|
+
const [data, setData] = createSignal(initialData);
|
|
154
163
|
createEffect(() => {
|
|
155
|
-
const
|
|
156
|
-
|
|
164
|
+
const currentRef = fragmentRef();
|
|
165
|
+
if (currentRef == null) {
|
|
166
|
+
setData(() => null);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
const unsubscribe = pipe(client.executeFragment(fragment, currentRef, options?.()), subscribe({ next: (result) => {
|
|
170
|
+
if (result.data !== void 0) setData(() => result.data);
|
|
157
171
|
} }));
|
|
158
172
|
onCleanup(() => {
|
|
159
173
|
unsubscribe();
|
|
@@ -162,7 +176,7 @@ const createFragment = (fragment, fragmentRef, options) => {
|
|
|
162
176
|
return { get data() {
|
|
163
177
|
return data();
|
|
164
178
|
} };
|
|
165
|
-
};
|
|
179
|
+
});
|
|
166
180
|
|
|
167
181
|
//#endregion
|
|
168
182
|
export { ClientProvider, createFragment, createMutation, createQuery, createSubscription, useClient };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mearie/solid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Type-safe, zero-overhead GraphQL client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"graphql",
|
|
@@ -28,9 +28,14 @@
|
|
|
28
28
|
"type": "module",
|
|
29
29
|
"exports": {
|
|
30
30
|
".": {
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
"import": {
|
|
32
|
+
"types": "./dist/index.d.mts",
|
|
33
|
+
"default": "./dist/index.mjs"
|
|
34
|
+
},
|
|
35
|
+
"require": {
|
|
36
|
+
"types": "./dist/index.d.cts",
|
|
37
|
+
"default": "./dist/index.cjs"
|
|
38
|
+
}
|
|
34
39
|
},
|
|
35
40
|
"./package.json": "./package.json"
|
|
36
41
|
},
|
|
@@ -40,11 +45,11 @@
|
|
|
40
45
|
"README.md"
|
|
41
46
|
],
|
|
42
47
|
"dependencies": {
|
|
43
|
-
"@mearie/core": "0.1
|
|
48
|
+
"@mearie/core": "0.2.1"
|
|
44
49
|
},
|
|
45
50
|
"devDependencies": {
|
|
46
|
-
"solid-js": "^1.9.
|
|
47
|
-
"tsdown": "^0.
|
|
51
|
+
"solid-js": "^1.9.11",
|
|
52
|
+
"tsdown": "^0.20.3",
|
|
48
53
|
"typescript": "^5.9.3"
|
|
49
54
|
},
|
|
50
55
|
"peerDependencies": {
|
|
@@ -63,6 +68,6 @@
|
|
|
63
68
|
"typecheck": "tsc"
|
|
64
69
|
},
|
|
65
70
|
"main": "./dist/index.cjs",
|
|
66
|
-
"module": "./dist/index.
|
|
67
|
-
"types": "./dist/index.d.
|
|
71
|
+
"module": "./dist/index.mjs",
|
|
72
|
+
"types": "./dist/index.d.mts"
|
|
68
73
|
}
|