@lowdefy/server-dev 0.0.0-experimental-20260929101721 → 0.0.0-experimental-20260929110023
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/lib/docs/isPageReady.js
CHANGED
|
@@ -35,6 +35,9 @@ function isPageReady(pageId) {
|
|
|
35
35
|
// runOnInitAsync is always invoked once runOnInit resolves, so this settles
|
|
36
36
|
// even for a page that declares no onInitAsync event.
|
|
37
37
|
if (context._internal?.onInitAsyncDone !== true) return false;
|
|
38
|
+
// The app onInitAsync runs once per app load, alongside the first page's events.
|
|
39
|
+
const appContext = window.lowdefy?.appContext;
|
|
40
|
+
if (appContext && appContext._internal?.onInitAsyncDone !== true) return false;
|
|
38
41
|
|
|
39
42
|
// Covers onMountAsync (fired without await by Block.js) and any other event
|
|
40
43
|
// still running, such as an onClick from an earlier tool call.
|
|
@@ -70,6 +70,15 @@ test('isPageReady returns false while onInitAsync has not finished', () => {
|
|
|
70
70
|
expect(isPageReady('home')).toBe(false);
|
|
71
71
|
});
|
|
72
72
|
|
|
73
|
+
test('isPageReady returns false while the app onInitAsync has not finished', () => {
|
|
74
|
+
setWindow(settledContext());
|
|
75
|
+
global.window.lowdefy.appContext = { _internal: { onInitDone: true } };
|
|
76
|
+
expect(isPageReady('home')).toBe(false);
|
|
77
|
+
|
|
78
|
+
global.window.lowdefy.appContext._internal.onInitAsyncDone = true;
|
|
79
|
+
expect(isPageReady('home')).toBe(true);
|
|
80
|
+
});
|
|
81
|
+
|
|
73
82
|
test('isPageReady returns false while a block onMountAsync event is loading', () => {
|
|
74
83
|
setWindow(
|
|
75
84
|
settledContext({
|
|
@@ -238,12 +238,24 @@ test.each([
|
|
|
238
238
|
context.buildActivity = createBuildActivity({ onChange: () => {} });
|
|
239
239
|
context.devServer = { exitCode: null, signalCode: null };
|
|
240
240
|
context.buildActivity.setBusy(true);
|
|
241
|
+
// waitedMs is timed from when the proxy starts waiting, a moment after the request is sent.
|
|
242
|
+
// Holding for 200ms from that moment, not from the fetch call, keeps the waitedMs assertion
|
|
243
|
+
// below from racing the request's arrival.
|
|
244
|
+
const { waitForIdle } = context.buildActivity;
|
|
245
|
+
const waitStarted = new Promise((resolve) => {
|
|
246
|
+
context.buildActivity.waitForIdle = (options) => {
|
|
247
|
+
const waiting = waitForIdle(options);
|
|
248
|
+
resolve();
|
|
249
|
+
return waiting;
|
|
250
|
+
};
|
|
251
|
+
});
|
|
241
252
|
|
|
242
253
|
const { path: requestPath, init } = makeRequest();
|
|
243
254
|
const pending = fetch(`http://localhost:${port}${requestPath}`, {
|
|
244
255
|
...init,
|
|
245
256
|
headers: { 'x-lowdefy-build-wait': 'settled=true&sawBuild=false&waitedMs=0' },
|
|
246
257
|
}).then((response) => response.json());
|
|
258
|
+
await waitStarted;
|
|
247
259
|
await new Promise((resolve) => setTimeout(resolve, 200));
|
|
248
260
|
|
|
249
261
|
// The restart the build needed: the old server stops, a new one answers.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/server-dev",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-20260929110023",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -45,40 +45,41 @@
|
|
|
45
45
|
"@hono/mcp": "0.3.0",
|
|
46
46
|
"@hono/node-server": "2.0.10",
|
|
47
47
|
"@hono/vite-dev-server": "0.26.0",
|
|
48
|
-
"@lowdefy/actions-core": "0.0.0-experimental-
|
|
49
|
-
"@lowdefy/api": "0.0.0-experimental-
|
|
50
|
-
"@lowdefy/block-utils": "0.0.0-experimental-
|
|
51
|
-
"@lowdefy/blocks-aggrid": "0.0.0-experimental-
|
|
52
|
-
"@lowdefy/blocks-antd": "0.0.0-experimental-
|
|
53
|
-
"@lowdefy/blocks-antd-x": "0.0.0-experimental-
|
|
54
|
-
"@lowdefy/blocks-basic": "0.0.0-experimental-
|
|
55
|
-
"@lowdefy/blocks-captcha": "0.0.0-experimental-
|
|
56
|
-
"@lowdefy/blocks-echarts": "0.0.0-experimental-
|
|
57
|
-
"@lowdefy/blocks-loaders": "0.0.0-experimental-
|
|
58
|
-
"@lowdefy/blocks-markdown": "0.0.0-experimental-
|
|
59
|
-
"@lowdefy/blocks-
|
|
60
|
-
"@lowdefy/
|
|
61
|
-
"@lowdefy/
|
|
62
|
-
"@lowdefy/
|
|
63
|
-
"@lowdefy/connection-
|
|
64
|
-
"@lowdefy/
|
|
65
|
-
"@lowdefy/
|
|
66
|
-
"@lowdefy/
|
|
67
|
-
"@lowdefy/
|
|
68
|
-
"@lowdefy/
|
|
69
|
-
"@lowdefy/
|
|
70
|
-
"@lowdefy/
|
|
71
|
-
"@lowdefy/
|
|
72
|
-
"@lowdefy/operators-
|
|
73
|
-
"@lowdefy/operators-
|
|
74
|
-
"@lowdefy/operators-
|
|
75
|
-
"@lowdefy/operators-
|
|
76
|
-
"@lowdefy/operators-
|
|
77
|
-
"@lowdefy/operators-
|
|
78
|
-
"@lowdefy/operators-
|
|
79
|
-
"@lowdefy/operators-
|
|
80
|
-
"@lowdefy/
|
|
81
|
-
"@lowdefy/
|
|
48
|
+
"@lowdefy/actions-core": "0.0.0-experimental-20260929110023",
|
|
49
|
+
"@lowdefy/api": "0.0.0-experimental-20260929110023",
|
|
50
|
+
"@lowdefy/block-utils": "0.0.0-experimental-20260929110023",
|
|
51
|
+
"@lowdefy/blocks-aggrid": "0.0.0-experimental-20260929110023",
|
|
52
|
+
"@lowdefy/blocks-antd": "0.0.0-experimental-20260929110023",
|
|
53
|
+
"@lowdefy/blocks-antd-x": "0.0.0-experimental-20260929110023",
|
|
54
|
+
"@lowdefy/blocks-basic": "0.0.0-experimental-20260929110023",
|
|
55
|
+
"@lowdefy/blocks-captcha": "0.0.0-experimental-20260929110023",
|
|
56
|
+
"@lowdefy/blocks-echarts": "0.0.0-experimental-20260929110023",
|
|
57
|
+
"@lowdefy/blocks-loaders": "0.0.0-experimental-20260929110023",
|
|
58
|
+
"@lowdefy/blocks-markdown": "0.0.0-experimental-20260929110023",
|
|
59
|
+
"@lowdefy/blocks-table": "0.0.0-experimental-20260929110023",
|
|
60
|
+
"@lowdefy/blocks-tiptap": "0.0.0-experimental-20260929110023",
|
|
61
|
+
"@lowdefy/build": "0.0.0-experimental-20260929110023",
|
|
62
|
+
"@lowdefy/client": "0.0.0-experimental-20260929110023",
|
|
63
|
+
"@lowdefy/connection-axios-http": "0.0.0-experimental-20260929110023",
|
|
64
|
+
"@lowdefy/connection-mongodb": "0.0.0-experimental-20260929110023",
|
|
65
|
+
"@lowdefy/docs-content": "0.0.0-experimental-20260929110023",
|
|
66
|
+
"@lowdefy/e2e-utils": "0.0.0-experimental-20260929110023",
|
|
67
|
+
"@lowdefy/errors": "0.0.0-experimental-20260929110023",
|
|
68
|
+
"@lowdefy/helpers": "0.0.0-experimental-20260929110023",
|
|
69
|
+
"@lowdefy/layout": "0.0.0-experimental-20260929110023",
|
|
70
|
+
"@lowdefy/logger": "0.0.0-experimental-20260929110023",
|
|
71
|
+
"@lowdefy/node-utils": "0.0.0-experimental-20260929110023",
|
|
72
|
+
"@lowdefy/operators-change-case": "0.0.0-experimental-20260929110023",
|
|
73
|
+
"@lowdefy/operators-cron": "0.0.0-experimental-20260929110023",
|
|
74
|
+
"@lowdefy/operators-dayjs": "0.0.0-experimental-20260929110023",
|
|
75
|
+
"@lowdefy/operators-diff": "0.0.0-experimental-20260929110023",
|
|
76
|
+
"@lowdefy/operators-js": "0.0.0-experimental-20260929110023",
|
|
77
|
+
"@lowdefy/operators-mql": "0.0.0-experimental-20260929110023",
|
|
78
|
+
"@lowdefy/operators-nunjucks": "0.0.0-experimental-20260929110023",
|
|
79
|
+
"@lowdefy/operators-uuid": "0.0.0-experimental-20260929110023",
|
|
80
|
+
"@lowdefy/operators-yaml": "0.0.0-experimental-20260929110023",
|
|
81
|
+
"@lowdefy/plugin-better-auth": "0.0.0-experimental-20260929110023",
|
|
82
|
+
"@lowdefy/websockets-core": "0.0.0-experimental-20260929110023",
|
|
82
83
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
83
84
|
"@tailwindcss/postcss": "4.3.3",
|
|
84
85
|
"@vitejs/plugin-react": "6.0.2",
|
package/package.original.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/server-dev",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-20260929110023",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -51,40 +51,41 @@
|
|
|
51
51
|
"@hono/mcp": "0.3.0",
|
|
52
52
|
"@hono/node-server": "2.0.10",
|
|
53
53
|
"@hono/vite-dev-server": "0.26.0",
|
|
54
|
-
"@lowdefy/actions-core": "0.0.0-experimental-
|
|
55
|
-
"@lowdefy/api": "0.0.0-experimental-
|
|
56
|
-
"@lowdefy/block-utils": "0.0.0-experimental-
|
|
57
|
-
"@lowdefy/blocks-aggrid": "0.0.0-experimental-
|
|
58
|
-
"@lowdefy/blocks-antd": "0.0.0-experimental-
|
|
59
|
-
"@lowdefy/blocks-antd-x": "0.0.0-experimental-
|
|
60
|
-
"@lowdefy/blocks-basic": "0.0.0-experimental-
|
|
61
|
-
"@lowdefy/blocks-captcha": "0.0.0-experimental-
|
|
62
|
-
"@lowdefy/blocks-echarts": "0.0.0-experimental-
|
|
63
|
-
"@lowdefy/blocks-loaders": "0.0.0-experimental-
|
|
64
|
-
"@lowdefy/blocks-markdown": "0.0.0-experimental-
|
|
65
|
-
"@lowdefy/blocks-
|
|
66
|
-
"@lowdefy/
|
|
67
|
-
"@lowdefy/
|
|
68
|
-
"@lowdefy/
|
|
69
|
-
"@lowdefy/connection-
|
|
70
|
-
"@lowdefy/
|
|
71
|
-
"@lowdefy/
|
|
72
|
-
"@lowdefy/
|
|
73
|
-
"@lowdefy/
|
|
74
|
-
"@lowdefy/
|
|
75
|
-
"@lowdefy/
|
|
76
|
-
"@lowdefy/
|
|
77
|
-
"@lowdefy/
|
|
78
|
-
"@lowdefy/operators-
|
|
79
|
-
"@lowdefy/operators-
|
|
80
|
-
"@lowdefy/operators-
|
|
81
|
-
"@lowdefy/operators-
|
|
82
|
-
"@lowdefy/operators-
|
|
83
|
-
"@lowdefy/operators-
|
|
84
|
-
"@lowdefy/operators-
|
|
85
|
-
"@lowdefy/operators-
|
|
86
|
-
"@lowdefy/
|
|
87
|
-
"@lowdefy/
|
|
54
|
+
"@lowdefy/actions-core": "0.0.0-experimental-20260929110023",
|
|
55
|
+
"@lowdefy/api": "0.0.0-experimental-20260929110023",
|
|
56
|
+
"@lowdefy/block-utils": "0.0.0-experimental-20260929110023",
|
|
57
|
+
"@lowdefy/blocks-aggrid": "0.0.0-experimental-20260929110023",
|
|
58
|
+
"@lowdefy/blocks-antd": "0.0.0-experimental-20260929110023",
|
|
59
|
+
"@lowdefy/blocks-antd-x": "0.0.0-experimental-20260929110023",
|
|
60
|
+
"@lowdefy/blocks-basic": "0.0.0-experimental-20260929110023",
|
|
61
|
+
"@lowdefy/blocks-captcha": "0.0.0-experimental-20260929110023",
|
|
62
|
+
"@lowdefy/blocks-echarts": "0.0.0-experimental-20260929110023",
|
|
63
|
+
"@lowdefy/blocks-loaders": "0.0.0-experimental-20260929110023",
|
|
64
|
+
"@lowdefy/blocks-markdown": "0.0.0-experimental-20260929110023",
|
|
65
|
+
"@lowdefy/blocks-table": "0.0.0-experimental-20260929110023",
|
|
66
|
+
"@lowdefy/blocks-tiptap": "0.0.0-experimental-20260929110023",
|
|
67
|
+
"@lowdefy/build": "0.0.0-experimental-20260929110023",
|
|
68
|
+
"@lowdefy/client": "0.0.0-experimental-20260929110023",
|
|
69
|
+
"@lowdefy/connection-axios-http": "0.0.0-experimental-20260929110023",
|
|
70
|
+
"@lowdefy/connection-mongodb": "0.0.0-experimental-20260929110023",
|
|
71
|
+
"@lowdefy/docs-content": "0.0.0-experimental-20260929110023",
|
|
72
|
+
"@lowdefy/e2e-utils": "0.0.0-experimental-20260929110023",
|
|
73
|
+
"@lowdefy/errors": "0.0.0-experimental-20260929110023",
|
|
74
|
+
"@lowdefy/helpers": "0.0.0-experimental-20260929110023",
|
|
75
|
+
"@lowdefy/layout": "0.0.0-experimental-20260929110023",
|
|
76
|
+
"@lowdefy/logger": "0.0.0-experimental-20260929110023",
|
|
77
|
+
"@lowdefy/node-utils": "0.0.0-experimental-20260929110023",
|
|
78
|
+
"@lowdefy/operators-change-case": "0.0.0-experimental-20260929110023",
|
|
79
|
+
"@lowdefy/operators-cron": "0.0.0-experimental-20260929110023",
|
|
80
|
+
"@lowdefy/operators-dayjs": "0.0.0-experimental-20260929110023",
|
|
81
|
+
"@lowdefy/operators-diff": "0.0.0-experimental-20260929110023",
|
|
82
|
+
"@lowdefy/operators-js": "0.0.0-experimental-20260929110023",
|
|
83
|
+
"@lowdefy/operators-mql": "0.0.0-experimental-20260929110023",
|
|
84
|
+
"@lowdefy/operators-nunjucks": "0.0.0-experimental-20260929110023",
|
|
85
|
+
"@lowdefy/operators-uuid": "0.0.0-experimental-20260929110023",
|
|
86
|
+
"@lowdefy/operators-yaml": "0.0.0-experimental-20260929110023",
|
|
87
|
+
"@lowdefy/plugin-better-auth": "0.0.0-experimental-20260929110023",
|
|
88
|
+
"@lowdefy/websockets-core": "0.0.0-experimental-20260929110023",
|
|
88
89
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
89
90
|
"@tailwindcss/postcss": "4.3.3",
|
|
90
91
|
"@vitejs/plugin-react": "6.0.2",
|