@indra.ai/deva.license 0.0.32 → 0.0.33
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/feature/methods.js +0 -27
- package/index.js +0 -11
- package/package.json +2 -2
package/feature/methods.js
CHANGED
|
@@ -8,31 +8,4 @@ export default {
|
|
|
8
8
|
const license = await this.methods.sign('license', 'default', packet);
|
|
9
9
|
return license;
|
|
10
10
|
},
|
|
11
|
-
async license_check(personalVLA, packageVLA) {
|
|
12
|
-
this.state('license', `check:personalVLA:${packageVLA.uid}`);
|
|
13
|
-
if (!personalVLA) return false;
|
|
14
|
-
this.state('license', `check:packageVLA:${packageVLA.uid}`);
|
|
15
|
-
if (!packageVLA) return false;
|
|
16
|
-
this.state('license', `check:uid:${packageVLA.uid}`);
|
|
17
|
-
if (personalVLA.uid !== packageVLA.uid) return false;
|
|
18
|
-
this.state('license', `check:time:${packageVLA.uid}`);
|
|
19
|
-
if (personalVLA.time !== packageVLA.time) return false;
|
|
20
|
-
this.state('license', `check:date:${packageVLA.uid}`);
|
|
21
|
-
if (personalVLA.date !== packageVLA.date) return false;
|
|
22
|
-
this.state('license', `check:md5:${packageVLA.uid}`);
|
|
23
|
-
if (personalVLA.md5 !== packageVLA.md5) return false;
|
|
24
|
-
this.state('license', `check:sha256:${packageVLA.uid}`);
|
|
25
|
-
if (personalVLA.sha256 !== packageVLA.sha256) return false;
|
|
26
|
-
this.state('license', `check:sha512:${packageVLA.uid}`);
|
|
27
|
-
if (personalVLA.sha512 !== packageVLA.sha512) return false;
|
|
28
|
-
|
|
29
|
-
// this is to ensure no additional information is being transmitted.
|
|
30
|
-
this.state('license', `compare:sha256:${packageVLA.uid}`);
|
|
31
|
-
const personalVLA_hash = this.lib.hash(personalVLA, 'sha256');
|
|
32
|
-
const packageVLA_hash = this.lib.hash(packageVLA, 'sha256');
|
|
33
|
-
if (personalVLA_hash !== packageVLA_hash) return false;
|
|
34
|
-
|
|
35
|
-
this.state('return', `license:${packageVLA.uid}`);
|
|
36
|
-
return personalVLA;
|
|
37
|
-
}
|
|
38
11
|
};
|
package/index.js
CHANGED
|
@@ -213,17 +213,6 @@ const LICENSE = new Deva({
|
|
|
213
213
|
});
|
|
214
214
|
},
|
|
215
215
|
},
|
|
216
|
-
async onInit(data, resolve) {
|
|
217
|
-
// check license
|
|
218
|
-
const {personal} = this.license(); // get the license config
|
|
219
|
-
this.vars.license = await this.methods.license_check(personal, pkg.VLA);
|
|
220
|
-
if (this.vars.license) {
|
|
221
|
-
return this.start(data, resolve); // start load if license valid
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
return this.stop(data, resolve); // stop load if license is invalid.
|
|
225
|
-
}
|
|
226
|
-
},
|
|
227
216
|
async onReady(data, resolve) {
|
|
228
217
|
const {concerns, global} = this.license(); // get the license config
|
|
229
218
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "41840925813499570000",
|
|
3
3
|
"name": "@indra.ai/deva.license",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.33",
|
|
5
5
|
"license": "VLA:70667481520707725226 LICENSE.md",
|
|
6
6
|
"VLA": {
|
|
7
7
|
"uid": 70667481520707720000,
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://indra.ai",
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@indra.ai/deva": "^1.6.
|
|
54
|
+
"@indra.ai/deva": "^1.6.56",
|
|
55
55
|
"mongodb": "^6.13.0"
|
|
56
56
|
},
|
|
57
57
|
"data": {
|