incyclist-devices 2.3.9 → 2.3.11

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 (46) hide show
  1. package/lib/ble/base/interface.d.ts +6 -3
  2. package/lib/ble/base/interface.js +83 -48
  3. package/lib/ble/fm/adapter.d.ts +2 -1
  4. package/lib/ble/fm/adapter.js +27 -9
  5. package/lib/ble/fm/sensor.js +9 -2
  6. package/lib/ble/wahoo/sensor.d.ts +1 -0
  7. package/lib/ble/wahoo/sensor.js +18 -0
  8. package/package.json +1 -1
  9. package/lib/ble/adapter-factory.d.ts +0 -34
  10. package/lib/ble/adapter-factory.js +0 -110
  11. package/lib/ble/base/comms-utils.d.ts +0 -7
  12. package/lib/ble/base/comms-utils.js +0 -90
  13. package/lib/ble/base/comms.d.ts +0 -75
  14. package/lib/ble/base/comms.js +0 -599
  15. package/lib/ble/ble-interface.d.ts +0 -84
  16. package/lib/ble/ble-interface.js +0 -622
  17. package/lib/ble/ble-peripheral.d.ts +0 -39
  18. package/lib/ble/ble-peripheral.js +0 -252
  19. package/lib/ble/cp/comm.d.ts +0 -30
  20. package/lib/ble/cp/comm.js +0 -126
  21. package/lib/ble/elite/adapter.d.ts +0 -21
  22. package/lib/ble/elite/adapter.js +0 -118
  23. package/lib/ble/elite/comms.d.ts +0 -31
  24. package/lib/ble/elite/comms.js +0 -127
  25. package/lib/ble/elite/index.d.ts +0 -3
  26. package/lib/ble/elite/index.js +0 -10
  27. package/lib/ble/fm/comms.d.ts +0 -49
  28. package/lib/ble/fm/comms.js +0 -506
  29. package/lib/ble/hr/comm.d.ts +0 -19
  30. package/lib/ble/hr/comm.js +0 -65
  31. package/lib/ble/peripheral-cache.d.ts +0 -45
  32. package/lib/ble/peripheral-cache.js +0 -109
  33. package/lib/ble/tacx/comms.d.ts +0 -59
  34. package/lib/ble/tacx/comms.js +0 -634
  35. package/lib/ble/wahoo/comms.d.ts +0 -64
  36. package/lib/ble/wahoo/comms.js +0 -399
  37. package/lib/direct-connect/base/comms.d.ts +0 -3
  38. package/lib/direct-connect/base/comms.js +0 -7
  39. package/lib/direct-connect/base/sensor.d.ts +0 -3
  40. package/lib/direct-connect/base/sensor.js +0 -7
  41. package/lib/direct-connect/utils.d.ts +0 -5
  42. package/lib/direct-connect/utils.js +0 -73
  43. package/lib/factories/index.d.ts +0 -3
  44. package/lib/factories/index.js +0 -10
  45. package/lib/utils/operation.d.ts +0 -17
  46. package/lib/utils/operation.js +0 -20
