263 строки
8.7 KiB
JSON
263 строки
8.7 KiB
JSON
{
|
|
"name": "psrule-vscode-dev",
|
|
"displayName": "PSRule (Dev)",
|
|
"version": "0.0.1",
|
|
"publisher": "bewhite",
|
|
"description": "Validate infrastructure as code (IaC) and DevOps repositories using PSRule.",
|
|
"author": {
|
|
"name": "Bernie White"
|
|
},
|
|
"engines": {
|
|
"vscode": "^1.56.0"
|
|
},
|
|
"license": "SEE LICENSE IN LICENSE",
|
|
"homepage": "https://github.com/Microsoft/PSRule-vscode/blob/main/README.md",
|
|
"categories": [
|
|
"Other",
|
|
"Snippets"
|
|
],
|
|
"keywords": [
|
|
"PowerShell"
|
|
],
|
|
"galleryBanner": {
|
|
"color": "#0072c6",
|
|
"theme": "dark"
|
|
},
|
|
"icon": "images/icon128.png",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/Microsoft/PSRule-vscode.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/Microsoft/PSRule-vscode/issues"
|
|
},
|
|
"private": true,
|
|
"preview": true,
|
|
"activationEvents": [
|
|
"onLanguage:powershell",
|
|
"workspaceContains:/ps-rule.yaml",
|
|
"workspaceContains:**/*.Rule.yaml",
|
|
"workspaceContains:**/*.Rule.ps1",
|
|
"onCommand:workbench.action.tasks.runTask"
|
|
],
|
|
"main": "./out/dist/main.js",
|
|
"contributes": {
|
|
"configuration": [
|
|
{
|
|
"title": "PSRule",
|
|
"properties": {
|
|
"PSRule.execution.notProcessedWarning": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "Warn when objects are not processed by any rule.",
|
|
"scope": "window"
|
|
},
|
|
"PSRule.experimental.enabled": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "Enables experimental features in the PSRule extension.",
|
|
"scope": "application"
|
|
},
|
|
"PSRule.notifications.showChannelUpgrade": {
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Specifies if a notification to switch to the stable channel is shown on start up.",
|
|
"scope": "application"
|
|
},
|
|
"PSRule.output.as": {
|
|
"type": "string",
|
|
"default": "Summary",
|
|
"description": "Configures the output of analysis tasks, either summary or detailed.",
|
|
"enum": [
|
|
"Detail",
|
|
"Summary"
|
|
],
|
|
"scope": "window"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"taskDefinitions": [
|
|
{
|
|
"type": "PSRule",
|
|
"required": [],
|
|
"properties": {
|
|
"path": {
|
|
"type": "string",
|
|
"description": "The path containing rules.",
|
|
"default": "./.ps-rule/"
|
|
},
|
|
"inputPath": {
|
|
"type": "string",
|
|
"description": "The path PSRule will look for input files. Defaults to workspace root.",
|
|
"default": "."
|
|
},
|
|
"baseline": {
|
|
"type": "string",
|
|
"description": "The name of a PSRule baseline to use. Baselines can be used from modules or specified in a separate file."
|
|
},
|
|
"modules": {
|
|
"type": "array",
|
|
"description": "The name of one or more modules to use."
|
|
},
|
|
"outcome": {
|
|
"type": "array",
|
|
"items": {
|
|
"enum": [
|
|
"Pass",
|
|
"Fail",
|
|
"Error"
|
|
]
|
|
},
|
|
"default": [
|
|
"Fail",
|
|
"Error"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"snippets": [
|
|
{
|
|
"language": "powershell",
|
|
"path": "./snippets/powershell.json"
|
|
},
|
|
{
|
|
"language": "markdown",
|
|
"path": "./snippets/markdown.json"
|
|
},
|
|
{
|
|
"language": "yaml",
|
|
"path": "./snippets/yaml.json"
|
|
}
|
|
],
|
|
"grammars": [
|
|
{
|
|
"path": "./syntaxes/comments.json",
|
|
"scopeName": "PSRule-powershell-comments",
|
|
"injectTo": [
|
|
"source.powershell"
|
|
]
|
|
},
|
|
{
|
|
"path": "./syntaxes/keywords.json",
|
|
"scopeName": "PSRule-powershell-keywords",
|
|
"injectTo": [
|
|
"source.powershell"
|
|
]
|
|
},
|
|
{
|
|
"path": "./syntaxes/rule.json",
|
|
"scopeName": "PSRule-powershell-rule",
|
|
"injectTo": [
|
|
"source.powershell"
|
|
]
|
|
},
|
|
{
|
|
"path": "./syntaxes/yaml-comments.json",
|
|
"scopeName": "PSRule-yaml-comments",
|
|
"injectTo": [
|
|
"source.yaml"
|
|
]
|
|
}
|
|
],
|
|
"yamlValidation": [
|
|
{
|
|
"fileMatch": "ps-rule.yaml",
|
|
"url": "./schemas/PSRule-options.schema.json"
|
|
},
|
|
{
|
|
"fileMatch": "ps-rule.yml",
|
|
"url": "./schemas/PSRule-options.schema.json"
|
|
},
|
|
{
|
|
"fileMatch": "psrule.yaml",
|
|
"url": "./schemas/PSRule-options.schema.json"
|
|
},
|
|
{
|
|
"fileMatch": "psrule.yml",
|
|
"url": "./schemas/PSRule-options.schema.json"
|
|
},
|
|
{
|
|
"fileMatch": "**/*.Rule.yaml",
|
|
"url": "./schemas/PSRule-language.schema.json"
|
|
}
|
|
],
|
|
"problemMatchers": [
|
|
{
|
|
"name": "PSRule",
|
|
"label": "PSRule",
|
|
"owner": "PSRule",
|
|
"source": "PSRule",
|
|
"severity": "error",
|
|
"fileLocation": [
|
|
"relative",
|
|
"${workspaceFolder}"
|
|
],
|
|
"pattern": [
|
|
{
|
|
"regexp": "^\\s+(FAIL)\\s+(.*)$",
|
|
"code": 2
|
|
},
|
|
{
|
|
"regexp": "^$"
|
|
},
|
|
{
|
|
"regexp": "^\\s+(.*)$",
|
|
"message": 1
|
|
},
|
|
{
|
|
"regexp": "^$"
|
|
},
|
|
{
|
|
"regexp": "^\\s+(.*): (.*):(\\d+):(\\d+)$",
|
|
"file": 2,
|
|
"line": 3,
|
|
"column": 4,
|
|
"loop": true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"scripts": {
|
|
"compile": "tsc -p ./",
|
|
"watch": "tsc -watch -p ./",
|
|
"pack": "vsce package",
|
|
"publish": "vsce publish",
|
|
"lint": "eslint . --ext .ts,.tsx",
|
|
"pretest": "npm run compile",
|
|
"test": "node ./out/dist/test/runTest.js",
|
|
"vscode:prepublish": "npm run -S esbuild-base -- --minify",
|
|
"esbuild-base": "esbuild ./src/main.ts --bundle --outfile=out/dist/main.js --external:vscode --format=cjs --platform=node",
|
|
"esbuild": "npm run -S esbuild-base -- --sourcemap",
|
|
"esbuild-watch": "npm run -S esbuild-base -- --sourcemap --watch"
|
|
},
|
|
"dependencies": {
|
|
"vscode-languageclient": "^7.0.0"
|
|
},
|
|
"extensionDependencies": [
|
|
"vscode.powershell",
|
|
"ms-vscode.powershell",
|
|
"redhat.vscode-yaml"
|
|
],
|
|
"devDependencies": {
|
|
"@types/glob": "^7.1.3",
|
|
"@types/mocha": "^8.2.2",
|
|
"@types/node": "^15.6.1",
|
|
"@types/vscode": "1.56.0",
|
|
"@typescript-eslint/eslint-plugin": "^4.26.0",
|
|
"@typescript-eslint/parser": "^4.26.0",
|
|
"esbuild": "^0.12.5",
|
|
"eslint": "^7.27.0",
|
|
"glob": "^7.1.7",
|
|
"lodash": ">=4.17.21",
|
|
"markdown-it": "^12.0.6",
|
|
"minimist": ">=1.2.5",
|
|
"mocha": "^8.4.0",
|
|
"typescript": "^4.3.2",
|
|
"vsce": "^1.91.0",
|
|
"vscode-test": "^1.5.2"
|
|
}
|
|
}
|