@mearie/svelte 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.svelte.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 svelte = require("svelte");
|
|
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-context.svelte.ts
|
|
32
7
|
const CLIENT_KEY = Symbol("mearie-client");
|
|
@@ -41,20 +16,23 @@ const getClient = () => {
|
|
|
41
16
|
|
|
42
17
|
//#endregion
|
|
43
18
|
//#region src/create-query.svelte.ts
|
|
44
|
-
const createQuery = (query,
|
|
19
|
+
const createQuery = ((query, variables, options) => {
|
|
45
20
|
const client = getClient();
|
|
46
|
-
|
|
47
|
-
let
|
|
21
|
+
const initialOpts = options?.();
|
|
22
|
+
let data = $state.raw(initialOpts?.initialData);
|
|
23
|
+
let loading = $state(!initialOpts?.skip && !initialOpts?.initialData);
|
|
48
24
|
let error = $state();
|
|
49
25
|
let unsubscribe = null;
|
|
26
|
+
let initialized = false;
|
|
50
27
|
const execute = () => {
|
|
51
28
|
unsubscribe?.();
|
|
52
29
|
if (options?.().skip) return;
|
|
53
|
-
loading = true;
|
|
30
|
+
if (!initialized && !!initialOpts?.initialData) loading = true;
|
|
31
|
+
initialized = true;
|
|
54
32
|
error = void 0;
|
|
55
|
-
unsubscribe = (0,
|
|
33
|
+
unsubscribe = (0, _mearie_core_stream.pipe)(client.executeQuery(query, typeof variables === "function" ? variables() : void 0, options?.()), (0, _mearie_core_stream.subscribe)({ next: (result) => {
|
|
56
34
|
if (result.errors && result.errors.length > 0) {
|
|
57
|
-
error = new
|
|
35
|
+
error = new _mearie_core.AggregatedError(result.errors);
|
|
58
36
|
loading = false;
|
|
59
37
|
} else {
|
|
60
38
|
data = result.data;
|
|
@@ -83,22 +61,22 @@ const createQuery = (query, ...[variables, options]) => {
|
|
|
83
61
|
},
|
|
84
62
|
refetch
|
|
85
63
|
};
|
|
86
|
-
};
|
|
64
|
+
});
|
|
87
65
|
|
|
88
66
|
//#endregion
|
|
89
67
|
//#region src/create-subscription.svelte.ts
|
|
90
68
|
const createSubscription = (subscription, ...[variables, options]) => {
|
|
91
69
|
const client = getClient();
|
|
92
|
-
let data = $state();
|
|
70
|
+
let data = $state.raw();
|
|
93
71
|
let loading = $state(!options?.().skip);
|
|
94
72
|
let error = $state();
|
|
95
73
|
$effect(() => {
|
|
96
74
|
if (options?.().skip) return;
|
|
97
75
|
loading = true;
|
|
98
76
|
error = void 0;
|
|
99
|
-
const unsubscribe = (0,
|
|
77
|
+
const unsubscribe = (0, _mearie_core_stream.pipe)(client.executeSubscription(subscription, typeof variables === "function" ? variables() : void 0, options?.()), (0, _mearie_core_stream.subscribe)({ next: (result) => {
|
|
100
78
|
if (result.errors && result.errors.length > 0) {
|
|
101
|
-
const err = new
|
|
79
|
+
const err = new _mearie_core.AggregatedError(result.errors);
|
|
102
80
|
error = err;
|
|
103
81
|
loading = false;
|
|
104
82
|
options?.().onError?.(err);
|
|
@@ -137,9 +115,9 @@ const createMutation = (mutation) => {
|
|
|
137
115
|
loading = true;
|
|
138
116
|
error = void 0;
|
|
139
117
|
try {
|
|
140
|
-
const result = await (0,
|
|
118
|
+
const result = await (0, _mearie_core_stream.pipe)(client.executeMutation(mutation, variables, options), (0, _mearie_core_stream.take)(1), _mearie_core_stream.collect);
|
|
141
119
|
if (result.errors && result.errors.length > 0) {
|
|
142
|
-
const err = new
|
|
120
|
+
const err = new _mearie_core.AggregatedError(result.errors);
|
|
143
121
|
error = err;
|
|
144
122
|
loading = false;
|
|
145
123
|
throw err;
|
|
@@ -148,7 +126,7 @@ const createMutation = (mutation) => {
|
|
|
148
126
|
loading = false;
|
|
149
127
|
return result.data;
|
|
150
128
|
} catch (err) {
|
|
151
|
-
if (err instanceof
|
|
129
|
+
if (err instanceof _mearie_core.AggregatedError) error = err;
|
|
152
130
|
loading = false;
|
|
153
131
|
throw err;
|
|
154
132
|
}
|
|
@@ -168,24 +146,34 @@ const createMutation = (mutation) => {
|
|
|
168
146
|
|
|
169
147
|
//#endregion
|
|
170
148
|
//#region src/create-fragment.svelte.ts
|
|
171
|
-
const createFragment = (fragment, fragmentRef, options) => {
|
|
149
|
+
const createFragment = ((fragment, fragmentRef, options) => {
|
|
172
150
|
const client = getClient();
|
|
173
151
|
const ref = fragmentRef();
|
|
174
|
-
|
|
175
|
-
if (
|
|
176
|
-
|
|
152
|
+
let data;
|
|
153
|
+
if (ref == null) data = null;
|
|
154
|
+
else {
|
|
155
|
+
const result = (0, _mearie_core_stream.pipe)(client.executeFragment(fragment, $state.snapshot(ref), options?.()), _mearie_core_stream.peek);
|
|
156
|
+
if (result.data === void 0) throw new Error("Fragment data not found");
|
|
157
|
+
data = result.data;
|
|
158
|
+
}
|
|
159
|
+
let state = $state(data);
|
|
177
160
|
$effect(() => {
|
|
178
|
-
const
|
|
179
|
-
|
|
161
|
+
const currentRef = fragmentRef();
|
|
162
|
+
if (currentRef == null) {
|
|
163
|
+
state = null;
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
const unsubscribe = (0, _mearie_core_stream.pipe)(client.executeFragment(fragment, $state.snapshot(currentRef), options?.()), (0, _mearie_core_stream.subscribe)({ next: (result) => {
|
|
167
|
+
if (result.data !== void 0) state = result.data;
|
|
180
168
|
} }));
|
|
181
169
|
return () => {
|
|
182
170
|
unsubscribe();
|
|
183
171
|
};
|
|
184
172
|
});
|
|
185
173
|
return { get data() {
|
|
186
|
-
return
|
|
174
|
+
return state;
|
|
187
175
|
} };
|
|
188
|
-
};
|
|
176
|
+
});
|
|
189
177
|
|
|
190
178
|
//#endregion
|
|
191
179
|
exports.createFragment = createFragment;
|
|
@@ -194,9 +182,9 @@ exports.createQuery = createQuery;
|
|
|
194
182
|
exports.createSubscription = createSubscription;
|
|
195
183
|
exports.getClient = getClient;
|
|
196
184
|
exports.setClient = setClient;
|
|
197
|
-
Object.keys(
|
|
185
|
+
Object.keys(_mearie_core).forEach(function (k) {
|
|
198
186
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
199
187
|
enumerable: true,
|
|
200
|
-
get: function () { return
|
|
188
|
+
get: function () { return _mearie_core[k]; }
|
|
201
189
|
});
|
|
202
190
|
});
|
package/dist/index.svelte.d.cts
CHANGED
|
@@ -6,7 +6,7 @@ declare const setClient: <TMeta extends SchemaMeta = SchemaMeta>(client: Client<
|
|
|
6
6
|
declare const getClient: <TMeta extends SchemaMeta = SchemaMeta>() => Client<TMeta>;
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/create-query.svelte.d.ts
|
|
9
|
-
type CreateQueryOptions = QueryOptions & {
|
|
9
|
+
type CreateQueryOptions<T extends Artifact<'query'> = Artifact<'query'>> = QueryOptions<T> & {
|
|
10
10
|
skip?: boolean;
|
|
11
11
|
};
|
|
12
12
|
type Query<T extends Artifact<'query'>> = {
|
|
@@ -25,7 +25,29 @@ type Query<T extends Artifact<'query'>> = {
|
|
|
25
25
|
error: AggregatedError;
|
|
26
26
|
refetch: () => void;
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
type DefinedQuery<T extends Artifact<'query'>> = {
|
|
29
|
+
data: DataOf<T>;
|
|
30
|
+
loading: true;
|
|
31
|
+
error: undefined;
|
|
32
|
+
refetch: () => void;
|
|
33
|
+
} | {
|
|
34
|
+
data: DataOf<T>;
|
|
35
|
+
loading: false;
|
|
36
|
+
error: undefined;
|
|
37
|
+
refetch: () => void;
|
|
38
|
+
} | {
|
|
39
|
+
data: DataOf<T>;
|
|
40
|
+
loading: false;
|
|
41
|
+
error: AggregatedError;
|
|
42
|
+
refetch: () => void;
|
|
43
|
+
};
|
|
44
|
+
type CreateQueryFn = {
|
|
45
|
+
<T extends Artifact<'query'>>(query: T, variables: (() => VariablesOf<T>) | undefined, options: () => CreateQueryOptions<T> & {
|
|
46
|
+
initialData: DataOf<T>;
|
|
47
|
+
}): DefinedQuery<T>;
|
|
48
|
+
<T extends Artifact<'query'>>(query: T, ...[variables, options]: VariablesOf<T> extends Record<string, never> ? [undefined?, (() => CreateQueryOptions<T>)?] : [() => VariablesOf<T>, (() => CreateQueryOptions<T>)?]): Query<T>;
|
|
49
|
+
};
|
|
50
|
+
declare const createQuery: CreateQueryFn;
|
|
29
51
|
//#endregion
|
|
30
52
|
//#region src/create-subscription.svelte.d.ts
|
|
31
53
|
type Subscription<T extends Artifact<'subscription'>> = {
|
|
@@ -71,6 +93,17 @@ type CreateFragmentOptions = FragmentOptions;
|
|
|
71
93
|
type Fragment<T extends Artifact<'fragment'>> = {
|
|
72
94
|
data: DataOf<T>;
|
|
73
95
|
};
|
|
74
|
-
|
|
96
|
+
type FragmentList<T extends Artifact<'fragment'>> = {
|
|
97
|
+
data: DataOf<T>[];
|
|
98
|
+
};
|
|
99
|
+
type OptionalFragment<T extends Artifact<'fragment'>> = {
|
|
100
|
+
data: DataOf<T> | null;
|
|
101
|
+
};
|
|
102
|
+
type CreateFragmentFn = {
|
|
103
|
+
<T extends Artifact<'fragment'>>(fragment: T, fragmentRef: () => FragmentRefs<T['name']>[], options?: () => CreateFragmentOptions): FragmentList<T>;
|
|
104
|
+
<T extends Artifact<'fragment'>>(fragment: T, fragmentRef: () => FragmentRefs<T['name']>, options?: () => CreateFragmentOptions): Fragment<T>;
|
|
105
|
+
<T extends Artifact<'fragment'>>(fragment: T, fragmentRef: () => FragmentRefs<T['name']> | null | undefined, options?: () => CreateFragmentOptions): OptionalFragment<T>;
|
|
106
|
+
};
|
|
107
|
+
declare const createFragment: CreateFragmentFn;
|
|
75
108
|
//#endregion
|
|
76
|
-
export { type CreateFragmentOptions, type CreateMutationOptions, type CreateQueryOptions, type CreateSubscriptionOptions, type Fragment, type Mutation, type MutationResult, type Query, type Subscription, createFragment, createMutation, createQuery, createSubscription, getClient, setClient };
|
|
109
|
+
export { 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, getClient, setClient };
|
|
@@ -6,7 +6,7 @@ declare const setClient: <TMeta extends SchemaMeta = SchemaMeta>(client: Client<
|
|
|
6
6
|
declare const getClient: <TMeta extends SchemaMeta = SchemaMeta>() => Client<TMeta>;
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/create-query.svelte.d.ts
|
|
9
|
-
type CreateQueryOptions = QueryOptions & {
|
|
9
|
+
type CreateQueryOptions<T extends Artifact<'query'> = Artifact<'query'>> = QueryOptions<T> & {
|
|
10
10
|
skip?: boolean;
|
|
11
11
|
};
|
|
12
12
|
type Query<T extends Artifact<'query'>> = {
|
|
@@ -25,7 +25,29 @@ type Query<T extends Artifact<'query'>> = {
|
|
|
25
25
|
error: AggregatedError;
|
|
26
26
|
refetch: () => void;
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
type DefinedQuery<T extends Artifact<'query'>> = {
|
|
29
|
+
data: DataOf<T>;
|
|
30
|
+
loading: true;
|
|
31
|
+
error: undefined;
|
|
32
|
+
refetch: () => void;
|
|
33
|
+
} | {
|
|
34
|
+
data: DataOf<T>;
|
|
35
|
+
loading: false;
|
|
36
|
+
error: undefined;
|
|
37
|
+
refetch: () => void;
|
|
38
|
+
} | {
|
|
39
|
+
data: DataOf<T>;
|
|
40
|
+
loading: false;
|
|
41
|
+
error: AggregatedError;
|
|
42
|
+
refetch: () => void;
|
|
43
|
+
};
|
|
44
|
+
type CreateQueryFn = {
|
|
45
|
+
<T extends Artifact<'query'>>(query: T, variables: (() => VariablesOf<T>) | undefined, options: () => CreateQueryOptions<T> & {
|
|
46
|
+
initialData: DataOf<T>;
|
|
47
|
+
}): DefinedQuery<T>;
|
|
48
|
+
<T extends Artifact<'query'>>(query: T, ...[variables, options]: VariablesOf<T> extends Record<string, never> ? [undefined?, (() => CreateQueryOptions<T>)?] : [() => VariablesOf<T>, (() => CreateQueryOptions<T>)?]): Query<T>;
|
|
49
|
+
};
|
|
50
|
+
declare const createQuery: CreateQueryFn;
|
|
29
51
|
//#endregion
|
|
30
52
|
//#region src/create-subscription.svelte.d.ts
|
|
31
53
|
type Subscription<T extends Artifact<'subscription'>> = {
|
|
@@ -71,6 +93,17 @@ type CreateFragmentOptions = FragmentOptions;
|
|
|
71
93
|
type Fragment<T extends Artifact<'fragment'>> = {
|
|
72
94
|
data: DataOf<T>;
|
|
73
95
|
};
|
|
74
|
-
|
|
96
|
+
type FragmentList<T extends Artifact<'fragment'>> = {
|
|
97
|
+
data: DataOf<T>[];
|
|
98
|
+
};
|
|
99
|
+
type OptionalFragment<T extends Artifact<'fragment'>> = {
|
|
100
|
+
data: DataOf<T> | null;
|
|
101
|
+
};
|
|
102
|
+
type CreateFragmentFn = {
|
|
103
|
+
<T extends Artifact<'fragment'>>(fragment: T, fragmentRef: () => FragmentRefs<T['name']>[], options?: () => CreateFragmentOptions): FragmentList<T>;
|
|
104
|
+
<T extends Artifact<'fragment'>>(fragment: T, fragmentRef: () => FragmentRefs<T['name']>, options?: () => CreateFragmentOptions): Fragment<T>;
|
|
105
|
+
<T extends Artifact<'fragment'>>(fragment: T, fragmentRef: () => FragmentRefs<T['name']> | null | undefined, options?: () => CreateFragmentOptions): OptionalFragment<T>;
|
|
106
|
+
};
|
|
107
|
+
declare const createFragment: CreateFragmentFn;
|
|
75
108
|
//#endregion
|
|
76
|
-
export { type CreateFragmentOptions, type CreateMutationOptions, type CreateQueryOptions, type CreateSubscriptionOptions, type Fragment, type Mutation, type MutationResult, type Query, type Subscription, createFragment, createMutation, createQuery, createSubscription, getClient, setClient };
|
|
109
|
+
export { 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, getClient, setClient };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AggregatedError } from "@mearie/core";
|
|
2
2
|
import { getContext, setContext, untrack } from "svelte";
|
|
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 getClient = () => {
|
|
|
17
17
|
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/create-query.svelte.ts
|
|
20
|
-
const createQuery = (query,
|
|
20
|
+
const createQuery = ((query, variables, options) => {
|
|
21
21
|
const client = getClient();
|
|
22
|
-
|
|
23
|
-
let
|
|
22
|
+
const initialOpts = options?.();
|
|
23
|
+
let data = $state.raw(initialOpts?.initialData);
|
|
24
|
+
let loading = $state(!initialOpts?.skip && !initialOpts?.initialData);
|
|
24
25
|
let error = $state();
|
|
25
26
|
let unsubscribe = null;
|
|
27
|
+
let initialized = false;
|
|
26
28
|
const execute = () => {
|
|
27
29
|
unsubscribe?.();
|
|
28
30
|
if (options?.().skip) return;
|
|
29
|
-
loading = true;
|
|
31
|
+
if (!initialized && !!initialOpts?.initialData) loading = true;
|
|
32
|
+
initialized = true;
|
|
30
33
|
error = void 0;
|
|
31
34
|
unsubscribe = pipe(client.executeQuery(query, typeof variables === "function" ? variables() : void 0, options?.()), subscribe({ next: (result) => {
|
|
32
35
|
if (result.errors && result.errors.length > 0) {
|
|
@@ -59,13 +62,13 @@ const createQuery = (query, ...[variables, options]) => {
|
|
|
59
62
|
},
|
|
60
63
|
refetch
|
|
61
64
|
};
|
|
62
|
-
};
|
|
65
|
+
});
|
|
63
66
|
|
|
64
67
|
//#endregion
|
|
65
68
|
//#region src/create-subscription.svelte.ts
|
|
66
69
|
const createSubscription = (subscription, ...[variables, options]) => {
|
|
67
70
|
const client = getClient();
|
|
68
|
-
let data = $state();
|
|
71
|
+
let data = $state.raw();
|
|
69
72
|
let loading = $state(!options?.().skip);
|
|
70
73
|
let error = $state();
|
|
71
74
|
$effect(() => {
|
|
@@ -113,7 +116,7 @@ const createMutation = (mutation) => {
|
|
|
113
116
|
loading = true;
|
|
114
117
|
error = void 0;
|
|
115
118
|
try {
|
|
116
|
-
const result = await pipe(client.executeMutation(mutation, variables, options), collect);
|
|
119
|
+
const result = await pipe(client.executeMutation(mutation, variables, options), take(1), collect);
|
|
117
120
|
if (result.errors && result.errors.length > 0) {
|
|
118
121
|
const err = new AggregatedError(result.errors);
|
|
119
122
|
error = err;
|
|
@@ -144,24 +147,34 @@ const createMutation = (mutation) => {
|
|
|
144
147
|
|
|
145
148
|
//#endregion
|
|
146
149
|
//#region src/create-fragment.svelte.ts
|
|
147
|
-
const createFragment = (fragment, fragmentRef, options) => {
|
|
150
|
+
const createFragment = ((fragment, fragmentRef, options) => {
|
|
148
151
|
const client = getClient();
|
|
149
152
|
const ref = fragmentRef();
|
|
150
|
-
|
|
151
|
-
if (
|
|
152
|
-
|
|
153
|
+
let data;
|
|
154
|
+
if (ref == null) data = null;
|
|
155
|
+
else {
|
|
156
|
+
const result = pipe(client.executeFragment(fragment, $state.snapshot(ref), options?.()), peek);
|
|
157
|
+
if (result.data === void 0) throw new Error("Fragment data not found");
|
|
158
|
+
data = result.data;
|
|
159
|
+
}
|
|
160
|
+
let state = $state(data);
|
|
153
161
|
$effect(() => {
|
|
154
|
-
const
|
|
155
|
-
|
|
162
|
+
const currentRef = fragmentRef();
|
|
163
|
+
if (currentRef == null) {
|
|
164
|
+
state = null;
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const unsubscribe = pipe(client.executeFragment(fragment, $state.snapshot(currentRef), options?.()), subscribe({ next: (result) => {
|
|
168
|
+
if (result.data !== void 0) state = result.data;
|
|
156
169
|
} }));
|
|
157
170
|
return () => {
|
|
158
171
|
unsubscribe();
|
|
159
172
|
};
|
|
160
173
|
});
|
|
161
174
|
return { get data() {
|
|
162
|
-
return
|
|
175
|
+
return state;
|
|
163
176
|
} };
|
|
164
|
-
};
|
|
177
|
+
});
|
|
165
178
|
|
|
166
179
|
//#endregion
|
|
167
180
|
export { createFragment, createMutation, createQuery, createSubscription, getClient, setClient };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mearie/svelte",
|
|
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.svelte.d.mts",
|
|
33
|
+
"default": "./dist/index.svelte.mjs"
|
|
34
|
+
},
|
|
35
|
+
"require": {
|
|
36
|
+
"types": "./dist/index.svelte.d.cts",
|
|
37
|
+
"default": "./dist/index.svelte.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
|
-
"svelte": "^5.
|
|
47
|
-
"tsdown": "^0.
|
|
51
|
+
"svelte": "^5.53.3",
|
|
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.svelte.cjs",
|
|
66
|
-
"module": "./dist/index.svelte.
|
|
67
|
-
"types": "./dist/index.svelte.d.
|
|
71
|
+
"module": "./dist/index.svelte.mjs",
|
|
72
|
+
"types": "./dist/index.svelte.d.mts"
|
|
68
73
|
}
|