Schema
{
"$id": "https://package-wizard.com/schemas/schema-v2.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Package Wizard",
"description": "Package Wizard configuration",
"type": "object",
"additionalProperties": false,
"properties": {
"wizard": {
"$ref": "#/definitions/wizard"
},
"authors": {
"type": "array",
"items": {
"$ref": "#/definitions/author"
}
},
"renames": {
"type": "array",
"items": {
"$ref": "#/definitions/rename"
}
},
"copies": {
"type": "array",
"items": {
"$ref": "#/definitions/copy"
}
},
"removes": {
"type": "array",
"items": {
"$ref": "#/definitions/remove"
}
},
"replaces": {
"type": "array",
"items": {
"$ref": "#/definitions/replace"
}
},
"variables": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/variableYear"
},
{
"$ref": "#/definitions/variableYearRange"
},
{
"$ref": "#/definitions/variableDate"
}
]
},
"additionalProperties": false
},
"dependencies": {
"type": "array",
"items": {
"$ref": "#/definitions/dependency"
},
"uniqueItems": true
},
"questions": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/questionAuthor"
},
{
"$ref": "#/definitions/questionLicense"
},
{
"$ref": "#/definitions/questionText"
},
{
"$ref": "#/definitions/questionSelect"
}
]
},
"additionalProperties": false
}
},
"definitions": {
"wizard": {
"type": "object",
"properties": {
"manager": {
"$ref": "#/definitions/wizardManager"
},
"clean": {
"type": "boolean",
"default": true
},
"localization": {
"type": "string",
"default": "en"
}
},
"additionalProperties": false
},
"wizardManager": {
"type": "object",
"properties": {
"composer": {
"type": "boolean",
"default": true
},
"npm": {
"type": "boolean",
"default": true
},
"yarn": {
"type": "boolean",
"default": false
}
},
"additionalProperties": false
},
"author": {
"type": "object",
"properties": {
"name": {
"oneOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"email": {
"oneOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"with": "email",
"default": null
},
"replace": {
"$ref": "#/definitions/valueReplace",
"default": ":author:"
},
"with": {
"type": "string",
"default": ":name: <:email:>"
}
},
"additionalProperties": false
},
"rename": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"path",
"name"
]
},
"source": {
"type": "string"
},
"target": {
"type": "string"
}
},
"required": [
"type",
"source",
"target"
],
"uniqueItems": true,
"additionalProperties": false
},
"copy": {
"type": "object",
"properties": {
"source": {
"type": "string"
},
"target": {
"type": "string"
}
},
"required": [
"source",
"target"
],
"uniqueItems": true,
"additionalProperties": false
},
"remove": {
"items": [
{
"type": "string"
}
],
"uniqueItems": true,
"additionalProperties": false
},
"replace": {
"type": "object",
"properties": {
"replace": {
"$ref": "#/definitions/valueReplace"
},
"with": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
},
"required": [
"replace",
"with"
],
"uniqueItems": true,
"additionalProperties": false
},
"dependency": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"composer",
"npm",
"yarn"
],
"default": "composer"
},
"name": {
"type": "string",
"minLength": 3
},
"dev": {
"type": "boolean",
"default": false
},
"remove": {
"type": "boolean",
"default": false
}
},
"required": [
"name"
],
"uniqueItems": true,
"additionalProperties": false
},
"variableYear": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "year"
},
"replace": {
"$ref": "#/definitions/valueReplace",
"default": ":year:"
}
},
"required": [
"type"
],
"additionalProperties": false
},
"variableYearRange": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "yearRange"
},
"replace": {
"$ref": "#/definitions/valueReplace",
"default": ":yearRange:"
},
"start": {
"type": "number",
"default": 1970
}
},
"required": [
"type",
"start"
],
"additionalProperties": false
},
"variableDate": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "date"
},
"replace": {
"$ref": "#/definitions/valueReplace",
"default": ":date:"
},
"with": {
"type": "string",
"default": "Y-m-d"
}
},
"required": [
"type"
],
"additionalProperties": false
},
"questionAuthor": {
"type": "object",
"properties": {
"id": {
"type": "string",
"default": null
},
"condition": {
"$ref": "#/definitions/condition"
},
"type": {
"type": "string",
"const": "author"
},
"author": {
"type": "object",
"properties": {
"name": {
"oneOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"email": {
"oneOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"with": "email",
"default": null
}
},
"additionalProperties": false
},
"replace": {
"$ref": "#/definitions/valueReplace",
"default": ":author:"
},
"with": {
"type": "string",
"default": ":name: <:email:>"
}
},
"required": [
"type"
],
"additionalProperties": false
},
"questionLicense": {
"type": "object",
"properties": {
"id": {
"type": "string",
"default": null
},
"condition": {
"$ref": "#/definitions/condition"
},
"type": {
"type": "string",
"const": "license"
},
"default": {
"type": "string",
"default": "mit"
},
"replace": {
"$ref": "#/definitions/valueReplace",
"default": ":license:"
},
"key": {
"$ref": "#/definitions/questionLicenseKey"
},
"file": {
"$ref": "#/definitions/questionLicenseFile"
}
},
"required": [
"type"
],
"additionalProperties": false
},
"questionLicenseKey": {
"type": "object",
"properties": {
"replace": {
"$ref": "#/definitions/valueReplace",
"default": ":licenseKey:"
}
},
"additionalProperties": false
},
"questionLicenseFile": {
"type": "object",
"properties": {
"path": {
"type": "string",
"default": "LICENSE"
},
"replace": {
"$ref": "#/definitions/valueReplace",
"default": ":licensePath:"
}
},
"additionalProperties": false
},
"questionText": {
"type": "object",
"properties": {
"id": {
"type": "string",
"default": null
},
"condition": {
"$ref": "#/definitions/condition"
},
"type": {
"type": "string",
"const": "text"
},
"question": {
"type": "string",
"minLength": 1
},
"placeholder": {
"type": "string",
"default": ""
},
"default": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"default": ""
},
"replace": {
"$ref": "#/definitions/valueReplace"
},
"required": {
"type": "boolean",
"default": true
},
"validation": {
"$ref": "#/definitions/validation"
}
},
"required": [
"type",
"question",
"replace"
],
"additionalProperties": false
},
"questionSelect": {
"type": "object",
"properties": {
"id": {
"type": "string",
"default": null
},
"condition": {
"$ref": "#/definitions/condition"
},
"type": {
"type": "string",
"const": "select"
},
"question": {
"type": "string",
"minLength": 1
},
"options": {
"type": "array",
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": false
}
],
"minItems": 1,
"uniqueItems": true,
"additionalProperties": false
},
"default": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"replace": {
"$ref": "#/definitions/valueReplace"
},
"required": {
"type": "boolean",
"default": true
}
},
"required": [
"type",
"question",
"options",
"replace"
],
"additionalProperties": false
},
"valueReplace": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"uniqueItems": true,
"additionalProperties": false
}
],
"uniqueItems": true,
"additionalProperties": false
},
"validation": {
"type": "array",
"items": [
{
"type": "string"
}
],
"default": null,
"uniqueItems": true,
"additionalProperties": false
},
"condition": {
"oneOf": [
{
"type": "boolean",
"const": true
},
{
"$ref": "#/definitions/comparatorDefault"
},
{
"$ref": "#/definitions/comparatorString"
},
{
"$ref": "#/definitions/comparatorList"
},
{
"$ref": "#/definitions/comparatorPath"
}
]
},
"comparatorDefault": {
"type": "object",
"properties": {
"for": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"<",
"<=",
"=",
"!=",
">",
">="
],
"default": "="
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"additionalProperties": false
}
},
"required": [
"for",
"value"
],
"additionalProperties": false
},
"comparatorString": {
"type": "object",
"properties": {
"for": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"contains",
"doesntContain",
"containsAll",
"doesntContainAll"
]
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"additionalProperties": false
}
],
"additionalProperties": false
}
},
"required": [
"for",
"operator",
"value"
],
"additionalProperties": false
},
"comparatorList": {
"type": "object",
"properties": {
"for": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"in",
"notIn"
]
},
"value": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"additionalProperties": false
},
"additionalProperties": false
}
},
"required": [
"for",
"operator",
"value"
],
"additionalProperties": false
},
"comparatorPath": {
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"pathExists",
"pathDoesNotExist"
]
},
"value": {
"type": "string"
}
},
"required": [
"operator",
"value"
],
"additionalProperties": false
}
}
}
Last modified: 20 March 2025