New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@medusajs/modules-sdk

Package Overview
Dependencies
Maintainers
2
Versions
3165
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@medusajs/modules-sdk - npm Package Compare versions

Comparing version 1.8.8-snapshot-20230605145452 to 1.8.8-snapshot-20230605161303

4

dist/loaders/register-modules.d.ts

@@ -1,3 +0,3 @@

import { ExternalModuleDeclaration, InternalModuleDeclaration, ModuleResolution } from "@medusajs/types";
import { ExternalModuleDeclaration, InternalModuleDeclaration, ModuleExports, ModuleResolution } from "@medusajs/types";
export declare const registerModules: (modules?: Record<string, false | string | Partial<InternalModuleDeclaration | ExternalModuleDeclaration>>) => Record<string, ModuleResolution>;
export declare const registerMedusaModule: (moduleKey: string, moduleDeclaration: InternalModuleDeclaration | ExternalModuleDeclaration) => Record<string, ModuleResolution>;
export declare const registerMedusaModule: (moduleKey: string, moduleDeclaration: InternalModuleDeclaration | ExternalModuleDeclaration, moduleExports?: ModuleExports) => Record<string, ModuleResolution>;

@@ -25,3 +25,3 @@ "use strict";

exports.registerModules = registerModules;
const registerMedusaModule = (moduleKey, moduleDeclaration) => {
const registerMedusaModule = (moduleKey, moduleDeclaration, moduleExports) => {
const moduleResolutions = {};

@@ -36,3 +36,3 @@ for (const definition of definitions_1.default) {

}
moduleResolutions[definition.key] = getInternalModuleResolution(definition, moduleDeclaration);
moduleResolutions[definition.key] = getInternalModuleResolution(definition, moduleDeclaration, moduleExports);
}

@@ -42,3 +42,3 @@ return moduleResolutions;

exports.registerMedusaModule = registerMedusaModule;
function getInternalModuleResolution(definition, moduleConfig) {
function getInternalModuleResolution(definition, moduleConfig, moduleExports) {
if (typeof moduleConfig === "boolean") {

@@ -61,3 +61,5 @@ if (!moduleConfig && definition.isRequired) {

const isString = typeof moduleConfig === "string";
if (definition.canOverride && (isString || (isObj && moduleConfig.resolve))) {
if (!moduleExports &&
definition.canOverride &&
(isString || (isObj && moduleConfig.resolve))) {
resolutionPath = (0, resolve_cwd_1.default)(isString ? moduleConfig : moduleConfig.resolve);

@@ -77,2 +79,3 @@ }

},
moduleExports,
options: isObj ? moduleConfig.options ?? {} : {},

@@ -79,0 +82,0 @@ };

@@ -36,6 +36,3 @@ "use strict";

}
const moduleResolutions = (0, loaders_1.registerMedusaModule)(moduleKey, modDeclaration);
if (moduleResolutions[moduleKey]) {
moduleResolutions[moduleKey].moduleExports = moduleExports;
}
const moduleResolutions = (0, loaders_1.registerMedusaModule)(moduleKey, modDeclaration, moduleExports);
await (0, loaders_1.moduleLoader)({

@@ -42,0 +39,0 @@ container,

{
"name": "@medusajs/modules-sdk",
"version": "1.8.8-snapshot-20230605145452",
"version": "1.8.8-snapshot-20230605161303",
"description": "SDK for medusa modules",

@@ -26,4 +26,4 @@ "main": "dist/index.js",

"dependencies": {
"@medusajs/types": "1.8.8-snapshot-20230605145452",
"@medusajs/utils": "1.9.1-snapshot-20230605145452",
"@medusajs/types": "1.8.8-snapshot-20230605161303",
"@medusajs/utils": "1.9.1-snapshot-20230605161303",
"awilix": "^8.0.0",

@@ -30,0 +30,0 @@ "resolve-cwd": "^3.0.0"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc