mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 10:25:06 +03:00
fix(www): review round: disk union narrowing, ci test paths, llms smoke test
This commit is contained in:
1 parent
b522f31060
commit
bf5da8f33e
5 files changed
+25
-4
No files matched your search
@@ -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}%`,
|
||||
}))
|
||||
|
||||
|
||||
@@ -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')
|
||||
})
|
||||
})
|
||||
@@ -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})`,
|
||||
|
||||
@@ -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]) => ({
|
||||
|
||||
Reference in new issue
Block a user