camox 0.31.2 → 0.31.4
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.
|
@@ -9,7 +9,6 @@ import { queryKeys } from "@camox/api-contract/query-keys";
|
|
|
9
9
|
import { createORPCClient } from "@orpc/client";
|
|
10
10
|
import { RPCLink } from "@orpc/client/fetch";
|
|
11
11
|
import { createMiddleware, createServerFn } from "@tanstack/react-start";
|
|
12
|
-
import { getRequest, setResponseHeader } from "@tanstack/react-start/server";
|
|
13
12
|
|
|
14
13
|
//#region src/features/routes/pageRoute.tsx
|
|
15
14
|
function parseQuality(part) {
|
|
@@ -58,8 +57,9 @@ function isNotFoundError(error) {
|
|
|
58
57
|
const { code, status } = getErrorDetails(error);
|
|
59
58
|
return code === "NOT_FOUND" || status === 404;
|
|
60
59
|
}
|
|
61
|
-
function clearServerAuthCookie() {
|
|
60
|
+
async function clearServerAuthCookie() {
|
|
62
61
|
if (typeof window !== "undefined") return;
|
|
62
|
+
const { setResponseHeader } = await import("@tanstack/react-start/server");
|
|
63
63
|
setResponseHeader("Set-Cookie", buildClearServerAuthCookieHeader());
|
|
64
64
|
}
|
|
65
65
|
async function loadPage({ apiUrl, authCookieHeader, context, environmentName, pathname, projectSlug, source }) {
|
|
@@ -121,10 +121,12 @@ async function buildLoaderData(apiUrl, page) {
|
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
123
|
const getOrigin = createServerFn({ method: "GET" }).handler(async () => {
|
|
124
|
+
const { getRequest } = await import("@tanstack/react-start/server");
|
|
124
125
|
const request = getRequest();
|
|
125
126
|
return new URL(request.url).origin;
|
|
126
127
|
});
|
|
127
128
|
const getServerLoaderAuthCookieHeader = createServerFn({ method: "GET" }).handler(async () => {
|
|
129
|
+
const { getRequest } = await import("@tanstack/react-start/server");
|
|
128
130
|
return getServerAuthCookieHeader(getRequest().headers);
|
|
129
131
|
});
|
|
130
132
|
function createMarkdownMiddleware(apiUrl, projectSlug, environmentName) {
|
|
@@ -173,7 +175,7 @@ function createPageLoader(apiUrl, projectSlug, environmentName) {
|
|
|
173
175
|
}));
|
|
174
176
|
} catch (error) {
|
|
175
177
|
if (!isAuthSessionError(error)) throwNotFoundOrRethrow(error);
|
|
176
|
-
clearServerAuthCookie();
|
|
178
|
+
await clearServerAuthCookie();
|
|
177
179
|
console.warn("[camox] Ignoring stale camox_auth_cookie and retrying published page load.");
|
|
178
180
|
return buildLoaderData(apiUrl, await loadLivePage(loadOptions));
|
|
179
181
|
}
|
|
@@ -236,9 +238,9 @@ function createPageHead(camoxApp) {
|
|
|
236
238
|
}
|
|
237
239
|
const PageRouteComponent = () => {
|
|
238
240
|
const $ = c(2);
|
|
239
|
-
if ($[0] !== "
|
|
241
|
+
if ($[0] !== "ce30c88896781a325be8bc6e48526eba781913727a9615f979bc6c2948f7a533") {
|
|
240
242
|
for (let $i = 0; $i < 2; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
241
|
-
$[0] = "
|
|
243
|
+
$[0] = "ce30c88896781a325be8bc6e48526eba781913727a9615f979bc6c2948f7a533";
|
|
242
244
|
}
|
|
243
245
|
let t0;
|
|
244
246
|
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -172,10 +172,6 @@ function camox(options) {
|
|
|
172
172
|
"camox > streamdown > hast-util-to-jsx-runtime",
|
|
173
173
|
"camox > streamdown > hast-util-to-jsx-runtime > style-to-js",
|
|
174
174
|
"camox > @tanstack/react-query-devtools/production",
|
|
175
|
-
"camox > @tanstack/react-router > @tanstack/router-core",
|
|
176
|
-
"camox > @tanstack/react-router > @tanstack/router-core/isServer",
|
|
177
|
-
"camox > @tanstack/react-router > @tanstack/router-core/ssr/client",
|
|
178
|
-
"camox > @tanstack/react-router > @tanstack/router-core > seroval",
|
|
179
175
|
"camox > partysocket/react"
|
|
180
176
|
] }
|
|
181
177
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "camox",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.4",
|
|
4
4
|
"bin": {
|
|
5
5
|
"camox": "./bin/camox.mjs"
|
|
6
6
|
},
|
|
@@ -128,9 +128,9 @@
|
|
|
128
128
|
"shiki": "^4.1.0",
|
|
129
129
|
"streamdown": "^2.5.0",
|
|
130
130
|
"zod": "^4.4.3",
|
|
131
|
-
"@camox/api-contract": "0.31.
|
|
132
|
-
"@camox/ui": "0.31.
|
|
133
|
-
"@camox/cli": "0.31.
|
|
131
|
+
"@camox/api-contract": "0.31.4",
|
|
132
|
+
"@camox/ui": "0.31.4",
|
|
133
|
+
"@camox/cli": "0.31.4"
|
|
134
134
|
},
|
|
135
135
|
"devDependencies": {
|
|
136
136
|
"@babel/core": "^7.29.0",
|