@ferscloud/fers-calculation 0.2.48 → 0.2.49

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 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.
@@ -27,3 +27,13 @@ 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
+ * Route panic messages to the browser console. wasm32-unknown-unknown does
33
+ * not unwind, so `run_enveloped`'s catch_unwind never fires in the browser —
34
+ * a panic aborts the instance with an opaque `RuntimeError: unreachable`.
35
+ * The hook at least makes the panic message + location readable in the
36
+ * console. Callers must still treat a thrown exception as fatal for the
37
+ * instance and recycle the worker.
38
+ */
39
+ export function wasm_init(): void;
@@ -93,16 +93,51 @@ 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
+ * Route panic messages to the browser console. wasm32-unknown-unknown does
99
+ * not unwind, so `run_enveloped`'s catch_unwind never fires in the browser —
100
+ * a panic aborts the instance with an opaque `RuntimeError: unreachable`.
101
+ * The hook at least makes the panic message + location readable in the
102
+ * console. Callers must still treat a thrown exception as fatal for the
103
+ * instance and recycle the worker.
104
+ */
105
+ function wasm_init() {
106
+ wasm.wasm_init();
107
+ }
108
+ exports.wasm_init = wasm_init;
96
109
  function __wbg_get_imports() {
97
110
  const import0 = {
98
111
  __proto__: null,
99
112
  __wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
100
113
  throw new Error(getStringFromWasm0(arg0, arg1));
101
114
  },
115
+ __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
116
+ let deferred0_0;
117
+ let deferred0_1;
118
+ try {
119
+ deferred0_0 = arg0;
120
+ deferred0_1 = arg1;
121
+ console.error(getStringFromWasm0(arg0, arg1));
122
+ } finally {
123
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
124
+ }
125
+ },
126
+ __wbg_new_227d7c05414eb861: function() {
127
+ const ret = new Error();
128
+ return ret;
129
+ },
102
130
  __wbg_now_86c0d4ba3fa605b8: function() {
103
131
  const ret = Date.now();
104
132
  return ret;
105
133
  },
134
+ __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
135
+ const ret = arg1.stack;
136
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
137
+ const len1 = WASM_VECTOR_LEN;
138
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
139
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
140
+ },
106
141
  __wbindgen_init_externref_table: function() {
107
142
  const table = wasm.__wbindgen_externrefs;
108
143
  const offset = table.grow(4);
@@ -119,6 +154,14 @@ function __wbg_get_imports() {
119
154
  };
120
155
  }
121
156
 
157
+ let cachedDataViewMemory0 = null;
158
+ function getDataViewMemory0() {
159
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
160
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
161
+ }
162
+ return cachedDataViewMemory0;
163
+ }
164
+
122
165
  function getStringFromWasm0(ptr, len) {
123
166
  return decodeText(ptr >>> 0, len);
124
167
  }
Binary file
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@ferscloud/fers-calculation",
3
- "version": "0.2.48",
3
+ "version": "0.2.49",
4
+ "license": "BSD-3-Clause",
4
5
  "repository": {
5
6
  "type": "git",
6
7
  "url": "git+https://github.com/Jeroen124/FERS_calculations.git"