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
28
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.8.38 to 0.8.39

143

flux-lsp-browser_bg.js

@@ -38,2 +38,14 @@ import * as wasm from './flux-lsp-browser_bg.wasm';

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 WASM_VECTOR_LEN = 0;

@@ -104,14 +116,2 @@

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) {

@@ -211,4 +211,3 @@ // primitive types

/**
* Initialize logging - this requires the "console_log" feature to function,
* as this library adds 180k to the wasm binary being shipped.
* Initialize logging
*/

@@ -261,2 +260,14 @@ export function initLog() {

/**
* Validate flux script.
* @param {string} script
* @returns {boolean}
*/
export function is_valid_flux(script) {
const ptr0 = passStringToWasm0(script, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.is_valid_flux(ptr0, len0);
return ret !== 0;
}
function handleError(f, args) {

@@ -269,3 +280,3 @@ try {

}
function __wbg_adapter_44(arg0, arg1, arg2, arg3) {
function __wbg_adapter_50(arg0, arg1, arg2, arg3) {
wasm.wasm_bindgen__convert__closures__invoke2_mut__h1e11b15c6f1dae6b(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));

@@ -275,2 +286,90 @@ }

/**
* Flux provides an API for transforming, formatting, and checking syntax of flux source code.
*/
export 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;
}
}
/**
* Lsp is the core lsp server interface.

@@ -343,2 +442,6 @@ */

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

@@ -358,6 +461,2 @@ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));

export function __wbindgen_object_drop_ref(arg0) {
takeObject(arg0);
};
export function __wbg_new_693216e109162396() {

@@ -430,3 +529,3 @@ const ret = new Error();

try {
return __wbg_adapter_44(a, state0.b, arg0, arg1);
return __wbg_adapter_50(a, state0.b, arg0, arg1);
} finally {

@@ -465,4 +564,4 @@ state0.a = a;

export function __wbindgen_closure_wrapper8877(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 909, __wbg_adapter_16);
export function __wbindgen_closure_wrapper8958(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 916, __wbg_adapter_16);
return addHeapObject(ret);

@@ -469,0 +568,0 @@ };

/* tslint:disable */
/* eslint-disable */
/**
* Initialize logging - this requires the "console_log" feature to function,
* as this library adds 180k to the wasm binary being shipped.
* Initialize logging
*/

@@ -25,2 +24,45 @@ export function initLog(): void;

/**
* Validate flux script.
* @param {string} script
* @returns {boolean}
*/
export function is_valid_flux(script: string): boolean;
/**
* 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.

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

2

package.json

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

"description": "LSP support for the flux language",
"version": "0.8.38",
"version": "0.8.39",
"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