houdini 1.2.41 → 1.2.43

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.
@@ -63542,13 +63542,13 @@ async function copyFile(src, dest) {
63542
63542
  }
63543
63543
  return null;
63544
63544
  }
63545
- async function readFile(filepath) {
63545
+ async function readFile(filepath, encoding) {
63546
63546
  if (houdini_mode.is_testing) {
63547
63547
  try {
63548
63548
  if (filepath.includes("build/runtime")) {
63549
- return await import_promises.default.readFile(filepath, "utf-8");
63549
+ return await import_promises.default.readFile(filepath, encoding ?? "utf-8");
63550
63550
  }
63551
- return import_memfs.fs.readFileSync(filepath, "utf-8").toString();
63551
+ return import_memfs.fs.readFileSync(filepath, encoding ?? "utf-8").toString();
63552
63552
  } catch (e3) {
63553
63553
  return null;
63554
63554
  }
@@ -63688,11 +63688,15 @@ async function recursiveCopy(source, target, transforms, notRoot) {
63688
63688
  await recursiveCopy(childPath, parentDir, transforms, true);
63689
63689
  } else {
63690
63690
  const targetPath = join2(parentDir, child);
63691
- let original = await readFile(childPath) || "";
63692
63691
  if (transforms?.[childPath]) {
63693
- original = await transforms[childPath](original, childPath);
63692
+ let original = await readFile(childPath) || "";
63693
+ await writeFile(
63694
+ targetPath,
63695
+ await transforms[childPath](original, childPath)
63696
+ );
63697
+ } else {
63698
+ await copyFile(childPath, targetPath);
63694
63699
  }
63695
- await writeFile(targetPath, original);
63696
63700
  }
63697
63701
  })
63698
63702
  );
@@ -78121,12 +78125,12 @@ async function packageJSON(targetPath, frameworkInfo) {
78121
78125
  }
78122
78126
  packageJSON2.devDependencies = {
78123
78127
  ...packageJSON2.devDependencies,
78124
- houdini: "^1.2.41"
78128
+ houdini: "^1.2.43"
78125
78129
  };
78126
78130
  if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
78127
78131
  packageJSON2.devDependencies = {
78128
78132
  ...packageJSON2.devDependencies,
78129
- "houdini-svelte": "^1.2.41"
78133
+ "houdini-svelte": "^1.2.43"
78130
78134
  };
78131
78135
  } else {
78132
78136
  throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
@@ -63548,13 +63548,13 @@ async function copyFile(src, dest) {
63548
63548
  }
63549
63549
  return null;
63550
63550
  }
63551
- async function readFile(filepath) {
63551
+ async function readFile(filepath, encoding) {
63552
63552
  if (houdini_mode.is_testing) {
63553
63553
  try {
63554
63554
  if (filepath.includes("build/runtime")) {
63555
- return await fs.readFile(filepath, "utf-8");
63555
+ return await fs.readFile(filepath, encoding ?? "utf-8");
63556
63556
  }
63557
- return import_memfs.fs.readFileSync(filepath, "utf-8").toString();
63557
+ return import_memfs.fs.readFileSync(filepath, encoding ?? "utf-8").toString();
63558
63558
  } catch (e3) {
63559
63559
  return null;
63560
63560
  }
@@ -63694,11 +63694,15 @@ async function recursiveCopy(source, target, transforms, notRoot) {
63694
63694
  await recursiveCopy(childPath, parentDir, transforms, true);
63695
63695
  } else {
63696
63696
  const targetPath = join2(parentDir, child);
63697
- let original = await readFile(childPath) || "";
63698
63697
  if (transforms?.[childPath]) {
63699
- original = await transforms[childPath](original, childPath);
63698
+ let original = await readFile(childPath) || "";
63699
+ await writeFile(
63700
+ targetPath,
63701
+ await transforms[childPath](original, childPath)
63702
+ );
63703
+ } else {
63704
+ await copyFile(childPath, targetPath);
63700
63705
  }
63701
- await writeFile(targetPath, original);
63702
63706
  }
63703
63707
  })
63704
63708
  );
@@ -78126,12 +78130,12 @@ async function packageJSON(targetPath, frameworkInfo) {
78126
78130
  }
78127
78131
  packageJSON2.devDependencies = {
78128
78132
  ...packageJSON2.devDependencies,
78129
- houdini: "^1.2.41"
78133
+ houdini: "^1.2.43"
78130
78134
  };
78131
78135
  if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
78132
78136
  packageJSON2.devDependencies = {
78133
78137
  ...packageJSON2.devDependencies,
78134
- "houdini-svelte": "^1.2.41"
78138
+ "houdini-svelte": "^1.2.43"
78135
78139
  };
