@prisma/prisma-schema-wasm 7.2.0-2.e042035cb3c6e24bbedc3e886c89675fbd6145e1 → 7.2.0-4.0c8ef2ce45c83248ab3df073180d5eda9e8be7a3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/prisma_schema_build.d.ts +22 -22
- package/src/prisma_schema_build.js +147 -147
- package/src/prisma_schema_build_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/prisma-schema-wasm",
|
|
3
|
-
"version": "7.2.0-
|
|
3
|
+
"version": "7.2.0-4.0c8ef2ce45c83248ab3df073180d5eda9e8be7a3",
|
|
4
4
|
"description": "The Wasm package for prisma-fmt",
|
|
5
5
|
"main": "src/prisma_schema_build.js",
|
|
6
6
|
"scripts": {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function
|
|
3
|
+
export function native_types(input: string): string;
|
|
4
|
+
export function preview_features(): string;
|
|
5
|
+
export function referential_actions(input: string): string;
|
|
4
6
|
/**
|
|
5
7
|
* This API is modelled on an LSP [code action
|
|
6
8
|
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#code-action-request-leftwards_arrow_with_hook).
|
|
@@ -9,13 +11,14 @@ export function format(schema: string, params: string): string;
|
|
|
9
11
|
* `CodeActionOrCommand` objects.
|
|
10
12
|
*/
|
|
11
13
|
export function code_actions(schema: string, params: string): string;
|
|
14
|
+
export function merge_schemas(input: string): string;
|
|
15
|
+
export function format(schema: string, params: string): string;
|
|
16
|
+
export function validate(params: string): void;
|
|
12
17
|
export function get_datamodel(params: string): string;
|
|
13
18
|
/**
|
|
14
|
-
*
|
|
15
|
-
* Input and output are both JSON, the request being a `HoverParams` object
|
|
16
|
-
* and the response being a `Hover` object.
|
|
19
|
+
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_dmmf.html
|
|
17
20
|
*/
|
|
18
|
-
export function
|
|
21
|
+
export function get_dmmf(params: string): string;
|
|
19
22
|
/**
|
|
20
23
|
* This API is modelled on an LSP [references
|
|
21
24
|
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#find-references-request-leftwards_arrow_with_hook).
|
|
@@ -24,25 +27,12 @@ export function hover(schema_files: string, params: string): string;
|
|
|
24
27
|
* `CodeActionOrCommand` objects.
|
|
25
28
|
*/
|
|
26
29
|
export function references(schema: string, params: string): string;
|
|
27
|
-
export function referential_actions(input: string): string;
|
|
28
|
-
export function merge_schemas(input: string): string;
|
|
29
|
-
/**
|
|
30
|
-
* Trigger a panic inside the wasm module. This is only useful in development for testing panic
|
|
31
|
-
* handling.
|
|
32
|
-
*/
|
|
33
|
-
export function debug_panic(): void;
|
|
34
|
-
/**
|
|
35
|
-
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_config.html
|
|
36
|
-
*/
|
|
37
|
-
export function get_config(params: string): string;
|
|
38
|
-
export function lint(input: string): string;
|
|
39
|
-
export function native_types(input: string): string;
|
|
40
|
-
export function preview_features(): string;
|
|
41
30
|
/**
|
|
42
|
-
*
|
|
31
|
+
* 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).
|
|
32
|
+
* Input and output are both JSON, the request being a `HoverParams` object
|
|
33
|
+
* and the response being a `Hover` object.
|
|
43
34
|
*/
|
|
44
|
-
export function
|
|
45
|
-
export function validate(params: string): void;
|
|
35
|
+
export function hover(schema_files: string, params: string): string;
|
|
46
36
|
/**
|
|
47
37
|
* The API is modelled on an LSP [completion
|
|
48
38
|
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#completion-request-leftwards_arrow_with_hook).
|
|
@@ -50,3 +40,13 @@ export function validate(params: string): void;
|
|
|
50
40
|
* being a `CompletionList` object.
|
|
51
41
|
*/
|
|
52
42
|
export function text_document_completion(schema_files: string, params: string): string;
|
|
43
|
+
/**
|
|
44
|
+
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_config.html
|
|
45
|
+
*/
|
|
46
|
+
export function get_config(params: string): string;
|
|
47
|
+
/**
|
|
48
|
+
* Trigger a panic inside the wasm module. This is only useful in development for testing panic
|
|
49
|
+
* handling.
|
|
50
|
+
*/
|
|
51
|
+
export function debug_panic(): void;
|
|
52
|
+
export function lint(input: string): string;
|
|
@@ -78,24 +78,56 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
78
78
|
return ptr;
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
|
-
* @param {string}
|
|
82
|
-
* @param {string} params
|
|
81
|
+
* @param {string} input
|
|
83
82
|
* @returns {string}
|
|
84
83
|
*/
|
|
85
|
-
exports.
|
|
86
|
-
let
|
|
87
|
-
let
|
|
84
|
+
exports.native_types = function(input) {
|
|
85
|
+
let deferred2_0;
|
|
86
|
+
let deferred2_1;
|
|
88
87
|
try {
|
|
89
|
-
const ptr0 = passStringToWasm0(
|
|
88
|
+
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
90
89
|
const len0 = WASM_VECTOR_LEN;
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
deferred3_0 = ret[0];
|
|
95
|
-
deferred3_1 = ret[1];
|
|
90
|
+
const ret = wasm.native_types(ptr0, len0);
|
|
91
|
+
deferred2_0 = ret[0];
|
|
92
|
+
deferred2_1 = ret[1];
|
|
96
93
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
97
94
|
} finally {
|
|
98
|
-
wasm.__wbindgen_free(
|
|
95
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @returns {string}
|
|
101
|
+
*/
|
|
102
|
+
exports.preview_features = function() {
|
|
103
|
+
let deferred1_0;
|
|
104
|
+
let deferred1_1;
|
|
105
|
+
try {
|
|
106
|
+
const ret = wasm.preview_features();
|
|
107
|
+
deferred1_0 = ret[0];
|
|
108
|
+
deferred1_1 = ret[1];
|
|
109
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
110
|
+
} finally {
|
|
111
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @param {string} input
|
|
117
|
+
* @returns {string}
|
|
118
|
+
*/
|
|
119
|
+
exports.referential_actions = function(input) {
|
|
120
|
+
let deferred2_0;
|
|
121
|
+
let deferred2_1;
|
|
122
|
+
try {
|
|
123
|
+
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
124
|
+
const len0 = WASM_VECTOR_LEN;
|
|
125
|
+
const ret = wasm.referential_actions(ptr0, len0);
|
|
126
|
+
deferred2_0 = ret[0];
|
|
127
|
+
deferred2_1 = ret[1];
|
|
128
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
129
|
+
} finally {
|
|
130
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
99
131
|
}
|
|
100
132
|
};
|
|
101
133
|
|
|
@@ -132,16 +164,16 @@ function takeFromExternrefTable0(idx) {
|
|
|
132
164
|
return value;
|
|
133
165
|
}
|
|
134
166
|
/**
|
|
135
|
-
* @param {string}
|
|
167
|
+
* @param {string} input
|
|
136
168
|
* @returns {string}
|
|
137
169
|
*/
|
|
138
|
-
exports.
|
|
170
|
+
exports.merge_schemas = function(input) {
|
|
139
171
|
let deferred3_0;
|
|
140
172
|
let deferred3_1;
|
|
141
173
|
try {
|
|
142
|
-
const ptr0 = passStringToWasm0(
|
|
174
|
+
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
143
175
|
const len0 = WASM_VECTOR_LEN;
|
|
144
|
-
const ret = wasm.
|
|
176
|
+
const ret = wasm.merge_schemas(ptr0, len0);
|
|
145
177
|
var ptr2 = ret[0];
|
|
146
178
|
var len2 = ret[1];
|
|
147
179
|
if (ret[3]) {
|
|
@@ -157,41 +189,11 @@ exports.get_datamodel = function(params) {
|
|
|
157
189
|
};
|
|
158
190
|
|
|
159
191
|
/**
|
|
160
|
-
* 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).
|
|
161
|
-
* Input and output are both JSON, the request being a `HoverParams` object
|
|
162
|
-
* and the response being a `Hover` object.
|
|
163
|
-
* @param {string} schema_files
|
|
164
|
-
* @param {string} params
|
|
165
|
-
* @returns {string}
|
|
166
|
-
*/
|
|
167
|
-
exports.hover = function(schema_files, params) {
|
|
168
|
-
let deferred3_0;
|
|
169
|
-
let deferred3_1;
|
|
170
|
-
try {
|
|
171
|
-
const ptr0 = passStringToWasm0(schema_files, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
172
|
-
const len0 = WASM_VECTOR_LEN;
|
|
173
|
-
const ptr1 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
174
|
-
const len1 = WASM_VECTOR_LEN;
|
|
175
|
-
const ret = wasm.hover(ptr0, len0, ptr1, len1);
|
|
176
|
-
deferred3_0 = ret[0];
|
|
177
|
-
deferred3_1 = ret[1];
|
|
178
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
179
|
-
} finally {
|
|
180
|
-
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* This API is modelled on an LSP [references
|
|
186
|
-
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#find-references-request-leftwards_arrow_with_hook).
|
|
187
|
-
* Input and output are both JSON, the request being a
|
|
188
|
-
* `CodeActionParams` object and the response being a list of
|
|
189
|
-
* `CodeActionOrCommand` objects.
|
|
190
192
|
* @param {string} schema
|
|
191
193
|
* @param {string} params
|
|
192
194
|
* @returns {string}
|
|
193
195
|
*/
|
|
194
|
-
exports.
|
|
196
|
+
exports.format = function(schema, params) {
|
|
195
197
|
let deferred3_0;
|
|
196
198
|
let deferred3_1;
|
|
197
199
|
try {
|
|
@@ -199,7 +201,7 @@ exports.references = function(schema, params) {
|
|
|
199
201
|
const len0 = WASM_VECTOR_LEN;
|
|
200
202
|
const ptr1 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
201
203
|
const len1 = WASM_VECTOR_LEN;
|
|
202
|
-
const ret = wasm.
|
|
204
|
+
const ret = wasm.format(ptr0, len0, ptr1, len1);
|
|
203
205
|
deferred3_0 = ret[0];
|
|
204
206
|
deferred3_1 = ret[1];
|
|
205
207
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -209,35 +211,28 @@ exports.references = function(schema, params) {
|
|
|
209
211
|
};
|
|
210
212
|
|
|
211
213
|
/**
|
|
212
|
-
* @param {string}
|
|
213
|
-
* @returns {string}
|
|
214
|
+
* @param {string} params
|
|
214
215
|
*/
|
|
215
|
-
exports.
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
const ret = wasm.referential_actions(ptr0, len0);
|
|
222
|
-
deferred2_0 = ret[0];
|
|
223
|
-
deferred2_1 = ret[1];
|
|
224
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
225
|
-
} finally {
|
|
226
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
216
|
+
exports.validate = function(params) {
|
|
217
|
+
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
218
|
+
const len0 = WASM_VECTOR_LEN;
|
|
219
|
+
const ret = wasm.validate(ptr0, len0);
|
|
220
|
+
if (ret[1]) {
|
|
221
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
227
222
|
}
|
|
228
223
|
};
|
|
229
224
|
|
|
230
225
|
/**
|
|
231
|
-
* @param {string}
|
|
226
|
+
* @param {string} params
|
|
232
227
|
* @returns {string}
|
|
233
228
|
*/
|
|
234
|
-
exports.
|
|
229
|
+
exports.get_datamodel = function(params) {
|
|
235
230
|
let deferred3_0;
|
|
236
231
|
let deferred3_1;
|
|
237
232
|
try {
|
|
238
|
-
const ptr0 = passStringToWasm0(
|
|
233
|
+
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
239
234
|
const len0 = WASM_VECTOR_LEN;
|
|
240
|
-
const ret = wasm.
|
|
235
|
+
const ret = wasm.get_datamodel(ptr0, len0);
|
|
241
236
|
var ptr2 = ret[0];
|
|
242
237
|
var len2 = ret[1];
|
|
243
238
|
if (ret[3]) {
|
|
@@ -253,148 +248,153 @@ exports.merge_schemas = function(input) {
|
|
|
253
248
|
};
|
|
254
249
|
|
|
255
250
|
/**
|
|
256
|
-
*
|
|
257
|
-
* handling.
|
|
258
|
-
*/
|
|
259
|
-
exports.debug_panic = function() {
|
|
260
|
-
wasm.debug_panic();
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_config.html
|
|
251
|
+
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_dmmf.html
|
|
265
252
|
* @param {string} params
|
|
266
253
|
* @returns {string}
|
|
267
254
|
*/
|
|
268
|
-
exports.
|
|
269
|
-
let
|
|
270
|
-
let
|
|
255
|
+
exports.get_dmmf = function(params) {
|
|
256
|
+
let deferred3_0;
|
|
257
|
+
let deferred3_1;
|
|
271
258
|
try {
|
|
272
259
|
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
273
260
|
const len0 = WASM_VECTOR_LEN;
|
|
274
|
-
const ret = wasm.
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
261
|
+
const ret = wasm.get_dmmf(ptr0, len0);
|
|
262
|
+
var ptr2 = ret[0];
|
|
263
|
+
var len2 = ret[1];
|
|
264
|
+
if (ret[3]) {
|
|
265
|
+
ptr2 = 0; len2 = 0;
|
|
266
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
267
|
+
}
|
|
268
|
+
deferred3_0 = ptr2;
|
|
269
|
+
deferred3_1 = len2;
|
|
270
|
+
return getStringFromWasm0(ptr2, len2);
|
|
278
271
|
} finally {
|
|
279
|
-
wasm.__wbindgen_free(
|
|
272
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
280
273
|
}
|
|
281
274
|
};
|
|
282
275
|
|
|
283
276
|
/**
|
|
284
|
-
*
|
|
277
|
+
* This API is modelled on an LSP [references
|
|
278
|
+
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#find-references-request-leftwards_arrow_with_hook).
|
|
279
|
+
* Input and output are both JSON, the request being a
|
|
280
|
+
* `CodeActionParams` object and the response being a list of
|
|
281
|
+
* `CodeActionOrCommand` objects.
|
|
282
|
+
* @param {string} schema
|
|
283
|
+
* @param {string} params
|
|
285
284
|
* @returns {string}
|
|
286
285
|
*/
|
|
287
|
-
exports.
|
|
288
|
-
let
|
|
289
|
-
let
|
|
286
|
+
exports.references = function(schema, params) {
|
|
287
|
+
let deferred3_0;
|
|
288
|
+
let deferred3_1;
|
|
290
289
|
try {
|
|
291
|
-
const ptr0 = passStringToWasm0(
|
|
290
|
+
const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
292
291
|
const len0 = WASM_VECTOR_LEN;
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
|
|
292
|
+
const ptr1 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
293
|
+
const len1 = WASM_VECTOR_LEN;
|
|
294
|
+
const ret = wasm.references(ptr0, len0, ptr1, len1);
|
|
295
|
+
deferred3_0 = ret[0];
|
|
296
|
+
deferred3_1 = ret[1];
|
|
296
297
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
297
298
|
} finally {
|
|
298
|
-
wasm.__wbindgen_free(
|
|
299
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
299
300
|
}
|
|
300
301
|
};
|
|
301
302
|
|
|
302
303
|
/**
|
|
303
|
-
*
|
|
304
|
+
* 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).
|
|
305
|
+
* Input and output are both JSON, the request being a `HoverParams` object
|
|
306
|
+
* and the response being a `Hover` object.
|
|
307
|
+
* @param {string} schema_files
|
|
308
|
+
* @param {string} params
|
|
304
309
|
* @returns {string}
|
|
305
310
|
*/
|
|
306
|
-
exports.
|
|
307
|
-
let
|
|
308
|
-
let
|
|
311
|
+
exports.hover = function(schema_files, params) {
|
|
312
|
+
let deferred3_0;
|
|
313
|
+
let deferred3_1;
|
|
309
314
|
try {
|
|
310
|
-
const ptr0 = passStringToWasm0(
|
|
315
|
+
const ptr0 = passStringToWasm0(schema_files, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
311
316
|
const len0 = WASM_VECTOR_LEN;
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
-
|
|
317
|
+
const ptr1 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
318
|
+
const len1 = WASM_VECTOR_LEN;
|
|
319
|
+
const ret = wasm.hover(ptr0, len0, ptr1, len1);
|
|
320
|
+
deferred3_0 = ret[0];
|
|
321
|
+
deferred3_1 = ret[1];
|
|
315
322
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
316
323
|
} finally {
|
|
317
|
-
wasm.__wbindgen_free(
|
|
324
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
318
325
|
}
|
|
319
326
|
};
|
|
320
327
|
|
|
321
328
|
/**
|
|
329
|
+
* The API is modelled on an LSP [completion
|
|
330
|
+
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#completion-request-leftwards_arrow_with_hook).
|
|
331
|
+
* Input and output are both JSON, the request being a `CompletionParams` object and the response
|
|
332
|
+
* being a `CompletionList` object.
|
|
333
|
+
* @param {string} schema_files
|
|
334
|
+
* @param {string} params
|
|
322
335
|
* @returns {string}
|
|
323
336
|
*/
|
|
324
|
-
exports.
|
|
325
|
-
let
|
|
326
|
-
let
|
|
337
|
+
exports.text_document_completion = function(schema_files, params) {
|
|
338
|
+
let deferred3_0;
|
|
339
|
+
let deferred3_1;
|
|
327
340
|
try {
|
|
328
|
-
const
|
|
329
|
-
|
|
330
|
-
|
|
341
|
+
const ptr0 = passStringToWasm0(schema_files, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
342
|
+
const len0 = WASM_VECTOR_LEN;
|
|
343
|
+
const ptr1 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
344
|
+
const len1 = WASM_VECTOR_LEN;
|
|
345
|
+
const ret = wasm.text_document_completion(ptr0, len0, ptr1, len1);
|
|
346
|
+
deferred3_0 = ret[0];
|
|
347
|
+
deferred3_1 = ret[1];
|
|
331
348
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
332
349
|
} finally {
|
|
333
|
-
wasm.__wbindgen_free(
|
|
350
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
334
351
|
}
|
|
335
352
|
};
|
|
336
353
|
|
|
337
354
|
/**
|
|
338
|
-
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.
|
|
355
|
+
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_config.html
|
|
339
356
|
* @param {string} params
|
|
340
357
|
* @returns {string}
|
|
341
358
|
*/
|
|
342
|
-
exports.
|
|
343
|
-
let
|
|
344
|
-
let
|
|
359
|
+
exports.get_config = function(params) {
|
|
360
|
+
let deferred2_0;
|
|
361
|
+
let deferred2_1;
|
|
345
362
|
try {
|
|
346
363
|
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
347
364
|
const len0 = WASM_VECTOR_LEN;
|
|
348
|
-
const ret = wasm.
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
ptr2 = 0; len2 = 0;
|
|
353
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
354
|
-
}
|
|
355
|
-
deferred3_0 = ptr2;
|
|
356
|
-
deferred3_1 = len2;
|
|
357
|
-
return getStringFromWasm0(ptr2, len2);
|
|
365
|
+
const ret = wasm.get_config(ptr0, len0);
|
|
366
|
+
deferred2_0 = ret[0];
|
|
367
|
+
deferred2_1 = ret[1];
|
|
368
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
358
369
|
} finally {
|
|
359
|
-
wasm.__wbindgen_free(
|
|
370
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
360
371
|
}
|
|
361
372
|
};
|
|
362
373
|
|
|
363
374
|
/**
|
|
364
|
-
*
|
|
375
|
+
* Trigger a panic inside the wasm module. This is only useful in development for testing panic
|
|
376
|
+
* handling.
|
|
365
377
|
*/
|
|
366
|
-
exports.
|
|
367
|
-
|
|
368
|
-
const len0 = WASM_VECTOR_LEN;
|
|
369
|
-
const ret = wasm.validate(ptr0, len0);
|
|
370
|
-
if (ret[1]) {
|
|
371
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
372
|
-
}
|
|
378
|
+
exports.debug_panic = function() {
|
|
379
|
+
wasm.debug_panic();
|
|
373
380
|
};
|
|
374
381
|
|
|
375
382
|
/**
|
|
376
|
-
*
|
|
377
|
-
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#completion-request-leftwards_arrow_with_hook).
|
|
378
|
-
* Input and output are both JSON, the request being a `CompletionParams` object and the response
|
|
379
|
-
* being a `CompletionList` object.
|
|
380
|
-
* @param {string} schema_files
|
|
381
|
-
* @param {string} params
|
|
383
|
+
* @param {string} input
|
|
382
384
|
* @returns {string}
|
|
383
385
|
*/
|
|
384
|
-
exports.
|
|
385
|
-
let
|
|
386
|
-
let
|
|
386
|
+
exports.lint = function(input) {
|
|
387
|
+
let deferred2_0;
|
|
388
|
+
let deferred2_1;
|
|
387
389
|
try {
|
|
388
|
-
const ptr0 = passStringToWasm0(
|
|
390
|
+
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
389
391
|
const len0 = WASM_VECTOR_LEN;
|
|
390
|
-
const
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
deferred3_0 = ret[0];
|
|
394
|
-
deferred3_1 = ret[1];
|
|
392
|
+
const ret = wasm.lint(ptr0, len0);
|
|
393
|
+
deferred2_0 = ret[0];
|
|
394
|
+
deferred2_1 = ret[1];
|
|
395
395
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
396
396
|
} finally {
|
|
397
|
-
wasm.__wbindgen_free(
|
|
397
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
398
398
|
}
|
|
399
399
|
};
|
|
400
400
|
|
|
Binary file
|