From 2a430c6b1d521bf5e2dc93d4480bb5d84253ca1e Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Mon, 4 Sep 2023 00:56:55 +0200 Subject: [PATCH 01/14] feat: add base program --- src/index.ts | 21 ++++++++++++++++++++- tsconfig.json | 7 +++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 3db3fd4..8acd16b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1 +1,20 @@ -// todo write the application +import { Command } from 'commander'; +import { description, version } from '../package.json'; + +const program = new Command() + .name('faker') + .version(version) + .description(description) + .usage('faker [options] module_name entry_name'); + +const commands: Command[] = []; +for (const command of commands) { + // implement sub commands +} + +program.parse(process.argv); + +const hasArgs = process.argv.length > 2; +if (!hasArgs) { + program.help(); +} diff --git a/tsconfig.json b/tsconfig.json index 28977ea..6e38ae9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,10 +6,13 @@ "forceConsistentCasingInFileNames": true, "module": "commonjs", "outDir": "dist", + "resolveJsonModule": true, "skipLibCheck": true, "strict": true, "target": "ESNext", "useUnknownInCatchVariables": true }, - "include": ["src/**/*.ts"] -} + "include": [ + "src/**/*.ts" + ] +} \ No newline at end of file From 91991110383af559f5ba9fe19117c1a31a3378c2 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Mon, 4 Sep 2023 00:58:09 +0200 Subject: [PATCH 02/14] feat: add module subcommands --- src/commands/airline/index.ts | 7 +++++ src/commands/animal/index.ts | 7 +++++ src/commands/color/index.ts | 5 ++++ src/commands/commerce/index.ts | 7 +++++ src/commands/company/index.ts | 7 +++++ src/commands/database/index.ts | 7 +++++ src/commands/datatype/index.ts | 7 +++++ src/commands/date/index.ts | 5 ++++ src/commands/finance/index.ts | 7 +++++ src/commands/git/index.ts | 7 +++++ src/commands/hacker/index.ts | 7 +++++ src/commands/image/index.ts | 5 ++++ src/commands/index.ts | 53 ++++++++++++++++++++++++++++++++++ src/commands/internet/index.ts | 7 +++++ src/commands/location/index.ts | 7 +++++ src/commands/lorem/index.ts | 7 +++++ src/commands/music/index.ts | 7 +++++ src/commands/number/index.ts | 7 +++++ src/commands/person/index.ts | 7 +++++ src/commands/phone/index.ts | 7 +++++ src/commands/science/index.ts | 7 +++++ src/commands/string/index.ts | 7 +++++ src/commands/system/index.ts | 7 +++++ src/commands/vehicle/index.ts | 7 +++++ src/commands/word/index.ts | 7 +++++ src/index.ts | 4 +-- 26 files changed, 217 insertions(+), 2 deletions(-) create mode 100644 src/commands/airline/index.ts create mode 100644 src/commands/animal/index.ts create mode 100644 src/commands/color/index.ts create mode 100644 src/commands/commerce/index.ts create mode 100644 src/commands/company/index.ts create mode 100644 src/commands/database/index.ts create mode 100644 src/commands/datatype/index.ts create mode 100644 src/commands/date/index.ts create mode 100644 src/commands/finance/index.ts create mode 100644 src/commands/git/index.ts create mode 100644 src/commands/hacker/index.ts create mode 100644 src/commands/image/index.ts create mode 100644 src/commands/index.ts create mode 100644 src/commands/internet/index.ts create mode 100644 src/commands/location/index.ts create mode 100644 src/commands/lorem/index.ts create mode 100644 src/commands/music/index.ts create mode 100644 src/commands/number/index.ts create mode 100644 src/commands/person/index.ts create mode 100644 src/commands/phone/index.ts create mode 100644 src/commands/science/index.ts create mode 100644 src/commands/string/index.ts create mode 100644 src/commands/system/index.ts create mode 100644 src/commands/vehicle/index.ts create mode 100644 src/commands/word/index.ts diff --git a/src/commands/airline/index.ts b/src/commands/airline/index.ts new file mode 100644 index 0000000..9bdd65e --- /dev/null +++ b/src/commands/airline/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('airline').description( + `Module to generate airline and airport related data.`, +); + +export default command; diff --git a/src/commands/animal/index.ts b/src/commands/animal/index.ts new file mode 100644 index 0000000..932b46c --- /dev/null +++ b/src/commands/animal/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('animal').description( + `Module to generate animal related entries.`, +); + +export default command; diff --git a/src/commands/color/index.ts b/src/commands/color/index.ts new file mode 100644 index 0000000..53171f2 --- /dev/null +++ b/src/commands/color/index.ts @@ -0,0 +1,5 @@ +import { Command } from 'commander'; + +const command = new Command('color').description(`Module to generate colors.`); + +export default command; diff --git a/src/commands/commerce/index.ts b/src/commands/commerce/index.ts new file mode 100644 index 0000000..440ce1c --- /dev/null +++ b/src/commands/commerce/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('commerce').description( + `Module to generate commerce and product related entries.`, +); + +export default command; diff --git a/src/commands/company/index.ts b/src/commands/company/index.ts new file mode 100644 index 0000000..a44bbeb --- /dev/null +++ b/src/commands/company/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('company').description( + `Module to generate company related entries.`, +); + +export default command; diff --git a/src/commands/database/index.ts b/src/commands/database/index.ts new file mode 100644 index 0000000..fbf03b7 --- /dev/null +++ b/src/commands/database/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('database').description( + `Module to generate database related entries.`, +); + +export default command; diff --git a/src/commands/datatype/index.ts b/src/commands/datatype/index.ts new file mode 100644 index 0000000..53efb3f --- /dev/null +++ b/src/commands/datatype/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('datatype').description( + `Module to generate various primitive values and data types.`, +); + +export default command; diff --git a/src/commands/date/index.ts b/src/commands/date/index.ts new file mode 100644 index 0000000..bd566d9 --- /dev/null +++ b/src/commands/date/index.ts @@ -0,0 +1,5 @@ +import { Command } from 'commander'; + +const command = new Command('date').description(`Module to generate dates.`); + +export default command; diff --git a/src/commands/finance/index.ts b/src/commands/finance/index.ts new file mode 100644 index 0000000..e62f554 --- /dev/null +++ b/src/commands/finance/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('finance').description( + `Module to generate finance and money related entries.`, +); + +export default command; diff --git a/src/commands/git/index.ts b/src/commands/git/index.ts new file mode 100644 index 0000000..7f9a1ff --- /dev/null +++ b/src/commands/git/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('git').description( + `Module to generate git related entries.`, +); + +export default command; diff --git a/src/commands/hacker/index.ts b/src/commands/hacker/index.ts new file mode 100644 index 0000000..6dd9a1b --- /dev/null +++ b/src/commands/hacker/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('hacker').description( + `Module to generate hacker/IT words and phrases.`, +); + +export default command; diff --git a/src/commands/image/index.ts b/src/commands/image/index.ts new file mode 100644 index 0000000..c2c5bb7 --- /dev/null +++ b/src/commands/image/index.ts @@ -0,0 +1,5 @@ +import { Command } from 'commander'; + +const command = new Command('image').description(`Module to generate images.`); + +export default command; diff --git a/src/commands/index.ts b/src/commands/index.ts new file mode 100644 index 0000000..7072aa1 --- /dev/null +++ b/src/commands/index.ts @@ -0,0 +1,53 @@ +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/index.ts b/src/commands/internet/index.ts new file mode 100644 index 0000000..e00b400 --- /dev/null +++ b/src/commands/internet/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('internet').description( + `Module to generate internet related entries.`, +); + +export default command; diff --git a/src/commands/location/index.ts b/src/commands/location/index.ts new file mode 100644 index 0000000..0ba1f48 --- /dev/null +++ b/src/commands/location/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +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\`.`, +); + +export default command; diff --git a/src/commands/lorem/index.ts b/src/commands/lorem/index.ts new file mode 100644 index 0000000..eeea393 --- /dev/null +++ b/src/commands/lorem/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('lorem').description( + `Module to generate random texts and words.`, +); + +export default command; diff --git a/src/commands/music/index.ts b/src/commands/music/index.ts new file mode 100644 index 0000000..efc26f5 --- /dev/null +++ b/src/commands/music/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('music').description( + `Module to generate music related entries.`, +); + +export default command; diff --git a/src/commands/number/index.ts b/src/commands/number/index.ts new file mode 100644 index 0000000..88781d8 --- /dev/null +++ b/src/commands/number/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('number').description( + `Module to generate numbers of any kind.`, +); + +export default command; diff --git a/src/commands/person/index.ts b/src/commands/person/index.ts new file mode 100644 index 0000000..065c82b --- /dev/null +++ b/src/commands/person/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +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\`.`, +); + +export default command; diff --git a/src/commands/phone/index.ts b/src/commands/phone/index.ts new file mode 100644 index 0000000..f50b0a2 --- /dev/null +++ b/src/commands/phone/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('phone').description( + `Module to generate phone-related data.`, +); + +export default command; diff --git a/src/commands/science/index.ts b/src/commands/science/index.ts new file mode 100644 index 0000000..70c0ea6 --- /dev/null +++ b/src/commands/science/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('science').description( + `Module to generate science related entries.`, +); + +export default command; diff --git a/src/commands/string/index.ts b/src/commands/string/index.ts new file mode 100644 index 0000000..02cbf12 --- /dev/null +++ b/src/commands/string/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('string').description( + `Module to generate string related entries.`, +); + +export default command; diff --git a/src/commands/system/index.ts b/src/commands/system/index.ts new file mode 100644 index 0000000..6fba583 --- /dev/null +++ b/src/commands/system/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('system').description( + `Generates fake data for many computer systems properties.`, +); + +export default command; diff --git a/src/commands/vehicle/index.ts b/src/commands/vehicle/index.ts new file mode 100644 index 0000000..a5afdf6 --- /dev/null +++ b/src/commands/vehicle/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('vehicle').description( + `Module to generate vehicle related entries.`, +); + +export default command; diff --git a/src/commands/word/index.ts b/src/commands/word/index.ts new file mode 100644 index 0000000..f08e75d --- /dev/null +++ b/src/commands/word/index.ts @@ -0,0 +1,7 @@ +import { Command } from 'commander'; + +const command = new Command('word').description( + `Module to return various types of words.`, +); + +export default command; diff --git a/src/index.ts b/src/index.ts index 8acd16b..b33e41c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,6 @@ import { Command } from 'commander'; import { description, version } from '../package.json'; +import commands from './commands'; const program = new Command() .name('faker') @@ -7,9 +8,8 @@ const program = new Command() .description(description) .usage('faker [options] module_name entry_name'); -const commands: Command[] = []; for (const command of commands) { - // implement sub commands + program.addCommand(command); } program.parse(process.argv); From 4d9cef58cfe44a1e1d5c868691131b5432f39f98 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Mon, 4 Sep 2023 01:45:54 +0200 Subject: [PATCH 03/14] feat: implement method 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 | 12 +++++ src/commands/airline/index.ts | 19 +++++-- src/commands/airline/recordLocator.ts | 12 +++++ 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 | 35 +++++++++++-- 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 | 25 +++++++++- 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 | 19 +++++-- 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 | 35 +++++++++++-- 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 | 15 ++++-- src/commands/database/mongodbObjectId.ts | 12 +++++ src/commands/database/type.ts | 10 ++++ src/commands/datatype/array.ts | 10 ++++ src/commands/datatype/bigInt.ts | 12 +++++ 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 | 25 ++++++++-- src/commands/datatype/json.ts | 12 +++++ src/commands/datatype/number.ts | 12 +++++ src/commands/datatype/string.ts | 12 +++++ src/commands/datatype/uuid.ts | 12 +++++ src/commands/date/anytime.ts | 12 +++++ src/commands/date/birthdate.ts | 10 ++++ src/commands/date/future.ts | 10 ++++ src/commands/date/index.ts | 19 ++++++- 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 | 49 +++++++++++++++++-- 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 | 17 +++++-- src/commands/git/shortSha.ts | 10 ++++ src/commands/hacker/abbreviation.ts | 10 ++++ src/commands/hacker/adjective.ts | 10 ++++ src/commands/hacker/index.ts | 17 +++++-- 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 | 49 ++++++++++++++++++- 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/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 | 12 +++++ src/commands/internet/emoji.ts | 10 ++++ src/commands/internet/exampleEmail.ts | 12 +++++ src/commands/internet/httpMethod.ts | 10 ++++ src/commands/internet/httpStatusCode.ts | 10 ++++ src/commands/internet/index.ts | 47 ++++++++++++++++-- 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 | 12 +++++ src/commands/location/county.ts | 12 +++++ src/commands/location/direction.ts | 12 +++++ src/commands/location/index.ts | 49 +++++++++++++++++-- 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 | 12 +++++ 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 | 12 +++++ src/commands/location/zipCodeByState.ts | 10 ++++ src/commands/lorem/index.ts | 23 +++++++-- 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 | 9 ++-- src/commands/music/songName.ts | 10 ++++ src/commands/number/bigInt.ts | 12 +++++ src/commands/number/binary.ts | 12 +++++ src/commands/number/float.ts | 12 +++++ src/commands/number/hex.ts | 12 +++++ src/commands/number/index.ts | 17 +++++-- src/commands/number/int.ts | 12 +++++ src/commands/number/octal.ts | 12 +++++ 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 | 37 ++++++++++++-- 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 | 9 ++-- src/commands/phone/number.ts | 10 ++++ src/commands/science/chemicalElement.ts | 10 ++++ src/commands/science/index.ts | 9 ++-- src/commands/science/unit.ts | 10 ++++ src/commands/string/alpha.ts | 12 +++++ src/commands/string/alphanumeric.ts | 10 ++++ src/commands/string/binary.ts | 12 +++++ src/commands/string/hexadecimal.ts | 12 +++++ src/commands/string/index.ts | 25 ++++++++-- src/commands/string/nanoid.ts | 10 ++++ src/commands/string/numeric.ts | 10 ++++ src/commands/string/octal.ts | 12 +++++ src/commands/string/sample.ts | 12 +++++ src/commands/string/symbol.ts | 12 +++++ src/commands/string/uuid.ts | 12 +++++ src/commands/system/commonFileExt.ts | 10 ++++ src/commands/system/commonFileName.ts | 12 +++++ 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 | 29 +++++++++-- src/commands/system/mimeType.ts | 10 ++++ src/commands/system/networkInterface.ts | 12 +++++ 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 | 23 +++++++-- 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 | 12 +++++ src/commands/word/index.ts | 23 +++++++-- src/commands/word/interjection.ts | 12 +++++ src/commands/word/noun.ts | 10 ++++ src/commands/word/preposition.ts | 12 +++++ src/commands/word/sample.ts | 12 +++++ src/commands/word/verb.ts | 10 ++++ src/commands/word/words.ts | 12 +++++ 277 files changed, 3230 insertions(+), 66 deletions(-) create mode 100644 src/commands/airline/aircraftType.ts create mode 100644 src/commands/airline/airline.ts create mode 100644 src/commands/airline/airplane.ts create mode 100644 src/commands/airline/airport.ts create mode 100644 src/commands/airline/flightNumber.ts create mode 100644 src/commands/airline/recordLocator.ts create mode 100644 src/commands/airline/seat.ts create mode 100644 src/commands/animal/bear.ts create mode 100644 src/commands/animal/bird.ts create mode 100644 src/commands/animal/cat.ts create mode 100644 src/commands/animal/cetacean.ts create mode 100644 src/commands/animal/cow.ts create mode 100644 src/commands/animal/crocodilia.ts create mode 100644 src/commands/animal/dog.ts create mode 100644 src/commands/animal/fish.ts create mode 100644 src/commands/animal/horse.ts create mode 100644 src/commands/animal/insect.ts create mode 100644 src/commands/animal/lion.ts create mode 100644 src/commands/animal/rabbit.ts create mode 100644 src/commands/animal/rodent.ts create mode 100644 src/commands/animal/snake.ts create mode 100644 src/commands/animal/type.ts create mode 100644 src/commands/color/cmyk.ts create mode 100644 src/commands/color/colorByCSSColorSpace.ts create mode 100644 src/commands/color/cssSupportedFunction.ts create mode 100644 src/commands/color/cssSupportedSpace.ts create mode 100644 src/commands/color/hsl.ts create mode 100644 src/commands/color/human.ts create mode 100644 src/commands/color/hwb.ts create mode 100644 src/commands/color/lab.ts create mode 100644 src/commands/color/lch.ts create mode 100644 src/commands/color/rgb.ts create mode 100644 src/commands/color/space.ts create mode 100644 src/commands/commerce/department.ts create mode 100644 src/commands/commerce/price.ts create mode 100644 src/commands/commerce/product.ts create mode 100644 src/commands/commerce/productAdjective.ts create mode 100644 src/commands/commerce/productDescription.ts create mode 100644 src/commands/commerce/productMaterial.ts create mode 100644 src/commands/commerce/productName.ts create mode 100644 src/commands/company/bs.ts create mode 100644 src/commands/company/bsAdjective.ts create mode 100644 src/commands/company/bsBuzz.ts create mode 100644 src/commands/company/bsNoun.ts create mode 100644 src/commands/company/buzzAdjective.ts create mode 100644 src/commands/company/buzzNoun.ts create mode 100644 src/commands/company/buzzPhrase.ts create mode 100644 src/commands/company/buzzVerb.ts create mode 100644 src/commands/company/catchPhrase.ts create mode 100644 src/commands/company/catchPhraseAdjective.ts create mode 100644 src/commands/company/catchPhraseDescriptor.ts create mode 100644 src/commands/company/catchPhraseNoun.ts create mode 100644 src/commands/company/companySuffix.ts create mode 100644 src/commands/company/name.ts create mode 100644 src/commands/company/suffixes.ts create mode 100644 src/commands/database/collation.ts create mode 100644 src/commands/database/column.ts create mode 100644 src/commands/database/engine.ts create mode 100644 src/commands/database/mongodbObjectId.ts create mode 100644 src/commands/database/type.ts create mode 100644 src/commands/datatype/array.ts create mode 100644 src/commands/datatype/bigInt.ts create mode 100644 src/commands/datatype/boolean.ts create mode 100644 src/commands/datatype/datetime.ts create mode 100644 src/commands/datatype/float.ts create mode 100644 src/commands/datatype/hexadecimal.ts create mode 100644 src/commands/datatype/json.ts create mode 100644 src/commands/datatype/number.ts create mode 100644 src/commands/datatype/string.ts create mode 100644 src/commands/datatype/uuid.ts create mode 100644 src/commands/date/anytime.ts create mode 100644 src/commands/date/birthdate.ts create mode 100644 src/commands/date/future.ts create mode 100644 src/commands/date/month.ts create mode 100644 src/commands/date/past.ts create mode 100644 src/commands/date/recent.ts create mode 100644 src/commands/date/soon.ts create mode 100644 src/commands/date/weekday.ts create mode 100644 src/commands/finance/account.ts create mode 100644 src/commands/finance/accountName.ts create mode 100644 src/commands/finance/accountNumber.ts create mode 100644 src/commands/finance/amount.ts create mode 100644 src/commands/finance/bic.ts create mode 100644 src/commands/finance/bitcoinAddress.ts create mode 100644 src/commands/finance/creditCardCVV.ts create mode 100644 src/commands/finance/creditCardIssuer.ts create mode 100644 src/commands/finance/creditCardNumber.ts create mode 100644 src/commands/finance/currency.ts create mode 100644 src/commands/finance/currencyCode.ts create mode 100644 src/commands/finance/currencyName.ts create mode 100644 src/commands/finance/currencySymbol.ts create mode 100644 src/commands/finance/ethereumAddress.ts create mode 100644 src/commands/finance/iban.ts create mode 100644 src/commands/finance/litecoinAddress.ts create mode 100644 src/commands/finance/mask.ts create mode 100644 src/commands/finance/maskedNumber.ts create mode 100644 src/commands/finance/pin.ts create mode 100644 src/commands/finance/routingNumber.ts create mode 100644 src/commands/finance/transactionDescription.ts create mode 100644 src/commands/finance/transactionType.ts create mode 100644 src/commands/git/branch.ts create mode 100644 src/commands/git/commitDate.ts create mode 100644 src/commands/git/commitEntry.ts create mode 100644 src/commands/git/commitMessage.ts create mode 100644 src/commands/git/commitSha.ts create mode 100644 src/commands/git/shortSha.ts create mode 100644 src/commands/hacker/abbreviation.ts create mode 100644 src/commands/hacker/adjective.ts create mode 100644 src/commands/hacker/ingverb.ts create mode 100644 src/commands/hacker/noun.ts create mode 100644 src/commands/hacker/phrase.ts create mode 100644 src/commands/hacker/verb.ts create mode 100644 src/commands/image/abstract.ts create mode 100644 src/commands/image/animals.ts create mode 100644 src/commands/image/avatar.ts create mode 100644 src/commands/image/avatarGitHub.ts create mode 100644 src/commands/image/avatarLegacy.ts create mode 100644 src/commands/image/business.ts create mode 100644 src/commands/image/cats.ts create mode 100644 src/commands/image/city.ts create mode 100644 src/commands/image/dataUri.ts create mode 100644 src/commands/image/fashion.ts create mode 100644 src/commands/image/food.ts create mode 100644 src/commands/image/image.ts create mode 100644 src/commands/image/imageUrl.ts create mode 100644 src/commands/image/nature.ts create mode 100644 src/commands/image/nightlife.ts create mode 100644 src/commands/image/people.ts create mode 100644 src/commands/image/sports.ts create mode 100644 src/commands/image/technics.ts create mode 100644 src/commands/image/transport.ts create mode 100644 src/commands/image/url.ts create mode 100644 src/commands/image/urlLoremFlickr.ts create mode 100644 src/commands/image/urlPicsumPhotos.ts create mode 100644 src/commands/image/urlPlaceholder.ts create mode 100644 src/commands/internet/avatar.ts create mode 100644 src/commands/internet/color.ts create mode 100644 src/commands/internet/displayName.ts create mode 100644 src/commands/internet/domainName.ts create mode 100644 src/commands/internet/domainSuffix.ts create mode 100644 src/commands/internet/domainWord.ts create mode 100644 src/commands/internet/email.ts create mode 100644 src/commands/internet/emoji.ts create mode 100644 src/commands/internet/exampleEmail.ts create mode 100644 src/commands/internet/httpMethod.ts create mode 100644 src/commands/internet/httpStatusCode.ts create mode 100644 src/commands/internet/ip.ts create mode 100644 src/commands/internet/ipv4.ts create mode 100644 src/commands/internet/ipv6.ts create mode 100644 src/commands/internet/mac.ts create mode 100644 src/commands/internet/password.ts create mode 100644 src/commands/internet/port.ts create mode 100644 src/commands/internet/protocol.ts create mode 100644 src/commands/internet/url.ts create mode 100644 src/commands/internet/userAgent.ts create mode 100644 src/commands/internet/userName.ts create mode 100644 src/commands/location/buildingNumber.ts create mode 100644 src/commands/location/cardinalDirection.ts create mode 100644 src/commands/location/city.ts create mode 100644 src/commands/location/cityName.ts create mode 100644 src/commands/location/country.ts create mode 100644 src/commands/location/countryCode.ts create mode 100644 src/commands/location/county.ts create mode 100644 src/commands/location/direction.ts create mode 100644 src/commands/location/latitude.ts create mode 100644 src/commands/location/longitude.ts create mode 100644 src/commands/location/nearbyGPSCoordinate.ts create mode 100644 src/commands/location/ordinalDirection.ts create mode 100644 src/commands/location/secondaryAddress.ts create mode 100644 src/commands/location/state.ts create mode 100644 src/commands/location/stateAbbr.ts create mode 100644 src/commands/location/street.ts create mode 100644 src/commands/location/streetAddress.ts create mode 100644 src/commands/location/streetName.ts create mode 100644 src/commands/location/timeZone.ts create mode 100644 src/commands/location/zipCode.ts create mode 100644 src/commands/location/zipCodeByState.ts create mode 100644 src/commands/lorem/lines.ts create mode 100644 src/commands/lorem/paragraph.ts create mode 100644 src/commands/lorem/paragraphs.ts create mode 100644 src/commands/lorem/sentence.ts create mode 100644 src/commands/lorem/sentences.ts create mode 100644 src/commands/lorem/slug.ts create mode 100644 src/commands/lorem/text.ts create mode 100644 src/commands/lorem/word.ts create mode 100644 src/commands/lorem/words.ts create mode 100644 src/commands/music/genre.ts create mode 100644 src/commands/music/songName.ts create mode 100644 src/commands/number/bigInt.ts create mode 100644 src/commands/number/binary.ts create mode 100644 src/commands/number/float.ts create mode 100644 src/commands/number/hex.ts create mode 100644 src/commands/number/int.ts create mode 100644 src/commands/number/octal.ts create mode 100644 src/commands/person/bio.ts create mode 100644 src/commands/person/firstName.ts create mode 100644 src/commands/person/fullName.ts create mode 100644 src/commands/person/gender.ts create mode 100644 src/commands/person/jobArea.ts create mode 100644 src/commands/person/jobDescriptor.ts create mode 100644 src/commands/person/jobTitle.ts create mode 100644 src/commands/person/jobType.ts create mode 100644 src/commands/person/lastName.ts create mode 100644 src/commands/person/middleName.ts create mode 100644 src/commands/person/prefix.ts create mode 100644 src/commands/person/sex.ts create mode 100644 src/commands/person/sexType.ts create mode 100644 src/commands/person/suffix.ts create mode 100644 src/commands/person/zodiacSign.ts create mode 100644 src/commands/phone/imei.ts create mode 100644 src/commands/phone/number.ts create mode 100644 src/commands/science/chemicalElement.ts create mode 100644 src/commands/science/unit.ts create mode 100644 src/commands/string/alpha.ts create mode 100644 src/commands/string/alphanumeric.ts create mode 100644 src/commands/string/binary.ts create mode 100644 src/commands/string/hexadecimal.ts create mode 100644 src/commands/string/nanoid.ts create mode 100644 src/commands/string/numeric.ts create mode 100644 src/commands/string/octal.ts create mode 100644 src/commands/string/sample.ts create mode 100644 src/commands/string/symbol.ts create mode 100644 src/commands/string/uuid.ts create mode 100644 src/commands/system/commonFileExt.ts create mode 100644 src/commands/system/commonFileName.ts create mode 100644 src/commands/system/commonFileType.ts create mode 100644 src/commands/system/cron.ts create mode 100644 src/commands/system/directoryPath.ts create mode 100644 src/commands/system/fileExt.ts create mode 100644 src/commands/system/fileName.ts create mode 100644 src/commands/system/filePath.ts create mode 100644 src/commands/system/fileType.ts create mode 100644 src/commands/system/mimeType.ts create mode 100644 src/commands/system/networkInterface.ts create mode 100644 src/commands/system/semver.ts create mode 100644 src/commands/vehicle/bicycle.ts create mode 100644 src/commands/vehicle/color.ts create mode 100644 src/commands/vehicle/fuel.ts create mode 100644 src/commands/vehicle/manufacturer.ts create mode 100644 src/commands/vehicle/model.ts create mode 100644 src/commands/vehicle/type.ts create mode 100644 src/commands/vehicle/vehicle.ts create mode 100644 src/commands/vehicle/vin.ts create mode 100644 src/commands/vehicle/vrm.ts create mode 100644 src/commands/word/adjective.ts create mode 100644 src/commands/word/adverb.ts create mode 100644 src/commands/word/conjunction.ts create mode 100644 src/commands/word/interjection.ts create mode 100644 src/commands/word/noun.ts create mode 100644 src/commands/word/preposition.ts create mode 100644 src/commands/word/sample.ts create mode 100644 src/commands/word/verb.ts create mode 100644 src/commands/word/words.ts diff --git a/src/commands/airline/aircraftType.ts b/src/commands/airline/aircraftType.ts new file mode 100644 index 0000000..bf579d1 --- /dev/null +++ b/src/commands/airline/aircraftType.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('aircraftType') + .description(`Returns 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 new file mode 100644 index 0000000..00aec7d --- /dev/null +++ b/src/commands/airline/airline.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..bd62ef8 --- /dev/null +++ b/src/commands/airline/airplane.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..155f667 --- /dev/null +++ b/src/commands/airline/airport.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..b45a311 --- /dev/null +++ b/src/commands/airline/flightNumber.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('flightNumber') + .description( + `Returns a random flight number. Flight numbers are always 1 to 4 digits long. Sometimes they are`, + ) + .action(() => { + console.log(faker['airline']['flightNumber']()); + }); + +export default command; diff --git a/src/commands/airline/index.ts b/src/commands/airline/index.ts index 9bdd65e..57a76b9 100644 --- a/src/commands/airline/index.ts +++ b/src/commands/airline/index.ts @@ -1,7 +1,20 @@ 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.`, -); +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 new file mode 100644 index 0000000..acc1450 --- /dev/null +++ b/src/commands/airline/recordLocator.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('recordLocator') + .description( + `Generates a random [record locator](https://en.wikipedia.org/wiki/Record_locator). Record locators`, + ) + .action(() => { + console.log(faker['airline']['recordLocator']()); + }); + +export default command; diff --git a/src/commands/airline/seat.ts b/src/commands/airline/seat.ts new file mode 100644 index 0000000..519252a --- /dev/null +++ b/src/commands/airline/seat.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..ab787ed --- /dev/null +++ b/src/commands/animal/bear.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('bear') + .description(`Returns 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 new file mode 100644 index 0000000..9ecef90 --- /dev/null +++ b/src/commands/animal/bird.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('bird') + .description(`Returns 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 new file mode 100644 index 0000000..cc29bb6 --- /dev/null +++ b/src/commands/animal/cat.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('cat') + .description(`Returns 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 new file mode 100644 index 0000000..08acce1 --- /dev/null +++ b/src/commands/animal/cetacean.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('cetacean') + .description(`Returns 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 new file mode 100644 index 0000000..9d07625 --- /dev/null +++ b/src/commands/animal/cow.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('cow') + .description(`Returns 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 new file mode 100644 index 0000000..e7bb2b3 --- /dev/null +++ b/src/commands/animal/crocodilia.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('crocodilia') + .description(`Returns 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 new file mode 100644 index 0000000..e7c5110 --- /dev/null +++ b/src/commands/animal/dog.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('dog') + .description(`Returns 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 new file mode 100644 index 0000000..b399e7b --- /dev/null +++ b/src/commands/animal/fish.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('fish') + .description(`Returns 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 new file mode 100644 index 0000000..fb51f09 --- /dev/null +++ b/src/commands/animal/horse.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('horse') + .description(`Returns 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 index 932b46c..ce93aa3 100644 --- a/src/commands/animal/index.ts +++ b/src/commands/animal/index.ts @@ -1,7 +1,36 @@ 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.`, -); +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 new file mode 100644 index 0000000..1e70f78 --- /dev/null +++ b/src/commands/animal/insect.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('insect') + .description(`Returns 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 new file mode 100644 index 0000000..1210c75 --- /dev/null +++ b/src/commands/animal/lion.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('lion') + .description(`Returns 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 new file mode 100644 index 0000000..6ea5c56 --- /dev/null +++ b/src/commands/animal/rabbit.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('rabbit') + .description(`Returns 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 new file mode 100644 index 0000000..d076802 --- /dev/null +++ b/src/commands/animal/rodent.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('rodent') + .description(`Returns 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 new file mode 100644 index 0000000..2ca14d3 --- /dev/null +++ b/src/commands/animal/snake.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('snake') + .description(`Returns 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 new file mode 100644 index 0000000..d28566e --- /dev/null +++ b/src/commands/animal/type.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('type') + .description(`Returns 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 new file mode 100644 index 0000000..5dbd321 --- /dev/null +++ b/src/commands/color/cmyk.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('cmyk') + .description(`Returns 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 new file mode 100644 index 0000000..0f86c69 --- /dev/null +++ b/src/commands/color/colorByCSSColorSpace.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('colorByCSSColorSpace') + .description(`Returns 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 new file mode 100644 index 0000000..45c195b --- /dev/null +++ b/src/commands/color/cssSupportedFunction.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('cssSupportedFunction') + .description(`Returns 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 new file mode 100644 index 0000000..237ee7f --- /dev/null +++ b/src/commands/color/cssSupportedSpace.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('cssSupportedSpace') + .description(`Returns 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 new file mode 100644 index 0000000..e2631eb --- /dev/null +++ b/src/commands/color/hsl.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('hsl') + .description(`Returns 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 new file mode 100644 index 0000000..4b14b38 --- /dev/null +++ b/src/commands/color/human.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('human') + .description(`Returns 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 new file mode 100644 index 0000000..efb24b2 --- /dev/null +++ b/src/commands/color/hwb.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('hwb') + .description(`Returns 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 index 53171f2..090ffbc 100644 --- a/src/commands/color/index.ts +++ b/src/commands/color/index.ts @@ -1,5 +1,28 @@ 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.`); +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 new file mode 100644 index 0000000..8a88d95 --- /dev/null +++ b/src/commands/color/lab.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('lab') + .description(`Returns 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 new file mode 100644 index 0000000..d7b1114 --- /dev/null +++ b/src/commands/color/lch.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('lch') + .description(`Returns 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 new file mode 100644 index 0000000..e2f05a2 --- /dev/null +++ b/src/commands/color/rgb.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('rgb') + .description(`Returns 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 new file mode 100644 index 0000000..e5b943e --- /dev/null +++ b/src/commands/color/space.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('space') + .description( + `Returns 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 new file mode 100644 index 0000000..9b44214 --- /dev/null +++ b/src/commands/commerce/department.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('department') + .description(`Returns 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 index 440ce1c..2461aa0 100644 --- a/src/commands/commerce/index.ts +++ b/src/commands/commerce/index.ts @@ -1,7 +1,20 @@ 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.`, -); +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 new file mode 100644 index 0000000..ecd36bb --- /dev/null +++ b/src/commands/commerce/price.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('price') + .description(`Generates a price between min and max (inclusive).`) + .action(() => { + console.log(faker['commerce']['price']()); + }); + +export default command; diff --git a/src/commands/commerce/product.ts b/src/commands/commerce/product.ts new file mode 100644 index 0000000..f650ae2 --- /dev/null +++ b/src/commands/commerce/product.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('product') + .description(`Returns 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 new file mode 100644 index 0000000..44ccc26 --- /dev/null +++ b/src/commands/commerce/productAdjective.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('productAdjective') + .description(`Returns 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 new file mode 100644 index 0000000..ee0724a --- /dev/null +++ b/src/commands/commerce/productDescription.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('productDescription') + .description(`Returns 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 new file mode 100644 index 0000000..06c72cf --- /dev/null +++ b/src/commands/commerce/productMaterial.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('productMaterial') + .description(`Returns 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 new file mode 100644 index 0000000..dcf26fd --- /dev/null +++ b/src/commands/commerce/productName.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..d61313a --- /dev/null +++ b/src/commands/company/bs.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..f7f5649 --- /dev/null +++ b/src/commands/company/bsAdjective.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('bsAdjective') + .description(`Returns 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 new file mode 100644 index 0000000..06be7dd --- /dev/null +++ b/src/commands/company/bsBuzz.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('bsBuzz') + .description(`Returns 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 new file mode 100644 index 0000000..1bf8672 --- /dev/null +++ b/src/commands/company/bsNoun.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('bsNoun') + .description(`Returns 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 new file mode 100644 index 0000000..8724ce5 --- /dev/null +++ b/src/commands/company/buzzAdjective.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('buzzAdjective') + .description( + `Returns 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 new file mode 100644 index 0000000..92eb7cb --- /dev/null +++ b/src/commands/company/buzzNoun.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('buzzNoun') + .description( + `Returns 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 new file mode 100644 index 0000000..bfa8e5c --- /dev/null +++ b/src/commands/company/buzzPhrase.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..d21a53f --- /dev/null +++ b/src/commands/company/buzzVerb.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('buzzVerb') + .description( + `Returns 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 new file mode 100644 index 0000000..8e91d8c --- /dev/null +++ b/src/commands/company/catchPhrase.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..46811c4 --- /dev/null +++ b/src/commands/company/catchPhraseAdjective.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('catchPhraseAdjective') + .description( + `Returns 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 new file mode 100644 index 0000000..50efc1d --- /dev/null +++ b/src/commands/company/catchPhraseDescriptor.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('catchPhraseDescriptor') + .description( + `Returns 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 new file mode 100644 index 0000000..fbb8901 --- /dev/null +++ b/src/commands/company/catchPhraseNoun.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('catchPhraseNoun') + .description( + `Returns 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 new file mode 100644 index 0000000..01f568d --- /dev/null +++ b/src/commands/company/companySuffix.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('companySuffix') + .description(`Returns 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 index a44bbeb..936ab3b 100644 --- a/src/commands/company/index.ts +++ b/src/commands/company/index.ts @@ -1,7 +1,36 @@ 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.`, -); +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 new file mode 100644 index 0000000..c28461f --- /dev/null +++ b/src/commands/company/name.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..651366d --- /dev/null +++ b/src/commands/company/suffixes.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('suffixes') + .description(`Returns 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 new file mode 100644 index 0000000..30990f8 --- /dev/null +++ b/src/commands/database/collation.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('collation') + .description(`Returns 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 new file mode 100644 index 0000000..b67b991 --- /dev/null +++ b/src/commands/database/column.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('column') + .description(`Returns 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 new file mode 100644 index 0000000..675a5ef --- /dev/null +++ b/src/commands/database/engine.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('engine') + .description(`Returns 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 index fbf03b7..764534b 100644 --- a/src/commands/database/index.ts +++ b/src/commands/database/index.ts @@ -1,7 +1,16 @@ 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.`, -); +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 new file mode 100644 index 0000000..1fb59e2 --- /dev/null +++ b/src/commands/database/mongodbObjectId.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('mongodbObjectId') + .description( + `Returns a MongoDB [ObjectId](https://docs.mongodb.com/manual/reference/method/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 new file mode 100644 index 0000000..103121a --- /dev/null +++ b/src/commands/database/type.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('type') + .description(`Returns 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 new file mode 100644 index 0000000..476be67 --- /dev/null +++ b/src/commands/datatype/array.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('array') + .description(`Returns 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 new file mode 100644 index 0000000..15f254a --- /dev/null +++ b/src/commands/datatype/bigInt.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('bigInt') + .description( + `Returns a [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#bigint_type) number.`, + ) + .action(() => { + console.log(faker['datatype']['bigInt']()); + }); + +export default command; diff --git a/src/commands/datatype/boolean.ts b/src/commands/datatype/boolean.ts new file mode 100644 index 0000000..0567478 --- /dev/null +++ b/src/commands/datatype/boolean.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('boolean') + .description(`Returns 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 new file mode 100644 index 0000000..27a3142 --- /dev/null +++ b/src/commands/datatype/datetime.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('datetime') + .description( + `Returns 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 new file mode 100644 index 0000000..141f19e --- /dev/null +++ b/src/commands/datatype/float.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('float') + .description( + `Returns a single random floating-point number for the given precision or range and precision.`, + ) + .action(() => { + console.log(faker['datatype']['float']()); + }); + +export default command; diff --git a/src/commands/datatype/hexadecimal.ts b/src/commands/datatype/hexadecimal.ts new file mode 100644 index 0000000..e14ab9d --- /dev/null +++ b/src/commands/datatype/hexadecimal.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('hexadecimal') + .description( + `Returns 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 index 53efb3f..5e8c975 100644 --- a/src/commands/datatype/index.ts +++ b/src/commands/datatype/index.ts @@ -1,7 +1,26 @@ 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.`, -); +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 new file mode 100644 index 0000000..78a3c94 --- /dev/null +++ b/src/commands/datatype/json.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('json') + .description( + `Returns 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 new file mode 100644 index 0000000..8545994 --- /dev/null +++ b/src/commands/datatype/number.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('number') + .description( + `Returns a single random number between zero and the given max value or the given range with the specified precision.`, + ) + .action(() => { + console.log(faker['datatype']['number']()); + }); + +export default command; diff --git a/src/commands/datatype/string.ts b/src/commands/datatype/string.ts new file mode 100644 index 0000000..ed4bdc2 --- /dev/null +++ b/src/commands/datatype/string.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('string') + .description( + `Returns 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 new file mode 100644 index 0000000..57b65ff --- /dev/null +++ b/src/commands/datatype/uuid.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('uuid') + .description( + `Returns a UUID v4 ([Universally Unique Identifier](https://en.wikipedia.org/wiki/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 new file mode 100644 index 0000000..be845f4 --- /dev/null +++ b/src/commands/date/anytime.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..35fe1c9 --- /dev/null +++ b/src/commands/date/birthdate.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('birthdate') + .description(`Returns 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 new file mode 100644 index 0000000..48bb1c0 --- /dev/null +++ b/src/commands/date/future.ts @@ -0,0 +1,10 @@ +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 index bd566d9..bb1261d 100644 --- a/src/commands/date/index.ts +++ b/src/commands/date/index.ts @@ -1,5 +1,22 @@ 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.`); +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 new file mode 100644 index 0000000..7f26aa6 --- /dev/null +++ b/src/commands/date/month.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('month') + .description(`Returns 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 new file mode 100644 index 0000000..b59bb34 --- /dev/null +++ b/src/commands/date/past.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..2f4d86c --- /dev/null +++ b/src/commands/date/recent.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..81e6898 --- /dev/null +++ b/src/commands/date/soon.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..e413dc6 --- /dev/null +++ b/src/commands/date/weekday.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('weekday') + .description(`Returns 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 new file mode 100644 index 0000000..c43d296 --- /dev/null +++ b/src/commands/finance/account.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..233097f --- /dev/null +++ b/src/commands/finance/accountName.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..8bc199c --- /dev/null +++ b/src/commands/finance/accountNumber.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..1344a9d --- /dev/null +++ b/src/commands/finance/amount.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..e746d3e --- /dev/null +++ b/src/commands/finance/bic.ts @@ -0,0 +1,12 @@ +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](https://en.wikipedia.org/wiki/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 new file mode 100644 index 0000000..4b04279 --- /dev/null +++ b/src/commands/finance/bitcoinAddress.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..a321f24 --- /dev/null +++ b/src/commands/finance/creditCardCVV.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..aef00eb --- /dev/null +++ b/src/commands/finance/creditCardIssuer.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('creditCardIssuer') + .description(`Returns 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 new file mode 100644 index 0000000..0ad2d71 --- /dev/null +++ b/src/commands/finance/creditCardNumber.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..80788a5 --- /dev/null +++ b/src/commands/finance/currency.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('currency') + .description( + `Returns 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 new file mode 100644 index 0000000..f85564c --- /dev/null +++ b/src/commands/finance/currencyCode.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('currencyCode') + .description(`Returns 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 new file mode 100644 index 0000000..483cdea --- /dev/null +++ b/src/commands/finance/currencyName.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('currencyName') + .description(`Returns 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 new file mode 100644 index 0000000..708f329 --- /dev/null +++ b/src/commands/finance/currencySymbol.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('currencySymbol') + .description(`Returns 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 new file mode 100644 index 0000000..367981f --- /dev/null +++ b/src/commands/finance/ethereumAddress.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('ethereumAddress') + .description(`Creates 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 new file mode 100644 index 0000000..c848331 --- /dev/null +++ b/src/commands/finance/iban.ts @@ -0,0 +1,10 @@ +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 index e62f554..a4c593c 100644 --- a/src/commands/finance/index.ts +++ b/src/commands/finance/index.ts @@ -1,7 +1,50 @@ 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.`, -); +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 new file mode 100644 index 0000000..e79a9c9 --- /dev/null +++ b/src/commands/finance/litecoinAddress.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..b940957 --- /dev/null +++ b/src/commands/finance/mask.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..819be45 --- /dev/null +++ b/src/commands/finance/maskedNumber.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..f7ca635 --- /dev/null +++ b/src/commands/finance/pin.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..a3923d7 --- /dev/null +++ b/src/commands/finance/routingNumber.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..553ae8c --- /dev/null +++ b/src/commands/finance/transactionDescription.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..3212438 --- /dev/null +++ b/src/commands/finance/transactionType.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('transactionType') + .description(`Returns 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 new file mode 100644 index 0000000..cb8309a --- /dev/null +++ b/src/commands/git/branch.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..c7d8eef --- /dev/null +++ b/src/commands/git/commitDate.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..0fe523d --- /dev/null +++ b/src/commands/git/commitEntry.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..2dc3858 --- /dev/null +++ b/src/commands/git/commitMessage.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..559ff8d --- /dev/null +++ b/src/commands/git/commitSha.ts @@ -0,0 +1,10 @@ +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 index 7f9a1ff..2cb2659 100644 --- a/src/commands/git/index.ts +++ b/src/commands/git/index.ts @@ -1,7 +1,18 @@ 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.`, -); +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 new file mode 100644 index 0000000..d2f800f --- /dev/null +++ b/src/commands/git/shortSha.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..4cf9407 --- /dev/null +++ b/src/commands/hacker/abbreviation.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('abbreviation') + .description(`Returns 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 new file mode 100644 index 0000000..2a72834 --- /dev/null +++ b/src/commands/hacker/adjective.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('adjective') + .description(`Returns 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 index 6dd9a1b..ecd0693 100644 --- a/src/commands/hacker/index.ts +++ b/src/commands/hacker/index.ts @@ -1,7 +1,18 @@ 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.`, -); +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 new file mode 100644 index 0000000..9e89933 --- /dev/null +++ b/src/commands/hacker/ingverb.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('ingverb') + .description( + `Returns 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 new file mode 100644 index 0000000..171966f --- /dev/null +++ b/src/commands/hacker/noun.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('noun') + .description(`Returns 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 new file mode 100644 index 0000000..86e1526 --- /dev/null +++ b/src/commands/hacker/phrase.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..d6a60ea --- /dev/null +++ b/src/commands/hacker/verb.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('verb') + .description(`Returns 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 new file mode 100644 index 0000000..a14fe14 --- /dev/null +++ b/src/commands/image/abstract.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..5d93ba5 --- /dev/null +++ b/src/commands/image/animals.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..4420ce9 --- /dev/null +++ b/src/commands/image/avatar.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..ff16afd --- /dev/null +++ b/src/commands/image/avatarGitHub.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..1c19f7c --- /dev/null +++ b/src/commands/image/avatarLegacy.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..6f82ade --- /dev/null +++ b/src/commands/image/business.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..66a5fd9 --- /dev/null +++ b/src/commands/image/cats.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..1549205 --- /dev/null +++ b/src/commands/image/city.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..2778e86 --- /dev/null +++ b/src/commands/image/dataUri.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..e98bca9 --- /dev/null +++ b/src/commands/image/fashion.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..4550270 --- /dev/null +++ b/src/commands/image/food.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..5f0d92d --- /dev/null +++ b/src/commands/image/image.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..6eb5d71 --- /dev/null +++ b/src/commands/image/imageUrl.ts @@ -0,0 +1,10 @@ +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 index c2c5bb7..800cef3 100644 --- a/src/commands/image/index.ts +++ b/src/commands/image/index.ts @@ -1,5 +1,52 @@ 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.`); +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 new file mode 100644 index 0000000..e832ff1 --- /dev/null +++ b/src/commands/image/nature.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..3c56c43 --- /dev/null +++ b/src/commands/image/nightlife.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..fd02f9f --- /dev/null +++ b/src/commands/image/people.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..8cebe62 --- /dev/null +++ b/src/commands/image/sports.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..8e58ad4 --- /dev/null +++ b/src/commands/image/technics.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..951aed3 --- /dev/null +++ b/src/commands/image/transport.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..a2383dc --- /dev/null +++ b/src/commands/image/url.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..c425c33 --- /dev/null +++ b/src/commands/image/urlLoremFlickr.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..3c711b9 --- /dev/null +++ b/src/commands/image/urlPicsumPhotos.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..a1d91a2 --- /dev/null +++ b/src/commands/image/urlPlaceholder.ts @@ -0,0 +1,12 @@ +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/internet/avatar.ts b/src/commands/internet/avatar.ts new file mode 100644 index 0000000..3330e3d --- /dev/null +++ b/src/commands/internet/avatar.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('avatar') + .description(`Returns 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 new file mode 100644 index 0000000..4871bd7 --- /dev/null +++ b/src/commands/internet/color.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..95aaeaa --- /dev/null +++ b/src/commands/internet/displayName.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..cd7f13f --- /dev/null +++ b/src/commands/internet/domainName.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..6431a23 --- /dev/null +++ b/src/commands/internet/domainSuffix.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('domainSuffix') + .description(`Returns 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 new file mode 100644 index 0000000..65caf76 --- /dev/null +++ b/src/commands/internet/domainWord.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..41c1db4 --- /dev/null +++ b/src/commands/internet/email.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('email') + .description( + `Generates an email address using the given person's name as base.`, + ) + .action(() => { + console.log(faker['internet']['email']()); + }); + +export default command; diff --git a/src/commands/internet/emoji.ts b/src/commands/internet/emoji.ts new file mode 100644 index 0000000..6d29ec5 --- /dev/null +++ b/src/commands/internet/emoji.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..731df78 --- /dev/null +++ b/src/commands/internet/exampleEmail.ts @@ -0,0 +1,12 @@ +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 using the given person's name as base.`, + ) + .action(() => { + console.log(faker['internet']['exampleEmail']()); + }); + +export default command; diff --git a/src/commands/internet/httpMethod.ts b/src/commands/internet/httpMethod.ts new file mode 100644 index 0000000..830b1bc --- /dev/null +++ b/src/commands/internet/httpMethod.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('httpMethod') + .description(`Returns 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 new file mode 100644 index 0000000..169ae1d --- /dev/null +++ b/src/commands/internet/httpStatusCode.ts @@ -0,0 +1,10 @@ +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 index e00b400..9af9a30 100644 --- a/src/commands/internet/index.ts +++ b/src/commands/internet/index.ts @@ -1,7 +1,48 @@ 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.`, -); +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 new file mode 100644 index 0000000..d2efd5d --- /dev/null +++ b/src/commands/internet/ip.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..de7dd7b --- /dev/null +++ b/src/commands/internet/ipv4.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..b87ded1 --- /dev/null +++ b/src/commands/internet/ipv6.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..fc399ed --- /dev/null +++ b/src/commands/internet/mac.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..808e528 --- /dev/null +++ b/src/commands/internet/password.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..34fedb3 --- /dev/null +++ b/src/commands/internet/port.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..6e1f233 --- /dev/null +++ b/src/commands/internet/protocol.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('protocol') + .description(`Returns 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 new file mode 100644 index 0000000..1132cdb --- /dev/null +++ b/src/commands/internet/url.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..dda24d5 --- /dev/null +++ b/src/commands/internet/userAgent.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..41ad9fc --- /dev/null +++ b/src/commands/internet/userName.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('userName') + .description(`Generates a username using the given person's name as base.`) + .action(() => { + console.log(faker['internet']['userName']()); + }); + +export default command; diff --git a/src/commands/location/buildingNumber.ts b/src/commands/location/buildingNumber.ts new file mode 100644 index 0000000..c5aab6a --- /dev/null +++ b/src/commands/location/buildingNumber.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..f21a4c0 --- /dev/null +++ b/src/commands/location/cardinalDirection.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('cardinalDirection') + .description( + `Returns 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 new file mode 100644 index 0000000..02504e0 --- /dev/null +++ b/src/commands/location/city.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..e255727 --- /dev/null +++ b/src/commands/location/cityName.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('cityName') + .description( + `Returns 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 new file mode 100644 index 0000000..8fa2d40 --- /dev/null +++ b/src/commands/location/country.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('country') + .description(`Returns 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 new file mode 100644 index 0000000..a4a7d95 --- /dev/null +++ b/src/commands/location/countryCode.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('countryCode') + .description( + `Returns a random [ISO_3166-1](https://en.wikipedia.org/wiki/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 new file mode 100644 index 0000000..a57706c --- /dev/null +++ b/src/commands/location/county.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('county') + .description( + `Returns 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 new file mode 100644 index 0000000..0f2b7fd --- /dev/null +++ b/src/commands/location/direction.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('direction') + .description( + `Returns 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 index 0ba1f48..98b2514 100644 --- a/src/commands/location/index.ts +++ b/src/commands/location/index.ts @@ -1,7 +1,50 @@ 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\`.`, -); +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 new file mode 100644 index 0000000..a01fd4d --- /dev/null +++ b/src/commands/location/latitude.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..8643317 --- /dev/null +++ b/src/commands/location/longitude.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..73be544 --- /dev/null +++ b/src/commands/location/nearbyGPSCoordinate.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..1fb2de8 --- /dev/null +++ b/src/commands/location/ordinalDirection.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('ordinalDirection') + .description( + `Returns 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 new file mode 100644 index 0000000..d9d438a --- /dev/null +++ b/src/commands/location/secondaryAddress.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('secondaryAddress') + .description( + `Generates a random localized secondary address. This refers to a specific location at a given address`, + ) + .action(() => { + console.log(faker['location']['secondaryAddress']()); + }); + +export default command; diff --git a/src/commands/location/state.ts b/src/commands/location/state.ts new file mode 100644 index 0000000..ee7dda1 --- /dev/null +++ b/src/commands/location/state.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('state') + .description( + `Returns 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 new file mode 100644 index 0000000..f472f58 --- /dev/null +++ b/src/commands/location/stateAbbr.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('stateAbbr') + .description( + `Returns 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 new file mode 100644 index 0000000..5122f3b --- /dev/null +++ b/src/commands/location/street.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..d6d75cd --- /dev/null +++ b/src/commands/location/streetAddress.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..07f0235 --- /dev/null +++ b/src/commands/location/streetName.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('streetName') + .description(`Returns 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 new file mode 100644 index 0000000..214becb --- /dev/null +++ b/src/commands/location/timeZone.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('timeZone') + .description(`Returns 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 new file mode 100644 index 0000000..94c2d84 --- /dev/null +++ b/src/commands/location/zipCode.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('zipCode') + .description( + `Generates random zip code from specified format. If format is not specified,`, + ) + .action(() => { + console.log(faker['location']['zipCode']()); + }); + +export default command; diff --git a/src/commands/location/zipCodeByState.ts b/src/commands/location/zipCodeByState.ts new file mode 100644 index 0000000..949651d --- /dev/null +++ b/src/commands/location/zipCodeByState.ts @@ -0,0 +1,10 @@ +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 index eeea393..6ee5581 100644 --- a/src/commands/lorem/index.ts +++ b/src/commands/lorem/index.ts @@ -1,7 +1,24 @@ 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.`, -); +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 new file mode 100644 index 0000000..fdcec6c --- /dev/null +++ b/src/commands/lorem/lines.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..d7f873e --- /dev/null +++ b/src/commands/lorem/paragraph.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..7ccbafc --- /dev/null +++ b/src/commands/lorem/paragraphs.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..7ec37e6 --- /dev/null +++ b/src/commands/lorem/sentence.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..34219e6 --- /dev/null +++ b/src/commands/lorem/sentences.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..69dd5e9 --- /dev/null +++ b/src/commands/lorem/slug.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..269c211 --- /dev/null +++ b/src/commands/lorem/text.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..907fb85 --- /dev/null +++ b/src/commands/lorem/word.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..4ff730f --- /dev/null +++ b/src/commands/lorem/words.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..6068336 --- /dev/null +++ b/src/commands/music/genre.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('genre') + .description(`Returns 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 index efc26f5..1c32154 100644 --- a/src/commands/music/index.ts +++ b/src/commands/music/index.ts @@ -1,7 +1,10 @@ import { Command } from 'commander'; +import genreCommand from './genre'; +import songNameCommand from './songName'; -const command = new Command('music').description( - `Module to generate music related entries.`, -); +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 new file mode 100644 index 0000000..fe65acc --- /dev/null +++ b/src/commands/music/songName.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('songName') + .description(`Returns 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 new file mode 100644 index 0000000..973bb0c --- /dev/null +++ b/src/commands/number/bigInt.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('bigInt') + .description( + `Returns a [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#bigint_type) number.`, + ) + .action(() => { + console.log(faker['number']['bigInt']()); + }); + +export default command; diff --git a/src/commands/number/binary.ts b/src/commands/number/binary.ts new file mode 100644 index 0000000..bbfbb0e --- /dev/null +++ b/src/commands/number/binary.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('binary') + .description( + `Returns a [binary](https://en.wikipedia.org/wiki/Binary_number) number.`, + ) + .action(() => { + console.log(faker['number']['binary']()); + }); + +export default command; diff --git a/src/commands/number/float.ts b/src/commands/number/float.ts new file mode 100644 index 0000000..179b342 --- /dev/null +++ b/src/commands/number/float.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('float') + .description( + `Returns a single random floating-point number for a given precision or range and precision.`, + ) + .action(() => { + console.log(faker['number']['float']()); + }); + +export default command; diff --git a/src/commands/number/hex.ts b/src/commands/number/hex.ts new file mode 100644 index 0000000..0686a4c --- /dev/null +++ b/src/commands/number/hex.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('hex') + .description( + `Returns a lowercase [hexadecimal](https://en.wikipedia.org/wiki/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 index 88781d8..6c47a22 100644 --- a/src/commands/number/index.ts +++ b/src/commands/number/index.ts @@ -1,7 +1,18 @@ 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.`, -); +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 new file mode 100644 index 0000000..8d918e7 --- /dev/null +++ b/src/commands/number/int.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('int') + .description( + `Returns a single random integer between zero and the given max value or the given range.`, + ) + .action(() => { + console.log(faker['number']['int']()); + }); + +export default command; diff --git a/src/commands/number/octal.ts b/src/commands/number/octal.ts new file mode 100644 index 0000000..feb1b76 --- /dev/null +++ b/src/commands/number/octal.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('octal') + .description( + `Returns an [octal](https://en.wikipedia.org/wiki/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 new file mode 100644 index 0000000..3c12aff --- /dev/null +++ b/src/commands/person/bio.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('bio') + .description(`Returns 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 new file mode 100644 index 0000000..aafff6d --- /dev/null +++ b/src/commands/person/firstName.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('firstName') + .description(`Returns 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 new file mode 100644 index 0000000..33c075c --- /dev/null +++ b/src/commands/person/fullName.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..7236bd9 --- /dev/null +++ b/src/commands/person/gender.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('gender') + .description(`Returns 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 index 065c82b..ef61aaa 100644 --- a/src/commands/person/index.ts +++ b/src/commands/person/index.ts @@ -1,7 +1,38 @@ 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\`.`, -); +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 new file mode 100644 index 0000000..b5248d7 --- /dev/null +++ b/src/commands/person/jobArea.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..0f2a4b6 --- /dev/null +++ b/src/commands/person/jobDescriptor.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..6e623fa --- /dev/null +++ b/src/commands/person/jobTitle.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..1818d61 --- /dev/null +++ b/src/commands/person/jobType.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..133c24a --- /dev/null +++ b/src/commands/person/lastName.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('lastName') + .description(`Returns 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 new file mode 100644 index 0000000..f5881df --- /dev/null +++ b/src/commands/person/middleName.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('middleName') + .description(`Returns 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 new file mode 100644 index 0000000..4e2e05a --- /dev/null +++ b/src/commands/person/prefix.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('prefix') + .description(`Returns 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 new file mode 100644 index 0000000..6923e59 --- /dev/null +++ b/src/commands/person/sex.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('sex') + .description(`Returns 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 new file mode 100644 index 0000000..9293c78 --- /dev/null +++ b/src/commands/person/sexType.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('sexType') + .description(`Returns 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 new file mode 100644 index 0000000..a2cb343 --- /dev/null +++ b/src/commands/person/suffix.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('suffix') + .description(`Returns 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 new file mode 100644 index 0000000..73571c9 --- /dev/null +++ b/src/commands/person/zodiacSign.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('zodiacSign') + .description(`Returns 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 new file mode 100644 index 0000000..67e3398 --- /dev/null +++ b/src/commands/phone/imei.ts @@ -0,0 +1,10 @@ +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 index f50b0a2..18466e3 100644 --- a/src/commands/phone/index.ts +++ b/src/commands/phone/index.ts @@ -1,7 +1,10 @@ import { Command } from 'commander'; +import numberCommand from './number'; +import imeiCommand from './imei'; -const command = new Command('phone').description( - `Module to generate phone-related data.`, -); +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 new file mode 100644 index 0000000..d1a46a9 --- /dev/null +++ b/src/commands/phone/number.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..4f505f5 --- /dev/null +++ b/src/commands/science/chemicalElement.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('chemicalElement') + .description(`Returns 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 index 70c0ea6..ddd1a05 100644 --- a/src/commands/science/index.ts +++ b/src/commands/science/index.ts @@ -1,7 +1,10 @@ import { Command } from 'commander'; +import chemicalElementCommand from './chemicalElement'; +import unitCommand from './unit'; -const command = new Command('science').description( - `Module to generate science related entries.`, -); +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 new file mode 100644 index 0000000..136bec9 --- /dev/null +++ b/src/commands/science/unit.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('unit') + .description(`Returns 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 new file mode 100644 index 0000000..dd77682 --- /dev/null +++ b/src/commands/string/alpha.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..7e69c19 --- /dev/null +++ b/src/commands/string/alphanumeric.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..26bab49 --- /dev/null +++ b/src/commands/string/binary.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('binary') + .description( + `Returns a [binary](https://en.wikipedia.org/wiki/Binary_number) string.`, + ) + .action(() => { + console.log(faker['string']['binary']()); + }); + +export default command; diff --git a/src/commands/string/hexadecimal.ts b/src/commands/string/hexadecimal.ts new file mode 100644 index 0000000..f8e81b9 --- /dev/null +++ b/src/commands/string/hexadecimal.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('hexadecimal') + .description( + `Returns a [hexadecimal](https://en.wikipedia.org/wiki/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 index 02cbf12..1bce66c 100644 --- a/src/commands/string/index.ts +++ b/src/commands/string/index.ts @@ -1,7 +1,26 @@ 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.`, -); +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 new file mode 100644 index 0000000..0b2fea2 --- /dev/null +++ b/src/commands/string/nanoid.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('nanoid') + .description(`Generates a [Nano ID](https://github.com/ai/nanoid).`) + .action(() => { + console.log(faker['string']['nanoid']()); + }); + +export default command; diff --git a/src/commands/string/numeric.ts b/src/commands/string/numeric.ts new file mode 100644 index 0000000..4f97299 --- /dev/null +++ b/src/commands/string/numeric.ts @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000..df1abd1 --- /dev/null +++ b/src/commands/string/octal.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('octal') + .description( + `Returns an [octal](https://en.wikipedia.org/wiki/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 new file mode 100644 index 0000000..9b86917 --- /dev/null +++ b/src/commands/string/sample.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('sample') + .description( + `Returns 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 new file mode 100644 index 0000000..b339b95 --- /dev/null +++ b/src/commands/string/symbol.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('symbol') + .description( + `Returns a string containing only special characters from the following list:`, + ) + .action(() => { + console.log(faker['string']['symbol']()); + }); + +export default command; diff --git a/src/commands/string/uuid.ts b/src/commands/string/uuid.ts new file mode 100644 index 0000000..64bba35 --- /dev/null +++ b/src/commands/string/uuid.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('uuid') + .description( + `Returns a UUID v4 ([Universally Unique Identifier](https://en.wikipedia.org/wiki/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 new file mode 100644 index 0000000..0455c11 --- /dev/null +++ b/src/commands/system/commonFileExt.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('commonFileExt') + .description(`Returns 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 new file mode 100644 index 0000000..a36eb69 --- /dev/null +++ b/src/commands/system/commonFileName.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('commonFileName') + .description( + `Returns a random file name with a given extension or 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 new file mode 100644 index 0000000..729a7e5 --- /dev/null +++ b/src/commands/system/commonFileType.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('commonFileType') + .description(`Returns 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 new file mode 100644 index 0000000..2e1329e --- /dev/null +++ b/src/commands/system/cron.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('cron') + .description(`Returns 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 new file mode 100644 index 0000000..3230c7b --- /dev/null +++ b/src/commands/system/directoryPath.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('directoryPath') + .description(`Returns 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 new file mode 100644 index 0000000..5f876f9 --- /dev/null +++ b/src/commands/system/fileExt.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('fileExt') + .description(`Returns 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 new file mode 100644 index 0000000..6f74b36 --- /dev/null +++ b/src/commands/system/fileName.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('fileName') + .description(`Returns 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 new file mode 100644 index 0000000..bf6acf9 --- /dev/null +++ b/src/commands/system/filePath.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('filePath') + .description(`Returns 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 new file mode 100644 index 0000000..4697939 --- /dev/null +++ b/src/commands/system/fileType.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('fileType') + .description(`Returns 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 index 6fba583..ac3d825 100644 --- a/src/commands/system/index.ts +++ b/src/commands/system/index.ts @@ -1,7 +1,30 @@ 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.`, -); +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 new file mode 100644 index 0000000..b1f01a9 --- /dev/null +++ b/src/commands/system/mimeType.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('mimeType') + .description(`Returns 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 new file mode 100644 index 0000000..91d7135 --- /dev/null +++ b/src/commands/system/networkInterface.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('networkInterface') + .description( + `Returns a random [network interface](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-understanding_the_predictable_network_interface_device_names).`, + ) + .action(() => { + console.log(faker['system']['networkInterface']()); + }); + +export default command; diff --git a/src/commands/system/semver.ts b/src/commands/system/semver.ts new file mode 100644 index 0000000..71fa46b --- /dev/null +++ b/src/commands/system/semver.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('semver') + .description(`Returns a [semantic version](https://semver.org).`) + .action(() => { + console.log(faker['system']['semver']()); + }); + +export default command; diff --git a/src/commands/vehicle/bicycle.ts b/src/commands/vehicle/bicycle.ts new file mode 100644 index 0000000..bd2a97d --- /dev/null +++ b/src/commands/vehicle/bicycle.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('bicycle') + .description(`Returns 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 new file mode 100644 index 0000000..b899ac4 --- /dev/null +++ b/src/commands/vehicle/color.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('color') + .description(`Returns 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 new file mode 100644 index 0000000..c6ff0ca --- /dev/null +++ b/src/commands/vehicle/fuel.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('fuel') + .description(`Returns 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 index a5afdf6..9e702c7 100644 --- a/src/commands/vehicle/index.ts +++ b/src/commands/vehicle/index.ts @@ -1,7 +1,24 @@ 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.`, -); +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 new file mode 100644 index 0000000..f6e64ae --- /dev/null +++ b/src/commands/vehicle/manufacturer.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('manufacturer') + .description(`Returns 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 new file mode 100644 index 0000000..799e1c2 --- /dev/null +++ b/src/commands/vehicle/model.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('model') + .description(`Returns 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 new file mode 100644 index 0000000..f1e5e1f --- /dev/null +++ b/src/commands/vehicle/type.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('type') + .description(`Returns 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 new file mode 100644 index 0000000..78202a0 --- /dev/null +++ b/src/commands/vehicle/vehicle.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('vehicle') + .description(`Returns 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 new file mode 100644 index 0000000..11f0134 --- /dev/null +++ b/src/commands/vehicle/vin.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('vin') + .description(`Returns 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 new file mode 100644 index 0000000..85ba0ed --- /dev/null +++ b/src/commands/vehicle/vrm.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('vrm') + .description( + `Returns 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 new file mode 100644 index 0000000..f0056d6 --- /dev/null +++ b/src/commands/word/adjective.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('adjective') + .description(`Returns an adjective of random or optionally specified length.`) + .action(() => { + console.log(faker['word']['adjective']()); + }); + +export default command; diff --git a/src/commands/word/adverb.ts b/src/commands/word/adverb.ts new file mode 100644 index 0000000..d988f97 --- /dev/null +++ b/src/commands/word/adverb.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('adverb') + .description(`Returns an adverb of random or optionally specified length.`) + .action(() => { + console.log(faker['word']['adverb']()); + }); + +export default command; diff --git a/src/commands/word/conjunction.ts b/src/commands/word/conjunction.ts new file mode 100644 index 0000000..f9aa7a9 --- /dev/null +++ b/src/commands/word/conjunction.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('conjunction') + .description( + `Returns a conjunction of random or optionally specified length.`, + ) + .action(() => { + console.log(faker['word']['conjunction']()); + }); + +export default command; diff --git a/src/commands/word/index.ts b/src/commands/word/index.ts index f08e75d..eb76609 100644 --- a/src/commands/word/index.ts +++ b/src/commands/word/index.ts @@ -1,7 +1,24 @@ 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.`, -); +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 new file mode 100644 index 0000000..6c576e0 --- /dev/null +++ b/src/commands/word/interjection.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('interjection') + .description( + `Returns an interjection of random or optionally specified length.`, + ) + .action(() => { + console.log(faker['word']['interjection']()); + }); + +export default command; diff --git a/src/commands/word/noun.ts b/src/commands/word/noun.ts new file mode 100644 index 0000000..31cb455 --- /dev/null +++ b/src/commands/word/noun.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('noun') + .description(`Returns a noun of random or optionally specified length.`) + .action(() => { + console.log(faker['word']['noun']()); + }); + +export default command; diff --git a/src/commands/word/preposition.ts b/src/commands/word/preposition.ts new file mode 100644 index 0000000..3e63cd1 --- /dev/null +++ b/src/commands/word/preposition.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('preposition') + .description( + `Returns a preposition of random or optionally specified length.`, + ) + .action(() => { + console.log(faker['word']['preposition']()); + }); + +export default command; diff --git a/src/commands/word/sample.ts b/src/commands/word/sample.ts new file mode 100644 index 0000000..d2e4f36 --- /dev/null +++ b/src/commands/word/sample.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('sample') + .description( + `Returns a random sample of random or optionally specified length.`, + ) + .action(() => { + console.log(faker['word']['sample']()); + }); + +export default command; diff --git a/src/commands/word/verb.ts b/src/commands/word/verb.ts new file mode 100644 index 0000000..20d9744 --- /dev/null +++ b/src/commands/word/verb.ts @@ -0,0 +1,10 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('verb') + .description(`Returns a verb of random or optionally specified length.`) + .action(() => { + console.log(faker['word']['verb']()); + }); + +export default command; diff --git a/src/commands/word/words.ts b/src/commands/word/words.ts new file mode 100644 index 0000000..86fa0c9 --- /dev/null +++ b/src/commands/word/words.ts @@ -0,0 +1,12 @@ +import { Command } from 'commander'; +import { faker } from '@faker-js/faker'; + +const command = new Command('words') + .description( + `Returns a string containing a number of space separated random words.`, + ) + .action(() => { + console.log(faker['word']['words']()); + }); + +export default command; From 0b82a935c2d22df3eca5aa631d522c9f63e38d5e Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Mon, 4 Sep 2023 18:27:27 +0200 Subject: [PATCH 04/14] feat: add simply binary file --- .eslintrc.json | 37 ++++++++++++++++++++++--------------- bin/faker.js | 3 +++ package.json | 5 ++++- src/index.ts | 26 ++++++++++++++------------ 4 files changed, 43 insertions(+), 28 deletions(-) create mode 100644 bin/faker.js diff --git a/.eslintrc.json b/.eslintrc.json index 6a6815a..ff34fab 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,18 +2,25 @@ "env": { "node": true }, - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:@typescript-eslint/recommended-requiring-type-checking", - "plugin:@typescript-eslint/strict" - ], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": "./tsconfig.json" - }, - "plugins": [ - "@typescript-eslint" - ], - "root": true -} + "root": true, + "overrides": [ + { + "files": [ + "src/**/*.ts" + ], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:@typescript-eslint/recommended-requiring-type-checking", + "plugin:@typescript-eslint/strict" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": "./tsconfig.json" + }, + "plugins": [ + "@typescript-eslint" + ] + } + ] +} \ No newline at end of file diff --git a/bin/faker.js b/bin/faker.js new file mode 100644 index 0000000..9ac1ba1 --- /dev/null +++ b/bin/faker.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +require('../dist/src/index.js').cli(process.argv); \ No newline at end of file diff --git a/package.json b/package.json index 742074e..fb5500a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,10 @@ "name": "@faker-js/cli", "version": "0.0.0", "description": "A CLI of @faker-js/faker.", - "main": "dist/index.js", + "bin": { + "@faker-js/cli": "bin/faker.js", + "faker": "bin/faker.js" + }, "scripts": { "build": "tsc", "format": "prettier src --write", diff --git a/src/index.ts b/src/index.ts index b33e41c..c2ffb14 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,19 +2,21 @@ import { Command } from 'commander'; import { description, version } from '../package.json'; import commands from './commands'; -const program = new Command() - .name('faker') - .version(version) - .description(description) - .usage('faker [options] module_name entry_name'); +export function cli(args: string[]) { + const program = new Command() + .name('faker') + .version(version) + .description(description) + .usage('faker [options] module_name entry_name'); -for (const command of commands) { - program.addCommand(command); -} + for (const command of commands) { + program.addCommand(command); + } -program.parse(process.argv); + program.parse(args); -const hasArgs = process.argv.length > 2; -if (!hasArgs) { - program.help(); + const hasArgs = args.length > 2; + if (!hasArgs) { + program.help(); + } } From b1d29510338dc88c5e32e9fe5356cd739028638b Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Mon, 4 Sep 2023 18:27:38 +0200 Subject: [PATCH 05/14] chore: update keywords --- package.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package.json b/package.json index fb5500a..2c28a0f 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,11 @@ "faker.js", "fakerjs", "faker-js", + "cli", + "faker-cli", + "faker.js-cli", + "fakerjs-cli", + "faker-js-cli", "fake data generator", "fake data", "fake-data", From 59d8fd8302f48e217831324d750466d30442911e Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Mon, 4 Sep 2023 18:28:00 +0200 Subject: [PATCH 06/14] chore: add funding --- package.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package.json b/package.json index 2c28a0f..ca49942 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,12 @@ "type": "git", "url": "https://github.com/faker-js/faker.git" }, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/fakerjs" + } + ], "license": "MIT", "devDependencies": { "@typescript-eslint/eslint-plugin": "^6.6.0", From 1f7b95cbcc1f0cbad67d725bb46c4b32763d993d Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Mon, 4 Sep 2023 18:28:29 +0200 Subject: [PATCH 07/14] chore: add bugs link --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index ca49942..375baf4 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "url": "https://opencollective.com/fakerjs" } ], + "bugs": "https://github.com/faker-js/cli/issues", "license": "MIT", "devDependencies": { "@typescript-eslint/eslint-plugin": "^6.6.0", From 7023b854256acdb933fdcdb3e4627ab5e4738a2d Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Mon, 4 Sep 2023 18:28:49 +0200 Subject: [PATCH 08/14] chore: fix repository url --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 375baf4..eea73bb 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ ], "repository": { "type": "git", - "url": "https://github.com/faker-js/faker.git" + "url": "https://github.com/faker-js/cli.git" }, "funding": [ { From e88406b358e240a43a32142de66e5d970eaf1393 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Mon, 4 Sep 2023 18:32:01 +0200 Subject: [PATCH 09/14] chore: add dist to publish bundle --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index eea73bb..87d37c5 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,9 @@ "lint": "eslint .", "lint:fix": "eslint . --fix" }, + "files": [ + "dist" + ], "keywords": [ "faker", "faker.js", From 49078e8ffdd8d8fc8e3dd12f3d599e870fbfcd44 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Mon, 4 Sep 2023 18:52:25 +0200 Subject: [PATCH 10/14] docs: update readme --- README.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7762951..cec4f34 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,39 @@ # Faker-CLI -A CLI of [@faker-js/faker](https://github.com/faker-js/faker). \ No newline at end of file +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). + +## Install + +```bash +npm install --save-dev @faker-js/cli +``` + +## Usage + +``` +faker module_name method_name +``` + +Faker-CLI expects a `module_name` as well as a `method_name` depending on the module chosen. + +To list all possible modules run: + +```bash +faker --help +``` + +To list all possible methods of a module run: + +```bash +faker module_name --help +``` + +## Whats next + +Upcoming features might include: + +- localization +- support for all parameters `@faker-js/faker` natively +- make the CLI consumable for your own modules From 43439ee251db33c2cae36ff648a03e66fab353c2 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Mon, 4 Sep 2023 19:04:20 +0200 Subject: [PATCH 11/14] chore: fix lint errors --- src/commands/airline/aircraftType.ts | 2 +- src/commands/airline/airline.ts | 2 +- src/commands/airline/airplane.ts | 2 +- src/commands/airline/airport.ts | 2 +- src/commands/airline/flightNumber.ts | 2 +- src/commands/airline/recordLocator.ts | 2 +- src/commands/airline/seat.ts | 2 +- src/commands/animal/bear.ts | 2 +- src/commands/animal/bird.ts | 2 +- src/commands/animal/cat.ts | 2 +- src/commands/animal/cetacean.ts | 2 +- src/commands/animal/cow.ts | 2 +- src/commands/animal/crocodilia.ts | 2 +- src/commands/animal/dog.ts | 2 +- src/commands/animal/fish.ts | 2 +- src/commands/animal/horse.ts | 2 +- src/commands/animal/insect.ts | 2 +- src/commands/animal/lion.ts | 2 +- src/commands/animal/rabbit.ts | 2 +- src/commands/animal/rodent.ts | 2 +- src/commands/animal/snake.ts | 2 +- src/commands/animal/type.ts | 2 +- src/commands/color/cmyk.ts | 2 +- src/commands/color/colorByCSSColorSpace.ts | 2 +- src/commands/color/cssSupportedFunction.ts | 2 +- src/commands/color/cssSupportedSpace.ts | 2 +- src/commands/color/hsl.ts | 2 +- src/commands/color/human.ts | 2 +- src/commands/color/hwb.ts | 2 +- src/commands/color/lab.ts | 2 +- src/commands/color/lch.ts | 2 +- src/commands/color/rgb.ts | 2 +- src/commands/color/space.ts | 2 +- src/commands/commerce/department.ts | 2 +- src/commands/commerce/price.ts | 2 +- src/commands/commerce/product.ts | 2 +- src/commands/commerce/productAdjective.ts | 2 +- src/commands/commerce/productDescription.ts | 2 +- src/commands/commerce/productMaterial.ts | 2 +- src/commands/commerce/productName.ts | 2 +- src/commands/company/bs.ts | 2 +- src/commands/company/bsAdjective.ts | 2 +- src/commands/company/bsBuzz.ts | 2 +- src/commands/company/bsNoun.ts | 2 +- src/commands/company/buzzAdjective.ts | 2 +- src/commands/company/buzzNoun.ts | 2 +- src/commands/company/buzzPhrase.ts | 2 +- src/commands/company/buzzVerb.ts | 2 +- src/commands/company/catchPhrase.ts | 2 +- src/commands/company/catchPhraseAdjective.ts | 2 +- src/commands/company/catchPhraseDescriptor.ts | 2 +- src/commands/company/catchPhraseNoun.ts | 2 +- src/commands/company/companySuffix.ts | 2 +- src/commands/company/name.ts | 2 +- src/commands/company/suffixes.ts | 2 +- src/commands/database/collation.ts | 2 +- src/commands/database/column.ts | 2 +- src/commands/database/engine.ts | 2 +- src/commands/database/mongodbObjectId.ts | 2 +- src/commands/database/type.ts | 2 +- src/commands/datatype/array.ts | 2 +- src/commands/datatype/bigInt.ts | 2 +- src/commands/datatype/boolean.ts | 2 +- src/commands/datatype/datetime.ts | 2 +- src/commands/datatype/float.ts | 2 +- src/commands/datatype/hexadecimal.ts | 2 +- src/commands/datatype/json.ts | 2 +- src/commands/datatype/number.ts | 2 +- src/commands/datatype/string.ts | 2 +- src/commands/datatype/uuid.ts | 2 +- src/commands/date/anytime.ts | 2 +- src/commands/date/birthdate.ts | 2 +- src/commands/date/future.ts | 2 +- src/commands/date/month.ts | 2 +- src/commands/date/past.ts | 2 +- src/commands/date/recent.ts | 2 +- src/commands/date/soon.ts | 2 +- src/commands/date/weekday.ts | 2 +- src/commands/finance/account.ts | 2 +- src/commands/finance/accountName.ts | 2 +- src/commands/finance/accountNumber.ts | 2 +- src/commands/finance/amount.ts | 2 +- src/commands/finance/bic.ts | 2 +- src/commands/finance/bitcoinAddress.ts | 2 +- src/commands/finance/creditCardCVV.ts | 2 +- src/commands/finance/creditCardIssuer.ts | 2 +- src/commands/finance/creditCardNumber.ts | 2 +- src/commands/finance/currency.ts | 2 +- src/commands/finance/currencyCode.ts | 2 +- src/commands/finance/currencyName.ts | 2 +- src/commands/finance/currencySymbol.ts | 2 +- src/commands/finance/ethereumAddress.ts | 2 +- src/commands/finance/iban.ts | 2 +- src/commands/finance/litecoinAddress.ts | 2 +- src/commands/finance/mask.ts | 2 +- src/commands/finance/maskedNumber.ts | 2 +- src/commands/finance/pin.ts | 2 +- src/commands/finance/routingNumber.ts | 2 +- src/commands/finance/transactionDescription.ts | 2 +- src/commands/finance/transactionType.ts | 2 +- src/commands/git/branch.ts | 2 +- src/commands/git/commitDate.ts | 2 +- src/commands/git/commitEntry.ts | 2 +- src/commands/git/commitMessage.ts | 2 +- src/commands/git/commitSha.ts | 2 +- src/commands/git/shortSha.ts | 2 +- src/commands/hacker/abbreviation.ts | 2 +- src/commands/hacker/adjective.ts | 2 +- src/commands/hacker/ingverb.ts | 2 +- src/commands/hacker/noun.ts | 2 +- src/commands/hacker/phrase.ts | 2 +- src/commands/hacker/verb.ts | 2 +- src/commands/image/abstract.ts | 2 +- src/commands/image/animals.ts | 2 +- src/commands/image/avatar.ts | 2 +- src/commands/image/avatarGitHub.ts | 2 +- src/commands/image/avatarLegacy.ts | 2 +- src/commands/image/business.ts | 2 +- src/commands/image/cats.ts | 2 +- src/commands/image/city.ts | 2 +- src/commands/image/dataUri.ts | 2 +- src/commands/image/fashion.ts | 2 +- src/commands/image/food.ts | 2 +- src/commands/image/image.ts | 2 +- src/commands/image/imageUrl.ts | 2 +- src/commands/image/nature.ts | 2 +- src/commands/image/nightlife.ts | 2 +- src/commands/image/people.ts | 2 +- src/commands/image/sports.ts | 2 +- src/commands/image/technics.ts | 2 +- src/commands/image/transport.ts | 2 +- src/commands/image/url.ts | 2 +- src/commands/image/urlLoremFlickr.ts | 2 +- src/commands/image/urlPicsumPhotos.ts | 2 +- src/commands/image/urlPlaceholder.ts | 2 +- src/commands/internet/avatar.ts | 2 +- src/commands/internet/color.ts | 2 +- src/commands/internet/displayName.ts | 2 +- src/commands/internet/domainName.ts | 2 +- src/commands/internet/domainSuffix.ts | 2 +- src/commands/internet/domainWord.ts | 2 +- src/commands/internet/email.ts | 2 +- src/commands/internet/emoji.ts | 2 +- src/commands/internet/exampleEmail.ts | 2 +- src/commands/internet/httpMethod.ts | 2 +- src/commands/internet/httpStatusCode.ts | 2 +- src/commands/internet/ip.ts | 2 +- src/commands/internet/ipv4.ts | 2 +- src/commands/internet/ipv6.ts | 2 +- src/commands/internet/mac.ts | 2 +- src/commands/internet/password.ts | 2 +- src/commands/internet/port.ts | 2 +- src/commands/internet/protocol.ts | 2 +- src/commands/internet/url.ts | 2 +- src/commands/internet/userAgent.ts | 2 +- src/commands/internet/userName.ts | 2 +- src/commands/location/buildingNumber.ts | 2 +- src/commands/location/cardinalDirection.ts | 2 +- src/commands/location/city.ts | 2 +- src/commands/location/cityName.ts | 2 +- src/commands/location/country.ts | 2 +- src/commands/location/countryCode.ts | 2 +- src/commands/location/county.ts | 2 +- src/commands/location/direction.ts | 2 +- src/commands/location/latitude.ts | 2 +- src/commands/location/longitude.ts | 2 +- src/commands/location/nearbyGPSCoordinate.ts | 2 +- src/commands/location/ordinalDirection.ts | 2 +- src/commands/location/secondaryAddress.ts | 2 +- src/commands/location/state.ts | 2 +- src/commands/location/stateAbbr.ts | 2 +- src/commands/location/street.ts | 2 +- src/commands/location/streetAddress.ts | 2 +- src/commands/location/streetName.ts | 2 +- src/commands/location/timeZone.ts | 2 +- src/commands/location/zipCode.ts | 2 +- src/commands/location/zipCodeByState.ts | 2 +- src/commands/lorem/lines.ts | 2 +- src/commands/lorem/paragraph.ts | 2 +- src/commands/lorem/paragraphs.ts | 2 +- src/commands/lorem/sentence.ts | 2 +- src/commands/lorem/sentences.ts | 2 +- src/commands/lorem/slug.ts | 2 +- src/commands/lorem/text.ts | 2 +- src/commands/lorem/word.ts | 2 +- src/commands/lorem/words.ts | 2 +- src/commands/music/genre.ts | 2 +- src/commands/music/songName.ts | 2 +- src/commands/number/bigInt.ts | 2 +- src/commands/number/binary.ts | 2 +- src/commands/number/float.ts | 2 +- src/commands/number/hex.ts | 2 +- src/commands/number/int.ts | 2 +- src/commands/number/octal.ts | 2 +- src/commands/person/bio.ts | 2 +- src/commands/person/firstName.ts | 2 +- src/commands/person/fullName.ts | 2 +- src/commands/person/gender.ts | 2 +- src/commands/person/jobArea.ts | 2 +- src/commands/person/jobDescriptor.ts | 2 +- src/commands/person/jobTitle.ts | 2 +- src/commands/person/jobType.ts | 2 +- src/commands/person/lastName.ts | 2 +- src/commands/person/middleName.ts | 2 +- src/commands/person/prefix.ts | 2 +- src/commands/person/sex.ts | 2 +- src/commands/person/sexType.ts | 2 +- src/commands/person/suffix.ts | 2 +- src/commands/person/zodiacSign.ts | 2 +- src/commands/phone/imei.ts | 2 +- src/commands/phone/number.ts | 2 +- src/commands/science/chemicalElement.ts | 2 +- src/commands/science/unit.ts | 2 +- src/commands/string/alpha.ts | 2 +- src/commands/string/alphanumeric.ts | 2 +- src/commands/string/binary.ts | 2 +- src/commands/string/hexadecimal.ts | 2 +- src/commands/string/nanoid.ts | 2 +- src/commands/string/numeric.ts | 2 +- src/commands/string/octal.ts | 2 +- src/commands/string/sample.ts | 2 +- src/commands/string/symbol.ts | 2 +- src/commands/string/uuid.ts | 2 +- src/commands/system/commonFileExt.ts | 2 +- src/commands/system/commonFileName.ts | 2 +- src/commands/system/commonFileType.ts | 2 +- src/commands/system/cron.ts | 2 +- src/commands/system/directoryPath.ts | 2 +- src/commands/system/fileExt.ts | 2 +- src/commands/system/fileName.ts | 2 +- src/commands/system/filePath.ts | 2 +- src/commands/system/fileType.ts | 2 +- src/commands/system/mimeType.ts | 2 +- src/commands/system/networkInterface.ts | 2 +- src/commands/system/semver.ts | 2 +- src/commands/vehicle/bicycle.ts | 2 +- src/commands/vehicle/color.ts | 2 +- src/commands/vehicle/fuel.ts | 2 +- src/commands/vehicle/manufacturer.ts | 2 +- src/commands/vehicle/model.ts | 2 +- src/commands/vehicle/type.ts | 2 +- src/commands/vehicle/vehicle.ts | 2 +- src/commands/vehicle/vin.ts | 2 +- src/commands/vehicle/vrm.ts | 2 +- src/commands/word/adjective.ts | 2 +- src/commands/word/adverb.ts | 2 +- src/commands/word/conjunction.ts | 2 +- src/commands/word/interjection.ts | 2 +- src/commands/word/noun.ts | 2 +- src/commands/word/preposition.ts | 2 +- src/commands/word/sample.ts | 2 +- src/commands/word/verb.ts | 2 +- src/commands/word/words.ts | 2 +- 253 files changed, 253 insertions(+), 253 deletions(-) diff --git a/src/commands/airline/aircraftType.ts b/src/commands/airline/aircraftType.ts index bf579d1..9be2135 100644 --- a/src/commands/airline/aircraftType.ts +++ b/src/commands/airline/aircraftType.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('aircraftType') .description(`Returns a random aircraft type.`) .action(() => { - console.log(faker['airline']['aircraftType']()); + console.log(faker.airline.aircraftType()); }); export default command; diff --git a/src/commands/airline/airline.ts b/src/commands/airline/airline.ts index 00aec7d..098e6a1 100644 --- a/src/commands/airline/airline.ts +++ b/src/commands/airline/airline.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('airline') .description(`Generates a random airline.`) .action(() => { - console.log(faker['airline']['airline']()); + console.log(faker.airline.airline()); }); export default command; diff --git a/src/commands/airline/airplane.ts b/src/commands/airline/airplane.ts index bd62ef8..9cf6dd5 100644 --- a/src/commands/airline/airplane.ts +++ b/src/commands/airline/airplane.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('airplane') .description(`Generates a random airplane.`) .action(() => { - console.log(faker['airline']['airplane']()); + console.log(faker.airline.airplane()); }); export default command; diff --git a/src/commands/airline/airport.ts b/src/commands/airline/airport.ts index 155f667..8d713d4 100644 --- a/src/commands/airline/airport.ts +++ b/src/commands/airline/airport.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('airport') .description(`Generates a random airport.`) .action(() => { - console.log(faker['airline']['airport']()); + console.log(faker.airline.airport()); }); export default command; diff --git a/src/commands/airline/flightNumber.ts b/src/commands/airline/flightNumber.ts index b45a311..0996f67 100644 --- a/src/commands/airline/flightNumber.ts +++ b/src/commands/airline/flightNumber.ts @@ -6,7 +6,7 @@ const command = new Command('flightNumber') `Returns a random flight number. Flight numbers are always 1 to 4 digits long. Sometimes they are`, ) .action(() => { - console.log(faker['airline']['flightNumber']()); + console.log(faker.airline.flightNumber()); }); export default command; diff --git a/src/commands/airline/recordLocator.ts b/src/commands/airline/recordLocator.ts index acc1450..8c10a85 100644 --- a/src/commands/airline/recordLocator.ts +++ b/src/commands/airline/recordLocator.ts @@ -6,7 +6,7 @@ const command = new Command('recordLocator') `Generates a random [record locator](https://en.wikipedia.org/wiki/Record_locator). Record locators`, ) .action(() => { - console.log(faker['airline']['recordLocator']()); + console.log(faker.airline.recordLocator()); }); export default command; diff --git a/src/commands/airline/seat.ts b/src/commands/airline/seat.ts index 519252a..3a72eef 100644 --- a/src/commands/airline/seat.ts +++ b/src/commands/airline/seat.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('seat') .description(`Generates a random seat.`) .action(() => { - console.log(faker['airline']['seat']()); + console.log(faker.airline.seat()); }); export default command; diff --git a/src/commands/animal/bear.ts b/src/commands/animal/bear.ts index ab787ed..f4d0686 100644 --- a/src/commands/animal/bear.ts +++ b/src/commands/animal/bear.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('bear') .description(`Returns a random bear species.`) .action(() => { - console.log(faker['animal']['bear']()); + console.log(faker.animal.bear()); }); export default command; diff --git a/src/commands/animal/bird.ts b/src/commands/animal/bird.ts index 9ecef90..7b4c262 100644 --- a/src/commands/animal/bird.ts +++ b/src/commands/animal/bird.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('bird') .description(`Returns a random bird species.`) .action(() => { - console.log(faker['animal']['bird']()); + console.log(faker.animal.bird()); }); export default command; diff --git a/src/commands/animal/cat.ts b/src/commands/animal/cat.ts index cc29bb6..fb02fb1 100644 --- a/src/commands/animal/cat.ts +++ b/src/commands/animal/cat.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('cat') .description(`Returns a random cat breed.`) .action(() => { - console.log(faker['animal']['cat']()); + console.log(faker.animal.cat()); }); export default command; diff --git a/src/commands/animal/cetacean.ts b/src/commands/animal/cetacean.ts index 08acce1..d11979f 100644 --- a/src/commands/animal/cetacean.ts +++ b/src/commands/animal/cetacean.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('cetacean') .description(`Returns a random cetacean species.`) .action(() => { - console.log(faker['animal']['cetacean']()); + console.log(faker.animal.cetacean()); }); export default command; diff --git a/src/commands/animal/cow.ts b/src/commands/animal/cow.ts index 9d07625..1c28cff 100644 --- a/src/commands/animal/cow.ts +++ b/src/commands/animal/cow.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('cow') .description(`Returns a random cow species.`) .action(() => { - console.log(faker['animal']['cow']()); + console.log(faker.animal.cow()); }); export default command; diff --git a/src/commands/animal/crocodilia.ts b/src/commands/animal/crocodilia.ts index e7bb2b3..e2ffd42 100644 --- a/src/commands/animal/crocodilia.ts +++ b/src/commands/animal/crocodilia.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('crocodilia') .description(`Returns a random crocodilian species.`) .action(() => { - console.log(faker['animal']['crocodilia']()); + console.log(faker.animal.crocodilia()); }); export default command; diff --git a/src/commands/animal/dog.ts b/src/commands/animal/dog.ts index e7c5110..e2ce2dc 100644 --- a/src/commands/animal/dog.ts +++ b/src/commands/animal/dog.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('dog') .description(`Returns a random dog breed.`) .action(() => { - console.log(faker['animal']['dog']()); + console.log(faker.animal.dog()); }); export default command; diff --git a/src/commands/animal/fish.ts b/src/commands/animal/fish.ts index b399e7b..7030260 100644 --- a/src/commands/animal/fish.ts +++ b/src/commands/animal/fish.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('fish') .description(`Returns a random fish species.`) .action(() => { - console.log(faker['animal']['fish']()); + console.log(faker.animal.fish()); }); export default command; diff --git a/src/commands/animal/horse.ts b/src/commands/animal/horse.ts index fb51f09..185f2f0 100644 --- a/src/commands/animal/horse.ts +++ b/src/commands/animal/horse.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('horse') .description(`Returns a random horse breed.`) .action(() => { - console.log(faker['animal']['horse']()); + console.log(faker.animal.horse()); }); export default command; diff --git a/src/commands/animal/insect.ts b/src/commands/animal/insect.ts index 1e70f78..8ca8f61 100644 --- a/src/commands/animal/insect.ts +++ b/src/commands/animal/insect.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('insect') .description(`Returns a random insect species.`) .action(() => { - console.log(faker['animal']['insect']()); + console.log(faker.animal.insect()); }); export default command; diff --git a/src/commands/animal/lion.ts b/src/commands/animal/lion.ts index 1210c75..367c132 100644 --- a/src/commands/animal/lion.ts +++ b/src/commands/animal/lion.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('lion') .description(`Returns a random lion species.`) .action(() => { - console.log(faker['animal']['lion']()); + console.log(faker.animal.lion()); }); export default command; diff --git a/src/commands/animal/rabbit.ts b/src/commands/animal/rabbit.ts index 6ea5c56..f9b9fb6 100644 --- a/src/commands/animal/rabbit.ts +++ b/src/commands/animal/rabbit.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('rabbit') .description(`Returns a random rabbit species.`) .action(() => { - console.log(faker['animal']['rabbit']()); + console.log(faker.animal.rabbit()); }); export default command; diff --git a/src/commands/animal/rodent.ts b/src/commands/animal/rodent.ts index d076802..6cef273 100644 --- a/src/commands/animal/rodent.ts +++ b/src/commands/animal/rodent.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('rodent') .description(`Returns a random rodent breed.`) .action(() => { - console.log(faker['animal']['rodent']()); + console.log(faker.animal.rodent()); }); export default command; diff --git a/src/commands/animal/snake.ts b/src/commands/animal/snake.ts index 2ca14d3..625188f 100644 --- a/src/commands/animal/snake.ts +++ b/src/commands/animal/snake.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('snake') .description(`Returns a random snake species.`) .action(() => { - console.log(faker['animal']['snake']()); + console.log(faker.animal.snake()); }); export default command; diff --git a/src/commands/animal/type.ts b/src/commands/animal/type.ts index d28566e..d98745b 100644 --- a/src/commands/animal/type.ts +++ b/src/commands/animal/type.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('type') .description(`Returns a random animal type.`) .action(() => { - console.log(faker['animal']['type']()); + console.log(faker.animal.type()); }); export default command; diff --git a/src/commands/color/cmyk.ts b/src/commands/color/cmyk.ts index 5dbd321..65aa6a2 100644 --- a/src/commands/color/cmyk.ts +++ b/src/commands/color/cmyk.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('cmyk') .description(`Returns a CMYK color.`) .action(() => { - console.log(faker['color']['cmyk']()); + console.log(faker.color.cmyk()); }); export default command; diff --git a/src/commands/color/colorByCSSColorSpace.ts b/src/commands/color/colorByCSSColorSpace.ts index 0f86c69..9b6c730 100644 --- a/src/commands/color/colorByCSSColorSpace.ts +++ b/src/commands/color/colorByCSSColorSpace.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('colorByCSSColorSpace') .description(`Returns a random color based on CSS color space specified.`) .action(() => { - console.log(faker['color']['colorByCSSColorSpace']()); + console.log(faker.color.colorByCSSColorSpace()); }); export default command; diff --git a/src/commands/color/cssSupportedFunction.ts b/src/commands/color/cssSupportedFunction.ts index 45c195b..1112ce7 100644 --- a/src/commands/color/cssSupportedFunction.ts +++ b/src/commands/color/cssSupportedFunction.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('cssSupportedFunction') .description(`Returns a random css supported color function name.`) .action(() => { - console.log(faker['color']['cssSupportedFunction']()); + console.log(faker.color.cssSupportedFunction()); }); export default command; diff --git a/src/commands/color/cssSupportedSpace.ts b/src/commands/color/cssSupportedSpace.ts index 237ee7f..f1bfbea 100644 --- a/src/commands/color/cssSupportedSpace.ts +++ b/src/commands/color/cssSupportedSpace.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('cssSupportedSpace') .description(`Returns a random css supported color space name.`) .action(() => { - console.log(faker['color']['cssSupportedSpace']()); + console.log(faker.color.cssSupportedSpace()); }); export default command; diff --git a/src/commands/color/hsl.ts b/src/commands/color/hsl.ts index e2631eb..135b431 100644 --- a/src/commands/color/hsl.ts +++ b/src/commands/color/hsl.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('hsl') .description(`Returns an HSL color.`) .action(() => { - console.log(faker['color']['hsl']()); + console.log(faker.color.hsl()); }); export default command; diff --git a/src/commands/color/human.ts b/src/commands/color/human.ts index 4b14b38..cc6cfc1 100644 --- a/src/commands/color/human.ts +++ b/src/commands/color/human.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('human') .description(`Returns a random human readable color name.`) .action(() => { - console.log(faker['color']['human']()); + console.log(faker.color.human()); }); export default command; diff --git a/src/commands/color/hwb.ts b/src/commands/color/hwb.ts index efb24b2..6296b39 100644 --- a/src/commands/color/hwb.ts +++ b/src/commands/color/hwb.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('hwb') .description(`Returns an HWB color.`) .action(() => { - console.log(faker['color']['hwb']()); + console.log(faker.color.hwb()); }); export default command; diff --git a/src/commands/color/lab.ts b/src/commands/color/lab.ts index 8a88d95..f25f030 100644 --- a/src/commands/color/lab.ts +++ b/src/commands/color/lab.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('lab') .description(`Returns a LAB (CIELAB) color.`) .action(() => { - console.log(faker['color']['lab']()); + console.log(faker.color.lab()); }); export default command; diff --git a/src/commands/color/lch.ts b/src/commands/color/lch.ts index d7b1114..7b9a612 100644 --- a/src/commands/color/lch.ts +++ b/src/commands/color/lch.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('lch') .description(`Returns an LCH color. Even though upper bound of`) .action(() => { - console.log(faker['color']['lch']()); + console.log(faker.color.lch()); }); export default command; diff --git a/src/commands/color/rgb.ts b/src/commands/color/rgb.ts index e2f05a2..e9fbc7b 100644 --- a/src/commands/color/rgb.ts +++ b/src/commands/color/rgb.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('rgb') .description(`Returns an RGB color.`) .action(() => { - console.log(faker['color']['rgb']()); + console.log(faker.color.rgb()); }); export default command; diff --git a/src/commands/color/space.ts b/src/commands/color/space.ts index e5b943e..1750e63 100644 --- a/src/commands/color/space.ts +++ b/src/commands/color/space.ts @@ -6,7 +6,7 @@ const command = new Command('space') `Returns a random color space name from the worldwide accepted color spaces.`, ) .action(() => { - console.log(faker['color']['space']()); + console.log(faker.color.space()); }); export default command; diff --git a/src/commands/commerce/department.ts b/src/commands/commerce/department.ts index 9b44214..6640d16 100644 --- a/src/commands/commerce/department.ts +++ b/src/commands/commerce/department.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('department') .description(`Returns a department inside a shop.`) .action(() => { - console.log(faker['commerce']['department']()); + console.log(faker.commerce.department()); }); export default command; diff --git a/src/commands/commerce/price.ts b/src/commands/commerce/price.ts index ecd36bb..9973ca8 100644 --- a/src/commands/commerce/price.ts +++ b/src/commands/commerce/price.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('price') .description(`Generates a price between min and max (inclusive).`) .action(() => { - console.log(faker['commerce']['price']()); + console.log(faker.commerce.price()); }); export default command; diff --git a/src/commands/commerce/product.ts b/src/commands/commerce/product.ts index f650ae2..77e6632 100644 --- a/src/commands/commerce/product.ts +++ b/src/commands/commerce/product.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('product') .description(`Returns a short product name.`) .action(() => { - console.log(faker['commerce']['product']()); + console.log(faker.commerce.product()); }); export default command; diff --git a/src/commands/commerce/productAdjective.ts b/src/commands/commerce/productAdjective.ts index 44ccc26..94ed199 100644 --- a/src/commands/commerce/productAdjective.ts +++ b/src/commands/commerce/productAdjective.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('productAdjective') .description(`Returns an adjective describing a product.`) .action(() => { - console.log(faker['commerce']['productAdjective']()); + console.log(faker.commerce.productAdjective()); }); export default command; diff --git a/src/commands/commerce/productDescription.ts b/src/commands/commerce/productDescription.ts index ee0724a..313e73a 100644 --- a/src/commands/commerce/productDescription.ts +++ b/src/commands/commerce/productDescription.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('productDescription') .description(`Returns a product description.`) .action(() => { - console.log(faker['commerce']['productDescription']()); + console.log(faker.commerce.productDescription()); }); export default command; diff --git a/src/commands/commerce/productMaterial.ts b/src/commands/commerce/productMaterial.ts index 06c72cf..4054d4d 100644 --- a/src/commands/commerce/productMaterial.ts +++ b/src/commands/commerce/productMaterial.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('productMaterial') .description(`Returns a material of a product.`) .action(() => { - console.log(faker['commerce']['productMaterial']()); + console.log(faker.commerce.productMaterial()); }); export default command; diff --git a/src/commands/commerce/productName.ts b/src/commands/commerce/productName.ts index dcf26fd..665dd94 100644 --- a/src/commands/commerce/productName.ts +++ b/src/commands/commerce/productName.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('productName') .description(`Generates a random descriptive product name.`) .action(() => { - console.log(faker['commerce']['productName']()); + console.log(faker.commerce.productName()); }); export default command; diff --git a/src/commands/company/bs.ts b/src/commands/company/bs.ts index d61313a..9f5b737 100644 --- a/src/commands/company/bs.ts +++ b/src/commands/company/bs.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('bs') .description(`Generates a random company bs phrase.`) .action(() => { - console.log(faker['company']['bs']()); + console.log(faker.company.bs()); }); export default command; diff --git a/src/commands/company/bsAdjective.ts b/src/commands/company/bsAdjective.ts index f7f5649..4f64323 100644 --- a/src/commands/company/bsAdjective.ts +++ b/src/commands/company/bsAdjective.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('bsAdjective') .description(`Returns a random company bs adjective.`) .action(() => { - console.log(faker['company']['bsAdjective']()); + console.log(faker.company.bsAdjective()); }); export default command; diff --git a/src/commands/company/bsBuzz.ts b/src/commands/company/bsBuzz.ts index 06be7dd..d07023e 100644 --- a/src/commands/company/bsBuzz.ts +++ b/src/commands/company/bsBuzz.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('bsBuzz') .description(`Returns a random company bs buzz word.`) .action(() => { - console.log(faker['company']['bsBuzz']()); + console.log(faker.company.bsBuzz()); }); export default command; diff --git a/src/commands/company/bsNoun.ts b/src/commands/company/bsNoun.ts index 1bf8672..23a3cea 100644 --- a/src/commands/company/bsNoun.ts +++ b/src/commands/company/bsNoun.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('bsNoun') .description(`Returns a random company bs noun.`) .action(() => { - console.log(faker['company']['bsNoun']()); + console.log(faker.company.bsNoun()); }); export default command; diff --git a/src/commands/company/buzzAdjective.ts b/src/commands/company/buzzAdjective.ts index 8724ce5..a03ec1d 100644 --- a/src/commands/company/buzzAdjective.ts +++ b/src/commands/company/buzzAdjective.ts @@ -6,7 +6,7 @@ const command = new Command('buzzAdjective') `Returns a random buzz adjective that can be used to demonstrate data being viewed by a manager.`, ) .action(() => { - console.log(faker['company']['buzzAdjective']()); + console.log(faker.company.buzzAdjective()); }); export default command; diff --git a/src/commands/company/buzzNoun.ts b/src/commands/company/buzzNoun.ts index 92eb7cb..8b3b104 100644 --- a/src/commands/company/buzzNoun.ts +++ b/src/commands/company/buzzNoun.ts @@ -6,7 +6,7 @@ const command = new Command('buzzNoun') `Returns a random buzz noun that can be used to demonstrate data being viewed by a manager.`, ) .action(() => { - console.log(faker['company']['buzzNoun']()); + console.log(faker.company.buzzNoun()); }); export default command; diff --git a/src/commands/company/buzzPhrase.ts b/src/commands/company/buzzPhrase.ts index bfa8e5c..5e48dbb 100644 --- a/src/commands/company/buzzPhrase.ts +++ b/src/commands/company/buzzPhrase.ts @@ -6,7 +6,7 @@ const command = new Command('buzzPhrase') `Generates a random buzz phrase that can be used to demonstrate data being viewed by a manager.`, ) .action(() => { - console.log(faker['company']['buzzPhrase']()); + console.log(faker.company.buzzPhrase()); }); export default command; diff --git a/src/commands/company/buzzVerb.ts b/src/commands/company/buzzVerb.ts index d21a53f..8d3e52a 100644 --- a/src/commands/company/buzzVerb.ts +++ b/src/commands/company/buzzVerb.ts @@ -6,7 +6,7 @@ const command = new Command('buzzVerb') `Returns a random buzz verb that can be used to demonstrate data being viewed by a manager.`, ) .action(() => { - console.log(faker['company']['buzzVerb']()); + console.log(faker.company.buzzVerb()); }); export default command; diff --git a/src/commands/company/catchPhrase.ts b/src/commands/company/catchPhrase.ts index 8e91d8c..7fc4033 100644 --- a/src/commands/company/catchPhrase.ts +++ b/src/commands/company/catchPhrase.ts @@ -6,7 +6,7 @@ const command = new Command('catchPhrase') `Generates a random catch phrase that can be displayed to an end user.`, ) .action(() => { - console.log(faker['company']['catchPhrase']()); + console.log(faker.company.catchPhrase()); }); export default command; diff --git a/src/commands/company/catchPhraseAdjective.ts b/src/commands/company/catchPhraseAdjective.ts index 46811c4..6f1e9f1 100644 --- a/src/commands/company/catchPhraseAdjective.ts +++ b/src/commands/company/catchPhraseAdjective.ts @@ -6,7 +6,7 @@ const command = new Command('catchPhraseAdjective') `Returns a random catch phrase adjective that can be displayed to an end user..`, ) .action(() => { - console.log(faker['company']['catchPhraseAdjective']()); + console.log(faker.company.catchPhraseAdjective()); }); export default command; diff --git a/src/commands/company/catchPhraseDescriptor.ts b/src/commands/company/catchPhraseDescriptor.ts index 50efc1d..d61a06d 100644 --- a/src/commands/company/catchPhraseDescriptor.ts +++ b/src/commands/company/catchPhraseDescriptor.ts @@ -6,7 +6,7 @@ const command = new Command('catchPhraseDescriptor') `Returns a random catch phrase descriptor that can be displayed to an end user..`, ) .action(() => { - console.log(faker['company']['catchPhraseDescriptor']()); + console.log(faker.company.catchPhraseDescriptor()); }); export default command; diff --git a/src/commands/company/catchPhraseNoun.ts b/src/commands/company/catchPhraseNoun.ts index fbb8901..3f0dce3 100644 --- a/src/commands/company/catchPhraseNoun.ts +++ b/src/commands/company/catchPhraseNoun.ts @@ -6,7 +6,7 @@ const command = new Command('catchPhraseNoun') `Returns a random catch phrase noun that can be displayed to an end user..`, ) .action(() => { - console.log(faker['company']['catchPhraseNoun']()); + console.log(faker.company.catchPhraseNoun()); }); export default command; diff --git a/src/commands/company/companySuffix.ts b/src/commands/company/companySuffix.ts index 01f568d..376bdc7 100644 --- a/src/commands/company/companySuffix.ts +++ b/src/commands/company/companySuffix.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('companySuffix') .description(`Returns a random company suffix.`) .action(() => { - console.log(faker['company']['companySuffix']()); + console.log(faker.company.companySuffix()); }); export default command; diff --git a/src/commands/company/name.ts b/src/commands/company/name.ts index c28461f..503a2f4 100644 --- a/src/commands/company/name.ts +++ b/src/commands/company/name.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('name') .description(`Generates a random company name.`) .action(() => { - console.log(faker['company']['name']()); + console.log(faker.company.name()); }); export default command; diff --git a/src/commands/company/suffixes.ts b/src/commands/company/suffixes.ts index 651366d..b515403 100644 --- a/src/commands/company/suffixes.ts +++ b/src/commands/company/suffixes.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('suffixes') .description(`Returns an array with possible company name suffixes.`) .action(() => { - console.log(faker['company']['suffixes']()); + console.log(faker.company.suffixes()); }); export default command; diff --git a/src/commands/database/collation.ts b/src/commands/database/collation.ts index 30990f8..b2634b5 100644 --- a/src/commands/database/collation.ts +++ b/src/commands/database/collation.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('collation') .description(`Returns a random database collation.`) .action(() => { - console.log(faker['database']['collation']()); + console.log(faker.database.collation()); }); export default command; diff --git a/src/commands/database/column.ts b/src/commands/database/column.ts index b67b991..b444f07 100644 --- a/src/commands/database/column.ts +++ b/src/commands/database/column.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('column') .description(`Returns a random database column name.`) .action(() => { - console.log(faker['database']['column']()); + console.log(faker.database.column()); }); export default command; diff --git a/src/commands/database/engine.ts b/src/commands/database/engine.ts index 675a5ef..7657015 100644 --- a/src/commands/database/engine.ts +++ b/src/commands/database/engine.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('engine') .description(`Returns a random database engine.`) .action(() => { - console.log(faker['database']['engine']()); + console.log(faker.database.engine()); }); export default command; diff --git a/src/commands/database/mongodbObjectId.ts b/src/commands/database/mongodbObjectId.ts index 1fb59e2..78254db 100644 --- a/src/commands/database/mongodbObjectId.ts +++ b/src/commands/database/mongodbObjectId.ts @@ -6,7 +6,7 @@ const command = new Command('mongodbObjectId') `Returns a MongoDB [ObjectId](https://docs.mongodb.com/manual/reference/method/ObjectId/) string.`, ) .action(() => { - console.log(faker['database']['mongodbObjectId']()); + console.log(faker.database.mongodbObjectId()); }); export default command; diff --git a/src/commands/database/type.ts b/src/commands/database/type.ts index 103121a..df7a7df 100644 --- a/src/commands/database/type.ts +++ b/src/commands/database/type.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('type') .description(`Returns a random database column type.`) .action(() => { - console.log(faker['database']['type']()); + console.log(faker.database.type()); }); export default command; diff --git a/src/commands/datatype/array.ts b/src/commands/datatype/array.ts index 476be67..f895cd8 100644 --- a/src/commands/datatype/array.ts +++ b/src/commands/datatype/array.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('array') .description(`Returns an array with random strings and numbers.`) .action(() => { - console.log(faker['datatype']['array']()); + console.log(faker.datatype.array()); }); export default command; diff --git a/src/commands/datatype/bigInt.ts b/src/commands/datatype/bigInt.ts index 15f254a..876cd12 100644 --- a/src/commands/datatype/bigInt.ts +++ b/src/commands/datatype/bigInt.ts @@ -6,7 +6,7 @@ const command = new Command('bigInt') `Returns a [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#bigint_type) number.`, ) .action(() => { - console.log(faker['datatype']['bigInt']()); + console.log(faker.datatype.bigInt()); }); export default command; diff --git a/src/commands/datatype/boolean.ts b/src/commands/datatype/boolean.ts index 0567478..cae6ef5 100644 --- a/src/commands/datatype/boolean.ts +++ b/src/commands/datatype/boolean.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('boolean') .description(`Returns the boolean value true or false.`) .action(() => { - console.log(faker['datatype']['boolean']()); + console.log(faker.datatype.boolean()); }); export default command; diff --git a/src/commands/datatype/datetime.ts b/src/commands/datatype/datetime.ts index 27a3142..4496df4 100644 --- a/src/commands/datatype/datetime.ts +++ b/src/commands/datatype/datetime.ts @@ -6,7 +6,7 @@ const command = new Command('datetime') `Returns a Date object using a random number of milliseconds since`, ) .action(() => { - console.log(faker['datatype']['datetime']()); + console.log(faker.datatype.datetime()); }); export default command; diff --git a/src/commands/datatype/float.ts b/src/commands/datatype/float.ts index 141f19e..91eec81 100644 --- a/src/commands/datatype/float.ts +++ b/src/commands/datatype/float.ts @@ -6,7 +6,7 @@ const command = new Command('float') `Returns a single random floating-point number for the given precision or range and precision.`, ) .action(() => { - console.log(faker['datatype']['float']()); + console.log(faker.datatype.float()); }); export default command; diff --git a/src/commands/datatype/hexadecimal.ts b/src/commands/datatype/hexadecimal.ts index e14ab9d..4d0fafc 100644 --- a/src/commands/datatype/hexadecimal.ts +++ b/src/commands/datatype/hexadecimal.ts @@ -6,7 +6,7 @@ const command = new Command('hexadecimal') `Returns a [hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal) number.`, ) .action(() => { - console.log(faker['datatype']['hexadecimal']()); + console.log(faker.datatype.hexadecimal()); }); export default command; diff --git a/src/commands/datatype/json.ts b/src/commands/datatype/json.ts index 78a3c94..2a89b3a 100644 --- a/src/commands/datatype/json.ts +++ b/src/commands/datatype/json.ts @@ -6,7 +6,7 @@ const command = new Command('json') `Returns a string representing JSON object with 7 pre-defined properties.`, ) .action(() => { - console.log(faker['datatype']['json']()); + console.log(faker.datatype.json()); }); export default command; diff --git a/src/commands/datatype/number.ts b/src/commands/datatype/number.ts index 8545994..bf77b4f 100644 --- a/src/commands/datatype/number.ts +++ b/src/commands/datatype/number.ts @@ -6,7 +6,7 @@ const command = new Command('number') `Returns a single random number between zero and the given max value or the given range with the specified precision.`, ) .action(() => { - console.log(faker['datatype']['number']()); + console.log(faker.datatype.number()); }); export default command; diff --git a/src/commands/datatype/string.ts b/src/commands/datatype/string.ts index ed4bdc2..ee2e1bf 100644 --- a/src/commands/datatype/string.ts +++ b/src/commands/datatype/string.ts @@ -6,7 +6,7 @@ const command = new Command('string') `Returns a string containing UTF-16 chars between 33 and 125 (\`!\` to \`}\`).`, ) .action(() => { - console.log(faker['datatype']['string']()); + console.log(faker.datatype.string()); }); export default command; diff --git a/src/commands/datatype/uuid.ts b/src/commands/datatype/uuid.ts index 57b65ff..4702232 100644 --- a/src/commands/datatype/uuid.ts +++ b/src/commands/datatype/uuid.ts @@ -6,7 +6,7 @@ const command = new Command('uuid') `Returns a UUID v4 ([Universally Unique Identifier](https://en.wikipedia.org/wiki/Universally_unique_identifier)).`, ) .action(() => { - console.log(faker['datatype']['uuid']()); + console.log(faker.datatype.uuid()); }); export default command; diff --git a/src/commands/date/anytime.ts b/src/commands/date/anytime.ts index be845f4..5c96132 100644 --- a/src/commands/date/anytime.ts +++ b/src/commands/date/anytime.ts @@ -6,7 +6,7 @@ const command = new Command('anytime') `Generates a random date that can be either in the past or in the future.`, ) .action(() => { - console.log(faker['date']['anytime']()); + console.log(faker.date.anytime()); }); export default command; diff --git a/src/commands/date/birthdate.ts b/src/commands/date/birthdate.ts index 35fe1c9..3d30461 100644 --- a/src/commands/date/birthdate.ts +++ b/src/commands/date/birthdate.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('birthdate') .description(`Returns a random birthdate.`) .action(() => { - console.log(faker['date']['birthdate']()); + console.log(faker.date.birthdate()); }); export default command; diff --git a/src/commands/date/future.ts b/src/commands/date/future.ts index 48bb1c0..37e6eeb 100644 --- a/src/commands/date/future.ts +++ b/src/commands/date/future.ts @@ -4,7 +4,7 @@ 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']()); + console.log(faker.date.future()); }); export default command; diff --git a/src/commands/date/month.ts b/src/commands/date/month.ts index 7f26aa6..279b006 100644 --- a/src/commands/date/month.ts +++ b/src/commands/date/month.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('month') .description(`Returns a random name of a month.`) .action(() => { - console.log(faker['date']['month']()); + console.log(faker.date.month()); }); export default command; diff --git a/src/commands/date/past.ts b/src/commands/date/past.ts index b59bb34..50676f9 100644 --- a/src/commands/date/past.ts +++ b/src/commands/date/past.ts @@ -4,7 +4,7 @@ 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']()); + console.log(faker.date.past()); }); export default command; diff --git a/src/commands/date/recent.ts b/src/commands/date/recent.ts index 2f4d86c..0afa1a8 100644 --- a/src/commands/date/recent.ts +++ b/src/commands/date/recent.ts @@ -4,7 +4,7 @@ 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']()); + console.log(faker.date.recent()); }); export default command; diff --git a/src/commands/date/soon.ts b/src/commands/date/soon.ts index 81e6898..a917c54 100644 --- a/src/commands/date/soon.ts +++ b/src/commands/date/soon.ts @@ -4,7 +4,7 @@ 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']()); + console.log(faker.date.soon()); }); export default command; diff --git a/src/commands/date/weekday.ts b/src/commands/date/weekday.ts index e413dc6..c812c9f 100644 --- a/src/commands/date/weekday.ts +++ b/src/commands/date/weekday.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('weekday') .description(`Returns a random day of the week.`) .action(() => { - console.log(faker['date']['weekday']()); + console.log(faker.date.weekday()); }); export default command; diff --git a/src/commands/finance/account.ts b/src/commands/finance/account.ts index c43d296..3ba008f 100644 --- a/src/commands/finance/account.ts +++ b/src/commands/finance/account.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('account') .description(`Generates a random account number.`) .action(() => { - console.log(faker['finance']['account']()); + console.log(faker.finance.account()); }); export default command; diff --git a/src/commands/finance/accountName.ts b/src/commands/finance/accountName.ts index 233097f..3b90b8e 100644 --- a/src/commands/finance/accountName.ts +++ b/src/commands/finance/accountName.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('accountName') .description(`Generates a random account name.`) .action(() => { - console.log(faker['finance']['accountName']()); + console.log(faker.finance.accountName()); }); export default command; diff --git a/src/commands/finance/accountNumber.ts b/src/commands/finance/accountNumber.ts index 8bc199c..92f5105 100644 --- a/src/commands/finance/accountNumber.ts +++ b/src/commands/finance/accountNumber.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('accountNumber') .description(`Generates a random account number.`) .action(() => { - console.log(faker['finance']['accountNumber']()); + console.log(faker.finance.accountNumber()); }); export default command; diff --git a/src/commands/finance/amount.ts b/src/commands/finance/amount.ts index 1344a9d..2b0e3d8 100644 --- a/src/commands/finance/amount.ts +++ b/src/commands/finance/amount.ts @@ -6,7 +6,7 @@ const command = new Command('amount') `Generates a random amount between the given bounds (inclusive).`, ) .action(() => { - console.log(faker['finance']['amount']()); + console.log(faker.finance.amount()); }); export default command; diff --git a/src/commands/finance/bic.ts b/src/commands/finance/bic.ts index e746d3e..dc2068c 100644 --- a/src/commands/finance/bic.ts +++ b/src/commands/finance/bic.ts @@ -6,7 +6,7 @@ const command = new Command('bic') `Generates a random SWIFT/BIC code based on the [ISO-9362](https://en.wikipedia.org/wiki/ISO_9362) format.`, ) .action(() => { - console.log(faker['finance']['bic']()); + console.log(faker.finance.bic()); }); export default command; diff --git a/src/commands/finance/bitcoinAddress.ts b/src/commands/finance/bitcoinAddress.ts index 4b04279..b369f43 100644 --- a/src/commands/finance/bitcoinAddress.ts +++ b/src/commands/finance/bitcoinAddress.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('bitcoinAddress') .description(`Generates a random Bitcoin address.`) .action(() => { - console.log(faker['finance']['bitcoinAddress']()); + console.log(faker.finance.bitcoinAddress()); }); export default command; diff --git a/src/commands/finance/creditCardCVV.ts b/src/commands/finance/creditCardCVV.ts index a321f24..bf816f6 100644 --- a/src/commands/finance/creditCardCVV.ts +++ b/src/commands/finance/creditCardCVV.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('creditCardCVV') .description(`Generates a random credit card CVV.`) .action(() => { - console.log(faker['finance']['creditCardCVV']()); + console.log(faker.finance.creditCardCVV()); }); export default command; diff --git a/src/commands/finance/creditCardIssuer.ts b/src/commands/finance/creditCardIssuer.ts index aef00eb..3557f19 100644 --- a/src/commands/finance/creditCardIssuer.ts +++ b/src/commands/finance/creditCardIssuer.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('creditCardIssuer') .description(`Returns a random credit card issuer.`) .action(() => { - console.log(faker['finance']['creditCardIssuer']()); + console.log(faker.finance.creditCardIssuer()); }); export default command; diff --git a/src/commands/finance/creditCardNumber.ts b/src/commands/finance/creditCardNumber.ts index 0ad2d71..a30884b 100644 --- a/src/commands/finance/creditCardNumber.ts +++ b/src/commands/finance/creditCardNumber.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('creditCardNumber') .description(`Generates a random credit card number.`) .action(() => { - console.log(faker['finance']['creditCardNumber']()); + console.log(faker.finance.creditCardNumber()); }); export default command; diff --git a/src/commands/finance/currency.ts b/src/commands/finance/currency.ts index 80788a5..1fd5c61 100644 --- a/src/commands/finance/currency.ts +++ b/src/commands/finance/currency.ts @@ -6,7 +6,7 @@ const command = new Command('currency') `Returns a random currency object, containing \`code\`, \`name \`and \`symbol\` properties.`, ) .action(() => { - console.log(faker['finance']['currency']()); + console.log(faker.finance.currency()); }); export default command; diff --git a/src/commands/finance/currencyCode.ts b/src/commands/finance/currencyCode.ts index f85564c..1acdc3b 100644 --- a/src/commands/finance/currencyCode.ts +++ b/src/commands/finance/currencyCode.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('currencyCode') .description(`Returns a random currency code.`) .action(() => { - console.log(faker['finance']['currencyCode']()); + console.log(faker.finance.currencyCode()); }); export default command; diff --git a/src/commands/finance/currencyName.ts b/src/commands/finance/currencyName.ts index 483cdea..c8bbe22 100644 --- a/src/commands/finance/currencyName.ts +++ b/src/commands/finance/currencyName.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('currencyName') .description(`Returns a random currency name.`) .action(() => { - console.log(faker['finance']['currencyName']()); + console.log(faker.finance.currencyName()); }); export default command; diff --git a/src/commands/finance/currencySymbol.ts b/src/commands/finance/currencySymbol.ts index 708f329..0d987c1 100644 --- a/src/commands/finance/currencySymbol.ts +++ b/src/commands/finance/currencySymbol.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('currencySymbol') .description(`Returns a random currency symbol.`) .action(() => { - console.log(faker['finance']['currencySymbol']()); + console.log(faker.finance.currencySymbol()); }); export default command; diff --git a/src/commands/finance/ethereumAddress.ts b/src/commands/finance/ethereumAddress.ts index 367981f..b393f93 100644 --- a/src/commands/finance/ethereumAddress.ts +++ b/src/commands/finance/ethereumAddress.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('ethereumAddress') .description(`Creates a random, non-checksum Ethereum address.`) .action(() => { - console.log(faker['finance']['ethereumAddress']()); + console.log(faker.finance.ethereumAddress()); }); export default command; diff --git a/src/commands/finance/iban.ts b/src/commands/finance/iban.ts index c848331..f41b1d7 100644 --- a/src/commands/finance/iban.ts +++ b/src/commands/finance/iban.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('iban') .description(`Generates a random iban.`) .action(() => { - console.log(faker['finance']['iban']()); + console.log(faker.finance.iban()); }); export default command; diff --git a/src/commands/finance/litecoinAddress.ts b/src/commands/finance/litecoinAddress.ts index e79a9c9..7be59cb 100644 --- a/src/commands/finance/litecoinAddress.ts +++ b/src/commands/finance/litecoinAddress.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('litecoinAddress') .description(`Generates a random Litecoin address.`) .action(() => { - console.log(faker['finance']['litecoinAddress']()); + console.log(faker.finance.litecoinAddress()); }); export default command; diff --git a/src/commands/finance/mask.ts b/src/commands/finance/mask.ts index b940957..b104225 100644 --- a/src/commands/finance/mask.ts +++ b/src/commands/finance/mask.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('mask') .description(`Generates a random masked number.`) .action(() => { - console.log(faker['finance']['mask']()); + console.log(faker.finance.mask()); }); export default command; diff --git a/src/commands/finance/maskedNumber.ts b/src/commands/finance/maskedNumber.ts index 819be45..4ad8b58 100644 --- a/src/commands/finance/maskedNumber.ts +++ b/src/commands/finance/maskedNumber.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('maskedNumber') .description(`Generates a random masked number.`) .action(() => { - console.log(faker['finance']['maskedNumber']()); + console.log(faker.finance.maskedNumber()); }); export default command; diff --git a/src/commands/finance/pin.ts b/src/commands/finance/pin.ts index f7ca635..6b0f230 100644 --- a/src/commands/finance/pin.ts +++ b/src/commands/finance/pin.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('pin') .description(`Generates a random PIN number.`) .action(() => { - console.log(faker['finance']['pin']()); + console.log(faker.finance.pin()); }); export default command; diff --git a/src/commands/finance/routingNumber.ts b/src/commands/finance/routingNumber.ts index a3923d7..4f58f4c 100644 --- a/src/commands/finance/routingNumber.ts +++ b/src/commands/finance/routingNumber.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('routingNumber') .description(`Generates a random routing number.`) .action(() => { - console.log(faker['finance']['routingNumber']()); + console.log(faker.finance.routingNumber()); }); export default command; diff --git a/src/commands/finance/transactionDescription.ts b/src/commands/finance/transactionDescription.ts index 553ae8c..1397a1b 100644 --- a/src/commands/finance/transactionDescription.ts +++ b/src/commands/finance/transactionDescription.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('transactionDescription') .description(`Generates a random transaction description.`) .action(() => { - console.log(faker['finance']['transactionDescription']()); + console.log(faker.finance.transactionDescription()); }); export default command; diff --git a/src/commands/finance/transactionType.ts b/src/commands/finance/transactionType.ts index 3212438..818dd9e 100644 --- a/src/commands/finance/transactionType.ts +++ b/src/commands/finance/transactionType.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('transactionType') .description(`Returns a random transaction type.`) .action(() => { - console.log(faker['finance']['transactionType']()); + console.log(faker.finance.transactionType()); }); export default command; diff --git a/src/commands/git/branch.ts b/src/commands/git/branch.ts index cb8309a..fff7d3a 100644 --- a/src/commands/git/branch.ts +++ b/src/commands/git/branch.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('branch') .description(`Generates a random branch name.`) .action(() => { - console.log(faker['git']['branch']()); + console.log(faker.git.branch()); }); export default command; diff --git a/src/commands/git/commitDate.ts b/src/commands/git/commitDate.ts index c7d8eef..af44de7 100644 --- a/src/commands/git/commitDate.ts +++ b/src/commands/git/commitDate.ts @@ -6,7 +6,7 @@ const command = new Command('commitDate') `Generates a date string for a git commit using the same format as \`git log\`.`, ) .action(() => { - console.log(faker['git']['commitDate']()); + console.log(faker.git.commitDate()); }); export default command; diff --git a/src/commands/git/commitEntry.ts b/src/commands/git/commitEntry.ts index 0fe523d..a108f08 100644 --- a/src/commands/git/commitEntry.ts +++ b/src/commands/git/commitEntry.ts @@ -4,7 +4,7 @@ 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']()); + console.log(faker.git.commitEntry()); }); export default command; diff --git a/src/commands/git/commitMessage.ts b/src/commands/git/commitMessage.ts index 2dc3858..4eee2fe 100644 --- a/src/commands/git/commitMessage.ts +++ b/src/commands/git/commitMessage.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('commitMessage') .description(`Generates a random commit message.`) .action(() => { - console.log(faker['git']['commitMessage']()); + console.log(faker.git.commitMessage()); }); export default command; diff --git a/src/commands/git/commitSha.ts b/src/commands/git/commitSha.ts index 559ff8d..712c460 100644 --- a/src/commands/git/commitSha.ts +++ b/src/commands/git/commitSha.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('commitSha') .description(`Generates a random commit sha.`) .action(() => { - console.log(faker['git']['commitSha']()); + console.log(faker.git.commitSha()); }); export default command; diff --git a/src/commands/git/shortSha.ts b/src/commands/git/shortSha.ts index d2f800f..f2b000f 100644 --- a/src/commands/git/shortSha.ts +++ b/src/commands/git/shortSha.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('shortSha') .description(`Generates a random commit sha (short).`) .action(() => { - console.log(faker['git']['shortSha']()); + console.log(faker.git.shortSha()); }); export default command; diff --git a/src/commands/hacker/abbreviation.ts b/src/commands/hacker/abbreviation.ts index 4cf9407..a610e8f 100644 --- a/src/commands/hacker/abbreviation.ts +++ b/src/commands/hacker/abbreviation.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('abbreviation') .description(`Returns a random hacker/IT abbreviation.`) .action(() => { - console.log(faker['hacker']['abbreviation']()); + console.log(faker.hacker.abbreviation()); }); export default command; diff --git a/src/commands/hacker/adjective.ts b/src/commands/hacker/adjective.ts index 2a72834..3d77284 100644 --- a/src/commands/hacker/adjective.ts +++ b/src/commands/hacker/adjective.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('adjective') .description(`Returns a random hacker/IT adjective.`) .action(() => { - console.log(faker['hacker']['adjective']()); + console.log(faker.hacker.adjective()); }); export default command; diff --git a/src/commands/hacker/ingverb.ts b/src/commands/hacker/ingverb.ts index 9e89933..e58b969 100644 --- a/src/commands/hacker/ingverb.ts +++ b/src/commands/hacker/ingverb.ts @@ -6,7 +6,7 @@ const command = new Command('ingverb') `Returns a random hacker/IT verb for continuous actions (en: ing suffix; e.g. hacking).`, ) .action(() => { - console.log(faker['hacker']['ingverb']()); + console.log(faker.hacker.ingverb()); }); export default command; diff --git a/src/commands/hacker/noun.ts b/src/commands/hacker/noun.ts index 171966f..83fac82 100644 --- a/src/commands/hacker/noun.ts +++ b/src/commands/hacker/noun.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('noun') .description(`Returns a random hacker/IT noun.`) .action(() => { - console.log(faker['hacker']['noun']()); + console.log(faker.hacker.noun()); }); export default command; diff --git a/src/commands/hacker/phrase.ts b/src/commands/hacker/phrase.ts index 86e1526..73c29fa 100644 --- a/src/commands/hacker/phrase.ts +++ b/src/commands/hacker/phrase.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('phrase') .description(`Generates a random hacker/IT phrase.`) .action(() => { - console.log(faker['hacker']['phrase']()); + console.log(faker.hacker.phrase()); }); export default command; diff --git a/src/commands/hacker/verb.ts b/src/commands/hacker/verb.ts index d6a60ea..bdbe9f3 100644 --- a/src/commands/hacker/verb.ts +++ b/src/commands/hacker/verb.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('verb') .description(`Returns a random hacker/IT verb.`) .action(() => { - console.log(faker['hacker']['verb']()); + console.log(faker.hacker.verb()); }); export default command; diff --git a/src/commands/image/abstract.ts b/src/commands/image/abstract.ts index a14fe14..7732074 100644 --- a/src/commands/image/abstract.ts +++ b/src/commands/image/abstract.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('abstract') .description(`Generates a random abstract image url.`) .action(() => { - console.log(faker['image']['abstract']()); + console.log(faker.image.abstract()); }); export default command; diff --git a/src/commands/image/animals.ts b/src/commands/image/animals.ts index 5d93ba5..9b825f1 100644 --- a/src/commands/image/animals.ts +++ b/src/commands/image/animals.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('animals') .description(`Generates a random animal image url.`) .action(() => { - console.log(faker['image']['animals']()); + console.log(faker.image.animals()); }); export default command; diff --git a/src/commands/image/avatar.ts b/src/commands/image/avatar.ts index 4420ce9..a2062e9 100644 --- a/src/commands/image/avatar.ts +++ b/src/commands/image/avatar.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('avatar') .description(`Generates a random avatar image url.`) .action(() => { - console.log(faker['image']['avatar']()); + console.log(faker.image.avatar()); }); export default command; diff --git a/src/commands/image/avatarGitHub.ts b/src/commands/image/avatarGitHub.ts index ff16afd..90226e0 100644 --- a/src/commands/image/avatarGitHub.ts +++ b/src/commands/image/avatarGitHub.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('avatarGitHub') .description(`Generates a random avatar from GitHub.`) .action(() => { - console.log(faker['image']['avatarGitHub']()); + console.log(faker.image.avatarGitHub()); }); export default command; diff --git a/src/commands/image/avatarLegacy.ts b/src/commands/image/avatarLegacy.ts index 1c19f7c..78e8c4a 100644 --- a/src/commands/image/avatarLegacy.ts +++ b/src/commands/image/avatarLegacy.ts @@ -6,7 +6,7 @@ const command = new Command('avatarLegacy') `Generates a random avatar from \`https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar\`.`, ) .action(() => { - console.log(faker['image']['avatarLegacy']()); + console.log(faker.image.avatarLegacy()); }); export default command; diff --git a/src/commands/image/business.ts b/src/commands/image/business.ts index 6f82ade..405c920 100644 --- a/src/commands/image/business.ts +++ b/src/commands/image/business.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('business') .description(`Generates a random business image url.`) .action(() => { - console.log(faker['image']['business']()); + console.log(faker.image.business()); }); export default command; diff --git a/src/commands/image/cats.ts b/src/commands/image/cats.ts index 66a5fd9..2e25311 100644 --- a/src/commands/image/cats.ts +++ b/src/commands/image/cats.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('cats') .description(`Generates a random cat image url.`) .action(() => { - console.log(faker['image']['cats']()); + console.log(faker.image.cats()); }); export default command; diff --git a/src/commands/image/city.ts b/src/commands/image/city.ts index 1549205..f76d32d 100644 --- a/src/commands/image/city.ts +++ b/src/commands/image/city.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('city') .description(`Generates a random city image url.`) .action(() => { - console.log(faker['image']['city']()); + console.log(faker.image.city()); }); export default command; diff --git a/src/commands/image/dataUri.ts b/src/commands/image/dataUri.ts index 2778e86..5442415 100644 --- a/src/commands/image/dataUri.ts +++ b/src/commands/image/dataUri.ts @@ -4,7 +4,7 @@ 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']()); + console.log(faker.image.dataUri()); }); export default command; diff --git a/src/commands/image/fashion.ts b/src/commands/image/fashion.ts index e98bca9..d33b936 100644 --- a/src/commands/image/fashion.ts +++ b/src/commands/image/fashion.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('fashion') .description(`Generates a random fashion image url.`) .action(() => { - console.log(faker['image']['fashion']()); + console.log(faker.image.fashion()); }); export default command; diff --git a/src/commands/image/food.ts b/src/commands/image/food.ts index 4550270..bde24c4 100644 --- a/src/commands/image/food.ts +++ b/src/commands/image/food.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('food') .description(`Generates a random food image url.`) .action(() => { - console.log(faker['image']['food']()); + console.log(faker.image.food()); }); export default command; diff --git a/src/commands/image/image.ts b/src/commands/image/image.ts index 5f0d92d..94033bd 100644 --- a/src/commands/image/image.ts +++ b/src/commands/image/image.ts @@ -6,7 +6,7 @@ const command = new Command('image') `Generates a random image url from one of the supported categories.`, ) .action(() => { - console.log(faker['image']['image']()); + console.log(faker.image.image()); }); export default command; diff --git a/src/commands/image/imageUrl.ts b/src/commands/image/imageUrl.ts index 6eb5d71..043334b 100644 --- a/src/commands/image/imageUrl.ts +++ b/src/commands/image/imageUrl.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('imageUrl') .description(`Generates a random image url.`) .action(() => { - console.log(faker['image']['imageUrl']()); + console.log(faker.image.imageUrl()); }); export default command; diff --git a/src/commands/image/nature.ts b/src/commands/image/nature.ts index e832ff1..a0837a9 100644 --- a/src/commands/image/nature.ts +++ b/src/commands/image/nature.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('nature') .description(`Generates a random nature image url.`) .action(() => { - console.log(faker['image']['nature']()); + console.log(faker.image.nature()); }); export default command; diff --git a/src/commands/image/nightlife.ts b/src/commands/image/nightlife.ts index 3c56c43..2485daa 100644 --- a/src/commands/image/nightlife.ts +++ b/src/commands/image/nightlife.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('nightlife') .description(`Generates a random nightlife image url.`) .action(() => { - console.log(faker['image']['nightlife']()); + console.log(faker.image.nightlife()); }); export default command; diff --git a/src/commands/image/people.ts b/src/commands/image/people.ts index fd02f9f..0f9c0c1 100644 --- a/src/commands/image/people.ts +++ b/src/commands/image/people.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('people') .description(`Generates a random people image url.`) .action(() => { - console.log(faker['image']['people']()); + console.log(faker.image.people()); }); export default command; diff --git a/src/commands/image/sports.ts b/src/commands/image/sports.ts index 8cebe62..bf5c774 100644 --- a/src/commands/image/sports.ts +++ b/src/commands/image/sports.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('sports') .description(`Generates a random sports image url.`) .action(() => { - console.log(faker['image']['sports']()); + console.log(faker.image.sports()); }); export default command; diff --git a/src/commands/image/technics.ts b/src/commands/image/technics.ts index 8e58ad4..125b249 100644 --- a/src/commands/image/technics.ts +++ b/src/commands/image/technics.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('technics') .description(`Generates a random technics image url.`) .action(() => { - console.log(faker['image']['technics']()); + console.log(faker.image.technics()); }); export default command; diff --git a/src/commands/image/transport.ts b/src/commands/image/transport.ts index 951aed3..a3e70bc 100644 --- a/src/commands/image/transport.ts +++ b/src/commands/image/transport.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('transport') .description(`Generates a random transport image url.`) .action(() => { - console.log(faker['image']['transport']()); + console.log(faker.image.transport()); }); export default command; diff --git a/src/commands/image/url.ts b/src/commands/image/url.ts index a2383dc..8d67d34 100644 --- a/src/commands/image/url.ts +++ b/src/commands/image/url.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('url') .description(`Generates a random image url.`) .action(() => { - console.log(faker['image']['url']()); + console.log(faker.image.url()); }); export default command; diff --git a/src/commands/image/urlLoremFlickr.ts b/src/commands/image/urlLoremFlickr.ts index c425c33..a6374f9 100644 --- a/src/commands/image/urlLoremFlickr.ts +++ b/src/commands/image/urlLoremFlickr.ts @@ -6,7 +6,7 @@ const command = new Command('urlLoremFlickr') `Generates a random image url provided via https://loremflickr.com.`, ) .action(() => { - console.log(faker['image']['urlLoremFlickr']()); + console.log(faker.image.urlLoremFlickr()); }); export default command; diff --git a/src/commands/image/urlPicsumPhotos.ts b/src/commands/image/urlPicsumPhotos.ts index 3c711b9..228534f 100644 --- a/src/commands/image/urlPicsumPhotos.ts +++ b/src/commands/image/urlPicsumPhotos.ts @@ -6,7 +6,7 @@ const command = new Command('urlPicsumPhotos') `Generates a random image url provided via https://picsum.photos.`, ) .action(() => { - console.log(faker['image']['urlPicsumPhotos']()); + console.log(faker.image.urlPicsumPhotos()); }); export default command; diff --git a/src/commands/image/urlPlaceholder.ts b/src/commands/image/urlPlaceholder.ts index a1d91a2..13b1d46 100644 --- a/src/commands/image/urlPlaceholder.ts +++ b/src/commands/image/urlPlaceholder.ts @@ -6,7 +6,7 @@ const command = new Command('urlPlaceholder') `Generates a random image url provided via https://via.placeholder.com/.`, ) .action(() => { - console.log(faker['image']['urlPlaceholder']()); + console.log(faker.image.urlPlaceholder()); }); export default command; diff --git a/src/commands/internet/avatar.ts b/src/commands/internet/avatar.ts index 3330e3d..9670b07 100644 --- a/src/commands/internet/avatar.ts +++ b/src/commands/internet/avatar.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('avatar') .description(`Returns a random avatar url.`) .action(() => { - console.log(faker['internet']['avatar']()); + console.log(faker.internet.avatar()); }); export default command; diff --git a/src/commands/internet/color.ts b/src/commands/internet/color.ts index 4871bd7..4501fc4 100644 --- a/src/commands/internet/color.ts +++ b/src/commands/internet/color.ts @@ -6,7 +6,7 @@ const command = new Command('color') `Generates a random css hex color code in aesthetically pleasing color palette.`, ) .action(() => { - console.log(faker['internet']['color']()); + console.log(faker.internet.color()); }); export default command; diff --git a/src/commands/internet/displayName.ts b/src/commands/internet/displayName.ts index 95aaeaa..039d203 100644 --- a/src/commands/internet/displayName.ts +++ b/src/commands/internet/displayName.ts @@ -6,7 +6,7 @@ const command = new Command('displayName') `Generates a display name using the given person's name as base.`, ) .action(() => { - console.log(faker['internet']['displayName']()); + console.log(faker.internet.displayName()); }); export default command; diff --git a/src/commands/internet/domainName.ts b/src/commands/internet/domainName.ts index cd7f13f..bafc477 100644 --- a/src/commands/internet/domainName.ts +++ b/src/commands/internet/domainName.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('domainName') .description(`Generates a random domain name.`) .action(() => { - console.log(faker['internet']['domainName']()); + console.log(faker.internet.domainName()); }); export default command; diff --git a/src/commands/internet/domainSuffix.ts b/src/commands/internet/domainSuffix.ts index 6431a23..6044dad 100644 --- a/src/commands/internet/domainSuffix.ts +++ b/src/commands/internet/domainSuffix.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('domainSuffix') .description(`Returns a random domain suffix.`) .action(() => { - console.log(faker['internet']['domainSuffix']()); + console.log(faker.internet.domainSuffix()); }); export default command; diff --git a/src/commands/internet/domainWord.ts b/src/commands/internet/domainWord.ts index 65caf76..8cb1985 100644 --- a/src/commands/internet/domainWord.ts +++ b/src/commands/internet/domainWord.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('domainWord') .description(`Generates a random domain word.`) .action(() => { - console.log(faker['internet']['domainWord']()); + console.log(faker.internet.domainWord()); }); export default command; diff --git a/src/commands/internet/email.ts b/src/commands/internet/email.ts index 41c1db4..05ef614 100644 --- a/src/commands/internet/email.ts +++ b/src/commands/internet/email.ts @@ -6,7 +6,7 @@ const command = new Command('email') `Generates an email address using the given person's name as base.`, ) .action(() => { - console.log(faker['internet']['email']()); + console.log(faker.internet.email()); }); export default command; diff --git a/src/commands/internet/emoji.ts b/src/commands/internet/emoji.ts index 6d29ec5..d640b39 100644 --- a/src/commands/internet/emoji.ts +++ b/src/commands/internet/emoji.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('emoji') .description(`Generates a random emoji.`) .action(() => { - console.log(faker['internet']['emoji']()); + console.log(faker.internet.emoji()); }); export default command; diff --git a/src/commands/internet/exampleEmail.ts b/src/commands/internet/exampleEmail.ts index 731df78..acbadd3 100644 --- a/src/commands/internet/exampleEmail.ts +++ b/src/commands/internet/exampleEmail.ts @@ -6,7 +6,7 @@ const command = new Command('exampleEmail') `Generates an email address using an example mail provider using the given person's name as base.`, ) .action(() => { - console.log(faker['internet']['exampleEmail']()); + console.log(faker.internet.exampleEmail()); }); export default command; diff --git a/src/commands/internet/httpMethod.ts b/src/commands/internet/httpMethod.ts index 830b1bc..1c13803 100644 --- a/src/commands/internet/httpMethod.ts +++ b/src/commands/internet/httpMethod.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('httpMethod') .description(`Returns a random http method.`) .action(() => { - console.log(faker['internet']['httpMethod']()); + console.log(faker.internet.httpMethod()); }); export default command; diff --git a/src/commands/internet/httpStatusCode.ts b/src/commands/internet/httpStatusCode.ts index 169ae1d..9dd7b61 100644 --- a/src/commands/internet/httpStatusCode.ts +++ b/src/commands/internet/httpStatusCode.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('httpStatusCode') .description(`Generates a random HTTP status code.`) .action(() => { - console.log(faker['internet']['httpStatusCode']()); + console.log(faker.internet.httpStatusCode()); }); export default command; diff --git a/src/commands/internet/ip.ts b/src/commands/internet/ip.ts index d2efd5d..5213497 100644 --- a/src/commands/internet/ip.ts +++ b/src/commands/internet/ip.ts @@ -4,7 +4,7 @@ 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']()); + console.log(faker.internet.ip()); }); export default command; diff --git a/src/commands/internet/ipv4.ts b/src/commands/internet/ipv4.ts index de7dd7b..ee59865 100644 --- a/src/commands/internet/ipv4.ts +++ b/src/commands/internet/ipv4.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('ipv4') .description(`Generates a random IPv4 address.`) .action(() => { - console.log(faker['internet']['ipv4']()); + console.log(faker.internet.ipv4()); }); export default command; diff --git a/src/commands/internet/ipv6.ts b/src/commands/internet/ipv6.ts index b87ded1..b85dc5e 100644 --- a/src/commands/internet/ipv6.ts +++ b/src/commands/internet/ipv6.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('ipv6') .description(`Generates a random IPv6 address.`) .action(() => { - console.log(faker['internet']['ipv6']()); + console.log(faker.internet.ipv6()); }); export default command; diff --git a/src/commands/internet/mac.ts b/src/commands/internet/mac.ts index fc399ed..ac4925f 100644 --- a/src/commands/internet/mac.ts +++ b/src/commands/internet/mac.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('mac') .description(`Generates a random mac address.`) .action(() => { - console.log(faker['internet']['mac']()); + console.log(faker.internet.mac()); }); export default command; diff --git a/src/commands/internet/password.ts b/src/commands/internet/password.ts index 808e528..9fd0cfb 100644 --- a/src/commands/internet/password.ts +++ b/src/commands/internet/password.ts @@ -6,7 +6,7 @@ const command = new Command('password') `Generates a random password-like string. Do not use this method for generating actual passwords for users.`, ) .action(() => { - console.log(faker['internet']['password']()); + console.log(faker.internet.password()); }); export default command; diff --git a/src/commands/internet/port.ts b/src/commands/internet/port.ts index 34fedb3..04f3eda 100644 --- a/src/commands/internet/port.ts +++ b/src/commands/internet/port.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('port') .description(`Generates a random port number.`) .action(() => { - console.log(faker['internet']['port']()); + console.log(faker.internet.port()); }); export default command; diff --git a/src/commands/internet/protocol.ts b/src/commands/internet/protocol.ts index 6e1f233..2a75f7c 100644 --- a/src/commands/internet/protocol.ts +++ b/src/commands/internet/protocol.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('protocol') .description(`Returns a random web protocol. Either \`http\` or \`https\`.`) .action(() => { - console.log(faker['internet']['protocol']()); + console.log(faker.internet.protocol()); }); export default command; diff --git a/src/commands/internet/url.ts b/src/commands/internet/url.ts index 1132cdb..7641c2f 100644 --- a/src/commands/internet/url.ts +++ b/src/commands/internet/url.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('url') .description(`Generates a random http(s) url.`) .action(() => { - console.log(faker['internet']['url']()); + console.log(faker.internet.url()); }); export default command; diff --git a/src/commands/internet/userAgent.ts b/src/commands/internet/userAgent.ts index dda24d5..730b926 100644 --- a/src/commands/internet/userAgent.ts +++ b/src/commands/internet/userAgent.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('userAgent') .description(`Generates a random user agent string.`) .action(() => { - console.log(faker['internet']['userAgent']()); + console.log(faker.internet.userAgent()); }); export default command; diff --git a/src/commands/internet/userName.ts b/src/commands/internet/userName.ts index 41ad9fc..f9f54b3 100644 --- a/src/commands/internet/userName.ts +++ b/src/commands/internet/userName.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('userName') .description(`Generates a username using the given person's name as base.`) .action(() => { - console.log(faker['internet']['userName']()); + console.log(faker.internet.userName()); }); export default command; diff --git a/src/commands/location/buildingNumber.ts b/src/commands/location/buildingNumber.ts index c5aab6a..5c9fb0b 100644 --- a/src/commands/location/buildingNumber.ts +++ b/src/commands/location/buildingNumber.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('buildingNumber') .description(`Generates a random building number.`) .action(() => { - console.log(faker['location']['buildingNumber']()); + console.log(faker.location.buildingNumber()); }); export default command; diff --git a/src/commands/location/cardinalDirection.ts b/src/commands/location/cardinalDirection.ts index f21a4c0..329775a 100644 --- a/src/commands/location/cardinalDirection.ts +++ b/src/commands/location/cardinalDirection.ts @@ -6,7 +6,7 @@ const command = new Command('cardinalDirection') `Returns a random cardinal direction (north, east, south, west).`, ) .action(() => { - console.log(faker['location']['cardinalDirection']()); + console.log(faker.location.cardinalDirection()); }); export default command; diff --git a/src/commands/location/city.ts b/src/commands/location/city.ts index 02504e0..4482a32 100644 --- a/src/commands/location/city.ts +++ b/src/commands/location/city.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('city') .description(`Generates a random localized city name.`) .action(() => { - console.log(faker['location']['city']()); + console.log(faker.location.city()); }); export default command; diff --git a/src/commands/location/cityName.ts b/src/commands/location/cityName.ts index e255727..3f525f1 100644 --- a/src/commands/location/cityName.ts +++ b/src/commands/location/cityName.ts @@ -6,7 +6,7 @@ const command = new Command('cityName') `Returns a random city name from a list of real cities for the locale.`, ) .action(() => { - console.log(faker['location']['cityName']()); + console.log(faker.location.cityName()); }); export default command; diff --git a/src/commands/location/country.ts b/src/commands/location/country.ts index 8fa2d40..5d732b5 100644 --- a/src/commands/location/country.ts +++ b/src/commands/location/country.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('country') .description(`Returns a random country name.`) .action(() => { - console.log(faker['location']['country']()); + console.log(faker.location.country()); }); export default command; diff --git a/src/commands/location/countryCode.ts b/src/commands/location/countryCode.ts index a4a7d95..9a9b850 100644 --- a/src/commands/location/countryCode.ts +++ b/src/commands/location/countryCode.ts @@ -6,7 +6,7 @@ const command = new Command('countryCode') `Returns a random [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code.`, ) .action(() => { - console.log(faker['location']['countryCode']()); + console.log(faker.location.countryCode()); }); export default command; diff --git a/src/commands/location/county.ts b/src/commands/location/county.ts index a57706c..0a12a8b 100644 --- a/src/commands/location/county.ts +++ b/src/commands/location/county.ts @@ -6,7 +6,7 @@ const command = new Command('county') `Returns 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']()); + console.log(faker.location.county()); }); export default command; diff --git a/src/commands/location/direction.ts b/src/commands/location/direction.ts index 0f2b7fd..eb66fb3 100644 --- a/src/commands/location/direction.ts +++ b/src/commands/location/direction.ts @@ -6,7 +6,7 @@ const command = new Command('direction') `Returns a random direction (cardinal and ordinal; northwest, east, etc).`, ) .action(() => { - console.log(faker['location']['direction']()); + console.log(faker.location.direction()); }); export default command; diff --git a/src/commands/location/latitude.ts b/src/commands/location/latitude.ts index a01fd4d..d72feba 100644 --- a/src/commands/location/latitude.ts +++ b/src/commands/location/latitude.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('latitude') .description(`Generates a random latitude.`) .action(() => { - console.log(faker['location']['latitude']()); + console.log(faker.location.latitude()); }); export default command; diff --git a/src/commands/location/longitude.ts b/src/commands/location/longitude.ts index 8643317..a368515 100644 --- a/src/commands/location/longitude.ts +++ b/src/commands/location/longitude.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('longitude') .description(`Generates a random longitude.`) .action(() => { - console.log(faker['location']['longitude']()); + console.log(faker.location.longitude()); }); export default command; diff --git a/src/commands/location/nearbyGPSCoordinate.ts b/src/commands/location/nearbyGPSCoordinate.ts index 73be544..71b9c69 100644 --- a/src/commands/location/nearbyGPSCoordinate.ts +++ b/src/commands/location/nearbyGPSCoordinate.ts @@ -6,7 +6,7 @@ const command = new Command('nearbyGPSCoordinate') `Generates a random GPS coordinate within the specified radius from the given coordinate.`, ) .action(() => { - console.log(faker['location']['nearbyGPSCoordinate']()); + console.log(faker.location.nearbyGPSCoordinate()); }); export default command; diff --git a/src/commands/location/ordinalDirection.ts b/src/commands/location/ordinalDirection.ts index 1fb2de8..6e9731d 100644 --- a/src/commands/location/ordinalDirection.ts +++ b/src/commands/location/ordinalDirection.ts @@ -6,7 +6,7 @@ const command = new Command('ordinalDirection') `Returns a random ordinal direction (northwest, southeast, etc).`, ) .action(() => { - console.log(faker['location']['ordinalDirection']()); + console.log(faker.location.ordinalDirection()); }); export default command; diff --git a/src/commands/location/secondaryAddress.ts b/src/commands/location/secondaryAddress.ts index d9d438a..8c1fb24 100644 --- a/src/commands/location/secondaryAddress.ts +++ b/src/commands/location/secondaryAddress.ts @@ -6,7 +6,7 @@ const command = new Command('secondaryAddress') `Generates a random localized secondary address. This refers to a specific location at a given address`, ) .action(() => { - console.log(faker['location']['secondaryAddress']()); + console.log(faker.location.secondaryAddress()); }); export default command; diff --git a/src/commands/location/state.ts b/src/commands/location/state.ts index ee7dda1..3dbd8b0 100644 --- a/src/commands/location/state.ts +++ b/src/commands/location/state.ts @@ -6,7 +6,7 @@ const command = new Command('state') `Returns 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']()); + console.log(faker.location.state()); }); export default command; diff --git a/src/commands/location/stateAbbr.ts b/src/commands/location/stateAbbr.ts index f472f58..9f94e04 100644 --- a/src/commands/location/stateAbbr.ts +++ b/src/commands/location/stateAbbr.ts @@ -6,7 +6,7 @@ const command = new Command('stateAbbr') `Returns a random localized state's abbreviated name from this country.`, ) .action(() => { - console.log(faker['location']['stateAbbr']()); + console.log(faker.location.stateAbbr()); }); export default command; diff --git a/src/commands/location/street.ts b/src/commands/location/street.ts index 5122f3b..73cbd62 100644 --- a/src/commands/location/street.ts +++ b/src/commands/location/street.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('street') .description(`Generates a random localized street name.`) .action(() => { - console.log(faker['location']['street']()); + console.log(faker.location.street()); }); export default command; diff --git a/src/commands/location/streetAddress.ts b/src/commands/location/streetAddress.ts index d6d75cd..0795779 100644 --- a/src/commands/location/streetAddress.ts +++ b/src/commands/location/streetAddress.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('streetAddress') .description(`Generates a random localized street address.`) .action(() => { - console.log(faker['location']['streetAddress']()); + console.log(faker.location.streetAddress()); }); export default command; diff --git a/src/commands/location/streetName.ts b/src/commands/location/streetName.ts index 07f0235..d086a24 100644 --- a/src/commands/location/streetName.ts +++ b/src/commands/location/streetName.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('streetName') .description(`Returns a random localized street name.`) .action(() => { - console.log(faker['location']['streetName']()); + console.log(faker.location.streetName()); }); export default command; diff --git a/src/commands/location/timeZone.ts b/src/commands/location/timeZone.ts index 214becb..7035bb0 100644 --- a/src/commands/location/timeZone.ts +++ b/src/commands/location/timeZone.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('timeZone') .description(`Returns a random time zone.`) .action(() => { - console.log(faker['location']['timeZone']()); + console.log(faker.location.timeZone()); }); export default command; diff --git a/src/commands/location/zipCode.ts b/src/commands/location/zipCode.ts index 94c2d84..18e5d8c 100644 --- a/src/commands/location/zipCode.ts +++ b/src/commands/location/zipCode.ts @@ -6,7 +6,7 @@ const command = new Command('zipCode') `Generates random zip code from specified format. If format is not specified,`, ) .action(() => { - console.log(faker['location']['zipCode']()); + console.log(faker.location.zipCode()); }); export default command; diff --git a/src/commands/location/zipCodeByState.ts b/src/commands/location/zipCodeByState.ts index 949651d..8d47a03 100644 --- a/src/commands/location/zipCodeByState.ts +++ b/src/commands/location/zipCodeByState.ts @@ -4,7 +4,7 @@ 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']()); + console.log(faker.location.zipCodeByState()); }); export default command; diff --git a/src/commands/lorem/lines.ts b/src/commands/lorem/lines.ts index fdcec6c..ffc059c 100644 --- a/src/commands/lorem/lines.ts +++ b/src/commands/lorem/lines.ts @@ -6,7 +6,7 @@ const command = new Command('lines') `Generates the given number lines of lorem separated by \`'\n'\`.`, ) .action(() => { - console.log(faker['lorem']['lines']()); + console.log(faker.lorem.lines()); }); export default command; diff --git a/src/commands/lorem/paragraph.ts b/src/commands/lorem/paragraph.ts index d7f873e..eed2ae0 100644 --- a/src/commands/lorem/paragraph.ts +++ b/src/commands/lorem/paragraph.ts @@ -4,7 +4,7 @@ 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']()); + console.log(faker.lorem.paragraph()); }); export default command; diff --git a/src/commands/lorem/paragraphs.ts b/src/commands/lorem/paragraphs.ts index 7ccbafc..00a2b05 100644 --- a/src/commands/lorem/paragraphs.ts +++ b/src/commands/lorem/paragraphs.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('paragraphs') .description(`Generates the given number of paragraphs.`) .action(() => { - console.log(faker['lorem']['paragraphs']()); + console.log(faker.lorem.paragraphs()); }); export default command; diff --git a/src/commands/lorem/sentence.ts b/src/commands/lorem/sentence.ts index 7ec37e6..81bed2c 100644 --- a/src/commands/lorem/sentence.ts +++ b/src/commands/lorem/sentence.ts @@ -6,7 +6,7 @@ const command = new Command('sentence') `Generates a space separated list of words beginning with a capital letter and ending with a period.`, ) .action(() => { - console.log(faker['lorem']['sentence']()); + console.log(faker.lorem.sentence()); }); export default command; diff --git a/src/commands/lorem/sentences.ts b/src/commands/lorem/sentences.ts index 34219e6..5f9c115 100644 --- a/src/commands/lorem/sentences.ts +++ b/src/commands/lorem/sentences.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('sentences') .description(`Generates the given number of sentences.`) .action(() => { - console.log(faker['lorem']['sentences']()); + console.log(faker.lorem.sentences()); }); export default command; diff --git a/src/commands/lorem/slug.ts b/src/commands/lorem/slug.ts index 69dd5e9..d3d13c0 100644 --- a/src/commands/lorem/slug.ts +++ b/src/commands/lorem/slug.ts @@ -6,7 +6,7 @@ const command = new Command('slug') `Generates a slugified text consisting of the given number of hyphen separated words.`, ) .action(() => { - console.log(faker['lorem']['slug']()); + console.log(faker.lorem.slug()); }); export default command; diff --git a/src/commands/lorem/text.ts b/src/commands/lorem/text.ts index 269c211..7395926 100644 --- a/src/commands/lorem/text.ts +++ b/src/commands/lorem/text.ts @@ -4,7 +4,7 @@ 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']()); + console.log(faker.lorem.text()); }); export default command; diff --git a/src/commands/lorem/word.ts b/src/commands/lorem/word.ts index 907fb85..0943030 100644 --- a/src/commands/lorem/word.ts +++ b/src/commands/lorem/word.ts @@ -4,7 +4,7 @@ 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']()); + console.log(faker.lorem.word()); }); export default command; diff --git a/src/commands/lorem/words.ts b/src/commands/lorem/words.ts index 4ff730f..2abf02b 100644 --- a/src/commands/lorem/words.ts +++ b/src/commands/lorem/words.ts @@ -4,7 +4,7 @@ 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']()); + console.log(faker.lorem.words()); }); export default command; diff --git a/src/commands/music/genre.ts b/src/commands/music/genre.ts index 6068336..06521df 100644 --- a/src/commands/music/genre.ts +++ b/src/commands/music/genre.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('genre') .description(`Returns a random music genre.`) .action(() => { - console.log(faker['music']['genre']()); + console.log(faker.music.genre()); }); export default command; diff --git a/src/commands/music/songName.ts b/src/commands/music/songName.ts index fe65acc..f5139c6 100644 --- a/src/commands/music/songName.ts +++ b/src/commands/music/songName.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('songName') .description(`Returns a random song name.`) .action(() => { - console.log(faker['music']['songName']()); + console.log(faker.music.songName()); }); export default command; diff --git a/src/commands/number/bigInt.ts b/src/commands/number/bigInt.ts index 973bb0c..3009db5 100644 --- a/src/commands/number/bigInt.ts +++ b/src/commands/number/bigInt.ts @@ -6,7 +6,7 @@ const command = new Command('bigInt') `Returns a [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#bigint_type) number.`, ) .action(() => { - console.log(faker['number']['bigInt']()); + console.log(faker.number.bigInt()); }); export default command; diff --git a/src/commands/number/binary.ts b/src/commands/number/binary.ts index bbfbb0e..a950215 100644 --- a/src/commands/number/binary.ts +++ b/src/commands/number/binary.ts @@ -6,7 +6,7 @@ const command = new Command('binary') `Returns a [binary](https://en.wikipedia.org/wiki/Binary_number) number.`, ) .action(() => { - console.log(faker['number']['binary']()); + console.log(faker.number.binary()); }); export default command; diff --git a/src/commands/number/float.ts b/src/commands/number/float.ts index 179b342..c1e8a22 100644 --- a/src/commands/number/float.ts +++ b/src/commands/number/float.ts @@ -6,7 +6,7 @@ const command = new Command('float') `Returns a single random floating-point number for a given precision or range and precision.`, ) .action(() => { - console.log(faker['number']['float']()); + console.log(faker.number.float()); }); export default command; diff --git a/src/commands/number/hex.ts b/src/commands/number/hex.ts index 0686a4c..128775a 100644 --- a/src/commands/number/hex.ts +++ b/src/commands/number/hex.ts @@ -6,7 +6,7 @@ const command = new Command('hex') `Returns a lowercase [hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal) number.`, ) .action(() => { - console.log(faker['number']['hex']()); + console.log(faker.number.hex()); }); export default command; diff --git a/src/commands/number/int.ts b/src/commands/number/int.ts index 8d918e7..1b07898 100644 --- a/src/commands/number/int.ts +++ b/src/commands/number/int.ts @@ -6,7 +6,7 @@ const command = new Command('int') `Returns a single random integer between zero and the given max value or the given range.`, ) .action(() => { - console.log(faker['number']['int']()); + console.log(faker.number.int()); }); export default command; diff --git a/src/commands/number/octal.ts b/src/commands/number/octal.ts index feb1b76..13f577c 100644 --- a/src/commands/number/octal.ts +++ b/src/commands/number/octal.ts @@ -6,7 +6,7 @@ const command = new Command('octal') `Returns an [octal](https://en.wikipedia.org/wiki/Octal) number.`, ) .action(() => { - console.log(faker['number']['octal']()); + console.log(faker.number.octal()); }); export default command; diff --git a/src/commands/person/bio.ts b/src/commands/person/bio.ts index 3c12aff..4190ca5 100644 --- a/src/commands/person/bio.ts +++ b/src/commands/person/bio.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('bio') .description(`Returns a random short biography`) .action(() => { - console.log(faker['person']['bio']()); + console.log(faker.person.bio()); }); export default command; diff --git a/src/commands/person/firstName.ts b/src/commands/person/firstName.ts index aafff6d..7c26689 100644 --- a/src/commands/person/firstName.ts +++ b/src/commands/person/firstName.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('firstName') .description(`Returns a random first name.`) .action(() => { - console.log(faker['person']['firstName']()); + console.log(faker.person.firstName()); }); export default command; diff --git a/src/commands/person/fullName.ts b/src/commands/person/fullName.ts index 33c075c..cb9dbbd 100644 --- a/src/commands/person/fullName.ts +++ b/src/commands/person/fullName.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('fullName') .description(`Generates a random full name.`) .action(() => { - console.log(faker['person']['fullName']()); + console.log(faker.person.fullName()); }); export default command; diff --git a/src/commands/person/gender.ts b/src/commands/person/gender.ts index 7236bd9..55aecdc 100644 --- a/src/commands/person/gender.ts +++ b/src/commands/person/gender.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('gender') .description(`Returns a random gender.`) .action(() => { - console.log(faker['person']['gender']()); + console.log(faker.person.gender()); }); export default command; diff --git a/src/commands/person/jobArea.ts b/src/commands/person/jobArea.ts index b5248d7..4e3f0f0 100644 --- a/src/commands/person/jobArea.ts +++ b/src/commands/person/jobArea.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('jobArea') .description(`Generates a random job area.`) .action(() => { - console.log(faker['person']['jobArea']()); + console.log(faker.person.jobArea()); }); export default command; diff --git a/src/commands/person/jobDescriptor.ts b/src/commands/person/jobDescriptor.ts index 0f2a4b6..6c0ed7d 100644 --- a/src/commands/person/jobDescriptor.ts +++ b/src/commands/person/jobDescriptor.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('jobDescriptor') .description(`Generates a random job descriptor.`) .action(() => { - console.log(faker['person']['jobDescriptor']()); + console.log(faker.person.jobDescriptor()); }); export default command; diff --git a/src/commands/person/jobTitle.ts b/src/commands/person/jobTitle.ts index 6e623fa..7901a2b 100644 --- a/src/commands/person/jobTitle.ts +++ b/src/commands/person/jobTitle.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('jobTitle') .description(`Generates a random job title.`) .action(() => { - console.log(faker['person']['jobTitle']()); + console.log(faker.person.jobTitle()); }); export default command; diff --git a/src/commands/person/jobType.ts b/src/commands/person/jobType.ts index 1818d61..5730c6c 100644 --- a/src/commands/person/jobType.ts +++ b/src/commands/person/jobType.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('jobType') .description(`Generates a random job type.`) .action(() => { - console.log(faker['person']['jobType']()); + console.log(faker.person.jobType()); }); export default command; diff --git a/src/commands/person/lastName.ts b/src/commands/person/lastName.ts index 133c24a..fd475a7 100644 --- a/src/commands/person/lastName.ts +++ b/src/commands/person/lastName.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('lastName') .description(`Returns a random last name.`) .action(() => { - console.log(faker['person']['lastName']()); + console.log(faker.person.lastName()); }); export default command; diff --git a/src/commands/person/middleName.ts b/src/commands/person/middleName.ts index f5881df..fd159c3 100644 --- a/src/commands/person/middleName.ts +++ b/src/commands/person/middleName.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('middleName') .description(`Returns a random middle name.`) .action(() => { - console.log(faker['person']['middleName']()); + console.log(faker.person.middleName()); }); export default command; diff --git a/src/commands/person/prefix.ts b/src/commands/person/prefix.ts index 4e2e05a..560c94f 100644 --- a/src/commands/person/prefix.ts +++ b/src/commands/person/prefix.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('prefix') .description(`Returns a random person prefix.`) .action(() => { - console.log(faker['person']['prefix']()); + console.log(faker.person.prefix()); }); export default command; diff --git a/src/commands/person/sex.ts b/src/commands/person/sex.ts index 6923e59..9e33bea 100644 --- a/src/commands/person/sex.ts +++ b/src/commands/person/sex.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('sex') .description(`Returns a random sex.`) .action(() => { - console.log(faker['person']['sex']()); + console.log(faker.person.sex()); }); export default command; diff --git a/src/commands/person/sexType.ts b/src/commands/person/sexType.ts index 9293c78..5e7ab30 100644 --- a/src/commands/person/sexType.ts +++ b/src/commands/person/sexType.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('sexType') .description(`Returns a random sex type.`) .action(() => { - console.log(faker['person']['sexType']()); + console.log(faker.person.sexType()); }); export default command; diff --git a/src/commands/person/suffix.ts b/src/commands/person/suffix.ts index a2cb343..134ea4b 100644 --- a/src/commands/person/suffix.ts +++ b/src/commands/person/suffix.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('suffix') .description(`Returns a random person suffix.`) .action(() => { - console.log(faker['person']['suffix']()); + console.log(faker.person.suffix()); }); export default command; diff --git a/src/commands/person/zodiacSign.ts b/src/commands/person/zodiacSign.ts index 73571c9..7113be8 100644 --- a/src/commands/person/zodiacSign.ts +++ b/src/commands/person/zodiacSign.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('zodiacSign') .description(`Returns a random zodiac sign.`) .action(() => { - console.log(faker['person']['zodiacSign']()); + console.log(faker.person.zodiacSign()); }); export default command; diff --git a/src/commands/phone/imei.ts b/src/commands/phone/imei.ts index 67e3398..3d8b78d 100644 --- a/src/commands/phone/imei.ts +++ b/src/commands/phone/imei.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('imei') .description(`Generates IMEI number.`) .action(() => { - console.log(faker['phone']['imei']()); + console.log(faker.phone.imei()); }); export default command; diff --git a/src/commands/phone/number.ts b/src/commands/phone/number.ts index d1a46a9..16a03a4 100644 --- a/src/commands/phone/number.ts +++ b/src/commands/phone/number.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('number') .description(`Generates a random phone number.`) .action(() => { - console.log(faker['phone']['number']()); + console.log(faker.phone.number()); }); export default command; diff --git a/src/commands/science/chemicalElement.ts b/src/commands/science/chemicalElement.ts index 4f505f5..3e9a50f 100644 --- a/src/commands/science/chemicalElement.ts +++ b/src/commands/science/chemicalElement.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('chemicalElement') .description(`Returns a random periodic table element.`) .action(() => { - console.log(faker['science']['chemicalElement']()); + console.log(faker.science.chemicalElement()); }); export default command; diff --git a/src/commands/science/unit.ts b/src/commands/science/unit.ts index 136bec9..9db6f6c 100644 --- a/src/commands/science/unit.ts +++ b/src/commands/science/unit.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('unit') .description(`Returns a random scientific unit.`) .action(() => { - console.log(faker['science']['unit']()); + console.log(faker.science.unit()); }); export default command; diff --git a/src/commands/string/alpha.ts b/src/commands/string/alpha.ts index dd77682..be41b07 100644 --- a/src/commands/string/alpha.ts +++ b/src/commands/string/alpha.ts @@ -6,7 +6,7 @@ const command = new Command('alpha') `Generating a string consisting of letters in the English alphabet.`, ) .action(() => { - console.log(faker['string']['alpha']()); + console.log(faker.string.alpha()); }); export default command; diff --git a/src/commands/string/alphanumeric.ts b/src/commands/string/alphanumeric.ts index 7e69c19..e19fefe 100644 --- a/src/commands/string/alphanumeric.ts +++ b/src/commands/string/alphanumeric.ts @@ -4,7 +4,7 @@ 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']()); + console.log(faker.string.alphanumeric()); }); export default command; diff --git a/src/commands/string/binary.ts b/src/commands/string/binary.ts index 26bab49..ea0fbc2 100644 --- a/src/commands/string/binary.ts +++ b/src/commands/string/binary.ts @@ -6,7 +6,7 @@ const command = new Command('binary') `Returns a [binary](https://en.wikipedia.org/wiki/Binary_number) string.`, ) .action(() => { - console.log(faker['string']['binary']()); + console.log(faker.string.binary()); }); export default command; diff --git a/src/commands/string/hexadecimal.ts b/src/commands/string/hexadecimal.ts index f8e81b9..246afa3 100644 --- a/src/commands/string/hexadecimal.ts +++ b/src/commands/string/hexadecimal.ts @@ -6,7 +6,7 @@ const command = new Command('hexadecimal') `Returns a [hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal) string.`, ) .action(() => { - console.log(faker['string']['hexadecimal']()); + console.log(faker.string.hexadecimal()); }); export default command; diff --git a/src/commands/string/nanoid.ts b/src/commands/string/nanoid.ts index 0b2fea2..70e4e05 100644 --- a/src/commands/string/nanoid.ts +++ b/src/commands/string/nanoid.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('nanoid') .description(`Generates a [Nano ID](https://github.com/ai/nanoid).`) .action(() => { - console.log(faker['string']['nanoid']()); + console.log(faker.string.nanoid()); }); export default command; diff --git a/src/commands/string/numeric.ts b/src/commands/string/numeric.ts index 4f97299..c24e5c3 100644 --- a/src/commands/string/numeric.ts +++ b/src/commands/string/numeric.ts @@ -4,7 +4,7 @@ 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']()); + console.log(faker.string.numeric()); }); export default command; diff --git a/src/commands/string/octal.ts b/src/commands/string/octal.ts index df1abd1..396c896 100644 --- a/src/commands/string/octal.ts +++ b/src/commands/string/octal.ts @@ -6,7 +6,7 @@ const command = new Command('octal') `Returns an [octal](https://en.wikipedia.org/wiki/Octal) string.`, ) .action(() => { - console.log(faker['string']['octal']()); + console.log(faker.string.octal()); }); export default command; diff --git a/src/commands/string/sample.ts b/src/commands/string/sample.ts index 9b86917..72a1169 100644 --- a/src/commands/string/sample.ts +++ b/src/commands/string/sample.ts @@ -6,7 +6,7 @@ const command = new Command('sample') `Returns a string containing UTF-16 chars between 33 and 125 (\`!\` to \`}\`).`, ) .action(() => { - console.log(faker['string']['sample']()); + console.log(faker.string.sample()); }); export default command; diff --git a/src/commands/string/symbol.ts b/src/commands/string/symbol.ts index b339b95..49ba57e 100644 --- a/src/commands/string/symbol.ts +++ b/src/commands/string/symbol.ts @@ -6,7 +6,7 @@ const command = new Command('symbol') `Returns a string containing only special characters from the following list:`, ) .action(() => { - console.log(faker['string']['symbol']()); + console.log(faker.string.symbol()); }); export default command; diff --git a/src/commands/string/uuid.ts b/src/commands/string/uuid.ts index 64bba35..44144f6 100644 --- a/src/commands/string/uuid.ts +++ b/src/commands/string/uuid.ts @@ -6,7 +6,7 @@ const command = new Command('uuid') `Returns a UUID v4 ([Universally Unique Identifier](https://en.wikipedia.org/wiki/Universally_unique_identifier)).`, ) .action(() => { - console.log(faker['string']['uuid']()); + console.log(faker.string.uuid()); }); export default command; diff --git a/src/commands/system/commonFileExt.ts b/src/commands/system/commonFileExt.ts index 0455c11..ae9c373 100644 --- a/src/commands/system/commonFileExt.ts +++ b/src/commands/system/commonFileExt.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('commonFileExt') .description(`Returns a commonly used file extension.`) .action(() => { - console.log(faker['system']['commonFileExt']()); + console.log(faker.system.commonFileExt()); }); export default command; diff --git a/src/commands/system/commonFileName.ts b/src/commands/system/commonFileName.ts index a36eb69..ad12516 100644 --- a/src/commands/system/commonFileName.ts +++ b/src/commands/system/commonFileName.ts @@ -6,7 +6,7 @@ const command = new Command('commonFileName') `Returns a random file name with a given extension or a commonly used extension.`, ) .action(() => { - console.log(faker['system']['commonFileName']()); + console.log(faker.system.commonFileName()); }); export default command; diff --git a/src/commands/system/commonFileType.ts b/src/commands/system/commonFileType.ts index 729a7e5..437ce65 100644 --- a/src/commands/system/commonFileType.ts +++ b/src/commands/system/commonFileType.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('commonFileType') .description(`Returns a commonly used file type.`) .action(() => { - console.log(faker['system']['commonFileType']()); + console.log(faker.system.commonFileType()); }); export default command; diff --git a/src/commands/system/cron.ts b/src/commands/system/cron.ts index 2e1329e..2497fe9 100644 --- a/src/commands/system/cron.ts +++ b/src/commands/system/cron.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('cron') .description(`Returns a random cron expression.`) .action(() => { - console.log(faker['system']['cron']()); + console.log(faker.system.cron()); }); export default command; diff --git a/src/commands/system/directoryPath.ts b/src/commands/system/directoryPath.ts index 3230c7b..f04f6d2 100644 --- a/src/commands/system/directoryPath.ts +++ b/src/commands/system/directoryPath.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('directoryPath') .description(`Returns a directory path.`) .action(() => { - console.log(faker['system']['directoryPath']()); + console.log(faker.system.directoryPath()); }); export default command; diff --git a/src/commands/system/fileExt.ts b/src/commands/system/fileExt.ts index 5f876f9..90770d2 100644 --- a/src/commands/system/fileExt.ts +++ b/src/commands/system/fileExt.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('fileExt') .description(`Returns a file extension.`) .action(() => { - console.log(faker['system']['fileExt']()); + console.log(faker.system.fileExt()); }); export default command; diff --git a/src/commands/system/fileName.ts b/src/commands/system/fileName.ts index 6f74b36..b07e4ef 100644 --- a/src/commands/system/fileName.ts +++ b/src/commands/system/fileName.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('fileName') .description(`Returns a random file name with extension.`) .action(() => { - console.log(faker['system']['fileName']()); + console.log(faker.system.fileName()); }); export default command; diff --git a/src/commands/system/filePath.ts b/src/commands/system/filePath.ts index bf6acf9..3f6ad97 100644 --- a/src/commands/system/filePath.ts +++ b/src/commands/system/filePath.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('filePath') .description(`Returns a file path.`) .action(() => { - console.log(faker['system']['filePath']()); + console.log(faker.system.filePath()); }); export default command; diff --git a/src/commands/system/fileType.ts b/src/commands/system/fileType.ts index 4697939..2649d64 100644 --- a/src/commands/system/fileType.ts +++ b/src/commands/system/fileType.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('fileType') .description(`Returns a file type.`) .action(() => { - console.log(faker['system']['fileType']()); + console.log(faker.system.fileType()); }); export default command; diff --git a/src/commands/system/mimeType.ts b/src/commands/system/mimeType.ts index b1f01a9..cce0c43 100644 --- a/src/commands/system/mimeType.ts +++ b/src/commands/system/mimeType.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('mimeType') .description(`Returns a mime-type.`) .action(() => { - console.log(faker['system']['mimeType']()); + console.log(faker.system.mimeType()); }); export default command; diff --git a/src/commands/system/networkInterface.ts b/src/commands/system/networkInterface.ts index 91d7135..c206b2f 100644 --- a/src/commands/system/networkInterface.ts +++ b/src/commands/system/networkInterface.ts @@ -6,7 +6,7 @@ const command = new Command('networkInterface') `Returns a random [network interface](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-understanding_the_predictable_network_interface_device_names).`, ) .action(() => { - console.log(faker['system']['networkInterface']()); + console.log(faker.system.networkInterface()); }); export default command; diff --git a/src/commands/system/semver.ts b/src/commands/system/semver.ts index 71fa46b..3cddf66 100644 --- a/src/commands/system/semver.ts +++ b/src/commands/system/semver.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('semver') .description(`Returns a [semantic version](https://semver.org).`) .action(() => { - console.log(faker['system']['semver']()); + console.log(faker.system.semver()); }); export default command; diff --git a/src/commands/vehicle/bicycle.ts b/src/commands/vehicle/bicycle.ts index bd2a97d..1085fcc 100644 --- a/src/commands/vehicle/bicycle.ts +++ b/src/commands/vehicle/bicycle.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('bicycle') .description(`Returns a type of bicycle.`) .action(() => { - console.log(faker['vehicle']['bicycle']()); + console.log(faker.vehicle.bicycle()); }); export default command; diff --git a/src/commands/vehicle/color.ts b/src/commands/vehicle/color.ts index b899ac4..a0ea6c3 100644 --- a/src/commands/vehicle/color.ts +++ b/src/commands/vehicle/color.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('color') .description(`Returns a vehicle color.`) .action(() => { - console.log(faker['vehicle']['color']()); + console.log(faker.vehicle.color()); }); export default command; diff --git a/src/commands/vehicle/fuel.ts b/src/commands/vehicle/fuel.ts index c6ff0ca..c59630b 100644 --- a/src/commands/vehicle/fuel.ts +++ b/src/commands/vehicle/fuel.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('fuel') .description(`Returns a fuel type.`) .action(() => { - console.log(faker['vehicle']['fuel']()); + console.log(faker.vehicle.fuel()); }); export default command; diff --git a/src/commands/vehicle/manufacturer.ts b/src/commands/vehicle/manufacturer.ts index f6e64ae..6a15c76 100644 --- a/src/commands/vehicle/manufacturer.ts +++ b/src/commands/vehicle/manufacturer.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('manufacturer') .description(`Returns a manufacturer name.`) .action(() => { - console.log(faker['vehicle']['manufacturer']()); + console.log(faker.vehicle.manufacturer()); }); export default command; diff --git a/src/commands/vehicle/model.ts b/src/commands/vehicle/model.ts index 799e1c2..5f6fb5e 100644 --- a/src/commands/vehicle/model.ts +++ b/src/commands/vehicle/model.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('model') .description(`Returns a vehicle model.`) .action(() => { - console.log(faker['vehicle']['model']()); + console.log(faker.vehicle.model()); }); export default command; diff --git a/src/commands/vehicle/type.ts b/src/commands/vehicle/type.ts index f1e5e1f..1773c63 100644 --- a/src/commands/vehicle/type.ts +++ b/src/commands/vehicle/type.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('type') .description(`Returns a vehicle type.`) .action(() => { - console.log(faker['vehicle']['type']()); + console.log(faker.vehicle.type()); }); export default command; diff --git a/src/commands/vehicle/vehicle.ts b/src/commands/vehicle/vehicle.ts index 78202a0..68d2081 100644 --- a/src/commands/vehicle/vehicle.ts +++ b/src/commands/vehicle/vehicle.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('vehicle') .description(`Returns a random vehicle.`) .action(() => { - console.log(faker['vehicle']['vehicle']()); + console.log(faker.vehicle.vehicle()); }); export default command; diff --git a/src/commands/vehicle/vin.ts b/src/commands/vehicle/vin.ts index 11f0134..6ca28c6 100644 --- a/src/commands/vehicle/vin.ts +++ b/src/commands/vehicle/vin.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('vin') .description(`Returns a vehicle identification number (VIN).`) .action(() => { - console.log(faker['vehicle']['vin']()); + console.log(faker.vehicle.vin()); }); export default command; diff --git a/src/commands/vehicle/vrm.ts b/src/commands/vehicle/vrm.ts index 85ba0ed..fa2194b 100644 --- a/src/commands/vehicle/vrm.ts +++ b/src/commands/vehicle/vrm.ts @@ -6,7 +6,7 @@ const command = new Command('vrm') `Returns a vehicle registration number (Vehicle Registration Mark - VRM)`, ) .action(() => { - console.log(faker['vehicle']['vrm']()); + console.log(faker.vehicle.vrm()); }); export default command; diff --git a/src/commands/word/adjective.ts b/src/commands/word/adjective.ts index f0056d6..4fc0388 100644 --- a/src/commands/word/adjective.ts +++ b/src/commands/word/adjective.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('adjective') .description(`Returns an adjective of random or optionally specified length.`) .action(() => { - console.log(faker['word']['adjective']()); + console.log(faker.word.adjective()); }); export default command; diff --git a/src/commands/word/adverb.ts b/src/commands/word/adverb.ts index d988f97..e90c936 100644 --- a/src/commands/word/adverb.ts +++ b/src/commands/word/adverb.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('adverb') .description(`Returns an adverb of random or optionally specified length.`) .action(() => { - console.log(faker['word']['adverb']()); + console.log(faker.word.adverb()); }); export default command; diff --git a/src/commands/word/conjunction.ts b/src/commands/word/conjunction.ts index f9aa7a9..73760a4 100644 --- a/src/commands/word/conjunction.ts +++ b/src/commands/word/conjunction.ts @@ -6,7 +6,7 @@ const command = new Command('conjunction') `Returns a conjunction of random or optionally specified length.`, ) .action(() => { - console.log(faker['word']['conjunction']()); + console.log(faker.word.conjunction()); }); export default command; diff --git a/src/commands/word/interjection.ts b/src/commands/word/interjection.ts index 6c576e0..133ea07 100644 --- a/src/commands/word/interjection.ts +++ b/src/commands/word/interjection.ts @@ -6,7 +6,7 @@ const command = new Command('interjection') `Returns an interjection of random or optionally specified length.`, ) .action(() => { - console.log(faker['word']['interjection']()); + console.log(faker.word.interjection()); }); export default command; diff --git a/src/commands/word/noun.ts b/src/commands/word/noun.ts index 31cb455..44a9e47 100644 --- a/src/commands/word/noun.ts +++ b/src/commands/word/noun.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('noun') .description(`Returns a noun of random or optionally specified length.`) .action(() => { - console.log(faker['word']['noun']()); + console.log(faker.word.noun()); }); export default command; diff --git a/src/commands/word/preposition.ts b/src/commands/word/preposition.ts index 3e63cd1..0b25fed 100644 --- a/src/commands/word/preposition.ts +++ b/src/commands/word/preposition.ts @@ -6,7 +6,7 @@ const command = new Command('preposition') `Returns a preposition of random or optionally specified length.`, ) .action(() => { - console.log(faker['word']['preposition']()); + console.log(faker.word.preposition()); }); export default command; diff --git a/src/commands/word/sample.ts b/src/commands/word/sample.ts index d2e4f36..d57d02f 100644 --- a/src/commands/word/sample.ts +++ b/src/commands/word/sample.ts @@ -6,7 +6,7 @@ const command = new Command('sample') `Returns a random sample of random or optionally specified length.`, ) .action(() => { - console.log(faker['word']['sample']()); + console.log(faker.word.sample()); }); export default command; diff --git a/src/commands/word/verb.ts b/src/commands/word/verb.ts index 20d9744..3886ff5 100644 --- a/src/commands/word/verb.ts +++ b/src/commands/word/verb.ts @@ -4,7 +4,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('verb') .description(`Returns a verb of random or optionally specified length.`) .action(() => { - console.log(faker['word']['verb']()); + console.log(faker.word.verb()); }); export default command; diff --git a/src/commands/word/words.ts b/src/commands/word/words.ts index 86fa0c9..ab24c4f 100644 --- a/src/commands/word/words.ts +++ b/src/commands/word/words.ts @@ -6,7 +6,7 @@ const command = new Command('words') `Returns a string containing a number of space separated random words.`, ) .action(() => { - console.log(faker['word']['words']()); + console.log(faker.word.words()); }); export default command; From 9bc89701a84f2bd8dc4fb9f34050518ed694b3f6 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Mon, 4 Sep 2023 19:33:03 +0200 Subject: [PATCH 12/14] refactor: adjust command descriptions --- src/commands/airline/aircraftType.ts | 2 +- src/commands/airline/flightNumber.ts | 4 +--- src/commands/airline/recordLocator.ts | 4 +--- src/commands/animal/bear.ts | 2 +- src/commands/animal/bird.ts | 2 +- src/commands/animal/cat.ts | 2 +- src/commands/animal/cetacean.ts | 2 +- src/commands/animal/cow.ts | 2 +- src/commands/animal/crocodilia.ts | 2 +- src/commands/animal/dog.ts | 2 +- src/commands/animal/fish.ts | 2 +- src/commands/animal/horse.ts | 2 +- src/commands/animal/insect.ts | 2 +- src/commands/animal/lion.ts | 2 +- src/commands/animal/rabbit.ts | 2 +- src/commands/animal/rodent.ts | 2 +- src/commands/animal/snake.ts | 2 +- src/commands/animal/type.ts | 2 +- src/commands/color/cmyk.ts | 2 +- src/commands/color/colorByCSSColorSpace.ts | 2 +- src/commands/color/cssSupportedFunction.ts | 2 +- src/commands/color/cssSupportedSpace.ts | 2 +- src/commands/color/hsl.ts | 2 +- src/commands/color/human.ts | 2 +- src/commands/color/hwb.ts | 2 +- src/commands/color/lab.ts | 2 +- src/commands/color/lch.ts | 2 +- src/commands/color/rgb.ts | 2 +- src/commands/color/space.ts | 2 +- src/commands/commerce/department.ts | 2 +- src/commands/commerce/price.ts | 2 +- src/commands/commerce/product.ts | 2 +- src/commands/commerce/productAdjective.ts | 2 +- src/commands/commerce/productDescription.ts | 2 +- src/commands/commerce/productMaterial.ts | 2 +- src/commands/company/bsAdjective.ts | 2 +- src/commands/company/bsBuzz.ts | 2 +- src/commands/company/bsNoun.ts | 2 +- src/commands/company/buzzAdjective.ts | 2 +- src/commands/company/buzzNoun.ts | 2 +- src/commands/company/buzzVerb.ts | 2 +- src/commands/company/catchPhraseAdjective.ts | 2 +- src/commands/company/catchPhraseDescriptor.ts | 2 +- src/commands/company/catchPhraseNoun.ts | 2 +- src/commands/company/companySuffix.ts | 2 +- src/commands/company/suffixes.ts | 2 +- src/commands/database/collation.ts | 2 +- src/commands/database/column.ts | 2 +- src/commands/database/engine.ts | 2 +- src/commands/database/mongodbObjectId.ts | 4 +--- src/commands/database/type.ts | 2 +- src/commands/datatype/array.ts | 2 +- src/commands/datatype/bigInt.ts | 4 +--- src/commands/datatype/boolean.ts | 2 +- src/commands/datatype/datetime.ts | 2 +- src/commands/datatype/float.ts | 4 ++-- src/commands/datatype/hexadecimal.ts | 2 +- src/commands/datatype/json.ts | 2 +- src/commands/datatype/number.ts | 4 +--- src/commands/datatype/string.ts | 2 +- src/commands/datatype/uuid.ts | 4 +--- src/commands/date/birthdate.ts | 2 +- src/commands/date/month.ts | 2 +- src/commands/date/weekday.ts | 2 +- src/commands/finance/bic.ts | 2 +- src/commands/finance/creditCardIssuer.ts | 2 +- src/commands/finance/currency.ts | 2 +- src/commands/finance/currencyCode.ts | 2 +- src/commands/finance/currencyName.ts | 2 +- src/commands/finance/currencySymbol.ts | 2 +- src/commands/finance/ethereumAddress.ts | 2 +- src/commands/finance/transactionType.ts | 2 +- src/commands/hacker/abbreviation.ts | 2 +- src/commands/hacker/adjective.ts | 2 +- src/commands/hacker/ingverb.ts | 2 +- src/commands/hacker/noun.ts | 2 +- src/commands/hacker/verb.ts | 2 +- src/commands/internet/avatar.ts | 2 +- src/commands/internet/domainSuffix.ts | 2 +- src/commands/internet/email.ts | 4 +--- src/commands/internet/exampleEmail.ts | 4 +--- src/commands/internet/httpMethod.ts | 2 +- src/commands/internet/protocol.ts | 2 +- src/commands/internet/userName.ts | 2 +- src/commands/location/cardinalDirection.ts | 2 +- src/commands/location/cityName.ts | 2 +- src/commands/location/country.ts | 2 +- src/commands/location/countryCode.ts | 4 +--- src/commands/location/county.ts | 2 +- src/commands/location/direction.ts | 2 +- src/commands/location/ordinalDirection.ts | 2 +- src/commands/location/secondaryAddress.ts | 4 +--- src/commands/location/state.ts | 2 +- src/commands/location/stateAbbr.ts | 2 +- src/commands/location/streetName.ts | 2 +- src/commands/location/timeZone.ts | 2 +- src/commands/location/zipCode.ts | 4 +--- src/commands/lorem/lines.ts | 2 +- src/commands/music/genre.ts | 2 +- src/commands/music/songName.ts | 2 +- src/commands/number/bigInt.ts | 4 +--- src/commands/number/binary.ts | 4 +--- src/commands/number/float.ts | 2 +- src/commands/number/hex.ts | 4 +--- src/commands/number/int.ts | 2 +- src/commands/number/octal.ts | 4 +--- src/commands/person/bio.ts | 2 +- src/commands/person/firstName.ts | 2 +- src/commands/person/gender.ts | 2 +- src/commands/person/lastName.ts | 2 +- src/commands/person/middleName.ts | 2 +- src/commands/person/prefix.ts | 2 +- src/commands/person/sex.ts | 2 +- src/commands/person/sexType.ts | 2 +- src/commands/person/suffix.ts | 2 +- src/commands/person/zodiacSign.ts | 2 +- src/commands/science/chemicalElement.ts | 2 +- src/commands/science/unit.ts | 2 +- src/commands/string/binary.ts | 4 +--- src/commands/string/hexadecimal.ts | 4 +--- src/commands/string/nanoid.ts | 2 +- src/commands/string/octal.ts | 4 +--- src/commands/string/sample.ts | 2 +- src/commands/string/symbol.ts | 4 +--- src/commands/string/uuid.ts | 4 +--- src/commands/system/commonFileExt.ts | 2 +- src/commands/system/commonFileName.ts | 4 +--- src/commands/system/commonFileType.ts | 2 +- src/commands/system/cron.ts | 2 +- src/commands/system/directoryPath.ts | 2 +- src/commands/system/fileExt.ts | 2 +- src/commands/system/fileName.ts | 2 +- src/commands/system/filePath.ts | 2 +- src/commands/system/fileType.ts | 2 +- src/commands/system/mimeType.ts | 2 +- src/commands/system/networkInterface.ts | 4 +--- src/commands/system/semver.ts | 2 +- src/commands/vehicle/bicycle.ts | 2 +- src/commands/vehicle/color.ts | 2 +- src/commands/vehicle/fuel.ts | 2 +- src/commands/vehicle/manufacturer.ts | 2 +- src/commands/vehicle/model.ts | 2 +- src/commands/vehicle/type.ts | 2 +- src/commands/vehicle/vehicle.ts | 2 +- src/commands/vehicle/vin.ts | 2 +- src/commands/vehicle/vrm.ts | 2 +- src/commands/word/adjective.ts | 2 +- src/commands/word/adverb.ts | 2 +- src/commands/word/conjunction.ts | 4 +--- src/commands/word/interjection.ts | 4 +--- src/commands/word/noun.ts | 2 +- src/commands/word/preposition.ts | 4 +--- src/commands/word/sample.ts | 4 +--- src/commands/word/verb.ts | 2 +- src/commands/word/words.ts | 2 +- 155 files changed, 156 insertions(+), 208 deletions(-) diff --git a/src/commands/airline/aircraftType.ts b/src/commands/airline/aircraftType.ts index 9be2135..07ebf38 100644 --- a/src/commands/airline/aircraftType.ts +++ b/src/commands/airline/aircraftType.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('aircraftType') - .description(`Returns a random aircraft type.`) + .description(`Generates a random aircraft type.`) .action(() => { console.log(faker.airline.aircraftType()); }); diff --git a/src/commands/airline/flightNumber.ts b/src/commands/airline/flightNumber.ts index 0996f67..92ef3a1 100644 --- a/src/commands/airline/flightNumber.ts +++ b/src/commands/airline/flightNumber.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('flightNumber') - .description( - `Returns a random flight number. Flight numbers are always 1 to 4 digits long. Sometimes they are`, - ) + .description(`Generates a random flight number.`) .action(() => { console.log(faker.airline.flightNumber()); }); diff --git a/src/commands/airline/recordLocator.ts b/src/commands/airline/recordLocator.ts index 8c10a85..2d94756 100644 --- a/src/commands/airline/recordLocator.ts +++ b/src/commands/airline/recordLocator.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('recordLocator') - .description( - `Generates a random [record locator](https://en.wikipedia.org/wiki/Record_locator). Record locators`, - ) + .description(`Generates a random record locator.`) .action(() => { console.log(faker.airline.recordLocator()); }); diff --git a/src/commands/animal/bear.ts b/src/commands/animal/bear.ts index f4d0686..53af6c3 100644 --- a/src/commands/animal/bear.ts +++ b/src/commands/animal/bear.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('bear') - .description(`Returns a random bear species.`) + .description(`Generates a random bear species.`) .action(() => { console.log(faker.animal.bear()); }); diff --git a/src/commands/animal/bird.ts b/src/commands/animal/bird.ts index 7b4c262..762899d 100644 --- a/src/commands/animal/bird.ts +++ b/src/commands/animal/bird.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('bird') - .description(`Returns a random bird species.`) + .description(`Generates a random bird species.`) .action(() => { console.log(faker.animal.bird()); }); diff --git a/src/commands/animal/cat.ts b/src/commands/animal/cat.ts index fb02fb1..fb82779 100644 --- a/src/commands/animal/cat.ts +++ b/src/commands/animal/cat.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('cat') - .description(`Returns a random cat breed.`) + .description(`Generates a random cat breed.`) .action(() => { console.log(faker.animal.cat()); }); diff --git a/src/commands/animal/cetacean.ts b/src/commands/animal/cetacean.ts index d11979f..e3aaca9 100644 --- a/src/commands/animal/cetacean.ts +++ b/src/commands/animal/cetacean.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('cetacean') - .description(`Returns a random cetacean species.`) + .description(`Generates a random cetacean species.`) .action(() => { console.log(faker.animal.cetacean()); }); diff --git a/src/commands/animal/cow.ts b/src/commands/animal/cow.ts index 1c28cff..5755856 100644 --- a/src/commands/animal/cow.ts +++ b/src/commands/animal/cow.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('cow') - .description(`Returns a random cow species.`) + .description(`Generates a random cow species.`) .action(() => { console.log(faker.animal.cow()); }); diff --git a/src/commands/animal/crocodilia.ts b/src/commands/animal/crocodilia.ts index e2ffd42..c58ffd8 100644 --- a/src/commands/animal/crocodilia.ts +++ b/src/commands/animal/crocodilia.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('crocodilia') - .description(`Returns a random crocodilian species.`) + .description(`Generates a random crocodilian species.`) .action(() => { console.log(faker.animal.crocodilia()); }); diff --git a/src/commands/animal/dog.ts b/src/commands/animal/dog.ts index e2ce2dc..90698b7 100644 --- a/src/commands/animal/dog.ts +++ b/src/commands/animal/dog.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('dog') - .description(`Returns a random dog breed.`) + .description(`Generates a random dog breed.`) .action(() => { console.log(faker.animal.dog()); }); diff --git a/src/commands/animal/fish.ts b/src/commands/animal/fish.ts index 7030260..168bf9d 100644 --- a/src/commands/animal/fish.ts +++ b/src/commands/animal/fish.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('fish') - .description(`Returns a random fish species.`) + .description(`Generates a random fish species.`) .action(() => { console.log(faker.animal.fish()); }); diff --git a/src/commands/animal/horse.ts b/src/commands/animal/horse.ts index 185f2f0..072647d 100644 --- a/src/commands/animal/horse.ts +++ b/src/commands/animal/horse.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('horse') - .description(`Returns a random horse breed.`) + .description(`Generates a random horse breed.`) .action(() => { console.log(faker.animal.horse()); }); diff --git a/src/commands/animal/insect.ts b/src/commands/animal/insect.ts index 8ca8f61..e4d0ce1 100644 --- a/src/commands/animal/insect.ts +++ b/src/commands/animal/insect.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('insect') - .description(`Returns a random insect species.`) + .description(`Generates a random insect species.`) .action(() => { console.log(faker.animal.insect()); }); diff --git a/src/commands/animal/lion.ts b/src/commands/animal/lion.ts index 367c132..c96dd65 100644 --- a/src/commands/animal/lion.ts +++ b/src/commands/animal/lion.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('lion') - .description(`Returns a random lion species.`) + .description(`Generates a random lion species.`) .action(() => { console.log(faker.animal.lion()); }); diff --git a/src/commands/animal/rabbit.ts b/src/commands/animal/rabbit.ts index f9b9fb6..949a022 100644 --- a/src/commands/animal/rabbit.ts +++ b/src/commands/animal/rabbit.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('rabbit') - .description(`Returns a random rabbit species.`) + .description(`Generates a random rabbit species.`) .action(() => { console.log(faker.animal.rabbit()); }); diff --git a/src/commands/animal/rodent.ts b/src/commands/animal/rodent.ts index 6cef273..fc7eb62 100644 --- a/src/commands/animal/rodent.ts +++ b/src/commands/animal/rodent.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('rodent') - .description(`Returns a random rodent breed.`) + .description(`Generates a random rodent breed.`) .action(() => { console.log(faker.animal.rodent()); }); diff --git a/src/commands/animal/snake.ts b/src/commands/animal/snake.ts index 625188f..30671ca 100644 --- a/src/commands/animal/snake.ts +++ b/src/commands/animal/snake.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('snake') - .description(`Returns a random snake species.`) + .description(`Generates a random snake species.`) .action(() => { console.log(faker.animal.snake()); }); diff --git a/src/commands/animal/type.ts b/src/commands/animal/type.ts index d98745b..58bef27 100644 --- a/src/commands/animal/type.ts +++ b/src/commands/animal/type.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('type') - .description(`Returns a random animal type.`) + .description(`Generates a random animal type.`) .action(() => { console.log(faker.animal.type()); }); diff --git a/src/commands/color/cmyk.ts b/src/commands/color/cmyk.ts index 65aa6a2..5fa27d0 100644 --- a/src/commands/color/cmyk.ts +++ b/src/commands/color/cmyk.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('cmyk') - .description(`Returns a CMYK color.`) + .description(`Generates a CMYK color.`) .action(() => { console.log(faker.color.cmyk()); }); diff --git a/src/commands/color/colorByCSSColorSpace.ts b/src/commands/color/colorByCSSColorSpace.ts index 9b6c730..ca1625b 100644 --- a/src/commands/color/colorByCSSColorSpace.ts +++ b/src/commands/color/colorByCSSColorSpace.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('colorByCSSColorSpace') - .description(`Returns a random color based on CSS color space specified.`) + .description(`Generates a random color based on CSS color space specified.`) .action(() => { console.log(faker.color.colorByCSSColorSpace()); }); diff --git a/src/commands/color/cssSupportedFunction.ts b/src/commands/color/cssSupportedFunction.ts index 1112ce7..1457267 100644 --- a/src/commands/color/cssSupportedFunction.ts +++ b/src/commands/color/cssSupportedFunction.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('cssSupportedFunction') - .description(`Returns a random css supported color function name.`) + .description(`Generates a random css supported color function name.`) .action(() => { console.log(faker.color.cssSupportedFunction()); }); diff --git a/src/commands/color/cssSupportedSpace.ts b/src/commands/color/cssSupportedSpace.ts index f1bfbea..009c89b 100644 --- a/src/commands/color/cssSupportedSpace.ts +++ b/src/commands/color/cssSupportedSpace.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('cssSupportedSpace') - .description(`Returns a random css supported color space name.`) + .description(`Generates a random css supported color space name.`) .action(() => { console.log(faker.color.cssSupportedSpace()); }); diff --git a/src/commands/color/hsl.ts b/src/commands/color/hsl.ts index 135b431..058345e 100644 --- a/src/commands/color/hsl.ts +++ b/src/commands/color/hsl.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('hsl') - .description(`Returns an HSL color.`) + .description(`Generates an HSL color.`) .action(() => { console.log(faker.color.hsl()); }); diff --git a/src/commands/color/human.ts b/src/commands/color/human.ts index cc6cfc1..2f33f33 100644 --- a/src/commands/color/human.ts +++ b/src/commands/color/human.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('human') - .description(`Returns a random human readable color name.`) + .description(`Generates a random human readable color name.`) .action(() => { console.log(faker.color.human()); }); diff --git a/src/commands/color/hwb.ts b/src/commands/color/hwb.ts index 6296b39..0754596 100644 --- a/src/commands/color/hwb.ts +++ b/src/commands/color/hwb.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('hwb') - .description(`Returns an HWB color.`) + .description(`Generates an HWB color.`) .action(() => { console.log(faker.color.hwb()); }); diff --git a/src/commands/color/lab.ts b/src/commands/color/lab.ts index f25f030..f6838d4 100644 --- a/src/commands/color/lab.ts +++ b/src/commands/color/lab.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('lab') - .description(`Returns a LAB (CIELAB) color.`) + .description(`Generates a LAB (CIELAB) color.`) .action(() => { console.log(faker.color.lab()); }); diff --git a/src/commands/color/lch.ts b/src/commands/color/lch.ts index 7b9a612..6713b46 100644 --- a/src/commands/color/lch.ts +++ b/src/commands/color/lch.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('lch') - .description(`Returns an LCH color. Even though upper bound of`) + .description(`Generates an LCH color. Even though upper bound of`) .action(() => { console.log(faker.color.lch()); }); diff --git a/src/commands/color/rgb.ts b/src/commands/color/rgb.ts index e9fbc7b..a63ddac 100644 --- a/src/commands/color/rgb.ts +++ b/src/commands/color/rgb.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('rgb') - .description(`Returns an RGB color.`) + .description(`Generates an RGB color.`) .action(() => { console.log(faker.color.rgb()); }); diff --git a/src/commands/color/space.ts b/src/commands/color/space.ts index 1750e63..78813e5 100644 --- a/src/commands/color/space.ts +++ b/src/commands/color/space.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('space') .description( - `Returns a random color space name from the worldwide accepted color spaces.`, + `Generates a random color space name from the worldwide accepted color spaces.`, ) .action(() => { console.log(faker.color.space()); diff --git a/src/commands/commerce/department.ts b/src/commands/commerce/department.ts index 6640d16..a19a16b 100644 --- a/src/commands/commerce/department.ts +++ b/src/commands/commerce/department.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('department') - .description(`Returns a department inside a shop.`) + .description(`Generates a department inside a shop.`) .action(() => { console.log(faker.commerce.department()); }); diff --git a/src/commands/commerce/price.ts b/src/commands/commerce/price.ts index 9973ca8..2f6fd03 100644 --- a/src/commands/commerce/price.ts +++ b/src/commands/commerce/price.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('price') - .description(`Generates a price between min and max (inclusive).`) + .description(`Generates a price.`) .action(() => { console.log(faker.commerce.price()); }); diff --git a/src/commands/commerce/product.ts b/src/commands/commerce/product.ts index 77e6632..efb98ea 100644 --- a/src/commands/commerce/product.ts +++ b/src/commands/commerce/product.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('product') - .description(`Returns a short product name.`) + .description(`Generates a short product name.`) .action(() => { console.log(faker.commerce.product()); }); diff --git a/src/commands/commerce/productAdjective.ts b/src/commands/commerce/productAdjective.ts index 94ed199..f63ca33 100644 --- a/src/commands/commerce/productAdjective.ts +++ b/src/commands/commerce/productAdjective.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('productAdjective') - .description(`Returns an adjective describing a product.`) + .description(`Generates an adjective describing a product.`) .action(() => { console.log(faker.commerce.productAdjective()); }); diff --git a/src/commands/commerce/productDescription.ts b/src/commands/commerce/productDescription.ts index 313e73a..92b3e85 100644 --- a/src/commands/commerce/productDescription.ts +++ b/src/commands/commerce/productDescription.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('productDescription') - .description(`Returns a product description.`) + .description(`Generates a product description.`) .action(() => { console.log(faker.commerce.productDescription()); }); diff --git a/src/commands/commerce/productMaterial.ts b/src/commands/commerce/productMaterial.ts index 4054d4d..12d10af 100644 --- a/src/commands/commerce/productMaterial.ts +++ b/src/commands/commerce/productMaterial.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('productMaterial') - .description(`Returns a material of a product.`) + .description(`Generates a material of a product.`) .action(() => { console.log(faker.commerce.productMaterial()); }); diff --git a/src/commands/company/bsAdjective.ts b/src/commands/company/bsAdjective.ts index 4f64323..778e195 100644 --- a/src/commands/company/bsAdjective.ts +++ b/src/commands/company/bsAdjective.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('bsAdjective') - .description(`Returns a random company bs adjective.`) + .description(`Generates a random company bs adjective.`) .action(() => { console.log(faker.company.bsAdjective()); }); diff --git a/src/commands/company/bsBuzz.ts b/src/commands/company/bsBuzz.ts index d07023e..1f6072e 100644 --- a/src/commands/company/bsBuzz.ts +++ b/src/commands/company/bsBuzz.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('bsBuzz') - .description(`Returns a random company bs buzz word.`) + .description(`Generates a random company bs buzz word.`) .action(() => { console.log(faker.company.bsBuzz()); }); diff --git a/src/commands/company/bsNoun.ts b/src/commands/company/bsNoun.ts index 23a3cea..a7e23d3 100644 --- a/src/commands/company/bsNoun.ts +++ b/src/commands/company/bsNoun.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('bsNoun') - .description(`Returns a random company bs noun.`) + .description(`Generates a random company bs noun.`) .action(() => { console.log(faker.company.bsNoun()); }); diff --git a/src/commands/company/buzzAdjective.ts b/src/commands/company/buzzAdjective.ts index a03ec1d..0791aec 100644 --- a/src/commands/company/buzzAdjective.ts +++ b/src/commands/company/buzzAdjective.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('buzzAdjective') .description( - `Returns a random buzz adjective that can be used to demonstrate data being viewed by a manager.`, + `Generates a random buzz adjective that can be used to demonstrate data being viewed by a manager.`, ) .action(() => { console.log(faker.company.buzzAdjective()); diff --git a/src/commands/company/buzzNoun.ts b/src/commands/company/buzzNoun.ts index 8b3b104..8e2cdc8 100644 --- a/src/commands/company/buzzNoun.ts +++ b/src/commands/company/buzzNoun.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('buzzNoun') .description( - `Returns a random buzz noun that can be used to demonstrate data being viewed by a manager.`, + `Generates a random buzz noun that can be used to demonstrate data being viewed by a manager.`, ) .action(() => { console.log(faker.company.buzzNoun()); diff --git a/src/commands/company/buzzVerb.ts b/src/commands/company/buzzVerb.ts index 8d3e52a..2cc602d 100644 --- a/src/commands/company/buzzVerb.ts +++ b/src/commands/company/buzzVerb.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('buzzVerb') .description( - `Returns a random buzz verb that can be used to demonstrate data being viewed by a manager.`, + `Generates a random buzz verb that can be used to demonstrate data being viewed by a manager.`, ) .action(() => { console.log(faker.company.buzzVerb()); diff --git a/src/commands/company/catchPhraseAdjective.ts b/src/commands/company/catchPhraseAdjective.ts index 6f1e9f1..8d86bb7 100644 --- a/src/commands/company/catchPhraseAdjective.ts +++ b/src/commands/company/catchPhraseAdjective.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('catchPhraseAdjective') .description( - `Returns a random catch phrase adjective that can be displayed to an end user..`, + `Generates a random catch phrase adjective that can be displayed to an end user.`, ) .action(() => { console.log(faker.company.catchPhraseAdjective()); diff --git a/src/commands/company/catchPhraseDescriptor.ts b/src/commands/company/catchPhraseDescriptor.ts index d61a06d..c4903b9 100644 --- a/src/commands/company/catchPhraseDescriptor.ts +++ b/src/commands/company/catchPhraseDescriptor.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('catchPhraseDescriptor') .description( - `Returns a random catch phrase descriptor that can be displayed to an end user..`, + `Generates a random catch phrase descriptor that can be displayed to an end user.`, ) .action(() => { console.log(faker.company.catchPhraseDescriptor()); diff --git a/src/commands/company/catchPhraseNoun.ts b/src/commands/company/catchPhraseNoun.ts index 3f0dce3..b2dd800 100644 --- a/src/commands/company/catchPhraseNoun.ts +++ b/src/commands/company/catchPhraseNoun.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('catchPhraseNoun') .description( - `Returns a random catch phrase noun that can be displayed to an end user..`, + `Generates a random catch phrase noun that can be displayed to an end user.`, ) .action(() => { console.log(faker.company.catchPhraseNoun()); diff --git a/src/commands/company/companySuffix.ts b/src/commands/company/companySuffix.ts index 376bdc7..c0273b4 100644 --- a/src/commands/company/companySuffix.ts +++ b/src/commands/company/companySuffix.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('companySuffix') - .description(`Returns a random company suffix.`) + .description(`Generates a random company suffix.`) .action(() => { console.log(faker.company.companySuffix()); }); diff --git a/src/commands/company/suffixes.ts b/src/commands/company/suffixes.ts index b515403..4754dd0 100644 --- a/src/commands/company/suffixes.ts +++ b/src/commands/company/suffixes.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('suffixes') - .description(`Returns an array with possible company name suffixes.`) + .description(`Generates an array with possible company name suffixes.`) .action(() => { console.log(faker.company.suffixes()); }); diff --git a/src/commands/database/collation.ts b/src/commands/database/collation.ts index b2634b5..835a601 100644 --- a/src/commands/database/collation.ts +++ b/src/commands/database/collation.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('collation') - .description(`Returns a random database collation.`) + .description(`Generates a random database collation.`) .action(() => { console.log(faker.database.collation()); }); diff --git a/src/commands/database/column.ts b/src/commands/database/column.ts index b444f07..5bcbb8d 100644 --- a/src/commands/database/column.ts +++ b/src/commands/database/column.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('column') - .description(`Returns a random database column name.`) + .description(`Generates a random database column name.`) .action(() => { console.log(faker.database.column()); }); diff --git a/src/commands/database/engine.ts b/src/commands/database/engine.ts index 7657015..e3450ed 100644 --- a/src/commands/database/engine.ts +++ b/src/commands/database/engine.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('engine') - .description(`Returns a random database engine.`) + .description(`Generates a random database engine.`) .action(() => { console.log(faker.database.engine()); }); diff --git a/src/commands/database/mongodbObjectId.ts b/src/commands/database/mongodbObjectId.ts index 78254db..94b7ce3 100644 --- a/src/commands/database/mongodbObjectId.ts +++ b/src/commands/database/mongodbObjectId.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('mongodbObjectId') - .description( - `Returns a MongoDB [ObjectId](https://docs.mongodb.com/manual/reference/method/ObjectId/) string.`, - ) + .description(`Generates a MongoDB ObjectId string.`) .action(() => { console.log(faker.database.mongodbObjectId()); }); diff --git a/src/commands/database/type.ts b/src/commands/database/type.ts index df7a7df..ec61511 100644 --- a/src/commands/database/type.ts +++ b/src/commands/database/type.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('type') - .description(`Returns a random database column type.`) + .description(`Generates a random database column type.`) .action(() => { console.log(faker.database.type()); }); diff --git a/src/commands/datatype/array.ts b/src/commands/datatype/array.ts index f895cd8..eb37576 100644 --- a/src/commands/datatype/array.ts +++ b/src/commands/datatype/array.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('array') - .description(`Returns an array with random strings and numbers.`) + .description(`Generates an array with random strings and numbers.`) .action(() => { console.log(faker.datatype.array()); }); diff --git a/src/commands/datatype/bigInt.ts b/src/commands/datatype/bigInt.ts index 876cd12..6a3e5c6 100644 --- a/src/commands/datatype/bigInt.ts +++ b/src/commands/datatype/bigInt.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('bigInt') - .description( - `Returns a [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#bigint_type) number.`, - ) + .description(`Generates a BigInt number.`) .action(() => { console.log(faker.datatype.bigInt()); }); diff --git a/src/commands/datatype/boolean.ts b/src/commands/datatype/boolean.ts index cae6ef5..2a17ac7 100644 --- a/src/commands/datatype/boolean.ts +++ b/src/commands/datatype/boolean.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('boolean') - .description(`Returns the boolean value true or false.`) + .description(`Generates the boolean value true or false.`) .action(() => { console.log(faker.datatype.boolean()); }); diff --git a/src/commands/datatype/datetime.ts b/src/commands/datatype/datetime.ts index 4496df4..f3ba187 100644 --- a/src/commands/datatype/datetime.ts +++ b/src/commands/datatype/datetime.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('datetime') .description( - `Returns a Date object using a random number of milliseconds since`, + `Generates a Date object using a random number of milliseconds since`, ) .action(() => { console.log(faker.datatype.datetime()); diff --git a/src/commands/datatype/float.ts b/src/commands/datatype/float.ts index 91eec81..f557f5f 100644 --- a/src/commands/datatype/float.ts +++ b/src/commands/datatype/float.ts @@ -3,10 +3,10 @@ import { faker } from '@faker-js/faker'; const command = new Command('float') .description( - `Returns a single random floating-point number for the given precision or range and precision.`, + `Generates a single random floating-point number between zero and 99999.`, ) .action(() => { - console.log(faker.datatype.float()); + console.log(faker.datatype.float({})); }); export default command; diff --git a/src/commands/datatype/hexadecimal.ts b/src/commands/datatype/hexadecimal.ts index 4d0fafc..cd09da2 100644 --- a/src/commands/datatype/hexadecimal.ts +++ b/src/commands/datatype/hexadecimal.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('hexadecimal') .description( - `Returns a [hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal) number.`, + `Generates a [hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal) number.`, ) .action(() => { console.log(faker.datatype.hexadecimal()); diff --git a/src/commands/datatype/json.ts b/src/commands/datatype/json.ts index 2a89b3a..5c939e5 100644 --- a/src/commands/datatype/json.ts +++ b/src/commands/datatype/json.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('json') .description( - `Returns a string representing JSON object with 7 pre-defined properties.`, + `Generates a string representing JSON object with 7 pre-defined properties.`, ) .action(() => { console.log(faker.datatype.json()); diff --git a/src/commands/datatype/number.ts b/src/commands/datatype/number.ts index bf77b4f..5d59de6 100644 --- a/src/commands/datatype/number.ts +++ b/src/commands/datatype/number.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('number') - .description( - `Returns a single random number between zero and the given max value or the given range with the specified precision.`, - ) + .description(`Generates a single random number between zero and 99999.`) .action(() => { console.log(faker.datatype.number()); }); diff --git a/src/commands/datatype/string.ts b/src/commands/datatype/string.ts index ee2e1bf..892645e 100644 --- a/src/commands/datatype/string.ts +++ b/src/commands/datatype/string.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('string') .description( - `Returns a string containing UTF-16 chars between 33 and 125 (\`!\` to \`}\`).`, + `Generates a string containing UTF-16 chars between 33 and 125 (\`!\` to \`}\`).`, ) .action(() => { console.log(faker.datatype.string()); diff --git a/src/commands/datatype/uuid.ts b/src/commands/datatype/uuid.ts index 4702232..5b3ec32 100644 --- a/src/commands/datatype/uuid.ts +++ b/src/commands/datatype/uuid.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('uuid') - .description( - `Returns a UUID v4 ([Universally Unique Identifier](https://en.wikipedia.org/wiki/Universally_unique_identifier)).`, - ) + .description(`Generates a UUID v4 (Universally Unique Identifier).`) .action(() => { console.log(faker.datatype.uuid()); }); diff --git a/src/commands/date/birthdate.ts b/src/commands/date/birthdate.ts index 3d30461..2a74be3 100644 --- a/src/commands/date/birthdate.ts +++ b/src/commands/date/birthdate.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('birthdate') - .description(`Returns a random birthdate.`) + .description(`Generates a random birthdate.`) .action(() => { console.log(faker.date.birthdate()); }); diff --git a/src/commands/date/month.ts b/src/commands/date/month.ts index 279b006..5dd62be 100644 --- a/src/commands/date/month.ts +++ b/src/commands/date/month.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('month') - .description(`Returns a random name of a month.`) + .description(`Generates a random name of a month.`) .action(() => { console.log(faker.date.month()); }); diff --git a/src/commands/date/weekday.ts b/src/commands/date/weekday.ts index c812c9f..9d9a164 100644 --- a/src/commands/date/weekday.ts +++ b/src/commands/date/weekday.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('weekday') - .description(`Returns a random day of the week.`) + .description(`Generates a random day of the week.`) .action(() => { console.log(faker.date.weekday()); }); diff --git a/src/commands/finance/bic.ts b/src/commands/finance/bic.ts index dc2068c..1f5e2dc 100644 --- a/src/commands/finance/bic.ts +++ b/src/commands/finance/bic.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('bic') .description( - `Generates a random SWIFT/BIC code based on the [ISO-9362](https://en.wikipedia.org/wiki/ISO_9362) format.`, + `Generates a random SWIFT/BIC code based on the ISO-9362 format.`, ) .action(() => { console.log(faker.finance.bic()); diff --git a/src/commands/finance/creditCardIssuer.ts b/src/commands/finance/creditCardIssuer.ts index 3557f19..b3129ee 100644 --- a/src/commands/finance/creditCardIssuer.ts +++ b/src/commands/finance/creditCardIssuer.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('creditCardIssuer') - .description(`Returns a random credit card issuer.`) + .description(`Generates a random credit card issuer.`) .action(() => { console.log(faker.finance.creditCardIssuer()); }); diff --git a/src/commands/finance/currency.ts b/src/commands/finance/currency.ts index 1fd5c61..d4fa019 100644 --- a/src/commands/finance/currency.ts +++ b/src/commands/finance/currency.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('currency') .description( - `Returns a random currency object, containing \`code\`, \`name \`and \`symbol\` properties.`, + `Generates a random currency object, containing \`code\`, \`name \`and \`symbol\` properties.`, ) .action(() => { console.log(faker.finance.currency()); diff --git a/src/commands/finance/currencyCode.ts b/src/commands/finance/currencyCode.ts index 1acdc3b..dd5ef7a 100644 --- a/src/commands/finance/currencyCode.ts +++ b/src/commands/finance/currencyCode.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('currencyCode') - .description(`Returns a random currency code.`) + .description(`Generates a random currency code.`) .action(() => { console.log(faker.finance.currencyCode()); }); diff --git a/src/commands/finance/currencyName.ts b/src/commands/finance/currencyName.ts index c8bbe22..fc9d336 100644 --- a/src/commands/finance/currencyName.ts +++ b/src/commands/finance/currencyName.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('currencyName') - .description(`Returns a random currency name.`) + .description(`Generates a random currency name.`) .action(() => { console.log(faker.finance.currencyName()); }); diff --git a/src/commands/finance/currencySymbol.ts b/src/commands/finance/currencySymbol.ts index 0d987c1..3c8a204 100644 --- a/src/commands/finance/currencySymbol.ts +++ b/src/commands/finance/currencySymbol.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('currencySymbol') - .description(`Returns a random currency symbol.`) + .description(`Generates a random currency symbol.`) .action(() => { console.log(faker.finance.currencySymbol()); }); diff --git a/src/commands/finance/ethereumAddress.ts b/src/commands/finance/ethereumAddress.ts index b393f93..0090f1a 100644 --- a/src/commands/finance/ethereumAddress.ts +++ b/src/commands/finance/ethereumAddress.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('ethereumAddress') - .description(`Creates a random, non-checksum Ethereum address.`) + .description(`Generates a random, non-checksum Ethereum address.`) .action(() => { console.log(faker.finance.ethereumAddress()); }); diff --git a/src/commands/finance/transactionType.ts b/src/commands/finance/transactionType.ts index 818dd9e..a585c26 100644 --- a/src/commands/finance/transactionType.ts +++ b/src/commands/finance/transactionType.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('transactionType') - .description(`Returns a random transaction type.`) + .description(`Generates a random transaction type.`) .action(() => { console.log(faker.finance.transactionType()); }); diff --git a/src/commands/hacker/abbreviation.ts b/src/commands/hacker/abbreviation.ts index a610e8f..94f5610 100644 --- a/src/commands/hacker/abbreviation.ts +++ b/src/commands/hacker/abbreviation.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('abbreviation') - .description(`Returns a random hacker/IT abbreviation.`) + .description(`Generates a random hacker/IT abbreviation.`) .action(() => { console.log(faker.hacker.abbreviation()); }); diff --git a/src/commands/hacker/adjective.ts b/src/commands/hacker/adjective.ts index 3d77284..7ed23b0 100644 --- a/src/commands/hacker/adjective.ts +++ b/src/commands/hacker/adjective.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('adjective') - .description(`Returns a random hacker/IT adjective.`) + .description(`Generates a random hacker/IT adjective.`) .action(() => { console.log(faker.hacker.adjective()); }); diff --git a/src/commands/hacker/ingverb.ts b/src/commands/hacker/ingverb.ts index e58b969..6f03fee 100644 --- a/src/commands/hacker/ingverb.ts +++ b/src/commands/hacker/ingverb.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('ingverb') .description( - `Returns a random hacker/IT verb for continuous actions (en: ing suffix; e.g. hacking).`, + `Generates a random hacker/IT verb for continuous actions (en: ing suffix; e.g. hacking).`, ) .action(() => { console.log(faker.hacker.ingverb()); diff --git a/src/commands/hacker/noun.ts b/src/commands/hacker/noun.ts index 83fac82..46763c9 100644 --- a/src/commands/hacker/noun.ts +++ b/src/commands/hacker/noun.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('noun') - .description(`Returns a random hacker/IT noun.`) + .description(`Generates a random hacker/IT noun.`) .action(() => { console.log(faker.hacker.noun()); }); diff --git a/src/commands/hacker/verb.ts b/src/commands/hacker/verb.ts index bdbe9f3..bfe01ed 100644 --- a/src/commands/hacker/verb.ts +++ b/src/commands/hacker/verb.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('verb') - .description(`Returns a random hacker/IT verb.`) + .description(`Generates a random hacker/IT verb.`) .action(() => { console.log(faker.hacker.verb()); }); diff --git a/src/commands/internet/avatar.ts b/src/commands/internet/avatar.ts index 9670b07..0470d8b 100644 --- a/src/commands/internet/avatar.ts +++ b/src/commands/internet/avatar.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('avatar') - .description(`Returns a random avatar url.`) + .description(`Generates a random avatar url.`) .action(() => { console.log(faker.internet.avatar()); }); diff --git a/src/commands/internet/domainSuffix.ts b/src/commands/internet/domainSuffix.ts index 6044dad..10bdc42 100644 --- a/src/commands/internet/domainSuffix.ts +++ b/src/commands/internet/domainSuffix.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('domainSuffix') - .description(`Returns a random domain suffix.`) + .description(`Generates a random domain suffix.`) .action(() => { console.log(faker.internet.domainSuffix()); }); diff --git a/src/commands/internet/email.ts b/src/commands/internet/email.ts index 05ef614..e932c04 100644 --- a/src/commands/internet/email.ts +++ b/src/commands/internet/email.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('email') - .description( - `Generates an email address using the given person's name as base.`, - ) + .description(`Generates an email address.`) .action(() => { console.log(faker.internet.email()); }); diff --git a/src/commands/internet/exampleEmail.ts b/src/commands/internet/exampleEmail.ts index acbadd3..c74b4fd 100644 --- a/src/commands/internet/exampleEmail.ts +++ b/src/commands/internet/exampleEmail.ts @@ -2,9 +2,7 @@ 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 using the given person's name as base.`, - ) + .description(`Generates an email address using an example mail provider.`) .action(() => { console.log(faker.internet.exampleEmail()); }); diff --git a/src/commands/internet/httpMethod.ts b/src/commands/internet/httpMethod.ts index 1c13803..c854fb4 100644 --- a/src/commands/internet/httpMethod.ts +++ b/src/commands/internet/httpMethod.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('httpMethod') - .description(`Returns a random http method.`) + .description(`Generates a random http method.`) .action(() => { console.log(faker.internet.httpMethod()); }); diff --git a/src/commands/internet/protocol.ts b/src/commands/internet/protocol.ts index 2a75f7c..5a3c353 100644 --- a/src/commands/internet/protocol.ts +++ b/src/commands/internet/protocol.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('protocol') - .description(`Returns a random web protocol. Either \`http\` or \`https\`.`) + .description(`Generates a random web protocol. Either \`http\` or \`https\`.`) .action(() => { console.log(faker.internet.protocol()); }); diff --git a/src/commands/internet/userName.ts b/src/commands/internet/userName.ts index f9f54b3..7ee0fe7 100644 --- a/src/commands/internet/userName.ts +++ b/src/commands/internet/userName.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('userName') - .description(`Generates a username using the given person's name as base.`) + .description(`Generates a username.`) .action(() => { console.log(faker.internet.userName()); }); diff --git a/src/commands/location/cardinalDirection.ts b/src/commands/location/cardinalDirection.ts index 329775a..8dc4ecf 100644 --- a/src/commands/location/cardinalDirection.ts +++ b/src/commands/location/cardinalDirection.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('cardinalDirection') .description( - `Returns a random cardinal direction (north, east, south, west).`, + `Generates a random cardinal direction (north, east, south, west).`, ) .action(() => { console.log(faker.location.cardinalDirection()); diff --git a/src/commands/location/cityName.ts b/src/commands/location/cityName.ts index 3f525f1..1798f95 100644 --- a/src/commands/location/cityName.ts +++ b/src/commands/location/cityName.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('cityName') .description( - `Returns a random city name from a list of real cities for the locale.`, + `Generates a random city name from a list of real cities for the locale.`, ) .action(() => { console.log(faker.location.cityName()); diff --git a/src/commands/location/country.ts b/src/commands/location/country.ts index 5d732b5..11958f1 100644 --- a/src/commands/location/country.ts +++ b/src/commands/location/country.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('country') - .description(`Returns a random country name.`) + .description(`Generates a random country name.`) .action(() => { console.log(faker.location.country()); }); diff --git a/src/commands/location/countryCode.ts b/src/commands/location/countryCode.ts index 9a9b850..db9b0ea 100644 --- a/src/commands/location/countryCode.ts +++ b/src/commands/location/countryCode.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('countryCode') - .description( - `Returns a random [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code.`, - ) + .description(`Generates a random ISO_3166-1 country code.`) .action(() => { console.log(faker.location.countryCode()); }); diff --git a/src/commands/location/county.ts b/src/commands/location/county.ts index 0a12a8b..c73dbf3 100644 --- a/src/commands/location/county.ts +++ b/src/commands/location/county.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('county') .description( - `Returns a random localized county, or other equivalent second-level administrative entity for the locale's country such as a district or department.`, + `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()); diff --git a/src/commands/location/direction.ts b/src/commands/location/direction.ts index eb66fb3..41bf03d 100644 --- a/src/commands/location/direction.ts +++ b/src/commands/location/direction.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('direction') .description( - `Returns a random direction (cardinal and ordinal; northwest, east, etc).`, + `Generates a random direction (cardinal and ordinal; northwest, east, etc).`, ) .action(() => { console.log(faker.location.direction()); diff --git a/src/commands/location/ordinalDirection.ts b/src/commands/location/ordinalDirection.ts index 6e9731d..a2d6152 100644 --- a/src/commands/location/ordinalDirection.ts +++ b/src/commands/location/ordinalDirection.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('ordinalDirection') .description( - `Returns a random ordinal direction (northwest, southeast, etc).`, + `Generates a random ordinal direction (northwest, southeast, etc).`, ) .action(() => { console.log(faker.location.ordinalDirection()); diff --git a/src/commands/location/secondaryAddress.ts b/src/commands/location/secondaryAddress.ts index 8c1fb24..c30c104 100644 --- a/src/commands/location/secondaryAddress.ts +++ b/src/commands/location/secondaryAddress.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('secondaryAddress') - .description( - `Generates a random localized secondary address. This refers to a specific location at a given address`, - ) + .description(`Generates a random localized secondary address.`) .action(() => { console.log(faker.location.secondaryAddress()); }); diff --git a/src/commands/location/state.ts b/src/commands/location/state.ts index 3dbd8b0..b41044c 100644 --- a/src/commands/location/state.ts +++ b/src/commands/location/state.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('state') .description( - `Returns a random localized state, or other equivalent first-level administrative entity for the locale's country such as a province or region.`, + `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()); diff --git a/src/commands/location/stateAbbr.ts b/src/commands/location/stateAbbr.ts index 9f94e04..d862aeb 100644 --- a/src/commands/location/stateAbbr.ts +++ b/src/commands/location/stateAbbr.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('stateAbbr') .description( - `Returns a random localized state's abbreviated name from this country.`, + `Generates a random localized state's abbreviated name from this country.`, ) .action(() => { console.log(faker.location.stateAbbr()); diff --git a/src/commands/location/streetName.ts b/src/commands/location/streetName.ts index d086a24..7fef3c4 100644 --- a/src/commands/location/streetName.ts +++ b/src/commands/location/streetName.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('streetName') - .description(`Returns a random localized street name.`) + .description(`Generates a random localized street name.`) .action(() => { console.log(faker.location.streetName()); }); diff --git a/src/commands/location/timeZone.ts b/src/commands/location/timeZone.ts index 7035bb0..f483f4a 100644 --- a/src/commands/location/timeZone.ts +++ b/src/commands/location/timeZone.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('timeZone') - .description(`Returns a random time zone.`) + .description(`Generates a random time zone.`) .action(() => { console.log(faker.location.timeZone()); }); diff --git a/src/commands/location/zipCode.ts b/src/commands/location/zipCode.ts index 18e5d8c..55d005b 100644 --- a/src/commands/location/zipCode.ts +++ b/src/commands/location/zipCode.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('zipCode') - .description( - `Generates random zip code from specified format. If format is not specified,`, - ) + .description(`Generates random zip code from specified format.`) .action(() => { console.log(faker.location.zipCode()); }); diff --git a/src/commands/lorem/lines.ts b/src/commands/lorem/lines.ts index ffc059c..dd67ffe 100644 --- a/src/commands/lorem/lines.ts +++ b/src/commands/lorem/lines.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('lines') .description( - `Generates the given number lines of lorem separated by \`'\n'\`.`, + `Generates the given number lines of lorem separated by \`'\\n'\`.`, ) .action(() => { console.log(faker.lorem.lines()); diff --git a/src/commands/music/genre.ts b/src/commands/music/genre.ts index 06521df..756c677 100644 --- a/src/commands/music/genre.ts +++ b/src/commands/music/genre.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('genre') - .description(`Returns a random music genre.`) + .description(`Generates a random music genre.`) .action(() => { console.log(faker.music.genre()); }); diff --git a/src/commands/music/songName.ts b/src/commands/music/songName.ts index f5139c6..bad4d20 100644 --- a/src/commands/music/songName.ts +++ b/src/commands/music/songName.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('songName') - .description(`Returns a random song name.`) + .description(`Generates a random song name.`) .action(() => { console.log(faker.music.songName()); }); diff --git a/src/commands/number/bigInt.ts b/src/commands/number/bigInt.ts index 3009db5..9cefb03 100644 --- a/src/commands/number/bigInt.ts +++ b/src/commands/number/bigInt.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('bigInt') - .description( - `Returns a [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#bigint_type) number.`, - ) + .description(`Generates a BigInt number.`) .action(() => { console.log(faker.number.bigInt()); }); diff --git a/src/commands/number/binary.ts b/src/commands/number/binary.ts index a950215..6634cd6 100644 --- a/src/commands/number/binary.ts +++ b/src/commands/number/binary.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('binary') - .description( - `Returns a [binary](https://en.wikipedia.org/wiki/Binary_number) number.`, - ) + .description(`Generates a binary number.`) .action(() => { console.log(faker.number.binary()); }); diff --git a/src/commands/number/float.ts b/src/commands/number/float.ts index c1e8a22..396ab72 100644 --- a/src/commands/number/float.ts +++ b/src/commands/number/float.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('float') .description( - `Returns a single random floating-point number for a given precision or range and precision.`, + `Generates a single random floating-point number between zero and one.`, ) .action(() => { console.log(faker.number.float()); diff --git a/src/commands/number/hex.ts b/src/commands/number/hex.ts index 128775a..af6d9bf 100644 --- a/src/commands/number/hex.ts +++ b/src/commands/number/hex.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('hex') - .description( - `Returns a lowercase [hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal) number.`, - ) + .description(`Generates a lowercase hexadecimal number.`) .action(() => { console.log(faker.number.hex()); }); diff --git a/src/commands/number/int.ts b/src/commands/number/int.ts index 1b07898..ae50162 100644 --- a/src/commands/number/int.ts +++ b/src/commands/number/int.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('int') .description( - `Returns a single random integer between zero and the given max value or the given range.`, + `Generates a single random integer between zero and \`Number.MAX_SAFE_INTEGER\`.`, ) .action(() => { console.log(faker.number.int()); diff --git a/src/commands/number/octal.ts b/src/commands/number/octal.ts index 13f577c..c063550 100644 --- a/src/commands/number/octal.ts +++ b/src/commands/number/octal.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('octal') - .description( - `Returns an [octal](https://en.wikipedia.org/wiki/Octal) number.`, - ) + .description(`Generates an octal number.`) .action(() => { console.log(faker.number.octal()); }); diff --git a/src/commands/person/bio.ts b/src/commands/person/bio.ts index 4190ca5..da4f3b0 100644 --- a/src/commands/person/bio.ts +++ b/src/commands/person/bio.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('bio') - .description(`Returns a random short biography`) + .description(`Generates a random short biography`) .action(() => { console.log(faker.person.bio()); }); diff --git a/src/commands/person/firstName.ts b/src/commands/person/firstName.ts index 7c26689..f3a23b5 100644 --- a/src/commands/person/firstName.ts +++ b/src/commands/person/firstName.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('firstName') - .description(`Returns a random first name.`) + .description(`Generates a random first name.`) .action(() => { console.log(faker.person.firstName()); }); diff --git a/src/commands/person/gender.ts b/src/commands/person/gender.ts index 55aecdc..5919700 100644 --- a/src/commands/person/gender.ts +++ b/src/commands/person/gender.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('gender') - .description(`Returns a random gender.`) + .description(`Generates a random gender.`) .action(() => { console.log(faker.person.gender()); }); diff --git a/src/commands/person/lastName.ts b/src/commands/person/lastName.ts index fd475a7..60ad571 100644 --- a/src/commands/person/lastName.ts +++ b/src/commands/person/lastName.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('lastName') - .description(`Returns a random last name.`) + .description(`Generates a random last name.`) .action(() => { console.log(faker.person.lastName()); }); diff --git a/src/commands/person/middleName.ts b/src/commands/person/middleName.ts index fd159c3..f55d0c3 100644 --- a/src/commands/person/middleName.ts +++ b/src/commands/person/middleName.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('middleName') - .description(`Returns a random middle name.`) + .description(`Generates a random middle name.`) .action(() => { console.log(faker.person.middleName()); }); diff --git a/src/commands/person/prefix.ts b/src/commands/person/prefix.ts index 560c94f..99ff6df 100644 --- a/src/commands/person/prefix.ts +++ b/src/commands/person/prefix.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('prefix') - .description(`Returns a random person prefix.`) + .description(`Generates a random person prefix.`) .action(() => { console.log(faker.person.prefix()); }); diff --git a/src/commands/person/sex.ts b/src/commands/person/sex.ts index 9e33bea..bf716e1 100644 --- a/src/commands/person/sex.ts +++ b/src/commands/person/sex.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('sex') - .description(`Returns a random sex.`) + .description(`Generates a random sex.`) .action(() => { console.log(faker.person.sex()); }); diff --git a/src/commands/person/sexType.ts b/src/commands/person/sexType.ts index 5e7ab30..5550e44 100644 --- a/src/commands/person/sexType.ts +++ b/src/commands/person/sexType.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('sexType') - .description(`Returns a random sex type.`) + .description(`Generates a random sex type.`) .action(() => { console.log(faker.person.sexType()); }); diff --git a/src/commands/person/suffix.ts b/src/commands/person/suffix.ts index 134ea4b..57991eb 100644 --- a/src/commands/person/suffix.ts +++ b/src/commands/person/suffix.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('suffix') - .description(`Returns a random person suffix.`) + .description(`Generates a random person suffix.`) .action(() => { console.log(faker.person.suffix()); }); diff --git a/src/commands/person/zodiacSign.ts b/src/commands/person/zodiacSign.ts index 7113be8..385fc0b 100644 --- a/src/commands/person/zodiacSign.ts +++ b/src/commands/person/zodiacSign.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('zodiacSign') - .description(`Returns a random zodiac sign.`) + .description(`Generates a random zodiac sign.`) .action(() => { console.log(faker.person.zodiacSign()); }); diff --git a/src/commands/science/chemicalElement.ts b/src/commands/science/chemicalElement.ts index 3e9a50f..9ef3a59 100644 --- a/src/commands/science/chemicalElement.ts +++ b/src/commands/science/chemicalElement.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('chemicalElement') - .description(`Returns a random periodic table element.`) + .description(`Generates a random periodic table element.`) .action(() => { console.log(faker.science.chemicalElement()); }); diff --git a/src/commands/science/unit.ts b/src/commands/science/unit.ts index 9db6f6c..996d566 100644 --- a/src/commands/science/unit.ts +++ b/src/commands/science/unit.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('unit') - .description(`Returns a random scientific unit.`) + .description(`Generates a random scientific unit.`) .action(() => { console.log(faker.science.unit()); }); diff --git a/src/commands/string/binary.ts b/src/commands/string/binary.ts index ea0fbc2..488f9c1 100644 --- a/src/commands/string/binary.ts +++ b/src/commands/string/binary.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('binary') - .description( - `Returns a [binary](https://en.wikipedia.org/wiki/Binary_number) string.`, - ) + .description(`Generates a binary string.`) .action(() => { console.log(faker.string.binary()); }); diff --git a/src/commands/string/hexadecimal.ts b/src/commands/string/hexadecimal.ts index 246afa3..17dce60 100644 --- a/src/commands/string/hexadecimal.ts +++ b/src/commands/string/hexadecimal.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('hexadecimal') - .description( - `Returns a [hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal) string.`, - ) + .description(`Generates a hexadecimal string.`) .action(() => { console.log(faker.string.hexadecimal()); }); diff --git a/src/commands/string/nanoid.ts b/src/commands/string/nanoid.ts index 70e4e05..00ce3cd 100644 --- a/src/commands/string/nanoid.ts +++ b/src/commands/string/nanoid.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('nanoid') - .description(`Generates a [Nano ID](https://github.com/ai/nanoid).`) + .description(`Generates a Nano ID.`) .action(() => { console.log(faker.string.nanoid()); }); diff --git a/src/commands/string/octal.ts b/src/commands/string/octal.ts index 396c896..4567db4 100644 --- a/src/commands/string/octal.ts +++ b/src/commands/string/octal.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('octal') - .description( - `Returns an [octal](https://en.wikipedia.org/wiki/Octal) string.`, - ) + .description(`Generates an octal string.`) .action(() => { console.log(faker.string.octal()); }); diff --git a/src/commands/string/sample.ts b/src/commands/string/sample.ts index 72a1169..099f72f 100644 --- a/src/commands/string/sample.ts +++ b/src/commands/string/sample.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('sample') .description( - `Returns a string containing UTF-16 chars between 33 and 125 (\`!\` to \`}\`).`, + `Generates a string containing UTF-16 chars between 33 and 125 (\`!\` to \`}\`).`, ) .action(() => { console.log(faker.string.sample()); diff --git a/src/commands/string/symbol.ts b/src/commands/string/symbol.ts index 49ba57e..d30e415 100644 --- a/src/commands/string/symbol.ts +++ b/src/commands/string/symbol.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('symbol') - .description( - `Returns a string containing only special characters from the following list:`, - ) + .description(`Generates a string containing only special characters.`) .action(() => { console.log(faker.string.symbol()); }); diff --git a/src/commands/string/uuid.ts b/src/commands/string/uuid.ts index 44144f6..a6d6e2d 100644 --- a/src/commands/string/uuid.ts +++ b/src/commands/string/uuid.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('uuid') - .description( - `Returns a UUID v4 ([Universally Unique Identifier](https://en.wikipedia.org/wiki/Universally_unique_identifier)).`, - ) + .description(`Generates a UUID v4 (Universally Unique Identifier).`) .action(() => { console.log(faker.string.uuid()); }); diff --git a/src/commands/system/commonFileExt.ts b/src/commands/system/commonFileExt.ts index ae9c373..332f3c7 100644 --- a/src/commands/system/commonFileExt.ts +++ b/src/commands/system/commonFileExt.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('commonFileExt') - .description(`Returns a commonly used file extension.`) + .description(`Generates a commonly used file extension.`) .action(() => { console.log(faker.system.commonFileExt()); }); diff --git a/src/commands/system/commonFileName.ts b/src/commands/system/commonFileName.ts index ad12516..db8de38 100644 --- a/src/commands/system/commonFileName.ts +++ b/src/commands/system/commonFileName.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('commonFileName') - .description( - `Returns a random file name with a given extension or a commonly used extension.`, - ) + .description(`Generates a random file name and a commonly used extension.`) .action(() => { console.log(faker.system.commonFileName()); }); diff --git a/src/commands/system/commonFileType.ts b/src/commands/system/commonFileType.ts index 437ce65..1ac23fd 100644 --- a/src/commands/system/commonFileType.ts +++ b/src/commands/system/commonFileType.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('commonFileType') - .description(`Returns a commonly used file type.`) + .description(`Generates a commonly used file type.`) .action(() => { console.log(faker.system.commonFileType()); }); diff --git a/src/commands/system/cron.ts b/src/commands/system/cron.ts index 2497fe9..eaa86e8 100644 --- a/src/commands/system/cron.ts +++ b/src/commands/system/cron.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('cron') - .description(`Returns a random cron expression.`) + .description(`Generates a random cron expression.`) .action(() => { console.log(faker.system.cron()); }); diff --git a/src/commands/system/directoryPath.ts b/src/commands/system/directoryPath.ts index f04f6d2..87bc371 100644 --- a/src/commands/system/directoryPath.ts +++ b/src/commands/system/directoryPath.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('directoryPath') - .description(`Returns a directory path.`) + .description(`Generates a directory path.`) .action(() => { console.log(faker.system.directoryPath()); }); diff --git a/src/commands/system/fileExt.ts b/src/commands/system/fileExt.ts index 90770d2..9a68235 100644 --- a/src/commands/system/fileExt.ts +++ b/src/commands/system/fileExt.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('fileExt') - .description(`Returns a file extension.`) + .description(`Generates a file extension.`) .action(() => { console.log(faker.system.fileExt()); }); diff --git a/src/commands/system/fileName.ts b/src/commands/system/fileName.ts index b07e4ef..5118d13 100644 --- a/src/commands/system/fileName.ts +++ b/src/commands/system/fileName.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('fileName') - .description(`Returns a random file name with extension.`) + .description(`Generates a random file name with extension.`) .action(() => { console.log(faker.system.fileName()); }); diff --git a/src/commands/system/filePath.ts b/src/commands/system/filePath.ts index 3f6ad97..d2a4f9c 100644 --- a/src/commands/system/filePath.ts +++ b/src/commands/system/filePath.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('filePath') - .description(`Returns a file path.`) + .description(`Generates a file path.`) .action(() => { console.log(faker.system.filePath()); }); diff --git a/src/commands/system/fileType.ts b/src/commands/system/fileType.ts index 2649d64..626b260 100644 --- a/src/commands/system/fileType.ts +++ b/src/commands/system/fileType.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('fileType') - .description(`Returns a file type.`) + .description(`Generates a file type.`) .action(() => { console.log(faker.system.fileType()); }); diff --git a/src/commands/system/mimeType.ts b/src/commands/system/mimeType.ts index cce0c43..2ce21eb 100644 --- a/src/commands/system/mimeType.ts +++ b/src/commands/system/mimeType.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('mimeType') - .description(`Returns a mime-type.`) + .description(`Generates a mime-type.`) .action(() => { console.log(faker.system.mimeType()); }); diff --git a/src/commands/system/networkInterface.ts b/src/commands/system/networkInterface.ts index c206b2f..8c7c9ae 100644 --- a/src/commands/system/networkInterface.ts +++ b/src/commands/system/networkInterface.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('networkInterface') - .description( - `Returns a random [network interface](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-understanding_the_predictable_network_interface_device_names).`, - ) + .description(`Generates a random network interface.`) .action(() => { console.log(faker.system.networkInterface()); }); diff --git a/src/commands/system/semver.ts b/src/commands/system/semver.ts index 3cddf66..4647acf 100644 --- a/src/commands/system/semver.ts +++ b/src/commands/system/semver.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('semver') - .description(`Returns a [semantic version](https://semver.org).`) + .description(`Generates a semantic version.`) .action(() => { console.log(faker.system.semver()); }); diff --git a/src/commands/vehicle/bicycle.ts b/src/commands/vehicle/bicycle.ts index 1085fcc..97eb9da 100644 --- a/src/commands/vehicle/bicycle.ts +++ b/src/commands/vehicle/bicycle.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('bicycle') - .description(`Returns a type of bicycle.`) + .description(`Generates a type of bicycle.`) .action(() => { console.log(faker.vehicle.bicycle()); }); diff --git a/src/commands/vehicle/color.ts b/src/commands/vehicle/color.ts index a0ea6c3..e16efc5 100644 --- a/src/commands/vehicle/color.ts +++ b/src/commands/vehicle/color.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('color') - .description(`Returns a vehicle color.`) + .description(`Generates a vehicle color.`) .action(() => { console.log(faker.vehicle.color()); }); diff --git a/src/commands/vehicle/fuel.ts b/src/commands/vehicle/fuel.ts index c59630b..4c4247c 100644 --- a/src/commands/vehicle/fuel.ts +++ b/src/commands/vehicle/fuel.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('fuel') - .description(`Returns a fuel type.`) + .description(`Generates a fuel type.`) .action(() => { console.log(faker.vehicle.fuel()); }); diff --git a/src/commands/vehicle/manufacturer.ts b/src/commands/vehicle/manufacturer.ts index 6a15c76..2041e6c 100644 --- a/src/commands/vehicle/manufacturer.ts +++ b/src/commands/vehicle/manufacturer.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('manufacturer') - .description(`Returns a manufacturer name.`) + .description(`Generates a manufacturer name.`) .action(() => { console.log(faker.vehicle.manufacturer()); }); diff --git a/src/commands/vehicle/model.ts b/src/commands/vehicle/model.ts index 5f6fb5e..2845e54 100644 --- a/src/commands/vehicle/model.ts +++ b/src/commands/vehicle/model.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('model') - .description(`Returns a vehicle model.`) + .description(`Generates a vehicle model.`) .action(() => { console.log(faker.vehicle.model()); }); diff --git a/src/commands/vehicle/type.ts b/src/commands/vehicle/type.ts index 1773c63..ab247d4 100644 --- a/src/commands/vehicle/type.ts +++ b/src/commands/vehicle/type.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('type') - .description(`Returns a vehicle type.`) + .description(`Generates a vehicle type.`) .action(() => { console.log(faker.vehicle.type()); }); diff --git a/src/commands/vehicle/vehicle.ts b/src/commands/vehicle/vehicle.ts index 68d2081..38b7b36 100644 --- a/src/commands/vehicle/vehicle.ts +++ b/src/commands/vehicle/vehicle.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('vehicle') - .description(`Returns a random vehicle.`) + .description(`Generates a random vehicle.`) .action(() => { console.log(faker.vehicle.vehicle()); }); diff --git a/src/commands/vehicle/vin.ts b/src/commands/vehicle/vin.ts index 6ca28c6..35f878c 100644 --- a/src/commands/vehicle/vin.ts +++ b/src/commands/vehicle/vin.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('vin') - .description(`Returns a vehicle identification number (VIN).`) + .description(`Generates a vehicle identification number (VIN).`) .action(() => { console.log(faker.vehicle.vin()); }); diff --git a/src/commands/vehicle/vrm.ts b/src/commands/vehicle/vrm.ts index fa2194b..a48f033 100644 --- a/src/commands/vehicle/vrm.ts +++ b/src/commands/vehicle/vrm.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('vrm') .description( - `Returns a vehicle registration number (Vehicle Registration Mark - VRM)`, + `Generates a vehicle registration number (Vehicle Registration Mark - VRM).`, ) .action(() => { console.log(faker.vehicle.vrm()); diff --git a/src/commands/word/adjective.ts b/src/commands/word/adjective.ts index 4fc0388..1044416 100644 --- a/src/commands/word/adjective.ts +++ b/src/commands/word/adjective.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('adjective') - .description(`Returns an adjective of random or optionally specified length.`) + .description(`Generates an adjective of random length.`) .action(() => { console.log(faker.word.adjective()); }); diff --git a/src/commands/word/adverb.ts b/src/commands/word/adverb.ts index e90c936..9306c97 100644 --- a/src/commands/word/adverb.ts +++ b/src/commands/word/adverb.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('adverb') - .description(`Returns an adverb of random or optionally specified length.`) + .description(`Generates an adverb of random length.`) .action(() => { console.log(faker.word.adverb()); }); diff --git a/src/commands/word/conjunction.ts b/src/commands/word/conjunction.ts index 73760a4..974aa0d 100644 --- a/src/commands/word/conjunction.ts +++ b/src/commands/word/conjunction.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('conjunction') - .description( - `Returns a conjunction of random or optionally specified length.`, - ) + .description(`Generates a conjunction of random length.`) .action(() => { console.log(faker.word.conjunction()); }); diff --git a/src/commands/word/interjection.ts b/src/commands/word/interjection.ts index 133ea07..4903661 100644 --- a/src/commands/word/interjection.ts +++ b/src/commands/word/interjection.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('interjection') - .description( - `Returns an interjection of random or optionally specified length.`, - ) + .description(`Generates an interjection of random length.`) .action(() => { console.log(faker.word.interjection()); }); diff --git a/src/commands/word/noun.ts b/src/commands/word/noun.ts index 44a9e47..ac88e45 100644 --- a/src/commands/word/noun.ts +++ b/src/commands/word/noun.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('noun') - .description(`Returns a noun of random or optionally specified length.`) + .description(`Generates a noun of random length.`) .action(() => { console.log(faker.word.noun()); }); diff --git a/src/commands/word/preposition.ts b/src/commands/word/preposition.ts index 0b25fed..0035274 100644 --- a/src/commands/word/preposition.ts +++ b/src/commands/word/preposition.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('preposition') - .description( - `Returns a preposition of random or optionally specified length.`, - ) + .description(`Generates a preposition of random length.`) .action(() => { console.log(faker.word.preposition()); }); diff --git a/src/commands/word/sample.ts b/src/commands/word/sample.ts index d57d02f..04cbab2 100644 --- a/src/commands/word/sample.ts +++ b/src/commands/word/sample.ts @@ -2,9 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('sample') - .description( - `Returns a random sample of random or optionally specified length.`, - ) + .description(`Generates a random sample of random length.`) .action(() => { console.log(faker.word.sample()); }); diff --git a/src/commands/word/verb.ts b/src/commands/word/verb.ts index 3886ff5..31e9689 100644 --- a/src/commands/word/verb.ts +++ b/src/commands/word/verb.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import { faker } from '@faker-js/faker'; const command = new Command('verb') - .description(`Returns a verb of random or optionally specified length.`) + .description(`Generates a verb of random length.`) .action(() => { console.log(faker.word.verb()); }); diff --git a/src/commands/word/words.ts b/src/commands/word/words.ts index ab24c4f..d2aa76e 100644 --- a/src/commands/word/words.ts +++ b/src/commands/word/words.ts @@ -3,7 +3,7 @@ import { faker } from '@faker-js/faker'; const command = new Command('words') .description( - `Returns a string containing a number of space separated random words.`, + `Generates a string containing a number of space separated random words.`, ) .action(() => { console.log(faker.word.words()); From f6a49c91bd67dc68e4afa4e84e555ad6521c2653 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Mon, 4 Sep 2023 19:41:41 +0200 Subject: [PATCH 13/14] infra: scope lint scripts --- .github/workflows/ci.yml | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e197eb7..e8f8c3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: run: npm install - name: Lint - run: npx eslint . + run: npm run lint format: runs-on: ubuntu-latest diff --git a/package.json b/package.json index 87d37c5..c6a2d23 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "scripts": { "build": "tsc", "format": "prettier src --write", - "lint": "eslint .", - "lint:fix": "eslint . --fix" + "lint": "eslint src", + "lint:fix": "eslint src --fix" }, "files": [ "dist" From 719037826f13b544b870d0ddcf6cc0c402aaab61 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Mon, 4 Sep 2023 19:43:30 +0200 Subject: [PATCH 14/14] chore: install missing dependencies --- package-lock.json | 37 +++++++++++++++++++++++++++++++++++++ package.json | 4 ++++ 2 files changed, 41 insertions(+) diff --git a/package-lock.json b/package-lock.json index 9c100b2..1d72dc1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,21 @@ "": { "name": "@faker-js/cli", "version": "0.0.0", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/fakerjs" + } + ], "license": "MIT", + "dependencies": { + "@faker-js/faker": "^8.0.2", + "commander": "^11.0.0" + }, + "bin": { + "cli": "bin/faker.js", + "faker": "bin/faker.js" + }, "devDependencies": { "@typescript-eslint/eslint-plugin": "^6.6.0", "@typescript-eslint/parser": "^6.6.0", @@ -81,6 +95,21 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@faker-js/faker": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-8.0.2.tgz", + "integrity": "sha512-Uo3pGspElQW91PCvKSIAXoEgAUlRnH29sX2/p89kg7sP1m2PzCufHINd0FhTXQf6DYGiUlVncdSPa2F9wxed2A==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/fakerjs" + } + ], + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0", + "npm": ">=6.14.13" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", @@ -497,6 +526,14 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/commander": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.0.0.tgz", + "integrity": "sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==", + "engines": { + "node": ">=16" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", diff --git a/package.json b/package.json index c6a2d23..9711f35 100644 --- a/package.json +++ b/package.json @@ -52,5 +52,9 @@ "eslint": "^8.48.0", "prettier": "^3.0.3", "typescript": "~5.2.2" + }, + "dependencies": { + "@faker-js/faker": "^8.0.2", + "commander": "^11.0.0" } }