@lowdefy/server-dev 0.0.0-experimental-20260727103801 → 0.0.0-experimental-20260729072826

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/client/Page.jsx CHANGED
@@ -20,7 +20,7 @@ import Client from '@lowdefy/client';
20
20
 
21
21
  import BuildErrorPage from '../lib/client/BuildErrorPage.jsx';
22
22
  import InstallingPluginsPage from '../lib/client/InstallingPluginsPage.jsx';
23
- import RestartingPage from '../lib/client/RestartingPage.jsx';
23
+ import RedirectingPage from '../lib/client/RedirectingPage.jsx';
24
24
  import usePageConfig from '../lib/client/utils/usePageConfig.js';
25
25
 
26
26
  const Page = ({
@@ -47,10 +47,22 @@ const Page = ({
47
47
  }
48
48
  }, [pageConfig?._warnings, lowdefy]);
49
49
 
50
+ // Full load to the sign-in page so it can return here after sign-in — an
51
+ // effect, not a fetcher side effect, so the redirect re-fires if the same
52
+ // cached result renders again.
53
+ useEffect(() => {
54
+ if (pageConfig?.authRedirect) {
55
+ window.location.assign(pageConfig.authRedirect);
56
+ }
57
+ }, [pageConfig?.authRedirect]);
58
+
50
59
  if (!pageConfig) {
51
60
  router.replace({ pathname: '/404' });
52
61
  return '';
53
62
  }
63
+ if (pageConfig.authRedirect) {
64
+ return <RedirectingPage redirect={pageConfig.authRedirect} />;
65
+ }
54
66
  if (pageConfig.buildError) {
55
67
  return (
56
68
  <BuildErrorPage
@@ -63,9 +75,6 @@ const Page = ({
63
75
  if (pageConfig.installing) {
64
76
  return <InstallingPluginsPage packages={pageConfig.packages} />;
65
77
  }
66
- if (resetContext.restarting) {
67
- return <RestartingPage />;
68
- }
69
78
 
70
79
  // Merge dynamic JS entries fetched after JIT build with the static jsMap
71
80
  const mergedJsMap = pageConfig._jsEntries ? { ...jsMap, ...pageConfig._jsEntries } : jsMap;
package/client/Reload.jsx CHANGED
@@ -25,6 +25,13 @@ import waitForRestartedServer from '../lib/client/utils/waitForRestartedServer.j
25
25
  const Reload = ({ children, basePath, lowdefy }) => {
26
26
  const [reset, setReset] = useState(false);
27
27
  const [restarting, setRestarting] = useState(false);
28
+ // reset is a one-shot boolean the engine lowers only after a page mounts
29
+ // (getContext.js) — while a page is suspended it stays true and setReset(true)
30
+ // bails out of re-rendering. The tick always changes, so every reload event
31
+ // re-invokes Routing's render prop, which re-reads reloadVersion and mints a
32
+ // fresh Suspense/SWR key — a suspended tab recovers instead of stranding on
33
+ // the building screen.
34
+ const [, setReloadTick] = useState(0);
28
35
  const mutateCache = useMutateCache(basePath);
29
36
  useEffect(() => {
30
37
  const sse = new EventSource(`${basePath}/api/reload`);
@@ -38,6 +45,7 @@ const Reload = ({ children, basePath, lowdefy }) => {
38
45
  lowdefy._internal.initialised = false;
39
46
  }
40
47
  setReset(true);
48
+ setReloadTick((tick) => tick + 1);
41
49
  console.log('Reloaded config.');
42
50
  }, 600);
43
51
  });
@@ -20,6 +20,7 @@ import Head from '@lowdefy/client/adapters/Head.js';
20
20
  import createLinkComponent from '@lowdefy/client/adapters/Link.js';
21
21
 
22
22
  import BuildingPage from '../lib/client/BuildingPage.jsx';
23
+ import RestartingPage from '../lib/client/RestartingPage.jsx';
23
24
  import FeedbackMount from './feedback/FeedbackMount.jsx';
24
25
  import Inspector from './Inspector.jsx';
25
26
  import OpenInEditorListener from './openInEditor/OpenInEditorListener.jsx';
@@ -75,29 +76,36 @@ function Routing({ auth, lowdefy, router }) {
75
76
  <FeedbackMount basePath={router.basePath} lowdefy={lowdefy} pageId={pageId} />
76
77
  <OpenInEditorListener basePath={router.basePath} pageId={pageId} />
77
78
  <Reload basePath={router.basePath} lowdefy={lowdefy}>
78
- {(resetContext) => (
79
- <Suspense key={`${pageId}_${getReloadVersion()}`} fallback={<BuildingPage />}>
80
- <Page
81
- auth={auth}
82
- Components={{ Head, Link }}
83
- config={{
84
- rootConfig,
85
- }}
86
- jsMap={staticJsMap}
87
- lowdefy={lowdefy}
88
- pageId={pageId}
89
- resetContext={resetContext}
90
- router={router}
91
- types={{
92
- actions,
93
- blockMetas,
94
- blocks,
95
- icons,
96
- operators,
97
- }}
98
- />
99
- </Suspense>
100
- )}
79
+ {(resetContext) =>
80
+ // Rendered here, not in Page — Page sits below the Suspense boundary
81
+ // and cannot render anything while its config fetch is suspended, so
82
+ // a restarting server would present as "Building page..." forever.
83
+ resetContext.restarting ? (
84
+ <RestartingPage />
85
+ ) : (
86
+ <Suspense key={`${pageId}_${getReloadVersion()}`} fallback={<BuildingPage />}>
87
+ <Page
88
+ auth={auth}
89
+ Components={{ Head, Link }}
90
+ config={{
91
+ rootConfig,
92
+ }}
93
+ jsMap={staticJsMap}
94
+ lowdefy={lowdefy}
95
+ pageId={pageId}
96
+ resetContext={resetContext}
97
+ router={router}
98
+ types={{
99
+ actions,
100
+ blockMetas,
101
+ blocks,
102
+ icons,
103
+ operators,
104
+ }}
105
+ />
106
+ </Suspense>
107
+ )
108
+ }
101
109
  </Reload>
102
110
  </>
103
111
  );
@@ -0,0 +1,56 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */
16
+
17
+ import React from 'react';
18
+
19
+ // Shown while the 401 sign-in redirect navigates. The link is the escape
20
+ // hatch for a dropped navigation - the tab must never depend on a single
21
+ // window.location.assign to leave this screen.
22
+ const RedirectingPage = ({ redirect }) => {
23
+ return (
24
+ <div
25
+ style={{
26
+ height: '100vh',
27
+ textAlign: 'center',
28
+ display: 'flex',
29
+ flexDirection: 'column',
30
+ alignItems: 'center',
31
+ justifyContent: 'center',
32
+ backgroundColor: 'var(--ant-color-bg-layout)',
33
+ color: 'var(--ant-color-text)',
34
+ fontFamily:
35
+ "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
36
+ }}
37
+ >
38
+ <div
39
+ style={{
40
+ verticalAlign: 'middle',
41
+ display: 'inline-block',
42
+ }}
43
+ >
44
+ <h3>Redirecting to sign-in...</h3>
45
+ <p>
46
+ <a href={redirect} style={{ color: 'var(--ant-color-primary)' }}>
47
+ Continue to sign-in
48
+ </a>{' '}
49
+ if you are not redirected automatically.
50
+ </p>
51
+ </div>
52
+ </div>
53
+ );
54
+ };
55
+
56
+ export default RedirectingPage;
@@ -29,7 +29,9 @@ function parseJsModule(text) {
29
29
 
30
30
  async function fetchJsEntries(basePath) {
31
31
  try {
32
- const res = await fetch(`${basePath}/api/js/client`);
32
+ const res = await fetch(`${basePath}/api/js/client`, {
33
+ signal: AbortSignal.timeout(10_000),
34
+ });
33
35
  if (!res.ok) return {};
34
36
  return parseJsModule(await res.text());
35
37
  } catch {
@@ -39,7 +41,9 @@ async function fetchJsEntries(basePath) {
39
41
 
40
42
  async function fetchDynamicIcons(basePath) {
41
43
  try {
42
- const res = await fetch(`${basePath}/api/icons/dynamic`);
44
+ const res = await fetch(`${basePath}/api/icons/dynamic`, {
45
+ signal: AbortSignal.timeout(10_000),
46
+ });
43
47
  if (!res.ok) return {};
44
48
  return parseJsModule(await res.text());
45
49
  } catch {
@@ -48,18 +52,37 @@ async function fetchDynamicIcons(basePath) {
48
52
  }
49
53
 
50
54
  async function fetchPageConfig(url) {
51
- const res = await fetch(url, {
52
- headers: { 'Content-Type': 'application/json' },
53
- });
55
+ const basePath = url.replace(/\/api\/page\/.*$/, '');
56
+ // A stalled request (server restart mid-request, exhausted sockets) must
57
+ // become a visible error, never an eternal Suspense fallback — the reload
58
+ // recovery path cannot fire while the page tree is suspended.
59
+ let res;
60
+ try {
61
+ res = await fetch(url, {
62
+ headers: { 'Content-Type': 'application/json' },
63
+ signal: AbortSignal.timeout(30_000),
64
+ });
65
+ } catch (error) {
66
+ if (error.name === 'TimeoutError' || error.name === 'AbortError') {
67
+ throw new Error(
68
+ `Page config request "${url}" timed out - the dev server may be restarting. Reload the page.`
69
+ );
70
+ }
71
+ throw error;
72
+ }
54
73
  if (res.status === 404) {
55
74
  return null;
56
75
  }
57
76
  if (res.status === 401) {
58
- // Logged-out navigation to a protected page - full load to the login
59
- // page so it can return here after sign-in.
77
+ // Logged-out navigation to a protected page - Page renders a redirect
78
+ // screen and full-loads to the login page so it can return here after
79
+ // sign-in. Returning a settled value (never a parked promise) keeps the
80
+ // SWR key healthy: if the navigation is dropped, the tab still recovers
81
+ // on the next reload event or via the manual link on the redirect screen.
60
82
  const { redirect } = await res.json();
61
- window.location.assign(redirect ?? '/404');
62
- return new Promise(() => {});
83
+ const authRedirect = redirect ?? `${basePath}/404`;
84
+ console.warn(`Lowdefy dev: "${url}" returned 401 - redirecting to "${authRedirect}".`);
85
+ return { authRedirect };
63
86
  }
64
87
  const data = await res.json();
65
88
  if (data?.buildError) {
@@ -74,8 +97,6 @@ async function fetchPageConfig(url) {
74
97
 
75
98
  // Fetch jsMap and dynamic icons after page build completes
76
99
  // (JIT build may have added new entries).
77
- // Extract basePath from the URL to construct the endpoints.
78
- const basePath = url.replace(/\/api\/page\/.*$/, '');
79
100
  const [jsEntries, dynamicIcons] = await Promise.all([
80
101
  fetchJsEntries(basePath),
81
102
  fetchDynamicIcons(basePath),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/server-dev",
3
- "version": "0.0.0-experimental-20260727103801",
3
+ "version": "0.0.0-experimental-20260729072826",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -44,39 +44,39 @@
44
44
  "@hono/mcp": "0.3.0",
45
45
  "@hono/node-server": "2.0.4",
46
46
  "@hono/vite-dev-server": "0.26.0",
47
- "@lowdefy/actions-core": "0.0.0-experimental-20260727103801",
48
- "@lowdefy/api": "0.0.0-experimental-20260727103801",
49
- "@lowdefy/block-utils": "0.0.0-experimental-20260727103801",
50
- "@lowdefy/blocks-aggrid": "0.0.0-experimental-20260727103801",
51
- "@lowdefy/blocks-antd": "0.0.0-experimental-20260727103801",
52
- "@lowdefy/blocks-antd-x": "0.0.0-experimental-20260727103801",
53
- "@lowdefy/blocks-basic": "0.0.0-experimental-20260727103801",
54
- "@lowdefy/blocks-captcha": "0.0.0-experimental-20260727103801",
55
- "@lowdefy/blocks-echarts": "0.0.0-experimental-20260727103801",
56
- "@lowdefy/blocks-loaders": "0.0.0-experimental-20260727103801",
57
- "@lowdefy/blocks-markdown": "0.0.0-experimental-20260727103801",
58
- "@lowdefy/blocks-tiptap": "0.0.0-experimental-20260727103801",
59
- "@lowdefy/build": "0.0.0-experimental-20260727103801",
60
- "@lowdefy/client": "0.0.0-experimental-20260727103801",
61
- "@lowdefy/connection-axios-http": "0.0.0-experimental-20260727103801",
62
- "@lowdefy/connection-mongodb": "0.0.0-experimental-20260727103801",
63
- "@lowdefy/docs-content": "0.0.0-experimental-20260727103801",
64
- "@lowdefy/engine": "0.0.0-experimental-20260727103801",
65
- "@lowdefy/errors": "0.0.0-experimental-20260727103801",
66
- "@lowdefy/helpers": "0.0.0-experimental-20260727103801",
67
- "@lowdefy/layout": "0.0.0-experimental-20260727103801",
68
- "@lowdefy/logger": "0.0.0-experimental-20260727103801",
69
- "@lowdefy/node-utils": "0.0.0-experimental-20260727103801",
70
- "@lowdefy/operators-change-case": "0.0.0-experimental-20260727103801",
71
- "@lowdefy/operators-dayjs": "0.0.0-experimental-20260727103801",
72
- "@lowdefy/operators-diff": "0.0.0-experimental-20260727103801",
73
- "@lowdefy/operators-js": "0.0.0-experimental-20260727103801",
74
- "@lowdefy/operators-mql": "0.0.0-experimental-20260727103801",
75
- "@lowdefy/operators-nunjucks": "0.0.0-experimental-20260727103801",
76
- "@lowdefy/operators-uuid": "0.0.0-experimental-20260727103801",
77
- "@lowdefy/operators-yaml": "0.0.0-experimental-20260727103801",
78
- "@lowdefy/plugin-better-auth": "0.0.0-experimental-20260727103801",
79
- "@lowdefy/websockets-core": "0.0.0-experimental-20260727103801",
47
+ "@lowdefy/actions-core": "0.0.0-experimental-20260729072826",
48
+ "@lowdefy/api": "0.0.0-experimental-20260729072826",
49
+ "@lowdefy/block-utils": "0.0.0-experimental-20260729072826",
50
+ "@lowdefy/blocks-aggrid": "0.0.0-experimental-20260729072826",
51
+ "@lowdefy/blocks-antd": "0.0.0-experimental-20260729072826",
52
+ "@lowdefy/blocks-antd-x": "0.0.0-experimental-20260729072826",
53
+ "@lowdefy/blocks-basic": "0.0.0-experimental-20260729072826",
54
+ "@lowdefy/blocks-captcha": "0.0.0-experimental-20260729072826",
55
+ "@lowdefy/blocks-echarts": "0.0.0-experimental-20260729072826",
56
+ "@lowdefy/blocks-loaders": "0.0.0-experimental-20260729072826",
57
+ "@lowdefy/blocks-markdown": "0.0.0-experimental-20260729072826",
58
+ "@lowdefy/blocks-tiptap": "0.0.0-experimental-20260729072826",
59
+ "@lowdefy/build": "0.0.0-experimental-20260729072826",
60
+ "@lowdefy/client": "0.0.0-experimental-20260729072826",
61
+ "@lowdefy/connection-axios-http": "0.0.0-experimental-20260729072826",
62
+ "@lowdefy/connection-mongodb": "0.0.0-experimental-20260729072826",
63
+ "@lowdefy/docs-content": "0.0.0-experimental-20260729072826",
64
+ "@lowdefy/engine": "0.0.0-experimental-20260729072826",
65
+ "@lowdefy/errors": "0.0.0-experimental-20260729072826",
66
+ "@lowdefy/helpers": "0.0.0-experimental-20260729072826",
67
+ "@lowdefy/layout": "0.0.0-experimental-20260729072826",
68
+ "@lowdefy/logger": "0.0.0-experimental-20260729072826",
69
+ "@lowdefy/node-utils": "0.0.0-experimental-20260729072826",
70
+ "@lowdefy/operators-change-case": "0.0.0-experimental-20260729072826",
71
+ "@lowdefy/operators-dayjs": "0.0.0-experimental-20260729072826",
72
+ "@lowdefy/operators-diff": "0.0.0-experimental-20260729072826",
73
+ "@lowdefy/operators-js": "0.0.0-experimental-20260729072826",
74
+ "@lowdefy/operators-mql": "0.0.0-experimental-20260729072826",
75
+ "@lowdefy/operators-nunjucks": "0.0.0-experimental-20260729072826",
76
+ "@lowdefy/operators-uuid": "0.0.0-experimental-20260729072826",
77
+ "@lowdefy/operators-yaml": "0.0.0-experimental-20260729072826",
78
+ "@lowdefy/plugin-better-auth": "0.0.0-experimental-20260729072826",
79
+ "@lowdefy/websockets-core": "0.0.0-experimental-20260729072826",
80
80
  "@modelcontextprotocol/sdk": "1.29.0",
81
81
  "@tailwindcss/postcss": "4.3.1",
82
82
  "@vitejs/plugin-react": "6.0.2",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/server-dev",
3
- "version": "0.0.0-experimental-20260727103801",
3
+ "version": "0.0.0-experimental-20260729072826",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -50,39 +50,39 @@
50
50
  "@hono/mcp": "0.3.0",
51
51
  "@hono/node-server": "2.0.4",
52
52
  "@hono/vite-dev-server": "0.26.0",
53
- "@lowdefy/actions-core": "0.0.0-experimental-20260727103801",
54
- "@lowdefy/api": "0.0.0-experimental-20260727103801",
55
- "@lowdefy/block-utils": "0.0.0-experimental-20260727103801",
56
- "@lowdefy/blocks-aggrid": "0.0.0-experimental-20260727103801",
57
- "@lowdefy/blocks-antd": "0.0.0-experimental-20260727103801",
58
- "@lowdefy/blocks-antd-x": "0.0.0-experimental-20260727103801",
59
- "@lowdefy/blocks-basic": "0.0.0-experimental-20260727103801",
60
- "@lowdefy/blocks-captcha": "0.0.0-experimental-20260727103801",
61
- "@lowdefy/blocks-echarts": "0.0.0-experimental-20260727103801",
62
- "@lowdefy/blocks-loaders": "0.0.0-experimental-20260727103801",
63
- "@lowdefy/blocks-markdown": "0.0.0-experimental-20260727103801",
64
- "@lowdefy/blocks-tiptap": "0.0.0-experimental-20260727103801",
65
- "@lowdefy/build": "0.0.0-experimental-20260727103801",
66
- "@lowdefy/client": "0.0.0-experimental-20260727103801",
67
- "@lowdefy/connection-axios-http": "0.0.0-experimental-20260727103801",
68
- "@lowdefy/connection-mongodb": "0.0.0-experimental-20260727103801",
69
- "@lowdefy/docs-content": "0.0.0-experimental-20260727103801",
70
- "@lowdefy/engine": "0.0.0-experimental-20260727103801",
71
- "@lowdefy/errors": "0.0.0-experimental-20260727103801",
72
- "@lowdefy/helpers": "0.0.0-experimental-20260727103801",
73
- "@lowdefy/layout": "0.0.0-experimental-20260727103801",
74
- "@lowdefy/logger": "0.0.0-experimental-20260727103801",
75
- "@lowdefy/node-utils": "0.0.0-experimental-20260727103801",
76
- "@lowdefy/operators-change-case": "0.0.0-experimental-20260727103801",
77
- "@lowdefy/operators-dayjs": "0.0.0-experimental-20260727103801",
78
- "@lowdefy/operators-diff": "0.0.0-experimental-20260727103801",
79
- "@lowdefy/operators-js": "0.0.0-experimental-20260727103801",
80
- "@lowdefy/operators-mql": "0.0.0-experimental-20260727103801",
81
- "@lowdefy/operators-nunjucks": "0.0.0-experimental-20260727103801",
82
- "@lowdefy/operators-uuid": "0.0.0-experimental-20260727103801",
83
- "@lowdefy/operators-yaml": "0.0.0-experimental-20260727103801",
84
- "@lowdefy/plugin-better-auth": "0.0.0-experimental-20260727103801",
85
- "@lowdefy/websockets-core": "0.0.0-experimental-20260727103801",
53
+ "@lowdefy/actions-core": "0.0.0-experimental-20260729072826",
54
+ "@lowdefy/api": "0.0.0-experimental-20260729072826",
55
+ "@lowdefy/block-utils": "0.0.0-experimental-20260729072826",
56
+ "@lowdefy/blocks-aggrid": "0.0.0-experimental-20260729072826",
57
+ "@lowdefy/blocks-antd": "0.0.0-experimental-20260729072826",
58
+ "@lowdefy/blocks-antd-x": "0.0.0-experimental-20260729072826",
59
+ "@lowdefy/blocks-basic": "0.0.0-experimental-20260729072826",
60
+ "@lowdefy/blocks-captcha": "0.0.0-experimental-20260729072826",
61
+ "@lowdefy/blocks-echarts": "0.0.0-experimental-20260729072826",
62
+ "@lowdefy/blocks-loaders": "0.0.0-experimental-20260729072826",
63
+ "@lowdefy/blocks-markdown": "0.0.0-experimental-20260729072826",
64
+ "@lowdefy/blocks-tiptap": "0.0.0-experimental-20260729072826",
65
+ "@lowdefy/build": "0.0.0-experimental-20260729072826",
66
+ "@lowdefy/client": "0.0.0-experimental-20260729072826",
67
+ "@lowdefy/connection-axios-http": "0.0.0-experimental-20260729072826",
68
+ "@lowdefy/connection-mongodb": "0.0.0-experimental-20260729072826",
69
+ "@lowdefy/docs-content": "0.0.0-experimental-20260729072826",
70
+ "@lowdefy/engine": "0.0.0-experimental-20260729072826",
71
+ "@lowdefy/errors": "0.0.0-experimental-20260729072826",
72
+ "@lowdefy/helpers": "0.0.0-experimental-20260729072826",
73
+ "@lowdefy/layout": "0.0.0-experimental-20260729072826",
74
+ "@lowdefy/logger": "0.0.0-experimental-20260729072826",
75
+ "@lowdefy/node-utils": "0.0.0-experimental-20260729072826",
76
+ "@lowdefy/operators-change-case": "0.0.0-experimental-20260729072826",
77
+ "@lowdefy/operators-dayjs": "0.0.0-experimental-20260729072826",
78
+ "@lowdefy/operators-diff": "0.0.0-experimental-20260729072826",
79
+ "@lowdefy/operators-js": "0.0.0-experimental-20260729072826",
80
+ "@lowdefy/operators-mql": "0.0.0-experimental-20260729072826",
81
+ "@lowdefy/operators-nunjucks": "0.0.0-experimental-20260729072826",
82
+ "@lowdefy/operators-uuid": "0.0.0-experimental-20260729072826",
83
+ "@lowdefy/operators-yaml": "0.0.0-experimental-20260729072826",
84
+ "@lowdefy/plugin-better-auth": "0.0.0-experimental-20260729072826",
85
+ "@lowdefy/websockets-core": "0.0.0-experimental-20260729072826",
86
86
  "@modelcontextprotocol/sdk": "1.29.0",
87
87
  "@tailwindcss/postcss": "4.3.1",
88
88
  "@vitejs/plugin-react": "6.0.2",
@@ -77,6 +77,9 @@ async function jitPageHandler(c) {
77
77
  // The client follows this redirect with a full page load, so the login
78
78
  // page can return to the requested page after sign-in.
79
79
  const callbackUrl = `${basePath}/${pageId}`;
80
+ context.logger.debug(
81
+ `Page config request for "${pageId}" resolved unauthenticated - returning a sign-in redirect.`
82
+ );
80
83
  return c.json(
81
84
  {
82
85
  redirect: `${basePath}${authJson.authPages.signIn}?callbackUrl=${encodeURIComponent(