@wocker/core 1.0.21-beta.1 → 1.0.21-beta.2

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.
@@ -12,6 +12,7 @@ export declare class FileSystem {
12
12
  mkdir(path?: string, options?: fs.MakeDirectoryOptions): void;
13
13
  readdir(...parts: string[]): Promise<string[]>;
14
14
  readdirFiles(path?: string, options?: ReaddirOptions): Promise<string[]>;
15
+ readFile(path: string): Buffer<ArrayBufferLike>;
15
16
  readJSON(...paths: string[]): any;
16
17
  writeFile(path: string, data: string | Buffer | NodeJS.ArrayBufferView, options?: fs.WriteFileOptions): Promise<void>;
17
18
  writeJSON(path: string, data: any, options?: WriteFileOptions): void;
@@ -103,6 +103,10 @@ class FileSystem {
103
103
  });
104
104
  });
105
105
  }
106
+ readFile(path) {
107
+ const filePath = this.path(path);
108
+ return fs_1.default.readFileSync(filePath);
109
+ }
106
110
  readJSON(...paths) {
107
111
  const filePath = this.path(...paths);
108
112
  const res = fs_1.default.readFileSync(filePath);
@@ -0,0 +1,3 @@
1
+ import { FileSystem } from "../makes";
2
+ export declare class AppFileSystem extends FileSystem {
3
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AppFileSystem = void 0;
4
+ const makes_1 = require("../makes");
5
+ class AppFileSystem extends makes_1.FileSystem {
6
+ }
7
+ exports.AppFileSystem = AppFileSystem;
@@ -64,7 +64,7 @@ export declare abstract class DockerService {
64
64
  abstract imageRm(tag: string, force?: boolean): Promise<void>;
65
65
  abstract pullImage(tag: string): Promise<void>;
66
66
  abstract attach(name: string | Container): Promise<NodeJS.ReadWriteStream>;
67
- abstract attachStream(stream: NodeJS.ReadWriteStream): Promise<void>;
67
+ abstract attachStream(stream: NodeJS.ReadWriteStream): Promise<NodeJS.ReadWriteStream>;
68
68
  abstract exec(name: string, command?: DockerServiceParams.Exec | string[], tty?: boolean): Promise<Duplex>;
69
69
  abstract logs(containerOrName: string | Container): Promise<NodeJS.ReadableStream>;
70
70
  }
@@ -0,0 +1,4 @@
1
+ import { FileSystem } from "../makes";
2
+ export declare class PluginFileSystem extends FileSystem {
3
+ constructor(pluginDir: string);
4
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.PluginFileSystem = void 0;
16
+ const decorators_1 = require("../decorators");
17
+ const env_1 = require("../env");
18
+ const makes_1 = require("../makes");
19
+ let PluginFileSystem = class PluginFileSystem extends makes_1.FileSystem {
20
+ constructor(pluginDir) {
21
+ super(pluginDir);
22
+ }
23
+ };
24
+ exports.PluginFileSystem = PluginFileSystem;
25
+ exports.PluginFileSystem = PluginFileSystem = __decorate([
26
+ (0, decorators_1.Injectable)(),
27
+ __param(0, (0, decorators_1.Inject)(env_1.PLUGIN_DIR_KEY)),
28
+ __metadata("design:paramtypes", [String])
29
+ ], PluginFileSystem);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wocker/core",
3
- "version": "1.0.21-beta.1",
3
+ "version": "1.0.21-beta.2",
4
4
  "author": "Kris Papercut <krispcut@gmail.com>",
5
5
  "description": "Core of the Wocker",
6
6
  "license": "MIT",