@beff/cli 0.0.110 → 0.0.112

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @beff/cli
2
2
 
3
+ ## 0.0.112
4
+
5
+ ### Patch Changes
6
+
7
+ - fix v2 bugs
8
+
9
+ ## 0.0.111
10
+
11
+ ### Patch Changes
12
+
13
+ - new frontend
14
+
3
15
  ## 0.0.110
4
16
 
5
17
  ### Patch Changes
package/dist-cli/cli.js CHANGED
@@ -45944,24 +45944,12 @@ var emitDiagnosticInfo = (data, padding) => {
45944
45944
  console.error("");
45945
45945
  };
45946
45946
  var emitDiagnosticItem = (data) => {
45947
- if ((data.message ?? "").length > 0) {
45948
- console.error(chalk.red.bold("Error: " + data.message));
45947
+ if (data.UnknownFile) {
45948
+ console.error(chalk.red.bold("Error"));
45949
45949
  } else {
45950
- if (data.cause.UnknownFile) {
45951
- console.error(chalk.red.bold("Error"));
45952
- } else {
45953
- console.error(chalk.red.bold("Error: " + data.cause.KnownFile.message));
45954
- }
45950
+ console.error(chalk.red.bold("Error: " + data.KnownFile.message));
45955
45951
  }
45956
- emitDiagnosticInfo(data.cause, " ".repeat(1));
45957
- const inf = data.related_information ?? [];
45958
- if (inf.length == 0) {
45959
- return;
45960
- }
45961
- inf.forEach((data2) => {
45962
- console.error(chalk.yellow(" ".repeat(4) + "Caused by:"));
45963
- emitDiagnosticInfo(data2, " ".repeat(5));
45964
- });
45952
+ emitDiagnosticInfo(data, " ".repeat(1));
45965
45953
  };
45966
45954
  var emitDiagnostics = (diag) => {
45967
45955
  diag.diagnostics.forEach((data) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beff/cli",
3
- "version": "0.0.110",
3
+ "version": "0.0.112",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "beff": "./bin/index.js"
@@ -1,23 +1,10 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- * @param {string} parser_entry_point
5
- * @param {any} settings
6
- * @returns {any}
7
- */
3
+
8
4
  export function bundle_to_diagnostics(parser_entry_point: string, settings: any): any;
9
- /**
10
- * @param {string} parser_entry_point
11
- * @param {any} settings
12
- * @returns {any}
13
- */
5
+
14
6
  export function bundle_to_string_v2(parser_entry_point: string, settings: any): any;
15
- /**
16
- * @param {string} file_name
17
- * @param {string} content
18
- */
19
- export function update_file_content(file_name: string, content: string): void;
20
- /**
21
- * @param {boolean} verbose
22
- */
7
+
23
8
  export function init(verbose: boolean): void;
9
+
10
+ export function update_file_content(file_name: string, content: string): void;
package/pkg/beff_wasm.js CHANGED
@@ -1,133 +1,13 @@
1
+
1
2
  let imports = {};
2
3
  imports['__wbindgen_placeholder__'] = module.exports;
3
- let wasm;
4
- const { TextEncoder, TextDecoder } = require(`util`);
5
-
6
- const heap = new Array(128).fill(undefined);
7
-
8
- heap.push(undefined, null, true, false);
9
-
10
- function getObject(idx) { return heap[idx]; }
11
-
12
- let heap_next = heap.length;
13
-
14
- function dropObject(idx) {
15
- if (idx < 132) return;
16
- heap[idx] = heap_next;
17
- heap_next = idx;
18
- }
19
-
20
- function takeObject(idx) {
21
- const ret = getObject(idx);
22
- dropObject(idx);
23
- return ret;
24
- }
25
-
26
- let WASM_VECTOR_LEN = 0;
27
-
28
- let cachedUint8Memory0 = null;
29
-
30
- function getUint8Memory0() {
31
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
32
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
33
- }
34
- return cachedUint8Memory0;
35
- }
36
-
37
- let cachedTextEncoder = new TextEncoder('utf-8');
38
-
39
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
40
- ? function (arg, view) {
41
- return cachedTextEncoder.encodeInto(arg, view);
42
- }
43
- : function (arg, view) {
44
- const buf = cachedTextEncoder.encode(arg);
45
- view.set(buf);
46
- return {
47
- read: arg.length,
48
- written: buf.length
49
- };
50
- });
51
-
52
- function passStringToWasm0(arg, malloc, realloc) {
53
-
54
- if (realloc === undefined) {
55
- const buf = cachedTextEncoder.encode(arg);
56
- const ptr = malloc(buf.length, 1) >>> 0;
57
- getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
58
- WASM_VECTOR_LEN = buf.length;
59
- return ptr;
60
- }
61
-
62
- let len = arg.length;
63
- let ptr = malloc(len, 1) >>> 0;
64
-
65
- const mem = getUint8Memory0();
66
-
67
- let offset = 0;
68
-
69
- for (; offset < len; offset++) {
70
- const code = arg.charCodeAt(offset);
71
- if (code > 0x7F) break;
72
- mem[ptr + offset] = code;
73
- }
74
-
75
- if (offset !== len) {
76
- if (offset !== 0) {
77
- arg = arg.slice(offset);
78
- }
79
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
80
- const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
81
- const ret = encodeString(arg, view);
82
-
83
- offset += ret.written;
84
- ptr = realloc(ptr, len, offset, 1) >>> 0;
85
- }
86
-
87
- WASM_VECTOR_LEN = offset;
88
- return ptr;
89
- }
90
-
91
- function isLikeNone(x) {
92
- return x === undefined || x === null;
93
- }
94
-
95
- let cachedInt32Memory0 = null;
96
-
97
- function getInt32Memory0() {
98
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
99
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
100
- }
101
- return cachedInt32Memory0;
102
- }
103
-
104
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
105
-
106
- cachedTextDecoder.decode();
107
-
108
- function getStringFromWasm0(ptr, len) {
109
- ptr = ptr >>> 0;
110
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
111
- }
112
4
 
