From 0d2481ed8abdb084f5c10984181c2a7355d5208a Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 12 Apr 2026 12:14:23 -0300 Subject: upd8, etc: curated url validation, tidying modes, --format-urls --- src/data/composite/wiki-properties/urls.js | 4 ++-- src/data/things/MusicVideo.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/data') diff --git a/src/data/composite/wiki-properties/urls.js b/src/data/composite/wiki-properties/urls.js index 3160a0bf..04ccf689 100644 --- a/src/data/composite/wiki-properties/urls.js +++ b/src/data/composite/wiki-properties/urls.js @@ -1,14 +1,14 @@ // A list of URLs! This will always be present on the data object, even if set // to an empty array or null. -import {isURL, validateArrayItems} from '#validators'; +import {isCuratedURL, validateArrayItems} from '#validators'; // TODO: Not templateCompositeFrom. export default function() { return { flags: {update: true, expose: true}, - update: {validate: validateArrayItems(isURL)}, + update: {validate: validateArrayItems(isCuratedURL)}, expose: {transform: value => value ?? []}, }; } diff --git a/src/data/things/MusicVideo.js b/src/data/things/MusicVideo.js index 7ebbba37..16dffa3b 100644 --- a/src/data/things/MusicVideo.js +++ b/src/data/things/MusicVideo.js @@ -4,7 +4,7 @@ import {colors} from '#cli'; import {input, V} from '#composite'; import {empty} from '#sugar'; import Thing from '#thing'; -import {is, isDate, isStringNonEmpty, isURL, validateArrayItems} +import {is, isCuratedURL, isDate, isStringNonEmpty, validateArrayItems} from '#validators'; import {parseContributors, parseDate} from '#yaml'; @@ -70,7 +70,7 @@ export class MusicVideo extends Thing { flags: {update: true, expose: true}, update: { - validate: isURL, + validate: isCuratedURL, }, expose: { @@ -86,7 +86,7 @@ export class MusicVideo extends Thing { flags: {update: true, expose: true}, update: { - validate: validateArrayItems(isURL), + validate: validateArrayItems(isCuratedURL), }, expose: { -- cgit 1.3.0-6-gf8a5