diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 05:16:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 05:16:48 +0000 |
commit | 3640b21e686fef7e3f25dc775112c7d4be43f197 (patch) | |
tree | e7fec2ad45891adeada1227d655062cbd201dd5a /ext/wasm/fiddle/fiddle-worker.js | |
parent | Releasing progress-linux version 3.45.3-1~progress7.99u1. (diff) | |
download | sqlite3-3640b21e686fef7e3f25dc775112c7d4be43f197.tar.xz sqlite3-3640b21e686fef7e3f25dc775112c7d4be43f197.zip |
Merging upstream version 3.46.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ext/wasm/fiddle/fiddle-worker.js')
-rw-r--r-- | ext/wasm/fiddle/fiddle-worker.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/ext/wasm/fiddle/fiddle-worker.js b/ext/wasm/fiddle/fiddle-worker.js index 67f6100..27d915e 100644 --- a/ext/wasm/fiddle/fiddle-worker.js +++ b/ext/wasm/fiddle/fiddle-worker.js @@ -166,11 +166,10 @@ stdout("SQLite version", capi.sqlite3_libversion(), capi.sqlite3_sourceid().substr(0,19)); stdout('Welcome to the "fiddle" shell.'); - if(sqlite3.opfs){ + if(capi.sqlite3_vfs_find("opfs")){ stdout("\nOPFS is available. To open a persistent db, use:\n\n", " .open file:name?vfs=opfs\n\nbut note that some", "features (e.g. upload) do not yet work with OPFS."); - sqlite3.opfs.registerVfs(); } stdout('\nEnter ".help" for usage hints.'); this.exec([ // initialization commands... @@ -317,7 +316,7 @@ }; console.warn("Unknown fiddle-worker message type:",ev); }; - + /** emscripten module for use with build mode -sMODULARIZE. */ @@ -374,9 +373,7 @@ "for use in the dev console.", sqlite3); globalThis.sqlite3 = sqlite3; const dbVfs = sqlite3.wasm.xWrap('fiddle_db_vfs', "*", ['string']); - fiddleModule.fsUnlink = (fn)=>{ - return sqlite3.wasm.sqlite3_wasm_vfs_unlink(dbVfs(0), fn); - }; + fiddleModule.fsUnlink = (fn)=>fiddleModule.FS.unlink(fn); wMsg('fiddle-ready'); }).catch(e=>{ console.error("Fiddle worker init failed:",e); |