Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
d12d595f21 | |||
6117228ea4 | |||
b6b584f808 | |||
48fe6ce0a8 | |||
55acb39071 | |||
f7b17a4684 | |||
d95f6c8e7f | |||
001cdadb6b |
@ -65,6 +65,8 @@ sast:
|
|||||||
|
|
||||||
testSTABLE:
|
testSTABLE:
|
||||||
image: hosttoday/ht-docker-dbase:npmci
|
image: hosttoday/ht-docker-dbase:npmci
|
||||||
|
services:
|
||||||
|
- docker:dind
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
{
|
{
|
||||||
"npmts": {
|
|
||||||
"mode": "default",
|
|
||||||
"coverageTreshold": 10
|
|
||||||
},
|
|
||||||
"npmdocker": {
|
"npmdocker": {
|
||||||
"baseImage": "hosttoday/ht-docker-node:npmci",
|
"baseImage": "hosttoday/ht-docker-node:npmci",
|
||||||
"command":
|
"command":
|
||||||
@ -10,6 +6,8 @@
|
|||||||
"dockerSock": true
|
"dockerSock": true
|
||||||
},
|
},
|
||||||
"npmci": {
|
"npmci": {
|
||||||
"globalNpmTools": ["npmts", "npmdocker"]
|
"npmGlobalTools": [],
|
||||||
|
"npmAccessLevel": "public",
|
||||||
|
"npmRegistryUrl": "registry.npmjs.org"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
64
package-lock.json
generated
64
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mojoio/docker",
|
"name": "@mojoio/docker",
|
||||||
"version": "1.0.27",
|
"version": "1.0.31",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -40,6 +40,22 @@
|
|||||||
"typescript": "^3.0.1"
|
"typescript": "^3.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@gitzone/tstest": {
|
||||||
|
"version": "1.0.18",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftstest/-/tstest-1.0.18.tgz",
|
||||||
|
"integrity": "sha512-/owFKFsiFWh6miL+G/DYxBr+B6mgy9WzthLTqNyC7xriYoymvBgnmm5Wo3bo1NQN+1GY83zKeSpY7JB4r2LuEQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@gitzone/tsrun": "^1.1.17",
|
||||||
|
"@pushrocks/consolecolor": "^2.0.1",
|
||||||
|
"@pushrocks/smartfile": "^6.0.11",
|
||||||
|
"@pushrocks/smartlog": "^2.0.9",
|
||||||
|
"@pushrocks/smartpromise": "^2.0.5",
|
||||||
|
"@pushrocks/smartshell": "^2.0.11",
|
||||||
|
"@types/figures": "^2.0.0",
|
||||||
|
"figures": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@pushrocks/consolecolor": {
|
"@pushrocks/consolecolor": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fconsolecolor/-/consolecolor-2.0.1.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fconsolecolor/-/consolecolor-2.0.1.tgz",
|
||||||
@ -133,11 +149,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartlog": {
|
"@pushrocks/smartlog": {
|
||||||
"version": "2.0.9",
|
"version": "2.0.12",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog/-/smartlog-2.0.9.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog/-/smartlog-2.0.12.tgz",
|
||||||
"integrity": "sha512-F2u3O8OOQ7QXgg9o0lI7HnqEhSQZo2A8u0EuNbQH+Kj2oL62xDwjAg6KkINwH7ObSWpaldZ+I28prG0JxaRzvg==",
|
"integrity": "sha512-pTcM7mZyIsdZrsHMO3iYMGWJxk/vVKdy4xME9GsfBjxXcmIf+jUEC4Av9KDiGpyEJT7YqVmmBOZiaRfBO9EllA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartlog-interfaces": "^2.0.2"
|
"@pushrocks/smartlog-interfaces": "^2.0.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartlog-interfaces": {
|
"@pushrocks/smartlog-interfaces": {
|
||||||
@ -188,6 +204,17 @@
|
|||||||
"rxjs": "^6.3.3"
|
"rxjs": "^6.3.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@pushrocks/smartshell": {
|
||||||
|
"version": "2.0.13",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartshell/-/smartshell-2.0.13.tgz",
|
||||||
|
"integrity": "sha512-jLfAhLxMVKAScKdln1QrQqBI7A7INhMNHIq28fJEBi0BNDUS0eerw4yMAnR4CRmcrh4xFp1z+ju1kaPO3I/4MA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@pushrocks/smartpromise": "^2.0.5",
|
||||||
|
"@types/which": "^1.3.1",
|
||||||
|
"which": "^1.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@pushrocks/smarttime": {
|
"@pushrocks/smarttime": {
|
||||||
"version": "3.0.5",
|
"version": "3.0.5",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmarttime/-/smarttime-3.0.5.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmarttime/-/smarttime-3.0.5.tgz",
|
||||||
@ -235,6 +262,12 @@
|
|||||||
"@types/chai": "*"
|
"@types/chai": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@types/figures": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@types%2ffigures/-/figures-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-mcRgJ+ncKuNI+Dwac7omO18B8C8u+YBS+AU/oyLhEyjAnT3cUUThhHgZpbiIvu5ZqSvdD30BXtrqg9nxc3OKMg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"@types/form-data": {
|
"@types/form-data": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fform-data/-/form-data-2.2.1.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fform-data/-/form-data-2.2.1.tgz",
|
||||||
@ -276,6 +309,12 @@
|
|||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@types/which": {
|
||||||
|
"version": "1.3.1",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@types%2fwhich/-/which-1.3.1.tgz",
|
||||||
|
"integrity": "sha512-ZrJDWpvg75LTGX4XwuneY9s6bF3OeZcGTpoGh3zDV9ytzcHMFsRrMIaLBRJZQMBoGyKs6unBQfVdrLZiYfb1zQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"@types/yargs": {
|
"@types/yargs": {
|
||||||
"version": "12.0.5",
|
"version": "12.0.5",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fyargs/-/yargs-12.0.5.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fyargs/-/yargs-12.0.5.tgz",
|
||||||
@ -644,6 +683,15 @@
|
|||||||
"strip-eof": "^1.0.0"
|
"strip-eof": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"figures": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/figures/-/figures-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"escape-string-regexp": "^1.0.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
"find-up": {
|
"find-up": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/find-up/-/find-up-3.0.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/find-up/-/find-up-3.0.0.tgz",
|
||||||
@ -1328,9 +1376,9 @@
|
|||||||
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
||||||
},
|
},
|
||||||
"tslint": {
|
"tslint": {
|
||||||
"version": "5.12.0",
|
"version": "5.12.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/tslint/-/tslint-5.12.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/tslint/-/tslint-5.12.1.tgz",
|
||||||
"integrity": "sha512-CKEcH1MHUBhoV43SA/Jmy1l24HJJgI0eyLbBNSRyFlsQvb9v6Zdq+Nz2vEOH00nC5SUx4SneJ59PZUS/ARcokQ==",
|
"integrity": "sha512-sfodBHOucFg6egff8d1BvuofoOQ/nOeYNfbp7LDlKBcLNrL3lmS5zoiDGyOMdT7YsEXAwWpTdAHwOGOc8eRZAw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"babel-code-frame": "^6.22.0",
|
"babel-code-frame": "^6.22.0",
|
||||||
|
16
package.json
16
package.json
@ -1,12 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "@mojoio/docker",
|
"name": "@mojoio/docker",
|
||||||
"version": "1.0.27",
|
"version": "1.0.31",
|
||||||
"description": "easy communication with docker remote api from node, TypeScript ready",
|
"description": "easy communication with docker remote api from node, TypeScript ready",
|
||||||
|
"private": false,
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "tsrun test/test.ts",
|
"test": "tstest test/",
|
||||||
"build": "(npmts --notest && npmdocker)"
|
"build": "tsbuild"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -27,17 +28,18 @@
|
|||||||
"homepage": "https://gitlab.com/pushrocks/dockersock#README",
|
"homepage": "https://gitlab.com/pushrocks/dockersock#README",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/lik": "^3.0.4",
|
"@pushrocks/lik": "^3.0.4",
|
||||||
"@pushrocks/smartlog": "^2.0.9",
|
"@pushrocks/smartlog": "^2.0.12",
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartpromise": "^2.0.5",
|
||||||
"@pushrocks/smartrequest": "^1.1.14",
|
"@pushrocks/smartrequest": "^1.1.14",
|
||||||
"rxjs": "^6.3.3"
|
"rxjs": "^6.3.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@gitzone/tsbuild": "^2.1.4",
|
||||||
"@gitzone/tsrun": "^1.1.17",
|
"@gitzone/tsrun": "^1.1.17",
|
||||||
|
"@gitzone/tstest": "^1.0.18",
|
||||||
"@pushrocks/tapbundle": "^3.0.7",
|
"@pushrocks/tapbundle": "^3.0.7",
|
||||||
"@types/node": "^10.12.18",
|
"@types/node": "^10.12.18",
|
||||||
"tslint": "^5.12.0",
|
"tslint": "^5.12.1",
|
||||||
"tslint-config-prettier": "^1.17.0"
|
"tslint-config-prettier": "^1.17.0"
|
||||||
},
|
}
|
||||||
"private": false
|
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,13 @@ export class DockerHost {
|
|||||||
const response = await this.requestStreaming('GET', '/events');
|
const response = await this.requestStreaming('GET', '/events');
|
||||||
return plugins.rxjs.Observable.create(observer => {
|
return plugins.rxjs.Observable.create(observer => {
|
||||||
response.on('data', data => {
|
response.on('data', data => {
|
||||||
observer.next(data.toString());
|
const eventString = data.toString();
|
||||||
|
try {
|
||||||
|
const eventObject = JSON.parse(eventString);
|
||||||
|
observer.next(eventObject);
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return () => {
|
return () => {
|
||||||
response.emit('end');
|
response.emit('end');
|
||||||
|
Reference in New Issue
Block a user