This repository was archived by the owner on Sep 12, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
1
const execa = require ( "execa" ) ;
2
2
const Command = require ( "@netlify/cli-utils" ) ;
3
+ const { track } = require ( "@netlify/cli-utils/src/utils/telemetry" ) ;
3
4
4
5
class ExecCommand extends Command {
5
6
async run ( ) {
@@ -13,6 +14,10 @@ class ExecCommand extends Command {
13
14
env : process . env ,
14
15
stdio : "inherit"
15
16
} ) ;
17
+ // Todo hoist this telemetry `command` to CLI hook
18
+ track ( "command" , {
19
+ command : "dev:exec"
20
+ } ) ;
16
21
}
17
22
}
18
23
Original file line number Diff line number Diff line change @@ -249,7 +249,8 @@ class DevCommand extends Command {
249
249
// Todo hoist this telemetry `command` to CLI hook
250
250
track ( "command" , {
251
251
command : "dev" ,
252
- projectType : settings . type || "custom"
252
+ projectType : settings . type || "custom" ,
253
+ live : flags . live || false
253
254
} ) ;
254
255
255
256
const banner = chalk . bold ( `Netlify dev server is now ready on ${ url } ` ) ;
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ const fetch = require("node-fetch");
11
11
const cp = require ( "child_process" ) ;
12
12
const { createAddon } = require ( "netlify/src/addons" ) ;
13
13
const ora = require ( "ora" ) ;
14
+ const { track } = require ( "@netlify/cli-utils/src/utils/telemetry" ) ;
14
15
15
16
const templatesDir = path . resolve ( __dirname , "../../functions-templates" ) ;
16
17
@@ -29,6 +30,10 @@ class FunctionsCreateCommand extends Command {
29
30
} else {
30
31
await scaffoldFromTemplate . call ( this , flags , args , functionsDir ) ;
31
32
}
33
+ track ( "command" , {
34
+ command : "functions:create" ,
35
+ url : flags . url
36
+ } ) ;
32
37
}
33
38
}
34
39
You can’t perform that action at this time.
0 commit comments