113
- function addHeapObject(obj) {
114
- if (heap_next === heap.length) heap.push(heap.length + 1);
115
- const idx = heap_next;
116
- heap_next = heap[idx];
117
-
118
- heap[idx] = obj;
5
+ function addToExternrefTable0(obj) {
6
+ const idx = wasm.__externref_table_alloc();
7
+ wasm.__wbindgen_externrefs.set(idx, obj);
119
8
  return idx;
120
9
  }
121
10
 
122
- let cachedFloat64Memory0 = null;
123
-
124
- function getFloat64Memory0() {
125
- if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
126
- cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
127
- }
128
- return cachedFloat64Memory0;
129
- }
130
-
131
11
  function debugString(val) {
132
12
  // primitive types
133
13
  const type = typeof val;
@@ -169,7 +49,7 @@ function debugString(val) {
169
49
  // Test for built-in
170
50
  const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
171
51
  let className;
172
- if (builtInMatches.length > 1) {
52
+ if (builtInMatches && builtInMatches.length > 1) {
173
53
  className = builtInMatches[1];
174
54
  } else {
175
55
  // Failed to match the standard '[object ClassName]'
@@ -192,221 +72,273 @@ function debugString(val) {
192
72
  // TODO we could test for more things here, like `Set`s and `Map`s.
193
73
  return className;
194
74
  }
195
- /**
196
- * @param {string} parser_entry_point
197
- * @param {any} settings
198
- * @returns {any}
199
- */
200
- module.exports.bundle_to_diagnostics = function(parser_entry_point, settings) {
201
- const ptr0 = passStringToWasm0(parser_entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
202
- const len0 = WASM_VECTOR_LEN;
203
- const ret = wasm.bundle_to_diagnostics(ptr0, len0, addHeapObject(settings));
204
- return takeObject(ret);
205
- };
206
75
 
207
- /**
208
- * @param {string} parser_entry_point
209
- * @param {any} settings
210
- * @returns {any}
211
- */
212
- module.exports.bundle_to_string_v2 = function(parser_entry_point, settings) {
213
- const ptr0 = passStringToWasm0(parser_entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
214
- const len0 = WASM_VECTOR_LEN;
215
- const ret = wasm.bundle_to_string_v2(ptr0, len0, addHeapObject(settings));
216
- return takeObject(ret);
217
- };
76
+ function getArrayU8FromWasm0(ptr, len) {
77
+ ptr = ptr >>> 0;
78
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
79
+ }
218
80
 
219
- /**
220
- * @param {string} file_name
221
- * @param {string} content
222
- */
223
- module.exports.update_file_content = function(file_name, content) {
224
- const ptr0 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
225
- const len0 = WASM_VECTOR_LEN;
226
- const ptr1 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
227
- const len1 = WASM_VECTOR_LEN;
228
- wasm.update_file_content(ptr0, len0, ptr1, len1);
229
- };
81
+ let cachedDataViewMemory0 = null;
82
+ function getDataViewMemory0() {
83
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
84
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
85
+ }
86
+ return cachedDataViewMemory0;
87
+ }
230
88
 
231
- /**
232
- * @param {boolean} verbose
233
- */
234
- module.exports.init = function(verbose) {
235
- wasm.init(verbose);
236
- };
89
+ function getStringFromWasm0(ptr, len) {
90
+ ptr = ptr >>> 0;
91
+ return decodeText(ptr, len);
92
+ }
93
+
94
+ let cachedUint8ArrayMemory0 = null;
95
+ function getUint8ArrayMemory0() {
96
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
97
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
98
+ }
99
+ return cachedUint8ArrayMemory0;
100
+ }
237
101
 
238
102
  function handleError(f, args) {
239
103
  try {
240
104
  return f.apply(this, args);
241
105
  } catch (e) {
242
- wasm.__wbindgen_exn_store(addHeapObject(e));
106
+ const idx = addToExternrefTable0(e);
107
+ wasm.__wbindgen_exn_store(idx);
243
108
  }
244
109
  }
245
110
 
246
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
247
- takeObject(arg0);
248
- };
111
+ function isLikeNone(x) {
112
+ return x === undefined || x === null;
113
+ }
249
114
 
250
- module.exports.__wbg_readfilecontent_43e9ae3fbe1ceeb4 = function(arg0, arg1, arg2) {
251
- const ret = read_file_content(getStringFromWasm0(arg1, arg2));
252
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
253
- var len1 = WASM_VECTOR_LEN;
254
- getInt32Memory0()[arg0 / 4 + 1] = len1;
255
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
256
- };
115
+ function passStringToWasm0(arg, malloc, realloc) {
116
+ if (realloc === undefined) {
117
+ const buf = cachedTextEncoder.encode(arg);
118
+ const ptr = malloc(buf.length, 1) >>> 0;
119
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
120
+ WASM_VECTOR_LEN = buf.length;
121
+ return ptr;
122
+ }
257
123
 
258
- module.exports.__wbindgen_is_undefined = function(arg0) {
259
- const ret = getObject(arg0) === undefined;
260
- return ret;
261
- };
124
+ let len = arg.length;
125
+ let ptr = malloc(len, 1) >>> 0;
262
126
 
263
- module.exports.__wbindgen_in = function(arg0, arg1) {
264
- const ret = getObject(arg0) in getObject(arg1);
265
- return ret;
266
- };
127
+ const mem = getUint8ArrayMemory0();
267
128
 
268
- module.exports.__wbindgen_string_get = function(arg0, arg1) {
269
- const obj = getObject(arg1);
270
- const ret = typeof(obj) === 'string' ? obj : undefined;
271
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
272
- var len1 = WASM_VECTOR_LEN;
273
- getInt32Memory0()[arg0 / 4 + 1] = len1;
274
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
275
- };
129
+ let offset = 0;
276
130
 
277
- module.exports.__wbindgen_is_object = function(arg0) {
278
- const val = getObject(arg0);
279
- const ret = typeof(val) === 'object' && val !== null;
280
- return ret;
281
- };
131
+ for (; offset < len; offset++) {
132
+ const code = arg.charCodeAt(offset);
133
+ if (code > 0x7F) break;
134
+ mem[ptr + offset] = code;
135
+ }
136
+ if (offset !== len) {
137
+ if (offset !== 0) {
138
+ arg = arg.slice(offset);
139
+ }
140
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
141
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
142
+ const ret = cachedTextEncoder.encodeInto(arg, view);
282
143
 
283
- module.exports.__wbg_emitdiagnostic_eee08920b60ef69d = function(arg0) {
284
- emit_diagnostic(takeObject(arg0));
285
- };
144
+ offset += ret.written;
145
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
146
+ }
286
147
 
287
- module.exports.__wbg_resolveimport_0872cceae2662468 = function(arg0, arg1, arg2, arg3, arg4) {
288
- const ret = resolve_import(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
289
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
290
- var len1 = WASM_VECTOR_LEN;
291
- getInt32Memory0()[arg0 / 4 + 1] = len1;
292
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
293
- };
148
+ WASM_VECTOR_LEN = offset;
149
+ return ptr;
150
+ }
294
151
 
295
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
296
- const ret = getStringFromWasm0(arg0, arg1);
297
- return addHeapObject(ret);
298
- };
152
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
153
+ cachedTextDecoder.decode();
154
+ function decodeText(ptr, len) {
155
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
156
+ }
157
+
158
+ const cachedTextEncoder = new TextEncoder();
299
159
 
300
- module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
301
- const ret = getObject(arg0) == getObject(arg1);
160
+ if (!('encodeInto' in cachedTextEncoder)) {
161
+ cachedTextEncoder.encodeInto = function (arg, view) {
162
+ const buf = cachedTextEncoder.encode(arg);
163
+ view.set(buf);
164
+ return {
165
+ read: arg.length,
166
+ written: buf.length
167
+ };
168
+ }
169
+ }
170
+
171
+ let WASM_VECTOR_LEN = 0;
172
+
173
+ /**
174
+ * @param {string} parser_entry_point
175
+ * @param {any} settings
176
+ * @returns {any}
177
+ */
178
+ function bundle_to_diagnostics(parser_entry_point, settings) {
179
+ const ptr0 = passStringToWasm0(parser_entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
180
+ const len0 = WASM_VECTOR_LEN;
181
+ const ret = wasm.bundle_to_diagnostics(ptr0, len0, settings);
302
182
  return ret;
303
- };
183
+ }
184
+ exports.bundle_to_diagnostics = bundle_to_diagnostics;
304
185
 
305
- module.exports.__wbindgen_boolean_get = function(arg0) {
306
- const v = getObject(arg0);
307
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
186
+ /**
187
+ * @param {string} parser_entry_point
188
+ * @param {any} settings
189
+ * @returns {any}
190
+ */
191
+ function bundle_to_string_v2(parser_entry_point, settings) {
192
+ const ptr0 = passStringToWasm0(parser_entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
193
+ const len0 = WASM_VECTOR_LEN;
194
+ const ret = wasm.bundle_to_string_v2(ptr0, len0, settings);
308
195
  return ret;
309
- };
196
+ }
197
+ exports.bundle_to_string_v2 = bundle_to_string_v2;
310
198
 
311
- module.exports.__wbindgen_number_get = function(arg0, arg1) {
312
- const obj = getObject(arg1);
313
- const ret = typeof(obj) === 'number' ? obj : undefined;
314
- getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
315
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
316
- };
199
+ /**
200
+ * @param {boolean} verbose
201
+ */
202
+ function init(verbose) {
203
+ wasm.init(verbose);
204
+ }
205
+ exports.init = init;
317
206
 
318
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
319
- const ret = new Error(getStringFromWasm0(arg0, arg1));
320
- return addHeapObject(ret);
207
+ /**
208
+ * @param {string} file_name
209
+ * @param {string} content
210
+ */
211
+ function update_file_content(file_name, content) {
212
+ const ptr0 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
213
+ const len0 = WASM_VECTOR_LEN;
214
+ const ptr1 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
215
+ const len1 = WASM_VECTOR_LEN;
216
+ wasm.update_file_content(ptr0, len0, ptr1, len1);
217
+ }
218
+ exports.update_file_content = update_file_content;
219
+
220
+ exports.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
221
+ const ret = Error(getStringFromWasm0(arg0, arg1));
222
+ return ret;
321
223
  };
322
224
 
323
- module.exports.__wbg_getwithrefkey_edc2c8960f0f1191 = function(arg0, arg1) {
324
- const ret = getObject(arg0)[getObject(arg1)];
325
- return addHeapObject(ret);
225
+ exports.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
226
+ const v = arg0;
227
+ const ret = typeof(v) === 'boolean' ? v : undefined;
228
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
326
229
  };
327
230
 
328
- module.exports.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
329
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
231
+ exports.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
232
+ const ret = debugString(arg1);
233
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
234
+ const len1 = WASM_VECTOR_LEN;
235
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
236
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
330
237
  };
331
238
 
332
- module.exports.__wbindgen_object_clone_ref = function(arg0) {
333
- const ret = getObject(arg0);
334
- return addHeapObject(ret);
239
+ exports.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
240
+ const ret = arg0 in arg1;
241
+ return ret;
335
242
  };
336
243
 
337
- module.exports.__wbindgen_number_new = function(arg0) {
338
- const ret = arg0;
339
- return addHeapObject(ret);
244
+ exports.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
245
+ const ret = typeof(arg0) === 'function';
246
+ return ret;
340
247
  };
341
248
 
342
- module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
343
- const ret = BigInt.asUintN(64, arg0);
344
- return addHeapObject(ret);
249
+ exports.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
250
+ const val = arg0;
251
+ const ret = typeof(val) === 'object' && val !== null;
252
+ return ret;
345
253
  };
346
254
 
347
- module.exports.__wbg_log_1d3ae0273d8f4f8a = function(arg0) {
348
- console.log(getObject(arg0));
255
+ exports.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
256
+ const ret = arg0 === undefined;
257
+ return ret;
349
258
  };
350
259
 
351
- module.exports.__wbg_info_2e30e8204b29d91d = function(arg0) {
352
- console.info(getObject(arg0));
260
+ exports.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
261
+ const ret = arg0 == arg1;
262
+ return ret;
353
263
  };
354
264
 
355
- module.exports.__wbg_warn_d60e832f9882c1b2 = function(arg0) {
356
- console.warn(getObject(arg0));
265
+ exports.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
266
+ const obj = arg1;
267
+ const ret = typeof(obj) === 'number' ? obj : undefined;
268
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
269
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
357
270
  };
358
271
 
359
- module.exports.__wbg_debug_9a6b3243fbbebb61 = function(arg0) {
360
- console.debug(getObject(arg0));
272
+ exports.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
273
+ const obj = arg1;
274
+ const ret = typeof(obj) === 'string' ? obj : undefined;
275
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
276
+ var len1 = WASM_VECTOR_LEN;
277
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
278
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
361
279
  };
362
280
 
363
- module.exports.__wbg_error_788ae33f81d3b84b = function(arg0) {
364
- console.error(getObject(arg0));
281
+ exports.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
282
+ throw new Error(getStringFromWasm0(arg0, arg1));
365
283
  };
366
284
 
367
- module.exports.__wbg_new_16b304a2cfa7ff4a = function() {
368
- const ret = new Array();
369
- return addHeapObject(ret);
285
+ exports.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
286
+ const ret = arg0.call(arg1);
287
+ return ret;
288
+ }, arguments) };
289
+
290
+ exports.__wbg_debug_9d0c87ddda3dc485 = function(arg0) {
291
+ console.debug(arg0);
370
292
  };
