@ferrflow/wasm 4.10.2 → 5.24.0

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/ferrflow_wasm.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /* @ts-self-types="./ferrflow_wasm.d.ts" */
2
-
3
2
  import * as wasm from "./ferrflow_wasm_bg.wasm";
4
3
  import { __wbg_set_wasm } from "./ferrflow_wasm_bg.js";
4
+
5
5
  __wbg_set_wasm(wasm);
6
- wasm.__wbindgen_start();
6
+
7
7
  export {
8
8
  build_changelog_section, compute_next_version, determine_bump, serialize_config, validate_config
9
9
  } from "./ferrflow_wasm_bg.js";
@@ -7,22 +7,28 @@ export function build_changelog_section(version, commits_json) {
7
7
  let deferred4_0;
8
8
  let deferred4_1;
9
9
  try {
10
- const ptr0 = passStringToWasm0(version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
10
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
11
+ const ptr0 = passStringToWasm0(version, wasm.__wbindgen_export, wasm.__wbindgen_export2);
11
12
  const len0 = WASM_VECTOR_LEN;
12
- const ptr1 = passStringToWasm0(commits_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
13
+ const ptr1 = passStringToWasm0(commits_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
13
14
  const len1 = WASM_VECTOR_LEN;
14
- const ret = wasm.build_changelog_section(ptr0, len0, ptr1, len1);
15
- var ptr3 = ret[0];
16
- var len3 = ret[1];
17
- if (ret[3]) {
15
+ wasm.build_changelog_section(retptr, ptr0, len0, ptr1, len1);
16
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
17
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
18
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
19
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
20
+ var ptr3 = r0;
21
+ var len3 = r1;
22
+ if (r3) {
18
23
  ptr3 = 0; len3 = 0;
19
- throw takeFromExternrefTable0(ret[2]);
24
+ throw takeObject(r2);
20
25
  }
21
26
  deferred4_0 = ptr3;
22
27
  deferred4_1 = len3;
23
28
  return getStringFromWasm0(ptr3, len3);
24
29
  } finally {
25
- wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
30
+ wasm.__wbindgen_add_to_stack_pointer(16);
31
+ wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
26
32
  }
27
33
  }
28
34
 
@@ -36,24 +42,30 @@ export function compute_next_version(current, bump, strategy) {
36
42
  let deferred5_0;
37
43
  let deferred5_1;
38
44
  try {
39
- const ptr0 = passStringToWasm0(current, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
45
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
46
+ const ptr0 = passStringToWasm0(current, wasm.__wbindgen_export, wasm.__wbindgen_export2);
40
47
  const len0 = WASM_VECTOR_LEN;
41
- const ptr1 = passStringToWasm0(bump, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
48
+ const ptr1 = passStringToWasm0(bump, wasm.__wbindgen_export, wasm.__wbindgen_export2);
42
49
  const len1 = WASM_VECTOR_LEN;
43
- const ptr2 = passStringToWasm0(strategy, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
50
+ const ptr2 = passStringToWasm0(strategy, wasm.__wbindgen_export, wasm.__wbindgen_export2);
44
51
  const len2 = WASM_VECTOR_LEN;
45
- const ret = wasm.compute_next_version(ptr0, len0, ptr1, len1, ptr2, len2);
46
- var ptr4 = ret[0];
47
- var len4 = ret[1];
48
- if (ret[3]) {
52
+ wasm.compute_next_version(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
53
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
54
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
55
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
56
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
57
+ var ptr4 = r0;
58
+ var len4 = r1;
59
+ if (r3) {
49
60
  ptr4 = 0; len4 = 0;
50
- throw takeFromExternrefTable0(ret[2]);
61
+ throw takeObject(r2);
51
62
  }
52
63
  deferred5_0 = ptr4;
53
64
  deferred5_1 = len4;
54
65
  return getStringFromWasm0(ptr4, len4);
55
66
  } finally {
56
- wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
67
+ wasm.__wbindgen_add_to_stack_pointer(16);
68
+ wasm.__wbindgen_export3(deferred5_0, deferred5_1, 1);
57
69
  }
58
70
  }
59
71
 
@@ -65,14 +77,18 @@ export function determine_bump(message) {
65
77
  let deferred2_0;
66
78
  let deferred2_1;
67
79
  try {
68
- const ptr0 = passStringToWasm0(message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
80
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
81
+ const ptr0 = passStringToWasm0(message, wasm.__wbindgen_export, wasm.__wbindgen_export2);
69
82
  const len0 = WASM_VECTOR_LEN;
70
- const ret = wasm.determine_bump(ptr0, len0);
71
- deferred2_0 = ret[0];
72
- deferred2_1 = ret[1];
73
- return getStringFromWasm0(ret[0], ret[1]);
83
+ wasm.determine_bump(retptr, ptr0, len0);
84
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
85
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
86
+ deferred2_0 = r0;
87
+ deferred2_1 = r1;
88
+ return getStringFromWasm0(r0, r1);
74
89
  } finally {
75
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
90
+ wasm.__wbindgen_add_to_stack_pointer(16);
91
+ wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
76
92
  }
77
93
  }
78
94
 
@@ -85,22 +101,28 @@ export function serialize_config(config_json, format) {
85
101
  let deferred4_0;
86
102
  let deferred4_1;
87
103
  try {
88
- const ptr0 = passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
104
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
105
+ const ptr0 = passStringToWasm0(config_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
89
106
  const len0 = WASM_VECTOR_LEN;
90
- const ptr1 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
107
+ const ptr1 = passStringToWasm0(format, wasm.__wbindgen_export, wasm.__wbindgen_export2);
91
108
  const len1 = WASM_VECTOR_LEN;
92
- const ret = wasm.serialize_config(ptr0, len0, ptr1, len1);
93
- var ptr3 = ret[0];
94
- var len3 = ret[1];
95
- if (ret[3]) {
109
+ wasm.serialize_config(retptr, ptr0, len0, ptr1, len1);
110
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
111
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
112
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
113
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
114
+ var ptr3 = r0;
115
+ var len3 = r1;
116
+ if (r3) {
96
117
  ptr3 = 0; len3 = 0;
97
- throw takeFromExternrefTable0(ret[2]);
118
+ throw takeObject(r2);
98
119
  }
99
120
  deferred4_0 = ptr3;
100
121
  deferred4_1 = len3;
101
122
  return getStringFromWasm0(ptr3, len3);
102
123
  } finally {
103
- wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
124
+ wasm.__wbindgen_add_to_stack_pointer(16);
125
+ wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
104
126
  }
105
127
  }
106
128
 
@@ -112,56 +134,76 @@ export function validate_config(config_json) {
112
134
  let deferred2_0;
113
135
  let deferred2_1;
114
136
  try {
115
- const ptr0 = passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
137
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
138
+ const ptr0 = passStringToWasm0(config_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
116
139
  const len0 = WASM_VECTOR_LEN;
117
- const ret = wasm.validate_config(ptr0, len0);
118
- deferred2_0 = ret[0];
119
- deferred2_1 = ret[1];
120
- return getStringFromWasm0(ret[0], ret[1]);
140
+ wasm.validate_config(retptr, ptr0, len0);
141
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
142
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
143
+ deferred2_0 = r0;
144
+ deferred2_1 = r1;
145
+ return getStringFromWasm0(r0, r1);
121
146
  } finally {
122
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
147
+ wasm.__wbindgen_add_to_stack_pointer(16);
148
+ wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
123
149
  }
124
150
  }
125
- export function __wbg_Error_55538483de6e3abe(arg0, arg1) {
151
+ export function __wbg_Error_92b29b0548f8b746(arg0, arg1) {
126
152
  const ret = Error(getStringFromWasm0(arg0, arg1));
127
- return ret;
153
+ return addHeapObject(ret);
128
154
  }
129
- export function __wbg___wbindgen_throw_5549492daedad139(arg0, arg1) {
155
+ export function __wbg___wbindgen_throw_344f42d3211c4765(arg0, arg1) {
130
156
  throw new Error(getStringFromWasm0(arg0, arg1));
131
157
  }
132
- export function __wbg_getTime_c3af35594e283356(arg0) {
133
- const ret = arg0.getTime();
158
+ export function __wbg_getTime_d6f070c088c9b5ed(arg0) {
159
+ const ret = getObject(arg0).getTime();
134
160
  return ret;
135
161
  }
136
- export function __wbg_getTimezoneOffset_c60f1a836e59b3db(arg0) {
137
- const ret = arg0.getTimezoneOffset();
162
+ export function __wbg_getTimezoneOffset_dc9862c79e5a81a3(arg0) {
163
+ const ret = getObject(arg0).getTimezoneOffset();
138
164
  return ret;
139
165
  }
140
- export function __wbg_new_0_e649c99e7382313f() {
166
+ export function __wbg_new_0_3da9e97f24fc69be() {
141
167
  const ret = new Date();
142
- return ret;
168
+ return addHeapObject(ret);
143
169
  }
144
- export function __wbg_new_d51bf22e953dcfd1(arg0) {
145
- const ret = new Date(arg0);
146
- return ret;
170
+ export function __wbg_new_cc984128914cfc6f(arg0) {
171
+ const ret = new Date(getObject(arg0));
172
+ return addHeapObject(ret);
147
173
  }
148
174
  export function __wbindgen_cast_0000000000000001(arg0) {
149
175
  // Cast intrinsic for `F64 -> Externref`.
150
176
  const ret = arg0;
151
- return ret;
177
+ return addHeapObject(ret);
178
+ }
179
+ export function __wbindgen_object_drop_ref(arg0) {
180
+ takeObject(arg0);
181
+ }
182
+ function addHeapObject(obj) {
183
+ if (heap_next === heap.length) heap.push(heap.length + 1);
184
+ const idx = heap_next;
185
+ heap_next = heap[idx];
186
+
187
+ heap[idx] = obj;
188
+ return idx;
189
+ }
190
+
191
+ function dropObject(idx) {
192
+ if (idx < 1028) return;
193
+ heap[idx] = heap_next;
194
+ heap_next = idx;
152
195
  }
153
- export function __wbindgen_init_externref_table() {
154
- const table = wasm.__wbindgen_externrefs;
155
- const offset = table.grow(4);
156
- table.set(0, undefined);
157
- table.set(offset + 0, undefined);
158
- table.set(offset + 1, null);
159
- table.set(offset + 2, true);
160
- table.set(offset + 3, false);
196
+
197
+ let cachedDataViewMemory0 = null;
198
+ function getDataViewMemory0() {
199
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
200
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
201
+ }
202
+ return cachedDataViewMemory0;
161
203
  }
204
+
162
205
  function getStringFromWasm0(ptr, len) {
163
- ptr = ptr >>> 0;
164
- return decodeText(ptr, len);
206
+ return decodeText(ptr >>> 0, len);
165
207
  }
166
208
 
167
209
  let cachedUint8ArrayMemory0 = null;
@@ -172,6 +214,13 @@ function getUint8ArrayMemory0() {
172
214
  return cachedUint8ArrayMemory0;
173
215
  }
174
216
 
217
+ function getObject(idx) { return heap[idx]; }
218
+
219
+ let heap = new Array(1024).fill(undefined);
220
+ heap.push(undefined, null, true, false);
221
+
222
+ let heap_next = heap.length;
223
+
175
224
  function passStringToWasm0(arg, malloc, realloc) {
176
225
  if (realloc === undefined) {
177
226
  const buf = cachedTextEncoder.encode(arg);
@@ -209,10 +258,10 @@ function passStringToWasm0(arg, malloc, realloc) {
209
258
  return ptr;
210
259
  }
211
260
 
212
- function takeFromExternrefTable0(idx) {
213
- const value = wasm.__wbindgen_externrefs.get(idx);
214
- wasm.__externref_table_dealloc(idx);
215
- return value;
261
+ function takeObject(idx) {
262
+ const ret = getObject(idx);
263
+ dropObject(idx);
264
+ return ret;
216
265
  }
217
266
 
218
267
  let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@ferrflow/wasm",
3
3
  "type": "module",
4
4
  "description": "FerrFlow core functions compiled to WebAssembly",
5
- "version": "4.10.2",
5
+ "version": "5.24.0",
6
6
  "license": "MPL-2.0",
7
7
  "files": [
8
8
  "ferrflow_wasm_bg.wasm",