@ferscloud/fers-calculation-web 0.2.35 → 0.2.37
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/fers_calculations.d.ts
CHANGED
|
@@ -15,3 +15,10 @@ export function calculate_from_json(json_data: string): string;
|
|
|
15
15
|
export function calculate_from_json_with_token(json_data: string, solve_token: string): string;
|
|
16
16
|
|
|
17
17
|
export function load_fers_from_file(path: string): string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Re-render unity-check reports from already-solved results (no re-solve). Fills
|
|
21
|
+
* each `rendered_report` from its check's `report_template` and rebuilds
|
|
22
|
+
* `report_html`. Returns the error string on failure.
|
|
23
|
+
*/
|
|
24
|
+
export function render_reports_from_json(json_data: string): string;
|
package/fers_calculations.js
CHANGED
|
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./fers_calculations_bg.js";
|
|
|
5
5
|
__wbg_set_wasm(wasm);
|
|
6
6
|
wasm.__wbindgen_start();
|
|
7
7
|
export {
|
|
8
|
-
calculate_from_json, calculate_from_json_with_token, load_fers_from_file
|
|
8
|
+
calculate_from_json, calculate_from_json_with_token, load_fers_from_file, render_reports_from_json
|
|
9
9
|
} from "./fers_calculations_bg.js";
|
package/fers_calculations_bg.js
CHANGED
|
@@ -62,6 +62,28 @@ export function load_fers_from_file(path) {
|
|
|
62
62
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Re-render unity-check reports from already-solved results (no re-solve). Fills
|
|
68
|
+
* each `rendered_report` from its check's `report_template` and rebuilds
|
|
69
|
+
* `report_html`. Returns the error string on failure.
|
|
70
|
+
* @param {string} json_data
|
|
71
|
+
* @returns {string}
|
|
72
|
+
*/
|
|
73
|
+
export function render_reports_from_json(json_data) {
|
|
74
|
+
let deferred2_0;
|
|
75
|
+
let deferred2_1;
|
|
76
|
+
try {
|
|
77
|
+
const ptr0 = passStringToWasm0(json_data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
78
|
+
const len0 = WASM_VECTOR_LEN;
|
|
79
|
+
const ret = wasm.render_reports_from_json(ptr0, len0);
|
|
80
|
+
deferred2_0 = ret[0];
|
|
81
|
+
deferred2_1 = ret[1];
|
|
82
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
83
|
+
} finally {
|
|
84
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
65
87
|
export function __wbg___wbindgen_throw_ea4887a5f8f9a9db(arg0, arg1) {
|
|
66
88
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
67
89
|
}
|
|
Binary file
|