@indra.ai/deva.feecting 0.0.7 → 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.
- package/_parse.js +8 -3
- package/index.js +2 -2
- package/package.json +1 -1
package/_parse.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict"
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
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
|
@@ -25,14 +25,14 @@ const info = {
|
|
|
25
25
|
copyright: pkg.copyright,
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
import parse from './_parse.js';
|
|
29
29
|
const FEECTING = new Deva({
|
|
30
30
|
info,
|
|
31
31
|
agent,
|
|
32
32
|
vars,
|
|
33
33
|
utils: {
|
|
34
34
|
translate(input) {return input.trim();},
|
|
35
|
-
parse
|
|
35
|
+
parse,
|
|
36
36
|
process(input) {return input.trim();},
|
|
37
37
|
},
|
|
38
38
|
func: {
|
package/package.json
CHANGED