UNPKG

@glodon-aiot/agent-cli-sdk

Version:

aiot agent client js sdk

38 lines (37 loc) 1.42 kB
var s = Object.defineProperty, v = Object.defineProperties; var u = Object.getOwnPropertyDescriptors; var n = Object.getOwnPropertySymbols; var p = Object.prototype.hasOwnProperty, h = Object.prototype.propertyIsEnumerable; var g = (o, t, e) => t in o ? s(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e, i = (o, t) => { for (var e in t || (t = {})) p.call(t, e) && g(o, e, t[e]); if (n) for (var e of n(t)) h.call(t, e) && g(o, e, t[e]); return o; }, l = (o, t) => v(o, u(t)); import d from "./Logger.mjs"; const R = new d("[Config] "); var f = /* @__PURE__ */ ((o) => (o.dev = "https://aiot-dev.glodon.com/api/cvforcepd", o.test = "https://aiot-dev.glodon.com/api/cvforce", o.prod = "https://copilot.glodon.com/api/cvforce", o.local = "http://localhost:3000/api/cvforcepd", o))(f || {}); let c = { debug: !1, env: "prod", //AIoT 环境, 与apiRoot配对使用 apiRoot: "https://copilot.glodon.com/api/cvforce", //https://${hostname}/${PRODUCD_CODE} applicationId: "", plugins: {}, mcp: void 0, loadRelatedQuesions: !0, stream: !1 }; function w(o) { d.debug = (o == null ? void 0 : o.debug) || !1, c = l(i(i({}, c), o), { apiRoot: (o == null ? void 0 : o.apiRoot) || c.apiRoot || (o != null && o.env ? f[o.env || "prod"] : c.apiRoot) }), d.debug && R.log("updated", c); } export { f as ApiUrl, c as configuration, w as configure };