Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22401512
main.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
main.js
View Options
var
path
=
require
(
"path"
);
var
Sealious
=
{};
module
.
exports
=
Sealious
;
var
core_instance
=
null
;
var
Core
=
require
(
"./core.js"
);
Sealious
.
Errors
=
require
(
"./response/error.js"
);
Sealious
.
Response
=
require
(
"./response/response.js"
);
Sealious
.
File
=
require
(
"./data-structures/file.js"
);
Sealious
.
ChipManager
=
require
(
"./chip-types/chip-manager.js"
);
Sealious
.
ConfigManager
=
require
(
"./config/config-manager.js"
);
Sealious
.
PluginManager
=
require
(
"./plugins/plugin-manager.js"
);
Sealious
.
Dispatcher
=
null
;
Sealious
.
Context
=
require
(
"./context.js"
);
Sealious
.
ResourceManager
=
require
(
"./core-services/resource-manager.js"
);
Sealious
.
ChipTypes
=
{
"AccessStrategy"
:
require
(
"./chip-types/access-strategy.js"
),
"Channel"
:
require
(
"./chip-types/channel.js"
),
"Datastore"
:
require
(
"./chip-types/datastore.js"
),
"FieldType"
:
require
(
"./chip-types/field-type.js"
),
"ResourceType"
:
require
(
"./chip-types/resource-type.js"
),
}
for
(
var
chip_type_name
in
Sealious
.
ChipTypes
)
{
//Sealious.ChipTypes[chip_type_name] = Sealious.ChipTypes[chip_type_name].bind(Sealious.ChipTypes[chip_type_name], null); //null here corresponds to "module_path" of chip's constructor
}
Sealious
.
init
=
function
(
mode
,
layer_name
){
Sealious
.
Logger
=
require
(
"./logger/logger.js"
);
require
(
"./base-chips/_base-chips.js"
);
Sealious
.
PluginManager
.
load_plugins
();
this
.
mode
=
mode
?
mode
:
"local"
;
this
.
layer_name
=
layer_name
?
layer_name
:
null
;
}
Sealious
.
start
=
function
(){
Core
.
check_version
();
var
dispatcher
=
Core
.
get_dispatcher
(
this
.
mode
,
this
.
layer_name
);
dispatcher
.
init
();
dispatcher
.
start
();
Sealious
.
Dispatcher
=
dispatcher
;
return
Sealious
.
ChipManager
.
start_chips
();
}
Sealious
.
test
=
function
(){
var
things_to_test
=
[
Sealious
.
ResourceManager
,
Sealious
.
ChipTypes
.
FieldType
,
require
(
"./chip-types/resource-type-field"
),
]
Sealious
.
init
();
things_to_test
.
forEach
(
function
(
thing
){
thing
.
test_init
&&
thing
.
test_init
();
})
Sealious
.
start
().
then
(
function
(){
things_to_test
.
forEach
(
function
(
thing
){
thing
.
test_start
&&
thing
.
test_start
();
})
run
();
//function created by Mocha. Present only if Mocha is run with --delay option from the command line (as it is when running `npm test`)
})
}
module
.
exports
=
Sealious
;
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Fri, Nov 27, 18:21 (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1229362
Default Alt Text
main.js (2 KB)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline