houdini 1.2.40 → 1.2.41

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.
@@ -78121,12 +78121,12 @@ async function packageJSON(targetPath, frameworkInfo) {
78121
78121
  }
78122
78122
  packageJSON2.devDependencies = {
78123
78123
  ...packageJSON2.devDependencies,
78124
- houdini: "^1.2.40"
78124
+ houdini: "^1.2.41"
78125
78125
  };
78126
78126
  if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
78127
78127
  packageJSON2.devDependencies = {
78128
78128
  ...packageJSON2.devDependencies,
78129
- "houdini-svelte": "^1.2.40"
78129
+ "houdini-svelte": "^1.2.41"
78130
78130
  };
78131
78131
  } else {
78132
78132
  throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
@@ -78126,12 +78126,12 @@ async function packageJSON(targetPath, frameworkInfo) {
78126
78126
  }
78127
78127
  packageJSON2.devDependencies = {
78128
78128
  ...packageJSON2.devDependencies,
78129
- houdini: "^1.2.40"
78129
+ houdini: "^1.2.41"
78130
78130
  };
78131
78131
  if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
78132
78132
  packageJSON2.devDependencies = {
78133
78133
  ...packageJSON2.devDependencies,
78134
- "houdini-svelte": "^1.2.40"
78134
+ "houdini-svelte": "^1.2.41"
78135
78135
  };
78136
78136
  } else {
78137
78137
  throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
@@ -68813,7 +68813,7 @@ function _decodePayload(raw) {
68813
68813
  raw += "=";
68814
68814
  break;
68815
68815
  default:
68816
- throw new Error("Illegal base64url string!");
68816
+ throw new Error("Illegal base64url string!" + raw);
68817
68817
  }
68818
68818
  try {
68819
68819
  return JSON.parse(decodeURIComponent(escape(atob(raw))));
@@ -68922,12 +68922,13 @@ function decode2(token) {
68922
68922
  // src/runtime/router/session.ts
68923
68923
  async function handle_request(args) {
68924
68924
  const plugin_config = args.config.router ?? {};
68925
- if (plugin_config.auth && "redirect" in plugin_config.auth && args.url.startsWith(plugin_config.auth.redirect)) {
68925
+ const { pathname } = new URL(args.url);
68926
+ if (plugin_config.auth && "redirect" in plugin_config.auth && pathname.startsWith(plugin_config.auth.redirect)) {
68926
68927
  return await redirect_auth(args);
68927
68928
  }
68928
68929
  }
68929
68930
  async function redirect_auth(args) {
68930
- const { searchParams, host } = new URL(args.url, `http://${args.headers.get("host")}`);
68931
+ const { searchParams } = new URL(args.url, `http://${args.headers.get("host")}`);
68931
68932
  const { redirectTo, ...session } = Object.fromEntries(searchParams.entries());
68932
68933
  const response = new Response("ok", {
68933
68934
  status: 302,
@@ -68734,7 +68734,7 @@ function _decodePayload(raw) {
68734
68734
  raw += "=";
68735
68735
  break;
68736
68736
  default:
68737
- throw new Error("Illegal base64url string!");
68737
+ throw new Error("Illegal base64url string!" + raw);
68738
68738
  }
68739
68739
  try {
68740
68740
  return JSON.parse(decodeURIComponent(escape(atob(raw))));
@@ -68843,12 +68843,13 @@ function decode2(token) {
68843
68843
  // src/runtime/router/session.ts
68844
68844
  async function handle_request(args) {
68845
68845
  const plugin_config = args.config.router ?? {};
68846
- if (plugin_config.auth && "redirect" in plugin_config.auth && args.url.startsWith(plugin_config.auth.redirect)) {
68846
+ const { pathname } = new URL(args.url);
68847
+ if (plugin_config.auth && "redirect" in plugin_config.auth && pathname.startsWith(plugin_config.auth.redirect)) {
68847
68848
  return await redirect_auth(args);
68848
68849
  }
68849
68850
  }
68850
68851
  async function redirect_auth(args) {
68851
- const { searchParams, host } = new URL(args.url, `http://${args.headers.get("host")}`);
68852
+ const { searchParams } = new URL(args.url, `http://${args.headers.get("host")}`);
68852
68853
  const { redirectTo, ...session } = Object.fromEntries(searchParams.entries());
68853
68854
  const response = new Response("ok", {
68854
68855
  status: 302,
@@ -68,7 +68,7 @@ function _decodePayload(raw) {
68
68
  raw += "=";
69
69
  break;
70
70
  default:
71
- throw new Error("Illegal base64url string!");
71
+ throw new Error("Illegal base64url string!" + raw);
72
72
  }
73
73
  try {
74
74
  return JSON.parse(decodeURIComponent(escape(atob(raw))));
@@ -66,7 +66,7 @@ function _serverHandler({
66
66
  return yoga(request);
67
67
  }
68
68
  const authResponse = await (0, import_session.handle_request)({
69
- url,
69
+ url: request.url,
70
70
  config: config_file,
71
71
  session_keys,
72
72
  headers: request.headers
@@ -26,12 +26,13 @@ var import_cookies = require("./cookies");
26
26
  var import_jwt = require("./jwt");
27
27
  async function handle_request(args) {
28
28
  const plugin_config = args.config.router ?? {};
29
- if (plugin_config.auth && "redirect" in plugin_config.auth && args.url.startsWith(plugin_config.auth.redirect)) {
29
+ const { pathname } = new URL(args.url);
30
+ if (plugin_config.auth && "redirect" in plugin_config.auth && pathname.startsWith(plugin_config.auth.redirect)) {
30
31
  return await redirect_auth(args);
31
32
  }
32
33
  }
33
34
  async function redirect_auth(args) {
34
- const { searchParams, host } = new URL(args.url, `http://${args.headers.get("host")}`);
35
+ const { searchParams } = new URL(args.url, `http://${args.headers.get("host")}`);
35
36
  const { redirectTo, ...session } = Object.fromEntries(searchParams.entries());
36
37
  const response = new Response("ok", {
37
38
  status: 302,
@@ -43,7 +43,7 @@ function _decodePayload(raw) {
43
43
  raw += "=";
44
44
  break;
45
45
  default:
46
- throw new Error("Illegal base64url string!");
46
+ throw new Error("Illegal base64url string!" + raw);
47
47
  }
48
48
  try {
49
49
  return JSON.parse(decodeURIComponent(escape(atob(raw))));
@@ -42,7 +42,7 @@ function _serverHandler({
42
42
  return yoga(request);
43
43
  }
44
44
  const authResponse = await handle_request({
45
- url,
45
+ url: request.url,
46
46
  config: config_file,
47
47
  session_keys,
48
48
  headers: request.headers
@@ -2,12 +2,13 @@ import { parse } from "./cookies";
2
2
  import { decode, encode, verify } from "./jwt";
3
3
  async function handle_request(args) {
4
4
  const plugin_config = args.config.router ?? {};
5
- if (plugin_config.auth && "redirect" in plugin_config.auth && args.url.startsWith(plugin_config.auth.redirect)) {
5
+ const { pathname } = new URL(args.url);
6
+ if (plugin_config.auth && "redirect" in plugin_config.auth && pathname.startsWith(plugin_config.auth.redirect)) {
6
7
  return await redirect_auth(args);
7
8
  }
8
9
  }
9
10
  async function redirect_auth(args) {
10
- const { searchParams, host } = new URL(args.url, `http://${args.headers.get("host")}`);
11
+ const { searchParams } = new URL(args.url, `http://${args.headers.get("host")}`);
11
12
  const { redirectTo, ...session } = Object.fromEntries(searchParams.entries());
12
13
  const response = new Response("ok", {
13
14
  status: 302,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "houdini",
3
- "version": "1.2.40",
3
+ "version": "1.2.41",
4
4
  "description": "The disappearing GraphQL clients",
5
5
  "keywords": [
6
6
  "typescript",