78136
78140
  } else {
78137
78141
  throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
@@ -54202,13 +54202,13 @@ async function copyFile(src, dest) {
54202
54202
  }
54203
54203
  return null;
54204
54204
  }
54205
- async function readFile(filepath) {
54205
+ async function readFile(filepath, encoding) {
54206
54206
  if (houdini_mode.is_testing) {
54207
54207
  try {
54208
54208
  if (filepath.includes("build/runtime")) {
54209
- return await import_promises.default.readFile(filepath, "utf-8");
54209
+ return await import_promises.default.readFile(filepath, encoding ?? "utf-8");
54210
54210
  }
54211
- return import_memfs.fs.readFileSync(filepath, "utf-8").toString();
54211
+ return import_memfs.fs.readFileSync(filepath, encoding ?? "utf-8").toString();
54212
54212
  } catch (e) {
54213
54213
  return null;
54214
54214
  }
@@ -54348,11 +54348,15 @@ async function recursiveCopy(source, target, transforms, notRoot) {
54348
54348
  await recursiveCopy(childPath, parentDir, transforms, true);
54349
54349
  } else {
54350
54350
  const targetPath = join(parentDir, child);
54351
- let original = await readFile(childPath) || "";
54352
54351
  if (transforms?.[childPath]) {
54353
- original = await transforms[childPath](original, childPath);
54352
+ let original = await readFile(childPath) || "";
54353
+ await writeFile(
54354
+ targetPath,
54355
+ await transforms[childPath](original, childPath)
54356
+ );
54357
+ } else {
54358
+ await copyFile(childPath, targetPath);
54354
54359
  }
54355
- await writeFile(targetPath, original);
54356
54360
  }
54357
54361
  })
54358
54362
  );
@@ -54202,13 +54202,13 @@ async function copyFile(src, dest) {
54202
54202
  }
54203
54203
  return null;
54204
54204
  }
54205
- async function readFile(filepath) {
54205
+ async function readFile(filepath, encoding) {
54206
54206
  if (houdini_mode.is_testing) {
54207
54207
  try {
54208
54208
  if (filepath.includes("build/runtime")) {
54209
- return await fs.readFile(filepath, "utf-8");
54209
+ return await fs.readFile(filepath, encoding ?? "utf-8");
54210
54210
  }
54211
- return import_memfs.fs.readFileSync(filepath, "utf-8").toString();
54211
+ return import_memfs.fs.readFileSync(filepath, encoding ?? "utf-8").toString();
54212
54212
  } catch (e) {
54213
54213
  return null;
54214
54214
  }
@@ -54348,11 +54348,15 @@ async function recursiveCopy(source, target, transforms, notRoot) {
54348
54348
  await recursiveCopy(childPath, parentDir, transforms, true);
54349
54349
  } else {
54350
54350
  const targetPath = join(parentDir, child);
54351
- let original = await readFile(childPath) || "";
54352
54351
  if (transforms?.[childPath]) {
54353
- original = await transforms[childPath](original, childPath);
54352
+ let original = await readFile(childPath) || "";
54353
+ await writeFile(
54354
+ targetPath,
54355
+ await transforms[childPath](original, childPath)
54356
+ );
54357
+ } else {
54358
+ await copyFile(childPath, targetPath);
54354
54359
  }
54355
- await writeFile(targetPath, original);
54356
54360
  }
54357
54361
  })
54358
54362
  );
package/build/lib/fs.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  /// <reference types="glob" />
3
4
  import fsExtra from 'fs-extra';
4
5
  import type { Dirent } from 'node:fs';
5
6
  export declare function copyFileSync(src: string, dest: string): void | null;
6
7
  export declare function copyFile(src: string, dest: string): Promise<void | null>;
7
- export declare function readFile(filepath: string): Promise<string | null>;
8
+ export declare function readFile(filepath: string, encoding?: BufferEncoding): Promise<string | null>;
8
9
  export declare function readFileSync(filepath: string): string | null;
9
10
  export declare function writeFile(filepath: string, data: string): Promise<void>;
10
11
  export declare function access(filepath: string): Promise<void | import("memfs/lib/Stats").Stats<number>>;
@@ -61853,13 +61853,13 @@ async function copyFile(src, dest) {
61853
61853
  }
61854
61854
  return null;
61855
61855
  }
