@prisma/prisma-schema-wasm
Advanced tools
Comparing version
{ | ||
"name": "@prisma/prisma-schema-wasm", | ||
"version": "6.5.0-51.integration-6b7f8fb71db28cc30221fedcb4209c43e6002520-23f790eed4bf48b12422d90d8d5e65361a83ed70", | ||
"version": "6.5.0-52.integration-6b7f8fb71db28cc30221fedcb4209c43e6002520-a056bc90bb1122f3a6e634b8723b77b939355bde", | ||
"description": "The WASM package for prisma-fmt", | ||
@@ -5,0 +5,0 @@ "main": "src/prisma_schema_build.js", |
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export const memory: WebAssembly.Memory; | ||
export const format: (a: number, b: number, c: number, d: number) => [number, number]; | ||
export const get_config: (a: number, b: number) => [number, number]; | ||
export const get_dmmf: (a: number, b: number) => [number, number, number, number]; | ||
export const get_datamodel: (a: number, b: number) => [number, number, number, number]; | ||
export const lint: (a: number, b: number) => [number, number]; | ||
export const validate: (a: number, b: number) => [number, number]; | ||
export const merge_schemas: (a: number, b: number) => [number, number, number, number]; | ||
export const native_types: (a: number, b: number) => [number, number]; | ||
export const referential_actions: (a: number, b: number) => [number, number]; | ||
export const preview_features: () => [number, number]; | ||
export const text_document_completion: (a: number, b: number, c: number, d: number) => [number, number]; | ||
export const code_actions: (a: number, b: number, c: number, d: number) => [number, number]; | ||
export const references: (a: number, b: number, c: number, d: number) => [number, number]; | ||
export const hover: (a: number, b: number, c: number, d: number) => [number, number]; | ||
export const debug_panic: () => void; | ||
export const __wbindgen_export_0: WebAssembly.Table; | ||
export const __wbindgen_malloc: (a: number, b: number) => number; | ||
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number; | ||
export const __wbindgen_free: (a: number, b: number, c: number) => void; | ||
export const __externref_table_dealloc: (a: number) => void; | ||
export const __wbindgen_start: () => void; | ||
export function format(a: number, b: number, c: number, d: number, e: number): void; | ||
export function get_config(a: number, b: number, c: number): void; | ||
export function get_dmmf(a: number, b: number, c: number): void; | ||
export function get_datamodel(a: number, b: number, c: number): void; | ||
export function lint(a: number, b: number, c: number): void; | ||
export function validate(a: number, b: number, c: number): void; | ||
export function merge_schemas(a: number, b: number, c: number): void; | ||
export function native_types(a: number, b: number, c: number): void; | ||
export function referential_actions(a: number, b: number, c: number): void; | ||
export function preview_features(a: number): void; | ||
export function text_document_completion(a: number, b: number, c: number, d: number, e: number): void; | ||
export function code_actions(a: number, b: number, c: number, d: number, e: number): void; | ||
export function references(a: number, b: number, c: number, d: number, e: number): void; | ||
export function hover(a: number, b: number, c: number, d: number, e: number): void; | ||
export function debug_panic(): void; | ||
export function __wbindgen_add_to_stack_pointer(a: number): number; | ||
export function __wbindgen_malloc(a: number, b: number): number; | ||
export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number; | ||
export function __wbindgen_free(a: number, b: number, c: number): void; |
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* @param {string} schema | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
export function format(schema: string, params: string): string; | ||
/** | ||
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_config.html | ||
*/ | ||
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_config.html | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
export function get_config(params: string): string; | ||
/** | ||
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_dmmf.html | ||
*/ | ||
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_dmmf.html | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
export function get_dmmf(params: string): string; | ||
/** | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
export function get_datamodel(params: string): string; | ||
/** | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
export function lint(input: string): string; | ||
/** | ||
* @param {string} params | ||
*/ | ||
export function validate(params: string): void; | ||
/** | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
export function merge_schemas(input: string): string; | ||
/** | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
export function native_types(input: string): string; | ||
/** | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
export function referential_actions(input: string): string; | ||
/** | ||
* @returns {string} | ||
*/ | ||
export function preview_features(): string; | ||
/** | ||
* The API is modelled on an LSP [completion | ||
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#completion-request-leftwards_arrow_with_hook). | ||
* Input and output are both JSON, the request being a `CompletionParams` object and the response | ||
* being a `CompletionList` object. | ||
*/ | ||
* The API is modelled on an LSP [completion | ||
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#completion-request-leftwards_arrow_with_hook). | ||
* Input and output are both JSON, the request being a `CompletionParams` object and the response | ||
* being a `CompletionList` object. | ||
* @param {string} schema_files | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
export function text_document_completion(schema_files: string, params: string): string; | ||
/** | ||
* This API is modelled on an LSP [code action | ||
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#code-action-request-leftwards_arrow_with_hook). | ||
* Input and output are both JSON, the request being a | ||
* `CodeActionParams` object and the response being a list of | ||
* `CodeActionOrCommand` objects. | ||
*/ | ||
* This API is modelled on an LSP [code action | ||
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#code-action-request-leftwards_arrow_with_hook). | ||
* Input and output are both JSON, the request being a | ||
* `CodeActionParams` object and the response being a list of | ||
* `CodeActionOrCommand` objects. | ||
* @param {string} schema | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
export function code_actions(schema: string, params: string): string; | ||
/** | ||
* This API is modelled on an LSP [references | ||
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#find-references-request-leftwards_arrow_with_hook). | ||
* Input and output are both JSON, the request being a | ||
* `CodeActionParams` object and the response being a list of | ||
* `CodeActionOrCommand` objects. | ||
*/ | ||
* This API is modelled on an LSP [references | ||
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#find-references-request-leftwards_arrow_with_hook). | ||
* Input and output are both JSON, the request being a | ||
* `CodeActionParams` object and the response being a list of | ||
* `CodeActionOrCommand` objects. | ||
* @param {string} schema | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
export function references(schema: string, params: string): string; | ||
/** | ||
* This api is modelled on an LSP [hover request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#hover-request-leftwards_arrow_with_hook). | ||
* Input and output are both JSON, the request being a `HoverParams` object | ||
* and the response being a `Hover` object. | ||
*/ | ||
* This api is modelled on an LSP [hover request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#hover-request-leftwards_arrow_with_hook). | ||
* Input and output are both JSON, the request being a `HoverParams` object | ||
* and the response being a `Hover` object. | ||
* @param {string} schema_files | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
export function hover(schema_files: string, params: string): string; | ||
/** | ||
* Trigger a panic inside the wasm module. This is only useful in development for testing panic | ||
* handling. | ||
*/ | ||
* Trigger a panic inside the wasm module. This is only useful in development for testing panic | ||
* handling. | ||
*/ | ||
export function debug_panic(): void; |
@@ -25,2 +25,17 @@ | ||
const heap = new Array(128).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 WASM_VECTOR_LEN = 0; | ||
@@ -81,7 +96,16 @@ | ||
} | ||
let cachedDataViewMemory0 = null; | ||
function getDataViewMemory0() { | ||
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { | ||
cachedDataViewMemory0 = new DataView(wasm.memory.buffer); | ||
} | ||
return cachedDataViewMemory0; | ||
} | ||
/** | ||
* @param {string} schema | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
* @param {string} schema | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
module.exports.format = function(schema, params) { | ||
@@ -91,2 +115,3 @@ let deferred3_0; | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
@@ -96,7 +121,10 @@ const len0 = WASM_VECTOR_LEN; | ||
const len1 = WASM_VECTOR_LEN; | ||
const ret = wasm.format(ptr0, len0, ptr1, len1); | ||
deferred3_0 = ret[0]; | ||
deferred3_1 = ret[1]; | ||
return getStringFromWasm0(ret[0], ret[1]); | ||
wasm.format(retptr, ptr0, len0, ptr1, len1); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
deferred3_0 = r0; | ||
deferred3_1 = r1; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1); | ||
@@ -107,6 +135,6 @@ } | ||
/** | ||
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_config.html | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_config.html | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
module.exports.get_config = function(params) { | ||
@@ -116,9 +144,13 @@ let deferred2_0; | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.get_config(ptr0, len0); | ||
deferred2_0 = ret[0]; | ||
deferred2_1 = ret[1]; | ||
return getStringFromWasm0(ret[0], ret[1]); | ||
wasm.get_config(retptr, ptr0, len0); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
deferred2_0 = r0; | ||
deferred2_1 = r1; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); | ||
@@ -128,12 +160,20 @@ } | ||
function takeFromExternrefTable0(idx) { | ||
const value = wasm.__wbindgen_export_0.get(idx); | ||
wasm.__externref_table_dealloc(idx); | ||
return value; | ||
function getObject(idx) { return heap[idx]; } | ||
function dropObject(idx) { | ||
if (idx < 132) return; | ||
heap[idx] = heap_next; | ||
heap_next = idx; | ||
} | ||
function takeObject(idx) { | ||
const ret = getObject(idx); | ||
dropObject(idx); | ||
return ret; | ||
} | ||
/** | ||
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_dmmf.html | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_dmmf.html | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
module.exports.get_dmmf = function(params) { | ||
@@ -143,10 +183,15 @@ let deferred3_0; | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.get_dmmf(ptr0, len0); | ||
var ptr2 = ret[0]; | ||
var len2 = ret[1]; | ||
if (ret[3]) { | ||
wasm.get_dmmf(retptr, ptr0, len0); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); | ||
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true); | ||
var ptr2 = r0; | ||
var len2 = r1; | ||
if (r3) { | ||
ptr2 = 0; len2 = 0; | ||
throw takeFromExternrefTable0(ret[2]); | ||
throw takeObject(r2); | ||
} | ||
@@ -157,2 +202,3 @@ deferred3_0 = ptr2; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1); | ||
@@ -163,5 +209,5 @@ } | ||
/** | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
module.exports.get_datamodel = function(params) { | ||
@@ -171,10 +217,15 @@ let deferred3_0; | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.get_datamodel(ptr0, len0); | ||
var ptr2 = ret[0]; | ||
var len2 = ret[1]; | ||
if (ret[3]) { | ||
wasm.get_datamodel(retptr, ptr0, len0); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); | ||
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true); | ||
var ptr2 = r0; | ||
var len2 = r1; | ||
if (r3) { | ||
ptr2 = 0; len2 = 0; | ||
throw takeFromExternrefTable0(ret[2]); | ||
throw takeObject(r2); | ||
} | ||
@@ -185,2 +236,3 @@ deferred3_0 = ptr2; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1); | ||
@@ -191,5 +243,5 @@ } | ||
/** | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
module.exports.lint = function(input) { | ||
@@ -199,9 +251,13 @@ let deferred2_0; | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.lint(ptr0, len0); | ||
deferred2_0 = ret[0]; | ||
deferred2_1 = ret[1]; | ||
return getStringFromWasm0(ret[0], ret[1]); | ||
wasm.lint(retptr, ptr0, len0); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
deferred2_0 = r0; | ||
deferred2_1 = r1; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); | ||
@@ -212,10 +268,17 @@ } | ||
/** | ||
* @param {string} params | ||
*/ | ||
* @param {string} params | ||
*/ | ||
module.exports.validate = function(params) { | ||
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.validate(ptr0, len0); | ||
if (ret[1]) { | ||
throw takeFromExternrefTable0(ret[0]); | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.validate(retptr, ptr0, len0); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
if (r1) { | ||
throw takeObject(r0); | ||
} | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
@@ -225,5 +288,5 @@ }; | ||
/** | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
module.exports.merge_schemas = function(input) { | ||
@@ -233,10 +296,15 @@ let deferred3_0; | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.merge_schemas(ptr0, len0); | ||
var ptr2 = ret[0]; | ||
var len2 = ret[1]; | ||
if (ret[3]) { | ||
wasm.merge_schemas(retptr, ptr0, len0); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); | ||
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true); | ||
var ptr2 = r0; | ||
var len2 = r1; | ||
if (r3) { | ||
ptr2 = 0; len2 = 0; | ||
throw takeFromExternrefTable0(ret[2]); | ||
throw takeObject(r2); | ||
} | ||
@@ -247,2 +315,3 @@ deferred3_0 = ptr2; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1); | ||
@@ -253,5 +322,5 @@ } | ||
/** | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
module.exports.native_types = function(input) { | ||
@@ -261,9 +330,13 @@ let deferred2_0; | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.native_types(ptr0, len0); | ||
deferred2_0 = ret[0]; | ||
deferred2_1 = ret[1]; | ||
return getStringFromWasm0(ret[0], ret[1]); | ||
wasm.native_types(retptr, ptr0, len0); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
deferred2_0 = r0; | ||
deferred2_1 = r1; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); | ||
@@ -274,5 +347,5 @@ } | ||
/** | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
* @param {string} input | ||
* @returns {string} | ||
*/ | ||
module.exports.referential_actions = function(input) { | ||
@@ -282,9 +355,13 @@ let deferred2_0; | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.referential_actions(ptr0, len0); | ||
deferred2_0 = ret[0]; | ||
deferred2_1 = ret[1]; | ||
return getStringFromWasm0(ret[0], ret[1]); | ||
wasm.referential_actions(retptr, ptr0, len0); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
deferred2_0 = r0; | ||
deferred2_1 = r1; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); | ||
@@ -295,4 +372,4 @@ } | ||
/** | ||
* @returns {string} | ||
*/ | ||
* @returns {string} | ||
*/ | ||
module.exports.preview_features = function() { | ||
@@ -302,7 +379,11 @@ let deferred1_0; | ||
try { | ||
const ret = wasm.preview_features(); | ||
deferred1_0 = ret[0]; | ||
deferred1_1 = ret[1]; | ||
return getStringFromWasm0(ret[0], ret[1]); | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.preview_features(retptr); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
deferred1_0 = r0; | ||
deferred1_1 = r1; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); | ||
@@ -313,10 +394,10 @@ } | ||
/** | ||
* The API is modelled on an LSP [completion | ||
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#completion-request-leftwards_arrow_with_hook). | ||
* Input and output are both JSON, the request being a `CompletionParams` object and the response | ||
* being a `CompletionList` object. | ||
* @param {string} schema_files | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
* The API is modelled on an LSP [completion | ||
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#completion-request-leftwards_arrow_with_hook). | ||
* Input and output are both JSON, the request being a `CompletionParams` object and the response | ||
* being a `CompletionList` object. | ||
* @param {string} schema_files | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
module.exports.text_document_completion = function(schema_files, params) { | ||
@@ -326,2 +407,3 @@ let deferred3_0; | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(schema_files, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
@@ -331,7 +413,10 @@ const len0 = WASM_VECTOR_LEN; | ||
const len1 = WASM_VECTOR_LEN; | ||
const ret = wasm.text_document_completion(ptr0, len0, ptr1, len1); | ||
deferred3_0 = ret[0]; | ||
deferred3_1 = ret[1]; | ||
return getStringFromWasm0(ret[0], ret[1]); | ||
wasm.text_document_completion(retptr, ptr0, len0, ptr1, len1); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
deferred3_0 = r0; | ||
deferred3_1 = r1; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1); | ||
@@ -342,11 +427,11 @@ } | ||
/** | ||
* This API is modelled on an LSP [code action | ||
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#code-action-request-leftwards_arrow_with_hook). | ||
* Input and output are both JSON, the request being a | ||
* `CodeActionParams` object and the response being a list of | ||
* `CodeActionOrCommand` objects. | ||
* @param {string} schema | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
* This API is modelled on an LSP [code action | ||
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#code-action-request-leftwards_arrow_with_hook). | ||
* Input and output are both JSON, the request being a | ||
* `CodeActionParams` object and the response being a list of | ||
* `CodeActionOrCommand` objects. | ||
* @param {string} schema | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
module.exports.code_actions = function(schema, params) { | ||
@@ -356,2 +441,3 @@ let deferred3_0; | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
@@ -361,7 +447,10 @@ const len0 = WASM_VECTOR_LEN; | ||
const len1 = WASM_VECTOR_LEN; | ||
const ret = wasm.code_actions(ptr0, len0, ptr1, len1); | ||
deferred3_0 = ret[0]; | ||
deferred3_1 = ret[1]; | ||
return getStringFromWasm0(ret[0], ret[1]); | ||
wasm.code_actions(retptr, ptr0, len0, ptr1, len1); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
deferred3_0 = r0; | ||
deferred3_1 = r1; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1); | ||
@@ -372,11 +461,11 @@ } | ||
/** | ||
* This API is modelled on an LSP [references | ||
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#find-references-request-leftwards_arrow_with_hook). | ||
* Input and output are both JSON, the request being a | ||
* `CodeActionParams` object and the response being a list of | ||
* `CodeActionOrCommand` objects. | ||
* @param {string} schema | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
* This API is modelled on an LSP [references | ||
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#find-references-request-leftwards_arrow_with_hook). | ||
* Input and output are both JSON, the request being a | ||
* `CodeActionParams` object and the response being a list of | ||
* `CodeActionOrCommand` objects. | ||
* @param {string} schema | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
module.exports.references = function(schema, params) { | ||
@@ -386,2 +475,3 @@ let deferred3_0; | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
@@ -391,7 +481,10 @@ const len0 = WASM_VECTOR_LEN; | ||
const len1 = WASM_VECTOR_LEN; | ||
const ret = wasm.references(ptr0, len0, ptr1, len1); | ||
deferred3_0 = ret[0]; | ||
deferred3_1 = ret[1]; | ||
return getStringFromWasm0(ret[0], ret[1]); | ||
wasm.references(retptr, ptr0, len0, ptr1, len1); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
deferred3_0 = r0; | ||
deferred3_1 = r1; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1); | ||
@@ -402,9 +495,9 @@ } | ||
/** | ||
* This api is modelled on an LSP [hover request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#hover-request-leftwards_arrow_with_hook). | ||
* Input and output are both JSON, the request being a `HoverParams` object | ||
* and the response being a `Hover` object. | ||
* @param {string} schema_files | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
* This api is modelled on an LSP [hover request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#hover-request-leftwards_arrow_with_hook). | ||
* Input and output are both JSON, the request being a `HoverParams` object | ||
* and the response being a `Hover` object. | ||
* @param {string} schema_files | ||
* @param {string} params | ||
* @returns {string} | ||
*/ | ||
module.exports.hover = function(schema_files, params) { | ||
@@ -414,2 +507,3 @@ let deferred3_0; | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(schema_files, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
@@ -419,7 +513,10 @@ const len0 = WASM_VECTOR_LEN; | ||
const len1 = WASM_VECTOR_LEN; | ||
const ret = wasm.hover(ptr0, len0, ptr1, len1); | ||
deferred3_0 = ret[0]; | ||
deferred3_1 = ret[1]; | ||
return getStringFromWasm0(ret[0], ret[1]); | ||
wasm.hover(retptr, ptr0, len0, ptr1, len1); | ||
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); | ||
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); | ||
deferred3_0 = r0; | ||
deferred3_1 = r1; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1); | ||
@@ -430,5 +527,5 @@ } | ||
/** | ||
* Trigger a panic inside the wasm module. This is only useful in development for testing panic | ||
* handling. | ||
*/ | ||
* Trigger a panic inside the wasm module. This is only useful in development for testing panic | ||
* handling. | ||
*/ | ||
module.exports.debug_panic = function() { | ||
@@ -438,3 +535,3 @@ wasm.debug_panic(); | ||
module.exports.__wbg_setmessage_f22ac4a6869ee695 = function(arg0, arg1) { | ||
module.exports.__wbg_setmessage_e113e9fee2d41bd4 = function(arg0, arg1) { | ||
global.PRISMA_WASM_PANIC_REGISTRY.set_message(getStringFromWasm0(arg0, arg1)); | ||
@@ -445,16 +542,5 @@ }; | ||
const ret = new Error(getStringFromWasm0(arg0, arg1)); | ||
return ret; | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbindgen_init_externref_table = function() { | ||
const table = wasm.__wbindgen_export_0; | ||
const offset = table.grow(4); | ||
table.set(0, undefined); | ||
table.set(offset + 0, undefined); | ||
table.set(offset + 1, null); | ||
table.set(offset + 2, true); | ||
table.set(offset + 3, false); | ||
; | ||
}; | ||
module.exports.__wbindgen_throw = function(arg0, arg1) { | ||
@@ -472,3 +558,1 @@ throw new Error(getStringFromWasm0(arg0, arg1)); | ||
wasm.__wbindgen_start(); | ||
Sorry, the diff of this file is not supported yet
2973898
2.41%592
25.96%