@next/swc-wasm-web 16.0.1 → 16.0.2-canary.1
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 +5 -5
- package/wasm.js +54 -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.1",
|
|
3
|
+
"version": "16.0.2-canary.1",
|
|
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 minifySync(s: string, opts: any): any;
|
|
5
3
|
export function parseSync(s: string, opts: any): any;
|
|
6
4
|
export function minify(s: string, opts: any): Promise<any>;
|
|
7
|
-
export function transform(s: any, opts: any): Promise<any>;
|
|
8
|
-
export function parse(s: string, opts: any): Promise<any>;
|
|
9
5
|
export function transformSync(s: any, opts: any): any;
|
|
6
|
+
export function parse(s: string, opts: any): Promise<any>;
|
|
7
|
+
export function minifySync(s: string, opts: any): any;
|
|
8
|
+
export function expandNextJsTemplate(content: Uint8Array, template_path: string, next_package_dir_path: string, replacements: any, injections: any, imports: any): string;
|
|
9
|
+
export function transform(s: any, 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
|
|
|
@@ -31,7 +31,7 @@ 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
|
|
34
|
+
readonly closure1168_externref_shim: (a: number, b: number, c: any) => void;
|
|
35
35
|
readonly closure124_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
36
36
|
readonly __wbindgen_start: () => void;
|
|
37
37
|
}
|
package/wasm.js
CHANGED
|
@@ -213,56 +213,11 @@ 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
|
-
|
|
223
216
|
function takeFromExternrefTable0(idx) {
|
|
224
217
|
const value = wasm.__wbindgen_export_4.get(idx);
|
|
225
218
|
wasm.__externref_table_dealloc(idx);
|
|
226
219
|
return value;
|
|
227
220
|
}
|
|
228
|
-
/**
|
|
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}
|
|
236
|
-
*/
|
|
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]);
|
|
247
|
-
}
|
|
248
|
-
var v4 = getCachedStringFromWasm0(ret[0], ret[1]);
|
|
249
|
-
if (ret[0] !== 0) { wasm.__wbindgen_free(ret[0], ret[1], 1); }
|
|
250
|
-
return v4;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
* @param {string} s
|
|
255
|
-
* @param {any} opts
|
|
256
|
-
* @returns {any}
|
|
257
|
-
*/
|
|
258
|
-
export function minifySync(s, opts) {
|
|
259
|
-
const ret = wasm.minifySync(s, opts);
|
|
260
|
-
if (ret[2]) {
|
|
261
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
262
|
-
}
|
|
263
|
-
return takeFromExternrefTable0(ret[0]);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
221
|
/**
|
|
267
222
|
* @param {string} s
|
|
268
223
|
* @param {any} opts
|
|
@@ -289,11 +244,14 @@ export function minify(s, opts) {
|
|
|
289
244
|
/**
|
|
290
245
|
* @param {any} s
|
|
291
246
|
* @param {any} opts
|
|
292
|
-
* @returns {
|
|
247
|
+
* @returns {any}
|
|
293
248
|
*/
|
|
294
|
-
export function
|
|
295
|
-
const ret = wasm.
|
|
296
|
-
|
|
249
|
+
export function transformSync(s, opts) {
|
|
250
|
+
const ret = wasm.transformSync(s, opts);
|
|
251
|
+
if (ret[2]) {
|
|
252
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
253
|
+
}
|
|
254
|
+
return takeFromExternrefTable0(ret[0]);
|
|
297
255
|
}
|
|
298
256
|
|
|
299
257
|
/**
|
|
@@ -307,18 +265,59 @@ export function parse(s, opts) {
|
|
|
307
265
|
}
|
|
308
266
|
|
|
309
267
|
/**
|
|
310
|
-
* @param {
|
|
268
|
+
* @param {string} s
|
|
311
269
|
* @param {any} opts
|
|
312
270
|
* @returns {any}
|
|
313
271
|
*/
|
|
314
|
-
export function
|
|
315
|
-
const ret = wasm.
|
|
272
|
+
export function minifySync(s, opts) {
|
|
273
|
+
const ret = wasm.minifySync(s, opts);
|
|
316
274
|
if (ret[2]) {
|
|
317
275
|
throw takeFromExternrefTable0(ret[1]);
|
|
318
276
|
}
|
|
319
277
|
return takeFromExternrefTable0(ret[0]);
|
|
320
278
|
}
|
|
321
279
|
|
|
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
|
+
/**
|
|
287
|
+
* @param {Uint8Array} content
|
|
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 {any} opts
|
|
314
|
+
* @returns {Promise<any>}
|
|
315
|
+
*/
|
|
316
|
+
export function transform(s, opts) {
|
|
317
|
+
const ret = wasm.transform(s, opts);
|
|
318
|
+
return ret;
|
|
319
|
+
}
|
|
320
|
+
|
|
322
321
|
/**
|
|
323
322
|
* @param {string} value
|
|
324
323
|
* @param {any} opts
|
|
@@ -343,7 +342,7 @@ export function mdxCompile(value, opts) {
|
|
|
343
342
|
}
|
|
344
343
|
|
|
345
344
|
function __wbg_adapter_50(arg0, arg1, arg2) {
|
|
346
|
-
wasm.
|
|
345
|
+
wasm.closure1168_externref_shim(arg0, arg1, arg2);
|
|
347
346
|
}
|
|
348
347
|
|
|
349
348
|
function __wbg_adapter_79(arg0, arg1, arg2, arg3) {
|
|
@@ -613,8 +612,8 @@ function __wbg_get_imports() {
|
|
|
613
612
|
const ret = false;
|
|
614
613
|
return ret;
|
|
615
614
|
};
|
|
616
|
-
imports.wbg.
|
|
617
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
615
|
+
imports.wbg.__wbindgen_closure_wrapper23909 = function(arg0, arg1, arg2) {
|
|
616
|
+
const ret = makeMutClosure(arg0, arg1, 1169, __wbg_adapter_50);
|
|
618
617
|
return ret;
|
|
619
618
|
};
|
|
620
619
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
package/wasm_bg.wasm
CHANGED
|
Binary file
|