@cuecue/app 0.0.37 → 0.0.38
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/index.js +11 -5
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -7,8 +7,8 @@ var EventEmitter = require('wolfy87-eventemitter');
|
|
|
7
7
|
var createDebug = require('debug');
|
|
8
8
|
var dayjs = require('dayjs');
|
|
9
9
|
var uuid = require('uuid');
|
|
10
|
-
var matches = require('lodash/matches');
|
|
11
10
|
var isObject = require('lodash/isObject');
|
|
11
|
+
var matches = require('lodash/matches');
|
|
12
12
|
|
|
13
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
14
|
|
|
@@ -16,8 +16,8 @@ var StateMachine__default = /*#__PURE__*/_interopDefaultLegacy(StateMachine);
|
|
|
16
16
|
var EventEmitter__default = /*#__PURE__*/_interopDefaultLegacy(EventEmitter);
|
|
17
17
|
var createDebug__default = /*#__PURE__*/_interopDefaultLegacy(createDebug);
|
|
18
18
|
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
19
|
-
var matches__default = /*#__PURE__*/_interopDefaultLegacy(matches);
|
|
20
19
|
var isObject__default = /*#__PURE__*/_interopDefaultLegacy(isObject);
|
|
20
|
+
var matches__default = /*#__PURE__*/_interopDefaultLegacy(matches);
|
|
21
21
|
|
|
22
22
|
class MemoryStore extends EventEmitter__default["default"] {
|
|
23
23
|
constructor(data = {}) {
|
|
@@ -515,9 +515,12 @@ class Application extends EventEmitter__default["default"] {
|
|
|
515
515
|
|
|
516
516
|
async onCue(state, cueId, sessionData = null) {
|
|
517
517
|
const cues = await this.getCues();
|
|
518
|
+
const {
|
|
519
|
+
id: altCueId = null
|
|
520
|
+
} = isObject__default["default"](cueId) ? cueId : {};
|
|
518
521
|
const cue = cues.find(({
|
|
519
522
|
id
|
|
520
|
-
}) => id === cueId) || null;
|
|
523
|
+
}) => id === altCueId || cueId) || null;
|
|
521
524
|
|
|
522
525
|
if (cue === null) {
|
|
523
526
|
this.debug('Cannot find cue %s in %o', cueId, cues);
|
|
@@ -543,12 +546,15 @@ class Application extends EventEmitter__default["default"] {
|
|
|
543
546
|
|
|
544
547
|
async onCued(state, cueId) {
|
|
545
548
|
const cues = await this.getCues();
|
|
549
|
+
const {
|
|
550
|
+
id: altCueId = null
|
|
551
|
+
} = isObject__default["default"](cueId) ? cueId : {};
|
|
546
552
|
const cue = cues.find(({
|
|
547
553
|
id
|
|
548
|
-
}) => id === cueId) || null;
|
|
554
|
+
}) => id === altCueId || cueId) || null;
|
|
549
555
|
|
|
550
556
|
if (cue === null) {
|
|
551
|
-
this.debug('Cannot find cue %s in %o', cues);
|
|
557
|
+
this.debug('Cannot find cue %s in %o', cueId, cues);
|
|
552
558
|
return false;
|
|
553
559
|
}
|
|
554
560
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cuecue/app",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.38",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@babel/runtime": "^7.12.5",
|
|
43
|
-
"@cuecue/core": "^0.0.
|
|
43
|
+
"@cuecue/core": "^0.0.38",
|
|
44
44
|
"commander": "^9.4.0",
|
|
45
45
|
"dayjs": "^1.10.4",
|
|
46
46
|
"debug": "^4.3.1",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "b6eda5c44ad62fd4fb96e03e90cd8458e32e70b4"
|
|
56
56
|
}
|