[res]
This commit is contained in:
parent
5de4728901
commit
b5b5dde9e3
4 changed files with 2122 additions and 1903 deletions
1033
lib/plankton/plankton.d.ts
vendored
1033
lib/plankton/plankton.d.ts
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -159,11 +159,17 @@ async function main(
|
||||||
) : Promise<void>
|
) : Promise<void>
|
||||||
{
|
{
|
||||||
// init1
|
// init1
|
||||||
lib_plankton.log.conf_push(
|
/*
|
||||||
|
lib_plankton.log.set_main_logger(
|
||||||
[
|
[
|
||||||
lib_plankton.log.channel_make({"kind": "stdout", "data": {"threshold": "info"}}),
|
{
|
||||||
|
"kind": "std",
|
||||||
|
"data": {
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
// args
|
// args
|
||||||
const arg_handler : lib_plankton.args.class_handler = new lib_plankton.args.class_handler({
|
const arg_handler : lib_plankton.args.class_handler = new lib_plankton.args.class_handler({
|
||||||
|
@ -246,20 +252,45 @@ async function main(
|
||||||
"name": "help",
|
"name": "help",
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
const args : Record<string, any> = arg_handler.read(lib_plankton.args.enum_environment.cli, args_raw.join(" "));
|
const args : Record<string, any> = arg_handler.read(
|
||||||
|
lib_plankton.args.enum_environment.cli,
|
||||||
|
args_raw.join(" ")
|
||||||
|
);
|
||||||
|
|
||||||
// init2
|
// init2
|
||||||
await _zeitbild.conf.init(
|
await _zeitbild.conf.init(
|
||||||
args["conf_path"]
|
args["conf_path"]
|
||||||
);
|
);
|
||||||
lib_plankton.log.conf_push(
|
lib_plankton.log.set_main_logger(
|
||||||
_zeitbild.conf.get().log.map(
|
_zeitbild.conf.get().log.map(
|
||||||
(log_output : any) => lib_plankton.log.channel_make(
|
(log_output : any) => {
|
||||||
{
|
switch (log_output.kind) {
|
||||||
"kind": log_output.kind,
|
case "stdout": {
|
||||||
"data": log_output.data
|
return {
|
||||||
|
"kind": "minlevel",
|
||||||
|
"data": {
|
||||||
|
"core": {
|
||||||
|
"kind": "std",
|
||||||
|
"data": {
|
||||||
|
"target": "stdout",
|
||||||
|
"format": {
|
||||||
|
"kind": "human_readable",
|
||||||
|
"data": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"threshold": log_output.data.threshold,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
throw (new Error("unhandled"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
_zeitbild.cache = lib_plankton.cache.chest.implementation<any>(
|
_zeitbild.cache = lib_plankton.cache.chest.implementation<any>(
|
||||||
|
@ -321,9 +352,8 @@ async function main(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "api-doc": {
|
case "api-doc": {
|
||||||
lib_plankton.log.conf_push([]);
|
lib_plankton.log.set_main_logger([]);
|
||||||
const rest_subject : lib_plankton.rest_caldav.type_rest = _zeitbild.api.make();
|
const rest_subject : lib_plankton.rest_caldav.type_rest = _zeitbild.api.make();
|
||||||
lib_plankton.log.conf_pop();
|
|
||||||
process.stdout.write(
|
process.stdout.write(
|
||||||
JSON.stringify(
|
JSON.stringify(
|
||||||
lib_plankton.rest_caldav.to_oas(rest_subject),
|
lib_plankton.rest_caldav.to_oas(rest_subject),
|
||||||
|
|
|
@ -24,9 +24,8 @@ modules="${modules} http"
|
||||||
modules="${modules} webdav"
|
modules="${modules} webdav"
|
||||||
modules="${modules} caldav"
|
modules="${modules} caldav"
|
||||||
modules="${modules} api"
|
modules="${modules} api"
|
||||||
modules="${modules} rest"
|
# modules="${modules} rest_http"
|
||||||
modules="${modules} rest_http"
|
# modules="${modules} rest_webdav"
|
||||||
modules="${modules} rest_webdav"
|
|
||||||
modules="${modules} rest_caldav"
|
modules="${modules} rest_caldav"
|
||||||
modules="${modules} server"
|
modules="${modules} server"
|
||||||
modules="${modules} args"
|
modules="${modules} args"
|
||||||
|
|
Loading…
Add table
Reference in a new issue