houdini-svelte 2.1.6 → 2.1.8

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.
@@ -808,11 +808,11 @@ var require_types2 = __commonJS({
808
808
  }();
809
809
  exports.Def = Def;
810
810
  var Field = function() {
811
- function Field2(name, type, defaultFn, hidden6) {
811
+ function Field2(name, type, defaultFn, hidden5) {
812
812
  this.name = name;
813
813
  this.type = type;
814
814
  this.defaultFn = defaultFn;
815
- this.hidden = !!hidden6;
815
+ this.hidden = !!hidden5;
816
816
  }
817
817
  Field2.prototype.toString = function() {
818
818
  return JSON.stringify(this.name) + ": " + this.type;
@@ -1061,12 +1061,12 @@ var require_types2 = __commonJS({
1061
1061
  });
1062
1062
  return this;
1063
1063
  };
1064
- DefImpl2.prototype.field = function(name, type, defaultFn, hidden6) {
1064
+ DefImpl2.prototype.field = function(name, type, defaultFn, hidden5) {
1065
1065
  if (this.finalized) {
1066
1066
  console.error("Ignoring attempt to redefine field " + JSON.stringify(name) + " of finalized type " + JSON.stringify(this.typeName));
1067
1067
  return this;
1068
1068
  }
1069
- this.ownFields[name] = new Field(name, Type.from(type), defaultFn, hidden6);
1069
+ this.ownFields[name] = new Field(name, Type.from(type), defaultFn, hidden5);
1070
1070
  return this;
1071
1071
  };
1072
1072
  DefImpl2.prototype.finalize = function() {
@@ -2446,7 +2446,7 @@ var require_path_visitor2 = __commonJS({
2446
2446
  return Context;
2447
2447
  }
2448
2448
  var sharedContextProtoMethods = /* @__PURE__ */ Object.create(null);
2449
- sharedContextProtoMethods.reset = function reset6(path5) {
2449
+ sharedContextProtoMethods.reset = function reset5(path5) {
2450
2450
  if (!(this instanceof this.Context)) {
2451
2451
  throw new Error("");
2452
2452
  }
@@ -16397,7 +16397,7 @@ import { Kind as Kind12 } from "graphql";
16397
16397
  import { Kind as Kind13 } from "graphql";
16398
16398
  import { Kind as Kind14 } from "graphql";
16399
16399
  import { parse as parse2, Kind as Kind16, isSchema, isDefinitionNode } from "graphql";
16400
- import * as graphql4 from "graphql";
16400
+ import * as graphql5 from "graphql";
16401
16401
  import { fileURLToPath as fileURLToPath3, pathToFileURL } from "node:url";
16402
16402
  import { fileURLToPath as fileURLToPath2 } from "node:url";
16403
16403
  import { posix, win32 } from "node:path";
@@ -16426,10 +16426,10 @@ import http from "node:http";
16426
16426
  import { format as formatUrl } from "node:url";
16427
16427
  import { deprecate as deprecate2 } from "node:util";
16428
16428
  import { isIP } from "node:net";
16429
- import * as graphql2 from "graphql";
16430
16429
  import * as graphql3 from "graphql";
16430
+ import * as graphql2 from "graphql";
16431
+ import * as graphql4 from "graphql";
16431
16432
  import path3 from "node:path";
16432
- import * as graphql5 from "graphql";
16433
16433
  import * as graphql6 from "graphql";
16434
16434
  import * as graphql7 from "graphql";
16435
16435
  var require2 = conflict_free(import.meta.url);
@@ -82780,43 +82780,43 @@ __export2(conventions_exports, {
82780
82780
  vite_render_path: () => vite_render_path
82781
82781
  });
82782
82782
  function router_path(config) {
82783
- return path_exports.join(base_dir(config), "Router.jsx");
82783
+ return join2(base_dir(config), "Router.jsx");
82784
82784
  }
82785
82785
  function page_entry_path(config, id, base) {
82786
- return path_exports.join(page_entries_dir(config, base), `${id}.jsx`);
82786
+ return join2(page_entries_dir(config, base), `${id}.jsx`);
82787
82787
  }
82788
82788
  function server_adapter_path(config, base) {
82789
- return path_exports.join(units_dir(config, base), "render", "server.js");
82789
+ return join2(units_dir(config, base), "render", "server.js");
82790
82790
  }
82791
82791
  function adapter_config_path(config, base) {
82792
- return path_exports.join(units_dir(config, base), "render", "config.js");
82792
+ return join2(units_dir(config, base), "render", "config.js");
82793
82793
  }
82794
82794
  function vite_render_path(config, base) {
82795
- return path_exports.join(units_dir(config, base), "render", "vite.js");
82795
+ return join2(units_dir(config, base), "render", "vite.js");
82796
82796
  }
82797
82797
  function app_component_path(config, base) {
82798
- return path_exports.join(units_dir(config, base), "render", "App.jsx");
82798
+ return join2(units_dir(config, base), "render", "App.jsx");
82799
82799
  }
82800
82800
  function page_unit_path(config, id, base) {
82801
- return path_exports.join(page_units_dir(config, base), `${id}.jsx`);
82801
+ return join2(page_units_dir(config, base), `${id}.jsx`);
82802
82802
  }
82803
82803
  function layout_unit_path(config, id, base) {
82804
- return path_exports.join(layout_units_dir(config, base), `${id}.jsx`);
82804
+ return join2(layout_units_dir(config, base), `${id}.jsx`);
82805
82805
  }
82806
82806
  function componentField_unit_path(config, id, base) {
82807
- return path_exports.join(units_dir(config, base), "componentFields", `wrapper_${id}.jsx`);
82807
+ return join2(units_dir(config, base), "componentFields", `wrapper_${id}.jsx`);
82808
82808
  }
82809
82809
  function fallback_unit_path(config, which, id, base) {
82810
- return path_exports.join(fallbacks_units_dir(config, which, base), `${id}.jsx`);
82810
+ return join2(fallbacks_units_dir(config, which, base), `${id}.jsx`);
82811
82811
  }
82812
82812
  async function read_pageQuery(base) {
82813
- const target = path_exports.join(base, "+page.gql");
82814
- return [target, await fs_exports.readFile(target)];
82813
+ const target = join2(base, "+page.gql");
82814
+ return [target, await readFile(target)];
82815
82815
  }
82816
82816
  async function read_pageView(base) {
82817
82817
  for (const name of ["+page.tsx", "+page.jsx"]) {
82818
- let target = path_exports.join(base, name);
82819
- let result = await fs_exports.readFile(target);
82818
+ let target = join2(base, name);
82819
+ let result = await readFile(target);
82820
82820
  if (result) {
82821
82821
  return [target, result];
82822
82822
  }
@@ -82824,13 +82824,13 @@ async function read_pageView(base) {
82824
82824
  return [null, null];
82825
82825
  }
82826
82826
  async function read_layoutQuery(base) {
82827
- const target = path_exports.join(base, "+layout.gql");
82828
- return [target, await fs_exports.readFile(target)];
82827
+ const target = join2(base, "+layout.gql");
82828
+ return [target, await readFile(target)];
82829
82829
  }
82830
82830
  async function read_layoutView(base) {
82831
82831
  for (const name of ["+layout.tsx", "+layout.jsx"]) {
82832
- let target = path_exports.join(base, name);
82833
- let result = await fs_exports.readFile(target);
82832
+ let target = join2(base, name);
82833
+ let result = await readFile(target);
82834
82834
  if (result) {
82835
82835
  return [target, result];
82836
82836
  }
@@ -82838,10 +82838,10 @@ async function read_layoutView(base) {
82838
82838
  return [null, null];
82839
82839
  }
82840
82840
  function temp_dir(config, key) {
82841
- return path_exports.join(config.rootDir, "temp", key);
82841
+ return join2(config.rootDir, "temp", key);
82842
82842
  }
82843
82843
  function router_index_path(config) {
82844
- return path_exports.join(config.routesDir, "..", "+index.jsx");
82844
+ return join2(config.routesDir, "..", "+index.jsx");
82845
82845
  }
82846
82846
  function is_layout(path42) {
82847
82847
  return path42.endsWith("+layout.tsx") || path42.endsWith("+layout.jsx");
@@ -82864,27 +82864,118 @@ function page_id(path42) {
82864
82864
  return copy;
82865
82865
  }
82866
82866
  function page_entries_dir(config, base) {
82867
- return path_exports.join(units_dir(config, base), "entries");
82867
+ return join2(units_dir(config, base), "entries");
82868
82868
  }
82869
82869
  function page_units_dir(config, base) {
82870
- return path_exports.join(units_dir(config, base), "pages");
82870
+ return join2(units_dir(config, base), "pages");
82871
82871
  }
82872
82872
  function layout_units_dir(config, base) {
82873
- return path_exports.join(units_dir(config, base), "layouts");
82873
+ return join2(units_dir(config, base), "layouts");
82874
82874
  }
82875
82875
  function fallbacks_units_dir(config, which, base) {
82876
- return path_exports.join(units_dir(config, base), "fallbacks", which);
82876
+ return join2(units_dir(config, base), "fallbacks", which);
82877
82877
  }
82878
82878
  function units_dir(config, base = base_dir(config)) {
82879
- return path_exports.join(base, "units");
82879
+ return join2(base, "units");
82880
82880
  }
82881
82881
  function base_dir(config) {
82882
82882
  return config.pluginDirectory("houdini-react");
82883
82883
  }
82884
82884
  function serialized_manifest_path(config, base = base_dir(config)) {
82885
- return path_exports.join(base, "manifest.json");
82885
+ return join2(base, "manifest.json");
82886
82886
  }
82887
82887
  var t2 = __toESM2(require_lib5(), 1);
82888
+ function formatErrors(e22, afterError) {
82889
+ const errors = Array.isArray(e22) ? e22 : [e22];
82890
+ for (const error of errors) {
82891
+ if ("filepath" in error && error.filepath) {
82892
+ const relative22 = relative(process.cwd(), error.filepath);
82893
+ console.error(`\u274C Encountered error in ${relative22}`);
82894
+ if (error.message) {
82895
+ console.error(error.message);
82896
+ }
82897
+ } else {
82898
+ console.error(`\u274C ${error.message}`);
82899
+ if ("description" in error && error.description) {
82900
+ console.error(`${error.description}`);
82901
+ }
82902
+ }
82903
+ afterError?.(e22);
82904
+ }
82905
+ }
82906
+ function unwrapType(config, type, wrappers = [], convertRuntimeScalars) {
82907
+ if (type.kind === "NonNullType") {
82908
+ return unwrapType(config, type.type, [TypeWrapper.NonNull, ...wrappers]);
82909
+ }
82910
+ if (type instanceof graphql2.GraphQLNonNull) {
82911
+ return unwrapType(config, type.ofType, [TypeWrapper.NonNull, ...wrappers]);
82912
+ }
82913
+ if (wrappers[0] !== TypeWrapper.NonNull) {
82914
+ wrappers.unshift(TypeWrapper.Nullable);
82915
+ }
82916
+ if (type.kind === "ListType") {
82917
+ return unwrapType(config, type.type, [TypeWrapper.List, ...wrappers]);
82918
+ }
82919
+ if (type instanceof graphql2.GraphQLList) {
82920
+ return unwrapType(config, type.ofType, [TypeWrapper.List, ...wrappers]);
82921
+ }
82922
+ if (convertRuntimeScalars && config.configFile.features?.runtimeScalars?.[type.name.value]) {
82923
+ type = config.schema.getType(
82924
+ config.configFile.features?.runtimeScalars?.[type.name.value].type
82925
+ );
82926
+ }
82927
+ const namedType = config.schema.getType(type.name.value || type.name);
82928
+ if (!namedType) {
82929
+ throw new Error("Unknown type: " + type.name.value || type.name);
82930
+ }
82931
+ return { type: namedType, wrappers };
82932
+ }
82933
+ var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
82934
+ TypeWrapper2["Nullable"] = "Nullable";
82935
+ TypeWrapper2["List"] = "List";
82936
+ TypeWrapper2["NonNull"] = "NonNull";
82937
+ return TypeWrapper2;
82938
+ })(TypeWrapper || {});
82939
+ var import_parser = __toESM2(require_lib6(), 1);
82940
+ var import_recast = __toESM2(require_main2(), 1);
82941
+ var import_deepmerge = __toESM2(require_cjs(), 1);
82942
+ function deepMerge2(filepath, ...targets) {
82943
+ try {
82944
+ if (targets.length === 1) {
82945
+ return targets[0];
82946
+ } else if (targets.length === 2) {
82947
+ return (0, import_deepmerge.default)(targets[0], targets[1], {
82948
+ arrayMerge: (source, update) => [...new Set(source.concat(update))]
82949
+ });
82950
+ }
82951
+ return deepMerge2(filepath, targets[0], deepMerge2(filepath, ...targets.slice(1)));
82952
+ } catch (e22) {
82953
+ throw new HoudiniError({
82954
+ filepath,
82955
+ message: "could not merge: " + JSON.stringify(targets, null, 4),
82956
+ description: e22.message
82957
+ });
82958
+ }
82959
+ }
82960
+ function parseJS(str, config) {
82961
+ const defaultConfig = {
82962
+ plugins: [
82963
+ "typescript",
82964
+ "importAssertions",
82965
+ "decorators-legacy",
82966
+ "explicitResourceManagement"
82967
+ ],
82968
+ sourceType: "module"
82969
+ };
82970
+ return (0, import_parser.parse)(str || "", config ? deepMerge2("", defaultConfig, config) : defaultConfig).program;
82971
+ }
82972
+ async function printJS(script, options) {
82973
+ if (options?.pretty) {
82974
+ return (0, import_recast.prettyPrint)(script, options);
82975
+ } else {
82976
+ return (0, import_recast.print)(script, options);
82977
+ }
82978
+ }
82888
82979
  function flatten(source) {
82889
82980
  if (!source) {
82890
82981
  return [];
@@ -85208,14 +85299,14 @@ function isSecondaryBuild() {
85208
85299
  async function buildLocalSchema(config) {
85209
85300
  const { build } = await import("vite");
85210
85301
  const schema = path3.join(config.localApiDir, "+schema");
85211
- const outDir = conventions_exports.temp_dir(config, "schema");
85302
+ const outDir = temp_dir(config, "schema");
85212
85303
  process.env.HOUDINI_SECONDARY_BUILD = "true";
85213
85304
  try {
85214
- await fs_exports.remove(path3.join(outDir, "assets", "schema.js"));
85305
+ await remove(path3.join(outDir, "assets", "schema.js"));
85215
85306
  } catch {
85216
85307
  }
85217
85308
  try {
85218
- await fs_exports.mkdir(outDir);
85309
+ await mkdir(outDir);
85219
85310
  } catch {
85220
85311
  }
85221
85312
  await build({
@@ -85247,14 +85338,14 @@ async function loadLocalSchema(config) {
85247
85338
  }
85248
85339
  try {
85249
85340
  const { default: schema } = await import(path3.join(
85250
- conventions_exports.temp_dir(config, "schema"),
85341
+ temp_dir(config, "schema"),
85251
85342
  `schema.js?${Date.now().valueOf()}}`
85252
85343
  ));
85253
85344
  return schema;
85254
85345
  } catch (e22) {
85255
85346
  const message = "message" in e22 ? e22.message : e22;
85256
85347
  console.error("\u26A0\uFE0F Failed to load local schema: ", message);
85257
- return new graphql3.GraphQLSchema({});
85348
+ return new graphql4.GraphQLSchema({});
85258
85349
  }
85259
85350
  }
85260
85351
  var currentDir = dirname(fileURLToPath3(import.meta.url));
@@ -85327,7 +85418,7 @@ var Config = class {
85327
85418
  persistedQueriesPath
85328
85419
  } = this.configFile;
85329
85420
  if (typeof schema === "string") {
85330
- this.schema = graphql4.buildSchema(schema);
85421
+ this.schema = graphql5.buildSchema(schema);
85331
85422
  } else {
85332
85423
  this.schema = schema;
85333
85424
  }
@@ -85475,7 +85566,7 @@ var Config = class {
85475
85566
  set newSchema(value) {
85476
85567
  this.schemaString = value;
85477
85568
  if (value) {
85478
- this.#newSchemaInstance = graphql4.buildSchema(value);
85569
+ this.#newSchemaInstance = graphql5.buildSchema(value);
85479
85570
  } else {
85480
85571
  this.#newSchemaInstance = null;
85481
85572
  }
@@ -85565,21 +85656,21 @@ var Config = class {
85565
85656
  }
85566
85657
  documentName(document) {
85567
85658
  const operation = document.definitions.find(
85568
- ({ kind }) => kind === graphql4.Kind.OPERATION_DEFINITION
85659
+ ({ kind }) => kind === graphql5.Kind.OPERATION_DEFINITION
85569
85660
  );
85570
85661
  if (operation) {
85571
85662
  if (!operation.name) {
85572
- throw new Error("encountered operation with no name: " + graphql4.print(document));
85663
+ throw new Error("encountered operation with no name: " + graphql5.print(document));
85573
85664
  }
85574
85665
  return operation.name.value;
85575
85666
  }
85576
85667
  const fragmentDefinitions = document.definitions.filter(
85577
- ({ kind }) => kind === graphql4.Kind.FRAGMENT_DEFINITION
85668
+ ({ kind }) => kind === graphql5.Kind.FRAGMENT_DEFINITION
85578
85669
  );
85579
85670
  if (fragmentDefinitions.length) {
85580
85671
  return fragmentDefinitions[0].name.value;
85581
85672
  }
85582
- throw new Error("Could not generate artifact name for document: " + graphql4.print(document));
85673
+ throw new Error("Could not generate artifact name for document: " + graphql5.print(document));
85583
85674
  }
85584
85675
  isSelectionScalar(type) {
85585
85676
  return ["String", "Boolean", "Float", "ID", "Int"].concat(Object.keys(this.scalars || {})).includes(type);
@@ -85599,8 +85690,8 @@ var Config = class {
85599
85690
  relative(process.cwd(), filepath).replaceAll(sep2, "_").replace(".ts", ".js")
85600
85691
  );
85601
85692
  }
85602
- excludeFile(filepath) {
85603
- if (this.exclude.length > 0 && this.exclude.some((pattern) => (0, import_minimatch8.default)(filepath, pattern))) {
85693
+ excludeFile(filepath, { root = this.projectRoot }) {
85694
+ if (this.exclude.length > 0 && this.exclude.some((pattern) => (0, import_minimatch8.default)(filepath, join2(root, pattern)))) {
85604
85695
  return true;
85605
85696
  }
85606
85697
  for (const plugin2 of this.plugins) {
@@ -85629,7 +85720,7 @@ var Config = class {
85629
85720
  if (!included && !this.include.some((pattern) => (0, import_minimatch8.default)(filepath, join2(root, pattern)))) {
85630
85721
  return false;
85631
85722
  }
85632
- return !this.excludeFile(filepath);
85723
+ return !this.excludeFile(filepath, { root });
85633
85724
  }
85634
85725
  pluginRuntimeDirectory(name) {
85635
85726
  return join2(this.pluginDirectory(name), "runtime");
@@ -85789,10 +85880,10 @@ var Config = class {
85789
85880
  localDocumentData(document) {
85790
85881
  let paginated = false;
85791
85882
  let componentFields = [];
85792
- const typeInfo = new graphql4.TypeInfo(this.schema);
85793
- graphql4.visit(
85883
+ const typeInfo = new graphql5.TypeInfo(this.schema);
85884
+ graphql5.visit(
85794
85885
  document,
85795
- graphql4.visitWithTypeInfo(typeInfo, {
85886
+ graphql5.visitWithTypeInfo(typeInfo, {
85796
85887
  Directive: (node) => {
85797
85888
  if ([this.paginateDirective].includes(node.name.value)) {
85798
85889
  paginated = true;
@@ -86152,107 +86243,16 @@ async function loadSchemaFile(schemaPath) {
86152
86243
  }
86153
86244
  const contents = await readFile(schemaPath);
86154
86245
  if (schemaPath.endsWith("gql") || schemaPath.endsWith("graphql") || schemaPath.endsWith("graphqls")) {
86155
- return graphql4.buildSchema(contents);
86246
+ return graphql5.buildSchema(contents);
86156
86247
  }
86157
86248
  const jsonContents = JSON.parse(contents);
86158
86249
  if (jsonContents.data) {
86159
- return graphql4.buildClientSchema(jsonContents.data);
86250
+ return graphql5.buildClientSchema(jsonContents.data);
86160
86251
  }
86161
- return graphql4.buildClientSchema(jsonContents);
86252
+ return graphql5.buildClientSchema(jsonContents);
86162
86253
  }
86163
- var emptySchema = graphql4.buildSchema("type Query { hello: String }");
86254
+ var emptySchema = graphql5.buildSchema("type Query { hello: String }");
86164
86255
  var defaultDirectives = emptySchema.getDirectives().map((dir) => dir.name);
86165
- function formatErrors(e22, afterError) {
86166
- const errors = Array.isArray(e22) ? e22 : [e22];
86167
- for (const error of errors) {
86168
- if ("filepath" in error && error.filepath) {
86169
- const relative22 = relative(process.cwd(), error.filepath);
86170
- console.error(`\u274C Encountered error in ${relative22}`);
86171
- if (error.message) {
86172
- console.error(error.message);
86173
- }
86174
- } else {
86175
- console.error(`\u274C ${error.message}`);
86176
- if ("description" in error && error.description) {
86177
- console.error(`${error.description}`);
86178
- }
86179
- }
86180
- afterError?.(e22);
86181
- }
86182
- }
86183
- function unwrapType(config, type, wrappers = [], convertRuntimeScalars) {
86184
- if (type.kind === "NonNullType") {
86185
- return unwrapType(config, type.type, [TypeWrapper.NonNull, ...wrappers]);
86186
- }
86187
- if (type instanceof graphql5.GraphQLNonNull) {
86188
- return unwrapType(config, type.ofType, [TypeWrapper.NonNull, ...wrappers]);
86189
- }
86190
- if (wrappers[0] !== TypeWrapper.NonNull) {
86191
- wrappers.unshift(TypeWrapper.Nullable);
86192
- }
86193
- if (type.kind === "ListType") {
86194
- return unwrapType(config, type.type, [TypeWrapper.List, ...wrappers]);
86195
- }
86196
- if (type instanceof graphql5.GraphQLList) {
86197
- return unwrapType(config, type.ofType, [TypeWrapper.List, ...wrappers]);
86198
- }
86199
- if (convertRuntimeScalars && config.configFile.features?.runtimeScalars?.[type.name.value]) {
86200
- type = config.schema.getType(
86201
- config.configFile.features?.runtimeScalars?.[type.name.value].type
86202
- );
86203
- }
86204
- const namedType = config.schema.getType(type.name.value || type.name);
86205
- if (!namedType) {
86206
- throw new Error("Unknown type: " + type.name.value || type.name);
86207
- }
86208
- return { type: namedType, wrappers };
86209
- }
86210
- var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
86211
- TypeWrapper2["Nullable"] = "Nullable";
86212
- TypeWrapper2["List"] = "List";
86213
- TypeWrapper2["NonNull"] = "NonNull";
86214
- return TypeWrapper2;
86215
- })(TypeWrapper || {});
86216
- var import_parser = __toESM2(require_lib6(), 1);
86217
- var import_recast = __toESM2(require_main2(), 1);
86218
- var import_deepmerge = __toESM2(require_cjs(), 1);
86219
- function deepMerge2(filepath, ...targets) {
86220
- try {
86221
- if (targets.length === 1) {
86222
- return targets[0];
86223
- } else if (targets.length === 2) {
86224
- return (0, import_deepmerge.default)(targets[0], targets[1], {
86225
- arrayMerge: (source, update) => [...new Set(source.concat(update))]
86226
- });
86227
- }
86228
- return deepMerge2(filepath, targets[0], deepMerge2(filepath, ...targets.slice(1)));
86229
- } catch (e22) {
86230
- throw new HoudiniError({
86231
- filepath,
86232
- message: "could not merge: " + JSON.stringify(targets, null, 4),
86233
- description: e22.message
86234
- });
86235
- }
86236
- }
86237
- function parseJS(str, config) {
86238
- const defaultConfig = {
86239
- plugins: [
86240
- "typescript",
86241
- "importAssertions",
86242
- "decorators-legacy",
86243
- "explicitResourceManagement"
86244
- ],
86245
- sourceType: "module"
86246
- };
86247
- return (0, import_parser.parse)(str || "", config ? deepMerge2("", defaultConfig, config) : defaultConfig).program;
86248
- }
86249
- async function printJS(script, options) {
86250
- if (options?.pretty) {
86251
- return (0, import_recast.prettyPrint)(script, options);
86252
- } else {
86253
- return (0, import_recast.print)(script, options);
86254
- }
86255
- }
86256
86256
  var recast = __toESM2(require_main2(), 1);
86257
86257
  var AST2 = recast.types.builders;
86258
86258
  var recast2 = __toESM2(require_main2(), 1);
@@ -86565,6 +86565,31 @@ function extractAnonymousQuery(config, raw, expr, propName) {
86565
86565
  // src/plugin/transforms/index.ts
86566
86566
  var recast21 = __toESM(require_main4(), 1);
86567
86567
 
86568
+ // src/plugin/config.ts
86569
+ function plugin_config(config) {
86570
+ const cfg = config.pluginConfig("houdini-svelte");
86571
+ return {
86572
+ client: "./src/client",
86573
+ defaultRouteBlocking: false,
86574
+ pageQueryFilename: "+page.gql",
86575
+ layoutQueryFilename: "+layout.gql",
86576
+ static: false,
86577
+ forceRunesMode: false,
86578
+ ...cfg,
86579
+ customStores: {
86580
+ query: "../runtime/stores/query.QueryStore",
86581
+ mutation: "../runtime/stores/mutation.MutationStore",
86582
+ fragment: "../runtime/stores/fragment.FragmentStore",
86583
+ subscription: "../runtime/stores/subscription.SubscriptionStore",
86584
+ queryCursor: "../runtime/stores/pagination/query.QueryStoreCursor",
86585
+ queryOffset: "../runtime/stores/pagination/query.QueryStoreOffset",
86586
+ fragmentCursor: "../runtime/stores/pagination/fragment.FragmentStoreCursor",
86587
+ fragmentOffset: "../runtime/stores/pagination/fragment.FragmentStoreOffset",
86588
+ ...cfg?.customStores
86589
+ }
86590
+ };
86591
+ }
86592
+
86568
86593
  // ../../node_modules/.pnpm/estree-walker@3.0.1/node_modules/estree-walker/src/walker.js
86569
86594
  var WalkerBase2 = class {
86570
86595
  constructor() {
@@ -86679,16 +86704,234 @@ function walk(ast, { enter, leave }) {
86679
86704
 
86680
86705
  // src/plugin/extract.ts
86681
86706
  import * as svelte from "svelte/compiler";
86707
+ var svelteRunes = [
86708
+ "$state",
86709
+ "$state.raw",
86710
+ "$state.snapshot",
86711
+ "$props",
86712
+ "$bindable",
86713
+ "$derived",
86714
+ "$derived.by",
86715
+ "$effect",
86716
+ "$effect.pre",
86717
+ "$effect.tracking",
86718
+ "$effect.root",
86719
+ "$inspect",
86720
+ "$inspect().with",
86721
+ "$host"
86722
+ ];
86723
+ async function parseSvelte(str, forceRunes) {
86724
+ str = str.replace(/(<script[^>]*)(\s+)(generics="[^"]+?")/, (_, $1, $2, $3) => {
86725
+ return $1 + $2 + " ".repeat($3.length);
86726
+ });
86727
+ const preprocessed = await svelte.preprocess(str, [
86728
+ {
86729
+ script({ content: input }) {
86730
+ return {
86731
+ code: input.replace(/\S/g, " ")
86732
+ };
86733
+ },
86734
+ style({ content: input }) {
86735
+ return {
86736
+ code: input.replace(/\S/g, " ")
86737
+ };
86738
+ }
86739
+ }
86740
+ ]);
86741
+ const parsed = svelte.parse(preprocessed.code);
86742
+ const script = parsed.instance;
86743
+ if (!script) {
86744
+ return null;
86745
+ }
86746
+ const [greaterThanIndex, lessThanIndex] = findScriptInnerBounds({
86747
+ start: parsed.instance.start,
86748
+ end: parsed.instance.end - 1,
86749
+ text: str
86750
+ });
86751
+ const string = str.slice(greaterThanIndex, lessThanIndex);
86752
+ const scriptParsed = parseJS(string);
86753
+ let usesRunes = false;
86754
+ if (forceRunes) {
86755
+ usesRunes = true;
86756
+ } else {
86757
+ walk(scriptParsed, {
86758
+ enter(node) {
86759
+ if (node.type === "CallExpression") {
86760
+ let callNode = node;
86761
+ if (callNode.callee.type === "Identifier") {
86762
+ const calleeName = callNode.callee.name;
86763
+ if (svelteRunes.some((rune) => rune === calleeName)) {
86764
+ usesRunes = true;
86765
+ this.skip();
86766
+ }
86767
+ } else if (callNode.callee.type === "MemberExpression") {
86768
+ const callee = callNode.callee;
86769
+ if (callee.object.type !== "Identifier" || callee.property.type !== "Identifier") {
86770
+ return;
86771
+ }
86772
+ const calleeName = `${callee.object.name}.${callee.property.name}`;
86773
+ if (svelteRunes.some((rune) => rune === calleeName)) {
86774
+ usesRunes = true;
86775
+ this.skip();
86776
+ }
86777
+ }
86778
+ }
86779
+ }
86780
+ });
86781
+ }
86782
+ return {
86783
+ script: scriptParsed,
86784
+ position: {
86785
+ start: greaterThanIndex,
86786
+ end: lessThanIndex
86787
+ },
86788
+ useRunes: usesRunes
86789
+ };
86790
+ }
86791
+ function findScriptInnerBounds({
86792
+ start,
86793
+ end,
86794
+ text
86795
+ }) {
86796
+ let greaterThanIndex = start;
86797
+ while (greaterThanIndex < end) {
86798
+ if (text[greaterThanIndex] === ">") {
86799
+ break;
86800
+ }
86801
+ greaterThanIndex++;
86802
+ }
86803
+ if (greaterThanIndex === start) {
86804
+ throw new Error("Could not find the end of the tag open");
86805
+ }
86806
+ let lessThanIndex = end;
86807
+ while (lessThanIndex > greaterThanIndex) {
86808
+ if (text[lessThanIndex] === "<") {
86809
+ break;
86810
+ }
86811
+ lessThanIndex--;
86812
+ }
86813
+ if (lessThanIndex === end) {
86814
+ throw new Error("Could not find the start of the tag close");
86815
+ }
86816
+ return [greaterThanIndex + 1, lessThanIndex];
86817
+ }
86682
86818
 
86683
- // src/plugin/kit.ts
86684
- import * as graphql36 from "graphql";
86819
+ // ../../node_modules/.pnpm/esm-env@1.0.0/node_modules/esm-env/prod-ssr.js
86820
+ var BROWSER2 = false;
86821
+
86822
+ // ../../node_modules/.pnpm/@kitql+helpers@0.8.2/node_modules/@kitql/helpers/dist/colors/stylesNode.js
86823
+ var stylesNode_exports2 = {};
86824
+ __export(stylesNode_exports2, {
86825
+ bgBlack: () => bgBlack2,
86826
+ bgBlackBright: () => bgBlackBright2,
86827
+ bgBlue: () => bgBlue2,
86828
+ bgBlueBright: () => bgBlueBright2,
86829
+ bgCyan: () => bgCyan2,
86830
+ bgCyanBright: () => bgCyanBright2,
86831
+ bgGreen: () => bgGreen2,
86832
+ bgGreenBright: () => bgGreenBright2,
86833
+ bgMagenta: () => bgMagenta2,
86834
+ bgMagentaBright: () => bgMagentaBright2,
86835
+ bgRed: () => bgRed2,
86836
+ bgRedBright: () => bgRedBright2,
86837
+ bgWhite: () => bgWhite2,
86838
+ bgWhiteBright: () => bgWhiteBright2,
86839
+ bgYellow: () => bgYellow2,
86840
+ bgYellowBright: () => bgYellowBright2,
86841
+ black: () => black2,
86842
+ blackBright: () => blackBright2,
86843
+ blue: () => blue2,
86844
+ blueBright: () => blueBright2,
86845
+ bold: () => bold2,
86846
+ cyan: () => cyan3,
86847
+ cyanBright: () => cyanBright2,
86848
+ dim: () => dim2,
86849
+ gray: () => gray2,
86850
+ green: () => green2,
86851
+ greenBright: () => greenBright2,
86852
+ hidden: () => hidden2,
86853
+ inverse: () => inverse2,
86854
+ italic: () => italic2,
86855
+ magenta: () => magenta2,
86856
+ magentaBright: () => magentaBright2,
86857
+ red: () => red2,
86858
+ redBright: () => redBright2,
86859
+ reset: () => reset2,
86860
+ strikethrough: () => strikethrough2,
86861
+ underline: () => underline2,
86862
+ white: () => white2,
86863
+ whiteBright: () => whiteBright2,
86864
+ yellow: () => yellow2,
86865
+ yellowBright: () => yellowBright2
86866
+ });
86867
+ var reset2 = { start: "\x1B[0m", end: "\x1B[0m" };
86868
+ var bold2 = { start: "\x1B[1m", end: "\x1B[22m" };
86869
+ var dim2 = { start: "\x1B[2m", end: "\x1B[22m" };
86870
+ var italic2 = { start: "\x1B[3m", end: "\x1B[23m" };
86871
+ var underline2 = { start: "\x1B[4m", end: "\x1B[24m" };
86872
+ var inverse2 = { start: "\x1B[7m", end: "\x1B[27m" };
86873
+ var hidden2 = { start: "\x1B[8m", end: "\x1B[28m" };
86874
+ var strikethrough2 = { start: "\x1B[9m", end: "\x1B[29m" };
86875
+ var black2 = { start: "\x1B[30m", end: "\x1B[39m" };
86876
+ var red2 = { start: "\x1B[31m", end: "\x1B[39m" };
86877
+ var green2 = { start: "\x1B[32m", end: "\x1B[39m" };
86878
+ var yellow2 = { start: "\x1B[33m", end: "\x1B[39m" };
86879
+ var blue2 = { start: "\x1B[34m", end: "\x1B[39m" };
86880
+ var magenta2 = { start: "\x1B[35m", end: "\x1B[39m" };
86881
+ var cyan3 = { start: "\x1B[36m", end: "\x1B[39m" };
86882
+ var white2 = { start: "\x1B[37m", end: "\x1B[39m" };
86883
+ var gray2 = { start: "\x1B[90m", end: "\x1B[39m" };
86884
+ var bgBlack2 = { start: "\x1B[40m", end: "\x1B[49m" };
86885
+ var bgRed2 = { start: "\x1B[41m", end: "\x1B[49m" };
86886
+ var bgGreen2 = { start: "\x1B[42m", end: "\x1B[49m" };
86887
+ var bgYellow2 = { start: "\x1B[43m", end: "\x1B[49m" };
86888
+ var bgBlue2 = { start: "\x1B[44m", end: "\x1B[49m" };
86889
+ var bgMagenta2 = { start: "\x1B[45m", end: "\x1B[49m" };
86890
+ var bgCyan2 = { start: "\x1B[46m", end: "\x1B[49m" };
86891
+ var bgWhite2 = { start: "\x1B[47m", end: "\x1B[49m" };
86892
+ var blackBright2 = { start: "\x1B[90m", end: "\x1B[39m" };
86893
+ var redBright2 = { start: "\x1B[91m", end: "\x1B[39m" };
86894
+ var greenBright2 = { start: "\x1B[92m", end: "\x1B[39m" };
86895
+ var yellowBright2 = { start: "\x1B[93m", end: "\x1B[39m" };
86896
+ var blueBright2 = { start: "\x1B[94m", end: "\x1B[39m" };
86897
+ var magentaBright2 = { start: "\x1B[95m", end: "\x1B[39m" };
86898
+ var cyanBright2 = { start: "\x1B[96m", end: "\x1B[39m" };
86899
+ var whiteBright2 = { start: "\x1B[97m", end: "\x1B[39m" };
86900
+ var bgBlackBright2 = { start: "\x1B[100m", end: "\x1B[49m" };
86901
+ var bgRedBright2 = { start: "\x1B[101m", end: "\x1B[49m" };
86902
+ var bgGreenBright2 = { start: "\x1B[102m", end: "\x1B[49m" };
86903
+ var bgYellowBright2 = { start: "\x1B[103m", end: "\x1B[49m" };
86904
+ var bgBlueBright2 = { start: "\x1B[104m", end: "\x1B[49m" };
86905
+ var bgMagentaBright2 = { start: "\x1B[105m", end: "\x1B[49m" };
86906
+ var bgCyanBright2 = { start: "\x1B[106m", end: "\x1B[49m" };
86907
+ var bgWhiteBright2 = { start: "\x1B[107m", end: "\x1B[49m" };
86908
+
86909
+ // ../../node_modules/.pnpm/@kitql+helpers@0.8.2/node_modules/@kitql/helpers/dist/colors/index.js
86910
+ var getStyleNode2 = (styleKey) => {
86911
+ return stylesNode_exports2[styleKey] ?? void 0;
86912
+ };
86913
+ var color2 = (style, str) => {
86914
+ return BROWSER2 ? colorBrowser2(style, str) : colorNode2(style, str);
86915
+ };
86916
+ var colorNode2 = (style, str) => {
86917
+ return `${getStyleNode2(style).start}${str}${getStyleNode2(style).end}`;
86918
+ };
86919
+ var START12 = `$$KitQL_`;
86920
+ var START22 = `_KitQL$$`;
86921
+ var END2 = `$$KitQLEND$$`;
86922
+ var colorBrowser2 = (style, str) => {
86923
+ return `${START12}${style}${START22}${str}${END2}`;
86924
+ };
86925
+ var yellow3 = (str) => {
86926
+ return color2("yellow", str);
86927
+ };
86685
86928
 
86686
86929
  // ../houdini/build/vite-esm/index.js
86687
86930
  import { createRequire as conflict_free2 } from "module";
86688
86931
  import { statSync as statSync2, createReadStream as createReadStream2, promises as fs22 } from "node:fs";
86689
86932
  import * as graphql33 from "graphql";
86690
86933
  import { getNamedType as getNamedType32, isScalarType as isScalarType52 } from "graphql";
86691
- import { parse as parse6 } from "graphql";
86934
+ import { parse as parse7 } from "graphql";
86692
86935
  import { GraphQLError as GraphQLError2 } from "graphql";
86693
86936
  import { print as print5, Kind as Kind32, isSpecifiedScalarType as isSpecifiedScalarType5, isIntrospectionType as isIntrospectionType2, isSpecifiedDirective as isSpecifiedDirective3, astFromValue as astFromValue2, GraphQLDeprecatedDirective as GraphQLDeprecatedDirective2, isObjectType as isObjectType10, isInterfaceType as isInterfaceType7, isUnionType as isUnionType7, isInputObjectType as isInputObjectType7, isEnumType as isEnumType7, isScalarType as isScalarType8 } from "graphql";
86694
86937
  import { isNonNullType as isNonNullType7, Kind as Kind20, isListType as isListType7 } from "graphql";
@@ -86717,7 +86960,7 @@ import { Kind as Kind122 } from "graphql";
86717
86960
  import { Kind as Kind132 } from "graphql";
86718
86961
  import { Kind as Kind142 } from "graphql";
86719
86962
  import { parse as parse22, Kind as Kind162, isSchema as isSchema3, isDefinitionNode as isDefinitionNode2 } from "graphql";
86720
- import * as graphql42 from "graphql";
86963
+ import * as graphql52 from "graphql";
86721
86964
  import { fileURLToPath as fileURLToPath32, pathToFileURL as pathToFileURL2 } from "node:url";
86722
86965
  import { fileURLToPath as fileURLToPath22 } from "node:url";
86723
86966
  import { posix as posix2, win32 as win322 } from "node:path";
@@ -86740,9 +86983,9 @@ import { types as types32 } from "node:util";
86740
86983
  import http3 from "node:http";
86741
86984
  import { format as formatUrl2 } from "node:url";
86742
86985
  import { deprecate as deprecate22 } from "node:util";
86743
- import * as graphql22 from "graphql";
86744
86986
  import * as graphql32 from "graphql";
86745
- import * as graphql52 from "graphql";
86987
+ import * as graphql22 from "graphql";
86988
+ import * as graphql42 from "graphql";
86746
86989
  import * as graphql62 from "graphql";
86747
86990
  import * as graphql72 from "graphql";
86748
86991
  import * as graphql17 from "graphql";
@@ -145710,94 +145953,94 @@ var require_cjs2 = __commonJS3({
145710
145953
  });
145711
145954
  var import_minimatch9 = __toESM3(require_minimatch2(), 1);
145712
145955
  var import_micromatch = __toESM3(require_micromatch(), 1);
145713
- var BROWSER2 = false;
145956
+ var BROWSER3 = false;
145714
145957
  var stylesBrowser_exports = {};
145715
145958
  __export3(stylesBrowser_exports, {
145716
- bgBlack: () => bgBlack2,
145717
- bgBlackBright: () => bgBlackBright2,
145718
- bgBlue: () => bgBlue2,
145719
- bgBlueBright: () => bgBlueBright2,
145720
- bgCyan: () => bgCyan2,
145721
- bgCyanBright: () => bgCyanBright2,
145722
- bgGreen: () => bgGreen2,
145723
- bgGreenBright: () => bgGreenBright2,
145724
- bgMagenta: () => bgMagenta2,
145725
- bgMagentaBright: () => bgMagentaBright2,
145726
- bgRed: () => bgRed2,
145727
- bgRedBright: () => bgRedBright2,
145728
- bgWhite: () => bgWhite2,
145729
- bgWhiteBright: () => bgWhiteBright2,
145730
- bgYellow: () => bgYellow2,
145731
- bgYellowBright: () => bgYellowBright2,
145732
- black: () => black2,
145733
- blackBright: () => blackBright2,
145734
- blue: () => blue2,
145735
- blueBright: () => blueBright2,
145736
- bold: () => bold2,
145737
- cyan: () => cyan3,
145738
- cyanBright: () => cyanBright2,
145739
- dim: () => dim2,
145740
- gray: () => gray2,
145741
- green: () => green2,
145742
- greenBright: () => greenBright2,
145743
- hidden: () => hidden2,
145744
- inverse: () => inverse2,
145745
- italic: () => italic2,
145746
- magenta: () => magenta2,
145747
- magentaBright: () => magentaBright2,
145748
- red: () => red2,
145749
- redBright: () => redBright2,
145750
- reset: () => reset2,
145751
- strikethrough: () => strikethrough2,
145752
- underline: () => underline2,
145753
- white: () => white2,
145754
- whiteBright: () => whiteBright2,
145755
- yellow: () => yellow2,
145756
- yellowBright: () => yellowBright2
145959
+ bgBlack: () => bgBlack4,
145960
+ bgBlackBright: () => bgBlackBright4,
145961
+ bgBlue: () => bgBlue4,
145962
+ bgBlueBright: () => bgBlueBright4,
145963
+ bgCyan: () => bgCyan4,
145964
+ bgCyanBright: () => bgCyanBright4,
145965
+ bgGreen: () => bgGreen4,
145966
+ bgGreenBright: () => bgGreenBright4,
145967
+ bgMagenta: () => bgMagenta4,
145968
+ bgMagentaBright: () => bgMagentaBright4,
145969
+ bgRed: () => bgRed4,
145970
+ bgRedBright: () => bgRedBright4,
145971
+ bgWhite: () => bgWhite4,
145972
+ bgWhiteBright: () => bgWhiteBright4,
145973
+ bgYellow: () => bgYellow4,
145974
+ bgYellowBright: () => bgYellowBright4,
145975
+ black: () => black4,
145976
+ blackBright: () => blackBright4,
145977
+ blue: () => blue4,
145978
+ blueBright: () => blueBright4,
145979
+ bold: () => bold4,
145980
+ cyan: () => cyan5,
145981
+ cyanBright: () => cyanBright4,
145982
+ dim: () => dim4,
145983
+ gray: () => gray4,
145984
+ green: () => green4,
145985
+ greenBright: () => greenBright4,
145986
+ hidden: () => hidden4,
145987
+ inverse: () => inverse4,
145988
+ italic: () => italic4,
145989
+ magenta: () => magenta4,
145990
+ magentaBright: () => magentaBright4,
145991
+ red: () => red4,
145992
+ redBright: () => redBright4,
145993
+ reset: () => reset4,
145994
+ strikethrough: () => strikethrough4,
145995
+ underline: () => underline4,
145996
+ white: () => white4,
145997
+ whiteBright: () => whiteBright4,
145998
+ yellow: () => yellow4,
145999
+ yellowBright: () => yellowBright4
145757
146000
  });
145758
- var reset2 = "";
145759
- var bold2 = "font-weight: bold";
145760
- var dim2 = "opacity: 0.5";
145761
- var italic2 = "font-style: italic";
145762
- var underline2 = "text-decoration: underline";
145763
- var inverse2 = "filter: invert(1)";
145764
- var hidden2 = "visibility: hidden";
145765
- var strikethrough2 = "text-decoration: line-through";
145766
- var black2 = "color: black";
145767
- var red2 = "color: red";
145768
- var green2 = "color: green";
145769
- var yellow2 = "color: yellow";
145770
- var blue2 = "color: blue";
145771
- var magenta2 = "color: #ff00ff";
145772
- var cyan3 = "color: cyan";
145773
- var white2 = "color: white";
145774
- var gray2 = "color: gray";
145775
- var bgBlack2 = "background-color: black";
145776
- var bgRed2 = "background-color: red";
145777
- var bgGreen2 = "background-color: green";
145778
- var bgYellow2 = "background-color: yellow";
145779
- var bgBlue2 = "background-color: blue";
145780
- var bgMagenta2 = "background-color: #ff00ff";
145781
- var bgCyan2 = "background-color: cyan";
145782
- var bgWhite2 = "background-color: white";
145783
- var blackBright2 = "color: #a9a9a9";
145784
- var redBright2 = "color: #ff4500";
145785
- var greenBright2 = "color: #7fff00";
145786
- var yellowBright2 = "color: #ffd700";
145787
- var blueBright2 = "color: #1e90ff";
145788
- var magentaBright2 = "color: #ff69b4";
145789
- var cyanBright2 = "color: #00ffff";
145790
- var whiteBright2 = "color: #ffffff";
145791
- var bgBlackBright2 = "background-color: #a9a9a9";
145792
- var bgRedBright2 = "background-color: #ff4500";
145793
- var bgGreenBright2 = "background-color: #7fff00";
145794
- var bgYellowBright2 = "background-color: #ffd700";
145795
- var bgBlueBright2 = "background-color: #1e90ff";
145796
- var bgMagentaBright2 = "background-color: #ff69b4";
145797
- var bgCyanBright2 = "background-color: #00ffff";
145798
- var bgWhiteBright2 = "background-color: #ffffff";
145799
- var stylesNode_exports2 = {};
145800
- __export3(stylesNode_exports2, {
146001
+ var reset4 = "";
146002
+ var bold4 = "font-weight: bold";
146003
+ var dim4 = "opacity: 0.5";
146004
+ var italic4 = "font-style: italic";
146005
+ var underline4 = "text-decoration: underline";
146006
+ var inverse4 = "filter: invert(1)";
146007
+ var hidden4 = "visibility: hidden";
146008
+ var strikethrough4 = "text-decoration: line-through";
146009
+ var black4 = "color: black";
146010
+ var red4 = "color: red";
146011
+ var green4 = "color: green";
146012
+ var yellow4 = "color: yellow";
146013
+ var blue4 = "color: blue";
146014
+ var magenta4 = "color: #ff00ff";
146015
+ var cyan5 = "color: cyan";
146016
+ var white4 = "color: white";
146017
+ var gray4 = "color: gray";
146018
+ var bgBlack4 = "background-color: black";
146019
+ var bgRed4 = "background-color: red";
146020
+ var bgGreen4 = "background-color: green";
146021
+ var bgYellow4 = "background-color: yellow";
146022
+ var bgBlue4 = "background-color: blue";
146023
+ var bgMagenta4 = "background-color: #ff00ff";
146024
+ var bgCyan4 = "background-color: cyan";
146025
+ var bgWhite4 = "background-color: white";
146026
+ var blackBright4 = "color: #a9a9a9";
146027
+ var redBright4 = "color: #ff4500";
146028
+ var greenBright4 = "color: #7fff00";
146029
+ var yellowBright4 = "color: #ffd700";
146030
+ var blueBright4 = "color: #1e90ff";
146031
+ var magentaBright4 = "color: #ff69b4";
146032
+ var cyanBright4 = "color: #00ffff";
146033
+ var whiteBright4 = "color: #ffffff";
146034
+ var bgBlackBright4 = "background-color: #a9a9a9";
146035
+ var bgRedBright4 = "background-color: #ff4500";
146036
+ var bgGreenBright4 = "background-color: #7fff00";
146037
+ var bgYellowBright4 = "background-color: #ffd700";
146038
+ var bgBlueBright4 = "background-color: #1e90ff";
146039
+ var bgMagentaBright4 = "background-color: #ff69b4";
146040
+ var bgCyanBright4 = "background-color: #00ffff";
146041
+ var bgWhiteBright4 = "background-color: #ffffff";
146042
+ var stylesNode_exports3 = {};
146043
+ __export3(stylesNode_exports3, {
145801
146044
  bgBlack: () => bgBlack22,
145802
146045
  bgBlackBright: () => bgBlackBright22,
145803
146046
  bgBlue: () => bgBlue22,
@@ -145884,20 +146127,20 @@ var bgWhiteBright22 = ["\x1B[107m", "\x1B[49m"];
145884
146127
  var getStyleBrowser = (styleKey) => {
145885
146128
  return stylesBrowser_exports[styleKey] ?? void 0;
145886
146129
  };
145887
- var getStyleNode2 = (styleKey) => {
145888
- return stylesNode_exports2[styleKey] ?? void 0;
146130
+ var getStyleNode3 = (styleKey) => {
146131
+ return stylesNode_exports3[styleKey] ?? void 0;
145889
146132
  };
145890
- var color2 = (style, str) => {
145891
- return BROWSER2 ? colorBrowser2(style, str) : colorNode2(style, str);
146133
+ var color3 = (style, str) => {
146134
+ return BROWSER3 ? colorBrowser3(style, str) : colorNode3(style, str);
145892
146135
  };
145893
- var colorNode2 = (style, str) => {
145894
- return `${getStyleNode2(style)[0]}${str}${getStyleNode2(style)[1]}`;
146136
+ var colorNode3 = (style, str) => {
146137
+ return `${getStyleNode3(style)[0]}${str}${getStyleNode3(style)[1]}`;
145895
146138
  };
145896
- var START12 = `$$KitQL_`;
145897
- var START22 = `_KitQL$$`;
145898
- var END2 = `$$KitQLEND$$`;
145899
- var colorBrowser2 = (style, str) => {
145900
- return `${START12}${style}${START22}${str}${END2}`;
146139
+ var START13 = `$$KitQL_`;
146140
+ var START23 = `_KitQL$$`;
146141
+ var END3 = `$$KitQLEND$$`;
146142
+ var colorBrowser3 = (style, str) => {
146143
+ return `${START13}${style}${START23}${str}${END3}`;
145901
146144
  };
145902
146145
  function extractKitQLTags(str) {
145903
146146
  const regex = /\$\$KitQL_(.*?)_KitQL\$\$/g;
@@ -145921,7 +146164,7 @@ var getAllIndexOf = (str, subStr) => {
145921
146164
  return indexes;
145922
146165
  };
145923
146166
  var colorProcess = (...msgs) => {
145924
- if (!BROWSER2) {
146167
+ if (!BROWSER3) {
145925
146168
  return [...msgs];
145926
146169
  }
145927
146170
  const arr = [...msgs];
@@ -145937,17 +146180,17 @@ var colorProcess = (...msgs) => {
145937
146180
  const posToReplace = [];
145938
146181
  const tagsUsed = [...new Set(extractKitQLTags(originalStr))];
145939
146182
  for (const key of tagsUsed) {
145940
- const indexesStarts = getAllIndexOf(originalStr, `${START12}${key}${START22}`);
146183
+ const indexesStarts = getAllIndexOf(originalStr, `${START13}${key}${START23}`);
145941
146184
  for (const index of indexesStarts) {
145942
146185
  posToReplace.push({ index, browser: getStyleBrowser(key) });
145943
146186
  }
145944
- msg = msg.replaceAll(`${START12}${key}${START22}`, "%c");
146187
+ msg = msg.replaceAll(`${START13}${key}${START23}`, "%c");
145945
146188
  }
145946
- const indexesEnd = getAllIndexOf(originalStr, END2);
146189
+ const indexesEnd = getAllIndexOf(originalStr, END3);
145947
146190
  for (const index of indexesEnd) {
145948
146191
  posToReplace.push({ index, browser: "" });
145949
146192
  }
145950
- msg = msg.replaceAll(END2, "%c");
146193
+ msg = msg.replaceAll(END3, "%c");
145951
146194
  for (const c of posToReplace.sort((a, b) => a.index - b.index)) {
145952
146195
  colors.push(c.browser);
145953
146196
  }
@@ -145956,23 +146199,23 @@ var colorProcess = (...msgs) => {
145956
146199
  }
145957
146200
  return [msgsTransformed.join(" "), ...colors, ...additional];
145958
146201
  };
145959
- var bold3 = (str) => {
145960
- return color2("bold", str);
146202
+ var bold32 = (str) => {
146203
+ return color3("bold", str);
145961
146204
  };
145962
- var bgGreen3 = (str) => {
145963
- return color2("bgGreen", str);
146205
+ var bgGreen32 = (str) => {
146206
+ return color3("bgGreen", str);
145964
146207
  };
145965
- var redBright3 = (str) => {
145966
- return color2("redBright", str);
146208
+ var redBright32 = (str) => {
146209
+ return color3("redBright", str);
145967
146210
  };
145968
- var greenBright3 = (str) => {
145969
- return color2("greenBright", str);
146211
+ var greenBright32 = (str) => {
146212
+ return color3("greenBright", str);
145970
146213
  };
145971
- var bgRedBright3 = (str) => {
145972
- return color2("bgRedBright", str);
146214
+ var bgRedBright32 = (str) => {
146215
+ return color3("bgRedBright", str);
145973
146216
  };
145974
- var bgBlueBright3 = (str) => {
145975
- return color2("bgBlueBright", str);
146217
+ var bgBlueBright32 = (str) => {
146218
+ return color3("bgBlueBright", str);
145976
146219
  };
145977
146220
  var Log = class {
145978
146221
  toolName;
@@ -145990,22 +146233,22 @@ var Log = class {
145990
146233
  if (this.toolName) {
145991
146234
  const strTool = ` ${this.toolName} `;
145992
146235
  if (withError) {
145993
- table.push(bgRedBright3(strTool));
146236
+ table.push(bgRedBright32(strTool));
145994
146237
  } else if (withSuccess) {
145995
- table.push(bgGreen3(strTool));
146238
+ table.push(bgGreen32(strTool));
145996
146239
  } else {
145997
- table.push(bgBlueBright3(strTool));
146240
+ table.push(bgBlueBright32(strTool));
145998
146241
  }
145999
146242
  }
146000
146243
  if (this.withDate === "dateTime") {
146001
- table.push(String(bgBlueBright3(`${new Date().toISOString()} `)));
146244
+ table.push(String(bgBlueBright32(`${new Date().toISOString()} `)));
146002
146245
  } else if (this.withDate === "time") {
146003
- table.push(String(bgBlueBright3(`${new Date().toISOString().split("T")[1]} `)));
146246
+ table.push(String(bgBlueBright32(`${new Date().toISOString().split("T")[1]} `)));
146004
146247
  }
146005
146248
  if (withError) {
146006
- table.push(bold3(redBright3(" \u2718")));
146249
+ table.push(bold32(redBright32(" \u2718")));
146007
146250
  } else if (withSuccess) {
146008
- table.push(bold3(greenBright3(" \u2714")));
146251
+ table.push(bold32(greenBright32(" \u2714")));
146009
146252
  } else {
146010
146253
  table.push(String("" + this.prefixEmoji));
146011
146254
  }
@@ -151987,89 +152230,89 @@ async function glob22(pattern) {
151987
152230
  glob22.hasMagic = glob3.hasMagic;
151988
152231
  var stylesNode_exports22 = {};
151989
152232
  __export3(stylesNode_exports22, {
151990
- bgBlack: () => bgBlack4,
151991
- bgBlackBright: () => bgBlackBright4,
151992
- bgBlue: () => bgBlue4,
151993
- bgBlueBright: () => bgBlueBright4,
151994
- bgCyan: () => bgCyan4,
151995
- bgCyanBright: () => bgCyanBright4,
151996
- bgGreen: () => bgGreen4,
151997
- bgGreenBright: () => bgGreenBright4,
151998
- bgMagenta: () => bgMagenta4,
151999
- bgMagentaBright: () => bgMagentaBright4,
152000
- bgRed: () => bgRed4,
152001
- bgRedBright: () => bgRedBright4,
152002
- bgWhite: () => bgWhite4,
152003
- bgWhiteBright: () => bgWhiteBright4,
152004
- bgYellow: () => bgYellow4,
152005
- bgYellowBright: () => bgYellowBright4,
152006
- black: () => black4,
152007
- blackBright: () => blackBright4,
152008
- blue: () => blue4,
152009
- blueBright: () => blueBright4,
152010
- bold: () => bold4,
152011
- cyan: () => cyan4,
152012
- cyanBright: () => cyanBright4,
152013
- dim: () => dim4,
152014
- gray: () => gray4,
152015
- green: () => green4,
152016
- greenBright: () => greenBright4,
152017
- hidden: () => hidden4,
152018
- inverse: () => inverse4,
152019
- italic: () => italic4,
152020
- magenta: () => magenta4,
152021
- magentaBright: () => magentaBright4,
152022
- red: () => red4,
152023
- redBright: () => redBright4,
152024
- reset: () => reset4,
152025
- strikethrough: () => strikethrough4,
152026
- underline: () => underline4,
152027
- white: () => white4,
152028
- whiteBright: () => whiteBright4,
152029
- yellow: () => yellow4,
152030
- yellowBright: () => yellowBright4
152031
- });
152032
- var reset4 = { start: "\x1B[0m", end: "\x1B[0m" };
152033
- var bold4 = { start: "\x1B[1m", end: "\x1B[22m" };
152034
- var dim4 = { start: "\x1B[2m", end: "\x1B[22m" };
152035
- var italic4 = { start: "\x1B[3m", end: "\x1B[23m" };
152036
- var underline4 = { start: "\x1B[4m", end: "\x1B[24m" };
152037
- var inverse4 = { start: "\x1B[7m", end: "\x1B[27m" };
152038
- var hidden4 = { start: "\x1B[8m", end: "\x1B[28m" };
152039
- var strikethrough4 = { start: "\x1B[9m", end: "\x1B[29m" };
152040
- var black4 = { start: "\x1B[30m", end: "\x1B[39m" };
152041
- var red4 = { start: "\x1B[31m", end: "\x1B[39m" };
152042
- var green4 = { start: "\x1B[32m", end: "\x1B[39m" };
152043
- var yellow4 = { start: "\x1B[33m", end: "\x1B[39m" };
152044
- var blue4 = { start: "\x1B[34m", end: "\x1B[39m" };
152045
- var magenta4 = { start: "\x1B[35m", end: "\x1B[39m" };
152046
- var cyan4 = { start: "\x1B[36m", end: "\x1B[39m" };
152047
- var white4 = { start: "\x1B[37m", end: "\x1B[39m" };
152048
- var gray4 = { start: "\x1B[90m", end: "\x1B[39m" };
152049
- var bgBlack4 = { start: "\x1B[40m", end: "\x1B[49m" };
152050
- var bgRed4 = { start: "\x1B[41m", end: "\x1B[49m" };
152051
- var bgGreen4 = { start: "\x1B[42m", end: "\x1B[49m" };
152052
- var bgYellow4 = { start: "\x1B[43m", end: "\x1B[49m" };
152053
- var bgBlue4 = { start: "\x1B[44m", end: "\x1B[49m" };
152054
- var bgMagenta4 = { start: "\x1B[45m", end: "\x1B[49m" };
152055
- var bgCyan4 = { start: "\x1B[46m", end: "\x1B[49m" };
152056
- var bgWhite4 = { start: "\x1B[47m", end: "\x1B[49m" };
152057
- var blackBright4 = { start: "\x1B[90m", end: "\x1B[39m" };
152058
- var redBright4 = { start: "\x1B[91m", end: "\x1B[39m" };
152059
- var greenBright4 = { start: "\x1B[92m", end: "\x1B[39m" };
152060
- var yellowBright4 = { start: "\x1B[93m", end: "\x1B[39m" };
152061
- var blueBright4 = { start: "\x1B[94m", end: "\x1B[39m" };
152062
- var magentaBright4 = { start: "\x1B[95m", end: "\x1B[39m" };
152063
- var cyanBright4 = { start: "\x1B[96m", end: "\x1B[39m" };
152064
- var whiteBright4 = { start: "\x1B[97m", end: "\x1B[39m" };
152065
- var bgBlackBright4 = { start: "\x1B[100m", end: "\x1B[49m" };
152066
- var bgRedBright4 = { start: "\x1B[101m", end: "\x1B[49m" };
152067
- var bgGreenBright4 = { start: "\x1B[102m", end: "\x1B[49m" };
152068
- var bgYellowBright4 = { start: "\x1B[103m", end: "\x1B[49m" };
152069
- var bgBlueBright4 = { start: "\x1B[104m", end: "\x1B[49m" };
152070
- var bgMagentaBright4 = { start: "\x1B[105m", end: "\x1B[49m" };
152071
- var bgCyanBright4 = { start: "\x1B[106m", end: "\x1B[49m" };
152072
- var bgWhiteBright4 = { start: "\x1B[107m", end: "\x1B[49m" };
152233
+ bgBlack: () => bgBlack42,
152234
+ bgBlackBright: () => bgBlackBright42,
152235
+ bgBlue: () => bgBlue42,
152236
+ bgBlueBright: () => bgBlueBright42,
152237
+ bgCyan: () => bgCyan42,
152238
+ bgCyanBright: () => bgCyanBright42,
152239
+ bgGreen: () => bgGreen42,
152240
+ bgGreenBright: () => bgGreenBright42,
152241
+ bgMagenta: () => bgMagenta42,
152242
+ bgMagentaBright: () => bgMagentaBright42,
152243
+ bgRed: () => bgRed42,
152244
+ bgRedBright: () => bgRedBright42,
152245
+ bgWhite: () => bgWhite42,
152246
+ bgWhiteBright: () => bgWhiteBright42,
152247
+ bgYellow: () => bgYellow42,
152248
+ bgYellowBright: () => bgYellowBright42,
152249
+ black: () => black42,
152250
+ blackBright: () => blackBright42,
152251
+ blue: () => blue42,
152252
+ blueBright: () => blueBright42,
152253
+ bold: () => bold42,
152254
+ cyan: () => cyan42,
152255
+ cyanBright: () => cyanBright42,
152256
+ dim: () => dim42,
152257
+ gray: () => gray42,
152258
+ green: () => green42,
152259
+ greenBright: () => greenBright42,
152260
+ hidden: () => hidden42,
152261
+ inverse: () => inverse42,
152262
+ italic: () => italic42,
152263
+ magenta: () => magenta42,
152264
+ magentaBright: () => magentaBright42,
152265
+ red: () => red42,
152266
+ redBright: () => redBright42,
152267
+ reset: () => reset42,
152268
+ strikethrough: () => strikethrough42,
152269
+ underline: () => underline42,
152270
+ white: () => white42,
152271
+ whiteBright: () => whiteBright42,
152272
+ yellow: () => yellow42,
152273
+ yellowBright: () => yellowBright42
152274
+ });
152275
+ var reset42 = { start: "\x1B[0m", end: "\x1B[0m" };
152276
+ var bold42 = { start: "\x1B[1m", end: "\x1B[22m" };
152277
+ var dim42 = { start: "\x1B[2m", end: "\x1B[22m" };
152278
+ var italic42 = { start: "\x1B[3m", end: "\x1B[23m" };
152279
+ var underline42 = { start: "\x1B[4m", end: "\x1B[24m" };
152280
+ var inverse42 = { start: "\x1B[7m", end: "\x1B[27m" };
152281
+ var hidden42 = { start: "\x1B[8m", end: "\x1B[28m" };
152282
+ var strikethrough42 = { start: "\x1B[9m", end: "\x1B[29m" };
152283
+ var black42 = { start: "\x1B[30m", end: "\x1B[39m" };
152284
+ var red42 = { start: "\x1B[31m", end: "\x1B[39m" };
152285
+ var green42 = { start: "\x1B[32m", end: "\x1B[39m" };
152286
+ var yellow42 = { start: "\x1B[33m", end: "\x1B[39m" };
152287
+ var blue42 = { start: "\x1B[34m", end: "\x1B[39m" };
152288
+ var magenta42 = { start: "\x1B[35m", end: "\x1B[39m" };
152289
+ var cyan42 = { start: "\x1B[36m", end: "\x1B[39m" };
152290
+ var white42 = { start: "\x1B[37m", end: "\x1B[39m" };
152291
+ var gray42 = { start: "\x1B[90m", end: "\x1B[39m" };
152292
+ var bgBlack42 = { start: "\x1B[40m", end: "\x1B[49m" };
152293
+ var bgRed42 = { start: "\x1B[41m", end: "\x1B[49m" };
152294
+ var bgGreen42 = { start: "\x1B[42m", end: "\x1B[49m" };
152295
+ var bgYellow42 = { start: "\x1B[43m", end: "\x1B[49m" };
152296
+ var bgBlue42 = { start: "\x1B[44m", end: "\x1B[49m" };
152297
+ var bgMagenta42 = { start: "\x1B[45m", end: "\x1B[49m" };
152298
+ var bgCyan42 = { start: "\x1B[46m", end: "\x1B[49m" };
152299
+ var bgWhite42 = { start: "\x1B[47m", end: "\x1B[49m" };
152300
+ var blackBright42 = { start: "\x1B[90m", end: "\x1B[39m" };
152301
+ var redBright42 = { start: "\x1B[91m", end: "\x1B[39m" };
152302
+ var greenBright42 = { start: "\x1B[92m", end: "\x1B[39m" };
152303
+ var yellowBright42 = { start: "\x1B[93m", end: "\x1B[39m" };
152304
+ var blueBright42 = { start: "\x1B[94m", end: "\x1B[39m" };
152305
+ var magentaBright42 = { start: "\x1B[95m", end: "\x1B[39m" };
152306
+ var cyanBright42 = { start: "\x1B[96m", end: "\x1B[39m" };
152307
+ var whiteBright42 = { start: "\x1B[97m", end: "\x1B[39m" };
152308
+ var bgBlackBright42 = { start: "\x1B[100m", end: "\x1B[49m" };
152309
+ var bgRedBright42 = { start: "\x1B[101m", end: "\x1B[49m" };
152310
+ var bgGreenBright42 = { start: "\x1B[102m", end: "\x1B[49m" };
152311
+ var bgYellowBright42 = { start: "\x1B[103m", end: "\x1B[49m" };
152312
+ var bgBlueBright42 = { start: "\x1B[104m", end: "\x1B[49m" };
152313
+ var bgMagentaBright42 = { start: "\x1B[105m", end: "\x1B[49m" };
152314
+ var bgCyanBright42 = { start: "\x1B[106m", end: "\x1B[49m" };
152315
+ var bgWhiteBright42 = { start: "\x1B[107m", end: "\x1B[49m" };
152073
152316
  init_fetch_blob2();
152074
152317
  init_esm_min2();
152075
152318
  var FetchBaseError2 = class extends Error {
@@ -152722,43 +152965,43 @@ __export3(conventions_exports2, {
152722
152965
  vite_render_path: () => vite_render_path2
152723
152966
  });
152724
152967
  function router_path2(config2) {
152725
- return path_exports2.join(base_dir2(config2), "Router.jsx");
152968
+ return join22(base_dir2(config2), "Router.jsx");
152726
152969
  }
152727
152970
  function page_entry_path2(config2, id, base) {
152728
- return path_exports2.join(page_entries_dir2(config2, base), `${id}.jsx`);
152971
+ return join22(page_entries_dir2(config2, base), `${id}.jsx`);
152729
152972
  }
152730
152973
  function server_adapter_path2(config2, base) {
152731
- return path_exports2.join(units_dir2(config2, base), "render", "server.js");
152974
+ return join22(units_dir2(config2, base), "render", "server.js");
152732
152975
  }
152733
152976
  function adapter_config_path2(config2, base) {
152734
- return path_exports2.join(units_dir2(config2, base), "render", "config.js");
152977
+ return join22(units_dir2(config2, base), "render", "config.js");
152735
152978
  }
152736
152979
  function vite_render_path2(config2, base) {
152737
- return path_exports2.join(units_dir2(config2, base), "render", "vite.js");
152980
+ return join22(units_dir2(config2, base), "render", "vite.js");
152738
152981
  }
152739
152982
  function app_component_path2(config2, base) {
152740
- return path_exports2.join(units_dir2(config2, base), "render", "App.jsx");
152983
+ return join22(units_dir2(config2, base), "render", "App.jsx");
152741
152984
  }
152742
152985
  function page_unit_path2(config2, id, base) {
152743
- return path_exports2.join(page_units_dir2(config2, base), `${id}.jsx`);
152986
+ return join22(page_units_dir2(config2, base), `${id}.jsx`);
152744
152987
  }
152745
152988
  function layout_unit_path2(config2, id, base) {
152746
- return path_exports2.join(layout_units_dir2(config2, base), `${id}.jsx`);
152989
+ return join22(layout_units_dir2(config2, base), `${id}.jsx`);
152747
152990
  }
152748
152991
  function componentField_unit_path2(config2, id, base) {
152749
- return path_exports2.join(units_dir2(config2, base), "componentFields", `wrapper_${id}.jsx`);
152992
+ return join22(units_dir2(config2, base), "componentFields", `wrapper_${id}.jsx`);
152750
152993
  }
152751
152994
  function fallback_unit_path2(config2, which, id, base) {
152752
- return path_exports2.join(fallbacks_units_dir2(config2, which, base), `${id}.jsx`);
152995
+ return join22(fallbacks_units_dir2(config2, which, base), `${id}.jsx`);
152753
152996
  }
152754
152997
  async function read_pageQuery2(base) {
152755
- const target = path_exports2.join(base, "+page.gql");
152756
- return [target, await fs_exports2.readFile(target)];
152998
+ const target = join22(base, "+page.gql");
152999
+ return [target, await readFile2(target)];
152757
153000
  }
152758
153001
  async function read_pageView2(base) {
152759
153002
  for (const name of ["+page.tsx", "+page.jsx"]) {
152760
- let target = path_exports2.join(base, name);
152761
- let result = await fs_exports2.readFile(target);
153003
+ let target = join22(base, name);
153004
+ let result = await readFile2(target);
152762
153005
  if (result) {
152763
153006
  return [target, result];
152764
153007
  }
@@ -152766,13 +153009,13 @@ async function read_pageView2(base) {
152766
153009
  return [null, null];
152767
153010
  }
152768
153011
  async function read_layoutQuery2(base) {
152769
- const target = path_exports2.join(base, "+layout.gql");
152770
- return [target, await fs_exports2.readFile(target)];
153012
+ const target = join22(base, "+layout.gql");
153013
+ return [target, await readFile2(target)];
152771
153014
  }
152772
153015
  async function read_layoutView2(base) {
152773
153016
  for (const name of ["+layout.tsx", "+layout.jsx"]) {
152774
- let target = path_exports2.join(base, name);
152775
- let result = await fs_exports2.readFile(target);
153017
+ let target = join22(base, name);
153018
+ let result = await readFile2(target);
152776
153019
  if (result) {
152777
153020
  return [target, result];
152778
153021
  }
@@ -152780,10 +153023,10 @@ async function read_layoutView2(base) {
152780
153023
  return [null, null];
152781
153024
  }
152782
153025
  function temp_dir2(config2, key) {
152783
- return path_exports2.join(config2.rootDir, "temp", key);
153026
+ return join22(config2.rootDir, "temp", key);
152784
153027
  }
152785
153028
  function router_index_path2(config2) {
152786
- return path_exports2.join(config2.routesDir, "..", "+index.jsx");
153029
+ return join22(config2.routesDir, "..", "+index.jsx");
152787
153030
  }
152788
153031
  function is_layout2(path42) {
152789
153032
  return path42.endsWith("+layout.tsx") || path42.endsWith("+layout.jsx");
@@ -152806,27 +153049,30 @@ function page_id2(path42) {
152806
153049
  return copy;
152807
153050
  }
152808
153051
  function page_entries_dir2(config2, base) {
152809
- return path_exports2.join(units_dir2(config2, base), "entries");
153052
+ return join22(units_dir2(config2, base), "entries");
152810
153053
  }
152811
153054
  function page_units_dir2(config2, base) {
152812
- return path_exports2.join(units_dir2(config2, base), "pages");
153055
+ return join22(units_dir2(config2, base), "pages");
152813
153056
  }
152814
153057
  function layout_units_dir2(config2, base) {
152815
- return path_exports2.join(units_dir2(config2, base), "layouts");
153058
+ return join22(units_dir2(config2, base), "layouts");
152816
153059
  }
152817
153060
  function fallbacks_units_dir2(config2, which, base) {
152818
- return path_exports2.join(units_dir2(config2, base), "fallbacks", which);
153061
+ return join22(units_dir2(config2, base), "fallbacks", which);
152819
153062
  }
152820
153063
  function units_dir2(config2, base = base_dir2(config2)) {
152821
- return path_exports2.join(base, "units");
153064
+ return join22(base, "units");
152822
153065
  }
152823
153066
  function base_dir2(config2) {
152824
153067
  return config2.pluginDirectory("houdini-react");
152825
153068
  }
152826
153069
  function serialized_manifest_path2(config2, base = base_dir2(config2)) {
152827
- return path_exports2.join(base, "manifest.json");
153070
+ return join22(base, "manifest.json");
152828
153071
  }
152829
153072
  var t22 = __toESM3(require_lib52(), 1);
153073
+ var import_parser2 = __toESM3(require_lib62(), 1);
153074
+ var import_recast2 = __toESM3(require_main22(), 1);
153075
+ var import_deepmerge2 = __toESM3(require_cjs2(), 1);
152830
153076
  function flatten2(source) {
152831
153077
  if (!source) {
152832
153078
  return [];
@@ -155140,11 +155386,8 @@ var cache_default2 = new Cache2();
155140
155386
  var serverSide2 = typeof globalThis.window === "undefined";
155141
155387
  var currentDir2 = dirname2(fileURLToPath32(import.meta.url));
155142
155388
  var DEFAULT_CONFIG_PATH2 = join22(process.cwd(), "houdini.config.js");
155143
- var emptySchema2 = graphql42.buildSchema("type Query { hello: String }");
155389
+ var emptySchema2 = graphql52.buildSchema("type Query { hello: String }");
155144
155390
  var defaultDirectives2 = emptySchema2.getDirectives().map((dir) => dir.name);
155145
- var import_parser2 = __toESM3(require_lib62(), 1);
155146
- var import_recast2 = __toESM3(require_main22(), 1);
155147
- var import_deepmerge2 = __toESM3(require_cjs2(), 1);
155148
155391
  var recast3 = __toESM3(require_main22(), 1);
155149
155392
  var AST22 = recast3.types.builders;
155150
155393
  var recast22 = __toESM3(require_main22(), 1);
@@ -155625,115 +155868,11 @@ function artifact_import({
155625
155868
  return { id: ids, added };
155626
155869
  }
155627
155870
 
155628
- // ../../node_modules/.pnpm/esm-env@1.0.0/node_modules/esm-env/prod-ssr.js
155629
- var BROWSER3 = false;
155630
-
155631
- // ../../node_modules/.pnpm/@kitql+helpers@0.8.2/node_modules/@kitql/helpers/dist/colors/stylesNode.js
155632
- var stylesNode_exports3 = {};
155633
- __export(stylesNode_exports3, {
155634
- bgBlack: () => bgBlack3,
155635
- bgBlackBright: () => bgBlackBright3,
155636
- bgBlue: () => bgBlue3,
155637
- bgBlueBright: () => bgBlueBright5,
155638
- bgCyan: () => bgCyan3,
155639
- bgCyanBright: () => bgCyanBright3,
155640
- bgGreen: () => bgGreen5,
155641
- bgGreenBright: () => bgGreenBright3,
155642
- bgMagenta: () => bgMagenta3,
155643
- bgMagentaBright: () => bgMagentaBright3,
155644
- bgRed: () => bgRed3,
155645
- bgRedBright: () => bgRedBright5,
155646
- bgWhite: () => bgWhite3,
155647
- bgWhiteBright: () => bgWhiteBright3,
155648
- bgYellow: () => bgYellow3,
155649
- bgYellowBright: () => bgYellowBright3,
155650
- black: () => black3,
155651
- blackBright: () => blackBright3,
155652
- blue: () => blue3,
155653
- blueBright: () => blueBright3,
155654
- bold: () => bold5,
155655
- cyan: () => cyan5,
155656
- cyanBright: () => cyanBright3,
155657
- dim: () => dim3,
155658
- gray: () => gray3,
155659
- green: () => green3,
155660
- greenBright: () => greenBright5,
155661
- hidden: () => hidden3,
155662
- inverse: () => inverse3,
155663
- italic: () => italic3,
155664
- magenta: () => magenta3,
155665
- magentaBright: () => magentaBright3,
155666
- red: () => red3,
155667
- redBright: () => redBright5,
155668
- reset: () => reset3,
155669
- strikethrough: () => strikethrough3,
155670
- underline: () => underline3,
155671
- white: () => white3,
155672
- whiteBright: () => whiteBright3,
155673
- yellow: () => yellow3,
155674
- yellowBright: () => yellowBright3
155675
- });
155676
- var reset3 = { start: "\x1B[0m", end: "\x1B[0m" };
155677
- var bold5 = { start: "\x1B[1m", end: "\x1B[22m" };
155678
- var dim3 = { start: "\x1B[2m", end: "\x1B[22m" };
155679
- var italic3 = { start: "\x1B[3m", end: "\x1B[23m" };
155680
- var underline3 = { start: "\x1B[4m", end: "\x1B[24m" };
155681
- var inverse3 = { start: "\x1B[7m", end: "\x1B[27m" };
155682
- var hidden3 = { start: "\x1B[8m", end: "\x1B[28m" };
155683
- var strikethrough3 = { start: "\x1B[9m", end: "\x1B[29m" };
155684
- var black3 = { start: "\x1B[30m", end: "\x1B[39m" };
155685
- var red3 = { start: "\x1B[31m", end: "\x1B[39m" };
155686
- var green3 = { start: "\x1B[32m", end: "\x1B[39m" };
155687
- var yellow3 = { start: "\x1B[33m", end: "\x1B[39m" };
155688
- var blue3 = { start: "\x1B[34m", end: "\x1B[39m" };
155689
- var magenta3 = { start: "\x1B[35m", end: "\x1B[39m" };
155690
- var cyan5 = { start: "\x1B[36m", end: "\x1B[39m" };
155691
- var white3 = { start: "\x1B[37m", end: "\x1B[39m" };
155692
- var gray3 = { start: "\x1B[90m", end: "\x1B[39m" };
155693
- var bgBlack3 = { start: "\x1B[40m", end: "\x1B[49m" };
155694
- var bgRed3 = { start: "\x1B[41m", end: "\x1B[49m" };
155695
- var bgGreen5 = { start: "\x1B[42m", end: "\x1B[49m" };
155696
- var bgYellow3 = { start: "\x1B[43m", end: "\x1B[49m" };
155697
- var bgBlue3 = { start: "\x1B[44m", end: "\x1B[49m" };
155698
- var bgMagenta3 = { start: "\x1B[45m", end: "\x1B[49m" };
155699
- var bgCyan3 = { start: "\x1B[46m", end: "\x1B[49m" };
155700
- var bgWhite3 = { start: "\x1B[47m", end: "\x1B[49m" };
155701
- var blackBright3 = { start: "\x1B[90m", end: "\x1B[39m" };
155702
- var redBright5 = { start: "\x1B[91m", end: "\x1B[39m" };
155703
- var greenBright5 = { start: "\x1B[92m", end: "\x1B[39m" };
155704
- var yellowBright3 = { start: "\x1B[93m", end: "\x1B[39m" };
155705
- var blueBright3 = { start: "\x1B[94m", end: "\x1B[39m" };
155706
- var magentaBright3 = { start: "\x1B[95m", end: "\x1B[39m" };
155707
- var cyanBright3 = { start: "\x1B[96m", end: "\x1B[39m" };
155708
- var whiteBright3 = { start: "\x1B[97m", end: "\x1B[39m" };
155709
- var bgBlackBright3 = { start: "\x1B[100m", end: "\x1B[49m" };
155710
- var bgRedBright5 = { start: "\x1B[101m", end: "\x1B[49m" };
155711
- var bgGreenBright3 = { start: "\x1B[102m", end: "\x1B[49m" };
155712
- var bgYellowBright3 = { start: "\x1B[103m", end: "\x1B[49m" };
155713
- var bgBlueBright5 = { start: "\x1B[104m", end: "\x1B[49m" };
155714
- var bgMagentaBright3 = { start: "\x1B[105m", end: "\x1B[49m" };
155715
- var bgCyanBright3 = { start: "\x1B[106m", end: "\x1B[49m" };
155716
- var bgWhiteBright3 = { start: "\x1B[107m", end: "\x1B[49m" };
155871
+ // src/plugin/transforms/componentQuery.ts
155872
+ var recast16 = __toESM(require_main4(), 1);
155717
155873
 
155718
- // ../../node_modules/.pnpm/@kitql+helpers@0.8.2/node_modules/@kitql/helpers/dist/colors/index.js
155719
- var getStyleNode3 = (styleKey) => {
155720
- return stylesNode_exports3[styleKey] ?? void 0;
155721
- };
155722
- var color3 = (style, str) => {
155723
- return BROWSER3 ? colorBrowser3(style, str) : colorNode3(style, str);
155724
- };
155725
- var colorNode3 = (style, str) => {
155726
- return `${getStyleNode3(style).start}${str}${getStyleNode3(style).end}`;
155727
- };
155728
- var START13 = `$$KitQL_`;
155729
- var START23 = `_KitQL$$`;
155730
- var END3 = `$$KitQLEND$$`;
155731
- var colorBrowser3 = (style, str) => {
155732
- return `${START13}${style}${START23}${str}${END3}`;
155733
- };
155734
- var yellow5 = (str) => {
155735
- return color3("yellow", str);
155736
- };
155874
+ // src/plugin/kit.ts
155875
+ import * as graphql36 from "graphql";
155737
155876
 
155738
155877
  // src/plugin/extractLoadFunction.ts
155739
155878
  import * as graphql35 from "graphql";
@@ -155748,6 +155887,20 @@ var houdini_before_load_fn = "_houdini_beforeLoad";
155748
155887
  var houdini_afterLoad_fn = "_houdini_afterLoad";
155749
155888
  var houdini_on_error_fn = "_houdini_onError";
155750
155889
 
155890
+ // src/plugin/storeConfig.ts
155891
+ function stores_directory_name() {
155892
+ return "stores";
155893
+ }
155894
+ function store_import_path({ config, name }) {
155895
+ return `$houdini/plugins/houdini-svelte/${stores_directory_name()}/${name}`;
155896
+ }
155897
+ function store_suffix(config) {
155898
+ return "Store";
155899
+ }
155900
+ function store_name({ config, name }) {
155901
+ return name + store_suffix(config);
155902
+ }
155903
+
155751
155904
  // src/plugin/extractLoadFunction.ts
155752
155905
  async function extract_load_function(config, filepath, mockArtifacts) {
155753
155906
  const nil = {
@@ -155837,7 +155990,7 @@ async function processScript(config, filepath, program, mockArtifacts) {
155837
155990
  load.push(result);
155838
155991
  if (!result) {
155839
155992
  throw new Error(
155840
- `Could not find ${yellow5(element.name)} for computing ${yellow5(houdini_load_fn)}. (if it was a global store, you need to instantiate the store manually.)
155993
+ `Could not find ${yellow3(element.name)} for computing ${yellow3(houdini_load_fn)}. (if it was a global store, you need to instantiate the store manually.)
155841
155994
  filepath: ${filepath}`
155842
155995
  );
155843
155996
  }
@@ -155977,41 +156130,6 @@ function resolve_relative(config, filename) {
155977
156130
  function route_page_path(config, filename) {
155978
156131
  return resolve_relative(config, filename).replace(".js", ".svelte").replace(".ts", ".svelte");
155979
156132
  }
155980
- function stores_directory_name() {
155981
- return "stores";
155982
- }
155983
- function store_import_path({ config, name }) {
155984
- return `$houdini/plugins/houdini-svelte/${stores_directory_name()}/${name}`;
155985
- }
155986
- function store_suffix(config) {
155987
- return "Store";
155988
- }
155989
- function store_name({ config, name }) {
155990
- return name + store_suffix(config);
155991
- }
155992
- function plugin_config(config) {
155993
- const cfg = config.pluginConfig("houdini-svelte");
155994
- return {
155995
- client: "./src/client",
155996
- defaultRouteBlocking: false,
155997
- pageQueryFilename: "+page.gql",
155998
- layoutQueryFilename: "+layout.gql",
155999
- static: false,
156000
- forceRunesMode: false,
156001
- ...cfg,
156002
- customStores: {
156003
- query: "../runtime/stores/query.QueryStore",
156004
- mutation: "../runtime/stores/mutation.MutationStore",
156005
- fragment: "../runtime/stores/fragment.FragmentStore",
156006
- subscription: "../runtime/stores/subscription.SubscriptionStore",
156007
- queryCursor: "../runtime/stores/pagination/query.QueryStoreCursor",
156008
- queryOffset: "../runtime/stores/pagination/query.QueryStoreOffset",
156009
- fragmentCursor: "../runtime/stores/pagination/fragment.FragmentStoreCursor",
156010
- fragmentOffset: "../runtime/stores/pagination/fragment.FragmentStoreOffset",
156011
- ...cfg?.customStores
156012
- }
156013
- };
156014
- }
156015
156133
  function store_import({
156016
156134
  page,
156017
156135
  artifact,
@@ -156031,121 +156149,7 @@ function store_import({
156031
156149
  return { id: ids[0], added };
156032
156150
  }
156033
156151
 
156034
- // src/plugin/extract.ts
156035
- var svelteRunes = [
156036
- "$state",
156037
- "$state.raw",
156038
- "$state.snapshot",
156039
- "$props",
156040
- "$bindable",
156041
- "$derived",
156042
- "$derived.by",
156043
- "$effect",
156044
- "$effect.pre",
156045
- "$effect.tracking",
156046
- "$effect.root",
156047
- "$inspect",
156048
- "$inspect().with",
156049
- "$host"
156050
- ];
156051
- async function parseSvelte(str, forceRunes) {
156052
- str = str.replace(/(<script[^>]*)(\s+)(generics="[^"]+?")/, (_, $1, $2, $3) => {
156053
- return $1 + $2 + " ".repeat($3.length);
156054
- });
156055
- const preprocessed = await svelte.preprocess(str, [
156056
- {
156057
- script({ content: input }) {
156058
- return {
156059
- code: input.replace(/\S/g, " ")
156060
- };
156061
- },
156062
- style({ content: input }) {
156063
- return {
156064
- code: input.replace(/\S/g, " ")
156065
- };
156066
- }
156067
- }
156068
- ]);
156069
- const parsed = svelte.parse(preprocessed.code);
156070
- const script = parsed.instance;
156071
- if (!script) {
156072
- return null;
156073
- }
156074
- const [greaterThanIndex, lessThanIndex] = findScriptInnerBounds({
156075
- start: parsed.instance.start,
156076
- end: parsed.instance.end - 1,
156077
- text: str
156078
- });
156079
- const string = str.slice(greaterThanIndex, lessThanIndex);
156080
- const scriptParsed = parseJS(string);
156081
- let usesRunes = false;
156082
- if (forceRunes) {
156083
- usesRunes = true;
156084
- } else {
156085
- walk(scriptParsed, {
156086
- enter(node) {
156087
- if (node.type === "CallExpression") {
156088
- let callNode = node;
156089
- if (callNode.callee.type === "Identifier") {
156090
- const calleeName = callNode.callee.name;
156091
- if (svelteRunes.some((rune) => rune === calleeName)) {
156092
- usesRunes = true;
156093
- this.skip();
156094
- }
156095
- } else if (callNode.callee.type === "MemberExpression") {
156096
- const callee = callNode.callee;
156097
- if (callee.object.type !== "Identifier" || callee.property.type !== "Identifier") {
156098
- return;
156099
- }
156100
- const calleeName = `${callee.object.name}.${callee.property.name}`;
156101
- if (svelteRunes.some((rune) => rune === calleeName)) {
156102
- usesRunes = true;
156103
- this.skip();
156104
- }
156105
- }
156106
- }
156107
- }
156108
- });
156109
- }
156110
- return {
156111
- script: scriptParsed,
156112
- position: {
156113
- start: greaterThanIndex,
156114
- end: lessThanIndex
156115
- },
156116
- useRunes: usesRunes
156117
- };
156118
- }
156119
- function findScriptInnerBounds({
156120
- start,
156121
- end,
156122
- text
156123
- }) {
156124
- let greaterThanIndex = start;
156125
- while (greaterThanIndex < end) {
156126
- if (text[greaterThanIndex] === ">") {
156127
- break;
156128
- }
156129
- greaterThanIndex++;
156130
- }
156131
- if (greaterThanIndex === start) {
156132
- throw new Error("Could not find the end of the tag open");
156133
- }
156134
- let lessThanIndex = end;
156135
- while (lessThanIndex > greaterThanIndex) {
156136
- if (text[lessThanIndex] === "<") {
156137
- break;
156138
- }
156139
- lessThanIndex--;
156140
- }
156141
- if (lessThanIndex === end) {
156142
- throw new Error("Could not find the start of the tag close");
156143
- }
156144
- return [greaterThanIndex + 1, lessThanIndex];
156145
- }
156146
-
156147
156152
  // src/plugin/transforms/componentQuery.ts
156148
- var recast16 = __toESM(require_main4(), 1);
156149
156153
  var AST17 = recast16.types.builders;
156150
156154
  async function QueryProcessor(config, page) {
156151
156155
  if (!is_component(config, page.framework, page.filepath)) {
@@ -156234,7 +156238,7 @@ async function QueryProcessor(config, page) {
156234
156238
  if (query.variableDefinitions && query.variableDefinitions?.length > 0 && has_variables === null) {
156235
156239
  formatErrors({
156236
156240
  filepath: page.filepath,
156237
- message: `Could not find required variable function: ${yellow5(
156241
+ message: `Could not find required variable function: ${yellow3(
156238
156242
  variable_fn
156239
156243
  )}. maybe its not exported? `
156240
156244
  });
@@ -156865,7 +156869,7 @@ function variable_function_for_query(page, query, has_local) {
156865
156869
  if (missing_args.length > 0 && !has_local) {
156866
156870
  throw {
156867
156871
  filepath: page.filepath,
156868
- message: `Could not find required variable function: ${yellow5(
156872
+ message: `Could not find required variable function: ${yellow3(
156869
156873
  query_variable_fn(query.name.value)
156870
156874
  )}. maybe its not exported?`
156871
156875
  };