@naturalcycles/db-lib 10.34.0 → 10.35.0

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.
@@ -18,8 +18,8 @@ export const testItemTMSchema = objectSchema({
18
18
  k1: stringSchema,
19
19
  even: booleanSchema.optional(),
20
20
  });
21
- export const testItemBMJsonSchema = j
22
- .object({
21
+ export const testItemBMJsonSchema = j.object
22
+ .dbEntity({
23
23
  // todo: figure out how to not copy-paste these 3 fields
24
24
  id: j.string(), // todo: not strictly needed here
25
25
  created: j.number().integer().unixTimestamp(),
@@ -31,7 +31,6 @@ export const testItemBMJsonSchema = j
31
31
  b1: j.buffer().optional(),
32
32
  nested: j.object.infer({ foo: j.number() }).optional(),
33
33
  })
34
- .dbEntity()
35
34
  .build();
36
35
  export function createTestItemDBM(num = 1) {
37
36
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/db-lib",
3
3
  "type": "module",
4
- "version": "10.34.0",
4
+ "version": "10.35.0",
5
5
  "dependencies": {
6
6
  "@naturalcycles/js-lib": "^15",
7
7
  "@naturalcycles/nodejs-lib": "^15"
@@ -50,8 +50,8 @@ export const testItemTMSchema: ObjectSchema<TestItemTM> = objectSchema<TestItemT
50
50
  even: booleanSchema.optional(),
51
51
  })
52
52
 
53
- export const testItemBMJsonSchema = j
54
- .object<TestItemBM>({
53
+ export const testItemBMJsonSchema = j.object
54
+ .dbEntity<TestItemBM>({
55
55
  // todo: figure out how to not copy-paste these 3 fields
56
56
  id: j.string(), // todo: not strictly needed here
57
57
  created: j.number().integer().unixTimestamp(),
@@ -63,7 +63,6 @@ export const testItemBMJsonSchema = j
63
63
  b1: j.buffer().optional(),
64
64
  nested: j.object.infer({ foo: j.number() }).optional(),
65
65
  })
66
- .dbEntity()
67
66
  .build()
68
67
 
69
68
  export function createTestItemDBM(num = 1): TestItemDBM {