This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const generateUserName = (tenantId, email) => { | |
if (!tenantId || !email) { | |
return null; | |
} | |
return md5( | |
[ | |
tenantId, | |
].join().trim().toLowerCase() | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** | |
* 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' |