UNPKG

node-red-contrib-home-assistant-websocket

Version:
25 lines (24 loc) 740 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getExposedSettings = getExposedSettings; const const_1 = require("../const"); const migrate_1 = require("./migrate"); const utils_1 = require("./utils"); function getExposedSettings(type) { const name = (0, utils_1.toCamelCase)(type).replace(/-/g, ''); const expose = { settings: { [`${name}Version`]: { value: (0, migrate_1.getCurrentVersion)(type), exportable: true, }, }, }; if (type === const_1.NodeType.Server) { expose.credentials = { host: { type: 'text' }, access_token: { type: 'text' }, }; } return expose; }