61856
- async function readFile(filepath) {
61856
+ async function readFile(filepath, encoding) {
61857
61857
  if (houdini_mode.is_testing) {
61858
61858
  try {
61859
61859
  if (filepath.includes("build/runtime")) {
61860
- return await import_promises.default.readFile(filepath, "utf-8");
61860
+ return await import_promises.default.readFile(filepath, encoding ?? "utf-8");
61861
61861
  }
61862
- return import_memfs.fs.readFileSync(filepath, "utf-8").toString();
61862
+ return import_memfs.fs.readFileSync(filepath, encoding ?? "utf-8").toString();
61863
61863
  } catch (e2) {
61864
61864
  return null;
61865
61865
  }
@@ -61999,11 +61999,15 @@ async function recursiveCopy(source, target, transforms, notRoot) {
61999
61999
  await recursiveCopy(childPath, parentDir, transforms, true);
62000
62000
  } else {
62001
62001
  const targetPath = join2(parentDir, child);
62002
- let original = await readFile(childPath) || "";
62003
62002
  if (transforms?.[childPath]) {
62004
- original = await transforms[childPath](original, childPath);
62003
+ let original = await readFile(childPath) || "";
62004
+ await writeFile(
62005
+ targetPath,
62006
+ await transforms[childPath](original, childPath)
62007
+ );
62008
+ } else {
62009
+ await copyFile(childPath, targetPath);
62005
62010
  }
62006
- await writeFile(targetPath, original);
62007
62011
  }
62008
62012
  })
62009
62013
  );
@@ -61775,13 +61775,13 @@ async function copyFile(src, dest) {
61775
61775
  }
61776
61776
  return null;
61777
61777
  }
61778
- async function readFile(filepath) {
61778
+ async function readFile(filepath, encoding) {
61779
61779
  if (houdini_mode.is_testing) {
61780
61780
  try {
61781
61781
  if (filepath.includes("build/runtime")) {
61782
- return await fs.readFile(filepath, "utf-8");
61782
+ return await fs.readFile(filepath, encoding ?? "utf-8");
61783
61783
  }
61784
- return import_memfs.fs.readFileSync(filepath, "utf-8").toString();
61784
+ return import_memfs.fs.readFileSync(filepath, encoding ?? "utf-8").toString();
61785
61785
  } catch (e2) {
61786
61786
  return null;
61787
61787
  }
@@ -61921,11 +61921,15 @@ async function recursiveCopy(source, target, transforms, notRoot) {
61921
61921
  await recursiveCopy(childPath, parentDir, transforms, true);
61922
61922
  } else {
61923
61923
  const targetPath = join2(parentDir, child);
61924
- let original = await readFile(childPath) || "";
61925
61924
  if (transforms?.[childPath]) {
61926
- original = await transforms[childPath](original, childPath);
61925
+ let original = await readFile(childPath) || "";
61926
+ await writeFile(
61927
+ targetPath,
61928
+ await transforms[childPath](original, childPath)
61929
+ );
61930
+ } else {
61931
+ await copyFile(childPath, targetPath);
61927
61932
  }
61928
- await writeFile(targetPath, original);
61929
61933
  }
61930
61934
  })
61931
61935
  );
@@ -54212,13 +54212,13 @@ async function copyFile(src, dest) {
54212
54212
  }
54213
54213
  return null;
54214
54214
  }
54215
- async function readFile(filepath) {
54215
+ async function readFile(filepath, encoding) {
54216
54216
  if (houdini_mode.is_testing) {
54217
54217
  try {
54218
54218
  if (filepath.includes("build/runtime")) {
54219
- return await import_promises.default.readFile(filepath, "utf-8");
54219
+ return await import_promises.default.readFile(filepath, encoding ?? "utf-8");
54220
54220
  }
54221
- return import_memfs.fs.readFileSync(filepath, "utf-8").toString();
54221
+ return import_memfs.fs.readFileSync(filepath, encoding ?? "utf-8").toString();
54222
54222
  } catch (e) {
54223
54223
  return null;
54224
54224
  }
@@ -54358,11 +54358,15 @@ async function recursiveCopy(source, target, transforms, notRoot) {
54358
54358
  await recursiveCopy(childPath, parentDir, transforms, true);
54359
54359
  } else {
54360
54360
  const targetPath = join(parentDir, child);
54361
- let original = await readFile(childPath) || "";
54362
54361
  if (transforms?.[childPath]) {
54363
- original = await transforms[childPath](original, childPath);
54362
+ let original = await readFile(childPath) || "";
54363
+ await writeFile(
54364
+ targetPath,
54365
+ await transforms[childPath](original, childPath)
54366
+ );
54367
+ } else {
54368
+ await copyFile(childPath, targetPath);
54364
54369
  }
54365
- await writeFile(targetPath, original);
54366
54370
  }
54367
54371
  })
54368
54372
  );
@@ -54209,13 +54209,13 @@ async function copyFile(src, dest) {
54209
54209
  }
54210
54210
  return null;
54211
54211
  }
