diff --git a/lib/.meteor-package-versions b/lib/.meteor-package-versions new file mode 100644 index 00000000..52251852 --- /dev/null +++ b/lib/.meteor-package-versions @@ -0,0 +1,2 @@ +// the zodern:meteor-package-versions compiler replaces this file with +// the list of packages and their versions \ No newline at end of file diff --git a/lib/kadira.js b/lib/kadira.js index b446eff3..536a9c74 100644 --- a/lib/kadira.js +++ b/lib/kadira.js @@ -17,6 +17,7 @@ import { handleApiResponse } from './sourcemaps'; import { TrackMeteorDebug, TrackUncaughtExceptions, TrackUnhandledRejections } from './hijack/error'; import { getInfo, MontiAsyncStorage, MontiEnvironmentVariable } from './async/als'; import { EventType } from './constants'; +import packageMap from './.meteor-package-versions'; const hostname = require('os').hostname(); const logger = require('debug')('kadira:apm'); @@ -107,7 +108,7 @@ Kadira.connect = function (appId, appSecret, options) { appSecret: options.appSecret, endpoint: options.endpoint, hostname: options.hostname, - agentVersion: '3.0.0-beta.1' + agentVersion: packageMap['montiapm:agent'] || '' }); Kadira.coreApi._headers['METEOR-RELEASE'] = Meteor.release.replace('METEOR@', ''); @@ -204,7 +205,7 @@ Kadira._sendAppStats = function () { _.each(Package, function (v, name) { appStats.packageVersions.push({ name, - version: null + version: packageMap[name] || null }); }); diff --git a/package.js b/package.js index b6686291..1649794a 100644 --- a/package.js +++ b/package.js @@ -100,11 +100,12 @@ Package.onTest(function (api) { ], ['client', 'server']); }); -function configurePackage(api, isTesting) { +function configurePackage (api, isTesting) { api.versionsFrom('METEOR@3.0-alpha.18'); api.use('montiapm:meteorx@2.3.1', ['server']); api.use('meteorhacks:zones@1.2.1', { weak: true }); api.use('simple:json-routes@2.1.0', { weak: true }); + api.use('zodern:meteor-package-versions@0.2.0'); /** * Uncomment once fibers is removed from the package. @@ -116,8 +117,7 @@ function configurePackage(api, isTesting) { 'underscore', 'random', 'webapp', 'ecmascript' ], ['server']); - // http package constraints is currently broken in alpha 18 - // api.use(['http@3.0.0', 'email'], 'server', { weak: !isTesting }); + api.use(['http', 'email'], 'server', { weak: !isTesting }); api.use('fetch', 'server', { weak: !isTesting,