typescript-express-starter 9.1.2 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/configurationCache.log +1 -0
- package/.vscode/dryrun.log +6 -0
- package/.vscode/settings.json +3 -0
- package/.vscode/targets.log +239 -0
- package/CONTRIBUTORS.md +61 -0
- package/README.kr.md +122 -161
- package/README.md +118 -157
- package/bin/cli.js +1 -1
- package/lib/default/.swcrc +0 -3
- package/lib/default/Dockerfile.dev +18 -0
- package/lib/default/Dockerfile.prod +18 -0
- package/lib/default/Makefile +29 -16
- package/lib/default/docker-compose.yml +8 -8
- package/lib/default/jest.config.js +1 -1
- package/lib/default/package.json +42 -40
- package/lib/default/src/app.ts +4 -5
- package/lib/default/src/controllers/auth.controller.ts +9 -11
- package/lib/default/src/controllers/users.controller.ts +11 -13
- package/lib/default/src/dtos/users.dto.ts +12 -1
- package/lib/default/src/interfaces/users.interface.ts +2 -2
- package/lib/default/src/middlewares/auth.middleware.ts +16 -10
- package/lib/default/src/middlewares/error.middleware.ts +2 -4
- package/lib/default/src/middlewares/validation.middleware.ts +22 -20
- package/lib/default/src/models/users.model.ts +6 -8
- package/lib/default/src/routes/auth.route.ts +8 -11
- package/lib/default/src/routes/users.route.ts +10 -12
- package/lib/default/src/server.ts +6 -7
- package/lib/default/src/services/auth.service.ts +25 -36
- package/lib/default/src/services/users.service.ts +20 -29
- package/lib/{graphql/src/tests → default/src/test}/auth.test.ts +21 -21
- package/lib/default/src/test/users.test.ts +62 -0
- package/lib/default/src/utils/validateEnv.ts +1 -3
- package/lib/default/tsconfig.json +1 -1
- package/lib/graphql/.env.development.local +6 -6
- package/lib/graphql/.env.production.local +6 -6
- package/lib/graphql/.env.test.local +6 -6
- package/lib/graphql/.swcrc +1 -1
- package/lib/graphql/Dockerfile.dev +19 -0
- package/lib/graphql/Dockerfile.prod +19 -0
- package/lib/graphql/Makefile +32 -15
- package/lib/graphql/docker-compose.yml +23 -15
- package/lib/graphql/jest.config.js +1 -1
- package/lib/graphql/package.json +42 -41
- package/lib/graphql/src/app.ts +14 -13
- package/lib/graphql/src/config/index.ts +2 -2
- package/lib/{typeorm/src/databases → graphql/src/database}/index.ts +6 -6
- package/lib/graphql/src/dtos/users.dto.ts +14 -1
- package/lib/graphql/src/interfaces/users.interface.ts +2 -2
- package/lib/graphql/src/middlewares/auth.middleware.ts +16 -6
- package/lib/graphql/src/middlewares/error.middleware.ts +2 -4
- package/lib/graphql/src/repositories/auth.repository.ts +19 -27
- package/lib/graphql/src/repositories/users.repository.ts +9 -18
- package/lib/graphql/src/resolvers/auth.resolver.ts +2 -2
- package/lib/graphql/src/resolvers/users.resolver.ts +4 -4
- package/lib/graphql/src/server.ts +6 -7
- package/lib/graphql/src/test/auth.test.ts +10 -0
- package/lib/graphql/src/test/users.test.ts +11 -0
- package/lib/graphql/src/typedefs/users.type.ts +2 -2
- package/lib/graphql/src/utils/logger.ts +2 -0
- package/lib/graphql/src/utils/validateEnv.ts +1 -3
- package/lib/graphql/tsconfig.json +2 -2
- package/lib/knex/.env.development.local +2 -2
- package/lib/knex/.env.production.local +3 -3
- package/lib/knex/.env.test.local +3 -3
- package/lib/knex/.swcrc +1 -1
- package/lib/knex/Dockerfile.dev +19 -0
- package/lib/knex/Dockerfile.prod +19 -0
- package/lib/knex/Makefile +32 -15
- package/lib/knex/docker-compose.yml +19 -14
- package/lib/knex/jest.config.js +1 -1
- package/lib/knex/knexfile.ts +8 -8
- package/lib/knex/package.json +44 -42
- package/lib/knex/src/app.ts +6 -7
- package/lib/knex/src/config/index.ts +2 -1
- package/lib/knex/src/controllers/auth.controller.ts +9 -11
- package/lib/knex/src/controllers/users.controller.ts +10 -12
- package/lib/knex/src/{databases → database}/index.ts +4 -4
- package/lib/knex/src/database/migrations/20210713110926_initial.ts +17 -0
- package/lib/knex/src/dtos/users.dto.ts +12 -1
- package/lib/knex/src/interfaces/users.interface.ts +2 -2
- package/lib/knex/src/middlewares/auth.middleware.ts +17 -10
- package/lib/knex/src/middlewares/error.middleware.ts +2 -4
- package/lib/knex/src/middlewares/validation.middleware.ts +22 -20
- package/lib/knex/src/models/users.model.ts +2 -2
- package/lib/knex/src/routes/auth.route.ts +8 -10
- package/lib/knex/src/routes/users.route.ts +10 -12
- package/lib/knex/src/server.ts +6 -7
- package/lib/knex/src/services/auth.service.ts +27 -36
- package/lib/knex/src/services/users.service.ts +18 -23
- package/lib/knex/src/{tests → test}/auth.test.ts +2 -2
- package/lib/knex/src/{tests → test}/users.test.ts +2 -2
- package/lib/knex/src/utils/validateEnv.ts +1 -3
- package/lib/knex/tsconfig.json +2 -2
- package/lib/mikro-orm/.env.production.local +1 -1
- package/lib/mikro-orm/.env.test.local +1 -1
- package/lib/mikro-orm/.swcrc +1 -1
- package/lib/mikro-orm/Dockerfile.dev +19 -0
- package/lib/mikro-orm/Dockerfile.prod +19 -0
- package/lib/mikro-orm/Makefile +32 -15
- package/lib/mikro-orm/docker-compose.yml +20 -11
- package/lib/mikro-orm/package.json +42 -40
- package/lib/mikro-orm/src/app.ts +10 -12
- package/lib/mikro-orm/src/config/index.ts +2 -1
- package/lib/mikro-orm/src/controllers/auth.controller.ts +9 -11
- package/lib/mikro-orm/src/controllers/users.controller.ts +11 -13
- package/lib/mikro-orm/src/dtos/users.dto.ts +12 -1
- package/lib/mikro-orm/src/interfaces/users.interface.ts +1 -1
- package/lib/mikro-orm/src/middlewares/auth.middleware.ts +17 -10
- package/lib/mikro-orm/src/middlewares/error.middleware.ts +2 -4
- package/lib/mikro-orm/src/middlewares/validation.middleware.ts +22 -20
- package/lib/mikro-orm/src/routes/auth.route.ts +8 -10
- package/lib/mikro-orm/src/routes/users.route.ts +9 -11
- package/lib/mikro-orm/src/server.ts +6 -7
- package/lib/mikro-orm/src/services/auth.service.ts +23 -33
- package/lib/mikro-orm/src/services/users.service.ts +13 -21
- package/lib/mikro-orm/src/{tests → test}/auth.test.ts +3 -4
- package/lib/mikro-orm/src/{tests → test}/users.test.ts +4 -5
- package/lib/mikro-orm/src/utils/validateEnv.ts +1 -3
- package/lib/mikro-orm/tsconfig.json +2 -2
- package/lib/mongoose/.env.production.local +1 -1
- package/lib/mongoose/.env.test.local +1 -1
- package/lib/mongoose/.swcrc +1 -1
- package/lib/mongoose/Dockerfile.dev +19 -0
- package/lib/mongoose/Dockerfile.prod +19 -0
- package/lib/mongoose/Makefile +32 -15
- package/lib/mongoose/docker-compose.yml +20 -11
- package/lib/mongoose/jest.config.js +1 -1
- package/lib/mongoose/package.json +43 -41
- package/lib/mongoose/src/app.ts +6 -7
- package/lib/mongoose/src/config/index.ts +2 -1
- package/lib/mongoose/src/controllers/auth.controller.ts +9 -11
- package/lib/mongoose/src/controllers/users.controller.ts +11 -13
- package/lib/mongoose/src/{databases → database}/index.ts +1 -2
- package/lib/mongoose/src/dtos/users.dto.ts +12 -1
- package/lib/mongoose/src/interfaces/users.interface.ts +1 -1
- package/lib/mongoose/src/middlewares/auth.middleware.ts +16 -9
- package/lib/mongoose/src/middlewares/error.middleware.ts +2 -4
- package/lib/mongoose/src/middlewares/validation.middleware.ts +22 -20
- package/lib/mongoose/src/models/users.model.ts +2 -4
- package/lib/mongoose/src/routes/auth.route.ts +8 -10
- package/lib/mongoose/src/routes/users.route.ts +9 -11
- package/lib/mongoose/src/server.ts +6 -7
- package/lib/mongoose/src/services/auth.service.ts +26 -37
- package/lib/mongoose/src/services/users.service.ts +19 -29
- package/lib/{typegoose/src/tests → mongoose/src/test}/users.test.ts +7 -7
- package/lib/mongoose/src/utils/validateEnv.ts +1 -3
- package/lib/mongoose/tsconfig.json +2 -2
- package/lib/node-postgres/.dockerignore +18 -0
- package/lib/node-postgres/.editorconfig +9 -0
- package/lib/node-postgres/.env.development.local +13 -0
- package/lib/node-postgres/.env.production.local +13 -0
- package/lib/node-postgres/.env.test.local +13 -0
- package/lib/node-postgres/.eslintignore +1 -0
- package/lib/node-postgres/.eslintrc +18 -0
- package/lib/node-postgres/.huskyrc +5 -0
- package/lib/node-postgres/.lintstagedrc.json +5 -0
- package/lib/node-postgres/.prettierrc +8 -0
- package/lib/node-postgres/.swcrc +39 -0
- package/lib/node-postgres/.vscode/launch.json +35 -0
- package/lib/node-postgres/.vscode/settings.json +6 -0
- package/lib/node-postgres/Dockerfile.dev +17 -0
- package/lib/node-postgres/Dockerfile.prod +17 -0
- package/lib/node-postgres/Makefile +46 -0
- package/lib/node-postgres/docker-compose.yml +61 -0
- package/lib/node-postgres/ecosystem.config.js +57 -0
- package/lib/node-postgres/jest.config.js +12 -0
- package/lib/node-postgres/nginx.conf +40 -0
- package/lib/node-postgres/nodemon.json +12 -0
- package/lib/node-postgres/package.json +78 -0
- package/lib/node-postgres/src/app.ts +87 -0
- package/lib/node-postgres/src/config/index.ts +6 -0
- package/lib/node-postgres/src/controllers/auth.controller.ts +44 -0
- package/lib/node-postgres/src/controllers/users.controller.ts +63 -0
- package/lib/node-postgres/src/database/index.ts +6 -0
- package/lib/node-postgres/src/database/init.sql +110 -0
- package/lib/node-postgres/src/dtos/users.dto.ts +20 -0
- package/lib/node-postgres/src/http/auth.http +27 -0
- package/lib/node-postgres/src/http/users.http +34 -0
- package/lib/node-postgres/src/interfaces/auth.interface.ts +15 -0
- package/lib/node-postgres/src/interfaces/routes.interface.ts +6 -0
- package/lib/node-postgres/src/interfaces/users.interface.ts +5 -0
- package/lib/node-postgres/src/middlewares/auth.middleware.ts +38 -0
- package/lib/node-postgres/src/middlewares/error.middleware.ts +15 -0
- package/lib/node-postgres/src/middlewares/validation.middleware.ts +27 -0
- package/lib/node-postgres/src/models/users.model.ts +9 -0
- package/lib/node-postgres/src/routes/auth.route.ts +21 -0
- package/lib/node-postgres/src/routes/users.route.ts +23 -0
- package/lib/node-postgres/src/server.ts +10 -0
- package/lib/node-postgres/src/services/auth.service.ts +52 -0
- package/lib/node-postgres/src/services/users.service.ts +51 -0
- package/lib/{default/src/tests → node-postgres/src/test}/auth.test.ts +2 -2
- package/lib/{default/src/tests → node-postgres/src/test}/users.test.ts +5 -5
- package/lib/node-postgres/src/utils/logger.ts +65 -0
- package/lib/node-postgres/src/utils/validateEnv.ts +8 -0
- package/lib/node-postgres/swagger.yaml +123 -0
- package/lib/node-postgres/tsconfig.json +40 -0
- package/lib/prisma/.env.production.local +1 -1
- package/lib/prisma/.env.test.local +1 -1
- package/lib/prisma/Dockerfile.dev +19 -0
- package/lib/prisma/Dockerfile.prod +19 -0
- package/lib/prisma/Makefile +32 -15
- package/lib/prisma/docker-compose.yml +15 -14
- package/lib/prisma/jest.config.js +1 -1
- package/lib/prisma/package.json +43 -41
- package/lib/prisma/src/app.ts +4 -5
- package/lib/prisma/src/controllers/auth.controller.ts +10 -12
- package/lib/prisma/src/controllers/users.controller.ts +12 -14
- package/lib/prisma/src/dtos/users.dto.ts +12 -1
- package/lib/prisma/src/interfaces/auth.interface.ts +1 -1
- package/lib/prisma/src/interfaces/users.interface.ts +5 -0
- package/lib/prisma/src/middlewares/auth.middleware.ts +16 -11
- package/lib/prisma/src/middlewares/error.middleware.ts +2 -4
- package/lib/prisma/src/middlewares/validation.middleware.ts +22 -20
- package/lib/prisma/src/routes/auth.route.ts +8 -10
- package/lib/prisma/src/routes/users.route.ts +9 -11
- package/lib/prisma/src/server.ts +6 -7
- package/lib/prisma/src/services/auth.service.ts +10 -16
- package/lib/prisma/src/services/users.service.ts +19 -27
- package/lib/prisma/src/utils/validateEnv.ts +1 -3
- package/lib/prisma/tsconfig.json +1 -1
- package/lib/routing-controllers/Dockerfile.dev +19 -0
- package/lib/routing-controllers/Dockerfile.prod +19 -0
- package/lib/routing-controllers/Makefile +29 -16
- package/lib/routing-controllers/docker-compose.yml +9 -9
- package/lib/routing-controllers/jest.config.js +1 -1
- package/lib/routing-controllers/package.json +41 -40
- package/lib/routing-controllers/src/app.ts +4 -6
- package/lib/routing-controllers/src/controllers/auth.controller.ts +13 -12
- package/lib/routing-controllers/src/controllers/users.controller.ts +15 -13
- package/lib/routing-controllers/src/dtos/users.dto.ts +12 -1
- package/lib/routing-controllers/src/interfaces/users.interface.ts +1 -1
- package/lib/routing-controllers/src/middlewares/auth.middleware.ts +16 -10
- package/lib/routing-controllers/src/middlewares/error.middleware.ts +2 -5
- package/lib/routing-controllers/src/middlewares/validation.middleware.ts +23 -27
- package/lib/routing-controllers/src/models/users.model.ts +1 -3
- package/lib/routing-controllers/src/server.ts +5 -6
- package/lib/routing-controllers/src/services/auth.service.ts +25 -35
- package/lib/routing-controllers/src/services/users.service.ts +17 -25
- package/lib/routing-controllers/src/{tests → test}/auth.test.ts +1 -1
- package/lib/routing-controllers/src/{tests → test}/users.test.ts +10 -10
- package/lib/routing-controllers/src/utils/validateEnv.ts +1 -3
- package/lib/routing-controllers/tsconfig.json +1 -1
- package/lib/sequelize/.env.development.local +2 -2
- package/lib/sequelize/.env.production.local +3 -3
- package/lib/sequelize/.env.test.local +3 -3
- package/lib/sequelize/.swcrc +1 -1
- package/lib/sequelize/Dockerfile.dev +23 -0
- package/lib/sequelize/Dockerfile.prod +23 -0
- package/lib/sequelize/Makefile +32 -15
- package/lib/sequelize/docker-compose.yml +19 -14
- package/lib/sequelize/jest.config.js +1 -1
- package/lib/sequelize/package.json +45 -43
- package/lib/sequelize/src/app.ts +5 -6
- package/lib/sequelize/src/config/index.ts +2 -1
- package/lib/sequelize/src/controllers/auth.controller.ts +7 -8
- package/lib/sequelize/src/controllers/users.controller.ts +9 -10
- package/lib/sequelize/src/{databases → database}/index.ts +1 -3
- package/lib/sequelize/src/dtos/users.dto.ts +12 -1
- package/lib/sequelize/src/interfaces/users.interface.ts +1 -1
- package/lib/sequelize/src/middlewares/auth.middleware.ts +16 -10
- package/lib/sequelize/src/middlewares/error.middleware.ts +2 -4
- package/lib/sequelize/src/middlewares/validation.middleware.ts +22 -20
- package/lib/sequelize/src/routes/auth.route.ts +8 -11
- package/lib/sequelize/src/routes/users.route.ts +9 -11
- package/lib/sequelize/src/server.ts +6 -7
- package/lib/sequelize/src/services/auth.service.ts +24 -35
- package/lib/sequelize/src/services/users.service.ts +18 -29
- package/lib/sequelize/src/{tests → test}/auth.test.ts +2 -2
- package/lib/sequelize/src/{tests → test}/users.test.ts +2 -2
- package/lib/sequelize/src/utils/validateEnv.ts +1 -3
- package/lib/sequelize/tsconfig.json +2 -2
- package/lib/starter.js +18 -27
- package/lib/typegoose/.env.production.local +1 -1
- package/lib/typegoose/.env.test.local +1 -1
- package/lib/typegoose/.swcrc +1 -1
- package/lib/typegoose/Dockerfile.dev +19 -0
- package/lib/typegoose/Dockerfile.prod +19 -0
- package/lib/typegoose/Makefile +32 -15
- package/lib/typegoose/docker-compose.yml +20 -11
- package/lib/typegoose/jest.config.js +1 -1
- package/lib/typegoose/package.json +41 -39
- package/lib/typegoose/src/app.ts +3 -2
- package/lib/typegoose/src/config/index.ts +2 -1
- package/lib/typegoose/src/controllers/auth.controller.ts +9 -11
- package/lib/typegoose/src/controllers/users.controller.ts +11 -13
- package/lib/typegoose/src/database/index.ts +11 -0
- package/lib/typegoose/src/dtos/users.dto.ts +12 -1
- package/lib/typegoose/src/interfaces/users.interface.ts +1 -1
- package/lib/typegoose/src/middlewares/auth.middleware.ts +16 -10
- package/lib/typegoose/src/middlewares/error.middleware.ts +2 -4
- package/lib/typegoose/src/middlewares/validation.middleware.ts +22 -20
- package/lib/typegoose/src/models/users.model.ts +1 -3
- package/lib/typegoose/src/routes/auth.route.ts +8 -11
- package/lib/typegoose/src/routes/users.route.ts +9 -11
- package/lib/typegoose/src/server.ts +5 -6
- package/lib/typegoose/src/services/auth.service.ts +27 -36
- package/lib/typegoose/src/services/users.service.ts +17 -26
- package/lib/typegoose/src/{tests → test}/auth.test.ts +2 -2
- package/lib/{mongoose/src/tests → typegoose/src/test}/users.test.ts +7 -7
- package/lib/typegoose/src/utils/validateEnv.ts +1 -3
- package/lib/typegoose/tsconfig.json +2 -2
- package/lib/typeorm/.env.development.local +2 -2
- package/lib/typeorm/.env.production.local +3 -3
- package/lib/typeorm/.env.test.local +3 -3
- package/lib/typeorm/.swcrc +1 -1
- package/lib/typeorm/Dockerfile.dev +19 -0
- package/lib/typeorm/Dockerfile.prod +19 -0
- package/lib/typeorm/Makefile +32 -15
- package/lib/typeorm/docker-compose.yml +21 -14
- package/lib/typeorm/jest.config.js +1 -1
- package/lib/typeorm/package.json +42 -41
- package/lib/typeorm/src/app.ts +6 -8
- package/lib/typeorm/src/config/index.ts +2 -1
- package/lib/typeorm/src/controllers/auth.controller.ts +9 -11
- package/lib/typeorm/src/controllers/users.controller.ts +11 -13
- package/lib/{graphql/src/databases → typeorm/src/database}/index.ts +3 -3
- package/lib/typeorm/src/dtos/users.dto.ts +12 -1
- package/lib/typeorm/src/exceptions/httpException.ts +10 -0
- package/lib/typeorm/src/interfaces/users.interface.ts +1 -1
- package/lib/typeorm/src/middlewares/auth.middleware.ts +14 -7
- package/lib/typeorm/src/middlewares/error.middleware.ts +2 -4
- package/lib/typeorm/src/middlewares/validation.middleware.ts +22 -20
- package/lib/typeorm/src/routes/auth.route.ts +8 -11
- package/lib/typeorm/src/routes/users.route.ts +9 -11
- package/lib/typeorm/src/server.ts +6 -7
- package/lib/typeorm/src/services/auth.service.ts +24 -32
- package/lib/typeorm/src/services/users.service.ts +10 -20
- package/lib/typeorm/src/{tests → test}/auth.test.ts +10 -11
- package/lib/typeorm/src/{tests → test}/users.test.ts +34 -38
- package/lib/typeorm/src/utils/validateEnv.ts +1 -3
- package/lib/typeorm/tsconfig.json +2 -2
- package/package.json +3 -3
- package/lib/default/Dockerfile +0 -24
- package/lib/default/src/controllers/index.controller.ts +0 -13
- package/lib/default/src/routes/index.route.ts +0 -19
- package/lib/default/src/utils/util.ts +0 -19
- package/lib/graphql/Dockerfile +0 -24
- package/lib/graphql/src/tests/index.test.ts +0 -18
- package/lib/graphql/src/tests/users.test.ts +0 -71
- package/lib/graphql/src/utils/util.ts +0 -19
- package/lib/knex/Dockerfile +0 -24
- package/lib/knex/src/controllers/index.controller.ts +0 -13
- package/lib/knex/src/databases/migrations/20210713110926_initial.ts +0 -13
- package/lib/knex/src/routes/index.route.ts +0 -19
- package/lib/knex/src/tests/index.test.ts +0 -17
- package/lib/knex/src/utils/util.ts +0 -19
- package/lib/mikro-orm/Dockerfile +0 -24
- package/lib/mikro-orm/src/controllers/index.controller.ts +0 -13
- package/lib/mikro-orm/src/routes/index.route.ts +0 -19
- package/lib/mikro-orm/src/tests/index.test.ts +0 -18
- package/lib/mikro-orm/src/utils/util.ts +0 -19
- package/lib/mongoose/Dockerfile +0 -24
- package/lib/mongoose/src/controllers/index.controller.ts +0 -13
- package/lib/mongoose/src/routes/index.route.ts +0 -19
- package/lib/mongoose/src/utils/util.ts +0 -19
- package/lib/prisma/Dockerfile +0 -24
- package/lib/prisma/src/controllers/index.controller.ts +0 -13
- package/lib/prisma/src/routes/index.route.ts +0 -19
- package/lib/prisma/src/tests/index.test.ts +0 -18
- package/lib/prisma/src/utils/util.ts +0 -19
- package/lib/routing-controllers/Dockerfile +0 -24
- package/lib/routing-controllers/src/controllers/index.controller.ts +0 -9
- package/lib/routing-controllers/src/tests/index.test.ts +0 -17
- package/lib/routing-controllers/src/utils/util.ts +0 -19
- package/lib/sequelize/Dockerfile +0 -28
- package/lib/sequelize/src/controllers/index.controller.ts +0 -13
- package/lib/sequelize/src/routes/index.route.ts +0 -19
- package/lib/sequelize/src/tests/index.test.ts +0 -18
- package/lib/sequelize/src/utils/util.ts +0 -19
- package/lib/typegoose/Dockerfile +0 -24
- package/lib/typegoose/src/controllers/index.controller.ts +0 -13
- package/lib/typegoose/src/databases/index.ts +0 -3
- package/lib/typegoose/src/routes/index.route.ts +0 -19
- package/lib/typegoose/src/tests/index.test.ts +0 -18
- package/lib/typegoose/src/utils/util.ts +0 -19
- package/lib/typeorm/Dockerfile +0 -24
- package/lib/typeorm/src/controllers/index.controller.ts +0 -13
- package/lib/typeorm/src/routes/index.route.ts +0 -19
- package/lib/typeorm/src/tests/index.test.ts +0 -18
- package/lib/typeorm/src/utils/util.ts +0 -19
- package/lib/default/src/exceptions/{HttpException.ts → httpException.ts} +0 -0
- package/lib/graphql/src/exceptions/{HttpException.ts → httpException.ts} +0 -0
- package/lib/knex/src/{databases → database}/migrations/.gitkeep +0 -0
- package/lib/knex/src/{databases → database}/seeds/.gitkeep +0 -0
- package/lib/knex/src/exceptions/{HttpException.ts → httpException.ts} +0 -0
- package/lib/mikro-orm/src/{databases → database}/index.ts +0 -0
- package/lib/mikro-orm/src/exceptions/{HttpException.ts → httpException.ts} +0 -0
- package/lib/mongoose/src/exceptions/{HttpException.ts → httpException.ts} +0 -0
- package/lib/mongoose/src/{tests → test}/auth.test.ts +0 -0
- package/lib/{default/src/tests → mongoose/src/test}/index.test.ts +0 -0
- package/lib/{prisma/src/exceptions/HttpException.ts → node-postgres/src/exceptions/httpException.ts} +0 -0
- package/lib/{sequelize/src/exceptions/HttpException.ts → prisma/src/exceptions/httpException.ts} +0 -0
- package/lib/prisma/src/{tests → test}/auth.test.ts +1 -1
- package/lib/{mongoose/src/tests → prisma/src/test}/index.test.ts +0 -0
- package/lib/prisma/src/{tests → test}/users.test.ts +1 -1
- /package/lib/routing-controllers/src/exceptions/{HttpException.ts → httpException.ts} +0 -0
- /package/lib/sequelize/src/{migrations → database/migrations}/.gitkeep +0 -0
- /package/lib/sequelize/src/{seeders → database/seeders}/.gitkeep +0 -0
- /package/lib/{typegoose/src/exceptions/HttpException.ts → sequelize/src/exceptions/httpException.ts} +0 -0
- /package/lib/{typeorm/src/exceptions/HttpException.ts → typegoose/src/exceptions/httpException.ts} +0 -0
- /package/lib/typeorm/src/{migration → database/migrations}/.gitkeep +0 -0
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Router } from 'express';
|
|
2
|
-
import IndexController from '@controllers/index.controller';
|
|
3
|
-
import { Routes } from '@interfaces/routes.interface';
|
|
4
|
-
|
|
5
|
-
class IndexRoute implements Routes {
|
|
6
|
-
public path = '/';
|
|
7
|
-
public router = Router();
|
|
8
|
-
public indexController = new IndexController();
|
|
9
|
-
|
|
10
|
-
constructor() {
|
|
11
|
-
this.initializeRoutes();
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
private initializeRoutes() {
|
|
15
|
-
this.router.get(`${this.path}`, this.indexController.index);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default IndexRoute;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import request from 'supertest';
|
|
2
|
-
import App from '../app';
|
|
3
|
-
import IndexRoute from '../routes/index.route';
|
|
4
|
-
|
|
5
|
-
afterAll(async () => {
|
|
6
|
-
await new Promise<void>(resolve => setTimeout(() => resolve(), 500));
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
describe('Testing Index', () => {
|
|
10
|
-
describe('[GET] /', () => {
|
|
11
|
-
it('response statusCode 200', () => {
|
|
12
|
-
const indexRoute = new IndexRoute();
|
|
13
|
-
const app = new App([indexRoute]);
|
|
14
|
-
|
|
15
|
-
return request(app.getServer()).get(`${indexRoute.path}`).expect(200);
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @method isEmpty
|
|
3
|
-
* @param {String | Number | Object} value
|
|
4
|
-
* @returns {Boolean} true & false
|
|
5
|
-
* @description this value is Empty Check
|
|
6
|
-
*/
|
|
7
|
-
export const isEmpty = (value: string | number | object): boolean => {
|
|
8
|
-
if (value === null) {
|
|
9
|
-
return true;
|
|
10
|
-
} else if (typeof value !== 'number' && value === '') {
|
|
11
|
-
return true;
|
|
12
|
-
} else if (typeof value === 'undefined' || value === undefined) {
|
|
13
|
-
return true;
|
|
14
|
-
} else if (value !== null && typeof value === 'object' && !Object.keys(value).length) {
|
|
15
|
-
return true;
|
|
16
|
-
} else {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
};
|
package/lib/mongoose/Dockerfile
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Common build stage
|
|
2
|
-
FROM node:14.14.0-alpine3.12 as common-build-stage
|
|
3
|
-
|
|
4
|
-
COPY . ./app
|
|
5
|
-
|
|
6
|
-
WORKDIR /app
|
|
7
|
-
|
|
8
|
-
RUN npm install
|
|
9
|
-
|
|
10
|
-
EXPOSE 3000
|
|
11
|
-
|
|
12
|
-
# Development build stage
|
|
13
|
-
FROM common-build-stage as development-build-stage
|
|
14
|
-
|
|
15
|
-
ENV NODE_ENV development
|
|
16
|
-
|
|
17
|
-
CMD ["npm", "run", "dev"]
|
|
18
|
-
|
|
19
|
-
# Production build stage
|
|
20
|
-
FROM common-build-stage as production-build-stage
|
|
21
|
-
|
|
22
|
-
ENV NODE_ENV production
|
|
23
|
-
|
|
24
|
-
CMD ["npm", "run", "start"]
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { NextFunction, Request, Response } from 'express';
|
|
2
|
-
|
|
3
|
-
class IndexController {
|
|
4
|
-
public index = (req: Request, res: Response, next: NextFunction) => {
|
|
5
|
-
try {
|
|
6
|
-
res.sendStatus(200);
|
|
7
|
-
} catch (error) {
|
|
8
|
-
next(error);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default IndexController;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Router } from 'express';
|
|
2
|
-
import IndexController from '@controllers/index.controller';
|
|
3
|
-
import { Routes } from '@interfaces/routes.interface';
|
|
4
|
-
|
|
5
|
-
class IndexRoute implements Routes {
|
|
6
|
-
public path = '/';
|
|
7
|
-
public router = Router();
|
|
8
|
-
public indexController = new IndexController();
|
|
9
|
-
|
|
10
|
-
constructor() {
|
|
11
|
-
this.initializeRoutes();
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
private initializeRoutes() {
|
|
15
|
-
this.router.get(`${this.path}`, this.indexController.index);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default IndexRoute;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @method isEmpty
|
|
3
|
-
* @param {String | Number | Object} value
|
|
4
|
-
* @returns {Boolean} true & false
|
|
5
|
-
* @description this value is Empty Check
|
|
6
|
-
*/
|
|
7
|
-
export const isEmpty = (value: string | number | object): boolean => {
|
|
8
|
-
if (value === null) {
|
|
9
|
-
return true;
|
|
10
|
-
} else if (typeof value !== 'number' && value === '') {
|
|
11
|
-
return true;
|
|
12
|
-
} else if (typeof value === 'undefined' || value === undefined) {
|
|
13
|
-
return true;
|
|
14
|
-
} else if (value !== null && typeof value === 'object' && !Object.keys(value).length) {
|
|
15
|
-
return true;
|
|
16
|
-
} else {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
};
|
package/lib/prisma/Dockerfile
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Common build stage
|
|
2
|
-
FROM node:14.14.0-alpine3.12 as common-build-stage
|
|
3
|
-
|
|
4
|
-
COPY . ./app
|
|
5
|
-
|
|
6
|
-
WORKDIR /app
|
|
7
|
-
|
|
8
|
-
RUN npm install
|
|
9
|
-
|
|
10
|
-
EXPOSE 3000
|
|
11
|
-
|
|
12
|
-
# Development build stage
|
|
13
|
-
FROM common-build-stage as development-build-stage
|
|
14
|
-
|
|
15
|
-
ENV NODE_ENV development
|
|
16
|
-
|
|
17
|
-
CMD ["npm", "run", "dev"]
|
|
18
|
-
|
|
19
|
-
# Production build stage
|
|
20
|
-
FROM common-build-stage as production-build-stage
|
|
21
|
-
|
|
22
|
-
ENV NODE_ENV production
|
|
23
|
-
|
|
24
|
-
CMD ["npm", "run", "start"]
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { NextFunction, Request, Response } from 'express';
|
|
2
|
-
|
|
3
|
-
class IndexController {
|
|
4
|
-
public index = (req: Request, res: Response, next: NextFunction): void => {
|
|
5
|
-
try {
|
|
6
|
-
res.sendStatus(200);
|
|
7
|
-
} catch (error) {
|
|
8
|
-
next(error);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default IndexController;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Router } from 'express';
|
|
2
|
-
import IndexController from '@controllers/index.controller';
|
|
3
|
-
import { Routes } from '@interfaces/routes.interface';
|
|
4
|
-
|
|
5
|
-
class IndexRoute implements Routes {
|
|
6
|
-
public path = '/';
|
|
7
|
-
public router = Router();
|
|
8
|
-
public indexController = new IndexController();
|
|
9
|
-
|
|
10
|
-
constructor() {
|
|
11
|
-
this.initializeRoutes();
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
private initializeRoutes() {
|
|
15
|
-
this.router.get(`${this.path}`, this.indexController.index);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default IndexRoute;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import request from 'supertest';
|
|
2
|
-
import App from '@/app';
|
|
3
|
-
import IndexRoute from '@routes/index.route';
|
|
4
|
-
|
|
5
|
-
afterAll(async () => {
|
|
6
|
-
await new Promise<void>(resolve => setTimeout(() => resolve(), 500));
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
describe('Testing Index', () => {
|
|
10
|
-
describe('[GET] /', () => {
|
|
11
|
-
it('response statusCode 200', () => {
|
|
12
|
-
const indexRoute = new IndexRoute();
|
|
13
|
-
const app = new App([indexRoute]);
|
|
14
|
-
|
|
15
|
-
return request(app.getServer()).get(`${indexRoute.path}`).expect(200);
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @method isEmpty
|
|
3
|
-
* @param {String | Number | Object} value
|
|
4
|
-
* @returns {Boolean} true & false
|
|
5
|
-
* @description this value is Empty Check
|
|
6
|
-
*/
|
|
7
|
-
export const isEmpty = (value: string | number | object): boolean => {
|
|
8
|
-
if (value === null) {
|
|
9
|
-
return true;
|
|
10
|
-
} else if (typeof value !== 'number' && value === '') {
|
|
11
|
-
return true;
|
|
12
|
-
} else if (typeof value === 'undefined' || value === undefined) {
|
|
13
|
-
return true;
|
|
14
|
-
} else if (value !== null && typeof value === 'object' && !Object.keys(value).length) {
|
|
15
|
-
return true;
|
|
16
|
-
} else {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Common build stage
|
|
2
|
-
FROM node:14.14.0-alpine3.12 as common-build-stage
|
|
3
|
-
|
|
4
|
-
COPY . ./app
|
|
5
|
-
|
|
6
|
-
WORKDIR /app
|
|
7
|
-
|
|
8
|
-
RUN npm install
|
|
9
|
-
|
|
10
|
-
EXPOSE 3000
|
|
11
|
-
|
|
12
|
-
# Development build stage
|
|
13
|
-
FROM common-build-stage as development-build-stage
|
|
14
|
-
|
|
15
|
-
ENV NODE_ENV development
|
|
16
|
-
|
|
17
|
-
CMD ["npm", "run", "dev"]
|
|
18
|
-
|
|
19
|
-
# Production build stage
|
|
20
|
-
FROM common-build-stage as production-build-stage
|
|
21
|
-
|
|
22
|
-
ENV NODE_ENV production
|
|
23
|
-
|
|
24
|
-
CMD ["npm", "run", "start"]
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import request from 'supertest';
|
|
2
|
-
import App from '@/app';
|
|
3
|
-
import { IndexController } from '@controllers/index.controller';
|
|
4
|
-
|
|
5
|
-
afterAll(async () => {
|
|
6
|
-
await new Promise<void>(resolve => setTimeout(() => resolve(), 500));
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
describe('Testing Index', () => {
|
|
10
|
-
describe('[GET] /', () => {
|
|
11
|
-
it('response statusCode 200', () => {
|
|
12
|
-
const app = new App([IndexController]);
|
|
13
|
-
|
|
14
|
-
return request(app.getServer()).get('/').expect(200);
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @method isEmpty
|
|
3
|
-
* @param {String | Number | Object} value
|
|
4
|
-
* @returns {Boolean} true & false
|
|
5
|
-
* @description this value is Empty Check
|
|
6
|
-
*/
|
|
7
|
-
export const isEmpty = (value: string | number | object): boolean => {
|
|
8
|
-
if (value === null) {
|
|
9
|
-
return true;
|
|
10
|
-
} else if (typeof value !== 'number' && value === '') {
|
|
11
|
-
return true;
|
|
12
|
-
} else if (typeof value === 'undefined' || value === undefined) {
|
|
13
|
-
return true;
|
|
14
|
-
} else if (value !== null && typeof value === 'object' && !Object.keys(value).length) {
|
|
15
|
-
return true;
|
|
16
|
-
} else {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
};
|
package/lib/sequelize/Dockerfile
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Common build stage
|
|
2
|
-
FROM node:14.14.0-alpine3.12 as common-build-stage
|
|
3
|
-
|
|
4
|
-
COPY . ./app
|
|
5
|
-
|
|
6
|
-
WORKDIR /app
|
|
7
|
-
|
|
8
|
-
RUN npm install
|
|
9
|
-
|
|
10
|
-
EXPOSE 3000
|
|
11
|
-
|
|
12
|
-
# Development build stage
|
|
13
|
-
FROM common-build-stage as development-build-stage
|
|
14
|
-
|
|
15
|
-
RUN chmod +x /app/docker-entrypoint.sh
|
|
16
|
-
|
|
17
|
-
ENTRYPOINT [ "docker-entrypoint.sh" ]
|
|
18
|
-
|
|
19
|
-
ENV NODE_ENV development
|
|
20
|
-
|
|
21
|
-
CMD ["npm", "run", "dev"]
|
|
22
|
-
|
|
23
|
-
# Production build stage
|
|
24
|
-
FROM common-build-stage as production-build-stage
|
|
25
|
-
|
|
26
|
-
ENV NODE_ENV production
|
|
27
|
-
|
|
28
|
-
CMD ["npm", "run", "start"]
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { NextFunction, Request, Response } from 'express';
|
|
2
|
-
|
|
3
|
-
class IndexController {
|
|
4
|
-
public index = (req: Request, res: Response, next: NextFunction) => {
|
|
5
|
-
try {
|
|
6
|
-
res.sendStatus(200);
|
|
7
|
-
} catch (error) {
|
|
8
|
-
next(error);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default IndexController;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Router } from 'express';
|
|
2
|
-
import IndexController from '@controllers/index.controller';
|
|
3
|
-
import { Routes } from '@interfaces/routes.interface';
|
|
4
|
-
|
|
5
|
-
class IndexRoute implements Routes {
|
|
6
|
-
public path = '/';
|
|
7
|
-
public router = Router();
|
|
8
|
-
public indexController = new IndexController();
|
|
9
|
-
|
|
10
|
-
constructor() {
|
|
11
|
-
this.initializeRoutes();
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
private initializeRoutes() {
|
|
15
|
-
this.router.get(`${this.path}`, this.indexController.index);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default IndexRoute;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import request from 'supertest';
|
|
2
|
-
import App from '@/app';
|
|
3
|
-
import IndexRoute from '@routes/index.route';
|
|
4
|
-
|
|
5
|
-
afterAll(async () => {
|
|
6
|
-
await new Promise<void>(resolve => setTimeout(() => resolve(), 500));
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
describe('Testing Index', () => {
|
|
10
|
-
describe('[GET] /', () => {
|
|
11
|
-
it('response statusCode 200', () => {
|
|
12
|
-
const indexRoute = new IndexRoute();
|
|
13
|
-
|
|
14
|
-
const app = new App([indexRoute]);
|
|
15
|
-
return request(app.getServer()).get(`${indexRoute.path}`).expect(200);
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @method isEmpty
|
|
3
|
-
* @param {String | Number | Object} value
|
|
4
|
-
* @returns {Boolean} true & false
|
|
5
|
-
* @description this value is Empty Check
|
|
6
|
-
*/
|
|
7
|
-
export const isEmpty = (value: string | number | object): boolean => {
|
|
8
|
-
if (value === null) {
|
|
9
|
-
return true;
|
|
10
|
-
} else if (typeof value !== 'number' && value === '') {
|
|
11
|
-
return true;
|
|
12
|
-
} else if (typeof value === 'undefined' || value === undefined) {
|
|
13
|
-
return true;
|
|
14
|
-
} else if (value !== null && typeof value === 'object' && !Object.keys(value).length) {
|
|
15
|
-
return true;
|
|
16
|
-
} else {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
};
|
package/lib/typegoose/Dockerfile
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Common build stage
|
|
2
|
-
FROM node:14.14.0-alpine3.12 as common-build-stage
|
|
3
|
-
|
|
4
|
-
COPY . ./app
|
|
5
|
-
|
|
6
|
-
WORKDIR /app
|
|
7
|
-
|
|
8
|
-
RUN npm install
|
|
9
|
-
|
|
10
|
-
EXPOSE 3000
|
|
11
|
-
|
|
12
|
-
# Development build stage
|
|
13
|
-
FROM common-build-stage as development-build-stage
|
|
14
|
-
|
|
15
|
-
ENV NODE_ENV development
|
|
16
|
-
|
|
17
|
-
CMD ["npm", "run", "dev"]
|
|
18
|
-
|
|
19
|
-
# Production build stage
|
|
20
|
-
FROM common-build-stage as production-build-stage
|
|
21
|
-
|
|
22
|
-
ENV NODE_ENV production
|
|
23
|
-
|
|
24
|
-
CMD ["npm", "run", "start"]
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { NextFunction, Request, Response } from 'express';
|
|
2
|
-
|
|
3
|
-
class IndexController {
|
|
4
|
-
public index = (req: Request, res: Response, next: NextFunction) => {
|
|
5
|
-
try {
|
|
6
|
-
res.sendStatus(200);
|
|
7
|
-
} catch (error) {
|
|
8
|
-
next(error);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default IndexController;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Router } from 'express';
|
|
2
|
-
import IndexController from '@controllers/index.controller';
|
|
3
|
-
import { Routes } from '@interfaces/routes.interface';
|
|
4
|
-
|
|
5
|
-
class IndexRoute implements Routes {
|
|
6
|
-
public path = '/';
|
|
7
|
-
public router = Router();
|
|
8
|
-
public indexController = new IndexController();
|
|
9
|
-
|
|
10
|
-
constructor() {
|
|
11
|
-
this.initializeRoutes();
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
private initializeRoutes() {
|
|
15
|
-
this.router.get(`${this.path}`, this.indexController.index);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default IndexRoute;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import request from 'supertest';
|
|
2
|
-
import App from '@/app';
|
|
3
|
-
import IndexRoute from '@routes/index.route';
|
|
4
|
-
|
|
5
|
-
afterAll(async () => {
|
|
6
|
-
await new Promise<void>(resolve => setTimeout(() => resolve(), 500));
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
describe('Testing Index', () => {
|
|
10
|
-
describe('[GET] /', () => {
|
|
11
|
-
it('response statusCode 200', () => {
|
|
12
|
-
const indexRoute = new IndexRoute();
|
|
13
|
-
const app = new App([indexRoute]);
|
|
14
|
-
|
|
15
|
-
return request(app.getServer()).get(`${indexRoute.path}`).expect(200);
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @method isEmpty
|
|
3
|
-
* @param {String | Number | Object} value
|
|
4
|
-
* @returns {Boolean} true & false
|
|
5
|
-
* @description this value is Empty Check
|
|
6
|
-
*/
|
|
7
|
-
export const isEmpty = (value: string | number | object): boolean => {
|
|
8
|
-
if (value === null) {
|
|
9
|
-
return true;
|
|
10
|
-
} else if (typeof value !== 'number' && value === '') {
|
|
11
|
-
return true;
|
|
12
|
-
} else if (typeof value === 'undefined' || value === undefined) {
|
|
13
|
-
return true;
|
|
14
|
-
} else if (value !== null && typeof value === 'object' && !Object.keys(value).length) {
|
|
15
|
-
return true;
|
|
16
|
-
} else {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
};
|
package/lib/typeorm/Dockerfile
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Common build stage
|
|
2
|
-
FROM node:14.14.0-alpine3.12 as common-build-stage
|
|
3
|
-
|
|
4
|
-
COPY . ./app
|
|
5
|
-
|
|
6
|
-
WORKDIR /app
|
|
7
|
-
|
|
8
|
-
RUN npm install
|
|
9
|
-
|
|
10
|
-
EXPOSE 3000
|
|
11
|
-
|
|
12
|
-
# Development build stage
|
|
13
|
-
FROM common-build-stage as development-build-stage
|
|
14
|
-
|
|
15
|
-
ENV NODE_ENV development
|
|
16
|
-
|
|
17
|
-
CMD ["npm", "run", "dev"]
|
|
18
|
-
|
|
19
|
-
# Production build stage
|
|
20
|
-
FROM common-build-stage as production-build-stage
|
|
21
|
-
|
|
22
|
-
ENV NODE_ENV production
|
|
23
|
-
|
|
24
|
-
CMD ["npm", "run", "start"]
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { NextFunction, Request, Response } from 'express';
|
|
2
|
-
|
|
3
|
-
class IndexController {
|
|
4
|
-
public index = (req: Request, res: Response, next: NextFunction): void => {
|
|
5
|
-
try {
|
|
6
|
-
res.sendStatus(200);
|
|
7
|
-
} catch (error) {
|
|
8
|
-
next(error);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default IndexController;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Router } from 'express';
|
|
2
|
-
import IndexController from '@controllers/index.controller';
|
|
3
|
-
import { Routes } from '@interfaces/routes.interface';
|
|
4
|
-
|
|
5
|
-
class IndexRoute implements Routes {
|
|
6
|
-
public path = '/';
|
|
7
|
-
public router = Router();
|
|
8
|
-
public indexController = new IndexController();
|
|
9
|
-
|
|
10
|
-
constructor() {
|
|
11
|
-
this.initializeRoutes();
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
private initializeRoutes() {
|
|
15
|
-
this.router.get(`${this.path}`, this.indexController.index);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default IndexRoute;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import request from 'supertest';
|
|
2
|
-
import App from '@/app';
|
|
3
|
-
import IndexRoute from '@routes/index.route';
|
|
4
|
-
|
|
5
|
-
afterAll(async () => {
|
|
6
|
-
await new Promise<void>(resolve => setTimeout(() => resolve(), 500));
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
describe('Testing Index', () => {
|
|
10
|
-
describe('[GET] /', () => {
|
|
11
|
-
it('response statusCode 200', () => {
|
|
12
|
-
const indexRoute = new IndexRoute();
|
|
13
|
-
const app = new App([indexRoute]);
|
|
14
|
-
|
|
15
|
-
return request(app.getServer()).get(`${indexRoute.path}`).expect(200);
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @method isEmpty
|
|
3
|
-
* @param {String | Number | Object} value
|
|
4
|
-
* @returns {Boolean} true & false
|
|
5
|
-
* @description this value is Empty Check
|
|
6
|
-
*/
|
|
7
|
-
export const isEmpty = (value: string | number | object): boolean => {
|
|
8
|
-
if (value === null) {
|
|
9
|
-
return true;
|
|
10
|
-
} else if (typeof value !== 'number' && value === '') {
|
|
11
|
-
return true;
|
|
12
|
-
} else if (typeof value === 'undefined' || value === undefined) {
|
|
13
|
-
return true;
|
|
14
|
-
} else if (value !== null && typeof value === 'object' && !Object.keys(value).length) {
|
|
15
|
-
return true;
|
|
16
|
-
} else {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/{prisma/src/exceptions/HttpException.ts → node-postgres/src/exceptions/httpException.ts}
RENAMED
|
File without changes
|
package/lib/{sequelize/src/exceptions/HttpException.ts → prisma/src/exceptions/httpException.ts}
RENAMED
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { User } from '@prisma/client';
|
|
1
2
|
import bcrypt from 'bcrypt';
|
|
2
3
|
import request from 'supertest';
|
|
3
|
-
import { User } from '@prisma/client';
|
|
4
4
|
import App from '@/app';
|
|
5
5
|
import { CreateUserDto } from '@dtos/users.dto';
|
|
6
6
|
import AuthRoute from '@routes/auth.route';
|
|
File without changes
|