itube-specs 0.0.864 → 0.0.865

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,4 +1,5 @@
1
- import type { Language, Niche } from '~/runtime';
1
+ import type { Language, Niche } from '../runtime';
2
+ import { NicheHelper } from '../utils/niche-helper';
2
3
 
3
4
  /** Возвращает generateLink — генерирует путь с учётом текущей ниши и локали. */
4
5
  export const useGenerateLink = () => {
@@ -14,7 +15,9 @@ export const useGenerateLink = () => {
14
15
  const generateLink = (path: string, localeArg?: Language): string => {
15
16
  const cleanPath = path.startsWith('/') ? path : `/${path}`;
16
17
 
17
- const defaultNiche = useAppConfig().defaultNiche;
18
+ // Ниша сайта — из окружения (тем же значением уходит в заголовок X-Niche),
19
+ // список ниш — из per-site конфига проекта.
20
+ const defaultNiche = NicheHelper.getSiteDefaultNiche();
18
21
  const projectNiches = useAppConfig().niches as Niche[];
19
22
  const isOneNiche = projectNiches.length === 1;
20
23
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "itube-specs",
3
3
  "type": "module",
4
- "version": "0.0.864",
4
+ "version": "0.0.865",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "./types/index.d.ts",
7
7
  "scripts": {