diff --git a/plugins/incremental-ingestion-backend/migrations/20221116073152_init.js b/plugins/incremental-ingestion-backend/migrations/20221116073152_init.js index 7fab18b186..11357c50fd 100644 --- a/plugins/incremental-ingestion-backend/migrations/20221116073152_init.js +++ b/plugins/incremental-ingestion-backend/migrations/20221116073152_init.js @@ -79,7 +79,9 @@ exports.up = async function up(knex) { table .string('completion_ticket') .notNullable() - .comment('indicates whether the ticket is still open or stamped complete') + .comment( + 'indicates whether the ticket is still open or stamped complete', + ); }); await knex.schema.alterTable('ingestions', t => { @@ -122,10 +124,7 @@ exports.up = async function up(knex) { .defaultTo(0) .comment('what is the order of this mark'); - table - .timestamp('created_at') - .notNullable() - .defaultTo(knex.fn.now()); + table.timestamp('created_at').notNullable().defaultTo(knex.fn.now()); }); await knex.schema.alterTable('ingestion_marks', t => { diff --git a/plugins/incremental-ingestion-backend/src/database/tables.ts b/plugins/incremental-ingestion-backend/src/database/tables.ts index 73542abb6b..ee6cfe0ade 100644 --- a/plugins/incremental-ingestion-backend/src/database/tables.ts +++ b/plugins/incremental-ingestion-backend/src/database/tables.ts @@ -14,4 +14,5 @@ * limitations under the License. */ -export const DB_MIGRATIONS_TABLE = 'plugin_incremental_ingestion_backend__knex_migrations'; +export const DB_MIGRATIONS_TABLE = + 'plugin_incremental_ingestion_backend__knex_migrations'; diff --git a/plugins/incremental-ingestion-backend/src/engine/IncrementalIngestionEngine.ts b/plugins/incremental-ingestion-backend/src/engine/IncrementalIngestionEngine.ts index c370390fd6..9b94c04c72 100644 --- a/plugins/incremental-ingestion-backend/src/engine/IncrementalIngestionEngine.ts +++ b/plugins/incremental-ingestion-backend/src/engine/IncrementalIngestionEngine.ts @@ -291,12 +291,14 @@ export class IncrementalIngestionEngine implements IterationEngine { doComputeRemoved = true; } } - - if(doComputeRemoved) { - removed.push(...await this.manager.computeRemoved( - this.options.provider.getProviderName(), - id, - )); + + if (doComputeRemoved) { + removed.push( + ...(await this.manager.computeRemoved( + this.options.provider.getProviderName(), + id, + )), + ); } await this.options.connection.applyMutation({ diff --git a/plugins/incremental-ingestion-backend/src/service/IncrementalCatalogBuilder.ts b/plugins/incremental-ingestion-backend/src/service/IncrementalCatalogBuilder.ts index 587c1d5834..eea2c8c56d 100644 --- a/plugins/incremental-ingestion-backend/src/service/IncrementalCatalogBuilder.ts +++ b/plugins/incremental-ingestion-backend/src/service/IncrementalCatalogBuilder.ts @@ -30,8 +30,12 @@ class Deferred implements Promise { #resolve?: (value: T) => void; #reject?: (error: Error) => void; - get resolve() { return this.#resolve!; } - get reject() { return this.#reject!; } + get resolve() { + return this.#resolve!; + } + get reject() { + return this.#reject!; + } then: Promise['then']; catch: Promise['catch']; diff --git a/plugins/incremental-ingestion-backend/src/types.ts b/plugins/incremental-ingestion-backend/src/types.ts index 138b9ba0ee..90f9a20d46 100644 --- a/plugins/incremental-ingestion-backend/src/types.ts +++ b/plugins/incremental-ingestion-backend/src/types.ts @@ -89,16 +89,17 @@ export interface IncrementalEntityProvider { * * @public */ -export type EntityIteratorResult = -| { - done: false; - entities: DeferredEntity[]; - cursor: T; -} | { - done: true; - entities?: DeferredEntity[]; - cursor?: T; -} +export type EntityIteratorResult = + | { + done: false; + entities: DeferredEntity[]; + cursor: T; + } + | { + done: true; + entities?: DeferredEntity[]; + cursor?: T; + }; /** @public */ export interface IncrementalEntityProviderOptions { @@ -217,7 +218,7 @@ export interface IngestionUpsert { /** * This interface is for updating an existing ingestion record. - * + * * @public */ export interface IngestionRecordUpdate { @@ -227,7 +228,7 @@ export interface IngestionRecordUpdate { /** * The expected response from the `ingestion_marks` table. - * + * * @public */ export interface MarkRecord { @@ -240,7 +241,7 @@ export interface MarkRecord { /** * The expected response from the `ingestions` table. - * + * * @public */ export interface IngestionRecord extends IngestionUpsert { @@ -254,7 +255,7 @@ export interface IngestionRecord extends IngestionUpsert { /** * This interface supplies all the values for adding an ingestion mark. - * + * * @public */ export interface MarkRecordInsert {