@prisma/prisma-schema-wasm 7.1.1-2.208865a6827c112b9536712c609821f0f6bf632f → 7.2.0-2.e042035cb3c6e24bbedc3e886c89675fbd6145e1
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/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://packagephobia.com/result?p=@prisma/prisma-schema-wasm)
|
|
6
6
|
|
|
7
7
|
This directory only contains build logic to package the `prisma-fmt` engine
|
|
8
|
-
into a Node package as a
|
|
8
|
+
into a Node package as a Wasm module. All the functionality is implemented in
|
|
9
9
|
other parts of prisma-engines.
|
|
10
10
|
|
|
11
11
|
The published NPM package is internal to Prisma. Its API will break without prior warning.
|
|
@@ -48,4 +48,4 @@ cargo install -f wasm-bindgen-cli@version
|
|
|
48
48
|
This script has the following expectations:
|
|
49
49
|
- `language-tools` is in the same dir as `prisma-engines`
|
|
50
50
|
- i.e. `dir/{prisma-engines,language-tools}`
|
|
51
|
-
- it's run in the `prisma-engines` root folder
|
|
51
|
+
- it's run in the `prisma-engines` root folder
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/prisma-schema-wasm",
|
|
3
|
-
"version": "7.
|
|
4
|
-
"description": "The
|
|
3
|
+
"version": "7.2.0-2.e042035cb3c6e24bbedc3e886c89675fbd6145e1",
|
|
4
|
+
"description": "The Wasm package for prisma-fmt",
|
|
5
5
|
"main": "src/prisma_schema_build.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -1,28 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export function format(schema: string, params: string): string;
|
|
4
|
-
/**
|
|
5
|
-
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_config.html
|
|
6
|
-
*/
|
|
7
|
-
export function get_config(params: string): string;
|
|
8
|
-
/**
|
|
9
|
-
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_dmmf.html
|
|
10
|
-
*/
|
|
11
|
-
export function get_dmmf(params: string): string;
|
|
12
|
-
export function get_datamodel(params: string): string;
|
|
13
|
-
export function lint(input: string): string;
|
|
14
|
-
export function validate(params: string): void;
|
|
15
|
-
export function merge_schemas(input: string): string;
|
|
16
|
-
export function native_types(input: string): string;
|
|
17
|
-
export function referential_actions(input: string): string;
|
|
18
|
-
export function preview_features(): string;
|
|
19
|
-
/**
|
|
20
|
-
* The API is modelled on an LSP [completion
|
|
21
|
-
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#completion-request-leftwards_arrow_with_hook).
|
|
22
|
-
* Input and output are both JSON, the request being a `CompletionParams` object and the response
|
|
23
|
-
* being a `CompletionList` object.
|
|
24
|
-
*/
|
|
25
|
-
export function text_document_completion(schema_files: string, params: string): string;
|
|
26
4
|
/**
|
|
27
5
|
* This API is modelled on an LSP [code action
|
|
28
6
|
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#code-action-request-leftwards_arrow_with_hook).
|
|
@@ -31,6 +9,13 @@ export function text_document_completion(schema_files: string, params: string):
|
|
|
31
9
|
* `CodeActionOrCommand` objects.
|
|
32
10
|
*/
|
|
33
11
|
export function code_actions(schema: string, params: string): string;
|
|
12
|
+
export function get_datamodel(params: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* 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).
|
|
15
|
+
* Input and output are both JSON, the request being a `HoverParams` object
|
|
16
|
+
* and the response being a `Hover` object.
|
|
17
|
+
*/
|
|
18
|
+
export function hover(schema_files: string, params: string): string;
|
|
34
19
|
/**
|
|
35
20
|
* This API is modelled on an LSP [references
|
|
36
21
|
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#find-references-request-leftwards_arrow_with_hook).
|
|
@@ -39,14 +24,29 @@ export function code_actions(schema: string, params: string): string;
|
|
|
39
24
|
* `CodeActionOrCommand` objects.
|
|
40
25
|
*/
|
|
41
26
|
export function references(schema: string, params: string): string;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
* Input and output are both JSON, the request being a `HoverParams` object
|
|
45
|
-
* and the response being a `Hover` object.
|
|
46
|
-
*/
|
|
47
|
-
export function hover(schema_files: string, params: string): string;
|
|
27
|
+
export function referential_actions(input: string): string;
|
|
28
|
+
export function merge_schemas(input: string): string;
|
|
48
29
|
/**
|
|
49
30
|
* Trigger a panic inside the wasm module. This is only useful in development for testing panic
|
|
50
31
|
* handling.
|
|
51
32
|
*/
|
|
52
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
|
+
/**
|
|
42
|
+
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_dmmf.html
|
|
43
|
+
*/
|
|
44
|
+
export function get_dmmf(params: string): string;
|
|
45
|
+
export function validate(params: string): void;
|
|
46
|
+
/**
|
|
47
|
+
* The API is modelled on an LSP [completion
|
|
48
|
+
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#completion-request-leftwards_arrow_with_hook).
|
|
49
|
+
* Input and output are both JSON, the request being a `CompletionParams` object and the response
|
|
50
|
+
* being a `CompletionList` object.
|
|
51
|
+
*/
|
|
52
|
+
export function text_document_completion(schema_files: string, params: string): string;
|
|
@@ -100,22 +100,29 @@ exports.format = function(schema, params) {
|
|
|
100
100
|
};
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
103
|
+
* This API is modelled on an LSP [code action
|
|
104
|
+
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#code-action-request-leftwards_arrow_with_hook).
|
|
105
|
+
* Input and output are both JSON, the request being a
|
|
106
|
+
* `CodeActionParams` object and the response being a list of
|
|
107
|
+
* `CodeActionOrCommand` objects.
|
|
108
|
+
* @param {string} schema
|
|
104
109
|
* @param {string} params
|
|
105
110
|
* @returns {string}
|
|
106
111
|
*/
|
|
107
|
-
exports.
|
|
108
|
-
let
|
|
109
|
-
let
|
|
112
|
+
exports.code_actions = function(schema, params) {
|
|
113
|
+
let deferred3_0;
|
|
114
|
+
let deferred3_1;
|
|
110
115
|
try {
|
|
111
|
-
const ptr0 = passStringToWasm0(
|
|
116
|
+
const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
112
117
|
const len0 = WASM_VECTOR_LEN;
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
118
|
+
const ptr1 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
119
|
+
const len1 = WASM_VECTOR_LEN;
|
|
120
|
+
const ret = wasm.code_actions(ptr0, len0, ptr1, len1);
|
|
121
|
+
deferred3_0 = ret[0];
|
|
122
|
+
deferred3_1 = ret[1];
|
|
116
123
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
117
124
|
} finally {
|
|
118
|
-
wasm.__wbindgen_free(
|
|
125
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
119
126
|
}
|
|
120
127
|
};
|
|
121
128
|
|
|
@@ -125,17 +132,16 @@ function takeFromExternrefTable0(idx) {
|
|
|
125
132
|
return value;
|
|
126
133
|
}
|
|
127
134
|
/**
|
|
128
|
-
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_dmmf.html
|
|
129
135
|
* @param {string} params
|
|
130
136
|
* @returns {string}
|
|
131
137
|
*/
|
|
132
|
-
exports.
|
|
138
|
+
exports.get_datamodel = function(params) {
|
|
133
139
|
let deferred3_0;
|
|
134
140
|
let deferred3_1;
|
|
135
141
|
try {
|
|
136
142
|
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
137
143
|
const len0 = WASM_VECTOR_LEN;
|
|
138
|
-
const ret = wasm.
|
|
144
|
+
const ret = wasm.get_datamodel(ptr0, len0);
|
|
139
145
|
var ptr2 = ret[0];
|
|
140
146
|
var len2 = ret[1];
|
|
141
147
|
if (ret[3]) {
|
|
@@ -151,25 +157,52 @@ exports.get_dmmf = function(params) {
|
|
|
151
157
|
};
|
|
152
158
|
|
|
153
159
|
/**
|
|
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
|
|
154
164
|
* @param {string} params
|
|
155
165
|
* @returns {string}
|
|
156
166
|
*/
|
|
157
|
-
exports.
|
|
167
|
+
exports.hover = function(schema_files, params) {
|
|
158
168
|
let deferred3_0;
|
|
159
169
|
let deferred3_1;
|
|
160
170
|
try {
|
|
161
|
-
const ptr0 = passStringToWasm0(
|
|
171
|
+
const ptr0 = passStringToWasm0(schema_files, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
162
172
|
const len0 = WASM_VECTOR_LEN;
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
deferred3_0
|
|
171
|
-
|
|
172
|
-
|
|
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
|
+
* @param {string} schema
|
|
191
|
+
* @param {string} params
|
|
192
|
+
* @returns {string}
|
|
193
|
+
*/
|
|
194
|
+
exports.references = function(schema, params) {
|
|
195
|
+
let deferred3_0;
|
|
196
|
+
let deferred3_1;
|
|
197
|
+
try {
|
|
198
|
+
const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
199
|
+
const len0 = WASM_VECTOR_LEN;
|
|
200
|
+
const ptr1 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
201
|
+
const len1 = WASM_VECTOR_LEN;
|
|
202
|
+
const ret = wasm.references(ptr0, len0, ptr1, len1);
|
|
203
|
+
deferred3_0 = ret[0];
|
|
204
|
+
deferred3_1 = ret[1];
|
|
205
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
173
206
|
} finally {
|
|
174
207
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
175
208
|
}
|
|
@@ -179,13 +212,13 @@ exports.get_datamodel = function(params) {
|
|
|
179
212
|
* @param {string} input
|
|
180
213
|
* @returns {string}
|
|
181
214
|
*/
|
|
182
|
-
exports.
|
|
215
|
+
exports.referential_actions = function(input) {
|
|
183
216
|
let deferred2_0;
|
|
184
217
|
let deferred2_1;
|
|
185
218
|
try {
|
|
186
219
|
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
187
220
|
const len0 = WASM_VECTOR_LEN;
|
|
188
|
-
const ret = wasm.
|
|
221
|
+
const ret = wasm.referential_actions(ptr0, len0);
|
|
189
222
|
deferred2_0 = ret[0];
|
|
190
223
|
deferred2_1 = ret[1];
|
|
191
224
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -194,18 +227,6 @@ exports.lint = function(input) {
|
|
|
194
227
|
}
|
|
195
228
|
};
|
|
196
229
|
|
|
197
|
-
/**
|
|
198
|
-
* @param {string} params
|
|
199
|
-
*/
|
|
200
|
-
exports.validate = function(params) {
|
|
201
|
-
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
202
|
-
const len0 = WASM_VECTOR_LEN;
|
|
203
|
-
const ret = wasm.validate(ptr0, len0);
|
|
204
|
-
if (ret[1]) {
|
|
205
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
|
|
209
230
|
/**
|
|
210
231
|
* @param {string} input
|
|
211
232
|
* @returns {string}
|
|
@@ -232,16 +253,25 @@ exports.merge_schemas = function(input) {
|
|
|
232
253
|
};
|
|
233
254
|
|
|
234
255
|
/**
|
|
235
|
-
*
|
|
256
|
+
* Trigger a panic inside the wasm module. This is only useful in development for testing panic
|
|
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
|
|
265
|
+
* @param {string} params
|
|
236
266
|
* @returns {string}
|
|
237
267
|
*/
|
|
238
|
-
exports.
|
|
268
|
+
exports.get_config = function(params) {
|
|
239
269
|
let deferred2_0;
|
|
240
270
|
let deferred2_1;
|
|
241
271
|
try {
|
|
242
|
-
const ptr0 = passStringToWasm0(
|
|
272
|
+
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
243
273
|
const len0 = WASM_VECTOR_LEN;
|
|
244
|
-
const ret = wasm.
|
|
274
|
+
const ret = wasm.get_config(ptr0, len0);
|
|
245
275
|
deferred2_0 = ret[0];
|
|
246
276
|
deferred2_1 = ret[1];
|
|
247
277
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -254,13 +284,13 @@ exports.native_types = function(input) {
|
|
|
254
284
|
* @param {string} input
|
|
255
285
|
* @returns {string}
|
|
256
286
|
*/
|
|
257
|
-
exports.
|
|
287
|
+
exports.lint = function(input) {
|
|
258
288
|
let deferred2_0;
|
|
259
289
|
let deferred2_1;
|
|
260
290
|
try {
|
|
261
291
|
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
262
292
|
const len0 = WASM_VECTOR_LEN;
|
|
263
|
-
const ret = wasm.
|
|
293
|
+
const ret = wasm.lint(ptr0, len0);
|
|
264
294
|
deferred2_0 = ret[0];
|
|
265
295
|
deferred2_1 = ret[1];
|
|
266
296
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -270,110 +300,88 @@ exports.referential_actions = function(input) {
|
|
|
270
300
|
};
|
|
271
301
|
|
|
272
302
|
/**
|
|
303
|
+
* @param {string} input
|
|
273
304
|
* @returns {string}
|
|
274
305
|
*/
|
|
275
|
-
exports.
|
|
276
|
-
let
|
|
277
|
-
let
|
|
306
|
+
exports.native_types = function(input) {
|
|
307
|
+
let deferred2_0;
|
|
308
|
+
let deferred2_1;
|
|
278
309
|
try {
|
|
279
|
-
const
|
|
280
|
-
|
|
281
|
-
|
|
310
|
+
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
311
|
+
const len0 = WASM_VECTOR_LEN;
|
|
312
|
+
const ret = wasm.native_types(ptr0, len0);
|
|
313
|
+
deferred2_0 = ret[0];
|
|
314
|
+
deferred2_1 = ret[1];
|
|
282
315
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
283
316
|
} finally {
|
|
284
|
-
wasm.__wbindgen_free(
|
|
317
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
285
318
|
}
|
|
286
319
|
};
|
|
287
320
|
|
|
288
321
|
/**
|
|
289
|
-
* The API is modelled on an LSP [completion
|
|
290
|
-
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#completion-request-leftwards_arrow_with_hook).
|
|
291
|
-
* Input and output are both JSON, the request being a `CompletionParams` object and the response
|
|
292
|
-
* being a `CompletionList` object.
|
|
293
|
-
* @param {string} schema_files
|
|
294
|
-
* @param {string} params
|
|
295
322
|
* @returns {string}
|
|
296
323
|
*/
|
|
297
|
-
exports.
|
|
298
|
-
let
|
|
299
|
-
let
|
|
324
|
+
exports.preview_features = function() {
|
|
325
|
+
let deferred1_0;
|
|
326
|
+
let deferred1_1;
|
|
300
327
|
try {
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
const len1 = WASM_VECTOR_LEN;
|
|
305
|
-
const ret = wasm.text_document_completion(ptr0, len0, ptr1, len1);
|
|
306
|
-
deferred3_0 = ret[0];
|
|
307
|
-
deferred3_1 = ret[1];
|
|
328
|
+
const ret = wasm.preview_features();
|
|
329
|
+
deferred1_0 = ret[0];
|
|
330
|
+
deferred1_1 = ret[1];
|
|
308
331
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
309
332
|
} finally {
|
|
310
|
-
wasm.__wbindgen_free(
|
|
333
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
311
334
|
}
|
|
312
335
|
};
|
|
313
336
|
|
|
314
337
|
/**
|
|
315
|
-
*
|
|
316
|
-
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#code-action-request-leftwards_arrow_with_hook).
|
|
317
|
-
* Input and output are both JSON, the request being a
|
|
318
|
-
* `CodeActionParams` object and the response being a list of
|
|
319
|
-
* `CodeActionOrCommand` objects.
|
|
320
|
-
* @param {string} schema
|
|
338
|
+
* Docs: https://prisma.github.io/prisma-engines/doc/prisma_fmt/fn.get_dmmf.html
|
|
321
339
|
* @param {string} params
|
|
322
340
|
* @returns {string}
|
|
323
341
|
*/
|
|
324
|
-
exports.
|
|
342
|
+
exports.get_dmmf = function(params) {
|
|
325
343
|
let deferred3_0;
|
|
326
344
|
let deferred3_1;
|
|
327
345
|
try {
|
|
328
|
-
const ptr0 = passStringToWasm0(
|
|
346
|
+
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
329
347
|
const len0 = WASM_VECTOR_LEN;
|
|
330
|
-
const
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
348
|
+
const ret = wasm.get_dmmf(ptr0, len0);
|
|
349
|
+
var ptr2 = ret[0];
|
|
350
|
+
var len2 = ret[1];
|
|
351
|
+
if (ret[3]) {
|
|
352
|
+
ptr2 = 0; len2 = 0;
|
|
353
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
354
|
+
}
|
|
355
|
+
deferred3_0 = ptr2;
|
|
356
|
+
deferred3_1 = len2;
|
|
357
|
+
return getStringFromWasm0(ptr2, len2);
|
|
336
358
|
} finally {
|
|
337
359
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
338
360
|
}
|
|
339
361
|
};
|
|
340
362
|
|
|
341
363
|
/**
|
|
342
|
-
* This API is modelled on an LSP [references
|
|
343
|
-
* request](https://github.com/microsoft/language-server-protocol/blob/gh-pages/_specifications/specification-3-16.md#find-references-request-leftwards_arrow_with_hook).
|
|
344
|
-
* Input and output are both JSON, the request being a
|
|
345
|
-
* `CodeActionParams` object and the response being a list of
|
|
346
|
-
* `CodeActionOrCommand` objects.
|
|
347
|
-
* @param {string} schema
|
|
348
364
|
* @param {string} params
|
|
349
|
-
* @returns {string}
|
|
350
365
|
*/
|
|
351
|
-
exports.
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
const ptr1 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
358
|
-
const len1 = WASM_VECTOR_LEN;
|
|
359
|
-
const ret = wasm.references(ptr0, len0, ptr1, len1);
|
|
360
|
-
deferred3_0 = ret[0];
|
|
361
|
-
deferred3_1 = ret[1];
|
|
362
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
363
|
-
} finally {
|
|
364
|
-
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
366
|
+
exports.validate = function(params) {
|
|
367
|
+
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
368
|
+
const len0 = WASM_VECTOR_LEN;
|
|
369
|
+
const ret = wasm.validate(ptr0, len0);
|
|
370
|
+
if (ret[1]) {
|
|
371
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
365
372
|
}
|
|
366
373
|
};
|
|
367
374
|
|
|
368
375
|
/**
|
|
369
|
-
*
|
|
370
|
-
*
|
|
371
|
-
* and the
|
|
376
|
+
* The API is modelled on an LSP [completion
|
|
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.
|
|
372
380
|
* @param {string} schema_files
|
|
373
381
|
* @param {string} params
|
|
374
382
|
* @returns {string}
|
|
375
383
|
*/
|
|
376
|
-
exports.
|
|
384
|
+
exports.text_document_completion = function(schema_files, params) {
|
|
377
385
|
let deferred3_0;
|
|
378
386
|
let deferred3_1;
|
|
379
387
|
try {
|
|
@@ -381,7 +389,7 @@ exports.hover = function(schema_files, params) {
|
|
|
381
389
|
const len0 = WASM_VECTOR_LEN;
|
|
382
390
|
const ptr1 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
383
391
|
const len1 = WASM_VECTOR_LEN;
|
|
384
|
-
const ret = wasm.
|
|
392
|
+
const ret = wasm.text_document_completion(ptr0, len0, ptr1, len1);
|
|
385
393
|
deferred3_0 = ret[0];
|
|
386
394
|
deferred3_1 = ret[1];
|
|
387
395
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -390,14 +398,6 @@ exports.hover = function(schema_files, params) {
|
|
|
390
398
|
}
|
|
391
399
|
};
|
|
392
400
|
|
|
393
|
-
/**
|
|
394
|
-
* Trigger a panic inside the wasm module. This is only useful in development for testing panic
|
|
395
|
-
* handling.
|
|
396
|
-
*/
|
|
397
|
-
exports.debug_panic = function() {
|
|
398
|
-
wasm.debug_panic();
|
|
399
|
-
};
|
|
400
|
-
|
|
401
401
|
exports.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
|
|
402
402
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
403
403
|
return ret;
|
|
Binary file
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const code_actions: (a: number, b: number, c: number, d: number) => [number, number];
|
|
5
|
+
export const debug_panic: () => void;
|
|
4
6
|
export const format: (a: number, b: number, c: number, d: number) => [number, number];
|
|
5
7
|
export const get_config: (a: number, b: number) => [number, number];
|
|
6
|
-
export const get_dmmf: (a: number, b: number) => [number, number, number, number];
|
|
7
8
|
export const get_datamodel: (a: number, b: number) => [number, number, number, number];
|
|
9
|
+
export const get_dmmf: (a: number, b: number) => [number, number, number, number];
|
|
10
|
+
export const hover: (a: number, b: number, c: number, d: number) => [number, number];
|
|
8
11
|
export const lint: (a: number, b: number) => [number, number];
|
|
9
|
-
export const validate: (a: number, b: number) => [number, number];
|
|
10
12
|
export const merge_schemas: (a: number, b: number) => [number, number, number, number];
|
|
11
13
|
export const native_types: (a: number, b: number) => [number, number];
|
|
12
|
-
export const referential_actions: (a: number, b: number) => [number, number];
|
|
13
14
|
export const preview_features: () => [number, number];
|
|
14
|
-
export const text_document_completion: (a: number, b: number, c: number, d: number) => [number, number];
|
|
15
|
-
export const code_actions: (a: number, b: number, c: number, d: number) => [number, number];
|
|
16
15
|
export const references: (a: number, b: number, c: number, d: number) => [number, number];
|
|
17
|
-
export const
|
|
18
|
-
export const
|
|
16
|
+
export const referential_actions: (a: number, b: number) => [number, number];
|
|
17
|
+
export const text_document_completion: (a: number, b: number, c: number, d: number) => [number, number];
|
|
18
|
+
export const validate: (a: number, b: number) => [number, number];
|
|
19
19
|
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
20
20
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
21
21
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|