@indra.ai/deva.data 0.0.13 → 0.0.14

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 +4 -1
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -307,17 +307,20 @@ const DATA = new Deva({
307
307
  describe: insert data into the data vault.
308
308
  ***************/
309
309
  insert(packet) {
310
- this.context('insert', `data: ${packet.q.meta.params[1]}`);
310
+ this.context('insert', `collection:${packet.q.meta.params[1]}`);
311
+ this.action('method', `insert:${packet.q.meta.params[1]}`);
311
312
  return new Promise((resolve, reject) => {
312
313
  const {data, meta} = packet.q;
313
314
  const collection = meta.params[1];
314
315
  this.func.insert({collection,data}).then(ins => {
316
+ this.state('resolve', `insert:${collection}:${insinsertedId}`)
315
317
  return resolve({
316
318
  text: `id:${insinsertedId}`,
317
319
  html: `id:${insinsertedId}`,
318
320
  data: ins,
319
321
  });
320
322
  }).catch(err => {
323
+ this.state('reject', 'insert');
321
324
  return this.error(packet, err, reject);
322
325
  });
323
326
  });
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.13",
4
+ "version": "0.0.14",
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.24",
30
+ "@indra.ai/deva": "^1.4.25",
31
31
  "mongodb": "^6.13.0"
32
32
  },
33
33
  "data": {