@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.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "@duckdb/duckdb-wasm-shell",
|
|
4
|
-
version: "1.28.0",
|
|
4
|
+
version: "1.28.1-dev66.0",
|
|
5
5
|
description: "",
|
|
6
6
|
author: "Andre Kohn <kohn.a@outlook.com>",
|
|
7
7
|
license: "MIT",
|
|
@@ -25,22 +25,22 @@ var package_default = {
|
|
|
25
25
|
"csv"
|
|
26
26
|
],
|
|
27
27
|
dependencies: {
|
|
28
|
-
"@duckdb/duckdb-wasm": "^1.28.0",
|
|
29
|
-
xterm: "^5.
|
|
30
|
-
"xterm-addon-fit": "^0.
|
|
28
|
+
"@duckdb/duckdb-wasm": "^1.28.1-dev66.0",
|
|
29
|
+
xterm: "^5.3.0",
|
|
30
|
+
"xterm-addon-fit": "^0.8.0",
|
|
31
31
|
"xterm-addon-web-links": "^0.9.0",
|
|
32
32
|
"xterm-addon-webgl": "^0.16.0"
|
|
33
33
|
},
|
|
34
34
|
devDependencies: {
|
|
35
|
-
esbuild: "^0.19.
|
|
36
|
-
eslint: "^8.
|
|
35
|
+
esbuild: "^0.19.10",
|
|
36
|
+
eslint: "^8.54.0",
|
|
37
37
|
"eslint-plugin-jasmine": "^4.1.3",
|
|
38
38
|
"eslint-plugin-react": "^7.33.2",
|
|
39
39
|
jasmine: "^5.1.0",
|
|
40
40
|
"jasmine-core": "^5.1.1",
|
|
41
41
|
"jasmine-spec-reporter": "^7.0.0",
|
|
42
42
|
"make-dir": "^4.0.0",
|
|
43
|
-
prettier: "^3.
|
|
43
|
+
prettier: "^3.1.1",
|
|
44
44
|
rimraf: "^5.0.5",
|
|
45
45
|
"wasm-pack": "^0.12.1"
|
|
46
46
|
},
|
|
@@ -270,11 +270,18 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
270
270
|
return real;
|
|
271
271
|
}
|
|
272
272
|
function __wbg_adapter_22(arg0, arg1, arg2) {
|
|
273
|
-
const ret = wasm.
|
|
273
|
+
const ret = wasm.wasm_bindgen__convert__closures__invoke1_mut__h55677a793e848de5(arg0, arg1, addHeapObject(arg2));
|
|
274
274
|
return ret !== 0;
|
|
275
275
|
}
|
|
276
276
|
function __wbg_adapter_25(arg0, arg1, arg2) {
|
|
277
|
-
wasm.
|
|
277
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7a732a7084fdd670(arg0, arg1, addHeapObject(arg2));
|
|
278
|
+
}
|
|
279
|
+
function handleError(f, args) {
|
|
280
|
+
try {
|
|
281
|
+
return f.apply(this, args);
|
|
282
|
+
} catch (e) {
|
|
283
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
284
|
+
}
|
|
278
285
|
}
|
|
279
286
|
var cachedUint32Memory0 = null;
|
|
280
287
|
function getUint32Memory0() {
|
|
@@ -335,19 +342,16 @@ function loadHistory(history, cursor) {
|
|
|
335
342
|
heap[stack_pointer++] = void 0;
|
|
336
343
|
}
|
|
337
344
|
}
|
|
345
|
+
function passInitQueries(queries) {
|
|
346
|
+
const ret = wasm.passInitQueries(addHeapObject(queries));
|
|
347
|
+
return takeObject(ret);
|
|
348
|
+
}
|
|
338
349
|
function configureDatabase(db) {
|
|
339
350
|
const ret = wasm.configureDatabase(addHeapObject(db));
|
|
340
351
|
return takeObject(ret);
|
|
341
352
|
}
|
|
342
|
-
function
|
|
343
|
-
|
|
344
|
-
return f.apply(this, args);
|
|
345
|
-
} catch (e) {
|
|
346
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
function __wbg_adapter_213(arg0, arg1, arg2, arg3) {
|
|
350
|
-
wasm.wasm_bindgen__convert__closures__invoke2_mut__hb4a89eef713a072f(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
353
|
+
function __wbg_adapter_214(arg0, arg1, arg2, arg3) {
|
|
354
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__hc227b212df1c3e22(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
351
355
|
}
|
|
352
356
|
var ShellInputContext = Object.freeze({ FileInput: 0, "0": "FileInput" });
|
|
353
357
|
var WcWidth = Object.freeze({ Width0: 0, "0": "Width0", Width1: 1, "1": "Width1", Width2: 2, "2": "Width2" });
|
|
@@ -483,18 +487,18 @@ function __wbg_get_imports() {
|
|
|
483
487
|
return addHeapObject(ret);
|
|
484
488
|
}, arguments);
|
|
485
489
|
};
|
|
486
|
-
imports.wbg.__wbg_dropFiles_a67bda4902ba5f36 = function() {
|
|
487
|
-
return handleError(function(arg0) {
|
|
488
|
-
const ret = getObject(arg0).dropFiles();
|
|
489
|
-
return addHeapObject(ret);
|
|
490
|
-
}, arguments);
|
|
491
|
-
};
|
|
492
490
|
imports.wbg.__wbg_dropFile_377dfecd7aafe02e = function() {
|
|
493
491
|
return handleError(function(arg0, arg1, arg2) {
|
|
494
492
|
const ret = getObject(arg0).dropFile(getStringFromWasm0(arg1, arg2));
|
|
495
493
|
return addHeapObject(ret);
|
|
496
494
|
}, arguments);
|
|
497
495
|
};
|
|
496
|
+
imports.wbg.__wbg_dropFiles_a67bda4902ba5f36 = function() {
|
|
497
|
+
return handleError(function(arg0) {
|
|
498
|
+
const ret = getObject(arg0).dropFiles();
|
|
499
|
+
return addHeapObject(ret);
|
|
500
|
+
}, arguments);
|
|
501
|
+
};
|
|
498
502
|
imports.wbg.__wbg_downloadFile_4cc8985e2c240fec = function() {
|
|
499
503
|
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
500
504
|
const ret = getObject(arg0).downloadFile(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
@@ -607,14 +611,18 @@ function __wbg_get_imports() {
|
|
|
607
611
|
imports.wbg.__wbg_fit_cdd1076e3e5970b7 = function(arg0) {
|
|
608
612
|
getObject(arg0).fit();
|
|
609
613
|
};
|
|
610
|
-
imports.wbg.
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
imports.wbg.__wbg_error_a84695ce32854879 = function(arg0, arg1) {
|
|
614
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
614
|
+
imports.wbg.__wbg_new_79cc836771d68198 = function() {
|
|
615
|
+
const ret = new FitAddon();
|
|
616
|
+
return addHeapObject(ret);
|
|
615
617
|
};
|
|
616
|
-
imports.wbg.
|
|
617
|
-
|
|
618
|
+
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
619
|
+
const obj = takeObject(arg0).original;
|
|
620
|
+
if (obj.cnt-- == 1) {
|
|
621
|
+
obj.a = 0;
|
|
622
|
+
return true;
|
|
623
|
+
}
|
|
624
|
+
const ret = false;
|
|
625
|
+
return ret;
|
|
618
626
|
};
|
|
619
627
|
imports.wbg.__wbg_backgroundColor_17a9784f0207d5b0 = function(arg0, arg1) {
|
|
620
628
|
const ret = getObject(arg1).backgroundColor;
|
|
@@ -630,149 +638,145 @@ function __wbg_get_imports() {
|
|
|
630
638
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
631
639
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
632
640
|
};
|
|
633
|
-
imports.wbg.
|
|
634
|
-
const ret =
|
|
635
|
-
return addHeapObject(ret);
|
|
636
|
-
};
|
|
637
|
-
imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
638
|
-
const obj = getObject(arg1);
|
|
639
|
-
const ret = JSON.stringify(obj === void 0 ? null : obj);
|
|
641
|
+
imports.wbg.__wbg_static_accessor_PACKAGE_NAME_0af717684e189e55 = function(arg0) {
|
|
642
|
+
const ret = PACKAGE_NAME2;
|
|
640
643
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
641
644
|
const len1 = WASM_VECTOR_LEN;
|
|
642
645
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
643
646
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
644
647
|
};
|
|
645
|
-
imports.wbg.
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
648
|
+
imports.wbg.__wbg_static_accessor_PACKAGE_VERSION_549ba11794cf5003 = function(arg0) {
|
|
649
|
+
const ret = PACKAGE_VERSION2;
|
|
650
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
651
|
+
const len1 = WASM_VECTOR_LEN;
|
|
652
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
653
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
650
654
|
};
|
|
651
|
-
imports.wbg.
|
|
652
|
-
|
|
655
|
+
imports.wbg.__wbg_disconnect_d9855433758f0afc = function() {
|
|
656
|
+
return handleError(function(arg0, arg1) {
|
|
657
|
+
const ret = getObject(arg0).disconnect(arg1 >>> 0);
|
|
658
|
+
return addHeapObject(ret);
|
|
659
|
+
}, arguments);
|
|
653
660
|
};
|
|
654
|
-
imports.wbg.
|
|
655
|
-
|
|
661
|
+
imports.wbg.__wbg_log_8bb2c010ce15af48 = function(arg0, arg1) {
|
|
662
|
+
console.log(getStringFromWasm0(arg0, arg1));
|
|
656
663
|
};
|
|
657
|
-
imports.wbg.
|
|
658
|
-
|
|
664
|
+
imports.wbg.__wbg_error_a84695ce32854879 = function(arg0, arg1) {
|
|
665
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
659
666
|
};
|
|
660
|
-
imports.wbg.
|
|
661
|
-
|
|
667
|
+
imports.wbg.__wbg_warn_d85b304f0e70f5ac = function(arg0, arg1) {
|
|
668
|
+
console.warn(getStringFromWasm0(arg0, arg1));
|
|
662
669
|
};
|
|
663
|
-
imports.wbg.
|
|
664
|
-
getObject(arg0).
|
|
670
|
+
imports.wbg.__wbg_blockStats_14f17a14c4573f3d = function(arg0) {
|
|
671
|
+
const ret = getObject(arg0).blockStats;
|
|
672
|
+
return addHeapObject(ret);
|
|
665
673
|
};
|
|
666
|
-
imports.wbg.
|
|
667
|
-
getObject(arg0).
|
|
674
|
+
imports.wbg.__wbg_totalFileWrites_1b38029d29f47d43 = function(arg0) {
|
|
675
|
+
const ret = getObject(arg0).totalFileWrites;
|
|
676
|
+
return addHeapObject(ret);
|
|
668
677
|
};
|
|
669
|
-
imports.wbg.
|
|
670
|
-
getObject(arg0).
|
|
678
|
+
imports.wbg.__wbg_totalFileReadsAhead_02c25545b2f63323 = function(arg0) {
|
|
679
|
+
const ret = getObject(arg0).totalFileReadsAhead;
|
|
680
|
+
return addHeapObject(ret);
|
|
671
681
|
};
|
|
672
|
-
imports.wbg.
|
|
673
|
-
getObject(arg0).
|
|
682
|
+
imports.wbg.__wbg_totalFileReadsCold_304476ed0c49e111 = function(arg0) {
|
|
683
|
+
const ret = getObject(arg0).totalFileReadsCold;
|
|
684
|
+
return addHeapObject(ret);
|
|
674
685
|
};
|
|
675
|
-
imports.wbg.
|
|
676
|
-
getObject(arg0).
|
|
686
|
+
imports.wbg.__wbg_totalFileReadsCached_2e8edfe7dbf14351 = function(arg0) {
|
|
687
|
+
const ret = getObject(arg0).totalFileReadsCached;
|
|
688
|
+
return addHeapObject(ret);
|
|
677
689
|
};
|
|
678
|
-
imports.wbg.
|
|
679
|
-
|
|
690
|
+
imports.wbg.__wbg_totalPageAccesses_2f654448ea273878 = function(arg0) {
|
|
691
|
+
const ret = getObject(arg0).totalPageAccesses;
|
|
692
|
+
return addHeapObject(ret);
|
|
680
693
|
};
|
|
681
|
-
imports.wbg.
|
|
682
|
-
getObject(arg0).
|
|
694
|
+
imports.wbg.__wbg_totalPageLoads_1ce10deb8828d935 = function(arg0) {
|
|
695
|
+
const ret = getObject(arg0).totalPageLoads;
|
|
696
|
+
return addHeapObject(ret);
|
|
683
697
|
};
|
|
684
|
-
imports.wbg.
|
|
685
|
-
const ret =
|
|
698
|
+
imports.wbg.__wbg_blockSize_77bc4e968a2e845a = function(arg0) {
|
|
699
|
+
const ret = getObject(arg0).blockSize;
|
|
686
700
|
return addHeapObject(ret);
|
|
687
701
|
};
|
|
688
|
-
imports.wbg.
|
|
702
|
+
imports.wbg.__wbg_instanceof_WebLinksAddon_fbcf4efb54881c53 = function(arg0) {
|
|
689
703
|
let result;
|
|
690
704
|
try {
|
|
691
|
-
result = getObject(arg0) instanceof
|
|
705
|
+
result = getObject(arg0) instanceof WebLinksAddon;
|
|
692
706
|
} catch (e) {
|
|
693
707
|
result = false;
|
|
694
708
|
}
|
|
695
709
|
const ret = result;
|
|
696
710
|
return ret;
|
|
697
711
|
};
|
|
698
|
-
imports.wbg.
|
|
699
|
-
getObject(arg0).loadAddon(takeObject(arg1));
|
|
700
|
-
};
|
|
701
|
-
imports.wbg.__wbg_new_92aa50f448dac851 = function(arg0, arg1, arg2) {
|
|
702
|
-
const ret = new WebLinksAddon(getObject(arg0), getObject(arg1), arg2 === 16777215 ? void 0 : arg2 !== 0);
|
|
703
|
-
return addHeapObject(ret);
|
|
704
|
-
};
|
|
705
|
-
imports.wbg.__wbg_instanceof_WebLinksAddon_fbcf4efb54881c53 = function(arg0) {
|
|
712
|
+
imports.wbg.__wbg_instanceof_WebglAddon_c39f68697a31af73 = function(arg0) {
|
|
706
713
|
let result;
|
|
707
714
|
try {
|
|
708
|
-
result = getObject(arg0) instanceof
|
|
715
|
+
result = getObject(arg0) instanceof WebglAddon;
|
|
709
716
|
} catch (e) {
|
|
710
717
|
result = false;
|
|
711
718
|
}
|
|
712
719
|
const ret = result;
|
|
713
720
|
return ret;
|
|
714
721
|
};
|
|
715
|
-
imports.wbg.
|
|
716
|
-
|
|
717
|
-
return addHeapObject(ret);
|
|
722
|
+
imports.wbg.__wbg_setallowProposedApi_0147ac2b5a9906b3 = function(arg0, arg1) {
|
|
723
|
+
getObject(arg0).allowProposedApi = arg1 !== 0;
|
|
718
724
|
};
|
|
719
|
-
imports.wbg.
|
|
720
|
-
|
|
721
|
-
return addHeapObject(ret);
|
|
725
|
+
imports.wbg.__wbg_setcursorBlink_8a3f7244eb29b1f6 = function(arg0, arg1) {
|
|
726
|
+
getObject(arg0).cursorBlink = arg1 !== 0;
|
|
722
727
|
};
|
|
723
|
-
imports.wbg.
|
|
724
|
-
|
|
725
|
-
return addHeapObject(ret);
|
|
728
|
+
imports.wbg.__wbg_setcursorWidth_55abde268dea1312 = function(arg0, arg1) {
|
|
729
|
+
getObject(arg0).cursorWidth = arg1 >>> 0;
|
|
726
730
|
};
|
|
727
|
-
imports.wbg.
|
|
728
|
-
|
|
729
|
-
return addHeapObject(ret);
|
|
731
|
+
imports.wbg.__wbg_setdrawBoldTextInBrightColors_4f711243dff6df11 = function(arg0, arg1) {
|
|
732
|
+
getObject(arg0).drawBoldTextInBrightColors = arg1 !== 0;
|
|
730
733
|
};
|
|
731
|
-
imports.wbg.
|
|
732
|
-
|
|
733
|
-
return addHeapObject(ret);
|
|
734
|
+
imports.wbg.__wbg_setfontSize_11962e753390bde1 = function(arg0, arg1) {
|
|
735
|
+
getObject(arg0).fontSize = arg1 >>> 0;
|
|
734
736
|
};
|
|
735
|
-
imports.wbg.
|
|
736
|
-
|
|
737
|
-
return addHeapObject(ret);
|
|
737
|
+
imports.wbg.__wbg_setfontFamily_a0645fa4f7aaaf21 = function(arg0, arg1, arg2) {
|
|
738
|
+
getObject(arg0).fontFamily = getStringFromWasm0(arg1, arg2);
|
|
738
739
|
};
|
|
739
|
-
imports.wbg.
|
|
740
|
-
|
|
741
|
-
return addHeapObject(ret);
|
|
740
|
+
imports.wbg.__wbg_setrightClickSelectsWord_ede48f0595cd3fed = function(arg0, arg1) {
|
|
741
|
+
getObject(arg0).rightClickSelectsWord = arg1 !== 0;
|
|
742
742
|
};
|
|
743
|
-
imports.wbg.
|
|
744
|
-
|
|
743
|
+
imports.wbg.__wbg_setrows_6b947e6079c486dc = function(arg0, arg1) {
|
|
744
|
+
getObject(arg0).rows = arg1 >>> 0;
|
|
745
|
+
};
|
|
746
|
+
imports.wbg.__wbg_settheme_4e67878b7d6cc0fc = function(arg0, arg1) {
|
|
747
|
+
getObject(arg0).theme = getObject(arg1);
|
|
748
|
+
};
|
|
749
|
+
imports.wbg.__wbg_setforeground_87dc40b78955df05 = function(arg0, arg1, arg2) {
|
|
750
|
+
getObject(arg0).foreground = getStringFromWasm0(arg1, arg2);
|
|
751
|
+
};
|
|
752
|
+
imports.wbg.__wbg_setbackground_550386b829ec5c24 = function(arg0, arg1, arg2) {
|
|
753
|
+
getObject(arg0).background = getStringFromWasm0(arg1, arg2);
|
|
754
|
+
};
|
|
755
|
+
imports.wbg.__wbg_setbrightYellow_deb3fbc58aa44642 = function(arg0, arg1, arg2) {
|
|
756
|
+
getObject(arg0).brightYellow = getStringFromWasm0(arg1, arg2);
|
|
757
|
+
};
|
|
758
|
+
imports.wbg.__wbg_open_7d3a0690ea9e5a45 = function(arg0, arg1) {
|
|
759
|
+
getObject(arg0).open(takeObject(arg1));
|
|
760
|
+
};
|
|
761
|
+
imports.wbg.__wbg_loadAddon_1bfe744e6f456990 = function(arg0, arg1) {
|
|
762
|
+
getObject(arg0).loadAddon(takeObject(arg1));
|
|
763
|
+
};
|
|
764
|
+
imports.wbg.__wbg_new_92aa50f448dac851 = function(arg0, arg1, arg2) {
|
|
765
|
+
const ret = new WebLinksAddon(getObject(arg0), getObject(arg1), arg2 === 16777215 ? void 0 : arg2 !== 0);
|
|
745
766
|
return addHeapObject(ret);
|
|
746
767
|
};
|
|
747
|
-
imports.wbg.
|
|
748
|
-
const ret =
|
|
749
|
-
|
|
750
|
-
const len1 = WASM_VECTOR_LEN;
|
|
751
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
752
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
768
|
+
imports.wbg.__wbg_new_70821bf9dbd17152 = function(arg0) {
|
|
769
|
+
const ret = new WebglAddon(arg0 === 16777215 ? void 0 : arg0 !== 0);
|
|
770
|
+
return addHeapObject(ret);
|
|
753
771
|
};
|
|
754
|
-
imports.wbg.
|
|
755
|
-
const
|
|
772
|
+
imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
773
|
+
const obj = getObject(arg1);
|
|
774
|
+
const ret = JSON.stringify(obj === void 0 ? null : obj);
|
|
756
775
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
757
776
|
const len1 = WASM_VECTOR_LEN;
|
|
758
777
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
759
778
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
760
779
|
};
|
|
761
|
-
imports.wbg.__wbg_disconnect_d9855433758f0afc = function() {
|
|
762
|
-
return handleError(function(arg0, arg1) {
|
|
763
|
-
const ret = getObject(arg0).disconnect(arg1 >>> 0);
|
|
764
|
-
return addHeapObject(ret);
|
|
765
|
-
}, arguments);
|
|
766
|
-
};
|
|
767
|
-
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
768
|
-
const obj = takeObject(arg0).original;
|
|
769
|
-
if (obj.cnt-- == 1) {
|
|
770
|
-
obj.a = 0;
|
|
771
|
-
return true;
|
|
772
|
-
}
|
|
773
|
-
const ret = false;
|
|
774
|
-
return ret;
|
|
775
|
-
};
|
|
776
780
|
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
777
781
|
const ret = new Error();
|
|
778
782
|
return addHeapObject(ret);
|
|
@@ -918,7 +922,7 @@ function __wbg_get_imports() {
|
|
|
918
922
|
const a = state0.a;
|
|
919
923
|
state0.a = 0;
|
|
920
924
|
try {
|
|
921
|
-
return
|
|
925
|
+
return __wbg_adapter_214(a, state0.b, arg02, arg12);
|
|
922
926
|
} finally {
|
|
923
927
|
state0.a = a;
|
|
924
928
|
}
|
|
@@ -970,12 +974,12 @@ function __wbg_get_imports() {
|
|
|
970
974
|
const ret = wasm.memory;
|
|
971
975
|
return addHeapObject(ret);
|
|
972
976
|
};
|
|
973
|
-
imports.wbg.
|
|
974
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
977
|
+
imports.wbg.__wbindgen_closure_wrapper351 = function(arg0, arg1, arg2) {
|
|
978
|
+
const ret = makeMutClosure(arg0, arg1, 84, __wbg_adapter_22);
|
|
975
979
|
return addHeapObject(ret);
|
|
976
980
|
};
|
|
977
|
-
imports.wbg.
|
|
978
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
981
|
+
imports.wbg.__wbindgen_closure_wrapper964 = function(arg0, arg1, arg2) {
|
|
982
|
+
const ret = makeMutClosure(arg0, arg1, 152, __wbg_adapter_25);
|
|
979
983
|
return addHeapObject(ret);
|
|
980
984
|
};
|
|
981
985
|
return imports;
|
|
@@ -1197,6 +1201,7 @@ var ShellRuntime = class {
|
|
|
1197
1201
|
const rect = container.getBoundingClientRect();
|
|
1198
1202
|
resize(rect.width, rect.height);
|
|
1199
1203
|
};
|
|
1204
|
+
this.hash = "";
|
|
1200
1205
|
}
|
|
1201
1206
|
async pickFiles() {
|
|
1202
1207
|
if (this.database == null) {
|
|
@@ -1219,6 +1224,16 @@ var ShellRuntime = class {
|
|
|
1219
1224
|
return await navigator.clipboard.writeText(value);
|
|
1220
1225
|
}
|
|
1221
1226
|
async pushInputToHistory(value) {
|
|
1227
|
+
const encode = encodeURIComponent(extraswaps(value));
|
|
1228
|
+
if (this.hash === "")
|
|
1229
|
+
this.hash = "queries=v0";
|
|
1230
|
+
this.hash += ",";
|
|
1231
|
+
this.hash += encode;
|
|
1232
|
+
if (window.location.hash.startsWith("#savequeries"))
|
|
1233
|
+
window.location.hash = "savequeries&" + this.hash;
|
|
1234
|
+
const a = document.getElementById("hashencoded");
|
|
1235
|
+
if (a && a instanceof HTMLAnchorElement)
|
|
1236
|
+
a.href = "/#" + this.hash;
|
|
1222
1237
|
this.history.push(value);
|
|
1223
1238
|
}
|
|
1224
1239
|
};
|
|
@@ -1228,6 +1243,22 @@ function formatBytes(value) {
|
|
|
1228
1243
|
const size = Number((value / Math.pow(multiple, exp)).toFixed(2));
|
|
1229
1244
|
return "".concat(size, " ").concat(exp ? "".concat(k, "MGTPEZY")[exp - 1] + suffix : "byte".concat(size !== 1 ? "s" : ""));
|
|
1230
1245
|
}
|
|
1246
|
+
function extraswaps(input) {
|
|
1247
|
+
let res = "";
|
|
1248
|
+
for (let i = 0; i < input.length; i++) {
|
|
1249
|
+
if (input[i] == " ")
|
|
1250
|
+
res += "-";
|
|
1251
|
+
else if (input[i] == "-")
|
|
1252
|
+
res += " ";
|
|
1253
|
+
else if (input[i] == ";")
|
|
1254
|
+
res += "~";
|
|
1255
|
+
else if (input[i] == "~")
|
|
1256
|
+
res += ";";
|
|
1257
|
+
else
|
|
1258
|
+
res += input[i];
|
|
1259
|
+
}
|
|
1260
|
+
return res;
|
|
1261
|
+
}
|
|
1231
1262
|
async function embed2(props) {
|
|
1232
1263
|
var _a, _b;
|
|
1233
1264
|
await shell_default(props.shellModule);
|
|
@@ -1266,6 +1297,15 @@ async function embed2(props) {
|
|
|
1266
1297
|
await step("Attaching Shell", async () => {
|
|
1267
1298
|
configureDatabase(runtime.database);
|
|
1268
1299
|
});
|
|
1300
|
+
const hash = window.location.hash;
|
|
1301
|
+
const splits = hash.split(",");
|
|
1302
|
+
const sqls = [];
|
|
1303
|
+
for (let i = 1; i < splits.length; i++) {
|
|
1304
|
+
sqls.push(extraswaps(decodeURIComponent(splits[i])));
|
|
1305
|
+
}
|
|
1306
|
+
await step("Rewinding history!", async () => {
|
|
1307
|
+
passInitQueries(sqls);
|
|
1308
|
+
});
|
|
1269
1309
|
}
|
|
1270
1310
|
|
|
1271
1311
|
// src/platform.ts
|