-
Notifications
You must be signed in to change notification settings - Fork 5.2k
/
package.js
71 lines (59 loc) · 2.35 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
Package.describe({
summary: 'A user account system',
version: '2.2.5',
});
Package.onUse(api => {
api.use('ecmascript', ['client', 'server']);
api.use('ddp-rate-limiter');
api.use('localstorage', 'client');
api.use('tracker', 'client');
api.use('check', 'server');
api.use('random', ['client', 'server']);
api.use('ejson', 'server');
api.use('callback-hook', ['client', 'server']);
api.use('reactive-var', 'client');
api.use('url', ['client', 'server']);
// use unordered to work around a circular dependency
// (service-configuration needs Accounts.connection)
api.use('service-configuration', ['client', 'server'], { unordered: true });
// needed for getting the currently logged-in user and handling reconnects
api.use('ddp', ['client', 'server']);
// need this because of the Meteor.users collection but in the future
// we'd probably want to abstract this away
api.use('mongo', ['client', 'server']);
// If the 'blaze' package is loaded, we'll define some helpers like
// {{currentUser}}. If not, no biggie.
api.use('blaze@2.5.0', 'client', { weak: true });
// Allow us to detect 'autopublish', and publish some Meteor.users fields if
// it's loaded.
api.use('autopublish', 'server', { weak: true });
api.use('oauth-encryption', 'server', { weak: true });
// Though this "Accounts" symbol is the only official Package export for
// the accounts-base package, modules that import accounts-base will
// have access to anything added to the exports object of the main
// module, including AccountsClient and AccountsServer (those symbols
// just won't be automatically imported as "global" variables).
api.export('Accounts');
// These main modules import all the other modules that comprise the
// accounts-base package, and define exports that will be accessible to
// modules that import the accounts-base package.
api.mainModule('server_main.js', 'server');
api.mainModule('client_main.js', 'client');
api.addAssets('accounts-base.d.ts', 'server');
});
Package.onTest(api => {
api.use([
'accounts-base',
'ecmascript',
'tinytest',
'random',
'test-helpers',
'oauth-encryption',
'ddp',
'accounts-password',
'accounts-2fa',
]);
api.addFiles('accounts_tests_setup.js', 'server');
api.mainModule('server_tests.js', 'server');
api.mainModule('client_tests.js', 'client');
});