54212
- async function readFile(filepath) {
54212
+ async function readFile(filepath, encoding) {
54213
54213
  if (houdini_mode.is_testing) {
54214
54214
  try {
54215
54215
  if (filepath.includes("build/runtime")) {
54216
- return await fs.readFile(filepath, "utf-8");
54216
+ return await fs.readFile(filepath, encoding ?? "utf-8");
54217
54217
  }
54218
- return import_memfs.fs.readFileSync(filepath, "utf-8").toString();
54218
+ return import_memfs.fs.readFileSync(filepath, encoding ?? "utf-8").toString();
54219
54219
  } catch (e) {
54220
54220
  return null;
54221
54221
  }
@@ -54355,11 +54355,15 @@ async function recursiveCopy(source, target, transforms, notRoot) {
54355
54355
  await recursiveCopy(childPath, parentDir, transforms, true);
54356
54356
  } else {
54357
54357
  const targetPath = join(parentDir, child);
54358
- let original = await readFile(childPath) || "";
54359
54358
  if (transforms?.[childPath]) {
54360
- original = await transforms[childPath](original, childPath);
54359
+ let original = await readFile(childPath) || "";
54360
+ await writeFile(
54361
+ targetPath,
54362
+ await transforms[childPath](original, childPath)
54363
+ );
54364
+ } else {
54365
+ await copyFile(childPath, targetPath);
54361
54366
  }
54362
- await writeFile(targetPath, original);
54363
54367
  }
54364
54368
  })
54365
54369
  );
@@ -64819,13 +64819,13 @@ async function copyFile(src, dest) {
64819
64819
  }
64820
64820
  return null;
64821
64821
  }
64822
- async function readFile(filepath) {
64822
+ async function readFile(filepath, encoding) {
64823
64823
  if (houdini_mode.is_testing) {
64824
64824
  try {
64825
64825
  if (filepath.includes("build/runtime")) {
64826
- return await import_promises.default.readFile(filepath, "utf-8");
64826
+ return await import_promises.default.readFile(filepath, encoding ?? "utf-8");
64827
64827
  }
64828
- return import_memfs.fs.readFileSync(filepath, "utf-8").toString();
64828
+ return import_memfs.fs.readFileSync(filepath, encoding ?? "utf-8").toString();
64829
64829
  } catch (e2) {
64830
64830
  return null;
64831
64831
  }
@@ -64965,11 +64965,15 @@ async function recursiveCopy(source, target, transforms, notRoot) {
64965
64965
  await recursiveCopy(childPath, parentDir, transforms, true);
64966
64966
  } else {
64967
64967
  const targetPath = join2(parentDir, child);
64968
- let original = await readFile(childPath) || "";
64969
64968
  if (transforms?.[childPath]) {
64970
- original = await transforms[childPath](original, childPath);
64969
+ let original = await readFile(childPath) || "";
64970
+ await writeFile(
64971
+ targetPath,
64972
+ await transforms[childPath](original, childPath)
64973
+ );
64974
+ } else {
64975
+ await copyFile(childPath, targetPath);
64971
64976
  }
64972
- await writeFile(targetPath, original);
64973
64977
  }
64974
64978
  })
64975
64979
  );
@@ -64813,13 +64813,13 @@ async function copyFile(src, dest) {
64813
64813
  }
64814
64814
  return null;
64815
64815
  }
64816
- async function readFile(filepath) {
64816
+ async function readFile(filepath, encoding) {
64817
64817
  if (houdini_mode.is_testing) {
64818
64818
  try {
64819
64819
  if (filepath.includes("build/runtime")) {
64820
- return await fs.readFile(filepath, "utf-8");
64820
+ return await fs.readFile(filepath, encoding ?? "utf-8");
64821
64821
  }
64822
- return import_memfs.fs.readFileSync(filepath, "utf-8").toString();
64822
+ return import_memfs.fs.readFileSync(filepath, encoding ?? "utf-8").toString();
64823
64823
  } catch (e2) {
64824
64824
  return null;
64825
64825
  }
@@ -64959,11 +64959,15 @@ async function recursiveCopy(source, target, transforms, notRoot) {
64959
64959
  await recursiveCopy(childPath, parentDir, transforms, true);
64960
64960
  } else {
64961
64961
  const targetPath = join2(parentDir, child);
64962
- let original = await readFile(childPath) || "";
64963
64962
  if (transforms?.[childPath]) {
64964
- original = await transforms[childPath](original, childPath);
64963
+ let original = await readFile(childPath) || "";
64964
+ await writeFile(
64965
+ targetPath,
64966
+ await transforms[childPath](original, childPath)
64967
+ );
64968
+ } else {
64969
+ await copyFile(childPath, targetPath);
64965
64970
  }
64966
- await writeFile(targetPath, original);
64967
64971
  }
64968
64972
  })
64969
64973
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "houdini",
3
- "version": "1.2.41",
3
+ "version": "1.2.43",
4
4
  "description": "The disappearing GraphQL clients",
5
5
  "keywords": [
6
6
  "typescript",