mirror of
https://github.com/jlengrand/elm-language-client-vscode.git
synced 2026-03-10 08:11:17 +00:00
275 lines
8.3 KiB
JSON
275 lines
8.3 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "JSON schema for elm.json configuration files",
|
|
"definitions": {
|
|
"exactDependency": {
|
|
"description": "Dependencies are specified by [author name]/[package name]: [exact version].",
|
|
"type": "object",
|
|
"patternProperties": {
|
|
"^.+/.+$": {
|
|
"type": "string",
|
|
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"propertyNames": {
|
|
"pattern": "^.+/.+$"
|
|
}
|
|
},
|
|
"rangeDependency": {
|
|
"description": "Dependencies are specified by [author name]/[package name]: [exact version or range]. Range versions look like: [1.0.0 <= v < 2.0.0].",
|
|
"type": "object",
|
|
"patternProperties": {
|
|
"^.+/.+$": {
|
|
"type": "string",
|
|
"pattern": "^\\d+\\.\\d+\\.\\d+$|^\\d+\\.\\d+\\.\\d+\\s*(<=|=|<)\\s*v\\s*(<=|=|<)\\s*\\d+\\.\\d+\\.\\d+$"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"propertyNames": {
|
|
"pattern": "^.+/.+$"
|
|
}
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
},
|
|
"packageSpecificProperties": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "The name of a GitHub repo like 'elm-lang/core' or 'rtfeldman/elm-css'.",
|
|
"type": "string",
|
|
"minLength": 3
|
|
},
|
|
"license": {
|
|
"description": "An OSI approved license for your package.",
|
|
"type": "string",
|
|
"enum": [
|
|
"AFL-1.1",
|
|
"AFL-1.2",
|
|
"AFL-2.0",
|
|
"AFL-2.1",
|
|
"AFL-3.0",
|
|
"APL-1.0",
|
|
"Apache-1.1",
|
|
"Apache-2.0",
|
|
"APSL-1.0",
|
|
"APSL-1.1",
|
|
"APSL-1.2",
|
|
"APSL-2.0",
|
|
"Artistic-1.0",
|
|
"Artistic-1.0-Perl",
|
|
"Artistic-1.0-cl8",
|
|
"Artistic-2.0",
|
|
"AAL",
|
|
"BSL-1.0",
|
|
"BSD-2-Clause",
|
|
"BSD-3-Clause",
|
|
"0BSD",
|
|
"CECILL-2.1",
|
|
"CNRI-Python",
|
|
"CDDL-1.0",
|
|
"CPAL-1.0",
|
|
"CPL-1.0",
|
|
"CATOSL-1.1",
|
|
"CUA-OPL-1.0",
|
|
"EPL-1.0",
|
|
"ECL-1.0",
|
|
"ECL-2.0",
|
|
"EFL-1.0",
|
|
"EFL-2.0",
|
|
"Entessa",
|
|
"EUDatagrid",
|
|
"EUPL-1.1",
|
|
"Fair",
|
|
"Frameworx-1.0",
|
|
"AGPL-3.0",
|
|
"GPL-2.0",
|
|
"GPL-3.0",
|
|
"LGPL-2.1",
|
|
"LGPL-3.0",
|
|
"LGPL-2.0",
|
|
"HPND",
|
|
"IPL-1.0",
|
|
"Intel",
|
|
"IPA",
|
|
"ISC",
|
|
"LPPL-1.3c",
|
|
"LiLiQ-P-1.1",
|
|
"LiLiQ-Rplus-1.1",
|
|
"LiLiQ-R-1.1",
|
|
"LPL-1.02",
|
|
"LPL-1.0",
|
|
"MS-PL",
|
|
"MS-RL",
|
|
"MirOS",
|
|
"MIT",
|
|
"Motosoto",
|
|
"MPL-1.0",
|
|
"MPL-1.1",
|
|
"MPL-2.0",
|
|
"MPL-2.0-no-copyleft-exception",
|
|
"Multics",
|
|
"NASA-1.3",
|
|
"Naumen",
|
|
"NGPL",
|
|
"Nokia",
|
|
"NPOSL-3.0",
|
|
"NTP",
|
|
"OCLC-2.0",
|
|
"OGTSL",
|
|
"OSL-1.0",
|
|
"OSL-2.0",
|
|
"OSL-2.1",
|
|
"OSL-3.0",
|
|
"OSET-PL-2.1",
|
|
"PHP-3.0",
|
|
"PostgreSQL",
|
|
"Python-2.0",
|
|
"QPL-1.0",
|
|
"RPSL-1.0",
|
|
"RPL-1.1",
|
|
"RPL-1.5",
|
|
"RSCPL",
|
|
"OFL-1.1",
|
|
"SimPL-2.0",
|
|
"Sleepycat",
|
|
"SISSL",
|
|
"SPL-1.0",
|
|
"Watcom-1.0",
|
|
"UPL-1.0",
|
|
"NCSA",
|
|
"VSL-1.0",
|
|
"W3C",
|
|
"Xnet",
|
|
"Zlib",
|
|
"ZPL-2.0"
|
|
]
|
|
},
|
|
"summary": {
|
|
"description": "A short summary that will appear on package.elm-lang.org that describes what the package is for. Must be under 80 characters.",
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 79
|
|
},
|
|
"version": {
|
|
"description": "All packages start at '1.0.0' and from there, Elm automatically enforces semantic versioning by comparing API changes.",
|
|
"$ref": "#/definitions/version"
|
|
},
|
|
"elm-version": {
|
|
"description": "The range of Elm compilers that work with your package. Right now '0.19.0 <= v < 0.20.0' is always what you want for this.",
|
|
"type": "string"
|
|
},
|
|
"exposed-modules": {
|
|
"description": "A list of modules that will be exposed to people using your package. The order you list them will be the order they appear on package.elm-lang.org.",
|
|
"type": ["array", "string", "object"],
|
|
"additionalProperties": { "type": "array" },
|
|
"propertyNames": {
|
|
"pattern": "^[A-Z].*$"
|
|
}
|
|
},
|
|
"dependencies": {
|
|
"description": "A list of packages that you depend upon. In each application, there can only be one version of each package, so wide ranges are great. Fewer dependencies is even better though!",
|
|
"$ref": "#/definitions/rangeDependency"
|
|
},
|
|
"test-dependencies": {
|
|
"description": "Dependencies that are only used in the 'tests/' directory by 'elm-test'. Values from these packages will not appear in any final build artifacts.",
|
|
"$ref": "#/definitions/rangeDependency"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"license",
|
|
"summary",
|
|
"version",
|
|
"elm-version",
|
|
"exposed-modules",
|
|
"dependencies",
|
|
"test-dependencies"
|
|
]
|
|
},
|
|
"applicationSpecificProperties": {
|
|
"type": "object",
|
|
"properties": {
|
|
"source-directories": {
|
|
"description": "A list of directories where Elm code lives. Most projects just use 'src' for everything.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"elm-version": {
|
|
"description": "The exact version of Elm this builds with. Should be '0.19.0' for most people!",
|
|
"type": "string",
|
|
"$ref": "#/definitions/version",
|
|
"enum": ["0.19.0"]
|
|
},
|
|
"dependencies": {
|
|
"description": "All the packages you depend upon. We use exact versions, so your elm.json file doubles as a 'lock file' that ensures reliable builds. \n \n You can use modules from any 'direct' dependency in your code. Some 'direct' dependencies have their own dependencies that folks typically do not care about. These are the 'indirect' dependencies. They are listed explicitly so that (1) builds are reproducible and (2) you can easily review the quantity and quality of dependencies.",
|
|
"type": "object",
|
|
"properties": {
|
|
"direct": {
|
|
"$ref": "#/definitions/exactDependency"
|
|
},
|
|
"indirect": {
|
|
"$ref": "#/definitions/exactDependency"
|
|
}
|
|
},
|
|
"required": ["direct", "indirect"]
|
|
},
|
|
"test-dependencies": {
|
|
"description": "All the packages that you use in 'tests/' with 'elm-test' but not in the application you actually want to ship. This also uses exact versions to make tests more reliable.",
|
|
"type": "object",
|
|
"properties": {
|
|
"direct": {
|
|
"$ref": "#/definitions/exactDependency"
|
|
},
|
|
"indirect": {
|
|
"$ref": "#/definitions/exactDependency"
|
|
}
|
|
},
|
|
"required": ["direct", "indirect"]
|
|
}
|
|
},
|
|
"required": [
|
|
"source-directories",
|
|
"elm-version",
|
|
"dependencies",
|
|
"test-dependencies"
|
|
]
|
|
}
|
|
},
|
|
"properties": {
|
|
"type": {
|
|
"description": "Either 'application' or 'package'. All the other fields are based on this choice.",
|
|
"type": "string",
|
|
"enum": ["application", "package"]
|
|
}
|
|
},
|
|
"if": {
|
|
"properties": {
|
|
"type": {
|
|
"enum": ["package"]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"$ref": "#/definitions/packageSpecificProperties"
|
|
},
|
|
"else": {
|
|
"if": {
|
|
"properties": {
|
|
"type": {
|
|
"enum": ["application"]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"$ref": "#/definitions/applicationSpecificProperties"
|
|
},
|
|
"else": {}
|
|
},
|
|
"required": ["type"]
|
|
}
|