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

@influxdata/flux-lsp-browser

Package Overview
Dependencies
Maintainers
23
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.7.2 to 0.7.4

226

flux-lsp-browser_bg.js
import * as wasm from './flux-lsp-browser_bg.wasm';
const heap = new Array(32).fill(undefined);
heap.push(undefined, null, true, false);
function getObject(idx) { return heap[idx]; }
let heap_next = heap.length;
function dropObject(idx) {
if (idx < 36) return;
heap[idx] = heap_next;
heap_next = idx;
}
function takeObject(idx) {
const ret = getObject(idx);
dropObject(idx);
return ret;
}
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;

@@ -21,8 +41,2 @@

const heap = new Array(32).fill(undefined);
heap.push(undefined, null, true, false);
let heap_next = heap.length;
function addHeapObject(obj) {

@@ -37,16 +51,67 @@ if (heap_next === heap.length) heap.push(heap.length + 1);

function getObject(idx) { return heap[idx]; }
let WASM_VECTOR_LEN = 0;
function dropObject(idx) {
if (idx < 36) return;
heap[idx] = heap_next;
heap_next = idx;
const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
let cachedTextEncoder = new lTextEncoder('utf-8');
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
? function (arg, view) {
return cachedTextEncoder.encodeInto(arg, view);
}
: function (arg, view) {
const buf = cachedTextEncoder.encode(arg);
view.set(buf);
return {
read: arg.length,
written: buf.length
};
});
function takeObject(idx) {
const ret = getObject(idx);
dropObject(idx);
return ret;
function passStringToWasm0(arg, malloc, realloc) {
if (realloc === undefined) {
const buf = cachedTextEncoder.encode(arg);
const ptr = malloc(buf.length);
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
WASM_VECTOR_LEN = buf.length;
return ptr;
}
let len = arg.length;
let ptr = malloc(len);
const mem = getUint8Memory0();
let offset = 0;
for (; offset < len; offset++) {
const code = arg.charCodeAt(offset);
if (code > 0x7F) break;
mem[ptr + offset] = code;
}
if (offset !== len) {
if (offset !== 0) {
arg = arg.slice(offset);
}
ptr = realloc(ptr, len, len = offset + arg.length * 3);
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
const ret = encodeString(arg, view);
offset += ret.written;
}
WASM_VECTOR_LEN = offset;
return ptr;
}
let cachegetInt32Memory0 = null;
function getInt32Memory0() {
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
}
return cachegetInt32Memory0;
}
function debugString(val) {

@@ -117,67 +182,2 @@ // primitive types

let WASM_VECTOR_LEN = 0;
const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
let cachedTextEncoder = new lTextEncoder('utf-8');
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
? function (arg, view) {
return cachedTextEncoder.encodeInto(arg, view);
}
: function (arg, view) {
const buf = cachedTextEncoder.encode(arg);
view.set(buf);
return {
read: arg.length,
written: buf.length
};
});
function passStringToWasm0(arg, malloc, realloc) {
if (realloc === undefined) {
const buf = cachedTextEncoder.encode(arg);
const ptr = malloc(buf.length);
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
WASM_VECTOR_LEN = buf.length;
return ptr;
}
let len = arg.length;
let ptr = malloc(len);
const mem = getUint8Memory0();
let offset = 0;
for (; offset < len; offset++) {
const code = arg.charCodeAt(offset);
if (code > 0x7F) break;
mem[ptr + offset] = code;
}
if (offset !== len) {
if (offset !== 0) {
arg = arg.slice(offset);
}
ptr = realloc(ptr, len, len = offset + arg.length * 3);
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
const ret = encodeString(arg, view);
offset += ret.written;
}
WASM_VECTOR_LEN = offset;
return ptr;
}
let cachegetInt32Memory0 = null;
function getInt32Memory0() {
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
}
return cachegetInt32Memory0;
}
function makeMutClosure(arg0, arg1, dtor, f) {

@@ -207,3 +207,3 @@ const state = { a: arg0, b: arg1, cnt: 1, dtor };

}
function __wbg_adapter_12(arg0, arg1, arg2) {
function __wbg_adapter_18(arg0, arg1, arg2) {
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd9d00d3aeebb5f0a(arg0, arg1, addHeapObject(arg2));

@@ -220,2 +220,36 @@ }

/**
* Parse flux into an AST representation. The AST will be generated regardless
* of valid flux. As such, no error handling is needed.
* @param {string} script
* @returns {any}
*/
export function parse(script) {
var ptr0 = passStringToWasm0(script, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len0 = WASM_VECTOR_LEN;
var ret = wasm.parse(ptr0, len0);
return takeObject(ret);
}
/**
* Format a flux script from AST.
*
* In the event that the flux is invalid syntax, an Err will be returned,
* which will translate into a JavaScript exception being thrown.
* @param {any} js_file
* @returns {string}
*/
export function format_from_js_file(js_file) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.format_from_js_file(retptr, addHeapObject(js_file));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
return getStringFromWasm0(r0, r1);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
wasm.__wbindgen_free(r0, r1);
}
}
function handleError(f, args) {

@@ -228,3 +262,3 @@ try {

}
function __wbg_adapter_26(arg0, arg1, arg2, arg3) {
function __wbg_adapter_34(arg0, arg1, arg2, arg3) {
wasm.wasm_bindgen__convert__closures__invoke2_mut__h49fa787168aa1201(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));

@@ -296,2 +330,6 @@ }

export function __wbindgen_object_drop_ref(arg0) {
takeObject(arg0);
};
export function __wbindgen_string_new(arg0, arg1) {

@@ -302,6 +340,16 @@ var ret = getStringFromWasm0(arg0, arg1);

export function __wbindgen_object_drop_ref(arg0) {
takeObject(arg0);
export function __wbindgen_json_parse(arg0, arg1) {
var ret = JSON.parse(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
};
export function __wbindgen_json_serialize(arg0, arg1) {
const obj = getObject(arg1);
var ret = JSON.stringify(obj === undefined ? null : obj);
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
};
export function __wbg_new_693216e109162396() {

@@ -350,3 +398,3 @@ var ret = new Error();

try {
return __wbg_adapter_26(a, state0.b, arg0, arg1);
return __wbg_adapter_34(a, state0.b, arg0, arg1);
} finally {

@@ -385,6 +433,10 @@ state0.a = a;

export function __wbindgen_closure_wrapper7926(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 1133, __wbg_adapter_12);
export function __wbindgen_rethrow(arg0) {
throw takeObject(arg0);
};
export function __wbindgen_closure_wrapper8011(arg0, arg1, arg2) {
var ret = makeMutClosure(arg0, arg1, 1152, __wbg_adapter_18);
return addHeapObject(ret);
};

@@ -9,2 +9,18 @@ /* tslint:disable */

/**
* Parse flux into an AST representation. The AST will be generated regardless
* of valid flux. As such, no error handling is needed.
* @param {string} script
* @returns {any}
*/
export function parse(script: string): any;
/**
* Format a flux script from AST.
*
* In the event that the flux is invalid syntax, an Err will be returned,
* which will translate into a JavaScript exception being thrown.
* @param {any} js_file
* @returns {string}
*/
export function format_from_js_file(js_file: any): string;
/**
* Lsp is the core lsp server interface.

@@ -11,0 +27,0 @@ */

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

"description": "LSP support for the flux language",
"version": "0.7.2",
"version": "0.7.4",
"license": "MIT",

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

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