fontdue-js 3.0.0-alpha15 → 3.0.0-alpha16

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.
@@ -17,6 +17,22 @@ export const PREVIEW_MARKER_COOKIE = 'fontdue_preview';
17
17
  // FontdueConfig.preview.endpoint (and mount the route to match).
18
18
  export const PREVIEW_ENDPOINT = '/api/preview';
19
19
 
20
+ // Canonical preview-token lifetime, in ms. The token is a stateless
21
+ // `Phoenix.Token` with a fixed 1-hour `max_age` (see the backend
22
+ // `Fontage.Token` `:admin_token` `verify` — `max_age: 60 * 60`). It is the
23
+ // source of truth; this constant only exists as a *fallback* for when the
24
+ // `createAdminToken` mutation hasn't yet been taught to return its real
25
+ // `expiresAt` (the backend half ships separately). Keep these two in lockstep.
26
+ export const DEFAULT_PREVIEW_TTL_MS = 60 * 60 * 1000;
27
+
28
+ // How long past the token's expiry the readable marker cookie should live.
29
+ // The marker outlives the token on purpose: once the token lapses, the toolbar
30
+ // must still find the marker so it can show the "preview expired" warning and
31
+ // offer "re-enter" — rather than the cookie silently vanishing and the toolbar
32
+ // snapping back to "not previewing" (which would hide the very problem from the
33
+ // admin). A few hours of grace comfortably covers a backgrounded tab.
34
+ export const PREVIEW_MARKER_GRACE_MS = 4 * 60 * 60 * 1000;
35
+
20
36
  // Request header storefront fetches send to declare preview intent explicitly.
21
37
  // The GraphQL server reveals hidden (unpublished) fonts only when this is
22
38
  // "true" AND the request is an authenticated admin — so merely *being* logged
@@ -27,11 +43,75 @@ export const PREVIEW_ENDPOINT = '/api/preview';
27
43
  // server logic in FontageWeb.Schema.Context.
28
44
  export const PREVIEW_HEADER = 'fontdue-preview';
29
45
 
