@indra.ai/deva.veda 0.0.30 → 0.0.32
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/data/agent.json +1 -1
- package/data/laws/index.js +46 -1
- package/data/laws/manu/01.json +1 -1
- package/data/laws/manu/11.json +618 -1331
- package/data/laws/manu/12.json +191 -687
- package/data/vars.json +2 -1
- package/help/main.feecting +2 -0
- package/index.js +23 -2
- package/package.json +1 -1
package/data/vars.json
CHANGED
package/help/main.feecting
CHANGED
package/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import utils from './utils.js';
|
|
|
7
7
|
import data from './data/index.js';
|
|
8
8
|
const {agent,vars,rigveda} = data;
|
|
9
9
|
|
|
10
|
-
import {manu, manuhash} from './data/laws/index.js';
|
|
10
|
+
import {manu, manuhash, laws} from './data/laws/index.js';
|
|
11
11
|
import {bookimport} from './data/rigveda/index.js';
|
|
12
12
|
|
|
13
13
|
// set the __dirname
|
|
@@ -207,7 +207,7 @@ const VEDA = new Deva({
|
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
209
|
},
|
|
210
|
-
|
|
210
|
+
laws,
|
|
211
211
|
},
|
|
212
212
|
methods: {
|
|
213
213
|
/**************
|
|
@@ -310,6 +310,27 @@ const VEDA = new Deva({
|
|
|
310
310
|
// Manu function for important laws
|
|
311
311
|
manu,
|
|
312
312
|
manuhash,
|
|
313
|
+
laws(packet) {
|
|
314
|
+
this.context('laws', packet.id);
|
|
315
|
+
this.action('method', `laws:${packet.id}`);
|
|
316
|
+
const data = {};
|
|
317
|
+
return new Promise((resolve, reject) => {
|
|
318
|
+
this.func.laws(packet).then(laws => {
|
|
319
|
+
data.laws = laws.data;
|
|
320
|
+
return this.question(`${this.askChr}feecting parse ${laws.text}`);
|
|
321
|
+
}).then(parsed => {
|
|
322
|
+
data.feecting = parsed.a.data;
|
|
323
|
+
this.state('return', `laws:${packet.id}`);
|
|
324
|
+
return resolve({
|
|
325
|
+
text: parsed.a.text,
|
|
326
|
+
html: parsed.a.html,
|
|
327
|
+
data,
|
|
328
|
+
});
|
|
329
|
+
}).catch(err => {
|
|
330
|
+
return this.error(err, packet. reject);
|
|
331
|
+
});
|
|
332
|
+
});
|
|
333
|
+
}
|
|
313
334
|
},
|
|
314
335
|
onReady(data, resolve) {
|
|
315
336
|
this.prompt(this.vars.messages.ready);
|