axe-sarif-converter
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -0,0 +0,0 @@ export interface ConverterOptions { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -0,0 +0,0 @@ import * as Axe from 'axe-core'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
export interface DictionaryStringTo<T> { | ||
[key: string]: T; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -0,0 +0,0 @@ import * as Axe from 'axe-core'; |
@@ -9,5 +9,5 @@ "use strict"; | ||
var decoratedAxeResults = resultDecorator.decorateResults(axeResults); | ||
var sarifConverter = new sarif_converter_1.SarifConverter(); | ||
var sarifConverter = sarif_converter_1.defaultSarifConverter(); | ||
return sarifConverter.convert(decoratedAxeResults, {}); | ||
} | ||
exports.convertAxeToSarif = convertAxeToSarif; |
@@ -0,0 +0,0 @@ import * as Axe from 'axe-core'; |
@@ -0,0 +0,0 @@ "use strict"; |
import { ConverterOptions } from './converter-options'; | ||
import { DecoratedAxeResults } from './decorated-axe-results'; | ||
import { EnvironmentData } from './environment-data'; | ||
import * as Sarif from './sarif/sarif-2.0.0'; | ||
import { SarifLog } from './sarif/sarif-log'; | ||
export declare function defaultSarifConverter(): SarifConverter; | ||
export declare class SarifConverter { | ||
constructor(); | ||
private invocationConverter; | ||
constructor(invocationConverter: (environmentData: EnvironmentData) => Sarif.Invocation[]); | ||
convert(results: DecoratedAxeResults, options: ConverterOptions): SarifLog; | ||
@@ -7,0 +11,0 @@ private convertRun; |
@@ -14,5 +14,12 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var environment_data_provider_1 = require("./environment-data-provider"); | ||
var invocation_provider_1 = require("./invocation-provider"); | ||
var string_utils_1 = require("./string-utils"); | ||
function defaultSarifConverter() { | ||
return new SarifConverter(invocation_provider_1.getInvocations); | ||
} | ||
exports.defaultSarifConverter = defaultSarifConverter; | ||
var SarifConverter = /** @class */ (function () { | ||
function SarifConverter() { | ||
function SarifConverter(invocationConverter) { | ||
this.invocationConverter = invocationConverter; | ||
} | ||
@@ -50,8 +57,3 @@ SarifConverter.prototype.convert = function (results, options) { | ||
}, | ||
invocations: [ | ||
{ | ||
startTime: results.timestamp, | ||
endTime: results.timestamp, | ||
}, | ||
], | ||
invocations: this.invocationConverter(environment_data_provider_1.getEnvironmentData(results)), | ||
files: files, | ||
@@ -149,3 +151,3 @@ results: this.convertResults(results, properties), | ||
var checkResult = checkResults_1[_i]; | ||
var message = string_utils_1.StringUtils.isNotEmpty(checkResult.message) | ||
var message = string_utils_1.isNotEmpty(checkResult.message) | ||
? checkResult.message | ||
@@ -152,0 +154,0 @@ : checkResult.id; |
@@ -0,0 +0,0 @@ export declare const enum SarifLogVersion { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -0,0 +0,0 @@ "use strict"; |
import { StaticAnalysisResultsFormatSarifVersion200JsonSchema } from './sarif-2.0.0'; | ||
export declare type SarifLog = StaticAnalysisResultsFormatSarifVersion200JsonSchema; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,3 +0,2 @@ | ||
export declare class StringUtils { | ||
static isNotEmpty(str: string): boolean; | ||
} | ||
export declare function isNotEmpty(str?: string): boolean; | ||
export declare function escapeForMarkdown(s?: string): string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
var StringUtils = /** @class */ (function () { | ||
function StringUtils() { | ||
} | ||
StringUtils.isNotEmpty = function (str) { | ||
str = str ? str.trim() : ''; | ||
return str.length > 0; | ||
}; | ||
return StringUtils; | ||
}()); | ||
exports.StringUtils = StringUtils; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function isNotEmpty(str) { | ||
str = str ? str.trim() : ''; | ||
return str.length > 0; | ||
} | ||
exports.isNotEmpty = isNotEmpty; | ||
function escapeForMarkdown(s) { | ||
return s ? s.replace(/</g, '<') : ''; | ||
} | ||
exports.escapeForMarkdown = escapeForMarkdown; |
import { DictionaryStringTo } from './dictionary-types'; | ||
import { WCAG } from './wcag'; | ||
export declare const rulesWCAGConfiguration: DictionaryStringTo<WCAG[]>; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export interface WCAG { |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "axe-sarif-converter", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Convert axe-core accessibility scan results to the SARIF format", | ||
@@ -17,2 +17,3 @@ "main": "dist/index.js", | ||
"@types/jest": "^24.0.11", | ||
"@types/lodash": "^4.14.123", | ||
"@types/node": "^11.13.0", | ||
@@ -23,7 +24,10 @@ "jest": "^24.5.0", | ||
"license-check-and-add": "^2.3.6", | ||
"lodash": "^4.17.11", | ||
"prettier": "^1.16.4", | ||
"rimraf": "^2.6.3", | ||
"semantic-release": "^15.13.3", | ||
"ts-jest": "^24.0.1", | ||
"tslint": "^5.15.0", | ||
"tslint-microsoft-contrib": "^6.1.0", | ||
"typemoq": "^2.1.0", | ||
"typescript": "^3.4.1" | ||
@@ -39,6 +43,7 @@ }, | ||
"format-check": "prettier --config prettier.config.js --check \"**/*\"", | ||
"prepack": "npm run format-check && npm run lint && npm run build && npm run copyrightheaders", | ||
"copyrightheaders": "license-check-and-add", | ||
"precheckin": "npm run format-check && npm run lint && npm run build && npm test && npm run copyrightheaders", | ||
"watch:build": "tsc -p . --watch", | ||
"watch:test": "jest --watch --coverage false --colors", | ||
"copyrightheaders": "license-check-and-add" | ||
"semantic-release": "semantic-release" | ||
}, | ||
@@ -69,9 +74,10 @@ "repository": { | ||
"exact_paths": [ | ||
"./dist", | ||
"./.vscode", | ||
"./.git", | ||
"./.github", | ||
"./.vscode", | ||
"./copyright-header.txt", | ||
"./dist", | ||
"./node_modules", | ||
"./copyright-header.txt", | ||
"./src/test-resources/" | ||
"./src/test-resources/", | ||
"./test-results" | ||
], | ||
@@ -78,0 +84,0 @@ "file_type_method": "INCLUDE", |
@@ -8,5 +8,6 @@ <!-- | ||
[![Build Status](https://dev.azure.com/accessibility-insights/axe-sarif-converter/_apis/build/status/Microsoft.axe-sarif-converter%20-%20CI?branchName=master)](https://dev.azure.com/accessibility-insights/axe-sarif-converter/_build/latest?definitionId=20&branchName=master) | ||
[![Azure DevOps coverage](https://img.shields.io/azure-devops/coverage/accessibility-insights/axe-sarif-converter/20.svg?style=plastic)](https://dev.azure.com/accessibility-insights/axe-sarif-converter/_build/latest?definitionId=20&branchName=master) | ||
[![Build status](https://dev.azure.com/accessibility-insights/axe-sarif-converter/_apis/build/status/Microsoft.axe-sarif-converter%20-%20CI?branchName=master)](https://dev.azure.com/accessibility-insights/axe-sarif-converter/_build/latest?definitionId=20&branchName=master) | ||
[![Code coverage](https://img.shields.io/azure-devops/coverage/accessibility-insights/axe-sarif-converter/20.svg)](https://dev.azure.com/accessibility-insights/axe-sarif-converter/_build/latest?definitionId=20&branchName=master) | ||
[![npm](https://img.shields.io/npm/v/axe-sarif-converter.svg)](https://www.npmjs.com/package/axe-sarif-converter) | ||
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) | ||
@@ -13,0 +14,0 @@ Convert [axe-core](https://github.com/dequelabs/axe-core) accessibility scan results to the [SARIF format](http://sarifweb.azurewebsites.net/). |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
155884
39
4377
56
16