aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/metadata
diff options
context:
space:
mode:
authorEduardo Julian2021-07-06 21:34:21 -0400
committerEduardo Julian2021-07-06 21:34:21 -0400
commit2b909032e7a0bd10cd7db52067d2fb701bfa95e5 (patch)
tree0e2aaef228f80f3336715327f7f34065c309de22 /stdlib/source/program/aedifex/metadata
parent5cf4efa861075f8276f43a2516f5beacaf610b44 (diff)
Simplified the API for file-system operations.
Diffstat (limited to '')
-rw-r--r--stdlib/source/program/aedifex/metadata.lux14
-rw-r--r--stdlib/source/program/aedifex/metadata/artifact.lux7
-rw-r--r--stdlib/source/program/aedifex/metadata/snapshot.lux10
3 files changed, 15 insertions, 16 deletions
diff --git a/stdlib/source/program/aedifex/metadata.lux b/stdlib/source/program/aedifex/metadata.lux
index 86981eb62..7fbe88cbc 100644
--- a/stdlib/source/program/aedifex/metadata.lux
+++ b/stdlib/source/program/aedifex/metadata.lux
@@ -1,7 +1,7 @@
(.module:
[lux #*
[data
- [text
+ ["." text
["%" format (#+ format)]]]
[world
[file (#+ Path)]
@@ -10,7 +10,7 @@
["." // #_
["#." artifact (#+ Artifact)]])
-(def: #export remote_file
+(def: remote_file
Path
"maven-metadata.xml")
@@ -29,6 +29,14 @@
/ (get@ #//artifact.name artifact)
/ ..remote_file)))
-(def: #export local_file
+(def: local_file
Path
"maven-metadata-local.xml")
+
+(def: #export (local_uri remote_uri)
+ (-> URI URI)
+ (text.replace_once ..remote_file ..local_file remote_uri))
+
+(def: #export (remote_uri local_uri)
+ (-> URI URI)
+ (text.replace_once ..local_file ..remote_file local_uri))
diff --git a/stdlib/source/program/aedifex/metadata/artifact.lux b/stdlib/source/program/aedifex/metadata/artifact.lux
index 9210534cc..7150efbab 100644
--- a/stdlib/source/program/aedifex/metadata/artifact.lux
+++ b/stdlib/source/program/aedifex/metadata/artifact.lux
@@ -169,12 +169,9 @@
instant.equivalence
))
-(def: #export (uri artifact)
+(def: #export uri
(-> Artifact URI)
- (let [/ uri.separator
- group (///artifact.directory / (get@ #///artifact.group artifact))
- name (get@ #///artifact.name artifact)]
- (%.format group / name / //.remote_file)))
+ //.remote_project_uri)
(def: epoch
Instant
diff --git a/stdlib/source/program/aedifex/metadata/snapshot.lux b/stdlib/source/program/aedifex/metadata/snapshot.lux
index c8feaa3d9..6eec0c32c 100644
--- a/stdlib/source/program/aedifex/metadata/snapshot.lux
+++ b/stdlib/source/program/aedifex/metadata/snapshot.lux
@@ -117,15 +117,9 @@
///artifact/versioning.equivalence
))
-(def: #export (uri artifact)
+(def: #export uri
(-> Artifact URI)
- (let [/ uri.separator
- group (|> artifact
- (get@ #///artifact.group)
- (///artifact.directory /))
- name (get@ #///artifact.name artifact)
- version (get@ #///artifact.version artifact)]
- (%.format group / name / version / //.remote_file)))
+ //.remote_artifact_uri)
(def: #export (read repository artifact)
(-> (Repository Promise) Artifact (Promise (Try Metadata)))