houdini 1.2.39 → 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.
- package/build/cmd-cjs/index.js +2 -2
- package/build/cmd-esm/index.js +2 -2
- package/build/lib-cjs/index.js +4 -3
- package/build/lib-esm/index.js +4 -3
- package/build/runtime-cjs/router/jwt.js +1 -1
- package/build/runtime-cjs/router/server.js +1 -1
- package/build/runtime-cjs/router/session.js +3 -2
- package/build/runtime-esm/router/jwt.js +1 -1
- package/build/runtime-esm/router/server.js +1 -1
- package/build/runtime-esm/router/session.js +3 -2
- package/package.json +1 -1
package/build/cmd-cjs/index.js
CHANGED
|
@@ -78121,12 +78121,12 @@ async function packageJSON(targetPath, frameworkInfo) {
|
|
|
78121
78121
|
}
|
|
78122
78122
|
packageJSON2.devDependencies = {
|
|
78123
78123
|
...packageJSON2.devDependencies,
|
|
78124
|
-
houdini: "^1.2.
|
|
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.
|
|
78129
|
+
"houdini-svelte": "^1.2.41"
|
|
78130
78130
|
};
|
|
78131
78131
|
} else {
|
|
78132
78132
|
throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
|
package/build/cmd-esm/index.js
CHANGED
|
@@ -78126,12 +78126,12 @@ async function packageJSON(targetPath, frameworkInfo) {
|
|
|
78126
78126
|
}
|
|
78127
78127
|
packageJSON2.devDependencies = {
|
|
78128
78128
|
...packageJSON2.devDependencies,
|
|
78129
|
-
houdini: "^1.2.
|
|
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.
|
|
78134
|
+
"houdini-svelte": "^1.2.41"
|
|
78135
78135
|
};
|
|
78136
78136
|
} else {
|
|
78137
78137
|
throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
|
package/build/lib-cjs/index.js
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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,
|
package/build/lib-esm/index.js
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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,
|
|
@@ -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
|
-
|
|
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
|
|
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,
|
|
@@ -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
|
-
|
|
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
|
|
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,
|