@enspirit/emb 0.8.1 → 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 +1 -1
- package/dist/src/cli/hooks/not-found.d.ts +3 -0
- package/dist/src/cli/hooks/not-found.js +4 -0
- package/dist/src/docker/compose/client.d.ts +1 -1
- package/dist/src/docker/compose/client.js +2 -1
- package/dist/src/monorepo/operations/tasks/RunTasksOperation.js +2 -1
- package/oclif.manifest.json +1 -1
- package/package.json +3 -4
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
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enspirit/emb",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"monorepo",
|
|
7
7
|
"docker",
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"@oclif/core": "^4.5.2",
|
|
46
46
|
"@oclif/plugin-autocomplete": "^3.2.34",
|
|
47
47
|
"@oclif/plugin-help": "^6.2.32",
|
|
48
|
-
"@oclif/plugin-not-found": "^3.2.63",
|
|
49
48
|
"@oclif/plugin-update": "^4.7.3",
|
|
50
49
|
"@oclif/table": "^0.4.12",
|
|
51
50
|
"ajv": "^8.17.1",
|
|
@@ -111,7 +110,8 @@
|
|
|
111
110
|
"dirname": "emb",
|
|
112
111
|
"commands": "./dist/src/cli/commands",
|
|
113
112
|
"hooks": {
|
|
114
|
-
"init": "./dist/src/cli/hooks/init"
|
|
113
|
+
"init": "./dist/src/cli/hooks/init",
|
|
114
|
+
"command_not_found": "./dist/src/cli/hooks/not-found"
|
|
115
115
|
},
|
|
116
116
|
"macos": {
|
|
117
117
|
"identifier": "dev.enspirit.emb"
|
|
@@ -119,7 +119,6 @@
|
|
|
119
119
|
"plugins": [
|
|
120
120
|
"@oclif/plugin-help",
|
|
121
121
|
"@oclif/plugin-autocomplete",
|
|
122
|
-
"@oclif/plugin-not-found",
|
|
123
122
|
"@oclif/plugin-update"
|
|
124
123
|
],
|
|
125
124
|
"topicSeparator": " ",
|