chore(cli): formatting + version consistency
This commit is contained in:
parent
fdd556df83
commit
970061ff9d
15 changed files with 83 additions and 34 deletions
|
@ -8,7 +8,6 @@ export const addBlockedRobot = async () => {
|
|||
initDirectusClient(config);
|
||||
|
||||
const robots = await searchItems('robots', '/');
|
||||
|
||||
let rootRobot = robots.find(r => r.path === '/');
|
||||
|
||||
if (!rootRobot) {
|
||||
|
|
|
@ -16,6 +16,7 @@ export const addEpisodeToShow = async () => {
|
|||
|
||||
if (!matches.length) {
|
||||
console.warn('⚠️ No matching shows found.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -63,6 +64,7 @@ export const addEpisodeToShow = async () => {
|
|||
|
||||
if (update) {
|
||||
await updateItem('episodes', match.id, { plays });
|
||||
|
||||
console.log(`✅ Updated episode: S${season_number}E${episode_number}`);
|
||||
} else {
|
||||
console.warn('⚠️ Skipped update.');
|
||||
|
|
|
@ -5,6 +5,7 @@ import { removeUrlProtocol } from '../sanitize.js';
|
|||
|
||||
export const addLinkToShare = async () => {
|
||||
const config = await loadConfig();
|
||||
|
||||
initDirectusClient(config);
|
||||
|
||||
const { title, link, description, authorQuery } = await inquirer.prompt([
|
||||
|
@ -30,7 +31,6 @@ export const addLinkToShare = async () => {
|
|||
]);
|
||||
|
||||
const authorMatches = await searchItems('authors', authorQuery);
|
||||
|
||||
let author;
|
||||
|
||||
if (!authorMatches.length) {
|
||||
|
@ -98,6 +98,7 @@ export const addLinkToShare = async () => {
|
|||
|
||||
if (!tags.length) {
|
||||
console.warn(`⚠️ No tags found matching "${trimmedQuery}"`);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ export const addPost = async () => {
|
|||
|
||||
if (!tags.length) {
|
||||
console.warn(`⚠️ No tags found matching "${trimmedQuery}"`);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -104,6 +105,7 @@ export const addPost = async () => {
|
|||
|
||||
if (!results.length) {
|
||||
console.warn(`⚠️ No items found in "${collection}" matching "${query}"`);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -151,6 +153,7 @@ export const addPost = async () => {
|
|||
|
||||
if (!matches.length) {
|
||||
console.warn(`⚠️ No ${mediaType} found matching "${query.trim()}"`);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ export const updateReadingProgress = async () => {
|
|||
|
||||
if (!readingBooks.length) {
|
||||
console.log('📖 No books currently marked as "started".');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -33,6 +34,7 @@ export const updateReadingProgress = async () => {
|
|||
message: '📕 New progress percentage (0–100):',
|
||||
validate: input => {
|
||||
const num = Number(input);
|
||||
|
||||
return !isNaN(num) && num >= 0 && num <= 100 || 'Enter a number from 0 to 100';
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue