@lowdefy/api 4.5.2 → 4.6.0

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.
Files changed (67) hide show
  1. package/dist/context/createApiContext.js +1 -1
  2. package/dist/context/createAuthorize.js +8 -4
  3. package/dist/context/createEvaluateOperators.js +16 -2
  4. package/dist/context/createReadConfigFile.js +3 -3
  5. package/dist/index.js +4 -3
  6. package/dist/routes/auth/callbacks/addUserFieldsToSession.js +1 -1
  7. package/dist/routes/auth/callbacks/addUserFieldsToToken.js +1 -1
  8. package/dist/routes/auth/callbacks/createCallbackPlugins.js +1 -1
  9. package/dist/routes/auth/callbacks/createCallbacks.js +1 -1
  10. package/dist/routes/auth/callbacks/createJWTCallback.js +1 -1
  11. package/dist/routes/auth/callbacks/createRedirectCallback.js +1 -1
  12. package/dist/routes/auth/callbacks/createSessionCallback.js +1 -1
  13. package/dist/routes/auth/callbacks/createSignInCallback.js +1 -1
  14. package/dist/routes/auth/createAdapter.js +1 -1
  15. package/dist/routes/auth/createLogger.js +21 -17
  16. package/dist/routes/auth/createProviders.js +1 -1
  17. package/dist/routes/auth/events/createCreateUserEvent.js +1 -1
  18. package/dist/routes/auth/events/createEventPlugins.js +1 -1
  19. package/dist/routes/auth/events/createEvents.js +1 -1
  20. package/dist/routes/auth/events/createLinkAccountEvent.js +1 -1
  21. package/dist/routes/auth/events/createSessionEvent.js +1 -1
  22. package/dist/routes/auth/events/createSignInEvent.js +1 -1
  23. package/dist/routes/auth/events/createSignOutEvent.js +1 -1
  24. package/dist/routes/auth/events/createUpdateUserEvent.js +1 -1
  25. package/dist/routes/auth/getNextAuthConfig.js +2 -2
  26. package/dist/routes/endpoints/addStepResult.js +1 -1
  27. package/dist/routes/endpoints/authorizeApiEndpoint.js +3 -3
  28. package/dist/routes/endpoints/callEndpoint.js +1 -1
  29. package/dist/routes/endpoints/control/controlFor.js +11 -7
  30. package/dist/routes/endpoints/control/controlIf.js +4 -4
  31. package/dist/routes/endpoints/control/controlLog.js +11 -6
  32. package/dist/routes/endpoints/control/controlParallel.js +1 -1
  33. package/dist/routes/endpoints/control/controlParallelFor.js +11 -7
  34. package/dist/routes/endpoints/control/controlReject.js +4 -3
  35. package/dist/routes/endpoints/control/controlReturn.js +2 -2
  36. package/dist/routes/endpoints/control/controlSetState.js +1 -1
  37. package/dist/routes/endpoints/control/controlSwitch.js +4 -4
  38. package/dist/routes/endpoints/control/controlThrow.js +4 -3
  39. package/dist/routes/endpoints/control/controlTry.js +1 -1
  40. package/dist/routes/endpoints/control/handleControl.js +1 -1
  41. package/dist/routes/endpoints/getEndpointConfig.js +3 -3
  42. package/dist/routes/endpoints/handleRequest.js +1 -1
  43. package/dist/routes/endpoints/runRoutine.js +2 -2
  44. package/dist/routes/log/formatValidationError.js +31 -0
  45. package/dist/routes/log/logClientError.js +109 -0
  46. package/dist/routes/log/validatePluginSchema.js +25 -0
  47. package/dist/routes/page/getPageConfig.js +6 -5
  48. package/dist/routes/request/authorizeRequest.js +5 -3
  49. package/dist/routes/request/callRequest.js +1 -1
  50. package/dist/routes/request/callRequestResolver.js +43 -6
  51. package/dist/routes/request/checkConnectionRead.js +8 -4
  52. package/dist/routes/request/checkConnectionWrite.js +8 -4
  53. package/dist/routes/request/evaluateOperators.js +1 -1
  54. package/dist/routes/request/getConnection.js +5 -3
  55. package/dist/routes/request/getConnectionConfig.js +8 -4
  56. package/dist/routes/request/getRequestConfig.js +3 -3
  57. package/dist/routes/request/getRequestResolver.js +5 -3
  58. package/dist/routes/request/validateSchemas.js +39 -20
  59. package/dist/routes/rootConfig/getHomeAndMenus.js +1 -1
  60. package/dist/routes/rootConfig/getLowdefyGlobal.js +1 -1
  61. package/dist/routes/rootConfig/getRootConfig.js +1 -1
  62. package/dist/routes/rootConfig/menus/filterMenuList.js +1 -1
  63. package/dist/routes/rootConfig/menus/filterMenus.js +1 -1
  64. package/dist/routes/rootConfig/menus/getMenus.js +1 -1
  65. package/dist/test/testContext.js +4 -1
  66. package/package.json +8 -7
  67. package/dist/context/errors.js +0 -33
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 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.
@@ -27,6 +27,9 @@ function testContext({ config = {}, connections = {}, headers = {}, logger = {
27
27
  }),
28
28
  config,
29
29
  connections,
30
+ handleError: async (error)=>{
31
+ logger.error(error);
32
+ },
30
33
  headers,
31
34
  logger,
32
35
  operators,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/api",
3
- "version": "4.5.2",
3
+ "version": "4.6.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -34,12 +34,13 @@
34
34
  "dist/*"
35
35
  ],
36
36
  "dependencies": {
37
- "@lowdefy/ajv": "4.5.2",
38
- "@lowdefy/helpers": "4.5.2",
39
- "@lowdefy/node-utils": "4.5.2",
40
- "@lowdefy/nunjucks": "4.5.2",
41
- "@lowdefy/operators": "4.5.2",
42
- "@lowdefy/operators-js": "4.5.2"
37
+ "@lowdefy/ajv": "4.6.0",
38
+ "@lowdefy/errors": "4.6.0",
39
+ "@lowdefy/helpers": "4.6.0",
40
+ "@lowdefy/node-utils": "4.6.0",
41
+ "@lowdefy/nunjucks": "4.6.0",
42
+ "@lowdefy/operators": "4.6.0",
43
+ "@lowdefy/operators-js": "4.6.0"
43
44
  },
44
45
  "devDependencies": {
45
46
  "@jest/globals": "28.1.3",
@@ -1,33 +0,0 @@
1
- /*
2
- Copyright 2020-2024 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
- */ /* eslint-disable max-classes-per-file */ let ConfigurationError = class ConfigurationError extends Error {
16
- constructor(message){
17
- super(message);
18
- this.name = 'ConfigurationError';
19
- }
20
- };
21
- let RequestError = class RequestError extends Error {
22
- constructor(message){
23
- super(message);
24
- this.name = 'RequestError';
25
- }
26
- };
27
- let ServerError = class ServerError extends Error {
28
- constructor(message){
29
- super(message);
30
- this.name = 'ServerError';
31
- }
32
- };
33
- export { ConfigurationError, RequestError, ServerError };