feat(daemon): expose environment info for editor extensions
This commit is contained in:
1 parent
ad3f4725ef
commit
9a6f209f5b
8 files changed
+67
-2
No files matched your search
@@ -1670,6 +1670,22 @@ DaemonServer::Impl::DispatchResult DaemonServer::Impl::dispatch(std::string_view
|
||||
object.emplace("rescan_required", JsonValue{batch->rescan_required});
|
||||
return {serialize_response(JsonValue{std::move(object)}), false};
|
||||
}
|
||||
if (*name == "info") {
|
||||
JsonValue::Object object;
|
||||
object.emplace("ok", JsonValue{true});
|
||||
object.emplace("op", JsonValue{std::string{"info"}});
|
||||
object.emplace("version", JsonValue{std::string{Bootstrap::version}});
|
||||
object.emplace("os", JsonValue{std::string{Bootstrap::os}});
|
||||
object.emplace("architecture", JsonValue{std::string{Bootstrap::architecture}});
|
||||
object.emplace("project_root", JsonValue{options.project_root.string()});
|
||||
object.emplace("build_root", JsonValue{options.build_root.string()});
|
||||
object.emplace(
|
||||
"lock_root",
|
||||
JsonValue{
|
||||
(options.lock_root.empty() ? options.project_root : options.lock_root).string()});
|
||||
object.emplace("socket", JsonValue{socket_path.string()});
|
||||
return {serialize_response(JsonValue{std::move(object)}), false};
|
||||
}
|
||||
if (*name == "editor_status") {
|
||||
return {editor_status_project(options), false};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user