@victorhalla/n8n-nodes-wwebjsapi 1.1.1 → 1.1.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WWebjsApi.node.d.ts","sourceRoot":"","sources":["../../../nodes/WWebjsApi/WWebjsApi.node.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,iBAAiB,EAEjB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,SAAS,EACT,oBAAoB,EAErB,MAAM,cAAc,CAAC;AAEtB,qBAAa,SAAU,YAAW,SAAS;IACzC,WAAW,EAAE,oBAAoB,CA40K/B;IAEF,OAAO;;8BAEqB,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC;;MAuChF;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"WWebjsApi.node.d.ts","sourceRoot":"","sources":["../../../nodes/WWebjsApi/WWebjsApi.node.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,iBAAiB,EAEjB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,SAAS,EACT,oBAAoB,EAErB,MAAM,cAAc,CAAC;AAEtB,qBAAa,SAAU,YAAW,SAAS;IACzC,WAAW,EAAE,oBAAoB,CA40K/B;IAEF,OAAO;;8BAEqB,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC;;MAuChF;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAuiGxE"}
|
|
@@ -5498,6 +5498,7 @@ class WWebjsApi {
|
|
|
5498
5498
|
};
|
|
5499
5499
|
}
|
|
5500
5500
|
async execute() {
|
|
5501
|
+
var _a, _b;
|
|
5501
5502
|
const items = this.getInputData();
|
|
5502
5503
|
const returnData = [];
|
|
5503
5504
|
const credentials = await this.getCredentials("wWebjsApiCredentials");
|
|
@@ -8092,11 +8093,18 @@ class WWebjsApi {
|
|
|
8092
8093
|
returnFullResponse: false,
|
|
8093
8094
|
json: false,
|
|
8094
8095
|
};
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
const
|
|
8098
|
-
|
|
8099
|
-
:
|
|
8096
|
+
// Receber como Buffer nativo: returnFullResponse + encoding: null
|
|
8097
|
+
// Evita decode UTF-8 que corrompe bytes > 127
|
|
8098
|
+
const _binaryOptions = {
|
|
8099
|
+
...options,
|
|
8100
|
+
returnFullResponse: true,
|
|
8101
|
+
encoding: null,
|
|
8102
|
+
};
|
|
8103
|
+
const _fullResp = await this.helpers.httpRequest(_binaryOptions);
|
|
8104
|
+
const _rawBody = (_a = _fullResp.body) !== null && _a !== void 0 ? _a : _fullResp;
|
|
8105
|
+
const _buffer = Buffer.isBuffer(_rawBody)
|
|
8106
|
+
? _rawBody
|
|
8107
|
+
: Buffer.from(_rawBody);
|
|
8100
8108
|
const _binaryData = await this.helpers.prepareBinaryData(_buffer, 'getSessionQrImage.png', 'image/png');
|
|
8101
8109
|
responseData = { binary: _binaryData, mimeType: 'image/png' };
|
|
8102
8110
|
break;
|
|
@@ -8182,11 +8190,18 @@ class WWebjsApi {
|
|
|
8182
8190
|
returnFullResponse: false,
|
|
8183
8191
|
json: false,
|
|
8184
8192
|
};
|
|
8185
|
-
|
|
8186
|
-
|
|
8187
|
-
const
|
|
8188
|
-
|
|
8189
|
-
:
|
|
8193
|
+
// Receber como Buffer nativo: returnFullResponse + encoding: null
|
|
8194
|
+
// Evita decode UTF-8 que corrompe bytes > 127
|
|
8195
|
+
const _binaryOptions = {
|
|
8196
|
+
...options,
|
|
8197
|
+
returnFullResponse: true,
|
|
8198
|
+
encoding: null,
|
|
8199
|
+
};
|
|
8200
|
+
const _fullResp = await this.helpers.httpRequest(_binaryOptions);
|
|
8201
|
+
const _rawBody = (_b = _fullResp.body) !== null && _b !== void 0 ? _b : _fullResp;
|
|
8202
|
+
const _buffer = Buffer.isBuffer(_rawBody)
|
|
8203
|
+
? _rawBody
|
|
8204
|
+
: Buffer.from(_rawBody);
|
|
8190
8205
|
const _binaryData = await this.helpers.prepareBinaryData(_buffer, 'getSessionGetPageScreenshot.png', 'image/png');
|
|
8191
8206
|
responseData = { binary: _binaryData, mimeType: 'image/png' };
|
|
8192
8207
|
break;
|