@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 CHANGED
@@ -14,7 +14,7 @@ $ npm install -g @enspirit/emb
14
14
  $ emb COMMAND
15
15
  running command...
16
16
  $ emb (--version)
17
- @enspirit/emb/0.8.1 darwin-x64 node-v22.18.0
17
+ @enspirit/emb/0.8.3 darwin-x64 node-v22.18.0
18
18
  $ emb --help [COMMAND]
19
19
  USAGE
20
20
  $ emb COMMAND
@@ -0,0 +1,3 @@
1
+ import { Hook } from '@oclif/core';
2
+ declare const hook: Hook.CommandNotFound;
3
+ export default hook;
@@ -0,0 +1,4 @@
1
+ const hook = async function (opts) {
2
+ return opts.config.runCommand('tasks:run', process.argv.splice(2));
3
+ };
4
+ export default hook;
@@ -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');
@@ -853,5 +853,5 @@
853
853
  ]
854
854
  }
855
855
  },
856
- "version": "0.8.1"
856
+ "version": "0.8.3"
857
857
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@enspirit/emb",
3
3
  "type": "module",
4
- "version": "0.8.1",
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": " ",