mirror of
https://github.com/supabase/supabase.git
synced 2026-07-02 04:54:28 +08:00
In this PR: - The `llms.ts` script is removed from the pipeline. It was just iterating over the sections of the SDK JSON files to generate _dummy_ text files for LLMS to consume. But with a lot of inconsistencies and mistakes. - There's a new script that builds markdown files from the SDK definition files. - The Management API now has a definition file too, it was missing before. - On the www project now there are redirects for the reference text files to the new markdown files in the docs project. - NPM scripts have received better names so that prebuild ones are smaller and all are easier to differentiate.
17 lines
589 B
TypeScript
17 lines
589 B
TypeScript
import { globby } from 'globby'
|
|
import { create as createTar } from 'tar'
|
|
|
|
async function generate() {
|
|
// Create a tar.gz archive of the generated docs, served at /docs/docs.tar.gz.
|
|
// Sorted entries, portable headers, and a fixed mtime keep the output deterministic.
|
|
const archivePath = 'public/docs.tar.gz'
|
|
const entries = (await globby(['**'], { cwd: 'public/markdown' })).sort()
|
|
await createTar(
|
|
{ gzip: true, file: archivePath, cwd: 'public/markdown', portable: true, mtime: new Date() },
|
|
entries
|
|
)
|
|
console.log(`Created archive at ${archivePath}`)
|
|
}
|
|
|
|
generate()
|