From 03cb2db22e1e9cbca3e16525037e335b84987f16 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Mon, 18 Dec 2023 14:48:29 +0100 Subject: [PATCH 01/16] refactor: replace subcommands with single argument --- src/index.ts | 54 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index c2ffb14..3500d0f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,17 +1,61 @@ import { Command } from 'commander'; import { description, version } from '../package.json'; -import commands from './commands'; + +function isObject(value: unknown): value is object { + return typeof value === 'object'; +} + +function isFunction(value: unknown): value is () => unknown { + return typeof value === 'function'; +} + +async function getFunctionByName(functionName: string): Promise<() => unknown> { + const { faker } = await import('@faker-js/faker/locale/en'); + for (const module of Object.values(faker)) { + if (!isObject(module)) { + continue; + } + + for (const entry of Object.values(module)) { + if (!isFunction(entry)) { + continue; + } + + // we need to use "includes" since the function names are "bound functionName" + if (!entry.name.includes(functionName)) { + continue; + } + + return entry; + } + + console.groupEnd(); + } + + throw new Error( + `You tried to generate a value with the function name "${functionName}", but this name does not exist in Faker. Please checkout their documentation (https://fakerjs.dev) to look for available functions.`, + ); +} export function cli(args: string[]) { const program = new Command() .name('faker') .version(version) .description(description) - .usage('faker [options] module_name entry_name'); + .argument( + '', + 'The function name that Faker uses to generate a value.', + ) + .action(async (functionName) => { + if (typeof functionName !== 'string') { + throw new Error( + `Invalid "functionName" argument. A string value is required but found ${functionName}.`, + ); + } - for (const command of commands) { - program.addCommand(command); - } + const fn = await getFunctionByName(functionName); + console.log(fn()); + }); program.parse(args); From fa7c33b099b240938d2ec1c532f1dc30a356f2e0 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Mon, 18 Dec 2023 14:48:41 +0100 Subject: [PATCH 02/16] refactor: remove commands --- src/commands/airline/aircraftType.ts | 10 ---- src/commands/airline/airline.ts | 10 ---- src/commands/airline/airplane.ts | 10 ---- src/commands/airline/airport.ts | 10 ---- src/commands/airline/flightNumber.ts | 10 ---- src/commands/airline/index.ts | 20 ------- src/commands/airline/recordLocator.ts | 10 ---- src/commands/airline/seat.ts | 10 ---- src/commands/animal/bear.ts | 10 ---- src/commands/animal/bird.ts | 10 ---- src/commands/animal/cat.ts | 10 ---- src/commands/animal/cetacean.ts | 10 ---- src/commands/animal/cow.ts | 10 ---- src/commands/animal/crocodilia.ts | 10 ---- src/commands/animal/dog.ts | 10 ---- src/commands/animal/fish.ts | 10 ---- src/commands/animal/horse.ts | 10 ---- src/commands/animal/index.ts | 36 ------------- src/commands/animal/insect.ts | 10 ---- src/commands/animal/lion.ts | 10 ---- src/commands/animal/rabbit.ts | 10 ---- src/commands/animal/rodent.ts | 10 ---- src/commands/animal/snake.ts | 10 ---- src/commands/animal/type.ts | 10 ---- src/commands/color/cmyk.ts | 10 ---- src/commands/color/colorByCSSColorSpace.ts | 10 ---- src/commands/color/cssSupportedFunction.ts | 10 ---- src/commands/color/cssSupportedSpace.ts | 10 ---- src/commands/color/hsl.ts | 10 ---- src/commands/color/human.ts | 10 ---- src/commands/color/hwb.ts | 10 ---- src/commands/color/index.ts | 28 ---------- src/commands/color/lab.ts | 10 ---- src/commands/color/lch.ts | 10 ---- src/commands/color/rgb.ts | 10 ---- src/commands/color/space.ts | 12 ----- src/commands/commerce/department.ts | 10 ---- src/commands/commerce/index.ts | 20 ------- src/commands/commerce/price.ts | 10 ---- src/commands/commerce/product.ts | 10 ---- src/commands/commerce/productAdjective.ts | 10 ---- src/commands/commerce/productDescription.ts | 10 ---- src/commands/commerce/productMaterial.ts | 10 ---- src/commands/commerce/productName.ts | 10 ---- src/commands/company/bs.ts | 10 ---- src/commands/company/bsAdjective.ts | 10 ---- src/commands/company/bsBuzz.ts | 10 ---- src/commands/company/bsNoun.ts | 10 ---- src/commands/company/buzzAdjective.ts | 12 ----- src/commands/company/buzzNoun.ts | 12 ----- src/commands/company/buzzPhrase.ts | 12 ----- src/commands/company/buzzVerb.ts | 12 ----- src/commands/company/catchPhrase.ts | 12 ----- src/commands/company/catchPhraseAdjective.ts | 12 ----- src/commands/company/catchPhraseDescriptor.ts | 12 ----- src/commands/company/catchPhraseNoun.ts | 12 ----- src/commands/company/companySuffix.ts | 10 ---- src/commands/company/index.ts | 36 ------------- src/commands/company/name.ts | 10 ---- src/commands/company/suffixes.ts | 10 ---- src/commands/database/collation.ts | 10 ---- src/commands/database/column.ts | 10 ---- src/commands/database/engine.ts | 10 ---- src/commands/database/index.ts | 16 ------ src/commands/database/mongodbObjectId.ts | 10 ---- src/commands/database/type.ts | 10 ---- src/commands/datatype/array.ts | 10 ---- src/commands/datatype/bigInt.ts | 10 ---- src/commands/datatype/boolean.ts | 10 ---- src/commands/datatype/datetime.ts | 12 ----- src/commands/datatype/float.ts | 12 ----- src/commands/datatype/hexadecimal.ts | 12 ----- src/commands/datatype/index.ts | 26 --------- src/commands/datatype/json.ts | 12 ----- src/commands/datatype/number.ts | 10 ---- src/commands/datatype/string.ts | 12 ----- src/commands/datatype/uuid.ts | 10 ---- src/commands/date/anytime.ts | 12 ----- src/commands/date/birthdate.ts | 10 ---- src/commands/date/future.ts | 10 ---- src/commands/date/index.ts | 22 -------- src/commands/date/month.ts | 10 ---- src/commands/date/past.ts | 10 ---- src/commands/date/recent.ts | 10 ---- src/commands/date/soon.ts | 10 ---- src/commands/date/weekday.ts | 10 ---- src/commands/finance/account.ts | 10 ---- src/commands/finance/accountName.ts | 10 ---- src/commands/finance/accountNumber.ts | 10 ---- src/commands/finance/amount.ts | 12 ----- src/commands/finance/bic.ts | 12 ----- src/commands/finance/bitcoinAddress.ts | 10 ---- src/commands/finance/creditCardCVV.ts | 10 ---- src/commands/finance/creditCardIssuer.ts | 10 ---- src/commands/finance/creditCardNumber.ts | 10 ---- src/commands/finance/currency.ts | 12 ----- src/commands/finance/currencyCode.ts | 10 ---- src/commands/finance/currencyName.ts | 10 ---- src/commands/finance/currencySymbol.ts | 10 ---- src/commands/finance/ethereumAddress.ts | 10 ---- src/commands/finance/iban.ts | 10 ---- src/commands/finance/index.ts | 50 ----------------- src/commands/finance/litecoinAddress.ts | 10 ---- src/commands/finance/mask.ts | 10 ---- src/commands/finance/maskedNumber.ts | 10 ---- src/commands/finance/pin.ts | 10 ---- src/commands/finance/routingNumber.ts | 10 ---- .../finance/transactionDescription.ts | 10 ---- src/commands/finance/transactionType.ts | 10 ---- src/commands/git/branch.ts | 10 ---- src/commands/git/commitDate.ts | 12 ----- src/commands/git/commitEntry.ts | 10 ---- src/commands/git/commitMessage.ts | 10 ---- src/commands/git/commitSha.ts | 10 ---- src/commands/git/index.ts | 18 ------- src/commands/git/shortSha.ts | 10 ---- src/commands/hacker/abbreviation.ts | 10 ---- src/commands/hacker/adjective.ts | 10 ---- src/commands/hacker/index.ts | 18 ------- src/commands/hacker/ingverb.ts | 12 ----- src/commands/hacker/noun.ts | 10 ---- src/commands/hacker/phrase.ts | 10 ---- src/commands/hacker/verb.ts | 10 ---- src/commands/image/abstract.ts | 10 ---- src/commands/image/animals.ts | 10 ---- src/commands/image/avatar.ts | 10 ---- src/commands/image/avatarGitHub.ts | 10 ---- src/commands/image/avatarLegacy.ts | 12 ----- src/commands/image/business.ts | 10 ---- src/commands/image/cats.ts | 10 ---- src/commands/image/city.ts | 10 ---- src/commands/image/dataUri.ts | 10 ---- src/commands/image/fashion.ts | 10 ---- src/commands/image/food.ts | 10 ---- src/commands/image/image.ts | 12 ----- src/commands/image/imageUrl.ts | 10 ---- src/commands/image/index.ts | 52 ------------------ src/commands/image/nature.ts | 10 ---- src/commands/image/nightlife.ts | 10 ---- src/commands/image/people.ts | 10 ---- src/commands/image/sports.ts | 10 ---- src/commands/image/technics.ts | 10 ---- src/commands/image/transport.ts | 10 ---- src/commands/image/url.ts | 10 ---- src/commands/image/urlLoremFlickr.ts | 12 ----- src/commands/image/urlPicsumPhotos.ts | 12 ----- src/commands/image/urlPlaceholder.ts | 12 ----- src/commands/index.ts | 53 ------------------- src/commands/internet/avatar.ts | 10 ---- src/commands/internet/color.ts | 12 ----- src/commands/internet/displayName.ts | 12 ----- src/commands/internet/domainName.ts | 10 ---- src/commands/internet/domainSuffix.ts | 10 ---- src/commands/internet/domainWord.ts | 10 ---- src/commands/internet/email.ts | 10 ---- src/commands/internet/emoji.ts | 10 ---- src/commands/internet/exampleEmail.ts | 10 ---- src/commands/internet/httpMethod.ts | 10 ---- src/commands/internet/httpStatusCode.ts | 10 ---- src/commands/internet/index.ts | 48 ----------------- src/commands/internet/ip.ts | 10 ---- src/commands/internet/ipv4.ts | 10 ---- src/commands/internet/ipv6.ts | 10 ---- src/commands/internet/mac.ts | 10 ---- src/commands/internet/password.ts | 12 ----- src/commands/internet/port.ts | 10 ---- src/commands/internet/protocol.ts | 10 ---- src/commands/internet/url.ts | 10 ---- src/commands/internet/userAgent.ts | 10 ---- src/commands/internet/userName.ts | 10 ---- src/commands/location/buildingNumber.ts | 10 ---- src/commands/location/cardinalDirection.ts | 12 ----- src/commands/location/city.ts | 10 ---- src/commands/location/cityName.ts | 12 ----- src/commands/location/country.ts | 10 ---- src/commands/location/countryCode.ts | 10 ---- src/commands/location/county.ts | 12 ----- src/commands/location/direction.ts | 12 ----- src/commands/location/index.ts | 50 ----------------- src/commands/location/latitude.ts | 10 ---- src/commands/location/longitude.ts | 10 ---- src/commands/location/nearbyGPSCoordinate.ts | 12 ----- src/commands/location/ordinalDirection.ts | 12 ----- src/commands/location/secondaryAddress.ts | 10 ---- src/commands/location/state.ts | 12 ----- src/commands/location/stateAbbr.ts | 12 ----- src/commands/location/street.ts | 10 ---- src/commands/location/streetAddress.ts | 10 ---- src/commands/location/streetName.ts | 10 ---- src/commands/location/timeZone.ts | 10 ---- src/commands/location/zipCode.ts | 10 ---- src/commands/location/zipCodeByState.ts | 10 ---- src/commands/lorem/index.ts | 24 --------- src/commands/lorem/lines.ts | 12 ----- src/commands/lorem/paragraph.ts | 10 ---- src/commands/lorem/paragraphs.ts | 10 ---- src/commands/lorem/sentence.ts | 12 ----- src/commands/lorem/sentences.ts | 10 ---- src/commands/lorem/slug.ts | 12 ----- src/commands/lorem/text.ts | 10 ---- src/commands/lorem/word.ts | 10 ---- src/commands/lorem/words.ts | 10 ---- src/commands/music/genre.ts | 10 ---- src/commands/music/index.ts | 10 ---- src/commands/music/songName.ts | 10 ---- src/commands/number/bigInt.ts | 10 ---- src/commands/number/binary.ts | 10 ---- src/commands/number/float.ts | 12 ----- src/commands/number/hex.ts | 10 ---- src/commands/number/index.ts | 18 ------- src/commands/number/int.ts | 12 ----- src/commands/number/octal.ts | 10 ---- src/commands/person/bio.ts | 10 ---- src/commands/person/firstName.ts | 10 ---- src/commands/person/fullName.ts | 10 ---- src/commands/person/gender.ts | 10 ---- src/commands/person/index.ts | 38 ------------- src/commands/person/jobArea.ts | 10 ---- src/commands/person/jobDescriptor.ts | 10 ---- src/commands/person/jobTitle.ts | 10 ---- src/commands/person/jobType.ts | 10 ---- src/commands/person/lastName.ts | 10 ---- src/commands/person/middleName.ts | 10 ---- src/commands/person/prefix.ts | 10 ---- src/commands/person/sex.ts | 10 ---- src/commands/person/sexType.ts | 10 ---- src/commands/person/suffix.ts | 10 ---- src/commands/person/zodiacSign.ts | 10 ---- src/commands/phone/imei.ts | 10 ---- src/commands/phone/index.ts | 10 ---- src/commands/phone/number.ts | 10 ---- src/commands/science/chemicalElement.ts | 10 ---- src/commands/science/index.ts | 10 ---- src/commands/science/unit.ts | 10 ---- src/commands/string/alpha.ts | 12 ----- src/commands/string/alphanumeric.ts | 10 ---- src/commands/string/binary.ts | 10 ---- src/commands/string/hexadecimal.ts | 10 ---- src/commands/string/index.ts | 26 --------- src/commands/string/nanoid.ts | 10 ---- src/commands/string/numeric.ts | 10 ---- src/commands/string/octal.ts | 10 ---- src/commands/string/sample.ts | 12 ----- src/commands/string/symbol.ts | 10 ---- src/commands/string/uuid.ts | 10 ---- src/commands/system/commonFileExt.ts | 10 ---- src/commands/system/commonFileName.ts | 10 ---- src/commands/system/commonFileType.ts | 10 ---- src/commands/system/cron.ts | 10 ---- src/commands/system/directoryPath.ts | 10 ---- src/commands/system/fileExt.ts | 10 ---- src/commands/system/fileName.ts | 10 ---- src/commands/system/filePath.ts | 10 ---- src/commands/system/fileType.ts | 10 ---- src/commands/system/index.ts | 30 ----------- src/commands/system/mimeType.ts | 10 ---- src/commands/system/networkInterface.ts | 10 ---- src/commands/system/semver.ts | 10 ---- src/commands/vehicle/bicycle.ts | 10 ---- src/commands/vehicle/color.ts | 10 ---- src/commands/vehicle/fuel.ts | 10 ---- src/commands/vehicle/index.ts | 24 --------- src/commands/vehicle/manufacturer.ts | 10 ---- src/commands/vehicle/model.ts | 10 ---- src/commands/vehicle/type.ts | 10 ---- src/commands/vehicle/vehicle.ts | 10 ---- src/commands/vehicle/vin.ts | 10 ---- src/commands/vehicle/vrm.ts | 12 ----- src/commands/word/adjective.ts | 10 ---- src/commands/word/adverb.ts | 10 ---- src/commands/word/conjunction.ts | 10 ---- src/commands/word/index.ts | 24 --------- src/commands/word/interjection.ts | 10 ---- src/commands/word/noun.ts | 10 ---- src/commands/word/preposition.ts | 10 ---- src/commands/word/sample.ts | 10 ---- src/commands/word/verb.ts | 10 ---- src/commands/word/words.ts | 12 ----- 278 files changed, 3327 deletions(-) delete mode 100644 src/commands/airline/aircraftType.ts delete mode 100644 src/commands/airline/airline.ts delete mode 100644 src/commands/airline/airplane.ts delete mode 100644 src/commands/airline/airport.ts delete mode 100644 src/commands/airline/flightNumber.ts delete mode 100644 src/commands/airline/index.ts delete mode 100644 src/commands/airline/recordLocator.ts delete mode 100644 src/commands/airline/seat.ts delete mode 100644 src/commands/animal/bear.ts delete mode 100644 src/commands/animal/bird.ts delete mode 100644 src/commands/animal/cat.ts delete mode 100644 src/commands/animal/cetacean.ts delete mode 100644 src/commands/animal/cow.ts delete mode 100644 src/commands/animal/crocodilia.ts delete mode 100644 src/commands/animal/dog.ts delete mode 100644 src/commands/animal/fish.ts delete mode 100644 src/commands/animal/horse.ts delete mode 100644 src/commands/animal/index.ts delete mode 100644 src/commands/animal/insect.ts delete mode 100644 src/commands/animal/lion.ts delete mode 100644 src/commands/animal/rabbit.ts delete mode 100644 src/commands/animal/rodent.ts delete mode 100644 src/commands/animal/snake.ts delete mode 100644 src/commands/animal/type.ts delete mode 100644 src/commands/color/cmyk.ts delete mode 100644 src/commands/color/colorByCSSColorSpace.ts delete mode 100644 src/commands/color/cssSupportedFunction.ts delete mode 100644 src/commands/color/cssSupportedSpace.ts delete mode 100644 src/commands/color/hsl.ts delete mode 100644 src/commands/color/human.ts delete mode 100644 src/commands/color/hwb.ts delete mode 100644 src/commands/color/index.ts delete mode 100644 src/commands/color/lab.ts delete mode 100644 src/commands/color/lch.ts delete mode 100644 src/commands/color/rgb.ts delete mode 100644 src/commands/color/space.ts delete mode 100644 src/commands/commerce/department.ts delete mode 100644 src/commands/commerce/index.ts delete mode 100644 src/commands/commerce/price.ts delete mode 100644 src/commands/commerce/product.ts delete mode 100644 src/commands/commerce/productAdjective.ts delete mode 100644 src/commands/commerce/productDescription.ts delete mode 100644 src/commands/commerce/productMaterial.ts delete mode 100644 src/commands/commerce/productName.ts delete mode 100644 src/commands/company/bs.ts delete mode 100644 src/commands/company/bsAdjective.ts delete mode 100644 src/commands/company/bsBuzz.ts delete mode 100644 src/commands/company/bsNoun.ts delete mode 100644 src/commands/company/buzzAdjective.ts delete mode 100644 src/commands/company/buzzNoun.ts delete mode 100644 src/commands/company/buzzPhrase.ts delete mode 100644 src/commands/company/buzzVerb.ts delete mode 100644 src/commands/company/catchPhrase.ts delete mode 100644 src/commands/company/catchPhraseAdjective.ts delete mode 100644 src/commands/company/catchPhraseDescriptor.ts delete mode 100644 src/commands/company/catchPhraseNoun.ts delete mode 100644 src/commands/company/companySuffix.ts delete mode 100644 src/commands/company/index.ts delete mode 100644 src/commands/company/name.ts delete mode 100644 src/commands/company/suffixes.ts delete mode 100644 src/commands/database/collation.ts delete mode 100644 src/commands/database/column.ts delete mode 100644 src/commands/database/engine.ts delete mode 100644 src/commands/database/index.ts delete mode 100644 src/commands/database/mongodbObjectId.ts delete mode 100644 src/commands/database/type.ts delete mode 100644 src/commands/datatype/array.ts delete mode 100644 src/commands/datatype/bigInt.ts delete mode 100644 src/commands/datatype/boolean.ts delete mode 100644 src/commands/datatype/datetime.ts delete mode 100644 src/commands/datatype/float.ts delete mode 100644 src/commands/datatype/hexadecimal.ts delete mode 100644 src/commands/datatype/index.ts delete mode 100644 src/commands/datatype/json.ts delete mode 100644 src/commands/datatype/number.ts delete mode 100644 src/commands/datatype/string.ts delete mode 100644 src/commands/datatype/uuid.ts delete mode 100644 src/commands/date/anytime.ts delete mode 100644 src/commands/date/birthdate.ts delete mode 100644 src/commands/date/future.ts delete mode 100644 src/commands/date/index.ts delete mode 100644 src/commands/date/month.ts delete mode 100644 src/commands/date/past.ts delete mode 100644 src/commands/date/recent.ts delete mode 100644 src/commands/date/soon.ts delete mode 100644 src/commands/date/weekday.ts delete mode 100644 src/commands/finance/account.ts delete mode 100644 src/commands/finance/accountName.ts delete mode 100644 src/commands/finance/accountNumber.ts delete mode 100644 src/commands/finance/amount.ts delete mode 100644 src/commands/finance/bic.ts delete mode 100644 src/commands/finance/bitcoinAddress.ts delete mode 100644 src/commands/finance/creditCardCVV.ts delete mode 100644 src/commands/finance/creditCardIssuer.ts delete mode 100644 src/commands/finance/creditCardNumber.ts delete mode 100644 src/commands/finance/currency.ts delete mode 100644 src/commands/finance/currencyCode.ts delete mode 100644 src/commands/finance/currencyName.ts delete mode 100644 src/commands/finance/currencySymbol.ts delete mode 100644 src/commands/finance/ethereumAddress.ts delete mode 100644 src/commands/finance/iban.ts delete mode 100644 src/commands/finance/index.ts delete mode 100644 src/commands/finance/litecoinAddress.ts delete mode 100644 src/commands/finance/mask.ts delete mode 100644 src/commands/finance/maskedNumber.ts delete mode 100644 src/commands/finance/pin.ts delete mode 100644 src/commands/finance/routingNumber.ts delete mode 100644 src/commands/finance/transactionDescription.ts delete mode 100644 src/commands/finance/transactionType.ts delete mode 100644 src/commands/git/branch.ts delete mode 100644 src/commands/git/commitDate.ts delete mode 100644 src/commands/git/commitEntry.ts delete mode 100644 src/commands/git/commitMessage.ts delete mode 100644 src/commands/git/commitSha.ts delete mode 100644 src/commands/git/index.ts delete mode 100644 src/commands/git/shortSha.ts delete mode 100644 src/commands/hacker/abbreviation.ts delete mode 100644 src/commands/hacker/adjective.ts delete mode 100644 src/commands/hacker/index.ts delete mode 100644 src/commands/hacker/ingverb.ts delete mode 100644 src/commands/hacker/noun.ts delete mode 100644 src/commands/hacker/phrase.ts delete mode 100644 src/commands/hacker/verb.ts delete mode 100644 src/commands/image/abstract.ts delete mode 100644 src/commands/image/animals.ts delete mode 100644 src/commands/image/avatar.ts delete mode 100644 src/commands/image/avatarGitHub.ts delete mode 100644 src/commands/image/avatarLegacy.ts delete mode 100644 src/commands/image/business.ts delete mode 100644 src/commands/image/cats.ts delete mode 100644 src/commands/image/city.ts delete mode 100644 src/commands/image/dataUri.ts delete mode 100644 src/commands/image/fashion.ts delete mode 100644 src/commands/image/food.ts delete mode 100644 src/commands/image/image.ts delete mode 100644 src/commands/image/imageUrl.ts delete mode 100644 src/commands/image/index.ts delete mode 100644 src/commands/image/nature.ts delete mode 100644 src/commands/image/nightlife.ts delete mode 100644 src/commands/image/people.ts delete mode 100644 src/commands/image/sports.ts delete mode 100644 src/commands/image/technics.ts delete mode 100644 src/commands/image/transport.ts delete mode 100644 src/commands/image/url.ts delete mode 100644 src/commands/image/urlLoremFlickr.ts delete mode 100644 src/commands/image/urlPicsumPhotos.ts delete mode 100644 src/commands/image/urlPlaceholder.ts delete mode 100644 src/commands/index.ts delete mode 100644 src/commands/internet/avatar.ts delete mode 100644 src/commands/internet/color.ts delete mode 100644 src/commands/internet/displayName.ts delete mode 100644 src/commands/internet/domainName.ts delete mode 100644 src/commands/internet/domainSuffix.ts delete mode 100644 src/commands/internet/domainWord.ts delete mode 100644 src/commands/internet/email.ts delete mode 100644 src/commands/internet/emoji.ts delete mode 100644 src/commands/internet/exampleEmail.ts delete mode 100644 src/commands/internet/httpMethod.ts delete mode 100644 src/commands/internet/httpStatusCode.ts delete mode 100644 src/commands/internet/index.ts delete mode 100644 src/commands/internet/ip.ts delete mode 100644 src/commands/internet/ipv4.ts delete mode 100644 src/commands/internet/ipv6.ts delete mode 100644 src/commands/internet/mac.ts delete mode 100644 src/commands/internet/password.ts delete mode 100644 src/commands/internet/port.ts delete mode 100644 src/commands/internet/protocol.ts delete mode 100644 src/commands/internet/url.ts delete mode 100644 src/commands/internet/userAgent.ts delete mode 100644 src/commands/internet/userName.ts delete mode 100644 src/commands/location/buildingNumber.ts delete mode 100644 src/commands/location/cardinalDirection.ts delete mode 100644 src/commands/location/city.ts delete mode 100644 src/commands/location/cityName.ts delete mode 100644 src/commands/location/country.ts delete mode 100644 src/commands/location/countryCode.ts delete mode 100644 src/commands/location/county.ts delete mode 100644 src/commands/location/direction.ts delete mode 100644 src/commands/location/index.ts delete mode 100644 src/commands/location/latitude.ts delete mode 100644 src/commands/location/longitude.ts delete mode 100644 src/commands/location/nearbyGPSCoordinate.ts delete mode 100644 src/commands/location/ordinalDirection.ts delete mode 100644 src/commands/location/secondaryAddress.ts delete mode 100644 src/commands/location/state.ts delete mode 100644 src/commands/location/stateAbbr.ts delete mode 100644 src/commands/location/street.ts delete mode 100644 src/commands/location/streetAddress.ts delete mode 100644 src/commands/location/streetName.ts delete mode 100644 src/commands/location/timeZone.ts delete mode 100644 src/commands/location/zipCode.ts delete mode 100644 src/commands/location/zipCodeByState.ts delete mode 100644 src/commands/lorem/index.ts delete mode 100644 src/commands/lorem/lines.ts delete mode 100644 src/commands/lorem/paragraph.ts delete mode 100644 src/commands/lorem/paragraphs.ts delete mode 100644 src/commands/lorem/sentence.ts delete mode 100644 src/commands/lorem/sentences.ts delete mode 100644 src/commands/lorem/slug.ts delete mode 100644 src/commands/lorem/text.ts delete mode 100644 src/commands/lorem/word.ts delete mode 100644 src/commands/lorem/words.ts delete mode 100644 src/commands/music/genre.ts delete mode 100644 src/commands/music/index.ts delete mode 100644 src/commands/music/songName.ts delete mode 100644 src/commands/number/bigInt.ts delete mode 100644 src/commands/number/binary.ts delete mode 100644 src/commands/number/float.ts delete mode 100644 src/commands/number/hex.ts delete mode 100644 src/commands/number/index.ts delete mode 100644 src/commands/number/int.ts delete mode 100644 src/commands/number/octal.ts delete mode 100644 src/commands/person/bio.ts delete mode 100644 src/commands/person/firstName.ts delete mode 100644 src/commands/person/fullName.ts delete mode 100644 src/commands/person/gender.ts delete mode 100644 src/commands/person/index.ts delete mode 100644 src/commands/person/jobArea.ts delete mode 100644 src/commands/person/jobDescriptor.ts delete mode 100644 src/commands/person/jobTitle.ts delete mode 100644 src/commands/person/jobType.ts delete mode 100644 src/commands/person/lastName.ts delete mode 100644 src/commands/person/middleName.ts delete mode 100644 src/commands/person/prefix.ts delete mode 100644 src/commands/person/sex.ts delete mode 100644 src/commands/person/sexType.ts delete mode 100644 src/commands/person/suffix.ts delete mode 100644 src/commands/person/zodiacSign.ts delete mode 100644 src/commands/phone/imei.ts delete mode 100644 src/commands/phone/index.ts delete mode 100644 src/commands/phone/number.ts delete mode 100644 src/commands/science/chemicalElement.ts delete mode 100644 src/commands/science/index.ts delete mode 100644 src/commands/science/unit.ts delete mode 100644 src/commands/string/alpha.ts delete mode 100644 src/commands/string/alphanumeric.ts delete mode 100644 src/commands/string/binary.ts delete mode 100644 src/commands/string/hexadecimal.ts delete mode 100644 src/commands/string/index.ts delete mode 100644 src/commands/string/nanoid.ts delete mode 100644 src/commands/string/numeric.ts delete mode 100644 src/commands/string/octal.ts delete mode 100644 src/commands/string/sample.ts delete mode 100644 src/commands/string/symbol.ts delete mode 100644 src/commands/string/uuid.ts delete mode 100644 src/commands/system/commonFileExt.ts delete mode 100644 src/commands/system/commonFileName.ts delete mode 100644 src/commands/system/commonFileType.ts delete mode 100644 src/commands/system/cron.ts delete mode 100644 src/commands/system/directoryPath.ts delete mode 100644 src/commands/system/fileExt.ts delete mode 100644 src/commands/system/fileName.ts delete mode 100644 src/commands/system/filePath.ts delete mode 100644 src/commands/system/fileType.ts delete mode 100644 src/commands/system/index.ts delete mode 100644 src/commands/system/mimeType.ts delete mode 100644 src/commands/system/networkInterface.ts delete mode 100644 src/commands/system/semver.ts delete mode 100644 src/commands/vehicle/bicycle.ts delete mode 100644 src/commands/vehicle/color.ts delete mode 100644 src/commands/vehicle/fuel.ts delete mode 100644 src/commands/vehicle/index.ts delete mode 100644 src/commands/vehicle/manufacturer.ts delete mode 100644 src/commands/vehicle/model.ts delete mode 100644 src/commands/vehicle/type.ts delete mode 100644 src/commands/vehicle/vehicle.ts delete mode 100644 src/commands/vehicle/vin.ts delete mode 100644 src/commands/vehicle/vrm.ts delete mode 100644 src/commands/word/adjective.ts delete mode 100644 src/commands/word/adverb.ts delete mode 100644 src/commands/word/conjunction.ts delete mode 100644 src/commands/word/index.ts delete mode 100644 src/commands/word/interjection.ts delete mode 100644 src/commands/word/noun.ts delete mode 100644 src/commands/word/preposition.ts delete mode 100644 src/commands/word/sample.ts delete mode 100644 src/commands/word/verb.ts delete mode 100644 src/commands/word/words.ts diff --git a/src/commands/airline/aircraftType.ts b/src/commands/airline/aircraftType.ts deleted file mode 100644 index 07ebf38..0000000 --- a/src/commands/airline/aircraftType.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('aircraftType') - .description(`Generates a random aircraft type.`) - .action(() => { - console.log(faker.airline.aircraftType()); - }); - -export default command; diff --git a/src/commands/airline/airline.ts b/src/commands/airline/airline.ts deleted file mode 100644 index 098e6a1..0000000 --- a/src/commands/airline/airline.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('airline') - .description(`Generates a random airline.`) - .action(() => { - console.log(faker.airline.airline()); - }); - -export default command; diff --git a/src/commands/airline/airplane.ts b/src/commands/airline/airplane.ts deleted file mode 100644 index 9cf6dd5..0000000 --- a/src/commands/airline/airplane.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('airplane') - .description(`Generates a random airplane.`) - .action(() => { - console.log(faker.airline.airplane()); - }); - -export default command; diff --git a/src/commands/airline/airport.ts b/src/commands/airline/airport.ts deleted file mode 100644 index 8d713d4..0000000 --- a/src/commands/airline/airport.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('airport') - .description(`Generates a random airport.`) - .action(() => { - console.log(faker.airline.airport()); - }); - -export default command; diff --git a/src/commands/airline/flightNumber.ts b/src/commands/airline/flightNumber.ts deleted file mode 100644 index 92ef3a1..0000000 --- a/src/commands/airline/flightNumber.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('flightNumber') - .description(`Generates a random flight number.`) - .action(() => { - console.log(faker.airline.flightNumber()); - }); - -export default command; diff --git a/src/commands/airline/index.ts b/src/commands/airline/index.ts deleted file mode 100644 index 57a76b9..0000000 --- a/src/commands/airline/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Command } from 'commander'; -import airportCommand from './airport'; -import airlineCommand from './airline'; -import airplaneCommand from './airplane'; -import recordLocatorCommand from './recordLocator'; -import seatCommand from './seat'; -import aircraftTypeCommand from './aircraftType'; -import flightNumberCommand from './flightNumber'; - -const command = new Command('airline') - .description(`Module to generate airline and airport related data.`) - .addCommand(airportCommand) - .addCommand(airlineCommand) - .addCommand(airplaneCommand) - .addCommand(recordLocatorCommand) - .addCommand(seatCommand) - .addCommand(aircraftTypeCommand) - .addCommand(flightNumberCommand); - -export default command; diff --git a/src/commands/airline/recordLocator.ts b/src/commands/airline/recordLocator.ts deleted file mode 100644 index 2d94756..0000000 --- a/src/commands/airline/recordLocator.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('recordLocator') - .description(`Generates a random record locator.`) - .action(() => { - console.log(faker.airline.recordLocator()); - }); - -export default command; diff --git a/src/commands/airline/seat.ts b/src/commands/airline/seat.ts deleted file mode 100644 index 3a72eef..0000000 --- a/src/commands/airline/seat.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('seat') - .description(`Generates a random seat.`) - .action(() => { - console.log(faker.airline.seat()); - }); - -export default command; diff --git a/src/commands/animal/bear.ts b/src/commands/animal/bear.ts deleted file mode 100644 index 53af6c3..0000000 --- a/src/commands/animal/bear.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('bear') - .description(`Generates a random bear species.`) - .action(() => { - console.log(faker.animal.bear()); - }); - -export default command; diff --git a/src/commands/animal/bird.ts b/src/commands/animal/bird.ts deleted file mode 100644 index 762899d..0000000 --- a/src/commands/animal/bird.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('bird') - .description(`Generates a random bird species.`) - .action(() => { - console.log(faker.animal.bird()); - }); - -export default command; diff --git a/src/commands/animal/cat.ts b/src/commands/animal/cat.ts deleted file mode 100644 index fb82779..0000000 --- a/src/commands/animal/cat.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('cat') - .description(`Generates a random cat breed.`) - .action(() => { - console.log(faker.animal.cat()); - }); - -export default command; diff --git a/src/commands/animal/cetacean.ts b/src/commands/animal/cetacean.ts deleted file mode 100644 index e3aaca9..0000000 --- a/src/commands/animal/cetacean.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('cetacean') - .description(`Generates a random cetacean species.`) - .action(() => { - console.log(faker.animal.cetacean()); - }); - -export default command; diff --git a/src/commands/animal/cow.ts b/src/commands/animal/cow.ts deleted file mode 100644 index 5755856..0000000 --- a/src/commands/animal/cow.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('cow') - .description(`Generates a random cow species.`) - .action(() => { - console.log(faker.animal.cow()); - }); - -export default command; diff --git a/src/commands/animal/crocodilia.ts b/src/commands/animal/crocodilia.ts deleted file mode 100644 index c58ffd8..0000000 --- a/src/commands/animal/crocodilia.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('crocodilia') - .description(`Generates a random crocodilian species.`) - .action(() => { - console.log(faker.animal.crocodilia()); - }); - -export default command; diff --git a/src/commands/animal/dog.ts b/src/commands/animal/dog.ts deleted file mode 100644 index 90698b7..0000000 --- a/src/commands/animal/dog.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('dog') - .description(`Generates a random dog breed.`) - .action(() => { - console.log(faker.animal.dog()); - }); - -export default command; diff --git a/src/commands/animal/fish.ts b/src/commands/animal/fish.ts deleted file mode 100644 index 168bf9d..0000000 --- a/src/commands/animal/fish.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('fish') - .description(`Generates a random fish species.`) - .action(() => { - console.log(faker.animal.fish()); - }); - -export default command; diff --git a/src/commands/animal/horse.ts b/src/commands/animal/horse.ts deleted file mode 100644 index 072647d..0000000 --- a/src/commands/animal/horse.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('horse') - .description(`Generates a random horse breed.`) - .action(() => { - console.log(faker.animal.horse()); - }); - -export default command; diff --git a/src/commands/animal/index.ts b/src/commands/animal/index.ts deleted file mode 100644 index ce93aa3..0000000 --- a/src/commands/animal/index.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Command } from 'commander'; -import dogCommand from './dog'; -import catCommand from './cat'; -import snakeCommand from './snake'; -import bearCommand from './bear'; -import lionCommand from './lion'; -import cetaceanCommand from './cetacean'; -import horseCommand from './horse'; -import birdCommand from './bird'; -import cowCommand from './cow'; -import fishCommand from './fish'; -import crocodiliaCommand from './crocodilia'; -import insectCommand from './insect'; -import rabbitCommand from './rabbit'; -import rodentCommand from './rodent'; -import typeCommand from './type'; - -const command = new Command('animal') - .description(`Module to generate animal related entries.`) - .addCommand(dogCommand) - .addCommand(catCommand) - .addCommand(snakeCommand) - .addCommand(bearCommand) - .addCommand(lionCommand) - .addCommand(cetaceanCommand) - .addCommand(horseCommand) - .addCommand(birdCommand) - .addCommand(cowCommand) - .addCommand(fishCommand) - .addCommand(crocodiliaCommand) - .addCommand(insectCommand) - .addCommand(rabbitCommand) - .addCommand(rodentCommand) - .addCommand(typeCommand); - -export default command; diff --git a/src/commands/animal/insect.ts b/src/commands/animal/insect.ts deleted file mode 100644 index e4d0ce1..0000000 --- a/src/commands/animal/insect.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('insect') - .description(`Generates a random insect species.`) - .action(() => { - console.log(faker.animal.insect()); - }); - -export default command; diff --git a/src/commands/animal/lion.ts b/src/commands/animal/lion.ts deleted file mode 100644 index c96dd65..0000000 --- a/src/commands/animal/lion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('lion') - .description(`Generates a random lion species.`) - .action(() => { - console.log(faker.animal.lion()); - }); - -export default command; diff --git a/src/commands/animal/rabbit.ts b/src/commands/animal/rabbit.ts deleted file mode 100644 index 949a022..0000000 --- a/src/commands/animal/rabbit.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('rabbit') - .description(`Generates a random rabbit species.`) - .action(() => { - console.log(faker.animal.rabbit()); - }); - -export default command; diff --git a/src/commands/animal/rodent.ts b/src/commands/animal/rodent.ts deleted file mode 100644 index fc7eb62..0000000 --- a/src/commands/animal/rodent.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('rodent') - .description(`Generates a random rodent breed.`) - .action(() => { - console.log(faker.animal.rodent()); - }); - -export default command; diff --git a/src/commands/animal/snake.ts b/src/commands/animal/snake.ts deleted file mode 100644 index 30671ca..0000000 --- a/src/commands/animal/snake.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('snake') - .description(`Generates a random snake species.`) - .action(() => { - console.log(faker.animal.snake()); - }); - -export default command; diff --git a/src/commands/animal/type.ts b/src/commands/animal/type.ts deleted file mode 100644 index 58bef27..0000000 --- a/src/commands/animal/type.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('type') - .description(`Generates a random animal type.`) - .action(() => { - console.log(faker.animal.type()); - }); - -export default command; diff --git a/src/commands/color/cmyk.ts b/src/commands/color/cmyk.ts deleted file mode 100644 index 5fa27d0..0000000 --- a/src/commands/color/cmyk.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('cmyk') - .description(`Generates a CMYK color.`) - .action(() => { - console.log(faker.color.cmyk()); - }); - -export default command; diff --git a/src/commands/color/colorByCSSColorSpace.ts b/src/commands/color/colorByCSSColorSpace.ts deleted file mode 100644 index ca1625b..0000000 --- a/src/commands/color/colorByCSSColorSpace.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('colorByCSSColorSpace') - .description(`Generates a random color based on CSS color space specified.`) - .action(() => { - console.log(faker.color.colorByCSSColorSpace()); - }); - -export default command; diff --git a/src/commands/color/cssSupportedFunction.ts b/src/commands/color/cssSupportedFunction.ts deleted file mode 100644 index 1457267..0000000 --- a/src/commands/color/cssSupportedFunction.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('cssSupportedFunction') - .description(`Generates a random css supported color function name.`) - .action(() => { - console.log(faker.color.cssSupportedFunction()); - }); - -export default command; diff --git a/src/commands/color/cssSupportedSpace.ts b/src/commands/color/cssSupportedSpace.ts deleted file mode 100644 index 009c89b..0000000 --- a/src/commands/color/cssSupportedSpace.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('cssSupportedSpace') - .description(`Generates a random css supported color space name.`) - .action(() => { - console.log(faker.color.cssSupportedSpace()); - }); - -export default command; diff --git a/src/commands/color/hsl.ts b/src/commands/color/hsl.ts deleted file mode 100644 index 058345e..0000000 --- a/src/commands/color/hsl.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('hsl') - .description(`Generates an HSL color.`) - .action(() => { - console.log(faker.color.hsl()); - }); - -export default command; diff --git a/src/commands/color/human.ts b/src/commands/color/human.ts deleted file mode 100644 index 2f33f33..0000000 --- a/src/commands/color/human.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('human') - .description(`Generates a random human readable color name.`) - .action(() => { - console.log(faker.color.human()); - }); - -export default command; diff --git a/src/commands/color/hwb.ts b/src/commands/color/hwb.ts deleted file mode 100644 index 0754596..0000000 --- a/src/commands/color/hwb.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('hwb') - .description(`Generates an HWB color.`) - .action(() => { - console.log(faker.color.hwb()); - }); - -export default command; diff --git a/src/commands/color/index.ts b/src/commands/color/index.ts deleted file mode 100644 index 090ffbc..0000000 --- a/src/commands/color/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Command } from 'commander'; -import humanCommand from './human'; -import spaceCommand from './space'; -import cssSupportedFunctionCommand from './cssSupportedFunction'; -import cssSupportedSpaceCommand from './cssSupportedSpace'; -import rgbCommand from './rgb'; -import cmykCommand from './cmyk'; -import hslCommand from './hsl'; -import hwbCommand from './hwb'; -import labCommand from './lab'; -import lchCommand from './lch'; -import colorByCSSColorSpaceCommand from './colorByCSSColorSpace'; - -const command = new Command('color') - .description(`Module to generate colors.`) - .addCommand(humanCommand) - .addCommand(spaceCommand) - .addCommand(cssSupportedFunctionCommand) - .addCommand(cssSupportedSpaceCommand) - .addCommand(rgbCommand) - .addCommand(cmykCommand) - .addCommand(hslCommand) - .addCommand(hwbCommand) - .addCommand(labCommand) - .addCommand(lchCommand) - .addCommand(colorByCSSColorSpaceCommand); - -export default command; diff --git a/src/commands/color/lab.ts b/src/commands/color/lab.ts deleted file mode 100644 index f6838d4..0000000 --- a/src/commands/color/lab.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('lab') - .description(`Generates a LAB (CIELAB) color.`) - .action(() => { - console.log(faker.color.lab()); - }); - -export default command; diff --git a/src/commands/color/lch.ts b/src/commands/color/lch.ts deleted file mode 100644 index 6713b46..0000000 --- a/src/commands/color/lch.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('lch') - .description(`Generates an LCH color. Even though upper bound of`) - .action(() => { - console.log(faker.color.lch()); - }); - -export default command; diff --git a/src/commands/color/rgb.ts b/src/commands/color/rgb.ts deleted file mode 100644 index a63ddac..0000000 --- a/src/commands/color/rgb.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('rgb') - .description(`Generates an RGB color.`) - .action(() => { - console.log(faker.color.rgb()); - }); - -export default command; diff --git a/src/commands/color/space.ts b/src/commands/color/space.ts deleted file mode 100644 index 78813e5..0000000 --- a/src/commands/color/space.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('space') - .description( - `Generates a random color space name from the worldwide accepted color spaces.`, - ) - .action(() => { - console.log(faker.color.space()); - }); - -export default command; diff --git a/src/commands/commerce/department.ts b/src/commands/commerce/department.ts deleted file mode 100644 index a19a16b..0000000 --- a/src/commands/commerce/department.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('department') - .description(`Generates a department inside a shop.`) - .action(() => { - console.log(faker.commerce.department()); - }); - -export default command; diff --git a/src/commands/commerce/index.ts b/src/commands/commerce/index.ts deleted file mode 100644 index 2461aa0..0000000 --- a/src/commands/commerce/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Command } from 'commander'; -import departmentCommand from './department'; -import productNameCommand from './productName'; -import priceCommand from './price'; -import productAdjectiveCommand from './productAdjective'; -import productMaterialCommand from './productMaterial'; -import productCommand from './product'; -import productDescriptionCommand from './productDescription'; - -const command = new Command('commerce') - .description(`Module to generate commerce and product related entries.`) - .addCommand(departmentCommand) - .addCommand(productNameCommand) - .addCommand(priceCommand) - .addCommand(productAdjectiveCommand) - .addCommand(productMaterialCommand) - .addCommand(productCommand) - .addCommand(productDescriptionCommand); - -export default command; diff --git a/src/commands/commerce/price.ts b/src/commands/commerce/price.ts deleted file mode 100644 index 2f6fd03..0000000 --- a/src/commands/commerce/price.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('price') - .description(`Generates a price.`) - .action(() => { - console.log(faker.commerce.price()); - }); - -export default command; diff --git a/src/commands/commerce/product.ts b/src/commands/commerce/product.ts deleted file mode 100644 index efb98ea..0000000 --- a/src/commands/commerce/product.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('product') - .description(`Generates a short product name.`) - .action(() => { - console.log(faker.commerce.product()); - }); - -export default command; diff --git a/src/commands/commerce/productAdjective.ts b/src/commands/commerce/productAdjective.ts deleted file mode 100644 index f63ca33..0000000 --- a/src/commands/commerce/productAdjective.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('productAdjective') - .description(`Generates an adjective describing a product.`) - .action(() => { - console.log(faker.commerce.productAdjective()); - }); - -export default command; diff --git a/src/commands/commerce/productDescription.ts b/src/commands/commerce/productDescription.ts deleted file mode 100644 index 92b3e85..0000000 --- a/src/commands/commerce/productDescription.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('productDescription') - .description(`Generates a product description.`) - .action(() => { - console.log(faker.commerce.productDescription()); - }); - -export default command; diff --git a/src/commands/commerce/productMaterial.ts b/src/commands/commerce/productMaterial.ts deleted file mode 100644 index 12d10af..0000000 --- a/src/commands/commerce/productMaterial.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('productMaterial') - .description(`Generates a material of a product.`) - .action(() => { - console.log(faker.commerce.productMaterial()); - }); - -export default command; diff --git a/src/commands/commerce/productName.ts b/src/commands/commerce/productName.ts deleted file mode 100644 index 665dd94..0000000 --- a/src/commands/commerce/productName.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('productName') - .description(`Generates a random descriptive product name.`) - .action(() => { - console.log(faker.commerce.productName()); - }); - -export default command; diff --git a/src/commands/company/bs.ts b/src/commands/company/bs.ts deleted file mode 100644 index 9f5b737..0000000 --- a/src/commands/company/bs.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('bs') - .description(`Generates a random company bs phrase.`) - .action(() => { - console.log(faker.company.bs()); - }); - -export default command; diff --git a/src/commands/company/bsAdjective.ts b/src/commands/company/bsAdjective.ts deleted file mode 100644 index 778e195..0000000 --- a/src/commands/company/bsAdjective.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('bsAdjective') - .description(`Generates a random company bs adjective.`) - .action(() => { - console.log(faker.company.bsAdjective()); - }); - -export default command; diff --git a/src/commands/company/bsBuzz.ts b/src/commands/company/bsBuzz.ts deleted file mode 100644 index 1f6072e..0000000 --- a/src/commands/company/bsBuzz.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('bsBuzz') - .description(`Generates a random company bs buzz word.`) - .action(() => { - console.log(faker.company.bsBuzz()); - }); - -export default command; diff --git a/src/commands/company/bsNoun.ts b/src/commands/company/bsNoun.ts deleted file mode 100644 index a7e23d3..0000000 --- a/src/commands/company/bsNoun.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('bsNoun') - .description(`Generates a random company bs noun.`) - .action(() => { - console.log(faker.company.bsNoun()); - }); - -export default command; diff --git a/src/commands/company/buzzAdjective.ts b/src/commands/company/buzzAdjective.ts deleted file mode 100644 index 0791aec..0000000 --- a/src/commands/company/buzzAdjective.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('buzzAdjective') - .description( - `Generates a random buzz adjective that can be used to demonstrate data being viewed by a manager.`, - ) - .action(() => { - console.log(faker.company.buzzAdjective()); - }); - -export default command; diff --git a/src/commands/company/buzzNoun.ts b/src/commands/company/buzzNoun.ts deleted file mode 100644 index 8e2cdc8..0000000 --- a/src/commands/company/buzzNoun.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('buzzNoun') - .description( - `Generates a random buzz noun that can be used to demonstrate data being viewed by a manager.`, - ) - .action(() => { - console.log(faker.company.buzzNoun()); - }); - -export default command; diff --git a/src/commands/company/buzzPhrase.ts b/src/commands/company/buzzPhrase.ts deleted file mode 100644 index 5e48dbb..0000000 --- a/src/commands/company/buzzPhrase.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('buzzPhrase') - .description( - `Generates a random buzz phrase that can be used to demonstrate data being viewed by a manager.`, - ) - .action(() => { - console.log(faker.company.buzzPhrase()); - }); - -export default command; diff --git a/src/commands/company/buzzVerb.ts b/src/commands/company/buzzVerb.ts deleted file mode 100644 index 2cc602d..0000000 --- a/src/commands/company/buzzVerb.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('buzzVerb') - .description( - `Generates a random buzz verb that can be used to demonstrate data being viewed by a manager.`, - ) - .action(() => { - console.log(faker.company.buzzVerb()); - }); - -export default command; diff --git a/src/commands/company/catchPhrase.ts b/src/commands/company/catchPhrase.ts deleted file mode 100644 index 7fc4033..0000000 --- a/src/commands/company/catchPhrase.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('catchPhrase') - .description( - `Generates a random catch phrase that can be displayed to an end user.`, - ) - .action(() => { - console.log(faker.company.catchPhrase()); - }); - -export default command; diff --git a/src/commands/company/catchPhraseAdjective.ts b/src/commands/company/catchPhraseAdjective.ts deleted file mode 100644 index 8d86bb7..0000000 --- a/src/commands/company/catchPhraseAdjective.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('catchPhraseAdjective') - .description( - `Generates a random catch phrase adjective that can be displayed to an end user.`, - ) - .action(() => { - console.log(faker.company.catchPhraseAdjective()); - }); - -export default command; diff --git a/src/commands/company/catchPhraseDescriptor.ts b/src/commands/company/catchPhraseDescriptor.ts deleted file mode 100644 index c4903b9..0000000 --- a/src/commands/company/catchPhraseDescriptor.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('catchPhraseDescriptor') - .description( - `Generates a random catch phrase descriptor that can be displayed to an end user.`, - ) - .action(() => { - console.log(faker.company.catchPhraseDescriptor()); - }); - -export default command; diff --git a/src/commands/company/catchPhraseNoun.ts b/src/commands/company/catchPhraseNoun.ts deleted file mode 100644 index b2dd800..0000000 --- a/src/commands/company/catchPhraseNoun.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('catchPhraseNoun') - .description( - `Generates a random catch phrase noun that can be displayed to an end user.`, - ) - .action(() => { - console.log(faker.company.catchPhraseNoun()); - }); - -export default command; diff --git a/src/commands/company/companySuffix.ts b/src/commands/company/companySuffix.ts deleted file mode 100644 index c0273b4..0000000 --- a/src/commands/company/companySuffix.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('companySuffix') - .description(`Generates a random company suffix.`) - .action(() => { - console.log(faker.company.companySuffix()); - }); - -export default command; diff --git a/src/commands/company/index.ts b/src/commands/company/index.ts deleted file mode 100644 index 936ab3b..0000000 --- a/src/commands/company/index.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Command } from 'commander'; -import suffixesCommand from './suffixes'; -import nameCommand from './name'; -import companySuffixCommand from './companySuffix'; -import catchPhraseCommand from './catchPhrase'; -import bsCommand from './bs'; -import buzzPhraseCommand from './buzzPhrase'; -import catchPhraseAdjectiveCommand from './catchPhraseAdjective'; -import catchPhraseDescriptorCommand from './catchPhraseDescriptor'; -import catchPhraseNounCommand from './catchPhraseNoun'; -import bsAdjectiveCommand from './bsAdjective'; -import buzzAdjectiveCommand from './buzzAdjective'; -import bsBuzzCommand from './bsBuzz'; -import buzzVerbCommand from './buzzVerb'; -import bsNounCommand from './bsNoun'; -import buzzNounCommand from './buzzNoun'; - -const command = new Command('company') - .description(`Module to generate company related entries.`) - .addCommand(suffixesCommand) - .addCommand(nameCommand) - .addCommand(companySuffixCommand) - .addCommand(catchPhraseCommand) - .addCommand(bsCommand) - .addCommand(buzzPhraseCommand) - .addCommand(catchPhraseAdjectiveCommand) - .addCommand(catchPhraseDescriptorCommand) - .addCommand(catchPhraseNounCommand) - .addCommand(bsAdjectiveCommand) - .addCommand(buzzAdjectiveCommand) - .addCommand(bsBuzzCommand) - .addCommand(buzzVerbCommand) - .addCommand(bsNounCommand) - .addCommand(buzzNounCommand); - -export default command; diff --git a/src/commands/company/name.ts b/src/commands/company/name.ts deleted file mode 100644 index 503a2f4..0000000 --- a/src/commands/company/name.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('name') - .description(`Generates a random company name.`) - .action(() => { - console.log(faker.company.name()); - }); - -export default command; diff --git a/src/commands/company/suffixes.ts b/src/commands/company/suffixes.ts deleted file mode 100644 index 4754dd0..0000000 --- a/src/commands/company/suffixes.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('suffixes') - .description(`Generates an array with possible company name suffixes.`) - .action(() => { - console.log(faker.company.suffixes()); - }); - -export default command; diff --git a/src/commands/database/collation.ts b/src/commands/database/collation.ts deleted file mode 100644 index 835a601..0000000 --- a/src/commands/database/collation.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('collation') - .description(`Generates a random database collation.`) - .action(() => { - console.log(faker.database.collation()); - }); - -export default command; diff --git a/src/commands/database/column.ts b/src/commands/database/column.ts deleted file mode 100644 index 5bcbb8d..0000000 --- a/src/commands/database/column.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('column') - .description(`Generates a random database column name.`) - .action(() => { - console.log(faker.database.column()); - }); - -export default command; diff --git a/src/commands/database/engine.ts b/src/commands/database/engine.ts deleted file mode 100644 index e3450ed..0000000 --- a/src/commands/database/engine.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('engine') - .description(`Generates a random database engine.`) - .action(() => { - console.log(faker.database.engine()); - }); - -export default command; diff --git a/src/commands/database/index.ts b/src/commands/database/index.ts deleted file mode 100644 index 764534b..0000000 --- a/src/commands/database/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Command } from 'commander'; -import columnCommand from './column'; -import typeCommand from './type'; -import collationCommand from './collation'; -import engineCommand from './engine'; -import mongodbObjectIdCommand from './mongodbObjectId'; - -const command = new Command('database') - .description(`Module to generate database related entries.`) - .addCommand(columnCommand) - .addCommand(typeCommand) - .addCommand(collationCommand) - .addCommand(engineCommand) - .addCommand(mongodbObjectIdCommand); - -export default command; diff --git a/src/commands/database/mongodbObjectId.ts b/src/commands/database/mongodbObjectId.ts deleted file mode 100644 index 94b7ce3..0000000 --- a/src/commands/database/mongodbObjectId.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('mongodbObjectId') - .description(`Generates a MongoDB ObjectId string.`) - .action(() => { - console.log(faker.database.mongodbObjectId()); - }); - -export default command; diff --git a/src/commands/database/type.ts b/src/commands/database/type.ts deleted file mode 100644 index ec61511..0000000 --- a/src/commands/database/type.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('type') - .description(`Generates a random database column type.`) - .action(() => { - console.log(faker.database.type()); - }); - -export default command; diff --git a/src/commands/datatype/array.ts b/src/commands/datatype/array.ts deleted file mode 100644 index eb37576..0000000 --- a/src/commands/datatype/array.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('array') - .description(`Generates an array with random strings and numbers.`) - .action(() => { - console.log(faker.datatype.array()); - }); - -export default command; diff --git a/src/commands/datatype/bigInt.ts b/src/commands/datatype/bigInt.ts deleted file mode 100644 index 6a3e5c6..0000000 --- a/src/commands/datatype/bigInt.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('bigInt') - .description(`Generates a BigInt number.`) - .action(() => { - console.log(faker.datatype.bigInt()); - }); - -export default command; diff --git a/src/commands/datatype/boolean.ts b/src/commands/datatype/boolean.ts deleted file mode 100644 index 2a17ac7..0000000 --- a/src/commands/datatype/boolean.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('boolean') - .description(`Generates the boolean value true or false.`) - .action(() => { - console.log(faker.datatype.boolean()); - }); - -export default command; diff --git a/src/commands/datatype/datetime.ts b/src/commands/datatype/datetime.ts deleted file mode 100644 index f3ba187..0000000 --- a/src/commands/datatype/datetime.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('datetime') - .description( - `Generates a Date object using a random number of milliseconds since`, - ) - .action(() => { - console.log(faker.datatype.datetime()); - }); - -export default command; diff --git a/src/commands/datatype/float.ts b/src/commands/datatype/float.ts deleted file mode 100644 index f557f5f..0000000 --- a/src/commands/datatype/float.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('float') - .description( - `Generates a single random floating-point number between zero and 99999.`, - ) - .action(() => { - console.log(faker.datatype.float({})); - }); - -export default command; diff --git a/src/commands/datatype/hexadecimal.ts b/src/commands/datatype/hexadecimal.ts deleted file mode 100644 index cd09da2..0000000 --- a/src/commands/datatype/hexadecimal.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('hexadecimal') - .description( - `Generates a [hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal) number.`, - ) - .action(() => { - console.log(faker.datatype.hexadecimal()); - }); - -export default command; diff --git a/src/commands/datatype/index.ts b/src/commands/datatype/index.ts deleted file mode 100644 index 5e8c975..0000000 --- a/src/commands/datatype/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Command } from 'commander'; -import numberCommand from './number'; -import floatCommand from './float'; -import datetimeCommand from './datetime'; -import stringCommand from './string'; -import uuidCommand from './uuid'; -import booleanCommand from './boolean'; -import hexadecimalCommand from './hexadecimal'; -import jsonCommand from './json'; -import arrayCommand from './array'; -import bigIntCommand from './bigInt'; - -const command = new Command('datatype') - .description(`Module to generate various primitive values and data types.`) - .addCommand(numberCommand) - .addCommand(floatCommand) - .addCommand(datetimeCommand) - .addCommand(stringCommand) - .addCommand(uuidCommand) - .addCommand(booleanCommand) - .addCommand(hexadecimalCommand) - .addCommand(jsonCommand) - .addCommand(arrayCommand) - .addCommand(bigIntCommand); - -export default command; diff --git a/src/commands/datatype/json.ts b/src/commands/datatype/json.ts deleted file mode 100644 index 5c939e5..0000000 --- a/src/commands/datatype/json.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('json') - .description( - `Generates a string representing JSON object with 7 pre-defined properties.`, - ) - .action(() => { - console.log(faker.datatype.json()); - }); - -export default command; diff --git a/src/commands/datatype/number.ts b/src/commands/datatype/number.ts deleted file mode 100644 index 5d59de6..0000000 --- a/src/commands/datatype/number.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('number') - .description(`Generates a single random number between zero and 99999.`) - .action(() => { - console.log(faker.datatype.number()); - }); - -export default command; diff --git a/src/commands/datatype/string.ts b/src/commands/datatype/string.ts deleted file mode 100644 index 892645e..0000000 --- a/src/commands/datatype/string.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('string') - .description( - `Generates a string containing UTF-16 chars between 33 and 125 (\`!\` to \`}\`).`, - ) - .action(() => { - console.log(faker.datatype.string()); - }); - -export default command; diff --git a/src/commands/datatype/uuid.ts b/src/commands/datatype/uuid.ts deleted file mode 100644 index 5b3ec32..0000000 --- a/src/commands/datatype/uuid.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('uuid') - .description(`Generates a UUID v4 (Universally Unique Identifier).`) - .action(() => { - console.log(faker.datatype.uuid()); - }); - -export default command; diff --git a/src/commands/date/anytime.ts b/src/commands/date/anytime.ts deleted file mode 100644 index 5c96132..0000000 --- a/src/commands/date/anytime.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('anytime') - .description( - `Generates a random date that can be either in the past or in the future.`, - ) - .action(() => { - console.log(faker.date.anytime()); - }); - -export default command; diff --git a/src/commands/date/birthdate.ts b/src/commands/date/birthdate.ts deleted file mode 100644 index 2a74be3..0000000 --- a/src/commands/date/birthdate.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('birthdate') - .description(`Generates a random birthdate.`) - .action(() => { - console.log(faker.date.birthdate()); - }); - -export default command; diff --git a/src/commands/date/future.ts b/src/commands/date/future.ts deleted file mode 100644 index 37e6eeb..0000000 --- a/src/commands/date/future.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('future') - .description(`Generates a random date in the future.`) - .action(() => { - console.log(faker.date.future()); - }); - -export default command; diff --git a/src/commands/date/index.ts b/src/commands/date/index.ts deleted file mode 100644 index bb1261d..0000000 --- a/src/commands/date/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Command } from 'commander'; -import anytimeCommand from './anytime'; -import pastCommand from './past'; -import futureCommand from './future'; -import recentCommand from './recent'; -import soonCommand from './soon'; -import monthCommand from './month'; -import weekdayCommand from './weekday'; -import birthdateCommand from './birthdate'; - -const command = new Command('date') - .description(`Module to generate dates.`) - .addCommand(anytimeCommand) - .addCommand(pastCommand) - .addCommand(futureCommand) - .addCommand(recentCommand) - .addCommand(soonCommand) - .addCommand(monthCommand) - .addCommand(weekdayCommand) - .addCommand(birthdateCommand); - -export default command; diff --git a/src/commands/date/month.ts b/src/commands/date/month.ts deleted file mode 100644 index 5dd62be..0000000 --- a/src/commands/date/month.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('month') - .description(`Generates a random name of a month.`) - .action(() => { - console.log(faker.date.month()); - }); - -export default command; diff --git a/src/commands/date/past.ts b/src/commands/date/past.ts deleted file mode 100644 index 50676f9..0000000 --- a/src/commands/date/past.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('past') - .description(`Generates a random date in the past.`) - .action(() => { - console.log(faker.date.past()); - }); - -export default command; diff --git a/src/commands/date/recent.ts b/src/commands/date/recent.ts deleted file mode 100644 index 0afa1a8..0000000 --- a/src/commands/date/recent.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('recent') - .description(`Generates a random date in the recent past.`) - .action(() => { - console.log(faker.date.recent()); - }); - -export default command; diff --git a/src/commands/date/soon.ts b/src/commands/date/soon.ts deleted file mode 100644 index a917c54..0000000 --- a/src/commands/date/soon.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('soon') - .description(`Generates a random date in the near future.`) - .action(() => { - console.log(faker.date.soon()); - }); - -export default command; diff --git a/src/commands/date/weekday.ts b/src/commands/date/weekday.ts deleted file mode 100644 index 9d9a164..0000000 --- a/src/commands/date/weekday.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('weekday') - .description(`Generates a random day of the week.`) - .action(() => { - console.log(faker.date.weekday()); - }); - -export default command; diff --git a/src/commands/finance/account.ts b/src/commands/finance/account.ts deleted file mode 100644 index 3ba008f..0000000 --- a/src/commands/finance/account.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('account') - .description(`Generates a random account number.`) - .action(() => { - console.log(faker.finance.account()); - }); - -export default command; diff --git a/src/commands/finance/accountName.ts b/src/commands/finance/accountName.ts deleted file mode 100644 index 3b90b8e..0000000 --- a/src/commands/finance/accountName.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('accountName') - .description(`Generates a random account name.`) - .action(() => { - console.log(faker.finance.accountName()); - }); - -export default command; diff --git a/src/commands/finance/accountNumber.ts b/src/commands/finance/accountNumber.ts deleted file mode 100644 index 92f5105..0000000 --- a/src/commands/finance/accountNumber.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('accountNumber') - .description(`Generates a random account number.`) - .action(() => { - console.log(faker.finance.accountNumber()); - }); - -export default command; diff --git a/src/commands/finance/amount.ts b/src/commands/finance/amount.ts deleted file mode 100644 index 2b0e3d8..0000000 --- a/src/commands/finance/amount.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('amount') - .description( - `Generates a random amount between the given bounds (inclusive).`, - ) - .action(() => { - console.log(faker.finance.amount()); - }); - -export default command; diff --git a/src/commands/finance/bic.ts b/src/commands/finance/bic.ts deleted file mode 100644 index 1f5e2dc..0000000 --- a/src/commands/finance/bic.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('bic') - .description( - `Generates a random SWIFT/BIC code based on the ISO-9362 format.`, - ) - .action(() => { - console.log(faker.finance.bic()); - }); - -export default command; diff --git a/src/commands/finance/bitcoinAddress.ts b/src/commands/finance/bitcoinAddress.ts deleted file mode 100644 index b369f43..0000000 --- a/src/commands/finance/bitcoinAddress.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('bitcoinAddress') - .description(`Generates a random Bitcoin address.`) - .action(() => { - console.log(faker.finance.bitcoinAddress()); - }); - -export default command; diff --git a/src/commands/finance/creditCardCVV.ts b/src/commands/finance/creditCardCVV.ts deleted file mode 100644 index bf816f6..0000000 --- a/src/commands/finance/creditCardCVV.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('creditCardCVV') - .description(`Generates a random credit card CVV.`) - .action(() => { - console.log(faker.finance.creditCardCVV()); - }); - -export default command; diff --git a/src/commands/finance/creditCardIssuer.ts b/src/commands/finance/creditCardIssuer.ts deleted file mode 100644 index b3129ee..0000000 --- a/src/commands/finance/creditCardIssuer.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('creditCardIssuer') - .description(`Generates a random credit card issuer.`) - .action(() => { - console.log(faker.finance.creditCardIssuer()); - }); - -export default command; diff --git a/src/commands/finance/creditCardNumber.ts b/src/commands/finance/creditCardNumber.ts deleted file mode 100644 index a30884b..0000000 --- a/src/commands/finance/creditCardNumber.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('creditCardNumber') - .description(`Generates a random credit card number.`) - .action(() => { - console.log(faker.finance.creditCardNumber()); - }); - -export default command; diff --git a/src/commands/finance/currency.ts b/src/commands/finance/currency.ts deleted file mode 100644 index d4fa019..0000000 --- a/src/commands/finance/currency.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('currency') - .description( - `Generates a random currency object, containing \`code\`, \`name \`and \`symbol\` properties.`, - ) - .action(() => { - console.log(faker.finance.currency()); - }); - -export default command; diff --git a/src/commands/finance/currencyCode.ts b/src/commands/finance/currencyCode.ts deleted file mode 100644 index dd5ef7a..0000000 --- a/src/commands/finance/currencyCode.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('currencyCode') - .description(`Generates a random currency code.`) - .action(() => { - console.log(faker.finance.currencyCode()); - }); - -export default command; diff --git a/src/commands/finance/currencyName.ts b/src/commands/finance/currencyName.ts deleted file mode 100644 index fc9d336..0000000 --- a/src/commands/finance/currencyName.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('currencyName') - .description(`Generates a random currency name.`) - .action(() => { - console.log(faker.finance.currencyName()); - }); - -export default command; diff --git a/src/commands/finance/currencySymbol.ts b/src/commands/finance/currencySymbol.ts deleted file mode 100644 index 3c8a204..0000000 --- a/src/commands/finance/currencySymbol.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('currencySymbol') - .description(`Generates a random currency symbol.`) - .action(() => { - console.log(faker.finance.currencySymbol()); - }); - -export default command; diff --git a/src/commands/finance/ethereumAddress.ts b/src/commands/finance/ethereumAddress.ts deleted file mode 100644 index 0090f1a..0000000 --- a/src/commands/finance/ethereumAddress.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('ethereumAddress') - .description(`Generates a random, non-checksum Ethereum address.`) - .action(() => { - console.log(faker.finance.ethereumAddress()); - }); - -export default command; diff --git a/src/commands/finance/iban.ts b/src/commands/finance/iban.ts deleted file mode 100644 index f41b1d7..0000000 --- a/src/commands/finance/iban.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('iban') - .description(`Generates a random iban.`) - .action(() => { - console.log(faker.finance.iban()); - }); - -export default command; diff --git a/src/commands/finance/index.ts b/src/commands/finance/index.ts deleted file mode 100644 index a4c593c..0000000 --- a/src/commands/finance/index.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Command } from 'commander'; -import accountCommand from './account'; -import accountNumberCommand from './accountNumber'; -import accountNameCommand from './accountName'; -import routingNumberCommand from './routingNumber'; -import maskCommand from './mask'; -import maskedNumberCommand from './maskedNumber'; -import amountCommand from './amount'; -import transactionTypeCommand from './transactionType'; -import currencyCommand from './currency'; -import currencyCodeCommand from './currencyCode'; -import currencyNameCommand from './currencyName'; -import currencySymbolCommand from './currencySymbol'; -import bitcoinAddressCommand from './bitcoinAddress'; -import litecoinAddressCommand from './litecoinAddress'; -import creditCardNumberCommand from './creditCardNumber'; -import creditCardCVVCommand from './creditCardCVV'; -import creditCardIssuerCommand from './creditCardIssuer'; -import pinCommand from './pin'; -import ethereumAddressCommand from './ethereumAddress'; -import ibanCommand from './iban'; -import bicCommand from './bic'; -import transactionDescriptionCommand from './transactionDescription'; - -const command = new Command('finance') - .description(`Module to generate finance and money related entries.`) - .addCommand(accountCommand) - .addCommand(accountNumberCommand) - .addCommand(accountNameCommand) - .addCommand(routingNumberCommand) - .addCommand(maskCommand) - .addCommand(maskedNumberCommand) - .addCommand(amountCommand) - .addCommand(transactionTypeCommand) - .addCommand(currencyCommand) - .addCommand(currencyCodeCommand) - .addCommand(currencyNameCommand) - .addCommand(currencySymbolCommand) - .addCommand(bitcoinAddressCommand) - .addCommand(litecoinAddressCommand) - .addCommand(creditCardNumberCommand) - .addCommand(creditCardCVVCommand) - .addCommand(creditCardIssuerCommand) - .addCommand(pinCommand) - .addCommand(ethereumAddressCommand) - .addCommand(ibanCommand) - .addCommand(bicCommand) - .addCommand(transactionDescriptionCommand); - -export default command; diff --git a/src/commands/finance/litecoinAddress.ts b/src/commands/finance/litecoinAddress.ts deleted file mode 100644 index 7be59cb..0000000 --- a/src/commands/finance/litecoinAddress.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('litecoinAddress') - .description(`Generates a random Litecoin address.`) - .action(() => { - console.log(faker.finance.litecoinAddress()); - }); - -export default command; diff --git a/src/commands/finance/mask.ts b/src/commands/finance/mask.ts deleted file mode 100644 index b104225..0000000 --- a/src/commands/finance/mask.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('mask') - .description(`Generates a random masked number.`) - .action(() => { - console.log(faker.finance.mask()); - }); - -export default command; diff --git a/src/commands/finance/maskedNumber.ts b/src/commands/finance/maskedNumber.ts deleted file mode 100644 index 4ad8b58..0000000 --- a/src/commands/finance/maskedNumber.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('maskedNumber') - .description(`Generates a random masked number.`) - .action(() => { - console.log(faker.finance.maskedNumber()); - }); - -export default command; diff --git a/src/commands/finance/pin.ts b/src/commands/finance/pin.ts deleted file mode 100644 index 6b0f230..0000000 --- a/src/commands/finance/pin.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('pin') - .description(`Generates a random PIN number.`) - .action(() => { - console.log(faker.finance.pin()); - }); - -export default command; diff --git a/src/commands/finance/routingNumber.ts b/src/commands/finance/routingNumber.ts deleted file mode 100644 index 4f58f4c..0000000 --- a/src/commands/finance/routingNumber.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('routingNumber') - .description(`Generates a random routing number.`) - .action(() => { - console.log(faker.finance.routingNumber()); - }); - -export default command; diff --git a/src/commands/finance/transactionDescription.ts b/src/commands/finance/transactionDescription.ts deleted file mode 100644 index 1397a1b..0000000 --- a/src/commands/finance/transactionDescription.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('transactionDescription') - .description(`Generates a random transaction description.`) - .action(() => { - console.log(faker.finance.transactionDescription()); - }); - -export default command; diff --git a/src/commands/finance/transactionType.ts b/src/commands/finance/transactionType.ts deleted file mode 100644 index a585c26..0000000 --- a/src/commands/finance/transactionType.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('transactionType') - .description(`Generates a random transaction type.`) - .action(() => { - console.log(faker.finance.transactionType()); - }); - -export default command; diff --git a/src/commands/git/branch.ts b/src/commands/git/branch.ts deleted file mode 100644 index fff7d3a..0000000 --- a/src/commands/git/branch.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('branch') - .description(`Generates a random branch name.`) - .action(() => { - console.log(faker.git.branch()); - }); - -export default command; diff --git a/src/commands/git/commitDate.ts b/src/commands/git/commitDate.ts deleted file mode 100644 index af44de7..0000000 --- a/src/commands/git/commitDate.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('commitDate') - .description( - `Generates a date string for a git commit using the same format as \`git log\`.`, - ) - .action(() => { - console.log(faker.git.commitDate()); - }); - -export default command; diff --git a/src/commands/git/commitEntry.ts b/src/commands/git/commitEntry.ts deleted file mode 100644 index a108f08..0000000 --- a/src/commands/git/commitEntry.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('commitEntry') - .description(`Generates a random commit entry as printed by \`git log\`.`) - .action(() => { - console.log(faker.git.commitEntry()); - }); - -export default command; diff --git a/src/commands/git/commitMessage.ts b/src/commands/git/commitMessage.ts deleted file mode 100644 index 4eee2fe..0000000 --- a/src/commands/git/commitMessage.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('commitMessage') - .description(`Generates a random commit message.`) - .action(() => { - console.log(faker.git.commitMessage()); - }); - -export default command; diff --git a/src/commands/git/commitSha.ts b/src/commands/git/commitSha.ts deleted file mode 100644 index 712c460..0000000 --- a/src/commands/git/commitSha.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('commitSha') - .description(`Generates a random commit sha.`) - .action(() => { - console.log(faker.git.commitSha()); - }); - -export default command; diff --git a/src/commands/git/index.ts b/src/commands/git/index.ts deleted file mode 100644 index 2cb2659..0000000 --- a/src/commands/git/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Command } from 'commander'; -import branchCommand from './branch'; -import commitEntryCommand from './commitEntry'; -import commitMessageCommand from './commitMessage'; -import commitDateCommand from './commitDate'; -import commitShaCommand from './commitSha'; -import shortShaCommand from './shortSha'; - -const command = new Command('git') - .description(`Module to generate git related entries.`) - .addCommand(branchCommand) - .addCommand(commitEntryCommand) - .addCommand(commitMessageCommand) - .addCommand(commitDateCommand) - .addCommand(commitShaCommand) - .addCommand(shortShaCommand); - -export default command; diff --git a/src/commands/git/shortSha.ts b/src/commands/git/shortSha.ts deleted file mode 100644 index f2b000f..0000000 --- a/src/commands/git/shortSha.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('shortSha') - .description(`Generates a random commit sha (short).`) - .action(() => { - console.log(faker.git.shortSha()); - }); - -export default command; diff --git a/src/commands/hacker/abbreviation.ts b/src/commands/hacker/abbreviation.ts deleted file mode 100644 index 94f5610..0000000 --- a/src/commands/hacker/abbreviation.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('abbreviation') - .description(`Generates a random hacker/IT abbreviation.`) - .action(() => { - console.log(faker.hacker.abbreviation()); - }); - -export default command; diff --git a/src/commands/hacker/adjective.ts b/src/commands/hacker/adjective.ts deleted file mode 100644 index 7ed23b0..0000000 --- a/src/commands/hacker/adjective.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('adjective') - .description(`Generates a random hacker/IT adjective.`) - .action(() => { - console.log(faker.hacker.adjective()); - }); - -export default command; diff --git a/src/commands/hacker/index.ts b/src/commands/hacker/index.ts deleted file mode 100644 index ecd0693..0000000 --- a/src/commands/hacker/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Command } from 'commander'; -import abbreviationCommand from './abbreviation'; -import adjectiveCommand from './adjective'; -import nounCommand from './noun'; -import verbCommand from './verb'; -import ingverbCommand from './ingverb'; -import phraseCommand from './phrase'; - -const command = new Command('hacker') - .description(`Module to generate hacker/IT words and phrases.`) - .addCommand(abbreviationCommand) - .addCommand(adjectiveCommand) - .addCommand(nounCommand) - .addCommand(verbCommand) - .addCommand(ingverbCommand) - .addCommand(phraseCommand); - -export default command; diff --git a/src/commands/hacker/ingverb.ts b/src/commands/hacker/ingverb.ts deleted file mode 100644 index 6f03fee..0000000 --- a/src/commands/hacker/ingverb.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('ingverb') - .description( - `Generates a random hacker/IT verb for continuous actions (en: ing suffix; e.g. hacking).`, - ) - .action(() => { - console.log(faker.hacker.ingverb()); - }); - -export default command; diff --git a/src/commands/hacker/noun.ts b/src/commands/hacker/noun.ts deleted file mode 100644 index 46763c9..0000000 --- a/src/commands/hacker/noun.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('noun') - .description(`Generates a random hacker/IT noun.`) - .action(() => { - console.log(faker.hacker.noun()); - }); - -export default command; diff --git a/src/commands/hacker/phrase.ts b/src/commands/hacker/phrase.ts deleted file mode 100644 index 73c29fa..0000000 --- a/src/commands/hacker/phrase.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('phrase') - .description(`Generates a random hacker/IT phrase.`) - .action(() => { - console.log(faker.hacker.phrase()); - }); - -export default command; diff --git a/src/commands/hacker/verb.ts b/src/commands/hacker/verb.ts deleted file mode 100644 index bfe01ed..0000000 --- a/src/commands/hacker/verb.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('verb') - .description(`Generates a random hacker/IT verb.`) - .action(() => { - console.log(faker.hacker.verb()); - }); - -export default command; diff --git a/src/commands/image/abstract.ts b/src/commands/image/abstract.ts deleted file mode 100644 index 7732074..0000000 --- a/src/commands/image/abstract.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('abstract') - .description(`Generates a random abstract image url.`) - .action(() => { - console.log(faker.image.abstract()); - }); - -export default command; diff --git a/src/commands/image/animals.ts b/src/commands/image/animals.ts deleted file mode 100644 index 9b825f1..0000000 --- a/src/commands/image/animals.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('animals') - .description(`Generates a random animal image url.`) - .action(() => { - console.log(faker.image.animals()); - }); - -export default command; diff --git a/src/commands/image/avatar.ts b/src/commands/image/avatar.ts deleted file mode 100644 index a2062e9..0000000 --- a/src/commands/image/avatar.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('avatar') - .description(`Generates a random avatar image url.`) - .action(() => { - console.log(faker.image.avatar()); - }); - -export default command; diff --git a/src/commands/image/avatarGitHub.ts b/src/commands/image/avatarGitHub.ts deleted file mode 100644 index 90226e0..0000000 --- a/src/commands/image/avatarGitHub.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('avatarGitHub') - .description(`Generates a random avatar from GitHub.`) - .action(() => { - console.log(faker.image.avatarGitHub()); - }); - -export default command; diff --git a/src/commands/image/avatarLegacy.ts b/src/commands/image/avatarLegacy.ts deleted file mode 100644 index 78e8c4a..0000000 --- a/src/commands/image/avatarLegacy.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('avatarLegacy') - .description( - `Generates a random avatar from \`https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar\`.`, - ) - .action(() => { - console.log(faker.image.avatarLegacy()); - }); - -export default command; diff --git a/src/commands/image/business.ts b/src/commands/image/business.ts deleted file mode 100644 index 405c920..0000000 --- a/src/commands/image/business.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('business') - .description(`Generates a random business image url.`) - .action(() => { - console.log(faker.image.business()); - }); - -export default command; diff --git a/src/commands/image/cats.ts b/src/commands/image/cats.ts deleted file mode 100644 index 2e25311..0000000 --- a/src/commands/image/cats.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('cats') - .description(`Generates a random cat image url.`) - .action(() => { - console.log(faker.image.cats()); - }); - -export default command; diff --git a/src/commands/image/city.ts b/src/commands/image/city.ts deleted file mode 100644 index f76d32d..0000000 --- a/src/commands/image/city.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('city') - .description(`Generates a random city image url.`) - .action(() => { - console.log(faker.image.city()); - }); - -export default command; diff --git a/src/commands/image/dataUri.ts b/src/commands/image/dataUri.ts deleted file mode 100644 index 5442415..0000000 --- a/src/commands/image/dataUri.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('dataUri') - .description(`Generates a random data uri containing an svg image.`) - .action(() => { - console.log(faker.image.dataUri()); - }); - -export default command; diff --git a/src/commands/image/fashion.ts b/src/commands/image/fashion.ts deleted file mode 100644 index d33b936..0000000 --- a/src/commands/image/fashion.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('fashion') - .description(`Generates a random fashion image url.`) - .action(() => { - console.log(faker.image.fashion()); - }); - -export default command; diff --git a/src/commands/image/food.ts b/src/commands/image/food.ts deleted file mode 100644 index bde24c4..0000000 --- a/src/commands/image/food.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('food') - .description(`Generates a random food image url.`) - .action(() => { - console.log(faker.image.food()); - }); - -export default command; diff --git a/src/commands/image/image.ts b/src/commands/image/image.ts deleted file mode 100644 index 94033bd..0000000 --- a/src/commands/image/image.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('image') - .description( - `Generates a random image url from one of the supported categories.`, - ) - .action(() => { - console.log(faker.image.image()); - }); - -export default command; diff --git a/src/commands/image/imageUrl.ts b/src/commands/image/imageUrl.ts deleted file mode 100644 index 043334b..0000000 --- a/src/commands/image/imageUrl.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('imageUrl') - .description(`Generates a random image url.`) - .action(() => { - console.log(faker.image.imageUrl()); - }); - -export default command; diff --git a/src/commands/image/index.ts b/src/commands/image/index.ts deleted file mode 100644 index 800cef3..0000000 --- a/src/commands/image/index.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Command } from 'commander'; -import avatarCommand from './avatar'; -import avatarGitHubCommand from './avatarGitHub'; -import avatarLegacyCommand from './avatarLegacy'; -import urlCommand from './url'; -import urlLoremFlickrCommand from './urlLoremFlickr'; -import urlPicsumPhotosCommand from './urlPicsumPhotos'; -import urlPlaceholderCommand from './urlPlaceholder'; -import dataUriCommand from './dataUri'; -import imageCommand from './image'; -import imageUrlCommand from './imageUrl'; -import abstractCommand from './abstract'; -import animalsCommand from './animals'; -import businessCommand from './business'; -import catsCommand from './cats'; -import cityCommand from './city'; -import foodCommand from './food'; -import nightlifeCommand from './nightlife'; -import fashionCommand from './fashion'; -import peopleCommand from './people'; -import natureCommand from './nature'; -import sportsCommand from './sports'; -import technicsCommand from './technics'; -import transportCommand from './transport'; - -const command = new Command('image') - .description(`Module to generate images.`) - .addCommand(avatarCommand) - .addCommand(avatarGitHubCommand) - .addCommand(avatarLegacyCommand) - .addCommand(urlCommand) - .addCommand(urlLoremFlickrCommand) - .addCommand(urlPicsumPhotosCommand) - .addCommand(urlPlaceholderCommand) - .addCommand(dataUriCommand) - .addCommand(imageCommand) - .addCommand(imageUrlCommand) - .addCommand(abstractCommand) - .addCommand(animalsCommand) - .addCommand(businessCommand) - .addCommand(catsCommand) - .addCommand(cityCommand) - .addCommand(foodCommand) - .addCommand(nightlifeCommand) - .addCommand(fashionCommand) - .addCommand(peopleCommand) - .addCommand(natureCommand) - .addCommand(sportsCommand) - .addCommand(technicsCommand) - .addCommand(transportCommand); - -export default command; diff --git a/src/commands/image/nature.ts b/src/commands/image/nature.ts deleted file mode 100644 index a0837a9..0000000 --- a/src/commands/image/nature.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('nature') - .description(`Generates a random nature image url.`) - .action(() => { - console.log(faker.image.nature()); - }); - -export default command; diff --git a/src/commands/image/nightlife.ts b/src/commands/image/nightlife.ts deleted file mode 100644 index 2485daa..0000000 --- a/src/commands/image/nightlife.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('nightlife') - .description(`Generates a random nightlife image url.`) - .action(() => { - console.log(faker.image.nightlife()); - }); - -export default command; diff --git a/src/commands/image/people.ts b/src/commands/image/people.ts deleted file mode 100644 index 0f9c0c1..0000000 --- a/src/commands/image/people.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('people') - .description(`Generates a random people image url.`) - .action(() => { - console.log(faker.image.people()); - }); - -export default command; diff --git a/src/commands/image/sports.ts b/src/commands/image/sports.ts deleted file mode 100644 index bf5c774..0000000 --- a/src/commands/image/sports.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('sports') - .description(`Generates a random sports image url.`) - .action(() => { - console.log(faker.image.sports()); - }); - -export default command; diff --git a/src/commands/image/technics.ts b/src/commands/image/technics.ts deleted file mode 100644 index 125b249..0000000 --- a/src/commands/image/technics.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('technics') - .description(`Generates a random technics image url.`) - .action(() => { - console.log(faker.image.technics()); - }); - -export default command; diff --git a/src/commands/image/transport.ts b/src/commands/image/transport.ts deleted file mode 100644 index a3e70bc..0000000 --- a/src/commands/image/transport.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('transport') - .description(`Generates a random transport image url.`) - .action(() => { - console.log(faker.image.transport()); - }); - -export default command; diff --git a/src/commands/image/url.ts b/src/commands/image/url.ts deleted file mode 100644 index 8d67d34..0000000 --- a/src/commands/image/url.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('url') - .description(`Generates a random image url.`) - .action(() => { - console.log(faker.image.url()); - }); - -export default command; diff --git a/src/commands/image/urlLoremFlickr.ts b/src/commands/image/urlLoremFlickr.ts deleted file mode 100644 index a6374f9..0000000 --- a/src/commands/image/urlLoremFlickr.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('urlLoremFlickr') - .description( - `Generates a random image url provided via https://loremflickr.com.`, - ) - .action(() => { - console.log(faker.image.urlLoremFlickr()); - }); - -export default command; diff --git a/src/commands/image/urlPicsumPhotos.ts b/src/commands/image/urlPicsumPhotos.ts deleted file mode 100644 index 228534f..0000000 --- a/src/commands/image/urlPicsumPhotos.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('urlPicsumPhotos') - .description( - `Generates a random image url provided via https://picsum.photos.`, - ) - .action(() => { - console.log(faker.image.urlPicsumPhotos()); - }); - -export default command; diff --git a/src/commands/image/urlPlaceholder.ts b/src/commands/image/urlPlaceholder.ts deleted file mode 100644 index 13b1d46..0000000 --- a/src/commands/image/urlPlaceholder.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('urlPlaceholder') - .description( - `Generates a random image url provided via https://via.placeholder.com/.`, - ) - .action(() => { - console.log(faker.image.urlPlaceholder()); - }); - -export default command; diff --git a/src/commands/index.ts b/src/commands/index.ts deleted file mode 100644 index 7072aa1..0000000 --- a/src/commands/index.ts +++ /dev/null @@ -1,53 +0,0 @@ -import airlineModule from './airline'; -import animalModule from './animal'; -import colorModule from './color'; -import commerceModule from './commerce'; -import companyModule from './company'; -import databaseModule from './database'; -import datatypeModule from './datatype'; -import dateModule from './date'; -import financeModule from './finance'; -import gitModule from './git'; -import hackerModule from './hacker'; -import imageModule from './image'; -import internetModule from './internet'; -import locationModule from './location'; -import loremModule from './lorem'; -import musicModule from './music'; -import numberModule from './number'; -import personModule from './person'; -import phoneModule from './phone'; -import scienceModule from './science'; -import stringModule from './string'; -import systemModule from './system'; -import vehicleModule from './vehicle'; -import wordModule from './word'; - -const commands = [ - airlineModule, - animalModule, - colorModule, - commerceModule, - companyModule, - databaseModule, - datatypeModule, - dateModule, - financeModule, - gitModule, - hackerModule, - imageModule, - internetModule, - locationModule, - loremModule, - musicModule, - numberModule, - personModule, - phoneModule, - scienceModule, - stringModule, - systemModule, - vehicleModule, - wordModule, -]; - -export default commands; diff --git a/src/commands/internet/avatar.ts b/src/commands/internet/avatar.ts deleted file mode 100644 index 0470d8b..0000000 --- a/src/commands/internet/avatar.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('avatar') - .description(`Generates a random avatar url.`) - .action(() => { - console.log(faker.internet.avatar()); - }); - -export default command; diff --git a/src/commands/internet/color.ts b/src/commands/internet/color.ts deleted file mode 100644 index 4501fc4..0000000 --- a/src/commands/internet/color.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('color') - .description( - `Generates a random css hex color code in aesthetically pleasing color palette.`, - ) - .action(() => { - console.log(faker.internet.color()); - }); - -export default command; diff --git a/src/commands/internet/displayName.ts b/src/commands/internet/displayName.ts deleted file mode 100644 index 039d203..0000000 --- a/src/commands/internet/displayName.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('displayName') - .description( - `Generates a display name using the given person's name as base.`, - ) - .action(() => { - console.log(faker.internet.displayName()); - }); - -export default command; diff --git a/src/commands/internet/domainName.ts b/src/commands/internet/domainName.ts deleted file mode 100644 index bafc477..0000000 --- a/src/commands/internet/domainName.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('domainName') - .description(`Generates a random domain name.`) - .action(() => { - console.log(faker.internet.domainName()); - }); - -export default command; diff --git a/src/commands/internet/domainSuffix.ts b/src/commands/internet/domainSuffix.ts deleted file mode 100644 index 10bdc42..0000000 --- a/src/commands/internet/domainSuffix.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('domainSuffix') - .description(`Generates a random domain suffix.`) - .action(() => { - console.log(faker.internet.domainSuffix()); - }); - -export default command; diff --git a/src/commands/internet/domainWord.ts b/src/commands/internet/domainWord.ts deleted file mode 100644 index 8cb1985..0000000 --- a/src/commands/internet/domainWord.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('domainWord') - .description(`Generates a random domain word.`) - .action(() => { - console.log(faker.internet.domainWord()); - }); - -export default command; diff --git a/src/commands/internet/email.ts b/src/commands/internet/email.ts deleted file mode 100644 index e932c04..0000000 --- a/src/commands/internet/email.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('email') - .description(`Generates an email address.`) - .action(() => { - console.log(faker.internet.email()); - }); - -export default command; diff --git a/src/commands/internet/emoji.ts b/src/commands/internet/emoji.ts deleted file mode 100644 index d640b39..0000000 --- a/src/commands/internet/emoji.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('emoji') - .description(`Generates a random emoji.`) - .action(() => { - console.log(faker.internet.emoji()); - }); - -export default command; diff --git a/src/commands/internet/exampleEmail.ts b/src/commands/internet/exampleEmail.ts deleted file mode 100644 index c74b4fd..0000000 --- a/src/commands/internet/exampleEmail.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('exampleEmail') - .description(`Generates an email address using an example mail provider.`) - .action(() => { - console.log(faker.internet.exampleEmail()); - }); - -export default command; diff --git a/src/commands/internet/httpMethod.ts b/src/commands/internet/httpMethod.ts deleted file mode 100644 index c854fb4..0000000 --- a/src/commands/internet/httpMethod.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('httpMethod') - .description(`Generates a random http method.`) - .action(() => { - console.log(faker.internet.httpMethod()); - }); - -export default command; diff --git a/src/commands/internet/httpStatusCode.ts b/src/commands/internet/httpStatusCode.ts deleted file mode 100644 index 9dd7b61..0000000 --- a/src/commands/internet/httpStatusCode.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('httpStatusCode') - .description(`Generates a random HTTP status code.`) - .action(() => { - console.log(faker.internet.httpStatusCode()); - }); - -export default command; diff --git a/src/commands/internet/index.ts b/src/commands/internet/index.ts deleted file mode 100644 index 9af9a30..0000000 --- a/src/commands/internet/index.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Command } from 'commander'; -import avatarCommand from './avatar'; -import emailCommand from './email'; -import exampleEmailCommand from './exampleEmail'; -import userNameCommand from './userName'; -import displayNameCommand from './displayName'; -import protocolCommand from './protocol'; -import httpMethodCommand from './httpMethod'; -import httpStatusCodeCommand from './httpStatusCode'; -import urlCommand from './url'; -import domainNameCommand from './domainName'; -import domainSuffixCommand from './domainSuffix'; -import domainWordCommand from './domainWord'; -import ipCommand from './ip'; -import ipv4Command from './ipv4'; -import ipv6Command from './ipv6'; -import portCommand from './port'; -import userAgentCommand from './userAgent'; -import colorCommand from './color'; -import macCommand from './mac'; -import passwordCommand from './password'; -import emojiCommand from './emoji'; - -const command = new Command('internet') - .description(`Module to generate internet related entries.`) - .addCommand(avatarCommand) - .addCommand(emailCommand) - .addCommand(exampleEmailCommand) - .addCommand(userNameCommand) - .addCommand(displayNameCommand) - .addCommand(protocolCommand) - .addCommand(httpMethodCommand) - .addCommand(httpStatusCodeCommand) - .addCommand(urlCommand) - .addCommand(domainNameCommand) - .addCommand(domainSuffixCommand) - .addCommand(domainWordCommand) - .addCommand(ipCommand) - .addCommand(ipv4Command) - .addCommand(ipv6Command) - .addCommand(portCommand) - .addCommand(userAgentCommand) - .addCommand(colorCommand) - .addCommand(macCommand) - .addCommand(passwordCommand) - .addCommand(emojiCommand); - -export default command; diff --git a/src/commands/internet/ip.ts b/src/commands/internet/ip.ts deleted file mode 100644 index 5213497..0000000 --- a/src/commands/internet/ip.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('ip') - .description(`Generates a random IPv4 or IPv6 address.`) - .action(() => { - console.log(faker.internet.ip()); - }); - -export default command; diff --git a/src/commands/internet/ipv4.ts b/src/commands/internet/ipv4.ts deleted file mode 100644 index ee59865..0000000 --- a/src/commands/internet/ipv4.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('ipv4') - .description(`Generates a random IPv4 address.`) - .action(() => { - console.log(faker.internet.ipv4()); - }); - -export default command; diff --git a/src/commands/internet/ipv6.ts b/src/commands/internet/ipv6.ts deleted file mode 100644 index b85dc5e..0000000 --- a/src/commands/internet/ipv6.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('ipv6') - .description(`Generates a random IPv6 address.`) - .action(() => { - console.log(faker.internet.ipv6()); - }); - -export default command; diff --git a/src/commands/internet/mac.ts b/src/commands/internet/mac.ts deleted file mode 100644 index ac4925f..0000000 --- a/src/commands/internet/mac.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('mac') - .description(`Generates a random mac address.`) - .action(() => { - console.log(faker.internet.mac()); - }); - -export default command; diff --git a/src/commands/internet/password.ts b/src/commands/internet/password.ts deleted file mode 100644 index 9fd0cfb..0000000 --- a/src/commands/internet/password.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('password') - .description( - `Generates a random password-like string. Do not use this method for generating actual passwords for users.`, - ) - .action(() => { - console.log(faker.internet.password()); - }); - -export default command; diff --git a/src/commands/internet/port.ts b/src/commands/internet/port.ts deleted file mode 100644 index 04f3eda..0000000 --- a/src/commands/internet/port.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('port') - .description(`Generates a random port number.`) - .action(() => { - console.log(faker.internet.port()); - }); - -export default command; diff --git a/src/commands/internet/protocol.ts b/src/commands/internet/protocol.ts deleted file mode 100644 index 5a3c353..0000000 --- a/src/commands/internet/protocol.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('protocol') - .description(`Generates a random web protocol. Either \`http\` or \`https\`.`) - .action(() => { - console.log(faker.internet.protocol()); - }); - -export default command; diff --git a/src/commands/internet/url.ts b/src/commands/internet/url.ts deleted file mode 100644 index 7641c2f..0000000 --- a/src/commands/internet/url.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('url') - .description(`Generates a random http(s) url.`) - .action(() => { - console.log(faker.internet.url()); - }); - -export default command; diff --git a/src/commands/internet/userAgent.ts b/src/commands/internet/userAgent.ts deleted file mode 100644 index 730b926..0000000 --- a/src/commands/internet/userAgent.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('userAgent') - .description(`Generates a random user agent string.`) - .action(() => { - console.log(faker.internet.userAgent()); - }); - -export default command; diff --git a/src/commands/internet/userName.ts b/src/commands/internet/userName.ts deleted file mode 100644 index 7ee0fe7..0000000 --- a/src/commands/internet/userName.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('userName') - .description(`Generates a username.`) - .action(() => { - console.log(faker.internet.userName()); - }); - -export default command; diff --git a/src/commands/location/buildingNumber.ts b/src/commands/location/buildingNumber.ts deleted file mode 100644 index 5c9fb0b..0000000 --- a/src/commands/location/buildingNumber.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('buildingNumber') - .description(`Generates a random building number.`) - .action(() => { - console.log(faker.location.buildingNumber()); - }); - -export default command; diff --git a/src/commands/location/cardinalDirection.ts b/src/commands/location/cardinalDirection.ts deleted file mode 100644 index 8dc4ecf..0000000 --- a/src/commands/location/cardinalDirection.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('cardinalDirection') - .description( - `Generates a random cardinal direction (north, east, south, west).`, - ) - .action(() => { - console.log(faker.location.cardinalDirection()); - }); - -export default command; diff --git a/src/commands/location/city.ts b/src/commands/location/city.ts deleted file mode 100644 index 4482a32..0000000 --- a/src/commands/location/city.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('city') - .description(`Generates a random localized city name.`) - .action(() => { - console.log(faker.location.city()); - }); - -export default command; diff --git a/src/commands/location/cityName.ts b/src/commands/location/cityName.ts deleted file mode 100644 index 1798f95..0000000 --- a/src/commands/location/cityName.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('cityName') - .description( - `Generates a random city name from a list of real cities for the locale.`, - ) - .action(() => { - console.log(faker.location.cityName()); - }); - -export default command; diff --git a/src/commands/location/country.ts b/src/commands/location/country.ts deleted file mode 100644 index 11958f1..0000000 --- a/src/commands/location/country.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('country') - .description(`Generates a random country name.`) - .action(() => { - console.log(faker.location.country()); - }); - -export default command; diff --git a/src/commands/location/countryCode.ts b/src/commands/location/countryCode.ts deleted file mode 100644 index db9b0ea..0000000 --- a/src/commands/location/countryCode.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('countryCode') - .description(`Generates a random ISO_3166-1 country code.`) - .action(() => { - console.log(faker.location.countryCode()); - }); - -export default command; diff --git a/src/commands/location/county.ts b/src/commands/location/county.ts deleted file mode 100644 index c73dbf3..0000000 --- a/src/commands/location/county.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('county') - .description( - `Generates a random localized county, or other equivalent second-level administrative entity for the locale's country such as a district or department.`, - ) - .action(() => { - console.log(faker.location.county()); - }); - -export default command; diff --git a/src/commands/location/direction.ts b/src/commands/location/direction.ts deleted file mode 100644 index 41bf03d..0000000 --- a/src/commands/location/direction.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('direction') - .description( - `Generates a random direction (cardinal and ordinal; northwest, east, etc).`, - ) - .action(() => { - console.log(faker.location.direction()); - }); - -export default command; diff --git a/src/commands/location/index.ts b/src/commands/location/index.ts deleted file mode 100644 index 98b2514..0000000 --- a/src/commands/location/index.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Command } from 'commander'; -import zipCodeCommand from './zipCode'; -import zipCodeByStateCommand from './zipCodeByState'; -import cityCommand from './city'; -import cityNameCommand from './cityName'; -import buildingNumberCommand from './buildingNumber'; -import streetCommand from './street'; -import streetNameCommand from './streetName'; -import streetAddressCommand from './streetAddress'; -import secondaryAddressCommand from './secondaryAddress'; -import countyCommand from './county'; -import countryCommand from './country'; -import countryCodeCommand from './countryCode'; -import stateCommand from './state'; -import stateAbbrCommand from './stateAbbr'; -import latitudeCommand from './latitude'; -import longitudeCommand from './longitude'; -import directionCommand from './direction'; -import cardinalDirectionCommand from './cardinalDirection'; -import ordinalDirectionCommand from './ordinalDirection'; -import nearbyGPSCoordinateCommand from './nearbyGPSCoordinate'; -import timeZoneCommand from './timeZone'; - -const command = new Command('location') - .description( - `Module to generate addresses and locations. Prior to Faker 8.0.0, this module was known as \`faker.address\`.`, - ) - .addCommand(zipCodeCommand) - .addCommand(zipCodeByStateCommand) - .addCommand(cityCommand) - .addCommand(cityNameCommand) - .addCommand(buildingNumberCommand) - .addCommand(streetCommand) - .addCommand(streetNameCommand) - .addCommand(streetAddressCommand) - .addCommand(secondaryAddressCommand) - .addCommand(countyCommand) - .addCommand(countryCommand) - .addCommand(countryCodeCommand) - .addCommand(stateCommand) - .addCommand(stateAbbrCommand) - .addCommand(latitudeCommand) - .addCommand(longitudeCommand) - .addCommand(directionCommand) - .addCommand(cardinalDirectionCommand) - .addCommand(ordinalDirectionCommand) - .addCommand(nearbyGPSCoordinateCommand) - .addCommand(timeZoneCommand); - -export default command; diff --git a/src/commands/location/latitude.ts b/src/commands/location/latitude.ts deleted file mode 100644 index d72feba..0000000 --- a/src/commands/location/latitude.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('latitude') - .description(`Generates a random latitude.`) - .action(() => { - console.log(faker.location.latitude()); - }); - -export default command; diff --git a/src/commands/location/longitude.ts b/src/commands/location/longitude.ts deleted file mode 100644 index a368515..0000000 --- a/src/commands/location/longitude.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('longitude') - .description(`Generates a random longitude.`) - .action(() => { - console.log(faker.location.longitude()); - }); - -export default command; diff --git a/src/commands/location/nearbyGPSCoordinate.ts b/src/commands/location/nearbyGPSCoordinate.ts deleted file mode 100644 index 71b9c69..0000000 --- a/src/commands/location/nearbyGPSCoordinate.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('nearbyGPSCoordinate') - .description( - `Generates a random GPS coordinate within the specified radius from the given coordinate.`, - ) - .action(() => { - console.log(faker.location.nearbyGPSCoordinate()); - }); - -export default command; diff --git a/src/commands/location/ordinalDirection.ts b/src/commands/location/ordinalDirection.ts deleted file mode 100644 index a2d6152..0000000 --- a/src/commands/location/ordinalDirection.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('ordinalDirection') - .description( - `Generates a random ordinal direction (northwest, southeast, etc).`, - ) - .action(() => { - console.log(faker.location.ordinalDirection()); - }); - -export default command; diff --git a/src/commands/location/secondaryAddress.ts b/src/commands/location/secondaryAddress.ts deleted file mode 100644 index c30c104..0000000 --- a/src/commands/location/secondaryAddress.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('secondaryAddress') - .description(`Generates a random localized secondary address.`) - .action(() => { - console.log(faker.location.secondaryAddress()); - }); - -export default command; diff --git a/src/commands/location/state.ts b/src/commands/location/state.ts deleted file mode 100644 index b41044c..0000000 --- a/src/commands/location/state.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('state') - .description( - `Generates a random localized state, or other equivalent first-level administrative entity for the locale's country such as a province or region.`, - ) - .action(() => { - console.log(faker.location.state()); - }); - -export default command; diff --git a/src/commands/location/stateAbbr.ts b/src/commands/location/stateAbbr.ts deleted file mode 100644 index d862aeb..0000000 --- a/src/commands/location/stateAbbr.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('stateAbbr') - .description( - `Generates a random localized state's abbreviated name from this country.`, - ) - .action(() => { - console.log(faker.location.stateAbbr()); - }); - -export default command; diff --git a/src/commands/location/street.ts b/src/commands/location/street.ts deleted file mode 100644 index 73cbd62..0000000 --- a/src/commands/location/street.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('street') - .description(`Generates a random localized street name.`) - .action(() => { - console.log(faker.location.street()); - }); - -export default command; diff --git a/src/commands/location/streetAddress.ts b/src/commands/location/streetAddress.ts deleted file mode 100644 index 0795779..0000000 --- a/src/commands/location/streetAddress.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('streetAddress') - .description(`Generates a random localized street address.`) - .action(() => { - console.log(faker.location.streetAddress()); - }); - -export default command; diff --git a/src/commands/location/streetName.ts b/src/commands/location/streetName.ts deleted file mode 100644 index 7fef3c4..0000000 --- a/src/commands/location/streetName.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('streetName') - .description(`Generates a random localized street name.`) - .action(() => { - console.log(faker.location.streetName()); - }); - -export default command; diff --git a/src/commands/location/timeZone.ts b/src/commands/location/timeZone.ts deleted file mode 100644 index f483f4a..0000000 --- a/src/commands/location/timeZone.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('timeZone') - .description(`Generates a random time zone.`) - .action(() => { - console.log(faker.location.timeZone()); - }); - -export default command; diff --git a/src/commands/location/zipCode.ts b/src/commands/location/zipCode.ts deleted file mode 100644 index 55d005b..0000000 --- a/src/commands/location/zipCode.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('zipCode') - .description(`Generates random zip code from specified format.`) - .action(() => { - console.log(faker.location.zipCode()); - }); - -export default command; diff --git a/src/commands/location/zipCodeByState.ts b/src/commands/location/zipCodeByState.ts deleted file mode 100644 index 8d47a03..0000000 --- a/src/commands/location/zipCodeByState.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('zipCodeByState') - .description(`Generates random zip code from state abbreviation.`) - .action(() => { - console.log(faker.location.zipCodeByState()); - }); - -export default command; diff --git a/src/commands/lorem/index.ts b/src/commands/lorem/index.ts deleted file mode 100644 index 6ee5581..0000000 --- a/src/commands/lorem/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Command } from 'commander'; -import wordCommand from './word'; -import wordsCommand from './words'; -import sentenceCommand from './sentence'; -import slugCommand from './slug'; -import sentencesCommand from './sentences'; -import paragraphCommand from './paragraph'; -import paragraphsCommand from './paragraphs'; -import textCommand from './text'; -import linesCommand from './lines'; - -const command = new Command('lorem') - .description(`Module to generate random texts and words.`) - .addCommand(wordCommand) - .addCommand(wordsCommand) - .addCommand(sentenceCommand) - .addCommand(slugCommand) - .addCommand(sentencesCommand) - .addCommand(paragraphCommand) - .addCommand(paragraphsCommand) - .addCommand(textCommand) - .addCommand(linesCommand); - -export default command; diff --git a/src/commands/lorem/lines.ts b/src/commands/lorem/lines.ts deleted file mode 100644 index dd67ffe..0000000 --- a/src/commands/lorem/lines.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('lines') - .description( - `Generates the given number lines of lorem separated by \`'\\n'\`.`, - ) - .action(() => { - console.log(faker.lorem.lines()); - }); - -export default command; diff --git a/src/commands/lorem/paragraph.ts b/src/commands/lorem/paragraph.ts deleted file mode 100644 index eed2ae0..0000000 --- a/src/commands/lorem/paragraph.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('paragraph') - .description(`Generates a paragraph with the given number of sentences.`) - .action(() => { - console.log(faker.lorem.paragraph()); - }); - -export default command; diff --git a/src/commands/lorem/paragraphs.ts b/src/commands/lorem/paragraphs.ts deleted file mode 100644 index 00a2b05..0000000 --- a/src/commands/lorem/paragraphs.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('paragraphs') - .description(`Generates the given number of paragraphs.`) - .action(() => { - console.log(faker.lorem.paragraphs()); - }); - -export default command; diff --git a/src/commands/lorem/sentence.ts b/src/commands/lorem/sentence.ts deleted file mode 100644 index 81bed2c..0000000 --- a/src/commands/lorem/sentence.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('sentence') - .description( - `Generates a space separated list of words beginning with a capital letter and ending with a period.`, - ) - .action(() => { - console.log(faker.lorem.sentence()); - }); - -export default command; diff --git a/src/commands/lorem/sentences.ts b/src/commands/lorem/sentences.ts deleted file mode 100644 index 5f9c115..0000000 --- a/src/commands/lorem/sentences.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('sentences') - .description(`Generates the given number of sentences.`) - .action(() => { - console.log(faker.lorem.sentences()); - }); - -export default command; diff --git a/src/commands/lorem/slug.ts b/src/commands/lorem/slug.ts deleted file mode 100644 index d3d13c0..0000000 --- a/src/commands/lorem/slug.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('slug') - .description( - `Generates a slugified text consisting of the given number of hyphen separated words.`, - ) - .action(() => { - console.log(faker.lorem.slug()); - }); - -export default command; diff --git a/src/commands/lorem/text.ts b/src/commands/lorem/text.ts deleted file mode 100644 index 7395926..0000000 --- a/src/commands/lorem/text.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('text') - .description(`Generates a random text based on a random lorem method.`) - .action(() => { - console.log(faker.lorem.text()); - }); - -export default command; diff --git a/src/commands/lorem/word.ts b/src/commands/lorem/word.ts deleted file mode 100644 index 0943030..0000000 --- a/src/commands/lorem/word.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('word') - .description(`Generates a word of a specified length.`) - .action(() => { - console.log(faker.lorem.word()); - }); - -export default command; diff --git a/src/commands/lorem/words.ts b/src/commands/lorem/words.ts deleted file mode 100644 index 2abf02b..0000000 --- a/src/commands/lorem/words.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('words') - .description(`Generates a space separated list of words.`) - .action(() => { - console.log(faker.lorem.words()); - }); - -export default command; diff --git a/src/commands/music/genre.ts b/src/commands/music/genre.ts deleted file mode 100644 index 756c677..0000000 --- a/src/commands/music/genre.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('genre') - .description(`Generates a random music genre.`) - .action(() => { - console.log(faker.music.genre()); - }); - -export default command; diff --git a/src/commands/music/index.ts b/src/commands/music/index.ts deleted file mode 100644 index 1c32154..0000000 --- a/src/commands/music/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import genreCommand from './genre'; -import songNameCommand from './songName'; - -const command = new Command('music') - .description(`Module to generate music related entries.`) - .addCommand(genreCommand) - .addCommand(songNameCommand); - -export default command; diff --git a/src/commands/music/songName.ts b/src/commands/music/songName.ts deleted file mode 100644 index bad4d20..0000000 --- a/src/commands/music/songName.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('songName') - .description(`Generates a random song name.`) - .action(() => { - console.log(faker.music.songName()); - }); - -export default command; diff --git a/src/commands/number/bigInt.ts b/src/commands/number/bigInt.ts deleted file mode 100644 index 9cefb03..0000000 --- a/src/commands/number/bigInt.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('bigInt') - .description(`Generates a BigInt number.`) - .action(() => { - console.log(faker.number.bigInt()); - }); - -export default command; diff --git a/src/commands/number/binary.ts b/src/commands/number/binary.ts deleted file mode 100644 index 6634cd6..0000000 --- a/src/commands/number/binary.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('binary') - .description(`Generates a binary number.`) - .action(() => { - console.log(faker.number.binary()); - }); - -export default command; diff --git a/src/commands/number/float.ts b/src/commands/number/float.ts deleted file mode 100644 index 396ab72..0000000 --- a/src/commands/number/float.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('float') - .description( - `Generates a single random floating-point number between zero and one.`, - ) - .action(() => { - console.log(faker.number.float()); - }); - -export default command; diff --git a/src/commands/number/hex.ts b/src/commands/number/hex.ts deleted file mode 100644 index af6d9bf..0000000 --- a/src/commands/number/hex.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('hex') - .description(`Generates a lowercase hexadecimal number.`) - .action(() => { - console.log(faker.number.hex()); - }); - -export default command; diff --git a/src/commands/number/index.ts b/src/commands/number/index.ts deleted file mode 100644 index 6c47a22..0000000 --- a/src/commands/number/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Command } from 'commander'; -import intCommand from './int'; -import floatCommand from './float'; -import binaryCommand from './binary'; -import octalCommand from './octal'; -import hexCommand from './hex'; -import bigIntCommand from './bigInt'; - -const command = new Command('number') - .description(`Module to generate numbers of any kind.`) - .addCommand(intCommand) - .addCommand(floatCommand) - .addCommand(binaryCommand) - .addCommand(octalCommand) - .addCommand(hexCommand) - .addCommand(bigIntCommand); - -export default command; diff --git a/src/commands/number/int.ts b/src/commands/number/int.ts deleted file mode 100644 index ae50162..0000000 --- a/src/commands/number/int.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('int') - .description( - `Generates a single random integer between zero and \`Number.MAX_SAFE_INTEGER\`.`, - ) - .action(() => { - console.log(faker.number.int()); - }); - -export default command; diff --git a/src/commands/number/octal.ts b/src/commands/number/octal.ts deleted file mode 100644 index c063550..0000000 --- a/src/commands/number/octal.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('octal') - .description(`Generates an octal number.`) - .action(() => { - console.log(faker.number.octal()); - }); - -export default command; diff --git a/src/commands/person/bio.ts b/src/commands/person/bio.ts deleted file mode 100644 index da4f3b0..0000000 --- a/src/commands/person/bio.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('bio') - .description(`Generates a random short biography`) - .action(() => { - console.log(faker.person.bio()); - }); - -export default command; diff --git a/src/commands/person/firstName.ts b/src/commands/person/firstName.ts deleted file mode 100644 index f3a23b5..0000000 --- a/src/commands/person/firstName.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('firstName') - .description(`Generates a random first name.`) - .action(() => { - console.log(faker.person.firstName()); - }); - -export default command; diff --git a/src/commands/person/fullName.ts b/src/commands/person/fullName.ts deleted file mode 100644 index cb9dbbd..0000000 --- a/src/commands/person/fullName.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('fullName') - .description(`Generates a random full name.`) - .action(() => { - console.log(faker.person.fullName()); - }); - -export default command; diff --git a/src/commands/person/gender.ts b/src/commands/person/gender.ts deleted file mode 100644 index 5919700..0000000 --- a/src/commands/person/gender.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('gender') - .description(`Generates a random gender.`) - .action(() => { - console.log(faker.person.gender()); - }); - -export default command; diff --git a/src/commands/person/index.ts b/src/commands/person/index.ts deleted file mode 100644 index ef61aaa..0000000 --- a/src/commands/person/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Command } from 'commander'; -import firstNameCommand from './firstName'; -import lastNameCommand from './lastName'; -import middleNameCommand from './middleName'; -import fullNameCommand from './fullName'; -import genderCommand from './gender'; -import sexCommand from './sex'; -import sexTypeCommand from './sexType'; -import bioCommand from './bio'; -import prefixCommand from './prefix'; -import suffixCommand from './suffix'; -import jobTitleCommand from './jobTitle'; -import jobDescriptorCommand from './jobDescriptor'; -import jobAreaCommand from './jobArea'; -import jobTypeCommand from './jobType'; -import zodiacSignCommand from './zodiacSign'; - -const command = new Command('person') - .description( - `Module to generate people's personal information such as names and job titles. Prior to Faker 8.0.0, this module was known as \`faker.name\`.`, - ) - .addCommand(firstNameCommand) - .addCommand(lastNameCommand) - .addCommand(middleNameCommand) - .addCommand(fullNameCommand) - .addCommand(genderCommand) - .addCommand(sexCommand) - .addCommand(sexTypeCommand) - .addCommand(bioCommand) - .addCommand(prefixCommand) - .addCommand(suffixCommand) - .addCommand(jobTitleCommand) - .addCommand(jobDescriptorCommand) - .addCommand(jobAreaCommand) - .addCommand(jobTypeCommand) - .addCommand(zodiacSignCommand); - -export default command; diff --git a/src/commands/person/jobArea.ts b/src/commands/person/jobArea.ts deleted file mode 100644 index 4e3f0f0..0000000 --- a/src/commands/person/jobArea.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('jobArea') - .description(`Generates a random job area.`) - .action(() => { - console.log(faker.person.jobArea()); - }); - -export default command; diff --git a/src/commands/person/jobDescriptor.ts b/src/commands/person/jobDescriptor.ts deleted file mode 100644 index 6c0ed7d..0000000 --- a/src/commands/person/jobDescriptor.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('jobDescriptor') - .description(`Generates a random job descriptor.`) - .action(() => { - console.log(faker.person.jobDescriptor()); - }); - -export default command; diff --git a/src/commands/person/jobTitle.ts b/src/commands/person/jobTitle.ts deleted file mode 100644 index 7901a2b..0000000 --- a/src/commands/person/jobTitle.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('jobTitle') - .description(`Generates a random job title.`) - .action(() => { - console.log(faker.person.jobTitle()); - }); - -export default command; diff --git a/src/commands/person/jobType.ts b/src/commands/person/jobType.ts deleted file mode 100644 index 5730c6c..0000000 --- a/src/commands/person/jobType.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('jobType') - .description(`Generates a random job type.`) - .action(() => { - console.log(faker.person.jobType()); - }); - -export default command; diff --git a/src/commands/person/lastName.ts b/src/commands/person/lastName.ts deleted file mode 100644 index 60ad571..0000000 --- a/src/commands/person/lastName.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('lastName') - .description(`Generates a random last name.`) - .action(() => { - console.log(faker.person.lastName()); - }); - -export default command; diff --git a/src/commands/person/middleName.ts b/src/commands/person/middleName.ts deleted file mode 100644 index f55d0c3..0000000 --- a/src/commands/person/middleName.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('middleName') - .description(`Generates a random middle name.`) - .action(() => { - console.log(faker.person.middleName()); - }); - -export default command; diff --git a/src/commands/person/prefix.ts b/src/commands/person/prefix.ts deleted file mode 100644 index 99ff6df..0000000 --- a/src/commands/person/prefix.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('prefix') - .description(`Generates a random person prefix.`) - .action(() => { - console.log(faker.person.prefix()); - }); - -export default command; diff --git a/src/commands/person/sex.ts b/src/commands/person/sex.ts deleted file mode 100644 index bf716e1..0000000 --- a/src/commands/person/sex.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('sex') - .description(`Generates a random sex.`) - .action(() => { - console.log(faker.person.sex()); - }); - -export default command; diff --git a/src/commands/person/sexType.ts b/src/commands/person/sexType.ts deleted file mode 100644 index 5550e44..0000000 --- a/src/commands/person/sexType.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('sexType') - .description(`Generates a random sex type.`) - .action(() => { - console.log(faker.person.sexType()); - }); - -export default command; diff --git a/src/commands/person/suffix.ts b/src/commands/person/suffix.ts deleted file mode 100644 index 57991eb..0000000 --- a/src/commands/person/suffix.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('suffix') - .description(`Generates a random person suffix.`) - .action(() => { - console.log(faker.person.suffix()); - }); - -export default command; diff --git a/src/commands/person/zodiacSign.ts b/src/commands/person/zodiacSign.ts deleted file mode 100644 index 385fc0b..0000000 --- a/src/commands/person/zodiacSign.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('zodiacSign') - .description(`Generates a random zodiac sign.`) - .action(() => { - console.log(faker.person.zodiacSign()); - }); - -export default command; diff --git a/src/commands/phone/imei.ts b/src/commands/phone/imei.ts deleted file mode 100644 index 3d8b78d..0000000 --- a/src/commands/phone/imei.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('imei') - .description(`Generates IMEI number.`) - .action(() => { - console.log(faker.phone.imei()); - }); - -export default command; diff --git a/src/commands/phone/index.ts b/src/commands/phone/index.ts deleted file mode 100644 index 18466e3..0000000 --- a/src/commands/phone/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import numberCommand from './number'; -import imeiCommand from './imei'; - -const command = new Command('phone') - .description(`Module to generate phone-related data.`) - .addCommand(numberCommand) - .addCommand(imeiCommand); - -export default command; diff --git a/src/commands/phone/number.ts b/src/commands/phone/number.ts deleted file mode 100644 index 16a03a4..0000000 --- a/src/commands/phone/number.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('number') - .description(`Generates a random phone number.`) - .action(() => { - console.log(faker.phone.number()); - }); - -export default command; diff --git a/src/commands/science/chemicalElement.ts b/src/commands/science/chemicalElement.ts deleted file mode 100644 index 9ef3a59..0000000 --- a/src/commands/science/chemicalElement.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('chemicalElement') - .description(`Generates a random periodic table element.`) - .action(() => { - console.log(faker.science.chemicalElement()); - }); - -export default command; diff --git a/src/commands/science/index.ts b/src/commands/science/index.ts deleted file mode 100644 index ddd1a05..0000000 --- a/src/commands/science/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import chemicalElementCommand from './chemicalElement'; -import unitCommand from './unit'; - -const command = new Command('science') - .description(`Module to generate science related entries.`) - .addCommand(chemicalElementCommand) - .addCommand(unitCommand); - -export default command; diff --git a/src/commands/science/unit.ts b/src/commands/science/unit.ts deleted file mode 100644 index 996d566..0000000 --- a/src/commands/science/unit.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('unit') - .description(`Generates a random scientific unit.`) - .action(() => { - console.log(faker.science.unit()); - }); - -export default command; diff --git a/src/commands/string/alpha.ts b/src/commands/string/alpha.ts deleted file mode 100644 index be41b07..0000000 --- a/src/commands/string/alpha.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('alpha') - .description( - `Generating a string consisting of letters in the English alphabet.`, - ) - .action(() => { - console.log(faker.string.alpha()); - }); - -export default command; diff --git a/src/commands/string/alphanumeric.ts b/src/commands/string/alphanumeric.ts deleted file mode 100644 index e19fefe..0000000 --- a/src/commands/string/alphanumeric.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('alphanumeric') - .description(`Generating a string consisting of alpha characters and digits.`) - .action(() => { - console.log(faker.string.alphanumeric()); - }); - -export default command; diff --git a/src/commands/string/binary.ts b/src/commands/string/binary.ts deleted file mode 100644 index 488f9c1..0000000 --- a/src/commands/string/binary.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('binary') - .description(`Generates a binary string.`) - .action(() => { - console.log(faker.string.binary()); - }); - -export default command; diff --git a/src/commands/string/hexadecimal.ts b/src/commands/string/hexadecimal.ts deleted file mode 100644 index 17dce60..0000000 --- a/src/commands/string/hexadecimal.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('hexadecimal') - .description(`Generates a hexadecimal string.`) - .action(() => { - console.log(faker.string.hexadecimal()); - }); - -export default command; diff --git a/src/commands/string/index.ts b/src/commands/string/index.ts deleted file mode 100644 index 1bce66c..0000000 --- a/src/commands/string/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Command } from 'commander'; -import alphaCommand from './alpha'; -import alphanumericCommand from './alphanumeric'; -import binaryCommand from './binary'; -import octalCommand from './octal'; -import hexadecimalCommand from './hexadecimal'; -import numericCommand from './numeric'; -import sampleCommand from './sample'; -import uuidCommand from './uuid'; -import nanoidCommand from './nanoid'; -import symbolCommand from './symbol'; - -const command = new Command('string') - .description(`Module to generate string related entries.`) - .addCommand(alphaCommand) - .addCommand(alphanumericCommand) - .addCommand(binaryCommand) - .addCommand(octalCommand) - .addCommand(hexadecimalCommand) - .addCommand(numericCommand) - .addCommand(sampleCommand) - .addCommand(uuidCommand) - .addCommand(nanoidCommand) - .addCommand(symbolCommand); - -export default command; diff --git a/src/commands/string/nanoid.ts b/src/commands/string/nanoid.ts deleted file mode 100644 index 00ce3cd..0000000 --- a/src/commands/string/nanoid.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('nanoid') - .description(`Generates a Nano ID.`) - .action(() => { - console.log(faker.string.nanoid()); - }); - -export default command; diff --git a/src/commands/string/numeric.ts b/src/commands/string/numeric.ts deleted file mode 100644 index c24e5c3..0000000 --- a/src/commands/string/numeric.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('numeric') - .description(`Generates a given length string of digits.`) - .action(() => { - console.log(faker.string.numeric()); - }); - -export default command; diff --git a/src/commands/string/octal.ts b/src/commands/string/octal.ts deleted file mode 100644 index 4567db4..0000000 --- a/src/commands/string/octal.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('octal') - .description(`Generates an octal string.`) - .action(() => { - console.log(faker.string.octal()); - }); - -export default command; diff --git a/src/commands/string/sample.ts b/src/commands/string/sample.ts deleted file mode 100644 index 099f72f..0000000 --- a/src/commands/string/sample.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('sample') - .description( - `Generates a string containing UTF-16 chars between 33 and 125 (\`!\` to \`}\`).`, - ) - .action(() => { - console.log(faker.string.sample()); - }); - -export default command; diff --git a/src/commands/string/symbol.ts b/src/commands/string/symbol.ts deleted file mode 100644 index d30e415..0000000 --- a/src/commands/string/symbol.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('symbol') - .description(`Generates a string containing only special characters.`) - .action(() => { - console.log(faker.string.symbol()); - }); - -export default command; diff --git a/src/commands/string/uuid.ts b/src/commands/string/uuid.ts deleted file mode 100644 index a6d6e2d..0000000 --- a/src/commands/string/uuid.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('uuid') - .description(`Generates a UUID v4 (Universally Unique Identifier).`) - .action(() => { - console.log(faker.string.uuid()); - }); - -export default command; diff --git a/src/commands/system/commonFileExt.ts b/src/commands/system/commonFileExt.ts deleted file mode 100644 index 332f3c7..0000000 --- a/src/commands/system/commonFileExt.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('commonFileExt') - .description(`Generates a commonly used file extension.`) - .action(() => { - console.log(faker.system.commonFileExt()); - }); - -export default command; diff --git a/src/commands/system/commonFileName.ts b/src/commands/system/commonFileName.ts deleted file mode 100644 index db8de38..0000000 --- a/src/commands/system/commonFileName.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('commonFileName') - .description(`Generates a random file name and a commonly used extension.`) - .action(() => { - console.log(faker.system.commonFileName()); - }); - -export default command; diff --git a/src/commands/system/commonFileType.ts b/src/commands/system/commonFileType.ts deleted file mode 100644 index 1ac23fd..0000000 --- a/src/commands/system/commonFileType.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('commonFileType') - .description(`Generates a commonly used file type.`) - .action(() => { - console.log(faker.system.commonFileType()); - }); - -export default command; diff --git a/src/commands/system/cron.ts b/src/commands/system/cron.ts deleted file mode 100644 index eaa86e8..0000000 --- a/src/commands/system/cron.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('cron') - .description(`Generates a random cron expression.`) - .action(() => { - console.log(faker.system.cron()); - }); - -export default command; diff --git a/src/commands/system/directoryPath.ts b/src/commands/system/directoryPath.ts deleted file mode 100644 index 87bc371..0000000 --- a/src/commands/system/directoryPath.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('directoryPath') - .description(`Generates a directory path.`) - .action(() => { - console.log(faker.system.directoryPath()); - }); - -export default command; diff --git a/src/commands/system/fileExt.ts b/src/commands/system/fileExt.ts deleted file mode 100644 index 9a68235..0000000 --- a/src/commands/system/fileExt.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('fileExt') - .description(`Generates a file extension.`) - .action(() => { - console.log(faker.system.fileExt()); - }); - -export default command; diff --git a/src/commands/system/fileName.ts b/src/commands/system/fileName.ts deleted file mode 100644 index 5118d13..0000000 --- a/src/commands/system/fileName.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('fileName') - .description(`Generates a random file name with extension.`) - .action(() => { - console.log(faker.system.fileName()); - }); - -export default command; diff --git a/src/commands/system/filePath.ts b/src/commands/system/filePath.ts deleted file mode 100644 index d2a4f9c..0000000 --- a/src/commands/system/filePath.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('filePath') - .description(`Generates a file path.`) - .action(() => { - console.log(faker.system.filePath()); - }); - -export default command; diff --git a/src/commands/system/fileType.ts b/src/commands/system/fileType.ts deleted file mode 100644 index 626b260..0000000 --- a/src/commands/system/fileType.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('fileType') - .description(`Generates a file type.`) - .action(() => { - console.log(faker.system.fileType()); - }); - -export default command; diff --git a/src/commands/system/index.ts b/src/commands/system/index.ts deleted file mode 100644 index ac3d825..0000000 --- a/src/commands/system/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Command } from 'commander'; -import fileNameCommand from './fileName'; -import commonFileNameCommand from './commonFileName'; -import mimeTypeCommand from './mimeType'; -import commonFileTypeCommand from './commonFileType'; -import commonFileExtCommand from './commonFileExt'; -import fileTypeCommand from './fileType'; -import fileExtCommand from './fileExt'; -import directoryPathCommand from './directoryPath'; -import filePathCommand from './filePath'; -import semverCommand from './semver'; -import networkInterfaceCommand from './networkInterface'; -import cronCommand from './cron'; - -const command = new Command('system') - .description(`Generates fake data for many computer systems properties.`) - .addCommand(fileNameCommand) - .addCommand(commonFileNameCommand) - .addCommand(mimeTypeCommand) - .addCommand(commonFileTypeCommand) - .addCommand(commonFileExtCommand) - .addCommand(fileTypeCommand) - .addCommand(fileExtCommand) - .addCommand(directoryPathCommand) - .addCommand(filePathCommand) - .addCommand(semverCommand) - .addCommand(networkInterfaceCommand) - .addCommand(cronCommand); - -export default command; diff --git a/src/commands/system/mimeType.ts b/src/commands/system/mimeType.ts deleted file mode 100644 index 2ce21eb..0000000 --- a/src/commands/system/mimeType.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('mimeType') - .description(`Generates a mime-type.`) - .action(() => { - console.log(faker.system.mimeType()); - }); - -export default command; diff --git a/src/commands/system/networkInterface.ts b/src/commands/system/networkInterface.ts deleted file mode 100644 index 8c7c9ae..0000000 --- a/src/commands/system/networkInterface.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('networkInterface') - .description(`Generates a random network interface.`) - .action(() => { - console.log(faker.system.networkInterface()); - }); - -export default command; diff --git a/src/commands/system/semver.ts b/src/commands/system/semver.ts deleted file mode 100644 index 4647acf..0000000 --- a/src/commands/system/semver.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('semver') - .description(`Generates a semantic version.`) - .action(() => { - console.log(faker.system.semver()); - }); - -export default command; diff --git a/src/commands/vehicle/bicycle.ts b/src/commands/vehicle/bicycle.ts deleted file mode 100644 index 97eb9da..0000000 --- a/src/commands/vehicle/bicycle.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('bicycle') - .description(`Generates a type of bicycle.`) - .action(() => { - console.log(faker.vehicle.bicycle()); - }); - -export default command; diff --git a/src/commands/vehicle/color.ts b/src/commands/vehicle/color.ts deleted file mode 100644 index e16efc5..0000000 --- a/src/commands/vehicle/color.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('color') - .description(`Generates a vehicle color.`) - .action(() => { - console.log(faker.vehicle.color()); - }); - -export default command; diff --git a/src/commands/vehicle/fuel.ts b/src/commands/vehicle/fuel.ts deleted file mode 100644 index 4c4247c..0000000 --- a/src/commands/vehicle/fuel.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('fuel') - .description(`Generates a fuel type.`) - .action(() => { - console.log(faker.vehicle.fuel()); - }); - -export default command; diff --git a/src/commands/vehicle/index.ts b/src/commands/vehicle/index.ts deleted file mode 100644 index 9e702c7..0000000 --- a/src/commands/vehicle/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Command } from 'commander'; -import vehicleCommand from './vehicle'; -import manufacturerCommand from './manufacturer'; -import modelCommand from './model'; -import typeCommand from './type'; -import fuelCommand from './fuel'; -import vinCommand from './vin'; -import colorCommand from './color'; -import vrmCommand from './vrm'; -import bicycleCommand from './bicycle'; - -const command = new Command('vehicle') - .description(`Module to generate vehicle related entries.`) - .addCommand(vehicleCommand) - .addCommand(manufacturerCommand) - .addCommand(modelCommand) - .addCommand(typeCommand) - .addCommand(fuelCommand) - .addCommand(vinCommand) - .addCommand(colorCommand) - .addCommand(vrmCommand) - .addCommand(bicycleCommand); - -export default command; diff --git a/src/commands/vehicle/manufacturer.ts b/src/commands/vehicle/manufacturer.ts deleted file mode 100644 index 2041e6c..0000000 --- a/src/commands/vehicle/manufacturer.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('manufacturer') - .description(`Generates a manufacturer name.`) - .action(() => { - console.log(faker.vehicle.manufacturer()); - }); - -export default command; diff --git a/src/commands/vehicle/model.ts b/src/commands/vehicle/model.ts deleted file mode 100644 index 2845e54..0000000 --- a/src/commands/vehicle/model.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('model') - .description(`Generates a vehicle model.`) - .action(() => { - console.log(faker.vehicle.model()); - }); - -export default command; diff --git a/src/commands/vehicle/type.ts b/src/commands/vehicle/type.ts deleted file mode 100644 index ab247d4..0000000 --- a/src/commands/vehicle/type.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('type') - .description(`Generates a vehicle type.`) - .action(() => { - console.log(faker.vehicle.type()); - }); - -export default command; diff --git a/src/commands/vehicle/vehicle.ts b/src/commands/vehicle/vehicle.ts deleted file mode 100644 index 38b7b36..0000000 --- a/src/commands/vehicle/vehicle.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('vehicle') - .description(`Generates a random vehicle.`) - .action(() => { - console.log(faker.vehicle.vehicle()); - }); - -export default command; diff --git a/src/commands/vehicle/vin.ts b/src/commands/vehicle/vin.ts deleted file mode 100644 index 35f878c..0000000 --- a/src/commands/vehicle/vin.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('vin') - .description(`Generates a vehicle identification number (VIN).`) - .action(() => { - console.log(faker.vehicle.vin()); - }); - -export default command; diff --git a/src/commands/vehicle/vrm.ts b/src/commands/vehicle/vrm.ts deleted file mode 100644 index a48f033..0000000 --- a/src/commands/vehicle/vrm.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('vrm') - .description( - `Generates a vehicle registration number (Vehicle Registration Mark - VRM).`, - ) - .action(() => { - console.log(faker.vehicle.vrm()); - }); - -export default command; diff --git a/src/commands/word/adjective.ts b/src/commands/word/adjective.ts deleted file mode 100644 index 1044416..0000000 --- a/src/commands/word/adjective.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('adjective') - .description(`Generates an adjective of random length.`) - .action(() => { - console.log(faker.word.adjective()); - }); - -export default command; diff --git a/src/commands/word/adverb.ts b/src/commands/word/adverb.ts deleted file mode 100644 index 9306c97..0000000 --- a/src/commands/word/adverb.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('adverb') - .description(`Generates an adverb of random length.`) - .action(() => { - console.log(faker.word.adverb()); - }); - -export default command; diff --git a/src/commands/word/conjunction.ts b/src/commands/word/conjunction.ts deleted file mode 100644 index 974aa0d..0000000 --- a/src/commands/word/conjunction.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('conjunction') - .description(`Generates a conjunction of random length.`) - .action(() => { - console.log(faker.word.conjunction()); - }); - -export default command; diff --git a/src/commands/word/index.ts b/src/commands/word/index.ts deleted file mode 100644 index eb76609..0000000 --- a/src/commands/word/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Command } from 'commander'; -import adjectiveCommand from './adjective'; -import adverbCommand from './adverb'; -import conjunctionCommand from './conjunction'; -import interjectionCommand from './interjection'; -import nounCommand from './noun'; -import prepositionCommand from './preposition'; -import verbCommand from './verb'; -import sampleCommand from './sample'; -import wordsCommand from './words'; - -const command = new Command('word') - .description(`Module to return various types of words.`) - .addCommand(adjectiveCommand) - .addCommand(adverbCommand) - .addCommand(conjunctionCommand) - .addCommand(interjectionCommand) - .addCommand(nounCommand) - .addCommand(prepositionCommand) - .addCommand(verbCommand) - .addCommand(sampleCommand) - .addCommand(wordsCommand); - -export default command; diff --git a/src/commands/word/interjection.ts b/src/commands/word/interjection.ts deleted file mode 100644 index 4903661..0000000 --- a/src/commands/word/interjection.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('interjection') - .description(`Generates an interjection of random length.`) - .action(() => { - console.log(faker.word.interjection()); - }); - -export default command; diff --git a/src/commands/word/noun.ts b/src/commands/word/noun.ts deleted file mode 100644 index ac88e45..0000000 --- a/src/commands/word/noun.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('noun') - .description(`Generates a noun of random length.`) - .action(() => { - console.log(faker.word.noun()); - }); - -export default command; diff --git a/src/commands/word/preposition.ts b/src/commands/word/preposition.ts deleted file mode 100644 index 0035274..0000000 --- a/src/commands/word/preposition.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('preposition') - .description(`Generates a preposition of random length.`) - .action(() => { - console.log(faker.word.preposition()); - }); - -export default command; diff --git a/src/commands/word/sample.ts b/src/commands/word/sample.ts deleted file mode 100644 index 04cbab2..0000000 --- a/src/commands/word/sample.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('sample') - .description(`Generates a random sample of random length.`) - .action(() => { - console.log(faker.word.sample()); - }); - -export default command; diff --git a/src/commands/word/verb.ts b/src/commands/word/verb.ts deleted file mode 100644 index 31e9689..0000000 --- a/src/commands/word/verb.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('verb') - .description(`Generates a verb of random length.`) - .action(() => { - console.log(faker.word.verb()); - }); - -export default command; diff --git a/src/commands/word/words.ts b/src/commands/word/words.ts deleted file mode 100644 index d2aa76e..0000000 --- a/src/commands/word/words.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Command } from 'commander'; -import { faker } from '@faker-js/faker'; - -const command = new Command('words') - .description( - `Generates a string containing a number of space separated random words.`, - ) - .action(() => { - console.log(faker.word.words()); - }); - -export default command; From 14835559cf532c6fcc47b20323c4c58e181d0f67 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Mon, 18 Dec 2023 15:21:12 +0100 Subject: [PATCH 03/16] docs: update README --- README.md | 52 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index cec4f34..c41ea76 100644 --- a/README.md +++ b/README.md @@ -13,27 +13,57 @@ npm install --save-dev @faker-js/cli ## Usage ``` -faker module_name method_name +npx faker ``` -Faker-CLI expects a `module_name` as well as a `method_name` depending on the module chosen. +> [ℹ: Read more about `npx`](https://docs.npmjs.com/cli/v7/commands/npx) -To list all possible modules run: +Faker-CLI expects a `functionName`. +This is equivalent to the names in Faker's modules. +Checkout [their API](https://fakerjs.dev/api/) for information on which functions are available. -```bash -faker --help -``` +## Examples -To list all possible methods of a module run: +If you want a integer you can run: ```bash -faker module_name --help +npx faker int ``` ## Whats next Upcoming features might include: -- localization -- support for all parameters `@faker-js/faker` natively -- make the CLI consumable for your own modules +### Localization + +You should be able to provide a specific locale for localized data. +Currently, the CLI will always use the default `en` locale. +This feature could look like this: + +```bash +npx faker --locale de firstName +``` + +This example would print a first name of the German locale. + +# Support for All Parameters of `@faker-js/faker` Natively + +This CLI is an MVP, currently. +This means that it does the bear minimum. +If you want an integer in a specific range, you are on your own. + +In the future such a feature could look like this: + +```bash +npx faker int --min 10 --max 20 +``` + +This example will print an integer between 10 and 20. +`min` and `max` are options that are available in [Faker's int options](https://fakerjs.dev/api/number.html#int). + +# Better Documentation in the Terminal + +Developers usually hate to switch work environments. +If you are already working in the terminal, you likely don't want to leave to check what to look up a little detail. +Instead you expect the CLI to have a proper `--help` documentation, including examples. +In the future, this should be the case. From 5325fc78cfc0e71e4f5b79783f0f8acf2a82871a Mon Sep 17 00:00:00 2001 From: DivisionByZero Date: Mon, 18 Dec 2023 22:36:47 +0100 Subject: [PATCH 04/16] chore: fix typo Co-authored-by: ST-DDT --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c41ea76..834f890 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ This example would print a first name of the German locale. # Support for All Parameters of `@faker-js/faker` Natively This CLI is an MVP, currently. -This means that it does the bear minimum. +This means that it does the bare minimum. If you want an integer in a specific range, you are on your own. In the future such a feature could look like this: From 9517badf2ec9f931948266aa7742989f7b4f0f92 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Mon, 18 Dec 2023 22:41:10 +0100 Subject: [PATCH 05/16] chore: remove console statement --- src/index.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 3500d0f..afae046 100644 --- a/src/index.ts +++ b/src/index.ts @@ -28,8 +28,6 @@ async function getFunctionByName(functionName: string): Promise<() => unknown> { return entry; } - - console.groupEnd(); } throw new Error( From 58f905e2fe5e2c952da5bf0c12f2e3e875da4d42 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Tue, 19 Dec 2023 12:23:26 +0100 Subject: [PATCH 06/16] refactor: require module argument --- README.md | 14 +++++------ src/index.ts | 69 ++++++++++++++++++++++++++++++---------------------- 2 files changed, 47 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 834f890..ccf8182 100644 --- a/README.md +++ b/README.md @@ -13,21 +13,21 @@ npm install --save-dev @faker-js/cli ## Usage ``` -npx faker +npx faker ``` > [ℹ: Read more about `npx`](https://docs.npmjs.com/cli/v7/commands/npx) -Faker-CLI expects a `functionName`. -This is equivalent to the names in Faker's modules. -Checkout [their API](https://fakerjs.dev/api/) for information on which functions are available. +Faker-CLI expects a `moduleName` as well as a `functionName` argument. +This is equivalent to calling `faker[moduleName][functionName]`. +Checkout [Fakers's API](https://fakerjs.dev/api/) for information on which modules and functions are available. ## Examples If you want a integer you can run: ```bash -npx faker int +npx faker number int ``` ## Whats next @@ -41,7 +41,7 @@ Currently, the CLI will always use the default `en` locale. This feature could look like this: ```bash -npx faker --locale de firstName +npx faker --locale de person firstName ``` This example would print a first name of the German locale. @@ -55,7 +55,7 @@ If you want an integer in a specific range, you are on your own. In the future such a feature could look like this: ```bash -npx faker int --min 10 --max 20 +npx faker number int --min 10 --max 20 ``` This example will print an integer between 10 and 20. diff --git a/src/index.ts b/src/index.ts index afae046..2996750 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,34 +5,45 @@ function isObject(value: unknown): value is object { return typeof value === 'object'; } -function isFunction(value: unknown): value is () => unknown { +type AnyFunction = (...args: unknown[]) => unknown; + +function isAnyFunction(value: unknown): value is AnyFunction { return typeof value === 'function'; } -async function getFunctionByName(functionName: string): Promise<() => unknown> { - const { faker } = await import('@faker-js/faker/locale/en'); - for (const module of Object.values(faker)) { - if (!isObject(module)) { - continue; - } +function createArgumentError( + argumentName: string, + originalValue: unknown, +): Error { + return new Error( + `Invalid "${argumentName}" argument. A string value is required but found ${JSON.stringify( + originalValue, + )}.`, + ); +} - for (const entry of Object.values(module)) { - if (!isFunction(entry)) { - continue; - } +function getValueByKey(obj: object, key: string): unknown { + return Object.entries(obj) + .find(([objectKey]) => objectKey === key) + ?.at(1); +} - // we need to use "includes" since the function names are "bound functionName" - if (!entry.name.includes(functionName)) { - continue; - } +async function getFunction( + moduleName: string, + functionName: string, +): Promise { + const { faker } = await import('@faker-js/faker/locale/en'); + const moduleRef: unknown = getValueByKey(faker, moduleName); + if (!isObject(moduleRef)) { + throw new Error(`There is no module with the name "${moduleName}".`); + } - return entry; - } + const entry: unknown = getValueByKey(moduleRef, functionName); + if (!isAnyFunction(entry)) { + throw new Error(`There is no function with the name "${functionName}".`); } - throw new Error( - `You tried to generate a value with the function name "${functionName}", but this name does not exist in Faker. Please checkout their documentation (https://fakerjs.dev) to look for available functions.`, - ); + return entry; } export function cli(args: string[]) { @@ -40,18 +51,18 @@ export function cli(args: string[]) { .name('faker') .version(version) .description(description) - .argument( - '', - 'The function name that Faker uses to generate a value.', - ) - .action(async (functionName) => { + .argument('', 'The name of the module to invoke.') + .argument('', 'The name of the function to invoke.') + .action(async (moduleName, functionName) => { + if (typeof moduleName !== 'string') { + throw createArgumentError('moduleName', moduleName); + } + if (typeof functionName !== 'string') { - throw new Error( - `Invalid "functionName" argument. A string value is required but found ${functionName}.`, - ); + throw createArgumentError('functionName', functionName); } - const fn = await getFunctionByName(functionName); + const fn = await getFunction(moduleName, functionName); console.log(fn()); }); From b5155401b726543c2e86b32a3c065e76cde7c112 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Tue, 19 Dec 2023 12:27:05 +0100 Subject: [PATCH 07/16] refactor: inline isObject function --- src/index.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index 2996750..37de5f0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,10 +1,6 @@ import { Command } from 'commander'; import { description, version } from '../package.json'; -function isObject(value: unknown): value is object { - return typeof value === 'object'; -} - type AnyFunction = (...args: unknown[]) => unknown; function isAnyFunction(value: unknown): value is AnyFunction { @@ -34,7 +30,7 @@ async function getFunction( ): Promise { const { faker } = await import('@faker-js/faker/locale/en'); const moduleRef: unknown = getValueByKey(faker, moduleName); - if (!isObject(moduleRef)) { + if (typeof moduleRef !== 'object' || moduleRef === null) { throw new Error(`There is no module with the name "${moduleName}".`); } From 155dd07bb7c29dc0c1a4b53bc569f224dc4dc070 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Tue, 19 Dec 2023 12:27:20 +0100 Subject: [PATCH 08/16] refactor: inline getFunction function --- src/index.ts | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/src/index.ts b/src/index.ts index 37de5f0..202cecb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -24,24 +24,6 @@ function getValueByKey(obj: object, key: string): unknown { ?.at(1); } -async function getFunction( - moduleName: string, - functionName: string, -): Promise { - const { faker } = await import('@faker-js/faker/locale/en'); - const moduleRef: unknown = getValueByKey(faker, moduleName); - if (typeof moduleRef !== 'object' || moduleRef === null) { - throw new Error(`There is no module with the name "${moduleName}".`); - } - - const entry: unknown = getValueByKey(moduleRef, functionName); - if (!isAnyFunction(entry)) { - throw new Error(`There is no function with the name "${functionName}".`); - } - - return entry; -} - export function cli(args: string[]) { const program = new Command() .name('faker') @@ -58,8 +40,20 @@ export function cli(args: string[]) { throw createArgumentError('functionName', functionName); } - const fn = await getFunction(moduleName, functionName); - console.log(fn()); + const { faker } = await import('@faker-js/faker/locale/en'); + const moduleRef: unknown = getValueByKey(faker, moduleName); + if (typeof moduleRef !== 'object' || moduleRef === null) { + throw new Error(`There is no module with the name "${moduleName}".`); + } + + const entry: unknown = getValueByKey(moduleRef, functionName); + if (!isAnyFunction(entry)) { + throw new Error( + `There is no function with the name "${functionName}".`, + ); + } + + console.log(entry()); }); program.parse(args); From 1c056f787e841e4f5f0d077cee1c74c6e72c89cb Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Tue, 19 Dec 2023 12:28:25 +0100 Subject: [PATCH 09/16] chore: remove redundant type declarations --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 202cecb..8fdae26 100644 --- a/src/index.ts +++ b/src/index.ts @@ -41,12 +41,12 @@ export function cli(args: string[]) { } const { faker } = await import('@faker-js/faker/locale/en'); - const moduleRef: unknown = getValueByKey(faker, moduleName); + const moduleRef = getValueByKey(faker, moduleName); if (typeof moduleRef !== 'object' || moduleRef === null) { throw new Error(`There is no module with the name "${moduleName}".`); } - const entry: unknown = getValueByKey(moduleRef, functionName); + const entry = getValueByKey(moduleRef, functionName); if (!isAnyFunction(entry)) { throw new Error( `There is no function with the name "${functionName}".`, From 56ab89e9b106a83a5b95ff12b9ca7020b3a710e6 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Tue, 19 Dec 2023 12:31:24 +0100 Subject: [PATCH 10/16] refactor: extract argument errors to function --- src/index.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index 8fdae26..b0df391 100644 --- a/src/index.ts +++ b/src/index.ts @@ -18,6 +18,15 @@ function createArgumentError( ); } +function createReferenceError( + argumentName: 'module' | 'function', + argumentValue: string, +) { + return new Error( + `There is no ${argumentName} with the name "${argumentValue}".`, + ); +} + function getValueByKey(obj: object, key: string): unknown { return Object.entries(obj) .find(([objectKey]) => objectKey === key) @@ -43,14 +52,12 @@ export function cli(args: string[]) { const { faker } = await import('@faker-js/faker/locale/en'); const moduleRef = getValueByKey(faker, moduleName); if (typeof moduleRef !== 'object' || moduleRef === null) { - throw new Error(`There is no module with the name "${moduleName}".`); + throw createReferenceError('module', moduleName); } const entry = getValueByKey(moduleRef, functionName); if (!isAnyFunction(entry)) { - throw new Error( - `There is no function with the name "${functionName}".`, - ); + throw createReferenceError('function', functionName); } console.log(entry()); From b1017365096bbe80dc158418d34075ba46790721 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Tue, 19 Dec 2023 12:38:46 +0100 Subject: [PATCH 11/16] refactor: create separate error classes --- src/errors/argument.error.ts | 8 ++++++++ src/errors/reference.error.ts | 5 +++++ src/index.ts | 30 ++++++------------------------ 3 files changed, 19 insertions(+), 24 deletions(-) create mode 100644 src/errors/argument.error.ts create mode 100644 src/errors/reference.error.ts diff --git a/src/errors/argument.error.ts b/src/errors/argument.error.ts new file mode 100644 index 0000000..0e234e0 --- /dev/null +++ b/src/errors/argument.error.ts @@ -0,0 +1,8 @@ +export class ArgumentError extends Error { + constructor(argumentName: string, originalValue: unknown) { + const stringValue = JSON.stringify(originalValue); + super( + `Invalid "${argumentName}" argument. A string value is required but found ${stringValue}.`, + ); + } +} diff --git a/src/errors/reference.error.ts b/src/errors/reference.error.ts new file mode 100644 index 0000000..408e7ee --- /dev/null +++ b/src/errors/reference.error.ts @@ -0,0 +1,5 @@ +export class ReferenceError extends Error { + constructor(accessor: 'module' | 'function', key: string) { + super(`There is no ${accessor} with the key "${key}".`); + } +} diff --git a/src/index.ts b/src/index.ts index b0df391..6051588 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,7 @@ import { Command } from 'commander'; import { description, version } from '../package.json'; +import { ArgumentError } from './errors/argument.error'; +import { ReferenceError } from './errors/reference.error'; type AnyFunction = (...args: unknown[]) => unknown; @@ -7,26 +9,6 @@ function isAnyFunction(value: unknown): value is AnyFunction { return typeof value === 'function'; } -function createArgumentError( - argumentName: string, - originalValue: unknown, -): Error { - return new Error( - `Invalid "${argumentName}" argument. A string value is required but found ${JSON.stringify( - originalValue, - )}.`, - ); -} - -function createReferenceError( - argumentName: 'module' | 'function', - argumentValue: string, -) { - return new Error( - `There is no ${argumentName} with the name "${argumentValue}".`, - ); -} - function getValueByKey(obj: object, key: string): unknown { return Object.entries(obj) .find(([objectKey]) => objectKey === key) @@ -42,22 +24,22 @@ export function cli(args: string[]) { .argument('', 'The name of the function to invoke.') .action(async (moduleName, functionName) => { if (typeof moduleName !== 'string') { - throw createArgumentError('moduleName', moduleName); + throw new ArgumentError('moduleName', moduleName); } if (typeof functionName !== 'string') { - throw createArgumentError('functionName', functionName); + throw new ArgumentError('functionName', functionName); } const { faker } = await import('@faker-js/faker/locale/en'); const moduleRef = getValueByKey(faker, moduleName); if (typeof moduleRef !== 'object' || moduleRef === null) { - throw createReferenceError('module', moduleName); + throw new ReferenceError('module', moduleName); } const entry = getValueByKey(moduleRef, functionName); if (!isAnyFunction(entry)) { - throw createReferenceError('function', functionName); + throw new ReferenceError('function', functionName); } console.log(entry()); From 2e71a87bb02b8f8e9b7033eae5673d0ba8343078 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Tue, 19 Dec 2023 12:44:58 +0100 Subject: [PATCH 12/16] refactor: remove isAnyFunction type guard --- src/index.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/index.ts b/src/index.ts index 6051588..51b6902 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,12 +3,6 @@ import { description, version } from '../package.json'; import { ArgumentError } from './errors/argument.error'; import { ReferenceError } from './errors/reference.error'; -type AnyFunction = (...args: unknown[]) => unknown; - -function isAnyFunction(value: unknown): value is AnyFunction { - return typeof value === 'function'; -} - function getValueByKey(obj: object, key: string): unknown { return Object.entries(obj) .find(([objectKey]) => objectKey === key) @@ -38,7 +32,7 @@ export function cli(args: string[]) { } const entry = getValueByKey(moduleRef, functionName); - if (!isAnyFunction(entry)) { + if (typeof entry !== 'function') { throw new ReferenceError('function', functionName); } From c18eafc63760d4239734584b24fe50325b8dc6ca Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Tue, 19 Dec 2023 20:35:50 +0100 Subject: [PATCH 13/16] docs: put :hammer_and_wrench: emoji in front of wip sections --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ccf8182..23dbf95 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ npx faker number int Upcoming features might include: -### Localization +### :hammer_and_wrench: Localization You should be able to provide a specific locale for localized data. Currently, the CLI will always use the default `en` locale. @@ -46,7 +46,7 @@ npx faker --locale de person firstName This example would print a first name of the German locale. -# Support for All Parameters of `@faker-js/faker` Natively +### :hammer_and_wrench: Support for All Parameters of `@faker-js/faker` Natively This CLI is an MVP, currently. This means that it does the bare minimum. @@ -61,7 +61,7 @@ npx faker number int --min 10 --max 20 This example will print an integer between 10 and 20. `min` and `max` are options that are available in [Faker's int options](https://fakerjs.dev/api/number.html#int). -# Better Documentation in the Terminal +### :hammer_and_wrench: Better Documentation in the Terminal Developers usually hate to switch work environments. If you are already working in the terminal, you likely don't want to leave to check what to look up a little detail. From 1d99fe7d05839278371cb9e09d0da3871acfe0b2 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Tue, 19 Dec 2023 23:00:07 +0100 Subject: [PATCH 14/16] docs: consistent notice blocks --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 23dbf95..e145a1e 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A CLI of [@faker-js/faker](https://github.com/faker-js/faker). -> **Note**: This is currently a [MVP](https://en.wikipedia.org/wiki/Minimum_viable_product). +> **Note :information_source:**: This is currently a [MVP](https://en.wikipedia.org/wiki/Minimum_viable_product). ## Install @@ -16,7 +16,7 @@ npm install --save-dev @faker-js/cli npx faker ``` -> [ℹ: Read more about `npx`](https://docs.npmjs.com/cli/v7/commands/npx) +> **Note :information_source:**: [Read more about `npx`](https://docs.npmjs.com/cli/v7/commands/npx) Faker-CLI expects a `moduleName` as well as a `functionName` argument. This is equivalent to calling `faker[moduleName][functionName]`. From f33506a89571c9c561e44d636544f6c9da2f555c Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Tue, 19 Dec 2023 23:24:35 +0100 Subject: [PATCH 15/16] docs: place notice emoji in front of text --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e145a1e..d691362 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A CLI of [@faker-js/faker](https://github.com/faker-js/faker). -> **Note :information_source:**: This is currently a [MVP](https://en.wikipedia.org/wiki/Minimum_viable_product). +> **:information_source: Note**: This is currently a [MVP](https://en.wikipedia.org/wiki/Minimum_viable_product). ## Install @@ -16,7 +16,7 @@ npm install --save-dev @faker-js/cli npx faker ``` -> **Note :information_source:**: [Read more about `npx`](https://docs.npmjs.com/cli/v7/commands/npx) +> **:information_source: Note**: [Read more about `npx`](https://docs.npmjs.com/cli/v7/commands/npx) Faker-CLI expects a `moduleName` as well as a `functionName` argument. This is equivalent to calling `faker[moduleName][functionName]`. From cc6da2fc769ba14b7f75ea1d0bd0236270fc419a Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Wed, 20 Dec 2023 01:09:31 +0100 Subject: [PATCH 16/16] docs: rephrase "what's next" section --- README.md | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index d691362..17e1671 100644 --- a/README.md +++ b/README.md @@ -30,40 +30,38 @@ If you want a integer you can run: npx faker number int ``` -## Whats next +## What's Next? Upcoming features might include: ### :hammer_and_wrench: Localization -You should be able to provide a specific locale for localized data. -Currently, the CLI will always use the default `en` locale. -This feature could look like this: +Users will be able to specify a locale for localized data. +Currently, the CLI always uses the default `en` locale. +In the future, this feature could be implemented as follows: ```bash npx faker --locale de person firstName ``` -This example would print a first name of the German locale. +This example would print a first name from the German locale. ### :hammer_and_wrench: Support for All Parameters of `@faker-js/faker` Natively -This CLI is an MVP, currently. -This means that it does the bare minimum. -If you want an integer in a specific range, you are on your own. - -In the future such a feature could look like this: +This CLI is currently in its MVP stage, which means that it only performs the bare minimum. +If you need an integer within a specific range, you'll have to do it yourself. +In the future, this feature could be implemented as follows: ```bash npx faker number int --min 10 --max 20 ``` -This example will print an integer between 10 and 20. -`min` and `max` are options that are available in [Faker's int options](https://fakerjs.dev/api/number.html#int). +This example will generate an integer between 10 and 20. +The `min` and `max` options are available in [Faker's int options](https://fakerjs.dev/api/number.html#int). ### :hammer_and_wrench: Better Documentation in the Terminal -Developers usually hate to switch work environments. -If you are already working in the terminal, you likely don't want to leave to check what to look up a little detail. -Instead you expect the CLI to have a proper `--help` documentation, including examples. -In the future, this should be the case. +Developers often dislike changing work environments. +If you're already working in the terminal, you probably don't want to leave it to look up a small detail. +Instead, you expect the CLI to have a proper `--help` documentation that includes examples. +This will be the case in the future.