@indra.ai/deva.data 0.0.11 → 0.0.12

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 +6 -3
  2. package/package.json +4 -4
package/index.js CHANGED
@@ -44,6 +44,7 @@ const DATA = new Deva({
44
44
  },
45
45
  listeners: {
46
46
  'data:history'(packet) {
47
+ this.context('history');
47
48
  // here we insert a history object into the database.
48
49
  this.func.insert({
49
50
  collection: 'history',
@@ -82,16 +83,16 @@ const DATA = new Deva({
82
83
  describe: the insert function that inserts into the specified collection.
83
84
  ***************/
84
85
  async insert(opts) {
85
- this.action('func', `insert`);
86
+ this.action('func', `insert ${opts.collection}`);
86
87
  let result = false;
87
88
  try {
88
- this.state('insert', opts.collection);
89
+ this.state('data', `insert ${opts.collection}`);
89
90
  await this.modules.client.connect(); // connect to the database client.
90
91
  const db = this.modules.client.db(this.vars.database); // set the database to use
91
92
  result = await db.collection(opts.collection).insertOne(opts.data); // insert the data
92
93
  } finally {
93
94
  await this.modules.client.close(); // close the connection when done
94
- this.state('return', 'insert');
95
+ this.action('return', `insert ${opts.collection}`);
95
96
  return result; // return the result to the requestor.
96
97
  }
97
98
  },
@@ -491,6 +492,8 @@ const DATA = new Deva({
491
492
  ].join('\n');
492
493
  }).join('\n') : 'no memory';
493
494
  this.state('parse', `memory`);
495
+ console.log('packet memory feecting resolve', memory);
496
+
494
497
  return this.question(`${this.askChr}feecting parse ${text}`);
495
498
  }).then(feecting => {
496
499
  data.feecting = feecting.a.data;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": 4825562571950,
3
3
  "name": "@indra.ai/deva.data",
4
- "version": "0.0.11",
4
+ "version": "0.0.12",
5
5
  "author": "Quinn Michaels",
6
6
  "license": "MIT",
7
7
  "copyright": "2025",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "homepage": "https://deva.space/devas/data",
29
29
  "dependencies": {
30
- "@indra.ai/deva": "^1.4.22",
30
+ "@indra.ai/deva": "^1.4.23",
31
31
  "mongodb": "^6.13.0"
32
32
  },
33
33
  "data": {
@@ -73,7 +73,7 @@
73
73
  "init": "🟠 INIT",
74
74
  "start": "🔵 START",
75
75
  "enter": "🟢 ENTER",
76
- "ready": "⭐️ Data Deva Ready!",
76
+ "ready": "⭐️ READY!",
77
77
  "stop": "🔴 STOP",
78
78
  "exit": "🟡 EXIT",
79
79
  "done": "🟣 DONE",
@@ -301,7 +301,7 @@
301
301
  "uid": "Uid",
302
302
  "status": "Status",
303
303
  "help": "Help",
304
- "history": "History",
304
+ "history": "📦 History",
305
305
  "model": "Model",
306
306
  "modeler": "Modeler",
307
307
  "insert": "Insert",