@lowdefy/server-dev 4.0.0-rc.10 → 4.0.0-rc.12

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.
@@ -15,12 +15,13 @@
15
15
  */
16
16
 
17
17
  import { spawnProcess } from '@lowdefy/node-utils';
18
+ import createStdOutLineHandler from '../utils/createStdOutLineHandler.mjs';
18
19
 
19
20
  function startServer(context) {
20
21
  context.shutdownServer();
21
22
 
22
23
  const nextServer = spawnProcess({
23
- stdOutLineHandler: (line) => context.logger.info({ print: 'log' }, line),
24
+ stdOutLineHandler: createStdOutLineHandler({ context }),
24
25
  stdErrLineHandler: (line) => context.logger.error(line),
25
26
  command: 'node',
26
27
  args: [context.bin.next, 'start'],
@@ -61,6 +61,7 @@ async function createCustomPluginTypesMap({ directories, logger }) {
61
61
  types = (await import(`${plugin.name}/types`)).default;
62
62
  } catch (e) {
63
63
  logger.error(`Failed to import plugin "${plugin.name}".`);
64
+ logger.debug(e);
64
65
  logger.info('If the plugin was added while the server was running, restart the server.');
65
66
  throw new Error(`Failed to import plugin "${plugin.name}".`);
66
67
  }
@@ -0,0 +1,33 @@
1
+ /*
2
+ Copyright 2020-2023 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
+ function createStdOutLineHandler({ context }) {
18
+ const { logger } = context;
19
+ function stdOutLineHandler(line) {
20
+ try {
21
+ const { level, name, time, rid, ...msgObj } = JSON.parse(line);
22
+ if (level) {
23
+ const print = level === 30 ? 'log' : logger.levels.labels[level];
24
+ logger[logger.levels.labels[level]]({ print }, JSON.stringify(msgObj));
25
+ }
26
+ } catch (error) {
27
+ logger.info({ print: 'log' }, line);
28
+ }
29
+ }
30
+ return stdOutLineHandler;
31
+ }
32
+
33
+ export default createStdOutLineHandler;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/server-dev",
3
- "version": "4.0.0-rc.10",
3
+ "version": "4.0.0-rc.12",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -42,54 +42,56 @@
42
42
  "next": "next"
43
43
  },
44
44
  "dependencies": {
45
- "@lowdefy/actions-core": "4.0.0-rc.10",
46
- "@lowdefy/api": "4.0.0-rc.10",
47
- "@lowdefy/blocks-antd": "4.0.0-rc.10",
48
- "@lowdefy/blocks-basic": "4.0.0-rc.10",
49
- "@lowdefy/blocks-color-selectors": "4.0.0-rc.10",
50
- "@lowdefy/blocks-echarts": "4.0.0-rc.10",
51
- "@lowdefy/blocks-loaders": "4.0.0-rc.10",
52
- "@lowdefy/blocks-markdown": "4.0.0-rc.10",
53
- "@lowdefy/blocks-qr": "4.0.0-rc.10",
54
- "@lowdefy/build": "4.0.0-rc.10",
55
- "@lowdefy/client": "4.0.0-rc.10",
56
- "@lowdefy/connection-axios-http": "4.0.0-rc.10",
57
- "@lowdefy/engine": "4.0.0-rc.10",
58
- "@lowdefy/helpers": "4.0.0-rc.10",
59
- "@lowdefy/layout": "4.0.0-rc.10",
60
- "@lowdefy/node-utils": "4.0.0-rc.10",
61
- "@lowdefy/operators-change-case": "4.0.0-rc.10",
62
- "@lowdefy/operators-diff": "4.0.0-rc.10",
63
- "@lowdefy/operators-js": "4.0.0-rc.10",
64
- "@lowdefy/operators-mql": "4.0.0-rc.10",
65
- "@lowdefy/operators-nunjucks": "4.0.0-rc.10",
66
- "@lowdefy/operators-uuid": "4.0.0-rc.10",
67
- "@lowdefy/operators-yaml": "4.0.0-rc.10",
68
- "@lowdefy/plugin-next-auth": "4.0.0-rc.10",
45
+ "@lowdefy/actions-core": "4.0.0-rc.12",
46
+ "@lowdefy/api": "4.0.0-rc.12",
47
+ "@lowdefy/blocks-antd": "4.0.0-rc.12",
48
+ "@lowdefy/blocks-basic": "4.0.0-rc.12",
49
+ "@lowdefy/blocks-color-selectors": "4.0.0-rc.12",
50
+ "@lowdefy/blocks-echarts": "4.0.0-rc.12",
51
+ "@lowdefy/blocks-loaders": "4.0.0-rc.12",
52
+ "@lowdefy/blocks-markdown": "4.0.0-rc.12",
53
+ "@lowdefy/blocks-qr": "4.0.0-rc.12",
54
+ "@lowdefy/build": "4.0.0-rc.12",
55
+ "@lowdefy/client": "4.0.0-rc.12",
56
+ "@lowdefy/connection-axios-http": "4.0.0-rc.12",
57
+ "@lowdefy/engine": "4.0.0-rc.12",
58
+ "@lowdefy/helpers": "4.0.0-rc.12",
59
+ "@lowdefy/layout": "4.0.0-rc.12",
60
+ "@lowdefy/node-utils": "4.0.0-rc.12",
61
+ "@lowdefy/operators-change-case": "4.0.0-rc.12",
62
+ "@lowdefy/operators-diff": "4.0.0-rc.12",
63
+ "@lowdefy/operators-js": "4.0.0-rc.12",
64
+ "@lowdefy/operators-mql": "4.0.0-rc.12",
65
+ "@lowdefy/operators-nunjucks": "4.0.0-rc.12",
66
+ "@lowdefy/operators-uuid": "4.0.0-rc.12",
67
+ "@lowdefy/operators-yaml": "4.0.0-rc.12",
68
+ "@lowdefy/plugin-next-auth": "4.0.0-rc.12",
69
69
  "chokidar": "3.5.3",
70
- "dotenv": "16.0.3",
71
- "next": "12.3.4",
72
- "next-auth": "4.20.1",
70
+ "dotenv": "16.3.1",
71
+ "next": "13.5.4",
72
+ "next-auth": "4.23.2",
73
73
  "opener": "1.5.2",
74
- "pino": "8.8.0",
74
+ "pino": "8.15.6",
75
75
  "process": "0.11.10",
76
76
  "react": "18.2.0",
77
77
  "react-dom": "18.2.0",
78
- "react-icons": "4.7.1",
79
- "swr": "2.0.0",
80
- "yaml": "2.2.2",
78
+ "react-icons": "4.11.0",
79
+ "swr": "2.2.4",
80
+ "yaml": "2.3.2",
81
81
  "yargs": "17.7.2"
82
82
  },
83
83
  "devDependencies": {
84
- "@next/eslint-plugin-next": "12.3.4",
85
- "less": "4.1.3",
86
- "less-loader": "11.1.0",
87
- "next-with-less": "2.0.5",
84
+ "@next/eslint-plugin-next": "13.5.4",
85
+ "less": "4.2.0",
86
+ "less-loader": "11.1.3",
87
+ "next-with-less": "3.0.1",
88
88
  "webpack": "5.88.2"
89
89
  },
90
- "packageManager": "pnpm@7.11.0",
90
+ "engines": {
91
+ "node": ">=18"
92
+ },
91
93
  "publishConfig": {
92
94
  "access": "public"
93
95
  },
94
- "gitHead": "537af074f27770e32da9da8d48490f2eda94b406"
96
+ "gitHead": "7f3059b6778b1cb8900b1d4456681b977521d45d"
95
97
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/server-dev",
3
- "version": "4.0.0-rc.10",
3
+ "version": "4.0.0-rc.12",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -42,52 +42,54 @@
42
42
  "next": "next"
43
43
  },
44
44
  "dependencies": {
45
- "@lowdefy/actions-core": "4.0.0-rc.10",
46
- "@lowdefy/api": "4.0.0-rc.10",
47
- "@lowdefy/blocks-antd": "4.0.0-rc.10",
48
- "@lowdefy/blocks-basic": "4.0.0-rc.10",
49
- "@lowdefy/blocks-color-selectors": "4.0.0-rc.10",
50
- "@lowdefy/blocks-echarts": "4.0.0-rc.10",
51
- "@lowdefy/blocks-loaders": "4.0.0-rc.10",
52
- "@lowdefy/blocks-markdown": "4.0.0-rc.10",
53
- "@lowdefy/blocks-qr": "4.0.0-rc.10",
54
- "@lowdefy/build": "4.0.0-rc.10",
55
- "@lowdefy/client": "4.0.0-rc.10",
56
- "@lowdefy/connection-axios-http": "4.0.0-rc.10",
57
- "@lowdefy/engine": "4.0.0-rc.10",
58
- "@lowdefy/helpers": "4.0.0-rc.10",
59
- "@lowdefy/layout": "4.0.0-rc.10",
60
- "@lowdefy/node-utils": "4.0.0-rc.10",
61
- "@lowdefy/operators-change-case": "4.0.0-rc.10",
62
- "@lowdefy/operators-diff": "4.0.0-rc.10",
63
- "@lowdefy/operators-js": "4.0.0-rc.10",
64
- "@lowdefy/operators-mql": "4.0.0-rc.10",
65
- "@lowdefy/operators-nunjucks": "4.0.0-rc.10",
66
- "@lowdefy/operators-uuid": "4.0.0-rc.10",
67
- "@lowdefy/operators-yaml": "4.0.0-rc.10",
68
- "@lowdefy/plugin-next-auth": "4.0.0-rc.10",
45
+ "@lowdefy/actions-core": "4.0.0-rc.12",
46
+ "@lowdefy/api": "4.0.0-rc.12",
47
+ "@lowdefy/blocks-antd": "4.0.0-rc.12",
48
+ "@lowdefy/blocks-basic": "4.0.0-rc.12",
49
+ "@lowdefy/blocks-color-selectors": "4.0.0-rc.12",
50
+ "@lowdefy/blocks-echarts": "4.0.0-rc.12",
51
+ "@lowdefy/blocks-loaders": "4.0.0-rc.12",
52
+ "@lowdefy/blocks-markdown": "4.0.0-rc.12",
53
+ "@lowdefy/blocks-qr": "4.0.0-rc.12",
54
+ "@lowdefy/build": "4.0.0-rc.12",
55
+ "@lowdefy/client": "4.0.0-rc.12",
56
+ "@lowdefy/connection-axios-http": "4.0.0-rc.12",
57
+ "@lowdefy/engine": "4.0.0-rc.12",
58
+ "@lowdefy/helpers": "4.0.0-rc.12",
59
+ "@lowdefy/layout": "4.0.0-rc.12",
60
+ "@lowdefy/node-utils": "4.0.0-rc.12",
61
+ "@lowdefy/operators-change-case": "4.0.0-rc.12",
62
+ "@lowdefy/operators-diff": "4.0.0-rc.12",
63
+ "@lowdefy/operators-js": "4.0.0-rc.12",
64
+ "@lowdefy/operators-mql": "4.0.0-rc.12",
65
+ "@lowdefy/operators-nunjucks": "4.0.0-rc.12",
66
+ "@lowdefy/operators-uuid": "4.0.0-rc.12",
67
+ "@lowdefy/operators-yaml": "4.0.0-rc.12",
68
+ "@lowdefy/plugin-next-auth": "4.0.0-rc.12",
69
69
  "chokidar": "3.5.3",
70
- "dotenv": "16.0.3",
71
- "next": "12.3.4",
72
- "next-auth": "4.20.1",
70
+ "dotenv": "16.3.1",
71
+ "next": "13.5.4",
72
+ "next-auth": "4.23.2",
73
73
  "opener": "1.5.2",
74
- "pino": "8.8.0",
74
+ "pino": "8.15.6",
75
75
  "process": "0.11.10",
76
76
  "react": "18.2.0",
77
77
  "react-dom": "18.2.0",
78
- "react-icons": "4.7.1",
79
- "swr": "2.0.0",
80
- "yaml": "2.2.2",
78
+ "react-icons": "4.11.0",
79
+ "swr": "2.2.4",
80
+ "yaml": "2.3.2",
81
81
  "yargs": "17.7.2"
82
82
  },
83
83
  "devDependencies": {
84
- "@next/eslint-plugin-next": "12.3.4",
85
- "less": "4.1.3",
86
- "less-loader": "11.1.0",
87
- "next-with-less": "2.0.5",
84
+ "@next/eslint-plugin-next": "13.5.4",
85
+ "less": "4.2.0",
86
+ "less-loader": "11.1.3",
87
+ "next-with-less": "3.0.1",
88
88
  "webpack": "5.88.2"
89
89
  },
90
- "packageManager": "pnpm@7.11.0",
90
+ "engines": {
91
+ "node": ">=18"
92
+ },
91
93
  "publishConfig": {
92
94
  "access": "public"
93
95
  }