fix(build): update build and test tooling configuration, migrate project config to .smartconfig.json, and align TypeScript typings
This commit is contained in:
@@ -174,8 +174,8 @@ export class SmartdataCollection<T> {
|
||||
/**
|
||||
* the collection that is used
|
||||
*/
|
||||
public mongoDbCollection: plugins.mongodb.Collection;
|
||||
public objectValidation: IDocValidationFunc<T> = null;
|
||||
public mongoDbCollection!: plugins.mongodb.Collection;
|
||||
public objectValidation: IDocValidationFunc<T> | null = null;
|
||||
public collectionName: string;
|
||||
public smartdataDb: SmartdataDb;
|
||||
public uniqueIndexes: string[] = [];
|
||||
@@ -330,7 +330,7 @@ export class SmartdataCollection<T> {
|
||||
);
|
||||
const smartdataWatcher = new SmartdataDbWatcher(
|
||||
changeStream,
|
||||
smartdataDbDocArg,
|
||||
smartdataDbDocArg!,
|
||||
{ bufferTimeMs },
|
||||
);
|
||||
await smartdataWatcher.readyDeferred.promise;
|
||||
@@ -353,7 +353,7 @@ export class SmartdataCollection<T> {
|
||||
this.createRegularIndexes(dbDocArg.regularIndexes);
|
||||
}
|
||||
|
||||
const saveableObject = await dbDocArg.createSavableObject();
|
||||
const saveableObject = await dbDocArg.createSavableObject() as any;
|
||||
const result = await this.mongoDbCollection.insertOne(saveableObject, { session: opts?.session });
|
||||
return result;
|
||||
}
|
||||
@@ -368,7 +368,7 @@ export class SmartdataCollection<T> {
|
||||
await this.init();
|
||||
await this.checkDoc(dbDocArg);
|
||||
const identifiableObject = await dbDocArg.createIdentifiableObject();
|
||||
const saveableObject = await dbDocArg.createSavableObject();
|
||||
const saveableObject = await dbDocArg.createSavableObject() as any;
|
||||
const updateableObject: any = {};
|
||||
for (const key of Object.keys(saveableObject)) {
|
||||
if (identifiableObject[key]) {
|
||||
|
||||
Reference in New Issue
Block a user