@player-ui/check-path-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.
@@ -7865,8 +7865,8 @@ var CheckPathPlugin = function() {
7865
7865
  ref: Symbol("not-started"),
7866
7866
  status: "not-started"
7867
7867
  };
7868
- var PLAYER_VERSION = true ? "1.0.2--canary.890.38467" : "unknown";
7869
- var COMMIT = true ? "4f330c5181f8315e94113320ed4e7a3fa0b3e185" : "unknown";
7868
+ var PLAYER_VERSION = true ? "1.1.0--canary.866.38489" : "unknown";
7869
+ var COMMIT = true ? "3da792fb855f66e3747d2b873d0292ae811523a1" : "unknown";
7870
7870
  var _Player = /*#__PURE__*/ function() {
7871
7871
  function _Player2(config) {
7872
7872
  var _this = this;
@@ -7888,7 +7888,8 @@ var CheckPathPlugin = function() {
7888
7888
  state: new SyncHook(),
7889
7889
  onStart: new SyncHook(),
7890
7890
  onEnd: new SyncHook(),
7891
- resolveFlowContent: new SyncWaterfallHook()
7891
+ resolveFlowContent: new SyncWaterfallHook(),
7892
+ transformContent: new SyncWaterfallHook()
7892
7893
  };
7893
7894
  if (config === null || config === void 0 ? void 0 : config.logger) {
7894
7895
  this.logger.addHandler(config.logger);
@@ -8208,14 +8209,19 @@ var CheckPathPlugin = function() {
8208
8209
  },
8209
8210
  {
8210
8211
  key: "start",
8211
- value: function start(payload) {
8212
+ value: function start(payload, options) {
8212
8213
  return _async_to_generator(function() {
8213
- var _this, _payload_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
8214
+ var _this, _options_format, meta, flow, _flow_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
8214
8215
  return _ts_generator(this, function(_state) {
8215
8216
  switch(_state.label){
8216
8217
  case 0:
8217
8218
  _this = this;
8218
- ref = Symbol((_payload_id = payload === null || payload === void 0 ? void 0 : payload.id) !== null && _payload_id !== void 0 ? _payload_id : "payload");
8219
+ meta = {
8220
+ format: (_options_format = options === null || options === void 0 ? void 0 : options.format) !== null && _options_format !== void 0 ? _options_format : "player",
8221
+ version: options === null || options === void 0 ? void 0 : options.version
8222
+ };
8223
+ flow = this.hooks.transformContent.call(payload, meta);
8224
+ ref = Symbol((_flow_id = flow === null || flow === void 0 ? void 0 : flow.id) !== null && _flow_id !== void 0 ? _flow_id : "payload");
8219
8225
  maybeUpdateState = function(newState) {
8220
8226
  if (_this.state.ref !== ref) {
8221
8227
  _this.logger.warn("Received update for a flow that's not the current one");
@@ -8236,7 +8242,7 @@ var CheckPathPlugin = function() {
8236
8242
  ,
8237
8243
  4
8238
8244
  ]);
8239
- _this_setupFlow = this.setupFlow(payload), state = _this_setupFlow.state, start = _this_setupFlow.start;
8245
+ _this_setupFlow = this.setupFlow(flow), state = _this_setupFlow.state, start = _this_setupFlow.start;
8240
8246
  this.setState(_object_spread({
8241
8247
  ref: ref
8242
8248
  }, state));
@@ -8271,7 +8277,7 @@ var CheckPathPlugin = function() {
8271
8277
  errorState = {
8272
8278
  status: "error",
8273
8279
  ref: ref,
8274
- flow: payload,
8280
+ flow: flow,
8275
8281
  error: error
8276
8282
  };
8277
8283
  maybeUpdateState(errorState);