medusa-test-utils 1.1.45-preview-20240925143312 → 1.1.45-preview-20240930111314

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. package/dist/database.js +4 -4
  2. package/dist/database.js.map +1 -1
  3. package/dist/events.d.ts +1 -1
  4. package/dist/events.d.ts.map +1 -1
  5. package/dist/events.js +2 -3
  6. package/dist/events.js.map +1 -1
  7. package/dist/id-map.js +3 -1
  8. package/dist/id-map.js.map +1 -1
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +1 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/init-modules.d.ts +1 -1
  14. package/dist/init-modules.d.ts.map +1 -1
  15. package/dist/init-modules.js +3 -4
  16. package/dist/init-modules.js.map +1 -1
  17. package/dist/jest.js +1 -2
  18. package/dist/jest.js.map +1 -1
  19. package/dist/medusa-test-runner-utils/bootstrap-app.d.ts +1 -1
  20. package/dist/medusa-test-runner-utils/bootstrap-app.d.ts.map +1 -1
  21. package/dist/medusa-test-runner-utils/bootstrap-app.js +3 -4
  22. package/dist/medusa-test-runner-utils/bootstrap-app.js.map +1 -1
  23. package/dist/medusa-test-runner-utils/clear-instances.js +2 -3
  24. package/dist/medusa-test-runner-utils/clear-instances.js.map +1 -1
  25. package/dist/medusa-test-runner-utils/config.d.ts.map +1 -1
  26. package/dist/medusa-test-runner-utils/config.js +4 -4
  27. package/dist/medusa-test-runner-utils/config.js.map +1 -1
  28. package/dist/medusa-test-runner-utils/use-db.d.ts +1 -1
  29. package/dist/medusa-test-runner-utils/use-db.d.ts.map +1 -1
  30. package/dist/medusa-test-runner-utils/use-db.js +5 -8
  31. package/dist/medusa-test-runner-utils/use-db.js.map +1 -1
  32. package/dist/medusa-test-runner-utils/utils.d.ts.map +1 -1
  33. package/dist/medusa-test-runner-utils/utils.js +2 -3
  34. package/dist/medusa-test-runner-utils/utils.js.map +1 -1
  35. package/dist/medusa-test-runner.d.ts +2 -2
  36. package/dist/medusa-test-runner.d.ts.map +1 -1
  37. package/dist/medusa-test-runner.js +13 -18
  38. package/dist/medusa-test-runner.js.map +1 -1
  39. package/dist/mock-event-bus-service.d.ts +1 -1
  40. package/dist/mock-event-bus-service.d.ts.map +1 -1
  41. package/dist/module-test-runner.d.ts +2 -1
  42. package/dist/module-test-runner.d.ts.map +1 -1
  43. package/dist/module-test-runner.js +5 -5
  44. package/dist/module-test-runner.js.map +1 -1
  45. package/dist/tsconfig.tsbuildinfo +1 -0
  46. package/package.json +21 -16
package/dist/database.js CHANGED
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dbTestUtilFactory = exports.getMikroOrmWrapper = exports.getMikroOrmConfig = exports.getDatabaseURL = void 0;
3
+ exports.dbTestUtilFactory = void 0;
4
+ exports.getDatabaseURL = getDatabaseURL;
5
+ exports.getMikroOrmConfig = getMikroOrmConfig;
6
+ exports.getMikroOrmWrapper = getMikroOrmWrapper;
4
7
  const postgresql_1 = require("@mikro-orm/postgresql");
5
8
  const pg_god_1 = require("pg-god");
6
9
  const DB_HOST = process.env.DB_HOST ?? "localhost";
@@ -18,7 +21,6 @@ function getDatabaseURL(dbName) {
18
21
  const DB_NAME = dbName ?? process.env.DB_TEMP_NAME;
19
22
  return `postgres://${DB_USERNAME}${DB_PASSWORD ? `:${DB_PASSWORD}` : ""}@${DB_HOST}/${DB_NAME}`;
20
23
  }
