beanbagdb 0.6.6 → 0.6.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beanbagdb",
3
- "version": "0.6.6",
3
+ "version": "0.6.7",
4
4
  "description": "A JS library to introduce a schema layer to a No-SQL local database",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
package/src/index.js CHANGED
@@ -346,7 +346,8 @@ export class BeanBagDB {
346
346
 
347
347
  // add a new log
348
348
  let new_log_doc = this._get_blank_doc("system_log")
349
- new_log_doc.data = {text,data:{steps},time:this.util_get_now_unix_timestamp(),app:app_data.app_id}
349
+ new_log_doc.data = {text,steps,app:app_data.app_id}
350
+ new_log_doc.meta.title = text
350
351
  await this.db_api.insert(new_log_doc);
351
352
  console.log("init logged")
352
353
 
@@ -436,7 +436,7 @@ export const default_app = {
436
436
 
437
437
  // this is not stored in the DB. only for validating the metadata during doc update
438
438
  export const editable_metadata_schema = {
439
- additionalProperties: false,
439
+ additionalProperties: true,
440
440
  type: "object",
441
441
  properties: {
442
442
  tags: {
@@ -454,6 +454,16 @@ export const editable_metadata_schema = {
454
454
  title:{
455
455
  type:"string",
456
456
  maxLength:10000
457
+ },
458
+ ref:{
459
+ type:"object",
460
+ "description":"This can be used by apps to add additional data for later user like version ",
461
+ default:{}
462
+ },
463
+ location:{
464
+ type:"object",
465
+ "description":"this can be used to add created_from and last_updated_from location to the doc",
466
+ default:{}
457
467
  }
458
468
  },
459
469
  };