« get me outta code hell

data: TrackSection.directory, find.trackSection, etc - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/composite/things
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-05-19 22:55:15 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-19 22:55:15 -0300
commit0db3ac0e5e7e80f2268bf94f897ff442a4c8c855 (patch)
tree75d173a893348a6250a5d52df124f9b6fc704905 /src/data/composite/things
parent83911a3abab88aef7548d95c769eced5d2af821a (diff)
data: TrackSection.directory, find.trackSection, etc
Diffstat (limited to 'src/data/composite/things')
-rw-r--r--src/data/composite/things/album/withTracks.js19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/data/composite/things/album/withTracks.js b/src/data/composite/things/album/withTracks.js
index 05f5b24d..3fe6dd2e 100644
--- a/src/data/composite/things/album/withTracks.js
+++ b/src/data/composite/things/album/withTracks.js
@@ -1,8 +1,10 @@
 import {input, templateCompositeFrom} from '#composite';
 
-import {exitWithoutDependency, raiseOutputWithoutDependency}
-  from '#composite/control-flow';
+import find from '#find';
+
+import {exitWithoutDependency} from '#composite/control-flow';
 import {withFlattenedList, withPropertyFromList} from '#composite/data';
+import {withResolvedReferenceList} from '#composite/wiki-data';
 
 export default templateCompositeFrom({
   annotation: `withTracks`,
@@ -10,15 +12,16 @@ export default templateCompositeFrom({
   outputs: ['#tracks'],
 
   steps: () => [
-    raiseOutputWithoutDependency({
-      dependency: 'trackSections',
-      output: input.value({
-        '#tracks': [],
-      }),
+    withResolvedReferenceList({
+      list: 'trackSections',
+      data: 'ownTrackSectionData',
+      find: input.value(find.unqualifiedTrackSection),
+    }).outputs({
+      ['#resolvedReferenceList']: '#trackSections',
     }),
 
     withPropertyFromList({
-      list: 'trackSections',
+      list: '#trackSections',
       property: input.value('tracks'),
     }),