From a77ed42e9f092be96800bb0ebbec19d3cb8dff1a Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Sun, 2 Apr 2017 15:30:43 +0200 Subject: [PATCH] now working with npmdocker and the npmts 7.x.x --- dist/dockersock.classes.dockersock.d.ts | 3 +++ dist/dockersock.classes.dockersock.js | 17 ++++++++++++----- npmextra.json | 2 +- package.json | 1 + test/test.ts | 20 +++++++++++--------- ts/dockersock.classes.dockersock.ts | 18 ++++++++++++++---- yarn.lock | 19 ++++++++++++++++++- 7 files changed, 60 insertions(+), 20 deletions(-) diff --git a/dist/dockersock.classes.dockersock.d.ts b/dist/dockersock.classes.dockersock.d.ts index e9d37a3..56f8043 100644 --- a/dist/dockersock.classes.dockersock.d.ts +++ b/dist/dockersock.classes.dockersock.d.ts @@ -23,6 +23,9 @@ export declare class Dockersock { removeContainer(containerNameArg: any): plugins.q.Promise<{}>; clean(): plugins.q.Promise<{}>; callOnChange(cb: Function): void; + /** + * gets you an observable that reports changes in the docker infrastructure + */ getChangeObservable(): Observable<{}>; request(methodArg: string, routeArg: string, queryArg?: string, dataArg?: {}): plugins.q.Promise<{}>; requestStream(methodArg: string, routeArg: string, queryArg?: string, dataArg?: {}): plugins.q.Promise<{}>; diff --git a/dist/dockersock.classes.dockersock.js b/dist/dockersock.classes.dockersock.js index 840d085..ec67099 100644 --- a/dist/dockersock.classes.dockersock.js +++ b/dist/dockersock.classes.dockersock.js @@ -132,6 +132,9 @@ class Dockersock { }); } ; + /** + * gets you an observable that reports changes in the docker infrastructure + */ getChangeObservable() { let options = { method: "GET", @@ -150,8 +153,10 @@ class Dockersock { } ; }); + let incomingMessage; requestStream.on("response", (response) => { - this.requestObjectmap.add(requestStream); + incomingMessage = response; + this.requestObjectmap.add(incomingMessage); if (response.statusCode == 200) { plugins.beautylog.ok("request returned status 200, so we are good!"); } @@ -161,7 +166,7 @@ class Dockersock { }); let changeObservable = rxjs_1.Observable.fromEvent(requestStream, "data"); requestStream.on("end", () => { - this.requestObjectmap.remove(requestStream); + this.requestObjectmap.remove(incomingMessage); }); return changeObservable; } @@ -219,8 +224,10 @@ class Dockersock { } ; }); + let incomingMessage; requestStream.on("response", (response) => { - this.requestObjectmap.add(requestStream); + incomingMessage = response; + this.requestObjectmap.add(incomingMessage); if (response.statusCode == 200) { plugins.beautylog.ok("request returned status 200, so we are good!"); } @@ -235,7 +242,7 @@ class Dockersock { plugins.beautylog.logReduced(status); }); requestStream.on("end", () => { - this.requestObjectmap.remove(requestStream); + this.requestObjectmap.remove(incomingMessage); }); return done.promise; } @@ -251,4 +258,4 @@ class Dockersock { ; } exports.Dockersock = Dockersock; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG9ja2Vyc29jay5jbGFzc2VzLmRvY2tlcnNvY2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9kb2NrZXJzb2NrLmNsYXNzZXMuZG9ja2Vyc29jay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2QixnREFBZ0Q7QUFDaEQsK0JBQWtDO0FBS2xDO0lBR0ksWUFBWSxVQUFrQixtQ0FBbUM7UUFEakUscUJBQWdCLEdBQUcsSUFBSSxPQUFPLENBQUMsR0FBRyxDQUFDLFNBQVMsRUFBMkIsQ0FBQztRQUVwRSxJQUFJLENBQUMsUUFBUSxHQUFHLE9BQU8sQ0FBQztJQUM1QixDQUFDO0lBRUQsVUFBVTtJQUNWLElBQUksQ0FBQyxPQUFlLEVBQUUsT0FBZTtRQUNqQyxJQUFJLElBQUksR0FBRyxPQUFPLENBQUMsQ0FBQyxDQUFDLEtBQUssRUFBRSxDQUFDO1FBQzdCLElBQUksQ0FBQyxPQUFPLENBQUMsTUFBTSxFQUFFLEVBQUUsQ0FBQyxDQUFDO1FBQ3pCLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDO0lBQ3hCLENBQUM7SUFDRCxjQUFjO1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, "npmdocker":{ "baseImage":"hosttoday/ht-docker-node:npmci", - "command":"npmci command yarn global add npmts && npmci command npmts", + "command":"(npmci command yarn global add npmts) && npmts", "dockerSock":"true" }, "npmci": { diff --git a/package.json b/package.json index 5def2aa..478f057 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "typings-global": "^1.0.14" }, "devDependencies": { + "observable-to-promise": "^0.5.0", "tapbundle": "^1.0.5" } } diff --git a/test/test.ts b/test/test.ts index 060e56f..da0f6ca 100644 --- a/test/test.ts +++ b/test/test.ts @@ -1,6 +1,6 @@ import "typings-global"; import { expect, tap } from 'tapbundle' - +import * as observableToPromise from 'observable-to-promise' import { Dockersock } from "../dist/index"; let testDockersock: Dockersock; @@ -8,27 +8,29 @@ let testDockersock: Dockersock; tap.test("should create a new Dockersock instance", async () => { testDockersock = new Dockersock(); return expect(testDockersock).to.be.instanceof(Dockersock); -}); +}).catch(tap.threw); tap.test("should list containers", async () => { await testDockersock.listContainers() .then(async (dataArg) => { console.log(dataArg); }); -}); +}).catch(tap.threw); tap.test("should list detailed containers", async () => { await testDockersock.listContainersDetailed() .then(async (dataArg) => { console.log(dataArg); }); -}); +}).catch(tap.threw); tap.test("should pull an image from imagetag", async () => { - await testDockersock.pullImage("hosttoday/ht-docker-dbase") -}); + await testDockersock.pullImage("hosttoday/ht-docker-node:npmci") +}).catch(tap.threw); -tap.test("should return a change Objservable", async () => { - testDockersock.getChangeObservable(); +/*tap.test("should return a change Objservable", async () => { + let myObservable = testDockersock.getChangeObservable(); testDockersock.endRequests(); -}) \ No newline at end of file + let testPromise = observableToPromise(myObservable) + return await expect(testPromise).to.eventually.be.fulfilled +}).catch(tap.threw);*/ \ No newline at end of file diff --git a/ts/dockersock.classes.dockersock.ts b/ts/dockersock.classes.dockersock.ts index e0ec3a9..e8d6c6f 100644 --- a/ts/dockersock.classes.dockersock.ts +++ b/ts/dockersock.classes.dockersock.ts @@ -124,6 +124,10 @@ export class Dockersock { }); }; + + /** + * gets you an observable that reports changes in the docker infrastructure + */ getChangeObservable() { let options = { method: "GET", @@ -140,8 +144,10 @@ export class Dockersock { console.log(res); }; }); + let incomingMessage requestStream.on("response", (response) => { - this.requestObjectmap.add(requestStream); + incomingMessage = response + this.requestObjectmap.add(incomingMessage); if (response.statusCode == 200) { plugins.beautylog.ok("request returned status 200, so we are good!"); } else { @@ -150,7 +156,7 @@ export class Dockersock { }); let changeObservable = Observable.fromEvent(requestStream, "data"); requestStream.on("end", () => { - this.requestObjectmap.remove(requestStream); + this.requestObjectmap.remove(incomingMessage); }); return changeObservable; } @@ -203,8 +209,10 @@ export class Dockersock { done.reject(err); }; }); + let incomingMessage requestStream.on("response", (response) => { - this.requestObjectmap.add(requestStream); + incomingMessage = response + this.requestObjectmap.add(incomingMessage); if (response.statusCode == 200) { plugins.beautylog.ok("request returned status 200, so we are good!"); } else { @@ -218,10 +226,12 @@ export class Dockersock { plugins.beautylog.logReduced(status); }); requestStream.on("end", () => { - this.requestObjectmap.remove(requestStream); + this.requestObjectmap.remove(incomingMessage); }); return done.promise; }; + + endRequests() { setTimeout(() => { this.requestObjectmap.forEach((itemArg: plugins.request.Request) => { diff --git a/yarn.lock b/yarn.lock index e1cbf3a..70c18a5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -848,6 +848,12 @@ is-number@^2.0.2, is-number@^2.1.0: dependencies: kind-of "^3.0.2" +is-observable@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-0.2.0.tgz#b361311d83c6e5d726cabf5e250b0237106f5ae2" + dependencies: + symbol-observable "^0.2.2" + is-posix-bracket@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" @@ -1211,6 +1217,13 @@ object.omit@^2.0.0: for-own "^0.1.4" is-extendable "^0.1.1" +observable-to-promise@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/observable-to-promise/-/observable-to-promise-0.5.0.tgz#c828f0f0dc47e9f86af8a4977c5d55076ce7a91f" + dependencies: + is-observable "^0.2.0" + symbol-observable "^1.0.4" + once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -1692,7 +1705,11 @@ supports-color@^3.1.2: dependencies: has-flag "^1.0.0" -symbol-observable@^1.0.1: +symbol-observable@^0.2.2: + version "0.2.4" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-0.2.4.tgz#95a83db26186d6af7e7a18dbd9760a2f86d08f40" + +symbol-observable@^1.0.1, symbol-observable@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d"