diff --git a/bin/solid.pill b/bin/solid.pill index ce17c6c868..9d257abc74 100644 --- a/bin/solid.pill +++ b/bin/solid.pill @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d56b7351a347a65c06999955114f196523a86c853390d5d1822a90a606619d6 -size 10357558 +oid sha256:f6b5e33e573818120051651c1182163527edbbe0dff0eb6591e12a55cfccb273 +size 10486101 diff --git a/nix/pkgs/docker-image/default.nix b/nix/pkgs/docker-image/default.nix index 8d2f5af897..6c200a00ec 100644 --- a/nix/pkgs/docker-image/default.nix +++ b/nix/pkgs/docker-image/default.nix @@ -1,4 +1,4 @@ -{ urbit, libcap, coreutils, bashInteractive, dockerTools, writeScriptBin, amesPort ? 34343 }: +{ urbit, curl, libcap, coreutils, bashInteractive, dockerTools, writeScriptBin, amesPort ? 34343 }: let startUrbit = writeScriptBin "start-urbit" '' #!${bashInteractive}/bin/bash @@ -58,12 +58,42 @@ let exec urbit $ttyflag -p $amesPort $dirname ''; - + + getUrbitCode = writeScriptBin "get-urbit-code" '' + #!${bashInteractive}/bin/bash + + raw=$(curl -s -X POST -H "Content-Type: application/json" \ + -d '{ "source": { "dojo": "+code" }, "sink": { "stdout": null } }' \ + http://127.0.0.1:12321) + + # trim \n" from the end + trim="''${raw%\\n\"}" + + # trim " from the start + code="''${trim#\"}" + + echo "$code" + ''; + + resetUrbitCode = writeScriptBin "reset-urbit-code" '' + #!${bashInteractive}/bin/bash + + curl=$(curl -s -X POST -H "Content-Type: application/json" \ + -d '{ "source": { "dojo": "+hood/code %reset" }, "sink": { "app": "hood" } }' \ + http://127.0.0.1:12321) + + if [[ $? -eq 0 ]] + then + echo "OK" + else + echo "Curl error: $?" + fi + ''; in dockerTools.buildImage { name = "urbit"; tag = "v${urbit.version}"; - contents = [ bashInteractive urbit startUrbit coreutils ]; + contents = [ bashInteractive urbit curl startUrbit getUrbitCode resetUrbitCode coreutils ]; runAsRoot = '' #!${bashInteractive} mkdir -p /urbit diff --git a/pkg/arvo/app/contact-store.hoon b/pkg/arvo/app/contact-store.hoon index bd174a603f..8f39e75404 100644 --- a/pkg/arvo/app/contact-store.hoon +++ b/pkg/arvo/app/contact-store.hoon @@ -126,6 +126,14 @@ !=(contact(last-updated *@da) u.old(last-updated *@da)) == [~ state] + ~| "cannot add a data url to cover!" + ?> ?| ?=(~ cover.contact) + !=('data:' (cut 3 [0 5] u.cover.contact)) + == + ~| "cannot add a data url to avatar!" + ?> ?| ?=(~ avatar.contact) + !=('data:' (cut 3 [0 5] u.avatar.contact)) + == :- (send-diff [%add ship contact] =(ship our.bowl)) state(rolodex (~(put by rolodex) ship contact)) :: @@ -149,6 +157,14 @@ =/ contact (edit-contact old edit-field) ?: =(old contact) [~ state] + ~| "cannot add a data url to cover!" + ?> ?| ?=(~ cover.contact) + !=('data:' (cut 3 [0 5] u.cover.contact)) + == + ~| "cannot add a data url to avatar!" + ?> ?| ?=(~ avatar.contact) + !=('data:' (cut 3 [0 5] u.avatar.contact)) + == =. last-updated.contact timestamp :- (send-diff [%edit ship edit-field timestamp] =(ship our.bowl)) state(rolodex (~(put by rolodex) ship contact)) diff --git a/pkg/arvo/app/glob.hoon b/pkg/arvo/app/glob.hoon index 84b1eb34d5..0fb9ffa4a6 100644 --- a/pkg/arvo/app/glob.hoon +++ b/pkg/arvo/app/glob.hoon @@ -5,7 +5,7 @@ /- glob /+ default-agent, verb, dbug |% -++ hash 0v6.qafur.17301.j8obh.vbepn.7tq3l +++ hash 0v3.g6u13.haedt.jt4hd.61ek5.6t30q +$ state-0 [%0 hash=@uv glob=(unit (each glob:glob tid=@ta))] +$ all-states $% state-0 diff --git a/pkg/arvo/app/landscape/index.html b/pkg/arvo/app/landscape/index.html index d1f0081385..8a76a571f8 100644 --- a/pkg/arvo/app/landscape/index.html +++ b/pkg/arvo/app/landscape/index.html @@ -24,6 +24,6 @@
- +