fix: typo separator

This commit is contained in:
diced
2025-07-02 14:12:35 -07:00
parent 38a90787d0
commit 6a76c5243f
6 changed files with 7 additions and 7 deletions

View File

@@ -27,7 +27,7 @@ export const DATABASE_TO_PROP = {
filesDefaultDateFormat: 'files.defaultDateFormat',
filesRemoveGpsMetadata: 'files.removeGpsMetadata',
filesRandomWordsNumAdjectives: 'files.randomWordsNumAdjectives',
filesRandomWordsSeparator: 'files.randomWordsSeperator',
filesRandomWordsSeparator: 'files.randomWordsSeparator',
urlsRoute: 'urls.route',
urlsLength: 'urls.length',

View File

@@ -56,7 +56,7 @@ export const ENVS = [
env('files.defaultDateFormat', 'FILES_DEFAULT_DATE_FORMAT', 'string', true),
env('files.removeGpsMetadata', 'FILES_REMOVE_GPS_METADATA', 'boolean', true),
env('files.randomWordsNumAdjectives', 'FILES_RANDOM_WORDS_NUM_ADJECTIVES', 'number', true),
env('files.randomWordsSeperator', 'FILES_RANDOM_WORDS_SEPERATOR', 'string', true),
env('files.randomWordsSeparator', 'FILES_RANDOM_WORDS_Separator', 'string', true),
env('urls.route', 'URLS_ROUTE', 'string', true),
env('urls.length', 'URLS_LENGTH', 'number', true),

View File

@@ -37,7 +37,7 @@ export const rawConfig: any = {
defaultDateFormat: undefined,
removeGpsMetadata: undefined,
randomWordsNumAdjectives: undefined,
randomWordsSeperator: undefined,
randomWordsSeparator: undefined,
},
urls: {
route: undefined,

View File

@@ -96,7 +96,7 @@ export const schema = z.object({
defaultDateFormat: z.string().default('YYYY-MM-DD_HH:mm:ss'),
removeGpsMetadata: z.boolean().default(false),
randomWordsNumAdjectives: z.number().default(3),
randomWordsSeperator: z.string().default('-'),
randomWordsSeparator: z.string().default('-'),
}),
urls: z.object({
route: z.string().startsWith('/').min(1).trim().toLowerCase().default('/go'),

View File

@@ -20,7 +20,7 @@ export function formatFileName(nameFormat: Config['files']['defaultFormat'], ori
return name;
case 'random-words':
case 'gfycat':
return randomWords(config.files.randomWordsNumAdjectives, config.files.randomWordsSeperator);
return randomWords(config.files.randomWordsNumAdjectives, config.files.randomWordsSeparator);
default:
return randomCharacters(config.files.length);
}

View File

@@ -28,13 +28,13 @@ function importWords(): {
}
}
export function randomWords(numAdjectives: number = 2, seperator: string = '-') {
export function randomWords(numAdjectives: number = 2, separator: string = '-') {
const { adjectives, animals } = importWords();
let words = '';
for (let i = 0; i !== numAdjectives; ++i) {
words += adjectives[randomIndex(adjectives.length)] + seperator;
words += adjectives[randomIndex(adjectives.length)] + separator;
}
words += animals[randomIndex(animals.length)];