diff --git a/src/api/json/catalog.json b/src/api/json/catalog.json index 3b39cc431c1..61b4d14ddc1 100644 --- a/src/api/json/catalog.json +++ b/src/api/json/catalog.json @@ -1865,6 +1865,12 @@ "1.6": "https://raw.githubusercontent.com/CycloneDX/specification/refs/heads/master/schema/bom-1.6.schema.json" } }, + { + "name": "Dark Factory consumer config", + "description": "Unified darkfactory.yaml for the Cerebe / Dark Factory CLI (doctrine, deny, hooks, MCP, critics, policy)", + "fileMatch": ["darkfactory.yaml", "darkfactory.yml"], + "url": "https://raw.githubusercontent.com/momentiq-ai/cerebe/main/schemas/darkfactory/v1.json" + }, { "name": "DataYoga Connections", "description": "Collection of defined source and target connections used within DataYoga jobs", diff --git a/src/schemas/json/prek.json b/src/schemas/json/prek.json index 7f3ddaed829..ae2aa976381 100644 --- a/src/schemas/json/prek.json +++ b/src/schemas/json/prek.json @@ -38,79 +38,79 @@ "type": "object", "properties": { "bun": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "conda": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "coursier": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "dart": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "deno": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "docker": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "docker_image": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "dotnet": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "fail": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "golang": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "haskell": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "julia": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "lua": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "mise": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "node": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "perl": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "php": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "pygrep": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "python": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "r": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "ruby": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "rust": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "script": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "swift": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" }, "system": { - "type": "string" + "$ref": "#/definitions/LanguageVersion" } }, "additionalProperties": false @@ -149,10 +149,6 @@ "orphan": { "description": "Set to true to isolate this project from parent configurations in workspace mode.\nWhen true, files in this project are \"consumed\" by this project and will not be processed\nby parent projects.\nWhen false (default), files in subprojects are processed by both the subproject and\nany parent projects that contain them.", "type": "boolean" - }, - "auto_update": { - "$ref": "#/definitions/UpdateOptions", - "description": "Compatibility alias for `update`. Prefer `update` in new configs." } }, "required": ["repos"], @@ -279,11 +275,11 @@ "description": "Priority used by the scheduler to determine ordering and concurrency.\nHooks with the same priority can run in parallel.\n\nThis is only allowed in project config files (e.g. `.pre-commit-config.yaml`).\nIt is not allowed in manifests (e.g. `.pre-commit-hooks.yaml`)." }, "groups": { - "description": "User-defined hook groups used by `prek run --group` and `--no-group`.\nGroup names cannot be empty or contain whitespace.", + "description": "User-defined hook groups used by `prek run --group` and `--no-group`.\nGroup names cannot be empty, contain whitespace, or start with `@`.", "type": "array", "items": { "type": "string", - "pattern": "^\\S+$" + "pattern": "^[^@\\s]\\S*$" } }, "alias": { @@ -360,8 +356,8 @@ "type": "string" }, "language_version": { - "description": "Run the hook on a specific version of the language.\nDefault is `default`.\nSee .", - "type": "string" + "$ref": "#/definitions/LanguageVersion", + "description": "Select a language version and optionally configure the toolchain source preference.\nDefault is `default`.\nSee ." }, "log_file": { "description": "Write the output of the hook to a file when the hook fails or verbose is enabled.", @@ -392,8 +388,7 @@ "type": "string" } }, - "required": ["id"], - "additionalProperties": true + "required": ["id"] }, "Language": { "type": "string", @@ -482,6 +477,31 @@ } ] }, + "LanguageVersion": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "request": { + "description": "A language-specific version request. Defaults to `default`.", + "type": "string" + }, + "preference": { + "$ref": "#/definitions/ToolchainPreference", + "description": "Which toolchain sources to prefer or require. Defaults to `managed`." + } + }, + "additionalProperties": false + } + ] + }, + "ToolchainPreference": { + "type": "string", + "enum": ["only-managed", "managed", "system", "only-system"] + }, "Shell": { "description": "A predefined shell adapter used to run hook entries as shell source.", "type": "string", @@ -547,11 +567,11 @@ "description": "Priority used by the scheduler to determine ordering and concurrency.\nHooks with the same priority can run in parallel." }, "groups": { - "description": "User-defined hook groups used by `prek run --group` and `--no-group`.\nGroup names cannot be empty or contain whitespace.", + "description": "User-defined hook groups used by `prek run --group` and `--no-group`.\nGroup names cannot be empty, contain whitespace, or start with `@`.", "type": "array", "items": { "type": "string", - "pattern": "^\\S+$" + "pattern": "^[^@\\s]\\S*$" } }, "alias": { @@ -628,8 +648,8 @@ "type": "string" }, "language_version": { - "description": "Run the hook on a specific version of the language.\nDefault is `default`.\nSee .", - "type": "string" + "$ref": "#/definitions/LanguageVersion", + "description": "Select a language version and optionally configure the toolchain source preference.\nDefault is `default`.\nSee ." }, "log_file": { "description": "Write the output of the hook to a file when the hook fails or verbose is enabled.", @@ -660,8 +680,7 @@ "type": "string" } }, - "required": ["id", "name", "entry", "language"], - "additionalProperties": true + "required": ["id", "name", "entry", "language"] }, "MetaRepo": { "type": "object", @@ -707,11 +726,11 @@ "description": "Priority used by the scheduler to determine ordering and concurrency.\nHooks with the same priority can run in parallel.\n\nThis is only allowed in project config files (e.g. `.pre-commit-config.yaml`).\nIt is not allowed in manifests (e.g. `.pre-commit-hooks.yaml`)." }, "groups": { - "description": "User-defined hook groups used by `prek run --group` and `--no-group`.\nGroup names cannot be empty or contain whitespace.", + "description": "User-defined hook groups used by `prek run --group` and `--no-group`.\nGroup names cannot be empty, contain whitespace, or start with `@`.", "type": "array", "items": { "type": "string", - "pattern": "^\\S+$" + "pattern": "^[^@\\s]\\S*$" } }, "alias": { @@ -788,8 +807,8 @@ "type": "string" }, "language_version": { - "description": "Run the hook on a specific version of the language.\nDefault is `default`.\nSee .", - "type": "string" + "$ref": "#/definitions/LanguageVersion", + "description": "Select a language version and optionally configure the toolchain source preference.\nDefault is `default`.\nSee ." }, "log_file": { "description": "Write the output of the hook to a file when the hook fails or verbose is enabled.", @@ -820,8 +839,7 @@ "type": "string" } }, - "required": ["id"], - "additionalProperties": true + "required": ["id"] }, "MetaHooks": { "type": "string", @@ -871,11 +889,11 @@ "description": "Priority used by the scheduler to determine ordering and concurrency.\nHooks with the same priority can run in parallel.\n\nThis is only allowed in project config files (e.g. `.pre-commit-config.yaml`).\nIt is not allowed in manifests (e.g. `.pre-commit-hooks.yaml`)." }, "groups": { - "description": "User-defined hook groups used by `prek run --group` and `--no-group`.\nGroup names cannot be empty or contain whitespace.", + "description": "User-defined hook groups used by `prek run --group` and `--no-group`.\nGroup names cannot be empty, contain whitespace, or start with `@`.", "type": "array", "items": { "type": "string", - "pattern": "^\\S+$" + "pattern": "^[^@\\s]\\S*$" } }, "alias": { @@ -952,8 +970,8 @@ "type": "string" }, "language_version": { - "description": "Run the hook on a specific version of the language.\nDefault is `default`.\nSee .", - "type": "string" + "$ref": "#/definitions/LanguageVersion", + "description": "Select a language version and optionally configure the toolchain source preference.\nDefault is `default`.\nSee ." }, "log_file": { "description": "Write the output of the hook to a file when the hook fails or verbose is enabled.", @@ -984,8 +1002,7 @@ "type": "string" } }, - "required": ["id"], - "additionalProperties": true + "required": ["id"] }, "BuiltinHooks": { "type": "string",