Skip to content

Commit

Permalink
feat: add task runner json schema
Browse files Browse the repository at this point in the history
  • Loading branch information
alirezanet committed Jun 15, 2024
1 parent 3fe3449 commit 2e659e0
Showing 1 changed file with 184 additions and 0 deletions.
184 changes: 184 additions & 0 deletions docs/.vuepress/public/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TaskRunner",
"type": "object",
"additionalProperties": false,
"required": [
"tasks"
],
"properties": {
"tasks": {
"type": "array",
"items": {
"$ref": "#/definitions/HuskyTask"
}
},
"variables": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/VariableTask"
}
}
},
"definitions": {
"HuskyTask": {
"type": "object",
"additionalProperties": false,
"required": [
"name",
"command"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"command": {
"type": "string",
"minLength": 1
},
"args": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"output": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/OutputTypes"
}
]
},
"pathMode": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/PathModes"
}
]
},
"cwd": {
"type": [
"null",
"string"
]
},
"group": {
"type": [
"null",
"string"
]
},
"branch": {
"type": [
"null",
"string"
]
},
"windows": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/HuskyTask"
}
]
},
"include": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"exclude": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
}
}
},
"OutputTypes": {
"type": "string",
"description": "",
"x-enumNames": [
"Always",
"Verbose",
"Never"
],
"enum": [
"Always",
"Verbose",
"Never"
]
},
"PathModes": {
"type": "string",
"description": "",
"x-enumNames": [
"Relative",
"Absolute"
],
"enum": [
"Relative",
"Absolute"
]
},
"VariableTask": {
"type": "object",
"additionalProperties": false,
"required": [
"name",
"command"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"command": {
"type": "string",
"minLength": 1
},
"args": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"windows": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/VariableTask"
}
]
}
}
}
}
}

0 comments on commit 2e659e0

Please sign in to comment.