Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@influxdata/flux-lsp-node

Package Overview
Dependencies
Maintainers
18
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@influxdata/flux-lsp-node - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

1

flux-lsp-node.d.ts
/* tslint:disable */
/* eslint-disable */
/**

@@ -3,0 +4,0 @@ * @param {string} s

117

flux-lsp-node.js
let wasm;
const { TextDecoder } = require(String.raw`util`);
let cachegetInt32Memory = null;
function getInt32Memory() {
if (cachegetInt32Memory === null || cachegetInt32Memory.buffer !== wasm.memory.buffer) {
cachegetInt32Memory = new Int32Array(wasm.memory.buffer);
}
return cachegetInt32Memory;
}
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });

@@ -16,29 +8,54 @@

let cachegetUint8Memory = null;
function getUint8Memory() {
if (cachegetUint8Memory === null || cachegetUint8Memory.buffer !== wasm.memory.buffer) {
cachegetUint8Memory = new Uint8Array(wasm.memory.buffer);
let cachegetUint8Memory0 = null;
function getUint8Memory0() {
if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
}
return cachegetUint8Memory;
return cachegetUint8Memory0;
}
function getStringFromWasm(ptr, len) {
return cachedTextDecoder.decode(getUint8Memory().subarray(ptr, ptr + len));
function getStringFromWasm0(ptr, len) {
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
}
const heap = new Array(32);
heap.fill(undefined);
heap.push(undefined, null, true, false);
let heap_next = heap.length;
function addHeapObject(obj) {
if (heap_next === heap.length) heap.push(heap.length + 1);
const idx = heap_next;
heap_next = heap[idx];
heap[idx] = obj;
return idx;
}
let cachegetInt32Memory0 = null;
function getInt32Memory0() {
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
}
return cachegetInt32Memory0;
}
let WASM_VECTOR_LEN = 0;
let cachegetNodeBufferMemory = null;
function getNodeBufferMemory() {
if (cachegetNodeBufferMemory === null || cachegetNodeBufferMemory.buffer !== wasm.memory.buffer) {
cachegetNodeBufferMemory = Buffer.from(wasm.memory.buffer);
let cachegetNodeBufferMemory0 = null;
function getNodeBufferMemory0() {
if (cachegetNodeBufferMemory0 === null || cachegetNodeBufferMemory0.buffer !== wasm.memory.buffer) {
cachegetNodeBufferMemory0 = Buffer.from(wasm.memory.buffer);
}
return cachegetNodeBufferMemory;
return cachegetNodeBufferMemory0;
}
function passStringToWasm(arg) {
function passStringToWasm0(arg, malloc) {
const len = Buffer.byteLength(arg);
const ptr = wasm.__wbindgen_malloc(len);
getNodeBufferMemory().write(arg, ptr, len);
const ptr = malloc(len);
getNodeBufferMemory0().write(arg, ptr, len);
WASM_VECTOR_LEN = len;

@@ -48,12 +65,4 @@ return ptr;

const heap = new Array(32);
heap.fill(undefined);
heap.push(undefined, null, true, false);
function getObject(idx) { return heap[idx]; }
let heap_next = heap.length;
function dropObject(idx) {

@@ -75,14 +84,8 @@ if (idx < 36) return;

module.exports.parse = function(s) {
const ret = wasm.parse(passStringToWasm(s), WASM_VECTOR_LEN);
var ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len0 = WASM_VECTOR_LEN;
var ret = wasm.parse(ptr0, len0);
return takeObject(ret);
};
function addHeapObject(obj) {
if (heap_next === heap.length) heap.push(heap.length + 1);
const idx = heap_next;
heap_next = heap[idx];
heap[idx] = obj;
return idx;
}
/**

@@ -122,3 +125,3 @@ */

constructor(disable_folding) {
const ret = wasm.server_new(disable_folding);
var ret = wasm.server_new(disable_folding);
return Server.__wrap(ret);

@@ -131,3 +134,5 @@ }

process(msg) {
const ret = wasm.server_process(this.ptr, passStringToWasm(msg), WASM_VECTOR_LEN);
var ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len0 = WASM_VECTOR_LEN;
var ret = wasm.server_process(this.ptr, ptr0, len0);
return ServerResponse.__wrap(ret);

@@ -158,9 +163,9 @@ }

get_message() {
const retptr = 8;
const ret = wasm.serverresponse_get_message(retptr, this.ptr);
const memi32 = getInt32Memory();
wasm.serverresponse_get_message(8, this.ptr);
var r0 = getInt32Memory0()[8 / 4 + 0];
var r1 = getInt32Memory0()[8 / 4 + 1];
let v0;
if (memi32[retptr / 4 + 0] !== 0) {
v0 = getStringFromWasm(memi32[retptr / 4 + 0], memi32[retptr / 4 + 1]).slice();
wasm.__wbindgen_free(memi32[retptr / 4 + 0], memi32[retptr / 4 + 1] * 1);
if (r0 !== 0) {
v0 = getStringFromWasm0(r0, r1).slice();
wasm.__wbindgen_free(r0, r1 * 1);
}

@@ -173,9 +178,9 @@ return v0;

get_error() {
const retptr = 8;
const ret = wasm.serverresponse_get_error(retptr, this.ptr);
const memi32 = getInt32Memory();
wasm.serverresponse_get_error(8, this.ptr);
var r0 = getInt32Memory0()[8 / 4 + 0];
var r1 = getInt32Memory0()[8 / 4 + 1];
let v0;
if (memi32[retptr / 4 + 0] !== 0) {
v0 = getStringFromWasm(memi32[retptr / 4 + 0], memi32[retptr / 4 + 1]).slice();
wasm.__wbindgen_free(memi32[retptr / 4 + 0], memi32[retptr / 4 + 1] * 1);
if (r0 !== 0) {
v0 = getStringFromWasm0(r0, r1).slice();
wasm.__wbindgen_free(r0, r1 * 1);
}

@@ -188,3 +193,3 @@ return v0;

module.exports.__wbindgen_json_parse = function(arg0, arg1) {
const ret = JSON.parse(getStringFromWasm(arg0, arg1));
var ret = JSON.parse(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);

@@ -194,5 +199,5 @@ };

module.exports.__wbindgen_throw = function(arg0, arg1) {
throw new Error(getStringFromWasm(arg0, arg1));
throw new Error(getStringFromWasm0(arg0, arg1));
};
wasm = require('./flux-lsp-node_bg');

@@ -7,3 +7,3 @@ {

"description": "LSP support for the flux language",
"version": "0.1.0",
"version": "0.2.0",
"license": "MIT",

@@ -10,0 +10,0 @@ "repository": {

@@ -8,8 +8,10 @@ # Flux LSP

# Install
# Installing command line server
```
cargo install --git git@github.com:influxdata/flux-lsp.git
npm i -g @influxdata/flux-lsp-cli
```
This will allow you to run an LSP instance with the command `flux-lsp`
# Vim setup

@@ -16,0 +18,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc