@influxdata/flux-lsp-browser
Advanced tools
Comparing version 0.7.0 to 0.7.2
import * as wasm from './flux-lsp-browser_bg.wasm'; | ||
const heap = new Array(32).fill(undefined); | ||
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; | ||
heap.push(undefined, null, true, false); | ||
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); | ||
function getObject(idx) { return heap[idx]; } | ||
cachedTextDecoder.decode(); | ||
let WASM_VECTOR_LEN = 0; | ||
let cachegetUint8Memory0 = null; | ||
@@ -19,75 +17,10 @@ function getUint8Memory0() { | ||
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 getStringFromWasm0(ptr, len) { | ||
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); | ||
} | ||
: function (arg, view) { | ||
const buf = cachedTextEncoder.encode(arg); | ||
view.set(buf); | ||
return { | ||
read: arg.length, | ||
written: buf.length | ||
}; | ||
}); | ||
function passStringToWasm0(arg, malloc, realloc) { | ||
const heap = new Array(32).fill(undefined); | ||
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; | ||
} | ||
heap.push(undefined, null, true, false); | ||
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; | ||
} | ||
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; | ||
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); | ||
cachedTextDecoder.decode(); | ||
function getStringFromWasm0(ptr, len) { | ||
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); | ||
} | ||
let heap_next = heap.length; | ||
@@ -104,2 +37,4 @@ | ||
function getObject(idx) { return heap[idx]; } | ||
function dropObject(idx) { | ||
@@ -182,2 +117,67 @@ if (idx < 36) return; | ||
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,4 +207,4 @@ const state = { a: arg0, b: arg1, cnt: 1, dtor }; | ||
} | ||
function __wbg_adapter_16(arg0, arg1, arg2) { | ||
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6262b9cc0248558d(arg0, arg1, addHeapObject(arg2)); | ||
function __wbg_adapter_12(arg0, arg1, arg2) { | ||
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd9d00d3aeebb5f0a(arg0, arg1, addHeapObject(arg2)); | ||
} | ||
@@ -227,4 +227,4 @@ | ||
} | ||
function __wbg_adapter_32(arg0, arg1, arg2, arg3) { | ||
wasm.wasm_bindgen__convert__closures__invoke2_mut__h061d51273edd4f83(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
function __wbg_adapter_26(arg0, arg1, arg2, arg3) { | ||
wasm.wasm_bindgen__convert__closures__invoke2_mut__h49fa787168aa1201(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
} | ||
@@ -263,2 +263,3 @@ | ||
* Attach a message handler to server messages. | ||
* All handlers must be attached before server.run is called. | ||
* @param {Function} func | ||
@@ -290,4 +291,3 @@ */ | ||
run() { | ||
const ptr = this.__destroy_into_raw(); | ||
var ret = wasm.lsp_run(ptr); | ||
var ret = wasm.lsp_run(this.ptr); | ||
return takeObject(ret); | ||
@@ -297,11 +297,2 @@ } | ||
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 __wbindgen_string_new(arg0, arg1) { | ||
@@ -316,7 +307,2 @@ var ret = getStringFromWasm0(arg0, arg1); | ||
export function __wbindgen_object_clone_ref(arg0) { | ||
var ret = getObject(arg0); | ||
return addHeapObject(ret); | ||
}; | ||
export function __wbg_new_693216e109162396() { | ||
@@ -353,7 +339,2 @@ var ret = new Error(); | ||
export function __wbg_call_888d259a5fefc347() { return handleError(function (arg0, arg1) { | ||
var ret = getObject(arg0).call(getObject(arg1)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
export function __wbg_call_346669c262382ad7() { return handleError(function (arg0, arg1, arg2) { | ||
@@ -371,3 +352,3 @@ var ret = getObject(arg0).call(getObject(arg1), getObject(arg2)); | ||
try { | ||
return __wbg_adapter_32(a, state0.b, arg0, arg1); | ||
return __wbg_adapter_26(a, state0.b, arg0, arg1); | ||
} finally { | ||
@@ -394,7 +375,2 @@ state0.a = a; | ||
export function __wbg_then_8c2d62e8ae5978f7(arg0, arg1, arg2) { | ||
var ret = getObject(arg0).then(getObject(arg1), getObject(arg2)); | ||
return addHeapObject(ret); | ||
}; | ||
export function __wbindgen_debug_string(arg0, arg1) { | ||
@@ -412,6 +388,6 @@ var ret = debugString(getObject(arg1)); | ||
export function __wbindgen_closure_wrapper8275(arg0, arg1, arg2) { | ||
var ret = makeMutClosure(arg0, arg1, 1171, __wbg_adapter_16); | ||
export function __wbindgen_closure_wrapper7926(arg0, arg1, arg2) { | ||
var ret = makeMutClosure(arg0, arg1, 1133, __wbg_adapter_12); | ||
return addHeapObject(ret); | ||
}; | ||
@@ -18,2 +18,3 @@ /* tslint:disable */ | ||
* Attach a message handler to server messages. | ||
* All handlers must be attached before server.run is called. | ||
* @param {Function} func | ||
@@ -20,0 +21,0 @@ */ |
@@ -7,3 +7,3 @@ { | ||
"description": "LSP support for the flux language", | ||
"version": "0.7.0", | ||
"version": "0.7.2", | ||
"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
3335210
366