@lowdefy/server-dev 4.0.0-alpha.34 → 4.0.0-alpha.35

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/server-dev",
3
- "version": "4.0.0-alpha.34",
3
+ "version": "4.0.0-alpha.35",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -40,30 +40,30 @@
40
40
  "next": "next"
41
41
  },
42
42
  "dependencies": {
43
- "@lowdefy/actions-core": "4.0.0-alpha.34",
44
- "@lowdefy/api": "4.0.0-alpha.34",
45
- "@lowdefy/blocks-antd": "4.0.0-alpha.34",
46
- "@lowdefy/blocks-basic": "4.0.0-alpha.34",
47
- "@lowdefy/blocks-color-selectors": "4.0.0-alpha.34",
48
- "@lowdefy/blocks-echarts": "4.0.0-alpha.34",
49
- "@lowdefy/blocks-loaders": "4.0.0-alpha.34",
50
- "@lowdefy/blocks-markdown": "4.0.0-alpha.34",
51
- "@lowdefy/blocks-qr": "4.0.0-alpha.34",
52
- "@lowdefy/build": "4.0.0-alpha.34",
53
- "@lowdefy/client": "4.0.0-alpha.34",
54
- "@lowdefy/connection-axios-http": "4.0.0-alpha.34",
55
- "@lowdefy/engine": "4.0.0-alpha.34",
56
- "@lowdefy/helpers": "4.0.0-alpha.34",
57
- "@lowdefy/layout": "4.0.0-alpha.34",
58
- "@lowdefy/node-utils": "4.0.0-alpha.34",
59
- "@lowdefy/operators-change-case": "4.0.0-alpha.34",
60
- "@lowdefy/operators-diff": "4.0.0-alpha.34",
61
- "@lowdefy/operators-js": "4.0.0-alpha.34",
62
- "@lowdefy/operators-mql": "4.0.0-alpha.34",
63
- "@lowdefy/operators-nunjucks": "4.0.0-alpha.34",
64
- "@lowdefy/operators-uuid": "4.0.0-alpha.34",
65
- "@lowdefy/operators-yaml": "4.0.0-alpha.34",
66
- "@lowdefy/plugin-next-auth": "4.0.0-alpha.34",
43
+ "@lowdefy/actions-core": "4.0.0-alpha.35",
44
+ "@lowdefy/api": "4.0.0-alpha.35",
45
+ "@lowdefy/blocks-antd": "4.0.0-alpha.35",
46
+ "@lowdefy/blocks-basic": "4.0.0-alpha.35",
47
+ "@lowdefy/blocks-color-selectors": "4.0.0-alpha.35",
48
+ "@lowdefy/blocks-echarts": "4.0.0-alpha.35",
49
+ "@lowdefy/blocks-loaders": "4.0.0-alpha.35",
50
+ "@lowdefy/blocks-markdown": "4.0.0-alpha.35",
51
+ "@lowdefy/blocks-qr": "4.0.0-alpha.35",
52
+ "@lowdefy/build": "4.0.0-alpha.35",
53
+ "@lowdefy/client": "4.0.0-alpha.35",
54
+ "@lowdefy/connection-axios-http": "4.0.0-alpha.35",
55
+ "@lowdefy/engine": "4.0.0-alpha.35",
56
+ "@lowdefy/helpers": "4.0.0-alpha.35",
57
+ "@lowdefy/layout": "4.0.0-alpha.35",
58
+ "@lowdefy/node-utils": "4.0.0-alpha.35",
59
+ "@lowdefy/operators-change-case": "4.0.0-alpha.35",
60
+ "@lowdefy/operators-diff": "4.0.0-alpha.35",
61
+ "@lowdefy/operators-js": "4.0.0-alpha.35",
62
+ "@lowdefy/operators-mql": "4.0.0-alpha.35",
63
+ "@lowdefy/operators-nunjucks": "4.0.0-alpha.35",
64
+ "@lowdefy/operators-uuid": "4.0.0-alpha.35",
65
+ "@lowdefy/operators-yaml": "4.0.0-alpha.35",
66
+ "@lowdefy/plugin-next-auth": "4.0.0-alpha.35",
67
67
  "chokidar": "3.5.3",
68
68
  "dotenv": "16.0.1",
69
69
  "next": "12.3.1",
@@ -89,5 +89,5 @@
89
89
  "publishConfig": {
90
90
  "access": "public"
91
91
  },
92
- "gitHead": "5e801532cef950b947c0069a5ba1a8f5ed6bb66f"
92
+ "gitHead": "d1cfcdb0b425ca9eb1259bdabe9cdf51df7f900c"
93
93
  }
