mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-10 10:05:09 +03:00
md-hooks: upgrade for versioning
This commit is contained in:
parent
4b305b5450
commit
37ab1b7b2a
@ -227,7 +227,7 @@
|
||||
::
|
||||
++ groups-fact
|
||||
|= =cage
|
||||
?. ?=(%group-update p.cage) jn-core
|
||||
?. ?=(%group-update-0 p.cage) jn-core
|
||||
=+ !<(=update:group-store q.cage)
|
||||
?. ?=(%initial-group -.update) jn-core
|
||||
?. =(rid resource.update) jn-core
|
||||
@ -246,7 +246,7 @@
|
||||
::
|
||||
++ md-fact
|
||||
|= [=mark =vase]
|
||||
?. ?=(%metadata-update mark) jn-core
|
||||
?. ?=(%metadata-update-0 mark) jn-core
|
||||
=+ !<(=update:metadata vase)
|
||||
?. ?=(%initial-group -.update) jn-core
|
||||
?. =(group.update rid) jn-core
|
||||
|
@ -113,7 +113,7 @@
|
||||
(group-update !<(update:group-store q.cage.sign))
|
||||
[cards this]
|
||||
::
|
||||
%metadata-update
|
||||
%metadata-update-0
|
||||
=^ cards state
|
||||
(metadata-update !<(update:metadata q.cage.sign))
|
||||
[cards this]
|
||||
|
@ -15,6 +15,7 @@
|
||||
update:metadata
|
||||
%metadata-update
|
||||
%metadata-push-hook
|
||||
0 0
|
||||
%.n
|
||||
==
|
||||
+$ state-zero
|
||||
@ -151,7 +152,7 @@
|
||||
%kick [watch-store^~ state]
|
||||
::
|
||||
%fact
|
||||
?> ?=(%metadata-update p.cage.sign)
|
||||
?> ?=(%metadata-update-0 p.cage.sign)
|
||||
=+ !<(=update:metadata q.cage.sign)
|
||||
?. ?=(%initial-group -.update) `state
|
||||
`state(previews (~(del by previews) group.update))
|
||||
@ -255,7 +256,7 @@
|
||||
%+ turn ~(tap by associations)
|
||||
|= [=md-resource:metadata =association:metadata]
|
||||
%+ poke-our:pass:io %metadata-store
|
||||
:- %metadata-update
|
||||
:- %metadata-update-0
|
||||
!> ^- update:metadata
|
||||
[%remove resource md-resource]
|
||||
::
|
||||
|
@ -14,6 +14,7 @@
|
||||
update:store
|
||||
%metadata-update
|
||||
%metadata-pull-hook
|
||||
0 0
|
||||
==
|
||||
::
|
||||
+$ agent (push-hook:push-hook config)
|
||||
|
@ -126,7 +126,7 @@
|
||||
?> (team:title our.bowl src.bowl)
|
||||
=^ cards state
|
||||
?+ mark (on-poke:def mark vase)
|
||||
?(%metadata-action %metadata-update)
|
||||
?(%metadata-action %metadata-update-0)
|
||||
(poke-metadata-update:mc !<(update:store vase))
|
||||
::
|
||||
%import
|
||||
@ -144,7 +144,7 @@
|
||||
=/ cards=(list card)
|
||||
?+ path (on-watch:def path)
|
||||
[%all ~]
|
||||
(give %metadata-update !>([%associations associations]))
|
||||
(give %metadata-update-0 !>([%associations associations]))
|
||||
::
|
||||
[%updates ~]
|
||||
~
|
||||
@ -152,7 +152,7 @@
|
||||
[%app-name @ ~]
|
||||
=/ =app-name:store i.t.path
|
||||
=/ app-indices (metadata-for-app:mc app-name)
|
||||
(give %metadata-update !>([%associations app-indices]))
|
||||
(give %metadata-update-0 !>([%associations app-indices]))
|
||||
==
|
||||
[cards this]
|
||||
::
|
||||
@ -443,6 +443,6 @@
|
||||
++ update-subscribers
|
||||
|= [pax=path =update:store]
|
||||
^- (list card)
|
||||
[%give %fact ~[pax] %metadata-update !>(update)]~
|
||||
[%give %fact ~[pax] %metadata-update-0 !>(update)]~
|
||||
--
|
||||
--
|
||||
|
15
pkg/arvo/mar/metadata/update-0.hoon
Normal file
15
pkg/arvo/mar/metadata/update-0.hoon
Normal file
@ -0,0 +1,15 @@
|
||||
/+ store=metadata-store
|
||||
|_ =update:store
|
||||
++ grad %noun
|
||||
++ grow
|
||||
|%
|
||||
++ noun update
|
||||
++ json (update:enjs:store update)
|
||||
--
|
||||
::
|
||||
++ grab
|
||||
|%
|
||||
++ noun update:store
|
||||
++ json action:dejs:store
|
||||
--
|
||||
--
|
@ -41,7 +41,7 @@
|
||||
(poke-our %graph-push-hook %push-hook-action !>([%remove rid]))
|
||||
;< ~ bind:m
|
||||
%+ poke-our %metadata-push-hook
|
||||
:- %metadata-update
|
||||
:- %metadata-update-0
|
||||
!> ^- action:metadata
|
||||
[%remove group-rid [%graph rid]]
|
||||
(pure:m ~)
|
||||
|
Loading…
Reference in New Issue
Block a user