houdini-react 1.2.41 → 1.2.42

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.
@@ -74770,13 +74770,13 @@ async function copyFile(src, dest) {
74770
74770
  }
74771
74771
  return null;
74772
74772
  }
74773
- async function readFile(filepath) {
74773
+ async function readFile(filepath, encoding) {
74774
74774
  if (houdini_mode.is_testing) {
74775
74775
  try {
74776
74776
  if (filepath.includes("build/runtime")) {
74777
- return await import_promises.default.readFile(filepath, "utf-8");
74777
+ return await import_promises.default.readFile(filepath, encoding ?? "utf-8");
74778
74778
  }
74779
- return import_memfs.fs.readFileSync(filepath, "utf-8").toString();
74779
+ return import_memfs.fs.readFileSync(filepath, encoding ?? "utf-8").toString();
74780
74780
  } catch (e2) {
74781
74781
  return null;
74782
74782
  }
@@ -74916,11 +74916,15 @@ async function recursiveCopy(source, target, transforms, notRoot) {
74916
74916
  await recursiveCopy(childPath, parentDir, transforms, true);
74917
74917
  } else {
74918
74918
  const targetPath = join2(parentDir, child);
74919
- let original = await readFile(childPath) || "";
74920
74919
  if (transforms?.[childPath]) {
74921
- original = await transforms[childPath](original, childPath);
74920
+ let original = await readFile(childPath) || "";
74921
+ await writeFile(
74922
+ targetPath,
74923
+ await transforms[childPath](original, childPath)
74924
+ );
74925
+ } else {
74926
+ await copyFile(childPath, targetPath);
74922
74927
  }
74923
- await writeFile(targetPath, original);
74924
74928
  }
74925
74929
  })
74926
74930
  );
@@ -79401,19 +79405,19 @@ ${all_queries.map(
79401
79405
  `)
79402
79406
  ).join("\n")}
79403
79407
 
79404
- ${!page ? "" : `
79408
+ ${`
79405
79409
  export type PageProps = {
79406
- ${page.query_options.map(
79410
+ ${!page ? "" : page.query_options.map(
79407
79411
  (query2) => ` ${query2}: ${query2}$result,
79408
79412
  ${query2}$handle: DocumentHandle<${query2}$artifact, ${query2}$result, ${query2}$input>,`
79409
79413
  ).join("\n")}
79410
79414
  }
79411
79415
  `}
79412
79416
 
79413
- ${!layout ? "" : `
79417
+ ${`
79414
79418
  export type LayoutProps = {
79415
79419
  children: React.ReactNode,
79416
- ${layout.query_options.map(
79420
+ ${!layout ? "" : layout.query_options.map(
79417
79421
  (query2) => ` ${query2}: ${query2}$result,
79418
79422
  ${query2}$handle: DocumentHandle<${query2}$artifact, ${query2}$result, ${query2}$input>,`
79419
79423
  ).join("\n")}
@@ -74760,13 +74760,13 @@ async function copyFile(src, dest) {
74760
74760
  }
74761
74761
  return null;
74762
74762
  }
74763
- async function readFile(filepath) {
74763
+ async function readFile(filepath, encoding) {
74764
74764
  if (houdini_mode.is_testing) {
74765
74765
  try {
74766
74766
  if (filepath.includes("build/runtime")) {
74767
- return await fs.readFile(filepath, "utf-8");
74767
+ return await fs.readFile(filepath, encoding ?? "utf-8");
74768
74768
  }
74769
- return import_memfs.fs.readFileSync(filepath, "utf-8").toString();
74769
+ return import_memfs.fs.readFileSync(filepath, encoding ?? "utf-8").toString();
74770
74770
  } catch (e2) {
74771
74771
  return null;
74772
74772
  }
@@ -74906,11 +74906,15 @@ async function recursiveCopy(source, target, transforms, notRoot) {
74906
74906
  await recursiveCopy(childPath, parentDir, transforms, true);
74907
74907
  } else {
74908
74908
  const targetPath = join2(parentDir, child);
74909
- let original = await readFile(childPath) || "";
74910
74909
  if (transforms?.[childPath]) {
74911
- original = await transforms[childPath](original, childPath);
74910
+ let original = await readFile(childPath) || "";
74911
+ await writeFile(
74912
+ targetPath,
74913
+ await transforms[childPath](original, childPath)
74914
+ );
74915
+ } else {
74916
+ await copyFile(childPath, targetPath);
74912
74917
  }
74913
- await writeFile(targetPath, original);
74914
74918
  }
74915
74919
  })
74916
74920
  );
@@ -79391,19 +79395,19 @@ ${all_queries.map(
79391
79395
  `)
79392
79396
  ).join("\n")}
79393
79397
 
79394
- ${!page ? "" : `
79398
+ ${`
79395
79399
  export type PageProps = {
79396
- ${page.query_options.map(
79400
+ ${!page ? "" : page.query_options.map(
79397
79401
  (query2) => ` ${query2}: ${query2}$result,
79398
79402
  ${query2}$handle: DocumentHandle<${query2}$artifact, ${query2}$result, ${query2}$input>,`
79399
79403
  ).join("\n")}
79400
79404
  }
79401
79405
  `}
79402
79406
 
79403
- ${!layout ? "" : `
79407
+ ${`
79404
79408
  export type LayoutProps = {
79405
79409
  children: React.ReactNode,
79406
- ${layout.query_options.map(
79410
+ ${!layout ? "" : layout.query_options.map(
79407
79411
  (query2) => ` ${query2}: ${query2}$result,
79408
79412
  ${query2}$handle: DocumentHandle<${query2}$artifact, ${query2}$result, ${query2}$input>,`
79409
79413
  ).join("\n")}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "houdini-react",
3
- "version": "1.2.41",
3
+ "version": "1.2.42",
4
4
  "description": "The React plugin for houdini",
5
5
  "keywords": [
6
6
  "typescript",
@@ -43,7 +43,7 @@
43
43
  "recast": "^0.23.1",
44
44
  "rollup": "^3.7.4",
45
45
  "use-deep-compare-effect": "^1.8.1",
46
- "houdini": "^1.2.41"
46
+ "houdini": "^1.2.42"
47
47
  },
48
48
  "files": [
49
49
  "build"