From a85b9a4789212239f64b81db3957e7298d560f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20M=C3=BCller?= Date: Sun, 20 Aug 2023 14:48:05 +0200 Subject: [PATCH] Updated dependencies --- README.md | 4 + build/main.js.map | 4 +- build/remote-server.js | 4 +- build/remote-server.js.map | 4 +- build/sensor.js | 4 +- build/sensor.js.map | 4 +- package-lock.json | 2200 +++++++++++++----------------------- package.json | 12 +- src/main.ts | 1 - src/remote-server.ts | 6 +- src/sensor.ts | 4 +- 11 files changed, 795 insertions(+), 1452 deletions(-) diff --git a/README.md b/README.md index f2ec87d..bae6988 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,10 @@ Dies ist ein ioBroker-Adapter zur Integration von DS18B20 1-Wire Temperatursenso Placeholder for the next version (at the beginning of the line): ### **WORK IN PROGRESS** --> +### **WORK IN PROGRESS** + +* (crycode-de) Dependency updates + ### 2.0.2 (2023-07-23) * (crycode-de) Fixed bug on sensor migration diff --git a/build/main.js.map b/build/main.js.map index 3c8a419..5bab45e 100644 --- a/build/main.js.map +++ b/build/main.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../src/main.ts"], - "sourcesContent": ["/**\n * ioBroker DS18B20 1-wire temperature sensor adapter.\n *\n * (C) 2019-2023 Peter M\u00FCller (https://github.com/crycode-de/ioBroker.ds18b20)\n */\n\nimport 'source-map-support/register';\n\nimport { readFile, readdir } from 'fs/promises';\n\n\nimport * as crypto from 'crypto';\n\nimport {\n Adapter,\n AdapterOptions,\n EXIT_CODES,\n} from '@iobroker/adapter-core';\n\nimport { boundMethod } from 'autobind-decorator';\n\nimport { Sensor } from './sensor';\n\nimport { RemoteSensorServer } from './remote-server';\nimport { genHexString } from './lib/utils';\nimport { i18n } from './lib/i18n';\n\n/**\n * The ds18b20 adapter.\n */\nclass Ds18b20Adapter extends Adapter {\n\n /**\n * Mapping of the ioBroker object IDs to the sensor class instances.\n */\n private sensors: Record = {};\n\n /**\n * The server for remote sensors if enabled.\n */\n public remoteSensorServer: RemoteSensorServer | null = null;\n\n /**\n * Internal indicator if we are doing a migration from an old version.\n */\n private doingMigration: boolean = false;\n\n /**\n * Constructor to create a new instance of the adapter.\n * @param options The adapter options.\n */\n public constructor(options: Partial = {}) {\n super({\n ...options,\n name: 'ds18b20',\n });\n\n this.on('ready', this.onReady);\n this.on('stateChange', this.onStateChange);\n this.on('message', this.onMessage);\n this.on('unload', this.onUnload);\n }\n\n /**\n * Is called when databases are connected and adapter received configuration.\n */\n @boundMethod\n private async onReady(): Promise {\n // Reset the connection indicator during startup\n this.setState('info.connection', false, true);\n\n // try to get the system language\n const systemConfig = await this.getForeignObjectAsync('system.config');\n i18n.language = systemConfig?.common.language || 'en';\n\n // set default devices path if not defined\n if (!this.config.w1DevicesPath) {\n this.config.w1DevicesPath = '/sys/bus/w1/devices';\n }\n\n // need to upgrade config from old version (<2.0.0)?\n if (Object.keys(this.config).includes('_values')) {\n this.log.info('Migrate config from old version ...');\n this.doingMigration = true;\n\n const instanceObj = await this.getForeignObjectAsync(`system.adapter.${this.namespace}`);\n if (!instanceObj) {\n this.log.error('Could not read instance object!');\n this.terminate('Config migration required', EXIT_CODES.INVALID_ADAPTER_CONFIG);\n return;\n }\n\n const oldNative: ioBroker.AdapterConfigV1 = instanceObj.native as ioBroker.AdapterConfigV1;\n\n const newNative: ioBroker.AdapterConfig = {\n defaultInterval: oldNative.defaultInterval,\n remoteEnabled: oldNative.remoteEnabled,\n remoteKey: '', // a new remote key must be created in admin!\n remotePort: oldNative.remotePort,\n w1DevicesPath: oldNative.w1DevicesPath,\n sensors: [],\n };\n\n // log warning if remote is enabled\n if (newNative.remoteEnabled) {\n this.log.warn('You have remote sensor enabled. It is required to set a new remote key in admin and update the remote configs!');\n }\n\n // sort the old sensors by given sortOrder\n oldNative._values.sort((a, b) => {\n if (typeof a.sortOrder === 'number' && typeof b.sortOrder === 'number') {\n return a.sortOrder - b.sortOrder;\n }\n return 0;\n });\n\n // migrate sensors\n for (const oldSensor of oldNative._values) {\n\n const sensor: ioBroker.AdapterConfigSensor = {\n address: oldSensor.address,\n remoteSystemId: oldSensor.remoteSystemId ?? '',\n name: oldSensor.name || oldSensor.address,\n interval: oldSensor.interval ?? null,\n unit: oldSensor.unit ?? '\u00B0C',\n factor: oldSensor.factor ?? 1,\n offset: oldSensor.offset ?? 0,\n decimals: oldSensor.decimals ?? 2,\n nullOnError: !!oldSensor.nullOnError,\n enabled: !!oldSensor.enabled,\n };\n\n this.log.info(`Migrate sensor ${JSON.stringify(sensor)}`);\n newNative.sensors.push(sensor);\n\n // remove native part from the sensor object\n const sensorObj = await this.getObjectAsync(`sensors.${sensor.address}`);\n if (sensorObj) {\n sensorObj.native = {};\n await this.setObjectAsync(`sensors.${sensor.address}`, sensorObj);\n }\n }\n\n // delete some objects - they will be recreated on adapter restart\n await Promise.all([\n this.delObjectAsync('actions'),\n this.delObjectAsync('actions.readNow'),\n this.delObjectAsync('info'),\n this.delObjectAsync('info.connection'),\n this.delObjectAsync('sensors'),\n ]);\n\n instanceObj.native = newNative;\n this.log.info('Rewriting adapter config');\n await this.setForeignObjectAsync(`system.adapter.${this.namespace}`, instanceObj);\n this.terminate('Restart adapter to apply config changes', EXIT_CODES.START_IMMEDIATELY_AFTER_STOP);\n return;\n }\n\n // remote sensor server\n if (this.config.remoteEnabled) {\n // check the port\n if (!this.config.remotePort || this.config.remotePort <= 0) {\n this.log.warn('Config: Invalid port for the remote sensor server! Using default port 1820.');\n this.config.remotePort = 1820;\n }\n\n // check the key\n if (typeof this.config.remoteKey !== 'string' || this.config.remoteKey.length !== 64) {\n this.config.remoteKey = crypto.randomBytes(32).toString('hex');\n this.log.error(`Config: Invalid key for the remote sensor server! Using random key \"${this.config.remoteKey}\".`);\n }\n\n // setup info state for connected remote systems\n await this.extendObjectAsync('info.remotesConnected', {\n type: 'state',\n common: {\n name: i18n.getStringOrTranslated('Connected remote systems'),\n type: 'string',\n role: 'state',\n read: true,\n write: false,\n def: '',\n },\n native: {},\n });\n this.setState('info.remotesConnected', '', true);\n\n this.remoteSensorServer = new RemoteSensorServer(this.config.remotePort, this.config.remoteKey, this);\n\n this.remoteSensorServer.on('listening', () => {\n this.log.info(`Remote sensor server is listening on port ${this.config.remotePort}`);\n this.updateInfoConnection();\n });\n\n this.remoteSensorServer.on('error', (err: Error) => {\n this.log.warn(`Remote sensor server error: ${err.toString()}`);\n this.log.debug(`${err.toString()} ${err.stack}`);\n this.updateInfoConnection();\n });\n\n this.remoteSensorServer.on('remotesChanged', (remotes: string[]) => {\n this.setState('info.remotesConnected', remotes.join(','), true);\n });\n\n } else {\n // remote systems disabled - delete info object if exists\n if (await this.getObjectAsync('info.remotesConnected')) {\n await this.delObjectAsync('info.remotesConnected');\n }\n }\n\n // setup sensors\n if (!Array.isArray(this.config.sensors)) {\n this.config.sensors = [];\n }\n for (const sensorCfg of this.config.sensors) {\n if (!/^[0-9a-f]{2}-[0-9a-f]{12}$/.test(sensorCfg.address)) {\n this.log.warn(`Invalid sensor address configured: ${sensorCfg.address}`);\n continue;\n }\n\n if (this.sensors[sensorCfg.address]) {\n this.log.warn(`Sensor ${sensorCfg.address} is configured twice! Ignoring the all expect the first.`);\n continue;\n }\n\n if (sensorCfg.remoteSystemId && !this.config.remoteEnabled) {\n this.log.warn(`Sensor ${sensorCfg.address} is configured as remote sensor of ${sensorCfg.remoteSystemId} but remote sensors are not enabled!`);\n continue;\n }\n\n // create/update object\n const name = sensorCfg.name || sensorCfg.address;\n await this.extendObjectAsync(`sensors.${sensorCfg.address}`, {\n type: 'state',\n common: {\n name: sensorCfg.enabled ? name : i18n.getStringOrTranslated('%s (disabled)', name),\n type: 'number',\n role: 'value.temperature',\n unit: sensorCfg.unit || '\u00B0C',\n read: true,\n write: false,\n def: null,\n icon: sensorCfg.enabled ? 'ds18b20.png' : 'sensor_disabled.png',\n },\n native: {},\n });\n\n // stop here if sensor is not enabled\n if (!sensorCfg.enabled) {\n this.log.debug(`Sensor ${sensorCfg.address} is not enabled`);\n continue;\n }\n\n // init the sensor\n let interval: number;\n if (typeof sensorCfg.interval === 'number') {\n interval = sensorCfg.interval;\n } else if (typeof sensorCfg.interval === 'string' && sensorCfg.interval.length > 0) {\n interval = parseInt(sensorCfg.interval, 10);\n if (isNaN(interval)) {\n this.log.warn(`Query interval for sensor ${sensorCfg.address} is invalid! Using default.`);\n interval = this.config.defaultInterval;\n }\n } else {\n interval = this.config.defaultInterval;\n }\n this.sensors[sensorCfg.address] = new Sensor({\n w1DevicesPath: this.config.w1DevicesPath,\n address: sensorCfg.address,\n interval,\n nullOnError: !!sensorCfg.nullOnError,\n factor: typeof sensorCfg.factor === 'number' ? sensorCfg.factor : 1,\n offset: typeof sensorCfg.offset === 'number' ? sensorCfg.offset : 0,\n decimals: typeof sensorCfg.decimals === 'number' ? sensorCfg.decimals : null,\n remoteSystemId: typeof sensorCfg.remoteSystemId === 'string' ? sensorCfg.remoteSystemId : null,\n }, this);\n this.sensors[sensorCfg.address].on('value', this.handleSensorValue);\n this.sensors[sensorCfg.address].on('error', this.handleSensorError);\n this.sensors[sensorCfg.address].on('errorStateChanged', this.handleSensorErrorStateChanged);\n }\n\n const count = Object.keys(this.sensors).length;\n this.log.debug(`Loaded ${count} enabled sensors`);\n\n if (count === 0) {\n this.log.warn('No sensors configured or enabled!');\n }\n\n // check for sensor objects not configured\n const objListSensors = await this.getObjectListAsync({\n startkey: `${this.namespace}.sensors.`,\n endkey: `${this.namespace}.sensors.\\u9999`,\n });\n const reAddress = new RegExp(`^${this.name}\\\\.${this.instance}\\\\.sensors\\\\.(.+)$`);\n for (const item of objListSensors.rows) {\n const m = item.id.match(reAddress);\n if (m) {\n const addr = m[1];\n if (!this.config.sensors.find((s) => s.address === addr)) {\n // not configured\n this.log.info(`Delete object ${item.id} since sensor is not configured`);\n await this.delObjectAsync(item.id);\n }\n }\n }\n\n // subscribe needed states\n this.subscribeStates('actions.*');\n }\n\n /**\n * Is called when adapter shuts down - callback has to be called under any circumstances!\n */\n @boundMethod\n private async onUnload(callback: () => void): Promise {\n try {\n // stop all intervals from the sensors\n for (const address in this.sensors) {\n this.sensors[address].stop();\n }\n\n // stop the remote sensor server\n if (this.remoteSensorServer) {\n await this.remoteSensorServer.stop();\n await this.setStateAsync('info.remotesConnected', '' , true);\n }\n\n // reset connection state\n if (!this.doingMigration) {\n await this.setStateAsync('info.connection', false, true);\n }\n\n } catch(e) { }\n\n callback();\n }\n\n /**\n * Handler for incoming sensor values.\n * @param value The value or null in case of an error.\n * @param address The Address of the sensor.\n */\n @boundMethod\n private handleSensorValue (value: number | null, address: string): void {\n if (!this.sensors[address]) return;\n\n this.log.debug(`Got value ${value} from sensor ${address}`);\n\n if (value === null) {\n this.setStateAsync(`sensors.${address}`, {\n ack: true,\n val: null,\n q: 0x81, // general problem by sensor\n });\n } else {\n this.setStateAsync(`sensors.${address}`, {\n ack: true,\n val: value,\n });\n }\n }\n\n /**\n * Handler for sensor errors.\n * @param err The error.\n * @param address The address of the sensor.\n */\n @boundMethod\n private handleSensorError (err: Error, address: string): void {\n this.log.warn(`Error reading sensor ${address}: ${err}`);\n }\n\n /**\n * Handler for changes of error state of a sensor.\n * This will change the info.connection state of the adapter to true if all\n * sensors are ok and false if at least one sensor has an error.\n * @param hasError Indicator if the sensor has an error or not.\n * @param address The address of the sensor.\n */\n @boundMethod\n private handleSensorErrorStateChanged (hasError: boolean, address: string): void {\n this.log.debug(`Error state of sensor ${address} changed to ${hasError}`);\n\n this.extendObjectAsync(`sensors.${address}`, {\n common: {\n icon: hasError ? 'sensor_error.png' : 'sensor_ok.png',\n },\n });\n\n this.updateInfoConnection();\n }\n\n /**\n * Update the info.connection state depending on the error state of all\n * sensors and the listening state of the remote sensor server.\n */\n private updateInfoConnection (): void {\n // check if remote sensor server is listening if enabled\n if (this.remoteSensorServer && !this.remoteSensorServer.isListening()) {\n // server enabled but not listening\n this.setStateAsync('info.connection', false, true);\n return;\n }\n\n // are any sensors available?\n if (Object.keys(this.sensors).length === 0) {\n // no sensors\n this.setStateAsync('info.connection', false, true);\n return;\n }\n\n // check all sensors for errors\n for (const address in this.sensors) {\n if (this.sensors[address].hasError) {\n // at least one sensor has an error, set connection state to false\n this.setStateAsync('info.connection', false, true);\n return;\n }\n }\n\n // all sensors are ok, set connection state to true\n this.setStateAsync('info.connection', true, true);\n }\n\n /**\n * Get a defined sensor from it's ioBroker ID or 1-wire address.\n * @param idOrAddress The ID or address of the sensor.\n * @return The sensor or null.\n */\n public getSensor (idOrAddress: string): Sensor | null {\n if (this.sensors[idOrAddress]) return this.sensors[idOrAddress];\n\n // check id\n const m = /^ds18b20\\.\\d+\\.sensors\\.(.+)$/.exec(idOrAddress);\n if (m && this.sensors[m[1]]) {\n return this.sensors[m[1]];\n }\n\n return null;\n }\n\n /**\n * Trigger the reading of a single sensor or all sensors.\n * If all sensor should be read, errors on single sensors will be represented by `null` values.\n * @param idOrAddress The ioBroker ID or 1-wire address of the sensor. Use `all` or an empty string to read all sensors.\n * @throws Error if a single sensor should be read and an error occurs.\n */\n private async readNow (): Promise>;\n private async readNow (idOrAddress: undefined): Promise>;\n private async readNow (idOrAddress: 'all' | ''): Promise>;\n private async readNow (idOrAddress: string): Promise;\n private async readNow (idOrAddress?: string): Promise | number | null> {\n if (typeof idOrAddress !== 'string' || idOrAddress === 'all' || idOrAddress === '') {\n // read all sensors\n this.log.info(`Read data from all sensors now`);\n const results: Record = {};\n for (const address in this.sensors) {\n try {\n results[address] = await this.sensors[address].read();\n } catch (err) {\n results[address] = null;\n }\n }\n\n return results;\n\n } else {\n // read a specific sensor\n const sens = this.getSensor(idOrAddress);\n\n if (!sens) {\n this.log.warn(`No sensor with address or id ${idOrAddress} found!`);\n return null;\n }\n\n this.log.info(`Read data from sensor ${sens.address} now`);\n return await sens.read();\n }\n }\n\n /**\n * Search for local and remote sensors.\n * @returns Array of the found sensors\n */\n private async searchSensors (): Promise {\n const sensors: SearchedSensor[] = [];\n\n // local sensors\n try {\n const files = await readdir(this.config.w1DevicesPath);\n\n const proms: Promise[] = [];\n for (const file of files) {\n if (/^w1_bus_master\\d+$/.test(file)) { // devices path used\n this.log.debug(`Reading ${this.config.w1DevicesPath}/${file}/w1_master_slaves`);\n proms.push(readFile(`${this.config.w1DevicesPath}/${file}/w1_master_slaves`, 'utf8'));\n } else if (file === 'w1_master_slaves') { // path of one w1_bus_masterX used\n this.log.debug(`Reading ${this.config.w1DevicesPath}/w1_master_slaves`);\n proms.push(readFile(`${this.config.w1DevicesPath}/w1_master_slaves`, 'utf8'));\n }\n }\n\n const localSensors: SearchedSensor[] = (await Promise.all(proms)).reduce((acc, cur) => {\n acc.push(...cur.trim().split('\\n'));\n return acc;\n }, []).map((addr) => ({ address: addr, remoteSystemId: '' }));\n\n sensors.push(...localSensors);\n\n } catch (er: any) {\n this.log.warn(`Error while searching for local sensors: ${er.toString()}`);\n }\n\n // remote sensors\n if (this.config.remoteEnabled && this.remoteSensorServer) {\n try {\n const remoteSensors = await this.remoteSensorServer.search();\n sensors.push(...remoteSensors);\n } catch (er: any) {\n this.log.warn(`Error while searching for remote sensors: ${er.toString()}`);\n }\n }\n\n this.log.debug(`Sensors found: ${JSON.stringify(sensors)}`);\n\n return sensors;\n }\n\n /**\n * Is called if a subscribed state changes.\n * @param id The ID of the state.\n * @param state The ioBroker state.\n */\n @boundMethod\n private async onStateChange(id: string, state: ioBroker.State | null | undefined): Promise {\n // don't do anything if state is deleted or ack is set\n if (!state || state.ack) {\n return;\n }\n\n // handle special states\n if (id === `${this.namespace}.actions.readNow`) {\n await this.readNow(state.val as string).catch(() => { /* noop */});\n await this.setStateAsync(this.namespace + '.actions.readNow', '', true);\n }\n }\n\n /**\n * Some message was sent to this instance over message box (e.g. by a script).\n * @param obj The received ioBroker message.\n */\n @boundMethod\n private async onMessage(obj: ioBroker.Message): Promise {\n this.log.debug('Got message ' + JSON.stringify(obj));\n\n if (typeof obj === 'object') {\n switch (obj.command) {\n case 'read':\n case 'readNow':\n // we should read sensors now...\n try {\n const value = (typeof obj.message === 'string') ? await this.readNow(obj.message) : await this.readNow();\n if (obj.callback) {\n this.sendTo(obj.from, obj.command, { err: null, value }, obj.callback);\n }\n return;\n } catch (err: any) {\n this.log.debug(err.toString());\n if (obj.callback) {\n this.sendTo(obj.from, obj.command, { err: err.toString(), value: null }, obj.callback);\n }\n }\n break;\n\n case 'getRemoteSystems':\n // get connected remote systems\n // don't do anything if no callback is provided\n if (!obj.callback) return;\n\n if (!this.remoteSensorServer) {\n this.sendTo(obj.from, obj.command, [], obj.callback);\n return;\n }\n this.sendTo(obj.from, obj.command, this.remoteSensorServer.getConnectedSystems(), obj.callback);\n\n break;\n\n case 'getRemoteSystemsAdminUi':\n // get connected remote systems\n // don't do anything if no callback is provided\n if (!obj.callback) return;\n\n let remotes = this.remoteSensorServer?.getConnectedSystems().join(', ');\n if (!remotes) {\n remotes = '---';\n }\n this.sendTo(obj.from, obj.command, remotes, obj.callback);\n\n break;\n\n case 'search':\n case 'searchSensors':\n // search for sensors\n // don't do anything if no callback is provided\n if (!obj.callback) return;\n\n this.sendTo(obj.from, obj.command, { sensors: await this.searchSensors() }, obj.callback);\n\n break;\n\n case 'searchSensorsAdminUi':\n // search for sensors from the admin ui\n // don't do anything if no callback is provided\n if (!obj.callback) return;\n\n const sensors: ioBroker.AdapterConfigSensor[] = [];\n\n // use sensors currently defined in admin ui\n if (typeof obj.message === 'object' && Array.isArray(obj.message.sensors)) {\n sensors.push(...obj.message.sensors);\n }\n\n // search for sensors and add found sensors if not already in\n const foundSensors = await this.searchSensors();\n for (const foundSensor of foundSensors) {\n if (sensors.findIndex((cfgSensor) => (cfgSensor.address === foundSensor.address && cfgSensor.remoteSystemId === foundSensor.remoteSystemId)) < 0) {\n // not in the list... add it\n sensors.push({\n address: foundSensor.address,\n remoteSystemId: foundSensor.remoteSystemId,\n name: '',\n interval: null,\n unit: '\u00B0C',\n factor: 1,\n offset: 0,\n decimals: 2,\n nullOnError: true,\n enabled: true,\n });\n }\n }\n\n // send back the result\n this.sendTo(obj.from, obj.command, { native: { sensors } }, obj.callback);\n\n break;\n\n case 'getNewRemoteKey':\n // don't do anything if no callback is provided\n if (!obj.callback) return;\n\n this.sendTo(obj.from, obj.command, { native: { remoteKey: genHexString(64) } }, obj.callback);\n break;\n }\n }\n }\n\n}\n\nif (require.main !== module) {\n // Export the constructor in compact mode\n module.exports = (options: Partial | undefined) => new Ds18b20Adapter(options);\n} else {\n // otherwise start the instance directly\n (() => new Ds18b20Adapter())();\n}\n\n// export the type of the adapter class to use it in other files\nexport type { Ds18b20Adapter };\n"], - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAMA,sBAAO;AAEP,sBAAkC;AAGlC,aAAwB;AAExB,0BAIO;AAEP,gCAA4B;AAE5B,oBAAuB;AAEvB,2BAAmC;AACnC,mBAA6B;AAC7B,kBAAqB;AAKrB,MAAM,uBAAuB,4BAAQ;AAAA,EAqB5B,YAAY,UAAmC,CAAC,GAAG;AACxD,UAAM;AAAA,MACJ,GAAG;AAAA,MACH,MAAM;AAAA,IACR,CAAC;AApBH,SAAQ,UAAkC,CAAC;AAK3C,SAAO,qBAAgD;AAKvD,SAAQ,iBAA0B;AAYhC,SAAK,GAAG,SAAS,KAAK,OAAO;AAC7B,SAAK,GAAG,eAAe,KAAK,aAAa;AACzC,SAAK,GAAG,WAAW,KAAK,SAAS;AACjC,SAAK,GAAG,UAAU,KAAK,QAAQ;AAAA,EACjC;AAAA,EAMA,MAAc,UAAyB;AAErC,SAAK,SAAS,mBAAmB,OAAO,IAAI;AAG5C,UAAM,eAAe,MAAM,KAAK,sBAAsB,eAAe;AACrE,qBAAK,YAAW,6CAAc,OAAO,aAAY;AAGjD,QAAI,CAAC,KAAK,OAAO,eAAe;AAC9B,WAAK,OAAO,gBAAgB;AAAA,IAC9B;AAGA,QAAI,OAAO,KAAK,KAAK,MAAM,EAAE,SAAS,SAAS,GAAG;AAChD,WAAK,IAAI,KAAK,qCAAqC;AACnD,WAAK,iBAAiB;AAEtB,Y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;AAAA,gBACR,QAAQ;AAAA,gBACR,UAAU;AAAA,gBACV,aAAa;AAAA,gBACb,SAAS;AAAA,cACX,CAAC;AAAA,YACH;AAAA,UACF;AAGA,eAAK,OAAO,IAAI,MAAM,IAAI,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,QAAQ;AAExE;AAAA,QAEF,KAAK;AAEH,cAAI,CAAC,IAAI;AAAU;AAEnB,eAAK,OAAO,IAAI,MAAM,IAAI,SAAS,EAAE,QAAQ,EAAE,eAAW,2BAAa,EAAE,EAAE,EAAE,GAAG,IAAI,QAAQ;AAC5F;AAAA,MACJ;AAAA,IACF;AAAA,EACF;AAEF;AAhlBgB;AAAA,EADd;AAAA,GApCI,eAqCU;AAyPA;AAAA,EADd;AAAA,GA7RI,eA8RU;AA6BN;AAAA,EADR;AAAA,GA1TI,eA2TI;AAyBA;AAAA,EADR;AAAA,GAnVI,eAoVI;AAYA;AAAA,EADR;AAAA,GA/VI,eAgWI;AA0JM;AAAA,EADd;AAAA,GAzfI,eA0fU;AAkBA;AAAA,EADd;AAAA,GA3gBI,eA4gBU;AA2GhB,IAAI,QAAQ,SAAS,QAAQ;AAE3B,SAAO,UAAU,CAAC,YAAiD,IAAI,eAAe,OAAO;AAC/F,OAAO;AAEL,GAAC,MAAM,IAAI,eAAe,GAAG;AAC/B;", + "sourcesContent": ["/**\n * ioBroker DS18B20 1-wire temperature sensor adapter.\n *\n * (C) 2019-2023 Peter M\u00FCller (https://github.com/crycode-de/ioBroker.ds18b20)\n */\n\nimport 'source-map-support/register';\n\nimport { readFile, readdir } from 'fs/promises';\n\nimport * as crypto from 'crypto';\n\nimport {\n Adapter,\n AdapterOptions,\n EXIT_CODES,\n} from '@iobroker/adapter-core';\n\nimport { boundMethod } from 'autobind-decorator';\n\nimport { Sensor } from './sensor';\n\nimport { RemoteSensorServer } from './remote-server';\nimport { genHexString } from './lib/utils';\nimport { i18n } from './lib/i18n';\n\n/**\n * The ds18b20 adapter.\n */\nclass Ds18b20Adapter extends Adapter {\n\n /**\n * Mapping of the ioBroker object IDs to the sensor class instances.\n */\n private sensors: Record = {};\n\n /**\n * The server for remote sensors if enabled.\n */\n public remoteSensorServer: RemoteSensorServer | null = null;\n\n /**\n * Internal indicator if we are doing a migration from an old version.\n */\n private doingMigration: boolean = false;\n\n /**\n * Constructor to create a new instance of the adapter.\n * @param options The adapter options.\n */\n public constructor(options: Partial = {}) {\n super({\n ...options,\n name: 'ds18b20',\n });\n\n this.on('ready', this.onReady);\n this.on('stateChange', this.onStateChange);\n this.on('message', this.onMessage);\n this.on('unload', this.onUnload);\n }\n\n /**\n * Is called when databases are connected and adapter received configuration.\n */\n @boundMethod\n private async onReady(): Promise {\n // Reset the connection indicator during startup\n this.setState('info.connection', false, true);\n\n // try to get the system language\n const systemConfig = await this.getForeignObjectAsync('system.config');\n i18n.language = systemConfig?.common.language || 'en';\n\n // set default devices path if not defined\n if (!this.config.w1DevicesPath) {\n this.config.w1DevicesPath = '/sys/bus/w1/devices';\n }\n\n // need to upgrade config from old version (<2.0.0)?\n if (Object.keys(this.config).includes('_values')) {\n this.log.info('Migrate config from old version ...');\n this.doingMigration = true;\n\n const instanceObj = await this.getForeignObjectAsync(`system.adapter.${this.namespace}`);\n if (!instanceObj) {\n this.log.error('Could not read instance object!');\n this.terminate('Config migration required', EXIT_CODES.INVALID_ADAPTER_CONFIG);\n return;\n }\n\n const oldNative: ioBroker.AdapterConfigV1 = instanceObj.native as ioBroker.AdapterConfigV1;\n\n const newNative: ioBroker.AdapterConfig = {\n defaultInterval: oldNative.defaultInterval,\n remoteEnabled: oldNative.remoteEnabled,\n remoteKey: '', // a new remote key must be created in admin!\n remotePort: oldNative.remotePort,\n w1DevicesPath: oldNative.w1DevicesPath,\n sensors: [],\n };\n\n // log warning if remote is enabled\n if (newNative.remoteEnabled) {\n this.log.warn('You have remote sensor enabled. It is required to set a new remote key in admin and update the remote configs!');\n }\n\n // sort the old sensors by given sortOrder\n oldNative._values.sort((a, b) => {\n if (typeof a.sortOrder === 'number' && typeof b.sortOrder === 'number') {\n return a.sortOrder - b.sortOrder;\n }\n return 0;\n });\n\n // migrate sensors\n for (const oldSensor of oldNative._values) {\n\n const sensor: ioBroker.AdapterConfigSensor = {\n address: oldSensor.address,\n remoteSystemId: oldSensor.remoteSystemId ?? '',\n name: oldSensor.name || oldSensor.address,\n interval: oldSensor.interval ?? null,\n unit: oldSensor.unit ?? '\u00B0C',\n factor: oldSensor.factor ?? 1,\n offset: oldSensor.offset ?? 0,\n decimals: oldSensor.decimals ?? 2,\n nullOnError: !!oldSensor.nullOnError,\n enabled: !!oldSensor.enabled,\n };\n\n this.log.info(`Migrate sensor ${JSON.stringify(sensor)}`);\n newNative.sensors.push(sensor);\n\n // remove native part from the sensor object\n const sensorObj = await this.getObjectAsync(`sensors.${sensor.address}`);\n if (sensorObj) {\n sensorObj.native = {};\n await this.setObjectAsync(`sensors.${sensor.address}`, sensorObj);\n }\n }\n\n // delete some objects - they will be recreated on adapter restart\n await Promise.all([\n this.delObjectAsync('actions'),\n this.delObjectAsync('actions.readNow'),\n this.delObjectAsync('info'),\n this.delObjectAsync('info.connection'),\n this.delObjectAsync('sensors'),\n ]);\n\n instanceObj.native = newNative;\n this.log.info('Rewriting adapter config');\n await this.setForeignObjectAsync(`system.adapter.${this.namespace}`, instanceObj);\n this.terminate('Restart adapter to apply config changes', EXIT_CODES.START_IMMEDIATELY_AFTER_STOP);\n return;\n }\n\n // remote sensor server\n if (this.config.remoteEnabled) {\n // check the port\n if (!this.config.remotePort || this.config.remotePort <= 0) {\n this.log.warn('Config: Invalid port for the remote sensor server! Using default port 1820.');\n this.config.remotePort = 1820;\n }\n\n // check the key\n if (typeof this.config.remoteKey !== 'string' || this.config.remoteKey.length !== 64) {\n this.config.remoteKey = crypto.randomBytes(32).toString('hex');\n this.log.error(`Config: Invalid key for the remote sensor server! Using random key \"${this.config.remoteKey}\".`);\n }\n\n // setup info state for connected remote systems\n await this.extendObjectAsync('info.remotesConnected', {\n type: 'state',\n common: {\n name: i18n.getStringOrTranslated('Connected remote systems'),\n type: 'string',\n role: 'state',\n read: true,\n write: false,\n def: '',\n },\n native: {},\n });\n this.setState('info.remotesConnected', '', true);\n\n this.remoteSensorServer = new RemoteSensorServer(this.config.remotePort, this.config.remoteKey, this);\n\n this.remoteSensorServer.on('listening', () => {\n this.log.info(`Remote sensor server is listening on port ${this.config.remotePort}`);\n this.updateInfoConnection();\n });\n\n this.remoteSensorServer.on('error', (err: Error) => {\n this.log.warn(`Remote sensor server error: ${err.toString()}`);\n this.log.debug(`${err.toString()} ${err.stack}`);\n this.updateInfoConnection();\n });\n\n this.remoteSensorServer.on('remotesChanged', (remotes: string[]) => {\n this.setState('info.remotesConnected', remotes.join(','), true);\n });\n\n } else {\n // remote systems disabled - delete info object if exists\n if (await this.getObjectAsync('info.remotesConnected')) {\n await this.delObjectAsync('info.remotesConnected');\n }\n }\n\n // setup sensors\n if (!Array.isArray(this.config.sensors)) {\n this.config.sensors = [];\n }\n for (const sensorCfg of this.config.sensors) {\n if (!/^[0-9a-f]{2}-[0-9a-f]{12}$/.test(sensorCfg.address)) {\n this.log.warn(`Invalid sensor address configured: ${sensorCfg.address}`);\n continue;\n }\n\n if (this.sensors[sensorCfg.address]) {\n this.log.warn(`Sensor ${sensorCfg.address} is configured twice! Ignoring the all expect the first.`);\n continue;\n }\n\n if (sensorCfg.remoteSystemId && !this.config.remoteEnabled) {\n this.log.warn(`Sensor ${sensorCfg.address} is configured as remote sensor of ${sensorCfg.remoteSystemId} but remote sensors are not enabled!`);\n continue;\n }\n\n // create/update object\n const name = sensorCfg.name || sensorCfg.address;\n await this.extendObjectAsync(`sensors.${sensorCfg.address}`, {\n type: 'state',\n common: {\n name: sensorCfg.enabled ? name : i18n.getStringOrTranslated('%s (disabled)', name),\n type: 'number',\n role: 'value.temperature',\n unit: sensorCfg.unit || '\u00B0C',\n read: true,\n write: false,\n def: null,\n icon: sensorCfg.enabled ? 'ds18b20.png' : 'sensor_disabled.png',\n },\n native: {},\n });\n\n // stop here if sensor is not enabled\n if (!sensorCfg.enabled) {\n this.log.debug(`Sensor ${sensorCfg.address} is not enabled`);\n continue;\n }\n\n // init the sensor\n let interval: number;\n if (typeof sensorCfg.interval === 'number') {\n interval = sensorCfg.interval;\n } else if (typeof sensorCfg.interval === 'string' && sensorCfg.interval.length > 0) {\n interval = parseInt(sensorCfg.interval, 10);\n if (isNaN(interval)) {\n this.log.warn(`Query interval for sensor ${sensorCfg.address} is invalid! Using default.`);\n interval = this.config.defaultInterval;\n }\n } else {\n interval = this.config.defaultInterval;\n }\n this.sensors[sensorCfg.address] = new Sensor({\n w1DevicesPath: this.config.w1DevicesPath,\n address: sensorCfg.address,\n interval,\n nullOnError: !!sensorCfg.nullOnError,\n factor: typeof sensorCfg.factor === 'number' ? sensorCfg.factor : 1,\n offset: typeof sensorCfg.offset === 'number' ? sensorCfg.offset : 0,\n decimals: typeof sensorCfg.decimals === 'number' ? sensorCfg.decimals : null,\n remoteSystemId: typeof sensorCfg.remoteSystemId === 'string' ? sensorCfg.remoteSystemId : null,\n }, this);\n this.sensors[sensorCfg.address].on('value', this.handleSensorValue);\n this.sensors[sensorCfg.address].on('error', this.handleSensorError);\n this.sensors[sensorCfg.address].on('errorStateChanged', this.handleSensorErrorStateChanged);\n }\n\n const count = Object.keys(this.sensors).length;\n this.log.debug(`Loaded ${count} enabled sensors`);\n\n if (count === 0) {\n this.log.warn('No sensors configured or enabled!');\n }\n\n // check for sensor objects not configured\n const objListSensors = await this.getObjectListAsync({\n startkey: `${this.namespace}.sensors.`,\n endkey: `${this.namespace}.sensors.\\u9999`,\n });\n const reAddress = new RegExp(`^${this.name}\\\\.${this.instance}\\\\.sensors\\\\.(.+)$`);\n for (const item of objListSensors.rows) {\n const m = item.id.match(reAddress);\n if (m) {\n const addr = m[1];\n if (!this.config.sensors.find((s) => s.address === addr)) {\n // not configured\n this.log.info(`Delete object ${item.id} since sensor is not configured`);\n await this.delObjectAsync(item.id);\n }\n }\n }\n\n // subscribe needed states\n this.subscribeStates('actions.*');\n }\n\n /**\n * Is called when adapter shuts down - callback has to be called under any circumstances!\n */\n @boundMethod\n private async onUnload(callback: () => void): Promise {\n try {\n // stop all intervals from the sensors\n for (const address in this.sensors) {\n this.sensors[address].stop();\n }\n\n // stop the remote sensor server\n if (this.remoteSensorServer) {\n await this.remoteSensorServer.stop();\n await this.setStateAsync('info.remotesConnected', '' , true);\n }\n\n // reset connection state\n if (!this.doingMigration) {\n await this.setStateAsync('info.connection', false, true);\n }\n\n } catch(e) { }\n\n callback();\n }\n\n /**\n * Handler for incoming sensor values.\n * @param value The value or null in case of an error.\n * @param address The Address of the sensor.\n */\n @boundMethod\n private handleSensorValue (value: number | null, address: string): void {\n if (!this.sensors[address]) return;\n\n this.log.debug(`Got value ${value} from sensor ${address}`);\n\n if (value === null) {\n this.setStateAsync(`sensors.${address}`, {\n ack: true,\n val: null,\n q: 0x81, // general problem by sensor\n });\n } else {\n this.setStateAsync(`sensors.${address}`, {\n ack: true,\n val: value,\n });\n }\n }\n\n /**\n * Handler for sensor errors.\n * @param err The error.\n * @param address The address of the sensor.\n */\n @boundMethod\n private handleSensorError (err: Error, address: string): void {\n this.log.warn(`Error reading sensor ${address}: ${err}`);\n }\n\n /**\n * Handler for changes of error state of a sensor.\n * This will change the info.connection state of the adapter to true if all\n * sensors are ok and false if at least one sensor has an error.\n * @param hasError Indicator if the sensor has an error or not.\n * @param address The address of the sensor.\n */\n @boundMethod\n private handleSensorErrorStateChanged (hasError: boolean, address: string): void {\n this.log.debug(`Error state of sensor ${address} changed to ${hasError}`);\n\n this.extendObjectAsync(`sensors.${address}`, {\n common: {\n icon: hasError ? 'sensor_error.png' : 'sensor_ok.png',\n },\n });\n\n this.updateInfoConnection();\n }\n\n /**\n * Update the info.connection state depending on the error state of all\n * sensors and the listening state of the remote sensor server.\n */\n private updateInfoConnection (): void {\n // check if remote sensor server is listening if enabled\n if (this.remoteSensorServer && !this.remoteSensorServer.isListening()) {\n // server enabled but not listening\n this.setStateAsync('info.connection', false, true);\n return;\n }\n\n // are any sensors available?\n if (Object.keys(this.sensors).length === 0) {\n // no sensors\n this.setStateAsync('info.connection', false, true);\n return;\n }\n\n // check all sensors for errors\n for (const address in this.sensors) {\n if (this.sensors[address].hasError) {\n // at least one sensor has an error, set connection state to false\n this.setStateAsync('info.connection', false, true);\n return;\n }\n }\n\n // all sensors are ok, set connection state to true\n this.setStateAsync('info.connection', true, true);\n }\n\n /**\n * Get a defined sensor from it's ioBroker ID or 1-wire address.\n * @param idOrAddress The ID or address of the sensor.\n * @return The sensor or null.\n */\n public getSensor (idOrAddress: string): Sensor | null {\n if (this.sensors[idOrAddress]) return this.sensors[idOrAddress];\n\n // check id\n const m = /^ds18b20\\.\\d+\\.sensors\\.(.+)$/.exec(idOrAddress);\n if (m && this.sensors[m[1]]) {\n return this.sensors[m[1]];\n }\n\n return null;\n }\n\n /**\n * Trigger the reading of a single sensor or all sensors.\n * If all sensor should be read, errors on single sensors will be represented by `null` values.\n * @param idOrAddress The ioBroker ID or 1-wire address of the sensor. Use `all` or an empty string to read all sensors.\n * @throws Error if a single sensor should be read and an error occurs.\n */\n private async readNow (): Promise>;\n private async readNow (idOrAddress: undefined): Promise>;\n private async readNow (idOrAddress: 'all' | ''): Promise>;\n private async readNow (idOrAddress: string): Promise;\n private async readNow (idOrAddress?: string): Promise | number | null> {\n if (typeof idOrAddress !== 'string' || idOrAddress === 'all' || idOrAddress === '') {\n // read all sensors\n this.log.info(`Read data from all sensors now`);\n const results: Record = {};\n for (const address in this.sensors) {\n try {\n results[address] = await this.sensors[address].read();\n } catch (err) {\n results[address] = null;\n }\n }\n\n return results;\n\n } else {\n // read a specific sensor\n const sens = this.getSensor(idOrAddress);\n\n if (!sens) {\n this.log.warn(`No sensor with address or id ${idOrAddress} found!`);\n return null;\n }\n\n this.log.info(`Read data from sensor ${sens.address} now`);\n return await sens.read();\n }\n }\n\n /**\n * Search for local and remote sensors.\n * @returns Array of the found sensors\n */\n private async searchSensors (): Promise {\n const sensors: SearchedSensor[] = [];\n\n // local sensors\n try {\n const files = await readdir(this.config.w1DevicesPath);\n\n const proms: Promise[] = [];\n for (const file of files) {\n if (/^w1_bus_master\\d+$/.test(file)) { // devices path used\n this.log.debug(`Reading ${this.config.w1DevicesPath}/${file}/w1_master_slaves`);\n proms.push(readFile(`${this.config.w1DevicesPath}/${file}/w1_master_slaves`, 'utf8'));\n } else if (file === 'w1_master_slaves') { // path of one w1_bus_masterX used\n this.log.debug(`Reading ${this.config.w1DevicesPath}/w1_master_slaves`);\n proms.push(readFile(`${this.config.w1DevicesPath}/w1_master_slaves`, 'utf8'));\n }\n }\n\n const localSensors: SearchedSensor[] = (await Promise.all(proms)).reduce((acc, cur) => {\n acc.push(...cur.trim().split('\\n'));\n return acc;\n }, []).map((addr) => ({ address: addr, remoteSystemId: '' }));\n\n sensors.push(...localSensors);\n\n } catch (er: any) {\n this.log.warn(`Error while searching for local sensors: ${er.toString()}`);\n }\n\n // remote sensors\n if (this.config.remoteEnabled && this.remoteSensorServer) {\n try {\n const remoteSensors = await this.remoteSensorServer.search();\n sensors.push(...remoteSensors);\n } catch (er: any) {\n this.log.warn(`Error while searching for remote sensors: ${er.toString()}`);\n }\n }\n\n this.log.debug(`Sensors found: ${JSON.stringify(sensors)}`);\n\n return sensors;\n }\n\n /**\n * Is called if a subscribed state changes.\n * @param id The ID of the state.\n * @param state The ioBroker state.\n */\n @boundMethod\n private async onStateChange(id: string, state: ioBroker.State | null | undefined): Promise {\n // don't do anything if state is deleted or ack is set\n if (!state || state.ack) {\n return;\n }\n\n // handle special states\n if (id === `${this.namespace}.actions.readNow`) {\n await this.readNow(state.val as string).catch(() => { /* noop */});\n await this.setStateAsync(this.namespace + '.actions.readNow', '', true);\n }\n }\n\n /**\n * Some message was sent to this instance over message box (e.g. by a script).\n * @param obj The received ioBroker message.\n */\n @boundMethod\n private async onMessage(obj: ioBroker.Message): Promise {\n this.log.debug('Got message ' + JSON.stringify(obj));\n\n if (typeof obj === 'object') {\n switch (obj.command) {\n case 'read':\n case 'readNow':\n // we should read sensors now...\n try {\n const value = (typeof obj.message === 'string') ? await this.readNow(obj.message) : await this.readNow();\n if (obj.callback) {\n this.sendTo(obj.from, obj.command, { err: null, value }, obj.callback);\n }\n return;\n } catch (err: any) {\n this.log.debug(err.toString());\n if (obj.callback) {\n this.sendTo(obj.from, obj.command, { err: err.toString(), value: null }, obj.callback);\n }\n }\n break;\n\n case 'getRemoteSystems':\n // get connected remote systems\n // don't do anything if no callback is provided\n if (!obj.callback) return;\n\n if (!this.remoteSensorServer) {\n this.sendTo(obj.from, obj.command, [], obj.callback);\n return;\n }\n this.sendTo(obj.from, obj.command, this.remoteSensorServer.getConnectedSystems(), obj.callback);\n\n break;\n\n case 'getRemoteSystemsAdminUi':\n // get connected remote systems\n // don't do anything if no callback is provided\n if (!obj.callback) return;\n\n let remotes = this.remoteSensorServer?.getConnectedSystems().join(', ');\n if (!remotes) {\n remotes = '---';\n }\n this.sendTo(obj.from, obj.command, remotes, obj.callback);\n\n break;\n\n case 'search':\n case 'searchSensors':\n // search for sensors\n // don't do anything if no callback is provided\n if (!obj.callback) return;\n\n this.sendTo(obj.from, obj.command, { sensors: await this.searchSensors() }, obj.callback);\n\n break;\n\n case 'searchSensorsAdminUi':\n // search for sensors from the admin ui\n // don't do anything if no callback is provided\n if (!obj.callback) return;\n\n const sensors: ioBroker.AdapterConfigSensor[] = [];\n\n // use sensors currently defined in admin ui\n if (typeof obj.message === 'object' && Array.isArray(obj.message.sensors)) {\n sensors.push(...obj.message.sensors);\n }\n\n // search for sensors and add found sensors if not already in\n const foundSensors = await this.searchSensors();\n for (const foundSensor of foundSensors) {\n if (sensors.findIndex((cfgSensor) => (cfgSensor.address === foundSensor.address && cfgSensor.remoteSystemId === foundSensor.remoteSystemId)) < 0) {\n // not in the list... add it\n sensors.push({\n address: foundSensor.address,\n remoteSystemId: foundSensor.remoteSystemId,\n name: '',\n interval: null,\n unit: '\u00B0C',\n factor: 1,\n offset: 0,\n decimals: 2,\n nullOnError: true,\n enabled: true,\n });\n }\n }\n\n // send back the result\n this.sendTo(obj.from, obj.command, { native: { sensors } }, obj.callback);\n\n break;\n\n case 'getNewRemoteKey':\n // don't do anything if no callback is provided\n if (!obj.callback) return;\n\n this.sendTo(obj.from, obj.command, { native: { remoteKey: genHexString(64) } }, obj.callback);\n break;\n }\n }\n }\n\n}\n\nif (require.main !== module) {\n // Export the constructor in compact mode\n module.exports = (options: Partial | undefined) => new Ds18b20Adapter(options);\n} else {\n // otherwise start the instance directly\n (() => new Ds18b20Adapter())();\n}\n\n// export the type of the adapter class to use it in other files\nexport type { Ds18b20Adapter };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAMA,sBAAO;AAEP,sBAAkC;AAElC,aAAwB;AAExB,0BAIO;AAEP,gCAA4B;AAE5B,oBAAuB;AAEvB,2BAAmC;AACnC,mBAA6B;AAC7B,kBAAqB;AAKrB,MAAM,uBAAuB,4BAAQ;AAAA,EAqB5B,YAAY,UAAmC,CAAC,GAAG;AACxD,UAAM;AAAA,MACJ,GAAG;AAAA,MACH,MAAM;AAAA,IACR,CAAC;AApBH,SAAQ,UAAkC,CAAC;AAK3C,SAAO,qBAAgD;AAKvD,SAAQ,iBAA0B;AAYhC,SAAK,GAAG,SAAS,KAAK,OAAO;AAC7B,SAAK,GAAG,eAAe,KAAK,aAAa;AACzC,SAAK,GAAG,WAAW,KAAK,SAAS;AACjC,SAAK,GAAG,UAAU,KAAK,QAAQ;AAAA,EACjC;AAAA,EAMA,MAAc,UAAyB;AAErC,SAAK,SAAS,mBAAmB,OAAO,IAAI;AAG5C,UAAM,eAAe,MAAM,KAAK,sBAAsB,eAAe;AACrE,qBAAK,YAAW,6CAAc,OAAO,aAAY;AAGjD,QAAI,CAAC,KAAK,OAAO,eAAe;AAC9B,WAAK,OAAO,gBAAgB;AAAA,IAC9B;AAGA,QAA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AS,YAAY;AAAA,gBACrB,gBAAgB,YAAY;AAAA,gBAC5B,MAAM;AAAA,gBACN,UAAU;AAAA,gBACV,MAAM;AAAA,gBACN,QAAQ;AAAA,gBACR,QAAQ;AAAA,gBACR,UAAU;AAAA,gBACV,aAAa;AAAA,gBACb,SAAS;AAAA,cACX,CAAC;AAAA,YACH;AAAA,UACF;AAGA,eAAK,OAAO,IAAI,MAAM,IAAI,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,QAAQ;AAExE;AAAA,QAEF,KAAK;AAEH,cAAI,CAAC,IAAI;AAAU;AAEnB,eAAK,OAAO,IAAI,MAAM,IAAI,SAAS,EAAE,QAAQ,EAAE,eAAW,2BAAa,EAAE,EAAE,EAAE,GAAG,IAAI,QAAQ;AAC5F;AAAA,MACJ;AAAA,IACF;AAAA,EACF;AAEF;AAhlBgB;AAAA,EADd;AAAA,GApCI,eAqCU;AAyPA;AAAA,EADd;AAAA,GA7RI,eA8RU;AA6BN;AAAA,EADR;AAAA,GA1TI,eA2TI;AAyBA;AAAA,EADR;AAAA,GAnVI,eAoVI;AAYA;AAAA,EADR;AAAA,GA/VI,eAgWI;AA0JM;AAAA,EADd;AAAA,GAzfI,eA0fU;AAkBA;AAAA,EADd;AAAA,GA3gBI,eA4gBU;AA2GhB,IAAI,QAAQ,SAAS,QAAQ;AAE3B,SAAO,UAAU,CAAC,YAAiD,IAAI,eAAe,OAAO;AAC/F,OAAO;AAEL,GAAC,MAAM,IAAI,eAAe,GAAG;AAC/B;", "names": [] } diff --git a/build/remote-server.js b/build/remote-server.js index 0bcdfd8..d70d0fb 100644 --- a/build/remote-server.js +++ b/build/remote-server.js @@ -73,7 +73,7 @@ class RemoteSensorServer extends import_events.EventEmitter { } const requestTs = Date.now(); const prom = new Promise((resolve, reject) => { - let timeout = null; + let timeout = void 0; const handler = (data) => { if (typeof data !== "object" || data.address !== sensorAddress || data.ts !== requestTs) return; @@ -113,7 +113,7 @@ class RemoteSensorServer extends import_events.EventEmitter { this.adapter.log.error(`Error while sending request to remote system ${client.systemId}: ${err}`); }); proms.push(new Promise((resolve, reject) => { - let timeout = null; + let timeout = void 0; const handler = (data) => { if (typeof data !== "object" || data.systemId !== client.systemId || data.ts !== requestTs) return; diff --git a/build/remote-server.js.map b/build/remote-server.js.map index dd4a1c9..175ac30 100644 --- a/build/remote-server.js.map +++ b/build/remote-server.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../src/remote-server.ts"], - "sourcesContent": ["/**\n * Server for remote connections.\n */\n\nimport { EventEmitter } from 'events';\n\nimport {\n createServer,\n Server,\n Socket,\n} from 'net';\n\nimport { boundMethod } from 'autobind-decorator';\n\nimport type { Ds18b20Adapter } from './main';\nimport {\n decrypt,\n encrypt,\n REMOTE_PROTOCOL_VERSION,\n} from './remote/common';\n\n/**\n * Information about a connected client.\n */\ninterface RemoteClient {\n socket: Socket;\n systemId: string;\n}\n\n/**\n * Interface to declare events for the RemoteSensorServer class.\n */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\nexport interface RemoteSensorServer {\n on (event: 'listening', listener: () => void): this;\n on (event: 'error', listener: (err: Error) => void): this;\n on (event: 'sensorData', listener: (data: RemoteDataRead) => void): this;\n on (event: 'searchData', listener: (data: RemoteDataSearch) => void): this;\n on (event: 'remotesChanged', listener: (remotes: string[]) => void): this;\n\n emit (event: 'listening'): boolean;\n emit (event: 'error', err: Error): boolean;\n emit (event: 'sensorData', data: RemoteDataRead): boolean;\n emit (event: 'searchData', data: RemoteDataSearch): boolean;\n emit (event: 'remotesChanged', data: string[]): boolean;\n}\n\n/**\n * Server for remote connections.\n */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\nexport class RemoteSensorServer extends EventEmitter {\n\n /**\n * Instance of the adapter.\n */\n private adapter: Ds18b20Adapter;\n\n /**\n * Buffer containing the 32 bit encryption key.\n */\n private encryptionKey: Buffer;\n\n /**\n * Instance of the tcp server to handle socket connections.\n */\n private server: Server;\n\n /**\n * Connected sockets.\n */\n private sockets: Record = {};\n\n /**\n * Timeouts for sockets.\n * Used to disconnect a socket after idle before it is identified.\n */\n private socketTimeouts: Record = {};\n\n constructor (port: number, encKey: string, adapter: Ds18b20Adapter) {\n super();\n\n this.adapter = adapter;\n\n this.encryptionKey = Buffer.from(encKey, 'hex');\n\n this.server = createServer();\n\n this.server.on('connection', this.handleConnection);\n\n this.server.on('error', (err: Error) => {\n this.emit('error', err);\n });\n\n this.server.listen(port, () => {\n this.emit('listening');\n });\n }\n\n /**\n * Returns if the server is listening for connections.\n */\n public isListening (): boolean {\n return this.server.listening;\n }\n\n /**\n * Returns an array of the system IDs of all currently connected remote systems.\n */\n public getConnectedSystems (): string[] {\n const systems: string[] = [];\n for (const socketId in this.sockets) {\n systems.push(this.sockets[socketId].systemId);\n }\n return systems;\n }\n\n /**\n * Read from a remote sensor.\n * @param clientSystemId The system ID of the remote client to send the request to.\n * @param sensorAddress The sensor address.\n */\n public async read (clientSystemId: string, sensorAddress: string): Promise {\n // get the socket\n let client: RemoteClient | null = null;\n for (const socketId in this.sockets) {\n if (this.sockets[socketId].systemId === clientSystemId) {\n client = this.sockets[socketId];\n break;\n }\n }\n\n if (!client) {\n // client not connected\n throw new Error(`Remote system ${clientSystemId} is not connected.`);\n }\n\n // timestamp for the request, used to identify response\n const requestTs = Date.now();\n\n // prepare promise to wait for feedback with a timeout of 5 seconds\n const prom = new Promise((resolve, reject) => {\n let timeout: ioBroker.Timeout | null = null;\n\n const handler = (data: RemoteDataRead): void => {\n if (typeof data !== 'object' || data.address !== sensorAddress || data.ts !== requestTs) return;\n if (timeout) {\n this.adapter.clearTimeout(timeout);\n }\n this.removeListener('sensorData', handler);\n resolve(data.raw || '');\n };\n\n timeout = this.adapter.setTimeout(() => {\n this.removeListener('sensorData', handler);\n reject(new Error(`No response from remote system ${clientSystemId}`));\n }, 5000);\n\n this.on('sensorData', handler);\n });\n\n // send the request (async but don't wait)\n this.send(client.socket, {\n cmd: 'read',\n ts: requestTs,\n address: sensorAddress,\n })\n .catch((err) => {\n this.adapter.log.error(`Error while sending request to remote system ${clientSystemId}: ${err}`);\n });\n\n // wait for the feedback promise to resolve\n const raw = await prom;\n\n return raw;\n }\n\n /**\n * Search for sensors an all currently connected remote systems.\n */\n public async search (): Promise {\n const sensors: SearchedSensor[] = [];\n\n // array of promises for parallel search on all remote systems\n const proms: Promise[] = [];\n\n for (const socketId in this.sockets) {\n const client = this.sockets[socketId];\n\n // timestamp for the request, used to identify response\n const requestTs = Date.now();\n\n // send the request (async but don't wait)\n this.send(client.socket, {\n cmd: 'search',\n ts: requestTs,\n systemId: client.systemId,\n })\n .catch((err) => {\n this.adapter.log.error(`Error while sending request to remote system ${client.systemId}: ${err}`);\n });\n\n // wait for feedback with a timeout of 5 seconds\n proms.push(new Promise((resolve, reject) => {\n let timeout: ioBroker.Timeout | null = null;\n\n const handler = (data: RemoteDataSearch): void => {\n if (typeof data !== 'object' || data.systemId !== client.systemId || data.ts !== requestTs) return;\n if (timeout) {\n this.adapter.clearTimeout(timeout);\n }\n this.removeListener('sensorData', handler);\n if (!Array.isArray(data.addresses)) {\n data.addresses = [];\n }\n resolve(data.addresses.map((a) => ({ address: a, remoteSystemId: client.systemId })));\n };\n\n timeout = this.adapter.setTimeout(() => {\n this.removeListener('sensorData', handler);\n reject(new Error(`No response from remote system ${client.systemId}`));\n }, 5000);\n\n this.on('searchData', handler);\n }));\n }\n\n const results = await Promise.all(proms);\n results.forEach((r) => sensors.push(...r));\n\n return sensors;\n }\n\n /**\n * Stop the server and close all socket connections.\n */\n public stop (): Promise {\n return new Promise((resolve) => {\n this.server.close(() => resolve());\n });\n }\n\n /**\n * Handler for new socket connections.\n * @param socket The connected socket.\n */\n @boundMethod\n private handleConnection (socket: Socket): void {\n const socketId = `${socket.remoteAddress}:${socket.remotePort}`;\n this.adapter.log.debug(`socket connect ${socketId}`);\n\n socket.on('close', () => {\n this.adapter.log.debug(`socket closed ${socketId}`);\n if (this.sockets[socketId]) {\n this.adapter.log.info(`Remote system ${this.sockets[socketId].systemId} (${socketId}) disconnected`);\n } else {\n this.adapter.log.info(`Remote system ${socketId} disconnected`);\n }\n\n if (this.socketTimeouts[socketId]) {\n this.adapter.clearTimeout(this.socketTimeouts[socketId]);\n delete this.socketTimeouts[socketId];\n }\n\n delete this.sockets[socketId];\n\n this.emit('remotesChanged', this.getConnectedSystems());\n });\n\n // collect all incoming data and split it by `\\n`\n let dataStr = '';\n socket.on('data', (data: Buffer) => {\n dataStr += data.toString();\n\n // dataStr may contain multiple `\\n`!\n let idx = dataStr.indexOf('\\n');\n while (idx > 0) {\n const raw = dataStr.slice(0, idx);\n dataStr = dataStr.slice(idx+1);\n this.handleSocketData(socketId, socket, raw);\n idx = dataStr.indexOf('\\n');\n }\n });\n\n // set timeout to close unknown sockets after 5 seconds\n this.socketTimeouts[socketId] = this.adapter.setTimeout(() => {\n this.adapter.log.warn(`Disconnecting remote ${socketId} due to inactivity before identification`);\n socket.destroy();\n delete this.socketTimeouts[socketId];\n }, 5000);\n\n // request client information\n this.send(socket, { cmd: 'clientInfo', protocolVersion: REMOTE_PROTOCOL_VERSION })\n .catch((err) => {\n this.adapter.log.error(`Error while sending request to remote system ${socketId}: ${err}`);\n });\n }\n\n /**\n * Handler for received encrypted messages from a socket.\n * @param socketId The ID of the related socket.\n * @param socket The socket from which the data was received.\n * @param raw The encrypted received data.\n */\n private handleSocketData (socketId: string, socket: Socket, raw: string): void {\n\n // try to decrypt and parse the data\n let data: RemoteData;\n try {\n const dataStr = decrypt(raw, this.encryptionKey);\n data = JSON.parse(dataStr);\n } catch (err: any) {\n this.adapter.log.warn(`Decrypt of data from ${socketId} failed! ${err.toString()}`);\n // close the socket\n socket.destroy();\n return;\n }\n\n this.adapter.log.debug(`data from remote ${socketId}: ${JSON.stringify(data)}`);\n\n switch (data.cmd) {\n case 'clientInfo':\n // got client information\n if (!data.systemId) {\n this.adapter.log.warn(`Got invalid data from remote ${socketId}!`);\n return;\n }\n\n // clear the close timeout\n this.adapter.clearTimeout(this.socketTimeouts[socketId]);\n delete this.socketTimeouts[socketId];\n\n // save as known socket\n this.sockets[socketId] = {\n socket: socket,\n systemId: data.systemId,\n };\n\n this.adapter.log.info(`Remote system ${data.systemId} connected from ${socket.remoteAddress}`);\n\n // check the protocol version\n if (data.protocolVersion !== REMOTE_PROTOCOL_VERSION) {\n this.adapter.log.warn(`Protocol version ${data.protocolVersion} from remote system ${data.systemId} does not match the adapter protocol version ${REMOTE_PROTOCOL_VERSION}! Please reinstall the remote client.`);\n }\n\n this.emit('remotesChanged', this.getConnectedSystems());\n\n break;\n\n case 'read':\n // got sensor data\n this.emit('sensorData', data);\n break;\n\n case 'search':\n // got search data\n this.emit('searchData', data);\n break;\n\n default:\n this.adapter.log.warn(`Unknown command from remote system ${socketId}.`);\n }\n }\n\n /**\n * Send some data to a remote system.\n * The data will be stringified and encrypted before sending.\n * @param socket The socket to send the data to.\n * @param data The data object to send.\n */\n private async send (socket: Socket, data: RemoteData): Promise {\n return new Promise((resolve, reject) => {\n socket.write(encrypt(JSON.stringify(data), this.encryptionKey) + '\\n', (err) => {\n if (err) {\n reject(err);\n } else {\n resolve();\n }\n });\n });\n }\n}\n"], - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,oBAA6B;AAE7B,iBAIO;AAEP,gCAA4B;AAG5B,oBAIO;AAgCA,MAAM,2BAA2B,2BAAa;AAAA,EA4BnD,YAAa,MAAc,QAAgB,SAAyB;AAClE,UAAM;AATR,SAAQ,UAAwC,CAAC;AAMjD,SAAQ,iBAAmD,CAAC;AAK1D,SAAK,UAAU;AAEf,SAAK,gBAAgB,OAAO,KAAK,QAAQ,KAAK;AAE9C,SAAK,aAAS,yBAAa;AAE3B,SAAK,OAAO,GAAG,cAAc,KAAK,gBAAgB;AAElD,SAAK,OAAO,GAAG,SAAS,CAAC,QAAe;AACtC,WAAK,KAAK,SAAS,GAAG;AA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K,sCAAsC,WAAW;AAAA,IAC3E;AAAA,EACF;AAAA,EAQA,MAAc,KAAM,QAAgB,MAAiC;AACnE,WAAO,IAAI,QAAc,CAAC,SAAS,WAAW;AAC5C,aAAO,UAAM,uBAAQ,KAAK,UAAU,IAAI,GAAG,KAAK,aAAa,IAAI,MAAM,CAAC,QAAQ;AAC9E,YAAI,KAAK;AACP,iBAAO,GAAG;AAAA,QACZ,OAAO;AACL,kBAAQ;AAAA,QACV;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACF;AAtIU;AAAA,EADR;AAAA,GAnMW,mBAoMH;", + "sourcesContent": ["/**\n * Server for remote connections.\n */\n\nimport { EventEmitter } from 'events';\n\nimport {\n createServer,\n Server,\n Socket,\n} from 'net';\n\nimport { boundMethod } from 'autobind-decorator';\n\nimport type { Ds18b20Adapter } from './main';\nimport {\n decrypt,\n encrypt,\n REMOTE_PROTOCOL_VERSION,\n} from './remote/common';\n\n/**\n * Information about a connected client.\n */\ninterface RemoteClient {\n socket: Socket;\n systemId: string;\n}\n\n/**\n * Interface to declare events for the RemoteSensorServer class.\n */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\nexport interface RemoteSensorServer {\n on (event: 'listening', listener: () => void): this;\n on (event: 'error', listener: (err: Error) => void): this;\n on (event: 'sensorData', listener: (data: RemoteDataRead) => void): this;\n on (event: 'searchData', listener: (data: RemoteDataSearch) => void): this;\n on (event: 'remotesChanged', listener: (remotes: string[]) => void): this;\n\n emit (event: 'listening'): boolean;\n emit (event: 'error', err: Error): boolean;\n emit (event: 'sensorData', data: RemoteDataRead): boolean;\n emit (event: 'searchData', data: RemoteDataSearch): boolean;\n emit (event: 'remotesChanged', data: string[]): boolean;\n}\n\n/**\n * Server for remote connections.\n */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\nexport class RemoteSensorServer extends EventEmitter {\n\n /**\n * Instance of the adapter.\n */\n private adapter: Ds18b20Adapter;\n\n /**\n * Buffer containing the 32 bit encryption key.\n */\n private encryptionKey: Buffer;\n\n /**\n * Instance of the tcp server to handle socket connections.\n */\n private server: Server;\n\n /**\n * Connected sockets.\n */\n private sockets: Record = {};\n\n /**\n * Timeouts for sockets.\n * Used to disconnect a socket after idle before it is identified.\n */\n private socketTimeouts: Record = {};\n\n constructor (port: number, encKey: string, adapter: Ds18b20Adapter) {\n super();\n\n this.adapter = adapter;\n\n this.encryptionKey = Buffer.from(encKey, 'hex');\n\n this.server = createServer();\n\n this.server.on('connection', this.handleConnection);\n\n this.server.on('error', (err: Error) => {\n this.emit('error', err);\n });\n\n this.server.listen(port, () => {\n this.emit('listening');\n });\n }\n\n /**\n * Returns if the server is listening for connections.\n */\n public isListening (): boolean {\n return this.server.listening;\n }\n\n /**\n * Returns an array of the system IDs of all currently connected remote systems.\n */\n public getConnectedSystems (): string[] {\n const systems: string[] = [];\n for (const socketId in this.sockets) {\n systems.push(this.sockets[socketId].systemId);\n }\n return systems;\n }\n\n /**\n * Read from a remote sensor.\n * @param clientSystemId The system ID of the remote client to send the request to.\n * @param sensorAddress The sensor address.\n */\n public async read (clientSystemId: string, sensorAddress: string): Promise {\n // get the socket\n let client: RemoteClient | null = null;\n for (const socketId in this.sockets) {\n if (this.sockets[socketId].systemId === clientSystemId) {\n client = this.sockets[socketId];\n break;\n }\n }\n\n if (!client) {\n // client not connected\n throw new Error(`Remote system ${clientSystemId} is not connected.`);\n }\n\n // timestamp for the request, used to identify response\n const requestTs = Date.now();\n\n // prepare promise to wait for feedback with a timeout of 5 seconds\n const prom = new Promise((resolve, reject) => {\n let timeout: ioBroker.Timeout | undefined = undefined;\n\n const handler = (data: RemoteDataRead): void => {\n if (typeof data !== 'object' || data.address !== sensorAddress || data.ts !== requestTs) return;\n if (timeout) {\n this.adapter.clearTimeout(timeout);\n }\n this.removeListener('sensorData', handler);\n resolve(data.raw || '');\n };\n\n timeout = this.adapter.setTimeout(() => {\n this.removeListener('sensorData', handler);\n reject(new Error(`No response from remote system ${clientSystemId}`));\n }, 5000);\n\n this.on('sensorData', handler);\n });\n\n // send the request (async but don't wait)\n this.send(client.socket, {\n cmd: 'read',\n ts: requestTs,\n address: sensorAddress,\n })\n .catch((err) => {\n this.adapter.log.error(`Error while sending request to remote system ${clientSystemId}: ${err}`);\n });\n\n // wait for the feedback promise to resolve\n const raw = await prom;\n\n return raw;\n }\n\n /**\n * Search for sensors an all currently connected remote systems.\n */\n public async search (): Promise {\n const sensors: SearchedSensor[] = [];\n\n // array of promises for parallel search on all remote systems\n const proms: Promise[] = [];\n\n for (const socketId in this.sockets) {\n const client = this.sockets[socketId];\n\n // timestamp for the request, used to identify response\n const requestTs = Date.now();\n\n // send the request (async but don't wait)\n this.send(client.socket, {\n cmd: 'search',\n ts: requestTs,\n systemId: client.systemId,\n })\n .catch((err) => {\n this.adapter.log.error(`Error while sending request to remote system ${client.systemId}: ${err}`);\n });\n\n // wait for feedback with a timeout of 5 seconds\n proms.push(new Promise((resolve, reject) => {\n let timeout: ioBroker.Timeout | undefined = undefined;\n\n const handler = (data: RemoteDataSearch): void => {\n if (typeof data !== 'object' || data.systemId !== client.systemId || data.ts !== requestTs) return;\n if (timeout) {\n this.adapter.clearTimeout(timeout);\n }\n this.removeListener('sensorData', handler);\n if (!Array.isArray(data.addresses)) {\n data.addresses = [];\n }\n resolve(data.addresses.map((a) => ({ address: a, remoteSystemId: client.systemId })));\n };\n\n timeout = this.adapter.setTimeout(() => {\n this.removeListener('sensorData', handler);\n reject(new Error(`No response from remote system ${client.systemId}`));\n }, 5000);\n\n this.on('searchData', handler);\n }));\n }\n\n const results = await Promise.all(proms);\n results.forEach((r) => sensors.push(...r));\n\n return sensors;\n }\n\n /**\n * Stop the server and close all socket connections.\n */\n public stop (): Promise {\n return new Promise((resolve) => {\n this.server.close(() => resolve());\n });\n }\n\n /**\n * Handler for new socket connections.\n * @param socket The connected socket.\n */\n @boundMethod\n private handleConnection (socket: Socket): void {\n const socketId = `${socket.remoteAddress}:${socket.remotePort}`;\n this.adapter.log.debug(`socket connect ${socketId}`);\n\n socket.on('close', () => {\n this.adapter.log.debug(`socket closed ${socketId}`);\n if (this.sockets[socketId]) {\n this.adapter.log.info(`Remote system ${this.sockets[socketId].systemId} (${socketId}) disconnected`);\n } else {\n this.adapter.log.info(`Remote system ${socketId} disconnected`);\n }\n\n if (this.socketTimeouts[socketId]) {\n this.adapter.clearTimeout(this.socketTimeouts[socketId]);\n delete this.socketTimeouts[socketId];\n }\n\n delete this.sockets[socketId];\n\n this.emit('remotesChanged', this.getConnectedSystems());\n });\n\n // collect all incoming data and split it by `\\n`\n let dataStr = '';\n socket.on('data', (data: Buffer) => {\n dataStr += data.toString();\n\n // dataStr may contain multiple `\\n`!\n let idx = dataStr.indexOf('\\n');\n while (idx > 0) {\n const raw = dataStr.slice(0, idx);\n dataStr = dataStr.slice(idx+1);\n this.handleSocketData(socketId, socket, raw);\n idx = dataStr.indexOf('\\n');\n }\n });\n\n // set timeout to close unknown sockets after 5 seconds\n this.socketTimeouts[socketId] = this.adapter.setTimeout(() => {\n this.adapter.log.warn(`Disconnecting remote ${socketId} due to inactivity before identification`);\n socket.destroy();\n delete this.socketTimeouts[socketId];\n }, 5000) as ioBroker.Timeout;\n\n // request client information\n this.send(socket, { cmd: 'clientInfo', protocolVersion: REMOTE_PROTOCOL_VERSION })\n .catch((err) => {\n this.adapter.log.error(`Error while sending request to remote system ${socketId}: ${err}`);\n });\n }\n\n /**\n * Handler for received encrypted messages from a socket.\n * @param socketId The ID of the related socket.\n * @param socket The socket from which the data was received.\n * @param raw The encrypted received data.\n */\n private handleSocketData (socketId: string, socket: Socket, raw: string): void {\n\n // try to decrypt and parse the data\n let data: RemoteData;\n try {\n const dataStr = decrypt(raw, this.encryptionKey);\n data = JSON.parse(dataStr);\n } catch (err: any) {\n this.adapter.log.warn(`Decrypt of data from ${socketId} failed! ${err.toString()}`);\n // close the socket\n socket.destroy();\n return;\n }\n\n this.adapter.log.debug(`data from remote ${socketId}: ${JSON.stringify(data)}`);\n\n switch (data.cmd) {\n case 'clientInfo':\n // got client information\n if (!data.systemId) {\n this.adapter.log.warn(`Got invalid data from remote ${socketId}!`);\n return;\n }\n\n // clear the close timeout\n this.adapter.clearTimeout(this.socketTimeouts[socketId]);\n delete this.socketTimeouts[socketId];\n\n // save as known socket\n this.sockets[socketId] = {\n socket: socket,\n systemId: data.systemId,\n };\n\n this.adapter.log.info(`Remote system ${data.systemId} connected from ${socket.remoteAddress}`);\n\n // check the protocol version\n if (data.protocolVersion !== REMOTE_PROTOCOL_VERSION) {\n this.adapter.log.warn(`Protocol version ${data.protocolVersion} from remote system ${data.systemId} does not match the adapter protocol version ${REMOTE_PROTOCOL_VERSION}! Please reinstall the remote client.`);\n }\n\n this.emit('remotesChanged', this.getConnectedSystems());\n\n break;\n\n case 'read':\n // got sensor data\n this.emit('sensorData', data);\n break;\n\n case 'search':\n // got search data\n this.emit('searchData', data);\n break;\n\n default:\n this.adapter.log.warn(`Unknown command from remote system ${socketId}.`);\n }\n }\n\n /**\n * Send some data to a remote system.\n * The data will be stringified and encrypted before sending.\n * @param socket The socket to send the data to.\n * @param data The data object to send.\n */\n private async send (socket: Socket, data: RemoteData): Promise {\n return new Promise((resolve, reject) => {\n socket.write(encrypt(JSON.stringify(data), this.encryptionKey) + '\\n', (err) => {\n if (err) {\n reject(err);\n } else {\n resolve();\n }\n });\n });\n }\n}\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,oBAA6B;AAE7B,iBAIO;AAEP,gCAA4B;AAG5B,oBAIO;AAgCA,MAAM,2BAA2B,2BAAa;AAAA,EA4BnD,YAAa,MAAc,QAAgB,SAAyB;AAClE,UAAM;AATR,SAAQ,UAAwC,CAAC;AAMjD,SAAQ,iBAAmD,CAAC;AAK1D,SAAK,UAAU;AAEf,SAAK,gBAAgB,OAAO,KAAK,QAAQ,KAAK;AAE9C,SAAK,aAAS,yBAAa;AAE3B,SAAK,OA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I;AAC5B;AAAA,MAEF,KAAK;AAEH,aAAK,KAAK,cAAc,IAAI;AAC5B;AAAA,MAEF;AACE,aAAK,QAAQ,IAAI,KAAK,sCAAsC,WAAW;AAAA,IAC3E;AAAA,EACF;AAAA,EAQA,MAAc,KAAM,QAAgB,MAAiC;AACnE,WAAO,IAAI,QAAc,CAAC,SAAS,WAAW;AAC5C,aAAO,UAAM,uBAAQ,KAAK,UAAU,IAAI,GAAG,KAAK,aAAa,IAAI,MAAM,CAAC,QAAQ;AAC9E,YAAI,KAAK;AACP,iBAAO,GAAG;AAAA,QACZ,OAAO;AACL,kBAAQ;AAAA,QACV;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACF;AAtIU;AAAA,EADR;AAAA,GAnMW,mBAoMH;", "names": [] } diff --git a/build/sensor.js b/build/sensor.js index 49879c1..fa0a4e2 100644 --- a/build/sensor.js +++ b/build/sensor.js @@ -37,7 +37,7 @@ var import_utils = require("./lib/utils"); class Sensor extends import_events.EventEmitter { constructor(opts, adapter) { super(); - this.timer = null; + this.timer = void 0; this.adapter = adapter; this.address = opts.address; this.nullOnError = opts.nullOnError; @@ -124,7 +124,7 @@ class Sensor extends import_events.EventEmitter { stop() { if (this.timer) { this.adapter.clearInterval(this.timer); - this.timer = null; + this.timer = void 0; } } } diff --git a/build/sensor.js.map b/build/sensor.js.map index aa80ccb..a379e18 100644 --- a/build/sensor.js.map +++ b/build/sensor.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../src/sensor.ts"], - "sourcesContent": ["/**\n * Class for a DS18B20 temperature sensor.\n */\n\nimport { EventEmitter } from 'events';\n\nimport { readFile } from 'fs/promises';\n\nimport { boundMethod } from 'autobind-decorator';\n\nimport { round } from './lib/utils';\nimport type { Ds18b20Adapter } from './main';\n\n/**\n * Options for a Sensor.\n */\ninterface SensorOptions {\n w1DevicesPath: string;\n address: string;\n interval: number;\n nullOnError: boolean;\n factor: number;\n offset: number;\n decimals: number | null;\n\n remoteSystemId: string | null;\n}\n\n/**\n * Interface to declare events for the Sensor class.\n */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\nexport interface Sensor {\n on (event: 'value', listener: (value: number | null, address: string) => void): this;\n on (event: 'error', listener: (err: Error, address: string) => void): this;\n on (event: 'errorStateChanged', listener: (hasError: boolean, address: string) => void): this;\n\n emit (event: 'value', value: number | null, address: string): boolean;\n emit (event: 'error', err: Error, address: string): boolean;\n emit (event: 'errorStateChanged', hasError: boolean, address: string): boolean;\n}\n\n/**\n * This class represents a single sensor.\n */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\nexport class Sensor extends EventEmitter {\n /**\n * The address (1-wire ID) of the sensor.\n */\n public readonly address: string;\n\n /**\n * Use null values on errors.\n */\n public readonly nullOnError: boolean;\n\n /**\n * Factor for value calculation.\n */\n public readonly factor: number;\n\n /**\n * Offset for value calculation.\n */\n public readonly offset: number;\n\n /**\n * Number of decimals to round to.\n */\n public readonly decimals: number | null;\n\n /**\n * SystemID of the client with this sensor if this is a remote sensor.\n * `null` for local sensors.\n */\n public readonly remoteSystemId: string | null;\n\n /**\n * Flag if the last read of the sensor had an error.\n */\n public hasError: boolean;\n\n /**\n * Timer for interval sensor readings.\n */\n private timer: ioBroker.Interval | null = null;\n\n /**\n * System path where the 1-wire devices can be read.\n */\n private readonly w1DevicesPath: string;\n\n /**\n * Reference to the adapter class.\n */\n private readonly adapter: Ds18b20Adapter;\n\n /**\n * Constructor for a new sensor.\n * @param opts The options for the Sensor.\n */\n constructor (opts: SensorOptions, adapter: Ds18b20Adapter) {\n super();\n this.adapter = adapter;\n\n this.address = opts.address;\n this.nullOnError = opts.nullOnError;\n this.factor = opts.factor;\n this.offset = opts.offset;\n this.decimals = opts.decimals;\n this.hasError = true; // true on init while we don't know the current state\n this.w1DevicesPath = opts.w1DevicesPath;\n this.remoteSystemId = opts.remoteSystemId;\n\n // start interval and initial read if interval is set\n if (opts.interval && opts.interval > 0) {\n // smallest interval is 500ms\n if (opts.interval < 500) {\n opts.interval = 500;\n }\n this.timer = this.adapter.setInterval(() => {\n this.read().catch(() => { /* noop */ });\n }, opts.interval);\n this.read().catch(() => { /* noop */});\n }\n }\n\n /**\n * Read the temperature.\n * The value and possible errors will be emitted as events.\n * @returns The read value.\n * @throws Error when an error occurs.\n */\n @boundMethod\n public async read (): Promise {\n let val: number | null = null;\n try {\n let raw: string;\n\n if (this.remoteSystemId) {\n // remote sensor - send request\n if (!this.adapter.remoteSensorServer) {\n throw new Error('Remote sensors not enabled');\n }\n raw = await this.adapter.remoteSensorServer.read(this.remoteSystemId, this.address);\n } else {\n // local sensor - read the file\n raw = await readFile(`${this.w1DevicesPath}/${this.address}/w1_slave`, 'utf8');\n }\n\n val = await this.processData(raw);\n\n this.emit('value', val, this.address);\n\n if (this.hasError) {\n this.hasError = false;\n this.emit('errorStateChanged', false, this.address);\n }\n\n } catch (err: any) {\n this.emit('error', err, this.address);\n\n if (this.nullOnError) {\n this.emit('value', null, this.address);\n }\n\n if (!this.hasError) {\n this.hasError = true;\n this.emit('errorStateChanged', true, this.address);\n }\n throw err;\n }\n\n return val;\n }\n\n /**\n * Process the raw data from a sensor file.\n * @param rawData The raw data read from the sensor file.\n * @returns The read value.\n * @throws Error when an error occurs.\n */\n public async processData (rawData: string): Promise {\n const lines = rawData.split('\\n');\n\n let val: number;\n\n if (lines[0].indexOf('YES') > -1) {\n // checksum ok\n const bytes = lines[0].split(' ');\n if (bytes[0] === bytes[1] && bytes[0] === bytes[2] && bytes[0] === bytes[3] && bytes[0] === bytes[4] && bytes[0] === bytes[5] && bytes[0] === bytes[6] && bytes[0] === bytes[7] && bytes[0] === bytes[8]) {\n // all bytes are the same\n throw new Error('Communication error');\n }\n\n const m = /t=(-?\\d+)/.exec(lines[1]);\n if (!m) {\n throw new Error('Parse error');\n }\n val = parseInt(m[1], 10) / 1000;\n\n } else if (lines[0].indexOf('NO') > -1) {\n // checksum error\n throw new Error('Checksum error');\n\n } else {\n // read error\n throw new Error('Read error');\n }\n\n // check for specific errors\n if (val === 85) {\n throw new Error('No temperature read');\n } else if (val === -127) {\n throw new Error('Device disconnected');\n } else if (val < -80 || val > 150) {\n // From datasheet: Measures Temperatures from -55\u00B0C to +125\u00B0C\n throw new Error('Read temperature is out of possible range');\n }\n\n // evaluate the result\n val = val * this.factor + this.offset;\n if (this.decimals !== null) {\n val = round(val, this.decimals);\n }\n\n return val;\n }\n\n /**\n * Stop a running interval for automated readings.\n */\n public stop (): void {\n if (this.timer) {\n this.adapter.clearInterval(this.timer);\n this.timer = null;\n }\n }\n}\n"], - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,oBAA6B;AAE7B,sBAAyB;AAEzB,gCAA4B;AAE5B,mBAAsB;AAoCf,MAAM,eAAe,2BAAa;AAAA,EAwDvC,YAAa,MAAqB,SAAyB;AACzD,UAAM;AAjBR,SAAQ,QAAkC;AAkBxC,SAAK,UAAU;AAEf,SAAK,UAAU,KAAK;AACpB,SAAK,cAAc,KAAK;AACxB,SAAK,SAAS,KAAK;AACnB,SAAK,SAAS,KAAK;AACnB,SAAK,WAAW,KAAK;AACrB,SAAK,WAAW;AAChB,SAAK,gBAAgB,KAAK;AAC1B,SAAK,iBAAiB,KAAK;AAG3B,QAAI,KAAK,YAAY,KAAK,WAAW,GAAG;AAEtC,UAAI,KAAK,WAAW,KAAK;AACvB,aAAK,WAAW;AAAA,MAClB;AACA,WAAK,QAAQ,KAAK,QAAQ,YAAY,MAAM;AAC1C,aAAK,KAAK,EAAE,MAAM,MAAM;AAAA,QAAa,CAAC;AAAA,MACxC,GAAG,KAAK,QAAQ;AAChB,WAAK,KAAK,EAAE,MAAM,MAAM;AAAA,MAAY,CAAC;AAAA,IACvC;AAAA,EACF;AAAA,EASA,MAAa,OAAgC;AAC3C,QAAI,MAAqB;AACzB,QAAI;AACF,UAAI;AAEJ,UAAI,KAAK,gBAAgB;AAEvB,YAAI,CAAC,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;AAAA,MAC/B;AACA,YAAM,SAAS,EAAE,IAAI,EAAE,IAAI;AAAA,IAE7B,WAAW,MAAM,GAAG,QAAQ,IAAI,IAAI,IAAI;AAEtC,YAAM,IAAI,MAAM,gBAAgB;AAAA,IAElC,OAAO;AAEL,YAAM,IAAI,MAAM,YAAY;AAAA,IAC9B;AAGA,QAAI,QAAQ,IAAI;AACd,YAAM,IAAI,MAAM,qBAAqB;AAAA,IACvC,WAAW,QAAQ,MAAM;AACvB,YAAM,IAAI,MAAM,qBAAqB;AAAA,IACvC,WAAW,MAAM,OAAO,MAAM,KAAK;AAEjC,YAAM,IAAI,MAAM,2CAA2C;AAAA,IAC7D;AAGA,UAAM,MAAM,KAAK,SAAS,KAAK;AAC/B,QAAI,KAAK,aAAa,MAAM;AAC1B,gBAAM,oBAAM,KAAK,KAAK,QAAQ;AAAA,IAChC;AAEA,WAAO;AAAA,EACT;AAAA,EAKO,OAAc;AACnB,QAAI,KAAK,OAAO;AACd,WAAK,QAAQ,cAAc,KAAK,KAAK;AACrC,WAAK,QAAQ;AAAA,IACf;AAAA,EACF;AACF;AAxGe;AAAA,EADb;AAAA,GAxFW,OAyFE;", + "sourcesContent": ["/**\n * Class for a DS18B20 temperature sensor.\n */\n\nimport { EventEmitter } from 'events';\n\nimport { readFile } from 'fs/promises';\n\nimport { boundMethod } from 'autobind-decorator';\n\nimport { round } from './lib/utils';\nimport type { Ds18b20Adapter } from './main';\n\n/**\n * Options for a Sensor.\n */\ninterface SensorOptions {\n w1DevicesPath: string;\n address: string;\n interval: number;\n nullOnError: boolean;\n factor: number;\n offset: number;\n decimals: number | null;\n\n remoteSystemId: string | null;\n}\n\n/**\n * Interface to declare events for the Sensor class.\n */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\nexport interface Sensor {\n on (event: 'value', listener: (value: number | null, address: string) => void): this;\n on (event: 'error', listener: (err: Error, address: string) => void): this;\n on (event: 'errorStateChanged', listener: (hasError: boolean, address: string) => void): this;\n\n emit (event: 'value', value: number | null, address: string): boolean;\n emit (event: 'error', err: Error, address: string): boolean;\n emit (event: 'errorStateChanged', hasError: boolean, address: string): boolean;\n}\n\n/**\n * This class represents a single sensor.\n */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\nexport class Sensor extends EventEmitter {\n /**\n * The address (1-wire ID) of the sensor.\n */\n public readonly address: string;\n\n /**\n * Use null values on errors.\n */\n public readonly nullOnError: boolean;\n\n /**\n * Factor for value calculation.\n */\n public readonly factor: number;\n\n /**\n * Offset for value calculation.\n */\n public readonly offset: number;\n\n /**\n * Number of decimals to round to.\n */\n public readonly decimals: number | null;\n\n /**\n * SystemID of the client with this sensor if this is a remote sensor.\n * `null` for local sensors.\n */\n public readonly remoteSystemId: string | null;\n\n /**\n * Flag if the last read of the sensor had an error.\n */\n public hasError: boolean;\n\n /**\n * Timer for interval sensor readings.\n */\n private timer: ioBroker.Interval | undefined = undefined;\n\n /**\n * System path where the 1-wire devices can be read.\n */\n private readonly w1DevicesPath: string;\n\n /**\n * Reference to the adapter class.\n */\n private readonly adapter: Ds18b20Adapter;\n\n /**\n * Constructor for a new sensor.\n * @param opts The options for the Sensor.\n */\n constructor (opts: SensorOptions, adapter: Ds18b20Adapter) {\n super();\n this.adapter = adapter;\n\n this.address = opts.address;\n this.nullOnError = opts.nullOnError;\n this.factor = opts.factor;\n this.offset = opts.offset;\n this.decimals = opts.decimals;\n this.hasError = true; // true on init while we don't know the current state\n this.w1DevicesPath = opts.w1DevicesPath;\n this.remoteSystemId = opts.remoteSystemId;\n\n // start interval and initial read if interval is set\n if (opts.interval && opts.interval > 0) {\n // smallest interval is 500ms\n if (opts.interval < 500) {\n opts.interval = 500;\n }\n this.timer = this.adapter.setInterval(() => {\n this.read().catch(() => { /* noop */ });\n }, opts.interval);\n this.read().catch(() => { /* noop */});\n }\n }\n\n /**\n * Read the temperature.\n * The value and possible errors will be emitted as events.\n * @returns The read value.\n * @throws Error when an error occurs.\n */\n @boundMethod\n public async read (): Promise {\n let val: number | null = null;\n try {\n let raw: string;\n\n if (this.remoteSystemId) {\n // remote sensor - send request\n if (!this.adapter.remoteSensorServer) {\n throw new Error('Remote sensors not enabled');\n }\n raw = await this.adapter.remoteSensorServer.read(this.remoteSystemId, this.address);\n } else {\n // local sensor - read the file\n raw = await readFile(`${this.w1DevicesPath}/${this.address}/w1_slave`, 'utf8');\n }\n\n val = await this.processData(raw);\n\n this.emit('value', val, this.address);\n\n if (this.hasError) {\n this.hasError = false;\n this.emit('errorStateChanged', false, this.address);\n }\n\n } catch (err: any) {\n this.emit('error', err, this.address);\n\n if (this.nullOnError) {\n this.emit('value', null, this.address);\n }\n\n if (!this.hasError) {\n this.hasError = true;\n this.emit('errorStateChanged', true, this.address);\n }\n throw err;\n }\n\n return val;\n }\n\n /**\n * Process the raw data from a sensor file.\n * @param rawData The raw data read from the sensor file.\n * @returns The read value.\n * @throws Error when an error occurs.\n */\n public async processData (rawData: string): Promise {\n const lines = rawData.split('\\n');\n\n let val: number;\n\n if (lines[0].indexOf('YES') > -1) {\n // checksum ok\n const bytes = lines[0].split(' ');\n if (bytes[0] === bytes[1] && bytes[0] === bytes[2] && bytes[0] === bytes[3] && bytes[0] === bytes[4] && bytes[0] === bytes[5] && bytes[0] === bytes[6] && bytes[0] === bytes[7] && bytes[0] === bytes[8]) {\n // all bytes are the same\n throw new Error('Communication error');\n }\n\n const m = /t=(-?\\d+)/.exec(lines[1]);\n if (!m) {\n throw new Error('Parse error');\n }\n val = parseInt(m[1], 10) / 1000;\n\n } else if (lines[0].indexOf('NO') > -1) {\n // checksum error\n throw new Error('Checksum error');\n\n } else {\n // read error\n throw new Error('Read error');\n }\n\n // check for specific errors\n if (val === 85) {\n throw new Error('No temperature read');\n } else if (val === -127) {\n throw new Error('Device disconnected');\n } else if (val < -80 || val > 150) {\n // From datasheet: Measures Temperatures from -55\u00B0C to +125\u00B0C\n throw new Error('Read temperature is out of possible range');\n }\n\n // evaluate the result\n val = val * this.factor + this.offset;\n if (this.decimals !== null) {\n val = round(val, this.decimals);\n }\n\n return val;\n }\n\n /**\n * Stop a running interval for automated readings.\n */\n public stop (): void {\n if (this.timer) {\n this.adapter.clearInterval(this.timer);\n this.timer = undefined;\n }\n }\n}\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,oBAA6B;AAE7B,sBAAyB;AAEzB,gCAA4B;AAE5B,mBAAsB;AAoCf,MAAM,eAAe,2BAAa;AAAA,EAwDvC,YAAa,MAAqB,SAAyB;AACzD,UAAM;AAjBR,SAAQ,QAAuC;AAkB7C,SAAK,UAAU;AAEf,SAAK,UAAU,KAAK;AACpB,SAAK,cAAc,KAAK;AACxB,SAAK,SAAS,KAAK;AACnB,SAAK,SAAS,KAAK;AACnB,SAAK,WAAW,KAAK;AACrB,SAAK,WAAW;AAChB,SAAK,gBAAgB,KAAK;AAC1B,SAAK,iBAAiB,KAAK;AAG3B,QAAI,KAAK,YAAY,KAAK,WAAW,GAAG;AAEtC,UAAI,KAAK,WAAW,KAAK;AACvB,aAAK,WAAW;AAAA,MAClB;AACA,WAAK,QAAQ,KAAK,QAAQ,YAAY,MAAM;AAC1C,aAAK,KAAK,EAAE,MAAM,MAAM;AAAA,QAAa,CAAC;AAAA,MACxC,GAAG,KAAK,QAAQ;AAChB,WAAK,KAAK,EAAE,MAAM,MAAM;AAAA,MAAY,CAAC;AAAA,IACvC;AAAA,EACF;AAAA,EASA,MAAa,OAAgC;AAC3C,QAAI,MAAqB;AACzB,QAAI;AACF,UAAI;AAEJ,UAAI,KAAK,gBAAgB;AAEvB,YAAI,CAAC,KAAK,QAAQ,oBAAoB;AACpC,gBAAM,IAAI,MAAM,4BAA4B;AAAA,QAC9C;AACA,cAAM,MAAM,KAAK,QAAQ,mBAAmB,KAAK,KAAK,gBAAgB,KAAK,OAAO;AAAA,MACpF,OAAO;AAEL,cAAM,UAAM,0BAAS,GAAG,KAAK,iBAAiB,KAAK,oBA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QAAI,QAAQ,IAAI;AACd,YAAM,IAAI,MAAM,qBAAqB;AAAA,IACvC,WAAW,QAAQ,MAAM;AACvB,YAAM,IAAI,MAAM,qBAAqB;AAAA,IACvC,WAAW,MAAM,OAAO,MAAM,KAAK;AAEjC,YAAM,IAAI,MAAM,2CAA2C;AAAA,IAC7D;AAGA,UAAM,MAAM,KAAK,SAAS,KAAK;AAC/B,QAAI,KAAK,aAAa,MAAM;AAC1B,gBAAM,oBAAM,KAAK,KAAK,QAAQ;AAAA,IAChC;AAEA,WAAO;AAAA,EACT;AAAA,EAKO,OAAc;AACnB,QAAI,KAAK,OAAO;AACd,WAAK,QAAQ,cAAc,KAAK,KAAK;AACrC,WAAK,QAAQ;AAAA,IACf;AAAA,EACF;AACF;AAxGe;AAAA,EADb;AAAA,GAxFW,OAyFE;", "names": [] } diff --git a/package-lock.json b/package-lock.json index 161b57b..a380c05 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "linux" ], "dependencies": { - "@iobroker/adapter-core": "^2.6.8", + "@iobroker/adapter-core": "^3.0.3", "autobind-decorator": "^2.4.0" }, "devDependencies": { @@ -25,15 +25,15 @@ "@types/chai": "^4.3.5", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^10.0.1", - "@types/node": "^18.16.19", + "@types/node": "^18.17.6", "@types/proxyquire": "^1.3.28", - "@types/sinon": "^10.0.15", + "@types/sinon": "^10.0.16", "@types/sinon-chai": "^3.2.9", - "@typescript-eslint/eslint-plugin": "^6.1.0", - "@typescript-eslint/parser": "^6.1.0", + "@typescript-eslint/eslint-plugin": "^6.4.0", + "@typescript-eslint/parser": "^6.4.0", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", - "eslint": "^8.45.0", + "eslint": "^8.47.0", "eslint-plugin-html": "^7.1.0", "mocha": "^10.2.0", "proxyquire": "^2.1.3", @@ -172,16 +172,6 @@ "node": ">=12.20" } }, - "node_modules/@alcalzone/release-script-plugin-iobroker/node_modules/axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", - "dev": true, - "dependencies": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" - } - }, "node_modules/@alcalzone/release-script-plugin-license": { "version": "3.5.9", "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-3.5.9.tgz", @@ -240,119 +230,10 @@ "node": ">=12.20" } }, - "node_modules/@alcalzone/release-script/node_modules/axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", - "dev": true, - "dependencies": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" - } - }, - "node_modules/@alcalzone/release-script/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@alcalzone/release-script/node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/@alcalzone/release-script/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@alcalzone/release-script/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@alcalzone/release-script/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@alcalzone/release-script/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@alcalzone/release-script/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@alcalzone/release-script/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/@babel/parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.5.tgz", - "integrity": "sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q==", + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz", + "integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -421,18 +302,18 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", - "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.0.tgz", - "integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -453,9 +334,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.44.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz", - "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz", + "integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -484,12 +365,6 @@ "url": "https://github.com/sponsors/AlCalzone" } }, - "node_modules/@esm2cjs/execa/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, "node_modules/@esm2cjs/human-signals": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@esm2cjs/human-signals/-/human-signals-3.0.1.tgz", @@ -600,32 +475,6 @@ "node": ">=12.0.0" } }, - "node_modules/@google-cloud/common/node_modules/duplexify": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz", - "integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.0" - } - }, - "node_modules/@google-cloud/common/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/@google-cloud/projectify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-3.0.0.tgz", @@ -645,9 +494,9 @@ } }, "node_modules/@google-cloud/translate": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/@google-cloud/translate/-/translate-7.2.1.tgz", - "integrity": "sha512-VXmEvMF8qa4c7p5drjUZ06B8v0DxoUfFPyjhFp/wbgoe0GWaD1y1gGk6rUZxGKD/pB19kFU+0LMMSCgBW+a0iA==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@google-cloud/translate/-/translate-7.2.2.tgz", + "integrity": "sha512-IAJhPKotLH/OF/NzWml/byLDN+OILbs1P4k+7HNUJK618NsShFelRKzh3pRUUQA4DX0je3HaEZw9nR+5uJ6ZEg==", "dev": true, "dependencies": { "@google-cloud/common": "^4.0.0", @@ -662,9 +511,9 @@ } }, "node_modules/@grpc/grpc-js": { - "version": "1.8.15", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.8.15.tgz", - "integrity": "sha512-H2Bu/w6+oQ58DsRbQol66ERBk3V5ZIak/z/MDx0T4EgDnJWps807I6BvTjq0v6UvZtOcLO+ur+Q9wvniqu3OJA==", + "version": "1.8.21", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.8.21.tgz", + "integrity": "sha512-KeyQeZpxeEBSqFVTi3q2K7PiPXmgBfECc4updA1ejCLjYmoAlvvM3ZMp5ztTDUCUQmoY3CpDxvchjO1+rFkoHg==", "dev": true, "dependencies": { "@grpc/proto-loader": "^0.7.0", @@ -675,15 +524,15 @@ } }, "node_modules/@grpc/proto-loader": { - "version": "0.7.7", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.7.tgz", - "integrity": "sha512-1TIeXOi8TuSCQprPItwoMymZXxWT0CPxUhkrkeCUH+D8U7QDwQ6b7SUz2MaLuWM2llT+J/TVFLmQI5KtML3BhQ==", + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.8.tgz", + "integrity": "sha512-GU12e2c8dmdXb7XUlOgYWZ2o2i+z9/VeACkxTA/zzAe2IjclC5PnVL0lpgjhrqfpDYHzM8B1TF6pqWegMYAzlA==", "dev": true, "dependencies": { "@types/long": "^4.0.1", "lodash.camelcase": "^4.3.0", "long": "^4.0.0", - "protobufjs": "^7.0.0", + "protobufjs": "^7.2.4", "yargs": "^17.7.2" }, "bin": { @@ -693,105 +542,6 @@ "node": ">=6" } }, - "node_modules/@grpc/proto-loader/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@grpc/proto-loader/node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/@grpc/proto-loader/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@grpc/proto-loader/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@grpc/proto-loader/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@grpc/proto-loader/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@grpc/proto-loader/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@grpc/proto-loader/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", @@ -826,11 +576,11 @@ "dev": true }, "node_modules/@iobroker/adapter-core": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.8.tgz", - "integrity": "sha512-xrqtH5RYZ6BvEcDyfuPkajd9el4R6p0VLRYKlnfMafAbxybIN+zfeHvjGI4l8OAHkyP2tcv6boX2Vu0KnMFOHw==", - "dependencies": { - "@types/iobroker": "^4.0.5" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.0.3.tgz", + "integrity": "sha512-SZmL69BtUXitnTbidNjlljQKB6CbkBLK9+Tqo/NMsOqHb1RmhPCNKhO4F5o8jc0dW0J6d4VArXryUkL7Ru0WpA==", + "peerDependencies": { + "@iobroker/types": "^5.0.11" } }, "node_modules/@iobroker/adapter-dev": { @@ -856,124 +606,6 @@ "node": ">=12.0.0" } }, - "node_modules/@iobroker/adapter-dev/node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/@iobroker/adapter-dev/node_modules/axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", - "dev": true, - "dependencies": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" - } - }, - "node_modules/@iobroker/adapter-dev/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@iobroker/adapter-dev/node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/@iobroker/adapter-dev/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@iobroker/adapter-dev/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@iobroker/adapter-dev/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@iobroker/adapter-dev/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@iobroker/adapter-dev/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@iobroker/adapter-dev/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/@iobroker/testing": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-4.1.0.tgz", @@ -1046,6 +678,15 @@ "url": "https://opencollective.com/sinon" } }, + "node_modules/@iobroker/types": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@iobroker/types/-/types-5.0.12.tgz", + "integrity": "sha512-zExHvDhSyjgSioJYB8BQa1LvmtiZjn0ThJfaKP+jH9tx7ddyK/irI5cqjR0Y6DUpx0x9BkaDI9utuPVbRWzYLQ==", + "peer": true, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -1390,14 +1031,6 @@ "@types/node": "*" } }, - "node_modules/@types/iobroker": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/iobroker/-/iobroker-4.0.5.tgz", - "integrity": "sha512-D1tJwuDQEQQQ/cZVFjFjFUhUuMxJbfrz5U2UooiZwhgs69D/t8IowMvBI6Lk4ZR8HnCSxYwWHVRKyQnEMNgJPA==", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/json-schema": { "version": "7.0.12", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", @@ -1445,9 +1078,10 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.16.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.19.tgz", - "integrity": "sha512-IXl7o+R9iti9eBW4Wg2hx1xQDig183jj7YLn8F7udNceyfkbn1ZxmzZXuak20gR40D7pIkIY1kYGx5VIGbaHKA==" + "version": "18.17.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.6.tgz", + "integrity": "sha512-fGmT/P7z7ecA6bv/ia5DlaWCH4YeZvAQMNpUhrJjtAhOhZfoxS1VLUgU2pdk63efSjQaOJWdXMuAJsws+8I6dg==", + "dev": true }, "node_modules/@types/proxyquire": { "version": "1.3.28", @@ -1472,9 +1106,9 @@ "dev": true }, "node_modules/@types/sinon": { - "version": "10.0.15", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.15.tgz", - "integrity": "sha512-3lrFNQG0Kr2LDzvjyjB6AMJk4ge+8iYhQfdnSwIwlG88FUOV43kPcQqDZkDa/h3WSZy6i8Fr0BSjfQtB1B3xuQ==", + "version": "10.0.16", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.16.tgz", + "integrity": "sha512-j2Du5SYpXZjJVJtXBokASpPRj+e2z+VUhCPHmM6WMfe3dpHu6iVKJMU6AiBcMp/XTAYnEj6Wc1trJUWwZ0QaAQ==", "dev": true, "dependencies": { "@types/sinonjs__fake-timers": "*" @@ -1497,21 +1131,20 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.1.0.tgz", - "integrity": "sha512-qg7Bm5TyP/I7iilGyp6DRqqkt8na00lI6HbjWZObgk3FFSzH5ypRwAHXJhJkwiRtTcfn+xYQIMOR5kJgpo6upw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.4.0.tgz", + "integrity": "sha512-62o2Hmc7Gs3p8SLfbXcipjWAa6qk2wZGChXG2JbBtYpwSRmti/9KHLqfbLs9uDigOexG+3PaQ9G2g3201FWLKg==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.1.0", - "@typescript-eslint/type-utils": "6.1.0", - "@typescript-eslint/utils": "6.1.0", - "@typescript-eslint/visitor-keys": "6.1.0", + "@typescript-eslint/scope-manager": "6.4.0", + "@typescript-eslint/type-utils": "6.4.0", + "@typescript-eslint/utils": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", "natural-compare": "^1.4.0", - "natural-compare-lite": "^1.4.0", "semver": "^7.5.4", "ts-api-utils": "^1.0.1" }, @@ -1533,15 +1166,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.1.0.tgz", - "integrity": "sha512-hIzCPvX4vDs4qL07SYzyomamcs2/tQYXg5DtdAfj35AyJ5PIUqhsLf4YrEIFzZcND7R2E8tpQIZKayxg8/6Wbw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.4.0.tgz", + "integrity": "sha512-I1Ah1irl033uxjxO9Xql7+biL3YD7w9IU8zF+xlzD/YxY6a4b7DYA08PXUUCbm2sEljwJF6ERFy2kTGAGcNilg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.1.0", - "@typescript-eslint/types": "6.1.0", - "@typescript-eslint/typescript-estree": "6.1.0", - "@typescript-eslint/visitor-keys": "6.1.0", + "@typescript-eslint/scope-manager": "6.4.0", + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/typescript-estree": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0", "debug": "^4.3.4" }, "engines": { @@ -1561,13 +1194,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.1.0.tgz", - "integrity": "sha512-AxjgxDn27hgPpe2rQe19k0tXw84YCOsjDJ2r61cIebq1t+AIxbgiXKvD4999Wk49GVaAcdJ/d49FYel+Pp3jjw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.4.0.tgz", + "integrity": "sha512-TUS7vaKkPWDVvl7GDNHFQMsMruD+zhkd3SdVW0d7b+7Zo+bd/hXJQ8nsiUZMi1jloWo6c9qt3B7Sqo+flC1nig==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.1.0", - "@typescript-eslint/visitor-keys": "6.1.0" + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -1578,13 +1211,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.1.0.tgz", - "integrity": "sha512-kFXBx6QWS1ZZ5Ni89TyT1X9Ag6RXVIVhqDs0vZE/jUeWlBv/ixq2diua6G7ece6+fXw3TvNRxP77/5mOMusx2w==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.4.0.tgz", + "integrity": "sha512-TvqrUFFyGY0cX3WgDHcdl2/mMCWCDv/0thTtx/ODMY1QhEiyFtv/OlLaNIiYLwRpAxAtOLOY9SUf1H3Q3dlwAg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.1.0", - "@typescript-eslint/utils": "6.1.0", + "@typescript-eslint/typescript-estree": "6.4.0", + "@typescript-eslint/utils": "6.4.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -1605,9 +1238,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.1.0.tgz", - "integrity": "sha512-+Gfd5NHCpDoHDOaU/yIF3WWRI2PcBRKKpP91ZcVbL0t5tQpqYWBs3z/GGhvU+EV1D0262g9XCnyqQh19prU0JQ==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.4.0.tgz", + "integrity": "sha512-+FV9kVFrS7w78YtzkIsNSoYsnOtrYVnKWSTVXoL1761CsCRv5wpDOINgsXpxD67YCLZtVQekDDyaxfjVWUJmmg==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -1618,13 +1251,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.1.0.tgz", - "integrity": "sha512-nUKAPWOaP/tQjU1IQw9sOPCDavs/iU5iYLiY/6u7gxS7oKQoi4aUxXS1nrrVGTyBBaGesjkcwwHkbkiD5eBvcg==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.0.tgz", + "integrity": "sha512-iDPJArf/K2sxvjOR6skeUCNgHR/tCQXBsa+ee1/clRKr3olZjZ/dSkXPZjG6YkPtnW6p5D1egeEPMCW6Gn4yLA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.1.0", - "@typescript-eslint/visitor-keys": "6.1.0", + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1645,17 +1278,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.1.0.tgz", - "integrity": "sha512-wp652EogZlKmQoMS5hAvWqRKplXvkuOnNzZSE0PVvsKjpexd/XznRVHAtrfHFYmqaJz0DFkjlDsGYC9OXw+OhQ==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.4.0.tgz", + "integrity": "sha512-BvvwryBQpECPGo8PwF/y/q+yacg8Hn/2XS+DqL/oRsOPK+RPt29h5Ui5dqOKHDlbXrAeHUTnyG3wZA0KTDxRZw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.1.0", - "@typescript-eslint/types": "6.1.0", - "@typescript-eslint/typescript-estree": "6.1.0", + "@typescript-eslint/scope-manager": "6.4.0", + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/typescript-estree": "6.4.0", "semver": "^7.5.4" }, "engines": { @@ -1670,12 +1303,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.1.0.tgz", - "integrity": "sha512-yQeh+EXhquh119Eis4k0kYhj9vmFzNpbhM3LftWQVwqVjipCkwHBQOZutcYW+JVkjtTG9k8nrZU1UoNedPDd1A==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.0.tgz", + "integrity": "sha512-yJSfyT+uJm+JRDWYRYdCm2i+pmvXJSMtPR9Cq5/XQs4QIgNoLcoRtDdzsLbLsFM/c6um6ohQkg/MLxWvoIndJA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.1.0", + "@typescript-eslint/types": "6.4.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -1768,6 +1401,15 @@ "node": ">=12" } }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -1859,6 +1501,16 @@ "npm": ">=6.4.1" } }, + "node_modules/axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1958,6 +1610,18 @@ "node": ">=6" } }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/catharsis": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", @@ -2052,6 +1716,32 @@ "fsevents": "~2.3.2" } }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -2125,6 +1815,18 @@ } } }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/deep-eql": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", @@ -2240,6 +1942,18 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, + "node_modules/duplexify": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz", + "integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.4.1", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1", + "stream-shift": "^1.0.0" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -2271,26 +1985,18 @@ } }, "node_modules/enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", "dev": true, "dependencies": { - "ansi-colors": "^4.1.1" + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8.6" } }, - "node_modules/enquirer/node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/ent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", @@ -2709,6 +2415,15 @@ "source-map": "~0.6.1" } }, + "node_modules/escodegen/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/escodegen/node_modules/levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -2761,27 +2476,27 @@ } }, "node_modules/eslint": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.45.0.tgz", - "integrity": "sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz", + "integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.1.0", - "@eslint/js": "8.44.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "^8.47.0", "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.1", - "espree": "^9.6.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -2824,9 +2539,9 @@ } }, "node_modules/eslint-scope": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.1.tgz", - "integrity": "sha512-CvefSOsDdaYYvxChovdrPo/ZGt8d5lrJWleAc1diXRKhHGiTYEI26cvo8Kle/wGnsizoCJjK73FMg1/IkIwiNA==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -2839,37 +2554,16 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-scope/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/eslint-visitor-keys": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", - "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/espree": { @@ -2914,15 +2608,6 @@ "node": ">=0.10" } }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -2935,7 +2620,7 @@ "node": ">=4.0" } }, - "node_modules/esrecurse/node_modules/estraverse": { + "node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", @@ -2944,15 +2629,6 @@ "node": ">=4.0" } }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -2994,12 +2670,6 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/execa/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -3013,9 +2683,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz", - "integrity": "sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -3028,6 +2698,18 @@ "node": ">=8.6.0" } }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -3187,6 +2869,18 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -3242,24 +2936,24 @@ "dev": true }, "node_modules/gaxios": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.1.0.tgz", - "integrity": "sha512-aezGIjb+/VfsJtIcHGcBSerNEDdfdHeMros+RbYbGpmonKWQCOVOes0LVZhn1lDtIgq55qq0HaxymIoae3Fl/A==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.1.3.tgz", + "integrity": "sha512-95hVgBRgEIRQQQHIbnxBXeHbW4TqFk4ZDJW7wmVtvYar72FdhRIo1UGOLS2eRAKCPEdPBWu+M7+A33D9CdX9rA==", "dev": true, "dependencies": { "extend": "^3.0.2", "https-proxy-agent": "^5.0.0", "is-stream": "^2.0.0", - "node-fetch": "^2.6.7" + "node-fetch": "^2.6.9" }, "engines": { "node": ">=12" } }, "node_modules/gcp-metadata": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.2.0.tgz", - "integrity": "sha512-aFhhvvNycky2QyhG+dcfEdHBF0FRbYcf39s6WNHUDysKSrbJ5vuFbjydxBcmewtXeV248GP8dWT3ByPNxsyHCw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz", + "integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==", "dev": true, "dependencies": { "gaxios": "^5.0.0", @@ -3269,6 +2963,15 @@ "node": ">=12" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-func-name": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", @@ -3311,21 +3014,21 @@ } }, "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" } }, "node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.21.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", + "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -3370,9 +3073,9 @@ "dev": true }, "node_modules/google-auth-library": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.8.0.tgz", - "integrity": "sha512-0iJn7IDqObDG5Tu9Tn2WemmJ31ksEa96IyK0J0OZCpTh6CrC6FrattwKX87h3qKVuprCJpdOGKc1Xi8V0kMh8Q==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.9.0.tgz", + "integrity": "sha512-f7aQCJODJFmYWN6PeNKzgvy9LI2tYmXnzpNDHEjG5sDNPgGb2FXQyTBnXeSH+PAtpKESFD+LmHw3Ox3mN7e1Fg==", "dev": true, "dependencies": { "arrify": "^2.0.0", @@ -3380,7 +3083,7 @@ "ecdsa-sig-formatter": "^1.0.11", "fast-text-encoding": "^1.0.0", "gaxios": "^5.0.0", - "gcp-metadata": "^5.2.0", + "gcp-metadata": "^5.3.0", "gtoken": "^6.1.0", "jws": "^4.0.0", "lru-cache": "^6.0.0" @@ -3390,9 +3093,9 @@ } }, "node_modules/google-gax": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-3.6.0.tgz", - "integrity": "sha512-2fyb61vWxUonHiArRNJQmE4tx5oY1ni8VPo08fzII409vDSCWG7apDX4qNOQ2GXXT82gLBn3d3P1Dydh7pWjyw==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-3.6.1.tgz", + "integrity": "sha512-g/lcUjGcB6DSw2HxgEmCDOrI/CByOwqRvsuUvNalHUK2iPPPlmAIpbMbl62u0YufGMr8zgE3JL7th6dCb1Ry+w==", "dev": true, "dependencies": { "@grpc/grpc-js": "~1.8.0", @@ -3407,7 +3110,7 @@ "node-fetch": "^2.6.1", "object-hash": "^3.0.0", "proto3-json-serializer": "^1.0.0", - "protobufjs": "7.2.3", + "protobufjs": "7.2.4", "protobufjs-cli": "1.1.1", "retry-request": "^5.0.0" }, @@ -3419,32 +3122,6 @@ "node": ">=12" } }, - "node_modules/google-gax/node_modules/duplexify": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz", - "integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.0" - } - }, - "node_modules/google-gax/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/google-p12-pem": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-4.0.1.tgz", @@ -3646,9 +3323,9 @@ } }, "node_modules/is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -3666,6 +3343,15 @@ "node": ">=0.10.0" } }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -3756,6 +3442,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -3763,9 +3455,9 @@ "dev": true }, "node_modules/jackspeak": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.1.tgz", - "integrity": "sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.0.tgz", + "integrity": "sha512-uKmsITSsF4rUWQHzqaRUuyAir3fZfW3f202Ee34lz/gZCi970CPZwyQXLGNgWJvvZbvFyzeyGq0+4fcG/mBKZg==", "dev": true, "dependencies": { "@isaacs/cliui": "^8.0.2" @@ -4157,9 +3849,9 @@ } }, "node_modules/minipass": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-6.0.2.tgz", - "integrity": "sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.3.tgz", + "integrity": "sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==", "dev": true, "engines": { "node": ">=16 || 14 >=14.17" @@ -4246,24 +3938,6 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/mocha/node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/mocha/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/mocha/node_modules/minimatch": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", @@ -4282,20 +3956,6 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "node_modules/mocha/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -4311,32 +3971,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/mocha/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/mocha/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/mocha/node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -4385,12 +4019,6 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, "node_modules/nise": { "version": "5.1.4", "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.4.tgz", @@ -4414,9 +4042,9 @@ } }, "node_modules/node-fetch": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", - "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", + "version": "2.6.13", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.13.tgz", + "integrity": "sha512-StxNAxh15zr77QvvkmveSQ8uCQ4+v5FkvNTj0OESmiHu+VRi/gXArXtkWMElOsOUNLtUEvI4yS+rdtOHZTwlQA==", "dev": true, "dependencies": { "whatwg-url": "^5.0.0" @@ -4589,13 +4217,13 @@ "dev": true }, "node_modules/path-scurry": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.9.2.tgz", - "integrity": "sha512-qSDLy2aGFPm8i4rsbHd4MNyTcrzHFsLQykrtbuGRknZZCBBVXSv2tSCDN2Cg6Rt/GFRw8GoW9y9Ecw5rIPG1sg==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", "dev": true, "dependencies": { - "lru-cache": "^9.1.1", - "minipass": "^5.0.0 || ^6.0.2" + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -4605,9 +4233,9 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.1.2.tgz", - "integrity": "sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", + "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", "dev": true, "engines": { "node": "14 || >=16.14" @@ -4622,12 +4250,6 @@ "isarray": "0.0.1" } }, - "node_modules/path-to-regexp/node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "dev": true - }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -4686,9 +4308,9 @@ } }, "node_modules/protobufjs": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.3.tgz", - "integrity": "sha512-TtpvOqwB5Gdz/PQmOjgsrGH1nHjAQVCN7JG4A6r1sXRWESL5rNMAiRcBQlCAdKxZcAbstExQePYG8xof/JVRgg==", + "version": "7.2.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.4.tgz", + "integrity": "sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -4746,15 +4368,6 @@ "balanced-match": "^1.0.0" } }, - "node_modules/protobufjs-cli/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/protobufjs-cli/node_modules/glob": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", @@ -4841,6 +4454,20 @@ "safe-buffer": "^5.1.0" } }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -4872,12 +4499,12 @@ } }, "node_modules/resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", + "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", "dev": true, "dependencies": { - "is-core-module": "^2.11.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -4948,16 +4575,16 @@ } }, "node_modules/rimraf/node_modules/glob": { - "version": "10.2.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.2.7.tgz", - "integrity": "sha512-jTKehsravOJo8IJxUGfZILnkvVJM/MOfHRs8QcXolVef2zNI9Tqyy5+SeuOAZd3upViEZQLyFpQhYiHLrMUNmA==", + "version": "10.3.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.3.tgz", + "integrity": "sha512-92vPiMb/iqpmEgsOoIDvTjc50wf9CCCvMzsi6W0JLPeUKE8TWP1a73PgqSrqy7iAZxaSD1YdzU7QZR5LF51MJw==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^2.0.3", "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2", - "path-scurry": "^1.7.0" + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" }, "bin": { "glob": "dist/cjs/src/bin.js" @@ -4970,9 +4597,9 @@ } }, "node_modules/rimraf/node_modules/minimatch": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz", - "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -5008,10 +4635,24 @@ } }, "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, "node_modules/semver": { "version": "7.5.4", @@ -5059,16 +4700,10 @@ } }, "node_modules/signal-exit": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.2.tgz", - "integrity": "sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true }, "node_modules/sinon": { "version": "15.2.0", @@ -5151,16 +4786,15 @@ "dev": true }, "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, "dependencies": { - "safe-buffer": "~5.1.0" + "safe-buffer": "~5.2.0" } }, - "node_modules/string-width-cjs": { - "name": "string-width", + "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", @@ -5174,11 +4808,17 @@ "node": ">=8" } }, - "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, "engines": { "node": ">=8" } @@ -5337,9 +4977,9 @@ "dev": true }, "node_modules/ts-api-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.1.tgz", - "integrity": "sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.2.tgz", + "integrity": "sha512-Cbu4nIqnEdd+THNEsBdkolnOXhg0I8XteoHaEKgvsxpsbWda4IsUut2c187HxywQCvveojow0Dgw/amxtSKVkQ==", "dev": true, "engines": { "node": ">=16.13.0" @@ -5541,9 +5181,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -5555,6 +5195,23 @@ "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", @@ -5573,29 +5230,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -5608,12 +5242,39 @@ "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==", "dev": true }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/yargs-parser": { "version": "20.2.4", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", @@ -5638,28 +5299,13 @@ "node": ">=10" } }, - "node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "node_modules/yargs/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=12" } }, "node_modules/yn": { @@ -5733,90 +5379,6 @@ "semver": "^7.5.2", "source-map-support": "^0.5.21", "yargs": "^17.4.1" - }, - "dependencies": { - "axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", - "dev": true, - "requires": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" - } - }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true - } } }, "@alcalzone/release-script-core": { @@ -5870,18 +5432,6 @@ "axios": "^0.27.1", "fs-extra": "^10.1.0", "semver": "^7.5.2" - }, - "dependencies": { - "axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", - "dev": true, - "requires": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" - } - } } }, "@alcalzone/release-script-plugin-license": { @@ -5931,9 +5481,9 @@ } }, "@babel/parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.5.tgz", - "integrity": "sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q==", + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz", + "integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==", "dev": true }, "@cspotcode/source-map-support": { @@ -5969,15 +5519,15 @@ } }, "@eslint-community/regexpp": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", - "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", "dev": true }, "@eslint/eslintrc": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.0.tgz", - "integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -5992,9 +5542,9 @@ } }, "@eslint/js": { - "version": "8.44.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz", - "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz", + "integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==", "dev": true }, "@esm2cjs/execa": { @@ -6012,14 +5562,6 @@ "get-stream": "^6.0.1", "merge-stream": "^2.0.0", "signal-exit": "^3.0.7" - }, - "dependencies": { - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - } } }, "@esm2cjs/human-signals": { @@ -6085,31 +5627,6 @@ "google-auth-library": "^8.0.2", "retry-request": "^5.0.0", "teeny-request": "^8.0.0" - }, - "dependencies": { - "duplexify": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz", - "integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==", - "dev": true, - "requires": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.0" - } - }, - "readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } } }, "@google-cloud/projectify": { @@ -6125,9 +5642,9 @@ "dev": true }, "@google-cloud/translate": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/@google-cloud/translate/-/translate-7.2.1.tgz", - "integrity": "sha512-VXmEvMF8qa4c7p5drjUZ06B8v0DxoUfFPyjhFp/wbgoe0GWaD1y1gGk6rUZxGKD/pB19kFU+0LMMSCgBW+a0iA==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@google-cloud/translate/-/translate-7.2.2.tgz", + "integrity": "sha512-IAJhPKotLH/OF/NzWml/byLDN+OILbs1P4k+7HNUJK618NsShFelRKzh3pRUUQA4DX0je3HaEZw9nR+5uJ6ZEg==", "dev": true, "requires": { "@google-cloud/common": "^4.0.0", @@ -6139,9 +5656,9 @@ } }, "@grpc/grpc-js": { - "version": "1.8.15", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.8.15.tgz", - "integrity": "sha512-H2Bu/w6+oQ58DsRbQol66ERBk3V5ZIak/z/MDx0T4EgDnJWps807I6BvTjq0v6UvZtOcLO+ur+Q9wvniqu3OJA==", + "version": "1.8.21", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.8.21.tgz", + "integrity": "sha512-KeyQeZpxeEBSqFVTi3q2K7PiPXmgBfECc4updA1ejCLjYmoAlvvM3ZMp5ztTDUCUQmoY3CpDxvchjO1+rFkoHg==", "dev": true, "requires": { "@grpc/proto-loader": "^0.7.0", @@ -6149,90 +5666,16 @@ } }, "@grpc/proto-loader": { - "version": "0.7.7", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.7.tgz", - "integrity": "sha512-1TIeXOi8TuSCQprPItwoMymZXxWT0CPxUhkrkeCUH+D8U7QDwQ6b7SUz2MaLuWM2llT+J/TVFLmQI5KtML3BhQ==", + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.8.tgz", + "integrity": "sha512-GU12e2c8dmdXb7XUlOgYWZ2o2i+z9/VeACkxTA/zzAe2IjclC5PnVL0lpgjhrqfpDYHzM8B1TF6pqWegMYAzlA==", "dev": true, "requires": { "@types/long": "^4.0.1", "lodash.camelcase": "^4.3.0", "long": "^4.0.0", - "protobufjs": "^7.0.0", + "protobufjs": "^7.2.4", "yargs": "^17.7.2" - }, - "dependencies": { - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true - } } }, "@humanwhocodes/config-array": { @@ -6259,12 +5702,10 @@ "dev": true }, "@iobroker/adapter-core": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.6.8.tgz", - "integrity": "sha512-xrqtH5RYZ6BvEcDyfuPkajd9el4R6p0VLRYKlnfMafAbxybIN+zfeHvjGI4l8OAHkyP2tcv6boX2Vu0KnMFOHw==", - "requires": { - "@types/iobroker": "^4.0.5" - } + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.0.3.tgz", + "integrity": "sha512-SZmL69BtUXitnTbidNjlljQKB6CbkBLK9+Tqo/NMsOqHb1RmhPCNKhO4F5o8jc0dW0J6d4VArXryUkL7Ru0WpA==", + "requires": {} }, "@iobroker/adapter-dev": { "version": "1.2.0", @@ -6280,96 +5721,6 @@ "fs-extra": "^10.1.0", "tiny-glob": "^0.2.9", "yargs": "^17.6.0" - }, - "dependencies": { - "ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true - }, - "axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", - "dev": true, - "requires": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" - } - }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true - } } }, "@iobroker/testing": { @@ -6444,6 +5795,12 @@ } } }, + "@iobroker/types": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@iobroker/types/-/types-5.0.12.tgz", + "integrity": "sha512-zExHvDhSyjgSioJYB8BQa1LvmtiZjn0ThJfaKP+jH9tx7ddyK/irI5cqjR0Y6DUpx0x9BkaDI9utuPVbRWzYLQ==", + "peer": true + }, "@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -6738,14 +6095,6 @@ "@types/node": "*" } }, - "@types/iobroker": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/iobroker/-/iobroker-4.0.5.tgz", - "integrity": "sha512-D1tJwuDQEQQQ/cZVFjFjFUhUuMxJbfrz5U2UooiZwhgs69D/t8IowMvBI6Lk4ZR8HnCSxYwWHVRKyQnEMNgJPA==", - "requires": { - "@types/node": "*" - } - }, "@types/json-schema": { "version": "7.0.12", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", @@ -6793,9 +6142,10 @@ "dev": true }, "@types/node": { - "version": "18.16.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.19.tgz", - "integrity": "sha512-IXl7o+R9iti9eBW4Wg2hx1xQDig183jj7YLn8F7udNceyfkbn1ZxmzZXuak20gR40D7pIkIY1kYGx5VIGbaHKA==" + "version": "18.17.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.6.tgz", + "integrity": "sha512-fGmT/P7z7ecA6bv/ia5DlaWCH4YeZvAQMNpUhrJjtAhOhZfoxS1VLUgU2pdk63efSjQaOJWdXMuAJsws+8I6dg==", + "dev": true }, "@types/proxyquire": { "version": "1.3.28", @@ -6820,9 +6170,9 @@ "dev": true }, "@types/sinon": { - "version": "10.0.15", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.15.tgz", - "integrity": "sha512-3lrFNQG0Kr2LDzvjyjB6AMJk4ge+8iYhQfdnSwIwlG88FUOV43kPcQqDZkDa/h3WSZy6i8Fr0BSjfQtB1B3xuQ==", + "version": "10.0.16", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.16.tgz", + "integrity": "sha512-j2Du5SYpXZjJVJtXBokASpPRj+e2z+VUhCPHmM6WMfe3dpHu6iVKJMU6AiBcMp/XTAYnEj6Wc1trJUWwZ0QaAQ==", "dev": true, "requires": { "@types/sinonjs__fake-timers": "*" @@ -6845,74 +6195,73 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.1.0.tgz", - "integrity": "sha512-qg7Bm5TyP/I7iilGyp6DRqqkt8na00lI6HbjWZObgk3FFSzH5ypRwAHXJhJkwiRtTcfn+xYQIMOR5kJgpo6upw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.4.0.tgz", + "integrity": "sha512-62o2Hmc7Gs3p8SLfbXcipjWAa6qk2wZGChXG2JbBtYpwSRmti/9KHLqfbLs9uDigOexG+3PaQ9G2g3201FWLKg==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.1.0", - "@typescript-eslint/type-utils": "6.1.0", - "@typescript-eslint/utils": "6.1.0", - "@typescript-eslint/visitor-keys": "6.1.0", + "@typescript-eslint/scope-manager": "6.4.0", + "@typescript-eslint/type-utils": "6.4.0", + "@typescript-eslint/utils": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", "natural-compare": "^1.4.0", - "natural-compare-lite": "^1.4.0", "semver": "^7.5.4", "ts-api-utils": "^1.0.1" } }, "@typescript-eslint/parser": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.1.0.tgz", - "integrity": "sha512-hIzCPvX4vDs4qL07SYzyomamcs2/tQYXg5DtdAfj35AyJ5PIUqhsLf4YrEIFzZcND7R2E8tpQIZKayxg8/6Wbw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.4.0.tgz", + "integrity": "sha512-I1Ah1irl033uxjxO9Xql7+biL3YD7w9IU8zF+xlzD/YxY6a4b7DYA08PXUUCbm2sEljwJF6ERFy2kTGAGcNilg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "6.1.0", - "@typescript-eslint/types": "6.1.0", - "@typescript-eslint/typescript-estree": "6.1.0", - "@typescript-eslint/visitor-keys": "6.1.0", + "@typescript-eslint/scope-manager": "6.4.0", + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/typescript-estree": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.1.0.tgz", - "integrity": "sha512-AxjgxDn27hgPpe2rQe19k0tXw84YCOsjDJ2r61cIebq1t+AIxbgiXKvD4999Wk49GVaAcdJ/d49FYel+Pp3jjw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.4.0.tgz", + "integrity": "sha512-TUS7vaKkPWDVvl7GDNHFQMsMruD+zhkd3SdVW0d7b+7Zo+bd/hXJQ8nsiUZMi1jloWo6c9qt3B7Sqo+flC1nig==", "dev": true, "requires": { - "@typescript-eslint/types": "6.1.0", - "@typescript-eslint/visitor-keys": "6.1.0" + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0" } }, "@typescript-eslint/type-utils": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.1.0.tgz", - "integrity": "sha512-kFXBx6QWS1ZZ5Ni89TyT1X9Ag6RXVIVhqDs0vZE/jUeWlBv/ixq2diua6G7ece6+fXw3TvNRxP77/5mOMusx2w==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.4.0.tgz", + "integrity": "sha512-TvqrUFFyGY0cX3WgDHcdl2/mMCWCDv/0thTtx/ODMY1QhEiyFtv/OlLaNIiYLwRpAxAtOLOY9SUf1H3Q3dlwAg==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "6.1.0", - "@typescript-eslint/utils": "6.1.0", + "@typescript-eslint/typescript-estree": "6.4.0", + "@typescript-eslint/utils": "6.4.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" } }, "@typescript-eslint/types": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.1.0.tgz", - "integrity": "sha512-+Gfd5NHCpDoHDOaU/yIF3WWRI2PcBRKKpP91ZcVbL0t5tQpqYWBs3z/GGhvU+EV1D0262g9XCnyqQh19prU0JQ==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.4.0.tgz", + "integrity": "sha512-+FV9kVFrS7w78YtzkIsNSoYsnOtrYVnKWSTVXoL1761CsCRv5wpDOINgsXpxD67YCLZtVQekDDyaxfjVWUJmmg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.1.0.tgz", - "integrity": "sha512-nUKAPWOaP/tQjU1IQw9sOPCDavs/iU5iYLiY/6u7gxS7oKQoi4aUxXS1nrrVGTyBBaGesjkcwwHkbkiD5eBvcg==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.0.tgz", + "integrity": "sha512-iDPJArf/K2sxvjOR6skeUCNgHR/tCQXBsa+ee1/clRKr3olZjZ/dSkXPZjG6YkPtnW6p5D1egeEPMCW6Gn4yLA==", "dev": true, "requires": { - "@typescript-eslint/types": "6.1.0", - "@typescript-eslint/visitor-keys": "6.1.0", + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -6921,27 +6270,27 @@ } }, "@typescript-eslint/utils": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.1.0.tgz", - "integrity": "sha512-wp652EogZlKmQoMS5hAvWqRKplXvkuOnNzZSE0PVvsKjpexd/XznRVHAtrfHFYmqaJz0DFkjlDsGYC9OXw+OhQ==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.4.0.tgz", + "integrity": "sha512-BvvwryBQpECPGo8PwF/y/q+yacg8Hn/2XS+DqL/oRsOPK+RPt29h5Ui5dqOKHDlbXrAeHUTnyG3wZA0KTDxRZw==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.1.0", - "@typescript-eslint/types": "6.1.0", - "@typescript-eslint/typescript-estree": "6.1.0", + "@typescript-eslint/scope-manager": "6.4.0", + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/typescript-estree": "6.4.0", "semver": "^7.5.4" } }, "@typescript-eslint/visitor-keys": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.1.0.tgz", - "integrity": "sha512-yQeh+EXhquh119Eis4k0kYhj9vmFzNpbhM3LftWQVwqVjipCkwHBQOZutcYW+JVkjtTG9k8nrZU1UoNedPDd1A==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.0.tgz", + "integrity": "sha512-yJSfyT+uJm+JRDWYRYdCm2i+pmvXJSMtPR9Cq5/XQs4QIgNoLcoRtDdzsLbLsFM/c6um6ohQkg/MLxWvoIndJA==", "dev": true, "requires": { - "@typescript-eslint/types": "6.1.0", + "@typescript-eslint/types": "6.4.0", "eslint-visitor-keys": "^3.4.1" } }, @@ -7003,6 +6352,12 @@ "debug": "^4.3.4" } }, + "ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true + }, "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -7069,6 +6424,16 @@ "resolved": "https://registry.npmjs.org/autobind-decorator/-/autobind-decorator-2.4.0.tgz", "integrity": "sha512-OGYhWUO72V6DafbF8PM8rm3EPbfuyMZcJhtm5/n26IDwO18pohE4eNazLoCGhPiXOCD0gEGmrbU3849QvM8bbw==" }, + "axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dev": true, + "requires": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -7142,6 +6507,12 @@ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true + }, "catharsis": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", @@ -7205,6 +6576,28 @@ "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" } }, "color-convert": { @@ -7263,6 +6656,12 @@ "ms": "2.1.2" } }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true + }, "deep-eql": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", @@ -7345,6 +6744,18 @@ "domhandler": "^5.0.3" } }, + "duplexify": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz", + "integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==", + "dev": true, + "requires": { + "end-of-stream": "^1.4.1", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1", + "stream-shift": "^1.0.0" + } + }, "eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -7376,20 +6787,13 @@ } }, "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", "dev": true, "requires": { - "ansi-colors": "^4.1.1" - }, - "dependencies": { - "ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true - } + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" } }, "ent": { @@ -7599,6 +7003,12 @@ "source-map": "~0.6.1" }, "dependencies": { + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -7641,27 +7051,27 @@ } }, "eslint": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.45.0.tgz", - "integrity": "sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz", + "integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.1.0", - "@eslint/js": "8.44.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "^8.47.0", "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.1", - "espree": "^9.6.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -7683,17 +7093,6 @@ "optionator": "^0.9.3", "strip-ansi": "^6.0.1", "text-table": "^0.2.0" - }, - "dependencies": { - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } - } } }, "eslint-plugin-html": { @@ -7706,27 +7105,19 @@ } }, "eslint-scope": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.1.tgz", - "integrity": "sha512-CvefSOsDdaYYvxChovdrPo/ZGt8d5lrJWleAc1diXRKhHGiTYEI26cvo8Kle/wGnsizoCJjK73FMg1/IkIwiNA==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "requires": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } } }, "eslint-visitor-keys": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", - "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true }, "espree": { @@ -7753,14 +7144,6 @@ "dev": true, "requires": { "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } } }, "esrecurse": { @@ -7770,20 +7153,12 @@ "dev": true, "requires": { "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } } }, "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, "esutils": { @@ -7813,14 +7188,6 @@ "onetime": "^5.1.2", "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" - }, - "dependencies": { - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - } } }, "extend": { @@ -7836,9 +7203,9 @@ "dev": true }, "fast-glob": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz", - "integrity": "sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -7846,6 +7213,17 @@ "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.4" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } } }, "fast-json-stable-stringify": { @@ -7960,6 +7338,14 @@ "requires": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" + }, + "dependencies": { + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + } } }, "form-data": { @@ -8004,27 +7390,33 @@ "dev": true }, "gaxios": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.1.0.tgz", - "integrity": "sha512-aezGIjb+/VfsJtIcHGcBSerNEDdfdHeMros+RbYbGpmonKWQCOVOes0LVZhn1lDtIgq55qq0HaxymIoae3Fl/A==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.1.3.tgz", + "integrity": "sha512-95hVgBRgEIRQQQHIbnxBXeHbW4TqFk4ZDJW7wmVtvYar72FdhRIo1UGOLS2eRAKCPEdPBWu+M7+A33D9CdX9rA==", "dev": true, "requires": { "extend": "^3.0.2", "https-proxy-agent": "^5.0.0", "is-stream": "^2.0.0", - "node-fetch": "^2.6.7" + "node-fetch": "^2.6.9" } }, "gcp-metadata": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.2.0.tgz", - "integrity": "sha512-aFhhvvNycky2QyhG+dcfEdHBF0FRbYcf39s6WNHUDysKSrbJ5vuFbjydxBcmewtXeV248GP8dWT3ByPNxsyHCw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz", + "integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==", "dev": true, "requires": { "gaxios": "^5.0.0", "json-bigint": "^1.0.0" } }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, "get-func-name": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", @@ -8052,18 +7444,18 @@ } }, "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "requires": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" } }, "globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.21.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", + "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -8096,9 +7488,9 @@ "dev": true }, "google-auth-library": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.8.0.tgz", - "integrity": "sha512-0iJn7IDqObDG5Tu9Tn2WemmJ31ksEa96IyK0J0OZCpTh6CrC6FrattwKX87h3qKVuprCJpdOGKc1Xi8V0kMh8Q==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.9.0.tgz", + "integrity": "sha512-f7aQCJODJFmYWN6PeNKzgvy9LI2tYmXnzpNDHEjG5sDNPgGb2FXQyTBnXeSH+PAtpKESFD+LmHw3Ox3mN7e1Fg==", "dev": true, "requires": { "arrify": "^2.0.0", @@ -8106,16 +7498,16 @@ "ecdsa-sig-formatter": "^1.0.11", "fast-text-encoding": "^1.0.0", "gaxios": "^5.0.0", - "gcp-metadata": "^5.2.0", + "gcp-metadata": "^5.3.0", "gtoken": "^6.1.0", "jws": "^4.0.0", "lru-cache": "^6.0.0" } }, "google-gax": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-3.6.0.tgz", - "integrity": "sha512-2fyb61vWxUonHiArRNJQmE4tx5oY1ni8VPo08fzII409vDSCWG7apDX4qNOQ2GXXT82gLBn3d3P1Dydh7pWjyw==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-3.6.1.tgz", + "integrity": "sha512-g/lcUjGcB6DSw2HxgEmCDOrI/CByOwqRvsuUvNalHUK2iPPPlmAIpbMbl62u0YufGMr8zgE3JL7th6dCb1Ry+w==", "dev": true, "requires": { "@grpc/grpc-js": "~1.8.0", @@ -8130,34 +7522,9 @@ "node-fetch": "^2.6.1", "object-hash": "^3.0.0", "proto3-json-serializer": "^1.0.0", - "protobufjs": "7.2.3", + "protobufjs": "7.2.4", "protobufjs-cli": "1.1.1", "retry-request": "^5.0.0" - }, - "dependencies": { - "duplexify": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz", - "integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==", - "dev": true, - "requires": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.0" - } - }, - "readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } } }, "google-p12-pem": { @@ -8306,9 +7673,9 @@ } }, "is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "dev": true, "requires": { "has": "^1.0.3" @@ -8320,6 +7687,12 @@ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -8380,6 +7753,12 @@ "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -8387,9 +7766,9 @@ "dev": true }, "jackspeak": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.1.tgz", - "integrity": "sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.0.tgz", + "integrity": "sha512-uKmsITSsF4rUWQHzqaRUuyAir3fZfW3f202Ee34lz/gZCi970CPZwyQXLGNgWJvvZbvFyzeyGq0+4fcG/mBKZg==", "dev": true, "requires": { "@isaacs/cliui": "^8.0.2", @@ -8709,9 +8088,9 @@ "dev": true }, "minipass": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-6.0.2.tgz", - "integrity": "sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.3.tgz", + "integrity": "sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==", "dev": true }, "mkdirp": { @@ -8775,18 +8154,6 @@ "wrap-ansi": "^7.0.0" } }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, "minimatch": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", @@ -8802,17 +8169,6 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, "supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -8822,23 +8178,6 @@ "has-flag": "^4.0.0" } }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, "yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -8880,12 +8219,6 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, "nise": { "version": "5.1.4", "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.4.tgz", @@ -8911,9 +8244,9 @@ } }, "node-fetch": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", - "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", + "version": "2.6.13", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.13.tgz", + "integrity": "sha512-StxNAxh15zr77QvvkmveSQ8uCQ4+v5FkvNTj0OESmiHu+VRi/gXArXtkWMElOsOUNLtUEvI4yS+rdtOHZTwlQA==", "dev": true, "requires": { "whatwg-url": "^5.0.0" @@ -9030,19 +8363,19 @@ "dev": true }, "path-scurry": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.9.2.tgz", - "integrity": "sha512-qSDLy2aGFPm8i4rsbHd4MNyTcrzHFsLQykrtbuGRknZZCBBVXSv2tSCDN2Cg6Rt/GFRw8GoW9y9Ecw5rIPG1sg==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", "dev": true, "requires": { - "lru-cache": "^9.1.1", - "minipass": "^5.0.0 || ^6.0.2" + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "dependencies": { "lru-cache": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.1.2.tgz", - "integrity": "sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", + "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", "dev": true } } @@ -9054,14 +8387,6 @@ "dev": true, "requires": { "isarray": "0.0.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "dev": true - } } }, "path-type": { @@ -9104,9 +8429,9 @@ } }, "protobufjs": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.3.tgz", - "integrity": "sha512-TtpvOqwB5Gdz/PQmOjgsrGH1nHjAQVCN7JG4A6r1sXRWESL5rNMAiRcBQlCAdKxZcAbstExQePYG8xof/JVRgg==", + "version": "7.2.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.4.tgz", + "integrity": "sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ==", "dev": true, "requires": { "@protobufjs/aspromise": "^1.1.2", @@ -9158,12 +8483,6 @@ "balanced-match": "^1.0.0" } }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - }, "glob": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", @@ -9220,6 +8539,17 @@ "safe-buffer": "^5.1.0" } }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, "readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -9245,12 +8575,12 @@ } }, "resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", + "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", "dev": true, "requires": { - "is-core-module": "^2.11.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" } @@ -9296,22 +8626,22 @@ } }, "glob": { - "version": "10.2.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.2.7.tgz", - "integrity": "sha512-jTKehsravOJo8IJxUGfZILnkvVJM/MOfHRs8QcXolVef2zNI9Tqyy5+SeuOAZd3upViEZQLyFpQhYiHLrMUNmA==", + "version": "10.3.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.3.tgz", + "integrity": "sha512-92vPiMb/iqpmEgsOoIDvTjc50wf9CCCvMzsi6W0JLPeUKE8TWP1a73PgqSrqy7iAZxaSD1YdzU7QZR5LF51MJw==", "dev": true, "requires": { "foreground-child": "^3.1.0", "jackspeak": "^2.0.3", "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2", - "path-scurry": "^1.7.0" + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" } }, "minimatch": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz", - "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, "requires": { "brace-expansion": "^2.0.1" @@ -9329,9 +8659,9 @@ } }, "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, "semver": { @@ -9368,9 +8698,9 @@ "dev": true }, "signal-exit": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.2.tgz", - "integrity": "sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "sinon": { @@ -9440,12 +8770,23 @@ "dev": true }, "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { - "safe-buffer": "~5.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" } }, "string-width-cjs": { @@ -9457,14 +8798,6 @@ "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - } } }, "strip-ansi": { @@ -9583,9 +8916,9 @@ "dev": true }, "ts-api-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.1.tgz", - "integrity": "sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.2.tgz", + "integrity": "sha512-Cbu4nIqnEdd+THNEsBdkolnOXhg0I8XteoHaEKgvsxpsbWda4IsUut2c187HxywQCvveojow0Dgw/amxtSKVkQ==", "dev": true, "requires": {} }, @@ -9722,9 +9055,9 @@ } }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true }, "workerpool": { @@ -9733,6 +9066,17 @@ "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, "wrap-ansi-cjs": { "version": "npm:wrap-ansi@7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -9742,25 +9086,6 @@ "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - } } }, "wrappy": { @@ -9775,12 +9100,41 @@ "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==", "dev": true }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "dependencies": { + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + } + } + }, "yargs-parser": { "version": "20.2.4", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", @@ -9797,20 +9151,6 @@ "decamelize": "^4.0.0", "flat": "^5.0.2", "is-plain-obj": "^2.1.0" - }, - "dependencies": { - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true - }, - "decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true - } } }, "yn": { diff --git a/package.json b/package.json index 32a281d..dacd745 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "linux" ], "dependencies": { - "@iobroker/adapter-core": "^2.6.8", + "@iobroker/adapter-core": "^3.0.3", "autobind-decorator": "^2.4.0" }, "devDependencies": { @@ -35,15 +35,15 @@ "@types/chai": "^4.3.5", "@types/chai-as-promised": "^7.1.5", "@types/mocha": "^10.0.1", - "@types/node": "^18.16.19", + "@types/node": "^18.17.6", "@types/proxyquire": "^1.3.28", - "@types/sinon": "^10.0.15", + "@types/sinon": "^10.0.16", "@types/sinon-chai": "^3.2.9", - "@typescript-eslint/eslint-plugin": "^6.1.0", - "@typescript-eslint/parser": "^6.1.0", + "@typescript-eslint/eslint-plugin": "^6.4.0", + "@typescript-eslint/parser": "^6.4.0", "chai": "^4.3.7", "chai-as-promised": "^7.1.1", - "eslint": "^8.45.0", + "eslint": "^8.47.0", "eslint-plugin-html": "^7.1.0", "mocha": "^10.2.0", "proxyquire": "^2.1.3", diff --git a/src/main.ts b/src/main.ts index 60239e7..b9ccd3f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -8,7 +8,6 @@ import 'source-map-support/register'; import { readFile, readdir } from 'fs/promises'; - import * as crypto from 'crypto'; import { diff --git a/src/remote-server.ts b/src/remote-server.ts index 1bcff91..6c3028f 100644 --- a/src/remote-server.ts +++ b/src/remote-server.ts @@ -140,7 +140,7 @@ export class RemoteSensorServer extends EventEmitter { // prepare promise to wait for feedback with a timeout of 5 seconds const prom = new Promise((resolve, reject) => { - let timeout: ioBroker.Timeout | null = null; + let timeout: ioBroker.Timeout | undefined = undefined; const handler = (data: RemoteDataRead): void => { if (typeof data !== 'object' || data.address !== sensorAddress || data.ts !== requestTs) return; @@ -202,7 +202,7 @@ export class RemoteSensorServer extends EventEmitter { // wait for feedback with a timeout of 5 seconds proms.push(new Promise((resolve, reject) => { - let timeout: ioBroker.Timeout | null = null; + let timeout: ioBroker.Timeout | undefined = undefined; const handler = (data: RemoteDataSearch): void => { if (typeof data !== 'object' || data.systemId !== client.systemId || data.ts !== requestTs) return; @@ -287,7 +287,7 @@ export class RemoteSensorServer extends EventEmitter { this.adapter.log.warn(`Disconnecting remote ${socketId} due to inactivity before identification`); socket.destroy(); delete this.socketTimeouts[socketId]; - }, 5000); + }, 5000) as ioBroker.Timeout; // request client information this.send(socket, { cmd: 'clientInfo', protocolVersion: REMOTE_PROTOCOL_VERSION }) diff --git a/src/sensor.ts b/src/sensor.ts index ec00fe8..fbaa42b 100644 --- a/src/sensor.ts +++ b/src/sensor.ts @@ -84,7 +84,7 @@ export class Sensor extends EventEmitter { /** * Timer for interval sensor readings. */ - private timer: ioBroker.Interval | null = null; + private timer: ioBroker.Interval | undefined = undefined; /** * System path where the 1-wire devices can be read. @@ -234,7 +234,7 @@ export class Sensor extends EventEmitter { public stop (): void { if (this.timer) { this.adapter.clearInterval(this.timer); - this.timer = null; + this.timer = undefined; } } }