@cutos/core 4.0.2 → 4.0.4

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/cutos.esm.js CHANGED
@@ -27,7 +27,7 @@ function getAugmentedNamespace(n) {
27
27
 
28
28
  var src = {};
29
29
 
30
- var cutos$3 = {};
30
+ var cutos = {};
31
31
 
32
32
  // Unique ID creation requires a high quality random # generator. In the browser we therefore
33
33
  // require the crypto API and do not support built-in fallback to lower quality random number
@@ -690,7 +690,7 @@ const cutosAPI$2 = {
690
690
  var cutosApi = cutosAPI$2;
691
691
 
692
692
  var name = "@cutos/core";
693
- var version = "4.0.2";
693
+ var version = "4.0.4";
694
694
  var description = "The CUTOS (CUT Operating System) Core API is a JavaScript library that provides essential functionalities for LWA (Local Web Application) edge computing and communication in the CUTOS ecosystem. ";
695
695
  var main = "dist/cutos.cjs.js";
696
696
  var module = "dist/cutos.esm.js";
@@ -1409,6 +1409,38 @@ class Heartbeat {
1409
1409
  }
1410
1410
  }
1411
1411
 
1412
+ const deviceStatusListenerMap = new Map();
1413
+ let deviceHeartbeatListenerRegistered = false;
1414
+
1415
+ function addDeviceStatusListener(type, listener) {
1416
+ if (!deviceStatusListenerMap.has(type)) {
1417
+ deviceStatusListenerMap.set(type, new Set());
1418
+ }
1419
+ deviceStatusListenerMap.get(type).add(listener);
1420
+
1421
+ if (!deviceHeartbeatListenerRegistered) {
1422
+ listenerMap.set(cutosAPI$1.CORE_APP.HEARTBEAT_LISTENER, msg => {
1423
+ deviceStatusListenerMap.forEach((listeners, listenerType) => {
1424
+ if (listenerType === cutosAPI$1.DEVICE.DEFAULT || listenerType === msg.pinger) {
1425
+ listeners.forEach(statusListener => statusListener(msg));
1426
+ }
1427
+ });
1428
+ });
1429
+ deviceHeartbeatListenerRegistered = true;
1430
+ }
1431
+
1432
+ return () => {
1433
+ const listeners = deviceStatusListenerMap.get(type);
1434
+ if (!listeners) {
1435
+ return;
1436
+ }
1437
+ listeners.delete(listener);
1438
+ if (listeners.size === 0) {
1439
+ deviceStatusListenerMap.delete(type);
1440
+ }
1441
+ };
1442
+ }
1443
+
1412
1444
  class Device {
1413
1445
  /**
1414
1446
  * The constructor of Device
@@ -1421,27 +1453,6 @@ class Device {
1421
1453
  this.topicData = cutosAPI$1.DEVICE.CHANNEL + '-' + type + '-data';
1422
1454
  this.topicResponse = cutosAPI$1.DEVICE.CHANNEL + '-' + type + '-response';
1423
1455
  this.topicCommand = cutosAPI$1.DEVICE.CHANNEL + '-' + type + '-command';
1424
- this.data = {};
1425
-
1426
- if (Device.objectMap === undefined) {
1427
- Device.objectMap = new Map();
1428
- }
1429
- Device.objectMap.set(this.type, this);
1430
-
1431
- if (Device.heartbeatListener === undefined) {
1432
- Device.heartbeatListener = function (msg) {
1433
- for (const [key, obj] of Device.objectMap) {
1434
- if (obj.statusListener !== undefined) {
1435
- if (obj.type === "default-device" || obj.type === msg.pinger) {
1436
- obj.statusListener(msg);
1437
- obj.msg = msg;
1438
- }
1439
- }
1440
- }
1441
- //console.debug(JSON.stringify(msg));
1442
- };
1443
- listenerMap.set(cutosAPI$1.CORE_APP.HEARTBEAT_LISTENER, Device.heartbeatListener);
1444
- }
1445
1456
  // subscribe command callback
1446
1457
  client.subscribe(this.topicCommand + '-callback');
1447
1458
  }
@@ -1482,22 +1493,6 @@ class Device {
1482
1493
  });
1483
1494
  }
1484
1495
 
1485
- /**
1486
- * Get device status
1487
- * @param {Function} listener
1488
- */
1489
- onStatus(listener) {
1490
- this.statusListener = listener;
1491
- }
1492
-
1493
- /**
1494
- * Get device status
1495
- * @param {Function} listener
1496
- */
1497
- getCurrentStatus() {
1498
- return this.msg;
1499
- }
1500
-
1501
1496
  /**
1502
1497
  *
1503
1498
  * @param command - command description object {cmd: 'command', args: (''|{}) }
@@ -1515,40 +1510,6 @@ class Device {
1515
1510
  }
1516
1511
  return maybePromise(callback, cb => publishRequest(this.topicCommand, cb, command, undefined, opts))
1517
1512
  }
1518
-
1519
- /**
1520
- * Receive data sent by the driver
1521
- * @param listener - listener(data)
1522
- */
1523
- onData(listener) {
1524
- if (!listenerMap.has(this.topicData)) {
1525
- client.subscribe(this.topicData); // receive data from device
1526
- }
1527
-
1528
- listenerMap.set(this.topicData, (data) => {
1529
- this.data = data;
1530
- listener(data);
1531
- });
1532
- return () => this.offData(listener);
1533
- }
1534
-
1535
- offData(listener = null) {
1536
- listenerMap.delete(this.topicData);
1537
- }
1538
-
1539
- getCurrentData() {
1540
- return this.data;
1541
- }
1542
-
1543
- /**
1544
- *
1545
- * @param callback (result) => {}, the result is normal make up of {status: true|false, msg: (''| {})}
1546
- */
1547
- readDeviceInfo(callback) {
1548
- let msg = {};
1549
- msg.cmd = "read-device-info";
1550
- return this.sendCommand(msg, callback);
1551
- }
1552
1513
  }
1553
1514
 
1554
1515
  class Driver {
@@ -1568,12 +1529,16 @@ class Driver {
1568
1529
  this.topicData = cutosAPI$1.DEVICE.CHANNEL + '-' + type + '-data';
1569
1530
  this.topicResponse = cutosAPI$1.DEVICE.CHANNEL + '-' + type + '-response';
1570
1531
  this.topicCommand = cutosAPI$1.DEVICE.CHANNEL + '-' + type + '-command';
1532
+ this.beatTimer = null;
1571
1533
  }
1572
1534
 
1573
1535
  startBeat() {
1536
+ if (this.beatTimer) {
1537
+ return;
1538
+ }
1574
1539
  this.heartbeat.register();
1575
1540
  let _this = this;
1576
- setInterval(function () {
1541
+ this.beatTimer = setInterval(function () {
1577
1542
  if (_this.statusInfo.status !== undefined && _this.statusInfo.status !== _this.heartbeat.STATUS.REGISTER) {
1578
1543
  _this.heartbeat.ping(_this.statusInfo.status, _this.statusInfo.info);
1579
1544
  }
@@ -1666,7 +1631,11 @@ class Capability {
1666
1631
  this.eventListeners.get(event).add(listener);
1667
1632
 
1668
1633
  if (!this.dataListenerRegistered) {
1669
- this.unsubscribeData = this.device.onData(message => this._dispatchEvent(message));
1634
+ if (!listenerMap.has(this.device.topicData)) {
1635
+ client.subscribe(this.device.topicData);
1636
+ }
1637
+ listenerMap.set(this.device.topicData, message => this._dispatchEvent(message));
1638
+ this.unsubscribeData = () => listenerMap.delete(this.device.topicData);
1670
1639
  this.dataListenerRegistered = true;
1671
1640
  }
1672
1641
 
@@ -1699,8 +1668,9 @@ class Capability {
1699
1668
  }
1700
1669
 
1701
1670
  _dispatchEvent(message) {
1702
- const event = message && (message.event || message.type);
1703
- const payload = message && Object.prototype.hasOwnProperty.call(message, "data") ? message.data : message;
1671
+ const hasDataPayload = message && Object.prototype.hasOwnProperty.call(message, "data");
1672
+ const event = hasDataPayload ? (message.event || message.type || "data") : "data";
1673
+ const payload = hasDataPayload ? message.data : message;
1704
1674
  const dispatch = listeners => listeners && listeners.forEach(listener => listener(payload, message));
1705
1675
 
1706
1676
  dispatch(this.eventListeners.get(event));
@@ -1780,32 +1750,102 @@ class Provider {
1780
1750
  }
1781
1751
  }
1782
1752
 
1783
- const capabilityMap = new Map();
1784
- const providerMap = new Map();
1753
+ let DeviceCapabilityBase$1 = class DeviceCapabilityBase extends Capability {
1754
+ constructor(name, opts = {}) {
1755
+ super(name, {...opts, type: opts.type || name});
1756
+ }
1785
1757
 
1786
- const cutos$2 = {
1787
- capability(name, opts = {}) {
1788
- const key = opts.type || name;
1789
- if (!capabilityMap.has(key)) {
1790
- capabilityMap.set(key, new Capability(name, opts));
1758
+ init(opts = null, callback) {
1759
+ if (typeof opts === "function") {
1760
+ callback = opts;
1761
+ opts = null;
1791
1762
  }
1792
- return capabilityMap.get(key);
1793
- },
1763
+ return this.device.init(opts, callback);
1764
+ }
1794
1765
 
1795
- provider(name, opts = {}) {
1796
- const key = opts.type || name;
1797
- if (!providerMap.has(key)) {
1798
- providerMap.set(key, new Provider(name, opts));
1799
- }
1800
- return providerMap.get(key);
1801
- },
1766
+ connect(params = {}, options = null, callback = null) {
1767
+ return this.call("connect", params, options, callback);
1768
+ }
1802
1769
 
1803
- device(name, opts = {}) {
1804
- return this.capability(name, opts);
1805
- },
1770
+ disconnect(params = {}, options = null, callback = null) {
1771
+ return this.call("disconnect", params, options, callback);
1772
+ }
1773
+
1774
+ readDeviceInfo(params = {}, options = null, callback = null) {
1775
+ return this.call("readDeviceInfo", params, options, callback);
1776
+ }
1777
+
1778
+ onData(listener) {
1779
+ return this.on("data", listener);
1780
+ }
1806
1781
 
1807
- driver(name, opts = {}) {
1808
- return this.provider(name, opts);
1782
+ onError(listener) {
1783
+ return this.on("error", listener);
1784
+ }
1785
+
1786
+ onStatus(listener) {
1787
+ let active = true;
1788
+ const statusListener = (status, raw) => {
1789
+ if (active) {
1790
+ listener(status, raw);
1791
+ }
1792
+ };
1793
+ const unsubscribeStatus = this.on("status", statusListener);
1794
+ const unsubscribeHeartbeatStatus = addDeviceStatusListener(this.type, statusListener);
1795
+ return () => {
1796
+ active = false;
1797
+ unsubscribeStatus();
1798
+ unsubscribeHeartbeatStatus();
1799
+ };
1800
+ }
1801
+
1802
+ };
1803
+
1804
+ let DeviceProviderBase$1 = class DeviceProviderBase extends Provider {
1805
+ constructor(name, opts = {}) {
1806
+ super(name, {...opts, type: opts.type || name});
1807
+ }
1808
+
1809
+ connect(handler) {
1810
+ return this.method("connect", handler);
1811
+ }
1812
+
1813
+ disconnect(handler) {
1814
+ return this.method("disconnect", handler);
1815
+ }
1816
+
1817
+ startBeat() {
1818
+ this.driver.startBeat();
1819
+ }
1820
+
1821
+ setBeatInterval(interval) {
1822
+ this.driver.beatInterval = interval;
1823
+ return this;
1824
+ }
1825
+
1826
+ setStatus(status = "ready", info = undefined) {
1827
+ const payload = {
1828
+ status,
1829
+ info,
1830
+ updatedAt: Date.now()
1831
+ };
1832
+ const heartbeatStatus = status === "error" || status === "offline"
1833
+ ? cutosAPI$1.HEARTBEAT_STATUS.ERROR
1834
+ : cutosAPI$1.HEARTBEAT_STATUS.ALIVE;
1835
+
1836
+ this.driver.updateStatusInfo(heartbeatStatus, payload);
1837
+ this.emit("status", payload);
1838
+ return this;
1839
+ }
1840
+
1841
+ emitData(data) {
1842
+ return this.emit("data", data);
1843
+ }
1844
+
1845
+ emitError(error) {
1846
+ const payload = normalizeError(error);
1847
+ this.setStatus("error", payload);
1848
+ return this.emit("error", payload);
1809
1849
  }
1810
1850
  };
1811
1851
 
@@ -2017,37 +2057,23 @@ const CoreAPI$3 = {
2017
2057
  return maybePromise(callback, cb => publishRequest(cutosAPI$1.CORE.SET_HTTP_PROXY, cb, {api, target}));
2018
2058
  },
2019
2059
 
2020
- capability(name, opts = {}) {
2021
- return cutos$2.capability(name, opts);
2022
- },
2023
-
2024
- provider(name, opts = {}) {
2025
- return cutos$2.provider(name, opts);
2026
- },
2027
-
2028
- device(name, opts = {}) {
2029
- return cutos$2.device(name, opts);
2030
- },
2031
-
2032
- driver(name, opts = {}) {
2033
- return cutos$2.driver(name, opts);
2034
- }
2035
2060
  };
2036
2061
 
2037
- cutos$3.CoreAPI = CoreAPI$3;
2038
- cutos$3.CoreDefine = {
2062
+ cutos.CoreAPI = CoreAPI$3;
2063
+ cutos.CoreDefine = {
2039
2064
  DEVICE: cutosAPI$1.DEVICE, HEARTBEAT_STATUS: cutosAPI$1.HEARTBEAT_STATUS
2040
2065
  };
2041
- cutos$3.CoreClass = {
2042
- Device, Driver, Database, Capability, Provider, CutosError: CutosError$2
2066
+ cutos.CoreClass = {
2067
+ Device, Driver, Database, Capability, Provider, DeviceCapabilityBase: DeviceCapabilityBase$1, DeviceProviderBase: DeviceProviderBase$1, CutosError: CutosError$2
2043
2068
  };
2044
2069
 
2045
- cutos$3.cutosAPI = cutosAPI$1;
2046
- cutos$3.cutos = cutos$2;
2047
- cutos$3.CutosError = CutosError$2;
2070
+ cutos.cutosAPI = cutosAPI$1;
2071
+ cutos.CutosError = CutosError$2;
2072
+ cutos.DeviceCapabilityBase = DeviceCapabilityBase$1;
2073
+ cutos.DeviceProviderBase = DeviceProviderBase$1;
2048
2074
 
2049
2075
  // simulate cutos core for development
2050
- const {CoreAPI: CoreAPI$2, CoreClass: CoreClass$1} = cutos$3;
2076
+ const {CoreAPI: CoreAPI$2, CoreClass: CoreClass$1} = cutos;
2051
2077
 
2052
2078
  const CoreSimulator$1 = {
2053
2079
  start: function (driver, port = 1883) {
@@ -2079,7 +2105,7 @@ const CoreSimulator$1 = {
2079
2105
 
2080
2106
  var coreSimulator = {CoreSimulator: CoreSimulator$1};
2081
2107
 
2082
- const {CoreAPI: CoreAPI$1, cutos: cutos$1, CutosError: CutosError$1} = cutos$3;
2108
+ const {CoreAPI: CoreAPI$1, CutosError: CutosError$1} = cutos;
2083
2109
 
2084
2110
  const original = {
2085
2111
  init: CoreAPI$1.init,
@@ -2093,13 +2119,7 @@ const original = {
2093
2119
  shell: CoreAPI$1.shell,
2094
2120
  getVolume: CoreAPI$1.getVolume,
2095
2121
  setVolume: CoreAPI$1.setVolume,
2096
- setHttpProxy: CoreAPI$1.setHttpProxy,
2097
- capability: CoreAPI$1.capability,
2098
- provider: CoreAPI$1.provider,
2099
- cutosCapability: cutos$1.capability,
2100
- cutosProvider: cutos$1.provider,
2101
- cutosDevice: cutos$1.device,
2102
- cutosDriver: cutos$1.driver
2122
+ setHttpProxy: CoreAPI$1.setHttpProxy
2103
2123
  };
2104
2124
 
2105
2125
  const mockState = {
@@ -2150,130 +2170,6 @@ function registerCapability(name, definition = {}) {
2150
2170
  return record;
2151
2171
  }
2152
2172
 
2153
- class MockCapability {
2154
- constructor(name) {
2155
- if (!name) {
2156
- throw new Error('capability name cannot be empty.');
2157
- }
2158
- this.name = name;
2159
- this.type = name;
2160
- ensureCapabilityRecord(name);
2161
- }
2162
-
2163
- call(method, params = {}, options = null, callback = null) {
2164
- if (typeof options === 'function') {
2165
- callback = options;
2166
- options = null;
2167
- }
2168
-
2169
- const record = ensureCapabilityRecord(this.name);
2170
- const handler = record.methods.get(method);
2171
-
2172
- if (!handler) {
2173
- const error = new CutosError$1('METHOD_NOT_FOUND', `Mock capability method ${this.name}.${method} is not registered.`);
2174
- return resolveCallback(callback, null, error);
2175
- }
2176
-
2177
- try {
2178
- const result = handler(params, {capability: this, method, options});
2179
- if (result && typeof result.then === 'function') {
2180
- return typeof callback === 'function'
2181
- ? (result.then(value => callback(value)).catch(error => callback(null, error)), true)
2182
- : result;
2183
- }
2184
- return resolveCallback(callback, result);
2185
- } catch (error) {
2186
- return resolveCallback(callback, null, error);
2187
- }
2188
- }
2189
-
2190
- on(event, listener) {
2191
- if (typeof listener !== 'function') {
2192
- throw new Error('capability event listener must be a function.');
2193
- }
2194
-
2195
- const record = ensureCapabilityRecord(this.name);
2196
- if (!record.listeners.has(event)) {
2197
- record.listeners.set(event, new Set());
2198
- }
2199
- record.listeners.get(event).add(listener);
2200
- return () => this.off(event, listener);
2201
- }
2202
-
2203
- off(event, listener = null) {
2204
- const record = ensureCapabilityRecord(this.name);
2205
- if (!record.listeners.has(event)) {
2206
- return;
2207
- }
2208
- if (!listener) {
2209
- record.listeners.delete(event);
2210
- return;
2211
- }
2212
-
2213
- const listeners = record.listeners.get(event);
2214
- listeners.delete(listener);
2215
- if (listeners.size === 0) {
2216
- record.listeners.delete(event);
2217
- }
2218
- }
2219
-
2220
- dispose() {
2221
- const record = ensureCapabilityRecord(this.name);
2222
- record.listeners.clear();
2223
- return true;
2224
- }
2225
- }
2226
-
2227
- class MockProvider {
2228
- constructor(name) {
2229
- if (!name) {
2230
- throw new Error('provider name cannot be empty.');
2231
- }
2232
- this.name = name;
2233
- this.type = name;
2234
- ensureCapabilityRecord(name);
2235
- }
2236
-
2237
- method(method, handler) {
2238
- if (typeof handler !== 'function') {
2239
- throw new Error('provider method handler must be a function.');
2240
- }
2241
- ensureCapabilityRecord(this.name).methods.set(method, handler);
2242
- return this;
2243
- }
2244
-
2245
- emit(event, data) {
2246
- const record = ensureCapabilityRecord(this.name);
2247
- const listeners = record.listeners.get(event);
2248
- const allListeners = record.listeners.get('*');
2249
- const dispatch = listener => listener(data, {event, data});
2250
-
2251
- listeners && listeners.forEach(dispatch);
2252
- allListeners && allListeners.forEach(dispatch);
2253
- return true;
2254
- }
2255
-
2256
- dispose() {
2257
- const record = ensureCapabilityRecord(this.name);
2258
- record.methods.clear();
2259
- return true;
2260
- }
2261
- }
2262
-
2263
- function getMockCapability(name) {
2264
- if (!mockState.capabilities.has(name)) {
2265
- registerCapability(name);
2266
- }
2267
- return new MockCapability(name);
2268
- }
2269
-
2270
- function getMockProvider(name) {
2271
- if (!mockState.providers.has(name)) {
2272
- mockState.providers.set(name, new MockProvider(name));
2273
- }
2274
- return mockState.providers.get(name);
2275
- }
2276
-
2277
2173
  function installCutosMock$1(options = {}) {
2278
2174
  mockState.options = options;
2279
2175
  mockState.connected = false;
@@ -2305,13 +2201,6 @@ function installCutosMock$1(options = {}) {
2305
2201
  return resolveCallback(callback, vol);
2306
2202
  };
2307
2203
  CoreAPI$1.setHttpProxy = (api, target, callback) => resolveCallback(callback, {api, target});
2308
- CoreAPI$1.capability = (name) => getMockCapability(name);
2309
- CoreAPI$1.provider = (name) => getMockProvider(name);
2310
-
2311
- cutos$1.capability = (name) => getMockCapability(name);
2312
- cutos$1.provider = (name) => getMockProvider(name);
2313
- cutos$1.device = (name) => getMockCapability(name);
2314
- cutos$1.driver = (name) => getMockProvider(name);
2315
2204
 
2316
2205
  mockState.installed = true;
2317
2206
  return CutosMock$1;
@@ -2330,12 +2219,6 @@ function uninstallCutosMock$1() {
2330
2219
  CoreAPI$1.getVolume = original.getVolume;
2331
2220
  CoreAPI$1.setVolume = original.setVolume;
2332
2221
  CoreAPI$1.setHttpProxy = original.setHttpProxy;
2333
- CoreAPI$1.capability = original.capability;
2334
- CoreAPI$1.provider = original.provider;
2335
- cutos$1.capability = original.cutosCapability;
2336
- cutos$1.provider = original.cutosProvider;
2337
- cutos$1.device = original.cutosDevice;
2338
- cutos$1.driver = original.cutosDriver;
2339
2222
 
2340
2223
  mockState.connected = false;
2341
2224
  mockState.installed = false;
@@ -2347,14 +2230,20 @@ const CutosMock$1 = {
2347
2230
  install: installCutosMock$1,
2348
2231
  uninstall: uninstallCutosMock$1,
2349
2232
  registerCapability,
2350
- capability: getMockCapability,
2351
- provider: getMockProvider,
2352
2233
  isInstalled: () => mockState.installed
2353
2234
  };
2354
2235
 
2355
2236
  var mock = {CutosMock: CutosMock$1, installCutosMock: installCutosMock$1, uninstallCutosMock: uninstallCutosMock$1};
2356
2237
 
2357
- const {CoreAPI, CoreDefine, CoreClass, cutosAPI, cutos, CutosError} = cutos$3;
2238
+ const {
2239
+ CoreAPI,
2240
+ CoreDefine,
2241
+ CoreClass,
2242
+ cutosAPI,
2243
+ CutosError,
2244
+ DeviceCapabilityBase,
2245
+ DeviceProviderBase
2246
+ } = cutos;
2358
2247
  const {CoreSimulator} = coreSimulator;
2359
2248
  const {CutosMock, installCutosMock, uninstallCutosMock} = mock;
2360
2249
 
@@ -2376,11 +2265,12 @@ var CoreAPI_1 = src.CoreAPI = CoreAPI;
2376
2265
  var CoreDefine_1 = src.CoreDefine = CoreDefine;
2377
2266
  var CoreClass_1 = src.CoreClass = CoreClass;
2378
2267
  var cutosAPI_1 = src.cutosAPI = cutosAPI;
2379
- var cutos_1 = src.cutos = cutos;
2380
2268
  var CutosError_1 = src.CutosError = CutosError;
2269
+ var DeviceCapabilityBase_1 = src.DeviceCapabilityBase = DeviceCapabilityBase;
2270
+ var DeviceProviderBase_1 = src.DeviceProviderBase = DeviceProviderBase;
2381
2271
  var CoreSimulator_1 = src.CoreSimulator = CoreSimulator;
2382
2272
  var CutosMock_1 = src.CutosMock = CutosMock;
2383
2273
  var installCutosMock_1 = src.installCutosMock = installCutosMock;
2384
2274
  var uninstallCutosMock_1 = src.uninstallCutosMock = uninstallCutosMock;
2385
2275
 
2386
- export { CoreAPI_1 as CoreAPI, CoreClass_1 as CoreClass, CoreDefine_1 as CoreDefine, CoreSimulator_1 as CoreSimulator, CutosError_1 as CutosError, CutosMock_1 as CutosMock, cutos_1 as cutos, cutosAPI_1 as cutosAPI, src as default, installCutosMock_1 as installCutosMock, uninstallCutosMock_1 as uninstallCutosMock };
2276
+ export { CoreAPI_1 as CoreAPI, CoreClass_1 as CoreClass, CoreDefine_1 as CoreDefine, CoreSimulator_1 as CoreSimulator, CutosError_1 as CutosError, CutosMock_1 as CutosMock, DeviceCapabilityBase_1 as DeviceCapabilityBase, DeviceProviderBase_1 as DeviceProviderBase, cutosAPI_1 as cutosAPI, src as default, installCutosMock_1 as installCutosMock, uninstallCutosMock_1 as uninstallCutosMock };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cutos/core",
3
- "version": "4.0.2",
3
+ "version": "4.0.4",
4
4
  "description": "The CUTOS (CUT Operating System) Core API is a JavaScript library that provides essential functionalities for LWA (Local Web Application) edge computing and communication in the CUTOS ecosystem. ",
5
5
  "main": "dist/cutos.cjs.js",
6
6
  "module": "dist/cutos.esm.js",