houdini 1.0.0-next.15 → 1.0.0-next.17
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/README.md +4 -1
- package/build/cmd-cjs/index.js +3 -3
- package/build/cmd-esm/index.js +3 -3
- package/build/codegen-cjs/index.js +1 -1
- package/build/codegen-esm/index.js +1 -1
- package/build/runtime/lib/scalars.d.ts +1 -1
- package/build/runtime/lib/types.d.ts +1 -1
- package/build/runtime-cjs/client/documentStore.js +2 -3
- package/build/runtime-cjs/client/index.js +1 -0
- package/build/runtime-cjs/client/plugins/cache.js +1 -0
- package/build/runtime-cjs/lib/scalars.d.ts +1 -1
- package/build/runtime-cjs/lib/scalars.js +13 -2
- package/build/runtime-cjs/lib/types.d.ts +1 -1
- package/build/runtime-esm/client/documentStore.js +2 -3
- package/build/runtime-esm/client/index.js +1 -0
- package/build/runtime-esm/client/plugins/cache.js +1 -0
- package/build/runtime-esm/lib/scalars.d.ts +1 -1
- package/build/runtime-esm/lib/scalars.js +13 -2
- package/build/runtime-esm/lib/types.d.ts +1 -1
- package/build/test-cjs/index.js +1 -1
- package/build/test-esm/index.js +1 -1
- package/build/vite-cjs/index.js +1 -1
- package/build/vite-esm/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HoudiniGraphql/houdini/main/.github/assetss/logo_l.svg">
|
|
4
|
+
<img height="140" alt="Houdini's logo (dark or light)" src="https://raw.githubusercontent.com/HoudiniGraphql/houdini/main/.github/assets/logo_d.svg">
|
|
5
|
+
</picture>
|
|
3
6
|
<br />
|
|
4
7
|
<br />
|
|
5
8
|
<strong>
|
package/build/cmd-cjs/index.js
CHANGED
|
@@ -73317,7 +73317,7 @@ function artifactGenerator(stats) {
|
|
|
73317
73317
|
{}
|
|
73318
73318
|
);
|
|
73319
73319
|
if (Object.keys(plugin_data).length > 0) {
|
|
73320
|
-
artifact.
|
|
73320
|
+
artifact.pluginData = plugin_data;
|
|
73321
73321
|
}
|
|
73322
73322
|
if (inputs && inputs.length > 0) {
|
|
73323
73323
|
artifact.input = inputObject(config2, inputs);
|
|
@@ -76513,8 +76513,8 @@ async function updatePackageJSON(targetPath) {
|
|
|
76513
76513
|
}
|
|
76514
76514
|
packageJSON.devDependencies = {
|
|
76515
76515
|
...packageJSON.devDependencies,
|
|
76516
|
-
houdini: "^1.0.0-next.
|
|
76517
|
-
"houdini-svelte": "^1.0.0-next.
|
|
76516
|
+
houdini: "^1.0.0-next.17",
|
|
76517
|
+
"houdini-svelte": "^1.0.0-next.17"
|
|
76518
76518
|
};
|
|
76519
76519
|
await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
|
|
76520
76520
|
}
|
package/build/cmd-esm/index.js
CHANGED
|
@@ -73322,7 +73322,7 @@ function artifactGenerator(stats) {
|
|
|
73322
73322
|
{}
|
|
73323
73323
|
);
|
|
73324
73324
|
if (Object.keys(plugin_data).length > 0) {
|
|
73325
|
-
artifact.
|
|
73325
|
+
artifact.pluginData = plugin_data;
|
|
73326
73326
|
}
|
|
73327
73327
|
if (inputs && inputs.length > 0) {
|
|
73328
73328
|
artifact.input = inputObject(config2, inputs);
|
|
@@ -76518,8 +76518,8 @@ async function updatePackageJSON(targetPath) {
|
|
|
76518
76518
|
}
|
|
76519
76519
|
packageJSON.devDependencies = {
|
|
76520
76520
|
...packageJSON.devDependencies,
|
|
76521
|
-
houdini: "^1.0.0-next.
|
|
76522
|
-
"houdini-svelte": "^1.0.0-next.
|
|
76521
|
+
houdini: "^1.0.0-next.17",
|
|
76522
|
+
"houdini-svelte": "^1.0.0-next.17"
|
|
76523
76523
|
};
|
|
76524
76524
|
await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
|
|
76525
76525
|
}
|
|
@@ -57045,7 +57045,7 @@ function artifactGenerator(stats) {
|
|
|
57045
57045
|
{}
|
|
57046
57046
|
);
|
|
57047
57047
|
if (Object.keys(plugin_data).length > 0) {
|
|
57048
|
-
artifact.
|
|
57048
|
+
artifact.pluginData = plugin_data;
|
|
57049
57049
|
}
|
|
57050
57050
|
if (inputs && inputs.length > 0) {
|
|
57051
57051
|
artifact.input = inputObject(config2, inputs);
|
|
@@ -57043,7 +57043,7 @@ function artifactGenerator(stats) {
|
|
|
57043
57043
|
{}
|
|
57044
57044
|
);
|
|
57045
57045
|
if (Object.keys(plugin_data).length > 0) {
|
|
57046
|
-
artifact.
|
|
57046
|
+
artifact.pluginData = plugin_data;
|
|
57047
57047
|
}
|
|
57048
57048
|
if (inputs && inputs.length > 0) {
|
|
57049
57049
|
artifact.input = inputObject(config2, inputs);
|
|
@@ -12,4 +12,4 @@ export declare function marshalInputs<T>({ artifact, input, config, rootType, }:
|
|
|
12
12
|
}): {} | null | undefined;
|
|
13
13
|
export declare function unmarshalSelection(config: ConfigFile, selection: SubscriptionSelection, data: any): {} | null | undefined;
|
|
14
14
|
export declare function isScalar(config: ConfigFile, type: string): boolean;
|
|
15
|
-
export declare function parseScalar(config: ConfigFile, type: string, value
|
|
15
|
+
export declare function parseScalar(config: ConfigFile, type: string, value?: string): string | number | boolean | undefined;
|
|
@@ -47,9 +47,7 @@ class DocumentStore extends import_store.Writable {
|
|
|
47
47
|
initialValue,
|
|
48
48
|
fetching
|
|
49
49
|
}) {
|
|
50
|
-
|
|
51
|
-
fetching = artifact.kind === import_types.ArtifactKind.Query;
|
|
52
|
-
}
|
|
50
|
+
fetching ??= artifact.kind === import_types.ArtifactKind.Query;
|
|
53
51
|
const initialState = {
|
|
54
52
|
data: initialValue ?? null,
|
|
55
53
|
errors: null,
|
|
@@ -203,6 +201,7 @@ class DocumentStore extends import_store.Writable {
|
|
|
203
201
|
}
|
|
204
202
|
if (direction === "forward") {
|
|
205
203
|
if (ctx.setup) {
|
|
204
|
+
console.log("going backwards - setup");
|
|
206
205
|
return this.#step(
|
|
207
206
|
"backwards",
|
|
208
207
|
{
|
|
@@ -12,4 +12,4 @@ export declare function marshalInputs<T>({ artifact, input, config, rootType, }:
|
|
|
12
12
|
}): {} | null | undefined;
|
|
13
13
|
export declare function unmarshalSelection(config: ConfigFile, selection: SubscriptionSelection, data: any): {} | null | undefined;
|
|
14
14
|
export declare function isScalar(config: ConfigFile, type: string): boolean;
|
|
15
|
-
export declare function parseScalar(config: ConfigFile, type: string, value
|
|
15
|
+
export declare function parseScalar(config: ConfigFile, type: string, value?: string): string | number | boolean | undefined;
|
|
@@ -145,6 +145,9 @@ function isScalar(config, type) {
|
|
|
145
145
|
return ["String", "Boolean", "Float", "ID", "Int"].concat(Object.keys(config.scalars || {})).includes(type);
|
|
146
146
|
}
|
|
147
147
|
function parseScalar(config, type, value) {
|
|
148
|
+
if (typeof value === "undefined") {
|
|
149
|
+
return void 0;
|
|
150
|
+
}
|
|
148
151
|
if (type === "Boolean") {
|
|
149
152
|
return value === "true";
|
|
150
153
|
}
|
|
@@ -155,10 +158,18 @@ function parseScalar(config, type, value) {
|
|
|
155
158
|
return value;
|
|
156
159
|
}
|
|
157
160
|
if (type === "Int") {
|
|
158
|
-
|
|
161
|
+
const result = parseInt(value, 10);
|
|
162
|
+
if (Number.isNaN(result)) {
|
|
163
|
+
return void 0;
|
|
164
|
+
}
|
|
165
|
+
return result;
|
|
159
166
|
}
|
|
160
167
|
if (type === "Float") {
|
|
161
|
-
|
|
168
|
+
const result = parseFloat(value);
|
|
169
|
+
if (Number.isNaN(result)) {
|
|
170
|
+
return void 0;
|
|
171
|
+
}
|
|
172
|
+
return result;
|
|
162
173
|
}
|
|
163
174
|
if (config.scalars?.[type]?.marshal) {
|
|
164
175
|
return config.scalars[type]?.marshal(value);
|
|
@@ -24,9 +24,7 @@ class DocumentStore extends Writable {
|
|
|
24
24
|
initialValue,
|
|
25
25
|
fetching
|
|
26
26
|
}) {
|
|
27
|
-
|
|
28
|
-
fetching = artifact.kind === ArtifactKind.Query;
|
|
29
|
-
}
|
|
27
|
+
fetching ??= artifact.kind === ArtifactKind.Query;
|
|
30
28
|
const initialState = {
|
|
31
29
|
data: initialValue ?? null,
|
|
32
30
|
errors: null,
|
|
@@ -180,6 +178,7 @@ class DocumentStore extends Writable {
|
|
|
180
178
|
}
|
|
181
179
|
if (direction === "forward") {
|
|
182
180
|
if (ctx.setup) {
|
|
181
|
+
console.log("going backwards - setup");
|
|
183
182
|
return this.#step(
|
|
184
183
|
"backwards",
|
|
185
184
|
{
|
|
@@ -12,4 +12,4 @@ export declare function marshalInputs<T>({ artifact, input, config, rootType, }:
|
|
|
12
12
|
}): {} | null | undefined;
|
|
13
13
|
export declare function unmarshalSelection(config: ConfigFile, selection: SubscriptionSelection, data: any): {} | null | undefined;
|
|
14
14
|
export declare function isScalar(config: ConfigFile, type: string): boolean;
|
|
15
|
-
export declare function parseScalar(config: ConfigFile, type: string, value
|
|
15
|
+
export declare function parseScalar(config: ConfigFile, type: string, value?: string): string | number | boolean | undefined;
|
|
@@ -118,6 +118,9 @@ function isScalar(config, type) {
|
|
|
118
118
|
return ["String", "Boolean", "Float", "ID", "Int"].concat(Object.keys(config.scalars || {})).includes(type);
|
|
119
119
|
}
|
|
120
120
|
function parseScalar(config, type, value) {
|
|
121
|
+
if (typeof value === "undefined") {
|
|
122
|
+
return void 0;
|
|
123
|
+
}
|
|
121
124
|
if (type === "Boolean") {
|
|
122
125
|
return value === "true";
|
|
123
126
|
}
|
|
@@ -128,10 +131,18 @@ function parseScalar(config, type, value) {
|
|
|
128
131
|
return value;
|
|
129
132
|
}
|
|
130
133
|
if (type === "Int") {
|
|
131
|
-
|
|
134
|
+
const result = parseInt(value, 10);
|
|
135
|
+
if (Number.isNaN(result)) {
|
|
136
|
+
return void 0;
|
|
137
|
+
}
|
|
138
|
+
return result;
|
|
132
139
|
}
|
|
133
140
|
if (type === "Float") {
|
|
134
|
-
|
|
141
|
+
const result = parseFloat(value);
|
|
142
|
+
if (Number.isNaN(result)) {
|
|
143
|
+
return void 0;
|
|
144
|
+
}
|
|
145
|
+
return result;
|
|
135
146
|
}
|
|
136
147
|
if (config.scalars?.[type]?.marshal) {
|
|
137
148
|
return config.scalars[type]?.marshal(value);
|
package/build/test-cjs/index.js
CHANGED
|
@@ -57392,7 +57392,7 @@ function artifactGenerator(stats) {
|
|
|
57392
57392
|
{}
|
|
57393
57393
|
);
|
|
57394
57394
|
if (Object.keys(plugin_data).length > 0) {
|
|
57395
|
-
artifact.
|
|
57395
|
+
artifact.pluginData = plugin_data;
|
|
57396
57396
|
}
|
|
57397
57397
|
if (inputs && inputs.length > 0) {
|
|
57398
57398
|
artifact.input = inputObject(config2, inputs);
|
package/build/test-esm/index.js
CHANGED
|
@@ -57387,7 +57387,7 @@ function artifactGenerator(stats) {
|
|
|
57387
57387
|
{}
|
|
57388
57388
|
);
|
|
57389
57389
|
if (Object.keys(plugin_data).length > 0) {
|
|
57390
|
-
artifact.
|
|
57390
|
+
artifact.pluginData = plugin_data;
|
|
57391
57391
|
}
|
|
57392
57392
|
if (inputs && inputs.length > 0) {
|
|
57393
57393
|
artifact.input = inputObject(config2, inputs);
|
package/build/vite-cjs/index.js
CHANGED
|
@@ -70181,7 +70181,7 @@ function artifactGenerator(stats) {
|
|
|
70181
70181
|
{}
|
|
70182
70182
|
);
|
|
70183
70183
|
if (Object.keys(plugin_data).length > 0) {
|
|
70184
|
-
artifact.
|
|
70184
|
+
artifact.pluginData = plugin_data;
|
|
70185
70185
|
}
|
|
70186
70186
|
if (inputs && inputs.length > 0) {
|
|
70187
70187
|
artifact.input = inputObject(config4, inputs);
|
package/build/vite-esm/index.js
CHANGED
|
@@ -70175,7 +70175,7 @@ function artifactGenerator(stats) {
|
|
|
70175
70175
|
{}
|
|
70176
70176
|
);
|
|
70177
70177
|
if (Object.keys(plugin_data).length > 0) {
|
|
70178
|
-
artifact.
|
|
70178
|
+
artifact.pluginData = plugin_data;
|
|
70179
70179
|
}
|
|
70180
70180
|
if (inputs && inputs.length > 0) {
|
|
70181
70181
|
artifact.input = inputObject(config4, inputs);
|