feat: file / directory watcher (WIP)#13
Draft
dckc wants to merge 7 commits into
Draft
Conversation
first version that runs, after chat with Google Gemini (nee Bard)
~/projects/playground/packages/file-watcher
16:13 connolly@bldbox$ endo make --UNCONFINED ./src/FileWatchingService.js
Object [Alleged: FileWatcherFactory] {}
~/projects/playground/packages/file-watcher
16:13 connolly@bldbox$ endo make --UNCONFINED ./src/FileWatchingService.js -n fwf
Object [Alleged: FileWatcherFactory] {}
~/projects/playground/packages/file-watcher
16:14 connolly@bldbox$ endo eval "E(fwf).make('/home/connolly/Downloads')" fwf
Object [Alleged: FileWatcher] {}
~/projects/playground/packages/file-watcher
16:14 connolly@bldbox$ endo eval "E(fwf).make('/home/connolly/Downloads')" fwf -n fw
Object [Alleged: FileWatcher] {}
~/projects/playground/packages/file-watcher
16:14 connolly@bldbox$ endo eval "E(fw).watch()" fw
CapTP cli exception: (RemoteError(error:captp:Endo#20001)#1)
RemoteError(error:captp:Endo#20001)#1: cannot serialize Remotables with non-methods like "constructor" in (an object)
at decodeErrorCommon (packages/marshal/src/marshal.js:306:24)
at decodeErrorFromCapData (packages/marshal/src/marshal.js:334:14)
at decodeFromCapData (packages/marshal/src/encodeToCapData.js:384:27)
at fromCapData (packages/marshal/src/marshal.js:396:23)
at CTP_RETURN (packages/captp/src/captp.js:695:24)
at dispatch (packages/captp/src/captp.js:774:7)
at packages/daemon/src/connection.js:34:7
(RemoteError(error:captp:Endo#20001)#1)
Contributor
Author
|
demo so far: ~/projects/playground/packages/file-watcher
16:24 connolly@bldbox$ endo purge
Are you sure you want to erase all state? This irreversible action will permanently sever all peer connections. Continue? (y/n)
y
~/projects/playground/packages/file-watcher
16:24 connolly@bldbox$ endo make --UNCONFINED ./src/FileWatchingService.js -n fwf
Object [Alleged: FileWatcherFactory] {}
~/projects/playground/packages/file-watcher
16:24 connolly@bldbox$ endo eval "E(fwf).make('/home/connolly/Downloads')" fwf -n fw
Object [Alleged: FileWatcher] {}
~/projects/playground/packages/file-watcher
16:25 connolly@bldbox$ endo eval "E(fw).watch()" fw -n es
Object [Alleged: FileEvents] {}
~/projects/playground/packages/file-watcher
16:25 connolly@bldbox$ endo eval "E(es).next()" es
{ done: false, value: Object [Alleged: File] {} } |
Contributor
Author
|
moar 16:25 connolly@bldbox$ endo eval "E(es).next()" es
{ done: false, value: Object [Alleged: File] {} }
~/projects/playground/packages/file-watcher
16:25 connolly@bldbox$ endo eval "E(es).next()" es -n f2
{ done: false, value: Object [Alleged: File] {} }
16:29 connolly@bldbox$ endo eval "E(f2.value).getName()" f2
hi5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #12