@bytescale/sdk 3.9.1 → 3.11.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/dist/browser/cjs/main.js +14 -10
- package/dist/browser/esm/main.mjs +14 -10
- package/dist/node/cjs/main.js +3 -1
- package/dist/node/esm/main.mjs +3 -1
- package/dist/types/private/ConsoleUtils.d.ts +1 -1
- package/dist/worker/cjs/main.js +3 -1
- package/dist/worker/esm/main.mjs +3 -1
- package/package.json +1 -1
package/dist/browser/cjs/main.js
CHANGED
|
@@ -1959,7 +1959,9 @@ var UploadManagerBase = /*#__PURE__*/function () {
|
|
|
1959
1959
|
size = _ref$value.size,
|
|
1960
1960
|
type = _ref$value.type;
|
|
1961
1961
|
return {
|
|
1962
|
-
|
|
1962
|
+
// Some browsers/OSs return 'type: ""' for files with unknown MIME types, like HEICs, which causes a validation
|
|
1963
|
+
// error from the Bytescale API as "" is not a valid MIME type, so we coalesce to undefined here.
|
|
1964
|
+
mime: type === "" ? undefined : type,
|
|
1963
1965
|
size: size,
|
|
1964
1966
|
originalFileName: name,
|
|
1965
1967
|
maxConcurrentUploadParts: undefined
|
|
@@ -2370,15 +2372,15 @@ var ConsoleUtils = /*#__PURE__*/function () {
|
|
|
2370
2372
|
ConsoleUtils_classCallCheck(this, ConsoleUtils);
|
|
2371
2373
|
}
|
|
2372
2374
|
ConsoleUtils_createClass(ConsoleUtils, null, [{
|
|
2373
|
-
key: "error",
|
|
2374
|
-
value: function error(message) {
|
|
2375
|
-
console.error(ConsoleUtils.prefix(message));
|
|
2376
|
-
}
|
|
2377
|
-
}, {
|
|
2378
2375
|
key: "warn",
|
|
2379
2376
|
value: function warn(message) {
|
|
2380
2377
|
console.warn(ConsoleUtils.prefix(message));
|
|
2381
2378
|
}
|
|
2379
|
+
}, {
|
|
2380
|
+
key: "error",
|
|
2381
|
+
value: function error(message) {
|
|
2382
|
+
console.error(ConsoleUtils.prefix(message));
|
|
2383
|
+
}
|
|
2382
2384
|
}, {
|
|
2383
2385
|
key: "prefix",
|
|
2384
2386
|
value: function prefix(message) {
|
|
@@ -2549,13 +2551,15 @@ var AuthManagerImpl = /*#__PURE__*/function () {
|
|
|
2549
2551
|
});
|
|
2550
2552
|
});
|
|
2551
2553
|
}, function (e) {
|
|
2552
|
-
// Use '
|
|
2553
|
-
ConsoleUtils.
|
|
2554
|
+
// Use 'warn' instead of 'error' since this happens frequently, i.e. user goes through a tunnel, and some customers report these errors to systems like Sentry, so we don't want to spam.
|
|
2555
|
+
ConsoleUtils.warn("Unable to refresh JWT access token: ".concat(e));
|
|
2554
2556
|
});
|
|
2555
2557
|
}, function (_wasThrown, _result) {
|
|
2556
2558
|
session.accessTokenRefreshHandle = window.setTimeout(function () {
|
|
2557
|
-
_this6.refreshAccessToken(session).then(function () {},
|
|
2558
|
-
|
|
2559
|
+
_this6.refreshAccessToken(session).then(function () {},
|
|
2560
|
+
// Should not occur, as this method shouldn't throw errors.
|
|
2561
|
+
function (e) {
|
|
2562
|
+
return ConsoleUtils.error("Unexpected error when refreshing JWT access token: ".concat(e));
|
|
2559
2563
|
});
|
|
2560
2564
|
}, timeout * 1000);
|
|
2561
2565
|
return AuthManagerBrowser_rethrow(_wasThrown, _result);
|
|
@@ -1944,7 +1944,9 @@ var UploadManagerBase = /*#__PURE__*/function () {
|
|
|
1944
1944
|
size = _ref$value.size,
|
|
1945
1945
|
type = _ref$value.type;
|
|
1946
1946
|
return {
|
|
1947
|
-
|
|
1947
|
+
// Some browsers/OSs return 'type: ""' for files with unknown MIME types, like HEICs, which causes a validation
|
|
1948
|
+
// error from the Bytescale API as "" is not a valid MIME type, so we coalesce to undefined here.
|
|
1949
|
+
mime: type === "" ? undefined : type,
|
|
1948
1950
|
size: size,
|
|
1949
1951
|
originalFileName: name,
|
|
1950
1952
|
maxConcurrentUploadParts: undefined
|
|
@@ -2355,15 +2357,15 @@ var ConsoleUtils = /*#__PURE__*/function () {
|
|
|
2355
2357
|
ConsoleUtils_classCallCheck(this, ConsoleUtils);
|
|
2356
2358
|
}
|
|
2357
2359
|
ConsoleUtils_createClass(ConsoleUtils, null, [{
|
|
2358
|
-
key: "error",
|
|
2359
|
-
value: function error(message) {
|
|
2360
|
-
console.error(ConsoleUtils.prefix(message));
|
|
2361
|
-
}
|
|
2362
|
-
}, {
|
|
2363
2360
|
key: "warn",
|
|
2364
2361
|
value: function warn(message) {
|
|
2365
2362
|
console.warn(ConsoleUtils.prefix(message));
|
|
2366
2363
|
}
|
|
2364
|
+
}, {
|
|
2365
|
+
key: "error",
|
|
2366
|
+
value: function error(message) {
|
|
2367
|
+
console.error(ConsoleUtils.prefix(message));
|
|
2368
|
+
}
|
|
2367
2369
|
}, {
|
|
2368
2370
|
key: "prefix",
|
|
2369
2371
|
value: function prefix(message) {
|
|
@@ -2534,13 +2536,15 @@ var AuthManagerImpl = /*#__PURE__*/function () {
|
|
|
2534
2536
|
});
|
|
2535
2537
|
});
|
|
2536
2538
|
}, function (e) {
|
|
2537
|
-
// Use '
|
|
2538
|
-
ConsoleUtils.
|
|
2539
|
+
// Use 'warn' instead of 'error' since this happens frequently, i.e. user goes through a tunnel, and some customers report these errors to systems like Sentry, so we don't want to spam.
|
|
2540
|
+
ConsoleUtils.warn("Unable to refresh JWT access token: ".concat(e));
|
|
2539
2541
|
});
|
|
2540
2542
|
}, function (_wasThrown, _result) {
|
|
2541
2543
|
session.accessTokenRefreshHandle = window.setTimeout(function () {
|
|
2542
|
-
_this6.refreshAccessToken(session).then(function () {},
|
|
2543
|
-
|
|
2544
|
+
_this6.refreshAccessToken(session).then(function () {},
|
|
2545
|
+
// Should not occur, as this method shouldn't throw errors.
|
|
2546
|
+
function (e) {
|
|
2547
|
+
return ConsoleUtils.error("Unexpected error when refreshing JWT access token: ".concat(e));
|
|
2544
2548
|
});
|
|
2545
2549
|
}, timeout * 1000);
|
|
2546
2550
|
return AuthManagerBrowser_rethrow(_wasThrown, _result);
|
package/dist/node/cjs/main.js
CHANGED
|
@@ -1959,7 +1959,9 @@ var UploadManagerBase = /*#__PURE__*/function () {
|
|
|
1959
1959
|
size = _ref$value.size,
|
|
1960
1960
|
type = _ref$value.type;
|
|
1961
1961
|
return {
|
|
1962
|
-
|
|
1962
|
+
// Some browsers/OSs return 'type: ""' for files with unknown MIME types, like HEICs, which causes a validation
|
|
1963
|
+
// error from the Bytescale API as "" is not a valid MIME type, so we coalesce to undefined here.
|
|
1964
|
+
mime: type === "" ? undefined : type,
|
|
1963
1965
|
size: size,
|
|
1964
1966
|
originalFileName: name,
|
|
1965
1967
|
maxConcurrentUploadParts: undefined
|
package/dist/node/esm/main.mjs
CHANGED
|
@@ -1946,7 +1946,9 @@ var UploadManagerBase = /*#__PURE__*/function () {
|
|
|
1946
1946
|
size = _ref$value.size,
|
|
1947
1947
|
type = _ref$value.type;
|
|
1948
1948
|
return {
|
|
1949
|
-
|
|
1949
|
+
// Some browsers/OSs return 'type: ""' for files with unknown MIME types, like HEICs, which causes a validation
|
|
1950
|
+
// error from the Bytescale API as "" is not a valid MIME type, so we coalesce to undefined here.
|
|
1951
|
+
mime: type === "" ? undefined : type,
|
|
1950
1952
|
size: size,
|
|
1951
1953
|
originalFileName: name,
|
|
1952
1954
|
maxConcurrentUploadParts: undefined
|
package/dist/worker/cjs/main.js
CHANGED
|
@@ -1959,7 +1959,9 @@ var UploadManagerBase = /*#__PURE__*/function () {
|
|
|
1959
1959
|
size = _ref$value.size,
|
|
1960
1960
|
type = _ref$value.type;
|
|
1961
1961
|
return {
|
|
1962
|
-
|
|
1962
|
+
// Some browsers/OSs return 'type: ""' for files with unknown MIME types, like HEICs, which causes a validation
|
|
1963
|
+
// error from the Bytescale API as "" is not a valid MIME type, so we coalesce to undefined here.
|
|
1964
|
+
mime: type === "" ? undefined : type,
|
|
1963
1965
|
size: size,
|
|
1964
1966
|
originalFileName: name,
|
|
1965
1967
|
maxConcurrentUploadParts: undefined
|
package/dist/worker/esm/main.mjs
CHANGED
|
@@ -1944,7 +1944,9 @@ var UploadManagerBase = /*#__PURE__*/function () {
|
|
|
1944
1944
|
size = _ref$value.size,
|
|
1945
1945
|
type = _ref$value.type;
|
|
1946
1946
|
return {
|
|
1947
|
-
|
|
1947
|
+
// Some browsers/OSs return 'type: ""' for files with unknown MIME types, like HEICs, which causes a validation
|
|
1948
|
+
// error from the Bytescale API as "" is not a valid MIME type, so we coalesce to undefined here.
|
|
1949
|
+
mime: type === "" ? undefined : type,
|
|
1948
1950
|
size: size,
|
|
1949
1951
|
originalFileName: name,
|
|
1950
1952
|
maxConcurrentUploadParts: undefined
|