fix(core): update
This commit is contained in:
parent
edec48529d
commit
90eac3e50a
9880
package-lock.json
generated
9880
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
28
package.json
28
package.json
@ -27,26 +27,26 @@
|
||||
},
|
||||
"homepage": "https://gitlab.com/pushrocks/dockersock#README",
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": "^3.0.19",
|
||||
"@pushrocks/smartfile": "^7.0.11",
|
||||
"@pushrocks/lik": "^4.0.17",
|
||||
"@pushrocks/smartfile": "^8.0.0",
|
||||
"@pushrocks/smartjson": "^3.0.10",
|
||||
"@pushrocks/smartlog": "^2.0.21",
|
||||
"@pushrocks/smartnetwork": "^1.1.18",
|
||||
"@pushrocks/smartpath": "^4.0.1",
|
||||
"@pushrocks/smartlog": "^2.0.39",
|
||||
"@pushrocks/smartnetwork": "^1.1.22",
|
||||
"@pushrocks/smartpath": "^4.0.3",
|
||||
"@pushrocks/smartpromise": "^3.0.6",
|
||||
"@pushrocks/smartrequest": "^1.1.47",
|
||||
"@pushrocks/smartrequest": "^1.1.51",
|
||||
"@pushrocks/smartstring": "^3.0.18",
|
||||
"@pushrocks/smartversion": "^2.0.4",
|
||||
"@tsclass/tsclass": "^3.0.13",
|
||||
"rxjs": "^6.5.4"
|
||||
"@tsclass/tsclass": "^3.0.25",
|
||||
"rxjs": "^6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.22",
|
||||
"@gitzone/tsrun": "^1.2.8",
|
||||
"@gitzone/tstest": "^1.0.28",
|
||||
"@pushrocks/tapbundle": "^3.2.1",
|
||||
"@types/node": "^13.9.3",
|
||||
"tslint": "^6.1.0",
|
||||
"@gitzone/tsbuild": "^2.1.25",
|
||||
"@gitzone/tsrun": "^1.2.12",
|
||||
"@gitzone/tstest": "^1.0.48",
|
||||
"@pushrocks/tapbundle": "^3.2.9",
|
||||
"@types/node": "^14.11.2",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.18.0"
|
||||
},
|
||||
"files": [
|
||||
|
@ -2,6 +2,7 @@ import * as plugins from './docker.plugins';
|
||||
import * as interfaces from './interfaces';
|
||||
|
||||
import { DockerHost } from './docker.classes.host';
|
||||
import { logger } from './docker.logging';
|
||||
|
||||
export class DockerContainer {
|
||||
// STATIC
|
||||
@ -47,9 +48,9 @@ export class DockerContainer {
|
||||
User: 'root'
|
||||
});
|
||||
if (response.statusCode < 300) {
|
||||
plugins.smartlog.defaultLogger.log('info', 'Container created successfully');
|
||||
logger.log('info', 'Container created successfully');
|
||||
} else {
|
||||
plugins.smartlog.defaultLogger.log(
|
||||
logger.log(
|
||||
'error',
|
||||
'There has been a problem when creating the container'
|
||||
);
|
||||
|
@ -2,6 +2,7 @@ import * as plugins from './docker.plugins';
|
||||
import { DockerContainer } from './docker.classes.container';
|
||||
import { DockerNetwork } from './docker.classes.network';
|
||||
import { DockerService } from './docker.classes.service';
|
||||
import { logger } from './docker.logging';
|
||||
|
||||
export interface IAuthData {
|
||||
serveraddress: string;
|
||||
@ -138,9 +139,9 @@ export class DockerHost {
|
||||
ForceNewCluster: false
|
||||
});
|
||||
if (response.statusCode === 200) {
|
||||
plugins.smartlog.defaultLogger.log('info', 'created Swam succesfully');
|
||||
logger.log('info', 'created Swam succesfully');
|
||||
} else {
|
||||
plugins.smartlog.defaultLogger.log('error', 'could not initiate swarm');
|
||||
logger.log('error', 'could not initiate swarm');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
import * as plugins from './docker.plugins';
|
||||
import * as interfaces from './interfaces';
|
||||
import { DockerHost } from './docker.classes.host';
|
||||
import { logger } from './docker.logging';
|
||||
|
||||
export class DockerImage {
|
||||
// STATIC
|
||||
@ -63,14 +64,14 @@ export class DockerImage {
|
||||
)}&tag=${encodeURIComponent(imageUrlObject.imageTag)}`
|
||||
);
|
||||
if (response.statusCode < 300) {
|
||||
plugins.smartlog.defaultLogger.log(
|
||||
logger.log(
|
||||
'info',
|
||||
`Successfully pulled image ${imageUrlObject.imageUrl} from the registry`
|
||||
);
|
||||
const image = await DockerImage.findImageByName(dockerHostArg, imageUrlObject.imageOriginTag);
|
||||
return image;
|
||||
} else {
|
||||
plugins.smartlog.defaultLogger.log('error', `Failed at the attempt of creating a new image`);
|
||||
logger.log('error', `Failed at the attempt of creating a new image`);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ import * as interfaces from './interfaces';
|
||||
|
||||
import { DockerHost } from './docker.classes.host';
|
||||
import { DockerService } from './docker.classes.service';
|
||||
import { logger } from './docker.logging';
|
||||
|
||||
export class DockerNetwork {
|
||||
public static async getNetworks(dockerHost: DockerHost): Promise<DockerNetwork[]> {
|
||||
@ -45,10 +46,10 @@ export class DockerNetwork {
|
||||
Ingress: false
|
||||
});
|
||||
if (response.statusCode < 300) {
|
||||
plugins.smartlog.defaultLogger.log('info', 'Created network successfully');
|
||||
logger.log('info', 'Created network successfully');
|
||||
return await DockerNetwork.getNetworkByName(dockerHost, networkCreationDescriptor.Name);
|
||||
} else {
|
||||
plugins.smartlog.defaultLogger.log(
|
||||
logger.log(
|
||||
'error',
|
||||
'There has been an error creating the wanted network'
|
||||
);
|
||||
|
@ -4,6 +4,7 @@ import * as interfaces from './interfaces';
|
||||
import { DockerHost } from './docker.classes.host';
|
||||
import { DockerImage } from './docker.classes.image';
|
||||
import { DockerSecret } from './docker.classes.secret';
|
||||
import { logger } from './docker.logging';
|
||||
|
||||
export class DockerService {
|
||||
// STATIC
|
||||
@ -37,7 +38,7 @@ export class DockerService {
|
||||
serviceCreationDescriptor: interfaces.IServiceCreationDescriptor
|
||||
): Promise<DockerService> {
|
||||
// lets get the image
|
||||
plugins.smartlog.defaultLogger.log(
|
||||
logger.log(
|
||||
'info',
|
||||
`now creating service ${serviceCreationDescriptor.name}`
|
||||
);
|
||||
|
3
ts/docker.logging.ts
Normal file
3
ts/docker.logging.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import * as plugins from './docker.plugins';
|
||||
|
||||
export const logger = new plugins.smartlog.ConsoleLog();
|
@ -15,8 +15,6 @@ import * as smartrequest from '@pushrocks/smartrequest';
|
||||
import * as smartstring from '@pushrocks/smartstring';
|
||||
import * as smartversion from '@pushrocks/smartversion';
|
||||
|
||||
smartlog.defaultLogger.enableConsole();
|
||||
|
||||
export {
|
||||
lik,
|
||||
smartfile,
|
||||
|
Loading…
Reference in New Issue
Block a user