-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
schema.json
156 lines (156 loc) · 4.74 KB
/
schema.json
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{
"version": 2,
"title": "Run Commands",
"description": "Run any custom commands with Nx.",
"type": "object",
"cli": "nx",
"outputCapture": "pipe",
"presets": [
{
"name": "Arguments forwarding",
"keys": ["commands"]
},
{
"name": "Custom done conditions",
"keys": ["commands", "readyWhen"]
},
{
"name": "Setting the cwd",
"keys": ["commands", "cwd"]
}
],
"properties": {
"commands": {
"type": "array",
"description": "Commands to run in child process.",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "Command to run in child process."
},
"forwardAllArgs": {
"type": "boolean",
"description": "Whether arguments should be forwarded when interpolation is not present."
},
"prefix": {
"type": "string",
"description": "Prefix in front of every line out of the output"
},
"color": {
"type": "string",
"description": "Color of the output",
"enum": [
"black",
"red",
"green",
"yellow",
"blue",
"magenta",
"cyan",
"white"
]
},
"bgColor": {
"type": "string",
"description": "Background color of the output",
"enum": [
"bgBlack",
"bgRed",
"bgGreen",
"bgYellow",
"bgBlue",
"bgMagenta",
"bgCyan",
"bgWhite"
]
},
"description": {
"type": "string",
"description": "An optional description useful for inline documentation purposes. It is not used as part of the execution of the command."
}
},
"additionalProperties": false,
"required": ["command"]
},
{
"type": "string"
}
]
},
"x-priority": "important"
},
"command": {
"type": "string",
"description": "Command to run in child process.",
"x-priority": "important"
},
"parallel": {
"type": "boolean",
"description": "Run commands in parallel.",
"default": true,
"x-priority": "important"
},
"readyWhen": {
"type": "string",
"description": "String to appear in `stdout` or `stderr` that indicates that the task is done. When running multiple commands, this option can only be used when `parallel` is set to `true`. If not specified, the task is done when all the child processes complete."
},
"args": {
"oneOf": [
{ "type": "array", "items": { "type": "string" } },
{ "type": "string" }
],
"description": "Extra arguments. You can pass them as follows: nx run project:target --args='--wait=100'. You can then use {args.wait} syntax to interpolate them in the workspace config file. See example [above](#chaining-commands-interpolating-args-and-setting-the-cwd)"
},
"envFile": {
"type": "string",
"description": "You may specify a custom .env file path."
},
"color": {
"type": "boolean",
"description": "Use colors when showing output of command.",
"default": false
},
"cwd": {
"type": "string",
"description": "Current working directory of the commands. If it's not specified the commands will run in the workspace root, if a relative path is specified the commands will run in that path relative to the workspace root and if it's an absolute path the commands will run in that path."
},
"env": {
"type": "object",
"description": "Environment variables that will be made available to the commands. This property has priority over the `.env` files.",
"additionalProperties": {
"type": "string"
}
},
"__unparsed__": {
"hidden": true,
"type": "array",
"items": {
"type": "string"
},
"$default": {
"$source": "unparsed"
},
"x-priority": "internal"
},
"mode": {
"type": "string",
"description": "Mode to trigger the command.",
"enum": ["run-one", "run-many"],
"x-priority": "internal"
}
},
"additionalProperties": true,
"oneOf": [
{
"required": ["commands"]
},
{
"required": ["command"]
}
],
"examplesFile": "../../../docs/run-commands-examples.md"
}