@@ -20,6 +20,13 @@ import crypto = require('crypto');
2020export var _knownVariableMap : { [ key : string ] : _KnownVariableInfo ; } = { } ;
2121
2222export var _vault : vm . Vault ;
23+ //-----------------------------------------------------
24+ // Enums
25+ //-----------------------------------------------------
26+ export enum IssueSource {
27+ CustomerScript = 'CustomerScript' ,
28+ TaskInternal = 'TaskInternal'
29+ }
2330
2431//-----------------------------------------------------
2532// Validation Checks
@@ -282,12 +289,12 @@ export function _command(command: string, properties: any, message: string) {
282289 _writeLine ( taskCmd . toString ( ) ) ;
283290}
284291
285- export function _warning ( message : string ) : void {
286- _command ( 'task.issue' , { 'type' : 'warning' } , message ) ;
292+ export function _warning ( message : string , source ?: IssueSource ) : void {
293+ _command ( 'task.issue' , { 'type' : 'warning' , 'source' : source } , message ) ;
287294}
288295
289- export function _error ( message : string ) : void {
290- _command ( 'task.issue' , { 'type' : 'error' } , message ) ;
296+ export function _error ( message : string , source ?: IssueSource ) : void {
297+ _command ( 'task.issue' , { 'type' : 'error' , 'source' : source } , message ) ;
291298}
292299
293300export function _debug ( message : string ) : void {
0 commit comments