Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@medusajs/utils

Package Overview
Dependencies
Maintainers
2
Versions
2842
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@medusajs/utils - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2-next-20230322093850

dist/bundles.d.ts

8

dist/decorators/context-parameter.js

@@ -6,9 +6,9 @@ "use strict";

return function (target, propertyKey, parameterIndex) {
if (!target.MedusaContext_) {
target.MedusaContext_ = {};
if (!target.MedusaContextIndex_) {
target.MedusaContextIndex_ = {};
}
if (propertyKey in target.MedusaContext_) {
if (propertyKey in target.MedusaContextIndex_) {
throw new Error(`Only one MedusaContext is allowed on method "${String(propertyKey)}".`);
}
target.MedusaContext_[propertyKey] = parameterIndex;
target.MedusaContextIndex_[propertyKey] = parameterIndex;
};

@@ -15,0 +15,0 @@ }

@@ -6,7 +6,7 @@ "use strict";

return function (target, propertyKey, descriptor) {
if (!target.MedusaContext_) {
if (!target.MedusaContextIndex_) {
throw new Error(`To apply @InjectEntityManager you have to flag a parameter using @MedusaContext`);
}
const originalMethod = descriptor.value;
const argIndex = target.MedusaContext_[propertyKey];
const argIndex = target.MedusaContextIndex_[propertyKey];
descriptor.value = async function (...args) {

@@ -13,0 +13,0 @@ const context = args[argIndex] ?? {};

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

export * from "./bundles";
export * from "./decorators";
export * from "./event-bus";

@@ -17,3 +17,5 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./bundles"), exports);
__exportStar(require("./decorators"), exports);
__exportStar(require("./event-bus"), exports);
//# sourceMappingURL=index.js.map
{
"name": "@medusajs/utils",
"version": "0.0.1",
"version": "0.0.2-next-20230322093850",
"description": "Medusa utilities functions shared by Medusa core and Modules",

@@ -20,3 +20,3 @@ "main": "dist/index.js",

"devDependencies": {
"@medusajs/types": "*",
"@medusajs/types": "0.0.2-next-20230322093850",
"cross-env": "^5.2.1",

@@ -29,3 +29,3 @@ "jest": "^25.5.4",

"peerDependencies": {
"@medusajs/types": "^0.0.1"
"@medusajs/types": "0.0.2-next-20230322093850"
},

@@ -35,4 +35,5 @@ "scripts": {

"build": "tsc --build",
"watch": "tsc --build --watch",
"test": "jest --passWithNoTests src"
}
}

Sorry, the diff of this file is not supported yet

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