@lowdefy/server 4.0.0-alpha.13 → 4.0.0-alpha.14

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/next.config.js CHANGED
@@ -30,6 +30,7 @@ module.exports = withLess({
30
30
  // experimental: {
31
31
  // concurrentFeatures: true,
32
32
  // },
33
+ outputFileTracing: true,
33
34
  eslint: {
34
35
  ignoreDuringBuilds: true,
35
36
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/server",
3
- "version": "4.0.0-alpha.13",
3
+ "version": "4.0.0-alpha.14",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -42,17 +42,17 @@
42
42
  "next": "next"
43
43
  },
44
44
  "dependencies": {
45
- "@lowdefy/actions-core": "4.0.0-alpha.13",
46
- "@lowdefy/api": "4.0.0-alpha.13",
47
- "@lowdefy/blocks-antd": "4.0.0-alpha.13",
48
- "@lowdefy/blocks-basic": "4.0.0-alpha.13",
49
- "@lowdefy/blocks-loaders": "4.0.0-alpha.13",
50
- "@lowdefy/client": "4.0.0-alpha.13",
51
- "@lowdefy/helpers": "4.0.0-alpha.13",
52
- "@lowdefy/layout": "4.0.0-alpha.13",
53
- "@lowdefy/node-utils": "4.0.0-alpha.13",
54
- "@lowdefy/operators-js": "4.0.0-alpha.13",
55
- "@lowdefy/plugin-next-auth": "4.0.0-alpha.13",
45
+ "@lowdefy/actions-core": "4.0.0-alpha.14",
46
+ "@lowdefy/api": "4.0.0-alpha.14",
47
+ "@lowdefy/blocks-antd": "4.0.0-alpha.14",
48
+ "@lowdefy/blocks-basic": "4.0.0-alpha.14",
49
+ "@lowdefy/blocks-loaders": "4.0.0-alpha.14",
50
+ "@lowdefy/client": "4.0.0-alpha.14",
51
+ "@lowdefy/helpers": "4.0.0-alpha.14",
52
+ "@lowdefy/layout": "4.0.0-alpha.14",
53
+ "@lowdefy/node-utils": "4.0.0-alpha.14",
54
+ "@lowdefy/operators-js": "4.0.0-alpha.14",
55
+ "@lowdefy/plugin-next-auth": "4.0.0-alpha.14",
56
56
  "next": "12.1.6",
57
57
  "next-auth": "4.3.4",
58
58
  "process": "0.11.10",
@@ -61,7 +61,7 @@
61
61
  "react-icons": "4.3.1"
62
62
  },
63
63
  "devDependencies": {
64
- "@lowdefy/build": "4.0.0-alpha.13",
64
+ "@lowdefy/build": "4.0.0-alpha.14",
65
65
  "@next/eslint-plugin-next": "12.1.6",
66
66
  "less": "4.1.2",
67
67
  "less-loader": "11.0.0",
@@ -72,5 +72,5 @@
72
72
  "publishConfig": {
73
73
  "access": "public"
74
74
  },
75
- "gitHead": "e99b4b6c1f59804982fc148c0fe39dcf13b35d77"
75
+ "gitHead": "9cc0b7280c82a16689c31aaf71be278f3a40edc6"
76
76
  }
package/pages/404.js CHANGED
@@ -13,13 +13,14 @@
13
13
  See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  */
16
-
16
+ import path from 'path';
17
17
  import { createApiContext, getPageConfig, getRootConfig } from '@lowdefy/api';
18
18
 
19
19
  import Page from '../lib/Page.js';
20
20
 
21
21
  export async function getStaticProps() {
22
- const apiContext = await createApiContext({ buildDirectory: './build' });
22
+ // Important to give absolute path so Next can trace build files
23
+ const apiContext = await createApiContext({ buildDirectory: path.join(process.cwd(), 'build') });
23
24
 
24
25
  const [rootConfig, pageConfig] = await Promise.all([
25
26
  getRootConfig(apiContext),
package/pages/[pageId].js CHANGED
@@ -14,6 +14,7 @@
14
14
  limitations under the License.
15
15
  */
16
16
 
17
+ import path from 'path';
17
18
  import { createApiContext, getPageConfig, getRootConfig } from '@lowdefy/api';
18
19
 
19
20
  import getServerSession from '../lib/auth/getServerSession.js';
@@ -22,8 +23,9 @@ import Page from '../lib/Page.js';
22
23
  export async function getServerSideProps(context) {
23
24
  const { pageId } = context.params;
24
25
  const session = await getServerSession(context);
26
+ // Important to give absolute path so Next can trace build files
25
27
  const apiContext = await createApiContext({
26
- buildDirectory: './build',
28
+ buildDirectory: path.join(process.cwd(), 'build'),
27
29
  logger: console,
28
30
  session,
29
31
  });
@@ -14,6 +14,7 @@
14
14
  limitations under the License.
15
15
  */
16
16
 
17
+ import path from 'path';
17
18
  import { callRequest, createApiContext } from '@lowdefy/api';
18
19
  import { getSecretsFromEnv } from '@lowdefy/node-utils';
19
20
 
@@ -28,8 +29,9 @@ export default async function handler(req, res) {
28
29
  throw new Error('Only POST requests are supported.');
29
30
  }
30
31
  const session = await getServerSession({ req });
32
+ // Important to give absolute path so Next can trace build files
31
33
  const apiContext = await createApiContext({
32
- buildDirectory: './build',
34
+ buildDirectory: path.join(process.cwd(), 'build'),
33
35
  connections,
34
36
  // logger: console,
35
37
  logger: { debug: () => {} },
package/pages/index.js CHANGED
@@ -14,6 +14,7 @@
14
14
  limitations under the License.
15
15
  */
16
16
 
17
+ import path from 'path';
17
18
  import { createApiContext, getPageConfig, getRootConfig } from '@lowdefy/api';
18
19
 
19
20
  import getServerSession from '../lib/auth/getServerSession.js';
@@ -22,8 +23,9 @@ import Page from '../lib/Page.js';
22
23
  export async function getServerSideProps(context) {
23
24
  const session = await getServerSession(context);
24
25
 
26
+ // Important to give absolute path so Next can trace build files
25
27
  const apiContext = await createApiContext({
26
- buildDirectory: './build',
28
+ buildDirectory: path.join(process.cwd(), 'build'),
27
29
  logger: console,
28
30
  session,
29
31
  });