@naturalcycles/db-lib 10.32.0 → 10.34.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.
@@ -2,9 +2,9 @@ import { Readable } from 'node:stream';
2
2
  import { _by, _sortBy } from '@naturalcycles/js-lib/array';
3
3
  import { _since, localTime } from '@naturalcycles/js-lib/datetime';
4
4
  import { _assert } from '@naturalcycles/js-lib/error/assert.js';
5
- import { generateJsonSchemaFromData } from '@naturalcycles/js-lib/json-schema';
6
5
  import { _deepEquals, _filterUndefinedValues, _sortObjectDeep } from '@naturalcycles/js-lib/object';
7
6
  import { _stringMapValues, } from '@naturalcycles/js-lib/types';
7
+ import { generateJsonSchemaFromData } from '@naturalcycles/nodejs-lib/ajv';
8
8
  import { dimGrey } from '@naturalcycles/nodejs-lib/colors';
9
9
  import { Pipeline } from '@naturalcycles/nodejs-lib/stream';
10
10
  import { BaseCommonDB } from '../../commondb/base.common.db.js';
@@ -1,8 +1,8 @@
1
1
  import { _isEmptyObject } from '@naturalcycles/js-lib';
2
2
  import { _assert } from '@naturalcycles/js-lib/error/assert.js';
3
- import { generateJsonSchemaFromData } from '@naturalcycles/js-lib/json-schema';
4
3
  import { _deepCopy, _sortObjectDeep } from '@naturalcycles/js-lib/object';
5
4
  import { _stringMapEntries, _stringMapValues, } from '@naturalcycles/js-lib/types';
5
+ import { generateJsonSchemaFromData } from '@naturalcycles/nodejs-lib/ajv';
6
6
  import { Pipeline } from '@naturalcycles/nodejs-lib/stream';
7
7
  import { bufferReviver } from '@naturalcycles/nodejs-lib/stream/ndjson/transformJsonParse.js';
8
8
  import { commonDBFullSupport, CommonDBType } from '../commondb/common.db.js';
@@ -29,7 +29,7 @@ export const testItemBMJsonSchema = j
29
29
  k3: j.number().optional(),
30
30
  even: j.boolean().optional(),
31
31
  b1: j.buffer().optional(),
32
- nested: j.objectInfer({ foo: j.number() }).optional(),
32
+ nested: j.object.infer({ foo: j.number() }).optional(),
33
33
  })
34
34
  .dbEntity()
35
35
  .build();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/db-lib",
3
3
  "type": "module",
4
- "version": "10.32.0",
4
+ "version": "10.34.0",
5
5
  "dependencies": {
6
6
  "@naturalcycles/js-lib": "^15",
7
7
  "@naturalcycles/nodejs-lib": "^15"
@@ -40,7 +40,7 @@
40
40
  "directory": "packages/db-lib"
41
41
  },
42
42
  "engines": {
43
- "node": ">=22.12.0"
43
+ "node": ">=24.10.0"
44
44
  },
45
45
  "description": "Lowest Common Denominator API to supported Databases",
46
46
  "keywords": [
package/readme.md CHANGED
@@ -314,10 +314,3 @@ Passing empty array will actually return an array of empty objects (documented e
314
314
  - Test models, utils, etc
315
315
  - `/validation`
316
316
  - Joi validation schemas for DBQuery, CommonDBOptions, CommonSchema, etc
317
-
318
- # Packaging
319
-
320
- - `engines.node >= LTS`
321
- - `main: dist/index.js`: commonjs, es2020
322
- - `types: dist/index.d.ts`: typescript types
323
- - `/src` folder with source `*.ts` files included
@@ -2,7 +2,6 @@ import { Readable } from 'node:stream'
2
2
  import { _by, _sortBy } from '@naturalcycles/js-lib/array'
3
3
  import { _since, localTime } from '@naturalcycles/js-lib/datetime'
4
4
  import { _assert } from '@naturalcycles/js-lib/error/assert.js'
5
- import { generateJsonSchemaFromData } from '@naturalcycles/js-lib/json-schema'
6
5
  import { _deepEquals, _filterUndefinedValues, _sortObjectDeep } from '@naturalcycles/js-lib/object'
7
6
  import {
8
7
  _stringMapValues,
@@ -10,6 +9,7 @@ import {
10
9
  type UnixTimestampMillis,
11
10
  } from '@naturalcycles/js-lib/types'
12
11
  import type { JsonSchema } from '@naturalcycles/nodejs-lib/ajv'
12
+ import { generateJsonSchemaFromData } from '@naturalcycles/nodejs-lib/ajv'
13
13
  import { dimGrey } from '@naturalcycles/nodejs-lib/colors'
14
14
  import { Pipeline } from '@naturalcycles/nodejs-lib/stream'
15
15
  import { BaseCommonDB } from '../../commondb/base.common.db.js'
@@ -1,6 +1,5 @@
1
1
  import { _isEmptyObject } from '@naturalcycles/js-lib'
2
2
  import { _assert } from '@naturalcycles/js-lib/error/assert.js'
3
- import { generateJsonSchemaFromData } from '@naturalcycles/js-lib/json-schema'
4
3
  import type { CommonLogger } from '@naturalcycles/js-lib/log'
5
4
  import { _deepCopy, _sortObjectDeep } from '@naturalcycles/js-lib/object'
6
5
  import {
@@ -11,6 +10,7 @@ import {
11
10
  type StringMap,
12
11
  } from '@naturalcycles/js-lib/types'
13
12
  import type { JsonSchema } from '@naturalcycles/nodejs-lib/ajv'
13
+ import { generateJsonSchemaFromData } from '@naturalcycles/nodejs-lib/ajv'
14
14
  import { Pipeline } from '@naturalcycles/nodejs-lib/stream'
15
15
  import { bufferReviver } from '@naturalcycles/nodejs-lib/stream/ndjson/transformJsonParse.js'
16
16
  import type { CommonDB, CommonDBSupport } from '../commondb/common.db.js'
@@ -61,7 +61,7 @@ export const testItemBMJsonSchema = j
61
61
  k3: j.number().optional(),
62
62
  even: j.boolean().optional(),
63
63
  b1: j.buffer().optional(),
64
- nested: j.objectInfer({ foo: j.number() }).optional(),
64
+ nested: j.object.infer({ foo: j.number() }).optional(),
65
65
  })
66
66
  .dbEntity()
67
67
  .build()