@lowdefy/server-dev 4.6.0 → 4.7.0
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/server/jitPageBuilder.js +7 -1
- package/manager/run.mjs +0 -2
- package/package.json +29 -29
- package/package.original.json +29 -29
- package/manager/utils/checkPortAvailable.mjs +0 -41
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import fs from 'fs';
|
|
18
18
|
import path from 'path';
|
|
19
19
|
import { serializer } from '@lowdefy/helpers';
|
|
20
|
-
import { buildPageJit, createContext } from '@lowdefy/build/dev';
|
|
20
|
+
import { buildPageJit, createContext, makeId } from '@lowdefy/build/dev';
|
|
21
21
|
|
|
22
22
|
import createLogger from './log/createLogger.js';
|
|
23
23
|
import PageCache from './pageCache.mjs';
|
|
@@ -112,6 +112,12 @@ function getBuildContext(buildDirectory, configDirectory) {
|
|
|
112
112
|
readJsonFile(path.join(buildDirectory, 'installedPluginPackages.json')) ?? [];
|
|
113
113
|
cachedBuildContext.installedPluginPackages = new Set(installedPluginPackages);
|
|
114
114
|
|
|
115
|
+
// Advance makeId past all skeleton IDs to prevent collisions with JIT builds
|
|
116
|
+
const idCounter = readJsonFile(path.join(buildDirectory, 'idCounter.json'));
|
|
117
|
+
if (idCounter != null) {
|
|
118
|
+
makeId.setCounter(idCounter);
|
|
119
|
+
}
|
|
120
|
+
|
|
115
121
|
return cachedBuildContext;
|
|
116
122
|
}
|
|
117
123
|
|
package/manager/run.mjs
CHANGED
|
@@ -19,7 +19,6 @@ import { wait } from '@lowdefy/helpers';
|
|
|
19
19
|
import opener from 'opener';
|
|
20
20
|
import getContext from './getContext.mjs';
|
|
21
21
|
import startServer from './processes/startServer.mjs';
|
|
22
|
-
import checkPortAvailable from './utils/checkPortAvailable.mjs';
|
|
23
22
|
|
|
24
23
|
/*
|
|
25
24
|
The run script does the following:
|
|
@@ -86,7 +85,6 @@ try {
|
|
|
86
85
|
// because chokidar sometimes doesn't fire this event, and it seems like there isn't an issue with not waiting.
|
|
87
86
|
context.startWatchers();
|
|
88
87
|
|
|
89
|
-
await checkPortAvailable(context.options.port);
|
|
90
88
|
startServer(context);
|
|
91
89
|
await wait(800);
|
|
92
90
|
if (process.env.LOWDEFY_SERVER_DEV_OPEN_BROWSER === 'true') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/server-dev",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -36,34 +36,34 @@
|
|
|
36
36
|
".npmrc"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@lowdefy/actions-core": "4.
|
|
40
|
-
"@lowdefy/api": "4.
|
|
41
|
-
"@lowdefy/block-utils": "4.
|
|
42
|
-
"@lowdefy/blocks-aggrid": "4.
|
|
43
|
-
"@lowdefy/blocks-antd": "4.
|
|
44
|
-
"@lowdefy/blocks-basic": "4.
|
|
45
|
-
"@lowdefy/blocks-color-selectors": "4.
|
|
46
|
-
"@lowdefy/blocks-echarts": "4.
|
|
47
|
-
"@lowdefy/blocks-loaders": "4.
|
|
48
|
-
"@lowdefy/blocks-markdown": "4.
|
|
49
|
-
"@lowdefy/blocks-qr": "4.
|
|
50
|
-
"@lowdefy/build": "4.
|
|
51
|
-
"@lowdefy/client": "4.
|
|
52
|
-
"@lowdefy/engine": "4.
|
|
53
|
-
"@lowdefy/errors": "4.
|
|
54
|
-
"@lowdefy/helpers": "4.
|
|
55
|
-
"@lowdefy/layout": "4.
|
|
56
|
-
"@lowdefy/logger": "4.
|
|
57
|
-
"@lowdefy/node-utils": "4.
|
|
58
|
-
"@lowdefy/operators-change-case": "4.
|
|
59
|
-
"@lowdefy/operators-diff": "4.
|
|
60
|
-
"@lowdefy/operators-js": "4.
|
|
61
|
-
"@lowdefy/operators-moment": "4.
|
|
62
|
-
"@lowdefy/operators-mql": "4.
|
|
63
|
-
"@lowdefy/operators-nunjucks": "4.
|
|
64
|
-
"@lowdefy/operators-uuid": "4.
|
|
65
|
-
"@lowdefy/operators-yaml": "4.
|
|
66
|
-
"@lowdefy/plugin-next-auth": "4.
|
|
39
|
+
"@lowdefy/actions-core": "4.7.0",
|
|
40
|
+
"@lowdefy/api": "4.7.0",
|
|
41
|
+
"@lowdefy/block-utils": "4.7.0",
|
|
42
|
+
"@lowdefy/blocks-aggrid": "4.7.0",
|
|
43
|
+
"@lowdefy/blocks-antd": "4.7.0",
|
|
44
|
+
"@lowdefy/blocks-basic": "4.7.0",
|
|
45
|
+
"@lowdefy/blocks-color-selectors": "4.7.0",
|
|
46
|
+
"@lowdefy/blocks-echarts": "4.7.0",
|
|
47
|
+
"@lowdefy/blocks-loaders": "4.7.0",
|
|
48
|
+
"@lowdefy/blocks-markdown": "4.7.0",
|
|
49
|
+
"@lowdefy/blocks-qr": "4.7.0",
|
|
50
|
+
"@lowdefy/build": "4.7.0",
|
|
51
|
+
"@lowdefy/client": "4.7.0",
|
|
52
|
+
"@lowdefy/engine": "4.7.0",
|
|
53
|
+
"@lowdefy/errors": "4.7.0",
|
|
54
|
+
"@lowdefy/helpers": "4.7.0",
|
|
55
|
+
"@lowdefy/layout": "4.7.0",
|
|
56
|
+
"@lowdefy/logger": "4.7.0",
|
|
57
|
+
"@lowdefy/node-utils": "4.7.0",
|
|
58
|
+
"@lowdefy/operators-change-case": "4.7.0",
|
|
59
|
+
"@lowdefy/operators-diff": "4.7.0",
|
|
60
|
+
"@lowdefy/operators-js": "4.7.0",
|
|
61
|
+
"@lowdefy/operators-moment": "4.7.0",
|
|
62
|
+
"@lowdefy/operators-mql": "4.7.0",
|
|
63
|
+
"@lowdefy/operators-nunjucks": "4.7.0",
|
|
64
|
+
"@lowdefy/operators-uuid": "4.7.0",
|
|
65
|
+
"@lowdefy/operators-yaml": "4.7.0",
|
|
66
|
+
"@lowdefy/plugin-next-auth": "4.7.0",
|
|
67
67
|
"chokidar": "3.5.3",
|
|
68
68
|
"dotenv": "16.3.1",
|
|
69
69
|
"next": "13.5.4",
|
package/package.original.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/server-dev",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -44,34 +44,34 @@
|
|
|
44
44
|
"prepublishOnly": "pnpm build"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@lowdefy/actions-core": "4.
|
|
48
|
-
"@lowdefy/api": "4.
|
|
49
|
-
"@lowdefy/block-utils": "4.
|
|
50
|
-
"@lowdefy/blocks-aggrid": "4.
|
|
51
|
-
"@lowdefy/blocks-antd": "4.
|
|
52
|
-
"@lowdefy/blocks-basic": "4.
|
|
53
|
-
"@lowdefy/blocks-color-selectors": "4.
|
|
54
|
-
"@lowdefy/blocks-echarts": "4.
|
|
55
|
-
"@lowdefy/blocks-loaders": "4.
|
|
56
|
-
"@lowdefy/blocks-markdown": "4.
|
|
57
|
-
"@lowdefy/blocks-qr": "4.
|
|
58
|
-
"@lowdefy/build": "4.
|
|
59
|
-
"@lowdefy/client": "4.
|
|
60
|
-
"@lowdefy/engine": "4.
|
|
61
|
-
"@lowdefy/errors": "4.
|
|
62
|
-
"@lowdefy/helpers": "4.
|
|
63
|
-
"@lowdefy/layout": "4.
|
|
64
|
-
"@lowdefy/logger": "4.
|
|
65
|
-
"@lowdefy/node-utils": "4.
|
|
66
|
-
"@lowdefy/operators-change-case": "4.
|
|
67
|
-
"@lowdefy/operators-diff": "4.
|
|
68
|
-
"@lowdefy/operators-js": "4.
|
|
69
|
-
"@lowdefy/operators-moment": "4.
|
|
70
|
-
"@lowdefy/operators-mql": "4.
|
|
71
|
-
"@lowdefy/operators-nunjucks": "4.
|
|
72
|
-
"@lowdefy/operators-uuid": "4.
|
|
73
|
-
"@lowdefy/operators-yaml": "4.
|
|
74
|
-
"@lowdefy/plugin-next-auth": "4.
|
|
47
|
+
"@lowdefy/actions-core": "4.7.0",
|
|
48
|
+
"@lowdefy/api": "4.7.0",
|
|
49
|
+
"@lowdefy/block-utils": "4.7.0",
|
|
50
|
+
"@lowdefy/blocks-aggrid": "4.7.0",
|
|
51
|
+
"@lowdefy/blocks-antd": "4.7.0",
|
|
52
|
+
"@lowdefy/blocks-basic": "4.7.0",
|
|
53
|
+
"@lowdefy/blocks-color-selectors": "4.7.0",
|
|
54
|
+
"@lowdefy/blocks-echarts": "4.7.0",
|
|
55
|
+
"@lowdefy/blocks-loaders": "4.7.0",
|
|
56
|
+
"@lowdefy/blocks-markdown": "4.7.0",
|
|
57
|
+
"@lowdefy/blocks-qr": "4.7.0",
|
|
58
|
+
"@lowdefy/build": "4.7.0",
|
|
59
|
+
"@lowdefy/client": "4.7.0",
|
|
60
|
+
"@lowdefy/engine": "4.7.0",
|
|
61
|
+
"@lowdefy/errors": "4.7.0",
|
|
62
|
+
"@lowdefy/helpers": "4.7.0",
|
|
63
|
+
"@lowdefy/layout": "4.7.0",
|
|
64
|
+
"@lowdefy/logger": "4.7.0",
|
|
65
|
+
"@lowdefy/node-utils": "4.7.0",
|
|
66
|
+
"@lowdefy/operators-change-case": "4.7.0",
|
|
67
|
+
"@lowdefy/operators-diff": "4.7.0",
|
|
68
|
+
"@lowdefy/operators-js": "4.7.0",
|
|
69
|
+
"@lowdefy/operators-moment": "4.7.0",
|
|
70
|
+
"@lowdefy/operators-mql": "4.7.0",
|
|
71
|
+
"@lowdefy/operators-nunjucks": "4.7.0",
|
|
72
|
+
"@lowdefy/operators-uuid": "4.7.0",
|
|
73
|
+
"@lowdefy/operators-yaml": "4.7.0",
|
|
74
|
+
"@lowdefy/plugin-next-auth": "4.7.0",
|
|
75
75
|
"chokidar": "3.5.3",
|
|
76
76
|
"dotenv": "16.3.1",
|
|
77
77
|
"next": "13.5.4",
|
|
@@ -1,41 +0,0 @@
|
|
|
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 { BuildError } from '@lowdefy/errors';
|
|
18
|
-
import net from 'net';
|
|
19
|
-
|
|
20
|
-
function checkPortAvailable(port) {
|
|
21
|
-
return new Promise((resolve, reject) => {
|
|
22
|
-
const server = net.createServer();
|
|
23
|
-
server.once('error', (err) => {
|
|
24
|
-
if (err.code === 'EADDRINUSE') {
|
|
25
|
-
reject(
|
|
26
|
-
new BuildError(
|
|
27
|
-
`Port ${port} is already in use. Stop the other process or use a different port with --port.`
|
|
28
|
-
)
|
|
29
|
-
);
|
|
30
|
-
} else {
|
|
31
|
-
reject(err);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
server.once('listening', () => {
|
|
35
|
-
server.close(() => resolve());
|
|
36
|
-
});
|
|
37
|
-
server.listen(port);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export default checkPortAvailable;
|