houdini 1.5.2 → 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 +421 -547
- package/build/cmd-esm/index.js +271 -397
- 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/config.d.ts +3 -1
- 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 +668 -666
- package/build/lib-esm/index.js +668 -666
- package/build/test-cjs/index.js +401 -401
- package/build/test-esm/index.js +251 -251
- package/build/vite-cjs/index.js +744 -742
- package/build/vite-esm/index.js +634 -632
- package/package.json +1 -1
package/build/cmd-cjs/index.js
CHANGED
|
@@ -61667,7 +61667,7 @@ function mergeSchemas(config) {
|
|
|
61667
61667
|
}
|
|
61668
61668
|
|
|
61669
61669
|
// src/lib/config.ts
|
|
61670
|
-
var
|
|
61670
|
+
var graphql5 = __toESM(require("graphql"), 1);
|
|
61671
61671
|
var import_minimatch8 = __toESM(require_minimatch(), 1);
|
|
61672
61672
|
var import_node_url4 = require("node:url");
|
|
61673
61673
|
|
|
@@ -68879,142 +68879,247 @@ function plugin(name, hooks) {
|
|
|
68879
68879
|
}
|
|
68880
68880
|
|
|
68881
68881
|
// src/lib/router/conventions.ts
|
|
68882
|
-
|
|
68883
|
-
|
|
68884
|
-
adapter_config_path: () => adapter_config_path,
|
|
68885
|
-
app_component_path: () => app_component_path,
|
|
68886
|
-
componentField_unit_path: () => componentField_unit_path,
|
|
68887
|
-
fallback_unit_path: () => fallback_unit_path,
|
|
68888
|
-
is_layout: () => is_layout,
|
|
68889
|
-
layout_unit_path: () => layout_unit_path,
|
|
68890
|
-
page_entries_dir: () => page_entries_dir,
|
|
68891
|
-
page_entry_path: () => page_entry_path,
|
|
68892
|
-
page_id: () => page_id,
|
|
68893
|
-
page_unit_path: () => page_unit_path,
|
|
68894
|
-
read_layoutQuery: () => read_layoutQuery,
|
|
68895
|
-
read_layoutView: () => read_layoutView,
|
|
68896
|
-
read_pageQuery: () => read_pageQuery,
|
|
68897
|
-
read_pageView: () => read_pageView,
|
|
68898
|
-
router_index_path: () => router_index_path,
|
|
68899
|
-
router_path: () => router_path,
|
|
68900
|
-
serialized_manifest_path: () => serialized_manifest_path,
|
|
68901
|
-
server_adapter_path: () => server_adapter_path,
|
|
68902
|
-
temp_dir: () => temp_dir,
|
|
68903
|
-
units_dir: () => units_dir,
|
|
68904
|
-
vite_render_path: () => vite_render_path
|
|
68905
|
-
});
|
|
68906
|
-
function router_path(config) {
|
|
68907
|
-
return path_exports.join(base_dir(config), "Router.jsx");
|
|
68908
|
-
}
|
|
68909
|
-
function page_entry_path(config, id, base) {
|
|
68910
|
-
return path_exports.join(page_entries_dir(config, base), `${id}.jsx`);
|
|
68911
|
-
}
|
|
68912
|
-
function server_adapter_path(config, base) {
|
|
68913
|
-
return path_exports.join(units_dir(config, base), "render", "server.js");
|
|
68914
|
-
}
|
|
68915
|
-
function adapter_config_path(config, base) {
|
|
68916
|
-
return path_exports.join(units_dir(config, base), "render", "config.js");
|
|
68882
|
+
function temp_dir(config, key) {
|
|
68883
|
+
return join2(config.rootDir, "temp", key);
|
|
68917
68884
|
}
|
|
68918
|
-
|
|
68919
|
-
|
|
68885
|
+
|
|
68886
|
+
// src/lib/router/manifest.ts
|
|
68887
|
+
var t2 = __toESM(require_lib5(), 1);
|
|
68888
|
+
var graphql3 = __toESM(require("graphql"), 1);
|
|
68889
|
+
|
|
68890
|
+
// src/lib/graphql.ts
|
|
68891
|
+
var graphql2 = __toESM(require("graphql"), 1);
|
|
68892
|
+
var import_node_crypto = __toESM(require("node:crypto"), 1);
|
|
68893
|
+
function getRootType(type) {
|
|
68894
|
+
if (graphql2.isNonNullType(type)) {
|
|
68895
|
+
return getRootType(type.ofType);
|
|
68896
|
+
}
|
|
68897
|
+
if (graphql2.isListType(type)) {
|
|
68898
|
+
return getRootType(type.ofType);
|
|
68899
|
+
}
|
|
68900
|
+
return type;
|
|
68920
68901
|
}
|
|
68921
|
-
function
|
|
68922
|
-
return
|
|
68902
|
+
function hashOriginal({ document }) {
|
|
68903
|
+
return hashDocument(document.originalString);
|
|
68923
68904
|
}
|
|
68924
|
-
function
|
|
68925
|
-
return
|
|
68905
|
+
function hashRaw({ document }) {
|
|
68906
|
+
return hashDocument(document.artifact?.raw);
|
|
68926
68907
|
}
|
|
68927
|
-
function
|
|
68928
|
-
return
|
|
68908
|
+
function hashDocument(str) {
|
|
68909
|
+
return import_node_crypto.default.createHash("sha256").update(str || "").digest("hex");
|
|
68929
68910
|
}
|
|
68930
|
-
function
|
|
68931
|
-
return
|
|
68911
|
+
function parentField(ancestors) {
|
|
68912
|
+
return walkParentField([...ancestors].sort(() => -1));
|
|
68932
68913
|
}
|
|
68933
|
-
function
|
|
68934
|
-
|
|
68914
|
+
function walkParentField(ancestors) {
|
|
68915
|
+
let head = ancestors.shift();
|
|
68916
|
+
if (Array.isArray(head) || head.kind === "SelectionSet") {
|
|
68917
|
+
return walkParentField(ancestors);
|
|
68918
|
+
}
|
|
68919
|
+
return head;
|
|
68935
68920
|
}
|
|
68936
|
-
|
|
68937
|
-
const
|
|
68938
|
-
|
|
68921
|
+
function parentTypeFromAncestors(schema, filepath, ancestors) {
|
|
68922
|
+
const parents = [...ancestors];
|
|
68923
|
+
parents.reverse();
|
|
68924
|
+
return walkAncestors(schema, filepath, parents);
|
|
68939
68925
|
}
|
|
68940
|
-
|
|
68941
|
-
|
|
68942
|
-
|
|
68943
|
-
|
|
68944
|
-
|
|
68945
|
-
|
|
68926
|
+
function walkAncestors(schema, filepath, ancestors) {
|
|
68927
|
+
let head = ancestors.shift();
|
|
68928
|
+
if (Array.isArray(head)) {
|
|
68929
|
+
return walkAncestors(schema, filepath, ancestors);
|
|
68930
|
+
}
|
|
68931
|
+
if (!head) {
|
|
68932
|
+
throw new HoudiniError({ filepath, message: "Could not figure out type of field" });
|
|
68933
|
+
}
|
|
68934
|
+
if (head.kind === "OperationDefinition") {
|
|
68935
|
+
const operationType = {
|
|
68936
|
+
query: schema.getQueryType(),
|
|
68937
|
+
mutation: schema.getMutationType(),
|
|
68938
|
+
subscription: schema.getSubscriptionType()
|
|
68939
|
+
}[head.operation];
|
|
68940
|
+
if (!operationType) {
|
|
68941
|
+
throw new HoudiniError({ filepath, message: "Could not find operation type" });
|
|
68946
68942
|
}
|
|
68943
|
+
return operationType;
|
|
68947
68944
|
}
|
|
68948
|
-
|
|
68949
|
-
|
|
68950
|
-
|
|
68951
|
-
|
|
68952
|
-
|
|
68953
|
-
}
|
|
68954
|
-
|
|
68955
|
-
for (const name of ["+layout.tsx", "+layout.jsx"]) {
|
|
68956
|
-
let target = path_exports.join(base, name);
|
|
68957
|
-
let result = await fs_exports.readFile(target);
|
|
68958
|
-
if (result) {
|
|
68959
|
-
return [target, result];
|
|
68945
|
+
if (head.kind === "FragmentDefinition") {
|
|
68946
|
+
const result = schema.getType(head.typeCondition.name.value);
|
|
68947
|
+
if (!result) {
|
|
68948
|
+
throw new HoudiniError({
|
|
68949
|
+
filepath,
|
|
68950
|
+
message: `Could not find definition for ${head.typeCondition.name.value} in the schema`
|
|
68951
|
+
});
|
|
68960
68952
|
}
|
|
68953
|
+
return result;
|
|
68961
68954
|
}
|
|
68962
|
-
|
|
68963
|
-
|
|
68964
|
-
|
|
68965
|
-
|
|
68966
|
-
|
|
68967
|
-
|
|
68968
|
-
|
|
68955
|
+
if (head.kind === "FragmentSpread") {
|
|
68956
|
+
throw new Error("How the hell did this happen?");
|
|
68957
|
+
}
|
|
68958
|
+
const parent2 = walkAncestors(schema, filepath, ancestors);
|
|
68959
|
+
if (head.kind === "InlineFragment") {
|
|
68960
|
+
if (!head.typeCondition) {
|
|
68961
|
+
return parent2;
|
|
68962
|
+
}
|
|
68963
|
+
const wrapper = schema.getType(head.typeCondition.name.value);
|
|
68964
|
+
if (!wrapper) {
|
|
68965
|
+
throw new HoudiniError({
|
|
68966
|
+
filepath,
|
|
68967
|
+
message: "Could not find type with name: " + head.typeCondition.name.value
|
|
68968
|
+
});
|
|
68969
|
+
}
|
|
68970
|
+
return wrapper;
|
|
68971
|
+
}
|
|
68972
|
+
if (head.kind === "SelectionSet") {
|
|
68973
|
+
return parent2;
|
|
68974
|
+
}
|
|
68975
|
+
const field = parent2.getFields()[head.name.value];
|
|
68976
|
+
if (!field) {
|
|
68977
|
+
throw new HoudiniError({
|
|
68978
|
+
filepath,
|
|
68979
|
+
message: `Could not find definition of ${head.name.value} in ${parent2.toString()}`
|
|
68980
|
+
});
|
|
68981
|
+
}
|
|
68982
|
+
return getRootType(field.type);
|
|
68969
68983
|
}
|
|
68970
|
-
function
|
|
68971
|
-
|
|
68984
|
+
function definitionFromAncestors(ancestors) {
|
|
68985
|
+
let parents = [...ancestors];
|
|
68986
|
+
parents.shift();
|
|
68987
|
+
let definition = parents.shift();
|
|
68988
|
+
while (Array.isArray(definition) && definition) {
|
|
68989
|
+
definition = parents.shift();
|
|
68990
|
+
}
|
|
68991
|
+
return { parents, definition };
|
|
68972
68992
|
}
|
|
68973
|
-
function
|
|
68974
|
-
|
|
68975
|
-
|
|
68976
|
-
|
|
68977
|
-
|
|
68978
|
-
|
|
68979
|
-
|
|
68980
|
-
|
|
68981
|
-
|
|
68982
|
-
if (match2 !== -1) {
|
|
68983
|
-
copy += mask;
|
|
68993
|
+
function formatErrors(e3, afterError) {
|
|
68994
|
+
const errors = Array.isArray(e3) ? e3 : [e3];
|
|
68995
|
+
for (const error of errors) {
|
|
68996
|
+
if ("filepath" in error && error.filepath) {
|
|
68997
|
+
const relative2 = relative(process.cwd(), error.filepath);
|
|
68998
|
+
console.error(`\u274C Encountered error in ${relative2}`);
|
|
68999
|
+
if (error.message) {
|
|
69000
|
+
console.error(error.message);
|
|
69001
|
+
}
|
|
68984
69002
|
} else {
|
|
68985
|
-
|
|
69003
|
+
console.error(`\u274C ${error.message}`);
|
|
69004
|
+
if ("description" in error && error.description) {
|
|
69005
|
+
console.error(`${error.description}`);
|
|
69006
|
+
}
|
|
68986
69007
|
}
|
|
69008
|
+
afterError?.(e3);
|
|
68987
69009
|
}
|
|
68988
|
-
return copy;
|
|
68989
|
-
}
|
|
68990
|
-
function page_entries_dir(config, base) {
|
|
68991
|
-
return path_exports.join(units_dir(config, base), "entries");
|
|
68992
69010
|
}
|
|
68993
|
-
function
|
|
68994
|
-
|
|
69011
|
+
function unwrapType(config, type, wrappers = [], convertRuntimeScalars) {
|
|
69012
|
+
if (type.kind === "NonNullType") {
|
|
69013
|
+
return unwrapType(config, type.type, [TypeWrapper.NonNull, ...wrappers]);
|
|
69014
|
+
}
|
|
69015
|
+
if (type instanceof graphql2.GraphQLNonNull) {
|
|
69016
|
+
return unwrapType(config, type.ofType, [TypeWrapper.NonNull, ...wrappers]);
|
|
69017
|
+
}
|
|
69018
|
+
if (wrappers[0] !== TypeWrapper.NonNull) {
|
|
69019
|
+
wrappers.unshift(TypeWrapper.Nullable);
|
|
69020
|
+
}
|
|
69021
|
+
if (type.kind === "ListType") {
|
|
69022
|
+
return unwrapType(config, type.type, [TypeWrapper.List, ...wrappers]);
|
|
69023
|
+
}
|
|
69024
|
+
if (type instanceof graphql2.GraphQLList) {
|
|
69025
|
+
return unwrapType(config, type.ofType, [TypeWrapper.List, ...wrappers]);
|
|
69026
|
+
}
|
|
69027
|
+
if (convertRuntimeScalars && config.configFile.features?.runtimeScalars?.[type.name.value]) {
|
|
69028
|
+
type = config.schema.getType(
|
|
69029
|
+
config.configFile.features?.runtimeScalars?.[type.name.value].type
|
|
69030
|
+
);
|
|
69031
|
+
}
|
|
69032
|
+
const namedType = config.schema.getType(type.name.value || type.name);
|
|
69033
|
+
if (!namedType) {
|
|
69034
|
+
throw new Error("Unknown type: " + type.name.value || type.name);
|
|
69035
|
+
}
|
|
69036
|
+
return { type: namedType, wrappers };
|
|
68995
69037
|
}
|
|
68996
|
-
function
|
|
68997
|
-
|
|
69038
|
+
function wrapType({
|
|
69039
|
+
type,
|
|
69040
|
+
wrappers
|
|
69041
|
+
}) {
|
|
69042
|
+
const head = wrappers[0];
|
|
69043
|
+
const tail = wrappers.slice(1);
|
|
69044
|
+
let kind = graphql2.Kind.NAMED_TYPE;
|
|
69045
|
+
if (head === TypeWrapper.List) {
|
|
69046
|
+
kind = graphql2.Kind.LIST_TYPE;
|
|
69047
|
+
} else if (head === TypeWrapper.NonNull) {
|
|
69048
|
+
kind = graphql2.Kind.NON_NULL_TYPE;
|
|
69049
|
+
}
|
|
69050
|
+
if (kind === "NamedType") {
|
|
69051
|
+
return {
|
|
69052
|
+
kind,
|
|
69053
|
+
name: {
|
|
69054
|
+
kind: graphql2.Kind.NAME,
|
|
69055
|
+
value: type.name
|
|
69056
|
+
}
|
|
69057
|
+
};
|
|
69058
|
+
}
|
|
69059
|
+
return {
|
|
69060
|
+
kind,
|
|
69061
|
+
type: wrapType({ type, wrappers: tail })
|
|
69062
|
+
};
|
|
68998
69063
|
}
|
|
68999
|
-
|
|
69000
|
-
|
|
69064
|
+
var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
|
|
69065
|
+
TypeWrapper2["Nullable"] = "Nullable";
|
|
69066
|
+
TypeWrapper2["List"] = "List";
|
|
69067
|
+
TypeWrapper2["NonNull"] = "NonNull";
|
|
69068
|
+
return TypeWrapper2;
|
|
69069
|
+
})(TypeWrapper || {});
|
|
69070
|
+
|
|
69071
|
+
// src/lib/parse.ts
|
|
69072
|
+
var import_parser = __toESM(require_lib6(), 1);
|
|
69073
|
+
var import_recast = __toESM(require_main2(), 1);
|
|
69074
|
+
|
|
69075
|
+
// src/lib/deepMerge.ts
|
|
69076
|
+
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
69077
|
+
function deepMerge2(filepath, ...targets) {
|
|
69078
|
+
try {
|
|
69079
|
+
if (targets.length === 1) {
|
|
69080
|
+
return targets[0];
|
|
69081
|
+
} else if (targets.length === 2) {
|
|
69082
|
+
return (0, import_deepmerge.default)(targets[0], targets[1], {
|
|
69083
|
+
arrayMerge: (source, update) => [...new Set(source.concat(update))]
|
|
69084
|
+
});
|
|
69085
|
+
}
|
|
69086
|
+
return deepMerge2(filepath, targets[0], deepMerge2(filepath, ...targets.slice(1)));
|
|
69087
|
+
} catch (e3) {
|
|
69088
|
+
throw new HoudiniError({
|
|
69089
|
+
filepath,
|
|
69090
|
+
message: "could not merge: " + JSON.stringify(targets, null, 4),
|
|
69091
|
+
description: e3.message
|
|
69092
|
+
});
|
|
69093
|
+
}
|
|
69001
69094
|
}
|
|
69002
|
-
|
|
69003
|
-
|
|
69095
|
+
|
|
69096
|
+
// src/lib/parse.ts
|
|
69097
|
+
function parseJS(str, config) {
|
|
69098
|
+
const defaultConfig = {
|
|
69099
|
+
plugins: [
|
|
69100
|
+
"typescript",
|
|
69101
|
+
"importAssertions",
|
|
69102
|
+
"decorators-legacy",
|
|
69103
|
+
"explicitResourceManagement"
|
|
69104
|
+
],
|
|
69105
|
+
sourceType: "module"
|
|
69106
|
+
};
|
|
69107
|
+
return (0, import_parser.parse)(str || "", config ? deepMerge2("", defaultConfig, config) : defaultConfig).program;
|
|
69004
69108
|
}
|
|
69005
|
-
function
|
|
69006
|
-
|
|
69109
|
+
function parseJSON(str) {
|
|
69110
|
+
str = str.replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g, (m3, g3) => g3 ? "" : m3);
|
|
69111
|
+
return JSON.parse(str);
|
|
69007
69112
|
}
|
|
69008
|
-
function
|
|
69009
|
-
|
|
69113
|
+
async function printJS(script, options) {
|
|
69114
|
+
if (options?.pretty) {
|
|
69115
|
+
return (0, import_recast.prettyPrint)(script, options);
|
|
69116
|
+
} else {
|
|
69117
|
+
return (0, import_recast.print)(script, options);
|
|
69118
|
+
}
|
|
69010
69119
|
}
|
|
69011
69120
|
|
|
69012
|
-
// src/lib/router/manifest.ts
|
|
69013
|
-
var t2 = __toESM(require_lib5(), 1);
|
|
69014
|
-
var graphql2 = __toESM(require("graphql"), 1);
|
|
69015
|
-
|
|
69016
69121
|
// src/lib/router/server.ts
|
|
69017
|
-
var
|
|
69122
|
+
var graphql4 = __toESM(require("graphql"), 1);
|
|
69018
69123
|
var import_node_path3 = __toESM(require("node:path"), 1);
|
|
69019
69124
|
|
|
69020
69125
|
// src/runtime/lib/flatten.ts
|
|
@@ -71363,14 +71468,14 @@ function isSecondaryBuild() {
|
|
|
71363
71468
|
async function buildLocalSchema(config) {
|
|
71364
71469
|
const { build } = await import("vite");
|
|
71365
71470
|
const schema = import_node_path3.default.join(config.localApiDir, "+schema");
|
|
71366
|
-
const outDir =
|
|
71471
|
+
const outDir = temp_dir(config, "schema");
|
|
71367
71472
|
process.env.HOUDINI_SECONDARY_BUILD = "true";
|
|
71368
71473
|
try {
|
|
71369
|
-
await
|
|
71474
|
+
await remove(import_node_path3.default.join(outDir, "assets", "schema.js"));
|
|
71370
71475
|
} catch {
|
|
71371
71476
|
}
|
|
71372
71477
|
try {
|
|
71373
|
-
await
|
|
71478
|
+
await mkdir(outDir);
|
|
71374
71479
|
} catch {
|
|
71375
71480
|
}
|
|
71376
71481
|
await build({
|
|
@@ -71402,14 +71507,14 @@ async function loadLocalSchema(config) {
|
|
|
71402
71507
|
}
|
|
71403
71508
|
try {
|
|
71404
71509
|
const { default: schema } = await import(import_node_path3.default.join(
|
|
71405
|
-
|
|
71510
|
+
temp_dir(config, "schema"),
|
|
71406
71511
|
`schema.js?${Date.now().valueOf()}}`
|
|
71407
71512
|
));
|
|
71408
71513
|
return schema;
|
|
71409
71514
|
} catch (e3) {
|
|
71410
71515
|
const message = "message" in e3 ? e3.message : e3;
|
|
71411
71516
|
console.error("\u26A0\uFE0F Failed to load local schema: ", message);
|
|
71412
|
-
return new
|
|
71517
|
+
return new graphql4.GraphQLSchema({});
|
|
71413
71518
|
}
|
|
71414
71519
|
}
|
|
71415
71520
|
|
|
@@ -71485,7 +71590,7 @@ var Config = class {
|
|
|
71485
71590
|
persistedQueriesPath
|
|
71486
71591
|
} = this.configFile;
|
|
71487
71592
|
if (typeof schema === "string") {
|
|
71488
|
-
this.schema =
|
|
71593
|
+
this.schema = graphql5.buildSchema(schema);
|
|
71489
71594
|
} else {
|
|
71490
71595
|
this.schema = schema;
|
|
71491
71596
|
}
|
|
@@ -71633,7 +71738,7 @@ var Config = class {
|
|
|
71633
71738
|
set newSchema(value) {
|
|
71634
71739
|
this.schemaString = value;
|
|
71635
71740
|
if (value) {
|
|
71636
|
-
this.#newSchemaInstance =
|
|
71741
|
+
this.#newSchemaInstance = graphql5.buildSchema(value);
|
|
71637
71742
|
} else {
|
|
71638
71743
|
this.#newSchemaInstance = null;
|
|
71639
71744
|
}
|
|
@@ -71723,21 +71828,21 @@ var Config = class {
|
|
|
71723
71828
|
}
|
|
71724
71829
|
documentName(document) {
|
|
71725
71830
|
const operation = document.definitions.find(
|
|
71726
|
-
({ kind }) => kind ===
|
|
71831
|
+
({ kind }) => kind === graphql5.Kind.OPERATION_DEFINITION
|
|
71727
71832
|
);
|
|
71728
71833
|
if (operation) {
|
|
71729
71834
|
if (!operation.name) {
|
|
71730
|
-
throw new Error("encountered operation with no name: " +
|
|
71835
|
+
throw new Error("encountered operation with no name: " + graphql5.print(document));
|
|
71731
71836
|
}
|
|
71732
71837
|
return operation.name.value;
|
|
71733
71838
|
}
|
|
71734
71839
|
const fragmentDefinitions = document.definitions.filter(
|
|
71735
|
-
({ kind }) => kind ===
|
|
71840
|
+
({ kind }) => kind === graphql5.Kind.FRAGMENT_DEFINITION
|
|
71736
71841
|
);
|
|
71737
71842
|
if (fragmentDefinitions.length) {
|
|
71738
71843
|
return fragmentDefinitions[0].name.value;
|
|
71739
71844
|
}
|
|
71740
|
-
throw new Error("Could not generate artifact name for document: " +
|
|
71845
|
+
throw new Error("Could not generate artifact name for document: " + graphql5.print(document));
|
|
71741
71846
|
}
|
|
71742
71847
|
isSelectionScalar(type) {
|
|
71743
71848
|
return ["String", "Boolean", "Float", "ID", "Int"].concat(Object.keys(this.scalars || {})).includes(type);
|
|
@@ -71757,8 +71862,8 @@ var Config = class {
|
|
|
71757
71862
|
relative(process.cwd(), filepath).replaceAll(sep2, "_").replace(".ts", ".js")
|
|
71758
71863
|
);
|
|
71759
71864
|
}
|
|
71760
|
-
excludeFile(filepath) {
|
|
71761
|
-
if (this.exclude.length > 0 && this.exclude.some((pattern) => (0, import_minimatch8.default)(filepath, pattern))) {
|
|
71865
|
+
excludeFile(filepath, { root = this.projectRoot }) {
|
|
71866
|
+
if (this.exclude.length > 0 && this.exclude.some((pattern) => (0, import_minimatch8.default)(filepath, join2(root, pattern)))) {
|
|
71762
71867
|
return true;
|
|
71763
71868
|
}
|
|
71764
71869
|
for (const plugin2 of this.plugins) {
|
|
@@ -71787,7 +71892,7 @@ var Config = class {
|
|
|
71787
71892
|
if (!included && !this.include.some((pattern) => (0, import_minimatch8.default)(filepath, join2(root, pattern)))) {
|
|
71788
71893
|
return false;
|
|
71789
71894
|
}
|
|
71790
|
-
return !this.excludeFile(filepath);
|
|
71895
|
+
return !this.excludeFile(filepath, { root });
|
|
71791
71896
|
}
|
|
71792
71897
|
pluginRuntimeDirectory(name) {
|
|
71793
71898
|
return join2(this.pluginDirectory(name), "runtime");
|
|
@@ -71947,10 +72052,10 @@ var Config = class {
|
|
|
71947
72052
|
localDocumentData(document) {
|
|
71948
72053
|
let paginated = false;
|
|
71949
72054
|
let componentFields3 = [];
|
|
71950
|
-
const typeInfo = new
|
|
71951
|
-
|
|
72055
|
+
const typeInfo = new graphql5.TypeInfo(this.schema);
|
|
72056
|
+
graphql5.visit(
|
|
71952
72057
|
document,
|
|
71953
|
-
|
|
72058
|
+
graphql5.visitWithTypeInfo(typeInfo, {
|
|
71954
72059
|
Directive: (node) => {
|
|
71955
72060
|
if ([this.paginateDirective].includes(node.name.value)) {
|
|
71956
72061
|
paginated = true;
|
|
@@ -72310,248 +72415,17 @@ async function loadSchemaFile(schemaPath) {
|
|
|
72310
72415
|
}
|
|
72311
72416
|
const contents = await readFile(schemaPath);
|
|
72312
72417
|
if (schemaPath.endsWith("gql") || schemaPath.endsWith("graphql") || schemaPath.endsWith("graphqls")) {
|
|
72313
|
-
return
|
|
72418
|
+
return graphql5.buildSchema(contents);
|
|
72314
72419
|
}
|
|
72315
72420
|
const jsonContents = JSON.parse(contents);
|
|
72316
72421
|
if (jsonContents.data) {
|
|
72317
|
-
return
|
|
72422
|
+
return graphql5.buildClientSchema(jsonContents.data);
|
|
72318
72423
|
}
|
|
72319
|
-
return
|
|
72424
|
+
return graphql5.buildClientSchema(jsonContents);
|
|
72320
72425
|
}
|
|
72321
|
-
var emptySchema =
|
|
72426
|
+
var emptySchema = graphql5.buildSchema("type Query { hello: String }");
|
|
72322
72427
|
var defaultDirectives = emptySchema.getDirectives().map((dir) => dir.name);
|
|
72323
72428
|
|
|
72324
|
-
// src/lib/graphql.ts
|
|
72325
|
-
var graphql5 = __toESM(require("graphql"), 1);
|
|
72326
|
-
var import_node_crypto = __toESM(require("node:crypto"), 1);
|
|
72327
|
-
function getRootType(type) {
|
|
72328
|
-
if (graphql5.isNonNullType(type)) {
|
|
72329
|
-
return getRootType(type.ofType);
|
|
72330
|
-
}
|
|
72331
|
-
if (graphql5.isListType(type)) {
|
|
72332
|
-
return getRootType(type.ofType);
|
|
72333
|
-
}
|
|
72334
|
-
return type;
|
|
72335
|
-
}
|
|
72336
|
-
function hashOriginal({ document }) {
|
|
72337
|
-
return hashDocument(document.originalString);
|
|
72338
|
-
}
|
|
72339
|
-
function hashRaw({ document }) {
|
|
72340
|
-
return hashDocument(document.artifact?.raw);
|
|
72341
|
-
}
|
|
72342
|
-
function hashDocument(str) {
|
|
72343
|
-
return import_node_crypto.default.createHash("sha256").update(str || "").digest("hex");
|
|
72344
|
-
}
|
|
72345
|
-
function parentField(ancestors) {
|
|
72346
|
-
return walkParentField([...ancestors].sort(() => -1));
|
|
72347
|
-
}
|
|
72348
|
-
function walkParentField(ancestors) {
|
|
72349
|
-
let head = ancestors.shift();
|
|
72350
|
-
if (Array.isArray(head) || head.kind === "SelectionSet") {
|
|
72351
|
-
return walkParentField(ancestors);
|
|
72352
|
-
}
|
|
72353
|
-
return head;
|
|
72354
|
-
}
|
|
72355
|
-
function parentTypeFromAncestors(schema, filepath, ancestors) {
|
|
72356
|
-
const parents = [...ancestors];
|
|
72357
|
-
parents.reverse();
|
|
72358
|
-
return walkAncestors(schema, filepath, parents);
|
|
72359
|
-
}
|
|
72360
|
-
function walkAncestors(schema, filepath, ancestors) {
|
|
72361
|
-
let head = ancestors.shift();
|
|
72362
|
-
if (Array.isArray(head)) {
|
|
72363
|
-
return walkAncestors(schema, filepath, ancestors);
|
|
72364
|
-
}
|
|
72365
|
-
if (!head) {
|
|
72366
|
-
throw new HoudiniError({ filepath, message: "Could not figure out type of field" });
|
|
72367
|
-
}
|
|
72368
|
-
if (head.kind === "OperationDefinition") {
|
|
72369
|
-
const operationType = {
|
|
72370
|
-
query: schema.getQueryType(),
|
|
72371
|
-
mutation: schema.getMutationType(),
|
|
72372
|
-
subscription: schema.getSubscriptionType()
|
|
72373
|
-
}[head.operation];
|
|
72374
|
-
if (!operationType) {
|
|
72375
|
-
throw new HoudiniError({ filepath, message: "Could not find operation type" });
|
|
72376
|
-
}
|
|
72377
|
-
return operationType;
|
|
72378
|
-
}
|
|
72379
|
-
if (head.kind === "FragmentDefinition") {
|
|
72380
|
-
const result = schema.getType(head.typeCondition.name.value);
|
|
72381
|
-
if (!result) {
|
|
72382
|
-
throw new HoudiniError({
|
|
72383
|
-
filepath,
|
|
72384
|
-
message: `Could not find definition for ${head.typeCondition.name.value} in the schema`
|
|
72385
|
-
});
|
|
72386
|
-
}
|
|
72387
|
-
return result;
|
|
72388
|
-
}
|
|
72389
|
-
if (head.kind === "FragmentSpread") {
|
|
72390
|
-
throw new Error("How the hell did this happen?");
|
|
72391
|
-
}
|
|
72392
|
-
const parent2 = walkAncestors(schema, filepath, ancestors);
|
|
72393
|
-
if (head.kind === "InlineFragment") {
|
|
72394
|
-
if (!head.typeCondition) {
|
|
72395
|
-
return parent2;
|
|
72396
|
-
}
|
|
72397
|
-
const wrapper = schema.getType(head.typeCondition.name.value);
|
|
72398
|
-
if (!wrapper) {
|
|
72399
|
-
throw new HoudiniError({
|
|
72400
|
-
filepath,
|
|
72401
|
-
message: "Could not find type with name: " + head.typeCondition.name.value
|
|
72402
|
-
});
|
|
72403
|
-
}
|
|
72404
|
-
return wrapper;
|
|
72405
|
-
}
|
|
72406
|
-
if (head.kind === "SelectionSet") {
|
|
72407
|
-
return parent2;
|
|
72408
|
-
}
|
|
72409
|
-
const field = parent2.getFields()[head.name.value];
|
|
72410
|
-
if (!field) {
|
|
72411
|
-
throw new HoudiniError({
|
|
72412
|
-
filepath,
|
|
72413
|
-
message: `Could not find definition of ${head.name.value} in ${parent2.toString()}`
|
|
72414
|
-
});
|
|
72415
|
-
}
|
|
72416
|
-
return getRootType(field.type);
|
|
72417
|
-
}
|
|
72418
|
-
function definitionFromAncestors(ancestors) {
|
|
72419
|
-
let parents = [...ancestors];
|
|
72420
|
-
parents.shift();
|
|
72421
|
-
let definition = parents.shift();
|
|
72422
|
-
while (Array.isArray(definition) && definition) {
|
|
72423
|
-
definition = parents.shift();
|
|
72424
|
-
}
|
|
72425
|
-
return { parents, definition };
|
|
72426
|
-
}
|
|
72427
|
-
function formatErrors(e3, afterError) {
|
|
72428
|
-
const errors = Array.isArray(e3) ? e3 : [e3];
|
|
72429
|
-
for (const error of errors) {
|
|
72430
|
-
if ("filepath" in error && error.filepath) {
|
|
72431
|
-
const relative2 = relative(process.cwd(), error.filepath);
|
|
72432
|
-
console.error(`\u274C Encountered error in ${relative2}`);
|
|
72433
|
-
if (error.message) {
|
|
72434
|
-
console.error(error.message);
|
|
72435
|
-
}
|
|
72436
|
-
} else {
|
|
72437
|
-
console.error(`\u274C ${error.message}`);
|
|
72438
|
-
if ("description" in error && error.description) {
|
|
72439
|
-
console.error(`${error.description}`);
|
|
72440
|
-
}
|
|
72441
|
-
}
|
|
72442
|
-
afterError?.(e3);
|
|
72443
|
-
}
|
|
72444
|
-
}
|
|
72445
|
-
function unwrapType(config, type, wrappers = [], convertRuntimeScalars) {
|
|
72446
|
-
if (type.kind === "NonNullType") {
|
|
72447
|
-
return unwrapType(config, type.type, [TypeWrapper.NonNull, ...wrappers]);
|
|
72448
|
-
}
|
|
72449
|
-
if (type instanceof graphql5.GraphQLNonNull) {
|
|
72450
|
-
return unwrapType(config, type.ofType, [TypeWrapper.NonNull, ...wrappers]);
|
|
72451
|
-
}
|
|
72452
|
-
if (wrappers[0] !== TypeWrapper.NonNull) {
|
|
72453
|
-
wrappers.unshift(TypeWrapper.Nullable);
|
|
72454
|
-
}
|
|
72455
|
-
if (type.kind === "ListType") {
|
|
72456
|
-
return unwrapType(config, type.type, [TypeWrapper.List, ...wrappers]);
|
|
72457
|
-
}
|
|
72458
|
-
if (type instanceof graphql5.GraphQLList) {
|
|
72459
|
-
return unwrapType(config, type.ofType, [TypeWrapper.List, ...wrappers]);
|
|
72460
|
-
}
|
|
72461
|
-
if (convertRuntimeScalars && config.configFile.features?.runtimeScalars?.[type.name.value]) {
|
|
72462
|
-
type = config.schema.getType(
|
|
72463
|
-
config.configFile.features?.runtimeScalars?.[type.name.value].type
|
|
72464
|
-
);
|
|
72465
|
-
}
|
|
72466
|
-
const namedType = config.schema.getType(type.name.value || type.name);
|
|
72467
|
-
if (!namedType) {
|
|
72468
|
-
throw new Error("Unknown type: " + type.name.value || type.name);
|
|
72469
|
-
}
|
|
72470
|
-
return { type: namedType, wrappers };
|
|
72471
|
-
}
|
|
72472
|
-
function wrapType({
|
|
72473
|
-
type,
|
|
72474
|
-
wrappers
|
|
72475
|
-
}) {
|
|
72476
|
-
const head = wrappers[0];
|
|
72477
|
-
const tail = wrappers.slice(1);
|
|
72478
|
-
let kind = graphql5.Kind.NAMED_TYPE;
|
|
72479
|
-
if (head === TypeWrapper.List) {
|
|
72480
|
-
kind = graphql5.Kind.LIST_TYPE;
|
|
72481
|
-
} else if (head === TypeWrapper.NonNull) {
|
|
72482
|
-
kind = graphql5.Kind.NON_NULL_TYPE;
|
|
72483
|
-
}
|
|
72484
|
-
if (kind === "NamedType") {
|
|
72485
|
-
return {
|
|
72486
|
-
kind,
|
|
72487
|
-
name: {
|
|
72488
|
-
kind: graphql5.Kind.NAME,
|
|
72489
|
-
value: type.name
|
|
72490
|
-
}
|
|
72491
|
-
};
|
|
72492
|
-
}
|
|
72493
|
-
return {
|
|
72494
|
-
kind,
|
|
72495
|
-
type: wrapType({ type, wrappers: tail })
|
|
72496
|
-
};
|
|
72497
|
-
}
|
|
72498
|
-
var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
|
|
72499
|
-
TypeWrapper2["Nullable"] = "Nullable";
|
|
72500
|
-
TypeWrapper2["List"] = "List";
|
|
72501
|
-
TypeWrapper2["NonNull"] = "NonNull";
|
|
72502
|
-
return TypeWrapper2;
|
|
72503
|
-
})(TypeWrapper || {});
|
|
72504
|
-
|
|
72505
|
-
// src/lib/parse.ts
|
|
72506
|
-
var import_parser = __toESM(require_lib6(), 1);
|
|
72507
|
-
var import_recast = __toESM(require_main2(), 1);
|
|
72508
|
-
|
|
72509
|
-
// src/lib/deepMerge.ts
|
|
72510
|
-
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
72511
|
-
function deepMerge2(filepath, ...targets) {
|
|
72512
|
-
try {
|
|
72513
|
-
if (targets.length === 1) {
|
|
72514
|
-
return targets[0];
|
|
72515
|
-
} else if (targets.length === 2) {
|
|
72516
|
-
return (0, import_deepmerge.default)(targets[0], targets[1], {
|
|
72517
|
-
arrayMerge: (source, update) => [...new Set(source.concat(update))]
|
|
72518
|
-
});
|
|
72519
|
-
}
|
|
72520
|
-
return deepMerge2(filepath, targets[0], deepMerge2(filepath, ...targets.slice(1)));
|
|
72521
|
-
} catch (e3) {
|
|
72522
|
-
throw new HoudiniError({
|
|
72523
|
-
filepath,
|
|
72524
|
-
message: "could not merge: " + JSON.stringify(targets, null, 4),
|
|
72525
|
-
description: e3.message
|
|
72526
|
-
});
|
|
72527
|
-
}
|
|
72528
|
-
}
|
|
72529
|
-
|
|
72530
|
-
// src/lib/parse.ts
|
|
72531
|
-
function parseJS(str, config) {
|
|
72532
|
-
const defaultConfig = {
|
|
72533
|
-
plugins: [
|
|
72534
|
-
"typescript",
|
|
72535
|
-
"importAssertions",
|
|
72536
|
-
"decorators-legacy",
|
|
72537
|
-
"explicitResourceManagement"
|
|
72538
|
-
],
|
|
72539
|
-
sourceType: "module"
|
|
72540
|
-
};
|
|
72541
|
-
return (0, import_parser.parse)(str || "", config ? deepMerge2("", defaultConfig, config) : defaultConfig).program;
|
|
72542
|
-
}
|
|
72543
|
-
function parseJSON(str) {
|
|
72544
|
-
str = str.replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g, (m3, g3) => g3 ? "" : m3);
|
|
72545
|
-
return JSON.parse(str);
|
|
72546
|
-
}
|
|
72547
|
-
async function printJS(script, options) {
|
|
72548
|
-
if (options?.pretty) {
|
|
72549
|
-
return (0, import_recast.prettyPrint)(script, options);
|
|
72550
|
-
} else {
|
|
72551
|
-
return (0, import_recast.print)(script, options);
|
|
72552
|
-
}
|
|
72553
|
-
}
|
|
72554
|
-
|
|
72555
72429
|
// src/lib/imports.ts
|
|
72556
72430
|
var recast = __toESM(require_main2(), 1);
|
|
72557
72431
|
var AST2 = recast.types.builders;
|
|
@@ -72614,7 +72488,7 @@ async function cleanupFiles(pathFolder, listOfObj) {
|
|
|
72614
72488
|
// src/lib/detectTools.ts
|
|
72615
72489
|
async function detectFromPackageJSON(cwd) {
|
|
72616
72490
|
try {
|
|
72617
|
-
const packageJSONFile = await
|
|
72491
|
+
const packageJSONFile = await readFile(join2(cwd, "package.json"));
|
|
72618
72492
|
if (packageJSONFile) {
|
|
72619
72493
|
var packageJSON2 = JSON.parse(packageJSONFile);
|
|
72620
72494
|
} else {
|
|
@@ -72639,22 +72513,22 @@ async function detectFromPackageJSON(cwd) {
|
|
|
72639
72513
|
async function detectTools(cwd = process.cwd()) {
|
|
72640
72514
|
let typescript = false;
|
|
72641
72515
|
try {
|
|
72642
|
-
await
|
|
72516
|
+
await stat(join2(cwd, "tsconfig.json"));
|
|
72643
72517
|
typescript = true;
|
|
72644
72518
|
} catch {
|
|
72645
72519
|
}
|
|
72646
72520
|
let package_manager = "npm";
|
|
72647
72521
|
let dir = cwd;
|
|
72648
72522
|
do {
|
|
72649
|
-
if (
|
|
72523
|
+
if (existsSync(join2(dir, "pnpm-lock.yaml"))) {
|
|
72650
72524
|
package_manager = "pnpm";
|
|
72651
72525
|
break;
|
|
72652
72526
|
}
|
|
72653
|
-
if (
|
|
72527
|
+
if (existsSync(join2(dir, "yarn.lock"))) {
|
|
72654
72528
|
package_manager = "yarn";
|
|
72655
72529
|
break;
|
|
72656
72530
|
}
|
|
72657
|
-
} while (dir !== (dir =
|
|
72531
|
+
} while (dir !== (dir = dirname(dir)));
|
|
72658
72532
|
return {
|
|
72659
72533
|
typescript,
|
|
72660
72534
|
package_manager,
|
|
@@ -72731,18 +72605,18 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
|
|
|
72731
72605
|
return AST3.tsNeverKeyword();
|
|
72732
72606
|
}
|
|
72733
72607
|
const component = config.componentFields[field.parent][field.field];
|
|
72734
|
-
const sourcePathRelative =
|
|
72735
|
-
|
|
72608
|
+
const sourcePathRelative = relative(
|
|
72609
|
+
join2(config.projectRoot, "src"),
|
|
72736
72610
|
component.filepath
|
|
72737
72611
|
);
|
|
72738
|
-
let sourcePathParsed =
|
|
72739
|
-
let sourcePath =
|
|
72612
|
+
let sourcePathParsed = parse3(sourcePathRelative);
|
|
72613
|
+
let sourcePath = join2(sourcePathParsed.dir, sourcePathParsed.name);
|
|
72740
72614
|
const localImport = ensureImports({
|
|
72741
72615
|
config,
|
|
72742
72616
|
body,
|
|
72743
72617
|
import: "__component__" + component.fragment,
|
|
72744
|
-
sourceModule:
|
|
72745
|
-
|
|
72618
|
+
sourceModule: join2(
|
|
72619
|
+
relative(dirname(filepath), config.projectRoot),
|
|
72746
72620
|
"src",
|
|
72747
72621
|
sourcePath
|
|
72748
72622
|
)
|
|
@@ -73659,12 +73533,12 @@ function stripLoc(value) {
|
|
|
73659
73533
|
|
|
73660
73534
|
// src/codegen/transforms/collectDefinitions.ts
|
|
73661
73535
|
var graphql8 = __toESM(require("graphql"), 1);
|
|
73662
|
-
var
|
|
73536
|
+
var import_graphql33 = require("graphql");
|
|
73663
73537
|
async function includeFragmentDefinitions(config, documents) {
|
|
73664
73538
|
const fragments = collectDefinitions(config, documents);
|
|
73665
73539
|
for (const [index, { name, document, filename }] of documents.entries()) {
|
|
73666
73540
|
const operation = document.definitions.find(
|
|
73667
|
-
(def) => def.kind ===
|
|
73541
|
+
(def) => def.kind === import_graphql33.Kind.OPERATION_DEFINITION || def.kind === "FragmentDefinition"
|
|
73668
73542
|
);
|
|
73669
73543
|
if (!operation) {
|
|
73670
73544
|
continue;
|
|
@@ -75660,6 +75534,16 @@ async function generatePluginIndex({
|
|
|
75660
75534
|
}
|
|
75661
75535
|
|
|
75662
75536
|
// src/codegen/generators/runtime/pluginRuntime.ts
|
|
75537
|
+
function moduleStatments(config) {
|
|
75538
|
+
const importStatement = config.module === "commonjs" ? importDefaultFrom : (where, as) => `import ${as} from '${where}'`;
|
|
75539
|
+
const exportDefaultStatement = config.module === "commonjs" ? exportDefault : (as) => `export default ${as}`;
|
|
75540
|
+
const exportStarStatement = config.module === "commonjs" ? exportStarFrom : (where) => `export * from '${where}'`;
|
|
75541
|
+
return {
|
|
75542
|
+
importStatement,
|
|
75543
|
+
exportDefaultStatement,
|
|
75544
|
+
exportStarStatement
|
|
75545
|
+
};
|
|
75546
|
+
}
|
|
75663
75547
|
async function generatePluginRuntimes({
|
|
75664
75548
|
config,
|
|
75665
75549
|
docs
|
|
@@ -75675,7 +75559,7 @@ async function generatePluginRuntimes({
|
|
|
75675
75559
|
return;
|
|
75676
75560
|
}
|
|
75677
75561
|
try {
|
|
75678
|
-
await
|
|
75562
|
+
await stat(runtime_path);
|
|
75679
75563
|
} catch {
|
|
75680
75564
|
throw new HoudiniError({
|
|
75681
75565
|
message: "Cannot find runtime to generate for " + plugin2.name,
|
|
@@ -75687,13 +75571,13 @@ async function generatePluginRuntimes({
|
|
|
75687
75571
|
if (transformMap && typeof transformMap === "function") {
|
|
75688
75572
|
transformMap = transformMap(docs, { config });
|
|
75689
75573
|
}
|
|
75690
|
-
await
|
|
75691
|
-
await
|
|
75574
|
+
await mkdirp(pluginDir);
|
|
75575
|
+
await recursiveCopy(
|
|
75692
75576
|
runtime_path,
|
|
75693
75577
|
pluginDir,
|
|
75694
75578
|
Object.fromEntries(
|
|
75695
75579
|
Object.entries(transformMap).map(([key, value]) => [
|
|
75696
|
-
|
|
75580
|
+
join2(runtime_path, key),
|
|
75697
75581
|
(content) => value({
|
|
75698
75582
|
config,
|
|
75699
75583
|
content,
|
|
@@ -75740,21 +75624,21 @@ async function runtimeGenerator(config, docs) {
|
|
|
75740
75624
|
exportStarStatement: exportStar
|
|
75741
75625
|
} = moduleStatments(config);
|
|
75742
75626
|
await Promise.all([
|
|
75743
|
-
|
|
75744
|
-
[
|
|
75627
|
+
recursiveCopy(config.runtimeSource, config.runtimeDirectory, {
|
|
75628
|
+
[join2(config.runtimeSource, "lib", "constants.js")]: (content) => {
|
|
75745
75629
|
return content.replace("SITE_URL", siteURL);
|
|
75746
75630
|
},
|
|
75747
|
-
[
|
|
75631
|
+
[join2(config.runtimeSource, "imports", "pluginConfig.js")]: (content) => {
|
|
75748
75632
|
return injectConfig({ config, importStatement, exportStatement, content });
|
|
75749
75633
|
},
|
|
75750
|
-
[
|
|
75751
|
-
const configFilePath =
|
|
75752
|
-
const relativePath =
|
|
75634
|
+
[join2(config.runtimeSource, "imports", "config.js")]: (content) => {
|
|
75635
|
+
const configFilePath = join2(config.runtimeDirectory, "imports", "config.js");
|
|
75636
|
+
const relativePath = relative(dirname(configFilePath), config.filepath);
|
|
75753
75637
|
return `${importStatement(relativePath, "config")}
|
|
75754
75638
|
${exportStatement("config")}
|
|
75755
75639
|
`;
|
|
75756
75640
|
},
|
|
75757
|
-
[
|
|
75641
|
+
[join2(config.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config, content, importStatement, exportStatement })
|
|
75758
75642
|
}),
|
|
75759
75643
|
generatePluginRuntimes({
|
|
75760
75644
|
config,
|
|
@@ -75764,16 +75648,6 @@ ${exportStatement("config")}
|
|
|
75764
75648
|
]);
|
|
75765
75649
|
await generateGraphqlReturnTypes(config, docs);
|
|
75766
75650
|
}
|
|
75767
|
-
function moduleStatments(config) {
|
|
75768
|
-
const importStatement = config.module === "commonjs" ? importDefaultFrom : (where, as) => `import ${as} from '${where}'`;
|
|
75769
|
-
const exportDefaultStatement = config.module === "commonjs" ? exportDefault : (as) => `export default ${as}`;
|
|
75770
|
-
const exportStarStatement = config.module === "commonjs" ? exportStarFrom : (where) => `export * from '${where}'`;
|
|
75771
|
-
return {
|
|
75772
|
-
importStatement,
|
|
75773
|
-
exportDefaultStatement,
|
|
75774
|
-
exportStarStatement
|
|
75775
|
-
};
|
|
75776
|
-
}
|
|
75777
75651
|
|
|
75778
75652
|
// src/codegen/generators/typescript/documentTypes.ts
|
|
75779
75653
|
var recast11 = __toESM(require_main2(), 1);
|
|
@@ -77256,7 +77130,7 @@ async function writeIndexFile2(config, docs) {
|
|
|
77256
77130
|
}
|
|
77257
77131
|
|
|
77258
77132
|
// ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/helpers.js
|
|
77259
|
-
var
|
|
77133
|
+
var import_graphql34 = require("graphql");
|
|
77260
77134
|
function compareStrings2(a2, b2) {
|
|
77261
77135
|
if (String(a2) < String(b2)) {
|
|
77262
77136
|
return -1;
|
|
@@ -77292,7 +77166,7 @@ function isSome2(input) {
|
|
|
77292
77166
|
}
|
|
77293
77167
|
|
|
77294
77168
|
// ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/inspect.js
|
|
77295
|
-
var
|
|
77169
|
+
var import_graphql35 = require("graphql");
|
|
77296
77170
|
var MAX_RECURSIVE_DEPTH2 = 3;
|
|
77297
77171
|
function inspect2(value) {
|
|
77298
77172
|
return formatValue2(value, []);
|
|
@@ -77310,7 +77184,7 @@ function formatValue2(value, seenValues) {
|
|
|
77310
77184
|
}
|
|
77311
77185
|
}
|
|
77312
77186
|
function formatError2(value) {
|
|
77313
|
-
if (value instanceof
|
|
77187
|
+
if (value instanceof import_graphql35.GraphQLError) {
|
|
77314
77188
|
return value.toString();
|
|
77315
77189
|
}
|
|
77316
77190
|
return `${value.name}: ${value.message};
|
|
@@ -77393,43 +77267,43 @@ function getDirectivesInExtensions2(node, pathToDirectivesInExtensions = ["direc
|
|
|
77393
77267
|
}
|
|
77394
77268
|
|
|
77395
77269
|
// ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/print-schema-with-directives.js
|
|
77396
|
-
var
|
|
77270
|
+
var import_graphql39 = require("graphql");
|
|
77397
77271
|
|
|
77398
77272
|
// ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromType.js
|
|
77399
|
-
var
|
|
77273
|
+
var import_graphql36 = require("graphql");
|
|
77400
77274
|
function astFromType2(type) {
|
|
77401
|
-
if ((0,
|
|
77275
|
+
if ((0, import_graphql36.isNonNullType)(type)) {
|
|
77402
77276
|
const innerType = astFromType2(type.ofType);
|
|
77403
|
-
if (innerType.kind ===
|
|
77277
|
+
if (innerType.kind === import_graphql36.Kind.NON_NULL_TYPE) {
|
|
77404
77278
|
throw new Error(`Invalid type node ${inspect2(type)}. Inner type of non-null type cannot be a non-null type.`);
|
|
77405
77279
|
}
|
|
77406
77280
|
return {
|
|
77407
|
-
kind:
|
|
77281
|
+
kind: import_graphql36.Kind.NON_NULL_TYPE,
|
|
77408
77282
|
type: innerType
|
|
77409
77283
|
};
|
|
77410
|
-
} else if ((0,
|
|
77284
|
+
} else if ((0, import_graphql36.isListType)(type)) {
|
|
77411
77285
|
return {
|
|
77412
|
-
kind:
|
|
77286
|
+
kind: import_graphql36.Kind.LIST_TYPE,
|
|
77413
77287
|
type: astFromType2(type.ofType)
|
|
77414
77288
|
};
|
|
77415
77289
|
}
|
|
77416
77290
|
return {
|
|
77417
|
-
kind:
|
|
77291
|
+
kind: import_graphql36.Kind.NAMED_TYPE,
|
|
77418
77292
|
name: {
|
|
77419
|
-
kind:
|
|
77293
|
+
kind: import_graphql36.Kind.NAME,
|
|
77420
77294
|
value: type.name
|
|
77421
77295
|
}
|
|
77422
77296
|
};
|
|
77423
77297
|
}
|
|
77424
77298
|
|
|
77425
77299
|
// ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromValue.js
|
|
77426
|
-
var
|
|
77300
|
+
var import_graphql38 = require("graphql");
|
|
77427
77301
|
|
|
77428
77302
|
// ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromValueUntyped.js
|
|
77429
|
-
var
|
|
77303
|
+
var import_graphql37 = require("graphql");
|
|
77430
77304
|
function astFromValueUntyped2(value) {
|
|
77431
77305
|
if (value === null) {
|
|
77432
|
-
return { kind:
|
|
77306
|
+
return { kind: import_graphql37.Kind.NULL };
|
|
77433
77307
|
}
|
|
77434
77308
|
if (value === void 0) {
|
|
77435
77309
|
return null;
|
|
@@ -77442,7 +77316,7 @@ function astFromValueUntyped2(value) {
|
|
|
77442
77316
|
valuesNodes.push(itemNode);
|
|
77443
77317
|
}
|
|
77444
77318
|
}
|
|
77445
|
-
return { kind:
|
|
77319
|
+
return { kind: import_graphql37.Kind.LIST, values: valuesNodes };
|
|
77446
77320
|
}
|
|
77447
77321
|
if (typeof value === "object") {
|
|
77448
77322
|
const fieldNodes = [];
|
|
@@ -77451,26 +77325,26 @@ function astFromValueUntyped2(value) {
|
|
|
77451
77325
|
const ast = astFromValueUntyped2(fieldValue);
|
|
77452
77326
|
if (ast) {
|
|
77453
77327
|
fieldNodes.push({
|
|
77454
|
-
kind:
|
|
77455
|
-
name: { kind:
|
|
77328
|
+
kind: import_graphql37.Kind.OBJECT_FIELD,
|
|
77329
|
+
name: { kind: import_graphql37.Kind.NAME, value: fieldName },
|
|
77456
77330
|
value: ast
|
|
77457
77331
|
});
|
|
77458
77332
|
}
|
|
77459
77333
|
}
|
|
77460
|
-
return { kind:
|
|
77334
|
+
return { kind: import_graphql37.Kind.OBJECT, fields: fieldNodes };
|
|
77461
77335
|
}
|
|
77462
77336
|
if (typeof value === "boolean") {
|
|
77463
|
-
return { kind:
|
|
77337
|
+
return { kind: import_graphql37.Kind.BOOLEAN, value };
|
|
77464
77338
|
}
|
|
77465
77339
|
if (typeof value === "bigint") {
|
|
77466
|
-
return { kind:
|
|
77340
|
+
return { kind: import_graphql37.Kind.INT, value: String(value) };
|
|
77467
77341
|
}
|
|
77468
77342
|
if (typeof value === "number" && isFinite(value)) {
|
|
77469
77343
|
const stringNum = String(value);
|
|
77470
|
-
return integerStringRegExp2.test(stringNum) ? { kind:
|
|
77344
|
+
return integerStringRegExp2.test(stringNum) ? { kind: import_graphql37.Kind.INT, value: stringNum } : { kind: import_graphql37.Kind.FLOAT, value: stringNum };
|
|
77471
77345
|
}
|
|
77472
77346
|
if (typeof value === "string") {
|
|
77473
|
-
return { kind:
|
|
77347
|
+
return { kind: import_graphql37.Kind.STRING, value };
|
|
77474
77348
|
}
|
|
77475
77349
|
throw new TypeError(`Cannot convert value to AST: ${value}.`);
|
|
77476
77350
|
}
|
|
@@ -77478,20 +77352,20 @@ var integerStringRegExp2 = /^-?(?:0|[1-9][0-9]*)$/;
|
|
|
77478
77352
|
|
|
77479
77353
|
// ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/astFromValue.js
|
|
77480
77354
|
function astFromValue2(value, type) {
|
|
77481
|
-
if ((0,
|
|
77355
|
+
if ((0, import_graphql38.isNonNullType)(type)) {
|
|
77482
77356
|
const astValue = astFromValue2(value, type.ofType);
|
|
77483
|
-
if (astValue?.kind ===
|
|
77357
|
+
if (astValue?.kind === import_graphql38.Kind.NULL) {
|
|
77484
77358
|
return null;
|
|
77485
77359
|
}
|
|
77486
77360
|
return astValue;
|
|
77487
77361
|
}
|
|
77488
77362
|
if (value === null) {
|
|
77489
|
-
return { kind:
|
|
77363
|
+
return { kind: import_graphql38.Kind.NULL };
|
|
77490
77364
|
}
|
|
77491
77365
|
if (value === void 0) {
|
|
77492
77366
|
return null;
|
|
77493
77367
|
}
|
|
77494
|
-
if ((0,
|
|
77368
|
+
if ((0, import_graphql38.isListType)(type)) {
|
|
77495
77369
|
const itemType = type.ofType;
|
|
77496
77370
|
if (isIterableObject(value)) {
|
|
77497
77371
|
const valuesNodes = [];
|
|
@@ -77501,11 +77375,11 @@ function astFromValue2(value, type) {
|
|
|
77501
77375
|
valuesNodes.push(itemNode);
|
|
77502
77376
|
}
|
|
77503
77377
|
}
|
|
77504
|
-
return { kind:
|
|
77378
|
+
return { kind: import_graphql38.Kind.LIST, values: valuesNodes };
|
|
77505
77379
|
}
|
|
77506
77380
|
return astFromValue2(value, itemType);
|
|
77507
77381
|
}
|
|
77508
|
-
if ((0,
|
|
77382
|
+
if ((0, import_graphql38.isInputObjectType)(type)) {
|
|
77509
77383
|
if (!isObjectLike(value)) {
|
|
77510
77384
|
return null;
|
|
77511
77385
|
}
|
|
@@ -77514,24 +77388,24 @@ function astFromValue2(value, type) {
|
|
|
77514
77388
|
const fieldValue = astFromValue2(value[field.name], field.type);
|
|
77515
77389
|
if (fieldValue) {
|
|
77516
77390
|
fieldNodes.push({
|
|
77517
|
-
kind:
|
|
77518
|
-
name: { kind:
|
|
77391
|
+
kind: import_graphql38.Kind.OBJECT_FIELD,
|
|
77392
|
+
name: { kind: import_graphql38.Kind.NAME, value: field.name },
|
|
77519
77393
|
value: fieldValue
|
|
77520
77394
|
});
|
|
77521
77395
|
}
|
|
77522
77396
|
}
|
|
77523
|
-
return { kind:
|
|
77397
|
+
return { kind: import_graphql38.Kind.OBJECT, fields: fieldNodes };
|
|
77524
77398
|
}
|
|
77525
|
-
if ((0,
|
|
77399
|
+
if ((0, import_graphql38.isLeafType)(type)) {
|
|
77526
77400
|
const serialized = type.serialize(value);
|
|
77527
77401
|
if (serialized == null) {
|
|
77528
77402
|
return null;
|
|
77529
77403
|
}
|
|
77530
|
-
if ((0,
|
|
77531
|
-
return { kind:
|
|
77404
|
+
if ((0, import_graphql38.isEnumType)(type)) {
|
|
77405
|
+
return { kind: import_graphql38.Kind.ENUM, value: serialized };
|
|
77532
77406
|
}
|
|
77533
77407
|
if (type.name === "ID" && typeof serialized === "string" && integerStringRegExp3.test(serialized)) {
|
|
77534
|
-
return { kind:
|
|
77408
|
+
return { kind: import_graphql38.Kind.INT, value: serialized };
|
|
77535
77409
|
}
|
|
77536
77410
|
return astFromValueUntyped2(serialized);
|
|
77537
77411
|
}
|
|
@@ -77587,36 +77461,36 @@ function getDocumentNodeFromSchema2(schema, options = {}) {
|
|
|
77587
77461
|
const definitions = schemaNode != null ? [schemaNode] : [];
|
|
77588
77462
|
const directives = schema.getDirectives();
|
|
77589
77463
|
for (const directive of directives) {
|
|
77590
|
-
if ((0,
|
|
77464
|
+
if ((0, import_graphql39.isSpecifiedDirective)(directive)) {
|
|
77591
77465
|
continue;
|
|
77592
77466
|
}
|
|
77593
77467
|
definitions.push(astFromDirective2(directive, schema, pathToDirectivesInExtensions));
|
|
77594
77468
|
}
|
|
77595
77469
|
for (const typeName in typesMap) {
|
|
77596
77470
|
const type = typesMap[typeName];
|
|
77597
|
-
const isPredefinedScalar = (0,
|
|
77598
|
-
const isIntrospection = (0,
|
|
77471
|
+
const isPredefinedScalar = (0, import_graphql39.isSpecifiedScalarType)(type);
|
|
77472
|
+
const isIntrospection = (0, import_graphql39.isIntrospectionType)(type);
|
|
77599
77473
|
if (isPredefinedScalar || isIntrospection) {
|
|
77600
77474
|
continue;
|
|
77601
77475
|
}
|
|
77602
|
-
if ((0,
|
|
77476
|
+
if ((0, import_graphql39.isObjectType)(type)) {
|
|
77603
77477
|
definitions.push(astFromObjectType2(type, schema, pathToDirectivesInExtensions));
|
|
77604
|
-
} else if ((0,
|
|
77478
|
+
} else if ((0, import_graphql39.isInterfaceType)(type)) {
|
|
77605
77479
|
definitions.push(astFromInterfaceType2(type, schema, pathToDirectivesInExtensions));
|
|
77606
|
-
} else if ((0,
|
|
77480
|
+
} else if ((0, import_graphql39.isUnionType)(type)) {
|
|
77607
77481
|
definitions.push(astFromUnionType2(type, schema, pathToDirectivesInExtensions));
|
|
77608
|
-
} else if ((0,
|
|
77482
|
+
} else if ((0, import_graphql39.isInputObjectType)(type)) {
|
|
77609
77483
|
definitions.push(astFromInputObjectType2(type, schema, pathToDirectivesInExtensions));
|
|
77610
|
-
} else if ((0,
|
|
77484
|
+
} else if ((0, import_graphql39.isEnumType)(type)) {
|
|
77611
77485
|
definitions.push(astFromEnumType2(type, schema, pathToDirectivesInExtensions));
|
|
77612
|
-
} else if ((0,
|
|
77486
|
+
} else if ((0, import_graphql39.isScalarType)(type)) {
|
|
77613
77487
|
definitions.push(astFromScalarType2(type, schema, pathToDirectivesInExtensions));
|
|
77614
77488
|
} else {
|
|
77615
77489
|
throw new Error(`Unknown type ${type}.`);
|
|
77616
77490
|
}
|
|
77617
77491
|
}
|
|
77618
77492
|
return {
|
|
77619
|
-
kind:
|
|
77493
|
+
kind: import_graphql39.Kind.DOCUMENT,
|
|
77620
77494
|
definitions
|
|
77621
77495
|
};
|
|
77622
77496
|
}
|
|
@@ -77651,7 +77525,7 @@ function astFromSchema2(schema, pathToDirectivesInExtensions) {
|
|
|
77651
77525
|
operationTypeDefinitionNode.type = rootTypeAST;
|
|
77652
77526
|
} else {
|
|
77653
77527
|
operationTypeMap.set(operationTypeNode, {
|
|
77654
|
-
kind:
|
|
77528
|
+
kind: import_graphql39.Kind.OPERATION_TYPE_DEFINITION,
|
|
77655
77529
|
operation: operationTypeNode,
|
|
77656
77530
|
type: rootTypeAST
|
|
77657
77531
|
});
|
|
@@ -77664,12 +77538,12 @@ function astFromSchema2(schema, pathToDirectivesInExtensions) {
|
|
|
77664
77538
|
return null;
|
|
77665
77539
|
}
|
|
77666
77540
|
const schemaNode = {
|
|
77667
|
-
kind: operationTypes != null ?
|
|
77541
|
+
kind: operationTypes != null ? import_graphql39.Kind.SCHEMA_DEFINITION : import_graphql39.Kind.SCHEMA_EXTENSION,
|
|
77668
77542
|
operationTypes,
|
|
77669
77543
|
directives
|
|
77670
77544
|
};
|
|
77671
77545
|
schemaNode.description = schema.astNode?.description ?? schema.description != null ? {
|
|
77672
|
-
kind:
|
|
77546
|
+
kind: import_graphql39.Kind.STRING,
|
|
77673
77547
|
value: schema.description,
|
|
77674
77548
|
block: true
|
|
77675
77549
|
} : void 0;
|
|
@@ -77677,19 +77551,19 @@ function astFromSchema2(schema, pathToDirectivesInExtensions) {
|
|
|
77677
77551
|
}
|
|
77678
77552
|
function astFromDirective2(directive, schema, pathToDirectivesInExtensions) {
|
|
77679
77553
|
return {
|
|
77680
|
-
kind:
|
|
77554
|
+
kind: import_graphql39.Kind.DIRECTIVE_DEFINITION,
|
|
77681
77555
|
description: directive.astNode?.description ?? (directive.description ? {
|
|
77682
|
-
kind:
|
|
77556
|
+
kind: import_graphql39.Kind.STRING,
|
|
77683
77557
|
value: directive.description
|
|
77684
77558
|
} : void 0),
|
|
77685
77559
|
name: {
|
|
77686
|
-
kind:
|
|
77560
|
+
kind: import_graphql39.Kind.NAME,
|
|
77687
77561
|
value: directive.name
|
|
77688
77562
|
},
|
|
77689
77563
|
arguments: directive.args?.map((arg) => astFromArg2(arg, schema, pathToDirectivesInExtensions)),
|
|
77690
77564
|
repeatable: directive.isRepeatable,
|
|
77691
77565
|
locations: directive.locations?.map((location) => ({
|
|
77692
|
-
kind:
|
|
77566
|
+
kind: import_graphql39.Kind.NAME,
|
|
77693
77567
|
value: location
|
|
77694
77568
|
})) || []
|
|
77695
77569
|
};
|
|
@@ -77739,14 +77613,14 @@ function getDeprecatableDirectiveNodes2(entity, schema, pathToDirectivesInExtens
|
|
|
77739
77613
|
}
|
|
77740
77614
|
function astFromArg2(arg, schema, pathToDirectivesInExtensions) {
|
|
77741
77615
|
return {
|
|
77742
|
-
kind:
|
|
77616
|
+
kind: import_graphql39.Kind.INPUT_VALUE_DEFINITION,
|
|
77743
77617
|
description: arg.astNode?.description ?? (arg.description ? {
|
|
77744
|
-
kind:
|
|
77618
|
+
kind: import_graphql39.Kind.STRING,
|
|
77745
77619
|
value: arg.description,
|
|
77746
77620
|
block: true
|
|
77747
77621
|
} : void 0),
|
|
77748
77622
|
name: {
|
|
77749
|
-
kind:
|
|
77623
|
+
kind: import_graphql39.Kind.NAME,
|
|
77750
77624
|
value: arg.name
|
|
77751
77625
|
},
|
|
77752
77626
|
type: astFromType2(arg.type),
|
|
@@ -77756,14 +77630,14 @@ function astFromArg2(arg, schema, pathToDirectivesInExtensions) {
|
|
|
77756
77630
|
}
|
|
77757
77631
|
function astFromObjectType2(type, schema, pathToDirectivesInExtensions) {
|
|
77758
77632
|
return {
|
|
77759
|
-
kind:
|
|
77633
|
+
kind: import_graphql39.Kind.OBJECT_TYPE_DEFINITION,
|
|
77760
77634
|
description: type.astNode?.description ?? (type.description ? {
|
|
77761
|
-
kind:
|
|
77635
|
+
kind: import_graphql39.Kind.STRING,
|
|
77762
77636
|
value: type.description,
|
|
77763
77637
|
block: true
|
|
77764
77638
|
} : void 0),
|
|
77765
77639
|
name: {
|
|
77766
|
-
kind:
|
|
77640
|
+
kind: import_graphql39.Kind.NAME,
|
|
77767
77641
|
value: type.name
|
|
77768
77642
|
},
|
|
77769
77643
|
fields: Object.values(type.getFields()).map((field) => astFromField2(field, schema, pathToDirectivesInExtensions)),
|
|
@@ -77773,14 +77647,14 @@ function astFromObjectType2(type, schema, pathToDirectivesInExtensions) {
|
|
|
77773
77647
|
}
|
|
77774
77648
|
function astFromInterfaceType2(type, schema, pathToDirectivesInExtensions) {
|
|
77775
77649
|
const node = {
|
|
77776
|
-
kind:
|
|
77650
|
+
kind: import_graphql39.Kind.INTERFACE_TYPE_DEFINITION,
|
|
77777
77651
|
description: type.astNode?.description ?? (type.description ? {
|
|
77778
|
-
kind:
|
|
77652
|
+
kind: import_graphql39.Kind.STRING,
|
|
77779
77653
|
value: type.description,
|
|
77780
77654
|
block: true
|
|
77781
77655
|
} : void 0),
|
|
77782
77656
|
name: {
|
|
77783
|
-
kind:
|
|
77657
|
+
kind: import_graphql39.Kind.NAME,
|
|
77784
77658
|
value: type.name
|
|
77785
77659
|
},
|
|
77786
77660
|
fields: Object.values(type.getFields()).map((field) => astFromField2(field, schema, pathToDirectivesInExtensions)),
|
|
@@ -77793,14 +77667,14 @@ function astFromInterfaceType2(type, schema, pathToDirectivesInExtensions) {
|
|
|
77793
77667
|
}
|
|
77794
77668
|
function astFromUnionType2(type, schema, pathToDirectivesInExtensions) {
|
|
77795
77669
|
return {
|
|
77796
|
-
kind:
|
|
77670
|
+
kind: import_graphql39.Kind.UNION_TYPE_DEFINITION,
|
|
77797
77671
|
description: type.astNode?.description ?? (type.description ? {
|
|
77798
|
-
kind:
|
|
77672
|
+
kind: import_graphql39.Kind.STRING,
|
|
77799
77673
|
value: type.description,
|
|
77800
77674
|
block: true
|
|
77801
77675
|
} : void 0),
|
|
77802
77676
|
name: {
|
|
77803
|
-
kind:
|
|
77677
|
+
kind: import_graphql39.Kind.NAME,
|
|
77804
77678
|
value: type.name
|
|
77805
77679
|
},
|
|
77806
77680
|
directives: getDirectiveNodes2(type, schema, pathToDirectivesInExtensions),
|
|
@@ -77809,14 +77683,14 @@ function astFromUnionType2(type, schema, pathToDirectivesInExtensions) {
|
|
|
77809
77683
|
}
|
|
77810
77684
|
function astFromInputObjectType2(type, schema, pathToDirectivesInExtensions) {
|
|
77811
77685
|
return {
|
|
77812
|
-
kind:
|
|
77686
|
+
kind: import_graphql39.Kind.INPUT_OBJECT_TYPE_DEFINITION,
|
|
77813
77687
|
description: type.astNode?.description ?? (type.description ? {
|
|
77814
|
-
kind:
|
|
77688
|
+
kind: import_graphql39.Kind.STRING,
|
|
77815
77689
|
value: type.description,
|
|
77816
77690
|
block: true
|
|
77817
77691
|
} : void 0),
|
|
77818
77692
|
name: {
|
|
77819
|
-
kind:
|
|
77693
|
+
kind: import_graphql39.Kind.NAME,
|
|
77820
77694
|
value: type.name
|
|
77821
77695
|
},
|
|
77822
77696
|
fields: Object.values(type.getFields()).map((field) => astFromInputField2(field, schema, pathToDirectivesInExtensions)),
|
|
@@ -77825,14 +77699,14 @@ function astFromInputObjectType2(type, schema, pathToDirectivesInExtensions) {
|
|
|
77825
77699
|
}
|
|
77826
77700
|
function astFromEnumType2(type, schema, pathToDirectivesInExtensions) {
|
|
77827
77701
|
return {
|
|
77828
|
-
kind:
|
|
77702
|
+
kind: import_graphql39.Kind.ENUM_TYPE_DEFINITION,
|
|
77829
77703
|
description: type.astNode?.description ?? (type.description ? {
|
|
77830
|
-
kind:
|
|
77704
|
+
kind: import_graphql39.Kind.STRING,
|
|
77831
77705
|
value: type.description,
|
|
77832
77706
|
block: true
|
|
77833
77707
|
} : void 0),
|
|
77834
77708
|
name: {
|
|
77835
|
-
kind:
|
|
77709
|
+
kind: import_graphql39.Kind.NAME,
|
|
77836
77710
|
value: type.name
|
|
77837
77711
|
},
|
|
77838
77712
|
values: Object.values(type.getValues()).map((value) => astFromEnumValue2(value, schema, pathToDirectivesInExtensions)),
|
|
@@ -77850,14 +77724,14 @@ function astFromScalarType2(type, schema, pathToDirectivesInExtensions) {
|
|
|
77850
77724
|
directives.push(makeDirectiveNode2("specifiedBy", specifiedByArgs));
|
|
77851
77725
|
}
|
|
77852
77726
|
return {
|
|
77853
|
-
kind:
|
|
77727
|
+
kind: import_graphql39.Kind.SCALAR_TYPE_DEFINITION,
|
|
77854
77728
|
description: type.astNode?.description ?? (type.description ? {
|
|
77855
|
-
kind:
|
|
77729
|
+
kind: import_graphql39.Kind.STRING,
|
|
77856
77730
|
value: type.description,
|
|
77857
77731
|
block: true
|
|
77858
77732
|
} : void 0),
|
|
77859
77733
|
name: {
|
|
77860
|
-
kind:
|
|
77734
|
+
kind: import_graphql39.Kind.NAME,
|
|
77861
77735
|
value: type.name
|
|
77862
77736
|
},
|
|
77863
77737
|
directives
|
|
@@ -77865,14 +77739,14 @@ function astFromScalarType2(type, schema, pathToDirectivesInExtensions) {
|
|
|
77865
77739
|
}
|
|
77866
77740
|
function astFromField2(field, schema, pathToDirectivesInExtensions) {
|
|
77867
77741
|
return {
|
|
77868
|
-
kind:
|
|
77742
|
+
kind: import_graphql39.Kind.FIELD_DEFINITION,
|
|
77869
77743
|
description: field.astNode?.description ?? (field.description ? {
|
|
77870
|
-
kind:
|
|
77744
|
+
kind: import_graphql39.Kind.STRING,
|
|
77871
77745
|
value: field.description,
|
|
77872
77746
|
block: true
|
|
77873
77747
|
} : void 0),
|
|
77874
77748
|
name: {
|
|
77875
|
-
kind:
|
|
77749
|
+
kind: import_graphql39.Kind.NAME,
|
|
77876
77750
|
value: field.name
|
|
77877
77751
|
},
|
|
77878
77752
|
arguments: field.args.map((arg) => astFromArg2(arg, schema, pathToDirectivesInExtensions)),
|
|
@@ -77882,14 +77756,14 @@ function astFromField2(field, schema, pathToDirectivesInExtensions) {
|
|
|
77882
77756
|
}
|
|
77883
77757
|
function astFromInputField2(field, schema, pathToDirectivesInExtensions) {
|
|
77884
77758
|
return {
|
|
77885
|
-
kind:
|
|
77759
|
+
kind: import_graphql39.Kind.INPUT_VALUE_DEFINITION,
|
|
77886
77760
|
description: field.astNode?.description ?? (field.description ? {
|
|
77887
|
-
kind:
|
|
77761
|
+
kind: import_graphql39.Kind.STRING,
|
|
77888
77762
|
value: field.description,
|
|
77889
77763
|
block: true
|
|
77890
77764
|
} : void 0),
|
|
77891
77765
|
name: {
|
|
77892
|
-
kind:
|
|
77766
|
+
kind: import_graphql39.Kind.NAME,
|
|
77893
77767
|
value: field.name
|
|
77894
77768
|
},
|
|
77895
77769
|
type: astFromType2(field.type),
|
|
@@ -77899,21 +77773,21 @@ function astFromInputField2(field, schema, pathToDirectivesInExtensions) {
|
|
|
77899
77773
|
}
|
|
77900
77774
|
function astFromEnumValue2(value, schema, pathToDirectivesInExtensions) {
|
|
77901
77775
|
return {
|
|
77902
|
-
kind:
|
|
77776
|
+
kind: import_graphql39.Kind.ENUM_VALUE_DEFINITION,
|
|
77903
77777
|
description: value.astNode?.description ?? (value.description ? {
|
|
77904
|
-
kind:
|
|
77778
|
+
kind: import_graphql39.Kind.STRING,
|
|
77905
77779
|
value: value.description,
|
|
77906
77780
|
block: true
|
|
77907
77781
|
} : void 0),
|
|
77908
77782
|
name: {
|
|
77909
|
-
kind:
|
|
77783
|
+
kind: import_graphql39.Kind.NAME,
|
|
77910
77784
|
value: value.name
|
|
77911
77785
|
},
|
|
77912
77786
|
directives: getDeprecatableDirectiveNodes2(value, schema, pathToDirectivesInExtensions)
|
|
77913
77787
|
};
|
|
77914
77788
|
}
|
|
77915
77789
|
function makeDeprecatedDirective2(deprecationReason) {
|
|
77916
|
-
return makeDirectiveNode2("deprecated", { reason: deprecationReason },
|
|
77790
|
+
return makeDirectiveNode2("deprecated", { reason: deprecationReason }, import_graphql39.GraphQLDeprecatedDirective);
|
|
77917
77791
|
}
|
|
77918
77792
|
function makeDirectiveNode2(name, args, directive) {
|
|
77919
77793
|
const directiveArguments = [];
|
|
@@ -77925,9 +77799,9 @@ function makeDirectiveNode2(name, args, directive) {
|
|
|
77925
77799
|
const value = astFromValue2(argValue, arg.type);
|
|
77926
77800
|
if (value) {
|
|
77927
77801
|
directiveArguments.push({
|
|
77928
|
-
kind:
|
|
77802
|
+
kind: import_graphql39.Kind.ARGUMENT,
|
|
77929
77803
|
name: {
|
|
77930
|
-
kind:
|
|
77804
|
+
kind: import_graphql39.Kind.NAME,
|
|
77931
77805
|
value: argName
|
|
77932
77806
|
},
|
|
77933
77807
|
value
|
|
@@ -77941,9 +77815,9 @@ function makeDirectiveNode2(name, args, directive) {
|
|
|
77941
77815
|
const value = astFromValueUntyped2(argValue);
|
|
77942
77816
|
if (value) {
|
|
77943
77817
|
directiveArguments.push({
|
|
77944
|
-
kind:
|
|
77818
|
+
kind: import_graphql39.Kind.ARGUMENT,
|
|
77945
77819
|
name: {
|
|
77946
|
-
kind:
|
|
77820
|
+
kind: import_graphql39.Kind.NAME,
|
|
77947
77821
|
value: argName
|
|
77948
77822
|
},
|
|
77949
77823
|
value
|
|
@@ -77952,9 +77826,9 @@ function makeDirectiveNode2(name, args, directive) {
|
|
|
77952
77826
|
}
|
|
77953
77827
|
}
|
|
77954
77828
|
return {
|
|
77955
|
-
kind:
|
|
77829
|
+
kind: import_graphql39.Kind.DIRECTIVE,
|
|
77956
77830
|
name: {
|
|
77957
|
-
kind:
|
|
77831
|
+
kind: import_graphql39.Kind.NAME,
|
|
77958
77832
|
value: name
|
|
77959
77833
|
},
|
|
77960
77834
|
arguments: directiveArguments
|
|
@@ -77977,7 +77851,7 @@ function makeDirectiveNodes2(schema, directiveValues) {
|
|
|
77977
77851
|
}
|
|
77978
77852
|
|
|
77979
77853
|
// ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/comments.js
|
|
77980
|
-
var
|
|
77854
|
+
var import_graphql40 = require("graphql");
|
|
77981
77855
|
var MAX_LINE_LENGTH2 = 80;
|
|
77982
77856
|
var commentsRegistry2 = {};
|
|
77983
77857
|
function resetComments2() {
|
|
@@ -78222,7 +78096,7 @@ var printDocASTReducerWithComments2 = Object.keys(printDocASTReducer2).reduce((p
|
|
|
78222
78096
|
}
|
|
78223
78097
|
}), {});
|
|
78224
78098
|
function printWithComments2(ast) {
|
|
78225
|
-
return (0,
|
|
78099
|
+
return (0, import_graphql40.visit)(ast, printDocASTReducerWithComments2);
|
|
78226
78100
|
}
|
|
78227
78101
|
function isFieldDefinitionNode2(node) {
|
|
78228
78102
|
return node.kind === "FieldDefinition";
|
|
@@ -78241,7 +78115,7 @@ function getLeadingCommentBlock2(node) {
|
|
|
78241
78115
|
}
|
|
78242
78116
|
const comments = [];
|
|
78243
78117
|
let token = loc.startToken.prev;
|
|
78244
|
-
while (token != null && token.kind ===
|
|
78118
|
+
while (token != null && token.kind === import_graphql40.TokenKind.COMMENT && token.next != null && token.prev != null && token.line + 1 === token.next.line && token.line !== token.prev.line) {
|
|
78245
78119
|
const value = String(token.value);
|
|
78246
78120
|
comments.push(value);
|
|
78247
78121
|
token = token.prev;
|
|
@@ -78293,9 +78167,9 @@ function isBlank2(str) {
|
|
|
78293
78167
|
}
|
|
78294
78168
|
|
|
78295
78169
|
// ../../node_modules/.pnpm/@graphql-tools+utils@10.0.6_graphql@15.5.0/node_modules/@graphql-tools/utils/esm/isDocumentNode.js
|
|
78296
|
-
var
|
|
78170
|
+
var import_graphql41 = require("graphql");
|
|
78297
78171
|
function isDocumentNode2(object) {
|
|
78298
|
-
return object && typeof object === "object" && "kind" in object && object.kind ===
|
|
78172
|
+
return object && typeof object === "object" && "kind" in object && object.kind === import_graphql41.Kind.DOCUMENT;
|
|
78299
78173
|
}
|
|
78300
78174
|
|
|
78301
78175
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/arguments.js
|
|
@@ -78319,7 +78193,7 @@ function deduplicateArguments2(args, config) {
|
|
|
78319
78193
|
}
|
|
78320
78194
|
|
|
78321
78195
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/directives.js
|
|
78322
|
-
var
|
|
78196
|
+
var import_graphql42 = require("graphql");
|
|
78323
78197
|
function directiveAlreadyExists2(directivesArr, otherDirective) {
|
|
78324
78198
|
return !!directivesArr.find((directive) => directive.name.value === otherDirective.name.value);
|
|
78325
78199
|
}
|
|
@@ -78379,11 +78253,11 @@ function mergeDirectives2(d1 = [], d22 = [], config, directives) {
|
|
|
78379
78253
|
return result;
|
|
78380
78254
|
}
|
|
78381
78255
|
function validateInputs2(node, existingNode) {
|
|
78382
|
-
const printedNode = (0,
|
|
78256
|
+
const printedNode = (0, import_graphql42.print)({
|
|
78383
78257
|
...node,
|
|
78384
78258
|
description: void 0
|
|
78385
78259
|
});
|
|
78386
|
-
const printedExistingNode = (0,
|
|
78260
|
+
const printedExistingNode = (0, import_graphql42.print)({
|
|
78387
78261
|
...existingNode,
|
|
78388
78262
|
description: void 0
|
|
78389
78263
|
});
|
|
@@ -78450,7 +78324,7 @@ function mergeEnumValues2(first, second, config, directives) {
|
|
|
78450
78324
|
}
|
|
78451
78325
|
|
|
78452
78326
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/enum.js
|
|
78453
|
-
var
|
|
78327
|
+
var import_graphql43 = require("graphql");
|
|
78454
78328
|
function mergeEnum2(e1, e22, config, directives) {
|
|
78455
78329
|
if (e22) {
|
|
78456
78330
|
return {
|
|
@@ -78464,33 +78338,33 @@ function mergeEnum2(e1, e22, config, directives) {
|
|
|
78464
78338
|
}
|
|
78465
78339
|
return config?.convertExtensions ? {
|
|
78466
78340
|
...e1,
|
|
78467
|
-
kind:
|
|
78341
|
+
kind: import_graphql43.Kind.ENUM_TYPE_DEFINITION
|
|
78468
78342
|
} : e1;
|
|
78469
78343
|
}
|
|
78470
78344
|
|
|
78471
78345
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/utils.js
|
|
78472
|
-
var
|
|
78346
|
+
var import_graphql44 = require("graphql");
|
|
78473
78347
|
function isStringTypes2(types17) {
|
|
78474
78348
|
return typeof types17 === "string";
|
|
78475
78349
|
}
|
|
78476
78350
|
function isSourceTypes2(types17) {
|
|
78477
|
-
return types17 instanceof
|
|
78351
|
+
return types17 instanceof import_graphql44.Source;
|
|
78478
78352
|
}
|
|
78479
78353
|
function extractType2(type) {
|
|
78480
78354
|
let visitedType = type;
|
|
78481
|
-
while (visitedType.kind ===
|
|
78355
|
+
while (visitedType.kind === import_graphql44.Kind.LIST_TYPE || visitedType.kind === "NonNullType") {
|
|
78482
78356
|
visitedType = visitedType.type;
|
|
78483
78357
|
}
|
|
78484
78358
|
return visitedType;
|
|
78485
78359
|
}
|
|
78486
78360
|
function isWrappingTypeNode2(type) {
|
|
78487
|
-
return type.kind !==
|
|
78361
|
+
return type.kind !== import_graphql44.Kind.NAMED_TYPE;
|
|
78488
78362
|
}
|
|
78489
78363
|
function isListTypeNode2(type) {
|
|
78490
|
-
return type.kind ===
|
|
78364
|
+
return type.kind === import_graphql44.Kind.LIST_TYPE;
|
|
78491
78365
|
}
|
|
78492
78366
|
function isNonNullTypeNode2(type) {
|
|
78493
|
-
return type.kind ===
|
|
78367
|
+
return type.kind === import_graphql44.Kind.NON_NULL_TYPE;
|
|
78494
78368
|
}
|
|
78495
78369
|
function printTypeNode2(type) {
|
|
78496
78370
|
if (isListTypeNode2(type)) {
|
|
@@ -78593,7 +78467,7 @@ function safeChangeForFieldType2(oldType, newType, ignoreNullability = false) {
|
|
|
78593
78467
|
}
|
|
78594
78468
|
|
|
78595
78469
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/input-type.js
|
|
78596
|
-
var
|
|
78470
|
+
var import_graphql45 = require("graphql");
|
|
78597
78471
|
function mergeInputType2(node, existingNode, config, directives) {
|
|
78598
78472
|
if (existingNode) {
|
|
78599
78473
|
try {
|
|
@@ -78611,12 +78485,12 @@ function mergeInputType2(node, existingNode, config, directives) {
|
|
|
78611
78485
|
}
|
|
78612
78486
|
return config?.convertExtensions ? {
|
|
78613
78487
|
...node,
|
|
78614
|
-
kind:
|
|
78488
|
+
kind: import_graphql45.Kind.INPUT_OBJECT_TYPE_DEFINITION
|
|
78615
78489
|
} : node;
|
|
78616
78490
|
}
|
|
78617
78491
|
|
|
78618
78492
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/interface.js
|
|
78619
|
-
var
|
|
78493
|
+
var import_graphql46 = require("graphql");
|
|
78620
78494
|
|
|
78621
78495
|
// ../../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
|
|
78622
78496
|
function alreadyExists2(arr, other) {
|
|
@@ -78649,15 +78523,15 @@ function mergeInterface2(node, existingNode, config, directives) {
|
|
|
78649
78523
|
}
|
|
78650
78524
|
return config?.convertExtensions ? {
|
|
78651
78525
|
...node,
|
|
78652
|
-
kind:
|
|
78526
|
+
kind: import_graphql46.Kind.INTERFACE_TYPE_DEFINITION
|
|
78653
78527
|
} : node;
|
|
78654
78528
|
}
|
|
78655
78529
|
|
|
78656
78530
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-nodes.js
|
|
78657
|
-
var
|
|
78531
|
+
var import_graphql51 = require("graphql");
|
|
78658
78532
|
|
|
78659
78533
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/type.js
|
|
78660
|
-
var
|
|
78534
|
+
var import_graphql47 = require("graphql");
|
|
78661
78535
|
function mergeType2(node, existingNode, config, directives) {
|
|
78662
78536
|
if (existingNode) {
|
|
78663
78537
|
try {
|
|
@@ -78676,12 +78550,12 @@ function mergeType2(node, existingNode, config, directives) {
|
|
|
78676
78550
|
}
|
|
78677
78551
|
return config?.convertExtensions ? {
|
|
78678
78552
|
...node,
|
|
78679
|
-
kind:
|
|
78553
|
+
kind: import_graphql47.Kind.OBJECT_TYPE_DEFINITION
|
|
78680
78554
|
} : node;
|
|
78681
78555
|
}
|
|
78682
78556
|
|
|
78683
78557
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/scalar.js
|
|
78684
|
-
var
|
|
78558
|
+
var import_graphql48 = require("graphql");
|
|
78685
78559
|
function mergeScalar2(node, existingNode, config, directives) {
|
|
78686
78560
|
if (existingNode) {
|
|
78687
78561
|
return {
|
|
@@ -78694,31 +78568,31 @@ function mergeScalar2(node, existingNode, config, directives) {
|
|
|
78694
78568
|
}
|
|
78695
78569
|
return config?.convertExtensions ? {
|
|
78696
78570
|
...node,
|
|
78697
|
-
kind:
|
|
78571
|
+
kind: import_graphql48.Kind.SCALAR_TYPE_DEFINITION
|
|
78698
78572
|
} : node;
|
|
78699
78573
|
}
|
|
78700
78574
|
|
|
78701
78575
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/union.js
|
|
78702
|
-
var
|
|
78576
|
+
var import_graphql49 = require("graphql");
|
|
78703
78577
|
function mergeUnion2(first, second, config, directives) {
|
|
78704
78578
|
if (second) {
|
|
78705
78579
|
return {
|
|
78706
78580
|
name: first.name,
|
|
78707
78581
|
description: first["description"] || second["description"],
|
|
78708
78582
|
directives: mergeDirectives2(first.directives, second.directives, config, directives),
|
|
78709
|
-
kind: config?.convertExtensions || first.kind === "UnionTypeDefinition" || second.kind === "UnionTypeDefinition" ?
|
|
78583
|
+
kind: config?.convertExtensions || first.kind === "UnionTypeDefinition" || second.kind === "UnionTypeDefinition" ? import_graphql49.Kind.UNION_TYPE_DEFINITION : import_graphql49.Kind.UNION_TYPE_EXTENSION,
|
|
78710
78584
|
loc: first.loc,
|
|
78711
78585
|
types: mergeNamedTypeArray2(first.types, second.types, config)
|
|
78712
78586
|
};
|
|
78713
78587
|
}
|
|
78714
78588
|
return config?.convertExtensions ? {
|
|
78715
78589
|
...first,
|
|
78716
|
-
kind:
|
|
78590
|
+
kind: import_graphql49.Kind.UNION_TYPE_DEFINITION
|
|
78717
78591
|
} : first;
|
|
78718
78592
|
}
|
|
78719
78593
|
|
|
78720
78594
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/schema-def.js
|
|
78721
|
-
var
|
|
78595
|
+
var import_graphql50 = require("graphql");
|
|
78722
78596
|
var DEFAULT_OPERATION_TYPE_NAME_MAP2 = {
|
|
78723
78597
|
query: "Query",
|
|
78724
78598
|
mutation: "Mutation",
|
|
@@ -78737,7 +78611,7 @@ function mergeOperationTypes2(opNodeList = [], existingOpNodeList = []) {
|
|
|
78737
78611
|
function mergeSchemaDefs2(node, existingNode, config, directives) {
|
|
78738
78612
|
if (existingNode) {
|
|
78739
78613
|
return {
|
|
78740
|
-
kind: node.kind ===
|
|
78614
|
+
kind: node.kind === import_graphql50.Kind.SCHEMA_DEFINITION || existingNode.kind === import_graphql50.Kind.SCHEMA_DEFINITION ? import_graphql50.Kind.SCHEMA_DEFINITION : import_graphql50.Kind.SCHEMA_EXTENSION,
|
|
78741
78615
|
description: node["description"] || existingNode["description"],
|
|
78742
78616
|
directives: mergeDirectives2(node.directives, existingNode.directives, config, directives),
|
|
78743
78617
|
operationTypes: mergeOperationTypes2(node.operationTypes, existingNode.operationTypes)
|
|
@@ -78745,7 +78619,7 @@ function mergeSchemaDefs2(node, existingNode, config, directives) {
|
|
|
78745
78619
|
}
|
|
78746
78620
|
return config?.convertExtensions ? {
|
|
78747
78621
|
...node,
|
|
78748
|
-
kind:
|
|
78622
|
+
kind: import_graphql50.Kind.SCHEMA_DEFINITION
|
|
78749
78623
|
} : node;
|
|
78750
78624
|
}
|
|
78751
78625
|
|
|
@@ -78769,36 +78643,36 @@ function mergeGraphQLNodes2(nodes, config, directives = {}) {
|
|
|
78769
78643
|
delete mergedResultMap[name];
|
|
78770
78644
|
} else {
|
|
78771
78645
|
switch (nodeDefinition.kind) {
|
|
78772
|
-
case
|
|
78773
|
-
case
|
|
78646
|
+
case import_graphql51.Kind.OBJECT_TYPE_DEFINITION:
|
|
78647
|
+
case import_graphql51.Kind.OBJECT_TYPE_EXTENSION:
|
|
78774
78648
|
mergedResultMap[name] = mergeType2(nodeDefinition, mergedResultMap[name], config, directives);
|
|
78775
78649
|
break;
|
|
78776
|
-
case
|
|
78777
|
-
case
|
|
78650
|
+
case import_graphql51.Kind.ENUM_TYPE_DEFINITION:
|
|
78651
|
+
case import_graphql51.Kind.ENUM_TYPE_EXTENSION:
|
|
78778
78652
|
mergedResultMap[name] = mergeEnum2(nodeDefinition, mergedResultMap[name], config, directives);
|
|
78779
78653
|
break;
|
|
78780
|
-
case
|
|
78781
|
-
case
|
|
78654
|
+
case import_graphql51.Kind.UNION_TYPE_DEFINITION:
|
|
78655
|
+
case import_graphql51.Kind.UNION_TYPE_EXTENSION:
|
|
78782
78656
|
mergedResultMap[name] = mergeUnion2(nodeDefinition, mergedResultMap[name], config, directives);
|
|
78783
78657
|
break;
|
|
78784
|
-
case
|
|
78785
|
-
case
|
|
78658
|
+
case import_graphql51.Kind.SCALAR_TYPE_DEFINITION:
|
|
78659
|
+
case import_graphql51.Kind.SCALAR_TYPE_EXTENSION:
|
|
78786
78660
|
mergedResultMap[name] = mergeScalar2(nodeDefinition, mergedResultMap[name], config, directives);
|
|
78787
78661
|
break;
|
|
78788
|
-
case
|
|
78789
|
-
case
|
|
78662
|
+
case import_graphql51.Kind.INPUT_OBJECT_TYPE_DEFINITION:
|
|
78663
|
+
case import_graphql51.Kind.INPUT_OBJECT_TYPE_EXTENSION:
|
|
78790
78664
|
mergedResultMap[name] = mergeInputType2(nodeDefinition, mergedResultMap[name], config, directives);
|
|
78791
78665
|
break;
|
|
78792
|
-
case
|
|
78793
|
-
case
|
|
78666
|
+
case import_graphql51.Kind.INTERFACE_TYPE_DEFINITION:
|
|
78667
|
+
case import_graphql51.Kind.INTERFACE_TYPE_EXTENSION:
|
|
78794
78668
|
mergedResultMap[name] = mergeInterface2(nodeDefinition, mergedResultMap[name], config, directives);
|
|
78795
78669
|
break;
|
|
78796
|
-
case
|
|
78670
|
+
case import_graphql51.Kind.DIRECTIVE_DEFINITION:
|
|
78797
78671
|
mergedResultMap[name] = mergeDirective2(nodeDefinition, mergedResultMap[name]);
|
|
78798
78672
|
break;
|
|
78799
78673
|
}
|
|
78800
78674
|
}
|
|
78801
|
-
} else if (nodeDefinition.kind ===
|
|
78675
|
+
} else if (nodeDefinition.kind === import_graphql51.Kind.SCHEMA_DEFINITION || nodeDefinition.kind === import_graphql51.Kind.SCHEMA_EXTENSION) {
|
|
78802
78676
|
mergedResultMap[schemaDefSymbol2] = mergeSchemaDefs2(nodeDefinition, mergedResultMap[schemaDefSymbol2], config);
|
|
78803
78677
|
}
|
|
78804
78678
|
}
|
|
@@ -78806,11 +78680,11 @@ function mergeGraphQLNodes2(nodes, config, directives = {}) {
|
|
|
78806
78680
|
}
|
|
78807
78681
|
|
|
78808
78682
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-typedefs.js
|
|
78809
|
-
var
|
|
78683
|
+
var import_graphql52 = require("graphql");
|
|
78810
78684
|
function mergeTypeDefs2(typeSource, config) {
|
|
78811
78685
|
resetComments2();
|
|
78812
78686
|
const doc = {
|
|
78813
|
-
kind:
|
|
78687
|
+
kind: import_graphql52.Kind.DOCUMENT,
|
|
78814
78688
|
definitions: mergeGraphQLTypes2(typeSource, {
|
|
78815
78689
|
useSchemaDefinition: true,
|
|
78816
78690
|
forceSchemaDefinition: false,
|
|
@@ -78837,14 +78711,14 @@ function visitTypeSources2(typeSource, options, allDirectives = [], allNodes = [
|
|
|
78837
78711
|
for (const type of typeSource) {
|
|
78838
78712
|
visitTypeSources2(type, options, allDirectives, allNodes, visitedTypeSources);
|
|
78839
78713
|
}
|
|
78840
|
-
} else if ((0,
|
|
78714
|
+
} else if ((0, import_graphql52.isSchema)(typeSource)) {
|
|
78841
78715
|
const documentNode = getDocumentNodeFromSchema2(typeSource, options);
|
|
78842
78716
|
visitTypeSources2(documentNode.definitions, options, allDirectives, allNodes, visitedTypeSources);
|
|
78843
78717
|
} else if (isStringTypes2(typeSource) || isSourceTypes2(typeSource)) {
|
|
78844
|
-
const documentNode = (0,
|
|
78718
|
+
const documentNode = (0, import_graphql52.parse)(typeSource, options);
|
|
78845
78719
|
visitTypeSources2(documentNode.definitions, options, allDirectives, allNodes, visitedTypeSources);
|
|
78846
|
-
} else if (typeof typeSource === "object" && (0,
|
|
78847
|
-
if (typeSource.kind ===
|
|
78720
|
+
} else if (typeof typeSource === "object" && (0, import_graphql52.isDefinitionNode)(typeSource)) {
|
|
78721
|
+
if (typeSource.kind === import_graphql52.Kind.DIRECTIVE_DEFINITION) {
|
|
78848
78722
|
allDirectives.push(typeSource);
|
|
78849
78723
|
} else {
|
|
78850
78724
|
allNodes.push(typeSource);
|
|
@@ -78864,7 +78738,7 @@ function mergeGraphQLTypes2(typeSource, config) {
|
|
|
78864
78738
|
const mergedNodes = mergeGraphQLNodes2(allNodes, config, mergedDirectives);
|
|
78865
78739
|
if (config?.useSchemaDefinition) {
|
|
78866
78740
|
const schemaDef = mergedNodes[schemaDefSymbol2] || {
|
|
78867
|
-
kind:
|
|
78741
|
+
kind: import_graphql52.Kind.SCHEMA_DEFINITION,
|
|
78868
78742
|
operationTypes: []
|
|
78869
78743
|
};
|
|
78870
78744
|
const operationTypes = schemaDef.operationTypes;
|
|
@@ -78875,9 +78749,9 @@ function mergeGraphQLTypes2(typeSource, config) {
|
|
|
78875
78749
|
const existingPossibleRootType = mergedNodes[possibleRootTypeName];
|
|
78876
78750
|
if (existingPossibleRootType != null && existingPossibleRootType.name != null) {
|
|
78877
78751
|
operationTypes.push({
|
|
78878
|
-
kind:
|
|
78752
|
+
kind: import_graphql52.Kind.OPERATION_TYPE_DEFINITION,
|
|
78879
78753
|
type: {
|
|
78880
|
-
kind:
|
|
78754
|
+
kind: import_graphql52.Kind.NAMED_TYPE,
|
|
78881
78755
|
name: existingPossibleRootType.name
|
|
78882
78756
|
},
|
|
78883
78757
|
operation: opTypeDefNodeType
|
|
@@ -78891,15 +78765,15 @@ function mergeGraphQLTypes2(typeSource, config) {
|
|
|
78891
78765
|
}
|
|
78892
78766
|
if (config?.forceSchemaDefinition && !mergedNodes[schemaDefSymbol2]?.operationTypes?.length) {
|
|
78893
78767
|
mergedNodes[schemaDefSymbol2] = {
|
|
78894
|
-
kind:
|
|
78768
|
+
kind: import_graphql52.Kind.SCHEMA_DEFINITION,
|
|
78895
78769
|
operationTypes: [
|
|
78896
78770
|
{
|
|
78897
|
-
kind:
|
|
78771
|
+
kind: import_graphql52.Kind.OPERATION_TYPE_DEFINITION,
|
|
78898
78772
|
operation: "query",
|
|
78899
78773
|
type: {
|
|
78900
|
-
kind:
|
|
78774
|
+
kind: import_graphql52.Kind.NAMED_TYPE,
|
|
78901
78775
|
name: {
|
|
78902
|
-
kind:
|
|
78776
|
+
kind: import_graphql52.Kind.NAME,
|
|
78903
78777
|
value: "Query"
|
|
78904
78778
|
}
|
|
78905
78779
|
}
|
|
@@ -82413,12 +82287,12 @@ async function packageJSON(targetPath, frameworkInfo) {
|
|
|
82413
82287
|
}
|
|
82414
82288
|
packageJSON2.devDependencies = {
|
|
82415
82289
|
...packageJSON2.devDependencies,
|
|
82416
|
-
houdini: "^1.5.
|
|
82290
|
+
houdini: "^1.5.4"
|
|
82417
82291
|
};
|
|
82418
82292
|
if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
|
|
82419
82293
|
packageJSON2.devDependencies = {
|
|
82420
82294
|
...packageJSON2.devDependencies,
|
|
82421
|
-
"houdini-svelte": "^2.1.
|
|
82295
|
+
"houdini-svelte": "^2.1.8"
|
|
82422
82296
|
};
|
|
82423
82297
|
} else {
|
|
82424
82298
|
throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
|