houdini 1.0.0-next.7 → 1.0.0-next.9

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 (100) hide show
  1. package/build/cmd-cjs/index.js +93 -66
  2. package/build/cmd-esm/index.js +66 -39
  3. package/build/codegen/generators/typescript/typeReference.d.ts +4 -2
  4. package/build/codegen/generators/typescript/types.d.ts +0 -1
  5. package/build/codegen-cjs/index.js +67 -39
  6. package/build/codegen-esm/index.js +54 -26
  7. package/build/lib/config.d.ts +2 -1
  8. package/build/lib/path.d.ts +1 -1
  9. package/build/lib-cjs/index.js +40 -37
  10. package/build/lib-esm/index.js +14 -11
  11. package/build/runtime/cache/cache.d.ts +6 -6
  12. package/build/runtime/cache/storage.d.ts +5 -5
  13. package/build/runtime/cache/stuff.d.ts +0 -2
  14. package/build/runtime/client/documentStore.d.ts +4 -3
  15. package/build/runtime/client/index.d.ts +6 -5
  16. package/build/runtime/client/plugins/cache.d.ts +1 -1
  17. package/build/runtime/client/plugins/fetch.d.ts +1 -1
  18. package/build/runtime/client/plugins/fetchParams.d.ts +1 -1
  19. package/build/runtime/client/plugins/injectedPlugins.d.ts +2 -1
  20. package/build/runtime/client/plugins/mutation.d.ts +1 -1
  21. package/build/runtime/client/plugins/query.d.ts +1 -1
  22. package/build/runtime/client/plugins/subscription.d.ts +1 -1
  23. package/build/runtime/client/plugins/throwOnError.d.ts +1 -1
  24. package/build/runtime/client/utils/documentPlugins.d.ts +2 -2
  25. package/build/runtime/lib/flatten.d.ts +2 -0
  26. package/build/runtime/lib/types.d.ts +2 -0
  27. package/build/runtime/public/record.d.ts +1 -2
  28. package/build/runtime-cjs/cache/cache.d.ts +6 -6
  29. package/build/runtime-cjs/cache/cache.js +6 -5
  30. package/build/runtime-cjs/cache/lists.js +3 -3
  31. package/build/runtime-cjs/cache/storage.d.ts +5 -5
  32. package/build/runtime-cjs/cache/storage.js +2 -2
  33. package/build/runtime-cjs/cache/stuff.d.ts +0 -2
  34. package/build/runtime-cjs/cache/stuff.js +2 -19
  35. package/build/runtime-cjs/cache/subscription.js +5 -4
  36. package/build/runtime-cjs/client/documentStore.d.ts +4 -3
  37. package/build/runtime-cjs/client/documentStore.js +4 -4
  38. package/build/runtime-cjs/client/index.d.ts +6 -5
  39. package/build/runtime-cjs/client/index.js +45 -19
  40. package/build/runtime-cjs/client/plugins/cache.d.ts +1 -1
  41. package/build/runtime-cjs/client/plugins/cache.js +3 -3
  42. package/build/runtime-cjs/client/plugins/fetch.d.ts +1 -1
  43. package/build/runtime-cjs/client/plugins/fetch.js +7 -7
  44. package/build/runtime-cjs/client/plugins/fetchParams.d.ts +1 -1
  45. package/build/runtime-cjs/client/plugins/fetchParams.js +3 -3
  46. package/build/runtime-cjs/client/plugins/injectedPlugins.d.ts +2 -1
  47. package/build/runtime-cjs/client/plugins/mutation.d.ts +1 -1
  48. package/build/runtime-cjs/client/plugins/mutation.js +3 -3
  49. package/build/runtime-cjs/client/plugins/query.d.ts +1 -1
  50. package/build/runtime-cjs/client/plugins/query.js +3 -3
  51. package/build/runtime-cjs/client/plugins/subscription.d.ts +1 -1
  52. package/build/runtime-cjs/client/plugins/subscription.js +3 -3
  53. package/build/runtime-cjs/client/plugins/throwOnError.d.ts +1 -1
  54. package/build/runtime-cjs/client/plugins/throwOnError.js +3 -3
  55. package/build/runtime-cjs/client/utils/documentPlugins.d.ts +2 -2
  56. package/build/runtime-cjs/lib/flatten.d.ts +2 -0
  57. package/build/runtime-cjs/lib/flatten.js +41 -0
  58. package/build/runtime-cjs/lib/types.d.ts +2 -0
  59. package/build/runtime-cjs/public/cache.js +2 -2
  60. package/build/runtime-cjs/public/record.d.ts +1 -2
  61. package/build/runtime-cjs/public/record.js +1 -2
  62. package/build/runtime-esm/cache/cache.d.ts +6 -6
  63. package/build/runtime-esm/cache/cache.js +7 -6
  64. package/build/runtime-esm/cache/lists.js +3 -3
  65. package/build/runtime-esm/cache/storage.d.ts +5 -5
  66. package/build/runtime-esm/cache/storage.js +2 -2
  67. package/build/runtime-esm/cache/stuff.d.ts +0 -2
  68. package/build/runtime-esm/cache/stuff.js +1 -17
  69. package/build/runtime-esm/cache/subscription.js +6 -5
  70. package/build/runtime-esm/client/documentStore.d.ts +4 -3
  71. package/build/runtime-esm/client/documentStore.js +5 -5
  72. package/build/runtime-esm/client/index.d.ts +6 -5
  73. package/build/runtime-esm/client/index.js +46 -21
  74. package/build/runtime-esm/client/plugins/cache.d.ts +1 -1
  75. package/build/runtime-esm/client/plugins/cache.js +2 -2
  76. package/build/runtime-esm/client/plugins/fetch.d.ts +1 -1
  77. package/build/runtime-esm/client/plugins/fetch.js +6 -6
  78. package/build/runtime-esm/client/plugins/fetchParams.d.ts +1 -1
  79. package/build/runtime-esm/client/plugins/fetchParams.js +2 -2
  80. package/build/runtime-esm/client/plugins/injectedPlugins.d.ts +2 -1
  81. package/build/runtime-esm/client/plugins/mutation.d.ts +1 -1
  82. package/build/runtime-esm/client/plugins/mutation.js +2 -2
  83. package/build/runtime-esm/client/plugins/query.d.ts +1 -1
  84. package/build/runtime-esm/client/plugins/query.js +2 -2
  85. package/build/runtime-esm/client/plugins/subscription.d.ts +1 -1
  86. package/build/runtime-esm/client/plugins/subscription.js +2 -2
  87. package/build/runtime-esm/client/plugins/throwOnError.d.ts +1 -1
  88. package/build/runtime-esm/client/plugins/throwOnError.js +2 -2
  89. package/build/runtime-esm/client/utils/documentPlugins.d.ts +2 -2
  90. package/build/runtime-esm/lib/flatten.d.ts +2 -0
  91. package/build/runtime-esm/lib/flatten.js +17 -0
  92. package/build/runtime-esm/lib/types.d.ts +2 -0
  93. package/build/runtime-esm/public/cache.js +2 -2
  94. package/build/runtime-esm/public/record.d.ts +1 -2
  95. package/build/runtime-esm/public/record.js +1 -2
  96. package/build/test-cjs/index.js +67 -39
  97. package/build/test-esm/index.js +54 -26
  98. package/build/vite-cjs/index.js +90 -58
  99. package/build/vite-esm/index.js +64 -32
  100. package/package.json +4 -4
