@medusajs/link-modules 0.2.12-snapshot-20240523103337 → 0.2.12-snapshot-20240523143641

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,7 +28,6 @@ exports.CustomerAuth = {
28
28
  },
29
29
  {
30
30
  serviceName: modules_sdk_1.Modules.AUTH,
31
- isInternalService: true,
32
31
  primaryKey: "id",
33
32
  foreignKey: "auth_identity_id",
34
33
  alias: "auth",
@@ -28,7 +28,6 @@ exports.ProductSalesChannel = {
28
28
  },
29
29
  {
30
30
  serviceName: modules_sdk_1.Modules.SALES_CHANNEL,
31
- isInternalService: true,
32
31
  primaryKey: "id",
33
32
  foreignKey: "sales_channel_id",
34
33
  alias: "sales_channel",
@@ -52,7 +51,6 @@ exports.ProductSalesChannel = {
52
51
  serviceName: modules_sdk_1.Modules.SALES_CHANNEL,
53
52
  relationship: {
54
53
  serviceName: utils_1.LINKS.ProductSalesChannel,
55
- isInternalService: true,
56
54
  primaryKey: "sales_channel_id",
57
55
  foreignKey: "id",
58
56
  alias: "products_link",
@@ -22,8 +22,6 @@ exports.ProductVariantPriceSet = {
22
22
  relationships: [
23
23
  {
24
24
  serviceName: modules_sdk_1.Modules.PRODUCT,
25
- // TODO: Remove this when product module is the default product service
26
- isInternalService: true,
27
25
  primaryKey: "id",
28
26
  foreignKey: "variant_id",
29
27
  alias: "variant",
@@ -28,7 +28,6 @@ exports.UserAuth = {
28
28
  },
29
29
  {
30
30
  serviceName: modules_sdk_1.Modules.AUTH,
31
- isInternalService: true,
32
31
  primaryKey: "id",
33
32
  foreignKey: "auth_identity_id",
34
33
  alias: "auth",
@@ -68,10 +68,8 @@ const initialize = async (options, modulesDefinition, injectedDependencies) => {
68
68
  continue;
69
69
  }
70
70
  }
71
- else if ((!primary.isInternalService &&
72
- !modulesLoadedKeys.includes(primary.serviceName)) ||
73
- (!foreign.isInternalService &&
74
- !modulesLoadedKeys.includes(foreign.serviceName))) {
71
+ else if (!modulesLoadedKeys.includes(primary.serviceName) ||
72
+ !modulesLoadedKeys.includes(foreign.serviceName)) {
75
73
  continue;
76
74
  }
77
75
  const logger = injectedDependencies?.[utils_1.ContainerRegistrationKeys.LOGGER] ?? console;
@@ -17,9 +17,7 @@ function generateGraphQLSchema(joinerConfig, primary, foreign, { logger } = { lo
17
17
  let typeDef = "";
18
18
  for (const extend of joinerConfig.extends ?? []) {
19
19
  const extendedModule = modules_sdk_1.MedusaModule.getModuleInstance(extend.serviceName);
20
- if (!isReadOnlyLink &&
21
- !extendedModule &&
22
- !extend.relationship.isInternalService) {
20
+ if (!extendedModule) {
23
21
  throw new Error(`Module ${extend.serviceName} not found. Please verify that the module is configured and installed, also the module must be loaded before the link modules.`);
24
22
  }
25
23
  const extJoinerConfig = modules_sdk_1.MedusaModule.getJoinerConfig(extend.relationship.serviceName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/link-modules",
3
- "version": "0.2.12-snapshot-20240523103337",
3
+ "version": "0.2.12-snapshot-20240523143641",
4
4
  "description": "Medusa Default Link Modules Package and Definitions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -39,9 +39,9 @@
39
39
  "typescript": "^5.1.6"
40
40
  },
41
41
  "dependencies": {
42
- "@medusajs/modules-sdk": "1.13.0-snapshot-20240523103337",
43
- "@medusajs/types": "1.12.0-snapshot-20240523103337",
44
- "@medusajs/utils": "1.12.0-snapshot-20240523103337",
42
+ "@medusajs/modules-sdk": "1.13.0-snapshot-20240523143641",
43
+ "@medusajs/types": "1.12.0-snapshot-20240523143641",
44
+ "@medusajs/utils": "1.12.0-snapshot-20240523143641",
45
45
  "@mikro-orm/core": "5.9.7",
46
46
  "@mikro-orm/postgresql": "5.9.7",
47
47
  "awilix": "^8.0.0"