Skip to content

Instantly share code, notes, and snippets.

View tux86's full-sized avatar
🎯
Focusing

Walid Karray tux86

🎯
Focusing
View GitHub Profile
/***
* typeorm-cli very fast fixtures loading (based on transactions)
*
* Usage example :
* ts-node typeorm-fixtures-cli.ts --fixturesPath ./fixtures --transactionBatchSize 250 --delete
*/
import * as path from 'path'
import * as fs from 'fs'
import { program } from 'commander'
import { Builder, fixturesIterator, IEntity, Loader, Parser, Resolver } from 'typeorm-fixtures-cli'
const generateUserName = (tenantId, email) => {
if (!tenantId || !email) {
return null;
}
return md5(
[
tenantId,
email
].join().trim().toLowerCase()
)
service: aws-cognito-multitenant
provider:
name: aws
region: eu-west-1
stage: ${opt:stage, 'dev'}
environment:
USER_POOL_NAME: ${self:service}-UserPool-${self:provider.stage}