beanbagdb 0.6.6 → 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beanbagdb",
3
- "version": "0.6.6",
3
+ "version": "0.6.8",
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
 
@@ -11,7 +11,7 @@ export const default_app = {
11
11
  active: true,
12
12
  description: "Meta-schema or the schema for defining other schemas",
13
13
  system_generated: true,
14
- version: 1,
14
+ version: 1.25,
15
15
  title: "Schema document",
16
16
  schema: {
17
17
  type: "object",
@@ -353,7 +353,7 @@ export const default_app = {
353
353
  system_generated: true,
354
354
  title: "System log",
355
355
  active: true,
356
- version: 1,
356
+ version: 1.25,
357
357
  description: "To define edges in the simple directed graph of records.",
358
358
  schema: {
359
359
  type: "object",
@@ -369,10 +369,7 @@ export const default_app = {
369
369
  },
370
370
  app: {
371
371
  type: "string",
372
- },
373
- time: {
374
- type: "string",
375
- },
372
+ }
376
373
  },
377
374
  },
378
375
  settings: {
@@ -436,7 +433,7 @@ export const default_app = {
436
433
 
437
434
  // this is not stored in the DB. only for validating the metadata during doc update
438
435
  export const editable_metadata_schema = {
439
- additionalProperties: false,
436
+ additionalProperties: true,
440
437
  type: "object",
441
438
  properties: {
442
439
  tags: {
@@ -453,7 +450,18 @@ export const editable_metadata_schema = {
453
450
  },
454
451
  title:{
455
452
  type:"string",
453
+ default:"Document",
456
454
  maxLength:10000
455
+ },
456
+ ref:{
457
+ type:"object",
458
+ "description":"This can be used by apps to add additional data for later user like version ",
459
+ default:{}
460
+ },
461
+ location:{
462
+ type:"object",
463
+ "description":"this can be used to add created_from and last_updated_from location to the doc",
464
+ default:{}
457
465
  }
458
466
  },
459
467
  };