houdini 1.0.0-next.5 → 1.0.0-next.6
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 +130 -121
- package/build/cmd-esm/index.js +130 -121
- package/build/codegen/generators/artifacts/index.d.ts +2 -2
- package/build/codegen/generators/artifacts/indexFile.d.ts +2 -2
- package/build/codegen/generators/artifacts/selection.d.ts +2 -2
- package/build/codegen/generators/indexFile/index.d.ts +2 -2
- package/build/codegen/generators/persistedQueries/index.d.ts +2 -2
- package/build/codegen/generators/runtime/graphqlFunction.d.ts +2 -2
- package/build/codegen/generators/runtime/index.d.ts +2 -2
- package/build/codegen/generators/typescript/documentTypes.d.ts +2 -2
- package/build/codegen/generators/typescript/imperativeTypeDef.d.ts +2 -2
- package/build/codegen/generators/typescript/index.d.ts +2 -2
- package/build/codegen/index.d.ts +2 -2
- package/build/codegen/transforms/addID.d.ts +2 -2
- package/build/codegen/transforms/composeQueries.d.ts +4 -4
- package/build/codegen/transforms/fragmentVariables.d.ts +2 -2
- package/build/codegen/transforms/list.d.ts +2 -2
- package/build/codegen/transforms/paginate.d.ts +2 -2
- package/build/codegen/transforms/schema.d.ts +2 -2
- package/build/codegen/transforms/typename.d.ts +2 -2
- package/build/codegen/validators/noIDAlias.d.ts +2 -2
- package/build/codegen/validators/plugins.d.ts +2 -2
- package/build/codegen/validators/typeCheck.d.ts +2 -2
- package/build/codegen/validators/uniqueNames.d.ts +2 -2
- package/build/codegen-cjs/index.js +127 -118
- package/build/codegen-esm/index.js +127 -118
- package/build/lib/graphql.d.ts +2 -2
- package/build/lib/types.d.ts +35 -35
- package/build/lib-cjs/index.js +1 -1
- package/build/lib-esm/index.js +1 -1
- package/build/test/index.d.ts +3 -3
- package/build/test-cjs/index.js +125 -116
- package/build/test-esm/index.js +125 -116
- package/build/vite-cjs/index.js +130 -121
- package/build/vite-esm/index.js +130 -121
- package/package.json +1 -1
package/build/test-esm/index.js
CHANGED
|
@@ -55497,7 +55497,7 @@ async function fragmentVariables(config2, documents) {
|
|
|
55497
55497
|
name: "generated::fragmentVariables",
|
|
55498
55498
|
kind: "HoudiniFragment" /* Fragment */,
|
|
55499
55499
|
document: doc,
|
|
55500
|
-
|
|
55500
|
+
originalParsed: doc,
|
|
55501
55501
|
generateStore: false,
|
|
55502
55502
|
generateArtifact: false,
|
|
55503
55503
|
filename: "generated::fragmentVariables",
|
|
@@ -56420,7 +56420,7 @@ async function paginate(config2, documents) {
|
|
|
56420
56420
|
filename: doc.filename,
|
|
56421
56421
|
name: refetchQueryName,
|
|
56422
56422
|
document: queryDoc,
|
|
56423
|
-
|
|
56423
|
+
originalParsed: queryDoc,
|
|
56424
56424
|
generateArtifact: true,
|
|
56425
56425
|
generateStore: false,
|
|
56426
56426
|
refetch: doc.refetch,
|
|
@@ -56840,7 +56840,7 @@ async function addListFragments(config2, documents) {
|
|
|
56840
56840
|
generateArtifact: false,
|
|
56841
56841
|
generateStore: false,
|
|
56842
56842
|
document: generatedDoc,
|
|
56843
|
-
|
|
56843
|
+
originalParsed: generatedDoc,
|
|
56844
56844
|
filename: "generated::lists",
|
|
56845
56845
|
originalString: "",
|
|
56846
56846
|
artifact: null
|
|
@@ -57368,11 +57368,11 @@ function artifactGenerator(stats) {
|
|
|
57368
57368
|
};
|
|
57369
57369
|
const plugin_data = config2.plugins.reduce(
|
|
57370
57370
|
(prev, plugin2) => {
|
|
57371
|
-
if (!plugin2.
|
|
57371
|
+
if (!plugin2.artifactData) {
|
|
57372
57372
|
return prev;
|
|
57373
57373
|
}
|
|
57374
57374
|
const result = { ...prev };
|
|
57375
|
-
const dataToAdd = plugin2.
|
|
57375
|
+
const dataToAdd = plugin2.artifactData({ config: config2, document: doc }) ?? {};
|
|
57376
57376
|
if (Object.keys(dataToAdd).length > 0) {
|
|
57377
57377
|
result[plugin2.name] = dataToAdd;
|
|
57378
57378
|
}
|
|
@@ -57417,10 +57417,10 @@ function artifactGenerator(stats) {
|
|
|
57417
57417
|
}
|
|
57418
57418
|
doc.artifact = artifact;
|
|
57419
57419
|
for (const plugin2 of config2.plugins) {
|
|
57420
|
-
if (!plugin2.
|
|
57420
|
+
if (!plugin2.artifactEnd) {
|
|
57421
57421
|
continue;
|
|
57422
57422
|
}
|
|
57423
|
-
plugin2.
|
|
57423
|
+
plugin2.artifactEnd({ config: config2, document: doc });
|
|
57424
57424
|
}
|
|
57425
57425
|
const file = AST5.program([
|
|
57426
57426
|
moduleExport(config2, "default", serializeValue(artifact)),
|
|
@@ -57460,18 +57460,18 @@ async function generateGraphqlReturnTypes(config2, docs) {
|
|
|
57460
57460
|
const indexPath = path_exports.join(config2.runtimeDirectory, "index.d.ts");
|
|
57461
57461
|
const fileContent = await fs_exports.readFile(indexPath) || "";
|
|
57462
57462
|
const contents = await parseJS(fileContent);
|
|
57463
|
-
const
|
|
57464
|
-
(plugin2) => plugin2.
|
|
57465
|
-
)?.
|
|
57466
|
-
if (!
|
|
57463
|
+
const graphqlTagReturn = config2.plugins.find(
|
|
57464
|
+
(plugin2) => plugin2.graphqlTagReturn
|
|
57465
|
+
)?.graphqlTagReturn;
|
|
57466
|
+
if (!graphqlTagReturn || !contents) {
|
|
57467
57467
|
return fileContent;
|
|
57468
57468
|
}
|
|
57469
57469
|
const overloaded_returns = {};
|
|
57470
57470
|
for (const doc of docs) {
|
|
57471
|
-
const return_value =
|
|
57471
|
+
const return_value = graphqlTagReturn({
|
|
57472
57472
|
config: config2,
|
|
57473
57473
|
document: doc,
|
|
57474
|
-
|
|
57474
|
+
ensureImport({ identifier, module }) {
|
|
57475
57475
|
ensureImports({
|
|
57476
57476
|
config: config2,
|
|
57477
57477
|
body: contents.script.body,
|
|
@@ -57519,18 +57519,18 @@ async function injectPlugins({
|
|
|
57519
57519
|
importStatement,
|
|
57520
57520
|
exportStatement
|
|
57521
57521
|
}) {
|
|
57522
|
-
const
|
|
57523
|
-
let plugins = plugin2.
|
|
57522
|
+
const clientPlugins = config2.plugins.filter((plugin2) => plugin2.clientPlugins).reduce((acc, plugin2) => {
|
|
57523
|
+
let plugins = plugin2.clientPlugins;
|
|
57524
57524
|
if (typeof plugins === "function") {
|
|
57525
57525
|
plugins = plugins(config2, config2.pluginConfig(plugin2.name));
|
|
57526
57526
|
}
|
|
57527
57527
|
return [...acc, ...Object.entries(plugins)];
|
|
57528
57528
|
}, []);
|
|
57529
|
-
return
|
|
57530
|
-
${
|
|
57529
|
+
return clientPlugins.length > 0 ? `
|
|
57530
|
+
${clientPlugins.map((plugin2, i) => importStatement(plugin2[0], `plugin${i}`))}
|
|
57531
57531
|
|
|
57532
57532
|
const plugins = [
|
|
57533
|
-
${
|
|
57533
|
+
${clientPlugins.map((plugin2, i) => {
|
|
57534
57534
|
const suffix = `(${JSON.stringify(plugin2[1])})`;
|
|
57535
57535
|
return `plugin${i}${suffix}`;
|
|
57536
57536
|
}).join(",\n")}
|
|
@@ -57574,18 +57574,18 @@ ${exportStatement("config")}
|
|
|
57574
57574
|
},
|
|
57575
57575
|
[path_exports.join(config2.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config: config2, content, importStatement, exportStatement })
|
|
57576
57576
|
}),
|
|
57577
|
-
...config2.plugins.filter((plugin2) => plugin2.
|
|
57577
|
+
...config2.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config2, plugin2)),
|
|
57578
57578
|
generatePluginIndex({ config: config2, exportStatement: exportStar })
|
|
57579
57579
|
]);
|
|
57580
57580
|
await generateGraphqlReturnTypes(config2, docs);
|
|
57581
57581
|
}
|
|
57582
57582
|
async function generatePluginRuntime(config2, plugin2) {
|
|
57583
|
-
if (houdini_mode.is_testing || !plugin2.
|
|
57583
|
+
if (houdini_mode.is_testing || !plugin2.includeRuntime) {
|
|
57584
57584
|
return;
|
|
57585
57585
|
}
|
|
57586
57586
|
const runtime_path = path_exports.join(
|
|
57587
57587
|
path_exports.dirname(plugin2.filepath),
|
|
57588
|
-
typeof plugin2.
|
|
57588
|
+
typeof plugin2.includeRuntime === "string" ? plugin2.includeRuntime : plugin2.includeRuntime[config2.module]
|
|
57589
57589
|
);
|
|
57590
57590
|
try {
|
|
57591
57591
|
await fs_exports.stat(runtime_path);
|
|
@@ -57601,7 +57601,7 @@ async function generatePluginRuntime(config2, plugin2) {
|
|
|
57601
57601
|
runtime_path,
|
|
57602
57602
|
pluginDir,
|
|
57603
57603
|
Object.fromEntries(
|
|
57604
|
-
Object.entries(plugin2.
|
|
57604
|
+
Object.entries(plugin2.transformRuntime ?? {}).map(([key, value]) => [
|
|
57605
57605
|
path_exports.join(runtime_path, key),
|
|
57606
57606
|
(content) => value({ config: config2, content })
|
|
57607
57607
|
])
|
|
@@ -57995,7 +57995,7 @@ async function generateDocumentTypes(config2, docs) {
|
|
|
57995
57995
|
const typePaths = [];
|
|
57996
57996
|
const fragmentDefinitions = {};
|
|
57997
57997
|
for (const document of docs) {
|
|
57998
|
-
for (const defn of document.
|
|
57998
|
+
for (const defn of document.originalParsed.definitions.filter(
|
|
57999
57999
|
({ kind }) => kind === "FragmentDefinition"
|
|
58000
58000
|
)) {
|
|
58001
58001
|
fragmentDefinitions[defn.name.value] = defn;
|
|
@@ -58003,47 +58003,54 @@ async function generateDocumentTypes(config2, docs) {
|
|
|
58003
58003
|
}
|
|
58004
58004
|
const missingScalars = /* @__PURE__ */ new Set();
|
|
58005
58005
|
await Promise.all(
|
|
58006
|
-
docs.map(
|
|
58007
|
-
|
|
58008
|
-
|
|
58009
|
-
|
|
58010
|
-
|
|
58011
|
-
|
|
58012
|
-
|
|
58013
|
-
|
|
58014
|
-
|
|
58015
|
-
|
|
58016
|
-
|
|
58017
|
-
|
|
58018
|
-
|
|
58019
|
-
|
|
58020
|
-
|
|
58021
|
-
applyFragments: definition.kind === "OperationDefinition"
|
|
58022
|
-
});
|
|
58023
|
-
if (definition?.kind === "OperationDefinition") {
|
|
58024
|
-
await generateOperationTypeDefs(
|
|
58025
|
-
config2,
|
|
58026
|
-
filename,
|
|
58027
|
-
program.body,
|
|
58028
|
-
definition,
|
|
58029
|
-
selections,
|
|
58030
|
-
visitedTypes,
|
|
58031
|
-
missingScalars
|
|
58032
|
-
);
|
|
58033
|
-
} else {
|
|
58034
|
-
await generateFragmentTypeDefs(
|
|
58035
|
-
config2,
|
|
58036
|
-
filename,
|
|
58037
|
-
program.body,
|
|
58038
|
-
selections,
|
|
58039
|
-
originalDocument.definitions,
|
|
58040
|
-
visitedTypes,
|
|
58041
|
-
missingScalars
|
|
58006
|
+
docs.map(
|
|
58007
|
+
async ({
|
|
58008
|
+
originalParsed: originalDocument,
|
|
58009
|
+
name,
|
|
58010
|
+
filename,
|
|
58011
|
+
generateArtifact
|
|
58012
|
+
}) => {
|
|
58013
|
+
if (!generateArtifact) {
|
|
58014
|
+
return;
|
|
58015
|
+
}
|
|
58016
|
+
const typeDefPath = config2.artifactTypePath(originalDocument);
|
|
58017
|
+
const program = AST11.program([]);
|
|
58018
|
+
const visitedTypes = /* @__PURE__ */ new Set();
|
|
58019
|
+
let definition = originalDocument.definitions.find(
|
|
58020
|
+
(def) => (def.kind === "OperationDefinition" || def.kind === "FragmentDefinition") && def.name?.value === name
|
|
58042
58021
|
);
|
|
58022
|
+
const selections = flattenSelections({
|
|
58023
|
+
config: config2,
|
|
58024
|
+
filepath: filename,
|
|
58025
|
+
selections: definition.selectionSet.selections,
|
|
58026
|
+
fragmentDefinitions,
|
|
58027
|
+
applyFragments: definition.kind === "OperationDefinition"
|
|
58028
|
+
});
|
|
58029
|
+
if (definition?.kind === "OperationDefinition") {
|
|
58030
|
+
await generateOperationTypeDefs(
|
|
58031
|
+
config2,
|
|
58032
|
+
filename,
|
|
58033
|
+
program.body,
|
|
58034
|
+
definition,
|
|
58035
|
+
selections,
|
|
58036
|
+
visitedTypes,
|
|
58037
|
+
missingScalars
|
|
58038
|
+
);
|
|
58039
|
+
} else {
|
|
58040
|
+
await generateFragmentTypeDefs(
|
|
58041
|
+
config2,
|
|
58042
|
+
filename,
|
|
58043
|
+
program.body,
|
|
58044
|
+
selections,
|
|
58045
|
+
originalDocument.definitions,
|
|
58046
|
+
visitedTypes,
|
|
58047
|
+
missingScalars
|
|
58048
|
+
);
|
|
58049
|
+
}
|
|
58050
|
+
await fs_exports.writeFile(typeDefPath, recast11.print(program).code);
|
|
58051
|
+
typePaths.push(typeDefPath);
|
|
58043
58052
|
}
|
|
58044
|
-
|
|
58045
|
-
typePaths.push(typeDefPath);
|
|
58046
|
-
})
|
|
58053
|
+
)
|
|
58047
58054
|
);
|
|
58048
58055
|
const typeIndex = AST11.program(
|
|
58049
58056
|
typePaths.sort((a, b) => a.localeCompare(b)).map((typePath) => {
|
|
@@ -58058,28 +58065,28 @@ async function generateDocumentTypes(config2, docs) {
|
|
|
58058
58065
|
AST11.exportAllDeclaration(AST11.literal("./graphql"), null)
|
|
58059
58066
|
])
|
|
58060
58067
|
);
|
|
58061
|
-
const
|
|
58068
|
+
const exportDefaultAs = ({ module, as }) => `
|
|
58062
58069
|
export { default as ${as} } from "${module}"
|
|
58063
58070
|
`;
|
|
58064
|
-
const
|
|
58071
|
+
const exportStarFrom2 = ({ module }) => `
|
|
58065
58072
|
export * from "${module}"
|
|
58066
58073
|
`;
|
|
58067
58074
|
let indexContent = recast11.print(typeIndex).code;
|
|
58068
58075
|
for (const plugin2 of config2.plugins) {
|
|
58069
|
-
if (!plugin2.
|
|
58076
|
+
if (!plugin2.indexFile) {
|
|
58070
58077
|
continue;
|
|
58071
58078
|
}
|
|
58072
|
-
indexContent = plugin2.
|
|
58079
|
+
indexContent = plugin2.indexFile({
|
|
58073
58080
|
config: config2,
|
|
58074
58081
|
content: indexContent,
|
|
58075
|
-
|
|
58076
|
-
|
|
58077
|
-
|
|
58082
|
+
exportDefaultAs,
|
|
58083
|
+
exportStarFrom: exportStarFrom2,
|
|
58084
|
+
pluginRoot: config2.pluginDirectory(plugin2.name),
|
|
58078
58085
|
typedef: true,
|
|
58079
58086
|
documents: docs
|
|
58080
58087
|
});
|
|
58081
|
-
if (plugin2.
|
|
58082
|
-
indexContent +=
|
|
58088
|
+
if (plugin2.includeRuntime) {
|
|
58089
|
+
indexContent += exportStarFrom2({
|
|
58083
58090
|
module: "./" + path_exports.relative(config2.rootDir, config2.pluginRuntimeDirectory(plugin2.name))
|
|
58084
58091
|
});
|
|
58085
58092
|
}
|
|
@@ -58326,10 +58333,10 @@ var graphql17 = __toESM(require_graphql2(), 1);
|
|
|
58326
58333
|
var recast12 = __toESM(require_main2(), 1);
|
|
58327
58334
|
var AST12 = recast12.types.builders;
|
|
58328
58335
|
async function imperativeCacheTypef(config2, docs) {
|
|
58329
|
-
const returnType = (doc) => config2.plugins.find((plugin2) => plugin2.
|
|
58336
|
+
const returnType = (doc) => config2.plugins.find((plugin2) => plugin2.graphqlTagReturn)?.graphqlTagReturn?.({
|
|
58330
58337
|
config: config2,
|
|
58331
58338
|
document: doc,
|
|
58332
|
-
|
|
58339
|
+
ensureImport({ identifier, module }) {
|
|
58333
58340
|
ensureImports({
|
|
58334
58341
|
config: config2,
|
|
58335
58342
|
body,
|
|
@@ -58700,27 +58707,30 @@ async function persistOutputGenerator(config2, docs) {
|
|
|
58700
58707
|
console.log("Can only write the queryMap to a json file");
|
|
58701
58708
|
return;
|
|
58702
58709
|
}
|
|
58703
|
-
const queryMap = docs.reduce(
|
|
58704
|
-
|
|
58705
|
-
|
|
58706
|
-
|
|
58707
|
-
|
|
58708
|
-
graphql18.
|
|
58709
|
-
|
|
58710
|
-
|
|
58711
|
-
|
|
58710
|
+
const queryMap = docs.reduce(
|
|
58711
|
+
(acc, { document, generateArtifact }) => {
|
|
58712
|
+
if (!generateArtifact) {
|
|
58713
|
+
return acc;
|
|
58714
|
+
}
|
|
58715
|
+
let rawString = graphql18.print(
|
|
58716
|
+
graphql18.visit(document, {
|
|
58717
|
+
Directive(node) {
|
|
58718
|
+
if (config2.isInternalDirective(node.name.value)) {
|
|
58719
|
+
return null;
|
|
58720
|
+
}
|
|
58712
58721
|
}
|
|
58713
|
-
}
|
|
58714
|
-
|
|
58715
|
-
|
|
58716
|
-
|
|
58717
|
-
|
|
58718
|
-
|
|
58719
|
-
|
|
58720
|
-
|
|
58721
|
-
|
|
58722
|
-
|
|
58723
|
-
|
|
58722
|
+
})
|
|
58723
|
+
);
|
|
58724
|
+
const operations = document.definitions.filter(
|
|
58725
|
+
({ kind }) => kind === graphql18.Kind.OPERATION_DEFINITION
|
|
58726
|
+
);
|
|
58727
|
+
if (operations.length > 0 && operations[0].kind === "OperationDefinition") {
|
|
58728
|
+
acc[hashDocument({ config: config2, document: rawString })] = rawString;
|
|
58729
|
+
}
|
|
58730
|
+
return acc;
|
|
58731
|
+
},
|
|
58732
|
+
{}
|
|
58733
|
+
);
|
|
58724
58734
|
if (Object.keys(queryMap).length === 0)
|
|
58725
58735
|
return;
|
|
58726
58736
|
await fs_exports.writeFile(config2.persistedQueryPath, JSON.stringify(queryMap, null, 4));
|
|
@@ -58789,32 +58799,32 @@ async function writeIndexFile2(config2, docs) {
|
|
|
58789
58799
|
const definitionsDir = relative2(config2.definitionsDirectory);
|
|
58790
58800
|
const cjs = config2.module === "commonjs";
|
|
58791
58801
|
let body = cjs ? cjsIndexFilePreamble : "";
|
|
58792
|
-
const
|
|
58793
|
-
const
|
|
58802
|
+
const exportStar = ({ module }) => "\n" + (cjs ? exportStarFrom(module) : `export * from "${module}"`) + "\n";
|
|
58803
|
+
const exportDefaultAs = ({ module, as }) => "\n" + (cjs ? exportDefaultFrom(module, as) : `export { default as ${as} } from "${module}"`) + "\n";
|
|
58794
58804
|
body += [
|
|
58795
|
-
|
|
58796
|
-
|
|
58797
|
-
|
|
58798
|
-
|
|
58805
|
+
exportStar({ module: "./" + path_exports.join(runtimeDir, "client") }),
|
|
58806
|
+
exportStar({ module: runtimeDir }),
|
|
58807
|
+
exportStar({ module: artifactDir }),
|
|
58808
|
+
exportStar({ module: definitionsDir })
|
|
58799
58809
|
].join("");
|
|
58800
58810
|
for (const plugin2 of config2.plugins) {
|
|
58801
|
-
if (plugin2.
|
|
58802
|
-
body = plugin2.
|
|
58811
|
+
if (plugin2.indexFile) {
|
|
58812
|
+
body = plugin2.indexFile({
|
|
58803
58813
|
config: config2,
|
|
58804
58814
|
content: body,
|
|
58805
|
-
|
|
58806
|
-
|
|
58807
|
-
|
|
58815
|
+
exportDefaultAs,
|
|
58816
|
+
exportStarFrom: exportStar,
|
|
58817
|
+
pluginRoot: config2.pluginDirectory(plugin2.name),
|
|
58808
58818
|
typedef: false,
|
|
58809
58819
|
documents: docs
|
|
58810
58820
|
});
|
|
58811
58821
|
}
|
|
58812
|
-
if (plugin2.
|
|
58813
|
-
body +=
|
|
58822
|
+
if (plugin2.includeRuntime) {
|
|
58823
|
+
body += exportStar({
|
|
58814
58824
|
module: relative2(config2.pluginRuntimeDirectory(plugin2.name))
|
|
58815
58825
|
});
|
|
58816
58826
|
}
|
|
58817
|
-
if (!plugin2.
|
|
58827
|
+
if (!plugin2.indexFile) {
|
|
58818
58828
|
continue;
|
|
58819
58829
|
}
|
|
58820
58830
|
}
|
|
@@ -59858,10 +59868,10 @@ async function runPipeline2(config2, docs) {
|
|
|
59858
59868
|
deleted: []
|
|
59859
59869
|
};
|
|
59860
59870
|
const generatePlugins = config2.plugins.filter((plugin2) => plugin2.generate);
|
|
59861
|
-
const
|
|
59871
|
+
const afterValidate = config2.plugins.filter((plugin2) => plugin2.afterValidate).map((plugin2) => plugin2.afterValidate);
|
|
59862
59872
|
const validate2 = config2.plugins.filter((plugin2) => plugin2.validate).map((plugin2) => plugin2.validate);
|
|
59863
|
-
const
|
|
59864
|
-
const
|
|
59873
|
+
const beforeValidate = config2.plugins.filter((plugin2) => plugin2.beforeValidate).map((plugin2) => plugin2.beforeValidate);
|
|
59874
|
+
const beforeGenerate = config2.plugins.filter((plugin2) => plugin2.beforeGenerate).map((plugin2) => plugin2.beforeGenerate);
|
|
59865
59875
|
const wrapHook = (hooks) => hooks.map(
|
|
59866
59876
|
(fn) => (config3, docs2) => fn({
|
|
59867
59877
|
config: config3,
|
|
@@ -59874,20 +59884,20 @@ async function runPipeline2(config2, docs) {
|
|
|
59874
59884
|
config2,
|
|
59875
59885
|
[
|
|
59876
59886
|
graphqlExtensions,
|
|
59877
|
-
...wrapHook(
|
|
59887
|
+
...wrapHook(beforeValidate),
|
|
59878
59888
|
typeCheck,
|
|
59879
59889
|
uniqueDocumentNames,
|
|
59880
59890
|
noIDAlias,
|
|
59881
59891
|
validatePlugins,
|
|
59882
59892
|
...wrapHook(validate2),
|
|
59883
|
-
...wrapHook(
|
|
59893
|
+
...wrapHook(afterValidate),
|
|
59884
59894
|
addID,
|
|
59885
59895
|
addTypename,
|
|
59886
59896
|
addListFragments,
|
|
59887
59897
|
paginate,
|
|
59888
59898
|
fragmentVariables,
|
|
59889
59899
|
includeFragmentDefinitions,
|
|
59890
|
-
...wrapHook(
|
|
59900
|
+
...wrapHook(beforeGenerate),
|
|
59891
59901
|
artifactGenerator(artifactStats),
|
|
59892
59902
|
runtimeGenerator,
|
|
59893
59903
|
writeIndexFile2,
|
|
@@ -59898,14 +59908,13 @@ async function runPipeline2(config2, docs) {
|
|
|
59898
59908
|
(plugin2) => async (config3, docs2) => await plugin2.generate({
|
|
59899
59909
|
config: config3,
|
|
59900
59910
|
documents: docs2,
|
|
59901
|
-
|
|
59911
|
+
pluginRoot: config3.pluginDirectory(plugin2.name)
|
|
59902
59912
|
})
|
|
59903
59913
|
)
|
|
59904
59914
|
],
|
|
59905
59915
|
docs
|
|
59906
59916
|
);
|
|
59907
59917
|
} catch (e) {
|
|
59908
|
-
console.log(e);
|
|
59909
59918
|
error = e;
|
|
59910
59919
|
}
|
|
59911
59920
|
const unchanged = artifactStats.total.length - artifactStats.changed.length - artifactStats.new.length - artifactStats.deleted.length;
|
|
@@ -60272,7 +60281,7 @@ function mockCollectedDoc(query) {
|
|
|
60272
60281
|
name,
|
|
60273
60282
|
kind,
|
|
60274
60283
|
document: parsed,
|
|
60275
|
-
|
|
60284
|
+
originalParsed: parsed,
|
|
60276
60285
|
filename: `${name}.ts`,
|
|
60277
60286
|
generateArtifact: true,
|
|
60278
60287
|
generateStore: true,
|