@wocker/core 1.0.18-dev.0 → 1.0.18-dev.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.
package/lib/makes/AppConfig.d.ts
CHANGED
|
@@ -27,11 +27,6 @@ export declare abstract class AppConfig {
|
|
|
27
27
|
addPlugin(plugin: string): void;
|
|
28
28
|
removePlugin(removePlugin: string): void;
|
|
29
29
|
getProject(id: string): ProjectData | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated
|
|
32
|
-
* @see Project.addProject
|
|
33
|
-
*/
|
|
34
|
-
setProject(id: string, path: string): void;
|
|
35
30
|
addProject(id: string, name: string, path: string): void;
|
|
36
31
|
removeProject(id: string): void;
|
|
37
32
|
registerPreset(name: string, source: PresetType, path?: string): void;
|
package/lib/makes/AppConfig.js
CHANGED
|
@@ -33,30 +33,6 @@ class AppConfig {
|
|
|
33
33
|
return projectData.id === id;
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
/* istanbul ignore next */
|
|
37
|
-
/**
|
|
38
|
-
* @deprecated
|
|
39
|
-
* @see Project.addProject
|
|
40
|
-
*/
|
|
41
|
-
setProject(id, path) {
|
|
42
|
-
if (!this.projects) {
|
|
43
|
-
this.projects = [];
|
|
44
|
-
}
|
|
45
|
-
let projectData = this.projects.find((projectData) => {
|
|
46
|
-
return projectData.id === id;
|
|
47
|
-
});
|
|
48
|
-
if (!projectData) {
|
|
49
|
-
this.projects.push({
|
|
50
|
-
id,
|
|
51
|
-
path,
|
|
52
|
-
src: path
|
|
53
|
-
});
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
projectData.name = id;
|
|
57
|
-
projectData.path = path;
|
|
58
|
-
projectData.src = path;
|
|
59
|
-
}
|
|
60
36
|
addProject(id, name, path) {
|
|
61
37
|
if (!this.projects) {
|
|
62
38
|
this.projects = [];
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { AppConfig } from "../makes";
|
|
2
|
-
declare abstract class AppConfigService {
|
|
2
|
+
export declare abstract class AppConfigService {
|
|
3
3
|
protected config?: AppConfig;
|
|
4
|
-
abstract setPWD(pwd: string): void;
|
|
5
4
|
abstract pwd(...parts: string[]): string;
|
|
5
|
+
abstract setPWD(pwd: string): void;
|
|
6
6
|
abstract dataPath(...args: string[]): string;
|
|
7
7
|
abstract pluginsPath(...args: string[]): string;
|
|
8
8
|
getConfig(): AppConfig;
|
|
9
9
|
protected abstract loadConfig(): AppConfig;
|
|
10
10
|
}
|
|
11
|
-
export { AppConfigService };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Container, ImageInfo } from "dockerode";
|
|
1
|
+
import { Container, ImageInfo, VolumeCreateResponse } from "dockerode";
|
|
2
2
|
import { Duplex } from "node:stream";
|
|
3
|
-
declare namespace DockerServiceParams {
|
|
3
|
+
export declare namespace DockerServiceParams {
|
|
4
4
|
type CreateContainer = {
|
|
5
5
|
name: string;
|
|
6
6
|
image: string;
|
|
@@ -44,10 +44,13 @@ declare namespace DockerServiceParams {
|
|
|
44
44
|
src: string;
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
declare abstract class DockerService {
|
|
47
|
+
export declare abstract class DockerService {
|
|
48
48
|
abstract createContainer(params: DockerServiceParams.CreateContainer): Promise<Container>;
|
|
49
49
|
abstract getContainer(name: string): Promise<Container | null>;
|
|
50
50
|
abstract removeContainer(name: string): Promise<void>;
|
|
51
|
+
abstract createVolume(name: string): Promise<VolumeCreateResponse>;
|
|
52
|
+
abstract hasVolume(name: string): Promise<boolean>;
|
|
53
|
+
abstract rmVolume(name: string): Promise<void>;
|
|
51
54
|
abstract buildImage(params: DockerServiceParams.BuildImage): Promise<any>;
|
|
52
55
|
abstract imageExists(tag: string): Promise<boolean>;
|
|
53
56
|
abstract imageLs(options?: DockerServiceParams.ImageList): Promise<ImageInfo[]>;
|
|
@@ -57,4 +60,3 @@ declare abstract class DockerService {
|
|
|
57
60
|
abstract attachStream(stream: NodeJS.ReadWriteStream): Promise<void>;
|
|
58
61
|
abstract exec(name: string, command?: string[], tty?: boolean): Promise<Duplex>;
|
|
59
62
|
}
|
|
60
|
-
export { DockerService, DockerServiceParams };
|