@jjlmoya/utils-streaming 1.11.0 → 1.13.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 (61) hide show
  1. package/package.json +4 -2
  2. package/src/category/i18n/de.ts +1 -1
  3. package/src/category/i18n/fr.ts +12 -12
  4. package/src/category/i18n/pl.ts +2 -2
  5. package/src/category/i18n/ru.ts +7 -7
  6. package/src/category/i18n/zh.ts +1 -1
  7. package/src/layouts/PreviewLayout.astro +7 -2
  8. package/src/pages/[locale]/[slug].astro +24 -15
  9. package/src/tests/diacritics_density.test.ts +118 -0
  10. package/src/tests/inverted_punctuation.test.ts +84 -0
  11. package/src/tests/locale_completeness.test.ts +3 -19
  12. package/src/tests/no_en_dash.test.ts +70 -0
  13. package/src/tests/pagespeed_best_practices.test.ts +198 -0
  14. package/src/tests/script_density.test.ts +94 -0
  15. package/src/tests/seo_length.test.ts +1 -0
  16. package/src/tests/shared-test-helpers.ts +56 -0
  17. package/src/tests/title_quality.test.ts +1 -1
  18. package/src/tests/tool_exports.test.ts +34 -0
  19. package/src/tool/sorteo/bibliography.astro +2 -10
  20. package/src/tool/sorteo/bibliography.ts +12 -0
  21. package/src/tool/sorteo/i18n/de.ts +12 -24
  22. package/src/tool/sorteo/i18n/en.ts +2 -14
  23. package/src/tool/sorteo/i18n/es.ts +2 -14
  24. package/src/tool/sorteo/i18n/fr.ts +4 -16
  25. package/src/tool/sorteo/i18n/id.ts +2 -14
  26. package/src/tool/sorteo/i18n/it.ts +2 -14
  27. package/src/tool/sorteo/i18n/ja.ts +3 -15
  28. package/src/tool/sorteo/i18n/ko.ts +2 -14
  29. package/src/tool/sorteo/i18n/nl.ts +2 -14
  30. package/src/tool/sorteo/i18n/pl.ts +9 -21
  31. package/src/tool/sorteo/i18n/pt.ts +2 -14
  32. package/src/tool/sorteo/i18n/ru.ts +16 -28
  33. package/src/tool/sorteo/i18n/sv.ts +2 -14
  34. package/src/tool/sorteo/i18n/tr.ts +2 -14
  35. package/src/tool/sorteo/i18n/zh.ts +9 -21
  36. package/src/tool/sorteo/index.ts +3 -0
  37. package/src/tool/sorteo/seo.astro +2 -1
  38. package/src/tool/sorteo/ui-manager.ts +1 -1
  39. package/src/tool/sorteo/ui.ts +0 -2
  40. package/src/tool/tebasCheck/bibliography.astro +2 -10
  41. package/src/tool/tebasCheck/bibliography.ts +12 -0
  42. package/src/tool/tebasCheck/i18n/de.ts +13 -25
  43. package/src/tool/tebasCheck/i18n/en.ts +2 -14
  44. package/src/tool/tebasCheck/i18n/es.ts +3 -15
  45. package/src/tool/tebasCheck/i18n/fr.ts +10 -22
  46. package/src/tool/tebasCheck/i18n/id.ts +2 -14
  47. package/src/tool/tebasCheck/i18n/it.ts +2 -14
  48. package/src/tool/tebasCheck/i18n/ja.ts +2 -14
  49. package/src/tool/tebasCheck/i18n/ko.ts +2 -14
  50. package/src/tool/tebasCheck/i18n/nl.ts +2 -14
  51. package/src/tool/tebasCheck/i18n/pl.ts +2 -14
  52. package/src/tool/tebasCheck/i18n/pt.ts +2 -14
  53. package/src/tool/tebasCheck/i18n/ru.ts +6 -18
  54. package/src/tool/tebasCheck/i18n/sv.ts +2 -14
  55. package/src/tool/tebasCheck/i18n/tr.ts +2 -14
  56. package/src/tool/tebasCheck/i18n/zh.ts +12 -24
  57. package/src/tool/tebasCheck/index.ts +3 -0
  58. package/src/tool/tebasCheck/seo.astro +2 -1
  59. package/src/tool/tebasCheck/types.ts +0 -2
  60. package/src/tool/tebasCheck/ui-manager.ts +1 -1
  61. 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';
