mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-01 09:35:41 -05:00
* Merge from vscode 3c6f6af7347d38e87bc6406024e8dcf9e9bce229 * skip failing tests * update mac build image
24 lines
1003 B
TypeScript
24 lines
1003 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import { URI } from 'vs/base/common/uri';
|
|
|
|
export function getPathFromAmdModule(requirefn: typeof require, relativePath: string): string {
|
|
return getUriFromAmdModule(requirefn, relativePath).fsPath;
|
|
}
|
|
|
|
export function getUriFromAmdModule(requirefn: typeof require, relativePath: string): URI {
|
|
return URI.parse(requirefn.toUrl(relativePath));
|
|
}
|
|
|
|
/**
|
|
* Reference a resource that might be inlined.
|
|
* Do not inline icons that will be used by the native mac touchbar.
|
|
* Do not rename this method unless you adopt the build scripts.
|
|
*/
|
|
export function registerAndGetAmdImageURL(absolutePath: string): string {
|
|
return require.toUrl(absolutePath);
|
|
}
|