diff --git a/package-lock.json b/package-lock.json index 062f3ced..801cc5e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2510,7 +2510,7 @@ }, "packages/vscode-docker-registries": { "name": "@microsoft/vscode-docker-registries", - "version": "0.1.8", + "version": "0.1.9", "license": "See LICENSE in the project root for license information.", "dependencies": { "dayjs": "^1.11.7" diff --git a/packages/vscode-docker-registries/package.json b/packages/vscode-docker-registries/package.json index f16448a2..992689e0 100644 --- a/packages/vscode-docker-registries/package.json +++ b/packages/vscode-docker-registries/package.json @@ -1,7 +1,7 @@ { "name": "@microsoft/vscode-docker-registries", "author": "Microsoft Corporation", - "version": "0.1.8", + "version": "0.1.9", "description": "Extensibility model for contributing registry providers to the Docker extension for Visual Studio Code", "license": "See LICENSE in the project root for license information.", "repository": { @@ -23,7 +23,6 @@ "lint": "eslint --max-warnings 0 . --ext ts", "test": "mocha --file lib/test/global.test.js --recursive lib/test", "unittest": "npm test -- --grep /unit/i", - "update-design": "npx embedme DESIGN.md", "package": "npm pack" }, "devDependencies": { diff --git a/packages/vscode-docker-registries/src/auth/DockerHubAuthProvider.ts b/packages/vscode-docker-registries/src/auth/DockerHubAuthProvider.ts index f08d987a..94b2330e 100644 --- a/packages/vscode-docker-registries/src/auth/DockerHubAuthProvider.ts +++ b/packages/vscode-docker-registries/src/auth/DockerHubAuthProvider.ts @@ -6,7 +6,7 @@ import * as vscode from 'vscode'; import { AuthenticationProvider } from '../contracts/AuthenticationProvider'; import { LoginInformation } from '../contracts/BasicCredentials'; -import { DockerHubRegistryUrl, DockerHubRequestUrl } from '../clients/DockerHub/DockerHubRegistryDataProvider'; +import { DockerHubRequestUrl, DockerHubSignInUrl } from '../clients/DockerHub/DockerHubRegistryDataProvider'; import { httpRequest } from '../utils/httpRequest'; import { BasicAuthProvider } from './BasicAuthProvider'; @@ -54,7 +54,7 @@ export class DockerHubAuthProvider extends BasicAuthProvider implements Authenti const credentials = await this.getBasicCredentials(); return { - server: DockerHubRegistryUrl.toString(), + server: DockerHubSignInUrl, username: credentials.username, secret: credentials.secret, }; diff --git a/packages/vscode-docker-registries/src/clients/Common/CommonRegistryDataProvider.ts b/packages/vscode-docker-registries/src/clients/Common/CommonRegistryDataProvider.ts index bdd414f3..13e86a27 100644 --- a/packages/vscode-docker-registries/src/clients/Common/CommonRegistryDataProvider.ts +++ b/packages/vscode-docker-registries/src/clients/Common/CommonRegistryDataProvider.ts @@ -14,10 +14,14 @@ import { getErrorTreeItem } from './ErrorTreeItem'; dayjs.extend(relativeTime); -export abstract class CommonRegistryDataProvider implements RegistryDataProvider { +export abstract class CommonRegistryDataProvider implements RegistryDataProvider, vscode.Disposable { protected readonly onDidChangeTreeDataEmitter = new vscode.EventEmitter(); public readonly onDidChangeTreeData = this.onDidChangeTreeDataEmitter.event; + public dispose(): void { + this.onDidChangeTreeDataEmitter.dispose(); + } + public async getChildren(element?: CommonRegistryItem | undefined): Promise { try { if (!element) { diff --git a/packages/vscode-docker-registries/src/clients/DockerHub/DockerHubRegistryDataProvider.ts b/packages/vscode-docker-registries/src/clients/DockerHub/DockerHubRegistryDataProvider.ts index 24027e05..0bf0a8c0 100644 --- a/packages/vscode-docker-registries/src/clients/DockerHub/DockerHubRegistryDataProvider.ts +++ b/packages/vscode-docker-registries/src/clients/DockerHub/DockerHubRegistryDataProvider.ts @@ -17,6 +17,7 @@ import * as vscode from 'vscode'; export const DockerHubRequestUrl = vscode.Uri.parse('https://hub.docker.com/'); export const DockerHubRegistryUrl = vscode.Uri.parse('https://docker.io/'); +export const DockerHubSignInUrl = 'https://index.docker.io/v1/'; export const DockerHubContextValue = 'dockerhub'; export function isDockerHubRegistry(item: unknown): item is CommonRegistry {