@medusajs/utils
Advanced tools
Comparing version 1.9.2 to 1.9.3-canary-20230724143258
export * as DecoratorUtils from "./decorators"; | ||
export * as EventBusUtils from "./event-bus"; | ||
export * as SearchUtils from "./search"; | ||
export * as ModulesSdkUtils from "./modules-sdk"; |
@@ -26,6 +26,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SearchUtils = exports.EventBusUtils = exports.DecoratorUtils = void 0; | ||
exports.ModulesSdkUtils = exports.SearchUtils = exports.EventBusUtils = exports.DecoratorUtils = void 0; | ||
exports.DecoratorUtils = __importStar(require("./decorators")); | ||
exports.EventBusUtils = __importStar(require("./event-bus")); | ||
exports.SearchUtils = __importStar(require("./search")); | ||
exports.ModulesSdkUtils = __importStar(require("./modules-sdk")); | ||
//# sourceMappingURL=bundles.js.map |
@@ -71,2 +71,3 @@ "use strict"; | ||
var _b; | ||
collection = collection.sort(); | ||
var output = {}; | ||
@@ -73,0 +74,0 @@ try { |
export * from "./build-query"; | ||
export * from "./deduplicate"; | ||
export * from "./errors"; | ||
@@ -3,0 +4,0 @@ export * from "./generate-entity-id"; |
@@ -18,2 +18,3 @@ "use strict"; | ||
__exportStar(require("./build-query"), exports); | ||
__exportStar(require("./deduplicate"), exports); | ||
__exportStar(require("./errors"), exports); | ||
@@ -20,0 +21,0 @@ __exportStar(require("./generate-entity-id"), exports); |
@@ -6,8 +6,4 @@ "use strict"; | ||
return function (target, propertyKey, parameterIndex) { | ||
if (!target.MedusaContextIndex_) { | ||
target.MedusaContextIndex_ = {}; | ||
} | ||
if (propertyKey in target.MedusaContextIndex_) { | ||
throw new Error("Only one MedusaContext is allowed on method \"".concat(String(propertyKey), "\".")); | ||
} | ||
var _a; | ||
(_a = target.MedusaContextIndex_) !== null && _a !== void 0 ? _a : (target.MedusaContextIndex_ = {}); | ||
target.MedusaContextIndex_[propertyKey] = parameterIndex; | ||
@@ -14,0 +10,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
export declare function InjectEntityManager(shouldForceTransaction?: (target: any) => boolean, managerProperty?: string): MethodDecorator; | ||
export declare function InjectEntityManager(shouldForceTransaction?: (target: any) => boolean, managerProperty?: string | false): MethodDecorator; |
@@ -50,3 +50,3 @@ "use strict"; | ||
descriptor.value = function () { | ||
var _a; | ||
var _a, _b; | ||
var args = []; | ||
@@ -59,4 +59,4 @@ for (var _i = 0; _i < arguments.length; _i++) { | ||
var _this = this; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
return __generator(this, function (_c) { | ||
switch (_c.label) { | ||
case 0: | ||
@@ -67,4 +67,6 @@ shouldForceTransactionRes = shouldForceTransaction(target); | ||
return [4 /*yield*/, originalMethod.apply(this, args)]; | ||
case 1: return [2 /*return*/, _b.sent()]; | ||
case 2: return [4 /*yield*/, this[managerProperty].transaction(function (transactionManager) { return __awaiter(_this, void 0, void 0, function () { | ||
case 1: return [2 /*return*/, _c.sent()]; | ||
case 2: return [4 /*yield*/, (managerProperty === false | ||
? this | ||
: this[managerProperty]).transaction(function (transactionManager) { return __awaiter(_this, void 0, void 0, function () { | ||
var _a; | ||
@@ -80,4 +82,8 @@ return __generator(this, function (_b) { | ||
}); | ||
}); })]; | ||
case 3: return [2 /*return*/, _b.sent()]; | ||
}); }, { | ||
transaction: context === null || context === void 0 ? void 0 : context.transactionManager, | ||
isolationLevel: context === null || context === void 0 ? void 0 : context.isolationLevel, | ||
enableNestedTransactions: (_b = context.enableNestedTransactions) !== null && _b !== void 0 ? _b : false, | ||
})]; | ||
case 3: return [2 /*return*/, _c.sent()]; | ||
} | ||
@@ -84,0 +90,0 @@ }); |
@@ -7,1 +7,2 @@ export * from "./bundles"; | ||
export * from "./search"; | ||
export * from "./modules-sdk"; |
@@ -23,2 +23,3 @@ "use strict"; | ||
__exportStar(require("./search"), exports); | ||
__exportStar(require("./modules-sdk"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@medusajs/utils", | ||
"version": "1.9.2", | ||
"version": "1.9.3-canary-20230724143258", | ||
"description": "Medusa utilities functions shared by Medusa core and Modules", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"repository": { | ||
@@ -20,3 +21,3 @@ "type": "git", | ||
"devDependencies": { | ||
"@medusajs/types": "^1.8.10", | ||
"@medusajs/types": "1.8.12-canary-20230724143258", | ||
"@types/express": "^4.17.17", | ||
@@ -26,2 +27,3 @@ "cross-env": "^5.2.1", | ||
"jest": "^25.5.4", | ||
"rimraf": "^5.0.1", | ||
"ts-jest": "^25.5.1", | ||
@@ -37,3 +39,3 @@ "typescript": "^4.4.4" | ||
"prepare": "cross-env NODE_ENV=production yarn run build", | ||
"build": "tsc --build", | ||
"build": "rimraf dist && tsc --build", | ||
"watch": "tsc --build --watch", | ||
@@ -40,0 +42,0 @@ "test": "jest" |
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
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
108014
127
1842
8
2
9