@influxdata/flux-lsp-node
Advanced tools
Comparing version 0.8.20 to 0.8.21
@@ -25,39 +25,2 @@ /* tslint:disable */ | ||
/** | ||
* Flux provides an API for transforming, formatting, and checking syntax of flux source code. | ||
*/ | ||
export class Flux { | ||
free(): void; | ||
/** | ||
* Create a new Flux object from a raw flux string. | ||
* @param {string} script | ||
*/ | ||
constructor(script: string); | ||
/** | ||
* @param {any} obj | ||
* @returns {Flux} | ||
*/ | ||
static from_ast(obj: any): Flux; | ||
/** | ||
* Get the ast from a Flux instance | ||
* @returns {any} | ||
*/ | ||
ast(): any; | ||
/** | ||
* Format the flux. | ||
* | ||
* In the event that the flux is invalid syntax, an Err will be returned, | ||
* which will translate into a JavaScript exception being thrown. | ||
* @returns {string} | ||
*/ | ||
format(): string; | ||
/** | ||
* Check that the flux is valid. | ||
* | ||
* This function does a semantic check, which will check types and builtin | ||
* function signatures, which can't be checked via a base AST check. | ||
* @returns {boolean} | ||
*/ | ||
is_valid(): boolean; | ||
} | ||
/** | ||
* Lsp is the core lsp server interface. | ||
@@ -64,0 +27,0 @@ */ |
@@ -6,22 +6,2 @@ let imports = {}; | ||
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; | ||
} | ||
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); | ||
@@ -43,2 +23,8 @@ | ||
const heap = new Array(32).fill(undefined); | ||
heap.push(undefined, null, true, false); | ||
let heap_next = heap.length; | ||
function addHeapObject(obj) { | ||
@@ -53,2 +39,4 @@ if (heap_next === heap.length) heap.push(heap.length + 1); | ||
function getObject(idx) { return heap[idx]; } | ||
let WASM_VECTOR_LEN = 0; | ||
@@ -117,2 +105,14 @@ | ||
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; | ||
} | ||
function debugString(val) { | ||
@@ -208,3 +208,3 @@ // primitive types | ||
function __wbg_adapter_16(arg0, arg1, arg2) { | ||
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf6a1de78288fc668(arg0, arg1, addHeapObject(arg2)); | ||
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__he3563ba0548f0d3d(arg0, arg1, addHeapObject(arg2)); | ||
} | ||
@@ -269,96 +269,7 @@ | ||
} | ||
function __wbg_adapter_31(arg0, arg1, arg2, arg3) { | ||
wasm.wasm_bindgen__convert__closures__invoke2_mut__hc325c645eaca9118(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
function __wbg_adapter_32(arg0, arg1, arg2, arg3) { | ||
wasm.wasm_bindgen__convert__closures__invoke2_mut__hd4f24df233c00a29(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
} | ||
/** | ||
* Flux provides an API for transforming, formatting, and checking syntax of flux source code. | ||
*/ | ||
class Flux { | ||
static __wrap(ptr) { | ||
const obj = Object.create(Flux.prototype); | ||
obj.ptr = ptr; | ||
return obj; | ||
} | ||
__destroy_into_raw() { | ||
const ptr = this.ptr; | ||
this.ptr = 0; | ||
return ptr; | ||
} | ||
free() { | ||
const ptr = this.__destroy_into_raw(); | ||
wasm.__wbg_flux_free(ptr); | ||
} | ||
/** | ||
* Create a new Flux object from a raw flux string. | ||
* @param {string} script | ||
*/ | ||
constructor(script) { | ||
const ptr0 = passStringToWasm0(script, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.flux_new(ptr0, len0); | ||
return Flux.__wrap(ret); | ||
} | ||
/** | ||
* @param {any} obj | ||
* @returns {Flux} | ||
*/ | ||
static from_ast(obj) { | ||
const ret = wasm.flux_from_ast(addHeapObject(obj)); | ||
return Flux.__wrap(ret); | ||
} | ||
/** | ||
* Get the ast from a Flux instance | ||
* @returns {any} | ||
*/ | ||
ast() { | ||
const ret = wasm.flux_ast(this.ptr); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* Format the flux. | ||
* | ||
* In the event that the flux is invalid syntax, an Err will be returned, | ||
* which will translate into a JavaScript exception being thrown. | ||
* @returns {string} | ||
*/ | ||
format() { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.flux_format(retptr, this.ptr); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
var r3 = getInt32Memory0()[retptr / 4 + 3]; | ||
var ptr0 = r0; | ||
var len0 = r1; | ||
if (r3) { | ||
ptr0 = 0; len0 = 0; | ||
throw takeObject(r2); | ||
} | ||
return getStringFromWasm0(ptr0, len0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(ptr0, len0); | ||
} | ||
} | ||
/** | ||
* Check that the flux is valid. | ||
* | ||
* This function does a semantic check, which will check types and builtin | ||
* function signatures, which can't be checked via a base AST check. | ||
* @returns {boolean} | ||
*/ | ||
is_valid() { | ||
const ret = wasm.flux_is_valid(this.ptr); | ||
return ret !== 0; | ||
} | ||
} | ||
module.exports.Flux = Flux; | ||
/** | ||
* Lsp is the core lsp server interface. | ||
@@ -427,6 +338,2 @@ */ | ||
module.exports.__wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
module.exports.__wbindgen_json_parse = function(arg0, arg1) { | ||
@@ -446,2 +353,6 @@ const ret = JSON.parse(getStringFromWasm0(arg0, arg1)); | ||
module.exports.__wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
module.exports.__wbindgen_string_new = function(arg0, arg1) { | ||
@@ -452,2 +363,23 @@ const ret = getStringFromWasm0(arg0, arg1); | ||
module.exports.__wbg_new_693216e109162396 = function() { | ||
const ret = new Error(); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_stack_0ddaca5d1abfb52f = function(arg0, arg1) { | ||
const ret = getObject(arg1).stack; | ||
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len0; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr0; | ||
}; | ||
module.exports.__wbg_error_09919627ac0992f5 = function(arg0, arg1) { | ||
try { | ||
console.error(getStringFromWasm0(arg0, arg1)); | ||
} finally { | ||
wasm.__wbindgen_free(arg0, arg1); | ||
} | ||
}; | ||
module.exports.__wbindgen_cb_drop = function(arg0) { | ||
@@ -475,3 +407,3 @@ const obj = takeObject(arg0).original; | ||
try { | ||
return __wbg_adapter_31(a, state0.b, arg0, arg1); | ||
return __wbg_adapter_32(a, state0.b, arg0, arg1); | ||
} finally { | ||
@@ -510,4 +442,4 @@ state0.a = a; | ||
module.exports.__wbindgen_closure_wrapper10864 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 1574, __wbg_adapter_16); | ||
module.exports.__wbindgen_closure_wrapper10778 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 1546, __wbg_adapter_16); | ||
return addHeapObject(ret); | ||
@@ -514,0 +446,0 @@ }; |
@@ -7,3 +7,3 @@ { | ||
"description": "LSP support for the flux language", | ||
"version": "0.8.20", | ||
"version": "0.8.21", | ||
"license": "MIT", | ||
@@ -10,0 +10,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
3639421
0
443