neo: add mime support mirroring

This commit is contained in:
Liam Fitzgerald 2024-04-18 16:32:36 -04:00
parent a1db957816
commit bdeac7c619
8 changed files with 63 additions and 9 deletions

View File

@ -92,7 +92,7 @@
hear=(map name:neo sound:neo)
$= unix
$: timers=(jug @da pith:neo)
clay-peers=(map [src=pith hand=pith] [case=@ud =desk =path])
clay-peers=(map [src=pith hand=pith] [case=@ud =desk =path as=(unit mark)])
http-req=(map @ta path)
==
adult=_|
@ -1151,12 +1151,16 @@
%+ turn kids
|= kid=path
^- [path cage]
:: =? kid ?=(^ as.peer)
::(snoc (snip kid) u.as.peer)
:- kid
:- (rear kid)
.^(vase %cr (welp /(scot %p our.bowl)/[r.p.u.p.syn]/(scot %da now.bowl) kid))
~& path/path.peer
~& trying/kid
:- (fall as.peer (rear kid))
%. .^(vase %cr (welp /(scot %p our.bowl)/[r.p.u.p.syn]/(scot %da now.bowl) kid))
^- $-(vase vase)
?~ as.peer |=(=vase vase)
.^(tube:clay %cc (welp /(scot %p our.bowl)/[r.p.u.p.syn]/(scot %da now.bowl) /(rear kid)/[u.as.peer]))
=. res (~(dip of res) path.peer)
~& res/res
=/ =note:neo [%poke %clay-res !>(`res:clay:neo`[hand case res])]
=/ =move:neo [[p/our.bowl #/$/clay] src note]
=/ =wire (welp /sys/clay/res wir)

View File

@ -23,7 +23,7 @@
|= old=(unit vase)
=+ !<(=desk (need old))
:_ !>(desk)
[#/[p/our.bowl]/$/clay %poke %clay-req !>(`req:clay:neo`[%peer ~ desk /neo])]^~
[#/[p/our.bowl]/$/clay %poke %clay-req !>(`req:clay:neo`[%peer ~ desk /neo ~])]^~
--
--

View File

@ -0,0 +1,33 @@
=>
|%
+$ card card:neo
--
^- firm:neo
|%
++ state %sig
++ poke (sy %clay-res ~)
++ deps *deps:neo
++ kids *kids:neo
++ form
|_ [=bowl:neo =ever:neo state=vase *]
+* sta !<(@t state-vase)
++ poke
|= [=stud:neo vax=vase]
^- (quip card:neo vase)
?> =(%clay-res stud)
=+ !<(=res:clay:neo vax)
:_ state
%+ murn ~(tap of files.res)
|= [=path =cage]
^- (unit card)
?. =(%mime p.cage)
~
`[(welp here.bowl (pave:neo path)) %make %mime `q.cage ~]
++ init
|= old=(unit vase)
=+ !<(=desk (need old))
:_ !>(desk)
[#/[p/our.bowl]/$/clay %poke %clay-req !>(`req:clay:neo`[%peer ~ desk /neo `%mime])]^~
--
--

View File

@ -16,7 +16,6 @@
?> =(%clay-res stud)
=+ !<(=res:clay:neo vax)
:_ state
~& res/res
%+ murn ~(tap of files.res)
|= [=path =mark =vase]
^- (unit card:neo)
@ -27,7 +26,7 @@
|= old=(unit vase)
=+ !<(=desk (need old))
:_ !>(desk)
[#/[p/our.bowl]/$/clay %poke %clay-req !>(`req:clay:neo`[%peer ~ desk /neo])]^~
[#/[p/our.bowl]/$/clay %poke %clay-req !>(`req:clay:neo`[%peer ~ desk /neo ~])]^~
--
--

View File

@ -0,0 +1,16 @@
|%
++ state %mime
++ poke ~
++ kids *kids:neo
++ deps *deps:neo
++ form
^- form:neo
|_ [=bowl:neo =ever:neo state-vase=vase *]
++ poke
|= [=stud:neo vax=vase]
!!
++ init
|= vas=(unit vase)
`(need vas)
--
--

View File

@ -0,0 +1 @@
,$-(bowl:neo manx)

View File

@ -0,0 +1 @@
mime

View File

@ -317,7 +317,7 @@
|%
:: $peer:clay: Request for file(s) subscription
::
+$ peer [=desk =path]
+$ peer [=desk =path as=(unit mark)]
::
:: $req:clay: Filesystem request
::