diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-09-09 09:41:06 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-09-09 09:41:06 -0300 |
commit | caf2ade89b827f5245875f8194f78ebb2661e61e (patch) | |
tree | 78c935a5784602d0eaee717e9ceaa73db3d73af8 /src/data/things/index.js | |
parent | f242d1dec3cd905e74eec6ce518781843d5f65d9 (diff) | |
parent | 3083e006fb8be524ca8e37c3194b78b0bf37861f (diff) |
Merge branch 'track-data-cleanup' of github.com:hsmusic/hsmusic-wiki into track-data-cleanup
Diffstat (limited to 'src/data/things/index.js')
-rw-r--r-- | src/data/things/index.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/data/things/index.js b/src/data/things/index.js index 3b73a772..4d8d9d1f 100644 --- a/src/data/things/index.js +++ b/src/data/things/index.js @@ -2,6 +2,7 @@ import * as path from 'node:path'; import {fileURLToPath} from 'node:url'; import {logError} from '#cli'; +import {compositeFrom} from '#composite'; import * as serialize from '#serialize'; import {openAggregate, showAggregate} from '#sugar'; @@ -130,8 +131,16 @@ function evaluatePropertyDescriptors() { throw new Error(`Missing [Thing.getPropertyDescriptors] function`); } - constructor.propertyDescriptors = - constructor[Thing.getPropertyDescriptors](opts); + const results = constructor[Thing.getPropertyDescriptors](opts); + + for (const [key, value] of Object.entries(results)) { + if (Array.isArray(value)) { + results[key] = compositeFrom(`${constructor.name}.${key}`, value); + continue; + } + } + + constructor.propertyDescriptors = results; }, showFailedClasses(failedClasses) { |