diff --git a/sandbox/cache-example/.eslintignore b/sandbox/cache-example/.eslintignore index cd8f69ba6e..51b39e3ec0 100644 --- a/sandbox/cache-example/.eslintignore +++ b/sandbox/cache-example/.eslintignore @@ -1,4 +1,5 @@ node_modules/ dist/ coverage/ +migrations/ .eslintrc.js diff --git a/sandbox/oauth-example/.eslintignore b/sandbox/oauth-example/.eslintignore index cd8f69ba6e..51b39e3ec0 100644 --- a/sandbox/oauth-example/.eslintignore +++ b/sandbox/oauth-example/.eslintignore @@ -1,4 +1,5 @@ node_modules/ dist/ coverage/ +migrations/ .eslintrc.js diff --git a/sandbox/oauth-example/migrations/20221123082900-updated-init.js b/sandbox/oauth-example/migrations/20221123082900-updated-init.js index 1dfe52edfa..7509afe9ab 100644 --- a/sandbox/oauth-example/migrations/20221123082900-updated-init.js +++ b/sandbox/oauth-example/migrations/20221123082900-updated-init.js @@ -8,46 +8,52 @@ var path = require('path'); var Promise; /** - * We receive the dbmigrate dependency from dbmigrate initially. - * This enables us to not have to rely on NODE_PATH. - */ -exports.setup = function(options, seedLink) { + * We receive the dbmigrate dependency from dbmigrate initially. + * This enables us to not have to rely on NODE_PATH. + */ +exports.setup = function (options, seedLink) { dbm = options.dbmigrate; type = dbm.dataType; seed = seedLink; Promise = options.Promise; }; -exports.up = function(db) { - var filePath = path.join(__dirname, 'sqls', '20221123082900-updated-init-up.sql'); - return new Promise( function( resolve, reject ) { - fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){ +exports.up = function (db) { + var filePath = path.join( + __dirname, + 'sqls', + '20221123082900-updated-init-up.sql', + ); + return new Promise(function (resolve, reject) { + fs.readFile(filePath, {encoding: 'utf-8'}, function (err, data) { if (err) return reject(err); console.log('received data: ' + data); resolve(data); }); - }) - .then(function(data) { + }).then(function (data) { return db.runSql(data); }); }; -exports.down = function(db) { - var filePath = path.join(__dirname, 'sqls', '20221123082900-updated-init-down.sql'); - return new Promise( function( resolve, reject ) { - fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){ +exports.down = function (db) { + var filePath = path.join( + __dirname, + 'sqls', + '20221123082900-updated-init-down.sql', + ); + return new Promise(function (resolve, reject) { + fs.readFile(filePath, {encoding: 'utf-8'}, function (err, data) { if (err) return reject(err); console.log('received data: ' + data); resolve(data); }); - }) - .then(function(data) { + }).then(function (data) { return db.runSql(data); }); }; exports._meta = { - "version": 1 + version: 1, }; diff --git a/sandbox/oauth-example/src/repositories/user.repository.ts b/sandbox/oauth-example/src/repositories/user.repository.ts index f6f9c40704..9f8e622357 100644 --- a/sandbox/oauth-example/src/repositories/user.repository.ts +++ b/sandbox/oauth-example/src/repositories/user.repository.ts @@ -129,9 +129,7 @@ export class UserRepository extends DefaultSoftCrudRepository< if (!user || user.deleted) { throw new HttpErrors.Unauthorized(AuthenticateErrorKeys.UserDoesNotExist); } else if ( - // eslint-disable-next-line - !creds || - !creds.password || + !creds?.password || creds.authProvider !== AuthProvider.INTERNAL || !(await bcrypt.compare(password, creds.password)) ) { diff --git a/sandbox/payment-example/.eslintignore b/sandbox/payment-example/.eslintignore index cd8f69ba6e..51b39e3ec0 100644 --- a/sandbox/payment-example/.eslintignore +++ b/sandbox/payment-example/.eslintignore @@ -1,4 +1,5 @@ node_modules/ dist/ coverage/ +migrations/ .eslintrc.js diff --git a/sandbox/telemed-app/backend/authentication-service/.eslintignore b/sandbox/telemed-app/backend/authentication-service/.eslintignore index cd8f69ba6e..cc9d004f51 100644 --- a/sandbox/telemed-app/backend/authentication-service/.eslintignore +++ b/sandbox/telemed-app/backend/authentication-service/.eslintignore @@ -1,4 +1,6 @@ node_modules/ dist/ coverage/ +migration/ +cdk/ .eslintrc.js diff --git a/sandbox/telemed-app/backend/authentication-service/cdk/package.json b/sandbox/telemed-app/backend/authentication-service/cdk/package.json index 314ec94849..44dfba926f 100644 --- a/sandbox/telemed-app/backend/authentication-service/cdk/package.json +++ b/sandbox/telemed-app/backend/authentication-service/cdk/package.json @@ -13,7 +13,7 @@ "synth": "cdktf synth", "compile": "tsc --pretty", "watch": "tsc -w", - "test": "jest", + "test": "echo 'No Tests'", "test:watch": "jest --watch --coverage", "test:snapshot": "jest --updateSnapshot", "upgrade": "npm i cdktf@latest cdktf-cli@latest", diff --git a/sandbox/telemed-app/backend/authentication-service/src/config.ts b/sandbox/telemed-app/backend/authentication-service/src/config.ts index 049dcfee91..8dd42966f7 100644 --- a/sandbox/telemed-app/backend/authentication-service/src/config.ts +++ b/sandbox/telemed-app/backend/authentication-service/src/config.ts @@ -2,13 +2,11 @@ const { SecretsManagerClient, GetSecretValueCommand, } = require('@aws-sdk/client-secrets-manager'); -// eslint-disable-next-line @typescript-eslint/naming-convention -const secret_name = 'telemed-app-service-authentication'; +const secretName = 'telemed-app-service-authentication'; const client = new SecretsManagerClient({ region: 'us-east-1', }); -// eslint-disable-next-line @typescript-eslint/naming-convention -export interface secretEnv { +export interface SecretEnv { DB_HOST: string; DB_PORT: string; DB_USER: string; @@ -19,7 +17,7 @@ export interface secretEnv { ENV: string; } -let secret: secretEnv; +let secret: SecretEnv; export async function getSecretValue() { let response; @@ -27,7 +25,7 @@ export async function getSecretValue() { try { response = await client.send( new GetSecretValueCommand({ - SecretId: secret_name, + SecretId: secretName, VersionStage: 'AWSCURRENT', // VersionStage defaults to AWSCURRENT if unspecified }), ); diff --git a/sandbox/telemed-app/backend/notification-service/.eslintignore b/sandbox/telemed-app/backend/notification-service/.eslintignore index cd8f69ba6e..cc9d004f51 100644 --- a/sandbox/telemed-app/backend/notification-service/.eslintignore +++ b/sandbox/telemed-app/backend/notification-service/.eslintignore @@ -1,4 +1,6 @@ node_modules/ dist/ coverage/ +migration/ +cdk/ .eslintrc.js diff --git a/sandbox/telemed-app/backend/notification-service/src/config.ts b/sandbox/telemed-app/backend/notification-service/src/config.ts index e517f7634e..72ac669292 100644 --- a/sandbox/telemed-app/backend/notification-service/src/config.ts +++ b/sandbox/telemed-app/backend/notification-service/src/config.ts @@ -2,13 +2,11 @@ const { SecretsManagerClient, GetSecretValueCommand, } = require('@aws-sdk/client-secrets-manager'); -// eslint-disable-next-line @typescript-eslint/naming-convention -const secret_name = 'telemed-app-service-notification'; +const secretName = 'telemed-app-service-notification'; const client = new SecretsManagerClient({ region: 'us-east-1', }); -// eslint-disable-next-line @typescript-eslint/naming-convention -export interface secretEnv { +export interface SecretEnv { DB_HOST: string; DB_PORT: string; DB_USER: string; @@ -19,7 +17,7 @@ export interface secretEnv { ENV: string; } -let secret: secretEnv; +let secret: SecretEnv; export async function getSecretValue() { let response; @@ -27,7 +25,7 @@ export async function getSecretValue() { try { response = await client.send( new GetSecretValueCommand({ - SecretId: secret_name, + SecretId: secretName, VersionStage: 'AWSCURRENT', // VersionStage defaults to AWSCURRENT if unspecified }), ); diff --git a/sandbox/telemed-app/backend/video-conferencing-service/.eslintignore b/sandbox/telemed-app/backend/video-conferencing-service/.eslintignore index cd8f69ba6e..87982475c2 100644 --- a/sandbox/telemed-app/backend/video-conferencing-service/.eslintignore +++ b/sandbox/telemed-app/backend/video-conferencing-service/.eslintignore @@ -1,4 +1,6 @@ node_modules/ dist/ coverage/ +cdk/ +migration/ .eslintrc.js diff --git a/sandbox/telemed-app/backend/video-conferencing-service/src/config.ts b/sandbox/telemed-app/backend/video-conferencing-service/src/config.ts index cabfa8ecb2..385629960a 100644 --- a/sandbox/telemed-app/backend/video-conferencing-service/src/config.ts +++ b/sandbox/telemed-app/backend/video-conferencing-service/src/config.ts @@ -2,13 +2,11 @@ const { SecretsManagerClient, GetSecretValueCommand, } = require('@aws-sdk/client-secrets-manager'); -// eslint-disable-next-line @typescript-eslint/naming-convention -const secret_name = 'telemed-app-service-video-conferencing'; +const secretName = 'telemed-app-service-video-conferencing'; const client = new SecretsManagerClient({ region: 'us-east-1', }); -// eslint-disable-next-line @typescript-eslint/naming-convention -export interface secretEnv { +export interface SecretEnv { DB_HOST: string; DB_PORT: string; DB_USER: string; @@ -19,7 +17,7 @@ export interface secretEnv { ENV: string; } -let secret: secretEnv; +let secret: SecretEnv; export async function getSecretValue() { let response; @@ -27,7 +25,7 @@ export async function getSecretValue() { try { response = await client.send( new GetSecretValueCommand({ - SecretId: secret_name, + SecretId: secretName, VersionStage: 'AWSCURRENT', // VersionStage defaults to AWSCURRENT if unspecified }), );