diff --git a/package.json b/package.json index 4e7bd01..b3c24ca 100644 --- a/package.json +++ b/package.json @@ -53,4 +53,4 @@ "npmextra.json", "readme.md" ] -} +} \ No newline at end of file diff --git a/ts/docker.classes.container.ts b/ts/docker.classes.container.ts index f9bf41c..0015d0b 100644 --- a/ts/docker.classes.container.ts +++ b/ts/docker.classes.container.ts @@ -49,7 +49,10 @@ export class DockerContainer { if (response.statusCode < 300) { plugins.smartlog.defaultLogger.log('info', 'Container created successfully'); } else { - plugins.smartlog.defaultLogger.log('error', 'There has been a problem when creating the container'); + plugins.smartlog.defaultLogger.log( + 'error', + 'There has been a problem when creating the container' + ); } } diff --git a/ts/docker.classes.host.ts b/ts/docker.classes.host.ts index a5d75cd..d50eeec 100644 --- a/ts/docker.classes.host.ts +++ b/ts/docker.classes.host.ts @@ -68,7 +68,7 @@ export class DockerHost { public async activateSwarm(addvertisementIpArg?: string) { const response = await this.request('POST', '/swarm/init', { ListenAddr: '0.0.0.0:2377', - AdvertiseAddr: addvertisementIpArg ? `${addvertisementIpArg}:2377`: undefined, + AdvertiseAddr: addvertisementIpArg ? `${addvertisementIpArg}:2377` : undefined, DataPathPort: 4789, DefaultAddrPool: ['10.10.0.0/8', '20.20.0.0/8'], SubnetSize: 24, diff --git a/ts/docker.classes.image.ts b/ts/docker.classes.image.ts index ffe5b0d..e19c33d 100644 --- a/ts/docker.classes.image.ts +++ b/ts/docker.classes.image.ts @@ -13,7 +13,7 @@ export class DockerImage { return images; } - public static async findImageByName (dockerHost: DockerHost, imageNameArg: string) { + public static async findImageByName(dockerHost: DockerHost, imageNameArg: string) { const images = await this.getImages(dockerHost); return images.find(image => { return image.RepoTags.includes(imageNameArg); @@ -36,7 +36,7 @@ export class DockerImage { `Successfully pulled image ${creationObject.imageUrl} from the registry` ); const originTag = `${creationObject.imageUrl}:${creationObject.tag}`; - console.log(originTag) + console.log(originTag); const image = await DockerImage.findImageByName(dockerHostArg, originTag); return image; } else { @@ -93,9 +93,7 @@ export class DockerImage { return this.RepoTags.length > 0; } - public tagImage(newTag) { - - } + public tagImage(newTag) {} /** * pulls the latest version from the registry @@ -111,6 +109,4 @@ export class DockerImage { // TODO: Compare image digists before and after return true; } - - } diff --git a/ts/docker.classes.network.ts b/ts/docker.classes.network.ts index b7c016c..bccb607 100644 --- a/ts/docker.classes.network.ts +++ b/ts/docker.classes.network.ts @@ -41,12 +41,15 @@ export class DockerNetwork { Attachable: true, Ingress: false }); - if (response.statusCode < 300 ) { + if (response.statusCode < 300) { plugins.smartlog.defaultLogger.log('info', 'Created network successfully'); return await DockerNetwork.getNetworkByName(dockerHost, networkCreationDescriptor.Name); } else { - plugins.smartlog.defaultLogger.log('error', 'There has been an error creating the wanted network'); - return null + plugins.smartlog.defaultLogger.log( + 'error', + 'There has been an error creating the wanted network' + ); + return null; } } diff --git a/ts/docker.classes.service.ts b/ts/docker.classes.service.ts index b8009f1..4260f60 100644 --- a/ts/docker.classes.service.ts +++ b/ts/docker.classes.service.ts @@ -14,11 +14,13 @@ export class DockerService { return services; } - /** * creates a service */ - public static async createService(dockerHost: DockerHost, serviceCreationDescriptor: interfaces.IServiceCreationDescriptor) { + public static async createService( + dockerHost: DockerHost, + serviceCreationDescriptor: interfaces.IServiceCreationDescriptor + ) { dockerHost.request('POST', '/services/create', { Name: serviceCreationDescriptor.Name, TaskTemplate: { diff --git a/ts/interfaces/image.ts b/ts/interfaces/image.ts index c242b25..a07914a 100644 --- a/ts/interfaces/image.ts +++ b/ts/interfaces/image.ts @@ -1,4 +1,4 @@ export interface IImageCreationDescriptor { imageUrl: string; tag: string; -} \ No newline at end of file +} diff --git a/ts/interfaces/index.ts b/ts/interfaces/index.ts index af9eddf..0bf2e33 100644 --- a/ts/interfaces/index.ts +++ b/ts/interfaces/index.ts @@ -4,4 +4,3 @@ export * from './label'; export * from './network'; export * from './port'; export * from './service'; - diff --git a/ts/interfaces/service.ts b/ts/interfaces/service.ts index c0146b1..c093625 100644 --- a/ts/interfaces/service.ts +++ b/ts/interfaces/service.ts @@ -1,7 +1,7 @@ -import * as interfaces from './' +import * as interfaces from './'; export interface IServiceCreationDescriptor { Name: string; Image: string; Labels: interfaces.TLabels; -} \ No newline at end of file +}