@cubejs-backend/server-core 0.24.1 → 0.24.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/CHANGELOG.md +16 -0
- package/core/OrchestratorApi.js +1 -2
- package/core/index.test.js +0 -7
- package/core/optionsValidate.js +8 -2
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.24.2](https://github.com/cube-js/cube.js/compare/v0.24.1...v0.24.2) (2020-11-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **@cubejs-backend/server-core:** Allow to pass unknown options (such as http) ([f1e9402](https://github.com/cube-js/cube.js/commit/f1e9402ee5c1fa6695d44f8750602d0a2ccedd5f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **@cubejs-backend/query-orchestrator:** Initial move to TypeScript ([#1462](https://github.com/cube-js/cube.js/issues/1462)) ([101e8dc](https://github.com/cube-js/cube.js/commit/101e8dc90d4b1266c0327adb86cab3e3caa8d4d0))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [0.24.1](https://github.com/cube-js/cube.js/compare/v0.24.0...v0.24.1) (2020-11-27)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @cubejs-backend/server-core
|
package/core/OrchestratorApi.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable no-throw-literal */
|
|
2
2
|
const pt = require('promise-timeout');
|
|
3
|
-
const QueryOrchestrator = require('@cubejs-backend/query-orchestrator
|
|
4
|
-
const ContinueWaitError = require('@cubejs-backend/query-orchestrator/orchestrator/ContinueWaitError');
|
|
3
|
+
const { QueryOrchestrator, ContinueWaitError } = require('@cubejs-backend/query-orchestrator');
|
|
5
4
|
|
|
6
5
|
class OrchestratorApi {
|
|
7
6
|
constructor(driverFactory, logger, options) {
|
package/core/index.test.js
CHANGED
|
@@ -26,13 +26,6 @@ describe('index.test', () => {
|
|
|
26
26
|
.toThrowError(/"dbType" must be one of/);
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
test('Should throw error, unknown options property', () => {
|
|
30
|
-
const options = { dbType: 'mysql', unknown: 'some-value' };
|
|
31
|
-
|
|
32
|
-
expect(() => { new CubejsServerCore(options); })
|
|
33
|
-
.toThrowError(/"unknown" is not allowed/);
|
|
34
|
-
});
|
|
35
|
-
|
|
36
29
|
test('Should throw error, invalid options', () => {
|
|
37
30
|
const options = {
|
|
38
31
|
dbType: 'mysql',
|
package/core/optionsValidate.js
CHANGED
|
@@ -72,6 +72,12 @@ const schemaOptions = Joi.object().keys({
|
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
module.exports = (options) => {
|
|
75
|
-
const { error } = Joi.validate(options, schemaOptions, {
|
|
76
|
-
|
|
75
|
+
const { error } = Joi.validate(options, schemaOptions, {
|
|
76
|
+
abortEarly: false,
|
|
77
|
+
// http configuration from server is not a part of server-core, we dont needed to get an error
|
|
78
|
+
allowUnknown: true,
|
|
79
|
+
});
|
|
80
|
+
if (error) {
|
|
81
|
+
throw new Error(`Invalid cube-server-core options: ${error.message || error.toString()}`);
|
|
82
|
+
}
|
|
77
83
|
};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@cubejs-backend/server-core",
|
|
3
3
|
"description": "Cube.js base component to wire all backend components together",
|
|
4
4
|
"author": "Cube Dev, Inc.",
|
|
5
|
-
"version": "0.24.
|
|
5
|
+
"version": "0.24.2",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/cube-js/cube.js.git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@cubejs-backend/api-gateway": "^0.24.0",
|
|
29
|
-
"@cubejs-backend/query-orchestrator": "^0.24.
|
|
29
|
+
"@cubejs-backend/query-orchestrator": "^0.24.2",
|
|
30
30
|
"@cubejs-backend/schema-compiler": "^0.24.1",
|
|
31
31
|
"@hapi/joi": "^15.1.1",
|
|
32
32
|
"codesandbox-import-utils": "^2.1.12",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"uuid": "^3.3.3"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
+
"@types/hapi__joi": "^15.0.4",
|
|
52
53
|
"eslint": "^6.8.0",
|
|
53
54
|
"eslint-config-airbnb-base": "^13.1.0",
|
|
54
55
|
"eslint-plugin-import": "^2.16.0",
|
|
@@ -58,5 +59,5 @@
|
|
|
58
59
|
"should": "^13.2.3"
|
|
59
60
|
},
|
|
60
61
|
"license": "Apache-2.0",
|
|
61
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "20a2c50c07d1b7602c0958fd3d5a69f310a415f1"
|
|
62
63
|
}
|