UNPKG

@itwin/core-backend

Version:
33 lines 1.38 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DevToolsRpcImpl = void 0; const core_common_1 = require("@itwin/core-common"); const DevTools_1 = require("../DevTools"); /** The backend implementation of DevToolsRpcInterface. * @internal */ class DevToolsRpcImpl extends core_common_1.RpcInterface { static register() { core_common_1.RpcManager.registerImpl(core_common_1.DevToolsRpcInterface, DevToolsRpcImpl); } // Returns true if the backend received the ping async ping(_tokenProps) { return DevTools_1.DevTools.ping(); } // Returns JSON object with statistics async stats(_tokenProps, options) { const stats = DevTools_1.DevTools.stats(); if (options === core_common_1.DevToolsStatsOptions.None) return stats; const formattedStats = DevTools_1.DevToolsStatsFormatter.toFormattedJson(stats); return formattedStats; } // Returns JSON object with backend versions (application and iModelJs) async versions(_tokenProps) { return DevTools_1.DevTools.versions(); } // Sets up a log level at the backend async setLogLevel(_tokenProps, loggerCategory, logLevel) { return DevTools_1.DevTools.setLogLevel(loggerCategory, logLevel); } } exports.DevToolsRpcImpl = DevToolsRpcImpl; //# sourceMappingURL=DevToolsRpcImpl.js.map