mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 14:42:02 +03:00
Merge branch 'philip/kale' into alef-testnet
This commit is contained in:
commit
626f7c9a75
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:8f6e93cb3ee5fcb0970851bd10d2d2a640ff968292d147c35385623b86570296
|
oid sha256:5debf91880c73d052429ca487555aa60aa2ee4f173c9f059e30b61372689910e
|
||||||
size 6662042
|
size 7118127
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:f156a85884c0aadce06db65364883e0e9f26f9b55b7e07c5780c50f8d5e1194e
|
oid sha256:eb747c039645dc647a919a4f26f216b46fcfbb5964f667da329369b5798d3839
|
||||||
size 5238740
|
size 5309578
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:b7b50f915b1a081dd82d4a409b48bcddec51a1842c37b54fdbaa25c7e18b6f79
|
oid sha256:03f7a95ef8e045bdc4c0c3a13098b5ec280ad4750929dbf9ced42985129188ba
|
||||||
size 10292045
|
size 10291461
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
crossenv:
|
crossenv:
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
argon2 = import ./deps/argon2/cross.nix { inherit crossenv; };
|
argon2 = import ./deps/argon2/cross.nix { inherit crossenv; };
|
||||||
murmur3 = import ./deps/murmur3/cross.nix { inherit crossenv; };
|
murmur3 = import ./deps/murmur3/cross.nix { inherit crossenv; };
|
||||||
uv = import ./deps/uv/cross.nix { inherit crossenv; };
|
uv = import ./deps/uv/cross.nix { inherit crossenv; };
|
||||||
ed25519 = import ./deps/ed25519/cross.nix { inherit crossenv; };
|
ed25519 = import ./deps/ed25519/cross.nix { inherit crossenv; };
|
||||||
sni = import ./deps/sni/cross.nix { inherit crossenv; };
|
sni = import ./deps/sni/cross.nix { inherit crossenv; };
|
||||||
scrypt = import ./deps/scrypt/cross.nix { inherit crossenv; };
|
scrypt = import ./deps/scrypt/cross.nix { inherit crossenv; };
|
||||||
softfloat3 = import ./deps/softfloat3/cross.nix { inherit crossenv; };
|
softfloat3 = import ./deps/softfloat3/cross.nix { inherit crossenv; };
|
||||||
secp256k1 = import ./deps/secp256k1/cross.nix { inherit crossenv; };
|
secp256k1 = import ./deps/secp256k1/cross.nix { inherit crossenv; };
|
||||||
h2o = import ./deps/h2o/cross.nix { inherit crossenv uv; };
|
h2o = import ./deps/h2o/cross.nix { inherit crossenv uv; };
|
||||||
|
ivory-header = import ./deps/ivory-header/cross.nix { inherit crossenv; };
|
||||||
|
ca-header = import ./deps/ca-header/cross.nix { inherit crossenv; };
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ let
|
|||||||
|
|
||||||
vendor =
|
vendor =
|
||||||
with deps;
|
with deps;
|
||||||
[ argon2 ed25519 h2o murmur3 scrypt secp256k1 sni softfloat3 uv ent ge-additions ];
|
[ argon2 ed25519 h2o murmur3 scrypt secp256k1 sni softfloat3 uv ent ge-additions ivory-header ca-header ];
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
27
nix/deps/ca-header/builder.sh
Executable file
27
nix/deps/ca-header/builder.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
source $stdenv/setup
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
cleanup () {
|
||||||
|
echo "done"
|
||||||
|
}
|
||||||
|
|
||||||
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
|
||||||
|
if ! [ -f "$SSL_CERT_FILE" ]; then
|
||||||
|
echo "$SSL_CERT_FILE doesn't exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p ./include
|
||||||
|
|
||||||
|
cat $SSL_CERT_FILE > include/ca-bundle.crt
|
||||||
|
xxd -i include/ca-bundle.crt > ca-bundle.h
|
||||||
|
|
||||||
|
mkdir -p $out/include
|
||||||
|
|
||||||
|
mv ca-bundle.h $out/include
|
||||||
|
rm -rf ./include
|
||||||
|
|
||||||
|
set +x
|
8
nix/deps/ca-header/cross.nix
Normal file
8
nix/deps/ca-header/cross.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{ crossenv }:
|
||||||
|
|
||||||
|
crossenv.make_derivation rec {
|
||||||
|
name = "ca-bundle.h";
|
||||||
|
builder = ./builder.sh;
|
||||||
|
native_inputs = with crossenv.nixpkgs; [ cacert xxd ];
|
||||||
|
SSL_CERT_FILE = "${crossenv.nixpkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||||
|
}
|
7
nix/deps/ca-header/default.nix
Normal file
7
nix/deps/ca-header/default.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
|
||||||
|
pkgs.stdenv.mkDerivation {
|
||||||
|
name = "ca-bundle.h";
|
||||||
|
builder = ./builder.sh;
|
||||||
|
nativeBuildInputs = with pkgs; [ cacert xxd ];
|
||||||
|
}
|
@ -1,13 +1,15 @@
|
|||||||
{ pkgs ? import ../nixpkgs.nix }:
|
{ pkgs ? import ../nixpkgs.nix }:
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
argon2 = import ./argon2 { inherit pkgs; };
|
argon2 = import ./argon2 { inherit pkgs; };
|
||||||
murmur3 = import ./murmur3 { inherit pkgs; };
|
murmur3 = import ./murmur3 { inherit pkgs; };
|
||||||
uv = import ./uv { inherit pkgs; };
|
uv = import ./uv { inherit pkgs; };
|
||||||
ed25519 = import ./ed25519 { inherit pkgs; };
|
ed25519 = import ./ed25519 { inherit pkgs; };
|
||||||
sni = import ./sni { inherit pkgs; };
|
sni = import ./sni { inherit pkgs; };
|
||||||
scrypt = import ./scrypt { inherit pkgs; };
|
scrypt = import ./scrypt { inherit pkgs; };
|
||||||
softfloat3 = import ./softfloat3 { inherit pkgs; };
|
softfloat3 = import ./softfloat3 { inherit pkgs; };
|
||||||
secp256k1 = import ./secp256k1 { inherit pkgs; };
|
secp256k1 = import ./secp256k1 { inherit pkgs; };
|
||||||
h2o = import ./h2o { inherit pkgs uv; };
|
h2o = import ./h2o { inherit pkgs uv; };
|
||||||
|
ivory-header = import ./ivory-header { inherit pkgs; };
|
||||||
|
ca-header = import ./ca-header { inherit pkgs; };
|
||||||
}
|
}
|
||||||
|
41
nix/deps/ivory-header/builder.sh
Executable file
41
nix/deps/ivory-header/builder.sh
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
source $stdenv/setup
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
cleanup () {
|
||||||
|
echo "done"
|
||||||
|
}
|
||||||
|
|
||||||
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
|
||||||
|
if ! [ -f "$IVORY" ]; then
|
||||||
|
echo "$IVORY doesn't exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# heuristics to confirm the ivory pill is valid
|
||||||
|
#
|
||||||
|
|
||||||
|
# greater than 10KB
|
||||||
|
#
|
||||||
|
if [ $(du -k $IVORY | cut -f1) -gt 10 ]; then
|
||||||
|
echo "$IVORY is less than 10KB"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# first 7 bytes != "version" (start of an lfs pointer)
|
||||||
|
#
|
||||||
|
if [ "$(cat $(IVORY) | head -c 7)" = "version" ]; then
|
||||||
|
echo "$IVORY starts with 'version'; it's an LFS pointer"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat $IVORY > u3_Ivory.pill
|
||||||
|
xxd -i u3_Ivory.pill > ivory.h
|
||||||
|
|
||||||
|
mkdir -p $out/include
|
||||||
|
|
||||||
|
mv ivory.h $out/include
|
||||||
|
rm u3_Ivory.pill
|
||||||
|
|
||||||
|
set +x
|
11
nix/deps/ivory-header/cross.nix
Normal file
11
nix/deps/ivory-header/cross.nix
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
crossenv,
|
||||||
|
ivory ? ../../../bin/ivory.pill
|
||||||
|
}:
|
||||||
|
|
||||||
|
crossenv.make_derivation rec {
|
||||||
|
name = "ivory.h";
|
||||||
|
builder = ./builder.sh;
|
||||||
|
native_inputs = with crossenv.nixpkgs; [ xxd ];
|
||||||
|
IVORY = ivory;
|
||||||
|
}
|
11
nix/deps/ivory-header/default.nix
Normal file
11
nix/deps/ivory-header/default.nix
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
ivory ? ../../../bin/ivory.pill
|
||||||
|
}:
|
||||||
|
|
||||||
|
pkgs.stdenv.mkDerivation {
|
||||||
|
name = "ivory.h";
|
||||||
|
builder = ./builder.sh;
|
||||||
|
nativeBuildInputs = with pkgs; [ xxd ];
|
||||||
|
IVORY = ivory;
|
||||||
|
}
|
@ -17,7 +17,7 @@ let
|
|||||||
import ./urbit {
|
import ./urbit {
|
||||||
inherit pkgs ent debug ge-additions;
|
inherit pkgs ent debug ge-additions;
|
||||||
inherit (deps) argon2 murmur3 uv ed25519 sni scrypt softfloat3;
|
inherit (deps) argon2 murmur3 uv ed25519 sni scrypt softfloat3;
|
||||||
inherit (deps) secp256k1 h2o;
|
inherit (deps) secp256k1 h2o ivory-header ca-header;
|
||||||
};
|
};
|
||||||
|
|
||||||
urbit = mkUrbit { debug=false; };
|
urbit = mkUrbit { debug=false; };
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
debug,
|
debug,
|
||||||
ivory ? ../../../bin/ivory.pill,
|
argon2, ed25519, ent, ge-additions, h2o, murmur3, scrypt, secp256k1, sni, softfloat3, uv, ivory-header, ca-header
|
||||||
argon2, ed25519, ent, ge-additions, h2o, murmur3, scrypt, secp256k1, sni, softfloat3, uv
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -12,10 +11,10 @@ let
|
|||||||
|
|
||||||
deps =
|
deps =
|
||||||
with pkgs;
|
with pkgs;
|
||||||
[ curl gmp libsigsegv ncurses openssl zlib lmdb cacert xxd ];
|
[ curl gmp libsigsegv ncurses openssl zlib lmdb ];
|
||||||
|
|
||||||
vendor =
|
vendor =
|
||||||
[ argon2 softfloat3 ed25519 ent ge-additions h2o scrypt uv murmur3 secp256k1 sni ];
|
[ argon2 softfloat3 ed25519 ent ge-additions h2o scrypt uv murmur3 secp256k1 sni ivory-header ca-header ];
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -31,7 +30,6 @@ pkgs.stdenv.mkDerivation {
|
|||||||
hardeningDisable = if debug then [ "all" ] else [];
|
hardeningDisable = if debug then [ "all" ] else [];
|
||||||
|
|
||||||
CFLAGS = if debug then "-O3 -g -Werror" else "-O3 -Werror";
|
CFLAGS = if debug then "-O3 -g -Werror" else "-O3 -Werror";
|
||||||
IVORY = ivory;
|
|
||||||
MEMORY_DEBUG = debug;
|
MEMORY_DEBUG = debug;
|
||||||
CPU_DEBUG = debug;
|
CPU_DEBUG = debug;
|
||||||
EVENT_TIME_DEBUG = false;
|
EVENT_TIME_DEBUG = false;
|
||||||
|
@ -4,8 +4,7 @@
|
|||||||
ent,
|
ent,
|
||||||
name ? "urbit",
|
name ? "urbit",
|
||||||
debug ? false,
|
debug ? false,
|
||||||
ivory ? ../../../bin/ivory.pill,
|
ge-additions
|
||||||
ge-additions, cacert, xxd
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -16,7 +15,7 @@ let
|
|||||||
|
|
||||||
vendor =
|
vendor =
|
||||||
with deps;
|
with deps;
|
||||||
[ argon2 softfloat3 ed25519 ge-additions h2o scrypt uv murmur3 secp256k1 sni ];
|
[ argon2 softfloat3 ed25519 ge-additions h2o scrypt uv murmur3 secp256k1 sni ivory-header ca-header ];
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -27,13 +26,10 @@ env.make_derivation {
|
|||||||
CPU_DEBUG = debug;
|
CPU_DEBUG = debug;
|
||||||
EVENT_TIME_DEBUG = false;
|
EVENT_TIME_DEBUG = false;
|
||||||
NCURSES = env.ncurses;
|
NCURSES = env.ncurses;
|
||||||
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
|
||||||
IVORY = ivory;
|
|
||||||
|
|
||||||
name = "${name}-${env_name}";
|
name = "${name}-${env_name}";
|
||||||
exename = name;
|
exename = name;
|
||||||
src = ../../../pkg/urbit;
|
src = ../../../pkg/urbit;
|
||||||
native_inputs = [ xxd ];
|
|
||||||
cross_inputs = crossdeps ++ vendor ++ [ ent ];
|
cross_inputs = crossdeps ++ vendor ++ [ ent ];
|
||||||
builder = ./release.sh;
|
builder = ./release.sh;
|
||||||
}
|
}
|
||||||
|
@ -12,5 +12,5 @@ import ./default.nix {
|
|||||||
inherit (tlon)
|
inherit (tlon)
|
||||||
ent ge-additions;
|
ent ge-additions;
|
||||||
inherit (deps)
|
inherit (deps)
|
||||||
argon2 ed25519 h2o murmur3 scrypt secp256k1 sni softfloat3 uv;
|
argon2 ed25519 h2o murmur3 scrypt secp256k1 sni softfloat3 uv ivory-header ca-header;
|
||||||
}
|
}
|
||||||
|
@ -21,8 +21,7 @@ let
|
|||||||
|
|
||||||
urbit = env:
|
urbit = env:
|
||||||
import ./pkgs/urbit/release.nix env
|
import ./pkgs/urbit/release.nix env
|
||||||
{ ent = ent env; ge-additions = ge-additions env; cacert = nixpkgs.cacert;
|
{ ent = ent env; ge-additions = ge-additions env; debug = false; name = "urbit"; };
|
||||||
xxd = nixpkgs.xxd; debug = false; name = "urbit"; };
|
|
||||||
|
|
||||||
builds-for-platform = plat:
|
builds-for-platform = plat:
|
||||||
plat.deps // {
|
plat.deps // {
|
||||||
|
@ -547,6 +547,17 @@
|
|||||||
:^ ~ ~ %noun
|
:^ ~ ~ %noun
|
||||||
`(list ship)`(turn ~(tap by piers) head)
|
`(list ship)`(turn ~(tap by piers) head)
|
||||||
::
|
::
|
||||||
|
::
|
||||||
|
::
|
||||||
|
++ peek-x-pill
|
||||||
|
|= pax=path
|
||||||
|
^- (unit (unit [%pill pill]))
|
||||||
|
=/ pill-size (met 3 (jam pil))
|
||||||
|
?: (lth pill-size 100)
|
||||||
|
~& [%no-pill size=pill-size]
|
||||||
|
[~ ~]
|
||||||
|
``pill+pil
|
||||||
|
::
|
||||||
:: Trivial scry for mock
|
:: Trivial scry for mock
|
||||||
::
|
::
|
||||||
++ scry |=([* *] ~)
|
++ scry |=([* *] ~)
|
||||||
|
@ -78,7 +78,9 @@
|
|||||||
=/ m (async:stdio ,(unit json))
|
=/ m (async:stdio ,(unit json))
|
||||||
^- form:m
|
^- form:m
|
||||||
?> ?=(%finished -.client-response)
|
?> ?=(%finished -.client-response)
|
||||||
=/ body=@t q.data:(need full-file.client-response)
|
?~ full-file.client-response
|
||||||
|
(pure:m ~)
|
||||||
|
=/ body=@t q.data.u.full-file.client-response
|
||||||
=/ jon=(unit json) (de-json:html body)
|
=/ jon=(unit json) (de-json:html body)
|
||||||
?~ jon
|
?~ jon
|
||||||
(pure:m ~)
|
(pure:m ~)
|
||||||
@ -254,7 +256,6 @@
|
|||||||
=* loop $
|
=* loop $
|
||||||
?~ udiffs
|
?~ udiffs
|
||||||
(pure:m ~)
|
(pure:m ~)
|
||||||
~& [%sending-event i.udiffs]
|
|
||||||
=/ =path /(scot %p ship.i.udiffs)
|
=/ =path /(scot %p ship.i.udiffs)
|
||||||
;< ~ bind:m (give-result:stdio / %azimuth-udiff i.udiffs)
|
;< ~ bind:m (give-result:stdio / %azimuth-udiff i.udiffs)
|
||||||
;< ~ bind:m (give-result:stdio path %azimuth-udiff i.udiffs)
|
;< ~ bind:m (give-result:stdio path %azimuth-udiff i.udiffs)
|
||||||
@ -298,7 +299,7 @@
|
|||||||
=* walk-loop $
|
=* walk-loop $
|
||||||
?: (gth number.state number.id.latest-block)
|
?: (gth number.state number.id.latest-block)
|
||||||
;< now=@da bind:m get-time:stdio
|
;< now=@da bind:m get-time:stdio
|
||||||
;< ~ bind:m (wait-effect:stdio (add now ~s10))
|
;< ~ bind:m (wait-effect:stdio (add now ~m5))
|
||||||
(pure:m state)
|
(pure:m state)
|
||||||
;< =block bind:m (get-block-by-number url.state number.state)
|
;< =block bind:m (get-block-by-number url.state number.state)
|
||||||
;< [=new=pending-udiffs new-blocks=(lest ^block)] bind:m
|
;< [=new=pending-udiffs new-blocks=(lest ^block)] bind:m
|
||||||
@ -317,7 +318,6 @@
|
|||||||
=/ m (async:stdio ,[pending-udiffs (lest ^block)])
|
=/ m (async:stdio ,[pending-udiffs (lest ^block)])
|
||||||
^- form:m
|
^- form:m
|
||||||
?: &(?=(^ blocks) !=(parent-hash.block hash.id.i.blocks))
|
?: &(?=(^ blocks) !=(parent-hash.block hash.id.i.blocks))
|
||||||
~& %rewinding
|
|
||||||
(rewind url a-pending-udiffs block blocks)
|
(rewind url a-pending-udiffs block blocks)
|
||||||
;< =b=pending-udiffs bind:m
|
;< =b=pending-udiffs bind:m
|
||||||
(release-old-events a-pending-udiffs number.id.block)
|
(release-old-events a-pending-udiffs number.id.block)
|
||||||
@ -344,7 +344,6 @@
|
|||||||
=/ m (async:stdio ,[^pending-udiffs (lest ^block)])
|
=/ m (async:stdio ,[^pending-udiffs (lest ^block)])
|
||||||
|- ^- form:m
|
|- ^- form:m
|
||||||
=* loop $
|
=* loop $
|
||||||
~& [%wind block ?~(blocks ~ i.blocks)]
|
|
||||||
?~ blocks
|
?~ blocks
|
||||||
(pure:m pending-udiffs block blocks)
|
(pure:m pending-udiffs block blocks)
|
||||||
?: =(parent-hash.block hash.id.i.blocks)
|
?: =(parent-hash.block hash.id.i.blocks)
|
||||||
@ -374,7 +373,7 @@
|
|||||||
|= [state=app-state =latest=number:block]
|
|= [state=app-state =latest=number:block]
|
||||||
=/ m (async:stdio ,app-state)
|
=/ m (async:stdio ,app-state)
|
||||||
^- form:m
|
^- form:m
|
||||||
=/ zoom-margin=number:block 3
|
=/ zoom-margin=number:block 100
|
||||||
?: (lth latest-number (add number.state zoom-margin))
|
?: (lth latest-number (add number.state zoom-margin))
|
||||||
(pure:m state)
|
(pure:m state)
|
||||||
=/ to-number=number:block (sub latest-number zoom-margin)
|
=/ to-number=number:block (sub latest-number zoom-margin)
|
||||||
@ -395,7 +394,6 @@
|
|||||||
|= =in-poke-data
|
|= =in-poke-data
|
||||||
=/ m tapp-async
|
=/ m tapp-async
|
||||||
^- form:m
|
^- form:m
|
||||||
~& [%azimuth-tracker our.bowl number.state in-poke-data]
|
|
||||||
?- +<.in-poke-data
|
?- +<.in-poke-data
|
||||||
%listen (listen state +>.in-poke-data)
|
%listen (listen state +>.in-poke-data)
|
||||||
%watch (pure:m state(url url.in-poke-data))
|
%watch (pure:m state(url url.in-poke-data))
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1019,6 +1019,8 @@
|
|||||||
==
|
==
|
||||||
::
|
::
|
||||||
$listen-api !!
|
$listen-api !!
|
||||||
|
$export !!
|
||||||
|
$import !!
|
||||||
$as
|
$as
|
||||||
:* %as mar.source.com
|
:* %as mar.source.com
|
||||||
$(num +(num), source.com next.source.com)
|
$(num +(num), source.com next.source.com)
|
||||||
|
@ -92,6 +92,7 @@
|
|||||||
++ lime :: diff fruit
|
++ lime :: diff fruit
|
||||||
$% {$hall-prize prize} ::
|
$% {$hall-prize prize} ::
|
||||||
{$hall-rumor rumor} ::
|
{$hall-rumor rumor} ::
|
||||||
|
{$export [%hall-v0 (list telegram)]} :: sent to lens
|
||||||
== ::
|
== ::
|
||||||
++ pear :: poke fruit
|
++ pear :: poke fruit
|
||||||
$% {$hall-command command} ::
|
$% {$hall-command command} ::
|
||||||
@ -2789,6 +2790,8 @@
|
|||||||
^- (list move)
|
^- (list move)
|
||||||
=+ mur=(~(get by res) p)
|
=+ mur=(~(get by res) p)
|
||||||
?^ mur u.mur
|
?^ mur u.mur
|
||||||
|
?: =([%export ~] p)
|
||||||
|
~
|
||||||
=- =. res (~(put by res) p -)
|
=- =. res (~(put by res) p -)
|
||||||
-
|
-
|
||||||
=+ qer=(path-to-query p)
|
=+ qer=(path-to-query p)
|
||||||
@ -3017,6 +3020,10 @@
|
|||||||
|= pax/path
|
|= pax/path
|
||||||
^- (quip move _+>)
|
^- (quip move _+>)
|
||||||
?: ?=([%sole *] pax) ~&(%hall-no-sole !!)
|
?: ?=([%sole *] pax) ~&(%hall-no-sole !!)
|
||||||
|
?: ?=([%export *] pax)
|
||||||
|
:_ +>.$
|
||||||
|
[ost.bol %diff %export [%hall-v0 grams:(~(got by stories) ~.inbox)]]~
|
||||||
|
::
|
||||||
=+ qer=(path-to-query pax)
|
=+ qer=(path-to-query pax)
|
||||||
?. (leak src.bol qer) ~&(%peer-invisible !!)
|
?. (leak src.bol qer) ~&(%peer-invisible !!)
|
||||||
=^ mos +>.$
|
=^ mos +>.$
|
||||||
@ -3196,6 +3203,20 @@
|
|||||||
:- ~
|
:- ~
|
||||||
+>.$(log (~(del by log) nom))
|
+>.$(log (~(del by log) nom))
|
||||||
::
|
::
|
||||||
|
++ poke-import
|
||||||
|
|= i=*
|
||||||
|
^- (quip move _+>)
|
||||||
|
::
|
||||||
|
?> ?=([%hall-v0 *] i)
|
||||||
|
=/ grams=(list telegram) ;;((list telegram) +.i)
|
||||||
|
::
|
||||||
|
~& [%importing-telegrams count=(lent grams)]
|
||||||
|
::
|
||||||
|
%- pre-bake
|
||||||
|
%+ turn grams
|
||||||
|
|= t/telegram
|
||||||
|
[%story ~.inbox %gram [our.bol ~.inbox] t]
|
||||||
|
::
|
||||||
++ log-all-to-file
|
++ log-all-to-file
|
||||||
:: update stories logs
|
:: update stories logs
|
||||||
::
|
::
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/- lens
|
/- lens
|
||||||
/+ *server
|
/+ *server, base64
|
||||||
/= lens-mark /: /===/mar/lens/command
|
/= lens-mark /: /===/mar/lens/command
|
||||||
/!noun/
|
/!noun/
|
||||||
=, format
|
=, format
|
||||||
@ -12,6 +12,7 @@
|
|||||||
+$ card
|
+$ card
|
||||||
$% [%connect wire binding:eyre term]
|
$% [%connect wire binding:eyre term]
|
||||||
[%http-response =http-event:http]
|
[%http-response =http-event:http]
|
||||||
|
[%peer wire dock path]
|
||||||
[%peel wire dock mark path]
|
[%peel wire dock mark path]
|
||||||
[%poke wire dock poke]
|
[%poke wire dock poke]
|
||||||
[%pull wire dock ~]
|
[%pull wire dock ~]
|
||||||
@ -19,6 +20,7 @@
|
|||||||
::
|
::
|
||||||
+$ poke
|
+$ poke
|
||||||
$% [%lens-command command:lens]
|
$% [%lens-command command:lens]
|
||||||
|
[%import *]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
+$ state
|
+$ state
|
||||||
@ -49,6 +51,7 @@
|
|||||||
%- (require-authorization:app ost.bow move this)
|
%- (require-authorization:app ost.bow move this)
|
||||||
|= =inbound-request:eyre
|
|= =inbound-request:eyre
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
|
::
|
||||||
?^ job.state
|
?^ job.state
|
||||||
:_ this
|
:_ this
|
||||||
[ost.bow %http-response %start [%500 ~] ~ %.y]~
|
[ost.bow %http-response %start [%500 ~] ~ %.y]~
|
||||||
@ -60,6 +63,22 @@
|
|||||||
(need (de-json:html q:(need body.request.inbound-request)))
|
(need (de-json:html q:(need body.request.inbound-request)))
|
||||||
=/ com=command:lens
|
=/ com=command:lens
|
||||||
(json:grab:lens-mark jon)
|
(json:grab:lens-mark jon)
|
||||||
|
::
|
||||||
|
?: ?=(%export -.source.com)
|
||||||
|
~& [%export app.source.com]
|
||||||
|
:_ this(job.state (some [ost.bow com]))
|
||||||
|
[ost.bow %peer /export [our.bow app.source.com] /export]~
|
||||||
|
::
|
||||||
|
?: ?=(%import -.source.com)
|
||||||
|
?~ enc=(de:base64 base64-jam.source.com)
|
||||||
|
:_ this
|
||||||
|
[ost.bow %http-response %start [%500 ~] ~ %.y]~
|
||||||
|
::
|
||||||
|
=/ c=* (cue q.u.enc)
|
||||||
|
::
|
||||||
|
:_ this(job.state (some [ost.bow com]))
|
||||||
|
[ost.bow %poke /import [our.bow app.source.com] %import c]~
|
||||||
|
::
|
||||||
:_ this(job.state (some [ost.bow com]))
|
:_ this(job.state (some [ost.bow com]))
|
||||||
[ost.bow %peel /sole [our.bow %dojo] %lens-json /sole]~
|
[ost.bow %peel /sole [our.bow %dojo] %lens-json /sole]~
|
||||||
::
|
::
|
||||||
@ -72,6 +91,29 @@
|
|||||||
:_ this(job.state ~)
|
:_ this(job.state ~)
|
||||||
[bone.u.job.state %http-response (json-response:app (json-to-octs jon))]~
|
[bone.u.job.state %http-response (json-response:app (json-to-octs jon))]~
|
||||||
::
|
::
|
||||||
|
++ diff-export
|
||||||
|
|= [=wire data=*]
|
||||||
|
^- (quip move _this)
|
||||||
|
::
|
||||||
|
?> ?=(^ job.state)
|
||||||
|
:: herb will do whatever we tell it to, so by convention have it write to an
|
||||||
|
:: app name based on the file name.
|
||||||
|
::
|
||||||
|
?> ?=(%export -.source.com.u.job.state)
|
||||||
|
=/ app-name=tape (trip app.source.com.u.job.state)
|
||||||
|
=/ output=@t (crip "/{app-name}/jam")
|
||||||
|
::
|
||||||
|
=/ jon=json
|
||||||
|
=/ =atom (jam data)
|
||||||
|
=/ =octs [(met 3 atom) atom]
|
||||||
|
=/ enc (en:base64 octs)
|
||||||
|
(pairs:enjs:format file+s+output data+s+enc ~)
|
||||||
|
::
|
||||||
|
:_ this(job.state ~)
|
||||||
|
:~ [bone.u.job.state %http-response (json-response:app (json-to-octs jon))]
|
||||||
|
[ost.bow %pull /export [our.bow app.source.com.u.job.state] ~]
|
||||||
|
==
|
||||||
|
::
|
||||||
++ quit
|
++ quit
|
||||||
|= =wire
|
|= =wire
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
@ -81,6 +123,10 @@
|
|||||||
++ reap
|
++ reap
|
||||||
|= [=wire saw=(unit tang)]
|
|= [=wire saw=(unit tang)]
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
|
::
|
||||||
|
?: =([%export ~] wire)
|
||||||
|
[~ this]
|
||||||
|
::
|
||||||
?^ saw
|
?^ saw
|
||||||
[((slog u.saw) ~) this]
|
[((slog u.saw) ~) this]
|
||||||
?> ?=(^ job.state)
|
?> ?=(^ job.state)
|
||||||
@ -92,6 +138,19 @@
|
|||||||
++ coup
|
++ coup
|
||||||
|= [=wire saw=(unit tang)]
|
|= [=wire saw=(unit tang)]
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
|
::
|
||||||
|
?: =([%import ~] wire)
|
||||||
|
?> ?=(^ job.state)
|
||||||
|
:_ this(job.state ~)
|
||||||
|
:_ ~
|
||||||
|
:* bone.u.job.state
|
||||||
|
%http-response
|
||||||
|
%start
|
||||||
|
[%200 ~]
|
||||||
|
[~ (as-octt:mimes:html "\"Imported data\"")]
|
||||||
|
%.y
|
||||||
|
==
|
||||||
|
::
|
||||||
?^ saw
|
?^ saw
|
||||||
[((slog u.saw) ~) this]
|
[((slog u.saw) ~) this]
|
||||||
[~ this]
|
[~ this]
|
||||||
|
@ -61,6 +61,7 @@
|
|||||||
++ manual-tests
|
++ manual-tests
|
||||||
^- (list (pair term [(list ship) _*form:(ph ,~)]))
|
^- (list (pair term [(list ship) _*form:(ph ,~)]))
|
||||||
=+ (ph-tests our.hid)
|
=+ (ph-tests our.hid)
|
||||||
|
=+ ph-azimuth=(ph-azimuth our.hid)
|
||||||
=/ eth-node (spawn:ph-azimuth ~bud)
|
=/ eth-node (spawn:ph-azimuth ~bud)
|
||||||
=/ m (ph ,~)
|
=/ m (ph ,~)
|
||||||
:~ :+ %boot-bud
|
:~ :+ %boot-bud
|
||||||
@ -110,7 +111,7 @@
|
|||||||
;< [eth-node=_eth-node ~] bind:m
|
;< [eth-node=_eth-node ~] bind:m
|
||||||
%+ (wrap-philter ,_eth-node ,~)
|
%+ (wrap-philter ,_eth-node ,~)
|
||||||
router:eth-node
|
router:eth-node
|
||||||
(raw-ship ~bud `(dawn:eth-node ~bud))
|
(raw-real-ship:eth-node ~bud)
|
||||||
(pure:m ~)
|
(pure:m ~)
|
||||||
::
|
::
|
||||||
:+ %hi-az
|
:+ %hi-az
|
||||||
@ -119,9 +120,9 @@
|
|||||||
;< [eth-node=_eth-node ~] bind:m
|
;< [eth-node=_eth-node ~] bind:m
|
||||||
%+ (wrap-philter ,_eth-node ,~)
|
%+ (wrap-philter ,_eth-node ,~)
|
||||||
router:eth-node
|
router:eth-node
|
||||||
;< ~ bind:m (raw-ship ~dev `(dawn:eth-node ~dev))
|
;< ~ bind:m (raw-real-ship:eth-node ~dev)
|
||||||
~& > %dev-done
|
~& > %dev-done
|
||||||
;< ~ bind:m (raw-ship ~bud `(dawn:eth-node ~bud))
|
;< ~ bind:m (raw-real-ship:eth-node ~bud)
|
||||||
~& > %bud-done
|
~& > %bud-done
|
||||||
(send-hi ~bud ~dev)
|
(send-hi ~bud ~dev)
|
||||||
(pure:m ~)
|
(pure:m ~)
|
||||||
@ -132,12 +133,40 @@
|
|||||||
;< [eth-node=_eth-node ~] bind:m
|
;< [eth-node=_eth-node ~] bind:m
|
||||||
%+ (wrap-philter ,_eth-node ,~)
|
%+ (wrap-philter ,_eth-node ,~)
|
||||||
router:eth-node
|
router:eth-node
|
||||||
;< ~ bind:m (raw-ship ~marbud `(dawn:eth-node ~marbud))
|
;< ~ bind:m (raw-real-ship:eth-node ~marbud)
|
||||||
~& > 'MARBUD-DONE'
|
~& > 'MARBUD-DONE'
|
||||||
;< ~ bind:m (raw-ship ~bud `(dawn:eth-node ~bud))
|
;< ~ bind:m (raw-real-ship:eth-node ~bud)
|
||||||
~& > 'BUD-DONE'
|
~& > 'BUD-DONE'
|
||||||
(send-hi ~bud ~marbud)
|
(send-hi ~bud ~marbud)
|
||||||
(pure:m ~)
|
(pure:m ~)
|
||||||
|
::
|
||||||
|
:+ %moon-az
|
||||||
|
~[~bud ~marbud ~linnup-torsyx ~linnup-torsyx-linnup-torsyx ~dev]
|
||||||
|
=. eth-node (spawn:eth-node ~marbud)
|
||||||
|
=. eth-node (spawn:eth-node ~linnup-torsyx)
|
||||||
|
;< [eth-node=_eth-node ~] bind:m
|
||||||
|
%+ (wrap-philter ,_eth-node ,~)
|
||||||
|
router:eth-node
|
||||||
|
;< ~ bind:m (raw-real-ship:eth-node ~bud)
|
||||||
|
~& > 'BUD DONE'
|
||||||
|
;< ~ bind:m (raw-real-ship:eth-node ~marbud)
|
||||||
|
~& > 'MARBUD DONE'
|
||||||
|
;< ~ bind:m (raw-real-ship:eth-node ~linnup-torsyx)
|
||||||
|
~& > 'LINNUP DONE'
|
||||||
|
;< ~ bind:m (raw-real-ship:eth-node ~linnup-torsyx-linnup-torsyx)
|
||||||
|
~& > 'MOON LINNUP DONE'
|
||||||
|
;< ~ bind:m (send-hi ~bud ~linnup-torsyx-linnup-torsyx)
|
||||||
|
~& > 'HI DOWN DONE'
|
||||||
|
;< ~ bind:m (send-hi ~linnup-torsyx-linnup-torsyx ~marbud)
|
||||||
|
~& > 'HI UP DONE'
|
||||||
|
:: ;< ~ bind:m (raw-real-ship:eth-node ~bud)
|
||||||
|
:: ~& > 'DEV DONE'
|
||||||
|
:: ;< ~ bind:m (send-hi ~linnup-torsyx-linnup-torsyx ~dev)
|
||||||
|
:: ~& > 'HI OVER UP DONE'
|
||||||
|
:: ;< ~ bind:m (send-hi ~dev ~linnup-torsyx-linnup-torsyx)
|
||||||
|
:: ~& > 'HI OVER DOWN DONE'
|
||||||
|
(pure:m ~)
|
||||||
|
(pure:m ~)
|
||||||
::
|
::
|
||||||
:+ %breach-hi
|
:+ %breach-hi
|
||||||
~[~bud ~dev]
|
~[~bud ~dev]
|
||||||
@ -145,9 +174,9 @@
|
|||||||
;< [eth-node=_eth-node ~] bind:m
|
;< [eth-node=_eth-node ~] bind:m
|
||||||
%+ (wrap-philter ,_eth-node ,~)
|
%+ (wrap-philter ,_eth-node ,~)
|
||||||
router:eth-node
|
router:eth-node
|
||||||
;< ~ bind:m (raw-ship ~bud `(dawn:eth-node ~bud))
|
;< ~ bind:m (raw-real-ship:eth-node ~bud)
|
||||||
~& > 'BUD DONE'
|
~& > 'BUD DONE'
|
||||||
;< ~ bind:m (raw-ship ~dev `(dawn:eth-node ~dev))
|
;< ~ bind:m (raw-real-ship:eth-node ~dev)
|
||||||
~& > 'DEV DONE'
|
~& > 'DEV DONE'
|
||||||
(send-hi ~bud ~dev)
|
(send-hi ~bud ~dev)
|
||||||
~& > 'HI DONE'
|
~& > 'HI DONE'
|
||||||
@ -159,7 +188,7 @@
|
|||||||
router:eth-node
|
router:eth-node
|
||||||
;< ~ bind:m (send-hi-not-responding ~bud ~dev)
|
;< ~ bind:m (send-hi-not-responding ~bud ~dev)
|
||||||
~& > 'HI NOT RESPONDING DONE'
|
~& > 'HI NOT RESPONDING DONE'
|
||||||
;< ~ bind:m (raw-ship ~dev `(dawn:eth-node ~dev))
|
;< ~ bind:m (raw-real-ship:eth-node ~dev)
|
||||||
~& > 'REBOOT DEV DONE'
|
~& > 'REBOOT DEV DONE'
|
||||||
(wait-for-dojo ~bud "hi ~dev successful")
|
(wait-for-dojo ~bud "hi ~dev successful")
|
||||||
~& > 'DONE'
|
~& > 'DONE'
|
||||||
@ -173,10 +202,10 @@
|
|||||||
;< [eth-node=_eth-node ~] bind:m
|
;< [eth-node=_eth-node ~] bind:m
|
||||||
%+ (wrap-philter ,_eth-node ,~)
|
%+ (wrap-philter ,_eth-node ,~)
|
||||||
router:eth-node
|
router:eth-node
|
||||||
;< ~ bind:m (raw-ship ~bud `(dawn:eth-node ~bud))
|
;< ~ bind:m (raw-real-ship:eth-node ~bud)
|
||||||
;< ~ bind:m (raw-ship ~dev `(dawn:eth-node ~dev))
|
;< ~ bind:m (raw-real-ship:eth-node ~dev)
|
||||||
;< ~ bind:m (raw-ship ~marbud `(dawn:eth-node ~marbud))
|
;< ~ bind:m (raw-real-ship:eth-node ~marbud)
|
||||||
;< ~ bind:m (raw-ship ~mardev `(dawn:eth-node ~mardev))
|
;< ~ bind:m (raw-real-ship:eth-node ~mardev)
|
||||||
(send-hi ~marbud ~mardev)
|
(send-hi ~marbud ~mardev)
|
||||||
;< eth-node=_eth-node bind:m
|
;< eth-node=_eth-node bind:m
|
||||||
(breach-and-hear:eth-node our.hid ~mardev ~marbud)
|
(breach-and-hear:eth-node our.hid ~mardev ~marbud)
|
||||||
@ -184,7 +213,7 @@
|
|||||||
%+ (wrap-philter ,_eth-node ,~)
|
%+ (wrap-philter ,_eth-node ,~)
|
||||||
router:eth-node
|
router:eth-node
|
||||||
;< ~ bind:m (send-hi-not-responding ~marbud ~mardev)
|
;< ~ bind:m (send-hi-not-responding ~marbud ~mardev)
|
||||||
;< ~ bind:m (raw-ship ~mardev `(dawn:eth-node ~mardev))
|
;< ~ bind:m (raw-real-ship:eth-node ~mardev)
|
||||||
(wait-for-dojo ~marbud "hi ~mardev successful")
|
(wait-for-dojo ~marbud "hi ~mardev successful")
|
||||||
(pure:m ~)
|
(pure:m ~)
|
||||||
::
|
::
|
||||||
@ -195,9 +224,9 @@
|
|||||||
;< [eth-node=_eth-node ~] bind:m
|
;< [eth-node=_eth-node ~] bind:m
|
||||||
%+ (wrap-philter ,_eth-node ,~)
|
%+ (wrap-philter ,_eth-node ,~)
|
||||||
router:eth-node
|
router:eth-node
|
||||||
;< ~ bind:m (raw-ship ~bud `(dawn:eth-node ~bud))
|
;< ~ bind:m (raw-real-ship:eth-node ~bud)
|
||||||
~& > 'BUD DONE'
|
~& > 'BUD DONE'
|
||||||
;< ~ bind:m (raw-ship ~marbud `(dawn:eth-node ~marbud))
|
;< ~ bind:m (raw-real-ship:eth-node ~marbud)
|
||||||
~& > 'MARBUD DONE'
|
~& > 'MARBUD DONE'
|
||||||
;< file=@t bind:m (touch-file ~bud %base)
|
;< file=@t bind:m (touch-file ~bud %base)
|
||||||
~& > 'TOUCH FILE DONE'
|
~& > 'TOUCH FILE DONE'
|
||||||
@ -209,7 +238,7 @@
|
|||||||
;< [eth-node=_eth-node ~] bind:m
|
;< [eth-node=_eth-node ~] bind:m
|
||||||
%+ (wrap-philter ,_eth-node ,~)
|
%+ (wrap-philter ,_eth-node ,~)
|
||||||
router:eth-node
|
router:eth-node
|
||||||
;< ~ bind:m (raw-ship ~bud `(dawn:eth-node ~bud))
|
;< ~ bind:m (raw-real-ship:eth-node ~bud)
|
||||||
~& > 'BUD RE DONE'
|
~& > 'BUD RE DONE'
|
||||||
;< ~ bind:m (just-events (dojo ~bud "|merge %base ~marbud %kids, =gem %this"))
|
;< ~ bind:m (just-events (dojo ~bud "|merge %base ~marbud %kids, =gem %this"))
|
||||||
~& > 'THIS MERGE STARTED DONE'
|
~& > 'THIS MERGE STARTED DONE'
|
||||||
@ -228,9 +257,9 @@
|
|||||||
;< [eth-node=_eth-node ~] bind:m
|
;< [eth-node=_eth-node ~] bind:m
|
||||||
%+ (wrap-philter ,_eth-node ,~)
|
%+ (wrap-philter ,_eth-node ,~)
|
||||||
router:eth-node
|
router:eth-node
|
||||||
;< ~ bind:m (raw-ship ~bud `(dawn:eth-node ~bud))
|
;< ~ bind:m (raw-real-ship:eth-node ~bud)
|
||||||
~& > 'BUD DONE'
|
~& > 'BUD DONE'
|
||||||
;< ~ bind:m (raw-ship ~marbud `(dawn:eth-node ~marbud))
|
;< ~ bind:m (raw-real-ship:eth-node ~marbud)
|
||||||
~& > 'MARBUD DONE'
|
~& > 'MARBUD DONE'
|
||||||
;< file=@t bind:m (touch-file ~bud %base)
|
;< file=@t bind:m (touch-file ~bud %base)
|
||||||
~& > 'TOUCH DONE'
|
~& > 'TOUCH DONE'
|
||||||
@ -241,7 +270,7 @@
|
|||||||
;< [eth-node=_eth-node ~] bind:m
|
;< [eth-node=_eth-node ~] bind:m
|
||||||
%+ (wrap-philter ,_eth-node ,~)
|
%+ (wrap-philter ,_eth-node ,~)
|
||||||
router:eth-node
|
router:eth-node
|
||||||
(raw-ship ~bud `(dawn:eth-node ~bud))
|
(raw-real-ship:eth-node ~bud)
|
||||||
~& > 'BUD RE DONE'
|
~& > 'BUD RE DONE'
|
||||||
;< eth-node=_eth-node bind:m
|
;< eth-node=_eth-node bind:m
|
||||||
(breach-and-hear:eth-node our.hid ~marbud ~bud)
|
(breach-and-hear:eth-node our.hid ~marbud ~bud)
|
||||||
@ -249,7 +278,7 @@
|
|||||||
;< [eth-node=_eth-node ~] bind:m
|
;< [eth-node=_eth-node ~] bind:m
|
||||||
%+ (wrap-philter ,_eth-node ,~)
|
%+ (wrap-philter ,_eth-node ,~)
|
||||||
router:eth-node
|
router:eth-node
|
||||||
;< ~ bind:m (raw-ship ~marbud `(dawn:eth-node ~marbud))
|
;< ~ bind:m (raw-real-ship:eth-node ~marbud)
|
||||||
~& > 'MARBUD RE DONE'
|
~& > 'MARBUD RE DONE'
|
||||||
;< file=@t bind:m (touch-file ~bud %base)
|
;< file=@t bind:m (touch-file ~bud %base)
|
||||||
~& > 'TOUCH-1 DONE'
|
~& > 'TOUCH-1 DONE'
|
||||||
@ -266,9 +295,9 @@
|
|||||||
;< [eth-node=_eth-node ~] bind:m
|
;< [eth-node=_eth-node ~] bind:m
|
||||||
%+ (wrap-philter ,_eth-node ,~)
|
%+ (wrap-philter ,_eth-node ,~)
|
||||||
router:eth-node
|
router:eth-node
|
||||||
;< ~ bind:m (raw-ship ~bud `(dawn:eth-node ~bud))
|
;< ~ bind:m (raw-real-ship:eth-node ~bud)
|
||||||
~& > 'BUD DONE'
|
~& > 'BUD DONE'
|
||||||
;< ~ bind:m (raw-ship ~marbud `(dawn:eth-node ~marbud))
|
;< ~ bind:m (raw-real-ship:eth-node ~marbud)
|
||||||
~& > 'MARBUD DONE'
|
~& > 'MARBUD DONE'
|
||||||
;< file=@t bind:m (touch-file ~bud %base)
|
;< file=@t bind:m (touch-file ~bud %base)
|
||||||
~& > 'TOUCH FILE DONE'
|
~& > 'TOUCH FILE DONE'
|
||||||
@ -279,7 +308,7 @@
|
|||||||
;< [eth-node=_eth-node ~] bind:m
|
;< [eth-node=_eth-node ~] bind:m
|
||||||
%+ (wrap-philter ,_eth-node ,~)
|
%+ (wrap-philter ,_eth-node ,~)
|
||||||
router:eth-node
|
router:eth-node
|
||||||
;< ~ bind:m (raw-ship ~bud `(dawn:eth-node ~bud))
|
;< ~ bind:m (raw-real-ship:eth-node ~bud)
|
||||||
~& > 'BUD RE DONE'
|
~& > 'BUD RE DONE'
|
||||||
;< ~ bind:m (just-events (dojo ~bud "|merge %base ~marbud %kids, =gem %this"))
|
;< ~ bind:m (just-events (dojo ~bud "|merge %base ~marbud %kids, =gem %this"))
|
||||||
~& > 'THIS MERGE STARTED DONE'
|
~& > 'THIS MERGE STARTED DONE'
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -66,9 +66,9 @@
|
|||||||
== ::
|
== ::
|
||||||
++ work :: interface action
|
++ work :: interface action
|
||||||
$% :: circle management ::
|
$% :: circle management ::
|
||||||
{$join (map circle range)} :: subscribe to
|
{$join (map circle range) (unit char)} :: subscribe to
|
||||||
{$leave audience} :: unsubscribe from
|
{$leave audience} :: unsubscribe from
|
||||||
{$create security name cord} :: create circle
|
{$create security name cord (unit char)} :: create circle
|
||||||
{$delete name (unit cord)} :: delete circle
|
{$delete name (unit cord)} :: delete circle
|
||||||
{$depict name cord} :: change description
|
{$depict name cord} :: change description
|
||||||
{$filter name ? ?} :: change message rules
|
{$filter name ? ?} :: change message rules
|
||||||
@ -838,14 +838,14 @@
|
|||||||
::
|
::
|
||||||
;~((glue ace) (perk %read ~) cire dem:ag)
|
;~((glue ace) (perk %read ~) cire dem:ag)
|
||||||
::
|
::
|
||||||
;~((glue ace) (perk %join ~) sorz)
|
;~((glue ace) (perk %join ~) ;~(plug sorz (punt ;~(pfix ace glyph))))
|
||||||
::
|
::
|
||||||
;~((glue ace) (perk %leave ~) cirs)
|
;~((glue ace) (perk %leave ~) cirs)
|
||||||
::
|
::
|
||||||
;~ (glue ace) (perk %create ~)
|
;~ (glue ace) (perk %create ~)
|
||||||
pore
|
pore
|
||||||
cire
|
cire
|
||||||
qut
|
;~(plug qut (punt ;~(pfix ace glyph)))
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
;~ plug (perk %delete ~)
|
;~ plug (perk %delete ~)
|
||||||
@ -1186,9 +1186,11 @@
|
|||||||
:: change local mailbox config to include
|
:: change local mailbox config to include
|
||||||
:: subscriptions to {pas}.
|
:: subscriptions to {pas}.
|
||||||
::
|
::
|
||||||
|= pos/(map circle range)
|
|= {pos/(map circle range) gyf/(unit char)}
|
||||||
^+ ..sh-work
|
^+ ..sh-work
|
||||||
=+ pas=~(key by pos)
|
=+ pas=~(key by pos)
|
||||||
|
=? ..sh-work ?=(^ gyf)
|
||||||
|
(bind u.gyf `pas)
|
||||||
=. ..sh-work
|
=. ..sh-work
|
||||||
sh-prod(active.she pas)
|
sh-prod(active.she pas)
|
||||||
:: default to a day of backlog
|
:: default to a day of backlog
|
||||||
@ -1226,11 +1228,11 @@
|
|||||||
::
|
::
|
||||||
:: creates circle {nom} with specified config.
|
:: creates circle {nom} with specified config.
|
||||||
::
|
::
|
||||||
|= {sec/security nom/name txt/cord}
|
|= {sec/security nom/name txt/cord gyf/(unit char)}
|
||||||
^+ ..sh-work
|
^+ ..sh-work
|
||||||
=. ..sh-work
|
=. ..sh-work
|
||||||
(sh-act %create nom txt sec)
|
(sh-act %create nom txt sec)
|
||||||
(join [[[self nom] ~] ~ ~])
|
(join [[[self nom] ~] ~ ~] gyf)
|
||||||
::
|
::
|
||||||
++ delete
|
++ delete
|
||||||
:: %delete
|
:: %delete
|
||||||
@ -1922,7 +1924,7 @@
|
|||||||
$(dif [%filter fit.cof.dif])
|
$(dif [%filter fit.cof.dif])
|
||||||
?: ?=($remove -.dif)
|
?: ?=($remove -.dif)
|
||||||
(sh-note (weld "rip " (~(cr-show cr cir) ~)))
|
(sh-note (weld "rip " (~(cr-show cr cir) ~)))
|
||||||
?: ?=($usage -.dif) +>
|
?: ?=(?($usage $read) -.dif) +>
|
||||||
%- sh-note
|
%- sh-note
|
||||||
%+ weld
|
%+ weld
|
||||||
(weld ~(cr-phat cr cir) ": ")
|
(weld ~(cr-phat cr cir) ": ")
|
||||||
@ -1933,9 +1935,6 @@
|
|||||||
::
|
::
|
||||||
$caption
|
$caption
|
||||||
"cap: {(trip cap.dif)}"
|
"cap: {(trip cap.dif)}"
|
||||||
::
|
|
||||||
$read
|
|
||||||
""
|
|
||||||
::
|
::
|
||||||
$filter
|
$filter
|
||||||
;: weld
|
;: weld
|
||||||
|
File diff suppressed because one or more lines are too long
@ -28,11 +28,10 @@
|
|||||||
%- produce
|
%- produce
|
||||||
:- %tang :_ ~
|
:- %tang :_ ~
|
||||||
leaf+"can't create keys for {(scow %p mon)}, which belongs to {(scow %p seg)}"
|
leaf+"can't create keys for {(scow %p mon)}, which belongs to {(scow %p seg)}"
|
||||||
=/ cub=acru:ames (pit:nu:crub:crypto 512 eny)
|
=/ lyf=life .^(@ud k+/(scot %p our)/life/(scot %da now)/(scot %p our))
|
||||||
=/ lyf=life .^(@ud j+/(scot %p our)/life/(scot %da now)/(scot %p our))
|
=/ sed=seed:able:kale
|
||||||
=/ sig=oath:pki:jael
|
.^ seed:able:kale
|
||||||
.^(@ j+/(scot %p our)/earl/(scot %da now)/(scot %p mon)/(scot %ud lyf)/(scot %ux pub:ex:cub))
|
k+/(scot %p our)/earl/(scot %da now)/(scot %p mon)/(scot %ud lyf)
|
||||||
=/ sed=seed:able:jael
|
==
|
||||||
[mon lyf sec:ex:cub `sig]
|
|
||||||
%+ print leaf+"moon: {(scow %p mon)}"
|
%+ print leaf+"moon: {(scow %p mon)}"
|
||||||
%- produce [%atom (scot %uw (jam sed))]
|
%- produce [%atom (scot %uw (jam sed))]
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
arg=$@(~ [top=path ~])
|
arg=$@(~ [top=path ~])
|
||||||
dub=_|
|
dub=_|
|
||||||
==
|
==
|
||||||
:- %noun
|
:- %pill
|
||||||
|
%- pill:pill
|
||||||
:: sys: root path to boot system, `/~me/[desk]/now/sys`
|
:: sys: root path to boot system, `/~me/[desk]/now/sys`
|
||||||
::
|
::
|
||||||
=/ sys=path
|
=/ sys=path
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
:: Mock Azimuth
|
:: Mock Azimuth
|
||||||
::
|
::
|
||||||
/+ ph, ph-util, ph-philter
|
/+ ph, ph-util, ph-philter, ph-tests
|
||||||
=, ph
|
=, ph
|
||||||
=, ph-util
|
=, ph-util
|
||||||
=, ph-philter
|
=, ph-philter
|
||||||
|
|= our=ship
|
||||||
=> |%
|
=> |%
|
||||||
+$ az-log [topics=(lest @) data=@t]
|
+$ az-log [topics=(lest @) data=@t]
|
||||||
--
|
--
|
||||||
@ -252,8 +253,17 @@
|
|||||||
--
|
--
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
++ dawn
|
++ raw-real-ship
|
||||||
|= who=ship
|
|= who=ship
|
||||||
|
=/ m (ph ,~)
|
||||||
|
^- form:m
|
||||||
|
;< now=@da bind:m
|
||||||
|
|= pin=ph-input
|
||||||
|
[& ~ %done now.pin]
|
||||||
|
(raw-ship:(ph-tests our) who `(dawn who now))
|
||||||
|
::
|
||||||
|
++ dawn
|
||||||
|
|= [who=ship now=@da]
|
||||||
^- dawn-event
|
^- dawn-event
|
||||||
=/ spon
|
=/ spon
|
||||||
=/ =ship (^sein:title who)
|
=/ =ship (^sein:title who)
|
||||||
@ -261,7 +271,7 @@
|
|||||||
?: ?=(%czar (clan:title ship))
|
?: ?=(%czar (clan:title ship))
|
||||||
[| ~zod]
|
[| ~zod]
|
||||||
[& (^sein:title ship)]
|
[& (^sein:title ship)]
|
||||||
=/ life-rift (~(got by lives) ship)
|
=/ life-rift ~|([ship lives] (~(got by lives) ship))
|
||||||
=/ =life lyfe.life-rift
|
=/ =life lyfe.life-rift
|
||||||
=/ =rift rut.life-rift
|
=/ =rift rut.life-rift
|
||||||
=/ =pass
|
=/ =pass
|
||||||
@ -269,13 +279,23 @@
|
|||||||
(as-octs:mimes:html (get-public ship life %crypt))
|
(as-octs:mimes:html (get-public ship life %crypt))
|
||||||
(as-octs:mimes:html (get-public ship life %auth))
|
(as-octs:mimes:html (get-public ship life %auth))
|
||||||
1
|
1
|
||||||
:^ ship
|
:^ ship=ship
|
||||||
*[address address address address]:azimuth
|
*[address address address address]:azimuth
|
||||||
`[life pass rift spon-spon ~]
|
`[life=life pass rift spon-spon ~]
|
||||||
~
|
~
|
||||||
=/ life-rift (~(got by lives) who)
|
=/ =seed:able:kale
|
||||||
=/ =life lyfe.life-rift
|
?: =(%earl (clan:title who))
|
||||||
:* [who life sec:ex:(get-keys who life) ~]
|
=/ pax
|
||||||
|
;: weld
|
||||||
|
/i/(scot %p ship.spon)/k/(scot %p ship.spon)/earl/(scot %da now)
|
||||||
|
/(scot %p who)/(scot %ud life.spon)
|
||||||
|
/noun
|
||||||
|
==
|
||||||
|
(need (scry-aqua (unit seed:able:kale) our now pax))
|
||||||
|
=/ life-rift (~(got by lives) who)
|
||||||
|
=/ =life lyfe.life-rift
|
||||||
|
[who life sec:ex:(get-keys who life) ~]
|
||||||
|
:* seed
|
||||||
spon
|
spon
|
||||||
get-czars
|
get-czars
|
||||||
~[~['arvo' 'netw' 'ork']]
|
~[~['arvo' 'netw' 'ork']]
|
||||||
@ -338,7 +358,7 @@
|
|||||||
:+ & ~
|
:+ & ~
|
||||||
=/ aqua-pax
|
=/ aqua-pax
|
||||||
:- %i
|
:- %i
|
||||||
/(scot %p her)/j/(scot %p her)/life/(scot %da now.pin)/(scot %p who)/noun
|
/(scot %p her)/k/(scot %p her)/life/(scot %da now.pin)/(scot %p who)/noun
|
||||||
=/ lyfe (scry-aqua noun our now.pin aqua-pax)
|
=/ lyfe (scry-aqua noun our now.pin aqua-pax)
|
||||||
~& [new-lyfe=[0 new-lyfe] lyfe=lyfe]
|
~& [new-lyfe=[0 new-lyfe] lyfe=lyfe]
|
||||||
?: =([~ new-lyfe] lyfe)
|
?: =([~ new-lyfe] lyfe)
|
||||||
@ -395,7 +415,14 @@
|
|||||||
%- add-logs
|
%- add-logs
|
||||||
:_ ~
|
:_ ~
|
||||||
(broke-continuity:lo who rut)
|
(broke-continuity:lo who rut)
|
||||||
?:((~(has by lives) ~fes) (cycle-keys ~fes) (spawn ~fes))
|
(spam-logs 30)
|
||||||
|
::
|
||||||
|
++ spam-logs
|
||||||
|
|= n=@
|
||||||
|
?: =(n 0)
|
||||||
|
this-az
|
||||||
|
=. this-az ?:((~(has by lives) ~fes) (cycle-keys ~fes) (spawn ~fes))
|
||||||
|
$(n (dec n))
|
||||||
::
|
::
|
||||||
++ get-keys
|
++ get-keys
|
||||||
|= [who=@p lyfe=life]
|
|= [who=@p lyfe=life]
|
||||||
|
@ -6,6 +6,27 @@
|
|||||||
::
|
::
|
||||||
:: sys: full path to /sys directory
|
:: sys: full path to /sys directory
|
||||||
::
|
::
|
||||||
|
+$ pill
|
||||||
|
[boot-ova=* kernel-ova=(list unix-event) userspace-ova=(list unix-event)]
|
||||||
|
::
|
||||||
|
+$ unix-event
|
||||||
|
%+ pair wire
|
||||||
|
$% [%wack p=@]
|
||||||
|
[%whom p=ship]
|
||||||
|
[%boot $%([%fake p=ship] [%dawn p=dawn-event])]
|
||||||
|
unix-task
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ dawn-event
|
||||||
|
$: =seed:able:jael
|
||||||
|
spon=[=ship point:azimuth]
|
||||||
|
czar=(map ship [=rift =life =pass])
|
||||||
|
turf=(list turf)
|
||||||
|
bloq=@ud
|
||||||
|
node=(unit purl:eyre)
|
||||||
|
snap=(unit snapshot:jael)
|
||||||
|
==
|
||||||
|
::
|
||||||
++ module-ova
|
++ module-ova
|
||||||
|= sys=path
|
|= sys=path
|
||||||
^- (list [wire [%veer term path cord]])
|
^- (list [wire [%veer term path cord]])
|
||||||
|
@ -35,6 +35,8 @@
|
|||||||
;~(pfix col (more net (cook crip (star ;~(less net prn)))))
|
;~(pfix col (more net (cook crip (star ;~(less net prn)))))
|
||||||
==
|
==
|
||||||
listen-api+(su ;~(plug sym ;~(pfix col sym)))
|
listen-api+(su ;~(plug sym ;~(pfix col sym)))
|
||||||
|
export+so
|
||||||
|
import+(ot app+so base64-jam+so ~)
|
||||||
as+(ot mark+(su sym) next+source ~)
|
as+(ot mark+(su sym) next+source ~)
|
||||||
hoon+(ot code+so next+source ~)
|
hoon+(ot code+so next+source ~)
|
||||||
==
|
==
|
||||||
|
@ -10,12 +10,18 @@
|
|||||||
:: Short names are simply the first letter of each word plus `s` if
|
:: Short names are simply the first letter of each word plus `s` if
|
||||||
:: it's a list.
|
:: it's a list.
|
||||||
::
|
::
|
||||||
|
/+ pill
|
||||||
|
=, pill-lib=pill
|
||||||
|%
|
|%
|
||||||
++ ph-event
|
++ ph-event
|
||||||
$% [%test-done p=?]
|
$% [%test-done p=?]
|
||||||
aqua-event
|
aqua-event
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
+$ unix-event unix-event:pill-lib
|
||||||
|
+$ dawn-event dawn-event:pill-lib
|
||||||
|
+$ pill pill:pill-lib
|
||||||
|
::
|
||||||
+$ aqua-event
|
+$ aqua-event
|
||||||
$% [%init-ship who=ship keys=(unit dawn-event)]
|
$% [%init-ship who=ship keys=(unit dawn-event)]
|
||||||
[%pause-events who=ship]
|
[%pause-events who=ship]
|
||||||
@ -40,14 +46,6 @@
|
|||||||
::
|
::
|
||||||
+$ unix-timed-event [tym=@da ue=unix-event]
|
+$ unix-timed-event [tym=@da ue=unix-event]
|
||||||
::
|
::
|
||||||
+$ unix-event
|
|
||||||
%+ pair wire
|
|
||||||
$% [%wack p=@]
|
|
||||||
[%whom p=ship]
|
|
||||||
[%boot $%([%fake p=ship] [%dawn p=dawn-event])]
|
|
||||||
unix-task
|
|
||||||
==
|
|
||||||
::
|
|
||||||
+$ unix-effect
|
+$ unix-effect
|
||||||
%+ pair wire
|
%+ pair wire
|
||||||
$% [%blit p=(list blit:dill)]
|
$% [%blit p=(list blit:dill)]
|
||||||
@ -60,19 +58,6 @@
|
|||||||
[%init ~]
|
[%init ~]
|
||||||
[%request id=@ud request=request:http]
|
[%request id=@ud request=request:http]
|
||||||
==
|
==
|
||||||
+$ pill
|
|
||||||
[boot-ova=* kernel-ova=(list unix-event) userspace-ova=(list unix-event)]
|
|
||||||
::
|
|
||||||
+$ dawn-event
|
|
||||||
$: =seed:able:jael
|
|
||||||
spon=[=ship point:azimuth]
|
|
||||||
czar=(map ship [=rift =life =pass])
|
|
||||||
turf=(list turf)
|
|
||||||
bloq=@ud
|
|
||||||
node=(unit purl:eyre)
|
|
||||||
snap=(unit snapshot:jael)
|
|
||||||
==
|
|
||||||
::
|
|
||||||
+$ vane-move
|
+$ vane-move
|
||||||
%+ pair bone
|
%+ pair bone
|
||||||
$% [%peer wire dock path]
|
$% [%peer wire dock path]
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
{$hoon code/@t next/source} :: end since they
|
{$hoon code/@t next/source} :: end since they
|
||||||
{$tuple next/(list source)} :: don't bunt well
|
{$tuple next/(list source)} :: don't bunt well
|
||||||
{$listen-api api/term event/term}
|
{$listen-api api/term event/term}
|
||||||
|
{$export app/@t}
|
||||||
|
{$import app/@t base64-jam/@t}
|
||||||
==
|
==
|
||||||
++ sink
|
++ sink
|
||||||
$% {$stdout ~}
|
$% {$stdout ~}
|
||||||
|
@ -262,11 +262,10 @@
|
|||||||
:: +load: migrate an old state to a new behn version
|
:: +load: migrate an old state to a new behn version
|
||||||
::
|
::
|
||||||
++ load
|
++ load
|
||||||
|= old=*
|
|= old=behn-state
|
||||||
^+ behn-gate
|
^+ behn-gate
|
||||||
::
|
::
|
||||||
~| %behn-load-fail
|
behn-gate(state old)
|
||||||
behn-gate(state ;;(behn-state old))
|
|
||||||
:: +scry: view timer state
|
:: +scry: view timer state
|
||||||
::
|
::
|
||||||
:: TODO: not referentially transparent w.r.t. elapsed timers,
|
:: TODO: not referentially transparent w.r.t. elapsed timers,
|
||||||
|
@ -4525,18 +4525,12 @@
|
|||||||
::
|
::
|
||||||
?: ?=([%sinks ~] tea)
|
?: ?=([%sinks ~] tea)
|
||||||
?> ?=(%public-keys +<.q.hin)
|
?> ?=(%public-keys +<.q.hin)
|
||||||
~& 'XXX'
|
|
||||||
~& our=our
|
|
||||||
?: ?=(%full -.public-keys-result.q.hin)
|
?: ?=(%full -.public-keys-result.q.hin)
|
||||||
~& %clay-sinks-full
|
|
||||||
[~ ..^$]
|
[~ ..^$]
|
||||||
?. ?=(%rift -.diff.public-keys-result.q.hin)
|
?. ?=(%rift -.diff.public-keys-result.q.hin)
|
||||||
[~ ..^$]
|
[~ ..^$]
|
||||||
~& rift=public-keys-result.q.hin
|
|
||||||
=/ who who.public-keys-result.q.hin
|
=/ who who.public-keys-result.q.hin
|
||||||
=/ to-rift to.diff.public-keys-result.q.hin
|
=/ to-rift to.diff.public-keys-result.q.hin
|
||||||
~& desks=(turn ~(tap by dos.rom.ruf) head)
|
|
||||||
~& hoy=(turn ~(tap by hoy.ruf) head)
|
|
||||||
::
|
::
|
||||||
?: =(our who)
|
?: =(our who)
|
||||||
[~ ..^$]
|
[~ ..^$]
|
||||||
@ -4545,11 +4539,8 @@
|
|||||||
=/ foreign-desk=(unit rung)
|
=/ foreign-desk=(unit rung)
|
||||||
(~(get by hoy.ruf) who)
|
(~(get by hoy.ruf) who)
|
||||||
?~ foreign-desk
|
?~ foreign-desk
|
||||||
~& [%never-heard-of-her who]
|
|
||||||
[~ ..^$]
|
[~ ..^$]
|
||||||
~& old-rift=rit.u.foreign-desk
|
|
||||||
?: (gte rit.u.foreign-desk to-rift)
|
?: (gte rit.u.foreign-desk to-rift)
|
||||||
~& 'replaying sunk, so not clearing state'
|
|
||||||
[~ ..^$]
|
[~ ..^$]
|
||||||
=/ cancel-ducts=(list duct)
|
=/ cancel-ducts=(list duct)
|
||||||
%- zing ^- (list (list duct))
|
%- zing ^- (list (list duct))
|
||||||
|
@ -802,7 +802,7 @@
|
|||||||
::
|
::
|
||||||
:_ state
|
:_ state
|
||||||
:_ ~
|
:_ ~
|
||||||
:^ duct %pass /run-app/[app.act]
|
:^ duct %pass /run-app-request/[app.act]
|
||||||
^- note
|
^- note
|
||||||
:^ %g %deal [our our]
|
:^ %g %deal [our our]
|
||||||
::
|
::
|
||||||
@ -847,7 +847,7 @@
|
|||||||
%app
|
%app
|
||||||
:_ state
|
:_ state
|
||||||
:_ ~
|
:_ ~
|
||||||
:^ duct %pass /run-app/[app.action]
|
:^ duct %pass /run-app-request/[app.action]
|
||||||
^- note
|
^- note
|
||||||
:^ %g %deal [our our]
|
:^ %g %deal [our our]
|
||||||
:: todo: i don't entirely understand gall; there's a way to make a gall
|
:: todo: i don't entirely understand gall; there's a way to make a gall
|
||||||
@ -892,12 +892,9 @@
|
|||||||
%app
|
%app
|
||||||
:_ state
|
:_ state
|
||||||
:_ ~
|
:_ ~
|
||||||
:^ duct %pass /run-app/[app.action.u.connection]
|
:^ duct %pass /run-app-cancel/[app.action.u.connection]
|
||||||
^- note
|
^- note
|
||||||
:^ %g %deal [our our]
|
:^ %g %deal [our our]
|
||||||
:: todo: i don't entirely understand gall; there's a way to make a gall
|
|
||||||
:: use a %handle arm instead of a sub-%poke with the
|
|
||||||
:: %handle-http-request type.
|
|
||||||
::
|
::
|
||||||
^- cush:gall
|
^- cush:gall
|
||||||
:* app.action.u.connection
|
:* app.action.u.connection
|
||||||
@ -2029,13 +2026,14 @@
|
|||||||
?+ i.wire
|
?+ i.wire
|
||||||
~|([%bad-take-wire wire] !!)
|
~|([%bad-take-wire wire] !!)
|
||||||
::
|
::
|
||||||
%run-app run-app
|
%run-app-request run-app-request
|
||||||
%run-build run-build
|
%run-app-cancel run-app-cancel
|
||||||
%channel channel
|
%run-build run-build
|
||||||
%acme acme-ack
|
%channel channel
|
||||||
|
%acme acme-ack
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ run-app
|
++ run-app-request
|
||||||
::
|
::
|
||||||
?> ?=([%g %unto *] sign)
|
?> ?=([%g %unto *] sign)
|
||||||
::
|
::
|
||||||
@ -2060,6 +2058,18 @@
|
|||||||
=^ moves server-state.ax (handle-response http-event.p.sign)
|
=^ moves server-state.ax (handle-response http-event.p.sign)
|
||||||
[moves http-server-gate]
|
[moves http-server-gate]
|
||||||
::
|
::
|
||||||
|
++ run-app-cancel
|
||||||
|
::
|
||||||
|
?> ?=([%g %unto *] sign)
|
||||||
|
::
|
||||||
|
:: we explicitly don't care about the return value of a
|
||||||
|
:: %handle-http-cancel. It is purely a notification and we don't care if
|
||||||
|
:: it succeeds or not. The user might not have implemented
|
||||||
|
:: +poke-handle-http-cancel or it might have crashed, but since it's a
|
||||||
|
:: notification, we don't don't care about its return value.
|
||||||
|
::
|
||||||
|
[~ http-server-gate]
|
||||||
|
::
|
||||||
++ run-build
|
++ run-build
|
||||||
::
|
::
|
||||||
?> ?=([%f %made *] sign)
|
?> ?=([%f %made *] sign)
|
||||||
|
@ -252,6 +252,7 @@
|
|||||||
%dawn
|
%dawn
|
||||||
:: single-homed
|
:: single-homed
|
||||||
::
|
::
|
||||||
|
~| [our who.seed.tac]
|
||||||
?> =(our who.seed.tac)
|
?> =(our who.seed.tac)
|
||||||
:: save our boot block
|
:: save our boot block
|
||||||
::
|
::
|
||||||
@ -742,6 +743,8 @@
|
|||||||
^- (unit [spon=ship child=ship])
|
^- (unit [spon=ship child=ship])
|
||||||
?. =(%earl (clan:title who))
|
?. =(%earl (clan:title who))
|
||||||
~
|
~
|
||||||
|
?: (~(has by ship-sources) who)
|
||||||
|
~
|
||||||
`[(^sein:title who) who]
|
`[(^sein:title who) who]
|
||||||
=/ moonl=(list [spon=ship ships=(set ship)])
|
=/ moonl=(list [spon=ship ships=(set ship)])
|
||||||
~(tap by moons)
|
~(tap by moons)
|
||||||
@ -751,6 +754,8 @@
|
|||||||
?. =(our spon.i.moonl)
|
?. =(our spon.i.moonl)
|
||||||
=. ..feed (sources:feel ships.i.moonl [%& spon.i.moonl])
|
=. ..feed (sources:feel ships.i.moonl [%& spon.i.moonl])
|
||||||
$(moonl t.moonl)
|
$(moonl t.moonl)
|
||||||
|
:: Our moon
|
||||||
|
::
|
||||||
=/ sec (~(got by jaw.own.pki) lyf.own.pki)
|
=/ sec (~(got by jaw.own.pki) lyf.own.pki)
|
||||||
=/ points=(map ship point)
|
=/ points=(map ship point)
|
||||||
=/ our-moonl ~(tap in ships.i.moonl)
|
=/ our-moonl ~(tap in ships.i.moonl)
|
||||||
@ -758,8 +763,8 @@
|
|||||||
|- ^- (list [ship point])
|
|- ^- (list [ship point])
|
||||||
?~ our-moonl
|
?~ our-moonl
|
||||||
~
|
~
|
||||||
=/ moon-sec (shaf %earl (sham our lyf.own.pki i.our-moonl))
|
=/ moon-sec (shaf %earl (sham our lyf.own.pki sec i.our-moonl))
|
||||||
=/ cub (nol:nu:crub:crypto moon-sec)
|
=/ cub (pit:nu:crub:crypto 128 moon-sec)
|
||||||
=/ =pass pub:ex:cub
|
=/ =pass pub:ex:cub
|
||||||
:- [i.our-moonl 1 1 (malt [1 1 pass] ~) `our]
|
:- [i.our-moonl 1 1 (malt [1 1 pass] ~) `our]
|
||||||
$(our-moonl t.our-moonl)
|
$(our-moonl t.our-moonl)
|
||||||
@ -959,12 +964,12 @@
|
|||||||
++ load :: upgrade
|
++ load :: upgrade
|
||||||
|= $: :: old: previous state
|
|= $: :: old: previous state
|
||||||
::
|
::
|
||||||
old/*
|
:: old/*
|
||||||
:: old/state
|
old/state
|
||||||
==
|
==
|
||||||
^+ ..^$
|
^+ ..^$
|
||||||
..^$
|
:: ..^$
|
||||||
:: ..^$(lex old)
|
..^$(lex old)
|
||||||
:: :: ++scry
|
:: :: ++scry
|
||||||
++ scry :: inspect
|
++ scry :: inspect
|
||||||
|= $: :: fur: event security
|
|= $: :: fur: event security
|
||||||
@ -1076,15 +1081,13 @@
|
|||||||
!> [u.lyf pass.u.pas ~]
|
!> [u.lyf pass.u.pas ~]
|
||||||
::
|
::
|
||||||
%earl
|
%earl
|
||||||
?. ?=([@ @ @ ~] tyl) [~ ~]
|
?. ?=([@ @ ~] tyl) [~ ~]
|
||||||
?. =([%& our] why)
|
?. =([%& our] why)
|
||||||
[~ ~]
|
[~ ~]
|
||||||
=/ who (slaw %p i.tyl)
|
=/ who (slaw %p i.tyl)
|
||||||
=/ lyf (slaw %ud i.t.tyl)
|
=/ lyf (slaw %ud i.t.tyl)
|
||||||
=/ pub (slaw %ux i.t.t.tyl)
|
|
||||||
?~ who [~ ~]
|
?~ who [~ ~]
|
||||||
?~ lyf [~ ~]
|
?~ lyf [~ ~]
|
||||||
?~ pub [~ ~]
|
|
||||||
?: (gth u.lyf lyf.own.pki.lex)
|
?: (gth u.lyf lyf.own.pki.lex)
|
||||||
~
|
~
|
||||||
?: (lth u.lyf lyf.own.pki.lex)
|
?: (lth u.lyf lyf.own.pki.lex)
|
||||||
@ -1092,9 +1095,10 @@
|
|||||||
:: XX check that who/lyf hasn't been booted
|
:: XX check that who/lyf hasn't been booted
|
||||||
::
|
::
|
||||||
=/ sec (~(got by jaw.own.pki.lex) u.lyf)
|
=/ sec (~(got by jaw.own.pki.lex) u.lyf)
|
||||||
=/ cub (nol:nu:crub:crypto sec)
|
=/ moon-sec (shaf %earl (sham our u.lyf sec u.who))
|
||||||
=/ sig (sign:as:cub (shaf %earl (sham u.who u.lyf u.pub)))
|
=/ cub (pit:nu:crub:crypto 128 moon-sec)
|
||||||
``[%atom !>(sig)]
|
=/ =seed [u.who 1 sec:ex:cub ~]
|
||||||
|
``[%seed !>(seed)]
|
||||||
::
|
::
|
||||||
%sein
|
%sein
|
||||||
?. ?=([@ ~] tyl) [~ ~]
|
?. ?=([@ ~] tyl) [~ ~]
|
||||||
|
37
pkg/arvo/tests/sys/hoon/vases.hoon
Normal file
37
pkg/arvo/tests/sys/hoon/vases.hoon
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/+ *test
|
||||||
|
|%
|
||||||
|
++ test-slam-wa-dry ^- tang
|
||||||
|
::
|
||||||
|
%+ expect-eq
|
||||||
|
!>(7)
|
||||||
|
-:(~(slam wa *worm) !>(add) !>([3 4]))
|
||||||
|
:: +test-slam-wa-wet: does +slam:wa perform correct wet type inference?
|
||||||
|
::
|
||||||
|
:: Also test that the cache doesn't gain any new entries when given a
|
||||||
|
:: sample of a previously seen type.
|
||||||
|
::
|
||||||
|
++ test-slam-wa-wet ^- tang
|
||||||
|
:: use the same .list-type for both calls
|
||||||
|
::
|
||||||
|
:: Types defined on different lines won't be noun-equal, and so
|
||||||
|
:: won't test that the cache kicked in on the second entry.
|
||||||
|
::
|
||||||
|
=/ list-type=type -:!>(*(list @))
|
||||||
|
=| worm0=worm
|
||||||
|
=+ [res1 worm1]=(~(slam wa worm0) !>(flop) [list-type ~[1 2 3]])
|
||||||
|
=+ [res2 worm2]=(~(slam wa worm1) !>(flop) [list-type ~[4 5 6]])
|
||||||
|
::
|
||||||
|
;: weld
|
||||||
|
%+ expect-eq
|
||||||
|
res1
|
||||||
|
[list-type ~[3 2 1]]
|
||||||
|
::
|
||||||
|
%+ expect-eq
|
||||||
|
res2
|
||||||
|
[list-type ~[6 5 4]]
|
||||||
|
::
|
||||||
|
%+ expect-eq
|
||||||
|
!> worm1
|
||||||
|
!> worm2
|
||||||
|
==
|
||||||
|
--
|
@ -272,7 +272,7 @@
|
|||||||
(expect-eq !>(~[/http-blah]) !>(duct))
|
(expect-eq !>(~[/http-blah]) !>(duct))
|
||||||
::
|
::
|
||||||
%+ expect-gall-deal
|
%+ expect-gall-deal
|
||||||
:+ /run-app/app1 [~nul ~nul]
|
:+ /run-app-request/app1 [~nul ~nul]
|
||||||
^- cush:gall
|
^- cush:gall
|
||||||
:* %app1 %poke %handle-http-request
|
:* %app1 %poke %handle-http-request
|
||||||
!>([%.n %.n [%ipv4 .192.168.1.1] [%'GET' '/' ~ ~]])
|
!>([%.n %.n [%ipv4 .192.168.1.1] [%'GET' '/' ~ ~]])
|
||||||
@ -287,7 +287,7 @@
|
|||||||
now=~1111.1.4
|
now=~1111.1.4
|
||||||
scry=scry-provides-code
|
scry=scry-provides-code
|
||||||
^= take-args
|
^= take-args
|
||||||
:* wire=/run-app/app1 duct=~[/http-blah]
|
:* wire=/run-app-request/app1 duct=~[/http-blah]
|
||||||
^- (hypo sign:http-server-gate)
|
^- (hypo sign:http-server-gate)
|
||||||
:- *type
|
:- *type
|
||||||
:* %g %unto %http-response
|
:* %g %unto %http-response
|
||||||
@ -359,7 +359,7 @@
|
|||||||
(expect-eq !>(~[/http-blah]) !>(duct))
|
(expect-eq !>(~[/http-blah]) !>(duct))
|
||||||
::
|
::
|
||||||
%+ expect-gall-deal
|
%+ expect-gall-deal
|
||||||
:+ /run-app/app1 [~nul ~nul]
|
:+ /run-app-request/app1 [~nul ~nul]
|
||||||
^- cush:gall
|
^- cush:gall
|
||||||
:* %app1 %poke %handle-http-request
|
:* %app1 %poke %handle-http-request
|
||||||
!>([%.n %.n [%ipv4 .192.168.1.1] [%'GET' '/' ~ ~]])
|
!>([%.n %.n [%ipv4 .192.168.1.1] [%'GET' '/' ~ ~]])
|
||||||
@ -374,7 +374,7 @@
|
|||||||
now=~1111.1.4
|
now=~1111.1.4
|
||||||
scry=scry-provides-code
|
scry=scry-provides-code
|
||||||
^= take-args
|
^= take-args
|
||||||
:* wire=/run-app/app1 duct=~[/http-blah]
|
:* wire=/run-app-request/app1 duct=~[/http-blah]
|
||||||
^- (hypo sign:http-server-gate)
|
^- (hypo sign:http-server-gate)
|
||||||
:- *type
|
:- *type
|
||||||
:* %g %unto %coup ~
|
:* %g %unto %coup ~
|
||||||
@ -449,7 +449,7 @@
|
|||||||
(expect-eq !>(~[/http-blah]) !>(duct))
|
(expect-eq !>(~[/http-blah]) !>(duct))
|
||||||
::
|
::
|
||||||
%+ expect-gall-deal
|
%+ expect-gall-deal
|
||||||
:+ /run-app/app1 [~nul ~nul]
|
:+ /run-app-request/app1 [~nul ~nul]
|
||||||
^- cush:gall
|
^- cush:gall
|
||||||
:* %app1 %poke %handle-http-request
|
:* %app1 %poke %handle-http-request
|
||||||
!>([%.n %.n [%ipv4 .192.168.1.1] [%'GET' '/' ~ ~]])
|
!>([%.n %.n [%ipv4 .192.168.1.1] [%'GET' '/' ~ ~]])
|
||||||
@ -464,7 +464,7 @@
|
|||||||
now=~1111.1.4
|
now=~1111.1.4
|
||||||
scry=scry-provides-code
|
scry=scry-provides-code
|
||||||
^= take-args
|
^= take-args
|
||||||
:* wire=/run-app/app1 duct=~[/http-blah]
|
:* wire=/run-app-request/app1 duct=~[/http-blah]
|
||||||
^- (hypo sign:http-server-gate) :- *type
|
^- (hypo sign:http-server-gate) :- *type
|
||||||
:* %g %unto %http-response
|
:* %g %unto %http-response
|
||||||
%start
|
%start
|
||||||
@ -485,7 +485,7 @@
|
|||||||
now=~1111.1.4
|
now=~1111.1.4
|
||||||
scry=scry-provides-code
|
scry=scry-provides-code
|
||||||
^= take-args
|
^= take-args
|
||||||
:* wire=/run-app/app1 duct=~[/http-blah]
|
:* wire=/run-app-request/app1 duct=~[/http-blah]
|
||||||
^- (hypo sign:http-server-gate) :- *type
|
^- (hypo sign:http-server-gate) :- *type
|
||||||
:* %g %unto %http-response
|
:* %g %unto %http-response
|
||||||
[%continue [~ (as-octs:mimes:html 'ya!')] %.y]
|
[%continue [~ (as-octs:mimes:html 'ya!')] %.y]
|
||||||
@ -556,7 +556,7 @@
|
|||||||
(expect-eq !>(~[/http-blah]) !>(duct))
|
(expect-eq !>(~[/http-blah]) !>(duct))
|
||||||
::
|
::
|
||||||
%+ expect-gall-deal
|
%+ expect-gall-deal
|
||||||
:+ /run-app/app1 [~nul ~nul]
|
:+ /run-app-request/app1 [~nul ~nul]
|
||||||
^- cush:gall
|
^- cush:gall
|
||||||
:* %app1 %poke %handle-http-request
|
:* %app1 %poke %handle-http-request
|
||||||
!>([%.n %.n [%ipv4 .192.168.1.1] [%'GET' '/~landscape/inner-path' ~ ~]])
|
!>([%.n %.n [%ipv4 .192.168.1.1] [%'GET' '/~landscape/inner-path' ~ ~]])
|
||||||
@ -571,7 +571,7 @@
|
|||||||
now=~1111.1.4
|
now=~1111.1.4
|
||||||
scry=scry-provides-code
|
scry=scry-provides-code
|
||||||
^= take-args
|
^= take-args
|
||||||
:* wire=/run-app/app1 duct=~[/http-blah]
|
:* wire=/run-app-request/app1 duct=~[/http-blah]
|
||||||
^- (hypo sign:http-server-gate) :- *type
|
^- (hypo sign:http-server-gate) :- *type
|
||||||
:* %g %unto %http-response
|
:* %g %unto %http-response
|
||||||
[%start [307 ['location' '/~/login?redirect=/~landscape/inner-path']~] ~ %.y]
|
[%start [307 ['location' '/~/login?redirect=/~landscape/inner-path']~] ~ %.y]
|
||||||
@ -624,7 +624,7 @@
|
|||||||
:: expect authenticated=%.y in the handle below
|
:: expect authenticated=%.y in the handle below
|
||||||
::
|
::
|
||||||
%+ expect-gall-deal
|
%+ expect-gall-deal
|
||||||
:+ /run-app/app1 [~nul ~nul]
|
:+ /run-app-request/app1 [~nul ~nul]
|
||||||
^- cush:gall
|
^- cush:gall
|
||||||
:* %app1 %poke %handle-http-request
|
:* %app1 %poke %handle-http-request
|
||||||
!> :*
|
!> :*
|
||||||
@ -1814,7 +1814,7 @@
|
|||||||
(expect-eq !>(~[/http-blah]) !>(duct))
|
(expect-eq !>(~[/http-blah]) !>(duct))
|
||||||
::
|
::
|
||||||
%+ expect-gall-deal
|
%+ expect-gall-deal
|
||||||
:+ /run-app/app1 [~nul ~nul]
|
:+ /run-app-request/app1 [~nul ~nul]
|
||||||
^- cush:gall
|
^- cush:gall
|
||||||
:* %app1 %poke %handle-http-request
|
:* %app1 %poke %handle-http-request
|
||||||
!>([%.n %.n [%ipv4 .192.168.1.1] [%'GET' '/' ~ ~]])
|
!>([%.n %.n [%ipv4 .192.168.1.1] [%'GET' '/' ~ ~]])
|
||||||
@ -1848,19 +1848,38 @@
|
|||||||
(expect-eq !>(~[/http-blah]) !>(duct))
|
(expect-eq !>(~[/http-blah]) !>(duct))
|
||||||
::
|
::
|
||||||
%+ expect-gall-deal
|
%+ expect-gall-deal
|
||||||
:+ /run-app/app1 [~nul ~nul]
|
:+ /run-app-cancel/app1 [~nul ~nul]
|
||||||
^- cush:gall
|
^- cush:gall
|
||||||
:* %app1 %poke %handle-http-cancel
|
:* %app1 %poke %handle-http-cancel
|
||||||
!>([%.n %.n [%ipv4 .192.168.1.1] [%'GET' '/' ~ ~]])
|
!>([%.n %.n [%ipv4 .192.168.1.1] [%'GET' '/' ~ ~]])
|
||||||
==
|
==
|
||||||
card
|
card
|
||||||
==
|
==
|
||||||
|
:: app1 doesn't have a %handle-http-cancel arm, but that's fine and doesn't
|
||||||
|
:: crash eyre when it sends its error coup back because we take no action on
|
||||||
|
:: the response to handle-http-cancel.
|
||||||
|
::
|
||||||
|
=^ results5 http-server-gate
|
||||||
|
%- http-server-take :*
|
||||||
|
http-server-gate
|
||||||
|
now=~1111.1.4
|
||||||
|
scry=scry-provides-code
|
||||||
|
^= take-args
|
||||||
|
:* wire=/run-app-cancel/app1 duct=~[/http-blah]
|
||||||
|
^- (hypo sign:http-server-gate) :- *type
|
||||||
|
:* %g %unto %coup
|
||||||
|
`[[%leaf "error! error! error!"] ~]
|
||||||
|
==
|
||||||
|
==
|
||||||
|
expected-move=~
|
||||||
|
==
|
||||||
::
|
::
|
||||||
;: weld
|
;: weld
|
||||||
results1
|
results1
|
||||||
results2
|
results2
|
||||||
results3
|
results3
|
||||||
results4
|
results4
|
||||||
|
results5
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ http-server-call
|
++ http-server-call
|
||||||
|
@ -113,6 +113,33 @@ class sourceAction(argparse.Action):
|
|||||||
else:
|
else:
|
||||||
return {self.which: new_value}
|
return {self.which: new_value}
|
||||||
|
|
||||||
|
class importFileAction(argparse.Action):
|
||||||
|
"""Handles the import statement.
|
||||||
|
|
||||||
|
The --import statement reads in a jammed noun file from the current working
|
||||||
|
directory and stuffs it the base64 encoded version which gets passed into
|
||||||
|
your Urbit.
|
||||||
|
|
||||||
|
"""
|
||||||
|
def __call__(self, parser, res, new_value, option_string):
|
||||||
|
logging.debug('%r %r' % (new_value, option_string))
|
||||||
|
logging.debug('source %s' % res.source)
|
||||||
|
logging.debug('level %s' % res.level)
|
||||||
|
|
||||||
|
# We check to see if there's a "{new_value}.jam" file in the current
|
||||||
|
# working directory. If there isn't, we error
|
||||||
|
data = ""
|
||||||
|
filename = new_value + ".jam"
|
||||||
|
with open(filename, 'rb') as f:
|
||||||
|
data = f.read()
|
||||||
|
|
||||||
|
if data == "":
|
||||||
|
raise ValueError('Failed to read jamfile')
|
||||||
|
|
||||||
|
base_data = base64.b64encode(data)
|
||||||
|
|
||||||
|
res.source = {"import": {"app": new_value, "base64-jam": base_data}}
|
||||||
|
|
||||||
class transformerAction(argparse.Action):
|
class transformerAction(argparse.Action):
|
||||||
"""Handle transformer flag.
|
"""Handle transformer flag.
|
||||||
|
|
||||||
@ -310,6 +337,14 @@ parser.add_argument('-l', '--listen-api', which='listen-api',
|
|||||||
metavar='api:event',
|
metavar='api:event',
|
||||||
help='listen to event from api',
|
help='listen to event from api',
|
||||||
action=sourceAction)
|
action=sourceAction)
|
||||||
|
parser.add_argument('-e', '--export', which='export',
|
||||||
|
metavar='app-name',
|
||||||
|
help='exports the application state',
|
||||||
|
action=sourceAction)
|
||||||
|
parser.add_argument('-i', '--import',
|
||||||
|
metavar='app-name',
|
||||||
|
help='imports the application state',
|
||||||
|
action=importFileAction)
|
||||||
parser.add_argument('-m', '--mark', which='as',
|
parser.add_argument('-m', '--mark', which='as',
|
||||||
metavar='mark',
|
metavar='mark',
|
||||||
help='transform a source to another mark',
|
help='transform a source to another mark',
|
||||||
|
@ -1,16 +1,14 @@
|
|||||||
var gulp = require('gulp');
|
var gulp = require('gulp');
|
||||||
var cssimport = require('gulp-cssimport');
|
var cssimport = require('gulp-cssimport');
|
||||||
var rollup = require('gulp-better-rollup');
|
var rollup = require('gulp-better-rollup');
|
||||||
|
var cssnano = require('cssnano');
|
||||||
|
var postcss = require('gulp-postcss');
|
||||||
var sucrase = require('@sucrase/gulp-plugin');
|
var sucrase = require('@sucrase/gulp-plugin');
|
||||||
var minify = require('gulp-minify');
|
var minify = require('gulp-minify');
|
||||||
var exec = require('child_process').exec;
|
|
||||||
var rename = require('gulp-rename');
|
var rename = require('gulp-rename');
|
||||||
|
|
||||||
var resolve = require('rollup-plugin-node-resolve');
|
var resolve = require('rollup-plugin-node-resolve');
|
||||||
var commonjs = require('rollup-plugin-commonjs');
|
var commonjs = require('rollup-plugin-commonjs');
|
||||||
var replace = require('rollup-plugin-replace');
|
|
||||||
var json = require('rollup-plugin-json');
|
|
||||||
var builtins = require('@joseph184/rollup-plugin-node-builtins');
|
|
||||||
var rootImport = require('rollup-plugin-root-import');
|
var rootImport = require('rollup-plugin-root-import');
|
||||||
var globals = require('rollup-plugin-node-globals');
|
var globals = require('rollup-plugin-node-globals');
|
||||||
|
|
||||||
@ -25,9 +23,13 @@ var urbitrc = require('../urbitrc');
|
|||||||
***/
|
***/
|
||||||
|
|
||||||
gulp.task('css-bundle', function() {
|
gulp.task('css-bundle', function() {
|
||||||
|
let plugins = [
|
||||||
|
cssnano()
|
||||||
|
];
|
||||||
return gulp
|
return gulp
|
||||||
.src('src/index.css')
|
.src('src/index.css')
|
||||||
.pipe(cssimport())
|
.pipe(cssimport())
|
||||||
|
.pipe(postcss(plugins))
|
||||||
.pipe(gulp.dest('../../arvo/app/chat/css'));
|
.pipe(gulp.dest('../../arvo/app/chat/css'));
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -57,17 +59,12 @@ gulp.task('js-imports', function(cb) {
|
|||||||
'node_modules/react-is/index.js': [ 'isValidElementType' ],
|
'node_modules/react-is/index.js': [ 'isValidElementType' ],
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
replace({
|
|
||||||
'process.env.NODE_ENV': JSON.stringify('development')
|
|
||||||
}),
|
|
||||||
rootImport({
|
rootImport({
|
||||||
root: `${__dirname}/dist/js`,
|
root: `${__dirname}/dist/js`,
|
||||||
useEntry: 'prepend',
|
useEntry: 'prepend',
|
||||||
extensions: '.js'
|
extensions: '.js'
|
||||||
}),
|
}),
|
||||||
json(),
|
|
||||||
globals(),
|
globals(),
|
||||||
builtins(),
|
|
||||||
resolve()
|
resolve()
|
||||||
]
|
]
|
||||||
}, 'umd'))
|
}, 'umd'))
|
||||||
@ -93,9 +90,7 @@ gulp.task('tile-js-imports', function(cb) {
|
|||||||
useEntry: 'prepend',
|
useEntry: 'prepend',
|
||||||
extensions: '.js'
|
extensions: '.js'
|
||||||
}),
|
}),
|
||||||
json(),
|
|
||||||
globals(),
|
globals(),
|
||||||
builtins(),
|
|
||||||
resolve()
|
resolve()
|
||||||
]
|
]
|
||||||
}, 'umd'))
|
}, 'umd'))
|
||||||
@ -107,7 +102,6 @@ gulp.task('tile-js-imports', function(cb) {
|
|||||||
.on('end', cb);
|
.on('end', cb);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
gulp.task('js-minify', function () {
|
gulp.task('js-minify', function () {
|
||||||
return gulp.src('../../arvo/app/chat/js/index.js')
|
return gulp.src('../../arvo/app/chat/js/index.js')
|
||||||
.pipe(minify())
|
.pipe(minify())
|
||||||
@ -132,18 +126,6 @@ gulp.task('rename-tile-min', function() {
|
|||||||
.pipe(gulp.dest('../../arvo/app/chat/js/'));
|
.pipe(gulp.dest('../../arvo/app/chat/js/'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('js-cachebust', function(cb) {
|
|
||||||
return Promise.resolve(
|
|
||||||
exec('git log', function (err, stdout, stderr) {
|
|
||||||
let firstLine = stdout.split("\n")[0];
|
|
||||||
let commitHash = firstLine.split(' ')[1].substr(0, 10);
|
|
||||||
let newFilename = "index-" + commitHash + "-min.js";
|
|
||||||
|
|
||||||
exec('mv ../../arvo/app/chat/js/index-min.js ../../arvo/app/chat/js/' + newFilename);
|
|
||||||
})
|
|
||||||
);
|
|
||||||
})
|
|
||||||
|
|
||||||
gulp.task('urbit-copy', function () {
|
gulp.task('urbit-copy', function () {
|
||||||
let ret = gulp.src('../../arvo/**/*');
|
let ret = gulp.src('../../arvo/**/*');
|
||||||
|
|
||||||
|
1428
pkg/interface/chat/package-lock.json
generated
1428
pkg/interface/chat/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -9,9 +9,7 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@joseph184/rollup-plugin-node-builtins": "^2.1.4",
|
|
||||||
"@sucrase/gulp-plugin": "^2.0.0",
|
"@sucrase/gulp-plugin": "^2.0.0",
|
||||||
"autoprefixer": "^9.6.1",
|
|
||||||
"cssnano": "^4.1.10",
|
"cssnano": "^4.1.10",
|
||||||
"gulp": "^4.0.0",
|
"gulp": "^4.0.0",
|
||||||
"gulp-better-rollup": "^4.0.1",
|
"gulp-better-rollup": "^4.0.1",
|
||||||
@ -21,10 +19,8 @@
|
|||||||
"gulp-rename": "^1.4.0",
|
"gulp-rename": "^1.4.0",
|
||||||
"rollup": "^1.6.0",
|
"rollup": "^1.6.0",
|
||||||
"rollup-plugin-commonjs": "^9.2.0",
|
"rollup-plugin-commonjs": "^9.2.0",
|
||||||
"rollup-plugin-json": "^4.0.0",
|
|
||||||
"rollup-plugin-node-globals": "^1.4.0",
|
"rollup-plugin-node-globals": "^1.4.0",
|
||||||
"rollup-plugin-node-resolve": "^4.0.0",
|
"rollup-plugin-node-resolve": "^4.0.0",
|
||||||
"rollup-plugin-replace": "^2.0.0",
|
|
||||||
"rollup-plugin-root-import": "^0.2.3",
|
"rollup-plugin-root-import": "^0.2.3",
|
||||||
"sucrase": "^3.8.0"
|
"sucrase": "^3.8.0"
|
||||||
},
|
},
|
||||||
@ -32,11 +28,10 @@
|
|||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.11",
|
||||||
"moment": "^2.20.1",
|
"moment": "^2.20.1",
|
||||||
"mousetrap": "^1.6.1",
|
"mousetrap": "^1.6.3",
|
||||||
"react": "^16.5.2",
|
"react": "^16.5.2",
|
||||||
"react-dom": "^16.8.6",
|
"react-dom": "^16.8.6",
|
||||||
"react-router-dom": "^5.0.0",
|
"react-router-dom": "^5.0.0",
|
||||||
"rollup-plugin-postcss": "^2.0.3",
|
|
||||||
"urbit-ob": "^3.1.1",
|
"urbit-ob": "^3.1.1",
|
||||||
"urbit-sigil-js": "^1.3.2"
|
"urbit-sigil-js": "^1.3.2"
|
||||||
},
|
},
|
||||||
|
@ -4,6 +4,7 @@ p, h1, h2, h3, h4, h5, h6, a, input, textarea, button {
|
|||||||
-webkit-margin-before: unset;
|
-webkit-margin-before: unset;
|
||||||
-webkit-margin-after: unset;
|
-webkit-margin-after: unset;
|
||||||
font-family: Inter, sans-serif;
|
font-family: Inter, sans-serif;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
textarea, select, input, button {
|
textarea, select, input, button {
|
||||||
@ -118,3 +119,11 @@ h2 {
|
|||||||
.lh-16 {
|
.lh-16 {
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mono {
|
||||||
|
font-family: "Source Code Pro", monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label-small-mono.list-ship {
|
||||||
|
line-height: 29px;
|
||||||
|
}
|
@ -191,13 +191,29 @@ export class ChatScreen extends Component {
|
|||||||
.slice(messages.length - (50 * state.numPages), messages.length);
|
.slice(messages.length - (50 * state.numPages), messages.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
let chatMessages = messages.reverse().map((msg) => {
|
let reversedMessages = messages.reverse();
|
||||||
|
let chatMessages = reversedMessages.map((msg, i) => {
|
||||||
|
// Render sigil if previous message is not by the same sender
|
||||||
|
let gamAut = ['gam', 'aut'];
|
||||||
|
let renderSigil =
|
||||||
|
_.get(reversedMessages[i + 1], gamAut) !== _.get(msg, gamAut);
|
||||||
|
|
||||||
|
// More padding top if previous message is not by the same sender
|
||||||
|
let paddingTop = renderSigil;
|
||||||
|
// More padding bot if next message is not by the same sender
|
||||||
|
let paddingBot =
|
||||||
|
_.get(reversedMessages[i - 1], gamAut) !== _.get(msg, gamAut);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Message
|
<Message
|
||||||
key={msg.gam.uid}
|
key={msg.gam.uid}
|
||||||
msg={msg.gam} />
|
msg={msg.gam}
|
||||||
|
renderSigil={renderSigil}
|
||||||
|
paddingTop={paddingTop}
|
||||||
|
paddingBot={paddingBot} />
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
let peers = props.peers[state.station] || [window.ship];
|
let peers = props.peers[state.station] || [window.ship];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -27,8 +27,34 @@ export class LandingScreen extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onClickSubscribe() {
|
onClickSubscribe() {
|
||||||
|
const { props } = this;
|
||||||
|
|
||||||
let station = props.match.params.ship + '/' + props.match.params.station;
|
let station = props.match.params.ship + '/' + props.match.params.station;
|
||||||
this.props.api.source(station, true);
|
let actions = [
|
||||||
|
{
|
||||||
|
create: {
|
||||||
|
nom: 'hall-internal-' + props.match.params.station,
|
||||||
|
des: "chatroom",
|
||||||
|
sec: "channel"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
nom: "inbox",
|
||||||
|
sub: true,
|
||||||
|
srs: [station]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: {
|
||||||
|
nom: "inbox",
|
||||||
|
sub: true,
|
||||||
|
srs: [`~${window.ship}/hall-internal-${props.match.params.station}`]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
this.props.api.chat(actions);
|
||||||
this.props.history.push('/~chat');
|
this.props.history.push('/~chat');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +76,7 @@ export class LandingScreen extends Component {
|
|||||||
<br />
|
<br />
|
||||||
<button
|
<button
|
||||||
onClick={this.onClickSubscribe.bind(this)}
|
onClick={this.onClickSubscribe.bind(this)}
|
||||||
className="label-r"
|
className="label-regular fw-bold pointer"
|
||||||
>Subscribe</button>
|
>Subscribe</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -161,7 +161,7 @@ export class ChatInput extends Component {
|
|||||||
</div>
|
</div>
|
||||||
<div className="fr h-100 flex" style={{ flexGrow: 1, height: 40 }}>
|
<div className="fr h-100 flex" style={{ flexGrow: 1, height: 40 }}>
|
||||||
<input className="ml2 bn"
|
<input className="ml2 bn"
|
||||||
style={{ flexGrow: 1 }}
|
style={{ flexGrow: 1, height: 40 }}
|
||||||
ref={this.textareaRef}
|
ref={this.textareaRef}
|
||||||
placeholder={props.placeholder}
|
placeholder={props.placeholder}
|
||||||
value={state.message}
|
value={state.message}
|
||||||
|
@ -6,11 +6,9 @@ export class Sigil extends Component {
|
|||||||
render() {
|
render() {
|
||||||
const { props } = this;
|
const { props } = this;
|
||||||
|
|
||||||
console.log("sigil ship", props.ship);
|
|
||||||
|
|
||||||
if (props.ship.length > 14) {
|
if (props.ship.length > 14) {
|
||||||
return (
|
return (
|
||||||
<div className="bg-black" style={{width: 32, height: 32}}>
|
<div className="bg-black" style={{width: 36, height: 36}}>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
|
import { Sigil } from '/components/lib/icons/sigil';
|
||||||
|
|
||||||
|
|
||||||
export class MemberElement extends Component {
|
export class MemberElement extends Component {
|
||||||
@ -23,7 +24,7 @@ export class MemberElement extends Component {
|
|||||||
`~${window.ship}` === props.host) {
|
`~${window.ship}` === props.host) {
|
||||||
actionElem = (
|
actionElem = (
|
||||||
<a onClick={this.onRemove.bind(this)}
|
<a onClick={this.onRemove.bind(this)}
|
||||||
className="w-40 dib underline black btn-font">
|
className="w-40 dib list-ship black underline label-small-mono pointer">
|
||||||
Remove
|
Remove
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
@ -34,10 +35,11 @@ export class MemberElement extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="flex mb2">
|
||||||
|
<Sigil ship={props.ship} size={32} />
|
||||||
<p
|
<p
|
||||||
className={
|
className={
|
||||||
"w-60 dib black pr3 mb2 label-small-mono label-regular"
|
"w-60 dib v-mid black pr3 ml2 nowrap label-small-mono list-ship label-regular"
|
||||||
}>
|
}>
|
||||||
{props.ship}
|
{props.ship}
|
||||||
</p>
|
</p>
|
||||||
|
@ -58,7 +58,7 @@ export class Message extends Component {
|
|||||||
if (typeof url !== 'string') { throw 'Only transmogrify strings!'; }
|
if (typeof url !== 'string') { throw 'Only transmogrify strings!'; }
|
||||||
const ship = window.ship;
|
const ship = window.ship;
|
||||||
if (url.indexOf('arvo://') === 0) {
|
if (url.indexOf('arvo://') === 0) {
|
||||||
return `http://${ship}.arvo.network` + url.split('arvo://')[1];
|
return url.split('arvo://')[1];
|
||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
@ -66,32 +66,51 @@ export class Message extends Component {
|
|||||||
render() {
|
render() {
|
||||||
const { props } = this;
|
const { props } = this;
|
||||||
let pending = !!props.msg.pending ? ' o-80' : '';
|
let pending = !!props.msg.pending ? ' o-80' : '';
|
||||||
let timestamp = moment.unix(props.msg.wen / 1000).format('hh:mm');
|
|
||||||
let datestamp = moment.unix(props.msg.wen / 1000).format('LL');
|
let datestamp = moment.unix(props.msg.wen / 1000).format('LL');
|
||||||
|
|
||||||
return (
|
let paddingTop = props.paddingTop ? 'pt3' : '';
|
||||||
<div className={"w-100 pl3 pr3 pt2 pb2 cf flex" + pending}
|
let paddingBot = props.paddingBot ? 'pb2' : 'pb1';
|
||||||
style={{
|
|
||||||
minHeight: 'min-content'
|
if (props.renderSigil) {
|
||||||
}}>
|
let timestamp = moment.unix(props.msg.wen / 1000).format('hh:mm a');
|
||||||
<div className="fl mr2">
|
|
||||||
<Sigil ship={props.msg.aut} size={36} />
|
return (
|
||||||
</div>
|
<div className={"w-100 pl3 pr3 cf flex " + paddingTop + " " + paddingBot + pending}
|
||||||
<div className="fr" style={{ flexGrow: 1, marginTop: -8 }}>
|
style={{
|
||||||
<div className="hide-child">
|
minHeight: 'min-content'
|
||||||
<p className="v-top label-small-mono gray dib mr3">
|
}}>
|
||||||
~{props.msg.aut}
|
<div className="fl mr2">
|
||||||
</p>
|
<Sigil ship={props.msg.aut} size={36} />
|
||||||
<p className="v-top label-small-mono gray dib">{timestamp}</p>
|
</div>
|
||||||
<p className="v-top label-small-mono ml2 gray dib child">
|
<div className="fr" style={{ flexGrow: 1, marginTop: -8 }}>
|
||||||
{datestamp}
|
<div className="hide-child">
|
||||||
</p>
|
<p className="v-top label-small-mono gray dib mr3">
|
||||||
|
~{props.msg.aut}
|
||||||
|
</p>
|
||||||
|
<p className="v-top label-small-mono gray dib">{timestamp}</p>
|
||||||
|
<p className="v-top label-small-mono ml2 gray dib child">
|
||||||
|
{datestamp}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{this.renderContent()}
|
||||||
</div>
|
</div>
|
||||||
{this.renderContent()}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
);
|
||||||
);
|
} else {
|
||||||
|
let timestamp = moment.unix(props.msg.wen / 1000).format('hh:mm');
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={"w-100 pr3 pb1 cf hide-child flex" + pending}
|
||||||
|
style={{
|
||||||
|
minHeight: 'min-content'
|
||||||
|
}}>
|
||||||
|
<p className="child pl3 pr2 label-small-mono gray dib">{timestamp}</p>
|
||||||
|
<div className="fr" style={{ flexGrow: 1 }}>
|
||||||
|
{this.renderContent()}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ export class MemberScreen extends Component {
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
let inviteButtonClasses = "label-regular underline black btn-font pointer";
|
let inviteButtonClasses = "label-regular black btn-font pointer";
|
||||||
if (!this.state.error) {
|
if (!this.state.error) {
|
||||||
inviteButtonClasses = inviteButtonClasses + ' black';
|
inviteButtonClasses = inviteButtonClasses + ' black';
|
||||||
}
|
}
|
||||||
@ -113,16 +113,17 @@ export class MemberScreen extends Component {
|
|||||||
</p>
|
</p>
|
||||||
<textarea
|
<textarea
|
||||||
ref={ e => { this.textarea = e; } }
|
ref={ e => { this.textarea = e; } }
|
||||||
className="w-80 db ba overflow-y-hidden gray mb2"
|
className="w-80 db ba overflow-y-hidden mono gray mb2"
|
||||||
style={{
|
style={{
|
||||||
resize: 'none',
|
resize: 'none',
|
||||||
height: 150
|
height: 150
|
||||||
}}
|
}}
|
||||||
|
spellCheck="false"
|
||||||
onChange={this.inviteMembersChange.bind(this)}></textarea>
|
onChange={this.inviteMembersChange.bind(this)}></textarea>
|
||||||
<button
|
<button
|
||||||
onClick={this.inviteMembers.bind(this)}
|
onClick={this.inviteMembers.bind(this)}
|
||||||
className={inviteButtonClasses}>
|
className={inviteButtonClasses}>
|
||||||
Invite
|
-> Invite
|
||||||
</button>
|
</button>
|
||||||
{errorElem}
|
{errorElem}
|
||||||
{successElem}
|
{successElem}
|
||||||
|
@ -185,8 +185,9 @@ export class NewScreen extends Component {
|
|||||||
</p>
|
</p>
|
||||||
<textarea
|
<textarea
|
||||||
ref={ e => { this.textarea = e; } }
|
ref={ e => { this.textarea = e; } }
|
||||||
className="body-regular fw-normal ba pa2 mb2 db w-100"
|
className="body-regular mono fw-normal ba pa2 mb2 db w-100"
|
||||||
placeholder="~zod, ~bus"
|
placeholder="~zod, ~bus"
|
||||||
|
spellCheck="false"
|
||||||
style={{
|
style={{
|
||||||
resize: 'none',
|
resize: 'none',
|
||||||
height: 150
|
height: 150
|
||||||
|
@ -127,7 +127,6 @@ class Clock extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
console.log('hi')
|
|
||||||
return <div style={{position:'relative'}}>
|
return <div style={{position:'relative'}}>
|
||||||
|
|
||||||
<svg style={{position:'absolute'}} width="218" height="218" viewBox="0 0 234 234" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg style={{position:'absolute'}} width="218" height="218" viewBox="0 0 234 234" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
@ -2,18 +2,13 @@ var gulp = require('gulp');
|
|||||||
var cssimport = require('gulp-cssimport');
|
var cssimport = require('gulp-cssimport');
|
||||||
var rollup = require('gulp-better-rollup');
|
var rollup = require('gulp-better-rollup');
|
||||||
var cssnano = require('cssnano');
|
var cssnano = require('cssnano');
|
||||||
var autoprefixer = require('autoprefixer');
|
|
||||||
var postcss = require('gulp-postcss')
|
var postcss = require('gulp-postcss')
|
||||||
var sucrase = require('@sucrase/gulp-plugin');
|
var sucrase = require('@sucrase/gulp-plugin');
|
||||||
var minify = require('gulp-minify');
|
var minify = require('gulp-minify');
|
||||||
var exec = require('child_process').exec;
|
|
||||||
var rename = require('gulp-rename');
|
var rename = require('gulp-rename');
|
||||||
|
|
||||||
var resolve = require('rollup-plugin-node-resolve');
|
var resolve = require('rollup-plugin-node-resolve');
|
||||||
var commonjs = require('rollup-plugin-commonjs');
|
var commonjs = require('rollup-plugin-commonjs');
|
||||||
var replace = require('rollup-plugin-replace');
|
|
||||||
var json = require('rollup-plugin-json');
|
|
||||||
var builtins = require('@joseph184/rollup-plugin-node-builtins');
|
|
||||||
var rootImport = require('rollup-plugin-root-import');
|
var rootImport = require('rollup-plugin-root-import');
|
||||||
var globals = require('rollup-plugin-node-globals');
|
var globals = require('rollup-plugin-node-globals');
|
||||||
|
|
||||||
@ -29,7 +24,6 @@ var urbitrc = require('../urbitrc');
|
|||||||
|
|
||||||
gulp.task('css-bundle', function() {
|
gulp.task('css-bundle', function() {
|
||||||
let plugins = [
|
let plugins = [
|
||||||
autoprefixer({ browsers: ['last 1 version'] }),
|
|
||||||
cssnano()
|
cssnano()
|
||||||
];
|
];
|
||||||
return gulp
|
return gulp
|
||||||
@ -57,17 +51,12 @@ gulp.task('js-imports', function(cb) {
|
|||||||
'node_modules/react-is/index.js': [ 'isValidElementType' ],
|
'node_modules/react-is/index.js': [ 'isValidElementType' ],
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
replace({
|
|
||||||
'process.env.NODE_ENV': JSON.stringify('development')
|
|
||||||
}),
|
|
||||||
rootImport({
|
rootImport({
|
||||||
root: `${__dirname}/dist/js`,
|
root: `${__dirname}/dist/js`,
|
||||||
useEntry: 'prepend',
|
useEntry: 'prepend',
|
||||||
extensions: '.js'
|
extensions: '.js'
|
||||||
}),
|
}),
|
||||||
json(),
|
|
||||||
globals(),
|
globals(),
|
||||||
builtins(),
|
|
||||||
resolve()
|
resolve()
|
||||||
]
|
]
|
||||||
}, 'umd'))
|
}, 'umd'))
|
||||||
@ -91,18 +80,6 @@ gulp.task('rename-index-min', function() {
|
|||||||
.pipe(gulp.dest('../../arvo/app/launch/js/'));
|
.pipe(gulp.dest('../../arvo/app/launch/js/'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('js-cachebust', function(cb) {
|
|
||||||
return Promise.resolve(
|
|
||||||
exec('git log', function (err, stdout, stderr) {
|
|
||||||
let firstLine = stdout.split("\n")[0];
|
|
||||||
let commitHash = firstLine.split(' ')[1].substr(0, 10);
|
|
||||||
let newFilename = "index-" + commitHash + "-min.js";
|
|
||||||
|
|
||||||
exec('mv ../../arvo/app/launch/js/index-min.js ../../arvo/app/launch/js/' + newFilename);
|
|
||||||
})
|
|
||||||
);
|
|
||||||
})
|
|
||||||
|
|
||||||
gulp.task('urbit-copy', function () {
|
gulp.task('urbit-copy', function () {
|
||||||
let ret = gulp.src('../../arvo/**/*');
|
let ret = gulp.src('../../arvo/**/*');
|
||||||
|
|
||||||
|
857
pkg/interface/launch/package-lock.json
generated
857
pkg/interface/launch/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -9,9 +9,7 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@joseph184/rollup-plugin-node-builtins": "^2.1.4",
|
|
||||||
"@sucrase/gulp-plugin": "^2.0.0",
|
"@sucrase/gulp-plugin": "^2.0.0",
|
||||||
"autoprefixer": "^9.6.1",
|
|
||||||
"cssnano": "^4.1.10",
|
"cssnano": "^4.1.10",
|
||||||
"gulp": "^4.0.0",
|
"gulp": "^4.0.0",
|
||||||
"gulp-better-rollup": "^4.0.1",
|
"gulp-better-rollup": "^4.0.1",
|
||||||
@ -21,10 +19,8 @@
|
|||||||
"gulp-rename": "^1.4.0",
|
"gulp-rename": "^1.4.0",
|
||||||
"rollup": "^1.6.0",
|
"rollup": "^1.6.0",
|
||||||
"rollup-plugin-commonjs": "^9.2.0",
|
"rollup-plugin-commonjs": "^9.2.0",
|
||||||
"rollup-plugin-json": "^2.3.0",
|
|
||||||
"rollup-plugin-node-globals": "^1.4.0",
|
"rollup-plugin-node-globals": "^1.4.0",
|
||||||
"rollup-plugin-node-resolve": "^3.4.0",
|
"rollup-plugin-node-resolve": "^4.0.0",
|
||||||
"rollup-plugin-replace": "^2.0.0",
|
|
||||||
"rollup-plugin-root-import": "^0.2.3",
|
"rollup-plugin-root-import": "^0.2.3",
|
||||||
"sucrase": "^3.8.0"
|
"sucrase": "^3.8.0"
|
||||||
},
|
},
|
||||||
@ -32,9 +28,7 @@
|
|||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.11",
|
||||||
"moment": "^2.20.1",
|
"moment": "^2.20.1",
|
||||||
"mousetrap": "^1.6.1",
|
|
||||||
"react": "^16.5.2",
|
"react": "^16.5.2",
|
||||||
"react-custom-scrollbars": "^4.2.1",
|
|
||||||
"react-dom": "^16.8.6",
|
"react-dom": "^16.8.6",
|
||||||
"react-router-dom": "^5.0.0",
|
"react-router-dom": "^5.0.0",
|
||||||
"urbit-ob": "^3.1.1"
|
"urbit-ob": "^3.1.1"
|
||||||
|
@ -2,18 +2,13 @@ var gulp = require('gulp');
|
|||||||
var cssimport = require('gulp-cssimport');
|
var cssimport = require('gulp-cssimport');
|
||||||
var rollup = require('gulp-better-rollup');
|
var rollup = require('gulp-better-rollup');
|
||||||
var cssnano = require('cssnano');
|
var cssnano = require('cssnano');
|
||||||
var autoprefixer = require('autoprefixer');
|
|
||||||
var postcss = require('gulp-postcss')
|
var postcss = require('gulp-postcss')
|
||||||
var sucrase = require('@sucrase/gulp-plugin');
|
var sucrase = require('@sucrase/gulp-plugin');
|
||||||
var minify = require('gulp-minify');
|
var minify = require('gulp-minify');
|
||||||
var exec = require('child_process').exec;
|
|
||||||
var rename = require('gulp-rename');
|
var rename = require('gulp-rename');
|
||||||
|
|
||||||
var resolve = require('rollup-plugin-node-resolve');
|
var resolve = require('rollup-plugin-node-resolve');
|
||||||
var commonjs = require('rollup-plugin-commonjs');
|
var commonjs = require('rollup-plugin-commonjs');
|
||||||
var replace = require('rollup-plugin-replace');
|
|
||||||
var json = require('rollup-plugin-json');
|
|
||||||
var builtins = require('@joseph184/rollup-plugin-node-builtins');
|
|
||||||
var rootImport = require('rollup-plugin-root-import');
|
var rootImport = require('rollup-plugin-root-import');
|
||||||
var globals = require('rollup-plugin-node-globals');
|
var globals = require('rollup-plugin-node-globals');
|
||||||
|
|
||||||
@ -29,7 +24,6 @@ var urbitrc = require('../urbitrc');
|
|||||||
|
|
||||||
gulp.task('css-bundle', function() {
|
gulp.task('css-bundle', function() {
|
||||||
let plugins = [
|
let plugins = [
|
||||||
autoprefixer({ browsers: ['last 1 version'] }),
|
|
||||||
cssnano()
|
cssnano()
|
||||||
];
|
];
|
||||||
return gulp
|
return gulp
|
||||||
@ -65,17 +59,12 @@ gulp.task('js-imports', function(cb) {
|
|||||||
'node_modules/react-is/index.js': [ 'isValidElementType' ],
|
'node_modules/react-is/index.js': [ 'isValidElementType' ],
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
replace({
|
|
||||||
'process.env.NODE_ENV': JSON.stringify('development')
|
|
||||||
}),
|
|
||||||
rootImport({
|
rootImport({
|
||||||
root: `${__dirname}/dist/js`,
|
root: `${__dirname}/dist/js`,
|
||||||
useEntry: 'prepend',
|
useEntry: 'prepend',
|
||||||
extensions: '.js'
|
extensions: '.js'
|
||||||
}),
|
}),
|
||||||
json(),
|
|
||||||
globals(),
|
globals(),
|
||||||
builtins(),
|
|
||||||
resolve()
|
resolve()
|
||||||
]
|
]
|
||||||
}, 'umd'))
|
}, 'umd'))
|
||||||
@ -101,9 +90,7 @@ gulp.task('tile-js-imports', function(cb) {
|
|||||||
useEntry: 'prepend',
|
useEntry: 'prepend',
|
||||||
extensions: '.js'
|
extensions: '.js'
|
||||||
}),
|
}),
|
||||||
json(),
|
|
||||||
globals(),
|
globals(),
|
||||||
builtins(),
|
|
||||||
resolve()
|
resolve()
|
||||||
]
|
]
|
||||||
}, 'umd'))
|
}, 'umd'))
|
||||||
@ -140,18 +127,6 @@ gulp.task('rename-tile-min', function() {
|
|||||||
.pipe(gulp.dest('../../arvo/app/publish/js/'));
|
.pipe(gulp.dest('../../arvo/app/publish/js/'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('js-cachebust', function(cb) {
|
|
||||||
return Promise.resolve(
|
|
||||||
exec('git log', function (err, stdout, stderr) {
|
|
||||||
let firstLine = stdout.split("\n")[0];
|
|
||||||
let commitHash = firstLine.split(' ')[1].substr(0, 10);
|
|
||||||
let newFilename = "index-" + commitHash + "-min.js";
|
|
||||||
|
|
||||||
exec('mv ../../arvo/app/publish/js/index-min.js ../../arvo/app/publish/js/' + newFilename);
|
|
||||||
})
|
|
||||||
);
|
|
||||||
})
|
|
||||||
|
|
||||||
gulp.task('urbit-copy', function () {
|
gulp.task('urbit-copy', function () {
|
||||||
let ret = gulp.src('../../arvo/**/*');
|
let ret = gulp.src('../../arvo/**/*');
|
||||||
|
|
||||||
|
857
pkg/interface/publish/package-lock.json
generated
857
pkg/interface/publish/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -9,9 +9,7 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@joseph184/rollup-plugin-node-builtins": "^2.1.4",
|
|
||||||
"@sucrase/gulp-plugin": "^2.0.0",
|
"@sucrase/gulp-plugin": "^2.0.0",
|
||||||
"autoprefixer": "^9.6.1",
|
|
||||||
"cssnano": "^4.1.10",
|
"cssnano": "^4.1.10",
|
||||||
"gulp": "^4.0.0",
|
"gulp": "^4.0.0",
|
||||||
"gulp-better-rollup": "^4.0.1",
|
"gulp-better-rollup": "^4.0.1",
|
||||||
@ -21,10 +19,8 @@
|
|||||||
"gulp-rename": "^1.4.0",
|
"gulp-rename": "^1.4.0",
|
||||||
"rollup": "^1.6.0",
|
"rollup": "^1.6.0",
|
||||||
"rollup-plugin-commonjs": "^9.2.0",
|
"rollup-plugin-commonjs": "^9.2.0",
|
||||||
"rollup-plugin-json": "^2.3.0",
|
|
||||||
"rollup-plugin-node-globals": "^1.4.0",
|
"rollup-plugin-node-globals": "^1.4.0",
|
||||||
"rollup-plugin-node-resolve": "^3.4.0",
|
"rollup-plugin-node-resolve": "^4.0.0",
|
||||||
"rollup-plugin-replace": "^2.0.0",
|
|
||||||
"rollup-plugin-root-import": "^0.2.3",
|
"rollup-plugin-root-import": "^0.2.3",
|
||||||
"sucrase": "^3.8.0"
|
"sucrase": "^3.8.0"
|
||||||
},
|
},
|
||||||
@ -32,9 +28,7 @@
|
|||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.11",
|
||||||
"moment": "^2.20.1",
|
"moment": "^2.20.1",
|
||||||
"mousetrap": "^1.6.1",
|
|
||||||
"react": "^16.5.2",
|
"react": "^16.5.2",
|
||||||
"react-custom-scrollbars": "^4.2.1",
|
|
||||||
"react-dom": "^16.8.6",
|
"react-dom": "^16.8.6",
|
||||||
"react-router-dom": "^5.0.0",
|
"react-router-dom": "^5.0.0",
|
||||||
"urbit-ob": "^3.1.1",
|
"urbit-ob": "^3.1.1",
|
||||||
|
@ -8,8 +8,6 @@ export default class PublishTile extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render(){
|
render(){
|
||||||
console.log("tile", this.props);
|
|
||||||
|
|
||||||
let info = [];
|
let info = [];
|
||||||
if (this.props.data.invites > 0) {
|
if (this.props.data.invites > 0) {
|
||||||
let text = (this.props.data.invites == 1)
|
let text = (this.props.data.invites == 1)
|
||||||
|
@ -48,7 +48,7 @@ export default class WeatherTile extends Component {
|
|||||||
|
|
||||||
renderWrapper(child) {
|
renderWrapper(child) {
|
||||||
return (
|
return (
|
||||||
<div className="pa2" style={{
|
<div className="pa2 relative" style={{
|
||||||
width: 234,
|
width: 234,
|
||||||
height: 234,
|
height: 234,
|
||||||
background: '#1a1a1a'
|
background: '#1a1a1a'
|
||||||
@ -60,9 +60,12 @@ export default class WeatherTile extends Component {
|
|||||||
|
|
||||||
renderNoData() {
|
renderNoData() {
|
||||||
return this.renderWrapper((
|
return this.renderWrapper((
|
||||||
<div>
|
<div onClick={this.locationSubmit.bind(this)}>
|
||||||
<p className="white sans-serif">Weather</p>
|
<p className="gray label-regular b absolute"
|
||||||
<button onClick={this.locationSubmit.bind(this)}>Set location</button>
|
style={{left: 8, top: 4}}>
|
||||||
|
Weather
|
||||||
|
</p>
|
||||||
|
<p className="absolute w-100 flex-col body-regular white" style={{verticalAlign: "bottom", bottom: 8, left: 8, cursor: "pointer"}}>-> Set location</p>
|
||||||
</div>
|
</div>
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@ -75,12 +78,12 @@ export default class WeatherTile extends Component {
|
|||||||
|
|
||||||
return this.renderWrapper((
|
return this.renderWrapper((
|
||||||
<div>
|
<div>
|
||||||
<p className="gray" style={{
|
<p className="gray label-regular b absolute"
|
||||||
fontWeight: 'bold',
|
style={{left: 8, top: 4}}>
|
||||||
fontSize: 14,
|
Weather
|
||||||
lineHeight: '24px'
|
</p>
|
||||||
}}>Weather</p>
|
<div className="w-100 mb2 mt2 absolute"
|
||||||
<div className="w-100 mb2 mt2">
|
style={{left: 18, top: 28}}>
|
||||||
<img
|
<img
|
||||||
src={'/~weather/img/' + c.icon + '.png'}
|
src={'/~weather/img/' + c.icon + '.png'}
|
||||||
width={64}
|
width={64}
|
||||||
@ -95,7 +98,8 @@ export default class WeatherTile extends Component {
|
|||||||
}}>
|
}}>
|
||||||
{Math.round(c.temperature)}°</h2>
|
{Math.round(c.temperature)}°</h2>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-100 cf">
|
<div className="w-100 cf absolute"
|
||||||
|
style={{ left: 18, top: 118 }}>
|
||||||
<div className="fl w-50">
|
<div className="fl w-50">
|
||||||
<IconWithData
|
<IconWithData
|
||||||
icon='winddirection'
|
icon='winddirection'
|
||||||
|
@ -7,7 +7,7 @@ daemon = $(wildcard daemon/*.c)
|
|||||||
worker = $(wildcard worker/*.c)
|
worker = $(wildcard worker/*.c)
|
||||||
|
|
||||||
common = $(jets) $(noun) $(vere)
|
common = $(jets) $(noun) $(vere)
|
||||||
headers = $(shell find include -type f) include/ca-bundle.h include/ivory.h
|
headers = $(shell find include -type f)
|
||||||
|
|
||||||
common_objs = $(shell echo $(common) | sed 's/\.c/.o/g')
|
common_objs = $(shell echo $(common) | sed 's/\.c/.o/g')
|
||||||
daemon_objs = $(shell echo $(daemon) | sed 's/\.c/.o/g')
|
daemon_objs = $(shell echo $(daemon) | sed 's/\.c/.o/g')
|
||||||
@ -23,14 +23,6 @@ all_exes = ./build/mug_tests ./build/ames_tests ./build/jam_tests ./build/hashta
|
|||||||
# -Wall issues all types of errors. This is off (for now)
|
# -Wall issues all types of errors. This is off (for now)
|
||||||
CFLAGS := $(CFLAGS)
|
CFLAGS := $(CFLAGS)
|
||||||
|
|
||||||
ifeq ($(SSL_CERT_FILE),)
|
|
||||||
$(error SSL_CERT_FILE is undefined)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(IVORY),)
|
|
||||||
$(error IVORY is undefined)
|
|
||||||
endif
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
.PHONY: all test clean mkproper
|
.PHONY: all test clean mkproper
|
||||||
@ -49,7 +41,7 @@ clean:
|
|||||||
rm -f ./tags $(all_objs) $(all_exes)
|
rm -f ./tags $(all_objs) $(all_exes)
|
||||||
|
|
||||||
mrproper: clean
|
mrproper: clean
|
||||||
rm -f config.mk include/config.h include/ca-bundle.h include/ivory.h
|
rm -f config.mk include/config.h
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
10
pkg/urbit/configure
vendored
10
pkg/urbit/configure
vendored
@ -2,13 +2,17 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
URBIT_VERSION=0.8.0
|
URBIT_VERSION=0.8.1
|
||||||
|
|
||||||
deps=" \
|
deps=" \
|
||||||
curl gmp sigsegv argon2 ed25519 ent h2o scrypt sni uv murmur3 secp256k1 \
|
curl gmp sigsegv argon2 ed25519 ent h2o scrypt sni uv murmur3 secp256k1 \
|
||||||
softfloat3 ncurses ssl crypto z lmdb ge-additions \
|
softfloat3 ncurses ssl crypto z lmdb ge-additions \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
headers=" \
|
||||||
|
ivory.h ca-bundle.h \
|
||||||
|
"
|
||||||
|
|
||||||
echo '#pragma once' >include/config.h
|
echo '#pragma once' >include/config.h
|
||||||
|
|
||||||
defmacro () {
|
defmacro () {
|
||||||
@ -77,6 +81,10 @@ do LDFLAGS="${LDFLAGS-} -l$dep"
|
|||||||
${PKG_CONFIG-pkg-config} --cflags --libs $dep 2>/dev/null || true
|
${PKG_CONFIG-pkg-config} --cflags --libs $dep 2>/dev/null || true
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for header in $headers
|
||||||
|
do LDFLAGS="${LDFLAGS-} -I$header"
|
||||||
|
done
|
||||||
|
|
||||||
cat >config.mk <<EOF
|
cat >config.mk <<EOF
|
||||||
CFLAGS := ${CFLAGS-} -funsigned-char -ffast-math -std=gnu99
|
CFLAGS := ${CFLAGS-} -funsigned-char -ffast-math -std=gnu99
|
||||||
LDFLAGS := $LDFLAGS
|
LDFLAGS := $LDFLAGS
|
||||||
|
@ -509,10 +509,10 @@ _stop_exit(c3_i int_i)
|
|||||||
u3_daemon_bail();
|
u3_daemon_bail();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* _stop_trace(): print trace on SIGABRT.
|
/* _stop_signal(): handle termination signal.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_stop_trace(c3_i int_i)
|
_stop_signal(c3_i int_i)
|
||||||
{
|
{
|
||||||
// if we have a pier, unmap the event log before dumping core
|
// if we have a pier, unmap the event log before dumping core
|
||||||
//
|
//
|
||||||
@ -673,7 +673,7 @@ main(c3_i argc,
|
|||||||
|
|
||||||
// Cleanup on SIGABRT.
|
// Cleanup on SIGABRT.
|
||||||
//
|
//
|
||||||
signal(SIGABRT, _stop_trace);
|
signal(SIGABRT, _stop_signal);
|
||||||
|
|
||||||
printf("~\n");
|
printf("~\n");
|
||||||
// printf("welcome.\n");
|
// printf("welcome.\n");
|
||||||
|
@ -343,6 +343,7 @@
|
|||||||
c3_c* dns_c; // domain XX multiple/fallback
|
c3_c* dns_c; // domain XX multiple/fallback
|
||||||
c3_w imp_w[256]; // imperial IPs
|
c3_w imp_w[256]; // imperial IPs
|
||||||
time_t imp_t[256]; // imperial IP timestamps
|
time_t imp_t[256]; // imperial IP timestamps
|
||||||
|
c3_o imp_o[256]; // imperial print status
|
||||||
} u3_ames;
|
} u3_ames;
|
||||||
|
|
||||||
/* u3_save: checkpoint control.
|
/* u3_save: checkpoint control.
|
||||||
|
@ -121,11 +121,19 @@ _ames_czar_gone(u3_pact* pac_u, time_t now)
|
|||||||
u3_pier* pir_u = u3_pier_stub();
|
u3_pier* pir_u = u3_pier_stub();
|
||||||
u3_ames* sam_u = pir_u->sam_u;
|
u3_ames* sam_u = pir_u->sam_u;
|
||||||
|
|
||||||
u3l_log("ames: czar at %s: not found (b)\n", pac_u->dns_c);
|
if ( c3y == sam_u->imp_o[pac_u->imp_y] ) {
|
||||||
|
u3l_log("ames: czar at %s: not found (b)\n", pac_u->dns_c);
|
||||||
|
sam_u->imp_o[pac_u->imp_y] = c3n;
|
||||||
|
}
|
||||||
|
|
||||||
if ( (0 == sam_u->imp_w[pac_u->imp_y]) ||
|
if ( (0 == sam_u->imp_w[pac_u->imp_y]) ||
|
||||||
(0xffffffff == sam_u->imp_w[pac_u->imp_y]) ) {
|
(0xffffffff == sam_u->imp_w[pac_u->imp_y]) )
|
||||||
|
{
|
||||||
sam_u->imp_w[pac_u->imp_y] = 0xffffffff;
|
sam_u->imp_w[pac_u->imp_y] = 0xffffffff;
|
||||||
} /* else keep existing ip for 5 more minutes */
|
}
|
||||||
|
|
||||||
|
// keep existing ip for 5 more minutes
|
||||||
|
//
|
||||||
sam_u->imp_t[pac_u->imp_y] = now;
|
sam_u->imp_t[pac_u->imp_y] = now;
|
||||||
|
|
||||||
_ames_pact_free(pac_u);
|
_ames_pact_free(pac_u);
|
||||||
@ -135,8 +143,8 @@ _ames_czar_gone(u3_pact* pac_u, time_t now)
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_ames_czar_cb(uv_getaddrinfo_t* adr_u,
|
_ames_czar_cb(uv_getaddrinfo_t* adr_u,
|
||||||
c3_i sas_i,
|
c3_i sas_i,
|
||||||
struct addrinfo* aif_u)
|
struct addrinfo* aif_u)
|
||||||
{
|
{
|
||||||
// XX revisit
|
// XX revisit
|
||||||
u3_pier* pir_u = u3_pier_stub();
|
u3_pier* pir_u = u3_pier_stub();
|
||||||
@ -159,6 +167,7 @@ _ames_czar_cb(uv_getaddrinfo_t* adr_u,
|
|||||||
|
|
||||||
sam_u->imp_w[pac_u->imp_y] = ntohl(add_u->sin_addr.s_addr);
|
sam_u->imp_w[pac_u->imp_y] = ntohl(add_u->sin_addr.s_addr);
|
||||||
sam_u->imp_t[pac_u->imp_y] = now;
|
sam_u->imp_t[pac_u->imp_y] = now;
|
||||||
|
sam_u->imp_o[pac_u->imp_y] = c3y;
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
if ( sam_u->imp_w[pac_u->imp_y] != old_w
|
if ( sam_u->imp_w[pac_u->imp_y] != old_w
|
||||||
@ -306,6 +315,12 @@ u3_ames_ef_send(u3_pier* pir_u, u3_noun lan, u3_noun pac)
|
|||||||
}
|
}
|
||||||
u3_ames* sam_u = pir_u->sam_u;
|
u3_ames* sam_u = pir_u->sam_u;
|
||||||
|
|
||||||
|
if ( c3n == sam_u->liv ) {
|
||||||
|
u3l_log("ames: not yet live, dropping outbound\r\n");
|
||||||
|
u3z(lan); u3z(pac);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
u3_pact* pac_u = c3_calloc(sizeof(*pac_u));
|
u3_pact* pac_u = c3_calloc(sizeof(*pac_u));
|
||||||
pac_u->len_w = u3r_met(3, pac);
|
pac_u->len_w = u3r_met(3, pac);
|
||||||
pac_u->hun_y = c3_malloc(pac_u->len_w);
|
pac_u->hun_y = c3_malloc(pac_u->len_w);
|
||||||
|
@ -750,6 +750,19 @@ _daemon_sign_init(void)
|
|||||||
sig_u->nex_u = u3_Host.sig_u;
|
sig_u->nex_u = u3_Host.sig_u;
|
||||||
u3_Host.sig_u = sig_u;
|
u3_Host.sig_u = sig_u;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// handle SIGQUIT (turn it into SIGABRT)
|
||||||
|
//
|
||||||
|
{
|
||||||
|
u3_usig* sig_u;
|
||||||
|
|
||||||
|
sig_u = c3_malloc(sizeof(u3_usig));
|
||||||
|
uv_signal_init(u3L, &sig_u->sil_u);
|
||||||
|
|
||||||
|
sig_u->num_i = SIGQUIT;
|
||||||
|
sig_u->nex_u = u3_Host.sig_u;
|
||||||
|
u3_Host.sig_u = sig_u;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* _daemon_sign_cb: signal callback.
|
/* _daemon_sign_cb: signal callback.
|
||||||
@ -778,6 +791,10 @@ _daemon_sign_cb(uv_signal_t* sil_u, c3_i num_i)
|
|||||||
u3_term_ef_winc();
|
u3_term_ef_winc();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case SIGQUIT: {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -866,6 +883,14 @@ u3_daemon_commence()
|
|||||||
u3C.sign_hold_f = _daemon_sign_hold;
|
u3C.sign_hold_f = _daemon_sign_hold;
|
||||||
u3C.sign_move_f = _daemon_sign_move;
|
u3C.sign_move_f = _daemon_sign_move;
|
||||||
|
|
||||||
|
// Ignore SIGPIPE signals.
|
||||||
|
{
|
||||||
|
struct sigaction sig_s = {{0}};
|
||||||
|
sigemptyset(&(sig_s.sa_mask));
|
||||||
|
sig_s.sa_handler = SIG_IGN;
|
||||||
|
sigaction(SIGPIPE, &sig_s, 0);
|
||||||
|
}
|
||||||
|
|
||||||
// boot the ivory pill
|
// boot the ivory pill
|
||||||
//
|
//
|
||||||
{
|
{
|
||||||
|
@ -492,7 +492,6 @@ u3_dawn_vent(u3_noun seed)
|
|||||||
pon = _dawn_need_unit(u3dc("point:take:dawn", u3k(pos), u3k(luh)),
|
pon = _dawn_need_unit(u3dc("point:take:dawn", u3k(pos), u3k(luh)),
|
||||||
"boot: failed to retrieve sponsor keys");
|
"boot: failed to retrieve sponsor keys");
|
||||||
pon = u3nc(pos, pon);
|
pon = u3nc(pos, pon);
|
||||||
u3m_p("pon",pon);
|
|
||||||
u3z(oct); u3z(luh);
|
u3z(oct); u3z(luh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -496,7 +496,7 @@ static void
|
|||||||
_pier_work_bail(void* vod_p,
|
_pier_work_bail(void* vod_p,
|
||||||
const c3_c* err_c)
|
const c3_c* err_c)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "pier: work error: %s\r\n", err_c);
|
fprintf(stderr, "\rpier: work error: %s\r\n", err_c);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* _pier_work_boot(): prepare for boot.
|
/* _pier_work_boot(): prepare for boot.
|
||||||
@ -838,11 +838,15 @@ _pier_work_exit(uv_process_t* req_u,
|
|||||||
u3_controller* god_u = (void *) req_u;
|
u3_controller* god_u = (void *) req_u;
|
||||||
u3_pier* pir_u = god_u->pir_u;
|
u3_pier* pir_u = god_u->pir_u;
|
||||||
|
|
||||||
u3l_log("pier: exit: status %" PRIu64 ", signal %d\r\n", sas_i, sig_i);
|
fprintf(stderr, "\rpier: work exit: status %" PRId64 ", signal %d\r\n",
|
||||||
|
sas_i, sig_i);
|
||||||
uv_close((uv_handle_t*) req_u, 0);
|
uv_close((uv_handle_t*) req_u, 0);
|
||||||
|
|
||||||
u3_pier_db_shutdown(pir_u);
|
// XX dispose
|
||||||
_pier_work_shutdown(pir_u);
|
//
|
||||||
|
pir_u->god_u = 0;
|
||||||
|
|
||||||
|
u3_pier_bail();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* _pier_work_poke(): handle subprocess result. transfer nouns.
|
/* _pier_work_poke(): handle subprocess result. transfer nouns.
|
||||||
@ -1803,10 +1807,12 @@ u3_pier_interrupt(u3_pier* pir_u)
|
|||||||
static void
|
static void
|
||||||
_pier_exit_done(u3_pier* pir_u)
|
_pier_exit_done(u3_pier* pir_u)
|
||||||
{
|
{
|
||||||
u3l_log("pier: exit\r\n");
|
|
||||||
|
|
||||||
u3_pier_db_shutdown(pir_u);
|
u3_pier_db_shutdown(pir_u);
|
||||||
_pier_work_shutdown(pir_u);
|
|
||||||
|
if ( 0 != pir_u->god_u ) {
|
||||||
|
_pier_work_shutdown(pir_u);
|
||||||
|
}
|
||||||
|
|
||||||
_pier_loop_exit(pir_u);
|
_pier_loop_exit(pir_u);
|
||||||
|
|
||||||
// XX uninstall pier from u3K.tab_u, dispose
|
// XX uninstall pier from u3K.tab_u, dispose
|
||||||
|
@ -916,6 +916,15 @@ main(c3_i argc, c3_c* argv[])
|
|||||||
u3C.slog_f = _worker_send_slog;
|
u3C.slog_f = _worker_send_slog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ignore SIGPIPE signals.
|
||||||
|
//
|
||||||
|
{
|
||||||
|
struct sigaction sig_s = {{0}};
|
||||||
|
sigemptyset(&(sig_s.sa_mask));
|
||||||
|
sig_s.sa_handler = SIG_IGN;
|
||||||
|
sigaction(SIGPIPE, &sig_s, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/* configure pipe to daemon process
|
/* configure pipe to daemon process
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user