@mirodan/ai-insight 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { defineEventHandler, createError, getHeader, setHeaders, readBody } from 'h3'
2
2
  import { useRuntimeConfig } from '#imports'
3
3
 
4
- const tErrorMessages: Record<string, Record<string, string>> = {
4
+ const tErrorMessages = {
5
5
  ru: {
6
6
  CONFIG_ENDPOINT_MISSING: 'Не указан endpoint AI Insight',
7
7
  CONFIG_KEY_MISSING: 'Не указан API-ключ AI Insight',
@@ -16,7 +16,7 @@ const tErrorMessages: Record<string, Record<string, string>> = {
16
16
  }
17
17
  }
18
18
 
19
- function tError(key: string, lang: string): string {
19
+ function tError(key, lang) {
20
20
  return tErrorMessages[lang === 'en' ? 'en' : 'ru']?.[key] || key
21
21
  }
22
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirodan/ai-insight",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "AI-powered insight tooltip component for Mirodan",
5
5
  "type": "module",
6
6
  "main": "./dist/module.js",