@prisma/prisma-schema-wasm 6.19.0-13.next-a06eb11979a320a0728d700b06c5afd921691d3a → 6.19.0-15.08761ddce3e1b2107c76ee662fbd0520fc1110dc
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.19.0-
|
|
3
|
+
"version": "6.19.0-15.08761ddce3e1b2107c76ee662fbd0520fc1110dc",
|
|
4
4
|
"description": "The WASM package for prisma-fmt",
|
|
5
5
|
"main": "src/prisma_schema_build.js",
|
|
6
6
|
"scripts": {
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
let imports = {};
|
|
3
3
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
4
|
-
let wasm;
|
|
5
|
-
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
|
-
|
|
7
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
8
|
-
|
|
9
|
-
cachedTextDecoder.decode();
|
|
10
4
|
|
|
11
5
|
let cachedUint8ArrayMemory0 = null;
|
|
12
6
|
|
|
@@ -17,27 +11,33 @@ function getUint8ArrayMemory0() {
|
|
|
17
11
|
return cachedUint8ArrayMemory0;
|
|
18
12
|
}
|
|
19
13
|
|
|
14
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
15
|
+
|
|
16
|
+
cachedTextDecoder.decode();
|
|
17
|
+
|
|
18
|
+
function decodeText(ptr, len) {
|
|
19
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
20
|
+
}
|
|
21
|
+
|
|
20
22
|
function getStringFromWasm0(ptr, len) {
|
|
21
23
|
ptr = ptr >>> 0;
|
|
22
|
-
return
|
|
24
|
+
return decodeText(ptr, len);
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
let WASM_VECTOR_LEN = 0;
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
const cachedTextEncoder = new TextEncoder();
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
32
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
33
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
34
|
+
view.set(buf);
|
|
35
|
+
return {
|
|
36
|
+
read: arg.length,
|
|
37
|
+
written: buf.length
|
|
38
|
+
};
|
|
39
|
+
}
|
|
32
40
|
}
|
|
33
|
-
: function (arg, view) {
|
|
34
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
35
|
-
view.set(buf);
|
|
36
|
-
return {
|
|
37
|
-
read: arg.length,
|
|
38
|
-
written: buf.length
|
|
39
|
-
};
|
|
40
|
-
});
|
|
41
41
|
|
|
42
42
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
43
43
|
|
|
@@ -68,7 +68,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
68
68
|
}
|
|
69
69
|
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
70
70
|
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
71
|
-
const ret =
|
|
71
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
72
72
|
|
|
73
73
|
offset += ret.written;
|
|
74
74
|
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
@@ -82,7 +82,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
82
82
|
* @param {string} params
|
|
83
83
|
* @returns {string}
|
|
84
84
|
*/
|
|
85
|
-
|
|
85
|
+
exports.format = function(schema, params) {
|
|
86
86
|
let deferred3_0;
|
|
87
87
|
let deferred3_1;
|
|
88
88
|
try {
|
|
@@ -104,7 +104,7 @@ module.exports.format = function(schema, params) {
|
|
|
104
104
|
* @param {string} params
|
|
105
105
|
* @returns {string}
|
|
106
106
|
*/
|
|
107
|
-
|
|
107
|
+
exports.get_config = function(params) {
|
|
108
108
|
let deferred2_0;
|
|
109
109
|
let deferred2_1;
|
|
110
110
|
try {
|
|
@@ -120,7 +120,7 @@ module.exports.get_config = function(params) {
|
|
|
120
120
|
};
|
|
121
121
|
|
|
122
122
|
function takeFromExternrefTable0(idx) {
|
|
123
|
-
const value = wasm.
|
|
123
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
124
124
|
wasm.__externref_table_dealloc(idx);
|
|
125
125
|
return value;
|
|
126
126
|
}
|
|
@@ -129,7 +129,7 @@ function takeFromExternrefTable0(idx) {
|
|
|
129
129
|
* @param {string} params
|
|
130
130
|
* @returns {string}
|
|
131
131
|
*/
|
|
132
|
-
|
|
132
|
+
exports.get_dmmf = function(params) {
|
|
133
133
|
let deferred3_0;
|
|
134
134
|
let deferred3_1;
|
|
135
135
|
try {
|
|
@@ -154,7 +154,7 @@ module.exports.get_dmmf = function(params) {
|
|
|
154
154
|
* @param {string} params
|
|
155
155
|
* @returns {string}
|
|
156
156
|
*/
|
|
157
|
-
|
|
157
|
+
exports.get_datamodel = function(params) {
|
|
158
158
|
let deferred3_0;
|
|
159
159
|
let deferred3_1;
|
|
160
160
|
try {
|
|
@@ -179,7 +179,7 @@ module.exports.get_datamodel = function(params) {
|
|
|
179
179
|
* @param {string} input
|
|
180
180
|
* @returns {string}
|
|
181
181
|
*/
|
|
182
|
-
|
|
182
|
+
exports.lint = function(input) {
|
|
183
183
|
let deferred2_0;
|
|
184
184
|
let deferred2_1;
|
|
185
185
|
try {
|
|
@@ -197,7 +197,7 @@ module.exports.lint = function(input) {
|
|
|
197
197
|
/**
|
|
198
198
|
* @param {string} params
|
|
199
199
|
*/
|
|
200
|
-
|
|
200
|
+
exports.validate = function(params) {
|
|
201
201
|
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
202
202
|
const len0 = WASM_VECTOR_LEN;
|
|
203
203
|
const ret = wasm.validate(ptr0, len0);
|
|
@@ -210,7 +210,7 @@ module.exports.validate = function(params) {
|
|
|
210
210
|
* @param {string} input
|
|
211
211
|
* @returns {string}
|
|
212
212
|
*/
|
|
213
|
-
|
|
213
|
+
exports.merge_schemas = function(input) {
|
|
214
214
|
let deferred3_0;
|
|
215
215
|
let deferred3_1;
|
|
216
216
|
try {
|
|
@@ -235,7 +235,7 @@ module.exports.merge_schemas = function(input) {
|
|
|
235
235
|
* @param {string} input
|
|
236
236
|
* @returns {string}
|
|
237
237
|
*/
|
|
238
|
-
|
|
238
|
+
exports.native_types = function(input) {
|
|
239
239
|
let deferred2_0;
|
|
240
240
|
let deferred2_1;
|
|
241
241
|
try {
|
|
@@ -254,7 +254,7 @@ module.exports.native_types = function(input) {
|
|
|
254
254
|
* @param {string} input
|
|
255
255
|
* @returns {string}
|
|
256
256
|
*/
|
|
257
|
-
|
|
257
|
+
exports.referential_actions = function(input) {
|
|
258
258
|
let deferred2_0;
|
|
259
259
|
let deferred2_1;
|
|
260
260
|
try {
|
|
@@ -272,7 +272,7 @@ module.exports.referential_actions = function(input) {
|
|
|
272
272
|
/**
|
|
273
273
|
* @returns {string}
|
|
274
274
|
*/
|
|
275
|
-
|
|
275
|
+
exports.preview_features = function() {
|
|
276
276
|
let deferred1_0;
|
|
277
277
|
let deferred1_1;
|
|
278
278
|
try {
|
|
@@ -294,7 +294,7 @@ module.exports.preview_features = function() {
|
|
|
294
294
|
* @param {string} params
|
|
295
295
|
* @returns {string}
|
|
296
296
|
*/
|
|
297
|
-
|
|
297
|
+
exports.text_document_completion = function(schema_files, params) {
|
|
298
298
|
let deferred3_0;
|
|
299
299
|
let deferred3_1;
|
|
300
300
|
try {
|
|
@@ -321,7 +321,7 @@ module.exports.text_document_completion = function(schema_files, params) {
|
|
|
321
321
|
* @param {string} params
|
|
322
322
|
* @returns {string}
|
|
323
323
|
*/
|
|
324
|
-
|
|
324
|
+
exports.code_actions = function(schema, params) {
|
|
325
325
|
let deferred3_0;
|
|
326
326
|
let deferred3_1;
|
|
327
327
|
try {
|
|
@@ -348,7 +348,7 @@ module.exports.code_actions = function(schema, params) {
|
|
|
348
348
|
* @param {string} params
|
|
349
349
|
* @returns {string}
|
|
350
350
|
*/
|
|
351
|
-
|
|
351
|
+
exports.references = function(schema, params) {
|
|
352
352
|
let deferred3_0;
|
|
353
353
|
let deferred3_1;
|
|
354
354
|
try {
|
|
@@ -373,7 +373,7 @@ module.exports.references = function(schema, params) {
|
|
|
373
373
|
* @param {string} params
|
|
374
374
|
* @returns {string}
|
|
375
375
|
*/
|
|
376
|
-
|
|
376
|
+
exports.hover = function(schema_files, params) {
|
|
377
377
|
let deferred3_0;
|
|
378
378
|
let deferred3_1;
|
|
379
379
|
try {
|
|
@@ -394,21 +394,25 @@ module.exports.hover = function(schema_files, params) {
|
|
|
394
394
|
* Trigger a panic inside the wasm module. This is only useful in development for testing panic
|
|
395
395
|
* handling.
|
|
396
396
|
*/
|
|
397
|
-
|
|
397
|
+
exports.debug_panic = function() {
|
|
398
398
|
wasm.debug_panic();
|
|
399
399
|
};
|
|
400
400
|
|
|
401
|
-
|
|
402
|
-
|
|
401
|
+
exports.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
|
|
402
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
403
|
+
return ret;
|
|
403
404
|
};
|
|
404
405
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
406
|
+
exports.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
|
|
407
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
exports.__wbg_set_message_f22ac4a6869ee695 = function(arg0, arg1) {
|
|
411
|
+
global.PRISMA_WASM_PANIC_REGISTRY.set_message(getStringFromWasm0(arg0, arg1));
|
|
408
412
|
};
|
|
409
413
|
|
|
410
|
-
|
|
411
|
-
const table = wasm.
|
|
414
|
+
exports.__wbindgen_init_externref_table = function() {
|
|
415
|
+
const table = wasm.__wbindgen_externrefs;
|
|
412
416
|
const offset = table.grow(4);
|
|
413
417
|
table.set(0, undefined);
|
|
414
418
|
table.set(offset + 0, undefined);
|
|
@@ -418,17 +422,10 @@ module.exports.__wbindgen_init_externref_table = function() {
|
|
|
418
422
|
;
|
|
419
423
|
};
|
|
420
424
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
const path = require('path').join(__dirname, 'prisma_schema_build_bg.wasm');
|
|
426
|
-
const bytes = require('fs').readFileSync(path);
|
|
427
|
-
|
|
428
|
-
const wasmModule = new WebAssembly.Module(bytes);
|
|
429
|
-
const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
|
430
|
-
wasm = wasmInstance.exports;
|
|
431
|
-
module.exports.__wasm = wasm;
|
|
425
|
+
const wasmPath = `${__dirname}/prisma_schema_build_bg.wasm`;
|
|
426
|
+
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
427
|
+
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
428
|
+
const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
|
|
432
429
|
|
|
433
430
|
wasm.__wbindgen_start();
|
|
434
431
|
|
|
Binary file
|
|
@@ -16,7 +16,7 @@ export const code_actions: (a: number, b: number, c: number, d: number) => [numb
|
|
|
16
16
|
export const references: (a: number, b: number, c: number, d: number) => [number, number];
|
|
17
17
|
export const hover: (a: number, b: number, c: number, d: number) => [number, number];
|
|
18
18
|
export const debug_panic: () => void;
|
|
19
|
-
export const
|
|
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;
|
|
22
22
|
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|