@@ -5100,7 +5100,7 @@ var require_definition = __commonJS({
5100
5100
  exports.assertInterfaceType = assertInterfaceType;
5101
5101
  exports.isUnionType = isUnionType13;
5102
5102
  exports.assertUnionType = assertUnionType;
5103
- exports.isEnumType = isEnumType10;
5103
+ exports.isEnumType = isEnumType11;
5104
5104
  exports.assertEnumType = assertEnumType;
5105
5105
  exports.isInputObjectType = isInputObjectType8;
5106
5106
  exports.assertInputObjectType = assertInputObjectType;
@@ -5171,7 +5171,7 @@ var require_definition = __commonJS({
5171
5171
  return Constructor;
5172
5172
  }
5173
5173
  function isType(type) {
5174
- return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType10(type) || isInputObjectType8(type) || isListType8(type) || isNonNullType10(type);
5174
+ return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isInputObjectType8(type) || isListType8(type) || isNonNullType10(type);
5175
5175
  }
5176
5176
  function assertType(type) {
5177
5177
  if (!isType(type)) {
@@ -5215,11 +5215,11 @@ var require_definition = __commonJS({
5215
5215
  }
5216
5216
  return type;
5217
5217
  }
5218
- function isEnumType10(type) {
5218
+ function isEnumType11(type) {
5219
5219
  return (0, _instanceOf.default)(type, GraphQLEnumType4);
5220
5220
  }
5221
5221
  function assertEnumType(type) {
5222
- if (!isEnumType10(type)) {
5222
+ if (!isEnumType11(type)) {
5223
5223
  throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Enum type."));
5224
5224
  }
5225
5225
  return type;
@@ -5252,7 +5252,7 @@ var require_definition = __commonJS({
5252
5252
  return type;
5253
5253
  }
5254
5254
  function isInputType(type) {
5255
- return isScalarType13(type) || isEnumType10(type) || isInputObjectType8(type) || isWrappingType(type) && isInputType(type.ofType);
5255
+ return isScalarType13(type) || isEnumType11(type) || isInputObjectType8(type) || isWrappingType(type) && isInputType(type.ofType);
5256
5256
  }
5257
5257
  function assertInputType(type) {
5258
5258
  if (!isInputType(type)) {
@@ -5261,7 +5261,7 @@ var require_definition = __commonJS({
5261
5261
  return type;
5262
5262
  }
5263
5263
  function isOutputType(type) {
5264
- return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType10(type) || isWrappingType(type) && isOutputType(type.ofType);
5264
+ return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isWrappingType(type) && isOutputType(type.ofType);
5265
5265
  }
5266
5266
  function assertOutputType(type) {
5267
5267
  if (!isOutputType(type)) {
@@ -5270,7 +5270,7 @@ var require_definition = __commonJS({
5270
5270
  return type;
5271
5271
  }
5272
5272
  function isLeafType4(type) {
5273
- return isScalarType13(type) || isEnumType10(type);
5273
+ return isScalarType13(type) || isEnumType11(type);
5274
5274
  }
5275
5275
  function assertLeafType(type) {
5276
5276
  if (!isLeafType4(type)) {
@@ -5358,7 +5358,7 @@ var require_definition = __commonJS({
5358
5358
  }
5359
5359
  }
5360
5360
  function isNamedType4(type) {
5361
- return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType10(type) || isInputObjectType8(type);
5361
+ return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType11(type) || isInputObjectType8(type);
5362
5362
  }
5363
5363
  function assertNamedType(type) {
5364
5364
  if (!isNamedType4(type)) {
@@ -68320,7 +68320,7 @@ function mergeSchemas(config2) {
68320
68320
  // src/lib/config.ts
68321
68321
  var graphql2 = __toESM(require_graphql2(), 1);
68322
68322
  var import_minimatch = __toESM(require_minimatch(), 1);
68323
- var import_url = require("url");
68323
+ var import_node_url2 = require("node:url");
68324
68324
 
68325
68325
  // src/runtime/lib/config.ts
68326
68326
  function defaultConfigValues(file) {
@@ -68423,10 +68423,10 @@ __export(fs_exports, {
68423
68423
  writeFile: () => writeFile
68424
68424
  });
68425
68425
  var import_fs_extra = __toESM(require_lib(), 1);
68426
- var import_promises = __toESM(require("fs/promises"), 1);
68427
68426
  var import_glob = __toESM(require_glob(), 1);
68428
68427
  var import_memfs = __toESM(require_lib2(), 1);
68429
- var import_util = require("util");
68428
+ var import_promises = __toESM(require("node:fs/promises"), 1);
68429
+ var import_node_util = require("node:util");
68430
68430
 
68431
68431
  // src/lib/path.ts
68432
68432
  var path_exports = {};
@@ -68443,36 +68443,36 @@ __export(path_exports, {
68443
68443
  resolve: () => resolve,
68444
68444
  sep: () => sep
68445
68445
  });
68446
- var import_os = __toESM(require("os"), 1);
68447
- var import_path = __toESM(require("path"), 1);
68446
+ var import_node_os = __toESM(require("node:os"), 1);
68447
+ var import_node_path = __toESM(require("node:path"), 1);
68448
68448
  var sep = "/";
68449
68449
  function resolve(...parts) {
68450
- return posixify(import_path.default.resolve(...parts));
68450
+ return posixify(import_node_path.default.resolve(...parts));
68451
68451
  }
68452
68452
  function join2(...parts) {
68453
- return posixify(import_path.default.join(...parts));
68453
+ return posixify(import_node_path.default.join(...parts));
68454
68454
  }
68455
68455
  function extname(target) {
68456
- return import_path.default.extname(target);
68456
+ return import_node_path.default.extname(target);
68457
68457
  }
68458
68458
  function relative(from, to) {
68459
- return posixify(import_path.default.relative(from, to));
68459
+ return posixify(import_node_path.default.relative(from, to));
68460
68460
  }
68461
68461
  function basename(target) {
68462
- return import_path.default.basename(target);
68462
+ return import_node_path.default.basename(target);
68463
68463
  }
68464
68464
  function dirname(target) {
68465
- return import_path.default.dirname(target);
68465
+ return import_node_path.default.dirname(target);
68466
68466
  }
68467
68467
  function isAbsolute(target) {
68468
- return import_path.default.isAbsolute(target);
68468
+ return import_node_path.default.isAbsolute(target);
68469
68469
  }
68470
68470
  function parse2(target) {
68471
- return import_path.default.parse(target);
68471
+ return import_node_path.default.parse(target);
68472
68472
  }
68473
68473
  var posixify = (str) => str.replace(/\\/g, "/");
68474
68474
  function importPath(target) {
68475
- return ["win32", "win64"].includes(import_os.default.platform()) ? "file:///" + target : target;
68475
+ return ["win32", "win64"].includes(import_node_os.default.platform()) ? "file:///" + target : target;
68476
68476
  }
68477
68477
 
68478
68478
  // src/lib/fs.ts
@@ -68596,7 +68596,7 @@ async function rmdir(filepath) {
68596
68596
  recursive: true
68597
68597
  });
68598
68598
  }
68599
- return await (0, import_util.promisify)(import_memfs.fs.rmdir)(filepath);
68599
+ return await (0, import_node_util.promisify)(import_memfs.fs.rmdir)(filepath);
68600
68600
  }
68601
68601
  async function stat(filepath) {
68602
68602
  if (!houdini_mode.is_testing) {
@@ -68674,7 +68674,7 @@ async function recursiveCopy(source, target, transforms, notRoot) {
68674
68674
  }
68675
68675
  }
68676
68676
  async function glob(pattern) {
68677
- return await (0, import_util.promisify)(import_glob.glob)(posixify(pattern));
68677
+ return await (0, import_node_util.promisify)(import_glob.glob)(posixify(pattern));
68678
68678
  }
68679
68679
  glob.hasMagic = import_glob.glob.hasMagic;
68680
68680
 
@@ -68729,7 +68729,7 @@ var dist_default = dataUriToBuffer;
68729
68729
 
68730
68730
  // ../../node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/body.js
68731
68731
  var import_node_stream = __toESM(require("node:stream"), 1);
68732
- var import_node_util = require("node:util");
68732
+ var import_node_util2 = require("node:util");
68733
68733
  var import_node_buffer = require("node:buffer");
68734
68734
  init_fetch_blob();
68735
68735
  init_esm_min();
@@ -68783,7 +68783,7 @@ var isSameProtocol = (destination, original) => {
68783
68783
  };
68784
68784
 
68785
68785
  // ../../node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/body.js
68786
- var pipeline = (0, import_node_util.promisify)(import_node_stream.default.pipeline);
68786
+ var pipeline = (0, import_node_util2.promisify)(import_node_stream.default.pipeline);
68787
68787
  var INTERNALS = Symbol("Body internals");
68788
68788
  var Body = class {
68789
68789
  constructor(body, {
@@ -68796,7 +68796,7 @@ var Body = class {
68796
68796
  body = import_node_buffer.Buffer.from(body.toString());
68797
68797
  } else if (isBlob(body)) {
68798
68798
  } else if (import_node_buffer.Buffer.isBuffer(body)) {
68799
- } else if (import_node_util.types.isAnyArrayBuffer(body)) {
68799
+ } else if (import_node_util2.types.isAnyArrayBuffer(body)) {
68800
68800
  body = import_node_buffer.Buffer.from(body);
68801
68801
  } else if (ArrayBuffer.isView(body)) {
68802
68802
  body = import_node_buffer.Buffer.from(body.buffer, body.byteOffset, body.byteLength);
@@ -68870,7 +68870,7 @@ var Body = class {
68870
68870
  return consumeBody(this);
68871
68871
  }
68872
68872
  };
68873
- Body.prototype.buffer = (0, import_node_util.deprecate)(Body.prototype.buffer, "Please use 'response.arrayBuffer()' instead of 'response.buffer()'", "node-fetch#buffer");
68873
+ Body.prototype.buffer = (0, import_node_util2.deprecate)(Body.prototype.buffer, "Please use 'response.arrayBuffer()' instead of 'response.buffer()'", "node-fetch#buffer");
68874
68874
  Object.defineProperties(Body.prototype, {
68875
68875
  body: { enumerable: true },
68876
68876
  bodyUsed: { enumerable: true },
@@ -68878,7 +68878,7 @@ Object.defineProperties(Body.prototype, {
68878
68878
  blob: { enumerable: true },
68879
68879
  json: { enumerable: true },
68880
68880
  text: { enumerable: true },
68881
- data: { get: (0, import_node_util.deprecate)(
68881
+ data: { get: (0, import_node_util2.deprecate)(
68882
68882
  () => {
68883
68883
  },
68884
68884
  "data doesn't exist, use json(), text(), arrayBuffer(), or body instead",
@@ -68946,7 +68946,7 @@ var clone = (instance, highWaterMark) => {
68946
68946
  }
68947
68947
  return body;
68948
68948
  };
68949
- var getNonSpecFormDataBoundary = (0, import_node_util.deprecate)(
68949
+ var getNonSpecFormDataBoundary = (0, import_node_util2.deprecate)(
68950
68950
  (body) => body.getBoundary(),
68951
68951
  "form-data doesn't follow the spec and requires special treatment. Use alternative package",
68952
68952
  "https://github.com/node-fetch/node-fetch/issues/1167"
@@ -68964,7 +68964,7 @@ var extractContentType = (body, request) => {
68964
68964
  if (isBlob(body)) {
68965
68965
  return body.type || null;
68966
68966
  }
68967
- if (import_node_buffer.Buffer.isBuffer(body) || import_node_util.types.isAnyArrayBuffer(body) || ArrayBuffer.isView(body)) {
68967
+ if (import_node_buffer.Buffer.isBuffer(body) || import_node_util2.types.isAnyArrayBuffer(body) || ArrayBuffer.isView(body)) {
68968
68968
  return null;
68969
68969
  }
68970
68970
  if (body instanceof FormData) {
@@ -69003,7 +69003,7 @@ var writeToStream = async (dest, { body }) => {
69003
69003
  };
69004
69004
 
69005
69005
  // ../../node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/headers.js
69006
- var import_node_util2 = require("node:util");
69006
+ var import_node_util3 = require("node:util");
69007
69007
  var import_node_http = __toESM(require("node:http"), 1);
69008
69008
  var validateHeaderName = typeof import_node_http.default.validateHeaderName === "function" ? import_node_http.default.validateHeaderName : (name) => {
69009
69009
  if (!/^[\^`\-\w!#$%&'*+.|~]+$/.test(name)) {
@@ -69028,7 +69028,7 @@ var Headers = class extends URLSearchParams {
69028
69028
  result.push(...values.map((value) => [name, value]));
69029
69029
  }
69030
69030
  } else if (init2 == null) {
69031
- } else if (typeof init2 === "object" && !import_node_util2.types.isBoxedPrimitive(init2)) {
69031
+ } else if (typeof init2 === "object" && !import_node_util3.types.isBoxedPrimitive(init2)) {
69032
69032
  const method = init2[Symbol.iterator];
69033
69033
  if (method == null) {
69034
69034
  result.push(...Object.entries(init2));
@@ -69037,7 +69037,7 @@ var Headers = class extends URLSearchParams {
69037
69037
  throw new TypeError("Header pairs must be iterable");
69038
69038
  }
69039
69039
  result = [...init2].map((pair) => {
69040
- if (typeof pair !== "object" || import_node_util2.types.isBoxedPrimitive(pair)) {
69040
+ if (typeof pair !== "object" || import_node_util3.types.isBoxedPrimitive(pair)) {
69041
69041
  throw new TypeError("Each header pair must be an iterable object");
69042
69042
  }
69043
69043
  return [...pair];
@@ -69284,7 +69284,7 @@ Object.defineProperties(Response.prototype, {
69284
69284
 
69285
69285
  // ../../node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/request.js
69286
69286
  var import_node_url = require("node:url");
69287
- var import_node_util3 = require("node:util");
69287
+ var import_node_util4 = require("node:util");
69288
69288
 
69289
69289
  // ../../node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/utils/get-search.js
69290
69290
  var getSearch = (parsedURL) => {
@@ -69441,7 +69441,7 @@ var INTERNALS3 = Symbol("Request internals");
69441
69441
  var isRequest = (object) => {
69442
69442
  return typeof object === "object" && typeof object[INTERNALS3] === "object";
69443
69443
  };
69444
- var doBadDataWarn = (0, import_node_util3.deprecate)(
69444
+ var doBadDataWarn = (0, import_node_util4.deprecate)(
69445
69445
  () => {
69446
69446
  },
69447
69447
  ".data is not a valid RequestInit property, use .body instead",
@@ -69945,7 +69945,7 @@ var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
69945
69945
 
69946
69946
  // src/lib/config.ts
69947
69947
  var import_meta = {};
69948
- var currentDir = global.__dirname || dirname((0, import_url.fileURLToPath)(import_meta.url));
69948
+ var currentDir = global.__dirname || dirname((0, import_node_url2.fileURLToPath)(import_meta.url));
69949
69949
  var Config = class {
69950
69950
  filepath;
69951
69951
  rootDir;
@@ -70436,13 +70436,16 @@ var pendingConfigPromise = null;
70436
70436
  async function getConfig({
70437
70437
  configPath = DEFAULT_CONFIG_PATH,
70438
70438
  noSchema,
70439
+ forceReload,
70439
70440
  ...extraConfig
70440
70441
  } = {}) {
70441
- if (_config) {
70442
- return _config;
70443
- }
70444
- if (pendingConfigPromise) {
70445
- return await pendingConfigPromise;
70442
+ if (!forceReload) {
70443
+ if (_config) {
70444
+ return _config;
70445
+ }
70446
+ if (pendingConfigPromise) {
70447
+ return await pendingConfigPromise;
70448
+ }
70446
70449
  }
70447
70450
  let resolve2 = () => {
70448
70451
  };
@@ -70460,7 +70463,7 @@ async function getConfig({
70460
70463
  if (!pluginName.startsWith(".")) {
70461
70464
  pluginFile = await pluginPath(pluginName, configPath);
70462
70465
  }
70463
- const { default: pluginInit } = await import((0, import_url.pathToFileURL)(pluginFile).toString());
70466
+ const { default: pluginInit } = await import((0, import_node_url2.pathToFileURL)(pluginFile).toString());
70464
70467
  if (!pluginInit.plugin || !pluginInit.name) {
70465
70468
  throw new HoudiniError({
70466
70469
  filepath: pluginFile,
@@ -70637,8 +70640,8 @@ async function loadSchemaFile(schemaPath) {
70637
70640
  }
70638
70641
 
70639
70642
  // src/lib/graphql.ts
70640
- var import_crypto = __toESM(require("crypto"), 1);
70641
70643
  var graphql3 = __toESM(require_graphql2(), 1);
70644
+ var import_node_crypto = __toESM(require("node:crypto"), 1);
70642
70645
  function getRootType(type) {
70643
70646
  if (graphql3.isNonNullType(type)) {
70644
70647
  return getRootType(type.ofType);
@@ -70652,7 +70655,7 @@ function hashDocument({
70652
70655
  document
70653
70656
  }) {
70654
70657
  const docString = typeof document === "string" ? document : document.artifact?.raw;
70655
- return import_crypto.default.createHash("sha256").update(docString ?? "").digest("hex");
70658
+ return import_node_crypto.default.createHash("sha256").update(docString ?? "").digest("hex");
70656
70659
  }
70657
70660
  function parentTypeFromAncestors(schema, filepath, ancestors) {
70658
70661
  const parents = [...ancestors];
@@ -73600,11 +73603,13 @@ function scalarPropertyValue(config2, missingScalars, target) {
73600
73603
 
73601
73604
  // src/codegen/generators/typescript/typeReference.ts
73602
73605
  var AST8 = recast8.types.builders;
73603
- function tsTypeReference(config2, missingScalars, definition) {
73606
+ function tsTypeReference(config2, missingScalars, definition, body) {
73604
73607
  const { type, wrappers } = unwrapType(config2, definition.type);
73605
73608
  let result;
73606
73609
  if (graphql16.isScalarType(type)) {
73607
73610
  result = scalarPropertyValue(config2, missingScalars, type);
73611
+ } else if (graphql16.isEnumType(type)) {
73612
+ result = enumReference(config2, body, type.name);
73608
73613
  } else {
73609
73614
  result = AST8.tsTypeReference(AST8.identifier(type.name));
73610
73615
  }
@@ -73619,6 +73624,19 @@ function tsTypeReference(config2, missingScalars, definition) {
73619
73624
  }
73620
73625
  return result;
73621
73626
  }
73627
+ function enumReference(config2, body, name) {
73628
+ ensureImports({
73629
+ config: config2,
73630
+ body,
73631
+ import: ["ValueOf"],
73632
+ importKind: "type",
73633
+ sourceModule: "$houdini/runtime/lib/types"
73634
+ });
73635
+ return AST8.tsTypeReference(
73636
+ AST8.identifier("ValueOf"),
73637
+ AST8.tsTypeParameterInstantiation([AST8.tsTypeQuery(AST8.identifier(name))])
73638
+ );
73639
+ }
73622
73640
 
73623
73641
  // src/codegen/generators/typescript/addReferencedInputTypes.ts
73624
73642
  var AST9 = recast9.types.builders;
@@ -73650,7 +73668,7 @@ function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingS
73650
73668
  members.push(
73651
73669
  AST9.tsPropertySignature(
73652
73670
  AST9.identifier(field.name),
73653
- AST9.tsTypeAnnotation(tsTypeReference(config2, missingScalars, field)),
73671
+ AST9.tsTypeAnnotation(tsTypeReference(config2, missingScalars, field, body)),
73654
73672
  graphql17.isNullableType(field.type)
73655
73673
  )
73656
73674
  );
@@ -73681,6 +73699,13 @@ function inlineType({
73681
73699
  if (graphql18.isScalarType(type)) {
73682
73700
  result = scalarPropertyValue(config2, missingScalars, type);
73683
73701
  } else if (graphql18.isEnumType(type)) {
73702
+ ensureImports({
73703
+ config: config2,
73704
+ body,
73705
+ importKind: "type",
73706
+ import: ["ValueOf"],
73707
+ sourceModule: "$houdini/runtime/lib/types"
73708
+ });
73684
73709
  if (!visitedTypes.has(type.name)) {
73685
73710
  ensureImports({
73686
73711
  config: config2,
@@ -73690,7 +73715,7 @@ function inlineType({
73690
73715
  });
73691
73716
  visitedTypes.add(type.name);
73692
73717
  }
73693
- result = AST10.tsTypeReference(AST10.identifier(type.name));
73718
+ result = enumReference(config2, body, type.name);
73694
73719
  } else if (selections) {
73695
73720
  const rootObj = type;
73696
73721
  const inlineFragments = {};
@@ -74123,7 +74148,7 @@ async function generateOperationTypeDefs(config2, filepath, body, definition, se
74123
74148
  return AST11.tsPropertySignature(
74124
74149
  AST11.identifier(definition2.variable.name.value),
74125
74150
  AST11.tsTypeAnnotation(
74126
- tsTypeReference(config2, missingScalars, definition2)
74151
+ tsTypeReference(config2, missingScalars, definition2, body)
74127
74152
  ),
74128
74153
  definition2.type.kind !== "NonNullType"
74129
74154
  );
@@ -74190,7 +74215,12 @@ async function generateFragmentTypeDefs(config2, filepath, body, selections, def
74190
74215
  return AST11.tsPropertySignature(
74191
74216
  AST11.identifier(definition2.variable.name.value),
74192
74217
  AST11.tsTypeAnnotation(
74193
- tsTypeReference(config2, missingScalars, definition2)
74218
+ tsTypeReference(
74219
+ config2,
74220
+ missingScalars,
74221
+ definition2,
74222
+ body
74223
+ )
74194
74224
  ),
74195
74225
  definition2.type.kind !== "NonNullType"
74196
74226
  );
@@ -74283,7 +74313,7 @@ async function imperativeCacheTypef(config2, docs) {
74283
74313
  ),
74284
74314
  AST12.tsPropertySignature(
74285
74315
  AST12.identifier("lists"),
74286
- AST12.tsTypeAnnotation(listDefinitions(config2, docs))
74316
+ AST12.tsTypeAnnotation(listDefinitions(config2, body, docs))
74287
74317
  ),
74288
74318
  AST12.tsPropertySignature(
74289
74319
  AST12.identifier("queries"),
@@ -74392,7 +74422,7 @@ function typeDefinitions(config2, body, docs, returnType) {
74392
74422
  const prop = AST12.tsPropertySignature(
74393
74423
  AST12.identifier(arg.name),
74394
74424
  AST12.tsTypeAnnotation(
74395
- tsTypeReference(config2, /* @__PURE__ */ new Set(), arg)
74425
+ tsTypeReference(config2, /* @__PURE__ */ new Set(), arg, body)
74396
74426
  )
74397
74427
  );
74398
74428
  const unwrapped2 = unwrapType(config2, arg.type);
@@ -74442,7 +74472,7 @@ function typeDefinitions(config2, body, docs, returnType) {
74442
74472
  })
74443
74473
  );
74444
74474
  }
74445
- function listDefinitions(config2, docs) {
74475
+ function listDefinitions(config2, body, docs) {
74446
74476
  const lists = [];
74447
74477
  const visitedLists = /* @__PURE__ */ new Set();
74448
74478
  for (const doc of docs) {
@@ -74499,7 +74529,8 @@ function listDefinitions(config2, docs) {
74499
74529
  tsTypeReference(
74500
74530
  config2,
74501
74531
  /* @__PURE__ */ new Set(),
74502
- arg
74532
+ arg,
74533
+ body
74503
74534
  )
74504
74535
  )
74505
74536
  );
@@ -74693,9 +74724,9 @@ async function definitionsGenerator(config2) {
74693
74724
  ).code;
74694
74725
  const typeDefinitions2 = enums.sort((a, b) => a.name.value.localeCompare(b.name.value)).map(
74695
74726
  (definition) => `
74696
- export declare enum ${definition.name.value} {
74697
- ${definition.values?.map((value) => ` ${value.name.value} = "${value.name.value}"`).join(",\n")}
74698
- }
74727
+ export const ${definition.name.value} = {
74728
+ ${definition.values?.map((value) => ` ${value.name.value}: "${value.name.value}"`).join(",\n")}
74729
+ } as const
74699
74730
  `
74700
74731
  ).join("");
74701
74732
  const definitionsIndex = `
@@ -76070,11 +76101,7 @@ async function pullSchema_default(args) {
76070
76101
  };
76071
76102
  }, headers);
76072
76103
  }
76073
- await pullSchema(
76074
- apiURL,
76075
- config2.schemaPath ? config2.schemaPath : path_exports.resolve(targetPath, "schema.json"),
76076
- headers
76077
- );
76104
+ await pullSchema(apiURL, config2.schemaPath ?? path_exports.resolve(targetPath, "schema.json"), headers);
76078
76105
  }
76079
76106
 
76080
76107
  // src/cmd/generate.ts
@@ -76107,8 +76134,8 @@ async function generate(args = {
76107
76134
  }
76108
76135
 
76109
76136
  // src/cmd/init.ts
76110
- var import_child_process = require("child_process");
76111
76137
  var import_graphql31 = __toESM(require_graphql2(), 1);
76138
+ var import_node_child_process = require("node:child_process");
76112
76139
  var import_prompts = __toESM(require_prompts3(), 1);
76113
76140
  async function init(_path, args) {
76114
76141
  const force_remote_endpoint = args.force_remote_endpoint || false;
@@ -76140,7 +76167,7 @@ async function init(_path, args) {
76140
76167
  }
76141
76168
  } while (dir !== (dir = path_exports.dirname(dir)));
76142
76169
  if (use_git) {
76143
- const status = (0, import_child_process.execSync)("git status --porcelain", { stdio: "pipe" }).toString();
76170
+ const status = (0, import_node_child_process.execSync)("git status --porcelain", { stdio: "pipe" }).toString();
76144
76171
  if (status) {
76145
76172
  const message = "Your git working directory is dirty \u2014 we recommend committing your changes before running this migration.\n";
76146
76173
  console.error(message);
@@ -76480,8 +76507,8 @@ async function updatePackageJSON(targetPath) {
76480
76507
  }
76481
76508
  packageJSON.devDependencies = {
76482
76509
  ...packageJSON.devDependencies,
76483
- houdini: "^1.0.0-next.7",
76484
- "houdini-svelte": "^1.0.0-next.7"
76510
+ houdini: "^1.0.0-next.9",
76511
+ "houdini-svelte": "^1.0.0-next.9"
76485
76512
  };
76486
76513
  await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
76487
76514
  }