@lowdefy/server 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 +14 -14
- package/pages/404.js +5 -1
- package/pages/[pageId].js +3 -1
- package/pages/api/auth/[...nextauth].js +6 -2
- package/pages/api/request/[pageId]/[requestId].js +4 -3
- package/pages/index.js +3 -1
- package/public/.DS_Store +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/server",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.35",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -43,17 +43,17 @@
|
|
|
43
43
|
"next": "next"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@lowdefy/actions-core": "4.0.0-alpha.
|
|
47
|
-
"@lowdefy/api": "4.0.0-alpha.
|
|
48
|
-
"@lowdefy/blocks-antd": "4.0.0-alpha.
|
|
49
|
-
"@lowdefy/blocks-basic": "4.0.0-alpha.
|
|
50
|
-
"@lowdefy/blocks-loaders": "4.0.0-alpha.
|
|
51
|
-
"@lowdefy/client": "4.0.0-alpha.
|
|
52
|
-
"@lowdefy/helpers": "4.0.0-alpha.
|
|
53
|
-
"@lowdefy/layout": "4.0.0-alpha.
|
|
54
|
-
"@lowdefy/node-utils": "4.0.0-alpha.
|
|
55
|
-
"@lowdefy/operators-js": "4.0.0-alpha.
|
|
56
|
-
"@lowdefy/plugin-next-auth": "4.0.0-alpha.
|
|
46
|
+
"@lowdefy/actions-core": "4.0.0-alpha.35",
|
|
47
|
+
"@lowdefy/api": "4.0.0-alpha.35",
|
|
48
|
+
"@lowdefy/blocks-antd": "4.0.0-alpha.35",
|
|
49
|
+
"@lowdefy/blocks-basic": "4.0.0-alpha.35",
|
|
50
|
+
"@lowdefy/blocks-loaders": "4.0.0-alpha.35",
|
|
51
|
+
"@lowdefy/client": "4.0.0-alpha.35",
|
|
52
|
+
"@lowdefy/helpers": "4.0.0-alpha.35",
|
|
53
|
+
"@lowdefy/layout": "4.0.0-alpha.35",
|
|
54
|
+
"@lowdefy/node-utils": "4.0.0-alpha.35",
|
|
55
|
+
"@lowdefy/operators-js": "4.0.0-alpha.35",
|
|
56
|
+
"@lowdefy/plugin-next-auth": "4.0.0-alpha.35",
|
|
57
57
|
"next": "12.3.1",
|
|
58
58
|
"next-auth": "4.10.3",
|
|
59
59
|
"process": "0.11.10",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"react-icons": "4.3.1"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@lowdefy/build": "4.0.0-alpha.
|
|
65
|
+
"@lowdefy/build": "4.0.0-alpha.35",
|
|
66
66
|
"@next/eslint-plugin-next": "12.1.6",
|
|
67
67
|
"less": "4.1.2",
|
|
68
68
|
"less-loader": "11.0.0",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "d1cfcdb0b425ca9eb1259bdabe9cdf51df7f900c"
|
|
79
79
|
}
|
package/pages/404.js
CHANGED
|
@@ -16,11 +16,15 @@
|
|
|
16
16
|
import path from 'path';
|
|
17
17
|
import { createApiContext, getPageConfig, getRootConfig } from '@lowdefy/api';
|
|
18
18
|
|
|
19
|
+
import config from '../build/config.json';
|
|
19
20
|
import Page from '../lib/Page.js';
|
|
20
21
|
|
|
21
22
|
export async function getStaticProps() {
|
|
22
23
|
// Important to give absolute path so Next can trace build files
|
|
23
|
-
const apiContext =
|
|
24
|
+
const apiContext = createApiContext({
|
|
25
|
+
buildDirectory: path.join(process.cwd(), 'build'),
|
|
26
|
+
config,
|
|
27
|
+
});
|
|
24
28
|
|
|
25
29
|
const [rootConfig, pageConfig] = await Promise.all([
|
|
26
30
|
getRootConfig(apiContext),
|
package/pages/[pageId].js
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
import path from 'path';
|
|
18
18
|
import { createApiContext, getPageConfig, getRootConfig } from '@lowdefy/api';
|
|
19
19
|
|
|
20
|
+
import config from '../build/config.json';
|
|
20
21
|
import getServerSession from '../lib/auth/getServerSession.js';
|
|
21
22
|
import Page from '../lib/Page.js';
|
|
22
23
|
|
|
@@ -24,8 +25,9 @@ export async function getServerSideProps(context) {
|
|
|
24
25
|
const { pageId } = context.params;
|
|
25
26
|
const session = await getServerSession(context);
|
|
26
27
|
// Important to give absolute path so Next can trace build files
|
|
27
|
-
const apiContext =
|
|
28
|
+
const apiContext = createApiContext({
|
|
28
29
|
buildDirectory: path.join(process.cwd(), 'build'),
|
|
30
|
+
config,
|
|
29
31
|
logger: console,
|
|
30
32
|
session,
|
|
31
33
|
});
|
|
@@ -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
|
-
{
|
|
28
|
+
createApiContext({
|
|
29
|
+
config,
|
|
30
|
+
logger: console,
|
|
31
|
+
}),
|
|
28
32
|
{ authJson, plugins: { adapters, callbacks, events, providers } }
|
|
29
33
|
);
|
|
30
34
|
|
|
@@ -18,9 +18,9 @@ import path from 'path';
|
|
|
18
18
|
import { callRequest, createApiContext } from '@lowdefy/api';
|
|
19
19
|
import { getSecretsFromEnv } from '@lowdefy/node-utils';
|
|
20
20
|
|
|
21
|
-
import
|
|
22
|
-
|
|
21
|
+
import config from '../../../../build/config.json';
|
|
23
22
|
import connections from '../../../../build/plugins/connections.js';
|
|
23
|
+
import getServerSession from '../../../../lib/auth/getServerSession.js';
|
|
24
24
|
import operators from '../../../../build/plugins/operators/server.js';
|
|
25
25
|
|
|
26
26
|
export default async function handler(req, res) {
|
|
@@ -30,8 +30,9 @@ export default async function handler(req, res) {
|
|
|
30
30
|
}
|
|
31
31
|
const session = await getServerSession({ req, res });
|
|
32
32
|
// Important to give absolute path so Next can trace build files
|
|
33
|
-
const apiContext =
|
|
33
|
+
const apiContext = createApiContext({
|
|
34
34
|
buildDirectory: path.join(process.cwd(), 'build'),
|
|
35
|
+
config,
|
|
35
36
|
connections,
|
|
36
37
|
// logger: console,
|
|
37
38
|
logger: { debug: () => {} },
|
package/pages/index.js
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
import path from 'path';
|
|
18
18
|
import { createApiContext, getPageConfig, getRootConfig } from '@lowdefy/api';
|
|
19
19
|
|
|
20
|
+
import config from '../build/config.json';
|
|
20
21
|
import getServerSession from '../lib/auth/getServerSession.js';
|
|
21
22
|
import Page from '../lib/Page.js';
|
|
22
23
|
|
|
@@ -24,8 +25,9 @@ export async function getServerSideProps(context) {
|
|
|
24
25
|
const session = await getServerSession(context);
|
|
25
26
|
|
|
26
27
|
// Important to give absolute path so Next can trace build files
|
|
27
|
-
const apiContext =
|
|
28
|
+
const apiContext = createApiContext({
|
|
28
29
|
buildDirectory: path.join(process.cwd(), 'build'),
|
|
30
|
+
config,
|
|
29
31
|
logger: console,
|
|
30
32
|
session,
|
|
31
33
|
});
|
package/public/.DS_Store
ADDED
|
Binary file
|