Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cubejs-server-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@cubejs-backend/native": "1.5.4",
"@cubejs-backend/query-orchestrator": "1.5.4",
"@cubejs-backend/schema-compiler": "1.5.4",
"@cubejs-backend/cubestore-driver": "1.5.4",
"@cubejs-backend/shared": "1.5.4",
"@cubejs-backend/templates": "1.5.4",
"codesandbox-import-utils": "^2.1.12",
Expand All @@ -59,7 +60,6 @@
"ws": "^7.5.3"
},
"devDependencies": {
"@cubejs-backend/cubestore-driver": "1.5.4",
"@cubejs-backend/linter": "1.5.4",
"@cubejs-client/playground": "1.5.4",
"@types/cross-spawn": "^6.0.2",
Expand Down
15 changes: 5 additions & 10 deletions packages/cubejs-server-core/src/core/OptsHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {
isDockerImage,
displayCLIWarning,
} from '@cubejs-backend/shared';
import { isCubeStoreSupported, CubeStoreHandler, CubeStoreDevDriver } from "@cubejs-backend/cubestore-driver";

import {
CreateOptions,
SystemOptions,
Expand Down Expand Up @@ -403,15 +405,8 @@ export class OptsHandler {

if (externalDbType === 'cubestore' && this.isDevMode() && !opts.serverless) {
if (!definedExtDBVariables.length) {
// There is no @cubejs-backend/cubestore-driver dependency in the core
// package. At the same time, @cubejs-backend/cubestore-driver is already
// exist at the moment, when the core server instance is up. That is the
// reason why we inject it in this way.
//
// eslint-disable-next-line global-require,import/no-extraneous-dependencies
const cubeStorePackage = require('@cubejs-backend/cubestore-driver');
if (cubeStorePackage.isCubeStoreSupported()) {
const cubeStoreHandler = new cubeStorePackage.CubeStoreHandler({
if (isCubeStoreSupported()) {
const cubeStoreHandler = new CubeStoreHandler({
stdout: (data) => {
console.log(data.toString().trim());
},
Expand All @@ -436,7 +431,7 @@ export class OptsHandler {

// Lazy loading for Cube Store
externalDriverFactory =
() => new cubeStorePackage.CubeStoreDevDriver(cubeStoreHandler);
() => new CubeStoreDevDriver(cubeStoreHandler);
} else {
this.core.logger('Cube Store is not supported on your system', {
warning: (
Expand Down
Loading