@next/swc-wasm-nodejs 16.1.0-canary.2 → 16.1.0-canary.4
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 +6 -6
- package/wasm.js +61 -62
- 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
|
|
4
|
-
export function
|
|
3
|
+
export function mdxCompileSync(value: string, opts: any): any;
|
|
4
|
+
export function mdxCompile(value: string, opts: any): Promise<any>;
|
|
5
|
+
export function minify(s: string, opts: any): Promise<any>;
|
|
5
6
|
export function transformSync(s: any, opts: any): any;
|
|
7
|
+
export function parse(s: string, opts: any): Promise<any>;
|
|
6
8
|
export function parseSync(s: string, opts: any): any;
|
|
7
|
-
export function
|
|
9
|
+
export function transform(s: any, opts: any): Promise<any>;
|
|
10
|
+
export function expandNextJsTemplate(content: Uint8Array, template_path: string, next_package_dir_path: string, replacements: any, injections: any, imports: any): string;
|
|
8
11
|
export function minifySync(s: string, opts: any): any;
|
|
9
|
-
export function parse(s: string, opts: any): Promise<any>;
|
|
10
|
-
export function mdxCompileSync(value: string, opts: any): any;
|
|
11
|
-
export function mdxCompile(value: string, opts: any): Promise<any>;
|
package/wasm.js
CHANGED
|
@@ -217,73 +217,51 @@ 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
|
-
|
|
227
220
|
function takeFromExternrefTable0(idx) {
|
|
228
221
|
const value = wasm.__wbindgen_export_4.get(idx);
|
|
229
222
|
wasm.__externref_table_dealloc(idx);
|
|
230
223
|
return value;
|
|
231
224
|
}
|
|
232
225
|
/**
|
|
233
|
-
* @param {
|
|
234
|
-
* @param {
|
|
235
|
-
* @
|
|
236
|
-
* @param {any} replacements
|
|
237
|
-
* @param {any} injections
|
|
238
|
-
* @param {any} imports
|
|
239
|
-
* @returns {string}
|
|
226
|
+
* @param {string} value
|
|
227
|
+
* @param {any} opts
|
|
228
|
+
* @returns {any}
|
|
240
229
|
*/
|
|
241
|
-
module.exports.
|
|
242
|
-
const
|
|
243
|
-
|
|
244
|
-
|
|
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]);
|
|
230
|
+
module.exports.mdxCompileSync = function(value, opts) {
|
|
231
|
+
const ret = wasm.mdxCompileSync(value, opts);
|
|
232
|
+
if (ret[2]) {
|
|
233
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
251
234
|
}
|
|
252
|
-
|
|
253
|
-
if (ret[0] !== 0) { wasm.__wbindgen_free(ret[0], ret[1], 1); }
|
|
254
|
-
return v4;
|
|
235
|
+
return takeFromExternrefTable0(ret[0]);
|
|
255
236
|
};
|
|
256
237
|
|
|
257
238
|
/**
|
|
258
|
-
* @param {
|
|
239
|
+
* @param {string} value
|
|
259
240
|
* @param {any} opts
|
|
260
241
|
* @returns {Promise<any>}
|
|
261
242
|
*/
|
|
262
|
-
module.exports.
|
|
263
|
-
const ret = wasm.
|
|
243
|
+
module.exports.mdxCompile = function(value, opts) {
|
|
244
|
+
const ret = wasm.mdxCompile(value, opts);
|
|
264
245
|
return ret;
|
|
265
246
|
};
|
|
266
247
|
|
|
267
248
|
/**
|
|
268
|
-
* @param {
|
|
249
|
+
* @param {string} s
|
|
269
250
|
* @param {any} opts
|
|
270
|
-
* @returns {any}
|
|
251
|
+
* @returns {Promise<any>}
|
|
271
252
|
*/
|
|
272
|
-
module.exports.
|
|
273
|
-
const ret = wasm.
|
|
274
|
-
|
|
275
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
276
|
-
}
|
|
277
|
-
return takeFromExternrefTable0(ret[0]);
|
|
253
|
+
module.exports.minify = function(s, opts) {
|
|
254
|
+
const ret = wasm.minify(s, opts);
|
|
255
|
+
return ret;
|
|
278
256
|
};
|
|
279
257
|
|
|
280
258
|
/**
|
|
281
|
-
* @param {
|
|
259
|
+
* @param {any} s
|
|
282
260
|
* @param {any} opts
|
|
283
261
|
* @returns {any}
|
|
284
262
|
*/
|
|
285
|
-
module.exports.
|
|
286
|
-
const ret = wasm.
|
|
263
|
+
module.exports.transformSync = function(s, opts) {
|
|
264
|
+
const ret = wasm.transformSync(s, opts);
|
|
287
265
|
if (ret[2]) {
|
|
288
266
|
throw takeFromExternrefTable0(ret[1]);
|
|
289
267
|
}
|
|
@@ -295,8 +273,8 @@ module.exports.parseSync = function(s, opts) {
|
|
|
295
273
|
* @param {any} opts
|
|
296
274
|
* @returns {Promise<any>}
|
|
297
275
|
*/
|
|
298
|
-
module.exports.
|
|
299
|
-
const ret = wasm.
|
|
276
|
+
module.exports.parse = function(s, opts) {
|
|
277
|
+
const ret = wasm.parse(s, opts);
|
|
300
278
|
return ret;
|
|
301
279
|
};
|
|
302
280
|
|
|
@@ -305,8 +283,8 @@ module.exports.minify = function(s, opts) {
|
|
|
305
283
|
* @param {any} opts
|
|
306
284
|
* @returns {any}
|
|
307
285
|
*/
|
|
308
|
-
module.exports.
|
|
309
|
-
const ret = wasm.
|
|
286
|
+
module.exports.parseSync = function(s, opts) {
|
|
287
|
+
const ret = wasm.parseSync(s, opts);
|
|
310
288
|
if (ret[2]) {
|
|
311
289
|
throw takeFromExternrefTable0(ret[1]);
|
|
312
290
|
}
|
|
@@ -314,36 +292,57 @@ module.exports.minifySync = function(s, opts) {
|
|
|
314
292
|
};
|
|
315
293
|
|
|
316
294
|
/**
|
|
317
|
-
* @param {
|
|
295
|
+
* @param {any} s
|
|
318
296
|
* @param {any} opts
|
|
319
297
|
* @returns {Promise<any>}
|
|
320
298
|
*/
|
|
321
|
-
module.exports.
|
|
322
|
-
const ret = wasm.
|
|
299
|
+
module.exports.transform = function(s, opts) {
|
|
300
|
+
const ret = wasm.transform(s, opts);
|
|
323
301
|
return ret;
|
|
324
302
|
};
|
|
325
303
|
|
|
304
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
305
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
306
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
307
|
+
WASM_VECTOR_LEN = arg.length;
|
|
308
|
+
return ptr;
|
|
309
|
+
}
|
|
326
310
|
/**
|
|
327
|
-
* @param {
|
|
328
|
-
* @param {
|
|
329
|
-
* @
|
|
311
|
+
* @param {Uint8Array} content
|
|
312
|
+
* @param {string} template_path
|
|
313
|
+
* @param {string} next_package_dir_path
|
|
314
|
+
* @param {any} replacements
|
|
315
|
+
* @param {any} injections
|
|
316
|
+
* @param {any} imports
|
|
317
|
+
* @returns {string}
|
|
330
318
|
*/
|
|
331
|
-
module.exports.
|
|
332
|
-
const
|
|
333
|
-
|
|
334
|
-
|
|
319
|
+
module.exports.expandNextJsTemplate = function(content, template_path, next_package_dir_path, replacements, injections, imports) {
|
|
320
|
+
const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_malloc);
|
|
321
|
+
const len0 = WASM_VECTOR_LEN;
|
|
322
|
+
const ptr1 = passStringToWasm0(template_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
323
|
+
const len1 = WASM_VECTOR_LEN;
|
|
324
|
+
const ptr2 = passStringToWasm0(next_package_dir_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
325
|
+
const len2 = WASM_VECTOR_LEN;
|
|
326
|
+
const ret = wasm.expandNextJsTemplate(ptr0, len0, ptr1, len1, ptr2, len2, replacements, injections, imports);
|
|
327
|
+
if (ret[3]) {
|
|
328
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
335
329
|
}
|
|
336
|
-
|
|
330
|
+
var v4 = getCachedStringFromWasm0(ret[0], ret[1]);
|
|
331
|
+
if (ret[0] !== 0) { wasm.__wbindgen_free(ret[0], ret[1], 1); }
|
|
332
|
+
return v4;
|
|
337
333
|
};
|
|
338
334
|
|
|
339
335
|
/**
|
|
340
|
-
* @param {string}
|
|
336
|
+
* @param {string} s
|
|
341
337
|
* @param {any} opts
|
|
342
|
-
* @returns {
|
|
338
|
+
* @returns {any}
|
|
343
339
|
*/
|
|
344
|
-
module.exports.
|
|
345
|
-
const ret = wasm.
|
|
346
|
-
|
|
340
|
+
module.exports.minifySync = function(s, opts) {
|
|
341
|
+
const ret = wasm.minifySync(s, opts);
|
|
342
|
+
if (ret[2]) {
|
|
343
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
344
|
+
}
|
|
345
|
+
return takeFromExternrefTable0(ret[0]);
|
|
347
346
|
};
|
|
348
347
|
|
|
349
348
|
function __wbg_adapter_50(arg0, arg1, arg2) {
|
|
@@ -631,7 +630,7 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
|
631
630
|
return ret;
|
|
632
631
|
};
|
|
633
632
|
|
|
634
|
-
module.exports.
|
|
633
|
+
module.exports.__wbindgen_closure_wrapper23621 = function(arg0, arg1, arg2) {
|
|
635
634
|
const ret = makeMutClosure(arg0, arg1, 1166, __wbg_adapter_50);
|
|
636
635
|
return ret;
|
|
637
636
|
};
|
package/wasm_bg.wasm
CHANGED
|
Binary file
|