From 41d1b6dec02ae2395bfcd047830c4ecb970fb6ae Mon Sep 17 00:00:00 2001 From: Dov Benyomin Sohacheski Date: Thu, 28 May 2026 19:42:06 +0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Render=20feature-store=20manifest?= =?UTF-8?q?=20in=20collapsible?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/editor/features.md | 6 ++++ docs/partials/.gitignore | 1 + scripts/generate-all.mjs | 1 + scripts/generate-fs-manifest.mjs | 56 ++++++++++++++++++++++++++++++++ 4 files changed, 64 insertions(+) create mode 100644 scripts/generate-fs-manifest.mjs diff --git a/docs/editor/features.md b/docs/editor/features.md index dd8ddc7..fa15200 100644 --- a/docs/editor/features.md +++ b/docs/editor/features.md @@ -207,3 +207,9 @@ For more information, visit our [contribution guide](/contribute/). | `talos` | Talos CLI | | ✅ | | `terraform` | Terraform packages and related extensions | | ✅ | | `tshark` | Wireshark terminal CLI | *v0.3.0* | ✅ | + +::: details Feature Store Inventory + + + +::: diff --git a/docs/partials/.gitignore b/docs/partials/.gitignore index b69afe3..656df6f 100644 --- a/docs/partials/.gitignore +++ b/docs/partials/.gitignore @@ -2,3 +2,4 @@ dependencies.md deprecated-variables.md environment-variables.md extensions.md +fs-manifest.md diff --git a/scripts/generate-all.mjs b/scripts/generate-all.mjs index dce6dd5..33831be 100644 --- a/scripts/generate-all.mjs +++ b/scripts/generate-all.mjs @@ -4,3 +4,4 @@ execSync("node ./scripts/generate-dependencies.mjs", { stdio: "inherit" }) execSync("node ./scripts/generate-deprecated-variables.mjs", { stdio: "inherit" }) execSync("node ./scripts/generate-environment-variables.mjs", { stdio: "inherit" }) execSync("node ./scripts/generate-extensions.mjs", { stdio: "inherit" }) +execSync("node ./scripts/generate-fs-manifest.mjs", { stdio: "inherit" }) diff --git a/scripts/generate-fs-manifest.mjs b/scripts/generate-fs-manifest.mjs new file mode 100644 index 0000000..1945c5d --- /dev/null +++ b/scripts/generate-fs-manifest.mjs @@ -0,0 +1,56 @@ +import fs from 'node:fs' +import { resolve } from 'node:path' + +const DATA_PATH = resolve('.vitepress/data/fs-manifest.json') +const OUT_PATH = resolve('docs/partials/fs-manifest.md') +const PLACEHOLDER = '*Pending first sync from `ws-feature-store` CI.*\n' + +if (!fs.existsSync(DATA_PATH)) { + fs.writeFileSync(OUT_PATH, PLACEHOLDER) + console.log('✔ docs/partials/fs-manifest.md updated (placeholder — data file missing)') + process.exit(0) +} + +const manifest = JSON.parse(fs.readFileSync(DATA_PATH, 'utf8')) + +const groups = { apt: [], artifact: [] } + +for (const entry of manifest.packages) { + if (groups[entry.type]) { + groups[entry.type].push(entry) + } +} + +const sections = [ + `*Built: ${manifest.built}*`, + '', +] + +const renderGroup = (heading, entries) => { + if (entries.length === 0) { + return + } + + sections.push( + `## ${heading}`, + '', + '| Name | Version | Architecture |', + '| --- | :---: | :---: |', + ) + + entries + .sort((a, b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase())) + .forEach(({ name, version, architecture }) => { + sections.push( + `| **${name}** | ${version ?? '–'} | ${architecture ?? '–'} |` + ) + }) + + sections.push('') +} + +renderGroup('APT Packages', groups.apt) +renderGroup('Artifacts', groups.artifact) + +fs.writeFileSync(OUT_PATH, sections.join('\n')) +console.log('✔ docs/partials/fs-manifest.md updated')