Commit f45ac04
authored
Fix hooks execution when using CLI as lib (#2618)
When NS CLI is used as library, project hooks are not executed as hooksService gets the project dir from `$options` or current working dir.
Fix this by getting the projectDir from the hookArgs object. The object is constructed from method parameters. We check if there's `projectDir` or `projectData.projectDir` arg.
Also fix the caching of hooks - each time when we try to execute them, we'll search the directories for hooks. This is required for long living process.
Additionally use semver's package definitions from `@types` repo.
Rename two `.d.ts` files which were incorrectly set as `.ts`.1 parent aeef64a commit f45ac04
File tree
4 files changed
+5
-3
lines changed- lib
- definitions
4 files changed
+5
-3
lines changedFile renamed without changes.
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| |||
0 commit comments