Skip to content

Commit a132edd

Browse files
Releasing v4.33.1
1 parent 9097306 commit a132edd

File tree

18 files changed

+104
-117
lines changed

18 files changed

+104
-117
lines changed

.pubnub.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
---
22
changelog:
3+
-
4+
changes:
5+
-
6+
text: "Fixes issue of performing file publish message retry according to `fileUploadPublishRetryLimit` setting of PubNub instance."
7+
type: bug
8+
date: 2021-10-18
9+
version: v4.33.1
310
-
411
changes:
512
-
@@ -1054,7 +1061,7 @@ supported-platforms:
10541061
- "Ubuntu 14.04 and up"
10551062
- "Windows 7 and up"
10561063
version: "Pubnub Javascript for Node"
1057-
version: "4.33.0"
1064+
version: "4.33.1"
10581065
sdks:
10591066
-
10601067
full-name: PubNub Javascript SDK

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [v4.33.1](https://github.com/pubnub/javascript/releases/tag/v4.33.1)
2+
October-18-2021
3+
4+
[Full Changelog](https://github.com/pubnub/javascript/compare/v4.33.0...v4.33.1)
5+
6+
- 🐛 Fixes issue of performing file publish message retry according to `fileUploadPublishRetryLimit` setting of PubNub instance.
7+
18
## [v4.33.0](https://github.com/pubnub/javascript/releases/tag/v4.33.0)
29
August-31-2021
310

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ You will need the publish and subscribe keys to authenticate your app. Get your
2323
npm install pubnub
2424
```
2525
* or download one of our builds from our CDN:
26-
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.33.0.js
27-
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.33.0.min.js
26+
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.33.1.js
27+
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.33.1.min.js
2828
2929
2. Configure your keys:
3030

dist/titanium/pubnub.js

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! 4.32.1 / Consumer */
1+
/*! 4.33.1 / Consumer */
22
exports["PubNub"] =
33
/******/ (function(modules) { // webpackBootstrap
44
/******/ // The module cache
@@ -566,7 +566,7 @@ var _default = function () {
566566
}, {
567567
key: "getVersion",
568568
value: function getVersion() {
569-
return '4.32.1';
569+
return '4.33.1';
570570
}
571571
}, {
572572
key: "_addPnsdkSuffix",
@@ -7794,20 +7794,15 @@ var sendFile = function sendFile(_ref) {
77947794
throw new _endpoint.PubNubError('Upload to bucket was unsuccessful', result);
77957795

77967796
case 82:
7797-
retries = 5;
7797+
retries = config.fileUploadPublishRetryLimit;
77987798
wasSuccessful = false;
77997799
publishResult = {
78007800
timetoken: '0'
78017801
};
78027802

78037803
case 85:
7804-
if (!(!wasSuccessful && retries > 0)) {
7805-
_context.next = 98;
7806-
break;
7807-
}
7808-
7809-
_context.prev = 86;
7810-
_context.next = 89;
7804+
_context.prev = 85;
7805+
_context.next = 88;
78117806
return publishFile({
78127807
channel: channel,
78137808
message: message,
@@ -7818,24 +7813,26 @@ var sendFile = function sendFile(_ref) {
78187813
ttl: ttl
78197814
});
78207815

7821-
case 89:
7816+
case 88:
78227817
publishResult = _context.sent;
78237818
wasSuccessful = true;
7824-
_context.next = 96;
7819+
_context.next = 95;
78257820
break;
78267821

7827-
case 93:
7828-
_context.prev = 93;
7829-
_context.t17 = _context["catch"](86);
7822+
case 92:
7823+
_context.prev = 92;
7824+
_context.t17 = _context["catch"](85);
78307825
retries -= 1;
78317826

7832-
case 96:
7833-
_context.next = 85;
7834-
break;
7827+
case 95:
7828+
if (!wasSuccessful && retries > 0) {
7829+
_context.next = 85;
7830+
break;
7831+
}
78357832

7836-
case 98:
7833+
case 96:
78377834
if (wasSuccessful) {
7838-
_context.next = 102;
7835+
_context.next = 100;
78397836
break;
78407837
}
78417838

@@ -7845,19 +7842,19 @@ var sendFile = function sendFile(_ref) {
78457842
name: name
78467843
});
78477844

7848-
case 102:
7845+
case 100:
78497846
return _context.abrupt("return", {
78507847
timetoken: publishResult.timetoken,
78517848
id: id,
78527849
name: name
78537850
});
78547851

7855-
case 103:
7852+
case 101:
78567853
case "end":
78577854
return _context.stop();
78587855
}
78597856
}
7860-
}, _callee, null, [[21, 73], [86, 93]]);
7857+
}, _callee, null, [[21, 73], [85, 92]]);
78617858
}));
78627859

78637860
return function (_x) {
@@ -8772,9 +8769,9 @@ var endpoint = {
87728769
},
87738770
handleResponse: function () {
87748771
var _handleResponse = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(_ref3, res, params) {
8775-
var _res$response$name;
8772+
var _params$cipherKey, _res$response$name;
87768773

8777-
var PubNubFile, config, cryptography, body, _params$cipherKey;
8774+
var PubNubFile, config, cryptography, body, _params$cipherKey2;
87788775

87798776
return _regenerator["default"].wrap(function _callee$(_context) {
87808777
while (1) {
@@ -8783,13 +8780,13 @@ var endpoint = {
87838780
PubNubFile = _ref3.PubNubFile, config = _ref3.config, cryptography = _ref3.cryptography;
87848781
body = res.response.body;
87858782

8786-
if (!(PubNubFile.supportsEncryptFile && config.cipherKey)) {
8783+
if (!(PubNubFile.supportsEncryptFile && ((_params$cipherKey = params.cipherKey) !== null && _params$cipherKey !== void 0 ? _params$cipherKey : config.cipherKey))) {
87878784
_context.next = 6;
87888785
break;
87898786
}
87908787

87918788
_context.next = 5;
8792-
return cryptography.decrypt((_params$cipherKey = params.cipherKey) !== null && _params$cipherKey !== void 0 ? _params$cipherKey : config.cipherKey, body);
8789+
return cryptography.decrypt((_params$cipherKey2 = params.cipherKey) !== null && _params$cipherKey2 !== void 0 ? _params$cipherKey2 : config.cipherKey, body);
87938790

87948791
case 5:
87958792
body = _context.sent;

dist/titanium/pubnub.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/web/pubnub.js

Lines changed: 25 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! 4.32.1 / Consumer */
1+
/*! 4.33.1 / Consumer */
22
(function webpackUniversalModuleDefinition(root, factory) {
33
if(typeof exports === 'object' && typeof module === 'object')
44
module.exports = factory();
@@ -576,7 +576,7 @@ var _default = function () {
576576
}, {
577577
key: "getVersion",
578578
value: function getVersion() {
579-
return '4.32.1';
579+
return '4.33.1';
580580
}
581581
}, {
582582
key: "_addPnsdkSuffix",
@@ -9986,20 +9986,15 @@ var sendFile = function sendFile(_ref) {
99869986
throw new _endpoint.PubNubError('Upload to bucket was unsuccessful', result);
99879987

99889988
case 82:
9989-
retries = 5;
9989+
retries = config.fileUploadPublishRetryLimit;
99909990
wasSuccessful = false;
99919991
publishResult = {
99929992
timetoken: '0'
99939993
};
99949994

99959995
case 85:
9996-
if (!(!wasSuccessful && retries > 0)) {
9997-
_context.next = 98;
9998-
break;
9999-
}
10000-
10001-
_context.prev = 86;
10002-
_context.next = 89;
9996+
_context.prev = 85;
9997+
_context.next = 88;
100039998
return publishFile({
100049999
channel: channel,
1000510000
message: message,
@@ -10010,24 +10005,26 @@ var sendFile = function sendFile(_ref) {
1001010005
ttl: ttl
1001110006
});
1001210007

10013-
case 89:
10008+
case 88:
1001410009
publishResult = _context.sent;
1001510010
wasSuccessful = true;
10016-
_context.next = 96;
10011+
_context.next = 95;
1001710012
break;
1001810013

10019-
case 93:
10020-
_context.prev = 93;
10021-
_context.t17 = _context["catch"](86);
10014+
case 92:
10015+
_context.prev = 92;
10016+
_context.t17 = _context["catch"](85);
1002210017
retries -= 1;
1002310018

10024-
case 96:
10025-
_context.next = 85;
10026-
break;
10019+
case 95:
10020+
if (!wasSuccessful && retries > 0) {
10021+
_context.next = 85;
10022+
break;
10023+
}
1002710024

10028-
case 98:
10025+
case 96:
1002910026
if (wasSuccessful) {
10030-
_context.next = 102;
10027+
_context.next = 100;
1003110028
break;
1003210029
}
1003310030

@@ -10037,19 +10034,19 @@ var sendFile = function sendFile(_ref) {
1003710034
name: name
1003810035
});
1003910036

10040-
case 102:
10037+
case 100:
1004110038
return _context.abrupt("return", {
1004210039
timetoken: publishResult.timetoken,
1004310040
id: id,
1004410041
name: name
1004510042
});
1004610043

10047-
case 103:
10044+
case 101:
1004810045
case "end":
1004910046
return _context.stop();
1005010047
}
1005110048
}
10052-
}, _callee, null, [[21, 73], [86, 93]]);
10049+
}, _callee, null, [[21, 73], [85, 92]]);
1005310050
}));
1005410051

1005510052
return function (_x) {
@@ -10964,9 +10961,9 @@ var endpoint = {
1096410961
},
1096510962
handleResponse: function () {
1096610963
var _handleResponse = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(_ref3, res, params) {
10967-
var _res$response$name;
10964+
var _params$cipherKey, _res$response$name;
1096810965

10969-
var PubNubFile, config, cryptography, body, _params$cipherKey;
10966+
var PubNubFile, config, cryptography, body, _params$cipherKey2;
1097010967

1097110968
return _regenerator["default"].wrap(function _callee$(_context) {
1097210969
while (1) {
@@ -10975,13 +10972,13 @@ var endpoint = {
1097510972
PubNubFile = _ref3.PubNubFile, config = _ref3.config, cryptography = _ref3.cryptography;
1097610973
body = res.response.body;
1097710974

10978-
if (!(PubNubFile.supportsEncryptFile && config.cipherKey)) {
10975+
if (!(PubNubFile.supportsEncryptFile && ((_params$cipherKey = params.cipherKey) !== null && _params$cipherKey !== void 0 ? _params$cipherKey : config.cipherKey))) {
1097910976
_context.next = 6;
1098010977
break;
1098110978
}
1098210979

1098310980
_context.next = 5;
10984-
return cryptography.decrypt((_params$cipherKey = params.cipherKey) !== null && _params$cipherKey !== void 0 ? _params$cipherKey : config.cipherKey, body);
10981+
return cryptography.decrypt((_params$cipherKey2 = params.cipherKey) !== null && _params$cipherKey2 !== void 0 ? _params$cipherKey2 : config.cipherKey, body);
1098510982

1098610983
case 5:
1098710984
body = _context.sent;
@@ -18153,21 +18150,12 @@ var WebCryptography = function () {
1815318150

1815418151
case 8:
1815518152
abPlaindata = _context4.sent;
18156-
18157-
if (!(file.data instanceof ArrayBuffer)) {
18158-
_context4.next = 13;
18159-
break;
18160-
}
18161-
1816218153
return _context4.abrupt("return", File.create({
1816318154
name: file.name,
1816418155
data: abPlaindata
1816518156
}));
1816618157

18167-
case 13:
18168-
throw new Error('Cannot decrypt this file. In browser environment file decryption supports only ArrayBuffer.');
18169-
18170-
case 14:
18158+
case 10:
1817118159
case "end":
1817218160
return _context4.stop();
1817318161
}

dist/web/pubnub.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/core/components/config.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)