houdini 2.0.0-next.4 → 2.0.0-next.6
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/build/cmd-cjs/index.js +54 -26
- package/build/cmd-esm/index.js +54 -26
- package/build/codegen/generators/typescript/addReferencedInputTypes.d.ts +1 -1
- package/build/codegen/generators/typescript/inlineType.d.ts +2 -1
- package/build/codegen-cjs/index.js +52 -24
- package/build/codegen-esm/index.js +52 -24
- package/build/lib/typescript.d.ts +3 -3
- package/build/lib-cjs/index.js +14 -8
- package/build/lib-esm/index.js +14 -8
- package/build/runtime/router/cookies.d.ts +9 -9
- package/build/runtime/router/server.d.ts +1 -1
- package/build/runtime/router/session.d.ts +1 -0
- package/build/runtime-cjs/client/index.js +1 -1
- package/build/runtime-cjs/router/cookies.d.ts +9 -9
- package/build/runtime-cjs/router/cookies.js +1 -1
- package/build/runtime-cjs/router/server.d.ts +1 -1
- package/build/runtime-cjs/router/server.js +19 -9
- package/build/runtime-cjs/router/session.d.ts +1 -0
- package/build/runtime-cjs/router/session.js +4 -2
- package/build/runtime-esm/client/index.js +1 -1
- package/build/runtime-esm/router/cookies.d.ts +9 -9
- package/build/runtime-esm/router/cookies.js +1 -1
- package/build/runtime-esm/router/server.d.ts +1 -1
- package/build/runtime-esm/router/server.js +20 -10
- package/build/runtime-esm/router/session.d.ts +1 -0
- package/build/runtime-esm/router/session.js +2 -1
- package/build/test-cjs/index.js +52 -24
- package/build/test-esm/index.js +52 -24
- package/build/vite-cjs/index.js +54 -25
- package/build/vite-esm/index.js +54 -25
- package/package.json +1 -1
package/build/vite-esm/index.js
CHANGED
|
@@ -73019,7 +73019,8 @@ async function load_manifest(args) {
|
|
|
73019
73019
|
const name = child.isDirectory() ? child.name : parse3(child.name).name;
|
|
73020
73020
|
if (name === "+schema") {
|
|
73021
73021
|
manifest.local_schema = true;
|
|
73022
|
-
}
|
|
73022
|
+
}
|
|
73023
|
+
if (name === "+yoga") {
|
|
73023
73024
|
manifest.local_yoga = true;
|
|
73024
73025
|
}
|
|
73025
73026
|
}
|
|
@@ -76736,10 +76737,10 @@ var AST3 = recast2.types.builders;
|
|
|
76736
76737
|
function unwrappedTsTypeReference(config2, filepath, missingScalars, {
|
|
76737
76738
|
type,
|
|
76738
76739
|
wrappers
|
|
76739
|
-
}, body) {
|
|
76740
|
+
}, body, input) {
|
|
76740
76741
|
let result;
|
|
76741
76742
|
if (graphql6.isScalarType(type)) {
|
|
76742
|
-
result = scalarPropertyValue(config2, filepath, missingScalars, type, body, null);
|
|
76743
|
+
result = scalarPropertyValue(config2, filepath, missingScalars, type, body, null, input);
|
|
76743
76744
|
} else if (graphql6.isEnumType(type)) {
|
|
76744
76745
|
result = enumReference(config2, body, type.name);
|
|
76745
76746
|
} else {
|
|
@@ -76756,14 +76757,15 @@ function unwrappedTsTypeReference(config2, filepath, missingScalars, {
|
|
|
76756
76757
|
}
|
|
76757
76758
|
return result;
|
|
76758
76759
|
}
|
|
76759
|
-
function tsTypeReference(config2, filepath, missingScalars, definition, body) {
|
|
76760
|
+
function tsTypeReference(config2, filepath, missingScalars, definition, body, input) {
|
|
76760
76761
|
const { type, wrappers } = unwrapType(config2, definition.type);
|
|
76761
76762
|
return unwrappedTsTypeReference(
|
|
76762
76763
|
config2,
|
|
76763
76764
|
filepath,
|
|
76764
76765
|
missingScalars,
|
|
76765
76766
|
{ type, wrappers },
|
|
76766
|
-
body
|
|
76767
|
+
body,
|
|
76768
|
+
input
|
|
76767
76769
|
);
|
|
76768
76770
|
}
|
|
76769
76771
|
function enumReference(config2, body, name) {
|
|
@@ -76792,7 +76794,7 @@ function nullableField(inner, input = false) {
|
|
|
76792
76794
|
}
|
|
76793
76795
|
return AST3.tsUnionType(members);
|
|
76794
76796
|
}
|
|
76795
|
-
function scalarPropertyValue(config2, filepath, missingScalars, target, body, field) {
|
|
76797
|
+
function scalarPropertyValue(config2, filepath, missingScalars, target, body, field, input) {
|
|
76796
76798
|
if (config2.configFile.features?.componentFields && target.name === config2.componentScalar) {
|
|
76797
76799
|
if (!field) {
|
|
76798
76800
|
return AST3.tsNeverKeyword();
|
|
@@ -76851,6 +76853,9 @@ function scalarPropertyValue(config2, filepath, missingScalars, target, body, fi
|
|
|
76851
76853
|
return AST3.tsBooleanKeyword();
|
|
76852
76854
|
}
|
|
76853
76855
|
case "ID": {
|
|
76856
|
+
if (input) {
|
|
76857
|
+
return AST3.tsUnionType([AST3.tsStringKeyword(), AST3.tsNumberKeyword()]);
|
|
76858
|
+
}
|
|
76854
76859
|
return AST3.tsStringKeyword();
|
|
76855
76860
|
}
|
|
76856
76861
|
default: {
|
|
@@ -76861,7 +76866,8 @@ function scalarPropertyValue(config2, filepath, missingScalars, target, body, fi
|
|
|
76861
76866
|
missingScalars,
|
|
76862
76867
|
target.ofType,
|
|
76863
76868
|
body,
|
|
76864
|
-
field
|
|
76869
|
+
field,
|
|
76870
|
+
input
|
|
76865
76871
|
);
|
|
76866
76872
|
}
|
|
76867
76873
|
if (config2.scalars?.[target.name]) {
|
|
@@ -80006,7 +80012,7 @@ var recast11 = __toESM(require_main2(), 1);
|
|
|
80006
80012
|
var recast7 = __toESM(require_main2(), 1);
|
|
80007
80013
|
import * as graphql19 from "graphql";
|
|
80008
80014
|
var AST8 = recast7.types.builders;
|
|
80009
|
-
function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingScalars, rootType) {
|
|
80015
|
+
function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingScalars, rootType, input) {
|
|
80010
80016
|
const { type } = unwrapType(config2, rootType);
|
|
80011
80017
|
if (graphql19.isScalarType(type)) {
|
|
80012
80018
|
return;
|
|
@@ -80031,12 +80037,20 @@ function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingS
|
|
|
80031
80037
|
}
|
|
80032
80038
|
const members = [];
|
|
80033
80039
|
for (const field of Object.values(type.getFields())) {
|
|
80034
|
-
addReferencedInputTypes(
|
|
80040
|
+
addReferencedInputTypes(
|
|
80041
|
+
config2,
|
|
80042
|
+
filepath,
|
|
80043
|
+
body,
|
|
80044
|
+
visitedTypes,
|
|
80045
|
+
missingScalars,
|
|
80046
|
+
field.type,
|
|
80047
|
+
input
|
|
80048
|
+
);
|
|
80035
80049
|
members.push(
|
|
80036
80050
|
AST8.tsPropertySignature(
|
|
80037
80051
|
AST8.identifier(field.name),
|
|
80038
80052
|
AST8.tsTypeAnnotation(
|
|
80039
|
-
tsTypeReference(config2, filepath, missingScalars, field, body)
|
|
80053
|
+
tsTypeReference(config2, filepath, missingScalars, field, body, input)
|
|
80040
80054
|
),
|
|
80041
80055
|
graphql19.isNullableType(field.type)
|
|
80042
80056
|
)
|
|
@@ -80079,7 +80093,8 @@ function inlineType({
|
|
|
80079
80093
|
includeFragments,
|
|
80080
80094
|
allOptional,
|
|
80081
80095
|
forceNonNull,
|
|
80082
|
-
field
|
|
80096
|
+
field,
|
|
80097
|
+
input
|
|
80083
80098
|
}) {
|
|
80084
80099
|
const { type, wrappers } = unwrapType(config2, rootType);
|
|
80085
80100
|
let result;
|
|
@@ -80091,7 +80106,8 @@ function inlineType({
|
|
|
80091
80106
|
missingScalars,
|
|
80092
80107
|
type,
|
|
80093
80108
|
body,
|
|
80094
|
-
field
|
|
80109
|
+
field,
|
|
80110
|
+
input
|
|
80095
80111
|
);
|
|
80096
80112
|
} else if (graphql20.isEnumType(type)) {
|
|
80097
80113
|
ensureImports({
|
|
@@ -80199,7 +80215,8 @@ function inlineType({
|
|
|
80199
80215
|
field: {
|
|
80200
80216
|
field: attributeName,
|
|
80201
80217
|
parent: type.name
|
|
80202
|
-
}
|
|
80218
|
+
},
|
|
80219
|
+
input
|
|
80203
80220
|
});
|
|
80204
80221
|
const hasIncludeOrSkipDirective = selection.directives && selection.directives.filter(
|
|
80205
80222
|
(directive) => directive.name.value === "include" || directive.name.value === "skip"
|
|
@@ -80263,7 +80280,8 @@ function inlineType({
|
|
|
80263
80280
|
missingScalars,
|
|
80264
80281
|
includeFragments,
|
|
80265
80282
|
allOptional,
|
|
80266
|
-
field: null
|
|
80283
|
+
field: null,
|
|
80284
|
+
input: false
|
|
80267
80285
|
});
|
|
80268
80286
|
let objectType = fragmentType;
|
|
80269
80287
|
if (fragmentType.type === "TSUnionType") {
|
|
@@ -80728,7 +80746,8 @@ async function generateOperationTypeDefs(config2, filepath, document, body, defi
|
|
|
80728
80746
|
body,
|
|
80729
80747
|
missingScalars,
|
|
80730
80748
|
includeFragments: true,
|
|
80731
|
-
field: null
|
|
80749
|
+
field: null,
|
|
80750
|
+
input: false
|
|
80732
80751
|
});
|
|
80733
80752
|
if (artifact.kind === "HoudiniQuery") {
|
|
80734
80753
|
resultType = withLoadingState({
|
|
@@ -80777,7 +80796,8 @@ async function generateOperationTypeDefs(config2, filepath, document, body, defi
|
|
|
80777
80796
|
body,
|
|
80778
80797
|
visitedTypes,
|
|
80779
80798
|
missingScalars,
|
|
80780
|
-
variableDefinition.type
|
|
80799
|
+
variableDefinition.type,
|
|
80800
|
+
true
|
|
80781
80801
|
);
|
|
80782
80802
|
}
|
|
80783
80803
|
body.push(
|
|
@@ -80795,7 +80815,8 @@ async function generateOperationTypeDefs(config2, filepath, document, body, defi
|
|
|
80795
80815
|
filepath,
|
|
80796
80816
|
missingScalars,
|
|
80797
80817
|
definition2,
|
|
80798
|
-
body
|
|
80818
|
+
body,
|
|
80819
|
+
true
|
|
80799
80820
|
)
|
|
80800
80821
|
),
|
|
80801
80822
|
definition2.type.kind !== "NonNullType"
|
|
@@ -80830,7 +80851,8 @@ async function generateOperationTypeDefs(config2, filepath, document, body, defi
|
|
|
80830
80851
|
missingScalars,
|
|
80831
80852
|
includeFragments: false,
|
|
80832
80853
|
allOptional: true,
|
|
80833
|
-
field: null
|
|
80854
|
+
field: null,
|
|
80855
|
+
input: false
|
|
80834
80856
|
})
|
|
80835
80857
|
)
|
|
80836
80858
|
)
|
|
@@ -80863,7 +80885,8 @@ async function generateFragmentTypeDefs(config2, filepath, body, selections, def
|
|
|
80863
80885
|
filepath,
|
|
80864
80886
|
missingScalars,
|
|
80865
80887
|
definition2,
|
|
80866
|
-
body
|
|
80888
|
+
body,
|
|
80889
|
+
false
|
|
80867
80890
|
)
|
|
80868
80891
|
),
|
|
80869
80892
|
definition2.type.kind !== "NonNullType"
|
|
@@ -80926,7 +80949,8 @@ async function generateFragmentTypeDefs(config2, filepath, body, selections, def
|
|
|
80926
80949
|
visitedTypes,
|
|
80927
80950
|
missingScalars,
|
|
80928
80951
|
includeFragments: true,
|
|
80929
|
-
field: null
|
|
80952
|
+
field: null,
|
|
80953
|
+
input: false
|
|
80930
80954
|
})
|
|
80931
80955
|
})
|
|
80932
80956
|
)
|
|
@@ -81022,7 +81046,8 @@ function typeDefinitions(config2, filepath, body, docs, returnType) {
|
|
|
81022
81046
|
{
|
|
81023
81047
|
field: key,
|
|
81024
81048
|
parent: type.name
|
|
81025
|
-
}
|
|
81049
|
+
},
|
|
81050
|
+
false
|
|
81026
81051
|
)
|
|
81027
81052
|
)
|
|
81028
81053
|
);
|
|
@@ -81049,7 +81074,8 @@ function typeDefinitions(config2, filepath, body, docs, returnType) {
|
|
|
81049
81074
|
{
|
|
81050
81075
|
field: key,
|
|
81051
81076
|
parent: type.name
|
|
81052
|
-
}
|
|
81077
|
+
},
|
|
81078
|
+
false
|
|
81053
81079
|
)
|
|
81054
81080
|
);
|
|
81055
81081
|
} else if (graphql21.isEnumType(unwrapped.type)) {
|
|
@@ -81087,7 +81113,8 @@ function typeDefinitions(config2, filepath, body, docs, returnType) {
|
|
|
81087
81113
|
body,
|
|
81088
81114
|
visitedTypes,
|
|
81089
81115
|
/* @__PURE__ */ new Set(),
|
|
81090
|
-
arg.type
|
|
81116
|
+
arg.type,
|
|
81117
|
+
true
|
|
81091
81118
|
);
|
|
81092
81119
|
const prop = AST13.tsPropertySignature(
|
|
81093
81120
|
AST13.identifier(arg.name),
|
|
@@ -81097,7 +81124,8 @@ function typeDefinitions(config2, filepath, body, docs, returnType) {
|
|
|
81097
81124
|
filepath,
|
|
81098
81125
|
/* @__PURE__ */ new Set(),
|
|
81099
81126
|
arg,
|
|
81100
|
-
body
|
|
81127
|
+
body,
|
|
81128
|
+
graphql21.isInputType(arg.type)
|
|
81101
81129
|
)
|
|
81102
81130
|
)
|
|
81103
81131
|
);
|
|
@@ -81209,7 +81237,8 @@ function listDefinitions(config2, filepath, body, docs) {
|
|
|
81209
81237
|
filepath,
|
|
81210
81238
|
/* @__PURE__ */ new Set(),
|
|
81211
81239
|
arg,
|
|
81212
|
-
body
|
|
81240
|
+
body,
|
|
81241
|
+
graphql21.isInputType(arg.type)
|
|
81213
81242
|
)
|
|
81214
81243
|
)
|
|
81215
81244
|
);
|