├── .gitignore ├── LICENSE ├── README.md ├── code-coverage1.html ├── configuration.html ├── img ├── CatalogIcon.png ├── logo.png ├── preview1.png └── screenshots │ ├── configuration.png │ └── widgets.png ├── node_modules ├── @types │ ├── jquery │ │ ├── README.md │ │ ├── index.d.ts │ │ └── package.json │ ├── jqueryui │ │ ├── README.md │ │ ├── index.d.ts │ │ ├── package.json │ │ └── types-metadata.json │ ├── knockout │ │ ├── README.md │ │ ├── index.d.ts │ │ └── package.json │ ├── q │ │ ├── README.md │ │ ├── index.d.ts │ │ ├── package.json │ │ └── types-metadata.json │ ├── react │ │ ├── README.md │ │ ├── index.d.ts │ │ ├── package.json │ │ └── types-metadata.json │ └── requirejs │ │ ├── README.md │ │ ├── index.d.ts │ │ └── package.json └── vss-web-extension-sdk │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── bower.json │ ├── img │ └── dependencies.png │ ├── lib │ └── VSS.SDK.min.js │ ├── package.json │ ├── tsconfig.json │ └── typings │ ├── index.d.ts │ ├── rmo.d.ts │ ├── tfs.d.ts │ └── vss.d.ts ├── overview.md ├── package-lock.json ├── sdk └── scripts │ └── VSS.SDK.min.js └── vss-extension.json /.gitignore: -------------------------------------------------------------------------------- 1 | #OS junk files 2 | [Tt]humbs.db 3 | *.DS_Store 4 | 5 | #Visual Studio files 6 | *.vsix -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Shane Davis 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Code Coverage Dashboard Widgets 2 | * NOTE: This works with Azure DevOps and Azure DevOps Server (Team Foundation Server). However, Microsoft requires TFS 2015 Update 3 or higher for folks using Azure DevOps Server (Team Foundation Server). 3 | 4 | ## Code Coverage Widget 5 | This widget displays the percentage of unit test code coverage based on a selected build definition. If a build definition does not have any unit tests results recognized by the widget or if has not yet been configured, it will indicate so with a message displayed within the widget. 6 | 7 | ![](img/preview1.png) 8 | 9 | The following configuration options are available: 10 | 11 | ![](img/screenshots/configuration.png) 12 | 13 | ## Release Notes 14 | * 1.0.272 15 | * Added configuration option to display delta of previous build's coverage. 16 | * Updated logo and screenshots. 17 | * 1.0.219 18 | * Fixed issues where widget would not render properly. 19 | * 1.0.195 20 | * Added configuration option to display measurement name (via PR from [Tommy Vernieri](https://github.com/Blackbaud-TommyVernieri)) 21 | * 1.0.194 22 | * Added support for Branches (via PR from [Tommy Vernieri](https://github.com/Blackbaud-TommyVernieri)) 23 | * 1.0.191 24 | * Added support for Failed builds that produce code coverage results. 25 | * 1.0.190 26 | * Added support for Partially Succeeded builds. 27 | * 1.0.189 28 | * Updated to latest SDK. 29 | * Minor updates to improve error handling. 30 | * 1.0.171 31 | * Added configuration option to display up to two decimal places. Zero is the default. 32 | * Added broader configuration options for broader coverage measurement: 33 | * Blocks 34 | * Branch 35 | * Class 36 | * Complexity 37 | * Instruction 38 | * Line 39 | * Lines (this is the default) 40 | * Method 41 | * 1.0.166 42 | * Added configuration option to measure Lines or Blocks. 43 | * 1.0.162 44 | * Displayed build name now links to build details. 45 | * 1.0.149 46 | * Fixed defect where build was not showing as selected. 47 | * Added configuration option to display build name on widget. 48 | * Updated to match native style. 49 | * 1.0.122 50 | * Widget can now be resized to one or two columns in width. 51 | * 1.0.119 52 | * Build definitions are now sorted alphabetically. 53 | * 1.0.99 54 | * Initial release. Includes a single widget that extracts "Line" (.NET) or "Lines" (Java) code coverage results from unit tests executed during a build. 55 | 56 | ## Known Issues 57 | * Build definitions are limited to the first 1,000. This is a limitation of the Azure DevOps REST API. 58 | 59 | ## Contributing 60 | If you would like to contribute to these widgets, clone this repository and make your changes. Then submit 61 | a pull request and I'll review it as soon as possible. 62 | 63 | ## Issues 64 | If you encounter an issue while using these widgets please open an issue [here](https://github.com/sdavis3/CodeCoverageDashboardWidgets/issues). 65 | 66 | ## Roadmap 67 | I plan to expand on these widgets to support a wider variety of unit test metrics. Please submit an issue if you have a feature request. 68 | -------------------------------------------------------------------------------- /code-coverage1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 194 | 195 | 196 |
197 |

