fix(ci): Update CI workflows and build config; bump dependencies; code style and TS config fixes

This commit is contained in:
2025-11-29 09:48:31 +00:00
parent 36d7cb69a3
commit 0701207acd
20 changed files with 7858 additions and 5194 deletions

View File

@@ -1,8 +1,8 @@
import { Client as ElasticClient } from '@elastic/elasticsearch';
interface FastPushOptions {
deleteOldData?: boolean; // Clear the index
deleteIndex?: boolean; // Delete the entire index
deleteOldData?: boolean; // Clear the index
deleteIndex?: boolean; // Delete the entire index
}
export class FastPush {
@@ -15,7 +15,11 @@ export class FastPush {
});
}
async pushToIndex(indexName: string, docArray: any[], options?: FastPushOptions) {
async pushToIndex(
indexName: string,
docArray: any[],
options?: FastPushOptions,
) {
if (docArray.length === 0) return;
const indexExists = await this.client.indices.exists({ index: indexName });
@@ -26,11 +30,9 @@ export class FastPush {
} else if (options?.deleteOldData) {
await this.client.deleteByQuery({
index: indexName,
body: {
query: {
match_all: {}
}
}
query: {
match_all: {},
},
});
}
}
@@ -39,11 +41,8 @@ export class FastPush {
// Create index with mappings (for simplicity, we use dynamic mapping)
await this.client.indices.create({
index: indexName,
body: {
mappings: {
dynamic: "true"
// ... other specific mappings
},
mappings: {
dynamic: 'true',
},
});
}