Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/editor/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

<!--@include: ../partials/fs-manifest.md -->

:::
1 change: 1 addition & 0 deletions docs/partials/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ dependencies.md
deprecated-variables.md
environment-variables.md
extensions.md
fs-manifest.md
1 change: 1 addition & 0 deletions scripts/generate-all.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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" })
56 changes: 56 additions & 0 deletions scripts/generate-fs-manifest.mjs
Original file line number Diff line number Diff line change
@@ -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')
Loading