371
293
 
372
- module.exports.__wbg_new_72fb9a18b5ae2624 = function() {
373
- const ret = new Object();
374
- return addHeapObject(ret);
294
+ exports.__wbg_done_62ea16af4ce34b24 = function(arg0) {
295
+ const ret = arg0.done;
296
+ return ret;
375
297
  };
376
298
 
377
- module.exports.__wbg_new_63b92bc8671ed464 = function(arg0) {
378
- const ret = new Uint8Array(getObject(arg0));
379
- return addHeapObject(ret);
299
+ exports.__wbg_emit_diagnostic_2f7cf38bc25ebf3d = function(arg0) {
300
+ emit_diagnostic(arg0);
380
301
  };
381
302
 
382
- module.exports.__wbg_buffer_12d079cc21e14bdb = function(arg0) {
383
- const ret = getObject(arg0).buffer;
384
- return addHeapObject(ret);
303
+ exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
304
+ let deferred0_0;
305
+ let deferred0_1;
306
+ try {
307
+ deferred0_0 = arg0;
308
+ deferred0_1 = arg1;
309
+ console.error(getStringFromWasm0(arg0, arg1));
310
+ } finally {
311
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
312
+ }
385
313
  };
386
314
 
387
- module.exports.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {
388
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
315
+ exports.__wbg_error_7bc7d576a6aaf855 = function(arg0) {
316
+ console.error(arg0);
389
317
  };
390
318
 
391
- module.exports.__wbg_length_c20a40f15020d68a = function(arg0) {
392
- const ret = getObject(arg0).length;
319
+ exports.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
320
+ const ret = arg0[arg1 >>> 0];
393
321
  return ret;
394
322
  };
395
323
 
396
- module.exports.__wbg_done_298b57d23c0fc80c = function(arg0) {
397
- const ret = getObject(arg0).done;
324
+ exports.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
325
+ const ret = Reflect.get(arg0, arg1);
326
+ return ret;
327
+ }, arguments) };
328
+
329
+ exports.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
330
+ const ret = arg0[arg1];
398
331
  return ret;
399
332
  };
