@enspirit/emb 0.8.2 → 0.8.3
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/README.md
CHANGED
|
@@ -19,7 +19,7 @@ export declare class DockerComposeClient {
|
|
|
19
19
|
protected services?: ComposeServices;
|
|
20
20
|
constructor(monorepo: Monorepo);
|
|
21
21
|
init(): Promise<void>;
|
|
22
|
-
isService(component: string): boolean | undefined
|
|
22
|
+
isService(component: string): Promise<boolean | undefined>;
|
|
23
23
|
getContainer(serviceName: string, options?: Partial<GetContainerOptions>): Promise<string>;
|
|
24
24
|
private loadContainers;
|
|
25
25
|
}
|
|
@@ -12,7 +12,8 @@ export class DockerComposeClient {
|
|
|
12
12
|
async init() {
|
|
13
13
|
await this.loadContainers();
|
|
14
14
|
}
|
|
15
|
-
isService(component) {
|
|
15
|
+
async isService(component) {
|
|
16
|
+
await this.init();
|
|
16
17
|
return this.services?.has(component);
|
|
17
18
|
}
|
|
18
19
|
async getContainer(serviceName, options = DefaultGetContainerOptions) {
|
|
@@ -34,10 +34,11 @@ export class RunTasksOperation {
|
|
|
34
34
|
const vars = await monorepo.expand(task.vars || {});
|
|
35
35
|
const executor = params.executor ??
|
|
36
36
|
(task.component
|
|
37
|
-
? compose.isService(task.component)
|
|
37
|
+
? (await compose.isService(task.component))
|
|
38
38
|
? ExecutorType.container
|
|
39
39
|
: ExecutorType.local
|
|
40
40
|
: ExecutorType.local);
|
|
41
|
+
console.log(compose.isService(task.component), task.component);
|
|
41
42
|
if (executor === ExecutorType.container &&
|
|
42
43
|
(!task.component || !compose.isService(task.component))) {
|
|
43
44
|
throw new Error('Cannot use the container executor with this task');
|
package/oclif.manifest.json
CHANGED