@cubejs-backend/testing-shared 0.30.46 → 0.30.47
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
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.30.47](https://github.com/cube-js/cube.js/compare/v0.30.46...v0.30.47) (2022-08-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **cubejs:** LambdaView: hybrid query of source tables and pre-aggregation tables. ([#4718](https://github.com/cube-js/cube.js/issues/4718)) ([4ae826b](https://github.com/cube-js/cube.js/commit/4ae826b4d27afbfce366830150e130f29c7fcbbf))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [0.30.46](https://github.com/cube-js/cube.js/compare/v0.30.45...v0.30.46) (2022-08-10)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { StartedTestContainer } from 'testcontainers';
|
|
1
2
|
import { DbRunnerAbstract, DBRunnerContainerOptions } from './db-runner.abstract';
|
|
2
3
|
declare type PostgresStartOptions = DBRunnerContainerOptions & {
|
|
3
4
|
version?: string;
|
|
4
5
|
};
|
|
5
6
|
export declare class PostgresDBRunner extends DbRunnerAbstract {
|
|
6
|
-
static startContainer(options: PostgresStartOptions): Promise<
|
|
7
|
+
static startContainer(options: PostgresStartOptions): Promise<StartedTestContainer>;
|
|
8
|
+
static loadEcom(db: StartedTestContainer): Promise<void>;
|
|
7
9
|
}
|
|
8
10
|
export {};
|
|
9
11
|
//# sourceMappingURL=postgres.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../../src/db/postgres.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAElF,aAAK,oBAAoB,GAAG,wBAAwB,GAAG;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,qBAAa,gBAAiB,SAAQ,gBAAgB;WACtC,cAAc,CAAC,OAAO,EAAE,oBAAoB;
|
|
1
|
+
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../../src/db/postgres.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAElF,aAAK,oBAAoB,GAAG,wBAAwB,GAAG;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,qBAAa,gBAAiB,SAAQ,gBAAgB;WACtC,cAAc,CAAC,OAAO,EAAE,oBAAoB;WA4BtC,QAAQ,CAAC,EAAE,EAAE,oBAAoB;CAItD"}
|
package/dist/src/db/postgres.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.PostgresDBRunner = void 0;
|
|
7
|
+
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
8
|
+
const child_process_1 = require("child_process");
|
|
4
9
|
const testcontainers_1 = require("testcontainers");
|
|
5
10
|
const db_runner_abstract_1 = require("./db-runner.abstract");
|
|
6
11
|
class PostgresDBRunner extends db_runner_abstract_1.DbRunnerAbstract {
|
|
@@ -28,6 +33,10 @@ class PostgresDBRunner extends db_runner_abstract_1.DbRunnerAbstract {
|
|
|
28
33
|
}
|
|
29
34
|
return container.start();
|
|
30
35
|
}
|
|
36
|
+
static async loadEcom(db) {
|
|
37
|
+
const ecom = await (await node_fetch_1.default('https://cube.dev/downloads/ecom-dump-d3-example.sql')).text();
|
|
38
|
+
child_process_1.execSync(`psql postgresql://test:test@${db.getHost()}:${db.getMappedPort(5432)}/test`, { input: ecom });
|
|
39
|
+
}
|
|
31
40
|
}
|
|
32
41
|
exports.PostgresDBRunner = PostgresDBRunner;
|
|
33
42
|
//# sourceMappingURL=postgres.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres.js","sourceRoot":"","sources":["../../../src/db/postgres.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"postgres.js","sourceRoot":"","sources":["../../../src/db/postgres.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+B;AAC/B,iDAAyC;AACzC,mDAAwE;AACxE,6DAAkF;AAMlF,MAAa,gBAAiB,SAAQ,qCAAgB;IAC7C,MAAM,CAAC,cAAc,CAAC,OAA6B;QACxD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC;QAE7E,MAAM,SAAS,GAAG,IAAI,iCAAgB,CAAC,YAAY,OAAO,EAAE,CAAC;aAC1D,OAAO,CAAC,eAAe,EAAE,MAAM,CAAC;aAChC,OAAO,CAAC,aAAa,EAAE,MAAM,CAAC;aAC9B,OAAO,CAAC,mBAAmB,EAAE,MAAM,CAAC;aACpC,gBAAgB,CAAC,IAAI,CAAC;YACvB,qBAAqB;YACrB,8CAA8C;YAC9C,wBAAwB;YACxB,kBAAkB;YAClB,eAAe;YACf,KAAK;YACL,2CAA2C;YAC3C,uDAAuD;aACtD,kBAAkB,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;QAEjC,IAAI,OAAO,CAAC,OAAO,EAAE;YACnB,gDAAgD;YAChD,KAAK,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,OAAO,CAAC,OAAO,EAAE;gBAC1D,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;aACnD;SACF;QAED,OAAO,SAAS,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAwB;QACnD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,oBAAK,CAAC,qDAAqD,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAC/F,wBAAQ,CAAC,+BAA+B,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1G,CAAC;CACF;AAjCD,4CAiCC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cubejs-backend/testing-shared",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.47",
|
|
4
4
|
"description": "Cube.js Testing Helpers",
|
|
5
5
|
"author": "Cube Dev, Inc.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,10 +21,11 @@
|
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@cubejs-backend/dotenv": "^9.0.2",
|
|
24
|
-
"@cubejs-backend/query-orchestrator": "^0.30.
|
|
25
|
-
"@cubejs-backend/schema-compiler": "^0.30.
|
|
26
|
-
"@cubejs-backend/shared": "^0.30.
|
|
24
|
+
"@cubejs-backend/query-orchestrator": "^0.30.47",
|
|
25
|
+
"@cubejs-backend/schema-compiler": "^0.30.47",
|
|
26
|
+
"@cubejs-backend/shared": "^0.30.47",
|
|
27
27
|
"dedent": "^0.7.0",
|
|
28
|
+
"node-fetch": "^2.6.7",
|
|
28
29
|
"testcontainers": "^8.12"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
@@ -52,5 +53,5 @@
|
|
|
52
53
|
"eslintConfig": {
|
|
53
54
|
"extends": "../cubejs-linter"
|
|
54
55
|
},
|
|
55
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "219df86b532c6f6c6d20040f85725293203e8305"
|
|
56
57
|
}
|