forked from meteorhacks/kadira
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.js
134 lines (122 loc) · 3.2 KB
/
package.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
Package.describe({
"summary": "Performance Monitoring for Meteor",
"version": "2.30.2",
"git": "https://github.com/chatr/kadira.git",
"name": "artpolikarpov:kadira-server-only"
});
var npmModules = {
"debug": "0.7.4",
"kadira-core": "1.3.2",
"pidusage": "1.0.1",
"evloop-monitor": "0.1.0",
"pidusage": "0.1.1",
"lru-cache": "4.0.0",
"json-stringify-safe": "5.0.1"
};
Npm.depends(npmModules);
Package.on_use(function(api) {
configurePackage(api);
api.export(['Kadira'], 'server');
});
Package.on_test(function(api) {
configurePackage(api);
api.use([
'tinytest',
'test-helpers'
], 'server');
// common before
api.add_files([
'tests/models/base_error.js'
], 'server');
// common server
api.add_files([
'tests/utils.js',
'tests/ntp.js',
'tests/jobs.js',
'tests/_helpers/globals.js',
'tests/_helpers/helpers.js',
'tests/_helpers/init.js',
'tests/ping.js',
'tests/hijack/info.js',
'tests/hijack/user.js',
'tests/hijack/email.js',
'tests/hijack/base.js',
'tests/hijack/async.js',
'tests/hijack/http.js',
'tests/hijack/db.js',
'tests/hijack/subscriptions.js',
'tests/hijack/error.js',
'tests/models/methods.js',
'tests/models/pubsub.js',
'tests/models/system.js',
'tests/models/errors.js',
'tests/tracer/tracer_store.js',
'tests/tracer/tracer.js',
'tests/tracer/default_filters.js',
'tests/check_for_oplog.js',
'tests/error_tracking.js',
'tests/wait_time_builder.js',
'tests/hijack/set_labels.js',
'tests/environment_variables.js',
'tests/docsize_cache.js',
], 'server');
// common after
api.add_files([
'tests/common/default_error_filters.js',
'tests/common/send.js'
], 'server');
});
function configurePackage(api) {
if(api.versionsFrom) {
api.versionsFrom('[email protected]');
api.use('meteorhacks:[email protected]', ['server']);
api.use('meteorhacks:[email protected]', {weak: true});
}
api.use([
'minimongo', 'livedata', 'mongo-livedata', 'ejson', 'ddp-common',
'underscore', 'http', 'email', 'random'
], 'server');
// common before
api.add_files([
'lib/common/unify.js',
'lib/models/base_error.js'
], 'server');
// only server
api.add_files([
'lib/jobs.js',
'lib/retry.js',
'lib/utils.js',
'lib/ntp.js',
'lib/wait_time_builder.js',
'lib/check_for_oplog.js',
'lib/tracer/tracer.js',
'lib/tracer/default_filters.js',
'lib/tracer/tracer_store.js',
'lib/models/0model.js',
'lib/models/methods.js',
'lib/models/pubsub.js',
'lib/models/system.js',
'lib/models/errors.js',
'lib/docsize_cache.js',
'lib/kadira.js',
'lib/hijack/wrap_server.js',
'lib/hijack/wrap_session.js',
'lib/hijack/wrap_subscription.js',
'lib/hijack/wrap_observers.js',
'lib/hijack/wrap_ddp_stringify.js',
'lib/hijack/instrument.js',
'lib/hijack/db.js',
'lib/hijack/http.js',
'lib/hijack/email.js',
'lib/hijack/async.js',
'lib/hijack/error.js',
'lib/hijack/set_labels.js',
'lib/environment_variables.js',
'lib/auto_connect.js',
], 'server');
// common after
api.add_files([
'lib/common/default_error_filters.js',
'lib/common/send.js'
], 'server');
}