@player-ui/async-node-plugin 1.0.2--canary.890.38467 → 1.1.0--canary.866.38489
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.
|
@@ -8062,8 +8062,8 @@ var AsyncNodePlugin = function() {
|
|
|
8062
8062
|
ref: Symbol("not-started"),
|
|
8063
8063
|
status: "not-started"
|
|
8064
8064
|
};
|
|
8065
|
-
var PLAYER_VERSION = true ? "1.0
|
|
8066
|
-
var COMMIT = true ? "
|
|
8065
|
+
var PLAYER_VERSION = true ? "1.1.0--canary.866.38489" : "unknown";
|
|
8066
|
+
var COMMIT = true ? "3da792fb855f66e3747d2b873d0292ae811523a1" : "unknown";
|
|
8067
8067
|
var _Player = /*#__PURE__*/ function() {
|
|
8068
8068
|
function _Player2(config) {
|
|
8069
8069
|
var _this = this;
|
|
@@ -8085,7 +8085,8 @@ var AsyncNodePlugin = function() {
|
|
|
8085
8085
|
state: new SyncHook(),
|
|
8086
8086
|
onStart: new SyncHook(),
|
|
8087
8087
|
onEnd: new SyncHook(),
|
|
8088
|
-
resolveFlowContent: new SyncWaterfallHook()
|
|
8088
|
+
resolveFlowContent: new SyncWaterfallHook(),
|
|
8089
|
+
transformContent: new SyncWaterfallHook()
|
|
8089
8090
|
};
|
|
8090
8091
|
if (config === null || config === void 0 ? void 0 : config.logger) {
|
|
8091
8092
|
this.logger.addHandler(config.logger);
|
|
@@ -8405,14 +8406,19 @@ var AsyncNodePlugin = function() {
|
|
|
8405
8406
|
},
|
|
8406
8407
|
{
|
|
8407
8408
|
key: "start",
|
|
8408
|
-
value: function start(payload) {
|
|
8409
|
+
value: function start(payload, options) {
|
|
8409
8410
|
return _async_to_generator(function() {
|
|
8410
|
-
var _this,
|
|
8411
|
+
var _this, _options_format, meta, flow, _flow_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
|
|
8411
8412
|
return _ts_generator(this, function(_state) {
|
|
8412
8413
|
switch(_state.label){
|
|
8413
8414
|
case 0:
|
|
8414
8415
|
_this = this;
|
|
8415
|
-
|
|
8416
|
+
meta = {
|
|
8417
|
+
format: (_options_format = options === null || options === void 0 ? void 0 : options.format) !== null && _options_format !== void 0 ? _options_format : "player",
|
|
8418
|
+
version: options === null || options === void 0 ? void 0 : options.version
|
|
8419
|
+
};
|
|
8420
|
+
flow = this.hooks.transformContent.call(payload, meta);
|
|
8421
|
+
ref = Symbol((_flow_id = flow === null || flow === void 0 ? void 0 : flow.id) !== null && _flow_id !== void 0 ? _flow_id : "payload");
|
|
8416
8422
|
maybeUpdateState = function(newState) {
|
|
8417
8423
|
if (_this.state.ref !== ref) {
|
|
8418
8424
|
_this.logger.warn("Received update for a flow that's not the current one");
|
|
@@ -8433,7 +8439,7 @@ var AsyncNodePlugin = function() {
|
|
|
8433
8439
|
,
|
|
8434
8440
|
4
|
|
8435
8441
|
]);
|
|
8436
|
-
_this_setupFlow = this.setupFlow(
|
|
8442
|
+
_this_setupFlow = this.setupFlow(flow), state = _this_setupFlow.state, start = _this_setupFlow.start;
|
|
8437
8443
|
this.setState(_object_spread({
|
|
8438
8444
|
ref: ref
|
|
8439
8445
|
}, state));
|
|
@@ -8468,7 +8474,7 @@ var AsyncNodePlugin = function() {
|
|
|
8468
8474
|
errorState = {
|
|
8469
8475
|
status: "error",
|
|
8470
8476
|
ref: ref,
|
|
8471
|
-
flow:
|
|
8477
|
+
flow: flow,
|
|
8472
8478
|
error: error
|
|
8473
8479
|
};
|
|
8474
8480
|
maybeUpdateState(errorState);
|