houdini 1.1.4-react.0 → 1.1.4
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 +607 -444
- package/build/cmd-esm/index.js +607 -444
- package/build/codegen/transforms/fragmentVariables.d.ts +0 -11
- package/build/codegen-cjs/index.js +577 -403
- package/build/codegen-esm/index.js +577 -403
- package/build/lib/config.d.ts +1 -1
- package/build/lib/parse.d.ts +1 -2
- package/build/lib/types.d.ts +1 -4
- package/build/lib-cjs/index.js +187 -195
- package/build/lib-esm/index.js +187 -195
- package/build/runtime/cache/cache.d.ts +4 -2
- package/build/runtime/client/documentStore.d.ts +0 -3
- package/build/runtime/client/index.d.ts +1 -1
- package/build/runtime/lib/types.d.ts +4 -46
- package/build/runtime-cjs/cache/cache.d.ts +4 -2
- package/build/runtime-cjs/cache/cache.js +37 -14
- package/build/runtime-cjs/client/documentStore.d.ts +0 -3
- package/build/runtime-cjs/client/documentStore.js +6 -11
- package/build/runtime-cjs/client/index.d.ts +1 -1
- package/build/runtime-cjs/client/plugins/cache.js +3 -5
- package/build/runtime-cjs/client/plugins/fragment.js +1 -8
- package/build/runtime-cjs/client/plugins/query.js +1 -2
- package/build/runtime-cjs/lib/types.d.ts +4 -46
- package/build/runtime-esm/cache/cache.d.ts +4 -2
- package/build/runtime-esm/cache/cache.js +37 -14
- package/build/runtime-esm/client/documentStore.d.ts +0 -3
- package/build/runtime-esm/client/documentStore.js +6 -11
- package/build/runtime-esm/client/index.d.ts +1 -1
- package/build/runtime-esm/client/plugins/cache.js +3 -5
- package/build/runtime-esm/client/plugins/fragment.js +1 -8
- package/build/runtime-esm/client/plugins/query.js +1 -2
- package/build/runtime-esm/lib/types.d.ts +4 -46
- package/build/test-cjs/index.js +598 -428
- package/build/test-esm/index.js +598 -428
- package/build/vite-cjs/index.js +617 -454
- package/build/vite-esm/index.js +617 -454
- package/package.json +3 -1
- package/build/runtime/lib/pageInfo.d.ts +0 -7
- package/build/runtime/lib/pagination.d.ts +0 -29
- package/build/runtime-cjs/lib/pageInfo.d.ts +0 -7
- package/build/runtime-cjs/lib/pageInfo.js +0 -79
- package/build/runtime-cjs/lib/pagination.d.ts +0 -29
- package/build/runtime-cjs/lib/pagination.js +0 -231
- package/build/runtime-esm/lib/pageInfo.d.ts +0 -7
- package/build/runtime-esm/lib/pageInfo.js +0 -52
- package/build/runtime-esm/lib/pagination.d.ts +0 -29
- package/build/runtime-esm/lib/pagination.js +0 -206
|
@@ -225,16 +225,16 @@ var require_GraphQLError = __commonJS({
|
|
|
225
225
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
226
226
|
}
|
|
227
227
|
function ownKeys(object, enumerableOnly) {
|
|
228
|
-
var
|
|
228
|
+
var keys2 = Object.keys(object);
|
|
229
229
|
if (Object.getOwnPropertySymbols) {
|
|
230
230
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
231
231
|
if (enumerableOnly)
|
|
232
232
|
symbols = symbols.filter(function(sym) {
|
|
233
233
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
234
234
|
});
|
|
235
|
-
|
|
235
|
+
keys2.push.apply(keys2, symbols);
|
|
236
236
|
}
|
|
237
|
-
return
|
|
237
|
+
return keys2;
|
|
238
238
|
}
|
|
239
239
|
function _objectSpread(target) {
|
|
240
240
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -471,7 +471,7 @@ var require_GraphQLError = __commonJS({
|
|
|
471
471
|
}
|
|
472
472
|
_createClass(GraphQLError4, [{
|
|
473
473
|
key: "toString",
|
|
474
|
-
value: function
|
|
474
|
+
value: function toString2() {
|
|
475
475
|
return printError(this);
|
|
476
476
|
}
|
|
477
477
|
}, {
|
|
@@ -793,14 +793,14 @@ var require_inspect = __commonJS({
|
|
|
793
793
|
return formatObject(value, seenValues);
|
|
794
794
|
}
|
|
795
795
|
function formatObject(object, seenValues) {
|
|
796
|
-
var
|
|
797
|
-
if (
|
|
796
|
+
var keys2 = Object.keys(object);
|
|
797
|
+
if (keys2.length === 0) {
|
|
798
798
|
return "{}";
|
|
799
799
|
}
|
|
800
800
|
if (seenValues.length > MAX_RECURSIVE_DEPTH) {
|
|
801
801
|
return "[" + getObjectTag(object) + "]";
|
|
802
802
|
}
|
|
803
|
-
var properties =
|
|
803
|
+
var properties = keys2.map(function(key) {
|
|
804
804
|
var value = formatValue(object[key], seenValues);
|
|
805
805
|
return key + ": " + value;
|
|
806
806
|
});
|
|
@@ -2398,7 +2398,7 @@ var require_visitor = __commonJS({
|
|
|
2398
2398
|
Object.defineProperty(exports, "__esModule", {
|
|
2399
2399
|
value: true
|
|
2400
2400
|
});
|
|
2401
|
-
exports.visit =
|
|
2401
|
+
exports.visit = visit12;
|
|
2402
2402
|
exports.visitInParallel = visitInParallel;
|
|
2403
2403
|
exports.getVisitFn = getVisitFn;
|
|
2404
2404
|
exports.BREAK = exports.QueryDocumentKeys = void 0;
|
|
@@ -2461,11 +2461,11 @@ var require_visitor = __commonJS({
|
|
|
2461
2461
|
exports.QueryDocumentKeys = QueryDocumentKeys;
|
|
2462
2462
|
var BREAK = Object.freeze({});
|
|
2463
2463
|
exports.BREAK = BREAK;
|
|
2464
|
-
function
|
|
2464
|
+
function visit12(root, visitor) {
|
|
2465
2465
|
var visitorKeys = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : QueryDocumentKeys;
|
|
2466
2466
|
var stack = void 0;
|
|
2467
2467
|
var inArray = Array.isArray(root);
|
|
2468
|
-
var
|
|
2468
|
+
var keys2 = [root];
|
|
2469
2469
|
var index = -1;
|
|
2470
2470
|
var edits = [];
|
|
2471
2471
|
var node = void 0;
|
|
@@ -2476,7 +2476,7 @@ var require_visitor = __commonJS({
|
|
|
2476
2476
|
var newRoot = root;
|
|
2477
2477
|
do {
|
|
2478
2478
|
index++;
|
|
2479
|
-
var isLeaving = index ===
|
|
2479
|
+
var isLeaving = index === keys2.length;
|
|
2480
2480
|
var isEdited = isLeaving && edits.length !== 0;
|
|
2481
2481
|
if (isLeaving) {
|
|
2482
2482
|
key = ancestors.length === 0 ? void 0 : path2[path2.length - 1];
|
|
@@ -2509,12 +2509,12 @@ var require_visitor = __commonJS({
|
|
|
2509
2509
|
}
|
|
2510
2510
|
}
|
|
2511
2511
|
index = stack.index;
|
|
2512
|
-
|
|
2512
|
+
keys2 = stack.keys;
|
|
2513
2513
|
edits = stack.edits;
|
|
2514
2514
|
inArray = stack.inArray;
|
|
2515
2515
|
stack = stack.prev;
|
|
2516
2516
|
} else {
|
|
2517
|
-
key = parent ? inArray ? index :
|
|
2517
|
+
key = parent ? inArray ? index : keys2[index] : void 0;
|
|
2518
2518
|
node = parent ? parent[key] : newRoot;
|
|
2519
2519
|
if (node === null || node === void 0) {
|
|
2520
2520
|
continue;
|
|
@@ -2562,12 +2562,12 @@ var require_visitor = __commonJS({
|
|
|
2562
2562
|
stack = {
|
|
2563
2563
|
inArray,
|
|
2564
2564
|
index,
|
|
2565
|
-
keys,
|
|
2565
|
+
keys: keys2,
|
|
2566
2566
|
edits,
|
|
2567
2567
|
prev: stack
|
|
2568
2568
|
};
|
|
2569
2569
|
inArray = Array.isArray(node);
|
|
2570
|
-
|
|
2570
|
+
keys2 = inArray ? node : (_visitorKeys$node$kin = visitorKeys[node.kind]) !== null && _visitorKeys$node$kin !== void 0 ? _visitorKeys$node$kin : [];
|
|
2571
2571
|
index = -1;
|
|
2572
2572
|
edits = [];
|
|
2573
2573
|
if (parent) {
|
|
@@ -3550,7 +3550,7 @@ var require_definition = __commonJS({
|
|
|
3550
3550
|
return new GraphQLList2(ofType);
|
|
3551
3551
|
}
|
|
3552
3552
|
}
|
|
3553
|
-
GraphQLList2.prototype.toString = function
|
|
3553
|
+
GraphQLList2.prototype.toString = function toString2() {
|
|
3554
3554
|
return "[" + String(this.ofType) + "]";
|
|
3555
3555
|
};
|
|
3556
3556
|
GraphQLList2.prototype.toJSON = function toJSON() {
|
|
@@ -3569,7 +3569,7 @@ var require_definition = __commonJS({
|
|
|
3569
3569
|
return new GraphQLNonNull2(ofType);
|
|
3570
3570
|
}
|
|
3571
3571
|
}
|
|
3572
|
-
GraphQLNonNull2.prototype.toString = function
|
|
3572
|
+
GraphQLNonNull2.prototype.toString = function toString2() {
|
|
3573
3573
|
return String(this.ofType) + "!";
|
|
3574
3574
|
};
|
|
3575
3575
|
GraphQLNonNull2.prototype.toJSON = function toJSON() {
|
|
@@ -3665,7 +3665,7 @@ var require_definition = __commonJS({
|
|
|
3665
3665
|
extensionASTNodes: (_this$extensionASTNod = this.extensionASTNodes) !== null && _this$extensionASTNod !== void 0 ? _this$extensionASTNod : []
|
|
3666
3666
|
};
|
|
3667
3667
|
};
|
|
3668
|
-
_proto.toString = function
|
|
3668
|
+
_proto.toString = function toString2() {
|
|
3669
3669
|
return this.name;
|
|
3670
3670
|
};
|
|
3671
3671
|
_proto.toJSON = function toJSON() {
|
|
@@ -3719,7 +3719,7 @@ var require_definition = __commonJS({
|
|
|
3719
3719
|
extensionASTNodes: this.extensionASTNodes || []
|
|
3720
3720
|
};
|
|
3721
3721
|
};
|
|
3722
|
-
_proto2.toString = function
|
|
3722
|
+
_proto2.toString = function toString2() {
|
|
3723
3723
|
return this.name;
|
|
3724
3724
|
};
|
|
3725
3725
|
_proto2.toJSON = function toJSON() {
|
|
@@ -3850,7 +3850,7 @@ var require_definition = __commonJS({
|
|
|
3850
3850
|
extensionASTNodes: (_this$extensionASTNod2 = this.extensionASTNodes) !== null && _this$extensionASTNod2 !== void 0 ? _this$extensionASTNod2 : []
|
|
3851
3851
|
};
|
|
3852
3852
|
};
|
|
3853
|
-
_proto3.toString = function
|
|
3853
|
+
_proto3.toString = function toString2() {
|
|
3854
3854
|
return this.name;
|
|
3855
3855
|
};
|
|
3856
3856
|
_proto3.toJSON = function toJSON() {
|
|
@@ -3897,7 +3897,7 @@ var require_definition = __commonJS({
|
|
|
3897
3897
|
extensionASTNodes: (_this$extensionASTNod3 = this.extensionASTNodes) !== null && _this$extensionASTNod3 !== void 0 ? _this$extensionASTNod3 : []
|
|
3898
3898
|
};
|
|
3899
3899
|
};
|
|
3900
|
-
_proto4.toString = function
|
|
3900
|
+
_proto4.toString = function toString2() {
|
|
3901
3901
|
return this.name;
|
|
3902
3902
|
};
|
|
3903
3903
|
_proto4.toJSON = function toJSON() {
|
|
@@ -3941,7 +3941,7 @@ var require_definition = __commonJS({
|
|
|
3941
3941
|
_proto5.getValue = function getValue(name) {
|
|
3942
3942
|
return this._nameLookup[name];
|
|
3943
3943
|
};
|
|
3944
|
-
_proto5.serialize = function
|
|
3944
|
+
_proto5.serialize = function serialize2(outputValue) {
|
|
3945
3945
|
var enumValue = this._valueLookup.get(outputValue);
|
|
3946
3946
|
if (enumValue === void 0) {
|
|
3947
3947
|
throw new _GraphQLError.GraphQLError('Enum "'.concat(this.name, '" cannot represent value: ').concat((0, _inspect.default)(outputValue)));
|
|
@@ -3993,7 +3993,7 @@ var require_definition = __commonJS({
|
|
|
3993
3993
|
extensionASTNodes: (_this$extensionASTNod4 = this.extensionASTNodes) !== null && _this$extensionASTNod4 !== void 0 ? _this$extensionASTNod4 : []
|
|
3994
3994
|
};
|
|
3995
3995
|
};
|
|
3996
|
-
_proto5.toString = function
|
|
3996
|
+
_proto5.toString = function toString2() {
|
|
3997
3997
|
return this.name;
|
|
3998
3998
|
};
|
|
3999
3999
|
_proto5.toJSON = function toJSON() {
|
|
@@ -4071,7 +4071,7 @@ var require_definition = __commonJS({
|
|
|
4071
4071
|
extensionASTNodes: (_this$extensionASTNod5 = this.extensionASTNodes) !== null && _this$extensionASTNod5 !== void 0 ? _this$extensionASTNod5 : []
|
|
4072
4072
|
};
|
|
4073
4073
|
};
|
|
4074
|
-
_proto6.toString = function
|
|
4074
|
+
_proto6.toString = function toString2() {
|
|
4075
4075
|
return this.name;
|
|
4076
4076
|
};
|
|
4077
4077
|
_proto6.toJSON = function toJSON() {
|
|
@@ -5325,7 +5325,7 @@ var require_directives = __commonJS({
|
|
|
5325
5325
|
astNode: this.astNode
|
|
5326
5326
|
};
|
|
5327
5327
|
};
|
|
5328
|
-
_proto.toString = function
|
|
5328
|
+
_proto.toString = function toString2() {
|
|
5329
5329
|
return "@" + this.name;
|
|
5330
5330
|
};
|
|
5331
5331
|
_proto.toJSON = function toJSON() {
|
|
@@ -7262,16 +7262,16 @@ var require_KnownArgumentNamesRule = __commonJS({
|
|
|
7262
7262
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
7263
7263
|
}
|
|
7264
7264
|
function ownKeys(object, enumerableOnly) {
|
|
7265
|
-
var
|
|
7265
|
+
var keys2 = Object.keys(object);
|
|
7266
7266
|
if (Object.getOwnPropertySymbols) {
|
|
7267
7267
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
7268
7268
|
if (enumerableOnly)
|
|
7269
7269
|
symbols = symbols.filter(function(sym) {
|
|
7270
7270
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
7271
7271
|
});
|
|
7272
|
-
|
|
7272
|
+
keys2.push.apply(keys2, symbols);
|
|
7273
7273
|
}
|
|
7274
|
-
return
|
|
7274
|
+
return keys2;
|
|
7275
7275
|
}
|
|
7276
7276
|
function _objectSpread(target) {
|
|
7277
7277
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -7518,16 +7518,16 @@ var require_ProvidedRequiredArgumentsRule = __commonJS({
|
|
|
7518
7518
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
7519
7519
|
}
|
|
7520
7520
|
function ownKeys(object, enumerableOnly) {
|
|
7521
|
-
var
|
|
7521
|
+
var keys2 = Object.keys(object);
|
|
7522
7522
|
if (Object.getOwnPropertySymbols) {
|
|
7523
7523
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
7524
7524
|
if (enumerableOnly)
|
|
7525
7525
|
symbols = symbols.filter(function(sym) {
|
|
7526
7526
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
7527
7527
|
});
|
|
7528
|
-
|
|
7528
|
+
keys2.push.apply(keys2, symbols);
|
|
7529
7529
|
}
|
|
7530
|
-
return
|
|
7530
|
+
return keys2;
|
|
7531
7531
|
}
|
|
7532
7532
|
function _objectSpread(target) {
|
|
7533
7533
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -8785,13 +8785,13 @@ var require_promiseForObject = __commonJS({
|
|
|
8785
8785
|
});
|
|
8786
8786
|
exports.default = promiseForObject;
|
|
8787
8787
|
function promiseForObject(object) {
|
|
8788
|
-
var
|
|
8789
|
-
var valuesAndPromises =
|
|
8788
|
+
var keys2 = Object.keys(object);
|
|
8789
|
+
var valuesAndPromises = keys2.map(function(name) {
|
|
8790
8790
|
return object[name];
|
|
8791
8791
|
});
|
|
8792
8792
|
return Promise.all(valuesAndPromises).then(function(values) {
|
|
8793
8793
|
return values.reduce(function(resolvedObject, value, i) {
|
|
8794
|
-
resolvedObject[
|
|
8794
|
+
resolvedObject[keys2[i]] = value;
|
|
8795
8795
|
return resolvedObject;
|
|
8796
8796
|
}, /* @__PURE__ */ Object.create(null));
|
|
8797
8797
|
});
|
|
@@ -11243,16 +11243,16 @@ var require_getIntrospectionQuery = __commonJS({
|
|
|
11243
11243
|
});
|
|
11244
11244
|
exports.getIntrospectionQuery = getIntrospectionQuery;
|
|
11245
11245
|
function ownKeys(object, enumerableOnly) {
|
|
11246
|
-
var
|
|
11246
|
+
var keys2 = Object.keys(object);
|
|
11247
11247
|
if (Object.getOwnPropertySymbols) {
|
|
11248
11248
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
11249
11249
|
if (enumerableOnly)
|
|
11250
11250
|
symbols = symbols.filter(function(sym) {
|
|
11251
11251
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
11252
11252
|
});
|
|
11253
|
-
|
|
11253
|
+
keys2.push.apply(keys2, symbols);
|
|
11254
11254
|
}
|
|
11255
|
-
return
|
|
11255
|
+
return keys2;
|
|
11256
11256
|
}
|
|
11257
11257
|
function _objectSpread(target) {
|
|
11258
11258
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -11345,16 +11345,16 @@ var require_introspectionFromSchema = __commonJS({
|
|
|
11345
11345
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
11346
11346
|
}
|
|
11347
11347
|
function ownKeys(object, enumerableOnly) {
|
|
11348
|
-
var
|
|
11348
|
+
var keys2 = Object.keys(object);
|
|
11349
11349
|
if (Object.getOwnPropertySymbols) {
|
|
11350
11350
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
11351
11351
|
if (enumerableOnly)
|
|
11352
11352
|
symbols = symbols.filter(function(sym) {
|
|
11353
11353
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
11354
11354
|
});
|
|
11355
|
-
|
|
11355
|
+
keys2.push.apply(keys2, symbols);
|
|
11356
11356
|
}
|
|
11357
|
-
return
|
|
11357
|
+
return keys2;
|
|
11358
11358
|
}
|
|
11359
11359
|
function _objectSpread(target) {
|
|
11360
11360
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -11686,16 +11686,16 @@ var require_extendSchema = __commonJS({
|
|
|
11686
11686
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
11687
11687
|
}
|
|
11688
11688
|
function ownKeys(object, enumerableOnly) {
|
|
11689
|
-
var
|
|
11689
|
+
var keys2 = Object.keys(object);
|
|
11690
11690
|
if (Object.getOwnPropertySymbols) {
|
|
11691
11691
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
11692
11692
|
if (enumerableOnly)
|
|
11693
11693
|
symbols = symbols.filter(function(sym) {
|
|
11694
11694
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
11695
11695
|
});
|
|
11696
|
-
|
|
11696
|
+
keys2.push.apply(keys2, symbols);
|
|
11697
11697
|
}
|
|
11698
|
-
return
|
|
11698
|
+
return keys2;
|
|
11699
11699
|
}
|
|
11700
11700
|
function _objectSpread(target) {
|
|
11701
11701
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -12286,16 +12286,16 @@ var require_lexicographicSortSchema = __commonJS({
|
|
|
12286
12286
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
12287
12287
|
}
|
|
12288
12288
|
function ownKeys(object, enumerableOnly) {
|
|
12289
|
-
var
|
|
12289
|
+
var keys2 = Object.keys(object);
|
|
12290
12290
|
if (Object.getOwnPropertySymbols) {
|
|
12291
12291
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
12292
12292
|
if (enumerableOnly)
|
|
12293
12293
|
symbols = symbols.filter(function(sym) {
|
|
12294
12294
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
12295
12295
|
});
|
|
12296
|
-
|
|
12296
|
+
keys2.push.apply(keys2, symbols);
|
|
12297
12297
|
}
|
|
12298
|
-
return
|
|
12298
|
+
return keys2;
|
|
12299
12299
|
}
|
|
12300
12300
|
function _objectSpread(target) {
|
|
12301
12301
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -12836,16 +12836,16 @@ var require_findBreakingChanges = __commonJS({
|
|
|
12836
12836
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
12837
12837
|
}
|
|
12838
12838
|
function ownKeys(object, enumerableOnly) {
|
|
12839
|
-
var
|
|
12839
|
+
var keys2 = Object.keys(object);
|
|
12840
12840
|
if (Object.getOwnPropertySymbols) {
|
|
12841
12841
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
12842
12842
|
if (enumerableOnly)
|
|
12843
12843
|
symbols = symbols.filter(function(sym) {
|
|
12844
12844
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
12845
12845
|
});
|
|
12846
|
-
|
|
12846
|
+
keys2.push.apply(keys2, symbols);
|
|
12847
12847
|
}
|
|
12848
|
-
return
|
|
12848
|
+
return keys2;
|
|
12849
12849
|
}
|
|
12850
12850
|
function _objectSpread(target) {
|
|
12851
12851
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -15842,9 +15842,9 @@ var require_legacy_streams = __commonJS({
|
|
|
15842
15842
|
this.mode = 438;
|
|
15843
15843
|
this.bufferSize = 64 * 1024;
|
|
15844
15844
|
options = options || {};
|
|
15845
|
-
var
|
|
15846
|
-
for (var index = 0, length =
|
|
15847
|
-
var key =
|
|
15845
|
+
var keys2 = Object.keys(options);
|
|
15846
|
+
for (var index = 0, length = keys2.length; index < length; index++) {
|
|
15847
|
+
var key = keys2[index];
|
|
15848
15848
|
this[key] = options[key];
|
|
15849
15849
|
}
|
|
15850
15850
|
if (this.encoding)
|
|
@@ -15892,9 +15892,9 @@ var require_legacy_streams = __commonJS({
|
|
|
15892
15892
|
this.mode = 438;
|
|
15893
15893
|
this.bytesWritten = 0;
|
|
15894
15894
|
options = options || {};
|
|
15895
|
-
var
|
|
15896
|
-
for (var index = 0, length =
|
|
15897
|
-
var key =
|
|
15895
|
+
var keys2 = Object.keys(options);
|
|
15896
|
+
for (var index = 0, length = keys2.length; index < length; index++) {
|
|
15897
|
+
var key = keys2[index];
|
|
15898
15898
|
this[key] = options[key];
|
|
15899
15899
|
}
|
|
15900
15900
|
if (this.start !== void 0) {
|
|
@@ -19111,10 +19111,10 @@ var require_glob = __commonJS({
|
|
|
19111
19111
|
if (add === null || typeof add !== "object") {
|
|
19112
19112
|
return origin;
|
|
19113
19113
|
}
|
|
19114
|
-
var
|
|
19115
|
-
var i =
|
|
19114
|
+
var keys2 = Object.keys(add);
|
|
19115
|
+
var i = keys2.length;
|
|
19116
19116
|
while (i--) {
|
|
19117
|
-
origin[
|
|
19117
|
+
origin[keys2[i]] = add[keys2[i]];
|
|
19118
19118
|
}
|
|
19119
19119
|
return origin;
|
|
19120
19120
|
}
|
|
@@ -23180,12 +23180,12 @@ var require_lib3 = __commonJS({
|
|
|
23180
23180
|
SyntaxError: "BABEL_PARSER_SYNTAX_ERROR",
|
|
23181
23181
|
SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
|
|
23182
23182
|
};
|
|
23183
|
-
var reflect = (
|
|
23183
|
+
var reflect = (keys2, last = keys2.length - 1) => ({
|
|
23184
23184
|
get() {
|
|
23185
|
-
return
|
|
23185
|
+
return keys2.reduce((object, key) => object[key], this);
|
|
23186
23186
|
},
|
|
23187
23187
|
set(value) {
|
|
23188
|
-
|
|
23188
|
+
keys2.reduce(
|
|
23189
23189
|
(item, key, i) => i === last ? item[key] = value : item[key],
|
|
23190
23190
|
this
|
|
23191
23191
|
);
|
|
@@ -25118,9 +25118,9 @@ var require_lib3 = __commonJS({
|
|
|
25118
25118
|
}
|
|
25119
25119
|
clone(skipArrays) {
|
|
25120
25120
|
const state = new State();
|
|
25121
|
-
const
|
|
25122
|
-
for (let i = 0, length =
|
|
25123
|
-
const key =
|
|
25121
|
+
const keys2 = Object.keys(this);
|
|
25122
|
+
for (let i = 0, length = keys2.length; i < length; i++) {
|
|
25123
|
+
const key = keys2[i];
|
|
25124
25124
|
let val = this[key];
|
|
25125
25125
|
if (!skipArrays && Array.isArray(val)) {
|
|
25126
25126
|
val = val.slice();
|
|
@@ -27025,9 +27025,9 @@ var require_lib3 = __commonJS({
|
|
|
27025
27025
|
{
|
|
27026
27026
|
NodePrototype.__clone = function() {
|
|
27027
27027
|
const newNode = new Node(void 0, this.start, this.loc.start);
|
|
27028
|
-
const
|
|
27029
|
-
for (let i = 0, length =
|
|
27030
|
-
const key =
|
|
27028
|
+
const keys2 = Object.keys(this);
|
|
27029
|
+
for (let i = 0, length = keys2.length; i < length; i++) {
|
|
27030
|
+
const key = keys2[i];
|
|
27031
27031
|
if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
|
|
27032
27032
|
newNode[key] = this[key];
|
|
27033
27033
|
}
|
|
@@ -37667,109 +37667,6 @@ var require_lib3 = __commonJS({
|
|
|
37667
37667
|
}
|
|
37668
37668
|
});
|
|
37669
37669
|
|
|
37670
|
-
// ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
|
|
37671
|
-
var require_cjs = __commonJS({
|
|
37672
|
-
"../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
|
|
37673
|
-
"use strict";
|
|
37674
|
-
var isMergeableObject = function isMergeableObject2(value) {
|
|
37675
|
-
return isNonNullObject(value) && !isSpecial(value);
|
|
37676
|
-
};
|
|
37677
|
-
function isNonNullObject(value) {
|
|
37678
|
-
return !!value && typeof value === "object";
|
|
37679
|
-
}
|
|
37680
|
-
function isSpecial(value) {
|
|
37681
|
-
var stringValue = Object.prototype.toString.call(value);
|
|
37682
|
-
return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
|
|
37683
|
-
}
|
|
37684
|
-
var canUseSymbol = typeof Symbol === "function" && Symbol.for;
|
|
37685
|
-
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
|
|
37686
|
-
function isReactElement(value) {
|
|
37687
|
-
return value.$$typeof === REACT_ELEMENT_TYPE;
|
|
37688
|
-
}
|
|
37689
|
-
function emptyTarget(val) {
|
|
37690
|
-
return Array.isArray(val) ? [] : {};
|
|
37691
|
-
}
|
|
37692
|
-
function cloneUnlessOtherwiseSpecified(value, options) {
|
|
37693
|
-
return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
|
|
37694
|
-
}
|
|
37695
|
-
function defaultArrayMerge(target, source, options) {
|
|
37696
|
-
return target.concat(source).map(function(element) {
|
|
37697
|
-
return cloneUnlessOtherwiseSpecified(element, options);
|
|
37698
|
-
});
|
|
37699
|
-
}
|
|
37700
|
-
function getMergeFunction(key, options) {
|
|
37701
|
-
if (!options.customMerge) {
|
|
37702
|
-
return deepmerge;
|
|
37703
|
-
}
|
|
37704
|
-
var customMerge = options.customMerge(key);
|
|
37705
|
-
return typeof customMerge === "function" ? customMerge : deepmerge;
|
|
37706
|
-
}
|
|
37707
|
-
function getEnumerableOwnPropertySymbols(target) {
|
|
37708
|
-
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
|
37709
|
-
return target.propertyIsEnumerable(symbol);
|
|
37710
|
-
}) : [];
|
|
37711
|
-
}
|
|
37712
|
-
function getKeys(target) {
|
|
37713
|
-
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
|
|
37714
|
-
}
|
|
37715
|
-
function propertyIsOnObject(object, property) {
|
|
37716
|
-
try {
|
|
37717
|
-
return property in object;
|
|
37718
|
-
} catch (_) {
|
|
37719
|
-
return false;
|
|
37720
|
-
}
|
|
37721
|
-
}
|
|
37722
|
-
function propertyIsUnsafe(target, key) {
|
|
37723
|
-
return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
|
|
37724
|
-
}
|
|
37725
|
-
function mergeObject(target, source, options) {
|
|
37726
|
-
var destination = {};
|
|
37727
|
-
if (options.isMergeableObject(target)) {
|
|
37728
|
-
getKeys(target).forEach(function(key) {
|
|
37729
|
-
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
|
37730
|
-
});
|
|
37731
|
-
}
|
|
37732
|
-
getKeys(source).forEach(function(key) {
|
|
37733
|
-
if (propertyIsUnsafe(target, key)) {
|
|
37734
|
-
return;
|
|
37735
|
-
}
|
|
37736
|
-
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
|
37737
|
-
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
|
37738
|
-
} else {
|
|
37739
|
-
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
|
37740
|
-
}
|
|
37741
|
-
});
|
|
37742
|
-
return destination;
|
|
37743
|
-
}
|
|
37744
|
-
function deepmerge(target, source, options) {
|
|
37745
|
-
options = options || {};
|
|
37746
|
-
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
37747
|
-
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
|
37748
|
-
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
|
37749
|
-
var sourceIsArray = Array.isArray(source);
|
|
37750
|
-
var targetIsArray = Array.isArray(target);
|
|
37751
|
-
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
37752
|
-
if (!sourceAndTargetTypesMatch) {
|
|
37753
|
-
return cloneUnlessOtherwiseSpecified(source, options);
|
|
37754
|
-
} else if (sourceIsArray) {
|
|
37755
|
-
return options.arrayMerge(target, source, options);
|
|
37756
|
-
} else {
|
|
37757
|
-
return mergeObject(target, source, options);
|
|
37758
|
-
}
|
|
37759
|
-
}
|
|
37760
|
-
deepmerge.all = function deepmergeAll(array, options) {
|
|
37761
|
-
if (!Array.isArray(array)) {
|
|
37762
|
-
throw new Error("first argument should be an array");
|
|
37763
|
-
}
|
|
37764
|
-
return array.reduce(function(prev, next) {
|
|
37765
|
-
return deepmerge(prev, next, options);
|
|
37766
|
-
}, {});
|
|
37767
|
-
};
|
|
37768
|
-
var deepmerge_1 = deepmerge;
|
|
37769
|
-
module2.exports = deepmerge_1;
|
|
37770
|
-
}
|
|
37771
|
-
});
|
|
37772
|
-
|
|
37773
37670
|
// ../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js
|
|
37774
37671
|
var require_tslib = __commonJS({
|
|
37775
37672
|
"../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js"(exports, module2) {
|
|
@@ -40039,7 +39936,7 @@ var require_path_visitor = __commonJS({
|
|
|
40039
39936
|
}
|
|
40040
39937
|
return target;
|
|
40041
39938
|
}
|
|
40042
|
-
PathVisitor.visit = function
|
|
39939
|
+
PathVisitor.visit = function visit12(node, methods) {
|
|
40043
39940
|
return PathVisitor.fromMethodsObject(methods).visit(node);
|
|
40044
39941
|
};
|
|
40045
39942
|
var PVp = PathVisitor.prototype;
|
|
@@ -40230,7 +40127,7 @@ var require_path_visitor = __commonJS({
|
|
|
40230
40127
|
this.needToCallTraverse = false;
|
|
40231
40128
|
return visitChildren(path2, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
|
|
40232
40129
|
};
|
|
40233
|
-
sharedContextProtoMethods.visit = function
|
|
40130
|
+
sharedContextProtoMethods.visit = function visit12(path2, newVisitor) {
|
|
40234
40131
|
if (!(this instanceof this.Context)) {
|
|
40235
40132
|
throw new Error("");
|
|
40236
40133
|
}
|
|
@@ -41623,7 +41520,7 @@ var require_main = __commonJS({
|
|
|
41623
41520
|
var someField = _a.someField;
|
|
41624
41521
|
var Type = _a.Type;
|
|
41625
41522
|
var use = _a.use;
|
|
41626
|
-
var
|
|
41523
|
+
var visit12 = _a.visit;
|
|
41627
41524
|
exports.astNodesAreEquivalent = astNodesAreEquivalent;
|
|
41628
41525
|
exports.builders = builders;
|
|
41629
41526
|
exports.builtInTypes = builtInTypes;
|
|
@@ -41640,7 +41537,7 @@ var require_main = __commonJS({
|
|
|
41640
41537
|
exports.someField = someField;
|
|
41641
41538
|
exports.Type = Type;
|
|
41642
41539
|
exports.use = use;
|
|
41643
|
-
exports.visit =
|
|
41540
|
+
exports.visit = visit12;
|
|
41644
41541
|
Object.assign(namedTypes_1.namedTypes, n);
|
|
41645
41542
|
}
|
|
41646
41543
|
});
|
|
@@ -43428,10 +43325,10 @@ var require_util2 = __commonJS({
|
|
|
43428
43325
|
var result = {};
|
|
43429
43326
|
var argc = args.length;
|
|
43430
43327
|
for (var i = 0; i < argc; ++i) {
|
|
43431
|
-
var
|
|
43432
|
-
var keyCount =
|
|
43328
|
+
var keys2 = Object.keys(args[i]);
|
|
43329
|
+
var keyCount = keys2.length;
|
|
43433
43330
|
for (var j = 0; j < keyCount; ++j) {
|
|
43434
|
-
result[
|
|
43331
|
+
result[keys2[j]] = true;
|
|
43435
43332
|
}
|
|
43436
43333
|
}
|
|
43437
43334
|
return result;
|
|
@@ -51091,10 +50988,10 @@ var require_parser2 = __commonJS({
|
|
|
51091
50988
|
loc.indent = newIndent;
|
|
51092
50989
|
this.findTokenRange(loc);
|
|
51093
50990
|
}
|
|
51094
|
-
var
|
|
51095
|
-
var keyCount =
|
|
50991
|
+
var keys2 = Object.keys(node);
|
|
50992
|
+
var keyCount = keys2.length;
|
|
51096
50993
|
for (var i = 0; i < keyCount; ++i) {
|
|
51097
|
-
var key =
|
|
50994
|
+
var key = keys2[i];
|
|
51098
50995
|
if (key === "loc") {
|
|
51099
50996
|
copy[key] = node[key];
|
|
51100
50997
|
} else if (key === "tokens" && node.type === "File") {
|
|
@@ -51853,13 +51750,13 @@ var require_patcher = __commonJS({
|
|
|
51853
51750
|
if (newPath.needsParens() && !oldPath.hasParens()) {
|
|
51854
51751
|
return false;
|
|
51855
51752
|
}
|
|
51856
|
-
var
|
|
51753
|
+
var keys2 = (0, util_1.getUnionOfKeys)(oldNode, newNode);
|
|
51857
51754
|
if (oldNode.type === "File" || newNode.type === "File") {
|
|
51858
|
-
delete
|
|
51755
|
+
delete keys2.tokens;
|
|
51859
51756
|
}
|
|
51860
|
-
delete
|
|
51757
|
+
delete keys2.loc;
|
|
51861
51758
|
var originalReprintCount = reprints.length;
|
|
51862
|
-
for (var k in
|
|
51759
|
+
for (var k in keys2) {
|
|
51863
51760
|
if (k.charAt(0) === "_") {
|
|
51864
51761
|
continue;
|
|
51865
51762
|
}
|
|
@@ -54102,6 +53999,109 @@ var require_main2 = __commonJS({
|
|
|
54102
53999
|
}
|
|
54103
54000
|
});
|
|
54104
54001
|
|
|
54002
|
+
// ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
|
|
54003
|
+
var require_cjs = __commonJS({
|
|
54004
|
+
"../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
|
|
54005
|
+
"use strict";
|
|
54006
|
+
var isMergeableObject = function isMergeableObject2(value) {
|
|
54007
|
+
return isNonNullObject(value) && !isSpecial(value);
|
|
54008
|
+
};
|
|
54009
|
+
function isNonNullObject(value) {
|
|
54010
|
+
return !!value && typeof value === "object";
|
|
54011
|
+
}
|
|
54012
|
+
function isSpecial(value) {
|
|
54013
|
+
var stringValue = Object.prototype.toString.call(value);
|
|
54014
|
+
return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
|
|
54015
|
+
}
|
|
54016
|
+
var canUseSymbol = typeof Symbol === "function" && Symbol.for;
|
|
54017
|
+
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
|
|
54018
|
+
function isReactElement(value) {
|
|
54019
|
+
return value.$$typeof === REACT_ELEMENT_TYPE;
|
|
54020
|
+
}
|
|
54021
|
+
function emptyTarget(val) {
|
|
54022
|
+
return Array.isArray(val) ? [] : {};
|
|
54023
|
+
}
|
|
54024
|
+
function cloneUnlessOtherwiseSpecified(value, options) {
|
|
54025
|
+
return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
|
|
54026
|
+
}
|
|
54027
|
+
function defaultArrayMerge(target, source, options) {
|
|
54028
|
+
return target.concat(source).map(function(element) {
|
|
54029
|
+
return cloneUnlessOtherwiseSpecified(element, options);
|
|
54030
|
+
});
|
|
54031
|
+
}
|
|
54032
|
+
function getMergeFunction(key, options) {
|
|
54033
|
+
if (!options.customMerge) {
|
|
54034
|
+
return deepmerge;
|
|
54035
|
+
}
|
|
54036
|
+
var customMerge = options.customMerge(key);
|
|
54037
|
+
return typeof customMerge === "function" ? customMerge : deepmerge;
|
|
54038
|
+
}
|
|
54039
|
+
function getEnumerableOwnPropertySymbols(target) {
|
|
54040
|
+
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
|
54041
|
+
return target.propertyIsEnumerable(symbol);
|
|
54042
|
+
}) : [];
|
|
54043
|
+
}
|
|
54044
|
+
function getKeys(target) {
|
|
54045
|
+
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
|
|
54046
|
+
}
|
|
54047
|
+
function propertyIsOnObject(object, property) {
|
|
54048
|
+
try {
|
|
54049
|
+
return property in object;
|
|
54050
|
+
} catch (_) {
|
|
54051
|
+
return false;
|
|
54052
|
+
}
|
|
54053
|
+
}
|
|
54054
|
+
function propertyIsUnsafe(target, key) {
|
|
54055
|
+
return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
|
|
54056
|
+
}
|
|
54057
|
+
function mergeObject(target, source, options) {
|
|
54058
|
+
var destination = {};
|
|
54059
|
+
if (options.isMergeableObject(target)) {
|
|
54060
|
+
getKeys(target).forEach(function(key) {
|
|
54061
|
+
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
|
54062
|
+
});
|
|
54063
|
+
}
|
|
54064
|
+
getKeys(source).forEach(function(key) {
|
|
54065
|
+
if (propertyIsUnsafe(target, key)) {
|
|
54066
|
+
return;
|
|
54067
|
+
}
|
|
54068
|
+
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
|
54069
|
+
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
|
54070
|
+
} else {
|
|
54071
|
+
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
|
54072
|
+
}
|
|
54073
|
+
});
|
|
54074
|
+
return destination;
|
|
54075
|
+
}
|
|
54076
|
+
function deepmerge(target, source, options) {
|
|
54077
|
+
options = options || {};
|
|
54078
|
+
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
54079
|
+
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
|
54080
|
+
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
|
54081
|
+
var sourceIsArray = Array.isArray(source);
|
|
54082
|
+
var targetIsArray = Array.isArray(target);
|
|
54083
|
+
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
54084
|
+
if (!sourceAndTargetTypesMatch) {
|
|
54085
|
+
return cloneUnlessOtherwiseSpecified(source, options);
|
|
54086
|
+
} else if (sourceIsArray) {
|
|
54087
|
+
return options.arrayMerge(target, source, options);
|
|
54088
|
+
} else {
|
|
54089
|
+
return mergeObject(target, source, options);
|
|
54090
|
+
}
|
|
54091
|
+
}
|
|
54092
|
+
deepmerge.all = function deepmergeAll(array, options) {
|
|
54093
|
+
if (!Array.isArray(array)) {
|
|
54094
|
+
throw new Error("first argument should be an array");
|
|
54095
|
+
}
|
|
54096
|
+
return array.reduce(function(prev, next) {
|
|
54097
|
+
return deepmerge(prev, next, options);
|
|
54098
|
+
}, {});
|
|
54099
|
+
};
|
|
54100
|
+
var deepmerge_1 = deepmerge;
|
|
54101
|
+
module2.exports = deepmerge_1;
|
|
54102
|
+
}
|
|
54103
|
+
});
|
|
54104
|
+
|
|
54105
54105
|
// src/codegen/index.ts
|
|
54106
54106
|
var codegen_exports = {};
|
|
54107
54107
|
__export(codegen_exports, {
|
|
@@ -54298,9 +54298,9 @@ var fragmentKey = " $fragments";
|
|
|
54298
54298
|
|
|
54299
54299
|
// src/runtime/lib/key.ts
|
|
54300
54300
|
var computeKey = ({ field, args }) => {
|
|
54301
|
-
const
|
|
54302
|
-
|
|
54303
|
-
return args &&
|
|
54301
|
+
const keys2 = Object.keys(args ?? {});
|
|
54302
|
+
keys2.sort();
|
|
54303
|
+
return args && keys2.length > 0 ? `${field}(${keys2.map((key) => `${key}: ${stringifyObjectWithNoQuotesOnKeys(args[key])}`).join(", ")})` : field;
|
|
54304
54304
|
};
|
|
54305
54305
|
var stringifyObjectWithNoQuotesOnKeys = (obj_from_json) => {
|
|
54306
54306
|
if (Array.isArray(obj_from_json)) {
|
|
@@ -56252,7 +56252,8 @@ var CacheInternal = class {
|
|
|
56252
56252
|
parent = rootID,
|
|
56253
56253
|
variables,
|
|
56254
56254
|
stepsFromConnection = null,
|
|
56255
|
-
ignoreMasking
|
|
56255
|
+
ignoreMasking,
|
|
56256
|
+
fullCheck = false
|
|
56256
56257
|
}) {
|
|
56257
56258
|
if (parent === null) {
|
|
56258
56259
|
return { data: null, partial: false, stale: false, hasData: true };
|
|
@@ -56277,11 +56278,28 @@ var CacheInternal = class {
|
|
|
56277
56278
|
let targetSelection = getFieldsForType(selection, typename);
|
|
56278
56279
|
for (const [
|
|
56279
56280
|
attributeName,
|
|
56280
|
-
{ type, keyRaw, selection: fieldSelection, nullable, list, visible }
|
|
56281
|
+
{ type, keyRaw, selection: fieldSelection, nullable, list, visible, directives }
|
|
56281
56282
|
] of Object.entries(targetSelection)) {
|
|
56282
|
-
if (!visible && !ignoreMasking) {
|
|
56283
|
+
if (!visible && !ignoreMasking && !fullCheck) {
|
|
56283
56284
|
continue;
|
|
56284
56285
|
}
|
|
56286
|
+
const includeDirective = directives?.find((d) => {
|
|
56287
|
+
return d.name === "include";
|
|
56288
|
+
});
|
|
56289
|
+
if (includeDirective) {
|
|
56290
|
+
if (!evaluateFragmentVariables(includeDirective.arguments, variables ?? {})["if"]) {
|
|
56291
|
+
continue;
|
|
56292
|
+
}
|
|
56293
|
+
}
|
|
56294
|
+
const skipDirective = directives?.find((d) => {
|
|
56295
|
+
return d.name === "skip";
|
|
56296
|
+
});
|
|
56297
|
+
if (skipDirective) {
|
|
56298
|
+
if (evaluateFragmentVariables(skipDirective.arguments, variables ?? {})["if"]) {
|
|
56299
|
+
continue;
|
|
56300
|
+
}
|
|
56301
|
+
}
|
|
56302
|
+
const fieldTarget = visible || ignoreMasking ? target : {};
|
|
56285
56303
|
const key = evaluateKey(keyRaw, variables);
|
|
56286
56304
|
const { value } = this.storage.get(parent, key);
|
|
56287
56305
|
const dt_field = this.staleManager.getFieldTime(parent, key);
|
|
@@ -56304,16 +56322,16 @@ var CacheInternal = class {
|
|
|
56304
56322
|
partial = true;
|
|
56305
56323
|
}
|
|
56306
56324
|
if (typeof value === "undefined" || value === null) {
|
|
56307
|
-
|
|
56325
|
+
fieldTarget[attributeName] = null;
|
|
56308
56326
|
if (typeof value !== "undefined") {
|
|
56309
56327
|
hasData = true;
|
|
56310
56328
|
}
|
|
56311
56329
|
} else if (!fieldSelection) {
|
|
56312
56330
|
const fnUnmarshal = this.config?.scalars?.[type]?.unmarshal;
|
|
56313
56331
|
if (fnUnmarshal) {
|
|
56314
|
-
|
|
56332
|
+
fieldTarget[attributeName] = fnUnmarshal(value);
|
|
56315
56333
|
} else {
|
|
56316
|
-
|
|
56334
|
+
fieldTarget[attributeName] = value;
|
|
56317
56335
|
}
|
|
56318
56336
|
hasData = true;
|
|
56319
56337
|
} else if (Array.isArray(value)) {
|
|
@@ -56322,9 +56340,10 @@ var CacheInternal = class {
|
|
|
56322
56340
|
variables,
|
|
56323
56341
|
linkedList: value,
|
|
56324
56342
|
stepsFromConnection: nextStep,
|
|
56325
|
-
ignoreMasking: !!ignoreMasking
|
|
56343
|
+
ignoreMasking: !!ignoreMasking,
|
|
56344
|
+
fullCheck
|
|
56326
56345
|
});
|
|
56327
|
-
|
|
56346
|
+
fieldTarget[attributeName] = listValue.data;
|
|
56328
56347
|
if (listValue.partial) {
|
|
56329
56348
|
partial = true;
|
|
56330
56349
|
}
|
|
@@ -56340,9 +56359,10 @@ var CacheInternal = class {
|
|
|
56340
56359
|
selection: fieldSelection,
|
|
56341
56360
|
variables,
|
|
56342
56361
|
stepsFromConnection: nextStep,
|
|
56343
|
-
ignoreMasking
|
|
56362
|
+
ignoreMasking,
|
|
56363
|
+
fullCheck
|
|
56344
56364
|
});
|
|
56345
|
-
|
|
56365
|
+
fieldTarget[attributeName] = objectFields.data;
|
|
56346
56366
|
if (objectFields.partial) {
|
|
56347
56367
|
partial = true;
|
|
56348
56368
|
}
|
|
@@ -56353,7 +56373,7 @@ var CacheInternal = class {
|
|
|
56353
56373
|
hasData = true;
|
|
56354
56374
|
}
|
|
56355
56375
|
}
|
|
56356
|
-
if (
|
|
56376
|
+
if (fieldTarget[attributeName] === null && !nullable && !embeddedCursor) {
|
|
56357
56377
|
cascadeNull = true;
|
|
56358
56378
|
}
|
|
56359
56379
|
}
|
|
@@ -56385,7 +56405,8 @@ var CacheInternal = class {
|
|
|
56385
56405
|
variables,
|
|
56386
56406
|
linkedList,
|
|
56387
56407
|
stepsFromConnection,
|
|
56388
|
-
ignoreMasking
|
|
56408
|
+
ignoreMasking,
|
|
56409
|
+
fullCheck
|
|
56389
56410
|
}) {
|
|
56390
56411
|
const result = [];
|
|
56391
56412
|
let partialData = false;
|
|
@@ -56398,7 +56419,8 @@ var CacheInternal = class {
|
|
|
56398
56419
|
variables,
|
|
56399
56420
|
linkedList: entry,
|
|
56400
56421
|
stepsFromConnection,
|
|
56401
|
-
ignoreMasking
|
|
56422
|
+
ignoreMasking,
|
|
56423
|
+
fullCheck
|
|
56402
56424
|
});
|
|
56403
56425
|
result.push(nestedValue.data);
|
|
56404
56426
|
if (nestedValue.partial) {
|
|
@@ -56420,7 +56442,8 @@ var CacheInternal = class {
|
|
|
56420
56442
|
selection: fields,
|
|
56421
56443
|
variables,
|
|
56422
56444
|
stepsFromConnection,
|
|
56423
|
-
ignoreMasking
|
|
56445
|
+
ignoreMasking,
|
|
56446
|
+
fullCheck
|
|
56424
56447
|
});
|
|
56425
56448
|
result.push(data);
|
|
56426
56449
|
if (partial) {
|
|
@@ -56619,11 +56642,10 @@ var query = documentPlugin(ArtifactKind.Query, function() {
|
|
|
56619
56642
|
cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
|
|
56620
56643
|
}
|
|
56621
56644
|
lastVariables = { ...marshalVariables(ctx) };
|
|
56622
|
-
const variables = lastVariables;
|
|
56623
56645
|
subscriptionSpec = {
|
|
56624
56646
|
rootType: ctx.artifact.rootType,
|
|
56625
56647
|
selection: ctx.artifact.selection,
|
|
56626
|
-
variables: () =>
|
|
56648
|
+
variables: () => lastVariables,
|
|
56627
56649
|
set: (newValue) => {
|
|
56628
56650
|
resolve2(ctx, {
|
|
56629
56651
|
data: newValue,
|
|
@@ -56652,17 +56674,12 @@ var query = documentPlugin(ArtifactKind.Query, function() {
|
|
|
56652
56674
|
// src/runtime/client/plugins/fragment.ts
|
|
56653
56675
|
var fragment = documentPlugin(ArtifactKind.Fragment, function() {
|
|
56654
56676
|
let subscriptionSpec = null;
|
|
56655
|
-
let lastReference = null;
|
|
56656
56677
|
return {
|
|
56657
56678
|
start(ctx, { next, resolve: resolve2, variablesChanged, marshalVariables }) {
|
|
56658
56679
|
if (!ctx.stuff.parentID) {
|
|
56659
56680
|
return next(ctx);
|
|
56660
56681
|
}
|
|
56661
|
-
|
|
56662
|
-
parent: ctx.stuff.parentID,
|
|
56663
|
-
variables: marshalVariables(ctx)
|
|
56664
|
-
};
|
|
56665
|
-
if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged(ctx))) {
|
|
56682
|
+
if (variablesChanged(ctx) && !ctx.cacheParams?.disableSubscriptions) {
|
|
56666
56683
|
if (subscriptionSpec) {
|
|
56667
56684
|
cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
|
|
56668
56685
|
}
|
|
@@ -56685,7 +56702,6 @@ var fragment = documentPlugin(ArtifactKind.Fragment, function() {
|
|
|
56685
56702
|
}
|
|
56686
56703
|
};
|
|
56687
56704
|
cache_default.subscribe(subscriptionSpec, variables);
|
|
56688
|
-
lastReference = currentReference;
|
|
56689
56705
|
}
|
|
56690
56706
|
next(ctx);
|
|
56691
56707
|
},
|
|
@@ -56910,40 +56926,13 @@ var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
|
|
|
56910
56926
|
|
|
56911
56927
|
// src/lib/parse.ts
|
|
56912
56928
|
var import_parser = __toESM(require_lib3(), 1);
|
|
56913
|
-
|
|
56914
|
-
// src/lib/deepMerge.ts
|
|
56915
|
-
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
56916
|
-
function deepMerge(filepath, ...targets) {
|
|
56917
|
-
try {
|
|
56918
|
-
if (targets.length === 1) {
|
|
56919
|
-
return targets[0];
|
|
56920
|
-
} else if (targets.length === 2) {
|
|
56921
|
-
return (0, import_deepmerge.default)(targets[0], targets[1], {
|
|
56922
|
-
arrayMerge: (source, update) => [...new Set(source.concat(update))]
|
|
56923
|
-
});
|
|
56924
|
-
}
|
|
56925
|
-
return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
|
|
56926
|
-
} catch (e) {
|
|
56927
|
-
throw new HoudiniError({
|
|
56928
|
-
filepath,
|
|
56929
|
-
message: "could not merge: " + JSON.stringify(targets, null, 4),
|
|
56930
|
-
description: e.message
|
|
56931
|
-
});
|
|
56932
|
-
}
|
|
56933
|
-
}
|
|
56934
|
-
|
|
56935
|
-
// src/lib/parse.ts
|
|
56936
|
-
async function parseJS(str, config2) {
|
|
56937
|
-
const defaultConfig = {
|
|
56938
|
-
plugins: ["typescript"],
|
|
56939
|
-
sourceType: "module"
|
|
56940
|
-
};
|
|
56929
|
+
async function parseJS(str) {
|
|
56941
56930
|
return {
|
|
56942
56931
|
start: 0,
|
|
56943
|
-
script: (0, import_parser.parse)(
|
|
56944
|
-
|
|
56945
|
-
|
|
56946
|
-
).program,
|
|
56932
|
+
script: (0, import_parser.parse)(str || "", {
|
|
56933
|
+
plugins: ["typescript"],
|
|
56934
|
+
sourceType: "module"
|
|
56935
|
+
}).program,
|
|
56947
56936
|
end: str.length
|
|
56948
56937
|
};
|
|
56949
56938
|
}
|
|
@@ -56993,6 +56982,27 @@ async function cleanupFiles(pathFolder, listOfObj) {
|
|
|
56993
56982
|
return allFilesNotInList;
|
|
56994
56983
|
}
|
|
56995
56984
|
|
|
56985
|
+
// src/lib/deepMerge.ts
|
|
56986
|
+
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
56987
|
+
function deepMerge(filepath, ...targets) {
|
|
56988
|
+
try {
|
|
56989
|
+
if (targets.length === 1) {
|
|
56990
|
+
return targets[0];
|
|
56991
|
+
} else if (targets.length === 2) {
|
|
56992
|
+
return (0, import_deepmerge.default)(targets[0], targets[1], {
|
|
56993
|
+
arrayMerge: (source, update) => [...new Set(source.concat(update))]
|
|
56994
|
+
});
|
|
56995
|
+
}
|
|
56996
|
+
return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
|
|
56997
|
+
} catch (e) {
|
|
56998
|
+
throw new HoudiniError({
|
|
56999
|
+
filepath,
|
|
57000
|
+
message: "could not merge: " + targets,
|
|
57001
|
+
description: e.message
|
|
57002
|
+
});
|
|
57003
|
+
}
|
|
57004
|
+
}
|
|
57005
|
+
|
|
56996
57006
|
// ../../node_modules/.pnpm/estree-walker@3.0.1/node_modules/estree-walker/src/walker.js
|
|
56997
57007
|
var WalkerBase = class {
|
|
56998
57008
|
constructor() {
|
|
@@ -57478,6 +57488,205 @@ function murmurHash(str) {
|
|
|
57478
57488
|
return s;
|
|
57479
57489
|
}
|
|
57480
57490
|
|
|
57491
|
+
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/types.js
|
|
57492
|
+
var VOID = -1;
|
|
57493
|
+
var PRIMITIVE = 0;
|
|
57494
|
+
var ARRAY = 1;
|
|
57495
|
+
var OBJECT = 2;
|
|
57496
|
+
var DATE = 3;
|
|
57497
|
+
var REGEXP = 4;
|
|
57498
|
+
var MAP = 5;
|
|
57499
|
+
var SET = 6;
|
|
57500
|
+
var ERROR = 7;
|
|
57501
|
+
var BIGINT = 8;
|
|
57502
|
+
|
|
57503
|
+
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/deserialize.js
|
|
57504
|
+
var env = typeof self === "object" ? self : globalThis;
|
|
57505
|
+
var deserializer = ($, _) => {
|
|
57506
|
+
const as = (out, index) => {
|
|
57507
|
+
$.set(index, out);
|
|
57508
|
+
return out;
|
|
57509
|
+
};
|
|
57510
|
+
const unpair = (index) => {
|
|
57511
|
+
if ($.has(index))
|
|
57512
|
+
return $.get(index);
|
|
57513
|
+
const [type, value] = _[index];
|
|
57514
|
+
switch (type) {
|
|
57515
|
+
case PRIMITIVE:
|
|
57516
|
+
case VOID:
|
|
57517
|
+
return as(value, index);
|
|
57518
|
+
case ARRAY: {
|
|
57519
|
+
const arr = as([], index);
|
|
57520
|
+
for (const index2 of value)
|
|
57521
|
+
arr.push(unpair(index2));
|
|
57522
|
+
return arr;
|
|
57523
|
+
}
|
|
57524
|
+
case OBJECT: {
|
|
57525
|
+
const object = as({}, index);
|
|
57526
|
+
for (const [key, index2] of value)
|
|
57527
|
+
object[unpair(key)] = unpair(index2);
|
|
57528
|
+
return object;
|
|
57529
|
+
}
|
|
57530
|
+
case DATE:
|
|
57531
|
+
return as(new Date(value), index);
|
|
57532
|
+
case REGEXP: {
|
|
57533
|
+
const { source, flags } = value;
|
|
57534
|
+
return as(new RegExp(source, flags), index);
|
|
57535
|
+
}
|
|
57536
|
+
case MAP: {
|
|
57537
|
+
const map = as(/* @__PURE__ */ new Map(), index);
|
|
57538
|
+
for (const [key, index2] of value)
|
|
57539
|
+
map.set(unpair(key), unpair(index2));
|
|
57540
|
+
return map;
|
|
57541
|
+
}
|
|
57542
|
+
case SET: {
|
|
57543
|
+
const set = as(/* @__PURE__ */ new Set(), index);
|
|
57544
|
+
for (const index2 of value)
|
|
57545
|
+
set.add(unpair(index2));
|
|
57546
|
+
return set;
|
|
57547
|
+
}
|
|
57548
|
+
case ERROR: {
|
|
57549
|
+
const { name, message } = value;
|
|
57550
|
+
return as(new env[name](message), index);
|
|
57551
|
+
}
|
|
57552
|
+
case BIGINT:
|
|
57553
|
+
return as(BigInt(value), index);
|
|
57554
|
+
case "BigInt":
|
|
57555
|
+
return as(Object(BigInt(value)), index);
|
|
57556
|
+
}
|
|
57557
|
+
return as(new env[type](value), index);
|
|
57558
|
+
};
|
|
57559
|
+
return unpair;
|
|
57560
|
+
};
|
|
57561
|
+
var deserialize = (serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0);
|
|
57562
|
+
|
|
57563
|
+
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/serialize.js
|
|
57564
|
+
var EMPTY = "";
|
|
57565
|
+
var { toString } = {};
|
|
57566
|
+
var { keys } = Object;
|
|
57567
|
+
var typeOf = (value) => {
|
|
57568
|
+
const type = typeof value;
|
|
57569
|
+
if (type !== "object" || !value)
|
|
57570
|
+
return [PRIMITIVE, type];
|
|
57571
|
+
const asString = toString.call(value).slice(8, -1);
|
|
57572
|
+
switch (asString) {
|
|
57573
|
+
case "Array":
|
|
57574
|
+
return [ARRAY, EMPTY];
|
|
57575
|
+
case "Object":
|
|
57576
|
+
return [OBJECT, EMPTY];
|
|
57577
|
+
case "Date":
|
|
57578
|
+
return [DATE, EMPTY];
|
|
57579
|
+
case "RegExp":
|
|
57580
|
+
return [REGEXP, EMPTY];
|
|
57581
|
+
case "Map":
|
|
57582
|
+
return [MAP, EMPTY];
|
|
57583
|
+
case "Set":
|
|
57584
|
+
return [SET, EMPTY];
|
|
57585
|
+
}
|
|
57586
|
+
if (asString.includes("Array"))
|
|
57587
|
+
return [ARRAY, asString];
|
|
57588
|
+
if (asString.includes("Error"))
|
|
57589
|
+
return [ERROR, asString];
|
|
57590
|
+
return [OBJECT, asString];
|
|
57591
|
+
};
|
|
57592
|
+
var shouldSkip = ([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol");
|
|
57593
|
+
var serializer = (strict, json, $, _) => {
|
|
57594
|
+
const as = (out, value) => {
|
|
57595
|
+
const index = _.push(out) - 1;
|
|
57596
|
+
$.set(value, index);
|
|
57597
|
+
return index;
|
|
57598
|
+
};
|
|
57599
|
+
const pair = (value) => {
|
|
57600
|
+
if ($.has(value))
|
|
57601
|
+
return $.get(value);
|
|
57602
|
+
let [TYPE, type] = typeOf(value);
|
|
57603
|
+
switch (TYPE) {
|
|
57604
|
+
case PRIMITIVE: {
|
|
57605
|
+
let entry = value;
|
|
57606
|
+
switch (type) {
|
|
57607
|
+
case "bigint":
|
|
57608
|
+
TYPE = BIGINT;
|
|
57609
|
+
entry = value.toString();
|
|
57610
|
+
break;
|
|
57611
|
+
case "function":
|
|
57612
|
+
case "symbol":
|
|
57613
|
+
if (strict)
|
|
57614
|
+
throw new TypeError("unable to serialize " + type);
|
|
57615
|
+
entry = null;
|
|
57616
|
+
break;
|
|
57617
|
+
case "undefined":
|
|
57618
|
+
return as([VOID], value);
|
|
57619
|
+
}
|
|
57620
|
+
return as([TYPE, entry], value);
|
|
57621
|
+
}
|
|
57622
|
+
case ARRAY: {
|
|
57623
|
+
if (type)
|
|
57624
|
+
return as([type, [...value]], value);
|
|
57625
|
+
const arr = [];
|
|
57626
|
+
const index = as([TYPE, arr], value);
|
|
57627
|
+
for (const entry of value)
|
|
57628
|
+
arr.push(pair(entry));
|
|
57629
|
+
return index;
|
|
57630
|
+
}
|
|
57631
|
+
case OBJECT: {
|
|
57632
|
+
if (type) {
|
|
57633
|
+
switch (type) {
|
|
57634
|
+
case "BigInt":
|
|
57635
|
+
return as([type, value.toString()], value);
|
|
57636
|
+
case "Boolean":
|
|
57637
|
+
case "Number":
|
|
57638
|
+
case "String":
|
|
57639
|
+
return as([type, value.valueOf()], value);
|
|
57640
|
+
}
|
|
57641
|
+
}
|
|
57642
|
+
if (json && "toJSON" in value)
|
|
57643
|
+
return pair(value.toJSON());
|
|
57644
|
+
const entries = [];
|
|
57645
|
+
const index = as([TYPE, entries], value);
|
|
57646
|
+
for (const key of keys(value)) {
|
|
57647
|
+
if (strict || !shouldSkip(typeOf(value[key])))
|
|
57648
|
+
entries.push([pair(key), pair(value[key])]);
|
|
57649
|
+
}
|
|
57650
|
+
return index;
|
|
57651
|
+
}
|
|
57652
|
+
case DATE:
|
|
57653
|
+
return as([TYPE, value.toISOString()], value);
|
|
57654
|
+
case REGEXP: {
|
|
57655
|
+
const { source, flags } = value;
|
|
57656
|
+
return as([TYPE, { source, flags }], value);
|
|
57657
|
+
}
|
|
57658
|
+
case MAP: {
|
|
57659
|
+
const entries = [];
|
|
57660
|
+
const index = as([TYPE, entries], value);
|
|
57661
|
+
for (const [key, entry] of value) {
|
|
57662
|
+
if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
|
|
57663
|
+
entries.push([pair(key), pair(entry)]);
|
|
57664
|
+
}
|
|
57665
|
+
return index;
|
|
57666
|
+
}
|
|
57667
|
+
case SET: {
|
|
57668
|
+
const entries = [];
|
|
57669
|
+
const index = as([TYPE, entries], value);
|
|
57670
|
+
for (const entry of value) {
|
|
57671
|
+
if (strict || !shouldSkip(typeOf(entry)))
|
|
57672
|
+
entries.push(pair(entry));
|
|
57673
|
+
}
|
|
57674
|
+
return index;
|
|
57675
|
+
}
|
|
57676
|
+
}
|
|
57677
|
+
const { message } = value;
|
|
57678
|
+
return as([TYPE, { name: type, message }], value);
|
|
57679
|
+
};
|
|
57680
|
+
return pair;
|
|
57681
|
+
};
|
|
57682
|
+
var serialize = (value, { json, lossy } = {}) => {
|
|
57683
|
+
const _ = [];
|
|
57684
|
+
return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
|
|
57685
|
+
};
|
|
57686
|
+
|
|
57687
|
+
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/index.js
|
|
57688
|
+
var esm_default = typeof structuredClone === "function" ? (any, options) => options && ("json" in options || "lossy" in options) ? deserialize(serialize(any, options)) : structuredClone(any) : (any, options) => deserialize(serialize(any, options));
|
|
57689
|
+
|
|
57481
57690
|
// src/codegen/transforms/fragmentVariables.ts
|
|
57482
57691
|
var graphql4 = __toESM(require_graphql2(), 1);
|
|
57483
57692
|
|
|
@@ -57625,100 +57834,106 @@ function inlineFragmentArgs({
|
|
|
57625
57834
|
filepath,
|
|
57626
57835
|
document
|
|
57627
57836
|
).reduce((acc, arg) => ({ ...acc, [arg.name]: arg }), {});
|
|
57628
|
-
const result =
|
|
57629
|
-
|
|
57630
|
-
|
|
57631
|
-
|
|
57632
|
-
|
|
57633
|
-
|
|
57634
|
-
|
|
57635
|
-
|
|
57636
|
-
|
|
57637
|
-
|
|
57638
|
-
|
|
57639
|
-
|
|
57640
|
-
|
|
57641
|
-
|
|
57642
|
-
visitedFragments.
|
|
57643
|
-
|
|
57644
|
-
|
|
57645
|
-
|
|
57646
|
-
if (!args[field]) {
|
|
57647
|
-
args[field] = value;
|
|
57648
|
-
}
|
|
57649
|
-
}
|
|
57650
|
-
generatedFragments[newFragmentName] = inlineFragmentArgs({
|
|
57651
|
-
config: config2,
|
|
57837
|
+
const result = esm_default(
|
|
57838
|
+
graphql4.visit(document, {
|
|
57839
|
+
FragmentSpread(node) {
|
|
57840
|
+
if (!fragmentDefinitions[node.name.value]) {
|
|
57841
|
+
throw new Error("Could not find definition for fragment" + node.name.value);
|
|
57842
|
+
}
|
|
57843
|
+
const { definition } = fragmentDefinitions[node.name.value];
|
|
57844
|
+
let { args, hash } = collectWithArguments(config2, filepath, node, scope);
|
|
57845
|
+
const newFragmentName = `${node.name.value}${hash}`;
|
|
57846
|
+
config2.registerFragmentVariablesHash({
|
|
57847
|
+
hash: newFragmentName,
|
|
57848
|
+
fragment: node.name.value,
|
|
57849
|
+
args
|
|
57850
|
+
});
|
|
57851
|
+
if (!visitedFragments.has(newFragmentName)) {
|
|
57852
|
+
visitedFragments.add(newFragmentName);
|
|
57853
|
+
const defaultArguments = collectDefaultArgumentValues(
|
|
57854
|
+
config2,
|
|
57652
57855
|
filepath,
|
|
57653
|
-
|
|
57654
|
-
document: fragmentDefinitions[node.name.value].definition,
|
|
57655
|
-
generatedFragments,
|
|
57656
|
-
visitedFragments,
|
|
57657
|
-
scope: args,
|
|
57658
|
-
newName: newFragmentName
|
|
57659
|
-
});
|
|
57660
|
-
} else {
|
|
57661
|
-
const doc = fragmentDefinitions[node.name.value].document;
|
|
57662
|
-
const definitionIndex = doc.document.definitions.findIndex(
|
|
57663
|
-
(definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
|
|
57856
|
+
definition
|
|
57664
57857
|
);
|
|
57665
|
-
|
|
57666
|
-
|
|
57667
|
-
|
|
57668
|
-
|
|
57858
|
+
if (args) {
|
|
57859
|
+
for (const [field, value] of Object.entries(defaultArguments || {})) {
|
|
57860
|
+
if (!args[field]) {
|
|
57861
|
+
args[field] = value;
|
|
57862
|
+
}
|
|
57863
|
+
}
|
|
57864
|
+
generatedFragments[newFragmentName] = inlineFragmentArgs({
|
|
57669
57865
|
config: config2,
|
|
57670
57866
|
filepath,
|
|
57671
57867
|
fragmentDefinitions,
|
|
57672
57868
|
document: fragmentDefinitions[node.name.value].definition,
|
|
57673
57869
|
generatedFragments,
|
|
57674
57870
|
visitedFragments,
|
|
57675
|
-
scope:
|
|
57676
|
-
newName:
|
|
57677
|
-
})
|
|
57678
|
-
|
|
57679
|
-
|
|
57680
|
-
|
|
57681
|
-
|
|
57682
|
-
|
|
57871
|
+
scope: args,
|
|
57872
|
+
newName: newFragmentName
|
|
57873
|
+
});
|
|
57874
|
+
} else {
|
|
57875
|
+
const doc = fragmentDefinitions[node.name.value].document;
|
|
57876
|
+
const definitionIndex = doc.document.definitions.findIndex(
|
|
57877
|
+
(definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
|
|
57878
|
+
);
|
|
57879
|
+
const localDefinitions = [...doc.document.definitions];
|
|
57880
|
+
localDefinitions.splice(definitionIndex, 1);
|
|
57881
|
+
localDefinitions.push(
|
|
57882
|
+
inlineFragmentArgs({
|
|
57883
|
+
config: config2,
|
|
57884
|
+
filepath,
|
|
57885
|
+
fragmentDefinitions,
|
|
57886
|
+
document: fragmentDefinitions[node.name.value].definition,
|
|
57887
|
+
generatedFragments,
|
|
57888
|
+
visitedFragments,
|
|
57889
|
+
scope: defaultArguments,
|
|
57890
|
+
newName: ""
|
|
57891
|
+
})
|
|
57892
|
+
);
|
|
57893
|
+
doc.document = {
|
|
57894
|
+
...doc.document,
|
|
57895
|
+
definitions: localDefinitions
|
|
57896
|
+
};
|
|
57897
|
+
}
|
|
57898
|
+
if (node.name.value !== newFragmentName) {
|
|
57899
|
+
return {
|
|
57900
|
+
...node,
|
|
57901
|
+
name: {
|
|
57902
|
+
kind: "Name",
|
|
57903
|
+
value: newFragmentName
|
|
57904
|
+
}
|
|
57905
|
+
};
|
|
57906
|
+
}
|
|
57907
|
+
}
|
|
57908
|
+
},
|
|
57909
|
+
Argument(node) {
|
|
57910
|
+
const value = node.value;
|
|
57911
|
+
if (value.kind !== "Variable") {
|
|
57912
|
+
return;
|
|
57913
|
+
}
|
|
57914
|
+
if (!scope) {
|
|
57915
|
+
throw new HoudiniError({
|
|
57916
|
+
filepath,
|
|
57917
|
+
message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
|
|
57918
|
+
});
|
|
57683
57919
|
}
|
|
57684
|
-
|
|
57920
|
+
const newValue = scope[value.name.value];
|
|
57921
|
+
if (newValue) {
|
|
57685
57922
|
return {
|
|
57686
57923
|
...node,
|
|
57687
|
-
|
|
57688
|
-
kind: "Name",
|
|
57689
|
-
value: newFragmentName
|
|
57690
|
-
}
|
|
57924
|
+
value: newValue
|
|
57691
57925
|
};
|
|
57692
57926
|
}
|
|
57927
|
+
if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
|
|
57928
|
+
throw new HoudiniError({
|
|
57929
|
+
filepath,
|
|
57930
|
+
message: "Missing value for required arg: " + value.name.value
|
|
57931
|
+
});
|
|
57932
|
+
}
|
|
57933
|
+
return null;
|
|
57693
57934
|
}
|
|
57694
|
-
}
|
|
57695
|
-
|
|
57696
|
-
const value = node.value;
|
|
57697
|
-
if (value.kind !== "Variable") {
|
|
57698
|
-
return;
|
|
57699
|
-
}
|
|
57700
|
-
if (!scope) {
|
|
57701
|
-
throw new HoudiniError({
|
|
57702
|
-
filepath,
|
|
57703
|
-
message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
|
|
57704
|
-
});
|
|
57705
|
-
}
|
|
57706
|
-
const newValue = scope[value.name.value];
|
|
57707
|
-
if (newValue) {
|
|
57708
|
-
return {
|
|
57709
|
-
...node,
|
|
57710
|
-
value: newValue
|
|
57711
|
-
};
|
|
57712
|
-
}
|
|
57713
|
-
if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
|
|
57714
|
-
throw new HoudiniError({
|
|
57715
|
-
filepath,
|
|
57716
|
-
message: "Missing value for required arg: " + value.name.value
|
|
57717
|
-
});
|
|
57718
|
-
}
|
|
57719
|
-
return null;
|
|
57720
|
-
}
|
|
57721
|
-
});
|
|
57935
|
+
})
|
|
57936
|
+
);
|
|
57722
57937
|
if (newName) {
|
|
57723
57938
|
result.name = {
|
|
57724
57939
|
kind: graphql4.Kind.NAME,
|
|
@@ -58434,7 +58649,7 @@ async function paginate(config2, documents) {
|
|
|
58434
58649
|
]
|
|
58435
58650
|
}
|
|
58436
58651
|
];
|
|
58437
|
-
const
|
|
58652
|
+
const keys2 = config2.keyFieldsForType(!nodeQuery ? config2.schema.getQueryType()?.name || "" : fragment2).flatMap((key) => {
|
|
58438
58653
|
if (fragment2 === config2.schema.getQueryType()?.name) {
|
|
58439
58654
|
return [];
|
|
58440
58655
|
}
|
|
@@ -58484,7 +58699,7 @@ async function paginate(config2, documents) {
|
|
|
58484
58699
|
}
|
|
58485
58700
|
})
|
|
58486
58701
|
).concat(
|
|
58487
|
-
!nodeQuery ? [] :
|
|
58702
|
+
!nodeQuery ? [] : keys2.map(
|
|
58488
58703
|
(key) => ({
|
|
58489
58704
|
kind: graphql9.Kind.VARIABLE_DEFINITION,
|
|
58490
58705
|
type: key.type,
|
|
@@ -58507,7 +58722,7 @@ async function paginate(config2, documents) {
|
|
|
58507
58722
|
kind: graphql9.Kind.NAME,
|
|
58508
58723
|
value: typeConfig?.resolve?.queryField || "node"
|
|
58509
58724
|
},
|
|
58510
|
-
["arguments"]:
|
|
58725
|
+
["arguments"]: keys2.map((key) => ({
|
|
58511
58726
|
kind: graphql9.Kind.ARGUMENT,
|
|
58512
58727
|
name: {
|
|
58513
58728
|
kind: graphql9.Kind.NAME,
|
|
@@ -59201,12 +59416,24 @@ function prepareSelection({
|
|
|
59201
59416
|
}
|
|
59202
59417
|
const typeName = fieldType.toString();
|
|
59203
59418
|
const pathSoFar = path2.concat(attributeName);
|
|
59204
|
-
const
|
|
59419
|
+
const keys2 = config2.keyFieldsForType(rootType);
|
|
59205
59420
|
let fieldObj = {
|
|
59206
59421
|
type: typeName,
|
|
59207
59422
|
keyRaw: fieldKey(config2, field)
|
|
59208
59423
|
};
|
|
59209
|
-
if (
|
|
59424
|
+
if (field.directives && field.directives.length > 0) {
|
|
59425
|
+
fieldObj.directives = field.directives?.map((directive) => ({
|
|
59426
|
+
name: directive.name.value,
|
|
59427
|
+
arguments: (directive.arguments ?? []).reduce(
|
|
59428
|
+
(acc, arg) => ({
|
|
59429
|
+
...acc,
|
|
59430
|
+
[arg.name.value]: config2.serializeValueMap({ field: arg.value })["field"]
|
|
59431
|
+
}),
|
|
59432
|
+
{}
|
|
59433
|
+
)
|
|
59434
|
+
}));
|
|
59435
|
+
}
|
|
59436
|
+
if (keys2.includes(field.name.value)) {
|
|
59210
59437
|
fieldObj.visible = true;
|
|
59211
59438
|
}
|
|
59212
59439
|
if (nullable) {
|
|
@@ -59431,12 +59658,7 @@ function artifactGenerator(stats) {
|
|
|
59431
59658
|
writeIndexFile(config2, docs)
|
|
59432
59659
|
].concat(
|
|
59433
59660
|
docs.map(async (doc) => {
|
|
59434
|
-
const {
|
|
59435
|
-
document,
|
|
59436
|
-
name,
|
|
59437
|
-
generateArtifact,
|
|
59438
|
-
originalParsed
|
|
59439
|
-
} = doc;
|
|
59661
|
+
const { document, name, generateArtifact, originalParsed, originalString } = doc;
|
|
59440
59662
|
if (!generateArtifact) {
|
|
59441
59663
|
return;
|
|
59442
59664
|
}
|
|
@@ -59851,12 +60073,12 @@ ${exportStatement("config")}
|
|
|
59851
60073
|
},
|
|
59852
60074
|
[path_exports.join(config2.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config: config2, content, importStatement, exportStatement })
|
|
59853
60075
|
}),
|
|
59854
|
-
...config2.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config2,
|
|
60076
|
+
...config2.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config2, plugin2)),
|
|
59855
60077
|
generatePluginIndex({ config: config2, exportStatement: exportStar })
|
|
59856
60078
|
]);
|
|
59857
60079
|
await generateGraphqlReturnTypes(config2, docs);
|
|
59858
60080
|
}
|
|
59859
|
-
async function generatePluginRuntime(config2,
|
|
60081
|
+
async function generatePluginRuntime(config2, plugin2) {
|
|
59860
60082
|
if (houdini_mode.is_testing || !plugin2.includeRuntime) {
|
|
59861
60083
|
return;
|
|
59862
60084
|
}
|
|
@@ -59873,16 +60095,12 @@ async function generatePluginRuntime(config2, docs, plugin2) {
|
|
|
59873
60095
|
});
|
|
59874
60096
|
}
|
|
59875
60097
|
const pluginDir = config2.pluginRuntimeDirectory(plugin2.name);
|
|
59876
|
-
let transformMap = plugin2.transformRuntime ?? {};
|
|
59877
|
-
if (transformMap && typeof transformMap === "function") {
|
|
59878
|
-
transformMap = transformMap(docs);
|
|
59879
|
-
}
|
|
59880
60098
|
await fs_exports.mkdirp(pluginDir);
|
|
59881
60099
|
await fs_exports.recursiveCopy(
|
|
59882
60100
|
runtime_path,
|
|
59883
60101
|
pluginDir,
|
|
59884
60102
|
Object.fromEntries(
|
|
59885
|
-
Object.entries(
|
|
60103
|
+
Object.entries(plugin2.transformRuntime ?? {}).map(([key, value]) => [
|
|
59886
60104
|
path_exports.join(runtime_path, key),
|
|
59887
60105
|
(content) => value({ config: config2, content })
|
|
59888
60106
|
])
|
|
@@ -60322,8 +60540,7 @@ async function generateDocumentTypes(config2, docs) {
|
|
|
60322
60540
|
originalParsed: originalDocument,
|
|
60323
60541
|
name,
|
|
60324
60542
|
filename,
|
|
60325
|
-
generateArtifact
|
|
60326
|
-
artifact
|
|
60543
|
+
generateArtifact
|
|
60327
60544
|
}) => {
|
|
60328
60545
|
if (!generateArtifact) {
|
|
60329
60546
|
return;
|
|
@@ -60362,14 +60579,6 @@ async function generateDocumentTypes(config2, docs) {
|
|
|
60362
60579
|
missingScalars
|
|
60363
60580
|
);
|
|
60364
60581
|
}
|
|
60365
|
-
program.body.push(
|
|
60366
|
-
AST11.exportNamedDeclaration(
|
|
60367
|
-
AST11.tsTypeAliasDeclaration(
|
|
60368
|
-
AST11.identifier(`${name}$artifact`),
|
|
60369
|
-
convertToTs(serializeValue(artifact))
|
|
60370
|
-
)
|
|
60371
|
-
)
|
|
60372
|
-
);
|
|
60373
60582
|
await fs_exports.writeFile(typeDefPath, recast11.print(program).code);
|
|
60374
60583
|
typePaths.push(typeDefPath);
|
|
60375
60584
|
}
|
|
@@ -60396,17 +60605,18 @@ export * from "${module2}"
|
|
|
60396
60605
|
`;
|
|
60397
60606
|
let indexContent = recast11.print(typeIndex).code;
|
|
60398
60607
|
for (const plugin2 of config2.plugins) {
|
|
60399
|
-
if (plugin2.indexFile) {
|
|
60400
|
-
|
|
60401
|
-
config: config2,
|
|
60402
|
-
content: indexContent,
|
|
60403
|
-
exportDefaultAs,
|
|
60404
|
-
exportStarFrom: exportStarFrom2,
|
|
60405
|
-
pluginRoot: config2.pluginDirectory(plugin2.name),
|
|
60406
|
-
typedef: true,
|
|
60407
|
-
documents: docs
|
|
60408
|
-
});
|
|
60608
|
+
if (!plugin2.indexFile) {
|
|
60609
|
+
continue;
|
|
60409
60610
|
}
|
|
60611
|
+
indexContent = plugin2.indexFile({
|
|
60612
|
+
config: config2,
|
|
60613
|
+
content: indexContent,
|
|
60614
|
+
exportDefaultAs,
|
|
60615
|
+
exportStarFrom: exportStarFrom2,
|
|
60616
|
+
pluginRoot: config2.pluginDirectory(plugin2.name),
|
|
60617
|
+
typedef: true,
|
|
60618
|
+
documents: docs
|
|
60619
|
+
});
|
|
60410
60620
|
if (plugin2.includeRuntime) {
|
|
60411
60621
|
indexContent += exportStarFrom2({
|
|
60412
60622
|
module: "./" + path_exports.relative(config2.rootDir, config2.pluginRuntimeDirectory(plugin2.name))
|
|
@@ -60438,42 +60648,6 @@ ${[...missingScalars].map(
|
|
|
60438
60648
|
For more information, please visit this link: ${siteURL}/api/config#custom-scalars`);
|
|
60439
60649
|
}
|
|
60440
60650
|
}
|
|
60441
|
-
function convertToTs(source) {
|
|
60442
|
-
if (source.type === "ObjectExpression") {
|
|
60443
|
-
return AST11.tsTypeLiteral(
|
|
60444
|
-
source.properties.reduce(
|
|
60445
|
-
(props, prop) => {
|
|
60446
|
-
if (prop.type !== "ObjectProperty" || prop.key.type !== "StringLiteral" && prop.key.type === "Identifier") {
|
|
60447
|
-
return props;
|
|
60448
|
-
}
|
|
60449
|
-
return [
|
|
60450
|
-
...props,
|
|
60451
|
-
AST11.tsPropertySignature(
|
|
60452
|
-
prop.key,
|
|
60453
|
-
AST11.tsTypeAnnotation(convertToTs(prop.value))
|
|
60454
|
-
)
|
|
60455
|
-
];
|
|
60456
|
-
},
|
|
60457
|
-
[]
|
|
60458
|
-
)
|
|
60459
|
-
);
|
|
60460
|
-
}
|
|
60461
|
-
if (source.type === "ArrayExpression") {
|
|
60462
|
-
return AST11.tsTupleType(
|
|
60463
|
-
source.elements.map((element) => convertToTs(element))
|
|
60464
|
-
);
|
|
60465
|
-
}
|
|
60466
|
-
if (source.type === "Literal" && typeof source.value === "boolean") {
|
|
60467
|
-
return AST11.tsLiteralType(AST11.booleanLiteral(source.value));
|
|
60468
|
-
}
|
|
60469
|
-
if (source.type === "Literal" && typeof source.value === "number") {
|
|
60470
|
-
return AST11.tsLiteralType(AST11.numericLiteral(source.value));
|
|
60471
|
-
}
|
|
60472
|
-
if (source.type === "Literal" && typeof source.value === "string") {
|
|
60473
|
-
return AST11.tsLiteralType(AST11.stringLiteral(source.value));
|
|
60474
|
-
}
|
|
60475
|
-
return AST11.tsLiteralType(source);
|
|
60476
|
-
}
|
|
60477
60651
|
async function generateOperationTypeDefs(config2, filepath, body, definition, selections, visitedTypes, missingScalars) {
|
|
60478
60652
|
let parentType = null;
|
|
60479
60653
|
if (definition.operation === "query") {
|
|
@@ -60745,10 +60919,10 @@ function typeDefinitions(config2, body, docs, returnType) {
|
|
|
60745
60919
|
typeName = "__ROOT__";
|
|
60746
60920
|
}
|
|
60747
60921
|
let idFields = AST12.tsNeverKeyword();
|
|
60748
|
-
const
|
|
60749
|
-
if (graphql18.isObjectType(type) &&
|
|
60922
|
+
const keys2 = keyFieldsForType(config2.configFile, type.name);
|
|
60923
|
+
if (graphql18.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
|
|
60750
60924
|
idFields = AST12.tsTypeLiteral(
|
|
60751
|
-
|
|
60925
|
+
keys2.map((key) => {
|
|
60752
60926
|
const fieldType = type.getFields()[key];
|
|
60753
60927
|
const unwrapped = unwrapType(config2, fieldType.type);
|
|
60754
60928
|
return AST12.tsPropertySignature(
|
|
@@ -61181,6 +61355,9 @@ async function writeIndexFile2(config2, docs) {
|
|
|
61181
61355
|
module: relative2(config2.pluginRuntimeDirectory(plugin2.name))
|
|
61182
61356
|
});
|
|
61183
61357
|
}
|
|
61358
|
+
if (!plugin2.indexFile) {
|
|
61359
|
+
continue;
|
|
61360
|
+
}
|
|
61184
61361
|
}
|
|
61185
61362
|
await fs_exports.writeFile(path_exports.join(config2.rootDir, "index.js"), body);
|
|
61186
61363
|
}
|
|
@@ -62446,10 +62623,7 @@ async function collectDocuments(config2) {
|
|
|
62446
62623
|
}
|
|
62447
62624
|
}
|
|
62448
62625
|
} catch (err) {
|
|
62449
|
-
throw {
|
|
62450
|
-
message: err.message,
|
|
62451
|
-
filepath
|
|
62452
|
-
};
|
|
62626
|
+
throw new HoudiniError({ ...err, filepath });
|
|
62453
62627
|
}
|
|
62454
62628
|
})
|
|
62455
62629
|
);
|