30
- // Whether the readable preview marker cookie is set on the current document.
31
- // Browser-only (guarded so it stays inert during server rendering): lets the
32
- // admin toolbar and the client-side Relay network layer tell that an admin is
33
- // actively previewing, so storefront fetches can send PREVIEW_HEADER "true"
34
- // while previewing and "false" otherwise.
46
+ // The marker cookie's *value* now encodes the token's expiry as epoch-ms, e.g.
47
+ // `fontdue_preview=1718640000000`. Previously it was a bare `1`; that legacy
48
+ // value still parses (as 1ms after the epoch → always "expired"), so any stale
49
+ // `=1` cookie left from an older client degrades safely to the warning state
50
+ // rather than reading as a live preview. Empty / unset means "not previewing".
51
+
52
+ // Raw value of the marker cookie on the current document, or undefined when the
53
+ // cookie is absent or we're not in a browser. Browser-only and guarded so it
54
+ // stays inert during server rendering.
55
+ function readPreviewMarkerValue() {
56
+ if (typeof document === 'undefined') return undefined;
57
+ for (const part of document.cookie.split('; ')) {
58
+ const idx = part.indexOf('=');
59
+ if (idx === -1) continue;
60
+ if (part.slice(0, idx) !== PREVIEW_MARKER_COOKIE) continue;
61
+ const value = part.slice(idx + 1);
62
+ return value === '' ? undefined : value;
63
+ }
64
+ return undefined;
65
+ }
66
+
67
+ // Whether the readable preview marker cookie is present on the current
68
+ // document. Lets the admin toolbar and the client-side Relay network layer tell
69
+ // that an admin entered preview, so storefront fetches can send PREVIEW_HEADER
70
+ // "true" while the marker is set and "false" otherwise. Presence — not
71
+ // freshness — gates the header: a just-expired token still needs its render to
72
+ // stay out of the public cache until the admin re-enters or exits, and the
73
+ // server independently rejects a dead token, so a marker with a past expiry
74
+ // never actually leaks hidden fonts.
35
75
  export function hasPreviewMarkerCookie() {
36
- return typeof document !== 'undefined' && document.cookie.split('; ').some(c => c === `${PREVIEW_MARKER_COOKIE}=1`);
76
+ return readPreviewMarkerValue() !== undefined;
77
+ }
78
+
79
+ // Expiry (epoch-ms) stored in the marker cookie, or undefined when the marker
80
+ // is absent or its value isn't a finite number. The toolbar compares this to
81
+ // `Date.now()` to choose between the "previewing" and "preview expired" states.
82
+ export function getPreviewExpiry() {
83
+ const value = readPreviewMarkerValue();
84
+ if (value === undefined) return undefined;
85
+ const expiry = Number(value);
86
+ return Number.isFinite(expiry) ? expiry : undefined;
87
+ }
88
+
89
+ // Set or clear the readable preview marker cookie directly in the browser.
90
+ //
91
+ // The script-tag (CDN) embed has no server preview route to broker an httpOnly
92
+ // token through — and needs none: it is client-only, so its GraphQL fetches
93
+ // carry the admin's Fontdue session cookie cross-origin (SameSite=None) and the
94
+ // server reveals hidden fonts on `fontdue-preview: true` alone. This marker is
95
+ // what flips the client-side Relay layer to send that header (see
96
+ // hasPreviewMarkerCookie). It is NOT a credential — the admin session still
97
+ // gates the reveal, so a non-admin setting it just sees the public view.
98
+ //
99
+ // When entering (`on` truthy), `on` is the token's expiry as epoch-ms; the
100
+ // cookie stores it and is given a Max-Age that outlives the token by
101
+ // PREVIEW_MARKER_GRACE_MS so the toolbar can reach the "expired" warning state.
102
+ // Passing `false` clears the cookie. (A bare `true` keeps older call sites
103
+ // working by falling back to now + DEFAULT_PREVIEW_TTL_MS.)
104
+ //
105
+ // Secure is set on https (the marker stays JS-readable; Secure only restricts
106
+ // the transport) and omitted on http so it still persists in local dev.
107
+ export function setPreviewMarkerCookie(on) {
108
+ if (typeof document === 'undefined') return;
109
+ const secure = typeof location !== 'undefined' && location.protocol === 'https:' ? '; Secure' : '';
110
+ if (on === false) {
111
+ document.cookie = `${PREVIEW_MARKER_COOKIE}=; Path=/; SameSite=Lax${secure}; Max-Age=0`;
112
+ return;
113
+ }
114
+ const expiresAt = typeof on === 'number' ? on : Date.now() + DEFAULT_PREVIEW_TTL_MS;
115
+ const maxAgeSeconds = Math.max(0, Math.ceil((expiresAt - Date.now() + PREVIEW_MARKER_GRACE_MS) / 1000));
116
+ document.cookie = `${PREVIEW_MARKER_COOKIE}=${expiresAt}; Path=/; SameSite=Lax${secure}; Max-Age=${maxAgeSeconds}`;
37
117
  }
