Omar Rizwan
9992d13680
extension: factor out routeDirectoryForChildren and createWritableDirectory
...
sort routes by specificity (__matchVarCount)
makes evals & watches much simpler; is prep work for writable tab
directory stuff
2021-07-22 17:53:17 -07:00
Omar Rizwan
dfc73e55d3
test: fix JS test so window works
2021-04-22 18:32:40 -07:00
Omar Rizwan
b948c235b8
fs,extension: Make truncate work on cached file content.
...
We now remember the path of each cached file, so when someone
truncates that path, we can truncate all open instances of it in
cache. Important when someone pipes to stomp a file / opens with
O_TRUNC (which FUSE disaggregates into an open() and then a truncate()
call). Gets rid of the need for FUSE_CAP_ATOMIC_O_TRUNC, which never
worked on macOS anyway.
Fixes #40 .
2021-04-06 13:48:48 -07:00
Omar Rizwan
383096da00
extension,test: Move Router down, Router -> Routes.
2021-03-22 23:25:38 -07:00
Omar Rizwan
73f4672a8c
extension,test: router -> Router.
2021-03-21 20:29:30 -07:00
Omar Rizwan
b6f44d95f4
extension: Big refactor to use named variables in routes.
...
Also move debugger-specific stuff into the debugger block.
2021-03-21 19:42:44 -07:00
Omar Rizwan
be519afe5f
extension,test: Start on simplifying routing.
...
Introduces a 'named variable' syntax so we can remove all the manual
indexing into path components / converting to int in individual fs
ops.
Also rewrites the route finding to use regex: all routes are compiled
to regexes, then the route finder just walks through them all until it
hits a match.
Doesn't fully work yet; JS test passes.
2021-03-21 15:35:01 -07:00
Omar Rizwan
11cf48259a
test: separate tests from background.js, clean up and document a bit
...
also makes the test more lenient (subset instead of equality for tab
entries)
2021-03-14 21:33:23 -07:00
Omar Rizwan
b5113fb2d1
rename old TAB/evals to TAB/watches; add new TAB/evals
2021-02-25 15:41:47 -08:00
Omar Rizwan
c864d2859e
test: temporarily disable execute-script and console tests
2021-02-23 13:29:15 -08:00
Omar Rizwan
97573b0313
update test to use inputs instead of textareas
2021-02-21 19:30:56 -08:00
Omar Rizwan
82a1d6722d
test: add textarea tests
2021-01-13 00:26:48 -08:00
Omar Rizwan
8b0e106ebd
test: add test for #40
2021-01-12 00:15:25 -08:00
Omar Rizwan
957ea5a3d4
console and execute-script work. with test
2020-12-30 22:44:25 -08:00
Omar Rizwan
1185e6885c
ability to read scripts/file with path filtering
2020-12-29 14:16:25 -08:00
Omar Rizwan
6c56c525f2
test test-script.js name
2020-12-29 05:02:28 -08:00
Omar Rizwan
8315efcb60
improve scripts dir -- checking scriptId more reliably. add tests
2020-12-29 04:27:12 -08:00
Omar Rizwan
705b245be5
prevent explosion of scriptsForTab!
2020-12-29 03:52:17 -08:00
Omar Rizwan
44c8dfcec6
test: test test-page.html
2020-12-29 03:03:38 -08:00
Omar Rizwan
5f15ab1c37
improve test reliability; try clear scriptsForTab (doesn't work yet)
2020-12-29 02:35:03 -08:00