mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 01:25:38 -05:00
no longer filtering to well-known database sources (#22864)
This commit is contained in:
@@ -635,36 +635,6 @@ export function getFoldersAlongPath(startFolder: string, endFolder: string): str
|
||||
return folders;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether provided value is a well-known database source and therefore is allowed to be sent in telemetry.
|
||||
*
|
||||
* @param value Value to check if it is a well-known database source
|
||||
* @returns Normalized database source value if it is well-known, otherwise returns undefined
|
||||
*/
|
||||
export function getWellKnownDatabaseSource(value: string): string | undefined {
|
||||
const upperCaseValue = value.toUpperCase();
|
||||
return constants.WellKnownDatabaseSources
|
||||
.find(wellKnownSource => wellKnownSource.toUpperCase() === upperCaseValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters an array of specified database project sources to only those that are well-known.
|
||||
*
|
||||
* @param databaseSourceValues Array of database source values to filter
|
||||
* @returns Array of well-known database sources
|
||||
*/
|
||||
export function getWellKnownDatabaseSources(databaseSourceValues: string[]): string[] {
|
||||
const databaseSourceSet = new Set<string>();
|
||||
for (let databaseSourceValue of databaseSourceValues) {
|
||||
const wellKnownDatabaseSourceValue = getWellKnownDatabaseSource(databaseSourceValue);
|
||||
if (wellKnownDatabaseSourceValue) {
|
||||
databaseSourceSet.add(wellKnownDatabaseSourceValue);
|
||||
}
|
||||
}
|
||||
|
||||
return Array.from(databaseSourceSet);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns SQL version number from docker image name which is in the beginning of the image name
|
||||
* @param imageName docker image name
|
||||
|
||||
Reference in New Issue
Block a user