@@ -1,5 +1,5 @@
1
- import { PREVIEW_TOKEN_COOKIE, PREVIEW_MARKER_COOKIE, PREVIEW_ENDPOINT } from './constants.js';
2
- export { PREVIEW_TOKEN_COOKIE, PREVIEW_MARKER_COOKIE, PREVIEW_ENDPOINT };
1
+ import { PREVIEW_TOKEN_COOKIE, PREVIEW_MARKER_COOKIE, PREVIEW_ENDPOINT, DEFAULT_PREVIEW_TTL_MS, PREVIEW_MARKER_GRACE_MS } from './constants.js';
2
+ export { PREVIEW_TOKEN_COOKIE, PREVIEW_MARKER_COOKIE, PREVIEW_ENDPOINT, DEFAULT_PREVIEW_TTL_MS, PREVIEW_MARKER_GRACE_MS, };
3
3
  export interface PreviewCookieOptions {
4
4
  /**
5
5
  * Whether to set the cookies' Secure attribute. Defaults to true on https
@@ -25,11 +25,15 @@ export interface PreviewCookieOptions {
25
25
  * export const action = ({ request }: Route.ActionArgs) =>
26
26
  * handlePreviewRequest(request);
27
27
  *
28
- * POST expects a JSON body `{ token: string }`; DELETE takes no body. The token
29
- * is opaque here — the Fontdue GraphQL server validates it on each request, so
30
- * a forged token simply reveals nothing. Frameworks that cache HTML should also
31
- * bypass their shared/CDN cache when PREVIEW_MARKER_COOKIE is present, so a
32
- * admin preview is never served to the public.
28
+ * POST expects a JSON body `{ token: string, expiresAt?: string | number }`;
29
+ * DELETE takes no body. `expiresAt` (ISO-8601 or epoch-ms) is the token's
30
+ * expiry; it's stored in the readable marker cookie so the toolbar can warn
31
+ * when preview has lapsed, and defaults to now + DEFAULT_PREVIEW_TTL_MS when
32
+ * omitted. The token is opaque here — the Fontdue GraphQL server validates it
33
+ * on each request, so a forged token simply reveals nothing. Frameworks that
34
+ * cache HTML should also bypass their shared/CDN cache when
35
+ * PREVIEW_MARKER_COOKIE is present, so an admin preview is never served to the
36
+ * public.
33
37
  */
34
38
  export declare function handlePreviewRequest(request: Request, options?: PreviewCookieOptions): Promise<Response>;
35
39
  /**
@@ -36,8 +36,8 @@
36
36
  // per-request state explicitly, and is the fallback where ambient context
37
37
  // can't propagate.
38
38
 
39
- import { PREVIEW_TOKEN_COOKIE, PREVIEW_MARKER_COOKIE, PREVIEW_ENDPOINT } from './constants.js';
40
- export { PREVIEW_TOKEN_COOKIE, PREVIEW_MARKER_COOKIE, PREVIEW_ENDPOINT };
39
+ import { PREVIEW_TOKEN_COOKIE, PREVIEW_MARKER_COOKIE, PREVIEW_ENDPOINT, DEFAULT_PREVIEW_TTL_MS, PREVIEW_MARKER_GRACE_MS } from './constants.js';
40
+ export { PREVIEW_TOKEN_COOKIE, PREVIEW_MARKER_COOKIE, PREVIEW_ENDPOINT, DEFAULT_PREVIEW_TTL_MS, PREVIEW_MARKER_GRACE_MS };
41
41
  function serializeCookie(name, value, opts) {
42
42
  const sameSite = opts.sameSite === 'strict' ? 'Strict' : opts.sameSite === 'none' ? 'None' : 'Lax';
43
43
  const parts = [`${name}=${encodeURIComponent(value)}`, `Path=${opts.path ?? '/'}`, `SameSite=${sameSite}`];
@@ -46,6 +46,22 @@ function serializeCookie(name, value, opts) {
46
46
  if (opts.maxAge != null) parts.push(`Max-Age=${opts.maxAge}`);
47
47
  return parts.join('; ');
48
48
  }
49
+
50
+ // Coerce an `expiresAt` from the POST body — an ISO-8601 string, an epoch-ms
51
+ // number, or a numeric string — into epoch-ms. Falls back to
52
+ // now + DEFAULT_PREVIEW_TTL_MS when absent or unparseable, since the canonical
53
+ // 1h TTL lives in the backend token and the field may not be present yet (the
54
+ // backend half ships separately). Never throws.
55
+ function resolveExpiresAt(value) {
56
+ if (typeof value === 'number' && Number.isFinite(value)) return value;
57
+ if (typeof value === 'string' && value !== '') {
58
+ const asNumber = Number(value);
59
+ if (Number.isFinite(asNumber)) return asNumber;
60
+ const asDate = Date.parse(value);
61
+ if (!Number.isNaN(asDate)) return asDate;
62
+ }
63
+ return Date.now() + DEFAULT_PREVIEW_TTL_MS;
64
+ }
49
65
  function isSecureRequest(request) {
50
66
  try {
51
67
  return new URL(request.url).protocol === 'https:';
@@ -79,11 +95,15 @@ function jsonResponse(body, status) {
79
95
  * export const action = ({ request }: Route.ActionArgs) =>
80
96
  * handlePreviewRequest(request);
81
97
  *
82
- * POST expects a JSON body `{ token: string }`; DELETE takes no body. The token
83
- * is opaque here — the Fontdue GraphQL server validates it on each request, so
84
- * a forged token simply reveals nothing. Frameworks that cache HTML should also
85
- * bypass their shared/CDN cache when PREVIEW_MARKER_COOKIE is present, so a
86
- * admin preview is never served to the public.
98
+ * POST expects a JSON body `{ token: string, expiresAt?: string | number }`;
99
+ * DELETE takes no body. `expiresAt` (ISO-8601 or epoch-ms) is the token's
100
+ * expiry; it's stored in the readable marker cookie so the toolbar can warn
101
+ * when preview has lapsed, and defaults to now + DEFAULT_PREVIEW_TTL_MS when
102
+ * omitted. The token is opaque here — the Fontdue GraphQL server validates it
103
+ * on each request, so a forged token simply reveals nothing. Frameworks that
104
+ * cache HTML should also bypass their shared/CDN cache when
105
+ * PREVIEW_MARKER_COOKIE is present, so an admin preview is never served to the
106
+ * public.
87
107
  */
88
108
  export async function handlePreviewRequest(request) {
89
109
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -115,15 +135,21 @@ export async function handlePreviewRequest(request) {
115
135
  error: 'Missing preview token'
116
136
  }, 400);
117
137
  }
