@indra.ai/deva.feecting 0.0.71 → 0.0.72
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 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -147,6 +147,17 @@ const FEECTING = new Deva({
|
|
|
147
147
|
return this.func.get(packet);
|
|
148
148
|
},
|
|
149
149
|
},
|
|
150
|
+
async onInit(data, resolve) {
|
|
151
|
+
// check license
|
|
152
|
+
const {personal} = this.license(); // get the license config
|
|
153
|
+
this.vars.license = await this.methods.license_check(personal, pkg.VLA);
|
|
154
|
+
if (this.vars.license) {
|
|
155
|
+
return this.start(data, resolve); // start load if license valid
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
return this.stop(data, resolve); // stop load if license is invalid.
|
|
159
|
+
}
|
|
160
|
+
},
|
|
150
161
|
onReady(data, resolve) {
|
|
151
162
|
this.prompt(this.vars.messages.ready);
|
|
152
163
|
return resolve(data);
|