@indra.ai/deva.log 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.
Files changed (3) hide show
  1. package/index.js +24 -16
  2. package/index.test.js +3 -3
  3. package/package.json +2 -2
package/index.js CHANGED
@@ -1,23 +1,31 @@
1
- // Log Deva (c)2023 Quinn Michaels
1
+ // Log Deva (c)2025 Quinn Michaels
2
2
  // Log Deva handles logging events
3
- const Deva = require('@indra.ai/deva');
4
- const { MongoClient } = require("mongodb");
5
- const package = require('./package.json');
3
+ import Deva from '@indra.ai/deva';
4
+ import {MongoClient} from 'mongodb';
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
+ import {dirname} from 'node:path';
11
+ import {fileURLToPath} from 'node:url';
12
+ const __dirname = dirname(fileURLToPath(import.meta.url));
13
+
6
14
  const info = {
7
- id: package.id,
8
- name: package.name,
9
- version: package.version,
10
- describe: package.description,
15
+ id: pkg.id,
16
+ name: pkg.name,
17
+ version: pkg.version,
18
+ describe: pkg.description,
11
19
  dir: __dirname,
12
- url: package.homepage,
13
- git: package.repository.url,
14
- bugs: package.bugs.url,
15
- license: package.license,
16
- author: package.author,
17
- copyright: package.copyright,
20
+ url: pkg.homepage,
21
+ git: pkg.repository.url,
22
+ bugs: pkg.bugs.url,
23
+ license: pkg.license,
24
+ author: pkg.author,
25
+ copyright: pkg.copyright,
18
26
  };
19
27
 
20
- const {agent,vars} = require('./data.json').DATA;
28
+
21
29
  const LOG = new Deva({
22
30
  info,
23
31
  agent,
@@ -75,4 +83,4 @@ const LOG = new Deva({
75
83
  return this.start(data);
76
84
  }
77
85
  });
78
- module.exports = LOG
86
+ export default LOG
package/index.test.js CHANGED
@@ -1,8 +1,8 @@
1
- // Copyright (c)2023 Quinn Michaels
1
+ // Copyright (c)2025 Quinn Michaels
2
2
  // Log Buddy test file
3
3
 
4
- const {expect} = require('chai')
5
- const log = require('./index.js');
4
+ import {expect} from 'chai';
5
+ import log from './index.js';
6
6
 
7
7
  describe(log.me.name, () => {
8
8
  beforeEach(() => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": 4148108755733,
3
3
  "name": "@indra.ai/deva.log",
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "author": "Quinn Michaels",
6
6
  "license": "MIT",
7
7
  "copyright": "2025",
@@ -27,7 +27,7 @@
27
27
  "url": "https://deva.space/devas/log"
28
28
  },
29
29
  "dependencies": {
30
- "@indra.ai/deva": "^1.2.23",
30
+ "@indra.ai/deva": "^1.2.27",
31
31
  "mongodb": "^6.1.0"
32
32
  }
33
33
  }