@@ -1,399 +0,0 @@
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
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- const _1 = require(".");
16
- const consts_1 = require("../../base/consts");
17
- const consts_2 = require("../consts");
18
- const comms_1 = __importDefault(require("../fm/comms"));
19
- const utils_1 = require("../utils");
20
- const ErgWriteDelay = 2000;
21
- class BleWahooDevice extends comms_1.default {
22
- constructor(props) {
23
- super(props);
24
- this.prevCrankData = undefined;
25
- this.currentCrankData = undefined;
26
- this.timeOffset = 0;
27
- this.tsPrevWrite = undefined;
28
- this.prevSlope = undefined;
29
- this.isRequestControlBusy = false;
30
- this.weight = consts_1.DEFAULT_BIKE_WEIGHT + consts_1.DEFAULT_USER_WEIGHT;
31
- this.data = {};
32
- this.wahooCP = consts_2.WAHOO_ADVANCED_TRAINER_CP;
33
- }
34
- static isMatching(characteristics) {
35
- if (!characteristics)
36
- return false;
37
- const announced = characteristics.map(c => (0, utils_1.uuid)(c));
38
- const hasWahooCP = announced.find(c => (0, utils_1.matches)(c, consts_2.WAHOO_ADVANCED_TRAINER_CP)) !== undefined;
39
- const hasFTMS = announced.find(c => (0, utils_1.matches)(c, consts_2.FTMS_CP)) !== undefined;
40
- return hasWahooCP && !hasFTMS;
41
- }
42
- init() {
43
- const _super = Object.create(null, {
44
- initDevice: { get: () => super.initDevice }
45
- });
46
- return __awaiter(this, void 0, void 0, function* () {
47
- try {
48
- yield this.subscribeWriteResponse(this.wahooCP);
49
- try {
50
- if (this.wahooCP !== consts_2.WAHOO_ADVANCED_TRAINER_CP_FULL.toLowerCase())
51
- yield this.subscribeWriteResponse(consts_2.WAHOO_ADVANCED_TRAINER_CP_FULL.toLowerCase());
52
- }
53
- catch (err) {
54
- }
55
- return yield _super.initDevice.call(this);
56
- }
57
- catch (err) {
58
- this.logEvent({ message: 'error', fn: 'WahooAdvancedFitnessMachineDevice.init()', error: err.message || err, stack: err.stack });
59
- return false;
60
- }
61
- });
62
- }
63
- setCharacteristicUUIDs(uuids) {
64
- this.logEvent({ message: 'set uuids', uuids });
65
- uuids.forEach(c => {
66
- if ((0, utils_1.matches)(c, consts_2.WAHOO_ADVANCED_TRAINER_CP))
67
- this.wahooCP = c;
68
- });
69
- }
70
- getProfile() {
71
- return 'Smart Trainer';
72
- }
73
- getProtocol() {
74
- return _1.BleWahooComms.protocol;
75
- }
76
- getServiceUUids() {
77
- return BleWahooDevice.services;
78
- }
79
- parseCrankData(crankData) {
80
- if (!this.prevCrankData)
81
- this.prevCrankData = { revolutions: 0, time: 0, cntUpdateMissing: -1 };
82
- const c = this.currentCrankData = crankData;
83
- const p = this.prevCrankData;
84
- let rpm = this.data.cadence;
85
- let hasUpdate = c.time !== p.time;
86
- if (hasUpdate) {
87
- let time = c.time - p.time;
88
- let revs = c.revolutions - p.revolutions;
89
- if (c.time < p.time) {
90
- time += 0x10000;
91
- this.timeOffset += 0x10000;
92
- }
93
- if (c.revolutions < p.revolutions)
94
- revs += 0x10000;
95
- rpm = 1024 * 60 * revs / time;
96
- }
97
- else {
98
- if (p.cntUpdateMissing < 0 || p.cntUpdateMissing > 2) {
99
- rpm = 0;
100
- }
101
- }
102
- const cntUpdateMissing = p.cntUpdateMissing;
103
- this.prevCrankData = this.currentCrankData;
104
- if (hasUpdate)
105
- this.prevCrankData.cntUpdateMissing = 0;
106
- else
107
- this.prevCrankData.cntUpdateMissing = cntUpdateMissing + 1;
108
- return { rpm, time: this.timeOffset + c.time };
109
- }
110
- parsePower(_data) {
111
- const data = Buffer.from(_data);
112
- try {
113
- let offset = 4;
114
- const flags = data.readUInt16LE(0);
115
- this.data.instantaneousPower = data.readUInt16LE(2);
116
- if (flags & 0x1)
117
- data.readUInt8(offset++);
118
- if (flags & 0x4) {
119
- offset += 2;
120
- }
121
- if (flags & 0x10) {
122
- offset += 6;
123
- }
124
- if (flags & 0x20) {
125
- const crankData = {
126
- revolutions: data.readUInt16LE(offset),
127
- time: data.readUInt16LE(offset + 2)
128
- };
129
- const { rpm, time } = this.parseCrankData(crankData);
130
- this.data.cadence = rpm;
131
- this.data.time = time;
132
- offset += 4;
133
- }
134
- }
135
- catch (err) {
136
- }
137
- const { instantaneousPower, cadence, time } = this.data;
138
- return { instantaneousPower, cadence, time, raw: data.toString('hex') };
139
- }
140
- onData(characteristic, data) {
141
- const hasData = super.onData(characteristic, data);
142
- if (!hasData)
143
- return false;
144
- const uuid = characteristic.toLowerCase();
145
- let res = undefined;
146
- switch (uuid) {
147
- case consts_2.CSP_MEASUREMENT:
148
- res = this.parsePower(data);
149
- break;
150
- case consts_2.INDOOR_BIKE_DATA:
151
- res = this.parseIndoorBikeData(data);
152
- break;
153
- case consts_2.HR_MEASUREMENT:
154
- res = this.parseHrm(data);
155
- break;
156
- case consts_2.FTMS_STATUS:
157
- res = this.parseFitnessMachineStatus(data);
158
- break;
159
- default:
160
- this.logEvent({ message: 'data', uuid, data: data.toString('hex') });
161
- break;
162
- }
163
- if (res) {
164
- this.emit('data', res);
165
- return false;
166
- }
167
- return true;
168
- }
169
- subscribeAll(conn) {
170
- return this.subscribeMultiple([consts_2.CSP_MEASUREMENT, consts_2.INDOOR_BIKE_DATA, consts_2.HR_MEASUREMENT, consts_2.FTMS_STATUS, this.wahooCP], conn);
171
- }
172
- writeWahooFtmsMessage(requestedOpCode, data, props) {
173
- return __awaiter(this, void 0, void 0, function* () {
174
- try {
175
- const opcode = Buffer.alloc(1);
176
- opcode.writeUInt8(requestedOpCode, 0);
177
- const message = Buffer.concat([opcode, data]);
178
- this.logEvent({ message: 'wahoo cp:write', data: message.toString('hex') });
179
- const res = yield this.write(this.wahooCP, message, props);
180
- const responseData = Buffer.from(res);
181
- const result = responseData.readUInt8(0);
182
- return result === 1;
183
- }
184
- catch (err) {
185
- this.logEvent({ message: 'wahoo cp:write failed', opCode: requestedOpCode, reason: err.message });
186
- return false;
187
- }
188
- });
189
- }
190
- requestControl() {
191
- return __awaiter(this, void 0, void 0, function* () {
192
- if (this.hasControl)
193
- return true;
194
- this.logEvent({ message: 'requestControl' });
195
- if (this.isRequestControlBusy)
196
- return false;
197
- this.isRequestControlBusy = true;
198
- try {
199
- const data = Buffer.alloc(2);
200
- data.writeUInt8(0xEE, 0);
201
- data.writeUInt8(0xFC, 1);
202
- const res = yield this.writeWahooFtmsMessage(32, data, { timeout: 10000 });
203
- if (res === true) {
204
- this.hasControl = true;
205
- }
206
- else {
207
- this.logEvent({ message: 'requestControl failed' });
208
- }
209
- }
210
- catch (err) {
211
- this.logEvent({ message: 'error', fn: 'requestControl()', error: err.message || err, stack: err.stack });
212
- }
213
- this.isRequestControlBusy = false;
214
- return this.hasControl;
215
- });
216
- }
217
- setPowerAdjusting() {
218
- this.tsPrevWrite = Date.now();
219
- }
220
- isPowerAdjusting() {
221
- if (this.tsPrevWrite === undefined)
222
- return false;
223
- if (this.tsPrevWrite < Date.now() - ErgWriteDelay) {
224
- this.tsPrevWrite = undefined;
225
- return false;
226
- }
227
- return true;
228
- }
229
- setErgMode(power) {
230
- return __awaiter(this, void 0, void 0, function* () {
231
- this.logger.logEvent({ message: 'setErgMode', power });
232
- try {
233
- if (this.isPowerAdjusting())
234
- return false;
235
- const data = Buffer.alloc(2);
236
- data.writeInt16LE(Math.round(power), 0);
237
- const res = yield this.writeWahooFtmsMessage(66, data);
238
- if (res === true) {
239
- this.setPowerAdjusting();
240
- this.data.targetPower = power;
241
- this.isSimMode = false;
242
- this.simModeSettings = undefined;
243
- }
244
- return res;
245
- }
246
- catch (err) {
247
- this.logEvent({ message: 'error', fn: 'setErgMode', error: err.message || err, stack: err.stack });
248
- return false;
249
- }
250
- });
251
- }
252
- setSimMode(weight, crr, cw) {
253
- return __awaiter(this, void 0, void 0, function* () {
254
- this.logger.logEvent({ message: 'setSimMode', weight, crr, cw });
255
- try {
256
- if (this.isSimMode && this.simModeSettings) {
257
- if (weight === this.simModeSettings.weight &&
258
- crr === this.simModeSettings.crr &&
259
- cw === this.simModeSettings.cw)
260
- return true;
261
- }
262
- const hasControl = yield this.requestControl();
263
- if (!hasControl) {
264
- this.logEvent({ message: 'setSimMode failed', reason: 'control is disabled' });
265
- return false;
266
- }
267
- this.weight = weight;
268
- this.crr = crr;
269
- this.cw = cw;
270
- const data = Buffer.alloc(6);
271
- data.writeInt16LE(Math.round(weight * 100), 0);
272
- data.writeInt16LE(Math.round(crr * 10000), 2);
273
- data.writeInt16LE(Math.round(cw * 1000), 4);
274
- const res = yield this.writeWahooFtmsMessage(67, data);
275
- this.isSimMode = true;
276
- this.simModeSettings = { weight, crr, cw };
277
- return res;
278
- }
279
- catch (err) {
280
- this.logEvent({ message: 'error', fn: 'setSimMode', error: err.message || err, stack: err.stack });
281
- return false;
282
- }
283
- });
284
- }
285
- setSimCRR(crr) {
286
- return __awaiter(this, void 0, void 0, function* () {
287
- this.logger.logEvent({ message: 'setSimCRR', crr });
288
- try {
289
- const data = Buffer.alloc(2);
290
- data.writeInt16LE(Math.round(crr * 10000), 0);
291
- const res = yield this.writeWahooFtmsMessage(68, data);
292
- return res;
293
- }
294
- catch (err) {
295
- this.logEvent({ message: 'error', fn: 'setSimCRR', error: err.message || err, stack: err.stack });
296
- return false;
297
- }
298
- });
299
- }
300
- setSimWindResistance(cw) {
301
- return __awaiter(this, void 0, void 0, function* () {
302
- this.logger.logEvent({ message: 'setSimWindResistance', cw });
303
- try {
304
- const data = Buffer.alloc(2);
305
- data.writeInt16LE(Math.round(cw * 1000), 0);
306
- const res = yield this.writeWahooFtmsMessage(69, data);
307
- return res;
308
- }
309
- catch (err) {
310
- this.logEvent({ message: 'error', fn: 'setSimWindResistance', error: err.message || err, stack: err.stack });
311
- return false;
312
- }
313
- });
314
- }
315
- setSimGrade(slope) {
316
- return __awaiter(this, void 0, void 0, function* () {
317
- this.logger.logEvent({ message: 'setSimGrade', slope });
318
- try {
319
- let s = slope;
320
- if (s < -100)
321
- s = -100;
322
- if (s > 100)
323
- s = 100;
324
- const slopeVal = Math.min(Math.round((1 + s / 100) * 65535 / 2.0), 65535);
325
- const data = Buffer.alloc(2);
326
- data.writeUInt16LE(slopeVal, 0);
327
- const res = yield this.writeWahooFtmsMessage(70, data);
328
- return res;
329
- }
330
- catch (err) {
331
- this.logEvent({ message: 'error', fn: 'setSimGrade', error: err.message || err, stack: err.stack });
332
- return false;
333
- }
334
- });
335
- }
336
- setSimWindSpeed(v) {
337
- return __awaiter(this, void 0, void 0, function* () {
338
- this.logger.logEvent({ message: 'setSimWindSpeed', v });
339
- try {
340
- const value = (Math.max(-32.767, Math.min(32.767, v)) + 32.767) * 1000;
341
- const data = Buffer.alloc(2);
342
- data.writeInt16LE(Math.round(value), 0);
343
- const res = yield this.writeWahooFtmsMessage(71, data);
344
- return res;
345
- }
346
- catch (err) {
347
- this.logEvent({ message: 'error', fn: 'setSimWindSpeed', error: err.message || err, stack: err.stack });
348
- return false;
349
- }
350
- });
351
- }
352
- setTargetPower(power) {
353
- return __awaiter(this, void 0, void 0, function* () {
354
- this.logEvent({ message: 'setTargetPower', power, skip: (this.data.targetPower !== undefined && this.data.targetPower === power) });
355
- if (this.data.targetPower !== undefined && this.data.targetPower === power)
356
- return true;
357
- const hasControl = yield this.requestControl();
358
- if (!hasControl) {
359
- this.logEvent({ message: 'setTargetPower failed', reason: 'control is disabled' });
360
- return false;
361
- }
362
- return yield this.setErgMode(power);
363
- });
364
- }
365
- setSlope(slope) {
366
- return __awaiter(this, void 0, void 0, function* () {
367
- this.logEvent({ message: 'setSlope', slope });
368
- if (this.prevSlope !== undefined && slope === this.prevSlope)
369
- return;
370
- try {
371
- if (!this.isSimMode) {
372
- const { weight, crr, cw } = this;
373
- const hasSimMode = yield this.setSimMode(weight, crr, cw);
374
- if (!hasSimMode)
375
- throw new Error('Sim Mode not enabled');
376
- }
377
- const res = yield this.setSimGrade(slope);
378
- this.logEvent({ message: 'setSlope result', res });
379
- this.prevSlope = slope;
380
- return res;
381
- }
382
- catch (err) {
383
- this.logEvent({ message: 'setSlope failed', reason: err.message || err });
384
- this.prevSlope = undefined;
385
- return false;
386
- }
387
- });
388
- }
389
- reset() {
390
- this.data = {};
391
- this.isSimMode = undefined;
392
- this.simModeSettings = undefined;
393
- }
394
- }
395
- BleWahooDevice.protocol = 'wahoo';
396
- BleWahooDevice.services = [consts_2.CSP];
397
- BleWahooDevice.characteristics = [consts_2.FTMS_FEATURE, consts_2.INDOOR_BIKE_DATA, consts_2.RES_LEVEL_RANGE, consts_2.POWER_RANGE, consts_2.FTMS_CP, consts_2.FTMS_STATUS, consts_2.WAHOO_ADVANCED_TRAINER_CP];
398
- BleWahooDevice.detectionPriority = 5;
399
- exports.default = BleWahooDevice;
@@ -1,3 +0,0 @@
1
- import { BleComms } from "../../ble/base/comms";
2
- export declare class DirectConnectComms extends BleComms {
3
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DirectConnectComms = void 0;
4
- const comms_1 = require("../../ble/base/comms");
5
- class DirectConnectComms extends comms_1.BleComms {
6
- }
7
- exports.DirectConnectComms = DirectConnectComms;
@@ -1,3 +0,0 @@
1
- import { BleComms } from "../../ble/base/comms";
2
- export declare class DirectConnectComms extends BleComms {
3
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DirectConnectComms = void 0;
4
- const comms_1 = require("../../ble/base/comms");
5
- class DirectConnectComms extends comms_1.BleComms {
6
- }
7
- exports.DirectConnectComms = DirectConnectComms;
@@ -1,5 +0,0 @@
1
- import { BleProperty } from "../ble/types";
2
- export declare const parseUUID: (str: string) => string;
3
- export declare const beautifyUUID: (str: string, withX?: boolean) => string;
4
- export declare const propertyVal: (properties: BleProperty[]) => number;
5
- export declare const propertyFromVal: (val: number) => BleProperty[];
@@ -1,73 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.propertyFromVal = exports.propertyVal = exports.beautifyUUID = exports.parseUUID = void 0;
4
- const parseUUID = (str) => {
5
- const uuid = str.toUpperCase();
6
- if (str.startsWith('0x')) {
7
- const hex = uuid.slice(2);
8
- if (hex.length === 4) {
9
- return `0000${hex}00001000800000805F9B34FB`;
10
- }
11
- if (hex.length === 8) {
12
- return `${hex}00001000800000805F9B34FB`;
13
- }
14
- }
15
- else if (uuid.length === 4) {
16
- return `0000${uuid}00001000800000805F9B34FB`;
17
- }
18
- else if (uuid.length === 8) {
19
- return `${uuid}00001000800000805F9B34FB`;
20
- }
21
- else if (uuid.length === 32) {
22
- return uuid;
23
- }
24
- else if (uuid.length === 36) {
25
- return uuid.replace(/-/g, '');
26
- }
27
- throw new Error(`Invalid UUID: ${uuid}`);
28
- };
29
- exports.parseUUID = parseUUID;
30
- const beautifyUUID = (str, withX = false) => {
31
- const uuid = (0, exports.parseUUID)(str);
32
- const parts = [
33
- uuid.substring(0, 8),
34
- uuid.substring(8, 12),
35
- uuid.substring(12, 16),
36
- uuid.substring(16, 20),
37
- uuid.substring(20),
38
- ];
39
- if (uuid.substring(8) === '00001000800000805F9B34FB') {
40
- let short;
41
- if (parts[0].startsWith('0000')) {
42
- short = parts[0].substring(4);
43
- }
44
- else {
45
- short = parts[0];
46
- }
47
- return withX ? `0x${short}` : short;
48
- }
49
- return parts.join('-');
50
- };
51
- exports.beautifyUUID = beautifyUUID;
52
- const propertyVal = (properties) => {
53
- let res = 0;
54
- if (properties.includes('read'))
55
- res |= 0x01;
56
- if (properties.includes('write'))
57
- res |= 0x02;
58
- if (properties.includes('notify'))
59
- res |= 0x04;
60
- return res;
61
- };
62
- exports.propertyVal = propertyVal;
63
- const propertyFromVal = (val) => {
64
- const res = [];
65
- if (val & 0x01)
66
- res.push('read');
67
- if (val & 0x02)
68
- res.push('write');
69
- if (val & 0x04)
70
- res.push('notify');
71
- return res;
72
- };
73
- exports.propertyFromVal = propertyFromVal;
@@ -1,3 +0,0 @@
1
- import AdapterFactory from "./adapters";
2
- import InterfaceFactory from "./interfaces";
3
- export { AdapterFactory, InterfaceFactory };
@@ -1,10 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.InterfaceFactory = exports.AdapterFactory = void 0;
7
- const adapters_1 = __importDefault(require("./adapters"));
8
- exports.AdapterFactory = adapters_1.default;
9
- const interfaces_1 = __importDefault(require("./interfaces"));
10
- exports.InterfaceFactory = interfaces_1.default;
@@ -1,17 +0,0 @@
1
- export interface TaskState {
2
- isRunning: boolean;
3
- timeout?: NodeJS.Timeout;
4
- onTimeout: () => void;
5
- promise: Promise<any>;
6
- }
7
- export interface TaskProps {
8
- timeout?: number;
9
- }
10
- export declare class Task<T extends TaskState> {
11
- protected _state: T;
12
- constructor(_state: T, props: TaskProps);
13
- get state(): T;
14
- get promise(): Promise<any>;
15
- start(promise: Promise<any>): void;
16
- isRunning(): boolean;
17
- }
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Task = void 0;
4
- class Task {
5
- constructor(_state, props) {
6
- this._state = _state;
7
- }
8
- get state() {
9
- return this._state;
10
- }
11
- get promise() {
12
- return this._state.promise;
13
- }
14
- start(promise) {
15
- }
16
- isRunning() {
17
- return this._state.isRunning;
18
- }
19
- }
20
- exports.Task = Task;