houdini 1.0.0-next.18 → 1.0.0-next.19

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.
Files changed (32) hide show
  1. package/build/cmd-cjs/index.js +55 -39
  2. package/build/cmd-esm/index.js +55 -39
  3. package/build/codegen-cjs/index.js +52 -27
  4. package/build/codegen-esm/index.js +52 -27
  5. package/build/lib/config.d.ts +4 -6
  6. package/build/lib/types.d.ts +11 -10
  7. package/build/lib-cjs/index.js +35 -40
  8. package/build/lib-esm/index.js +35 -40
  9. package/build/runtime/cache/storage.d.ts +18 -15
  10. package/build/runtime/client/documentStore.d.ts +3 -3
  11. package/build/runtime/client/utils/documentPlugins.d.ts +2 -2
  12. package/build/runtime/lib/config.d.ts +2 -2
  13. package/build/runtime/lib/types.d.ts +40 -41
  14. package/build/runtime-cjs/cache/storage.d.ts +18 -15
  15. package/build/runtime-cjs/cache/storage.js +9 -11
  16. package/build/runtime-cjs/client/documentStore.d.ts +3 -3
  17. package/build/runtime-cjs/client/utils/documentPlugins.d.ts +2 -2
  18. package/build/runtime-cjs/lib/config.d.ts +2 -2
  19. package/build/runtime-cjs/lib/types.d.ts +40 -41
  20. package/build/runtime-cjs/lib/types.js +26 -30
  21. package/build/runtime-esm/cache/storage.d.ts +18 -15
  22. package/build/runtime-esm/cache/storage.js +9 -11
  23. package/build/runtime-esm/client/documentStore.d.ts +3 -3
  24. package/build/runtime-esm/client/utils/documentPlugins.d.ts +2 -2
  25. package/build/runtime-esm/lib/config.d.ts +2 -2
  26. package/build/runtime-esm/lib/types.d.ts +40 -41
  27. package/build/runtime-esm/lib/types.js +26 -30
  28. package/build/test-cjs/index.js +55 -33
  29. package/build/test-esm/index.js +55 -33
  30. package/build/vite-cjs/index.js +53 -37
  31. package/build/vite-esm/index.js +53 -37
  32. package/package.json +1 -1
@@ -54085,6 +54085,29 @@ function computeID(configFile, type, data) {
54085
54085
  return id.slice(0, -2);
54086
54086
  }
54087
54087
 
54088
+ // src/runtime/lib/types.ts
54089
+ var CachePolicy = {
54090
+ CacheOrNetwork: "CacheOrNetwork",
54091
+ CacheOnly: "CacheOnly",
54092
+ NetworkOnly: "NetworkOnly",
54093
+ CacheAndNetwork: "CacheAndNetwork"
54094
+ };
54095
+ var ArtifactKind = {
54096
+ Query: "HoudiniQuery",
54097
+ Subscription: "HoudiniSubscription",
54098
+ Mutation: "HoudiniMutation",
54099
+ Fragment: "HoudiniFragment"
54100
+ };
54101
+ var CompiledFragmentKind = ArtifactKind.Fragment;
54102
+ var CompiledMutationKind = ArtifactKind.Mutation;
54103
+ var CompiledQueryKind = ArtifactKind.Query;
54104
+ var CompiledSubscriptionKind = ArtifactKind.Subscription;
54105
+ var RefetchUpdateMode = {
54106
+ append: "append",
54107
+ prepend: "prepend",
54108
+ replace: "replace"
54109
+ };
54110
+
54088
54111
  // src/lib/constants.ts
54089
54112
  var siteURL = "https://houdinigraphql.com";
54090
54113
  var houdini_mode = {
@@ -54407,13 +54430,12 @@ async function glob(pattern) {
54407
54430
  glob.hasMagic = import_glob.glob.hasMagic;
54408
54431
 
54409
54432
  // src/lib/types.ts
54410
- var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
54411
- LogLevel2["Full"] = "full";
54412
- LogLevel2["Summary"] = "summary";
54413
- LogLevel2["ShortSummary"] = "short-summary";
54414
- LogLevel2["Quiet"] = "quiet";
54415
- return LogLevel2;
54416
- })(LogLevel || {});
54433
+ var LogLevel = {
54434
+ Full: "full",
54435
+ Summary: "summary",
54436
+ ShortSummary: "short-summary",
54437
+ Quiet: "quiet"
54438
+ };
54417
54439
 
