diff --git a/.eslintrc.js b/.eslintrc.js index 15db0d4c..cebcd4ca 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,14 +1,27 @@ module.exports = { - parser: "@typescript-eslint/parser", // Specifies the ESLint parser - parserOptions: { - ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features - sourceType: "module" // Allows for the use of imports + "env": { + "browser": true, + "es2021": true }, - extends: [ - "plugin:@typescript-eslint/recommended" // Uses the recommended rules from the @typescript-eslint/eslint-plugin + "extends": "standard-with-typescript", + "overrides": [ + { + "env": { + "node": true + }, + "files": [ + ".eslintrc.{js,cjs}" + ], + "parserOptions": { + "sourceType": "script" + } + } ], - rules: { - // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs - // e.g. "@typescript-eslint/explicit-function-return-type": "off", + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module" + }, + "rules": { + "@typescript-eslint/strict-boolean-expressions": "off" } -}; \ No newline at end of file +} diff --git a/.github/workflows/build.yml b/.github/workflows/yarn.yml similarity index 57% rename from .github/workflows/build.yml rename to .github/workflows/yarn.yml index ef160a7e..2a4aff0f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/yarn.yml @@ -1,17 +1,24 @@ -name: 'Build' +name: yarn -on: [push, pull_request] +on: + push: + branches: + [master] + pull_request: jobs: build: - name: Test build + name: yarn runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 18 - name: Build run: | yarn install yarn build + - name: Lint + run: | + yarn lint diff --git a/.vscode/extensions.json b/.vscode/extensions.json index af6cdd10..3c4283b9 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -3,7 +3,6 @@ "github.vscode-pull-request-github", "eamodio.gitlens", "dbaeumer.vscode-eslint", - "esbenp.prettier-vscode", "bierner.lit-html", "runem.lit-plugin", "davidanson.vscode-markdownlint", diff --git a/package.json b/package.json index a9116257..35f4ea06 100644 --- a/package.json +++ b/package.json @@ -29,14 +29,13 @@ "@rollup/plugin-image": "^2.1.1", "@rollup/plugin-json": "^5.0.0", "@types/luxon": "^3.3.0", - "@typescript-eslint/eslint-plugin": "^4.33.0", + "@typescript-eslint/eslint-plugin": "^6.4.0", "@typescript-eslint/parser": "^4.33.0", - "eslint": "^7.32.0", - "eslint-config-airbnb-base": "^14.2.1", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-import": "^2.24.0", - "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.4.1", + "eslint": "^8.0.1", + "eslint-config-standard-with-typescript": "^39.1.0", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-n": "^15.0.0 || ^16.0.0 ", + "eslint-plugin-promise": "^6.0.0", "rollup": "^2.58.0", "rollup-plugin-babel": "^4.4.0", "rollup-plugin-commonjs": "^10.1.0", @@ -45,7 +44,7 @@ "rollup-plugin-serve": "^1.1.0", "rollup-plugin-terser": "^7.0.2", "rollup-plugin-typescript2": "^0.36.0", - "typescript": "^4.8.4" + "typescript": "*" }, "resolutions": { "lit": "^2.1.2", @@ -55,9 +54,8 @@ }, "scripts": { "start": "rollup -c rollup.config.dev.js --watch", - "build": "npm run lint && npm run rollup", - "lint": "eslint src/*.ts", - "rollup": "rollup -c", - "prettier": "prettier --write src/*.ts" + "build": "yarn rollup", + "lint": "eslint **/*.ts --max-warnings 0", + "rollup": "rollup -c" } } diff --git a/src/action-handler-directive.ts b/src/action-handler-directive.ts index 15b6e74a..615bcbff 100644 --- a/src/action-handler-directive.ts +++ b/src/action-handler-directive.ts @@ -1,197 +1,195 @@ -import { noChange } from 'lit'; -import { AttributePart, directive, Directive, DirectiveParameters } from 'lit/directive'; +import { noChange } from 'lit' +import { type AttributePart, directive, Directive, type DirectiveParameters } from 'lit/directive' -import { ActionHandlerDetail, ActionHandlerOptions } from 'custom-card-helpers/dist/types'; -import { fireEvent } from 'custom-card-helpers'; +import { type ActionHandlerDetail, type ActionHandlerOptions } from 'custom-card-helpers/dist/types' +import { fireEvent } from 'custom-card-helpers' -const isTouch = 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.maxTouchPoints > 0; +const isTouch = 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.maxTouchPoints > 0 interface ActionHandler extends HTMLElement { - holdTime: number; - bind(element: Element, options): void; + holdTime: number } interface ActionHandlerElement extends HTMLElement { - actionHandler?: boolean; + actionHandler?: boolean } declare global { interface HASSDomEvents { - action: ActionHandlerDetail; + action: ActionHandlerDetail } } class ActionHandler extends HTMLElement implements ActionHandler { - public holdTime = 500; + public holdTime = 500 // eslint-disable-next-line @typescript-eslint/no-explicit-any - public ripple: any; + public ripple: any - protected timer?: number; + protected timer?: number - protected held = false; + protected held = false - private dblClickTimeout?: number; + private dblClickTimeout?: number - constructor() { - super(); - this.ripple = document.createElement('mwc-ripple'); + constructor () { + super() + this.ripple = document.createElement('mwc-ripple') } - public connectedCallback(): void { + public connectedCallback (): void { Object.assign(this.style, { position: 'absolute', width: isTouch ? '100px' : '50px', height: isTouch ? '100px' : '50px', transform: 'translate(-50%, -50%)', pointerEvents: 'none', - zIndex: '999', - }); + zIndex: '999' + }) - this.appendChild(this.ripple); + this.appendChild(this.ripple) this.ripple.primary = true; ['touchcancel', 'mouseout', 'mouseup', 'touchmove', 'mousewheel', 'wheel', 'scroll'].forEach((ev) => { document.addEventListener( ev, () => { - clearTimeout(this.timer); - this.stopAnimation(); - this.timer = undefined; + clearTimeout(this.timer) + this.stopAnimation() + this.timer = undefined }, - { passive: true }, - ); - }); + { passive: true } + ) + }) } - public bind(element: ActionHandlerElement, options): void { + public bind (element: ActionHandlerElement, options): void { if (element.actionHandler) { - return; + return } - element.actionHandler = true; + element.actionHandler = true element.addEventListener('contextmenu', (ev: Event) => { - const e = ev || window.event; + const e = ev || window.event if (e.preventDefault) { - e.preventDefault(); + e.preventDefault() } if (e.stopPropagation) { - e.stopPropagation(); + e.stopPropagation() } - e.cancelBubble = true; - e.returnValue = false; - return false; - }); + e.cancelBubble = true + e.returnValue = false + return false + }) const start = (ev: Event): void => { - this.held = false; - let x; - let y; + this.held = false + let x + let y if ((ev as TouchEvent).touches) { - x = (ev as TouchEvent).touches[0].pageX; - y = (ev as TouchEvent).touches[0].pageY; + x = (ev as TouchEvent).touches[0].pageX + y = (ev as TouchEvent).touches[0].pageY } else { - x = (ev as MouseEvent).pageX; - y = (ev as MouseEvent).pageY; + x = (ev as MouseEvent).pageX + y = (ev as MouseEvent).pageY } this.timer = window.setTimeout(() => { - this.startAnimation(x, y); - this.held = true; - }, this.holdTime); - }; + this.startAnimation(x, y) + this.held = true + }, this.holdTime) + } const end = (ev: Event): void => { // Prevent mouse event if touch event - ev.preventDefault(); + ev.preventDefault() if (['touchend', 'touchcancel'].includes(ev.type) && this.timer === undefined) { - return; + return } - clearTimeout(this.timer); - this.stopAnimation(); - this.timer = undefined; + clearTimeout(this.timer) + this.stopAnimation() + this.timer = undefined if (this.held) { - fireEvent(element, 'action', { action: 'hold' }); + fireEvent(element, 'action', { action: 'hold' }) } else if (options.hasDoubleClick) { if ((ev.type === 'click' && (ev as MouseEvent).detail < 2) || !this.dblClickTimeout) { this.dblClickTimeout = window.setTimeout(() => { - this.dblClickTimeout = undefined; - fireEvent(element, 'action', { action: 'tap' }); - }, 250); + this.dblClickTimeout = undefined + fireEvent(element, 'action', { action: 'tap' }) + }, 250) } else { - clearTimeout(this.dblClickTimeout); - this.dblClickTimeout = undefined; - fireEvent(element, 'action', { action: 'double_tap' }); + clearTimeout(this.dblClickTimeout) + this.dblClickTimeout = undefined + fireEvent(element, 'action', { action: 'double_tap' }) } } else { - fireEvent(element, 'action', { action: 'tap' }); + fireEvent(element, 'action', { action: 'tap' }) } - }; + } const handleEnter = (ev: KeyboardEvent): void => { if (ev.keyCode !== 13) { - return; + return } - end(ev); - }; + end(ev) + } - element.addEventListener('touchstart', start, { passive: true }); - element.addEventListener('touchend', end); - element.addEventListener('touchcancel', end); + element.addEventListener('touchstart', start, { passive: true }) + element.addEventListener('touchend', end) + element.addEventListener('touchcancel', end) - element.addEventListener('mousedown', start, { passive: true }); - element.addEventListener('click', end); + element.addEventListener('mousedown', start, { passive: true }) + element.addEventListener('click', end) - element.addEventListener('keyup', handleEnter); + element.addEventListener('keyup', handleEnter) } - private startAnimation(x: number, y: number): void { + private startAnimation (x: number, y: number): void { Object.assign(this.style, { left: `${x}px`, top: `${y}px`, - display: null, - }); - this.ripple.disabled = false; - this.ripple.active = true; - this.ripple.unbounded = true; + display: null + }) + this.ripple.disabled = false + this.ripple.active = true + this.ripple.unbounded = true } - private stopAnimation(): void { - this.ripple.active = false; - this.ripple.disabled = true; - this.style.display = 'none'; + private stopAnimation (): void { + this.ripple.active = false + this.ripple.disabled = true + this.style.display = 'none' } } -customElements.define('action-handler-clock-weather', ActionHandler); +customElements.define('action-handler-clock-weather', ActionHandler) const getActionHandler = (): ActionHandler => { - const body = document.body; + const body = document.body if (body.querySelector('action-handler-clock-weather')) { - return body.querySelector('action-handler-clock-weather') as ActionHandler; + return body.querySelector('action-handler-clock-weather') as ActionHandler } - const actionhandler = document.createElement('action-handler-clock-weather'); - body.appendChild(actionhandler); + const actionhandler = document.createElement('action-handler-clock-weather') + body.appendChild(actionhandler) - return actionhandler as ActionHandler; -}; + return actionhandler as ActionHandler +} export const actionHandlerBind = (element: ActionHandlerElement, options?: ActionHandlerOptions): void => { - const actionhandler: ActionHandler = getActionHandler(); + const actionhandler: ActionHandler = getActionHandler() if (!actionhandler) { - return; + return } - actionhandler.bind(element, options); -}; + actionhandler.bind(element, options) +} export const actionHandler = directive( class extends Directive { - update(part: AttributePart, [options]: DirectiveParameters) { - actionHandlerBind(part.element as ActionHandlerElement, options); - return noChange; + update (part: AttributePart, [options]: DirectiveParameters): unknown { + actionHandlerBind(part.element as ActionHandlerElement, options) + return noChange } - // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars - render(_options?: ActionHandlerOptions) {} - }, -); + render (_options?: ActionHandlerOptions): void {} + } +) diff --git a/src/clock-weather-card.ts b/src/clock-weather-card.ts index ce800bf1..02959c17 100644 --- a/src/clock-weather-card.ts +++ b/src/clock-weather-card.ts @@ -1,151 +1,149 @@ -import { LitElement, html, TemplateResult, PropertyValues, CSSResultGroup } from 'lit'; +import { LitElement, html, type TemplateResult, type PropertyValues, type CSSResultGroup } from 'lit' // eslint-disable-next-line @typescript-eslint/no-unused-vars -import { customElement, property, state } from 'lit/decorators'; +import { customElement, property, state } from 'lit/decorators' import { - HomeAssistant, + type HomeAssistant, hasConfigOrEntityChanged, hasAction, - ActionHandlerEvent, + type ActionHandlerEvent, handleAction, - TimeFormat, -} from 'custom-card-helpers'; // This is a community maintained npm module with common helper functions/types. https://github.com/custom-cards/custom-card-helpers + TimeFormat +} from 'custom-card-helpers' // This is a community maintained npm module with common helper functions/types. https://github.com/custom-cards/custom-card-helpers import { - ClockWeatherCardConfig, - MergedClockWeatherCardConfig, - MergedWeatherForecast, + type ClockWeatherCardConfig, + type MergedClockWeatherCardConfig, + type MergedWeatherForecast, Rgb, - TemperatureSensor, - TemperatureUnit, - Weather, + type TemperatureSensor, + type TemperatureUnit, + type Weather, WeatherEntityFeature, - WeatherForecast, - WeatherForecastEvent -} from './types'; -import styles from './styles'; -import { actionHandler } from './action-handler-directive'; -import { localize } from './localize/localize'; -import { HassEntityBase } from 'home-assistant-js-websocket'; -import { extractMostOccuring, max, min, round, roundDown, roundIfNotNull, roundUp } from './utils'; -import { svg, png } from './images'; -import { version } from '../package.json'; -import { safeRender } from './helpers'; -import { format, Locale } from 'date-fns'; -import * as locales from 'date-fns/locale'; -import { DateTime } from 'luxon'; + type WeatherForecast, + type WeatherForecastEvent +} from './types' +import styles from './styles' +import { actionHandler } from './action-handler-directive' +import { localize } from './localize/localize' +import { type HassEntityBase } from 'home-assistant-js-websocket' +import { extractMostOccuring, max, min, round, roundDown, roundIfNotNull, roundUp } from './utils' +import { svg, png } from './images' +import { version } from '../package.json' +import { safeRender } from './helpers' +import { format, type Locale } from 'date-fns' +import * as locales from 'date-fns/locale' +import { DateTime } from 'luxon' console.info( `%c CLOCK-WEATHER-CARD \n%c Version: ${version}`, - 'color: orange; font-weight: bold; background: black', - 'color: white; font-weight: bold; background: dimgray', +'color: orange; font-weight: bold; background: black', +'color: white; font-weight: bold; background: dimgray' ); // This puts your card into the UI card picker dialog -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions (window as any).customCards = (window as any).customCards || []; -// eslint-disable-next-line @typescript-eslint/no-explicit-any (window as any).customCards.push({ type: 'clock-weather-card', name: 'Clock Weather Card', - description: 'Shows the current date/time in combination with the current weather and an iOS insipired weather forecast.', -}); + description: 'Shows the current date/time in combination with the current weather and an iOS insipired weather forecast.' +}) const gradientMap: Map = new Map() .set(-10, new Rgb(120, 162, 204)) // darker blue .set(0, new Rgb(164, 195, 210)) // light blue - .set(10, new Rgb(121, 210 ,179)) // turquoise + .set(10, new Rgb(121, 210, 179)) // turquoise .set(20, new Rgb(252, 245, 112)) // yellow .set(30, new Rgb(255, 150, 79)) // orange - .set(40, new Rgb(255, 192, 159)); // red + .set(40, new Rgb(255, 192, 159)) // red @customElement('clock-weather-card') -// eslint-disable-next-line @typescript-eslint/no-unused-vars export class ClockWeatherCard extends LitElement { // https://lit.dev/docs/components/properties/ - @property({ attribute: false }) public hass!: HomeAssistant; + @property({ attribute: false }) public hass!: HomeAssistant - @state() private config!: MergedClockWeatherCardConfig; - @state() private currentDate!: Date; - @state() private forecastSubscriber?: Promise<() => void>; - @state() private forecasts?: WeatherForecast[]; + @state() private config!: MergedClockWeatherCardConfig + @state() private currentDate!: Date + @state() private forecastSubscriber?: Promise<() => void> + @state() private forecasts?: WeatherForecast[] - constructor() { - super(); - this.currentDate = new Date(); - const msToNextMinute = (60 - this.currentDate.getSeconds()) * 1000; - setTimeout(() => setInterval(() => { this.currentDate = new Date() }, 1000 * 60), msToNextMinute); - setTimeout(() => { this.currentDate = new Date() }, msToNextMinute); + constructor () { + super() + this.currentDate = new Date() + const msToNextMinute = (60 - this.currentDate.getSeconds()) * 1000 + setTimeout(() => setInterval(() => { this.currentDate = new Date() }, 1000 * 60), msToNextMinute) + setTimeout(() => { this.currentDate = new Date() }, msToNextMinute) } - public static getStubConfig(_hass: HomeAssistant, entities: string[], entitiesFallback: string[]): Record { - const entity = entities.find(e => e.startsWith('weather.') ?? entitiesFallback.find(e => e.startsWith)); - if (entity) { - return { entity }; + public static getStubConfig (_hass: HomeAssistant, entities: string[], entitiesFallback: string[]): Record { + const entity = entities.find(e => e.startsWith('weather.') ?? entitiesFallback.find(e => e.startsWith)) + if (entity === undefined) { + return { entity } } - return {}; + return {} } - public getCardSize(): number { - return 3 + roundUp(this.config.forecast_days / 2); + public getCardSize (): number { + return 3 + roundUp(this.config.forecast_days / 2) } // https://lit.dev/docs/components/properties/#accessors-custom - public setConfig(config: ClockWeatherCardConfig): void { + public setConfig (config?: ClockWeatherCardConfig): void { if (!config) { - throw new Error('Invalid configuration.'); + throw new Error('Invalid configuration.') } if (!config.entity) { - throw new Error('Attribute "entity" must be present.'); + throw new Error('Attribute "entity" must be present.') } if (config.forecast_days && config.forecast_days < 1) { - throw new Error('Attribute "forecast_days" must be greater than 0.'); + throw new Error('Attribute "forecast_days" must be greater than 0.') } if (config.time_format && config.time_format.toString() !== '24' && config.time_format.toString() !== '12') { - throw new Error('Attribute "time_format" must either be "12" or "24".'); + throw new Error('Attribute "time_format" must either be "12" or "24".') } if (config.hide_today_section && config.hide_forecast_section) { - throw new Error('Attributes "hide_today_section" and "hide_forecast_section" must not enabled at the same time.'); + throw new Error('Attributes "hide_today_section" and "hide_forecast_section" must not enabled at the same time.') } - this.config = this.mergeConfig(config); + this.config = this.mergeConfig(config) } // https://lit.dev/docs/components/lifecycle/#reactive-update-cycle-performing - protected shouldUpdate(changedProps: PropertyValues): boolean { + protected shouldUpdate (changedProps: PropertyValues): boolean { if (!this.config) { - return false; + return false } - if (changedProps.has("forecasts")) { - return true; + if (changedProps.has('forecasts')) { + return true } - const oldHass = changedProps.get('hass') as HomeAssistant | undefined; + const oldHass = changedProps.get('hass') as HomeAssistant | undefined if (oldHass) { - const oldSun = oldHass.states[this.config.sun_entity]; - const newSun = this.hass?.states[this.config.sun_entity]; + const oldSun = oldHass.states[this.config.sun_entity] + const newSun = this.hass?.states[this.config.sun_entity] if (oldSun !== newSun) { - return true; + return true } } - return hasConfigOrEntityChanged(this, changedProps, false); + return hasConfigOrEntityChanged(this, changedProps, false) } - protected updated(changedProps: PropertyValues): void { - super.updated(changedProps); + protected updated (changedProps: PropertyValues): void { + super.updated(changedProps) if (changedProps.has('config')) { - this.subscribeForecastEvents(); + this.subscribeForecastEvents() } } // https://lit.dev/docs/components/rendering/ - protected render(): TemplateResult { + protected render (): TemplateResult { const showToday = !this.config.hide_today_section const showForecast = !this.config.hide_forecast_section return html` @@ -153,49 +151,55 @@ export class ClockWeatherCard extends LitElement { @action=${this.handleAction} .actionHandler=${actionHandler({ hasHold: hasAction(this.config.hold_action), - hasDoubleClick: hasAction(this.config.double_tap_action), + hasDoubleClick: hasAction(this.config.double_tap_action) })} tabindex="0" .label=${`Clock Weather Card: ${this.config.entity || 'No Entity Defined'}`} > - ${this.config.title ? html` + ${this.config.title +? html`
${this.config.title} -
` : '' } + ` +: ''}
- ${showToday ? html` + ${showToday +? html` ${safeRender(() => this.renderToday())} - ` : ''} - ${showForecast ? html` + ` +: ''} + ${showForecast +? html` ${safeRender(() => this.renderForecast())} - ` : ''} + ` +: ''}
- `; + ` } - public connectedCallback(): void { - super.connectedCallback(); + public connectedCallback (): void { + super.connectedCallback() if (this.hasUpdated && this.config && this.hass) { - this.subscribeForecastEvents(); + this.subscribeForecastEvents() } } - public disconnectedCallback(): void { - super.disconnectedCallback(); - this.unsubscribeForecastEvents(); + public disconnectedCallback (): void { + super.disconnectedCallback() + this.unsubscribeForecastEvents() } - private renderToday(): TemplateResult { - const weather = this.getWeather(); - const state = weather.state; - const temp = roundIfNotNull(this.getCurrentTemperature()); - const tempUnit = weather.attributes.temperature_unit; - const iconType = this.config.weather_icon_type; - const icon = this.toIcon(state, iconType, false, this.getIconAnimationKind()); - const weatherString = this.localize(`weather.${state}`); + private renderToday (): TemplateResult { + const weather = this.getWeather() + const state = weather.state + const temp = roundIfNotNull(this.getCurrentTemperature()) + const tempUnit = weather.attributes.temperature_unit + const iconType = this.config.weather_icon_type + const icon = this.toIcon(state, iconType, false, this.getIconAnimationKind()) + const weatherString = this.localize(`weather.${state}`) const localizedTemp = temp !== null ? this.toConfiguredTempWithUnit(tempUnit, temp) : null return html` @@ -211,45 +215,45 @@ export class ClockWeatherCard extends LitElement { ${this.config.hide_clock ? localizedTemp ?? 'n/a' : this.time()} - ${this.config.hide_date ? '' : this.date() } + ${this.config.hide_date ? '' : this.date()} - `; + ` } - private renderForecast(): TemplateResult[] { - const weather = this.getWeather(); - const currentTemp = roundIfNotNull(this.getCurrentTemperature()); - const maxItemsCount = this.config.forecast_days; - const hourly = this.config.hourly_forecast; - const temperatureUnit = weather.attributes.temperature_unit; + private renderForecast (): TemplateResult[] { + const weather = this.getWeather() + const currentTemp = roundIfNotNull(this.getCurrentTemperature()) + const maxItemsCount = this.config.forecast_days + const hourly = this.config.hourly_forecast + const temperatureUnit = weather.attributes.temperature_unit - const forecasts = this.mergeForecasts(maxItemsCount, hourly); + const forecasts = this.mergeForecasts(maxItemsCount, hourly) - const minTemps = forecasts.map((f) => f.templow); - const maxTemps = forecasts.map((f) => f.temperature); + const minTemps = forecasts.map((f) => f.templow) + const maxTemps = forecasts.map((f) => f.temperature) if (currentTemp !== null) { - minTemps.push(currentTemp); - maxTemps.push(currentTemp); + minTemps.push(currentTemp) + maxTemps.push(currentTemp) } - const minTemp = Math.round(min(minTemps)); - const maxTemp = Math.round(max(maxTemps)); - - const gradientRange = this.gradientRange(minTemp, maxTemp, temperatureUnit); - return forecasts.map((forecast) => safeRender(() => this.renderForecastItem(forecast, gradientRange, minTemp, maxTemp, currentTemp, hourly))); - } - - private renderForecastItem(forecast: MergedWeatherForecast, gradientRange: Rgb[], minTemp: number, maxTemp: number, currentTemp: number | null, hourly: boolean): TemplateResult { - const twelveHour = this.getTimeFormat() === '12'; - const displayText = !hourly ? this.localize('day.' + forecast.datetime.getDay()) : this.time(forecast.datetime); - const weatherState = forecast.condition === 'pouring' ? 'raindrops' : forecast.condition === 'rainy' ? 'raindrop' : forecast.condition; - const weatherIcon = this.toIcon(weatherState, 'fill', true, 'static'); - const tempUnit = this.getWeather().attributes.temperature_unit; - const isNow = !hourly ? new Date().getDate() === forecast.datetime.getDate() : new Date().getHours() === forecast.datetime.getHours(); - const minTempDay = Math.round(isNow && currentTemp !== null ? Math.min(currentTemp, forecast.templow) : forecast.templow); - const maxTempDay = Math.round(isNow && currentTemp !== null ? Math.max(currentTemp, forecast.temperature) : forecast.temperature); - const colOneSize = hourly && twelveHour ? '3rem' : hourly ? '2.5rem' : '2rem'; - + const minTemp = Math.round(min(minTemps)) + const maxTemp = Math.round(max(maxTemps)) + + const gradientRange = this.gradientRange(minTemp, maxTemp, temperatureUnit) + return forecasts.map((forecast) => safeRender(() => this.renderForecastItem(forecast, gradientRange, minTemp, maxTemp, currentTemp, hourly))) + } + + private renderForecastItem (forecast: MergedWeatherForecast, gradientRange: Rgb[], minTemp: number, maxTemp: number, currentTemp: number | null, hourly: boolean): TemplateResult { + const twelveHour = this.getTimeFormat() === '12' + const displayText = !hourly ? this.localize('day.' + forecast.datetime.getDay()) : this.time(forecast.datetime) + const weatherState = forecast.condition === 'pouring' ? 'raindrops' : forecast.condition === 'rainy' ? 'raindrop' : forecast.condition + const weatherIcon = this.toIcon(weatherState, 'fill', true, 'static') + const tempUnit = this.getWeather().attributes.temperature_unit + const isNow = !hourly ? new Date().getDate() === forecast.datetime.getDate() : new Date().getHours() === forecast.datetime.getHours() + const minTempDay = Math.round(isNow && currentTemp !== null ? Math.min(currentTemp, forecast.templow) : forecast.templow) + const maxTempDay = Math.round(isNow && currentTemp !== null ? Math.max(currentTemp, forecast.temperature) : forecast.temperature) + const colOneSize = hourly && twelveHour ? '3rem' : hourly ? '2.5rem' : '2rem' + return html` ${this.renderText(displayText)} @@ -258,26 +262,26 @@ export class ClockWeatherCard extends LitElement { ${this.renderForecastTemperatureBar(gradientRange, minTemp, maxTemp, minTempDay, maxTempDay, isNow, currentTemp)} ${this.renderText(this.toConfiguredTempWithUnit(tempUnit, maxTempDay))} - `; + ` } - private renderText(text: string, textAlign: 'left' | 'center' | 'right' = 'left'): TemplateResult { + private renderText (text: string, textAlign: 'left' | 'center' | 'right' = 'left'): TemplateResult { return html` ${text} - `; + ` } - private renderIcon(src: string): TemplateResult { + private renderIcon (src: string): TemplateResult { return html` - `; + ` } - private renderForecastTemperatureBar(gradientRange: Rgb[], minTemp: number, maxTemp: number, minTempDay: number, maxTempDay: number, isNow: boolean, currentTemp: number | null): TemplateResult { + private renderForecastTemperatureBar (gradientRange: Rgb[], minTemp: number, maxTemp: number, minTempDay: number, maxTempDay: number, isNow: boolean, currentTemp: number | null): TemplateResult { const { startPercent, endPercent } = this.calculateBarRangePercents(minTemp, maxTemp, minTempDay, maxTempDay) const moveRight = maxTemp === minTemp ? 0 : (minTempDay - minTemp) / (maxTemp - minTemp) return html` @@ -287,18 +291,18 @@ export class ClockWeatherCard extends LitElement { style="--move-right: ${moveRight}; --start-percent: ${startPercent}%; --end-percent: ${endPercent}%; --gradient: ${this.gradient( gradientRange, startPercent, - endPercent, + endPercent )};" > ${isNow ? this.renderForecastCurrentTemp(minTempDay, maxTempDay, currentTemp) : ''} - `; + ` } - private renderForecastCurrentTemp(minTempDay: number, maxTempDay: number, currentTemp: number | null): TemplateResult { + private renderForecastCurrentTemp (minTempDay: number, maxTempDay: number, currentTemp: number | null): TemplateResult { if (currentTemp == null) { - return html``; + return html`` } const indicatorPosition = minTempDay === maxTempDay ? 0 : (100 / (maxTempDay - minTempDay)) * (currentTemp - minTempDay) const steps = maxTempDay - minTempDay @@ -308,74 +312,74 @@ export class ClockWeatherCard extends LitElement { - `; + ` } // https://lit.dev/docs/components/styles/ - static get styles(): CSSResultGroup { - return styles; + static get styles (): CSSResultGroup { + return styles } - private gradientRange(minTemp: number, maxTemp: number, temperatureUnit: TemperatureUnit): Rgb[] { + private gradientRange (minTemp: number, maxTemp: number, temperatureUnit: TemperatureUnit): Rgb[] { const minTempCelsius = this.toCelsius(temperatureUnit, minTemp) const maxTempCelsius = this.toCelsius(temperatureUnit, maxTemp) - const minVal = Math.max(roundDown(minTempCelsius, 10), min([...gradientMap.keys()])); - const maxVal = Math.min(roundUp(maxTempCelsius, 10), max([...gradientMap.keys()])); + const minVal = Math.max(roundDown(minTempCelsius, 10), min([...gradientMap.keys()])) + const maxVal = Math.min(roundUp(maxTempCelsius, 10), max([...gradientMap.keys()])) return Array.from(gradientMap.keys()) .filter((temp) => temp >= minVal && temp <= maxVal) - .map((temp) => gradientMap.get(temp) as Rgb); + .map((temp) => gradientMap.get(temp) as Rgb) } - private gradient(rgbs: Rgb[], fromPercent: number, toPercent: number): string { - const [fromRgb, fromIndex] = this.calculateRgb(rgbs, fromPercent, 'left'); - const [toRgb, toIndex] = this.calculateRgb(rgbs, toPercent, 'right'); - const between = rgbs.slice(fromIndex + 1, toIndex); + private gradient (rgbs: Rgb[], fromPercent: number, toPercent: number): string { + const [fromRgb, fromIndex] = this.calculateRgb(rgbs, fromPercent, 'left') + const [toRgb, toIndex] = this.calculateRgb(rgbs, toPercent, 'right') + const between = rgbs.slice(fromIndex + 1, toIndex) return [fromRgb, ...between, toRgb] .map((rgb) => `rgb(${rgb.r},${rgb.g},${rgb.b})`) - .join(','); + .join(',') } - private calculateRgb(rgbs: Rgb[], percent: number, pickIndex: 'left' | 'right'): [rgb: Rgb, index: number] { - function valueAtPosition(start: number, end: number, percent: number): number { - const abs = Math.abs(start - end); - const value = (abs / 100) * percent; + private calculateRgb (rgbs: Rgb[], percent: number, pickIndex: 'left' | 'right'): [rgb: Rgb, index: number] { + function valueAtPosition (start: number, end: number, percent: number): number { + const abs = Math.abs(start - end) + const value = (abs / 100) * percent if (start > end) { - return round(start - value); + return round(start - value) } else { - return round(start + value); + return round(start + value) } } - function rgbAtPosition(startIndex: number, endIndex: number, percentToNextIndex: number, rgbs: Rgb[]): Rgb { - const start = rgbs[startIndex]; - const end = rgbs[endIndex]; - const percent = percentToNextIndex < 0 ? 100 + percentToNextIndex : percentToNextIndex; - const left = percentToNextIndex < 0 ? end : start; - const right = percentToNextIndex < 0 ? start : end; - const r = valueAtPosition(left.r, right.r, percent); - const g = valueAtPosition(left.g, right.g, percent); - const b = valueAtPosition(left.b, right.b, percent); - return new Rgb(r, g, b); + function rgbAtPosition (startIndex: number, endIndex: number, percentToNextIndex: number, rgbs: Rgb[]): Rgb { + const start = rgbs[startIndex] + const end = rgbs[endIndex] + const percent = percentToNextIndex < 0 ? 100 + percentToNextIndex : percentToNextIndex + const left = percentToNextIndex < 0 ? end : start + const right = percentToNextIndex < 0 ? start : end + const r = valueAtPosition(left.r, right.r, percent) + const g = valueAtPosition(left.g, right.g, percent) + const b = valueAtPosition(left.b, right.b, percent) + return new Rgb(r, g, b) } - const steps = 100 / (rgbs.length - 1); - const step = percent / steps; - const startIndex = Math.round(step); - const percentToNextIndex = (100 / steps) * (percent - startIndex * steps); - const endIndex = percentToNextIndex === 0 ? startIndex : percentToNextIndex < 0 ? startIndex - 1 : startIndex + 1; - const rgb = rgbAtPosition(startIndex, endIndex, percentToNextIndex, rgbs); - const index = pickIndex === 'left' ? Math.min(startIndex, endIndex) : Math.max(startIndex, endIndex); - return [rgb, index]; + const steps = 100 / (rgbs.length - 1) + const step = percent / steps + const startIndex = Math.round(step) + const percentToNextIndex = (100 / steps) * (percent - startIndex * steps) + const endIndex = percentToNextIndex === 0 ? startIndex : percentToNextIndex < 0 ? startIndex - 1 : startIndex + 1 + const rgb = rgbAtPosition(startIndex, endIndex, percentToNextIndex, rgbs) + const index = pickIndex === 'left' ? Math.min(startIndex, endIndex) : Math.max(startIndex, endIndex) + return [rgb, index] } - private handleAction(ev: ActionHandlerEvent): void { + private handleAction (ev: ActionHandlerEvent): void { if (this.hass && this.config && ev.detail.action) { - handleAction(this, this.hass, this.config, ev.detail.action); + handleAction(this, this.hass, this.config, ev.detail.action) } } - private mergeConfig(config: ClockWeatherCardConfig): MergedClockWeatherCardConfig { + private mergeConfig (config: ClockWeatherCardConfig): MergedClockWeatherCardConfig { return { ...config, sun_entity: config.sun_entity ?? 'sun.sun', @@ -391,232 +395,232 @@ export class ClockWeatherCard extends LitElement { hide_date: config.hide_date ?? false, date_pattern: config.date_pattern ?? 'P', use_browser_time: config.use_browser_time ?? true - }; + } } - private toIcon(weatherState: string, type: 'fill' | 'line', forceDay: boolean, kind: 'static' | 'animated'): string { - const daytime = forceDay ? 'day' : this.getSun()?.state === 'below_horizon' ? 'night' : 'day'; - const iconMap = kind === 'animated' ? svg : png; - const icon = iconMap[type][weatherState]; - return icon?.[daytime] || icon; + private toIcon (weatherState: string, type: 'fill' | 'line', forceDay: boolean, kind: 'static' | 'animated'): string { + const daytime = forceDay ? 'day' : this.getSun()?.state === 'below_horizon' ? 'night' : 'day' + const iconMap = kind === 'animated' ? svg : png + const icon = iconMap[type][weatherState] + return icon?.[daytime] || icon } - private getWeather(): Weather { - const weather = this.hass.states[this.config.entity] as Weather | undefined; - if (!weather) throw new Error(`Weather entity "${this.config.entity}" could not be found.`); - return weather; + private getWeather (): Weather { + const weather = this.hass.states[this.config.entity] as Weather | undefined + if (!weather) throw new Error(`Weather entity "${this.config.entity}" could not be found.`) + return weather } - private getCurrentTemperature(): number | null { + private getCurrentTemperature (): number | null { if (this.config.temperature_sensor) { - const temperatueSensor = this.hass.states[this.config.temperature_sensor] as TemperatureSensor | undefined; - const temp = temperatueSensor?.state ? parseFloat(temperatueSensor.state) : undefined; - const unit = temperatueSensor?.attributes.unit_of_measurement || this.getConfiguredTemperatureUnit(); + const temperatueSensor = this.hass.states[this.config.temperature_sensor] as TemperatureSensor | undefined + const temp = temperatueSensor?.state ? parseFloat(temperatueSensor.state) : undefined + const unit = temperatueSensor?.attributes.unit_of_measurement ?? this.getConfiguredTemperatureUnit() if (temp !== undefined && !isNaN(temp)) { - return this.toConfiguredTempWithoutUnit(unit, temp); + return this.toConfiguredTempWithoutUnit(unit, temp) } - } + } // return weather temperature if above code could not extract temperature from temperature_sensor - return this.getWeather().attributes.temperature ?? null; + return this.getWeather().attributes.temperature ?? null } - private getSun(): HassEntityBase | undefined { - return this.hass.states[this.config.sun_entity]; + private getSun (): HassEntityBase | undefined { + return this.hass.states[this.config.sun_entity] } - private getLocale(): string { - return this.config.locale || this.hass.locale?.language || 'en-GB'; + private getLocale (): string { + return this.config.locale ?? this.hass.locale?.language ?? 'en-GB' } - private getDateFnsLocale(): Locale { - const locale = this.getLocale(); + private getDateFnsLocale (): Locale { + const locale = this.getLocale() const localeParts = locale .replace('_', '-') - .split('-'); - const localeOne = localeParts[0].toLowerCase(); - const localeTwo = localeParts[1]?.toUpperCase() || ''; - const dateFnsLocale = localeOne + localeTwo; + .split('-') + const localeOne = localeParts[0].toLowerCase() + const localeTwo = localeParts[1]?.toUpperCase() || '' + const dateFnsLocale = localeOne + localeTwo // HA provides en-US as en if (dateFnsLocale === 'en') { - return locales.enUS; + return locales.enUS } - const importedLocale = locales[dateFnsLocale]; + const importedLocale = locales[dateFnsLocale] if (!importedLocale) { - console.error('clock-weather-card - Locale not supported: ' + dateFnsLocale); - return locales.enGB; + console.error('clock-weather-card - Locale not supported: ' + dateFnsLocale) + return locales.enGB } - return importedLocale; + return importedLocale } - private date(): string { - const zonedDate = this.toZonedDate(this.currentDate); - const weekday = this.localize(`day.${zonedDate.getDay()}`); - const date = format(zonedDate, this.config.date_pattern, { locale: this.getDateFnsLocale() }); - return`${weekday}, ${date}` + private date (): string { + const zonedDate = this.toZonedDate(this.currentDate) + const weekday = this.localize(`day.${zonedDate.getDay()}`) + const date = format(zonedDate, this.config.date_pattern, { locale: this.getDateFnsLocale() }) + return `${weekday}, ${date}` } - private time(date: Date = this.currentDate): string { - const withTimeZone = this.toZonedDate(date); - return format(withTimeZone, this.getTimeFormat() === '24' ? 'HH:mm' : 'h:mm aa'); + private time (date: Date = this.currentDate): string { + const withTimeZone = this.toZonedDate(date) + return format(withTimeZone, this.getTimeFormat() === '24' ? 'HH:mm' : 'h:mm aa') } - private getIconAnimationKind(): 'static' | 'animated' { + private getIconAnimationKind (): 'static' | 'animated' { return this.config.animated_icon ? 'animated' : 'static' } - private toCelsius(temperatueUnit: TemperatureUnit, temperature: number): number { - return temperatueUnit === '°C' ? temperature : Math.round((temperature - 32) * (5/9)) + private toCelsius (temperatueUnit: TemperatureUnit, temperature: number): number { + return temperatueUnit === '°C' ? temperature : Math.round((temperature - 32) * (5 / 9)) } - private toFahrenheit(temperatueUnit: TemperatureUnit, temperature: number): number { - return temperatueUnit === '°F' ? temperature : Math.round((temperature * 9/5) + 32) + private toFahrenheit (temperatueUnit: TemperatureUnit, temperature: number): number { + return temperatueUnit === '°F' ? temperature : Math.round((temperature * 9 / 5) + 32) } - private getConfiguredTemperatureUnit(): TemperatureUnit { + private getConfiguredTemperatureUnit (): TemperatureUnit { return this.hass.config.unit_system.temperature as TemperatureUnit } - private toConfiguredTempWithUnit(unit: TemperatureUnit, temp: number): string { - const convertedTemp = this.toConfiguredTempWithoutUnit(unit, temp); - return convertedTemp + this.getConfiguredTemperatureUnit(); + private toConfiguredTempWithUnit (unit: TemperatureUnit, temp: number): string { + const convertedTemp = this.toConfiguredTempWithoutUnit(unit, temp) + return convertedTemp + this.getConfiguredTemperatureUnit() } - private toConfiguredTempWithoutUnit(unit: TemperatureUnit, temp: number): number { - const configuredUnit = this.getConfiguredTemperatureUnit(); + private toConfiguredTempWithoutUnit (unit: TemperatureUnit, temp: number): number { + const configuredUnit = this.getConfiguredTemperatureUnit() if (configuredUnit === unit) { - return temp; + return temp } return unit === '°C' ? this.toFahrenheit(unit, temp) - : this.toCelsius(unit, temp); - + : this.toCelsius(unit, temp) } - private getTimeFormat(): '12' | '24' { + private getTimeFormat (): '12' | '24' { if (this.config.time_format) { - return this.config.time_format; + return this.config.time_format } - if (this.hass.locale?.time_format === TimeFormat.twenty_four) return '24'; - if (this.hass.locale?.time_format === TimeFormat.am_pm) return '12'; - return '24'; + if (this.hass.locale?.time_format === TimeFormat.twenty_four) return '24' + if (this.hass.locale?.time_format === TimeFormat.am_pm) return '12' + return '24' } - private calculateBarRangePercents(minTemp: number, maxTemp: number, minTempDay: number, maxTempDay: number): { startPercent: number, endPercent: number} { + private calculateBarRangePercents (minTemp: number, maxTemp: number, minTempDay: number, maxTempDay: number): { startPercent: number, endPercent: number } { if (maxTemp === minTemp) { // avoid division by 0 - return { startPercent: 0, endPercent: 100 }; + return { startPercent: 0, endPercent: 100 } } - const startPercent = (100 / (maxTemp - minTemp)) * (minTempDay - minTemp); - const endPercent = (100 / (maxTemp - minTemp)) * (maxTempDay - minTemp); + const startPercent = (100 / (maxTemp - minTemp)) * (minTempDay - minTemp) + const endPercent = (100 / (maxTemp - minTemp)) * (maxTempDay - minTemp) // fix floating point issue // (100 / (19 - 8)) * (19 - 8) = 100.00000000000001 return { startPercent: Math.max(0, startPercent), endPercent: Math.min(100, endPercent) - }; + } } - private localize(key: string): string { - return localize(key, this.getLocale()); + private localize (key: string): string { + return localize(key, this.getLocale()) } - private mergeForecasts(maxItemsCount: number, hourly: boolean): MergedWeatherForecast[] { - const forecasts = this.getWeather().attributes.forecast ?? this.forecasts ?? []; - const agg = forecasts.reduce((forecasts, forecast) => { - const d = new Date(forecast.datetime); - const unit = !hourly ? d.getDate() : `${d.getMonth()}-${d.getDate()}-${+d.getHours()}`; - forecasts[unit] = forecasts[unit] || []; - forecasts[unit].push(forecast); - return forecasts; - }, {} as Record); + private mergeForecasts (maxItemsCount: number, hourly: boolean): MergedWeatherForecast[] { + const forecasts = this.getWeather().attributes.forecast ?? this.forecasts ?? [] + const agg = forecasts.reduce>((forecasts, forecast) => { + const d = new Date(forecast.datetime) + const unit = !hourly ? d.getDate() : `${d.getMonth()}-${d.getDate()}-${+d.getHours()}` + forecasts[unit] = forecasts[unit] || [] + forecasts[unit].push(forecast) + return forecasts + }, {}) return Object.values(agg) .reduce((agg: MergedWeatherForecast[], forecasts) => { - if (!forecasts.length) return agg; - const avg = this.calculateAverageForecast(forecasts); - agg.push(avg); - return agg; + if (forecasts.length === 0) return agg + const avg = this.calculateAverageForecast(forecasts) + agg.push(avg) + return agg }, []) - .sort((a,b) => a.datetime.getTime() - b.datetime.getTime()) - .slice(0, maxItemsCount); + .sort((a, b) => a.datetime.getTime() - b.datetime.getTime()) + .slice(0, maxItemsCount) } - private toZonedDate(date: Date): Date { - if (this.config.use_browser_time) return date; + private toZonedDate (date: Date): Date { + if (this.config.use_browser_time) return date const timeZone = this.hass?.config?.time_zone - const withTimeZone = DateTime.fromJSDate(date).setZone(timeZone); + const withTimeZone = DateTime.fromJSDate(date).setZone(timeZone) if (!withTimeZone.isValid) { - console.error(`clock-weather-card - Time Zone [${timeZone}] not supported. Falling back to browser time.`); - return date; + console.error(`clock-weather-card - Time Zone [${timeZone}] not supported. Falling back to browser time.`) + return date } - return new Date(withTimeZone.year, withTimeZone.month - 1, withTimeZone.day, withTimeZone.hour, withTimeZone.minute, withTimeZone.second, withTimeZone.millisecond); + return new Date(withTimeZone.year, withTimeZone.month - 1, withTimeZone.day, withTimeZone.hour, withTimeZone.minute, withTimeZone.second, withTimeZone.millisecond) } - private calculateAverageForecast(forecasts: WeatherForecast[]): MergedWeatherForecast { - const minTemps = forecasts.map((f) => f.templow ?? f.temperature ?? this.getCurrentTemperature() ?? 0); - const minTemp = min(minTemps); + private calculateAverageForecast (forecasts: WeatherForecast[]): MergedWeatherForecast { + const minTemps = forecasts.map((f) => f.templow ?? f.temperature ?? this.getCurrentTemperature() ?? 0) + const minTemp = min(minTemps) - const maxTemps = forecasts.map((f) => f.temperature ?? this.getCurrentTemperature() ?? 0); - const maxTemp = max(maxTemps); + const maxTemps = forecasts.map((f) => f.temperature ?? this.getCurrentTemperature() ?? 0) + const maxTemp = max(maxTemps) - const precipitationProbabilities = forecasts.map((f) => f.precipitation_probability ?? 0); - const precipitationProbability = max(precipitationProbabilities); + const precipitationProbabilities = forecasts.map((f) => f.precipitation_probability ?? 0) + const precipitationProbability = max(precipitationProbabilities) - const precipitations = forecasts.map((f) => f.precipitation ?? 0); - const precipitation = max(precipitations); + const precipitations = forecasts.map((f) => f.precipitation ?? 0) + const precipitation = max(precipitations) - const conditions = forecasts.map((f) => f.condition); - const condition = extractMostOccuring(conditions); + const conditions = forecasts.map((f) => f.condition) + const condition = extractMostOccuring(conditions) return { temperature: maxTemp, templow: minTemp, datetime: new Date(forecasts[0].datetime), - condition: condition, + condition, precipitation_probability: precipitationProbability, - precipitation: precipitation, + precipitation } } - private subscribeForecastEvents(): void { + private subscribeForecastEvents (): void { if (this.isLegacyWeather()) { - return; + return } - const hourly = this.config.hourly_forecast; + const hourly = this.config.hourly_forecast if (hourly && !this.supportsFeature(WeatherEntityFeature.FORECAST_HOURLY)) { - throw new Error(`Weather entity "${this.config.entity}" does not support hourly forecasts.`); + throw new Error(`Weather entity "${this.config.entity}" does not support hourly forecasts.`) } if (!hourly && !this.supportsFeature(WeatherEntityFeature.FORECAST_DAILY)) { - throw new Error(`Weather entity "${this.config.entity}" does not support daily forecasts.`); + throw new Error(`Weather entity "${this.config.entity}" does not support daily forecasts.`) + } + + const callback = (event: WeatherForecastEvent): void => { + this.forecasts = event.forecast } - - const callback = (event: WeatherForecastEvent) => { - this.forecasts = event.forecast; - }; this.forecastSubscriber = this.hass.connection.subscribeMessage(callback, { - type: "weather/subscribe_forecast", + type: 'weather/subscribe_forecast', forecast_type: hourly ? 'hourly' : 'daily', - entity_id: this.config.entity, - }); + entity_id: this.config.entity + }) } - private unsubscribeForecastEvents(): void { + private unsubscribeForecastEvents (): void { if (this.forecastSubscriber) { - this.forecastSubscriber.then((unsub) => unsub()); + this.forecastSubscriber + .then((unsub) => { unsub() }) + .catch(e => { console.error('clock-weather-card - Error when unsubscribing weather forecast: ' + e) }) } } - private isLegacyWeather(): boolean { - return (this.getWeather().attributes.forecast?.length ?? 0) > 0; + private isLegacyWeather (): boolean { + return (this.getWeather().attributes.forecast?.length ?? 0) > 0 } - private supportsFeature(feature: WeatherEntityFeature): boolean { - return (this.getWeather().attributes.supported_features! & feature) !== 0 + private supportsFeature (feature: WeatherEntityFeature): boolean { + return (this.getWeather().attributes.supported_features & feature) !== 0 } } - diff --git a/src/custom.d.ts b/src/custom.d.ts index 2f46cfe2..7ef7598b 100644 --- a/src/custom.d.ts +++ b/src/custom.d.ts @@ -1,8 +1,8 @@ declare module '*.svg' { - const content: string; - export default content; + const content: string + export default content } declare module '*.png' { - export default content; + export default content } diff --git a/src/helpers.ts b/src/helpers.ts index 3086f521..1d89c4dc 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,10 +1,10 @@ -import { html, TemplateResult } from "lit"; +import { html, type TemplateResult } from 'lit' -export function safeRender(renderFn: () => T): T | TemplateResult { +export function safeRender (renderFn: () => T): T | TemplateResult { try { return renderFn() } catch (e) { console.error('clock-weather-card - Error while rendering clock-weather-card component:', e) return html`` } -} \ No newline at end of file +} diff --git a/src/images.ts b/src/images.ts index c545acb3..e1d1232d 100644 --- a/src/images.ts +++ b/src/images.ts @@ -1,116 +1,116 @@ -import svgFillPartlyCloudyNightRain from './icons/fill/svg/partly-cloudy-night-rain.svg'; -import svgLinePartlyCloudyNightRain from './icons/line/svg/partly-cloudy-night-rain.svg'; -import svgFillPartlyCloudyDayRain from './icons/fill/svg/partly-cloudy-day-rain.svg'; -import svgLinePartlyCloudyDayRain from './icons/line/svg/partly-cloudy-day-rain.svg'; -import svgFillPartlyCloudyNight from './icons/fill/svg/partly-cloudy-night.svg'; -import svgLinePartlyCloudyNight from './icons/line/svg/partly-cloudy-night.svg'; -import svgFillPartlyCloudyDay from './icons/fill/svg/partly-cloudy-day.svg'; -import svgLinePartlyCloudyDay from './icons/line/svg/partly-cloudy-day.svg'; -import svgFillCloudy from './icons/fill/svg/cloudy.svg'; -import svgLineCloudy from './icons/line/svg/cloudy.svg'; -import svgFillClearNight from './icons/fill/svg/clear-night.svg'; -import svgLineClearNight from './icons/line/svg/clear-night.svg'; -import svgFillFogNight from './icons/fill/svg/fog-night.svg'; -import svgLineFogNight from './icons/line/svg/fog-night.svg'; -import svgFillFogDay from './icons/fill/svg/fog-day.svg'; -import svgLineFogDay from './icons/line/svg/fog-day.svg'; -import svgFillHail from './icons/fill/svg/hail.svg'; -import svgLineHail from './icons/line/svg/hail.svg'; -import svgFillThunderstormsNight from './icons/fill/svg/thunderstorms-night.svg'; -import svgLineThunderstormsNight from './icons/line/svg/thunderstorms-night.svg'; -import svgFillThunderstormsDay from './icons/fill/svg/thunderstorms-day.svg'; -import svgLineThunderstormsDay from './icons/line/svg/thunderstorms-day.svg'; -import svgFillThunderstormsRainNight from './icons/fill/svg/thunderstorms-night-rain.svg'; -import svgLineThunderstormsRainNight from './icons/line/svg/thunderstorms-night-rain.svg'; -import svgFillThunderstormsRainDay from './icons/fill/svg/thunderstorms-day-rain.svg'; -import svgLineThunderstormsRainDay from './icons/line/svg/thunderstorms-day-rain.svg'; -import svgFillRain from './icons/fill/svg/rain.svg'; -import svgLineRain from './icons/line/svg/rain.svg'; -import svgFillSnow from './icons/fill/svg/snow.svg'; -import svgLineSnow from './icons/line/svg/snow.svg'; -import svgFillSleet from './icons/fill/svg/sleet.svg'; -import svgLineSleet from './icons/line/svg/sleet.svg'; -import svgFillClearDay from './icons/fill/svg/clear-day.svg'; -import svgLineClearDay from './icons/line/svg/clear-day.svg'; -import svgFillWindsock from './icons/fill/svg/windsock.svg'; -import svgLineWindsock from './icons/line/svg/windsock.svg'; -import svgFillHurricane from './icons/fill/svg/hurricane.svg'; -import svgLineHurricane from './icons/line/svg/hurricane.svg'; -import svgLineRaindrops from './icons/line/svg/raindrops.svg'; -import svgFillRaindrops from './icons/fill/svg/raindrops.svg'; -import svgLineRaindrop from './icons/line/svg/raindrop.svg'; -import svgFillRaindrop from './icons/fill/svg/raindrop.svg'; +import svgFillPartlyCloudyNightRain from './icons/fill/svg/partly-cloudy-night-rain.svg' +import svgLinePartlyCloudyNightRain from './icons/line/svg/partly-cloudy-night-rain.svg' +import svgFillPartlyCloudyDayRain from './icons/fill/svg/partly-cloudy-day-rain.svg' +import svgLinePartlyCloudyDayRain from './icons/line/svg/partly-cloudy-day-rain.svg' +import svgFillPartlyCloudyNight from './icons/fill/svg/partly-cloudy-night.svg' +import svgLinePartlyCloudyNight from './icons/line/svg/partly-cloudy-night.svg' +import svgFillPartlyCloudyDay from './icons/fill/svg/partly-cloudy-day.svg' +import svgLinePartlyCloudyDay from './icons/line/svg/partly-cloudy-day.svg' +import svgFillCloudy from './icons/fill/svg/cloudy.svg' +import svgLineCloudy from './icons/line/svg/cloudy.svg' +import svgFillClearNight from './icons/fill/svg/clear-night.svg' +import svgLineClearNight from './icons/line/svg/clear-night.svg' +import svgFillFogNight from './icons/fill/svg/fog-night.svg' +import svgLineFogNight from './icons/line/svg/fog-night.svg' +import svgFillFogDay from './icons/fill/svg/fog-day.svg' +import svgLineFogDay from './icons/line/svg/fog-day.svg' +import svgFillHail from './icons/fill/svg/hail.svg' +import svgLineHail from './icons/line/svg/hail.svg' +import svgFillThunderstormsNight from './icons/fill/svg/thunderstorms-night.svg' +import svgLineThunderstormsNight from './icons/line/svg/thunderstorms-night.svg' +import svgFillThunderstormsDay from './icons/fill/svg/thunderstorms-day.svg' +import svgLineThunderstormsDay from './icons/line/svg/thunderstorms-day.svg' +import svgFillThunderstormsRainNight from './icons/fill/svg/thunderstorms-night-rain.svg' +import svgLineThunderstormsRainNight from './icons/line/svg/thunderstorms-night-rain.svg' +import svgFillThunderstormsRainDay from './icons/fill/svg/thunderstorms-day-rain.svg' +import svgLineThunderstormsRainDay from './icons/line/svg/thunderstorms-day-rain.svg' +import svgFillRain from './icons/fill/svg/rain.svg' +import svgLineRain from './icons/line/svg/rain.svg' +import svgFillSnow from './icons/fill/svg/snow.svg' +import svgLineSnow from './icons/line/svg/snow.svg' +import svgFillSleet from './icons/fill/svg/sleet.svg' +import svgLineSleet from './icons/line/svg/sleet.svg' +import svgFillClearDay from './icons/fill/svg/clear-day.svg' +import svgLineClearDay from './icons/line/svg/clear-day.svg' +import svgFillWindsock from './icons/fill/svg/windsock.svg' +import svgLineWindsock from './icons/line/svg/windsock.svg' +import svgFillHurricane from './icons/fill/svg/hurricane.svg' +import svgLineHurricane from './icons/line/svg/hurricane.svg' +import svgLineRaindrops from './icons/line/svg/raindrops.svg' +import svgFillRaindrops from './icons/fill/svg/raindrops.svg' +import svgLineRaindrop from './icons/line/svg/raindrop.svg' +import svgFillRaindrop from './icons/fill/svg/raindrop.svg' -import pngFillPartlyCloudyNightRain from './icons/fill/png/128/partly-cloudy-night-rain.png'; -import pngLinePartlyCloudyNightRain from './icons/line/png/128/partly-cloudy-night-rain.png'; -import pngFillPartlyCloudyDayRain from './icons/fill/png/128/partly-cloudy-day-rain.png'; -import pngLinePartlyCloudyDayRain from './icons/line/png/128/partly-cloudy-day-rain.png'; -import pngFillPartlyCloudyNight from './icons/fill/png/128/partly-cloudy-night.png'; -import pngLinePartlyCloudyNight from './icons/line/png/128/partly-cloudy-night.png'; -import pngFillPartlyCloudyDay from './icons/fill/png/128/partly-cloudy-day.png'; -import pngLinePartlyCloudyDay from './icons/line/png/128/partly-cloudy-day.png'; -import pngFillCloudy from './icons/fill/png/128/cloudy.png'; -import pngLineCloudy from './icons/line/png/128/cloudy.png'; -import pngFillClearNight from './icons/fill/png/128/clear-night.png'; -import pngLineClearNight from './icons/line/png/128/clear-night.png'; -import pngFillFogNight from './icons/fill/png/128/fog-night.png'; -import pngLineFogNight from './icons/line/png/128/fog-night.png'; -import pngFillFogDay from './icons/fill/png/128/fog-day.png'; -import pngLineFogDay from './icons/line/png/128/fog-day.png'; -import pngFillHail from './icons/fill/png/128/hail.png'; -import pngLineHail from './icons/line/png/128/hail.png'; -import pngFillThunderstormsNight from './icons/fill/png/128/thunderstorms-night.png'; -import pngLineThunderstormsNight from './icons/line/png/128/thunderstorms-night.png'; -import pngFillThunderstormsDay from './icons/fill/png/128/thunderstorms-day.png'; -import pngLineThunderstormsDay from './icons/line/png/128/thunderstorms-day.png'; -import pngFillThunderstormsRainNight from './icons/fill/png/128/thunderstorms-night-rain.png'; -import pngLineThunderstormsRainNight from './icons/line/png/128/thunderstorms-night-rain.png'; -import pngFillThunderstormsRainDay from './icons/fill/png/128/thunderstorms-day-rain.png'; -import pngLineThunderstormsRainDay from './icons/line/png/128/thunderstorms-day-rain.png'; -import pngFillRain from './icons/fill/png/128/rain.png'; -import pngLineRain from './icons/line/png/128/rain.png'; -import pngFillSnow from './icons/fill/png/128/snow.png'; -import pngLineSnow from './icons/line/png/128/snow.png'; -import pngFillSleet from './icons/fill/png/128/sleet.png'; -import pngLineSleet from './icons/line/png/128/sleet.png'; -import pngFillClearDay from './icons/fill/png/128/clear-day.png'; -import pngLineClearDay from './icons/line/png/128/clear-day.png'; -import pngFillWindsock from './icons/fill/png/128/windsock.png'; -import pngLineWindsock from './icons/line/png/128/windsock.png'; -import pngFillHurricane from './icons/fill/png/128/hurricane.png'; -import pngLineHurricane from './icons/line/png/128/hurricane.png'; -import pngFillRaindrops from './icons/fill/png/128/raindrops.png'; -import pngLineRaindrops from './icons/line/png/128/raindrops.png'; -import pngFillRaindrop from './icons/fill/png/128/raindrop.png'; -import pngLineRaindrop from './icons/line/png/128/raindrop.png'; +import pngFillPartlyCloudyNightRain from './icons/fill/png/128/partly-cloudy-night-rain.png' +import pngLinePartlyCloudyNightRain from './icons/line/png/128/partly-cloudy-night-rain.png' +import pngFillPartlyCloudyDayRain from './icons/fill/png/128/partly-cloudy-day-rain.png' +import pngLinePartlyCloudyDayRain from './icons/line/png/128/partly-cloudy-day-rain.png' +import pngFillPartlyCloudyNight from './icons/fill/png/128/partly-cloudy-night.png' +import pngLinePartlyCloudyNight from './icons/line/png/128/partly-cloudy-night.png' +import pngFillPartlyCloudyDay from './icons/fill/png/128/partly-cloudy-day.png' +import pngLinePartlyCloudyDay from './icons/line/png/128/partly-cloudy-day.png' +import pngFillCloudy from './icons/fill/png/128/cloudy.png' +import pngLineCloudy from './icons/line/png/128/cloudy.png' +import pngFillClearNight from './icons/fill/png/128/clear-night.png' +import pngLineClearNight from './icons/line/png/128/clear-night.png' +import pngFillFogNight from './icons/fill/png/128/fog-night.png' +import pngLineFogNight from './icons/line/png/128/fog-night.png' +import pngFillFogDay from './icons/fill/png/128/fog-day.png' +import pngLineFogDay from './icons/line/png/128/fog-day.png' +import pngFillHail from './icons/fill/png/128/hail.png' +import pngLineHail from './icons/line/png/128/hail.png' +import pngFillThunderstormsNight from './icons/fill/png/128/thunderstorms-night.png' +import pngLineThunderstormsNight from './icons/line/png/128/thunderstorms-night.png' +import pngFillThunderstormsDay from './icons/fill/png/128/thunderstorms-day.png' +import pngLineThunderstormsDay from './icons/line/png/128/thunderstorms-day.png' +import pngFillThunderstormsRainNight from './icons/fill/png/128/thunderstorms-night-rain.png' +import pngLineThunderstormsRainNight from './icons/line/png/128/thunderstorms-night-rain.png' +import pngFillThunderstormsRainDay from './icons/fill/png/128/thunderstorms-day-rain.png' +import pngLineThunderstormsRainDay from './icons/line/png/128/thunderstorms-day-rain.png' +import pngFillRain from './icons/fill/png/128/rain.png' +import pngLineRain from './icons/line/png/128/rain.png' +import pngFillSnow from './icons/fill/png/128/snow.png' +import pngLineSnow from './icons/line/png/128/snow.png' +import pngFillSleet from './icons/fill/png/128/sleet.png' +import pngLineSleet from './icons/line/png/128/sleet.png' +import pngFillClearDay from './icons/fill/png/128/clear-day.png' +import pngLineClearDay from './icons/line/png/128/clear-day.png' +import pngFillWindsock from './icons/fill/png/128/windsock.png' +import pngLineWindsock from './icons/line/png/128/windsock.png' +import pngFillHurricane from './icons/fill/png/128/hurricane.png' +import pngLineHurricane from './icons/line/png/128/hurricane.png' +import pngFillRaindrops from './icons/fill/png/128/raindrops.png' +import pngLineRaindrops from './icons/line/png/128/raindrops.png' +import pngFillRaindrop from './icons/fill/png/128/raindrop.png' +import pngLineRaindrop from './icons/line/png/128/raindrop.png' export const svg = { line: { rainy: { day: svgLinePartlyCloudyDayRain, - night: svgLinePartlyCloudyNightRain, + night: svgLinePartlyCloudyNightRain }, partlycloudy: { day: svgLinePartlyCloudyDay, - night: svgLinePartlyCloudyNight, + night: svgLinePartlyCloudyNight }, cloudy: svgLineCloudy, 'clear-night': { day: svgLineClearDay, - night: svgLineClearNight, + night: svgLineClearNight }, fog: { day: svgLineFogDay, - night: svgLineFogNight, + night: svgLineFogNight }, hail: svgLineHail, lightning: { day: svgLineThunderstormsDay, - night: svgLineThunderstormsNight, + night: svgLineThunderstormsNight }, 'lightning-rainy': { day: svgLineThunderstormsRainDay, - night: svgLineThunderstormsRainNight, + night: svgLineThunderstormsRainNight }, pouring: svgLineRain, raindrop: svgLineRaindrop, @@ -119,38 +119,38 @@ export const svg = { 'snowy-rainy': svgLineSleet, sunny: { day: svgLineClearDay, - night: svgLineClearNight, + night: svgLineClearNight }, windy: svgLineWindsock, 'windy-exceptional': svgLineWindsock, - exceptional: svgLineHurricane, + exceptional: svgLineHurricane }, fill: { rainy: { day: svgFillPartlyCloudyDayRain, - night: svgFillPartlyCloudyNightRain, + night: svgFillPartlyCloudyNightRain }, partlycloudy: { day: svgFillPartlyCloudyDay, - night: svgFillPartlyCloudyNight, + night: svgFillPartlyCloudyNight }, cloudy: svgFillCloudy, 'clear-night': { day: svgFillClearDay, - night: svgFillClearNight, + night: svgFillClearNight }, fog: { day: svgFillFogDay, - night: svgFillFogNight, + night: svgFillFogNight }, hail: svgFillHail, lightning: { day: svgFillThunderstormsDay, - night: svgFillThunderstormsNight, + night: svgFillThunderstormsNight }, 'lightning-rainy': { day: svgFillThunderstormsRainDay, - night: svgFillThunderstormsRainNight, + night: svgFillThunderstormsRainNight }, pouring: svgFillRain, raindrop: svgFillRaindrop, @@ -159,41 +159,41 @@ export const svg = { 'snowy-rainy': svgFillSleet, sunny: { day: svgFillClearDay, - night: svgFillClearNight, + night: svgFillClearNight }, windy: svgFillWindsock, 'windy-exceptional': svgFillWindsock, - exceptional: svgFillHurricane, - }, -}; + exceptional: svgFillHurricane + } +} export const png = { line: { rainy: { day: pngLinePartlyCloudyDayRain, - night: pngLinePartlyCloudyNightRain, + night: pngLinePartlyCloudyNightRain }, partlycloudy: { day: pngLinePartlyCloudyDay, - night: pngLinePartlyCloudyNight, + night: pngLinePartlyCloudyNight }, cloudy: pngLineCloudy, 'clear-night': { day: pngLineClearDay, - night: pngLineClearNight, + night: pngLineClearNight }, fog: { day: pngLineFogDay, - night: pngLineFogNight, + night: pngLineFogNight }, hail: pngLineHail, lightning: { day: pngLineThunderstormsDay, - night: pngLineThunderstormsNight, + night: pngLineThunderstormsNight }, 'lightning-rainy': { day: pngLineThunderstormsRainDay, - night: pngLineThunderstormsRainNight, + night: pngLineThunderstormsRainNight }, pouring: pngLineRain, raindrop: pngLineRaindrop, @@ -202,38 +202,38 @@ export const png = { 'snowy-rainy': pngLineSleet, sunny: { day: pngLineClearDay, - night: pngLineClearNight, + night: pngLineClearNight }, windy: pngLineWindsock, 'windy-exceptional': pngLineWindsock, - exceptional: pngLineHurricane, + exceptional: pngLineHurricane }, fill: { rainy: { day: pngFillPartlyCloudyDayRain, - night: pngFillPartlyCloudyNightRain, + night: pngFillPartlyCloudyNightRain }, partlycloudy: { day: pngFillPartlyCloudyDay, - night: pngFillPartlyCloudyNight, + night: pngFillPartlyCloudyNight }, cloudy: pngFillCloudy, 'clear-night': { day: pngFillClearDay, - night: pngFillClearNight, + night: pngFillClearNight }, fog: { day: pngFillFogDay, - night: pngFillFogNight, + night: pngFillFogNight }, hail: pngFillHail, lightning: { day: pngFillThunderstormsDay, - night: pngFillThunderstormsNight, + night: pngFillThunderstormsNight }, 'lightning-rainy': { day: pngFillThunderstormsRainDay, - night: pngFillThunderstormsRainNight, + night: pngFillThunderstormsRainNight }, pouring: pngFillRain, raindrop: pngFillRaindrop, @@ -242,10 +242,10 @@ export const png = { 'snowy-rainy': pngFillSleet, sunny: { day: pngFillClearDay, - night: pngFillClearNight, + night: pngFillClearNight }, windy: pngFillWindsock, 'windy-exceptional': pngFillWindsock, - exceptional: pngFillHurricane, - }, -}; + exceptional: pngFillHurricane + } +} diff --git a/src/localize/localize.ts b/src/localize/localize.ts index 238da4dc..7f697b31 100644 --- a/src/localize/localize.ts +++ b/src/localize/localize.ts @@ -1,33 +1,33 @@ -import * as bg from './languages/bg.json'; -import * as da from './languages/da.json'; -import * as ca from './languages/ca.json'; -import * as cs from './languages/cs.json'; -import * as de from './languages/de.json'; -import * as el from './languages/el.json'; -import * as en from './languages/en.json'; -import * as es from './languages/es.json'; -import * as et from './languages/et.json'; -import * as fi from './languages/fi.json'; -import * as fr from './languages/fr.json'; -import * as he from './languages/he.json'; -import * as hu from './languages/hu.json'; -import * as it from './languages/it.json'; -import * as ko from './languages/ko.json'; -import * as nb from './languages/nb.json'; -import * as nl from './languages/nl.json'; -import * as pl from './languages/pl.json'; -import * as ptbr from './languages/pt-br.json'; -import * as pt from './languages/pt.json'; -import * as ro from './languages/ro.json'; -import * as ru from './languages/ru.json'; -import * as sk from './languages/sk.json'; -import * as sl from './languages/sl.json'; -import * as sv from './languages/sv.json'; -import * as th from './languages/th.json'; -import * as uk from './languages/uk.json'; -import * as vi from './languages/vi.json'; -import * as zhcn from './languages/zh-cn.json'; -import * as zhtw from './languages/zh-tw.json'; +import * as bg from './languages/bg.json' +import * as da from './languages/da.json' +import * as ca from './languages/ca.json' +import * as cs from './languages/cs.json' +import * as de from './languages/de.json' +import * as el from './languages/el.json' +import * as en from './languages/en.json' +import * as es from './languages/es.json' +import * as et from './languages/et.json' +import * as fi from './languages/fi.json' +import * as fr from './languages/fr.json' +import * as he from './languages/he.json' +import * as hu from './languages/hu.json' +import * as it from './languages/it.json' +import * as ko from './languages/ko.json' +import * as nb from './languages/nb.json' +import * as nl from './languages/nl.json' +import * as pl from './languages/pl.json' +import * as ptbr from './languages/pt-br.json' +import * as pt from './languages/pt.json' +import * as ro from './languages/ro.json' +import * as ru from './languages/ru.json' +import * as sk from './languages/sk.json' +import * as sl from './languages/sl.json' +import * as sv from './languages/sv.json' +import * as th from './languages/th.json' +import * as uk from './languages/uk.json' +import * as vi from './languages/vi.json' +import * as zhcn from './languages/zh-cn.json' +import * as zhtw from './languages/zh-tw.json' // eslint-disable-next-line @typescript-eslint/no-explicit-any const languages: any = { @@ -61,23 +61,23 @@ const languages: any = { vi, zhcn, zhtw -}; +} -export function localize(key: string, locale: string): string { - let translated: string; +export function localize (key: string, locale: string): string { + let translated: string const lang = locale .replace(/['"]+/g, '') .replace('-', '_') .replace('_', '') - .toLowerCase(); + .toLowerCase() try { - translated = key.split('.').reduce((o, i) => o[i], languages[lang]); + translated = key.split('.').reduce((o, i) => o[i], languages[lang]) } catch (e) { - translated = key.split('.').reduce((o, i) => o[i], languages['en']); + translated = key.split('.').reduce((o, i) => o[i], languages.en) } - if (translated === undefined) translated = key.split('.').reduce((o, i) => o[i], languages['en']); + if (translated === undefined) translated = key.split('.').reduce((o, i) => o[i], languages.en) - return translated; + return translated } diff --git a/src/styles.ts b/src/styles.ts index cf4d20ec..66c283db 100644 --- a/src/styles.ts +++ b/src/styles.ts @@ -1,4 +1,4 @@ -import { css } from 'lit'; +import { css } from 'lit' export default css` @@ -123,4 +123,4 @@ export default css` height: 100%; position: absolute; } -`; +` diff --git a/src/types.ts b/src/types.ts index e7b08eb7..9290b894 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,48 +1,48 @@ -import { LovelaceCard, LovelaceCardConfig, LovelaceCardEditor } from 'custom-card-helpers'; -import { HassEntity } from 'home-assistant-js-websocket/dist/types'; +import { type LovelaceCard, type LovelaceCardConfig, type LovelaceCardEditor } from 'custom-card-helpers' +import { type HassEntity } from 'home-assistant-js-websocket/dist/types' declare global { interface HTMLElementTagNameMap { - 'clock-weather-card-editor': LovelaceCardEditor; - 'hui-error-card': LovelaceCard; + 'clock-weather-card-editor': LovelaceCardEditor + 'hui-error-card': LovelaceCard } } export interface ClockWeatherCardConfig extends LovelaceCardConfig { - entity: string; - title?: string; - sun_entity?: string; - weather_icon_type?: 'fill' | 'line'; - animated_icon?: boolean; - forecast_days?: number; - locale?: string; - time_format?: '12' | '24'; - date_pattern?: string; - hide_today_section?: boolean; - hide_forecast_section?: boolean; - hourly_forecast?: boolean; - hide_clock?: boolean; - hide_date?: boolean; - use_browser_time?: boolean; + entity: string + title?: string + sun_entity?: string + weather_icon_type?: 'fill' | 'line' + animated_icon?: boolean + forecast_days?: number + locale?: string + time_format?: '12' | '24' + date_pattern?: string + hide_today_section?: boolean + hide_forecast_section?: boolean + hourly_forecast?: boolean + hide_clock?: boolean + hide_date?: boolean + use_browser_time?: boolean } export interface MergedClockWeatherCardConfig extends LovelaceCardConfig { - entity: string; - title?: string; - sun_entity: string; - temperature_sensor?: string; - weather_icon_type: 'fill' | 'line'; - animated_icon: boolean; - forecast_days: number; - locale?: string; - time_format?: '12' |'24'; - date_pattern: string; - hide_today_section: boolean; - hide_forecast_section: boolean; - hourly_forecast: boolean; - hide_clock: boolean; - hide_date: boolean; - use_browser_time: boolean; + entity: string + title?: string + sun_entity: string + temperature_sensor?: string + weather_icon_type: 'fill' | 'line' + animated_icon: boolean + forecast_days: number + locale?: string + time_format?: '12' | '24' + date_pattern: string + hide_today_section: boolean + hide_forecast_section: boolean + hourly_forecast: boolean + hide_clock: boolean + hide_date: boolean + use_browser_time: boolean } export const enum WeatherEntityFeature { @@ -52,56 +52,56 @@ export const enum WeatherEntityFeature { } export interface Weather extends HassEntity { - state: string; + state: string attributes: { - temperature?: number; - temperature_unit: TemperatureUnit; - precipitation_unit: string; - forecast?: WeatherForecast[]; - supported_features: WeatherEntityFeature; - }; + temperature?: number + temperature_unit: TemperatureUnit + precipitation_unit: string + forecast?: WeatherForecast[] + supported_features: WeatherEntityFeature + } } -export type TemperatureUnit = '°C' | '°F'; +export type TemperatureUnit = '°C' | '°F' -export type WeatherForecast = { - datetime: string; - condition: string; - temperature: number | null; - precipitation: number | null; - precipitation_probability: number | null; - templow: number | null; +export interface WeatherForecast { + datetime: string + condition: string + temperature: number | null + precipitation: number | null + precipitation_probability: number | null + templow: number | null } -export type MergedWeatherForecast = { - datetime: Date; - condition: string; - temperature: number; - precipitation: number; - precipitation_probability: number; - templow: number; +export interface MergedWeatherForecast { + datetime: Date + condition: string + temperature: number + precipitation: number + precipitation_probability: number + templow: number } export class Rgb { - r: number; - g: number; - b: number; + r: number + g: number + b: number - constructor(r: number, g: number, b: number) { - this.r = r; - this.g = g; - this.b = b; + constructor (r: number, g: number, b: number) { + this.r = r + this.g = g + this.b = b } } export interface TemperatureSensor extends HassEntity { - state: string; + state: string attributes: { - unit_of_measurement?: TemperatureUnit; - }; + unit_of_measurement?: TemperatureUnit + } } -export type WeatherForecastEvent = { - forecast?: WeatherForecast[]; - type: "hourly" | "daily" | "twice_daily"; +export interface WeatherForecastEvent { + forecast?: WeatherForecast[] + type: 'hourly' | 'daily' | 'twice_daily' } diff --git a/src/utils.ts b/src/utils.ts index ea7b059d..a44d232d 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,33 +1,33 @@ -export function max(n: number[]): number { - return Math.max(...n); +export function max (n: number[]): number { + return Math.max(...n) } -export function min(n: number[]): number { - return Math.min(...n); +export function min (n: number[]): number { + return Math.min(...n) } -export function round(n: number, precision = 0): number { +export function round (n: number, precision = 0): number { if (precision <= 0) { - return Math.round(n); + return Math.round(n) } - return Math.ceil((n - precision / 2) / precision) * precision; + return Math.ceil((n - precision / 2) / precision) * precision } -export function roundUp(n: number, precision = 0): number { - if (!precision) { - return Math.ceil(n); +export function roundUp (n: number, precision: number = 0): number { + if (precision <= 0) { + return Math.ceil(n) } - return Math.ceil(n / precision) * precision; + return Math.ceil(n / precision) * precision } -export function roundDown(n: number, precision = 0): number { - if (!precision) { - return Math.floor(n); +export function roundDown (n: number, precision = 0): number { + if (precision <= 0) { + return Math.floor(n) } - return Math.floor(n / precision) * precision; + return Math.floor(n / precision) * precision } -export function roundIfNotNull(number: number | null): number | null { +export function roundIfNotNull (number: number | null): number | null { if (number === null) { return null } @@ -35,19 +35,22 @@ export function roundIfNotNull(number: number | null): number | null { return Math.round(number) } // from https://stackoverflow.com/a/1053865 -export function extractMostOccuring(elements: T[]): T { - const modeMap = {} as Record; let maxEl = elements[0], maxCount = 1; +export function extractMostOccuring (elements: T[]): T { + const modeMap = new Map() + let maxEl = elements[0] + let maxCount = 1 for (let i = 0; i < elements.length; i++) { - const el = elements[i]; - if (modeMap[el] == null) { - modeMap[el] = 1; + const el = elements[i] + if (modeMap.get(el) === undefined) { + modeMap.set(el, 1) } else { - modeMap[el]++; - if (modeMap[el] > maxCount) { - maxEl = el; - maxCount = modeMap[el]; + const n = modeMap.get(el) ?? 0 + modeMap.set(el, n + 1) + if ((modeMap.get(el) ?? 0) > maxCount) { + maxEl = el + maxCount = modeMap.get(el) ?? 0 } } } - return maxEl; + return maxEl } diff --git a/yarn.lock b/yarn.lock index aea939b4..365cf53e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@aashutoshrathi/word-wrap@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" + integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== + "@ampproject/remapping@^2.2.0": version "2.2.1" resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" @@ -10,13 +15,6 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@babel/code-frame@7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" - integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== - dependencies: - "@babel/highlight" "^7.10.4" - "@babel/code-frame@^7.10.4": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb" @@ -224,7 +222,7 @@ "@babel/traverse" "^7.23.0" "@babel/types" "^7.23.0" -"@babel/highlight@^7.10.4", "@babel/highlight@^7.14.5": +"@babel/highlight@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" integrity sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg== @@ -273,13 +271,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/runtime@^7.21.0": - version "7.23.1" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.1.tgz#72741dc4d413338a91dcb044a86f3c0bc402646d" - integrity sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g== - dependencies: - regenerator-runtime "^0.14.0" - "@babel/template@^7.22.15": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" @@ -323,21 +314,38 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" -"@eslint/eslintrc@^0.4.3": - version "0.4.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" - integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== +"@eslint-community/eslint-utils@^4.1.2", "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.0", "@eslint-community/regexpp@^4.6.1": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.9.1.tgz#449dfa81a57a1d755b09aa58d826c1262e4283b4" + integrity sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA== + +"@eslint/eslintrc@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.2.tgz#c6936b4b328c64496692f76944e755738be62396" + integrity sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g== dependencies: ajv "^6.12.4" - debug "^4.1.1" - espree "^7.3.0" - globals "^13.9.0" - ignore "^4.0.6" + debug "^4.3.2" + espree "^9.6.0" + globals "^13.19.0" + ignore "^5.2.0" import-fresh "^3.2.1" - js-yaml "^3.13.1" - minimatch "^3.0.4" + js-yaml "^4.1.0" + minimatch "^3.1.2" strip-json-comments "^3.1.1" +"@eslint/js@8.50.0": + version "8.50.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.50.0.tgz#9e93b850f0f3fa35f5fa59adfd03adae8488e484" + integrity sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ== + "@formatjs/ecma402-abstract@1.11.4": version "1.11.4" resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.4.tgz#b962dfc4ae84361f9f08fbce411b4e4340930eda" @@ -384,19 +392,24 @@ dependencies: emojis-list "^3.0.0" -"@humanwhocodes/config-array@^0.5.0": - version "0.5.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" - integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== +"@humanwhocodes/config-array@^0.11.11": + version "0.11.11" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.11.tgz#88a04c570dbbc7dd943e4712429c3df09bc32844" + integrity sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA== dependencies: - "@humanwhocodes/object-schema" "^1.2.0" + "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" - minimatch "^3.0.4" + minimatch "^3.0.5" -"@humanwhocodes/object-schema@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz#87de7af9c231826fdd68ac7258f77c429e0e5fcf" - integrity sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w== +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== "@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": version "0.3.3" @@ -471,7 +484,7 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3": +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": version "1.2.8" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -530,10 +543,10 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.2.tgz#ff02bc3dc8317cd668dfec247b750ba1f1d62453" integrity sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA== -"@types/json-schema@^7.0.7": - version "7.0.9" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" - integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== +"@types/json-schema@^7.0.12": + version "7.0.13" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.13.tgz#02c24f4363176d2d18fc8b70b9f3c54aba178a85" + integrity sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ== "@types/json5@^0.0.29": version "0.0.29" @@ -557,36 +570,32 @@ dependencies: "@types/node" "*" +"@types/semver@^7.5.0": + version "7.5.3" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.3.tgz#9a726e116beb26c24f1ccd6850201e1246122e04" + integrity sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw== + "@types/trusted-types@^2.0.2": version "2.0.4" resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.4.tgz#2b38784cd16957d3782e8e2b31c03bc1d13b4d65" integrity sha512-IDaobHimLQhjwsQ/NMwRVfa/yL7L/wriQPMhw1ZJall0KX6E1oxk29XMDeilW5qTIg5aoiqf5Udy8U/51aNoQQ== -"@typescript-eslint/eslint-plugin@^4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz#c24dc7c8069c7706bc40d99f6fa87edcb2005276" - integrity sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg== - dependencies: - "@typescript-eslint/experimental-utils" "4.33.0" - "@typescript-eslint/scope-manager" "4.33.0" - debug "^4.3.1" - functional-red-black-tree "^1.0.1" - ignore "^5.1.8" - regexpp "^3.1.0" - semver "^7.3.5" - tsutils "^3.21.0" - -"@typescript-eslint/experimental-utils@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz#6f2a786a4209fa2222989e9380b5331b2810f7fd" - integrity sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q== - dependencies: - "@types/json-schema" "^7.0.7" - "@typescript-eslint/scope-manager" "4.33.0" - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/typescript-estree" "4.33.0" - eslint-scope "^5.1.1" - eslint-utils "^3.0.0" +"@typescript-eslint/eslint-plugin@^6.4.0": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.4.tgz#057338df21b6062c2f2fc5999fbea8af9973ac6d" + integrity sha512-DAbgDXwtX+pDkAHwiGhqP3zWUGpW49B7eqmgpPtg+BKJXwdct79ut9+ifqOFPJGClGKSHXn2PTBatCnldJRUoA== + dependencies: + "@eslint-community/regexpp" "^4.5.1" + "@typescript-eslint/scope-manager" "6.7.4" + "@typescript-eslint/type-utils" "6.7.4" + "@typescript-eslint/utils" "6.7.4" + "@typescript-eslint/visitor-keys" "6.7.4" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.4" + natural-compare "^1.4.0" + semver "^7.5.4" + ts-api-utils "^1.0.1" "@typescript-eslint/parser@^4.33.0": version "4.33.0" @@ -598,6 +607,17 @@ "@typescript-eslint/typescript-estree" "4.33.0" debug "^4.3.1" +"@typescript-eslint/parser@^6.4.0": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.7.4.tgz#23d1dd4fe5d295c7fa2ab651f5406cd9ad0bd435" + integrity sha512-I5zVZFY+cw4IMZUeNCU7Sh2PO5O57F7Lr0uyhgCJmhN/BuTlnc55KxPonR4+EM3GBdfiCyGZye6DgMjtubQkmA== + dependencies: + "@typescript-eslint/scope-manager" "6.7.4" + "@typescript-eslint/types" "6.7.4" + "@typescript-eslint/typescript-estree" "6.7.4" + "@typescript-eslint/visitor-keys" "6.7.4" + debug "^4.3.4" + "@typescript-eslint/scope-manager@4.33.0": version "4.33.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz#d38e49280d983e8772e29121cf8c6e9221f280a3" @@ -606,11 +626,34 @@ "@typescript-eslint/types" "4.33.0" "@typescript-eslint/visitor-keys" "4.33.0" +"@typescript-eslint/scope-manager@6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.7.4.tgz#a484a17aa219e96044db40813429eb7214d7b386" + integrity sha512-SdGqSLUPTXAXi7c3Ob7peAGVnmMoGzZ361VswK2Mqf8UOYcODiYvs8rs5ILqEdfvX1lE7wEZbLyELCW+Yrql1A== + dependencies: + "@typescript-eslint/types" "6.7.4" + "@typescript-eslint/visitor-keys" "6.7.4" + +"@typescript-eslint/type-utils@6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.7.4.tgz#847cd3b59baf948984499be3e0a12ff07373e321" + integrity sha512-n+g3zi1QzpcAdHFP9KQF+rEFxMb2KxtnJGID3teA/nxKHOVi3ylKovaqEzGBbVY2pBttU6z85gp0D00ufLzViQ== + dependencies: + "@typescript-eslint/typescript-estree" "6.7.4" + "@typescript-eslint/utils" "6.7.4" + debug "^4.3.4" + ts-api-utils "^1.0.1" + "@typescript-eslint/types@4.33.0": version "4.33.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== +"@typescript-eslint/types@6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.7.4.tgz#5d358484d2be986980c039de68e9f1eb62ea7897" + integrity sha512-o9XWK2FLW6eSS/0r/tgjAGsYasLAnOWg7hvZ/dGYSSNjCh+49k5ocPN8OmG5aZcSJ8pclSOyVKP2x03Sj+RrCA== + "@typescript-eslint/typescript-estree@4.33.0": version "4.33.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz#0dfb51c2908f68c5c08d82aefeaf166a17c24609" @@ -624,6 +667,32 @@ semver "^7.3.5" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.4.tgz#f2baece09f7bb1df9296e32638b2e1130014ef1a" + integrity sha512-ty8b5qHKatlNYd9vmpHooQz3Vki3gG+3PchmtsA4TgrZBKWHNjWfkQid7K7xQogBqqc7/BhGazxMD5vr6Ha+iQ== + dependencies: + "@typescript-eslint/types" "6.7.4" + "@typescript-eslint/visitor-keys" "6.7.4" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/utils@6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.7.4.tgz#2236f72b10e38277ee05ef06142522e1de470ff2" + integrity sha512-PRQAs+HUn85Qdk+khAxsVV+oULy3VkbH3hQ8hxLRJXWBEd7iI+GbQxH5SEUSH7kbEoTp6oT1bOwyga24ELALTA== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "6.7.4" + "@typescript-eslint/types" "6.7.4" + "@typescript-eslint/typescript-estree" "6.7.4" + semver "^7.5.4" + "@typescript-eslint/visitor-keys@4.33.0": version "4.33.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz#2a22f77a41604289b7a186586e9ec48ca92ef1dd" @@ -632,22 +701,30 @@ "@typescript-eslint/types" "4.33.0" eslint-visitor-keys "^2.0.0" -acorn-jsx@^5.3.1: +"@typescript-eslint/visitor-keys@6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.4.tgz#80dfecf820fc67574012375859085f91a4dff043" + integrity sha512-pOW37DUhlTZbvph50x5zZCkFn3xzwkGtNoJHzIM3svpiSkJzwOYr/kVBaXmf+RAQiUDs1AHEZVNPg6UJCJpwRA== + dependencies: + "@typescript-eslint/types" "6.7.4" + eslint-visitor-keys "^3.4.1" + +acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^7.4.0: - version "7.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" - integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== - acorn@^8.5.0: version "8.8.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== -ajv@^6.10.0, ajv@^6.12.4: +acorn@^8.9.0: + version "8.10.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" + integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + +ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -657,21 +734,6 @@ ajv@^6.10.0, ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.1: - version "8.6.3" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.3.tgz#11a66527761dc3e9a3845ea775d2d3c0414e8764" - integrity sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - -ansi-colors@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" @@ -684,19 +746,17 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.0.0, ansi-styles@^4.1.0: +ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== array-buffer-byte-length@^1.0.0: version "1.0.0" @@ -766,11 +826,6 @@ arraybuffer.prototype.slice@^1.0.2: is-array-buffer "^3.0.2" is-shared-array-buffer "^1.0.2" -astral-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" - integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== - available-typed-arrays@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" @@ -816,7 +871,22 @@ builtin-modules@^3.1.0: resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.1.0.tgz#aad97c15131eb76b65b50ef208e7584cd76a7484" integrity sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw== -call-bind@^1.0.0, call-bind@^1.0.2: +builtins@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9" + integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ== + dependencies: + semver "^7.0.0" + +call-bind@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.0.tgz#24127054bb3f9bdcb4b1fb82418186072f77b8ce" + integrity sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.0" + +call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== @@ -890,11 +960,6 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -confusing-browser-globals@^1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz#30d1e7f3d1b882b25ec4933d1d1adac353d20a59" - integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA== - convert-source-map@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" @@ -923,11 +988,9 @@ custom-card-helpers@^1.8.0: typescript "^4.5.4" date-fns@^2.29.3: - version "2.30.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0" - integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw== - dependencies: - "@babel/runtime" "^7.21.0" + version "2.29.3" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.3.tgz#27402d2fc67eb442b511b70bbdf98e6411cd68a8" + integrity sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA== debug@^3.2.7: version "3.2.7" @@ -936,14 +999,7 @@ debug@^3.2.7: dependencies: ms "^2.1.1" -debug@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== - dependencies: - ms "^2.1.1" - -debug@^4.1.0: +debug@^4.1.0, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -1006,58 +1062,11 @@ electron-to-chromium@^1.4.535: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.540.tgz#c685f2f035e93eb21dd6a9cfe2c735bad8f77401" integrity sha512-aoCqgU6r9+o9/S7wkcSbmPRFi7OWZWiXS9rtjEd+Ouyu/Xyw5RSq2XN8s5Qp8IaFOLiRrhQCphCIjAxgG3eCAg== -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - emojis-list@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== -enquirer@^2.3.5: - version "2.3.6" - resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" - integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== - dependencies: - ansi-colors "^4.1.1" - -es-abstract@^1.17.5: - version "1.17.7" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.7.tgz#a4de61b2f66989fc7421676c1cb9787573ace54c" - integrity sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.2" - is-regex "^1.1.1" - object-inspect "^1.8.0" - object-keys "^1.1.1" - object.assign "^4.1.1" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - -es-abstract@^1.18.0-next.1: - version "1.18.0-next.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.1.tgz#6e3a0a4bda717e5023ab3b8e90bec36108d22c68" - integrity sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.2" - is-negative-zero "^2.0.0" - is-regex "^1.1.1" - object-inspect "^1.8.0" - object-keys "^1.1.1" - object.assign "^4.1.1" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - es-abstract@^1.22.1: version "1.22.2" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.2.tgz#90f7282d91d0ad577f505e423e52d4c1d93c1b8a" @@ -1143,19 +1152,18 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-airbnb-base@^14.2.1: - version "14.2.1" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e" - integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA== +eslint-config-standard-with-typescript@^39.1.0: + version "39.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-39.1.0.tgz#7a6a5a1b31eced3027edf0d729bae5784d9bda33" + integrity sha512-5+SPKis3yr6T1X6wSA7HhDuumTRMrTDMcsTrIWhdZuI+sX3e8SPGZYzuJxVxdc239Yo718dEVEVyJhHI6jUjrQ== dependencies: - confusing-browser-globals "^1.0.10" - object.assign "^4.1.2" - object.entries "^1.1.2" + "@typescript-eslint/parser" "^6.4.0" + eslint-config-standard "17.1.0" -eslint-config-prettier@^8.3.0: - version "8.10.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" - integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== +eslint-config-standard@17.1.0: + version "17.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-17.1.0.tgz#40ffb8595d47a6b242e07cbfd49dc211ed128975" + integrity sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q== eslint-import-resolver-node@^0.3.7: version "0.3.9" @@ -1173,7 +1181,15 @@ eslint-module-utils@^2.8.0: dependencies: debug "^3.2.7" -eslint-plugin-import@^2.24.0: +eslint-plugin-es-x@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-es-x/-/eslint-plugin-es-x-7.2.0.tgz#5779d742ad31f8fd780b9481331481e142b72311" + integrity sha512-9dvv5CcvNjSJPqnS5uZkqb3xmbeqRLnvXKK7iI5+oK/yTusyc46zbBZKENGsOfojm/mKfszyZb+wNqNPAPeGXA== + dependencies: + "@eslint-community/eslint-utils" "^4.1.2" + "@eslint-community/regexpp" "^4.6.0" + +eslint-plugin-import@^2.25.2: version "2.28.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz#63b8b5b3c409bfc75ebaf8fb206b07ab435482c4" integrity sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A== @@ -1196,109 +1212,100 @@ eslint-plugin-import@^2.24.0: semver "^6.3.1" tsconfig-paths "^3.14.2" -eslint-plugin-prettier@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" - integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== - dependencies: - prettier-linter-helpers "^1.0.0" - -eslint-scope@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" +"eslint-plugin-n@^15.0.0 || ^16.0.0 ": + version "16.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-16.1.0.tgz#73d24fe3e37d04519c1f9230bdbd3aa567c66799" + integrity sha512-3wv/TooBst0N4ND+pnvffHuz9gNPmk/NkLwAxOt2JykTl/hcuECe6yhTtLJcZjIxtZwN+GX92ACp/QTLpHA3Hg== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + builtins "^5.0.1" + eslint-plugin-es-x "^7.1.0" + get-tsconfig "^4.7.0" + ignore "^5.2.4" + is-core-module "^2.12.1" + minimatch "^3.1.2" + resolve "^1.22.2" + semver "^7.5.3" -eslint-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" +eslint-plugin-promise@^6.0.0: + version "6.1.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz#269a3e2772f62875661220631bd4dafcb4083816" + integrity sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig== -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + esrecurse "^4.3.0" + estraverse "^5.2.0" eslint-visitor-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint@^7.32.0: - version "7.32.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" - integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== - dependencies: - "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.4.3" - "@humanwhocodes/config-array" "^0.5.0" - ajv "^6.10.0" +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint@^8.0.1: + version "8.50.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.50.0.tgz#2ae6015fee0240fcd3f83e1e25df0287f487d6b2" + integrity sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.2" + "@eslint/js" "8.50.0" + "@humanwhocodes/config-array" "^0.11.11" + "@humanwhocodes/module-importer" "^1.0.1" + "@nodelib/fs.walk" "^1.2.8" + ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" - debug "^4.0.1" + debug "^4.3.2" doctrine "^3.0.0" - enquirer "^2.3.5" escape-string-regexp "^4.0.0" - eslint-scope "^5.1.1" - eslint-utils "^2.1.0" - eslint-visitor-keys "^2.0.0" - espree "^7.3.1" - esquery "^1.4.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" file-entry-cache "^6.0.1" - functional-red-black-tree "^1.0.1" - glob-parent "^5.1.2" - globals "^13.6.0" - ignore "^4.0.6" - import-fresh "^3.0.0" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.19.0" + graphemer "^1.4.0" + ignore "^5.2.0" imurmurhash "^0.1.4" is-glob "^4.0.0" - js-yaml "^3.13.1" + is-path-inside "^3.0.3" + js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" lodash.merge "^4.6.2" - minimatch "^3.0.4" + minimatch "^3.1.2" natural-compare "^1.4.0" - optionator "^0.9.1" - progress "^2.0.0" - regexpp "^3.1.0" - semver "^7.2.1" - strip-ansi "^6.0.0" - strip-json-comments "^3.1.0" - table "^6.0.9" + optionator "^0.9.3" + strip-ansi "^6.0.1" text-table "^0.2.0" - v8-compile-cache "^2.0.3" -espree@^7.3.0, espree@^7.3.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" - integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== dependencies: - acorn "^7.4.0" - acorn-jsx "^5.3.1" - eslint-visitor-keys "^1.3.0" + acorn "^8.9.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.4.1" -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== +esquery@^1.4.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== dependencies: estraverse "^5.1.0" @@ -1309,11 +1316,6 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - estraverse@^5.1.0, estraverse@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" @@ -1344,11 +1346,6 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-diff@^1.1.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" - integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== - fast-glob@^3.1.1: version "3.2.7" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" @@ -1360,6 +1357,17 @@ fast-glob@^3.1.1: merge2 "^1.3.0" micromatch "^4.0.4" +fast-glob@^3.2.9: + version "3.3.1" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" + integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -1408,6 +1416,14 @@ find-up@^4.0.0: locate-path "^5.0.0" path-exists "^4.0.0" +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + flat-cache@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" @@ -1462,11 +1478,6 @@ function.prototype.name@^1.1.6: es-abstract "^1.22.1" functions-have-names "^1.2.3" -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= - functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" @@ -1477,7 +1488,7 @@ gensync@^1.0.0-beta.2: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1: +get-intrinsic@^1.0.0, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== @@ -1487,6 +1498,15 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@ has-proto "^1.0.1" has-symbols "^1.0.3" +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + get-symbol-description@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" @@ -1495,6 +1515,13 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" +get-tsconfig@^4.7.0: + version "4.7.2" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.2.tgz#0dcd6fb330391d46332f4c6c1bf89a6514c2ddce" + integrity sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A== + dependencies: + resolve-pkg-maps "^1.0.0" + glob-parent@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -1502,6 +1529,13 @@ glob-parent@^5.1.2: dependencies: is-glob "^4.0.1" +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob@^7.1.3: version "7.1.4" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" @@ -1519,10 +1553,10 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.6.0, globals@^13.9.0: - version "13.11.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.11.0.tgz#40ef678da117fe7bd2e28f1fab24951bd0255be7" - integrity sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g== +globals@^13.19.0: + version "13.23.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.23.0.tgz#ef31673c926a0976e1f61dab4dca57e0c0a8af02" + integrity sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA== dependencies: type-fest "^0.20.2" @@ -1545,6 +1579,18 @@ globby@^11.0.3: merge2 "^1.3.0" slash "^3.0.0" +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + gopd@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" @@ -1557,7 +1603,17 @@ graceful-fs@^4.1.6, graceful-fs@^4.2.0: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02" integrity sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q== -has-bigints@^1.0.1, has-bigints@^1.0.2: +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + +has-bigints@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" + integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== + +has-bigints@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== @@ -1607,27 +1663,19 @@ home-assistant-js-websocket@^6.0.1: integrity sha512-TnZFzF4mn5F/v0XKUTK2GMQXrn/+eQpgaSDSELl6U0HSwSbFwRhGWLz330YT+hiKMspDflamsye//RPL+zwhDw== home-assistant-js-websocket@^8.0.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/home-assistant-js-websocket/-/home-assistant-js-websocket-8.2.0.tgz#3505bf004cc3026c5d0cfdae5c031a44b0fcb01b" - integrity sha512-B163iuvC1hsObkbSXm89JfjjOguyQXSQeQsGf6KQblUj9QwMgFkQt13TiCYjeFFTMzhQ8Qj3/gKx/6MnSeYUqA== - -ignore@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" - integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + version "8.0.0" + resolved "https://registry.yarnpkg.com/home-assistant-js-websocket/-/home-assistant-js-websocket-8.0.0.tgz#7111da312ac9fafb47d9bdfbcca8ee8fca4cd64d" + integrity sha512-H/JZDnlfXW3OBZK29YhaF3U/2maFcJSvxb0jKQBiN5i4XR+7ApYKALBBh2afLeiFQfy8Ys9AzSBY0kIeBW4Kzw== -ignore@^5.1.4, ignore@^5.1.8: +ignore@^5.1.4: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== -import-fresh@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.1.0.tgz#6d33fa1dcef6df930fae003446f33415af905118" - integrity sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" +ignore@^5.2.0, ignore@^5.2.4: + version "5.2.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" + integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== import-fresh@^3.2.1: version "3.3.0" @@ -1698,17 +1746,17 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: +is-callable@^1.1.3, is-callable@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-callable@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9" - integrity sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA== +is-callable@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" + integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== -is-core-module@^2.13.0: +is-core-module@^2.12.1, is-core-module@^2.13.0: version "2.13.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== @@ -1727,11 +1775,6 @@ is-extglob@^2.1.1: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - is-glob@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" @@ -1751,11 +1794,6 @@ is-module@^1.0.0: resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= -is-negative-zero@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.0.tgz#9553b121b0fac28869da9ed459e20c7543788461" - integrity sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE= - is-negative-zero@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" @@ -1773,6 +1811,11 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + is-reference@^1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.1.4.tgz#3f95849886ddb70256a3e6d062b1a68c13c51427" @@ -1780,13 +1823,6 @@ is-reference@^1.1.2: dependencies: "@types/estree" "0.0.39" -is-regex@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" - integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== - dependencies: - has-symbols "^1.0.1" - is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" @@ -1802,7 +1838,12 @@ is-shared-array-buffer@^1.0.2: dependencies: call-bind "^1.0.2" -is-string@^1.0.5, is-string@^1.0.7: +is-string@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" + integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== + +is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== @@ -1854,13 +1895,12 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.13.1: - version "3.13.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" - integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: - argparse "^1.0.7" - esprima "^4.0.0" + argparse "^2.0.1" jsesc@^2.5.1: version "2.5.2" @@ -1872,11 +1912,6 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" @@ -1943,21 +1978,18 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -lodash.clonedeep@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" - integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash.truncate@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" - integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= - lodash@^4.17.13: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" @@ -2001,7 +2033,7 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.3.0: +merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== @@ -2031,14 +2063,19 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" -minimatch@^3.1.2: +minimatch@^3.0.5, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" -minimist@^1.2.0, minimist@^1.2.6: +minimist@^1.2.0: + version "1.2.7" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" + integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== + +minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== @@ -2063,31 +2100,21 @@ node-releases@^2.0.13: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== -object-inspect@^1.12.3, object-inspect@^1.9.0: +object-inspect@^1.12.3: version "1.12.3" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== -object-inspect@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" - integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== +object-inspect@^1.9.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" + integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg== object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.1.1, object.assign@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" - object-keys "^1.1.1" - object.assign@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" @@ -2098,15 +2125,6 @@ object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" -object.entries@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.2.tgz#bc73f00acb6b6bb16c203434b10f9a7e797d3add" - integrity sha512-BQdB9qKmb/HyNdMNWVr7O3+z5MUIx3aiegEIJqjMBbBf0YT9RRxTJSim4mzFqtyr7PDAHigq0N9dO0m0tRakQA== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - has "^1.0.3" - object.fromentries@^2.0.6: version "2.0.7" resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.7.tgz#71e95f441e9a0ea6baf682ecaaf37fa2a8d7e616" @@ -2147,17 +2165,17 @@ opener@1: resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed" integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA== -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== +optionator@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" + integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== dependencies: + "@aashutoshrathi/word-wrap" "^1.2.3" deep-is "^0.1.3" fast-levenshtein "^2.0.6" levn "^0.4.1" prelude-ls "^1.2.1" type-check "^0.4.0" - word-wrap "^1.2.3" p-limit@^2.2.0: version "2.2.1" @@ -2166,6 +2184,13 @@ p-limit@^2.2.0: dependencies: p-try "^2.0.0" +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -2173,6 +2198,13 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -2237,23 +2269,6 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier-linter-helpers@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" - integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== - dependencies: - fast-diff "^1.1.2" - -prettier@^2.4.1: - version "2.8.8" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" - integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== - -progress@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - punycode@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -2271,11 +2286,6 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -regenerator-runtime@^0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" - integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== - regexp.prototype.flags@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e" @@ -2285,21 +2295,16 @@ regexp.prototype.flags@^1.5.1: define-properties "^1.2.0" set-function-name "^2.0.0" -regexpp@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - -require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== +resolve-pkg-maps@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" + integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== + resolve@^1.11.0, resolve@^1.11.1: version "1.12.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6" @@ -2307,7 +2312,7 @@ resolve@^1.11.0, resolve@^1.11.1: dependencies: path-parse "^1.0.6" -resolve@^1.22.4: +resolve@^1.22.2, resolve@^1.22.4: version "1.22.6" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.6.tgz#dd209739eca3aef739c626fea1b4f3c506195362" integrity sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw== @@ -2447,20 +2452,20 @@ semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.2.1, semver@^7.3.5: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== - dependencies: - lru-cache "^6.0.0" - -semver@^7.5.4: +semver@^7.0.0, semver@^7.5.3, semver@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" +semver@^7.3.5: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" + serialize-javascript@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" @@ -2503,15 +2508,6 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -slice-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" - integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" @@ -2530,20 +2526,6 @@ sourcemap-codec@^1.4.4: resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - string.prototype.trim@^1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz#f9ac6f8af4bd55ddfa8895e6aea92a96395393bd" @@ -2553,14 +2535,6 @@ string.prototype.trim@^1.2.8: define-properties "^1.2.0" es-abstract "^1.22.1" -string.prototype.trimend@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.2.tgz#6ddd9a8796bc714b489a3ae22246a208f37bfa46" - integrity sha512-8oAG/hi14Z4nOVP0z6mdiVZ/wqjDtWSLygMigTzAb+7aPEDTleeFf+WrF+alzecxIRkckkJVn+dTlwzJXORATw== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" - string.prototype.trimend@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz#1bb3afc5008661d73e2dc015cd4853732d6c471e" @@ -2570,14 +2544,6 @@ string.prototype.trimend@^1.0.7: define-properties "^1.2.0" es-abstract "^1.22.1" -string.prototype.trimstart@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.2.tgz#22d45da81015309cd0cdd79787e8919fc5c613e7" - integrity sha512-7F6CdBTl5zyu30BJFdzSTlSlLPwODC23Od+iLoVH8X6+3fvDPPuBVVj9iaB1GOsSTSIgVfsfm27R2FGrAPznWg== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" - string.prototype.trimstart@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz#d4cdb44b83a4737ffbac2d406e405d43d0184298" @@ -2587,7 +2553,7 @@ string.prototype.trimstart@^1.0.7: define-properties "^1.2.0" es-abstract "^1.22.1" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: +strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -2599,7 +2565,7 @@ strip-bom@^3.0.0: resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -2628,18 +2594,6 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -table@^6.0.9: - version "6.7.2" - resolved "https://registry.yarnpkg.com/table/-/table-6.7.2.tgz#a8d39b9f5966693ca8b0feba270a78722cbaf3b0" - integrity sha512-UFZK67uvyNivLeQbVtkiUs8Uuuxv24aSL4/Vil2PJVtMgU8Lx0CYkP12uCGa3kjyQzOSgV1+z9Wkb82fCGsO0g== - dependencies: - ajv "^8.0.1" - lodash.clonedeep "^4.5.0" - lodash.truncate "^4.4.2" - slice-ansi "^4.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - terser@^5.0.0: version "5.15.0" resolved "https://registry.yarnpkg.com/terser/-/terser-5.15.0.tgz#e16967894eeba6e1091509ec83f0c60e179f2425" @@ -2667,6 +2621,11 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +ts-api-utils@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331" + integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== + tsconfig-paths@^3.14.2: version "3.14.2" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" @@ -2750,10 +2709,15 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" -typescript@^4.5.4, typescript@^4.8.4: - version "4.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +typescript@*: + version "5.2.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" + integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== + +typescript@^4.5.4: + version "4.8.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" + integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ== unbox-primitive@^1.0.2: version "1.0.2" @@ -2785,11 +2749,6 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -v8-compile-cache@^2.0.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" - integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== - which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" @@ -2819,11 +2778,6 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -word-wrap@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -2838,3 +2792,8 @@ yallist@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==