diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5338acaf..6671fe874 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -244,3 +244,22 @@ jobs: with: name: repomix-output-bun-${{ matrix.os }}-${{ matrix.bun-version }}.txt path: repomix-output.txt + + generate-schema: + name: Update configuration json schema + runs-on: ubuntu-latest + if: ${{ github.ref == 'refs/heads/main' }} + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@v4 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # ratchet:actions/setup-node@v4 + with: + node-version-file: .tool-versions + cache: npm + - run: npm ci + - run: npm run website-generate-schema + - uses: stefanzweifel/git-auto-commit-action@01d77ca6cb089da1360e540865f7d035c95aa199 # ratchet:stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: 'chore(schema): auto generate schema' + commit_user_name: "github-actions[bot]" + commit_user_email: "github-actions[bot]@users.noreply.github.com" + commit_author: "github-actions[bot] " diff --git a/website/client/src/public/schemas/1.3.0/schema.json b/website/client/src/public/schemas/1.3.0/schema.json new file mode 100644 index 000000000..ca2a673b8 --- /dev/null +++ b/website/client/src/public/schemas/1.3.0/schema.json @@ -0,0 +1,144 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "$schema": { + "type": "string" + }, + "input": { + "type": "object", + "properties": { + "maxFileSize": { + "type": "number" + } + }, + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "filePath": { + "type": "string" + }, + "style": { + "type": "string", + "enum": [ + "xml", + "markdown", + "plain" + ] + }, + "parsableStyle": { + "type": "boolean" + }, + "headerText": { + "type": "string" + }, + "instructionFilePath": { + "type": "string" + }, + "fileSummary": { + "type": "boolean" + }, + "directoryStructure": { + "type": "boolean" + }, + "files": { + "type": "boolean" + }, + "removeComments": { + "type": "boolean" + }, + "removeEmptyLines": { + "type": "boolean" + }, + "compress": { + "type": "boolean" + }, + "topFilesLength": { + "type": "number" + }, + "showLineNumbers": { + "type": "boolean" + }, + "truncateBase64": { + "type": "boolean" + }, + "copyToClipboard": { + "type": "boolean" + }, + "includeEmptyDirectories": { + "type": "boolean" + }, + "tokenCountTree": { + "type": [ + "boolean", + "number", + "string" + ] + }, + "git": { + "type": "object", + "properties": { + "sortByChanges": { + "type": "boolean" + }, + "sortByChangesMaxCommits": { + "type": "number" + }, + "includeDiffs": { + "type": "boolean" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "include": { + "type": "array", + "items": { + "type": "string" + } + }, + "ignore": { + "type": "object", + "properties": { + "useGitignore": { + "type": "boolean" + }, + "useDefaultPatterns": { + "type": "boolean" + }, + "customPatterns": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "security": { + "type": "object", + "properties": { + "enableSecurityCheck": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "tokenCount": { + "type": "object", + "properties": { + "encoding": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "title": "Repomix Configuration", + "description": "Schema for repomix.config.json configuration file" +} \ No newline at end of file diff --git a/website/client/src/public/schemas/latest/schema.json b/website/client/src/public/schemas/latest/schema.json index 2adbe72c6..ca2a673b8 100644 --- a/website/client/src/public/schemas/latest/schema.json +++ b/website/client/src/public/schemas/latest/schema.json @@ -61,12 +61,22 @@ "showLineNumbers": { "type": "boolean" }, + "truncateBase64": { + "type": "boolean" + }, "copyToClipboard": { "type": "boolean" }, "includeEmptyDirectories": { "type": "boolean" }, + "tokenCountTree": { + "type": [ + "boolean", + "number", + "string" + ] + }, "git": { "type": "object", "properties": {