{
    "name": "cobol-language-support",
    "displayName": "COBOL Language Support",
    "description": "Code4z rich language support extension for COBOL code and copybooks.",
    "author": "Broadcom",
    "license": "EPL-2.0",
    "version": "2.5.1",
    "preview": false,
    "publisher": "BroadcomMFD",
    "engines": {
        "vscode": "^1.82.0"
    },
    "repository": {
        "type": "git",
        "url": "https://github.com/eclipse/che-che4z-lsp-for-cobol.git"
    },
    "bugs": {
        "url": "https://github.com/eclipse/che-che4z-lsp-for-cobol/issues"
    },
    "keywords": [
        "mainframe",
        "lsp",
        "cobol",
        "z/os",
        "zowe",
        "code4z",
        "ibm",
        "datacom",
        "cics",
        "db2"
    ],
    "categories": [
        "Programming Languages"
    ],
    "activationEvents": [
        "onLanguage:cobol",
        "onFileSystem:cobol-ls-tar"
    ],
    "icon": "resources/logo.png",
    "main": "./dist/extension.js",
    "browser": "./dist/web/extension.js",
    "contributes": {
        "snippets": [
            {
                "language": "cobol",
                "path": "./snippets.json"
            }
        ],
        "commands": [
            {
                "command": "cobol-lsp.cpy-manager.goto-settings",
                "category": "COBOL",
                "title": "Open Copybook Location Settings"
            },
            {
                "command": "cobol-lsp.serverRuntime.goto-settings",
                "category": "COBOL",
                "title": "Open Server Runtime Settings"
            },
            {
                "command": "cobol-lsp.dialects.goto-settings",
                "category": "COBOL",
                "title": "Open Dialect Settings"
            },
            {
                "command": "cobol-lsp.commentLine.toggle",
                "category": "COBOL",
                "title": "Toggle COBOL Line Comment"
            },
            {
                "command": "cobol-lsp.commentLine.comment",
                "category": "COBOL",
                "title": "Add COBOL Line Comment"
            },
            {
                "command": "cobol-lsp.commentLine.uncomment",
                "category": "COBOL",
                "title": "Remove COBOL Line Comment"
            },
            {
                "command": "cobol-lsp.clear.downloaded.copybooks",
                "category": "COBOL",
                "title": "Clear Downloaded Copybooks"
            },
            {
                "command": "cobol-lsp.analysis.logCliAnalysisCommand",
                "category": "COBOL",
                "title": "Logs CLI Analysis command in output channel"
            },
            {
                "command": "cobol-lsp.snippets.insertSnippets",
                "title": "Insert COBOL Snippet",
                "category": "Snippets"
            },
            {
                "command": "cobol-lsp.open.copybook.internalfolder",
                "title": "Open Copybooks Internal Folder",
                "category": "COBOL"
            },
            {
                "command": "cobol-lsp.cpy-manager.reenable.failed.zowe.requests",
                "title": "Reenable failed Zowe requests",
                "category": "COBOL"
            },
            {
                "command": "cobol-lsp.configuration.create-sample",
                "title": "Create sample configuration files",
                "category": "COBOL"
            },
            {
                "command": "cobol-lsp.editor.renumRight",
                "title": "Renumber Columns 73-80",
                "category": "COBOL"
            },
            {
                "command": "cobol-lsp.editor.renumLeft",
                "title": "Renumber Columns 1-6",
                "category": "COBOL"
            },
            {
                "command": "cobol-lsp.editor.unNumberLeft",
                "title": "Unnumber Columns 1-6",
                "category": "COBOL"
            },
            {
                "command": "cobol-lsp.editor.unNumberRight",
                "title": "Unnumber Columns 73-80",
                "category": "COBOL"
            }
        ],
        "menus": {
            "commandPalette": [
                {
                    "command": "cobol-lsp.cpy-manager.goto-settings",
                    "category": "COBOL",
                    "title": "Open Copybook Location Settings"
                },
                {
                    "command": "cobol-lsp.serverRuntime.goto-settings",
                    "category": "COBOL",
                    "title": "Open Server Runtime Settings"
                },
                {
                    "command": "cobol-lsp.dialects.goto-settings",
                    "category": "COBOL",
                    "title": "Open Dialect Settings"
                },
                {
                    "command": "cobol-lsp.commentLine.toggle",
                    "category": "COBOL",
                    "title": "Toggle COBOL Line Comment"
                },
                {
                    "command": "cobol-lsp.commentLine.comment",
                    "category": "COBOL",
                    "title": "Add COBOL Line Comment"
                },
                {
                    "command": "cobol-lsp.commentLine.uncomment",
                    "category": "COBOL",
                    "title": "Remove COBOL Line Comment"
                },
                {
                    "command": "cobol-lsp.clear.downloaded.copybooks",
                    "category": "COBOL",
                    "title": "Clear Downloaded Copybooks"
                },
                {
                    "command": "cobol-lsp.analysis.logCliAnalysisCommand",
                    "category": "COBOL",
                    "title": "Logs CLI Analysis command in output channel"
                },
                {
                    "command": "cobol-lsp.snippets.insertSnippets",
                    "title": "Insert COBOL Snippet",
                    "category": "Snippets"
                },
                {
                    "command": "cobol-lsp.open.copybook.internalfolder",
                    "title": "Open Copybooks Internal Folder",
                    "category": "COBOL"
                }
            ],
            "editor/context": [
                {
                    "when": "editorLangId =~ /^cobol$/i && editorTextFocus && !editorReadonly",
                    "submenu": "renumSubMenu"
                }
            ],
            "renumSubMenu": [
                {
                    "command": "cobol-lsp.editor.renumLeft"
                },
                {
                    "command": "cobol-lsp.editor.renumRight"
                },
                {
                    "command": "cobol-lsp.editor.unNumberLeft"
                },
                {
                    "command": "cobol-lsp.editor.unNumberRight"
                }
            ]
        },
        "submenus": [
            {
                "id": "renumSubMenu",
                "label": "Renumber Sequence Numbers"
            }
        ],
        "languages": [
            {
                "id": "cobol",
                "extensions": [
                    ".cbl",
                    ".cob",
                    ".cobol",
                    ".cpy",
                    ".copy"
                ],
                "aliases": [
                    "COBOL"
                ],
                "configuration": "./syntaxes/lang-config.json",
                "firstLine": "^[0-9 ]{6}([*].*|[ Dd] *([Ii][Dd]([Ee][Nn][Tt][Ii][Ff][Ii][Cc][Aa][Tt][Ii][Oo][Nn])? +[Dd][Ii][Vv][Ii][Ss][Ii][Oo][Nn][. ]|[0-9][0-9] +[@#$A-Z][-A-Z0-9]*[. ]|[*](CBL|PROCESS) ).*)$|^([0-9].{5})?[ ]*(CBL|PROCESS) ",
                "filenamePatterns": [
                    "**/broadcommfd.cobol-language-support/*/copybooks/**"
                ]
            },
            {
                "id": "hpcobol",
                "aliases": [
                    "HP-COBOL"
                ],
                "configuration": "./syntaxes/lang-config-hp.json"
            },
            {
                "id": "endevor-print-cobol",
                "extensions": [
                    ".cbl.prnt",
                    ".cob.prnt",
                    ".cobol.prnt",
                    ".copy.prnt",
                    ".cpy.prnt"
                ],
                "aliases": [
                    "Endevor Print COBOL"
                ]
            }
        ],
        "grammars": [
            {
                "language": "cobol",
                "scopeName": "source.cobol",
                "path": "./syntaxes/COBOL.tmLanguage.json",
                "embeddedLanguages": {
                    "meta.embedded.block.html": "html"
                }
            },
            {
                "scopeName": "meta.embedded.block.cics",
                "path": "./syntaxes/CICS.tmLanguage.json",
                "injectTo": [
                    "source.cobol",
                    "source.ndvr.cobol"
                ]
            },
            {
                "scopeName": "meta.embedded.block.sql",
                "path": "./syntaxes/SQL.tmLanguage.json",
                "embeddedLanguages": {
                    "meta.embedded.block.sql": "sql"
                },
                "injectTo": [
                    "source.cobol",
                    "source.ndvr.cobol"
                ]
            },
            {
                "language": "hpcobol",
                "scopeName": "source.hpcobol",
                "path": "./syntaxes/HP.COBOL.tmLanguage.json",
                "embeddedLanguages": {
                    "meta.embedded.block.html": "html"
                }
            },
            {
                "language": "endevor-print-cobol",
                "scopeName": "source.ndvr.cobol",
                "path": "./syntaxes/NDVR.COBOL.tmLanguage.json",
                "embeddedLanguages": {
                    "meta.embedded.block.html": "html"
                }
            }
        ],
        "configuration": {
            "title": "COBOL Language Support",
            "properties": {
                "cobol-lsp.smart-tab": {
                    "oneOf": [
                        {
                            "type": "boolean"
                        },
                        {
                            "type": "array",
                            "items": {
                                "type": "number"
                            }
                        },
                        {
                            "type": "object",
                            "properties": {
                                "default": {
                                    "type": "array",
                                    "items": {
                                        "type": "number"
                                    }
                                },
                                "anchors": {
                                    "type": "object",
                                    "patternProperties": {
                                        "^.*$": {
                                            "type": "array",
                                            "items": {
                                                "type": "number"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    ],
                    "description": "Enable/disable smart tab",
                    "default": true
                },
                "cobol-lsp.cpy-manager.profiles": {
                    "type": "string",
                    "description": "Current default profile for copybook downloader\nZowe Explorer version 3.0.0 or higher is required to download copybooks from the mainframe"
                },
                "cobol-lsp.cpy-manager.paths-local": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "description": "Default list of local paths to search for copybooks. Folders are searched in the order they are listed.",
                    "uniqueItems": true
                },
                "cobol-lsp.cpy-manager.paths-dsn": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "description": "Default list of datasets to search for copybooks. Datasets are searched in the order they are listed.\nZowe Explorer version 3.0.0 or higher is required to download copybooks from the mainframe",
                    "uniqueItems": true
                },
                "cobol-lsp.cpy-manager.paths-uss": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "description": "Default list of USS paths to search for copybooks. USS paths are searched in the order they are listed.\nZowe Explorer version 3.0.0 or higher is required to download copybooks from the mainframe",
                    "uniqueItems": true
                },
                "cobol-lsp.cpy-manager.copybook-extensions": {
                    "type": "array",
                    "$comment": "Items is converted to an array instead of simple string, to disable the vscode rendering the form for extensions setting, instead shows an hyper link to settings.xml for editing. This is done as empty string is not supported by vscode yet",
                    "items": {
                        "type": [
                            "string"
                        ]
                    },
                    "default": [
                        ".CPY",
                        ".COPY",
                        ".cpy",
                        ".copy",
                        ""
                    ],
                    "description": "List of copybook extensions. Empty string specifies no file extension.",
                    "uniqueItems": true
                },
                "cobol-lsp.cpy-manager.endevor-dependencies": {
                    "type": "string",
                    "enum": [
                        "ZOWE",
                        "ENDEVOR_PROCESSOR"
                    ],
                    "enumDescriptions": [
                        "Use Zowe Explorer to retrieve copybooks from mainframe data sets and USS files specified in the COBOL Language Support extension settings.",
                        "Use Explorer for Endevor to retrieve copybooks from locations specified in the Endevor element processor group."
                    ],
                    "description": "The method that is used to retrieve remote copybooks for elements opened in Explorer for Endevor.",
                    "default": "ZOWE"
                },
                "cobol-lsp.subroutine-manager.paths-local": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "description": "List of relative local paths to search for subroutines",
                    "uniqueItems": true
                },
                "cobol-lsp.logging.level.root": {
                    "type": "string",
                    "default": "ERROR",
                    "enum": [
                        "ERROR",
                        "WARN",
                        "INFO",
                        "DEBUG",
                        "TRACE",
                        "ALL"
                    ],
                    "enumDescriptions": [
                        "ERROR level logs error events which might be fatal to the application",
                        "WARN level logs potentially harmful situations",
                        "INFO level logs informational messages which describe overall progress of the application",
                        "DEBUG level logs informational events of low importance",
                        "TRACE level logs informational events of very low importance",
                        "ALL level is used to turn on all logging"
                    ],
                    "description": "The logging level for COBOL LS backend"
                },
                "cobol-lsp.target-sql-backend": {
                    "type": "string",
                    "default": "DB2_SERVER",
                    "enum": [
                        "DB2_SERVER",
                        "DATACOM_SERVER",
                        "NONE"
                    ],
                    "enumDescriptions": [
                        "DB2_SERVER  - IBM DB2 SQL Server",
                        "DATACOM_SERVER - CA DATACOM Server",
                        "NONE"
                    ],
                    "description": "The target SQL backend server which is used on the mainframe"
                },
                "cobol-lsp.target-sql-backend-enable-processing": {
                    "type": "boolean",
                    "default": "true",
                    "description": "Enables syntactic validation of SQL statements inside EXEC SQL blocks"
                },
                "cobol-lsp.sql-decimal-comma-allowed": {
                    "type": "boolean",
                    "default": false,
                    "description": "Enables comma char use as a decimal marker in SQL statements"
                },
                "cobol-lsp.dialects": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "description": "List of enabled dialects",
                    "uniqueItems": true
                },
                "cobol-lsp.cics.translator": {
                    "type": "boolean",
                    "default": "true",
                    "description": "Enable CICS translator"
                },
                "cobol-lsp.serverRuntime": {
                    "type": "string",
                    "enum": [
                        "JAVA",
                        "NATIVE"
                    ],
                    "default": "JAVA",
                    "enumDescriptions": [
                        "JAVA  - Run from a Java Archive (jar). Requires java runtime to be installed",
                        "NATIVE - Use platform binary"
                    ],
                    "description": "COBOL LS server runtime."
                },
                "cobol-lsp.java.home": {
                    "type": "string",
                    "default": "",
                    "markdownDescription": "Absolute path to the **Java Home** directory. The language server will use the Java executable inside this directory. Leave empty to use the executable from the system PATH.\n\n**Examples:**\n- Windows: `C:\\Program Files\\Java\\jdk-21`\n- macOS / Linux: `/usr/lib/jvm/java-21-openjdk`",
                    "tags": [
                        "requiresRestart"
                    ]
                },
                "cobol-lsp.formatting": {
                    "type": "string",
                    "default": "None",
                    "enum": [
                        "Uppercase",
                        "Lowercase",
                        "None"
                    ],
                    "description": "Formatting settings"
                },
                "cobol-lsp.lspconfig.compiler": {
                    "type": "string",
                    "default": "",
                    "description": "Name of the COBOL compiler used by the LSPConfig"
                },
                "cobol-lsp.lspconfig.preprocessors": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "description": "List of preprocessors used by the LSPConfig",
                    "uniqueItems": true
                },
                "cobol-lsp.analysis-mode": {
                    "type": "string",
                    "enum": [
                        "BASIC",
                        "ADVANCED"
                    ],
                    "enumDescriptions": [
                        "Enables basic syntax checks",
                        "Enables advanced analysis including syntax and semantic checks"
                    ],
                    "description": "Analysis mode",
                    "default": "ADVANCED"
                },
                "cobol-lsp.unused-variable-severity": {
                    "type": "string",
                    "enum": [
                        "ERROR",
                        "WARNING",
                        "INFO",
                        "HINT",
                        "NONE"
                    ],
                    "description": "Unused variable diagnostic severity",
                    "default": "NONE"
                }
            }
        },
        "configurationDefaults": {
            "[cobol]": {
                "editor.guides.indentation": false,
                "editor.rulers": [
                    7,
                    11,
                    72,
                    80
                ],
                "editor.wordSeparators": "!\"#$%&'()*+,./:;<=>?@[\\]^`{|}~"
            },
            "[hpcobol]": {
                "editor.guides.indentation": false,
                "editor.wordSeparators": "!\"#$%&'()*+,./:;<=>?@[\\]^`{|}~"
            }
        },
        "keybindings": [
            {
                "key": "tab",
                "command": "cobol-lsp.smart-tab",
                "when": "editorLangId == cobol && config.cobol-lsp.smart-tab && editorTextFocus && !inSnippetMode && !suggestWidgetVisible"
            },
            {
                "key": "shift+tab",
                "command": "cobol-lsp.smart-outdent",
                "when": "editorLangId == cobol && config.cobol-lsp.smart-tab && editorTextFocus && !inSnippetMode && !suggestWidgetVisible"
            },
            {
                "key": "ctrl+/",
                "mac": "cmd+/",
                "command": "cobol-lsp.commentLine.toggle",
                "when": "editorLangId =~ /^cobol$/i && editorTextFocus && !editorReadonly"
            }
        ],
        "jsonValidation": [
            {
                "fileMatch": "/.cobolplugin/pgm_conf.json",
                "url": "./schema/pgm_conf.schema.json"
            },
            {
                "fileMatch": "/.cobolplugin/proc_grps.json",
                "url": "./schema/proc_grps.schema.json"
            }
        ]
    },
    "scripts": {
        "build": "npm run build:worker && esbuild src/extension.ts --bundle --sourcemap --platform=node --target=node18 --outdir=dist --external:vscode --format=cjs",
        "build:worker": "esbuild src/services/worker/Worker.ts --bundle --sourcemap --platform=node --target=node18 --outdir=dist --external:vscode --format=cjs",
        "build:web": "node build.web.js",
        "build:watch": "npm run build -- --watch",
        "test:integration": "npm run compile && node ./out/test/runTest.js",
        "test:web": "npm run build:web && vscode-test-web --browserType=chromium --headless --extensionDevelopmentPath=. --extensionTestsPath=dist/web/test/suite/extensionTests.js --esm",
        "compile": "npm run build:worker && tsc -p ./",
        "lint-format": "prettier -c .",
        "lint-quality": "eslint ./src",
        "lint-fix": "eslint --fix ./src && prettier -w .",
        "lint": "npm run lint-format && npm run lint-quality",
        "pretest": "npm run compile",
        "pretty": "prettier -w .",
        "watch": "tsc -watch -p ./",
        "test": "jest -w 1 --unhandled-rejections=strict",
        "test-watch": "jest --watchAll -w 1 --unhandled-rejections=strict",
        "coverage": "jest --coverage --runInBand",
        "package": "vsce package --no-dependencies",
        "package:web": "vsce package --target web --no-dependencies"
    },
    "dependencies": {
        "@code4z/analysis": "file:../analysis",
        "@code4z/cobol-dialect-api": "file:../cobol-dialect-api",
        "@vscode/extension-telemetry": "^0.9.8",
        "io-ts": "2.2.21",
        "tar-stream": "^3.1.7",
        "vscode-languageclient": "^9.0.1"
    },
    "devDependencies": {
        "@eslint/js": "^9.15.0",
        "@types/assert": "^1.5.11",
        "@types/fs-extra": "^11.0.4",
        "@types/jest": "^29.5.14",
        "@types/minimatch": "5.1.2",
        "@types/mocha": "^10.0.9",
        "@types/node": "^22.9.0",
        "@types/tar-stream": "^3.1.4",
        "@types/vscode": "1.82",
        "@vscode/test-electron": "^2.4.1",
        "@vscode/test-web": "^0.0.63",
        "@vscode/vsce": "3.2.1",
        "assert": "^2.1.0",
        "c8": "^10.1.3",
        "esbuild": "^0.24.0",
        "esbuild-plugin-polyfill-node": "^0.3.0",
        "eslint": "^9.15.0",
        "fs-extra": "11.2.0",
        "glob": "11.0.0",
        "globals": "^15.12.0",
        "jest": "^29.7.0",
        "jest-jasmine2": "^29.7.0",
        "jest-sonar-reporter": "^2.0.0",
        "mocha": "^10.8.2",
        "prettier": "3.3.3",
        "ts-jest": "^29.2.5",
        "typescript": "^5.6.3",
        "typescript-eslint": "^8.15.0",
        "vscode-uri": "^3.1.0"
    },
    "overrides": {
        "isexe": "^3.1.1"
    }
}