{"repo":"RobinCK/typeorm-fixtures","free":true,"listed":false,"github":"https://github.com/RobinCK/typeorm-fixtures","clone":"git clone https://github.com/RobinCK/typeorm-fixtures.git","description":":pill: Fixtures loader for typeorm 🇺🇦","language":"TypeScript","stars":580,"topics":["fixtures","typeorm","orm","cli","typescript","faker","fixture-loader","typeorm-fixtures"],"license":"MIT","category":"cli-tools","readme_excerpt":"TypeORM fixtures cli Relying on faker.js, typeorm-fixtures-cli allows you to create a ton of fixtures/fake data for use while developing or testing your project. It gives you a few essential tools to make it very easy to generate complex data with constraints in a readable and easy to edit way, so that everyone on your team can tweak the fixtures if needed. Table of Contents - Install - Development Setup - Example - Creating Fixtures - Fixture Ranges - Fixture Reference - Fixture Lists - Calling Methods - Handling Relations - Advanced Guide - Parameters - Faker Data - EJS templating - Load Processor - Entity Schemas - Samples - Usage Install NPM Yarn Development Setup Example fixtures/Comment.yml fixtures/Post.yml fixtures/User.yml fixtures/Profile.yml Creating Fixtures The most basic functionality of this library is to turn flat yaml files into objects Fixture Ranges The first step is to let create many copies of an object for you to remove duplication from the yaml file. You can do that by defining a range in the fixture name: Now it will generate ten users, with IDs user1 to user10. Pretty good but we only have 10 bobs with the same name, username and email, which is not so fancy yet. Fixture Reference You can also specify a reference to a previously created list of fixtures: Fixture Lists You can also specify a list of values instead of a range: In the case of a range (e.g. user{1..10}), ($current) will return 1 for user1, 2 for user2 etc. The current iteration can be use","default_branch":null,"files":null,"tree":[],"storefront":"/r/RobinCK","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/RobinCK/typeorm-fixtures/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}