diff --git a/src/api/json/catalog.json b/src/api/json/catalog.json index 1f76a93f0d2..6d6d9c1fbbf 100644 --- a/src/api/json/catalog.json +++ b/src/api/json/catalog.json @@ -1035,6 +1035,12 @@ "fileMatch": ["conda-forge.yml"], "url": "https://raw.githubusercontent.com/conda-forge/conda-smithy/main/conda_smithy/data/conda-forge.json" }, + { + "name": "Convex", + "description": "Configuration for Convex project settings", + "fileMatch": ["convex.json"], + "url": "https://json.schemastore.org/convex.json" + }, { "name": "Conjure", "description": "Conjure Human-Readable Format", @@ -7752,7 +7758,7 @@ { "name": "Open Know-How", "description": "Open Source Hardware project metadata", - "fileMatch": ["okh.{json,toml,yml,yaml}"], + "fileMatch": ["?(*.)okh.{json,toml,yml,yaml}"], "url": "https://json.schemastore.org/okh.json" }, { diff --git a/src/schemas/json/convex.json b/src/schemas/json/convex.json new file mode 100644 index 00000000000..05a357a3468 --- /dev/null +++ b/src/schemas/json/convex.json @@ -0,0 +1,51 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/convex.json", + "description": "Configuration for Convex project settings.\n\nDocumentation: https://docs.convex.dev/production/project-configuration#convexjson", + "type": "object", + "properties": { + "$schema": { + "type": "string" + }, + "node": { + "type": "object", + "description": "Configuration for the Convex Node.js runtime, where your actions run that have 'use node' at the top of the file.", + "properties": { + "externalPackages": { + "type": ["array"], + "description": "List of packages that should be installed on the server instead of being bundled by the CLI. Use this for packages that can't be bundled or need to be installed directly on the server.\n\nIf you want to mark all dependencies as external, you can use the string '*' instead of an array.\n\nhttps://docs.convex.dev/functions/bundling#external-packages", + "items": { + "type": "string" + }, + "default": ["*"], + "oneOf": [ + { + "contains": { + "const": "*" + }, + "maxItems": 1 + }, + { + "not": { + "contains": { + "const": "*" + } + } + } + ] + } + } + }, + "generateCommonJSApi": { + "type": "boolean", + "description": "When true, generates CommonJS-compatible API files for projects not using ES modules. Enable this if your project uses require() syntax instead of ES modules.\n\nhttps://docs.convex.dev/client/javascript/node#javascript-with-commonjs-require-syntax", + "default": false + }, + "functions": { + "type": "string", + "description": "Path to the directory containing Convex functions. You can customize this to use a different location than the default 'convex/' directory.\n\nhttps://docs.convex.dev/production/project-configuration#changing-the-convex-folder-name-or-location", + "default": "convex/" + } + }, + "additionalProperties": false +} diff --git a/src/test/convex/convex.json b/src/test/convex/convex.json new file mode 100644 index 00000000000..fb943821114 --- /dev/null +++ b/src/test/convex/convex.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json.schemastore.org/convex.json", + "functions": "convex/", + "generateCommonJSApi": false, + "node": { + "externalPackages": ["*"] + } +}