-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.js
27 lines (25 loc) · 1.25 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
module.exports = {
initialise:function(...args){
if(typeof $$.swarmEngine === "undefined"){
const SwarmEngine = require('./SwarmEngine');
$$.swarmEngine = new SwarmEngine(...args);
}else{
$$.throw("Swarm engine already initialized!");
}
},
OuterIsolatePowerCord: require("./powerCords/OuterIsolatePowerCord"),
InnerIsolatePowerCord: require("./powerCords/InnerIsolatePowerCord"),
OuterThreadPowerCord: require("./powerCords/OuterThreadPowerCord"),
InnerThreadPowerCord: require("./powerCords/InnerThreadPowerCord"),
RemoteChannelPairPowerCord: require("./powerCords/RemoteChannelPairPowerCord"),
RemoteChannelPowerCord: require("./powerCords/RemoteChannelPowerCord"),
SmartRemoteChannelPowerCord:require("./powerCords/SmartRemoteChannelPowerCord"),
BootScripts: require('./bootScripts'),
get SSAppPowerCord(){
const or = require("overwrite-require");
const browserContexts = [or.constants.BROWSER_ENVIRONMENT_TYPE, or.constants.SERVICE_WORKER_ENVIRONMENT_TYPE, or.constants.WEB_WORKER_ENVIRONMENT_TYPE];
if (browserContexts.indexOf($$.environmentType) !== -1) {
return require("./powerCords/browser/SSAppPowerCord");
}
}
};