138
+ const expiresAt = resolveExpiresAt(body.expiresAt);
139
+ // Marker outlives the token by a grace window so the toolbar can reach the
140
+ // "expired" warning state instead of the cookie silently vanishing.
141
+ const markerMaxAge = Math.max(0, Math.ceil((expiresAt - Date.now() + PREVIEW_MARKER_GRACE_MS) / 1000));
118
142
  return jsonResponse({
119
143
  ok: true,
120
- preview: true
144
+ preview: true,
145
+ expiresAt
121
146
  }, 200, [serializeCookie(PREVIEW_TOKEN_COOKIE, token, {
122
147
  ...base,
123
148
  httpOnly: true
124
- }), serializeCookie(PREVIEW_MARKER_COOKIE, '1', {
149
+ }), serializeCookie(PREVIEW_MARKER_COOKIE, String(expiresAt), {
125
150
  ...base,
126
- httpOnly: false
151
+ httpOnly: false,
152
+ maxAge: markerMaxAge
127
153
  })]);
128
154
  }
129
155
  return jsonResponse({
@@ -7,7 +7,7 @@ import { PREVIEW_HEADER, hasPreviewMarkerCookie } from '../preview/constants.js'
7
7
  // (defineVersionPlugin in .babelrc.cjs) with the literal package.json#version.
8
8
  // Exported so UI (the admin toolbar) can surface it without re-reading the
9
9
  // build-time global in a 'use client' module.
10
- export const version = "3.0.0-alpha15";
10
+ export const version = "3.0.0-alpha16";
11
11
  const IS_SERVER = typeof window === typeof undefined;
12
12
 
13
13
  // Read env from either process.env (Node/Next.js) or import.meta.env (Vite/Astro).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fontdue-js",
3
- "version": "3.0.0-alpha15",
3
+ "version": "3.0.0-alpha16",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "npm run relay && run-p build-js build-css build-ts",
@@ -1,84 +0,0 @@
1
- [ 597ms] [INFO] %cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold @ webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom-client.development.js:25630
2
- [ 747ms] Error: Switched to client rendering because the server rendering errored:
3
-
4
- Relay: Missing @required value at path 'collection' in 'BuyButtonIDQuery'.
5
- at handleFieldErrors (webpack-internal:///(ssr)/./node_modules/relay-runtime/lib/util/handlePotentialSnapshotErrors.js:36:19)
6
- at handlePotentialSnapshotErrors (webpack-internal:///(ssr)/./node_modules/relay-runtime/lib/util/handlePotentialSnapshotErrors.js:70:5)
7
- at handlePotentialSnapshotErrorsForState (webpack-internal:///(ssr)/./node_modules/react-relay/lib/relay-hooks/useFragmentInternal_CURRENT.js:120:5)
8
- at useFragmentInternal (webpack-internal:///(ssr)/./node_modules/react-relay/lib/relay-hooks/useFragmentInternal_CURRENT.js:420:3)
9
- at useFragmentInternal (webpack-internal:///(ssr)/./node_modules/react-relay/lib/relay-hooks/useFragmentInternal.js:11:54)
10
- at useLazyLoadQueryNode (webpack-internal:///(ssr)/./node_modules/react-relay/lib/relay-hooks/useLazyLoadQueryNode.js:64:14)
11
- at useLazyLoadQuery (webpack-internal:///(ssr)/./node_modules/react-relay/lib/relay-hooks/useLazyLoadQuery.js:13:14)
12
- at BuyButtonIDQueryRenderer (webpack-internal:///(ssr)/./node_modules/fontdue-js/dist/components/BuyButton/index.js:104:79)
13
- at Object.react_stack_bottom_frame (/Users/tom/code/fontdue/generaltype/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:2:292649)
14
- at renderWithHooks (/Users/tom/code/fontdue/generaltype/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:2:114080)
15
- at renderElement (/Users/tom/code/fontdue/generaltype/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:2:128752)
16
- at retryNode (/Users/tom/code/fontdue/generaltype/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:2:194584)
17
- at performWork (/Users/tom/code/fontdue/generaltype/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:2:215436)
18
- at Immediate._onImmediate (/Users/tom/code/fontdue/generaltype/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:2:98974)
19
- at process.processImmediate (node:internal/timers:491:21)
20
- at process.callbackTrampoline (node:internal/async_hooks:130:17)
21
- [ 1442ms] Error: Relay: Missing @required value at path 'collection' in 'BuyButtonIDQuery'.
22
- at handleFieldErrors (webpack-internal:///(app-pages-browser)/./node_modules/relay-runtime/lib/util/handlePotentialSnapshotErrors.js:36:19)
23
- at handlePotentialSnapshotErrors (webpack-internal:///(app-pages-browser)/./node_modules/relay-runtime/lib/util/handlePotentialSnapshotErrors.js:70:5)
24
- at handlePotentialSnapshotErrorsForState (webpack-internal:///(app-pages-browser)/./node_modules/react-relay/lib/relay-hooks/useFragmentInternal_CURRENT.js:120:5)
25
- at useFragmentInternal (webpack-internal:///(app-pages-browser)/./node_modules/react-relay/lib/relay-hooks/useFragmentInternal_CURRENT.js:420:3)
26
- at useFragmentInternal (webpack-internal:///(app-pages-browser)/./node_modules/react-relay/lib/relay-hooks/useFragmentInternal.js:11:54)
27
- at useLazyLoadQueryNode (webpack-internal:///(app-pages-browser)/./node_modules/react-relay/lib/relay-hooks/useLazyLoadQueryNode.js:64:14)
28
- at useLazyLoadQuery (webpack-internal:///(app-pages-browser)/./node_modules/react-relay/lib/relay-hooks/useLazyLoadQuery.js:13:14)
29
- at BuyButtonIDQueryRenderer (webpack-internal:///(app-pages-browser)/./node_modules/fontdue-js/dist/components/BuyButton/index.js:116:79)
30
- at Object.react_stack_bottom_frame (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom-client.development.js:23584:20)
31
- at renderWithHooks (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom-client.development.js:6793:22)
32
- at updateFunctionComponent (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom-client.development.js:9247:19)
33
- at beginWork (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom-client.development.js:10858:18)
34
- at runWithFiberInDEV (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom-client.development.js:872:30)
35
- at performUnitOfWork (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom-client.development.js:15727:22)
36
- at workLoopSync (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom-client.development.js:15547:41)
37
- at renderRootSync (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom-client.development.js:15527:11)
38
- at performWorkOnRoot (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom-client.development.js:15034:44)
39
- at performWorkOnRootViaSchedulerTask (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom-client.development.js:16816:7)
40
- at MessagePort.performWorkUntilDeadline (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/scheduler/cjs/scheduler.development.js:45:48)
41
- [ 217249ms] [LOG] [Fast Refresh] rebuilding @ webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/dev/hot-reloader/app/hot-reloader-app.js:196
42
- [ 217808ms] [WARNING] [Fast Refresh] performing full reload because your application had an unrecoverable error @ webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/dev/hot-reloader/app/hot-reloader-app.js:113
43
- [ 219163ms] [INFO] %cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold @ webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom-client.development.js:25630
44
- [ 730814ms] [INFO] %cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold @ webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom-client.development.js:25630
45
- [ 735697ms] [INFO] %cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold @ webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom-client.development.js:25630
46
- [ 735780ms] Error: Switched to client rendering because the server rendering errored:
47
-
48
- Relay: Missing @required value at path 'collection' in 'BuyButtonIDQuery'.
49
- at handleFieldErrors (webpack-internal:///(ssr)/./node_modules/relay-runtime/lib/util/handlePotentialSnapshotErrors.js:36:19)
50
- at handlePotentialSnapshotErrors (webpack-internal:///(ssr)/./node_modules/relay-runtime/lib/util/handlePotentialSnapshotErrors.js:70:5)
51
- at handlePotentialSnapshotErrorsForState (webpack-internal:///(ssr)/./node_modules/react-relay/lib/relay-hooks/useFragmentInternal_CURRENT.js:120:5)
52
- at useFragmentInternal (webpack-internal:///(ssr)/./node_modules/react-relay/lib/relay-hooks/useFragmentInternal_CURRENT.js:420:3)
53
- at useFragmentInternal (webpack-internal:///(ssr)/./node_modules/react-relay/lib/relay-hooks/useFragmentInternal.js:11:54)
54
- at useLazyLoadQueryNode (webpack-internal:///(ssr)/./node_modules/react-relay/lib/relay-hooks/useLazyLoadQueryNode.js:64:14)
55
- at useLazyLoadQuery (webpack-internal:///(ssr)/./node_modules/react-relay/lib/relay-hooks/useLazyLoadQuery.js:13:14)
56
- at BuyButtonIDQueryRenderer (webpack-internal:///(ssr)/./node_modules/fontdue-js/dist/components/BuyButton/index.js:104:79)
57
- at Object.react_stack_bottom_frame (/Users/tom/code/fontdue/generaltype/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:2:292649)
58
- at renderWithHooks (/Users/tom/code/fontdue/generaltype/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:2:114080)
59
- at renderElement (/Users/tom/code/fontdue/generaltype/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:2:128752)
60
- at retryNode (/Users/tom/code/fontdue/generaltype/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:2:194584)
61
- at performWork (/Users/tom/code/fontdue/generaltype/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:2:215436)
62
- at Immediate._onImmediate (/Users/tom/code/fontdue/generaltype/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:2:98974)
63
- at process.processImmediate (node:internal/timers:491:21)
64
- at process.callbackTrampoline (node:internal/async_hooks:130:17)
65
- [ 747981ms] [INFO] %cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold @ webpack-internal:///(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/cjs/react-dom-client.development.js:25630
66
- [ 748069ms] Error: Switched to client rendering because the server rendering errored:
67
-
68
- Relay: Missing @required value at path 'collection' in 'BuyButtonIDQuery'.
69
- at handleFieldErrors (webpack-internal:///(ssr)/./node_modules/relay-runtime/lib/util/handlePotentialSnapshotErrors.js:36:19)
70
- at handlePotentialSnapshotErrors (webpack-internal:///(ssr)/./node_modules/relay-runtime/lib/util/handlePotentialSnapshotErrors.js:70:5)
71
- at handlePotentialSnapshotErrorsForState (webpack-internal:///(ssr)/./node_modules/react-relay/lib/relay-hooks/useFragmentInternal_CURRENT.js:120:5)
72
- at useFragmentInternal (webpack-internal:///(ssr)/./node_modules/react-relay/lib/relay-hooks/useFragmentInternal_CURRENT.js:420:3)
73
- at useFragmentInternal (webpack-internal:///(ssr)/./node_modules/react-relay/lib/relay-hooks/useFragmentInternal.js:11:54)
74
- at useLazyLoadQueryNode (webpack-internal:///(ssr)/./node_modules/react-relay/lib/relay-hooks/useLazyLoadQueryNode.js:64:14)
75
- at useLazyLoadQuery (webpack-internal:///(ssr)/./node_modules/react-relay/lib/relay-hooks/useLazyLoadQuery.js:13:14)
76
- at BuyButtonIDQueryRenderer (webpack-internal:///(ssr)/./node_modules/fontdue-js/dist/components/BuyButton/index.js:104:79)
77
- at Object.react_stack_bottom_frame (/Users/tom/code/fontdue/generaltype/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:2:292649)
78
- at renderWithHooks (/Users/tom/code/fontdue/generaltype/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:2:114080)
79
- at renderElement (/Users/tom/code/fontdue/generaltype/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:2:128752)
80
- at retryNode (/Users/tom/code/fontdue/generaltype/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:2:194584)
81
- at performWork (/Users/tom/code/fontdue/generaltype/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:2:215436)
82
- at Immediate._onImmediate (/Users/tom/code/fontdue/generaltype/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:2:98974)
83
- at process.processImmediate (node:internal/timers:491:21)
84
- at process.callbackTrampoline (node:internal/async_hooks:130:17)
@@ -1,2 +0,0 @@
1
- [ 4008ms] [ERROR] Refused to get unsafe header "X-Sg-Cs" @ https://www.google.com/search?q=generaltype.fontdue.xuyz&oq=generaltype.fontdue.xuyz&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBCDMwODhqMGo3qAIAsAIA&sourceid=chrome&ie=UTF-8&sei=HMUvapfSAv7Ii-gP_8yN6A0:68
2
- [ 4008ms] [ERROR] Refused to get unsafe header "X-Sorry-Redirect" @ https://www.google.com/search?q=generaltype.fontdue.xuyz&oq=generaltype.fontdue.xuyz&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBCDMwODhqMGo3qAIAsAIA&sourceid=chrome&ie=UTF-8&sei=HMUvapfSAv7Ii-gP_8yN6A0:68
@@ -1 +0,0 @@
1
- [ 5170ms] [VERBOSE] [DOM] Input elements should have autocomplete attributes (suggested: "current-password"): (More info: https://goo.gl/9p2vKq) %o @ https://www.fontdue.xyz/login?redirect_to=%2Fadmin:0
@@ -1,13 +0,0 @@
1
- - generic [active] [ref=e1]:
2
- - generic [ref=e6] [cursor=pointer]:
3
- - button "Open Next.js Dev Tools" [ref=e7]:
4
- - img [ref=e8]
5
- - generic [ref=e11]:
6
- - button "Open issues overlay" [ref=e12]:
7
- - generic [ref=e13]:
8
- - generic [ref=e14]: "0"
9
- - generic [ref=e15]: "1"
10
- - generic [ref=e16]: Issue
11
- - button "Collapse issues badge" [ref=e17]:
12
- - img [ref=e18]
13
- - alert [ref=e20]
@@ -1,20 +0,0 @@
1
- /**
2
- * @generated SignedSource<<88a5032d626d87c31cf509850a60d228>>
3
- * @lightSyntaxTransform
4
- * @nogrep
5
- */
6
- import { ConcreteRequest } from 'relay-runtime';
7
- export type FontdueAdminToolbarStaffQuery$variables = Record<PropertyKey, never>;
8
- export type FontdueAdminToolbarStaffQuery$data = {
9
- readonly viewer: {
10
- readonly adminUser: {
11
- readonly name: string | null;
12
- } | null;
13
- };
14
- };
15
- export type FontdueAdminToolbarStaffQuery = {
16
- response: FontdueAdminToolbarStaffQuery$data;
17
- variables: FontdueAdminToolbarStaffQuery$variables;
18
- };
19
- declare const node: ConcreteRequest;
20
- export default node;
@@ -1,80 +0,0 @@
1
- /**
2
- * @generated SignedSource<<88a5032d626d87c31cf509850a60d228>>
3
- * @lightSyntaxTransform
4
- * @nogrep
5
- */
6
-
7
- /* tslint:disable */
8
- /* eslint-disable */
9
- // @ts-nocheck
10
-
11
- const node = function () {
12
- var v0 = {
13
- "alias": null,
14
- "args": null,
15
- "concreteType": "User",
16
- "kind": "LinkedField",
17
- "name": "adminUser",
18
- "plural": false,
19
- "selections": [{
20
- "alias": null,
21
- "args": null,
22
- "kind": "ScalarField",
23
- "name": "name",
24
- "storageKey": null
25
- }],
26
- "storageKey": null
27
- };
28
- return {
29
- "fragment": {
30
- "argumentDefinitions": [],
31
- "kind": "Fragment",
32
- "metadata": null,
33
- "name": "FontdueAdminToolbarStaffQuery",
34
- "selections": [{
35
- "alias": null,
36
- "args": null,
37
- "concreteType": "Viewer",
38
- "kind": "LinkedField",
39
- "name": "viewer",
40
- "plural": false,
41
- "selections": [v0 /*: any*/],
42
- "storageKey": null
43
- }],
44
- "type": "RootQueryType",
45
- "abstractKey": null
46
- },
47
- "kind": "Request",
48
- "operation": {
49
- "argumentDefinitions": [],
50
- "kind": "Operation",
51
- "name": "FontdueAdminToolbarStaffQuery",
52
- "selections": [{
53
- "alias": null,
54
- "args": null,
55
- "concreteType": "Viewer",
56
- "kind": "LinkedField",
57
- "name": "viewer",
58
- "plural": false,
59
- "selections": [v0 /*: any*/, {
60
- "alias": null,
61
- "args": null,
62
- "kind": "ScalarField",
63
- "name": "id",
64
- "storageKey": null
65
- }],
66
- "storageKey": null
67
- }]
68
- },
69
- "params": {
70
- "cacheID": "55346337ce5aabd5f25a03a6a788b119",
71
- "id": null,
72
- "metadata": {},
73
- "name": "FontdueAdminToolbarStaffQuery",
74
- "operationKind": "query",
75
- "text": "query FontdueAdminToolbarStaffQuery {\n viewer {\n adminUser {\n name\n }\n id\n }\n}\n"
76
- }
77
- };
78
- }();
79
- node.hash = "40c32a5790cc698bcac936bc2f27b7be";
80
- export default node;
@@ -1,4 +0,0 @@
1
- declare const data: {
2
- [code: string]: string;
3
- };
4
- export default data;