fix(build): tighten TypeScript build configuration and update tooling dependencies
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartclickhouse',
|
||||
version: '2.2.0',
|
||||
version: '2.2.1',
|
||||
description: 'A TypeScript-based ODM for ClickHouse databases with full CRUD support, fluent query builder, configurable engines, and automatic schema evolution.'
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import { ClickhouseQueryBuilder } from './smartclickhouse.classes.querybuilder.j
|
||||
import type {
|
||||
IClickhouseTableOptions,
|
||||
IColumnInfo,
|
||||
IEngineConfig,
|
||||
TClickhouseColumnType,
|
||||
} from './smartclickhouse.types.js';
|
||||
import { detectClickhouseType, escapeClickhouseValue } from './smartclickhouse.types.js';
|
||||
@@ -23,7 +24,7 @@ export class ClickhouseTable<T extends Record<string, any>> {
|
||||
// ---- INSTANCE ----
|
||||
|
||||
public db: SmartClickHouseDb;
|
||||
public options: IClickhouseTableOptions<T>;
|
||||
public options: IClickhouseTableOptions<T> & { database: string; engine: IEngineConfig };
|
||||
public columns: IColumnInfo[] = [];
|
||||
private healingDeferred: plugins.smartpromise.Deferred<any> | null = null;
|
||||
|
||||
@@ -230,7 +231,7 @@ export class ClickhouseTable<T extends Record<string, any>> {
|
||||
};
|
||||
|
||||
intake.subscribe(
|
||||
async (doc) => {
|
||||
async (doc: Partial<T>) => {
|
||||
buffer.push(doc);
|
||||
if (buffer.length >= batchSize) {
|
||||
if (flushTimer) clearTimeout(flushTimer);
|
||||
|
||||
@@ -21,9 +21,9 @@ export class ClickhouseHttpClient {
|
||||
});
|
||||
public computedProperties: {
|
||||
connectionUrl: string;
|
||||
parsedUrl: plugins.smarturl.Smarturl;
|
||||
parsedUrl: plugins.smarturl.Smarturl | null;
|
||||
} = {
|
||||
connectionUrl: null,
|
||||
connectionUrl: '',
|
||||
parsedUrl: null,
|
||||
};
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@ export class ClickhouseResultSet<T> {
|
||||
}
|
||||
|
||||
public first(): T | null {
|
||||
return this.rows.length > 0 ? this.rows[0] : null;
|
||||
return this.rows[0] ?? null;
|
||||
}
|
||||
|
||||
public last(): T | null {
|
||||
return this.rows.length > 0 ? this.rows[this.rows.length - 1] : null;
|
||||
return this.rows[this.rows.length - 1] ?? null;
|
||||
}
|
||||
|
||||
public isEmpty(): boolean {
|
||||
|
||||
@@ -19,7 +19,7 @@ export interface IClickhouseConstructorOptions {
|
||||
|
||||
export class SmartClickHouseDb {
|
||||
public options: IClickhouseConstructorOptions;
|
||||
public clickhouseHttpClient: ClickhouseHttpClient;
|
||||
public clickhouseHttpClient!: ClickhouseHttpClient;
|
||||
|
||||
constructor(optionsArg: IClickhouseConstructorOptions) {
|
||||
this.options = optionsArg;
|
||||
|
||||
Reference in New Issue
Block a user