forked from meteorhacks/kadira
-
Notifications
You must be signed in to change notification settings - Fork 16
/
package.js
173 lines (157 loc) · 4.17 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
Package.describe({
summary: "Performance Monitoring for Meteor",
version: "3.5.1",
git: "https://github.com/meteor/meteor-apm-agent.git",
name: "mdg:meteor-apm-agent"
});
var npmModules = {
"debug": "0.7.4",
"kadira-core": "1.3.2",
"pidusage": "1.0.1",
"evloop-monitor": "0.1.0",
"lru-cache": "4.0.0",
"json-stringify-safe": "5.0.1",
"uuid": "3.3.2"
};
Npm.depends(npmModules);
Package.onUse(function(api) {
configurePackage(api);
api.export(['Kadira']);
});
Package.onTest(function(api) {
configurePackage(api);
api.use([
'tinytest',
'test-helpers'
], ['client', 'server']);
// common before
api.addFiles([
'tests/models/base_error.js'
], ['client', 'server']);
// common server
api.addFiles([
'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 client
api.addFiles([
'tests/client/utils.js',
'tests/client/error_tracking.js',
'tests/client/models/error.js',
'tests/client/error_reporters/window_error.js',
'tests/client/error_reporters/zone.js',
'tests/client/error_reporters/meteor_debug.js',
], 'client');
// common after
api.addFiles([
'tests/common/default_error_filters.js',
'tests/common/send.js'
], ['client', 'server']);
});
function configurePackage(api) {
if (api.versionsFrom) {
api.versionsFrom(['METEOR@1.11', 'METEOR@2.3']);
api.use('meteorhacks:zones@1.2.1', {weak: true});
}
api.use([
'ecmascript',
'mongo',
'minimongo',
'livedata',
'mongo-livedata',
'ejson',
'ddp-common',
'underscore',
'http',
'email',
'random',
], ['server']);
api.use(['underscore', 'random', 'http', 'localstorage'], ['client']);
// common before
api.addFiles([
'lib/common/unify.js',
'lib/models/base_error.js'
], ['client', 'server']);
// only server
api.addFiles([
'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');
// only client
api.addFiles([
'lib/retry.js',
'lib/ntp.js',
'lib/client/utils.js',
'lib/client/models/error.js',
'lib/client/error_reporters/zone.js',
'lib/client/error_reporters/window_error.js',
'lib/client/error_reporters/meteor_debug.js',
'lib/client/kadira.js'
], 'client');
api.addFiles([
// It's possible to remove this file after some since this just contains
// a notice to the user.
// Actual implementation is in the meteorhacks:kadira-profiler package
'lib/profiler/client.js',
], 'client');
// common after
api.addFiles([
'lib/common/default_error_filters.js',
'lib/common/send.js'
], ['client', 'server']);
}