mirror of https://github.com/jdx/mise
fix: deprecated attribute in json schema (#3482)
This commit is contained in:
parent
0f80777606
commit
960fbd5ba6
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"$id": "https://mise.jdx.dev/schema/mise.json",
|
"$id": "https://mise.jdx.dev/schema/mise.json",
|
||||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
"$schema": "http://json-schema.org/2019-09/schema#",
|
||||||
"title": "mise",
|
"title": "mise",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$defs": {
|
"$defs": {
|
||||||
|
@ -148,12 +148,13 @@
|
||||||
},
|
},
|
||||||
"asdf": {
|
"asdf": {
|
||||||
"description": "use asdf as a default plugin backend",
|
"description": "use asdf as a default plugin backend",
|
||||||
"deprecated": "Use disable_backends instead.",
|
"type": "boolean",
|
||||||
"type": "boolean"
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"asdf_compat": {
|
"asdf_compat": {
|
||||||
"description": "set to true to ensure .tool-versions will be compatible with asdf",
|
"description": "set to true to ensure .tool-versions will be compatible with asdf",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"cache_prune_age": {
|
"cache_prune_age": {
|
||||||
"default": "30d",
|
"default": "30d",
|
||||||
|
@ -172,7 +173,8 @@
|
||||||
},
|
},
|
||||||
"cargo_binstall": {
|
"cargo_binstall": {
|
||||||
"description": "Use cargo-binstall instead of cargo install if available",
|
"description": "Use cargo-binstall instead of cargo install if available",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"cd": {
|
"cd": {
|
||||||
"description": "Path to change to after launching mise",
|
"description": "Path to change to after launching mise",
|
||||||
|
@ -215,8 +217,8 @@
|
||||||
},
|
},
|
||||||
"disable_default_shorthands": {
|
"disable_default_shorthands": {
|
||||||
"description": "Disables built-in shorthands to asdf/vfox plugins",
|
"description": "Disables built-in shorthands to asdf/vfox plugins",
|
||||||
"deprecated": "Replaced with `disable_default_registry`",
|
"type": "boolean",
|
||||||
"type": "boolean"
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"disable_hints": {
|
"disable_hints": {
|
||||||
"default": [],
|
"default": [],
|
||||||
|
@ -243,7 +245,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"env_file": {
|
"env_file": {
|
||||||
"description": "Path to a file containing environment variables.",
|
"description": "Path to a file containing environment variables to automatically load.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"erlang": {
|
"erlang": {
|
||||||
|
@ -299,8 +301,8 @@
|
||||||
},
|
},
|
||||||
"go_set_gopath": {
|
"go_set_gopath": {
|
||||||
"description": "[deprecated] Set to true to set GOPATH=~/.local/share/mise/installs/go/.../packages.",
|
"description": "[deprecated] Set to true to set GOPATH=~/.local/share/mise/installs/go/.../packages.",
|
||||||
"deprecated": "Use env._go.set_goroot instead.",
|
"type": "boolean",
|
||||||
"type": "boolean"
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"go_set_goroot": {
|
"go_set_goroot": {
|
||||||
"default": true,
|
"default": true,
|
||||||
|
@ -345,14 +347,14 @@
|
||||||
"legacy_version_file": {
|
"legacy_version_file": {
|
||||||
"default": true,
|
"default": true,
|
||||||
"description": "Set to false to disable the idiomatic version files such as .node-version, .ruby-version, etc.",
|
"description": "Set to false to disable the idiomatic version files such as .node-version, .ruby-version, etc.",
|
||||||
"deprecated": "Use idiomatic_version_file instead.",
|
"type": "boolean",
|
||||||
"type": "boolean"
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"legacy_version_file_disable_tools": {
|
"legacy_version_file_disable_tools": {
|
||||||
"default": [],
|
"default": [],
|
||||||
"description": "Specific tools to disable idiomatic version files for.",
|
"description": "Specific tools to disable idiomatic version files for.",
|
||||||
"deprecated": "Use idiomatic_version_file_disable_tools instead.",
|
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
"deprecated": true,
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
|
@ -452,7 +454,8 @@
|
||||||
},
|
},
|
||||||
"profile": {
|
"profile": {
|
||||||
"description": "Profile to use for mise.${MISE_PROFILE}.toml files.",
|
"description": "Profile to use for mise.${MISE_PROFILE}.toml files.",
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"python": {
|
"python": {
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
@ -492,8 +495,8 @@
|
||||||
},
|
},
|
||||||
"venv_auto_create": {
|
"venv_auto_create": {
|
||||||
"description": "Automatically create virtualenvs for python tools.",
|
"description": "Automatically create virtualenvs for python tools.",
|
||||||
"deprecated": "Use env._python.venv instead.",
|
"type": "boolean",
|
||||||
"type": "boolean"
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"venv_stdlib": {
|
"venv_stdlib": {
|
||||||
"description": "Prefer to use venv from Python's standard library.",
|
"description": "Prefer to use venv from Python's standard library.",
|
||||||
|
@ -503,48 +506,48 @@
|
||||||
},
|
},
|
||||||
"python_compile": {
|
"python_compile": {
|
||||||
"description": "If true, compile python from source. If false, use precompiled binaries. If not set, use precompiled binaries if available.",
|
"description": "If true, compile python from source. If false, use precompiled binaries. If not set, use precompiled binaries if available.",
|
||||||
"deprecated": "Use python.compile instead.",
|
"type": "boolean",
|
||||||
"type": "boolean"
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"python_default_packages_file": {
|
"python_default_packages_file": {
|
||||||
"description": "Path to a file containing default python packages to install when installing python.",
|
"description": "Path to a file containing default python packages to install when installing python.",
|
||||||
"deprecated": "Use python.default_packages_file instead.",
|
"type": "string",
|
||||||
"type": "string"
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"python_patch_url": {
|
"python_patch_url": {
|
||||||
"description": "URL to fetch python patches from.",
|
"description": "URL to fetch python patches from.",
|
||||||
"deprecated": "Use python.patch_url instead.",
|
"type": "string",
|
||||||
"type": "string"
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"python_patches_directory": {
|
"python_patches_directory": {
|
||||||
"description": "Directory to fetch python patches from.",
|
"description": "Directory to fetch python patches from.",
|
||||||
"deprecated": "Use python.patch_url instead.",
|
"type": "string",
|
||||||
"type": "string"
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"python_precompiled_arch": {
|
"python_precompiled_arch": {
|
||||||
"description": "Specify the architecture to use for precompiled binaries.",
|
"description": "Specify the architecture to use for precompiled binaries.",
|
||||||
"deprecated": "Use python.precompiled_arch instead.",
|
"type": "string",
|
||||||
"type": "string"
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"python_precompiled_os": {
|
"python_precompiled_os": {
|
||||||
"description": "Specify the OS to use for precompiled binaries.",
|
"description": "Specify the OS to use for precompiled binaries.",
|
||||||
"deprecated": "Use python.precompiled_os instead.",
|
"type": "string",
|
||||||
"type": "string"
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"python_pyenv_repo": {
|
"python_pyenv_repo": {
|
||||||
"description": "URL to fetch pyenv from for compiling python.",
|
"description": "URL to fetch pyenv from for compiling python.",
|
||||||
"deprecated": "Use python.pyenv_repo instead.",
|
"type": "string",
|
||||||
"type": "string"
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"python_venv_auto_create": {
|
"python_venv_auto_create": {
|
||||||
"description": "Automatically create virtualenvs for python tools.",
|
"description": "Automatically create virtualenvs for python tools.",
|
||||||
"deprecated": "Use env._python.venv instead.",
|
"type": "boolean",
|
||||||
"type": "boolean"
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"python_venv_stdlib": {
|
"python_venv_stdlib": {
|
||||||
"description": "Prefer to use venv from Python's standard library.",
|
"description": "Prefer to use venv from Python's standard library.",
|
||||||
"deprecated": "Use python.venv_stdlib instead.",
|
"type": "boolean",
|
||||||
"type": "boolean"
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"quiet": {
|
"quiet": {
|
||||||
"description": "Suppress all output except errors.",
|
"description": "Suppress all output except errors.",
|
||||||
|
@ -665,7 +668,8 @@
|
||||||
"task_run_auto_install": {
|
"task_run_auto_install": {
|
||||||
"default": true,
|
"default": true,
|
||||||
"description": "Automatically install missing tools when executing tasks.",
|
"description": "Automatically install missing tools when executing tasks.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"task_skip": {
|
"task_skip": {
|
||||||
"default": [],
|
"default": [],
|
||||||
|
@ -717,8 +721,8 @@
|
||||||
},
|
},
|
||||||
"vfox": {
|
"vfox": {
|
||||||
"description": "Use vfox as a default plugin backend instead of asdf.",
|
"description": "Use vfox as a default plugin backend instead of asdf.",
|
||||||
"deprecated": "Use disable_backends instead.",
|
"type": "boolean",
|
||||||
"type": "boolean"
|
"deprecated": true
|
||||||
},
|
},
|
||||||
"windows_default_file_shell_args": {
|
"windows_default_file_shell_args": {
|
||||||
"default": "cmd /c",
|
"default": "cmd /c",
|
||||||
|
|
|
@ -97,6 +97,7 @@ default to using an asdf plugin for cmake.
|
||||||
env = "MISE_ASDF_COMPAT"
|
env = "MISE_ASDF_COMPAT"
|
||||||
type = "Bool"
|
type = "Bool"
|
||||||
hide = true
|
hide = true
|
||||||
|
deprecated = "no longer supported"
|
||||||
description = "set to true to ensure .tool-versions will be compatible with asdf"
|
description = "set to true to ensure .tool-versions will be compatible with asdf"
|
||||||
docs = """
|
docs = """
|
||||||
Only output `.tool-versions` files in `mise local|global` which will be usable by asdf.
|
Only output `.tool-versions` files in `mise local|global` which will be usable by asdf.
|
||||||
|
@ -139,6 +140,7 @@ mise use -g cargo-binstall
|
||||||
[cargo_binstall]
|
[cargo_binstall]
|
||||||
type = "Bool"
|
type = "Bool"
|
||||||
hide = true
|
hide = true
|
||||||
|
deprecated = "Use cargo.binstall instead."
|
||||||
optional = true
|
optional = true
|
||||||
description = "Use cargo-binstall instead of cargo install if available"
|
description = "Use cargo-binstall instead of cargo install if available"
|
||||||
|
|
||||||
|
@ -241,8 +243,7 @@ They will be read in order, with the last one taking precedence.
|
||||||
env = "MISE_ENV_FILE"
|
env = "MISE_ENV_FILE"
|
||||||
type = "Path"
|
type = "Path"
|
||||||
optional = true
|
optional = true
|
||||||
description = "Path to a file containing environment variables."
|
description = "Path to a file containing environment variables to automatically load."
|
||||||
hide = true
|
|
||||||
|
|
||||||
[erlang.compile]
|
[erlang.compile]
|
||||||
env = "MISE_ERLANG_COMPILE"
|
env = "MISE_ERLANG_COMPILE"
|
||||||
|
@ -576,6 +577,7 @@ env = "MISE_PROFILE"
|
||||||
type = "String"
|
type = "String"
|
||||||
description = "Profile to use for mise.${MISE_PROFILE}.toml files."
|
description = "Profile to use for mise.${MISE_PROFILE}.toml files."
|
||||||
optional = true
|
optional = true
|
||||||
|
deprecated = "Use MISE_ENV_FILE instead."
|
||||||
hide = true
|
hide = true
|
||||||
|
|
||||||
[python.compile]
|
[python.compile]
|
||||||
|
@ -882,6 +884,7 @@ env = "MISE_TASK_RUN_AUTO_INSTALL"
|
||||||
type = "Bool"
|
type = "Bool"
|
||||||
default = true
|
default = true
|
||||||
hide = true
|
hide = true
|
||||||
|
deprecated = "Use task_auto_install instead."
|
||||||
description = "Automatically install missing tools when executing tasks."
|
description = "Automatically install missing tools when executing tasks."
|
||||||
|
|
||||||
[task_skip]
|
[task_skip]
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { match } from "ts-pattern";
|
||||||
type Element = {
|
type Element = {
|
||||||
default: string | number | boolean;
|
default: string | number | boolean;
|
||||||
description: string;
|
description: string;
|
||||||
deprecated: boolean;
|
deprecated?: boolean;
|
||||||
type: string;
|
type: string;
|
||||||
enum?: string[];
|
enum?: string[];
|
||||||
items?: {
|
items?: {
|
||||||
|
@ -18,7 +18,7 @@ type Props = {
|
||||||
type: string;
|
type: string;
|
||||||
default: string | number | boolean;
|
default: string | number | boolean;
|
||||||
description: string;
|
description: string;
|
||||||
deprecated: boolean;
|
deprecated: string;
|
||||||
enum?: [string][];
|
enum?: [string][];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -55,10 +55,12 @@ function buildElement(key: string, props: Props): Element {
|
||||||
const ele: Element = {
|
const ele: Element = {
|
||||||
default: props.default,
|
default: props.default,
|
||||||
description: props.description,
|
description: props.description,
|
||||||
deprecated: props.deprecated,
|
|
||||||
type,
|
type,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (props.deprecated) {
|
||||||
|
ele.deprecated = true;
|
||||||
|
}
|
||||||
if (props.enum) {
|
if (props.enum) {
|
||||||
ele.enum = props.enum.map((e) => e[0]);
|
ele.enum = props.enum.map((e) => e[0]);
|
||||||
}
|
}
|
||||||
|
@ -87,6 +89,9 @@ for (const key in doc) {
|
||||||
description: props.description,
|
description: props.description,
|
||||||
properties: {},
|
properties: {},
|
||||||
};
|
};
|
||||||
|
if (props.deprecated) {
|
||||||
|
settings[key].deprecated = true;
|
||||||
|
}
|
||||||
settings[key].properties[subkey] = buildElement(
|
settings[key].properties[subkey] = buildElement(
|
||||||
`${key}.${subkey}`,
|
`${key}.${subkey}`,
|
||||||
props[subkey],
|
props[subkey],
|
||||||
|
|
Loading…
Reference in New Issue