houdini-svelte 2.2.0-next.5 → 3.0.0-next.7

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.
@@ -2373,7 +2373,7 @@ var require_path_visitor4 = __commonJS({
2373
2373
  }
2374
2374
  return target;
2375
2375
  }
2376
- PathVisitor.visit = function visit55(node, methods) {
2376
+ PathVisitor.visit = function visit54(node, methods) {
2377
2377
  return PathVisitor.fromMethodsObject(methods).visit(node);
2378
2378
  };
2379
2379
  var PVp = PathVisitor.prototype;
@@ -2564,7 +2564,7 @@ var require_path_visitor4 = __commonJS({
2564
2564
  this.needToCallTraverse = false;
2565
2565
  return visitChildren(path7, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
2566
2566
  };
2567
- sharedContextProtoMethods.visit = function visit55(path7, newVisitor) {
2567
+ sharedContextProtoMethods.visit = function visit54(path7, newVisitor) {
2568
2568
  if (!(this instanceof this.Context)) {
2569
2569
  throw new Error("");
2570
2570
  }
@@ -4006,7 +4006,7 @@ var require_main5 = __commonJS({
4006
4006
  var someField = _a.someField;
4007
4007
  var Type = _a.Type;
4008
4008
  var use = _a.use;
4009
- var visit55 = _a.visit;
4009
+ var visit54 = _a.visit;
4010
4010
  exports.astNodesAreEquivalent = astNodesAreEquivalent;
4011
4011
  exports.builders = builders;
4012
4012
  exports.builtInTypes = builtInTypes;
@@ -4023,7 +4023,7 @@ var require_main5 = __commonJS({
4023
4023
  exports.someField = someField;
4024
4024
  exports.Type = Type;
4025
4025
  exports.use = use;
4026
- exports.visit = visit55;
4026
+ exports.visit = visit54;
4027
4027
  Object.assign(namedTypes_1.namedTypes, n);
4028
4028
  }
4029
4029
  });
@@ -6102,7 +6102,7 @@ var require_esprima7 = __commonJS({
6102
6102
  var jsx_parser_1 = __webpack_require__(3);
6103
6103
  var parser_1 = __webpack_require__(8);
6104
6104
  var tokenizer_1 = __webpack_require__(15);
6105
- function parse25(code, options, delegate) {
6105
+ function parse23(code, options, delegate) {
6106
6106
  var commentHandler = null;
6107
6107
  var proxyDelegate = function(node, metadata) {
6108
6108
  if (delegate) {
@@ -6147,17 +6147,17 @@ var require_esprima7 = __commonJS({
6147
6147
  }
6148
6148
  return ast;
6149
6149
  }
6150
- exports2.parse = parse25;
6150
+ exports2.parse = parse23;
6151
6151
  function parseModule(code, options, delegate) {
6152
6152
  var parsingOptions = options || {};
6153
6153
  parsingOptions.sourceType = "module";
6154
- return parse25(code, parsingOptions, delegate);
6154
+ return parse23(code, parsingOptions, delegate);
6155
6155
  }
6156
6156
  exports2.parseModule = parseModule;
6157
6157
  function parseScript(code, options, delegate) {
6158
6158
  var parsingOptions = options || {};
6159
6159
  parsingOptions.sourceType = "script";
6160
- return parse25(code, parsingOptions, delegate);
6160
+ return parse23(code, parsingOptions, delegate);
6161
6161
  }
6162
6162
  exports2.parseScript = parseScript;
6163
6163
  function tokenize(code, options, delegate) {
@@ -12297,7 +12297,7 @@ var require_esprima8 = __commonJS({
12297
12297
  Object.defineProperty(exports, "__esModule", { value: true });
12298
12298
  exports.parse = void 0;
12299
12299
  var util_1 = require_util6();
12300
- function parse25(source, options) {
12300
+ function parse23(source, options) {
12301
12301
  var comments = [];
12302
12302
  var ast = require_esprima7().parse(source, {
12303
12303
  loc: true,
@@ -12315,7 +12315,7 @@ var require_esprima8 = __commonJS({
12315
12315
  }
12316
12316
  return ast;
12317
12317
  }
12318
- exports.parse = parse25;
12318
+ exports.parse = parse23;
12319
12319
  }
12320
12320
  });
12321
12321
 
@@ -13453,7 +13453,7 @@ var require_parser4 = __commonJS({
13453
13453
  var lines_1 = require_lines4();
13454
13454
  var comments_1 = require_comments4();
13455
13455
  var util = tslib_1.__importStar(require_util6());
13456
- function parse25(source, options) {
13456
+ function parse23(source, options) {
13457
13457
  options = (0, options_1.normalize)(options);
13458
13458
  var lines = (0, lines_1.fromString)(source, options);
13459
13459
  var sourceWithoutTabs = lines.toString({
@@ -13525,7 +13525,7 @@ var require_parser4 = __commonJS({
13525
13525
  (0, comments_1.attach)(comments, program.body.length ? file.program : file, lines);
13526
13526
  return new TreeCopier(lines, tokens).copy(file);
13527
13527
  }
13528
- exports.parse = parse25;
13528
+ exports.parse = parse23;
13529
13529
  var TreeCopier = function TreeCopier2(lines, tokens) {
13530
13530
  assert_1.default.ok(this instanceof TreeCopier2);
13531
13531
  this.lines = lines;
@@ -19598,7 +19598,7 @@ var require_jsonfile = __commonJS2({
19598
19598
  }
19599
19599
  var universalify = require_universalify();
19600
19600
  var { stringify, stripBom } = require_utils2();
19601
- async function _readFile2(file, options = {}) {
19601
+ async function _readFile(file, options = {}) {
19602
19602
  if (typeof options === "string") {
19603
19603
  options = { encoding: options };
19604
19604
  }
@@ -19619,7 +19619,7 @@ var require_jsonfile = __commonJS2({
19619
19619
  }
19620
19620
  return obj;
19621
19621
  }
19622
- var readFile22 = universalify.fromPromise(_readFile2);
19622
+ var readFile22 = universalify.fromPromise(_readFile);
19623
19623
  function readFileSync22(file, options = {}) {
19624
19624
  if (typeof options === "string") {
19625
19625
  options = { encoding: options };
@@ -20373,49 +20373,49 @@ var require_Dirent = __commonJS2({
20373
20373
  var S_IFLNK = constants_1.constants.S_IFLNK;
20374
20374
  var S_IFIFO = constants_1.constants.S_IFIFO;
20375
20375
  var S_IFSOCK = constants_1.constants.S_IFSOCK;
20376
- var Dirent2 = (
20376
+ var Dirent = (
20377
20377
  /** @class */
20378
20378
  function() {
20379
- function Dirent22() {
20379
+ function Dirent2() {
20380
20380
  this.name = "";
20381
20381
  this.mode = 0;
20382
20382
  }
20383
- Dirent22.build = function(link, encoding) {
20384
- var dirent = new Dirent22();
20383
+ Dirent2.build = function(link, encoding) {
20384
+ var dirent = new Dirent2();
20385
20385
  var mode = link.getNode().mode;
20386
20386
  dirent.name = (0, encoding_1.strToEncoding)(link.getName(), encoding);
20387
20387
  dirent.mode = mode;
20388
20388
  return dirent;
20389
20389
  };
20390
- Dirent22.prototype._checkModeProperty = function(property) {
20390
+ Dirent2.prototype._checkModeProperty = function(property) {
20391
20391
  return (this.mode & S_IFMT) === property;
20392
20392
  };
20393
- Dirent22.prototype.isDirectory = function() {
20393
+ Dirent2.prototype.isDirectory = function() {
20394
20394
  return this._checkModeProperty(S_IFDIR);
20395
20395
  };
20396
- Dirent22.prototype.isFile = function() {
20396
+ Dirent2.prototype.isFile = function() {
20397
20397
  return this._checkModeProperty(S_IFREG);
20398
20398
  };
20399
- Dirent22.prototype.isBlockDevice = function() {
20399
+ Dirent2.prototype.isBlockDevice = function() {
20400
20400
  return this._checkModeProperty(S_IFBLK);
20401
20401
  };
20402
- Dirent22.prototype.isCharacterDevice = function() {
20402
+ Dirent2.prototype.isCharacterDevice = function() {
20403
20403
  return this._checkModeProperty(S_IFCHR);
20404
20404
  };
20405
- Dirent22.prototype.isSymbolicLink = function() {
20405
+ Dirent2.prototype.isSymbolicLink = function() {
20406
20406
  return this._checkModeProperty(S_IFLNK);
20407
20407
  };
20408
- Dirent22.prototype.isFIFO = function() {
20408
+ Dirent2.prototype.isFIFO = function() {
20409
20409
  return this._checkModeProperty(S_IFIFO);
20410
20410
  };
20411
- Dirent22.prototype.isSocket = function() {
20411
+ Dirent2.prototype.isSocket = function() {
20412
20412
  return this._checkModeProperty(S_IFSOCK);
20413
20413
  };
20414
- return Dirent22;
20414
+ return Dirent2;
20415
20415
  }()
20416
20416
  );
20417
- exports.Dirent = Dirent2;
20418
- exports.default = Dirent2;
20417
+ exports.Dirent = Dirent;
20418
+ exports.default = Dirent;
20419
20419
  }
20420
20420
  });
20421
20421
  var require_setImmediate = __commonJS2({
@@ -85294,15 +85294,6 @@ function serialized_manifest_path(config, base = base_dir(config)) {
85294
85294
  return join2(base, "manifest.json");
85295
85295
  }
85296
85296
  var t2 = __toESM2(require_lib5(), 1);
85297
- function definitionFromAncestors(ancestors) {
85298
- let parents = [...ancestors];
85299
- parents.shift();
85300
- let definition = parents.shift();
85301
- while (Array.isArray(definition) && definition) {
85302
- definition = parents.shift();
85303
- }
85304
- return { parents, definition };
85305
- }
85306
85297
  function formatErrors(e22, afterError) {
85307
85298
  const errors = Array.isArray(e22) ? e22 : [e22];
85308
85299
  for (const error of errors) {
@@ -91165,7 +91156,7 @@ var require_jsonfile3 = __commonJS3({
91165
91156
  }
91166
91157
  var universalify = require_universalify2();
91167
91158
  var { stringify, stripBom } = require_utils22();
91168
- async function _readFile2(file, options = {}) {
91159
+ async function _readFile(file, options = {}) {
91169
91160
  if (typeof options === "string") {
91170
91161
  options = { encoding: options };
91171
91162
  }
@@ -91186,7 +91177,7 @@ var require_jsonfile3 = __commonJS3({
91186
91177
  }
91187
91178
  return obj;
91188
91179
  }
91189
- var readFile22 = universalify.fromPromise(_readFile2);
91180
+ var readFile22 = universalify.fromPromise(_readFile);
91190
91181
  function readFileSync22(file, options = {}) {
91191
91182
  if (typeof options === "string") {
91192
91183
  options = { encoding: options };
@@ -91940,49 +91931,49 @@ var require_Dirent2 = __commonJS3({
91940
91931
  var S_IFLNK = constants_1.constants.S_IFLNK;
91941
91932
  var S_IFIFO = constants_1.constants.S_IFIFO;
91942
91933
  var S_IFSOCK = constants_1.constants.S_IFSOCK;
91943
- var Dirent2 = (
91934
+ var Dirent = (
91944
91935
  /** @class */
91945
91936
  function() {
91946
- function Dirent22() {
91937
+ function Dirent2() {
91947
91938
  this.name = "";
91948
91939
  this.mode = 0;
91949
91940
  }
91950
- Dirent22.build = function(link, encoding) {
91951
- var dirent = new Dirent22();
91941
+ Dirent2.build = function(link, encoding) {
91942
+ var dirent = new Dirent2();
91952
91943
  var mode = link.getNode().mode;
91953
91944
  dirent.name = (0, encoding_1.strToEncoding)(link.getName(), encoding);
91954
91945
  dirent.mode = mode;
91955
91946
  return dirent;
91956
91947
  };
91957
- Dirent22.prototype._checkModeProperty = function(property) {
91948
+ Dirent2.prototype._checkModeProperty = function(property) {
91958
91949
  return (this.mode & S_IFMT) === property;
91959
91950
  };
91960
- Dirent22.prototype.isDirectory = function() {
91951
+ Dirent2.prototype.isDirectory = function() {
91961
91952
  return this._checkModeProperty(S_IFDIR);
91962
91953
  };
91963
- Dirent22.prototype.isFile = function() {
91954
+ Dirent2.prototype.isFile = function() {
91964
91955
  return this._checkModeProperty(S_IFREG);
91965
91956
  };
91966
- Dirent22.prototype.isBlockDevice = function() {
91957
+ Dirent2.prototype.isBlockDevice = function() {
91967
91958
  return this._checkModeProperty(S_IFBLK);
91968
91959
  };
91969
- Dirent22.prototype.isCharacterDevice = function() {
91960
+ Dirent2.prototype.isCharacterDevice = function() {
91970
91961
  return this._checkModeProperty(S_IFCHR);
91971
91962
  };
91972
- Dirent22.prototype.isSymbolicLink = function() {
91963
+ Dirent2.prototype.isSymbolicLink = function() {
91973
91964
  return this._checkModeProperty(S_IFLNK);
91974
91965
  };
91975
- Dirent22.prototype.isFIFO = function() {
91966
+ Dirent2.prototype.isFIFO = function() {
91976
91967
  return this._checkModeProperty(S_IFIFO);
91977
91968
  };
91978
- Dirent22.prototype.isSocket = function() {
91969
+ Dirent2.prototype.isSocket = function() {
91979
91970
  return this._checkModeProperty(S_IFSOCK);
91980
91971
  };
91981
- return Dirent22;
91972
+ return Dirent2;
91982
91973
  }()
91983
91974
  );
91984
- exports.Dirent = Dirent2;
91985
- exports.default = Dirent2;
91975
+ exports.Dirent = Dirent;
91976
+ exports.default = Dirent;
91986
91977
  }
91987
91978
  });
91988
91979
  var require_setImmediate2 = __commonJS3({
@@ -150825,7 +150816,7 @@ function walkAncestors(schema2, filepath, ancestors) {
150825
150816
  }
150826
150817
  return getRootType(field.type);
150827
150818
  }
150828
- function definitionFromAncestors2(ancestors) {
150819
+ function definitionFromAncestors(ancestors) {
150829
150820
  let parents = [...ancestors];
150830
150821
  parents.shift();
150831
150822
  let definition = parents.shift();
@@ -160326,7 +160317,7 @@ async function typeCheck(config, docs) {
160326
160317
  if (![config.listDirective, config.paginateDirective].includes(directive.name.value)) {
160327
160318
  return;
160328
160319
  }
160329
- const { parents, definition } = definitionFromAncestors2(ancestors);
160320
+ const { parents, definition } = definitionFromAncestors(ancestors);
160330
160321
  let needsParent = false;
160331
160322
  if (definition.kind !== "OperationDefinition" && definition.kind !== "FragmentDefinition" || definition.kind === "OperationDefinition" && definition.operation !== "query") {
160332
160323
  errors.push(
@@ -160992,7 +160983,7 @@ function nodeDirectives(config, directives) {
160992
160983
  if (!directives.includes(node.name.value)) {
160993
160984
  return;
160994
160985
  }
160995
- let { definition } = definitionFromAncestors2(ancestors);
160986
+ let { definition } = definitionFromAncestors(ancestors);
160996
160987
  let definitionType = "";
160997
160988
  if (definition.kind === "OperationDefinition") {
160998
160989
  if (definition.operation !== "query") {
@@ -162145,49 +162136,49 @@ var require_Dirent3 = __commonJS4({
162145
162136
  var S_IFLNK = constants_1.constants.S_IFLNK;
162146
162137
  var S_IFIFO = constants_1.constants.S_IFIFO;
162147
162138
  var S_IFSOCK = constants_1.constants.S_IFSOCK;
162148
- var Dirent2 = (
162139
+ var Dirent = (
162149
162140
  /** @class */
162150
162141
  function() {
162151
- function Dirent22() {
162142
+ function Dirent2() {
162152
162143
  this.name = "";
162153
162144
  this.mode = 0;
162154
162145
  }
162155
- Dirent22.build = function(link, encoding) {
162156
- var dirent = new Dirent22();
162146
+ Dirent2.build = function(link, encoding) {
162147
+ var dirent = new Dirent2();
162157
162148
  var mode = link.getNode().mode;
162158
162149
  dirent.name = (0, encoding_1.strToEncoding)(link.getName(), encoding);
162159
162150
  dirent.mode = mode;
162160
162151
  return dirent;
162161
162152
  };
162162
- Dirent22.prototype._checkModeProperty = function(property) {
162153
+ Dirent2.prototype._checkModeProperty = function(property) {
162163
162154
  return (this.mode & S_IFMT) === property;
162164
162155
  };
162165
- Dirent22.prototype.isDirectory = function() {
162156
+ Dirent2.prototype.isDirectory = function() {
162166
162157
  return this._checkModeProperty(S_IFDIR);
162167
162158
  };
162168
- Dirent22.prototype.isFile = function() {
162159
+ Dirent2.prototype.isFile = function() {
162169
162160
  return this._checkModeProperty(S_IFREG);
162170
162161
  };
162171
- Dirent22.prototype.isBlockDevice = function() {
162162
+ Dirent2.prototype.isBlockDevice = function() {
162172
162163
  return this._checkModeProperty(S_IFBLK);
162173
162164
  };
162174
- Dirent22.prototype.isCharacterDevice = function() {
162165
+ Dirent2.prototype.isCharacterDevice = function() {
162175
162166
  return this._checkModeProperty(S_IFCHR);
162176
162167
  };
162177
- Dirent22.prototype.isSymbolicLink = function() {
162168
+ Dirent2.prototype.isSymbolicLink = function() {
162178
162169
  return this._checkModeProperty(S_IFLNK);
162179
162170
  };
162180
- Dirent22.prototype.isFIFO = function() {
162171
+ Dirent2.prototype.isFIFO = function() {
162181
162172
  return this._checkModeProperty(S_IFIFO);
162182
162173
  };
162183
- Dirent22.prototype.isSocket = function() {
162174
+ Dirent2.prototype.isSocket = function() {
162184
162175
  return this._checkModeProperty(S_IFSOCK);
162185
162176
  };
162186
- return Dirent22;
162177
+ return Dirent2;
162187
162178
  }()
162188
162179
  );
162189
- exports.Dirent = Dirent2;
162190
- exports.default = Dirent2;
162180
+ exports.Dirent = Dirent;
162181
+ exports.default = Dirent;
162191
162182
  }
162192
162183
  });
162193
162184
  var require_setImmediate3 = __commonJS4({
@@ -168017,7 +168008,7 @@ var require_jsonfile4 = __commonJS4({
168017
168008
  }
168018
168009
  var universalify = require_universalify3();
168019
168010
  var { stringify, stripBom } = require_utils23();
168020
- async function _readFile2(file, options = {}) {
168011
+ async function _readFile(file, options = {}) {
168021
168012
  if (typeof options === "string") {
168022
168013
  options = { encoding: options };
168023
168014
  }
@@ -168038,7 +168029,7 @@ var require_jsonfile4 = __commonJS4({
168038
168029
  }
168039
168030
  return obj;
168040
168031
  }
168041
- var readFile22 = universalify.fromPromise(_readFile2);
168032
+ var readFile22 = universalify.fromPromise(_readFile);
168042
168033
  function readFileSync22(file, options = {}) {
168043
168034
  if (typeof options === "string") {
168044
168035
  options = { encoding: options };
@@ -228188,8 +228179,6 @@ function plugin_config(config) {
228188
228179
  return {
228189
228180
  client: "./src/client",
228190
228181
  defaultRouteBlocking: false,
228191
- pageQueryFilename: "+page.gql",
228192
- layoutQueryFilename: "+layout.gql",
228193
228182
  static: false,
228194
228183
  forceRunesMode: false,
228195
228184
  ...cfg,
@@ -228207,9 +228196,6 @@ function plugin_config(config) {
228207
228196
  };
228208
228197
  }
228209
228198
 
228210
- // src/plugin/kit.ts
228211
- import * as graphql41 from "graphql";
228212
-
228213
228199
  // ../houdini/build/vite-esm/index.js
228214
228200
  import { createRequire as conflict_free4 } from "module";
228215
228201
  import { statSync as statSync2, createReadStream as createReadStream2, promises as fs22 } from "node:fs";
@@ -231203,7 +231189,7 @@ var require_jsonfile5 = __commonJS5({
231203
231189
  }
231204
231190
  var universalify = require_universalify4();
231205
231191
  var { stringify, stripBom } = require_utils24();
231206
- async function _readFile2(file, options = {}) {
231192
+ async function _readFile(file, options = {}) {
231207
231193
  if (typeof options === "string") {
231208
231194
  options = { encoding: options };
231209
231195
  }
@@ -231224,7 +231210,7 @@ var require_jsonfile5 = __commonJS5({
231224
231210
  }
231225
231211
  return obj;
231226
231212
  }
231227
- var readFile22 = universalify.fromPromise(_readFile2);
231213
+ var readFile22 = universalify.fromPromise(_readFile);
231228
231214
  function readFileSync22(file, options = {}) {
231229
231215
  if (typeof options === "string") {
231230
231216
  options = { encoding: options };
@@ -231978,49 +231964,49 @@ var require_Dirent4 = __commonJS5({
231978
231964
  var S_IFLNK = constants_1.constants.S_IFLNK;
231979
231965
  var S_IFIFO = constants_1.constants.S_IFIFO;
231980
231966
  var S_IFSOCK = constants_1.constants.S_IFSOCK;
231981
- var Dirent2 = (
231967
+ var Dirent = (
231982
231968
  /** @class */
231983
231969
  function() {
231984
- function Dirent22() {
231970
+ function Dirent2() {
231985
231971
  this.name = "";
231986
231972
  this.mode = 0;
231987
231973
  }
231988
- Dirent22.build = function(link, encoding) {
231989
- var dirent = new Dirent22();
231974
+ Dirent2.build = function(link, encoding) {
231975
+ var dirent = new Dirent2();
231990
231976
  var mode = link.getNode().mode;
231991
231977
  dirent.name = (0, encoding_1.strToEncoding)(link.getName(), encoding);
231992
231978
  dirent.mode = mode;
231993
231979
  return dirent;
231994
231980
  };
231995
- Dirent22.prototype._checkModeProperty = function(property) {
231981
+ Dirent2.prototype._checkModeProperty = function(property) {
231996
231982
  return (this.mode & S_IFMT) === property;
231997
231983
  };
231998
- Dirent22.prototype.isDirectory = function() {
231984
+ Dirent2.prototype.isDirectory = function() {
231999
231985
  return this._checkModeProperty(S_IFDIR);
232000
231986
  };
232001
- Dirent22.prototype.isFile = function() {
231987
+ Dirent2.prototype.isFile = function() {
232002
231988
  return this._checkModeProperty(S_IFREG);
232003
231989
  };
232004
- Dirent22.prototype.isBlockDevice = function() {
231990
+ Dirent2.prototype.isBlockDevice = function() {
232005
231991
  return this._checkModeProperty(S_IFBLK);
232006
231992
  };
232007
- Dirent22.prototype.isCharacterDevice = function() {
231993
+ Dirent2.prototype.isCharacterDevice = function() {
232008
231994
  return this._checkModeProperty(S_IFCHR);
232009
231995
  };
232010
- Dirent22.prototype.isSymbolicLink = function() {
231996
+ Dirent2.prototype.isSymbolicLink = function() {
232011
231997
  return this._checkModeProperty(S_IFLNK);
232012
231998
  };
232013
- Dirent22.prototype.isFIFO = function() {
231999
+ Dirent2.prototype.isFIFO = function() {
232014
232000
  return this._checkModeProperty(S_IFIFO);
232015
232001
  };
232016
- Dirent22.prototype.isSocket = function() {
232002
+ Dirent2.prototype.isSocket = function() {
232017
232003
  return this._checkModeProperty(S_IFSOCK);
232018
232004
  };
232019
- return Dirent22;
232005
+ return Dirent2;
232020
232006
  }()
232021
232007
  );
232022
- exports.Dirent = Dirent2;
232023
- exports.default = Dirent2;
232008
+ exports.Dirent = Dirent;
232009
+ exports.default = Dirent;
232024
232010
  }
232025
232011
  });
232026
232012
  var require_setImmediate4 = __commonJS5({
@@ -300238,7 +300224,9 @@ filepath: ${filepath}`
300238
300224
  load.push(element.quasi.quasis[0].value.raw);
300239
300225
  } else if (element.type === "CallExpression") {
300240
300226
  if (element.callee.type !== "Identifier" || element.callee.name !== "graphql" || element.arguments.length !== 1) {
300241
- throw new Error(`only graphql function can be passed to ${houdini_load_fn}`);
300227
+ throw new Error(
300228
+ `only graphql function can be passed to ${houdini_load_fn}. Filepath: ${filepath}`
300229
+ );
300242
300230
  }
300243
300231
  let documentString;
300244
300232
  const argument = element.arguments[0];
@@ -300346,18 +300334,6 @@ function is_layout3(framework2, filename) {
300346
300334
  function is_component(config, framework2, filename) {
300347
300335
  return framework2 === "svelte" || filename.endsWith(".svelte") && !is_route_script(framework2, filename) && !is_route(config, framework2, filename);
300348
300336
  }
300349
- function page_query_path(config, filename) {
300350
- return path_exports.join(
300351
- path_exports.dirname(resolve_relative(config, filename)),
300352
- plugin_config(config).pageQueryFilename
300353
- );
300354
- }
300355
- function layout_query_path(config, filename) {
300356
- return path_exports.join(
300357
- path_exports.dirname(resolve_relative(config, filename)),
300358
- plugin_config(config).layoutQueryFilename
300359
- );
300360
- }
300361
300337
  function resolve_relative(config, filename) {
300362
300338
  const match5 = filename.match("^((../)+)src/routes");
300363
300339
  if (match5) {
@@ -300467,32 +300443,6 @@ async function walk_routes(config, framework2, visitor, dirpath = config.routesD
300467
300443
  componentQueries.push({ query: definition, componentPath: childPath });
300468
300444
  }
300469
300445
  });
300470
- } else if (child === plugin_config(config).layoutQueryFilename) {
300471
- validRoute = true;
300472
- const contents = await fs_exports.readFile(childPath);
300473
- if (!contents) {
300474
- continue;
300475
- }
300476
- try {
300477
- const query = config.extractQueryDefinition(graphql41.parse(contents));
300478
- await visitor.routeLayoutQuery?.(query, childPath);
300479
- layoutQueries.push(query);
300480
- } catch (e3) {
300481
- throw routeQueryError(childPath);
300482
- }
300483
- } else if (child === plugin_config(config).pageQueryFilename) {
300484
- validRoute = true;
300485
- const contents = await fs_exports.readFile(childPath);
300486
- if (!contents) {
300487
- continue;
300488
- }
300489
- try {
300490
- const query = config.extractQueryDefinition(graphql41.parse(contents));
300491
- await visitor.routePageQuery?.(query, childPath);
300492
- pageQueries.push(query);
300493
- } catch (e3) {
300494
- throw routeQueryError(childPath);
300495
- }
300496
300446
  } else {
300497
300447
  continue;
300498
300448
  }
@@ -300524,10 +300474,6 @@ async function walk_routes(config, framework2, visitor, dirpath = config.routesD
300524
300474
  );
300525
300475
  }
300526
300476
  }
300527
- var routeQueryError = (filepath) => ({
300528
- filepath,
300529
- message: "route query error"
300530
- });
300531
300477
  function route_page_path(config, filename) {
300532
300478
  return resolve_relative(config, filename).replace(".js", ".svelte").replace(".ts", ".svelte");
300533
300479
  }
@@ -301219,180 +301165,12 @@ async function codegen_default(input) {
301219
301165
  ]);
301220
301166
  }
301221
301167
 
301222
- // src/plugin/fsPatch.ts
301223
- import filesystem, { Dirent } from "node:fs";
301224
- import filesystemPromises from "node:fs/promises";
301225
-
301226
301168
  // src/plugin/state.ts
301227
301169
  var _config;
301228
301170
  function setConfig(config) {
301229
301171
  _config = config;
301230
301172
  }
301231
301173
 
301232
- // src/plugin/fsPatch.ts
301233
- var fsPatch_default = (getFramework) => ({
301234
- async resolveId(filepath, _, { config, isEntry }) {
301235
- if (!isEntry) {
301236
- const match5 = filepath.match("^((../)+)src/routes");
301237
- if (match5) {
301238
- return path_exports.join(config.projectRoot, filepath.substring(match5[1].length));
301239
- }
301240
- return filepath.startsWith("/src") ? { id: path_exports.join(config.projectRoot, filepath) } : null;
301241
- }
301242
- filepath = path_exports.posixify(filepath.toString());
301243
- if (is_route_script(getFramework(), filepath) || is_root_layout(config, filepath) || is_root_layout_server(config, filepath)) {
301244
- return {
301245
- id: resolve_relative(config, filepath)
301246
- };
301247
- }
301248
- },
301249
- load: async (filepath, { config }) => {
301250
- filepath = path_exports.posixify(filepath.toString());
301251
- if (is_route_script(getFramework(), filepath) || is_root_layout_server(config, filepath)) {
301252
- filepath = resolve_relative(config, filepath);
301253
- return {
301254
- code: await fs_exports.readFile(filepath) || await fs_exports.readFile(path_exports.join(config.projectRoot, filepath)) || ""
301255
- };
301256
- }
301257
- if (is_root_layout(config, filepath)) {
301258
- filepath = resolve_relative(config, filepath);
301259
- return {
301260
- code: await fs_exports.readFile(filepath) || await fs_exports.readFile(path_exports.join(config.projectRoot, filepath)) || empty_layout
301261
- };
301262
- }
301263
- }
301264
- });
301265
- var _readDirSync = filesystem.readdirSync;
301266
- var _statSync = filesystem.statSync;
301267
- var _readFileSync = filesystem.readFileSync;
301268
- var _unlinkSync = filesystem.unlinkSync;
301269
- function getStringFilepath(fp) {
301270
- if (fp instanceof URL) {
301271
- return fp.pathname;
301272
- }
301273
- return fp.toString();
301274
- }
301275
- filesystem.readFileSync = function(fp, options) {
301276
- const filepath = getStringFilepath(fp);
301277
- if (filepath.endsWith("+page.js") || filepath.endsWith("+layout.js") || filepath.replace(".ts", ".js").endsWith("+layout.server.js")) {
301278
- try {
301279
- return _readFileSync(fp, options);
301280
- } catch {
301281
- return typeof options === "string" || options?.encoding ? "" : Buffer.from("");
301282
- }
301283
- }
301284
- if (filepath.endsWith(path_exports.join("src", "routes", "+layout.svelte"))) {
301285
- try {
301286
- return _readFileSync(fp, options);
301287
- } catch {
301288
- return typeof options === "string" || options?.encoding ? empty_layout : Buffer.from(empty_layout);
301289
- }
301290
- }
301291
- return _readFileSync(fp, options);
301292
- };
301293
- filesystem.statSync = function(fp, options) {
301294
- let filepath = getStringFilepath(fp);
301295
- if (!filepath.includes("routes") || !path_exports.basename(filepath).startsWith("+")) {
301296
- return _statSync(fp, options);
301297
- }
301298
- try {
301299
- const result = _statSync(fp, options);
301300
- return result;
301301
- } catch (error) {
301302
- filepath = path_exports.posixify(filepath);
301303
- const mock5 = virtual_file(path_exports.basename(filepath), { withFileTypes: true });
301304
- if (filepath.endsWith(path_exports.join("routes", "+layout.svelte")) || filepath.endsWith(path_exports.join("routes", "+layout.svelte")) || filepath.endsWith(path_exports.join("routes", "+layout.server.js")) || filepath.endsWith(path_exports.join("routes", "+layout.server.js"))) {
301305
- return mock5;
301306
- } else if (filepath.endsWith("+layout.js")) {
301307
- return mock5;
301308
- } else if (filepath.endsWith("+page.js")) {
301309
- return mock5;
301310
- }
301311
- throw error;
301312
- }
301313
- };
301314
- filesystem.unlinkSync = function(filepath) {
301315
- try {
301316
- _unlinkSync(filepath);
301317
- } catch {
301318
- }
301319
- };
301320
- filesystem.readdirSync = function(fp, options) {
301321
- const filepath = getStringFilepath(fp);
301322
- if (!filepath.includes("routes")) return _readDirSync(fp, options);
301323
- const result = _readDirSync(fp, options);
301324
- const file_names = result.map((file) => {
301325
- if (file instanceof Dirent) {
301326
- return file.name;
301327
- } else if (typeof file === "string") {
301328
- return file;
301329
- } else {
301330
- return "";
301331
- }
301332
- });
301333
- function contains(...names) {
301334
- return names.some((name) => file_names.includes(name));
301335
- }
301336
- if (contains("+page.svelte", "+page.gql") && !contains("+page.js", "+page.ts")) {
301337
- result.push(virtual_file("+page.js", options));
301338
- }
301339
- const posix_filepath = path_exports.posixify(filepath);
301340
- if ((is_root_route(posix_filepath) || contains("+layout.svelte", "+layout.gql")) && !contains("+layout.ts", "+layout.js")) {
301341
- result.push(virtual_file("+layout.js", options));
301342
- }
301343
- if (is_root_route(posix_filepath) && !contains("+layout.svelte")) {
301344
- result.push(virtual_file("+layout.svelte", options));
301345
- }
301346
- if (is_root_route(posix_filepath) && !contains("+layout.server.js", "+layout.server.ts") && !plugin_config(_config).static) {
301347
- result.push(virtual_file("+layout.server.js", options));
301348
- }
301349
- return result;
301350
- };
301351
- Object.defineProperty(globalThis, "fs", {
301352
- configurable: true,
301353
- enumerable: true,
301354
- value: filesystem
301355
- });
301356
- var _readFile = filesystemPromises.readFile;
301357
- filesystemPromises.readFile = async (path7, options) => {
301358
- if (path7.toString().endsWith("+layout.svelte")) {
301359
- try {
301360
- return await _readFile(path7, options);
301361
- } catch {
301362
- return typeof options === "string" || options?.encoding ? empty_layout : Buffer.from(empty_layout);
301363
- }
301364
- }
301365
- return _readFile(path7, options);
301366
- };
301367
- Object.defineProperty(globalThis, "fs/promises", {
301368
- configurable: true,
301369
- enumerable: true,
301370
- value: filesystemPromises
301371
- });
301372
- function virtual_file(name, options) {
301373
- return !options?.withFileTypes ? name : {
301374
- name,
301375
- isFile: () => true,
301376
- isDirectory: () => false,
301377
- isBlockDevice: () => false,
301378
- isFIFO: () => false,
301379
- isCharacterDevice: () => false,
301380
- isSocket: () => false,
301381
- isSymbolicLink: () => false
301382
- };
301383
- }
301384
- function is_root_route(filepath) {
301385
- filepath = filepath.toString();
301386
- if (filepath.toString().endsWith("/")) {
301387
- filepath = filepath.slice(0, -1);
301388
- }
301389
- return filepath.endsWith(path_exports.join("src", "routes")) && // ignore the src/routes that exists in the type roots
301390
- !filepath.includes(".svelte-kit") && // ! Hey! This second value always needs to correspond to the default value for the runtimeDir
301391
- // if you're changing this here, please also update it in `/packages/houdini/src/lib/config.ts`
301392
- !filepath.includes(_config.runtimeDir ?? "$houdini");
301393
- }
301394
- var empty_layout = "<slot />";
301395
-
301396
301174
  // src/plugin/transforms/index.ts
301397
301175
  var recast25 = __toESM(require_main6(), 1);
301398
301176
 
@@ -301703,7 +301481,6 @@ async function kit_init(page) {
301703
301481
  }
301704
301482
 
301705
301483
  // src/plugin/transforms/kit/load.ts
301706
- import * as graphql45 from "graphql";
301707
301484
  var recast19 = __toESM(require_main6(), 1);
301708
301485
  var AST20 = recast19.types.builders;
301709
301486
  async function kit_load_generator(page) {
@@ -301718,9 +301495,7 @@ async function kit_load_generator(page) {
301718
301495
  page,
301719
301496
  artifact: { name }
301720
301497
  }).id;
301721
- const [page_query, layout_query, inline_queries, page_info] = await Promise.all([
301722
- find_special_query("Page", page),
301723
- find_special_query("Layout", page),
301498
+ const [inline_queries, page_info] = await Promise.all([
301724
301499
  find_inline_queries(
301725
301500
  page,
301726
301501
  // if we are currently on the route file, there's nothing to parse
@@ -301739,12 +301514,6 @@ async function kit_load_generator(page) {
301739
301514
  if (script) {
301740
301515
  const queries_that_needs_a_load = [...houdini_load_queries, ...inline_queries];
301741
301516
  const isLayout = is_layout3(page.framework, page.filepath);
301742
- if (isLayout && layout_query) {
301743
- queries_that_needs_a_load.push(layout_query);
301744
- }
301745
- if (!isLayout && page_query) {
301746
- queries_that_needs_a_load.push(page_query);
301747
- }
301748
301517
  add_load({
301749
301518
  page,
301750
301519
  queries: queries_that_needs_a_load,
@@ -301991,22 +301760,6 @@ function add_load({
301991
301760
  );
301992
301761
  }
301993
301762
  }
301994
- async function find_special_query(type, page) {
301995
- const query_path = type === "Page" ? page_query_path(page.config, page.filepath) : layout_query_path(page.config, page.filepath);
301996
- const contents = await fs_exports.readFile(query_path);
301997
- if (!contents) {
301998
- return null;
301999
- }
302000
- const parsed = graphql45.parse(contents);
302001
- const definition = parsed.definitions.find(
302002
- (defn) => defn.kind === "OperationDefinition" && defn.operation === "query"
302003
- );
302004
- if (!definition) {
302005
- formatErrors({ message: "gql file must contain a query.", filepath: query_path });
302006
- return null;
302007
- }
302008
- return definition;
302009
- }
302010
301763
  function load_hook_statements(name, request_context, input_id, result_id) {
302011
301764
  return AST20.expressionStatement(
302012
301765
  AST20.awaitExpression(
@@ -302367,7 +302120,6 @@ function replace_tag_content(source, start, end, insert) {
302367
302120
  var replace_between = (origin, startIndex, endIndex, insertion) => origin.substring(0, startIndex) + insertion + origin.substring(endIndex);
302368
302121
 
302369
302122
  // src/plugin/validate.ts
302370
- import * as graphql46 from "graphql";
302371
302123
  async function validate4({
302372
302124
  config,
302373
302125
  documents
@@ -302394,28 +302146,6 @@ async function validate4({
302394
302146
  })
302395
302147
  );
302396
302148
  }
302397
- graphql46.visit(doc.document, {
302398
- Directive(node, _, __, ___, ancestors) {
302399
- const blockingDirectives = [
302400
- config.blockingDirective,
302401
- config.blockingDisableDirective
302402
- ];
302403
- if (!blockingDirectives.includes(node.name.value)) {
302404
- return;
302405
- }
302406
- const { definition } = definitionFromAncestors(ancestors);
302407
- const listDirective = definition.directives?.map((c) => c.name.value) ?? [];
302408
- if (listDirective.includes(config.blockingDirective) && listDirective.includes(config.blockingDisableDirective)) {
302409
- errors.push(
302410
- new HoudiniError({
302411
- filepath: doc.filename,
302412
- message: `You can't apply both @${config.blockingDirective} and @${config.blockingDisableDirective} at the same time`
302413
- })
302414
- );
302415
- }
302416
- return;
302417
- }
302418
- });
302419
302149
  }
302420
302150
  if (errors.length > 0) {
302421
302151
  throw errors;
@@ -302474,24 +302204,6 @@ export const redirect = svelteKitRedirect
302474
302204
  artifactData,
302475
302205
  // custom logic to pull a graphql document out of a svelte file
302476
302206
  extractDocuments: extract_default,
302477
- schema({ config }) {
302478
- return `
302479
- """
302480
- @${config.loadDirective} is used to enable automatic fetch on inline queries.
302481
- """
302482
- directive @${config.loadDirective} on QUERY
302483
-
302484
- """
302485
- @${config.blockingDirective} is used to always await the fetch.
302486
- """
302487
- directive @${config.blockingDirective} on QUERY
302488
-
302489
- """
302490
- @${config.blockingDisableDirective} is used to not always await the fetch (in CSR for example). Note that "throwOnError" will not throw in this case.
302491
- """
302492
- directive @${config.blockingDisableDirective} on QUERY
302493
- `;
302494
- },
302495
302207
  // we have some custom document validation logic
302496
302208
  validate: validate4,
302497
302209
  // we need to write the svelte specific runtime
@@ -302529,10 +302241,6 @@ directive @${config.blockingDisableDirective} on QUERY
302529
302241
  include({ config, filepath }) {
302530
302242
  return config.includeFile(resolve_relative(config, filepath), { ignore_plugins: true });
302531
302243
  },
302532
- // add custom vite config
302533
- vite: {
302534
- ...fsPatch_default(() => framework)
302535
- },
302536
302244
  /**
302537
302245
  * Setup
302538
302246
  */
@@ -302634,8 +302342,6 @@ async function route_test({
302634
302342
  await Promise.all([
302635
302343
  fs_exports.writeFile(page_path, component),
302636
302344
  fs_exports.writeFile(route_data_path(config, page_path), script),
302637
- fs_exports.writeFile(page_query_path(config, page_path), page_query),
302638
- fs_exports.writeFile(layout_query_path(config, page_path), layout_query),
302639
302345
  fs_exports.writeFile(layout_path, layout),
302640
302346
  fs_exports.writeFile(layout_script_path, layout_script)
302641
302347
  ]);