beanbagdb 0.5.60 → 0.5.61

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.5.60",
3
+ "version": "0.5.61",
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
@@ -916,7 +916,10 @@ _check_nodes_edge(node1Rule, node2Rule, schema1, schema2) {
916
916
  this.util_validate_data(schemaDoc.schema, data);
917
917
 
918
918
  // validate meta
919
- this.util_validate_data(sys_sch.editable_metadata_schema, meta);
919
+ if(Object.keys.length>0){
920
+ this.util_validate_data(sys_sch.editable_metadata_schema, meta)
921
+ }
922
+
920
923
 
921
924
  // duplicate meta.link check
922
925
  if (meta.link) {
@@ -2,7 +2,7 @@ export const schema_schema = {
2
2
  name: "schema",
3
3
  description:"Meta-schema or the schema for defining other schemas",
4
4
  system_generated:true,
5
- version:0.5,
5
+ version:0.56,
6
6
  schema: {
7
7
  type: "object",
8
8
  additionalProperties: false,
@@ -85,7 +85,7 @@ export const schema_schema = {
85
85
  export const system_schemas = {
86
86
  keys: {
87
87
  system_generated:true,
88
- version:0.52,
88
+ version:0.53,
89
89
  description:"To store user defined key. this can include anything like API tokens etc. There is a special method to fetch this. The values are encrypted",
90
90
  name: "system_key",
91
91
  schema: {
@@ -110,7 +110,6 @@ export const system_schemas = {
110
110
  type: "string",
111
111
  minLength: 1,
112
112
  maxLength: 5000,
113
- pattern: "^[a-zA-Z][a-zA-Z0-9_]*$",
114
113
  },
115
114
  },
116
115
  },
@@ -244,6 +243,9 @@ export const system_schemas = {
244
243
  properties: {
245
244
  imageBase64: {
246
245
  type: "string",
246
+ "media": {
247
+ "binaryEncoding": "base64"
248
+ }
247
249
  },
248
250
  caption: {
249
251
  type: "string",
@@ -264,6 +266,7 @@ export const system_schemas = {
264
266
  // this is not stored in the DB. only for validating the metadata during doc update
265
267
  export const editable_metadata_schema = {
266
268
  additionalProperties: false,
269
+ type:"object",
267
270
  properties:{
268
271
  tags:{
269
272
  type:"array",