From 54c714c6162480caa8336f6eb899497ffbc94869 Mon Sep 17 00:00:00 2001 From: Max Polsky Date: Mon, 16 Oct 2023 01:55:32 -0700 Subject: [PATCH] Managed adapter lint fixes (#462) --- .../src/sql_filter_transformer.spec.ts | 2 +- .../external-db-airtable/tests/drivers/mock_air_table.js | 2 +- .../tests/e2e-testkit/airtable_resources.ts | 2 +- .../src/sql_filter_transformer.spec.ts | 2 +- libs/external-db-bigquery/src/sql_filter_transformer.ts | 5 ++--- .../tests/drivers/db_operations_test_support.ts | 2 +- .../tests/drivers/sql_filter_transformer_test_support.ts | 2 +- .../src/readers/aws_authorization_config_reader.ts | 2 +- libs/external-db-config/src/readers/aws_config_reader.ts | 6 +++--- .../src/sql_filter_transformer.spec.ts | 2 +- .../tests/e2e-testkit/dynamodb_resources.ts | 2 +- libs/external-db-firestore/src/connection_provider.ts | 2 +- .../src/sql_filter_transformer.spec.ts | 2 +- .../tests/e2e-testkit/google_sheets_resources.ts | 4 ++-- .../tests/google_sheet_doc_class.js | 2 +- libs/external-db-google-sheets/tests/templates.js | 4 ++-- .../external-db-mongo/src/sql_filter_transformer.spec.ts | 2 +- .../tests/drivers/sql_filter_transformer_test_support.ts | 2 +- .../tests/e2e-testkit/mongo_resources.ts | 2 +- .../external-db-mssql/src/sql_filter_transformer.spec.ts | 2 +- libs/external-db-mssql/src/sql_filter_transformer.ts | 5 ++--- .../tests/drivers/sql_filter_transformer_test_support.ts | 2 +- .../tests/e2e-testkit/mssql_resources.ts | 2 +- .../external-db-mysql/src/sql_filter_transformer.spec.ts | 2 +- libs/external-db-mysql/src/sql_filter_transformer.ts | 5 ++--- .../tests/drivers/sql_filter_transformer_test_support.ts | 2 +- .../tests/e2e-testkit/mysql_resources.ts | 2 +- libs/external-db-postgres/src/connection_provider.ts | 4 ++-- .../external-db-postgres/src/postgres_schema_provider.ts | 2 +- .../src/sql_filter_transformer.spec.ts | 2 +- libs/external-db-postgres/src/sql_filter_transformer.ts | 9 ++++----- .../tests/drivers/db_operations_test_support.ts | 2 +- .../tests/drivers/sql_filter_transformer_test_support.ts | 2 +- .../tests/e2e-testkit/postgres_resources.ts | 2 +- .../src/auth-providers/azure_auth_provider.js | 2 +- .../src/auth-providers/gcp_auth_provider.js | 2 +- libs/external-db-spanner/src/spanner_data_provider.ts | 4 ++-- .../src/sql_filter_transformer.spec.ts | 2 +- libs/external-db-spanner/src/sql_filter_transformer.ts | 5 ++--- .../tests/e2e-testkit/spanner_resources.ts | 2 +- libs/external-db-testkit/src/lib/auth_test_support.ts | 2 +- .../src/converters/filter_transformer.ts | 2 +- libs/velo-external-db-core/src/health/app_info.ts | 2 +- .../test/drivers/auth_middleware_test_support.ts | 2 +- scripts/data-tools/lib/cli/display.js | 2 +- scripts/provision/lib/cli/display.js | 2 +- scripts/provision/lib/cli/user-input.js | 2 +- .../lib/cloud-providers/aws/aws_adapter_provision.js | 2 +- .../lib/cloud-providers/aws/aws_config_writer.js | 4 ++-- .../lib/cloud-providers/aws/aws_db_provision.js | 2 +- .../lib/cloud-providers/aws/aws_network_provision.js | 2 +- .../lib/cloud-providers/aws/db/mysql_support.js | 2 +- .../lib/cloud-providers/aws/db/postgres_support.js | 2 +- .../lib/cloud-providers/azure/azure_config_writer.js | 4 ++-- .../lib/cloud-providers/gcp/gcp_adapter_provision.js | 2 +- .../lib/cloud-providers/gcp/gcp_db_provision.js | 2 +- scripts/provision/lib/core/provision.js | 4 ++-- 57 files changed, 73 insertions(+), 78 deletions(-) diff --git a/libs/external-db-airtable/src/sql_filter_transformer.spec.ts b/libs/external-db-airtable/src/sql_filter_transformer.spec.ts index 34e73153b..967192a53 100644 --- a/libs/external-db-airtable/src/sql_filter_transformer.spec.ts +++ b/libs/external-db-airtable/src/sql_filter_transformer.spec.ts @@ -144,7 +144,7 @@ describe('Sql Parser', () => { const filter = { operator: eq, fieldName: ctx.fieldName, - value: value + value } expect( env.filterParser.parseFilter(filter) ).toEqual([{ diff --git a/libs/external-db-airtable/tests/drivers/mock_air_table.js b/libs/external-db-airtable/tests/drivers/mock_air_table.js index 26e7d098b..def26f3bc 100644 --- a/libs/external-db-airtable/tests/drivers/mock_air_table.js +++ b/libs/external-db-airtable/tests/drivers/mock_air_table.js @@ -55,7 +55,7 @@ const batchRecordUpdate = [ const fields = req.body.typecast ? { typecasted: true } : record.fields return { id: record.id, - fields: fields, + fields, } }), }) diff --git a/libs/external-db-airtable/tests/e2e-testkit/airtable_resources.ts b/libs/external-db-airtable/tests/e2e-testkit/airtable_resources.ts index 0710bc9dc..c8998ad26 100644 --- a/libs/external-db-airtable/tests/e2e-testkit/airtable_resources.ts +++ b/libs/external-db-airtable/tests/e2e-testkit/airtable_resources.ts @@ -10,7 +10,7 @@ export const connection = async() => { const { connection, schemaProvider, cleanup } = await init(connectionConfig(), { requestTimeout: 1000 }) - return { pool: connection, schemaProvider, cleanup: cleanup } + return { pool: connection, schemaProvider, cleanup } } export const cleanup = async() => { diff --git a/libs/external-db-bigquery/src/sql_filter_transformer.spec.ts b/libs/external-db-bigquery/src/sql_filter_transformer.spec.ts index d834268c0..cbb47e5ee 100644 --- a/libs/external-db-bigquery/src/sql_filter_transformer.spec.ts +++ b/libs/external-db-bigquery/src/sql_filter_transformer.spec.ts @@ -178,7 +178,7 @@ describe('Sql Parser', () => { const filter = { operator: eq, fieldName: ctx.fieldName, - value: value + value } expect( env.filterParser.parseFilter(filter) ).toEqual([{ diff --git a/libs/external-db-bigquery/src/sql_filter_transformer.ts b/libs/external-db-bigquery/src/sql_filter_transformer.ts index dac7b56ef..ffc3b22c2 100644 --- a/libs/external-db-bigquery/src/sql_filter_transformer.ts +++ b/libs/external-db-bigquery/src/sql_filter_transformer.ts @@ -57,7 +57,7 @@ export default class FilterParser { fieldsStatement: filterColumnsStr.join(', '), groupByColumns, havingFilter: filterExpr, - parameters: parameters, + parameters, } } @@ -74,8 +74,7 @@ export default class FilterParser { } extractFilterExprAndParams(havingFilter: any[]) { - return havingFilter.map(({ filterExpr, parameters }) => ({ filterExpr: filterExpr !== '' ? `HAVING ${filterExpr}` : '', - parameters: parameters })) + return havingFilter.map(({ filterExpr, parameters }) => ({ filterExpr: filterExpr !== '' ? `HAVING ${filterExpr}` : '', parameters })) .concat(EmptyFilter)[0] } diff --git a/libs/external-db-bigquery/tests/drivers/db_operations_test_support.ts b/libs/external-db-bigquery/tests/drivers/db_operations_test_support.ts index 91814b6ef..06c26471c 100644 --- a/libs/external-db-bigquery/tests/drivers/db_operations_test_support.ts +++ b/libs/external-db-bigquery/tests/drivers/db_operations_test_support.ts @@ -12,7 +12,7 @@ const dbOperationWithMisconfiguredDatabaseId = () => new DatabaseOperations(crea export const dbOperationWithValidDB = () => { const { connection, cleanup } = createPool({ databaseId: 'testDB' }) const dbOperations = new DatabaseOperations(connection) - return { dbOperations, cleanup: cleanup } + return { dbOperations, cleanup } } export const misconfiguredDbOperationOptions = () => ([ ['pool connection with wrong databaseId', () => dbOperationWithMisconfiguredDatabaseId()]]) diff --git a/libs/external-db-bigquery/tests/drivers/sql_filter_transformer_test_support.ts b/libs/external-db-bigquery/tests/drivers/sql_filter_transformer_test_support.ts index 93aa52351..3a93d827f 100644 --- a/libs/external-db-bigquery/tests/drivers/sql_filter_transformer_test_support.ts +++ b/libs/external-db-bigquery/tests/drivers/sql_filter_transformer_test_support.ts @@ -42,7 +42,7 @@ export const givenAggregateQueryWith = (having: any, numericColumns: { name: any when(filterParser.parseAggregation).calledWith({ postFilteringStep: filter, processingStep: having }) .mockReturnValue({ fieldsStatement: `${groupByColumns.map( escapeIdentifier ).join(', ')}, MAX(${escapeIdentifier(numericColumns[0].name)}) AS ${escapeIdentifier(columnAliases[0])}, SUM(${escapeIdentifier(numericColumns[1].name)}) AS ${escapeIdentifier(columnAliases[1])}`, - groupByColumns: groupByColumns, + groupByColumns, offset: offest, havingFilter: '', parameters: [], diff --git a/libs/external-db-config/src/readers/aws_authorization_config_reader.ts b/libs/external-db-config/src/readers/aws_authorization_config_reader.ts index 4785715d0..7a0fd9a0d 100644 --- a/libs/external-db-config/src/readers/aws_authorization_config_reader.ts +++ b/libs/external-db-config/src/readers/aws_authorization_config_reader.ts @@ -32,6 +32,6 @@ export default class AwsAuthorizationConfigReader implements IConfigReader { const { externalConfig, secretMangerError }: {[key:string]: any} = await this.readExternalConfig() const { PERMISSIONS }: { PERMISSIONS: any } = { ...process.env, ...externalConfig } const config = { PERMISSIONS } - return { config, secretMangerError: secretMangerError } + return { config, secretMangerError } } } diff --git a/libs/external-db-config/src/readers/aws_config_reader.ts b/libs/external-db-config/src/readers/aws_config_reader.ts index 413eacc53..c3af0de45 100644 --- a/libs/external-db-config/src/readers/aws_config_reader.ts +++ b/libs/external-db-config/src/readers/aws_config_reader.ts @@ -14,7 +14,7 @@ export class AwsConfigReader implements IConfigReader { async readConfig() { const { config } = await this.readExternalAndLocalConfig() const { host, username, password, DB, EXTERNAL_DATABASE_ID, ALLOWED_METASITES, DB_PORT } = config - return { host: host, user: username, password: password, db: DB, externalDatabaseId: EXTERNAL_DATABASE_ID, allowedMetasites: ALLOWED_METASITES, port: DB_PORT } + return { host, user: username, password, db: DB, externalDatabaseId: EXTERNAL_DATABASE_ID, allowedMetasites: ALLOWED_METASITES, port: DB_PORT } } async readExternalConfig() { @@ -56,7 +56,7 @@ export class AwsDynamoConfigReader implements IConfigReader { const { EXTERNAL_DATABASE_ID = undefined, ALLOWED_METASITES = undefined } = { ...process.env, ...externalConfig } const config = { EXTERNAL_DATABASE_ID, ALLOWED_METASITES } - return { config, secretMangerError: secretMangerError } + return { config, secretMangerError } } async readExternalConfig() { @@ -93,7 +93,7 @@ export class AwsMongoConfigReader implements IConfigReader { const { EXTERNAL_DATABASE_ID, ALLOWED_METASITES, URI }: {EXTERNAL_DATABASE_ID: string, ALLOWED_METASITES: string, URI: string} = { ...process.env, ...externalConfig } const config = { EXTERNAL_DATABASE_ID, ALLOWED_METASITES, URI } - return { config, secretMangerError: secretMangerError } + return { config, secretMangerError } } async readConfig() { diff --git a/libs/external-db-dynamodb/src/sql_filter_transformer.spec.ts b/libs/external-db-dynamodb/src/sql_filter_transformer.spec.ts index 87a495e13..08d99213e 100644 --- a/libs/external-db-dynamodb/src/sql_filter_transformer.spec.ts +++ b/libs/external-db-dynamodb/src/sql_filter_transformer.spec.ts @@ -154,7 +154,7 @@ describe('Sql Parser', () => { const filter = { operator: eq, fieldName: ctx.fieldName, - value: value + value } expect( env.filterParser.parseFilter(filter) ).toEqual([{ diff --git a/libs/external-db-dynamodb/tests/e2e-testkit/dynamodb_resources.ts b/libs/external-db-dynamodb/tests/e2e-testkit/dynamodb_resources.ts index 42e563c15..a883b42fa 100644 --- a/libs/external-db-dynamodb/tests/e2e-testkit/dynamodb_resources.ts +++ b/libs/external-db-dynamodb/tests/e2e-testkit/dynamodb_resources.ts @@ -6,7 +6,7 @@ export * as capabilities from '../../src/dynamo_capabilities' export const connection = async() => { const { connection, schemaProvider, cleanup } = init(connectionConfig(), accessOptions()) - return { pool: connection, schemaProvider, cleanup: cleanup } + return { pool: connection, schemaProvider, cleanup } } export const cleanup = async() => { diff --git a/libs/external-db-firestore/src/connection_provider.ts b/libs/external-db-firestore/src/connection_provider.ts index 70e11e404..73d69a191 100644 --- a/libs/external-db-firestore/src/connection_provider.ts +++ b/libs/external-db-firestore/src/connection_provider.ts @@ -8,7 +8,7 @@ import { DbProviders } from '@wix-velo/velo-external-db-types' export default ({ projectId }: firestoreConfig): DbProviders => { const firestore = new Firestore({ - projectId: projectId, + projectId, }) const databaseOperations = new DatabaseOperations(firestore) diff --git a/libs/external-db-firestore/src/sql_filter_transformer.spec.ts b/libs/external-db-firestore/src/sql_filter_transformer.spec.ts index 396c460d4..11ba7427c 100644 --- a/libs/external-db-firestore/src/sql_filter_transformer.spec.ts +++ b/libs/external-db-firestore/src/sql_filter_transformer.spec.ts @@ -154,7 +154,7 @@ describe('Fire Store Parser', () => { const filter = { operator: eq, fieldName: ctx.fieldName, - value: value + value } expect( env.filterParser.parseFilter(filter) ).toEqual([{ diff --git a/libs/external-db-google-sheets/tests/e2e-testkit/google_sheets_resources.ts b/libs/external-db-google-sheets/tests/e2e-testkit/google_sheets_resources.ts index eed65f2e5..c4d2ce027 100644 --- a/libs/external-db-google-sheets/tests/e2e-testkit/google_sheets_resources.ts +++ b/libs/external-db-google-sheets/tests/e2e-testkit/google_sheets_resources.ts @@ -17,7 +17,7 @@ export const connection = async() => { apiPrivateKey: process.env['API_PRIVATE_KEY'] } const { connection, schemaProvider, cleanup } = await init(googleSheetsConfig) - return { pool: connection, schemaProvider, cleanup: cleanup } + return { pool: connection, schemaProvider, cleanup } } export const cleanup = async() => { @@ -37,7 +37,7 @@ export const setActive = () => { export const enviormentVariables = { TYPE: 'google-sheet', - SHEET_ID: SHEET_ID + SHEET_ID } export const name = 'google-sheets' diff --git a/libs/external-db-google-sheets/tests/google_sheet_doc_class.js b/libs/external-db-google-sheets/tests/google_sheet_doc_class.js index 6451bedb4..3f40992ee 100644 --- a/libs/external-db-google-sheets/tests/google_sheet_doc_class.js +++ b/libs/external-db-google-sheets/tests/google_sheet_doc_class.js @@ -5,7 +5,7 @@ class GoogleSpreadsheetDoc { constructor(spreadsheetId, title) { this.spreadsheetId = spreadsheetId this.properties = { - title: title, + title, } this.sheets = [] this.namedRanges = [] diff --git a/libs/external-db-google-sheets/tests/templates.js b/libs/external-db-google-sheets/tests/templates.js index 412c69c00..19339769d 100644 --- a/libs/external-db-google-sheets/tests/templates.js +++ b/libs/external-db-google-sheets/tests/templates.js @@ -11,7 +11,7 @@ const batchGetValuesResponse = (spreadsheetId, sheet, range, majorDimension, val { range: `${sheet}!${range}`, majorDimension: `${majorDimension}`, - values: values + values } ] }) @@ -21,7 +21,7 @@ const spreadsheet = (spreadsheetId, title, sheets = []) => ({ properties: { title: `${title}` }, - sheets: sheets + sheets }) const updateValuesResponse = (spreadsheetId, sheet, range, updatedRows, updatedColumns, updatedCells) => ({ diff --git a/libs/external-db-mongo/src/sql_filter_transformer.spec.ts b/libs/external-db-mongo/src/sql_filter_transformer.spec.ts index e90566334..2d9bd74ee 100644 --- a/libs/external-db-mongo/src/sql_filter_transformer.spec.ts +++ b/libs/external-db-mongo/src/sql_filter_transformer.spec.ts @@ -141,7 +141,7 @@ describe('Sql Parser', () => { const filter = { operator: eq, fieldName: ctx.fieldName, - value: value + value } expect(env.filterParser.parseFilter(filter)).toEqual([{ diff --git a/libs/external-db-mongo/tests/drivers/sql_filter_transformer_test_support.ts b/libs/external-db-mongo/tests/drivers/sql_filter_transformer_test_support.ts index 0a40fdb48..be7678b09 100644 --- a/libs/external-db-mongo/tests/drivers/sql_filter_transformer_test_support.ts +++ b/libs/external-db-mongo/tests/drivers/sql_filter_transformer_test_support.ts @@ -51,7 +51,7 @@ export const givenAggregateQueryWith = (having: any, numericColumns: any[], colu [columnAliases[0]]: { $max: `$${c[0]}` }, [columnAliases[1]]: { $sum: `$${c[1]}` } } }, - groupByColumns: groupByColumns, + groupByColumns, havingFilter: { $match: {} }, }) } diff --git a/libs/external-db-mongo/tests/e2e-testkit/mongo_resources.ts b/libs/external-db-mongo/tests/e2e-testkit/mongo_resources.ts index f1d17243e..f46a69e4e 100644 --- a/libs/external-db-mongo/tests/e2e-testkit/mongo_resources.ts +++ b/libs/external-db-mongo/tests/e2e-testkit/mongo_resources.ts @@ -7,7 +7,7 @@ export * as capabilities from '../../src/mongo_capabilities' export const connection = async() => { const { connection, schemaProvider, cleanup } = await init({ connectionUri: 'mongodb://root:pass@localhost/testdb' }) - return { pool: connection, schemaProvider, cleanup: cleanup } + return { pool: connection, schemaProvider, cleanup } } export const cleanup = async() => { diff --git a/libs/external-db-mssql/src/sql_filter_transformer.spec.ts b/libs/external-db-mssql/src/sql_filter_transformer.spec.ts index a0a26406f..95f7734c6 100644 --- a/libs/external-db-mssql/src/sql_filter_transformer.spec.ts +++ b/libs/external-db-mssql/src/sql_filter_transformer.spec.ts @@ -178,7 +178,7 @@ describe('Sql Parser', () => { const filter = { operator: eq as AdapterOperator, fieldName: ctx.fieldName, - value: value + value } expect( env.filterParser.parseFilter(filter) ).toEqual([{ diff --git a/libs/external-db-mssql/src/sql_filter_transformer.ts b/libs/external-db-mssql/src/sql_filter_transformer.ts index 6bc59d6a7..2bc5f5876 100644 --- a/libs/external-db-mssql/src/sql_filter_transformer.ts +++ b/libs/external-db-mssql/src/sql_filter_transformer.ts @@ -63,7 +63,7 @@ export default class FilterParser { fieldsStatement: filterColumnsStr.join(', '), groupByColumns, havingFilter: filterExpr, - parameters: parameters, + parameters, } } @@ -81,8 +81,7 @@ export default class FilterParser { } extractFilterExprAndParams(havingFilter: { filterExpr: any; parameters: any }[]) { - return havingFilter.map(({ filterExpr, parameters }) => ({ filterExpr: filterExpr !== '' ? `HAVING ${filterExpr}` : '', - parameters: parameters })) + return havingFilter.map(({ filterExpr, parameters }) => ({ filterExpr: filterExpr !== '' ? `HAVING ${filterExpr}` : '', parameters })) .concat({ filterExpr: '', parameters: {} })[0] } diff --git a/libs/external-db-mssql/tests/drivers/sql_filter_transformer_test_support.ts b/libs/external-db-mssql/tests/drivers/sql_filter_transformer_test_support.ts index 0ed6e378e..83df695bb 100644 --- a/libs/external-db-mssql/tests/drivers/sql_filter_transformer_test_support.ts +++ b/libs/external-db-mssql/tests/drivers/sql_filter_transformer_test_support.ts @@ -41,7 +41,7 @@ export const givenAggregateQueryWith = (having: any, numericColumns: any[], colu when(filterParser.parseAggregation).calledWith({ postFilteringStep: filter, processingStep: having }) .mockReturnValue({ fieldsStatement: `${groupByColumns.map( escapeId )}, MAX(${escapeId(c[0])}) AS ${escapeId(columnAliases[0])}, SUM(${escapeId(c[1])}) AS ${escapeId(columnAliases[1])}`, - groupByColumns: groupByColumns, + groupByColumns, havingFilter: '', parameters: {}, }) diff --git a/libs/external-db-mssql/tests/e2e-testkit/mssql_resources.ts b/libs/external-db-mssql/tests/e2e-testkit/mssql_resources.ts index fa6e51933..86fa41eb1 100644 --- a/libs/external-db-mssql/tests/e2e-testkit/mssql_resources.ts +++ b/libs/external-db-mssql/tests/e2e-testkit/mssql_resources.ts @@ -23,7 +23,7 @@ const extraOptions = { export const connection = async() => { const { connection, schemaProvider, cleanup } = await init(testEnvConfig, extraOptions) - return { pool: connection, schemaProvider, cleanup: cleanup } + return { pool: connection, schemaProvider, cleanup } } export const cleanup = async() => { diff --git a/libs/external-db-mysql/src/sql_filter_transformer.spec.ts b/libs/external-db-mysql/src/sql_filter_transformer.spec.ts index 976fe170a..bbb88794e 100644 --- a/libs/external-db-mysql/src/sql_filter_transformer.spec.ts +++ b/libs/external-db-mysql/src/sql_filter_transformer.spec.ts @@ -165,7 +165,7 @@ describe('Sql Parser', () => { const filter = { operator: eq, fieldName: ctx.fieldName, - value: value + value } expect( env.filterParser.parseFilter(filter) ).toEqual([{ diff --git a/libs/external-db-mysql/src/sql_filter_transformer.ts b/libs/external-db-mysql/src/sql_filter_transformer.ts index 3c6e61564..96bc33bec 100644 --- a/libs/external-db-mysql/src/sql_filter_transformer.ts +++ b/libs/external-db-mysql/src/sql_filter_transformer.ts @@ -213,7 +213,7 @@ export default class FilterParser implements IMySqlFilterParser { fieldsStatement: filterColumnsStr.join(', '), groupByColumns, havingFilter: filterExpr, - parameters: parameters, + parameters, } } @@ -225,8 +225,7 @@ export default class FilterParser implements IMySqlFilterParser { } extractFilterExprAndParams(havingFilter: { filterExpr: any; parameters: any }[]) { - return havingFilter.map(({ filterExpr, parameters }) => ({ filterExpr: filterExpr !== '' ? `HAVING ${filterExpr}` : '', - parameters: parameters })) + return havingFilter.map(({ filterExpr, parameters }) => ({ filterExpr: filterExpr !== '' ? `HAVING ${filterExpr}` : '', parameters })) .concat(EmptyFilter)[0] } diff --git a/libs/external-db-mysql/tests/drivers/sql_filter_transformer_test_support.ts b/libs/external-db-mysql/tests/drivers/sql_filter_transformer_test_support.ts index 7894ab008..6e52fa583 100644 --- a/libs/external-db-mysql/tests/drivers/sql_filter_transformer_test_support.ts +++ b/libs/external-db-mysql/tests/drivers/sql_filter_transformer_test_support.ts @@ -41,7 +41,7 @@ export const givenAggregateQueryWith = (having: any, numericColumns: any[], colu when(filterParser.parseAggregation).calledWith({ postFilteringStep: filter, processingStep: having }) .mockReturnValue({ fieldsStatement: `${groupByColumns.map( escapeId )}, MAX(${escapeId(c[0])}) AS ${escapeId(columnAliases[0])}, SUM(${escapeId(c[1])}) AS ${escapeId(columnAliases[1])}`, - groupByColumns: groupByColumns, + groupByColumns, havingFilter: '', parameters: [], }) diff --git a/libs/external-db-mysql/tests/e2e-testkit/mysql_resources.ts b/libs/external-db-mysql/tests/e2e-testkit/mysql_resources.ts index 4bc7d4b2e..8e8ef5ef0 100644 --- a/libs/external-db-mysql/tests/e2e-testkit/mysql_resources.ts +++ b/libs/external-db-mysql/tests/e2e-testkit/mysql_resources.ts @@ -7,7 +7,7 @@ export * as capabilities from '../../src/mysql_capabilities' export const connection = () => { const { connection, schemaProvider, cleanup } = init({ host: 'localhost', user: 'test-user', password: 'password', db: 'test-db' }, { connectionLimit: 1, queueLimit: 0 }) - return { pool: connection, schemaProvider, cleanup: cleanup } + return { pool: connection, schemaProvider, cleanup } } export const cleanup = async() => { diff --git a/libs/external-db-postgres/src/connection_provider.ts b/libs/external-db-postgres/src/connection_provider.ts index 211b5ac84..2402ddc21 100644 --- a/libs/external-db-postgres/src/connection_provider.ts +++ b/libs/external-db-postgres/src/connection_provider.ts @@ -33,8 +33,8 @@ export default (cfg: PostgresConfig, _poolOptions: postgresPoolOptions) => { const schemaProvider = new SchemaProvider(pool) return { - dataProvider: dataProvider, - schemaProvider: schemaProvider, + dataProvider, + schemaProvider, databaseOperations, connection: pool, cleanup: async() => pool.end(() => {}) diff --git a/libs/external-db-postgres/src/postgres_schema_provider.ts b/libs/external-db-postgres/src/postgres_schema_provider.ts index 1fbfea418..2509aabe1 100644 --- a/libs/external-db-postgres/src/postgres_schema_provider.ts +++ b/libs/external-db-postgres/src/postgres_schema_provider.ts @@ -99,7 +99,7 @@ export default class SchemaProvider implements ISchemaProvider { const fields = res.rows.map(r => ({ field: r.field, type: r.type })).map(r => this.appendAdditionalRowDetails(r)) return { id: collectionName, - fields: fields, + fields, capabilities: this.collectionCapabilities(res.rows.map(r => r.field)) } } diff --git a/libs/external-db-postgres/src/sql_filter_transformer.spec.ts b/libs/external-db-postgres/src/sql_filter_transformer.spec.ts index 2a6486d26..8c4efbe30 100644 --- a/libs/external-db-postgres/src/sql_filter_transformer.spec.ts +++ b/libs/external-db-postgres/src/sql_filter_transformer.spec.ts @@ -177,7 +177,7 @@ describe('Sql Parser', () => { const filter = { operator: eq, fieldName: ctx.fieldName, - value: value + value } expect( env.filterParser.parseFilter(filter, ctx.offset) ).toEqual([{ diff --git a/libs/external-db-postgres/src/sql_filter_transformer.ts b/libs/external-db-postgres/src/sql_filter_transformer.ts index 36a42319f..62f8c7bb8 100644 --- a/libs/external-db-postgres/src/sql_filter_transformer.ts +++ b/libs/external-db-postgres/src/sql_filter_transformer.ts @@ -62,7 +62,7 @@ export default class FilterParser { fieldsStatement: filterColumnsStr.join(', '), groupByColumns, havingFilter: filterExpr, - parameters: parameters, + parameters, offset: offsetAfterAggregation } } @@ -80,8 +80,7 @@ export default class FilterParser { } extractFilterExprAndParams(havingFilter: any[], offset: number) { - return havingFilter.map(({ filterExpr, parameters, offset }) => ({ filterExpr: filterExpr !== '' ? `HAVING ${filterExpr}` : '', - parameters: parameters, offset })) + return havingFilter.map(({ filterExpr, parameters, offset }) => ({ filterExpr: filterExpr !== '' ? `HAVING ${filterExpr}` : '', parameters, offset })) .concat({ ...EmptyFilter, offset: offset ?? 1 })[0] } @@ -102,7 +101,7 @@ export default class FilterParser { filter: [ ...o.filter, ...res], offset: res.length === 1 ? res[0].offset : o.offset } - }, { filter: [], offset: offset }) + }, { filter: [], offset }) const op = operator === and ? ' AND ' : ' OR ' return [{ @@ -209,7 +208,7 @@ export default class FilterParser { } else if ((operator === eq || operator === ne) && isNull(value)) { return { sql: '', - offset: offset + offset } } diff --git a/libs/external-db-postgres/tests/drivers/db_operations_test_support.ts b/libs/external-db-postgres/tests/drivers/db_operations_test_support.ts index a40c55e97..2c69c1ea0 100644 --- a/libs/external-db-postgres/tests/drivers/db_operations_test_support.ts +++ b/libs/external-db-postgres/tests/drivers/db_operations_test_support.ts @@ -21,7 +21,7 @@ const dbOperationWithMisconfiguredHost = () => new DatabaseOperations(createPool export const dbOperationWithValidDB = () => { const { connection, cleanup } = createPool({ } ) const dbOperations = new DatabaseOperations(connection) - return { dbOperations, cleanup: cleanup } + return { dbOperations, cleanup } } export const misconfiguredDbOperationOptions = () => ([ ['pool connection with wrong password', () => dbOperationWithMisconfiguredPassword()], diff --git a/libs/external-db-postgres/tests/drivers/sql_filter_transformer_test_support.ts b/libs/external-db-postgres/tests/drivers/sql_filter_transformer_test_support.ts index 4d8ed2d6c..6a836b971 100644 --- a/libs/external-db-postgres/tests/drivers/sql_filter_transformer_test_support.ts +++ b/libs/external-db-postgres/tests/drivers/sql_filter_transformer_test_support.ts @@ -40,7 +40,7 @@ export const givenAggregateQueryWith = (having: any, numericColumns: { name: str when(filterParser.parseAggregation).calledWith({ postFilteringStep: filter, processingStep: having }, offest) .mockReturnValue({ fieldsStatement: `${groupByColumns.map( escapeIdentifier ).join(', ')}, MAX(${escapeIdentifier(numericColumns[0].name)}) AS ${escapeIdentifier(columnAliases[0])}, SUM(${escapeIdentifier(numericColumns[1].name)}) AS ${escapeIdentifier(columnAliases[1])}`, - groupByColumns: groupByColumns, + groupByColumns, offset: offest, havingFilter: '', parameters: [], diff --git a/libs/external-db-postgres/tests/e2e-testkit/postgres_resources.ts b/libs/external-db-postgres/tests/e2e-testkit/postgres_resources.ts index bb85417e3..75e8c2757 100644 --- a/libs/external-db-postgres/tests/e2e-testkit/postgres_resources.ts +++ b/libs/external-db-postgres/tests/e2e-testkit/postgres_resources.ts @@ -5,7 +5,7 @@ export * as capabilities from '../../src/postgres_capabilities' export const connection = () => { const { connection, schemaProvider, cleanup } = init({ host: 'localhost', user: 'test-user', password: 'password', db: 'test-db' }, { max: 1 }) - return { pool: connection, schemaProvider, cleanup: cleanup } + return { pool: connection, schemaProvider, cleanup } } export const cleanup = async() => { diff --git a/libs/external-db-security/src/auth-providers/azure_auth_provider.js b/libs/external-db-security/src/auth-providers/azure_auth_provider.js index ae74e271d..24b343c12 100644 --- a/libs/external-db-security/src/auth-providers/azure_auth_provider.js +++ b/libs/external-db-security/src/auth-providers/azure_auth_provider.js @@ -4,7 +4,7 @@ class AzureAuthProvider { constructor({ clientId, clientSecret, callbackUrl }) { this.options = { clientID: clientId, - clientSecret: clientSecret, + clientSecret, callbackURL: callbackUrl, } diff --git a/libs/external-db-security/src/auth-providers/gcp_auth_provider.js b/libs/external-db-security/src/auth-providers/gcp_auth_provider.js index 90a80226d..53ef4b0cc 100644 --- a/libs/external-db-security/src/auth-providers/gcp_auth_provider.js +++ b/libs/external-db-security/src/auth-providers/gcp_auth_provider.js @@ -4,7 +4,7 @@ class GcpAuthProvider { constructor({ clientId, clientSecret, callbackUrl }) { this.options = { clientID: clientId, - clientSecret: clientSecret, + clientSecret, callbackURL: callbackUrl, scope: ['email', 'profile'] } diff --git a/libs/external-db-spanner/src/spanner_data_provider.ts b/libs/external-db-spanner/src/spanner_data_provider.ts index 712218afa..7d5b1d878 100644 --- a/libs/external-db-spanner/src/spanner_data_provider.ts +++ b/libs/external-db-spanner/src/spanner_data_provider.ts @@ -22,8 +22,8 @@ export default class DataProvider implements IDataProvider { const query = { sql: `SELECT ${projectionExpr} FROM ${escapeId(collectionName)} ${filterExpr} ${sortExpr} LIMIT @limit OFFSET @skip`, params: { - skip: skip, - limit: limit, + skip, + limit, ...parameters }, } diff --git a/libs/external-db-spanner/src/sql_filter_transformer.spec.ts b/libs/external-db-spanner/src/sql_filter_transformer.spec.ts index 0754a615a..48776705c 100644 --- a/libs/external-db-spanner/src/sql_filter_transformer.spec.ts +++ b/libs/external-db-spanner/src/sql_filter_transformer.spec.ts @@ -197,7 +197,7 @@ describe('Sql Parser', () => { const filter = { operator: eq, fieldName: ctx.fieldName, - value: value + value } expect( env.filterParser.parseFilter(filter) ).toEqual([{ diff --git a/libs/external-db-spanner/src/sql_filter_transformer.ts b/libs/external-db-spanner/src/sql_filter_transformer.ts index 8c3e63e28..ce7309193 100644 --- a/libs/external-db-spanner/src/sql_filter_transformer.ts +++ b/libs/external-db-spanner/src/sql_filter_transformer.ts @@ -64,7 +64,7 @@ export default class FilterParser { fieldsStatement: filterColumnsStr.join(', '), groupByColumns, havingFilter: filterExpr, - parameters: parameters, + parameters, } } @@ -82,8 +82,7 @@ export default class FilterParser { extractFilterExprAndParams(havingFilter: SpannerParsedFilter[]) { // @ts-ignore - concat - return havingFilter.map(({ filterExpr, parameters }: SpannerParsedFilter) => ({ filterExpr: filterExpr !== '' ? `HAVING ${filterExpr}` : '', - parameters: parameters })) + return havingFilter.map(({ filterExpr, parameters }: SpannerParsedFilter) => ({ filterExpr: filterExpr !== '' ? `HAVING ${filterExpr}` : '', parameters })) .concat({ filterExpr: '', parameters: {} })[0] } diff --git a/libs/external-db-spanner/tests/e2e-testkit/spanner_resources.ts b/libs/external-db-spanner/tests/e2e-testkit/spanner_resources.ts index f51399603..7653ba80c 100644 --- a/libs/external-db-spanner/tests/e2e-testkit/spanner_resources.ts +++ b/libs/external-db-spanner/tests/e2e-testkit/spanner_resources.ts @@ -8,7 +8,7 @@ const setEmulatorOn = () => process.env['SPANNER_EMULATOR_HOST'] = 'localhost:90 export const connection = () => { const { connection, schemaProvider, cleanup } = init({ projectId: 'test-project', instanceId: 'test-instance', databaseId: 'test-database' }) - return { pool: connection, schemaProvider, cleanup: cleanup } + return { pool: connection, schemaProvider, cleanup } } export const cleanup = async() => { diff --git a/libs/external-db-testkit/src/lib/auth_test_support.ts b/libs/external-db-testkit/src/lib/auth_test_support.ts index 0f350bcbf..071dab4f3 100644 --- a/libs/external-db-testkit/src/lib/auth_test_support.ts +++ b/libs/external-db-testkit/src/lib/auth_test_support.ts @@ -18,7 +18,7 @@ export const authInit = () => { const appendRoleToRequest = (role: string) => (dataRaw: string) => { const data = JSON.parse( dataRaw ) - return JSON.stringify({ ...data, ...{ requestContext: { ...data.requestContext, role: role } } }) + return JSON.stringify({ ...data, ...{ requestContext: { ...data.requestContext, role } } }) } const appendJWTHeaderToRequest = (dataRaw: string, headers: AxiosRequestHeaders) => { diff --git a/libs/velo-external-db-core/src/converters/filter_transformer.ts b/libs/velo-external-db-core/src/converters/filter_transformer.ts index 159d382d7..e49dcb594 100644 --- a/libs/velo-external-db-core/src/converters/filter_transformer.ts +++ b/libs/velo-external-db-core/src/converters/filter_transformer.ts @@ -26,7 +26,7 @@ export default class FilterTransformer implements IFilterTransformer { const values = filter[wixOperator] const res = values.map(this.transform.bind(this)) return { - operator: operator, + operator, value: res } } diff --git a/libs/velo-external-db-core/src/health/app_info.ts b/libs/velo-external-db-core/src/health/app_info.ts index eabcf6eb3..b90884642 100644 --- a/libs/velo-external-db-core/src/health/app_info.ts +++ b/libs/velo-external-db-core/src/health/app_info.ts @@ -17,7 +17,7 @@ export const appInfoFor = async(operationService: AnyFixMe, configReaderClient: return { - configReaderStatus: configReaderStatus, + configReaderStatus, authorizationConfigStatus, config, dbConnectionStatus: connectionStatus.error || connectionStatus.status, diff --git a/libs/velo-external-db-core/test/drivers/auth_middleware_test_support.ts b/libs/velo-external-db-core/test/drivers/auth_middleware_test_support.ts index c84f3a225..29cd17892 100644 --- a/libs/velo-external-db-core/test/drivers/auth_middleware_test_support.ts +++ b/libs/velo-external-db-core/test/drivers/auth_middleware_test_support.ts @@ -15,7 +15,7 @@ export const requestBodyWith = (role?: string | undefined, path?: string | undef } ) export const signedToken = (payload: Record, keyid?: string, expiration= '10000ms') => { - const options = keyid ? { algorithm: 'ES256', expiresIn: expiration, keyid: keyid } : { algorithm: 'ES256', expiresIn: expiration } + const options = keyid ? { algorithm: 'ES256', expiresIn: expiration, keyid } : { algorithm: 'ES256', expiresIn: expiration } return jwt.sign(payload, authConfig.authPrivateKey, options as SignOptions) } diff --git a/scripts/data-tools/lib/cli/display.js b/scripts/data-tools/lib/cli/display.js index 5678bc92f..648a92177 100644 --- a/scripts/data-tools/lib/cli/display.js +++ b/scripts/data-tools/lib/cli/display.js @@ -7,7 +7,7 @@ const startSpinnerWith = async(msg, f, completeMsg) => { const spinner = new Spinner({ text: `\t\t %s ${msg}`, stream: process.stderr, - onTick: function(msg) { + onTick(msg) { this.clearLine(this.stream) this.stream.write(msg) } diff --git a/scripts/provision/lib/cli/display.js b/scripts/provision/lib/cli/display.js index 8ef884ebe..cbbd230cf 100644 --- a/scripts/provision/lib/cli/display.js +++ b/scripts/provision/lib/cli/display.js @@ -6,7 +6,7 @@ const startSpinnerWith = async(msg, f, completeMsg) => { const spinner = new Spinner({ text: `\t\t %s ${msg}`, stream: process.stderr, - onTick: function(msg) { + onTick(msg) { this.clearLine(this.stream) this.stream.write(msg) } diff --git a/scripts/provision/lib/cli/user-input.js b/scripts/provision/lib/cli/user-input.js index 1ef4e6b6c..a20d347d0 100644 --- a/scripts/provision/lib/cli/user-input.js +++ b/scripts/provision/lib/cli/user-input.js @@ -79,7 +79,7 @@ const askForUserInput = async() => { const credentials = await providerFor(answers.vendor).credentials() const { region } = await providerFor(answers.vendor).region(credentials) - return { ...answers, credentials: credentials, region: region } + return { ...answers, credentials, region } }) } diff --git a/scripts/provision/lib/cloud-providers/aws/aws_adapter_provision.js b/scripts/provision/lib/cloud-providers/aws/aws_adapter_provision.js index 07ad37e0f..f5c28a838 100644 --- a/scripts/provision/lib/cloud-providers/aws/aws_adapter_provision.js +++ b/scripts/provision/lib/cloud-providers/aws/aws_adapter_provision.js @@ -5,7 +5,7 @@ const AdapterImageUrl = 'public.ecr.aws/p2z5s3h8/wix-velo/velo-external-db:lates class AdapterProvision { constructor(credentials, region) { this.region = region - this.client = new AppRunnerClient( { region: region, + this.client = new AppRunnerClient( { region, credentials: { accessKeyId: credentials.awsAccessKeyId, secretAccessKey: credentials.awsSecretAccessKey } } ) diff --git a/scripts/provision/lib/cloud-providers/aws/aws_config_writer.js b/scripts/provision/lib/cloud-providers/aws/aws_config_writer.js index 9cadcd6e7..395f1cacc 100644 --- a/scripts/provision/lib/cloud-providers/aws/aws_config_writer.js +++ b/scripts/provision/lib/cloud-providers/aws/aws_config_writer.js @@ -2,11 +2,11 @@ const { SecretsManagerClient, CreateSecretCommand } = require('@aws-sdk/client-s class ConfigWriter { constructor({ awsAccessKeyId, awsSecretAccessKey }, region) { - this.client = new SecretsManagerClient({ region: region, credentials: { accessKeyId: awsAccessKeyId, secretAccessKey: awsSecretAccessKey } }) + this.client = new SecretsManagerClient({ region, credentials: { accessKeyId: awsAccessKeyId, secretAccessKey: awsSecretAccessKey } }) } async writeConfig({ secretId, dbCredentials, host, db, secretKey }) { - const config = { host: host, username: dbCredentials.user, password: dbCredentials.passwd, DB: db, SECRET_KEY: secretKey } + const config = { host, username: dbCredentials.user, password: dbCredentials.passwd, DB: db, SECRET_KEY: secretKey } await this.client.send(new CreateSecretCommand({ Name: secretId, SecretString: JSON.stringify(config) } ) ) } } diff --git a/scripts/provision/lib/cloud-providers/aws/aws_db_provision.js b/scripts/provision/lib/cloud-providers/aws/aws_db_provision.js index 9a7de9e18..f35825c2d 100644 --- a/scripts/provision/lib/cloud-providers/aws/aws_db_provision.js +++ b/scripts/provision/lib/cloud-providers/aws/aws_db_provision.js @@ -4,7 +4,7 @@ const NetworkProvision = require('./aws_network_provision') class DbProvision { constructor(credentials, region) { - this.rdsClient = new RDSClient( { region: region, + this.rdsClient = new RDSClient( { region, credentials: { accessKeyId: credentials.awsAccessKeyId, secretAccessKey: credentials.awsSecretAccessKey } } ) this.networkClient = new NetworkProvision(credentials, region) diff --git a/scripts/provision/lib/cloud-providers/aws/aws_network_provision.js b/scripts/provision/lib/cloud-providers/aws/aws_network_provision.js index 32f88250b..77ab35bff 100644 --- a/scripts/provision/lib/cloud-providers/aws/aws_network_provision.js +++ b/scripts/provision/lib/cloud-providers/aws/aws_network_provision.js @@ -2,7 +2,7 @@ const { EC2Client, DescribeSecurityGroupsCommand, AuthorizeSecurityGroupIngressC class NetworkProvision { constructor(credentials, region) { - this.ec2Client = new EC2Client({ region: region }) + this.ec2Client = new EC2Client({ region }) } async addSecurityRule(groupId, port) { diff --git a/scripts/provision/lib/cloud-providers/aws/db/mysql_support.js b/scripts/provision/lib/cloud-providers/aws/db/mysql_support.js index c20a6f6dc..d90294a9f 100644 --- a/scripts/provision/lib/cloud-providers/aws/db/mysql_support.js +++ b/scripts/provision/lib/cloud-providers/aws/db/mysql_support.js @@ -6,7 +6,7 @@ const createDatabase = async(dbName, host, credentials) => { try { connection = mysql.createConnection({ - host: host, + host, user: credentials.user, password: credentials.passwd, }) diff --git a/scripts/provision/lib/cloud-providers/aws/db/postgres_support.js b/scripts/provision/lib/cloud-providers/aws/db/postgres_support.js index 50b72bd5f..b6eac8838 100644 --- a/scripts/provision/lib/cloud-providers/aws/db/postgres_support.js +++ b/scripts/provision/lib/cloud-providers/aws/db/postgres_support.js @@ -3,7 +3,7 @@ const { Client } = require('pg') const createDatabase = async(dbName, host, credentials) => { const client = new Client({ - host: host, + host, user: credentials.user, password: credentials.passwd, database: 'postgres', diff --git a/scripts/provision/lib/cloud-providers/azure/azure_config_writer.js b/scripts/provision/lib/cloud-providers/azure/azure_config_writer.js index 647c4ac55..4836063b5 100644 --- a/scripts/provision/lib/cloud-providers/azure/azure_config_writer.js +++ b/scripts/provision/lib/cloud-providers/azure/azure_config_writer.js @@ -68,13 +68,13 @@ class ConfigWriter { const keyVault = await this.keyVaultManagementClient.vaults.beginCreateOrUpdate(resourceGroupName, keyVaultName, { location: this.region, properties: { - tenantId: tenantId, + tenantId, sku: { name: 'standard' }, networkAcls: { virtualNetworkRules: [{ id: `${virtualNetwork.id}/subnets/${subnetName}` }] }, accessPolicies: [ { - objectId: userObjectId, tenantId: tenantId, + objectId: userObjectId, tenantId, permissions: { secrets: ['backup', 'delete', 'set', 'list', 'get'] } } ] diff --git a/scripts/provision/lib/cloud-providers/gcp/gcp_adapter_provision.js b/scripts/provision/lib/cloud-providers/gcp/gcp_adapter_provision.js index e2c33592c..40fc46a6a 100644 --- a/scripts/provision/lib/cloud-providers/gcp/gcp_adapter_provision.js +++ b/scripts/provision/lib/cloud-providers/gcp/gcp_adapter_provision.js @@ -58,7 +58,7 @@ class AdapterProvision { annotations: { 'run.googleapis.com/launch-stage': 'BETA' }, - name: name, + name, namespace: this.projectId }, spec: { diff --git a/scripts/provision/lib/cloud-providers/gcp/gcp_db_provision.js b/scripts/provision/lib/cloud-providers/gcp/gcp_db_provision.js index 615aecbac..52ed1cf80 100644 --- a/scripts/provision/lib/cloud-providers/gcp/gcp_db_provision.js +++ b/scripts/provision/lib/cloud-providers/gcp/gcp_db_provision.js @@ -69,7 +69,7 @@ class DbProvision { const client = await this.credentialsFor() const CreateNewUserRestUrl = `https://sqladmin.googleapis.com/sql/v1beta4/projects/${this.projectId}/instances/${instanceName}/users` - await client.request({ url: CreateNewUserRestUrl, method: 'POST', data: { name: userName, password: password } }) + await client.request({ url: CreateNewUserRestUrl, method: 'POST', data: { name: userName, password } }) } async createDatabase(instanceName, dbName) { diff --git a/scripts/provision/lib/core/provision.js b/scripts/provision/lib/core/provision.js index 130529702..bb27f9406 100644 --- a/scripts/provision/lib/core/provision.js +++ b/scripts/provision/lib/core/provision.js @@ -6,12 +6,12 @@ const { providerFor } = require('../cloud-providers/factory') const provisionDb = async(provider, configWriter, { engine, secretId, secretKey, dbName, provisionVariables, dbCredentials, instanceName }) => { await startSpinnerWith(`Preparing ${engine} - running preCreate `, async() => await provider.preCreateDb(provisionVariables)) - await startSpinnerWith(`Creating ${engine} DB Instance`, async() => await provider.createDb({ name: instanceName, engine: engine, credentials: dbCredentials, ...provisionVariables })) + await startSpinnerWith(`Creating ${engine} DB Instance`, async() => await provider.createDb({ name: instanceName, engine, credentials: dbCredentials, ...provisionVariables })) await startSpinnerWith('Waiting for db instance to start', async() => await blockUntil( async() => (await provider.dbStatusAvailable(instanceName, provisionVariables)).available )) const status = await provider.dbStatusAvailable(instanceName, provisionVariables) - const secrets = await startSpinnerWith('Writing db config', async() => await configWriter.writeConfig({ secretId: secretId, dbCredentials: dbCredentials, host: status.host, db: dbName, secretKey: secretKey, provisionVariables: provisionVariables, instanceName: instanceName, connectionName: status.connectionName })) + const secrets = await startSpinnerWith('Writing db config', async() => await configWriter.writeConfig({ secretId, dbCredentials, host: status.host, db: dbName, secretKey, provisionVariables, instanceName, connectionName: status.connectionName })) await startSpinnerWith('Provision Velo DB on db instance', async() => await provider.postCreateDb(engine, dbName, status, dbCredentials, provisionVariables, instanceName))