@next/swc-wasm-web 16.1.4 → 16.2.0-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 +2 -3
- package/wasm.d.ts +10 -10
- package/wasm.js +58 -57
- package/wasm_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next/swc-wasm-web",
|
|
3
|
-
"
|
|
4
|
-
"version": "16.1.4",
|
|
3
|
+
"version": "16.2.0-canary.0",
|
|
5
4
|
"files": [
|
|
6
5
|
"wasm_bg.wasm",
|
|
7
6
|
"wasm.js",
|
|
8
7
|
"wasm.d.ts"
|
|
9
8
|
],
|
|
10
|
-
"
|
|
9
|
+
"module": "wasm.js",
|
|
11
10
|
"types": "wasm.d.ts",
|
|
12
11
|
"sideEffects": [
|
|
13
12
|
"./snippets/*"
|
package/wasm.d.ts
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function
|
|
4
|
-
export function
|
|
5
|
-
export function
|
|
3
|
+
export function minifySync(s: string, opts: any): any;
|
|
4
|
+
export function minify(s: string, opts: any): Promise<any>;
|
|
5
|
+
export function transformSync(s: any, opts: any): any;
|
|
6
6
|
export function transform(s: any, opts: any): Promise<any>;
|
|
7
7
|
export function parseSync(s: string, opts: any): any;
|
|
8
8
|
export function parse(s: string, opts: any): Promise<any>;
|
|
9
|
-
export function
|
|
10
|
-
export function
|
|
11
|
-
export function
|
|
9
|
+
export function expandNextJsTemplate(content: Uint8Array, template_path: string, next_package_dir_path: string, replacements: any, injections: any, imports: any): string;
|
|
10
|
+
export function mdxCompileSync(value: string, opts: any): any;
|
|
11
|
+
export function mdxCompile(value: string, opts: any): Promise<any>;
|
|
12
12
|
|
|
13
13
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
14
14
|
|
|
15
15
|
export interface InitOutput {
|
|
16
16
|
readonly memory: WebAssembly.Memory;
|
|
17
|
-
readonly mdxCompile: (a: any, b: any) => any;
|
|
18
|
-
readonly mdxCompileSync: (a: any, b: any) => [number, number, number];
|
|
19
17
|
readonly expandNextJsTemplate: (a: number, b: number, c: number, d: number, e: number, f: number, g: any, h: any, i: any) => [number, number, number, number];
|
|
20
18
|
readonly minify: (a: any, b: any) => any;
|
|
21
19
|
readonly minifySync: (a: any, b: any) => [number, number, number];
|
|
@@ -23,6 +21,8 @@ export interface InitOutput {
|
|
|
23
21
|
readonly parseSync: (a: any, b: any) => [number, number, number];
|
|
24
22
|
readonly transform: (a: any, b: any) => any;
|
|
25
23
|
readonly transformSync: (a: any, b: any) => [number, number, number];
|
|
24
|
+
readonly mdxCompile: (a: any, b: any) => any;
|
|
25
|
+
readonly mdxCompileSync: (a: any, b: any) => [number, number, number];
|
|
26
26
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
27
27
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
28
28
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
@@ -31,8 +31,8 @@ export interface InitOutput {
|
|
|
31
31
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
32
32
|
readonly __wbindgen_export_6: WebAssembly.Table;
|
|
33
33
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
34
|
-
readonly
|
|
35
|
-
readonly
|
|
34
|
+
readonly closure1211_externref_shim: (a: number, b: number, c: any) => void;
|
|
35
|
+
readonly closure124_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
36
36
|
readonly __wbindgen_start: () => void;
|
|
37
37
|
}
|
|
38
38
|
|
package/wasm.js
CHANGED
|
@@ -212,15 +212,6 @@ function debugString(val) {
|
|
|
212
212
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
213
213
|
return className;
|
|
214
214
|
}
|
|
215
|
-
/**
|
|
216
|
-
* @param {string} value
|
|
217
|
-
* @param {any} opts
|
|
218
|
-
* @returns {Promise<any>}
|
|
219
|
-
*/
|
|
220
|
-
export function mdxCompile(value, opts) {
|
|
221
|
-
const ret = wasm.mdxCompile(value, opts);
|
|
222
|
-
return ret;
|
|
223
|
-
}
|
|
224
215
|
|
|
225
216
|
function takeFromExternrefTable0(idx) {
|
|
226
217
|
const value = wasm.__wbindgen_export_4.get(idx);
|
|
@@ -228,47 +219,39 @@ function takeFromExternrefTable0(idx) {
|
|
|
228
219
|
return value;
|
|
229
220
|
}
|
|
230
221
|
/**
|
|
231
|
-
* @param {string}
|
|
222
|
+
* @param {string} s
|
|
232
223
|
* @param {any} opts
|
|
233
224
|
* @returns {any}
|
|
234
225
|
*/
|
|
235
|
-
export function
|
|
236
|
-
const ret = wasm.
|
|
226
|
+
export function minifySync(s, opts) {
|
|
227
|
+
const ret = wasm.minifySync(s, opts);
|
|
237
228
|
if (ret[2]) {
|
|
238
229
|
throw takeFromExternrefTable0(ret[1]);
|
|
239
230
|
}
|
|
240
231
|
return takeFromExternrefTable0(ret[0]);
|
|
241
232
|
}
|
|
242
233
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
234
|
+
/**
|
|
235
|
+
* @param {string} s
|
|
236
|
+
* @param {any} opts
|
|
237
|
+
* @returns {Promise<any>}
|
|
238
|
+
*/
|
|
239
|
+
export function minify(s, opts) {
|
|
240
|
+
const ret = wasm.minify(s, opts);
|
|
241
|
+
return ret;
|
|
248
242
|
}
|
|
243
|
+
|
|
249
244
|
/**
|
|
250
|
-
* @param {
|
|
251
|
-
* @param {
|
|
252
|
-
* @
|
|
253
|
-
* @param {any} replacements
|
|
254
|
-
* @param {any} injections
|
|
255
|
-
* @param {any} imports
|
|
256
|
-
* @returns {string}
|
|
245
|
+
* @param {any} s
|
|
246
|
+
* @param {any} opts
|
|
247
|
+
* @returns {any}
|
|
257
248
|
*/
|
|
258
|
-
export function
|
|
259
|
-
const
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
const len1 = WASM_VECTOR_LEN;
|
|
263
|
-
const ptr2 = passStringToWasm0(next_package_dir_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
264
|
-
const len2 = WASM_VECTOR_LEN;
|
|
265
|
-
const ret = wasm.expandNextJsTemplate(ptr0, len0, ptr1, len1, ptr2, len2, replacements, injections, imports);
|
|
266
|
-
if (ret[3]) {
|
|
267
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
249
|
+
export function transformSync(s, opts) {
|
|
250
|
+
const ret = wasm.transformSync(s, opts);
|
|
251
|
+
if (ret[2]) {
|
|
252
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
268
253
|
}
|
|
269
|
-
|
|
270
|
-
if (ret[0] !== 0) { wasm.__wbindgen_free(ret[0], ret[1], 1); }
|
|
271
|
-
return v4;
|
|
254
|
+
return takeFromExternrefTable0(ret[0]);
|
|
272
255
|
}
|
|
273
256
|
|
|
274
257
|
/**
|
|
@@ -304,26 +287,44 @@ export function parse(s, opts) {
|
|
|
304
287
|
return ret;
|
|
305
288
|
}
|
|
306
289
|
|
|
290
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
291
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
292
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
293
|
+
WASM_VECTOR_LEN = arg.length;
|
|
294
|
+
return ptr;
|
|
295
|
+
}
|
|
307
296
|
/**
|
|
308
|
-
* @param {
|
|
309
|
-
* @param {
|
|
310
|
-
* @
|
|
297
|
+
* @param {Uint8Array} content
|
|
298
|
+
* @param {string} template_path
|
|
299
|
+
* @param {string} next_package_dir_path
|
|
300
|
+
* @param {any} replacements
|
|
301
|
+
* @param {any} injections
|
|
302
|
+
* @param {any} imports
|
|
303
|
+
* @returns {string}
|
|
311
304
|
*/
|
|
312
|
-
export function
|
|
313
|
-
const
|
|
314
|
-
|
|
315
|
-
|
|
305
|
+
export function expandNextJsTemplate(content, template_path, next_package_dir_path, replacements, injections, imports) {
|
|
306
|
+
const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_malloc);
|
|
307
|
+
const len0 = WASM_VECTOR_LEN;
|
|
308
|
+
const ptr1 = passStringToWasm0(template_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
309
|
+
const len1 = WASM_VECTOR_LEN;
|
|
310
|
+
const ptr2 = passStringToWasm0(next_package_dir_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
311
|
+
const len2 = WASM_VECTOR_LEN;
|
|
312
|
+
const ret = wasm.expandNextJsTemplate(ptr0, len0, ptr1, len1, ptr2, len2, replacements, injections, imports);
|
|
313
|
+
if (ret[3]) {
|
|
314
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
316
315
|
}
|
|
317
|
-
|
|
316
|
+
var v4 = getCachedStringFromWasm0(ret[0], ret[1]);
|
|
317
|
+
if (ret[0] !== 0) { wasm.__wbindgen_free(ret[0], ret[1], 1); }
|
|
318
|
+
return v4;
|
|
318
319
|
}
|
|
319
320
|
|
|
320
321
|
/**
|
|
321
|
-
* @param {string}
|
|
322
|
+
* @param {string} value
|
|
322
323
|
* @param {any} opts
|
|
323
324
|
* @returns {any}
|
|
324
325
|
*/
|
|
325
|
-
export function
|
|
326
|
-
const ret = wasm.
|
|
326
|
+
export function mdxCompileSync(value, opts) {
|
|
327
|
+
const ret = wasm.mdxCompileSync(value, opts);
|
|
327
328
|
if (ret[2]) {
|
|
328
329
|
throw takeFromExternrefTable0(ret[1]);
|
|
329
330
|
}
|
|
@@ -331,21 +332,21 @@ export function minifySync(s, opts) {
|
|
|
331
332
|
}
|
|
332
333
|
|
|
333
334
|
/**
|
|
334
|
-
* @param {string}
|
|
335
|
+
* @param {string} value
|
|
335
336
|
* @param {any} opts
|
|
336
337
|
* @returns {Promise<any>}
|
|
337
338
|
*/
|
|
338
|
-
export function
|
|
339
|
-
const ret = wasm.
|
|
339
|
+
export function mdxCompile(value, opts) {
|
|
340
|
+
const ret = wasm.mdxCompile(value, opts);
|
|
340
341
|
return ret;
|
|
341
342
|
}
|
|
342
343
|
|
|
343
344
|
function __wbg_adapter_50(arg0, arg1, arg2) {
|
|
344
|
-
wasm.
|
|
345
|
+
wasm.closure1211_externref_shim(arg0, arg1, arg2);
|
|
345
346
|
}
|
|
346
347
|
|
|
347
|
-
function
|
|
348
|
-
wasm.
|
|
348
|
+
function __wbg_adapter_89(arg0, arg1, arg2, arg3) {
|
|
349
|
+
wasm.closure124_externref_shim(arg0, arg1, arg2, arg3);
|
|
349
350
|
}
|
|
350
351
|
|
|
351
352
|
async function __wbg_load(module, imports) {
|
|
@@ -488,7 +489,7 @@ function __wbg_get_imports() {
|
|
|
488
489
|
const a = state0.a;
|
|
489
490
|
state0.a = 0;
|
|
490
491
|
try {
|
|
491
|
-
return
|
|
492
|
+
return __wbg_adapter_89(a, state0.b, arg0, arg1);
|
|
492
493
|
} finally {
|
|
493
494
|
state0.a = a;
|
|
494
495
|
}
|
|
@@ -611,8 +612,8 @@ function __wbg_get_imports() {
|
|
|
611
612
|
const ret = false;
|
|
612
613
|
return ret;
|
|
613
614
|
};
|
|
614
|
-
imports.wbg.
|
|
615
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
615
|
+
imports.wbg.__wbindgen_closure_wrapper25309 = function(arg0, arg1, arg2) {
|
|
616
|
+
const ret = makeMutClosure(arg0, arg1, 1212, __wbg_adapter_50);
|
|
616
617
|
return ret;
|
|
617
618
|
};
|
|
618
619
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
package/wasm_bg.wasm
CHANGED
|
Binary file
|