@prisma/prisma-schema-wasm 6.20.0-12.next-52645f61ef1fbbcf1bb2357fe85df59cbdefba38 → 6.20.0-13.next-a142dc29aa8dc1f381cdb0509edbe0aa9d405b96

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