@signageos/front-applet 7.1.1 → 7.2.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.
Files changed (162) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/bundle.js +4 -8
  3. package/dist/bundle.js.map +1 -1
  4. package/es6/FrontApplet/Browser/Browser.js +5 -5
  5. package/es6/FrontApplet/Browser/Browser.js.map +1 -1
  6. package/es6/FrontApplet/Browser/IOpenLinkOptions.d.ts +2 -2
  7. package/es6/FrontApplet/Browser/events.d.ts +1 -1
  8. package/es6/FrontApplet/Browser/messages.d.ts +2 -2
  9. package/es6/FrontApplet/Command/Command.js +4 -4
  10. package/es6/FrontApplet/Command/Command.js.map +1 -1
  11. package/es6/FrontApplet/Connect/Connect.d.ts +16 -0
  12. package/es6/FrontApplet/Connect/Connect.js +114 -0
  13. package/es6/FrontApplet/Connect/Connect.js.map +1 -0
  14. package/es6/FrontApplet/Connect/IConnectMessage.d.ts +4 -0
  15. package/es6/FrontApplet/Connect/IConnectMessage.js +3 -0
  16. package/es6/FrontApplet/Connect/IConnectMessage.js.map +1 -0
  17. package/es6/FrontApplet/Debug/Debug.js +2 -2
  18. package/es6/FrontApplet/Debug/Debug.js.map +1 -1
  19. package/es6/FrontApplet/Debug/debugDecorator.js +2 -2
  20. package/es6/FrontApplet/Debug/debugDecorator.js.map +1 -1
  21. package/es6/FrontApplet/DeviceInfo/DeviceInfo.js +1 -1
  22. package/es6/FrontApplet/DeviceInfo/DeviceInfo.js.map +1 -1
  23. package/es6/FrontApplet/Display/Display.js +1 -1
  24. package/es6/FrontApplet/Display/Display.js.map +1 -1
  25. package/es6/FrontApplet/Error/AppletCommandError.js +1 -1
  26. package/es6/FrontApplet/Error/AppletCommandError.js.map +1 -1
  27. package/es6/FrontApplet/Error/AppletHardwareError.js +1 -1
  28. package/es6/FrontApplet/Error/AppletHardwareError.js.map +1 -1
  29. package/es6/FrontApplet/Error/AppletResourcesError.js +1 -1
  30. package/es6/FrontApplet/Error/AppletResourcesError.js.map +1 -1
  31. package/es6/FrontApplet/Error/AppletSecurityError.js +1 -1
  32. package/es6/FrontApplet/Error/AppletSecurityError.js.map +1 -1
  33. package/es6/FrontApplet/Error/AppletVideoError.js +1 -1
  34. package/es6/FrontApplet/Error/AppletVideoError.js.map +1 -1
  35. package/es6/FrontApplet/Error/SosError.js +1 -1
  36. package/es6/FrontApplet/Error/SosError.js.map +1 -1
  37. package/es6/FrontApplet/FileSystem/FileSystem.js +31 -31
  38. package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -1
  39. package/es6/FrontApplet/FrontApplet.d.ts +2 -0
  40. package/es6/FrontApplet/FrontApplet.js +6 -3
  41. package/es6/FrontApplet/FrontApplet.js.map +1 -1
  42. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js +1 -1
  43. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js.map +1 -1
  44. package/es6/FrontApplet/Hardware/Hardware.js +1 -1
  45. package/es6/FrontApplet/Hardware/Hardware.js.map +1 -1
  46. package/es6/FrontApplet/Hardware/Led/Led.js +3 -3
  47. package/es6/FrontApplet/Hardware/Led/Led.js.map +1 -1
  48. package/es6/FrontApplet/Hash/generator.js +1 -1
  49. package/es6/FrontApplet/Hash/generator.js.map +1 -1
  50. package/es6/FrontApplet/Iframe/Iframe.d.ts +1 -1
  51. package/es6/FrontApplet/Input/Input.js +2 -2
  52. package/es6/FrontApplet/Input/Input.js.map +1 -1
  53. package/es6/FrontApplet/Management/App/App.js +1 -1
  54. package/es6/FrontApplet/Management/App/App.js.map +1 -1
  55. package/es6/FrontApplet/Management/Audio/Audio.js +1 -1
  56. package/es6/FrontApplet/Management/Audio/Audio.js.map +1 -1
  57. package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js +3 -3
  58. package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js.map +1 -1
  59. package/es6/FrontApplet/Management/AutoRecovery/IAutoRecovery.d.ts +1 -1
  60. package/es6/FrontApplet/Management/AutoRecovery/IAutoRecovery.js +1 -1
  61. package/es6/FrontApplet/Management/AutoRecovery/IAutoRecovery.js.map +1 -1
  62. package/es6/FrontApplet/Management/Debug/Debug.js +1 -1
  63. package/es6/FrontApplet/Management/Debug/Debug.js.map +1 -1
  64. package/es6/FrontApplet/Management/Firmware/Firmware.js +1 -1
  65. package/es6/FrontApplet/Management/Firmware/Firmware.js.map +1 -1
  66. package/es6/FrontApplet/Management/Management.js +4 -4
  67. package/es6/FrontApplet/Management/Management.js.map +1 -1
  68. package/es6/FrontApplet/Management/Network/INetworkInfo.d.ts +1 -1
  69. package/es6/FrontApplet/Management/Network/Network.js +6 -6
  70. package/es6/FrontApplet/Management/Network/Network.js.map +1 -1
  71. package/es6/FrontApplet/Management/Package/Package.js +4 -4
  72. package/es6/FrontApplet/Management/Package/Package.js.map +1 -1
  73. package/es6/FrontApplet/Management/PeerRecovery/IPeerRecovery.d.ts +1 -1
  74. package/es6/FrontApplet/Management/PeerRecovery/IPeerRecovery.js +1 -1
  75. package/es6/FrontApplet/Management/PeerRecovery/IPeerRecovery.js.map +1 -1
  76. package/es6/FrontApplet/Management/PeerRecovery/PeerRecovery.js +3 -3
  77. package/es6/FrontApplet/Management/PeerRecovery/PeerRecovery.js.map +1 -1
  78. package/es6/FrontApplet/Management/Power/Power.js +9 -9
  79. package/es6/FrontApplet/Management/Power/Power.js.map +1 -1
  80. package/es6/FrontApplet/Management/Screen/IOrientation.d.ts +1 -1
  81. package/es6/FrontApplet/Management/Screen/Screen.js +7 -7
  82. package/es6/FrontApplet/Management/Screen/Screen.js.map +1 -1
  83. package/es6/FrontApplet/Management/Security/Security.js +2 -2
  84. package/es6/FrontApplet/Management/Security/Security.js.map +1 -1
  85. package/es6/FrontApplet/Management/Time/Time.js +5 -5
  86. package/es6/FrontApplet/Management/Time/Time.js.map +1 -1
  87. package/es6/FrontApplet/Management/Wifi/IWifiEvent.d.ts +1 -1
  88. package/es6/FrontApplet/Management/Wifi/Wifi.js +7 -7
  89. package/es6/FrontApplet/Management/Wifi/Wifi.js.map +1 -1
  90. package/es6/FrontApplet/Management/helpers/ProprietaryTimerHelper.d.ts +1 -1
  91. package/es6/FrontApplet/NativeCommands/MDC/Mdc.d.ts +1 -1
  92. package/es6/FrontApplet/NativeCommands/MDC/Mdc.js +6 -6
  93. package/es6/FrontApplet/NativeCommands/MDC/Mdc.js.map +1 -1
  94. package/es6/FrontApplet/NativeCommands/NativeCommands.js +1 -1
  95. package/es6/FrontApplet/NativeCommands/NativeCommands.js.map +1 -1
  96. package/es6/FrontApplet/OSD/OSD.js +1 -1
  97. package/es6/FrontApplet/OSD/OSD.js.map +1 -1
  98. package/es6/FrontApplet/Offline/Cache/Cache.js +10 -10
  99. package/es6/FrontApplet/Offline/Cache/Cache.js.map +1 -1
  100. package/es6/FrontApplet/Offline/Flags/AppendFlagController.js +1 -1
  101. package/es6/FrontApplet/Offline/Flags/AppendFlagController.js.map +1 -1
  102. package/es6/FrontApplet/Offline/Flags/IFlags.d.ts +1 -1
  103. package/es6/FrontApplet/Offline/IFileType.d.ts +1 -1
  104. package/es6/FrontApplet/Offline/Offline.d.ts +4 -4
  105. package/es6/FrontApplet/Offline/Offline.js +18 -18
  106. package/es6/FrontApplet/Offline/Offline.js.map +1 -1
  107. package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js +7 -7
  108. package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js.map +1 -1
  109. package/es6/FrontApplet/Sensors/Proximity.js +2 -2
  110. package/es6/FrontApplet/Sensors/Proximity.js.map +1 -1
  111. package/es6/FrontApplet/Sensors/Sensors.d.ts +1 -1
  112. package/es6/FrontApplet/Sensors/Sensors.js +1 -1
  113. package/es6/FrontApplet/Sensors/Sensors.js.map +1 -1
  114. package/es6/FrontApplet/Stream/IStreamMessage.d.ts +1 -1
  115. package/es6/FrontApplet/Stream/IStreamTrackInfo.d.ts +2 -2
  116. package/es6/FrontApplet/Stream/Stream.js +43 -43
  117. package/es6/FrontApplet/Stream/Stream.js.map +1 -1
  118. package/es6/FrontApplet/Stream/streamEvents.d.ts +1 -1
  119. package/es6/FrontApplet/Sync/Sync.js +13 -13
  120. package/es6/FrontApplet/Sync/Sync.js.map +1 -1
  121. package/es6/FrontApplet/Timing/Timing.js +1 -1
  122. package/es6/FrontApplet/Timing/Timing.js.map +1 -1
  123. package/es6/FrontApplet/Timing/Triggers/Triggers.js +1 -1
  124. package/es6/FrontApplet/Timing/Triggers/Triggers.js.map +1 -1
  125. package/es6/FrontApplet/Touch/Touch.js +1 -1
  126. package/es6/FrontApplet/Touch/Touch.js.map +1 -1
  127. package/es6/FrontApplet/Validate/Validate.d.ts +5 -5
  128. package/es6/FrontApplet/Validate/Validate.js +16 -16
  129. package/es6/FrontApplet/Validate/Validate.js.map +1 -1
  130. package/es6/FrontApplet/Video/IOptions.d.ts +1 -1
  131. package/es6/FrontApplet/Video/IVideoEvent.d.ts +1 -1
  132. package/es6/FrontApplet/Video/IVideoMessage.d.ts +1 -1
  133. package/es6/FrontApplet/Video/Video.js +42 -42
  134. package/es6/FrontApplet/Video/Video.js.map +1 -1
  135. package/es6/Monitoring/Console/consoleCommands.d.ts +1 -1
  136. package/es6/Monitoring/Display/displayCommands.d.ts +1 -1
  137. package/es6/Monitoring/EmptyObject.d.ts +1 -1
  138. package/es6/Monitoring/Management/App/applicationCommands.d.ts +1 -1
  139. package/es6/Monitoring/Management/Audio/audioCommands.d.ts +1 -1
  140. package/es6/Monitoring/Management/AutoRecovery/autoRecoveryCommands.d.ts +1 -1
  141. package/es6/Monitoring/Management/Debug/debugCommands.d.ts +1 -1
  142. package/es6/Monitoring/Management/Network/managementNetworkCommands.d.ts +1 -1
  143. package/es6/Monitoring/Management/Os/osCommands.d.ts +1 -1
  144. package/es6/Monitoring/Management/PeerRecovery/peerRecoveryCommands.d.ts +1 -1
  145. package/es6/Monitoring/Management/Power/powerCommands.d.ts +1 -1
  146. package/es6/Monitoring/Management/RemoteControl/remoteControlCommands.d.ts +1 -1
  147. package/es6/Monitoring/Management/Screen/screenCommands.d.ts +1 -1
  148. package/es6/Monitoring/Management/Security/securityCommands.d.ts +1 -1
  149. package/es6/Monitoring/Management/Time/timeCommands.d.ts +1 -1
  150. package/es6/Monitoring/Management/managementCommands.d.ts +1 -1
  151. package/es6/Monitoring/Montoring.js +26 -63
  152. package/es6/Monitoring/Montoring.js.map +1 -1
  153. package/es6/Monitoring/NativeCommands/nativeMdcCommands.d.ts +1 -1
  154. package/es6/Monitoring/monitoringCommands.d.ts +1 -1
  155. package/es6/Sensors/IRfidAntenna.d.ts +1 -1
  156. package/es6/Util/Console/enhancer.d.ts +11 -0
  157. package/es6/Util/Console/enhancer.js +24 -0
  158. package/es6/Util/Console/enhancer.js.map +1 -0
  159. package/es6/bundle.js +6 -2
  160. package/es6/bundle.js.map +1 -1
  161. package/es6/fpath.d.ts +1 -1
  162. package/package.json +4 -4