21
- exports.getDatabaseURL = getDatabaseURL;
22
24
  function getMikroOrmConfig({ mikroOrmEntities, pathToMigrations, clientUrl, schema, }) {
23
25
  const DB_URL = clientUrl ?? getDatabaseURL();
24
26
  return {
@@ -36,7 +38,6 @@ function getMikroOrmConfig({ mikroOrmEntities, pathToMigrations, clientUrl, sche
36
38
  },
37
39
  };
38
40
  }
39
- exports.getMikroOrmConfig = getMikroOrmConfig;
40
41
  function getMikroOrmWrapper({ mikroOrmEntities, pathToMigrations, clientUrl, schema, }) {
41
42
  return {
42
43
  mikroOrmEntities,
@@ -107,7 +108,6 @@ function getMikroOrmWrapper({ mikroOrmEntities, pathToMigrations, clientUrl, sch
107
108
  },
108
109
  };
109
110
  }
110
- exports.getMikroOrmWrapper = getMikroOrmWrapper;
111
111
  const dbTestUtilFactory = () => ({
112
112
  pgConnection_: null,
113
113
  create: async function (dbName) {
@@ -1 +1 @@
1
- {"version":3,"file":"database.js","sourceRoot":"","sources":["../src/database.ts"],"names":[],"mappings":";;;AAAA,sDAA2E;AAC3E,mCAAqD;AAErD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,WAAW,CAAA;AAClD,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAA;AACjD,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAA;AAEjD,MAAM,gBAAgB,GAAG;IACvB,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,WAAW;IACrB,IAAI,EAAE,OAAO;CACd,CAAA;AAED,SAAgB,cAAc,CAAC,MAAe;IAC5C,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,WAAW,CAAA;IAClD,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAA;IACjD,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAA;IAC3C,MAAM,OAAO,GAAG,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,CAAA;IAElD,OAAO,cAAc,WAAW,GAC9B,WAAW,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC,CAAC,EACpC,IAAI,OAAO,IAAI,OAAO,EAAE,CAAA;AAC1B,CAAC;AATD,wCASC;AAED,SAAgB,iBAAiB,CAAC,EAChC,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,MAAM,GAMP;IACC,MAAM,MAAM,GAAG,SAAS,IAAI,cAAc,EAAE,CA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MAAM,KAAK,QAAQ,CAAA;QAEnB,MAAM,WAAW,CAAC,2CAA2C,CAAC,CAAA;QAC9D,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,MAAM,WAAW,CAAC;;oEAEiB,MAAM,IAAI,CAAC,CAAA;QAE3E,KAAK,MAAM,EAAE,UAAU,EAAE,IAAI,UAAU,EAAE,CAAC;YACxC,MAAM,WAAW,CAAC;kCACU,MAAM,KAAK,UAAU,IAAI,CAAC,CAAA;QACxD,CAAC;QAED,MAAM,WAAW,CAAC,0CAA0C,CAAC,CAAA;IAC/D,CAAC;IAED,QAAQ,EAAE,KAAK,WAAW,MAAc;QACtC,MAAM,IAAI,CAAC,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,CAAA;QAC5C,MAAM,IAAI,CAAC,aAAa,EAAE,OAAO,EAAE,CAAA;QAEnC,OAAO,MAAM,IAAA,qBAAY,EACvB,EAAE,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,EAChD,gBAAgB,CACjB,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAzCW,QAAA,iBAAiB,qBAyC5B"}
package/dist/events.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { IEventBusModuleService } from "@medusajs/types";
1
+ import { IEventBusModuleService } from "@medusajs/framework/types";
2
2
  export declare const waitSubscribersExecution: (eventName: string, eventBus: IEventBusModuleService) => Promise<any[]>;
3
3
  //# sourceMappingURL=events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAIxD,eAAO,MAAM,wBAAwB,cACxB,MAAM,YACP,sBAAsB,mBAyCjC,CAAA"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAIlE,eAAO,MAAM,wBAAwB,cACxB,MAAM,YACP,sBAAsB,mBAwCjC,CAAA"}
package/dist/events.js CHANGED
@@ -8,10 +8,9 @@ const waitSubscribersExecution = (eventName, eventBus) => {
8
8
  const originalListeners = eventEmitter.listeners(eventName);
9
9
  // If there are no existing listeners, resolve once the event happens. Otherwise, wrap the existing subscribers in a promise and resolve once they are done.
10
10
  if (!eventEmitter.listeners(eventName).length) {
11
- let ok, nok;
12
- const promise = new Promise((resolve, reject) => {
11
+ let ok;
12
+ const promise = new Promise((resolve) => {
13
13
  ok = resolve;
14
- nok = reject;
15
14
  });
16
15
  subscriberPromises.push(promise);
17
16
  eventEmitter.on(eventName, ok);
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":";;;AAGA,4GAA4G;AACrG,MAAM,wBAAwB,GAAG,CACtC,SAAiB,EACjB,QAAgC,EAChC,EAAE;IACF,MAAM,YAAY,GAAkB,QAAgB,CAAC,aAAa,CAAA;IAClE,MAAM,kBAAkB,GAAmB,EAAE,CAAA;IAC7C,MAAM,iBAAiB,GAAG,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;IAE3D,4JAA4J;IAC5J,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC;QAC9C,IAAI,EAAE,EAAE,GAAG,CAAA;QACX,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC9C,EAAE,GAAG,OAAO,CAAA;YACZ,GAAG,GAAG,MAAM,CAAA;QACd,CAAC,CAAC,CAAA;QAEF,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAChC,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,CAAA;IAChC,CAAC;SAAM,CAAC;QACN,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC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,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAA;QAC1C,iBAAiB,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;YACrC,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,QAAkC,CAAC,CAAA;QAChE,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AA1CY,QAAA,wBAAwB,4BA0CpC"}
package/dist/id-map.js CHANGED
@@ -5,7 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const randomatic_1 = __importDefault(require("randomatic"));
7
7
  class IdMap {
8
- ids = {};
8
+ constructor() {
9
+ this.ids = {};
10
+ }
9
11
  getId(key, prefix = "", length = 10) {
10
12
  if (this.ids[key]) {
11
13
  return this.ids[key];
@@ -1 +1 @@
1
- {"version":3,"file":"id-map.js","sourceRoot":"","sources":["../src/id-map.ts"],"names":[],"mappings":";;;;;AAAA,4DAAkC;AAElC,MAAM,KAAK;IACT,GAAG,GAAG,EAAE,CAAA;IAER,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE;QACjC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YAClB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QACtB,CAAC;QAED,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,MAAM,GAAG,GAAG,GAAG,IAAA,oBAAS,EAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CAAA;QACjE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAA;QAElB,OAAO,EAAE,CAAA;IACX,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAA;AAC5B,kBAAe,QAAQ,CAAA"}
1
+ {"version":3,"file":"id-map.js","sourceRoot":"","sources":["../src/id-map.ts"],"names":[],"mappings":";;;;;AAAA,4DAAkC;AAElC,MAAM,KAAK;IAAX;QACE,QAAG,GAAG,EAAE,CAAA;IAYV,CAAC;IAVC,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE;QACjC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YAClB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QACtB,CAAC;QAED,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,MAAM,GAAG,GAAG,GAAG,IAAA,oBAAS,EAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CAAA;QACjE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAA;QAElB,OAAO,EAAE,CAAA;IACX,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAA;AAC5B,kBAAe,QAAQ,CAAA"}
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export { default as IdMap } from "./id-map";
4
4
  export * from "./init-modules";
5
5
  export * as JestUtils from "./jest";
6
6
  export * from "./medusa-test-runner";
7
- export * from "./medusa-test-runner-utils/";
7
+ export * from "./medusa-test-runner-utils";
8
8
  export { default as MockEventBusService } from "./mock-event-bus-service";
9
9
  export * from "./module-test-runner";
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -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,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,UAAU,CAAA;AAC3C,cAAc,gBAAgB,CAAA;AAC9B,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,6BAA6B,CAAA;AAC3C,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACzE,cAAc,sBAAsB,CAAA"}
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,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,UAAU,CAAA;AAC3C,cAAc,gBAAgB,CAAA;AAC9B,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,4BAA4B,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACzE,cAAc,sBAAsB,CAAA"}
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ Object.defineProperty(exports, "IdMap", { enumerable: true, get: function () { r
37
37
  __exportStar(require("./init-modules"), exports);
38
38
  exports.JestUtils = __importStar(require("./jest"));
39
39
  __exportStar(require("./medusa-test-runner"), exports);
40
- __exportStar(require("./medusa-test-runner-utils/"), exports);
40
+ __exportStar(require("./medusa-test-runner-utils"), exports);
41
41
  var mock_event_bus_service_1 = require("./mock-event-bus-service");
42
42
  Object.defineProperty(exports, "MockEventBusService", { enumerable: true, get: function () { return __importDefault(mock_event_bus_service_1).default; } });
43
43
  __exportStar(require("./module-test-runner"), exports);
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,oDAAmC;AACnC,uDAAoC;AACpC,8DAA2C;AAC3C,mEAAyE;AAAhE,8IAAA,OAAO,OAAuB;AACvC,uDAAoC"}
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,oDAAmC;AACnC,uDAAoC;AACpC,6DAA0C;AAC1C,mEAAyE;AAAhE,8IAAA,OAAO,OAAuB;AACvC,uDAAoC"}
@@ -1,4 +1,4 @@
1
- import { ExternalModuleDeclaration, InternalModuleDeclaration, ModuleJoinerConfig } from "@medusajs/types";
1
+ import { ExternalModuleDeclaration, InternalModuleDeclaration, ModuleJoinerConfig } from "@medusajs/framework/types";
2
2
  export interface InitModulesOptions {
3
3
  injectedDependencies?: Record<string, unknown>;
4
4
  databaseConfig: {
@@ -1 +1 @@
1
- {"version":3,"file":"init-modules.d.ts","sourceRoot":"","sources":["../src/init-modules.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,iBAAiB,CAAA;AAOxB,MAAM,WAAW,kBAAkB;IACjC,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9C,cAAc,EAAE;QACd,SAAS,EAAE,MAAM,CAAA;QACjB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;IACD,aAAa,EAAE;QACb,CAAC,GAAG,EAAE,MAAM,GACR,MAAM,GACN,OAAO,GACP,OAAO,CAAC,yBAAyB,GAAG,yBAAyB,CAAC,CAAA;KACnE,CAAA;IACD,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAA;IACnC,+BAA+B,CAAC,EAAE,OAAO,CAAA;CAC1C;AAED,wBAAsB,WAAW,CAAC,EAChC,oBAAoB,EACpB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,+BAAuC,GACxC,EAAE,kBAAkB;;;GAkDpB"}
1
+ {"version":3,"file":"init-modules.d.ts","sourceRoot":"","sources":["../src/init-modules.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAOlC,MAAM,WAAW,kBAAkB;IACjC,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9C,cAAc,EAAE;QACd,SAAS,EAAE,MAAM,CAAA;QACjB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;IACD,aAAa,EAAE;QACb,CAAC,GAAG,EAAE,MAAM,GACR,MAAM,GACN,OAAO,GACP,OAAO,CAAC,yBAAyB,GAAG,yBAAyB,CAAC,CAAA;KACnE,CAAA;IACD,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAA;IACnC,+BAA+B,CAAC,EAAE,OAAO,CAAA;CAC1C;AAED,wBAAsB,WAAW,CAAC,EAChC,oBAAoB,EACpB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,+BAAuC,GACxC,EAAE,kBAAkB;;;GAkDpB"}
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initModules = void 0;
4
- const utils_1 = require("@medusajs/utils");
3
+ exports.initModules = initModules;
4
+ const utils_1 = require("@medusajs/framework/utils");
5
5
  async function initModules({ injectedDependencies, databaseConfig, modulesConfig, joinerConfig, preventConnectionDestroyWarning = false, }) {
6
- const moduleSdkImports = require("@medusajs/modules-sdk");
6
+ const moduleSdkImports = require("@medusajs/framework/modules-sdk");
7
7
  injectedDependencies ??= {};
8
8
  let sharedPgConnection = injectedDependencies?.[utils_1.ContainerRegistrationKeys.PG_CONNECTION];
9
9
  let shouldDestroyConnectionAutomatically = !sharedPgConnection;
@@ -42,5 +42,4 @@ async function initModules({ injectedDependencies, databaseConfig, modulesConfig
42
42
  shutdown,
43
43
  };
44
44
  }
45
- exports.initModules = initModules;
46
45
  //# sourceMappingURL=init-modules.js.map
@@ -1 +1 @@
1
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,qBAAqB,EAAE;aAClC,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,+BAA+B,EAAE,CAAC;gBACrC,OAAO,CAAC,IAAI,CACV,4FAA4F,CAC7F,CAAA;YACH,CAAC;QACH,CAAC;QACD,gBAAgB,CAAC,YAAY,CAAC,cAAc,EAAE,CAAA;IAChD,CAAC;IAED,OAAO;QACL,SAAS;QACT,QAAQ;KACT,CAAA;AACH,CAAC"}
package/dist/jest.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.afterAllHookDropDatabase = void 0;
3
+ exports.afterAllHookDropDatabase = afterAllHookDropDatabase;
4
4
  const pg_god_1 = require("pg-god");
5
5
  function afterAllHookDropDatabase() {
6
6
  const DB_HOST = process.env.DB_HOST ?? "localhost";
@@ -21,5 +21,4 @@ function afterAllHookDropDatabase() {
21
21
  }
22
22
  });
23
23
  }
24
- exports.afterAllHookDropDatabase = afterAllHookDropDatabase;
25
24
  //# sourceMappingURL=jest.js.map
package/dist/jest.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"jest.js","sourceRoot":"","sources":["../src/jest.ts"],"names":[],"mappings":";;;AAAA,mCAAqC;AAErC,SAAgB,wBAAwB;IACtC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,WAAW,CAAA;IAClD,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,UAAU,CAAA;IACzD,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAA;IACjD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,EAAE,CAAA;IAE9C,MAAM,gBAAgB,GAAG;QACvB,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,WAAW;QACrB,IAAI,EAAE,OAAO;KACd,CAAA;IAED,QAAQ,CAAC,KAAK,IAAI,EAAE;QAClB,IAAI,CAAC;YACH,MAAM,IAAA,qBAAY,EAAC,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,gBAAgB,CAAC,CAAA;QACjE,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,KAAK,CACX,qIAAqI,CAAC,CAAC,OAAO,EAAE,CACjJ,CAAA;QACH,CAAC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AArBD,4DAqBC"}
1
+ {"version":3,"file":"jest.js","sourceRoot":"","sources":["../src/jest.ts"],"names":[],"mappings":";;AAEA,4DAqBC;AAvBD,mCAAqC;AAErC,SAAgB,wBAAwB;IACtC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,WAAW,CAAA;IAClD,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,UAAU,CAAA;IACzD,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAA;IACjD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,EAAE,CAAA;IAE9C,MAAM,gBAAgB,GAAG;QACvB,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,WAAW;QACrB,IAAI,EAAE,OAAO;KACd,CAAA;IAED,QAAQ,CAAC,KAAK,IAAI,EAAE;QAClB,IAAI,CAAC;YACH,MAAM,IAAA,qBAAY,EAAC,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,gBAAgB,CAAC,CAAA;QACjE,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,KAAK,CACX,qIAAqI,CAAC,CAAC,OAAO,EAAE,CACjJ,CAAA;QACH,CAAC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import { MedusaContainer } from "@medusajs/types";
1
+ import { MedusaContainer } from "@medusajs/framework/types";
2
2
  export declare function startApp({ cwd, env, }?: {
3
3
  cwd?: string;
4
4
  env?: Record<any, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrap-app.d.ts","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/bootstrap-app.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AA4BjD,wBAAsB,QAAQ,CAAC,EAC7B,GAAG,EACH,GAAQ,GACT,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;CAAO,GAAG,OAAO,CAAC;IACzD,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7B,SAAS,EAAE,eAAe,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb,CAAC,CAyCD"}
1
+ {"version":3,"file":"bootstrap-app.d.ts","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/bootstrap-app.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AA4B3D,wBAAsB,QAAQ,CAAC,EAC7B,GAAG,EACH,GAAQ,GACT,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;CAAO,GAAG,OAAO,CAAC;IACzD,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7B,SAAS,EAAE,eAAe,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb,CAAC,CAyCD"}
@@ -3,16 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.startApp = void 0;
6
+ exports.startApp = startApp;
7
7
  const express_1 = __importDefault(require("express"));
8
8
  const get_port_1 = __importDefault(require("get-port"));
9
9
  const path_1 = require("path");
10
10
  const utils_1 = require("./utils");
11
- const utils_2 = require("@medusajs/utils");
11
+ const utils_2 = require("@medusajs/framework/utils");
12
12
  async function bootstrapApp({ cwd, env = {}, } = {}) {
13
13
  const app = (0, express_1.default)();
14
14
  (0, utils_1.applyEnvVarsToProcess)(env);
15
- const loaders = require("@medusajs/medusa/dist/loaders").default;
15
+ const loaders = require("@medusajs/medusa/loaders/index").default;
16
16
  const { container, shutdown } = await loaders({
17
17
  directory: (0, path_1.resolve)(cwd || process.cwd()),
18
18
  expressApp: app,
@@ -56,5 +56,4 @@ async function startApp({ cwd, env = {}, } = {}) {
56
56
  expressServer = utils_2.GracefulShutdownServer.create(server);
57
57
  });
58
58
  }
59
- exports.startApp = startApp;
60
59
  //# sourceMappingURL=bootstrap-app.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrap-app.js","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/bootstrap-app.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA6B;AAC7B,wDAA8B;AAC9B,+BAA8B;AAE9B,mCAA+C;AAC/C,2CAAoE;AAEpE,KAAK,UAAU,YAAY,CAAC,EAC1B,GAAG,EACH,GAAG,GAAG,EAAE,MACoC,EAAE;IAC9C,MAAM,GAAG,GAAG,IAAA,iBAAO,GAAE,CAAA;IACrB,IAAA,6BAAqB,EAAC,GAAG,CAAC,CAAA;IAE1B,MAAM,OAAO,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC,OAAO,CAAA;IAEhE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,MAAM,OAAO,CAAC;QAC5C,SAAS,EAAE,IAAA,cAAO,EAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QACxC,UAAU,EAAE,GAAG;KAChB,CAAC,CAAA;IAEF,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC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AAM,IAAA,kBAAU,EAAC,CAAC,aAAa,EAAE,QAAQ,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC,CAAA;QAE/D,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,EAAE,EAAE,EAAE,CAAC;YAChD,MAAM,CAAC,EAAE,EAAE,CAAA;QACb,CAAC;IACH,CAAC,CAAA;IAED,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3C,MAAM,MAAM,GAAG,GAAG;aACf,MAAM,CAAC,IAAI,CAAC;aACZ,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;YACzB,MAAM,QAAQ,EAAE,CAAA;YAChB,OAAO,MAAM,CAAC,GAAG,CAAC,CAAA;QACpB,CAAC,CAAC;aACD,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE;YACpB,OAAO,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAA;YAEpB,OAAO,CAAC;gBACN,QAAQ;gBACR,SAAS;gBACT,IAAI;aACL,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QAEJ,qEAAqE;QACrE,aAAa,GAAG,8BAAsB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACvD,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.clearInstances = void 0;
3
+ exports.clearInstances = clearInstances;
4
4
  /**
5
5
  * cleanup temporary created resources for the migrations
6
6
  * @internal I didnt find a god place to put that, should we eventually add a close function
@@ -8,8 +8,7 @@ exports.clearInstances = void 0;
8
8
  * automatically just like we usually do for the classic migrations actions
9
9
  */
10
10
  async function clearInstances() {
11
- const { MedusaModule } = require("@medusajs/modules-sdk");
11
+ const { MedusaModule } = require("@medusajs/framework/modules-sdk");
12
12
  MedusaModule.clearInstances();
13
13
  }
14
- exports.clearInstances = clearInstances;
15
14
  //# sourceMappingURL=clear-instances.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"clear-instances.js","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/clear-instances.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACI,KAAK,UAAU,cAAc;IAClC,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAA;IACzD,YAAY,CAAC,cAAc,EAAE,CAAA;AAC/B,CAAC;AAHD,wCAGC"}
1
+ {"version":3,"file":"clear-instances.js","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/clear-instances.ts"],"names":[],"mappings":";;AAMA,wCAGC;AATD;;;;;GAKG;AACI,KAAK,UAAU,cAAc;IAClC,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAAA;IACnE,YAAY,CAAC,cAAc,EAAE,CAAA;AAC/B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/config.ts"],"names":[],"mappings":"AAEA,wBAAsB,oBAAoB,CACxC,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,iBA2BjD"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/config.ts"],"names":[],"mappings":"AAEA,wBAAsB,oBAAoB,CACxC,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,iBA4BjD"}
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.configLoaderOverride = void 0;
4
- const utils_1 = require("@medusajs/utils");
3
+ exports.configLoaderOverride = configLoaderOverride;
4
+ const utils_1 = require("@medusajs/framework/utils");
5
5
  async function configLoaderOverride(entryDirectory, override) {
6
- const { configManager } = await import("@medusajs/framework");
6
+ const { configManager } = await import("@medusajs/framework/config");
7
7
  const { configModule, error } = (0, utils_1.getConfigFile)(entryDirectory, "medusa-config.js");
8
8
  if (error) {
9
9
  throw new Error(error.message || "Error during config loading");
10
10
  }
11
+ configModule.projectConfig.databaseDriverOptions;
11
12
  configModule.projectConfig.databaseUrl = override.clientUrl;
12
13
  configModule.projectConfig.databaseLogging = !!override.debug;
13
14
  configModule.projectConfig.databaseDriverOptions =
@@ -24,5 +25,4 @@ async function configLoaderOverride(entryDirectory, override) {
24
25
  baseDir: entryDirectory,
25
26
  });
26
27
  }
27
- exports.configLoaderOverride = configLoaderOverride;
28
28
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/config.ts"],"names":[],"mappings":";;;AAAA,2CAA+C;AAExC,KAAK,UAAU,oBAAoB,CACxC,cAAsB,EACtB,QAAgD;IAEhD,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,CAAA;IAC7D,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,IAAA,qBAAa,EAE3C,cAAc,EAAE,kBAAkB,CAAC,CAAA;IAErC,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,IAAI,6BAA6B,CAAC,CAAA;IACjE,CAAC;IAED,YAAY,CAAC,aAAa,CAAC,WAAW,GAAG,QAAQ,CAAC,SAAS,CAAA;IAC3D,YAAY,CAAC,aAAa,CAAC,eAAe,GAAG,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAA;IAC7D,YAAY,CAAC,aAAa,CAAC,qBAAqB;QAC9C,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC;YACtC,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC;gBACE,UAAU,EAAE;oBACV,GAAG,EA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+1,5 @@
1
1
  import type { MedusaAppLoader } from "@medusajs/framework";
2
- import { MedusaContainer } from "@medusajs/types";
2
+ import { MedusaContainer } from "@medusajs/framework/types";
3
3
  /**
4
4
  * Initiates the database connection
5
5
  */
@@ -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;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAGjD;;GAEG;AACH,wBAAsB,MAAM,2CAS3B;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,SAAS,EAAE,eAAe,iBAO/D;AAED;;GAEG;AACH,wBAAsB,SAAS,CAC7B,SAAS,EAAE,eAAe,EAC1B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,eAAe,iBAe3B"}
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;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAG3D;;GAEG;AACH,wBAAsB,MAAM,2CAS3B;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,SAAS,EAAE,eAAe,iBAO/D;AAED;;GAEG;AACH,wBAAsB,SAAS,CAC7B,SAAS,EAAE,eAAe,EAC1B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,eAAe,iBAe3B"}
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.syncLinks = exports.migrateDatabase = exports.initDb = void 0;
3
+ exports.initDb = initDb;
4
+ exports.migrateDatabase = migrateDatabase;
5
+ exports.syncLinks = syncLinks;
4
6
  const path_1 = require("path");
5
- const utils_1 = require("@medusajs/utils");
7
+ const utils_1 = require("@medusajs/framework/utils");
6
8
  /**
7
9
  * Initiates the database connection
8
10
  */
@@ -12,7 +14,6 @@ async function initDb() {
12
14
  await featureFlagsLoader();
13
15
  return pgConnection;
14
16
  }
15
- exports.initDb = initDb;
16
17
  /**
17
18
  * Migrates the database
18
19
  */
@@ -25,7 +26,6 @@ async function migrateDatabase(appLoader) {
25
26
  throw err;
26
27
  }
27
28
  }
28
- exports.migrateDatabase = migrateDatabase;
29
29
  /**
30
30
  * Syncs links with the databse
31
31
  */
@@ -44,12 +44,9 @@ async function syncLinks(appLoader, directory, container) {
44
44
  throw err;
45
45
  }
46
46
  }
47
- exports.syncLinks = syncLinks;
48
47
  async function loadCustomLinks(directory, container) {
49
48
  // TODO: move to framework once settle down
50
- const { getResolvedPlugins } = await import(
51
- // @ts-expect-error
52
- "@medusajs/medusa/dist/loaders/helpers/resolve-plugins");
49
+ const { getResolvedPlugins, } = require("@medusajs/medusa/loaders/helpers/resolve-plugins");
53
50
  const configModule = container.resolve(utils_1.ContainerRegistrationKeys.CONFIG_MODULE);
54
51
  const plugins = getResolvedPlugins(directory, configModule, true) || [];
55
52
  const linksSourcePaths = plugins.map((plugin) => (0, path_1.join)(plugin.resolve, "links"));
@@ -1 +1 @@
1
- {"version":3,"file":"use-db.js","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/use-db.ts"],"names":[],"mappings":";;;AACA,+BAA2B;AAE3B,2CAA2D;AAE3D;;GAEG;AACI,KAAK,UAAU,MAAM;IAC1B,MAAM,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,GAAG,MAAM,MAAM,CAC7D,qBAAqB,CACtB,CAAA;IAED,MAAM,YAAY,GAAG,kBAAkB,EAAE,CAAA;IACzC,MAAM,kBAAkB,EAAE,CAAA;IAE1B,OAAO,YAAY,CAAA;AACrB,CAAC;AATD,wBASC;AAED;;GAEG;AACI,KAAK,UAAU,eAAe,CAAC,SAA0B;IAC9D,IAAI,CAAC;QACH,MAAM,SAAS,CAAC,oBAAoB,EAA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AgB,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC,SAAS,EAAE,CAAC,CAAA;QACnE,CAAC,CAAC,CAAA;QACF,MAAM,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAA;IACvC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAA;QACzD,MAAM,GAAG,CAAA;IACX,CAAC;AACH,CAAC;AAED,KAAK,UAAU,eAAe,CAAC,SAAiB,EAAE,SAA0B;IAC1E,2CAA2C;IAC3C,MAAM,EACJ,kBAAkB,GACnB,GAAG,OAAO,CAAC,kDAAkD,CAAC,CAAA;IAE/D,MAAM,YAAY,GAAG,SAAS,CAAC,OAAO,CACpC,iCAAyB,CAAC,aAAa,CACxC,CAAA;IACD,MAAM,OAAO,GAAG,kBAAkB,CAAC,SAAS,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,CAAA;IACvE,MAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAC9C,IAAA,WAAI,EAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAC9B,CAAA;IAED,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,CAAA;IAC1D,MAAM,IAAI,UAAU,CAAC,gBAAgB,CAAC,CAAC,IAAI,EAAE,CAAA;AAC/C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/utils.ts"],"names":[],"mappings":"AAGA,wBAAgB,qBAAqB,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,QAI3D"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/utils.ts"],"names":[],"mappings":"AAEA,wBAAgB,qBAAqB,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,QAI3D"}
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.applyEnvVarsToProcess = void 0;
4
- const utils_1 = require("@medusajs/utils");
3
+ exports.applyEnvVarsToProcess = applyEnvVarsToProcess;
4
+ const utils_1 = require("@medusajs/framework/utils");
5
5
  function applyEnvVarsToProcess(env) {
6
6
  if ((0, utils_1.isObject)(env)) {
7
7
  Object.entries(env).forEach(([k, v]) => (process.env[k] = v));
8
8
  }
9
9
  }
10
- exports.applyEnvVarsToProcess = applyEnvVarsToProcess;
11
10
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/utils.ts"],"names":[],"mappings":";;;AACA,2CAAqE;AAErE,SAAgB,qBAAqB,CAAC,GAAsB;IAC1D,IAAI,IAAA,gBAAQ,EAAC,GAAG,CAAC,EAAE,CAAC;QAClB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IAC/D,CAAC;AACH,CAAC;AAJD,sDAIC"}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/utils.ts"],"names":[],"mappings":";;AAEA,sDAIC;AAND,qDAAoD;AAEpD,SAAgB,qBAAqB,CAAC,GAAsB;IAC1D,IAAI,IAAA,gBAAQ,EAAC,GAAG,CAAC,EAAE,CAAC;QAClB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IAC/D,CAAC;AACH,CAAC"}
@@ -1,5 +1,5 @@
1
- import { MedusaAppOutput } from "@medusajs/modules-sdk";
2
- import { MedusaContainer } from "@medusajs/types";
1
+ import { MedusaAppOutput } from "@medusajs/framework/modules-sdk";
2
+ import { MedusaContainer } from "@medusajs/framework/types";
3
3
  export interface MedusaSuiteOptions {
4
4
  dbConnection: any;
5
5
  getContainer: () => MedusaContainer;
@@ -1 +1 @@
1
- {"version":3,"file":"medusa-test-runner.d.ts","sourceRoot":"","sources":["../src/medusa-test-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAiB,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAiBhE,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,GAAG,CAAA;IACjB,YAAY,EAAE,MAAM,eAAe,CAAA;IACnC,GAAG,EAAE,GAAG,CAAA;IACR,OAAO,EAAE;QACP,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;QACzC,QAAQ,EAAE,CAAC,OAAO,EAAE;YAAE,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;QACzD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;KAC5C,CAAA;IACD,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,CAAA;QACd,MAAM,EAAE,MAAM,CAAA;QACd,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;IACD,YAAY,EAAE,MAAM,eAAe,CAAA;CACpC;AAED,wBAAgB,2BAA2B,CAAC,EAC1C,UAAU,EACV,MAAM,EACN,gBAAgB,EAChB,MAAiB,EACjB,GAAQ,EACR,KAAa,EACb,KAAa,EACb,SAAS,GACV,EAAE;IACD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,CAAC,EAAE,MAAM,CAA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,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAA;CACjD,QAyKA"}
@@ -1,14 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.medusaIntegrationTestRunner = void 0;
4
- const utils_1 = require("@medusajs/utils");
3
+ exports.medusaIntegrationTestRunner = medusaIntegrationTestRunner;
4
+ const utils_1 = require("@medusajs/framework/utils");
5
5
  const awilix_1 = require("awilix");
6
6
  const database_1 = require("./database");
7
- const bootstrap_app_1 = require("./medusa-test-runner-utils/bootstrap-app");
8
- const clear_instances_1 = require("./medusa-test-runner-utils/clear-instances");
9
- const config_1 = require("./medusa-test-runner-utils/config");
10
- const use_db_1 = require("./medusa-test-runner-utils/use-db");
11
- const utils_2 = require("./medusa-test-runner-utils/utils");
7
+ const medusa_test_runner_utils_1 = require("./medusa-test-runner-utils");
12
8
  function medusaIntegrationTestRunner({ moduleName, dbName, medusaConfigFile, schema = "public", env = {}, debug = false, inApp = false, testSuite, }) {
13
9
  const tempName = parseInt(process.env.JEST_WORKER_ID || "1");
14
10
  moduleName = moduleName ?? Math.random().toString(36).substring(7);
@@ -47,8 +43,8 @@ function medusaIntegrationTestRunner({ moduleName, dbName, medusaConfigFile, sch
47
43
  };
48
44
  let isFirstTime = true;
49
45
  const beforeAll_ = async () => {
50
- await (0, config_1.configLoaderOverride)(cwd, dbConfig);
51
- (0, utils_2.applyEnvVarsToProcess)(env);
46
+ await (0, medusa_test_runner_utils_1.configLoaderOverride)(cwd, dbConfig);
47
+ (0, medusa_test_runner_utils_1.applyEnvVarsToProcess)(env);
52
48
  const { logger, container, MedusaAppLoader } = await import("@medusajs/framework");
53
49
  const appLoader = new MedusaAppLoader();
54
50
  container.register({
@@ -57,22 +53,22 @@ function medusaIntegrationTestRunner({ moduleName, dbName, medusaConfigFile, sch
57
53
  try {
58
54
  console.log(`Creating database ${dbName}`);
59
55
  await dbUtils.create(dbName);
60
- dbUtils.pgConnection_ = await (0, use_db_1.initDb)();
56
+ dbUtils.pgConnection_ = await (0, medusa_test_runner_utils_1.initDb)();
61
57
  }
62
58
  catch (error) {
63
59
  console.error("Error initializing database", error?.message);
64
60
  throw error;
65
61
  }
66
62
  console.log(`Migrating database with core migrations and links ${dbName}`);
67
- await (0, use_db_1.migrateDatabase)(appLoader);
68
- await (0, use_db_1.syncLinks)(appLoader, cwd, container);
69
- await (0, clear_instances_1.clearInstances)();
63
+ await (0, medusa_test_runner_utils_1.migrateDatabase)(appLoader);
64
+ await (0, medusa_test_runner_utils_1.syncLinks)(appLoader, cwd, container);
65
+ await (0, medusa_test_runner_utils_1.clearInstances)();
70
66
  let containerRes = container;
71
67
  let serverShutdownRes;
72
68
  let portRes;
73
69
  loadedApplication = await appLoader.load();
74
70
  try {
75
- const { shutdown = () => void 0, container: appContainer, port, } = await (0, bootstrap_app_1.startApp)({
71
+ const { shutdown = () => void 0, container: appContainer, port, } = await (0, medusa_test_runner_utils_1.startApp)({
76
72
  cwd,
77
73
  env,
78
74
  });
@@ -90,10 +86,10 @@ function medusaIntegrationTestRunner({ moduleName, dbName, medusaConfigFile, sch
90
86
  */
91
87
  if (inApp) {
92
88
  console.log(`Migrating database with core migrations and links ${dbName}`);
93
- await (0, use_db_1.migrateDatabase)(appLoader);
94
- await (0, use_db_1.syncLinks)(appLoader, cwd, containerRes);
89
+ await (0, medusa_test_runner_utils_1.migrateDatabase)(appLoader);
90
+ await (0, medusa_test_runner_utils_1.syncLinks)(appLoader, cwd, containerRes);
95
91
  }
96
- const axios = (await import("axios")).default.default;
92
+ const { default: axios } = (await import("axios"));
97
93
  const cancelTokenSource = axios.CancelToken.source();
98
94
  globalContainer = containerRes;
99
95
  shutdown = async () => {
@@ -145,5 +141,4 @@ function medusaIntegrationTestRunner({ moduleName, dbName, medusaConfigFile, sch
145
141
  testSuite(options);
146
142
  });
147
143
  }
148
- exports.medusaIntegrationTestRunner = medusaIntegrationTestRunner;
149
144
  //# sourceMappingURL=medusa-test-runner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"medusa-test-runner.js","sourceRoot":"","sources":["../src/medusa-test-runner.ts"],"names":[],"mappings":";;;AAEA,2CAGwB;AACxB,mCAAgC;AAChC,yCAA8D;AAC9D,4EAAmE;AACnE,gFAA2E;AAC3E,8DAAwE;AACxE,8DAI0C;AAC1C,4DAAwE;AAmBxE,SAAgB,2BAA2B,CAAC,EAC1C,UAAU,EACV,MAAM,EACN,gBAAgB,EAChB,MAAM,GAAG,QAAQ,EACjB,GAAG,GAAG,EAAE,EACR,KAAK,GAAG,KAAK,EACb,KAAK,GAAG,KAAK,EACb,SAAS,GAUV;IACC,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,GAAG,CAAC,CAAA;IAC5D,UAAU,GAAG,UAAU,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;IAClE,MAAM,KAAK,UAAU,UAAU,CAAC,WAAW,EAAE,gBAAgB,QAAQ,EAAE,CAAA;IAEvE,IAAI,QAAQ,GAAG;QACb,MAAM;QACN,SAAS,EAAE,IAAA,yBAAc,EAAC,MAAM,CAAC;QACjC,MAAM;QACN,KAAK;KACN,CAAA;IAED,MAAM,GAAG,GAAG,gBAAgB,IAAI,OAAO,CAAC,GAAG,EAAE,CAAA;IAE7C,IAAI,QAAQ,GAAG,KAAK,IAAI,EAAE,CAAC,KAAK,CAAC,CAAA;IACjC,MAAM,OAAO,GAAG,IAAA,4BAAiB,GAAE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AqB,CAAC,CAAA;YAE/D,MAAM,eAAe,GAAG,IAAI,eAAe,CAAC;gBAC1C,SAAS,EAAE,eAAe;aAC3B,CAAC,CAAA;YACF,MAAM,eAAe,CAAC,gBAAgB,EAAE,CAAA;QAC1C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,EAAE,OAAO,CAAC,CAAA;YAC7D,MAAM,KAAK,CAAA;QACb,CAAC;IACH,CAAC,CAAA;IAED,MAAM,UAAU,GAAG,KAAK,IAAI,EAAE;QAC5B,IAAI,CAAC;YACH,MAAM,OAAO,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QACpC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,EAAE,OAAO,CAAC,CAAA;YAC7D,MAAM,KAAK,CAAA;QACb,CAAC;IACH,CAAC,CAAA;IAED,OAAO,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE;QACvB,SAAS,CAAC,UAAU,CAAC,CAAA;QACrB,UAAU,CAAC,WAAW,CAAC,CAAA;QACvB,SAAS,CAAC,UAAU,CAAC,CAAA;QACrB,QAAQ,CAAC,KAAK,IAAI,EAAE;YAClB,MAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;YAC9B,MAAM,QAAQ,EAAE,CAAA;QAClB,CAAC,CAAC,CAAA;QAEF,SAAS,CAAC,OAAQ,CAAC,CAAA;IACrB,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import { EventBusTypes, IEventBusModuleService, Message, Subscriber } from "@medusajs/types";
1
+ import { EventBusTypes, IEventBusModuleService, Message, Subscriber } from "@medusajs/framework/types";
2
2
  export default class EventBusService implements IEventBusModuleService {
3
3
  emit<T>(data: Message<T> | Message<T>[], options: Record<string, unknown>): Promise<void>;
4
4
  subscribe(event: string | symbol, subscriber: Subscriber): this;
@@ -1 +1 @@
1
- {"version":3,"file":"mock-event-bus-service.d.ts","sourceRoot":"","sources":["../src/mock-event-bus-service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,OAAO,EACP,UAAU,EACX,MAAM,iBAAiB,CAAA;AAExB,MAAM,CAAC,OAAO,OAAO,eAAgB,YAAW,sBAAsB;IAC9D,IAAI,CAAC,CAAC,EACV,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,EAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,OAAO,CAAC,IAAI,CAAC;IAEhB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI;IAI/D,WAAW,CACT,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,aAAa,CAAC,iBAAiB,GACxC,IAAI;IAIP,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGxD"}
1
+ {"version":3,"file":"mock-event-bus-service.d.ts","sourceRoot":"","sources":["../src/mock-event-bus-service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,OAAO,EACP,UAAU,EACX,MAAM,2BAA2B,CAAA;AAElC,MAAM,CAAC,OAAO,OAAO,eAAgB,YAAW,sBAAsB;IAC9D,IAAI,CAAC,CAAC,EACV,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,EAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,OAAO,CAAC,IAAI,CAAC;IAEhB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI;IAI/D,WAAW,CACT,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,aAAa,CAAC,iBAAiB,GACxC,IAAI;IAIP,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGxD"}
@@ -8,10 +8,11 @@ export interface SuiteOptions<TService = unknown> {
8
8
  clientUrl: string;
9
9
  };
10
10
  }
11
- export declare function moduleIntegrationTestRunner<TService = any>({ moduleName, moduleModels, moduleOptions, joinerConfig, schema, debug, testSuite, resolve, injectedDependencies, }: {
11
+ export declare function moduleIntegrationTestRunner<TService = any>({ moduleName, moduleModels, moduleOptions, moduleDependencies, joinerConfig, schema, debug, testSuite, resolve, injectedDependencies, }: {
12
12
  moduleName: string;
13
13
  moduleModels?: any[];
14
14
  moduleOptions?: Record<string, any>;
15
+ moduleDependencies?: string[];
15
16
  joinerConfig?: any[];
16
17
  schema?: string;
17
18
  dbName?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"module-test-runner.d.ts","sourceRoot":"","sources":["../src/module-test-runner.ts"],"names":[],"mappings":"AAUA,OAAO,EAAsC,YAAY,EAAE,MAAM,YAAY,CAAA;AAI7E,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;AA0CD,wBAAgB,2BAA2B,CAAC,QAAQ,GAAG,GAAG,EAAE,EAC1D,UAAU,EACV,YAAY,EACZ,aAAkB,EAClB,YAAi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AAE,GAAG,CAAC,CAAA;IACnC,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC7B,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,QA2GA"}
@@ -26,8 +26,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.moduleIntegrationTestRunner = void 0;
30
- const utils_1 = require("@medusajs/utils");
29
+ exports.moduleIntegrationTestRunner = moduleIntegrationTestRunner;
30
+ const utils_1 = require("@medusajs/framework/utils");
31
31
  const fs = __importStar(require("fs"));
32
32
  const database_1 = require("./database");
33
33
  const init_modules_1 = require("./init-modules");
@@ -56,8 +56,8 @@ function createMikroOrmWrapper(options) {
56
56
  });
57
57
  return { MikroOrmWrapper, models: moduleModels };
58
58
  }
59
- function moduleIntegrationTestRunner({ moduleName, moduleModels, moduleOptions = {}, joinerConfig = [], schema = "public", debug = false, testSuite, resolve, injectedDependencies = {}, }) {
60
- const moduleSdkImports = require("@medusajs/modules-sdk");
59
+ function moduleIntegrationTestRunner({ moduleName, moduleModels, moduleOptions = {}, moduleDependencies, joinerConfig = [], schema = "public", debug = false, testSuite, resolve, injectedDependencies = {}, }) {
60
+ const moduleSdkImports = require("@medusajs/framework/modules-sdk");
61
61
  process.env.LOG_LEVEL = "error";
62
62
  const tempName = parseInt(process.env.JEST_WORKER_ID || "1");
63
63
  const dbName = `medusa-${moduleName.toLowerCase()}-integration-${tempName}`;
@@ -78,6 +78,7 @@ function moduleIntegrationTestRunner({ moduleName, moduleModels, moduleOptions =
78
78
  [moduleName]: {
79
79
  definition: moduleSdkImports.ModulesDefinition[moduleName],
80
80
  resolve,
81
+ dependencies: moduleDependencies,
81
82
  options: {
82
83
  database: dbConfig,
83
84
  ...moduleOptions,
@@ -143,5 +144,4 @@ function moduleIntegrationTestRunner({ moduleName, moduleModels, moduleOptions =
143
144
  testSuite(options);
144
145
  });
145
146
  }
146
- exports.moduleIntegrationTestRunner = moduleIntegrationTestRunner;
147
147
  //# sourceMappingURL=module-test-runner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"module-test-runner.js","sourceRoot":"","sources":["../src/module-test-runner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAQwB;AACxB,uCAAwB;AACxB,yCAA6E;AAC7E,iDAAgE;AAChE,sFAAyE;AAYzE,SAAS,qBAAqB,CAAC,OAI9B;IAIC,IAAI,YAAY,GACd,OAAO,CAAC,YAAY,IAAI,EAAE,CAAA;IAE5B,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;QAC1B,MAAM,QAAQ,GAAG,IAAA,qCAA6B,EAC5C,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,CACjC,CAAA;QAED,MAAM,UAAU,GAAG,EAAE,CAAC,UAAU,CAAC,GAAG,QAAQ,cAAc,CAAC;YACzD,CAAC,CAAC,cAAc;YAChB,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,QAAQ,SAAS,CAAC;gBACrC,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC,EAAE,CAAA;QAEN,IAAI,UAAU,EAAE,CAAC;YACf,YAAY,GAAG,IAAA,kBAAU,EAAC,GAAG,QAAQ,GAAG,UAAU,EAAE,CAAC,CAAA;QACvD,CAAC;aAAM,CAAC;YACN,YAAY,GAAG,EAAE,CAAA;QACnB,CAAC;IACH,CAAC;IA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/id-map.ts","../src/index.ts","../src/init-modules.ts","../src/jest.ts","../src/medusa-test-runner.ts","../src/mock-event-bus-service.ts","../src/module-test-runner.ts","../src/medusa-test-runner-utils/bootstrap-app.ts","../src/medusa-test-runner-utils/clear-instances.ts","../src/medusa-test-runner-utils/config.ts","../src/medusa-test-runner-utils/index.ts","../src/medusa-test-runner-utils/use-db.ts","../src/medusa-test-runner-utils/utils.ts"],"version":"5.6.2"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "medusa-test-utils",
3
- "version": "1.1.45-preview-20240925143312",
3
+ "version": "1.1.45-preview-20240930111314",
4
4
  "description": "Test utils for Medusa",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -9,7 +9,7 @@
9
9
  "directory": "packages/medusa-test-utils"
10
10
  },
11
11
  "engines": {
12
- "node": ">=16"
12
+ "node": ">=20"
13
13
  },
14
14
  "scripts": {
15
15
  "build": "rimraf dist && tsc --build",
@@ -17,37 +17,42 @@
17
17
  "test": "jest --passWithNoTests src"
18
18
  },
19
19
  "files": [
20
- "dist"
20
+ "dist",
21
+ "!dist/**/__tests__",
22
+ "!dist/**/__mocks__",
23
+ "!dist/**/__fixtures__"
21
24
  ],
22
25
  "author": "Medusa",
23
26
  "license": "MIT",
24
27
  "devDependencies": {
25
- "@medusajs/framework": "0.0.2-preview-20240925143312",
26
- "@medusajs/modules-sdk": "1.13.0-preview-20240925143312",
27
- "@medusajs/types": "1.12.0-preview-20240925143312",
28
+ "@medusajs/framework": "0.0.2-preview-20240930111314",
28
29
  "@mikro-orm/core": "5.9.7",
30
+ "@mikro-orm/knex": "5.9.7",
29
31
  "@mikro-orm/migrations": "5.9.7",
30
32
  "@mikro-orm/postgresql": "5.9.7",
31
- "cross-env": "^5.2.1",
32
- "express": "^4.18.3",
33
+ "awilix": "^8.0.1",
33
34
  "jest": "^29.7.0",
35
+ "pg": "^8.13.0",
34
36
  "pg-god": "^1.0.12",
35
37
  "rimraf": "^3.0.2",
36
- "typescript": "^5.1.6"
38
+ "typescript": "^5.6.2"
39
+ },
40
+ "dependencies": {
41
+ "axios": "^0.21.4",
42
+ "express": "^4.21.0",
43
+ "get-port": "^5.1.0",
44
+ "randomatic": "^3.1.1"
37
45
  },
38
46
  "peerDependencies": {
39
- "@medusajs/medusa": "1.20.6-preview-20240925143312"
47
+ "@medusajs/framework": "0.0.2-preview-20240930111314",
48
+ "@medusajs/medusa": "1.20.6-preview-20240930111314",
49
+ "@mikro-orm/postgresql": "5.9.7",
50
+ "awilix": "^8.0.1"
40
51
  },
41
52
  "peerDependenciesMeta": {
42
53
  "@medusajs/medusa": {
43
54
  "optional": true
44
55
  }
45
56
  },
46
- "dependencies": {
47
- "@medusajs/utils": "1.12.0-preview-20240925143312",
48
- "axios": "^0.21.4",
49
- "get-port": "^5.1.0",
50
- "randomatic": "^3.1.1"
51
- },
52
57
  "gitHead": "81a7ff73d012fda722f6e9ef0bd9ba0232d37808"
53
58
  }