54418
54440
  // src/lib/config.ts
54419
54441
  var currentDir = global.__dirname || dirname(fileURLToPath(import.meta.url));
@@ -54464,7 +54486,7 @@ var Config = class {
54464
54486
  scalars,
54465
54487
  cacheBufferSize,
54466
54488
  definitionsPath,
54467
- defaultCachePolicy = "CacheOrNetwork" /* CacheOrNetwork */,
54489
+ defaultCachePolicy = CachePolicy.CacheOrNetwork,
54468
54490
  defaultPartial = false,
54469
54491
  defaultListPosition = "append",
54470
54492
  defaultListTarget = null,
@@ -54486,7 +54508,7 @@ var Config = class {
54486
54508
  Object.values(LogLevel)
54487
54509
  )}`
54488
54510
  );
54489
- logLevel = "summary" /* Summary */;
54511
+ logLevel = LogLevel.Summary;
54490
54512
  }
54491
54513
  this.schemaPath = schemaPath;
54492
54514
  this.filepath = filepath;
@@ -54502,7 +54524,7 @@ var Config = class {
54502
54524
  this.internalListPosition = defaultListPosition === "append" ? "last" : "first";
54503
54525
  this.defaultListTarget = defaultListTarget;
54504
54526
  this.definitionsFolder = definitionsPath;
54505
- this.logLevel = (logLevel || "summary" /* Summary */).toLowerCase();
54527
+ this.logLevel = (logLevel || LogLevel.Summary).toLowerCase();
54506
54528
  this.defaultFragmentMasking = defaultFragmentMasking;
54507
54529
  this.routesDir = join(this.projectRoot, "src", "routes");
54508
54530
  this.schemaPollInterval = watchSchema?.interval ?? 2e3;
@@ -55501,7 +55523,7 @@ async function fragmentVariables(config2, documents) {
55501
55523
  };
55502
55524
  documents.push({
55503
55525
  name: "generated::fragmentVariables",
55504
- kind: "HoudiniFragment" /* Fragment */,
55526
+ kind: ArtifactKind.Fragment,
55505
55527
  document: doc,
55506
55528
  originalParsed: doc,
55507
55529
  generateStore: false,
@@ -56422,7 +56444,7 @@ async function paginate(config2, documents) {
56422
56444
  ]
56423
56445
  };
56424
56446
  newDocs.push({
56425
- kind: "HoudiniQuery" /* Query */,
56447
+ kind: ArtifactKind.Query,
56426
56448
  filename: doc.filename,
56427
56449
  name: refetchQueryName,
56428
56450
  document: queryDoc,
@@ -56842,7 +56864,7 @@ async function addListFragments(config2, documents) {
56842
56864
  config2.newDocuments += "\n" + generatedDoc.definitions.filter((c) => c.kind === "FragmentDefinition").map(graphql9.print).join("\n\n");
56843
56865
  documents.push({
56844
56866
  name: "generated::lists",
56845
- kind: "HoudiniFragment" /* Fragment */,
56867
+ kind: ArtifactKind.Fragment,
56846
56868
  generateArtifact: false,
56847
56869
  generateStore: false,
56848
56870
  document: generatedDoc,
@@ -57109,7 +57131,7 @@ function selection({
57109
57131
  (directive) => directive.name.value === config2.paginateDirective
57110
57132
  );
57111
57133
  if (paginated && document.refetch && document.refetch.method === "offset") {
57112
- fieldObj.updates = ["append" /* append */];
57134
+ fieldObj.updates = [RefetchUpdateMode.append];
57113
57135
  }
57114
57136
  let continueConnection = inConnection;
57115
57137
  if ([
@@ -57119,7 +57141,7 @@ function selection({
57119
57141
  "hasNextPage",
57120
57142
  "hasPreviousPage"
57121
57143
  ].includes(attributeName) && inConnection && document.refetch) {
57122
- fieldObj.updates = ["append" /* append */, "prepend" /* prepend */];
57144
+ fieldObj.updates = [RefetchUpdateMode.append, RefetchUpdateMode.prepend];
57123
57145
  }
57124
57146
  if (attributeName === "node" && inConnection) {
57125
57147
  continueConnection = false;
@@ -57298,7 +57320,7 @@ function artifactGenerator(stats) {
57298
57320
  );
57299
57321
  let rootType = "";
57300
57322
  let selectionSet;
57301
- if (docKind !== "HoudiniFragment" /* Fragment */) {
57323
+ if (docKind !== ArtifactKind.Fragment) {
57302
57324
  const operation = operations[0];
57303
57325
  if (operation.operation === "query") {
57304
57326
  rootType = config2.schema.getQueryType()?.name;
@@ -57331,7 +57353,7 @@ function artifactGenerator(stats) {
57331
57353
  let directive = fragments[0]?.directives?.find(
57332
57354
  (directive2) => directive2.name.value === config2.argumentsDirective
57333
57355
  );
57334
- if (docKind === "HoudiniFragment" /* Fragment */ && directive) {
57356
+ if (docKind === ArtifactKind.Fragment && directive) {
57335
57357
  inputs = fragmentArgumentsDefinitions(config2, doc.filename, fragments[0]);
57336
57358
  }
57337
57359
  const mergedSelection = flattenSelections({
@@ -57379,7 +57401,7 @@ function artifactGenerator(stats) {
57379
57401
  }
57380
57402
  const result = { ...prev };
57381
57403
  const dataToAdd = plugin2.artifactData({ config: config2, document: doc }) ?? {};
57382
- if (Object.keys(dataToAdd).length > 0) {
57404
+ if (Object.keys(dataToAdd)) {
57383
57405
  result[plugin2.name] = dataToAdd;
57384
57406
  }
57385
57407
  return result;
@@ -58628,7 +58650,7 @@ function listDefinitions(config2, body, docs) {
58628
58650
  function queryDefinitions(config2, body, docs, returnType) {
58629
58651
  return AST12.tsTupleType(
58630
58652
  docs.reduce((prev, doc) => {
58631
- if (doc.kind !== "HoudiniQuery" /* Query */ || !doc.generateStore) {
58653
+ if (doc.kind !== ArtifactKind.Query || !doc.generateStore) {
58632
58654
  return prev;
58633
58655
  }
58634
58656
  const definition = doc.document.definitions.find(
@@ -58659,7 +58681,7 @@ function queryDefinitions(config2, body, docs, returnType) {
58659
58681
  }
58660
58682
  function fragmentListMap(config2, concreteTypes, body, docs, return_type) {
58661
58683
  return docs.reduce((prev, doc) => {
58662
- if (doc.kind !== "HoudiniFragment" /* Fragment */) {
58684
+ if (doc.kind !== ArtifactKind.Fragment) {
58663
58685
  return prev;
58664
58686
  }
58665
58687
  const definition = doc.document.definitions.find(
@@ -58870,10 +58892,10 @@ var graphql20 = __toESM(require_graphql2(), 1);
58870
58892
  async function graphqlExtensions(config2, documents) {
58871
58893
  let internalSchema = `
