Socket
Socket
Sign inDemoInstall

@medusajs/stock-location

Package Overview
Dependencies
Maintainers
2
Versions
596
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@medusajs/stock-location - npm Package Compare versions

Comparing version 1.11.4 to 1.11.5-next-20240207092132

40

dist/services/stock-location.js

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

const utils_1 = require("@medusajs/utils");
const typeorm_1 = require("typeorm");
const joiner_config_1 = require("../joiner-config");

@@ -41,6 +42,4 @@ const models_1 = require("../models");

async list(selector = {}, config = { relations: [], skip: 0, take: 10 }, context = {}) {
const manager = context.transactionManager ?? this.manager_;
const locationRepo = manager.getRepository(models_1.StockLocation);
const query = (0, build_query_1.buildQuery)(selector, config);
return await locationRepo.find(query);
const [locations] = await this.listAndCount(selector, config, context);
return locations;
}

@@ -57,3 +56,18 @@ /**

const locationRepo = manager.getRepository(models_1.StockLocation);
let q;
if (selector.q) {
q = selector.q;
delete selector.q;
}
const query = (0, build_query_1.buildQuery)(selector, config);
if (q) {
const where = query.where;
delete where.name;
query.where = [
{
...where,
name: (0, typeorm_1.ILike)(`%${q}%`),
},
];
}
return await locationRepo.findAndCount(query);

@@ -198,2 +212,20 @@ }

__decorate([
__param(2, (0, utils_1.MedusaContext)()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Object]),
__metadata("design:returntype", Promise)
], StockLocationService.prototype, "list", null);
__decorate([
__param(2, (0, utils_1.MedusaContext)()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Object]),
__metadata("design:returntype", Promise)
], StockLocationService.prototype, "listAndCount", null);
__decorate([
__param(2, (0, utils_1.MedusaContext)()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [String, Object, Object]),
__metadata("design:returntype", Promise)
], StockLocationService.prototype, "retrieve", null);
__decorate([
(0, utils_1.InjectEntityManager)((target) => target.moduleDeclaration?.resources === types_1.MODULE_RESOURCE_TYPE.ISOLATED),

@@ -200,0 +232,0 @@ __param(1, (0, utils_1.MedusaContext)()),

8

package.json
{
"name": "@medusajs/stock-location",
"version": "1.11.4",
"version": "1.11.5-next-20240207092132",
"description": "Stock Location Module for Medusa",

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

"devDependencies": {
"@medusajs/types": "^1.11.11",
"@medusajs/types": "1.11.12-next-20240207092132",
"cross-env": "^5.2.1",

@@ -32,4 +32,4 @@ "jest": "^29.6.3",

"dependencies": {
"@medusajs/modules-sdk": "^1.12.7",
"@medusajs/utils": "^1.11.4",
"@medusajs/modules-sdk": "1.12.8-next-20240207092132",
"@medusajs/utils": "1.11.5-next-20240207092132",
"awilix": "^8.0.0",

@@ -36,0 +36,0 @@ "typeorm": "^0.3.16"

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