198 | 199 | 200 | 201 | 202 |
203 |
204 |
205 | 206 | 207 | -------------------------------------------------------------------------------- /configuration.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 252 | 253 | 254 |
255 | 256 | 264 | 280 | 290 |
291 |
292 | Additional options 293 | 294 |
295 | 296 |
297 | 298 |
299 |
300 |
301 |
302 | 303 | 304 | -------------------------------------------------------------------------------- /img/CatalogIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdavis3/code-coverage-widgets/88455a1c82f1802b770c107c56482112e6b79da8/img/CatalogIcon.png -------------------------------------------------------------------------------- /img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdavis3/code-coverage-widgets/88455a1c82f1802b770c107c56482112e6b79da8/img/logo.png -------------------------------------------------------------------------------- /img/preview1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdavis3/code-coverage-widgets/88455a1c82f1802b770c107c56482112e6b79da8/img/preview1.png -------------------------------------------------------------------------------- /img/screenshots/configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdavis3/code-coverage-widgets/88455a1c82f1802b770c107c56482112e6b79da8/img/screenshots/configuration.png -------------------------------------------------------------------------------- /img/screenshots/widgets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdavis3/code-coverage-widgets/88455a1c82f1802b770c107c56482112e6b79da8/img/screenshots/widgets.png -------------------------------------------------------------------------------- /node_modules/@types/jquery/README.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | > `npm install --save @types/jquery` 3 | 4 | # Summary 5 | This package contains type definitions for jQuery 1.10.x / (http://jquery.com/). 6 | 7 | # Details 8 | Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/jquery 9 | 10 | Additional Details 11 | * Last updated: Sat, 11 Mar 2017 00:13:28 GMT 12 | * Dependencies: none 13 | * Global values: $, jQuery 14 | 15 | # Credits 16 | These definitions were written by Boris Yankov , Christian Hoffmeister , Steve Fenton , Diullei Gomes , Tass Iliopoulos , Jason Swearingen , Sean Hill , Guus Goossens , Kelly Summerlin , Basarat Ali Syed , Nicholas Wolverson , Derek Cicerone , Andrew Gaspar , James Harrison Fisher , Seikichi Kondo , Benjamin Jackman , Poul Sorensen , Josh Strobl , John Reilly , Dick van den Brink , Thomas Schulz . 17 | -------------------------------------------------------------------------------- /node_modules/@types/jquery/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "@types/jquery@^2.0.34", 6 | "scope": "@types", 7 | "escapedName": "@types%2fjquery", 8 | "name": "@types/jquery", 9 | "rawSpec": "^2.0.34", 10 | "spec": ">=2.0.34 <3.0.0", 11 | "type": "range" 12 | }, 13 | "/Users/shane/Dropbox/Code/CodeCoverageDashboardWidgets-Dev/node_modules/vss-web-extension-sdk" 14 | ] 15 | ], 16 | "_from": "@types/jquery@>=2.0.34 <3.0.0", 17 | "_id": "@types/jquery@2.0.41", 18 | "_inCache": true, 19 | "_location": "/@types/jquery", 20 | "_npmOperationalInternal": { 21 | "host": "packages-12-west.internal.npmjs.com", 22 | "tmp": "tmp/jquery-2.0.41.tgz_1489191289022_0.8532251426950097" 23 | }, 24 | "_npmUser": { 25 | "name": "types", 26 | "email": "ts-npm-types@microsoft.com" 27 | }, 28 | "_phantomChildren": {}, 29 | "_requested": { 30 | "raw": "@types/jquery@^2.0.34", 31 | "scope": "@types", 32 | "escapedName": "@types%2fjquery", 33 | "name": "@types/jquery", 34 | "rawSpec": "^2.0.34", 35 | "spec": ">=2.0.34 <3.0.0", 36 | "type": "range" 37 | }, 38 | "_requiredBy": [ 39 | "/@types/jqueryui", 40 | "/vss-web-extension-sdk" 41 | ], 42 | "_resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.41.tgz", 43 | "_shasum": "b87ba051011f99edbe586d8f97282e7786e01a6d", 44 | "_shrinkwrap": null, 45 | "_spec": "@types/jquery@^2.0.34", 46 | "_where": "/Users/shane/Dropbox/Code/CodeCoverageDashboardWidgets-Dev/node_modules/vss-web-extension-sdk", 47 | "contributors": [ 48 | { 49 | "name": "Boris Yankov", 50 | "url": "https://github.com/borisyankov/" 51 | }, 52 | { 53 | "name": "Christian Hoffmeister", 54 | "url": "https://github.com/choffmeister" 55 | }, 56 | { 57 | "name": "Steve Fenton", 58 | "url": "https://github.com/Steve-Fenton" 59 | }, 60 | { 61 | "name": "Diullei Gomes", 62 | "url": "https://github.com/Diullei" 63 | }, 64 | { 65 | "name": "Tass Iliopoulos", 66 | "url": "https://github.com/tasoili" 67 | }, 68 | { 69 | "name": "Jason Swearingen", 70 | "url": "https://github.com/jasons-novaleaf" 71 | }, 72 | { 73 | "name": "Sean Hill", 74 | "url": "https://github.com/seanski" 75 | }, 76 | { 77 | "name": "Guus Goossens", 78 | "url": "https://github.com/Guuz" 79 | }, 80 | { 81 | "name": "Kelly Summerlin", 82 | "url": "https://github.com/ksummerlin" 83 | }, 84 | { 85 | "name": "Basarat Ali Syed", 86 | "url": "https://github.com/basarat" 87 | }, 88 | { 89 | "name": "Nicholas Wolverson", 90 | "url": "https://github.com/nwolverson" 91 | }, 92 | { 93 | "name": "Derek Cicerone", 94 | "url": "https://github.com/derekcicerone" 95 | }, 96 | { 97 | "name": "Andrew Gaspar", 98 | "url": "https://github.com/AndrewGaspar" 99 | }, 100 | { 101 | "name": "James Harrison Fisher", 102 | "url": "https://github.com/jameshfisher" 103 | }, 104 | { 105 | "name": "Seikichi Kondo", 106 | "url": "https://github.com/seikichi" 107 | }, 108 | { 109 | "name": "Benjamin Jackman", 110 | "url": "https://github.com/benjaminjackman" 111 | }, 112 | { 113 | "name": "Poul Sorensen", 114 | "url": "https://github.com/s093294" 115 | }, 116 | { 117 | "name": "Josh Strobl", 118 | "url": "https://github.com/JoshStrobl" 119 | }, 120 | { 121 | "name": "John Reilly", 122 | "url": "https://github.com/johnnyreilly/" 123 | }, 124 | { 125 | "name": "Dick van den Brink", 126 | "url": "https://github.com/DickvdBrink" 127 | }, 128 | { 129 | "name": "Thomas Schulz", 130 | "url": "https://github.com/King2500" 131 | } 132 | ], 133 | "dependencies": {}, 134 | "description": "TypeScript definitions for jQuery 1.10.x /", 135 | "devDependencies": {}, 136 | "directories": {}, 137 | "dist": { 138 | "shasum": "b87ba051011f99edbe586d8f97282e7786e01a6d", 139 | "tarball": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.41.tgz" 140 | }, 141 | "license": "MIT", 142 | "main": "", 143 | "maintainers": [ 144 | { 145 | "name": "types", 146 | "email": "ryan.cavanaugh@microsoft.com" 147 | } 148 | ], 149 | "name": "@types/jquery", 150 | "optionalDependencies": {}, 151 | "peerDependencies": {}, 152 | "readme": "ERROR: No README data found!", 153 | "repository": { 154 | "type": "git", 155 | "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" 156 | }, 157 | "scripts": {}, 158 | "typeScriptVersion": "2.0", 159 | "typesPublisherContentHash": "6ad9efa0b178519948b5e5bf354ce2070d3aa3ec01022a805ea472e36da1604b", 160 | "version": "2.0.41" 161 | } 162 | -------------------------------------------------------------------------------- /node_modules/@types/jqueryui/README.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | > `npm install --save @types/jqueryui` 3 | 4 | # Summary 5 | This package contains type definitions for jQueryUI (http://jqueryui.com/). 6 | 7 | # Details 8 | Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/jqueryui 9 | 10 | Additional Details 11 | * Last updated: Thu, 15 Dec 2016 16:51:51 GMT 12 | * Library Dependencies: jquery 13 | * Module Dependencies: none 14 | * Global values: none 15 | 16 | # Credits 17 | These definitions were written by Boris Yankov , John Reilly . 18 | -------------------------------------------------------------------------------- /node_modules/@types/jqueryui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "@types/jqueryui@^1.11.31", 6 | "scope": "@types", 7 | "escapedName": "@types%2fjqueryui", 8 | "name": "@types/jqueryui", 9 | "rawSpec": "^1.11.31", 10 | "spec": ">=1.11.31 <2.0.0", 11 | "type": "range" 12 | }, 13 | "/Users/shane/Dropbox/Code/CodeCoverageDashboardWidgets-Dev/node_modules/vss-web-extension-sdk" 14 | ] 15 | ], 16 | "_from": "@types/jqueryui@>=1.11.31 <2.0.0", 17 | "_id": "@types/jqueryui@1.11.32", 18 | "_inCache": true, 19 | "_location": "/@types/jqueryui", 20 | "_npmOperationalInternal": { 21 | "host": "packages-12-west.internal.npmjs.com", 22 | "tmp": "tmp/jqueryui-1.11.32.tgz_1481820751706_0.11502911942079663" 23 | }, 24 | "_npmUser": { 25 | "name": "types", 26 | "email": "ts-npm-types@microsoft.com" 27 | }, 28 | "_phantomChildren": {}, 29 | "_requested": { 30 | "raw": "@types/jqueryui@^1.11.31", 31 | "scope": "@types", 32 | "escapedName": "@types%2fjqueryui", 33 | "name": "@types/jqueryui", 34 | "rawSpec": "^1.11.31", 35 | "spec": ">=1.11.31 <2.0.0", 36 | "type": "range" 37 | }, 38 | "_requiredBy": [ 39 | "/vss-web-extension-sdk" 40 | ], 41 | "_resolved": "https://registry.npmjs.org/@types/jqueryui/-/jqueryui-1.11.32.tgz", 42 | "_shasum": "5a21bdedd6517c21baef754889931b7d27b5fb3e", 43 | "_shrinkwrap": null, 44 | "_spec": "@types/jqueryui@^1.11.31", 45 | "_where": "/Users/shane/Dropbox/Code/CodeCoverageDashboardWidgets-Dev/node_modules/vss-web-extension-sdk", 46 | "author": { 47 | "name": "Boris Yankov", 48 | "email": "https://github.com/borisyankov/" 49 | }, 50 | "dependencies": { 51 | "@types/jquery": "*" 52 | }, 53 | "description": "TypeScript definitions for jQueryUI", 54 | "devDependencies": {}, 55 | "directories": {}, 56 | "dist": { 57 | "shasum": "5a21bdedd6517c21baef754889931b7d27b5fb3e", 58 | "tarball": "https://registry.npmjs.org/@types/jqueryui/-/jqueryui-1.11.32.tgz" 59 | }, 60 | "license": "MIT", 61 | "main": "", 62 | "maintainers": [ 63 | { 64 | "name": "types", 65 | "email": "ryan.cavanaugh@microsoft.com" 66 | } 67 | ], 68 | "name": "@types/jqueryui", 69 | "optionalDependencies": {}, 70 | "peerDependencies": {}, 71 | "readme": "ERROR: No README data found!", 72 | "repository": { 73 | "type": "git", 74 | "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" 75 | }, 76 | "scripts": {}, 77 | "typesPublisherContentHash": "9f81a997f629f00a67922eb97a4218c9e4a519fb9fc585d91488f0086fb70311", 78 | "version": "1.11.32" 79 | } 80 | -------------------------------------------------------------------------------- /node_modules/@types/jqueryui/types-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "authors": "Boris Yankov , John Reilly ", 3 | "libraryDependencies": [ 4 | "jquery" 5 | ], 6 | "moduleDependencies": [], 7 | "libraryMajorVersion": 1, 8 | "libraryMinorVersion": 11, 9 | "libraryName": "jQueryUI", 10 | "typingsPackageName": "jqueryui", 11 | "projectName": "http://jqueryui.com/", 12 | "sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped", 13 | "sourceBranch": "master", 14 | "globals": [], 15 | "declaredModules": [], 16 | "files": [ 17 | "index.d.ts" 18 | ], 19 | "hasPackageJson": false, 20 | "contentHash": "9f81a997f629f00a67922eb97a4218c9e4a519fb9fc585d91488f0086fb70311" 21 | } -------------------------------------------------------------------------------- /node_modules/@types/knockout/README.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | > `npm install --save @types/knockout` 3 | 4 | # Summary 5 | This package contains type definitions for Knockout (http://knockoutjs.com). 6 | 7 | # Details 8 | Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/knockout 9 | 10 | Additional Details 11 | * Last updated: Sat, 11 Mar 2017 01:17:04 GMT 12 | * Dependencies: none 13 | * Global values: ko 14 | 15 | # Credits 16 | These definitions were written by Boris Yankov , Igor Oleinikov , Clément Bourgeois , Matt Brooks . 17 | -------------------------------------------------------------------------------- /node_modules/@types/knockout/index.d.ts: -------------------------------------------------------------------------------- 1 | // Type definitions for Knockout v3.4.0 2 | // Project: http://knockoutjs.com 3 | // Definitions by: Boris Yankov , Igor Oleinikov , Clément Bourgeois , Matt Brooks 4 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped 5 | 6 | 7 | interface KnockoutSubscribableFunctions { 8 | [key: string]: KnockoutBindingHandler | undefined; 9 | 10 | notifySubscribers(valueToWrite?: T, event?: string): void; 11 | } 12 | 13 | interface KnockoutComputedFunctions { 14 | [key: string]: KnockoutBindingHandler | undefined; 15 | } 16 | 17 | interface KnockoutObservableFunctions { 18 | [key: string]: KnockoutBindingHandler | undefined; 19 | 20 | equalityComparer(a: any, b: any): boolean; 21 | } 22 | 23 | interface KnockoutObservableArrayFunctions { 24 | // General Array functions 25 | indexOf(searchElement: T, fromIndex?: number): number; 26 | slice(start: number, end?: number): T[]; 27 | splice(start: number): T[]; 28 | splice(start: number, deleteCount: number, ...items: T[]): T[]; 29 | pop(): T; 30 | push(...items: T[]): void; 31 | shift(): T; 32 | unshift(...items: T[]): number; 33 | reverse(): KnockoutObservableArray; 34 | sort(): KnockoutObservableArray; 35 | sort(compareFunction: (left: T, right: T) => number): KnockoutObservableArray; 36 | 37 | // Ko specific 38 | [key: string]: KnockoutBindingHandler | undefined; 39 | 40 | replace(oldItem: T, newItem: T): void; 41 | 42 | remove(item: T): T[]; 43 | remove(removeFunction: (item: T) => boolean): T[]; 44 | removeAll(items: T[]): T[]; 45 | removeAll(): T[]; 46 | 47 | destroy(item: T): void; 48 | destroy(destroyFunction: (item: T) => boolean): void; 49 | destroyAll(items: T[]): void; 50 | destroyAll(): void; 51 | } 52 | 53 | interface KnockoutSubscribableStatic { 54 | fn: KnockoutSubscribableFunctions; 55 | 56 | new (): KnockoutSubscribable; 57 | } 58 | 59 | interface KnockoutSubscription { 60 | dispose(): void; 61 | } 62 | 63 | interface KnockoutSubscribable extends KnockoutSubscribableFunctions { 64 | subscribe(callback: (newValue: T) => void, target: any, event: "beforeChange"): KnockoutSubscription; 65 | subscribe(callback: (newValue: T) => void, target?: any, event?: "change"): KnockoutSubscription; 66 | subscribe(callback: (newValue: TEvent) => void, target: any, event: string): KnockoutSubscription; 67 | 68 | extend(requestedExtenders: { [key: string]: any; }): KnockoutSubscribable; 69 | getSubscriptionsCount(): number; 70 | } 71 | 72 | interface KnockoutComputedStatic { 73 | fn: KnockoutComputedFunctions; 74 | 75 | (): KnockoutComputed; 76 | (func: () => T, context?: any, options?: any): KnockoutComputed; 77 | (def: KnockoutComputedDefine, context?: any): KnockoutComputed; 78 | } 79 | 80 | interface KnockoutComputed extends KnockoutObservable, KnockoutComputedFunctions { 81 | fn: KnockoutComputedFunctions; 82 | 83 | dispose(): void; 84 | isActive(): boolean; 85 | getDependenciesCount(): number; 86 | extend(requestedExtenders: { [key: string]: any; }): KnockoutComputed; 87 | } 88 | 89 | interface KnockoutObservableArrayStatic { 90 | fn: KnockoutObservableArrayFunctions; 91 | 92 | (value?: T[] | null): KnockoutObservableArray; 93 | } 94 | 95 | interface KnockoutObservableArray extends KnockoutObservable, KnockoutObservableArrayFunctions { 96 | subscribe(callback: (newValue: KnockoutArrayChange[]) => void, target: any, event: "arrayChange"): KnockoutSubscription; 97 | subscribe(callback: (newValue: T[]) => void, target: any, event: "beforeChange"): KnockoutSubscription; 98 | subscribe(callback: (newValue: T[]) => void, target?: any, event?: "change"): KnockoutSubscription; 99 | subscribe(callback: (newValue: TEvent) => void, target: any, event: string): KnockoutSubscription; 100 | 101 | extend(requestedExtenders: { [key: string]: any; }): KnockoutObservableArray; 102 | } 103 | 104 | interface KnockoutObservableStatic { 105 | fn: KnockoutObservableFunctions; 106 | 107 | (value?: T | null): KnockoutObservable; 108 | } 109 | 110 | interface KnockoutObservable extends KnockoutSubscribable, KnockoutObservableFunctions { 111 | (): T; 112 | (value: T | null): void; 113 | 114 | peek(): T; 115 | valueHasMutated?:{(): void;}; 116 | valueWillMutate?:{(): void;}; 117 | extend(requestedExtenders: { [key: string]: any; }): KnockoutObservable; 118 | } 119 | 120 | interface KnockoutComputedDefine { 121 | read(): T; 122 | write? (value: T): void; 123 | disposeWhenNodeIsRemoved?: Node; 124 | disposeWhen? (): boolean; 125 | owner?: any; 126 | deferEvaluation?: boolean; 127 | pure?: boolean; 128 | } 129 | 130 | interface KnockoutBindingContext { 131 | $parent: any; 132 | $parents: any[]; 133 | $root: any; 134 | $data: any; 135 | $rawData: any | KnockoutObservable; 136 | $index?: KnockoutObservable; 137 | $parentContext?: KnockoutBindingContext; 138 | $component: any; 139 | $componentTemplateNodes: Node[]; 140 | 141 | extend(properties: any): any; 142 | createChildContext(dataItemOrAccessor: any, dataItemAlias?: any, extendCallback?: Function): any; 143 | } 144 | 145 | interface KnockoutAllBindingsAccessor { 146 | (): any; 147 | get(name: string): any; 148 | has(name: string): boolean; 149 | } 150 | 151 | interface KnockoutBindingHandler { 152 | after?: Array; 153 | init?: (element: any, valueAccessor: () => any, allBindingsAccessor?: KnockoutAllBindingsAccessor, viewModel?: any, bindingContext?: KnockoutBindingContext) => void | { controlsDescendantBindings: boolean; }; 154 | update?: (element: any, valueAccessor: () => any, allBindingsAccessor?: KnockoutAllBindingsAccessor, viewModel?: any, bindingContext?: KnockoutBindingContext) => void; 155 | options?: any; 156 | preprocess?: (value: string, name: string, addBindingCallback?: (name: string, value: string) => void) => string; 157 | } 158 | 159 | interface KnockoutBindingHandlers { 160 | [bindingHandler: string]: KnockoutBindingHandler; 161 | 162 | // Controlling text and appearance 163 | visible: KnockoutBindingHandler; 164 | text: KnockoutBindingHandler; 165 | html: KnockoutBindingHandler; 166 | css: KnockoutBindingHandler; 167 | style: KnockoutBindingHandler; 168 | attr: KnockoutBindingHandler; 169 | 170 | // Control Flow 171 | foreach: KnockoutBindingHandler; 172 | if: KnockoutBindingHandler; 173 | ifnot: KnockoutBindingHandler; 174 | with: KnockoutBindingHandler; 175 | 176 | // Working with form fields 177 | click: KnockoutBindingHandler; 178 | event: KnockoutBindingHandler; 179 | submit: KnockoutBindingHandler; 180 | enable: KnockoutBindingHandler; 181 | disable: KnockoutBindingHandler; 182 | value: KnockoutBindingHandler; 183 | textInput: KnockoutBindingHandler; 184 | hasfocus: KnockoutBindingHandler; 185 | checked: KnockoutBindingHandler; 186 | options: KnockoutBindingHandler; 187 | selectedOptions: KnockoutBindingHandler; 188 | uniqueName: KnockoutBindingHandler; 189 | 190 | // Rendering templates 191 | template: KnockoutBindingHandler; 192 | 193 | // Components (new for v3.2) 194 | component: KnockoutBindingHandler; 195 | } 196 | 197 | interface KnockoutMemoization { 198 | memoize(callback: () => string): string; 199 | unmemoize(memoId: string, callbackParams: any[]): boolean; 200 | unmemoizeDomNodeAndDescendants(domNode: any, extraCallbackParamsArray: any[]): boolean; 201 | parseMemoText(memoText: string): string; 202 | } 203 | 204 | interface KnockoutVirtualElement {} 205 | 206 | interface KnockoutVirtualElements { 207 | allowedBindings: { [bindingName: string]: boolean; }; 208 | emptyNode(node: KnockoutVirtualElement ): void; 209 | firstChild(node: KnockoutVirtualElement ): KnockoutVirtualElement; 210 | insertAfter( container: KnockoutVirtualElement, nodeToInsert: Node, insertAfter: Node ): void; 211 | nextSibling(node: KnockoutVirtualElement): Node; 212 | prepend(node: KnockoutVirtualElement, toInsert: Node ): void; 213 | setDomNodeChildren(node: KnockoutVirtualElement, newChildren: { length: number;[index: number]: Node; } ): void; 214 | childNodes(node: KnockoutVirtualElement ): Node[]; 215 | } 216 | 217 | interface KnockoutExtenders { 218 | throttle(target: any, timeout: number): KnockoutComputed; 219 | notify(target: any, notifyWhen: string): any; 220 | 221 | rateLimit(target: any, timeout: number): any; 222 | rateLimit(target: any, options: { timeout: number; method?: string; }): any; 223 | 224 | trackArrayChanges(target: any): any; 225 | } 226 | 227 | // 228 | // NOTE TO MAINTAINERS AND CONTRIBUTORS : pay attention to only include symbols that are 229 | // publicly exported in the minified version of ko, without that you can give the false 230 | // impression that some functions will be available in production builds. 231 | // 232 | interface KnockoutUtils { 233 | ////////////////////////////////// 234 | // utils.domData.js 235 | ////////////////////////////////// 236 | 237 | domData: { 238 | get (node: Element, key: string): any; 239 | 240 | set (node: Element, key: string, value: any): void; 241 | 242 | getAll(node: Element, createIfNotFound: boolean): any; 243 | 244 | clear(node: Element): boolean; 245 | }; 246 | 247 | ////////////////////////////////// 248 | // utils.domNodeDisposal.js 249 | ////////////////////////////////// 250 | 251 | domNodeDisposal: { 252 | addDisposeCallback(node: Element, callback: Function): void; 253 | 254 | removeDisposeCallback(node: Element, callback: Function): void; 255 | 256 | cleanNode(node: Node): Element; 257 | 258 | removeNode(node: Node): void; 259 | }; 260 | 261 | addOrRemoveItem(array: T[] | KnockoutObservable, value: T, included: T): void; 262 | 263 | arrayFilter(array: T[], predicate: (item: T) => boolean): T[]; 264 | 265 | arrayFirst(array: T[], predicate: (item: T) => boolean, predicateOwner?: any): T; 266 | 267 | arrayForEach(array: T[], action: (item: T, index: number) => void): void; 268 | 269 | arrayGetDistinctValues(array: T[]): T[]; 270 | 271 | arrayIndexOf(array: T[], item: T): number; 272 | 273 | arrayMap(array: T[], mapping: (item: T) => U): U[]; 274 | 275 | arrayPushAll(array: T[] | KnockoutObservableArray, valuesToPush: T[]): T[]; 276 | 277 | arrayRemoveItem(array: any[], itemToRemove: any): void; 278 | 279 | compareArrays(a: T[], b: T[]): Array>; 280 | 281 | extend(target: Object, source: Object): Object; 282 | 283 | fieldsIncludedWithJsonPost: any[]; 284 | 285 | getFormFields(form: any, fieldName: string): any[]; 286 | 287 | objectForEach(obj: any, action: (key: any, value: any) => void): void; 288 | 289 | parseHtmlFragment(html: string): any[]; 290 | 291 | parseJson(jsonString: string): any; 292 | 293 | postJson(urlOrForm: any, data: any, options: any): void; 294 | 295 | peekObservable(value: KnockoutObservable): T; 296 | 297 | range(min: any, max: any): any; 298 | 299 | registerEventHandler(element: any, eventType: any, handler: Function): void; 300 | 301 | setHtml(node: Element, html: () => string): void; 302 | 303 | setHtml(node: Element, html: string): void; 304 | 305 | setTextContent(element: any, textContent: string | KnockoutObservable): void; 306 | 307 | stringifyJson(data: any, replacer?: Function, space?: string): string; 308 | 309 | toggleDomNodeCssClass(node: any, className: string, shouldHaveClass: boolean): void; 310 | 311 | triggerEvent(element: any, eventType: any): void; 312 | 313 | unwrapObservable(value: KnockoutObservable | T): T; 314 | 315 | // NOT PART OF THE MINIFIED API SURFACE (ONLY IN knockout-{version}.debug.js) https://github.com/SteveSanderson/knockout/issues/670 316 | // forceRefresh(node: any): void; 317 | // ieVersion: number; 318 | // isIe6: boolean; 319 | // isIe7: boolean; 320 | // jQueryHtmlParse(html: string): any[]; 321 | // makeArray(arrayLikeObject: any): any[]; 322 | // moveCleanedNodesToContainerElement(nodes: any[]): HTMLElement; 323 | // replaceDomNodes(nodeToReplaceOrNodeArray: any, newNodesArray: any[]): void; 324 | // setDomNodeChildren(domNode: any, childNodes: any[]): void; 325 | // setElementName(element: any, name: string): void; 326 | // setOptionNodeSelectionState(optionNode: any, isSelected: boolean): void; 327 | // simpleHtmlParse(html: string): any[]; 328 | // stringStartsWith(str: string, startsWith: string): boolean; 329 | // stringTokenize(str: string, delimiter: string): string[]; 330 | // stringTrim(str: string): string; 331 | // tagNameLower(element: any): string; 332 | } 333 | 334 | interface KnockoutArrayChange { 335 | status: "added" | "deleted" | "retained"; 336 | value: T; 337 | index: number; 338 | moved?: number; 339 | } 340 | 341 | ////////////////////////////////// 342 | // templateSources.js 343 | ////////////////////////////////// 344 | 345 | interface KnockoutTemplateSourcesDomElement { 346 | text(): any; 347 | text(value: any): void; 348 | 349 | data(key: string): any; 350 | data(key: string, value: any): any; 351 | } 352 | 353 | interface KnockoutTemplateAnonymous extends KnockoutTemplateSourcesDomElement { 354 | nodes(): any; 355 | nodes(value: any): void; 356 | } 357 | 358 | interface KnockoutTemplateSources { 359 | 360 | domElement: { 361 | prototype: KnockoutTemplateSourcesDomElement 362 | new (element: Element): KnockoutTemplateSourcesDomElement 363 | }; 364 | 365 | anonymousTemplate: { 366 | prototype: KnockoutTemplateAnonymous; 367 | new (element: Element): KnockoutTemplateAnonymous; 368 | }; 369 | } 370 | 371 | ////////////////////////////////// 372 | // nativeTemplateEngine.js 373 | ////////////////////////////////// 374 | 375 | interface KnockoutNativeTemplateEngine { 376 | 377 | renderTemplateSource(templateSource: Object, bindingContext?: KnockoutBindingContext, options?: Object): any[]; 378 | } 379 | 380 | ////////////////////////////////// 381 | // templateEngine.js 382 | ////////////////////////////////// 383 | 384 | interface KnockoutTemplateEngine extends KnockoutNativeTemplateEngine { 385 | 386 | createJavaScriptEvaluatorBlock(script: string): string; 387 | 388 | makeTemplateSource(template: any, templateDocument?: Document): any; 389 | 390 | renderTemplate(template: any, bindingContext: KnockoutBindingContext, options: Object, templateDocument: Document): any; 391 | 392 | isTemplateRewritten(template: any, templateDocument: Document): boolean; 393 | 394 | rewriteTemplate(template: any, rewriterCallback: Function, templateDocument: Document): void; 395 | } 396 | 397 | ////////////////////////////////// 398 | // tasks.js 399 | ////////////////////////////////// 400 | 401 | interface KnockoutTasks { 402 | scheduler: (callback: Function) => any; 403 | schedule(task: Function): number; 404 | cancel(handle: number): void; 405 | runEarly(): void; 406 | } 407 | 408 | ///////////////////////////////// 409 | 410 | interface KnockoutStatic { 411 | utils: KnockoutUtils; 412 | memoization: KnockoutMemoization; 413 | 414 | bindingHandlers: KnockoutBindingHandlers; 415 | getBindingHandler(handler: string): KnockoutBindingHandler; 416 | 417 | virtualElements: KnockoutVirtualElements; 418 | extenders: KnockoutExtenders; 419 | 420 | applyBindings(viewModelOrBindingContext?: any, rootNode?: any): void; 421 | applyBindingsToDescendants(viewModelOrBindingContext: any, rootNode: any): void; 422 | applyBindingAccessorsToNode(node: Node, bindings: (bindingContext: KnockoutBindingContext, node: Node) => {}, bindingContext: KnockoutBindingContext): void; 423 | applyBindingAccessorsToNode(node: Node, bindings: {}, bindingContext: KnockoutBindingContext): void; 424 | applyBindingAccessorsToNode(node: Node, bindings: (bindingContext: KnockoutBindingContext, node: Node) => {}, viewModel: any): void; 425 | applyBindingAccessorsToNode(node: Node, bindings: {}, viewModel: any): void; 426 | applyBindingsToNode(node: Node, bindings: any, viewModelOrBindingContext?: any): any; 427 | 428 | subscribable: KnockoutSubscribableStatic; 429 | observable: KnockoutObservableStatic; 430 | 431 | computed: KnockoutComputedStatic; 432 | pureComputed(evaluatorFunction: () => T, context?: any): KnockoutComputed; 433 | pureComputed(options: KnockoutComputedDefine, context?: any): KnockoutComputed; 434 | 435 | observableArray: KnockoutObservableArrayStatic; 436 | 437 | contextFor(node: any): any; 438 | isSubscribable(instance: any): instance is KnockoutSubscribable; 439 | toJSON(viewModel: any, replacer?: Function, space?: any): string; 440 | toJS(viewModel: any): any; 441 | isObservable(instance: any): instance is KnockoutObservable; 442 | isWriteableObservable(instance: any): instance is KnockoutObservable; 443 | isComputed(instance: any): instance is KnockoutComputed; 444 | dataFor(node: any): any; 445 | removeNode(node: Element): void; 446 | cleanNode(node: Element): Element; 447 | renderTemplate(template: Function, viewModel: any, options?: any, target?: any, renderMode?: any): any; 448 | renderTemplate(template: string, viewModel: any, options?: any, target?: any, renderMode?: any): any; 449 | unwrap(value: KnockoutObservable | T): T; 450 | 451 | computedContext: KnockoutComputedContext; 452 | 453 | ////////////////////////////////// 454 | // templateSources.js 455 | ////////////////////////////////// 456 | 457 | templateSources: KnockoutTemplateSources; 458 | 459 | ////////////////////////////////// 460 | // templateEngine.js 461 | ////////////////////////////////// 462 | 463 | templateEngine: { 464 | 465 | prototype: KnockoutTemplateEngine; 466 | 467 | new (): KnockoutTemplateEngine; 468 | }; 469 | 470 | ////////////////////////////////// 471 | // templateRewriting.js 472 | ////////////////////////////////// 473 | 474 | templateRewriting: { 475 | 476 | ensureTemplateIsRewritten(template: Node, templateEngine: KnockoutTemplateEngine, templateDocument: Document): any; 477 | ensureTemplateIsRewritten(template: string, templateEngine: KnockoutTemplateEngine, templateDocument: Document): any; 478 | 479 | memoizeBindingAttributeSyntax(htmlString: string, templateEngine: KnockoutTemplateEngine): any; 480 | 481 | applyMemoizedBindingsToNextSibling(bindings: any, nodeName: string): string; 482 | }; 483 | 484 | ////////////////////////////////// 485 | // nativeTemplateEngine.js 486 | ////////////////////////////////// 487 | 488 | nativeTemplateEngine: { 489 | 490 | prototype: KnockoutNativeTemplateEngine; 491 | 492 | new (): KnockoutNativeTemplateEngine; 493 | 494 | instance: KnockoutNativeTemplateEngine; 495 | }; 496 | 497 | ////////////////////////////////// 498 | // jqueryTmplTemplateEngine.js 499 | ////////////////////////////////// 500 | 501 | jqueryTmplTemplateEngine: { 502 | 503 | prototype: KnockoutTemplateEngine; 504 | 505 | renderTemplateSource(templateSource: Object, bindingContext: KnockoutBindingContext, options: Object): Node[]; 506 | 507 | createJavaScriptEvaluatorBlock(script: string): string; 508 | 509 | addTemplate(templateName: string, templateMarkup: string): void; 510 | }; 511 | 512 | ////////////////////////////////// 513 | // templating.js 514 | ////////////////////////////////// 515 | 516 | setTemplateEngine(templateEngine: KnockoutNativeTemplateEngine | undefined): void; 517 | 518 | renderTemplate(template: Function, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any; 519 | renderTemplate(template: any, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any; 520 | renderTemplate(template: Function, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any; 521 | renderTemplate(template: any, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any; 522 | renderTemplate(template: Function, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any; 523 | renderTemplate(template: any, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any; 524 | renderTemplate(template: Function, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any; 525 | renderTemplate(template: any, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any; 526 | 527 | renderTemplateForEach(template: Function, arrayOrObservableArray: any[], options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; 528 | renderTemplateForEach(template: any, arrayOrObservableArray: any[], options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; 529 | renderTemplateForEach(template: Function, arrayOrObservableArray: KnockoutObservable, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; 530 | renderTemplateForEach(template: any, arrayOrObservableArray: KnockoutObservable, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; 531 | 532 | ignoreDependencies(callback: () => T): T; 533 | 534 | expressionRewriting: { 535 | bindingRewriteValidators: any[]; 536 | twoWayBindings: any; 537 | parseObjectLiteral: (objectLiteralString: string) => any[]; 538 | 539 | /** 540 | Internal, private KO utility for updating model properties from within bindings 541 | property: If the property being updated is (or might be) an observable, pass it here 542 | If it turns out to be a writable observable, it will be written to directly 543 | allBindings: An object with a get method to retrieve bindings in the current execution context. 544 | This will be searched for a '_ko_property_writers' property in case you're writing to a non-observable 545 | (See note below) 546 | key: The key identifying the property to be written. Example: for { hasFocus: myValue }, write to 'myValue' by specifying the key 'hasFocus' 547 | value: The value to be written 548 | checkIfDifferent: If true, and if the property being written is a writable observable, the value will only be written if 549 | it is !== existing value on that writable observable 550 | 551 | Note that if you need to write to the viewModel without an observable property, 552 | you need to set ko.expressionRewriting.twoWayBindings[key] = true; *before* the binding evaluation. 553 | */ 554 | writeValueToProperty: (property: KnockoutObservable | any, allBindings: KnockoutAllBindingsAccessor, key: string, value: any, checkIfDifferent?: boolean) => void; 555 | }; 556 | 557 | ///////////////////////////////// 558 | 559 | bindingProvider: { 560 | instance: KnockoutBindingProvider; 561 | new (): KnockoutBindingProvider; 562 | } 563 | 564 | ///////////////////////////////// 565 | // selectExtensions.js 566 | ///////////////////////////////// 567 | 568 | selectExtensions: { 569 | 570 | readValue(element: HTMLElement): any; 571 | 572 | writeValue(element: HTMLElement, value: any): void; 573 | }; 574 | 575 | components: KnockoutComponents; 576 | 577 | ///////////////////////////////// 578 | // options.js 579 | ///////////////////////////////// 580 | 581 | options: { 582 | deferUpdates: boolean, 583 | 584 | useOnlyNativeEvents: boolean 585 | }; 586 | 587 | ///////////////////////////////// 588 | // tasks.js 589 | ///////////////////////////////// 590 | 591 | tasks: KnockoutTasks; 592 | 593 | ///////////////////////////////// 594 | // utils.js 595 | ///////////////////////////////// 596 | 597 | onError?: (error: Error) => void; 598 | } 599 | 600 | interface KnockoutBindingProvider { 601 | nodeHasBindings(node: Node): boolean; 602 | getBindings(node: Node, bindingContext: KnockoutBindingContext): {}; 603 | getBindingAccessors?(node: Node, bindingContext: KnockoutBindingContext): { [key: string]: string; }; 604 | } 605 | 606 | interface KnockoutComputedContext { 607 | getDependenciesCount(): number; 608 | isInitial: () => boolean; 609 | isSleeping: boolean; 610 | } 611 | 612 | // 613 | // refactored types into a namespace to reduce global pollution 614 | // and used Union Types to simplify overloads (requires TypeScript 1.4) 615 | // 616 | declare namespace KnockoutComponentTypes { 617 | 618 | interface Config { 619 | viewModel?: ViewModelFunction | ViewModelSharedInstance | ViewModelFactoryFunction | AMDModule; 620 | template: string | Node[]| DocumentFragment | TemplateElement | AMDModule; 621 | synchronous?: boolean; 622 | } 623 | 624 | interface ComponentConfig { 625 | viewModel?: ViewModelFunction | ViewModelSharedInstance | ViewModelFactoryFunction | AMDModule; 626 | template: any; 627 | createViewModel?: any; 628 | } 629 | 630 | interface EmptyConfig { 631 | } 632 | 633 | // common AMD type 634 | interface AMDModule { 635 | require: string; 636 | } 637 | 638 | // viewmodel types 639 | interface ViewModelFunction { 640 | (params?: any): any; 641 | } 642 | 643 | interface ViewModelSharedInstance { 644 | instance: any; 645 | } 646 | 647 | interface ViewModelFactoryFunction { 648 | createViewModel: (params?: any, componentInfo?: ComponentInfo) => any; 649 | } 650 | 651 | interface ComponentInfo { 652 | element: Node; 653 | templateNodes: Node[]; 654 | } 655 | 656 | interface TemplateElement { 657 | element: string | Node; 658 | } 659 | 660 | interface Loader { 661 | getConfig? (componentName: string, callback: (result: ComponentConfig | null) => void): void; 662 | loadComponent? (componentName: string, config: ComponentConfig, callback: (result: Definition) => void): void; 663 | loadTemplate? (componentName: string, templateConfig: any, callback: (result: Node[]) => void): void; 664 | loadViewModel? (componentName: string, viewModelConfig: any, callback: (result: any) => void): void; 665 | suppressLoaderExceptions?: boolean; 666 | } 667 | 668 | interface Definition { 669 | template: Node[]; 670 | createViewModel? (params: any, options: { element: Node; }): any; 671 | } 672 | } 673 | 674 | interface KnockoutComponents { 675 | // overloads for register method: 676 | register(componentName: string, config: KnockoutComponentTypes.Config | KnockoutComponentTypes.EmptyConfig): void; 677 | 678 | isRegistered(componentName: string): boolean; 679 | unregister(componentName: string): void; 680 | get(componentName: string, callback: (definition: KnockoutComponentTypes.Definition) => void): void; 681 | clearCachedDefinition(componentName: string): void 682 | defaultLoader: KnockoutComponentTypes.Loader; 683 | loaders: KnockoutComponentTypes.Loader[]; 684 | getComponentNameForNode(node: Node): string; 685 | } 686 | 687 | declare var ko: KnockoutStatic; 688 | 689 | declare module "knockout" { 690 | export = ko; 691 | } 692 | -------------------------------------------------------------------------------- /node_modules/@types/knockout/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "@types/knockout@^3.4.38", 6 | "scope": "@types", 7 | "escapedName": "@types%2fknockout", 8 | "name": "@types/knockout", 9 | "rawSpec": "^3.4.38", 10 | "spec": ">=3.4.38 <4.0.0", 11 | "type": "range" 12 | }, 13 | "/Users/shane/Dropbox/Code/CodeCoverageDashboardWidgets-Dev/node_modules/vss-web-extension-sdk" 14 | ] 15 | ], 16 | "_from": "@types/knockout@>=3.4.38 <4.0.0", 17 | "_id": "@types/knockout@3.4.40", 18 | "_inCache": true, 19 | "_location": "/@types/knockout", 20 | "_npmOperationalInternal": { 21 | "host": "packages-18-east.internal.npmjs.com", 22 | "tmp": "tmp/knockout-3.4.40.tgz_1489195060281_0.2981768895406276" 23 | }, 24 | "_npmUser": { 25 | "name": "types", 26 | "email": "ts-npm-types@microsoft.com" 27 | }, 28 | "_phantomChildren": {}, 29 | "_requested": { 30 | "raw": "@types/knockout@^3.4.38", 31 | "scope": "@types", 32 | "escapedName": "@types%2fknockout", 33 | "name": "@types/knockout", 34 | "rawSpec": "^3.4.38", 35 | "spec": ">=3.4.38 <4.0.0", 36 | "type": "range" 37 | }, 38 | "_requiredBy": [ 39 | "/vss-web-extension-sdk" 40 | ], 41 | "_resolved": "https://registry.npmjs.org/@types/knockout/-/knockout-3.4.40.tgz", 42 | "_shasum": "5610286f18d0fbacac7dd9019b6e750355ed1055", 43 | "_shrinkwrap": null, 44 | "_spec": "@types/knockout@^3.4.38", 45 | "_where": "/Users/shane/Dropbox/Code/CodeCoverageDashboardWidgets-Dev/node_modules/vss-web-extension-sdk", 46 | "contributors": [ 47 | { 48 | "name": "Boris Yankov", 49 | "url": "https://github.com/borisyankov/" 50 | }, 51 | { 52 | "name": "Igor Oleinikov", 53 | "url": "https://github.com/Igorbek/" 54 | }, 55 | { 56 | "name": "Clément Bourgeois", 57 | "url": "https://github.com/moonpyk/" 58 | }, 59 | { 60 | "name": "Matt Brooks", 61 | "url": "https://github.com/EnableSoftware" 62 | } 63 | ], 64 | "dependencies": {}, 65 | "description": "TypeScript definitions for Knockout", 66 | "devDependencies": {}, 67 | "directories": {}, 68 | "dist": { 69 | "shasum": "5610286f18d0fbacac7dd9019b6e750355ed1055", 70 | "tarball": "https://registry.npmjs.org/@types/knockout/-/knockout-3.4.40.tgz" 71 | }, 72 | "license": "MIT", 73 | "main": "", 74 | "maintainers": [ 75 | { 76 | "name": "types", 77 | "email": "ryan.cavanaugh@microsoft.com" 78 | } 79 | ], 80 | "name": "@types/knockout", 81 | "optionalDependencies": {}, 82 | "peerDependencies": {}, 83 | "readme": "ERROR: No README data found!", 84 | "repository": { 85 | "type": "git", 86 | "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" 87 | }, 88 | "scripts": {}, 89 | "typeScriptVersion": "2.0", 90 | "typesPublisherContentHash": "432018c9a243b3b6317e39820da40cf76cdc7cea4efe0da88898bb2b2f1507f9", 91 | "version": "3.4.40" 92 | } 93 | -------------------------------------------------------------------------------- /node_modules/@types/q/README.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | > `npm install --save @types/q` 3 | 4 | # Summary 5 | This package contains type definitions for Q (https://github.com/kriskowal/q). 6 | 7 | # Details 8 | Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/q 9 | 10 | Additional Details 11 | * Last updated: Wed, 05 Oct 2016 20:53:38 GMT 12 | * File structure: UMD 13 | * Library Dependencies: none 14 | * Module Dependencies: none 15 | * Global values: Q 16 | 17 | # Credits 18 | These definitions were written by Barrie Nemetchek , Andrew Gaspar , John Reilly . 19 | -------------------------------------------------------------------------------- /node_modules/@types/q/index.d.ts: -------------------------------------------------------------------------------- 1 | // Type definitions for Q 2 | // Project: https://github.com/kriskowal/q 3 | // Definitions by: Barrie Nemetchek , Andrew Gaspar , John Reilly 4 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped 5 | 6 | export = Q; 7 | export as namespace Q; 8 | 9 | /** 10 | * If value is a Q promise, returns the promise. 11 | * If value is a promise from another library it is coerced into a Q promise (where possible). 12 | */ 13 | declare function Q(promise: Q.IPromise): Q.Promise; 14 | /** 15 | * If value is not a promise, returns a promise that is fulfilled with value. 16 | */ 17 | declare function Q(value: T): Q.Promise; 18 | /** 19 | * Calling with nothing at all creates a void promise 20 | */ 21 | declare function Q(): Q.Promise; 22 | 23 | declare namespace Q { 24 | type IWhenable = IPromise | T; 25 | interface IPromise { 26 | then(onFulfill?: (value: T) => IWhenable, onReject?: (error: any) => IWhenable): IPromise; 27 | } 28 | 29 | interface Deferred { 30 | promise: Promise; 31 | resolve(value?: IWhenable): void; 32 | reject(reason: any): void; 33 | notify(value: any): void; 34 | makeNodeResolver(): (reason: any, value: T) => void; 35 | } 36 | 37 | interface Promise { 38 | /** 39 | * Like a finally clause, allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful for collecting resources regardless of whether a job succeeded, like closing a database connection, shutting a server down, or deleting an unneeded key from an object. 40 | 41 | * finally returns a promise, which will become resolved with the same fulfillment value or rejection reason as promise. However, if callback returns a promise, the resolution of the returned promise will be delayed until the promise returned from callback is finished. 42 | */ 43 | fin(finallyCallback: () => any): Promise; 44 | /** 45 | * Like a finally clause, allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful for collecting resources regardless of whether a job succeeded, like closing a database connection, shutting a server down, or deleting an unneeded key from an object. 46 | 47 | * finally returns a promise, which will become resolved with the same fulfillment value or rejection reason as promise. However, if callback returns a promise, the resolution of the returned promise will be delayed until the promise returned from callback is finished. 48 | */ 49 | finally(finallyCallback: () => any): Promise; 50 | 51 | /** 52 | * The then method from the Promises/A+ specification, with an additional progress handler. 53 | */ 54 | then(onFulfill?: (value: T) => IWhenable, onReject?: (error: any) => IWhenable, onProgress?: Function): Promise; 55 | 56 | /** 57 | * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. 58 | * 59 | * This is especially useful in conjunction with all 60 | */ 61 | spread(onFulfill: (...args: any[]) => IWhenable, onReject?: (reason: any) => IWhenable): Promise; 62 | 63 | fail(onRejected: (reason: any) => IWhenable): Promise; 64 | 65 | /** 66 | * A sugar method, equivalent to promise.then(undefined, onRejected). 67 | */ 68 | catch(onRejected: (reason: any) => IWhenable): Promise; 69 | 70 | /** 71 | * A sugar method, equivalent to promise.then(undefined, undefined, onProgress). 72 | */ 73 | progress(onProgress: (progress: any) => any): Promise; 74 | 75 | /** 76 | * Much like then, but with different behavior around unhandled rejection. If there is an unhandled rejection, either because promise is rejected and no onRejected callback was provided, or because onFulfilled or onRejected threw an error or returned a rejected promise, the resulting rejection reason is thrown as an exception in a future turn of the event loop. 77 | * 78 | * This method should be used to terminate chains of promises that will not be passed elsewhere. Since exceptions thrown in then callbacks are consumed and transformed into rejections, exceptions at the end of the chain are easy to accidentally, silently ignore. By arranging for the exception to be thrown in a future turn of the event loop, so that it won't be caught, it causes an onerror event on the browser window, or an uncaughtException event on Node.js's process object. 79 | * 80 | * Exceptions thrown by done will have long stack traces, if Q.longStackSupport is set to true. If Q.onerror is set, exceptions will be delivered there instead of thrown in a future turn. 81 | * 82 | * The Golden Rule of done vs. then usage is: either return your promise to someone else, or if the chain ends with you, call done to terminate it. 83 | */ 84 | done(onFulfilled?: (value: T) => any, onRejected?: (reason: any) => any, onProgress?: (progress: any) => any): void; 85 | 86 | /** 87 | * If callback is a function, assumes it's a Node.js-style callback, and calls it as either callback(rejectionReason) when/if promise becomes rejected, or as callback(null, fulfillmentValue) when/if promise becomes fulfilled. If callback is not a function, simply returns promise. 88 | */ 89 | nodeify(callback: (reason: any, value: any) => void): Promise; 90 | 91 | /** 92 | * Returns a promise to get the named property of an object. Essentially equivalent to 93 | * 94 | * promise.then(function (o) { 95 | * return o[propertyName]; 96 | * }); 97 | */ 98 | get(propertyName: String): Promise; 99 | set(propertyName: String, value: any): Promise; 100 | delete(propertyName: String): Promise; 101 | /** 102 | * Returns a promise for the result of calling the named method of an object with the given array of arguments. The object itself is this in the function, just like a synchronous method call. Essentially equivalent to 103 | * 104 | * promise.then(function (o) { 105 | * return o[methodName].apply(o, args); 106 | * }); 107 | */ 108 | post(methodName: String, args: any[]): Promise; 109 | /** 110 | * Returns a promise for the result of calling the named method of an object with the given variadic arguments. The object itself is this in the function, just like a synchronous method call. 111 | */ 112 | invoke(methodName: String, ...args: any[]): Promise; 113 | fapply(args: any[]): Promise; 114 | fcall(...args: any[]): Promise; 115 | 116 | /** 117 | * Returns a promise for an array of the property names of an object. Essentially equivalent to 118 | * 119 | * promise.then(function (o) { 120 | * return Object.keys(o); 121 | * }); 122 | */ 123 | keys(): Promise; 124 | 125 | /** 126 | * A sugar method, equivalent to promise.then(function () { return value; }). 127 | */ 128 | thenResolve(value: U): Promise; 129 | /** 130 | * A sugar method, equivalent to promise.then(function () { throw reason; }). 131 | */ 132 | thenReject(reason: any): Promise; 133 | 134 | /** 135 | * Attaches a handler that will observe the value of the promise when it becomes fulfilled, returning a promise for that same value, perhaps deferred but not replaced by the promise returned by the onFulfilled handler. 136 | */ 137 | tap(onFulfilled: (value: T) => any): Promise; 138 | 139 | timeout(ms: number, message?: string): Promise; 140 | /** 141 | * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. 142 | */ 143 | delay(ms: number): Promise; 144 | 145 | /** 146 | * Returns whether a given promise is in the fulfilled state. When the static version is used on non-promises, the result is always true. 147 | */ 148 | isFulfilled(): boolean; 149 | /** 150 | * Returns whether a given promise is in the rejected state. When the static version is used on non-promises, the result is always false. 151 | */ 152 | isRejected(): boolean; 153 | /** 154 | * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. 155 | */ 156 | isPending(): boolean; 157 | 158 | valueOf(): any; 159 | 160 | /** 161 | * Returns a "state snapshot" object, which will be in one of three forms: 162 | * 163 | * - { state: "pending" } 164 | * - { state: "fulfilled", value: } 165 | * - { state: "rejected", reason: } 166 | */ 167 | inspect(): PromiseState; 168 | } 169 | 170 | interface PromiseState { 171 | /** 172 | * "fulfilled", "rejected", "pending" 173 | */ 174 | state: string; 175 | value?: T; 176 | reason?: any; 177 | } 178 | 179 | // If no value provided, returned promise will be of void type 180 | export function when(): Promise; 181 | 182 | // if no fulfill, reject, or progress provided, returned promise will be of same type 183 | export function when(value: IWhenable): Promise; 184 | 185 | // If a non-promise value is provided, it will not reject or progress 186 | export function when(value: IWhenable, onFulfilled: (val: T) => IWhenable, onRejected?: (reason: any) => IWhenable, onProgress?: (progress: any) => any): Promise; 187 | 188 | /** 189 | * Currently "impossible" (and I use the term loosely) to implement due to TypeScript limitations as it is now. 190 | * See: https://github.com/Microsoft/TypeScript/issues/1784 for discussion on it. 191 | */ 192 | // export function try(method: Function, ...args: any[]): Promise; 193 | 194 | export function fbind(method: (...args: any[]) => IWhenable, ...args: any[]): (...args: any[]) => Promise; 195 | 196 | export function fcall(method: (...args: any[]) => T, ...args: any[]): Promise; 197 | 198 | export function send(obj: any, functionName: string, ...args: any[]): Promise; 199 | export function invoke(obj: any, functionName: string, ...args: any[]): Promise; 200 | export function mcall(obj: any, functionName: string, ...args: any[]): Promise; 201 | 202 | export function denodeify(nodeFunction: Function, ...args: any[]): (...args: any[]) => Promise; 203 | export function nbind(nodeFunction: Function, thisArg: any, ...args: any[]): (...args: any[]) => Promise; 204 | export function nfbind(nodeFunction: Function, ...args: any[]): (...args: any[]) => Promise; 205 | export function nfcall(nodeFunction: Function, ...args: any[]): Promise; 206 | export function nfapply(nodeFunction: Function, args: any[]): Promise; 207 | 208 | export function ninvoke(nodeModule: any, functionName: string, ...args: any[]): Promise; 209 | export function npost(nodeModule: any, functionName: string, args: any[]): Promise; 210 | export function nsend(nodeModule: any, functionName: string, ...args: any[]): Promise; 211 | export function nmcall(nodeModule: any, functionName: string, ...args: any[]): Promise; 212 | 213 | /** 214 | * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. 215 | */ 216 | export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable, IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C, D, E, F]>; 217 | /** 218 | * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. 219 | */ 220 | export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C, D, E]>; 221 | /** 222 | * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. 223 | */ 224 | export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C, D]>; 225 | /** 226 | * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. 227 | */ 228 | export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C]>; 229 | /** 230 | * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. 231 | */ 232 | export function all(promises: IWhenable<[IWhenable, IWhenable]>): Promise<[A, B]>; 233 | /** 234 | * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. 235 | */ 236 | export function all(promises: IWhenable[]>): Promise; 237 | 238 | /** 239 | * Returns a promise for the first of an array of promises to become settled. 240 | */ 241 | export function race(promises: IWhenable[]): Promise; 242 | 243 | /** 244 | * Returns a promise that is fulfilled with an array of promise state snapshots, but only after all the original promises have settled, i.e. become either fulfilled or rejected. 245 | */ 246 | export function allSettled(promises: IWhenable[]>): Promise[]>; 247 | 248 | export function allResolved(promises: IWhenable[]>): Promise[]>; 249 | 250 | /** 251 | * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. 252 | * This is especially useful in conjunction with all. 253 | */ 254 | export function spread(promises: IWhenable[], onFulfilled: (...args: T[]) => IWhenable, onRejected?: (reason: any) => IWhenable): Promise; 255 | 256 | /** 257 | * Returns a promise that will have the same result as promise, except that if promise is not fulfilled or rejected before ms milliseconds, the returned promise will be rejected with an Error with the given message. If message is not supplied, the message will be "Timed out after " + ms + " ms". 258 | */ 259 | export function timeout(promise: Promise, ms: number, message?: string): Promise; 260 | 261 | /** 262 | * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. 263 | */ 264 | export function delay(promise: Promise, ms: number): Promise; 265 | /** 266 | * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. 267 | */ 268 | export function delay(value: T, ms: number): Promise; 269 | /** 270 | * Returns a promise that will be fulfilled with undefined after at least ms milliseconds have passed. 271 | */ 272 | export function delay(ms: number): Promise ; 273 | /** 274 | * Returns whether a given promise is in the fulfilled state. When the static version is used on non-promises, the result is always true. 275 | */ 276 | export function isFulfilled(promise: Promise): boolean; 277 | /** 278 | * Returns whether a given promise is in the rejected state. When the static version is used on non-promises, the result is always false. 279 | */ 280 | export function isRejected(promise: Promise): boolean; 281 | /** 282 | * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. 283 | */ 284 | export function isPending(promise: Promise): boolean; 285 | 286 | /** 287 | * Returns a "deferred" object with a: 288 | * promise property 289 | * resolve(value) method 290 | * reject(reason) method 291 | * notify(value) method 292 | * makeNodeResolver() method 293 | */ 294 | export function defer(): Deferred; 295 | 296 | /** 297 | * Returns a promise that is rejected with reason. 298 | */ 299 | export function reject(reason?: any): Promise; 300 | 301 | export function Promise(resolver: (resolve: (val: IWhenable) => void , reject: (reason: any) => void , notify: (progress: any) => void ) => void ): Promise; 302 | 303 | /** 304 | * Creates a new version of func that accepts any combination of promise and non-promise values, converting them to their fulfillment values before calling the original func. The returned version also always returns a promise: if func does a return or throw, then Q.promised(func) will return fulfilled or rejected promise, respectively. 305 | * 306 | * This can be useful for creating functions that accept either promises or non-promise values, and for ensuring that the function always returns a promise even in the face of unintentional thrown exceptions. 307 | */ 308 | export function promised(callback: (...args: any[]) => T): (...args: any[]) => Promise; 309 | 310 | /** 311 | * Returns whether the given value is a Q promise. 312 | */ 313 | export function isPromise(object: any): boolean; 314 | /** 315 | * Returns whether the given value is a promise (i.e. it's an object with a then function). 316 | */ 317 | export function isPromiseAlike(object: any): boolean; 318 | /** 319 | * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. 320 | */ 321 | export function isPending(object: any): boolean; 322 | /** 323 | * If an object is not a promise, it is as "near" as possible. 324 | * If a promise is rejected, it is as "near" as possible too. 325 | * If it’s a fulfilled promise, the fulfillment value is nearer. 326 | * If it’s a deferred promise and the deferred has been resolved, the 327 | * resolution is "nearer". 328 | */ 329 | export function nearer(promise: Promise): T; 330 | 331 | /** 332 | * This is an experimental tool for converting a generator function into a deferred function. This has the potential of reducing nested callbacks in engines that support yield. 333 | */ 334 | export function async(generatorFunction: any): (...args: any[]) => Promise; 335 | export function nextTick(callback: Function): void; 336 | 337 | /** 338 | * A settable property that will intercept any uncaught errors that would otherwise be thrown in the next tick of the event loop, usually as a result of done. Can be useful for getting the full stack trace of an error in browsers, which is not usually possible with window.onerror. 339 | */ 340 | export var onerror: (reason: any) => void; 341 | /** 342 | * A settable property that lets you turn on long stack trace support. If turned on, "stack jumps" will be tracked across asynchronous promise operations, so that if an uncaught error is thrown by done or a rejection reason's stack property is inspected in a rejection callback, a long stack trace is produced. 343 | */ 344 | export var longStackSupport: boolean; 345 | 346 | /** 347 | * Calling resolve with a pending promise causes promise to wait on the passed promise, becoming fulfilled with its fulfillment value or rejected with its rejection reason (or staying pending forever, if the passed promise does). 348 | * Calling resolve with a rejected promise causes promise to be rejected with the passed promise's rejection reason. 349 | * Calling resolve with a fulfilled promise causes promise to be fulfilled with the passed promise's fulfillment value. 350 | * Calling resolve with a non-promise value causes promise to be fulfilled with that value. 351 | */ 352 | export function resolve(object: IWhenable): Promise; 353 | 354 | /** 355 | * Resets the global "Q" variable to the value it has before Q was loaded. 356 | * This will either be undefined if there was no version or the version of Q which was already loaded before. 357 | * @returns { The last version of Q. } 358 | */ 359 | export function noConflict(): typeof Q; 360 | } 361 | -------------------------------------------------------------------------------- /node_modules/@types/q/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "@types/q@0.0.32", 6 | "scope": "@types", 7 | "escapedName": "@types%2fq", 8 | "name": "@types/q", 9 | "rawSpec": "0.0.32", 10 | "spec": "0.0.32", 11 | "type": "version" 12 | }, 13 | "/Users/shane/Dropbox/Code/CodeCoverageDashboardWidgets-Dev/node_modules/vss-web-extension-sdk" 14 | ] 15 | ], 16 | "_from": "@types/q@0.0.32", 17 | "_id": "@types/q@0.0.32", 18 | "_inCache": true, 19 | "_location": "/@types/q", 20 | "_npmOperationalInternal": { 21 | "host": "packages-16-east.internal.npmjs.com", 22 | "tmp": "tmp/q-0.0.32.tgz_1475701264683_0.48870944301597774" 23 | }, 24 | "_npmUser": { 25 | "name": "types", 26 | "email": "ts-npm-types@microsoft.com" 27 | }, 28 | "_phantomChildren": {}, 29 | "_requested": { 30 | "raw": "@types/q@0.0.32", 31 | "scope": "@types", 32 | "escapedName": "@types%2fq", 33 | "name": "@types/q", 34 | "rawSpec": "0.0.32", 35 | "spec": "0.0.32", 36 | "type": "version" 37 | }, 38 | "_requiredBy": [ 39 | "/vss-web-extension-sdk" 40 | ], 41 | "_resolved": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz", 42 | "_shasum": "bd284e57c84f1325da702babfc82a5328190c0c5", 43 | "_shrinkwrap": null, 44 | "_spec": "@types/q@0.0.32", 45 | "_where": "/Users/shane/Dropbox/Code/CodeCoverageDashboardWidgets-Dev/node_modules/vss-web-extension-sdk", 46 | "author": { 47 | "name": "Barrie Nemetchek", 48 | "email": "https://github.com/bnemetchek" 49 | }, 50 | "dependencies": {}, 51 | "description": "TypeScript definitions for Q", 52 | "devDependencies": {}, 53 | "directories": {}, 54 | "dist": { 55 | "shasum": "bd284e57c84f1325da702babfc82a5328190c0c5", 56 | "tarball": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz" 57 | }, 58 | "license": "MIT", 59 | "main": "", 60 | "maintainers": [ 61 | { 62 | "name": "types", 63 | "email": "ryan.cavanaugh@microsoft.com" 64 | } 65 | ], 66 | "name": "@types/q", 67 | "optionalDependencies": {}, 68 | "peerDependencies": {}, 69 | "readme": "ERROR: No README data found!", 70 | "repository": { 71 | "type": "git", 72 | "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" 73 | }, 74 | "scripts": {}, 75 | "typesPublisherContentHash": "6597b89d57d9ceec9ef1e6af32e2fd02f4582abaf309f8a76f6746ee1af830d5", 76 | "typings": "index.d.ts", 77 | "version": "0.0.32" 78 | } 79 | -------------------------------------------------------------------------------- /node_modules/@types/q/types-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "authors": "Barrie Nemetchek , Andrew Gaspar , John Reilly ", 3 | "definitionFilename": "index.d.ts", 4 | "libraryDependencies": [], 5 | "moduleDependencies": [], 6 | "libraryMajorVersion": "0", 7 | "libraryMinorVersion": "0", 8 | "libraryName": "Q", 9 | "typingsPackageName": "q", 10 | "projectName": "https://github.com/kriskowal/q", 11 | "sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped", 12 | "sourceBranch": "types-2.0", 13 | "kind": "UMD", 14 | "globals": [ 15 | "Q" 16 | ], 17 | "declaredModules": [], 18 | "files": [ 19 | "index.d.ts" 20 | ], 21 | "hasPackageJson": false, 22 | "contentHash": "6597b89d57d9ceec9ef1e6af32e2fd02f4582abaf309f8a76f6746ee1af830d5" 23 | } -------------------------------------------------------------------------------- /node_modules/@types/react/README.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | > `npm install --save @types/react` 3 | 4 | # Summary 5 | This package contains type definitions for React (http://facebook.github.io/react/). 6 | 7 | # Details 8 | Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/react 9 | 10 | Additional Details 11 | * Last updated: Fri, 06 Jan 2017 15:26:08 GMT 12 | * Library Dependencies: none 13 | * Module Dependencies: none 14 | * Global values: React 15 | 16 | # Credits 17 | These definitions were written by Asana , AssureSign , Microsoft , John Reilly . 18 | -------------------------------------------------------------------------------- /node_modules/@types/react/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "@types/react@^0.14.54", 6 | "scope": "@types", 7 | "escapedName": "@types%2freact", 8 | "name": "@types/react", 9 | "rawSpec": "^0.14.54", 10 | "spec": ">=0.14.54 <0.15.0", 11 | "type": "range" 12 | }, 13 | "/Users/shane/Dropbox/Code/CodeCoverageDashboardWidgets-Dev/node_modules/vss-web-extension-sdk" 14 | ] 15 | ], 16 | "_from": "@types/react@>=0.14.54 <0.15.0", 17 | "_id": "@types/react@0.14.57", 18 | "_inCache": true, 19 | "_location": "/@types/react", 20 | "_npmOperationalInternal": { 21 | "host": "packages-18-east.internal.npmjs.com", 22 | "tmp": "tmp/react-0.14.57.tgz_1483716395794_0.408169761300087" 23 | }, 24 | "_npmUser": { 25 | "name": "types", 26 | "email": "ts-npm-types@microsoft.com" 27 | }, 28 | "_phantomChildren": {}, 29 | "_requested": { 30 | "raw": "@types/react@^0.14.54", 31 | "scope": "@types", 32 | "escapedName": "@types%2freact", 33 | "name": "@types/react", 34 | "rawSpec": "^0.14.54", 35 | "spec": ">=0.14.54 <0.15.0", 36 | "type": "range" 37 | }, 38 | "_requiredBy": [ 39 | "/vss-web-extension-sdk" 40 | ], 41 | "_resolved": "https://registry.npmjs.org/@types/react/-/react-0.14.57.tgz", 42 | "_shasum": "1878a8654fafdd1d381b8457292b6433498c5b62", 43 | "_shrinkwrap": null, 44 | "_spec": "@types/react@^0.14.54", 45 | "_where": "/Users/shane/Dropbox/Code/CodeCoverageDashboardWidgets-Dev/node_modules/vss-web-extension-sdk", 46 | "author": { 47 | "name": "Asana", 48 | "email": "https://asana.com" 49 | }, 50 | "dependencies": {}, 51 | "description": "TypeScript definitions for React", 52 | "devDependencies": {}, 53 | "directories": {}, 54 | "dist": { 55 | "shasum": "1878a8654fafdd1d381b8457292b6433498c5b62", 56 | "tarball": "https://registry.npmjs.org/@types/react/-/react-0.14.57.tgz" 57 | }, 58 | "license": "MIT", 59 | "main": "", 60 | "maintainers": [ 61 | { 62 | "name": "types", 63 | "email": "ryan.cavanaugh@microsoft.com" 64 | } 65 | ], 66 | "name": "@types/react", 67 | "optionalDependencies": {}, 68 | "peerDependencies": {}, 69 | "readme": "ERROR: No README data found!", 70 | "repository": { 71 | "type": "git", 72 | "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" 73 | }, 74 | "scripts": {}, 75 | "typeScriptVersion": "2.0", 76 | "typesPublisherContentHash": "e35ac566aad08448fb2a54493940cc2a1c04f01a994f8e0666a285f612c2a479", 77 | "version": "0.14.57" 78 | } 79 | -------------------------------------------------------------------------------- /node_modules/@types/react/types-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "authors": "Asana , AssureSign , Microsoft , John Reilly ", 3 | "libraryDependencies": [], 4 | "moduleDependencies": [], 5 | "libraryMajorVersion": 0, 6 | "libraryMinorVersion": 14, 7 | "typeScriptVersion": "2.0", 8 | "libraryName": "React", 9 | "typingsPackageName": "react", 10 | "projectName": "http://facebook.github.io/react/", 11 | "sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped", 12 | "sourceBranch": "master", 13 | "globals": [ 14 | "React" 15 | ], 16 | "declaredModules": [ 17 | "react" 18 | ], 19 | "files": [ 20 | "index.d.ts" 21 | ], 22 | "hasPackageJson": false, 23 | "contentHash": "e35ac566aad08448fb2a54493940cc2a1c04f01a994f8e0666a285f612c2a479" 24 | } -------------------------------------------------------------------------------- /node_modules/@types/requirejs/README.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | > `npm install --save @types/requirejs` 3 | 4 | # Summary 5 | This package contains type definitions for RequireJS (http://requirejs.org/). 6 | 7 | # Details 8 | Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/requirejs 9 | 10 | Additional Details 11 | * Last updated: Thu, 30 Mar 2017 19:50:46 GMT 12 | * Dependencies: none 13 | * Global values: define, require, requirejs 14 | 15 | # Credits 16 | These definitions were written by Josh Baldwin . 17 | -------------------------------------------------------------------------------- /node_modules/@types/requirejs/index.d.ts: -------------------------------------------------------------------------------- 1 | // Type definitions for RequireJS 2.1.20 2 | // Project: http://requirejs.org/ 3 | // Definitions by: Josh Baldwin 4 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped 5 | 6 | /* 7 | require-2.1.8.d.ts may be freely distributed under the MIT license. 8 | 9 | Copyright (c) 2013 Josh Baldwin https://github.com/jbaldwin/require.d.ts 10 | 11 | Permission is hereby granted, free of charge, to any person 12 | obtaining a copy of this software and associated documentation 13 | files (the "Software"), to deal in the Software without 14 | restriction, including without limitation the rights to use, 15 | copy, modify, merge, publish, distribute, sublicense, and/or sell 16 | copies of the Software, and to permit persons to whom the 17 | Software is furnished to do so, subject to the following conditions: 18 | 19 | The above copyright notice and this permission notice shall be 20 | included in all copies or substantial portions of the Software. 21 | 22 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 24 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 25 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 26 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 27 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 29 | OTHER DEALINGS IN THE SOFTWARE. 30 | */ 31 | 32 | declare module 'module' { 33 | var mod: { 34 | config: () => any; 35 | id: string; 36 | uri: string; 37 | } 38 | export = mod; 39 | } 40 | 41 | interface RequireError extends Error { 42 | 43 | /** 44 | * The error ID that maps to an ID on a web page. 45 | **/ 46 | requireType: string; 47 | 48 | /** 49 | * Required modules. 50 | **/ 51 | requireModules: string[] | null; 52 | 53 | /** 54 | * The original error, if there is one (might be null). 55 | **/ 56 | originalError: Error; 57 | } 58 | 59 | interface RequireShim { 60 | 61 | /** 62 | * List of dependencies. 63 | **/ 64 | deps?: string[]; 65 | 66 | /** 67 | * Name the module will be exported as. 68 | **/ 69 | exports?: string; 70 | 71 | /** 72 | * Initialize function with all dependcies passed in, 73 | * if the function returns a value then that value is used 74 | * as the module export value instead of the object 75 | * found via the 'exports' string. 76 | * @param dependencies 77 | * @return 78 | **/ 79 | init?: (...dependencies: any[]) => any; 80 | } 81 | 82 | interface RequireConfig { 83 | 84 | // The root path to use for all module lookups. 85 | baseUrl?: string; 86 | 87 | // Path mappings for module names not found directly under 88 | // baseUrl. 89 | paths?: { [key: string]: any; }; 90 | 91 | 92 | // Dictionary of Shim's. 93 | // does not cover case of key->string[] 94 | shim?: { [key: string]: RequireShim; }; 95 | 96 | /** 97 | * For the given module prefix, instead of loading the 98 | * module with the given ID, substitude a different 99 | * module ID. 100 | * 101 | * @example 102 | * requirejs.config({ 103 | * map: { 104 | * 'some/newmodule': { 105 | * 'foo': 'foo1.2' 106 | * }, 107 | * 'some/oldmodule': { 108 | * 'foo': 'foo1.0' 109 | * } 110 | * } 111 | * }); 112 | **/ 113 | map?: { 114 | [id: string]: { 115 | [id: string]: string; 116 | }; 117 | }; 118 | 119 | /** 120 | * Allows pointing multiple module IDs to a module ID that contains a bundle of modules. 121 | * 122 | * @example 123 | * requirejs.config({ 124 | * bundles: { 125 | * 'primary': ['main', 'util', 'text', 'text!template.html'], 126 | * 'secondary': ['text!secondary.html'] 127 | * } 128 | * }); 129 | **/ 130 | bundles?: { [key: string]: string[]; }; 131 | 132 | /** 133 | * AMD configurations, use module.config() to access in 134 | * define() functions 135 | **/ 136 | config?: { [id: string]: {}; }; 137 | 138 | /** 139 | * Configures loading modules from CommonJS packages. 140 | **/ 141 | packages?: {}; 142 | 143 | /** 144 | * The number of seconds to wait before giving up on loading 145 | * a script. The default is 7 seconds. 146 | **/ 147 | waitSeconds?: number; 148 | 149 | /** 150 | * A name to give to a loading context. This allows require.js 151 | * to load multiple versions of modules in a page, as long as 152 | * each top-level require call specifies a unique context string. 153 | **/ 154 | context?: string; 155 | 156 | /** 157 | * An array of dependencies to load. 158 | **/ 159 | deps?: string[]; 160 | 161 | /** 162 | * A function to pass to require that should be require after 163 | * deps have been loaded. 164 | * @param modules 165 | **/ 166 | callback?: (...modules: any[]) => void; 167 | 168 | /** 169 | * If set to true, an error will be thrown if a script loads 170 | * that does not call define() or have shim exports string 171 | * value that can be checked. 172 | **/ 173 | enforceDefine?: boolean; 174 | 175 | /** 176 | * If set to true, document.createElementNS() will be used 177 | * to create script elements. 178 | **/ 179 | xhtml?: boolean; 180 | 181 | /** 182 | * Extra query string arguments appended to URLs that RequireJS 183 | * uses to fetch resources. Most useful to cache bust when 184 | * the browser or server is not configured correctly. 185 | * 186 | * @example 187 | * urlArgs: "bust= + (new Date()).getTime() 188 | * 189 | * As of RequireJS 2.2.0, urlArgs can be a function. If a 190 | * function, it will receive the module ID and the URL as 191 | * parameters, and it should return a string that will be added 192 | * to the end of the URL. Return an empty string if no args. 193 | * Be sure to take care of adding the '?' or '&' depending on 194 | * the existing state of the URL. 195 | * 196 | * @example 197 | 198 | * requirejs.config({ 199 | * urlArgs: function(id, url) { 200 | * var args = 'v=1'; 201 | * if (url.indexOf('view.html') !== -1) { 202 | * args = 'v=2' 203 | * } 204 | * 205 | * return (url.indexOf('?') === -1 ? '?' : '&') + args; 206 | * } 207 | * }); 208 | **/ 209 | urlArgs?: string | ((id: string, url: string) => string); 210 | 211 | /** 212 | * Specify the value for the type="" attribute used for script 213 | * tags inserted into the document by RequireJS. Default is 214 | * "text/javascript". To use Firefox's JavasScript 1.8 215 | * features, use "text/javascript;version=1.8". 216 | **/ 217 | scriptType?: string; 218 | 219 | /** 220 | * If set to true, skips the data-main attribute scanning done 221 | * to start module loading. Useful if RequireJS is embedded in 222 | * a utility library that may interact with other RequireJS 223 | * library on the page, and the embedded version should not do 224 | * data-main loading. 225 | **/ 226 | skipDataMain?: boolean; 227 | 228 | /** 229 | * Allow extending requirejs to support Subresource Integrity 230 | * (SRI). 231 | **/ 232 | onNodeCreated?: (node: HTMLScriptElement, config: RequireConfig, moduleName: string, url: string) => void; 233 | } 234 | 235 | // todo: not sure what to do with this guy 236 | interface RequireModule { 237 | 238 | /** 239 | * 240 | **/ 241 | config(): {}; 242 | 243 | } 244 | 245 | /** 246 | * 247 | **/ 248 | interface RequireMap { 249 | 250 | /** 251 | * 252 | **/ 253 | prefix: string; 254 | 255 | /** 256 | * 257 | **/ 258 | name: string; 259 | 260 | /** 261 | * 262 | **/ 263 | parentMap: RequireMap; 264 | 265 | /** 266 | * 267 | **/ 268 | url: string; 269 | 270 | /** 271 | * 272 | **/ 273 | originalName: string; 274 | 275 | /** 276 | * 277 | **/ 278 | fullName: string; 279 | } 280 | 281 | interface Require { 282 | 283 | /** 284 | * Configure require.js 285 | **/ 286 | config(config: RequireConfig): Require; 287 | 288 | /** 289 | * CommonJS require call 290 | * @param module Module to load 291 | * @return The loaded module 292 | */ 293 | (module: string): any; 294 | 295 | /** 296 | * Start the main app logic. 297 | * Callback is optional. 298 | * Can alternatively use deps and callback. 299 | * @param modules Required modules to load. 300 | **/ 301 | (modules: string[]): void; 302 | 303 | /** 304 | * @see Require() 305 | * @param ready Called when required modules are ready. 306 | **/ 307 | (modules: string[], ready: Function): void; 308 | 309 | /** 310 | * @see http://requirejs.org/docs/api.html#errbacks 311 | * @param ready Called when required modules are ready. 312 | **/ 313 | (modules: string[], ready: Function, errback: Function): void; 314 | 315 | /** 316 | * Generate URLs from require module 317 | * @param module Module to URL 318 | * @return URL string 319 | **/ 320 | toUrl(module: string): string; 321 | 322 | /** 323 | * Returns true if the module has already been loaded and defined. 324 | * @param module Module to check 325 | **/ 326 | defined(module: string): boolean; 327 | 328 | /** 329 | * Returns true if the module has already been requested or is in the process of loading and should be available at some point. 330 | * @param module Module to check 331 | **/ 332 | specified(module: string): boolean; 333 | 334 | /** 335 | * On Error override 336 | * @param err 337 | **/ 338 | onError(err: RequireError, errback?: (err: RequireError) => void): void; 339 | 340 | /** 341 | * Undefine a module 342 | * @param module Module to undefine. 343 | **/ 344 | undef(module: string): void; 345 | 346 | /** 347 | * Semi-private function, overload in special instance of undef() 348 | **/ 349 | onResourceLoad(context: Object, map: RequireMap, depArray: RequireMap[]): void; 350 | } 351 | 352 | interface RequireDefine { 353 | 354 | /** 355 | * Define Simple Name/Value Pairs 356 | * @param config Dictionary of Named/Value pairs for the config. 357 | **/ 358 | (config: { [key: string]: any; }): void; 359 | 360 | /** 361 | * Define function. 362 | * @param func: The function module. 363 | **/ 364 | (func: () => any): void; 365 | 366 | /** 367 | * Define function with dependencies. 368 | * @param deps List of dependencies module IDs. 369 | * @param ready Callback function when the dependencies are loaded. 370 | * callback param deps module dependencies 371 | * callback return module definition 372 | **/ 373 | (deps: string[], ready: Function): void; 374 | 375 | /** 376 | * Define module with simplified CommonJS wrapper. 377 | * @param ready 378 | * callback require requirejs instance 379 | * callback exports exports object 380 | * callback module module 381 | * callback return module definition 382 | **/ 383 | (ready: (require: Require, exports: { [key: string]: any; }, module: RequireModule) => any): void; 384 | 385 | /** 386 | * Define a module with a name and dependencies. 387 | * @param name The name of the module. 388 | * @param deps List of dependencies module IDs. 389 | * @param ready Callback function when the dependencies are loaded. 390 | * callback deps module dependencies 391 | * callback return module definition 392 | **/ 393 | (name: string, deps: string[], ready: Function): void; 394 | 395 | /** 396 | * Define a module with a name. 397 | * @param name The name of the module. 398 | * @param ready Callback function when the dependencies are loaded. 399 | * callback return module definition 400 | **/ 401 | (name: string, ready: Function): void; 402 | 403 | /** 404 | * Used to allow a clear indicator that a global define function (as needed for script src browser loading) conforms 405 | * to the AMD API, any global define function SHOULD have a property called "amd" whose value is an object. 406 | * This helps avoid conflict with any other existing JavaScript code that could have defined a define() function 407 | * that does not conform to the AMD API. 408 | * define.amd.jQuery is specific to jQuery and indicates that the loader is able to account for multiple version 409 | * of jQuery being loaded simultaneously. 410 | */ 411 | amd: Object; 412 | } 413 | 414 | // Ambient declarations for 'require' and 'define' 415 | declare var requirejs: Require; 416 | declare var require: Require; 417 | declare var define: RequireDefine; 418 | -------------------------------------------------------------------------------- /node_modules/@types/requirejs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "@types/requirejs@^2.1.28", 6 | "scope": "@types", 7 | "escapedName": "@types%2frequirejs", 8 | "name": "@types/requirejs", 9 | "rawSpec": "^2.1.28", 10 | "spec": ">=2.1.28 <3.0.0", 11 | "type": "range" 12 | }, 13 | "/Users/shane/Dropbox/Code/CodeCoverageDashboardWidgets-Dev/node_modules/vss-web-extension-sdk" 14 | ] 15 | ], 16 | "_from": "@types/requirejs@>=2.1.28 <3.0.0", 17 | "_id": "@types/requirejs@2.1.29", 18 | "_inCache": true, 19 | "_location": "/@types/requirejs", 20 | "_npmOperationalInternal": { 21 | "host": "packages-18-east.internal.npmjs.com", 22 | "tmp": "tmp/requirejs-2.1.29.tgz_1490903475213_0.2580136307515204" 23 | }, 24 | "_npmUser": { 25 | "name": "types", 26 | "email": "ts-npm-types@microsoft.com" 27 | }, 28 | "_phantomChildren": {}, 29 | "_requested": { 30 | "raw": "@types/requirejs@^2.1.28", 31 | "scope": "@types", 32 | "escapedName": "@types%2frequirejs", 33 | "name": "@types/requirejs", 34 | "rawSpec": "^2.1.28", 35 | "spec": ">=2.1.28 <3.0.0", 36 | "type": "range" 37 | }, 38 | "_requiredBy": [ 39 | "/vss-web-extension-sdk" 40 | ], 41 | "_resolved": "https://registry.npmjs.org/@types/requirejs/-/requirejs-2.1.29.tgz", 42 | "_shasum": "bc48bc833c079c2c24ba6afbca6d3a03b3f4e2f3", 43 | "_shrinkwrap": null, 44 | "_spec": "@types/requirejs@^2.1.28", 45 | "_where": "/Users/shane/Dropbox/Code/CodeCoverageDashboardWidgets-Dev/node_modules/vss-web-extension-sdk", 46 | "contributors": [ 47 | { 48 | "name": "Josh Baldwin", 49 | "url": "https://github.com/jbaldwin/" 50 | } 51 | ], 52 | "dependencies": {}, 53 | "description": "TypeScript definitions for RequireJS", 54 | "devDependencies": {}, 55 | "directories": {}, 56 | "dist": { 57 | "shasum": "bc48bc833c079c2c24ba6afbca6d3a03b3f4e2f3", 58 | "tarball": "https://registry.npmjs.org/@types/requirejs/-/requirejs-2.1.29.tgz" 59 | }, 60 | "license": "MIT", 61 | "main": "", 62 | "maintainers": [ 63 | { 64 | "name": "types", 65 | "email": "ryan.cavanaugh@microsoft.com" 66 | } 67 | ], 68 | "name": "@types/requirejs", 69 | "optionalDependencies": {}, 70 | "peerDependencies": {}, 71 | "readme": "ERROR: No README data found!", 72 | "repository": { 73 | "type": "git", 74 | "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" 75 | }, 76 | "scripts": {}, 77 | "typeScriptVersion": "2.0", 78 | "typesPublisherContentHash": "bd8a729ddc3cdf34526f4c2dadebbe30f131b51ae47b00901d0b67d5dc0fa51d", 79 | "version": "2.1.29" 80 | } 81 | -------------------------------------------------------------------------------- /node_modules/vss-web-extension-sdk/.npmignore: -------------------------------------------------------------------------------- 1 | npm-debug.log -------------------------------------------------------------------------------- /node_modules/vss-web-extension-sdk/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Microsoft 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /node_modules/vss-web-extension-sdk/README.md: -------------------------------------------------------------------------------- 1 | # Visual Studio Services Web Extension SDK 2 | 3 | ## Overview 4 | 5 | Client SDK and TypeScript declare files for developing [Visual Studio Team Services Extensions](https://www.visualstudio.com/integrate/extensions/overview). 6 | 7 | The core SDK script, `VSS.SDK.js`, enables web extensions to communicate to the host Team Services frame and to perform operations like initializing, notifying extension is loaded or getting context about the current page. 8 | 9 | > A previous version of the SDK was named `vss-sdk`. Make sure to switch to the new `vss-web-extension-sdk` name. 10 | 11 | ## Get the SDK 12 | 13 | 1. Download and install [Node.js]((https://nodejs.org/en/download/)) 14 | 2. Run `npm install vss-web-extension-sdk` from the root of your extension project 15 | 16 | This will place `VSS.SDK.js` and `VSS.SDK.min.js` in `node_modules/vss-web-extension-sdk/lib/` 17 | 18 | ### Include the SDK script on your page 19 | 20 | If you are developing a web extension, you will need to reference the SDK script from your HTML pages. For example: 21 | 22 | ``` 23 | 24 | ``` 25 | 26 | To ensure the SDK script is packaged with your extension, update your extension manifest (typically `vss-extension.json`) and add a new entry to `files`: 27 | 28 | ``` 29 | { 30 | "files": [{ 31 | "path": "node_modules/vss-web-extension-sdk/lib"", 32 | "addressable": true, 33 | "packagePath": "lib" 34 | }] 35 | } 36 | ``` 37 | 38 | Note: setting `packagePath` is optional, but results in a simpler path for referencing the SDK script from your HTML pages. Not setting a part name would have required you to reference the full path in your ` 60 | ``` 61 | 62 | Full API reference of VSS.SDK.js can be found at [Core Client SDK](https://www.visualstudio.com/docs/integrate/extensions/reference/client/core-sdk) page. 63 | 64 | ## Types 65 | 66 | Type definitions are provided for: 67 | 68 | * UI controls and client services (see `typings/vss.d.ts`) 69 | * REST clients and contracts for Build, Work, and Code (see `typings/tfs.d.ts`) 70 | * REST clients and contracts for Release Management (see `typings/rmo.d.ts`) 71 | 72 | Dependency graph: 73 | 74 | ![Dependency Graph](img/dependencies.png) 75 | 76 | ### Consuming the types 77 | 78 | From a [TypeScript](https://www.typescriptlang.org) 2.0 or later project: 79 | 80 | * Set ```"moduleResolution": "node"``` in your `tfsconfig.json` project file 81 | 82 | See [TypeScript Module Resolution](https://www.typescriptlang.org/docs/handbook/module-resolution.html) for more details. 83 | 84 | Alternatively, you can explicitly reference the types at the top of your TypeScript file(s): 85 | 86 | ``` 87 | /// 88 | ``` 89 | 90 | ## Organizing your web extension project 91 | 92 | If you are developing a web extension for Visual Studio Team Service using TypeScript, we recommend the following organization: 93 | 94 | ### Project structure 95 | 96 | ``` 97 | |-- src 98 | |-- app.ts 99 | |-- some-module 100 | |-- a.ts 101 | |-- b.ts 102 | |-- static 103 | |-- css 104 | |-- main.css 105 | |-- images 106 | |-- logo.png 107 | |-- app.html 108 | |-- vss-extension.json 109 | |-- package.json 110 | |-- tsconfig.json 111 | ``` 112 | 113 | 1. Place TypeScript source files in `src` 114 | 2. Place static content (CSS, images, HTML, etc) in `static` 115 | * This simplifes the process of packaging all necessary static content in your 116 | 117 | ### TypeScript project file (`tsconfig.json`) 118 | 119 | Defines the options for compiling your TypeScript files. 120 | 121 | ```json 122 | { 123 | "compilerOptions": { 124 | "module": "amd", 125 | "moduleResolution": "node", 126 | "target": "es5", 127 | "rootDir": "src/", 128 | "outDir": "dist/", 129 | "types": [ 130 | "vss-web-extension-sdk" 131 | ] 132 | } 133 | } 134 | ``` 135 | 136 | 1. After compiling (`tsc -p .`), resulting .js files are placed in `dist`. For example, `dist/app.js`. 137 | 138 | 2. If your code directly uses types from other @types modules, you will want to include the module(s) in your package.json and add them to the `types` array. See [@types](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html). 139 | 140 | Learn more about [tsconfig.json](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html) 141 | 142 | ### NPM package manifest (`package.json`) 143 | 144 | Declares the libraries (like the vss-web-extension-sdk) required to compile, package, and use your extension. 145 | 146 | ``` 147 | { 148 | /* other details like ID, version, etc are omitted */ 149 | 150 | "scripts": { 151 | "build": "tsc -p .", 152 | "postbuild": "npm run package", 153 | "package": "tfx extension create", 154 | "gallery-publish": "tfx extension publish --rev-version", 155 | "clean": "rimraf ./dist && rimraf ./*.vsix" 156 | }, 157 | "devDependencies": { 158 | "rimraf": "^2.5.4", 159 | "tfx-cli": "^0.3.45", 160 | "typescript": "^2.1.4" 161 | }, 162 | "dependencies": { 163 | "@types/jquery": "^2.0.34", 164 | "@types/q": "0.0.32", 165 | "vss-web-extension-sdk": "^2.109.0" 166 | } 167 | } 168 | ``` 169 | 170 | 1. `scripts` provides a convenient way to define common operations that you want to perform on your project, like compiling and packaging. 171 | * For example, to build (compile) and package your extension, run: `npm run build`. This runs `build` and `postbuild`. If you make a change that doesn't require compiling, you can package by simply running `npm run package`. 172 | * To package and publish directly to the Marketplace on build, change the `postbuild` script to run the `gallery-publish` script (instead of `package`). You can then run `npm run build -- --token xxxxxx` (where xxxx is you personal access token for publishing to the Marketplace) to build, package, and publish your extension. 173 | 174 | 2. The dependencies on the @types for `jquery` and `q` are only necessary if your TypeScript code is directly referencing either of these types. 175 | 176 | Learn more about [package.json](https://docs.npmjs.com/files/package.json) 177 | 178 | ### Extension manifest (`vss-extension.json`) 179 | 180 | ``` 181 | { 182 | /* details omitted */ 183 | "files": [ 184 | { 185 | "path": "dist", 186 | "addressable": true 187 | }, 188 | { 189 | "path": "static", 190 | "addressable": true 191 | }, 192 | { 193 | "path": "node_modules/vss-web-extension-sdk/lib", 194 | "addressable": true, 195 | "packagePath": "lib" 196 | } 197 | ], 198 | "contributions": [ 199 | { 200 | "id": "my-hub", 201 | "type": "ms.vss-web.hub", 202 | "properties": { 203 | "name": "Hub", 204 | "uri": "static/app.html" 205 | } 206 | } 207 | ] 208 | } 209 | ``` 210 | 211 | 1. The compiled JavaScript files (placed into `dist` by your `tsconfig.json`) will be packaged into the `dist` folder of the extension package. 212 | 213 | 2. The VSS SDK scripts will be packaged into the `lib` folder of the extension package. 214 | 215 | Learn more about the [extension manifest](https://www.visualstudio.com/docs/integrate/extensions/develop/manifest). 216 | 217 | ### HTML page 218 | 219 | ```html 220 | 221 | 222 | 223 | 227 | 228 | 229 | 230 | 231 | 244 | 245 | 246 | ``` 247 | 248 | ## Code of Conduct 249 | 250 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 251 | -------------------------------------------------------------------------------- /node_modules/vss-web-extension-sdk/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vss-web-extension-sdk", 3 | "description": "Visual Studio Services Client SDK. JavaScript library for Visual Studio Online extensions.", 4 | "authors": [ 5 | "vsalmopen" 6 | ], 7 | "license": "MIT", 8 | "keywords": [ 9 | "extensions", 10 | "visual studio online" 11 | ], 12 | "homepage": "https://github.com/Microsoft/vss-web-extension-sdk", 13 | "moduleType": [ 14 | "amd" 15 | ], 16 | "main": [ 17 | "lib/VSS.SDK.js" 18 | ], 19 | "typescript": { 20 | "definitions": [ 21 | "typings/rmo.d.ts", 22 | "typings/tfs.d.ts", 23 | "typings/vss.d.ts" 24 | ] 25 | }, 26 | "ignore": [ 27 | "**/.*", 28 | "node_modules", 29 | "bower_components", 30 | "test", 31 | "tests" 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /node_modules/vss-web-extension-sdk/img/dependencies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdavis3/code-coverage-widgets/88455a1c82f1802b770c107c56482112e6b79da8/node_modules/vss-web-extension-sdk/img/dependencies.png -------------------------------------------------------------------------------- /node_modules/vss-web-extension-sdk/lib/VSS.SDK.min.js: -------------------------------------------------------------------------------- 1 | // Copyright (C) Microsoft Corporation. All rights reserved. 2 | var XDM,VSS;(function(n){function u(){return new o}function s(){return Math.floor(Math.random()*(f-t)+t).toString(36)+Math.floor(Math.random()*(f-t)+t).toString(36)}var i,r,e;n.createDeferred=u;var o=function(){function n(){var n=this;this._resolveCallbacks=[];this._rejectCallbacks=[];this._isResolved=!1;this._isRejected=!1;this.resolve=function(t){n._resolve(t)};this.reject=function(t){n._reject(t)};this.promise={};this.promise.then=function(t,i){return n._then(t,i)}}return n.prototype._then=function(t,i){var u=this,r;return!t&&!i||this._isResolved&&!t||this._isRejected&&!i?this.promise:(r=new n,this._resolveCallbacks.push(function(n){u._wrapCallback(t,n,r,!1)}),this._rejectCallbacks.push(function(n){u._wrapCallback(i,n,r,!0)}),this._isResolved?this._resolve(this._resolvedValue):this._isRejected&&this._reject(this._rejectValue),r.promise)},n.prototype._wrapCallback=function(n,t,i,r){if(!n){r?i.reject(t):i.resolve(t);return}var u;try{u=n(t)}catch(f){i.reject(f);return}u===undefined?i.resolve(t):u&&typeof u.then=="function"?u.then(function(n){i.resolve(n)},function(n){i.reject(n)}):i.resolve(u)},n.prototype._resolve=function(n){if(this._isRejected||this._isResolved||(this._isResolved=!0,this._resolvedValue=n),this._isResolved&&this._resolveCallbacks.length>0){var t=this._resolveCallbacks.splice(0);window.setTimeout(function(){for(var i=0,r=t.length;i0){var t=this._rejectCallbacks.splice(0);window.setTimeout(function(){for(var i=0,r=t.length;it.MAX_XDM_DEPTH)||this._shouldSkipSerialization(n))return null;if(a=function(t,e,o){var s,c,l,a,v;try{s=t[o]}catch(y){}(c=typeof s,c!=="undefined")&&(l=-1,c==="object"&&(l=r.originalObjects.indexOf(s)),l>=0?(a=r.newObjects[l],a.__circularReferenceId||(a.__circularReferenceId=u++),e[o]={__circularReference:a.__circularReferenceId}):c==="function"?(v=h._nextProxyFunctionId++,e[o]={__proxyFunctionId:h._registerProxyFunction(s,n),__channelId:h._channelId}):c==="object"?e[o]=s&&s instanceof Date?{__proxyDate:s.getTime()}:h._customSerializeObject(s,i,r,u,f+1):o!=="__proxyFunctionId"&&(e[o]=s))},r||(r={newObjects:[],originalObjects:[]}),r.originalObjects.push(n),n instanceof Array)for(o=[],r.newObjects.push(o),e=0,c=n.length;e0&&(f=!0);vt=!0;f&&it()}n.themeData&&ct(n.themeData);o||v?lt():b()})},0)}function it(){var n={localStorage:JSON.stringify(u||{})};i.invokeRemoteMethod("updateSandboxedStorage","VSS.HostControl",[n])}function bt(n,t){var i;i=typeof n=="string"?[n]:n;t||(t=function(){});a?rt(i,t):(r?o||(o=!0,h&&(h=!1,lt())):tt({usePlatformScripts:!0}),ut(function(){rt(i,t)}))}function rt(n,i){t.diagnostics.bundlingEnabled?window.require(["VSS/Bundling"],function(t){t.requireModules(n).spread(function(){i.apply(this,arguments)})}):window.require(n,i)}function ut(n){h?window.setTimeout(n,0):(f||(f=[]),f.push(n))}function kt(){i.invokeRemoteMethod("notifyLoadSucceeded","VSS.HostControl")}function ft(n){i.invokeRemoteMethod("notifyLoadFailed","VSS.HostControl",[n])}function et(){return k}function dt(){return d}function ot(){return l}function gt(){return g}function ni(n,t){return st(n).then(function(n){return t||(t={}),t.webContext||(t.webContext=et()),t.extensionContext||(t.extensionContext=ot()),n.getInstance(n.id,t)})}function st(t){var r=XDM.createDeferred();return n.ready(function(){i.invokeRemoteMethod("getServiceContribution","vss.hostManagement",[t]).then(function(n){var t=n;t.getInstance=function(t,i){return ht(n,t,i)};r.resolve(t)},r.reject)}),r.promise}function ti(t){var r=XDM.createDeferred();return n.ready(function(){i.invokeRemoteMethod("getContributionsForTarget","vss.hostManagement",[t]).then(function(n){var t=[];n.forEach(function(n){var i=n;i.getInstance=function(t,i){return ht(n,t,i)};t.push(i)});r.resolve(t)},r.reject)}),r.promise}function ht(t,r,u){var f=XDM.createDeferred();return n.ready(function(){i.invokeRemoteMethod("getBackgroundContributionInstance","vss.hostManagement",[t,r,u]).then(f.resolve,f.reject)}),f.promise}function ii(n,t){i.getObjectRegistry().register(n,t)}function ri(n){i.getObjectRegistry().unregister(n)}function ui(n,t){return i.getObjectRegistry().getInstance(n,t)}function fi(){return i.invokeRemoteMethod("getAccessToken","VSS.HostControl")}function ei(){return i.invokeRemoteMethod("getAppToken","VSS.HostControl")}function oi(n,t){s||(s=document.getElementsByTagName("body").item(0));var r=typeof n=="number"?n:s.scrollWidth,u=typeof t=="number"?t:s.scrollHeight;i.invokeRemoteMethod("resize","VSS.HostControl",[r,u])}function ct(n){var t,i;if(e||(e=document.createElement("style"),e.type="text/css",document.head.appendChild(e)),t=[],n)for(i in n)t.push("--"+i+": "+n[i]);e.innerText=":root { "+t.join("; ")+" } body { color: var(--text-primary-color) }"}function lt(){var i=ci(t.webContext),f,g,n,s,e,h,k,nt,tt,d,u;if(window.__vssPageContext=t,window.__cultureInfo=t.microsoftAjaxConfig.cultureInfo,v!==!1&&t.coreReferences.stylesheets&&t.coreReferences.stylesheets.forEach(function(n){if(n.isCoreStylesheet){var t=document.createElement("link");t.href=c(n.url,i);t.rel="stylesheet";w(t,"head")}}),!o){a=!0;b();return}if(f=[],g=!1,t.coreReferences.scripts&&(t.coreReferences.scripts.forEach(function(n){if(n.isCoreModule){var r=!1,t=window;n.identifier==="JQuery"?r=!!t.jQuery:n.identifier==="JQueryUI"?r=!!(t.jQuery&&t.jQuery.ui&&t.jQuery.ui.version):n.identifier==="AMDLoader"&&(r=typeof t.define=="function"&&!!t.define.amd);r?g=!0:f.push({source:c(n.url,i)})}}),t.coreReferences.coreScriptsBundle&&!g&&(f=[{source:c(t.coreReferences.coreScriptsBundle.url,i)}]),t.coreReferences.extensionCoreReferences&&f.push({source:c(t.coreReferences.extensionCoreReferences.url,i)})),n={baseUrl:l.baseUri,contributionPaths:null,paths:{},shim:{}},r.moduleLoaderConfig&&(r.moduleLoaderConfig.baseUrl&&(n.baseUrl=r.moduleLoaderConfig.baseUrl),hi(r.moduleLoaderConfig,n),at(r.moduleLoaderConfig,n)),t.moduleLoaderConfig&&(at(t.moduleLoaderConfig,n),s=t.moduleLoaderConfig.contributionPaths,s))for(e in s)if(s.hasOwnProperty(e)&&!n.paths[e]&&(h=s[e].value,n.paths[e]=h.match("^https?://")?h:i+h,k=t.moduleLoaderConfig.paths,k)){nt=e+"/";tt=y(i,t.moduleLoaderConfig.baseUrl);for(d in k)si(d,nt)&&(u=k[d],u.match("^https?://")||(u=u[0]==="/"?y(i,u):y(tt,u)),n.paths[d]=u)}window.__vssModuleLoaderConfig=n;f.push({content:"require.config("+JSON.stringify(n)+");"});p(f,0,function(){a=!0;b()})}function si(n,t){return n&&n.length>=t.length?n.substr(0,t.length).localeCompare(t)===0:!1}function y(n,t){var i=n||"";return i[i.length-1]!=="/"&&(i+="/"),t&&(i+=t[0]==="/"?t.substr(1):t),i}function hi(n,t,i){var r,u;if(n.paths){t.paths||(t.paths={});for(r in n.paths)n.paths.hasOwnProperty(r)&&(u=n.paths[r],i&&(u=i(r,n.paths[r])),u&&(t.paths[r]=u))}}function at(n,t){if(n.shim){t.shim||(t.shim={});for(var i in n.shim)n.shim.hasOwnProperty(i)&&(t.shim[i]=n.shim[i])}}function ci(n){var r=n.account||n.host,t=r.uri,i=r.relativeUri;return t&&i&&(t[t.length-1]!=="/"&&(t+="/"),i[i.length-1]!=="/"&&(i+="/"),t=t.substr(0,t.length-i.length)),t}function p(n,t,i){var f=this,r,u;if(t>=n.length){i.call(this);return}r=document.createElement("script");r.type="text/javascript";n[t].source?(u=n[t].source,r.src=u,r.addEventListener("load",function(){p.call(f,n,t+1,i)}),r.addEventListener("error",function(){ft("Failed to load script: "+u)}),w(r,"head")):n[t].content&&(r.textContent=n[t].content,w(r,"head"),p.call(this,n,t+1,i))}function w(n,t){var i=document.getElementsByTagName(t)[0];i||(i=document.createElement(t),document.appendChild(i));i.appendChild(n)}function c(n,t){var i=(n||"").toLowerCase();return i.substr(0,2)!=="//"&&i.substr(0,5)!=="http:"&&i.substr(0,6)!=="https:"&&(n=t+(i[0]==="/"?"":"/")+n),n}function b(){var t=this,n;h=!0;f&&(n=f,f=null,n.forEach(function(n){n.call(t)}))}var wt;n.VssSDKVersion=2;n.VssSDKRestVersion="4.1";var s,e,k,t,l,d,g,r,a=!1,o,v,h=!1,f,i=XDM.XDMChannelManager.get().addChannel(window.parent),u,vt=!1,nt=function(){function n(){t&&t.call(this)}function i(){}var t;return Object.defineProperties(i.prototype,{getItem:{get:function(){return function(n){var t=this[""+n];return typeof t=="undefined"?null:t}}},setItem:{get:function(){return function(t,i){t=""+t;var u=this[t],r=""+i;u!==r&&(this[t]=r,n())}}},removeItem:{get:function(){return function(t){t=""+t;typeof this[t]!="undefined"&&(delete this[t],n())}}},clear:{get:function(){return function(){var r=Object.keys(this),t,i,u;if(r.length>0){for(t=0,i=r;t 2 | /// 3 | /// -------------------------------------------------------------------------------- /overview.md: -------------------------------------------------------------------------------- 1 | #Code Coverage Dashboard Widgets 2 | * NOTE: This works with Azure DevOps and Azure DevOps Server (Team Foundation Server). However, Microsoft requires TFS 2015 Update 3 or higher for folks using Azure DevOps Server (Team Foundation Server). 3 | 4 | ## Release Notes 5 | * 1.0.272 6 | * Added configuration option to display delta of previous build's coverage. 7 | * Updated logo and screenshots. 8 | * 1.0.219 9 | * Fixed issues where widget would not render properly. 10 | * 1.0.195 11 | * Added configuration option to display measurement name (via PR from [Tommy Vernieri](https://github.com/Blackbaud-TommyVernieri)) 12 | * 1.0.194 13 | * Added support for Branches (via PR from [Tommy Vernieri](https://github.com/Blackbaud-TommyVernieri)) 14 | * 1.0.191 15 | * Added support for Failed builds that produce code coverage results. 16 | * 1.0.190 17 | * Added support for Partially Succeeded builds. 18 | * 1.0.189 19 | * Updated to latest SDK. 20 | * Minor updates to improve error handling. 21 | * 1.0.171 22 | * Added configuration option to display up to two decimal places. Zero is the default. 23 | * Added broader configuration options for broader coverage measurement: 24 | * Blocks 25 | * Branch 26 | * Class 27 | * Complexity 28 | * Instruction 29 | * Line 30 | * Lines (this is the default) 31 | * Method 32 | * 1.0.166 33 | * Added configuration option to measure Lines or Blocks. 34 | * 1.0.162 35 | * Displayed build name now links to build details. 36 | * 1.0.149 37 | * Fixed defect where build was not showing as selected. 38 | * Added configuration option to display build name on widget. 39 | * Updated to match native style. 40 | * 1.0.122 41 | * Widget can now be resized to one or two columns in width. 42 | * 1.0.119 43 | * Build definitions are now sorted alphabetically. 44 | * 1.0.99 45 | * Initial release. Includes a single widget that extracts "Line" (.NET) or "Lines" (Java) code coverage results from unit tests executed during a build. 46 | 47 | ## Code Coverage Widget 48 | This widget displays the percentage of unit test code coverage based on a selected build definition. If a build definition does not have any unit tests results recognized by the widget or if has not yet been configured, it will indicate so with a message displayed within the widget. 49 | 50 | ![](img/preview1.png) 51 | 52 | The following configuration options are available: 53 | 54 | ![](img/screenshots/configuration.png) 55 | 56 | ## Known Issues 57 | * None. 58 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "requires": true, 3 | "lockfileVersion": 1, 4 | "dependencies": { 5 | "@types/jquery": { 6 | "version": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.41.tgz", 7 | "integrity": "sha1-uHugUQEfme2+WG2Plygud4bgGm0=" 8 | }, 9 | "@types/jqueryui": { 10 | "version": "https://registry.npmjs.org/@types/jqueryui/-/jqueryui-1.11.32.tgz", 11 | "integrity": "sha1-WiG97dZRfCG673VIiZMbfSe1+z4=", 12 | "requires": { 13 | "@types/jquery": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.41.tgz" 14 | } 15 | }, 16 | "@types/knockout": { 17 | "version": "https://registry.npmjs.org/@types/knockout/-/knockout-3.4.40.tgz", 18 | "integrity": "sha1-VhAobxjQ+6ysfdkBm251A1XtEFU=" 19 | }, 20 | "@types/q": { 21 | "version": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz", 22 | "integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=" 23 | }, 24 | "@types/react": { 25 | "version": "https://registry.npmjs.org/@types/react/-/react-0.14.57.tgz", 26 | "integrity": "sha1-GHioZU+v3R04G4RXKStkM0mMW2I=" 27 | }, 28 | "@types/requirejs": { 29 | "version": "https://registry.npmjs.org/@types/requirejs/-/requirejs-2.1.29.tgz", 30 | "integrity": "sha1-vEi8gzwHnCwkumr7ym06A7P04vM=" 31 | }, 32 | "vss-web-extension-sdk": { 33 | "version": "2.117.0", 34 | "resolved": "https://registry.npmjs.org/vss-web-extension-sdk/-/vss-web-extension-sdk-2.117.0.tgz", 35 | "integrity": "sha1-8M/f9GQ/EupgfC1nv2NnG6wnu0c=", 36 | "requires": { 37 | "@types/jquery": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.41.tgz", 38 | "@types/jqueryui": "https://registry.npmjs.org/@types/jqueryui/-/jqueryui-1.11.32.tgz", 39 | "@types/knockout": "https://registry.npmjs.org/@types/knockout/-/knockout-3.4.40.tgz", 40 | "@types/q": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz", 41 | "@types/react": "https://registry.npmjs.org/@types/react/-/react-0.14.57.tgz", 42 | "@types/requirejs": "https://registry.npmjs.org/@types/requirejs/-/requirejs-2.1.29.tgz" 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /sdk/scripts/VSS.SDK.min.js: -------------------------------------------------------------------------------- 1 | // Copyright (C) Microsoft Corporation. All rights reserved. 2 | var XDM,VSS;(function(n){function u(){return new o}function s(){return Math.floor(Math.random()*(f-t)+t).toString(36)+Math.floor(Math.random()*(f-t)+t).toString(36)}var i,r,e;n.createDeferred=u;var o=function(){function n(){var n=this;this._resolveCallbacks=[];this._rejectCallbacks=[];this._isResolved=!1;this._isRejected=!1;this.resolve=function(t){n._resolve(t)};this.reject=function(t){n._reject(t)};this.promise={};this.promise.then=function(t,i){return n._then(t,i)}}return n.prototype._then=function(t,i){var u=this,r;return!t&&!i||this._isResolved&&!t||this._isRejected&&!i?this.promise:(r=new n,this._resolveCallbacks.push(function(n){u._wrapCallback(t,n,r,!1)}),this._rejectCallbacks.push(function(n){u._wrapCallback(i,n,r,!0)}),this._isResolved?this._resolve(this._resolvedValue):this._isRejected&&this._reject(this._rejectValue),r.promise)},n.prototype._wrapCallback=function(n,t,i,r){if(!n){r?i.reject(t):i.resolve(t);return}var u;try{u=n(t)}catch(f){i.reject(f);return}u===undefined?i.resolve(t):u&&typeof u.then=="function"?u.then(function(n){i.resolve(n)},function(n){i.reject(n)}):i.resolve(u)},n.prototype._resolve=function(n){if(this._isRejected||this._isResolved||(this._isResolved=!0,this._resolvedValue=n),this._isResolved&&this._resolveCallbacks.length>0){var t=this._resolveCallbacks.splice(0);window.setTimeout(function(){for(var i=0,r=t.length;i0){var t=this._rejectCallbacks.splice(0);window.setTimeout(function(){for(var i=0,r=t.length;it.MAX_XDM_DEPTH)||this._shouldSkipSerialization(n))return null;if(a=function(t,e,o){var s,c,l,a,v;try{s=t[o]}catch(y){}(c=typeof s,c!=="undefined")&&(l=-1,c==="object"&&(l=r.originalObjects.indexOf(s)),l>=0?(a=r.newObjects[l],a.__circularReferenceId||(a.__circularReferenceId=u++),e[o]={__circularReference:a.__circularReferenceId}):c==="function"?(v=h._nextProxyFunctionId++,e[o]={__proxyFunctionId:h._registerProxyFunction(s,n),__channelId:h._channelId}):c==="object"?e[o]=s&&s instanceof Date?{__proxyDate:s.getTime()}:h._customSerializeObject(s,i,r,u,f+1):o!=="__proxyFunctionId"&&(e[o]=s))},r||(r={newObjects:[],originalObjects:[]}),r.originalObjects.push(n),n instanceof Array)for(o=[],r.newObjects.push(o),e=0,c=n.length;e0&&(f=!0);vt=!0;f&&it()}n.themeData&&ct(n.themeData);o||v?lt():b()})},0)}function it(){var n={localStorage:JSON.stringify(u||{})};i.invokeRemoteMethod("updateSandboxedStorage","VSS.HostControl",[n])}function bt(n,t){var i;i=typeof n=="string"?[n]:n;t||(t=function(){});a?rt(i,t):(r?o||(o=!0,h&&(h=!1,lt())):tt({usePlatformScripts:!0}),ut(function(){rt(i,t)}))}function rt(n,i){t.diagnostics.bundlingEnabled?window.require(["VSS/Bundling"],function(t){t.requireModules(n).spread(function(){i.apply(this,arguments)})}):window.require(n,i)}function ut(n){h?window.setTimeout(n,0):(f||(f=[]),f.push(n))}function kt(){i.invokeRemoteMethod("notifyLoadSucceeded","VSS.HostControl")}function ft(n){i.invokeRemoteMethod("notifyLoadFailed","VSS.HostControl",[n])}function et(){return k}function dt(){return d}function ot(){return l}function gt(){return g}function ni(n,t){return st(n).then(function(n){return t||(t={}),t.webContext||(t.webContext=et()),t.extensionContext||(t.extensionContext=ot()),n.getInstance(n.id,t)})}function st(t){var r=XDM.createDeferred();return n.ready(function(){i.invokeRemoteMethod("getServiceContribution","vss.hostManagement",[t]).then(function(n){var t=n;t.getInstance=function(t,i){return ht(n,t,i)};r.resolve(t)},r.reject)}),r.promise}function ti(t){var r=XDM.createDeferred();return n.ready(function(){i.invokeRemoteMethod("getContributionsForTarget","vss.hostManagement",[t]).then(function(n){var t=[];n.forEach(function(n){var i=n;i.getInstance=function(t,i){return ht(n,t,i)};t.push(i)});r.resolve(t)},r.reject)}),r.promise}function ht(t,r,u){var f=XDM.createDeferred();return n.ready(function(){i.invokeRemoteMethod("getBackgroundContributionInstance","vss.hostManagement",[t,r,u]).then(f.resolve,f.reject)}),f.promise}function ii(n,t){i.getObjectRegistry().register(n,t)}function ri(n){i.getObjectRegistry().unregister(n)}function ui(n,t){return i.getObjectRegistry().getInstance(n,t)}function fi(){return i.invokeRemoteMethod("getAccessToken","VSS.HostControl")}function ei(){return i.invokeRemoteMethod("getAppToken","VSS.HostControl")}function oi(n,t){s||(s=document.getElementsByTagName("body").item(0));var r=typeof n=="number"?n:s.scrollWidth,u=typeof t=="number"?t:s.scrollHeight;i.invokeRemoteMethod("resize","VSS.HostControl",[r,u])}function ct(n){var t,i;if(e||(e=document.createElement("style"),e.type="text/css",document.head.appendChild(e)),t=[],n)for(i in n)t.push("--"+i+": "+n[i]);e.innerText=":root { "+t.join("; ")+" } body { color: var(--text-primary-color) }"}function lt(){var i=ci(t.webContext),f,g,n,s,e,h,k,nt,tt,d,u;if(window.__vssPageContext=t,window.__cultureInfo=t.microsoftAjaxConfig.cultureInfo,v!==!1&&t.coreReferences.stylesheets&&t.coreReferences.stylesheets.forEach(function(n){if(n.isCoreStylesheet){var t=document.createElement("link");t.href=c(n.url,i);t.rel="stylesheet";w(t,"head")}}),!o){a=!0;b();return}if(f=[],g=!1,t.coreReferences.scripts&&(t.coreReferences.scripts.forEach(function(n){if(n.isCoreModule){var r=!1,t=window;n.identifier==="JQuery"?r=!!t.jQuery:n.identifier==="JQueryUI"?r=!!(t.jQuery&&t.jQuery.ui&&t.jQuery.ui.version):n.identifier==="AMDLoader"&&(r=typeof t.define=="function"&&!!t.define.amd);r?g=!0:f.push({source:c(n.url,i)})}}),t.coreReferences.coreScriptsBundle&&!g&&(f=[{source:c(t.coreReferences.coreScriptsBundle.url,i)}]),t.coreReferences.extensionCoreReferences&&f.push({source:c(t.coreReferences.extensionCoreReferences.url,i)})),n={baseUrl:l.baseUri,contributionPaths:null,paths:{},shim:{}},r.moduleLoaderConfig&&(r.moduleLoaderConfig.baseUrl&&(n.baseUrl=r.moduleLoaderConfig.baseUrl),hi(r.moduleLoaderConfig,n),at(r.moduleLoaderConfig,n)),t.moduleLoaderConfig&&(at(t.moduleLoaderConfig,n),s=t.moduleLoaderConfig.contributionPaths,s))for(e in s)if(s.hasOwnProperty(e)&&!n.paths[e]&&(h=s[e].value,n.paths[e]=h.match("^https?://")?h:i+h,k=t.moduleLoaderConfig.paths,k)){nt=e+"/";tt=y(i,t.moduleLoaderConfig.baseUrl);for(d in k)si(d,nt)&&(u=k[d],u.match("^https?://")||(u=u[0]==="/"?y(i,u):y(tt,u)),n.paths[d]=u)}window.__vssModuleLoaderConfig=n;f.push({content:"require.config("+JSON.stringify(n)+");"});p(f,0,function(){a=!0;b()})}function si(n,t){return n&&n.length>=t.length?n.substr(0,t.length).localeCompare(t)===0:!1}function y(n,t){var i=n||"";return i[i.length-1]!=="/"&&(i+="/"),t&&(i+=t[0]==="/"?t.substr(1):t),i}function hi(n,t,i){var r,u;if(n.paths){t.paths||(t.paths={});for(r in n.paths)n.paths.hasOwnProperty(r)&&(u=n.paths[r],i&&(u=i(r,n.paths[r])),u&&(t.paths[r]=u))}}function at(n,t){if(n.shim){t.shim||(t.shim={});for(var i in n.shim)n.shim.hasOwnProperty(i)&&(t.shim[i]=n.shim[i])}}function ci(n){var r=n.account||n.host,t=r.uri,i=r.relativeUri;return t&&i&&(t[t.length-1]!=="/"&&(t+="/"),i[i.length-1]!=="/"&&(i+="/"),t=t.substr(0,t.length-i.length)),t}function p(n,t,i){var f=this,r,u;if(t>=n.length){i.call(this);return}r=document.createElement("script");r.type="text/javascript";n[t].source?(u=n[t].source,r.src=u,r.addEventListener("load",function(){p.call(f,n,t+1,i)}),r.addEventListener("error",function(){ft("Failed to load script: "+u)}),w(r,"head")):n[t].content&&(r.textContent=n[t].content,w(r,"head"),p.call(this,n,t+1,i))}function w(n,t){var i=document.getElementsByTagName(t)[0];i||(i=document.createElement(t),document.appendChild(i));i.appendChild(n)}function c(n,t){var i=(n||"").toLowerCase();return i.substr(0,2)!=="//"&&i.substr(0,5)!=="http:"&&i.substr(0,6)!=="https:"&&(n=t+(i[0]==="/"?"":"/")+n),n}function b(){var t=this,n;h=!0;f&&(n=f,f=null,n.forEach(function(n){n.call(t)}))}var wt;n.VssSDKVersion=2;n.VssSDKRestVersion="4.1";var s,e,k,t,l,d,g,r,a=!1,o,v,h=!1,f,i=XDM.XDMChannelManager.get().addChannel(window.parent),u,vt=!1,nt=function(){function n(){t&&t.call(this)}function i(){}var t;return Object.defineProperties(i.prototype,{getItem:{get:function(){return function(n){var t=this[""+n];return typeof t=="undefined"?null:t}}},setItem:{get:function(){return function(t,i){t=""+t;var u=this[t],r=""+i;u!==r&&(this[t]=r,n())}}},removeItem:{get:function(){return function(t){t=""+t;typeof this[t]!="undefined"&&(delete this[t],n())}}},clear:{get:function(){return function(){var r=Object.keys(this),t,i,u;if(r.length>0){for(t=0,i=r;t