Reverting .npmrc file

This commit is contained in:
Justin Kolasa (from Dev Box) 2025-04-22 13:00:14 -04:00
parent 5f4ea0e614
commit 1ca2db54f5
3 changed files with 30 additions and 15 deletions

4
.npmrc
View File

@ -1,6 +1,4 @@
save-exact=true
registry=https://msdata.pkgs.visualstudio.com/_packaging/cosmosdbportal/npm/registry/
always-auth=true
allow-same-version=true
# Ignore peer dependency conflicts
force=true # TODO: Remove this when we update to React 17 or higher!

1
images/vscode.svg Normal file
View File

@ -0,0 +1 @@
<svg width="15" height="15" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" overflow="hidden"><defs><clipPath id="clip0"><rect x="479" y="279" width="15" height="15"/></clipPath><clipPath id="clip1"><rect x="-0.287396" y="-0.171573" width="152381" height="152381"/></clipPath><image width="35" height="35" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAMAAAApB0NrAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH4UExURQAAAASExCGs7CC//wB9vQB5uxSU1yaz8ySy9AB8uwB8vAB5uxOR1Say8yax8iaw8gB6vAB6uwB7uwB4uROQ1Cax8ySy8QCAvwB3ugB5ugB2uROP1CWw8yav8wCT2QCQ1QCP1wB2uQB1uBOO0yWv8yat8wCP1QCP1QCP1QCO1QCQ1wB1tQB2uAB3uAB1tx+k6SSt8ySt8QCN0wCO1ACM0wBzuQBztAB1twB0tgB0tiSr8SSs8gCM1ACM1ACEywBwtQBxtAB0tgBztQB0sySp8SSr8gCL0wCK0gCL0wCHzwByuABusgBztQBttiOq8gB6wQCI0QCJ0gB7wySn8SOo8gBxtABtsABwtgCFzwCI0gCG0QCJ0SKn8SKn8iKl8QBvsABvsgBvsQBtsABssgCCzACG0QCF0ACDzyKm8QBtrwBusABsrgCAzQCE0ACF0ACF0ACE0CKj8SKl8QBssQBtrwBtrwBsrgBsrwCK1QCBzwCD0ACA0B2d7CGj8QBsrABrrQBwrwCA3wCC0ACCzwCBzwB+zhGM3iGi8SKh8QCAzQCAzgCAzwB9zRCK3iCh8SGh8SCf8QB+zAB/zgB8zRCJ3SCg8SCf7wB+zQB6zBCI3CCe8CCf8CCe8CCf8SCf/wB7zAB4yxGJ3h6c8CCd7yCf7wmA0RqX60C//5CaUeMAAACodFJOUwA8XAho+//ncID/////53iM//////9wCKv/////gCiYILf///+AMPP/70wYw/+3lP+AXP+MKNv/+3uA/3z/+////+NAgP9c9/////+7HP+A///MgP9Y+////7scgP+AeP/////7/+NA/2D/iyTb//t4gP808//vUBjD/7eU/yifIAi3//////+Ar////////4CI/////3B//////+9/CGj7/+dwEDhYBCm1XqwAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAFpSURBVDhPY2AYBaiAkYkZXQgdsLCysXPgV8XJxc3Dy8vHj0eVgKCQsIioqKioGLoMDIhLSEpKSknLyMjIyKLLyckrgJUoCgsLCyspq6ioqKiiKVFT19DUYmDQ1tEFAT19AwMDA0M0NUbGxsbGJqZm5ubm5haWDFbW1tbWVmhqGGxsbW1t7ewdHB2dnBkYXFxdXV1d0NUwuLl7eHh4enn7+DIwMLj4+fn5Yaph8A8IDAwMDBIHsYNDQkJCgtFVMISGhUdERkZGRkUzMDDExMbGxsahK4lPSExKTklNTU1NS2dgiMvIyMhAV5OZlZWVlZ2Tm5eXl5dfwFBYVFRUVIimpriktKycgaGisgoEqmtqa2tr0dUw1NU3gKjGpuaWlpbWtvb29vYOdDUw0NjZ1dXd09vX39c3AV0OASZOmjR5ytSpU6dOQ5dBAtN7ZsycNXvO3HnoEshg/oKFixYvQRdFA0uXLUcXGqEAAH4FV0z+qQbjAAAAAElFTkSuQmCC" preserveAspectRatio="none" id="img2"></image><clipPath id="clip3"><path d="M44291.4 46947.4 187148 46947.4 187148 188823 44291.4 188823Z" fill-rule="evenodd" clip-rule="evenodd"/></clipPath></defs><g clip-path="url(#clip0)" transform="translate(-479 -279)"><g clip-path="url(#clip1)" transform="matrix(0.000105 0 0 0.000105 479 279)"><g clip-path="url(#clip3)" transform="matrix(1 0 0 1.00692 -44291.4 -47272.4)"><use width="100%" height="100%" xlink:href="#img2" transform="scale(6709.45 6709.45)"></use></g></g></g></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -284,22 +284,38 @@ export default class Explorer {
public openInVsCode(): void {
const startTime = TelemetryProcessor.traceStart(Action.OpenVSCode);
const clearInProgressMessage = logConsoleProgress(
"Opening VS Code for this account.",
);
useDialog.getState().closeDialog();
try {
`vscode://ms-azuretools.vscode-cosmosdb?resourceId=/subscriptions/${userContext.subscriptionId}/resourceGroups/${userContext.resourceGroup}/providers/Microsoft.DocumentDB/databaseAccounts/${userContext?.databaseAccount}&database=${userContext.parsedResourceToken?.databaseId}&container=${userContext.parsedResourceToken?.collectionId}`
// preview version of vscode
// `vscode-insiders://ms-azuretools.vscode-cosmosdb?resourceId=/subscriptions/${userContext.subscriptionId}/resourceGroups/${userContext.resourceGroup}/providers/Microsoft.DocumentDB/databaseAccounts/${userContext?.databaseAccount}&database=${userContext.parsedResourceToken?.databaseId}&container=${userContext.parsedResourceToken?.databaseId}`
const clearInProgressMessage = logConsoleProgress("Opening Visual Studio Code");
const { subscriptionId, resourceGroup, databaseAccount } = userContext;
const activeTab = useTabs.getState().activeTab;
const database = activeTab.collection?.databaseId;
const container = activeTab.collection?.id();
if (!database || !container) {
logConsoleError("Failed to open Visual Studio Code, a database account and container is required to open in VS Code.");
clearInProgressMessage();
logConsoleInfo("Opening Visual Studio Code for this account");
return;
}
const vscodeUrl = `vscode://ms-azuretools.vscode-cosmosdb?resourceId=/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/Microsoft.DocumentDB/databaseAccounts/${databaseAccount.id}&database=${database}&container=${container}`;
const vscodeInsidersUrl = `vscode-insiders://ms-azuretools.vscode-cosmosdb?resourceId=/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/Microsoft.DocumentDB/databaseAccounts/${databaseAccount.id}&database=${database}&container=${container}`;
console.log(userContext);
try {
logConsoleInfo("Opening Visual Studio Code");
const linkOpened = (navigator.userAgent.includes("Insiders") && window.open(vscodeInsidersUrl)) || window.open(vscodeUrl);
if (!linkOpened) {
logConsoleError("Visual Studio Code is not installed on this device");
window.open("https://code.visualstudio.com/download", "_blank");
}
TelemetryProcessor.traceSuccess(Action.OpenVSCode, {}, startTime);
} catch (error) {
// If the browser can't handle a `vscode://` or `vscode-insiders://` url route them to the VS Code download page
clearInProgressMessage();
logConsoleError(`**Visual Studio Code** isn't installed on this device. Please install it here: **https://code.visualstudio.com/download**${getErrorMessage(error)}`);
logConsoleError(`Failed to open Visual Studio Code. ${getErrorMessage(error)}`);
TelemetryProcessor.traceFailure(Action.OpenVSCode, {}, startTime);
} finally {
clearInProgressMessage();
}
}