{"_id":"@drdgvhbh/nestjs-admin","_rev":"2-bc680f4b7c4cd2ff35578b9a61e9da68","name":"@drdgvhbh/nestjs-admin","dist-tags":{"latest":"0.4.0-1"},"versions":{"0.4.0-0":{"name":"@drdgvhbh/nestjs-admin","version":"0.4.0-0","license":"MIT","author":{"name":"William Duclot"},"repository":{"type":"git","url":"git+https://github.com/Theodo-UK/nestjs-admin.git"},"main":"dist/src/index.js","types":"dist/src/index.d.ts","bin":{"nestjs-admin":"dist/bin/cli.js"},"scripts":{"start:dev":"tsc-watch --onSuccess \"ln -sfn ../../src/public dist/src/public\" --onFailure \"echo 'There was a problem compiling'\"","prepublishOnly":"yarn build","build":"rimraf dist && tsc -p tsconfig.build.json","postbuild":"cp -r src/public dist/src/public","jest":". ./.env.test && node_modules/.bin/jest","test:unit":"yarn jest --maxWorkers=4","test:lint":"tslint -p tsconfig.json -c tslint.json","test:type":"tsc --noEmit","test:debug":"node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest","test:schema:sync":". ./.env.test && ts-node node_modules/.bin/typeorm schema:sync","test:schema:drop":". ./.env.test && ts-node node_modules/.bin/typeorm schema:drop","test":"yarn test:lint && yarn test:type && yarn test:unit"},"peerDependencies":{"@nestjs/common":"^6.0.0","@nestjs/core":"^6.0.0","@nestjs/platform-express":"^6.0.0","@nestjs/typeorm":"^6.0.0","typeorm":"^0.2.12"},"dependencies":{"@nestjs/passport":"^6.1.0","bcryptjs":"^2.4.3","bootstrap":"^4.3.1","commander":"^3.0.1","connect-flash":"^0.1.1","express-session":"^1.16.2","inquirer":"^7.0.0","lodash":"^4.17.15","nunjucks":"^3.2.0","nunjucks-date-filter":"^0.1.1","passport":"^0.4.0","passport-local":"^1.0.0"},"devDependencies":{"@nestjs/cli":"^6.10.1","@nestjs/common":"^6.0.0","@nestjs/core":"^6.0.0","@nestjs/platform-express":"^6.6.7","@nestjs/testing":"^6.6.7","@nestjs/typeorm":"^6.0.0","@types/bcryptjs":"^2.4.2","@types/connect-flash":"^0.0.35","@types/express":"^4.17.1","@types/express-session":"^1.15.14","@types/faker":"^4.1.5","@types/inquirer":"^6.5.0","@types/jest":"^24.0.18","@types/jsdom":"^12.2.4","@types/lodash":"^4.14.139","@types/node":"11.13.4","@types/nunjucks":"^3.1.1","@types/passport":"^1.0.1","@types/passport-local":"^1.0.33","@types/supertest":"^2.0.8","dotenv-safe":"^8.1.0","faker":"^4.1.0","jest":"^24.9.0","jest-cli":"^24.9.0","jsdom":"^15.1.1","mysql":"^2.17.1","pg":"^7.12.1","reflect-metadata":"^0.1.12","rimraf":"^3.0.0","rxjs":"^6.0.0","supertest":"^4.0.2","ts-jest":"^24.0.2","ts-node":"8.1.0","tsc-watch":"2.2.1","tslint":"^5.20.0","typeorm":"^0.2.19","typescript":"3.5.1"},"jest":{"moduleFileExtensions":["js","json","ts"],"rootDir":".","testRegex":"(src|test)/.*.(spec|test|int).ts$","transform":{"^.+\\.ts$":"ts-jest"},"testEnvironment":"node","modulePathIgnorePatterns":["exampleApp"]},"gitHead":"9229f63d4392d27f38d2467d6edf5575c23e4f72","description":"![NestJS Admin](./docs/assets/nestjs-admin-logo.png)","bugs":{"url":"https://github.com/Theodo-UK/nestjs-admin/issues"},"homepage":"https://github.com/Theodo-UK/nestjs-admin#readme","_id":"@drdgvhbh/nestjs-admin@0.4.0-0","_nodeVersion":"13.5.0","_npmVersion":"6.13.7","dist":{"integrity":"sha512-nKxNkfgRLU//976l77DZrXuXw4TIh/k994281uLq4DrNfagr686iHK2kxX/XiNWKVPnzRD6Zkpb2wRnEKDrIsA==","shasum":"26c823d2bb8d7859924e9c6c416390a72624782b","tarball":"https://registry.npmjs.org/@drdgvhbh/nestjs-admin/-/nestjs-admin-0.4.0-0.tgz","fileCount":194,"unpackedSize":188882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefTKSCRA9TVsSAnZWagAA5GAP/A6se8s7ymUyukIkpOcy\nP8TSxjDuG/2lKlljKAG9ZtDtrK3VGKVip+dDGhgFt0egOBFizm0/V4yzpIGe\nernUADXnxcdwI9dUkMvNRSJ+5K10yRwazGlHLicMlhUFlMJESZk5BvMQ3vDU\n5JTRwr7NFjxjFNZ84PCa+/LgPSdpXVeG429lDUCesO7F3Ue7YgOmvyEtIznU\nG9lluOEQYlpNdzuFFQxjIm0ktbAM1qNnnKZeXmx3WD/o69CurlDLkw5DvDSd\nL0lsop6gCwZB5GEUDDZnTZ1ojzi+4CJh11FOiTbBiByBjeCNjcjHdkLRgKmO\npOb8b29fkw1I2lH7dTEapFiPsO+TKRYBSq9QsGEhgrQJKzXmNPToL4KrIWug\nmQsCHxcmGL6FPMMyyFj1r2p3JEEQ2nb6zant6J2ch96zMNkDLMnRttlfgDRN\nCOk+ymzOqX2U2JCVEJ62S/aY3Vypw1r1NNbHvBqBg2q4BT6t9oVzA3O3GpQA\nEDoSszi4T6vJ9no0VjS1MVgvXK6okKE9SjCS+z6uJpFBYsOKAjQD6UY0x4RW\n6Q+Qju8I17JDcrqk2ze2nR1XzRMd8I0gnQeLI7ulSK/m1s6J2HFud/Siiyc+\nU+Z0z05xY0viMOtyDAzBTJAfJpJ/NNDMhVFk99i512c//zt/OL0FMONWCuFQ\nncTh\r\n=3KjC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMJjiadxIGis6+7uowk4l52kGhwK9z1QWBkS+YaTKtcgIhAIfEQcon4spvEgxk3dnmLRmt0T0A9BB6zoYFhDbA0Ms+"}]},"maintainers":[{"name":"drdgvhbh","email":"drdgvhbh@gmail.com"}],"_npmUser":{"name":"drdgvhbh","email":"drdgvhbh@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-admin_0.4.0-0_1585263250175_0.2762783288444206"},"_hasShrinkwrap":false},"0.4.0-1":{"name":"@drdgvhbh/nestjs-admin","version":"0.4.0-1","license":"MIT","author":{"name":"William Duclot"},"repository":{"type":"git","url":"git+https://github.com/Theodo-UK/nestjs-admin.git"},"main":"dist/src/index.js","types":"dist/src/index.d.ts","bin":{"nestjs-admin":"dist/bin/cli.js"},"scripts":{"start:dev":"tsc-watch --onSuccess \"ln -sfn ../../src/public dist/src/public\" --onFailure \"echo 'There was a problem compiling'\"","prepublishOnly":"yarn build","build":"rimraf dist && tsc -p tsconfig.build.json","postbuild":"cp -r src/public dist/src/public","jest":". ./.env.test && node_modules/.bin/jest","test:unit":"yarn jest --maxWorkers=4","test:lint":"tslint -p tsconfig.json -c tslint.json","test:type":"tsc --noEmit","test:debug":"node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest","test:schema:sync":". ./.env.test && ts-node node_modules/.bin/typeorm schema:sync","test:schema:drop":". ./.env.test && ts-node node_modules/.bin/typeorm schema:drop","test":"yarn test:lint && yarn test:type && yarn test:unit"},"peerDependencies":{"@nestjs/common":"^6.0.0","@nestjs/core":"^6.0.0","@nestjs/platform-express":"^6.0.0","@nestjs/typeorm":"^6.0.0","typeorm":"^0.2.12"},"dependencies":{"@nestjs/passport":"^6.1.0","bcryptjs":"^2.4.3","bootstrap":"^4.3.1","commander":"^3.0.1","connect-flash":"^0.1.1","express-session":"^1.16.2","inquirer":"^7.0.0","lodash":"^4.17.15","nunjucks":"^3.2.0","nunjucks-date-filter":"^0.1.1","passport":"^0.4.0","passport-local":"^1.0.0"},"devDependencies":{"@nestjs/cli":"^6.10.1","@nestjs/common":"^6.0.0","@nestjs/core":"^6.0.0","@nestjs/platform-express":"^6.6.7","@nestjs/testing":"^6.6.7","@nestjs/typeorm":"^6.0.0","@types/bcryptjs":"^2.4.2","@types/connect-flash":"^0.0.35","@types/express":"^4.17.1","@types/express-session":"^1.15.14","@types/faker":"^4.1.5","@types/inquirer":"^6.5.0","@types/jest":"^24.0.18","@types/jsdom":"^12.2.4","@types/lodash":"^4.14.139","@types/node":"11.13.4","@types/nunjucks":"^3.1.1","@types/passport":"^1.0.1","@types/passport-local":"^1.0.33","@types/supertest":"^2.0.8","dotenv-safe":"^8.1.0","faker":"^4.1.0","jest":"^24.9.0","jest-cli":"^24.9.0","jsdom":"^15.1.1","mysql":"^2.17.1","pg":"^7.12.1","reflect-metadata":"^0.1.12","rimraf":"^3.0.0","rxjs":"^6.0.0","supertest":"^4.0.2","ts-jest":"^24.0.2","ts-node":"8.1.0","tsc-watch":"2.2.1","tslint":"^5.20.0","typeorm":"^0.2.19","typescript":"3.5.1"},"jest":{"moduleFileExtensions":["js","json","ts"],"rootDir":".","testRegex":"(src|test)/.*.(spec|test|int).ts$","transform":{"^.+\\.ts$":"ts-jest"},"testEnvironment":"node","modulePathIgnorePatterns":["exampleApp"]},"gitHead":"9229f63d4392d27f38d2467d6edf5575c23e4f72","description":"![NestJS Admin](./docs/assets/nestjs-admin-logo.png)","bugs":{"url":"https://github.com/Theodo-UK/nestjs-admin/issues"},"homepage":"https://github.com/Theodo-UK/nestjs-admin#readme","_id":"@drdgvhbh/nestjs-admin@0.4.0-1","_nodeVersion":"13.5.0","_npmVersion":"6.13.7","dist":{"integrity":"sha512-3U9CiH8wP9KZUuZtI8xz2vM3dMgGgABBn51os+h7N9FoJ5rYy7TqATLhB3fFDPKGug0Bnvmvs2U9rq5QJYOHtw==","shasum":"8cd0c30136bc0acbd6c0a9360ef2d6fb3f4f6fd1","tarball":"https://registry.npmjs.org/@drdgvhbh/nestjs-admin/-/nestjs-admin-0.4.0-1.tgz","fileCount":194,"unpackedSize":188773,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefTRNCRA9TVsSAnZWagAAj3sQAJHP4IJ+pqPc/4GvO6Nl\nzUOAQRF/l3vnU6DniUgkVkJevXXTd8dMfVxBYtV/TpnjcVcmBulpG23Yzf93\n54Gpux/3PQRlKA3E/ZWCTtANIpqXTn0gjmU01eqtI5jAu+HkEM9gk5Bnst3z\nRnahrgsxHMDIGoDtUlq/DgDwhh9AQ+MVmnNfaW6/jOgbGdpuVQ0wb1xcwNox\n3KwgAEQItOzsdVaEqdg+On+kHtSRn06HTUvs22rPtn26xG6Y7SqzdupGWHSd\nr2vzsXouEILWZsnXVhTkg77D1qVMyqoiduChkIrtDDjzqGAac/BU9iTGAGlZ\ntMuV2bWTB9cjKI36JNSI3RhB7sEQMyZWrpgo5TM7Myvejma7SlkpGJ/g6ox4\nXSBa+JcCZDJEg29vErjtIrm/kXbjYNcGB3jbSRLML2rEAAWDAw46HWg6N5E6\nzJCqyxt2Kdy13HXnqjHjisU3S0oditpMbqMhDFvishdNGVZSLb9uY4C9be7K\ngvfvphhDtC5H0UoN03tlA1oQ+JxksW+TLEjNFa2QeFYHDrI0/SNCU+4QY2mj\n+89s/6T6Ohe+kp+Db5FiLA2ncrq564+g9uh6Fdm3ZVO3drayTU/xoBeOsuvr\nKYSxq+UNDKf6UkksQ9qQuG7WI9qdbpbzRHSyQkNkm46egOQttIHPi/drh7d/\ntIqE\r\n=E4ta\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCHz1LQg5USLpqlZVNyU6BYDPEIxMOQEhsOnyUGefLNqACIQDPaElzR5kuUVhGlU2X/fGbbcVWnmz7njyVxCtS5ZyClA=="}]},"maintainers":[{"name":"drdgvhbh","email":"drdgvhbh@gmail.com"}],"_npmUser":{"name":"drdgvhbh","email":"drdgvhbh@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nestjs-admin_0.4.0-1_1585263692823_0.8099483268474259"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-26T22:54:09.940Z","0.4.0-0":"2020-03-26T22:54:10.345Z","modified":"2022-04-05T05:37:13.336Z","0.4.0-1":"2020-03-26T23:01:33.489Z"},"maintainers":[{"name":"drdgvhbh","email":"drdgvhbh@gmail.com"}],"description":"![NestJS Admin](./docs/assets/nestjs-admin-logo.png)","homepage":"https://github.com/Theodo-UK/nestjs-admin#readme","repository":{"type":"git","url":"git+https://github.com/Theodo-UK/nestjs-admin.git"},"author":{"name":"William Duclot"},"bugs":{"url":"https://github.com/Theodo-UK/nestjs-admin/issues"},"license":"MIT","readme":"![NestJS Admin](./docs/assets/nestjs-admin-logo.png)\n\n<h3 align=\"center\">\n  A generic administration interface for TypeORM entities\n</h3>\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/nestjs-admin\">\n    <img src=\"https://img.shields.io/npm/v/nestjs-admin.svg\" alt=\"NPM Version\" />\n  </a>\n</p>\n\n<div>\n  <div align=\"center\">\n    <em>Proudly sponsored by <a href=\"https://www.theodo.co.uk/experts/node-js-fullstack-javascript\">Theodo</a></em>\n  </div>\n  <div align=\"center\">\n    <a href=\"https://www.theodo.co.uk/experts/node-js-fullstack-javascript\">\n      <img src=\"./docs/assets/theodo.svg\" width=\"120rem\" alt=\"Theodo logo\" />\n    </a>\n  </div>\n</div>\n\n<br />\n\n---\n\n## Description\n\nReady-to-use user interface for administrative activities. Allows to list, edit, create, delete entities.\n\nThis is heavily, heavily inspired by [Django admin](https://djangobook.com/mdj2-django-admin/), from the concept to the API.\n\n> This is still very much a work in progress.\n> Your help is more than welcome!\n\n**Full docs: https://nestjs-admin.com/**\n\n|              |   |\n:-------------------------:|:-------------------------:\n![](docs/assets/screenshot-list.png)  |  ![](docs/assets/screenshot-form.png)\n_All your entities in one place._  |  _Create, update and delete entities with ease._\n\n\n## Installation\n\nLet's get you started with a minimal setup.\n\n1. **Add nestjs-admin to your dependencies:**\n\n```bash\nyarn add nestjs-admin # With yarn\nnpm install nestjs-admin # With NPM\n```\n\n2. **Then add the provided `DefaultAdminModule` to your app modules:**\n\n```ts\n// src/app.module.ts\nimport { Module } from '@nestjs/common'\nimport { DefaultAdminModule } from 'nestjs-admin'\n\n@Module({\n  imports: [TypeOrmModule.forRoot(), /* ... */, DefaultAdminModule],\n  /* ... */,\n})\nexport class AppModule {\n  /* ... */\n}\n```\n\n3. **Add the provided `AdminUser` to your orm config:**\n\nThe DefaultAdminModule exposes an AdminUser entity, which has credentials that allow you to login to the admin interface.\n\n> There's no easy option to use your own user entity for now. If you have this requirement, open an issue so that we can help you.\n\n```ts\n// If you use an ormconfig.js\nconst AdminUser = require('nestjs-admin').AdminUserEntity\nmodule.exports = {\n  /* ... */,\n  entities: [/* ... */, AdminUser],\n  // Alternatively:\n  // entities: [/* ... */, 'node_modules/nestjs-admin/**/*.entity.js'],\n}\n```\n\n```bash\n# If you use environment variables\nTYPEORM_ENTITIES=your_existing_paths,node_modules/nestjs-admin/**/*.entity.js\n```\n\n4. **Create a first AdminUser to log in with**\n\n```bash\n# Create the AdminUser schema in database\nnpx ts-node node_modules/.bin/typeorm migration:generate -n \"create-admin-user\"\nnpx ts-node node_modules/.bin/typeorm migration:run\n\n# Now you can create an AdminUser through the CLI\nnpx nestjs-admin createAdminUser\n```\n\n> You can create AdminUsers from the `nestjs-admin createAdminUser` CLI, or directly from the administration interface!\n\nYou can now login to access the admin interface at `/admin/login`!\n\n5. **Register entities in the admin site**\n\n```ts\n// user.module.ts\nimport { TypeOrmModule } from '@nestjs/typeorm'\nimport { Module } from '@nestjs/common'\nimport { DefaultAdminModule, DefaultAdminSite } from 'nestjs-admin'\nimport { User } from './user.entity'\n\n@Module({\n  imports: [TypeOrmModule.forFeature([User]), DefaultAdminModule],\n  exports: [TypeOrmModule],\n})\nexport class UserModule {\n  constructor(private readonly adminSite: DefaultAdminSite) {\n    // Register the User entity under the \"User\" section\n    adminSite.register('User', User)\n  }\n}\n```\n\nCheck the [rest of the docs](./docs) for more details.\n\n## Compatibility\n\n| Library                  | Version |\n| ------------------------ | ------- |\n| @nestjs/common           | ^6.0.0  |\n| @nestjs/core             | ^6.0.0  |\n| @nestjs/platform-express | ^6.0.0  |\n| @nestjs/typeorm          | ^6.0.0  |\n| typeorm                  | ^0.2.12 |\n\n## Contributing\n\nAny contribution is welcome. If you want to implement a feature, you need to know that we are following [django-admin's API](https://docs.djangoproject.com/en/2.2/ref/contrib/admin/) as closely as possible. Why?\n\n- It's been well-thought-out by smart people\n- Python translates well to Typescript\n- It allows us to not have to think about what the API should look like and just use Django admin as a list of desirable features\n\n### Start the example app\n\nThis repo contains an example of how to use nestjs-admin. Here's how to use it:\n\n```bash\n# In a first terminal, run the database\ncp .env.example .env\ndocker-compose up\n\n# In a second terminal, compile the library\nyarn install\nyarn link\nyarn start:dev\n\n# In a third terminal, run the example app\ncd exampleApp/\nyarn install\nyarn link nestjs-admin\nyarn migration:run\nyarn start:debug\n```\n\nYou can now create an AdminUser (`yarn nestjs-admin createAdminUser`) to be able to login to `localhost:8000/admin`.\n\nThe code for the actual library is in `libs/nestjs-admin`.\n\n### Tooling\n\nIf you use VSCode, a `.vscode/` is committed that contains a good configuration to contribute. In particular, it contains a config for a ready-to-use debugger.\n\n### ADRs\n\nYou'll find [ADRs](https://github.com/joelparkerhenderson/architecture_decision_record#suggestions-for-writing-good-adrs) in `docs/adr`\n","readmeFilename":"README.md"}