@indra.ai/deva.license 0.0.8 → 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/index.js +11 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -214,9 +214,18 @@ const LICENSE = new Deva({
|
|
|
214
214
|
});
|
|
215
215
|
},
|
|
216
216
|
},
|
|
217
|
-
|
|
217
|
+
async onInit(data, resolve) {
|
|
218
218
|
const {concerns, global, personal} = this.license(); // get the license config
|
|
219
|
-
this.vars.license = this.methods.license_check(personal, pkg.VLA);
|
|
219
|
+
this.vars.license = await this.methods.license_check(personal, pkg.VLA);
|
|
220
|
+
if (this.vars.license) {
|
|
221
|
+
return this.start(data, resolve);
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
return this.stop(data, resolve);
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
async onReady(data, resolve) {
|
|
228
|
+
const {concerns, global} = this.license(); // get the license config
|
|
220
229
|
|
|
221
230
|
const {uri,database} = global.mongo; // set the datase
|
|
222
231
|
|