openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
57 lines • 2.58 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Protocol = void 0;
exports.getResponder = getResponder;
const tslib_1 = require("tslib");
// ⚠️ MUST stay above the `debug` import: loading `debug` deletes an empty DEBUG from
// the environment, so the value has to be read before that happens. Pinned by the
// import-order test in util/captured-debug-env.spec.ts (homebridge/ciao#72).
const captured_debug_env_1 = require("./util/captured-debug-env");
const debug_1 = tslib_1.__importDefault(require("debug"));
const prerelease_debug_1 = require("./util/prerelease-debug");
// eslint-disable-next-line @typescript-eslint/no-require-imports
const version = require("../package.json").version;
// enable debug output if beta version or running bonjour conformance testing,
// unless DEBUG is explicitly set to empty to decline it
const prereleaseNamespaces = (0, prerelease_debug_1.prereleaseDebugNamespaces)(version, captured_debug_env_1.capturedDebugEnv, !!process.env.BCT);
if (prereleaseNamespaces) {
debug_1.default.enable(prereleaseNamespaces);
}
require("./coder/records/index");
const Responder_1 = require("./Responder");
tslib_1.__exportStar(require("./CiaoService"), exports);
tslib_1.__exportStar(require("./Responder"), exports);
function printInitInfo() {
const debug = (0, debug_1.default)("ciao:init");
debug("Loading ciao v" + version + "...");
}
printInitInfo();
/**
* Defines the transport protocol of a service.
*
* As of RFC 6763 7. TCP must be used for any applications using tcp.
* For applications using any other transport protocol UDP must be used.
* This applies to all other transport protocols like SCTP, DCCP, RTMFP, etc
*/
var Protocol;
(function (Protocol) {
Protocol["TCP"] = "tcp";
Protocol["UDP"] = "udp";
})(Protocol || (exports.Protocol = Protocol = {}));
/**
* This method is used to get a responder for the provided (optional) set of options.
*
* Ciao tries to create as few Responder instances as possible.
* Thus, it will share the same Responder instance for the same set of options.
* A custom logger receives a dedicated responder so diagnostic destinations remain isolated.
*
* @param options - If specified, the options will be passed to the underlying mdns server.
* @returns A Responder instance for the given options. Might be shared with others using the same options.
*/
function getResponder(options) {
return Responder_1.Responder.getResponder(options);
}
exports.default = {
getResponder: getResponder,
};
//# sourceMappingURL=runtime.js.map