58872
58894
  enum CachePolicy {
58873
- ${"CacheAndNetwork" /* CacheAndNetwork */}
58874
- ${"CacheOnly" /* CacheOnly */}
58875
- ${"CacheOrNetwork" /* CacheOrNetwork */}
58876
- ${"NetworkOnly" /* NetworkOnly */}
58895
+ ${CachePolicy.CacheAndNetwork}
58896
+ ${CachePolicy.CacheOnly}
58897
+ ${CachePolicy.CacheOrNetwork}
58898
+ ${CachePolicy.NetworkOnly}
58877
58899
  }
58878
58900
 
58879
58901
  """
@@ -59789,7 +59811,7 @@ function getAndVerifyNodeInterface(config2) {
59789
59811
  var nbInvalidNodeFieldMessageDisplayed = 0;
59790
59812
  function displayInvalidNodeFieldMessage(logLevel) {
59791
59813
  if (nbInvalidNodeFieldMessageDisplayed === 0) {
59792
- if (logLevel === "full" /* Full */) {
59814
+ if (logLevel === LogLevel.Full) {
59793
59815
  console.warn(invalidNodeFieldMessage);
59794
59816
  } else {
59795
59817
  console.warn(invalidNodeFieldMessageLight);
@@ -59953,7 +59975,7 @@ async function runPipeline2(config2, docs) {
59953
59975
  }
59954
59976
  const unchanged = artifactStats.total.length - artifactStats.changed.length - artifactStats.new.length - artifactStats.deleted.length;
59955
59977
  const printMessage = !config2.pluginMode || unchanged !== artifactStats.total.length;
59956
- if (!printMessage || config2.logLevel === "quiet" /* Quiet */) {
59978
+ if (!printMessage || config2.logLevel === LogLevel.Quiet) {
59957
59979
  if (error) {
59958
59980
  throw error;
59959
59981
  }
@@ -59967,14 +59989,14 @@ async function runPipeline2(config2, docs) {
59967
59989
  }
59968
59990
  if (artifactStats.total.length === 0) {
59969
59991
  console.log(`\u{1F4A1} No operation found. If that's unexpected, please check your config.`);
59970
- } else if (["summary" /* Summary */, "short-summary" /* ShortSummary */].includes(config2.logLevel)) {
59992
+ } else if (config2.logLevel == LogLevel.Summary || config2.logLevel == LogLevel.ShortSummary) {
59971
59993
  if (unchanged > 0 && printMessage && !config2.pluginMode) {
59972
59994
  console.log(`\u{1F4C3} Unchanged: ${unchanged}`);
59973
59995
  }
59974
59996
  logStyled("CREATED", artifactStats.new, config2.logLevel, config2.pluginMode);
59975
59997
  logStyled("UPDATED", artifactStats.changed, config2.logLevel, config2.pluginMode);
59976
59998
  logStyled("DELETED", artifactStats.deleted, config2.logLevel, config2.pluginMode);
59977
- } else if (config2.logLevel === "full" /* Full */) {
59999
+ } else if (config2.logLevel === LogLevel.Full) {
59978
60000
  for (const artifact of artifactStats.total) {
59979
60001
  let emoji = "\u{1F4C3}";
59980
60002
  if (artifactStats.changed.includes(artifact)) {
@@ -60018,7 +60040,7 @@ function logStyled(kind, stat2, logLevel, plugin2) {
60018
60040
  }
60019
60041
  }
60020
60042
  console.log(msg.join(""));
60021
- if (!plugin2 && logLevel === "summary" /* Summary */) {
60043
+ if (!plugin2 && logLevel === LogLevel.Summary) {
60022
60044
  for (const artifact of stat2.slice(0, nbToDisplay)) {
60023
60045
  console.log(` ${artifact}`);
60024
60046
  }
@@ -60301,14 +60323,14 @@ function mockCollectedDoc(query) {
60301
60323
  const parsed = graphql25.parse(query);
60302
60324
  const name = parsed.definitions[0].name.value;
60303
60325
  const operations = parsed.definitions;
60304
- let kind = "HoudiniFragment" /* Fragment */;
60326
+ let kind = ArtifactKind.Fragment;
60305
60327
  if (operations.length === 1) {
60306
60328
  if (operations[0].kind === "OperationDefinition" && operations[0].operation === "query") {
60307
- kind = "HoudiniQuery" /* Query */;
60329
+ kind = ArtifactKind.Query;
60308
60330
  } else if (operations[0].kind === "OperationDefinition" && operations[0].operation === "mutation") {
60309
- kind = "HoudiniMutation" /* Mutation */;
60331
+ kind = ArtifactKind.Mutation;
60310
60332
  } else if (operations[0].kind === "OperationDefinition" && operations[0].operation === "subscription") {
60311
- kind = "HoudiniSubscription" /* Subscription */;
60333
+ kind = ArtifactKind.Subscription;
60312
60334
  }
60313
60335
  }
60314
60336
  return {
@@ -65217,10 +65217,27 @@ function computeID(configFile, type, data) {
65217
65217
  }
65218
65218
 
65219
65219
  // src/runtime/lib/types.ts
65220
- var CompiledFragmentKind = "HoudiniFragment" /* Fragment */;
65221
- var CompiledMutationKind = "HoudiniMutation" /* Mutation */;
65222
- var CompiledQueryKind = "HoudiniQuery" /* Query */;
65223
- var CompiledSubscriptionKind = "HoudiniSubscription" /* Subscription */;
65220
+ var CachePolicy = {
65221
+ CacheOrNetwork: "CacheOrNetwork",
65222
+ CacheOnly: "CacheOnly",
65223
+ NetworkOnly: "NetworkOnly",
65224
+ CacheAndNetwork: "CacheAndNetwork"
65225
+ };
65226
+ var ArtifactKind = {
65227
+ Query: "HoudiniQuery",
65228
+ Subscription: "HoudiniSubscription",
65229
+ Mutation: "HoudiniMutation",
65230
+ Fragment: "HoudiniFragment"
65231
+ };
65232
+ var CompiledFragmentKind = ArtifactKind.Fragment;
65233
+ var CompiledMutationKind = ArtifactKind.Mutation;
65234
+ var CompiledQueryKind = ArtifactKind.Query;
65235
+ var CompiledSubscriptionKind = ArtifactKind.Subscription;
65236
+ var RefetchUpdateMode = {
65237
+ append: "append",
65238
+ prepend: "prepend",
65239
+ replace: "replace"
65240
+ };
65224
65241
 
65225
65242
  // src/lib/constants.ts
65226
65243
  var siteURL = "https://houdinigraphql.com";
@@ -66800,13 +66817,12 @@ function plugin(name, hooks) {
66800
66817
  }
66801
66818
 
66802
66819
  // src/lib/types.ts
66803
- var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
66804
- LogLevel2["Full"] = "full";
66805
- LogLevel2["Summary"] = "summary";
66806
- LogLevel2["ShortSummary"] = "short-summary";
66807
- LogLevel2["Quiet"] = "quiet";
66808
- return LogLevel2;
66809
- })(LogLevel || {});
66820
+ var LogLevel = {
66821
+ Full: "full",
66822
+ Summary: "summary",
66823
+ ShortSummary: "short-summary",
66824
+ Quiet: "quiet"
66825
+ };
66810
66826
 
66811
66827
  // src/lib/config.ts
66812
66828
  var import_meta = {};
@@ -66858,7 +66874,7 @@ var Config = class {
66858
66874
  scalars,
66859
66875
  cacheBufferSize,
66860
66876
  definitionsPath,
66861
- defaultCachePolicy = "CacheOrNetwork" /* CacheOrNetwork */,
66877
+ defaultCachePolicy = CachePolicy.CacheOrNetwork,
66862
66878
  defaultPartial = false,
66863
66879
  defaultListPosition = "append",
66864
66880
  defaultListTarget = null,
@@ -66880,7 +66896,7 @@ var Config = class {
66880
66896
  Object.values(LogLevel)
66881
66897
  )}`
66882
66898
  );
66883
- logLevel = "summary" /* Summary */;
66899
+ logLevel = LogLevel.Summary;
66884
66900
  }
66885
66901
  this.schemaPath = schemaPath;
66886
66902
  this.filepath = filepath;
@@ -66896,7 +66912,7 @@ var Config = class {
66896
66912
  this.internalListPosition = defaultListPosition === "append" ? "last" : "first";
66897
66913
  this.defaultListTarget = defaultListTarget;
66898
66914
  this.definitionsFolder = definitionsPath;
66899
- this.logLevel = (logLevel || "summary" /* Summary */).toLowerCase();
66915
+ this.logLevel = (logLevel || LogLevel.Summary).toLowerCase();
66900
66916
  this.defaultFragmentMasking = defaultFragmentMasking;
66901
66917
  this.routesDir = join2(this.projectRoot, "src", "routes");
66902
66918
  this.schemaPollInterval = watchSchema?.interval ?? 2e3;
@@ -68289,7 +68305,7 @@ async function fragmentVariables(config4, documents) {
68289
68305
  };
68290
68306
  documents.push({
68291
68307
  name: "generated::fragmentVariables",
68292
- kind: "HoudiniFragment" /* Fragment */,
68308
+ kind: ArtifactKind.Fragment,
68293
68309
  document: doc,
68294
68310
  originalParsed: doc,
68295
68311
  generateStore: false,
@@ -69216,7 +69232,7 @@ async function paginate(config4, documents) {
69216
69232
  ]
69217
69233
  };
69218
69234
  newDocs.push({
69219
- kind: "HoudiniQuery" /* Query */,
69235
+ kind: ArtifactKind.Query,
69220
69236
  filename: doc.filename,
69221
69237
  name: refetchQueryName,
69222
69238
  document: queryDoc,
@@ -69636,7 +69652,7 @@ async function addListFragments(config4, documents) {
69636
69652
  config4.newDocuments += "\n" + generatedDoc.definitions.filter((c) => c.kind === "FragmentDefinition").map(graphql11.print).join("\n\n");
69637
69653
  documents.push({
69638
69654
  name: "generated::lists",
69639
- kind: "HoudiniFragment" /* Fragment */,
69655
+ kind: ArtifactKind.Fragment,
69640
69656
  generateArtifact: false,
69641
69657
  generateStore: false,
69642
69658
  document: generatedDoc,
@@ -69903,7 +69919,7 @@ function selection({
69903
69919
  (directive) => directive.name.value === config4.paginateDirective
69904
69920
  );
69905
69921
  if (paginated && document.refetch && document.refetch.method === "offset") {
69906
- fieldObj.updates = ["append" /* append */];
69922
+ fieldObj.updates = [RefetchUpdateMode.append];
69907
69923
  }
69908
69924
  let continueConnection = inConnection;
69909
69925
  if ([
@@ -69913,7 +69929,7 @@ function selection({
69913
69929
  "hasNextPage",
69914
69930
  "hasPreviousPage"
69915
69931
  ].includes(attributeName) && inConnection && document.refetch) {
69916
- fieldObj.updates = ["append" /* append */, "prepend" /* prepend */];
69932
+ fieldObj.updates = [RefetchUpdateMode.append, RefetchUpdateMode.prepend];
69917
69933
  }
69918
69934
  if (attributeName === "node" && inConnection) {
69919
69935
  continueConnection = false;
@@ -70092,7 +70108,7 @@ function artifactGenerator(stats) {
70092
70108
  );
70093
70109
  let rootType = "";
70094
70110
  let selectionSet;
70095
- if (docKind !== "HoudiniFragment" /* Fragment */) {
70111
+ if (docKind !== ArtifactKind.Fragment) {
70096
70112
  const operation = operations[0];
70097
70113
  if (operation.operation === "query") {
70098
70114
  rootType = config4.schema.getQueryType()?.name;
@@ -70125,7 +70141,7 @@ function artifactGenerator(stats) {
70125
70141
  let directive = fragments[0]?.directives?.find(
70126
70142
  (directive2) => directive2.name.value === config4.argumentsDirective
70127
70143
  );
70128
- if (docKind === "HoudiniFragment" /* Fragment */ && directive) {
70144
+ if (docKind === ArtifactKind.Fragment && directive) {
70129
70145
  inputs = fragmentArgumentsDefinitions(config4, doc.filename, fragments[0]);
70130
70146
  }
70131
70147
  const mergedSelection = flattenSelections({
@@ -70173,7 +70189,7 @@ function artifactGenerator(stats) {
70173
70189
  }
70174
70190
  const result = { ...prev };
70175
70191
  const dataToAdd = plugin2.artifactData({ config: config4, document: doc }) ?? {};
70176
- if (Object.keys(dataToAdd).length > 0) {
70192
+ if (Object.keys(dataToAdd)) {
70177
70193
  result[plugin2.name] = dataToAdd;
70178
70194
  }
70179
70195
  return result;
@@ -71422,7 +71438,7 @@ function listDefinitions(config4, body, docs) {
71422
71438
  function queryDefinitions(config4, body, docs, returnType) {
71423
71439
  return AST12.tsTupleType(
71424
71440
  docs.reduce((prev, doc) => {
71425
- if (doc.kind !== "HoudiniQuery" /* Query */ || !doc.generateStore) {
71441
+ if (doc.kind !== ArtifactKind.Query || !doc.generateStore) {
71426
71442
  return prev;
71427
71443
  }
71428
71444
  const definition = doc.document.definitions.find(
@@ -71453,7 +71469,7 @@ function queryDefinitions(config4, body, docs, returnType) {
71453
71469
  }
71454
71470
  function fragmentListMap(config4, concreteTypes, body, docs, return_type) {
71455
71471
  return docs.reduce((prev, doc) => {
71456
- if (doc.kind !== "HoudiniFragment" /* Fragment */) {
71472
+ if (doc.kind !== ArtifactKind.Fragment) {
71457
71473
  return prev;
71458
71474
  }
71459
71475
  const definition = doc.document.definitions.find(
@@ -71664,10 +71680,10 @@ var graphql22 = __toESM(require_graphql2(), 1);
71664
71680
  async function graphqlExtensions(config4, documents) {
71665
71681
  let internalSchema = `
71666
71682
  enum CachePolicy {
71667
- ${"CacheAndNetwork" /* CacheAndNetwork */}
71668
- ${"CacheOnly" /* CacheOnly */}
71669
- ${"CacheOrNetwork" /* CacheOrNetwork */}
71670
- ${"NetworkOnly" /* NetworkOnly */}
71683
+ ${CachePolicy.CacheAndNetwork}
71684
+ ${CachePolicy.CacheOnly}
71685
+ ${CachePolicy.CacheOrNetwork}
71686
+ ${CachePolicy.NetworkOnly}
71671
71687
  }
71672
71688
 
71673
71689
  """
