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
package/build/cmd-esm/index.js
CHANGED
|
@@ -61674,7 +61674,7 @@ function mergeSchemas(config) {
|
|
|
61674
61674
|
|
|
61675
61675
|
// src/lib/config.ts
|
|
61676
61676
|
var import_minimatch8 = __toESM(require_minimatch(), 1);
|
|
61677
|
-
import * as
|
|
61677
|
+
import * as graphql5 from "graphql";
|
|
61678
61678
|
import { fileURLToPath as fileURLToPath3, pathToFileURL } from "node:url";
|
|
61679
61679
|
|
|
61680
61680
|
// src/runtime/imports/config.ts
|
|
@@ -68885,142 +68885,247 @@ function plugin(name, hooks) {
|
|
|
68885
68885
|
}
|
|
68886
68886
|
|
|
68887
68887
|
// src/lib/router/conventions.ts
|
|
68888
|
-
|
|
68889
|
-
|
|
68890
|
-
adapter_config_path: () => adapter_config_path,
|
|
68891
|
-
app_component_path: () => app_component_path,
|
|
68892
|
-
componentField_unit_path: () => componentField_unit_path,
|
|
68893
|
-
fallback_unit_path: () => fallback_unit_path,
|
|
68894
|
-
is_layout: () => is_layout,
|
|
68895
|
-
layout_unit_path: () => layout_unit_path,
|
|
68896
|
-
page_entries_dir: () => page_entries_dir,
|
|
68897
|
-
page_entry_path: () => page_entry_path,
|
|
68898
|
-
page_id: () => page_id,
|
|
68899
|
-
page_unit_path: () => page_unit_path,
|
|
68900
|
-
read_layoutQuery: () => read_layoutQuery,
|
|
68901
|
-
read_layoutView: () => read_layoutView,
|
|
68902
|
-
read_pageQuery: () => read_pageQuery,
|
|
68903
|
-
read_pageView: () => read_pageView,
|
|
68904
|
-
router_index_path: () => router_index_path,
|
|
68905
|
-
router_path: () => router_path,
|
|
68906
|
-
serialized_manifest_path: () => serialized_manifest_path,
|
|
68907
|
-
server_adapter_path: () => server_adapter_path,
|
|
68908
|
-
temp_dir: () => temp_dir,
|
|
68909
|
-
units_dir: () => units_dir,
|
|
68910
|
-
vite_render_path: () => vite_render_path
|
|
68911
|
-
});
|
|
68912
|
-
function router_path(config) {
|
|
68913
|
-
return path_exports.join(base_dir(config), "Router.jsx");
|
|
68914
|
-
}
|
|
68915
|
-
function page_entry_path(config, id, base) {
|
|
68916
|
-
return path_exports.join(page_entries_dir(config, base), `${id}.jsx`);
|
|
68917
|
-
}
|
|
68918
|
-
function server_adapter_path(config, base) {
|
|
68919
|
-
return path_exports.join(units_dir(config, base), "render", "server.js");
|
|
68920
|
-
}
|
|
68921
|
-
function adapter_config_path(config, base) {
|
|
68922
|
-
return path_exports.join(units_dir(config, base), "render", "config.js");
|
|
68888
|
+
function temp_dir(config, key) {
|
|
68889
|
+
return join2(config.rootDir, "temp", key);
|
|
68923
68890
|
}
|
|
68924
|
-
|
|
68925
|
-
|
|
68891
|
+
|
|
68892
|
+
// src/lib/router/manifest.ts
|
|
68893
|
+
var t2 = __toESM(require_lib5(), 1);
|
|
68894
|
+
import * as graphql3 from "graphql";
|
|
68895
|
+
|
|
68896
|
+
// src/lib/graphql.ts
|
|
68897
|
+
import * as graphql2 from "graphql";
|
|
68898
|
+
import crypto2 from "node:crypto";
|
|
68899
|
+
function getRootType(type) {
|
|
68900
|
+
if (graphql2.isNonNullType(type)) {
|
|
68901
|
+
return getRootType(type.ofType);
|
|
68902
|
+
}
|
|
68903
|
+
if (graphql2.isListType(type)) {
|
|
68904
|
+
return getRootType(type.ofType);
|
|
68905
|
+
}
|
|
68906
|
+
return type;
|
|
68926
68907
|
}
|
|
68927
|
-
function
|
|
68928
|
-
return
|
|
68908
|
+
function hashOriginal({ document }) {
|
|
68909
|
+
return hashDocument(document.originalString);
|
|
68929
68910
|
}
|
|
68930
|
-
function
|
|
68931
|
-
return
|
|
68911
|
+
function hashRaw({ document }) {
|
|
68912
|
+
return hashDocument(document.artifact?.raw);
|
|
68932
68913
|
}
|
|
68933
|
-
function
|
|
68934
|
-
return
|
|
68914
|
+
function hashDocument(str) {
|
|
68915
|
+
return crypto2.createHash("sha256").update(str || "").digest("hex");
|
|
68935
68916
|
}
|
|
68936
|
-
function
|
|
68937
|
-
return
|
|
68917
|
+
function parentField(ancestors) {
|
|
68918
|
+
return walkParentField([...ancestors].sort(() => -1));
|
|
68938
68919
|
}
|
|
68939
|
-
function
|
|
68940
|
-
|
|
68920
|
+
function walkParentField(ancestors) {
|
|
68921
|
+
let head = ancestors.shift();
|
|
68922
|
+
if (Array.isArray(head) || head.kind === "SelectionSet") {
|
|
68923
|
+
return walkParentField(ancestors);
|
|
68924
|
+
}
|
|
68925
|
+
return head;
|
|
68941
68926
|
}
|
|
68942
|
-
|
|
68943
|
-
const
|
|
68944
|
-
|
|
68927
|
+
function parentTypeFromAncestors(schema, filepath, ancestors) {
|
|
68928
|
+
const parents = [...ancestors];
|
|
68929
|
+
parents.reverse();
|
|
68930
|
+
return walkAncestors(schema, filepath, parents);
|
|
68945
68931
|
}
|
|
68946
|
-
|
|
68947
|
-
|
|
68948
|
-
|
|
68949
|
-
|
|
68950
|
-
|
|
68951
|
-
|
|
68932
|
+
function walkAncestors(schema, filepath, ancestors) {
|
|
68933
|
+
let head = ancestors.shift();
|
|
68934
|
+
if (Array.isArray(head)) {
|
|
68935
|
+
return walkAncestors(schema, filepath, ancestors);
|
|
68936
|
+
}
|
|
68937
|
+
if (!head) {
|
|
68938
|
+
throw new HoudiniError({ filepath, message: "Could not figure out type of field" });
|
|
68939
|
+
}
|
|
68940
|
+
if (head.kind === "OperationDefinition") {
|
|
68941
|
+
const operationType = {
|
|
68942
|
+
query: schema.getQueryType(),
|
|
68943
|
+
mutation: schema.getMutationType(),
|
|
68944
|
+
subscription: schema.getSubscriptionType()
|
|
68945
|
+
}[head.operation];
|
|
68946
|
+
if (!operationType) {
|
|
68947
|
+
throw new HoudiniError({ filepath, message: "Could not find operation type" });
|
|
68952
68948
|
}
|
|
68949
|
+
return operationType;
|
|
68953
68950
|
}
|
|
68954
|
-
|
|
68955
|
-
|
|
68956
|
-
|
|
68957
|
-
|
|
68958
|
-
|
|
68959
|
-
}
|
|
68960
|
-
|
|
68961
|
-
for (const name of ["+layout.tsx", "+layout.jsx"]) {
|
|
68962
|
-
let target = path_exports.join(base, name);
|
|
68963
|
-
let result = await fs_exports.readFile(target);
|
|
68964
|
-
if (result) {
|
|
68965
|
-
return [target, result];
|
|
68951
|
+
if (head.kind === "FragmentDefinition") {
|
|
68952
|
+
const result = schema.getType(head.typeCondition.name.value);
|
|
68953
|
+
if (!result) {
|
|
68954
|
+
throw new HoudiniError({
|
|
68955
|
+
filepath,
|
|
68956
|
+
message: `Could not find definition for ${head.typeCondition.name.value} in the schema`
|
|
68957
|
+
});
|
|
68966
68958
|
}
|
|
68959
|
+
return result;
|
|
68967
68960
|
}
|
|
68968
|
-
|
|
68969
|
-
|
|
68970
|
-
|
|
68971
|
-
|
|
68972
|
-
|
|
68973
|
-
|
|
68974
|
-
|
|
68961
|
+
if (head.kind === "FragmentSpread") {
|
|
68962
|
+
throw new Error("How the hell did this happen?");
|
|
68963
|
+
}
|
|
68964
|
+
const parent2 = walkAncestors(schema, filepath, ancestors);
|
|
68965
|
+
if (head.kind === "InlineFragment") {
|
|
68966
|
+
if (!head.typeCondition) {
|
|
68967
|
+
return parent2;
|
|
68968
|
+
}
|
|
68969
|
+
const wrapper = schema.getType(head.typeCondition.name.value);
|
|
68970
|
+
if (!wrapper) {
|
|
68971
|
+
throw new HoudiniError({
|
|
68972
|
+
filepath,
|
|
68973
|
+
message: "Could not find type with name: " + head.typeCondition.name.value
|
|
68974
|
+
});
|
|
68975
|
+
}
|
|
68976
|
+
return wrapper;
|
|
68977
|
+
}
|
|
68978
|
+
if (head.kind === "SelectionSet") {
|
|
68979
|
+
return parent2;
|
|
68980
|
+
}
|
|
68981
|
+
const field = parent2.getFields()[head.name.value];
|
|
68982
|
+
if (!field) {
|
|
68983
|
+
throw new HoudiniError({
|
|
68984
|
+
filepath,
|
|
68985
|
+
message: `Could not find definition of ${head.name.value} in ${parent2.toString()}`
|
|
68986
|
+
});
|
|
68987
|
+
}
|
|
68988
|
+
return getRootType(field.type);
|
|
68975
68989
|
}
|
|
68976
|
-
function
|
|
68977
|
-
|
|
68990
|
+
function definitionFromAncestors(ancestors) {
|
|
68991
|
+
let parents = [...ancestors];
|
|
68992
|
+
parents.shift();
|
|
68993
|
+
let definition = parents.shift();
|
|
68994
|
+
while (Array.isArray(definition) && definition) {
|
|
68995
|
+
definition = parents.shift();
|
|
68996
|
+
}
|
|
68997
|
+
return { parents, definition };
|
|
68978
68998
|
}
|
|
68979
|
-
function
|
|
68980
|
-
|
|
68981
|
-
|
|
68982
|
-
|
|
68983
|
-
|
|
68984
|
-
|
|
68985
|
-
|
|
68986
|
-
|
|
68987
|
-
|
|
68988
|
-
if (match2 !== -1) {
|
|
68989
|
-
copy += mask;
|
|
68999
|
+
function formatErrors(e3, afterError) {
|
|
69000
|
+
const errors = Array.isArray(e3) ? e3 : [e3];
|
|
69001
|
+
for (const error of errors) {
|
|
69002
|
+
if ("filepath" in error && error.filepath) {
|
|
69003
|
+
const relative2 = relative(process.cwd(), error.filepath);
|
|
69004
|
+
console.error(`\u274C Encountered error in ${relative2}`);
|
|
69005
|
+
if (error.message) {
|
|
69006
|
+
console.error(error.message);
|
|
69007
|
+
}
|
|
68990
69008
|
} else {
|
|
68991
|
-
|
|
69009
|
+
console.error(`\u274C ${error.message}`);
|
|
69010
|
+
if ("description" in error && error.description) {
|
|
69011
|
+
console.error(`${error.description}`);
|
|
69012
|
+
}
|
|
68992
69013
|
}
|
|
69014
|
+
afterError?.(e3);
|
|
68993
69015
|
}
|
|
68994
|
-
return copy;
|
|
68995
69016
|
}
|
|
68996
|
-
function
|
|
68997
|
-
|
|
68998
|
-
|
|
68999
|
-
|
|
69000
|
-
|
|
69017
|
+
function unwrapType(config, type, wrappers = [], convertRuntimeScalars) {
|
|
69018
|
+
if (type.kind === "NonNullType") {
|
|
69019
|
+
return unwrapType(config, type.type, [TypeWrapper.NonNull, ...wrappers]);
|
|
69020
|
+
}
|
|
69021
|
+
if (type instanceof graphql2.GraphQLNonNull) {
|
|
69022
|
+
return unwrapType(config, type.ofType, [TypeWrapper.NonNull, ...wrappers]);
|
|
69023
|
+
}
|
|
69024
|
+
if (wrappers[0] !== TypeWrapper.NonNull) {
|
|
69025
|
+
wrappers.unshift(TypeWrapper.Nullable);
|
|
69026
|
+
}
|
|
69027
|
+
if (type.kind === "ListType") {
|
|
69028
|
+
return unwrapType(config, type.type, [TypeWrapper.List, ...wrappers]);
|
|
69029
|
+
}
|
|
69030
|
+
if (type instanceof graphql2.GraphQLList) {
|
|
69031
|
+
return unwrapType(config, type.ofType, [TypeWrapper.List, ...wrappers]);
|
|
69032
|
+
}
|
|
69033
|
+
if (convertRuntimeScalars && config.configFile.features?.runtimeScalars?.[type.name.value]) {
|
|
69034
|
+
type = config.schema.getType(
|
|
69035
|
+
config.configFile.features?.runtimeScalars?.[type.name.value].type
|
|
69036
|
+
);
|
|
69037
|
+
}
|
|
69038
|
+
const namedType = config.schema.getType(type.name.value || type.name);
|
|
69039
|
+
if (!namedType) {
|
|
69040
|
+
throw new Error("Unknown type: " + type.name.value || type.name);
|
|
69041
|
+
}
|
|
69042
|
+
return { type: namedType, wrappers };
|
|
69001
69043
|
}
|
|
69002
|
-
function
|
|
69003
|
-
|
|
69044
|
+
function wrapType({
|
|
69045
|
+
type,
|
|
69046
|
+
wrappers
|
|
69047
|
+
}) {
|
|
69048
|
+
const head = wrappers[0];
|
|
69049
|
+
const tail = wrappers.slice(1);
|
|
69050
|
+
let kind = graphql2.Kind.NAMED_TYPE;
|
|
69051
|
+
if (head === TypeWrapper.List) {
|
|
69052
|
+
kind = graphql2.Kind.LIST_TYPE;
|
|
69053
|
+
} else if (head === TypeWrapper.NonNull) {
|
|
69054
|
+
kind = graphql2.Kind.NON_NULL_TYPE;
|
|
69055
|
+
}
|
|
69056
|
+
if (kind === "NamedType") {
|
|
69057
|
+
return {
|
|
69058
|
+
kind,
|
|
69059
|
+
name: {
|
|
69060
|
+
kind: graphql2.Kind.NAME,
|
|
69061
|
+
value: type.name
|
|
69062
|
+
}
|
|
69063
|
+
};
|
|
69064
|
+
}
|
|
69065
|
+
return {
|
|
69066
|
+
kind,
|
|
69067
|
+
type: wrapType({ type, wrappers: tail })
|
|
69068
|
+
};
|
|
69004
69069
|
}
|
|
69005
|
-
|
|
69006
|
-
|
|
69070
|
+
var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
|
|
69071
|
+
TypeWrapper2["Nullable"] = "Nullable";
|
|
69072
|
+
TypeWrapper2["List"] = "List";
|
|
69073
|
+
TypeWrapper2["NonNull"] = "NonNull";
|
|
69074
|
+
return TypeWrapper2;
|
|
69075
|
+
})(TypeWrapper || {});
|
|
69076
|
+
|
|
69077
|
+
// src/lib/parse.ts
|
|
69078
|
+
var import_parser = __toESM(require_lib6(), 1);
|
|
69079
|
+
var import_recast = __toESM(require_main2(), 1);
|
|
69080
|
+
|
|
69081
|
+
// src/lib/deepMerge.ts
|
|
69082
|
+
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
69083
|
+
function deepMerge2(filepath, ...targets) {
|
|
69084
|
+
try {
|
|
69085
|
+
if (targets.length === 1) {
|
|
69086
|
+
return targets[0];
|
|
69087
|
+
} else if (targets.length === 2) {
|
|
69088
|
+
return (0, import_deepmerge.default)(targets[0], targets[1], {
|
|
69089
|
+
arrayMerge: (source, update) => [...new Set(source.concat(update))]
|
|
69090
|
+
});
|
|
69091
|
+
}
|
|
69092
|
+
return deepMerge2(filepath, targets[0], deepMerge2(filepath, ...targets.slice(1)));
|
|
69093
|
+
} catch (e3) {
|
|
69094
|
+
throw new HoudiniError({
|
|
69095
|
+
filepath,
|
|
69096
|
+
message: "could not merge: " + JSON.stringify(targets, null, 4),
|
|
69097
|
+
description: e3.message
|
|
69098
|
+
});
|
|
69099
|
+
}
|
|
69007
69100
|
}
|
|
69008
|
-
|
|
69009
|
-
|
|
69101
|
+
|
|
69102
|
+
// src/lib/parse.ts
|
|
69103
|
+
function parseJS(str, config) {
|
|
69104
|
+
const defaultConfig = {
|
|
69105
|
+
plugins: [
|
|
69106
|
+
"typescript",
|
|
69107
|
+
"importAssertions",
|
|
69108
|
+
"decorators-legacy",
|
|
69109
|
+
"explicitResourceManagement"
|
|
69110
|
+
],
|
|
69111
|
+
sourceType: "module"
|
|
69112
|
+
};
|
|
69113
|
+
return (0, import_parser.parse)(str || "", config ? deepMerge2("", defaultConfig, config) : defaultConfig).program;
|
|
69010
69114
|
}
|
|
69011
|
-
function
|
|
69012
|
-
|
|
69115
|
+
function parseJSON(str) {
|
|
69116
|
+
str = str.replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g, (m3, g3) => g3 ? "" : m3);
|
|
69117
|
+
return JSON.parse(str);
|
|
69013
69118
|
}
|
|
69014
|
-
function
|
|
69015
|
-
|
|
69119
|
+
async function printJS(script, options) {
|
|
69120
|
+
if (options?.pretty) {
|
|
69121
|
+
return (0, import_recast.prettyPrint)(script, options);
|
|
69122
|
+
} else {
|
|
69123
|
+
return (0, import_recast.print)(script, options);
|
|
69124
|
+
}
|
|
69016
69125
|
}
|
|
69017
69126
|
|
|
69018
|
-
// src/lib/router/manifest.ts
|
|
69019
|
-
var t2 = __toESM(require_lib5(), 1);
|
|
69020
|
-
import * as graphql2 from "graphql";
|
|
69021
|
-
|
|
69022
69127
|
// src/lib/router/server.ts
|
|
69023
|
-
import * as
|
|
69128
|
+
import * as graphql4 from "graphql";
|
|
69024
69129
|
import path3 from "node:path";
|
|
69025
69130
|
|
|
69026
69131
|
// src/runtime/lib/flatten.ts
|
|
@@ -71369,14 +71474,14 @@ function isSecondaryBuild() {
|
|
|
71369
71474
|
async function buildLocalSchema(config) {
|
|
71370
71475
|
const { build } = await import("vite");
|
|
71371
71476
|
const schema = path3.join(config.localApiDir, "+schema");
|
|
71372
|
-
const outDir =
|
|
71477
|
+
const outDir = temp_dir(config, "schema");
|
|
71373
71478
|
process.env.HOUDINI_SECONDARY_BUILD = "true";
|
|
71374
71479
|
try {
|
|
71375
|
-
await
|
|
71480
|
+
await remove(path3.join(outDir, "assets", "schema.js"));
|
|
71376
71481
|
} catch {
|
|
71377
71482
|
}
|
|
71378
71483
|
try {
|
|
71379
|
-
await
|
|
71484
|
+
await mkdir(outDir);
|
|
71380
71485
|
} catch {
|
|
71381
71486
|
}
|
|
71382
71487
|
await build({
|
|
@@ -71408,14 +71513,14 @@ async function loadLocalSchema(config) {
|
|
|
71408
71513
|
}
|
|
71409
71514
|
try {
|
|
71410
71515
|
const { default: schema } = await import(path3.join(
|
|
71411
|
-
|
|
71516
|
+
temp_dir(config, "schema"),
|
|
71412
71517
|
`schema.js?${Date.now().valueOf()}}`
|
|
71413
71518
|
));
|
|
71414
71519
|
return schema;
|
|
71415
71520
|
} catch (e3) {
|
|
71416
71521
|
const message = "message" in e3 ? e3.message : e3;
|
|
71417
71522
|
console.error("\u26A0\uFE0F Failed to load local schema: ", message);
|
|
71418
|
-
return new
|
|
71523
|
+
return new graphql4.GraphQLSchema({});
|
|
71419
71524
|
}
|
|
71420
71525
|
}
|
|
71421
71526
|
|
|
@@ -71490,7 +71595,7 @@ var Config = class {
|
|
|
71490
71595
|
persistedQueriesPath
|
|
71491
71596
|
} = this.configFile;
|
|
71492
71597
|
if (typeof schema === "string") {
|
|
71493
|
-
this.schema =
|
|
71598
|
+
this.schema = graphql5.buildSchema(schema);
|
|
71494
71599
|
} else {
|
|
71495
71600
|
this.schema = schema;
|
|
71496
71601
|
}
|
|
@@ -71638,7 +71743,7 @@ var Config = class {
|
|
|
71638
71743
|
set newSchema(value) {
|
|
71639
71744
|
this.schemaString = value;
|
|
71640
71745
|
if (value) {
|
|
71641
|
-
this.#newSchemaInstance =
|
|
71746
|
+
this.#newSchemaInstance = graphql5.buildSchema(value);
|
|
71642
71747
|
} else {
|
|
71643
71748
|
this.#newSchemaInstance = null;
|
|
71644
71749
|
}
|
|
@@ -71728,21 +71833,21 @@ var Config = class {
|
|
|
71728
71833
|
}
|
|
71729
71834
|
documentName(document) {
|
|
71730
71835
|
const operation = document.definitions.find(
|
|
71731
|
-
({ kind }) => kind ===
|
|
71836
|
+
({ kind }) => kind === graphql5.Kind.OPERATION_DEFINITION
|
|
71732
71837
|
);
|
|
71733
71838
|
if (operation) {
|
|
71734
71839
|
if (!operation.name) {
|
|
71735
|
-
throw new Error("encountered operation with no name: " +
|
|
71840
|
+
throw new Error("encountered operation with no name: " + graphql5.print(document));
|
|
71736
71841
|
}
|
|
71737
71842
|
return operation.name.value;
|
|
71738
71843
|
}
|
|
71739
71844
|
const fragmentDefinitions = document.definitions.filter(
|
|
71740
|
-
({ kind }) => kind ===
|
|
71845
|
+
({ kind }) => kind === graphql5.Kind.FRAGMENT_DEFINITION
|
|
71741
71846
|
);
|
|
71742
71847
|
if (fragmentDefinitions.length) {
|
|
71743
71848
|
return fragmentDefinitions[0].name.value;
|
|
71744
71849
|
}
|
|
71745
|
-
throw new Error("Could not generate artifact name for document: " +
|
|
71850
|
+
throw new Error("Could not generate artifact name for document: " + graphql5.print(document));
|
|
71746
71851
|
}
|
|
71747
71852
|
isSelectionScalar(type) {
|
|
71748
71853
|
return ["String", "Boolean", "Float", "ID", "Int"].concat(Object.keys(this.scalars || {})).includes(type);
|
|
@@ -71952,10 +72057,10 @@ var Config = class {
|
|
|
71952
72057
|
localDocumentData(document) {
|
|
71953
72058
|
let paginated = false;
|
|
71954
72059
|
let componentFields3 = [];
|
|
71955
|
-
const typeInfo = new
|
|
71956
|
-
|
|
72060
|
+
const typeInfo = new graphql5.TypeInfo(this.schema);
|
|
72061
|
+
graphql5.visit(
|
|
71957
72062
|
document,
|
|
71958
|
-
|
|
72063
|
+
graphql5.visitWithTypeInfo(typeInfo, {
|
|
71959
72064
|
Directive: (node) => {
|
|
71960
72065
|
if ([this.paginateDirective].includes(node.name.value)) {
|
|
71961
72066
|
paginated = true;
|
|
@@ -72315,248 +72420,17 @@ async function loadSchemaFile(schemaPath) {
|
|
|
72315
72420
|
}
|
|
72316
72421
|
const contents = await readFile(schemaPath);
|
|
72317
72422
|
if (schemaPath.endsWith("gql") || schemaPath.endsWith("graphql") || schemaPath.endsWith("graphqls")) {
|
|
72318
|
-
return
|
|
72423
|
+
return graphql5.buildSchema(contents);
|
|
72319
72424
|
}
|
|
72320
72425
|
const jsonContents = JSON.parse(contents);
|
|
72321
72426
|
if (jsonContents.data) {
|
|
72322
|
-
return
|
|
72427
|
+
return graphql5.buildClientSchema(jsonContents.data);
|
|
72323
72428
|
}
|
|
72324
|
-
return
|
|
72429
|
+
return graphql5.buildClientSchema(jsonContents);
|
|
72325
72430
|
}
|
|
72326
|
-
var emptySchema =
|
|
72431
|
+
var emptySchema = graphql5.buildSchema("type Query { hello: String }");
|
|
72327
72432
|
var defaultDirectives = emptySchema.getDirectives().map((dir) => dir.name);
|
|
72328
72433
|
|
|
72329
|
-
// src/lib/graphql.ts
|
|
72330
|
-
import * as graphql5 from "graphql";
|
|
72331
|
-
import crypto2 from "node:crypto";
|
|
72332
|
-
function getRootType(type) {
|
|
72333
|
-
if (graphql5.isNonNullType(type)) {
|
|
72334
|
-
return getRootType(type.ofType);
|
|
72335
|
-
}
|
|
72336
|
-
if (graphql5.isListType(type)) {
|
|
72337
|
-
return getRootType(type.ofType);
|
|
72338
|
-
}
|
|
72339
|
-
return type;
|
|
72340
|
-
}
|
|
72341
|
-
function hashOriginal({ document }) {
|
|
72342
|
-
return hashDocument(document.originalString);
|
|
72343
|
-
}
|
|
72344
|
-
function hashRaw({ document }) {
|
|
72345
|
-
return hashDocument(document.artifact?.raw);
|
|
72346
|
-
}
|
|
72347
|
-
function hashDocument(str) {
|
|
72348
|
-
return crypto2.createHash("sha256").update(str || "").digest("hex");
|
|
72349
|
-
}
|
|
72350
|
-
function parentField(ancestors) {
|
|
72351
|
-
return walkParentField([...ancestors].sort(() => -1));
|
|
72352
|
-
}
|
|
72353
|
-
function walkParentField(ancestors) {
|
|
72354
|
-
let head = ancestors.shift();
|
|
72355
|
-
if (Array.isArray(head) || head.kind === "SelectionSet") {
|
|
72356
|
-
return walkParentField(ancestors);
|
|
72357
|
-
}
|
|
72358
|
-
return head;
|
|
72359
|
-
}
|
|
72360
|
-
function parentTypeFromAncestors(schema, filepath, ancestors) {
|
|
72361
|
-
const parents = [...ancestors];
|
|
72362
|
-
parents.reverse();
|
|
72363
|
-
return walkAncestors(schema, filepath, parents);
|
|
72364
|
-
}
|
|
72365
|
-
function walkAncestors(schema, filepath, ancestors) {
|
|
72366
|
-
let head = ancestors.shift();
|
|
72367
|
-
if (Array.isArray(head)) {
|
|
72368
|
-
return walkAncestors(schema, filepath, ancestors);
|
|
72369
|
-
}
|
|
72370
|
-
if (!head) {
|
|
72371
|
-
throw new HoudiniError({ filepath, message: "Could not figure out type of field" });
|
|
72372
|
-
}
|
|
72373
|
-
if (head.kind === "OperationDefinition") {
|
|
72374
|
-
const operationType = {
|
|
72375
|
-
query: schema.getQueryType(),
|
|
72376
|
-
mutation: schema.getMutationType(),
|
|
72377
|
-
subscription: schema.getSubscriptionType()
|
|
72378
|
-
}[head.operation];
|
|
72379
|
-
if (!operationType) {
|
|
72380
|
-
throw new HoudiniError({ filepath, message: "Could not find operation type" });
|
|
72381
|
-
}
|
|
72382
|
-
return operationType;
|
|
72383
|
-
}
|
|
72384
|
-
if (head.kind === "FragmentDefinition") {
|
|
72385
|
-
const result = schema.getType(head.typeCondition.name.value);
|
|
72386
|
-
if (!result) {
|
|
72387
|
-
throw new HoudiniError({
|
|
72388
|
-
filepath,
|
|
72389
|
-
message: `Could not find definition for ${head.typeCondition.name.value} in the schema`
|
|
72390
|
-
});
|
|
72391
|
-
}
|
|
72392
|
-
return result;
|
|
72393
|
-
}
|
|
72394
|
-
if (head.kind === "FragmentSpread") {
|
|
72395
|
-
throw new Error("How the hell did this happen?");
|
|
72396
|
-
}
|
|
72397
|
-
const parent2 = walkAncestors(schema, filepath, ancestors);
|
|
72398
|
-
if (head.kind === "InlineFragment") {
|
|
72399
|
-
if (!head.typeCondition) {
|
|
72400
|
-
return parent2;
|
|
72401
|
-
}
|
|
72402
|
-
const wrapper = schema.getType(head.typeCondition.name.value);
|
|
72403
|
-
if (!wrapper) {
|
|
72404
|
-
throw new HoudiniError({
|
|
72405
|
-
filepath,
|
|
72406
|
-
message: "Could not find type with name: " + head.typeCondition.name.value
|
|
72407
|
-
});
|
|
72408
|
-
}
|
|
72409
|
-
return wrapper;
|
|
72410
|
-
}
|
|
72411
|
-
if (head.kind === "SelectionSet") {
|
|
72412
|
-
return parent2;
|
|
72413
|
-
}
|
|
72414
|
-
const field = parent2.getFields()[head.name.value];
|
|
72415
|
-
if (!field) {
|
|
72416
|
-
throw new HoudiniError({
|
|
72417
|
-
filepath,
|
|
72418
|
-
message: `Could not find definition of ${head.name.value} in ${parent2.toString()}`
|
|
72419
|
-
});
|
|
72420
|
-
}
|
|
72421
|
-
return getRootType(field.type);
|
|
72422
|
-
}
|
|
72423
|
-
function definitionFromAncestors(ancestors) {
|
|
72424
|
-
let parents = [...ancestors];
|
|
72425
|
-
parents.shift();
|
|
72426
|
-
let definition = parents.shift();
|
|
72427
|
-
while (Array.isArray(definition) && definition) {
|
|
72428
|
-
definition = parents.shift();
|
|
72429
|
-
}
|
|
72430
|
-
return { parents, definition };
|
|
72431
|
-
}
|
|
72432
|
-
function formatErrors(e3, afterError) {
|
|
72433
|
-
const errors = Array.isArray(e3) ? e3 : [e3];
|
|
72434
|
-
for (const error of errors) {
|
|
72435
|
-
if ("filepath" in error && error.filepath) {
|
|
72436
|
-
const relative2 = relative(process.cwd(), error.filepath);
|
|
72437
|
-
console.error(`\u274C Encountered error in ${relative2}`);
|
|
72438
|
-
if (error.message) {
|
|
72439
|
-
console.error(error.message);
|
|
72440
|
-
}
|
|
72441
|
-
} else {
|
|
72442
|
-
console.error(`\u274C ${error.message}`);
|
|
72443
|
-
if ("description" in error && error.description) {
|
|
72444
|
-
console.error(`${error.description}`);
|
|
72445
|
-
}
|
|
72446
|
-
}
|
|
72447
|
-
afterError?.(e3);
|
|
72448
|
-
}
|
|
72449
|
-
}
|
|
72450
|
-
function unwrapType(config, type, wrappers = [], convertRuntimeScalars) {
|
|
72451
|
-
if (type.kind === "NonNullType") {
|
|
72452
|
-
return unwrapType(config, type.type, [TypeWrapper.NonNull, ...wrappers]);
|
|
72453
|
-
}
|
|
72454
|
-
if (type instanceof graphql5.GraphQLNonNull) {
|
|
72455
|
-
return unwrapType(config, type.ofType, [TypeWrapper.NonNull, ...wrappers]);
|
|
72456
|
-
}
|
|
72457
|
-
if (wrappers[0] !== TypeWrapper.NonNull) {
|
|
72458
|
-
wrappers.unshift(TypeWrapper.Nullable);
|
|
72459
|
-
}
|
|
72460
|
-
if (type.kind === "ListType") {
|
|
72461
|
-
return unwrapType(config, type.type, [TypeWrapper.List, ...wrappers]);
|
|
72462
|
-
}
|
|
72463
|
-
if (type instanceof graphql5.GraphQLList) {
|
|
72464
|
-
return unwrapType(config, type.ofType, [TypeWrapper.List, ...wrappers]);
|
|
72465
|
-
}
|
|
72466
|
-
if (convertRuntimeScalars && config.configFile.features?.runtimeScalars?.[type.name.value]) {
|
|
72467
|
-
type = config.schema.getType(
|
|
72468
|
-
config.configFile.features?.runtimeScalars?.[type.name.value].type
|
|
72469
|
-
);
|
|
72470
|
-
}
|
|
72471
|
-
const namedType = config.schema.getType(type.name.value || type.name);
|
|
72472
|
-
if (!namedType) {
|
|
72473
|
-
throw new Error("Unknown type: " + type.name.value || type.name);
|
|
72474
|
-
}
|
|
72475
|
-
return { type: namedType, wrappers };
|
|
72476
|
-
}
|
|
72477
|
-
function wrapType({
|
|
72478
|
-
type,
|
|
72479
|
-
wrappers
|
|
72480
|
-
}) {
|
|
72481
|
-
const head = wrappers[0];
|
|
72482
|
-
const tail = wrappers.slice(1);
|
|
72483
|
-
let kind = graphql5.Kind.NAMED_TYPE;
|
|
72484
|
-
if (head === TypeWrapper.List) {
|
|
72485
|
-
kind = graphql5.Kind.LIST_TYPE;
|
|
72486
|
-
} else if (head === TypeWrapper.NonNull) {
|
|
72487
|
-
kind = graphql5.Kind.NON_NULL_TYPE;
|
|
72488
|
-
}
|
|
72489
|
-
if (kind === "NamedType") {
|
|
72490
|
-
return {
|
|
72491
|
-
kind,
|
|
72492
|
-
name: {
|
|
72493
|
-
kind: graphql5.Kind.NAME,
|
|
72494
|
-
value: type.name
|
|
72495
|
-
}
|
|
72496
|
-
};
|
|
72497
|
-
}
|
|
72498
|
-
return {
|
|
72499
|
-
kind,
|
|
72500
|
-
type: wrapType({ type, wrappers: tail })
|
|
72501
|
-
};
|
|
72502
|
-
}
|
|
72503
|
-
var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
|
|
72504
|
-
TypeWrapper2["Nullable"] = "Nullable";
|
|
72505
|
-
TypeWrapper2["List"] = "List";
|
|
72506
|
-
TypeWrapper2["NonNull"] = "NonNull";
|
|
72507
|
-
return TypeWrapper2;
|
|
72508
|
-
})(TypeWrapper || {});
|
|
72509
|
-
|
|
72510
|
-
// src/lib/parse.ts
|
|
72511
|
-
var import_parser = __toESM(require_lib6(), 1);
|
|
72512
|
-
var import_recast = __toESM(require_main2(), 1);
|
|
72513
|
-
|
|
72514
|
-
// src/lib/deepMerge.ts
|
|
72515
|
-
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
72516
|
-
function deepMerge2(filepath, ...targets) {
|
|
72517
|
-
try {
|
|
72518
|
-
if (targets.length === 1) {
|
|
72519
|
-
return targets[0];
|
|
72520
|
-
} else if (targets.length === 2) {
|
|
72521
|
-
return (0, import_deepmerge.default)(targets[0], targets[1], {
|
|
72522
|
-
arrayMerge: (source, update) => [...new Set(source.concat(update))]
|
|
72523
|
-
});
|
|
72524
|
-
}
|
|
72525
|
-
return deepMerge2(filepath, targets[0], deepMerge2(filepath, ...targets.slice(1)));
|
|
72526
|
-
} catch (e3) {
|
|
72527
|
-
throw new HoudiniError({
|
|
72528
|
-
filepath,
|
|
72529
|
-
message: "could not merge: " + JSON.stringify(targets, null, 4),
|
|
72530
|
-
description: e3.message
|
|
72531
|
-
});
|
|
72532
|
-
}
|
|
72533
|
-
}
|
|
72534
|
-
|
|
72535
|
-
// src/lib/parse.ts
|
|
72536
|
-
function parseJS(str, config) {
|
|
72537
|
-
const defaultConfig = {
|
|
72538
|
-
plugins: [
|
|
72539
|
-
"typescript",
|
|
72540
|
-
"importAssertions",
|
|
72541
|
-
"decorators-legacy",
|
|
72542
|
-
"explicitResourceManagement"
|
|
72543
|
-
],
|
|
72544
|
-
sourceType: "module"
|
|
72545
|
-
};
|
|
72546
|
-
return (0, import_parser.parse)(str || "", config ? deepMerge2("", defaultConfig, config) : defaultConfig).program;
|
|
72547
|
-
}
|
|
72548
|
-
function parseJSON(str) {
|
|
72549
|
-
str = str.replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g, (m3, g3) => g3 ? "" : m3);
|
|
72550
|
-
return JSON.parse(str);
|
|
72551
|
-
}
|
|
72552
|
-
async function printJS(script, options) {
|
|
72553
|
-
if (options?.pretty) {
|
|
72554
|
-
return (0, import_recast.prettyPrint)(script, options);
|
|
72555
|
-
} else {
|
|
72556
|
-
return (0, import_recast.print)(script, options);
|
|
72557
|
-
}
|
|
72558
|
-
}
|
|
72559
|
-
|
|
72560
72434
|
// src/lib/imports.ts
|
|
72561
72435
|
var recast = __toESM(require_main2(), 1);
|
|
72562
72436
|
var AST2 = recast.types.builders;
|
|
@@ -72619,7 +72493,7 @@ async function cleanupFiles(pathFolder, listOfObj) {
|
|
|
72619
72493
|
// src/lib/detectTools.ts
|
|
72620
72494
|
async function detectFromPackageJSON(cwd) {
|
|
72621
72495
|
try {
|
|
72622
|
-
const packageJSONFile = await
|
|
72496
|
+
const packageJSONFile = await readFile(join2(cwd, "package.json"));
|
|
72623
72497
|
if (packageJSONFile) {
|
|
72624
72498
|
var packageJSON2 = JSON.parse(packageJSONFile);
|
|
72625
72499
|
} else {
|
|
@@ -72644,22 +72518,22 @@ async function detectFromPackageJSON(cwd) {
|
|
|
72644
72518
|
async function detectTools(cwd = process.cwd()) {
|
|
72645
72519
|
let typescript = false;
|
|
72646
72520
|
try {
|
|
72647
|
-
await
|
|
72521
|
+
await stat(join2(cwd, "tsconfig.json"));
|
|
72648
72522
|
typescript = true;
|
|
72649
72523
|
} catch {
|
|
72650
72524
|
}
|
|
72651
72525
|
let package_manager = "npm";
|
|
72652
72526
|
let dir = cwd;
|
|
72653
72527
|
do {
|
|
72654
|
-
if (
|
|
72528
|
+
if (existsSync(join2(dir, "pnpm-lock.yaml"))) {
|
|
72655
72529
|
package_manager = "pnpm";
|
|
72656
72530
|
break;
|
|
72657
72531
|
}
|
|
72658
|
-
if (
|
|
72532
|
+
if (existsSync(join2(dir, "yarn.lock"))) {
|
|
72659
72533
|
package_manager = "yarn";
|
|
72660
72534
|
break;
|
|
72661
72535
|
}
|
|
72662
|
-
} while (dir !== (dir =
|
|
72536
|
+
} while (dir !== (dir = dirname(dir)));
|
|
72663
72537
|
return {
|
|
72664
72538
|
typescript,
|
|
72665
72539
|
package_manager,
|
|
@@ -72736,18 +72610,18 @@ function scalarPropertyValue(config, filepath, missingScalars, target, body, fie
|
|
|
72736
72610
|
return AST3.tsNeverKeyword();
|
|
72737
72611
|
}
|
|
72738
72612
|
const component = config.componentFields[field.parent][field.field];
|
|
72739
|
-
const sourcePathRelative =
|
|
72740
|
-
|
|
72613
|
+
const sourcePathRelative = relative(
|
|
72614
|
+
join2(config.projectRoot, "src"),
|
|
72741
72615
|
component.filepath
|
|
72742
72616
|
);
|
|
72743
|
-
let sourcePathParsed =
|
|
72744
|
-
let sourcePath =
|
|
72617
|
+
let sourcePathParsed = parse3(sourcePathRelative);
|
|
72618
|
+
let sourcePath = join2(sourcePathParsed.dir, sourcePathParsed.name);
|
|
72745
72619
|
const localImport = ensureImports({
|
|
72746
72620
|
config,
|
|
72747
72621
|
body,
|
|
72748
72622
|
import: "__component__" + component.fragment,
|
|
72749
|
-
sourceModule:
|
|
72750
|
-
|
|
72623
|
+
sourceModule: join2(
|
|
72624
|
+
relative(dirname(filepath), config.projectRoot),
|
|
72751
72625
|
"src",
|
|
72752
72626
|
sourcePath
|
|
72753
72627
|
)
|
|
@@ -75665,6 +75539,16 @@ async function generatePluginIndex({
|
|
|
75665
75539
|
}
|
|
75666
75540
|
|
|
75667
75541
|
// src/codegen/generators/runtime/pluginRuntime.ts
|
|
75542
|
+
function moduleStatments(config) {
|
|
75543
|
+
const importStatement = config.module === "commonjs" ? importDefaultFrom : (where, as) => `import ${as} from '${where}'`;
|
|
75544
|
+
const exportDefaultStatement = config.module === "commonjs" ? exportDefault : (as) => `export default ${as}`;
|
|
75545
|
+
const exportStarStatement = config.module === "commonjs" ? exportStarFrom : (where) => `export * from '${where}'`;
|
|
75546
|
+
return {
|
|
75547
|
+
importStatement,
|
|
75548
|
+
exportDefaultStatement,
|
|
75549
|
+
exportStarStatement
|
|
75550
|
+
};
|
|
75551
|
+
}
|
|
75668
75552
|
async function generatePluginRuntimes({
|
|
75669
75553
|
config,
|
|
75670
75554
|
docs
|
|
@@ -75680,7 +75564,7 @@ async function generatePluginRuntimes({
|
|
|
75680
75564
|
return;
|
|
75681
75565
|
}
|
|
75682
75566
|
try {
|
|
75683
|
-
await
|
|
75567
|
+
await stat(runtime_path);
|
|
75684
75568
|
} catch {
|
|
75685
75569
|
throw new HoudiniError({
|
|
75686
75570
|
message: "Cannot find runtime to generate for " + plugin2.name,
|
|
@@ -75692,13 +75576,13 @@ async function generatePluginRuntimes({
|
|
|
75692
75576
|
if (transformMap && typeof transformMap === "function") {
|
|
75693
75577
|
transformMap = transformMap(docs, { config });
|
|
75694
75578
|
}
|
|
75695
|
-
await
|
|
75696
|
-
await
|
|
75579
|
+
await mkdirp(pluginDir);
|
|
75580
|
+
await recursiveCopy(
|
|
75697
75581
|
runtime_path,
|
|
75698
75582
|
pluginDir,
|
|
75699
75583
|
Object.fromEntries(
|
|
75700
75584
|
Object.entries(transformMap).map(([key, value]) => [
|
|
75701
|
-
|
|
75585
|
+
join2(runtime_path, key),
|
|
75702
75586
|
(content) => value({
|
|
75703
75587
|
config,
|
|
75704
75588
|
content,
|
|
@@ -75745,21 +75629,21 @@ async function runtimeGenerator(config, docs) {
|
|
|
75745
75629
|
exportStarStatement: exportStar
|
|
75746
75630
|
} = moduleStatments(config);
|
|
75747
75631
|
await Promise.all([
|
|
75748
|
-
|
|
75749
|
-
[
|
|
75632
|
+
recursiveCopy(config.runtimeSource, config.runtimeDirectory, {
|
|
75633
|
+
[join2(config.runtimeSource, "lib", "constants.js")]: (content) => {
|
|
75750
75634
|
return content.replace("SITE_URL", siteURL);
|
|
75751
75635
|
},
|
|
75752
|
-
[
|
|
75636
|
+
[join2(config.runtimeSource, "imports", "pluginConfig.js")]: (content) => {
|
|
75753
75637
|
return injectConfig({ config, importStatement, exportStatement, content });
|
|
75754
75638
|
},
|
|
75755
|
-
[
|
|
75756
|
-
const configFilePath =
|
|
75757
|
-
const relativePath =
|
|
75639
|
+
[join2(config.runtimeSource, "imports", "config.js")]: (content) => {
|
|
75640
|
+
const configFilePath = join2(config.runtimeDirectory, "imports", "config.js");
|
|
75641
|
+
const relativePath = relative(dirname(configFilePath), config.filepath);
|
|
75758
75642
|
return `${importStatement(relativePath, "config")}
|
|
75759
75643
|
${exportStatement("config")}
|
|
75760
75644
|
`;
|
|
75761
75645
|
},
|
|
75762
|
-
[
|
|
75646
|
+
[join2(config.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config, content, importStatement, exportStatement })
|
|
75763
75647
|
}),
|
|
75764
75648
|
generatePluginRuntimes({
|
|
75765
75649
|
config,
|
|
@@ -75769,16 +75653,6 @@ ${exportStatement("config")}
|
|
|
75769
75653
|
]);
|
|
75770
75654
|
await generateGraphqlReturnTypes(config, docs);
|
|
75771
75655
|
}
|
|
75772
|
-
function moduleStatments(config) {
|
|
75773
|
-
const importStatement = config.module === "commonjs" ? importDefaultFrom : (where, as) => `import ${as} from '${where}'`;
|
|
75774
|
-
const exportDefaultStatement = config.module === "commonjs" ? exportDefault : (as) => `export default ${as}`;
|
|
75775
|
-
const exportStarStatement = config.module === "commonjs" ? exportStarFrom : (where) => `export * from '${where}'`;
|
|
75776
|
-
return {
|
|
75777
|
-
importStatement,
|
|
75778
|
-
exportDefaultStatement,
|
|
75779
|
-
exportStarStatement
|
|
75780
|
-
};
|
|
75781
|
-
}
|
|
75782
75656
|
|
|
75783
75657
|
// src/codegen/generators/typescript/documentTypes.ts
|
|
75784
75658
|
var recast11 = __toESM(require_main2(), 1);
|
|
@@ -82418,12 +82292,12 @@ async function packageJSON(targetPath, frameworkInfo) {
|
|
|
82418
82292
|
}
|
|
82419
82293
|
packageJSON2.devDependencies = {
|
|
82420
82294
|
...packageJSON2.devDependencies,
|
|
82421
|
-
houdini: "^1.5.
|
|
82295
|
+
houdini: "^1.5.4"
|
|
82422
82296
|
};
|
|
82423
82297
|
if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
|
|
82424
82298
|
packageJSON2.devDependencies = {
|
|
82425
82299
|
...packageJSON2.devDependencies,
|
|
82426
|
-
"houdini-svelte": "^2.1.
|
|
82300
|
+
"houdini-svelte": "^2.1.8"
|
|
82427
82301
|
};
|
|
82428
82302
|
} else {
|
|
82429
82303
|
throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
|