@next/swc-wasm-web 16.0.2-canary.3 → 16.0.2-canary.30
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 +8 -8
- package/wasm.js +56 -55
- 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.0.2-canary.3",
|
|
3
|
+
"version": "16.0.2-canary.30",
|
|
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,12 +1,12 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export function expandNextJsTemplate(content: Uint8Array, template_path: string, next_package_dir_path: string, replacements: any, injections: any, imports: any): string;
|
|
4
|
+
export function transform(s: any, opts: any): Promise<any>;
|
|
5
|
+
export function transformSync(s: any, opts: any): any;
|
|
3
6
|
export function parseSync(s: string, opts: any): any;
|
|
4
7
|
export function minify(s: string, opts: any): Promise<any>;
|
|
5
|
-
export function transformSync(s: any, opts: any): any;
|
|
6
|
-
export function parse(s: string, opts: any): Promise<any>;
|
|
7
8
|
export function minifySync(s: string, opts: any): any;
|
|
8
|
-
export function
|
|
9
|
-
export function transform(s: any, opts: any): Promise<any>;
|
|
9
|
+
export function parse(s: string, opts: any): Promise<any>;
|
|
10
10
|
export function mdxCompileSync(value: string, opts: any): any;
|
|
11
11
|
export function mdxCompile(value: string, opts: any): Promise<any>;
|
|
12
12
|
|
|
@@ -15,14 +15,14 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
15
15
|
export interface InitOutput {
|
|
16
16
|
readonly memory: WebAssembly.Memory;
|
|
17
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];
|
|
18
|
+
readonly mdxCompile: (a: any, b: any) => any;
|
|
19
|
+
readonly mdxCompileSync: (a: any, b: any) => [number, number, number];
|
|
18
20
|
readonly minify: (a: any, b: any) => any;
|
|
19
21
|
readonly minifySync: (a: any, b: any) => [number, number, number];
|
|
20
22
|
readonly parse: (a: any, b: any) => any;
|
|
21
23
|
readonly parseSync: (a: any, b: any) => [number, number, number];
|
|
22
24
|
readonly transform: (a: any, b: any) => any;
|
|
23
25
|
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 closure1163_externref_shim: (a: number, b: number, c: any) => void;
|
|
35
|
+
readonly closure126_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
|
@@ -213,31 +213,50 @@ function debugString(val) {
|
|
|
213
213
|
return className;
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
217
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
218
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
219
|
+
WASM_VECTOR_LEN = arg.length;
|
|
220
|
+
return ptr;
|
|
221
|
+
}
|
|
222
|
+
|
|
216
223
|
function takeFromExternrefTable0(idx) {
|
|
217
224
|
const value = wasm.__wbindgen_export_4.get(idx);
|
|
218
225
|
wasm.__externref_table_dealloc(idx);
|
|
219
226
|
return value;
|
|
220
227
|
}
|
|
221
228
|
/**
|
|
222
|
-
* @param {
|
|
223
|
-
* @param {
|
|
224
|
-
* @
|
|
229
|
+
* @param {Uint8Array} content
|
|
230
|
+
* @param {string} template_path
|
|
231
|
+
* @param {string} next_package_dir_path
|
|
232
|
+
* @param {any} replacements
|
|
233
|
+
* @param {any} injections
|
|
234
|
+
* @param {any} imports
|
|
235
|
+
* @returns {string}
|
|
225
236
|
*/
|
|
226
|
-
export function
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
-
|
|
237
|
+
export function expandNextJsTemplate(content, template_path, next_package_dir_path, replacements, injections, imports) {
|
|
238
|
+
const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_malloc);
|
|
239
|
+
const len0 = WASM_VECTOR_LEN;
|
|
240
|
+
const ptr1 = passStringToWasm0(template_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
241
|
+
const len1 = WASM_VECTOR_LEN;
|
|
242
|
+
const ptr2 = passStringToWasm0(next_package_dir_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
243
|
+
const len2 = WASM_VECTOR_LEN;
|
|
244
|
+
const ret = wasm.expandNextJsTemplate(ptr0, len0, ptr1, len1, ptr2, len2, replacements, injections, imports);
|
|
245
|
+
if (ret[3]) {
|
|
246
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
230
247
|
}
|
|
231
|
-
|
|
248
|
+
var v4 = getCachedStringFromWasm0(ret[0], ret[1]);
|
|
249
|
+
if (ret[0] !== 0) { wasm.__wbindgen_free(ret[0], ret[1], 1); }
|
|
250
|
+
return v4;
|
|
232
251
|
}
|
|
233
252
|
|
|
234
253
|
/**
|
|
235
|
-
* @param {
|
|
254
|
+
* @param {any} s
|
|
236
255
|
* @param {any} opts
|
|
237
256
|
* @returns {Promise<any>}
|
|
238
257
|
*/
|
|
239
|
-
export function
|
|
240
|
-
const ret = wasm.
|
|
258
|
+
export function transform(s, opts) {
|
|
259
|
+
const ret = wasm.transform(s, opts);
|
|
241
260
|
return ret;
|
|
242
261
|
}
|
|
243
262
|
|
|
@@ -254,13 +273,26 @@ export function transformSync(s, opts) {
|
|
|
254
273
|
return takeFromExternrefTable0(ret[0]);
|
|
255
274
|
}
|
|
256
275
|
|
|
276
|
+
/**
|
|
277
|
+
* @param {string} s
|
|
278
|
+
* @param {any} opts
|
|
279
|
+
* @returns {any}
|
|
280
|
+
*/
|
|
281
|
+
export function parseSync(s, opts) {
|
|
282
|
+
const ret = wasm.parseSync(s, opts);
|
|
283
|
+
if (ret[2]) {
|
|
284
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
285
|
+
}
|
|
286
|
+
return takeFromExternrefTable0(ret[0]);
|
|
287
|
+
}
|
|
288
|
+
|
|
257
289
|
/**
|
|
258
290
|
* @param {string} s
|
|
259
291
|
* @param {any} opts
|
|
260
292
|
* @returns {Promise<any>}
|
|
261
293
|
*/
|
|
262
|
-
export function
|
|
263
|
-
const ret = wasm.
|
|
294
|
+
export function minify(s, opts) {
|
|
295
|
+
const ret = wasm.minify(s, opts);
|
|
264
296
|
return ret;
|
|
265
297
|
}
|
|
266
298
|
|
|
@@ -277,44 +309,13 @@ export function minifySync(s, opts) {
|
|
|
277
309
|
return takeFromExternrefTable0(ret[0]);
|
|
278
310
|
}
|
|
279
311
|
|
|
280
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
281
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
282
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
283
|
-
WASM_VECTOR_LEN = arg.length;
|
|
284
|
-
return ptr;
|
|
285
|
-
}
|
|
286
312
|
/**
|
|
287
|
-
* @param {
|
|
288
|
-
* @param {string} template_path
|
|
289
|
-
* @param {string} next_package_dir_path
|
|
290
|
-
* @param {any} replacements
|
|
291
|
-
* @param {any} injections
|
|
292
|
-
* @param {any} imports
|
|
293
|
-
* @returns {string}
|
|
294
|
-
*/
|
|
295
|
-
export function expandNextJsTemplate(content, template_path, next_package_dir_path, replacements, injections, imports) {
|
|
296
|
-
const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_malloc);
|
|
297
|
-
const len0 = WASM_VECTOR_LEN;
|
|
298
|
-
const ptr1 = passStringToWasm0(template_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
299
|
-
const len1 = WASM_VECTOR_LEN;
|
|
300
|
-
const ptr2 = passStringToWasm0(next_package_dir_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
301
|
-
const len2 = WASM_VECTOR_LEN;
|
|
302
|
-
const ret = wasm.expandNextJsTemplate(ptr0, len0, ptr1, len1, ptr2, len2, replacements, injections, imports);
|
|
303
|
-
if (ret[3]) {
|
|
304
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
305
|
-
}
|
|
306
|
-
var v4 = getCachedStringFromWasm0(ret[0], ret[1]);
|
|
307
|
-
if (ret[0] !== 0) { wasm.__wbindgen_free(ret[0], ret[1], 1); }
|
|
308
|
-
return v4;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* @param {any} s
|
|
313
|
+
* @param {string} s
|
|
313
314
|
* @param {any} opts
|
|
314
315
|
* @returns {Promise<any>}
|
|
315
316
|
*/
|
|
316
|
-
export function
|
|
317
|
-
const ret = wasm.
|
|
317
|
+
export function parse(s, opts) {
|
|
318
|
+
const ret = wasm.parse(s, opts);
|
|
318
319
|
return ret;
|
|
319
320
|
}
|
|
320
321
|
|
|
@@ -342,11 +343,11 @@ export function mdxCompile(value, opts) {
|
|
|
342
343
|
}
|
|
343
344
|
|
|
344
345
|
function __wbg_adapter_50(arg0, arg1, arg2) {
|
|
345
|
-
wasm.
|
|
346
|
+
wasm.closure1163_externref_shim(arg0, arg1, arg2);
|
|
346
347
|
}
|
|
347
348
|
|
|
348
349
|
function __wbg_adapter_79(arg0, arg1, arg2, arg3) {
|
|
349
|
-
wasm.
|
|
350
|
+
wasm.closure126_externref_shim(arg0, arg1, arg2, arg3);
|
|
350
351
|
}
|
|
351
352
|
|
|
352
353
|
async function __wbg_load(module, imports) {
|
|
@@ -533,13 +534,13 @@ function __wbg_get_imports() {
|
|
|
533
534
|
const ret = arg0.next();
|
|
534
535
|
return ret;
|
|
535
536
|
}, arguments) };
|
|
536
|
-
imports.wbg.
|
|
537
|
+
imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
|
|
538
|
+
queueMicrotask(arg0);
|
|
539
|
+
};
|
|
540
|
+
imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
|
|
537
541
|
const ret = arg0.queueMicrotask;
|
|
538
542
|
return ret;
|
|
539
543
|
};
|
|
540
|
-
imports.wbg.__wbg_queueMicrotask_b81e3a75ab81ca62 = function(arg0) {
|
|
541
|
-
queueMicrotask(arg0);
|
|
542
|
-
};
|
|
543
544
|
imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
|
|
544
545
|
const ret = Promise.resolve(arg0);
|
|
545
546
|
return ret;
|
|
@@ -612,8 +613,8 @@ function __wbg_get_imports() {
|
|
|
612
613
|
const ret = false;
|
|
613
614
|
return ret;
|
|
614
615
|
};
|
|
615
|
-
imports.wbg.
|
|
616
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
616
|
+
imports.wbg.__wbindgen_closure_wrapper23620 = function(arg0, arg1, arg2) {
|
|
617
|
+
const ret = makeMutClosure(arg0, arg1, 1164, __wbg_adapter_50);
|
|
617
618
|
return ret;
|
|
618
619
|
};
|
|
619
620
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
package/wasm_bg.wasm
CHANGED
|
Binary file
|