@@ -72583,7 +72599,7 @@ function getAndVerifyNodeInterface(config4) {
72583
72599
  var nbInvalidNodeFieldMessageDisplayed = 0;
72584
72600
  function displayInvalidNodeFieldMessage(logLevel) {
72585
72601
  if (nbInvalidNodeFieldMessageDisplayed === 0) {
72586
- if (logLevel === "full" /* Full */) {
72602
+ if (logLevel === LogLevel.Full) {
72587
72603
  console.warn(invalidNodeFieldMessage);
72588
72604
  } else {
72589
72605
  console.warn(invalidNodeFieldMessageLight);
@@ -72751,7 +72767,7 @@ async function runPipeline2(config4, docs) {
72751
72767
  }
72752
72768
  const unchanged = artifactStats.total.length - artifactStats.changed.length - artifactStats.new.length - artifactStats.deleted.length;
72753
72769
  const printMessage = !config4.pluginMode || unchanged !== artifactStats.total.length;
72754
- if (!printMessage || config4.logLevel === "quiet" /* Quiet */) {
72770
+ if (!printMessage || config4.logLevel === LogLevel.Quiet) {
72755
72771
  if (error) {
72756
72772
  throw error;
72757
72773
  }
@@ -72765,14 +72781,14 @@ async function runPipeline2(config4, docs) {
72765
72781
  }
72766
72782
  if (artifactStats.total.length === 0) {
72767
72783
  console.log(`\u{1F4A1} No operation found. If that's unexpected, please check your config.`);
72768
- } else if (["summary" /* Summary */, "short-summary" /* ShortSummary */].includes(config4.logLevel)) {
72784
+ } else if (config4.logLevel == LogLevel.Summary || config4.logLevel == LogLevel.ShortSummary) {
72769
72785
  if (unchanged > 0 && printMessage && !config4.pluginMode) {
72770
72786
  console.log(`\u{1F4C3} Unchanged: ${unchanged}`);
72771
72787
  }
72772
72788
  logStyled("CREATED", artifactStats.new, config4.logLevel, config4.pluginMode);
72773
72789
  logStyled("UPDATED", artifactStats.changed, config4.logLevel, config4.pluginMode);
72774
72790
  logStyled("DELETED", artifactStats.deleted, config4.logLevel, config4.pluginMode);
72775
- } else if (config4.logLevel === "full" /* Full */) {
72791
+ } else if (config4.logLevel === LogLevel.Full) {
72776
72792
  for (const artifact of artifactStats.total) {
72777
72793
  let emoji = "\u{1F4C3}";
72778
72794
  if (artifactStats.changed.includes(artifact)) {
@@ -72882,14 +72898,14 @@ async function processGraphQLDocument(config4, filepath, document) {
72882
72898
  });
72883
72899
  }
72884
72900
  }
72885
- let kind = "HoudiniFragment" /* Fragment */;
72901
+ let kind = ArtifactKind.Fragment;
72886
72902
  if (operations.length === 1) {
72887
72903
  if (operations[0].kind === "OperationDefinition" && operations[0].operation === "query") {
72888
- kind = "HoudiniQuery" /* Query */;
72904
+ kind = ArtifactKind.Query;
72889
72905
  } else if (operations[0].kind === "OperationDefinition" && operations[0].operation === "mutation") {
72890
- kind = "HoudiniMutation" /* Mutation */;
72906
+ kind = ArtifactKind.Mutation;
72891
72907
  } else if (operations[0].kind === "OperationDefinition" && operations[0].operation === "subscription") {
72892
- kind = "HoudiniSubscription" /* Subscription */;
72908
+ kind = ArtifactKind.Subscription;
72893
72909
  }
72894
72910
  }
72895
72911
  return {
@@ -72934,7 +72950,7 @@ function logStyled(kind, stat3, logLevel, plugin2) {
72934
72950
  }
72935
72951
  }
72936
72952
  console.log(msg.join(""));
72937
- if (!plugin2 && logLevel === "summary" /* Summary */) {
72953
+ if (!plugin2 && logLevel === LogLevel.Summary) {
72938
72954
  for (const artifact of stat3.slice(0, nbToDisplay)) {
72939
72955
  console.log(` ${artifact}`);
72940
72956
  }