Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
@alexanderzobnin/monaco-kusto
Advanced tools
Kusto language plugin for the Monaco Editor. It provides the following features when editing CSL, KQL files:
yarn install
(or npm install
)test/index.html
in your favorite browser and type some text.yarn run watch
(or npm watch
) to automatically recompile on save.npm i @kusto/monaco-kusto
add the following to your index.html
(or other entry point)
<script src="%PUBLIC_URL%/monaco-editor/min/vs/language/kusto/bridge.js"></script>
<script src="%PUBLIC_URL%/monaco-editor/min/vs/language/kusto/kusto.javascript.client.js"></script>
<script src="%PUBLIC_URL%/monaco-editor/min/vs/language/kusto/newtonsoft.json.js"></script>
<script src="%PUBLIC_URL%/monaco-editor/min/vs/language/kusto/Kusto.Language.Bridge.js"></script>
This is done since this package has a dependency on kusto-language-service
but for now, we couldn't get Bridge.Net
to produce valid modules with valid typescript typings.
Until we do, consumer of this package will have to add the aformentioned lines globally in order for the package to work. In the future we might load these programmatically ourselves (in fact - we already do this for the web monaco language service web worker).
Monaco is using AMD module (actually it now supports ES modules, but we've still not update this pacakge to leverage that). In order to load monaco and monaco-kusto in your application you will need to monaco and monaco-ksuto as static files on your web server, and do do the following (this is in a React app and is taken from an older version of react-monaco-editor
// The MIT License (MIT)
// Copyright (c) 2016-present Leon Shi
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
// Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
// OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
const requireConfig = {
url: 'https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.5/require.min.js',
paths: {
'vs': `${process.env.PUBLIC_URL}/monaco-editor/min/vs`
}
};
componentDidMount() {
const context = this.props.context || window;
if (context.monaco !== undefined) {
this.initMonaco();
return;
}
const { requireConfig } = this.props;
const loaderUrl = requireConfig!.url || 'vs/loader.js';
const onGotAmdLoader = () => {
if (context.__REACT_MONACO_EDITOR_LOADER_ISPENDING__) {
// Do not use webpack
if (requireConfig!.paths && requireConfig!.paths!.vs) {
context.require.config(requireConfig);
}
}
// Load monaco
context.require(['vs/editor/editor.main'], () => {
context.require(['vs/language/kusto/monaco.contribution'], () => {
this.initMonaco();
});
});
// Call the delayed callbacks when AMD loader has been loaded
if (context.__REACT_MONACO_EDITOR_LOADER_ISPENDING__) {
context.__REACT_MONACO_EDITOR_LOADER_ISPENDING__ = false;
const loaderCallbacks = context.__REACT_MONACO_EDITOR_LOADER_CALLBACKS__;
if (loaderCallbacks && loaderCallbacks.length) {
let currentCallback = loaderCallbacks.shift();
while (currentCallback) {
currentCallback.fn.call(currentCallback.context);
currentCallback = loaderCallbacks.shift();
}
}
}
};
<script src="../node_modules/kusto-language-service/kusto.javascript.client.js"></script>
monaco-editor@0.11
so that consumers of the package get a warning if their version of monaco is too old.monaco-editor@0.11.1
to function correctly. adds support for markdown in intellisense documentation.setSchemaFromShowSchema
: a new method to set a schema from the result of .show schema as json exewcutioneditor.action.kusto.formatCurrentCommand
command.getAdminCommand
method to KustoWorker
, which returns an object with a boolean property signifying whether
the text is an admin command, and a string property that contains the command without leading comments.getClientDirective
method to KustoWorker
, which returns an object with a boolean property signifying whether
the text is a client directive, and a string property that contains the directive without leading comments.This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
FAQs
CSL, KQL plugin for the Monaco Editor
The npm package @alexanderzobnin/monaco-kusto receives a total of 3 weekly downloads. As such, @alexanderzobnin/monaco-kusto popularity was classified as not popular.
We found that @alexanderzobnin/monaco-kusto demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.