@wocker/core 1.0.18 → 1.0.19-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,8 @@
1
1
  import { AppConfig } from "../makes";
2
2
  export declare abstract class AppConfigService {
3
3
  protected config?: AppConfig;
4
+ get version(): string;
5
+ isVersionGTE(version: string): boolean;
4
6
  abstract pwd(...parts: string[]): string;
5
7
  abstract setPWD(pwd: string): void;
6
8
  abstract dataPath(...args: string[]): string;
@@ -9,6 +9,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.AppConfigService = void 0;
10
10
  const decorators_1 = require("../decorators");
11
11
  let AppConfigService = class AppConfigService {
12
+ get version() {
13
+ return "0.0.0";
14
+ }
15
+ isVersionGTE(version) {
16
+ const current = this.version.split(".").map(Number);
17
+ const compare = version.split(".").map(Number);
18
+ for (let i = 0; i < 3; i++) {
19
+ if (current[i] > compare[i]) {
20
+ return true;
21
+ }
22
+ else if (current[i] < compare[i]) {
23
+ return false;
24
+ }
25
+ }
26
+ return true;
27
+ }
12
28
  getConfig() {
13
29
  if (!this.config) {
14
30
  this.config = this.loadConfig();
@@ -27,7 +27,7 @@ export declare namespace DockerServiceParams {
27
27
  };
28
28
  type ImageList = {
29
29
  tag?: string;
30
- reference?: string;
30
+ reference?: string[];
31
31
  labels?: {
32
32
  [key: string]: string;
33
33
  };
@@ -54,9 +54,10 @@ export declare abstract class DockerService {
54
54
  abstract buildImage(params: DockerServiceParams.BuildImage): Promise<any>;
55
55
  abstract imageExists(tag: string): Promise<boolean>;
56
56
  abstract imageLs(options?: DockerServiceParams.ImageList): Promise<ImageInfo[]>;
57
- abstract imageRm(tag: string): Promise<void>;
57
+ abstract imageRm(tag: string, force?: boolean): Promise<void>;
58
58
  abstract pullImage(tag: string): Promise<void>;
59
59
  abstract attach(name: string | Container): Promise<NodeJS.ReadWriteStream>;
60
60
  abstract attachStream(stream: NodeJS.ReadWriteStream): Promise<void>;
61
61
  abstract exec(name: string, command?: string[], tty?: boolean): Promise<Duplex>;
62
+ abstract logs(containerOrName: string | Container): Promise<NodeJS.ReadableStream>;
62
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wocker/core",
3
- "version": "1.0.18",
3
+ "version": "1.0.19-dev.0",
4
4
  "author": "Kris Papercut <krispcut@gmail.com>",
5
5
  "description": "Core of the Wocker",
6
6
  "license": "MIT",
@@ -25,7 +25,7 @@
25
25
  "test-watch": "jest --colors --watchAll --coverage"
26
26
  },
27
27
  "dependencies": {
28
- "@kearisp/cli": "^2.0.5",
28
+ "@kearisp/cli": "^2.0.6",
29
29
  "fs": "^0.0.1-security",
30
30
  "path": "^0.12.7",
31
31
  "reflect-metadata": "^0.2.2"