@duckdb/duckdb-wasm-shell 1.28.0 → 1.28.1-dev65.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.
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="94" height="20" role="img" aria-label="duckdb: v0.9.1"><title>duckdb: v0.9.1</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="94" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="49" height="20" fill="#555"/><rect x="49" width="45" height="20" fill="#007ec6"/><rect width="94" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="255" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="390">duckdb</text><text x="255" y="140" transform="scale(.1)" fill="#fff" textLength="390">duckdb</text><text aria-hidden="true" x="705" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="350">v0.9.1</text><text x="705" y="140" transform="scale(.1)" fill="#fff" textLength="350">v0.9.1</text></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="94" height="20" role="img" aria-label="duckdb: v0.9.2"><title>duckdb: v0.9.2</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="94" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="49" height="20" fill="#555"/><rect x="49" width="45" height="20" fill="#007ec6"/><rect width="94" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="255" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="390">duckdb</text><text x="255" y="140" transform="scale(.1)" fill="#fff" textLength="390">duckdb</text><text aria-hidden="true" x="705" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="350">v0.9.2</text><text x="705" y="140" transform="scale(.1)" fill="#fff" textLength="350">v0.9.2</text></g></svg>
package/dist/shell.cjs CHANGED
@@ -43,7 +43,7 @@ module.exports = __toCommonJS(src_exports);
43
43
  // package.json
