@ferscloud/fers-calculation 0.2.48 → 0.2.50
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/LICENSE +12 -0
- package/fers_calculations.d.ts +17 -0
- package/fers_calculations.js +63 -0
- package/fers_calculations_bg.wasm +0 -0
- package/package.json +2 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024, Jeroen Hermsen
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
9
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
10
|
+
3. Neither the name of the Jeroen Hermsen nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
11
|
+
|
|
12
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/fers_calculations.d.ts
CHANGED
|
@@ -27,3 +27,20 @@ export function load_fers_from_file(path: string): string;
|
|
|
27
27
|
* `report_html`. Returns the JSON envelope.
|
|
28
28
|
*/
|
|
29
29
|
export function render_reports_from_json(json_data: string): string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The engine version, queryable without solving anything. The npm package
|
|
33
|
+
* version is set from the same `Cargo.toml` at build time, but a caller
|
|
34
|
+
* holding only the module needs a way to ask the engine which features it has.
|
|
35
|
+
*/
|
|
36
|
+
export function version(): string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Route panic messages to the browser console. wasm32-unknown-unknown does
|
|
40
|
+
* not unwind, so `run_enveloped`'s catch_unwind never fires in the browser —
|
|
41
|
+
* a panic aborts the instance with an opaque `RuntimeError: unreachable`.
|
|
42
|
+
* The hook at least makes the panic message + location readable in the
|
|
43
|
+
* console. Callers must still treat a thrown exception as fatal for the
|
|
44
|
+
* instance and recycle the worker.
|
|
45
|
+
*/
|
|
46
|
+
export function wasm_init(): void;
|
package/fers_calculations.js
CHANGED
|
@@ -93,16 +93,71 @@ function render_reports_from_json(json_data) {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
exports.render_reports_from_json = render_reports_from_json;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The engine version, queryable without solving anything. The npm package
|
|
99
|
+
* version is set from the same `Cargo.toml` at build time, but a caller
|
|
100
|
+
* holding only the module needs a way to ask the engine which features it has.
|
|
101
|
+
* @returns {string}
|
|
102
|
+
*/
|
|
103
|
+
function version() {
|
|
104
|
+
let deferred1_0;
|
|
105
|
+
let deferred1_1;
|
|
106
|
+
try {
|
|
107
|
+
const ret = wasm.version();
|
|
108
|
+
deferred1_0 = ret[0];
|
|
109
|
+
deferred1_1 = ret[1];
|
|
110
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
111
|
+
} finally {
|
|
112
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.version = version;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Route panic messages to the browser console. wasm32-unknown-unknown does
|
|
119
|
+
* not unwind, so `run_enveloped`'s catch_unwind never fires in the browser —
|
|
120
|
+
* a panic aborts the instance with an opaque `RuntimeError: unreachable`.
|
|
121
|
+
* The hook at least makes the panic message + location readable in the
|
|
122
|
+
* console. Callers must still treat a thrown exception as fatal for the
|
|
123
|
+
* instance and recycle the worker.
|
|
124
|
+
*/
|
|
125
|
+
function wasm_init() {
|
|
126
|
+
wasm.wasm_init();
|
|
127
|
+
}
|
|
128
|
+
exports.wasm_init = wasm_init;
|
|
96
129
|
function __wbg_get_imports() {
|
|
97
130
|
const import0 = {
|
|
98
131
|
__proto__: null,
|
|
99
132
|
__wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
|
|
100
133
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
101
134
|
},
|
|
135
|
+
__wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
|
|
136
|
+
let deferred0_0;
|
|
137
|
+
let deferred0_1;
|
|
138
|
+
try {
|
|
139
|
+
deferred0_0 = arg0;
|
|
140
|
+
deferred0_1 = arg1;
|
|
141
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
142
|
+
} finally {
|
|
143
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
__wbg_new_227d7c05414eb861: function() {
|
|
147
|
+
const ret = new Error();
|
|
148
|
+
return ret;
|
|
149
|
+
},
|
|
102
150
|
__wbg_now_86c0d4ba3fa605b8: function() {
|
|
103
151
|
const ret = Date.now();
|
|
104
152
|
return ret;
|
|
105
153
|
},
|
|
154
|
+
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
155
|
+
const ret = arg1.stack;
|
|
156
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
157
|
+
const len1 = WASM_VECTOR_LEN;
|
|
158
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
159
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
160
|
+
},
|
|
106
161
|
__wbindgen_init_externref_table: function() {
|
|
107
162
|
const table = wasm.__wbindgen_externrefs;
|
|
108
163
|
const offset = table.grow(4);
|
|
@@ -119,6 +174,14 @@ function __wbg_get_imports() {
|
|
|
119
174
|
};
|
|
120
175
|
}
|
|
121
176
|
|
|
177
|
+
let cachedDataViewMemory0 = null;
|
|
178
|
+
function getDataViewMemory0() {
|
|
179
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
180
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
181
|
+
}
|
|
182
|
+
return cachedDataViewMemory0;
|
|
183
|
+
}
|
|
184
|
+
|
|
122
185
|
function getStringFromWasm0(ptr, len) {
|
|
123
186
|
return decodeText(ptr >>> 0, len);
|
|
124
187
|
}
|
|
Binary file
|