houdini 1.5.3 → 1.5.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 +418 -544
- package/build/cmd-esm/index.js +268 -394
- package/build/codegen/generators/runtime/index.d.ts +2 -7
- package/build/codegen/generators/runtime/pluginRuntime.d.ts +8 -1
- package/build/codegen-cjs/index.js +389 -389
- package/build/codegen-esm/index.js +239 -239
- package/build/lib/router/conventions.d.ts +1 -1
- package/build/lib/router/manifest.d.ts +1 -1
- package/build/lib/typescript.d.ts +1 -1
- package/build/lib-cjs/index.js +665 -663
- package/build/lib-esm/index.js +665 -663
- package/build/test-cjs/index.js +398 -398
- package/build/test-esm/index.js +248 -248
- package/build/vite-cjs/index.js +741 -739
- package/build/vite-esm/index.js +631 -629
- package/package.json +1 -1
|
@@ -52330,7 +52330,7 @@ async function runPipeline(config, pipeline, target) {
|
|
|
52330
52330
|
}
|
|
52331
52331
|
|
|
52332
52332
|
// src/lib/config.ts
|
|
52333
|
-
var
|
|
52333
|
+
var graphql5 = __toESM(require("graphql"), 1);
|
|
52334
52334
|
var import_minimatch8 = __toESM(require_minimatch(), 1);
|
|
52335
52335
|
var import_node_url3 = require("node:url");
|
|
52336
52336
|
|
|
@@ -58235,10 +58235,219 @@ var graphql = __toESM(require("graphql"), 1);
|
|
|
58235
58235
|
|
|
58236
58236
|
// src/lib/router/manifest.ts
|
|
58237
58237
|
var t = __toESM(require_lib5(), 1);
|
|
58238
|
+
var graphql3 = __toESM(require("graphql"), 1);
|
|
58239
|
+
|
|
58240
|
+
// src/lib/graphql.ts
|
|
58238
58241
|
var graphql2 = __toESM(require("graphql"), 1);
|
|
58242
|
+
var import_node_crypto = __toESM(require("node:crypto"), 1);
|
|
58243
|
+
function getRootType(type) {
|
|
58244
|
+
if (graphql2.isNonNullType(type)) {
|
|
58245
|
+
return getRootType(type.ofType);
|
|
58246
|
+
}
|
|
58247
|
+
if (graphql2.isListType(type)) {
|
|
58248
|
+
return getRootType(type.ofType);
|
|
58249
|
+
}
|
|
58250
|
+
return type;
|
|
58251
|
+
}
|
|
58252
|
+
function hashOriginal({ document }) {
|
|
58253
|
+
return hashDocument(document.originalString);
|
|
58254
|
+
}
|
|
58255
|
+
function hashRaw({ document }) {
|
|
58256
|
+
return hashDocument(document.artifact?.raw);
|
|
58257
|
+
}
|
|
58258
|
+
function hashDocument(str) {
|
|
58259
|
+
return import_node_crypto.default.createHash("sha256").update(str || "").digest("hex");
|
|
58260
|
+
}
|
|
58261
|
+
function parentField(ancestors) {
|
|
58262
|
+
return walkParentField([...ancestors].sort(() => -1));
|
|
58263
|
+
}
|
|
58264
|
+
function walkParentField(ancestors) {
|
|
58265
|
+
let head = ancestors.shift();
|
|
58266
|
+
if (Array.isArray(head) || head.kind === "SelectionSet") {
|
|
58267
|
+
return walkParentField(ancestors);
|
|
58268
|
+
}
|
|
58269
|
+
return head;
|
|
58270
|
+
}
|
|
58271
|
+
function parentTypeFromAncestors(schema, filepath, ancestors) {
|
|
58272
|
+
const parents = [...ancestors];
|
|
58273
|
+
parents.reverse();
|
|
58274
|
+
return walkAncestors(schema, filepath, parents);
|
|
58275
|
+
}
|
|
58276
|
+
function walkAncestors(schema, filepath, ancestors) {
|
|
58277
|
+
let head = ancestors.shift();
|
|
58278
|
+
if (Array.isArray(head)) {
|
|
58279
|
+
return walkAncestors(schema, filepath, ancestors);
|
|
58280
|
+
}
|
|
58281
|
+
if (!head) {
|
|
58282
|
+
throw new HoudiniError({ filepath, message: "Could not figure out type of field" });
|
|
58283
|
+
}
|
|
58284
|
+
if (head.kind === "OperationDefinition") {
|
|
58285
|
+
const operationType = {
|
|
58286
|
+
query: schema.getQueryType(),
|
|
58287
|
+
mutation: schema.getMutationType(),
|
|
58288
|
+
subscription: schema.getSubscriptionType()
|
|
58289
|
+
}[head.operation];
|
|
58290
|
+
if (!operationType) {
|
|
58291
|
+
throw new HoudiniError({ filepath, message: "Could not find operation type" });
|
|
58292
|
+
}
|
|
58293
|
+
return operationType;
|
|
58294
|
+
}
|
|
58295
|
+
if (head.kind === "FragmentDefinition") {
|
|
58296
|
+
const result = schema.getType(head.typeCondition.name.value);
|
|
58297
|
+
if (!result) {
|
|
58298
|
+
throw new HoudiniError({
|
|
58299
|
+
filepath,
|
|
58300
|
+
message: `Could not find definition for ${head.typeCondition.name.value} in the schema`
|
|
58301
|
+
});
|
|
58302
|
+
}
|
|
58303
|
+
return result;
|
|
58304
|
+
}
|
|
58305
|
+
if (head.kind === "FragmentSpread") {
|
|
58306
|
+
throw new Error("How the hell did this happen?");
|
|
58307
|
+
}
|
|
58308
|
+
const parent2 = walkAncestors(schema, filepath, ancestors);
|
|
58309
|
+
if (head.kind === "InlineFragment") {
|
|
58310
|
+
if (!head.typeCondition) {
|
|
58311
|
+
return parent2;
|
|
58312
|
+
}
|
|
58313
|
+
const wrapper = schema.getType(head.typeCondition.name.value);
|
|
58314
|
+
if (!wrapper) {
|
|
58315
|
+
throw new HoudiniError({
|
|
58316
|
+
filepath,
|
|
58317
|
+
message: "Could not find type with name: " + head.typeCondition.name.value
|
|
58318
|
+
});
|
|
58319
|
+
}
|
|
58320
|
+
return wrapper;
|
|
58321
|
+
}
|
|
58322
|
+
if (head.kind === "SelectionSet") {
|
|
58323
|
+
return parent2;
|
|
58324
|
+
}
|
|
58325
|
+
const field = parent2.getFields()[head.name.value];
|
|
58326
|
+
if (!field) {
|
|
58327
|
+
throw new HoudiniError({
|
|
58328
|
+
filepath,
|
|
58329
|
+
message: `Could not find definition of ${head.name.value} in ${parent2.toString()}`
|
|
58330
|
+
});
|
|
58331
|
+
}
|
|
58332
|
+
return getRootType(field.type);
|
|
58333
|
+
}
|
|
58334
|
+
function definitionFromAncestors(ancestors) {
|
|
58335
|
+
let parents = [...ancestors];
|
|
58336
|
+
parents.shift();
|
|
58337
|
+
let definition = parents.shift();
|
|
58338
|
+
while (Array.isArray(definition) && definition) {
|
|
58339
|
+
definition = parents.shift();
|
|
58340
|
+
}
|
|
58341
|
+
return { parents, definition };
|
|
58342
|
+
}
|
|
58343
|
+
function unwrapType(config, type, wrappers = [], convertRuntimeScalars) {
|
|
58344
|
+
if (type.kind === "NonNullType") {
|
|
58345
|
+
return unwrapType(config, type.type, [TypeWrapper.NonNull, ...wrappers]);
|
|
58346
|
+
}
|
|
58347
|
+
if (type instanceof graphql2.GraphQLNonNull) {
|
|
58348
|
+
return unwrapType(config, type.ofType, [TypeWrapper.NonNull, ...wrappers]);
|
|
58349
|
+
}
|
|
58350
|
+
if (wrappers[0] !== TypeWrapper.NonNull) {
|
|
58351
|
+
wrappers.unshift(TypeWrapper.Nullable);
|
|
58352
|
+
}
|
|
58353
|
+
if (type.kind === "ListType") {
|
|
58354
|
+
return unwrapType(config, type.type, [TypeWrapper.List, ...wrappers]);
|
|
58355
|
+
}
|
|
58356
|
+
if (type instanceof graphql2.GraphQLList) {
|
|
58357
|
+
return unwrapType(config, type.ofType, [TypeWrapper.List, ...wrappers]);
|
|
58358
|
+
}
|
|
58359
|
+
if (convertRuntimeScalars && config.configFile.features?.runtimeScalars?.[type.name.value]) {
|
|
58360
|
+
type = config.schema.getType(
|
|
58361
|
+
config.configFile.features?.runtimeScalars?.[type.name.value].type
|
|
58362
|
+
);
|
|
58363
|
+
}
|
|
58364
|
+
const namedType = config.schema.getType(type.name.value || type.name);
|
|
58365
|
+
if (!namedType) {
|
|
58366
|
+
throw new Error("Unknown type: " + type.name.value || type.name);
|
|
58367
|
+
}
|
|
58368
|
+
return { type: namedType, wrappers };
|
|
58369
|
+
}
|
|
58370
|
+
function wrapType({
|
|
58371
|
+
type,
|
|
58372
|
+
wrappers
|
|
58373
|
+
}) {
|
|
58374
|
+
const head = wrappers[0];
|
|
58375
|
+
const tail = wrappers.slice(1);
|
|
58376
|
+
let kind = graphql2.Kind.NAMED_TYPE;
|
|
58377
|
+
if (head === TypeWrapper.List) {
|
|
58378
|
+
kind = graphql2.Kind.LIST_TYPE;
|
|
58379
|
+
} else if (head === TypeWrapper.NonNull) {
|
|
58380
|
+
kind = graphql2.Kind.NON_NULL_TYPE;
|
|
58381
|
+
}
|
|
58382
|
+
if (kind === "NamedType") {
|
|
58383
|
+
return {
|
|
58384
|
+
kind,
|
|
58385
|
+
name: {
|
|
58386
|
+
kind: graphql2.Kind.NAME,
|
|
58387
|
+
value: type.name
|
|
58388
|
+
}
|
|
58389
|
+
};
|
|
58390
|
+
}
|
|
58391
|
+
return {
|
|
58392
|
+
kind,
|
|
58393
|
+
type: wrapType({ type, wrappers: tail })
|
|
58394
|
+
};
|
|
58395
|
+
}
|
|
58396
|
+
var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
|
|
58397
|
+
TypeWrapper2["Nullable"] = "Nullable";
|
|
58398
|
+
TypeWrapper2["List"] = "List";
|
|
58399
|
+
TypeWrapper2["NonNull"] = "NonNull";
|
|
58400
|
+
return TypeWrapper2;
|
|
58401
|
+
})(TypeWrapper || {});
|
|
58402
|
+
|
|
58403
|
+
// src/lib/parse.ts
|
|
58404
|
+
var import_parser = __toESM(require_lib6(), 1);
|
|
58405
|
+
var import_recast = __toESM(require_main2(), 1);
|
|
58406
|
+
|
|
58407
|
+
// src/lib/deepMerge.ts
|
|
58408
|
+
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
58409
|
+
function deepMerge2(filepath, ...targets) {
|
|
58410
|
+
try {
|
|
58411
|
+
if (targets.length === 1) {
|
|
58412
|
+
return targets[0];
|
|
58413
|
+
} else if (targets.length === 2) {
|
|
58414
|
+
return (0, import_deepmerge.default)(targets[0], targets[1], {
|
|
58415
|
+
arrayMerge: (source, update) => [...new Set(source.concat(update))]
|
|
58416
|
+
});
|
|
58417
|
+
}
|
|
58418
|
+
return deepMerge2(filepath, targets[0], deepMerge2(filepath, ...targets.slice(1)));
|
|
58419
|
+
} catch (e) {
|
|
58420
|
+
throw new HoudiniError({
|
|
58421
|
+
filepath,
|
|
58422
|
+
message: "could not merge: " + JSON.stringify(targets, null, 4),
|
|
58423
|
+
description: e.message
|
|
58424
|
+
});
|
|
58425
|
+
}
|
|
58426
|
+
}
|
|
58427
|
+
|
|
58428
|
+
// src/lib/parse.ts
|
|
58429
|
+
function parseJS(str, config) {
|
|
58430
|
+
const defaultConfig = {
|
|
58431
|
+
plugins: [
|
|
58432
|
+
"typescript",
|
|
58433
|
+
"importAssertions",
|
|
58434
|
+
"decorators-legacy",
|
|
58435
|
+
"explicitResourceManagement"
|
|
58436
|
+
],
|
|
58437
|
+
sourceType: "module"
|
|
58438
|
+
};
|
|
58439
|
+
return (0, import_parser.parse)(str || "", config ? deepMerge2("", defaultConfig, config) : defaultConfig).program;
|
|
58440
|
+
}
|
|
58441
|
+
async function printJS(script, options) {
|
|
58442
|
+
if (options?.pretty) {
|
|
58443
|
+
return (0, import_recast.prettyPrint)(script, options);
|
|
58444
|
+
} else {
|
|
58445
|
+
return (0, import_recast.print)(script, options);
|
|
58446
|
+
}
|
|
58447
|
+
}
|
|
58239
58448
|
|
|
58240
58449
|
// src/lib/router/server.ts
|
|
58241
|
-
var
|
|
58450
|
+
var graphql4 = __toESM(require("graphql"), 1);
|
|
58242
58451
|
|
|
58243
58452
|
// src/runtime/lib/flatten.ts
|
|
58244
58453
|
function flatten(source) {
|
|
@@ -60583,218 +60792,9 @@ var LogLevel = {
|
|
|
60583
60792
|
var import_meta = {};
|
|
60584
60793
|
var currentDir = dirname((0, import_node_url3.fileURLToPath)(import_meta.url));
|
|
60585
60794
|
var DEFAULT_CONFIG_PATH = join(process.cwd(), "houdini.config.js");
|
|
60586
|
-
var emptySchema =
|
|
60795
|
+
var emptySchema = graphql5.buildSchema("type Query { hello: String }");
|
|
60587
60796
|
var defaultDirectives = emptySchema.getDirectives().map((dir) => dir.name);
|
|
60588
60797
|
|
|
60589
|
-
// src/lib/graphql.ts
|
|
60590
|
-
var graphql5 = __toESM(require("graphql"), 1);
|
|
60591
|
-
var import_node_crypto = __toESM(require("node:crypto"), 1);
|
|
60592
|
-
function getRootType(type) {
|
|
60593
|
-
if (graphql5.isNonNullType(type)) {
|
|
60594
|
-
return getRootType(type.ofType);
|
|
60595
|
-
}
|
|
60596
|
-
if (graphql5.isListType(type)) {
|
|
60597
|
-
return getRootType(type.ofType);
|
|
60598
|
-
}
|
|
60599
|
-
return type;
|
|
60600
|
-
}
|
|
60601
|
-
function hashOriginal({ document }) {
|
|
60602
|
-
return hashDocument(document.originalString);
|
|
60603
|
-
}
|
|
60604
|
-
function hashRaw({ document }) {
|
|
60605
|
-
return hashDocument(document.artifact?.raw);
|
|
60606
|
-
}
|
|
60607
|
-
function hashDocument(str) {
|
|
60608
|
-
return import_node_crypto.default.createHash("sha256").update(str || "").digest("hex");
|
|
60609
|
-
}
|
|
60610
|
-
function parentField(ancestors) {
|
|
60611
|
-
return walkParentField([...ancestors].sort(() => -1));
|
|
60612
|
-
}
|
|
60613
|
-
function walkParentField(ancestors) {
|
|
60614
|
-
let head = ancestors.shift();
|
|
60615
|
-
if (Array.isArray(head) || head.kind === "SelectionSet") {
|
|
60616
|
-
return walkParentField(ancestors);
|
|
60617
|
-
}
|
|
60618
|
-
return head;
|
|
60619
|
-
}
|
|
60620
|
-
function parentTypeFromAncestors(schema, filepath, ancestors) {
|
|
60621
|
-
const parents = [...ancestors];
|
|
60622
|
-
parents.reverse();
|
|
60623
|
-
return walkAncestors(schema, filepath, parents);
|
|
60624
|
-
}
|
|
60625
|
-
function walkAncestors(schema, filepath, ancestors) {
|
|
60626
|
-
let head = ancestors.shift();
|
|
60627
|
-
if (Array.isArray(head)) {
|
|
60628
|
-
return walkAncestors(schema, filepath, ancestors);
|
|
60629
|
-
}
|
|
60630
|
-
if (!head) {
|
|
60631
|
-
throw new HoudiniError({ filepath, message: "Could not figure out type of field" });
|
|
60632
|
-
}
|
|
60633
|
-
if (head.kind === "OperationDefinition") {
|
|
60634
|
-
const operationType = {
|
|
60635
|
-
query: schema.getQueryType(),
|
|
60636
|
-
mutation: schema.getMutationType(),
|
|
60637
|
-
subscription: schema.getSubscriptionType()
|
|
60638
|
-
}[head.operation];
|
|
60639
|
-
if (!operationType) {
|
|
60640
|
-
throw new HoudiniError({ filepath, message: "Could not find operation type" });
|
|
60641
|
-
}
|
|
60642
|
-
return operationType;
|
|
60643
|
-
}
|
|
60644
|
-
if (head.kind === "FragmentDefinition") {
|
|
60645
|
-
const result = schema.getType(head.typeCondition.name.value);
|
|
60646
|
-
if (!result) {
|
|
60647
|
-
throw new HoudiniError({
|
|
60648
|
-
filepath,
|
|
60649
|
-
message: `Could not find definition for ${head.typeCondition.name.value} in the schema`
|
|
60650
|
-
});
|
|
60651
|
-
}
|
|
60652
|
-
return result;
|
|
60653
|
-
}
|
|
60654
|
-
if (head.kind === "FragmentSpread") {
|
|
60655
|
-
throw new Error("How the hell did this happen?");
|
|
60656
|
-
}
|
|
60657
|
-
const parent2 = walkAncestors(schema, filepath, ancestors);
|
|
60658
|
-
if (head.kind === "InlineFragment") {
|
|
60659
|
-
if (!head.typeCondition) {
|
|
60660
|
-
return parent2;
|
|
60661
|
-
}
|
|
60662
|
-
const wrapper = schema.getType(head.typeCondition.name.value);
|
|
60663
|
-
if (!wrapper) {
|
|
60664
|
-
throw new HoudiniError({
|
|
60665
|
-
filepath,
|
|
60666
|
-
message: "Could not find type with name: " + head.typeCondition.name.value
|
|
60667
|
-
});
|
|
60668
|
-
}
|
|
60669
|
-
return wrapper;
|
|
60670
|
-
}
|
|
60671
|
-
if (head.kind === "SelectionSet") {
|
|
60672
|
-
return parent2;
|
|
60673
|
-
}
|
|
60674
|
-
const field = parent2.getFields()[head.name.value];
|
|
60675
|
-
if (!field) {
|
|
60676
|
-
throw new HoudiniError({
|
|
60677
|
-
filepath,
|
|
60678
|
-
message: `Could not find definition of ${head.name.value} in ${parent2.toString()}`
|
|
60679
|
-
});
|
|
60680
|
-
}
|
|
60681
|
-
return getRootType(field.type);
|
|
60682
|
-
}
|
|
60683
|
-
function definitionFromAncestors(ancestors) {
|
|
60684
|
-
let parents = [...ancestors];
|
|
60685
|
-
parents.shift();
|
|
60686
|
-
let definition = parents.shift();
|
|
60687
|
-
while (Array.isArray(definition) && definition) {
|
|
60688
|
-
definition = parents.shift();
|
|
60689
|
-
}
|
|
60690
|
-
return { parents, definition };
|
|
60691
|
-
}
|
|
60692
|
-
function unwrapType(config, type, wrappers = [], convertRuntimeScalars) {
|
|
60693
|
-
if (type.kind === "NonNullType") {
|
|
60694
|
-
return unwrapType(config, type.type, [TypeWrapper.NonNull, ...wrappers]);
|
|
60695
|
-
}
|
|
60696
|
-
if (type instanceof graphql5.GraphQLNonNull) {
|
|
60697
|
-
return unwrapType(config, type.ofType, [TypeWrapper.NonNull, ...wrappers]);
|
|
60698
|
-
}
|
|
60699
|
-
if (wrappers[0] !== TypeWrapper.NonNull) {
|
|
60700
|
-
wrappers.unshift(TypeWrapper.Nullable);
|
|
60701
|
-
}
|
|
60702
|
-
if (type.kind === "ListType") {
|
|
60703
|
-
return unwrapType(config, type.type, [TypeWrapper.List, ...wrappers]);
|
|
60704
|
-
}
|
|
60705
|
-
if (type instanceof graphql5.GraphQLList) {
|
|
60706
|
-
return unwrapType(config, type.ofType, [TypeWrapper.List, ...wrappers]);
|
|
60707
|
-
}
|
|
60708
|
-
if (convertRuntimeScalars && config.configFile.features?.runtimeScalars?.[type.name.value]) {
|
|
60709
|
-
type = config.schema.getType(
|
|
60710
|
-
config.configFile.features?.runtimeScalars?.[type.name.value].type
|
|
60711
|
-
);
|
|
60712
|
-
}
|
|
60713
|
-
const namedType = config.schema.getType(type.name.value || type.name);
|
|
60714
|
-
if (!namedType) {
|
|
60715
|
-
throw new Error("Unknown type: " + type.name.value || type.name);
|
|
60716
|
-
}
|
|
60717
|
-
return { type: namedType, wrappers };
|
|
60718
|
-
}
|
|
60719
|
-
function wrapType({
|
|
60720
|
-
type,
|
|
60721
|
-
wrappers
|
|
60722
|
-
}) {
|
|
60723
|
-
const head = wrappers[0];
|
|
60724
|
-
const tail = wrappers.slice(1);
|
|
60725
|
-
let kind = graphql5.Kind.NAMED_TYPE;
|
|
60726
|
-
if (head === TypeWrapper.List) {
|
|
60727
|
-
kind = graphql5.Kind.LIST_TYPE;
|
|
60728
|
-
} else if (head === TypeWrapper.NonNull) {
|
|
60729
|
-
kind = graphql5.Kind.NON_NULL_TYPE;
|
|
60730
|
-
}
|
|
60731
|
-
if (kind === "NamedType") {
|
|
60732
|
-
return {
|
|
60733
|
-
kind,
|
|
60734
|
-
name: {
|
|
60735
|
-
kind: graphql5.Kind.NAME,
|
|
60736
|
-
value: type.name
|
|
60737
|
-
}
|
|
60738
|
-
};
|
|
60739
|
-
}
|
|
60740
|
-
return {
|
|
60741
|
-
kind,
|
|
60742
|
-
type: wrapType({ type, wrappers: tail })
|
|
60743
|
-
};
|
|
60744
|
-
}
|
|
60745
|
-
var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
|
|
60746
|
-
TypeWrapper2["Nullable"] = "Nullable";
|
|
60747
|
-
TypeWrapper2["List"] = "List";
|
|
60748
|
-
TypeWrapper2["NonNull"] = "NonNull";
|
|
60749
|
-
return TypeWrapper2;
|
|
60750
|
-
})(TypeWrapper || {});
|
|
60751
|
-
|
|
60752
|
-
// src/lib/parse.ts
|
|
60753
|
-
var import_parser = __toESM(require_lib6(), 1);
|
|
60754
|
-
var import_recast = __toESM(require_main2(), 1);
|
|
60755
|
-
|
|
60756
|
-
// src/lib/deepMerge.ts
|
|
60757
|
-
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
60758
|
-
function deepMerge2(filepath, ...targets) {
|
|
60759
|
-
try {
|
|
60760
|
-
if (targets.length === 1) {
|
|
60761
|
-
return targets[0];
|
|
60762
|
-
} else if (targets.length === 2) {
|
|
60763
|
-
return (0, import_deepmerge.default)(targets[0], targets[1], {
|
|
60764
|
-
arrayMerge: (source, update) => [...new Set(source.concat(update))]
|
|
60765
|
-
});
|
|
60766
|
-
}
|
|
60767
|
-
return deepMerge2(filepath, targets[0], deepMerge2(filepath, ...targets.slice(1)));
|
|
60768
|
-
} catch (e) {
|
|
60769
|
-
throw new HoudiniError({
|
|
60770
|
-
filepath,
|
|
60771
|
-
message: "could not merge: " + JSON.stringify(targets, null, 4),
|
|
60772
|
-
description: e.message
|
|
60773
|
-
});
|
|
60774
|
-
}
|
|
60775
|
-
}
|
|
60776
|
-
|
|
60777
|
-
// src/lib/parse.ts
|
|
60778
|
-
function parseJS(str, config) {
|
|
60779
|
-
const defaultConfig = {
|
|
60780
|
-
plugins: [
|
|
60781
|
-
"typescript",
|
|
60782
|
-
"importAssertions",
|
|
60783
|
-
"decorators-legacy",
|
|
60784
|
-
"explicitResourceManagement"
|
|
60785
|
-
],
|
|
60786
|
-
sourceType: "module"
|
|
60787
|
-
};
|
|
60788
|
-
return (0, import_parser.parse)(str || "", config ? deepMerge2("", defaultConfig, config) : defaultConfig).program;
|
|
60789
|
-
}
|
|
60790
|
-
async function printJS(script, options) {
|
|
60791
|
-
if (options?.pretty) {
|
|
60792
|
-
return (0, import_recast.prettyPrint)(script, options);
|
|
60793
|
-
} else {
|
|
60794
|
-
return (0, import_recast.print)(script, options);
|
|
60795
|
-
}
|
|
60796
|
-
}
|
|
60797
|
-
|
|
60798
60798
|
// src/lib/imports.ts
|
|
60799
60799
|
var recast = __toESM(require_main2(), 1);
|
|
60800
60800
|
var AST2 = recast.types.builders;
|
|
@@ -60923,18 +60923,18 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
|
|
|
60923
60923
|
return AST3.tsNeverKeyword();
|
|
60924
60924
|
}
|
|
60925
60925
|
const component = config.componentFields[field.parent][field.field];
|
|
60926
|
-
const sourcePathRelative =
|
|
60927
|
-
|
|
60926
|
+
const sourcePathRelative = relative(
|
|
60927
|
+
join(config.projectRoot, "src"),
|
|
60928
60928
|
component.filepath
|
|
60929
60929
|
);
|
|
60930
|
-
let sourcePathParsed =
|
|
60931
|
-
let sourcePath =
|
|
60930
|
+
let sourcePathParsed = parse(sourcePathRelative);
|
|
60931
|
+
let sourcePath = join(sourcePathParsed.dir, sourcePathParsed.name);
|
|
60932
60932
|
const localImport = ensureImports({
|
|
60933
60933
|
config,
|
|
60934
60934
|
body,
|
|
60935
60935
|
import: "__component__" + component.fragment,
|
|
60936
|
-
sourceModule:
|
|
60937
|
-
|
|
60936
|
+
sourceModule: join(
|
|
60937
|
+
relative(dirname(filepath), config.projectRoot),
|
|
60938
60938
|
"src",
|
|
60939
60939
|
sourcePath
|
|
60940
60940
|
)
|
|
@@ -61848,12 +61848,12 @@ function stripLoc(value) {
|
|
|
61848
61848
|
|
|
61849
61849
|
// src/codegen/transforms/collectDefinitions.ts
|
|
61850
61850
|
var graphql8 = __toESM(require("graphql"), 1);
|
|
61851
|
-
var
|
|
61851
|
+
var import_graphql3 = require("graphql");
|
|
61852
61852
|
async function includeFragmentDefinitions(config, documents) {
|
|
61853
61853
|
const fragments = collectDefinitions(config, documents);
|
|
61854
61854
|
for (const [index, { name, document, filename }] of documents.entries()) {
|
|
61855
61855
|
const operation = document.definitions.find(
|
|
61856
|
-
(def) => def.kind ===
|
|
61856
|
+
(def) => def.kind === import_graphql3.Kind.OPERATION_DEFINITION || def.kind === "FragmentDefinition"
|
|
61857
61857
|
);
|
|
61858
61858
|
if (!operation) {
|
|
61859
61859
|
continue;
|
|
@@ -63849,6 +63849,16 @@ async function generatePluginIndex({
|
|
|
63849
63849
|
}
|
|
63850
63850
|
|
|
63851
63851
|
// src/codegen/generators/runtime/pluginRuntime.ts
|
|
63852
|
+
function moduleStatments(config) {
|
|
63853
|
+
const importStatement = config.module === "commonjs" ? importDefaultFrom : (where, as) => `import ${as} from '${where}'`;
|
|
63854
|
+
const exportDefaultStatement = config.module === "commonjs" ? exportDefault : (as) => `export default ${as}`;
|
|
63855
|
+
const exportStarStatement = config.module === "commonjs" ? exportStarFrom : (where) => `export * from '${where}'`;
|
|
63856
|
+
return {
|
|
63857
|
+
importStatement,
|
|
63858
|
+
exportDefaultStatement,
|
|
63859
|
+
exportStarStatement
|
|
63860
|
+
};
|
|
63861
|
+
}
|
|
63852
63862
|
async function generatePluginRuntimes({
|
|
63853
63863
|
config,
|
|
63854
63864
|
docs
|
|
@@ -63864,7 +63874,7 @@ async function generatePluginRuntimes({
|
|
|
63864
63874
|
return;
|
|
63865
63875
|
}
|
|
63866
63876
|
try {
|
|
63867
|
-
await
|
|
63877
|
+
await stat(runtime_path);
|
|
63868
63878
|
} catch {
|
|
63869
63879
|
throw new HoudiniError({
|
|
63870
63880
|
message: "Cannot find runtime to generate for " + plugin2.name,
|
|
@@ -63876,13 +63886,13 @@ async function generatePluginRuntimes({
|
|
|
63876
63886
|
if (transformMap && typeof transformMap === "function") {
|
|
63877
63887
|
transformMap = transformMap(docs, { config });
|
|
63878
63888
|
}
|
|
63879
|
-
await
|
|
63880
|
-
await
|
|
63889
|
+
await mkdirp(pluginDir);
|
|
63890
|
+
await recursiveCopy(
|
|
63881
63891
|
runtime_path,
|
|
63882
63892
|
pluginDir,
|
|
63883
63893
|
Object.fromEntries(
|
|
63884
63894
|
Object.entries(transformMap).map(([key, value]) => [
|
|
63885
|
-
|
|
63895
|
+
join(runtime_path, key),
|
|
63886
63896
|
(content) => value({
|
|
63887
63897
|
config,
|
|
63888
63898
|
content,
|
|
@@ -63929,21 +63939,21 @@ async function runtimeGenerator(config, docs) {
|
|
|
63929
63939
|
exportStarStatement: exportStar
|
|
63930
63940
|
} = moduleStatments(config);
|
|
63931
63941
|
await Promise.all([
|
|
63932
|
-
|
|
63933
|
-
[
|
|
63942
|
+
recursiveCopy(config.runtimeSource, config.runtimeDirectory, {
|
|
63943
|
+
[join(config.runtimeSource, "lib", "constants.js")]: (content) => {
|
|
63934
63944
|
return content.replace("SITE_URL", siteURL);
|
|
63935
63945
|
},
|
|
63936
|
-
[
|
|
63946
|
+
[join(config.runtimeSource, "imports", "pluginConfig.js")]: (content) => {
|
|
63937
63947
|
return injectConfig({ config, importStatement, exportStatement, content });
|
|
63938
63948
|
},
|
|
63939
|
-
[
|
|
63940
|
-
const configFilePath =
|
|
63941
|
-
const relativePath =
|
|
63949
|
+
[join(config.runtimeSource, "imports", "config.js")]: (content) => {
|
|
63950
|
+
const configFilePath = join(config.runtimeDirectory, "imports", "config.js");
|
|
63951
|
+
const relativePath = relative(dirname(configFilePath), config.filepath);
|
|
63942
63952
|
return `${importStatement(relativePath, "config")}
|
|
63943
63953
|
${exportStatement("config")}
|
|
63944
63954
|
`;
|
|
63945
63955
|
},
|
|
63946
|
-
[
|
|
63956
|
+
[join(config.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config, content, importStatement, exportStatement })
|
|
63947
63957
|
}),
|
|
63948
63958
|
generatePluginRuntimes({
|
|
63949
63959
|
config,
|
|
@@ -63953,16 +63963,6 @@ ${exportStatement("config")}
|
|
|
63953
63963
|
]);
|
|
63954
63964
|
await generateGraphqlReturnTypes(config, docs);
|
|
63955
63965
|
}
|
|
63956
|
-
function moduleStatments(config) {
|
|
63957
|
-
const importStatement = config.module === "commonjs" ? importDefaultFrom : (where, as) => `import ${as} from '${where}'`;
|
|
63958
|
-
const exportDefaultStatement = config.module === "commonjs" ? exportDefault : (as) => `export default ${as}`;
|
|
63959
|
-
const exportStarStatement = config.module === "commonjs" ? exportStarFrom : (where) => `export * from '${where}'`;
|
|
63960
|
-
return {
|
|
63961
|
-
importStatement,
|
|
63962
|
-
exportDefaultStatement,
|
|
63963
|
-
exportStarStatement
|
|
63964
|
-
};
|
|
63965
|
-
}
|
|
63966
63966
|
|
|
63967
63967
|
// src/codegen/generators/typescript/documentTypes.ts
|
|
63968
63968
|
var recast11 = __toESM(require_main2(), 1);
|
|
@@ -65445,7 +65445,7 @@ async function writeIndexFile2(config, docs) {
|
|
|
65445
65445
|
}
|
|
65446
65446
|
|
|
65447
65447
|
// ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/helpers.js
|
|
65448
|
-
var
|
|
65448
|
+
var import_graphql4 = require("graphql");
|
|
65449
65449
|
function compareStrings(a, b) {
|
|
65450
65450
|
if (String(a) < String(b)) {
|
|
65451
65451
|
return -1;
|
|
@@ -65481,7 +65481,7 @@ function isSome(input) {
|
|
|
65481
65481
|
}
|
|
65482
65482
|
|
|
65483
65483
|
// ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/inspect.js
|
|
65484
|
-
var
|
|
65484
|
+
var import_graphql5 = require("graphql");
|
|
65485
65485
|
var MAX_RECURSIVE_DEPTH = 3;
|
|
65486
65486
|
function inspect(value) {
|
|
65487
65487
|
return formatValue(value, []);
|
|
@@ -65499,7 +65499,7 @@ function formatValue(value, seenValues) {
|
|
|
65499
65499
|
}
|
|
65500
65500
|
}
|
|
65501
65501
|
function formatError(value) {
|
|
65502
|
-
if (value instanceof
|
|
65502
|
+
if (value instanceof import_graphql5.GraphQLError) {
|
|
65503
65503
|
return value.toString();
|
|
65504
65504
|
}
|
|
65505
65505
|
return `${value.name}: ${value.message};
|
|
@@ -65582,43 +65582,43 @@ function getDirectivesInExtensions(node, pathToDirectivesInExtensions = ["direct
|
|
|
65582
65582
|
}
|
|
65583
65583
|
|
|
65584
65584
|
// ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/print-schema-with-directives.js
|
|
65585
|
-
var
|
|
65585
|
+
var import_graphql9 = require("graphql");
|
|
65586
65586
|
|
|
65587
65587
|
// ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromType.js
|
|
65588
|
-
var
|
|
65588
|
+
var import_graphql6 = require("graphql");
|
|
65589
65589
|
function astFromType(type) {
|
|
65590
|
-
if ((0,
|
|
65590
|
+
if ((0, import_graphql6.isNonNullType)(type)) {
|
|
65591
65591
|
const innerType = astFromType(type.ofType);
|
|
65592
|
-
if (innerType.kind ===
|
|
65592
|
+
if (innerType.kind === import_graphql6.Kind.NON_NULL_TYPE) {
|
|
65593
65593
|
throw new Error(`Invalid type node ${inspect(type)}. Inner type of non-null type cannot be a non-null type.`);
|
|
65594
65594
|
}
|
|
65595
65595
|
return {
|
|
65596
|
-
kind:
|
|
65596
|
+
kind: import_graphql6.Kind.NON_NULL_TYPE,
|
|
65597
65597
|
type: innerType
|
|
65598
65598
|
};
|
|
65599
|
-
} else if ((0,
|
|
65599
|
+
} else if ((0, import_graphql6.isListType)(type)) {
|
|
65600
65600
|
return {
|
|
65601
|
-
kind:
|
|
65601
|
+
kind: import_graphql6.Kind.LIST_TYPE,
|
|
65602
65602
|
type: astFromType(type.ofType)
|
|
65603
65603
|
};
|
|
65604
65604
|
}
|
|
65605
65605
|
return {
|
|
65606
|
-
kind:
|
|
65606
|
+
kind: import_graphql6.Kind.NAMED_TYPE,
|
|
65607
65607
|
name: {
|
|
65608
|
-
kind:
|
|
65608
|
+
kind: import_graphql6.Kind.NAME,
|
|
65609
65609
|
value: type.name
|
|
65610
65610
|
}
|
|
65611
65611
|
};
|
|
65612
65612
|
}
|
|
65613
65613
|
|
|
65614
65614
|
// ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromValue.js
|
|
65615
|
-
var
|
|
65615
|
+
var import_graphql8 = require("graphql");
|
|
65616
65616
|
|
|
65617
65617
|
// ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromValueUntyped.js
|
|
65618
|
-
var
|
|
65618
|
+
var import_graphql7 = require("graphql");
|
|
65619
65619
|
function astFromValueUntyped(value) {
|
|
65620
65620
|
if (value === null) {
|
|
65621
|
-
return { kind:
|
|
65621
|
+
return { kind: import_graphql7.Kind.NULL };
|
|
65622
65622
|
}
|
|
65623
65623
|
if (value === void 0) {
|
|
65624
65624
|
return null;
|
|
@@ -65631,7 +65631,7 @@ function astFromValueUntyped(value) {
|
|
|
65631
65631
|
valuesNodes.push(itemNode);
|
|
65632
65632
|
}
|
|
65633
65633
|
}
|
|
65634
|
-
return { kind:
|
|
65634
|
+
return { kind: import_graphql7.Kind.LIST, values: valuesNodes };
|
|
65635
65635
|
}
|
|
65636
65636
|
if (typeof value === "object") {
|
|
65637
65637
|
const fieldNodes = [];
|
|
@@ -65640,26 +65640,26 @@ function astFromValueUntyped(value) {
|
|
|
65640
65640
|
const ast = astFromValueUntyped(fieldValue);
|
|
65641
65641
|
if (ast) {
|
|
65642
65642
|
fieldNodes.push({
|
|
65643
|
-
kind:
|
|
65644
|
-
name: { kind:
|
|
65643
|
+
kind: import_graphql7.Kind.OBJECT_FIELD,
|
|
65644
|
+
name: { kind: import_graphql7.Kind.NAME, value: fieldName },
|
|
65645
65645
|
value: ast
|
|
65646
65646
|
});
|
|
65647
65647
|
}
|
|
65648
65648
|
}
|
|
65649
|
-
return { kind:
|
|
65649
|
+
return { kind: import_graphql7.Kind.OBJECT, fields: fieldNodes };
|
|
65650
65650
|
}
|
|
65651
65651
|
if (typeof value === "boolean") {
|
|
65652
|
-
return { kind:
|
|
65652
|
+
return { kind: import_graphql7.Kind.BOOLEAN, value };
|
|
65653
65653
|
}
|
|
65654
65654
|
if (typeof value === "bigint") {
|
|
65655
|
-
return { kind:
|
|
65655
|
+
return { kind: import_graphql7.Kind.INT, value: String(value) };
|
|
65656
65656
|
}
|
|
65657
65657
|
if (typeof value === "number" && isFinite(value)) {
|
|
65658
65658
|
const stringNum = String(value);
|
|
65659
|
-
return integerStringRegExp.test(stringNum) ? { kind:
|
|
65659
|
+
return integerStringRegExp.test(stringNum) ? { kind: import_graphql7.Kind.INT, value: stringNum } : { kind: import_graphql7.Kind.FLOAT, value: stringNum };
|
|
65660
65660
|
}
|
|
65661
65661
|
if (typeof value === "string") {
|
|
65662
|
-
return { kind:
|
|
65662
|
+
return { kind: import_graphql7.Kind.STRING, value };
|
|
65663
65663
|
}
|
|
65664
65664
|
throw new TypeError(`Cannot convert value to AST: ${value}.`);
|
|
65665
65665
|
}
|
|
@@ -65667,20 +65667,20 @@ var integerStringRegExp = /^-?(?:0|[1-9][0-9]*)$/;
|
|
|
65667
65667
|
|
|
65668
65668
|
// ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromValue.js
|
|
65669
65669
|
function astFromValue(value, type) {
|
|
65670
|
-
if ((0,
|
|
65670
|
+
if ((0, import_graphql8.isNonNullType)(type)) {
|
|
65671
65671
|
const astValue = astFromValue(value, type.ofType);
|
|
65672
|
-
if (astValue?.kind ===
|
|
65672
|
+
if (astValue?.kind === import_graphql8.Kind.NULL) {
|
|
65673
65673
|
return null;
|
|
65674
65674
|
}
|
|
65675
65675
|
return astValue;
|
|
65676
65676
|
}
|
|
65677
65677
|
if (value === null) {
|
|
65678
|
-
return { kind:
|
|
65678
|
+
return { kind: import_graphql8.Kind.NULL };
|
|
65679
65679
|
}
|
|
65680
65680
|
if (value === void 0) {
|
|
65681
65681
|
return null;
|
|
65682
65682
|
}
|
|
65683
|
-
if ((0,
|
|
65683
|
+
if ((0, import_graphql8.isListType)(type)) {
|
|
65684
65684
|
const itemType = type.ofType;
|
|
65685
65685
|
if (isIterableObject(value)) {
|
|
65686
65686
|
const valuesNodes = [];
|
|
@@ -65690,11 +65690,11 @@ function astFromValue(value, type) {
|
|
|
65690
65690
|
valuesNodes.push(itemNode);
|
|
65691
65691
|
}
|
|
65692
65692
|
}
|
|
65693
|
-
return { kind:
|
|
65693
|
+
return { kind: import_graphql8.Kind.LIST, values: valuesNodes };
|
|
65694
65694
|
}
|
|
65695
65695
|
return astFromValue(value, itemType);
|
|
65696
65696
|
}
|
|
65697
|
-
if ((0,
|
|
65697
|
+
if ((0, import_graphql8.isInputObjectType)(type)) {
|
|
65698
65698
|
if (!isObjectLike(value)) {
|
|
65699
65699
|
return null;
|
|
65700
65700
|
}
|
|
@@ -65703,24 +65703,24 @@ function astFromValue(value, type) {
|
|
|
65703
65703
|
const fieldValue = astFromValue(value[field.name], field.type);
|
|
65704
65704
|
if (fieldValue) {
|
|
65705
65705
|
fieldNodes.push({
|
|
65706
|
-
kind:
|
|
65707
|
-
name: { kind:
|
|
65706
|
+
kind: import_graphql8.Kind.OBJECT_FIELD,
|
|
65707
|
+
name: { kind: import_graphql8.Kind.NAME, value: field.name },
|
|
65708
65708
|
value: fieldValue
|
|
65709
65709
|
});
|
|
65710
65710
|
}
|
|
65711
65711
|
}
|
|
65712
|
-
return { kind:
|
|
65712
|
+
return { kind: import_graphql8.Kind.OBJECT, fields: fieldNodes };
|
|
65713
65713
|
}
|
|
65714
|
-
if ((0,
|
|
65714
|
+
if ((0, import_graphql8.isLeafType)(type)) {
|
|
65715
65715
|
const serialized = type.serialize(value);
|
|
65716
65716
|
if (serialized == null) {
|
|
65717
65717
|
return null;
|
|
65718
65718
|
}
|
|
65719
|
-
if ((0,
|
|
65720
|
-
return { kind:
|
|
65719
|
+
if ((0, import_graphql8.isEnumType)(type)) {
|
|
65720
|
+
return { kind: import_graphql8.Kind.ENUM, value: serialized };
|
|
65721
65721
|
}
|
|
65722
65722
|
if (type.name === "ID" && typeof serialized === "string" && integerStringRegExp2.test(serialized)) {
|
|
65723
|
-
return { kind:
|
|
65723
|
+
return { kind: import_graphql8.Kind.INT, value: serialized };
|
|
65724
65724
|
}
|
|
65725
65725
|
return astFromValueUntyped(serialized);
|
|
65726
65726
|
}
|
|
@@ -65776,36 +65776,36 @@ function getDocumentNodeFromSchema(schema, options = {}) {
|
|
|
65776
65776
|
const definitions = schemaNode != null ? [schemaNode] : [];
|
|
65777
65777
|
const directives = schema.getDirectives();
|
|
65778
65778
|
for (const directive of directives) {
|
|
65779
|
-
if ((0,
|
|
65779
|
+
if ((0, import_graphql9.isSpecifiedDirective)(directive)) {
|
|
65780
65780
|
continue;
|
|
65781
65781
|
}
|
|
65782
65782
|
definitions.push(astFromDirective(directive, schema, pathToDirectivesInExtensions));
|
|
65783
65783
|
}
|
|
65784
65784
|
for (const typeName in typesMap) {
|
|
65785
65785
|
const type = typesMap[typeName];
|
|
65786
|
-
const isPredefinedScalar = (0,
|
|
65787
|
-
const isIntrospection = (0,
|
|
65786
|
+
const isPredefinedScalar = (0, import_graphql9.isSpecifiedScalarType)(type);
|
|
65787
|
+
const isIntrospection = (0, import_graphql9.isIntrospectionType)(type);
|
|
65788
65788
|
if (isPredefinedScalar || isIntrospection) {
|
|
65789
65789
|
continue;
|
|
65790
65790
|
}
|
|
65791
|
-
if ((0,
|
|
65791
|
+
if ((0, import_graphql9.isObjectType)(type)) {
|
|
65792
65792
|
definitions.push(astFromObjectType(type, schema, pathToDirectivesInExtensions));
|
|
65793
|
-
} else if ((0,
|
|
65793
|
+
} else if ((0, import_graphql9.isInterfaceType)(type)) {
|
|
65794
65794
|
definitions.push(astFromInterfaceType(type, schema, pathToDirectivesInExtensions));
|
|
65795
|
-
} else if ((0,
|
|
65795
|
+
} else if ((0, import_graphql9.isUnionType)(type)) {
|
|
65796
65796
|
definitions.push(astFromUnionType(type, schema, pathToDirectivesInExtensions));
|
|
65797
|
-
} else if ((0,
|
|
65797
|
+
} else if ((0, import_graphql9.isInputObjectType)(type)) {
|
|
65798
65798
|
definitions.push(astFromInputObjectType(type, schema, pathToDirectivesInExtensions));
|
|
65799
|
-
} else if ((0,
|
|
65799
|
+
} else if ((0, import_graphql9.isEnumType)(type)) {
|
|
65800
65800
|
definitions.push(astFromEnumType(type, schema, pathToDirectivesInExtensions));
|
|
65801
|
-
} else if ((0,
|
|
65801
|
+
} else if ((0, import_graphql9.isScalarType)(type)) {
|
|
65802
65802
|
definitions.push(astFromScalarType(type, schema, pathToDirectivesInExtensions));
|
|
65803
65803
|
} else {
|
|
65804
65804
|
throw new Error(`Unknown type ${type}.`);
|
|
65805
65805
|
}
|
|
65806
65806
|
}
|
|
65807
65807
|
return {
|
|
65808
|
-
kind:
|
|
65808
|
+
kind: import_graphql9.Kind.DOCUMENT,
|
|
65809
65809
|
definitions
|
|
65810
65810
|
};
|
|
65811
65811
|
}
|
|
@@ -65840,7 +65840,7 @@ function astFromSchema(schema, pathToDirectivesInExtensions) {
|
|
|
65840
65840
|
operationTypeDefinitionNode.type = rootTypeAST;
|
|
65841
65841
|
} else {
|
|
65842
65842
|
operationTypeMap.set(operationTypeNode, {
|
|
65843
|
-
kind:
|
|
65843
|
+
kind: import_graphql9.Kind.OPERATION_TYPE_DEFINITION,
|
|
65844
65844
|
operation: operationTypeNode,
|
|
65845
65845
|
type: rootTypeAST
|
|
65846
65846
|
});
|
|
@@ -65853,12 +65853,12 @@ function astFromSchema(schema, pathToDirectivesInExtensions) {
|
|
|
65853
65853
|
return null;
|
|
65854
65854
|
}
|
|
65855
65855
|
const schemaNode = {
|
|
65856
|
-
kind: operationTypes != null ?
|
|
65856
|
+
kind: operationTypes != null ? import_graphql9.Kind.SCHEMA_DEFINITION : import_graphql9.Kind.SCHEMA_EXTENSION,
|
|
65857
65857
|
operationTypes,
|
|
65858
65858
|
directives
|
|
65859
65859
|
};
|
|
65860
65860
|
schemaNode.description = schema.astNode?.description ?? schema.description != null ? {
|
|
65861
|
-
kind:
|
|
65861
|
+
kind: import_graphql9.Kind.STRING,
|
|
65862
65862
|
value: schema.description,
|
|
65863
65863
|
block: true
|
|
65864
65864
|
} : void 0;
|
|
@@ -65866,19 +65866,19 @@ function astFromSchema(schema, pathToDirectivesInExtensions) {
|
|
|
65866
65866
|
}
|
|
65867
65867
|
function astFromDirective(directive, schema, pathToDirectivesInExtensions) {
|
|
65868
65868
|
return {
|
|
65869
|
-
kind:
|
|
65869
|
+
kind: import_graphql9.Kind.DIRECTIVE_DEFINITION,
|
|
65870
65870
|
description: directive.astNode?.description ?? (directive.description ? {
|
|
65871
|
-
kind:
|
|
65871
|
+
kind: import_graphql9.Kind.STRING,
|
|
65872
65872
|
value: directive.description
|
|
65873
65873
|
} : void 0),
|
|
65874
65874
|
name: {
|
|
65875
|
-
kind:
|
|
65875
|
+
kind: import_graphql9.Kind.NAME,
|
|
65876
65876
|
value: directive.name
|
|
65877
65877
|
},
|
|
65878
65878
|
arguments: directive.args?.map((arg) => astFromArg(arg, schema, pathToDirectivesInExtensions)),
|
|
65879
65879
|
repeatable: directive.isRepeatable,
|
|
65880
65880
|
locations: directive.locations?.map((location) => ({
|
|
65881
|
-
kind:
|
|
65881
|
+
kind: import_graphql9.Kind.NAME,
|
|
65882
65882
|
value: location
|
|
65883
65883
|
})) || []
|
|
65884
65884
|
};
|
|
@@ -65928,14 +65928,14 @@ function getDeprecatableDirectiveNodes(entity, schema, pathToDirectivesInExtensi
|
|
|
65928
65928
|
}
|
|
65929
65929
|
function astFromArg(arg, schema, pathToDirectivesInExtensions) {
|
|
65930
65930
|
return {
|
|
65931
|
-
kind:
|
|
65931
|
+
kind: import_graphql9.Kind.INPUT_VALUE_DEFINITION,
|
|
65932
65932
|
description: arg.astNode?.description ?? (arg.description ? {
|
|
65933
|
-
kind:
|
|
65933
|
+
kind: import_graphql9.Kind.STRING,
|
|
65934
65934
|
value: arg.description,
|
|
65935
65935
|
block: true
|
|
65936
65936
|
} : void 0),
|
|
65937
65937
|
name: {
|
|
65938
|
-
kind:
|
|
65938
|
+
kind: import_graphql9.Kind.NAME,
|
|
65939
65939
|
value: arg.name
|
|
65940
65940
|
},
|
|
65941
65941
|
type: astFromType(arg.type),
|
|
@@ -65945,14 +65945,14 @@ function astFromArg(arg, schema, pathToDirectivesInExtensions) {
|
|
|
65945
65945
|
}
|
|
65946
65946
|
function astFromObjectType(type, schema, pathToDirectivesInExtensions) {
|
|
65947
65947
|
return {
|
|
65948
|
-
kind:
|
|
65948
|
+
kind: import_graphql9.Kind.OBJECT_TYPE_DEFINITION,
|
|
65949
65949
|
description: type.astNode?.description ?? (type.description ? {
|
|
65950
|
-
kind:
|
|
65950
|
+
kind: import_graphql9.Kind.STRING,
|
|
65951
65951
|
value: type.description,
|
|
65952
65952
|
block: true
|
|
65953
65953
|
} : void 0),
|
|
65954
65954
|
name: {
|
|
65955
|
-
kind:
|
|
65955
|
+
kind: import_graphql9.Kind.NAME,
|
|
65956
65956
|
value: type.name
|
|
65957
65957
|
},
|
|
65958
65958
|
fields: Object.values(type.getFields()).map((field) => astFromField(field, schema, pathToDirectivesInExtensions)),
|
|
@@ -65962,14 +65962,14 @@ function astFromObjectType(type, schema, pathToDirectivesInExtensions) {
|
|
|
65962
65962
|
}
|
|
65963
65963
|
function astFromInterfaceType(type, schema, pathToDirectivesInExtensions) {
|
|
65964
65964
|
const node = {
|
|
65965
|
-
kind:
|
|
65965
|
+
kind: import_graphql9.Kind.INTERFACE_TYPE_DEFINITION,
|
|
65966
65966
|
description: type.astNode?.description ?? (type.description ? {
|
|
65967
|
-
kind:
|
|
65967
|
+
kind: import_graphql9.Kind.STRING,
|
|
65968
65968
|
value: type.description,
|
|
65969
65969
|
block: true
|
|
65970
65970
|
} : void 0),
|
|
65971
65971
|
name: {
|
|
65972
|
-
kind:
|
|
65972
|
+
kind: import_graphql9.Kind.NAME,
|
|
65973
65973
|
value: type.name
|
|
65974
65974
|
},
|
|
65975
65975
|
fields: Object.values(type.getFields()).map((field) => astFromField(field, schema, pathToDirectivesInExtensions)),
|
|
@@ -65982,14 +65982,14 @@ function astFromInterfaceType(type, schema, pathToDirectivesInExtensions) {
|
|
|
65982
65982
|
}
|
|
65983
65983
|
function astFromUnionType(type, schema, pathToDirectivesInExtensions) {
|
|
65984
65984
|
return {
|
|
65985
|
-
kind:
|
|
65985
|
+
kind: import_graphql9.Kind.UNION_TYPE_DEFINITION,
|
|
65986
65986
|
description: type.astNode?.description ?? (type.description ? {
|
|
65987
|
-
kind:
|
|
65987
|
+
kind: import_graphql9.Kind.STRING,
|
|
65988
65988
|
value: type.description,
|
|
65989
65989
|
block: true
|
|
65990
65990
|
} : void 0),
|
|
65991
65991
|
name: {
|
|
65992
|
-
kind:
|
|
65992
|
+
kind: import_graphql9.Kind.NAME,
|
|
65993
65993
|
value: type.name
|
|
65994
65994
|
},
|
|
65995
65995
|
directives: getDirectiveNodes(type, schema, pathToDirectivesInExtensions),
|
|
@@ -65998,14 +65998,14 @@ function astFromUnionType(type, schema, pathToDirectivesInExtensions) {
|
|
|
65998
65998
|
}
|
|
65999
65999
|
function astFromInputObjectType(type, schema, pathToDirectivesInExtensions) {
|
|
66000
66000
|
return {
|
|
66001
|
-
kind:
|
|
66001
|
+
kind: import_graphql9.Kind.INPUT_OBJECT_TYPE_DEFINITION,
|
|
66002
66002
|
description: type.astNode?.description ?? (type.description ? {
|
|
66003
|
-
kind:
|
|
66003
|
+
kind: import_graphql9.Kind.STRING,
|
|
66004
66004
|
value: type.description,
|
|
66005
66005
|
block: true
|
|
66006
66006
|
} : void 0),
|
|
66007
66007
|
name: {
|
|
66008
|
-
kind:
|
|
66008
|
+
kind: import_graphql9.Kind.NAME,
|
|
66009
66009
|
value: type.name
|
|
66010
66010
|
},
|
|
66011
66011
|
fields: Object.values(type.getFields()).map((field) => astFromInputField(field, schema, pathToDirectivesInExtensions)),
|
|
@@ -66014,14 +66014,14 @@ function astFromInputObjectType(type, schema, pathToDirectivesInExtensions) {
|
|
|
66014
66014
|
}
|
|
66015
66015
|
function astFromEnumType(type, schema, pathToDirectivesInExtensions) {
|
|
66016
66016
|
return {
|
|
66017
|
-
kind:
|
|
66017
|
+
kind: import_graphql9.Kind.ENUM_TYPE_DEFINITION,
|
|
66018
66018
|
description: type.astNode?.description ?? (type.description ? {
|
|
66019
|
-
kind:
|
|
66019
|
+
kind: import_graphql9.Kind.STRING,
|
|
66020
66020
|
value: type.description,
|
|
66021
66021
|
block: true
|
|
66022
66022
|
} : void 0),
|
|
66023
66023
|
name: {
|
|
66024
|
-
kind:
|
|
66024
|
+
kind: import_graphql9.Kind.NAME,
|
|
66025
66025
|
value: type.name
|
|
66026
66026
|
},
|
|
66027
66027
|
values: Object.values(type.getValues()).map((value) => astFromEnumValue(value, schema, pathToDirectivesInExtensions)),
|
|
@@ -66039,14 +66039,14 @@ function astFromScalarType(type, schema, pathToDirectivesInExtensions) {
|
|
|
66039
66039
|
directives.push(makeDirectiveNode("specifiedBy", specifiedByArgs));
|
|
66040
66040
|
}
|
|
66041
66041
|
return {
|
|
66042
|
-
kind:
|
|
66042
|
+
kind: import_graphql9.Kind.SCALAR_TYPE_DEFINITION,
|
|
66043
66043
|
description: type.astNode?.description ?? (type.description ? {
|
|
66044
|
-
kind:
|
|
66044
|
+
kind: import_graphql9.Kind.STRING,
|
|
66045
66045
|
value: type.description,
|
|
66046
66046
|
block: true
|
|
66047
66047
|
} : void 0),
|
|
66048
66048
|
name: {
|
|
66049
|
-
kind:
|
|
66049
|
+
kind: import_graphql9.Kind.NAME,
|
|
66050
66050
|
value: type.name
|
|
66051
66051
|
},
|
|
66052
66052
|
directives
|
|
@@ -66054,14 +66054,14 @@ function astFromScalarType(type, schema, pathToDirectivesInExtensions) {
|
|
|
66054
66054
|
}
|
|
66055
66055
|
function astFromField(field, schema, pathToDirectivesInExtensions) {
|
|
66056
66056
|
return {
|
|
66057
|
-
kind:
|
|
66057
|
+
kind: import_graphql9.Kind.FIELD_DEFINITION,
|
|
66058
66058
|
description: field.astNode?.description ?? (field.description ? {
|
|
66059
|
-
kind:
|
|
66059
|
+
kind: import_graphql9.Kind.STRING,
|
|
66060
66060
|
value: field.description,
|
|
66061
66061
|
block: true
|
|
66062
66062
|
} : void 0),
|
|
66063
66063
|
name: {
|
|
66064
|
-
kind:
|
|
66064
|
+
kind: import_graphql9.Kind.NAME,
|
|
66065
66065
|
value: field.name
|
|
66066
66066
|
},
|
|
66067
66067
|
arguments: field.args.map((arg) => astFromArg(arg, schema, pathToDirectivesInExtensions)),
|
|
@@ -66071,14 +66071,14 @@ function astFromField(field, schema, pathToDirectivesInExtensions) {
|
|
|
66071
66071
|
}
|
|
66072
66072
|
function astFromInputField(field, schema, pathToDirectivesInExtensions) {
|
|
66073
66073
|
return {
|
|
66074
|
-
kind:
|
|
66074
|
+
kind: import_graphql9.Kind.INPUT_VALUE_DEFINITION,
|
|
66075
66075
|
description: field.astNode?.description ?? (field.description ? {
|
|
66076
|
-
kind:
|
|
66076
|
+
kind: import_graphql9.Kind.STRING,
|
|
66077
66077
|
value: field.description,
|
|
66078
66078
|
block: true
|
|
66079
66079
|
} : void 0),
|
|
66080
66080
|
name: {
|
|
66081
|
-
kind:
|
|
66081
|
+
kind: import_graphql9.Kind.NAME,
|
|
66082
66082
|
value: field.name
|
|
66083
66083
|
},
|
|
66084
66084
|
type: astFromType(field.type),
|
|
@@ -66088,21 +66088,21 @@ function astFromInputField(field, schema, pathToDirectivesInExtensions) {
|
|
|
66088
66088
|
}
|
|
66089
66089
|
function astFromEnumValue(value, schema, pathToDirectivesInExtensions) {
|
|
66090
66090
|
return {
|
|
66091
|
-
kind:
|
|
66091
|
+
kind: import_graphql9.Kind.ENUM_VALUE_DEFINITION,
|
|
66092
66092
|
description: value.astNode?.description ?? (value.description ? {
|
|
66093
|
-
kind:
|
|
66093
|
+
kind: import_graphql9.Kind.STRING,
|
|
66094
66094
|
value: value.description,
|
|
66095
66095
|
block: true
|
|
66096
66096
|
} : void 0),
|
|
66097
66097
|
name: {
|
|
66098
|
-
kind:
|
|
66098
|
+
kind: import_graphql9.Kind.NAME,
|
|
66099
66099
|
value: value.name
|
|
66100
66100
|
},
|
|
66101
66101
|
directives: getDeprecatableDirectiveNodes(value, schema, pathToDirectivesInExtensions)
|
|
66102
66102
|
};
|
|
66103
66103
|
}
|
|
66104
66104
|
function makeDeprecatedDirective(deprecationReason) {
|
|
66105
|
-
return makeDirectiveNode("deprecated", { reason: deprecationReason },
|
|
66105
|
+
return makeDirectiveNode("deprecated", { reason: deprecationReason }, import_graphql9.GraphQLDeprecatedDirective);
|
|
66106
66106
|
}
|
|
66107
66107
|
function makeDirectiveNode(name, args, directive) {
|
|
66108
66108
|
const directiveArguments = [];
|
|
@@ -66114,9 +66114,9 @@ function makeDirectiveNode(name, args, directive) {
|
|
|
66114
66114
|
const value = astFromValue(argValue, arg.type);
|
|
66115
66115
|
if (value) {
|
|
66116
66116
|
directiveArguments.push({
|
|
66117
|
-
kind:
|
|
66117
|
+
kind: import_graphql9.Kind.ARGUMENT,
|
|
66118
66118
|
name: {
|
|
66119
|
-
kind:
|
|
66119
|
+
kind: import_graphql9.Kind.NAME,
|
|
66120
66120
|
value: argName
|
|
66121
66121
|
},
|
|
66122
66122
|
value
|
|
@@ -66130,9 +66130,9 @@ function makeDirectiveNode(name, args, directive) {
|
|
|
66130
66130
|
const value = astFromValueUntyped(argValue);
|
|
66131
66131
|
if (value) {
|
|
66132
66132
|
directiveArguments.push({
|
|
66133
|
-
kind:
|
|
66133
|
+
kind: import_graphql9.Kind.ARGUMENT,
|
|
66134
66134
|
name: {
|
|
66135
|
-
kind:
|
|
66135
|
+
kind: import_graphql9.Kind.NAME,
|
|
66136
66136
|
value: argName
|
|
66137
66137
|
},
|
|
66138
66138
|
value
|
|
@@ -66141,9 +66141,9 @@ function makeDirectiveNode(name, args, directive) {
|
|
|
66141
66141
|
}
|
|
66142
66142
|
}
|
|
66143
66143
|
return {
|
|
66144
|
-
kind:
|
|
66144
|
+
kind: import_graphql9.Kind.DIRECTIVE,
|
|
66145
66145
|
name: {
|
|
66146
|
-
kind:
|
|
66146
|
+
kind: import_graphql9.Kind.NAME,
|
|
66147
66147
|
value: name
|
|
66148
66148
|
},
|
|
66149
66149
|
arguments: directiveArguments
|
|
@@ -66166,7 +66166,7 @@ function makeDirectiveNodes(schema, directiveValues) {
|
|
|
66166
66166
|
}
|
|
66167
66167
|
|
|
66168
66168
|
// ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/comments.js
|
|
66169
|
-
var
|
|
66169
|
+
var import_graphql10 = require("graphql");
|
|
66170
66170
|
var MAX_LINE_LENGTH = 80;
|
|
66171
66171
|
var commentsRegistry = {};
|
|
66172
66172
|
function resetComments() {
|
|
@@ -66411,7 +66411,7 @@ var printDocASTReducerWithComments = Object.keys(printDocASTReducer).reduce((pre
|
|
|
66411
66411
|
}
|
|
66412
66412
|
}), {});
|
|
66413
66413
|
function printWithComments(ast) {
|
|
66414
|
-
return (0,
|
|
66414
|
+
return (0, import_graphql10.visit)(ast, printDocASTReducerWithComments);
|
|
66415
66415
|
}
|
|
66416
66416
|
function isFieldDefinitionNode(node) {
|
|
66417
66417
|
return node.kind === "FieldDefinition";
|
|
@@ -66430,7 +66430,7 @@ function getLeadingCommentBlock(node) {
|
|
|
66430
66430
|
}
|
|
66431
66431
|
const comments = [];
|
|
66432
66432
|
let token = loc.startToken.prev;
|
|
66433
|
-
while (token != null && token.kind ===
|
|
66433
|
+
while (token != null && token.kind === import_graphql10.TokenKind.COMMENT && token.next != null && token.prev != null && token.line + 1 === token.next.line && token.line !== token.prev.line) {
|
|
66434
66434
|
const value = String(token.value);
|
|
66435
66435
|
comments.push(value);
|
|
66436
66436
|
token = token.prev;
|
|
@@ -66482,9 +66482,9 @@ function isBlank(str) {
|
|
|
66482
66482
|
}
|
|
66483
66483
|
|
|
66484
66484
|
// ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/isDocumentNode.js
|
|
66485
|
-
var
|
|
66485
|
+
var import_graphql11 = require("graphql");
|
|
66486
66486
|
function isDocumentNode(object) {
|
|
66487
|
-
return object && typeof object === "object" && "kind" in object && object.kind ===
|
|
66487
|
+
return object && typeof object === "object" && "kind" in object && object.kind === import_graphql11.Kind.DOCUMENT;
|
|
66488
66488
|
}
|
|
66489
66489
|
|
|
66490
66490
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/arguments.js
|
|
@@ -66508,7 +66508,7 @@ function deduplicateArguments(args, config) {
|
|
|
66508
66508
|
}
|
|
66509
66509
|
|
|
66510
66510
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/directives.js
|
|
66511
|
-
var
|
|
66511
|
+
var import_graphql12 = require("graphql");
|
|
66512
66512
|
function directiveAlreadyExists(directivesArr, otherDirective) {
|
|
66513
66513
|
return !!directivesArr.find((directive) => directive.name.value === otherDirective.name.value);
|
|
66514
66514
|
}
|
|
@@ -66568,11 +66568,11 @@ function mergeDirectives(d1 = [], d2 = [], config, directives) {
|
|
|
66568
66568
|
return result;
|
|
66569
66569
|
}
|
|
66570
66570
|
function validateInputs(node, existingNode) {
|
|
66571
|
-
const printedNode = (0,
|
|
66571
|
+
const printedNode = (0, import_graphql12.print)({
|
|
66572
66572
|
...node,
|
|
66573
66573
|
description: void 0
|
|
66574
66574
|
});
|
|
66575
|
-
const printedExistingNode = (0,
|
|
66575
|
+
const printedExistingNode = (0, import_graphql12.print)({
|
|
66576
66576
|
...existingNode,
|
|
66577
66577
|
description: void 0
|
|
66578
66578
|
});
|
|
@@ -66639,7 +66639,7 @@ function mergeEnumValues(first, second, config, directives) {
|
|
|
66639
66639
|
}
|
|
66640
66640
|
|
|
66641
66641
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/enum.js
|
|
66642
|
-
var
|
|
66642
|
+
var import_graphql13 = require("graphql");
|
|
66643
66643
|
function mergeEnum(e1, e2, config, directives) {
|
|
66644
66644
|
if (e2) {
|
|
66645
66645
|
return {
|
|
@@ -66653,33 +66653,33 @@ function mergeEnum(e1, e2, config, directives) {
|
|
|
66653
66653
|
}
|
|
66654
66654
|
return config?.convertExtensions ? {
|
|
66655
66655
|
...e1,
|
|
66656
|
-
kind:
|
|
66656
|
+
kind: import_graphql13.Kind.ENUM_TYPE_DEFINITION
|
|
66657
66657
|
} : e1;
|
|
66658
66658
|
}
|
|
66659
66659
|
|
|
66660
66660
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/utils.js
|
|
66661
|
-
var
|
|
66661
|
+
var import_graphql14 = require("graphql");
|
|
66662
66662
|
function isStringTypes(types15) {
|
|
66663
66663
|
return typeof types15 === "string";
|
|
66664
66664
|
}
|
|
66665
66665
|
function isSourceTypes(types15) {
|
|
66666
|
-
return types15 instanceof
|
|
66666
|
+
return types15 instanceof import_graphql14.Source;
|
|
66667
66667
|
}
|
|
66668
66668
|
function extractType(type) {
|
|
66669
66669
|
let visitedType = type;
|
|
66670
|
-
while (visitedType.kind ===
|
|
66670
|
+
while (visitedType.kind === import_graphql14.Kind.LIST_TYPE || visitedType.kind === "NonNullType") {
|
|
66671
66671
|
visitedType = visitedType.type;
|
|
66672
66672
|
}
|
|
66673
66673
|
return visitedType;
|
|
66674
66674
|
}
|
|
66675
66675
|
function isWrappingTypeNode(type) {
|
|
66676
|
-
return type.kind !==
|
|
66676
|
+
return type.kind !== import_graphql14.Kind.NAMED_TYPE;
|
|
66677
66677
|
}
|
|
66678
66678
|
function isListTypeNode(type) {
|
|
66679
|
-
return type.kind ===
|
|
66679
|
+
return type.kind === import_graphql14.Kind.LIST_TYPE;
|
|
66680
66680
|
}
|
|
66681
66681
|
function isNonNullTypeNode(type) {
|
|
66682
|
-
return type.kind ===
|
|
66682
|
+
return type.kind === import_graphql14.Kind.NON_NULL_TYPE;
|
|
66683
66683
|
}
|
|
66684
66684
|
function printTypeNode(type) {
|
|
66685
66685
|
if (isListTypeNode(type)) {
|
|
@@ -66782,7 +66782,7 @@ function safeChangeForFieldType(oldType, newType, ignoreNullability = false) {
|
|
|
66782
66782
|
}
|
|
66783
66783
|
|
|
66784
66784
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/input-type.js
|
|
66785
|
-
var
|
|
66785
|
+
var import_graphql15 = require("graphql");
|
|
66786
66786
|
function mergeInputType(node, existingNode, config, directives) {
|
|
66787
66787
|
if (existingNode) {
|
|
66788
66788
|
try {
|
|
@@ -66800,12 +66800,12 @@ function mergeInputType(node, existingNode, config, directives) {
|
|
|
66800
66800
|
}
|
|
66801
66801
|
return config?.convertExtensions ? {
|
|
66802
66802
|
...node,
|
|
66803
|
-
kind:
|
|
66803
|
+
kind: import_graphql15.Kind.INPUT_OBJECT_TYPE_DEFINITION
|
|
66804
66804
|
} : node;
|
|
66805
66805
|
}
|
|
66806
66806
|
|
|
66807
66807
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/interface.js
|
|
66808
|
-
var
|
|
66808
|
+
var import_graphql16 = require("graphql");
|
|
66809
66809
|
|
|
66810
66810
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-named-type-array.js
|
|
66811
66811
|
function alreadyExists(arr, other) {
|
|
@@ -66838,15 +66838,15 @@ function mergeInterface(node, existingNode, config, directives) {
|
|
|
66838
66838
|
}
|
|
66839
66839
|
return config?.convertExtensions ? {
|
|
66840
66840
|
...node,
|
|
66841
|
-
kind:
|
|
66841
|
+
kind: import_graphql16.Kind.INTERFACE_TYPE_DEFINITION
|
|
66842
66842
|
} : node;
|
|
66843
66843
|
}
|
|
66844
66844
|
|
|
66845
66845
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-nodes.js
|
|
66846
|
-
var
|
|
66846
|
+
var import_graphql21 = require("graphql");
|
|
66847
66847
|
|
|
66848
66848
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/type.js
|
|
66849
|
-
var
|
|
66849
|
+
var import_graphql17 = require("graphql");
|
|
66850
66850
|
function mergeType(node, existingNode, config, directives) {
|
|
66851
66851
|
if (existingNode) {
|
|
66852
66852
|
try {
|
|
@@ -66865,12 +66865,12 @@ function mergeType(node, existingNode, config, directives) {
|
|
|
66865
66865
|
}
|
|
66866
66866
|
return config?.convertExtensions ? {
|
|
66867
66867
|
...node,
|
|
66868
|
-
kind:
|
|
66868
|
+
kind: import_graphql17.Kind.OBJECT_TYPE_DEFINITION
|
|
66869
66869
|
} : node;
|
|
66870
66870
|
}
|
|
66871
66871
|
|
|
66872
66872
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/scalar.js
|
|
66873
|
-
var
|
|
66873
|
+
var import_graphql18 = require("graphql");
|
|
66874
66874
|
function mergeScalar(node, existingNode, config, directives) {
|
|
66875
66875
|
if (existingNode) {
|
|
66876
66876
|
return {
|
|
@@ -66883,31 +66883,31 @@ function mergeScalar(node, existingNode, config, directives) {
|
|
|
66883
66883
|
}
|
|
66884
66884
|
return config?.convertExtensions ? {
|
|
66885
66885
|
...node,
|
|
66886
|
-
kind:
|
|
66886
|
+
kind: import_graphql18.Kind.SCALAR_TYPE_DEFINITION
|
|
66887
66887
|
} : node;
|
|
66888
66888
|
}
|
|
66889
66889
|
|
|
66890
66890
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/union.js
|
|
66891
|
-
var
|
|
66891
|
+
var import_graphql19 = require("graphql");
|
|
66892
66892
|
function mergeUnion(first, second, config, directives) {
|
|
66893
66893
|
if (second) {
|
|
66894
66894
|
return {
|
|
66895
66895
|
name: first.name,
|
|
66896
66896
|
description: first["description"] || second["description"],
|
|
66897
66897
|
directives: mergeDirectives(first.directives, second.directives, config, directives),
|
|
66898
|
-
kind: config?.convertExtensions || first.kind === "UnionTypeDefinition" || second.kind === "UnionTypeDefinition" ?
|
|
66898
|
+
kind: config?.convertExtensions || first.kind === "UnionTypeDefinition" || second.kind === "UnionTypeDefinition" ? import_graphql19.Kind.UNION_TYPE_DEFINITION : import_graphql19.Kind.UNION_TYPE_EXTENSION,
|
|
66899
66899
|
loc: first.loc,
|
|
66900
66900
|
types: mergeNamedTypeArray(first.types, second.types, config)
|
|
66901
66901
|
};
|
|
66902
66902
|
}
|
|
66903
66903
|
return config?.convertExtensions ? {
|
|
66904
66904
|
...first,
|
|
66905
|
-
kind:
|
|
66905
|
+
kind: import_graphql19.Kind.UNION_TYPE_DEFINITION
|
|
66906
66906
|
} : first;
|
|
66907
66907
|
}
|
|
66908
66908
|
|
|
66909
66909
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/schema-def.js
|
|
66910
|
-
var
|
|
66910
|
+
var import_graphql20 = require("graphql");
|
|
66911
66911
|
var DEFAULT_OPERATION_TYPE_NAME_MAP = {
|
|
66912
66912
|
query: "Query",
|
|
66913
66913
|
mutation: "Mutation",
|
|
@@ -66926,7 +66926,7 @@ function mergeOperationTypes(opNodeList = [], existingOpNodeList = []) {
|
|
|
66926
66926
|
function mergeSchemaDefs(node, existingNode, config, directives) {
|
|
66927
66927
|
if (existingNode) {
|
|
66928
66928
|
return {
|
|
66929
|
-
kind: node.kind ===
|
|
66929
|
+
kind: node.kind === import_graphql20.Kind.SCHEMA_DEFINITION || existingNode.kind === import_graphql20.Kind.SCHEMA_DEFINITION ? import_graphql20.Kind.SCHEMA_DEFINITION : import_graphql20.Kind.SCHEMA_EXTENSION,
|
|
66930
66930
|
description: node["description"] || existingNode["description"],
|
|
66931
66931
|
directives: mergeDirectives(node.directives, existingNode.directives, config, directives),
|
|
66932
66932
|
operationTypes: mergeOperationTypes(node.operationTypes, existingNode.operationTypes)
|
|
@@ -66934,7 +66934,7 @@ function mergeSchemaDefs(node, existingNode, config, directives) {
|
|
|
66934
66934
|
}
|
|
66935
66935
|
return config?.convertExtensions ? {
|
|
66936
66936
|
...node,
|
|
66937
|
-
kind:
|
|
66937
|
+
kind: import_graphql20.Kind.SCHEMA_DEFINITION
|
|
66938
66938
|
} : node;
|
|
66939
66939
|
}
|
|
66940
66940
|
|
|
@@ -66958,36 +66958,36 @@ function mergeGraphQLNodes(nodes, config, directives = {}) {
|
|
|
66958
66958
|
delete mergedResultMap[name];
|
|
66959
66959
|
} else {
|
|
66960
66960
|
switch (nodeDefinition.kind) {
|
|
66961
|
-
case
|
|
66962
|
-
case
|
|
66961
|
+
case import_graphql21.Kind.OBJECT_TYPE_DEFINITION:
|
|
66962
|
+
case import_graphql21.Kind.OBJECT_TYPE_EXTENSION:
|
|
66963
66963
|
mergedResultMap[name] = mergeType(nodeDefinition, mergedResultMap[name], config, directives);
|
|
66964
66964
|
break;
|
|
66965
|
-
case
|
|
66966
|
-
case
|
|
66965
|
+
case import_graphql21.Kind.ENUM_TYPE_DEFINITION:
|
|
66966
|
+
case import_graphql21.Kind.ENUM_TYPE_EXTENSION:
|
|
66967
66967
|
mergedResultMap[name] = mergeEnum(nodeDefinition, mergedResultMap[name], config, directives);
|
|
66968
66968
|
break;
|
|
66969
|
-
case
|
|
66970
|
-
case
|
|
66969
|
+
case import_graphql21.Kind.UNION_TYPE_DEFINITION:
|
|
66970
|
+
case import_graphql21.Kind.UNION_TYPE_EXTENSION:
|
|
66971
66971
|
mergedResultMap[name] = mergeUnion(nodeDefinition, mergedResultMap[name], config, directives);
|
|
66972
66972
|
break;
|
|
66973
|
-
case
|
|
66974
|
-
case
|
|
66973
|
+
case import_graphql21.Kind.SCALAR_TYPE_DEFINITION:
|
|
66974
|
+
case import_graphql21.Kind.SCALAR_TYPE_EXTENSION:
|
|
66975
66975
|
mergedResultMap[name] = mergeScalar(nodeDefinition, mergedResultMap[name], config, directives);
|
|
66976
66976
|
break;
|
|
66977
|
-
case
|
|
66978
|
-
case
|
|
66977
|
+
case import_graphql21.Kind.INPUT_OBJECT_TYPE_DEFINITION:
|
|
66978
|
+
case import_graphql21.Kind.INPUT_OBJECT_TYPE_EXTENSION:
|
|
66979
66979
|
mergedResultMap[name] = mergeInputType(nodeDefinition, mergedResultMap[name], config, directives);
|
|
66980
66980
|
break;
|
|
66981
|
-
case
|
|
66982
|
-
case
|
|
66981
|
+
case import_graphql21.Kind.INTERFACE_TYPE_DEFINITION:
|
|
66982
|
+
case import_graphql21.Kind.INTERFACE_TYPE_EXTENSION:
|
|
66983
66983
|
mergedResultMap[name] = mergeInterface(nodeDefinition, mergedResultMap[name], config, directives);
|
|
66984
66984
|
break;
|
|
66985
|
-
case
|
|
66985
|
+
case import_graphql21.Kind.DIRECTIVE_DEFINITION:
|
|
66986
66986
|
mergedResultMap[name] = mergeDirective(nodeDefinition, mergedResultMap[name]);
|
|
66987
66987
|
break;
|
|
66988
66988
|
}
|
|
66989
66989
|
}
|
|
66990
|
-
} else if (nodeDefinition.kind ===
|
|
66990
|
+
} else if (nodeDefinition.kind === import_graphql21.Kind.SCHEMA_DEFINITION || nodeDefinition.kind === import_graphql21.Kind.SCHEMA_EXTENSION) {
|
|
66991
66991
|
mergedResultMap[schemaDefSymbol] = mergeSchemaDefs(nodeDefinition, mergedResultMap[schemaDefSymbol], config);
|
|
66992
66992
|
}
|
|
66993
66993
|
}
|
|
@@ -66995,11 +66995,11 @@ function mergeGraphQLNodes(nodes, config, directives = {}) {
|
|
|
66995
66995
|
}
|
|
66996
66996
|
|
|
66997
66997
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-typedefs.js
|
|
66998
|
-
var
|
|
66998
|
+
var import_graphql22 = require("graphql");
|
|
66999
66999
|
function mergeTypeDefs(typeSource, config) {
|
|
67000
67000
|
resetComments();
|
|
67001
67001
|
const doc = {
|
|
67002
|
-
kind:
|
|
67002
|
+
kind: import_graphql22.Kind.DOCUMENT,
|
|
67003
67003
|
definitions: mergeGraphQLTypes(typeSource, {
|
|
67004
67004
|
useSchemaDefinition: true,
|
|
67005
67005
|
forceSchemaDefinition: false,
|
|
@@ -67026,14 +67026,14 @@ function visitTypeSources(typeSource, options, allDirectives = [], allNodes = []
|
|
|
67026
67026
|
for (const type of typeSource) {
|
|
67027
67027
|
visitTypeSources(type, options, allDirectives, allNodes, visitedTypeSources);
|
|
67028
67028
|
}
|
|
67029
|
-
} else if ((0,
|
|
67029
|
+
} else if ((0, import_graphql22.isSchema)(typeSource)) {
|
|
67030
67030
|
const documentNode = getDocumentNodeFromSchema(typeSource, options);
|
|
67031
67031
|
visitTypeSources(documentNode.definitions, options, allDirectives, allNodes, visitedTypeSources);
|
|
67032
67032
|
} else if (isStringTypes(typeSource) || isSourceTypes(typeSource)) {
|
|
67033
|
-
const documentNode = (0,
|
|
67033
|
+
const documentNode = (0, import_graphql22.parse)(typeSource, options);
|
|
67034
67034
|
visitTypeSources(documentNode.definitions, options, allDirectives, allNodes, visitedTypeSources);
|
|
67035
|
-
} else if (typeof typeSource === "object" && (0,
|
|
67036
|
-
if (typeSource.kind ===
|
|
67035
|
+
} else if (typeof typeSource === "object" && (0, import_graphql22.isDefinitionNode)(typeSource)) {
|
|
67036
|
+
if (typeSource.kind === import_graphql22.Kind.DIRECTIVE_DEFINITION) {
|
|
67037
67037
|
allDirectives.push(typeSource);
|
|
67038
67038
|
} else {
|
|
67039
67039
|
allNodes.push(typeSource);
|
|
@@ -67053,7 +67053,7 @@ function mergeGraphQLTypes(typeSource, config) {
|
|
|
67053
67053
|
const mergedNodes = mergeGraphQLNodes(allNodes, config, mergedDirectives);
|
|
67054
67054
|
if (config?.useSchemaDefinition) {
|
|
67055
67055
|
const schemaDef = mergedNodes[schemaDefSymbol] || {
|
|
67056
|
-
kind:
|
|
67056
|
+
kind: import_graphql22.Kind.SCHEMA_DEFINITION,
|
|
67057
67057
|
operationTypes: []
|
|
67058
67058
|
};
|
|
67059
67059
|
const operationTypes = schemaDef.operationTypes;
|
|
@@ -67064,9 +67064,9 @@ function mergeGraphQLTypes(typeSource, config) {
|
|
|
67064
67064
|
const existingPossibleRootType = mergedNodes[possibleRootTypeName];
|
|
67065
67065
|
if (existingPossibleRootType != null && existingPossibleRootType.name != null) {
|
|
67066
67066
|
operationTypes.push({
|
|
67067
|
-
kind:
|
|
67067
|
+
kind: import_graphql22.Kind.OPERATION_TYPE_DEFINITION,
|
|
67068
67068
|
type: {
|
|
67069
|
-
kind:
|
|
67069
|
+
kind: import_graphql22.Kind.NAMED_TYPE,
|
|
67070
67070
|
name: existingPossibleRootType.name
|
|
67071
67071
|
},
|
|
67072
67072
|
operation: opTypeDefNodeType
|
|
@@ -67080,15 +67080,15 @@ function mergeGraphQLTypes(typeSource, config) {
|
|
|
67080
67080
|
}
|
|
67081
67081
|
if (config?.forceSchemaDefinition && !mergedNodes[schemaDefSymbol]?.operationTypes?.length) {
|
|
67082
67082
|
mergedNodes[schemaDefSymbol] = {
|
|
67083
|
-
kind:
|
|
67083
|
+
kind: import_graphql22.Kind.SCHEMA_DEFINITION,
|
|
67084
67084
|
operationTypes: [
|
|
67085
67085
|
{
|
|
67086
|
-
kind:
|
|
67086
|
+
kind: import_graphql22.Kind.OPERATION_TYPE_DEFINITION,
|
|
67087
67087
|
operation: "query",
|
|
67088
67088
|
type: {
|
|
67089
|
-
kind:
|
|
67089
|
+
kind: import_graphql22.Kind.NAMED_TYPE,
|
|
67090
67090
|
name: {
|
|
67091
|
-
kind:
|
|
67091
|
+
kind: import_graphql22.Kind.NAME,
|
|
67092
67092
|
value: "Query"
|
|
67093
67093
|
}
|
|
67094
67094
|
}
|