44
44
  var package_default = {
45
45
  name: "@duckdb/duckdb-wasm-shell",
46
- version: "1.28.0",
46
+ version: "1.28.1-dev65.0",
47
47
  description: "",
48
48
  author: "Andre Kohn <kohn.a@outlook.com>",
49
49
  license: "MIT",
@@ -67,22 +67,22 @@ var package_default = {
67
67
  "csv"
68
68
  ],
69
69
  dependencies: {
70
- "@duckdb/duckdb-wasm": "^1.28.0",
71
- xterm: "^5.1.0",
72
- "xterm-addon-fit": "^0.7.0",
70
+ "@duckdb/duckdb-wasm": "^1.28.1-dev65.0",
71
+ xterm: "^5.3.0",
72
+ "xterm-addon-fit": "^0.8.0",
73
73
  "xterm-addon-web-links": "^0.9.0",
74
74
  "xterm-addon-webgl": "^0.16.0"
75
75
  },
76
76
  devDependencies: {
77
- esbuild: "^0.19.5",
78
- eslint: "^8.50.0",
77
+ esbuild: "^0.19.10",
78
+ eslint: "^8.54.0",
79
79
  "eslint-plugin-jasmine": "^4.1.3",
80
80
  "eslint-plugin-react": "^7.33.2",
81
81
  jasmine: "^5.1.0",
82
82
  "jasmine-core": "^5.1.1",
83
83
  "jasmine-spec-reporter": "^7.0.0",
84
84
  "make-dir": "^4.0.0",
85
- prettier: "^3.0.2",
85
+ prettier: "^3.1.1",
86
86
  rimraf: "^5.0.5",
87
87
  "wasm-pack": "^0.12.1"
88
88
  },
@@ -313,11 +313,18 @@ function makeMutClosure(arg0, arg1, dtor, f) {
313
313
  return real;
314
314
  }
315
315
  function __wbg_adapter_22(arg0, arg1, arg2) {
316
- const ret = wasm.wasm_bindgen__convert__closures__invoke1_mut__h823dff921dec94a7(arg0, arg1, addHeapObject(arg2));
316
+ const ret = wasm.wasm_bindgen__convert__closures__invoke1_mut__h55677a793e848de5(arg0, arg1, addHeapObject(arg2));
317
317
  return ret !== 0;
318
318
  }
319
319
  function __wbg_adapter_25(arg0, arg1, arg2) {
320
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hebc947492fd4d2e2(arg0, arg1, addHeapObject(arg2));
320
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7a732a7084fdd670(arg0, arg1, addHeapObject(arg2));
321
+ }
322
+ function handleError(f, args) {
323
+ try {
324
+ return f.apply(this, args);
325
+ } catch (e) {
326
+ wasm.__wbindgen_exn_store(addHeapObject(e));
327
+ }
321
328
  }
322
329
  var cachedUint32Memory0 = null;
323
330
  function getUint32Memory0() {
@@ -378,19 +385,16 @@ function loadHistory(history, cursor) {
378
385
  heap[stack_pointer++] = void 0;
379
386
  }
380
387
  }
388
+ function passInitQueries(queries) {
389
+ const ret = wasm.passInitQueries(addHeapObject(queries));
390
+ return takeObject(ret);
391
+ }
381
392
  function configureDatabase(db) {
382
393
  const ret = wasm.configureDatabase(addHeapObject(db));
383
394
  return takeObject(ret);
384
395
  }
385
- function handleError(f, args) {
386
- try {
387
- return f.apply(this, args);
388
- } catch (e) {
389
- wasm.__wbindgen_exn_store(addHeapObject(e));
390
- }
391
- }
392
- function __wbg_adapter_213(arg0, arg1, arg2, arg3) {
393
- wasm.wasm_bindgen__convert__closures__invoke2_mut__hb4a89eef713a072f(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
396
+ function __wbg_adapter_214(arg0, arg1, arg2, arg3) {
397
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__hc227b212df1c3e22(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
394
398
  }
395
399
  var ShellInputContext = Object.freeze({ FileInput: 0, "0": "FileInput" });
396
400
  var WcWidth = Object.freeze({ Width0: 0, "0": "Width0", Width1: 1, "1": "Width1", Width2: 2, "2": "Width2" });
@@ -526,18 +530,18 @@ function __wbg_get_imports() {
526
530
  return addHeapObject(ret);
527
531
  }, arguments);
528
532
  };
529
- imports.wbg.__wbg_dropFiles_a67bda4902ba5f36 = function() {
530
- return handleError(function(arg0) {
531
- const ret = getObject(arg0).dropFiles();
532
- return addHeapObject(ret);
533
- }, arguments);
534
- };
535
533
  imports.wbg.__wbg_dropFile_377dfecd7aafe02e = function() {
536
534
  return handleError(function(arg0, arg1, arg2) {
537
535
  const ret = getObject(arg0).dropFile(getStringFromWasm0(arg1, arg2));
538
536
  return addHeapObject(ret);
539
537
  }, arguments);
540
538
  };
539
+ imports.wbg.__wbg_dropFiles_a67bda4902ba5f36 = function() {
540
+ return handleError(function(arg0) {
541
+ const ret = getObject(arg0).dropFiles();
542
+ return addHeapObject(ret);
543
+ }, arguments);
544
+ };
541
545
  imports.wbg.__wbg_downloadFile_4cc8985e2c240fec = function() {
542
546
  return handleError(function(arg0, arg1, arg2, arg3) {
543
547
  const ret = getObject(arg0).downloadFile(getStringFromWasm0(arg1, arg2), takeObject(arg3));
@@ -650,14 +654,18 @@ function __wbg_get_imports() {
650
654
  imports.wbg.__wbg_fit_cdd1076e3e5970b7 = function(arg0) {
651
655
  getObject(arg0).fit();
652
656
  };
653
- imports.wbg.__wbg_log_8bb2c010ce15af48 = function(arg0, arg1) {
654
- console.log(getStringFromWasm0(arg0, arg1));
655
- };
656
- imports.wbg.__wbg_error_a84695ce32854879 = function(arg0, arg1) {
657
- console.error(getStringFromWasm0(arg0, arg1));
657
+ imports.wbg.__wbg_new_79cc836771d68198 = function() {
658
+ const ret = new import_xterm_addon_fit.FitAddon();
659
+ return addHeapObject(ret);
658
660
  };
659
- imports.wbg.__wbg_warn_d85b304f0e70f5ac = function(arg0, arg1) {
660
- console.warn(getStringFromWasm0(arg0, arg1));
661
+ imports.wbg.__wbindgen_cb_drop = function(arg0) {
662
+ const obj = takeObject(arg0).original;
663
+ if (obj.cnt-- == 1) {
664
+ obj.a = 0;
665
+ return true;
666
+ }
667
+ const ret = false;
668
+ return ret;
661
669
  };
662
670
  imports.wbg.__wbg_backgroundColor_17a9784f0207d5b0 = function(arg0, arg1) {
663
671
  const ret = getObject(arg1).backgroundColor;
@@ -673,149 +681,145 @@ function __wbg_get_imports() {
673
681
  getInt32Memory0()[arg0 / 4 + 1] = len1;
674
682
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
675
683
  };
676
- imports.wbg.__wbg_new_79cc836771d68198 = function() {
677
- const ret = new import_xterm_addon_fit.FitAddon();
678
- return addHeapObject(ret);
679
- };
680
- imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
681
- const obj = getObject(arg1);
682
- const ret = JSON.stringify(obj === void 0 ? null : obj);
684
+ imports.wbg.__wbg_static_accessor_PACKAGE_NAME_0af717684e189e55 = function(arg0) {
685
+ const ret = import_duckdb_wasm.PACKAGE_NAME;
683
686
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
684
687
  const len1 = WASM_VECTOR_LEN;
685
688
  getInt32Memory0()[arg0 / 4 + 1] = len1;
686
689
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
687
690
  };
688
- imports.wbg.__wbg_setrows_6b947e6079c486dc = function(arg0, arg1) {
689
- getObject(arg0).rows = arg1 >>> 0;
690
- };
691
- imports.wbg.__wbg_setcursorBlink_8a3f7244eb29b1f6 = function(arg0, arg1) {
692
- getObject(arg0).cursorBlink = arg1 !== 0;
691
+ imports.wbg.__wbg_static_accessor_PACKAGE_VERSION_549ba11794cf5003 = function(arg0) {
692
+ const ret = import_duckdb_wasm.PACKAGE_VERSION;
693
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
694
+ const len1 = WASM_VECTOR_LEN;
695
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
696
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
693
697
  };
694
- imports.wbg.__wbg_setcursorWidth_55abde268dea1312 = function(arg0, arg1) {
695
- getObject(arg0).cursorWidth = arg1 >>> 0;
698
+ imports.wbg.__wbg_disconnect_d9855433758f0afc = function() {
699
+ return handleError(function(arg0, arg1) {
700
+ const ret = getObject(arg0).disconnect(arg1 >>> 0);
701
+ return addHeapObject(ret);
702
+ }, arguments);
696
703
  };
697
- imports.wbg.__wbg_setfontFamily_a0645fa4f7aaaf21 = function(arg0, arg1, arg2) {
698
- getObject(arg0).fontFamily = getStringFromWasm0(arg1, arg2);
704
+ imports.wbg.__wbg_log_8bb2c010ce15af48 = function(arg0, arg1) {
705
+ console.log(getStringFromWasm0(arg0, arg1));
699
706
  };
700
- imports.wbg.__wbg_setfontSize_11962e753390bde1 = function(arg0, arg1) {
701
- getObject(arg0).fontSize = arg1 >>> 0;
707
+ imports.wbg.__wbg_error_a84695ce32854879 = function(arg0, arg1) {
708
+ console.error(getStringFromWasm0(arg0, arg1));
702
709
  };
703
- imports.wbg.__wbg_setdrawBoldTextInBrightColors_4f711243dff6df11 = function(arg0, arg1) {
704
- getObject(arg0).drawBoldTextInBrightColors = arg1 !== 0;
710
+ imports.wbg.__wbg_warn_d85b304f0e70f5ac = function(arg0, arg1) {
711
+ console.warn(getStringFromWasm0(arg0, arg1));
705
712
  };
706
- imports.wbg.__wbg_setrightClickSelectsWord_ede48f0595cd3fed = function(arg0, arg1) {
707
- getObject(arg0).rightClickSelectsWord = arg1 !== 0;
713
+ imports.wbg.__wbg_blockStats_14f17a14c4573f3d = function(arg0) {
714
+ const ret = getObject(arg0).blockStats;
715
+ return addHeapObject(ret);
708
716
  };
709
- imports.wbg.__wbg_setallowProposedApi_0147ac2b5a9906b3 = function(arg0, arg1) {
710
- getObject(arg0).allowProposedApi = arg1 !== 0;
717
+ imports.wbg.__wbg_totalFileWrites_1b38029d29f47d43 = function(arg0) {
718
+ const ret = getObject(arg0).totalFileWrites;
719
+ return addHeapObject(ret);
711
720
  };
712
- imports.wbg.__wbg_setbrightYellow_deb3fbc58aa44642 = function(arg0, arg1, arg2) {
713
- getObject(arg0).brightYellow = getStringFromWasm0(arg1, arg2);
721
+ imports.wbg.__wbg_totalFileReadsAhead_02c25545b2f63323 = function(arg0) {
722
+ const ret = getObject(arg0).totalFileReadsAhead;
723
+ return addHeapObject(ret);
714
724
  };
715
- imports.wbg.__wbg_setforeground_87dc40b78955df05 = function(arg0, arg1, arg2) {
716
- getObject(arg0).foreground = getStringFromWasm0(arg1, arg2);
725
+ imports.wbg.__wbg_totalFileReadsCold_304476ed0c49e111 = function(arg0) {
726
+ const ret = getObject(arg0).totalFileReadsCold;
727
+ return addHeapObject(ret);
717
728
  };
718
- imports.wbg.__wbg_setbackground_550386b829ec5c24 = function(arg0, arg1, arg2) {
719
- getObject(arg0).background = getStringFromWasm0(arg1, arg2);
729
+ imports.wbg.__wbg_totalFileReadsCached_2e8edfe7dbf14351 = function(arg0) {
730
+ const ret = getObject(arg0).totalFileReadsCached;
731
+ return addHeapObject(ret);
720
732
  };
721
- imports.wbg.__wbg_settheme_4e67878b7d6cc0fc = function(arg0, arg1) {
722
- getObject(arg0).theme = getObject(arg1);
733
+ imports.wbg.__wbg_totalPageAccesses_2f654448ea273878 = function(arg0) {
734
+ const ret = getObject(arg0).totalPageAccesses;
735
+ return addHeapObject(ret);
723
736
  };
724
- imports.wbg.__wbg_open_7d3a0690ea9e5a45 = function(arg0, arg1) {
725
- getObject(arg0).open(takeObject(arg1));
737
+ imports.wbg.__wbg_totalPageLoads_1ce10deb8828d935 = function(arg0) {
738
+ const ret = getObject(arg0).totalPageLoads;
739
+ return addHeapObject(ret);
726
740
  };
727
- imports.wbg.__wbg_new_70821bf9dbd17152 = function(arg0) {
728
- const ret = new import_xterm_addon_webgl.WebglAddon(arg0 === 16777215 ? void 0 : arg0 !== 0);
741
+ imports.wbg.__wbg_blockSize_77bc4e968a2e845a = function(arg0) {
742
+ const ret = getObject(arg0).blockSize;
729
743
  return addHeapObject(ret);
730
744
  };
731
- imports.wbg.__wbg_instanceof_WebglAddon_c39f68697a31af73 = function(arg0) {
745
+ imports.wbg.__wbg_instanceof_WebLinksAddon_fbcf4efb54881c53 = function(arg0) {
732
746
  let result;
733
747
  try {
734
- result = getObject(arg0) instanceof import_xterm_addon_webgl.WebglAddon;
748
+ result = getObject(arg0) instanceof import_xterm_addon_web_links.WebLinksAddon;
735
749
  } catch (e) {
736
750
  result = false;
737
751
  }
738
752
  const ret = result;
739
753
  return ret;
740
754
  };
741
- imports.wbg.__wbg_loadAddon_1bfe744e6f456990 = function(arg0, arg1) {
742
- getObject(arg0).loadAddon(takeObject(arg1));
743
- };
744
- imports.wbg.__wbg_new_92aa50f448dac851 = function(arg0, arg1, arg2) {
745
- const ret = new import_xterm_addon_web_links.WebLinksAddon(getObject(arg0), getObject(arg1), arg2 === 16777215 ? void 0 : arg2 !== 0);
746
- return addHeapObject(ret);
747
- };
748
- imports.wbg.__wbg_instanceof_WebLinksAddon_fbcf4efb54881c53 = function(arg0) {
755
+ imports.wbg.__wbg_instanceof_WebglAddon_c39f68697a31af73 = function(arg0) {
749
756
  let result;
750
757
  try {
751
- result = getObject(arg0) instanceof import_xterm_addon_web_links.WebLinksAddon;
758
+ result = getObject(arg0) instanceof import_xterm_addon_webgl.WebglAddon;
752
759
  } catch (e) {
753
760
  result = false;
754
761
  }
755
762
  const ret = result;
756
763
  return ret;
757
764
  };
758
- imports.wbg.__wbg_blockStats_14f17a14c4573f3d = function(arg0) {
759
- const ret = getObject(arg0).blockStats;
760
- return addHeapObject(ret);
765
+ imports.wbg.__wbg_setallowProposedApi_0147ac2b5a9906b3 = function(arg0, arg1) {
766
+ getObject(arg0).allowProposedApi = arg1 !== 0;
761
767
  };
762
- imports.wbg.__wbg_totalFileWrites_1b38029d29f47d43 = function(arg0) {
763
- const ret = getObject(arg0).totalFileWrites;
764
- return addHeapObject(ret);
768
+ imports.wbg.__wbg_setcursorBlink_8a3f7244eb29b1f6 = function(arg0, arg1) {
769
+ getObject(arg0).cursorBlink = arg1 !== 0;
765
770
  };
766
- imports.wbg.__wbg_totalFileReadsAhead_02c25545b2f63323 = function(arg0) {
767
- const ret = getObject(arg0).totalFileReadsAhead;
768
- return addHeapObject(ret);
771
+ imports.wbg.__wbg_setcursorWidth_55abde268dea1312 = function(arg0, arg1) {
772
+ getObject(arg0).cursorWidth = arg1 >>> 0;
769
773
  };
770
- imports.wbg.__wbg_totalFileReadsCold_304476ed0c49e111 = function(arg0) {
771
- const ret = getObject(arg0).totalFileReadsCold;
772
- return addHeapObject(ret);
774
+ imports.wbg.__wbg_setdrawBoldTextInBrightColors_4f711243dff6df11 = function(arg0, arg1) {
775
+ getObject(arg0).drawBoldTextInBrightColors = arg1 !== 0;
773
776
  };
774
- imports.wbg.__wbg_totalFileReadsCached_2e8edfe7dbf14351 = function(arg0) {
775
- const ret = getObject(arg0).totalFileReadsCached;
776
- return addHeapObject(ret);
777
+ imports.wbg.__wbg_setfontSize_11962e753390bde1 = function(arg0, arg1) {
778
+ getObject(arg0).fontSize = arg1 >>> 0;
777
779
  };
778
- imports.wbg.__wbg_totalPageAccesses_2f654448ea273878 = function(arg0) {
779
- const ret = getObject(arg0).totalPageAccesses;
780
- return addHeapObject(ret);
780
+ imports.wbg.__wbg_setfontFamily_a0645fa4f7aaaf21 = function(arg0, arg1, arg2) {
781
+ getObject(arg0).fontFamily = getStringFromWasm0(arg1, arg2);
781
782
  };
782
- imports.wbg.__wbg_totalPageLoads_1ce10deb8828d935 = function(arg0) {
783
- const ret = getObject(arg0).totalPageLoads;
784
- return addHeapObject(ret);
783
+ imports.wbg.__wbg_setrightClickSelectsWord_ede48f0595cd3fed = function(arg0, arg1) {
784
+ getObject(arg0).rightClickSelectsWord = arg1 !== 0;
785
785
  };
786
- imports.wbg.__wbg_blockSize_77bc4e968a2e845a = function(arg0) {
787
- const ret = getObject(arg0).blockSize;
786
+ imports.wbg.__wbg_setrows_6b947e6079c486dc = function(arg0, arg1) {
787
+ getObject(arg0).rows = arg1 >>> 0;
788
+ };
789
+ imports.wbg.__wbg_settheme_4e67878b7d6cc0fc = function(arg0, arg1) {
790
+ getObject(arg0).theme = getObject(arg1);
791
+ };
792
+ imports.wbg.__wbg_setforeground_87dc40b78955df05 = function(arg0, arg1, arg2) {
793
+ getObject(arg0).foreground = getStringFromWasm0(arg1, arg2);
794
+ };
795
+ imports.wbg.__wbg_setbackground_550386b829ec5c24 = function(arg0, arg1, arg2) {
796
+ getObject(arg0).background = getStringFromWasm0(arg1, arg2);
797
+ };
798
+ imports.wbg.__wbg_setbrightYellow_deb3fbc58aa44642 = function(arg0, arg1, arg2) {
799
+ getObject(arg0).brightYellow = getStringFromWasm0(arg1, arg2);
800
+ };
801
+ imports.wbg.__wbg_open_7d3a0690ea9e5a45 = function(arg0, arg1) {
802
+ getObject(arg0).open(takeObject(arg1));
803
+ };
804
+ imports.wbg.__wbg_loadAddon_1bfe744e6f456990 = function(arg0, arg1) {
805
+ getObject(arg0).loadAddon(takeObject(arg1));
806
+ };
807
+ imports.wbg.__wbg_new_92aa50f448dac851 = function(arg0, arg1, arg2) {
808
+ const ret = new import_xterm_addon_web_links.WebLinksAddon(getObject(arg0), getObject(arg1), arg2 === 16777215 ? void 0 : arg2 !== 0);
788
809
  return addHeapObject(ret);
789
810
  };
790
- imports.wbg.__wbg_static_accessor_PACKAGE_VERSION_549ba11794cf5003 = function(arg0) {
791
- const ret = import_duckdb_wasm.PACKAGE_VERSION;
792
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
793
- const len1 = WASM_VECTOR_LEN;
794
- getInt32Memory0()[arg0 / 4 + 1] = len1;
795
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
811
+ imports.wbg.__wbg_new_70821bf9dbd17152 = function(arg0) {
812
+ const ret = new import_xterm_addon_webgl.WebglAddon(arg0 === 16777215 ? void 0 : arg0 !== 0);
813
+ return addHeapObject(ret);
796
814
  };
797
- imports.wbg.__wbg_static_accessor_PACKAGE_NAME_0af717684e189e55 = function(arg0) {
798
- const ret = import_duckdb_wasm.PACKAGE_NAME;
815
+ imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
816
+ const obj = getObject(arg1);
817
+ const ret = JSON.stringify(obj === void 0 ? null : obj);
799
818
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
800
819
  const len1 = WASM_VECTOR_LEN;
801
820
  getInt32Memory0()[arg0 / 4 + 1] = len1;
802
821
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
803
822
  };
804
- imports.wbg.__wbg_disconnect_d9855433758f0afc = function() {
805
- return handleError(function(arg0, arg1) {
806
- const ret = getObject(arg0).disconnect(arg1 >>> 0);
807
- return addHeapObject(ret);
808
- }, arguments);
809
- };
810
- imports.wbg.__wbindgen_cb_drop = function(arg0) {
811
- const obj = takeObject(arg0).original;
812
- if (obj.cnt-- == 1) {
813
- obj.a = 0;
814
- return true;
815
- }
816
- const ret = false;
817
- return ret;
818
- };
819
823
  imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
820
824
  const ret = new Error();
821
825
  return addHeapObject(ret);
@@ -961,7 +965,7 @@ function __wbg_get_imports() {
961
965
  const a = state0.a;
962
966
  state0.a = 0;
963
967
  try {
964
- return __wbg_adapter_213(a, state0.b, arg02, arg12);
968
+ return __wbg_adapter_214(a, state0.b, arg02, arg12);
965
969
  } finally {
966
970
  state0.a = a;
967
971
  }
@@ -1013,12 +1017,12 @@ function __wbg_get_imports() {
1013
1017
  const ret = wasm.memory;
1014
1018
  return addHeapObject(ret);
1015
1019
  };
1016
- imports.wbg.__wbindgen_closure_wrapper633 = function(arg0, arg1, arg2) {
1017
- const ret = makeMutClosure(arg0, arg1, 131, __wbg_adapter_22);
1020
+ imports.wbg.__wbindgen_closure_wrapper351 = function(arg0, arg1, arg2) {
1021
+ const ret = makeMutClosure(arg0, arg1, 84, __wbg_adapter_22);
1018
1022
  return addHeapObject(ret);
1019
1023
  };
1020
- imports.wbg.__wbindgen_closure_wrapper956 = function(arg0, arg1, arg2) {
1021
- const ret = makeMutClosure(arg0, arg1, 150, __wbg_adapter_25);
1024
+ imports.wbg.__wbindgen_closure_wrapper964 = function(arg0, arg1, arg2) {
1025
+ const ret = makeMutClosure(arg0, arg1, 152, __wbg_adapter_25);
1022
1026
  return addHeapObject(ret);
1023
1027
  };
1024
1028
  return imports;
@@ -1240,6 +1244,7 @@ var ShellRuntime = class {
1240
1244
  const rect = container.getBoundingClientRect();
1241
1245
  resize(rect.width, rect.height);
1242
1246
  };
1247
+ this.hash = "";
1243
1248
  }
1244
1249
  async pickFiles() {
1245
1250
  if (this.database == null) {
@@ -1262,6 +1267,16 @@ var ShellRuntime = class {
1262
1267
  return await navigator.clipboard.writeText(value);
1263
1268
  }
1264
1269
  async pushInputToHistory(value) {
1270
+ const encode = encodeURIComponent(extraswaps(value));
1271
+ if (this.hash === "")
1272
+ this.hash = "queries=v0";
1273
+ this.hash += ",";
1274
+ this.hash += encode;
1275
+ if (window.location.hash.startsWith("#savequeries"))
1276
+ window.location.hash = "savequeries&" + this.hash;
1277
+ const a = document.getElementById("hashencoded");
1278
+ if (a && a instanceof HTMLAnchorElement)
1279
+ a.href = "/#" + this.hash;
1265
1280
  this.history.push(value);
1266
1281
  }
1267
1282
  };
@@ -1271,6 +1286,22 @@ function formatBytes(value) {
1271
1286
  const size = Number((value / Math.pow(multiple, exp)).toFixed(2));
1272
1287
  return "".concat(size, " ").concat(exp ? "".concat(k, "MGTPEZY")[exp - 1] + suffix : "byte".concat(size !== 1 ? "s" : ""));
1273
1288
  }
1289
+ function extraswaps(input) {
1290
+ let res = "";
1291
+ for (let i = 0; i < input.length; i++) {
1292
+ if (input[i] == " ")
1293
+ res += "-";
1294
+ else if (input[i] == "-")
1295
+ res += " ";
1296
+ else if (input[i] == ";")
1297
+ res += "~";
1298
+ else if (input[i] == "~")
1299
+ res += ";";
1300
+ else
1301
+ res += input[i];
1302
+ }
1303
+ return res;
1304
+ }
1274
1305
  async function embed2(props) {
1275
1306
  var _a, _b;
1276
1307
  await shell_default(props.shellModule);
@@ -1309,6 +1340,15 @@ async function embed2(props) {
1309
1340
  await step("Attaching Shell", async () => {
1310
1341
  configureDatabase(runtime.database);
1311
1342
  });
1343
+ const hash = window.location.hash;
1344
+ const splits = hash.split(",");
1345
+ const sqls = [];
1346
+ for (let i = 1; i < splits.length; i++) {
1347
+ sqls.push(extraswaps(decodeURIComponent(splits[i])));
1348
+ }
1349
+ await step("Rewinding history!", async () => {
1350
+ passInitQueries(sqls);
1351
+ });
1312
1352
  }
1313
1353
 
1314
1354
  // src/platform.ts