400
333
 
401
- module.exports.__wbg_value_d93c65011f51a456 = function(arg0) {
402
- const ret = getObject(arg0).value;
403
- return addHeapObject(ret);
334
+ exports.__wbg_info_ce6bcc489c22f6f0 = function(arg0) {
335
+ console.info(arg0);
404
336
  };
405
337
 
406
- module.exports.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
338
+ exports.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
407
339
  let result;
408
340
  try {
409
- result = getObject(arg0) instanceof Uint8Array;
341
+ result = arg0 instanceof ArrayBuffer;
410
342
  } catch (_) {
411
343
  result = false;
412
344
  }
@@ -414,10 +346,10 @@ module.exports.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
414
346
  return ret;
415
347
  };
416
348
 
417
- module.exports.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
349
+ exports.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
418
350
  let result;
419
351
  try {
420
- result = getObject(arg0) instanceof ArrayBuffer;
352
+ result = arg0 instanceof Uint8Array;
421
353
  } catch (_) {
422
354
  result = false;
423
355
  }
@@ -425,102 +357,136 @@ module.exports.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
425
357
  return ret;
426
358
  };
427
359
 
428
- module.exports.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
429
- const ret = getObject(arg0)[arg1 >>> 0];
430
- return addHeapObject(ret);
360
+ exports.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {
361
+ const ret = Array.isArray(arg0);
362
+ return ret;
431
363
  };
