diff --git a/src/api/json/catalog.json b/src/api/json/catalog.json index edebef13c84..4df41056e26 100644 --- a/src/api/json/catalog.json +++ b/src/api/json/catalog.json @@ -1632,6 +1632,17 @@ ], "url": "https://raw.githubusercontent.com/k1LoW/deck/refs/heads/main/schema.yml" }, + { + "name": "DeepMatch deeplinks spec", + "description": "DeepMatch deeplinks YAML configuration file", + "fileMatch": [ + "**/.deeplinks.yml", + "**/*.deeplinks.yml", + "**/.deeplinks.yaml", + "**/*.deeplinks.yaml" + ], + "url": "https://raw.githubusercontent.com/aouledissa/deep-match/main/schemas/deeplinks.schema.json" + }, { "name": "Dein Config", "description": "Dein.vim, a Vim/Neovim plugin manager", diff --git a/src/schemas/json/amplify.json b/src/schemas/json/amplify.json index fe80ce7fb88..f484e625bda 100644 --- a/src/schemas/json/amplify.json +++ b/src/schemas/json/amplify.json @@ -2,18 +2,174 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://json.schemastore.org/amplify.json", "title": "AWS Amplify build specification (amplify.yml)", + "description": "Build settings for AWS Amplify Console. See https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html", "type": "object", "properties": { "version": { - "description": "Schema version (integer as in AWS examples)", - "type": "integer" + "$ref": "#/definitions/version" + }, + "appRoot": { + "$ref": "#/definitions/appRoot" + }, + "env": { + "$ref": "#/definitions/env" + }, + "backend": { + "$ref": "#/definitions/backend" + }, + "frontend": { + "$ref": "#/definitions/frontend" + }, + "test": { + "$ref": "#/definitions/test" + }, + "applications": { + "description": "List of applications for monorepo support", + "type": "array", + "items": { + "$ref": "#/definitions/application" + } + }, + "customHeaders": { + "$ref": "#/definitions/customHeaders" + } + }, + "additionalProperties": true, + "definitions": { + "version": { + "description": "Schema version. Use 1 for current specification.", + "type": "number", + "examples": [1, 0.1] + }, + "appRoot": { + "description": "Path within the repository where the application resides (used in monorepo setups)", + "type": "string" }, "env": { "type": "object", + "description": "Environment configuration", "properties": { "variables": { + "description": "Key-value pairs of environment variables", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": true + }, + "phase": { + "type": "object", + "description": "A build phase containing commands to execute", + "properties": { + "commands": { + "description": "Shell commands to execute in this phase", + "type": "array", + "items": { + "type": "string" + } + }, + "runtime-versions": { + "description": "Runtime versions to use (e.g., nodejs: 18)", "type": "object", "additionalProperties": { + "anyOf": [{ "type": "string" }, { "type": "number" }] + } + } + }, + "additionalProperties": true + }, + "buildPhases": { + "type": "object", + "description": "Build phases with preBuild, build, and postBuild steps", + "properties": { + "preBuild": { + "$ref": "#/definitions/phase", + "description": "Commands to run before the build" + }, + "build": { + "$ref": "#/definitions/phase", + "description": "Build commands" + }, + "postBuild": { + "$ref": "#/definitions/phase", + "description": "Commands to run after the build" + } + }, + "additionalProperties": true + }, + "testPhases": { + "type": "object", + "description": "Test phases with preTest, test, and postTest steps", + "properties": { + "preTest": { + "$ref": "#/definitions/phase", + "description": "Commands to run before tests" + }, + "test": { + "$ref": "#/definitions/phase", + "description": "Test commands" + }, + "postTest": { + "$ref": "#/definitions/phase", + "description": "Commands to run after tests" + } + }, + "additionalProperties": true + }, + "frontendArtifacts": { + "type": "object", + "description": "Build output artifacts configuration", + "properties": { + "files": { + "description": "Files to include in the build artifact (e.g., '**/*' for all files)", + "type": "array", + "items": { + "type": "string" + } + }, + "discard-paths": { + "description": "Whether to flatten the directory structure of artifacts", + "anyOf": [{ "type": "boolean" }, { "type": "string" }] + }, + "baseDirectory": { + "description": "Directory containing the build output", + "type": "string" + } + }, + "additionalProperties": true + }, + "testArtifacts": { + "type": "object", + "description": "Test output artifacts configuration", + "properties": { + "files": { + "description": "Test output files to capture (e.g., screenshots, videos)", + "type": "array", + "items": { + "type": "string" + } + }, + "configFilePath": { + "description": "Path to the test report configuration file", + "type": "string" + }, + "baseDirectory": { + "description": "Directory containing the test output", + "type": "string" + } + }, + "additionalProperties": true + }, + "cache": { + "type": "object", + "description": "Cache configuration for speeding up builds", + "properties": { + "paths": { + "description": "Paths to cache between builds (must be relative to project root)", + "type": "array", + "items": { "type": "string" } } @@ -22,123 +178,116 @@ }, "backend": { "type": "object", + "description": "Backend build configuration", "properties": { "phases": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/phase" - } - }, - "additionalProperties": false + "$ref": "#/definitions/buildPhases" } }, "additionalProperties": true }, "frontend": { "type": "object", + "description": "Frontend build configuration", "properties": { "buildpath": { + "description": "Path to run install/build from (lowercase variant)", + "type": "string" + }, + "buildPath": { + "description": "Path to run install/build from (camelCase variant)", "type": "string" }, "phases": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/phase" - } - }, - "additionalProperties": false + "$ref": "#/definitions/buildPhases" }, "artifacts": { - "type": "object", - "properties": { - "files": { - "type": "array", - "items": { - "type": "string" - } - }, - "discard-paths": { - "type": "boolean" - }, - "baseDirectory": { - "type": "string" - } - }, - "additionalProperties": false + "$ref": "#/definitions/frontendArtifacts" }, "cache": { - "type": "object", - "properties": { - "paths": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false + "$ref": "#/definitions/cache" } }, "additionalProperties": true }, "test": { "type": "object", + "description": "Test build configuration", "properties": { "phases": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/phase" - } - }, - "additionalProperties": false + "$ref": "#/definitions/testPhases" }, "artifacts": { - "type": "object", - "properties": { - "files": { - "type": "array", - "items": { - "type": "string" - } - }, - "configFilePath": { - "type": "string" - }, - "baseDirectory": { - "type": "string" - } - }, - "additionalProperties": false + "$ref": "#/definitions/testArtifacts" } }, "additionalProperties": true - } - }, - "definitions": { - "phase": { + }, + "customHeaderEntry": { "type": "object", + "description": "A custom HTTP response header rule", "properties": { - "commands": { + "pattern": { + "description": "URL path pattern to match", + "type": "string" + }, + "headers": { + "description": "Headers to apply for matching requests", "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "key": { + "description": "Header name", + "type": "string" + }, + "value": { + "description": "Header value", + "type": "string" + } + }, + "required": ["key", "value"], + "additionalProperties": true } + } + }, + "required": ["pattern", "headers"], + "additionalProperties": true + }, + "customHeaders": { + "description": "Custom HTTP response headers (legacy; consider using customHttp.yml instead)", + "type": "array", + "items": { + "$ref": "#/definitions/customHeaderEntry" + } + }, + "application": { + "type": "object", + "description": "A single application configuration within a monorepo", + "properties": { + "appRoot": { + "$ref": "#/definitions/appRoot" }, - "runtime-versions": { - "description": "Optional object to specify runtime versions (e.g. nodejs: 12)", - "type": "object", - "additionalProperties": { - "type": "string" - } + "env": { + "$ref": "#/definitions/env" + }, + "backend": { + "$ref": "#/definitions/backend" + }, + "frontend": { + "$ref": "#/definitions/frontend" + }, + "test": { + "$ref": "#/definitions/test" + }, + "customHeaders": { + "$ref": "#/definitions/customHeaders" } }, + "required": ["appRoot"], "additionalProperties": true } }, - "additionalProperties": true, "examples": [ { "version": 1, @@ -161,7 +310,6 @@ } }, "frontend": { - "buildpath": "", "phases": { "preBuild": { "commands": ["cd react-app", "npm ci"] @@ -171,12 +319,12 @@ } }, "artifacts": { - "files": ["location"], + "files": ["**/*"], "discard-paths": true, - "baseDirectory": "location" + "baseDirectory": "build" }, "cache": { - "paths": ["path"] + "paths": ["node_modules/**/*"] } }, "test": { @@ -197,6 +345,31 @@ "baseDirectory": "location" } } + }, + { + "version": 1, + "applications": [ + { + "appRoot": "frontend", + "frontend": { + "phases": { + "preBuild": { + "commands": ["yarn install"] + }, + "build": { + "commands": ["yarn build"] + } + }, + "artifacts": { + "baseDirectory": "build", + "files": ["**/*"] + }, + "cache": { + "paths": ["node_modules/**/*"] + } + } + } + ] } ] } diff --git a/src/schemas/json/ruff.json b/src/schemas/json/ruff.json index 6fd85cc9b88..7338db6f76e 100644 --- a/src/schemas/json/ruff.json +++ b/src/schemas/json/ruff.json @@ -655,6 +655,10 @@ "Alias": { "type": "string" }, + "AllImports": { + "type": "string", + "enum": ["all"] + }, "AnalyzeOptions": { "description": "Configures Ruff's `analyze` command.", "type": "object", @@ -1176,6 +1180,17 @@ "description": "Options for the `flake8-tidy-imports` plugin", "type": "object", "properties": { + "ban-lazy": { + "description": "Specific modules that may not be imported lazily, or `\"all\"` to forbid lazy imports except\nfor any modules excluded from the selector. This rule is only enforced when targeting\nPython 3.15 or newer.", + "anyOf": [ + { + "$ref": "#/definitions/ImportSelector" + }, + { + "type": "null" + } + ] + }, "ban-relative-imports": { "description": "Whether to ban all relative imports (`\"all\"`), or only those imports\nthat extend into the parent module or beyond (`\"parents\"`).", "anyOf": [ @@ -1200,6 +1215,17 @@ "items": { "type": "string" } + }, + "require-lazy": { + "description": "Specific modules that must be imported lazily in contexts where `lazy import` is legal, or\n`\"all\"` to require every lazily-convertible import to use the `lazy` keyword. Ruff ignores\ncontexts where `lazy import` is invalid, such as functions, classes, `try`/`except`\nblocks, `__future__` imports, and `from ... import *` statements. This rule is only\nenforced when targeting Python 3.15 or newer.", + "anyOf": [ + { + "$ref": "#/definitions/ImportSelector" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -1331,6 +1357,46 @@ } ] }, + "ImportSelection": { + "anyOf": [ + { + "$ref": "#/definitions/AllImports" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "ImportSelector": { + "anyOf": [ + { + "$ref": "#/definitions/ImportSelection" + }, + { + "$ref": "#/definitions/ImportSelectorSettings" + } + ] + }, + "ImportSelectorSettings": { + "type": "object", + "properties": { + "exclude": { + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "include": { + "$ref": "#/definitions/ImportSelection" + } + }, + "additionalProperties": false, + "required": ["include"] + }, "ImportType": { "type": "string", "enum": [ @@ -2479,11 +2545,13 @@ "AIR00", "AIR001", "AIR002", + "AIR003", "AIR3", "AIR30", "AIR301", "AIR302", "AIR303", + "AIR304", "AIR31", "AIR311", "AIR312", @@ -2580,6 +2648,8 @@ "B034", "B035", "B039", + "B04", + "B043", "B9", "B90", "B901", @@ -3589,6 +3659,7 @@ "RUF069", "RUF07", "RUF070", + "RUF071", "RUF1", "RUF10", "RUF100", @@ -3782,6 +3853,7 @@ "TID251", "TID252", "TID253", + "TID254", "TRY", "TRY0", "TRY00", diff --git a/src/schemas/json/ty.json b/src/schemas/json/ty.json index 47cdcb3fa5d..04a12fa940d 100644 --- a/src/schemas/json/ty.json +++ b/src/schemas/json/ty.json @@ -802,7 +802,7 @@ }, "invalid-key": { "title": "detects invalid subscript accesses or TypedDict literal keys", - "description": "## What it does\nChecks for subscript accesses with invalid keys and `TypedDict` construction with an\nunknown key.\n\n## Why is this bad?\nSubscripting with an invalid key will raise a `KeyError` at runtime.\n\nCreating a `TypedDict` with an unknown key is likely a mistake; if the `TypedDict` is\n`closed=true` it also violates the expectations of the type.\n\n## Examples\n```python\nfrom typing import TypedDict\n\nclass Person(TypedDict):\n name: str\n age: int\n\nalice = Person(name=\"Alice\", age=30)\nalice[\"height\"] # KeyError: 'height'\n\nbob: Person = { \"name\": \"Bob\", \"age\": 30 } # typo!\n\ncarol = Person(name=\"Carol\", age=25) # typo!\n```", + "description": "## What it does\nChecks for subscript accesses with invalid keys and `TypedDict` construction with an\nunknown key.\n\n## Why is this bad?\nSubscripting with an invalid key will raise a `KeyError` at runtime.\n\nCreating a `TypedDict` with an unknown key is likely a mistake; if the `TypedDict` is\n`closed=true` it also violates the expectations of the type.\n\n## Examples\n```python\nfrom typing import TypedDict\n\nclass Person(TypedDict):\n name: str\n age: int\n\nalice = Person(name=\"Alice\", age=30)\nalice[\"height\"] # KeyError: 'height'\n\nbob: Person = { \"namee\": \"Bob\", \"age\": 30 } # typo!\n\ncarol = Person(name=\"Carol\", aeg=25) # typo!\n```", "default": "error", "oneOf": [ { diff --git a/src/test/amplify/amplify.yml b/src/test/amplify/amplify.yml index 9c766013658..3a75112972e 100644 --- a/src/test/amplify/amplify.yml +++ b/src/test/amplify/amplify.yml @@ -1,21 +1,51 @@ # yaml-language-server: $schema=../../schemas/json/amplify.json version: 1 -applications: - - appRoot: 'frontend' - frontend: - phases: - preBuild: - commands: - - yarn install - build: - commands: - - yarn build - artifacts: - baseDirectory: build - files: - - '**/*' - cache: - paths: - - node_modules/** - backend: - someKey: someValue +env: + variables: + NODE_ENV: production +backend: + phases: + preBuild: + commands: + - npm install -g @aws-amplify/cli + build: + commands: + - amplifyPush --simple +frontend: + phases: + preBuild: + commands: + - npm ci + runtime-versions: + nodejs: 18 + build: + commands: + - npm run build + postBuild: + commands: + - echo "Build complete" + artifacts: + baseDirectory: build + files: + - '**/*' + discard-paths: false + cache: + paths: + - node_modules/**/* +test: + phases: + preTest: + commands: + - npm ci + test: + commands: + - npm test + postTest: + commands: + - echo "Tests complete" + artifacts: + baseDirectory: cypress + configFilePath: '**/mochawesome.json' + files: + - '**/*.png' + - '**/*.mp4'