mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
refactor(cli): update JSON schemas versions (#28252)
This commit is contained in:
parent
7fa8fc4b26
commit
bc71eb9541
7 changed files with 116 additions and 105 deletions
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"$id": "https://deno.land/x/deno/cli/schemas/config-file.v1.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"description": "A JSON representation of a Deno configuration file.",
|
||||
"required": [],
|
||||
"title": "Deno configuration file Schema",
|
||||
"description": "A JSON representation of a Deno configuration file.",
|
||||
"type": "object",
|
||||
"required": [],
|
||||
"properties": {
|
||||
"compilerOptions": {
|
||||
"type": "object",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"$id": "https://deno.land/x/deno/cli/schemas/kv-metadata-exchange-response.v1.json",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"definitions": {
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$defs": {
|
||||
"Uuid": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
||||
|
@ -12,6 +12,10 @@
|
|||
},
|
||||
"EndpointInfo": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"url",
|
||||
"consistency"
|
||||
],
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string"
|
||||
|
@ -20,35 +24,40 @@
|
|||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["url", "consistency"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"DatabaseMetadata": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"version",
|
||||
"databaseId",
|
||||
"endpoints",
|
||||
"token",
|
||||
"expiresAt"
|
||||
],
|
||||
"properties": {
|
||||
"version": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"databaseId": {
|
||||
"$ref": "#/definitions/Uuid"
|
||||
"$ref": "#/$defs/Uuid"
|
||||
},
|
||||
"endpoints": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/EndpointInfo"
|
||||
"$ref": "#/$defs/EndpointInfo"
|
||||
}
|
||||
},
|
||||
"token": {
|
||||
"type": "string"
|
||||
},
|
||||
"expiresAt": {
|
||||
"$ref": "#/definitions/DateTime"
|
||||
"$ref": "#/$defs/DateTime"
|
||||
}
|
||||
},
|
||||
"required": ["version", "databaseId", "endpoints", "token", "expiresAt"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"$ref": "#/definitions/DatabaseMetadata"
|
||||
"$ref": "#/$defs/DatabaseMetadata"
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://deno.land/x/deno/cli/schemas/lint-rules.v1.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://deno.land/x/deno/cli/schemas/lint-tags.v1.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"enum": ["fresh", "jsr", "jsx", "react", "recommended"]
|
||||
}
|
||||
|
|
|
@ -1,38 +1,7 @@
|
|||
{
|
||||
"$id": "https://deno.land/x/deno/cli/schemas/module-graph.json",
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"description": "A JSON representation of a Deno module dependency graph.",
|
||||
"required": [
|
||||
"root",
|
||||
"modules",
|
||||
"size"
|
||||
],
|
||||
"title": "Deno Dependency Graph Schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"root": {
|
||||
"default": "",
|
||||
"description": "The root specifier for the graph.",
|
||||
"examples": [
|
||||
"https://deno.land/x/mod.ts"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"modules": {
|
||||
"default": [],
|
||||
"description": "The modules that are part of the graph.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/module"
|
||||
}
|
||||
},
|
||||
"size": {
|
||||
"type": "integer",
|
||||
"description": "The total size of all the unique dependencies in the graph in bytes.",
|
||||
"default": 0
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$defs": {
|
||||
"module": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
@ -48,11 +17,11 @@
|
|||
"type": "array",
|
||||
"description": "An array of dependencies of the module.",
|
||||
"items": {
|
||||
"$ref": "#/definitions/dependency"
|
||||
"$ref": "#/$defs/dependency"
|
||||
}
|
||||
},
|
||||
"typeDependency": {
|
||||
"$ref": "#/definitions/dependency",
|
||||
"$ref": "#/$defs/dependency",
|
||||
"description": "The type dependency for the module. This is set when the file contains a reference to its types or the module was supplied with a types header."
|
||||
},
|
||||
"size": {
|
||||
|
@ -113,5 +82,36 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"title": "Deno Dependency Graph Schema",
|
||||
"description": "A JSON representation of a Deno module dependency graph.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"root",
|
||||
"modules",
|
||||
"size"
|
||||
],
|
||||
"properties": {
|
||||
"root": {
|
||||
"default": "",
|
||||
"description": "The root specifier for the graph.",
|
||||
"examples": [
|
||||
"https://deno.land/x/mod.ts"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"modules": {
|
||||
"default": [],
|
||||
"description": "The modules that are part of the graph.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/module"
|
||||
}
|
||||
},
|
||||
"size": {
|
||||
"type": "integer",
|
||||
"description": "The total size of all the unique dependencies in the graph in bytes.",
|
||||
"default": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,33 +1,7 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://deno.land/x/deno/cli/schemas/registry-completions.v1.json",
|
||||
"title": "Deno Registry Completion Schema",
|
||||
"description": "A definition of meta data that allows a Deno language server form auto completion suggestions for modules within a module registry.",
|
||||
"required": [
|
||||
"version",
|
||||
"registries"
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"version": {
|
||||
"description": "The version of the schema document.",
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 1,
|
||||
"examples": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"registries": {
|
||||
"default": [],
|
||||
"description": "The registries that exist for this origin.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/registry"
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$defs": {
|
||||
"registry": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
@ -48,7 +22,7 @@
|
|||
"description": "The variables that are contained in the schema string.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/variable"
|
||||
"$ref": "#/$defs/variable"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -80,5 +54,31 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"title": "Deno Registry Completion Schema",
|
||||
"description": "A definition of meta data that allows a Deno language server form auto completion suggestions for modules within a module registry.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"version",
|
||||
"registries"
|
||||
],
|
||||
"properties": {
|
||||
"version": {
|
||||
"description": "The version of the schema document.",
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 1,
|
||||
"examples": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"registries": {
|
||||
"default": [],
|
||||
"description": "The registries that exist for this origin.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/registry"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,33 +1,7 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://deno.land/x/deno/cli/schemas/registry-completions.v2.json",
|
||||
"title": "Deno Registry Completion Schema",
|
||||
"description": "A definition of meta data that allows a Deno language server form auto completion suggestions for modules within a module registry.",
|
||||
"required": [
|
||||
"version",
|
||||
"registries"
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"version": {
|
||||
"description": "The version of the schema document.",
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 2,
|
||||
"examples": [
|
||||
2
|
||||
]
|
||||
},
|
||||
"registries": {
|
||||
"default": [],
|
||||
"description": "The registries that exist for this origin.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/registry"
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$defs": {
|
||||
"registry": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
@ -48,7 +22,7 @@
|
|||
"description": "The variables that are contained in the schema string.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/variable"
|
||||
"$ref": "#/$defs/variable"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -89,5 +63,31 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"title": "Deno Registry Completion Schema",
|
||||
"description": "A definition of meta data that allows a Deno language server form auto completion suggestions for modules within a module registry.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"version",
|
||||
"registries"
|
||||
],
|
||||
"properties": {
|
||||
"version": {
|
||||
"description": "The version of the schema document.",
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 2,
|
||||
"examples": [
|
||||
2
|
||||
]
|
||||
},
|
||||
"registries": {
|
||||
"default": [],
|
||||
"description": "The registries that exist for this origin.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/registry"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue