medusa-test-utils 1.1.45-snapshot-20240525075223 → 1.1.45-snapshot-20240528082138
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/id-map.d.ts +2 -2
- package/dist/id-map.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +1 -5
- package/dist/index.js.map +1 -1
- package/dist/init-modules.js +9 -6
- package/dist/init-modules.js.map +1 -1
- package/dist/medusa-test-runner-utils/bootstrap-app.d.ts +9 -5
- package/dist/medusa-test-runner-utils/bootstrap-app.js +69 -80
- package/dist/medusa-test-runner-utils/bootstrap-app.js.map +1 -1
- package/dist/medusa-test-runner-utils/use-db.d.ts +4 -12
- package/dist/medusa-test-runner-utils/use-db.js +52 -85
- package/dist/medusa-test-runner-utils/use-db.js.map +1 -1
- package/dist/medusa-test-runner.d.ts +1 -3
- package/dist/medusa-test-runner.js +34 -53
- package/dist/medusa-test-runner.js.map +1 -1
- package/dist/module-test-runner.js +5 -3
- package/dist/module-test-runner.js.map +1 -1
- package/package.json +6 -11
- package/dist/mock-manager.d.ts +0 -9
- package/dist/mock-manager.js +0 -30
- package/dist/mock-manager.js.map +0 -1
- package/dist/mock-repository.d.ts +0 -51
- package/dist/mock-repository.js +0 -193
- package/dist/mock-repository.js.map +0 -1
package/dist/id-map.d.ts
CHANGED
package/dist/id-map.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"id-map.js","sourceRoot":"","sources":["../src/id-map.
|
1
|
+
{"version":3,"file":"id-map.js","sourceRoot":"","sources":["../src/id-map.ts"],"names":[],"mappings":";;;;;AAAA,0DAAkC;AAElC;IAAA;QACE,QAAG,GAAG,EAAE,CAAA;IAYV,CAAC;IAVC,qBAAK,GAAL,UAAM,GAAG,EAAE,MAAW,EAAE,MAAW;QAAxB,uBAAA,EAAA,WAAW;QAAE,uBAAA,EAAA,WAAW;QACjC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YAClB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QACtB,CAAC;QAED,IAAM,EAAE,GAAG,UAAG,MAAM,IAAI,MAAM,GAAG,GAAG,SAAG,IAAA,oBAAS,EAAC,KAAK,EAAE,MAAM,CAAC,CAAE,CAAA;QACjE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAA;QAElB,OAAO,EAAE,CAAA;IACX,CAAC;IACH,YAAC;AAAD,CAAC,AAbD,IAaC;AAED,IAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAA;AAC5B,kBAAe,QAAQ,CAAA"}
|
package/dist/index.d.ts
CHANGED
@@ -2,8 +2,6 @@ export * as TestDatabaseUtils from "./database";
|
|
2
2
|
export * as TestEventUtils from "./events";
|
3
3
|
export * as JestUtils from "./jest";
|
4
4
|
export { default as IdMap } from "./id-map";
|
5
|
-
export { default as MockManager } from "./mock-manager";
|
6
|
-
export { default as MockRepository } from "./mock-repository";
|
7
5
|
export * from "./init-modules";
|
8
6
|
export { default as MockEventBusService } from "./mock-event-bus-service";
|
9
7
|
export * from "./module-test-runner";
|
package/dist/index.js
CHANGED
@@ -29,16 +29,12 @@ 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
35
|
exports.JestUtils = __importStar(require("./jest"));
|
36
36
|
var id_map_1 = require("./id-map");
|
37
37
|
Object.defineProperty(exports, "IdMap", { enumerable: true, get: function () { return __importDefault(id_map_1).default; } });
|
38
|
-
var mock_manager_1 = require("./mock-manager");
|
39
|
-
Object.defineProperty(exports, "MockManager", { enumerable: true, get: function () { return __importDefault(mock_manager_1).default; } });
|
40
|
-
var mock_repository_1 = require("./mock-repository");
|
41
|
-
Object.defineProperty(exports, "MockRepository", { enumerable: true, get: function () { return __importDefault(mock_repository_1).default; } });
|
42
38
|
__exportStar(require("./init-modules"), exports);
|
43
39
|
var mock_event_bus_service_1 = require("./mock-event-bus-service");
|
44
40
|
Object.defineProperty(exports, "MockEventBusService", { enumerable: true, get: function () { return __importDefault(mock_event_bus_service_1).default; } });
|
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,oDAAmC;AACnC,mCAA2C;AAAlC,gHAAA,OAAO,OAAS;AACzB
|
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"}
|
package/dist/init-modules.js
CHANGED
@@ -46,21 +46,24 @@ function initModules(_a) {
|
|
46
46
|
return __generator(this, function (_b) {
|
47
47
|
switch (_b.label) {
|
48
48
|
case 0:
|
49
|
-
if (!shouldDestroyConnectionAutomatically) return [3 /*break*/,
|
49
|
+
if (!shouldDestroyConnectionAutomatically) return [3 /*break*/, 3];
|
50
|
+
return [4 /*yield*/, medusaApp.onApplicationPrepareShutdown()];
|
51
|
+
case 1:
|
52
|
+
_b.sent();
|
50
53
|
return [4 /*yield*/, (0, utils_1.promiseAll)([
|
51
54
|
(_a = sharedPgConnection.context) === null || _a === void 0 ? void 0 : _a.destroy(),
|
52
55
|
sharedPgConnection.destroy(),
|
53
56
|
medusaApp.onApplicationShutdown(),
|
54
57
|
])];
|
55
|
-
case 1:
|
56
|
-
_b.sent();
|
57
|
-
return [3 /*break*/, 3];
|
58
58
|
case 2:
|
59
|
+
_b.sent();
|
60
|
+
return [3 /*break*/, 4];
|
61
|
+
case 3:
|
59
62
|
if (!preventConnectionDestroyWarning) {
|
60
63
|
console.info("You are using a custom shared connection. The connection won't be destroyed automatically.");
|
61
64
|
}
|
62
|
-
_b.label =
|
63
|
-
case
|
65
|
+
_b.label = 4;
|
66
|
+
case 4:
|
64
67
|
moduleSdkImports.MedusaModule.clearInstances();
|
65
68
|
return [2 /*return*/];
|
66
69
|
}
|
package/dist/init-modules.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"init-modules.js","sourceRoot":"","sources":["../src/init-modules.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,yCAIwB;AAkBxB,SAAsB,WAAW;wDAAC,EAMb;QAyBnB,SAAe,QAAQ;;;;;;iCACjB,oCAAoC,EAApC,wBAAoC;4BACtC,qBAAM,IAAA,kBAAU,EAAC;oCACf,MAAC,kBAA0B,CAAC,OAAO,0CAAE,OAAO,EAAE;oCAC7C,kBAA0B,CAAC,OAAO,EAAE;oCACrC,SAAS,CAAC,qBAAqB,EAAE;iCAClC,CAAC,EAAA;;4BAJF,SAIE,CAAA;;;4BAEF,IAAI,CAAC,+BAA+B,EAAE,CAAC;gCACrC,OAAO,CAAC,IAAI,CACV,4FAA4F,CAC7F,CAAA;4BACH,CAAC;;;4BAEH,gBAAgB,CAAC,YAAY,CAAC,cAAc,EAAE,CAAA;;;;;SAC/C;;
|
1
|
+
{"version":3,"file":"init-modules.js","sourceRoot":"","sources":["../src/init-modules.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,yCAIwB;AAkBxB,SAAsB,WAAW;wDAAC,EAMb;QAyBnB,SAAe,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EAAE,YAAY;4BAC5B,oBAAoB,sBAAA;yBACrB,CAAC,EAAA;;oBAJI,SAAS,GAAG,SAIhB;oBAqBF,sBAAO;4BACL,SAAS,WAAA;4BACT,QAAQ,UAAA;yBACT,EAAA;;;;CACF;AAtDD,kCAsDC"}
|
@@ -1,5 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
}): Promise<
|
1
|
+
import { MedusaContainer } from "@medusajs/types";
|
2
|
+
export declare function startApp({ cwd, env, }?: {
|
3
|
+
cwd?: string;
|
4
|
+
env?: Record<any, any>;
|
5
|
+
}): Promise<{
|
6
|
+
shutdown: () => Promise<void>;
|
7
|
+
container: MedusaContainer;
|
8
|
+
port: number;
|
9
|
+
}>;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
"use strict";
|
1
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
@@ -50,21 +51,15 @@ var __read = (this && this.__read) || function (o, n) {
|
|
50
51
|
}
|
51
52
|
return ar;
|
52
53
|
};
|
53
|
-
var
|
54
|
-
|
55
|
-
if (ar || !(i in from)) {
|
56
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
57
|
-
ar[i] = from[i];
|
58
|
-
}
|
59
|
-
}
|
60
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
54
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
55
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
61
56
|
};
|
62
|
-
|
63
|
-
|
64
|
-
var
|
65
|
-
var
|
66
|
-
var
|
67
|
-
var
|
57
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
58
|
+
exports.startApp = void 0;
|
59
|
+
var express_1 = __importDefault(require("express"));
|
60
|
+
var get_port_1 = __importDefault(require("get-port"));
|
61
|
+
var path_1 = require("path");
|
62
|
+
var utils_1 = require("@medusajs/utils");
|
68
63
|
function bootstrapApp() {
|
69
64
|
return __awaiter(this, arguments, void 0, function (_a) {
|
70
65
|
var app, loaders, _b, container, shutdown, PORT;
|
@@ -72,8 +67,8 @@ function bootstrapApp() {
|
|
72
67
|
return __generator(this, function (_e) {
|
73
68
|
switch (_e.label) {
|
74
69
|
case 0:
|
75
|
-
app =
|
76
|
-
if (isObject(env)) {
|
70
|
+
app = (0, express_1.default)();
|
71
|
+
if ((0, utils_1.isObject)(env)) {
|
77
72
|
Object.entries(env).forEach(function (_a) {
|
78
73
|
var _b = __read(_a, 2), k = _b[0], v = _b[1];
|
79
74
|
return (process.env[k] = v);
|
@@ -81,13 +76,12 @@ function bootstrapApp() {
|
|
81
76
|
}
|
82
77
|
loaders = require("@medusajs/medusa/dist/loaders").default;
|
83
78
|
return [4 /*yield*/, loaders({
|
84
|
-
directory:
|
79
|
+
directory: (0, path_1.resolve)(cwd || process.cwd()),
|
85
80
|
expressApp: app,
|
86
|
-
isTest: false,
|
87
81
|
})];
|
88
82
|
case 1:
|
89
83
|
_b = _e.sent(), container = _b.container, shutdown = _b.shutdown;
|
90
|
-
return [4 /*yield*/,
|
84
|
+
return [4 /*yield*/, (0, get_port_1.default)()];
|
91
85
|
case 2:
|
92
86
|
PORT = _e.sent();
|
93
87
|
return [2 /*return*/, {
|
@@ -100,67 +94,62 @@ function bootstrapApp() {
|
|
100
94
|
});
|
101
95
|
});
|
102
96
|
}
|
103
|
-
|
104
|
-
|
105
|
-
var
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
97
|
+
function startApp() {
|
98
|
+
return __awaiter(this, arguments, void 0, function (_a) {
|
99
|
+
var _b, app, port, container, medusaShutdown, expressServer, shutdown;
|
100
|
+
var _this = this;
|
101
|
+
var _c = _a === void 0 ? {} : _a, cwd = _c.cwd, _d = _c.env, env = _d === void 0 ? {} : _d;
|
102
|
+
return __generator(this, function (_e) {
|
103
|
+
switch (_e.label) {
|
104
|
+
case 0: return [4 /*yield*/, bootstrapApp({
|
105
|
+
cwd: cwd,
|
106
|
+
env: env,
|
107
|
+
})];
|
108
|
+
case 1:
|
109
|
+
_b = _e.sent(), app = _b.app, port = _b.port, container = _b.container, medusaShutdown = _b.shutdown;
|
110
|
+
shutdown = function () { return __awaiter(_this, void 0, void 0, function () {
|
111
|
+
return __generator(this, function (_a) {
|
112
|
+
switch (_a.label) {
|
113
|
+
case 0: return [4 /*yield*/, (0, utils_1.promiseAll)([expressServer.shutdown(), medusaShutdown()])];
|
114
|
+
case 1:
|
115
|
+
_a.sent();
|
116
|
+
if (typeof global !== "undefined" && (global === null || global === void 0 ? void 0 : global.gc)) {
|
117
|
+
global.gc();
|
118
|
+
}
|
119
|
+
return [2 /*return*/];
|
120
|
+
}
|
121
|
+
});
|
122
|
+
}); };
|
123
|
+
return [4 /*yield*/, new Promise(function (resolve, reject) {
|
124
|
+
var server = app
|
125
|
+
.listen(port)
|
126
|
+
.on("error", function (err) { return __awaiter(_this, void 0, void 0, function () {
|
127
|
+
return __generator(this, function (_a) {
|
128
|
+
switch (_a.label) {
|
129
|
+
case 0: return [4 /*yield*/, shutdown()];
|
130
|
+
case 1:
|
131
|
+
_a.sent();
|
132
|
+
return [2 /*return*/, reject(err)];
|
133
|
+
}
|
134
|
+
});
|
135
|
+
}); })
|
136
|
+
.on("listening", function () {
|
137
|
+
var _a;
|
138
|
+
(_a = process.send) === null || _a === void 0 ? void 0 : _a.call(process, port);
|
139
|
+
resolve({
|
140
|
+
shutdown: shutdown,
|
141
|
+
container: container,
|
142
|
+
port: port,
|
143
|
+
});
|
135
144
|
});
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
if (!err) return [3 /*break*/, 2];
|
143
|
-
return [4 /*yield*/, shutdown()];
|
144
|
-
case 1:
|
145
|
-
_a.sent();
|
146
|
-
return [2 /*return*/, reject(err)];
|
147
|
-
case 2:
|
148
|
-
process.send(port);
|
149
|
-
resolve({
|
150
|
-
shutdown: shutdown,
|
151
|
-
container: container,
|
152
|
-
port: port,
|
153
|
-
});
|
154
|
-
return [2 /*return*/];
|
155
|
-
}
|
156
|
-
});
|
157
|
-
}); });
|
158
|
-
expressServer = GracefulShutdownServer.create(server);
|
159
|
-
})];
|
160
|
-
case 2: return [2 /*return*/, _f.sent()];
|
161
|
-
}
|
162
|
-
});
|
145
|
+
// TODO: fix that once we find the appropriate place to put this util
|
146
|
+
var GracefulShutdownServer = require("@medusajs/medusa/dist/utils/graceful-shutdown-server").GracefulShutdownServer;
|
147
|
+
expressServer = GracefulShutdownServer.create(server);
|
148
|
+
})];
|
149
|
+
case 2: return [2 /*return*/, _e.sent()];
|
150
|
+
}
|
163
151
|
});
|
164
|
-
}
|
165
|
-
}
|
152
|
+
});
|
153
|
+
}
|
154
|
+
exports.startApp = startApp;
|
166
155
|
//# sourceMappingURL=bootstrap-app.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"bootstrap-app.js","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/bootstrap-app.
|
1
|
+
{"version":3,"file":"bootstrap-app.js","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/bootstrap-app.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAA6B;AAC7B,sDAA8B;AAC9B,6BAA8B;AAC9B,yCAAsD;AAGtD,SAAe,YAAY;wDAAC,EAGoB;;YAHpB,qBAGkB,EAAE,KAAA,EAF9C,GAAG,SAAA,EACH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AAE,EAAE,cAAc,EAAE,CAAC,CAAC,EAAA;;oCAA9D,SAA8D,CAAA;oCAE9D,IAAI,OAAO,MAAM,KAAK,WAAW,KAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,EAAE,CAAA,EAAE,CAAC;wCAChD,MAAM,CAAC,EAAE,EAAE,CAAA;oCACb,CAAC;;;;yBACF,CAAA;oBAEM,qBAAM,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;4BACvC,IAAM,MAAM,GAAG,GAAG;iCACf,MAAM,CAAC,IAAI,CAAC;iCACZ,EAAE,CAAC,OAAO,EAAE,UAAO,GAAG;;;gDACrB,qBAAM,QAAQ,EAAE,EAAA;;4CAAhB,SAAgB,CAAA;4CAChB,sBAAO,MAAM,CAAC,GAAG,CAAC,EAAA;;;iCACnB,CAAC;iCACD,EAAE,CAAC,WAAW,EAAE;;gCACf,MAAA,OAAO,CAAC,IAAI,wDAAG,IAAI,CAAC,CAAA;gCAEpB,OAAO,CAAC;oCACN,QAAQ,UAAA;oCACR,SAAS,WAAA;oCACT,IAAI,MAAA;iCACL,CAAC,CAAA;4BACJ,CAAC,CAAC,CAAA;4BAEJ,qEAAqE;4BAEnE,IAAA,sBAAsB,GACpB,OAAO,CAAC,sDAAsD,CAAC,uBAD3C,CAC2C;4BAEnE,aAAa,GAAG,sBAAsB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;wBACvD,CAAC,CAAC,EAAA;wBAvBF,sBAAO,SAuBL,EAAA;;;;CACH;AApDD,4BAoDC"}
|
@@ -1,12 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
env: any;
|
6
|
-
force_modules_migration: any;
|
7
|
-
dbUrl?: string | undefined;
|
8
|
-
dbSchema?: string | undefined;
|
9
|
-
}): Promise<{
|
10
|
-
dbDataSource: DataSource;
|
11
|
-
pgConnection: any;
|
12
|
-
}>;
|
1
|
+
export declare function initDb({ cwd, env, }: {
|
2
|
+
cwd: string;
|
3
|
+
env?: Record<any, any>;
|
4
|
+
}): Promise<any>;
|
@@ -1,14 +1,4 @@
|
|
1
|
-
|
2
|
-
__assign = Object.assign || function(t) {
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
-
s = arguments[i];
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
-
t[p] = s[p];
|
7
|
-
}
|
8
|
-
return t;
|
9
|
-
};
|
10
|
-
return __assign.apply(this, arguments);
|
11
|
-
};
|
1
|
+
"use strict";
|
12
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
13
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
@@ -61,80 +51,57 @@ var __read = (this && this.__read) || function (o, n) {
|
|
61
51
|
}
|
62
52
|
return ar;
|
63
53
|
};
|
64
|
-
|
65
|
-
|
66
|
-
var
|
67
|
-
var
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
case 0:
|
81
|
-
if (isObject(env)) {
|
82
|
-
Object.entries(env).forEach(function (_a) {
|
83
|
-
var _b = __read(_a, 2), k = _b[0], v = _b[1];
|
84
|
-
return (process.env[k] = v);
|
85
|
-
});
|
86
|
-
}
|
87
|
-
configModuleLoader = require("@medusajs/medusa/dist/loaders/config").default;
|
88
|
-
configModule = configModuleLoader(cwd);
|
89
|
-
featureFlagsLoader = require("@medusajs/medusa/dist/loaders/feature-flags").default;
|
90
|
-
featureFlagRouter = featureFlagsLoader(configModule);
|
91
|
-
getModuleSharedResources = require("@medusajs/medusa/dist/commands/utils/get-migrations").getModuleSharedResources;
|
92
|
-
_c = getModuleSharedResources(configModule, featureFlagRouter), moduleMigrations = _c.migrations, moduleModels = _c.models;
|
93
|
-
dbDataSource = new DataSource({
|
94
|
-
type: "postgres",
|
95
|
-
url: dbUrl || configModule.projectConfig.database_url,
|
96
|
-
entities: moduleModels,
|
97
|
-
migrations: moduleMigrations,
|
98
|
-
extra: database_extra !== null && database_extra !== void 0 ? database_extra : {},
|
99
|
-
//name: "integration-tests",
|
100
|
-
schema: dbSchema,
|
54
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
55
|
+
exports.initDb = void 0;
|
56
|
+
var utils_1 = require("@medusajs/utils");
|
57
|
+
var awilix_1 = require("awilix");
|
58
|
+
function initDb(_a) {
|
59
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
60
|
+
var container, configModule, pgConnection, featureFlagRouter, migrateMedusaApp, err_1;
|
61
|
+
var _c;
|
62
|
+
var cwd = _b.cwd, _d = _b.env, env = _d === void 0 ? {} : _d;
|
63
|
+
return __generator(this, function (_e) {
|
64
|
+
switch (_e.label) {
|
65
|
+
case 0:
|
66
|
+
if ((0, utils_1.isObject)(env)) {
|
67
|
+
Object.entries(env).forEach(function (_a) {
|
68
|
+
var _b = __read(_a, 2), k = _b[0], v = _b[1];
|
69
|
+
return (process.env[k] = v);
|
101
70
|
});
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
case 6: return [2 /*return*/, { dbDataSource: dbDataSource, pgConnection: pgConnection }];
|
135
|
-
}
|
136
|
-
});
|
71
|
+
}
|
72
|
+
container = (0, utils_1.createMedusaContainer)();
|
73
|
+
return [4 /*yield*/, require("@medusajs/medusa/dist/loaders/config").default(cwd)];
|
74
|
+
case 1:
|
75
|
+
configModule = _e.sent();
|
76
|
+
return [4 /*yield*/, require("@medusajs/medusa/dist/loaders/pg-connection").default({
|
77
|
+
configModule: configModule,
|
78
|
+
container: container,
|
79
|
+
})];
|
80
|
+
case 2:
|
81
|
+
pgConnection = _e.sent();
|
82
|
+
featureFlagRouter = require("@medusajs/medusa/dist/loaders/feature-flags").default(configModule);
|
83
|
+
container.register((_c = {},
|
84
|
+
_c[utils_1.ContainerRegistrationKeys.CONFIG_MODULE] = (0, awilix_1.asValue)(configModule),
|
85
|
+
_c[utils_1.ContainerRegistrationKeys.LOGGER] = (0, awilix_1.asValue)(console),
|
86
|
+
_c[utils_1.ContainerRegistrationKeys.PG_CONNECTION] = (0, awilix_1.asValue)(pgConnection),
|
87
|
+
_c[utils_1.ContainerRegistrationKeys.FEATURE_FLAG_ROUTER] = (0, awilix_1.asValue)(featureFlagRouter),
|
88
|
+
_c));
|
89
|
+
_e.label = 3;
|
90
|
+
case 3:
|
91
|
+
_e.trys.push([3, 5, , 6]);
|
92
|
+
migrateMedusaApp = require("@medusajs/medusa/dist/loaders/medusa-app").migrateMedusaApp;
|
93
|
+
return [4 /*yield*/, migrateMedusaApp({ configModule: configModule, container: container })];
|
94
|
+
case 4:
|
95
|
+
_e.sent();
|
96
|
+
return [3 /*break*/, 6];
|
97
|
+
case 5:
|
98
|
+
err_1 = _e.sent();
|
99
|
+
console.error("Something went wrong while running the migrations");
|
100
|
+
throw err_1;
|
101
|
+
case 6: return [2 /*return*/, pgConnection];
|
102
|
+
}
|
137
103
|
});
|
138
|
-
}
|
139
|
-
}
|
104
|
+
});
|
105
|
+
}
|
106
|
+
exports.initDb = initDb;
|
140
107
|
//# sourceMappingURL=use-db.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-db.js","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/use-db.
|
1
|
+
{"version":3,"file":"use-db.js","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/use-db.ts"],"names":[],"m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ACd,OAAO,CAAC,0CAA0C,CAAC,iBADrC,CACqC;oBACvD,qBAAM,gBAAgB,CAAC,EAAE,YAAY,cAAA,EAAE,SAAS,WAAA,EAAE,CAAC,EAAA;;oBAAnD,SAAmD,CAAA;;;;oBAEnD,OAAO,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAA;oBAClE,MAAM,KAAG,CAAA;wBAGX,sBAAO,YAAY,EAAA;;;;CACpB;AA3CD,wBA2CC"}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { MedusaContainer } from "@medusajs/types";
|
2
2
|
export interface MedusaSuiteOptions<TService = unknown> {
|
3
|
-
dbUtils: any;
|
4
3
|
dbConnection: any;
|
5
4
|
getContainer: () => MedusaContainer;
|
6
5
|
api: any;
|
@@ -10,12 +9,11 @@ export interface MedusaSuiteOptions<TService = unknown> {
|
|
10
9
|
clientUrl: string;
|
11
10
|
};
|
12
11
|
}
|
13
|
-
export declare function medusaIntegrationTestRunner({ moduleName, dbName, schema, env,
|
12
|
+
export declare function medusaIntegrationTestRunner({ moduleName, dbName, schema, env, debug, testSuite, }: {
|
14
13
|
moduleName?: string;
|
15
14
|
env?: Record<string, any>;
|
16
15
|
dbName?: string;
|
17
16
|
schema?: string;
|
18
17
|
debug?: boolean;
|
19
|
-
force_modules_migration?: boolean;
|
20
18
|
testSuite: <TService = unknown>(options: MedusaSuiteOptions<TService>) => void;
|
21
19
|
}): void;
|
@@ -63,17 +63,7 @@ var pgGodCredentials = {
|
|
63
63
|
host: DB_HOST,
|
64
64
|
};
|
65
65
|
var dbTestUtilFactory = function () { return ({
|
66
|
-
db_: null,
|
67
66
|
pgConnection_: null,
|
68
|
-
clear: function () {
|
69
|
-
return __awaiter(this, void 0, void 0, function () {
|
70
|
-
var _a;
|
71
|
-
return __generator(this, function (_b) {
|
72
|
-
(_a = this.db_) === null || _a === void 0 ? void 0 : _a.synchronize(true);
|
73
|
-
return [2 /*return*/];
|
74
|
-
});
|
75
|
-
});
|
76
|
-
},
|
77
67
|
create: function (dbName) {
|
78
68
|
return __awaiter(this, void 0, void 0, function () {
|
79
69
|
return __generator(this, function (_a) {
|
@@ -88,24 +78,23 @@ var dbTestUtilFactory = function () { return ({
|
|
88
78
|
},
|
89
79
|
teardown: function () {
|
90
80
|
return __awaiter(this, arguments, void 0, function (_a) {
|
91
|
-
var
|
81
|
+
var runRawQuery, tableNames, tableNames_1, tableNames_1_1, table_name, e_1_1;
|
92
82
|
var e_1, _b;
|
93
|
-
var _c = _a === void 0 ? {} : _a,
|
83
|
+
var _c = _a === void 0 ? {} : _a, schema = _c.schema;
|
94
84
|
return __generator(this, function (_d) {
|
95
85
|
switch (_d.label) {
|
96
86
|
case 0:
|
97
|
-
|
98
|
-
if (!this.db_) {
|
87
|
+
if (!this.pgConnection_) {
|
99
88
|
return [2 /*return*/];
|
100
89
|
}
|
101
|
-
|
90
|
+
runRawQuery = this.pgConnection_.raw.bind(this.pgConnection_);
|
102
91
|
schema !== null && schema !== void 0 ? schema : (schema = "public");
|
103
|
-
return [4 /*yield*/,
|
92
|
+
return [4 /*yield*/, runRawQuery("SET session_replication_role = 'replica';")];
|
104
93
|
case 1:
|
105
94
|
_d.sent();
|
106
|
-
return [4 /*yield*/,
|
95
|
+
return [4 /*yield*/, runRawQuery("SELECT table_name\n FROM information_schema.tables\n WHERE table_schema = '".concat(schema, "';"))];
|
107
96
|
case 2:
|
108
|
-
tableNames = _d.sent();
|
97
|
+
tableNames = (_d.sent()).rows;
|
109
98
|
_d.label = 3;
|
110
99
|
case 3:
|
111
100
|
_d.trys.push([3, 8, 9, 10]);
|
@@ -114,7 +103,7 @@ var dbTestUtilFactory = function () { return ({
|
|
114
103
|
case 4:
|
115
104
|
if (!!tableNames_1_1.done) return [3 /*break*/, 7];
|
116
105
|
table_name = tableNames_1_1.value.table_name;
|
117
|
-
return [4 /*yield*/,
|
106
|
+
return [4 /*yield*/, runRawQuery("DELETE\n FROM ".concat(schema, ".\"").concat(table_name, "\";"))];
|
118
107
|
case 5:
|
119
108
|
_d.sent();
|
120
109
|
_d.label = 6;
|
@@ -132,7 +121,7 @@ var dbTestUtilFactory = function () { return ({
|
|
132
121
|
}
|
133
122
|
finally { if (e_1) throw e_1.error; }
|
134
123
|
return [7 /*endfinally*/];
|
135
|
-
case 10: return [4 /*yield*/,
|
124
|
+
case 10: return [4 /*yield*/, runRawQuery("SET session_replication_role = 'origin';")];
|
136
125
|
case 11:
|
137
126
|
_d.sent();
|
138
127
|
return [2 /*return*/];
|
@@ -142,20 +131,17 @@ var dbTestUtilFactory = function () { return ({
|
|
142
131
|
},
|
143
132
|
shutdown: function (dbName) {
|
144
133
|
return __awaiter(this, void 0, void 0, function () {
|
145
|
-
var _a, _b, _c
|
146
|
-
return __generator(this, function (
|
147
|
-
switch (
|
148
|
-
case 0: return [4 /*yield*/, ((_a = this.
|
134
|
+
var _a, _b, _c;
|
135
|
+
return __generator(this, function (_d) {
|
136
|
+
switch (_d.label) {
|
137
|
+
case 0: return [4 /*yield*/, ((_b = (_a = this.pgConnection_) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.destroy())];
|
149
138
|
case 1:
|
150
|
-
|
151
|
-
return [4 /*yield*/, ((_c =
|
139
|
+
_d.sent();
|
140
|
+
return [4 /*yield*/, ((_c = this.pgConnection_) === null || _c === void 0 ? void 0 : _c.destroy())];
|
152
141
|
case 2:
|
153
|
-
|
154
|
-
return [4 /*yield*/, ((_d = this.pgConnection_) === null || _d === void 0 ? void 0 : _d.destroy())];
|
155
|
-
case 3:
|
156
|
-
_e.sent();
|
142
|
+
_d.sent();
|
157
143
|
return [4 /*yield*/, (0, pg_god_1.dropDatabase)({ databaseName: dbName, errorIfNonExist: false }, pgGodCredentials)];
|
158
|
-
case
|
144
|
+
case 3: return [2 /*return*/, _d.sent()];
|
159
145
|
}
|
160
146
|
});
|
161
147
|
});
|
@@ -163,7 +149,7 @@ var dbTestUtilFactory = function () { return ({
|
|
163
149
|
}); };
|
164
150
|
function medusaIntegrationTestRunner(_a) {
|
165
151
|
var _this = this;
|
166
|
-
var moduleName = _a.moduleName, dbName = _a.dbName, _b = _a.schema, schema = _b === void 0 ? "public" : _b, _c = _a.env, env = _c === void 0 ? {} : _c, _d = _a.
|
152
|
+
var moduleName = _a.moduleName, dbName = _a.dbName, _b = _a.schema, schema = _b === void 0 ? "public" : _b, _c = _a.env, env = _c === void 0 ? {} : _c, _d = _a.debug, debug = _d === void 0 ? false : _d, testSuite = _a.testSuite;
|
167
153
|
var tempName = parseInt(process.env.JEST_WORKER_ID || "1");
|
168
154
|
moduleName = moduleName !== null && moduleName !== void 0 ? moduleName : Math.random().toString(36).substring(7);
|
169
155
|
dbName !== null && dbName !== void 0 ? dbName : (dbName = "medusa-".concat(moduleName.toLowerCase(), "-integration-").concat(tempName));
|
@@ -195,7 +181,6 @@ function medusaIntegrationTestRunner(_a) {
|
|
195
181
|
var container;
|
196
182
|
var apiUtils;
|
197
183
|
var options = {
|
198
|
-
dbUtils: dbUtils,
|
199
184
|
api: new Proxy({}, {
|
200
185
|
get: function (target, prop) {
|
201
186
|
return apiUtils[prop];
|
@@ -203,14 +188,19 @@ function medusaIntegrationTestRunner(_a) {
|
|
203
188
|
}),
|
204
189
|
dbConnection: new Proxy({}, {
|
205
190
|
get: function (target, prop) {
|
206
|
-
return dbUtils.
|
191
|
+
return dbUtils.pgConnection_[prop];
|
207
192
|
},
|
208
193
|
}),
|
209
194
|
getContainer: function () { return container; },
|
195
|
+
dbConfig: {
|
196
|
+
dbName: dbName,
|
197
|
+
schema: schema,
|
198
|
+
clientUrl: dbConfig.clientUrl,
|
199
|
+
},
|
210
200
|
};
|
211
201
|
var isFirstTime = true;
|
212
202
|
var beforeAll_ = function () { return __awaiter(_this, void 0, void 0, function () {
|
213
|
-
var
|
203
|
+
var _a, error_1, containerRes, serverShutdownRes, portRes, _b, _c, shutdown_1, container_1, port, error_2, cancelTokenSource;
|
214
204
|
var _this = this;
|
215
205
|
return __generator(this, function (_d) {
|
216
206
|
switch (_d.label) {
|
@@ -220,44 +210,35 @@ function medusaIntegrationTestRunner(_a) {
|
|
220
210
|
_d.label = 2;
|
221
211
|
case 2:
|
222
212
|
_d.trys.push([2, 4, , 5]);
|
213
|
+
_a = dbUtils;
|
223
214
|
return [4 /*yield*/, (0, use_db_1.initDb)({
|
224
215
|
cwd: cwd,
|
225
216
|
env: env,
|
226
|
-
force_modules_migration: force_modules_migration,
|
227
|
-
database_extra: {},
|
228
|
-
dbUrl: dbConfig.clientUrl,
|
229
|
-
dbSchema: dbConfig.schema,
|
230
217
|
})];
|
231
218
|
case 3:
|
232
|
-
_a = _d.sent()
|
233
|
-
dataSourceRes = dbDataSource;
|
234
|
-
pgConnectionRes = pgConnection;
|
219
|
+
_a.pgConnection_ = _d.sent();
|
235
220
|
return [3 /*break*/, 5];
|
236
221
|
case 4:
|
237
222
|
error_1 = _d.sent();
|
238
223
|
console.error("Error initializing database", error_1 === null || error_1 === void 0 ? void 0 : error_1.message);
|
239
224
|
throw error_1;
|
240
225
|
case 5:
|
241
|
-
|
242
|
-
|
243
|
-
_d.label = 6;
|
244
|
-
case 6:
|
245
|
-
_d.trys.push([6, 8, , 9]);
|
246
|
-
return [4 /*yield*/, (0, bootstrap_app_1.startBootstrapApp)({
|
226
|
+
_d.trys.push([5, 7, , 8]);
|
227
|
+
return [4 /*yield*/, (0, bootstrap_app_1.startApp)({
|
247
228
|
cwd: cwd,
|
248
229
|
env: env,
|
249
230
|
})];
|
250
|
-
case
|
231
|
+
case 6:
|
251
232
|
_b = _d.sent(), _c = _b.shutdown, shutdown_1 = _c === void 0 ? function () { return void 0; } : _c, container_1 = _b.container, port = _b.port;
|
252
233
|
containerRes = container_1;
|
253
234
|
serverShutdownRes = shutdown_1;
|
254
235
|
portRes = port;
|
255
|
-
return [3 /*break*/,
|
256
|
-
case
|
236
|
+
return [3 /*break*/, 8];
|
237
|
+
case 7:
|
257
238
|
error_2 = _d.sent();
|
258
239
|
console.error("Error starting the app", error_2 === null || error_2 === void 0 ? void 0 : error_2.message);
|
259
240
|
throw error_2;
|
260
|
-
case
|
241
|
+
case 8:
|
261
242
|
cancelTokenSource = axios.CancelToken.source();
|
262
243
|
container = containerRes;
|
263
244
|
shutdown = function () { return __awaiter(_this, void 0, void 0, function () {
|
@@ -297,7 +278,7 @@ function medusaIntegrationTestRunner(_a) {
|
|
297
278
|
medusaAppLoaderRunner = require("@medusajs/medusa/dist/loaders/medusa-app").runModulesLoader;
|
298
279
|
return [4 /*yield*/, medusaAppLoaderRunner({
|
299
280
|
container: copiedContainer,
|
300
|
-
configModule: container.resolve(
|
281
|
+
configModule: container.resolve(utils_1.ContainerRegistrationKeys.CONFIG_MODULE),
|
301
282
|
})];
|
302
283
|
case 2:
|
303
284
|
_a.sent();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"medusa-test-runner.js","sourceRoot":"","sources":["../src/medusa-test-runner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,
|
1
|
+
{"version":3,"file":"medusa-test-runner.js","sourceRoot":"","sources":["../src/medusa-test-runner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAGwB;AACxB,iCAAqD;AACrD,uCAA2C;AAC3C,0EAAmE;AACnE,4DAA0D;AAE1D,IAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAA;AAEtC,IAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAA;AACnC,IAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAA;AAC3C,IAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAA;AAE3C,IAAM,gBAAgB,GAAG;IACvB,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,WAAW;IACrB,IAAI,EAAE,OAAO;CACd,CAAA;AAED,IAAM,iBA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__assign({
|
82
|
-
database: dbConfig,
|
83
|
-
}, database: dbConfig }, moduleOptions),
|
81
|
+
options: __assign({ database: dbConfig }, moduleOptions),
|
84
82
|
},
|
85
83
|
_b);
|
86
84
|
var moduleOptions_ = {
|
@@ -105,6 +103,10 @@ function moduleIntegrationTestRunner(_a) {
|
|
105
103
|
return moduleService[prop];
|
106
104
|
},
|
107
105
|
}),
|
106
|
+
dbConfig: {
|
107
|
+
schema: schema,
|
108
|
+
clientUrl: dbConfig.clientUrl,
|
109
|
+
},
|
108
110
|
};
|
109
111
|
var beforeEach_ = function () { return __awaiter(_this, void 0, void 0, function () {
|
110
112
|
var output;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"module-test-runner.js","sourceRoot":"","sources":["../src/module-test-runner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgE;AAChE,uCAA6E;AAE7E,sBAAuC;AACvC,yCAA4E;AAY5E,SAAgB,2BAA2B,CAAC,EAqB3C;;IArBD,
|
1
|
+
{"version":3,"file":"module-test-runner.js","sourceRoot":"","sources":["../src/module-test-runner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgE;AAChE,uCAA6E;AAE7E,sBAAuC;AACvC,yCAA4E;AAY5E,SAAgB,2BAA2B,CAAC,EAqB3C;;IArBD,iBA4HC;QA3HC,UAAU,gBAAA,EACV,YAAY,kBAAA,EACZ,qBAAkB,EAAlB,aAAa,mBAAG,EAAE,KAAA,EAClB,oBAAiB,EAAjB,YAAY,mBAAG,EAAE,KAAA,EACjB,cAAiB,EAAjB,MAAM,mBAAG,QAAQ,KAAA,EACjB,aAAa,EAAb,KAAK,mBAAG,KAAK,KAAA,EACb,SAAS,eAAA,EACT,OAAO,aAAA,EACP,4BAAyB,EAAzB,oBAAoB,mBAAG,EAAE,KAAA;IAazB,IAAM,gBA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,SAAS,CAAC,UAAU,CAAC,CAAA;QACrB,QAAQ,CAAC;;;;4BACP,qBAAM,CAAA,MAAC,UAAkB,CAAC,OAAO,0CAAE,OAAO,EAAE,CAAA,EAAA;;wBAA5C,SAA4C,CAAA;wBAC5C,qBAAO,UAAkB,CAAC,OAAO,EAAE,EAAA;;wBAAnC,SAAmC,CAAA;;;;aACpC,CAAC,CAAA;QAEF,SAAS,CAAC,OAAO,CAAC,CAAA;IACpB,CAAC,CAAC,CAAA;AACJ,CAAC;AA5HD,kEA4HC"}
|
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-20240528082138",
|
4
4
|
"description": "Test utils for Medusa",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"repository": {
|
@@ -24,20 +24,19 @@
|
|
24
24
|
"author": "Sebastian Rindom",
|
25
25
|
"license": "MIT",
|
26
26
|
"devDependencies": {
|
27
|
-
"@medusajs/types": "1.12.0-snapshot-
|
27
|
+
"@medusajs/types": "1.12.0-snapshot-20240528082138",
|
28
28
|
"cross-env": "^5.2.1",
|
29
29
|
"jest": "^25.5.4",
|
30
30
|
"rimraf": "^3.0.2",
|
31
31
|
"typescript": "^5.1.6"
|
32
32
|
},
|
33
33
|
"peerDependencies": {
|
34
|
-
"@medusajs/medusa": "1.20.6-snapshot-
|
35
|
-
"@medusajs/modules-sdk": "1.13.0-snapshot-
|
34
|
+
"@medusajs/medusa": "1.20.6-snapshot-20240528082138",
|
35
|
+
"@medusajs/modules-sdk": "1.13.0-snapshot-20240528082138",
|
36
36
|
"axios": "^0.28.0",
|
37
37
|
"express": "^4.18.3",
|
38
38
|
"get-port": "^5.1.0",
|
39
|
-
"pg-god": "^1.0.12"
|
40
|
-
"typeorm": "^0.2.43"
|
39
|
+
"pg-god": "^1.0.12"
|
41
40
|
},
|
42
41
|
"peerDependenciesMeta": {
|
43
42
|
"@medusajs/medusa": {
|
@@ -54,16 +53,12 @@
|
|
54
53
|
},
|
55
54
|
"pg-god": {
|
56
55
|
"optional": true
|
57
|
-
},
|
58
|
-
"typeorm": {
|
59
|
-
"optional": true
|
60
56
|
}
|
61
57
|
},
|
62
58
|
"dependencies": {
|
63
|
-
"@medusajs/utils": "1.12.0-snapshot-
|
59
|
+
"@medusajs/utils": "1.12.0-snapshot-20240528082138",
|
64
60
|
"@mikro-orm/migrations": "5.9.7",
|
65
61
|
"@mikro-orm/postgresql": "5.9.7",
|
66
|
-
"medusa-core-utils": "1.2.3-snapshot-20240525075223",
|
67
62
|
"randomatic": "^3.1.1"
|
68
63
|
},
|
69
64
|
"gitHead": "81a7ff73d012fda722f6e9ef0bd9ba0232d37808"
|
package/dist/mock-manager.d.ts
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
declare namespace _default {
|
2
|
-
namespace connection {
|
3
|
-
function getMetadata(target: any): any;
|
4
|
-
}
|
5
|
-
function getRepository(repo: any): any;
|
6
|
-
function withRepository(repo: any): any;
|
7
|
-
function transaction(isolationOrCb: any, cb: any): any;
|
8
|
-
}
|
9
|
-
export default _default;
|
package/dist/mock-manager.js
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.default = {
|
4
|
-
connection: {
|
5
|
-
getMetadata: function (target) {
|
6
|
-
var _a;
|
7
|
-
return ((_a = target["metadata"]) !== null && _a !== void 0 ? _a : {
|
8
|
-
columns: [],
|
9
|
-
});
|
10
|
-
},
|
11
|
-
},
|
12
|
-
getRepository: function (repo) {
|
13
|
-
return repo;
|
14
|
-
},
|
15
|
-
withRepository: function (repo) {
|
16
|
-
if (repo) {
|
17
|
-
return Object.assign(repo, { manager: this });
|
18
|
-
}
|
19
|
-
return repo;
|
20
|
-
},
|
21
|
-
transaction: function (isolationOrCb, cb) {
|
22
|
-
if (typeof isolationOrCb === "string") {
|
23
|
-
return cb(this);
|
24
|
-
}
|
25
|
-
else {
|
26
|
-
return isolationOrCb(this);
|
27
|
-
}
|
28
|
-
},
|
29
|
-
};
|
30
|
-
//# sourceMappingURL=mock-manager.js.map
|
package/dist/mock-manager.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"mock-manager.js","sourceRoot":"","sources":["../src/mock-manager.js"],"names":[],"mappings":";;AAAA,kBAAe;IACb,UAAU,EAAE;QACV,WAAW,EAAE,UAAC,MAAM;;YAClB,OAAO,CACL,MAAA,MAAM,CAAC,UAAU,CAAC,mCAAI;gBACpB,OAAO,EAAE,EAAE;aACZ,CACF,CAAA;QACH,CAAC;KACF;IAED,aAAa,EAAE,UAAU,IAAI;QAC3B,OAAO,IAAI,CAAA;IACb,CAAC;IAED,cAAc,EAAE,UAAU,IAAI;QAC5B,IAAI,IAAI,EAAE,CAAC;YACT,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAA;QAC/C,CAAC;QAED,OAAO,IAAI,CAAA;IACb,CAAC;IAED,WAAW,EAAE,UAAU,aAAa,EAAE,EAAE;QACtC,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE,CAAC;YACtC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAA;QACjB,CAAC;aAAM,CAAC;YACN,OAAO,aAAa,CAAC,IAAI,CAAC,CAAA;QAC5B,CAAC;IACH,CAAC;CACF,CAAA"}
|
@@ -1,51 +0,0 @@
|
|
1
|
-
declare function _default(methods?: {}): MockRepo;
|
2
|
-
export default _default;
|
3
|
-
declare class MockRepo {
|
4
|
-
constructor({ create, update, remove, softRemove, find, findDescendantsTree, findOne, findOneWithRelations, findOneOrFail, save, findAndCount, del, count, insertBulk, metadata, }: {
|
5
|
-
create: any;
|
6
|
-
update: any;
|
7
|
-
remove: any;
|
8
|
-
softRemove: any;
|
9
|
-
find: any;
|
10
|
-
findDescendantsTree: any;
|
11
|
-
findOne: any;
|
12
|
-
findOneWithRelations: any;
|
13
|
-
findOneOrFail: any;
|
14
|
-
save: any;
|
15
|
-
findAndCount: any;
|
16
|
-
del: any;
|
17
|
-
count: any;
|
18
|
-
insertBulk: any;
|
19
|
-
metadata: any;
|
20
|
-
});
|
21
|
-
create_: any;
|
22
|
-
update_: any;
|
23
|
-
remove_: any;
|
24
|
-
delete_: any;
|
25
|
-
softRemove_: any;
|
26
|
-
find_: any;
|
27
|
-
findDescendantsTree_: any;
|
28
|
-
findOne_: any;
|
29
|
-
findOneOrFail_: any;
|
30
|
-
save_: any;
|
31
|
-
findAndCount_: any;
|
32
|
-
findOneWithRelations_: any;
|
33
|
-
insertBulk_: any;
|
34
|
-
count_: any;
|
35
|
-
metadata: any;
|
36
|
-
setFindOne(fn: any): void;
|
37
|
-
insertBulk: jest.Mock<any, any>;
|
38
|
-
create: jest.Mock<any, any>;
|
39
|
-
softRemove: jest.Mock<any, any>;
|
40
|
-
remove: jest.Mock<any, any>;
|
41
|
-
update: jest.Mock<any, any>;
|
42
|
-
findOneOrFail: jest.Mock<any, any>;
|
43
|
-
findOneWithRelations: jest.Mock<any, any>;
|
44
|
-
findOne: jest.Mock<any, any>;
|
45
|
-
findDescendantsTree: jest.Mock<any, any>;
|
46
|
-
find: jest.Mock<any, any>;
|
47
|
-
save: jest.Mock<any, any>;
|
48
|
-
findAndCount: jest.Mock<any, any>;
|
49
|
-
count: jest.Mock<any, any>;
|
50
|
-
delete: jest.Mock<any, any>;
|
51
|
-
}
|
package/dist/mock-repository.js
DELETED
@@ -1,193 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __read = (this && this.__read) || function (o, n) {
|
3
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
4
|
-
if (!m) return o;
|
5
|
-
var i = m.call(o), r, ar = [], e;
|
6
|
-
try {
|
7
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
8
|
-
}
|
9
|
-
catch (error) { e = { error: error }; }
|
10
|
-
finally {
|
11
|
-
try {
|
12
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
13
|
-
}
|
14
|
-
finally { if (e) throw e.error; }
|
15
|
-
}
|
16
|
-
return ar;
|
17
|
-
};
|
18
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
19
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
20
|
-
if (ar || !(i in from)) {
|
21
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
22
|
-
ar[i] = from[i];
|
23
|
-
}
|
24
|
-
}
|
25
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
26
|
-
};
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
28
|
-
var MockRepo = /** @class */ (function () {
|
29
|
-
function MockRepo(_a) {
|
30
|
-
var create = _a.create, update = _a.update, remove = _a.remove, softRemove = _a.softRemove, find = _a.find, findDescendantsTree = _a.findDescendantsTree, findOne = _a.findOne, findOneWithRelations = _a.findOneWithRelations, findOneOrFail = _a.findOneOrFail, save = _a.save, findAndCount = _a.findAndCount, del = _a.del, count = _a.count, insertBulk = _a.insertBulk, metadata = _a.metadata;
|
31
|
-
var _this = this;
|
32
|
-
this.insertBulk = jest.fn().mockImplementation(function () {
|
33
|
-
var args = [];
|
34
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
35
|
-
args[_i] = arguments[_i];
|
36
|
-
}
|
37
|
-
if (_this.insertBulk_) {
|
38
|
-
return _this.insertBulk_.apply(_this, __spreadArray([], __read(args), false));
|
39
|
-
}
|
40
|
-
return {};
|
41
|
-
});
|
42
|
-
this.create = jest.fn().mockImplementation(function () {
|
43
|
-
var args = [];
|
44
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
45
|
-
args[_i] = arguments[_i];
|
46
|
-
}
|
47
|
-
if (_this.create_) {
|
48
|
-
return _this.create_.apply(_this, __spreadArray([], __read(args), false));
|
49
|
-
}
|
50
|
-
return {};
|
51
|
-
});
|
52
|
-
this.softRemove = jest.fn().mockImplementation(function () {
|
53
|
-
var args = [];
|
54
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
55
|
-
args[_i] = arguments[_i];
|
56
|
-
}
|
57
|
-
if (_this.softRemove_) {
|
58
|
-
return _this.softRemove_.apply(_this, __spreadArray([], __read(args), false));
|
59
|
-
}
|
60
|
-
return {};
|
61
|
-
});
|
62
|
-
this.remove = jest.fn().mockImplementation(function () {
|
63
|
-
var args = [];
|
64
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
65
|
-
args[_i] = arguments[_i];
|
66
|
-
}
|
67
|
-
if (_this.remove_) {
|
68
|
-
return _this.remove_.apply(_this, __spreadArray([], __read(args), false));
|
69
|
-
}
|
70
|
-
return {};
|
71
|
-
});
|
72
|
-
this.update = jest.fn().mockImplementation(function () {
|
73
|
-
var args = [];
|
74
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
75
|
-
args[_i] = arguments[_i];
|
76
|
-
}
|
77
|
-
if (_this.update_) {
|
78
|
-
return _this.update_.apply(_this, __spreadArray([], __read(args), false));
|
79
|
-
}
|
80
|
-
});
|
81
|
-
this.findOneOrFail = jest.fn().mockImplementation(function () {
|
82
|
-
var args = [];
|
83
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
84
|
-
args[_i] = arguments[_i];
|
85
|
-
}
|
86
|
-
if (_this.findOneOrFail_) {
|
87
|
-
return _this.findOneOrFail_.apply(_this, __spreadArray([], __read(args), false));
|
88
|
-
}
|
89
|
-
});
|
90
|
-
this.findOneWithRelations = jest.fn().mockImplementation(function () {
|
91
|
-
var args = [];
|
92
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
93
|
-
args[_i] = arguments[_i];
|
94
|
-
}
|
95
|
-
if (_this.findOneWithRelations_) {
|
96
|
-
return _this.findOneWithRelations_.apply(_this, __spreadArray([], __read(args), false));
|
97
|
-
}
|
98
|
-
});
|
99
|
-
this.findOne = jest.fn().mockImplementation(function () {
|
100
|
-
var args = [];
|
101
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
102
|
-
args[_i] = arguments[_i];
|
103
|
-
}
|
104
|
-
if (_this.findOne_) {
|
105
|
-
return _this.findOne_.apply(_this, __spreadArray([], __read(args), false));
|
106
|
-
}
|
107
|
-
});
|
108
|
-
this.findDescendantsTree = jest.fn().mockImplementation(function () {
|
109
|
-
var args = [];
|
110
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
111
|
-
args[_i] = arguments[_i];
|
112
|
-
}
|
113
|
-
if (_this.findDescendantsTree_) {
|
114
|
-
return _this.findDescendantsTree_.apply(_this, __spreadArray([], __read(args), false));
|
115
|
-
}
|
116
|
-
});
|
117
|
-
this.find = jest.fn().mockImplementation(function () {
|
118
|
-
var args = [];
|
119
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
120
|
-
args[_i] = arguments[_i];
|
121
|
-
}
|
122
|
-
if (_this.find_) {
|
123
|
-
return _this.find_.apply(_this, __spreadArray([], __read(args), false));
|
124
|
-
}
|
125
|
-
});
|
126
|
-
this.save = jest.fn().mockImplementation(function () {
|
127
|
-
var args = [];
|
128
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
129
|
-
args[_i] = arguments[_i];
|
130
|
-
}
|
131
|
-
if (_this.save_) {
|
132
|
-
return _this.save_.apply(_this, __spreadArray([], __read(args), false));
|
133
|
-
}
|
134
|
-
return Promise.resolve.apply(Promise, __spreadArray([], __read(args), false));
|
135
|
-
});
|
136
|
-
this.findAndCount = jest.fn().mockImplementation(function () {
|
137
|
-
var args = [];
|
138
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
139
|
-
args[_i] = arguments[_i];
|
140
|
-
}
|
141
|
-
if (_this.findAndCount_) {
|
142
|
-
return _this.findAndCount_.apply(_this, __spreadArray([], __read(args), false));
|
143
|
-
}
|
144
|
-
return {};
|
145
|
-
});
|
146
|
-
this.count = jest.fn().mockImplementation(function () {
|
147
|
-
var args = [];
|
148
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
149
|
-
args[_i] = arguments[_i];
|
150
|
-
}
|
151
|
-
if (_this.count_) {
|
152
|
-
return _this.count_.apply(_this, __spreadArray([], __read(args), false));
|
153
|
-
}
|
154
|
-
return {};
|
155
|
-
});
|
156
|
-
this.delete = jest.fn().mockImplementation(function () {
|
157
|
-
var args = [];
|
158
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
159
|
-
args[_i] = arguments[_i];
|
160
|
-
}
|
161
|
-
if (_this.delete_) {
|
162
|
-
return _this.delete_.apply(_this, __spreadArray([], __read(args), false));
|
163
|
-
}
|
164
|
-
return {};
|
165
|
-
});
|
166
|
-
this.create_ = create;
|
167
|
-
this.update_ = update;
|
168
|
-
this.remove_ = remove;
|
169
|
-
this.delete_ = del;
|
170
|
-
this.softRemove_ = softRemove;
|
171
|
-
this.find_ = find;
|
172
|
-
this.findDescendantsTree_ = findDescendantsTree;
|
173
|
-
this.findOne_ = findOne;
|
174
|
-
this.findOneOrFail_ = findOneOrFail;
|
175
|
-
this.save_ = save;
|
176
|
-
this.findAndCount_ = findAndCount;
|
177
|
-
this.findOneWithRelations_ = findOneWithRelations;
|
178
|
-
this.insertBulk_ = insertBulk;
|
179
|
-
this.count_ = count;
|
180
|
-
this.metadata = metadata !== null && metadata !== void 0 ? metadata : {
|
181
|
-
columns: [],
|
182
|
-
};
|
183
|
-
}
|
184
|
-
MockRepo.prototype.setFindOne = function (fn) {
|
185
|
-
this.findOne_ = fn;
|
186
|
-
};
|
187
|
-
return MockRepo;
|
188
|
-
}());
|
189
|
-
exports.default = (function (methods) {
|
190
|
-
if (methods === void 0) { methods = {}; }
|
191
|
-
return new MockRepo(methods);
|
192
|
-
});
|
193
|
-
//# sourceMappingURL=mock-repository.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"mock-repository.js","sourceRoot":"","sources":["../src/mock-repository.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;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