@lowdefy/server-dev 3.23.2 → 4.0.0-alpha.8

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/.eslintrc.yaml ADDED
@@ -0,0 +1 @@
1
+ extends: 'plugin:@next/next/core-web-vitals'
package/README.md CHANGED
@@ -1,29 +1,5 @@
1
1
  # @lowdefy/server-dev
2
2
 
3
- A Lowdefy server for local development.
4
-
5
- The server consists of a Lowdefy Graphql server, and a static file server to serve the web client shell. The web shell is a minimal react app, that loads a Lowdefy renderer using [webpack module federation](https://webpack.js.org/concepts/module-federation/).
6
-
7
- > If you wish to develop a Lowdefy app, use the development server in the [CLI](https://docs.lowdefy.com/cli). The code for the CLI can be found [here](https://github.com/lowdefy/lowdefy/tree/main/packages/cli)
8
-
9
- ## Running a development server
10
-
11
- - Build the repository in development mode by running `yarn build:dev` at the root of the repository.
12
- - Create a `lowdefy.yaml` file in the root of the package directory, and build this configuration with the cli using `lowdefy build`.
13
- - Build the dev server using `yarn build`.
14
- - Run the dev server using `yarn start`.
15
- - Run a [`@lowdefy/renderer`](https://github.com/lowdefy/lowdefy/tree/main/packages/renderer) server at port 3001 using `yarn start` or `yarn serve`.
16
-
17
- To make changes to the server, you need to run `yarn build` in dependencies that have changed (like `@lowdefy/graphql`), and then run `yarn build`.
18
-
19
- ## More Lowdefy resources
20
-
21
- - Getting started with Lowdefy - https://docs.lowdefy.com/tutorial-start
22
- - Lowdefy docs - https://docs.lowdefy.com
23
- - Lowdefy website - https://lowdefy.com
24
- - Community forum - https://github.com/lowdefy/lowdefy/discussions
25
- - Bug reports and feature requests - https://github.com/lowdefy/lowdefy/issues
26
-
27
3
  ## Licence
28
4
 
29
5
  [Apache-2.0](https://github.com/lowdefy/lowdefy/blob/main/LICENSE)
package/next.config.js ADDED
@@ -0,0 +1,36 @@
1
+ const withLess = require('next-with-less');
2
+ const lowdefyConfig = require('./build/config.json');
3
+
4
+ module.exports = withLess({
5
+ lessLoaderOptions: {
6
+ lessOptions: {
7
+ modifyVars: lowdefyConfig.theme.lessVariables,
8
+ },
9
+ },
10
+ basePath: process.env.LOWDEFY_BASE_PATH || lowdefyConfig.basePath,
11
+ // reactStrictMode: true,
12
+ webpack: (config, { isServer }) => {
13
+ if (!isServer) {
14
+ config.resolve.fallback = {
15
+ assert: false,
16
+ buffer: false,
17
+ crypto: false,
18
+ events: false,
19
+ fs: false,
20
+ path: false,
21
+ process: false,
22
+ util: false,
23
+ };
24
+ }
25
+ return config;
26
+ },
27
+ swcMinify: true,
28
+ compress: false,
29
+ outputFileTracing: false,
30
+ poweredByHeader: false,
31
+ generateEtags: false,
32
+ optimizeFonts: false,
33
+ eslint: {
34
+ ignoreDuringBuilds: true,
35
+ },
36
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/server-dev",
3
- "version": "3.23.2",
3
+ "version": "4.0.0-alpha.8",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -26,47 +26,58 @@
26
26
  "url": "https://github.com/lowdefy/lowdefy.git"
27
27
  },
28
28
  "files": [
29
- "dist/*"
29
+ "src/*",
30
+ "public/*",
31
+ "next.config.js",
32
+ ".eslintrc.yaml"
30
33
  ],
31
34
  "scripts": {
32
- "babel": "babel src --out-dir dist",
33
- "build": "yarn babel",
34
- "clean": "rm -rf dist && rm -rf .lowdefy",
35
- "prepare": "yarn build",
36
- "start": "nodemon dist/server.js"
35
+ "start": "node manager/run.mjs",
36
+ "lint": "next lint",
37
+ "next": "next"
37
38
  },
38
39
  "dependencies": {
39
- "@lowdefy/graphql": "3.23.2",
40
- "@lowdefy/node-utils": "3.23.2",
41
- "@lowdefy/server": "3.23.2",
42
- "@lowdefy/shell": "3.23.2",
43
- "apollo-server-express": "2.25.0",
44
- "dotenv": "10.0.0",
45
- "express": "4.17.1",
46
- "graphql": "15.5.0"
47
- },
48
- "devDependencies": {
49
- "@babel/cli": "7.14.3",
50
- "@babel/core": "7.14.3",
51
- "@babel/preset-env": "7.14.4",
52
- "@babel/preset-react": "7.13.13",
53
- "@lowdefy/block-tools": "3.23.2",
54
- "babel-jest": "26.6.3",
55
- "babel-loader": "8.2.2",
56
- "clean-webpack-plugin": "3.0.0",
57
- "copy-webpack-plugin": "9.0.0",
58
- "css-loader": "5.2.6",
59
- "html-webpack-plugin": "5.3.1",
60
- "jest": "26.6.3",
61
- "nodemon": "2.0.7",
40
+ "@lowdefy/api": "4.0.0-alpha.8",
41
+ "@lowdefy/block-utils": "4.0.0-alpha.8",
42
+ "@lowdefy/blocks-antd": "4.0.0-alpha.8",
43
+ "@lowdefy/blocks-basic": "4.0.0-alpha.8",
44
+ "@lowdefy/blocks-color-selectors": "4.0.0-alpha.8",
45
+ "@lowdefy/blocks-echarts": "4.0.0-alpha.8",
46
+ "@lowdefy/blocks-loaders": "4.0.0-alpha.8",
47
+ "@lowdefy/blocks-markdown": "4.0.0-alpha.8",
48
+ "@lowdefy/build": "4.0.0-alpha.8",
49
+ "@lowdefy/connection-axios-http": "4.0.0-alpha.8",
50
+ "@lowdefy/engine": "4.0.0-alpha.8",
51
+ "@lowdefy/helpers": "4.0.0-alpha.8",
52
+ "@lowdefy/layout": "4.0.0-alpha.8",
53
+ "@lowdefy/node-utils": "4.0.0-alpha.8",
54
+ "@lowdefy/operators-change-case": "4.0.0-alpha.8",
55
+ "@lowdefy/operators-diff": "4.0.0-alpha.8",
56
+ "@lowdefy/operators-js": "4.0.0-alpha.8",
57
+ "@lowdefy/operators-mql": "4.0.0-alpha.8",
58
+ "@lowdefy/operators-nunjucks": "4.0.0-alpha.8",
59
+ "@lowdefy/operators-uuid": "4.0.0-alpha.8",
60
+ "@lowdefy/operators-yaml": "4.0.0-alpha.8",
61
+ "chokidar": "3.5.3",
62
+ "dotenv": "15.0.0",
63
+ "next": "12.0.10",
64
+ "next-auth": "4.1.2",
65
+ "opener": "1.5.2",
62
66
  "react": "17.0.2",
63
67
  "react-dom": "17.0.2",
64
- "style-loader": "2.0.0",
65
- "webpack": "5.38.1",
66
- "webpack-cli": "4.7.0"
68
+ "react-icons": "4.3.1",
69
+ "swr": "1.1.2",
70
+ "yaml": "2.0.0-10",
71
+ "yargs": "17.3.1"
72
+ },
73
+ "devDependencies": {
74
+ "@next/eslint-plugin-next": "12.0.10",
75
+ "less": "4.1.2",
76
+ "less-loader": "10.2.0",
77
+ "next-with-less": "2.0.4"
67
78
  },
68
79
  "publishConfig": {
69
80
  "access": "public"
70
81
  },
71
- "gitHead": "4c30d3cdfa99ae4e90fc891825938c28bad45760"
82
+ "gitHead": "9d56b83cf45e868afe3a1eeba750fe826eb74c8c"
72
83
  }
Binary file
Binary file
Binary file
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg width="100%" height="100%" viewBox="0 0 94 94" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
4
+ <g transform="matrix(1,0,0,1,-979.672,-59.6924)">
5
+ <g transform="matrix(1,0,0,1.03297,-38.3284,-294.615)">
6
+ <g transform="matrix(1,0,0,1,952,232)">
7
+ <path d="M160,129.634C160,119.35 151.375,111 140.751,111L85.249,111C74.625,111 66,119.35 66,129.634L66,183.366C66,193.65 74.625,202 85.249,202L140.751,202C151.375,202 160,193.65 160,183.366L160,129.634Z"/>
8
+ </g>
9
+ <g transform="matrix(0.872141,0,0,1,1002.6,346)">
10
+ <rect x="36" y="12" width="36" height="59" style="fill:white;"/>
11
+ </g>
12
+ <g transform="matrix(0.78125,0,0,0.862069,1010.84,356.663)">
13
+ <rect x="77" y="41" width="32" height="29" style="fill:rgb(24,144,255);"/>
14
+ </g>
15
+ </g>
16
+ </g>
17
+ </svg>
Binary file
Binary file
@@ -0,0 +1,16 @@
1
+ {
2
+ "short_name": "Lowdefy App",
3
+ "name": "Lowdefy App",
4
+ "description": "Lowdefy App",
5
+ "icons": [
6
+ {
7
+ "src": "/public/icon-512.png",
8
+ "type": "image/png",
9
+ "sizes": "512x512"
10
+ }
11
+ ],
12
+ "start_url": "/",
13
+ "background_color": "#FFFFFF",
14
+ "display": "browser",
15
+ "scope": "/"
16
+ }
package/dist/server.js DELETED
@@ -1,47 +0,0 @@
1
- "use strict";
2
-
3
- var _dotenv = _interopRequireDefault(require("dotenv"));
4
-
5
- var _server = _interopRequireDefault(require("@lowdefy/server"));
6
-
7
- var _shell = require("@lowdefy/shell");
8
-
9
- var _nodeUtils = require("@lowdefy/node-utils");
10
-
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
-
13
- /*
14
- Copyright 2020-2021 Lowdefy, Inc
15
-
16
- Licensed under the Apache License, Version 2.0 (the "License");
17
- you may not use this file except in compliance with the License.
18
- You may obtain a copy of the License at
19
-
20
- http://www.apache.org/licenses/LICENSE-2.0
21
-
22
- Unless required by applicable law or agreed to in writing, software
23
- distributed under the License is distributed on an "AS IS" BASIS,
24
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25
- See the License for the specific language governing permissions and
26
- limitations under the License.
27
- */
28
- _dotenv.default.config({
29
- silent: true
30
- });
31
-
32
- var buildDirectory = process.env.LOWDEFY_SERVER_BUILD_DIRECTORY || './.lowdefy/build';
33
- var publicDirectory = process.env.LOWDEFY_SERVER_PUBLIC_DIRECTORY || _shell.publicDirectory;
34
- var port = parseInt(process.env.LOWDEFY_SERVER_PORT) || 3000;
35
- var serverBasePath = process.env.LOWDEFY_SERVER_BASE_PATH || '';
36
- var server = (0, _server.default)({
37
- buildDirectory,
38
- development: true,
39
- getSecrets: (0, _nodeUtils.createGetSecretsFromEnv)(),
40
- logger: console,
41
- publicDirectory,
42
- serverBasePath,
43
- shellDirectory: _shell.shellDirectory
44
- });
45
- server.listen({
46
- port
47
- }, () => console.log("\uD83D\uDE80 Server ready at http://localhost:".concat(port).concat(serverBasePath !== '' ? "/".concat(serverBasePath) : serverBasePath)));