@jjlmoya/utils-streaming 1.10.0 → 1.12.0

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.
Files changed (49) hide show
  1. package/package.json +1 -1
  2. package/src/pages/[locale]/[slug].astro +24 -15
  3. package/src/tests/locale_completeness.test.ts +3 -19
  4. package/src/tests/seo_length.test.ts +1 -0
  5. package/src/tests/shared-test-helpers.ts +56 -0
  6. package/src/tests/title_quality.test.ts +1 -1
  7. package/src/tests/tool_exports.test.ts +34 -0
  8. package/src/tool/sorteo/bibliography.astro +2 -10
  9. package/src/tool/sorteo/bibliography.ts +12 -0
  10. package/src/tool/sorteo/giveaway.css +6 -6
  11. package/src/tool/sorteo/i18n/de.ts +2 -14
  12. package/src/tool/sorteo/i18n/en.ts +2 -14
  13. package/src/tool/sorteo/i18n/es.ts +2 -14
  14. package/src/tool/sorteo/i18n/fr.ts +2 -14
  15. package/src/tool/sorteo/i18n/id.ts +2 -14
  16. package/src/tool/sorteo/i18n/it.ts +2 -14
  17. package/src/tool/sorteo/i18n/ja.ts +2 -14
  18. package/src/tool/sorteo/i18n/ko.ts +2 -14
  19. package/src/tool/sorteo/i18n/nl.ts +2 -14
  20. package/src/tool/sorteo/i18n/pl.ts +2 -14
  21. package/src/tool/sorteo/i18n/pt.ts +2 -14
  22. package/src/tool/sorteo/i18n/ru.ts +2 -14
  23. package/src/tool/sorteo/i18n/sv.ts +2 -14
  24. package/src/tool/sorteo/i18n/tr.ts +2 -14
  25. package/src/tool/sorteo/i18n/zh.ts +2 -14
  26. package/src/tool/sorteo/index.ts +3 -0
  27. package/src/tool/sorteo/seo.astro +2 -1
  28. package/src/tool/sorteo/ui.ts +0 -2
  29. package/src/tool/tebasCheck/bibliography.astro +2 -10
  30. package/src/tool/tebasCheck/bibliography.ts +12 -0
  31. package/src/tool/tebasCheck/i18n/de.ts +2 -14
  32. package/src/tool/tebasCheck/i18n/en.ts +2 -14
  33. package/src/tool/tebasCheck/i18n/es.ts +2 -14
  34. package/src/tool/tebasCheck/i18n/fr.ts +2 -14
  35. package/src/tool/tebasCheck/i18n/id.ts +2 -14
  36. package/src/tool/tebasCheck/i18n/it.ts +2 -14
  37. package/src/tool/tebasCheck/i18n/ja.ts +2 -14
  38. package/src/tool/tebasCheck/i18n/ko.ts +2 -14
  39. package/src/tool/tebasCheck/i18n/nl.ts +2 -14
  40. package/src/tool/tebasCheck/i18n/pl.ts +2 -14
  41. package/src/tool/tebasCheck/i18n/pt.ts +2 -14
  42. package/src/tool/tebasCheck/i18n/ru.ts +2 -14
  43. package/src/tool/tebasCheck/i18n/sv.ts +2 -14
  44. package/src/tool/tebasCheck/i18n/tr.ts +2 -14
  45. package/src/tool/tebasCheck/i18n/zh.ts +2 -14
  46. package/src/tool/tebasCheck/index.ts +3 -0
  47. package/src/tool/tebasCheck/seo.astro +2 -1
  48. package/src/tool/tebasCheck/types.ts +0 -2
  49. package/src/types.ts +2 -3
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
3
  import type { ToolLocaleContent } from '../../../types';
3
4
  import type { TebasCheckUI } from '../types';
