-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathconfig.ts
More file actions
57 lines (53 loc) · 1.42 KB
/
config.ts
File metadata and controls
57 lines (53 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { defineCollection, z } from 'astro:content'
const frameworksCollection = defineCollection({
type: 'data',
schema: z.object({
name: z.string(),
package: z.string(),
supportsSPA: z.boolean(),
supportsMPA: z.boolean(),
supportsSSG: z.boolean().optional(),
recommended: z.string(),
bundler: z.string(),
otherBundlers: z.array(z.string()).optional(),
}),
})
const devtimeCollection = defineCollection({
type: 'data',
schema: z.object({
name: z.string(),
type: z.string(),
package: z.string(),
prodDependencies: z.number(),
devDependencies: z.number(),
avgInstallTimeMs: z.number(),
minInstallTimeMs: z.number(),
maxInstallTimeMs: z.number(),
coldBuildTimeMs: z.number(),
warmBuildTimeMs: z.number(),
buildOutputSize: z.number(),
nodeModulesSize: z.number(),
nodeModulesSizeProdOnly: z.number(),
timingMeasuredAt: z.string(),
runner: z.string(),
frameworkVersion: z.string().optional(),
}),
})
const runtimeCollection = defineCollection({
type: 'data',
schema: z.object({
name: z.string(),
type: z.string(),
package: z.string(),
ssrOpsPerSec: z.number(),
ssrAvgLatencyMs: z.number(),
ssrSamples: z.number(),
ssrBodySizeKb: z.number(),
ssrDuplicationFactor: z.number(),
}),
})
export const collections = {
frameworks: frameworksCollection,
devtime: devtimeCollection,
runtime: runtimeCollection,
}