@k3000/store 1.1.1 → 1.1.2

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/generator.mjs CHANGED
@@ -579,6 +579,17 @@ function appendSet(name, set, remark = '') {
579
579
  } else if (this.types.includes(value)) {
580
580
 
581
581
  value = value().toJSON()
582
+
583
+ } else if (typeof value.type === "string" || value.type instanceof String) {
584
+
585
+ value.length = value.length || TypeLen[value.type]
586
+
587
+ value.type = typeMap[value.type]
588
+
589
+ if (value.index) {
590
+
591
+ value.index = []
592
+ }
582
593
  }
583
594
 
584
595
  console.log(' append col:', key)
@@ -615,6 +626,17 @@ function updateCol(name, set) {
615
626
  } else if (this.types.includes(value)) {
616
627
 
617
628
  value = value().toJSON()
629
+
630
+ } else if (typeof value.type === "string" || value.type instanceof String) {
631
+
632
+ value.length = value.length || TypeLen[value.type]
633
+
634
+ value.type = typeMap[value.type]
635
+
636
+ if (value.index) {
637
+
638
+ value.index = []
639
+ }
618
640
  }
619
641
 
620
642
  console.log(` ${Reflect.has(this.curr.struct.base[name], key) ? 'update' : 'append'} col:`, key)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k3000/store",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "storage",
5
5
  "main": "generator.mjs",
6
6
  "scripts": {
package/test/1/data CHANGED
Binary file
package/test/1/index CHANGED
Binary file
package/test/2/data CHANGED
Binary file
package/test/2/index CHANGED
Binary file
package/test/3/data CHANGED
Binary file
package/test/3/index CHANGED
Binary file
package/test/4/data CHANGED
Binary file
package/test/4/index CHANGED
Binary file
package/test/5/data CHANGED
Binary file
package/test/5/index CHANGED
Binary file
package/test/6/data CHANGED
Binary file
package/test/6/index CHANGED
Binary file
package/test/7/data CHANGED
Binary file
package/test/7/index CHANGED
Binary file