Remove fetching of Mixpanel token

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
This commit is contained in:
Paulo Castro 2019-02-07 15:36:48 +00:00
parent 9ef99a3aa9
commit 6124d8c493
3 changed files with 10 additions and 8 deletions

View File

@ -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();

View File

@ -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",

View File

@ -1 +0,0 @@
declare module 'mixpanel';