@duckdb/duckdb-wasm-shell 1.28.0 → 1.28.1-dev66.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/dist/img/duckdb_version_badge.svg +1 -1
- package/dist/shell.cjs +169 -129
- package/dist/shell.cjs.map +2 -2
- package/dist/shell.js +169 -129
- package/dist/shell.js.map +2 -2
- package/dist/shell.mjs +169 -129
- package/dist/shell.mjs.map +3 -3
- package/dist/shell_bg.wasm +0 -0
- package/package.json +7 -7
package/dist/shell.js
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
// package.json
|
|
34
34
|
var package_default = {
|
|
35
35
|
name: "@duckdb/duckdb-wasm-shell",
|
|
36
|
-
version: "1.28.0",
|
|
36
|
+
version: "1.28.1-dev66.0",
|
|
37
37
|
description: "",
|
|
38
38
|
author: "Andre Kohn <kohn.a@outlook.com>",
|
|
39
39
|
license: "MIT",
|
|
@@ -57,22 +57,22 @@
|
|
|
57
57
|
"csv"
|
|
58
58
|
],
|
|
59
59
|
dependencies: {
|
|
60
|
-
"@duckdb/duckdb-wasm": "^1.28.0",
|
|
61
|
-
xterm: "^5.
|
|
62
|
-
"xterm-addon-fit": "^0.
|
|
60
|
+
"@duckdb/duckdb-wasm": "^1.28.1-dev66.0",
|
|
61
|
+
xterm: "^5.3.0",
|
|
62
|
+
"xterm-addon-fit": "^0.8.0",
|
|
63
63
|
"xterm-addon-web-links": "^0.9.0",
|
|
64
64
|
"xterm-addon-webgl": "^0.16.0"
|
|
65
65
|
},
|
|
66
66
|
devDependencies: {
|
|
67
|
-
esbuild: "^0.19.
|
|
68
|
-
eslint: "^8.
|
|
67
|
+
esbuild: "^0.19.10",
|
|
68
|
+
eslint: "^8.54.0",
|
|
69
69
|
"eslint-plugin-jasmine": "^4.1.3",
|
|
70
70
|
"eslint-plugin-react": "^7.33.2",
|
|
71
71
|
jasmine: "^5.1.0",
|
|
72
72
|
"jasmine-core": "^5.1.1",
|
|
73
73
|
"jasmine-spec-reporter": "^7.0.0",
|
|
74
74
|
"make-dir": "^4.0.0",
|
|
75
|
-
prettier: "^3.
|
|
75
|
+
prettier: "^3.1.1",
|
|
76
76
|
rimraf: "^5.0.5",
|
|
77
77
|
"wasm-pack": "^0.12.1"
|
|
78
78
|
},
|
|
@@ -303,11 +303,18 @@
|
|
|
303
303
|
return real;
|
|
304
304
|
}
|
|
305
305
|
function __wbg_adapter_22(arg0, arg1, arg2) {
|
|
306
|
-
const ret = wasm.
|
|
306
|
+
const ret = wasm.wasm_bindgen__convert__closures__invoke1_mut__h55677a793e848de5(arg0, arg1, addHeapObject(arg2));
|
|
307
307
|
return ret !== 0;
|
|
308
308
|
}
|
|
309
309
|
function __wbg_adapter_25(arg0, arg1, arg2) {
|
|
310
|
-
wasm.
|
|
310
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7a732a7084fdd670(arg0, arg1, addHeapObject(arg2));
|
|
311
|
+
}
|
|
312
|
+
function handleError(f, args) {
|
|
313
|
+
try {
|
|
314
|
+
return f.apply(this, args);
|
|
315
|
+
} catch (e) {
|
|
316
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
317
|
+
}
|
|
311
318
|
}
|
|
312
319
|
var cachedUint32Memory0 = null;
|
|
313
320
|
function getUint32Memory0() {
|
|
@@ -368,19 +375,16 @@
|
|
|
368
375
|
heap[stack_pointer++] = void 0;
|
|
369
376
|
}
|
|
370
377
|
}
|
|
378
|
+
function passInitQueries(queries) {
|
|
379
|
+
const ret = wasm.passInitQueries(addHeapObject(queries));
|
|
380
|
+
return takeObject(ret);
|
|
381
|
+
}
|
|
371
382
|
function configureDatabase(db) {
|
|
372
383
|
const ret = wasm.configureDatabase(addHeapObject(db));
|
|
373
384
|
return takeObject(ret);
|
|
374
385
|
}
|
|
375
|
-
function
|
|
376
|
-
|
|
377
|
-
return f.apply(this, args);
|
|
378
|
-
} catch (e) {
|
|
379
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
function __wbg_adapter_213(arg0, arg1, arg2, arg3) {
|
|
383
|
-
wasm.wasm_bindgen__convert__closures__invoke2_mut__hb4a89eef713a072f(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
386
|
+
function __wbg_adapter_214(arg0, arg1, arg2, arg3) {
|
|
387
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__hc227b212df1c3e22(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
384
388
|
}
|
|
385
389
|
var ShellInputContext = Object.freeze({ FileInput: 0, "0": "FileInput" });
|
|
386
390
|
var WcWidth = Object.freeze({ Width0: 0, "0": "Width0", Width1: 1, "1": "Width1", Width2: 2, "2": "Width2" });
|
|
@@ -516,18 +520,18 @@
|
|
|
516
520
|
return addHeapObject(ret);
|
|
517
521
|
}, arguments);
|
|
518
522
|
};
|
|
519
|
-
imports.wbg.__wbg_dropFiles_a67bda4902ba5f36 = function() {
|
|
520
|
-
return handleError(function(arg0) {
|
|
521
|
-
const ret = getObject(arg0).dropFiles();
|
|
522
|
-
return addHeapObject(ret);
|
|
523
|
-
}, arguments);
|
|
524
|
-
};
|
|
525
523
|
imports.wbg.__wbg_dropFile_377dfecd7aafe02e = function() {
|
|
526
524
|
return handleError(function(arg0, arg1, arg2) {
|
|
527
525
|
const ret = getObject(arg0).dropFile(getStringFromWasm0(arg1, arg2));
|
|
528
526
|
return addHeapObject(ret);
|
|
529
527
|
}, arguments);
|
|
530
528
|
};
|
|
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
|
+
};
|
|
531
535
|
imports.wbg.__wbg_downloadFile_4cc8985e2c240fec = function() {
|
|
532
536
|
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
533
537
|
const ret = getObject(arg0).downloadFile(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
@@ -640,14 +644,18 @@
|
|
|
640
644
|
imports.wbg.__wbg_fit_cdd1076e3e5970b7 = function(arg0) {
|
|
641
645
|
getObject(arg0).fit();
|
|
642
646
|
};
|
|
643
|
-
imports.wbg.
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
imports.wbg.__wbg_error_a84695ce32854879 = function(arg0, arg1) {
|
|
647
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
647
|
+
imports.wbg.__wbg_new_79cc836771d68198 = function() {
|
|
648
|
+
const ret = new import_xterm_addon_fit.FitAddon();
|
|
649
|
+
return addHeapObject(ret);
|
|
648
650
|
};
|
|
649
|
-
imports.wbg.
|
|
650
|
-
|
|
651
|
+
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
652
|
+
const obj = takeObject(arg0).original;
|
|
653
|
+
if (obj.cnt-- == 1) {
|
|
654
|
+
obj.a = 0;
|
|
655
|
+
return true;
|
|
656
|
+
}
|
|
657
|
+
const ret = false;
|
|
658
|
+
return ret;
|
|
651
659
|
};
|
|
652
660
|
imports.wbg.__wbg_backgroundColor_17a9784f0207d5b0 = function(arg0, arg1) {
|
|
653
661
|
const ret = getObject(arg1).backgroundColor;
|
|
@@ -663,149 +671,145 @@
|
|
|
663
671
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
664
672
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
665
673
|
};
|
|
666
|
-
imports.wbg.
|
|
667
|
-
const ret =
|
|
668
|
-
return addHeapObject(ret);
|
|
669
|
-
};
|
|
670
|
-
imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
671
|
-
const obj = getObject(arg1);
|
|
672
|
-
const ret = JSON.stringify(obj === void 0 ? null : obj);
|
|
674
|
+
imports.wbg.__wbg_static_accessor_PACKAGE_NAME_0af717684e189e55 = function(arg0) {
|
|
675
|
+
const ret = import_duckdb_wasm.PACKAGE_NAME;
|
|
673
676
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
674
677
|
const len1 = WASM_VECTOR_LEN;
|
|
675
678
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
676
679
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
677
680
|
};
|
|
678
|
-
imports.wbg.
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
681
|
+
imports.wbg.__wbg_static_accessor_PACKAGE_VERSION_549ba11794cf5003 = function(arg0) {
|
|
682
|
+
const ret = import_duckdb_wasm.PACKAGE_VERSION;
|
|
683
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
684
|
+
const len1 = WASM_VECTOR_LEN;
|
|
685
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
686
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
683
687
|
};
|
|
684
|
-
imports.wbg.
|
|
685
|
-
|
|
688
|
+
imports.wbg.__wbg_disconnect_d9855433758f0afc = function() {
|
|
689
|
+
return handleError(function(arg0, arg1) {
|
|
690
|
+
const ret = getObject(arg0).disconnect(arg1 >>> 0);
|
|
691
|
+
return addHeapObject(ret);
|
|
692
|
+
}, arguments);
|
|
686
693
|
};
|
|
687
|
-
imports.wbg.
|
|
688
|
-
|
|
694
|
+
imports.wbg.__wbg_log_8bb2c010ce15af48 = function(arg0, arg1) {
|
|
695
|
+
console.log(getStringFromWasm0(arg0, arg1));
|
|
689
696
|
};
|
|
690
|
-
imports.wbg.
|
|
691
|
-
|
|
697
|
+
imports.wbg.__wbg_error_a84695ce32854879 = function(arg0, arg1) {
|
|
698
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
692
699
|
};
|
|
693
|
-
imports.wbg.
|
|
694
|
-
|
|
700
|
+
imports.wbg.__wbg_warn_d85b304f0e70f5ac = function(arg0, arg1) {
|
|
701
|
+
console.warn(getStringFromWasm0(arg0, arg1));
|
|
695
702
|
};
|
|
696
|
-
imports.wbg.
|
|
697
|
-
getObject(arg0).
|
|
703
|
+
imports.wbg.__wbg_blockStats_14f17a14c4573f3d = function(arg0) {
|
|
704
|
+
const ret = getObject(arg0).blockStats;
|
|
705
|
+
return addHeapObject(ret);
|
|
698
706
|
};
|
|
699
|
-
imports.wbg.
|
|
700
|
-
getObject(arg0).
|
|
707
|
+
imports.wbg.__wbg_totalFileWrites_1b38029d29f47d43 = function(arg0) {
|
|
708
|
+
const ret = getObject(arg0).totalFileWrites;
|
|
709
|
+
return addHeapObject(ret);
|
|
701
710
|
};
|
|
702
|
-
imports.wbg.
|
|
703
|
-
getObject(arg0).
|
|
711
|
+
imports.wbg.__wbg_totalFileReadsAhead_02c25545b2f63323 = function(arg0) {
|
|
712
|
+
const ret = getObject(arg0).totalFileReadsAhead;
|
|
713
|
+
return addHeapObject(ret);
|
|
704
714
|
};
|
|
705
|
-
imports.wbg.
|
|
706
|
-
getObject(arg0).
|
|
715
|
+
imports.wbg.__wbg_totalFileReadsCold_304476ed0c49e111 = function(arg0) {
|
|
716
|
+
const ret = getObject(arg0).totalFileReadsCold;
|
|
717
|
+
return addHeapObject(ret);
|
|
707
718
|
};
|
|
708
|
-
imports.wbg.
|
|
709
|
-
getObject(arg0).
|
|
719
|
+
imports.wbg.__wbg_totalFileReadsCached_2e8edfe7dbf14351 = function(arg0) {
|
|
720
|
+
const ret = getObject(arg0).totalFileReadsCached;
|
|
721
|
+
return addHeapObject(ret);
|
|
710
722
|
};
|
|
711
|
-
imports.wbg.
|
|
712
|
-
|
|
723
|
+
imports.wbg.__wbg_totalPageAccesses_2f654448ea273878 = function(arg0) {
|
|
724
|
+
const ret = getObject(arg0).totalPageAccesses;
|
|
725
|
+
return addHeapObject(ret);
|
|
713
726
|
};
|
|
714
|
-
imports.wbg.
|
|
715
|
-
getObject(arg0).
|
|
727
|
+
imports.wbg.__wbg_totalPageLoads_1ce10deb8828d935 = function(arg0) {
|
|
728
|
+
const ret = getObject(arg0).totalPageLoads;
|
|
729
|
+
return addHeapObject(ret);
|
|
716
730
|
};
|
|
717
|
-
imports.wbg.
|
|
718
|
-
const ret =
|
|
731
|
+
imports.wbg.__wbg_blockSize_77bc4e968a2e845a = function(arg0) {
|
|
732
|
+
const ret = getObject(arg0).blockSize;
|
|
719
733
|
return addHeapObject(ret);
|
|
720
734
|
};
|
|
721
|
-
imports.wbg.
|
|
735
|
+
imports.wbg.__wbg_instanceof_WebLinksAddon_fbcf4efb54881c53 = function(arg0) {
|
|
722
736
|
let result;
|
|
723
737
|
try {
|
|
724
|
-
result = getObject(arg0) instanceof
|
|
738
|
+
result = getObject(arg0) instanceof import_xterm_addon_web_links.WebLinksAddon;
|
|
725
739
|
} catch (e) {
|
|
726
740
|
result = false;
|
|
727
741
|
}
|
|
728
742
|
const ret = result;
|
|
729
743
|
return ret;
|
|
730
744
|
};
|
|
731
|
-
imports.wbg.
|
|
732
|
-
getObject(arg0).loadAddon(takeObject(arg1));
|
|
733
|
-
};
|
|
734
|
-
imports.wbg.__wbg_new_92aa50f448dac851 = function(arg0, arg1, arg2) {
|
|
735
|
-
const ret = new import_xterm_addon_web_links.WebLinksAddon(getObject(arg0), getObject(arg1), arg2 === 16777215 ? void 0 : arg2 !== 0);
|
|
736
|
-
return addHeapObject(ret);
|
|
737
|
-
};
|
|
738
|
-
imports.wbg.__wbg_instanceof_WebLinksAddon_fbcf4efb54881c53 = function(arg0) {
|
|
745
|
+
imports.wbg.__wbg_instanceof_WebglAddon_c39f68697a31af73 = function(arg0) {
|
|
739
746
|
let result;
|
|
740
747
|
try {
|
|
741
|
-
result = getObject(arg0) instanceof
|
|
748
|
+
result = getObject(arg0) instanceof import_xterm_addon_webgl.WebglAddon;
|
|
742
749
|
} catch (e) {
|
|
743
750
|
result = false;
|
|
744
751
|
}
|
|
745
752
|
const ret = result;
|
|
746
753
|
return ret;
|
|
747
754
|
};
|
|
748
|
-
imports.wbg.
|
|
749
|
-
|
|
750
|
-
return addHeapObject(ret);
|
|
755
|
+
imports.wbg.__wbg_setallowProposedApi_0147ac2b5a9906b3 = function(arg0, arg1) {
|
|
756
|
+
getObject(arg0).allowProposedApi = arg1 !== 0;
|
|
751
757
|
};
|
|
752
|
-
imports.wbg.
|
|
753
|
-
|
|
754
|
-
return addHeapObject(ret);
|
|
758
|
+
imports.wbg.__wbg_setcursorBlink_8a3f7244eb29b1f6 = function(arg0, arg1) {
|
|
759
|
+
getObject(arg0).cursorBlink = arg1 !== 0;
|
|
755
760
|
};
|
|
756
|
-
imports.wbg.
|
|
757
|
-
|
|
758
|
-
return addHeapObject(ret);
|
|
761
|
+
imports.wbg.__wbg_setcursorWidth_55abde268dea1312 = function(arg0, arg1) {
|
|
762
|
+
getObject(arg0).cursorWidth = arg1 >>> 0;
|
|
759
763
|
};
|
|
760
|
-
imports.wbg.
|
|
761
|
-
|
|
762
|
-
return addHeapObject(ret);
|
|
764
|
+
imports.wbg.__wbg_setdrawBoldTextInBrightColors_4f711243dff6df11 = function(arg0, arg1) {
|
|
765
|
+
getObject(arg0).drawBoldTextInBrightColors = arg1 !== 0;
|
|
763
766
|
};
|
|
764
|
-
imports.wbg.
|
|
765
|
-
|
|
766
|
-
return addHeapObject(ret);
|
|
767
|
+
imports.wbg.__wbg_setfontSize_11962e753390bde1 = function(arg0, arg1) {
|
|
768
|
+
getObject(arg0).fontSize = arg1 >>> 0;
|
|
767
769
|
};
|
|
768
|
-
imports.wbg.
|
|
769
|
-
|
|
770
|
-
return addHeapObject(ret);
|
|
770
|
+
imports.wbg.__wbg_setfontFamily_a0645fa4f7aaaf21 = function(arg0, arg1, arg2) {
|
|
771
|
+
getObject(arg0).fontFamily = getStringFromWasm0(arg1, arg2);
|
|
771
772
|
};
|
|
772
|
-
imports.wbg.
|
|
773
|
-
|
|
774
|
-
return addHeapObject(ret);
|
|
773
|
+
imports.wbg.__wbg_setrightClickSelectsWord_ede48f0595cd3fed = function(arg0, arg1) {
|
|
774
|
+
getObject(arg0).rightClickSelectsWord = arg1 !== 0;
|
|
775
775
|
};
|
|
776
|
-
imports.wbg.
|
|
777
|
-
|
|
776
|
+
imports.wbg.__wbg_setrows_6b947e6079c486dc = function(arg0, arg1) {
|
|
777
|
+
getObject(arg0).rows = arg1 >>> 0;
|
|
778
|
+
};
|
|
779
|
+
imports.wbg.__wbg_settheme_4e67878b7d6cc0fc = function(arg0, arg1) {
|
|
780
|
+
getObject(arg0).theme = getObject(arg1);
|
|
781
|
+
};
|
|
782
|
+
imports.wbg.__wbg_setforeground_87dc40b78955df05 = function(arg0, arg1, arg2) {
|
|
783
|
+
getObject(arg0).foreground = getStringFromWasm0(arg1, arg2);
|
|
784
|
+
};
|
|
785
|
+
imports.wbg.__wbg_setbackground_550386b829ec5c24 = function(arg0, arg1, arg2) {
|
|
786
|
+
getObject(arg0).background = getStringFromWasm0(arg1, arg2);
|
|
787
|
+
};
|
|
788
|
+
imports.wbg.__wbg_setbrightYellow_deb3fbc58aa44642 = function(arg0, arg1, arg2) {
|
|
789
|
+
getObject(arg0).brightYellow = getStringFromWasm0(arg1, arg2);
|
|
790
|
+
};
|
|
791
|
+
imports.wbg.__wbg_open_7d3a0690ea9e5a45 = function(arg0, arg1) {
|
|
792
|
+
getObject(arg0).open(takeObject(arg1));
|
|
793
|
+
};
|
|
794
|
+
imports.wbg.__wbg_loadAddon_1bfe744e6f456990 = function(arg0, arg1) {
|
|
795
|
+
getObject(arg0).loadAddon(takeObject(arg1));
|
|
796
|
+
};
|
|
797
|
+
imports.wbg.__wbg_new_92aa50f448dac851 = function(arg0, arg1, arg2) {
|
|
798
|
+
const ret = new import_xterm_addon_web_links.WebLinksAddon(getObject(arg0), getObject(arg1), arg2 === 16777215 ? void 0 : arg2 !== 0);
|
|
778
799
|
return addHeapObject(ret);
|
|
779
800
|
};
|
|
780
|
-
imports.wbg.
|
|
781
|
-
const ret =
|
|
782
|
-
|
|
783
|
-
const len1 = WASM_VECTOR_LEN;
|
|
784
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
785
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
801
|
+
imports.wbg.__wbg_new_70821bf9dbd17152 = function(arg0) {
|
|
802
|
+
const ret = new import_xterm_addon_webgl.WebglAddon(arg0 === 16777215 ? void 0 : arg0 !== 0);
|
|
803
|
+
return addHeapObject(ret);
|
|
786
804
|
};
|
|
787
|
-
imports.wbg.
|
|
788
|
-
const
|
|
805
|
+
imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
806
|
+
const obj = getObject(arg1);
|
|
807
|
+
const ret = JSON.stringify(obj === void 0 ? null : obj);
|
|
789
808
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
790
809
|
const len1 = WASM_VECTOR_LEN;
|
|
791
810
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
792
811
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
793
812
|
};
|
|
794
|
-
imports.wbg.__wbg_disconnect_d9855433758f0afc = function() {
|
|
795
|
-
return handleError(function(arg0, arg1) {
|
|
796
|
-
const ret = getObject(arg0).disconnect(arg1 >>> 0);
|
|
797
|
-
return addHeapObject(ret);
|
|
798
|
-
}, arguments);
|
|
799
|
-
};
|
|
800
|
-
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
801
|
-
const obj = takeObject(arg0).original;
|
|
802
|
-
if (obj.cnt-- == 1) {
|
|
803
|
-
obj.a = 0;
|
|
804
|
-
return true;
|
|
805
|
-
}
|
|
806
|
-
const ret = false;
|
|
807
|
-
return ret;
|
|
808
|
-
};
|
|
809
813
|
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
810
814
|
const ret = new Error();
|
|
811
815
|
return addHeapObject(ret);
|
|
@@ -951,7 +955,7 @@
|
|
|
951
955
|
const a = state0.a;
|
|
952
956
|
state0.a = 0;
|
|
953
957
|
try {
|
|
954
|
-
return
|
|
958
|
+
return __wbg_adapter_214(a, state0.b, arg02, arg12);
|
|
955
959
|
} finally {
|
|
956
960
|
state0.a = a;
|
|
957
961
|
}
|
|
@@ -1003,12 +1007,12 @@
|
|
|
1003
1007
|
const ret = wasm.memory;
|
|
1004
1008
|
return addHeapObject(ret);
|
|
1005
1009
|
};
|
|
1006
|
-
imports.wbg.
|
|
1007
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1010
|
+
imports.wbg.__wbindgen_closure_wrapper351 = function(arg0, arg1, arg2) {
|
|
1011
|
+
const ret = makeMutClosure(arg0, arg1, 84, __wbg_adapter_22);
|
|
1008
1012
|
return addHeapObject(ret);
|
|
1009
1013
|
};
|
|
1010
|
-
imports.wbg.
|
|
1011
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1014
|
+
imports.wbg.__wbindgen_closure_wrapper964 = function(arg0, arg1, arg2) {
|
|
1015
|
+
const ret = makeMutClosure(arg0, arg1, 152, __wbg_adapter_25);
|
|
1012
1016
|
return addHeapObject(ret);
|
|
1013
1017
|
};
|
|
1014
1018
|
return imports;
|
|
@@ -1230,6 +1234,7 @@
|
|
|
1230
1234
|
const rect = container.getBoundingClientRect();
|
|
1231
1235
|
resize(rect.width, rect.height);
|
|
1232
1236
|
};
|
|
1237
|
+
this.hash = "";
|
|
1233
1238
|
}
|
|
1234
1239
|
async pickFiles() {
|
|
1235
1240
|
if (this.database == null) {
|
|
@@ -1252,6 +1257,16 @@
|
|
|
1252
1257
|
return await navigator.clipboard.writeText(value);
|
|
1253
1258
|
}
|
|
1254
1259
|
async pushInputToHistory(value) {
|
|
1260
|
+
const encode = encodeURIComponent(extraswaps(value));
|
|
1261
|
+
if (this.hash === "")
|
|
1262
|
+
this.hash = "queries=v0";
|
|
1263
|
+
this.hash += ",";
|
|
1264
|
+
this.hash += encode;
|
|
1265
|
+
if (window.location.hash.startsWith("#savequeries"))
|
|
1266
|
+
window.location.hash = "savequeries&" + this.hash;
|
|
1267
|
+
const a = document.getElementById("hashencoded");
|
|
1268
|
+
if (a && a instanceof HTMLAnchorElement)
|
|
1269
|
+
a.href = "/#" + this.hash;
|
|
1255
1270
|
this.history.push(value);
|
|
1256
1271
|
}
|
|
1257
1272
|
};
|
|
@@ -1261,6 +1276,22 @@
|
|
|
1261
1276
|
const size = Number((value / Math.pow(multiple, exp)).toFixed(2));
|
|
1262
1277
|
return "".concat(size, " ").concat(exp ? "".concat(k, "MGTPEZY")[exp - 1] + suffix : "byte".concat(size !== 1 ? "s" : ""));
|
|
1263
1278
|
}
|
|
1279
|
+
function extraswaps(input) {
|
|
1280
|
+
let res = "";
|
|
1281
|
+
for (let i = 0; i < input.length; i++) {
|
|
1282
|
+
if (input[i] == " ")
|
|
1283
|
+
res += "-";
|
|
1284
|
+
else if (input[i] == "-")
|
|
1285
|
+
res += " ";
|
|
1286
|
+
else if (input[i] == ";")
|
|
1287
|
+
res += "~";
|
|
1288
|
+
else if (input[i] == "~")
|
|
1289
|
+
res += ";";
|
|
1290
|
+
else
|
|
1291
|
+
res += input[i];
|
|
1292
|
+
}
|
|
1293
|
+
return res;
|
|
1294
|
+
}
|
|
1264
1295
|
async function embed2(props) {
|
|
1265
1296
|
var _a, _b;
|
|
1266
1297
|
await shell_default(props.shellModule);
|
|
@@ -1299,6 +1330,15 @@
|
|
|
1299
1330
|
await step("Attaching Shell", async () => {
|
|
1300
1331
|
configureDatabase(runtime.database);
|
|
1301
1332
|
});
|
|
1333
|
+
const hash = window.location.hash;
|
|
1334
|
+
const splits = hash.split(",");
|
|
1335
|
+
const sqls = [];
|
|
1336
|
+
for (let i = 1; i < splits.length; i++) {
|
|
1337
|
+
sqls.push(extraswaps(decodeURIComponent(splits[i])));
|
|
1338
|
+
}
|
|
1339
|
+
await step("Rewinding history!", async () => {
|
|
1340
|
+
passInitQueries(sqls);
|
|
1341
|
+
});
|
|
1302
1342
|
}
|
|
1303
1343
|
|
|
1304
1344
|
// src/platform.ts
|