mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-18 02:39:49 +00:00
Remove fetching of Mixpanel token
Change-type: patch Signed-off-by: Paulo Castro <paulo@balena.io>
This commit is contained in:
parent
9ef99a3aa9
commit
6124d8c493
@ -9,12 +9,14 @@ import packageJSON = require('../package.json');
|
||||
|
||||
const getBalenaSdk = _.once(() => BalenaSdk.fromSharedOptions());
|
||||
const getMatchCommandAsync = Promise.promisify(Capitano.state.getMatchCommand);
|
||||
const getMixpanel = _.once<any>(() =>
|
||||
getBalenaSdk()
|
||||
.models.config.getAll()
|
||||
.get('mixpanelToken')
|
||||
.then(Mixpanel.init),
|
||||
);
|
||||
const getMixpanel = _.once<any>(() => {
|
||||
const settings = require('balena-settings-client');
|
||||
return Mixpanel.init('00000000000000000000000000000000', {
|
||||
host: `api.${settings.get('balenaUrl')}`,
|
||||
path: '/mixpanel',
|
||||
protocol: 'https',
|
||||
});
|
||||
});
|
||||
|
||||
export function trackCommand(capitanoCli: Capitano.Cli) {
|
||||
const balena = getBalenaSdk();
|
||||
|
@ -96,6 +96,7 @@
|
||||
"dependencies": {
|
||||
"@resin.io/valid-email": "^0.1.0",
|
||||
"@types/dockerode": "2.5.5",
|
||||
"@types/mixpanel": "2.14.0",
|
||||
"@types/stream-to-promise": "2.2.0",
|
||||
"@types/through2": "^2.0.33",
|
||||
"@zeit/dockerignore": "0.0.3",
|
||||
@ -141,7 +142,7 @@
|
||||
"klaw": "^3.0.0",
|
||||
"lodash": "^4.17.4",
|
||||
"minimatch": "^3.0.4",
|
||||
"mixpanel": "^0.4.0",
|
||||
"mixpanel": "^0.10.1",
|
||||
"mkdirp": "^0.5.1",
|
||||
"moment": "^2.20.1",
|
||||
"moment-duration-format": "^2.2.1",
|
||||
|
1
typings/mixpanel.d.ts
vendored
1
typings/mixpanel.d.ts
vendored
@ -1 +0,0 @@
|
||||
declare module 'mixpanel';
|
Loading…
Reference in New Issue
Block a user