@@ -2,7 +2,7 @@ export declare enum RfidAntennaEvent {
2
2
  PICKED = "picked",
3
3
  PLACED = "placed"
4
4
  }
5
- export declare type RfidTag = number;
5
+ export type RfidTag = number;
6
6
  interface IRfidAntenna {
7
7
  getPlacedTags(): Promise<RfidTag[]>;
8
8
  on(event: RfidAntennaEvent, listener: (rfidTag: RfidTag) => void): void;
@@ -0,0 +1,11 @@
1
+ declare const CONSOLE_TYPES: readonly ["debug", "log", "info", "warn", "error"];
2
+ type ConsoleType = (typeof CONSOLE_TYPES)[number];
3
+ type LogFunction = (type: ConsoleType, ...args: unknown[]) => void;
4
+ /**
5
+ * Enhances the standard console logging by calling the provided log function after each console method call.
6
+ * It's usually used to send the logs to a remote server or some similar use case.
7
+ * It keeps calling the original console method before calling the log function.
8
+ * For better debugging, the original functions are stored in the `console.__next` object and the log function is stored in `console.__enhancer`.
9
+ */
10
+ export declare function enhanceStandardConsoleLogging(logFunction: LogFunction): void;
11
+ export {};
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.enhanceStandardConsoleLogging = void 0;
4
+ const CONSOLE_TYPES = ['debug', 'log', 'info', 'warn', 'error'];
5
+ /**
6
+ * Enhances the standard console logging by calling the provided log function after each console method call.
7
+ * It's usually used to send the logs to a remote server or some similar use case.
8
+ * It keeps calling the original console method before calling the log function.
9
+ * For better debugging, the original functions are stored in the `console.__next` object and the log function is stored in `console.__enhancer`.
10
+ */
11
+ function enhanceStandardConsoleLogging(logFunction) {
12
+ CONSOLE_TYPES.forEach((type) => {
13
+ const consoleMethod = global.console[type];
14
+ const combinedFn = (...args) => {
15
+ consoleMethod.apply(global.console, args);
16
+ logFunction(type, ...args);
17
+ };
18
+ combinedFn.__next = consoleMethod;
19
+ combinedFn.__enhancer = logFunction;
20
+ global.console[type] = combinedFn;
21
+ });
22
+ }
23
+ exports.enhanceStandardConsoleLogging = enhanceStandardConsoleLogging;
24
+ //# sourceMappingURL=enhancer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enhancer.js","sourceRoot":"","sources":["../../../src/Util/Console/enhancer.ts"],"names":[],"mappings":";;;AAAA,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAU,CAAC;AAMzE;;;;;GAKG;AACH,SAAgB,6BAA6B,CAAC,WAAwB;IACrE,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC9B,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC3C,MAAM,UAAU,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE;YACzC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC1C,WAAW,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC;QACF,UAAU,CAAC,MAAM,GAAG,aAAa,CAAC;QAClC,UAAU,CAAC,UAAU,GAAG,WAAW,CAAC;QACpC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC;IACnC,CAAC,CAAC,CAAC;AACJ,CAAC;AAXD,sEAWC"}
package/es6/bundle.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -15,7 +19,7 @@ const createFrontApplet_1 = require("./FrontApplet/createFrontApplet");
15
19
  const Montoring_1 = require("./Monitoring/Montoring");
16
20
  __exportStar(require("./fpath"), exports);
17
21
  // fake exports for generating declarations which are overwritten by module.exports
18
- exports.frontApplet = createFrontApplet_1.default(window, 'hug');
22
+ exports.frontApplet = (0, createFrontApplet_1.default)(window, 'hug');
19
23
  exports.sos = exports.frontApplet;
20
24
  exports.monitoring = new Montoring_1.default(exports.frontApplet);
21
25
  // add exports to the frontApplet, which is assigned to module.exports
package/es6/bundle.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bundle.js","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,uEAAgE;AAEhE,sDAAgD;AAChD,0CAAwB;AAExB,mFAAmF;AACtE,QAAA,WAAW,GAAG,2BAAiB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAC/C,QAAA,GAAG,GAAG,mBAAW,CAAC;AAClB,QAAA,UAAU,GAAG,IAAI,mBAAU,CAAC,mBAAW,CAAC,CAAC;AAEtD,sEAAsE;AACtE,aAAa;AACb,mBAAW,CAAC,GAAG,GAAG,mBAAW,CAAC;AAC9B,aAAa;AACb,mBAAW,CAAC,WAAW,GAAG,mBAAW,CAAC;AACtC,aAAa;AACb,mBAAW,CAAC,UAAU,GAAG,kBAAU,CAAC;AACpC,aAAa;AACb,mBAAW,CAAC,OAAO,GAAG,mBAAW,CAAC;AASlC,MAAM,CAAC,GAAG,GAAG,mBAAW,CAAC;AACzB,MAAM,CAAC,aAAa,GAAG,kBAAU,CAAC;AAElC,kBAAe,mBAAW,CAAC;AAC3B,MAAM,CAAC,OAAO,GAAG,mBAAW,CAAC"}
1
+ {"version":3,"file":"bundle.js","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uEAAgE;AAEhE,sDAAgD;AAChD,0CAAwB;AAExB,mFAAmF;AACtE,QAAA,WAAW,GAAG,IAAA,2BAAiB,EAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAC/C,QAAA,GAAG,GAAG,mBAAW,CAAC;AAClB,QAAA,UAAU,GAAG,IAAI,mBAAU,CAAC,mBAAW,CAAC,CAAC;AAEtD,sEAAsE;AACtE,aAAa;AACb,mBAAW,CAAC,GAAG,GAAG,mBAAW,CAAC;AAC9B,aAAa;AACb,mBAAW,CAAC,WAAW,GAAG,mBAAW,CAAC;AACtC,aAAa;AACb,mBAAW,CAAC,UAAU,GAAG,kBAAU,CAAC;AACpC,aAAa;AACb,mBAAW,CAAC,OAAO,GAAG,mBAAW,CAAC;AASlC,MAAM,CAAC,GAAG,GAAG,mBAAW,CAAC;AACzB,MAAM,CAAC,aAAa,GAAG,kBAAU,CAAC;AAElC,kBAAe,mBAAW,CAAC;AAC3B,MAAM,CAAC,OAAO,GAAG,mBAAW,CAAC"}
package/es6/fpath.d.ts CHANGED
@@ -17,7 +17,7 @@ export declare const fpath: {
17
17
  * const path = { filePath: "images/picture.png", storageUnit: ... };
18
18
  * fpath.basename(path); // "picture.png"
19
19
  */
20
- basename(filePath: IFilePath, suffix?: string | undefined): string;
20
+ basename(filePath: IFilePath, suffix?: string): string;
21
21
  /**
22
22
  * Removes the last portion of path, returning the parent directory of the path. Ignores trailing slashes
23
23
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signageos/front-applet",
3
- "version": "7.1.1",
3
+ "version": "7.2.0",
4
4
  "main": "dist/bundle.js",
5
5
  "types": "es6/bundle.d.ts",
6
6
  "files": [
@@ -19,8 +19,8 @@
19
19
  "lint:prettier": "prettier \"**/*.+(ts|tsx|json|js)\" --check",
20
20
  "lint:prettier:fix": "prettier \"**/*.+(ts|tsx|json|js)\" --write",
21
21
  "lint:staged": "npx lint-staged",
22
- "prebuild": "rm -rf dist/*",
23
- "clean-build": "npm run build && npm run generate-declarations && npx husky install",
22
+ "clean": "rm -rf dist/* es6/*",
23
+ "clean-build": "npm run clean && npm run build && npm run generate-declarations && npx husky install",
24
24
  "test": "env NODE_ENV=test ./node_modules/mocha/bin/mocha --config .mocha/default.js",
25
25
  "test:coverage": "npm run test:coverage:runtime && npm run test:coverage:types",
26
26
  "test:coverage:runtime": "env NODE_ENV=test c8 ./node_modules/mocha/bin/mocha --config .mocha/transpile-only.js",
@@ -64,7 +64,7 @@
64
64
  "ts-loader": "8.4.0",
65
65
  "ts-node": "8.3.0",
66
66
  "tslint": "5.4.3",
67
- "typescript": "4.3.5",
67
+ "typescript": "5.0.4",
68
68
  "webpack": "4.39.2",
69
69
  "webpack-cli": "3.3.7"
70
70
  },