432
364
 
433
- module.exports.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
434
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
365
+ exports.__wbg_iterator_27b7c8b35ab3e86b = function() {
366
+ const ret = Symbol.iterator;
367
+ return ret;
435
368
  };
436
369
 
437
- module.exports.__wbg_length_cd7af8117672b8b8 = function(arg0) {
438
- const ret = getObject(arg0).length;
370
+ exports.__wbg_length_22ac23eaec9d8053 = function(arg0) {
371
+ const ret = arg0.length;
439
372
  return ret;
440
373
  };
441
374
 
442
- module.exports.__wbg_isArray_2ab64d95e09ea0ae = function(arg0) {
443
- const ret = Array.isArray(getObject(arg0));
375
+ exports.__wbg_length_d45040a40c570362 = function(arg0) {
376
+ const ret = arg0.length;
444
377
  return ret;
445
378
  };
446
379
 
447
- module.exports.__wbg_iterator_2cee6dadfd956dfa = function() {
448
- const ret = Symbol.iterator;
449
- return addHeapObject(ret);
380
+ exports.__wbg_log_1d990106d99dacb7 = function(arg0) {
381
+ console.log(arg0);
450
382
  };
451
383
 
452
- module.exports.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {
453
- const ret = getObject(arg0).call(getObject(arg1));
454
- return addHeapObject(ret);
455
- }, arguments) };
384
+ exports.__wbg_new_1ba21ce319a06297 = function() {
385
+ const ret = new Object();
386
+ return ret;
387
+ };
456
388
 
457
- module.exports.__wbindgen_is_function = function(arg0) {
458
- const ret = typeof(getObject(arg0)) === 'function';
389
+ exports.__wbg_new_25f239778d6112b9 = function() {
390
+ const ret = new Array();
459
391
  return ret;
460
392
  };
461
393
 
462
- module.exports.__wbg_next_40fc327bfc8770e6 = function(arg0) {
463
- const ret = getObject(arg0).next;
464
- return addHeapObject(ret);
394
+ exports.__wbg_new_6421f6084cc5bc5a = function(arg0) {
395
+ const ret = new Uint8Array(arg0);
396
+ return ret;
465
397
  };
466
398
 
467
- module.exports.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {
468
- const ret = getObject(arg0).next();
469
- return addHeapObject(ret);
470
- }, arguments) };
399
+ exports.__wbg_new_8a6f238a6ece86ea = function() {
400
+ const ret = new Error();
401
+ return ret;
402
+ };
403
+
404
+ exports.__wbg_next_138a17bbf04e926c = function(arg0) {
405
+ const ret = arg0.next;
406
+ return ret;
407
+ };
471
408
 
472
- module.exports.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
473
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
474
- return addHeapObject(ret);
409
+ exports.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {
410
+ const ret = arg0.next();
411
+ return ret;
475
412
  }, arguments) };