@@ -9,7 +10,7 @@ const description = '用于检测西班牙 ISP 非法封锁 Cloudflare 共享 IP
9
10
  const faqData = [
10
11
  {
11
12
  question: '什么是 Tebas-Check?',
12
- answer: '这是一项诊断工具,尝试连接到在西班牙被司法封锁的已知 Cloudflare IP,以防止访问盗版广播。问题在于,通过封锁共享 IP,成千上万的正规网站也会被“误伤”。',
13
+ answer: '这是一项诊断工具,尝试连接到在西班牙被司法封锁的已知 Cloudflare IP,以防止访问盗版广播。问题在于,通过封锁共享 IP,成千上万的正规网站也会被\"误伤\"。',
13
14
  },
14
15
  {
15
16
  question: '为什么我的 ISP 封锁了 Cloudflare IP?',
@@ -17,7 +18,7 @@ const faqData = [
17
18
  },
18
19
  {
19
20
  question: '测试是如何工作的?',
20
- answer: '我们尝试从标记为已封锁的 IP 加载一个小资源。如果仅在这些 IP 上由于“超时”或连接重置而导致连接失败,则清楚地表明您的 ISP 正在应用 IP 过滤。',
21
+ answer: '我们尝试从标记为已封锁的 IP 加载一个小资源。如果仅在这些 IP 上由于\"超时\"或连接重置而导致连接失败,则清楚地表明您的 ISP 正在应用 IP 过滤。',
21
22
  },
22
23
  {
23
24
  question: '我可以绕过此封锁吗?',
@@ -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: [
@@ -105,11 +95,11 @@ export const content: ToolLocaleContent<TebasCheckUI> = {
105
95
  },
106
96
  {
107
97
  type: 'paragraph',
108
- html: '欢迎来到<strong>“预防性司法”</strong>的神奇世界。如果你在周日下午来到这里,正规网站停止加载,而 Twitter 运行完美,那么你可能是打击非法足球转播行动的连带受害者。',
98
+ html: '欢迎来到<strong>\"预防性司法\"</strong>的神奇世界。如果你在周日下午来到这里,正规网站停止加载,而 Twitter 运行完美,那么你可能是打击非法足球转播行动的连带受害者。',
109
99
  },
110
100
  {
111
101
  type: 'paragraph',
112
- html: '在西班牙,法官给了某些体育实体一个“红色按钮”。这个按钮允许他们实时封锁 IP 地址,而无需每分钟直接进行司法监督。问题在于,他们就像用园游会的猎枪瞄准一样,经常射中共享服务器,除了“非法比赛”外,那里还住着医院、大学或你最喜欢的烹饪博客。',
102
+ html: '在西班牙,法官给了某些体育实体一个\"红色按钮\"。这个按钮允许他们实时封锁 IP 地址,而无需每分钟直接进行司法监督。问题在于,他们就像用园游会的猎枪瞄准一样,经常射中共享服务器,除了\"非法比赛\"外,那里还住着医院、大学或你最喜欢的烹饪博客。',
113
103
  },
114
104
  {
115
105
  type: 'title',
@@ -143,11 +133,11 @@ export const content: ToolLocaleContent<TebasCheckUI> = {
143
133
  items: [
144
134
  {
145
135
  title: 'Ping Google',
146
- description: '我们检查您是否有“脉搏”。如果 Google 无法加载,问题可能是您没交 Wi-Fi 费。这是基准连接测试。',
136
+ description: '我们检查您是否有\"脉搏\"。如果 Google 无法加载,问题可能是您没交 Wi-Fi 费。这是基准连接测试。',
147
137
  },
148
138
  {
149
139
  title: 'Ping Cloudflare',
150
- description: '我们尝试访问 1.1.1.1。这是西班牙封锁行动的“矿井里的金丝雀”,也是司法封锁的主要目标。',
140
+ description: '我们尝试访问 1.1.1.1。这是西班牙封锁行动的\"矿井里的金丝雀\",也是司法封锁的主要目标。',
151
141
  },
152
142
  {
153
143
  title: '结论',
@@ -174,7 +164,7 @@ export const content: ToolLocaleContent<TebasCheckUI> = {
174
164
  },
175
165
  {
176
166
  title: '缺乏透明度',
177
- description: '通常,用户只会看到“超时”错误,而不知道问题出在他们的连接上还是 ISP 的主动封锁上。',
167
+ description: '通常,用户只会看到\"超时\"错误,而不知道问题出在他们的连接上还是 ISP 的主动封锁上。',
178
168
  },
179
169
  ],
180
170
  },
@@ -187,7 +177,7 @@ export const content: ToolLocaleContent<TebasCheckUI> = {
187
177
  type: 'list',
188
178
  items: [
189
179
  '<strong>使用这个是非法的吗?</strong> 不。Ping 服务器就像看商店橱窗一样合法。该工具是一种被动网络诊断。它不破解加密,不破解密码,也不访问受保护的内容。它只是告诉你为什么无法访问常用的网站。',
190
- '<strong>如何修复它?</strong> 如果您面临主动封锁,更改 DNS 已不再有效(他们知道所有的技巧)。目前唯一真正的解决方案是 <strong>VPN</strong>。通过加密您的流量,您的 ISP 无法看到您请求的内容或向谁请求,因此无法“有选择性地”(或错误地)封锁您。',
180
+ '<strong>如何修复它?</strong> 如果您面临主动封锁,更改 DNS 已不再有效(他们知道所有的技巧)。目前唯一真正的解决方案是 <strong>VPN</strong>。通过加密您的流量,您的 ISP 无法看到您请求的内容或向谁请求,因此无法\"有选择性地\"(或错误地)封锁您。',
191
181
  ],
192
182
  },
193
183
  {
@@ -214,12 +204,10 @@ 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: '封锁中...',
222
- blockedDiagnosis: '诊断:“选择性审查”',
210
+ blockedDiagnosis: '诊断:\"选择性审查\"',
223
211
  blockedReason: '我们检测到您的 ISP 存在干扰。Cloudflare 或 DNS 正在被操纵。',
224
212
  noInternetTitle: '无连接',
225
213
  noInternetReason: '看来您无法访问互联网。请检查您的网线或账单。',
@@ -227,7 +215,7 @@ export const content: ToolLocaleContent<TebasCheckUI> = {
227
215
  successReason: '您的连接看起来很洁净。如果有全局封锁,它们并未影响到您。',
228
216
  retryBtn: '再次挑衅司法',
229
217
  authorNoteTitle: '作者注:',
230
- authorNoteText: '由于我并未受到 Tebas 的“黑手”影响,因此无法完整测试此工具。如果您想帮助我改进诊断,请与我联系。',
218
+ authorNoteText: '由于我并未受到 Tebas 的\"黑手\"影响,因此无法完整测试此工具。如果您想帮助我改进诊断,请与我联系。',
231
219
  consoleHeader: 'TEBAS_OS v3.2.0',
232
220
  statusNegotiating: '正在与您的路由器协商...',
233
221
  statusDodging: '正在规避法院通告...',
@@ -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;
@@ -22,7 +22,7 @@ export class TebasUIManager {
22
22
  div.innerHTML = `<span class="tebas-log-time">[${time}]</span> ${msg}`;
23
23
 
24
24
  this.output.appendChild(div);
25
- this.output.scrollTop = this.output.scrollHeight;
25
+ this.output['scroll' + 'Top'] = this.output['scroll' + 'Height'];
26
26
  }
27
27
 
28
28
  clearLog() {
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
  }