@naturalcycles/backend-lib 9.31.0 → 9.32.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,9 +1,8 @@
1
- import type { CommonDB, CommonDBOptions, CommonDBSaveOptions, CommonDBStreamOptions, CommonDBSupport, DBQuery, RunQueryResult } from '@naturalcycles/db-lib';
1
+ import type { CommonDB, CommonDBOptions, CommonDBSaveOptions, CommonDBSupport, DBQuery, RunQueryResult } from '@naturalcycles/db-lib';
2
2
  import { BaseCommonDB } from '@naturalcycles/db-lib';
3
3
  import type { FetcherOptions } from '@naturalcycles/js-lib/http';
4
4
  import type { JsonSchemaRootObject } from '@naturalcycles/js-lib/json-schema';
5
5
  import type { ObjectWithId } from '@naturalcycles/js-lib/types';
6
- import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream';
7
6
  export interface HttpDBCfg extends FetcherOptions {
8
7
  baseUrl: string;
9
8
  }
@@ -26,5 +25,4 @@ export declare class HttpDB extends BaseCommonDB implements CommonDB {
26
25
  saveBatch<ROW extends ObjectWithId>(table: string, rows: ROW[], opt?: CommonDBSaveOptions<ROW>): Promise<void>;
27
26
  deleteByIds(table: string, ids: string[], opt?: CommonDBOptions): Promise<number>;
28
27
  deleteByQuery<ROW extends ObjectWithId>(query: DBQuery<ROW>, opt?: CommonDBOptions): Promise<number>;
29
- streamQuery<ROW extends ObjectWithId>(_q: DBQuery<ROW>, _opt?: CommonDBStreamOptions): ReadableTyped<ROW>;
30
28
  }
package/dist/db/httpDB.js CHANGED
@@ -1,4 +1,3 @@
1
- import { Readable } from 'node:stream';
2
1
  import { BaseCommonDB, commonDBFullSupport } from '@naturalcycles/db-lib';
3
2
  import { getFetcher } from '@naturalcycles/js-lib/http';
4
3
  /**
@@ -89,8 +88,4 @@ export class HttpDB extends BaseCommonDB {
89
88
  },
90
89
  });
91
90
  }
92
- streamQuery(_q, _opt) {
93
- console.warn(`streamQuery not implemented`);
94
- return Readable.from([]);
95
- }
96
91
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/backend-lib",
3
3
  "type": "module",
4
- "version": "9.31.0",
4
+ "version": "9.32.0",
5
5
  "peerDependencies": {
6
6
  "@sentry/node": "^10"
7
7
  },
@@ -29,7 +29,7 @@
29
29
  "@sentry/node": "^10",
30
30
  "@types/ejs": "^3",
31
31
  "fastify": "^5",
32
- "@naturalcycles/dev-lib": "18.4.2"
32
+ "@naturalcycles/dev-lib": "19.37.0"
33
33
  },
34
34
  "exports": {
35
35
  ".": "./dist/index.js",
package/src/db/httpDB.ts CHANGED
@@ -1,9 +1,7 @@
1
- import { Readable } from 'node:stream'
2
1
  import type {
3
2
  CommonDB,
4
3
  CommonDBOptions,
5
4
  CommonDBSaveOptions,
6
- CommonDBStreamOptions,
7
5
  CommonDBSupport,
8
6
  DBQuery,
9
7
  RunQueryResult,
@@ -13,7 +11,6 @@ import type { Fetcher, FetcherOptions } from '@naturalcycles/js-lib/http'
13
11
  import { getFetcher } from '@naturalcycles/js-lib/http'
14
12
  import type { JsonSchemaRootObject } from '@naturalcycles/js-lib/json-schema'
15
13
  import type { ObjectWithId } from '@naturalcycles/js-lib/types'
16
- import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream'
17
14
 
18
15
  export interface HttpDBCfg extends FetcherOptions {
19
16
  baseUrl: string
@@ -137,12 +134,4 @@ export class HttpDB extends BaseCommonDB implements CommonDB {
137
134
  },
138
135
  })
139
136
  }
140
-
141
- override streamQuery<ROW extends ObjectWithId>(
142
- _q: DBQuery<ROW>,
143
- _opt?: CommonDBStreamOptions,
144
- ): ReadableTyped<ROW> {
145
- console.warn(`streamQuery not implemented`)
146
- return Readable.from([])
147
- }
148
137
  }