imposium-js-sdk 3.5.8 → 3.5.10
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/lib/imposium.js +26 -4
- package/lib/imposium.js.map +1 -1
- package/lib/imposium.min.js +1 -1
- package/lib/imposium.min.js.LICENSE.txt +1 -1
- package/lib/imposium.min.js.map +1 -1
- package/package.json +1 -1
- package/eslint-report.xml +0 -1
package/lib/imposium.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! IMPOSIUM-JS-SDK | Version 3.5.
|
|
1
|
+
/*! IMPOSIUM-JS-SDK | Version 3.5.10 */
|
|
2
2
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
3
3
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
4
4
|
module.exports = factory();
|
|
@@ -11469,6 +11469,7 @@ var DirectDeliveryPipe_1 = __importDefault(__webpack_require__(/*! ./DirectDeliv
|
|
|
11469
11469
|
var Exceptions_1 = __webpack_require__(/*! ../scaffolding/Exceptions */ "./src/scaffolding/Exceptions.ts");
|
|
11470
11470
|
var Helpers_1 = __webpack_require__(/*! ../scaffolding/Helpers */ "./src/scaffolding/Helpers.ts");
|
|
11471
11471
|
var settings = __rest((__webpack_require__(/*! ../conf/settings.json */ "./src/conf/settings.json").client), []);
|
|
11472
|
+
var STRINGIFIED_UNDEFINED = 'undefined';
|
|
11472
11473
|
var Client = /** @class */ (function () {
|
|
11473
11474
|
/*
|
|
11474
11475
|
Initialize Imposium client
|
|
@@ -11627,6 +11628,9 @@ var Client = /** @class */ (function () {
|
|
|
11627
11628
|
if (player === null && !(0, Helpers_1.isFunc)(GOT_EXPERIENCE)) {
|
|
11628
11629
|
throw new Exceptions_1.ClientConfigurationError('badConfigOnGet', Client.eventNames.GOT_EXPERIENCE);
|
|
11629
11630
|
}
|
|
11631
|
+
if (!_this.isValidExperienceId(experienceId)) {
|
|
11632
|
+
throw new Exceptions_1.ClientConfigurationError('invalidExperienceId', null);
|
|
11633
|
+
}
|
|
11630
11634
|
if (experienceId.length > settings.uuidLength) {
|
|
11631
11635
|
experienceId = experienceId.substring(0, settings.uuidLength);
|
|
11632
11636
|
}
|
|
@@ -11679,6 +11683,9 @@ var Client = /** @class */ (function () {
|
|
|
11679
11683
|
if ((player === null || playerIsFallback) && !(0, Helpers_1.isFunc)(GOT_EXPERIENCE)) {
|
|
11680
11684
|
throw new Exceptions_1.ClientConfigurationError('bagConfigOnPostRender', Client.eventNames.GOT_EXPERIENCE);
|
|
11681
11685
|
}
|
|
11686
|
+
if (!_this.isValidExperienceId(experienceId)) {
|
|
11687
|
+
throw new Exceptions_1.ClientConfigurationError('invalidExperienceId', null);
|
|
11688
|
+
}
|
|
11682
11689
|
_this.directDeliveryPipe.fetchExperience(null, UPLOAD_PROGRESS, 1, experienceId);
|
|
11683
11690
|
}
|
|
11684
11691
|
catch (e) {
|
|
@@ -11694,6 +11701,14 @@ var Client = /** @class */ (function () {
|
|
|
11694
11701
|
_this.renderHistory[key] = value;
|
|
11695
11702
|
}
|
|
11696
11703
|
};
|
|
11704
|
+
/*
|
|
11705
|
+
Validates that an experienceId is a usable, non-empty string, and rejects
|
|
11706
|
+
the literal string 'undefined' which can slip through when values are
|
|
11707
|
+
interpolated from unset template variables
|
|
11708
|
+
*/
|
|
11709
|
+
this.isValidExperienceId = function (id) {
|
|
11710
|
+
return typeof id === 'string' && !!id && id !== STRINGIFIED_UNDEFINED;
|
|
11711
|
+
};
|
|
11697
11712
|
/*
|
|
11698
11713
|
Handler for emitting expereince data on first creation
|
|
11699
11714
|
*/
|
|
@@ -12117,6 +12132,13 @@ var ExceptionPipe = /** @class */ (function () {
|
|
|
12117
12132
|
if (e.experienceId) {
|
|
12118
12133
|
scope.setTag('experienceId', e.experienceId);
|
|
12119
12134
|
}
|
|
12135
|
+
// Surface the original error wrapped by UncaughtError so root cause isn't lost
|
|
12136
|
+
if (e.uncaughtError) {
|
|
12137
|
+
scope.setExtra('uncaughtError', {
|
|
12138
|
+
message: e.uncaughtError.message || String(e.uncaughtError),
|
|
12139
|
+
stack: e.uncaughtError.stack
|
|
12140
|
+
});
|
|
12141
|
+
}
|
|
12120
12142
|
// Grab available axios error details
|
|
12121
12143
|
if (e.axiosError) {
|
|
12122
12144
|
if (typeof e.axiosError.response === 'object') {
|
|
@@ -12614,9 +12636,9 @@ exports.inventoryToFormData = inventoryToFormData;
|
|
|
12614
12636
|
|
|
12615
12637
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
12616
12638
|
exports.printVersion = exports.version = void 0;
|
|
12617
|
-
exports.version = "3.5.
|
|
12639
|
+
exports.version = "3.5.10";
|
|
12618
12640
|
var printVersion = function () {
|
|
12619
|
-
console.log("%cPowered By%c Imposium%c v".concat("3.5.
|
|
12641
|
+
console.log("%cPowered By%c Imposium%c v".concat("3.5.10", "%c https://imposium.com"), 'text-transform: uppercase; padding: 5px 0px 5px 5px; background-color: black; color: white;', 'text-transform: uppercase; padding: 5px 0px 5px 0px; background-color: black; color: #a1b83a;', 'padding: 5px 5px 5px 0px; background-color: black; color: white;', 'padding: 5px 5px 5px 0px;');
|
|
12620
12642
|
};
|
|
12621
12643
|
exports.printVersion = printVersion;
|
|
12622
12644
|
|
|
@@ -20609,7 +20631,7 @@ module.exports = parent;
|
|
|
20609
20631
|
(module) {
|
|
20610
20632
|
|
|
20611
20633
|
"use strict";
|
|
20612
|
-
module.exports = /*#__PURE__*/JSON.parse('{"moderation":{"rejection":"This experience was rejected."},"clientConfiguration":{"badConfig":"Your Imposium configuration is an invalid type.","storyId":"An undefined or invalid storyId was set in your Imposium configuration.","accessToken":"An undefined or invalid accessToken was set in your Imposium configuration.","invalidEventName":"Invalid client event name.","invalidCallbackType":"The callback reference set for this client event is not of type function.","badConfigOnGet":"You cannot call client.getExperience(...) without using the Imposium player or setting the GOT_EXPERIENCE event.","bagConfigOnPostRender":"You cannot call client.createExperience({...}) without using the Imposium player or setting the GOT_EXPERIENCE event.","badConfigOnPostNoRender":"You cannot call client.createExperience({...}, false) without setting the EXPERIENCE_CREATED event."},"playerConfiguration":{"badClient":"You must provide a valid Imposium client reference to the player.","invalidPlayerRef":"No reference to an HTML5 video element was detected.","invalidEventName":"Invalid player event name.","invalidCallbackType":"The callback reference set for this player event is not of type function.","eventNotConfigured":"You cannot invoke this player event without a callback set.","badQualityOverride":"The quality specified does not exist for this experience."},"network":{"httpFailure":"Unable to process request to the Imposium API.","pollTimeout":"Polling timeout exceeded.","tcpFailure":"Socket connection failed while processing the experience.","errorOverTcp":"An error occured on the Imposium web servers while processing the experience.","messageParseFailure":"Message data from Imposium was malformed."},"uncaught":{"generic":"Something unexpected went wrong."}}');
|
|
20634
|
+
module.exports = /*#__PURE__*/JSON.parse('{"moderation":{"rejection":"This experience was rejected."},"clientConfiguration":{"badConfig":"Your Imposium configuration is an invalid type.","storyId":"An undefined or invalid storyId was set in your Imposium configuration.","accessToken":"An undefined or invalid accessToken was set in your Imposium configuration.","invalidEventName":"Invalid client event name.","invalidCallbackType":"The callback reference set for this client event is not of type function.","badConfigOnGet":"You cannot call client.getExperience(...) without using the Imposium player or setting the GOT_EXPERIENCE event.","invalidExperienceId":"An undefined or invalid experienceId was passed to client.getExperience(...).","bagConfigOnPostRender":"You cannot call client.createExperience({...}) without using the Imposium player or setting the GOT_EXPERIENCE event.","badConfigOnPostNoRender":"You cannot call client.createExperience({...}, false) without setting the EXPERIENCE_CREATED event."},"playerConfiguration":{"badClient":"You must provide a valid Imposium client reference to the player.","invalidPlayerRef":"No reference to an HTML5 video element was detected.","invalidEventName":"Invalid player event name.","invalidCallbackType":"The callback reference set for this player event is not of type function.","eventNotConfigured":"You cannot invoke this player event without a callback set.","badQualityOverride":"The quality specified does not exist for this experience."},"network":{"httpFailure":"Unable to process request to the Imposium API.","pollTimeout":"Polling timeout exceeded.","tcpFailure":"Socket connection failed while processing the experience.","errorOverTcp":"An error occured on the Imposium web servers while processing the experience.","messageParseFailure":"Message data from Imposium was malformed."},"uncaught":{"generic":"Something unexpected went wrong."}}');
|
|
20613
20635
|
|
|
20614
20636
|
/***/ },
|
|
20615
20637
|
|