@next/swc-wasm-nodejs 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 +1 -1
- package/wasm.d.ts +4 -4
- package/wasm.js +57 -56
- package/wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/wasm.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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>;
|
package/wasm.js
CHANGED
|
@@ -217,31 +217,50 @@ function debugString(val) {
|
|
|
217
217
|
return className;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
221
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
222
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
223
|
+
WASM_VECTOR_LEN = arg.length;
|
|
224
|
+
return ptr;
|
|
225
|
+
}
|
|
226
|
+
|
|
220
227
|
function takeFromExternrefTable0(idx) {
|
|
221
228
|
const value = wasm.__wbindgen_export_4.get(idx);
|
|
222
229
|
wasm.__externref_table_dealloc(idx);
|
|
223
230
|
return value;
|
|
224
231
|
}
|
|
225
232
|
/**
|
|
226
|
-
* @param {
|
|
227
|
-
* @param {
|
|
228
|
-
* @
|
|
233
|
+
* @param {Uint8Array} content
|
|
234
|
+
* @param {string} template_path
|
|
235
|
+
* @param {string} next_package_dir_path
|
|
236
|
+
* @param {any} replacements
|
|
237
|
+
* @param {any} injections
|
|
238
|
+
* @param {any} imports
|
|
239
|
+
* @returns {string}
|
|
229
240
|
*/
|
|
230
|
-
module.exports.
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
|
|
241
|
+
module.exports.expandNextJsTemplate = function(content, template_path, next_package_dir_path, replacements, injections, imports) {
|
|
242
|
+
const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_malloc);
|
|
243
|
+
const len0 = WASM_VECTOR_LEN;
|
|
244
|
+
const ptr1 = passStringToWasm0(template_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
245
|
+
const len1 = WASM_VECTOR_LEN;
|
|
246
|
+
const ptr2 = passStringToWasm0(next_package_dir_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
247
|
+
const len2 = WASM_VECTOR_LEN;
|
|
248
|
+
const ret = wasm.expandNextJsTemplate(ptr0, len0, ptr1, len1, ptr2, len2, replacements, injections, imports);
|
|
249
|
+
if (ret[3]) {
|
|
250
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
234
251
|
}
|
|
235
|
-
|
|
252
|
+
var v4 = getCachedStringFromWasm0(ret[0], ret[1]);
|
|
253
|
+
if (ret[0] !== 0) { wasm.__wbindgen_free(ret[0], ret[1], 1); }
|
|
254
|
+
return v4;
|
|
236
255
|
};
|
|
237
256
|
|
|
238
257
|
/**
|
|
239
|
-
* @param {
|
|
258
|
+
* @param {any} s
|
|
240
259
|
* @param {any} opts
|
|
241
260
|
* @returns {Promise<any>}
|
|
242
261
|
*/
|
|
243
|
-
module.exports.
|
|
244
|
-
const ret = wasm.
|
|
262
|
+
module.exports.transform = function(s, opts) {
|
|
263
|
+
const ret = wasm.transform(s, opts);
|
|
245
264
|
return ret;
|
|
246
265
|
};
|
|
247
266
|
|
|
@@ -258,13 +277,26 @@ module.exports.transformSync = function(s, opts) {
|
|
|
258
277
|
return takeFromExternrefTable0(ret[0]);
|
|
259
278
|
};
|
|
260
279
|
|
|
280
|
+
/**
|
|
281
|
+
* @param {string} s
|
|
282
|
+
* @param {any} opts
|
|
283
|
+
* @returns {any}
|
|
284
|
+
*/
|
|
285
|
+
module.exports.parseSync = function(s, opts) {
|
|
286
|
+
const ret = wasm.parseSync(s, opts);
|
|
287
|
+
if (ret[2]) {
|
|
288
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
289
|
+
}
|
|
290
|
+
return takeFromExternrefTable0(ret[0]);
|
|
291
|
+
};
|
|
292
|
+
|
|
261
293
|
/**
|
|
262
294
|
* @param {string} s
|
|
263
295
|
* @param {any} opts
|
|
264
296
|
* @returns {Promise<any>}
|
|
265
297
|
*/
|
|
266
|
-
module.exports.
|
|
267
|
-
const ret = wasm.
|
|
298
|
+
module.exports.minify = function(s, opts) {
|
|
299
|
+
const ret = wasm.minify(s, opts);
|
|
268
300
|
return ret;
|
|
269
301
|
};
|
|
270
302
|
|
|
@@ -281,44 +313,13 @@ module.exports.minifySync = function(s, opts) {
|
|
|
281
313
|
return takeFromExternrefTable0(ret[0]);
|
|
282
314
|
};
|
|
283
315
|
|
|
284
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
285
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
286
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
287
|
-
WASM_VECTOR_LEN = arg.length;
|
|
288
|
-
return ptr;
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* @param {Uint8Array} content
|
|
292
|
-
* @param {string} template_path
|
|
293
|
-
* @param {string} next_package_dir_path
|
|
294
|
-
* @param {any} replacements
|
|
295
|
-
* @param {any} injections
|
|
296
|
-
* @param {any} imports
|
|
297
|
-
* @returns {string}
|
|
298
|
-
*/
|
|
299
|
-
module.exports.expandNextJsTemplate = function(content, template_path, next_package_dir_path, replacements, injections, imports) {
|
|
300
|
-
const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_malloc);
|
|
301
|
-
const len0 = WASM_VECTOR_LEN;
|
|
302
|
-
const ptr1 = passStringToWasm0(template_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
303
|
-
const len1 = WASM_VECTOR_LEN;
|
|
304
|
-
const ptr2 = passStringToWasm0(next_package_dir_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
305
|
-
const len2 = WASM_VECTOR_LEN;
|
|
306
|
-
const ret = wasm.expandNextJsTemplate(ptr0, len0, ptr1, len1, ptr2, len2, replacements, injections, imports);
|
|
307
|
-
if (ret[3]) {
|
|
308
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
309
|
-
}
|
|
310
|
-
var v4 = getCachedStringFromWasm0(ret[0], ret[1]);
|
|
311
|
-
if (ret[0] !== 0) { wasm.__wbindgen_free(ret[0], ret[1], 1); }
|
|
312
|
-
return v4;
|
|
313
|
-
};
|
|
314
|
-
|
|
315
316
|
/**
|
|
316
|
-
* @param {
|
|
317
|
+
* @param {string} s
|
|
317
318
|
* @param {any} opts
|
|
318
319
|
* @returns {Promise<any>}
|
|
319
320
|
*/
|
|
320
|
-
module.exports.
|
|
321
|
-
const ret = wasm.
|
|
321
|
+
module.exports.parse = function(s, opts) {
|
|
322
|
+
const ret = wasm.parse(s, opts);
|
|
322
323
|
return ret;
|
|
323
324
|
};
|
|
324
325
|
|
|
@@ -346,11 +347,11 @@ module.exports.mdxCompile = function(value, opts) {
|
|
|
346
347
|
};
|
|
347
348
|
|
|
348
349
|
function __wbg_adapter_50(arg0, arg1, arg2) {
|
|
349
|
-
wasm.
|
|
350
|
+
wasm.closure1163_externref_shim(arg0, arg1, arg2);
|
|
350
351
|
}
|
|
351
352
|
|
|
352
353
|
function __wbg_adapter_79(arg0, arg1, arg2, arg3) {
|
|
353
|
-
wasm.
|
|
354
|
+
wasm.closure126_externref_shim(arg0, arg1, arg2, arg3);
|
|
354
355
|
}
|
|
355
356
|
|
|
356
357
|
module.exports.__wbg_String_fed4d24b68977888 = function(arg0, arg1) {
|
|
@@ -533,13 +534,13 @@ module.exports.__wbg_next_6574e1a8a62d1055 = function() { return handleError(fun
|
|
|
533
534
|
return ret;
|
|
534
535
|
}, arguments) };
|
|
535
536
|
|
|
536
|
-
module.exports.
|
|
537
|
-
|
|
538
|
-
return ret;
|
|
537
|
+
module.exports.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
|
|
538
|
+
queueMicrotask(arg0);
|
|
539
539
|
};
|
|
540
540
|
|
|
541
|
-
module.exports.
|
|
542
|
-
queueMicrotask
|
|
541
|
+
module.exports.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
|
|
542
|
+
const ret = arg0.queueMicrotask;
|
|
543
|
+
return ret;
|
|
543
544
|
};
|
|
544
545
|
|
|
545
546
|
module.exports.__wbg_resolve_4851785c9c5f573d = function(arg0) {
|
|
@@ -630,8 +631,8 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
|
630
631
|
return ret;
|
|
631
632
|
};
|
|
632
633
|
|
|
633
|
-
module.exports.
|
|
634
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
634
|
+
module.exports.__wbindgen_closure_wrapper23620 = function(arg0, arg1, arg2) {
|
|
635
|
+
const ret = makeMutClosure(arg0, arg1, 1164, __wbg_adapter_50);
|
|
635
636
|
return ret;
|
|
636
637
|
};
|
|
637
638
|
|
package/wasm_bg.wasm
CHANGED
|
Binary file
|