@naturalcycles/datastore-lib 4.4.0 → 4.5.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.
@@ -1,7 +1,7 @@
1
1
  import { Readable } from 'node:stream';
2
2
  import type { Query } from '@google-cloud/datastore';
3
3
  import type { CommonLogger } from '@naturalcycles/js-lib';
4
- import type { ReadableTyped } from '@naturalcycles/nodejs-lib';
4
+ import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream';
5
5
  import type { DatastoreDBStreamOptions } from './datastore.model.js';
6
6
  export declare class DatastoreStreamReadable<T = any> extends Readable implements ReadableTyped<T> {
7
7
  private q;
@@ -2,7 +2,7 @@ import type { Datastore, Key, Transaction } from '@google-cloud/datastore';
2
2
  import type { CommonDB, CommonDBOptions, CommonDBReadOptions, CommonDBSaveOptions, CommonDBSupport, CommonDBTransactionOptions, DBQuery, DBTransaction, DBTransactionFn, RunQueryResult } from '@naturalcycles/db-lib';
3
3
  import { BaseCommonDB } from '@naturalcycles/db-lib';
4
4
  import type { CommonLogger, JsonSchemaObject, JsonSchemaRootObject, ObjectWithId } from '@naturalcycles/js-lib';
5
- import type { ReadableTyped } from '@naturalcycles/nodejs-lib';
5
+ import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream';
6
6
  import type { DatastoreDBCfg, DatastoreDBOptions, DatastoreDBReadOptions, DatastoreDBSaveOptions, DatastoreDBStreamOptions, DatastorePropertyStats, DatastoreStats } from './datastore.model.js';
7
7
  /**
8
8
  * Datastore API:
@@ -1,7 +1,7 @@
1
1
  import { Transform } from 'node:stream';
2
2
  import { BaseCommonDB, commonDBFullSupport } from '@naturalcycles/db-lib';
3
3
  import { _assert, _chunk, _errorDataAppend, _omit, commonLoggerMinLevel, pMap, pRetry, pRetryFn, pTimeout, TimeoutError, } from '@naturalcycles/js-lib';
4
- import { boldWhite } from '@naturalcycles/nodejs-lib';
4
+ import { boldWhite } from '@naturalcycles/nodejs-lib/colors';
5
5
  import { DatastoreType } from './datastore.model.js';
6
6
  import { DatastoreStreamReadable } from './DatastoreStreamReadable.js';
7
7
  import { dbQueryToDatastoreQuery } from './query.util.js';
@@ -1,5 +1,5 @@
1
1
  import type { CommonKeyValueDB, IncrementTuple, KeyValueDBTuple } from '@naturalcycles/db-lib';
2
- import type { ReadableTyped } from '@naturalcycles/nodejs-lib';
2
+ import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream';
3
3
  import { DatastoreDB } from './datastore.db.js';
4
4
  import type { DatastoreDBCfg } from './datastore.model.js';
5
5
  export interface DatastoreKeyValueDBCfg extends DatastoreDBCfg {
package/package.json CHANGED
@@ -1,18 +1,21 @@
1
1
  {
2
2
  "name": "@naturalcycles/datastore-lib",
3
3
  "type": "module",
4
- "version": "4.4.0",
4
+ "version": "4.5.0",
5
5
  "description": "Opinionated library to work with Google Datastore, implements CommonDB",
6
6
  "dependencies": {
7
7
  "@google-cloud/datastore": "^10",
8
8
  "@naturalcycles/db-lib": "^10",
9
9
  "@naturalcycles/js-lib": "^15",
10
- "@naturalcycles/nodejs-lib": "^14"
10
+ "@naturalcycles/nodejs-lib": "^15"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@naturalcycles/dev-lib": "*",
14
14
  "@types/node": "^24"
15
15
  },
16
+ "exports": {
17
+ ".": "./dist/index.js"
18
+ },
16
19
  "files": [
17
20
  "dist",
18
21
  "src",
@@ -3,7 +3,7 @@ import type { Query } from '@google-cloud/datastore'
3
3
  import type { RunQueryInfo, RunQueryOptions } from '@google-cloud/datastore/build/src/query.js'
4
4
  import type { CommonLogger, UnixTimestampMillis } from '@naturalcycles/js-lib'
5
5
  import { _ms, pRetry } from '@naturalcycles/js-lib'
6
- import type { ReadableTyped } from '@naturalcycles/nodejs-lib'
6
+ import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream'
7
7
  import type { DatastoreDBStreamOptions } from './datastore.model.js'
8
8
 
9
9
  export class DatastoreStreamReadable<T = any> extends Readable implements ReadableTyped<T> {
@@ -39,8 +39,8 @@ import {
39
39
  pTimeout,
40
40
  TimeoutError,
41
41
  } from '@naturalcycles/js-lib'
42
- import type { ReadableTyped } from '@naturalcycles/nodejs-lib'
43
- import { boldWhite } from '@naturalcycles/nodejs-lib'
42
+ import { boldWhite } from '@naturalcycles/nodejs-lib/colors'
43
+ import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream'
44
44
  import type {
45
45
  DatastoreDBCfg,
46
46
  DatastoreDBOptions,
@@ -2,7 +2,7 @@ import type { CommonKeyValueDB, IncrementTuple, KeyValueDBTuple } from '@natural
2
2
  import { commonKeyValueDBFullSupport, DBQuery } from '@naturalcycles/db-lib'
3
3
  import type { ObjectWithId } from '@naturalcycles/js-lib'
4
4
  import { AppError } from '@naturalcycles/js-lib'
5
- import type { ReadableTyped } from '@naturalcycles/nodejs-lib'
5
+ import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream'
6
6
  import { DatastoreDB } from './datastore.db.js'
7
7
  import type { DatastoreDBCfg } from './datastore.model.js'
8
8