-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevkit-schema.json
More file actions
101 lines (101 loc) · 3.25 KB
/
devkit-schema.json
File metadata and controls
101 lines (101 loc) · 3.25 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{
"title": "DevKit CLI Configuration",
"description": "JSON schema for the .devkitrc configuration file, providing autocompletion and validation.",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"settings": {
"type": "object",
"description": "Global settings for the DevKit CLI.",
"properties": {
"defaultPackageManager": {
"type": "string",
"description": "The default package manager to use for new projects.",
"enum": ["bun", "npm", "yarn", "pnpm"],
"default": "bun"
},
"cacheStrategy": {
"type": "string",
"description": "The default caching strategy for remote templates.",
"enum": ["always-refresh", "never-refresh", "daily"],
"default": "daily"
},
"language": {
"type": "string",
"description": "The language of the CLI's interface.",
"enum": ["en", "fr"],
"default": "en"
}
},
"required": ["defaultPackageManager", "cacheStrategy", "language"],
"additionalProperties": false
},
"templates": {
"type": "object",
"description": "A collection of templates, grouped by the canonical language key.",
"properties": {
"javascript": {
"$ref": "#/definitions/languageConfig"
},
"typescript": {
"$ref": "#/definitions/languageConfig"
},
"nodejs": {
"$ref": "#/definitions/languageConfig"
}
},
"additionalProperties": true
}
},
"required": ["settings", "templates"],
"additionalProperties": false,
"definitions": {
"templateConfig": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "A short description of the template."
},
"location": {
"type": "string",
"description": "The location of the template (e.g., local path, GitHub URL, or a CLI command with the {pm} placeholder)."
},
"alias": {
"type": "string",
"description": "A short alias for the template, used with the -t flag."
},
"cacheStrategy": {
"type": "string",
"description": "The caching strategy for this specific template. Overrides global setting.",
"enum": ["always-refresh", "never-refresh", "daily"]
},
"packageManager": {
"type": "string",
"description": "The package manager to use for this specific template. Overrides global setting.",
"enum": ["bun", "npm", "yarn", "pnpm"]
}
},
"required": ["description", "location"],
"additionalProperties": false
},
"languageConfig": {
"type": "object",
"description": "Templates for a specific programming language ecosystem.",
"properties": {
"templates": {
"type": "object",
"description": "The available templates for this language.",
"patternProperties": {
"^.*$": {
"$ref": "#/definitions/templateConfig"
}
},
"additionalProperties": false
}
},
"required": ["templates"],
"additionalProperties": false
}
}
}