@indra.ai/deva.feecting 0.0.6 → 0.0.8

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/_parse.js +8 -3
  2. package/index.js +3 -2
  3. package/package.json +1 -1
package/_parse.js CHANGED
@@ -1,6 +1,11 @@
1
1
  "use strict"
2
- const fs = require('fs');
3
- const path = require('path');
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+
5
+ // set the __dirname
6
+ import {fileURLToPath} from 'node:url';
7
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
8
+
4
9
  const basePath = path.join(__dirname, '..', '..');
5
10
 
6
11
  function formatDate(d, format='long', time=false, locale='en-US') {
@@ -283,7 +288,7 @@ class Parser {
283
288
  }
284
289
  }
285
290
 
286
- module.exports = (opts) => {
291
+ export default (opts) => {
287
292
  const {meta, text, client, agent} = opts.q;
288
293
 
289
294
  const key = agent ? agent.key : client.key;
package/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  // Copyright (c)2025 Quinn Michaels
2
2
  // The Feecting Deva
3
+ import Deva from '@indra.ai/deva';
3
4
  import needle from 'needle';
4
5
  import pkg from './package.json' with {type:'json'};
5
6
  import data from './data.json' with {type:'json'};
@@ -24,14 +25,14 @@ const info = {
24
25
  copyright: pkg.copyright,
25
26
  };
26
27
 
27
-
28
+ import parse from './_parse.js';
28
29
  const FEECTING = new Deva({
29
30
  info,
30
31
  agent,
31
32
  vars,
32
33
  utils: {
33
34
  translate(input) {return input.trim();},
34
- parse: require('./_parse.js'),
35
+ parse,
35
36
  process(input) {return input.trim();},
36
37
  },
37
38
  func: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": 5461868899003,
3
3
  "name": "@indra.ai/deva.feecting",
4
- "version": "0.0.6",
4
+ "version": "0.0.8",
5
5
  "author": "Quinn Michaels",
6
6
  "license": "MIT",
7
7
  "description": "The Feecting Deva manages all the parsing of feecting language in deva.world.",