[add] outputs
This commit is contained in:
parent
8a33c029c7
commit
10e06afa90
2 changed files with 24 additions and 5 deletions
|
@ -142,6 +142,9 @@ namespace _espe.conf
|
||||||
email_address : (null | string);
|
email_address : (null | string);
|
||||||
}
|
}
|
||||||
>;
|
>;
|
||||||
|
output : {
|
||||||
|
authelia : (null | string);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -311,6 +314,11 @@ namespace _espe.conf
|
||||||
})) (conf_raw["settings"] ?? {})
|
})) (conf_raw["settings"] ?? {})
|
||||||
),
|
),
|
||||||
"admins": (conf_raw["admins"] ?? []),
|
"admins": (conf_raw["admins"] ?? []),
|
||||||
|
"output": (
|
||||||
|
((node_session_output) => ({
|
||||||
|
"authelia": (node_session_output["authelia"] ?? null),
|
||||||
|
})) (conf_raw["output"] ?? {})
|
||||||
|
),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -230,12 +230,23 @@ async function main(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
// outputs
|
||||||
|
{
|
||||||
|
if (_espe.conf.get().output.authelia === null) {
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
else {
|
||||||
_espe.service.member.listen_change(
|
_espe.service.member.listen_change(
|
||||||
async () => {
|
async () => {
|
||||||
const authelia_export : string = await _espe.service.member.export_authelia_user_file();
|
const authelia_export : string = await _espe.service.member.export_authelia_user_file();
|
||||||
process.stdout.write(authelia_export + "\n");
|
lib_plankton.file.write(
|
||||||
|
_espe.conf.get().output.authelia,
|
||||||
|
authelia_export
|
||||||
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const rest_subject : lib_plankton.rest.type_rest = _espe.api.make();
|
const rest_subject : lib_plankton.rest.type_rest = _espe.api.make();
|
||||||
const server : lib_plankton.server.type_subject = lib_plankton.server.make(
|
const server : lib_plankton.server.type_subject = lib_plankton.server.make(
|
||||||
|
|
Loading…
Add table
Reference in a new issue