aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/metadata
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/program/aedifex/metadata')
-rw-r--r--stdlib/source/program/aedifex/metadata/artifact.lux82
-rw-r--r--stdlib/source/program/aedifex/metadata/snapshot.lux12
2 files changed, 48 insertions, 46 deletions
diff --git a/stdlib/source/program/aedifex/metadata/artifact.lux b/stdlib/source/program/aedifex/metadata/artifact.lux
index cebd4a826..27448f154 100644
--- a/stdlib/source/program/aedifex/metadata/artifact.lux
+++ b/stdlib/source/program/aedifex/metadata/artifact.lux
@@ -1,42 +1,42 @@
(.using
- [library
- [lux "*"
- [abstract
- [monad {"+" do}]
- [equivalence {"+" Equivalence}]]
- [control
- [pipe {"+" do>}]
- ["[0]" try {"+" Try}]
- ["<>" parser
- ["<[0]>" xml {"+" Parser}]
- ["<[0]>" text]]
- [concurrency
- ["[0]" async {"+" Async}]]]
- [data
- ["[0]" product]
- ["[0]" text
- ["%" format]
- [encoding
- ["[0]" utf8]]]
- [format
- ["[0]" xml {"+" XML}]]
- [collection
- ["[0]" list ("[1]#[0]" functor)]]]
- [math
- [number
- ["n" nat]]]
- ["[0]" time {"+" Time}
- ["[0]" instant {"+" Instant}]
- ["[0]" date {"+" Date}]
- ["[0]" year]
- ["[0]" month]]
- [world
- [net
- ["[0]" uri {"+" URI}]]]]]
- ["[0]" //
- ["/[1]" // "_"
- [repository {"+" Repository}]
- ["[1][0]" artifact {"+" Group Name Version Artifact}]]])
+ [library
+ [lux "*"
+ [abstract
+ [monad {"+" do}]
+ [equivalence {"+" Equivalence}]]
+ [control
+ [pipe {"+" do>}]
+ ["[0]" try {"+" Try}]
+ ["<>" parser
+ ["<[0]>" xml {"+" Parser}]
+ ["<[0]>" text]]
+ [concurrency
+ ["[0]" async {"+" Async}]]]
+ [data
+ ["[0]" product]
+ ["[0]" text
+ ["%" format]
+ [encoding
+ ["[0]" utf8]]]
+ [format
+ ["[0]" xml {"+" XML}]]
+ [collection
+ ["[0]" list ("[1]#[0]" functor)]]]
+ [math
+ [number
+ ["n" nat]]]
+ ["[0]" time {"+" Time}
+ ["[0]" instant {"+" Instant}]
+ ["[0]" date {"+" Date}]
+ ["[0]" year]
+ ["[0]" month]]
+ [world
+ [net
+ ["[0]" uri {"+" URI}]]]]]
+ ["[0]" //
+ ["/[1]" // "_"
+ [repository {"+" Repository}]
+ ["[1][0]" artifact {"+" Group Name Version Artifact}]]])
(type: .public Metadata
(Record
@@ -149,6 +149,8 @@
(<xml>.somewhere (..text ..<group>))
(<xml>.somewhere (..text ..<name>))
(<| (<xml>.node ..<versioning>)
+ ... Handle any ignorable tag.
+ (<>.before (<>.some <xml>.any))
($_ <>.and
(<| <xml>.somewhere
(<xml>.node ..<versions>)
@@ -178,8 +180,8 @@
(do async.monad
[project (# repository download (..uri artifact))]
(case project
- {try.#Success project}
- (in (|> project
+ {try.#Success binary_metadata}
+ (in (|> binary_metadata
(do> try.monad
[(# utf8.codec decoded)]
[(# xml.codec decoded)]
diff --git a/stdlib/source/program/aedifex/metadata/snapshot.lux b/stdlib/source/program/aedifex/metadata/snapshot.lux
index 7ac0b1c0e..487b91b8e 100644
--- a/stdlib/source/program/aedifex/metadata/snapshot.lux
+++ b/stdlib/source/program/aedifex/metadata/snapshot.lux
@@ -69,15 +69,15 @@
[version_format Version ..<version> (|>)]
)
-(def: .public (format (^open "[0]"))
+(def: .public (format (^open "/[0]"))
(-> Metadata XML)
- (let [(^open "[0]") #artifact]
+ (let [(^open "//[0]") /#artifact]
{xml.#Node ..<metadata>
xml.attributes
- (list (..group_format group)
- (..name_format name)
- (..version_format version)
- (///artifact/versioning.format #versioning))}))
+ (list (..group_format //#group)
+ (..name_format //#name)
+ (..version_format //#version)
+ (///artifact/versioning.format /#versioning))}))
(def: (text tag)
(-> xml.Tag (Parser Text))