houdini 1.2.63 → 1.3.0-next.0

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.
@@ -45175,11 +45175,11 @@ var require_types = __commonJS({
45175
45175
  }();
45176
45176
  exports.Def = Def;
45177
45177
  var Field = function() {
45178
- function Field2(name, type, defaultFn, hidden4) {
45178
+ function Field2(name, type, defaultFn, hidden6) {
45179
45179
  this.name = name;
45180
45180
  this.type = type;
45181
45181
  this.defaultFn = defaultFn;
45182
- this.hidden = !!hidden4;
45182
+ this.hidden = !!hidden6;
45183
45183
  }
45184
45184
  Field2.prototype.toString = function() {
45185
45185
  return JSON.stringify(this.name) + ": " + this.type;
@@ -45428,12 +45428,12 @@ var require_types = __commonJS({
45428
45428
  });
45429
45429
  return this;
45430
45430
  };
45431
- DefImpl2.prototype.field = function(name, type, defaultFn, hidden4) {
45431
+ DefImpl2.prototype.field = function(name, type, defaultFn, hidden6) {
45432
45432
  if (this.finalized) {
45433
45433
  console.error("Ignoring attempt to redefine field " + JSON.stringify(name) + " of finalized type " + JSON.stringify(this.typeName));
45434
45434
  return this;
45435
45435
  }
45436
- this.ownFields[name] = new Field(name, Type.from(type), defaultFn, hidden4);
45436
+ this.ownFields[name] = new Field(name, Type.from(type), defaultFn, hidden6);
45437
45437
  return this;
45438
45438
  };
45439
45439
  DefImpl2.prototype.finalize = function() {
@@ -46813,7 +46813,7 @@ var require_path_visitor = __commonJS({
46813
46813
  return Context;
46814
46814
  }
46815
46815
  var sharedContextProtoMethods = /* @__PURE__ */ Object.create(null);
46816
- sharedContextProtoMethods.reset = function reset4(path3) {
46816
+ sharedContextProtoMethods.reset = function reset6(path3) {
46817
46817
  if (!(this instanceof this.Context)) {
46818
46818
  throw new Error("");
46819
46819
  }
@@ -60849,21 +60849,14 @@ __export(vite_exports, {
60849
60849
  module.exports = __toCommonJS(vite_exports);
60850
60850
  var import_minimatch2 = __toESM(require_minimatch(), 1);
60851
60851
 
60852
- // ../../node_modules/.pnpm/vite-plugin-watch-and-run@1.3.2/node_modules/vite-plugin-watch-and-run/dist/index.js
60853
- var import_node_child_process = require("node:child_process");
60854
-
60855
- // ../../node_modules/.pnpm/@kitql+helpers@0.8.2/node_modules/@kitql/helpers/dist/sleep.js
60856
- async function sleep(ms) {
60857
- if (ms <= 0) {
60858
- return;
60859
- }
60860
- return new Promise((resolve2) => setTimeout(resolve2, ms));
60861
- }
60852
+ // ../../node_modules/.pnpm/vite-plugin-watch-and-run@1.7.0/node_modules/vite-plugin-watch-and-run/esm/index.js
60853
+ var import_child_process = require("child_process");
60854
+ var import_micromatch = __toESM(require_micromatch(), 1);
60862
60855
 
60863
60856
  // ../../node_modules/.pnpm/esm-env@1.0.0/node_modules/esm-env/prod-ssr.js
60864
60857
  var BROWSER = false;
60865
60858
 
60866
- // ../../node_modules/.pnpm/@kitql+helpers@0.8.2/node_modules/@kitql/helpers/dist/colors/stylesBrowser.js
60859
+ // ../../node_modules/.pnpm/@kitql+helpers@0.8.9/node_modules/@kitql/helpers/esm/colors/stylesBrowser.js
60867
60860
  var stylesBrowser_exports = {};
60868
60861
  __export(stylesBrowser_exports, {
60869
60862
  bgBlack: () => bgBlack,
@@ -60950,7 +60943,7 @@ var bgMagentaBright = "background-color: #ff69b4";
60950
60943
  var bgCyanBright = "background-color: #00ffff";
60951
60944
  var bgWhiteBright = "background-color: #ffffff";
60952
60945
 
60953
- // ../../node_modules/.pnpm/@kitql+helpers@0.8.2/node_modules/@kitql/helpers/dist/colors/stylesNode.js
60946
+ // ../../node_modules/.pnpm/@kitql+helpers@0.8.9/node_modules/@kitql/helpers/esm/colors/stylesNode.js
60954
60947
  var stylesNode_exports = {};
60955
60948
  __export(stylesNode_exports, {
60956
60949
  bgBlack: () => bgBlack2,
@@ -60995,49 +60988,49 @@ __export(stylesNode_exports, {
60995
60988
  yellow: () => yellow2,
60996
60989
  yellowBright: () => yellowBright2
60997
60990
  });
60998
- var reset2 = { start: "\x1B[0m", end: "\x1B[0m" };
60999
- var bold2 = { start: "\x1B[1m", end: "\x1B[22m" };
61000
- var dim2 = { start: "\x1B[2m", end: "\x1B[22m" };
61001
- var italic2 = { start: "\x1B[3m", end: "\x1B[23m" };
61002
- var underline2 = { start: "\x1B[4m", end: "\x1B[24m" };
61003
- var inverse2 = { start: "\x1B[7m", end: "\x1B[27m" };
61004
- var hidden2 = { start: "\x1B[8m", end: "\x1B[28m" };
61005
- var strikethrough2 = { start: "\x1B[9m", end: "\x1B[29m" };
61006
- var black2 = { start: "\x1B[30m", end: "\x1B[39m" };
61007
- var red2 = { start: "\x1B[31m", end: "\x1B[39m" };
61008
- var green2 = { start: "\x1B[32m", end: "\x1B[39m" };
61009
- var yellow2 = { start: "\x1B[33m", end: "\x1B[39m" };
61010
- var blue2 = { start: "\x1B[34m", end: "\x1B[39m" };
61011
- var magenta2 = { start: "\x1B[35m", end: "\x1B[39m" };
61012
- var cyan2 = { start: "\x1B[36m", end: "\x1B[39m" };
61013
- var white2 = { start: "\x1B[37m", end: "\x1B[39m" };
61014
- var gray2 = { start: "\x1B[90m", end: "\x1B[39m" };
61015
- var bgBlack2 = { start: "\x1B[40m", end: "\x1B[49m" };
61016
- var bgRed2 = { start: "\x1B[41m", end: "\x1B[49m" };
61017
- var bgGreen2 = { start: "\x1B[42m", end: "\x1B[49m" };
61018
- var bgYellow2 = { start: "\x1B[43m", end: "\x1B[49m" };
61019
- var bgBlue2 = { start: "\x1B[44m", end: "\x1B[49m" };
61020
- var bgMagenta2 = { start: "\x1B[45m", end: "\x1B[49m" };
61021
- var bgCyan2 = { start: "\x1B[46m", end: "\x1B[49m" };
61022
- var bgWhite2 = { start: "\x1B[47m", end: "\x1B[49m" };
61023
- var blackBright2 = { start: "\x1B[90m", end: "\x1B[39m" };
61024
- var redBright2 = { start: "\x1B[91m", end: "\x1B[39m" };
61025
- var greenBright2 = { start: "\x1B[92m", end: "\x1B[39m" };
61026
- var yellowBright2 = { start: "\x1B[93m", end: "\x1B[39m" };
61027
- var blueBright2 = { start: "\x1B[94m", end: "\x1B[39m" };
61028
- var magentaBright2 = { start: "\x1B[95m", end: "\x1B[39m" };
61029
- var cyanBright2 = { start: "\x1B[96m", end: "\x1B[39m" };
61030
- var whiteBright2 = { start: "\x1B[97m", end: "\x1B[39m" };
61031
- var bgBlackBright2 = { start: "\x1B[100m", end: "\x1B[49m" };
61032
- var bgRedBright2 = { start: "\x1B[101m", end: "\x1B[49m" };
61033
- var bgGreenBright2 = { start: "\x1B[102m", end: "\x1B[49m" };
61034
- var bgYellowBright2 = { start: "\x1B[103m", end: "\x1B[49m" };
61035
- var bgBlueBright2 = { start: "\x1B[104m", end: "\x1B[49m" };
61036
- var bgMagentaBright2 = { start: "\x1B[105m", end: "\x1B[49m" };
61037
- var bgCyanBright2 = { start: "\x1B[106m", end: "\x1B[49m" };
61038
- var bgWhiteBright2 = { start: "\x1B[107m", end: "\x1B[49m" };
60991
+ var reset2 = ["\x1B[0m", "\x1B[0m"];
60992
+ var bold2 = ["\x1B[1m", "\x1B[22m"];
60993
+ var dim2 = ["\x1B[2m", "\x1B[22m"];
60994
+ var italic2 = ["\x1B[3m", "\x1B[23m"];
60995
+ var underline2 = ["\x1B[4m", "\x1B[24m"];
60996
+ var inverse2 = ["\x1B[7m", "\x1B[27m"];
60997
+ var hidden2 = ["\x1B[8m", "\x1B[28m"];
60998
+ var strikethrough2 = ["\x1B[9m", "\x1B[29m"];
60999
+ var black2 = ["\x1B[30m", "\x1B[39m"];
61000
+ var red2 = ["\x1B[31m", "\x1B[39m"];
61001
+ var green2 = ["\x1B[32m", "\x1B[39m"];
61002
+ var yellow2 = ["\x1B[33m", "\x1B[39m"];
61003
+ var blue2 = ["\x1B[34m", "\x1B[39m"];
61004
+ var magenta2 = ["\x1B[35m", "\x1B[39m"];
61005
+ var cyan2 = ["\x1B[36m", "\x1B[39m"];
61006
+ var white2 = ["\x1B[37m", "\x1B[39m"];
61007
+ var gray2 = ["\x1B[90m", "\x1B[39m"];
61008
+ var bgBlack2 = ["\x1B[40m", "\x1B[49m"];
61009
+ var bgRed2 = ["\x1B[41m", "\x1B[49m"];
61010
+ var bgGreen2 = ["\x1B[42m", "\x1B[49m"];
61011
+ var bgYellow2 = ["\x1B[43m", "\x1B[49m"];
61012
+ var bgBlue2 = ["\x1B[44m", "\x1B[49m"];
61013
+ var bgMagenta2 = ["\x1B[45m", "\x1B[49m"];
61014
+ var bgCyan2 = ["\x1B[46m", "\x1B[49m"];
61015
+ var bgWhite2 = ["\x1B[47m", "\x1B[49m"];
61016
+ var blackBright2 = ["\x1B[90m", "\x1B[39m"];
61017
+ var redBright2 = ["\x1B[91m", "\x1B[39m"];
61018
+ var greenBright2 = ["\x1B[92m", "\x1B[39m"];
61019
+ var yellowBright2 = ["\x1B[93m", "\x1B[39m"];
61020
+ var blueBright2 = ["\x1B[94m", "\x1B[39m"];
61021
+ var magentaBright2 = ["\x1B[95m", "\x1B[39m"];
61022
+ var cyanBright2 = ["\x1B[96m", "\x1B[39m"];
61023
+ var whiteBright2 = ["\x1B[97m", "\x1B[39m"];
61024
+ var bgBlackBright2 = ["\x1B[100m", "\x1B[49m"];
61025
+ var bgRedBright2 = ["\x1B[101m", "\x1B[49m"];
61026
+ var bgGreenBright2 = ["\x1B[102m", "\x1B[49m"];
61027
+ var bgYellowBright2 = ["\x1B[103m", "\x1B[49m"];
61028
+ var bgBlueBright2 = ["\x1B[104m", "\x1B[49m"];
61029
+ var bgMagentaBright2 = ["\x1B[105m", "\x1B[49m"];
61030
+ var bgCyanBright2 = ["\x1B[106m", "\x1B[49m"];
61031
+ var bgWhiteBright2 = ["\x1B[107m", "\x1B[49m"];
61039
61032
 
61040
- // ../../node_modules/.pnpm/@kitql+helpers@0.8.2/node_modules/@kitql/helpers/dist/colors/index.js
61033
+ // ../../node_modules/.pnpm/@kitql+helpers@0.8.9/node_modules/@kitql/helpers/esm/colors/index.js
61041
61034
  var getStyleBrowser = (styleKey) => {
61042
61035
  return stylesBrowser_exports[styleKey] ?? void 0;
61043
61036
  };
@@ -61048,7 +61041,7 @@ var color = (style, str) => {
61048
61041
  return BROWSER ? colorBrowser(style, str) : colorNode(style, str);
61049
61042
  };
61050
61043
  var colorNode = (style, str) => {
61051
- return `${getStyleNode(style).start}${str}${getStyleNode(style).end}`;
61044
+ return `${getStyleNode(style)[0]}${str}${getStyleNode(style)[1]}`;
61052
61045
  };
61053
61046
  var START1 = `$$KitQL_`;
61054
61047
  var START2 = `_KitQL$$`;
@@ -61077,30 +61070,41 @@ var getAllIndexOf = (str, subStr) => {
61077
61070
  }
61078
61071
  return indexes;
61079
61072
  };
61080
- var colorProcess = (str) => {
61073
+ var colorProcess = (...msgs) => {
61081
61074
  if (!BROWSER) {
61082
- return [str];
61083
- }
61084
- const originalStr = str;
61085
- const posToReplace = [];
61086
- const tagsUsed = [...new Set(extractKitQLTags(str))];
61087
- for (const key of tagsUsed) {
61088
- const indexesStarts = getAllIndexOf(originalStr, `${START1}${key}${START2}`);
61089
- for (const index of indexesStarts) {
61090
- posToReplace.push({ index, browser: getStyleBrowser(key) });
61091
- }
61092
- str = str.replaceAll(`${START1}${key}${START2}`, "%c");
61093
- }
61094
- const indexesEnd = getAllIndexOf(originalStr, END);
61095
- for (const index of indexesEnd) {
61096
- posToReplace.push({ index, browser: "" });
61075
+ return [...msgs];
61097
61076
  }
61098
- str = str.replaceAll(END, "%c");
61077
+ const arr = [...msgs];
61078
+ const msgsTransformed = [];
61099
61079
  const colors = [];
61100
- for (const c of posToReplace.sort((a, b) => a.index - b.index)) {
61101
- colors.push(c.browser);
61080
+ const additional = [];
61081
+ for (let i2 = 0; i2 < arr.length; i2++) {
61082
+ let msg = arr[i2];
61083
+ if (typeof msg !== "string") {
61084
+ additional.push(msg);
61085
+ } else {
61086
+ const originalStr = msg;
61087
+ const posToReplace = [];
61088
+ const tagsUsed = [...new Set(extractKitQLTags(originalStr))];
61089
+ for (const key of tagsUsed) {
61090
+ const indexesStarts = getAllIndexOf(originalStr, `${START1}${key}${START2}`);
61091
+ for (const index of indexesStarts) {
61092
+ posToReplace.push({ index, browser: getStyleBrowser(key) });
61093
+ }
61094
+ msg = msg.replaceAll(`${START1}${key}${START2}`, "%c");
61095
+ }
61096
+ const indexesEnd = getAllIndexOf(originalStr, END);
61097
+ for (const index of indexesEnd) {
61098
+ posToReplace.push({ index, browser: "" });
61099
+ }
61100
+ msg = msg.replaceAll(END, "%c");
61101
+ for (const c of posToReplace.sort((a, b) => a.index - b.index)) {
61102
+ colors.push(c.browser);
61103
+ }
61104
+ msgsTransformed.push(msg);
61105
+ }
61102
61106
  }
61103
- return [str, ...colors];
61107
+ return [msgsTransformed.join(" "), ...colors, ...additional];
61104
61108
  };
61105
61109
  var bold3 = (str) => {
61106
61110
  return color("bold", str);
@@ -61111,23 +61115,29 @@ var red3 = (str) => {
61111
61115
  var green3 = (str) => {
61112
61116
  return color("green", str);
61113
61117
  };
61114
- var yellow3 = (str) => {
61115
- return color("yellow", str);
61116
- };
61117
61118
  var magenta3 = (str) => {
61118
61119
  return color("magenta", str);
61119
61120
  };
61120
61121
  var cyan3 = (str) => {
61121
61122
  return color("cyan", str);
61122
61123
  };
61124
+ var bgGreen3 = (str) => {
61125
+ return color("bgGreen", str);
61126
+ };
61123
61127
  var redBright3 = (str) => {
61124
61128
  return color("redBright", str);
61125
61129
  };
61126
61130
  var greenBright3 = (str) => {
61127
61131
  return color("greenBright", str);
61128
61132
  };
61133
+ var bgRedBright3 = (str) => {
61134
+ return color("bgRedBright", str);
61135
+ };
61136
+ var bgBlueBright3 = (str) => {
61137
+ return color("bgBlueBright", str);
61138
+ };
61129
61139
 
61130
- // ../../node_modules/.pnpm/@kitql+helpers@0.8.2/node_modules/@kitql/helpers/dist/Log.js
61140
+ // ../../node_modules/.pnpm/@kitql+helpers@0.8.9/node_modules/@kitql/helpers/esm/Log.js
61131
61141
  var Log = class {
61132
61142
  toolName;
61133
61143
  levelsToShow;
@@ -61139,56 +61149,67 @@ var Log = class {
61139
61149
  this.withDate = options?.withDate ?? null;
61140
61150
  this.prefixEmoji = options?.prefixEmoji ?? "";
61141
61151
  }
61142
- buildStr(msg, withError, withSuccess, indent3) {
61152
+ buildStr(withError, withSuccess, level, ...msgs) {
61143
61153
  const table = [];
61144
61154
  if (this.toolName) {
61145
- table.push(String(magenta3(`[${this.toolName}]`)));
61155
+ const strTool = ` ${this.toolName} `;
61156
+ if (withError) {
61157
+ table.push(bgRedBright3(strTool));
61158
+ } else if (withSuccess) {
61159
+ table.push(bgGreen3(strTool));
61160
+ } else {
61161
+ table.push(bgBlueBright3(strTool));
61162
+ }
61146
61163
  }
61147
61164
  if (this.withDate === "dateTime") {
61148
- table.push(String(magenta3(`[${new Date().toISOString()}]`)));
61165
+ table.push(String(bgBlueBright3(`${new Date().toISOString()} `)));
61149
61166
  } else if (this.withDate === "time") {
61150
- table.push(String(magenta3(`[${new Date().toISOString().split("T")[1]}]`)));
61167
+ table.push(String(bgBlueBright3(`${new Date().toISOString().split("T")[1]} `)));
61151
61168
  }
61152
61169
  if (withError) {
61153
- table.push(bold3(redBright3("\u2718")));
61170
+ table.push(bold3(redBright3(" \u2718")));
61154
61171
  } else if (withSuccess) {
61155
- table.push(bold3(greenBright3("\u2714")));
61172
+ table.push(bold3(greenBright3(" \u2714")));
61156
61173
  } else {
61157
- table.push(String(this.prefixEmoji));
61158
- }
61159
- table.push(indent3);
61160
- if (table.join("").length > 0) {
61161
- table.push(` `);
61174
+ table.push(String("" + this.prefixEmoji));
61162
61175
  }
61163
- table.push(String(msg));
61164
- const str = table.join("");
61165
- return colorProcess(str);
61166
- return [str];
61167
- }
61168
- info(msg, conf) {
61169
- const level = conf?.level ?? 0;
61170
- const withSuccess = conf?.withSuccess ?? false;
61171
- if (this.levelsToShow !== null && level <= this.levelsToShow) {
61176
+ if (level > 0) {
61172
61177
  const indent3 = " ".repeat(level);
61173
- const built = this.buildStr(msg, false, withSuccess, indent3);
61174
- console.info(...built);
61175
- return built;
61178
+ table.push(indent3);
61176
61179
  }
61177
- return null;
61180
+ if (table.length === 0 || table.length === 1 && table[0] === "") {
61181
+ return colorProcess(...[...msgs.flatMap((c) => c)]);
61182
+ }
61183
+ return colorProcess(...[table.join(""), ...msgs.flatMap((c) => c)]);
61184
+ }
61185
+ infoO(conf, ...msgs) {
61186
+ const built = this.buildStr(false, false, conf.level, ...msgs);
61187
+ console.info(...built.flatMap((c) => c));
61188
+ return built;
61189
+ }
61190
+ info(...msgs) {
61191
+ const built = this.buildStr(false, false, 0, ...msgs);
61192
+ console.info(...built.flatMap((c) => c));
61193
+ return built;
61178
61194
  }
61179
- success(msg, conf) {
61180
- const level = conf?.level ?? 0;
61181
- return this.info(msg, { level, withSuccess: true });
61195
+ successO(conf, ...msgs) {
61196
+ const built = this.buildStr(false, true, conf.level, msgs);
61197
+ console.info(...built.flatMap((c) => c));
61198
+ return built;
61182
61199
  }
61183
- error(msg) {
61184
- const built = this.buildStr(msg, true, false, "");
61185
- console.error(...built);
61200
+ success(...msgs) {
61201
+ const built = this.buildStr(false, true, 0, msgs);
61202
+ console.info(...built.flatMap((c) => c));
61203
+ return built;
61204
+ }
61205
+ error(...msgs) {
61206
+ const built = this.buildStr(true, false, 0, msgs);
61207
+ console.error(...built.flatMap((c) => c));
61186
61208
  return built;
61187
61209
  }
61188
61210
  };
61189
61211
 
61190
- // ../../node_modules/.pnpm/vite-plugin-watch-and-run@1.3.2/node_modules/vite-plugin-watch-and-run/dist/index.js
61191
- var import_micromatch = __toESM(require_micromatch(), 1);
61212
+ // ../../node_modules/.pnpm/vite-plugin-watch-and-run@1.7.0/node_modules/vite-plugin-watch-and-run/esm/index.js
61192
61213
  var nbOverlap = (a1, a2) => {
61193
61214
  return a1.filter((value) => a2?.includes(value)).length;
61194
61215
  };
@@ -61206,7 +61227,7 @@ function checkConf(params) {
61206
61227
  delay: paramRow.delay ?? 300,
61207
61228
  isRunning: false,
61208
61229
  name: paramRow.name,
61209
- quiet: Boolean(paramRow.quiet),
61230
+ logs: paramRow.logs ?? ["trigger", "streamData", "streamError", "end"],
61210
61231
  watch: paramRow.watch,
61211
61232
  shell: paramRow.shell ?? true,
61212
61233
  watchFile: paramRow.watchFile,
@@ -61251,20 +61272,20 @@ async function watcher(server, absolutePath, watchKind, watchAndRunConf) {
61251
61272
  const info = await shouldRun(absolutePath, watchKind, watchAndRunConf);
61252
61273
  if (info) {
61253
61274
  info.isRunning = true;
61254
- if (!info.quiet) {
61255
- let message = `${green3("\u2714")} Watch ${cyan3(watchKind)}`;
61275
+ if (info.logs.includes("trigger")) {
61276
+ const message = [`Watch ${cyan3(watchKind)}`];
61256
61277
  if (info.watch && absolutePath) {
61257
- message += green3(" " + absolutePath.replaceAll(process.cwd(), ""));
61278
+ message.push(green3(absolutePath.replaceAll(process.cwd(), "")));
61258
61279
  }
61259
61280
  if (typeof info.run === "string") {
61260
- message += ` and run ${green3(info.run)} `;
61281
+ message.push(`and run ${green3(info.run)}`);
61261
61282
  }
61262
- message += ` ${cyan3(info.delay + "ms")}`;
61263
- log.info(message);
61283
+ message.push(`${cyan3(info.delay + "ms")}`);
61284
+ log.success(message.join(" "));
61264
61285
  }
61265
61286
  setTimeout(async () => {
61266
61287
  if (typeof info.run === "function") {
61267
- const promise = info.run(server);
61288
+ const promise = info.run(server, absolutePath);
61268
61289
  try {
61269
61290
  if (promise) {
61270
61291
  await promise;
@@ -61279,18 +61300,30 @@ async function watcher(server, absolutePath, watchKind, watchAndRunConf) {
61279
61300
  info.isRunning = false;
61280
61301
  return;
61281
61302
  }
61282
- const child = (0, import_node_child_process.spawn)(info.run, [], { shell: info.shell });
61283
- child.stdout.on("data", (data) => {
61284
- process.stdout.write(formatLog(data.toString(), info.name ?? ""));
61285
- });
61286
- child.stderr.on("data", (data) => {
61287
- process.stdout.write(formatLog(data.toString(), info.name ?? ""));
61288
- });
61303
+ const child = (0, import_child_process.spawn)(info.run, [], { shell: info.shell });
61304
+ if (info.logs.includes("streamData")) {
61305
+ child.stdout.on("data", (data) => {
61306
+ process.stdout.write(formatLog(data.toString(), info.name ?? ""));
61307
+ });
61308
+ }
61309
+ if (info.logs.includes("streamError")) {
61310
+ child.stderr.on("data", (data) => {
61311
+ process.stdout.write(formatLog(data.toString(), info.name ?? ""));
61312
+ });
61313
+ }
61289
61314
  child.on("close", (code) => {
61290
- if (code === 0) {
61291
- log.info(`${green3("\u2714")} finished ${green3("successfully")}`);
61292
- } else {
61293
- log.error(`finished with some ${red3("errors")}`);
61315
+ if (info.logs.includes("end")) {
61316
+ const message = [`Finished`];
61317
+ if (info.name) {
61318
+ message.push(`${magenta3(info.name)}`);
61319
+ }
61320
+ if (code === 0) {
61321
+ message.push(green3("successfully"));
61322
+ log.success(message.join(" "));
61323
+ } else {
61324
+ message.push(`with some ${red3("errors")}!`);
61325
+ log.error(message.join(" "));
61326
+ }
61294
61327
  }
61295
61328
  info.isRunning = false;
61296
61329
  });
@@ -61300,7 +61333,7 @@ async function watcher(server, absolutePath, watchKind, watchAndRunConf) {
61300
61333
  return;
61301
61334
  }
61302
61335
  var log = new Log("Watch-and-Run");
61303
- function watchAndRun(params) {
61336
+ var watchAndRun = (params) => {
61304
61337
  return {
61305
61338
  name: "watch-and-run",
61306
61339
  getCheckedConf() {
@@ -61318,7 +61351,7 @@ function watchAndRun(params) {
61318
61351
  }
61319
61352
  }
61320
61353
  };
61321
- }
61354
+ };
61322
61355
 
61323
61356
  // src/codegen/index.ts
61324
61357
  var graphql32 = __toESM(require("graphql"), 1);
@@ -64943,6 +64976,127 @@ async function glob(pattern) {
64943
64976
  }
64944
64977
  glob.hasMagic = import_glob.glob.hasMagic;
64945
64978
 
64979
+ // ../../node_modules/.pnpm/@kitql+helpers@0.8.2/node_modules/@kitql/helpers/dist/sleep.js
64980
+ async function sleep(ms) {
64981
+ if (ms <= 0) {
64982
+ return;
64983
+ }
64984
+ return new Promise((resolve2) => setTimeout(resolve2, ms));
64985
+ }
64986
+
64987
+ // ../../node_modules/.pnpm/@kitql+helpers@0.8.2/node_modules/@kitql/helpers/dist/colors/stylesNode.js
64988
+ var stylesNode_exports2 = {};
64989
+ __export(stylesNode_exports2, {
64990
+ bgBlack: () => bgBlack4,
64991
+ bgBlackBright: () => bgBlackBright4,
64992
+ bgBlue: () => bgBlue4,
64993
+ bgBlueBright: () => bgBlueBright4,
64994
+ bgCyan: () => bgCyan4,
64995
+ bgCyanBright: () => bgCyanBright4,
64996
+ bgGreen: () => bgGreen4,
64997
+ bgGreenBright: () => bgGreenBright4,
64998
+ bgMagenta: () => bgMagenta4,
64999
+ bgMagentaBright: () => bgMagentaBright4,
65000
+ bgRed: () => bgRed4,
65001
+ bgRedBright: () => bgRedBright4,
65002
+ bgWhite: () => bgWhite4,
65003
+ bgWhiteBright: () => bgWhiteBright4,
65004
+ bgYellow: () => bgYellow4,
65005
+ bgYellowBright: () => bgYellowBright4,
65006
+ black: () => black4,
65007
+ blackBright: () => blackBright4,
65008
+ blue: () => blue4,
65009
+ blueBright: () => blueBright4,
65010
+ bold: () => bold4,
65011
+ cyan: () => cyan4,
65012
+ cyanBright: () => cyanBright4,
65013
+ dim: () => dim4,
65014
+ gray: () => gray4,
65015
+ green: () => green4,
65016
+ greenBright: () => greenBright4,
65017
+ hidden: () => hidden4,
65018
+ inverse: () => inverse4,
65019
+ italic: () => italic4,
65020
+ magenta: () => magenta4,
65021
+ magentaBright: () => magentaBright4,
65022
+ red: () => red4,
65023
+ redBright: () => redBright4,
65024
+ reset: () => reset4,
65025
+ strikethrough: () => strikethrough4,
65026
+ underline: () => underline4,
65027
+ white: () => white4,
65028
+ whiteBright: () => whiteBright4,
65029
+ yellow: () => yellow4,
65030
+ yellowBright: () => yellowBright4
65031
+ });
65032
+ var reset4 = { start: "\x1B[0m", end: "\x1B[0m" };
65033
+ var bold4 = { start: "\x1B[1m", end: "\x1B[22m" };
65034
+ var dim4 = { start: "\x1B[2m", end: "\x1B[22m" };
65035
+ var italic4 = { start: "\x1B[3m", end: "\x1B[23m" };
65036
+ var underline4 = { start: "\x1B[4m", end: "\x1B[24m" };
65037
+ var inverse4 = { start: "\x1B[7m", end: "\x1B[27m" };
65038
+ var hidden4 = { start: "\x1B[8m", end: "\x1B[28m" };
65039
+ var strikethrough4 = { start: "\x1B[9m", end: "\x1B[29m" };
65040
+ var black4 = { start: "\x1B[30m", end: "\x1B[39m" };
65041
+ var red4 = { start: "\x1B[31m", end: "\x1B[39m" };
65042
+ var green4 = { start: "\x1B[32m", end: "\x1B[39m" };
65043
+ var yellow4 = { start: "\x1B[33m", end: "\x1B[39m" };
65044
+ var blue4 = { start: "\x1B[34m", end: "\x1B[39m" };
65045
+ var magenta4 = { start: "\x1B[35m", end: "\x1B[39m" };
65046
+ var cyan4 = { start: "\x1B[36m", end: "\x1B[39m" };
65047
+ var white4 = { start: "\x1B[37m", end: "\x1B[39m" };
65048
+ var gray4 = { start: "\x1B[90m", end: "\x1B[39m" };
65049
+ var bgBlack4 = { start: "\x1B[40m", end: "\x1B[49m" };
65050
+ var bgRed4 = { start: "\x1B[41m", end: "\x1B[49m" };
65051
+ var bgGreen4 = { start: "\x1B[42m", end: "\x1B[49m" };
65052
+ var bgYellow4 = { start: "\x1B[43m", end: "\x1B[49m" };
65053
+ var bgBlue4 = { start: "\x1B[44m", end: "\x1B[49m" };
65054
+ var bgMagenta4 = { start: "\x1B[45m", end: "\x1B[49m" };
65055
+ var bgCyan4 = { start: "\x1B[46m", end: "\x1B[49m" };
65056
+ var bgWhite4 = { start: "\x1B[47m", end: "\x1B[49m" };
65057
+ var blackBright4 = { start: "\x1B[90m", end: "\x1B[39m" };
65058
+ var redBright4 = { start: "\x1B[91m", end: "\x1B[39m" };
65059
+ var greenBright4 = { start: "\x1B[92m", end: "\x1B[39m" };
65060
+ var yellowBright4 = { start: "\x1B[93m", end: "\x1B[39m" };
65061
+ var blueBright4 = { start: "\x1B[94m", end: "\x1B[39m" };
65062
+ var magentaBright4 = { start: "\x1B[95m", end: "\x1B[39m" };
65063
+ var cyanBright4 = { start: "\x1B[96m", end: "\x1B[39m" };
65064
+ var whiteBright4 = { start: "\x1B[97m", end: "\x1B[39m" };
65065
+ var bgBlackBright4 = { start: "\x1B[100m", end: "\x1B[49m" };
65066
+ var bgRedBright4 = { start: "\x1B[101m", end: "\x1B[49m" };
65067
+ var bgGreenBright4 = { start: "\x1B[102m", end: "\x1B[49m" };
65068
+ var bgYellowBright4 = { start: "\x1B[103m", end: "\x1B[49m" };
65069
+ var bgBlueBright4 = { start: "\x1B[104m", end: "\x1B[49m" };
65070
+ var bgMagentaBright4 = { start: "\x1B[105m", end: "\x1B[49m" };
65071
+ var bgCyanBright4 = { start: "\x1B[106m", end: "\x1B[49m" };
65072
+ var bgWhiteBright4 = { start: "\x1B[107m", end: "\x1B[49m" };
65073
+
65074
+ // ../../node_modules/.pnpm/@kitql+helpers@0.8.2/node_modules/@kitql/helpers/dist/colors/index.js
65075
+ var getStyleNode2 = (styleKey) => {
65076
+ return stylesNode_exports2[styleKey] ?? void 0;
65077
+ };
65078
+ var color2 = (style, str) => {
65079
+ return BROWSER ? colorBrowser2(style, str) : colorNode2(style, str);
65080
+ };
65081
+ var colorNode2 = (style, str) => {
65082
+ return `${getStyleNode2(style).start}${str}${getStyleNode2(style).end}`;
65083
+ };
65084
+ var START12 = `$$KitQL_`;
65085
+ var START22 = `_KitQL$$`;
65086
+ var END2 = `$$KitQLEND$$`;
65087
+ var colorBrowser2 = (style, str) => {
65088
+ return `${START12}${style}${START22}${str}${END2}`;
65089
+ };
65090
+ var green5 = (str) => {
65091
+ return color2("green", str);
65092
+ };
65093
+ var yellow5 = (str) => {
65094
+ return color2("yellow", str);
65095
+ };
65096
+ var cyan5 = (str) => {
65097
+ return color2("cyan", str);
65098
+ };
65099
+
64946
65100
  // src/lib/introspection.ts
64947
65101
  var graphql = __toESM(require("graphql"), 1);
64948
65102
 
@@ -66204,8 +66358,8 @@ async function pullSchema(url, fetchTimeout, schemaPath, headers, skipWriting) {
66204
66358
  if (content) {
66205
66359
  console.warn(
66206
66360
  `\u26A0\uFE0F Couldn't pull your schema.
66207
- ${cyan3(" Reponse:")} ${content}
66208
- ${cyan3(" Error :")} ${e2.message}`
66361
+ ${cyan5(" Reponse:")} ${content}
66362
+ ${cyan5(" Error :")} ${e2.message}`
66209
66363
  );
66210
66364
  } else {
66211
66365
  console.warn(`\u26A0\uFE0F Couldn't pull your schema: ${e2.message}`);
@@ -70554,7 +70708,7 @@ var graphql6 = __toESM(require("graphql"), 1);
70554
70708
  async function find_graphql(config2, parsedScript, walker) {
70555
70709
  await asyncWalk(parsedScript, {
70556
70710
  async enter(node, parent2) {
70557
- if (node.type !== "TaggedTemplateExpression" && node.type !== "CallExpression" && node.type !== "TSPropertySignature") {
70711
+ if (node.type !== "TaggedTemplateExpression" && node.type !== "CallExpression" && node.type !== "TSPropertySignature" && node.type !== "VariableDeclaration") {
70558
70712
  return;
70559
70713
  }
70560
70714
  let documentString = "";
@@ -72856,29 +73010,29 @@ function connectionSelection(config2, field, type, selection) {
72856
73010
  error: null
72857
73011
  };
72858
73012
  }
72859
- var missingPaginationArgMessage = (config2) => `Looks like you are trying to use the ${green3(
73013
+ var missingPaginationArgMessage = (config2) => `Looks like you are trying to use the ${green5(
72860
73014
  `@${config2.paginateDirective}`
72861
- )} directive on a field but have not provided a ${yellow3("first")}, ${yellow3("last")}, or ${yellow3(
73015
+ )} directive on a field but have not provided a ${yellow5("first")}, ${yellow5("last")}, or ${yellow5(
72862
73016
  "limit"
72863
73017
  )} argument. Please add one and try again.
72864
73018
  For more information, visit this link: ${siteURL}/guides/pagination`;
72865
- var missingEdgeSelectionMessage = (config2) => `Looks like you are trying to use the ${green3(
73019
+ var missingEdgeSelectionMessage = (config2) => `Looks like you are trying to use the ${green5(
72866
73020
  `@${config2.paginateDirective}`
72867
- )} directive on a field but your selection does not contain an ${yellow3(
73021
+ )} directive on a field but your selection does not contain an ${yellow5(
72868
73022
  "edges"
72869
73023
  )} field. Please add one and try again.
72870
73024
  For more information, visit this link: ${siteURL}/guides/pagination`;
72871
- var missingNodeSelectionMessage = (config2) => `Looks like you are trying to use the ${green3(
73025
+ var missingNodeSelectionMessage = (config2) => `Looks like you are trying to use the ${green5(
72872
73026
  `@${config2.paginateDirective}`
72873
- )} directive on a field but your selection does not contain a ${yellow3(
73027
+ )} directive on a field but your selection does not contain a ${yellow5(
72874
73028
  "node"
72875
73029
  )} field. Please add one and try again.
72876
73030
  For more information, visit this link: ${siteURL}/guides/pagination`;
72877
- var edgeInvalidTypeMessage = (config2) => `Looks like you are trying to use the ${green3(
73031
+ var edgeInvalidTypeMessage = (config2) => `Looks like you are trying to use the ${green5(
72878
73032
  `@${config2.paginateDirective}`
72879
73033
  )} directive on a field but your field does not conform to the connection spec: your edges field seems strange.
72880
73034
  For more information, visit this link: ${siteURL}/guides/pagination`;
72881
- var nodeNotDefinedMessage = (config2) => `Looks like you are trying to use the ${green3(
73035
+ var nodeNotDefinedMessage = (config2) => `Looks like you are trying to use the ${green5(
72882
73036
  `@${config2.paginateDirective}`
72883
73037
  )} directive on a field but your field does not conform to the connection spec: your edge type does not have node as a field.
72884
73038
  For more information, visit this link: ${siteURL}/guides/pagination`;
@@ -74618,10 +74772,10 @@ type in your config file:
74618
74772
 
74619
74773
  {
74620
74774
  scalars: {
74621
- ${cyan3(`/* in your case, something like */`)}
74775
+ ${cyan5(`/* in your case, something like */`)}
74622
74776
  ${[...missingScalarNames].map(
74623
- (c) => ` ${c}: { ${green3(`// <- The GraphQL Scalar`)}
74624
- type: "${cyan3(`YourType_${c}`)}" ${green3(`// <- The TypeScript type`)}
74777
+ (c) => ` ${c}: { ${green5(`// <- The GraphQL Scalar`)}
74778
+ type: "${cyan5(`YourType_${c}`)}" ${green5(`// <- The TypeScript type`)}
74625
74779
  }`
74626
74780
  ).join(
74627
74781
  `,
@@ -77653,7 +77807,7 @@ async function typeCheck(config2, docs) {
77653
77807
  errors.push(
77654
77808
  new HoudiniError({
77655
77809
  filepath: filename,
77656
- message: `@${config2.listDirective} on ${green3(
77810
+ message: `@${config2.listDirective} on ${green5(
77657
77811
  targetType.name
77658
77812
  )} has a configuration issue: ${targetType} dos not have a valid key. Please check this link for more information: https://houdinigraphql.com/guides/caching-data#custom-ids`
77659
77813
  })
@@ -79303,7 +79457,7 @@ function vite_default(opts) {
79303
79457
  watchAndRun([
79304
79458
  {
79305
79459
  name: "Houdini",
79306
- quiet: true,
79460
+ logs: [],
79307
79461
  async watchFile(filepath) {
79308
79462
  const config2 = await getConfig(opts);
79309
79463
  if (config2.localSchema) {