diff --git a/CHANGELOG.md b/CHANGELOG.md index d22470ee4..c53731ce7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,246 +1,245 @@ ## Changelog - `4.1.6` - Dec 10, 2023 - - Mexican first and last names added - - https://github.com/benkeen/generatedata/milestone/50?closed=1 + - Mexican first and last names added + - - `4.1.5` - Aug 7, 2023 - - Misc bug fixes, including fix for generating valid PAN numbers (thanks @benjamindonnachie!) - - https://github.com/benkeen/generatedata/milestone/49?closed=1 + - Misc bug fixes, including fix for generating valid PAN numbers (thanks @benjamindonnachie!) + - - `4.1.4` - Jun 20, 2023 - - Misc bug fixes. - - https://github.com/benkeen/generatedata/milestone/48?closed=1 + - Misc bug fixes. + - - `4.1.3` - Mar 2, 2023 - - Misc bug fixes. - - https://github.com/benkeen/generatedata/milestone/47?closed=1 + - Misc bug fixes. + - - `4.1.2` - Mar 1, 2023 - - Misc bug fixes. - - https://github.com/benkeen/generatedata/milestone/46?closed=1 + - Misc bug fixes. + - - `4.1.1` - Feb 25, 2023 - - Misc bug fixes. - - https://github.com/benkeen/generatedata/milestone/45?closed=1 + - Misc bug fixes. + - - `4.1.0` - Feb 14, 2023 - - Refactored code to accommodate upcoming npm package version (command-line generation). - - Moved to Google Identity Services for sign-in process. - - Misc bug fixes. - - https://github.com/benkeen/generatedata/milestone/43?closed=1 + - Refactored code to accommodate upcoming npm package version (command-line generation). + - Moved to Google Identity Services for sign-in process. + - Misc bug fixes. + - - `4.0.15` - Nov 26, 2022 - - Weighted List Data Type added - - Misc bug fixes. - - https://github.com/benkeen/generatedata/milestone/41?closed=1 + - Weighted List Data Type added + - Misc bug fixes. + - - `4.0.14` - Mar 5, 2022 - - URLs Data Type added - - Ukrainian, Singapore and South Africa country data added - - https://github.com/benkeen/generatedata/milestone/40?closed=1 + - URLs Data Type added + - Ukrainian, Singapore and South Africa country data added + - - `4.0.13` - Mar 3, 2022 - - Philippines country data added - - https://github.com/benkeen/generatedata/milestone/39?closed=1 + - Philippines country data added + - - `4.0.12` - Dec 28, 2021 - - List Data Type now offers a "between" option - - Norwegian country data added. Thanks @maddingo! - - https://github.com/benkeen/generatedata/milestone/38?closed=1 + - List Data Type now offers a "between" option + - Norwegian country data added. Thanks @maddingo! + - - `4.0.11` - Dec 8, 2021 - - Dutch name data - thanks @rvanraamsdonk! - - Misc bug fixes - - https://github.com/benkeen/generatedata/milestone/37?closed=1 + - Dutch name data - thanks @rvanraamsdonk! + - Misc bug fixes + - - `4.0.10` - Dec 6, 2021 - - Language selection overhauled - - Bug fixes - - Turkey name data - thanks @alicanipek! - - https://github.com/benkeen/generatedata/milestone/36?closed=1 + - Language selection overhauled + - Bug fixes + - Turkey name data - thanks @alicanipek! + - - `4.0.9` - Nov 20, 2021 - - Node updated to 14 - - German name data - thanks @ntauch! - - https://github.com/benkeen/generatedata/milestone/35?closed=1 + - Node updated to 14 + - German name data - thanks @ntauch! + - - `4.0.8` - Nov 13, 2021 - - additional bug fix for regions, cities and postal code Data Types throwing errors - - Chilean country names added - - Admin: status filter and total count added to accounts page - - https://github.com/benkeen/generatedata/milestone/34?closed=1 + - additional bug fix for regions, cities and postal code Data Types throwing errors + - Chilean country names added + - Admin: status filter and total count added to accounts page + - - `4.0.7` - Nov 11, 2021 - - bug fix for regions, cities and postal code Data Types throwing errors (didn't fully work) - - Fix for error thrown when closing Export Type overlay - - https://github.com/benkeen/generatedata/milestone/33?closed=1 + - bug fix for regions, cities and postal code Data Types throwing errors (didn't fully work) + - Fix for error thrown when closing Export Type overlay + - - `4.0.6` - Nov 6, 2021 - - Regional names added - - Email Data Type now lets you target other fields for more realistic data - - China country data added - - C# now handles auto-increment numeric values better - - https://github.com/benkeen/generatedata/milestone/32?closed=1 + - Regional names added + - Email Data Type now lets you target other fields for more realistic data + - China country data added + - C# now handles auto-increment numeric values better + - - `4.0.5` - Oct 5, 2021 - - Portuguese translation added - - Misc code improvements - - https://github.com/benkeen/generatedata/milestone/31?closed=1 + - Portuguese translation added + - Misc code improvements + - - `4.0.4` - Sept 27, 2021 - - Hindi locale added - - Improvements for small screens - - Misc bug fixes - - https://github.com/benkeen/generatedata/milestone/30?closed=1 + - Hindi locale added + - Improvements for small screens + - Misc bug fixes + - - `4.0.3` - Sept 22, 2021 - - Bug fix for CSV Export Type. - - https://github.com/benkeen/generatedata/milestone/29?closed=1 + - Bug fix for CSV Export Type. + - - `4.0.2` - Sept 21, 2021 - - misc bug fixes, UX improvements - - minor dependency updates - - https://github.com/benkeen/generatedata/milestone/28?closed=1 + - misc bug fixes, UX improvements + - minor dependency updates + - - `4.0.1` - Sept 19, 2021: - - localization files now cache-busted - - check for is-safari updated. + - localization files now cache-busted + - check for is-safari updated. - `4.0.0` - Sept 17, 2021: - - initial release! - - bug fixes + - initial release! + - bug fixes - `4.0.0-beta-20210911`: - - Color Data Type added - - Localized date picker components - - bug fixes + - Color Data Type added + - Localized date picker components + - bug fixes - `4.0.0-beta-20210906`: - - Date format standardization in code - - Better error handling for expired accounts - - misc bug fixes + - Date format standardization in code + - Better error handling for expired accounts + - misc bug fixes - `4.0.0-beta-20210903`: - - Time Data Type added - - misc bug fixes + - Time Data Type added + - misc bug fixes - `4.0.0-beta-20210826`: - - account searching - - misc bug fixes + - account searching + - misc bug fixes - `4.0.0-beta-20210809`: - - back in the game! Returning to work on generatedata - misc updates. - - Last logged in col on accounts page - - Expiry date added to accounts page - - Fix for TextFixed Data Type + - back in the game! Returning to work on generatedata - misc updates. + - Last logged in col on accounts page + - Expiry date added to accounts page + - Fix for TextFixed Data Type - `4.0.0-alpha-20210608`: - - minor authentication + password reset bug fixes. + - minor authentication + password reset bug fixes. - `4.0.0-alpha-20210607`: - - tons of updates & fixes - too many to note! UI updates, database changes, performances fixes and more. + - tons of updates & fixes - too many to note! UI updates, database changes, performances fixes and more. - `4.0.0-alpha-20210429`: - - preview panel scrolling fix. - - List Data Type now allows customizable delimiter. + - preview panel scrolling fix. + - List Data Type now allows customizable delimiter. - `4.0.0-alpha-20210424`: - - Safari error page. + - Safari error page. - `4.0.0-alpha-20210418`: - - Email support added. - - Forget password email; expiry emails. + - Email support added. + - Forget password email; expiry emails. - `4.0.0-alpha-20210305`: - - Track1 Data Type added. + - Track1 Data Type added. - `4.0.0-alpha-20210301`: - - Credit Card PAN Data Type added. + - Credit Card PAN Data Type added. - `4.0.0-alpha-20210224`: - - Assorted lib updates. + - Assorted lib updates. - `4.0.0-alpha-20210223`: - - Improved generation settings panel. - - i18n fixes. + - Improved generation settings panel. + - i18n fixes. - `4.0.0-alpha-20201111`: - - Chilean RUT number, PIN and CVV Data Types added. - - Fixed/Random Number of Words Data Types expanded to allow providing your own text as word source. + - Chilean RUT number, PIN and CVV Data Types added. + - Fixed/Random Number of Words Data Types expanded to allow providing your own text as word source. - `4.0.0-alpha-20201108`: - - CSV, LDIF Export Types added. - - All Data Types and Export Types translated. + - CSV, LDIF Export Types added. + - All Data Types and Export Types translated. - `4.0.0-alpha-20201104`: - - Computed and Composite Data Types combined. - - Names Data Type options structure change. - - Fix for help dialog not resetting search text - - version now links to changelog + - Computed and Composite Data Types combined. + - Names Data Type options structure change. + - Fix for help dialog not resetting search text + - version now links to changelog - `4.0.0-alpha-20201102`: - - all 9 languages now available to toggle between. - - "Clear Page" modal now lets you either just clear the grid, or reset everything (all plugins) to their default + - all 9 languages now available to toggle between. + - "Clear Page" modal now lets you either just clear the grid, or reset everything (all plugins) to their default settings - `4.0.0-alpha-20201101`: - - initial functional alpha. Data now generates! + - initial functional alpha. Data now generates! - `3.4.1` - Nov 24, 2019 - - Excel Export Type updated for new PHP lib, thanks [@adibaby](https://github.com/adibaby)! - - Bug fix for SocialSecurityNumber, courtesy of [@guzzisti](https://github.com/guzzisti). - - https://github.com/benkeen/generatedata/milestone/26?closed=1 + - Excel Export Type updated for new PHP lib, thanks [@adibaby](https://github.com/adibaby)! + - Bug fix for SocialSecurityNumber, courtesy of [@guzzisti](https://github.com/guzzisti). + - - `3.4.0` - Nov 16, 2019 - - Misc updates, - - new inject SQL feature added. Great work, [@harish81](https://github.com/harish81)! - - https://github.com/benkeen/generatedata/milestone/25?closed=1 + - Misc updates, + - new inject SQL feature added. Great work, [@harish81](https://github.com/harish81)! + - - `3.3.1` - July 18, 2019 - - https://github.com/benkeen/generatedata/milestone/23?closed=1 + - - `3.3.0` - July 1, 2019 - - misc bug fixes + - misc bug fixes - `3.2.8` - Sep 12, 2017 - - misc bug fixes + - misc bug fixes - `3.2.7` - Jul 29, 2017 - - "Computed" Data Type added. - - misc bug fixes + - "Computed" Data Type added. + - misc bug fixes - `3.2.6` - Apr 17, 2017 - - misc bug fixes: https://github.com/benkeen/generatedata/milestone/20?closed=1 + - misc bug fixes: - `3.2.5` - Apr 16, 2016 - - bug fixes: https://github.com/benkeen/generatedata/issues?utf8=%E2%9C%93&q=milestone%3A3.2.3+ - thanks for your + - bug fixes: - thanks for your help, [Conrad Hagemans](https://github.com/conradhagemans)! - - "Precision" option added to Normal Distribution Data Type - thanks [@aevans84](https://github.com/aevans84). - - generation of complex JSON structures added by [Tony OHagan](https://github.com/tohagan). - See: https://github.com/benkeen/generatedata/tree/master/plugins/exportTypes/JSON#generating-complex-objects + - "Precision" option added to Normal Distribution Data Type - thanks [@aevans84](https://github.com/aevans84). + - generation of complex JSON structures added by [Tony OHagan](https://github.com/tohagan). + See: - `3.2.4` - Dec 6, 2015 - - patch release for per-user settings. + - patch release for per-user settings. - `3.2.3` - Nov 15, 2015 - - SIRET/SIREN Data Type added (French business numbers) added. + - SIRET/SIREN Data Type added (French business numbers) added. Merci, [Fabrice Marquès](https://github.com/fmarques56)! - - Bug fixes: https://github.com/benkeen/generatedata/issues?utf8=%E2%9C%93&q=milestone%3A3.2.3+ + - Bug fixes: - `3.2.2` - Nov 12, 2015 - - The plugins (Data Types, Export Types, Countries) seen in the interface may not be configured on a per-user level. - - Installation script updated to allow customization of plugin selection. + - The plugins (Data Types, Export Types, Countries) seen in the interface may not be configured on a per-user level. + - Installation script updated to allow customization of plugin selection. - `3.2.1` - May 25, 2015 - - Configuration history option added to store the last 200 (this is configurable) versions of a data set. In case of + - Configuration history option added to store the last 200 (this is configurable) versions of a data set. In case of data loss, you can now revert to an older version very simply. - - Assorted bug fixes, including some improvements to the installation script. + - Assorted bug fixes, including some improvements to the installation script. - `3.2.0` - Jan 29, 2015 - - Adds a new REST API as an alternative way to generate data. See + - Adds a new REST API as an alternative way to generate data. See the [API Documentation](http://benkeen.github.io/generatedata/api.html) for more information. - `3.1.4` - Sept 6, 2014 - - Chinese language file added, thanks to [Zhao Yang](https://github.com/jptiancai) - - PAN, Track 1 and Track 2 data type updates, courtesy of Zeeshan Shaikh - - Turkey Country plugin added - - Bug fixes: https://github.com/benkeen/generatedata/issues?q=milestone%3A3.1.4+is%3Aclosed + - Chinese language file added, thanks to [Zhao Yang](https://github.com/jptiancai) + - PAN, Track 1 and Track 2 data type updates, courtesy of Zeeshan Shaikh + - Turkey Country plugin added + - Bug fixes: - `3.1.3` - July 20, 2014 - - Misc data generation efficiency improvements - - Batch Size SQL export option added by [Anton Nizhegorodov](https://github.com/an1zhegorodov) - - Poland, Nigeria Country plugins added - - Bug fixes: https://github.com/benkeen/generatedata/issues?milestone=13&page=1&state=closed + - Misc data generation efficiency improvements + - Batch Size SQL export option added by [Anton Nizhegorodov](https://github.com/an1zhegorodov) + - Poland, Nigeria Country plugins added + - Bug fixes: - `3.1.2` - July 12, 2014 - - Bug fixes: https://github.com/benkeen/generatedata/issues?milestone=12&page=1&state=closed + - Bug fixes: - `3.1.1` - Jan 31, 2014 - - New credit card data types: PAN, PIN, CVV, Track 1 and Track 2 courtesy of Zeeshan Shaikh - - INSERT IGNORE option added to the SQL Export Type, thanks to [Ap.Mathu](https://github.com/apmuthu) - - Bug fixes: https://github.com/benkeen/generatedata/issues?milestone=11&page=1&state=closed + - New credit card data types: PAN, PIN, CVV, Track 1 and Track 2 courtesy of Zeeshan Shaikh + - INSERT IGNORE option added to the SQL Export Type, thanks to [Ap.Mathu](https://github.com/apmuthu) + - Bug fixes: - `3.1.0` - Dec 19, 2013 - - Bug fix for accidental short-tags that were introduced in earlier code + - Bug fix for accidental short-tags that were introduced in earlier code - `3.0.9` - Dec 11, 2013 - - Compression option added to reduce download sizes, courtesy of [Manu Ullas](https://github.com/unullmass) - + - Compression option added to reduce download sizes, courtesy of [Manu Ullas](https://github.com/unullmass) - thanks! - - New credit card Data Type, thanks to [rsicher1](https://github.com/rsicher1) - - You can now make copies of Data Sets, via the main dialog window. Just check a single row and click "Copy Data + - New credit card Data Type, thanks to [rsicher1](https://github.com/rsicher1) + - You can now make copies of Data Sets, via the main dialog window. Just check a single row and click "Copy Data Set" button. - - CodeMirror updated to v3.2.0 - - Bug fixes: https://github.com/benkeen/generatedata/issues?milestone=9&page=1&state=closed + - CodeMirror updated to v3.2.0 + - Bug fixes: - `3.0.8` - Oct 28, 2013 - - International Bank Numbers - thanks, Joeri Noort! - - PostgreSQL database support added to SQL Export Type - - Bug fixes: https://github.com/benkeen/generatedata/issues?milestone=8&page=1&state=closed + - International Bank Numbers - thanks, Joeri Noort! + - PostgreSQL database support added to SQL Export Type + - Bug fixes: - `3.0.7` - Sept 7, 2013 - - LDIF Export Type support - thanks, [Marco Corona](https://github.com/coronam)! - - Proper (genuine!) French translation courtesy of [Michel Roca](https://github.com/mRoca) - - Optional JS, CSS minimization and bundling via Grunt. See help documentation for more information: + - LDIF Export Type support - thanks, [Marco Corona](https://github.com/coronam)! + - Proper (genuine!) French translation courtesy of [Michel Roca](https://github.com/mRoca) + - Optional JS, CSS minimization and bundling via Grunt. See help documentation for more information: [http://benkeen.github.io/generatedata/developer.html#bundling](http://benkeen.github.io/generatedata/developer.html#bundling) - - PHP 5.5 compatibility fixes: database connection now with mysqli; Generator class renamed to DataGenerator due to + - PHP 5.5 compatibility fixes: database connection now with mysqli; Generator class renamed to DataGenerator due to naming conflict - - Bug fixes: https://github.com/benkeen/generatedata/issues?milestone=7&page=1&state=closed + - Bug fixes: - `3.0.6` - Aug 1, 2013 - - Costa Rica Country plugin, Phone-Regional Data Type added, courtesy of [Andre Fortin](https://github.com/twindual) - - bug fixes, see: https://github.com/benkeen/generatedata/issues?milestone=6&page=1&state=closed + - Costa Rica Country plugin, Phone-Regional Data Type added, courtesy of [Andre Fortin](https://github.com/twindual) + - bug fixes, see: - `3.0.5` - July 13, 2013 - - Currency Data Type added - - Assorted bug fixes, see: https://github.com/benkeen/generatedata/issues?milestone=5&page=1&state=closed + - Currency Data Type added + - Assorted bug fixes, see: - `3.0.4` - July 2nd, 2013 - - Italy Export Type, courtesy of [Marcello Verona](https://github.com/marciuz) - - Regional Names Data Type added, data for Italy and France from [Marcello Verona](https://github.com/marciuz) + - Italy Export Type, courtesy of [Marcello Verona](https://github.com/marciuz) + - Regional Names Data Type added, data for Italy and France from [Marcello Verona](https://github.com/marciuz) - `3.0.3` - June 23, 2013 - - Bug fixes. See: https://github.com/benkeen/generatedata/issues?milestone=3 + - Bug fixes. See: - `3.0.2` - June 12, 2013 - - Spanish translation and Country plugin added (thanks, [@robarago](https://github.com/robarago)!) - - bug fixes, other updates: https://github.com/benkeen/generatedata/issues?milestone=2&state=closed + - Spanish translation and Country plugin added (thanks, [@robarago](https://github.com/robarago)!) + - bug fixes, other updates: - `3.0.1` - June 1st, 2013 - - MSSQL support added (thanks, [Kent](https://github.com/kchenery)!) - - Assorted bug fixes / updates. See: https://github.com/benkeen/generatedata/issues?milestone=1&state=closed + - MSSQL support added (thanks, [Kent](https://github.com/kchenery)!) + - Assorted bug fixes / updates. See: - `3.0.0` - May 21st, 2013 - - Initial release - + - Initial release diff --git a/client/src/plugins/README.md b/client/src/plugins/README.md index 5a5324d38..7e22e29fb 100644 --- a/client/src/plugins/README.md +++ b/client/src/plugins/README.md @@ -1,7 +1,7 @@ # [Docs](../../../docs/README.md) » Plugins The generatedata script is an _engine_ to let you generate different sorts of data. It can be extended via plugins -to let you generate precisely whatever data you want, in whatever format you want. +to let you generate precisely whatever data you want, in whatever format you want. This folder contains the three types of plugins available. A lot of the documentation in this section is to explain how to configure the plugins for use by the CLI, and what options are available for each. For normal use, you'd see all this @@ -9,4 +9,4 @@ information via the generatedata UI. - [Data Types](./dataTypes/README.md) - types of data that can be generated (e.g. names, phone numbers, email addresses) - [Export Types](./exportTypes/README.md) - the format of the generate data (e.g. JSON, CSV, XML, SQL) -- [Countries](./countries/README.md) - country-specific data to improve how realistic the regional data looks +- [Countries](./countries/README.md) - country-specific data to improve how realistic the regional data looks diff --git a/client/src/plugins/countries/Australia/bundle.ts b/client/src/plugins/countries/Australia/bundle.ts index 5d558bde7..8b9fc0a07 100644 --- a/client/src/plugins/countries/Australia/bundle.ts +++ b/client/src/plugins/countries/Australia/bundle.ts @@ -7,15 +7,23 @@ const Australia: GetCountryData = (i18n) => ({ continent: 'oceania', extendedData: { zipFormat: { - format: 'Xxxx' + format: 'Xxxx', }, + // the general phone format and area codes for the country + // https://voicerules.com/blog/telecommuting/how-to-call-australia-from-the-us/ phoneFormat: { + areaCodes: [ + 4, // Mobile phones + 5, // Mobile phones + 2, // New South Wales, Canberra region, and parts of northern Victoria + 7, // Queensland + 3, // Tasmania, Victoria, and parts of southern New South Wales + 8, // Western and South Australia, the Northern Territory, New South Wales, Cocos, and Christmas Islands + ], displayFormats: [ - 'Xxxx-xxxx', - '(0x) xxxx xxxx', - '04xx xxx xxx' - ] - } + '+61 A Xxxx xxxx', + ], + }, }, regions: [ { @@ -23,9 +31,15 @@ const Australia: GetCountryData = (i18n) => ({ regionShort: 'ACT', regionSlug: 'australian_capital_territories', weight: 3, - cities: [ - 'Canberra' - ] + cities: ['Canberra'], + extendedData: { + zipFormat: { + format: 'Xxxx', + }, + phoneFormat: { + areaCodes: [2, 4, 5], + }, + }, }, { regionName: 'New South Wales', @@ -53,18 +67,31 @@ const Australia: GetCountryData = (i18n) => ({ 'Queanbeyan', 'Tamworth', 'Wagga Wagga', - 'Wollongong' - ] + 'Wollongong', + ], + extendedData: { + zipFormat: { + format: 'Xxxx', + }, + phoneFormat: { + areaCodes: [8, 3, 2, 4, 5], + }, + }, }, { regionName: 'Northern Territory', regionShort: 'NT', regionSlug: 'northern_territory', weight: 2, - cities: [ - 'Darwin', - 'Palmerston' - ] + cities: ['Darwin', 'Palmerston'], + extendedData: { + zipFormat: { + format: 'Xxxx', + }, + phoneFormat: { + areaCodes: [8, 4, 5], + }, + }, }, { regionName: 'Queensland', @@ -89,8 +116,16 @@ const Australia: GetCountryData = (i18n) => ({ 'Redlands', 'Rockhampton', 'Toowoomba', - 'Townsville' - ] + 'Townsville', + ], + extendedData: { + zipFormat: { + format: 'Xxxx', + }, + phoneFormat: { + areaCodes: [7, 4, 5], + }, + }, }, { regionName: 'South Australia', @@ -105,20 +140,31 @@ const Australia: GetCountryData = (i18n) => ({ 'Port Pirie', 'Port Lincoln', 'Victor Harbor', - 'Whyalla' - ] + 'Whyalla', + ], + extendedData: { + zipFormat: { + format: 'Xxxx', + }, + phoneFormat: { + areaCodes: [8, 4, 5], + }, + }, }, { regionName: 'Tasmania', regionShort: 'TAS', regionSlug: 'tasmania', weight: 5, - cities: [ - 'Greater Hobart', - 'Burnie', - 'Devonport', - 'Launceston' - ] + cities: ['Greater Hobart', 'Burnie', 'Devonport', 'Launceston'], + extendedData: { + zipFormat: { + format: 'Xxxx', + }, + phoneFormat: { + areaCodes: [3, 4, 5], + }, + }, }, { regionName: 'Victoria', @@ -148,8 +194,16 @@ const Australia: GetCountryData = (i18n) => ({ 'Traralgon', 'Wangaratta', 'Warrnambool', - 'Wodonga' - ] + 'Wodonga', + ], + extendedData: { + zipFormat: { + format: 'Xxxx', + }, + phoneFormat: { + areaCodes: [3, 2, 4, 5], + }, + }, }, { regionName: 'Western Australia', @@ -178,10 +232,18 @@ const Australia: GetCountryData = (i18n) => ({ 'Stirling', 'Subiaco', 'Swan', - 'Wanneroo' - ] - } - ] + 'Wanneroo', + ], + extendedData: { + zipFormat: { + format: 'Xxxx', + }, + phoneFormat: { + areaCodes: [8, 4, 5], + }, + }, + }, + ], }); export default Australia; diff --git a/client/src/plugins/countries/README.md b/client/src/plugins/countries/README.md index 2b0d0ee8e..07161d6e2 100644 --- a/client/src/plugins/countries/README.md +++ b/client/src/plugins/countries/README.md @@ -16,186 +16,186 @@ The goal of the country plugins is **not to be exhaustive** in terms of the data to be able to generate realistic-looking regional data, but that doesn't mean having 100% of all regions and cities etc. to be provided. In fact, it's better to keep the data somewhat limited to ensure decent performance. -# Available Countries & Functionality +## Available Countries & Functionality This lists the available country plugins and what they currently provide. The global phone and zip formats are so that the generator can at least provide somewhat realistic looking information for a mapped Data Type (i.e. a phone or zip Data Type that's been explicitly mapped to a higher region). - **Australia** - - [x] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [x] names + - [x] global phone format + - [x] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [x] names - **Austria** - - [ ] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [x] names + - [ ] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [x] names - **Belgium** - - [ ] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [x] names + - [ ] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [x] names - **Brazil** - - [ ] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [x] regional zip format - - [x] names + - [ ] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [x] regional zip format + - [x] names - **Canada** - - [x] global phone format - - [x] region-specific phone format - - [x] global zip format - - [x] regional zip format - - [x] names + - [x] global phone format + - [x] region-specific phone format + - [x] global zip format + - [x] regional zip format + - [x] names - **Chile** - - [ ] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [x] names + - [ ] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [x] names - **China** - - [x] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [x] names + - [x] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [x] names - **Colombia** - - [x] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [ ] names + - [x] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [ ] names - **Costa Rica** - - [x] global phone format - - [x] region-specific phone format - - [x] global zip format - - [x] regional zip format - - [ ] names + - [x] global phone format + - [x] region-specific phone format + - [x] global zip format + - [x] regional zip format + - [ ] names - **France** - - [ ] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [ ] names + - [ ] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [ ] names - **Germany** - - [ ] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [x] names + - [ ] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [x] names - **India** - - [x] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [x] names + - [x] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [x] names - **Indonesia** - - [x] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [ ] names + - [x] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [ ] names - **Ireland** - - [ ] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [ ] names + - [ ] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [ ] names - **Italy** - - [ ] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [ ] names + - [ ] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [ ] names - **Mexico** - - [x] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [ ] names + - [x] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [ ] names - **Netherlands** - - [x] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [x] names + - [x] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [x] names - **New Zealand** - - [ ] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [ ] names + - [ ] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [ ] names - **Nigeria** - - [x] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [x] names + - [x] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [x] names - **Norway** - - [ ] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [ ] names + - [ ] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [ ] names - **Pakistan** - - [x] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [ ] names + - [x] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [ ] names - **Peru** - - [x] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [ ] names + - [x] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [ ] names - **Philippines** - - [x] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [ ] names + - [x] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [ ] names - **Poland** - - [x] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [ ] names + - [x] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [ ] names - **Russia** - - [x] global phone format - - [x] region-specific phone format - - [x] global zip format - - [x] regional zip format - - [ ] names + - [x] global phone format + - [x] region-specific phone format + - [x] global zip format + - [x] regional zip format + - [ ] names - **Singapore** - - [x] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [x] names + - [x] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [x] names - **South Africa** - - [x] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [x] names + - [x] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [x] names - **South Korea** - - [x] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [ ] names + - [x] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [ ] names - **Spain** - - [ ] global phone format - - [ ] region-specific phone format - - [x] global zip format - - [ ] regional zip format - - [x] names + - [ ] global phone format + - [ ] region-specific phone format + - [x] global zip format + - [ ] regional zip format + - [x] names - **Sweden** - [ ] global phone format - [ ] region-specific phone format diff --git a/client/types/generator.ts b/client/types/generator.ts index 08039c9ca..811b8924b 100644 --- a/client/types/generator.ts +++ b/client/types/generator.ts @@ -1,13 +1,13 @@ import { - DataType, - DataTemplateRow, - ExportType, - ExportTypeConfig -} from '../_plugins'; -import { GDLocale } from '~types/general'; + DataType, + DataTemplateRow, + ExportType, + ExportTypeConfig, +} from "../_plugins"; +import { GDLocale } from "~types/general"; import { DTGenerateResult, DTGenerationData } from "~types/dataTypes"; -export { CountryNameFiles } from '../_namePlugins'; +export { CountryNameFiles } from "../_namePlugins"; export { DataType, DataTemplateRow, ExportType, ExportTypeConfig }; /** @@ -16,16 +16,16 @@ export { DataType, DataTemplateRow, ExportType, ExportTypeConfig }; * Settings custom to the particular generation action. This is used in combination with DataSetConfig. */ export type GenerationSettings = { - numResults: number; - locale?: GDLocale; - stripWhitespace?: boolean; - target?: 'file' | 'return'; + numResults: number; + locale?: GDLocale; + stripWhitespace?: boolean; + target?: "file" | "return"; - // the default behaviour for the ppm package is for the generate method to return the generated data. This option - // lets users generate a file instead. It's far better for larger data sets - filename?: string; // the filename to generate including relative path - packetSize?: number; // TODO needed? -} + // the default behaviour for the ppm package is for the generate method to return the generated data. This option + // lets users generate a file instead. It's far better for larger data sets + filename?: string; // the filename to generate including relative path + packetSize?: number; // TODO needed? +}; /** * This is the public type for what users supply to the generation method. @@ -35,31 +35,31 @@ export type GenerationSettings = { * UI after constructing whatever the user wants. */ export type GDTemplate = { - generationSettings: GenerationSettings; - dataTemplate: DataTemplateRow[]; - exportSettings: ExportTypeConfig; -} + generationSettings: GenerationSettings; + dataTemplate: DataTemplateRow[]; + exportSettings: ExportTypeConfig; +}; // Bad name but can't think of a better one. This is the interface required for the Data Type and Export Type // code for performing a unit of generation. It's a consistent interface used by both web workers and node code export type WorkerInterface = { - context: 'worker' | 'node', - send: (data: DTGenerationData) => void | DTGenerateResult; - onSuccess?: (data: any) => void; - onError?: (data: any) => void; + context: "worker" | "node"; + send: (data: DTGenerationData) => void | DTGenerateResult; + onSuccess?: (data: any) => void; + onError?: (data: any) => void; }; export type UnchangedGenerationData = { - [colIndex: number]: string; // colIndex => row ID (unique GUID) -} + [colIndex: number]: string; // colIndex => row ID (unique GUID) +}; export type DataTypeWorkerInterface = { - [dataType: string]: WorkerInterface; + [dataType: string]: WorkerInterface; }; export type DataTypeBatchGeneratedPayload = { - completedBatchNum: number; - numGeneratedRows: number; - numResults: number; - generatedData: any; + completedBatchNum: number; + numGeneratedRows: number; + numResults: number; + generatedData: any; };