@next/swc-wasm-nodejs 13.4.17-canary.2 → 13.4.18-canary.0
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/wasm.d.ts +12 -12
- package/wasm.js +101 -101
- package/wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/wasm.d.ts
CHANGED
|
@@ -7,6 +7,18 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export function browserslist(query: string, opts: any): any;
|
|
9
9
|
/**
|
|
10
|
+
* @param {string} value
|
|
11
|
+
* @param {any} opts
|
|
12
|
+
* @returns {any}
|
|
13
|
+
*/
|
|
14
|
+
export function mdxCompileSync(value: string, opts: any): any;
|
|
15
|
+
/**
|
|
16
|
+
* @param {string} value
|
|
17
|
+
* @param {any} opts
|
|
18
|
+
* @returns {Promise<any>}
|
|
19
|
+
*/
|
|
20
|
+
export function mdxCompile(value: string, opts: any): Promise<any>;
|
|
21
|
+
/**
|
|
10
22
|
* @param {string} s
|
|
11
23
|
* @param {any} opts
|
|
12
24
|
* @returns {any}
|
|
@@ -42,15 +54,3 @@ export function parseSync(s: string, opts: any): any;
|
|
|
42
54
|
* @returns {Promise<any>}
|
|
43
55
|
*/
|
|
44
56
|
export function parse(s: string, opts: any): Promise<any>;
|
|
45
|
-
/**
|
|
46
|
-
* @param {string} value
|
|
47
|
-
* @param {any} opts
|
|
48
|
-
* @returns {any}
|
|
49
|
-
*/
|
|
50
|
-
export function mdxCompileSync(value: string, opts: any): any;
|
|
51
|
-
/**
|
|
52
|
-
* @param {string} value
|
|
53
|
-
* @param {any} opts
|
|
54
|
-
* @returns {Promise<any>}
|
|
55
|
-
*/
|
|
56
|
-
export function mdxCompile(value: string, opts: any): Promise<any>;
|
package/wasm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
let imports = {};
|
|
2
2
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
3
3
|
let wasm;
|
|
4
|
-
const {
|
|
4
|
+
const { TextEncoder, TextDecoder } = require(`util`);
|
|
5
5
|
|
|
6
6
|
const heap = new Array(128).fill(undefined);
|
|
7
7
|
|
|
@@ -23,9 +23,7 @@ function takeObject(idx) {
|
|
|
23
23
|
return ret;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
cachedTextDecoder.decode();
|
|
26
|
+
let WASM_VECTOR_LEN = 0;
|
|
29
27
|
|
|
30
28
|
let cachedUint8Memory0 = null;
|
|
31
29
|
|
|
@@ -36,21 +34,6 @@ function getUint8Memory0() {
|
|
|
36
34
|
return cachedUint8Memory0;
|
|
37
35
|
}
|
|
38
36
|
|
|
39
|
-
function getStringFromWasm0(ptr, len) {
|
|
40
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function addHeapObject(obj) {
|
|
44
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
45
|
-
const idx = heap_next;
|
|
46
|
-
heap_next = heap[idx];
|
|
47
|
-
|
|
48
|
-
heap[idx] = obj;
|
|
49
|
-
return idx;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
let WASM_VECTOR_LEN = 0;
|
|
53
|
-
|
|
54
37
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
55
38
|
|
|
56
39
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -117,6 +100,23 @@ function getInt32Memory0() {
|
|
|
117
100
|
return cachedInt32Memory0;
|
|
118
101
|
}
|
|
119
102
|
|
|
103
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
104
|
+
|
|
105
|
+
cachedTextDecoder.decode();
|
|
106
|
+
|
|
107
|
+
function getStringFromWasm0(ptr, len) {
|
|
108
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function addHeapObject(obj) {
|
|
112
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
113
|
+
const idx = heap_next;
|
|
114
|
+
heap_next = heap[idx];
|
|
115
|
+
|
|
116
|
+
heap[idx] = obj;
|
|
117
|
+
return idx;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
120
|
function debugString(val) {
|
|
121
121
|
// primitive types
|
|
122
122
|
const type = typeof val;
|
|
@@ -225,7 +225,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
225
225
|
return real;
|
|
226
226
|
}
|
|
227
227
|
function __wbg_adapter_46(arg0, arg1, arg2) {
|
|
228
|
-
wasm.
|
|
228
|
+
wasm.wasm_bindgen_406eacf6a554cda5___convert__closures__invoke1_mut___wasm_bindgen_406eacf6a554cda5___JsValue_____(arg0, arg1, addHeapObject(arg2));
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
/**
|
|
@@ -267,18 +267,18 @@ function handleError(f, args) {
|
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
|
|
270
|
-
wasm.
|
|
270
|
+
wasm.wasm_bindgen_406eacf6a554cda5___convert__closures__invoke2_mut___wasm_bindgen_406eacf6a554cda5___JsValue__wasm_bindgen_406eacf6a554cda5___JsValue_____(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
/**
|
|
274
|
-
* @param {string}
|
|
274
|
+
* @param {string} value
|
|
275
275
|
* @param {any} opts
|
|
276
276
|
* @returns {any}
|
|
277
277
|
*/
|
|
278
|
-
module.exports.
|
|
278
|
+
module.exports.mdxCompileSync = function(value, opts) {
|
|
279
279
|
try {
|
|
280
280
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
281
|
-
wasm.
|
|
281
|
+
wasm.mdxCompileSync(retptr, addHeapObject(value), addHeapObject(opts));
|
|
282
282
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
283
283
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
284
284
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -292,24 +292,24 @@ module.exports.minifySync = function(s, opts) {
|
|
|
292
292
|
};
|
|
293
293
|
|
|
294
294
|
/**
|
|
295
|
-
* @param {string}
|
|
295
|
+
* @param {string} value
|
|
296
296
|
* @param {any} opts
|
|
297
297
|
* @returns {Promise<any>}
|
|
298
298
|
*/
|
|
299
|
-
module.exports.
|
|
300
|
-
const ret = wasm.
|
|
299
|
+
module.exports.mdxCompile = function(value, opts) {
|
|
300
|
+
const ret = wasm.mdxCompile(addHeapObject(value), addHeapObject(opts));
|
|
301
301
|
return takeObject(ret);
|
|
302
302
|
};
|
|
303
303
|
|
|
304
304
|
/**
|
|
305
|
-
* @param {
|
|
305
|
+
* @param {string} s
|
|
306
306
|
* @param {any} opts
|
|
307
307
|
* @returns {any}
|
|
308
308
|
*/
|
|
309
|
-
module.exports.
|
|
309
|
+
module.exports.minifySync = function(s, opts) {
|
|
310
310
|
try {
|
|
311
311
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
312
|
-
wasm.
|
|
312
|
+
wasm.minifySync(retptr, addHeapObject(s), addHeapObject(opts));
|
|
313
313
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
314
314
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
315
315
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -323,24 +323,24 @@ module.exports.transformSync = function(s, opts) {
|
|
|
323
323
|
};
|
|
324
324
|
|
|
325
325
|
/**
|
|
326
|
-
* @param {
|
|
326
|
+
* @param {string} s
|
|
327
327
|
* @param {any} opts
|
|
328
328
|
* @returns {Promise<any>}
|
|
329
329
|
*/
|
|
330
|
-
module.exports.
|
|
331
|
-
const ret = wasm.
|
|
330
|
+
module.exports.minify = function(s, opts) {
|
|
331
|
+
const ret = wasm.minify(addHeapObject(s), addHeapObject(opts));
|
|
332
332
|
return takeObject(ret);
|
|
333
333
|
};
|
|
334
334
|
|
|
335
335
|
/**
|
|
336
|
-
* @param {
|
|
336
|
+
* @param {any} s
|
|
337
337
|
* @param {any} opts
|
|
338
338
|
* @returns {any}
|
|
339
339
|
*/
|
|
340
|
-
module.exports.
|
|
340
|
+
module.exports.transformSync = function(s, opts) {
|
|
341
341
|
try {
|
|
342
342
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
343
|
-
wasm.
|
|
343
|
+
wasm.transformSync(retptr, addHeapObject(s), addHeapObject(opts));
|
|
344
344
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
345
345
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
346
346
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -354,24 +354,24 @@ module.exports.parseSync = function(s, opts) {
|
|
|
354
354
|
};
|
|
355
355
|
|
|
356
356
|
/**
|
|
357
|
-
* @param {
|
|
357
|
+
* @param {any} s
|
|
358
358
|
* @param {any} opts
|
|
359
359
|
* @returns {Promise<any>}
|
|
360
360
|
*/
|
|
361
|
-
module.exports.
|
|
362
|
-
const ret = wasm.
|
|
361
|
+
module.exports.transform = function(s, opts) {
|
|
362
|
+
const ret = wasm.transform(addHeapObject(s), addHeapObject(opts));
|
|
363
363
|
return takeObject(ret);
|
|
364
364
|
};
|
|
365
365
|
|
|
366
366
|
/**
|
|
367
|
-
* @param {string}
|
|
367
|
+
* @param {string} s
|
|
368
368
|
* @param {any} opts
|
|
369
369
|
* @returns {any}
|
|
370
370
|
*/
|
|
371
|
-
module.exports.
|
|
371
|
+
module.exports.parseSync = function(s, opts) {
|
|
372
372
|
try {
|
|
373
373
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
374
|
-
wasm.
|
|
374
|
+
wasm.parseSync(retptr, addHeapObject(s), addHeapObject(opts));
|
|
375
375
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
376
376
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
377
377
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -385,12 +385,12 @@ module.exports.mdxCompileSync = function(value, opts) {
|
|
|
385
385
|
};
|
|
386
386
|
|
|
387
387
|
/**
|
|
388
|
-
* @param {string}
|
|
388
|
+
* @param {string} s
|
|
389
389
|
* @param {any} opts
|
|
390
390
|
* @returns {Promise<any>}
|
|
391
391
|
*/
|
|
392
|
-
module.exports.
|
|
393
|
-
const ret = wasm.
|
|
392
|
+
module.exports.parse = function(s, opts) {
|
|
393
|
+
const ret = wasm.parse(addHeapObject(s), addHeapObject(opts));
|
|
394
394
|
return takeObject(ret);
|
|
395
395
|
};
|
|
396
396
|
|
|
@@ -418,39 +418,47 @@ module.exports.__wbg_value_6ac8da5cc5b3efda = function(arg0) {
|
|
|
418
418
|
return addHeapObject(ret);
|
|
419
419
|
};
|
|
420
420
|
|
|
421
|
-
module.exports.
|
|
422
|
-
const ret = getObject(arg0)
|
|
421
|
+
module.exports.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
|
|
422
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
423
|
+
return addHeapObject(ret);
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
427
|
+
const ret = getObject(arg0) === undefined;
|
|
423
428
|
return ret;
|
|
424
429
|
};
|
|
425
430
|
|
|
426
|
-
module.exports.
|
|
427
|
-
const
|
|
428
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
431
|
+
module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
432
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
429
433
|
return ret;
|
|
430
434
|
};
|
|
431
435
|
|
|
432
|
-
module.exports.
|
|
433
|
-
const
|
|
434
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
436
|
+
module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
437
|
+
const ret = getObject(arg0) == getObject(arg1);
|
|
435
438
|
return ret;
|
|
436
439
|
};
|
|
437
440
|
|
|
438
|
-
module.exports.
|
|
439
|
-
const
|
|
440
|
-
|
|
441
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
442
|
+
const obj = getObject(arg1);
|
|
443
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
444
|
+
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
445
|
+
var len0 = WASM_VECTOR_LEN;
|
|
446
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
447
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
441
448
|
};
|
|
442
449
|
|
|
443
|
-
module.exports.
|
|
444
|
-
const ret = new
|
|
450
|
+
module.exports.__wbg_new0_25059e40b1c02766 = function() {
|
|
451
|
+
const ret = new Date();
|
|
445
452
|
return addHeapObject(ret);
|
|
446
453
|
};
|
|
447
454
|
|
|
448
|
-
module.exports.
|
|
449
|
-
|
|
455
|
+
module.exports.__wbg_getTimezoneOffset_2a6b27fb18493a56 = function(arg0) {
|
|
456
|
+
const ret = getObject(arg0).getTimezoneOffset();
|
|
457
|
+
return ret;
|
|
450
458
|
};
|
|
451
459
|
|
|
452
|
-
module.exports.
|
|
453
|
-
const ret =
|
|
460
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
461
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
454
462
|
return addHeapObject(ret);
|
|
455
463
|
};
|
|
456
464
|
|
|
@@ -459,33 +467,25 @@ module.exports.__wbg_get_baf4855f9a986186 = function() { return handleError(func
|
|
|
459
467
|
return addHeapObject(ret);
|
|
460
468
|
}, arguments) };
|
|
461
469
|
|
|
462
|
-
module.exports.
|
|
463
|
-
const
|
|
464
|
-
const ret = typeof(
|
|
465
|
-
|
|
466
|
-
var len0 = WASM_VECTOR_LEN;
|
|
467
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
468
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
470
|
+
module.exports.__wbindgen_is_object = function(arg0) {
|
|
471
|
+
const val = getObject(arg0);
|
|
472
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
473
|
+
return ret;
|
|
469
474
|
};
|
|
470
475
|
|
|
471
|
-
module.exports.
|
|
472
|
-
const
|
|
476
|
+
module.exports.__wbindgen_boolean_get = function(arg0) {
|
|
477
|
+
const v = getObject(arg0);
|
|
478
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
473
479
|
return ret;
|
|
474
480
|
};
|
|
475
481
|
|
|
476
|
-
module.exports.
|
|
477
|
-
const ret =
|
|
482
|
+
module.exports.__wbg_new_b525de17f44a8943 = function() {
|
|
483
|
+
const ret = new Array();
|
|
478
484
|
return addHeapObject(ret);
|
|
479
485
|
};
|
|
480
486
|
|
|
481
|
-
module.exports.
|
|
482
|
-
|
|
483
|
-
return ret;
|
|
484
|
-
};
|
|
485
|
-
|
|
486
|
-
module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
487
|
-
const ret = getObject(arg0) in getObject(arg1);
|
|
488
|
-
return ret;
|
|
487
|
+
module.exports.__wbg_set_17224bc548dd1d7b = function(arg0, arg1, arg2) {
|
|
488
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
489
489
|
};
|
|
490
490
|
|
|
491
491
|
module.exports.__wbg_getTime_7c59072d1651a3cf = function(arg0) {
|
|
@@ -512,15 +512,6 @@ if (arg0 !== 0) { wasm.__wbindgen_free(arg0, arg1); }
|
|
|
512
512
|
console.error(v0);
|
|
513
513
|
};
|
|
514
514
|
|
|
515
|
-
module.exports.__wbg_subarray_7526649b91a252a6 = function(arg0, arg1, arg2) {
|
|
516
|
-
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
517
|
-
return addHeapObject(ret);
|
|
518
|
-
};
|
|
519
|
-
|
|
520
|
-
module.exports.__wbg_getRandomValues_3774744e221a22ad = function() { return handleError(function (arg0, arg1) {
|
|
521
|
-
getObject(arg0).getRandomValues(getObject(arg1));
|
|
522
|
-
}, arguments) };
|
|
523
|
-
|
|
524
515
|
module.exports.__wbindgen_memory = function() {
|
|
525
516
|
const ret = wasm.memory;
|
|
526
517
|
return addHeapObject(ret);
|
|
@@ -540,6 +531,15 @@ module.exports.__wbg_randomFillSync_e950366c42764a07 = function() { return handl
|
|
|
540
531
|
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
541
532
|
}, arguments) };
|
|
542
533
|
|
|
534
|
+
module.exports.__wbg_subarray_7526649b91a252a6 = function(arg0, arg1, arg2) {
|
|
535
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
536
|
+
return addHeapObject(ret);
|
|
537
|
+
};
|
|
538
|
+
|
|
539
|
+
module.exports.__wbg_getRandomValues_3774744e221a22ad = function() { return handleError(function (arg0, arg1) {
|
|
540
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
541
|
+
}, arguments) };
|
|
542
|
+
|
|
543
543
|
module.exports.__wbg_new_537b7341ce90bb31 = function(arg0) {
|
|
544
544
|
const ret = new Uint8Array(getObject(arg0));
|
|
545
545
|
return addHeapObject(ret);
|
|
@@ -739,6 +739,15 @@ module.exports.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
|
|
|
739
739
|
return ret;
|
|
740
740
|
};
|
|
741
741
|
|
|
742
|
+
module.exports.__wbg_new_f9876326328f45ed = function() {
|
|
743
|
+
const ret = new Object();
|
|
744
|
+
return addHeapObject(ret);
|
|
745
|
+
};
|
|
746
|
+
|
|
747
|
+
module.exports.__wbg_set_20cbc34131e76824 = function(arg0, arg1, arg2) {
|
|
748
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
749
|
+
};
|
|
750
|
+
|
|
742
751
|
module.exports.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
|
|
743
752
|
try {
|
|
744
753
|
var state0 = {a: arg0, b: arg1};
|
|
@@ -758,15 +767,6 @@ module.exports.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
|
|
|
758
767
|
}
|
|
759
768
|
};
|
|
760
769
|
|
|
761
|
-
module.exports.__wbg_new_f9876326328f45ed = function() {
|
|
762
|
-
const ret = new Object();
|
|
763
|
-
return addHeapObject(ret);
|
|
764
|
-
};
|
|
765
|
-
|
|
766
|
-
module.exports.__wbg_set_20cbc34131e76824 = function(arg0, arg1, arg2) {
|
|
767
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
768
|
-
};
|
|
769
|
-
|
|
770
770
|
module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
771
771
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
772
772
|
};
|
|
@@ -791,8 +791,8 @@ module.exports.__wbg_then_ec5db6d509eb475f = function(arg0, arg1) {
|
|
|
791
791
|
return addHeapObject(ret);
|
|
792
792
|
};
|
|
793
793
|
|
|
794
|
-
module.exports.
|
|
795
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
794
|
+
module.exports.__wbindgen_closure_wrapper18056 = function(arg0, arg1, arg2) {
|
|
795
|
+
const ret = makeMutClosure(arg0, arg1, 257, __wbg_adapter_46);
|
|
796
796
|
return addHeapObject(ret);
|
|
797
797
|
};
|
|
798
798
|
|
package/wasm_bg.wasm
CHANGED
|
Binary file
|