Skip to content

Commit ff7b1cb

Browse files
authored
Update JSON schema for plugin v2 (#1898)
## Summary Update JSON schema for Devbox Plugins ## How was it tested?
1 parent 230ddce commit ff7b1cb

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed

.schema/devbox-plugin.schema.json

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,74 @@
2121
"description": "A short description of the plugin and how it works. This will automatically display when the user first installs the plugin, or runs `devbox info`",
2222
"type": "string"
2323
},
24+
"packages": {
25+
"description": "Collection of packages to install",
26+
"oneOf": [
27+
{
28+
"type": "array",
29+
"items": {
30+
"description": "Name and version of each package in name@version format.",
31+
"type": "string"
32+
}
33+
},
34+
{
35+
"type": "object",
36+
"description": "Name of each package in {\"name\": {\"version\": \"1.2.3\"}} format.",
37+
"patternProperties": {
38+
".*": {
39+
"oneOf": [
40+
{
41+
"type": "object",
42+
"description": "Version number of the specified package in {\"version\": \"1.2.3\"} format.",
43+
"properties": {
44+
"version": {
45+
"type": "string",
46+
"description": "Version of the package"
47+
},
48+
"platforms": {
49+
"type": "array",
50+
"description": "Names of platforms to install the package on. This package will be skipped for any platforms not on this list",
51+
"items": {
52+
"enum": [
53+
"i686-linux",
54+
"aarch64-linux",
55+
"aarch64-darwin",
56+
"x86_64-darwin",
57+
"x86_64-linux",
58+
"armv7l-linux"
59+
]
60+
}
61+
},
62+
"excluded_platforms": {
63+
"type": "array",
64+
"description": "Names of platforms to exclude the package on",
65+
"items": {
66+
"enum": [
67+
"i686-linux",
68+
"aarch64-linux",
69+
"aarch64-darwin",
70+
"x86_64-darwin",
71+
"x86_64-linux",
72+
"armv7l-linux"
73+
]
74+
}
75+
},
76+
"glibc_patch": {
77+
"type": "boolean",
78+
"description": "Whether to patch glibc to the latest available version for this package"
79+
}
80+
}
81+
},
82+
{
83+
"type": "string",
84+
"description": "Version of the package to install."
85+
}
86+
]
87+
}
88+
}
89+
}
90+
]
91+
},
2492
"env": {
2593
"type": "object",
2694
"description": "List of additional environment variables to be set in the Devbox environment. These can be overridden by environment variables set in the user's devbox.json",
@@ -48,8 +116,30 @@
48116
"init_hook": {
49117
"type": ["array", "string"],
50118
"description": "Shell command to run right before initializing the user's shell, running a script, or starting a service"
119+
},
120+
"scripts": {
121+
"description": "List of command/script definitions to run with `devbox run <script_name>`.",
122+
"type": "object",
123+
"patternProperties": {
124+
".*": {
125+
"description": "Alias name for the script.",
126+
"type": ["array", "string"],
127+
"items": {
128+
"type": "string",
129+
"description": "The script's shell commands."
130+
}
131+
}
132+
}
51133
}
52134
}
135+
},
136+
"include": {
137+
"description": "List of additional plugins to activate within your devbox shell",
138+
"type": "array",
139+
"items": {
140+
"description": "Name of the plugin to activate.",
141+
"type": "string"
142+
}
53143
}
54144
},
55145
"required": ["name", "version", "readme"]

0 commit comments

Comments
 (0)