medusa-test-utils 1.1.45-snapshot-20240823073707 → 1.1.45-snapshot-20240823075240
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/medusa-test-runner-utils/use-db.d.ts +1 -1
- package/dist/medusa-test-runner-utils/use-db.d.ts.map +1 -1
- package/dist/module-test-runner.d.ts.map +1 -1
- package/dist/module-test-runner.js +2 -5
- package/dist/module-test-runner.js.map +1 -1
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
export * as TestDatabaseUtils from "./database";
|
2
2
|
export * as TestEventUtils from "./events";
|
3
|
+
export * as JestUtils from "./jest";
|
3
4
|
export { default as IdMap } from "./id-map";
|
4
5
|
export * from "./init-modules";
|
5
|
-
export * as JestUtils from "./jest";
|
6
|
-
export * from "./medusa-test-runner";
|
7
6
|
export { default as MockEventBusService } from "./mock-event-bus-service";
|
8
7
|
export * from "./module-test-runner";
|
8
|
+
export * from "./medusa-test-runner";
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,YAAY,CAAA;AAC/C,OAAO,KAAK,cAAc,MAAM,UAAU,CAAA;AAC1C,OAAO,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,YAAY,CAAA;AAC/C,OAAO,KAAK,cAAc,MAAM,UAAU,CAAA;AAC1C,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AACnC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,UAAU,CAAA;AAC3C,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACzE,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA"}
|
package/dist/index.js
CHANGED
@@ -29,15 +29,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
29
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
30
30
|
};
|
31
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
32
|
-
exports.MockEventBusService = exports.
|
32
|
+
exports.MockEventBusService = exports.IdMap = exports.JestUtils = exports.TestEventUtils = exports.TestDatabaseUtils = void 0;
|
33
33
|
exports.TestDatabaseUtils = __importStar(require("./database"));
|
34
34
|
exports.TestEventUtils = __importStar(require("./events"));
|
35
|
+
exports.JestUtils = __importStar(require("./jest"));
|
35
36
|
var id_map_1 = require("./id-map");
|
36
37
|
Object.defineProperty(exports, "IdMap", { enumerable: true, get: function () { return __importDefault(id_map_1).default; } });
|
37
38
|
__exportStar(require("./init-modules"), exports);
|
38
|
-
exports.JestUtils = __importStar(require("./jest"));
|
39
|
-
__exportStar(require("./medusa-test-runner"), exports);
|
40
39
|
var mock_event_bus_service_1 = require("./mock-event-bus-service");
|
41
40
|
Object.defineProperty(exports, "MockEventBusService", { enumerable: true, get: function () { return __importDefault(mock_event_bus_service_1).default; } });
|
42
41
|
__exportStar(require("./module-test-runner"), exports);
|
42
|
+
__exportStar(require("./medusa-test-runner"), exports);
|
43
43
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAA+C;AAC/C,2DAA0C;AAC1C,mCAA2C;AAAlC,gHAAA,OAAO,OAAS;AACzB,iDAA8B;AAC9B,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAA+C;AAC/C,2DAA0C;AAC1C,oDAAmC;AACnC,mCAA2C;AAAlC,gHAAA,OAAO,OAAS;AACzB,iDAA8B;AAC9B,mEAAyE;AAAhE,8IAAA,OAAO,OAAuB;AACvC,uDAAoC;AACpC,uDAAoC"}
|
@@ -2,7 +2,7 @@ import type { MedusaAppLoader } from "@medusajs/framework";
|
|
2
2
|
/**
|
3
3
|
* Initiates the database connection
|
4
4
|
*/
|
5
|
-
export declare function initDb(): Promise<import("knex").Knex<any, any>>;
|
5
|
+
export declare function initDb(): Promise<import("@mikro-orm/knex").Knex<any, any>>;
|
6
6
|
/**
|
7
7
|
* Migrates the database
|
8
8
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-db.d.ts","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/use-db.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAI1D;;GAEG;AACH,wBAAsB,MAAM,
|
1
|
+
{"version":3,"file":"use-db.d.ts","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/use-db.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAI1D;;GAEG;AACH,wBAAsB,MAAM,sDAS3B;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,SAAS,EAAE,eAAe,iBAO/D;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,SAAS,EAAE,eAAe,iBAYzD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"module-test-runner.d.ts","sourceRoot":"","sources":["../src/module-test-runner.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"module-test-runner.d.ts","sourceRoot":"","sources":["../src/module-test-runner.ts"],"names":[],"mappings":"AAMA,OAAO,EAAsC,YAAY,EAAE,MAAM,YAAY,CAAA;AAG7E,MAAM,WAAW,YAAY,CAAC,QAAQ,GAAG,OAAO;IAC9C,eAAe,EAAE,YAAY,CAAA;IAC7B,SAAS,EAAE,GAAG,CAAA;IACd,OAAO,EAAE,QAAQ,CAAA;IACjB,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,CAAA;QACd,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF;AAED,wBAAgB,2BAA2B,CAAC,QAAQ,GAAG,GAAG,EAAE,EAC1D,UAAU,EACV,YAAY,EACZ,aAAkB,EAClB,YAAiB,EACjB,MAAiB,EACjB,KAAa,EACb,SAAS,EACT,OAAO,EACP,oBAAyB,GAC1B,EAAE;IACD,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,GAAG,EAAE,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACnC,YAAY,CAAC,EAAE,GAAG,EAAE,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAA;CACrD,QAuGA"}
|
@@ -1,13 +1,10 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
3
|
exports.moduleIntegrationTestRunner = void 0;
|
7
4
|
const utils_1 = require("@medusajs/utils");
|
5
|
+
const _1 = require(".");
|
8
6
|
const database_1 = require("./database");
|
9
7
|
const init_modules_1 = require("./init-modules");
|
10
|
-
const mock_event_bus_service_1 = __importDefault(require("./mock-event-bus-service"));
|
11
8
|
function moduleIntegrationTestRunner({ moduleName, moduleModels, moduleOptions = {}, joinerConfig = [], schema = "public", debug = false, testSuite, resolve, injectedDependencies = {}, }) {
|
12
9
|
const moduleSdkImports = require("@medusajs/modules-sdk");
|
13
10
|
process.env.LOG_LEVEL = "error";
|
@@ -40,7 +37,7 @@ function moduleIntegrationTestRunner({ moduleName, moduleModels, moduleOptions =
|
|
40
37
|
const moduleOptions_ = {
|
41
38
|
injectedDependencies: {
|
42
39
|
[utils_1.ContainerRegistrationKeys.PG_CONNECTION]: connection,
|
43
|
-
eventBusModuleService: new
|
40
|
+
eventBusModuleService: new _1.MockEventBusService(),
|
44
41
|
[utils_1.ContainerRegistrationKeys.LOGGER]: console,
|
45
42
|
...injectedDependencies,
|
46
43
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"module-test-runner.js","sourceRoot":"","sources":["../src/module-test-runner.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"module-test-runner.js","sourceRoot":"","sources":["../src/module-test-runner.ts"],"names":[],"mappings":";;;AAAA,2CAIwB;AACxB,wBAAuC;AACvC,yCAA6E;AAC7E,iDAAgE;AAYhE,SAAgB,2BAA2B,CAAiB,EAC1D,UAAU,EACV,YAAY,EACZ,aAAa,GAAG,EAAE,EAClB,YAAY,GAAG,EAAE,EACjB,MAAM,GAAG,QAAQ,EACjB,KAAK,GAAG,KAAK,EACb,SAAS,EACT,OAAO,EACP,oBAAoB,GAAG,EAAE,GAY1B;IACC,MAAM,gBAAgB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAA;IAEzD,OAAO,CAAC,GAAG,CAAC,SAAS,GAAG,OAAO,CAAA;IAE/B,YAAY,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC,CAAA;IACtE,YAAY,GAAG,IAAA,0BAAkB,EAAC,YAAY,CAAC,CAAA;IAE/C,MAAM,QAAQ,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4HC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "medusa-test-utils",
|
3
|
-
"version": "1.1.45-snapshot-
|
3
|
+
"version": "1.1.45-snapshot-20240823075240",
|
4
4
|
"description": "Test utils for Medusa",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"repository": {
|
@@ -24,17 +24,17 @@
|
|
24
24
|
"author": "Medusa",
|
25
25
|
"license": "MIT",
|
26
26
|
"devDependencies": {
|
27
|
-
"@medusajs/framework": "0.0.2-snapshot-
|
28
|
-
"@medusajs/types": "1.12.0-snapshot-
|
29
|
-
"@medusajs/utils": "1.12.0-snapshot-
|
27
|
+
"@medusajs/framework": "0.0.2-snapshot-20240823075240",
|
28
|
+
"@medusajs/types": "1.12.0-snapshot-20240823075240",
|
29
|
+
"@medusajs/utils": "1.12.0-snapshot-20240823075240",
|
30
30
|
"cross-env": "^5.2.1",
|
31
31
|
"jest": "^29.7.0",
|
32
32
|
"rimraf": "^3.0.2",
|
33
33
|
"typescript": "^5.1.6"
|
34
34
|
},
|
35
35
|
"peerDependencies": {
|
36
|
-
"@medusajs/medusa": "1.20.6-snapshot-
|
37
|
-
"@medusajs/modules-sdk": "1.13.0-snapshot-
|
36
|
+
"@medusajs/medusa": "1.20.6-snapshot-20240823075240",
|
37
|
+
"@medusajs/modules-sdk": "1.13.0-snapshot-20240823075240",
|
38
38
|
"@mikro-orm/core": "5.9.7",
|
39
39
|
"axios": "^0.28.0",
|
40
40
|
"express": "^4.18.3",
|
@@ -59,7 +59,7 @@
|
|
59
59
|
}
|
60
60
|
},
|
61
61
|
"dependencies": {
|
62
|
-
"@medusajs/utils": "1.12.0-snapshot-
|
62
|
+
"@medusajs/utils": "1.12.0-snapshot-20240823075240",
|
63
63
|
"@mikro-orm/migrations": "5.9.7",
|
64
64
|
"@mikro-orm/postgresql": "5.9.7",
|
65
65
|
"randomatic": "^3.1.1"
|