utopia-ia/elffuss-code public
Changesets · Branches · Tags · Compare
| Changeset | 19805a9db35a7ac0bec7b177fde17c6e72fe8e749179a43a962c2a443048e38c |
|---|---|
| Author | KikoCis <kikocisneros@gmail.com> · 2026-10-12 12:21 +02:00 |
| Committer | KikoCis <kikocisneros@gmail.com> · 2026-10-12 12:21 +02:00 |
| Parents | d66451cc104e, 33079db2b6ac |
11 files changed
modified .gitignore +3 −0
| @@ -17,3 +17,6 @@ | ||
| 17 | 17 | |
| 18 | 18 | # motor propio: repo privado aparte, se sube por rsync (nunca por git) |
| 19 | 19 | web/js/engine/ |
| 20 | + | |
| 21 | +# cachés de red de los scripts de tests | |
| 22 | +tests/.cache/ |
modified tests/ext_feedback.mjs +3 −1
| @@ -152,6 +152,7 @@ | ||
| 152 | 152 | return route.fulfill({ status: 404, body: '' }); |
| 153 | 153 | }); |
| 154 | 154 | await abrePanel(p); |
| 155 | + await p.uncheck('#ext-only-works'); // this section reads every verdict, the ones that do nothing too | |
| 155 | 156 | await p.fill('#ext-q', 'anything'); |
| 156 | 157 | await p.press('#ext-q', 'Enter'); |
| 157 | 158 | const r = id => p.locator(`#ext-results .ext-row[data-id="${id}"]`); |
| @@ -217,9 +218,10 @@ | ||
| 217 | 218 | await p.fill('#ext-q', 'prettier'); |
| 218 | 219 | await p.press('#ext-q', 'Enter'); |
| 219 | 220 | const row = p.locator('#ext-results .ext-row[data-id="esbenp.prettier-vscode"]'); |
| 220 | - await row.waitFor({ timeout: 20000 }).catch(() => {}); | |
| 221 | + await row.waitFor({ state: 'attached', timeout: 20000 }).catch(() => {}); | |
| 221 | 222 | const dis = await hasta(async () => (await row.locator('.ext-install').getAttribute('aria-disabled')) === 'true', { tiempo: 20000 }); |
| 222 | 223 | ok('live: Prettier is not offered as a plain Install', !!dis, await row.innerText().catch(() => '')); |
| 224 | + ok('live: …and with «Only ones that work in Code» (on by default) it is hidden', await hasta(async () => !(await row.isVisible()) && /hidden because/.test(await p.locator('#ext-hidden').innerText().catch(() => ''))), await p.locator('#ext-hidden').innerText().catch(() => '')); | |
| 223 | 225 | await p.fill('#ext-q', 'dracula'); |
| 224 | 226 | await p.press('#ext-q', 'Enter'); |
| 225 | 227 | const d = p.locator('#ext-results .ext-row[data-id="dracula-theme.theme-dracula"]'); |
added tests/ext_popular.mjs +238 −0
| @@ -0,0 +1,238 @@ | ||
| 1 | +// Extensions panel: the "Popular" list and the "Only ones that work in Code" | |
| 2 | +// filter on search results. | |
| 3 | +// | |
| 4 | +// CENSUS=<extensions.tsv> BASE=http://127.0.0.1:8999 node tests/ext_popular.mjs | |
| 5 | +// | |
| 6 | +// 1. (no browser) web/js/ext/popular.json against the static census of Open | |
| 7 | +// VSX (tests/catalog_census.mjs writes it; CENSUS= points to another copy): | |
| 8 | +// no entry has code of its own, every one gets the panel's "works" verdict, | |
| 9 | +// no built-in language pack, ordered by downloads, three kinds in the top 10. | |
| 10 | +// 2. (browser, Open VSX mocked) Popular shows on opening with no request to | |
| 11 | +// Open VSX; a search hides what does nothing, says how many, fetches more | |
| 12 | +// pages to fill the view, and "show" / the checkbox bring them back. | |
| 13 | +// 3. LIVE: installs a few entries of the real list from Open VSX. Without | |
| 14 | +// network it is NOT RUN and does not count as a failure. | |
| 15 | +import fs from 'node:fs'; | |
| 16 | +import path from 'node:path'; | |
| 17 | +import { fileURLToPath } from 'node:url'; | |
| 18 | +import { chromium } from 'playwright'; | |
| 19 | +import { describe, factsFromManifest, works } from '../web/js/ext/verdict.js'; | |
| 20 | + | |
| 21 | +const HERE = path.dirname(fileURLToPath(import.meta.url)); | |
| 22 | +const BASE = process.env.BASE || 'http://localhost:8999'; | |
| 23 | +const OUT = process.env.SCRATCH || '/tmp/elffuss-test'; | |
| 24 | +fs.mkdirSync(OUT, { recursive: true }); | |
| 25 | +let fails = 0; | |
| 26 | +const ok = (n, c, e = '') => { console.log((c ? '✅' : '❌') + ' ' + n + (e ? ' — ' + e : '')); if (!c) fails++; }; | |
| 27 | +const notRun = (n, e) => console.log('⏭️ NOT RUN ' + n + (e ? ' — ' + e : '')); | |
| 28 | +const sleep = ms => new Promise(r => setTimeout(r, ms)); | |
| 29 | +async function hasta(fn, { tiempo = 12000, cada = 150 } = {}) { | |
| 30 | + const fin = Date.now() + tiempo; | |
| 31 | + let v; | |
| 32 | + while (Date.now() < fin) { try { v = await fn(); if (v) return v; } catch { /* retry */ } await sleep(cada); } | |
| 33 | + return v; | |
| 34 | +} | |
| 35 | +const NOMBRE_VETADO = /Claude[-_ ]?Code/i; | |
| 36 | + | |
| 37 | +// ── 1. the list itself ── | |
| 38 | +const POP = JSON.parse(fs.readFileSync(path.join(HERE, '../web/js/ext/popular.json'), 'utf8')); | |
| 39 | +const items = POP.items; | |
| 40 | +{ | |
| 41 | + ok(`popular.json: between 30 and 40 entries (${items.length})`, items.length >= 30 && items.length <= 40); | |
| 42 | + const CENSUS = process.env.CENSUS || path.join(HERE, 'catalog-census/extensions.tsv'); | |
| 43 | + if (!fs.existsSync(CENSUS)) ok('census found (CENSUS=<extensions.tsv>)', false, CENSUS + ' does not exist: this check cannot run without it'); | |
| 44 | + else { | |
| 45 | + const [head, ...lines] = fs.readFileSync(CENSUS, 'utf8').trim().split('\n'); | |
| 46 | + const cols = head.split('\t'); | |
| 47 | + const census = new Map(lines.map(l => { const r = Object.fromEntries(l.split('\t').map((v, i) => [cols[i], v])); return [r.id.toLowerCase(), r]; })); | |
| 48 | + ok(`census read (${census.size} extensions)`, census.size > 10000); | |
| 49 | + const fuera = items.filter(p => !census.has(p.id.toLowerCase())); | |
| 50 | + ok('every entry is in the census', !fuera.length, fuera.map(p => p.id).join(' ')); | |
| 51 | + const conCodigo = items.filter(p => census.get(p.id.toLowerCase())?.runtime !== 'none'); | |
| 52 | + ok('no entry needs Node, or any code of its own (census runtime=none)', !conCodigo.length, conCodigo.map(p => `${p.id}=${census.get(p.id.toLowerCase())?.runtime}`).join(' ')); | |
| 53 | + const noFunciona = items.filter(p => census.get(p.id.toLowerCase())?.works !== '1' || census.get(p.id.toLowerCase())?.declarative !== '1'); | |
| 54 | + ok('every entry works in Code by the census (works=1, declarative=1)', !noFunciona.length, noFunciona.map(p => p.id).join(' ')); | |
| 55 | + const orden = items.map(p => Number(census.get(p.id.toLowerCase())?.rank)); | |
| 56 | + ok('ordered by downloads (census rank ascending)', orden.every((r, i) => i === 0 || r > orden[i - 1]), orden.join(',')); | |
| 57 | + } | |
| 58 | + ok('no built-in vscode.* language pack', !items.some(p => /^vscode\./i.test(p.id))); | |
| 59 | + // (every language exists here: which ones Monaco has is the generator's job, | |
| 60 | + // checked against Monaco's own bundle when the list is built) | |
| 61 | + const host = { builtinLanguage: () => false, grammarSkippedFor: () => false, languageName: id => id, languageExtensions: () => [] }; | |
| 62 | + const malas = items.filter(p => p.analysis.hasCode || !works(describe(factsFromManifest(host, p.analysis))) || describe(factsFromManifest(host, p.analysis)).kind !== 'full'); | |
| 63 | + ok('the panel\'s own verdict on each stored analysis: «Works in Code», no code', !malas.length, malas.map(p => p.id).join(' ')); | |
| 64 | + const top = new Set(items.slice(0, 10).map(p => p.kind)); | |
| 65 | + ok('the top 10 mixes themes, languages and snippets', top.has('theme') && top.has('language') && top.has('snippets'), [...top].join(',')); | |
| 66 | + ok('each entry: id, name, kind and a one-line description in es and en', items.every(p => p.id && p.displayName && ['theme', 'language', 'snippets'].includes(p.kind) && p.description?.es?.trim() && p.description?.en?.trim() && !/\n/.test(p.description.es + p.description.en))); | |
| 67 | + const texto = fs.readFileSync(path.join(HERE, '../web/js/ext/popular.json'), 'utf8') + fs.readFileSync(path.join(HERE, '../web/js/ext/i18n.js'), 'utf8'); | |
| 68 | + ok('the list and the panel strings never name that other product', !NOMBRE_VETADO.test(texto)); | |
| 69 | +} | |
| 70 | + | |
| 71 | +// ── 2. the panel, Open VSX mocked ── | |
| 72 | +const b = await chromium.launch(); | |
| 73 | +async function nuevaPagina(locale, viewport = { width: 1280, height: 860 }) { | |
| 74 | + const ctx = await b.newContext({ locale, viewport }); | |
| 75 | + await ctx.addInitScript(() => { try { localStorage.setItem('elffusscode.model', 'rules'); } catch {} }); | |
| 76 | + const p = await ctx.newPage(); | |
| 77 | + p.errores = []; | |
| 78 | + p.on('pageerror', e => { if (e.message !== 'Canceled') p.errores.push(e.message); }); | |
| 79 | + await p.goto(BASE + '/', { waitUntil: 'domcontentloaded' }); | |
| 80 | + await p.evaluate(async () => { | |
| 81 | + const o = await navigator.storage.getDirectory(); | |
| 82 | + for await (const k of o.keys()) await o.removeEntry(k, { recursive: true }).catch(() => {}); | |
| 83 | + const w = async (n, t) => { const f = await o.getFileHandle(n, { create: true }); const s = await f.createWritable(); await s.write(t); await s.close(); }; | |
| 84 | + await w('app.js', '// app\nconst a = 1;\n'); | |
| 85 | + await w('.env', 'API_KEY=abc # secret\n'); | |
| 86 | + }); | |
| 87 | + await p.goto(BASE + '/?test-opfs', { waitUntil: 'domcontentloaded' }); | |
| 88 | + await hasta(() => p.evaluate(() => !!window.monaco?.editor?.getEditors?.().length), { tiempo: 30000 }); | |
| 89 | + return { ctx, p }; | |
| 90 | +} | |
| 91 | +const abrePanel = async p => { | |
| 92 | + if (await p.locator('#ext-panel').isVisible().catch(() => false)) return; | |
| 93 | + await p.evaluate(() => document.getElementById('act-ext').click()); // on a phone the activity bar is in the drawer | |
| 94 | + await p.waitForSelector('#ext-panel', { timeout: 10000 }); | |
| 95 | +}; | |
| 96 | + | |
| 97 | +// 60 results in three pages of 20; two of each page work, the rest only run | |
| 98 | +// their own code (one of them is published per platform, so its package.json | |
| 99 | +// is only under /linux-x64/: before, that row came with no verdict and stayed) | |
| 100 | +const TOTAL = 60; | |
| 101 | +const mock = i => { | |
| 102 | + const funciona = i % 20 < 2; | |
| 103 | + const id = funciona ? `works-${i}` : `node-${i}`; | |
| 104 | + return { namespace: 'elffuss-test', name: id, version: '1.0.0', displayName: funciona ? `Theme ${i}` : `Tool ${i}`, description: '', downloadCount: 1000 - i, | |
| 105 | + files: { download: `https://open-vsx.org/api/elffuss-test/${id}/${i === 5 ? 'linux-x64/' : ''}1.0.0/file/x.vsix` } }; | |
| 106 | +}; | |
| 107 | +const manifiesto = name => (name.startsWith('works-') | |
| 108 | + ? { publisher: 'elffuss-test', name, version: '1.0.0', categories: ['Themes'], contributes: { themes: [{ label: `Mock ${name}`, path: './t.json' }] } } | |
| 109 | + : { publisher: 'elffuss-test', name, version: '1.0.0', categories: ['Linters'], main: './out/extension.js', contributes: { commands: [{ command: 'x' }], configuration: {} } }); | |
| 110 | +async function simula(ctx) { | |
| 111 | + const log = { search: [], openvsx: [] }; | |
| 112 | + await ctx.route(/open-vsx\.org|eclipsecontent\.org/, route => { | |
| 113 | + const u = new URL(route.request().url()); | |
| 114 | + log.openvsx.push(u.pathname); | |
| 115 | + const json = (o, status = 200) => route.fulfill({ status, contentType: 'application/json', headers: { 'access-control-allow-origin': '*' }, body: JSON.stringify(o) }); | |
| 116 | + if (u.pathname === '/api/-/search') { | |
| 117 | + const off = Number(u.searchParams.get('offset')) || 0, size = Number(u.searchParams.get('size')) || 20; | |
| 118 | + log.search.push(off); | |
| 119 | + return json({ totalSize: TOTAL, offset: off, extensions: Array.from({ length: Math.max(0, Math.min(size, TOTAL - off)) }, (_, k) => mock(off + k)) }); | |
| 120 | + } | |
| 121 | + const m = /^\/api\/elffuss-test\/([^/]+)\/(?:([^/]+)\/)?1\.0\.0\/file\/package\.json$/.exec(u.pathname); | |
| 122 | + if (m && (m[1] === 'node-5') === (m[2] === 'linux-x64')) return json(manifiesto(m[1])); | |
| 123 | + return json({ error: 'not found' }, 404); | |
| 124 | + }); | |
| 125 | + return log; | |
| 126 | +} | |
| 127 | +const visibles = p => p.locator('#ext-list .ext-row:not([hidden])').count(); | |
| 128 | +const ocultasDom = p => p.locator('#ext-list .ext-row[hidden]').count(); | |
| 129 | + | |
| 130 | +{ | |
| 131 | + const { ctx, p } = await nuevaPagina('en-US'); | |
| 132 | + const log = await simula(ctx); | |
| 133 | + await abrePanel(p); | |
| 134 | + const filas = p.locator('#ext-list.ext-popular .ext-row'); | |
| 135 | + ok('opening the panel: Popular is there at once, with every entry of the list', await hasta(async () => (await filas.count()) === items.length), String(await filas.count())); | |
| 136 | + const veredictos = await hasta(async () => { const v = await filas.locator('.ext-verdict').allInnerTexts(); return v.length === items.length && v; }); | |
| 137 | + ok('each popular row has its verdict line «Works in Code: …»', !!veredictos && veredictos.every(t => /^Works in Code: /.test(t)), (veredictos || []).find(t => !/^Works in Code: /.test(t)) || ''); | |
| 138 | + const kinds = await filas.locator('.ext-kind').allInnerTexts(); | |
| 139 | + ok('each popular row is tagged with its kind', kinds.length === items.length && kinds.every(k => /^(theme|language|snippets)$/i.test(k)), kinds.slice(0, 5).join(',')); | |
| 140 | + ok('…in the order of the list', (await filas.evaluateAll(rs => rs.map(r => r.dataset.id))).join() === items.map(x => `${x.namespace}.${x.name}`).join()); | |
| 141 | + ok('Popular asked Open VSX for nothing (verdicts precomputed, no icons)', log.openvsx.length === 0, log.openvsx.join(' ')); | |
| 142 | + ok('the filter is on by default', await p.isChecked('#ext-only-works')); | |
| 143 | + await p.screenshot({ path: OUT + '/extpop-popular.png' }); | |
| 144 | + | |
| 145 | + await p.fill('#ext-q', 'tool'); | |
| 146 | + await p.press('#ext-q', 'Enter'); | |
| 147 | + const lleno = await hasta(async () => log.search.length === 3 && (await p.textContent('#ext-status')) === '60 results · 54 hidden because they do not work in Code', { tiempo: 20000 }); | |
| 148 | + ok('filter on: it fetched more pages by itself to fill the view (3 searches)', !!lleno && log.search.join() === '0,20,40', log.search.join()); | |
| 149 | + ok('filter on: only the 6 that work are shown', (await visibles(p)) === 6, String(await visibles(p))); | |
| 150 | + const linea = (await p.locator('#ext-hidden').innerText()).replace(/\s+/g, ' '); | |
| 151 | + ok('the hidden count is said: «54 hidden because they do not work in Code · show»', linea === '54 hidden because they do not work in Code · show', linea); | |
| 152 | + ok('…and it is right: 54 rows hidden in the page', (await ocultasDom(p)) === 54, String(await ocultasDom(p))); | |
| 153 | + ok('…the status says it too (screen readers)', (await p.textContent('#ext-status')) === '60 results · 54 hidden because they do not work in Code', await p.textContent('#ext-status')); | |
| 154 | + ok('the per-platform build got its verdict too (and is hidden)', await p.locator('#ext-list .ext-row[data-id="elffuss-test.node-5"] .ext-verdict').count() === 1 && !(await p.locator('#ext-list .ext-row[data-id="elffuss-test.node-5"]').isVisible())); | |
| 155 | + ok('all fetched: no «More results»', await p.locator('#ext-more').count() === 0); | |
| 156 | + await p.screenshot({ path: OUT + '/extpop-filtered.png' }); | |
| 157 | + | |
| 158 | + await p.click('#ext-show-hidden'); | |
| 159 | + ok('«show»: all 60 visible, the filter unticked, the hidden line gone', await hasta(async () => (await visibles(p)) === 60 && !(await p.isChecked('#ext-only-works')) && !(await p.locator('#ext-hidden').isVisible()))); | |
| 160 | + ok('…focus goes to the filter checkbox', await p.evaluate(() => document.activeElement?.id) === 'ext-only-works'); | |
| 161 | + const honesto = (await p.locator('#ext-list .ext-row[data-id="elffuss-test.node-3"] .ext-verdict').innerText()).replace(/\s+/g, ' '); | |
| 162 | + ok('filter off: the ones that do not work carry the honest verdict', /does not work in Code/.test(honesto), honesto); | |
| 163 | + ok('filter off: the status gives no hidden count', (await p.textContent('#ext-status')) === '60 results', await p.textContent('#ext-status')); | |
| 164 | + await p.keyboard.press('Space'); | |
| 165 | + ok('keyboard: Space on the checkbox turns the filter back on (6 visible, 54 hidden)', await hasta(async () => (await p.isChecked('#ext-only-works')) && (await visibles(p)) === 6 && /^54 hidden/.test(await p.locator('#ext-hidden').innerText()))); | |
| 166 | + ok('the choice is remembered in this browser', await p.evaluate(() => localStorage.getItem('elffusscode.ext.onlyWorks')) === '1'); | |
| 167 | + | |
| 168 | + await p.fill('#ext-q', ''); | |
| 169 | + await p.press('#ext-q', 'Enter'); | |
| 170 | + ok('clearing the search brings Popular back', await hasta(async () => (await p.locator('#ext-list.ext-popular .ext-row').count()) === items.length)); | |
| 171 | + ok('no page errors', !p.errores.length, p.errores.slice(0, 3).join(' | ')); | |
| 172 | + await ctx.close(); | |
| 173 | +} | |
| 174 | + | |
| 175 | +// Spanish, phone width | |
| 176 | +{ | |
| 177 | + const { ctx, p } = await nuevaPagina('es-ES', { width: 390, height: 844 }); | |
| 178 | + await simula(ctx); | |
| 179 | + await abrePanel(p); | |
| 180 | + await hasta(async () => (await p.locator('#ext-list.ext-popular .ext-row .ext-verdict').count()) === items.length); | |
| 181 | + const primera = (await p.locator('#ext-list.ext-popular .ext-row').first().innerText()).replace(/\s+/g, ' '); | |
| 182 | + ok('es: Popular en castellano («Funciona en Code: …», descripción y tipo)', /Funciona en Code: /.test(primera) && primera.includes(items[0].description.es) && /snippets|tema|lenguaje/i.test(primera), primera); | |
| 183 | + ok('es: «Solo las que funcionan en Code»', (await p.locator('label.ext-filter').innerText()).trim() === 'Solo las que funcionan en Code'); | |
| 184 | + const ancho = () => p.evaluate(() => { const x = document.getElementById('ext-panel'); return [x.scrollWidth, x.clientWidth, document.documentElement.scrollWidth, innerWidth]; }); | |
| 185 | + let a = await ancho(); | |
| 186 | + ok('phone width, Popular: no horizontal overflow', a[0] <= a[1] + 1 && a[2] <= a[3] + 1, a.join(',')); | |
| 187 | + await p.screenshot({ path: OUT + '/extpop-phone-es.png' }); | |
| 188 | + await p.fill('#ext-q', 'tool'); | |
| 189 | + await p.press('#ext-q', 'Enter'); | |
| 190 | + const linea = await hasta(async () => { const t = (await p.locator('#ext-hidden').innerText()).replace(/\s+/g, ' '); return /^54 /.test(t) && t; }, { tiempo: 20000 }); | |
| 191 | + ok('es: «54 ocultas porque no funcionan en Code · mostrar»', linea === '54 ocultas porque no funcionan en Code · mostrar', String(linea)); | |
| 192 | + a = await ancho(); | |
| 193 | + ok('phone width, filtered search: no horizontal overflow', a[0] <= a[1] + 1 && a[2] <= a[3] + 1, a.join(',')); | |
| 194 | + const fuera = await p.evaluate(() => [...document.querySelectorAll('#ext-panel button, #ext-panel label')].filter(b => { const r = b.getBoundingClientRect(); return r.width && (r.right > innerWidth + 1 || r.left < -1); }).length); | |
| 195 | + ok('phone width: every button fits on screen', fuera === 0, String(fuera)); | |
| 196 | + await p.screenshot({ path: OUT + '/extpop-phone-es-search.png' }); | |
| 197 | + ok('es: sin errores de página', !p.errores.length, p.errores.slice(0, 3).join(' | ')); | |
| 198 | + await ctx.close(); | |
| 199 | +} | |
| 200 | + | |
| 201 | +// ── 3. LIVE: install some of the real list from the Popular section ── | |
| 202 | +{ | |
| 203 | + const vivo = await fetch('https://open-vsx.org/api/dracula-theme/theme-dracula', { signal: AbortSignal.timeout(8000) }).then(r => r.ok).catch(() => false); | |
| 204 | + if (!vivo) notRun('live installs from Popular', 'no network'); | |
| 205 | + else { | |
| 206 | + const { p } = await nuevaPagina('en-US'); | |
| 207 | + await abrePanel(p); | |
| 208 | + const fila = id => p.locator(`#ext-list.ext-popular .ext-row[data-id="${id}"]`); | |
| 209 | + const instala = async id => { | |
| 210 | + await fila(id).locator('.ext-install').focus(); | |
| 211 | + await p.keyboard.press('Enter'); // with the keyboard | |
| 212 | + return hasta(async () => (await p.locator(`#ext-installed .ext-row[data-id="${id.toLowerCase()}"]`).count()) === 1, { tiempo: 60000 }); | |
| 213 | + }; | |
| 214 | + const fondo = () => p.evaluate(() => getComputedStyle(document.querySelector('#editor .monaco-editor-background') || document.querySelector('#editor .monaco-editor')).backgroundColor); | |
| 215 | + await fila('dracula-theme.theme-dracula').waitFor({ timeout: 10000 }); | |
| 216 | + ok('live: Dracula installs from Popular', !!(await instala('dracula-theme.theme-dracula'))); | |
| 217 | + ok('live: …and its theme is applied', await hasta(async () => (await fondo()) === 'rgb(40, 42, 54)', { tiempo: 20000 }), await fondo()); | |
| 218 | + ok('live: DotENV installs from Popular', !!(await instala('mikestead.dotenv'))); | |
| 219 | + const lang = await p.evaluate(async () => { await (await import('/js/ide.js')).openFile('.env'); await new Promise(r => setTimeout(r, 800)); return window.monaco.editor.getEditors()[0].getModel().getLanguageId(); }); | |
| 220 | + ok('live: …a .env file opens as dotenv', lang === 'dotenv', lang); | |
| 221 | + const tipos = await p.evaluate(() => window.monaco.editor.tokenize('API_KEY=abc # secret', 'dotenv')[0].map(t => t.type).join(' ')); | |
| 222 | + ok('live: …with its own grammar (comment scope)', /comment/.test(tipos), tipos); | |
| 223 | + await abrePanel(p); | |
| 224 | + ok('live: JavaScript (ES6) snippets install from Popular', !!(await instala('xabikos.JavaScriptSnippets'))); | |
| 225 | + const tarjeta = (await p.locator('#ext-done').innerText().catch(() => '')).replace(/\s+/g, ' '); | |
| 226 | + ok('live: …the notice counts its snippets', /\d+ snippets for JavaScript/.test(tarjeta), tarjeta.slice(0, 200)); | |
| 227 | + ok('live: Nix installs from Popular', !!(await instala('bbenoist.Nix'))); | |
| 228 | + const nix = await p.evaluate(() => window.monaco.languages.getLanguages().some(l => l.id === 'nix')); | |
| 229 | + ok('live: …and Code now knows the Nix language', nix); | |
| 230 | + await p.screenshot({ path: OUT + '/extpop-live.png' }); | |
| 231 | + ok('live: no page errors', !p.errores.length, p.errores.slice(0, 3).join(' | ')); | |
| 232 | + await p.context().close(); | |
| 233 | + } | |
| 234 | +} | |
| 235 | + | |
| 236 | +console.log(fails ? `\n❌ ${fails} FAILURE(S)` : '\n✅ EXTENSIONS: POPULAR AND «ONLY ONES THAT WORK» OK'); | |
| 237 | +await b.close(); | |
| 238 | +process.exit(fails ? 1 : 0); |
added tests/ext_popular_build.mjs +231 −0
| @@ -0,0 +1,231 @@ | ||
| 1 | +// Builds web/js/ext/popular.json: the "Popular" list of the Extensions panel. | |
| 2 | +// Only extensions whose main value works in Code as soon as they are installed | |
| 3 | +// (colour themes, highlighting for a language Code does not have yet, snippet | |
| 4 | +// packs), ordered by Open VSX downloads. | |
| 5 | +// | |
| 6 | +// node tests/ext_popular_build.mjs --census <extensions.tsv> [--draft] [--n 36] | |
| 7 | +// | |
| 8 | +// --census the static census of the whole catalog (tests/catalog_census.mjs | |
| 9 | +// writes tests/catalog-census/extensions.tsv; that is the default) | |
| 10 | +// --draft print every candidate with its verdict and the reason it was left | |
| 11 | +// out, and write nothing (to curate: add an entry to TEXT or SKIP) | |
| 12 | +// --n how many entries (36) | |
| 13 | +// | |
| 14 | +// What it reads, all with GET and at most one request every 400 ms: for each | |
| 15 | +// candidate its Open VSX metadata and published package.json (and | |
| 16 | +// package.nls.json when names are %keys%), and once Monaco 0.52.2's bundle from | |
| 17 | +// jsdelivr, to know which languages and file extensions Code already | |
| 18 | +// highlights. Cached in tests/.cache/popular/, so a second run is offline. | |
| 19 | +// | |
| 20 | +// Rules, in order: | |
| 21 | +// 1. census: runtime=none (no code at all), works=1, declarative=1, ranked | |
| 22 | +// 2. not a built-in language pack (vscode.*) and not in SKIP | |
| 23 | +// 3. the panel's own verdict (web/js/ext/verdict.js) is "works in Code" (full) | |
| 24 | +// 4. nothing it brings duplicates Code: no grammar for a language Monaco | |
| 25 | +// already highlights, for a file extension Monaco already claims, or for | |
| 26 | +// VS Code's id of a language Code names differently (no file of its own) | |
| 27 | +// 5. it has a hand-written one-line description in TEXT (es and en) | |
| 28 | +import fs from 'node:fs'; | |
| 29 | +import path from 'node:path'; | |
| 30 | +import { fileURLToPath } from 'node:url'; | |
| 31 | +import { analyzeManifest, resolveNls } from '../web/js/ext/vsix.js'; | |
| 32 | +import { describe, factsFromManifest } from '../web/js/ext/verdict.js'; | |
| 33 | + | |
| 34 | +const HERE = path.dirname(fileURLToPath(import.meta.url)); | |
| 35 | +const ROOT = path.resolve(HERE, '..'); | |
| 36 | +const arg = (k, d) => { const i = process.argv.indexOf(k); return i > 0 ? process.argv[i + 1] : d; }; | |
| 37 | +const CENSUS = path.resolve(arg('--census', path.join(HERE, 'catalog-census/extensions.tsv'))); | |
| 38 | +const DRAFT = process.argv.includes('--draft'); | |
| 39 | +const N = Number(arg('--n', 36)); | |
| 40 | +const CACHE = path.join(HERE, '.cache', 'popular'); | |
| 41 | +const OUT = path.join(ROOT, 'web/js/ext/popular.json'); | |
| 42 | +const API = 'https://open-vsx.org'; | |
| 43 | +const MONACO = 'https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs/editor/editor.main.js'; | |
| 44 | +fs.mkdirSync(CACHE, { recursive: true }); | |
| 45 | + | |
| 46 | +// Left out on purpose, with the reason. | |
| 47 | +const SKIP = { | |
| 48 | + 'ms-vscode.cpptools-themes': 'the Visual Studio colours Code already has as its default dark and light themes', | |
| 49 | + 'ms-vscode.vscode-typescript-next': 'TypeScript and JavaScript are already highlighted', | |
| 50 | +}; | |
| 51 | + | |
| 52 | +// One plain line per entry: what you get. Kept by hand so it says what the | |
| 53 | +// extension is FOR, not what its package.json lists. | |
| 54 | +const TEXT = { | |
| 55 | + // themes | |
| 56 | + 'gitpod.gitpod-theme': ['Los temas de Gitpod, claro y oscuro, de tonos suaves.', 'Gitpod\'s soft light and dark themes.'], | |
| 57 | + 'dracula-theme.theme-dracula': ['Dracula: el tema oscuro de fondo morado y colores vivos.', 'Dracula: the dark theme with a purple background and vivid colours.'], | |
| 58 | + 'GitHub.github-vscode-theme': ['Los temas de GitHub, claros y oscuros, también de alto contraste.', 'GitHub\'s light and dark themes, high-contrast ones included.'], | |
| 59 | + 'jdinhlife.gruvbox': ['Gruvbox: tonos cálidos y retro, en claro y en oscuro.', 'Gruvbox: warm retro tones, light and dark.'], | |
| 60 | + 'akamud.vscode-theme-onedark': ['One Dark, el tema oscuro clásico de Atom.', 'One Dark, Atom\'s classic dark theme.'], | |
| 61 | + 'enkia.tokyo-night': ['Tokyo Night: oscuro, con los colores de Tokio de noche.', 'Tokyo Night: dark, in the colours of Tokyo at night.'], | |
| 62 | + 'BeardedBear.beardedtheme': ['Bearded Theme: decenas de variantes, de muy oscuras a claras.', 'Bearded Theme: dozens of variants, from very dark to light.'], | |
| 63 | + 'sdras.night-owl': ['Night Owl: pensado para programar de noche; también en claro.', 'Night Owl: made for coding at night; a light one too.'], | |
| 64 | + 'ahmadawais.shades-of-purple': ['Shades of Purple: morados intensos y amarillo.', 'Shades of Purple: bold purples with yellow.'], | |
| 65 | + 'arcticicestudio.nord-visual-studio-code': ['Nord: azules fríos del Ártico, sereno y limpio.', 'Nord: cool Arctic blues, calm and clean.'], | |
| 66 | + 'johnpapa.winteriscoming': ['Winter is Coming: azul oscuro, negro y una versión clara.', 'Winter is Coming: dark blue, black and a light one.'], | |
| 67 | + 'wesbos.theme-cobalt2': ['Cobalt2: azul cobalto con amarillo, de Wes Bos.', 'Cobalt2: cobalt blue with yellow, by Wes Bos.'], | |
| 68 | + 'aleksa-codes.one-dark-modern-pro': ['One Dark Modern Pro: One Dark con los colores de la interfaz actual.', 'One Dark Modern Pro: One Dark with a modern interface palette.'], | |
| 69 | + 'metaphore.kanagawa-vscode-color-theme': ['Kanagawa: colores de la estampa japonesa La gran ola.', 'Kanagawa: colours from the Japanese print The Great Wave.'], | |
| 70 | + 'liviuschera.noctis': ['Noctis: once temas, claros y oscuros, de colores templados.', 'Noctis: eleven light and dark themes in calm colours.'], | |
| 71 | + 'jolaleye.horizon-theme-vscode': ['Horizon: oscuro y cálido, con rosas y naranjas.', 'Horizon: warm and dark, with pinks and oranges.'], | |
| 72 | + 'antfu.theme-vitesse': ['Vitesse: temas sobrios en claro, oscuro y negro.', 'Vitesse: understated light, dark and black themes.'], | |
| 73 | + // languages Code does not have | |
| 74 | + 'wholroyd.jinja': ['Resalta plantillas Jinja (.j2, .jinja), también dentro de HTML y YAML.', 'Highlights Jinja templates (.j2, .jinja), inside HTML and YAML too.'], | |
| 75 | + 'mikestead.dotenv': ['Resalta los ficheros .env de variables de entorno.', 'Highlights .env files of environment variables.'], | |
| 76 | + 'bpruitt-goddard.mermaid-markdown-syntax-highlighting': ['Resalta diagramas Mermaid (.mmd, .mermaid).', 'Highlights Mermaid diagrams (.mmd, .mermaid).'], | |
| 77 | + 'bbenoist.Doxygen': ['Resalta ficheros de documentación Doxygen (.dox).', 'Highlights Doxygen documentation files (.dox).'], | |
| 78 | + 'IBM.output-colorizer': ['Colorea ficheros de log (.log): fechas, niveles, errores.', 'Colours log files (.log): dates, levels, errors.'], | |
| 79 | + 'bbenoist.Nix': ['Resalta el lenguaje Nix (.nix).', 'Highlights the Nix language (.nix).'], | |
| 80 | + 'mrmlnc.vscode-apache': ['Resalta la configuración de Apache (.htaccess, .conf).', 'Highlights Apache configuration (.htaccess, .conf).'], | |
| 81 | + // snippets | |
| 82 | + 'EricSia.pythonsnippets3': ['Snippets de Python: bucles, clases, funciones y más con un prefijo.', 'Python snippets: loops, classes, functions and more from a prefix.'], | |
| 83 | + 'xabikos.JavaScriptSnippets': ['Snippets de JavaScript y TypeScript: imports, funciones flecha, console.log…', 'JavaScript and TypeScript snippets: imports, arrow functions, console.log…'], | |
| 84 | + 'johnpapa.Angular2': ['Snippets de Angular: componentes, servicios y rutas en TypeScript y HTML.', 'Angular snippets: components, services and routes in TypeScript and HTML.'], | |
| 85 | + 'eventyret.bootstrap-4-cdn-snippet': ['Snippets de Bootstrap 4: la página base con el CDN y sus componentes.', 'Bootstrap 4 snippets: the starter page with the CDN and its components.'], | |
| 86 | + 'dannysteenman.cdk-snippets': ['Snippets de AWS CDK para Python y TypeScript.', 'AWS CDK snippets for Python and TypeScript.'], | |
| 87 | + 'onecentlin.laravel5-snippets': ['Snippets de Laravel en PHP: rutas, modelos, consultas.', 'Laravel snippets in PHP: routes, models, queries.'], | |
| 88 | + 'Nash.awesome-flutter-snippets': ['Snippets de Flutter en Dart: widgets y su estructura.', 'Flutter snippets in Dart: widgets and their boilerplate.'], | |
| 89 | + 'hollowtree.vue-snippets': ['Snippets de Vue 2 en JavaScript, TypeScript y HTML.', 'Vue 2 snippets in JavaScript, TypeScript and HTML.'], | |
| 90 | + 'HansUXdev.bootstrap5-snippets': ['Snippets de Bootstrap 5 y Font Awesome en HTML.', 'Bootstrap 5 and Font Awesome snippets in HTML.'], | |
| 91 | + 'robole.markdown-snippets': ['Snippets de Markdown: tablas, enlaces, imágenes, listas de tareas.', 'Markdown snippets: tables, links, images, task lists.'], | |
| 92 | + 'imgildev.vscode-tailwindcss-snippets': ['Snippets de Tailwind CSS en HTML.', 'Tailwind CSS snippets in HTML.'], | |
| 93 | + 'donjayamanne.jquerysnippets': ['Más de 130 snippets de jQuery en JavaScript y HTML.', 'Over 130 jQuery snippets in JavaScript and HTML.'], | |
| 94 | +}; | |
| 95 | + | |
| 96 | +const sleep = ms => new Promise(r => setTimeout(r, ms)); | |
| 97 | +let next = 0, requests = 0; | |
| 98 | +async function get(url, { json = true, notFound = false } = {}) { | |
| 99 | + const file = path.join(CACHE, encodeURIComponent(url).slice(0, 240)); | |
| 100 | + if (fs.existsSync(file)) { const t = fs.readFileSync(file, 'utf8'); return t === '\u0000404' ? null : json ? JSON.parse(t) : t; } | |
| 101 | + for (let i = 1; i <= 5; i++) { | |
| 102 | + const wait = next - Date.now(); | |
| 103 | + next = Math.max(Date.now(), next) + 400; | |
| 104 | + if (wait > 0) await sleep(wait); | |
| 105 | + requests++; | |
| 106 | + const r = await fetch(url, { headers: { 'User-Agent': 'elffuss-code-popular' } }).catch(() => null); | |
| 107 | + if (!r || r.status === 429 || r.status >= 500) { await sleep(5000 * i); continue; } | |
| 108 | + if (r.status === 404 && notFound) { fs.writeFileSync(file, '\u0000404'); return null; } | |
| 109 | + if (!r.ok) throw new Error(`HTTP ${r.status} ${url}`); | |
| 110 | + const t = await r.text(); | |
| 111 | + fs.writeFileSync(file, t); | |
| 112 | + return json ? JSON.parse(t) : t; | |
| 113 | + } | |
| 114 | + throw new Error('gave up: ' + url); | |
| 115 | +} | |
| 116 | + | |
| 117 | +// ── what Code already highlights: Monaco's languages and their file extensions ── | |
| 118 | +const bundle = await get(MONACO, { json: false }); | |
| 119 | +const builtin = new Set(); | |
| 120 | +const claimed = new Set(); | |
| 121 | +for (const m of bundle.matchAll(/id:"([\w.+-]+)",extensions:\[([^\]]*)\]/g)) { | |
| 122 | + builtin.add(m[1]); | |
| 123 | + for (const x of m[2].matchAll(/"([^"]+)"/g)) claimed.add(x[1].toLowerCase()); | |
| 124 | +} | |
| 125 | +for (const m of bundle.matchAll(/registerLanguage\(\{id:"([\w.+-]+)"/g)) builtin.add(m[1]); | |
| 126 | +if (builtin.size < 60 || !claimed.has('.js') || !claimed.has('.json')) throw new Error(`could not read Monaco's languages from ${MONACO} (${builtin.size} found)`); | |
| 127 | +// the panel's host, as Node sees it (no extension installed) | |
| 128 | +const host = { | |
| 129 | + builtinLanguage: id => builtin.has(id), | |
| 130 | + grammarSkippedFor: id => id === 'json' || id === 'plaintext', // Monaco's built-ins without Monarch | |
| 131 | + languageName: () => null, | |
| 132 | + languageExtensions: () => [], | |
| 133 | +}; | |
| 134 | + | |
| 135 | +// ── 1. census ── | |
| 136 | +if (!fs.existsSync(CENSUS)) throw new Error(`no census at ${CENSUS}: pass --census <extensions.tsv>`); | |
| 137 | +const [head, ...lines] = fs.readFileSync(CENSUS, 'utf8').trim().split('\n'); | |
| 138 | +const cols = head.split('\t'); | |
| 139 | +const rows = lines.map(l => Object.fromEntries(l.split('\t').map((v, i) => [cols[i], v]))); | |
| 140 | +const candidates = rows.filter(r => r.runtime === 'none' && r.works === '1' && r.declarative === '1' && /^\d+$/.test(r.rank)) | |
| 141 | + .sort((a, b) => a.rank - b.rank); | |
| 142 | +console.log(`census: ${rows.length} extensions; ${candidates.length} with no code that work in Code`); | |
| 143 | + | |
| 144 | +// a grammar duplicates Code when its language is Monaco's, or when every file | |
| 145 | +// extension of that language is already Monaco's | |
| 146 | +function duplicates(pkg) { | |
| 147 | + const c = pkg.contributes || {}; | |
| 148 | + const langs = Array.isArray(c.languages) ? c.languages : []; | |
| 149 | + const out = []; | |
| 150 | + for (const g of Array.isArray(c.grammars) ? c.grammars : []) { | |
| 151 | + const id = g?.language; | |
| 152 | + if (typeof id !== 'string') continue; // injections: they add to another grammar | |
| 153 | + if (builtin.has(id)) { out.push(id); continue; } | |
| 154 | + const own = langs.filter(l => l?.id === id); | |
| 155 | + const exts = own.flatMap(l => (Array.isArray(l.extensions) ? l.extensions : [])).map(x => String(x).toLowerCase()); | |
| 156 | + const names = own.flatMap(l => [...(Array.isArray(l.filenames) ? l.filenames : []), ...(Array.isArray(l.filenamePatterns) ? l.filenamePatterns : [])]); | |
| 157 | + if (!exts.length && !names.length) out.push(`${id} (no file of its own: VS Code's id for a language Code names differently)`); | |
| 158 | + // a file extension Monaco already has would be taken over (PostCSS claims .css) | |
| 159 | + else if (exts.some(x => claimed.has(x))) out.push(`${id} (${exts.filter(x => claimed.has(x)).join(' ')})`); | |
| 160 | + } | |
| 161 | + return out; | |
| 162 | +} | |
| 163 | + | |
| 164 | +function kindOf(f) { | |
| 165 | + if (f.highlight.length || f.settingsOnly.length) return 'language'; | |
| 166 | + if (f.snippets.length) return 'snippets'; | |
| 167 | + if (f.themes.length) return 'theme'; | |
| 168 | + return null; | |
| 169 | +} | |
| 170 | + | |
| 171 | +const picked = []; | |
| 172 | +const draft = []; | |
| 173 | +for (const r of candidates) { | |
| 174 | + if (!DRAFT && picked.length >= N) break; | |
| 175 | + if (DRAFT && r.rank > 3000) break; | |
| 176 | + const why = reason => draft.push({ rank: r.rank, id: r.id, reason }); | |
| 177 | + if (r.id.startsWith('vscode.')) { why('built-in language pack'); continue; } | |
| 178 | + if (SKIP[r.id]) { why('skip: ' + SKIP[r.id]); continue; } | |
| 179 | + const [ns, name] = [r.id.slice(0, r.id.indexOf('.')), r.id.slice(r.id.indexOf('.') + 1)]; | |
| 180 | + const base = `${API}/api/${encodeURIComponent(ns)}/${encodeURIComponent(name)}/${encodeURIComponent(r.version)}`; | |
| 181 | + const meta = await get(base, { notFound: true }); | |
| 182 | + if (!meta || meta.error) { why('no metadata'); continue; } | |
| 183 | + if (meta.deprecated) { why('deprecated'); continue; } | |
| 184 | + let pkg = await get(`${base}/file/package.json`, { notFound: true }); | |
| 185 | + if (!pkg) { why('no package.json'); continue; } | |
| 186 | + if (JSON.stringify(pkg.contributes || {}).includes('"%')) { | |
| 187 | + const nls = await get(`${base}/file/package.nls.json`, { notFound: true }); | |
| 188 | + if (nls) pkg = resolveNls(pkg, nls); | |
| 189 | + } | |
| 190 | + const a = analyzeManifest(pkg); | |
| 191 | + const f = factsFromManifest(host, a); | |
| 192 | + const v = describe(f); | |
| 193 | + if (v.kind !== 'full') { why(`verdict ${v.kind}: ${v.verdict}`); continue; } | |
| 194 | + const dup = duplicates(pkg); | |
| 195 | + if (dup.length) { why(`duplicates Code: ${dup.join(', ')}`); continue; } | |
| 196 | + const kind = kindOf(f); | |
| 197 | + if (!kind) { why('nothing'); continue; } | |
| 198 | + const text = TEXT[r.id]; | |
| 199 | + if (text === null) { why('left out by hand'); continue; } | |
| 200 | + if (!text) { why(`NEEDS TEXT (${kind}): ${v.verdict} | ${meta.displayName}: ${meta.description}`); continue; } | |
| 201 | + draft.push({ rank: r.rank, id: r.id, reason: `OK ${kind}: ${v.verdict}` }); | |
| 202 | + picked.push({ | |
| 203 | + id: r.id, namespace: meta.namespace, name: meta.name, version: meta.version, | |
| 204 | + displayName: String(meta.displayName || meta.name), kind, | |
| 205 | + description: { es: text[0], en: text[1] }, | |
| 206 | + downloads: Number(meta.downloadCount) || 0, rank: Number(r.rank), verified: !!meta.verified, | |
| 207 | + // what the panel needs to give its verdict with no request (vsix.js analyzeManifest) | |
| 208 | + analysis: { | |
| 209 | + hasCode: a.hasCode, browserEntry: a.browserEntry, categories: a.categories, sizes: a.sizes, webviews: a.webviews, | |
| 210 | + ignored: a.ignored, pack: a.pack, themeLabels: a.themeLabels, grammarLangs: a.grammarLangs, languageList: a.languageList, snippetLangs: a.snippetLangs, | |
| 211 | + }, | |
| 212 | + }); | |
| 213 | +} | |
| 214 | + | |
| 215 | +if (DRAFT) { | |
| 216 | + for (const d of draft) console.log(`${String(d.rank).padStart(5)} ${d.id.padEnd(55)} ${d.reason}`); | |
| 217 | + console.log(`\n${picked.length} would be picked; ${requests} requests`); | |
| 218 | + process.exit(0); | |
| 219 | +} | |
| 220 | +if (picked.length < N) throw new Error(`only ${picked.length} of ${N}: run with --draft and add TEXT entries`); | |
| 221 | +const top10 = new Set(picked.slice(0, 10).map(p => p.kind)); | |
| 222 | +if (top10.size < 3) console.warn(`warning: the top 10 has only ${[...top10].join(', ')}`); | |
| 223 | +const out = { | |
| 224 | + schema: 1, | |
| 225 | + note: 'Generated by tests/ext_popular_build.mjs from the Open VSX census; do not edit by hand.', | |
| 226 | + census: path.basename(path.dirname(CENSUS)) + '/' + path.basename(CENSUS), | |
| 227 | + items: picked, | |
| 228 | +}; | |
| 229 | +fs.writeFileSync(OUT, JSON.stringify(out, null, 1) + '\n'); | |
| 230 | +console.log(`${picked.length} entries → ${path.relative(ROOT, OUT)}; ${requests} requests`); | |
| 231 | +for (const p of picked) console.log(`${String(p.rank).padStart(5)} ${p.kind.padEnd(9)} ${p.id}`); |
modified tests/extensions.mjs +4 −1
| @@ -367,7 +367,10 @@ | ||
| 367 | 367 | await p.fill('#ext-q', 'fake'); |
| 368 | 368 | await p.press('#ext-q', 'Enter'); |
| 369 | 369 | const filaFalsa = p.locator('#ext-results .ext-row[data-id="elffuss-test.fake"]'); |
| 370 | -ok('búsqueda: el resultado llega y se anuncia («1 result»)', await hasta(async () => (await filaFalsa.count()) === 1 && (await p.textContent('#ext-status')) === '1 result'), await p.textContent('#ext-status')); | |
| 370 | +// con «Solo las que funcionan en Code» (encendido de serie) no se ve: no aplica nada | |
| 371 | +ok('búsqueda con el filtro: la que no hace nada queda oculta y se dice («1 hidden»)', await hasta(async () => (await filaFalsa.count()) === 1 && !(await filaFalsa.isVisible()) && (await p.textContent('#ext-status')) === '1 result · 1 hidden because it does not work in Code'), await p.textContent('#ext-status')); | |
| 372 | +await p.uncheck('#ext-only-works'); | |
| 373 | +ok('búsqueda: el resultado llega y se anuncia («1 result»)', await hasta(async () => (await filaFalsa.isVisible()) && (await p.textContent('#ext-status')) === '1 result'), await p.textContent('#ext-status')); | |
| 371 | 374 | ok('el botón dice que no hay nada que aplicar, con nombre propio para el lector', await hasta(async () => (await filaFalsa.locator('.ext-install').getAttribute('aria-label')) === 'Nothing to apply: Fake JSON'), await filaFalsa.locator('.ext-install').getAttribute('aria-label')); |
| 372 | 375 | await filaFalsa.locator('.ext-install').focus(); |
| 373 | 376 | await p.keyboard.press('Shift+Tab'); |
modified web/css/ext.css +11 −0
| @@ -87,3 +87,14 @@ | ||
| 87 | 87 | #ext-themepick .tp-item { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: none; border: none; color: var(--fg); padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: .84rem; } |
| 88 | 88 | #ext-themepick .tp-item.sel, #ext-themepick .tp-item:hover { background: rgba(130,114,255,.2); } |
| 89 | 89 | #ext-themepick .tp-item .muted { font-size: .72rem; color: var(--muted); } |
| 90 | +/* «Solo las que funcionan en Code», cuántas se ocultaron, populares */ | |
| 91 | +.ext-filter { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: .76rem; color: var(--fg); cursor: pointer; } | |
| 92 | +.ext-filter input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent2); cursor: pointer; } | |
| 93 | +.ext-filter input:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; } | |
| 94 | +.ext-row[hidden], .ext-hidden[hidden] { display: none; } | |
| 95 | +.ext-hidden { font-size: .74rem; margin: 2px 0 6px; overflow-wrap: anywhere; } | |
| 96 | +.ext-pop-note { margin: 0 0 6px; font-size: .74rem; line-height: 1.4; } | |
| 97 | +.ext-kind { font-size: .64rem; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); } | |
| 98 | +.ext-kind-theme { color: #d2a8ff; border-color: rgba(210,168,255,.4); } | |
| 99 | +.ext-kind-language { color: #79c0ff; border-color: rgba(121,192,255,.4); } | |
| 100 | +.ext-kind-snippets { color: #7ee787; border-color: rgba(126,231,135,.4); } |
modified web/js/ext/i18n.js +18 −0
| @@ -12,6 +12,15 @@ | ||
| 12 | 12 | vsix: 'Instalar .vsix…', themeBtn: 'Tema de color…', |
| 13 | 13 | installedH: 'Instaladas ({n})', none: 'Ninguna todavía. Busca arriba o instala un .vsix.', |
| 14 | 14 | popular: 'Populares', results: '{n} resultado|{n} resultados', noResults: 'Sin resultados.', searching: 'Buscando…', more: 'Más resultados', |
| 15 | + onlyWorks: 'Solo las que funcionan en Code', | |
| 16 | + hiddenN: '{n} oculta porque no funciona en Code|{n} ocultas porque no funcionan en Code', | |
| 17 | + showHidden: 'mostrar', showHiddenNamed: 'Mostrar también la que no funciona en Code|Mostrar también las {n} que no funcionan en Code', | |
| 18 | + checking: 'Comprobando cuáles funcionan en Code…', | |
| 19 | + noneWork: 'Ninguno de los resultados funciona en Code.', noneWorkYet: 'Ninguna de las {n} primeras funciona en Code.', | |
| 20 | + popularH: 'Populares que funcionan en Code', popularCount: '{n} extensión popular que funciona en Code|{n} extensiones populares que funcionan en Code', | |
| 21 | + popularNote: 'Se instalan y se ven al momento: temas de color, lenguajes que Code no resalta todavía y snippets. Busca arriba para ver el resto de Open VSX.', | |
| 22 | + popularFailed: 'No se pudo cargar la lista de populares. Busca arriba.', | |
| 23 | + kind_theme: 'Tema', kind_language: 'Lenguaje', kind_snippets: 'Snippets', | |
| 15 | 24 | install: 'Instalar', installing: 'Instalando…', downloading: 'Descargando… {pct}%', installedOk: 'Instalada ✓', update: 'Actualizar a {v}', |
| 16 | 25 | enable: 'Activar', disable: 'Desactivar', disabled: 'desactivada', uninstall: 'Desinstalar', confirmUninstall: '¿Desinstalar «{name}»?', |
| 17 | 26 | details: 'Detalles', loadingDetails: 'Leyendo el manifiesto…', |
| @@ -95,6 +104,15 @@ | ||
| 95 | 104 | vsix: 'Install .vsix…', themeBtn: 'Color Theme…', |
| 96 | 105 | installedH: 'Installed ({n})', none: 'None yet. Search above or install a .vsix.', |
| 97 | 106 | popular: 'Popular', results: '{n} result|{n} results', noResults: 'No results.', searching: 'Searching…', more: 'More results', |
| 107 | + onlyWorks: 'Only ones that work in Code', | |
| 108 | + hiddenN: '{n} hidden because it does not work in Code|{n} hidden because they do not work in Code', | |
| 109 | + showHidden: 'show', showHiddenNamed: 'Also show the one that does not work in Code|Also show the {n} that do not work in Code', | |
| 110 | + checking: 'Checking which ones work in Code…', | |
| 111 | + noneWork: 'None of the results works in Code.', noneWorkYet: 'None of the first {n} works in Code.', | |
| 112 | + popularH: 'Popular ones that work in Code', popularCount: '{n} popular extension that works in Code|{n} popular extensions that work in Code', | |
| 113 | + popularNote: 'They install and show at once: colour themes, languages Code does not highlight yet, and snippets. Search above for the rest of Open VSX.', | |
| 114 | + popularFailed: 'The popular list could not be loaded. Search above.', | |
| 115 | + kind_theme: 'Theme', kind_language: 'Language', kind_snippets: 'Snippets', | |
| 98 | 116 | install: 'Install', installing: 'Installing…', downloading: 'Downloading… {pct}%', installedOk: 'Installed ✓', update: 'Update to {v}', |
| 99 | 117 | enable: 'Enable', disable: 'Disable', disabled: 'disabled', uninstall: 'Uninstall', confirmUninstall: 'Uninstall “{name}”?', |
| 100 | 118 | details: 'Details', loadingDetails: 'Reading the manifest…', |
modified web/js/ext/openvsx.js +11 −2
| @@ -29,8 +29,17 @@ | ||
| 29 | 29 | } |
| 30 | 30 | const seg = s => encodeURIComponent(String(s)); |
| 31 | 31 | |
| 32 | +// «…/api/ns/name/<plataforma>/<versión>/file/x.vsix» → la plataforma, o '' | |
| 33 | +// (las publicadas por plataforma no tienen package.json en la ruta sin ella) | |
| 34 | +function plataformaDe(download) { | |
| 35 | + try { | |
| 36 | + const p = new URL(download).pathname.split('/').filter(Boolean); | |
| 37 | + return p[0] === 'api' && p.length === 7 && p[5] === 'file' && /^[a-z0-9-]+$/.test(p[3]) ? p[3] : ''; | |
| 38 | + } catch { return ''; } | |
| 39 | +} | |
| 32 | 40 | const resumen = e => ({ |
| 33 | 41 | namespace: String(e.namespace || ''), name: String(e.name || ''), version: String(e.version || ''), |
| 42 | + platform: plataformaDe(e.files?.download), | |
| 34 | 43 | displayName: String(e.displayName || e.name || ''), description: String(e.description || ''), |
| 35 | 44 | downloadCount: Number(e.downloadCount) || 0, verified: !!e.verified, deprecated: !!e.deprecated, |
| 36 | 45 | icon: (() => { try { const u = new URL(e.files?.icon); return ORIGENES_ICONO.has(u.origin) ? u.href : null; } catch { return null; } })(), |
| @@ -64,8 +73,8 @@ | ||
| 64 | 73 | |
| 65 | 74 | // El package.json de un resultado de búsqueda, sin pedir antes sus metadatos: |
| 66 | 75 | // una sola petición por fila para decir qué haría antes de instalarla. |
| 67 | -export function manifestOf({ namespace, name, version }, { signal } = {}) { | |
| 68 | - return getJson(`${BASE}/api/${seg(namespace)}/${seg(name)}/${seg(version)}/file/package.json`, signal); | |
| 76 | +export function manifestOf({ namespace, name, version, platform = '' }, { signal } = {}) { | |
| 77 | + return getJson(`${BASE}/api/${seg(namespace)}/${seg(name)}/${platform ? seg(platform) + '/' : ''}${seg(version)}/file/package.json`, signal); | |
| 69 | 78 | } |
| 70 | 79 | |
| 71 | 80 | export async function text(url, { signal, max = 200_000 } = {}) { |
modified web/js/ext/panel.js +183 −71
| @@ -8,7 +8,8 @@ | ||
| 8 | 8 | // <summary>), los resultados y avisos se anuncian (role=status/alert), el |
| 9 | 9 | // foco no se pierde al repintar ni al cerrar, y Escape cierra el panel. |
| 10 | 10 | import { tx } from './i18n.js'; |
| 11 | -import { describe, lista, listaO, esTexto } from './verdict.js'; | |
| 11 | +import { uiLang } from '../i18n.js'; | |
| 12 | +import { describe, lista, listaO, works, languageName, languageExts, factsFromManifest, factsFromRecord } from './verdict.js'; | |
| 12 | 13 | |
| 13 | 14 | const $ = id => document.getElementById(id); |
| 14 | 15 | const el = (tag, cls, txt) => { const e = document.createElement(tag); if (cls) e.className = cls; if (txt != null) e.textContent = txt; return e; }; |
| @@ -16,7 +17,15 @@ | ||
| 16 | 17 | |
| 17 | 18 | let host = null; |
| 18 | 19 | let cssPuesto = false; |
| 19 | -const estado = { q: '', cat: null, items: [], total: 0, cargando: false, msg: null, ctl: null }; | |
| 20 | +const estado = { q: '', cat: null, items: [], total: 0, cargando: false, msg: null, ctl: null, solo: leeSolo(), objetivo: 0, auto: 0 }; | |
| 21 | +// «Solo las que funcionan en Code»: encendido salvo que quien usa el panel lo | |
| 22 | +// apagara (se recuerda en este navegador, si se puede) | |
| 23 | +const CLAVE_SOLO = 'elffusscode.ext.onlyWorks'; | |
| 24 | +function leeSolo() { try { return localStorage.getItem(CLAVE_SOLO) !== '0'; } catch { return true; } } | |
| 25 | +function guardaSolo(v) { try { localStorage.setItem(CLAVE_SOLO, v ? '1' : '0'); } catch { /* sin almacenamiento: solo esta sesión */ } } | |
| 26 | +const POR_PAGINA = 20; // filas que se quieren ver por tanda | |
| 27 | +const MAX_AUTO = 3; // páginas que se piden solas para llenarla | |
| 28 | + | |
| 20 | 29 | let temporizador = null; |
| 21 | 30 | let desuscribe = null; |
| 22 | 31 | let abridor = null; // quién tenía el foco al abrir el panel |
| @@ -131,57 +140,10 @@ | ||
| 131 | 140 | // verdad se aplicaría aquí: la gramática de un lenguaje de serie sin Monarch |
| 132 | 141 | // (JSON) y la configuración de un lenguaje de serie no se aplican, y no cuentan. |
| 133 | 142 | // ── qué hace cada extensión, en llano (verdict.js) ── |
| 134 | -const BONITOS = { | |
| 135 | - javascript: 'JavaScript', typescript: 'TypeScript', javascriptreact: 'JavaScript React', typescriptreact: 'TypeScript React', | |
| 136 | - html: 'HTML', css: 'CSS', scss: 'SCSS', less: 'Less', json: 'JSON', jsonc: 'JSON', vue: 'Vue', python: 'Python', markdown: 'Markdown', | |
| 137 | - shellscript: 'Shell', go: 'Go', rust: 'Rust', java: 'Java', php: 'PHP', ruby: 'Ruby', csharp: 'C#', cpp: 'C++', c: 'C', yaml: 'YAML', | |
| 138 | -}; | |
| 139 | -function nombreLenguaje(id, langs = []) { | |
| 140 | - return langs.find(l => l.id === id && esTexto(l.name))?.name || host?.languageName?.(id) || BONITOS[id] || id; | |
| 141 | -} | |
| 142 | -function extsDe(id, langs = []) { | |
| 143 | - const propias = langs.filter(l => l.id === id).flatMap(l => l.extensions || []); | |
| 144 | - return [...new Set(propias.length ? propias : host?.languageExtensions?.(id) || [])]; | |
| 145 | -} | |
| 146 | -// Hechos comunes a un package.json (antes de instalar) y a un registro instalado. | |
| 147 | -function hechos(base, { themes = [], grammarLangs = [], langs = [], snippets = [] }) { | |
| 148 | - const salta = l => !!host.grammarSkippedFor?.(l); | |
| 149 | - const deSerie = id => !!host.builtinLanguage?.(id); | |
| 150 | - const conGram = [...new Set(grammarLangs.filter(l => l && !salta(l)))]; | |
| 151 | - // snippets de un lenguaje que Code no tiene (javascriptreact, vue…) no | |
| 152 | - // saldrían nunca: ni se cuentan ni se prometen. Y un mismo fichero que sirve | |
| 153 | - // a varios lenguajes se cuenta una vez. | |
| 154 | - const existe = id => langs.some(l => l.id === id) || !!host.languageName?.(id) || !!host.builtinLanguage?.(id); | |
| 155 | - const porLang = new Map(); | |
| 156 | - const vistos = new Set(); | |
| 157 | - for (const s of snippets.filter(x => existe(x.language))) { | |
| 158 | - const n = !Number.isFinite(s.count) ? NaN : s.key && vistos.has(s.key) ? 0 : s.count; | |
| 159 | - if (s.key) vistos.add(s.key); | |
| 160 | - porLang.set(s.language, (porLang.has(s.language) ? porLang.get(s.language) : 0) + n); | |
| 161 | - } | |
| 162 | - return { | |
| 163 | - ...base, themes, | |
| 164 | - highlight: conGram.map(id => ({ id, name: nombreLenguaje(id, langs), exts: extsDe(id, langs) })), | |
| 165 | - settingsOnly: langs.filter(l => l.config && !deSerie(l.id) && !conGram.includes(l.id)).map(l => nombreLenguaje(l.id, langs)), | |
| 166 | - keepsBuiltin: [...new Set(grammarLangs.filter(l => l && salta(l)))].map(id => nombreLenguaje(id, langs)), | |
| 167 | - snippets: [...porLang].map(([id, n]) => ({ id, name: nombreLenguaje(id, langs), count: Number.isFinite(n) ? n : null })), | |
| 168 | - }; | |
| 169 | -} | |
| 170 | -function hechosDeManifiesto(a) { | |
| 171 | - return hechos({ hasCode: a.hasCode, browserEntry: a.browserEntry, categories: a.categories || [], sizes: a.sizes || {}, webviews: a.webviews, ignored: a.ignored || [], pack: a.pack || [] }, { | |
| 172 | - themes: a.themeLabels || [], grammarLangs: a.grammarLangs || [], langs: a.languageList || [], | |
| 173 | - snippets: (a.snippetLangs || []).map(language => ({ language, count: null })), | |
| 174 | - }); | |
| 175 | -} | |
| 176 | -function hechosDeRegistro(e) { | |
| 177 | - // registros de antes de guardar categorías: se asume que lo que se aplica es lo principal | |
| 178 | - const categories = e.categories || ['Programming Languages']; | |
| 179 | - return hechos({ hasCode: e.hasCode, browserEntry: !!e.browserEntry, categories, sizes: e.sizes || {}, webviews: e.webviews, ignored: e.ignored || [], pack: e.pack || [] }, { | |
| 180 | - themes: (e.themes || []).map(t => t.label), grammarLangs: (e.grammars || []).map(g => g.language ?? null), | |
| 181 | - langs: (e.languages || []).map(l => ({ id: l.id, name: l.aliases?.[0], extensions: l.extensions || [], config: !!l.configKey })), | |
| 182 | - snippets: (e.snippets || []).map(s => ({ language: s.language, key: s.key, count: Number.isFinite(s.count) ? s.count : null })), | |
| 183 | - }); | |
| 184 | -} | |
| 143 | +const nombreLenguaje = (id, langs = []) => languageName(host, id, langs); | |
| 144 | +const extsDe = (id, langs = []) => languageExts(host, id, langs); | |
| 145 | +const hechosDeManifiesto = a => factsFromManifest(host, a); | |
| 146 | +const hechosDeRegistro = e => factsFromRecord(host, e); | |
| 185 | 147 | // El bloque del veredicto: primero la frase que decide, luego el detalle. |
| 186 | 148 | function bloqueVeredicto(f, v, { principal = true } = {}) { |
| 187 | 149 | const box = el('div', 'ext-verdict ext-v-' + v.kind); |
| @@ -279,6 +241,14 @@ | ||
| 279 | 241 | } |
| 280 | 242 | busca.append(inp, chips); |
| 281 | 243 | wrap.appendChild(busca); |
| 244 | + const filtro = el('label', 'ext-filter'); | |
| 245 | + const solo = el('input'); | |
| 246 | + solo.type = 'checkbox'; | |
| 247 | + solo.id = 'ext-only-works'; | |
| 248 | + solo.checked = estado.solo; | |
| 249 | + solo.onchange = () => ponSolo(solo.checked); | |
| 250 | + filtro.append(solo, el('span', null, tx('onlyWorks'))); | |
| 251 | + wrap.appendChild(filtro); | |
| 282 | 252 | |
| 283 | 253 | const msg = el('div', 'ext-msg'); |
| 284 | 254 | msg.id = 'ext-msg'; |
| @@ -308,35 +278,160 @@ | ||
| 308 | 278 | estado.ctl?.abort(); |
| 309 | 279 | const ctl = new AbortController(); |
| 310 | 280 | estado.ctl = ctl; |
| 311 | - const ovsx = await import('./openvsx.js'); | |
| 312 | - if (!estado.q && estado.cat == null) { estado.items = []; estado.total = 0; pintaResultados(); return; } | |
| 313 | - estado.cargando = true; | |
| 314 | - if (!mas) { estado.items = []; estado.total = 0; } | |
| 315 | - aviso(null); | |
| 316 | - pintaResultados(); | |
| 317 | 281 | // solo las categorías: las fichas de tema de «Instaladas» también son .ext-chip |
| 318 | 282 | for (const c of document.querySelectorAll('#ext-panel .ext-search .ext-chip')) { |
| 319 | 283 | const on = c.dataset.cat === (estado.cat || '') && estado.cat != null; |
| 320 | 284 | c.classList.toggle('on', on); |
| 321 | 285 | c.setAttribute('aria-pressed', String(on)); |
| 322 | 286 | } |
| 287 | + if (!mas) { estado.objetivo = POR_PAGINA; estado.auto = 0; } | |
| 288 | + // sin buscar nada: la lista de populares que funcionan, ya calculada | |
| 289 | + if (mostrandoPopulares()) { estado.items = []; estado.total = 0; estado.cargando = false; pintaResultados(); return; } | |
| 290 | + const ovsx = await import('./openvsx.js'); | |
| 291 | + if (estado.ctl !== ctl) return; | |
| 292 | + estado.cargando = true; | |
| 293 | + if (!mas) { estado.items = []; estado.total = 0; } | |
| 294 | + aviso(null); | |
| 295 | + if (mas) pintaPie(); else pintaResultados(); | |
| 296 | + let nuevos = null; | |
| 323 | 297 | try { |
| 324 | - const r = await ovsx.search(estado.q, { category: estado.cat || '', offset: mas ? estado.items.length : 0, size: 20, signal: ctl.signal }); | |
| 298 | + const r = await ovsx.search(estado.q, { category: estado.cat || '', offset: mas ? estado.items.length : 0, size: POR_PAGINA, signal: ctl.signal }); | |
| 325 | 299 | if (estado.ctl !== ctl) return; |
| 326 | - estado.items = mas ? estado.items.concat(r.items) : r.items; | |
| 327 | - estado.total = r.total; | |
| 300 | + // (una extensión puede repetirse entre páginas si cambia el orden) | |
| 301 | + const ya = new Set(estado.items.map(claveDe)); | |
| 302 | + nuevos = mas ? r.items.filter(it => !ya.has(claveDe(it))) : r.items; | |
| 303 | + estado.items = mas ? estado.items.concat(nuevos) : r.items; | |
| 304 | + estado.total = mas && !r.items.length ? estado.items.length : r.total; | |
| 328 | 305 | } catch (e) { |
| 329 | 306 | if (e.name === 'AbortError') return; |
| 330 | 307 | aviso(textoError(e), true); |
| 331 | 308 | } finally { |
| 332 | - if (estado.ctl === ctl) { estado.cargando = false; pintaResultados(); } | |
| 309 | + if (estado.ctl === ctl) { | |
| 310 | + estado.cargando = false; | |
| 311 | + if (mas && $('ext-list')) { if (nuevos) añadeFilas(nuevos); pintaPie(); } else pintaResultados(); | |
| 312 | + } | |
| 313 | + } | |
| 314 | +} | |
| 315 | +const mostrandoPopulares = () => !estado.q && !estado.cat; | |
| 316 | + | |
| 317 | +// ── «Solo las que funcionan en Code» ── | |
| 318 | +// Lo que se sabe de cada resultado: true (funciona), false (no hace nada aquí), | |
| 319 | +// null (no se pudo leer su package.json: se enseña, sin veredicto). Sin | |
| 320 | +// entrada: todavía se está mirando. | |
| 321 | +const veredictos = new Map(); | |
| 322 | +function ponSolo(v) { | |
| 323 | + estado.solo = v; | |
| 324 | + guardaSolo(v); | |
| 325 | + const cb = $('ext-only-works'); | |
| 326 | + if (cb) cb.checked = v; | |
| 327 | + for (const row of document.querySelectorAll('#ext-list .ext-row')) filtraFila(row); | |
| 328 | + pintaPie(); | |
| 329 | +} | |
| 330 | +function filtraFila(row) { | |
| 331 | + const w = veredictos.get(row.dataset.key); | |
| 332 | + row.hidden = estado.solo && !row.dataset.popular && (w === undefined || w === false); | |
| 333 | +} | |
| 334 | +function cuentas() { | |
| 335 | + let pendientes = 0, ocultas = 0, visibles = 0; | |
| 336 | + for (const it of estado.items) { | |
| 337 | + const w = veredictos.get(claveDe(it)); | |
| 338 | + if (w === undefined) pendientes++; | |
| 339 | + else if (w === false) ocultas++; | |
| 340 | + else visibles++; | |
| 341 | + } | |
| 342 | + return { pendientes, ocultas, visibles: estado.solo ? visibles : estado.items.length }; | |
| 343 | +} | |
| 344 | +let piePendiente = false; | |
| 345 | +function programaPie() { | |
| 346 | + if (piePendiente) return; | |
| 347 | + piePendiente = true; | |
| 348 | + queueMicrotask(() => { piePendiente = false; pintaPie(); }); | |
| 349 | +} | |
| 350 | +// Debajo de la lista: cuántas se ocultaron (con «mostrar»), «comprobando…», | |
| 351 | +// «más resultados»; y si faltan filas para llenar la tanda, pide otra página. | |
| 352 | +function pintaPie() { | |
| 353 | + const pie = $('ext-foot'), ocultasBox = $('ext-hidden'); | |
| 354 | + if (!pie || !ocultasBox || mostrandoPopulares()) return; | |
| 355 | + const teniaFoco = pie.contains(document.activeElement) || ocultasBox.contains(document.activeElement); | |
| 356 | + const { pendientes, ocultas, visibles } = cuentas(); | |
| 357 | + const quedan = estado.items.length < estado.total; | |
| 358 | + ocultasBox.replaceChildren(); | |
| 359 | + ocultasBox.hidden = !(estado.solo && ocultas); | |
| 360 | + if (estado.solo && ocultas) { | |
| 361 | + ocultasBox.append(tx('hiddenN', { n: ocultas }) + ' · '); | |
| 362 | + const b = el('button', 'ext-link', tx('showHidden')); | |
| 363 | + b.type = 'button'; | |
| 364 | + b.id = 'ext-show-hidden'; | |
| 365 | + b.setAttribute('aria-label', tx('showHiddenNamed', { n: ocultas })); | |
| 366 | + b.onclick = () => { ponSolo(false); $('ext-only-works')?.focus(); }; | |
| 367 | + ocultasBox.appendChild(b); | |
| 368 | + } | |
| 369 | + // ¿llenar la tanda? solo con el filtro, cuando ya se sabe todo lo pedido | |
| 370 | + const llenando = estado.solo && !pendientes && visibles < estado.objetivo && quedan && !estado.cargando && estado.auto < MAX_AUTO; | |
| 371 | + pie.replaceChildren(); | |
| 372 | + if (estado.cargando || (estado.solo && pendientes) || llenando) pie.appendChild(el('div', 'muted ext-hint', tx(estado.solo ? 'checking' : 'searching'))); | |
| 373 | + else if (estado.solo && !visibles && estado.items.length) pie.appendChild(el('div', 'muted ext-hint', tx(quedan ? 'noneWorkYet' : 'noneWork', { n: estado.items.length }))); | |
| 374 | + if (!estado.cargando && !llenando && quedan) { | |
| 375 | + const mas = el('button', 'ghost ext-more', tx('more')); | |
| 376 | + mas.type = 'button'; | |
| 377 | + mas.id = 'ext-more'; | |
| 378 | + mas.onclick = () => { estado.objetivo = cuentas().visibles + POR_PAGINA; estado.auto = 0; busca_({ mas: true }); }; | |
| 379 | + pie.appendChild(mas); | |
| 380 | + if (teniaFoco) mas.focus(); | |
| 381 | + } else if (teniaFoco && !ocultasBox.contains(document.activeElement)) { | |
| 382 | + // el botón que tenía el foco ya no está: a la primera fila que se ve | |
| 383 | + ([...document.querySelectorAll('#ext-list .ext-row:not([hidden]) .ext-name')].pop() || $('ext-only-works'))?.focus(); | |
| 384 | + } | |
| 385 | + if (!pendientes && !estado.cargando) { | |
| 386 | + anunciaBusqueda(tx('results', { n: estado.total }) + (estado.solo && ocultas ? ' · ' + tx('hiddenN', { n: ocultas }) : '')); | |
| 387 | + } | |
| 388 | + if (llenando) { estado.auto++; busca_({ mas: true }); } | |
| 389 | +} | |
| 390 | + | |
| 391 | +// ── populares: una lista corta, ya comprobada (popular.json, generada por | |
| 392 | +// tests/ext_popular_build.mjs), que se pinta al instante y sin pedir nada a | |
| 393 | +// Open VSX: el veredicto de cada una va dentro ── | |
| 394 | +let populares = null, cargaPop = null; | |
| 395 | +function cargaPopulares() { | |
| 396 | + cargaPop ||= fetch(new URL('./popular.json', import.meta.url)).then(r => { if (!r.ok) throw new Error(String(r.status)); return r.json(); }) | |
| 397 | + .then(j => { populares = (j.items || []).map(p => ({ ...p, it: itemPopular(p) })); for (const p of populares) analisis.set(claveDe(p.it), Promise.resolve(p.analysis)); }) | |
| 398 | + .catch(e => { cargaPop = null; throw e; }); | |
| 399 | + return cargaPop; | |
| 400 | +} | |
| 401 | +function itemPopular(p) { | |
| 402 | + return { | |
| 403 | + namespace: p.namespace, name: p.name, version: p.version, displayName: p.displayName, | |
| 404 | + description: p.description?.[uiLang()] || p.description?.en || '', downloadCount: p.downloads || 0, verified: !!p.verified, icon: null, | |
| 405 | + }; | |
| 406 | +} | |
| 407 | +function pintaPopulares(res) { | |
| 408 | + if (!populares) { | |
| 409 | + res.appendChild(el('div', 'muted ext-hint', tx('searching'))); | |
| 410 | + cargaPopulares().then(() => { if (mostrandoPopulares()) pintaResultados(); }) | |
| 411 | + .catch(() => { if (mostrandoPopulares()) { res.replaceChildren(el('div', 'muted ext-hint', tx('popularFailed'))); } }); | |
| 412 | + return; | |
| 413 | + } | |
| 414 | + const h = el('div', 'sk-h', tx('popularH')); | |
| 415 | + h.id = 'ext-popular-h'; | |
| 416 | + res.append(h, el('p', 'muted ext-pop-note', tx('popularNote'))); | |
| 417 | + const lista = el('div', 'ext-list ext-popular'); | |
| 418 | + lista.id = 'ext-list'; | |
| 419 | + lista.setAttribute('aria-labelledby', 'ext-popular-h'); | |
| 420 | + const instaladas = new Map(host.list().map(e => [e.id, e])); | |
| 421 | + for (const p of populares) { | |
| 422 | + const row = filaResultado(p.it, instaladas.get(p.id.toLowerCase()), { kind: p.kind }); | |
| 423 | + row.dataset.popular = '1'; | |
| 424 | + lista.appendChild(row); | |
| 333 | 425 | } |
| 426 | + res.appendChild(lista); | |
| 427 | + anunciaBusqueda(tx('popularCount', { n: populares.length })); | |
| 334 | 428 | } |
| 335 | 429 | |
| 336 | 430 | function pintaResultados() { |
| 337 | 431 | const res = $('ext-results'); |
| 338 | 432 | if (!res) return; |
| 339 | 433 | res.replaceChildren(); |
| 434 | + if (mostrandoPopulares()) { pintaPopulares(res); return; } | |
| 340 | 435 | if (estado.cargando && !estado.items.length) { |
| 341 | 436 | res.appendChild(el('div', 'muted ext-hint', tx('searching'))); |
| 342 | 437 | anunciaBusqueda(tx('searching')); |
| @@ -351,13 +446,25 @@ | ||
| 351 | 446 | return; |
| 352 | 447 | } |
| 353 | 448 | res.appendChild(el('div', 'sk-h', estado.q ? tx('results', { n: estado.total }) : tx('popular'))); |
| 354 | - anunciaBusqueda(tx('results', { n: estado.total })); | |
| 449 | + const lista = el('div', 'ext-list'); | |
| 450 | + lista.id = 'ext-list'; | |
| 451 | + const ocultas = el('div', 'muted ext-hidden'); | |
| 452 | + ocultas.id = 'ext-hidden'; | |
| 453 | + ocultas.hidden = true; | |
| 454 | + const pie = el('div', 'ext-foot'); | |
| 455 | + pie.id = 'ext-foot'; | |
| 456 | + res.append(ocultas, lista, pie); | |
| 457 | + añadeFilas(estado.items); | |
| 458 | + pintaPie(); | |
| 459 | +} | |
| 460 | +function añadeFilas(items) { | |
| 461 | + const lista = $('ext-list'); | |
| 462 | + if (!lista) return; | |
| 355 | 463 | const instaladas = new Map(host.list().map(e => [e.id, e])); |
| 356 | - for (const it of estado.items) res.appendChild(filaResultado(it, instaladas.get(`${it.namespace}.${it.name}`.toLowerCase()))); | |
| 357 | - if (estado.items.length < estado.total) { | |
| 358 | - const mas = el('button', 'ghost ext-more', tx('more')); | |
| 359 | - mas.onclick = () => busca_({ mas: true }); | |
| 360 | - res.appendChild(mas); | |
| 464 | + for (const it of items) { | |
| 465 | + const row = filaResultado(it, instaladas.get(`${it.namespace}.${it.name}`.toLowerCase())); | |
| 466 | + filtraFila(row); | |
| 467 | + lista.appendChild(row); | |
| 361 | 468 | } |
| 362 | 469 | } |
| 363 | 470 | |
| @@ -417,9 +524,10 @@ | ||
| 417 | 524 | return v; |
| 418 | 525 | } |
| 419 | 526 | |
| 420 | -function filaResultado(it, instalada) { | |
| 527 | +function filaResultado(it, instalada, { kind = null } = {}) { | |
| 421 | 528 | const row = el('div', 'ext-row'); |
| 422 | 529 | row.dataset.id = `${it.namespace}.${it.name}`; |
| 530 | + row.dataset.key = claveDe(it); | |
| 423 | 531 | const main = el('div', 'ext-main'); |
| 424 | 532 | const det = el('div', 'ext-detail'); |
| 425 | 533 | det.id = 'ext-det-' + (++nDetalle); |
| @@ -433,6 +541,7 @@ | ||
| 433 | 541 | nombre.onclick = e => { e.stopPropagation(); detalle(it, det, nombre); }; |
| 434 | 542 | t.append(nombre, el('span', 'muted', ` ${it.namespace} · v${it.version}`)); |
| 435 | 543 | if (it.verified) t.appendChild(el('span', 'ext-badge', '✓')); |
| 544 | + if (kind) { row.dataset.kind = kind; t.appendChild(el('span', 'ext-kind ext-kind-' + kind, tx('kind_' + kind))); } | |
| 436 | 545 | main.append(t, el('div', 'ext-desc', it.description)); |
| 437 | 546 | main.appendChild(el('div', 'ext-verdict-slot')); |
| 438 | 547 | main.appendChild(el('div', 'ext-meta muted', tx('downloads', { n: it.downloadCount.toLocaleString() }))); |
| @@ -451,7 +560,10 @@ | ||
| 451 | 560 | b.onclick = e => { e.stopPropagation(); if (!esInerte(b)) instala(it, b); }; |
| 452 | 561 | acc.appendChild(b); |
| 453 | 562 | row.append(icono(it.icon, it.displayName), main, acc); |
| 454 | - analiza(it).then(a => pintaVeredictoFila(row, it, a, instalada)).catch(() => { /* sin veredicto: el botón de siempre */ }); | |
| 563 | + const k = claveDe(it); | |
| 564 | + analiza(it).then(a => { veredictos.set(k, works(pintaVeredictoFila(row, it, a, instalada))); }) | |
| 565 | + .catch(() => { if (!veredictos.has(k)) veredictos.set(k, null); }) // sin veredicto: el botón de siempre | |
| 566 | + .finally(() => { filtraFila(row); programaPie(); }); | |
| 455 | 567 | return row; |
| 456 | 568 | } |
| 457 | 569 |
added web/js/ext/popular.json +1556 −0
| @@ -0,0 +1,1556 @@ | ||
| 1 | +{ | |
| 2 | + "schema": 1, | |
| 3 | + "note": "Generated by tests/ext_popular_build.mjs from the Open VSX census; do not edit by hand.", | |
| 4 | + "census": "catalog-census/extensions.tsv", | |
| 5 | + "items": [ | |
| 6 | + { | |
| 7 | + "id": "EricSia.pythonsnippets3", | |
| 8 | + "namespace": "EricSia", | |
| 9 | + "name": "pythonsnippets3", | |
| 10 | + "version": "3.3.18", | |
| 11 | + "displayName": "Python Snippets 3", | |
| 12 | + "kind": "snippets", | |
| 13 | + "description": { | |
| 14 | + "es": "Snippets de Python: bucles, clases, funciones y más con un prefijo.", | |
| 15 | + "en": "Python snippets: loops, classes, functions and more from a prefix." | |
| 16 | + }, | |
| 17 | + "downloads": 11952089, | |
| 18 | + "rank": 23, | |
| 19 | + "verified": true, | |
| 20 | + "analysis": { | |
| 21 | + "hasCode": false, | |
| 22 | + "browserEntry": false, | |
| 23 | + "categories": [ | |
| 24 | + "Snippets", | |
| 25 | + "Extension Packs", | |
| 26 | + "Data Science", | |
| 27 | + "Machine Learning", | |
| 28 | + "Education", | |
| 29 | + "Testing", | |
| 30 | + "Other" | |
| 31 | + ], | |
| 32 | + "sizes": { | |
| 33 | + "snippets": 22 | |
| 34 | + }, | |
| 35 | + "webviews": false, | |
| 36 | + "ignored": [], | |
| 37 | + "pack": [], | |
| 38 | + "themeLabels": [], | |
| 39 | + "grammarLangs": [], | |
| 40 | + "languageList": [], | |
| 41 | + "snippetLangs": [ | |
| 42 | + "python", | |
| 43 | + "django-html", | |
| 44 | + "django-txt" | |
| 45 | + ] | |
| 46 | + } | |
| 47 | + }, | |
| 48 | + { | |
| 49 | + "id": "gitpod.gitpod-theme", | |
| 50 | + "namespace": "gitpod", | |
| 51 | + "name": "gitpod-theme", | |
| 52 | + "version": "0.0.2", | |
| 53 | + "displayName": "Gitpod Theme", | |
| 54 | + "kind": "theme", | |
| 55 | + "description": { | |
| 56 | + "es": "Los temas de Gitpod, claro y oscuro, de tonos suaves.", | |
| 57 | + "en": "Gitpod's soft light and dark themes." | |
| 58 | + }, | |
| 59 | + "downloads": 461902, | |
| 60 | + "rank": 210, | |
| 61 | + "verified": true, | |
| 62 | + "analysis": { | |
| 63 | + "hasCode": false, | |
| 64 | + "browserEntry": false, | |
| 65 | + "categories": [ | |
| 66 | + "Themes" | |
| 67 | + ], | |
| 68 | + "sizes": { | |
| 69 | + "themes": 2 | |
| 70 | + }, | |
| 71 | + "webviews": false, | |
| 72 | + "ignored": [], | |
| 73 | + "pack": [], | |
| 74 | + "themeLabels": [ | |
| 75 | + "Gitpod Dark", | |
| 76 | + "Gitpod Light" | |
| 77 | + ], | |
| 78 | + "grammarLangs": [], | |
| 79 | + "languageList": [], | |
| 80 | + "snippetLangs": [] | |
| 81 | + } | |
| 82 | + }, | |
| 83 | + { | |
| 84 | + "id": "dracula-theme.theme-dracula", | |
| 85 | + "namespace": "dracula-theme", | |
| 86 | + "name": "theme-dracula", | |
| 87 | + "version": "2.25.1", | |
| 88 | + "displayName": "Dracula Theme Official", | |
| 89 | + "kind": "theme", | |
| 90 | + "description": { | |
| 91 | + "es": "Dracula: el tema oscuro de fondo morado y colores vivos.", | |
| 92 | + "en": "Dracula: the dark theme with a purple background and vivid colours." | |
| 93 | + }, | |
| 94 | + "downloads": 433464, | |
| 95 | + "rank": 222, | |
| 96 | + "verified": true, | |
| 97 | + "analysis": { | |
| 98 | + "hasCode": false, | |
| 99 | + "browserEntry": false, | |
| 100 | + "categories": [ | |
| 101 | + "Themes" | |
| 102 | + ], | |
| 103 | + "sizes": { | |
| 104 | + "themes": 2 | |
| 105 | + }, | |
| 106 | + "webviews": false, | |
| 107 | + "ignored": [], | |
| 108 | + "pack": [], | |
| 109 | + "themeLabels": [ | |
| 110 | + "Dracula Theme", | |
| 111 | + "Dracula Theme Soft" | |
| 112 | + ], | |
| 113 | + "grammarLangs": [], | |
| 114 | + "languageList": [], | |
| 115 | + "snippetLangs": [] | |
| 116 | + } | |
| 117 | + }, | |
| 118 | + { | |
| 119 | + "id": "GitHub.github-vscode-theme", | |
| 120 | + "namespace": "GitHub", | |
| 121 | + "name": "github-vscode-theme", | |
| 122 | + "version": "6.3.5", | |
| 123 | + "displayName": "GitHub Theme", | |
| 124 | + "kind": "theme", | |
| 125 | + "description": { | |
| 126 | + "es": "Los temas de GitHub, claros y oscuros, también de alto contraste.", | |
| 127 | + "en": "GitHub's light and dark themes, high-contrast ones included." | |
| 128 | + }, | |
| 129 | + "downloads": 418861, | |
| 130 | + "rank": 228, | |
| 131 | + "verified": true, | |
| 132 | + "analysis": { | |
| 133 | + "hasCode": false, | |
| 134 | + "browserEntry": false, | |
| 135 | + "categories": [ | |
| 136 | + "Themes" | |
| 137 | + ], | |
| 138 | + "sizes": { | |
| 139 | + "themes": 9 | |
| 140 | + }, | |
| 141 | + "webviews": false, | |
| 142 | + "ignored": [], | |
| 143 | + "pack": [], | |
| 144 | + "themeLabels": [ | |
| 145 | + "GitHub Light Default", | |
| 146 | + "GitHub Light High Contrast", | |
| 147 | + "GitHub Light Colorblind (Beta)", | |
| 148 | + "GitHub Dark Default", | |
| 149 | + "GitHub Dark High Contrast", | |
| 150 | + "GitHub Dark Colorblind (Beta)", | |
| 151 | + "GitHub Dark Dimmed", | |
| 152 | + "GitHub Light", | |
| 153 | + "GitHub Dark" | |
| 154 | + ], | |
| 155 | + "grammarLangs": [], | |
| 156 | + "languageList": [], | |
| 157 | + "snippetLangs": [] | |
| 158 | + } | |
| 159 | + }, | |
| 160 | + { | |
| 161 | + "id": "xabikos.JavaScriptSnippets", | |
| 162 | + "namespace": "xabikos", | |
| 163 | + "name": "JavaScriptSnippets", | |
| 164 | + "version": "1.8.0", | |
| 165 | + "displayName": "JavaScript (ES6) code snippets", | |
| 166 | + "kind": "snippets", | |
| 167 | + "description": { | |
| 168 | + "es": "Snippets de JavaScript y TypeScript: imports, funciones flecha, console.log…", | |
| 169 | + "en": "JavaScript and TypeScript snippets: imports, arrow functions, console.log…" | |
| 170 | + }, | |
| 171 | + "downloads": 369882, | |
| 172 | + "rank": 256, | |
| 173 | + "verified": true, | |
| 174 | + "analysis": { | |
| 175 | + "hasCode": false, | |
| 176 | + "browserEntry": false, | |
| 177 | + "categories": [ | |
| 178 | + "Snippets" | |
| 179 | + ], | |
| 180 | + "sizes": { | |
| 181 | + "snippets": 6 | |
| 182 | + }, | |
| 183 | + "webviews": false, | |
| 184 | + "ignored": [], | |
| 185 | + "pack": [], | |
| 186 | + "themeLabels": [], | |
| 187 | + "grammarLangs": [], | |
| 188 | + "languageList": [], | |
| 189 | + "snippetLangs": [ | |
| 190 | + "javascript", | |
| 191 | + "typescript", | |
| 192 | + "javascriptreact", | |
| 193 | + "typescriptreact", | |
| 194 | + "html", | |
| 195 | + "vue" | |
| 196 | + ] | |
| 197 | + } | |
| 198 | + }, | |
| 199 | + { | |
| 200 | + "id": "wholroyd.jinja", | |
| 201 | + "namespace": "wholroyd", | |
| 202 | + "name": "jinja", | |
| 203 | + "version": "0.0.10", | |
| 204 | + "displayName": "Jinja", | |
| 205 | + "kind": "language", | |
| 206 | + "description": { | |
| 207 | + "es": "Resalta plantillas Jinja (.j2, .jinja), también dentro de HTML y YAML.", | |
| 208 | + "en": "Highlights Jinja templates (.j2, .jinja), inside HTML and YAML too." | |
| 209 | + }, | |
| 210 | + "downloads": 335739, | |
| 211 | + "rank": 281, | |
| 212 | + "verified": true, | |
| 213 | + "analysis": { | |
| 214 | + "hasCode": false, | |
| 215 | + "browserEntry": false, | |
| 216 | + "categories": [ | |
| 217 | + "Programming Languages", | |
| 218 | + "Snippets" | |
| 219 | + ], | |
| 220 | + "sizes": { | |
| 221 | + "configurationDefaults": 1, | |
| 222 | + "snippets": 3, | |
| 223 | + "languages": 3, | |
| 224 | + "grammars": 3 | |
| 225 | + }, | |
| 226 | + "webviews": false, | |
| 227 | + "ignored": [ | |
| 228 | + { | |
| 229 | + "key": "configurationDefaults", | |
| 230 | + "why": "later" | |
| 231 | + } | |
| 232 | + ], | |
| 233 | + "pack": [], | |
| 234 | + "themeLabels": [], | |
| 235 | + "grammarLangs": [ | |
| 236 | + "jinja-html", | |
| 237 | + "jinja-yaml", | |
| 238 | + "jinja" | |
| 239 | + ], | |
| 240 | + "languageList": [ | |
| 241 | + { | |
| 242 | + "id": "jinja-html", | |
| 243 | + "config": true, | |
| 244 | + "name": "Jinja HTML", | |
| 245 | + "extensions": [ | |
| 246 | + ".html.j2", | |
| 247 | + ".html.jinja", | |
| 248 | + ".html.jinja2" | |
| 249 | + ] | |
| 250 | + }, | |
| 251 | + { | |
| 252 | + "id": "jinja-yaml", | |
| 253 | + "config": true, | |
| 254 | + "name": "Jinja YAML", | |
| 255 | + "extensions": [ | |
| 256 | + ".yml.j2", | |
| 257 | + ".yml.jinja", | |
| 258 | + ".yml.jinja2", | |
| 259 | + ".yaml.j2", | |
| 260 | + ".yaml.jinja", | |
| 261 | + ".yaml.jinja2", | |
| 262 | + ".sls" | |
| 263 | + ] | |
| 264 | + }, | |
| 265 | + { | |
| 266 | + "id": "jinja", | |
| 267 | + "config": true, | |
| 268 | + "name": "Jinja", | |
| 269 | + "extensions": [ | |
| 270 | + ".j2", | |
| 271 | + ".jinja", | |
| 272 | + ".jinja2" | |
| 273 | + ] | |
| 274 | + } | |
| 275 | + ], | |
| 276 | + "snippetLangs": [ | |
| 277 | + "jinja", | |
| 278 | + "jinja-html", | |
| 279 | + "jinja-yaml" | |
| 280 | + ] | |
| 281 | + } | |
| 282 | + }, | |
| 283 | + { | |
| 284 | + "id": "mikestead.dotenv", | |
| 285 | + "namespace": "mikestead", | |
| 286 | + "name": "dotenv", | |
| 287 | + "version": "1.0.1", | |
| 288 | + "displayName": "DotENV", | |
| 289 | + "kind": "language", | |
| 290 | + "description": { | |
| 291 | + "es": "Resalta los ficheros .env de variables de entorno.", | |
| 292 | + "en": "Highlights .env files of environment variables." | |
| 293 | + }, | |
| 294 | + "downloads": 303370, | |
| 295 | + "rank": 327, | |
| 296 | + "verified": true, | |
| 297 | + "analysis": { | |
| 298 | + "hasCode": false, | |
| 299 | + "browserEntry": false, | |
| 300 | + "categories": [ | |
| 301 | + "Languages" | |
| 302 | + ], | |
| 303 | + "sizes": { | |
| 304 | + "languages": 1, | |
| 305 | + "grammars": 1 | |
| 306 | + }, | |
| 307 | + "webviews": false, | |
| 308 | + "ignored": [], | |
| 309 | + "pack": [], | |
| 310 | + "themeLabels": [], | |
| 311 | + "grammarLangs": [ | |
| 312 | + "dotenv" | |
| 313 | + ], | |
| 314 | + "languageList": [ | |
| 315 | + { | |
| 316 | + "id": "dotenv", | |
| 317 | + "config": true, | |
| 318 | + "name": "Environment Variables", | |
| 319 | + "extensions": [ | |
| 320 | + ".flaskenv", | |
| 321 | + ".env", | |
| 322 | + ".env-sample", | |
| 323 | + ".env.example", | |
| 324 | + ".env.local", | |
| 325 | + ".env.dev", | |
| 326 | + ".env.dev.local", | |
| 327 | + ".env.build", | |
| 328 | + ".env.build.local", | |
| 329 | + ".env.development", | |
| 330 | + ".env.development.local", | |
| 331 | + ".env.test", | |
| 332 | + ".env.test.local", | |
| 333 | + ".env.testing", | |
| 334 | + ".env.qa", | |
| 335 | + ".env.qa.local", | |
| 336 | + ".env.uat", | |
| 337 | + ".env.uat.local", | |
| 338 | + ".env.stag", | |
| 339 | + ".env.stag.local", | |
| 340 | + ".env.stage", | |
| 341 | + ".env.stage.local", | |
| 342 | + ".env.staging", | |
| 343 | + ".env.staging.local", | |
| 344 | + ".env.live", | |
| 345 | + ".env.live.local", | |
| 346 | + ".env.production", | |
| 347 | + ".env.production.local", | |
| 348 | + ".env.prod", | |
| 349 | + ".env.prod.local" | |
| 350 | + ] | |
| 351 | + } | |
| 352 | + ], | |
| 353 | + "snippetLangs": [] | |
| 354 | + } | |
| 355 | + }, | |
| 356 | + { | |
| 357 | + "id": "johnpapa.Angular2", | |
| 358 | + "namespace": "johnpapa", | |
| 359 | + "name": "Angular2", | |
| 360 | + "version": "22.0.0", | |
| 361 | + "displayName": "Angular Snippets (Version 22)", | |
| 362 | + "kind": "snippets", | |
| 363 | + "description": { | |
| 364 | + "es": "Snippets de Angular: componentes, servicios y rutas en TypeScript y HTML.", | |
| 365 | + "en": "Angular snippets: components, services and routes in TypeScript and HTML." | |
| 366 | + }, | |
| 367 | + "downloads": 272579, | |
| 368 | + "rank": 346, | |
| 369 | + "verified": true, | |
| 370 | + "analysis": { | |
| 371 | + "hasCode": false, | |
| 372 | + "browserEntry": false, | |
| 373 | + "categories": [ | |
| 374 | + "Snippets", | |
| 375 | + "Other" | |
| 376 | + ], | |
| 377 | + "sizes": { | |
| 378 | + "snippets": 5 | |
| 379 | + }, | |
| 380 | + "webviews": false, | |
| 381 | + "ignored": [], | |
| 382 | + "pack": [], | |
| 383 | + "themeLabels": [], | |
| 384 | + "grammarLangs": [], | |
| 385 | + "languageList": [], | |
| 386 | + "snippetLangs": [ | |
| 387 | + "typescript", | |
| 388 | + "javascript", | |
| 389 | + "jsonc", | |
| 390 | + "html", | |
| 391 | + "dockerfile" | |
| 392 | + ] | |
| 393 | + } | |
| 394 | + }, | |
| 395 | + { | |
| 396 | + "id": "bpruitt-goddard.mermaid-markdown-syntax-highlighting", | |
| 397 | + "namespace": "bpruitt-goddard", | |
| 398 | + "name": "mermaid-markdown-syntax-highlighting", | |
| 399 | + "version": "1.8.1", | |
| 400 | + "displayName": "Mermaid Markdown Syntax Highlighting", | |
| 401 | + "kind": "language", | |
| 402 | + "description": { | |
| 403 | + "es": "Resalta diagramas Mermaid (.mmd, .mermaid).", | |
| 404 | + "en": "Highlights Mermaid diagrams (.mmd, .mermaid)." | |
| 405 | + }, | |
| 406 | + "downloads": 266755, | |
| 407 | + "rank": 353, | |
| 408 | + "verified": true, | |
| 409 | + "analysis": { | |
| 410 | + "hasCode": false, | |
| 411 | + "browserEntry": false, | |
| 412 | + "categories": [ | |
| 413 | + "Other" | |
| 414 | + ], | |
| 415 | + "sizes": { | |
| 416 | + "languages": 1, | |
| 417 | + "grammars": 4 | |
| 418 | + }, | |
| 419 | + "webviews": false, | |
| 420 | + "ignored": [], | |
| 421 | + "pack": [], | |
| 422 | + "themeLabels": [], | |
| 423 | + "grammarLangs": [ | |
| 424 | + "mermaid", | |
| 425 | + null, | |
| 426 | + null, | |
| 427 | + "mermaid" | |
| 428 | + ], | |
| 429 | + "languageList": [ | |
| 430 | + { | |
| 431 | + "id": "mermaid", | |
| 432 | + "config": true, | |
| 433 | + "extensions": [ | |
| 434 | + ".mmd", | |
| 435 | + ".mermaid" | |
| 436 | + ] | |
| 437 | + } | |
| 438 | + ], | |
| 439 | + "snippetLangs": [] | |
| 440 | + } | |
| 441 | + }, | |
| 442 | + { | |
| 443 | + "id": "jdinhlife.gruvbox", | |
| 444 | + "namespace": "jdinhlife", | |
| 445 | + "name": "gruvbox", | |
| 446 | + "version": "1.29.1", | |
| 447 | + "displayName": "Gruvbox Theme", | |
| 448 | + "kind": "theme", | |
| 449 | + "description": { | |
| 450 | + "es": "Gruvbox: tonos cálidos y retro, en claro y en oscuro.", | |
| 451 | + "en": "Gruvbox: warm retro tones, light and dark." | |
| 452 | + }, | |
| 453 | + "downloads": 236473, | |
| 454 | + "rank": 375, | |
| 455 | + "verified": true, | |
| 456 | + "analysis": { | |
| 457 | + "hasCode": false, | |
| 458 | + "browserEntry": false, | |
| 459 | + "categories": [ | |
| 460 | + "Themes" | |
| 461 | + ], | |
| 462 | + "sizes": { | |
| 463 | + "themes": 6 | |
| 464 | + }, | |
| 465 | + "webviews": false, | |
| 466 | + "ignored": [], | |
| 467 | + "pack": [], | |
| 468 | + "themeLabels": [ | |
| 469 | + "Gruvbox Dark Medium", | |
| 470 | + "Gruvbox Dark Hard", | |
| 471 | + "Gruvbox Dark Soft", | |
| 472 | + "Gruvbox Light Medium", | |
| 473 | + "Gruvbox Light Hard", | |
| 474 | + "Gruvbox Light Soft" | |
| 475 | + ], | |
| 476 | + "grammarLangs": [], | |
| 477 | + "languageList": [], | |
| 478 | + "snippetLangs": [] | |
| 479 | + } | |
| 480 | + }, | |
| 481 | + { | |
| 482 | + "id": "akamud.vscode-theme-onedark", | |
| 483 | + "namespace": "akamud", | |
| 484 | + "name": "vscode-theme-onedark", | |
| 485 | + "version": "2.3.0", | |
| 486 | + "displayName": "Atom One Dark Theme", | |
| 487 | + "kind": "theme", | |
| 488 | + "description": { | |
| 489 | + "es": "One Dark, el tema oscuro clásico de Atom.", | |
| 490 | + "en": "One Dark, Atom's classic dark theme." | |
| 491 | + }, | |
| 492 | + "downloads": 184002, | |
| 493 | + "rank": 428, | |
| 494 | + "verified": true, | |
| 495 | + "analysis": { | |
| 496 | + "hasCode": false, | |
| 497 | + "browserEntry": false, | |
| 498 | + "categories": [ | |
| 499 | + "Themes" | |
| 500 | + ], | |
| 501 | + "sizes": { | |
| 502 | + "themes": 1 | |
| 503 | + }, | |
| 504 | + "webviews": false, | |
| 505 | + "ignored": [], | |
| 506 | + "pack": [], | |
| 507 | + "themeLabels": [ | |
| 508 | + "Atom One Dark" | |
| 509 | + ], | |
| 510 | + "grammarLangs": [], | |
| 511 | + "languageList": [], | |
| 512 | + "snippetLangs": [] | |
| 513 | + } | |
| 514 | + }, | |
| 515 | + { | |
| 516 | + "id": "enkia.tokyo-night", | |
| 517 | + "namespace": "enkia", | |
| 518 | + "name": "tokyo-night", | |
| 519 | + "version": "1.1.2", | |
| 520 | + "displayName": "Tokyo Night", | |
| 521 | + "kind": "theme", | |
| 522 | + "description": { | |
| 523 | + "es": "Tokyo Night: oscuro, con los colores de Tokio de noche.", | |
| 524 | + "en": "Tokyo Night: dark, in the colours of Tokyo at night." | |
| 525 | + }, | |
| 526 | + "downloads": 157097, | |
| 527 | + "rank": 457, | |
| 528 | + "verified": true, | |
| 529 | + "analysis": { | |
| 530 | + "hasCode": false, | |
| 531 | + "browserEntry": false, | |
| 532 | + "categories": [ | |
| 533 | + "Themes", | |
| 534 | + "Other" | |
| 535 | + ], | |
| 536 | + "sizes": { | |
| 537 | + "themes": 3 | |
| 538 | + }, | |
| 539 | + "webviews": false, | |
| 540 | + "ignored": [], | |
| 541 | + "pack": [], | |
| 542 | + "themeLabels": [ | |
| 543 | + "Tokyo Night", | |
| 544 | + "Tokyo Night Storm", | |
| 545 | + "Tokyo Night Light" | |
| 546 | + ], | |
| 547 | + "grammarLangs": [], | |
| 548 | + "languageList": [], | |
| 549 | + "snippetLangs": [] | |
| 550 | + } | |
| 551 | + }, | |
| 552 | + { | |
| 553 | + "id": "eventyret.bootstrap-4-cdn-snippet", | |
| 554 | + "namespace": "eventyret", | |
| 555 | + "name": "bootstrap-4-cdn-snippet", | |
| 556 | + "version": "1.13.0", | |
| 557 | + "displayName": "Bootstrap 4 CDN Snippet", | |
| 558 | + "kind": "snippets", | |
| 559 | + "description": { | |
| 560 | + "es": "Snippets de Bootstrap 4: la página base con el CDN y sus componentes.", | |
| 561 | + "en": "Bootstrap 4 snippets: the starter page with the CDN and its components." | |
| 562 | + }, | |
| 563 | + "downloads": 148465, | |
| 564 | + "rank": 471, | |
| 565 | + "verified": true, | |
| 566 | + "analysis": { | |
| 567 | + "hasCode": false, | |
| 568 | + "browserEntry": false, | |
| 569 | + "categories": [ | |
| 570 | + "Snippets" | |
| 571 | + ], | |
| 572 | + "sizes": { | |
| 573 | + "snippets": 25 | |
| 574 | + }, | |
| 575 | + "webviews": false, | |
| 576 | + "ignored": [], | |
| 577 | + "pack": [], | |
| 578 | + "themeLabels": [], | |
| 579 | + "grammarLangs": [], | |
| 580 | + "languageList": [], | |
| 581 | + "snippetLangs": [ | |
| 582 | + "html", | |
| 583 | + "jinja-html", | |
| 584 | + "django-html", | |
| 585 | + "javascriptreact", | |
| 586 | + "javascript" | |
| 587 | + ] | |
| 588 | + } | |
| 589 | + }, | |
| 590 | + { | |
| 591 | + "id": "bbenoist.Doxygen", | |
| 592 | + "namespace": "bbenoist", | |
| 593 | + "name": "Doxygen", | |
| 594 | + "version": "1.0.0", | |
| 595 | + "displayName": "Doxygen", | |
| 596 | + "kind": "language", | |
| 597 | + "description": { | |
| 598 | + "es": "Resalta ficheros de documentación Doxygen (.dox).", | |
| 599 | + "en": "Highlights Doxygen documentation files (.dox)." | |
| 600 | + }, | |
| 601 | + "downloads": 134618, | |
| 602 | + "rank": 495, | |
| 603 | + "verified": true, | |
| 604 | + "analysis": { | |
| 605 | + "hasCode": false, | |
| 606 | + "browserEntry": false, | |
| 607 | + "categories": [ | |
| 608 | + "Languages" | |
| 609 | + ], | |
| 610 | + "sizes": { | |
| 611 | + "languages": 1, | |
| 612 | + "grammars": 1 | |
| 613 | + }, | |
| 614 | + "webviews": false, | |
| 615 | + "ignored": [], | |
| 616 | + "pack": [], | |
| 617 | + "themeLabels": [], | |
| 618 | + "grammarLangs": [ | |
| 619 | + "doxygen" | |
| 620 | + ], | |
| 621 | + "languageList": [ | |
| 622 | + { | |
| 623 | + "id": "doxygen", | |
| 624 | + "config": true, | |
| 625 | + "extensions": [ | |
| 626 | + ".dox" | |
| 627 | + ] | |
| 628 | + } | |
| 629 | + ], | |
| 630 | + "snippetLangs": [] | |
| 631 | + } | |
| 632 | + }, | |
| 633 | + { | |
| 634 | + "id": "BeardedBear.beardedtheme", | |
| 635 | + "namespace": "BeardedBear", | |
| 636 | + "name": "beardedtheme", | |
| 637 | + "version": "10.1.0", | |
| 638 | + "displayName": "Bearded Theme", | |
| 639 | + "kind": "theme", | |
| 640 | + "description": { | |
| 641 | + "es": "Bearded Theme: decenas de variantes, de muy oscuras a claras.", | |
| 642 | + "en": "Bearded Theme: dozens of variants, from very dark to light." | |
| 643 | + }, | |
| 644 | + "downloads": 131329, | |
| 645 | + "rank": 505, | |
| 646 | + "verified": true, | |
| 647 | + "analysis": { | |
| 648 | + "hasCode": false, | |
| 649 | + "browserEntry": false, | |
| 650 | + "categories": [ | |
| 651 | + "Themes" | |
| 652 | + ], | |
| 653 | + "sizes": { | |
| 654 | + "themes": 64 | |
| 655 | + }, | |
| 656 | + "webviews": false, | |
| 657 | + "ignored": [], | |
| 658 | + "pack": [], | |
| 659 | + "themeLabels": [ | |
| 660 | + "Bearded Theme Monokai Metallian", | |
| 661 | + "Bearded Theme Monokai Terra", | |
| 662 | + "Bearded Theme Monokai Stone", | |
| 663 | + "Bearded Theme Monokai Black", | |
| 664 | + "Bearded Theme Monokai Reversed", | |
| 665 | + "Bearded Theme Solarized", | |
| 666 | + "Bearded Theme Solarized Reversed", | |
| 667 | + "Bearded Theme Solarized Light", | |
| 668 | + "Bearded Theme Oceanic", | |
| 669 | + "Bearded Theme Oceanic Reversed", | |
| 670 | + "Bearded Theme Arc", | |
| 671 | + "Bearded Theme Arc Eggplant", | |
| 672 | + "Bearded Theme Arc EolStorm", | |
| 673 | + "Bearded Theme Arc Blueberry", | |
| 674 | + "Bearded Theme Arc Reversed", | |
| 675 | + "Bearded Theme Black & Amethyst", | |
| 676 | + "Bearded Theme Black & Amethyst Soft", | |
| 677 | + "Bearded Theme Black & Diamond", | |
| 678 | + "Bearded Theme Black & Diamond Soft", | |
| 679 | + "Bearded Theme Black & Emerald", | |
| 680 | + "Bearded Theme Black & Emerald Soft", | |
| 681 | + "Bearded Theme Black & Gold", | |
| 682 | + "Bearded Theme Black & Gold Soft", | |
| 683 | + "Bearded Theme Black & Ruby", | |
| 684 | + "Bearded Theme Black & Ruby Soft", | |
| 685 | + "Bearded Theme Stained Purple", | |
| 686 | + "Bearded Theme Stained Blue", | |
| 687 | + "Bearded Theme Vivid Purple", | |
| 688 | + "Bearded Theme Vivid Black", | |
| 689 | + "Bearded Theme Vivid Light", | |
| 690 | + "Bearded Theme feat. Will", | |
| 691 | + "Bearded Theme feat. Gold D Raynh", | |
| 692 | + "Bearded Theme feat. Melle Julie", | |
| 693 | + "Bearded Theme feat. Melle Julie Light", | |
| 694 | + "Bearded Theme feat. Mintshake D Raynh", | |
| 695 | + "Bearded Theme feat. WebDevCody", | |
| 696 | + "Bearded Theme Earth", | |
| 697 | + "Bearded Theme Coffee", | |
| 698 | + "Bearded Theme Coffee Reversed", | |
| 699 | + "Bearded Theme Coffee Cream", | |
| 700 | + "Bearded Theme Void", | |
| 701 | + "Bearded Theme Altica", | |
| 702 | + "Bearded Theme Anthracite", | |
| 703 | + "Bearded Theme Light", | |
| 704 | + "Bearded Theme Surprising Eggplant", | |
| 705 | + "Bearded Theme Surprising Blueberry", | |
| 706 | + "Bearded Theme Surprising Watermelon", | |
| 707 | + "Bearded Theme HC Ebony", | |
| 708 | + "Bearded Theme HC Midnight Void", | |
| 709 | + "Bearded Theme HC Wonderland Wood", | |
| 710 | + "Bearded Theme HC Brewing Storm", | |
| 711 | + "Bearded Theme HC Minuit", | |
| 712 | + "Bearded Theme HC Chocolate Espresso", | |
| 713 | + "Bearded Theme HC Flurry", | |
| 714 | + "Bearded Theme Milkshake Raspberry", | |
| 715 | + "Bearded Theme Milkshake Blueberry", | |
| 716 | + "Bearded Theme Milkshake Mango", | |
| 717 | + "Bearded Theme Milkshake Mint", | |
| 718 | + "Bearded Theme Milkshake Vanilla Banana", | |
| 719 | + "Bearded Themanopia (Experimental)", | |
| 720 | + "Bearded Theme Aquarelle Cymbidium", | |
| 721 | + "Bearded Theme Aquarelle Hydrangea", | |
| 722 | + "Bearded Theme Aquarelle Lilac", | |
| 723 | + "Bearded Theme OLED (Experimental)" | |
| 724 | + ], | |
| 725 | + "grammarLangs": [], | |
| 726 | + "languageList": [], | |
| 727 | + "snippetLangs": [] | |
| 728 | + } | |
| 729 | + }, | |
| 730 | + { | |
| 731 | + "id": "IBM.output-colorizer", | |
| 732 | + "namespace": "IBM", | |
| 733 | + "name": "output-colorizer", | |
| 734 | + "version": "0.1.2", | |
| 735 | + "displayName": "Output Colorizer", | |
| 736 | + "kind": "language", | |
| 737 | + "description": { | |
| 738 | + "es": "Colorea ficheros de log (.log): fechas, niveles, errores.", | |
| 739 | + "en": "Colours log files (.log): dates, levels, errors." | |
| 740 | + }, | |
| 741 | + "downloads": 107276, | |
| 742 | + "rank": 558, | |
| 743 | + "verified": false, | |
| 744 | + "analysis": { | |
| 745 | + "hasCode": false, | |
| 746 | + "browserEntry": false, | |
| 747 | + "categories": [ | |
| 748 | + "Languages" | |
| 749 | + ], | |
| 750 | + "sizes": { | |
| 751 | + "languages": 1, | |
| 752 | + "grammars": 1 | |
| 753 | + }, | |
| 754 | + "webviews": false, | |
| 755 | + "ignored": [], | |
| 756 | + "pack": [], | |
| 757 | + "themeLabels": [], | |
| 758 | + "grammarLangs": [ | |
| 759 | + "Log" | |
| 760 | + ], | |
| 761 | + "languageList": [ | |
| 762 | + { | |
| 763 | + "id": "Log", | |
| 764 | + "config": true, | |
| 765 | + "name": "log", | |
| 766 | + "extensions": [ | |
| 767 | + ".log" | |
| 768 | + ] | |
| 769 | + } | |
| 770 | + ], | |
| 771 | + "snippetLangs": [] | |
| 772 | + } | |
| 773 | + }, | |
| 774 | + { | |
| 775 | + "id": "sdras.night-owl", | |
| 776 | + "namespace": "sdras", | |
| 777 | + "name": "night-owl", | |
| 778 | + "version": "2.1.1", | |
| 779 | + "displayName": "Night Owl", | |
| 780 | + "kind": "theme", | |
| 781 | + "description": { | |
| 782 | + "es": "Night Owl: pensado para programar de noche; también en claro.", | |
| 783 | + "en": "Night Owl: made for coding at night; a light one too." | |
| 784 | + }, | |
| 785 | + "downloads": 83963, | |
| 786 | + "rank": 640, | |
| 787 | + "verified": true, | |
| 788 | + "analysis": { | |
| 789 | + "hasCode": false, | |
| 790 | + "browserEntry": false, | |
| 791 | + "categories": [ | |
| 792 | + "Themes" | |
| 793 | + ], | |
| 794 | + "sizes": { | |
| 795 | + "themes": 4 | |
| 796 | + }, | |
| 797 | + "webviews": false, | |
| 798 | + "ignored": [], | |
| 799 | + "pack": [], | |
| 800 | + "themeLabels": [ | |
| 801 | + "Night Owl", | |
| 802 | + "Night Owl (No Italics)", | |
| 803 | + "Night Owl Light", | |
| 804 | + "Night Owl Light (No Italics)" | |
| 805 | + ], | |
| 806 | + "grammarLangs": [], | |
| 807 | + "languageList": [], | |
| 808 | + "snippetLangs": [] | |
| 809 | + } | |
| 810 | + }, | |
| 811 | + { | |
| 812 | + "id": "dannysteenman.cdk-snippets", | |
| 813 | + "namespace": "dannysteenman", | |
| 814 | + "name": "cdk-snippets", | |
| 815 | + "version": "2.115.1", | |
| 816 | + "displayName": "AWS CDK Snippets", | |
| 817 | + "kind": "snippets", | |
| 818 | + "description": { | |
| 819 | + "es": "Snippets de AWS CDK para Python y TypeScript.", | |
| 820 | + "en": "AWS CDK snippets for Python and TypeScript." | |
| 821 | + }, | |
| 822 | + "downloads": 83542, | |
| 823 | + "rank": 643, | |
| 824 | + "verified": true, | |
| 825 | + "analysis": { | |
| 826 | + "hasCode": false, | |
| 827 | + "browserEntry": false, | |
| 828 | + "categories": [ | |
| 829 | + "Snippets" | |
| 830 | + ], | |
| 831 | + "sizes": { | |
| 832 | + "snippets": 2 | |
| 833 | + }, | |
| 834 | + "webviews": false, | |
| 835 | + "ignored": [], | |
| 836 | + "pack": [], | |
| 837 | + "themeLabels": [], | |
| 838 | + "grammarLangs": [], | |
| 839 | + "languageList": [], | |
| 840 | + "snippetLangs": [ | |
| 841 | + "python", | |
| 842 | + "typescript" | |
| 843 | + ] | |
| 844 | + } | |
| 845 | + }, | |
| 846 | + { | |
| 847 | + "id": "onecentlin.laravel5-snippets", | |
| 848 | + "namespace": "onecentlin", | |
| 849 | + "name": "laravel5-snippets", | |
| 850 | + "version": "1.19.1", | |
| 851 | + "displayName": "Laravel Snippets", | |
| 852 | + "kind": "snippets", | |
| 853 | + "description": { | |
| 854 | + "es": "Snippets de Laravel en PHP: rutas, modelos, consultas.", | |
| 855 | + "en": "Laravel snippets in PHP: routes, models, queries." | |
| 856 | + }, | |
| 857 | + "downloads": 78722, | |
| 858 | + "rank": 669, | |
| 859 | + "verified": true, | |
| 860 | + "analysis": { | |
| 861 | + "hasCode": false, | |
| 862 | + "browserEntry": false, | |
| 863 | + "categories": [ | |
| 864 | + "Snippets" | |
| 865 | + ], | |
| 866 | + "sizes": { | |
| 867 | + "snippets": 28 | |
| 868 | + }, | |
| 869 | + "webviews": false, | |
| 870 | + "ignored": [], | |
| 871 | + "pack": [], | |
| 872 | + "themeLabels": [], | |
| 873 | + "grammarLangs": [], | |
| 874 | + "languageList": [], | |
| 875 | + "snippetLangs": [ | |
| 876 | + "php", | |
| 877 | + "blade" | |
| 878 | + ] | |
| 879 | + } | |
| 880 | + }, | |
| 881 | + { | |
| 882 | + "id": "ahmadawais.shades-of-purple", | |
| 883 | + "namespace": "ahmadawais", | |
| 884 | + "name": "shades-of-purple", | |
| 885 | + "version": "7.3.6", | |
| 886 | + "displayName": "Shades of Purple", | |
| 887 | + "kind": "theme", | |
| 888 | + "description": { | |
| 889 | + "es": "Shades of Purple: morados intensos y amarillo.", | |
| 890 | + "en": "Shades of Purple: bold purples with yellow." | |
| 891 | + }, | |
| 892 | + "downloads": 71690, | |
| 893 | + "rank": 701, | |
| 894 | + "verified": true, | |
| 895 | + "analysis": { | |
| 896 | + "hasCode": false, | |
| 897 | + "browserEntry": false, | |
| 898 | + "categories": [ | |
| 899 | + "Themes" | |
| 900 | + ], | |
| 901 | + "sizes": { | |
| 902 | + "themes": 2 | |
| 903 | + }, | |
| 904 | + "webviews": false, | |
| 905 | + "ignored": [], | |
| 906 | + "pack": [], | |
| 907 | + "themeLabels": [ | |
| 908 | + "Shades of Purple", | |
| 909 | + "Shades of Purple (Super Dark)" | |
| 910 | + ], | |
| 911 | + "grammarLangs": [], | |
| 912 | + "languageList": [], | |
| 913 | + "snippetLangs": [] | |
| 914 | + } | |
| 915 | + }, | |
| 916 | + { | |
| 917 | + "id": "Nash.awesome-flutter-snippets", | |
| 918 | + "namespace": "Nash", | |
| 919 | + "name": "awesome-flutter-snippets", | |
| 920 | + "version": "3.0.0", | |
| 921 | + "displayName": "Awesome Flutter Snippets", | |
| 922 | + "kind": "snippets", | |
| 923 | + "description": { | |
| 924 | + "es": "Snippets de Flutter en Dart: widgets y su estructura.", | |
| 925 | + "en": "Flutter snippets in Dart: widgets and their boilerplate." | |
| 926 | + }, | |
| 927 | + "downloads": 63342, | |
| 928 | + "rank": 759, | |
| 929 | + "verified": true, | |
| 930 | + "analysis": { | |
| 931 | + "hasCode": false, | |
| 932 | + "browserEntry": false, | |
| 933 | + "categories": [ | |
| 934 | + "Snippets" | |
| 935 | + ], | |
| 936 | + "sizes": { | |
| 937 | + "snippets": 1 | |
| 938 | + }, | |
| 939 | + "webviews": false, | |
| 940 | + "ignored": [], | |
| 941 | + "pack": [], | |
| 942 | + "themeLabels": [], | |
| 943 | + "grammarLangs": [], | |
| 944 | + "languageList": [], | |
| 945 | + "snippetLangs": [ | |
| 946 | + "dart" | |
| 947 | + ] | |
| 948 | + } | |
| 949 | + }, | |
| 950 | + { | |
| 951 | + "id": "arcticicestudio.nord-visual-studio-code", | |
| 952 | + "namespace": "arcticicestudio", | |
| 953 | + "name": "nord-visual-studio-code", | |
| 954 | + "version": "0.19.0", | |
| 955 | + "displayName": "Nord", | |
| 956 | + "kind": "theme", | |
| 957 | + "description": { | |
| 958 | + "es": "Nord: azules fríos del Ártico, sereno y limpio.", | |
| 959 | + "en": "Nord: cool Arctic blues, calm and clean." | |
| 960 | + }, | |
| 961 | + "downloads": 62817, | |
| 962 | + "rank": 763, | |
| 963 | + "verified": true, | |
| 964 | + "analysis": { | |
| 965 | + "hasCode": false, | |
| 966 | + "browserEntry": false, | |
| 967 | + "categories": [ | |
| 968 | + "Themes" | |
| 969 | + ], | |
| 970 | + "sizes": { | |
| 971 | + "themes": 1 | |
| 972 | + }, | |
| 973 | + "webviews": false, | |
| 974 | + "ignored": [], | |
| 975 | + "pack": [], | |
| 976 | + "themeLabels": [ | |
| 977 | + "Nord" | |
| 978 | + ], | |
| 979 | + "grammarLangs": [], | |
| 980 | + "languageList": [], | |
| 981 | + "snippetLangs": [] | |
| 982 | + } | |
| 983 | + }, | |
| 984 | + { | |
| 985 | + "id": "johnpapa.winteriscoming", | |
| 986 | + "namespace": "johnpapa", | |
| 987 | + "name": "winteriscoming", | |
| 988 | + "version": "1.5.0", | |
| 989 | + "displayName": "Winter is Coming Theme", | |
| 990 | + "kind": "theme", | |
| 991 | + "description": { | |
| 992 | + "es": "Winter is Coming: azul oscuro, negro y una versión clara.", | |
| 993 | + "en": "Winter is Coming: dark blue, black and a light one." | |
| 994 | + }, | |
| 995 | + "downloads": 54508, | |
| 996 | + "rank": 840, | |
| 997 | + "verified": true, | |
| 998 | + "analysis": { | |
| 999 | + "hasCode": false, | |
| 1000 | + "browserEntry": false, | |
| 1001 | + "categories": [ | |
| 1002 | + "Themes", | |
| 1003 | + "Other" | |
| 1004 | + ], | |
| 1005 | + "sizes": { | |
| 1006 | + "themes": 6 | |
| 1007 | + }, | |
| 1008 | + "webviews": false, | |
| 1009 | + "ignored": [], | |
| 1010 | + "pack": [], | |
| 1011 | + "themeLabels": [ | |
| 1012 | + "Winter is Coming (Dark Blue)", | |
| 1013 | + "Winter is Coming (Dark Blue - No Italics)", | |
| 1014 | + "Winter is Coming (Light)", | |
| 1015 | + "Winter is Coming (Light - No Italics)", | |
| 1016 | + "Winter is Coming (Dark Black)", | |
| 1017 | + "Winter is Coming (Dark Black - No Italics)" | |
| 1018 | + ], | |
| 1019 | + "grammarLangs": [], | |
| 1020 | + "languageList": [], | |
| 1021 | + "snippetLangs": [] | |
| 1022 | + } | |
| 1023 | + }, | |
| 1024 | + { | |
| 1025 | + "id": "hollowtree.vue-snippets", | |
| 1026 | + "namespace": "hollowtree", | |
| 1027 | + "name": "vue-snippets", | |
| 1028 | + "version": "0.1.12", | |
| 1029 | + "displayName": "Vue 2 Snippets", | |
| 1030 | + "kind": "snippets", | |
| 1031 | + "description": { | |
| 1032 | + "es": "Snippets de Vue 2 en JavaScript, TypeScript y HTML.", | |
| 1033 | + "en": "Vue 2 snippets in JavaScript, TypeScript and HTML." | |
| 1034 | + }, | |
| 1035 | + "downloads": 45400, | |
| 1036 | + "rank": 907, | |
| 1037 | + "verified": true, | |
| 1038 | + "analysis": { | |
| 1039 | + "hasCode": false, | |
| 1040 | + "browserEntry": false, | |
| 1041 | + "categories": [ | |
| 1042 | + "Programming Languages", | |
| 1043 | + "Snippets" | |
| 1044 | + ], | |
| 1045 | + "sizes": { | |
| 1046 | + "languages": 1, | |
| 1047 | + "snippets": 9 | |
| 1048 | + }, | |
| 1049 | + "webviews": false, | |
| 1050 | + "ignored": [], | |
| 1051 | + "pack": [], | |
| 1052 | + "themeLabels": [], | |
| 1053 | + "grammarLangs": [], | |
| 1054 | + "languageList": [ | |
| 1055 | + { | |
| 1056 | + "id": "vue", | |
| 1057 | + "config": false, | |
| 1058 | + "name": "Vue", | |
| 1059 | + "extensions": [ | |
| 1060 | + ".vue" | |
| 1061 | + ] | |
| 1062 | + } | |
| 1063 | + ], | |
| 1064 | + "snippetLangs": [ | |
| 1065 | + "javascript", | |
| 1066 | + "typescript", | |
| 1067 | + "html", | |
| 1068 | + "vue-html", | |
| 1069 | + "vue", | |
| 1070 | + "jade" | |
| 1071 | + ] | |
| 1072 | + } | |
| 1073 | + }, | |
| 1074 | + { | |
| 1075 | + "id": "wesbos.theme-cobalt2", | |
| 1076 | + "namespace": "wesbos", | |
| 1077 | + "name": "theme-cobalt2", | |
| 1078 | + "version": "2.4.3", | |
| 1079 | + "displayName": "Cobalt2 Theme Official", | |
| 1080 | + "kind": "theme", | |
| 1081 | + "description": { | |
| 1082 | + "es": "Cobalt2: azul cobalto con amarillo, de Wes Bos.", | |
| 1083 | + "en": "Cobalt2: cobalt blue with yellow, by Wes Bos." | |
| 1084 | + }, | |
| 1085 | + "downloads": 44257, | |
| 1086 | + "rank": 915, | |
| 1087 | + "verified": true, | |
| 1088 | + "analysis": { | |
| 1089 | + "hasCode": false, | |
| 1090 | + "browserEntry": false, | |
| 1091 | + "categories": [ | |
| 1092 | + "Themes" | |
| 1093 | + ], | |
| 1094 | + "sizes": { | |
| 1095 | + "themes": 1 | |
| 1096 | + }, | |
| 1097 | + "webviews": false, | |
| 1098 | + "ignored": [], | |
| 1099 | + "pack": [], | |
| 1100 | + "themeLabels": [ | |
| 1101 | + "Cobalt2" | |
| 1102 | + ], | |
| 1103 | + "grammarLangs": [], | |
| 1104 | + "languageList": [], | |
| 1105 | + "snippetLangs": [] | |
| 1106 | + } | |
| 1107 | + }, | |
| 1108 | + { | |
| 1109 | + "id": "HansUXdev.bootstrap5-snippets", | |
| 1110 | + "namespace": "HansUXdev", | |
| 1111 | + "name": "bootstrap5-snippets", | |
| 1112 | + "version": "1.2.5", | |
| 1113 | + "displayName": "Bootstrap 5 & Font Awesome Snippets", | |
| 1114 | + "kind": "snippets", | |
| 1115 | + "description": { | |
| 1116 | + "es": "Snippets de Bootstrap 5 y Font Awesome en HTML.", | |
| 1117 | + "en": "Bootstrap 5 and Font Awesome snippets in HTML." | |
| 1118 | + }, | |
| 1119 | + "downloads": 36417, | |
| 1120 | + "rank": 1036, | |
| 1121 | + "verified": true, | |
| 1122 | + "analysis": { | |
| 1123 | + "hasCode": false, | |
| 1124 | + "browserEntry": false, | |
| 1125 | + "categories": [ | |
| 1126 | + "Snippets" | |
| 1127 | + ], | |
| 1128 | + "sizes": { | |
| 1129 | + "snippets": 22 | |
| 1130 | + }, | |
| 1131 | + "webviews": false, | |
| 1132 | + "ignored": [], | |
| 1133 | + "pack": [], | |
| 1134 | + "themeLabels": [], | |
| 1135 | + "grammarLangs": [], | |
| 1136 | + "languageList": [], | |
| 1137 | + "snippetLangs": [ | |
| 1138 | + "blade", | |
| 1139 | + "ejs", | |
| 1140 | + "html", | |
| 1141 | + "handlebars", | |
| 1142 | + "latte", | |
| 1143 | + "php", | |
| 1144 | + "plaintext", | |
| 1145 | + "razor", | |
| 1146 | + "tpl", | |
| 1147 | + "typescript", | |
| 1148 | + "typescriptreact", | |
| 1149 | + "javascriptreact", | |
| 1150 | + "javascript", | |
| 1151 | + "twig", | |
| 1152 | + "vue", | |
| 1153 | + "vue-html", | |
| 1154 | + "django-html", | |
| 1155 | + "jinja-html", | |
| 1156 | + "erb", | |
| 1157 | + "HTML (Eex)", | |
| 1158 | + "volt", | |
| 1159 | + "nunjucks" | |
| 1160 | + ] | |
| 1161 | + } | |
| 1162 | + }, | |
| 1163 | + { | |
| 1164 | + "id": "aleksa-codes.one-dark-modern-pro", | |
| 1165 | + "namespace": "aleksa-codes", | |
| 1166 | + "name": "one-dark-modern-pro", | |
| 1167 | + "version": "1.2.0", | |
| 1168 | + "displayName": "One Dark Modern Pro", | |
| 1169 | + "kind": "theme", | |
| 1170 | + "description": { | |
| 1171 | + "es": "One Dark Modern Pro: One Dark con los colores de la interfaz actual.", | |
| 1172 | + "en": "One Dark Modern Pro: One Dark with a modern interface palette." | |
| 1173 | + }, | |
| 1174 | + "downloads": 32194, | |
| 1175 | + "rank": 1127, | |
| 1176 | + "verified": false, | |
| 1177 | + "analysis": { | |
| 1178 | + "hasCode": false, | |
| 1179 | + "browserEntry": false, | |
| 1180 | + "categories": [ | |
| 1181 | + "Themes" | |
| 1182 | + ], | |
| 1183 | + "sizes": { | |
| 1184 | + "themes": 2 | |
| 1185 | + }, | |
| 1186 | + "webviews": false, | |
| 1187 | + "ignored": [], | |
| 1188 | + "pack": [], | |
| 1189 | + "themeLabels": [ | |
| 1190 | + "One Dark Modern Pro", | |
| 1191 | + "One Dark 2026 Pro" | |
| 1192 | + ], | |
| 1193 | + "grammarLangs": [], | |
| 1194 | + "languageList": [], | |
| 1195 | + "snippetLangs": [] | |
| 1196 | + } | |
| 1197 | + }, | |
| 1198 | + { | |
| 1199 | + "id": "robole.markdown-snippets", | |
| 1200 | + "namespace": "robole", | |
| 1201 | + "name": "markdown-snippets", | |
| 1202 | + "version": "0.9.1", | |
| 1203 | + "displayName": "Markdown Snippets", | |
| 1204 | + "kind": "snippets", | |
| 1205 | + "description": { | |
| 1206 | + "es": "Snippets de Markdown: tablas, enlaces, imágenes, listas de tareas.", | |
| 1207 | + "en": "Markdown snippets: tables, links, images, task lists." | |
| 1208 | + }, | |
| 1209 | + "downloads": 21880, | |
| 1210 | + "rank": 1471, | |
| 1211 | + "verified": true, | |
| 1212 | + "analysis": { | |
| 1213 | + "hasCode": false, | |
| 1214 | + "browserEntry": false, | |
| 1215 | + "categories": [ | |
| 1216 | + "Snippets" | |
| 1217 | + ], | |
| 1218 | + "sizes": { | |
| 1219 | + "snippets": 1 | |
| 1220 | + }, | |
| 1221 | + "webviews": false, | |
| 1222 | + "ignored": [], | |
| 1223 | + "pack": [], | |
| 1224 | + "themeLabels": [], | |
| 1225 | + "grammarLangs": [], | |
| 1226 | + "languageList": [], | |
| 1227 | + "snippetLangs": [ | |
| 1228 | + "markdown" | |
| 1229 | + ] | |
| 1230 | + } | |
| 1231 | + }, | |
| 1232 | + { | |
| 1233 | + "id": "bbenoist.Nix", | |
| 1234 | + "namespace": "bbenoist", | |
| 1235 | + "name": "Nix", | |
| 1236 | + "version": "1.0.1", | |
| 1237 | + "displayName": "Nix", | |
| 1238 | + "kind": "language", | |
| 1239 | + "description": { | |
| 1240 | + "es": "Resalta el lenguaje Nix (.nix).", | |
| 1241 | + "en": "Highlights the Nix language (.nix)." | |
| 1242 | + }, | |
| 1243 | + "downloads": 21284, | |
| 1244 | + "rank": 1497, | |
| 1245 | + "verified": true, | |
| 1246 | + "analysis": { | |
| 1247 | + "hasCode": false, | |
| 1248 | + "browserEntry": false, | |
| 1249 | + "categories": [ | |
| 1250 | + "Languages" | |
| 1251 | + ], | |
| 1252 | + "sizes": { | |
| 1253 | + "languages": 1, | |
| 1254 | + "grammars": 1 | |
| 1255 | + }, | |
| 1256 | + "webviews": false, | |
| 1257 | + "ignored": [], | |
| 1258 | + "pack": [], | |
| 1259 | + "themeLabels": [], | |
| 1260 | + "grammarLangs": [ | |
| 1261 | + "nix" | |
| 1262 | + ], | |
| 1263 | + "languageList": [ | |
| 1264 | + { | |
| 1265 | + "id": "nix", | |
| 1266 | + "config": true, | |
| 1267 | + "extensions": [ | |
| 1268 | + ".nix" | |
| 1269 | + ] | |
| 1270 | + } | |
| 1271 | + ], | |
| 1272 | + "snippetLangs": [] | |
| 1273 | + } | |
| 1274 | + }, | |
| 1275 | + { | |
| 1276 | + "id": "imgildev.vscode-tailwindcss-snippets", | |
| 1277 | + "namespace": "imgildev", | |
| 1278 | + "name": "vscode-tailwindcss-snippets", | |
| 1279 | + "version": "1.0.1", | |
| 1280 | + "displayName": "Tailwind CSS snippets", | |
| 1281 | + "kind": "snippets", | |
| 1282 | + "description": { | |
| 1283 | + "es": "Snippets de Tailwind CSS en HTML.", | |
| 1284 | + "en": "Tailwind CSS snippets in HTML." | |
| 1285 | + }, | |
| 1286 | + "downloads": 19196, | |
| 1287 | + "rank": 1625, | |
| 1288 | + "verified": true, | |
| 1289 | + "analysis": { | |
| 1290 | + "hasCode": false, | |
| 1291 | + "browserEntry": false, | |
| 1292 | + "categories": [ | |
| 1293 | + "Snippets" | |
| 1294 | + ], | |
| 1295 | + "sizes": { | |
| 1296 | + "snippets": 1 | |
| 1297 | + }, | |
| 1298 | + "webviews": false, | |
| 1299 | + "ignored": [], | |
| 1300 | + "pack": [], | |
| 1301 | + "themeLabels": [], | |
| 1302 | + "grammarLangs": [], | |
| 1303 | + "languageList": [], | |
| 1304 | + "snippetLangs": [ | |
| 1305 | + "html" | |
| 1306 | + ] | |
| 1307 | + } | |
| 1308 | + }, | |
| 1309 | + { | |
| 1310 | + "id": "donjayamanne.jquerysnippets", | |
| 1311 | + "namespace": "donjayamanne", | |
| 1312 | + "name": "jquerysnippets", | |
| 1313 | + "version": "0.0.1", | |
| 1314 | + "displayName": "jQuery Code Snippets", | |
| 1315 | + "kind": "snippets", | |
| 1316 | + "description": { | |
| 1317 | + "es": "Más de 130 snippets de jQuery en JavaScript y HTML.", | |
| 1318 | + "en": "Over 130 jQuery snippets in JavaScript and HTML." | |
| 1319 | + }, | |
| 1320 | + "downloads": 18377, | |
| 1321 | + "rank": 1672, | |
| 1322 | + "verified": true, | |
| 1323 | + "analysis": { | |
| 1324 | + "hasCode": false, | |
| 1325 | + "browserEntry": false, | |
| 1326 | + "categories": [ | |
| 1327 | + "Snippets" | |
| 1328 | + ], | |
| 1329 | + "sizes": { | |
| 1330 | + "snippets": 4 | |
| 1331 | + }, | |
| 1332 | + "webviews": false, | |
| 1333 | + "ignored": [], | |
| 1334 | + "pack": [], | |
| 1335 | + "themeLabels": [], | |
| 1336 | + "grammarLangs": [], | |
| 1337 | + "languageList": [], | |
| 1338 | + "snippetLangs": [ | |
| 1339 | + "javascript", | |
| 1340 | + "pug", | |
| 1341 | + "jade", | |
| 1342 | + "html" | |
| 1343 | + ] | |
| 1344 | + } | |
| 1345 | + }, | |
| 1346 | + { | |
| 1347 | + "id": "metaphore.kanagawa-vscode-color-theme", | |
| 1348 | + "namespace": "metaphore", | |
| 1349 | + "name": "kanagawa-vscode-color-theme", | |
| 1350 | + "version": "0.5.0", | |
| 1351 | + "displayName": "Kanagawa Flavors", | |
| 1352 | + "kind": "theme", | |
| 1353 | + "description": { | |
| 1354 | + "es": "Kanagawa: colores de la estampa japonesa La gran ola.", | |
| 1355 | + "en": "Kanagawa: colours from the Japanese print The Great Wave." | |
| 1356 | + }, | |
| 1357 | + "downloads": 15526, | |
| 1358 | + "rank": 1887, | |
| 1359 | + "verified": true, | |
| 1360 | + "analysis": { | |
| 1361 | + "hasCode": false, | |
| 1362 | + "browserEntry": false, | |
| 1363 | + "categories": [ | |
| 1364 | + "Themes" | |
| 1365 | + ], | |
| 1366 | + "sizes": { | |
| 1367 | + "themes": 3 | |
| 1368 | + }, | |
| 1369 | + "webviews": false, | |
| 1370 | + "ignored": [], | |
| 1371 | + "pack": [], | |
| 1372 | + "themeLabels": [ | |
| 1373 | + "Kanagawa Wave", | |
| 1374 | + "Kanagawa Dragon", | |
| 1375 | + "Kanagawa Lotus" | |
| 1376 | + ], | |
| 1377 | + "grammarLangs": [], | |
| 1378 | + "languageList": [], | |
| 1379 | + "snippetLangs": [] | |
| 1380 | + } | |
| 1381 | + }, | |
| 1382 | + { | |
| 1383 | + "id": "liviuschera.noctis", | |
| 1384 | + "namespace": "liviuschera", | |
| 1385 | + "name": "noctis", | |
| 1386 | + "version": "10.43.3", | |
| 1387 | + "displayName": "Noctis", | |
| 1388 | + "kind": "theme", | |
| 1389 | + "description": { | |
| 1390 | + "es": "Noctis: once temas, claros y oscuros, de colores templados.", | |
| 1391 | + "en": "Noctis: eleven light and dark themes in calm colours." | |
| 1392 | + }, | |
| 1393 | + "downloads": 13123, | |
| 1394 | + "rank": 2140, | |
| 1395 | + "verified": true, | |
| 1396 | + "analysis": { | |
| 1397 | + "hasCode": false, | |
| 1398 | + "browserEntry": false, | |
| 1399 | + "categories": [ | |
| 1400 | + "Themes", | |
| 1401 | + "Other" | |
| 1402 | + ], | |
| 1403 | + "sizes": { | |
| 1404 | + "themes": 11 | |
| 1405 | + }, | |
| 1406 | + "webviews": false, | |
| 1407 | + "ignored": [], | |
| 1408 | + "pack": [], | |
| 1409 | + "themeLabels": [ | |
| 1410 | + "Noctis Lux", | |
| 1411 | + "Noctis Hibernus", | |
| 1412 | + "Noctis Lilac", | |
| 1413 | + "Noctis", | |
| 1414 | + "Noctis Azureus", | |
| 1415 | + "Noctis Bordo", | |
| 1416 | + "Noctis Obscuro", | |
| 1417 | + "Noctis Sereno", | |
| 1418 | + "Noctis Uva", | |
| 1419 | + "Noctis Viola", | |
| 1420 | + "Noctis Minimus" | |
| 1421 | + ], | |
| 1422 | + "grammarLangs": [], | |
| 1423 | + "languageList": [], | |
| 1424 | + "snippetLangs": [] | |
| 1425 | + } | |
| 1426 | + }, | |
| 1427 | + { | |
| 1428 | + "id": "jolaleye.horizon-theme-vscode", | |
| 1429 | + "namespace": "jolaleye", | |
| 1430 | + "name": "horizon-theme-vscode", | |
| 1431 | + "version": "2.0.2", | |
| 1432 | + "displayName": "Horizon Theme", | |
| 1433 | + "kind": "theme", | |
| 1434 | + "description": { | |
| 1435 | + "es": "Horizon: oscuro y cálido, con rosas y naranjas.", | |
| 1436 | + "en": "Horizon: warm and dark, with pinks and oranges." | |
| 1437 | + }, | |
| 1438 | + "downloads": 13090, | |
| 1439 | + "rank": 2151, | |
| 1440 | + "verified": true, | |
| 1441 | + "analysis": { | |
| 1442 | + "hasCode": false, | |
| 1443 | + "browserEntry": false, | |
| 1444 | + "categories": [ | |
| 1445 | + "Themes" | |
| 1446 | + ], | |
| 1447 | + "sizes": { | |
| 1448 | + "themes": 6 | |
| 1449 | + }, | |
| 1450 | + "webviews": false, | |
| 1451 | + "ignored": [], | |
| 1452 | + "pack": [], | |
| 1453 | + "themeLabels": [ | |
| 1454 | + "Horizon", | |
| 1455 | + "Horizon Italic", | |
| 1456 | + "Horizon Bold", | |
| 1457 | + "Horizon Bright", | |
| 1458 | + "Horizon Bright Italic", | |
| 1459 | + "Horizon Bright Bold" | |
| 1460 | + ], | |
| 1461 | + "grammarLangs": [], | |
| 1462 | + "languageList": [], | |
| 1463 | + "snippetLangs": [] | |
| 1464 | + } | |
| 1465 | + }, | |
| 1466 | + { | |
| 1467 | + "id": "antfu.theme-vitesse", | |
| 1468 | + "namespace": "antfu", | |
| 1469 | + "name": "theme-vitesse", | |
| 1470 | + "version": "1.0.1", | |
| 1471 | + "displayName": "Vitesse Theme", | |
| 1472 | + "kind": "theme", | |
| 1473 | + "description": { | |
| 1474 | + "es": "Vitesse: temas sobrios en claro, oscuro y negro.", | |
| 1475 | + "en": "Vitesse: understated light, dark and black themes." | |
| 1476 | + }, | |
| 1477 | + "downloads": 12537, | |
| 1478 | + "rank": 2216, | |
| 1479 | + "verified": true, | |
| 1480 | + "analysis": { | |
| 1481 | + "hasCode": false, | |
| 1482 | + "browserEntry": false, | |
| 1483 | + "categories": [ | |
| 1484 | + "Themes" | |
| 1485 | + ], | |
| 1486 | + "sizes": { | |
| 1487 | + "themes": 5 | |
| 1488 | + }, | |
| 1489 | + "webviews": false, | |
| 1490 | + "ignored": [], | |
| 1491 | + "pack": [], | |
| 1492 | + "themeLabels": [ | |
| 1493 | + "Vitesse Light", | |
| 1494 | + "Vitesse Dark", | |
| 1495 | + "Vitesse Black", | |
| 1496 | + "Vitesse Light Soft", | |
| 1497 | + "Vitesse Dark Soft" | |
| 1498 | + ], | |
| 1499 | + "grammarLangs": [], | |
| 1500 | + "languageList": [], | |
| 1501 | + "snippetLangs": [] | |
| 1502 | + } | |
| 1503 | + }, | |
| 1504 | + { | |
| 1505 | + "id": "mrmlnc.vscode-apache", | |
| 1506 | + "namespace": "mrmlnc", | |
| 1507 | + "name": "vscode-apache", | |
| 1508 | + "version": "1.2.0", | |
| 1509 | + "displayName": "Apache Conf", | |
| 1510 | + "kind": "language", | |
| 1511 | + "description": { | |
| 1512 | + "es": "Resalta la configuración de Apache (.htaccess, .conf).", | |
| 1513 | + "en": "Highlights Apache configuration (.htaccess, .conf)." | |
| 1514 | + }, | |
| 1515 | + "downloads": 12365, | |
| 1516 | + "rank": 2240, | |
| 1517 | + "verified": true, | |
| 1518 | + "analysis": { | |
| 1519 | + "hasCode": false, | |
| 1520 | + "browserEntry": false, | |
| 1521 | + "categories": [ | |
| 1522 | + "Programming Languages" | |
| 1523 | + ], | |
| 1524 | + "sizes": { | |
| 1525 | + "languages": 1, | |
| 1526 | + "grammars": 1 | |
| 1527 | + }, | |
| 1528 | + "webviews": false, | |
| 1529 | + "ignored": [], | |
| 1530 | + "pack": [], | |
| 1531 | + "themeLabels": [], | |
| 1532 | + "grammarLangs": [ | |
| 1533 | + "apacheconf" | |
| 1534 | + ], | |
| 1535 | + "languageList": [ | |
| 1536 | + { | |
| 1537 | + "id": "apacheconf", | |
| 1538 | + "config": true, | |
| 1539 | + "name": "Apache", | |
| 1540 | + "extensions": [ | |
| 1541 | + "conf", | |
| 1542 | + ".conf", | |
| 1543 | + "htaccess", | |
| 1544 | + ".htaccess", | |
| 1545 | + "htgroups", | |
| 1546 | + ".htgroups", | |
| 1547 | + "htpasswd", | |
| 1548 | + ".htpasswd" | |
| 1549 | + ] | |
| 1550 | + } | |
| 1551 | + ], | |
| 1552 | + "snippetLangs": [] | |
| 1553 | + } | |
| 1554 | + } | |
| 1555 | + ] | |
| 1556 | +} |
modified web/js/ext/verdict.js +65 −1
| @@ -48,7 +48,9 @@ | ||
| 48 | 48 | // Funciones que no funcionan, en llano y sin repetir. |
| 49 | 49 | export function missingFeatures(f) { |
| 50 | 50 | const claves = []; |
| 51 | - for (const c of f.categories || []) if (POR_CATEGORIA[c]) claves.push(POR_CATEGORIA[c]); | |
| 51 | + // las categorías hablan de lo que hace su código: sin código no falta nada | |
| 52 | + // (un paquete de snippets que se etiqueta «Machine Learning» no deja de funcionar) | |
| 53 | + if (f.hasCode) for (const c of f.categories || []) if (POR_CATEGORIA[c]) claves.push(POR_CATEGORIA[c]); | |
| 52 | 54 | const principales = [...new Set(claves)]; |
| 53 | 55 | for (const i of f.ignored || []) { |
| 54 | 56 | const k = Object.hasOwn(POR_CLAVE, i.key) ? POR_CLAVE[i.key] : 'fOther'; |
| @@ -64,6 +66,68 @@ | ||
| 64 | 66 | return lista((principales.length ? principales : concretas.length ? concretas : [tx('fOwn')]).slice(0, 3)); |
| 65 | 67 | } |
| 66 | 68 | |
| 69 | +// ── de un package.json analizado (vsix.js analyzeManifest) o de un registro | |
| 70 | +// instalado a los «hechos» de arriba. `h` es el host de extensiones (host.js) | |
| 71 | +// o algo con la misma forma: builtinLanguage, grammarSkippedFor, languageName, | |
| 72 | +// languageExtensions. Así el panel, las pruebas y el generador de la lista de | |
| 73 | +// populares (tests/ext_popular_build.mjs) dicen lo mismo. | |
| 74 | +const BONITOS = { | |
| 75 | + javascript: 'JavaScript', typescript: 'TypeScript', javascriptreact: 'JavaScript React', typescriptreact: 'TypeScript React', | |
| 76 | + html: 'HTML', css: 'CSS', scss: 'SCSS', less: 'Less', json: 'JSON', jsonc: 'JSON', vue: 'Vue', python: 'Python', markdown: 'Markdown', | |
| 77 | + shellscript: 'Shell', go: 'Go', rust: 'Rust', java: 'Java', php: 'PHP', ruby: 'Ruby', csharp: 'C#', cpp: 'C++', c: 'C', yaml: 'YAML', | |
| 78 | +}; | |
| 79 | +export function languageName(h, id, langs = []) { | |
| 80 | + return langs.find(l => l.id === id && esTexto(l.name))?.name || h?.languageName?.(id) || BONITOS[id] || id; | |
| 81 | +} | |
| 82 | +export function languageExts(h, id, langs = []) { | |
| 83 | + const propias = langs.filter(l => l.id === id).flatMap(l => l.extensions || []); | |
| 84 | + return [...new Set(propias.length ? propias : h?.languageExtensions?.(id) || [])]; | |
| 85 | +} | |
| 86 | +function facts(h, base, { themes = [], grammarLangs = [], langs = [], snippets = [] }) { | |
| 87 | + const salta = l => !!h?.grammarSkippedFor?.(l); | |
| 88 | + const deSerie = id => !!h?.builtinLanguage?.(id); | |
| 89 | + const conGram = [...new Set(grammarLangs.filter(l => l && !salta(l)))]; | |
| 90 | + // snippets de un lenguaje que Code no tiene (javascriptreact, vue…) no | |
| 91 | + // saldrían nunca: ni se cuentan ni se prometen. Y un mismo fichero que sirve | |
| 92 | + // a varios lenguajes se cuenta una vez. | |
| 93 | + const existe = id => langs.some(l => l.id === id) || !!h?.languageName?.(id) || deSerie(id); | |
| 94 | + const porLang = new Map(); | |
| 95 | + const vistos = new Set(); | |
| 96 | + for (const s of snippets.filter(x => existe(x.language))) { | |
| 97 | + const n = !Number.isFinite(s.count) ? NaN : s.key && vistos.has(s.key) ? 0 : s.count; | |
| 98 | + if (s.key) vistos.add(s.key); | |
| 99 | + porLang.set(s.language, (porLang.has(s.language) ? porLang.get(s.language) : 0) + n); | |
| 100 | + } | |
| 101 | + return { | |
| 102 | + ...base, themes, | |
| 103 | + highlight: conGram.map(id => ({ id, name: languageName(h, id, langs), exts: languageExts(h, id, langs) })), | |
| 104 | + settingsOnly: langs.filter(l => l.config && !deSerie(l.id) && !conGram.includes(l.id)).map(l => languageName(h, l.id, langs)), | |
| 105 | + keepsBuiltin: [...new Set(grammarLangs.filter(l => l && salta(l)))].map(id => languageName(h, id, langs)), | |
| 106 | + snippets: [...porLang].map(([id, n]) => ({ id, name: languageName(h, id, langs), count: Number.isFinite(n) ? n : null })), | |
| 107 | + }; | |
| 108 | +} | |
| 109 | +export function factsFromManifest(h, a) { | |
| 110 | + return facts(h, { hasCode: a.hasCode, browserEntry: a.browserEntry, categories: a.categories || [], sizes: a.sizes || {}, webviews: a.webviews, ignored: a.ignored || [], pack: a.pack || [] }, { | |
| 111 | + themes: a.themeLabels || [], grammarLangs: a.grammarLangs || [], langs: a.languageList || [], | |
| 112 | + snippets: (a.snippetLangs || []).map(language => ({ language, count: null })), | |
| 113 | + }); | |
| 114 | +} | |
| 115 | +export function factsFromRecord(h, e) { | |
| 116 | + // registros de antes de guardar categorías: se asume que lo que se aplica es lo principal | |
| 117 | + const categories = e.categories || ['Programming Languages']; | |
| 118 | + return facts(h, { hasCode: e.hasCode, browserEntry: !!e.browserEntry, categories, sizes: e.sizes || {}, webviews: e.webviews, ignored: e.ignored || [], pack: e.pack || [] }, { | |
| 119 | + themes: (e.themes || []).map(t => t.label), grammarLangs: (e.grammars || []).map(g => g.language ?? null), | |
| 120 | + langs: (e.languages || []).map(l => ({ id: l.id, name: l.aliases?.[0], extensions: l.extensions || [], config: !!l.configKey })), | |
| 121 | + snippets: (e.snippets || []).map(s => ({ language: s.language, key: s.key, count: Number.isFinite(s.count) ? s.count : null })), | |
| 122 | + }); | |
| 123 | +} | |
| 124 | + | |
| 125 | +// ¿Hace algo al instalarla? Lo que decide el filtro «Solo las que funcionan en | |
| 126 | +// Code» del panel: entera o en parte (lo principal funciona). Las que solo | |
| 127 | +// funcionarían por su código, o en las que lo principal es su código y solo | |
| 128 | +// quedaría un resto (unos snippets de una extensión de depurar), no. | |
| 129 | +export const works = v => v.kind === 'full' || v.kind === 'partial'; | |
| 130 | + | |
| 67 | 131 | export function describe(f) { |
| 68 | 132 | const partes = []; // { tipo, texto } |
| 69 | 133 | const themes = f.themes || [], highlight = f.highlight || [], settingsOnly = f.settingsOnly || [], snippets = f.snippets || []; |