diff --git a/packages/cubejs-docker/dev.Dockerfile b/packages/cubejs-docker/dev.Dockerfile index 5c24cc59e68fe..127f73237eb6e 100644 --- a/packages/cubejs-docker/dev.Dockerfile +++ b/packages/cubejs-docker/dev.Dockerfile @@ -9,7 +9,7 @@ ENV CI=0 RUN DEBIAN_FRONTEND=noninteractive \ && apt-get update \ && apt-get install -y --no-install-recommends libssl3 curl \ - cmake python3.11 libpython3.11-dev gcc g++ make cmake openjdk-17-jdk-headless \ + cmake python3 python3.11 libpython3.11-dev gcc g++ make cmake openjdk-17-jdk-headless \ && rm -rf /var/lib/apt/lists/* ENV RUSTUP_HOME=/usr/local/rustup @@ -73,6 +73,7 @@ COPY packages/cubejs-sqlite-driver/package.json packages/cubejs-sqlite-driver/pa COPY packages/cubejs-ksql-driver/package.json packages/cubejs-ksql-driver/package.json COPY packages/cubejs-dbt-schema-extension/package.json packages/cubejs-dbt-schema-extension/package.json COPY packages/cubejs-jdbc-driver/package.json packages/cubejs-jdbc-driver/package.json +COPY packages/cubejs-mongodb-jdbc-driver/package.json packages/cubejs-mongodb-jdbc-driver/package.json # Skip # COPY packages/cubejs-testing/package.json packages/cubejs-testing/package.json # COPY packages/cubejs-docker/package.json packages/cubejs-docker/package.json @@ -150,6 +151,7 @@ COPY packages/cubejs-ksql-driver/ packages/cubejs-ksql-driver/ COPY packages/cubejs-dbt-schema-extension/ packages/cubejs-dbt-schema-extension/ COPY packages/cubejs-jdbc-driver/ packages/cubejs-jdbc-driver/ COPY packages/cubejs-databricks-jdbc-driver/ packages/cubejs-databricks-jdbc-driver/ +COPY packages/cubejs-mongodb-jdbc-driver/ packages/cubejs-mongodb-jdbc-driver/ # Skip # COPY packages/cubejs-testing/ packages/cubejs-testing/ # COPY packages/cubejs-docker/ packages/cubejs-docker/ diff --git a/packages/cubejs-jdbc-driver/src/JDBCDriver.ts b/packages/cubejs-jdbc-driver/src/JDBCDriver.ts index cb9f58011a2cd..dc42edd8df286 100644 --- a/packages/cubejs-jdbc-driver/src/JDBCDriver.ts +++ b/packages/cubejs-jdbc-driver/src/JDBCDriver.ts @@ -30,6 +30,7 @@ import type { nextFn } from './QueryStream'; const DriverManager = require('@cubejs-backend/jdbc/lib/drivermanager'); const Connection = require('@cubejs-backend/jdbc/lib/connection'); const DatabaseMetaData = require('@cubejs-backend/jdbc/lib/databasemetadata'); +const ResultSet = require('@cubejs-backend/jdbc/lib/resultset'); const jinst = require('@cubejs-backend/jdbc/lib/jinst'); const mvn = require('node-java-maven'); @@ -71,6 +72,9 @@ Connection.prototype.getMetaDataAsync = promisify(Connection.prototype.getMetaDa // promisify DatabaseMetaData methods DatabaseMetaData.prototype.getSchemasAsync = promisify(DatabaseMetaData.prototype.getSchemas); DatabaseMetaData.prototype.getTablesAsync = promisify(DatabaseMetaData.prototype.getTables); +DatabaseMetaData.prototype.getColumnsAsync = promisify(DatabaseMetaData.prototype.getColumns); +// promisify ResultSet methods +ResultSet.prototype.toObjArrayAsync = promisify(ResultSet.prototype.toObjArray); interface ExtendedPool extends Pool { _factory: Factory; diff --git a/packages/cubejs-mongodb-jdbc-driver/.gitignore b/packages/cubejs-mongodb-jdbc-driver/.gitignore new file mode 100644 index 0000000000000..de4d1f007dd19 --- /dev/null +++ b/packages/cubejs-mongodb-jdbc-driver/.gitignore @@ -0,0 +1,2 @@ +dist +node_modules diff --git a/packages/cubejs-mongodb-jdbc-driver/README.md b/packages/cubejs-mongodb-jdbc-driver/README.md new file mode 100644 index 0000000000000..e76bf2eb4c8a5 --- /dev/null +++ b/packages/cubejs-mongodb-jdbc-driver/README.md @@ -0,0 +1,16 @@ +

Cube.js

+ +[Website](https://cube.dev) • [Docs](https://cube.dev/docs) • [Blog](https://cube.dev/blog) • [Slack](https://slack.cube.dev) • [Twitter](https://twitter.com/the_cube_dev) + +[![npm version](https://badge.fury.io/js/%40cubejs-backend%2Fserver.svg)](https://badge.fury.io/js/%40cubejs-backend%2Fserver) +[![GitHub Actions](https://github.com/cube-js/cube.js/workflows/Build/badge.svg)](https://github.com/cube-js/cube.js/actions?query=workflow%3ABuild+branch%3Amaster) + +# Cube.js MongoDB Database Driver + +Cube.js MongoDB driver. + +[Learn more](https://github.com/cube-js/cube.js#getting-started) + +# License + +Cube.js MongoDB Database Driver is [Apache 2.0 licensed](./LICENSE). diff --git a/packages/cubejs-mongodb-jdbc-driver/package.json b/packages/cubejs-mongodb-jdbc-driver/package.json new file mode 100644 index 0000000000000..ac856087d3d3f --- /dev/null +++ b/packages/cubejs-mongodb-jdbc-driver/package.json @@ -0,0 +1,49 @@ +{ + "name": "@cubejs-backend/mongodb-jdbc-driver", + "description": "Cube.js MongoDB database driver", + "version": "1.1.9", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/cube-js/cube.git", + "directory": "packages/cubejs-mongodb-jdbc-driver" + }, + "engines": { + "node": "^14.0.0 || ^16.0.0 || >=17.0.0" + }, + "main": "dist/src/index.js", + "typings": "dist/src/index.d.ts", + "scripts": { + "build": "rm -rf dist && npm run tsc", + "tsc": "tsc", + "watch": "tsc -w", + "lint": "eslint src/* --ext .ts", + "lint:fix": "eslint --fix src/* --ext .ts" + }, + "files": [ + "README.md", + "dist/src/*" + ], + "dependencies": { + "@cubejs-backend/jdbc-driver": "1.1.10", + "@cubejs-backend/schema-compiler": "1.1.10", + "@cubejs-backend/shared": "1.1.10", + "moment-timezone": "^0.5.46", + "node-fetch": "2" + }, + "devDependencies": { + "@cubejs-backend/linter": "^1.0.0", + "@types/node": "^18", + "@types/node-fetch": "2", + "typescript": "~5.2.2" + }, + "publishConfig": { + "access": "public" + }, + "eslintConfig": { + "extends": "../cubejs-linter" + }, + "jest": { + "testEnvironment": "node" + } +} diff --git a/packages/cubejs-mongodb-jdbc-driver/src/MongoDBDriver.ts b/packages/cubejs-mongodb-jdbc-driver/src/MongoDBDriver.ts new file mode 100644 index 0000000000000..f880bdc5ecad5 --- /dev/null +++ b/packages/cubejs-mongodb-jdbc-driver/src/MongoDBDriver.ts @@ -0,0 +1,80 @@ +import { assertDataSource, getEnv } from '@cubejs-backend/shared'; +import { JDBCDriver, JDBCDriverConfiguration } from '@cubejs-backend/jdbc-driver'; +import fs from 'fs'; +import path from 'path'; + +import { downloadJDBCDriver } from './installer'; +import { MongoDBDriverQuery } from './MongoDBDriverQuery'; + +export class MongoDBDriver extends JDBCDriver { + public constructor( + conf: Partial & { + /** + * Data source name. + */ + dataSource?: string, + + /** + * Max pool size value for the [cube]<-->[db] pool. + */ + maxPoolSize?: number, + + /** + * Time to wait for a response from a connection after validation + * request before determining it as not valid. Default - 60000 ms. + */ + testConnectionTimeout?: number, + } = {} + ) { + const dataSource = conf.dataSource || assertDataSource('default'); + + const config: JDBCDriverConfiguration = { + database: getEnv('dbName', { dataSource }), + dbType: 'mongodb', + url: getEnv('jdbcUrl', { dataSource }), + drivername: 'com.mongodb.jdbc.MongoDriver', + properties: { + user: getEnv('dbUser', { dataSource }), + password: getEnv('dbPass', { dataSource }), + }, + ...conf, + }; + + super(config); + } + + protected async getCustomClassPath() { + const customClassPath = path.join(__dirname, '..', 'mongodb-jdbc-2.2.0-all.jar'); + + if (!fs.existsSync(customClassPath)) { + await downloadJDBCDriver(customClassPath); + } + + return customClassPath; + } + + public readOnly() { + return true; + } + + public async tablesSchema() { + const data = await this.withConnection(async (connection: any) => { + const metaData = await connection.getMetaDataAsync(); + const columnsResult = await metaData.getColumnsAsync(null, null, null, null); + const columns = await columnsResult.toObjArrayAsync(); + + return columns.map((column: any) => ({ + column_name: column.COLUMN_NAME, + table_name: column.TABLE_NAME, + table_schema: column.TABLE_CAT, + data_type: column.TYPE_NAME, + })); + }); + + return data.reduce(this.informationColumnsSchemaReducer, {}); + } + + public static dialectClass() { + return MongoDBDriverQuery; + } +} diff --git a/packages/cubejs-mongodb-jdbc-driver/src/MongoDBDriverQuery.ts b/packages/cubejs-mongodb-jdbc-driver/src/MongoDBDriverQuery.ts new file mode 100644 index 0000000000000..bca9c146cfcc1 --- /dev/null +++ b/packages/cubejs-mongodb-jdbc-driver/src/MongoDBDriverQuery.ts @@ -0,0 +1,63 @@ +import { BaseQuery } from '@cubejs-backend/schema-compiler'; +import moment from 'moment-timezone'; + +const GRANULARITY_TO_INTERVAL: Record string> = { + second: (date) => `DATEADD(second, DATEDIFF(second, CAST('1900-01-01' as TIMESTAMP), ${date}), CAST('1900-01-01' as TIMESTAMP))`, + minute: (date) => `DATEADD(minute, DATEDIFF(minute, CAST('1900-01-01' as TIMESTAMP), ${date}), CAST('1900-01-01' as TIMESTAMP))`, + hour: (date) => `DATEADD(hour, DATEDIFF(hour, CAST('1900-01-01' as TIMESTAMP), ${date}), CAST('1900-01-01' as TIMESTAMP))`, + day: (date) => `DATEADD(day, DATEDIFF(day, CAST('1900-01-01' as TIMESTAMP), ${date}), CAST('1900-01-01' as TIMESTAMP))`, + week: (date) => `DATEADD(week, DATEDIFF(week, CAST('1900-01-01' as TIMESTAMP), ${date}), CAST('1900-01-01' as TIMESTAMP))`, + month: (date) => `DATEADD(month, DATEDIFF(month, CAST('1900-01-01' as TIMESTAMP), ${date}), CAST('1900-01-01' as TIMESTAMP))`, + quarter: (date) => `DATEADD(quarter, DATEDIFF(quarter, CAST('1900-01-01' as TIMESTAMP), ${date}), CAST('1900-01-01' as TIMESTAMP))`, + year: (date) => `DATEADD(year, DATEDIFF(year, CAST('1900-01-01' as TIMESTAMP), ${date}), CAST('1900-01-01' as TIMESTAMP))`, +}; + +export class MongoDBDriverQuery extends BaseQuery { + public timeStampCast(value: string) { + return `CAST(${value} as TIMESTAMP)`; + } + + public dateTimeCast(value: string) { + return `CAST(${value} AS TIMESTAMP)`; + } + + public groupByClause() { + if (this.ungrouped) { + return ''; + } + + const names = this.dimensionAliasNames(); + + return names.length ? ` GROUP BY ${names.join(', ')}` : ''; + } + + public timeGroupedColumn(granularity: string, dimension: string) { + return GRANULARITY_TO_INTERVAL[granularity](dimension); + } + + public convertTz(field: string) { + const offset = moment().tz(this.timezone).utcOffset(); + const hours = Math.sign(offset) * Math.floor(Math.abs(offset) / 60); + const minutes = offset % 60; + + let result = field; + + if (hours !== 0) { + result = `TIMESTAMPADD(HOUR, ${hours}, ${result})`; + } + + if (minutes !== 0) { + result = `TIMESTAMPADD(MINUTE, ${minutes}, ${result})`; + } + + return result; + } + + public nowTimestampSql() { + return 'CURRENT_TIMESTAMP'; + } + + public unixTimestampSql() { + return 'DATEDIFF(second, CAST(\'1970-01-01\'), CURRENT_TIMESTAMP)'; + } +} diff --git a/packages/cubejs-mongodb-jdbc-driver/src/index.ts b/packages/cubejs-mongodb-jdbc-driver/src/index.ts new file mode 100644 index 0000000000000..da81956aec1d9 --- /dev/null +++ b/packages/cubejs-mongodb-jdbc-driver/src/index.ts @@ -0,0 +1,4 @@ +import { MongoDBDriver } from './MongoDBDriver'; + +export { MongoDBDriver }; +export default MongoDBDriver; diff --git a/packages/cubejs-mongodb-jdbc-driver/src/installer.ts b/packages/cubejs-mongodb-jdbc-driver/src/installer.ts new file mode 100644 index 0000000000000..2a2b3a2ca7160 --- /dev/null +++ b/packages/cubejs-mongodb-jdbc-driver/src/installer.ts @@ -0,0 +1,20 @@ +import { createWriteStream } from 'fs'; +import { getHttpAgentForProxySettings } from '@cubejs-backend/shared'; +import { pipeline } from 'node:stream/promises'; +import fetch from 'node-fetch'; + +const URL = 'https://repo1.maven.org/maven2/org/mongodb/mongodb-jdbc/2.2.0/mongodb-jdbc-2.2.0-all.jar'; + +export async function downloadJDBCDriver(path: string) { + const response = await fetch(URL, { + agent: await getHttpAgentForProxySettings(), + }); + + if (!response.ok) { + throw new Error(`Failed to download MongoDB JDBC driver (status=${response.status})`); + } + + const writeStream = createWriteStream(path); + + await pipeline(response.body, writeStream); +} diff --git a/packages/cubejs-mongodb-jdbc-driver/tsconfig.json b/packages/cubejs-mongodb-jdbc-driver/tsconfig.json new file mode 100644 index 0000000000000..889114bc38306 --- /dev/null +++ b/packages/cubejs-mongodb-jdbc-driver/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "../../tsconfig.base.json", + "include": [ + "src", + "test" + ], + "compilerOptions": { + "outDir": "dist", + "rootDir": ".", + "baseUrl": "." + } +} diff --git a/packages/cubejs-server-core/src/core/DriverDependencies.js b/packages/cubejs-server-core/src/core/DriverDependencies.js index ba89f6c81a3a9..9d6403da54a74 100644 --- a/packages/cubejs-server-core/src/core/DriverDependencies.js +++ b/packages/cubejs-server-core/src/core/DriverDependencies.js @@ -29,4 +29,5 @@ module.exports = { pinot: '@cubejs-backend/pinot-driver', // List for JDBC drivers 'databricks-jdbc': '@cubejs-backend/databricks-jdbc-driver', + 'mongodb-jdbc': '@cubejs-backend/mongodb-jdbc-driver', }; diff --git a/tsconfig.json b/tsconfig.json index 8fb24316e942b..9a1787447b796 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -94,6 +94,9 @@ { "path": "packages/cubejs-databricks-jdbc-driver" }, + { + "path": "packages/cubejs-mongodb-jdbc-driver" + }, { "path": "packages/cubejs-prestodb-driver" }, diff --git a/yarn.lock b/yarn.lock index c860c310fc04e..bf5b61440cab6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5048,6 +5048,51 @@ tiny-invariant "^1.3.3" valid-url "^1.0.9" +"@cubejs-backend/base-driver@1.1.8": + version "1.1.8" + resolved "https://registry.yarnpkg.com/@cubejs-backend/base-driver/-/base-driver-1.1.8.tgz#b55e06572cdf9c52c1bba1ecc1ae487f79b1480a" + integrity sha512-9MyqPdSdkSMQKyvGQpTu+WRx+wDPlhygS0eMq5t3jVcCbn1+sZFl4aXC26oAFM4jYia+x8IFsxBWIF6oUwTGuw== + dependencies: + "@aws-sdk/client-s3" "^3.49.0" + "@aws-sdk/s3-request-presigner" "^3.49.0" + "@azure/identity" "^4.4.1" + "@azure/storage-blob" "^12.9.0" + "@cubejs-backend/shared" "1.1.8" + "@google-cloud/storage" "^7.13.0" + +"@cubejs-backend/cubesql@1.1.9": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@cubejs-backend/cubesql/-/cubesql-1.1.9.tgz#d87e7ec0a0ff9776242ad7ba6015fbc68ccd0a47" + integrity sha512-3BFNxFQOY/hPBtLGrrSJ1xVVZsz1K/IzDXfdHyjSCOh38GOXHPy6tC77+MEIGcvjIrPO2me77FZ4P5cZjKGgKg== + +"@cubejs-backend/cubestore-driver@1.1.9": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@cubejs-backend/cubestore-driver/-/cubestore-driver-1.1.9.tgz#ff2afbf0c19729362b1a6d950b0a1f8e6a642232" + integrity sha512-ZYXIX2SIlPozySlFOwHcdX6QiaAPi1o84MqSJ+j0QH/M1TX6T+3YDTcXcvCBxmnCk9qag8Hj752nywafcHva7w== + dependencies: + "@cubejs-backend/base-driver" "1.1.8" + "@cubejs-backend/cubestore" "1.1.9" + "@cubejs-backend/shared" "1.1.8" + csv-write-stream "^2.0.0" + flatbuffers "23.3.3" + fs-extra "^9.1.0" + generic-pool "^3.6.0" + moment-timezone "^0.5.31" + node-fetch "^2.6.1" + sqlstring "^2.3.3" + tempy "^1.0.1" + uuid "^8.3.2" + ws "^7.4.3" + +"@cubejs-backend/cubestore@1.1.9": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@cubejs-backend/cubestore/-/cubestore-1.1.9.tgz#f09a6daf743c63c68dc71b11c6eb1defbf25b153" + integrity sha512-xieNUUTw3zhTDV3F9OH2fFuyw2UGTFqdMqzbzv4qAsPcW/N3o1Qv5ij7GDNDiT4XeO7DDRhttxiKGgTU8Mpozw== + dependencies: + "@cubejs-backend/shared" "1.1.8" + "@octokit/core" "^3.2.5" + source-map-support "^0.5.19" + "@cubejs-backend/dotenv@^9.0.2": version "9.0.2" resolved "https://registry.yarnpkg.com/@cubejs-backend/dotenv/-/dotenv-9.0.2.tgz#c3679091b702f0fd38de120c5a63943fcdc0dcbf" @@ -5064,6 +5109,88 @@ uuid "9.0.0" winston "3.8.2" +"@cubejs-backend/native@1.1.9": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@cubejs-backend/native/-/native-1.1.9.tgz#66cec2caa56ae6a9369c042ddfaf0896ec2d80c9" + integrity sha512-HA9yVlI0UDvKbKjKK+cFmGgSbUfwIyp41X1q+NATzmWGFFVlzth3iS2YJ/H7Mshng6FqmCphzmshaGrSWs4cCw== + dependencies: + "@cubejs-backend/cubesql" "1.1.9" + "@cubejs-backend/shared" "1.1.8" + "@cubejs-infra/post-installer" "^0.0.7" + +"@cubejs-backend/query-orchestrator@1.1.9": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@cubejs-backend/query-orchestrator/-/query-orchestrator-1.1.9.tgz#9bdd77c334dbc897d983693ce88a591f35a438e8" + integrity sha512-QKWdENsN/ymLbfP5EtqnKeBsiFXCmggxLJCl9V3G3MFTSmZRlYk8v1NcGiFkVvndCnzsEu8cen8PYmAZf2ABUQ== + dependencies: + "@cubejs-backend/base-driver" "1.1.8" + "@cubejs-backend/cubestore-driver" "1.1.9" + "@cubejs-backend/shared" "1.1.8" + csv-write-stream "^2.0.0" + es5-ext "0.10.53" + generic-pool "^3.7.1" + lru-cache "^6.0.0" + moment-timezone "^0.5.33" + ramda "^0.27.2" + +"@cubejs-backend/schema-compiler@1.1.10": + version "1.1.10" + resolved "https://registry.yarnpkg.com/@cubejs-backend/schema-compiler/-/schema-compiler-1.1.10.tgz#f62a839ab5aa0d5128ffc7678e49e8b08c4ecfc5" + integrity sha512-BrlzTiPABSbL4Je+HnFmqOOFmE8Mq7/TJ+IYW5nJ1q0fbU/Ut7JGYBGkp32SPR8dx9aycx0p9GwEFzRDmRTSzw== + dependencies: + "@babel/code-frame" "^7.24" + "@babel/core" "^7.24" + "@babel/generator" "^7.24" + "@babel/parser" "^7.24" + "@babel/preset-env" "^7.24" + "@babel/standalone" "^7.24" + "@babel/traverse" "^7.24" + "@babel/types" "^7.24" + "@cubejs-backend/native" "1.1.10" + "@cubejs-backend/shared" "1.1.10" + antlr4ts "0.5.0-alpha.4" + camelcase "^6.2.0" + cron-parser "^4.9.0" + humps "^2.0.1" + inflection "^1.12.0" + joi "^17.8.3" + js-yaml "^4.1.0" + lru-cache "^5.1.1" + moment-timezone "^0.5.33" + node-dijkstra "^2.5.0" + ramda "^0.27.2" + syntax-error "^1.3.0" + uuid "^8.3.2" + +"@cubejs-backend/schema-compiler@1.1.9": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@cubejs-backend/schema-compiler/-/schema-compiler-1.1.9.tgz#4d63cbd79d7cdef68fe035d5dc7d5acc4843221a" + integrity sha512-UTM4+jNICFgMnd/wxvWfdX+u6nIjNXgdYeHD9zHDcPhX4HelJ0sRsshVCSDt2AfQgelf3wtnDZFGt5chXsvKKA== + dependencies: + "@babel/code-frame" "^7.24" + "@babel/core" "^7.24" + "@babel/generator" "^7.24" + "@babel/parser" "^7.24" + "@babel/preset-env" "^7.24" + "@babel/standalone" "^7.24" + "@babel/traverse" "^7.24" + "@babel/types" "^7.24" + "@cubejs-backend/native" "1.1.9" + "@cubejs-backend/shared" "1.1.8" + antlr4ts "0.5.0-alpha.4" + camelcase "^6.2.0" + cron-parser "^4.9.0" + humps "^2.0.1" + inflection "^1.12.0" + joi "^17.8.3" + js-yaml "^4.1.0" + lru-cache "^5.1.1" + moment-timezone "^0.5.33" + node-dijkstra "^2.5.0" + ramda "^0.27.2" + syntax-error "^1.3.0" + uuid "^8.3.2" + "@cubejs-backend/shared@0.33.20": version "0.33.20" resolved "https://registry.yarnpkg.com/@cubejs-backend/shared/-/shared-0.33.20.tgz#3d9fa60041599cca9fe4c04df05daa4b8ab8675f" @@ -5084,6 +5211,40 @@ throttle-debounce "^3.0.1" uuid "^8.3.2" +"@cubejs-backend/shared@1.1.8": + version "1.1.8" + resolved "https://registry.yarnpkg.com/@cubejs-backend/shared/-/shared-1.1.8.tgz#3bca511f0f779edc22c2f684a7f76bc52577e9a1" + integrity sha512-DtW4w3ha/nsgWYPwWPvifmMNEHM85Kdv2jg/apZaqTd4HtgXzX71GNSrz2dH03gihuJnYsZBZrZMpqYjdZkKdA== + dependencies: + "@oclif/color" "^0.1.2" + bytes "^3.1.0" + cli-progress "^3.9.0" + cross-spawn "^7.0.3" + decompress "^4.2.1" + env-var "^6.3.0" + fs-extra "^9.1.0" + http-proxy-agent "^4.0.1" + moment-range "^4.0.1" + moment-timezone "^0.5.33" + node-fetch "^2.6.1" + shelljs "^0.8.5" + throttle-debounce "^3.0.1" + uuid "^8.3.2" + +"@cubejs-backend/testing-shared@1.1.9": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@cubejs-backend/testing-shared/-/testing-shared-1.1.9.tgz#fd786f9ee2663048e4d930bc16a1baac2c2c8b0a" + integrity sha512-4UVeDYlrZyMITECUZfBT8unkxta0cVI/xyGtLwsC1HSWfC/hs5O/ivBHemQHl+ic3XeJFXWBFdTAAA2Gd3On0g== + dependencies: + "@cubejs-backend/dotenv" "^9.0.2" + "@cubejs-backend/query-orchestrator" "1.1.9" + "@cubejs-backend/schema-compiler" "1.1.9" + "@cubejs-backend/shared" "1.1.8" + "@testcontainers/kafka" "~10.13.0" + dedent "^0.7.0" + node-fetch "^2.6.7" + testcontainers "^10.13.0" + "@cubejs-infra/post-installer@^0.0.7": version "0.0.7" resolved "https://registry.yarnpkg.com/@cubejs-infra/post-installer/-/post-installer-0.0.7.tgz#a28d2d03e5b7b69a64020d75194a7078cf911d2d" @@ -9858,6 +10019,14 @@ dependencies: "@types/node" "*" +"@types/node-fetch@2": + version "2.6.12" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.12.tgz#8ab5c3ef8330f13100a7479e2cd56d3386830a03" + integrity sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA== + dependencies: + "@types/node" "*" + form-data "^4.0.0" + "@types/node-fetch@^2.5.0", "@types/node-fetch@^2.5.7", "@types/node-fetch@^2.5.8": version "2.6.11" resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.11.tgz#9b39b78665dae0e82a08f02f4967d62c66f95d24" @@ -21604,6 +21773,13 @@ moment-timezone@^0.5.15, moment-timezone@^0.5.27, moment-timezone@^0.5.31, momen dependencies: moment "^2.29.4" +moment-timezone@^0.5.46: + version "0.5.46" + resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.46.tgz#a21aa6392b3c6b3ed916cd5e95858a28d893704a" + integrity sha512-ZXm9b36esbe7OmdABqIWJuBBiLLwAjrN7CE+7sYdCCx82Nabt1wHDj8TVseS59QIlfFPbOoiBPm6ca9BioG4hw== + dependencies: + moment "^2.29.4" + moment@^2.17.1, moment@^2.24.0, moment@^2.25.3, moment@^2.29.1, moment@^2.29.4: version "2.29.4" resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" @@ -21896,6 +22072,13 @@ node-dijkstra@^2.5.0: resolved "https://registry.yarnpkg.com/node-dijkstra/-/node-dijkstra-2.5.0.tgz#0feb76c5a05f35b56e786de6df4d3364af28d4e8" integrity sha1-D+t2xaBfNbVueG3m300zZK8o1Og= +node-fetch@2, node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.6, node-fetch@^2.6.7, node-fetch@^2.6.9, node-fetch@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + node-fetch@2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" @@ -21911,13 +22094,6 @@ node-fetch@^1.0.1: encoding "^0.1.11" is-stream "^1.0.1" -node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.6, node-fetch@^2.6.7, node-fetch@^2.6.9, node-fetch@^2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" - integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== - dependencies: - whatwg-url "^5.0.0" - node-forge@^1: version "1.3.1" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3"