@indra.ai/deva.services 0.0.3 → 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.
Files changed (2) hide show
  1. package/index.js +24 -16
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,22 +1,30 @@
1
- // Copyright (c)2023 Quinn Michaels
1
+ // Copyright (c)2025 Quinn Michaels
2
2
  // Services Deva
3
- // The Services Deva manages various @SERVICES requests in deva.world.
4
- const Deva = require('@indra.ai/deva');
5
- const package = require('./package.json');
3
+ // The Services Deva manages various Services requests in deva.world.
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
+
6
15
  const info = {
7
- id: package.id,
8
- name: package.name,
9
- describe: package.description,
10
- version: package.version,
16
+ id: pkg.id,
17
+ name: pkg.name,
18
+ describe: pkg.description,
19
+ version: pkg.version,
11
20
  dir: __dirname,
12
- url: package.homepage,
13
- git: package.repository.url,
14
- bugs: package.bugs.url,
15
- author: package.author,
16
- license: package.license,
17
- copyright: package.copyright,
21
+ url: pkg.homepage,
22
+ git: pkg.repository.url,
23
+ bugs: pkg.bugs.url,
24
+ author: pkg.author,
25
+ license: pkg.license,
26
+ copyright: pkg.copyright,
18
27
  };
19
- const {agent,vars} = require('./data.json').DATA;
20
28
  const SERVICES = new Deva({
21
29
  info,
22
30
  agent,
@@ -34,4 +42,4 @@ const SERVICES = new Deva({
34
42
  console.log('ERR', err);
35
43
  }
36
44
  });
37
- module.exports = SERVICES
45
+ export default SERVICES
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": 4855882658530,
3
3
  "name": "@indra.ai/deva.services",
4
- "version": "0.0.3",
4
+ "version": "0.0.4",
5
5
  "author": "Quinn Michaels",
6
6
  "license": "MIT",
7
7
  "copyright": "2023",