476
413
 
477
- module.exports.__wbg_new_abda76e883ba8a5f = function() {
478
- const ret = new Error();
479
- return addHeapObject(ret);
414
+ exports.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
415
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
480
416
  };
481
417
 
482
- module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
483
- const ret = getObject(arg1).stack;
484
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
485
- const len1 = WASM_VECTOR_LEN;
486
- getInt32Memory0()[arg0 / 4 + 1] = len1;
487
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
418
+ exports.__wbg_read_file_content_6ec8279180f5893a = function(arg0, arg1, arg2) {
419
+ const ret = read_file_content(getStringFromWasm0(arg1, arg2));
420
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
421
+ var len1 = WASM_VECTOR_LEN;
422
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
423
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
488
424
  };
489
425
 
490
- module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
491
- let deferred0_0;
492
- let deferred0_1;
493
- try {
494
- deferred0_0 = arg0;
495
- deferred0_1 = arg1;
496
- console.error(getStringFromWasm0(arg0, arg1));
497
- } finally {
498
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
499
- }
426
+ exports.__wbg_resolve_import_9b24ad6900c20040 = function(arg0, arg1, arg2, arg3, arg4) {
427
+ const ret = resolve_import(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
428
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
429
+ var len1 = WASM_VECTOR_LEN;
430
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
431
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
500
432
  };
501
433
 
502
- module.exports.__wbindgen_memory = function() {
503
- const ret = wasm.memory;
504
- return addHeapObject(ret);
434
+ exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
435
+ arg0[arg1] = arg2;
505
436
  };
506
437
 
507
- module.exports.__wbindgen_throw = function(arg0, arg1) {
508
- throw new Error(getStringFromWasm0(arg0, arg1));
438
+ exports.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
439
+ arg0[arg1 >>> 0] = arg2;
509
440
  };
510
441
 
511
- module.exports.__wbindgen_debug_string = function(arg0, arg1) {
512
- const ret = debugString(getObject(arg1));
442
+ exports.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
443
+ const ret = arg1.stack;
513
444
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
514
445
  const len1 = WASM_VECTOR_LEN;
515
- getInt32Memory0()[arg0 / 4 + 1] = len1;
516
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
446
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
447
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
448
+ };
449
+
450
+ exports.__wbg_value_57b7b035e117f7ee = function(arg0) {
451
+ const ret = arg0.value;
452
+ return ret;
517
453
  };
518
454
 
519
- const path = require('path').join(__dirname, 'beff_wasm_bg.wasm');
520
- const bytes = require('fs').readFileSync(path);
455
+ exports.__wbg_warn_6e567d0d926ff881 = function(arg0) {
456
+ console.warn(arg0);
457
+ };
458
+
459
+ exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
460
+ // Cast intrinsic for `Ref(String) -> Externref`.
461
+ const ret = getStringFromWasm0(arg0, arg1);
462
+ return ret;
463
+ };
464
+
465
+ exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
466
+ // Cast intrinsic for `U64 -> Externref`.
467
+ const ret = BigInt.asUintN(64, arg0);
468
+ return ret;
469
+ };
470
+
471
+ exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
472
+ // Cast intrinsic for `F64 -> Externref`.
473
+ const ret = arg0;
474
+ return ret;
475
+ };
476
+
477
+ exports.__wbindgen_init_externref_table = function() {
478
+ const table = wasm.__wbindgen_externrefs;
479
+ const offset = table.grow(4);
480
+ table.set(0, undefined);
481
+ table.set(offset + 0, undefined);
482
+ table.set(offset + 1, null);
483
+ table.set(offset + 2, true);
484
+ table.set(offset + 3, false);
485
+ };
521
486
 
