Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F7319715
main.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
main.js
View Options
var
path
=
require
(
"path"
);
var
Core
=
require
(
"./core.js"
);
var
core_instance
=
null
;
global
.
Sealious
=
{};
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
.
Logger
=
require
(
"./logger/logger.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
){
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
;
var
chip_types_to_start
=
Core
.
decide_chip_types_to_start
(
this
.
mode
,
this
.
layer_name
);
Sealious
.
ChipManager
.
start_chips
(
chip_types_to_start
);
}
module
.
exports
=
Sealious
;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jul 13, 06:51 (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
821617
Default Alt Text
main.js (1 KB)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment