@kusto/monaco-kusto
Advanced tools
Comparing version
{ | ||
"name": "@kusto/monaco-kusto", | ||
"version": "5.6.0", | ||
"version": "5.6.3", | ||
"description": "CSL, KQL plugin for the Monaco Editor", | ||
@@ -20,8 +20,5 @@ "author": { | ||
"scripts": { | ||
"copy_runtime_deps_to_out": "mcopy ./node_modules/@kusto/language-service/Kusto.JavaScript.Client.min.js ./out/vs/language/kusto/kusto.javascript.client.min.js && mcopy ./node_modules/@kusto/language-service-next/Kusto.Language.Bridge.min.js ./out/vs/language/kusto/Kusto.Language.Bridge.min.js && mcopy ./node_modules/@kusto/language-service/bridge.min.js ./out/vs/language/kusto/bridge.min.js && node ./node_modules/copy-dir-cli/bin/copy ./node_modules/monaco-editor-core/dev/vs ./out/vs", | ||
"compile": "tsc -p ./tsconfig.json && tsc -p ./tsconfig.esm.json", | ||
"build": "node ./scripts/build.js", | ||
"watch": "echo dev > test/mode.txt && tsc -p ./tsconfig.watch.json && npm run copy_runtime_deps_to_out && concurrently \"live-server ./ \" \"tsc -w -p ./tsconfig.watch.json \"", | ||
"test_release": "echo release > test/mode.txt && http-server -c-1 -p 8080 ./ -o index.html", | ||
"copy_types_to_release": "mcopy ./src/monaco.d.ts ./release/esm/monaco.d.ts && mcopy ./out/amd/monaco.contribution.d.ts ./release/esm/monaco.contribution.d.ts && mcopy ./src/monaco.d.ts ./release/min/monaco.d.ts && mcopy ./out/amd/monaco.contribution.d.ts ./release/min/monaco.contribution.d.ts && mcopy ./node_modules/@kusto/language-service/Kusto.JavaScript.Client.min.js ./release/min/kusto.javascript.client.min.js && mcopy ./node_modules/@kusto/language-service-next/Kusto.Language.Bridge.min.js ./release/min/Kusto.Language.Bridge.min.js && mcopy ./node_modules/@kusto/language-service/bridge.min.js ./release/min/bridge.min.js && mcopy ./node_modules/@kusto/language-service/newtonsoft.json.min.js ./release/min/newtonsoft.json.min.js", | ||
"prepublishOnly": "mkdirp release && npm run compile && node ./scripts/release.js && node ./scripts/bundle.js && npm run copy_runtime_deps_to_out && npm run copy_types_to_release", | ||
"test": "jest", | ||
@@ -28,0 +25,0 @@ "clean": "mrmdir ./out && mrmdir ./release" |
/*!----------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* monaco-kusto version: 5.6.0(undefined) | ||
* monaco-kusto version: 5.6.3(undefined) | ||
* Released under the MIT license | ||
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md | ||
*-----------------------------------------------------------------------------*/ | ||
undefined | ||
define("vs/language/kusto/commandHighlighter",["require","exports"],(function(e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var t=function(){function e(e){var o=this;this.editor=e,this.disposables=[],this.decorations=[],this.editor.onDidChangeCursorSelection((function(e){"kusto"===o.editor.getModel().getLanguageId()&&o.highlightCommandUnderCursor(e)}))}return e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.disposables.forEach((function(e){return e.dispose()}))},e.prototype.highlightCommandUnderCursor=function(o){if(o.selection.isEmpty()){var t=[{range:this.editor.getCurrentCommandRange(o.selection.getStartPosition()),options:e.CURRENT_COMMAND_HIGHLIGHT}];this.decorations=this.editor.deltaDecorations(this.decorations,t)}else this.decorations=this.editor.deltaDecorations(this.decorations,[])},e.ID="editor.contrib.kustoCommandHighliter",e.CURRENT_COMMAND_HIGHLIGHT={className:"selectionHighlight"},e}();o.default=t})),define("vs/language/kusto/commandFormatter",["require","exports"],(function(e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var t=function(e){var o=this;this.editor=e,this.actionAdded=!1,e.onDidChangeCursorSelection((function(t){"kusto"===o.editor.getModel().getLanguageId()&&(o.actionAdded||(e.addAction({id:"editor.action.kusto.formatCurrentCommand",label:"Format Command Under Cursor",keybindings:[monaco.KeyMod.chord(monaco.KeyMod.CtrlCmd|monaco.KeyCode.KeyK,monaco.KeyMod.CtrlCmd|monaco.KeyCode.KeyF)],run:function(o){e.trigger("KustoCommandFormatter","editor.action.formatSelection",null)},contextMenuGroupId:"1_modification"}),o.actionAdded=!0))}))};o.default=t})),define("vs/language/kusto/extendedEditor",["require","exports"],(function(e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.extend=void 0,o.extend=function(e){Object.getPrototypeOf(e).getCurrentCommandRange=function(e){for(var o=e.lineNumber-1,t=this.getModel().getLinesContent(),n=0,r=[],i=0;i<t.length;i++){if(""===t[i].trim()?r.push({commandOrdinal:n++,lineNumber:i}):r.push({commandOrdinal:n,lineNumber:i}),i>o&&n>r[o].commandOrdinal)break}var a=r[o].commandOrdinal,d=r.filter((function(e){return e.commandOrdinal===a})),u=d[0].lineNumber+1,s=d[d.length-1].lineNumber+1,g=t[s-1].length+1;return new monaco.Range(u,1,s,g)}}})),define("vs/language/kusto/monaco.contribution",["require","exports","./commandHighlighter","./commandFormatter","./extendedEditor"],(function(e,o,t,n,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.setupMonacoKusto=o.LanguageServiceDefaultsImpl=void 0;var i=monaco.Emitter,a=function(){function e(e){this._onDidChange=new i,this.setLanguageSettings(e),this._workerMaxIdleTime=0}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageSettings",{get:function(){return this._languageSettings},enumerable:!1,configurable:!0}),e.prototype.setLanguageSettings=function(e){this._languageSettings=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.setMaximumWorkerIdleTime=function(e){this._workerMaxIdleTime=e},e.prototype.getWorkerMaxIdleTime=function(){return this._workerMaxIdleTime},e}();o.LanguageServiceDefaultsImpl=a;var d={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"]};function u(){return new Promise((function(e,o){s((function(t){t.getKustoWorker().then(e,o)}))}))}function s(o){e(["vs/language/kusto/kustoMode"],o)}function g(e){var o=new a(d);e.languages.kusto={kustoDefaults:o,getKustoWorker:u},e.languages.onLanguage("kusto",(function(){s((function(t){return t.setupMode(o,e)}))})),e.languages.register({id:"kusto",extensions:[".csl",".kql"]}),e.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:{}}),e.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:{}}),e.editor.defineTheme("kusto-dark2",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#1B1A19","editorSuggestWidget.selectedBackground":"#004E8C"}}),e.editor.onDidCreateEditor((function(e){(0,r.extend)(e),new t.default(e),function(e){return void 0!==e.addAction}(e)&&new n.default(e),function(e){e.onDidChangeCursorSelection((function(t){if(o&&o.languageSettings&&o.languageSettings.openSuggestionDialogAfterPreviousSuggestionAccepted){if(!("snippet"===t.source&&t.reason===monaco.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)}))}o.setupMonacoKusto=g,monaco.editor&&g(monaco)})); |
@@ -23,3 +23,5 @@ const requirejs = require('requirejs'); | ||
bundleOne('monaco.contribution', ['vs/language/kusto/kustoMode']), bundleOne('kustoMode'), bundleOne('kustoWorker'); | ||
bundleOne('monaco.contribution', ['vs/language/kusto/kustoMode']); | ||
bundleOne('kustoMode'); | ||
bundleOne('kustoWorker'); | ||
@@ -55,3 +57,3 @@ function bundleOne(moduleId, exclude) { | ||
}, | ||
function (buildResponse) { | ||
async function (buildResponse) { | ||
const devFilePath = path.join(REPO_ROOT, 'release/dev/' + moduleId + '.js'); | ||
@@ -62,3 +64,3 @@ const minFilePath = path.join(REPO_ROOT, 'release/min/' + moduleId + '.js'); | ||
console.log(`Minifying ${devFilePath}...`); | ||
const result = Terser.minify(fileContents, { | ||
const result = await Terser.minify(fileContents, { | ||
output: { | ||
@@ -65,0 +67,0 @@ comments: 'some', |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
High entropy strings
Supply chain riskContains high entropy strings. This could be a sign of encrypted data, leaked secrets or obfuscated code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
0
-100%2028221
-77.54%28
-20%40250
-25.38%42
23.53%