Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function credentialsToDataSource(credentials: DatabaseCredentials): DataSource {
return {
name: 'db',
url: {
value: credentials.uri || credentialsToUri(credentials),
fromEnvVar: null,
},
config: {},
connectorType: credentials.type,
}
}