diff --git a/src/api/json/catalog.json b/src/api/json/catalog.json index 5abb7a07dd5..58dcef1f656 100644 --- a/src/api/json/catalog.json +++ b/src/api/json/catalog.json @@ -1346,7 +1346,7 @@ "name": "Convex", "description": "Configuration for Convex project settings", "fileMatch": ["convex.json"], - "url": "https://www.schemastore.org/convex.json" + "url": "https://raw.githubusercontent.com/get-convex/convex-backend/refs/heads/main/npm-packages/convex/schemas/convex.schema.json" }, { "name": "Conjure", diff --git a/src/schemas/json/convex.json b/src/schemas/json/convex.json deleted file mode 100644 index 1f5e40005ed..00000000000 --- a/src/schemas/json/convex.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://json.schemastore.org/convex.json", - "description": "Configuration schema for Convex project settings.\n\nDocumentation: https://docs.convex.dev/production/project-configuration#convexjson", - "type": "object", - "properties": { - "$schema": { - "type": "string" - }, - "node": { - "type": "object", - "description": "Node.js specific configuration for server-side packages and dependencies.", - "properties": { - "externalPackages": { - "type": ["array"], - "description": "List of packages that should be installed on the server instead of being bundled. 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\nDocumentation: https://docs.convex.dev/functions/bundling#external-packages", - "items": { - "type": "string" - }, - "default": ["*"], - "oneOf": [ - { - "contains": { - "const": "*" - }, - "maxItems": 1 - }, - { - "not": { - "contains": { - "const": "*" - } - } - } - ] - }, - "nodeVersion": { - "type": "string", - "description": "The Node.js version to use for Node.js actions. The currently supported values are '18', '20', and '22'.\n\nDocumentation: https://docs.convex.dev/production/project-configuration#configuring-the-nodejs-version", - "default": "20" - } - } - }, - "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\nDocumentation: https://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\nDocumentation: https://docs.convex.dev/production/project-configuration#changing-the-convex-folder-name-or-location", - "default": "convex/" - }, - "codegen": { - "type": "object", - "description": "Configuration for Convex code generation.", - "properties": { - "staticApi": { - "type": "boolean", - "description": "When true, generates static `api.d.ts` files, which improves autocomplete and incremental typechecking performance in large codebases.\n\nDocumentation: https://docs.convex.dev/production/project-configuration#using-static-code-generation-beta", - "default": false - }, - "staticDataModel": { - "type": "boolean", - "description": "When true, generates static `dataModel.d.ts` files, which improves autocomplete and incremental typechecking performance in large codebases.\n\nDocumentation: https://docs.convex.dev/production/project-configuration#using-static-code-generation-beta", - "default": false - } - } - } - }, - "additionalProperties": false -} diff --git a/src/schemas/json/tunnelhub.json b/src/schemas/json/tunnelhub.json index 346361dba87..f179a411e7c 100644 --- a/src/schemas/json/tunnelhub.json +++ b/src/schemas/json/tunnelhub.json @@ -118,6 +118,21 @@ "required": ["lambdaLayers"] } } + }, + "stsAccess": { + "additionalProperties": false, + "properties": { + "assumeRoles": { + "items": { + "pattern": "^arn:aws:iam::\\d{12}:role/[a-zA-Z0-9+=,.@_-]+$", + "type": "string" + }, + "minItems": 1, + "type": "array" + } + }, + "required": ["assumeRoles"], + "type": "object" } }, "required": ["runtimeEngine", "entrypoint", "runtime", "memorySize"], diff --git a/src/schemas/json/ty.json b/src/schemas/json/ty.json index 58fb701e296..089e8424c51 100644 --- a/src/schemas/json/ty.json +++ b/src/schemas/json/ty.json @@ -110,7 +110,7 @@ ] }, "root": { - "description": "The root paths of the project, used for finding first-party modules.\n\nAccepts a list of directory paths searched in priority order (first has highest priority).\n\nIf left unspecified, ty will try to detect common project layouts and initialize `root` accordingly:\n\n* if a `./src` directory exists, include `.` and `./src` in the first party search path (src layout or flat)\n* if a `.//` directory exists, include `.` and `./` in the first party search path\n* otherwise, default to `.` (flat layout)\n\nBesides, if a `./python` or `./tests` directory exists and is not a package (i.e. it does not contain an `__init__.py` or `__init__.pyi` file),\nit will also be included in the first party search path.", + "description": "The root paths of the project, used for finding first-party modules.\n\nAccepts a list of directory paths searched in priority order (first has highest priority).\n\nIf left unspecified, ty will try to detect common project layouts and initialize `root` accordingly:\n\n* if a `./src` directory exists, include `.` and `./src` in the first party search path (src layout or flat)\n* if a `.//` directory exists, include `.` and `./` in the first party search path\n* otherwise, default to `.` (flat layout)\n\nAdditionally, if a `./python` directory exists and is not a package (i.e. it does not contain an `__init__.py` or `__init__.pyi` file),\nit will also be included in the first party search path.", "type": ["array", "null"], "items": { "$ref": "#/definitions/RelativePathBuf" @@ -578,9 +578,19 @@ } ] }, + "invalid-frozen-dataclass-subclass": { + "title": "detects dataclasses with invalid frozen/non-frozen subclassing", + "description": "## What it does\nChecks for dataclasses with invalid frozen inheritance:\n- A frozen dataclass cannot inherit from a non-frozen dataclass.\n- A non-frozen dataclass cannot inherit from a frozen dataclass.\n\n## Why is this bad?\nPython raises a `TypeError` at runtime when either of these inheritance\npatterns occurs.\n\n## Example\n\n```python\nfrom dataclasses import dataclass\n\n@dataclass\nclass Base:\n x: int\n\n@dataclass(frozen=True)\nclass Child(Base): # Error raised here\n y: int\n\n@dataclass(frozen=True)\nclass FrozenBase:\n x: int\n\n@dataclass\nclass NonFrozenChild(FrozenBase): # Error raised here\n y: int\n```", + "default": "error", + "oneOf": [ + { + "$ref": "#/definitions/Level" + } + ] + }, "invalid-generic-class": { "title": "detects invalid generic classes", - "description": "## What it does\nChecks for the creation of invalid generic classes\n\n## Why is this bad?\nThere are several requirements that you must follow when defining a generic class.\n\n## Examples\n```python\nfrom typing import Generic, TypeVar\n\nT = TypeVar(\"T\") # okay\n\n# error: class uses both PEP-695 syntax and legacy syntax\nclass C[U](Generic[T]): ...\n```\n\n## References\n- [Typing spec: Generics](https://typing.python.org/en/latest/spec/generics.html#introduction)", + "description": "## What it does\nChecks for the creation of invalid generic classes\n\n## Why is this bad?\nThere are several requirements that you must follow when defining a generic class.\nMany of these result in `TypeError` being raised at runtime if they are violated.\n\n## Examples\n```python\nfrom typing_extensions import Generic, TypeVar\n\nT = TypeVar(\"T\")\nU = TypeVar(\"U\", default=int)\n\n# error: class uses both PEP-695 syntax and legacy syntax\nclass C[U](Generic[T]): ...\n\n# error: type parameter with default comes before type parameter without default\nclass D(Generic[U, T]): ...\n```\n\n## References\n- [Typing spec: Generics](https://typing.python.org/en/latest/spec/generics.html#introduction)", "default": "error", "oneOf": [ { @@ -1163,7 +1173,7 @@ "type": ["boolean", "null"] }, "root": { - "description": "The root of the project, used for finding first-party modules.\n\nIf left unspecified, ty will try to detect common project layouts and initialize `src.root` accordingly:\n\n* if a `./src` directory exists, include `.` and `./src` in the first party search path (src layout or flat)\n* if a `.//` directory exists, include `.` and `./` in the first party search path\n* otherwise, default to `.` (flat layout)\n\nBesides, if a `./tests` directory exists and is not a package (i.e. it does not contain an `__init__.py` file),\nit will also be included in the first party search path.", + "description": "The root of the project, used for finding first-party modules.\n\nIf left unspecified, ty will try to detect common project layouts and initialize `src.root` accordingly:\n\n* if a `./src` directory exists, include `.` and `./src` in the first party search path (src layout or flat)\n* if a `.//` directory exists, include `.` and `./` in the first party search path\n* otherwise, default to `.` (flat layout)\n\nAdditionally, if a `./python` directory exists and is not a package (i.e. it does not contain an `__init__.py` file),\nit will also be included in the first party search path.", "anyOf": [ { "$ref": "#/definitions/RelativePathBuf" diff --git a/src/test/convex/convex.json b/src/test/convex/convex.json deleted file mode 100644 index 5ee562556ce..00000000000 --- a/src/test/convex/convex.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://www.schemastore.org/convex.json", - "codegen": { - "staticApi": false, - "staticDataModel": false - }, - "functions": "convex/", - "generateCommonJSApi": false, - "node": { - "externalPackages": ["*"], - "nodeVersion": "22" - } -}