@@ -15,16 +15,20 @@
15
15
  */
16
16
 
17
17
  import NextAuth from 'next-auth';
18
- import { getNextAuthConfig } from '@lowdefy/api';
18
+ import { createApiContext, getNextAuthConfig } from '@lowdefy/api';
19
19
 
20
20
  import authJson from '../../../build/auth.json';
21
+ import config from '../../../build/config.json';
21
22
  import adapters from '../../../build/plugins/auth/adapters.js';
22
23
  import callbacks from '../../../build/plugins/auth/callbacks.js';
23
24
  import events from '../../../build/plugins/auth/events.js';
24
25
  import providers from '../../../build/plugins/auth/providers.js';
25
26
 
26
27
  export const authOptions = getNextAuthConfig(
27
- { logger: console }, // TODO: make createApiContext synchronous
28
+ createApiContext({
29
+ config,
30
+ logger: console,
31
+ }),
28
32
  { authJson, plugins: { adapters, callbacks, events, providers } }
29
33
  );
30
34
 
@@ -15,12 +15,15 @@
15
15
  */
16
16
 
17
17
  import { createApiContext, getPageConfig } from '@lowdefy/api';
18
+
19
+ import config from '../../../build/config.json';
18
20
  import getServerSession from '../../../lib/auth/getServerSession.js';
19
21
 
20
22
  export default async function handler(req, res) {
21
23
  const session = await getServerSession({ req, res });
22
- const apiContext = await createApiContext({
24
+ const apiContext = createApiContext({
23
25
  buildDirectory: './build',
26
+ config,
24
27
  logger: console,
25
28
  session,
26
29
  });
@@ -17,6 +17,7 @@
17
17
  import { callRequest, createApiContext } from '@lowdefy/api';
18
18
  import { getSecretsFromEnv } from '@lowdefy/node-utils';
19
19
 
20
+ import config from '../../../../build/config.json';
20
21
  import connections from '../../../../build/plugins/connections.js';
21
22
  import getServerSession from '../../../../lib/auth/getServerSession.js';
22
23
  import operators from '../../../../build/plugins/operators/server.js';
@@ -27,8 +28,9 @@ export default async function handler(req, res) {
27
28
  throw new Error('Only POST requests are supported.');
28
29
  }
29
30
  const session = await getServerSession({ req, res });
30
- const apiContext = await createApiContext({
31
+ const apiContext = createApiContext({
31
32
  buildDirectory: './build',
33
+ config,
32
34
  connections,
33
35
  logger: console,
34
36
  operators,
package/pages/api/root.js CHANGED
@@ -16,12 +16,14 @@
16
16
 
17
17
  import { createApiContext, getRootConfig } from '@lowdefy/api';
18
18
 
19
+ import config from '../../build/config.json';
19
20
  import getServerSession from '../../lib/auth/getServerSession.js';
20
21
 
21
22
  export default async function handler(req, res) {
22
23
  const session = await getServerSession({ req, res });
23
- const apiContext = await createApiContext({
24
+ const apiContext = createApiContext({
24
25
  buildDirectory: './build',
26
+ config,
25
27
  logger: console,
26
28
  session,
27
29
  });