houdini-react 1.2.8 → 1.2.9
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/plugin-cjs/index.js +204 -200
- package/build/plugin-esm/index.js +204 -200
- package/build/server-cjs/index.js +204 -200
- package/build/server-esm/index.js +204 -200
- package/package.json +2 -2
|
@@ -50545,25 +50545,25 @@ var require_definition = __commonJS2({
|
|
|
50545
50545
|
return arr && arr.length > 0 ? arr : void 0;
|
|
50546
50546
|
}
|
|
50547
50547
|
var GraphQLScalarType4 = /* @__PURE__ */ function() {
|
|
50548
|
-
function GraphQLScalarType5(
|
|
50548
|
+
function GraphQLScalarType5(config2) {
|
|
50549
50549
|
var _config$parseValue, _config$serialize, _config$parseLiteral;
|
|
50550
|
-
var parseValue = (_config$parseValue =
|
|
50551
|
-
this.name =
|
|
50552
|
-
this.description =
|
|
50553
|
-
this.specifiedByUrl =
|
|
50554
|
-
this.serialize = (_config$serialize =
|
|
50550
|
+
var parseValue = (_config$parseValue = config2.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : _identityFunc.default;
|
|
50551
|
+
this.name = config2.name;
|
|
50552
|
+
this.description = config2.description;
|
|
50553
|
+
this.specifiedByUrl = config2.specifiedByUrl;
|
|
50554
|
+
this.serialize = (_config$serialize = config2.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : _identityFunc.default;
|
|
50555
50555
|
this.parseValue = parseValue;
|
|
50556
|
-
this.parseLiteral = (_config$parseLiteral =
|
|
50556
|
+
this.parseLiteral = (_config$parseLiteral = config2.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : function(node, variables) {
|
|
50557
50557
|
return parseValue((0, _valueFromASTUntyped.valueFromASTUntyped)(node, variables));
|
|
50558
50558
|
};
|
|
50559
|
-
this.extensions =
|
|
50560
|
-
this.astNode =
|
|
50561
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
50562
|
-
typeof
|
|
50563
|
-
|
|
50564
|
-
|
|
50565
|
-
if (
|
|
50566
|
-
typeof
|
|
50559
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
50560
|
+
this.astNode = config2.astNode;
|
|
50561
|
+
this.extensionASTNodes = undefineIfEmpty(config2.extensionASTNodes);
|
|
50562
|
+
typeof config2.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
50563
|
+
config2.specifiedByUrl == null || typeof config2.specifiedByUrl === "string" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "specifiedByUrl" as a string, ') + "but got: ".concat((0, _inspect.default)(config2.specifiedByUrl), "."));
|
|
50564
|
+
config2.serialize == null || typeof config2.serialize === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.'));
|
|
50565
|
+
if (config2.parseLiteral) {
|
|
50566
|
+
typeof config2.parseValue === "function" && typeof config2.parseLiteral === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide both "parseValue" and "parseLiteral" functions.'));
|
|
50567
50567
|
}
|
|
50568
50568
|
}
|
|
50569
50569
|
var _proto = GraphQLScalarType5.prototype;
|
|
@@ -50598,17 +50598,17 @@ var require_definition = __commonJS2({
|
|
|
50598
50598
|
exports.GraphQLScalarType = GraphQLScalarType4;
|
|
50599
50599
|
(0, _defineInspect.default)(GraphQLScalarType4);
|
|
50600
50600
|
var GraphQLObjectType5 = /* @__PURE__ */ function() {
|
|
50601
|
-
function GraphQLObjectType6(
|
|
50602
|
-
this.name =
|
|
50603
|
-
this.description =
|
|
50604
|
-
this.isTypeOf =
|
|
50605
|
-
this.extensions =
|
|
50606
|
-
this.astNode =
|
|
50607
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
50608
|
-
this._fields = defineFieldMap.bind(void 0,
|
|
50609
|
-
this._interfaces = defineInterfaces.bind(void 0,
|
|
50610
|
-
typeof
|
|
50611
|
-
|
|
50601
|
+
function GraphQLObjectType6(config2) {
|
|
50602
|
+
this.name = config2.name;
|
|
50603
|
+
this.description = config2.description;
|
|
50604
|
+
this.isTypeOf = config2.isTypeOf;
|
|
50605
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
50606
|
+
this.astNode = config2.astNode;
|
|
50607
|
+
this.extensionASTNodes = undefineIfEmpty(config2.extensionASTNodes);
|
|
50608
|
+
this._fields = defineFieldMap.bind(void 0, config2);
|
|
50609
|
+
this._interfaces = defineInterfaces.bind(void 0, config2);
|
|
50610
|
+
typeof config2.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
50611
|
+
config2.isTypeOf == null || typeof config2.isTypeOf === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "isTypeOf" as a function, ') + "but got: ".concat((0, _inspect.default)(config2.isTypeOf), "."));
|
|
50612
50612
|
}
|
|
50613
50613
|
var _proto2 = GraphQLObjectType6.prototype;
|
|
50614
50614
|
_proto2.getFields = function getFields() {
|
|
@@ -50651,22 +50651,22 @@ var require_definition = __commonJS2({
|
|
|
50651
50651
|
}();
|
|
50652
50652
|
exports.GraphQLObjectType = GraphQLObjectType5;
|
|
50653
50653
|
(0, _defineInspect.default)(GraphQLObjectType5);
|
|
50654
|
-
function defineInterfaces(
|
|
50654
|
+
function defineInterfaces(config2) {
|
|
50655
50655
|
var _resolveThunk;
|
|
50656
|
-
var interfaces = (_resolveThunk = resolveThunk(
|
|
50657
|
-
Array.isArray(interfaces) || (0, _devAssert.default)(0, "".concat(
|
|
50656
|
+
var interfaces = (_resolveThunk = resolveThunk(config2.interfaces)) !== null && _resolveThunk !== void 0 ? _resolveThunk : [];
|
|
50657
|
+
Array.isArray(interfaces) || (0, _devAssert.default)(0, "".concat(config2.name, " interfaces must be an Array or a function which returns an Array."));
|
|
50658
50658
|
return interfaces;
|
|
50659
50659
|
}
|
|
50660
|
-
function defineFieldMap(
|
|
50661
|
-
var fieldMap = resolveThunk(
|
|
50662
|
-
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(
|
|
50660
|
+
function defineFieldMap(config2) {
|
|
50661
|
+
var fieldMap = resolveThunk(config2.fields);
|
|
50662
|
+
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(config2.name, " fields must be an object with field names as keys or a function which returns such an object."));
|
|
50663
50663
|
return (0, _mapValue.default)(fieldMap, function(fieldConfig, fieldName) {
|
|
50664
50664
|
var _fieldConfig$args;
|
|
50665
|
-
isPlainObj(fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
50666
|
-
!("isDeprecated" in fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
50667
|
-
fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || (0, _devAssert.default)(0, "".concat(
|
|
50665
|
+
isPlainObj(fieldConfig) || (0, _devAssert.default)(0, "".concat(config2.name, ".").concat(fieldName, " field config must be an object."));
|
|
50666
|
+
!("isDeprecated" in fieldConfig) || (0, _devAssert.default)(0, "".concat(config2.name, ".").concat(fieldName, ' should provide "deprecationReason" instead of "isDeprecated".'));
|
|
50667
|
+
fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || (0, _devAssert.default)(0, "".concat(config2.name, ".").concat(fieldName, " field resolver must be a function if ") + "provided, but got: ".concat((0, _inspect.default)(fieldConfig.resolve), "."));
|
|
50668
50668
|
var argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {};
|
|
50669
|
-
isPlainObj(argsConfig) || (0, _devAssert.default)(0, "".concat(
|
|
50669
|
+
isPlainObj(argsConfig) || (0, _devAssert.default)(0, "".concat(config2.name, ".").concat(fieldName, " args must be an object with argument names as keys."));
|
|
50670
50670
|
var args = (0, _objectEntries.default)(argsConfig).map(function(_ref) {
|
|
50671
50671
|
var argName = _ref[0], argConfig = _ref[1];
|
|
50672
50672
|
return {
|
|
@@ -50728,17 +50728,17 @@ var require_definition = __commonJS2({
|
|
|
50728
50728
|
return isNonNullType6(arg.type) && arg.defaultValue === void 0;
|
|
50729
50729
|
}
|
|
50730
50730
|
var GraphQLInterfaceType5 = /* @__PURE__ */ function() {
|
|
50731
|
-
function GraphQLInterfaceType6(
|
|
50732
|
-
this.name =
|
|
50733
|
-
this.description =
|
|
50734
|
-
this.resolveType =
|
|
50735
|
-
this.extensions =
|
|
50736
|
-
this.astNode =
|
|
50737
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
50738
|
-
this._fields = defineFieldMap.bind(void 0,
|
|
50739
|
-
this._interfaces = defineInterfaces.bind(void 0,
|
|
50740
|
-
typeof
|
|
50741
|
-
|
|
50731
|
+
function GraphQLInterfaceType6(config2) {
|
|
50732
|
+
this.name = config2.name;
|
|
50733
|
+
this.description = config2.description;
|
|
50734
|
+
this.resolveType = config2.resolveType;
|
|
50735
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
50736
|
+
this.astNode = config2.astNode;
|
|
50737
|
+
this.extensionASTNodes = undefineIfEmpty(config2.extensionASTNodes);
|
|
50738
|
+
this._fields = defineFieldMap.bind(void 0, config2);
|
|
50739
|
+
this._interfaces = defineInterfaces.bind(void 0, config2);
|
|
50740
|
+
typeof config2.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
50741
|
+
config2.resolveType == null || typeof config2.resolveType === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "resolveType" as a function, ') + "but got: ".concat((0, _inspect.default)(config2.resolveType), "."));
|
|
50742
50742
|
}
|
|
50743
50743
|
var _proto3 = GraphQLInterfaceType6.prototype;
|
|
50744
50744
|
_proto3.getFields = function getFields() {
|
|
@@ -50783,16 +50783,16 @@ var require_definition = __commonJS2({
|
|
|
50783
50783
|
exports.GraphQLInterfaceType = GraphQLInterfaceType5;
|
|
50784
50784
|
(0, _defineInspect.default)(GraphQLInterfaceType5);
|
|
50785
50785
|
var GraphQLUnionType3 = /* @__PURE__ */ function() {
|
|
50786
|
-
function GraphQLUnionType4(
|
|
50787
|
-
this.name =
|
|
50788
|
-
this.description =
|
|
50789
|
-
this.resolveType =
|
|
50790
|
-
this.extensions =
|
|
50791
|
-
this.astNode =
|
|
50792
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
50793
|
-
this._types = defineTypes.bind(void 0,
|
|
50794
|
-
typeof
|
|
50795
|
-
|
|
50786
|
+
function GraphQLUnionType4(config2) {
|
|
50787
|
+
this.name = config2.name;
|
|
50788
|
+
this.description = config2.description;
|
|
50789
|
+
this.resolveType = config2.resolveType;
|
|
50790
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
50791
|
+
this.astNode = config2.astNode;
|
|
50792
|
+
this.extensionASTNodes = undefineIfEmpty(config2.extensionASTNodes);
|
|
50793
|
+
this._types = defineTypes.bind(void 0, config2);
|
|
50794
|
+
typeof config2.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
50795
|
+
config2.resolveType == null || typeof config2.resolveType === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "resolveType" as a function, ') + "but got: ".concat((0, _inspect.default)(config2.resolveType), "."));
|
|
50796
50796
|
}
|
|
50797
50797
|
var _proto4 = GraphQLUnionType4.prototype;
|
|
50798
50798
|
_proto4.getTypes = function getTypes() {
|
|
@@ -50829,26 +50829,26 @@ var require_definition = __commonJS2({
|
|
|
50829
50829
|
}();
|
|
50830
50830
|
exports.GraphQLUnionType = GraphQLUnionType3;
|
|
50831
50831
|
(0, _defineInspect.default)(GraphQLUnionType3);
|
|
50832
|
-
function defineTypes(
|
|
50833
|
-
var types4 = resolveThunk(
|
|
50834
|
-
Array.isArray(types4) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(
|
|
50832
|
+
function defineTypes(config2) {
|
|
50833
|
+
var types4 = resolveThunk(config2.types);
|
|
50834
|
+
Array.isArray(types4) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(config2.name, "."));
|
|
50835
50835
|
return types4;
|
|
50836
50836
|
}
|
|
50837
50837
|
var GraphQLEnumType4 = /* @__PURE__ */ function() {
|
|
50838
|
-
function GraphQLEnumType5(
|
|
50839
|
-
this.name =
|
|
50840
|
-
this.description =
|
|
50841
|
-
this.extensions =
|
|
50842
|
-
this.astNode =
|
|
50843
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
50844
|
-
this._values = defineEnumValues(this.name,
|
|
50838
|
+
function GraphQLEnumType5(config2) {
|
|
50839
|
+
this.name = config2.name;
|
|
50840
|
+
this.description = config2.description;
|
|
50841
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
50842
|
+
this.astNode = config2.astNode;
|
|
50843
|
+
this.extensionASTNodes = undefineIfEmpty(config2.extensionASTNodes);
|
|
50844
|
+
this._values = defineEnumValues(this.name, config2.values);
|
|
50845
50845
|
this._valueLookup = new Map(this._values.map(function(enumValue) {
|
|
50846
50846
|
return [enumValue.value, enumValue];
|
|
50847
50847
|
}));
|
|
50848
50848
|
this._nameLookup = (0, _keyMap.default)(this._values, function(value) {
|
|
50849
50849
|
return value.name;
|
|
50850
50850
|
});
|
|
50851
|
-
typeof
|
|
50851
|
+
typeof config2.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
50852
50852
|
}
|
|
50853
50853
|
var _proto5 = GraphQLEnumType5.prototype;
|
|
50854
50854
|
_proto5.getValues = function getValues() {
|
|
@@ -50950,14 +50950,14 @@ var require_definition = __commonJS2({
|
|
|
50950
50950
|
});
|
|
50951
50951
|
}
|
|
50952
50952
|
var GraphQLInputObjectType4 = /* @__PURE__ */ function() {
|
|
50953
|
-
function GraphQLInputObjectType5(
|
|
50954
|
-
this.name =
|
|
50955
|
-
this.description =
|
|
50956
|
-
this.extensions =
|
|
50957
|
-
this.astNode =
|
|
50958
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
50959
|
-
this._fields = defineInputFieldMap.bind(void 0,
|
|
50960
|
-
typeof
|
|
50953
|
+
function GraphQLInputObjectType5(config2) {
|
|
50954
|
+
this.name = config2.name;
|
|
50955
|
+
this.description = config2.description;
|
|
50956
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
50957
|
+
this.astNode = config2.astNode;
|
|
50958
|
+
this.extensionASTNodes = undefineIfEmpty(config2.extensionASTNodes);
|
|
50959
|
+
this._fields = defineInputFieldMap.bind(void 0, config2);
|
|
50960
|
+
typeof config2.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
50961
50961
|
}
|
|
50962
50962
|
var _proto6 = GraphQLInputObjectType5.prototype;
|
|
50963
50963
|
_proto6.getFields = function getFields() {
|
|
@@ -51003,11 +51003,11 @@ var require_definition = __commonJS2({
|
|
|
51003
51003
|
}();
|
|
51004
51004
|
exports.GraphQLInputObjectType = GraphQLInputObjectType4;
|
|
51005
51005
|
(0, _defineInspect.default)(GraphQLInputObjectType4);
|
|
51006
|
-
function defineInputFieldMap(
|
|
51007
|
-
var fieldMap = resolveThunk(
|
|
51008
|
-
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(
|
|
51006
|
+
function defineInputFieldMap(config2) {
|
|
51007
|
+
var fieldMap = resolveThunk(config2.fields);
|
|
51008
|
+
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(config2.name, " fields must be an object with field names as keys or a function which returns such an object."));
|
|
51009
51009
|
return (0, _mapValue.default)(fieldMap, function(fieldConfig, fieldName) {
|
|
51010
|
-
!("resolve" in fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
51010
|
+
!("resolve" in fieldConfig) || (0, _devAssert.default)(0, "".concat(config2.name, ".").concat(fieldName, " field has a resolve property, but Input Types cannot define resolvers."));
|
|
51011
51011
|
return {
|
|
51012
51012
|
name: fieldName,
|
|
51013
51013
|
description: fieldConfig.description,
|
|
@@ -52186,18 +52186,18 @@ var require_directives = __commonJS2({
|
|
|
52186
52186
|
return directive;
|
|
52187
52187
|
}
|
|
52188
52188
|
var GraphQLDirective2 = /* @__PURE__ */ function() {
|
|
52189
|
-
function GraphQLDirective3(
|
|
52189
|
+
function GraphQLDirective3(config2) {
|
|
52190
52190
|
var _config$isRepeatable, _config$args;
|
|
52191
|
-
this.name =
|
|
52192
|
-
this.description =
|
|
52193
|
-
this.locations =
|
|
52194
|
-
this.isRepeatable = (_config$isRepeatable =
|
|
52195
|
-
this.extensions =
|
|
52196
|
-
this.astNode =
|
|
52197
|
-
|
|
52198
|
-
Array.isArray(
|
|
52199
|
-
var args = (_config$args =
|
|
52200
|
-
(0, _isObjectLike.default)(args) && !Array.isArray(args) || (0, _devAssert.default)(0, "@".concat(
|
|
52191
|
+
this.name = config2.name;
|
|
52192
|
+
this.description = config2.description;
|
|
52193
|
+
this.locations = config2.locations;
|
|
52194
|
+
this.isRepeatable = (_config$isRepeatable = config2.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false;
|
|
52195
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
52196
|
+
this.astNode = config2.astNode;
|
|
52197
|
+
config2.name || (0, _devAssert.default)(0, "Directive must be named.");
|
|
52198
|
+
Array.isArray(config2.locations) || (0, _devAssert.default)(0, "@".concat(config2.name, " locations must be an Array."));
|
|
52199
|
+
var args = (_config$args = config2.args) !== null && _config$args !== void 0 ? _config$args : {};
|
|
52200
|
+
(0, _isObjectLike.default)(args) && !Array.isArray(args) || (0, _devAssert.default)(0, "@".concat(config2.name, " args must be an object with argument names as keys."));
|
|
52201
52201
|
this.args = (0, _objectEntries.default)(args).map(function(_ref) {
|
|
52202
52202
|
var argName = _ref[0], argConfig = _ref[1];
|
|
52203
52203
|
return {
|
|
@@ -52351,23 +52351,23 @@ var require_schema = __commonJS2({
|
|
|
52351
52351
|
return schema;
|
|
52352
52352
|
}
|
|
52353
52353
|
var GraphQLSchema2 = /* @__PURE__ */ function() {
|
|
52354
|
-
function GraphQLSchema3(
|
|
52354
|
+
function GraphQLSchema3(config2) {
|
|
52355
52355
|
var _config$directives;
|
|
52356
|
-
this.__validationErrors =
|
|
52357
|
-
(0, _isObjectLike.default)(
|
|
52358
|
-
!
|
|
52359
|
-
!
|
|
52360
|
-
this.description =
|
|
52361
|
-
this.extensions =
|
|
52362
|
-
this.astNode =
|
|
52363
|
-
this.extensionASTNodes =
|
|
52364
|
-
this._queryType =
|
|
52365
|
-
this._mutationType =
|
|
52366
|
-
this._subscriptionType =
|
|
52367
|
-
this._directives = (_config$directives =
|
|
52368
|
-
var allReferencedTypes = new Set(
|
|
52369
|
-
if (
|
|
52370
|
-
for (var _i2 = 0, _config$types2 =
|
|
52356
|
+
this.__validationErrors = config2.assumeValid === true ? [] : void 0;
|
|
52357
|
+
(0, _isObjectLike.default)(config2) || (0, _devAssert.default)(0, "Must provide configuration object.");
|
|
52358
|
+
!config2.types || Array.isArray(config2.types) || (0, _devAssert.default)(0, '"types" must be Array if provided but got: '.concat((0, _inspect.default)(config2.types), "."));
|
|
52359
|
+
!config2.directives || Array.isArray(config2.directives) || (0, _devAssert.default)(0, '"directives" must be Array if provided but got: ' + "".concat((0, _inspect.default)(config2.directives), "."));
|
|
52360
|
+
this.description = config2.description;
|
|
52361
|
+
this.extensions = config2.extensions && (0, _toObjMap.default)(config2.extensions);
|
|
52362
|
+
this.astNode = config2.astNode;
|
|
52363
|
+
this.extensionASTNodes = config2.extensionASTNodes;
|
|
52364
|
+
this._queryType = config2.query;
|
|
52365
|
+
this._mutationType = config2.mutation;
|
|
52366
|
+
this._subscriptionType = config2.subscription;
|
|
52367
|
+
this._directives = (_config$directives = config2.directives) !== null && _config$directives !== void 0 ? _config$directives : _directives.specifiedDirectives;
|
|
52368
|
+
var allReferencedTypes = new Set(config2.types);
|
|
52369
|
+
if (config2.types != null) {
|
|
52370
|
+
for (var _i2 = 0, _config$types2 = config2.types; _i2 < _config$types2.length; _i2++) {
|
|
52371
52371
|
var type = _config$types2[_i2];
|
|
52372
52372
|
allReferencedTypes.delete(type);
|
|
52373
52373
|
collectReferencedTypes(type, allReferencedTypes);
|
|
@@ -58557,9 +58557,9 @@ var require_extendSchema = __commonJS2({
|
|
|
58557
58557
|
return typeMap[type.name];
|
|
58558
58558
|
}
|
|
58559
58559
|
function replaceDirective(directive) {
|
|
58560
|
-
var
|
|
58561
|
-
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({},
|
|
58562
|
-
args: (0, _mapValue.default)(
|
|
58560
|
+
var config2 = directive.toConfig();
|
|
58561
|
+
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58562
|
+
args: (0, _mapValue.default)(config2.args, extendArg)
|
|
58563
58563
|
}));
|
|
58564
58564
|
}
|
|
58565
58565
|
function extendNamedType(type) {
|
|
@@ -58588,80 +58588,80 @@ var require_extendSchema = __commonJS2({
|
|
|
58588
58588
|
}
|
|
58589
58589
|
function extendInputObjectType(type) {
|
|
58590
58590
|
var _typeExtensionsMap$co;
|
|
58591
|
-
var
|
|
58592
|
-
var extensions = (_typeExtensionsMap$co = typeExtensionsMap[
|
|
58593
|
-
return new _definition.GraphQLInputObjectType(_objectSpread(_objectSpread({},
|
|
58591
|
+
var config2 = type.toConfig();
|
|
58592
|
+
var extensions = (_typeExtensionsMap$co = typeExtensionsMap[config2.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : [];
|
|
58593
|
+
return new _definition.GraphQLInputObjectType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58594
58594
|
fields: function fields() {
|
|
58595
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
58595
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config2.fields, function(field) {
|
|
58596
58596
|
return _objectSpread(_objectSpread({}, field), {}, {
|
|
58597
58597
|
type: replaceType(field.type)
|
|
58598
58598
|
});
|
|
58599
58599
|
})), buildInputFieldMap(extensions));
|
|
58600
58600
|
},
|
|
58601
|
-
extensionASTNodes:
|
|
58601
|
+
extensionASTNodes: config2.extensionASTNodes.concat(extensions)
|
|
58602
58602
|
}));
|
|
58603
58603
|
}
|
|
58604
58604
|
function extendEnumType(type) {
|
|
58605
58605
|
var _typeExtensionsMap$ty;
|
|
58606
|
-
var
|
|
58606
|
+
var config2 = type.toConfig();
|
|
58607
58607
|
var extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : [];
|
|
58608
|
-
return new _definition.GraphQLEnumType(_objectSpread(_objectSpread({},
|
|
58609
|
-
values: _objectSpread(_objectSpread({},
|
|
58610
|
-
extensionASTNodes:
|
|
58608
|
+
return new _definition.GraphQLEnumType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58609
|
+
values: _objectSpread(_objectSpread({}, config2.values), buildEnumValueMap(extensions)),
|
|
58610
|
+
extensionASTNodes: config2.extensionASTNodes.concat(extensions)
|
|
58611
58611
|
}));
|
|
58612
58612
|
}
|
|
58613
58613
|
function extendScalarType(type) {
|
|
58614
58614
|
var _typeExtensionsMap$co2;
|
|
58615
|
-
var
|
|
58616
|
-
var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[
|
|
58617
|
-
var specifiedByUrl =
|
|
58615
|
+
var config2 = type.toConfig();
|
|
58616
|
+
var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config2.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : [];
|
|
58617
|
+
var specifiedByUrl = config2.specifiedByUrl;
|
|
58618
58618
|
for (var _i8 = 0; _i8 < extensions.length; _i8++) {
|
|
58619
58619
|
var _getSpecifiedByUrl;
|
|
58620
58620
|
var extensionNode = extensions[_i8];
|
|
58621
58621
|
specifiedByUrl = (_getSpecifiedByUrl = getSpecifiedByUrl(extensionNode)) !== null && _getSpecifiedByUrl !== void 0 ? _getSpecifiedByUrl : specifiedByUrl;
|
|
58622
58622
|
}
|
|
58623
|
-
return new _definition.GraphQLScalarType(_objectSpread(_objectSpread({},
|
|
58623
|
+
return new _definition.GraphQLScalarType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58624
58624
|
specifiedByUrl,
|
|
58625
|
-
extensionASTNodes:
|
|
58625
|
+
extensionASTNodes: config2.extensionASTNodes.concat(extensions)
|
|
58626
58626
|
}));
|
|
58627
58627
|
}
|
|
58628
58628
|
function extendObjectType(type) {
|
|
58629
58629
|
var _typeExtensionsMap$co3;
|
|
58630
|
-
var
|
|
58631
|
-
var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[
|
|
58632
|
-
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({},
|
|
58630
|
+
var config2 = type.toConfig();
|
|
58631
|
+
var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config2.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : [];
|
|
58632
|
+
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58633
58633
|
interfaces: function interfaces() {
|
|
58634
58634
|
return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));
|
|
58635
58635
|
},
|
|
58636
58636
|
fields: function fields() {
|
|
58637
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
58637
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config2.fields, extendField)), buildFieldMap(extensions));
|
|
58638
58638
|
},
|
|
58639
|
-
extensionASTNodes:
|
|
58639
|
+
extensionASTNodes: config2.extensionASTNodes.concat(extensions)
|
|
58640
58640
|
}));
|
|
58641
58641
|
}
|
|
58642
58642
|
function extendInterfaceType(type) {
|
|
58643
58643
|
var _typeExtensionsMap$co4;
|
|
58644
|
-
var
|
|
58645
|
-
var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[
|
|
58646
|
-
return new _definition.GraphQLInterfaceType(_objectSpread(_objectSpread({},
|
|
58644
|
+
var config2 = type.toConfig();
|
|
58645
|
+
var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config2.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : [];
|
|
58646
|
+
return new _definition.GraphQLInterfaceType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58647
58647
|
interfaces: function interfaces() {
|
|
58648
58648
|
return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));
|
|
58649
58649
|
},
|
|
58650
58650
|
fields: function fields() {
|
|
58651
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
58651
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config2.fields, extendField)), buildFieldMap(extensions));
|
|
58652
58652
|
},
|
|
58653
|
-
extensionASTNodes:
|
|
58653
|
+
extensionASTNodes: config2.extensionASTNodes.concat(extensions)
|
|
58654
58654
|
}));
|
|
58655
58655
|
}
|
|
58656
58656
|
function extendUnionType(type) {
|
|
58657
58657
|
var _typeExtensionsMap$co5;
|
|
58658
|
-
var
|
|
58659
|
-
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[
|
|
58660
|
-
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({},
|
|
58658
|
+
var config2 = type.toConfig();
|
|
58659
|
+
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config2.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
|
|
58660
|
+
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
58661
58661
|
types: function types4() {
|
|
58662
58662
|
return [].concat(type.getTypes().map(replaceNamedType), buildUnionTypes(extensions));
|
|
58663
58663
|
},
|
|
58664
|
-
extensionASTNodes:
|
|
58664
|
+
extensionASTNodes: config2.extensionASTNodes.concat(extensions)
|
|
58665
58665
|
}));
|
|
58666
58666
|
}
|
|
58667
58667
|
function extendField(field) {
|
|
@@ -58976,24 +58976,24 @@ var require_buildASTSchema = __commonJS2({
|
|
|
58976
58976
|
extensionASTNodes: [],
|
|
58977
58977
|
assumeValid: false
|
|
58978
58978
|
};
|
|
58979
|
-
var
|
|
58980
|
-
if (
|
|
58981
|
-
for (var _i2 = 0, _config$types2 =
|
|
58979
|
+
var config2 = (0, _extendSchema.extendSchemaImpl)(emptySchemaConfig, documentAST, options);
|
|
58980
|
+
if (config2.astNode == null) {
|
|
58981
|
+
for (var _i2 = 0, _config$types2 = config2.types; _i2 < _config$types2.length; _i2++) {
|
|
58982
58982
|
var type = _config$types2[_i2];
|
|
58983
58983
|
switch (type.name) {
|
|
58984
58984
|
case "Query":
|
|
58985
|
-
|
|
58985
|
+
config2.query = type;
|
|
58986
58986
|
break;
|
|
58987
58987
|
case "Mutation":
|
|
58988
|
-
|
|
58988
|
+
config2.mutation = type;
|
|
58989
58989
|
break;
|
|
58990
58990
|
case "Subscription":
|
|
58991
|
-
|
|
58991
|
+
config2.subscription = type;
|
|
58992
58992
|
break;
|
|
58993
58993
|
}
|
|
58994
58994
|
}
|
|
58995
58995
|
}
|
|
58996
|
-
var directives =
|
|
58996
|
+
var directives = config2.directives;
|
|
58997
58997
|
var _loop = function _loop2(_i42) {
|
|
58998
58998
|
var stdDirective = _directives.specifiedDirectives[_i42];
|
|
58999
58999
|
if (directives.every(function(directive) {
|
|
@@ -59005,7 +59005,7 @@ var require_buildASTSchema = __commonJS2({
|
|
|
59005
59005
|
for (var _i4 = 0; _i4 < _directives.specifiedDirectives.length; _i4++) {
|
|
59006
59006
|
_loop(_i4);
|
|
59007
59007
|
}
|
|
59008
|
-
return new _schema.GraphQLSchema(
|
|
59008
|
+
return new _schema.GraphQLSchema(config2);
|
|
59009
59009
|
}
|
|
59010
59010
|
function buildSchema3(source, options) {
|
|
59011
59011
|
var document = (0, _parser.parse)(source, {
|
|
@@ -59105,12 +59105,12 @@ var require_lexicographicSortSchema = __commonJS2({
|
|
|
59105
59105
|
return maybeType && replaceNamedType(maybeType);
|
|
59106
59106
|
}
|
|
59107
59107
|
function sortDirective(directive) {
|
|
59108
|
-
var
|
|
59109
|
-
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({},
|
|
59110
|
-
locations: sortBy(
|
|
59108
|
+
var config2 = directive.toConfig();
|
|
59109
|
+
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({}, config2), {}, {
|
|
59110
|
+
locations: sortBy(config2.locations, function(x2) {
|
|
59111
59111
|
return x2;
|
|
59112
59112
|
}),
|
|
59113
|
-
args: sortArgs(
|
|
59113
|
+
args: sortArgs(config2.args)
|
|
59114
59114
|
}));
|
|
59115
59115
|
}
|
|
59116
59116
|
function sortArgs(args) {
|
|
@@ -59143,13 +59143,13 @@ var require_lexicographicSortSchema = __commonJS2({
|
|
|
59143
59143
|
return type;
|
|
59144
59144
|
}
|
|
59145
59145
|
if ((0, _definition.isObjectType)(type)) {
|
|
59146
|
-
var
|
|
59147
|
-
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({},
|
|
59146
|
+
var config2 = type.toConfig();
|
|
59147
|
+
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({}, config2), {}, {
|
|
59148
59148
|
interfaces: function interfaces() {
|
|
59149
|
-
return sortTypes(
|
|
59149
|
+
return sortTypes(config2.interfaces);
|
|
59150
59150
|
},
|
|
59151
59151
|
fields: function fields() {
|
|
59152
|
-
return sortFields(
|
|
59152
|
+
return sortFields(config2.fields);
|
|
59153
59153
|
}
|
|
59154
59154
|
}));
|
|
59155
59155
|
}
|
|
@@ -100518,13 +100518,13 @@ var require_esprima2 = __commonJS2({
|
|
|
100518
100518
|
return Reader2;
|
|
100519
100519
|
}();
|
|
100520
100520
|
var Tokenizer = function() {
|
|
100521
|
-
function Tokenizer2(code,
|
|
100521
|
+
function Tokenizer2(code, config2) {
|
|
100522
100522
|
this.errorHandler = new error_handler_1.ErrorHandler();
|
|
100523
|
-
this.errorHandler.tolerant =
|
|
100523
|
+
this.errorHandler.tolerant = config2 ? typeof config2.tolerant === "boolean" && config2.tolerant : false;
|
|
100524
100524
|
this.scanner = new scanner_1.Scanner(code, this.errorHandler);
|
|
100525
|
-
this.scanner.trackComment =
|
|
100526
|
-
this.trackRange =
|
|
100527
|
-
this.trackLoc =
|
|
100525
|
+
this.scanner.trackComment = config2 ? typeof config2.comment === "boolean" && config2.comment : false;
|
|
100526
|
+
this.trackRange = config2 ? typeof config2.range === "boolean" && config2.range : false;
|
|
100527
|
+
this.trackLoc = config2 ? typeof config2.loc === "boolean" && config2.loc : false;
|
|
100528
100528
|
this.buffer = [];
|
|
100529
100529
|
this.reader = new Reader();
|
|
100530
100530
|
}
|
|
@@ -102675,11 +102675,11 @@ var require_printer2 = __commonJS2({
|
|
|
102675
102675
|
return this.code;
|
|
102676
102676
|
};
|
|
102677
102677
|
var emptyPrintResult = new PrintResult("");
|
|
102678
|
-
var Printer = function Printer2(
|
|
102678
|
+
var Printer = function Printer2(config2) {
|
|
102679
102679
|
assert_1.default.ok(this instanceof Printer2);
|
|
102680
|
-
var explicitTabWidth =
|
|
102681
|
-
|
|
102682
|
-
|
|
102680
|
+
var explicitTabWidth = config2 && config2.tabWidth;
|
|
102681
|
+
config2 = (0, options_1.normalize)(config2);
|
|
102682
|
+
config2.sourceFileName = null;
|
|
102683
102683
|
function makePrintFunctionWith(options, overrides) {
|
|
102684
102684
|
options = Object.assign({}, options, overrides);
|
|
102685
102685
|
return function(path22) {
|
|
@@ -102694,19 +102694,19 @@ var require_printer2 = __commonJS2({
|
|
|
102694
102694
|
includeComments: false
|
|
102695
102695
|
}));
|
|
102696
102696
|
}
|
|
102697
|
-
var oldTabWidth =
|
|
102697
|
+
var oldTabWidth = config2.tabWidth;
|
|
102698
102698
|
if (!explicitTabWidth) {
|
|
102699
102699
|
var loc = path22.getNode().loc;
|
|
102700
102700
|
if (loc && loc.lines && loc.lines.guessTabWidth) {
|
|
102701
|
-
|
|
102701
|
+
config2.tabWidth = loc.lines.guessTabWidth();
|
|
102702
102702
|
}
|
|
102703
102703
|
}
|
|
102704
102704
|
var reprinter = (0, patcher_1.getReprinter)(path22);
|
|
102705
|
-
var lines = reprinter ? reprinter(print5) : genericPrint(path22,
|
|
102705
|
+
var lines = reprinter ? reprinter(print5) : genericPrint(path22, config2, options, makePrintFunctionWith(options, {
|
|
102706
102706
|
includeComments: true,
|
|
102707
102707
|
avoidRootParens: false
|
|
102708
102708
|
}));
|
|
102709
|
-
|
|
102709
|
+
config2.tabWidth = oldTabWidth;
|
|
102710
102710
|
return lines;
|
|
102711
102711
|
}
|
|
102712
102712
|
this.print = function(ast) {
|
|
@@ -102717,7 +102717,7 @@ var require_printer2 = __commonJS2({
|
|
|
102717
102717
|
includeComments: true,
|
|
102718
102718
|
avoidRootParens: false
|
|
102719
102719
|
});
|
|
102720
|
-
return new PrintResult(lines.toString(
|
|
102720
|
+
return new PrintResult(lines.toString(config2), util.composeSourceMaps(config2.inputSourceMap, lines.getSourceMap(config2.sourceMapName, config2.sourceRoot)));
|
|
102721
102721
|
};
|
|
102722
102722
|
this.printGenerically = function(ast) {
|
|
102723
102723
|
if (!ast) {
|
|
@@ -102725,26 +102725,26 @@ var require_printer2 = __commonJS2({
|
|
|
102725
102725
|
}
|
|
102726
102726
|
function printGenerically(path32) {
|
|
102727
102727
|
return (0, comments_1.printComments)(path32, function(path4) {
|
|
102728
|
-
return genericPrint(path4,
|
|
102728
|
+
return genericPrint(path4, config2, {
|
|
102729
102729
|
includeComments: true,
|
|
102730
102730
|
avoidRootParens: false
|
|
102731
102731
|
}, printGenerically);
|
|
102732
102732
|
});
|
|
102733
102733
|
}
|
|
102734
102734
|
var path22 = fast_path_1.default.from(ast);
|
|
102735
|
-
var oldReuseWhitespace =
|
|
102736
|
-
|
|
102737
|
-
var pr = new PrintResult(printGenerically(path22).toString(
|
|
102738
|
-
|
|
102735
|
+
var oldReuseWhitespace = config2.reuseWhitespace;
|
|
102736
|
+
config2.reuseWhitespace = false;
|
|
102737
|
+
var pr = new PrintResult(printGenerically(path22).toString(config2));
|
|
102738
|
+
config2.reuseWhitespace = oldReuseWhitespace;
|
|
102739
102739
|
return pr;
|
|
102740
102740
|
};
|
|
102741
102741
|
};
|
|
102742
102742
|
exports.Printer = Printer;
|
|
102743
|
-
function genericPrint(path22,
|
|
102743
|
+
function genericPrint(path22, config2, options, printPath) {
|
|
102744
102744
|
assert_1.default.ok(path22 instanceof fast_path_1.default);
|
|
102745
102745
|
var node = path22.getValue();
|
|
102746
102746
|
var parts = [];
|
|
102747
|
-
var linesWithoutParens = genericPrintNoParens(path22,
|
|
102747
|
+
var linesWithoutParens = genericPrintNoParens(path22, config2, printPath);
|
|
102748
102748
|
if (!node || linesWithoutParens.isEmpty()) {
|
|
102749
102749
|
return linesWithoutParens;
|
|
102750
102750
|
}
|
|
@@ -105366,7 +105366,7 @@ async function marshalSelection({
|
|
|
105366
105366
|
selection,
|
|
105367
105367
|
data
|
|
105368
105368
|
}) {
|
|
105369
|
-
const
|
|
105369
|
+
const config2 = getCurrentConfig();
|
|
105370
105370
|
if (data === null || typeof data === "undefined") {
|
|
105371
105371
|
return data;
|
|
105372
105372
|
}
|
|
@@ -105384,8 +105384,8 @@ async function marshalSelection({
|
|
|
105384
105384
|
if (selection2) {
|
|
105385
105385
|
return [fieldName, await marshalSelection({ selection: selection2, data: value })];
|
|
105386
105386
|
}
|
|
105387
|
-
if (
|
|
105388
|
-
const marshalFn =
|
|
105387
|
+
if (config2.scalars?.[type]) {
|
|
105388
|
+
const marshalFn = config2.scalars[type].marshal;
|
|
105389
105389
|
if (!marshalFn) {
|
|
105390
105390
|
throw new Error(
|
|
105391
105391
|
`scalar type ${type} is missing a \`marshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`
|
|
@@ -106361,10 +106361,10 @@ function plugin(name, hooks2) {
|
|
|
106361
106361
|
name,
|
|
106362
106362
|
plugin: hooks2,
|
|
106363
106363
|
__plugin_init__: true,
|
|
106364
|
-
with(
|
|
106364
|
+
with(config2) {
|
|
106365
106365
|
return {
|
|
106366
106366
|
...data,
|
|
106367
|
-
config
|
|
106367
|
+
config: config2
|
|
106368
106368
|
};
|
|
106369
106369
|
}
|
|
106370
106370
|
};
|
|
@@ -107575,7 +107575,7 @@ var InMemorySubscriptions = class {
|
|
|
107575
107575
|
};
|
|
107576
107576
|
var Cache = class {
|
|
107577
107577
|
_internal_unstable;
|
|
107578
|
-
constructor({ disabled, ...
|
|
107578
|
+
constructor({ disabled, ...config2 } = {}) {
|
|
107579
107579
|
this._internal_unstable = new CacheInternal({
|
|
107580
107580
|
cache: this,
|
|
107581
107581
|
storage: new InMemoryStorage(),
|
|
@@ -107585,8 +107585,8 @@ var Cache = class {
|
|
|
107585
107585
|
staleManager: new StaleManager(this),
|
|
107586
107586
|
disabled: disabled ?? typeof globalThis.window === "undefined"
|
|
107587
107587
|
});
|
|
107588
|
-
if (Object.keys(
|
|
107589
|
-
this.setConfig(defaultConfigValues(
|
|
107588
|
+
if (Object.keys(config2).length > 0) {
|
|
107589
|
+
this.setConfig(defaultConfigValues(config2));
|
|
107590
107590
|
}
|
|
107591
107591
|
}
|
|
107592
107592
|
write({
|
|
@@ -107640,8 +107640,8 @@ var Cache = class {
|
|
|
107640
107640
|
this._internal_unstable.lists.removeIDFromAllLists(id, layer);
|
|
107641
107641
|
this._internal_unstable.storage.delete(id, layer);
|
|
107642
107642
|
}
|
|
107643
|
-
setConfig(
|
|
107644
|
-
this._internal_unstable.setConfig(
|
|
107643
|
+
setConfig(config2) {
|
|
107644
|
+
this._internal_unstable.setConfig(config2);
|
|
107645
107645
|
}
|
|
107646
107646
|
markTypeStale(options) {
|
|
107647
107647
|
if (!options) {
|
|
@@ -107766,7 +107766,7 @@ var CacheInternal = class {
|
|
|
107766
107766
|
lifetimes,
|
|
107767
107767
|
staleManager,
|
|
107768
107768
|
disabled,
|
|
107769
|
-
config
|
|
107769
|
+
config: config2
|
|
107770
107770
|
}) {
|
|
107771
107771
|
this.storage = storage;
|
|
107772
107772
|
this.subscriptions = subscriptions;
|
|
@@ -107774,7 +107774,7 @@ var CacheInternal = class {
|
|
|
107774
107774
|
this.cache = cache;
|
|
107775
107775
|
this.lifetimes = lifetimes;
|
|
107776
107776
|
this.staleManager = staleManager;
|
|
107777
|
-
this._config =
|
|
107777
|
+
this._config = config2;
|
|
107778
107778
|
this._disabled = disabled;
|
|
107779
107779
|
try {
|
|
107780
107780
|
if (process.env.HOUDINI_TEST === "true") {
|
|
@@ -107786,8 +107786,8 @@ var CacheInternal = class {
|
|
|
107786
107786
|
get config() {
|
|
107787
107787
|
return this._config ?? getCurrentConfig();
|
|
107788
107788
|
}
|
|
107789
|
-
setConfig(
|
|
107790
|
-
this._config =
|
|
107789
|
+
setConfig(config2) {
|
|
107790
|
+
this._config = config2;
|
|
107791
107791
|
}
|
|
107792
107792
|
writeSelection({
|
|
107793
107793
|
data,
|
|
@@ -108650,12 +108650,12 @@ function deepMerge2(filepath, ...targets) {
|
|
|
108650
108650
|
});
|
|
108651
108651
|
}
|
|
108652
108652
|
}
|
|
108653
|
-
function parseJS(str,
|
|
108653
|
+
function parseJS(str, config2) {
|
|
108654
108654
|
const defaultConfig = {
|
|
108655
|
-
plugins: ["typescript", "importAssertions", "decorators"],
|
|
108655
|
+
plugins: ["typescript", "importAssertions", "decorators-legacy"],
|
|
108656
108656
|
sourceType: "module"
|
|
108657
108657
|
};
|
|
108658
|
-
return (0, import_parser.parse)(str || "",
|
|
108658
|
+
return (0, import_parser.parse)(str || "", config2 ? deepMerge2("", defaultConfig, config2) : defaultConfig).program;
|
|
108659
108659
|
}
|
|
108660
108660
|
async function printJS(script, options) {
|
|
108661
108661
|
if (options?.pretty) {
|
|
@@ -108667,21 +108667,21 @@ async function printJS(script, options) {
|
|
|
108667
108667
|
var recast = __toESM2(require_main2(), 1);
|
|
108668
108668
|
var AST = recast.types.builders;
|
|
108669
108669
|
function ensureArtifactImport({
|
|
108670
|
-
config,
|
|
108670
|
+
config: config2,
|
|
108671
108671
|
artifact,
|
|
108672
108672
|
body,
|
|
108673
108673
|
local,
|
|
108674
108674
|
withExtension
|
|
108675
108675
|
}) {
|
|
108676
108676
|
return ensureImports({
|
|
108677
|
-
config,
|
|
108677
|
+
config: config2,
|
|
108678
108678
|
body,
|
|
108679
|
-
sourceModule:
|
|
108679
|
+
sourceModule: config2.artifactImportPath(artifact.name) + (withExtension ? ".js" : ""),
|
|
108680
108680
|
import: local || `_${artifact.name}Artifact`
|
|
108681
108681
|
});
|
|
108682
108682
|
}
|
|
108683
108683
|
function ensureImports({
|
|
108684
|
-
config,
|
|
108684
|
+
config: config2,
|
|
108685
108685
|
body,
|
|
108686
108686
|
import: importID,
|
|
108687
108687
|
sourceModule,
|
|
@@ -108814,7 +108814,7 @@ async function asyncWalk(ast, { enter, leave }) {
|
|
|
108814
108814
|
return await instance.visit(ast, null);
|
|
108815
108815
|
}
|
|
108816
108816
|
var graphql4 = __toESM2(require_graphql2(), 1);
|
|
108817
|
-
async function find_graphql(
|
|
108817
|
+
async function find_graphql(config2, parsedScript, walker) {
|
|
108818
108818
|
await asyncWalk(parsedScript, {
|
|
108819
108819
|
async enter(node, parent2) {
|
|
108820
108820
|
if (node.type !== "TaggedTemplateExpression" && node.type !== "CallExpression") {
|
|
@@ -108847,7 +108847,7 @@ async function find_graphql(config, parsedScript, walker) {
|
|
|
108847
108847
|
if (walker.where && !walker.where(parsedTag, { node, parent: parent2 })) {
|
|
108848
108848
|
return;
|
|
108849
108849
|
}
|
|
108850
|
-
const definition =
|
|
108850
|
+
const definition = config2.extractDefinition(parsedTag);
|
|
108851
108851
|
const name = definition.name?.value;
|
|
108852
108852
|
if (!name) {
|
|
108853
108853
|
throw new Error("Could not find definition name");
|
|
@@ -108864,7 +108864,7 @@ async function find_graphql(config, parsedScript, walker) {
|
|
|
108864
108864
|
kind = CompiledSubscriptionKind;
|
|
108865
108865
|
}
|
|
108866
108866
|
}
|
|
108867
|
-
walker.dependency?.(
|
|
108867
|
+
walker.dependency?.(config2.artifactPath(parsedTag));
|
|
108868
108868
|
await walker.tag({
|
|
108869
108869
|
parsedDocument: parsedTag,
|
|
108870
108870
|
node: {
|
|
@@ -166347,7 +166347,11 @@ function get_session(req, secrets) {
|
|
|
166347
166347
|
if (!parsed) {
|
|
166348
166348
|
return {};
|
|
166349
166349
|
}
|
|
166350
|
-
|
|
166350
|
+
const houdini_session_cookie = parsed.split(";").map((s2) => s2.trim().split("=")).filter((s2) => s2[0] === session_cookie_name);
|
|
166351
|
+
if (houdini_session_cookie.length === 1) {
|
|
166352
|
+
return JSON.parse(houdini_session_cookie[0][1]);
|
|
166353
|
+
}
|
|
166354
|
+
return {};
|
|
166351
166355
|
}
|
|
166352
166356
|
|
|
166353
166357
|
// src/plugin/vite.tsx
|