medusa-test-utils 1.1.45-snapshot-20240728083710 → 1.1.45-snapshot-20240730111259

Sign up to get free protection for your applications and to get access to all the features.
@@ -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,iBA0BjD"}
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"}
@@ -3,8 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.configLoaderOverride = void 0;
4
4
  const utils_1 = require("@medusajs/utils");
5
5
  async function configLoaderOverride(entryDirectory, override) {
6
- // in case it is not install as it is optional and required only when using this util
7
- // @ts-ignore
8
6
  const { configManager } = await import("@medusajs/framework/config");
9
7
  const { configModule, error } = (0, utils_1.getConfigFile)(entryDirectory, "medusa-config.js");
10
8
  if (error) {
@@ -21,7 +19,10 @@ async function configLoaderOverride(entryDirectory, override) {
21
19
  },
22
20
  idle_in_transaction_session_timeout: 20000,
23
21
  };
24
- configManager.loadConfig(configModule);
22
+ configManager.loadConfig({
23
+ projectConfig: configModule,
24
+ baseDir: entryDirectory,
25
+ });
25
26
  }
26
27
  exports.configLoaderOverride = configLoaderOverride;
27
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,EAC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AA;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,EAAE,EAAE,kBAAkB,EAAE,KAAK,EAAE;iBACnC;gBACD,mCAAmC,EAAE,KAAK;aAC3C,CAAA;IAEP,aAAa,CAAC,UAAU,CAAC;QACvB,aAAa,EAAE,YAAY;QAC3B,OAAO,EAAE,cAAc;KACxB,CAAC,CAAA;AACJ,CAAC;AA7BD,oDA6BC"}
@@ -1,4 +1,4 @@
1
1
  export declare function initDb({ env }: {
2
2
  env?: Record<any, any>;
3
- }): Promise<any>;
3
+ }): Promise<import("@mikro-orm/knex").Knex<any, any>>;
4
4
  //# sourceMappingURL=use-db.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-db.d.ts","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/use-db.ts"],"names":[],"mappings":"AAOA,wBAAsB,MAAM,CAAC,EAAE,GAAQ,EAAE,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;CAAE,gBAwDpE"}
1
+ {"version":3,"file":"use-db.d.ts","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/use-db.ts"],"names":[],"mappings":"AAGA,wBAAsB,MAAM,CAAC,EAAE,GAAQ,EAAE,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;CAAE,qDAkDpE"}
@@ -7,15 +7,9 @@ async function initDb({ env = {} }) {
7
7
  if ((0, utils_1.isObject)(env)) {
8
8
  Object.entries(env).forEach(([k, v]) => (process.env[k] = v));
9
9
  }
10
- const container = (0, utils_1.createMedusaContainer)();
11
- // in case it is not install as it is optional and required only when using this util
12
- // @ts-ignore
13
- const { configManager } = await import("@medusajs/framework/config");
10
+ const { configManager, pgConnectionLoader, container } = await import("@medusajs/framework");
14
11
  const configModule = configManager.config;
15
- const pgConnection = await require("@medusajs/medusa/dist/loaders/pg-connection").default({
16
- configModule,
17
- container,
18
- });
12
+ const pgConnection = pgConnectionLoader();
19
13
  const featureFlagRouter = require("@medusajs/medusa/dist/loaders/feature-flags").default(configModule);
20
14
  container.register({
21
15
  [utils_1.ContainerRegistrationKeys.CONFIG_MODULE]: (0, awilix_1.asValue)(configModule),
@@ -1 +1 @@
1
- {"version":3,"file":"use-db.js","sourceRoot":"","sources":["../../src/medusa-test-runner-utils/use-db.ts"],"names":[],"mappings":";;;AAAA,2CAIwB;AACxB,mCAAgC;AAEzB,KAAK,UAAU,MAAM,CAAC,EAAE,GAAG,GAAG,EAAE,EAA8B;IACnE,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;IAED,MAAM,SAAS,GAAG,IAAA,6BAAqB,GAAE,CAAA;IAEzC,qFAAqF;IACrF,aAAa;IACb,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,4BAA4B,CAAC,CAAA;IACpE,MAAM,YAAY,GAAG,aAAa,CAAC,MAAM,CAAA;IAEzC,MAAM,YAAY,GAChB,MAAM,OAAO,CAAC,6CAA6C,CAAC,CAAC,OAAO,CAAC;QACnE,YAAY;QACZ,SAAS;KACV,CAAC,CAAA;IAEJ,MAAM,iBAAiB,GACrB,OAAO,CA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AU,EAAE,CAAA;QAC7C,MAAM,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAA;QAErC;;;;;WAKG;QACH,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAA;QACzD,YAAY,CAAC,cAAc,EAAE,CAAA;IAC/B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAA;QAClE,MAAM,GAAG,CAAA;IACX,CAAC;IAED,OAAO,YAAY,CAAA;AACrB,CAAC;AAlDD,wBAkDC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "medusa-test-utils",
3
- "version": "1.1.45-snapshot-20240728083710",
3
+ "version": "1.1.45-snapshot-20240730111259",
4
4
  "description": "Test utils for Medusa",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -24,25 +24,23 @@
24
24
  "author": "Medusa",
25
25
  "license": "MIT",
26
26
  "devDependencies": {
27
- "@medusajs/types": "1.12.0-snapshot-20240728083710",
27
+ "@medusajs/framework": "0.0.2-snapshot-20240730111259",
28
+ "@medusajs/types": "1.12.0-snapshot-20240730111259",
29
+ "@medusajs/utils": "1.12.0-snapshot-20240730111259",
28
30
  "cross-env": "^5.2.1",
29
31
  "jest": "^29.7.0",
30
32
  "rimraf": "^3.0.2",
31
33
  "typescript": "^5.1.6"
32
34
  },
33
35
  "peerDependencies": {
34
- "@medusajs/framework": "workspace:^",
35
- "@medusajs/medusa": "1.20.6-snapshot-20240728083710",
36
- "@medusajs/modules-sdk": "1.13.0-snapshot-20240728083710",
36
+ "@medusajs/medusa": "1.20.6-snapshot-20240730111259",
37
+ "@medusajs/modules-sdk": "1.13.0-snapshot-20240730111259",
37
38
  "axios": "^0.28.0",
38
39
  "express": "^4.18.3",
39
40
  "get-port": "^5.1.0",
40
41
  "pg-god": "^1.0.12"
41
42
  },
42
43
  "peerDependenciesMeta": {
43
- "@medusajs/framework": {
44
- "optional": true
45
- },
46
44
  "@medusajs/medusa": {
47
45
  "optional": true
48
46
  },
@@ -60,7 +58,7 @@
60
58
  }
61
59
  },
62
60
  "dependencies": {
63
- "@medusajs/utils": "1.12.0-snapshot-20240728083710",
61
+ "@medusajs/utils": "1.12.0-snapshot-20240730111259",
64
62
  "@mikro-orm/migrations": "5.9.7",
65
63
  "@mikro-orm/postgresql": "5.9.7",
66
64
  "randomatic": "^3.1.1"