@prisma/prisma-schema-wasm 6.20.0-16.next-0c19ccc313cf9911a90d99d2ac2eb0280c76c513 → 6.20.0-18.802783d6296a271b2d26062832ec559ce79af320

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