@medusajs/link-modules 0.2.12-preview-20240510084332 → 0.2.12-preview-20240514180547
Sign up to get free protection for your applications and to get access to all the features.
package/dist/initialize/index.js
CHANGED
@@ -78,9 +78,9 @@ const initialize = async (options, modulesDefinition, injectedDependencies) => {
|
|
78
78
|
definition.schema = (0, utils_2.generateGraphQLSchema)(definition, primary, foreign, {
|
79
79
|
logger,
|
80
80
|
});
|
81
|
-
definition.alias
|
81
|
+
definition.alias ??= [];
|
82
82
|
for (const alias of definition.alias) {
|
83
|
-
alias.args
|
83
|
+
alias.args ??= {};
|
84
84
|
alias.args.entity = (0, utils_1.toPascalCase)("Link_" +
|
85
85
|
(definition.databaseConfig?.tableName ??
|
86
86
|
(0, utils_2.composeTableName)(primary.serviceName, primary.foreignKey, foreign.serviceName, foreign.foreignKey)));
|
package/dist/migration/index.js
CHANGED
@@ -5,7 +5,7 @@ const utils_1 = require("../utils");
|
|
5
5
|
const utils_2 = require("@medusajs/utils");
|
6
6
|
function getMigration(joinerConfig, serviceName, primary, foreign) {
|
7
7
|
return async function runMigrations({ options, logger, } = {}) {
|
8
|
-
logger
|
8
|
+
logger ??= console;
|
9
9
|
const dbData = utils_2.ModulesSdkUtils.loadDatabaseConfig("link_modules", options);
|
10
10
|
const entity = (0, utils_1.generateEntity)(joinerConfig, primary, foreign);
|
11
11
|
const pathToMigrations = __dirname + "/../migrations";
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/link-modules",
|
3
|
-
"version": "0.2.12-preview-
|
3
|
+
"version": "0.2.12-preview-20240514180547",
|
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.
|
43
|
-
"@medusajs/types": "1.
|
44
|
-
"@medusajs/utils": "1.
|
42
|
+
"@medusajs/modules-sdk": "1.13.0-preview-20240514180547",
|
43
|
+
"@medusajs/types": "1.12.0-preview-20240514180547",
|
44
|
+
"@medusajs/utils": "1.12.0-preview-20240514180547",
|
45
45
|
"@mikro-orm/core": "5.9.7",
|
46
46
|
"@mikro-orm/postgresql": "5.9.7",
|
47
47
|
"awilix": "^8.0.0"
|