-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
1,317 additions
and
79,601 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"manifestVersion": 1, | ||
"id": "accessibility-insights-ado-extension", | ||
"name": "Accessibility Insights Azure DevOps Extension", | ||
"version": "1.0.1", | ||
"publisher": "accessibility-insights-feature-crew", | ||
"targets": [ | ||
{ | ||
"id": "Microsoft.VisualStudio.Services" | ||
} | ||
], | ||
"description": "Scan accessibility issues in an Azure DevOps pipeline", | ||
"categories": ["Azure Pipelines"], | ||
"icons": { | ||
"default": "pkg/extension-icon.png" | ||
}, | ||
"files": [ | ||
{ | ||
"path": "pkg" | ||
} | ||
], | ||
"contributions": [ | ||
{ | ||
"id": "accessibility-insights-ado-task", | ||
"type": "ms.vss-distributed-task.task", | ||
"targets": ["ms.vss-distributed-task.tasks"], | ||
"properties": { | ||
"name": "pkg" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
const baseConfig = require('../../jest.config.base'); | ||
const package = require('./package'); | ||
|
||
module.exports = { | ||
...baseConfig, | ||
displayName: package.name, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "@accessibility-insights-action/ado-extension", | ||
"private": true, | ||
"version": "0.0.1", | ||
"description": "This project welcomes contributions and suggestions. Most contributions require you to agree to a\r Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\r the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.", | ||
"main": "dist/pkg/index.js", | ||
"scripts": { | ||
"build": "tsc && node prepare-package-dir.js", | ||
"cbuild": "npm-run-all --serial clean build", | ||
"clean": "rimraf dist", | ||
"lint:check": "eslint -c ../../.eslintrc.js \"src/**/*.{js,ts}\"", | ||
"lint:fix": "eslint -c ../../.eslintrc.js \"src/**/*.{js,ts}\" --quiet --fix", | ||
"package": "cd dist && tfx extension create --manifest-globs ado-extension.json", | ||
"start": "node dist/pkg/index.js", | ||
"test": "jest", | ||
"watch:test": "jest --watch" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/microsoft/accessibility-insights-action.git" | ||
}, | ||
"author": "Microsoft", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/microsoft/accessibility-insights-action/issues" | ||
}, | ||
"homepage": "https://github.com/microsoft/accessibility-insights-action#readme", | ||
"devDependencies": { | ||
"tfx-cli": "^0.9.2" | ||
}, | ||
"dependencies": { | ||
"reflect-metadata": "^0.1.13", | ||
"@accessibility-insights-action/shared": "^1.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
// run from root folder, this scripts prepares the dist folder | ||
|
||
const fs = require('fs-extra'); | ||
|
||
// We allow overrides of extension/task identifiers so we can deploy | ||
// different versions of the extension with the same YAML | ||
const taskJson = JSON.parse(fs.readFileSync('task.json')); | ||
const extensionJson = JSON.parse(fs.readFileSync('ado-extension.json')); | ||
|
||
const overrideExtensionName = process.env.ADO_EXTENSION_NAME; | ||
if (overrideExtensionName && overrideExtensionName.length > 0) { | ||
taskJson.name = overrideExtensionName; | ||
taskJson.friendlyName = overrideExtensionName; | ||
extensionJson.name = overrideExtensionName; | ||
} | ||
|
||
const overrideExtensionId = process.env.ADO_EXTENSION_ID; | ||
if (overrideExtensionId && overrideExtensionId.length > 0) { | ||
extensionJson.id = overrideExtensionId; | ||
} | ||
|
||
const overrideTaskId = process.env.ADO_TASK_ID; | ||
if (overrideTaskId && overrideTaskId.length > 0) { | ||
taskJson.id = overrideTaskId; | ||
} | ||
|
||
console.log(JSON.stringify(extensionJson, null, 4)); | ||
fs.writeJSONSync('dist/ado-extension.json', extensionJson); | ||
console.log('copied ado-extension.json to dist/pkg/ado-extension.json with any overrides'); | ||
|
||
console.log(JSON.stringify(taskJson, null, 4)); | ||
fs.writeJSONSync('dist/pkg/task.json', taskJson); | ||
console.log('copied task.json to dist/pkg/task.json with any overrides'); | ||
|
||
fs.copyFileSync('package.json', 'dist/pkg/package.json'); | ||
console.log('copied package.json to dist/pkg/package.json'); | ||
|
||
fs.copyFileSync('../../yarn.lock', 'dist/pkg/yarn.lock'); | ||
console.log('copied yarn.lock to dist/pkg/yarn.lock'); | ||
|
||
fs.copyFileSync('../../icons/brand-blue-48px.png', 'dist/pkg/extension-icon.png'); | ||
console.log('copied brand-blue-48px.png to dist/pkg/extension-icon.png'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
describe('ADO Extension test infrastructure', () => { | ||
it('placeholder test in ADO extension wrapper package', () => { | ||
expect(0).toBe(0); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
try { | ||
console.log('Hello World'); | ||
} catch (error) { | ||
console.log('Exception thrown in action: ', error); | ||
process.exit(1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/Microsoft/azure-pipelines-task-lib/master/tasks.schema.json", | ||
"id": "9fbe8277-f1b8-4d71-9045-5e6d815b46d8", | ||
"name": "AI task for ADO", | ||
"friendlyName": "AI task", | ||
"description": "Accessbility Insights Task for ADO pipeline", | ||
"helpMarkDown": "", | ||
"category": "Utility", | ||
"author": "Accessibility Insights", | ||
"version": { | ||
"Major": 1, | ||
"Minor": 1, | ||
"Patch": 1 | ||
}, | ||
"instanceNameFormat": "Run accessibility testing", | ||
"inputs": [ | ||
{ | ||
"name": "url", | ||
"type": "string", | ||
"label": "website URL", | ||
"required": false, | ||
"helpMarkDown": "URL to scan" | ||
}, | ||
{ | ||
"name": "repoServiceConnectionName", | ||
"type": "connectedService:externaltfs", | ||
"label": "Azure Repos Connection", | ||
"required": false, | ||
"helpMarkDown": "This extension makes comments on pull requests. Provide a service connection with permissions to contribute to the target repo." | ||
} | ||
], | ||
"execution": { | ||
"Node10": { | ||
"target": "index.js" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
{ | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"outDir": "./dist/pkg/" | ||
} | ||
} |
Oops, something went wrong.