@lowdefy/api 4.0.0-rc.0 → 4.0.0-rc.2
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/dist/context/createApiContext.js +2 -2
- package/dist/context/createAuthorize.js +1 -1
- package/dist/context/createReadConfigFile.js +1 -1
- package/dist/context/errors.js +1 -1
- package/dist/index.js +1 -1
- package/dist/routes/auth/callbacks/addUserFieldsToSession.js +1 -1
- package/dist/routes/auth/callbacks/addUserFieldsToToken.js +1 -1
- package/dist/routes/auth/callbacks/createCallbackPlugins.js +1 -1
- package/dist/routes/auth/callbacks/createCallbacks.js +1 -1
- package/dist/routes/auth/callbacks/createJWTCallback.js +2 -2
- package/dist/routes/auth/callbacks/createRedirectCallback.js +1 -1
- package/dist/routes/auth/callbacks/createSessionCallback.js +2 -2
- package/dist/routes/auth/callbacks/createSignInCallback.js +1 -1
- package/dist/routes/auth/createAdapter.js +1 -1
- package/dist/routes/auth/createProviders.js +1 -1
- package/dist/routes/auth/events/createCreateUserEvent.js +1 -1
- package/dist/routes/auth/events/createEventPlugins.js +1 -1
- package/dist/routes/auth/events/createEvents.js +1 -1
- package/dist/routes/auth/events/createLinkAccountEvent.js +1 -1
- package/dist/routes/auth/events/createSessionEvent.js +1 -1
- package/dist/routes/auth/events/createSignInEvent.js +1 -1
- package/dist/routes/auth/events/createSignOutEvent.js +1 -1
- package/dist/routes/auth/events/createUpdateUserEvent.js +1 -1
- package/dist/routes/auth/getNextAuthConfig.js +1 -1
- package/dist/routes/page/getPageConfig.js +1 -1
- package/dist/routes/request/authorizeRequest.js +1 -1
- package/dist/routes/request/callRequest.js +1 -1
- package/dist/routes/request/callRequestResolver.js +1 -1
- package/dist/routes/request/checkConnectionRead.js +1 -1
- package/dist/routes/request/checkConnectionWrite.js +1 -1
- package/dist/routes/request/evaluateOperators.js +1 -1
- package/dist/routes/request/getConnection.js +1 -1
- package/dist/routes/request/getConnectionConfig.js +1 -1
- package/dist/routes/request/getRequestConfig.js +1 -1
- package/dist/routes/request/getRequestResolver.js +1 -1
- package/dist/routes/request/validateSchemas.js +1 -1
- package/dist/routes/rootConfig/getHomeAndMenus.js +1 -1
- package/dist/routes/rootConfig/getLowdefyGlobal.js +1 -1
- package/dist/routes/rootConfig/getRootConfig.js +2 -2
- package/dist/routes/rootConfig/menus/filterMenuList.js +1 -1
- package/dist/routes/rootConfig/menus/filterMenus.js +1 -1
- package/dist/routes/rootConfig/menus/getMenus.js +1 -1
- package/dist/test/testContext.js +2 -2
- package/package.json +11 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import createAuthorize from './createAuthorize.js';
|
|
16
16
|
import createReadConfigFile from './createReadConfigFile.js';
|
|
17
|
-
function createApiContext({ buildDirectory , config , connections , fileCache , logger , operators , secrets , session
|
|
17
|
+
function createApiContext({ buildDirectory , config , connections , fileCache , logger , operators , secrets , session }) {
|
|
18
18
|
const readConfigFile = createReadConfigFile({
|
|
19
19
|
buildDirectory,
|
|
20
20
|
fileCache
|
package/dist/context/errors.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -22,7 +22,7 @@ function createJWTCallback(context, { authConfig , plugins }) {
|
|
|
22
22
|
});
|
|
23
23
|
async function jwtCallback({ token , user , account , profile , isNewUser }) {
|
|
24
24
|
if (profile) {
|
|
25
|
-
const { sub , name , given_name , family_name , middle_name , nickname , preferred_username , profile: profile_claim , picture , website , email , email_verified , gender , birthdate , zoneinfo , locale , phone_number , phone_number_verified , address , updated_at
|
|
25
|
+
const { sub , name , given_name , family_name , middle_name , nickname , preferred_username , profile: profile_claim , picture , website , email , email_verified , gender , birthdate , zoneinfo , locale , phone_number , phone_number_verified , address , updated_at } = profile;
|
|
26
26
|
token = {
|
|
27
27
|
sub,
|
|
28
28
|
name,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -22,7 +22,7 @@ function createSessionCallback(context, { authConfig , plugins }) {
|
|
|
22
22
|
});
|
|
23
23
|
async function sessionCallback({ session , token , user }) {
|
|
24
24
|
if (token) {
|
|
25
|
-
const { sub , name , given_name , family_name , middle_name , nickname , preferred_username , profile , picture , website , email , email_verified , gender , birthdate , zoneinfo , locale , phone_number , phone_number_verified , address , updated_at
|
|
25
|
+
const { sub , name , given_name , family_name , middle_name , nickname , preferred_username , profile , picture , website , email , email_verified , gender , birthdate , zoneinfo , locale , phone_number , phone_number_verified , address , updated_at } = token;
|
|
26
26
|
session.user = {
|
|
27
27
|
sub,
|
|
28
28
|
name,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -17,7 +17,7 @@ import getLowdefyGlobal from './getLowdefyGlobal.js';
|
|
|
17
17
|
async function getRootConfig(context) {
|
|
18
18
|
const [lowdefyGlobal, { home , menus }] = await Promise.all([
|
|
19
19
|
getLowdefyGlobal(context),
|
|
20
|
-
getHomeAndMenus(context)
|
|
20
|
+
getHomeAndMenus(context)
|
|
21
21
|
]);
|
|
22
22
|
return {
|
|
23
23
|
home,
|
package/dist/test/testContext.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -20,7 +20,7 @@ function testContext({ config ={} , connections ={} , headers ={} , host ='host'
|
|
|
20
20
|
warn: ()=>{}
|
|
21
21
|
} , operators ={
|
|
22
22
|
_test: ()=>'test'
|
|
23
|
-
} , readConfigFile , secrets ={} , setHeader , session , protocol ='https'
|
|
23
|
+
} , readConfigFile , secrets ={} , setHeader , session , protocol ='https' } = {}) {
|
|
24
24
|
return {
|
|
25
25
|
authorize: createAuthorize({
|
|
26
26
|
session
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/api",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -40,22 +40,22 @@
|
|
|
40
40
|
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@lowdefy/ajv": "4.0.0-rc.
|
|
44
|
-
"@lowdefy/helpers": "4.0.0-rc.
|
|
45
|
-
"@lowdefy/node-utils": "4.0.0-rc.
|
|
46
|
-
"@lowdefy/nunjucks": "4.0.0-rc.
|
|
47
|
-
"@lowdefy/operators": "4.0.0-rc.
|
|
48
|
-
"@lowdefy/operators-js": "4.0.0-rc.
|
|
43
|
+
"@lowdefy/ajv": "4.0.0-rc.2",
|
|
44
|
+
"@lowdefy/helpers": "4.0.0-rc.2",
|
|
45
|
+
"@lowdefy/node-utils": "4.0.0-rc.2",
|
|
46
|
+
"@lowdefy/nunjucks": "4.0.0-rc.2",
|
|
47
|
+
"@lowdefy/operators": "4.0.0-rc.2",
|
|
48
|
+
"@lowdefy/operators-js": "4.0.0-rc.2"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@jest/globals": "28.1.0",
|
|
52
|
-
"@swc/cli": "0.1.
|
|
53
|
-
"@swc/core": "1.
|
|
54
|
-
"@swc/jest": "0.2.
|
|
52
|
+
"@swc/cli": "0.1.59",
|
|
53
|
+
"@swc/core": "1.3.24",
|
|
54
|
+
"@swc/jest": "0.2.24",
|
|
55
55
|
"jest": "28.1.0"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "ac0dec732efb3b3cb06c82941d8f829c9fa65dff"
|
|
61
61
|
}
|