Ghost/ghost/data-generator/lib/importers/index.js
Sam Lord 4ff467794f Entirely rewrote data generator to simplify codebase
refs: https://github.com/TryGhost/DevOps/issues/11

This is a pretty huge commit, but the relevant points are:
* Each importer no longer needs to be passed a set of data, it just gets the data it needs
* Each importer specifies its dependencies, so that the order of import can be determined at runtime using a topological sort
* The main data generator function can just tell each importer to import the data it has

This makes working on the data generator much easier.

Some other benefits are:
* Batched importing, massively speeding up the whole process
* `--tables` to set the exact tables you want to import, and specify the quantity of each
2023-08-04 13:36:09 +01:00

38 lines
1.4 KiB
JavaScript

module.exports = [
require('./NewslettersImporter'),
require('./PostsImporter'),
require('./UsersImporter'),
require('./TagsImporter'),
require('./ProductsImporter'),
require('./MembersImporter'),
require('./BenefitsImporter'),
require('./WebMentionsImporter'),
require('./PostsAuthorsImporter'),
require('./PostsTagsImporter'),
require('./ProductsBenefitsImporter'),
require('./MembersProductsImporter'),
require('./PostsProductsImporter'),
require('./MembersNewslettersImporter'),
require('./StripeProductsImporter'),
require('./StripePricesImporter'),
require('./SubscriptionsImporter'),
require('./EmailsImporter'),
require('./EmailBatchesImporter'),
require('./EmailRecipientsImporter'),
require('./RedirectsImporter'),
require('./MembersClickEventsImporter'),
require('./OffersImporter'),
require('./MembersCreatedEventsImporter'),
require('./MembersLoginEventsImporter'),
require('./MembersStatusEventsImporter'),
require('./MembersStripeCustomersImporter'),
require('./MembersStripeCustomersSubscriptionsImporter'),
require('./MembersPaidSubscriptionEventsImporter'),
require('./MembersSubscriptionCreatedEventsImporter'),
require('./MembersSubscribeEventsImporter'),
require('./LabelsImporter'),
require('./MembersLabelsImporter'),
require('./RolesUsersImporter'),
require('./MembersFeedbackImporter')
];