@medusajs/sales-channel 0.1.2-snapshot-20240426112214 → 0.1.2-snapshot-20240516152256
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +0 -4
- package/dist/index.js +0 -25
- package/dist/joiner-config.js +1 -1
- package/dist/module-definition.js +0 -7
- package/package.json +5 -5
- package/dist/initialize/index.d.ts +0 -4
- package/dist/initialize/index.js +0 -17
- package/dist/loaders/connection.d.ts +0 -4
- package/dist/loaders/connection.js +0 -41
- package/dist/loaders/container.d.ts +0 -2
- package/dist/loaders/container.js +0 -34
- package/dist/loaders/index.d.ts +0 -2
- package/dist/loaders/index.js +0 -18
- package/dist/repositories/index.d.ts +0 -1
- package/dist/repositories/index.js +0 -5
package/dist/index.d.ts
CHANGED
@@ -1,9 +1,5 @@
|
|
1
1
|
import { moduleDefinition } from "./module-definition";
|
2
2
|
export default moduleDefinition;
|
3
|
-
export declare const runMigrations: ({ options, logger, }?: Pick<import("@medusajs/modules-sdk").LoaderOptions<import("@medusajs/modules-sdk").ModuleServiceInitializeOptions>, "options" | "logger"> | undefined) => Promise<void>;
|
4
|
-
export declare const revertMigration: ({ options, logger, }?: Pick<import("@medusajs/modules-sdk").LoaderOptions<import("@medusajs/modules-sdk").ModuleServiceInitializeOptions>, "options" | "logger"> | undefined) => Promise<void>;
|
5
|
-
export * from "./initialize";
|
6
3
|
export * from "./types";
|
7
|
-
export * from "./loaders";
|
8
4
|
export * from "./models";
|
9
5
|
export * from "./services";
|
package/dist/index.js
CHANGED
@@ -10,37 +10,12 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
11
11
|
o[k2] = m[k];
|
12
12
|
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
26
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
27
15
|
};
|
28
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
-
exports.revertMigration = exports.runMigrations = void 0;
|
30
|
-
const modules_sdk_1 = require("@medusajs/modules-sdk");
|
31
|
-
const utils_1 = require("@medusajs/utils");
|
32
|
-
const SalesChannelModels = __importStar(require("./models"));
|
33
17
|
const module_definition_1 = require("./module-definition");
|
34
18
|
exports.default = module_definition_1.moduleDefinition;
|
35
|
-
const migrationScriptOptions = {
|
36
|
-
moduleName: modules_sdk_1.Modules.SALES_CHANNEL,
|
37
|
-
models: SalesChannelModels,
|
38
|
-
pathToMigrations: __dirname + "/migrations",
|
39
|
-
};
|
40
|
-
exports.runMigrations = utils_1.ModulesSdkUtils.buildMigrationScript(migrationScriptOptions);
|
41
|
-
exports.revertMigration = utils_1.ModulesSdkUtils.buildRevertMigrationScript(migrationScriptOptions);
|
42
|
-
__exportStar(require("./initialize"), exports);
|
43
19
|
__exportStar(require("./types"), exports);
|
44
|
-
__exportStar(require("./loaders"), exports);
|
45
20
|
__exportStar(require("./models"), exports);
|
46
21
|
__exportStar(require("./services"), exports);
|
package/dist/joiner-config.js
CHANGED
@@ -8,7 +8,7 @@ exports.LinkableKeys = {
|
|
8
8
|
};
|
9
9
|
const entityLinkableKeysMap = {};
|
10
10
|
Object.entries(exports.LinkableKeys).forEach(([key, value]) => {
|
11
|
-
entityLinkableKeysMap[value]
|
11
|
+
entityLinkableKeysMap[value] ??= [];
|
12
12
|
entityLinkableKeysMap[value].push({
|
13
13
|
mapTo: key,
|
14
14
|
valueFrom: key.split("_").pop(),
|
@@ -1,15 +1,8 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
3
|
exports.moduleDefinition = void 0;
|
7
4
|
const _services_1 = require("./services");
|
8
|
-
const connection_1 = __importDefault(require("./loaders/connection"));
|
9
|
-
const container_1 = __importDefault(require("./loaders/container"));
|
10
5
|
const service = _services_1.SalesChannelModuleService;
|
11
|
-
const loaders = [container_1.default, connection_1.default];
|
12
6
|
exports.moduleDefinition = {
|
13
7
|
service,
|
14
|
-
loaders,
|
15
8
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/sales-channel",
|
3
|
-
"version": "0.1.2-snapshot-
|
3
|
+
"version": "0.1.2-snapshot-20240516152256",
|
4
4
|
"description": "Medusa Sales Channel module",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -40,7 +40,7 @@
|
|
40
40
|
"@mikro-orm/cli": "5.9.7",
|
41
41
|
"cross-env": "^5.2.1",
|
42
42
|
"jest": "^29.6.3",
|
43
|
-
"medusa-test-utils": "1.1.
|
43
|
+
"medusa-test-utils": "1.1.45-snapshot-20240516152256",
|
44
44
|
"rimraf": "^3.0.2",
|
45
45
|
"ts-jest": "^29.1.1",
|
46
46
|
"ts-node": "^10.9.1",
|
@@ -48,9 +48,9 @@
|
|
48
48
|
"typescript": "^5.1.6"
|
49
49
|
},
|
50
50
|
"dependencies": {
|
51
|
-
"@medusajs/modules-sdk": "1.
|
52
|
-
"@medusajs/types": "1.12.0-snapshot-
|
53
|
-
"@medusajs/utils": "1.12.0-snapshot-
|
51
|
+
"@medusajs/modules-sdk": "1.13.0-snapshot-20240516152256",
|
52
|
+
"@medusajs/types": "1.12.0-snapshot-20240516152256",
|
53
|
+
"@medusajs/utils": "1.12.0-snapshot-20240516152256",
|
54
54
|
"@mikro-orm/core": "5.9.7",
|
55
55
|
"@mikro-orm/migrations": "5.9.7",
|
56
56
|
"@mikro-orm/postgresql": "5.9.7",
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import { ExternalModuleDeclaration, InternalModuleDeclaration } from "@medusajs/modules-sdk";
|
2
|
-
import { ModulesSdkTypes, ISalesChannelModuleService } from "@medusajs/types";
|
3
|
-
import { InitializeModuleInjectableDependencies } from "../types";
|
4
|
-
export declare const initialize: (options?: ModulesSdkTypes.ModuleServiceInitializeOptions | ModulesSdkTypes.ModuleServiceInitializeCustomDataLayerOptions | ExternalModuleDeclaration | InternalModuleDeclaration, injectedDependencies?: InitializeModuleInjectableDependencies) => Promise<ISalesChannelModuleService>;
|
package/dist/initialize/index.js
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.initialize = void 0;
|
4
|
-
const modules_sdk_1 = require("@medusajs/modules-sdk");
|
5
|
-
const module_definition_1 = require("../module-definition");
|
6
|
-
const initialize = async (options, injectedDependencies) => {
|
7
|
-
const serviceKey = modules_sdk_1.Modules.SALES_CHANNEL;
|
8
|
-
const loaded = await modules_sdk_1.MedusaModule.bootstrap({
|
9
|
-
moduleKey: serviceKey,
|
10
|
-
defaultPath: modules_sdk_1.MODULE_PACKAGE_NAMES[modules_sdk_1.Modules.SALES_CHANNEL],
|
11
|
-
declaration: options,
|
12
|
-
injectedDependencies,
|
13
|
-
moduleExports: module_definition_1.moduleDefinition,
|
14
|
-
});
|
15
|
-
return loaded[serviceKey];
|
16
|
-
};
|
17
|
-
exports.initialize = initialize;
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import { InternalModuleDeclaration, LoaderOptions } from "@medusajs/modules-sdk";
|
2
|
-
import { ModulesSdkTypes } from "@medusajs/types";
|
3
|
-
declare const _default: ({ options, container, logger, }: LoaderOptions<ModulesSdkTypes.ModuleServiceInitializeOptions | ModulesSdkTypes.ModuleServiceInitializeCustomDataLayerOptions>, moduleDeclaration?: InternalModuleDeclaration) => Promise<void>;
|
4
|
-
export default _default;
|
@@ -1,41 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
const modules_sdk_1 = require("@medusajs/modules-sdk");
|
27
|
-
const utils_1 = require("@medusajs/utils");
|
28
|
-
const SalesChannelModels = __importStar(require("../models"));
|
29
|
-
exports.default = async ({ options, container, logger, }, moduleDeclaration) => {
|
30
|
-
const entities = Object.values(SalesChannelModels);
|
31
|
-
const pathToMigrations = __dirname + "/../migrations";
|
32
|
-
await utils_1.ModulesSdkUtils.mikroOrmConnectionLoader({
|
33
|
-
moduleName: modules_sdk_1.Modules.SALES_CHANNEL,
|
34
|
-
entities,
|
35
|
-
container,
|
36
|
-
options,
|
37
|
-
moduleDeclaration,
|
38
|
-
logger,
|
39
|
-
pathToMigrations,
|
40
|
-
});
|
41
|
-
};
|
@@ -1,34 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
const utils_1 = require("@medusajs/utils");
|
27
|
-
const ModuleModels = __importStar(require("../models"));
|
28
|
-
const ModuleRepositories = __importStar(require("../repositories"));
|
29
|
-
const ModuleServices = __importStar(require("../services"));
|
30
|
-
exports.default = utils_1.ModulesSdkUtils.moduleContainerLoaderFactory({
|
31
|
-
moduleModels: ModuleModels,
|
32
|
-
moduleRepositories: ModuleRepositories,
|
33
|
-
moduleServices: ModuleServices,
|
34
|
-
});
|
package/dist/loaders/index.d.ts
DELETED
package/dist/loaders/index.js
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./connection"), exports);
|
18
|
-
__exportStar(require("./container"), exports);
|
@@ -1 +0,0 @@
|
|
1
|
-
export { MikroOrmBaseRepository as BaseRepository } from "@medusajs/utils";
|
@@ -1,5 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.BaseRepository = void 0;
|
4
|
-
var utils_1 = require("@medusajs/utils");
|
5
|
-
Object.defineProperty(exports, "BaseRepository", { enumerable: true, get: function () { return utils_1.MikroOrmBaseRepository; } });
|