fix(core): update

This commit is contained in:
2024-05-08 19:58:09 +02:00
parent 90089625dc
commit 455404c3c9
4 changed files with 634 additions and 1421 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@apiclient.xyz/docker',
version: '1.0.110',
version: '1.0.111',
description: 'Provides easy communication with Docker remote API from Node.js, with TypeScript support.'
}

View File

@ -61,10 +61,10 @@ export class DockerHost {
/**
* gets the token from the .docker/config.json file for GitLab registry
*/
public async getGitlabComTokenFromDockerConfig() {
public async getAuthTokenFromDockerConfig(registryUrlArg: string) {
const dockerConfigPath = plugins.smartpath.get.home('~/.docker/config.json');
const configObject = plugins.smartfile.fs.toObjectSync(dockerConfigPath);
const gitlabAuthBase64 = configObject.auths['registry.gitlab.com'].auth;
const gitlabAuthBase64 = configObject.auths[registryUrlArg].auth;
const gitlabAuth: string = plugins.smartstring.base64.decode(gitlabAuthBase64);
const gitlabAuthArray = gitlabAuth.split(':');
await this.auth({