@vendure/testing 1.2.2 → 1.3.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.
|
@@ -44,7 +44,7 @@ exports.testConfig = core_1.mergeConfig(core_1.defaultConfig, {
|
|
|
44
44
|
},
|
|
45
45
|
promotionOptions: {},
|
|
46
46
|
customFields: {},
|
|
47
|
-
entityIdStrategy: new testing_entity_id_strategy_1.TestingEntityIdStrategy(),
|
|
47
|
+
entityOptions: { entityIdStrategy: new testing_entity_id_strategy_1.TestingEntityIdStrategy() },
|
|
48
48
|
paymentOptions: {
|
|
49
49
|
paymentMethodHandlers: [],
|
|
50
50
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-config.js","sourceRoot":"","sources":["../../src/config/test-config.ts"],"names":[],"mappings":";;;AAAA,2EAAqF;AACrF,wCAMuB;AAEvB,qFAA+E;AAC/E,qFAA+E;AAC/E,6EAAuE;AAE1D,QAAA,yBAAyB,GAAG,qBAAqB,CAAC;AAE/D;;;;;;;;;;;;GAYG;AACU,QAAA,UAAU,GAA4B,kBAAW,CAAC,oBAAa,EAAE;IAC1E,UAAU,EAAE;QACR,IAAI,EAAE,IAAI;QACV,YAAY,EAAE,iCAAc;QAC5B,WAAW,EAAE,gCAAa;QAC1B,IAAI,EAAE,IAAI;KACb;IACD,mBAAmB,EAAE,iCAAyB;IAC9C,WAAW,EAAE;QACT,WAAW,EAAE,QAAQ;QACrB,mBAAmB,EAAE,IAAI;QACzB,aAAa,EAAE;YACX,MAAM,EAAE,aAAa;SACxB;KACJ;IACD,mBAAmB,EAAE;QACjB,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,IAAI,UAAU,CAAC,EAAE,CAAC;QAC5B,QAAQ,EAAE,EAAE;QACZ,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;KACjB;IACD,gBAAgB,EAAE,EAAE;IACpB,YAAY,EAAE,EAAE;IAChB,gBAAgB,EAAE,IAAI,oDAAuB,EAAE;
|
|
1
|
+
{"version":3,"file":"test-config.js","sourceRoot":"","sources":["../../src/config/test-config.ts"],"names":[],"mappings":";;;AAAA,2EAAqF;AACrF,wCAMuB;AAEvB,qFAA+E;AAC/E,qFAA+E;AAC/E,6EAAuE;AAE1D,QAAA,yBAAyB,GAAG,qBAAqB,CAAC;AAE/D;;;;;;;;;;;;GAYG;AACU,QAAA,UAAU,GAA4B,kBAAW,CAAC,oBAAa,EAAE;IAC1E,UAAU,EAAE;QACR,IAAI,EAAE,IAAI;QACV,YAAY,EAAE,iCAAc;QAC5B,WAAW,EAAE,gCAAa;QAC1B,IAAI,EAAE,IAAI;KACb;IACD,mBAAmB,EAAE,iCAAyB;IAC9C,WAAW,EAAE;QACT,WAAW,EAAE,QAAQ;QACrB,mBAAmB,EAAE,IAAI;QACzB,aAAa,EAAE;YACX,MAAM,EAAE,aAAa;SACxB;KACJ;IACD,mBAAmB,EAAE;QACjB,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,IAAI,UAAU,CAAC,EAAE,CAAC;QAC5B,QAAQ,EAAE,EAAE;QACZ,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;KACjB;IACD,gBAAgB,EAAE,EAAE;IACpB,YAAY,EAAE,EAAE;IAChB,aAAa,EAAE,EAAE,gBAAgB,EAAE,IAAI,oDAAuB,EAAE,EAAE;IAClE,cAAc,EAAE;QACZ,qBAAqB,EAAE,EAAE;KAC5B;IACD,MAAM,EAAE,IAAI,iBAAU,EAAE;IACxB,mBAAmB,EAAE,EAAE;IACvB,YAAY,EAAE;QACV,mBAAmB,EAAE,IAAI,iCAA0B,EAAE;QACrD,oBAAoB,EAAE,IAAI,4DAA2B,EAAE;QACvD,oBAAoB,EAAE,IAAI,4DAA2B,EAAE;KAC1D;CACJ,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VendureConfig } from '@vendure/core';
|
|
2
2
|
/**
|
|
3
|
-
* Clears all tables in the
|
|
3
|
+
* Clears all tables in the database specified by the connectionOptions
|
|
4
4
|
*/
|
|
5
5
|
export declare function clearAllTables(config: VendureConfig, logging?: boolean): Promise<void>;
|
|
@@ -6,14 +6,15 @@ const typeorm_1 = require("typeorm");
|
|
|
6
6
|
// tslint:disable:no-console
|
|
7
7
|
// tslint:disable:no-floating-promises
|
|
8
8
|
/**
|
|
9
|
-
* Clears all tables in the
|
|
9
|
+
* Clears all tables in the database specified by the connectionOptions
|
|
10
10
|
*/
|
|
11
11
|
async function clearAllTables(config, logging = true) {
|
|
12
|
+
var _a, _b;
|
|
12
13
|
if (logging) {
|
|
13
14
|
console.log('Clearing all tables...');
|
|
14
15
|
}
|
|
15
16
|
config = await bootstrap_1.preBootstrapConfig(config);
|
|
16
|
-
const entityIdStrategy = config.entityIdStrategy;
|
|
17
|
+
const entityIdStrategy = (_a = config.entityIdStrategy) !== null && _a !== void 0 ? _a : (_b = config.entityOptions) === null || _b === void 0 ? void 0 : _b.entityIdStrategy;
|
|
17
18
|
const connection = await typeorm_1.createConnection(Object.assign({}, config.dbConnectionOptions));
|
|
18
19
|
try {
|
|
19
20
|
await connection.synchronize(true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clear-all-tables.js","sourceRoot":"","sources":["../../src/data-population/clear-all-tables.ts"],"names":[],"mappings":";;;AACA,4DAAkE;AAClE,qCAA2C;AAE3C,4BAA4B;AAC5B,sCAAsC;AACtC;;GAEG;AACI,KAAK,UAAU,cAAc,CAAC,MAAqB,EAAE,OAAO,GAAG,IAAI
|
|
1
|
+
{"version":3,"file":"clear-all-tables.js","sourceRoot":"","sources":["../../src/data-population/clear-all-tables.ts"],"names":[],"mappings":";;;AACA,4DAAkE;AAClE,qCAA2C;AAE3C,4BAA4B;AAC5B,sCAAsC;AACtC;;GAEG;AACI,KAAK,UAAU,cAAc,CAAC,MAAqB,EAAE,OAAO,GAAG,IAAI;;IACtE,IAAI,OAAO,EAAE;QACT,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;KACzC;IACD,MAAM,GAAG,MAAM,8BAAkB,CAAC,MAAM,CAAC,CAAC;IAC1C,MAAM,gBAAgB,GAAG,MAAA,MAAM,CAAC,gBAAgB,mCAAI,MAAA,MAAM,CAAC,aAAa,0CAAE,gBAAgB,CAAC;IAC3F,MAAM,UAAU,GAAG,MAAM,0BAAgB,mBAAM,MAAM,CAAC,mBAAmB,EAAG,CAAC;IAC7E,IAAI;QACA,MAAM,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;KACtC;IAAC,OAAO,GAAG,EAAE;QACV,OAAO,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACjE,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;KACpB;YAAS;QACN,MAAM,UAAU,CAAC,KAAK,EAAE,CAAC;KAC5B;IACD,IAAI,OAAO,EAAE;QACT,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;KACxB;AACL,CAAC;AAlBD,wCAkBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vendure/testing",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "End-to-end testing tools for Vendure projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vendure",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@types/node-fetch": "^2.5.4",
|
|
37
|
-
"@vendure/common": "^1.
|
|
37
|
+
"@vendure/common": "^1.3.0",
|
|
38
38
|
"faker": "^4.1.0",
|
|
39
39
|
"form-data": "^3.0.0",
|
|
40
40
|
"graphql": "15.5.1",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/mysql": "^2.15.15",
|
|
47
47
|
"@types/pg": "^7.14.5",
|
|
48
|
-
"@vendure/core": "^1.
|
|
48
|
+
"@vendure/core": "^1.3.0",
|
|
49
49
|
"mysql": "^2.18.1",
|
|
50
50
|
"pg": "^8.4.0",
|
|
51
51
|
"rimraf": "^3.0.0",
|
|
52
52
|
"typescript": "4.3.5"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "ac851bb030d281e3fc31078d2e9d61620eae5b29"
|
|
55
55
|
}
|