@@ -82,19 +83,8 @@ export const content: ToolLocaleContent<TebasCheckUI> = {
82
83
  slug,
83
84
  title,
84
85
  description,
85
- faqTitle: 'Vanliga frågor',
86
86
  faq: faqData,
87
- bibliographyTitle: 'Referenser och kontext',
88
- bibliography: [
89
- {
90
- name: 'Cloudflare: Förstå IP-blockering',
91
- url: 'https://www.cloudflare.com/learning/network-layer/what-is-ip-blocking/',
92
- },
93
- {
94
- name: 'Spanska regler för dynamisk blockering',
95
- url: 'https://www.poderjudicial.es/',
96
- },
97
- ],
87
+ bibliography,
98
88
  howTo: howToData,
99
89
  schemas: [faqSchema as any, howToSchema as any, appSchema as any],
100
90
  seo: [
@@ -214,8 +204,6 @@ export const content: ToolLocaleContent<TebasCheckUI> = {
214
204
  },
215
205
  ],
216
206
  ui: {
217
- faqTitle: 'Vanliga frågor',
218
- bibliographyTitle: 'Referenser och kontext',
219
207
  scanning: 'Skannar matrisen...',
220
208
  seekingBlocks: 'Letar efter betongblock i din fiber...',
221
209
  blockedTitle: 'BLOCKERAR...',
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
3
  import type { ToolLocaleContent } from '../../../types';
3
4
  import type { TebasCheckUI } from '../types';
@@ -82,19 +83,8 @@ export const content: ToolLocaleContent<TebasCheckUI> = {
82
83
  slug,
83
84
  title,
84
85
  description,
85
- faqTitle: 'Sıkça Sorulan Sorular',
86
86
  faq: faqData,
87
- bibliographyTitle: 'Referanslar ve Bağlam',
88
- bibliography: [
89
- {
90
- name: 'Cloudflare: IP Engellemesini Anlamak',
91
- url: 'https://www.cloudflare.com/learning/network-layer/what-is-ip-blocking/',
92
- },
93
- {
94
- name: 'İspanyol dinamik engelleme düzenlemeleri',
95
- url: 'https://www.poderjudicial.es/',
96
- },
97
- ],
87
+ bibliography,
98
88
  howTo: howToData,
99
89
  schemas: [faqSchema as any, howToSchema as any, appSchema as any],
100
90
  seo: [
@@ -214,8 +204,6 @@ export const content: ToolLocaleContent<TebasCheckUI> = {
214
204
  },
215
205
  ],
216
206
  ui: {
217
- faqTitle: 'Sıkça Sorulan Sorular',
218
- bibliographyTitle: 'Referanslar ve Bağlam',
219
207
  scanning: 'Matris taranıyor...',
220
208
  seekingBlocks: 'Fiberinizdeki somut engeller aranıyor...',
221
209
  blockedTitle: 'ENGELLENİYOR...',
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
3
  import type { ToolLocaleContent } from '../../../types';
3
4
  import type { TebasCheckUI } from '../types';
@@ -82,19 +83,8 @@ export const content: ToolLocaleContent<TebasCheckUI> = {
82
83
  slug,
83
84
  title,
84
85
  description,
85
- faqTitle: '常见问题',
86
86
  faq: faqData,
87
- bibliographyTitle: '参考资料与背景',
88
- bibliography: [
89
- {
90
- name: 'Cloudflare: 了解 IP 封锁',
91
- url: 'https://www.cloudflare.com/learning/network-layer/what-is-ip-blocking/',
92
- },
93
- {
94
- name: '西班牙动态封锁法规',
95
- url: 'https://www.poderjudicial.es/',
96
- },
97
- ],
87
+ bibliography,
98
88
  howTo: howToData,
99
89
  schemas: [faqSchema as any, howToSchema as any, appSchema as any],
100
90
  seo: [
@@ -214,8 +204,6 @@ export const content: ToolLocaleContent<TebasCheckUI> = {
214
204
  },
215
205
  ],
216
206
  ui: {
217
- faqTitle: '常见问题',
218
- bibliographyTitle: '参考资料与背景',
219
207
  scanning: '正在扫描矩阵...',
220
208
  seekingBlocks: '正在您的光纤中搜索具体封锁...',
221
209
  blockedTitle: '封锁中...',
@@ -1,8 +1,11 @@
1
1
  import { tebasCheck } from './entry';
2
+ import type { ToolDefinition } from '../../types';
3
+ import tebasCss from './isp-blockage-detector.css?raw';
2
4
  export * from './entry';
3
5
  export const TEBAS_CHECK_TOOL: ToolDefinition = {
4
6
  entry: tebasCheck,
5
7
  Component: () => import('./component.astro'),
6
8
  SEOComponent: () => import('./seo.astro'),
7
9
  BibliographyComponent: () => import('./bibliography.astro'),
10
+ css: tebasCss,
8
11
  };
@@ -9,6 +9,7 @@ interface Props {
9
9
 
10
10
  const { locale = 'es' } = Astro.props;
11
11
  const content = await TEBAS_CHECK_TOOL.entry.i18n[locale]?.();
12
+ if (!content) return null;
12
13
  ---
13
14
 
14
- {content && <SEORenderer content={{ locale, sections: content.seo }} />}
15
+ {content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}
@@ -1,7 +1,5 @@
1
1
  export interface TebasCheckUI {
2
2
  [key: string]: string;
3
- faqTitle: string;
4
- bibliographyTitle: string;
5
3
  scanning: string;
6
4
  seekingBlocks: string;
7
5
  blockedTitle: string;
package/src/types.ts CHANGED
@@ -5,7 +5,7 @@ export type { SEOSection };
5
5
 
6
6
  export type KnownLocale =
7
7
  | 'ar' | 'da' | 'de' | 'en' | 'es' | 'fi'
8
- | 'fr' | 'it' | 'ja' | 'ko' | 'nb' | 'nl'
8
+ | 'fr' | 'id' | 'it' | 'ja' | 'ko' | 'nb' | 'nl'
9
9
  | 'pl' | 'pt' | 'ru' | 'sv' | 'tr' | 'zh';
10
10
 
11
11
  export interface FAQItem {
@@ -29,9 +29,7 @@ export interface ToolLocaleContent<TUI extends Record<string, string | string[]>
29
29
  description: string;
30
30
  ui: TUI;
31
31
  seo: SEOSection[];
32
- faqTitle?: string;
33
32
  faq: FAQItem[];
34
- bibliographyTitle?: string;
35
33
  bibliography: BibliographyEntry[];
36
34
  howTo: HowToStep[];
37
35
  schemas: WithContext<Thing>[];
@@ -68,4 +66,5 @@ export interface ToolDefinition {
68
66
  Component: unknown;
69
67
  SEOComponent: unknown;
70
68
  BibliographyComponent: unknown;
69
+ css?: string;
71
70
  }