chronograph-npm 0.0.7 → 0.0.9
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/cg.d.ts +3 -2
- package/dist/cg.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cg.js +10 -3
package/dist/cg.d.ts
CHANGED
|
@@ -3,11 +3,12 @@ export class CG {
|
|
|
3
3
|
homey: any;
|
|
4
4
|
}): Promise<CG>;
|
|
5
5
|
static detroy(): void;
|
|
6
|
+
static getAllChronographs(): Promise<any>;
|
|
6
7
|
/**
|
|
7
|
-
* @
|
|
8
|
+
* @description Setable member, when set, will be activated on any variable update.
|
|
8
9
|
* @param {Object} param0.variable
|
|
9
10
|
*/
|
|
10
|
-
static
|
|
11
|
+
static onChronographUpdate({ chronograph }: any): Promise<void>;
|
|
11
12
|
constructor({ homey }: {
|
|
12
13
|
homey: any;
|
|
13
14
|
});
|
package/dist/cg.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cg.d.ts","sourceRoot":"","sources":["../src/cg.js"],"names":[],"mappings":"AAAA;IAGI;;oBAwBC;IA+BD,sBAQC;IAgCD;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"cg.d.ts","sourceRoot":"","sources":["../src/cg.js"],"names":[],"mappings":"AAAA;IAGI;;oBAwBC;IA+BD,sBAQC;IAgCD,0CAEC;IAKD;;;OAGG;IACH,gEAGC;IApFD;;OAWC;IATG,WAA6B;IAC7B,iBAAoB;IAIpB,WAAyC;IAM7C,2BAaC;IAVW,SAAqC;IAyBjD,uDAOC;IAGD,eAAe;IACf,kBAeC;CAqBJ"}
|
package/package.json
CHANGED
package/src/cg.js
CHANGED
|
@@ -71,7 +71,8 @@ class CG {
|
|
|
71
71
|
if(!CG.isReady && CG._defer) CG._defer.resolve();
|
|
72
72
|
|
|
73
73
|
if (event === 'chronograph_event') {
|
|
74
|
-
|
|
74
|
+
if(data && data.now) data.now = new Date(data.now);
|
|
75
|
+
CG.onChronographUpdate({chronograph:data});
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
|
|
@@ -94,14 +95,20 @@ class CG {
|
|
|
94
95
|
return this.api;
|
|
95
96
|
}
|
|
96
97
|
|
|
98
|
+
|
|
99
|
+
static async getAllChronographs() {
|
|
100
|
+
if(CG && CG.Current && CG.Current.api) return await CG.Current.api.get('/allchronographs')
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
97
104
|
|
|
98
105
|
|
|
99
106
|
/**
|
|
100
|
-
* @
|
|
107
|
+
* @description Setable member, when set, will be activated on any variable update.
|
|
101
108
|
* @param {Object} param0.variable
|
|
102
109
|
*/
|
|
103
110
|
static async onChronographUpdate({chronograph}) {
|
|
104
|
-
BL.homey.log('onChronographUpdate: ', chronograph);
|
|
111
|
+
//BL.homey.log('onChronographUpdate: ', chronograph);
|
|
105
112
|
|
|
106
113
|
}
|
|
107
114
|
|