-
Notifications
You must be signed in to change notification settings - Fork 31
Feature/json-watcher #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cmontella
wants to merge
124
commits into
master
Choose a base branch
from
feature/json-watcher
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 105 commits
Commits
Show all changes
124 commits
Select commit
Hold shift + click to select a range
9908dee
Add more options to server
cmontella d561cd4
Get rid of old watcher file
cmontella 0a0ae0a
Watchers self-report their name
cmontella 28436ad
make watchers self-report their name
cmontella 97fa1de
new options for main exe
cmontella b2b8749
Print a message when a watcher is attached
cmontella 5f7e587
Merge remote-tracking branch 'refs/remotes/origin/master' into featur…
cmontella f65b0cd
add ability to set name on watcher
cmontella ac9e3a5
add watcher skeleton
cmontella 587c9b9
Merge remote-tracking branch 'refs/remotes/origin/master' into featur…
cmontella 1f61855
Fix loading watcher in main
cmontella 9a4690a
rename print diff to match TS version
cmontella d90b930
fix spelling, remove println
cmontella bbb140f
Merge remote-tracking branch 'refs/remotes/origin/master' into featur…
cmontella c646ba2
Merge remote-tracking branch 'refs/remotes/origin/master' into featur…
cmontella acf015c
Merge remote-tracking branch 'refs/remotes/origin/feature/more-server…
cmontella 8081023
Json deserialize
cmontella d2cbada
update json decoding
cmontella c9fa39a
Merge remote-tracking branch 'refs/remotes/origin/master' into featur…
cmontella 2f14f6f
Serialize records
cmontella f628b67
Merge remote-tracking branch 'refs/remotes/origin/master' into featur…
cmontella 6b959ae
Try nested records again
cmontella dd094c3
commit tests
cmontella 55505d2
Merge remote-tracking branch 'refs/remotes/origin/master' into featur…
cmontella 274f4de
add hyper dep
cmontella ff41684
test http send
cmontella 6a4c845
add http watcher
cmontella 102ed36
Merge remote-tracking branch 'refs/remotes/origin/master' into featur…
cmontella da3e34b
Merge remote-tracking branch 'refs/remotes/origin/master' into featur…
cmontella 63e4cd9
fix watcher import
cmontella bb5a021
inject response into eve
cmontella 15d155b
test HTTP request
cmontella a8858b7
Merge remote-tracking branch 'refs/remotes/origin/master' into featur…
cmontella da76889
Merge remote-tracking branch 'refs/remotes/origin/master' into featur…
cmontella 4752d2e
Merge remote-tracking branch 'refs/remotes/origin/master' into featur…
cmontella d85ab5b
Fix up deser
cmontella 371bd8f
json encoding
cmontella 548e44a
tests
cmontella 45874e5
Merge remote-tracking branch 'refs/remotes/origin/master' into featur…
cmontella bf70661
Merge remote-tracking branch 'refs/remotes/origin/master' into featur…
cmontella 14432b9
test if we are in the process of decoding
cmontella 3db35b5
Merge remote-tracking branch 'refs/remotes/origin/feature/json-watche…
cmontella 523a0e8
add http to main
cmontella 0f21740
add from_str method for internables
cmontella 20d08bd
rename some things in JSON watcher
cmontella a568b6b
update http requests
cmontella 39a448c
update example
cmontella 0e246e7
stub in http server
cmontella c0c921f
Stub in http error
cmontella aefe11b
Add https support
cmontella fffa212
Decode into a string, implement https on sender
cmontella 2d63257
do some cleanup
cmontella 4691364
remove println
cmontella 9ea340f
update test
cmontella 87a629d
Start an http server in Eve
cmontella 20db817
Merge branch 'master' into feature/http
cmontella c0a7af8
Merge branch 'master' into feature/http
cmontella 62d3d37
add redirect
cmontella ed9a760
Add url-change event
cmontella 4dd0834
Add page-show event
cmontella 9040857
decode URL queries
cmontella a414907
handle multiple reuquests at once
cmontella bcb6191
Plumb in errors
cmontella 4d668c7
Merge branch 'master' into feature/http
cmontella 5f3a423
clean up some things
cmontella b209b4c
Add string/url-encode and string/encode
cmontella 8db57fa
Property intern ints
cmontella d219c37
default body
cmontella acd6d55
add tag to url query
cmontella b8c7809
ignore vscode file
cmontella 0639979
Parse kvs in hash string
cmontella 089d7d0
parse bools in json
cmontella 7a64f61
implement a stream watcher
cmontella 20e9202
handle multiple chunks
cmontella 48b80ee
more edits to setlist app
cmontella e0639d3
update json from http watcher
cmontella 73e391f
Merge branch 'master' into feature/json-watcher
cmontella dc532a5
don't include json file
cmontella b62233b
Merge branch 'master' into feature/http
cmontella dff2b5f
Merge branch 'master' into feature/http
cmontella aca663e
fix merge conflicts
cmontella b887143
properly sort chunks
cmontella 74ffb12
Lay groundwork for putting HTTP requests into Eve
cmontella 416fb33
put body in response, mark requests as finished
cmontella b3e3ae3
save progress on setlist app
cmontella d75235e
updates to setlist app
cmontella 3ff52d5
updates to groove and setlist
cmontella 43f0579
save state for update
cmontella 61ac1b7
Merge branch 'master' into feature/json-watcher
cmontella b051e0a
Fix some json bugs
cmontella c288c27
Do encoding in Eve
cmontella bdf44a2
undo accidental commit
cmontella 38a15c4
Merge branch 'master' into feature/json-watcher
cmontella d85779a
update markdown in json
cmontella 692a058
remove println
cmontella c26bca7
fix warnings
cmontella 529e3ae
remove test file
cmontella 3538e0f
Merge branch 'feature/http' into feature/json-watcher
cmontella f3271bb
Merge pull request #43 from Kodowa/feature/json-watcher
cmontella 3b9a660
done define json twice
cmontella 2ddb1d9
done use json twice
cmontella 54fe789
fix error in package
cmontella 026e54b
Update http intro
cmontella 33d5b55
fix escape chars
cmontella c567f05
add test for base strings and escapes
cmontella 06db611
Merge branch 'master' into fix/escape-chars
cmontella 3753420
escape \
cmontella 20bb24c
Merge branch 'fix/escape-chars' into feature/json-watcher
cmontella b66c058
fix some merge errors, use " instead of '
cmontella ab69895
remove test
cmontella 5fa8057
Merge branch 'master' into feature/http
cmontella dcec730
Merge branch 'feature/http' into feature/json-watcher
cmontella 605ba9c
delete accidental file
cmontella 2752fc5
fix includes
cmontella 04df1c2
remove setlist app from this branch
cmontella de547ae
remove unnecessary pipes
cmontella 608cc7e
don't parse query strings and hash strings automatically
cmontella 22a6ba8
cut hls from this PR
cmontella 0e14036
remove response when we've got a handle on it
cmontella 7853169
add a response/change event
cmontella f7668c2
fix typo
cmontella fbadded
pass through numbers
cmontella b255048
try to update this diff
cmontella e35fa07
parse query strings automatically
cmontella File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,3 +7,4 @@ node_modules/ | |
| build/ | ||
| dist/ | ||
| .vscode/tasks.json | ||
| examples/test.eve | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,161 @@ | ||
| # JSON Testing | ||
|
|
||
| ## Test Encoding | ||
|
|
||
| commit | ||
| corey = [#person name: "Corey" | age: 31] | ||
| giselle = [#cat name: "Giselle" | age: 7] | ||
| twylah = [#cat name: "Twylah" | age: 7] | ||
| rachel = [#person name: "Rachel" | age: 28 cats: (giselle, twylah) husband: corey] | ||
| end | ||
|
|
||
| commit | ||
| [#system/timer resolution: 1000] | ||
| end | ||
|
|
||
| search | ||
| p = [#person name: "Rachel" age] | ||
| [#system/timer second] | ||
| bind | ||
| p.time += second | ||
| end | ||
|
|
||
| search | ||
| p = [#person name: "Rachel"] | ||
| bind | ||
| [#json/encode record: p] | ||
| end | ||
|
|
||
| commit | ||
| [#ui/button #change-record sort: -1 text: "Change"] | ||
| [#ui/button #add-record sort: -1 text: "Add"] | ||
| end | ||
|
|
||
| search | ||
| [#html/event/click element: [#change-record]] | ||
| p = [#person name: "Rachel"] | ||
| commit | ||
| p.age := 29 | ||
| end | ||
|
|
||
| search | ||
| [#html/event/click element: [#add-record]] | ||
| p = [#person name: "Rachel"] | ||
| commit | ||
| p.foo := "Hello" | ||
| end | ||
|
|
||
|
|
||
|
|
||
| search | ||
| [#json/encode json-string] | ||
| bind | ||
| [#html/div text: "Encoded JSON: {{json-string}}"] | ||
| end | ||
|
|
||
| ## Test Decode | ||
|
|
||
| Decode the record we just encoded | ||
|
|
||
| //search | ||
| //[#json/encode json-string] | ||
| //commit | ||
| //[#json/decode json: json-string] | ||
| //end | ||
|
|
||
| //search | ||
| //[#json/decode json-object] | ||
| //commit | ||
| //[#html/div text: "Decoded JSON: {{json-object.name}} is {{json-object.age}} years old"] | ||
| //end | ||
|
|
||
|
|
||
| //commit | ||
| //[#ui/button #add-record text: "Add to record"] | ||
| //[#ui/button #remove-record text: "Remove From Record"] | ||
| //end | ||
|
|
||
|
|
||
|
|
||
| ## Debug Display | ||
|
|
||
| search | ||
| [#json/encode] | ||
| [#json/encode/record record json-string] | ||
| output = [#output] | ||
| bind | ||
| output.children += [#html/div sort: json-string text: "Target: {{json-string}}"] | ||
| end | ||
|
|
||
| search | ||
| [#json/encode] | ||
| [#json/encode/sub-target record json-string] | ||
| output = [#output] | ||
| bind | ||
| output.children += [#html/div text: "Sub: {{json-string}}"] | ||
| end | ||
|
|
||
| search | ||
| [#json/encode] | ||
| [#completed/target record json-string] | ||
| output = [#application] | ||
| bind | ||
| output.children += [#html/div text: "Completed {{json-string}}"] | ||
| end | ||
|
|
||
| search | ||
| [#json/encode] | ||
| encode = [#encode-eavs] | ||
| eav = [#json/encode/eav record attribute value] | ||
| entity? = if eav = [#json/encode/entity] then "entity" | ||
| else "" | ||
| bind | ||
| encode <- [| children: | ||
| [#html/div sort: 0 text: "Encode EAVs"] | ||
| [#html/table #eav-table | children: | ||
| [#html/tr #eav-row eav children: | ||
| [#html/td sort:1 text: record] | ||
| [#html/td sort:2 text: attribute] | ||
| [#html/td sort:3 text: value] | ||
| [#html/td sort:4 text: entity?] | ||
| ] | ||
| ] | ||
|
|
||
| ] | ||
| end | ||
|
|
||
| search | ||
| [#json/encode] | ||
| encode = [#flatten] | ||
| [#json/encode/flatten record] | ||
| bind | ||
| encode <- [| children: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. drop the pipe |
||
| [#html/div sort: 0 text: "Flatten"] | ||
| [#html/div sort: 1 text: "{{record}}"] | ||
| ] | ||
| end | ||
|
|
||
| search | ||
| [#json/encode] | ||
| commit | ||
| [#ui/column #application | children: | ||
| [#ui/column #output | children: | ||
| [#ui/button #next sort: -1 text: "Next"] | ||
| ] | ||
| [#ui/row #debug | children: | ||
| [#ui/column #encode-eavs] | ||
| [#ui/column #flatten] | ||
| ] | ||
| ] | ||
| end | ||
|
|
||
| commit | ||
| [#html/style text: " | ||
| td {padding: 10px;} | ||
| table {margin: 10px;} | ||
| .ui/column {padding: 10px;} | ||
| .ui/row {padding: 10px;} | ||
| .output {padding: 20px;} | ||
| .encode-eavs {min-width: 350px;} | ||
| "] | ||
| end | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no pipe required when merging (you can't change the identity of an existing thing!)