@indra.ai/deva.support 0.0.2 → 0.0.4
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 +24 -21
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,24 +1,32 @@
|
|
|
1
|
-
// Copyright (c)
|
|
1
|
+
// Copyright (c)2025 Quinn Michaels
|
|
2
2
|
// Support Deva
|
|
3
3
|
// Support Deva manages the support eatures of deva.world.
|
|
4
|
-
|
|
4
|
+
import Deva from '@indra.ai/deva';
|
|
5
|
+
import pkg from './package.json' with {type:'json'};
|
|
6
|
+
|
|
7
|
+
import data from './data.json' with {type:'json'};
|
|
8
|
+
const {agent,vars} = data.DATA;
|
|
9
|
+
|
|
10
|
+
// set the __dirname
|
|
11
|
+
import {dirname} from 'node:path';
|
|
12
|
+
import {fileURLToPath} from 'node:url';
|
|
13
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
14
|
+
|
|
15
|
+
|
|
5
16
|
const info = {
|
|
6
|
-
id:
|
|
7
|
-
name:
|
|
8
|
-
describe:
|
|
9
|
-
version:
|
|
10
|
-
url:
|
|
17
|
+
id: pkg.id,
|
|
18
|
+
name: pkg.name,
|
|
19
|
+
describe: pkg.description,
|
|
20
|
+
version: pkg.version,
|
|
21
|
+
url: pkg.homepage,
|
|
11
22
|
dir: __dirname,
|
|
12
|
-
git:
|
|
13
|
-
bugs:
|
|
14
|
-
author:
|
|
15
|
-
license:
|
|
16
|
-
copyright:
|
|
23
|
+
git: pkg.repository.url,
|
|
24
|
+
bugs: pkg.bugs.url,
|
|
25
|
+
author: pkg.author,
|
|
26
|
+
license: pkg.license,
|
|
27
|
+
copyright: pkg.copyright,
|
|
17
28
|
};
|
|
18
29
|
|
|
19
|
-
const {agent,vars} = require('./data.json').DATA;
|
|
20
|
-
|
|
21
|
-
const Deva = require('@indra.ai/deva');
|
|
22
30
|
const SUPPORT = new Deva({
|
|
23
31
|
info,
|
|
24
32
|
agent,
|
|
@@ -46,10 +54,5 @@ const SUPPORT = new Deva({
|
|
|
46
54
|
sup_answer(packet) {return;},
|
|
47
55
|
},
|
|
48
56
|
methods: {},
|
|
49
|
-
onDone(data) {
|
|
50
|
-
this.listen('devacore:question', this.func.sup_question);
|
|
51
|
-
this.listen('devacore:answer', this.func.sup_answer);
|
|
52
|
-
return Promise.resolve(data);
|
|
53
|
-
},
|
|
54
57
|
});
|
|
55
|
-
|
|
58
|
+
export default SUPPORT
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": 4077391632050,
|
|
3
3
|
"name": "@indra.ai/deva.support",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.4",
|
|
5
5
|
"author": "Quinn Michaels",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"copyright": "(c) 2025 Quinn Michaels",
|
|
@@ -27,6 +27,6 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://deva.space/devas/support",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@indra.ai/deva": "^1.2.
|
|
30
|
+
"@indra.ai/deva": "^1.2.28"
|
|
31
31
|
}
|
|
32
32
|
}
|