fix(www): review round: disk union narrowing, ci test paths, llms smoke test

This commit is contained in:
Pamela Chia committed 2026-08-26 17:59:19 +08:00
1 parent b522f31060
commit bf5da8f33e
5 files changed
+25 -4

No files matched your search

+2
View File
@@ -10,6 +10,8 @@ on:
- 'apps/www/lib/**/*.js'
- 'apps/www/content/md/**'
- 'apps/www/scripts/**/*.mjs'
- 'apps/www/data/**'
- 'packages/shared-data/**'
# Cancel old builds on new commit for same workflow + branch/PR
concurrency:
@@ -18,7 +18,9 @@ const diskTypes = Object.values(DISK_PRICING).map((disk) => ({
throughput:
disk.includedPerProject && disk.perUnitMonth.throughputMBps !== null
? `${disk.includedPerProject.throughputMBps} MB/s included\nthen ${usd(disk.perUnitMonth.throughputMBps)} per MB/s`
: (disk.throughputNote ?? ''),
: 'throughputNote' in disk
? disk.throughputNote
: '',
durability: `${disk.durabilityPercent}%`,
}))
+15
View File
@@ -0,0 +1,15 @@
import { describe, expect, it } from 'vitest'
import { generatePricingContent } from './llms'
describe('generatePricingContent', () => {
it('builds without throwing and carries the derived billing example', () => {
let content = ''
expect(() => {
content = generatePricingContent()
}).not.toThrow()
expect(content).toContain('in compute credits')
expect(content).toContain('## Disk Storage')
expect(content).toContain('Structured pricing data (JSON): https://supabase.com/pricing.json')
})
})
+3 -1
View File
@@ -136,7 +136,9 @@ function buildDiskSection(): string {
const throughput =
disk.includedPerProject && disk.perUnitMonth.throughputMBps !== null
? `${qty(disk.includedPerProject.throughputMBps)} MB/s included, then ${usd(disk.perUnitMonth.throughputMBps)} per MB/s`
: (disk.throughputNote ?? '')
: 'throughputNote' in disk
? disk.throughputNote
: ''
return [
`${disk.displayName} (${type})`,
+2 -2
View File
@@ -65,7 +65,7 @@ function buildComputeTiers(): ComputeTier[] {
export function buildPricingJson() {
return {
description:
'Machine-readable pricing for https://supabase.com/pricing. Informational, not a billing API. Monthly totals depend on plan quotas, compute credits, and the spend cap encoded below; metered prices apply only beyond includedByPlan quotas.',
"Machine-readable pricing for https://supabase.com/pricing. Informational, not a billing API. Monthly totals depend on plan quotas, compute credits, and the spend cap encoded below; metered prices apply only beyond includedByPlan quotas. In includedByPlan: null means the metric is not available on that plan, 0 means available with no included quota, 'custom' means negotiated.",
source: 'https://supabase.com/pricing',
docs: 'https://supabase.com/docs/guides/platform/org-based-billing',
currency: 'USD',
@@ -94,7 +94,7 @@ export function buildPricingJson() {
durabilityPercent: disk.durabilityPercent,
includedPerProject: disk.includedPerProject,
perUnitMonth: disk.perUnitMonth,
...(disk.throughputNote ? { throughputNote: disk.throughputNote } : {}),
...('throughputNote' in disk ? { throughputNote: disk.throughputNote } : {}),
})),
},
meters: Object.entries(METERS).map(([id, meter]) => ({