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

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.
@@ -0,0 +1,20 @@
1
+ /*
2
+ Copyright 2020-2022 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
+ export default {
18
+ get: () => undefined,
19
+ set: () => undefined,
20
+ };
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.36",
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.36",
44
+ "@lowdefy/api": "4.0.0-alpha.36",
45
+ "@lowdefy/blocks-antd": "4.0.0-alpha.36",
46
+ "@lowdefy/blocks-basic": "4.0.0-alpha.36",
47
+ "@lowdefy/blocks-color-selectors": "4.0.0-alpha.36",
48
+ "@lowdefy/blocks-echarts": "4.0.0-alpha.36",
49
+ "@lowdefy/blocks-loaders": "4.0.0-alpha.36",
50
+ "@lowdefy/blocks-markdown": "4.0.0-alpha.36",
51
+ "@lowdefy/blocks-qr": "4.0.0-alpha.36",
52
+ "@lowdefy/build": "4.0.0-alpha.36",
53
+ "@lowdefy/client": "4.0.0-alpha.36",
54
+ "@lowdefy/connection-axios-http": "4.0.0-alpha.36",
55
+ "@lowdefy/engine": "4.0.0-alpha.36",
56
+ "@lowdefy/helpers": "4.0.0-alpha.36",
57
+ "@lowdefy/layout": "4.0.0-alpha.36",
58
+ "@lowdefy/node-utils": "4.0.0-alpha.36",
59
+ "@lowdefy/operators-change-case": "4.0.0-alpha.36",
60
+ "@lowdefy/operators-diff": "4.0.0-alpha.36",
61
+ "@lowdefy/operators-js": "4.0.0-alpha.36",
62
+ "@lowdefy/operators-mql": "4.0.0-alpha.36",
63
+ "@lowdefy/operators-nunjucks": "4.0.0-alpha.36",
64
+ "@lowdefy/operators-uuid": "4.0.0-alpha.36",
65
+ "@lowdefy/operators-yaml": "4.0.0-alpha.36",
66
+ "@lowdefy/plugin-next-auth": "4.0.0-alpha.36",
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": "d4b0fa0998d56ee812cb08d9676515cbac84a9cf"
93
93
  }
@@ -15,16 +15,22 @@
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';
25
+ import fileCache from '../../../lib/fileCache.js';
24
26
  import providers from '../../../build/plugins/auth/providers.js';
25
27
 
26
28
  export const authOptions = getNextAuthConfig(
27
- { logger: console }, // TODO: make createApiContext synchronous
29
+ createApiContext({
30
+ config,
31
+ fileCache,
32
+ logger: console,
33
+ }),
28
34
  { authJson, plugins: { adapters, callbacks, events, providers } }
29
35
  );
30
36
 
@@ -15,12 +15,17 @@
15
15
  */
16
16
 
17
17
  import { createApiContext, getPageConfig } from '@lowdefy/api';
18
+
19
+ import config from '../../../build/config.json';
20
+ import fileCache from '../../../lib/fileCache.js';
18
21
  import getServerSession from '../../../lib/auth/getServerSession.js';
19
22
 
20
23
  export default async function handler(req, res) {
21
24
  const session = await getServerSession({ req, res });
22
- const apiContext = await createApiContext({
25
+ const apiContext = createApiContext({
23
26
  buildDirectory: './build',
27
+ config,
28
+ fileCache,
24
29
  logger: console,
25
30
  session,
26
31
  });
@@ -17,7 +17,9 @@
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';
22
+ import fileCache from '../../../../lib/fileCache.js';
21
23
  import getServerSession from '../../../../lib/auth/getServerSession.js';
22
24
  import operators from '../../../../build/plugins/operators/server.js';
23
25
 
@@ -27,9 +29,11 @@ export default async function handler(req, res) {
27
29
  throw new Error('Only POST requests are supported.');
28
30
  }
29
31
  const session = await getServerSession({ req, res });
30
- const apiContext = await createApiContext({
32
+ const apiContext = createApiContext({
31
33
  buildDirectory: './build',
34
+ config,
32
35
  connections,
36
+ fileCache,
33
37
  logger: console,
34
38
  operators,
35
39
  secrets: getSecretsFromEnv(),
package/pages/api/root.js CHANGED
@@ -16,12 +16,16 @@
16
16
 
17
17
  import { createApiContext, getRootConfig } from '@lowdefy/api';
18
18
 
19
+ import config from '../../build/config.json';
20
+ import fileCache from '../../lib/fileCache.js';
19
21
  import getServerSession from '../../lib/auth/getServerSession.js';
20
22
 
21
23
  export default async function handler(req, res) {
22
24
  const session = await getServerSession({ req, res });
23
- const apiContext = await createApiContext({
25
+ const apiContext = createApiContext({
24
26
  buildDirectory: './build',
27
+ config,
28
+ fileCache,
25
29
  logger: console,
26
30
  session,
27
31
  });