-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathindex.js
49 lines (41 loc) · 1.02 KB
/
index.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
'use strict';
const helpers = require('./lib/util');
const util = require('util');
const database = require('./lib/database');
exports.util = helpers;
exports.database = database.create;
exports.store = database.store;
exports.ruleset = database.ruleset;
// Deprecate direct access to plugin helpers
Object.defineProperties(exports, [
'setFirebaseData',
'setFirebaseRules',
'setDebug',
'users'
].reduce((props, key) => {
props[key] = {
get: util.deprecate(
() => helpers[key],
`Deprecated: use "chai.${key}" or "jasmine.${key}" directly.`
),
enumerable: true,
configurable: true
};
return props;
}, {}));
// Deprecate direct access to plugins
Object.defineProperties(exports, [
'chai',
'jasmine'
].reduce((props, key) => {
const path = `./plugins/${key}`;
props[key] = {
get: util.deprecate(
() => require(path),
`Deprecated: use "const ${key} = require('targaryen/plugins/${key}');"`
),
enumerable: true,
configurable: true
};
return props;
}, {}));