@pinelab/vendure-plugin-sendcloud 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
# 1.2.
|
|
1
|
+
# 1.2.3 (2024-06-13)
|
|
2
|
+
|
|
3
|
+
- Log request body, instead of util.inspect
|
|
4
|
+
|
|
5
|
+
# 1.2.2 (2024-06-13)
|
|
6
|
+
|
|
7
|
+
- Added better logging for failing incoming webhooks
|
|
8
|
+
|
|
9
|
+
# 1.2.1 (2023-01-16)
|
|
2
10
|
|
|
3
11
|
- Correctly transition order to Delivered after it has been Shipped
|
|
4
12
|
|
|
@@ -24,7 +24,14 @@ let SendcloudController = class SendcloudController {
|
|
|
24
24
|
this.sendcloudService = sendcloudService;
|
|
25
25
|
}
|
|
26
26
|
async webhook(req, signature, channelToken) {
|
|
27
|
-
|
|
27
|
+
let body;
|
|
28
|
+
try {
|
|
29
|
+
body = JSON.parse(req.body.toString());
|
|
30
|
+
}
|
|
31
|
+
catch (e) {
|
|
32
|
+
core_1.Logger.error(`Error parsing incoming webhook body: ${e?.message ?? e}`, constants_1.loggerCtx, req.body.toString());
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
28
35
|
const rawBody = req.rawBody;
|
|
29
36
|
const ctx = await this.sendcloudService.createContext(channelToken);
|
|
30
37
|
const { client } = await this.sendcloudService.getClient(ctx);
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinelab/vendure-plugin-sendcloud",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Vendure plugin for syncing orders with SendCloud",
|
|
5
|
-
"icon": "truck",
|
|
6
5
|
"author": "Martijn van de Brug <martijn@pinelab.studio>",
|
|
7
6
|
"homepage": "https://pinelab-plugins.com/",
|
|
8
7
|
"repository": "https://github.com/Pinelab-studio/pinelab-vendure-plugins",
|
|
@@ -21,7 +20,8 @@
|
|
|
21
20
|
"scripts": {
|
|
22
21
|
"build": "rimraf dist && tsc && copyfiles -u 1 'src/ui/**/*' dist/vendure-plugin-sendcloud/src/",
|
|
23
22
|
"test": "vitest run",
|
|
24
|
-
"start": "yarn ts-node test/dev-server.ts"
|
|
23
|
+
"start": "yarn ts-node test/dev-server.ts",
|
|
24
|
+
"lint": "echo 'No linting configured'"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "1a364f2738b44895e9f3eec133a66f4ac0df7678"
|
|
27
27
|
}
|