Skip to content

Commit d6696a1

Browse files
Fix hooks execution when using CLI as lib
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 068d17c commit d6696a1

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed
File renamed without changes.
File renamed without changes.

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"plistlib": "0.2.1",
6363
"progress-stream": "1.1.1",
6464
"properties-parser": "0.2.3",
65-
"semver": "5.0.1",
65+
"semver": "5.3.0",
6666
"shelljs": "0.7.6",
6767
"source-map": "0.5.6",
6868
"tabtab": "https://github.com/Icenium/node-tabtab/tarball/master",
@@ -73,14 +73,16 @@
7373
"xcode": "https://github.com/NativeScript/node-xcode/archive/1.4.0.tar.gz",
7474
"xmldom": "0.1.21",
7575
"xmlhttprequest": "https://github.com/telerik/node-XMLHttpRequest/tarball/master",
76-
"yargs": "6.0.0"
76+
"yargs": "6.0.0",
77+
"zipstream": "https://github.com/Icenium/node-zipstream/tarball/master"
7778
},
7879
"analyze": true,
7980
"devDependencies": {
8081
"@types/chai": "3.4.34",
8182
"@types/chai-as-promised": "0.0.29",
8283
"@types/lodash": "4.14.50",
8384
"@types/node": "6.0.61",
85+
"@types/semver": "^5.3.31",
8486
"@types/source-map": "0.5.0",
8587
"chai": "3.5.0",
8688
"chai-as-promised": "6.0.0",

0 commit comments

Comments
 (0)