@next/swc-wasm-nodejs 14.1.1-canary.6 → 14.1.1-canary.7

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next/swc-wasm-nodejs",
3
- "version": "14.1.1-canary.6",
3
+ "version": "14.1.1-canary.7",
4
4
  "files": [
5
5
  "wasm_bg.wasm",
6
6
  "wasm.js",
package/wasm.d.ts CHANGED
@@ -1,6 +1,18 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
+ * @param {string} value
5
+ * @param {any} opts
6
+ * @returns {any}
7
+ */
8
+ export function mdxCompileSync(value: string, opts: any): any;
9
+ /**
10
+ * @param {string} value
11
+ * @param {any} opts
12
+ * @returns {Promise<any>}
13
+ */
14
+ export function mdxCompile(value: string, opts: any): Promise<any>;
15
+ /**
4
16
  * @param {string} s
5
17
  * @param {any} opts
6
18
  * @returns {any}
@@ -25,30 +37,14 @@ export function transformSync(s: any, opts: any): any;
25
37
  */
26
38
  export function transform(s: any, opts: any): Promise<any>;
27
39
  /**
28
- * Detect if metadata routes is a dynamic route, which containing
29
- * generateImageMetadata or generateSitemaps as export
30
- * Unlike native bindings, caller should provide the contents of the pages
31
- * sine our wasm bindings does not have access to the file system
32
- * @param {string} page_file_path
33
- * @param {string} page_contents
34
- * @returns {Promise<any>}
35
- */
36
- export function isDynamicMetadataRoute(page_file_path: string, page_contents: string): Promise<any>;
37
- /**
38
- * @param {string} page_file_path
39
- * @param {string} page_contents
40
- * @returns {Promise<any>}
41
- */
42
- export function getPageStaticInfo(page_file_path: string, page_contents: string): Promise<any>;
43
- /**
44
- * @param {string} value
40
+ * @param {string} s
45
41
  * @param {any} opts
46
42
  * @returns {any}
47
43
  */
48
- export function mdxCompileSync(value: string, opts: any): any;
44
+ export function parseSync(s: string, opts: any): any;
49
45
  /**
50
- * @param {string} value
46
+ * @param {string} s
51
47
  * @param {any} opts
52
48
  * @returns {Promise<any>}
53
49
  */
54
- export function mdxCompile(value: string, opts: any): Promise<any>;
50
+ export function parse(s: string, opts: any): Promise<any>;
package/wasm.js CHANGED
@@ -228,6 +228,37 @@ function __wbg_adapter_48(arg0, arg1, arg2) {
228
228
  wasm.wasm_bindgen_3fb300003f18f35c___convert__closures__invoke1_mut___wasm_bindgen_3fb300003f18f35c___JsValue_____(arg0, arg1, addHeapObject(arg2));
229
229
  }
230
230
 
231
+ /**
232
+ * @param {string} value
233
+ * @param {any} opts
234
+ * @returns {any}
235
+ */
236
+ module.exports.mdxCompileSync = function(value, opts) {
237
+ try {
238
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
239
+ wasm.mdxCompileSync(retptr, addHeapObject(value), addHeapObject(opts));
240
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
241
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
242
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
243
+ if (r2) {
244
+ throw takeObject(r1);
245
+ }
246
+ return takeObject(r0);
247
+ } finally {
248
+ wasm.__wbindgen_add_to_stack_pointer(16);
249
+ }
250
+ };
251
+
252
+ /**
253
+ * @param {string} value
254
+ * @param {any} opts
255
+ * @returns {Promise<any>}
256
+ */
257
+ module.exports.mdxCompile = function(value, opts) {
258
+ const ret = wasm.mdxCompile(addHeapObject(value), addHeapObject(opts));
259
+ return takeObject(ret);
260
+ };
261
+
231
262
  /**
232
263
  * @param {string} s
233
264
  * @param {any} opts
@@ -291,46 +322,14 @@ module.exports.transform = function(s, opts) {
291
322
  };
292
323
 
293
324
  /**
294
- * Detect if metadata routes is a dynamic route, which containing
295
- * generateImageMetadata or generateSitemaps as export
296
- * Unlike native bindings, caller should provide the contents of the pages
297
- * sine our wasm bindings does not have access to the file system
298
- * @param {string} page_file_path
299
- * @param {string} page_contents
300
- * @returns {Promise<any>}
301
- */
302
- module.exports.isDynamicMetadataRoute = function(page_file_path, page_contents) {
303
- const ptr0 = passStringToWasm0(page_file_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
304
- const len0 = WASM_VECTOR_LEN;
305
- const ptr1 = passStringToWasm0(page_contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
306
- const len1 = WASM_VECTOR_LEN;
307
- const ret = wasm.isDynamicMetadataRoute(ptr0, len0, ptr1, len1);
308
- return takeObject(ret);
309
- };
310
-
311
- /**
312
- * @param {string} page_file_path
313
- * @param {string} page_contents
314
- * @returns {Promise<any>}
315
- */
316
- module.exports.getPageStaticInfo = function(page_file_path, page_contents) {
317
- const ptr0 = passStringToWasm0(page_file_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
318
- const len0 = WASM_VECTOR_LEN;
319
- const ptr1 = passStringToWasm0(page_contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
320
- const len1 = WASM_VECTOR_LEN;
321
- const ret = wasm.getPageStaticInfo(ptr0, len0, ptr1, len1);
322
- return takeObject(ret);
323
- };
324
-
325
- /**
326
- * @param {string} value
325
+ * @param {string} s
327
326
  * @param {any} opts
328
327
  * @returns {any}
329
328
  */
330
- module.exports.mdxCompileSync = function(value, opts) {
329
+ module.exports.parseSync = function(s, opts) {
331
330
  try {
332
331
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
333
- wasm.mdxCompileSync(retptr, addHeapObject(value), addHeapObject(opts));
332
+ wasm.parseSync(retptr, addHeapObject(s), addHeapObject(opts));
334
333
  var r0 = getInt32Memory0()[retptr / 4 + 0];
335
334
  var r1 = getInt32Memory0()[retptr / 4 + 1];
336
335
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -344,12 +343,12 @@ module.exports.mdxCompileSync = function(value, opts) {
344
343
  };
345
344
 
346
345
  /**
347
- * @param {string} value
346
+ * @param {string} s
348
347
  * @param {any} opts
349
348
  * @returns {Promise<any>}
350
349
  */
351
- module.exports.mdxCompile = function(value, opts) {
352
- const ret = wasm.mdxCompile(addHeapObject(value), addHeapObject(opts));
350
+ module.exports.parse = function(s, opts) {
351
+ const ret = wasm.parse(addHeapObject(s), addHeapObject(opts));
353
352
  return takeObject(ret);
354
353
  };
355
354
 
@@ -439,13 +438,13 @@ module.exports.__wbindgen_is_undefined = function(arg0) {
439
438
  return ret;
440
439
  };
441
440
 
442
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
443
- const ret = getStringFromWasm0(arg0, arg1);
441
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
442
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
444
443
  return addHeapObject(ret);
445
444
  };
446
445
 
447
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
448
- const ret = new Error(getStringFromWasm0(arg0, arg1));
446
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
447
+ const ret = getStringFromWasm0(arg0, arg1);
449
448
  return addHeapObject(ret);
450
449
  };
451
450
 
@@ -770,8 +769,8 @@ module.exports.__wbindgen_memory = function() {
770
769
  return addHeapObject(ret);
771
770
  };
772
771
 
773
- module.exports.__wbindgen_closure_wrapper14626 = function(arg0, arg1, arg2) {
774
- const ret = makeMutClosure(arg0, arg1, 3221, __wbg_adapter_48);
772
+ module.exports.__wbindgen_closure_wrapper14478 = function(arg0, arg1, arg2) {
773
+ const ret = makeMutClosure(arg0, arg1, 3211, __wbg_adapter_48);
775
774
  return addHeapObject(ret);
776
775
  };
777
776
 
package/wasm_bg.wasm CHANGED
Binary file