@netresearch/node-red-contrib-magento-eqp 2.0.0 → 3.0.0
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/README.md
CHANGED
|
@@ -14,6 +14,17 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
|
+
var __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
17
28
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
29
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
30
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -51,6 +62,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51
62
|
}
|
|
52
63
|
};
|
|
53
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
|
+
var axios_1 = require("axios");
|
|
54
66
|
var node_red_contrib_typescript_node_1 = require("node-red-contrib-typescript-node");
|
|
55
67
|
var MagentoEQPCallbackParser = /** @class */ (function (_super) {
|
|
56
68
|
__extends(MagentoEQPCallbackParser, _super);
|
|
@@ -68,7 +80,7 @@ var MagentoEQPCallbackParser = /** @class */ (function (_super) {
|
|
|
68
80
|
}
|
|
69
81
|
_this.configNode = configNode;
|
|
70
82
|
_this.on('input', function (msg) { return __awaiter(_this, void 0, void 0, function () {
|
|
71
|
-
var payload, _a, err_1, error;
|
|
83
|
+
var payload, _a, err_1, error, httpResponse;
|
|
72
84
|
return __generator(this, function (_b) {
|
|
73
85
|
switch (_b.label) {
|
|
74
86
|
case 0:
|
|
@@ -88,7 +100,7 @@ var MagentoEQPCallbackParser = /** @class */ (function (_super) {
|
|
|
88
100
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
89
101
|
// @ts-ignore
|
|
90
102
|
_a.payload = _b.sent();
|
|
91
|
-
this.send(msg);
|
|
103
|
+
this.send([msg, null]);
|
|
92
104
|
return [3 /*break*/, 3];
|
|
93
105
|
case 2:
|
|
94
106
|
err_1 = _b.sent();
|
|
@@ -98,6 +110,8 @@ var MagentoEQPCallbackParser = /** @class */ (function (_super) {
|
|
|
98
110
|
shape: 'ring',
|
|
99
111
|
text: error.toString()
|
|
100
112
|
});
|
|
113
|
+
httpResponse = err_1 instanceof axios_1.AxiosError && !!err_1.response ? err_1.response.data : null;
|
|
114
|
+
this.send([null, __assign(__assign({}, error), { httpResponse: httpResponse })]);
|
|
101
115
|
return [3 /*break*/, 3];
|
|
102
116
|
case 3: return [2 /*return*/];
|
|
103
117
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netresearch/node-red-contrib-magento-eqp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Node-RED module for parsing callbacks from the Magento Marketplace EQP API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -27,17 +27,18 @@
|
|
|
27
27
|
"prepack": "yarn build"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@netresearch/node-magento-eqp": "^
|
|
30
|
+
"@netresearch/node-magento-eqp": "^4.0.1",
|
|
31
|
+
"axios": "^1.4.0",
|
|
31
32
|
"node-red-contrib-typescript-node": "^0.1.0"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"@types/node": "^12.20.55",
|
|
35
|
-
"@types/node-red": "0.20.
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
37
|
-
"@typescript-eslint/parser": "^
|
|
38
|
-
"eslint": "^8.
|
|
36
|
+
"@types/node-red": "0.20.3",
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
|
38
|
+
"@typescript-eslint/parser": "^6.1.0",
|
|
39
|
+
"eslint": "^8.45.0",
|
|
39
40
|
"eslint-plugin-html": "^7.1.0",
|
|
40
|
-
"typescript": "^
|
|
41
|
+
"typescript": "^5.1.6"
|
|
41
42
|
},
|
|
42
43
|
"engines": {
|
|
43
44
|
"node": ">=12"
|