@kiosko/sdk 0.2.5 → 0.2.6

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.
package/src/schema.ts CHANGED
@@ -152,6 +152,9 @@ export const t = {
152
152
  export const FILTER_HELP: Localized = {
153
153
  en: 'Empty: all. Names or patterns, comma-separated: * matches anything, a leading ! leaves out (web, acme/*, !*-old).',
154
154
  es: 'Vacío: todos. Nombres o patrones separados por comas: * vale por cualquier cosa y un ! delante excluye (web, acme/*, !*-old).',
155
+ de: 'Leer: alle. Namen oder Muster, durch Kommas getrennt: * steht für alles, ein ! davor schließt aus (web, acme/*, !*-old).',
156
+ 'zh-Hant': '留空:全部。填入名稱或模式,以逗號分隔:* 代表任意字元,開頭加 ! 則排除(web, acme/*, !*-old)。',
157
+ 'zh-Hans': '留空:全部。填写名称或模式,用逗号分隔:* 匹配任意内容,开头加 ! 表示排除(web, acme/*, !*-old)。',
155
158
  };
156
159
 
157
160
  function clone<T>(v: T): T {
package/src/testing.ts CHANGED
@@ -149,13 +149,13 @@ export interface PluginIssue {
149
149
  /**
150
150
  * Paints every widget of a plugin with its demo data at its minimum and
151
151
  * preferred sizes and a wide and a tall one, in every theme and in each
152
- * language given, and lists what went wrong: a `render` that throws, one
152
+ * language given (by default the ones the plugin declares), and lists what went wrong: a `render` that throws, one
153
153
  * that paints nothing, paints outside its box, or takes longer than
154
154
  * `slowMs` (Kiosko warns at 50 ms). An empty list is a pass.
155
155
  */
156
156
  export function checkPlugin(p: PluginDefinition, o: { locales?: string[]; themes?: string[]; slowMs?: number; extraSizes?: { w: number; h: number }[] } = {}): PluginIssue[] {
157
157
  const issues: PluginIssue[] = [];
158
- const locales = o.locales ?? ['en', 'es'];
158
+ const locales = o.locales ?? (p.languages?.length ? p.languages : ['en', 'es']);
159
159
  const themes = o.themes ?? THEMES.map((t) => t.id);
160
160
  const slow = o.slowMs ?? 50;
161
161
  for (const w of p.widgets ?? []) {