522
- const wasmModule = new WebAssembly.Module(bytes);
523
- const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
524
- wasm = wasmInstance.exports;
525
- module.exports.__wasm = wasm;
487
+ const wasmPath = `${__dirname}/beff_wasm_bg.wasm`;
488
+ const wasmBytes = require('fs').readFileSync(wasmPath);
489
+ const wasmModule = new WebAssembly.Module(wasmBytes);
490
+ const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
526
491
 
492
+ wasm.__wbindgen_start();
Binary file
@@ -1,11 +1,14 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export function bundle_to_diagnostics(a: number, b: number, c: number): number;
5
- export function bundle_to_string_v2(a: number, b: number, c: number): number;
6
- export function init(a: number): void;
7
- export function update_file_content(a: number, b: number, c: number, d: number): void;
8
- export function __wbindgen_malloc(a: number, b: number): number;
9
- export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
10
- export function __wbindgen_exn_store(a: number): void;
11
- export function __wbindgen_free(a: number, b: number, c: number): void;
4
+ export const bundle_to_diagnostics: (a: number, b: number, c: any) => any;
5
+ export const bundle_to_string_v2: (a: number, b: number, c: any) => any;
6
+ export const init: (a: number) => void;
7
+ export const update_file_content: (a: number, b: number, c: number, d: number) => void;
8
+ export const __wbindgen_malloc: (a: number, b: number) => number;
9
+ export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
10
+ export const __wbindgen_exn_store: (a: number) => void;
11
+ export const __externref_table_alloc: () => number;
12
+ export const __wbindgen_externrefs: WebAssembly.Table;
13
+ export const __wbindgen_free: (a: number, b: number, c: number) => void;
14
+ export const __wbindgen_start: () => void;