Merge branch 'master' into feat/disabling-of-notification

This commit is contained in:
--list
2021-06-28 13:15:06 +02:00
75 changed files with 689 additions and 171 deletions
@@ -5,8 +5,10 @@ const { Region } = require("@medusajs/medusa");
const setupServer = require("../../../helpers/setup-server");
const { useApi } = require("../../../helpers/use-api");
const { initDb } = require("../../../helpers/use-db");
const { expectRelations } = require("../../helpers/expect-relations");
const cartSeeder = require("../../helpers/cart-seeder");
const productSeeder = require("../../helpers/product-seeder");
jest.setTimeout(30000);
@@ -330,4 +332,56 @@ describe("/store/carts", () => {
expect(response.status).toEqual(200);
});
});
describe("get-cart returns expected relations", () => {
beforeEach(async () => {
try {
await productSeeder(dbConnection);
await cartSeeder(dbConnection);
} catch (err) {
console.log(err);
throw err;
}
});
afterEach(async () => {
const manager = dbConnection.manager;
await doAfterEach(manager);
});
it("returns default relations", async () => {
const api = useApi();
const expectedRelations = [
"gift_cards",
"region",
"items.variant.prices",
"payment",
"shipping_address",
"billing_address",
"region.countries",
"region.payment_providers",
"payment_sessions",
"shipping_methods.shipping_option",
"discounts",
]
await api.post("/store/carts/test-cart/line-items", {
quantity: 1,
variant_id: "test-variant",
})
// await api.post("/store/carts/test-cart/shipping-methods", {
// option_id: "test-option"
// })
const response = await api.get("/store/carts/test-cart")
console.log(response.data.cart)
expectRelations(expectedRelations, response.data.cart)
});
});
});
@@ -0,0 +1,20 @@
const { expect } = require("@jest/globals")
export function expectRelations(expected, actual){
expected.forEach(a => expectRelations_(a, actual))
}
function expectRelations_(expected, actual){
const items = expected.split(".");
let data_ = actual;
for(const i in items){
data_ = data_[items[i]];
if(data_ instanceof Array && data_.length > 0) {
data_ = data_[0];
}
expect(data_).toBeDefined();
}
}
@@ -6,6 +6,7 @@ const {
Product,
ShippingProfile,
ProductVariant,
MoneyAmount,
Image,
} = require("@medusajs/medusa");
@@ -74,7 +75,14 @@ module.exports = async (connection, data = {}) => {
inventory_quantity: 10,
title: "Test variant",
product_id: "test-product",
prices: [{ id: "test-price", currency_code: "usd", amount: 100 }],
prices: [],
options: [{ id: "test-variant-option", value: "Default variant" }],
});
await manager.insert(MoneyAmount, {
variant_id: "test-variant",
id: "test-price",
currency_code: "usd",
amount: 100,
});
};
+4 -1
View File
@@ -36,8 +36,10 @@ module.exports = {
);
const databaseName = "medusa-integration";
await createDatabase({ databaseName });
await createDatabase({ databaseName });
const connection = await createConnection({
type: "postgres",
url: "postgres://localhost/medusa-integration",
@@ -66,6 +68,7 @@ module.exports = {
instance.setDb(dbConnection);
return dbConnection;
},
useDb: function () {
return instance;
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.9](https://github.com/medusajs/medusa/compare/babel-preset-medusa-package@1.1.8...babel-preset-medusa-package@1.1.9) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.8](https://github.com/medusajs/medusa/compare/babel-preset-medusa-package@1.1.7...babel-preset-medusa-package@1.1.8) (2021-06-09)
**Note:** Version bump only for package babel-preset-medusa-package
@@ -1,6 +1,6 @@
{
"name": "babel-preset-medusa-package",
"version": "1.1.8",
"version": "1.1.9",
"author": "Sebastian Rindom <sebastian@mrbltech.com>",
"repository": {
"type": "git",
@@ -26,5 +26,5 @@
"engines": {
"node": ">=10.14.0"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
+11
View File
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.10](https://github.com/medusajs/medusa/compare/@medusajs/medusa-cli@1.1.9...@medusajs/medusa-cli@1.1.10) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.9](https://github.com/medusajs/medusa/compare/@medusajs/medusa-cli@1.1.8...@medusajs/medusa-cli@1.1.9) (2021-06-09)
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@medusajs/medusa-cli",
"version": "1.1.9",
"version": "1.1.10",
"description": "Command Line interface for Medusa Commerce",
"main": "dist/index.js",
"bin": {
@@ -54,5 +54,5 @@
"resolve-cwd": "^3.0.0",
"yargs": "^15.3.1"
},
"gitHead": "43a3e5680387cdeddb0d92a1bb0762235f15ca9a"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.15](https://github.com/medusajs/medusa/compare/medusa-core-utils@1.1.14...medusa-core-utils@1.1.15) (2021-06-22)
### Bug Fixes
* adds transformer to map field names to field_id names ([88d96a2](https://github.com/medusajs/medusa/commit/88d96a29fd8dbc44ed7ba25154850d417577acad))
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.14](https://github.com/medusajs/medusa/compare/medusa-core-utils@1.1.13...medusa-core-utils@1.1.14) (2021-06-09)
**Note:** Version bump only for package medusa-core-utils
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "medusa-core-utils",
"version": "1.1.14",
"version": "1.1.15",
"description": "Core utils for Medusa",
"main": "dist/index.js",
"repository": {
@@ -33,5 +33,5 @@
"joi": "^17.3.0",
"joi-objectid": "^3.0.1"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
+11
View File
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.0.14](https://github.com/medusajs/medusa/compare/medusa-dev-cli@0.0.13...medusa-dev-cli@0.0.14) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [0.0.13](https://github.com/medusajs/medusa/compare/medusa-dev-cli@0.0.12...medusa-dev-cli@0.0.13) (2021-06-09)
**Note:** Version bump only for package medusa-dev-cli
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "medusa-dev-cli",
"description": "CLI helpers for contributors working on Medusa",
"version": "0.0.13",
"version": "0.0.14",
"author": "Sebastian Rindom <skrindom@gmail.com>",
"bin": {
"medusa-dev": "./dist/index.js"
@@ -24,7 +24,7 @@
"devDependencies": {
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"babel-preset-medusa-package": "^1.1.8",
"babel-preset-medusa-package": "^1.1.9",
"cross-env": "^7.0.3"
},
"homepage": "https://github.com/medusajs/medusa/tree/master/packages/medusa-dev-cli#readme",
@@ -47,5 +47,5 @@
"engines": {
"node": ">=12.13.0"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
+11
View File
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-file-spaces@1.1.17...medusa-file-spaces@1.1.18) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-file-spaces@1.1.16...medusa-file-spaces@1.1.17) (2021-06-09)
**Note:** Version bump only for package medusa-file-spaces
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "medusa-file-spaces",
"version": "1.1.17",
"version": "1.1.18",
"description": "Digital Ocean Spaces file connector for Medusa",
"main": "index.js",
"repository": {
@@ -40,9 +40,9 @@
"aws-sdk": "^2.710.0",
"body-parser": "^1.19.0",
"express": "^4.17.1",
"medusa-core-utils": "^1.1.14",
"medusa-test-utils": "^1.1.17",
"medusa-core-utils": "^1.1.15",
"medusa-test-utils": "^1.1.18",
"stripe": "^8.50.0"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.15](https://github.com/medusajs/medusa/compare/medusa-fulfillment-manual@1.1.14...medusa-fulfillment-manual@1.1.15) (2021-06-22)
### Bug Fixes
* Adds manual return option ([#290](https://github.com/medusajs/medusa/issues/290)) ([350603a](https://github.com/medusajs/medusa/commit/350603ac579027bd96d6855b9a78750a46d857a3))
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.14](https://github.com/medusajs/medusa/compare/medusa-fulfillment-manual@1.1.13...medusa-fulfillment-manual@1.1.14) (2021-06-09)
**Note:** Version bump only for package medusa-fulfillment-manual
@@ -1,6 +1,6 @@
{
"name": "medusa-fulfillment-manual",
"version": "1.1.14",
"version": "1.1.15",
"description": "A manual fulfillment provider for Medusa",
"main": "index.js",
"repository": {
@@ -36,7 +36,7 @@
"@babel/plugin-transform-instanceof": "^7.8.3",
"@babel/runtime": "^7.7.6",
"express": "^4.17.1",
"medusa-core-utils": "^1.1.14"
"medusa-core-utils": "^1.1.15"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.19](https://github.com/medusajs/medusa/compare/medusa-fulfillment-webshipper@1.1.18...medusa-fulfillment-webshipper@1.1.19) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-fulfillment-webshipper@1.1.17...medusa-fulfillment-webshipper@1.1.18) (2021-06-09)
**Note:** Version bump only for package medusa-fulfillment-webshipper
@@ -1,6 +1,6 @@
{
"name": "medusa-fulfillment-webshipper",
"version": "1.1.18",
"version": "1.1.19",
"description": "Webshipper Fulfillment provider for Medusa",
"main": "index.js",
"repository": {
@@ -37,7 +37,7 @@
"body-parser": "^1.19.0",
"cors": "^2.8.5",
"express": "^4.17.1",
"medusa-core-utils": "^1.1.14"
"medusa-core-utils": "^1.1.15"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
+11
View File
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.16](https://github.com/medusajs/medusa/compare/medusa-interfaces@1.1.15...medusa-interfaces@1.1.16) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.15](https://github.com/medusajs/medusa/compare/medusa-interfaces@1.1.14...medusa-interfaces@1.1.15) (2021-06-09)
**Note:** Version bump only for package medusa-interfaces
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "medusa-interfaces",
"version": "1.1.15",
"version": "1.1.16",
"description": "Core interfaces for Medusa",
"main": "dist/index.js",
"repository": {
@@ -35,7 +35,7 @@
"typeorm": "0.x"
},
"dependencies": {
"medusa-core-utils": "^1.1.14"
"medusa-core-utils": "^1.1.15"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -3,6 +3,34 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.20](https://github.com/medusajs/medusa/compare/medusa-payment-adyen@1.1.19...medusa-payment-adyen@1.1.20) (2021-06-23)
**Note:** Version bump only for package medusa-payment-adyen
## [1.1.19](https://github.com/medusajs/medusa/compare/medusa-payment-adyen@1.1.18...medusa-payment-adyen@1.1.19) (2021-06-23)
**Note:** Version bump only for package medusa-payment-adyen
## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-payment-adyen@1.1.17...medusa-payment-adyen@1.1.18) (2021-06-22)
### Bug Fixes
* mobile pay support ([91511cb](https://github.com/medusajs/medusa/commit/91511cbdf8bc66f5688a36ecf56edb16a220cc82))
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-payment-adyen@1.1.16...medusa-payment-adyen@1.1.17) (2021-06-09)
**Note:** Version bump only for package medusa-payment-adyen
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "medusa-payment-adyen",
"version": "1.1.17",
"version": "1.1.20",
"description": "Adyen Payment provider for Medusa Commerce",
"main": "index.js",
"repository": {
@@ -24,7 +24,7 @@
"cross-env": "^7.0.2",
"eslint": "^6.8.0",
"jest": "^25.5.2",
"medusa-test-utils": "^1.1.17"
"medusa-test-utils": "^1.1.18"
},
"scripts": {
"build": "babel src -d .",
@@ -42,7 +42,7 @@
"body-parser": "^1.19.0",
"cors": "^2.8.5",
"express": "^4.17.1",
"medusa-core-utils": "^1.1.14"
"medusa-core-utils": "^1.1.15"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -60,7 +60,14 @@ class AdyenService extends BaseService {
config,
})
client.setEnvironment(this.options_.environment)
if (this.options_.live_endpoint_prefix) {
client.setEnvironment(
this.options_.environment,
this.options_.live_endpoint_prefix
)
} else {
client.setEnvironment(this.options_.environment)
}
return client
}
@@ -3,6 +3,15 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.20](https://github.com/medusajs/medusa/compare/medusa-payment-klarna@1.1.18...medusa-payment-klarna@1.1.20) (2021-06-22)
### Bug Fixes
* address fix ([dbf9ba7](https://github.com/medusajs/medusa/commit/dbf9ba7b632570e5fc8efde522837fa44bbf5427))
## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-payment-klarna@1.1.17...medusa-payment-klarna@1.1.18) (2021-06-09)
**Note:** Version bump only for package medusa-payment-klarna
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "medusa-payment-klarna",
"version": "1.1.18",
"version": "1.1.20",
"description": "Klarna Payment provider for Medusa Commerce",
"main": "index.js",
"repository": {
@@ -40,8 +40,8 @@
"axios": "^0.21.0",
"body-parser": "^1.19.0",
"express": "^4.17.1",
"medusa-core-utils": "^1.1.14",
"medusa-test-utils": "^1.1.17"
"medusa-core-utils": "^1.1.15",
"medusa-test-utils": "^1.1.18"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.0.19](https://github.com/medusajs/medusa/compare/medusa-payment-paypal@1.0.18...medusa-payment-paypal@1.0.19) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.0.18](https://github.com/medusajs/medusa/compare/medusa-payment-paypal@1.0.17...medusa-payment-paypal@1.0.18) (2021-06-09)
**Note:** Version bump only for package medusa-payment-paypal
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "medusa-payment-paypal",
"version": "1.0.18",
"version": "1.0.19",
"description": "Paypal Payment provider for Meduas Commerce",
"main": "index.js",
"repository": {
@@ -26,8 +26,8 @@
"cross-env": "^5.2.1",
"eslint": "^6.8.0",
"jest": "^25.5.2",
"medusa-interfaces": "^1.1.15",
"medusa-test-utils": "^1.1.17"
"medusa-interfaces": "^1.1.16",
"medusa-test-utils": "^1.1.18"
},
"scripts": {
"build": "babel src -d . --ignore **/__tests__,**/__mocks__",
@@ -42,7 +42,7 @@
"@paypal/checkout-server-sdk": "^1.0.2",
"body-parser": "^1.19.0",
"express": "^4.17.1",
"medusa-core-utils": "^1.1.14"
"medusa-core-utils": "^1.1.15"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-payment-stripe@1.1.17...medusa-payment-stripe@1.1.18) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
### Features
* **stripe:** adds giropay provider ([5873682](https://github.com/medusajs/medusa/commit/58736824911d4fa1b252e93313c71de607405eb9))
## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-payment-stripe@1.1.16...medusa-payment-stripe@1.1.17) (2021-06-09)
**Note:** Version bump only for package medusa-payment-stripe
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "medusa-payment-stripe",
"version": "1.1.17",
"version": "1.1.18",
"description": "Stripe Payment provider for Meduas Commerce",
"main": "index.js",
"repository": {
@@ -26,7 +26,7 @@
"cross-env": "^5.2.1",
"eslint": "^6.8.0",
"jest": "^25.5.2",
"medusa-test-utils": "^1.1.17"
"medusa-test-utils": "^1.1.18"
},
"scripts": {
"build": "babel src -d . --ignore **/__tests__",
@@ -40,8 +40,8 @@
"dependencies": {
"body-parser": "^1.19.0",
"express": "^4.17.1",
"medusa-core-utils": "^1.1.14",
"medusa-core-utils": "^1.1.15",
"stripe": "^8.50.0"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-plugin-add-ons@1.1.17...medusa-plugin-add-ons@1.1.18) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-plugin-add-ons@1.1.16...medusa-plugin-add-ons@1.1.17) (2021-06-09)
**Note:** Version bump only for package medusa-plugin-add-ons
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "medusa-plugin-add-ons",
"version": "1.1.17",
"version": "1.1.18",
"description": "Add-on plugin for Medusa Commerce",
"main": "index.js",
"repository": {
@@ -25,7 +25,7 @@
"cross-env": "^7.0.2",
"eslint": "^6.8.0",
"jest": "^25.5.2",
"medusa-test-utils": "^1.1.17"
"medusa-test-utils": "^1.1.18"
},
"scripts": {
"build": "babel src -d . --ignore **/__tests__",
@@ -37,8 +37,8 @@
"body-parser": "^1.19.0",
"cors": "^2.8.5",
"express": "^4.17.1",
"medusa-core-utils": "^1.1.14",
"medusa-core-utils": "^1.1.15",
"redis": "^3.0.2"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -3,6 +3,36 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.23](https://github.com/medusajs/medusa/compare/medusa-plugin-brightpearl@1.1.22...medusa-plugin-brightpearl@1.1.23) (2021-06-24)
**Note:** Version bump only for package medusa-plugin-brightpearl
## [1.1.22](https://github.com/medusajs/medusa/compare/medusa-plugin-brightpearl@1.1.21...medusa-plugin-brightpearl@1.1.22) (2021-06-23)
### Bug Fixes
* **brightpearl:** chunked product availabilities in sync ([fd82de6](https://github.com/medusajs/medusa/commit/fd82de6ef919a53dc25d387a809f7eea998b5e04))
## [1.1.21](https://github.com/medusajs/medusa/compare/medusa-plugin-brightpearl@1.1.20...medusa-plugin-brightpearl@1.1.21) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.20](https://github.com/medusajs/medusa/compare/medusa-plugin-brightpearl@1.1.19...medusa-plugin-brightpearl@1.1.20) (2021-06-09)
**Note:** Version bump only for package medusa-plugin-brightpearl
@@ -1,6 +1,6 @@
{
"name": "medusa-plugin-brightpearl",
"version": "1.1.20",
"version": "1.1.23",
"description": "Brightpearl plugin for Medusa Commerce",
"main": "index.js",
"repository": {
@@ -27,7 +27,7 @@
"cross-env": "^7.0.2",
"eslint": "^6.8.0",
"jest": "^25.5.2",
"medusa-test-utils": "^1.1.17",
"medusa-test-utils": "^1.1.18",
"prettier": "^2.0.5"
},
"scripts": {
@@ -43,8 +43,8 @@
"axios": "^0.19.2",
"axios-rate-limit": "^1.2.1",
"express": "^4.17.1",
"medusa-core-utils": "^1.1.14",
"medusa-core-utils": "^1.1.15",
"randomatic": "^3.1.1"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -22,10 +22,10 @@ export default (container) => {
app.post("/brightpearl/goods-out", bodyParser.json(), async (req, res) => {
const { id, lifecycle_event } = req.body
const brightpearlService = req.scope.resolve("brightpearlService")
const eventBusService = req.scope.resolve("eventBusService")
if (lifecycle_event === "created") {
await brightpearlService.createFulfillmentFromGoodsOut(id)
eventBusService.emit("brightpearl.goods_out_note", { id })
}
res.sendStatus(200)
@@ -140,13 +140,31 @@ class BrightpearlService extends BaseService {
}
if (bpProducts.length) {
const productRange = bpProducts
.map(({ productId }) => productId)
.join(",")
let availabilities = {}
const perChunk = 100
const chunkedProducts = bpProducts.reduce((resultArray, item, index) => {
const chunkIndex = Math.floor(index / perChunk)
const availabilities = await client.products.retrieveAvailability(
productRange
)
if (!resultArray[chunkIndex]) {
resultArray[chunkIndex] = [] // start a new chunk
}
resultArray[chunkIndex].push(item)
return resultArray
}, [])
// For large product catalogues we get 414 Too long URI so to avoid this
// we chunk things up
for (const chunk of chunkedProducts) {
const productRange = chunk.map(({ productId }) => productId).join(",")
const chunkAvails = await client.products.retrieveAvailability(
productRange
)
availabilities = Object.assign(availabilities, chunkAvails)
}
return Promise.all(
bpProducts.map(async (bpProduct) => {
@@ -1110,55 +1128,63 @@ class BrightpearlService extends BaseService {
}
async createFulfillmentFromGoodsOut(id) {
const client = await this.getClient()
await this.manager_.transaction(async (m) => {
const client = await this.getClient()
// Get goods out and associated order
const goodsOut = await client.warehouses.retrieveGoodsOutNote(id)
const order = await client.orders.retrieve(goodsOut.orderId)
// Get goods out and associated order
const goodsOut = await client.warehouses.retrieveGoodsOutNote(id)
const order = await client.orders.retrieve(goodsOut.orderId)
// Only relevant for medusa orders check channel id
if (order.channelId !== parseInt(this.options.channel_id)) {
return
}
// Combine the line items that we are going to create a fulfillment for
const lines = Object.keys(goodsOut.orderRows)
.map((key) => {
const row = order.rows.find((r) => r.id == key)
if (row) {
return {
item_id: row.externalRef,
// Brightpearl sometimes gives multiple order row entries
quantity: goodsOut.orderRows[key].reduce(
(sum, next) => sum + next.quantity,
0
),
}
}
return null
})
.filter((i) => !!i)
// Orders with a concatenated externalReference are swap orders
const [_, partId] = order.externalRef.split(".")
if (partId) {
if (partId.startsWith("claim")) {
return this.claimService_.createFulfillment(partId, {
goods_out_note: id,
})
} else {
return this.swapService_.createFulfillment(partId, {
goods_out_note: id,
})
// Only relevant for medusa orders check channel id
if (order.channelId !== parseInt(this.options.channel_id)) {
return
}
}
return this.orderService_.createFulfillment(order.externalRef, lines, {
goods_out_note: id,
})
// Combine the line items that we are going to create a fulfillment for
const lines = Object.keys(goodsOut.orderRows)
.map((key) => {
const row = order.rows.find((r) => r.id == key)
if (row) {
return {
item_id: row.externalRef,
// Brightpearl sometimes gives multiple order row entries
quantity: goodsOut.orderRows[key].reduce(
(sum, next) => sum + next.quantity,
0
),
}
}
return null
})
.filter((i) => !!i)
// Orders with a concatenated externalReference are swap orders
const [_, partId] = order.externalRef.split(".")
if (partId) {
if (partId.startsWith("claim")) {
return this.claimService_
.withTransaction(m)
.createFulfillment(partId, {
goods_out_note: id,
})
} else {
return this.swapService_
.withTransaction(m)
.createFulfillment(partId, {
goods_out_note: id,
})
}
}
return this.orderService_
.withTransaction(m)
.createFulfillment(order.externalRef, lines, {
goods_out_note: id,
})
}, "SERIALIZABLE")
}
async createCustomer(fromOrder) {
@@ -19,6 +19,11 @@ class OrderSubscriber {
eventBusService.subscribe("order.placed", this.sendToBrightpearl)
eventBusService.subscribe(
"brightpearl.goods_out_note",
this.createFulfillmentFromGoodsOut
)
eventBusService.subscribe("claim.created", this.registerClaim)
eventBusService.subscribe("order.refund_created", this.registerRefund)
@@ -50,6 +55,10 @@ class OrderSubscriber {
return this.brightpearlService_.createPayment(id)
}
createFulfillmentFromGoodsOut = ({ id }) => {
return this.brightpearlService_.createFulfillmentFromGoodsOut(id)
}
registerSwapPayment = async (data) => {
return this.registerSwap({ id: data.id, swap_id: data.id })
}
@@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.20](https://github.com/medusajs/medusa/compare/medusa-plugin-contentful@1.1.19...medusa-plugin-contentful@1.1.20) (2021-06-24)
**Note:** Version bump only for package medusa-plugin-contentful
## [1.1.19](https://github.com/medusajs/medusa/compare/medusa-plugin-contentful@1.1.18...medusa-plugin-contentful@1.1.19) (2021-06-22)
### Bug Fixes
* region sync ([8e29e6e](https://github.com/medusajs/medusa/commit/8e29e6e63c305b684a37d817b504b3e471d697bd))
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
* typo ([4b6445a](https://github.com/medusajs/medusa/commit/4b6445a1b0509dd0c00f240a4ae287caf1a46ebf))
* wrong custom field ([05bda95](https://github.com/medusajs/medusa/commit/05bda956d97bd0a5f2c43f4c727be569170168c6))
## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-plugin-contentful@1.1.17...medusa-plugin-contentful@1.1.18) (2021-06-09)
**Note:** Version bump only for package medusa-plugin-contentful
@@ -1,6 +1,6 @@
{
"name": "medusa-plugin-contentful",
"version": "1.1.18",
"version": "1.1.20",
"description": "Contentful plugin for Medusa Commerce",
"main": "index.js",
"repository": {
@@ -39,9 +39,9 @@
"body-parser": "^1.19.0",
"contentful-management": "^5.27.1",
"express": "^4.17.1",
"medusa-core-utils": "^1.1.14",
"medusa-test-utils": "^1.1.17",
"medusa-core-utils": "^1.1.15",
"medusa-test-utils": "^1.1.18",
"redis": "^3.0.2"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -297,9 +297,6 @@ class ContentfulService extends BaseService {
}
)
// const ignoreIds = (await this.getIgnoreIds_("product_variant")) || []
// ignoreIds.push(v.id)
// this.redis_.set("product_variant_ignore_ids", JSON.stringify(ignoreIds))
return result
} catch (error) {
throw error
@@ -311,7 +308,7 @@ class ContentfulService extends BaseService {
.then(() => true)
.catch(() => false)
if (!hasType) {
return
return Promise.resolve()
}
try {
const r = await this.regionService_.retrieve(region.id, {
@@ -353,7 +350,7 @@ class ContentfulService extends BaseService {
.then(() => true)
.catch(() => false)
if (!hasType) {
return
return Promise.resolve()
}
const updateFields = [
@@ -435,13 +432,13 @@ class ContentfulService extends BaseService {
const found = data.fields.find((f) => updateFields.includes(f))
if (!found) {
return
return Promise.resolve()
}
try {
const ignore = await this.shouldIgnore_(data.id, "contentful")
if (ignore) {
return
return Promise.resolve()
}
const p = await this.productService_.retrieve(data.id, {
@@ -594,14 +591,14 @@ class ContentfulService extends BaseService {
if (variant.fields) {
const found = variant.fields.find((f) => updateFields.includes(f))
if (!found) {
return
return Promise.resolve()
}
}
try {
const ignore = await this.shouldIgnore_(variant.id, "contentful")
if (ignore) {
return
return Promise.resolve()
}
const environment = await this.getContentfulEnvironment_()
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.9](https://github.com/medusajs/medusa/compare/medusa-plugin-discount-generator@1.1.8...medusa-plugin-discount-generator@1.1.9) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.8](https://github.com/medusajs/medusa/compare/medusa-plugin-discount-generator@1.1.7...medusa-plugin-discount-generator@1.1.8) (2021-06-09)
**Note:** Version bump only for package medusa-plugin-discount-generator
@@ -1,6 +1,6 @@
{
"name": "medusa-plugin-discount-generator",
"version": "1.1.8",
"version": "1.1.9",
"main": "index.js",
"license": "MIT",
"author": "Sebastian Rindom",
@@ -40,5 +40,5 @@
"medusa-core-utils": "^0.1.27",
"randomatic": "^3.1.1"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-plugin-economic@1.1.17...medusa-plugin-economic@1.1.18) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-plugin-economic@1.1.16...medusa-plugin-economic@1.1.17) (2021-06-09)
**Note:** Version bump only for package medusa-plugin-economic
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "medusa-plugin-economic",
"version": "1.1.17",
"version": "1.1.18",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "medusa-plugin-economic",
"version": "1.1.17",
"version": "1.1.18",
"description": "E-conomic financial reporting",
"main": "index.js",
"repository": {
@@ -39,9 +39,9 @@
"axios": "^0.19.2",
"body-parser": "^1.19.0",
"express": "^4.17.1",
"medusa-core-utils": "^1.1.14",
"medusa-test-utils": "^1.1.17",
"medusa-core-utils": "^1.1.15",
"medusa-test-utils": "^1.1.18",
"moment": "^2.27.0"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.9](https://github.com/medusajs/medusa/compare/medusa-plugin-ip-lookup@1.1.8...medusa-plugin-ip-lookup@1.1.9) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.8](https://github.com/medusajs/medusa/compare/medusa-plugin-ip-lookup@1.1.7...medusa-plugin-ip-lookup@1.1.8) (2021-06-09)
**Note:** Version bump only for package medusa-plugin-ip-lookup
@@ -1,6 +1,6 @@
{
"name": "medusa-plugin-ip-lookup",
"version": "1.1.8",
"version": "1.1.9",
"description": "IP lookup middleware for Medusa core",
"main": "dist/index.js",
"repository": {
@@ -35,5 +35,5 @@
"axios": "^0.20.0",
"mongoose": "^5.8.0"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-plugin-mailchimp@1.1.17...medusa-plugin-mailchimp@1.1.18) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-plugin-mailchimp@1.1.16...medusa-plugin-mailchimp@1.1.17) (2021-06-09)
**Note:** Version bump only for package medusa-plugin-mailchimp
@@ -1,6 +1,6 @@
{
"name": "medusa-plugin-mailchimp",
"version": "1.1.17",
"version": "1.1.18",
"description": "Mailchimp newsletter subscriptions",
"main": "index.js",
"repository": {
@@ -40,8 +40,8 @@
"cors": "^2.8.5",
"express": "^4.17.1",
"mailchimp-api-v3": "^1.14.0",
"medusa-core-utils": "^1.1.14",
"medusa-test-utils": "^1.1.17"
"medusa-core-utils": "^1.1.15",
"medusa-test-utils": "^1.1.18"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-plugin-permissions@1.1.17...medusa-plugin-permissions@1.1.18) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-plugin-permissions@1.1.16...medusa-plugin-permissions@1.1.17) (2021-06-09)
**Note:** Version bump only for package medusa-plugin-permissions
@@ -1,6 +1,6 @@
{
"name": "medusa-plugin-permissions",
"version": "1.1.17",
"version": "1.1.18",
"description": "Role permission for Medusa core",
"main": "dist/index.js",
"repository": {
@@ -32,9 +32,9 @@
"medusa-interfaces": "1.x"
},
"dependencies": {
"medusa-core-utils": "^1.1.14",
"medusa-test-utils": "^1.1.17",
"medusa-core-utils": "^1.1.15",
"medusa-test-utils": "^1.1.18",
"mongoose": "^5.8.0"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.0.11](https://github.com/medusajs/medusa/compare/medusa-plugin-restock-notification@0.0.10...medusa-plugin-restock-notification@0.0.11) (2021-06-24)
**Note:** Version bump only for package medusa-plugin-restock-notification
## [0.0.10](https://github.com/medusajs/medusa/compare/medusa-plugin-restock-notification@0.0.9...medusa-plugin-restock-notification@0.0.10) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [0.0.9](https://github.com/medusajs/medusa/compare/medusa-plugin-restock-notification@0.0.8...medusa-plugin-restock-notification@0.0.9) (2021-06-09)
**Note:** Version bump only for package medusa-plugin-restock-notification
@@ -1,6 +1,6 @@
{
"name": "medusa-plugin-restock-notification",
"version": "0.0.9",
"version": "0.0.11",
"main": "index.js",
"repository": {
"type": "git",
@@ -14,11 +14,11 @@
"@babel/core": "^7.7.5",
"@babel/plugin-transform-typescript": "^7.13.0",
"@babel/preset-typescript": "^7.12.7",
"babel-preset-medusa-package": "^1.1.8",
"babel-preset-medusa-package": "^1.1.9",
"cross-env": "^5.2.1",
"eslint": "^6.8.0",
"jest": "^25.5.2",
"medusa-test-utils": "^1.1.17",
"medusa-test-utils": "^1.1.18",
"pg": "^8.5.1",
"ulid": "^2.3.0"
},
@@ -36,7 +36,7 @@
"body-parser": "^1.19.0",
"cors": "^2.8.5",
"express": "^4.17.1",
"medusa-core-utils": "^1.1.14"
"medusa-core-utils": "^1.1.15"
},
"gitHead": "df18c053cb9ec801dd3cb54b0a60a4b9ce8e23c4"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -19,6 +19,8 @@ class VariantSubscriber {
.triggerRestock(id)
)
}
return Promise.resolve()
}
}
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.21](https://github.com/medusajs/medusa/compare/medusa-plugin-segment@1.1.20...medusa-plugin-segment@1.1.21) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.20](https://github.com/medusajs/medusa/compare/medusa-plugin-segment@1.1.19...medusa-plugin-segment@1.1.20) (2021-06-09)
**Note:** Version bump only for package medusa-plugin-segment
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "medusa-plugin-segment",
"version": "1.1.20",
"version": "1.1.21",
"description": "Segment Analytics",
"main": "index.js",
"repository": {
@@ -39,8 +39,8 @@
"axios": "^0.19.2",
"body-parser": "^1.19.0",
"express": "^4.17.1",
"medusa-core-utils": "^1.1.14",
"medusa-test-utils": "^1.1.17"
"medusa-core-utils": "^1.1.15",
"medusa-test-utils": "^1.1.18"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.19](https://github.com/medusajs/medusa/compare/medusa-plugin-sendgrid@1.1.18...medusa-plugin-sendgrid@1.1.19) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-plugin-sendgrid@1.1.17...medusa-plugin-sendgrid@1.1.18) (2021-06-09)
**Note:** Version bump only for package medusa-plugin-sendgrid
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "medusa-plugin-sendgrid",
"version": "1.1.18",
"version": "1.1.19",
"description": "SendGrid transactional emails",
"main": "index.js",
"repository": {
@@ -39,8 +39,8 @@
"@sendgrid/mail": "^7.1.1",
"body-parser": "^1.19.0",
"express": "^4.17.1",
"medusa-core-utils": "^1.1.14",
"medusa-test-utils": "^1.1.17"
"medusa-core-utils": "^1.1.15",
"medusa-test-utils": "^1.1.18"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-plugin-slack-notification@1.1.17...medusa-plugin-slack-notification@1.1.18) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-plugin-slack-notification@1.1.16...medusa-plugin-slack-notification@1.1.17) (2021-06-09)
**Note:** Version bump only for package medusa-plugin-slack-notification
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "medusa-plugin-economic",
"version": "1.1.17",
"version": "1.1.18",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -1,6 +1,6 @@
{
"name": "medusa-plugin-slack-notification",
"version": "1.1.17",
"version": "1.1.18",
"description": "Slack notifications",
"main": "index.js",
"repository": {
@@ -39,9 +39,9 @@
"axios": "^0.19.2",
"body-parser": "^1.19.0",
"express": "^4.17.1",
"medusa-core-utils": "^1.1.14",
"medusa-test-utils": "^1.1.17",
"medusa-core-utils": "^1.1.15",
"medusa-test-utils": "^1.1.18",
"moment": "^2.27.0"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-plugin-twilio-sms@1.1.17...medusa-plugin-twilio-sms@1.1.18) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-plugin-twilio-sms@1.1.16...medusa-plugin-twilio-sms@1.1.17) (2021-06-09)
**Note:** Version bump only for package medusa-plugin-twilio-sms
@@ -1,6 +1,6 @@
{
"name": "medusa-plugin-twilio-sms",
"version": "1.1.17",
"version": "1.1.18",
"main": "index.js",
"repository": {
"type": "git",
@@ -35,9 +35,9 @@
"dependencies": {
"@babel/plugin-transform-classes": "^7.9.5",
"body-parser": "^1.19.0",
"medusa-core-utils": "^1.1.14",
"medusa-test-utils": "^1.1.17",
"medusa-core-utils": "^1.1.15",
"medusa-test-utils": "^1.1.18",
"twilio": "^3.49.1"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-plugin-wishlist@1.1.17...medusa-plugin-wishlist@1.1.18) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-plugin-wishlist@1.1.16...medusa-plugin-wishlist@1.1.17) (2021-06-09)
**Note:** Version bump only for package medusa-plugin-wishlist
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "medusa-plugin-wishlist",
"version": "1.1.17",
"version": "1.1.18",
"description": "Provides /customers/:id/wishlist to add items to a customr's wishlist",
"main": "index.js",
"repository": {
@@ -37,8 +37,8 @@
"dependencies": {
"body-parser": "^1.19.0",
"express": "^4.17.1",
"medusa-core-utils": "^1.1.14",
"medusa-test-utils": "^1.1.17"
"medusa-core-utils": "^1.1.15",
"medusa-test-utils": "^1.1.18"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
+11
View File
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-test-utils@1.1.17...medusa-test-utils@1.1.18) (2021-06-22)
### Bug Fixes
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-test-utils@1.1.16...medusa-test-utils@1.1.17) (2021-06-09)
**Note:** Version bump only for package medusa-test-utils
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "medusa-test-utils",
"version": "1.1.17",
"version": "1.1.18",
"description": "Test utils for Medusa",
"main": "dist/index.js",
"repository": {
@@ -29,8 +29,8 @@
},
"dependencies": {
"@babel/plugin-transform-classes": "^7.9.5",
"medusa-core-utils": "^1.1.14",
"medusa-core-utils": "^1.1.15",
"randomatic": "^3.1.1"
},
"gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.28](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.27...@medusajs/medusa@1.1.28) (2021-06-24)
**Note:** Version bump only for package @medusajs/medusa
## [1.1.27](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.26...@medusajs/medusa@1.1.27) (2021-06-22)
### Bug Fixes
* adds transformer to map field names to field_id names ([88d96a2](https://github.com/medusajs/medusa/commit/88d96a29fd8dbc44ed7ba25154850d417577acad))
* giftcard-order relation ([c88c407](https://github.com/medusajs/medusa/commit/c88c4070960ad1a8126e65b1e9f60d7ba929246a))
* lint ([5829550](https://github.com/medusajs/medusa/commit/58295505178209d511046089d736395d121b9732))
* mobile pay support ([91511cb](https://github.com/medusajs/medusa/commit/91511cbdf8bc66f5688a36ecf56edb16a220cc82))
* region sync ([8e29e6e](https://github.com/medusajs/medusa/commit/8e29e6e63c305b684a37d817b504b3e471d697bd))
* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532))
## [1.1.26](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.25...@medusajs/medusa@1.1.26) (2021-06-10)
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@medusajs/medusa",
"version": "1.1.26",
"version": "1.1.28",
"description": "E-commerce for JAMstack",
"main": "dist/index.js",
"repository": {
@@ -17,11 +17,11 @@
"@babel/cli": "^7.14.3",
"@babel/core": "^7.14.3",
"@babel/preset-typescript": "^7.13.0",
"babel-preset-medusa-package": "^1.1.8",
"babel-preset-medusa-package": "^1.1.9",
"cross-env": "^5.2.1",
"eslint": "^6.8.0",
"jest": "^25.5.2",
"medusa-interfaces": "^1.1.15",
"medusa-interfaces": "^1.1.16",
"nodemon": "^2.0.1",
"prettier": "^1.19.1",
"supertest": "^4.0.2"
@@ -59,8 +59,8 @@
"joi": "^17.3.0",
"joi-objectid": "^3.0.1",
"jsonwebtoken": "^8.5.1",
"medusa-core-utils": "^1.1.14",
"medusa-test-utils": "^1.1.17",
"medusa-core-utils": "^1.1.15",
"medusa-test-utils": "^1.1.18",
"morgan": "^1.9.1",
"multer": "^1.4.2",
"passport": "^0.4.0",
@@ -78,5 +78,5 @@
"uuid": "^8.3.1",
"winston": "^3.2.1"
},
"gitHead": "245ccdc4774965cdd27d4dbdb5fbb084c8066c66"
"gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f"
}
@@ -49,6 +49,8 @@ export const defaultRelations = ["order", "cart"]
export const defaultCartRelations = [
"region",
"items",
"items.variant",
"items.variant.prices",
"payment",
"shipping_address",
"billing_address",
@@ -107,13 +107,15 @@ export const defaultRelations = [
"gift_cards",
"region",
"items",
"items.variant",
"items.variant.prices",
"payment",
"shipping_address",
"billing_address",
"region.countries",
"region.payment_providers",
"shipping_methods",
"payment_sessions",
"shipping_methods",
"shipping_methods.shipping_option",
"discounts",
]
@@ -33,6 +33,7 @@ export const defaultRelations = [
"items",
"items.variant",
"items.variant.product",
"items.variant.prices",
"shipping_methods",
"discounts",
"customer",
+1 -1
View File
@@ -99,7 +99,7 @@ export class LineItem {
@Column({ nullable: true })
variant_id: string
@ManyToOne(() => ProductVariant, { eager: true })
@ManyToOne(() => ProductVariant)
@JoinColumn({ name: "variant_id" })
variant: ProductVariant
@@ -19,6 +19,9 @@ import { Product } from "./product"
import { MoneyAmount } from "./money-amount"
import { ProductOptionValue } from "./product-option-value"
@Entity()
export class ProductVariant {
@PrimaryColumn()
+1 -1
View File
@@ -162,7 +162,7 @@ class NotificationService extends BaseService {
handleEvent(eventName, data) {
const subs = this.subscribers_[eventName]
if (!subs) {
return
return Promise.resolve()
}
if(data['no_notification'] === true) {
return
+3
View File
@@ -111,10 +111,13 @@ class OrderService extends BaseService {
shippingOptionService: this.shippingOptionService_,
shippingProfileService: this.shippingProfileService_,
fulfillmentProviderService: this.fulfillmentProviderService_,
fulfillmentService: this.fulfillmentService_,
customerService: this.customerService_,
discountService: this.discountService_,
totalsService: this.totalsService_,
cartService: this.cartService_,
giftCardService: this.giftCardService_,
addressRepository: this.addressRepository_,
draftOrderService: this.draftOrderService_,
})