@signageos/front-applet 5.5.0 → 5.7.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/CHANGELOG.md +11 -0
- package/dist/bundle.js +1 -1
- package/dist/bundle.js.map +1 -1
- package/docs/js-api/js-api-introduction.md +6 -0
- package/docs/js-api/js-display.md +1 -1
- package/docs/js-api/js-file-system.md +4 -0
- package/docs/js-api/js-hardware-serial.md +23 -14
- package/docs/js-api/js-iframes.md +2 -0
- package/docs/js-api/js-proof-of-play.md +62 -0
- package/docs/management-api/1-js-management.md +8 -0
- package/docs/management-api/5-js-management-screen.md +16 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.js +9 -9
- package/es6/FrontApplet/Dimensions/coordinationsHelper.js +2 -1
- package/es6/FrontApplet/Dimensions/coordinationsHelper.js.map +1 -1
- package/es6/FrontApplet/Error/SosError.js +1 -1
- package/es6/FrontApplet/Exchange/Exchange.js +1 -1
- package/es6/FrontApplet/Font/fontFaceGenerator.js +1 -1
- package/es6/FrontApplet/FrontApplet.d.ts +2 -0
- package/es6/FrontApplet/FrontApplet.js +3 -1
- package/es6/FrontApplet/FrontApplet.js.map +1 -1
- package/es6/FrontApplet/Hardware/ISerialPortOptions.d.ts +1 -1
- package/es6/FrontApplet/Input/Input.d.ts +1 -1
- package/es6/FrontApplet/Management/App.js +2 -2
- package/es6/FrontApplet/Management/Audio.js +2 -2
- package/es6/FrontApplet/Management/Debug.js +2 -2
- package/es6/FrontApplet/Management/Firmware.js +1 -1
- package/es6/FrontApplet/Management/Management.d.ts +1 -0
- package/es6/FrontApplet/Management/Management.js +12 -4
- package/es6/FrontApplet/Management/Management.js.map +1 -1
- package/es6/FrontApplet/Management/Network.js +1 -1
- package/es6/FrontApplet/Management/OS.js +3 -3
- package/es6/FrontApplet/Management/Package.js +1 -1
- package/es6/FrontApplet/Management/PeerRecovery.d.ts +1 -1
- package/es6/FrontApplet/Management/PeerRecovery.js +2 -2
- package/es6/FrontApplet/Management/Power.js +3 -3
- package/es6/FrontApplet/Management/Proxy.js +3 -3
- package/es6/FrontApplet/Management/RemoteControl.js +2 -2
- package/es6/FrontApplet/Management/Screen.js +7 -7
- package/es6/FrontApplet/Management/Time.js +1 -1
- package/es6/FrontApplet/Offline/Cache/Cache.js +2 -2
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.js +1 -1
- package/es6/FrontApplet/Offline/IElement.js +1 -1
- package/es6/FrontApplet/Offline/ISaveFile.js +4 -4
- package/es6/FrontApplet/Offline/Types.js +1 -1
- package/es6/FrontApplet/ProofOfPlay/IRecordItemOptions.d.ts +10 -0
- package/es6/FrontApplet/ProofOfPlay/IRecordItemOptions.js +3 -0
- package/es6/FrontApplet/ProofOfPlay/IRecordItemOptions.js.map +1 -0
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.d.ts +7 -0
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js +41 -0
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js.map +1 -0
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlayType.d.ts +4 -0
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlayType.js +8 -0
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlayType.js.map +1 -0
- package/es6/FrontApplet/Stream/Stream.js +1 -1
- package/es6/FrontApplet/Video/Video.js +5 -5
- package/es6/Monitoring/Montoring.js +5 -5
- package/package.json +4 -4
|
@@ -17,7 +17,7 @@ class PeerRecovery {
|
|
|
17
17
|
isEnabled() {
|
|
18
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19
19
|
const { enabled } = yield this.postMessage({
|
|
20
|
-
type: this.getMessage('peer_recovery_is_enabled')
|
|
20
|
+
type: this.getMessage('peer_recovery_is_enabled'),
|
|
21
21
|
});
|
|
22
22
|
return enabled;
|
|
23
23
|
});
|
|
@@ -27,7 +27,7 @@ class PeerRecovery {
|
|
|
27
27
|
yield this.postMessage({
|
|
28
28
|
type: this.getMessage('set_peer_recovery'),
|
|
29
29
|
enabled: args[0],
|
|
30
|
-
time: args[1]
|
|
30
|
+
time: args[1],
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
33
|
}
|
|
@@ -19,14 +19,14 @@ class Power {
|
|
|
19
19
|
systemReboot() {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
21
|
yield this.postMessage({
|
|
22
|
-
type: this.getMessage('reboot_system')
|
|
22
|
+
type: this.getMessage('reboot_system'),
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
appRestart() {
|
|
27
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
28
|
yield this.postMessage({
|
|
29
|
-
type: this.getMessage('restart_app')
|
|
29
|
+
type: this.getMessage('restart_app'),
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
32
|
}
|
|
@@ -58,7 +58,7 @@ class Power {
|
|
|
58
58
|
timeOn,
|
|
59
59
|
timeOff,
|
|
60
60
|
weekdays,
|
|
61
|
-
volume
|
|
61
|
+
volume,
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
64
|
}
|
|
@@ -17,7 +17,7 @@ class Proxy {
|
|
|
17
17
|
isEnabled() {
|
|
18
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19
19
|
const { isEnabled } = yield this.postMessage({
|
|
20
|
-
type: this.getMessage('proxy_is_enabled')
|
|
20
|
+
type: this.getMessage('proxy_is_enabled'),
|
|
21
21
|
});
|
|
22
22
|
return isEnabled;
|
|
23
23
|
});
|
|
@@ -36,14 +36,14 @@ class Proxy {
|
|
|
36
36
|
disable() {
|
|
37
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
38
|
yield this.postMessage({
|
|
39
|
-
type: this.getMessage('proxy_disable')
|
|
39
|
+
type: this.getMessage('proxy_disable'),
|
|
40
40
|
});
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
getConnectedTo() {
|
|
44
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
45
|
const { connectedTo } = yield this.postMessage({
|
|
46
|
-
type: this.getMessage('proxy_get_connected_to')
|
|
46
|
+
type: this.getMessage('proxy_get_connected_to'),
|
|
47
47
|
});
|
|
48
48
|
return connectedTo;
|
|
49
49
|
});
|
|
@@ -27,7 +27,7 @@ class RemoteControl {
|
|
|
27
27
|
isEnabled() {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
29
|
const { isRemoteControlEnabled } = yield this.postMessage({
|
|
30
|
-
type: this.getMessage('get_is_remote_control_enabled')
|
|
30
|
+
type: this.getMessage('get_is_remote_control_enabled'),
|
|
31
31
|
});
|
|
32
32
|
return isRemoteControlEnabled;
|
|
33
33
|
});
|
|
@@ -49,7 +49,7 @@ class RemoteControl {
|
|
|
49
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
50
|
yield this.postMessage({
|
|
51
51
|
type: this.getMessage('set_remote_control_enabled'),
|
|
52
|
-
enabled
|
|
52
|
+
enabled,
|
|
53
53
|
});
|
|
54
54
|
});
|
|
55
55
|
}
|
|
@@ -43,7 +43,7 @@ class Screen {
|
|
|
43
43
|
getOrientation() {
|
|
44
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
45
|
const { screenOrientation } = yield this.postMessage({
|
|
46
|
-
type: this.getMessage('get_screen_orientation')
|
|
46
|
+
type: this.getMessage('get_screen_orientation'),
|
|
47
47
|
});
|
|
48
48
|
return screenOrientation;
|
|
49
49
|
});
|
|
@@ -59,14 +59,14 @@ class Screen {
|
|
|
59
59
|
timeFrom1,
|
|
60
60
|
brightness1,
|
|
61
61
|
timeFrom2,
|
|
62
|
-
brightness2
|
|
62
|
+
brightness2,
|
|
63
63
|
});
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
getBrightness() {
|
|
67
67
|
return __awaiter(this, void 0, void 0, function* () {
|
|
68
68
|
const { screenBrightness } = yield this.postMessage({
|
|
69
|
-
type: this.getMessage('get_screen_brightness')
|
|
69
|
+
type: this.getMessage('get_screen_brightness'),
|
|
70
70
|
});
|
|
71
71
|
return screenBrightness;
|
|
72
72
|
});
|
|
@@ -76,7 +76,7 @@ class Screen {
|
|
|
76
76
|
Validate_1.default({ uploadBaseUrl }).required().uri();
|
|
77
77
|
const { screenshotUrl } = yield this.postMessage({
|
|
78
78
|
type: this.getMessage('upload_screenshot'),
|
|
79
|
-
uploadBaseUrl
|
|
79
|
+
uploadBaseUrl,
|
|
80
80
|
});
|
|
81
81
|
return screenshotUrl;
|
|
82
82
|
});
|
|
@@ -84,21 +84,21 @@ class Screen {
|
|
|
84
84
|
powerOn() {
|
|
85
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
86
86
|
yield this.postMessage({
|
|
87
|
-
type: this.getMessage('power_on_display')
|
|
87
|
+
type: this.getMessage('power_on_display'),
|
|
88
88
|
});
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
powerOff() {
|
|
92
92
|
return __awaiter(this, void 0, void 0, function* () {
|
|
93
93
|
yield this.postMessage({
|
|
94
|
-
type: this.getMessage('power_off_display')
|
|
94
|
+
type: this.getMessage('power_off_display'),
|
|
95
95
|
});
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
isPoweredOn() {
|
|
99
99
|
return __awaiter(this, void 0, void 0, function* () {
|
|
100
100
|
const { isDisplayPowerOn } = yield this.postMessage({
|
|
101
|
-
type: this.getMessage('get_is_display_power_on')
|
|
101
|
+
type: this.getMessage('get_is_display_power_on'),
|
|
102
102
|
});
|
|
103
103
|
return isDisplayPowerOn;
|
|
104
104
|
});
|
|
@@ -26,7 +26,7 @@ class Time {
|
|
|
26
26
|
get() {
|
|
27
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
28
|
const { currentTimeWithTimezone } = yield this.postMessage({
|
|
29
|
-
type: this.getMessage('get_current_time_with_timezone')
|
|
29
|
+
type: this.getMessage('get_current_time_with_timezone'),
|
|
30
30
|
});
|
|
31
31
|
return currentTimeWithTimezone;
|
|
32
32
|
});
|
|
@@ -46,7 +46,7 @@ class Cache {
|
|
|
46
46
|
throw new AppletOfflineCacheError_1.default({
|
|
47
47
|
kind: 'appletOfflineCacheError',
|
|
48
48
|
message: `Invalid headers ${headers}`,
|
|
49
|
-
code: ErrorCodes_1.default.OFFLINE_CACHE_HEADERS_NOT_VALID
|
|
49
|
+
code: ErrorCodes_1.default.OFFLINE_CACHE_HEADERS_NOT_VALID,
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
const response = yield this.postMessage({
|
|
@@ -169,7 +169,7 @@ class Cache {
|
|
|
169
169
|
throw new FileNotFoundError_1.default({
|
|
170
170
|
kind: 'fileNotFoundError',
|
|
171
171
|
message: 'File was not found ' + uid,
|
|
172
|
-
code: ErrorCodes_1.default.FILE_NOT_FOUND_IN_CACHE
|
|
172
|
+
code: ErrorCodes_1.default.FILE_NOT_FOUND_IN_CACHE,
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
175
|
return this.savedFiles[uid];
|
|
@@ -9,19 +9,19 @@ exports.VISaveFile = {
|
|
|
9
9
|
uid: { 'string': null, 'error': {
|
|
10
10
|
code: ErrorCodes_1.default.FILE_DOES_NOT_HAVE_UID,
|
|
11
11
|
message: ErrorCodesMessages_1.default[ErrorCodes_1.default.FILE_DOES_NOT_HAVE_UID],
|
|
12
|
-
}
|
|
12
|
+
},
|
|
13
13
|
},
|
|
14
14
|
uri: 'string',
|
|
15
15
|
type: { 'string': IFileType_1.VIFileType, 'error': {
|
|
16
16
|
code: ErrorCodes_1.default.FILE_FLAGS_ARE_NOT_IN_ARRAY,
|
|
17
17
|
message: ErrorCodesMessages_1.default[ErrorCodes_1.default.FILE_FLAGS_ARE_NOT_IN_ARRAY],
|
|
18
|
-
}
|
|
18
|
+
},
|
|
19
19
|
},
|
|
20
20
|
headers: '?object',
|
|
21
21
|
flags: { '?array': {
|
|
22
22
|
'object': IFlag_1.VIFlag,
|
|
23
|
-
'error': { code: ErrorCodes_1.default.FILE_FLAG_IS_NOT_OBJECT, message: ErrorCodesMessages_1.default[ErrorCodes_1.default.FILE_FLAG_IS_NOT_OBJECT] }
|
|
24
|
-
}
|
|
23
|
+
'error': { code: ErrorCodes_1.default.FILE_FLAG_IS_NOT_OBJECT, message: ErrorCodesMessages_1.default[ErrorCodes_1.default.FILE_FLAG_IS_NOT_OBJECT] },
|
|
24
|
+
},
|
|
25
25
|
},
|
|
26
26
|
};
|
|
27
27
|
//# sourceMappingURL=ISaveFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IRecordItemOptions.js","sourceRoot":"","sources":["../../../src/FrontApplet/ProofOfPlay/IRecordItemOptions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import CommandApi from '../Command/Command';
|
|
2
|
+
import IRecordItemOptions from './IRecordItemOptions';
|
|
3
|
+
export default class ProofOfPlay {
|
|
4
|
+
private commandApi;
|
|
5
|
+
constructor(commandApi: CommandApi);
|
|
6
|
+
recordItemPlayed({ name, customId, type, tags, fileName, playbackSuccess, errorMessage }: IRecordItemOptions): Promise<void>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const Validate_1 = require("../Validate/Validate");
|
|
13
|
+
const ProofOfPlayType_1 = require("./ProofOfPlayType");
|
|
14
|
+
class ProofOfPlay {
|
|
15
|
+
constructor(commandApi) {
|
|
16
|
+
this.commandApi = commandApi;
|
|
17
|
+
}
|
|
18
|
+
recordItemPlayed({ name, customId, type, tags, fileName, playbackSuccess, errorMessage }) {
|
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
Validate_1.default({ name }).required().string();
|
|
21
|
+
Validate_1.default({ customId }).string();
|
|
22
|
+
Validate_1.default({ type }).string(['video', 'image', 'html', 'custom']);
|
|
23
|
+
Validate_1.default({ tags }).array('string');
|
|
24
|
+
Validate_1.default({ fileName }).string();
|
|
25
|
+
Validate_1.default({ playbackSuccess }).boolean();
|
|
26
|
+
Validate_1.default({ errorMessage }).string();
|
|
27
|
+
yield this.commandApi.dispatch({
|
|
28
|
+
type: ProofOfPlayType_1.default.ItemPlayed,
|
|
29
|
+
itemName: name,
|
|
30
|
+
customId,
|
|
31
|
+
itemType: type,
|
|
32
|
+
itemTags: tags,
|
|
33
|
+
fileName,
|
|
34
|
+
playbackSuccess,
|
|
35
|
+
errorMessage,
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.default = ProofOfPlay;
|
|
41
|
+
//# sourceMappingURL=ProofOfPlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProofOfPlay.js","sourceRoot":"","sources":["../../../src/FrontApplet/ProofOfPlay/ProofOfPlay.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,mDAA4C;AAC5C,uDAAgD;AAEhD,MAAqB,WAAW;IAE/B,YAAoB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAEjC,gBAAgB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,eAAe,EAAE,YAAY,EAAsB;;YACxH,kBAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC;YACvC,kBAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;YAChC,kBAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;YAChE,kBAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YACnC,kBAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;YAChC,kBAAQ,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;YACxC,kBAAQ,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;YAEpC,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;gBAC9B,IAAI,EAAE,yBAAe,CAAC,UAAU;gBAChC,QAAQ,EAAE,IAAI;gBACd,QAAQ;gBACR,QAAQ,EAAE,IAAI;gBACd,QAAQ,EAAE,IAAI;gBACd,QAAQ;gBACR,eAAe;gBACf,YAAY;aACZ,CAAC,CAAC;QACJ,CAAC;KAAA;CACD;AAxBD,8BAwBC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var ProofOfPlayType;
|
|
4
|
+
(function (ProofOfPlayType) {
|
|
5
|
+
ProofOfPlayType["ItemPlayed"] = "PoP.ItemPlayed";
|
|
6
|
+
})(ProofOfPlayType || (ProofOfPlayType = {}));
|
|
7
|
+
exports.default = ProofOfPlayType;
|
|
8
|
+
//# sourceMappingURL=ProofOfPlayType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProofOfPlayType.js","sourceRoot":"","sources":["../../../src/FrontApplet/ProofOfPlay/ProofOfPlayType.ts"],"names":[],"mappings":";;AAAA,IAAK,eAEJ;AAFD,WAAK,eAAe;IACnB,gDAA6B,CAAA;AAC9B,CAAC,EAFI,eAAe,KAAf,eAAe,QAEnB;AAED,kBAAe,eAAe,CAAC"}
|
|
@@ -29,7 +29,7 @@ class Stream {
|
|
|
29
29
|
throw new AppletStreamError_1.default({
|
|
30
30
|
kind: 'appletStreamError',
|
|
31
31
|
message: 'Invalid stream protocol type: ' + protocol,
|
|
32
|
-
code: ErrorCodes_1.default.STREAM_INVALID_PROTOCOL_TYPE
|
|
32
|
+
code: ErrorCodes_1.default.STREAM_INVALID_PROTOCOL_TYPE,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -82,7 +82,7 @@ class Video {
|
|
|
82
82
|
kind: 'appletVideoError',
|
|
83
83
|
message: `This video was stopped already. The arguments: ${srcArgumentsString}`,
|
|
84
84
|
code: ErrorCodes_1.default.VIDEO_WAS_STOPPED_ALREADY,
|
|
85
|
-
suggestion: ErrorSuggestions_1.default.VIDEO_WAS_STOPPED_ALREADY
|
|
85
|
+
suggestion: ErrorSuggestions_1.default.VIDEO_WAS_STOPPED_ALREADY,
|
|
86
86
|
}));
|
|
87
87
|
delete this.onceDeferredIndex[srcArgumentsString];
|
|
88
88
|
});
|
|
@@ -131,7 +131,7 @@ class Video {
|
|
|
131
131
|
kind: 'appletVideoError',
|
|
132
132
|
message: `This video was not played yet. The arguments: ${srcArgumentsString}`,
|
|
133
133
|
code: ErrorCodes_1.default.VIDEO_WAS_NOT_PLAYED_YET,
|
|
134
|
-
suggestion: ErrorSuggestions_1.default.VIDEO_WAS_NOT_PLAYED
|
|
134
|
+
suggestion: ErrorSuggestions_1.default.VIDEO_WAS_NOT_PLAYED,
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
137
|
return onceDeferreds.ended.oncePromise;
|
|
@@ -146,7 +146,7 @@ class Video {
|
|
|
146
146
|
kind: 'appletVideoError',
|
|
147
147
|
message: `This video was not played yet. The arguments: ${srcArgumentsString}`,
|
|
148
148
|
code: ErrorCodes_1.default.VIDEO_WAS_NOT_PLAYED_YET,
|
|
149
|
-
suggestion: ErrorSuggestions_1.default.VIDEO_WAS_NOT_PLAYED
|
|
149
|
+
suggestion: ErrorSuggestions_1.default.VIDEO_WAS_NOT_PLAYED,
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
152
|
return onceDeferreds.stop.oncePromise;
|
|
@@ -210,7 +210,7 @@ class Video {
|
|
|
210
210
|
reject(new SosError_1.default({
|
|
211
211
|
kind: 'sosError',
|
|
212
212
|
message: JSON.stringify(event.srcArguments),
|
|
213
|
-
code: ErrorCodes_1.default.UNEXPECTED_EXCEPTION
|
|
213
|
+
code: ErrorCodes_1.default.UNEXPECTED_EXCEPTION,
|
|
214
214
|
}));
|
|
215
215
|
}
|
|
216
216
|
}
|
|
@@ -238,7 +238,7 @@ class Video {
|
|
|
238
238
|
y,
|
|
239
239
|
width,
|
|
240
240
|
height,
|
|
241
|
-
}
|
|
241
|
+
},
|
|
242
242
|
};
|
|
243
243
|
const eventName = this.getEventName(videoEvent);
|
|
244
244
|
this.eventEmitter.emit(eventName, videoEvent);
|
|
@@ -132,13 +132,13 @@ class Monitoring {
|
|
|
132
132
|
case fileSystemCommands_1.FileSystemGetFileRequest:
|
|
133
133
|
this.dispatch({
|
|
134
134
|
type: fileSystemCommands_1.FileSystemGetFileResult,
|
|
135
|
-
file: yield this.frontApplet.fileSystem.getFile(commandEvent.command.filePath)
|
|
135
|
+
file: yield this.frontApplet.fileSystem.getFile(commandEvent.command.filePath),
|
|
136
136
|
});
|
|
137
137
|
break;
|
|
138
138
|
case fileSystemCommands_1.FileSystemExistsRequest:
|
|
139
139
|
this.dispatch({
|
|
140
140
|
type: fileSystemCommands_1.FileSystemExistsResult,
|
|
141
|
-
result: yield this.frontApplet.fileSystem.exists(commandEvent.command.filePath)
|
|
141
|
+
result: yield this.frontApplet.fileSystem.exists(commandEvent.command.filePath),
|
|
142
142
|
});
|
|
143
143
|
break;
|
|
144
144
|
case fileSystemCommands_1.FileSystemDownloadFileRequest:
|
|
@@ -174,13 +174,13 @@ class Monitoring {
|
|
|
174
174
|
case fileSystemCommands_1.FileSystemCreateDirectoryRequest:
|
|
175
175
|
this.dispatch({
|
|
176
176
|
type: fileSystemCommands_1.FileSystemCreateDirectoryResult,
|
|
177
|
-
result: yield this.frontApplet.fileSystem.createDirectory(commandEvent.command.directoryPath)
|
|
177
|
+
result: yield this.frontApplet.fileSystem.createDirectory(commandEvent.command.directoryPath),
|
|
178
178
|
});
|
|
179
179
|
break;
|
|
180
180
|
case fileSystemCommands_1.FileSystemIsDirectoryRequest:
|
|
181
181
|
this.dispatch({
|
|
182
182
|
type: fileSystemCommands_1.FileSystemIsDirectoryResult,
|
|
183
|
-
result: yield this.frontApplet.fileSystem.isDirectory(commandEvent.command.filePath)
|
|
183
|
+
result: yield this.frontApplet.fileSystem.isDirectory(commandEvent.command.filePath),
|
|
184
184
|
});
|
|
185
185
|
break;
|
|
186
186
|
case fileSystemCommands_1.FileSystemCopyFileRequest:
|
|
@@ -204,7 +204,7 @@ class Monitoring {
|
|
|
204
204
|
case fileSystemCommands_1.FileSystemReadFileRequest:
|
|
205
205
|
this.dispatch({
|
|
206
206
|
type: fileSystemCommands_1.FileSystemReadFileResult,
|
|
207
|
-
data: yield this.frontApplet.fileSystem.readFile(commandEvent.command.filePath)
|
|
207
|
+
data: yield this.frontApplet.fileSystem.readFile(commandEvent.command.filePath),
|
|
208
208
|
});
|
|
209
209
|
break;
|
|
210
210
|
default:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signageos/front-applet",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"main": "dist/bundle.js",
|
|
5
5
|
"types": "es6/bundle.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"build": "webpack --config=webpack.config.js",
|
|
15
15
|
"develop": "webpack --watch --config=webpack.config.js",
|
|
16
16
|
"generate-declarations": "tsc -p tsconfig.declarations.json",
|
|
17
|
-
"lint": "tslint --config node_modules/
|
|
17
|
+
"lint": "tslint --config node_modules/@signageos/codestyle/tslint.json {src,tests}/**/*.{ts,tsx}",
|
|
18
18
|
"prebuild": "rm -rf dist/*",
|
|
19
19
|
"prepare": "npm run prebuild && npm run build && npm run generate-declarations",
|
|
20
20
|
"test": "env NODE_ENV=test ./node_modules/mocha/bin/mocha --opts mocha.opts",
|
|
21
21
|
"escheck": "es-check --module es5 dist/*.js",
|
|
22
22
|
"check": "npm run depcheck && npx --userconfig ./.npmrc @signageos/lib check-deps '.+' 'weinre'",
|
|
23
|
-
"depcheck": "depcheck --specials=tslint,webpack,mocha --parsers='*.ts:typescript,*.js:es6' --detectors='requireCallExpression,importDeclaration' --ignore-dirs='dist,packages' --ignores='@types
|
|
23
|
+
"depcheck": "depcheck --specials=tslint,webpack,mocha --parsers='*.ts:typescript,*.js:es6' --detectors='requireCallExpression,importDeclaration' --ignore-dirs='dist,packages' --ignores='@types/*,@signageos/codestyle,ts-node,source-map-support,mocha,depcheck,webpack-cli,@babel/polyfill,@babel/preset-env,es-check'"
|
|
24
24
|
},
|
|
25
25
|
"repository": {
|
|
26
26
|
"url": "git@gitlab.com:signageos/front-applet",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"@babel/core": "7.6.0",
|
|
31
31
|
"@babel/polyfill": "7.6.0",
|
|
32
32
|
"@babel/preset-env": "7.6.0",
|
|
33
|
+
"@signageos/codestyle": "0.0.23",
|
|
33
34
|
"@signageos/lib": "10.0.0",
|
|
34
35
|
"@types/faker": "4.1.5",
|
|
35
36
|
"@types/lodash": "4.14.137",
|
|
@@ -41,7 +42,6 @@
|
|
|
41
42
|
"depcheck": "0.8.3",
|
|
42
43
|
"es-check": "5.1.0",
|
|
43
44
|
"faker": "4.1.0",
|
|
44
|
-
"hugport-codestyle": "0.0.10",
|
|
45
45
|
"lodash": "4.17.21",
|
|
46
46
|
"mocha": "6.2.0",
|
|
47
47
|
"should": "13.2.3",
|