@kusto/monaco-kusto 6.2.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -10
- package/globalApi.d.ts +13 -0
- package/package.json +6 -5
- package/release/dev/kustoMode.js +57 -25
- package/release/dev/kustoWorker.js +34 -105
- package/release/dev/{main-81df16b2.js → main-a33ab1e1.js} +2 -2
- package/release/dev/monaco.contribution.js +77 -56
- package/release/dev/schema-0bb01ba6.js +109 -0
- package/release/esm/commandFormatter.d.ts +1 -1
- package/release/esm/commandHighlighter.d.ts +1 -2
- package/release/esm/extendedEditor.d.ts +2 -2
- package/release/esm/kusto.worker.js +11 -69
- package/release/esm/kustoMode.d.ts +10 -6
- package/release/esm/kustoMode.js +16 -9
- package/release/esm/kustoWorker.d.ts +22 -8
- package/release/esm/languageFeatures.d.ts +12 -17
- package/release/esm/languageService/kustoLanguageService.d.ts +2 -8
- package/release/esm/languageService/kustoMonarchLanguageDefinition.d.ts +1 -1
- package/release/esm/languageService/schema.d.ts +7 -2
- package/release/esm/languageService/settings.d.ts +4 -4
- package/release/esm/monaco.contribution.d.ts +13 -8
- package/release/esm/monaco.contribution.js +73 -60
- package/release/esm/schema-cdbe085f.js +85 -0
- package/release/esm/types.d.ts +149 -0
- package/release/esm/workerManager.d.ts +5 -7
- package/release/min/kustoMode.js +2 -2
- package/release/min/kustoWorker.js +4 -4
- package/release/min/{main-bf0e83c5.js → main-8cd8c26d.js} +2 -2
- package/release/min/monaco.contribution.js +2 -2
- package/release/min/schema-d831c44f.js +7 -0
- package/release/monaco.d.ts +1 -312
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version:
|
|
3
|
+
* monaco-kusto version: 7.0.1(d5a041ddb6e4a3a3ebcb2a1aa79da979a62b6da2)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
7
|
-
define("vs/language/kusto/main-bf0e83c5",["exports"],(function(n){"use strict";function t(n){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},t(n)}var e,i,r,o,a,s,c,u,d,f,g,l,h,v,p,m,y,b,E,_,x,w,A,C,k,I;!function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647}(e||(e={})),function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647}(i||(i={})),function(n){n.create=function(n,t){return n===Number.MAX_VALUE&&(n=i.MAX_VALUE),t===Number.MAX_VALUE&&(t=i.MAX_VALUE),{line:n,character:t}},n.is=function(n){var t=n;return on.objectLiteral(t)&&on.uinteger(t.line)&&on.uinteger(t.character)}}(r||(r={})),n.Range=void 0,(o=n.Range||(n.Range={})).create=function(n,t,e,i){if(on.uinteger(n)&&on.uinteger(t)&&on.uinteger(e)&&on.uinteger(i))return{start:r.create(n,t),end:r.create(e,i)};if(r.is(n)&&r.is(t))return{start:n,end:t};throw new Error("Range#create called with invalid arguments["+n+", "+t+", "+e+", "+i+"]")},o.is=function(n){var t=n;return on.objectLiteral(t)&&r.is(t.start)&&r.is(t.end)},n.Location=void 0,(a=n.Location||(n.Location={})).create=function(n,t){return{uri:n,range:t}},a.is=function(t){var e=t;return on.defined(e)&&n.Range.is(e.range)&&(on.string(e.uri)||on.undefined(e.uri))},function(t){t.create=function(n,t,e,i){return{targetUri:n,targetRange:t,targetSelectionRange:e,originSelectionRange:i}},t.is=function(t){var e=t;return on.defined(e)&&n.Range.is(e.targetRange)&&on.string(e.targetUri)&&(n.Range.is(e.targetSelectionRange)||on.undefined(e.targetSelectionRange))&&(n.Range.is(e.originSelectionRange)||on.undefined(e.originSelectionRange))}}(s||(s={})),function(n){n.create=function(n,t,e,i){return{red:n,green:t,blue:e,alpha:i}},n.is=function(n){var t=n;return on.numberRange(t.red,0,1)&&on.numberRange(t.green,0,1)&&on.numberRange(t.blue,0,1)&&on.numberRange(t.alpha,0,1)}}(c||(c={})),function(t){t.create=function(n,t){return{range:n,color:t}},t.is=function(t){var e=t;return n.Range.is(e.range)&&c.is(e.color)}}(u||(u={})),function(t){t.create=function(n,t,e){return{label:n,textEdit:t,additionalTextEdits:e}},t.is=function(t){var e=t;return on.string(e.label)&&(on.undefined(e.textEdit)||n.TextEdit.is(e))&&(on.undefined(e.additionalTextEdits)||on.typedArray(e.additionalTextEdits,n.TextEdit.is))}}(d||(d={})),function(n){n.Comment="comment",n.Imports="imports",n.Region="region"}(f||(f={})),function(n){n.create=function(n,t,e,i,r){var o={startLine:n,endLine:t};return on.defined(e)&&(o.startCharacter=e),on.defined(i)&&(o.endCharacter=i),on.defined(r)&&(o.kind=r),o},n.is=function(n){var t=n;return on.uinteger(t.startLine)&&on.uinteger(t.startLine)&&(on.undefined(t.startCharacter)||on.uinteger(t.startCharacter))&&(on.undefined(t.endCharacter)||on.uinteger(t.endCharacter))&&(on.undefined(t.kind)||on.string(t.kind))}}(g||(g={})),function(t){t.create=function(n,t){return{location:n,message:t}},t.is=function(t){var e=t;return on.defined(e)&&n.Location.is(e.location)&&on.string(e.message)}}(l||(l={})),n.DiagnosticSeverity=void 0,(h=n.DiagnosticSeverity||(n.DiagnosticSeverity={})).Error=1,h.Warning=2,h.Information=3,h.Hint=4,function(n){n.Unnecessary=1,n.Deprecated=2}(v||(v={})),function(n){n.is=function(n){var t=n;return null!=t&&on.string(t.href)}}(p||(p={})),n.Diagnostic=void 0,(m=n.Diagnostic||(n.Diagnostic={})).create=function(n,t,e,i,r,o){var a={range:n,message:t};return on.defined(e)&&(a.severity=e),on.defined(i)&&(a.code=i),on.defined(r)&&(a.source=r),on.defined(o)&&(a.relatedInformation=o),a},m.is=function(t){var e,i=t;return on.defined(i)&&n.Range.is(i.range)&&on.string(i.message)&&(on.number(i.severity)||on.undefined(i.severity))&&(on.integer(i.code)||on.string(i.code)||on.undefined(i.code))&&(on.undefined(i.codeDescription)||on.string(null===(e=i.codeDescription)||void 0===e?void 0:e.href))&&(on.string(i.source)||on.undefined(i.source))&&(on.undefined(i.relatedInformation)||on.typedArray(i.relatedInformation,l.is))},function(n){n.create=function(n,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];var r={title:n,command:t};return on.defined(e)&&e.length>0&&(r.arguments=e),r},n.is=function(n){var t=n;return on.defined(t)&&on.string(t.title)&&on.string(t.command)}}(y||(y={})),n.TextEdit=void 0,(b=n.TextEdit||(n.TextEdit={})).replace=function(n,t){return{range:n,newText:t}},b.insert=function(n,t){return{range:{start:n,end:n},newText:t}},b.del=function(n){return{range:n,newText:""}},b.is=function(t){var e=t;return on.objectLiteral(e)&&on.string(e.newText)&&n.Range.is(e.range)},function(n){n.create=function(n,t,e){var i={label:n};return void 0!==t&&(i.needsConfirmation=t),void 0!==e&&(i.description=e),i},n.is=function(n){var t=n;return void 0!==t&&on.objectLiteral(t)&&on.string(t.label)&&(on.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(on.string(t.description)||void 0===t.description)}}(E||(E={})),function(n){n.is=function(n){return"string"==typeof n}}(_||(_={})),function(t){t.replace=function(n,t,e){return{range:n,newText:t,annotationId:e}},t.insert=function(n,t,e){return{range:{start:n,end:n},newText:t,annotationId:e}},t.del=function(n,t){return{range:n,newText:"",annotationId:t}},t.is=function(t){var e=t;return n.TextEdit.is(e)&&(E.is(e.annotationId)||_.is(e.annotationId))}}(x||(x={})),function(n){n.create=function(n,t){return{textDocument:n,edits:t}},n.is=function(n){var t=n;return on.defined(t)&&L.is(t.textDocument)&&Array.isArray(t.edits)}}(w||(w={})),function(n){n.create=function(n,t,e){var i={kind:"create",uri:n};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==e&&(i.annotationId=e),i},n.is=function(n){var t=n;return t&&"create"===t.kind&&on.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||on.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||on.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||_.is(t.annotationId))}}(A||(A={})),function(n){n.create=function(n,t,e,i){var r={kind:"rename",oldUri:n,newUri:t};return void 0===e||void 0===e.overwrite&&void 0===e.ignoreIfExists||(r.options=e),void 0!==i&&(r.annotationId=i),r},n.is=function(n){var t=n;return t&&"rename"===t.kind&&on.string(t.oldUri)&&on.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||on.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||on.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||_.is(t.annotationId))}}(C||(C={})),function(n){n.create=function(n,t,e){var i={kind:"delete",uri:n};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==e&&(i.annotationId=e),i},n.is=function(n){var t=n;return t&&"delete"===t.kind&&on.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||on.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||on.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||_.is(t.annotationId))}}(k||(k={})),function(n){n.is=function(n){var t=n;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(n){return on.string(n.kind)?A.is(n)||C.is(n)||k.is(n):w.is(n)})))}}(I||(I={}));var R,T,L,S,j,M,D,O,P,F,N,U,K,V,z,W,X,q,B,H,Q,$,G,J,Y,Z,nn,tn,en=function(){function t(n,t){this.edits=n,this.changeAnnotations=t}return t.prototype.insert=function(t,e,i){var r,o;if(void 0===i?r=n.TextEdit.insert(t,e):_.is(i)?(o=i,r=x.insert(t,e,i)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(i),r=x.insert(t,e,o)),this.edits.push(r),void 0!==o)return o},t.prototype.replace=function(t,e,i){var r,o;if(void 0===i?r=n.TextEdit.replace(t,e):_.is(i)?(o=i,r=x.replace(t,e,i)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(i),r=x.replace(t,e,o)),this.edits.push(r),void 0!==o)return o},t.prototype.delete=function(t,e){var i,r;if(void 0===e?i=n.TextEdit.del(t):_.is(e)?(r=e,i=x.del(t,e)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(e),i=x.del(t,r)),this.edits.push(i),void 0!==r)return r},t.prototype.add=function(n){this.edits.push(n)},t.prototype.all=function(){return this.edits},t.prototype.clear=function(){this.edits.splice(0,this.edits.length)},t.prototype.assertChangeAnnotations=function(n){if(void 0===n)throw new Error("Text edit change is not configured to manage change annotations.")},t}(),rn=function(){function n(n){this._annotations=void 0===n?Object.create(null):n,this._counter=0,this._size=0}return n.prototype.all=function(){return this._annotations},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),n.prototype.manage=function(n,t){var e;if(_.is(n)?e=n:(e=this.nextId(),t=n),void 0!==this._annotations[e])throw new Error("Id "+e+" is already in use.");if(void 0===t)throw new Error("No annotation provided for id "+e);return this._annotations[e]=t,this._size++,e},n.prototype.nextId=function(){return this._counter++,this._counter.toString()},n}();!function(){function n(n){var t=this;this._textEditChanges=Object.create(null),void 0!==n?(this._workspaceEdit=n,n.documentChanges?(this._changeAnnotations=new rn(n.changeAnnotations),n.changeAnnotations=this._changeAnnotations.all(),n.documentChanges.forEach((function(n){if(w.is(n)){var e=new en(n.edits,t._changeAnnotations);t._textEditChanges[n.textDocument.uri]=e}}))):n.changes&&Object.keys(n.changes).forEach((function(e){var i=new en(n.changes[e]);t._textEditChanges[e]=i}))):this._workspaceEdit={}}Object.defineProperty(n.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),n.prototype.getTextEditChange=function(n){if(L.is(n)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:n.uri,version:n.version};if(!(i=this._textEditChanges[t.uri])){var e={textDocument:t,edits:r=[]};this._workspaceEdit.documentChanges.push(e),i=new en(r,this._changeAnnotations),this._textEditChanges[t.uri]=i}return i}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var i;if(!(i=this._textEditChanges[n])){var r=[];this._workspaceEdit.changes[n]=r,i=new en(r),this._textEditChanges[n]=i}return i},n.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new rn,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},n.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},n.prototype.createFile=function(n,t,e){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,r,o;if(E.is(t)||_.is(t)?i=t:e=t,void 0===i?r=A.create(n,e):(o=_.is(i)?i:this._changeAnnotations.manage(i),r=A.create(n,e,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o},n.prototype.renameFile=function(n,t,e,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,o,a;if(E.is(e)||_.is(e)?r=e:i=e,void 0===r?o=C.create(n,t,i):(a=_.is(r)?r:this._changeAnnotations.manage(r),o=C.create(n,t,i,a)),this._workspaceEdit.documentChanges.push(o),void 0!==a)return a},n.prototype.deleteFile=function(n,t,e){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,r,o;if(E.is(t)||_.is(t)?i=t:e=t,void 0===i?r=k.create(n,e):(o=_.is(i)?i:this._changeAnnotations.manage(i),r=k.create(n,e,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o}}(),function(n){n.create=function(n){return{uri:n}},n.is=function(n){var t=n;return on.defined(t)&&on.string(t.uri)}}(R||(R={})),function(n){n.create=function(n,t){return{uri:n,version:t}},n.is=function(n){var t=n;return on.defined(t)&&on.string(t.uri)&&on.integer(t.version)}}(T||(T={})),function(n){n.create=function(n,t){return{uri:n,version:t}},n.is=function(n){var t=n;return on.defined(t)&&on.string(t.uri)&&(null===t.version||on.integer(t.version))}}(L||(L={})),function(n){n.create=function(n,t,e,i){return{uri:n,languageId:t,version:e,text:i}},n.is=function(n){var t=n;return on.defined(t)&&on.string(t.uri)&&on.string(t.languageId)&&on.integer(t.version)&&on.string(t.text)}}(S||(S={})),n.MarkupKind=void 0,(j=n.MarkupKind||(n.MarkupKind={})).PlainText="plaintext",j.Markdown="markdown",function(n){n.is=function(t){var e=t;return e===n.PlainText||e===n.Markdown}}(n.MarkupKind||(n.MarkupKind={})),function(t){t.is=function(t){var e=t;return on.objectLiteral(t)&&n.MarkupKind.is(e.kind)&&on.string(e.value)}}(M||(M={})),n.CompletionItemKind=void 0,(D=n.CompletionItemKind||(n.CompletionItemKind={})).Text=1,D.Method=2,D.Function=3,D.Constructor=4,D.Field=5,D.Variable=6,D.Class=7,D.Interface=8,D.Module=9,D.Property=10,D.Unit=11,D.Value=12,D.Enum=13,D.Keyword=14,D.Snippet=15,D.Color=16,D.File=17,D.Reference=18,D.Folder=19,D.EnumMember=20,D.Constant=21,D.Struct=22,D.Event=23,D.Operator=24,D.TypeParameter=25,n.InsertTextFormat=void 0,(O=n.InsertTextFormat||(n.InsertTextFormat={})).PlainText=1,O.Snippet=2,function(n){n.Deprecated=1}(P||(P={})),function(t){t.create=function(n,t,e){return{newText:n,insert:t,replace:e}},t.is=function(t){var e=t;return e&&on.string(e.newText)&&n.Range.is(e.insert)&&n.Range.is(e.replace)}}(F||(F={})),function(n){n.asIs=1,n.adjustIndentation=2}(N||(N={})),n.CompletionItem=void 0,(n.CompletionItem||(n.CompletionItem={})).create=function(n){return{label:n}},n.CompletionList=void 0,(n.CompletionList||(n.CompletionList={})).create=function(n,t){return{items:n||[],isIncomplete:!!t}},function(n){n.fromPlainText=function(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},n.is=function(n){var t=n;return on.string(t)||on.objectLiteral(t)&&on.string(t.language)&&on.string(t.value)}}(U||(U={})),function(t){t.is=function(t){var e=t;return!!e&&on.objectLiteral(e)&&(M.is(e.contents)||U.is(e.contents)||on.typedArray(e.contents,U.is))&&(void 0===t.range||n.Range.is(t.range))}}(K||(K={})),function(n){n.create=function(n,t){return t?{label:n,documentation:t}:{label:n}}}(V||(V={})),function(n){n.create=function(n,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];var r={label:n};return on.defined(t)&&(r.documentation=t),on.defined(e)?r.parameters=e:r.parameters=[],r}}(z||(z={})),function(n){n.Text=1,n.Read=2,n.Write=3}(W||(W={})),function(n){n.create=function(n,t){var e={range:n};return on.number(t)&&(e.kind=t),e}}(X||(X={})),function(n){n.File=1,n.Module=2,n.Namespace=3,n.Package=4,n.Class=5,n.Method=6,n.Property=7,n.Field=8,n.Constructor=9,n.Enum=10,n.Interface=11,n.Function=12,n.Variable=13,n.Constant=14,n.String=15,n.Number=16,n.Boolean=17,n.Array=18,n.Object=19,n.Key=20,n.Null=21,n.EnumMember=22,n.Struct=23,n.Event=24,n.Operator=25,n.TypeParameter=26}(q||(q={})),function(n){n.Deprecated=1}(B||(B={})),function(n){n.create=function(n,t,e,i,r){var o={name:n,kind:t,location:{uri:i,range:e}};return r&&(o.containerName=r),o}}(H||(H={})),function(t){t.create=function(n,t,e,i,r,o){var a={name:n,detail:t,kind:e,range:i,selectionRange:r};return void 0!==o&&(a.children=o),a},t.is=function(t){var e=t;return e&&on.string(e.name)&&on.number(e.kind)&&n.Range.is(e.range)&&n.Range.is(e.selectionRange)&&(void 0===e.detail||on.string(e.detail))&&(void 0===e.deprecated||on.boolean(e.deprecated))&&(void 0===e.children||Array.isArray(e.children))&&(void 0===e.tags||Array.isArray(e.tags))}}(Q||(Q={})),function(n){n.Empty="",n.QuickFix="quickfix",n.Refactor="refactor",n.RefactorExtract="refactor.extract",n.RefactorInline="refactor.inline",n.RefactorRewrite="refactor.rewrite",n.Source="source",n.SourceOrganizeImports="source.organizeImports",n.SourceFixAll="source.fixAll"}($||($={})),function(t){t.create=function(n,t){var e={diagnostics:n};return null!=t&&(e.only=t),e},t.is=function(t){var e=t;return on.defined(e)&&on.typedArray(e.diagnostics,n.Diagnostic.is)&&(void 0===e.only||on.typedArray(e.only,on.string))}}(G||(G={})),function(t){t.create=function(n,t,e){var i={title:n},r=!0;return"string"==typeof t?(r=!1,i.kind=t):y.is(t)?i.command=t:i.edit=t,r&&void 0!==e&&(i.kind=e),i},t.is=function(t){var e=t;return e&&on.string(e.title)&&(void 0===e.diagnostics||on.typedArray(e.diagnostics,n.Diagnostic.is))&&(void 0===e.kind||on.string(e.kind))&&(void 0!==e.edit||void 0!==e.command)&&(void 0===e.command||y.is(e.command))&&(void 0===e.isPreferred||on.boolean(e.isPreferred))&&(void 0===e.edit||I.is(e.edit))}}(J||(J={})),function(t){t.create=function(n,t){var e={range:n};return on.defined(t)&&(e.data=t),e},t.is=function(t){var e=t;return on.defined(e)&&n.Range.is(e.range)&&(on.undefined(e.command)||y.is(e.command))}}(Y||(Y={})),function(n){n.create=function(n,t){return{tabSize:n,insertSpaces:t}},n.is=function(n){var t=n;return on.defined(t)&&on.uinteger(t.tabSize)&&on.boolean(t.insertSpaces)}}(Z||(Z={})),function(t){t.create=function(n,t,e){return{range:n,target:t,data:e}},t.is=function(t){var e=t;return on.defined(e)&&n.Range.is(e.range)&&(on.undefined(e.target)||on.string(e.target))}}(nn||(nn={})),function(t){t.create=function(n,t){return{range:n,parent:t}},t.is=function(e){var i=e;return void 0!==i&&n.Range.is(i.range)&&(void 0===i.parent||t.is(i.parent))}}(tn||(tn={})),n.TextDocument=void 0,function(n){function t(n,e){if(n.length<=1)return n;var i=n.length/2|0,r=n.slice(0,i),o=n.slice(i);t(r,e),t(o,e);for(var a=0,s=0,c=0;a<r.length&&s<o.length;){var u=e(r[a],o[s]);n[c++]=u<=0?r[a++]:o[s++]}for(;a<r.length;)n[c++]=r[a++];for(;s<o.length;)n[c++]=o[s++];return n}n.create=function(n,t,e,i){return new an(n,t,e,i)},n.is=function(n){var t=n;return!!(on.defined(t)&&on.string(t.uri)&&(on.undefined(t.languageId)||on.string(t.languageId))&&on.uinteger(t.lineCount)&&on.func(t.getText)&&on.func(t.positionAt)&&on.func(t.offsetAt))},n.applyEdits=function(n,e){for(var i=n.getText(),r=t(e,(function(n,t){var e=n.range.start.line-t.range.start.line;return 0===e?n.range.start.character-t.range.start.character:e})),o=i.length,a=r.length-1;a>=0;a--){var s=r[a],c=n.offsetAt(s.range.start),u=n.offsetAt(s.range.end);if(!(u<=o))throw new Error("Overlapping edit");i=i.substring(0,c)+s.newText+i.substring(u,i.length),o=c}return i}}(n.TextDocument||(n.TextDocument={}));var on,an=function(){function n(n,t,e,i){this._uri=n,this._languageId=t,this._version=e,this._content=i,this._lineOffsets=void 0}return Object.defineProperty(n.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),n.prototype.getText=function(n){if(n){var t=this.offsetAt(n.start),e=this.offsetAt(n.end);return this._content.substring(t,e)}return this._content},n.prototype.update=function(n,t){this._content=n.text,this._version=t,this._lineOffsets=void 0},n.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var n=[],t=this._content,e=!0,i=0;i<t.length;i++){e&&(n.push(i),e=!1);var r=t.charAt(i);e="\r"===r||"\n"===r,"\r"===r&&i+1<t.length&&"\n"===t.charAt(i+1)&&i++}e&&t.length>0&&n.push(t.length),this._lineOffsets=n}return this._lineOffsets},n.prototype.positionAt=function(n){n=Math.max(Math.min(n,this._content.length),0);var t=this.getLineOffsets(),e=0,i=t.length;if(0===i)return r.create(0,n);for(;e<i;){var o=Math.floor((e+i)/2);t[o]>n?i=o:e=o+1}var a=e-1;return r.create(a,n-t[a])},n.prototype.offsetAt=function(n){var t=this.getLineOffsets();if(n.line>=t.length)return this._content.length;if(n.line<0)return 0;var e=t[n.line],i=n.line+1<t.length?t[n.line+1]:this._content.length;return Math.max(Math.min(e+n.character,i),e)},Object.defineProperty(n.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),n}();!function(n){var e=Object.prototype.toString;n.defined=function(n){return void 0!==n},n.undefined=function(n){return void 0===n},n.boolean=function(n){return!0===n||!1===n},n.string=function(n){return"[object String]"===e.call(n)},n.number=function(n){return"[object Number]"===e.call(n)},n.numberRange=function(n,t,i){return"[object Number]"===e.call(n)&&t<=n&&n<=i},n.integer=function(n){return"[object Number]"===e.call(n)&&-2147483648<=n&&n<=2147483647},n.uinteger=function(n){return"[object Number]"===e.call(n)&&0<=n&&n<=2147483647},n.func=function(n){return"[object Function]"===e.call(n)},n.objectLiteral=function(n){return null!==n&&"object"===t(n)},n.typedArray=function(n,t){return Array.isArray(n)&&n.every(t)}}(on||(on={}))}));
|
|
7
|
+
define("vs/language/kusto/main-8cd8c26d",["exports"],(function(n){"use strict";function t(n){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},t(n)}var e,i,r,o,a,s,c,u,d,f,g,l,h,v,p,m,y,b,E,_,x,w,A,C,k,I;!function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647}(e||(e={})),function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647}(i||(i={})),function(n){n.create=function(n,t){return n===Number.MAX_VALUE&&(n=i.MAX_VALUE),t===Number.MAX_VALUE&&(t=i.MAX_VALUE),{line:n,character:t}},n.is=function(n){var t=n;return on.objectLiteral(t)&&on.uinteger(t.line)&&on.uinteger(t.character)}}(r||(r={})),n.Range=void 0,(o=n.Range||(n.Range={})).create=function(n,t,e,i){if(on.uinteger(n)&&on.uinteger(t)&&on.uinteger(e)&&on.uinteger(i))return{start:r.create(n,t),end:r.create(e,i)};if(r.is(n)&&r.is(t))return{start:n,end:t};throw new Error("Range#create called with invalid arguments["+n+", "+t+", "+e+", "+i+"]")},o.is=function(n){var t=n;return on.objectLiteral(t)&&r.is(t.start)&&r.is(t.end)},n.Location=void 0,(a=n.Location||(n.Location={})).create=function(n,t){return{uri:n,range:t}},a.is=function(t){var e=t;return on.defined(e)&&n.Range.is(e.range)&&(on.string(e.uri)||on.undefined(e.uri))},function(t){t.create=function(n,t,e,i){return{targetUri:n,targetRange:t,targetSelectionRange:e,originSelectionRange:i}},t.is=function(t){var e=t;return on.defined(e)&&n.Range.is(e.targetRange)&&on.string(e.targetUri)&&(n.Range.is(e.targetSelectionRange)||on.undefined(e.targetSelectionRange))&&(n.Range.is(e.originSelectionRange)||on.undefined(e.originSelectionRange))}}(s||(s={})),function(n){n.create=function(n,t,e,i){return{red:n,green:t,blue:e,alpha:i}},n.is=function(n){var t=n;return on.numberRange(t.red,0,1)&&on.numberRange(t.green,0,1)&&on.numberRange(t.blue,0,1)&&on.numberRange(t.alpha,0,1)}}(c||(c={})),function(t){t.create=function(n,t){return{range:n,color:t}},t.is=function(t){var e=t;return n.Range.is(e.range)&&c.is(e.color)}}(u||(u={})),function(t){t.create=function(n,t,e){return{label:n,textEdit:t,additionalTextEdits:e}},t.is=function(t){var e=t;return on.string(e.label)&&(on.undefined(e.textEdit)||n.TextEdit.is(e))&&(on.undefined(e.additionalTextEdits)||on.typedArray(e.additionalTextEdits,n.TextEdit.is))}}(d||(d={})),function(n){n.Comment="comment",n.Imports="imports",n.Region="region"}(f||(f={})),function(n){n.create=function(n,t,e,i,r){var o={startLine:n,endLine:t};return on.defined(e)&&(o.startCharacter=e),on.defined(i)&&(o.endCharacter=i),on.defined(r)&&(o.kind=r),o},n.is=function(n){var t=n;return on.uinteger(t.startLine)&&on.uinteger(t.startLine)&&(on.undefined(t.startCharacter)||on.uinteger(t.startCharacter))&&(on.undefined(t.endCharacter)||on.uinteger(t.endCharacter))&&(on.undefined(t.kind)||on.string(t.kind))}}(g||(g={})),function(t){t.create=function(n,t){return{location:n,message:t}},t.is=function(t){var e=t;return on.defined(e)&&n.Location.is(e.location)&&on.string(e.message)}}(l||(l={})),n.DiagnosticSeverity=void 0,(h=n.DiagnosticSeverity||(n.DiagnosticSeverity={})).Error=1,h.Warning=2,h.Information=3,h.Hint=4,function(n){n.Unnecessary=1,n.Deprecated=2}(v||(v={})),function(n){n.is=function(n){var t=n;return null!=t&&on.string(t.href)}}(p||(p={})),n.Diagnostic=void 0,(m=n.Diagnostic||(n.Diagnostic={})).create=function(n,t,e,i,r,o){var a={range:n,message:t};return on.defined(e)&&(a.severity=e),on.defined(i)&&(a.code=i),on.defined(r)&&(a.source=r),on.defined(o)&&(a.relatedInformation=o),a},m.is=function(t){var e,i=t;return on.defined(i)&&n.Range.is(i.range)&&on.string(i.message)&&(on.number(i.severity)||on.undefined(i.severity))&&(on.integer(i.code)||on.string(i.code)||on.undefined(i.code))&&(on.undefined(i.codeDescription)||on.string(null===(e=i.codeDescription)||void 0===e?void 0:e.href))&&(on.string(i.source)||on.undefined(i.source))&&(on.undefined(i.relatedInformation)||on.typedArray(i.relatedInformation,l.is))},function(n){n.create=function(n,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];var r={title:n,command:t};return on.defined(e)&&e.length>0&&(r.arguments=e),r},n.is=function(n){var t=n;return on.defined(t)&&on.string(t.title)&&on.string(t.command)}}(y||(y={})),n.TextEdit=void 0,(b=n.TextEdit||(n.TextEdit={})).replace=function(n,t){return{range:n,newText:t}},b.insert=function(n,t){return{range:{start:n,end:n},newText:t}},b.del=function(n){return{range:n,newText:""}},b.is=function(t){var e=t;return on.objectLiteral(e)&&on.string(e.newText)&&n.Range.is(e.range)},function(n){n.create=function(n,t,e){var i={label:n};return void 0!==t&&(i.needsConfirmation=t),void 0!==e&&(i.description=e),i},n.is=function(n){var t=n;return void 0!==t&&on.objectLiteral(t)&&on.string(t.label)&&(on.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(on.string(t.description)||void 0===t.description)}}(E||(E={})),function(n){n.is=function(n){return"string"==typeof n}}(_||(_={})),function(t){t.replace=function(n,t,e){return{range:n,newText:t,annotationId:e}},t.insert=function(n,t,e){return{range:{start:n,end:n},newText:t,annotationId:e}},t.del=function(n,t){return{range:n,newText:"",annotationId:t}},t.is=function(t){var e=t;return n.TextEdit.is(e)&&(E.is(e.annotationId)||_.is(e.annotationId))}}(x||(x={})),function(n){n.create=function(n,t){return{textDocument:n,edits:t}},n.is=function(n){var t=n;return on.defined(t)&&L.is(t.textDocument)&&Array.isArray(t.edits)}}(w||(w={})),function(n){n.create=function(n,t,e){var i={kind:"create",uri:n};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==e&&(i.annotationId=e),i},n.is=function(n){var t=n;return t&&"create"===t.kind&&on.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||on.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||on.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||_.is(t.annotationId))}}(A||(A={})),function(n){n.create=function(n,t,e,i){var r={kind:"rename",oldUri:n,newUri:t};return void 0===e||void 0===e.overwrite&&void 0===e.ignoreIfExists||(r.options=e),void 0!==i&&(r.annotationId=i),r},n.is=function(n){var t=n;return t&&"rename"===t.kind&&on.string(t.oldUri)&&on.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||on.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||on.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||_.is(t.annotationId))}}(C||(C={})),function(n){n.create=function(n,t,e){var i={kind:"delete",uri:n};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==e&&(i.annotationId=e),i},n.is=function(n){var t=n;return t&&"delete"===t.kind&&on.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||on.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||on.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||_.is(t.annotationId))}}(k||(k={})),function(n){n.is=function(n){var t=n;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(n){return on.string(n.kind)?A.is(n)||C.is(n)||k.is(n):w.is(n)})))}}(I||(I={}));var R,T,L,S,j,M,D,O,P,F,N,U,K,V,z,W,X,q,B,H,Q,$,G,J,Y,Z,nn,tn,en=function(){function t(n,t){this.edits=n,this.changeAnnotations=t}return t.prototype.insert=function(t,e,i){var r,o;if(void 0===i?r=n.TextEdit.insert(t,e):_.is(i)?(o=i,r=x.insert(t,e,i)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(i),r=x.insert(t,e,o)),this.edits.push(r),void 0!==o)return o},t.prototype.replace=function(t,e,i){var r,o;if(void 0===i?r=n.TextEdit.replace(t,e):_.is(i)?(o=i,r=x.replace(t,e,i)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(i),r=x.replace(t,e,o)),this.edits.push(r),void 0!==o)return o},t.prototype.delete=function(t,e){var i,r;if(void 0===e?i=n.TextEdit.del(t):_.is(e)?(r=e,i=x.del(t,e)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(e),i=x.del(t,r)),this.edits.push(i),void 0!==r)return r},t.prototype.add=function(n){this.edits.push(n)},t.prototype.all=function(){return this.edits},t.prototype.clear=function(){this.edits.splice(0,this.edits.length)},t.prototype.assertChangeAnnotations=function(n){if(void 0===n)throw new Error("Text edit change is not configured to manage change annotations.")},t}(),rn=function(){function n(n){this._annotations=void 0===n?Object.create(null):n,this._counter=0,this._size=0}return n.prototype.all=function(){return this._annotations},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),n.prototype.manage=function(n,t){var e;if(_.is(n)?e=n:(e=this.nextId(),t=n),void 0!==this._annotations[e])throw new Error("Id "+e+" is already in use.");if(void 0===t)throw new Error("No annotation provided for id "+e);return this._annotations[e]=t,this._size++,e},n.prototype.nextId=function(){return this._counter++,this._counter.toString()},n}();!function(){function n(n){var t=this;this._textEditChanges=Object.create(null),void 0!==n?(this._workspaceEdit=n,n.documentChanges?(this._changeAnnotations=new rn(n.changeAnnotations),n.changeAnnotations=this._changeAnnotations.all(),n.documentChanges.forEach((function(n){if(w.is(n)){var e=new en(n.edits,t._changeAnnotations);t._textEditChanges[n.textDocument.uri]=e}}))):n.changes&&Object.keys(n.changes).forEach((function(e){var i=new en(n.changes[e]);t._textEditChanges[e]=i}))):this._workspaceEdit={}}Object.defineProperty(n.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),n.prototype.getTextEditChange=function(n){if(L.is(n)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:n.uri,version:n.version};if(!(i=this._textEditChanges[t.uri])){var e={textDocument:t,edits:r=[]};this._workspaceEdit.documentChanges.push(e),i=new en(r,this._changeAnnotations),this._textEditChanges[t.uri]=i}return i}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var i;if(!(i=this._textEditChanges[n])){var r=[];this._workspaceEdit.changes[n]=r,i=new en(r),this._textEditChanges[n]=i}return i},n.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new rn,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},n.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},n.prototype.createFile=function(n,t,e){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,r,o;if(E.is(t)||_.is(t)?i=t:e=t,void 0===i?r=A.create(n,e):(o=_.is(i)?i:this._changeAnnotations.manage(i),r=A.create(n,e,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o},n.prototype.renameFile=function(n,t,e,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,o,a;if(E.is(e)||_.is(e)?r=e:i=e,void 0===r?o=C.create(n,t,i):(a=_.is(r)?r:this._changeAnnotations.manage(r),o=C.create(n,t,i,a)),this._workspaceEdit.documentChanges.push(o),void 0!==a)return a},n.prototype.deleteFile=function(n,t,e){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,r,o;if(E.is(t)||_.is(t)?i=t:e=t,void 0===i?r=k.create(n,e):(o=_.is(i)?i:this._changeAnnotations.manage(i),r=k.create(n,e,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o}}(),function(n){n.create=function(n){return{uri:n}},n.is=function(n){var t=n;return on.defined(t)&&on.string(t.uri)}}(R||(R={})),function(n){n.create=function(n,t){return{uri:n,version:t}},n.is=function(n){var t=n;return on.defined(t)&&on.string(t.uri)&&on.integer(t.version)}}(T||(T={})),function(n){n.create=function(n,t){return{uri:n,version:t}},n.is=function(n){var t=n;return on.defined(t)&&on.string(t.uri)&&(null===t.version||on.integer(t.version))}}(L||(L={})),function(n){n.create=function(n,t,e,i){return{uri:n,languageId:t,version:e,text:i}},n.is=function(n){var t=n;return on.defined(t)&&on.string(t.uri)&&on.string(t.languageId)&&on.integer(t.version)&&on.string(t.text)}}(S||(S={})),n.MarkupKind=void 0,(j=n.MarkupKind||(n.MarkupKind={})).PlainText="plaintext",j.Markdown="markdown",function(n){n.is=function(t){var e=t;return e===n.PlainText||e===n.Markdown}}(n.MarkupKind||(n.MarkupKind={})),function(t){t.is=function(t){var e=t;return on.objectLiteral(t)&&n.MarkupKind.is(e.kind)&&on.string(e.value)}}(M||(M={})),n.CompletionItemKind=void 0,(D=n.CompletionItemKind||(n.CompletionItemKind={})).Text=1,D.Method=2,D.Function=3,D.Constructor=4,D.Field=5,D.Variable=6,D.Class=7,D.Interface=8,D.Module=9,D.Property=10,D.Unit=11,D.Value=12,D.Enum=13,D.Keyword=14,D.Snippet=15,D.Color=16,D.File=17,D.Reference=18,D.Folder=19,D.EnumMember=20,D.Constant=21,D.Struct=22,D.Event=23,D.Operator=24,D.TypeParameter=25,n.InsertTextFormat=void 0,(O=n.InsertTextFormat||(n.InsertTextFormat={})).PlainText=1,O.Snippet=2,function(n){n.Deprecated=1}(P||(P={})),function(t){t.create=function(n,t,e){return{newText:n,insert:t,replace:e}},t.is=function(t){var e=t;return e&&on.string(e.newText)&&n.Range.is(e.insert)&&n.Range.is(e.replace)}}(F||(F={})),function(n){n.asIs=1,n.adjustIndentation=2}(N||(N={})),n.CompletionItem=void 0,(n.CompletionItem||(n.CompletionItem={})).create=function(n){return{label:n}},n.CompletionList=void 0,(n.CompletionList||(n.CompletionList={})).create=function(n,t){return{items:n||[],isIncomplete:!!t}},function(n){n.fromPlainText=function(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},n.is=function(n){var t=n;return on.string(t)||on.objectLiteral(t)&&on.string(t.language)&&on.string(t.value)}}(U||(U={})),function(t){t.is=function(t){var e=t;return!!e&&on.objectLiteral(e)&&(M.is(e.contents)||U.is(e.contents)||on.typedArray(e.contents,U.is))&&(void 0===t.range||n.Range.is(t.range))}}(K||(K={})),function(n){n.create=function(n,t){return t?{label:n,documentation:t}:{label:n}}}(V||(V={})),function(n){n.create=function(n,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];var r={label:n};return on.defined(t)&&(r.documentation=t),on.defined(e)?r.parameters=e:r.parameters=[],r}}(z||(z={})),function(n){n.Text=1,n.Read=2,n.Write=3}(W||(W={})),function(n){n.create=function(n,t){var e={range:n};return on.number(t)&&(e.kind=t),e}}(X||(X={})),function(n){n.File=1,n.Module=2,n.Namespace=3,n.Package=4,n.Class=5,n.Method=6,n.Property=7,n.Field=8,n.Constructor=9,n.Enum=10,n.Interface=11,n.Function=12,n.Variable=13,n.Constant=14,n.String=15,n.Number=16,n.Boolean=17,n.Array=18,n.Object=19,n.Key=20,n.Null=21,n.EnumMember=22,n.Struct=23,n.Event=24,n.Operator=25,n.TypeParameter=26}(q||(q={})),function(n){n.Deprecated=1}(B||(B={})),function(n){n.create=function(n,t,e,i,r){var o={name:n,kind:t,location:{uri:i,range:e}};return r&&(o.containerName=r),o}}(H||(H={})),function(t){t.create=function(n,t,e,i,r,o){var a={name:n,detail:t,kind:e,range:i,selectionRange:r};return void 0!==o&&(a.children=o),a},t.is=function(t){var e=t;return e&&on.string(e.name)&&on.number(e.kind)&&n.Range.is(e.range)&&n.Range.is(e.selectionRange)&&(void 0===e.detail||on.string(e.detail))&&(void 0===e.deprecated||on.boolean(e.deprecated))&&(void 0===e.children||Array.isArray(e.children))&&(void 0===e.tags||Array.isArray(e.tags))}}(Q||(Q={})),function(n){n.Empty="",n.QuickFix="quickfix",n.Refactor="refactor",n.RefactorExtract="refactor.extract",n.RefactorInline="refactor.inline",n.RefactorRewrite="refactor.rewrite",n.Source="source",n.SourceOrganizeImports="source.organizeImports",n.SourceFixAll="source.fixAll"}($||($={})),function(t){t.create=function(n,t){var e={diagnostics:n};return null!=t&&(e.only=t),e},t.is=function(t){var e=t;return on.defined(e)&&on.typedArray(e.diagnostics,n.Diagnostic.is)&&(void 0===e.only||on.typedArray(e.only,on.string))}}(G||(G={})),function(t){t.create=function(n,t,e){var i={title:n},r=!0;return"string"==typeof t?(r=!1,i.kind=t):y.is(t)?i.command=t:i.edit=t,r&&void 0!==e&&(i.kind=e),i},t.is=function(t){var e=t;return e&&on.string(e.title)&&(void 0===e.diagnostics||on.typedArray(e.diagnostics,n.Diagnostic.is))&&(void 0===e.kind||on.string(e.kind))&&(void 0!==e.edit||void 0!==e.command)&&(void 0===e.command||y.is(e.command))&&(void 0===e.isPreferred||on.boolean(e.isPreferred))&&(void 0===e.edit||I.is(e.edit))}}(J||(J={})),function(t){t.create=function(n,t){var e={range:n};return on.defined(t)&&(e.data=t),e},t.is=function(t){var e=t;return on.defined(e)&&n.Range.is(e.range)&&(on.undefined(e.command)||y.is(e.command))}}(Y||(Y={})),function(n){n.create=function(n,t){return{tabSize:n,insertSpaces:t}},n.is=function(n){var t=n;return on.defined(t)&&on.uinteger(t.tabSize)&&on.boolean(t.insertSpaces)}}(Z||(Z={})),function(t){t.create=function(n,t,e){return{range:n,target:t,data:e}},t.is=function(t){var e=t;return on.defined(e)&&n.Range.is(e.range)&&(on.undefined(e.target)||on.string(e.target))}}(nn||(nn={})),function(t){t.create=function(n,t){return{range:n,parent:t}},t.is=function(e){var i=e;return void 0!==i&&n.Range.is(i.range)&&(void 0===i.parent||t.is(i.parent))}}(tn||(tn={})),n.TextDocument=void 0,function(n){function t(n,e){if(n.length<=1)return n;var i=n.length/2|0,r=n.slice(0,i),o=n.slice(i);t(r,e),t(o,e);for(var a=0,s=0,c=0;a<r.length&&s<o.length;){var u=e(r[a],o[s]);n[c++]=u<=0?r[a++]:o[s++]}for(;a<r.length;)n[c++]=r[a++];for(;s<o.length;)n[c++]=o[s++];return n}n.create=function(n,t,e,i){return new an(n,t,e,i)},n.is=function(n){var t=n;return!!(on.defined(t)&&on.string(t.uri)&&(on.undefined(t.languageId)||on.string(t.languageId))&&on.uinteger(t.lineCount)&&on.func(t.getText)&&on.func(t.positionAt)&&on.func(t.offsetAt))},n.applyEdits=function(n,e){for(var i=n.getText(),r=t(e,(function(n,t){var e=n.range.start.line-t.range.start.line;return 0===e?n.range.start.character-t.range.start.character:e})),o=i.length,a=r.length-1;a>=0;a--){var s=r[a],c=n.offsetAt(s.range.start),u=n.offsetAt(s.range.end);if(!(u<=o))throw new Error("Overlapping edit");i=i.substring(0,c)+s.newText+i.substring(u,i.length),o=c}return i}}(n.TextDocument||(n.TextDocument={}));var on,an=function(){function n(n,t,e,i){this._uri=n,this._languageId=t,this._version=e,this._content=i,this._lineOffsets=void 0}return Object.defineProperty(n.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),n.prototype.getText=function(n){if(n){var t=this.offsetAt(n.start),e=this.offsetAt(n.end);return this._content.substring(t,e)}return this._content},n.prototype.update=function(n,t){this._content=n.text,this._version=t,this._lineOffsets=void 0},n.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var n=[],t=this._content,e=!0,i=0;i<t.length;i++){e&&(n.push(i),e=!1);var r=t.charAt(i);e="\r"===r||"\n"===r,"\r"===r&&i+1<t.length&&"\n"===t.charAt(i+1)&&i++}e&&t.length>0&&n.push(t.length),this._lineOffsets=n}return this._lineOffsets},n.prototype.positionAt=function(n){n=Math.max(Math.min(n,this._content.length),0);var t=this.getLineOffsets(),e=0,i=t.length;if(0===i)return r.create(0,n);for(;e<i;){var o=Math.floor((e+i)/2);t[o]>n?i=o:e=o+1}var a=e-1;return r.create(a,n-t[a])},n.prototype.offsetAt=function(n){var t=this.getLineOffsets();if(n.line>=t.length)return this._content.length;if(n.line<0)return 0;var e=t[n.line],i=n.line+1<t.length?t[n.line+1]:this._content.length;return Math.max(Math.min(e+n.character,i),e)},Object.defineProperty(n.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),n}();!function(n){var e=Object.prototype.toString;n.defined=function(n){return void 0!==n},n.undefined=function(n){return void 0===n},n.boolean=function(n){return!0===n||!1===n},n.string=function(n){return"[object String]"===e.call(n)},n.number=function(n){return"[object Number]"===e.call(n)},n.numberRange=function(n,t,i){return"[object Number]"===e.call(n)&&t<=n&&n<=i},n.integer=function(n){return"[object Number]"===e.call(n)&&-2147483648<=n&&n<=2147483647},n.uinteger=function(n){return"[object Number]"===e.call(n)&&0<=n&&n<=2147483647},n.func=function(n){return"[object Function]"===e.call(n)},n.objectLiteral=function(n){return null!==n&&"object"===t(n)},n.typedArray=function(n,t){return Array.isArray(n)&&n.every(t)}}(on||(on={}))}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version:
|
|
3
|
+
* monaco-kusto version: 7.0.1(d5a041ddb6e4a3a3ebcb2a1aa79da979a62b6da2)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
7
|
-
define("vs/language/kusto/monaco.contribution",["require","exports","vs/editor/editor.main"],(function(e,t,n){"use strict";function
|
|
7
|
+
define("vs/language/kusto/monaco.contribution",["require","exports","vs/editor/editor.main","./schema-d831c44f"],(function(e,t,n,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var i=r(n);function a(e,t){for(var n=t.lineNumber-1,o=e.getModel().getLinesContent(),r=0,a=[],u=0;u<o.length;u++){if(""===o[u].trim()?a.push({commandOrdinal:r++,lineNumber:u}):a.push({commandOrdinal:r,lineNumber:u}),u>n&&r>a[n].commandOrdinal)break}var s=a[n].commandOrdinal,l=a.filter((function(e){return e.commandOrdinal===s})),c=l[0].lineNumber+1,d=l[l.length-1].lineNumber+1,g=o[d-1].length+1;return new i.Range(c,1,d,g)}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,c(o.key),o)}}function l(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){var t=function(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==u(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===u(t)?t:String(t)}var d=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"disposables",[]),l(this,"decorations",[]),this.editor=t,this.editor.onDidChangeCursorSelection((function(e){"kusto"===n.editor.getModel().getLanguageId()&&n.highlightCommandUnderCursor(e)}))}var t,n,o;return t=e,(n=[{key:"getId",value:function(){return e.ID}},{key:"dispose",value:function(){this.disposables.forEach((function(e){return e.dispose()}))}},{key:"highlightCommandUnderCursor",value:function(t){if(t.selection.isEmpty()){var n=[{range:a(this.editor,t.selection.getStartPosition()),options:e.CURRENT_COMMAND_HIGHLIGHT}];this.decorations=this.editor.deltaDecorations(this.decorations,n)}else this.decorations=this.editor.deltaDecorations(this.decorations,[])}}])&&s(t.prototype,n),o&&s(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,y(o.key),o)}}function m(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){var t=function(e,t){if("object"!==g(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==g(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===g(t)?t:String(t)}l(d,"ID","editor.contrib.kustoCommandHighlighter"),l(d,"CURRENT_COMMAND_HIGHLIGHT",{className:"selectionHighlight"});var b=m((function e(t){var n,o,r,a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,r=!1,(o=y(o="actionAdded"))in n?Object.defineProperty(n,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[o]=r,this.editor=t,t.onDidChangeCursorSelection((function(e){"kusto"===a.editor.getModel().getLanguageId()&&(a.actionAdded||(t.addAction({id:"editor.action.kusto.formatCurrentCommand",label:"Format Command Under Cursor",keybindings:[i.KeyMod.chord(i.KeyMod.CtrlCmd|i.KeyCode.KeyK,i.KeyMod.CtrlCmd|i.KeyCode.KeyF)],run:function(e){t.trigger("KustoCommandFormatter","editor.action.formatSelection",null)},contextMenuGroupId:"1_modification"}),a.actionAdded=!0))}))}));function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function k(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,h(o.key),o)}}function h(e){var t=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==p(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===p(t)?t:String(t)}function C(){return new Promise((function(e,t){v((function(n){n.getKustoWorker().then(e,t)}))}))}function v(t){new Promise((function(t,n){e(["./kustoMode"],t,n)})).then(t)}var S=new(function(){function e(t){var n,o,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,o="_onDidChange",r=new i.Emitter,(o=h(o))in n?Object.defineProperty(n,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[o]=r,this.setLanguageSettings(t),this._workerMaxIdleTime=0}var t,n,o;return t=e,(n=[{key:"onDidChange",get:function(){return this._onDidChange.event}},{key:"languageSettings",get:function(){return this._languageSettings}},{key:"setLanguageSettings",value:function(e){this._languageSettings=e||Object.create(null),this._onDidChange.fire(this)}},{key:"setMaximumWorkerIdleTime",value:function(e){this._workerMaxIdleTime=e}},{key:"getWorkerMaxIdleTime",value:function(){return this._workerMaxIdleTime}}])&&k(t.prototype,n),o&&k(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}())({includeControlCommands:!0,newlineAfterPipe:!0,openSuggestionDialogAfterPreviousSuggestionAccepted:!0,useIntellisenseV2:!0,useSemanticColorization:!0,useTokenColorization:!1,enableHover:!0,formatter:{indentationSize:4,pipeOperatorStyle:"Smart"},syntaxErrorAsMarkDown:{enableSyntaxErrorAsMarkDown:!1},enableQueryWarnings:!1,enableQuerySuggestions:!1,disabledDiagnosticCodes:[],quickFixCodeActions:["Change to","FixAll"],enableQuickFixes:!1});i.languages.onLanguage("kusto",(function(){v((function(e){return e.setupMode(S,i)}))})),i.languages.register({id:"kusto",extensions:[".csl",".kql"]}),i.editor.defineTheme("kusto-light",{base:"vs",inherit:!0,rules:[{token:"comment",foreground:"008000"},{token:"variable.predefined",foreground:"800080"},{token:"function",foreground:"0000FF"},{token:"operator.sql",foreground:"CC3700"},{token:"string",foreground:"B22222"},{token:"operator.scss",foreground:"0000FF"},{token:"variable",foreground:"C71585"},{token:"variable.parameter",foreground:"9932CC"},{token:"",foreground:"000000"},{token:"type",foreground:"0000FF"},{token:"tag",foreground:"0000FF"},{token:"annotation",foreground:"2B91AF"},{token:"keyword",foreground:"0000FF"},{token:"number",foreground:"191970"},{token:"annotation",foreground:"9400D3"},{token:"invalid",background:"cd3131"}],colors:{}}),i.editor.defineTheme("kusto-dark",{base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:"608B4E"},{token:"variable.predefined",foreground:"4ec9b0"},{token:"function",foreground:"dcdcaa"},{token:"operator.sql",foreground:"9cdcfe"},{token:"string",foreground:"ce9178"},{token:"operator.scss",foreground:"569cd6"},{token:"variable",foreground:"4ec9b0"},{token:"variable.parameter",foreground:"c586c0"},{token:"",foreground:"d4d4d4"},{token:"type",foreground:"569cd6"},{token:"tag",foreground:"569cd6"},{token:"annotation",foreground:"9cdcfe"},{token:"keyword",foreground:"569cd6"},{token:"number",foreground:"d7ba7d"},{token:"annotation",foreground:"b5cea8"},{token:"invalid",background:"cd3131"}],colors:{}}),i.editor.defineTheme("kusto-dark2",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#1B1A19","editorSuggestWidget.selectedBackground":"#004E8C"}}),i.editor.onDidCreateEditor((function(e){!function(e){Object.getPrototypeOf(e).getCurrentCommandRange=function(e){a(this,e)}}(e),new d(e),function(e){return void 0!==e.addAction}(e)&&new b(e),function(e){e.onDidChangeCursorSelection((function(t){if(S&&S.languageSettings&&S.languageSettings.openSuggestionDialogAfterPreviousSuggestionAccepted){if(!("snippet"===t.source&&t.reason===i.editor.CursorChangeReason.NotSet)||null!==e.getModel().getWordAtPosition(t.selection.getPosition()))return;t.selection,setTimeout((function(){return e.trigger("monaco-kusto","editor.action.triggerSuggest",{})}),10)}}))}(e)}));var w={getCslTypeNameFromClrType:o.getCslTypeNameFromClrType,getCallName:o.getCallName,getExpression:o.getExpression,getInputParametersAsCslString:o.getInputParametersAsCslString,getEntityDataTypeFromCslType:o.getEntityDataTypeFromCslType,kustoDefaults:S,getKustoWorker:C,getCurrentCommandRange:a};i.languages.kusto=w,t.getCallName=o.getCallName,t.getCslTypeNameFromClrType=o.getCslTypeNameFromClrType,t.getEntityDataTypeFromCslType=o.getEntityDataTypeFromCslType,t.getExpression=o.getExpression,t.getInputParametersAsCslString=o.getInputParametersAsCslString,Object.defineProperty(t,"showSchema",{enumerable:!0,get:function(){return o.showSchema}}),t.getCurrentCommandRange=a,t.getKustoWorker=C,t.kustoDefaults=S}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*!-----------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* monaco-kusto version: 7.0.1(d5a041ddb6e4a3a3ebcb2a1aa79da979a62b6da2)
|
|
4
|
+
* Released under the MIT license
|
|
5
|
+
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
|
+
*-----------------------------------------------------------------------------*/
|
|
7
|
+
define("vs/language/kusto/schema-d831c44f",["exports"],(function(t){"use strict";var n={"System.SByte":"bool","System.Byte":"uint8","System.Int16":"int16","System.UInt16":"uint16","System.Int32":"int","System.UInt32":"uint","System.Int64":"long","System.UInt64":"ulong","System.String":"string","System.Single":"float","System.Double":"real","System.DateTime":"datetime","System.TimeSpan":"timespan","System.Guid":"guid","System.Boolean":"bool","Newtonsoft.Json.Linq.JArray":"dynamic","Newtonsoft.Json.Linq.JObject":"dynamic","Newtonsoft.Json.Linq.JToken":"dynamic","System.Object":"dynamic","System.Data.SqlTypes.SqlDecimal":"decimal"},e=function(t){return n[t]||t},a={object:"Object",bool:"Boolean",uint8:"Byte",int16:"Int16",uint16:"UInt16",int:"Int32",uint:"UInt32",long:"Int64",ulong:"UInt64",float:"Single",real:"Double",decimal:"Decimal",datetime:"DateTime",string:"String",dynamic:"Dynamic",timespan:"TimeSpan"},o=function(t){return"(".concat(t.map((function(t){return i(t)})).join(","),")")},i=function(t){if(t.columns&&t.columns.length>0){var n=t.columns.map((function(t){return"".concat(t.name,":").concat(t.cslType||e(t.type))})).join(",");return"".concat(t.name,":").concat(""===n?"*":n)}return"".concat(t.name,":").concat(t.cslType||e(t.type))};t.showSchema=void 0,t.showSchema||(t.showSchema={}),t.getCallName=function(t){return"".concat(t.name,"(").concat(t.inputParameters.map((function(t){return"{".concat(t.name,"}")})).join(","),")")},t.getCslTypeNameFromClrType=e,t.getEntityDataTypeFromCslType=function(t){return a[t]||t},t.getExpression=function(t){return"let ".concat(t.name," = ").concat(o(t.inputParameters)," ").concat(t.body)},t.getInputParametersAsCslString=o}));
|
package/release/monaco.d.ts
CHANGED
|
@@ -1,312 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// Everything that needs to be exposed to consumers should be typed here.
|
|
3
|
-
// This means that all declarations here are duplicated from the actual definitions around the code.
|
|
4
|
-
// TODO: think about turning this around - have all other code dependent on this file thus not needing the duplication.
|
|
5
|
-
// this was done like this because that's the standard way all other monaco extensions work for some reason.
|
|
6
|
-
|
|
7
|
-
declare module monaco.editor {
|
|
8
|
-
export interface ICodeEditor {
|
|
9
|
-
getCurrentCommandRange(cursorPosition: monaco.Position): monaco.Range;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
declare module monaco.languages.kusto {
|
|
14
|
-
export interface LanguageSettings {
|
|
15
|
-
includeControlCommands?: boolean;
|
|
16
|
-
newlineAfterPipe?: boolean;
|
|
17
|
-
syntaxErrorAsMarkDown?: SyntaxErrorAsMarkDownOptions;
|
|
18
|
-
openSuggestionDialogAfterPreviousSuggestionAccepted?: boolean;
|
|
19
|
-
useIntellisenseV2?: boolean;
|
|
20
|
-
useSemanticColorization?: boolean;
|
|
21
|
-
useTokenColorization?: boolean;
|
|
22
|
-
disabledCompletionItems?: string[];
|
|
23
|
-
onDidProvideCompletionItems?: monaco.languages.kusto.OnDidProvideCompletionItems;
|
|
24
|
-
enableHover?: boolean;
|
|
25
|
-
formatter?: FormatterOptions;
|
|
26
|
-
enableQueryWarnings?: boolean;
|
|
27
|
-
enableQuerySuggestions?: boolean;
|
|
28
|
-
disabledDiagnosticCodes?: string[];
|
|
29
|
-
quickFixCodeActions?: QuickFixCodeActionOptions[];
|
|
30
|
-
enableQuickFixes?: boolean;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface SyntaxErrorAsMarkDownOptions {
|
|
34
|
-
header?: string;
|
|
35
|
-
icon?: string;
|
|
36
|
-
enableSyntaxErrorAsMarkDown?: boolean;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export type QuickFixCodeActionOptions = 'Extract Expression' | 'Extract Function' | 'Change to' | 'FixAll';
|
|
40
|
-
|
|
41
|
-
export interface FormatterOptions {
|
|
42
|
-
indentationSize?: number;
|
|
43
|
-
pipeOperatorStyle?: FormatterPlacementStyle;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export type FormatterPlacementStyle = 'None' | 'NewLine' | 'Smart';
|
|
47
|
-
|
|
48
|
-
export interface LanguageServiceDefaults {
|
|
49
|
-
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
|
50
|
-
readonly languageSettings: LanguageSettings;
|
|
51
|
-
/**
|
|
52
|
-
* Configure language service settings.
|
|
53
|
-
*/
|
|
54
|
-
setLanguageSettings(options: LanguageSettings): void;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Configure when the worker shuts down. By default that is 2mins.
|
|
58
|
-
*
|
|
59
|
-
* @param value The maximum idle time in milliseconds. Values less than one
|
|
60
|
-
* mean never shut down.
|
|
61
|
-
*/
|
|
62
|
-
setMaximumWorkerIdleTime(value: number): void;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export var kustoDefaults: LanguageServiceDefaults;
|
|
66
|
-
|
|
67
|
-
export interface KustoWorker {
|
|
68
|
-
setSchema(schema: Schema): Promise<void>;
|
|
69
|
-
setSchemaFromShowSchema(
|
|
70
|
-
schema: any,
|
|
71
|
-
clusterConnectionString: string,
|
|
72
|
-
databaseInContextName: string,
|
|
73
|
-
globalScalarParameters: ScalarParameter[],
|
|
74
|
-
globalTabularParameters: TabularParameter[]
|
|
75
|
-
): Promise<void>;
|
|
76
|
-
normalizeSchema(
|
|
77
|
-
schema: any,
|
|
78
|
-
clusterConnectionString: string,
|
|
79
|
-
databaseInContextName: string
|
|
80
|
-
): Promise<EngineSchema>;
|
|
81
|
-
getCommandInContext(uri: string, cursorOffset: number): Promise<string | null>;
|
|
82
|
-
getCommandAndLocationInContext(
|
|
83
|
-
uri: string,
|
|
84
|
-
offset: number
|
|
85
|
-
): Promise<{ text: string; range: monaco.IRange } | null>;
|
|
86
|
-
getCommandsInDocument(uri: string): Promise<{ absoluteStart: number; absoluteEnd: number; text: string }[]>;
|
|
87
|
-
getClientDirective(
|
|
88
|
-
text: string
|
|
89
|
-
): Promise<{ isClientDirective: boolean; directiveWithoutLeadingComments: string }>;
|
|
90
|
-
getAdminCommand(text: string): Promise<{ isAdminCommand: boolean; adminCommandWithoutLeadingComments: string }>;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Get all declared query parameters declared in current block if any.
|
|
94
|
-
*/
|
|
95
|
-
getQueryParams(uri: string, cursorOffset: number): Promise<{ name: string; type: string }[]>;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Get all the ambient parameters defined in global scope.
|
|
99
|
-
* Ambient parameters are parameters that are not defined in the syntax such as in a query parameter declaration.
|
|
100
|
-
* These are parameters that are injected from outside, usually by a UX application that would like to offer
|
|
101
|
-
* the user intellisense for a symbol, without forcing them to write a query declaration statement.
|
|
102
|
-
* Usually the same application injects the query declaration statement and the parameter values when
|
|
103
|
-
* executing the query (so it will execute correctly)
|
|
104
|
-
*/
|
|
105
|
-
getGlobalParams(uri: string): Promise<{ name: string; type: string }[]>;
|
|
106
|
-
/**
|
|
107
|
-
* Get the global parameters that are actually being referenced in query.
|
|
108
|
-
* This is different from getQueryParams that will return the parameters declare using a query declaration
|
|
109
|
-
* statement.
|
|
110
|
-
* It is also different from getGlobalParams that will return all global parameters whether used or not.
|
|
111
|
-
*/
|
|
112
|
-
getReferencedGlobalParams(uri: string, cursorOffset?: number): Promise<{ name: string; type: string }[]>;
|
|
113
|
-
|
|
114
|
-
getReferencedSymbols(
|
|
115
|
-
document: TextDocument,
|
|
116
|
-
cursorOffset?: number
|
|
117
|
-
): Promise<{ name: string; kind: string; display: string }[]>;
|
|
118
|
-
/**
|
|
119
|
-
* Get visualization options in render command if present (null otherwise).
|
|
120
|
-
*/
|
|
121
|
-
getRenderInfo(uri: string, cursorOffset: number): Promise<RenderInfo | null>;
|
|
122
|
-
doDocumentFormat(uri: string): Promise<ls.TextEdit[]>;
|
|
123
|
-
doRangeFormat(uri: string, range: ls.Range): Promise<ls.TextEdit[]>;
|
|
124
|
-
doCurrentCommandFormat(uri: string, caretPosition: ls.Position): Promise<ls.TextEdit[]>;
|
|
125
|
-
doValidation(
|
|
126
|
-
uri: string,
|
|
127
|
-
intervals: { start: number; end: number }[],
|
|
128
|
-
includeWarnings?: boolean,
|
|
129
|
-
includeSuggestions?: boolean
|
|
130
|
-
): Promise<ls.Diagnostic[]>;
|
|
131
|
-
setParameters(
|
|
132
|
-
scalarParameters: readonly ScalarParameter[],
|
|
133
|
-
tabularParameters: readonly TabularParameter[]
|
|
134
|
-
): void;
|
|
135
|
-
/**
|
|
136
|
-
* Get all the database references from the current command.
|
|
137
|
-
* If database's schema is already cached in previous calls to setSchema or addDatabaseToSchema it will not be returned.
|
|
138
|
-
* This method should be used to get all the cross-databases in a command, then schema for the database should be fetched and added with addDatabaseToSchema.
|
|
139
|
-
* @example
|
|
140
|
-
* If the current command includes: cluster('help').database('Samples')
|
|
141
|
-
* getDatabaseReferences will return [{ clusterName: 'help', databaseName 'Samples' }]
|
|
142
|
-
*/
|
|
143
|
-
getDatabaseReferences(uri: string, cursorOffset: number): Promise<DatabaseReference[]>;
|
|
144
|
-
/**
|
|
145
|
-
* Get all the cluster references from the current command.
|
|
146
|
-
* If cluster's schema is already cached it will not be returned.
|
|
147
|
-
* This method should be used to get all the cross-clusters in a command, then schema for the cluster should be fetched and added with addClusterToSchema.
|
|
148
|
-
* cluster name is returned exactly as written in the KQL `cluster(<cluster name>)` function.
|
|
149
|
-
* @example
|
|
150
|
-
* If the current command includes: cluster('help')
|
|
151
|
-
* it returns [{ clusterName: 'help' }]
|
|
152
|
-
* @example
|
|
153
|
-
* If the current command includes: cluster('https://demo11.westus.kusto.windows.net')
|
|
154
|
-
* getClusterReferences will return [{ clusterName: 'https://demo11.westus.kusto.windows.net' }]
|
|
155
|
-
*/
|
|
156
|
-
getClusterReferences(uri: string, cursorOffset: number): Promise<ClusterReference[]>;
|
|
157
|
-
/**
|
|
158
|
-
* Adds a database's scheme. Useful with getDatabaseReferences to load schema for cross-cluster commands.
|
|
159
|
-
* @param clusterName the name of the cluster as returned from getDatabaseReferences/getClusterReferences.
|
|
160
|
-
* @example
|
|
161
|
-
* - User enters cluster('help').database('Samples')
|
|
162
|
-
* - hosting app calls getDatabaseReferences which returns [{ clusterName: 'help', databaseName: 'Samples' }].
|
|
163
|
-
* - hosting app fetches the database Schema from https://help.kusto.windows.net
|
|
164
|
-
* - hosting app calls 'addDatabaseToSchema' with the database's schema.
|
|
165
|
-
* - now, when user types cluster('help').database('Samples') then the auto complete list will show all the tables.
|
|
166
|
-
*/
|
|
167
|
-
addDatabaseToSchema(uri: string, clusterName: string, databaseSchema: Database): Promise<void>;
|
|
168
|
-
/**
|
|
169
|
-
* Adds a cluster's databases to the schema. Useful when used with getClusterReferences in cross-cluster commands.
|
|
170
|
-
* @param clusterName the name of the cluster as returned in getClusterReferences.
|
|
171
|
-
* @example
|
|
172
|
-
* - User enters cluster('help')
|
|
173
|
-
* - hosting app calls getClusterReferences which returns [{ clusterName: 'help' }].
|
|
174
|
-
* - hosting app fetches the list of databases from https://help.kusto.windows.net
|
|
175
|
-
* - hosting app calls addClusterToSchema with the list of databases.
|
|
176
|
-
* - now, when user type `cluster('help').database(` then the auto complete list will show all the databases.
|
|
177
|
-
*/
|
|
178
|
-
addClusterToSchema(uri: string, clusterName: string, databasesNames: readonly string[]): Promise<void>;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* A function that get a model Uri and returns a kusto worker that knows how to work
|
|
183
|
-
* with that document.
|
|
184
|
-
*/
|
|
185
|
-
export interface WorkerAccessor {
|
|
186
|
-
(first: Uri, ...more: Uri[]): Promise<KustoWorker>;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export interface Column {
|
|
190
|
-
name: string;
|
|
191
|
-
type: string;
|
|
192
|
-
docstring?: string;
|
|
193
|
-
}
|
|
194
|
-
export interface Table {
|
|
195
|
-
name: string;
|
|
196
|
-
columns: Column[];
|
|
197
|
-
docstring?: string;
|
|
198
|
-
}
|
|
199
|
-
export interface ScalarParameter {
|
|
200
|
-
name: string;
|
|
201
|
-
type?: string;
|
|
202
|
-
cslType?: string;
|
|
203
|
-
cslDefaultValue?: string;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
export interface TabularParameter {
|
|
207
|
-
name: string;
|
|
208
|
-
columns: Column[];
|
|
209
|
-
docstring?: string;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
// an input parameter either be a scalar in which case it has a name, type and cslType, or it can be columnar, in which case
|
|
213
|
-
// it will have a name, and a list of scalar types which are the column types.
|
|
214
|
-
export type InputParameter = ScalarParameter & { columns?: ScalarParameter[] };
|
|
215
|
-
|
|
216
|
-
export interface Function {
|
|
217
|
-
name: string;
|
|
218
|
-
body: string;
|
|
219
|
-
docstring?: string;
|
|
220
|
-
inputParameters: InputParameter[];
|
|
221
|
-
}
|
|
222
|
-
export interface Database {
|
|
223
|
-
name: string;
|
|
224
|
-
tables: Table[];
|
|
225
|
-
functions: Function[];
|
|
226
|
-
majorVersion: number;
|
|
227
|
-
minorVersion: number;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
export interface EngineSchema {
|
|
231
|
-
clusterType: 'Engine';
|
|
232
|
-
cluster: {
|
|
233
|
-
connectionString: string;
|
|
234
|
-
databases: Database[];
|
|
235
|
-
};
|
|
236
|
-
database: Database | undefined; // a reference to the database that's in current context.
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export interface ClusterMangerSchema {
|
|
240
|
-
clusterType: 'ClusterManager';
|
|
241
|
-
accounts: string[];
|
|
242
|
-
services: string[];
|
|
243
|
-
connectionString: string;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
export interface DataManagementSchema {
|
|
247
|
-
clusterType: 'DataManagement';
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
export type Schema = EngineSchema | ClusterMangerSchema | DataManagementSchema;
|
|
251
|
-
|
|
252
|
-
export var getKustoWorker: () => Promise<WorkerAccessor>;
|
|
253
|
-
|
|
254
|
-
export declare type VisualizationType =
|
|
255
|
-
| 'anomalychart'
|
|
256
|
-
| 'areachart'
|
|
257
|
-
| 'barchart'
|
|
258
|
-
| 'columnchart'
|
|
259
|
-
| 'ladderchart'
|
|
260
|
-
| 'linechart'
|
|
261
|
-
| 'piechart'
|
|
262
|
-
| 'pivotchart'
|
|
263
|
-
| 'scatterchart'
|
|
264
|
-
| 'stackedareachart'
|
|
265
|
-
| 'timechart'
|
|
266
|
-
| 'table'
|
|
267
|
-
| 'timeline'
|
|
268
|
-
| 'timepivot'
|
|
269
|
-
| 'card';
|
|
270
|
-
|
|
271
|
-
export declare type Scale = 'linear' | 'log';
|
|
272
|
-
export declare type LegendVisibility = 'visible' | 'hidden';
|
|
273
|
-
export declare type YSplit = 'none' | 'axes' | 'panels';
|
|
274
|
-
export declare type Kind = 'default' | 'unstacked' | 'stacked' | 'stacked100' | 'map';
|
|
275
|
-
|
|
276
|
-
export interface RenderOptions {
|
|
277
|
-
visualization?: null | VisualizationType;
|
|
278
|
-
title?: null | string;
|
|
279
|
-
xcolumn?: null | string;
|
|
280
|
-
series?: null | string[];
|
|
281
|
-
ycolumns?: null | string[];
|
|
282
|
-
xtitle?: null | string;
|
|
283
|
-
ytitle?: null | string;
|
|
284
|
-
xaxis?: null | Scale;
|
|
285
|
-
yaxis?: null | Scale;
|
|
286
|
-
legend?: null | LegendVisibility;
|
|
287
|
-
ySplit?: null | YSplit;
|
|
288
|
-
accumulate?: null | boolean;
|
|
289
|
-
kind?: null | Kind;
|
|
290
|
-
anomalycolumns?: null | string[];
|
|
291
|
-
ymin?: null | number;
|
|
292
|
-
ymax?: null | number;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
export interface RenderInfo {
|
|
296
|
-
options: RenderOptions;
|
|
297
|
-
location: { startOffset: number; endOffset: number };
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
export interface DatabaseReference {
|
|
301
|
-
databaseName: string;
|
|
302
|
-
clusterName: string;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
export interface ClusterReference {
|
|
306
|
-
clusterName: string;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
export type RenderOptionKeys = keyof RenderOptions;
|
|
310
|
-
|
|
311
|
-
export type OnDidProvideCompletionItems = (list: ls.CompletionList) => Promise<ls.CompletionList>;
|
|
312
|
-
}
|
|
1
|
+
/// <reference types="../globalApi.d.ts" />
|