@next/swc-wasm-web 14.1.2-canary.3 → 14.1.2-canary.5
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 +13 -9
- package/wasm.js +38 -37
- package/wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/wasm.d.ts
CHANGED
|
@@ -37,17 +37,21 @@ export function transformSync(s: any, opts: any): any;
|
|
|
37
37
|
*/
|
|
38
38
|
export function transform(s: any, opts: any): Promise<any>;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
40
|
+
* Detect if metadata routes is a dynamic route, which containing
|
|
41
|
+
* generateImageMetadata or generateSitemaps as export
|
|
42
|
+
* Unlike native bindings, caller should provide the contents of the pages
|
|
43
|
+
* sine our wasm bindings does not have access to the file system
|
|
44
|
+
* @param {string} page_file_path
|
|
45
|
+
* @param {string} page_contents
|
|
46
|
+
* @returns {Promise<any>}
|
|
43
47
|
*/
|
|
44
|
-
export function
|
|
48
|
+
export function isDynamicMetadataRoute(page_file_path: string, page_contents: string): Promise<any>;
|
|
45
49
|
/**
|
|
46
|
-
* @param {string}
|
|
47
|
-
* @param {
|
|
50
|
+
* @param {string} page_file_path
|
|
51
|
+
* @param {string} page_contents
|
|
48
52
|
* @returns {Promise<any>}
|
|
49
53
|
*/
|
|
50
|
-
export function
|
|
54
|
+
export function getPageStaticInfo(page_file_path: string, page_contents: string): Promise<any>;
|
|
51
55
|
|
|
52
56
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
53
57
|
|
|
@@ -59,8 +63,8 @@ export interface InitOutput {
|
|
|
59
63
|
readonly minify: (a: number, b: number) => number;
|
|
60
64
|
readonly transformSync: (a: number, b: number, c: number) => void;
|
|
61
65
|
readonly transform: (a: number, b: number) => number;
|
|
62
|
-
readonly
|
|
63
|
-
readonly
|
|
66
|
+
readonly isDynamicMetadataRoute: (a: number, b: number, c: number, d: number) => number;
|
|
67
|
+
readonly getPageStaticInfo: (a: number, b: number, c: number, d: number) => number;
|
|
64
68
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
65
69
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
66
70
|
readonly __wbindgen_export_2: WebAssembly.Table;
|
package/wasm.js
CHANGED
|
@@ -346,33 +346,34 @@ export function transform(s, opts) {
|
|
|
346
346
|
}
|
|
347
347
|
|
|
348
348
|
/**
|
|
349
|
-
*
|
|
350
|
-
*
|
|
351
|
-
*
|
|
349
|
+
* Detect if metadata routes is a dynamic route, which containing
|
|
350
|
+
* generateImageMetadata or generateSitemaps as export
|
|
351
|
+
* Unlike native bindings, caller should provide the contents of the pages
|
|
352
|
+
* sine our wasm bindings does not have access to the file system
|
|
353
|
+
* @param {string} page_file_path
|
|
354
|
+
* @param {string} page_contents
|
|
355
|
+
* @returns {Promise<any>}
|
|
352
356
|
*/
|
|
353
|
-
export function
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
if (r2) {
|
|
361
|
-
throw takeObject(r1);
|
|
362
|
-
}
|
|
363
|
-
return takeObject(r0);
|
|
364
|
-
} finally {
|
|
365
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
366
|
-
}
|
|
357
|
+
export function isDynamicMetadataRoute(page_file_path, page_contents) {
|
|
358
|
+
const ptr0 = passStringToWasm0(page_file_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
359
|
+
const len0 = WASM_VECTOR_LEN;
|
|
360
|
+
const ptr1 = passStringToWasm0(page_contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
361
|
+
const len1 = WASM_VECTOR_LEN;
|
|
362
|
+
const ret = wasm.isDynamicMetadataRoute(ptr0, len0, ptr1, len1);
|
|
363
|
+
return takeObject(ret);
|
|
367
364
|
}
|
|
368
365
|
|
|
369
366
|
/**
|
|
370
|
-
* @param {string}
|
|
371
|
-
* @param {
|
|
367
|
+
* @param {string} page_file_path
|
|
368
|
+
* @param {string} page_contents
|
|
372
369
|
* @returns {Promise<any>}
|
|
373
370
|
*/
|
|
374
|
-
export function
|
|
375
|
-
const
|
|
371
|
+
export function getPageStaticInfo(page_file_path, page_contents) {
|
|
372
|
+
const ptr0 = passStringToWasm0(page_file_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
373
|
+
const len0 = WASM_VECTOR_LEN;
|
|
374
|
+
const ptr1 = passStringToWasm0(page_contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
375
|
+
const len1 = WASM_VECTOR_LEN;
|
|
376
|
+
const ret = wasm.getPageStaticInfo(ptr0, len0, ptr1, len1);
|
|
376
377
|
return takeObject(ret);
|
|
377
378
|
}
|
|
378
379
|
|
|
@@ -685,20 +686,6 @@ imports.wbg.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
|
|
|
685
686
|
const ret = getObject(arg0)[getObject(arg1)];
|
|
686
687
|
return addHeapObject(ret);
|
|
687
688
|
};
|
|
688
|
-
imports.wbg.__wbg_new_632630b5cec17f21 = function() {
|
|
689
|
-
const ret = new Object();
|
|
690
|
-
return addHeapObject(ret);
|
|
691
|
-
};
|
|
692
|
-
imports.wbg.__wbg_set_20cbc34131e76824 = function(arg0, arg1, arg2) {
|
|
693
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
694
|
-
};
|
|
695
|
-
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
696
|
-
const ret = debugString(getObject(arg1));
|
|
697
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
698
|
-
const len1 = WASM_VECTOR_LEN;
|
|
699
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
700
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
701
|
-
};
|
|
702
689
|
imports.wbg.__wbg_new_70828a4353259d4b = function(arg0, arg1) {
|
|
703
690
|
try {
|
|
704
691
|
var state0 = {a: arg0, b: arg1};
|
|
@@ -717,6 +704,20 @@ imports.wbg.__wbg_new_70828a4353259d4b = function(arg0, arg1) {
|
|
|
717
704
|
state0.a = state0.b = 0;
|
|
718
705
|
}
|
|
719
706
|
};
|
|
707
|
+
imports.wbg.__wbg_new_632630b5cec17f21 = function() {
|
|
708
|
+
const ret = new Object();
|
|
709
|
+
return addHeapObject(ret);
|
|
710
|
+
};
|
|
711
|
+
imports.wbg.__wbg_set_20cbc34131e76824 = function(arg0, arg1, arg2) {
|
|
712
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
713
|
+
};
|
|
714
|
+
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
715
|
+
const ret = debugString(getObject(arg1));
|
|
716
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
717
|
+
const len1 = WASM_VECTOR_LEN;
|
|
718
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
719
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
720
|
+
};
|
|
720
721
|
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
721
722
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
722
723
|
};
|
|
@@ -744,8 +745,8 @@ imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
|
744
745
|
const ret = false;
|
|
745
746
|
return ret;
|
|
746
747
|
};
|
|
747
|
-
imports.wbg.
|
|
748
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
748
|
+
imports.wbg.__wbindgen_closure_wrapper26368 = function(arg0, arg1, arg2) {
|
|
749
|
+
const ret = makeMutClosure(arg0, arg1, 432, __wbg_adapter_48);
|
|
749
750
|
return addHeapObject(ret);
|
|
750
751
|
};
|
|
751
752
|
|
package/wasm_bg.wasm
CHANGED
|
Binary file
|