houdini 1.1.4-react.0 → 1.1.5
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 +603 -442
- package/build/cmd-esm/index.js +603 -442
- package/build/codegen/transforms/fragmentVariables.d.ts +0 -11
- package/build/codegen-cjs/index.js +572 -398
- package/build/codegen-esm/index.js +572 -398
- 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 +188 -196
- package/build/lib-esm/index.js +188 -196
- 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 +594 -424
- package/build/test-esm/index.js +594 -424
- package/build/vite-cjs/index.js +613 -450
- package/build/vite-esm/index.js +613 -450
- 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
package/build/cmd-esm/index.js
CHANGED
|
@@ -1984,16 +1984,16 @@ var require_GraphQLError = __commonJS({
|
|
|
1984
1984
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
1985
1985
|
}
|
|
1986
1986
|
function ownKeys(object, enumerableOnly) {
|
|
1987
|
-
var
|
|
1987
|
+
var keys2 = Object.keys(object);
|
|
1988
1988
|
if (Object.getOwnPropertySymbols) {
|
|
1989
1989
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
1990
1990
|
if (enumerableOnly)
|
|
1991
1991
|
symbols = symbols.filter(function(sym) {
|
|
1992
1992
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
1993
1993
|
});
|
|
1994
|
-
|
|
1994
|
+
keys2.push.apply(keys2, symbols);
|
|
1995
1995
|
}
|
|
1996
|
-
return
|
|
1996
|
+
return keys2;
|
|
1997
1997
|
}
|
|
1998
1998
|
function _objectSpread(target) {
|
|
1999
1999
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -2230,7 +2230,7 @@ var require_GraphQLError = __commonJS({
|
|
|
2230
2230
|
}
|
|
2231
2231
|
_createClass(GraphQLError5, [{
|
|
2232
2232
|
key: "toString",
|
|
2233
|
-
value: function
|
|
2233
|
+
value: function toString2() {
|
|
2234
2234
|
return printError(this);
|
|
2235
2235
|
}
|
|
2236
2236
|
}, {
|
|
@@ -2552,14 +2552,14 @@ var require_inspect = __commonJS({
|
|
|
2552
2552
|
return formatObject2(value, seenValues);
|
|
2553
2553
|
}
|
|
2554
2554
|
function formatObject2(object, seenValues) {
|
|
2555
|
-
var
|
|
2556
|
-
if (
|
|
2555
|
+
var keys2 = Object.keys(object);
|
|
2556
|
+
if (keys2.length === 0) {
|
|
2557
2557
|
return "{}";
|
|
2558
2558
|
}
|
|
2559
2559
|
if (seenValues.length > MAX_RECURSIVE_DEPTH2) {
|
|
2560
2560
|
return "[" + getObjectTag2(object) + "]";
|
|
2561
2561
|
}
|
|
2562
|
-
var properties =
|
|
2562
|
+
var properties = keys2.map(function(key) {
|
|
2563
2563
|
var value = formatValue2(object[key], seenValues);
|
|
2564
2564
|
return key + ": " + value;
|
|
2565
2565
|
});
|
|
@@ -4157,7 +4157,7 @@ var require_visitor = __commonJS({
|
|
|
4157
4157
|
Object.defineProperty(exports, "__esModule", {
|
|
4158
4158
|
value: true
|
|
4159
4159
|
});
|
|
4160
|
-
exports.visit =
|
|
4160
|
+
exports.visit = visit13;
|
|
4161
4161
|
exports.visitInParallel = visitInParallel;
|
|
4162
4162
|
exports.getVisitFn = getVisitFn;
|
|
4163
4163
|
exports.BREAK = exports.QueryDocumentKeys = void 0;
|
|
@@ -4220,11 +4220,11 @@ var require_visitor = __commonJS({
|
|
|
4220
4220
|
exports.QueryDocumentKeys = QueryDocumentKeys;
|
|
4221
4221
|
var BREAK = Object.freeze({});
|
|
4222
4222
|
exports.BREAK = BREAK;
|
|
4223
|
-
function
|
|
4223
|
+
function visit13(root, visitor) {
|
|
4224
4224
|
var visitorKeys = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : QueryDocumentKeys;
|
|
4225
4225
|
var stack = void 0;
|
|
4226
4226
|
var inArray = Array.isArray(root);
|
|
4227
|
-
var
|
|
4227
|
+
var keys2 = [root];
|
|
4228
4228
|
var index = -1;
|
|
4229
4229
|
var edits = [];
|
|
4230
4230
|
var node = void 0;
|
|
@@ -4235,7 +4235,7 @@ var require_visitor = __commonJS({
|
|
|
4235
4235
|
var newRoot = root;
|
|
4236
4236
|
do {
|
|
4237
4237
|
index++;
|
|
4238
|
-
var isLeaving = index ===
|
|
4238
|
+
var isLeaving = index === keys2.length;
|
|
4239
4239
|
var isEdited = isLeaving && edits.length !== 0;
|
|
4240
4240
|
if (isLeaving) {
|
|
4241
4241
|
key = ancestors.length === 0 ? void 0 : path2[path2.length - 1];
|
|
@@ -4268,12 +4268,12 @@ var require_visitor = __commonJS({
|
|
|
4268
4268
|
}
|
|
4269
4269
|
}
|
|
4270
4270
|
index = stack.index;
|
|
4271
|
-
|
|
4271
|
+
keys2 = stack.keys;
|
|
4272
4272
|
edits = stack.edits;
|
|
4273
4273
|
inArray = stack.inArray;
|
|
4274
4274
|
stack = stack.prev;
|
|
4275
4275
|
} else {
|
|
4276
|
-
key = parent ? inArray ? index :
|
|
4276
|
+
key = parent ? inArray ? index : keys2[index] : void 0;
|
|
4277
4277
|
node = parent ? parent[key] : newRoot;
|
|
4278
4278
|
if (node === null || node === void 0) {
|
|
4279
4279
|
continue;
|
|
@@ -4321,12 +4321,12 @@ var require_visitor = __commonJS({
|
|
|
4321
4321
|
stack = {
|
|
4322
4322
|
inArray,
|
|
4323
4323
|
index,
|
|
4324
|
-
keys,
|
|
4324
|
+
keys: keys2,
|
|
4325
4325
|
edits,
|
|
4326
4326
|
prev: stack
|
|
4327
4327
|
};
|
|
4328
4328
|
inArray = Array.isArray(node);
|
|
4329
|
-
|
|
4329
|
+
keys2 = inArray ? node : (_visitorKeys$node$kin = visitorKeys[node.kind]) !== null && _visitorKeys$node$kin !== void 0 ? _visitorKeys$node$kin : [];
|
|
4330
4330
|
index = -1;
|
|
4331
4331
|
edits = [];
|
|
4332
4332
|
if (parent) {
|
|
@@ -5309,7 +5309,7 @@ var require_definition = __commonJS({
|
|
|
5309
5309
|
return new GraphQLList6(ofType);
|
|
5310
5310
|
}
|
|
5311
5311
|
}
|
|
5312
|
-
GraphQLList6.prototype.toString = function
|
|
5312
|
+
GraphQLList6.prototype.toString = function toString2() {
|
|
5313
5313
|
return "[" + String(this.ofType) + "]";
|
|
5314
5314
|
};
|
|
5315
5315
|
GraphQLList6.prototype.toJSON = function toJSON() {
|
|
@@ -5328,7 +5328,7 @@ var require_definition = __commonJS({
|
|
|
5328
5328
|
return new GraphQLNonNull6(ofType);
|
|
5329
5329
|
}
|
|
5330
5330
|
}
|
|
5331
|
-
GraphQLNonNull6.prototype.toString = function
|
|
5331
|
+
GraphQLNonNull6.prototype.toString = function toString2() {
|
|
5332
5332
|
return String(this.ofType) + "!";
|
|
5333
5333
|
};
|
|
5334
5334
|
GraphQLNonNull6.prototype.toJSON = function toJSON() {
|
|
@@ -5424,7 +5424,7 @@ var require_definition = __commonJS({
|
|
|
5424
5424
|
extensionASTNodes: (_this$extensionASTNod = this.extensionASTNodes) !== null && _this$extensionASTNod !== void 0 ? _this$extensionASTNod : []
|
|
5425
5425
|
};
|
|
5426
5426
|
};
|
|
5427
|
-
_proto.toString = function
|
|
5427
|
+
_proto.toString = function toString2() {
|
|
5428
5428
|
return this.name;
|
|
5429
5429
|
};
|
|
5430
5430
|
_proto.toJSON = function toJSON() {
|
|
@@ -5478,7 +5478,7 @@ var require_definition = __commonJS({
|
|
|
5478
5478
|
extensionASTNodes: this.extensionASTNodes || []
|
|
5479
5479
|
};
|
|
5480
5480
|
};
|
|
5481
|
-
_proto2.toString = function
|
|
5481
|
+
_proto2.toString = function toString2() {
|
|
5482
5482
|
return this.name;
|
|
5483
5483
|
};
|
|
5484
5484
|
_proto2.toJSON = function toJSON() {
|
|
@@ -5609,7 +5609,7 @@ var require_definition = __commonJS({
|
|
|
5609
5609
|
extensionASTNodes: (_this$extensionASTNod2 = this.extensionASTNodes) !== null && _this$extensionASTNod2 !== void 0 ? _this$extensionASTNod2 : []
|
|
5610
5610
|
};
|
|
5611
5611
|
};
|
|
5612
|
-
_proto3.toString = function
|
|
5612
|
+
_proto3.toString = function toString2() {
|
|
5613
5613
|
return this.name;
|
|
5614
5614
|
};
|
|
5615
5615
|
_proto3.toJSON = function toJSON() {
|
|
@@ -5656,7 +5656,7 @@ var require_definition = __commonJS({
|
|
|
5656
5656
|
extensionASTNodes: (_this$extensionASTNod3 = this.extensionASTNodes) !== null && _this$extensionASTNod3 !== void 0 ? _this$extensionASTNod3 : []
|
|
5657
5657
|
};
|
|
5658
5658
|
};
|
|
5659
|
-
_proto4.toString = function
|
|
5659
|
+
_proto4.toString = function toString2() {
|
|
5660
5660
|
return this.name;
|
|
5661
5661
|
};
|
|
5662
5662
|
_proto4.toJSON = function toJSON() {
|
|
@@ -5700,7 +5700,7 @@ var require_definition = __commonJS({
|
|
|
5700
5700
|
_proto5.getValue = function getValue(name) {
|
|
5701
5701
|
return this._nameLookup[name];
|
|
5702
5702
|
};
|
|
5703
|
-
_proto5.serialize = function
|
|
5703
|
+
_proto5.serialize = function serialize2(outputValue) {
|
|
5704
5704
|
var enumValue = this._valueLookup.get(outputValue);
|
|
5705
5705
|
if (enumValue === void 0) {
|
|
5706
5706
|
throw new _GraphQLError.GraphQLError('Enum "'.concat(this.name, '" cannot represent value: ').concat((0, _inspect.default)(outputValue)));
|
|
@@ -5752,7 +5752,7 @@ var require_definition = __commonJS({
|
|
|
5752
5752
|
extensionASTNodes: (_this$extensionASTNod4 = this.extensionASTNodes) !== null && _this$extensionASTNod4 !== void 0 ? _this$extensionASTNod4 : []
|
|
5753
5753
|
};
|
|
5754
5754
|
};
|
|
5755
|
-
_proto5.toString = function
|
|
5755
|
+
_proto5.toString = function toString2() {
|
|
5756
5756
|
return this.name;
|
|
5757
5757
|
};
|
|
5758
5758
|
_proto5.toJSON = function toJSON() {
|
|
@@ -5830,7 +5830,7 @@ var require_definition = __commonJS({
|
|
|
5830
5830
|
extensionASTNodes: (_this$extensionASTNod5 = this.extensionASTNodes) !== null && _this$extensionASTNod5 !== void 0 ? _this$extensionASTNod5 : []
|
|
5831
5831
|
};
|
|
5832
5832
|
};
|
|
5833
|
-
_proto6.toString = function
|
|
5833
|
+
_proto6.toString = function toString2() {
|
|
5834
5834
|
return this.name;
|
|
5835
5835
|
};
|
|
5836
5836
|
_proto6.toJSON = function toJSON() {
|
|
@@ -7084,7 +7084,7 @@ var require_directives = __commonJS({
|
|
|
7084
7084
|
astNode: this.astNode
|
|
7085
7085
|
};
|
|
7086
7086
|
};
|
|
7087
|
-
_proto.toString = function
|
|
7087
|
+
_proto.toString = function toString2() {
|
|
7088
7088
|
return "@" + this.name;
|
|
7089
7089
|
};
|
|
7090
7090
|
_proto.toJSON = function toJSON() {
|
|
@@ -9021,16 +9021,16 @@ var require_KnownArgumentNamesRule = __commonJS({
|
|
|
9021
9021
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
9022
9022
|
}
|
|
9023
9023
|
function ownKeys(object, enumerableOnly) {
|
|
9024
|
-
var
|
|
9024
|
+
var keys2 = Object.keys(object);
|
|
9025
9025
|
if (Object.getOwnPropertySymbols) {
|
|
9026
9026
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
9027
9027
|
if (enumerableOnly)
|
|
9028
9028
|
symbols = symbols.filter(function(sym) {
|
|
9029
9029
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
9030
9030
|
});
|
|
9031
|
-
|
|
9031
|
+
keys2.push.apply(keys2, symbols);
|
|
9032
9032
|
}
|
|
9033
|
-
return
|
|
9033
|
+
return keys2;
|
|
9034
9034
|
}
|
|
9035
9035
|
function _objectSpread(target) {
|
|
9036
9036
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -9277,16 +9277,16 @@ var require_ProvidedRequiredArgumentsRule = __commonJS({
|
|
|
9277
9277
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
9278
9278
|
}
|
|
9279
9279
|
function ownKeys(object, enumerableOnly) {
|
|
9280
|
-
var
|
|
9280
|
+
var keys2 = Object.keys(object);
|
|
9281
9281
|
if (Object.getOwnPropertySymbols) {
|
|
9282
9282
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
9283
9283
|
if (enumerableOnly)
|
|
9284
9284
|
symbols = symbols.filter(function(sym) {
|
|
9285
9285
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
9286
9286
|
});
|
|
9287
|
-
|
|
9287
|
+
keys2.push.apply(keys2, symbols);
|
|
9288
9288
|
}
|
|
9289
|
-
return
|
|
9289
|
+
return keys2;
|
|
9290
9290
|
}
|
|
9291
9291
|
function _objectSpread(target) {
|
|
9292
9292
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -10544,13 +10544,13 @@ var require_promiseForObject = __commonJS({
|
|
|
10544
10544
|
});
|
|
10545
10545
|
exports.default = promiseForObject;
|
|
10546
10546
|
function promiseForObject(object) {
|
|
10547
|
-
var
|
|
10548
|
-
var valuesAndPromises =
|
|
10547
|
+
var keys2 = Object.keys(object);
|
|
10548
|
+
var valuesAndPromises = keys2.map(function(name) {
|
|
10549
10549
|
return object[name];
|
|
10550
10550
|
});
|
|
10551
10551
|
return Promise.all(valuesAndPromises).then(function(values) {
|
|
10552
10552
|
return values.reduce(function(resolvedObject, value, i2) {
|
|
10553
|
-
resolvedObject[
|
|
10553
|
+
resolvedObject[keys2[i2]] = value;
|
|
10554
10554
|
return resolvedObject;
|
|
10555
10555
|
}, /* @__PURE__ */ Object.create(null));
|
|
10556
10556
|
});
|
|
@@ -13002,16 +13002,16 @@ var require_getIntrospectionQuery = __commonJS({
|
|
|
13002
13002
|
});
|
|
13003
13003
|
exports.getIntrospectionQuery = getIntrospectionQuery3;
|
|
13004
13004
|
function ownKeys(object, enumerableOnly) {
|
|
13005
|
-
var
|
|
13005
|
+
var keys2 = Object.keys(object);
|
|
13006
13006
|
if (Object.getOwnPropertySymbols) {
|
|
13007
13007
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
13008
13008
|
if (enumerableOnly)
|
|
13009
13009
|
symbols = symbols.filter(function(sym) {
|
|
13010
13010
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
13011
13011
|
});
|
|
13012
|
-
|
|
13012
|
+
keys2.push.apply(keys2, symbols);
|
|
13013
13013
|
}
|
|
13014
|
-
return
|
|
13014
|
+
return keys2;
|
|
13015
13015
|
}
|
|
13016
13016
|
function _objectSpread(target) {
|
|
13017
13017
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -13104,16 +13104,16 @@ var require_introspectionFromSchema = __commonJS({
|
|
|
13104
13104
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
13105
13105
|
}
|
|
13106
13106
|
function ownKeys(object, enumerableOnly) {
|
|
13107
|
-
var
|
|
13107
|
+
var keys2 = Object.keys(object);
|
|
13108
13108
|
if (Object.getOwnPropertySymbols) {
|
|
13109
13109
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
13110
13110
|
if (enumerableOnly)
|
|
13111
13111
|
symbols = symbols.filter(function(sym) {
|
|
13112
13112
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
13113
13113
|
});
|
|
13114
|
-
|
|
13114
|
+
keys2.push.apply(keys2, symbols);
|
|
13115
13115
|
}
|
|
13116
|
-
return
|
|
13116
|
+
return keys2;
|
|
13117
13117
|
}
|
|
13118
13118
|
function _objectSpread(target) {
|
|
13119
13119
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -13445,16 +13445,16 @@ var require_extendSchema = __commonJS({
|
|
|
13445
13445
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
13446
13446
|
}
|
|
13447
13447
|
function ownKeys(object, enumerableOnly) {
|
|
13448
|
-
var
|
|
13448
|
+
var keys2 = Object.keys(object);
|
|
13449
13449
|
if (Object.getOwnPropertySymbols) {
|
|
13450
13450
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
13451
13451
|
if (enumerableOnly)
|
|
13452
13452
|
symbols = symbols.filter(function(sym) {
|
|
13453
13453
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
13454
13454
|
});
|
|
13455
|
-
|
|
13455
|
+
keys2.push.apply(keys2, symbols);
|
|
13456
13456
|
}
|
|
13457
|
-
return
|
|
13457
|
+
return keys2;
|
|
13458
13458
|
}
|
|
13459
13459
|
function _objectSpread(target) {
|
|
13460
13460
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -14045,16 +14045,16 @@ var require_lexicographicSortSchema = __commonJS({
|
|
|
14045
14045
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
14046
14046
|
}
|
|
14047
14047
|
function ownKeys(object, enumerableOnly) {
|
|
14048
|
-
var
|
|
14048
|
+
var keys2 = Object.keys(object);
|
|
14049
14049
|
if (Object.getOwnPropertySymbols) {
|
|
14050
14050
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
14051
14051
|
if (enumerableOnly)
|
|
14052
14052
|
symbols = symbols.filter(function(sym) {
|
|
14053
14053
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
14054
14054
|
});
|
|
14055
|
-
|
|
14055
|
+
keys2.push.apply(keys2, symbols);
|
|
14056
14056
|
}
|
|
14057
|
-
return
|
|
14057
|
+
return keys2;
|
|
14058
14058
|
}
|
|
14059
14059
|
function _objectSpread(target) {
|
|
14060
14060
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -14595,16 +14595,16 @@ var require_findBreakingChanges = __commonJS({
|
|
|
14595
14595
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
14596
14596
|
}
|
|
14597
14597
|
function ownKeys(object, enumerableOnly) {
|
|
14598
|
-
var
|
|
14598
|
+
var keys2 = Object.keys(object);
|
|
14599
14599
|
if (Object.getOwnPropertySymbols) {
|
|
14600
14600
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
14601
14601
|
if (enumerableOnly)
|
|
14602
14602
|
symbols = symbols.filter(function(sym) {
|
|
14603
14603
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
14604
14604
|
});
|
|
14605
|
-
|
|
14605
|
+
keys2.push.apply(keys2, symbols);
|
|
14606
14606
|
}
|
|
14607
|
-
return
|
|
14607
|
+
return keys2;
|
|
14608
14608
|
}
|
|
14609
14609
|
function _objectSpread(target) {
|
|
14610
14610
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -17601,9 +17601,9 @@ var require_legacy_streams = __commonJS({
|
|
|
17601
17601
|
this.mode = 438;
|
|
17602
17602
|
this.bufferSize = 64 * 1024;
|
|
17603
17603
|
options = options || {};
|
|
17604
|
-
var
|
|
17605
|
-
for (var index = 0, length =
|
|
17606
|
-
var key =
|
|
17604
|
+
var keys2 = Object.keys(options);
|
|
17605
|
+
for (var index = 0, length = keys2.length; index < length; index++) {
|
|
17606
|
+
var key = keys2[index];
|
|
17607
17607
|
this[key] = options[key];
|
|
17608
17608
|
}
|
|
17609
17609
|
if (this.encoding)
|
|
@@ -17651,9 +17651,9 @@ var require_legacy_streams = __commonJS({
|
|
|
17651
17651
|
this.mode = 438;
|
|
17652
17652
|
this.bytesWritten = 0;
|
|
17653
17653
|
options = options || {};
|
|
17654
|
-
var
|
|
17655
|
-
for (var index = 0, length =
|
|
17656
|
-
var key =
|
|
17654
|
+
var keys2 = Object.keys(options);
|
|
17655
|
+
for (var index = 0, length = keys2.length; index < length; index++) {
|
|
17656
|
+
var key = keys2[index];
|
|
17657
17657
|
this[key] = options[key];
|
|
17658
17658
|
}
|
|
17659
17659
|
if (this.start !== void 0) {
|
|
@@ -20870,10 +20870,10 @@ var require_glob = __commonJS({
|
|
|
20870
20870
|
if (add === null || typeof add !== "object") {
|
|
20871
20871
|
return origin;
|
|
20872
20872
|
}
|
|
20873
|
-
var
|
|
20874
|
-
var i2 =
|
|
20873
|
+
var keys2 = Object.keys(add);
|
|
20874
|
+
var i2 = keys2.length;
|
|
20875
20875
|
while (i2--) {
|
|
20876
|
-
origin[
|
|
20876
|
+
origin[keys2[i2]] = add[keys2[i2]];
|
|
20877
20877
|
}
|
|
20878
20878
|
return origin;
|
|
20879
20879
|
}
|
|
@@ -29288,12 +29288,12 @@ var require_lib3 = __commonJS({
|
|
|
29288
29288
|
SyntaxError: "BABEL_PARSER_SYNTAX_ERROR",
|
|
29289
29289
|
SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
|
|
29290
29290
|
};
|
|
29291
|
-
var reflect = (
|
|
29291
|
+
var reflect = (keys2, last = keys2.length - 1) => ({
|
|
29292
29292
|
get() {
|
|
29293
|
-
return
|
|
29293
|
+
return keys2.reduce((object, key) => object[key], this);
|
|
29294
29294
|
},
|
|
29295
29295
|
set(value) {
|
|
29296
|
-
|
|
29296
|
+
keys2.reduce(
|
|
29297
29297
|
(item, key, i2) => i2 === last ? item[key] = value : item[key],
|
|
29298
29298
|
this
|
|
29299
29299
|
);
|
|
@@ -31226,9 +31226,9 @@ var require_lib3 = __commonJS({
|
|
|
31226
31226
|
}
|
|
31227
31227
|
clone(skipArrays) {
|
|
31228
31228
|
const state = new State();
|
|
31229
|
-
const
|
|
31230
|
-
for (let i2 = 0, length =
|
|
31231
|
-
const key =
|
|
31229
|
+
const keys2 = Object.keys(this);
|
|
31230
|
+
for (let i2 = 0, length = keys2.length; i2 < length; i2++) {
|
|
31231
|
+
const key = keys2[i2];
|
|
31232
31232
|
let val = this[key];
|
|
31233
31233
|
if (!skipArrays && Array.isArray(val)) {
|
|
31234
31234
|
val = val.slice();
|
|
@@ -33133,9 +33133,9 @@ var require_lib3 = __commonJS({
|
|
|
33133
33133
|
{
|
|
33134
33134
|
NodePrototype.__clone = function() {
|
|
33135
33135
|
const newNode = new Node(void 0, this.start, this.loc.start);
|
|
33136
|
-
const
|
|
33137
|
-
for (let i2 = 0, length =
|
|
33138
|
-
const key =
|
|
33136
|
+
const keys2 = Object.keys(this);
|
|
33137
|
+
for (let i2 = 0, length = keys2.length; i2 < length; i2++) {
|
|
33138
|
+
const key = keys2[i2];
|
|
33139
33139
|
if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
|
|
33140
33140
|
newNode[key] = this[key];
|
|
33141
33141
|
}
|
|
@@ -43775,109 +43775,6 @@ var require_lib3 = __commonJS({
|
|
|
43775
43775
|
}
|
|
43776
43776
|
});
|
|
43777
43777
|
|
|
43778
|
-
// ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
|
|
43779
|
-
var require_cjs = __commonJS({
|
|
43780
|
-
"../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module) {
|
|
43781
|
-
"use strict";
|
|
43782
|
-
var isMergeableObject = function isMergeableObject2(value) {
|
|
43783
|
-
return isNonNullObject(value) && !isSpecial(value);
|
|
43784
|
-
};
|
|
43785
|
-
function isNonNullObject(value) {
|
|
43786
|
-
return !!value && typeof value === "object";
|
|
43787
|
-
}
|
|
43788
|
-
function isSpecial(value) {
|
|
43789
|
-
var stringValue = Object.prototype.toString.call(value);
|
|
43790
|
-
return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
|
|
43791
|
-
}
|
|
43792
|
-
var canUseSymbol = typeof Symbol === "function" && Symbol.for;
|
|
43793
|
-
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
|
|
43794
|
-
function isReactElement(value) {
|
|
43795
|
-
return value.$$typeof === REACT_ELEMENT_TYPE;
|
|
43796
|
-
}
|
|
43797
|
-
function emptyTarget(val) {
|
|
43798
|
-
return Array.isArray(val) ? [] : {};
|
|
43799
|
-
}
|
|
43800
|
-
function cloneUnlessOtherwiseSpecified(value, options) {
|
|
43801
|
-
return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
|
|
43802
|
-
}
|
|
43803
|
-
function defaultArrayMerge(target, source, options) {
|
|
43804
|
-
return target.concat(source).map(function(element) {
|
|
43805
|
-
return cloneUnlessOtherwiseSpecified(element, options);
|
|
43806
|
-
});
|
|
43807
|
-
}
|
|
43808
|
-
function getMergeFunction(key, options) {
|
|
43809
|
-
if (!options.customMerge) {
|
|
43810
|
-
return deepmerge;
|
|
43811
|
-
}
|
|
43812
|
-
var customMerge = options.customMerge(key);
|
|
43813
|
-
return typeof customMerge === "function" ? customMerge : deepmerge;
|
|
43814
|
-
}
|
|
43815
|
-
function getEnumerableOwnPropertySymbols(target) {
|
|
43816
|
-
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
|
43817
|
-
return target.propertyIsEnumerable(symbol);
|
|
43818
|
-
}) : [];
|
|
43819
|
-
}
|
|
43820
|
-
function getKeys(target) {
|
|
43821
|
-
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
|
|
43822
|
-
}
|
|
43823
|
-
function propertyIsOnObject(object, property) {
|
|
43824
|
-
try {
|
|
43825
|
-
return property in object;
|
|
43826
|
-
} catch (_) {
|
|
43827
|
-
return false;
|
|
43828
|
-
}
|
|
43829
|
-
}
|
|
43830
|
-
function propertyIsUnsafe(target, key) {
|
|
43831
|
-
return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
|
|
43832
|
-
}
|
|
43833
|
-
function mergeObject(target, source, options) {
|
|
43834
|
-
var destination = {};
|
|
43835
|
-
if (options.isMergeableObject(target)) {
|
|
43836
|
-
getKeys(target).forEach(function(key) {
|
|
43837
|
-
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
|
43838
|
-
});
|
|
43839
|
-
}
|
|
43840
|
-
getKeys(source).forEach(function(key) {
|
|
43841
|
-
if (propertyIsUnsafe(target, key)) {
|
|
43842
|
-
return;
|
|
43843
|
-
}
|
|
43844
|
-
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
|
43845
|
-
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
|
43846
|
-
} else {
|
|
43847
|
-
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
|
43848
|
-
}
|
|
43849
|
-
});
|
|
43850
|
-
return destination;
|
|
43851
|
-
}
|
|
43852
|
-
function deepmerge(target, source, options) {
|
|
43853
|
-
options = options || {};
|
|
43854
|
-
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
43855
|
-
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
|
43856
|
-
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
|
43857
|
-
var sourceIsArray = Array.isArray(source);
|
|
43858
|
-
var targetIsArray = Array.isArray(target);
|
|
43859
|
-
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
43860
|
-
if (!sourceAndTargetTypesMatch) {
|
|
43861
|
-
return cloneUnlessOtherwiseSpecified(source, options);
|
|
43862
|
-
} else if (sourceIsArray) {
|
|
43863
|
-
return options.arrayMerge(target, source, options);
|
|
43864
|
-
} else {
|
|
43865
|
-
return mergeObject(target, source, options);
|
|
43866
|
-
}
|
|
43867
|
-
}
|
|
43868
|
-
deepmerge.all = function deepmergeAll(array, options) {
|
|
43869
|
-
if (!Array.isArray(array)) {
|
|
43870
|
-
throw new Error("first argument should be an array");
|
|
43871
|
-
}
|
|
43872
|
-
return array.reduce(function(prev, next) {
|
|
43873
|
-
return deepmerge(prev, next, options);
|
|
43874
|
-
}, {});
|
|
43875
|
-
};
|
|
43876
|
-
var deepmerge_1 = deepmerge;
|
|
43877
|
-
module.exports = deepmerge_1;
|
|
43878
|
-
}
|
|
43879
|
-
});
|
|
43880
|
-
|
|
43881
43778
|
// ../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js
|
|
43882
43779
|
var require_tslib = __commonJS({
|
|
43883
43780
|
"../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js"(exports, module) {
|
|
@@ -46147,7 +46044,7 @@ var require_path_visitor = __commonJS({
|
|
|
46147
46044
|
}
|
|
46148
46045
|
return target;
|
|
46149
46046
|
}
|
|
46150
|
-
PathVisitor.visit = function
|
|
46047
|
+
PathVisitor.visit = function visit13(node, methods) {
|
|
46151
46048
|
return PathVisitor.fromMethodsObject(methods).visit(node);
|
|
46152
46049
|
};
|
|
46153
46050
|
var PVp = PathVisitor.prototype;
|
|
@@ -46338,7 +46235,7 @@ var require_path_visitor = __commonJS({
|
|
|
46338
46235
|
this.needToCallTraverse = false;
|
|
46339
46236
|
return visitChildren(path2, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
|
|
46340
46237
|
};
|
|
46341
|
-
sharedContextProtoMethods.visit = function
|
|
46238
|
+
sharedContextProtoMethods.visit = function visit13(path2, newVisitor) {
|
|
46342
46239
|
if (!(this instanceof this.Context)) {
|
|
46343
46240
|
throw new Error("");
|
|
46344
46241
|
}
|
|
@@ -47731,7 +47628,7 @@ var require_main = __commonJS({
|
|
|
47731
47628
|
var someField = _a.someField;
|
|
47732
47629
|
var Type = _a.Type;
|
|
47733
47630
|
var use = _a.use;
|
|
47734
|
-
var
|
|
47631
|
+
var visit13 = _a.visit;
|
|
47735
47632
|
exports.astNodesAreEquivalent = astNodesAreEquivalent;
|
|
47736
47633
|
exports.builders = builders;
|
|
47737
47634
|
exports.builtInTypes = builtInTypes;
|
|
@@ -47748,7 +47645,7 @@ var require_main = __commonJS({
|
|
|
47748
47645
|
exports.someField = someField;
|
|
47749
47646
|
exports.Type = Type;
|
|
47750
47647
|
exports.use = use;
|
|
47751
|
-
exports.visit =
|
|
47648
|
+
exports.visit = visit13;
|
|
47752
47649
|
Object.assign(namedTypes_1.namedTypes, n);
|
|
47753
47650
|
}
|
|
47754
47651
|
});
|
|
@@ -49536,10 +49433,10 @@ var require_util2 = __commonJS({
|
|
|
49536
49433
|
var result = {};
|
|
49537
49434
|
var argc = args.length;
|
|
49538
49435
|
for (var i2 = 0; i2 < argc; ++i2) {
|
|
49539
|
-
var
|
|
49540
|
-
var keyCount =
|
|
49436
|
+
var keys2 = Object.keys(args[i2]);
|
|
49437
|
+
var keyCount = keys2.length;
|
|
49541
49438
|
for (var j = 0; j < keyCount; ++j) {
|
|
49542
|
-
result[
|
|
49439
|
+
result[keys2[j]] = true;
|
|
49543
49440
|
}
|
|
49544
49441
|
}
|
|
49545
49442
|
return result;
|
|
@@ -57199,10 +57096,10 @@ var require_parser2 = __commonJS({
|
|
|
57199
57096
|
loc.indent = newIndent;
|
|
57200
57097
|
this.findTokenRange(loc);
|
|
57201
57098
|
}
|
|
57202
|
-
var
|
|
57203
|
-
var keyCount =
|
|
57099
|
+
var keys2 = Object.keys(node);
|
|
57100
|
+
var keyCount = keys2.length;
|
|
57204
57101
|
for (var i2 = 0; i2 < keyCount; ++i2) {
|
|
57205
|
-
var key =
|
|
57102
|
+
var key = keys2[i2];
|
|
57206
57103
|
if (key === "loc") {
|
|
57207
57104
|
copy[key] = node[key];
|
|
57208
57105
|
} else if (key === "tokens" && node.type === "File") {
|
|
@@ -57961,13 +57858,13 @@ var require_patcher = __commonJS({
|
|
|
57961
57858
|
if (newPath.needsParens() && !oldPath.hasParens()) {
|
|
57962
57859
|
return false;
|
|
57963
57860
|
}
|
|
57964
|
-
var
|
|
57861
|
+
var keys2 = (0, util_1.getUnionOfKeys)(oldNode, newNode);
|
|
57965
57862
|
if (oldNode.type === "File" || newNode.type === "File") {
|
|
57966
|
-
delete
|
|
57863
|
+
delete keys2.tokens;
|
|
57967
57864
|
}
|
|
57968
|
-
delete
|
|
57865
|
+
delete keys2.loc;
|
|
57969
57866
|
var originalReprintCount = reprints.length;
|
|
57970
|
-
for (var k in
|
|
57867
|
+
for (var k in keys2) {
|
|
57971
57868
|
if (k.charAt(0) === "_") {
|
|
57972
57869
|
continue;
|
|
57973
57870
|
}
|
|
@@ -60210,6 +60107,109 @@ var require_main2 = __commonJS({
|
|
|
60210
60107
|
}
|
|
60211
60108
|
});
|
|
60212
60109
|
|
|
60110
|
+
// ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
|
|
60111
|
+
var require_cjs = __commonJS({
|
|
60112
|
+
"../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module) {
|
|
60113
|
+
"use strict";
|
|
60114
|
+
var isMergeableObject = function isMergeableObject2(value) {
|
|
60115
|
+
return isNonNullObject(value) && !isSpecial(value);
|
|
60116
|
+
};
|
|
60117
|
+
function isNonNullObject(value) {
|
|
60118
|
+
return !!value && typeof value === "object";
|
|
60119
|
+
}
|
|
60120
|
+
function isSpecial(value) {
|
|
60121
|
+
var stringValue = Object.prototype.toString.call(value);
|
|
60122
|
+
return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
|
|
60123
|
+
}
|
|
60124
|
+
var canUseSymbol = typeof Symbol === "function" && Symbol.for;
|
|
60125
|
+
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
|
|
60126
|
+
function isReactElement(value) {
|
|
60127
|
+
return value.$$typeof === REACT_ELEMENT_TYPE;
|
|
60128
|
+
}
|
|
60129
|
+
function emptyTarget(val) {
|
|
60130
|
+
return Array.isArray(val) ? [] : {};
|
|
60131
|
+
}
|
|
60132
|
+
function cloneUnlessOtherwiseSpecified(value, options) {
|
|
60133
|
+
return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
|
|
60134
|
+
}
|
|
60135
|
+
function defaultArrayMerge(target, source, options) {
|
|
60136
|
+
return target.concat(source).map(function(element) {
|
|
60137
|
+
return cloneUnlessOtherwiseSpecified(element, options);
|
|
60138
|
+
});
|
|
60139
|
+
}
|
|
60140
|
+
function getMergeFunction(key, options) {
|
|
60141
|
+
if (!options.customMerge) {
|
|
60142
|
+
return deepmerge;
|
|
60143
|
+
}
|
|
60144
|
+
var customMerge = options.customMerge(key);
|
|
60145
|
+
return typeof customMerge === "function" ? customMerge : deepmerge;
|
|
60146
|
+
}
|
|
60147
|
+
function getEnumerableOwnPropertySymbols(target) {
|
|
60148
|
+
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
|
60149
|
+
return target.propertyIsEnumerable(symbol);
|
|
60150
|
+
}) : [];
|
|
60151
|
+
}
|
|
60152
|
+
function getKeys(target) {
|
|
60153
|
+
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
|
|
60154
|
+
}
|
|
60155
|
+
function propertyIsOnObject(object, property) {
|
|
60156
|
+
try {
|
|
60157
|
+
return property in object;
|
|
60158
|
+
} catch (_) {
|
|
60159
|
+
return false;
|
|
60160
|
+
}
|
|
60161
|
+
}
|
|
60162
|
+
function propertyIsUnsafe(target, key) {
|
|
60163
|
+
return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
|
|
60164
|
+
}
|
|
60165
|
+
function mergeObject(target, source, options) {
|
|
60166
|
+
var destination = {};
|
|
60167
|
+
if (options.isMergeableObject(target)) {
|
|
60168
|
+
getKeys(target).forEach(function(key) {
|
|
60169
|
+
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
|
60170
|
+
});
|
|
60171
|
+
}
|
|
60172
|
+
getKeys(source).forEach(function(key) {
|
|
60173
|
+
if (propertyIsUnsafe(target, key)) {
|
|
60174
|
+
return;
|
|
60175
|
+
}
|
|
60176
|
+
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
|
60177
|
+
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
|
60178
|
+
} else {
|
|
60179
|
+
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
|
60180
|
+
}
|
|
60181
|
+
});
|
|
60182
|
+
return destination;
|
|
60183
|
+
}
|
|
60184
|
+
function deepmerge(target, source, options) {
|
|
60185
|
+
options = options || {};
|
|
60186
|
+
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
60187
|
+
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
|
60188
|
+
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
|
60189
|
+
var sourceIsArray = Array.isArray(source);
|
|
60190
|
+
var targetIsArray = Array.isArray(target);
|
|
60191
|
+
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
60192
|
+
if (!sourceAndTargetTypesMatch) {
|
|
60193
|
+
return cloneUnlessOtherwiseSpecified(source, options);
|
|
60194
|
+
} else if (sourceIsArray) {
|
|
60195
|
+
return options.arrayMerge(target, source, options);
|
|
60196
|
+
} else {
|
|
60197
|
+
return mergeObject(target, source, options);
|
|
60198
|
+
}
|
|
60199
|
+
}
|
|
60200
|
+
deepmerge.all = function deepmergeAll(array, options) {
|
|
60201
|
+
if (!Array.isArray(array)) {
|
|
60202
|
+
throw new Error("first argument should be an array");
|
|
60203
|
+
}
|
|
60204
|
+
return array.reduce(function(prev, next) {
|
|
60205
|
+
return deepmerge(prev, next, options);
|
|
60206
|
+
}, {});
|
|
60207
|
+
};
|
|
60208
|
+
var deepmerge_1 = deepmerge;
|
|
60209
|
+
module.exports = deepmerge_1;
|
|
60210
|
+
}
|
|
60211
|
+
});
|
|
60212
|
+
|
|
60213
60213
|
// ../../node_modules/.pnpm/kleur@3.0.3/node_modules/kleur/index.js
|
|
60214
60214
|
var require_kleur = __commonJS({
|
|
60215
60215
|
"../../node_modules/.pnpm/kleur@3.0.3/node_modules/kleur/index.js"(exports, module) {
|
|
@@ -60256,8 +60256,8 @@ var require_kleur = __commonJS({
|
|
|
60256
60256
|
}
|
|
60257
60257
|
return beg + str + end;
|
|
60258
60258
|
}
|
|
60259
|
-
function chain(has,
|
|
60260
|
-
let ctx = { has, keys };
|
|
60259
|
+
function chain(has, keys2) {
|
|
60260
|
+
let ctx = { has, keys: keys2 };
|
|
60261
60261
|
ctx.reset = $.reset.bind(ctx);
|
|
60262
60262
|
ctx.bold = $.bold.bind(ctx);
|
|
60263
60263
|
ctx.dim = $.dim.bind(ctx);
|
|
@@ -62781,7 +62781,7 @@ var require_dist = __commonJS({
|
|
|
62781
62781
|
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/index.js"(exports, module) {
|
|
62782
62782
|
"use strict";
|
|
62783
62783
|
function ownKeys(object, enumerableOnly) {
|
|
62784
|
-
var
|
|
62784
|
+
var keys2 = Object.keys(object);
|
|
62785
62785
|
if (Object.getOwnPropertySymbols) {
|
|
62786
62786
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
62787
62787
|
if (enumerableOnly) {
|
|
@@ -62789,9 +62789,9 @@ var require_dist = __commonJS({
|
|
|
62789
62789
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
62790
62790
|
});
|
|
62791
62791
|
}
|
|
62792
|
-
|
|
62792
|
+
keys2.push.apply(keys2, symbols);
|
|
62793
62793
|
}
|
|
62794
|
-
return
|
|
62794
|
+
return keys2;
|
|
62795
62795
|
}
|
|
62796
62796
|
function _objectSpread(target) {
|
|
62797
62797
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -66001,14 +66001,14 @@ function pushComment(node, entity, field, argument) {
|
|
|
66001
66001
|
if (typeof comment !== "string" || comment.length === 0) {
|
|
66002
66002
|
return;
|
|
66003
66003
|
}
|
|
66004
|
-
const
|
|
66004
|
+
const keys2 = [entity];
|
|
66005
66005
|
if (field) {
|
|
66006
|
-
|
|
66006
|
+
keys2.push(field);
|
|
66007
66007
|
if (argument) {
|
|
66008
|
-
|
|
66008
|
+
keys2.push(argument);
|
|
66009
66009
|
}
|
|
66010
66010
|
}
|
|
66011
|
-
const path2 =
|
|
66011
|
+
const path2 = keys2.join(".");
|
|
66012
66012
|
if (!commentsRegistry[path2]) {
|
|
66013
66013
|
commentsRegistry[path2] = [];
|
|
66014
66014
|
}
|
|
@@ -66027,14 +66027,14 @@ function hasMultilineItems(maybeArray) {
|
|
|
66027
66027
|
function addDescription(cb) {
|
|
66028
66028
|
return (node, _key, _parent, path2, ancestors) => {
|
|
66029
66029
|
var _a;
|
|
66030
|
-
const
|
|
66030
|
+
const keys2 = [];
|
|
66031
66031
|
const parent = path2.reduce((prev, key2) => {
|
|
66032
66032
|
if (["fields", "arguments", "values"].includes(key2) && prev.name) {
|
|
66033
|
-
|
|
66033
|
+
keys2.push(prev.name.value);
|
|
66034
66034
|
}
|
|
66035
66035
|
return prev[key2];
|
|
66036
66036
|
}, ancestors[0]);
|
|
66037
|
-
const key = [...
|
|
66037
|
+
const key = [...keys2, (_a = parent === null || parent === void 0 ? void 0 : parent.name) === null || _a === void 0 ? void 0 : _a.value].filter(Boolean).join(".");
|
|
66038
66038
|
const items = [];
|
|
66039
66039
|
if (node.kind.includes("Definition") && commentsRegistry[key]) {
|
|
66040
66040
|
items.push(...commentsRegistry[key]);
|
|
@@ -68570,9 +68570,9 @@ var fragmentKey = " $fragments";
|
|
|
68570
68570
|
|
|
68571
68571
|
// src/runtime/lib/key.ts
|
|
68572
68572
|
var computeKey = ({ field, args }) => {
|
|
68573
|
-
const
|
|
68574
|
-
|
|
68575
|
-
return args &&
|
|
68573
|
+
const keys2 = Object.keys(args ?? {});
|
|
68574
|
+
keys2.sort();
|
|
68575
|
+
return args && keys2.length > 0 ? `${field}(${keys2.map((key) => `${key}: ${stringifyObjectWithNoQuotesOnKeys(args[key])}`).join(", ")})` : field;
|
|
68576
68576
|
};
|
|
68577
68577
|
var stringifyObjectWithNoQuotesOnKeys = (obj_from_json) => {
|
|
68578
68578
|
if (Array.isArray(obj_from_json)) {
|
|
@@ -71780,7 +71780,8 @@ var CacheInternal = class {
|
|
|
71780
71780
|
parent = rootID,
|
|
71781
71781
|
variables,
|
|
71782
71782
|
stepsFromConnection = null,
|
|
71783
|
-
ignoreMasking
|
|
71783
|
+
ignoreMasking,
|
|
71784
|
+
fullCheck = false
|
|
71784
71785
|
}) {
|
|
71785
71786
|
if (parent === null) {
|
|
71786
71787
|
return { data: null, partial: false, stale: false, hasData: true };
|
|
@@ -71805,11 +71806,28 @@ var CacheInternal = class {
|
|
|
71805
71806
|
let targetSelection = getFieldsForType(selection, typename);
|
|
71806
71807
|
for (const [
|
|
71807
71808
|
attributeName,
|
|
71808
|
-
{ type, keyRaw, selection: fieldSelection, nullable, list, visible }
|
|
71809
|
+
{ type, keyRaw, selection: fieldSelection, nullable, list, visible, directives }
|
|
71809
71810
|
] of Object.entries(targetSelection)) {
|
|
71810
|
-
if (!visible && !ignoreMasking) {
|
|
71811
|
+
if (!visible && !ignoreMasking && !fullCheck) {
|
|
71811
71812
|
continue;
|
|
71812
71813
|
}
|
|
71814
|
+
const includeDirective = directives?.find((d) => {
|
|
71815
|
+
return d.name === "include";
|
|
71816
|
+
});
|
|
71817
|
+
if (includeDirective) {
|
|
71818
|
+
if (!evaluateFragmentVariables(includeDirective.arguments, variables ?? {})["if"]) {
|
|
71819
|
+
continue;
|
|
71820
|
+
}
|
|
71821
|
+
}
|
|
71822
|
+
const skipDirective = directives?.find((d) => {
|
|
71823
|
+
return d.name === "skip";
|
|
71824
|
+
});
|
|
71825
|
+
if (skipDirective) {
|
|
71826
|
+
if (evaluateFragmentVariables(skipDirective.arguments, variables ?? {})["if"]) {
|
|
71827
|
+
continue;
|
|
71828
|
+
}
|
|
71829
|
+
}
|
|
71830
|
+
const fieldTarget = visible || ignoreMasking ? target : {};
|
|
71813
71831
|
const key = evaluateKey(keyRaw, variables);
|
|
71814
71832
|
const { value } = this.storage.get(parent, key);
|
|
71815
71833
|
const dt_field = this.staleManager.getFieldTime(parent, key);
|
|
@@ -71832,16 +71850,16 @@ var CacheInternal = class {
|
|
|
71832
71850
|
partial = true;
|
|
71833
71851
|
}
|
|
71834
71852
|
if (typeof value === "undefined" || value === null) {
|
|
71835
|
-
|
|
71853
|
+
fieldTarget[attributeName] = null;
|
|
71836
71854
|
if (typeof value !== "undefined") {
|
|
71837
71855
|
hasData = true;
|
|
71838
71856
|
}
|
|
71839
71857
|
} else if (!fieldSelection) {
|
|
71840
71858
|
const fnUnmarshal = this.config?.scalars?.[type]?.unmarshal;
|
|
71841
71859
|
if (fnUnmarshal) {
|
|
71842
|
-
|
|
71860
|
+
fieldTarget[attributeName] = fnUnmarshal(value);
|
|
71843
71861
|
} else {
|
|
71844
|
-
|
|
71862
|
+
fieldTarget[attributeName] = value;
|
|
71845
71863
|
}
|
|
71846
71864
|
hasData = true;
|
|
71847
71865
|
} else if (Array.isArray(value)) {
|
|
@@ -71850,9 +71868,10 @@ var CacheInternal = class {
|
|
|
71850
71868
|
variables,
|
|
71851
71869
|
linkedList: value,
|
|
71852
71870
|
stepsFromConnection: nextStep,
|
|
71853
|
-
ignoreMasking: !!ignoreMasking
|
|
71871
|
+
ignoreMasking: !!ignoreMasking,
|
|
71872
|
+
fullCheck
|
|
71854
71873
|
});
|
|
71855
|
-
|
|
71874
|
+
fieldTarget[attributeName] = listValue.data;
|
|
71856
71875
|
if (listValue.partial) {
|
|
71857
71876
|
partial = true;
|
|
71858
71877
|
}
|
|
@@ -71868,9 +71887,10 @@ var CacheInternal = class {
|
|
|
71868
71887
|
selection: fieldSelection,
|
|
71869
71888
|
variables,
|
|
71870
71889
|
stepsFromConnection: nextStep,
|
|
71871
|
-
ignoreMasking
|
|
71890
|
+
ignoreMasking,
|
|
71891
|
+
fullCheck
|
|
71872
71892
|
});
|
|
71873
|
-
|
|
71893
|
+
fieldTarget[attributeName] = objectFields.data;
|
|
71874
71894
|
if (objectFields.partial) {
|
|
71875
71895
|
partial = true;
|
|
71876
71896
|
}
|
|
@@ -71881,7 +71901,7 @@ var CacheInternal = class {
|
|
|
71881
71901
|
hasData = true;
|
|
71882
71902
|
}
|
|
71883
71903
|
}
|
|
71884
|
-
if (
|
|
71904
|
+
if (fieldTarget[attributeName] === null && !nullable && !embeddedCursor) {
|
|
71885
71905
|
cascadeNull = true;
|
|
71886
71906
|
}
|
|
71887
71907
|
}
|
|
@@ -71913,7 +71933,8 @@ var CacheInternal = class {
|
|
|
71913
71933
|
variables,
|
|
71914
71934
|
linkedList,
|
|
71915
71935
|
stepsFromConnection,
|
|
71916
|
-
ignoreMasking
|
|
71936
|
+
ignoreMasking,
|
|
71937
|
+
fullCheck
|
|
71917
71938
|
}) {
|
|
71918
71939
|
const result = [];
|
|
71919
71940
|
let partialData = false;
|
|
@@ -71926,7 +71947,8 @@ var CacheInternal = class {
|
|
|
71926
71947
|
variables,
|
|
71927
71948
|
linkedList: entry,
|
|
71928
71949
|
stepsFromConnection,
|
|
71929
|
-
ignoreMasking
|
|
71950
|
+
ignoreMasking,
|
|
71951
|
+
fullCheck
|
|
71930
71952
|
});
|
|
71931
71953
|
result.push(nestedValue.data);
|
|
71932
71954
|
if (nestedValue.partial) {
|
|
@@ -71948,7 +71970,8 @@ var CacheInternal = class {
|
|
|
71948
71970
|
selection: fields,
|
|
71949
71971
|
variables,
|
|
71950
71972
|
stepsFromConnection,
|
|
71951
|
-
ignoreMasking
|
|
71973
|
+
ignoreMasking,
|
|
71974
|
+
fullCheck
|
|
71952
71975
|
});
|
|
71953
71976
|
result.push(data);
|
|
71954
71977
|
if (partial) {
|
|
@@ -72147,11 +72170,10 @@ var query = documentPlugin(ArtifactKind.Query, function() {
|
|
|
72147
72170
|
cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
|
|
72148
72171
|
}
|
|
72149
72172
|
lastVariables = { ...marshalVariables(ctx) };
|
|
72150
|
-
const variables = lastVariables;
|
|
72151
72173
|
subscriptionSpec = {
|
|
72152
72174
|
rootType: ctx.artifact.rootType,
|
|
72153
72175
|
selection: ctx.artifact.selection,
|
|
72154
|
-
variables: () =>
|
|
72176
|
+
variables: () => lastVariables,
|
|
72155
72177
|
set: (newValue) => {
|
|
72156
72178
|
resolve2(ctx, {
|
|
72157
72179
|
data: newValue,
|
|
@@ -72180,17 +72202,12 @@ var query = documentPlugin(ArtifactKind.Query, function() {
|
|
|
72180
72202
|
// src/runtime/client/plugins/fragment.ts
|
|
72181
72203
|
var fragment = documentPlugin(ArtifactKind.Fragment, function() {
|
|
72182
72204
|
let subscriptionSpec = null;
|
|
72183
|
-
let lastReference = null;
|
|
72184
72205
|
return {
|
|
72185
72206
|
start(ctx, { next, resolve: resolve2, variablesChanged, marshalVariables }) {
|
|
72186
72207
|
if (!ctx.stuff.parentID) {
|
|
72187
72208
|
return next(ctx);
|
|
72188
72209
|
}
|
|
72189
|
-
|
|
72190
|
-
parent: ctx.stuff.parentID,
|
|
72191
|
-
variables: marshalVariables(ctx)
|
|
72192
|
-
};
|
|
72193
|
-
if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged(ctx))) {
|
|
72210
|
+
if (variablesChanged(ctx) && !ctx.cacheParams?.disableSubscriptions) {
|
|
72194
72211
|
if (subscriptionSpec) {
|
|
72195
72212
|
cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
|
|
72196
72213
|
}
|
|
@@ -72213,7 +72230,6 @@ var fragment = documentPlugin(ArtifactKind.Fragment, function() {
|
|
|
72213
72230
|
}
|
|
72214
72231
|
};
|
|
72215
72232
|
cache_default.subscribe(subscriptionSpec, variables);
|
|
72216
|
-
lastReference = currentReference;
|
|
72217
72233
|
}
|
|
72218
72234
|
next(ctx);
|
|
72219
72235
|
},
|
|
@@ -72377,7 +72393,7 @@ var Config = class {
|
|
|
72377
72393
|
this.logLevel = (logLevel || LogLevel.Summary).toLowerCase();
|
|
72378
72394
|
this.defaultFragmentMasking = defaultFragmentMasking;
|
|
72379
72395
|
this.routesDir = join2(this.projectRoot, "src", "routes");
|
|
72380
|
-
this.schemaPollInterval = watchSchema?.interval
|
|
72396
|
+
this.schemaPollInterval = watchSchema?.interval === void 0 ? 2e3 : watchSchema.interval;
|
|
72381
72397
|
this.schemaPollHeaders = watchSchema?.headers ?? {};
|
|
72382
72398
|
this.rootDir = join2(this.projectRoot, "$houdini");
|
|
72383
72399
|
this.#fragmentVariableMaps = {};
|
|
@@ -72396,8 +72412,8 @@ var Config = class {
|
|
|
72396
72412
|
if (!apiURL) {
|
|
72397
72413
|
return "";
|
|
72398
72414
|
}
|
|
72399
|
-
const
|
|
72400
|
-
return this.processEnvValues(
|
|
72415
|
+
const env2 = await this.getEnv();
|
|
72416
|
+
return this.processEnvValues(env2, apiURL);
|
|
72401
72417
|
}
|
|
72402
72418
|
get include() {
|
|
72403
72419
|
if (this.configFile.include) {
|
|
@@ -72412,35 +72428,35 @@ var Config = class {
|
|
|
72412
72428
|
return this.configFile.plugins?.[name] ?? {};
|
|
72413
72429
|
}
|
|
72414
72430
|
async getEnv() {
|
|
72415
|
-
let
|
|
72431
|
+
let env2 = process.env;
|
|
72416
72432
|
for (const plugin2 of this.plugins) {
|
|
72417
72433
|
if (plugin2.env) {
|
|
72418
|
-
|
|
72419
|
-
...await plugin2.env({ config: this, env })
|
|
72434
|
+
env2 = {
|
|
72435
|
+
...await plugin2.env({ config: this, env: env2 })
|
|
72420
72436
|
};
|
|
72421
72437
|
}
|
|
72422
72438
|
}
|
|
72423
|
-
return
|
|
72439
|
+
return env2;
|
|
72424
72440
|
}
|
|
72425
|
-
processEnvValues(
|
|
72441
|
+
processEnvValues(env2, value) {
|
|
72426
72442
|
let headerValue;
|
|
72427
72443
|
if (typeof value === "function") {
|
|
72428
|
-
headerValue = value(
|
|
72444
|
+
headerValue = value(env2);
|
|
72429
72445
|
} else if (value.startsWith("env:")) {
|
|
72430
|
-
headerValue =
|
|
72446
|
+
headerValue = env2[value.slice("env:".length)];
|
|
72431
72447
|
} else {
|
|
72432
72448
|
headerValue = value;
|
|
72433
72449
|
}
|
|
72434
72450
|
return headerValue;
|
|
72435
72451
|
}
|
|
72436
72452
|
async pullHeaders() {
|
|
72437
|
-
const
|
|
72453
|
+
const env2 = await this.getEnv();
|
|
72438
72454
|
if (typeof this.schemaPollHeaders === "function") {
|
|
72439
|
-
return this.schemaPollHeaders(
|
|
72455
|
+
return this.schemaPollHeaders(env2);
|
|
72440
72456
|
}
|
|
72441
72457
|
const headers = Object.fromEntries(
|
|
72442
72458
|
Object.entries(this.schemaPollHeaders || {}).map(([key, value]) => {
|
|
72443
|
-
const headerValue = this.processEnvValues(
|
|
72459
|
+
const headerValue = this.processEnvValues(env2, value);
|
|
72444
72460
|
if (!headerValue) {
|
|
72445
72461
|
return [];
|
|
72446
72462
|
}
|
|
@@ -72721,17 +72737,6 @@ var Config = class {
|
|
|
72721
72737
|
}, []) ?? [];
|
|
72722
72738
|
return !defaultDirectives.includes(name) && (internalDirectives.includes(name) || this.isDeleteDirective(name));
|
|
72723
72739
|
}
|
|
72724
|
-
needsRefetchArtifact(document) {
|
|
72725
|
-
let needsArtifact = false;
|
|
72726
|
-
graphql2.visit(document, {
|
|
72727
|
-
Directive: (node) => {
|
|
72728
|
-
if ([this.paginateDirective].includes(node.name.value)) {
|
|
72729
|
-
needsArtifact = true;
|
|
72730
|
-
}
|
|
72731
|
-
}
|
|
72732
|
-
});
|
|
72733
|
-
return needsArtifact;
|
|
72734
|
-
}
|
|
72735
72740
|
#fragmentVariableMaps;
|
|
72736
72741
|
registerFragmentVariablesHash({
|
|
72737
72742
|
hash,
|
|
@@ -72739,7 +72744,7 @@ var Config = class {
|
|
|
72739
72744
|
fragment: fragment2
|
|
72740
72745
|
}) {
|
|
72741
72746
|
this.#fragmentVariableMaps[hash] = {
|
|
72742
|
-
args: this
|
|
72747
|
+
args: this.serializeValueMap(args),
|
|
72743
72748
|
fragment: fragment2
|
|
72744
72749
|
};
|
|
72745
72750
|
}
|
|
@@ -72750,7 +72755,7 @@ var Config = class {
|
|
|
72750
72755
|
hash
|
|
72751
72756
|
};
|
|
72752
72757
|
}
|
|
72753
|
-
|
|
72758
|
+
serializeValueMap(map) {
|
|
72754
72759
|
if (!map) {
|
|
72755
72760
|
return null;
|
|
72756
72761
|
}
|
|
@@ -72765,7 +72770,7 @@ var Config = class {
|
|
|
72765
72770
|
}
|
|
72766
72771
|
if ("values" in input) {
|
|
72767
72772
|
result.values = input.values.map(
|
|
72768
|
-
(value) => this
|
|
72773
|
+
(value) => this.serializeValueMap({ foo: value }).foo
|
|
72769
72774
|
);
|
|
72770
72775
|
}
|
|
72771
72776
|
if ("name" in input) {
|
|
@@ -72774,7 +72779,7 @@ var Config = class {
|
|
|
72774
72779
|
if ("fields" in input) {
|
|
72775
72780
|
result.fields = input.fields.map((field) => ({
|
|
72776
72781
|
name: field.name,
|
|
72777
|
-
value: this
|
|
72782
|
+
value: this.serializeValueMap({ foo: field.value }).foo
|
|
72778
72783
|
}));
|
|
72779
72784
|
}
|
|
72780
72785
|
}
|
|
@@ -73220,40 +73225,13 @@ var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
|
|
|
73220
73225
|
|
|
73221
73226
|
// src/lib/parse.ts
|
|
73222
73227
|
var import_parser = __toESM(require_lib3(), 1);
|
|
73223
|
-
|
|
73224
|
-
// src/lib/deepMerge.ts
|
|
73225
|
-
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
73226
|
-
function deepMerge(filepath, ...targets) {
|
|
73227
|
-
try {
|
|
73228
|
-
if (targets.length === 1) {
|
|
73229
|
-
return targets[0];
|
|
73230
|
-
} else if (targets.length === 2) {
|
|
73231
|
-
return (0, import_deepmerge.default)(targets[0], targets[1], {
|
|
73232
|
-
arrayMerge: (source, update) => [...new Set(source.concat(update))]
|
|
73233
|
-
});
|
|
73234
|
-
}
|
|
73235
|
-
return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
|
|
73236
|
-
} catch (e2) {
|
|
73237
|
-
throw new HoudiniError({
|
|
73238
|
-
filepath,
|
|
73239
|
-
message: "could not merge: " + JSON.stringify(targets, null, 4),
|
|
73240
|
-
description: e2.message
|
|
73241
|
-
});
|
|
73242
|
-
}
|
|
73243
|
-
}
|
|
73244
|
-
|
|
73245
|
-
// src/lib/parse.ts
|
|
73246
|
-
async function parseJS(str, config2) {
|
|
73247
|
-
const defaultConfig = {
|
|
73248
|
-
plugins: ["typescript"],
|
|
73249
|
-
sourceType: "module"
|
|
73250
|
-
};
|
|
73228
|
+
async function parseJS(str) {
|
|
73251
73229
|
return {
|
|
73252
73230
|
start: 0,
|
|
73253
|
-
script: (0, import_parser.parse)(
|
|
73254
|
-
|
|
73255
|
-
|
|
73256
|
-
).program,
|
|
73231
|
+
script: (0, import_parser.parse)(str || "", {
|
|
73232
|
+
plugins: ["typescript"],
|
|
73233
|
+
sourceType: "module"
|
|
73234
|
+
}).program,
|
|
73257
73235
|
end: str.length
|
|
73258
73236
|
};
|
|
73259
73237
|
}
|
|
@@ -73307,6 +73285,27 @@ async function cleanupFiles(pathFolder, listOfObj) {
|
|
|
73307
73285
|
return allFilesNotInList;
|
|
73308
73286
|
}
|
|
73309
73287
|
|
|
73288
|
+
// src/lib/deepMerge.ts
|
|
73289
|
+
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
73290
|
+
function deepMerge(filepath, ...targets) {
|
|
73291
|
+
try {
|
|
73292
|
+
if (targets.length === 1) {
|
|
73293
|
+
return targets[0];
|
|
73294
|
+
} else if (targets.length === 2) {
|
|
73295
|
+
return (0, import_deepmerge.default)(targets[0], targets[1], {
|
|
73296
|
+
arrayMerge: (source, update) => [...new Set(source.concat(update))]
|
|
73297
|
+
});
|
|
73298
|
+
}
|
|
73299
|
+
return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
|
|
73300
|
+
} catch (e2) {
|
|
73301
|
+
throw new HoudiniError({
|
|
73302
|
+
filepath,
|
|
73303
|
+
message: "could not merge: " + targets,
|
|
73304
|
+
description: e2.message
|
|
73305
|
+
});
|
|
73306
|
+
}
|
|
73307
|
+
}
|
|
73308
|
+
|
|
73310
73309
|
// src/lib/detectTools.ts
|
|
73311
73310
|
async function detectFromPackageJSON(cwd) {
|
|
73312
73311
|
try {
|
|
@@ -73846,6 +73845,205 @@ function murmurHash(str) {
|
|
|
73846
73845
|
return s2;
|
|
73847
73846
|
}
|
|
73848
73847
|
|
|
73848
|
+
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/types.js
|
|
73849
|
+
var VOID = -1;
|
|
73850
|
+
var PRIMITIVE = 0;
|
|
73851
|
+
var ARRAY = 1;
|
|
73852
|
+
var OBJECT = 2;
|
|
73853
|
+
var DATE = 3;
|
|
73854
|
+
var REGEXP = 4;
|
|
73855
|
+
var MAP = 5;
|
|
73856
|
+
var SET = 6;
|
|
73857
|
+
var ERROR = 7;
|
|
73858
|
+
var BIGINT = 8;
|
|
73859
|
+
|
|
73860
|
+
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/deserialize.js
|
|
73861
|
+
var env = typeof self === "object" ? self : globalThis;
|
|
73862
|
+
var deserializer = ($, _) => {
|
|
73863
|
+
const as = (out, index) => {
|
|
73864
|
+
$.set(index, out);
|
|
73865
|
+
return out;
|
|
73866
|
+
};
|
|
73867
|
+
const unpair = (index) => {
|
|
73868
|
+
if ($.has(index))
|
|
73869
|
+
return $.get(index);
|
|
73870
|
+
const [type, value] = _[index];
|
|
73871
|
+
switch (type) {
|
|
73872
|
+
case PRIMITIVE:
|
|
73873
|
+
case VOID:
|
|
73874
|
+
return as(value, index);
|
|
73875
|
+
case ARRAY: {
|
|
73876
|
+
const arr = as([], index);
|
|
73877
|
+
for (const index2 of value)
|
|
73878
|
+
arr.push(unpair(index2));
|
|
73879
|
+
return arr;
|
|
73880
|
+
}
|
|
73881
|
+
case OBJECT: {
|
|
73882
|
+
const object = as({}, index);
|
|
73883
|
+
for (const [key, index2] of value)
|
|
73884
|
+
object[unpair(key)] = unpair(index2);
|
|
73885
|
+
return object;
|
|
73886
|
+
}
|
|
73887
|
+
case DATE:
|
|
73888
|
+
return as(new Date(value), index);
|
|
73889
|
+
case REGEXP: {
|
|
73890
|
+
const { source, flags } = value;
|
|
73891
|
+
return as(new RegExp(source, flags), index);
|
|
73892
|
+
}
|
|
73893
|
+
case MAP: {
|
|
73894
|
+
const map = as(/* @__PURE__ */ new Map(), index);
|
|
73895
|
+
for (const [key, index2] of value)
|
|
73896
|
+
map.set(unpair(key), unpair(index2));
|
|
73897
|
+
return map;
|
|
73898
|
+
}
|
|
73899
|
+
case SET: {
|
|
73900
|
+
const set = as(/* @__PURE__ */ new Set(), index);
|
|
73901
|
+
for (const index2 of value)
|
|
73902
|
+
set.add(unpair(index2));
|
|
73903
|
+
return set;
|
|
73904
|
+
}
|
|
73905
|
+
case ERROR: {
|
|
73906
|
+
const { name, message } = value;
|
|
73907
|
+
return as(new env[name](message), index);
|
|
73908
|
+
}
|
|
73909
|
+
case BIGINT:
|
|
73910
|
+
return as(BigInt(value), index);
|
|
73911
|
+
case "BigInt":
|
|
73912
|
+
return as(Object(BigInt(value)), index);
|
|
73913
|
+
}
|
|
73914
|
+
return as(new env[type](value), index);
|
|
73915
|
+
};
|
|
73916
|
+
return unpair;
|
|
73917
|
+
};
|
|
73918
|
+
var deserialize = (serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0);
|
|
73919
|
+
|
|
73920
|
+
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/serialize.js
|
|
73921
|
+
var EMPTY = "";
|
|
73922
|
+
var { toString } = {};
|
|
73923
|
+
var { keys } = Object;
|
|
73924
|
+
var typeOf = (value) => {
|
|
73925
|
+
const type = typeof value;
|
|
73926
|
+
if (type !== "object" || !value)
|
|
73927
|
+
return [PRIMITIVE, type];
|
|
73928
|
+
const asString = toString.call(value).slice(8, -1);
|
|
73929
|
+
switch (asString) {
|
|
73930
|
+
case "Array":
|
|
73931
|
+
return [ARRAY, EMPTY];
|
|
73932
|
+
case "Object":
|
|
73933
|
+
return [OBJECT, EMPTY];
|
|
73934
|
+
case "Date":
|
|
73935
|
+
return [DATE, EMPTY];
|
|
73936
|
+
case "RegExp":
|
|
73937
|
+
return [REGEXP, EMPTY];
|
|
73938
|
+
case "Map":
|
|
73939
|
+
return [MAP, EMPTY];
|
|
73940
|
+
case "Set":
|
|
73941
|
+
return [SET, EMPTY];
|
|
73942
|
+
}
|
|
73943
|
+
if (asString.includes("Array"))
|
|
73944
|
+
return [ARRAY, asString];
|
|
73945
|
+
if (asString.includes("Error"))
|
|
73946
|
+
return [ERROR, asString];
|
|
73947
|
+
return [OBJECT, asString];
|
|
73948
|
+
};
|
|
73949
|
+
var shouldSkip = ([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol");
|
|
73950
|
+
var serializer = (strict, json, $, _) => {
|
|
73951
|
+
const as = (out, value) => {
|
|
73952
|
+
const index = _.push(out) - 1;
|
|
73953
|
+
$.set(value, index);
|
|
73954
|
+
return index;
|
|
73955
|
+
};
|
|
73956
|
+
const pair = (value) => {
|
|
73957
|
+
if ($.has(value))
|
|
73958
|
+
return $.get(value);
|
|
73959
|
+
let [TYPE, type] = typeOf(value);
|
|
73960
|
+
switch (TYPE) {
|
|
73961
|
+
case PRIMITIVE: {
|
|
73962
|
+
let entry = value;
|
|
73963
|
+
switch (type) {
|
|
73964
|
+
case "bigint":
|
|
73965
|
+
TYPE = BIGINT;
|
|
73966
|
+
entry = value.toString();
|
|
73967
|
+
break;
|
|
73968
|
+
case "function":
|
|
73969
|
+
case "symbol":
|
|
73970
|
+
if (strict)
|
|
73971
|
+
throw new TypeError("unable to serialize " + type);
|
|
73972
|
+
entry = null;
|
|
73973
|
+
break;
|
|
73974
|
+
case "undefined":
|
|
73975
|
+
return as([VOID], value);
|
|
73976
|
+
}
|
|
73977
|
+
return as([TYPE, entry], value);
|
|
73978
|
+
}
|
|
73979
|
+
case ARRAY: {
|
|
73980
|
+
if (type)
|
|
73981
|
+
return as([type, [...value]], value);
|
|
73982
|
+
const arr = [];
|
|
73983
|
+
const index = as([TYPE, arr], value);
|
|
73984
|
+
for (const entry of value)
|
|
73985
|
+
arr.push(pair(entry));
|
|
73986
|
+
return index;
|
|
73987
|
+
}
|
|
73988
|
+
case OBJECT: {
|
|
73989
|
+
if (type) {
|
|
73990
|
+
switch (type) {
|
|
73991
|
+
case "BigInt":
|
|
73992
|
+
return as([type, value.toString()], value);
|
|
73993
|
+
case "Boolean":
|
|
73994
|
+
case "Number":
|
|
73995
|
+
case "String":
|
|
73996
|
+
return as([type, value.valueOf()], value);
|
|
73997
|
+
}
|
|
73998
|
+
}
|
|
73999
|
+
if (json && "toJSON" in value)
|
|
74000
|
+
return pair(value.toJSON());
|
|
74001
|
+
const entries = [];
|
|
74002
|
+
const index = as([TYPE, entries], value);
|
|
74003
|
+
for (const key of keys(value)) {
|
|
74004
|
+
if (strict || !shouldSkip(typeOf(value[key])))
|
|
74005
|
+
entries.push([pair(key), pair(value[key])]);
|
|
74006
|
+
}
|
|
74007
|
+
return index;
|
|
74008
|
+
}
|
|
74009
|
+
case DATE:
|
|
74010
|
+
return as([TYPE, value.toISOString()], value);
|
|
74011
|
+
case REGEXP: {
|
|
74012
|
+
const { source, flags } = value;
|
|
74013
|
+
return as([TYPE, { source, flags }], value);
|
|
74014
|
+
}
|
|
74015
|
+
case MAP: {
|
|
74016
|
+
const entries = [];
|
|
74017
|
+
const index = as([TYPE, entries], value);
|
|
74018
|
+
for (const [key, entry] of value) {
|
|
74019
|
+
if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
|
|
74020
|
+
entries.push([pair(key), pair(entry)]);
|
|
74021
|
+
}
|
|
74022
|
+
return index;
|
|
74023
|
+
}
|
|
74024
|
+
case SET: {
|
|
74025
|
+
const entries = [];
|
|
74026
|
+
const index = as([TYPE, entries], value);
|
|
74027
|
+
for (const entry of value) {
|
|
74028
|
+
if (strict || !shouldSkip(typeOf(entry)))
|
|
74029
|
+
entries.push(pair(entry));
|
|
74030
|
+
}
|
|
74031
|
+
return index;
|
|
74032
|
+
}
|
|
74033
|
+
}
|
|
74034
|
+
const { message } = value;
|
|
74035
|
+
return as([TYPE, { name: type, message }], value);
|
|
74036
|
+
};
|
|
74037
|
+
return pair;
|
|
74038
|
+
};
|
|
74039
|
+
var serialize = (value, { json, lossy } = {}) => {
|
|
74040
|
+
const _ = [];
|
|
74041
|
+
return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
|
|
74042
|
+
};
|
|
74043
|
+
|
|
74044
|
+
// ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/index.js
|
|
74045
|
+
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));
|
|
74046
|
+
|
|
73849
74047
|
// src/codegen/transforms/fragmentVariables.ts
|
|
73850
74048
|
var graphql5 = __toESM(require_graphql2(), 1);
|
|
73851
74049
|
|
|
@@ -73993,61 +74191,67 @@ function inlineFragmentArgs({
|
|
|
73993
74191
|
filepath,
|
|
73994
74192
|
document
|
|
73995
74193
|
).reduce((acc, arg) => ({ ...acc, [arg.name]: arg }), {});
|
|
73996
|
-
const result =
|
|
73997
|
-
|
|
73998
|
-
|
|
73999
|
-
|
|
74000
|
-
|
|
74001
|
-
|
|
74002
|
-
|
|
74003
|
-
|
|
74004
|
-
|
|
74005
|
-
|
|
74006
|
-
|
|
74007
|
-
|
|
74008
|
-
|
|
74009
|
-
|
|
74010
|
-
visitedFragments.
|
|
74011
|
-
|
|
74012
|
-
|
|
74013
|
-
|
|
74014
|
-
if (!args[field]) {
|
|
74015
|
-
args[field] = value;
|
|
74016
|
-
}
|
|
74017
|
-
}
|
|
74018
|
-
generatedFragments[newFragmentName] = inlineFragmentArgs({
|
|
74019
|
-
config: config2,
|
|
74194
|
+
const result = esm_default(
|
|
74195
|
+
graphql5.visit(document, {
|
|
74196
|
+
FragmentSpread(node) {
|
|
74197
|
+
if (!fragmentDefinitions[node.name.value]) {
|
|
74198
|
+
throw new Error("Could not find definition for fragment" + node.name.value);
|
|
74199
|
+
}
|
|
74200
|
+
const { definition } = fragmentDefinitions[node.name.value];
|
|
74201
|
+
let { args, hash } = collectWithArguments(config2, filepath, node, scope);
|
|
74202
|
+
const newFragmentName = `${node.name.value}${hash}`;
|
|
74203
|
+
config2.registerFragmentVariablesHash({
|
|
74204
|
+
hash: newFragmentName,
|
|
74205
|
+
fragment: node.name.value,
|
|
74206
|
+
args
|
|
74207
|
+
});
|
|
74208
|
+
if (!visitedFragments.has(newFragmentName)) {
|
|
74209
|
+
visitedFragments.add(newFragmentName);
|
|
74210
|
+
const defaultArguments = collectDefaultArgumentValues(
|
|
74211
|
+
config2,
|
|
74020
74212
|
filepath,
|
|
74021
|
-
|
|
74022
|
-
document: fragmentDefinitions[node.name.value].definition,
|
|
74023
|
-
generatedFragments,
|
|
74024
|
-
visitedFragments,
|
|
74025
|
-
scope: args,
|
|
74026
|
-
newName: newFragmentName
|
|
74027
|
-
});
|
|
74028
|
-
} else {
|
|
74029
|
-
const doc = fragmentDefinitions[node.name.value].document;
|
|
74030
|
-
const definitionIndex = doc.document.definitions.findIndex(
|
|
74031
|
-
(definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
|
|
74213
|
+
definition
|
|
74032
74214
|
);
|
|
74033
|
-
|
|
74034
|
-
|
|
74035
|
-
|
|
74036
|
-
|
|
74215
|
+
if (args) {
|
|
74216
|
+
for (const [field, value] of Object.entries(defaultArguments || {})) {
|
|
74217
|
+
if (!args[field]) {
|
|
74218
|
+
args[field] = value;
|
|
74219
|
+
}
|
|
74220
|
+
}
|
|
74221
|
+
generatedFragments[newFragmentName] = inlineFragmentArgs({
|
|
74037
74222
|
config: config2,
|
|
74038
74223
|
filepath,
|
|
74039
74224
|
fragmentDefinitions,
|
|
74040
74225
|
document: fragmentDefinitions[node.name.value].definition,
|
|
74041
74226
|
generatedFragments,
|
|
74042
74227
|
visitedFragments,
|
|
74043
|
-
scope:
|
|
74044
|
-
newName:
|
|
74045
|
-
})
|
|
74046
|
-
|
|
74047
|
-
|
|
74048
|
-
|
|
74049
|
-
|
|
74050
|
-
|
|
74228
|
+
scope: args,
|
|
74229
|
+
newName: newFragmentName
|
|
74230
|
+
});
|
|
74231
|
+
} else {
|
|
74232
|
+
const doc = fragmentDefinitions[node.name.value].document;
|
|
74233
|
+
const definitionIndex = doc.document.definitions.findIndex(
|
|
74234
|
+
(definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
|
|
74235
|
+
);
|
|
74236
|
+
const localDefinitions = [...doc.document.definitions];
|
|
74237
|
+
localDefinitions.splice(definitionIndex, 1);
|
|
74238
|
+
localDefinitions.push(
|
|
74239
|
+
inlineFragmentArgs({
|
|
74240
|
+
config: config2,
|
|
74241
|
+
filepath,
|
|
74242
|
+
fragmentDefinitions,
|
|
74243
|
+
document: fragmentDefinitions[node.name.value].definition,
|
|
74244
|
+
generatedFragments,
|
|
74245
|
+
visitedFragments,
|
|
74246
|
+
scope: defaultArguments,
|
|
74247
|
+
newName: ""
|
|
74248
|
+
})
|
|
74249
|
+
);
|
|
74250
|
+
doc.document = {
|
|
74251
|
+
...doc.document,
|
|
74252
|
+
definitions: localDefinitions
|
|
74253
|
+
};
|
|
74254
|
+
}
|
|
74051
74255
|
}
|
|
74052
74256
|
if (node.name.value !== newFragmentName) {
|
|
74053
74257
|
return {
|
|
@@ -74058,35 +74262,35 @@ function inlineFragmentArgs({
|
|
|
74058
74262
|
}
|
|
74059
74263
|
};
|
|
74060
74264
|
}
|
|
74265
|
+
},
|
|
74266
|
+
Argument(node) {
|
|
74267
|
+
const value = node.value;
|
|
74268
|
+
if (value.kind !== "Variable") {
|
|
74269
|
+
return;
|
|
74270
|
+
}
|
|
74271
|
+
if (!scope) {
|
|
74272
|
+
throw new HoudiniError({
|
|
74273
|
+
filepath,
|
|
74274
|
+
message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
|
|
74275
|
+
});
|
|
74276
|
+
}
|
|
74277
|
+
const newValue = scope[value.name.value];
|
|
74278
|
+
if (newValue) {
|
|
74279
|
+
return {
|
|
74280
|
+
...node,
|
|
74281
|
+
value: newValue
|
|
74282
|
+
};
|
|
74283
|
+
}
|
|
74284
|
+
if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
|
|
74285
|
+
throw new HoudiniError({
|
|
74286
|
+
filepath,
|
|
74287
|
+
message: "Missing value for required arg: " + value.name.value
|
|
74288
|
+
});
|
|
74289
|
+
}
|
|
74290
|
+
return null;
|
|
74061
74291
|
}
|
|
74062
|
-
}
|
|
74063
|
-
|
|
74064
|
-
const value = node.value;
|
|
74065
|
-
if (value.kind !== "Variable") {
|
|
74066
|
-
return;
|
|
74067
|
-
}
|
|
74068
|
-
if (!scope) {
|
|
74069
|
-
throw new HoudiniError({
|
|
74070
|
-
filepath,
|
|
74071
|
-
message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
|
|
74072
|
-
});
|
|
74073
|
-
}
|
|
74074
|
-
const newValue = scope[value.name.value];
|
|
74075
|
-
if (newValue) {
|
|
74076
|
-
return {
|
|
74077
|
-
...node,
|
|
74078
|
-
value: newValue
|
|
74079
|
-
};
|
|
74080
|
-
}
|
|
74081
|
-
if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
|
|
74082
|
-
throw new HoudiniError({
|
|
74083
|
-
filepath,
|
|
74084
|
-
message: "Missing value for required arg: " + value.name.value
|
|
74085
|
-
});
|
|
74086
|
-
}
|
|
74087
|
-
return null;
|
|
74088
|
-
}
|
|
74089
|
-
});
|
|
74292
|
+
})
|
|
74293
|
+
);
|
|
74090
74294
|
if (newName) {
|
|
74091
74295
|
result.name = {
|
|
74092
74296
|
kind: graphql5.Kind.NAME,
|
|
@@ -74802,7 +75006,7 @@ async function paginate(config2, documents) {
|
|
|
74802
75006
|
]
|
|
74803
75007
|
}
|
|
74804
75008
|
];
|
|
74805
|
-
const
|
|
75009
|
+
const keys2 = config2.keyFieldsForType(!nodeQuery ? config2.schema.getQueryType()?.name || "" : fragment2).flatMap((key) => {
|
|
74806
75010
|
if (fragment2 === config2.schema.getQueryType()?.name) {
|
|
74807
75011
|
return [];
|
|
74808
75012
|
}
|
|
@@ -74852,7 +75056,7 @@ async function paginate(config2, documents) {
|
|
|
74852
75056
|
}
|
|
74853
75057
|
})
|
|
74854
75058
|
).concat(
|
|
74855
|
-
!nodeQuery ? [] :
|
|
75059
|
+
!nodeQuery ? [] : keys2.map(
|
|
74856
75060
|
(key) => ({
|
|
74857
75061
|
kind: graphql10.Kind.VARIABLE_DEFINITION,
|
|
74858
75062
|
type: key.type,
|
|
@@ -74875,7 +75079,7 @@ async function paginate(config2, documents) {
|
|
|
74875
75079
|
kind: graphql10.Kind.NAME,
|
|
74876
75080
|
value: typeConfig?.resolve?.queryField || "node"
|
|
74877
75081
|
},
|
|
74878
|
-
["arguments"]:
|
|
75082
|
+
["arguments"]: keys2.map((key) => ({
|
|
74879
75083
|
kind: graphql10.Kind.ARGUMENT,
|
|
74880
75084
|
name: {
|
|
74881
75085
|
kind: graphql10.Kind.NAME,
|
|
@@ -75569,12 +75773,24 @@ function prepareSelection({
|
|
|
75569
75773
|
}
|
|
75570
75774
|
const typeName = fieldType.toString();
|
|
75571
75775
|
const pathSoFar = path2.concat(attributeName);
|
|
75572
|
-
const
|
|
75776
|
+
const keys2 = config2.keyFieldsForType(rootType);
|
|
75573
75777
|
let fieldObj = {
|
|
75574
75778
|
type: typeName,
|
|
75575
75779
|
keyRaw: fieldKey(config2, field)
|
|
75576
75780
|
};
|
|
75577
|
-
if (
|
|
75781
|
+
if (field.directives && field.directives.length > 0) {
|
|
75782
|
+
fieldObj.directives = field.directives?.map((directive) => ({
|
|
75783
|
+
name: directive.name.value,
|
|
75784
|
+
arguments: (directive.arguments ?? []).reduce(
|
|
75785
|
+
(acc, arg) => ({
|
|
75786
|
+
...acc,
|
|
75787
|
+
[arg.name.value]: config2.serializeValueMap({ field: arg.value })["field"]
|
|
75788
|
+
}),
|
|
75789
|
+
{}
|
|
75790
|
+
)
|
|
75791
|
+
}));
|
|
75792
|
+
}
|
|
75793
|
+
if (keys2.includes(field.name.value)) {
|
|
75578
75794
|
fieldObj.visible = true;
|
|
75579
75795
|
}
|
|
75580
75796
|
if (nullable) {
|
|
@@ -75799,12 +76015,7 @@ function artifactGenerator(stats) {
|
|
|
75799
76015
|
writeIndexFile(config2, docs)
|
|
75800
76016
|
].concat(
|
|
75801
76017
|
docs.map(async (doc) => {
|
|
75802
|
-
const {
|
|
75803
|
-
document,
|
|
75804
|
-
name,
|
|
75805
|
-
generateArtifact,
|
|
75806
|
-
originalParsed
|
|
75807
|
-
} = doc;
|
|
76018
|
+
const { document, name, generateArtifact, originalParsed, originalString } = doc;
|
|
75808
76019
|
if (!generateArtifact) {
|
|
75809
76020
|
return;
|
|
75810
76021
|
}
|
|
@@ -76219,12 +76430,12 @@ ${exportStatement("config")}
|
|
|
76219
76430
|
},
|
|
76220
76431
|
[path_exports.join(config2.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config: config2, content, importStatement, exportStatement })
|
|
76221
76432
|
}),
|
|
76222
|
-
...config2.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config2,
|
|
76433
|
+
...config2.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config2, plugin2)),
|
|
76223
76434
|
generatePluginIndex({ config: config2, exportStatement: exportStar })
|
|
76224
76435
|
]);
|
|
76225
76436
|
await generateGraphqlReturnTypes(config2, docs);
|
|
76226
76437
|
}
|
|
76227
|
-
async function generatePluginRuntime(config2,
|
|
76438
|
+
async function generatePluginRuntime(config2, plugin2) {
|
|
76228
76439
|
if (houdini_mode.is_testing || !plugin2.includeRuntime) {
|
|
76229
76440
|
return;
|
|
76230
76441
|
}
|
|
@@ -76241,16 +76452,12 @@ async function generatePluginRuntime(config2, docs, plugin2) {
|
|
|
76241
76452
|
});
|
|
76242
76453
|
}
|
|
76243
76454
|
const pluginDir = config2.pluginRuntimeDirectory(plugin2.name);
|
|
76244
|
-
let transformMap = plugin2.transformRuntime ?? {};
|
|
76245
|
-
if (transformMap && typeof transformMap === "function") {
|
|
76246
|
-
transformMap = transformMap(docs);
|
|
76247
|
-
}
|
|
76248
76455
|
await fs_exports.mkdirp(pluginDir);
|
|
76249
76456
|
await fs_exports.recursiveCopy(
|
|
76250
76457
|
runtime_path,
|
|
76251
76458
|
pluginDir,
|
|
76252
76459
|
Object.fromEntries(
|
|
76253
|
-
Object.entries(
|
|
76460
|
+
Object.entries(plugin2.transformRuntime ?? {}).map(([key, value]) => [
|
|
76254
76461
|
path_exports.join(runtime_path, key),
|
|
76255
76462
|
(content) => value({ config: config2, content })
|
|
76256
76463
|
])
|
|
@@ -76690,8 +76897,7 @@ async function generateDocumentTypes(config2, docs) {
|
|
|
76690
76897
|
originalParsed: originalDocument,
|
|
76691
76898
|
name,
|
|
76692
76899
|
filename,
|
|
76693
|
-
generateArtifact
|
|
76694
|
-
artifact
|
|
76900
|
+
generateArtifact
|
|
76695
76901
|
}) => {
|
|
76696
76902
|
if (!generateArtifact) {
|
|
76697
76903
|
return;
|
|
@@ -76730,14 +76936,6 @@ async function generateDocumentTypes(config2, docs) {
|
|
|
76730
76936
|
missingScalars
|
|
76731
76937
|
);
|
|
76732
76938
|
}
|
|
76733
|
-
program3.body.push(
|
|
76734
|
-
AST11.exportNamedDeclaration(
|
|
76735
|
-
AST11.tsTypeAliasDeclaration(
|
|
76736
|
-
AST11.identifier(`${name}$artifact`),
|
|
76737
|
-
convertToTs(serializeValue(artifact))
|
|
76738
|
-
)
|
|
76739
|
-
)
|
|
76740
|
-
);
|
|
76741
76939
|
await fs_exports.writeFile(typeDefPath, recast11.print(program3).code);
|
|
76742
76940
|
typePaths.push(typeDefPath);
|
|
76743
76941
|
}
|
|
@@ -76764,17 +76962,18 @@ export * from "${module}"
|
|
|
76764
76962
|
`;
|
|
76765
76963
|
let indexContent = recast11.print(typeIndex).code;
|
|
76766
76964
|
for (const plugin2 of config2.plugins) {
|
|
76767
|
-
if (plugin2.indexFile) {
|
|
76768
|
-
|
|
76769
|
-
config: config2,
|
|
76770
|
-
content: indexContent,
|
|
76771
|
-
exportDefaultAs,
|
|
76772
|
-
exportStarFrom: exportStarFrom2,
|
|
76773
|
-
pluginRoot: config2.pluginDirectory(plugin2.name),
|
|
76774
|
-
typedef: true,
|
|
76775
|
-
documents: docs
|
|
76776
|
-
});
|
|
76965
|
+
if (!plugin2.indexFile) {
|
|
76966
|
+
continue;
|
|
76777
76967
|
}
|
|
76968
|
+
indexContent = plugin2.indexFile({
|
|
76969
|
+
config: config2,
|
|
76970
|
+
content: indexContent,
|
|
76971
|
+
exportDefaultAs,
|
|
76972
|
+
exportStarFrom: exportStarFrom2,
|
|
76973
|
+
pluginRoot: config2.pluginDirectory(plugin2.name),
|
|
76974
|
+
typedef: true,
|
|
76975
|
+
documents: docs
|
|
76976
|
+
});
|
|
76778
76977
|
if (plugin2.includeRuntime) {
|
|
76779
76978
|
indexContent += exportStarFrom2({
|
|
76780
76979
|
module: "./" + path_exports.relative(config2.rootDir, config2.pluginRuntimeDirectory(plugin2.name))
|
|
@@ -76806,42 +77005,6 @@ ${[...missingScalars].map(
|
|
|
76806
77005
|
For more information, please visit this link: ${siteURL}/api/config#custom-scalars`);
|
|
76807
77006
|
}
|
|
76808
77007
|
}
|
|
76809
|
-
function convertToTs(source) {
|
|
76810
|
-
if (source.type === "ObjectExpression") {
|
|
76811
|
-
return AST11.tsTypeLiteral(
|
|
76812
|
-
source.properties.reduce(
|
|
76813
|
-
(props, prop) => {
|
|
76814
|
-
if (prop.type !== "ObjectProperty" || prop.key.type !== "StringLiteral" && prop.key.type === "Identifier") {
|
|
76815
|
-
return props;
|
|
76816
|
-
}
|
|
76817
|
-
return [
|
|
76818
|
-
...props,
|
|
76819
|
-
AST11.tsPropertySignature(
|
|
76820
|
-
prop.key,
|
|
76821
|
-
AST11.tsTypeAnnotation(convertToTs(prop.value))
|
|
76822
|
-
)
|
|
76823
|
-
];
|
|
76824
|
-
},
|
|
76825
|
-
[]
|
|
76826
|
-
)
|
|
76827
|
-
);
|
|
76828
|
-
}
|
|
76829
|
-
if (source.type === "ArrayExpression") {
|
|
76830
|
-
return AST11.tsTupleType(
|
|
76831
|
-
source.elements.map((element) => convertToTs(element))
|
|
76832
|
-
);
|
|
76833
|
-
}
|
|
76834
|
-
if (source.type === "Literal" && typeof source.value === "boolean") {
|
|
76835
|
-
return AST11.tsLiteralType(AST11.booleanLiteral(source.value));
|
|
76836
|
-
}
|
|
76837
|
-
if (source.type === "Literal" && typeof source.value === "number") {
|
|
76838
|
-
return AST11.tsLiteralType(AST11.numericLiteral(source.value));
|
|
76839
|
-
}
|
|
76840
|
-
if (source.type === "Literal" && typeof source.value === "string") {
|
|
76841
|
-
return AST11.tsLiteralType(AST11.stringLiteral(source.value));
|
|
76842
|
-
}
|
|
76843
|
-
return AST11.tsLiteralType(source);
|
|
76844
|
-
}
|
|
76845
77008
|
async function generateOperationTypeDefs(config2, filepath, body, definition, selections, visitedTypes, missingScalars) {
|
|
76846
77009
|
let parentType = null;
|
|
76847
77010
|
if (definition.operation === "query") {
|
|
@@ -77113,10 +77276,10 @@ function typeDefinitions(config2, body, docs, returnType) {
|
|
|
77113
77276
|
typeName = "__ROOT__";
|
|
77114
77277
|
}
|
|
77115
77278
|
let idFields = AST12.tsNeverKeyword();
|
|
77116
|
-
const
|
|
77117
|
-
if (graphql19.isObjectType(type) &&
|
|
77279
|
+
const keys2 = keyFieldsForType(config2.configFile, type.name);
|
|
77280
|
+
if (graphql19.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
|
|
77118
77281
|
idFields = AST12.tsTypeLiteral(
|
|
77119
|
-
|
|
77282
|
+
keys2.map((key) => {
|
|
77120
77283
|
const fieldType = type.getFields()[key];
|
|
77121
77284
|
const unwrapped = unwrapType(config2, fieldType.type);
|
|
77122
77285
|
return AST12.tsPropertySignature(
|
|
@@ -77549,6 +77712,9 @@ async function writeIndexFile2(config2, docs) {
|
|
|
77549
77712
|
module: relative2(config2.pluginRuntimeDirectory(plugin2.name))
|
|
77550
77713
|
});
|
|
77551
77714
|
}
|
|
77715
|
+
if (!plugin2.indexFile) {
|
|
77716
|
+
continue;
|
|
77717
|
+
}
|
|
77552
77718
|
}
|
|
77553
77719
|
await fs_exports.writeFile(path_exports.join(config2.rootDir, "index.js"), body);
|
|
77554
77720
|
}
|
|
@@ -78814,10 +78980,7 @@ async function collectDocuments(config2) {
|
|
|
78814
78980
|
}
|
|
78815
78981
|
}
|
|
78816
78982
|
} catch (err) {
|
|
78817
|
-
throw {
|
|
78818
|
-
message: err.message,
|
|
78819
|
-
filepath
|
|
78820
|
-
};
|
|
78983
|
+
throw new HoudiniError({ ...err, filepath });
|
|
78821
78984
|
}
|
|
78822
78985
|
})
|
|
78823
78986
|
);
|
|
@@ -79342,8 +79505,6 @@ async function updateSvelteMainJs(targetPath, typescript) {
|
|
|
79342
79505
|
import './app.css'
|
|
79343
79506
|
import App from './App.svelte'
|
|
79344
79507
|
|
|
79345
|
-
client.init();
|
|
79346
|
-
|
|
79347
79508
|
const app = new App({
|
|
79348
79509
|
target: document.getElementById('app')
|
|
79349
79510
|
})
|
|
@@ -79364,8 +79525,8 @@ async function updatePackageJSON(targetPath) {
|
|
|
79364
79525
|
}
|
|
79365
79526
|
packageJSON.devDependencies = {
|
|
79366
79527
|
...packageJSON.devDependencies,
|
|
79367
|
-
houdini: "^1.1.
|
|
79368
|
-
"houdini-svelte": "^1.1.
|
|
79528
|
+
houdini: "^1.1.5",
|
|
79529
|
+
"houdini-svelte": "^1.1.5"
|
|
79369
79530
|
};
|
|
79370
79531
|
await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
|
|
79371
79532
|
}
|