mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-15 09:35:37 -05:00
no longer filtering to well-known database sources (#22864)
This commit is contained in:
@@ -532,16 +532,6 @@ export const PublishProfileElements = localize('publishProfileElements', "Publis
|
||||
|
||||
//#endregion
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Well-known database source values that are allowed to be sent in telemetry.
|
||||
*
|
||||
* 'dsct-oracle-to-ms-sql' is the name of an extension which allows users to migrate from Oracle to Microsoft SQL platform.
|
||||
* When looking at telemetry, we would like to know if a built or deployed database originated from the DSCT extension.
|
||||
*/
|
||||
export const WellKnownDatabaseSources = ['dsct-oracle-to-ms-sql'];
|
||||
|
||||
export function defaultOutputPath(configuration: string) { return path.join('.', 'bin', configuration); }
|
||||
|
||||
/**
|
||||
|
||||
@@ -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