{"_id":"casbin-pg-adapter","_rev":"8-562c8686b487e0c765b187f923c2fbaa","name":"casbin-pg-adapter","dist-tags":{"latest":"1.4.0"},"versions":{"1.0.0":{"name":"casbin-pg-adapter","version":"1.0.0","description":"PostgreSQL native adapter for Node-Casbin with filter capability and improved performance.","author":{"name":"Touchify","email":"dev@touchify.co"},"license":"MIT","main":"index.js","types":"index.d.ts","homepage":"https://github.com/touchifyapp/casbin-pg-adapter#readme","bugs":{"url":"https://github.com/touchifyapp/casbin-pg-adapter/issues"},"repository":{"type":"git","url":"git+https://github.com/touchifyapp/casbin-pg-adapter.git"},"scripts":{"clean":"rimraf *.{js,d.ts} {lib,migrations}/**/*.{js,d.ts}","build":"npm run clean && npm run lint && npm run build:ts","build:ts":"tsc -p .","build:migrations":"tsc migrations/*.ts","test":"npm run clean && npm run lint && npm run build:migrations && npm run test:cleandb && npm run test:startdb && npm run test:jest","test:only":"npm run lint && npm run test:jest","test:coverage":"npm run test -- -- --coverage","test:jest":"jest --runInBand","test:startdb":"docker run --name casbin-pg-adapter-db -e POSTGRES_USER=casbin -e POSTGRES_PASSWORD=casbin -e POSTGRES_DB=casbin -p 5432:5432 -d postgres:11-alpine","test:cleandb":"docker rm casbin-pg-adapter-db --force || echo No DB running","lint":"npm run lint:ts","lint:ts":"eslint --ext .ts *.ts {lib,migrations}/**/*.ts","migrate":"node-pg-migrate","preversion":"npm run lint","postversion":"git push && git push --tags","prepublishOnly":"npm run test && npm run build"},"dependencies":{"casbin":"^4.2.1","node-pg-migrate":"^4.6.1","pg":"^8.0.2"},"devDependencies":{"@types/jest":"^25.2.1","@types/node":"^13.11.1","@types/pg":"^7.14.3","@typescript-eslint/eslint-plugin":"^2.28.0","@typescript-eslint/parser":"^2.28.0","coveralls":"^3.0.11","eslint":"^6.8.0","jest":"^25.3.0","rimraf":"^3.0.2","ts-jest":"^25.4.0","typescript":"^3.8.3"},"keywords":["casbin","node-casbin","adapter","postgres","pg","node-pg","access-control","authorization","auth","authz","acl","rbac","abac"],"jest":{"preset":"ts-jest","testEnvironment":"node","testMatch":["**/tests/**/*.spec.ts"]},"eslintConfig":{"parser":"@typescript-eslint/parser","parserOptions":{"project":["./tsconfig.json","./tests/tsconfig.json"]},"env":{"node":true},"plugins":["@typescript-eslint"],"extends":["eslint:recommended","plugin:@typescript-eslint/eslint-recommended","plugin:@typescript-eslint/recommended"],"rules":{"@typescript-eslint/no-use-before-define":["error",{"functions":false,"classes":false,"typedefs":false}],"@typescript-eslint/explicit-function-return-type":["error",{"allowExpressions":true}],"@typescript-eslint/array-type":["error",{"default":"array-simple","readonly":"array-simple"}]}},"gitHead":"c665184d2668208230e62f1d7b46a7a210267791","_id":"casbin-pg-adapter@1.0.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-D+H3fORgclvlkAn6EtTrWWgNXT0dPYaOLapFS1DdD3sH06G2k4isZM4I02ErcVT2Q7bbqP04piMZVUk/jGic/g==","shasum":"82363987bcf5a784a32fd2c0ed2048d16161a30f","tarball":"https://registry.npmjs.org/casbin-pg-adapter/-/casbin-pg-adapter-1.0.0.tgz","fileCount":13,"unpackedSize":17002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemv8MCRA9TVsSAnZWagAATRUQAIMFV2MqDcn8DxmRZaRh\n1JrdVMPYojlHkrq6zMg5/uvLl1O8fF7QPFP9AJyhvGCFDGdHoj6fuN/k9/vn\nU+4XGL4OfkoIazbDIFBW/bFi4yq2B/5Fnulnw3q8i7yz9PCoS+UhRSz5jS7m\nbUeHAwn+l8lPqT6pMLxUaTUfZ3VREzbbg6hOvLOEkloS6si7H5taO2xWht7S\nherFUlVomy3oEvm2kHnI/yhrCS1GxkubrMM1kjvzB/n/qaio6XdCIOa5KP7o\nHtlUq0f9zqzWewW5K6ffvgJa5FT2WTydP+bSrBKlLiz9gtF1us2AoX+VYuqp\ndg+omP6V80YOqzjb3odLSbIOEPv4fNtM9aGCO59cO2jte4CQDHK2BD86bAmm\nQkAUiNYF4JUxX8CFfk22qonzPd3PNg4FC6+YSibxTxp/a+R6zrMvhwuZGuZQ\nN+48p8el5WpSWNz64D0IvESKecqvBNUC8tD+JCM5Qe04LyITmi2AyTsnsZyY\nkVy3EMrK2oKRv3o+DL+lqPMrbrG3XjrWgM/iR3nVFfdhL4INN1/mvHt5CCmS\ndro0AqzRxEkcQUFLPNf9hVEJP4/fgRLf/JhFIaize0WcqDixfOUDtTMYIfmP\ngVVVjcl2fFvPxzGs71sUOYvohM+u1H+mAZ5+qgu/uH4mwPn9Zh/ZPASrD7g/\nB3xS\r\n=AIN/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgHLfb+BubPB6CxzhagthIXVYMvdOmMzaJXW6Aw8XWiQIgR5Ll5KKCmVc3bTHhWJWRDeD5LuU6zVmIYJaDV9Nd5fg="}]},"maintainers":[{"name":"spatools","email":"dev@touchify.co"}],"_npmUser":{"name":"spatools","email":"dev@touchify.co"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/casbin-pg-adapter_1.0.0_1587216139835_0.2142510527770798"},"_hasShrinkwrap":false},"1.1.0":{"name":"casbin-pg-adapter","version":"1.1.0","description":"PostgreSQL native adapter for Node-Casbin with filter capability and improved performance.","author":{"name":"Touchify","email":"dev@touchify.co"},"license":"MIT","main":"index.js","types":"index.d.ts","homepage":"https://github.com/touchifyapp/casbin-pg-adapter#readme","bugs":{"url":"https://github.com/touchifyapp/casbin-pg-adapter/issues"},"repository":{"type":"git","url":"git+https://github.com/touchifyapp/casbin-pg-adapter.git"},"scripts":{"clean":"rimraf *.{js,d.ts} {lib,migrations}/**/*.{js,d.ts}","build":"npm run clean && npm run lint && npm run build:ts","build:ts":"tsc -p .","build:migrations":"tsc migrations/*.ts","test":"npm run clean && npm run lint && npm run build:migrations && npm run test:cleandb && npm run test:startdb && npm run test:jest","test:only":"npm run lint && npm run test:jest","test:coverage":"npm run test -- -- --coverage","test:jest":"jest --runInBand","test:startdb":"docker run --name casbin-pg-adapter-db -e POSTGRES_USER=casbin -e POSTGRES_PASSWORD=casbin -e POSTGRES_DB=casbin -p 5432:5432 -d postgres:11-alpine","test:cleandb":"docker rm casbin-pg-adapter-db --force || echo No DB running","lint":"npm run lint:ts","lint:ts":"eslint --ext .ts *.ts {lib,migrations}/**/*.ts","migrate":"node-pg-migrate","preversion":"npm run lint","postversion":"git push && git push --tags","prepublishOnly":"npm run test && npm run build"},"dependencies":{"casbin":"^4.2.1","node-pg-migrate":"^4.6.1","pg":"^8.0.2"},"devDependencies":{"@types/jest":"^25.2.1","@types/node":"^13.11.1","@types/pg":"^7.14.3","@typescript-eslint/eslint-plugin":"^2.28.0","@typescript-eslint/parser":"^2.28.0","coveralls":"^3.0.11","eslint":"^6.8.0","jest":"^25.3.0","rimraf":"^3.0.2","ts-jest":"^25.4.0","typescript":"^3.8.3"},"keywords":["casbin","node-casbin","adapter","postgres","pg","node-pg","access-control","authorization","auth","authz","acl","rbac","abac"],"jest":{"preset":"ts-jest","testEnvironment":"node","testMatch":["**/tests/**/*.spec.ts"]},"eslintConfig":{"parser":"@typescript-eslint/parser","parserOptions":{"project":["./tsconfig.json","./tests/tsconfig.json"]},"env":{"node":true},"plugins":["@typescript-eslint"],"extends":["eslint:recommended","plugin:@typescript-eslint/eslint-recommended","plugin:@typescript-eslint/recommended"],"rules":{"@typescript-eslint/no-use-before-define":["error",{"functions":false,"classes":false,"typedefs":false}],"@typescript-eslint/explicit-function-return-type":["error",{"allowExpressions":true}],"@typescript-eslint/array-type":["error",{"default":"array-simple","readonly":"array-simple"}]}},"gitHead":"9471d3d803ced67f6cd5706cc40781f8552a7edf","_id":"casbin-pg-adapter@1.1.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-AyhxMlWIXxVIJZDEtCAy7gZDelf7wpFv/TCBYwpqklDsmocPPSlQiMoG2rbhqdvMb4FZX6OuzEflPVbDaLsYTw==","shasum":"1bdae00799652a52cbdbce5a285592c16e0bbc1a","tarball":"https://registry.npmjs.org/casbin-pg-adapter/-/casbin-pg-adapter-1.1.0.tgz","fileCount":13,"unpackedSize":17416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemwdmCRA9TVsSAnZWagAAoBkQAJGt98t4tZNZTigl02/9\nUlYR4u7hit1nlCin4G4NNSXe5b9vxvNYYmo2l87nuOJARjsx4a1BmA9Xzk76\nMvHO4tWcAeGM4Y5fNsR8C/Mec6rlwaEWeoAf6clfQSUv5gtRfoN5kpBxZyW2\nxL0XqBrbZxuTlp2096NMH70yU526IegHvbaOwAmZHPs73Gx4isZqYdjYkW/4\neZ4HU5F9nm1/Zm/+ZvBfC65O5Oj0wG+GNVkTKZDuRh8FBKqIdldXVwJrfepr\n+Gb/1aXkvAiqKPGk7Vo4VzkN9BQr6u642ZUXwv/RqFw9U03dgKOS17+v8X7e\nV60V/dyHsuHYH1R/a4gp8XEyt/zjZiWa1WAUlA2sQqTavnxPUiI5bYZNNgjB\nWOfYaFkDVHJtjDifGET0lMkfAno4xWpmCXwuwjnEpBBEjvWjBQpI4scL+B0l\nS4OIF9J2du/1CWPby2XtcEDY3jSpMasq683/bzoKB4IrYcHFwvF88IEnwb5F\nVPFiBYR2mAXR6K/900xbHvaH09WYqjiiQTm+NLEOU3o/exhnrQ6m3g6cBU9h\ns5K0dYTaBLoYXEaYR/RjLwaFEFDkhHh4c7oDilz1C/O8PfcNio6r4PQDa1nJ\nYShXM2w4zYPBMKEO/MwamO2OnkJe14WT5b96mqvviw0YTMRJrQAQLQ9W8nO7\nwpMk\r\n=9GYS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF/NwviMJmNxAW6vftNVTS7qPXg5aujyg5e7PzTaZArxAiAihMlA9DHD3gG8VoLO5rlusPo8arvcZQIS3P43bgfzsA=="}]},"maintainers":[{"name":"spatools","email":"dev@touchify.co"}],"_npmUser":{"name":"spatools","email":"dev@touchify.co"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/casbin-pg-adapter_1.1.0_1587218278453_0.3786821112701011"},"_hasShrinkwrap":false},"1.2.0":{"name":"casbin-pg-adapter","version":"1.2.0","description":"PostgreSQL native adapter for Node-Casbin with advanced filter capability and improved performance.","author":{"name":"Touchify","email":"dev@touchify.co"},"license":"MIT","main":"index.js","types":"index.d.ts","homepage":"https://github.com/touchifyapp/casbin-pg-adapter#readme","bugs":{"url":"https://github.com/touchifyapp/casbin-pg-adapter/issues"},"repository":{"type":"git","url":"git+https://github.com/touchifyapp/casbin-pg-adapter.git"},"scripts":{"clean":"rimraf *.{js,d.ts} {lib,migrations}/**/*.{js,d.ts}","build":"npm run clean && npm run lint && npm run build:ts","build:ts":"tsc -p .","build:migrations":"tsc migrations/*.ts","test":"npm run clean && npm run lint && npm run build:migrations && npm run test:cleandb && npm run test:startdb && npm run test:jest","test:only":"npm run lint && npm run test:jest","test:coverage":"npm run test -- -- --coverage","test:jest":"jest --runInBand","test:startdb":"docker run --name casbin-pg-adapter-db -e POSTGRES_USER=casbin -e POSTGRES_PASSWORD=casbin -e POSTGRES_DB=casbin -p 5432:5432 -d postgres:11-alpine","test:cleandb":"docker rm casbin-pg-adapter-db --force || echo No DB running","lint":"npm run lint:ts","lint:ts":"eslint --ext .ts *.ts {lib,migrations}/**/*.ts","migrate":"node-pg-migrate","preversion":"npm run lint","postversion":"git push && git push --tags","prepublishOnly":"npm run test && npm run build"},"dependencies":{"casbin":"^4.2.1","node-pg-migrate":"^4.6.1","pg":"^8.0.2"},"devDependencies":{"@types/jest":"^25.2.1","@types/node":"^13.11.1","@types/pg":"^7.14.3","@typescript-eslint/eslint-plugin":"^2.28.0","@typescript-eslint/parser":"^2.28.0","coveralls":"^3.0.11","eslint":"^6.8.0","jest":"^25.3.0","rimraf":"^3.0.2","ts-jest":"^25.4.0","typescript":"^3.8.3"},"keywords":["casbin","node-casbin","adapter","postgres","pg","node-pg","access-control","authorization","auth","authz","acl","rbac","abac"],"jest":{"preset":"ts-jest","testEnvironment":"node","testMatch":["**/tests/**/*.spec.ts"]},"eslintConfig":{"parser":"@typescript-eslint/parser","parserOptions":{"project":["./tsconfig.json","./tests/tsconfig.json"]},"env":{"node":true},"plugins":["@typescript-eslint"],"extends":["eslint:recommended","plugin:@typescript-eslint/eslint-recommended","plugin:@typescript-eslint/recommended"],"rules":{"@typescript-eslint/no-use-before-define":["error",{"functions":false,"classes":false,"typedefs":false}],"@typescript-eslint/explicit-function-return-type":["error",{"allowExpressions":true}],"@typescript-eslint/array-type":["error",{"default":"array-simple","readonly":"array-simple"}]}},"gitHead":"f3adab303bb85e8b0b845ff18cac9e6b02ec6dcb","_id":"casbin-pg-adapter@1.2.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-bjwbmKO1E9u8LpkKCE2iBbrmPvDQ1A2LkmXi7eOOTa6kh+8NPseORDS13EB+zQp9sbMNPTUuWtQbKCQ40z8DZA==","shasum":"04610aece4118bf5a56546bdc6504ec5b1a89d8b","tarball":"https://registry.npmjs.org/casbin-pg-adapter/-/casbin-pg-adapter-1.2.0.tgz","fileCount":13,"unpackedSize":19746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJenGXKCRA9TVsSAnZWagAAC4wP/RI2XatBCQO6bpAWj/Sw\nQ5bOM8PW5hv+KEIhO/NVSnS2p7H9sXPBsx24GowhC/jpyZorSkXBfZLfBSoM\ns/k9QGb4JT3WbacI0d4G83S3CLP85/c0suRiXTP/rKIy8aZHCrdl0RrF/2HT\nWgkrJBmNrRkvvd4C8syIqckZyJRdPj50Nfk1jjdej7aEZ/zQv1dTj9/lgJ8R\nwlkX85QhJ0RGUoUplqPNt7sTHfFULg3FNmQV6Eapelm5EtqzlKc39kAlu5Ha\nkNMU4WmA/f8NwRudOnzM/icx5B3DgdcH4McidLpSb3TkDqM6chHjYBYJPjQp\n2kHEl4P5nzvsuQQ+9M5k/Ruo0jDLPzmas4n5HHklfSeAP8SHAVOe4XG3iwQe\nH/4QPkC735RSj6KnP//wCYmnVzCv2gdc6As3uoOUClClCekClku3d0R0Nsih\nGiELgKy2BpCESjfEaYzLqWWYwRK8LbXiuBTqndv6GgWVFyUaWBuTT20ebcVA\n0uK1F0Ciu0ObSnlG1hjca6rnOZUfCeDV0VO37ZhZ2h8dcnaBJ714onzbkcnY\nNGSrP0EstEuiLky3JuNZJjcYezZQlEHo5dyi0ZWDbNhfSKYT/rN8Qn0Pi9Fa\nw85haI56NbDys9jUKRJ4iJ98tA9KIXtz1t+hSbGhVJocwrHztlct8bVwuQZE\nk3hg\r\n=BmDD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIER+fi8DH8hYS+ORag7cuLRef/p3lphvKds9YwY8q2jFAiEA9epmzZX83p6ISjUttMtkGOdx3Z6iHXqUyFJhRdrWqys="}]},"maintainers":[{"name":"spatools","email":"dev@touchify.co"}],"_npmUser":{"name":"spatools","email":"dev@touchify.co"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/casbin-pg-adapter_1.2.0_1587307977751_0.4317458466862085"},"_hasShrinkwrap":false},"1.3.0":{"name":"casbin-pg-adapter","version":"1.3.0","description":"PostgreSQL native adapter for Node-Casbin with advanced filter capability and improved performance.","author":{"name":"Touchify","email":"dev@touchify.co"},"license":"MIT","main":"index.js","types":"index.d.ts","homepage":"https://github.com/touchifyapp/casbin-pg-adapter#readme","bugs":{"url":"https://github.com/touchifyapp/casbin-pg-adapter/issues"},"repository":{"type":"git","url":"git+https://github.com/touchifyapp/casbin-pg-adapter.git"},"scripts":{"clean":"rimraf *.{js,d.ts} {lib,migrations}/**/*.{js,d.ts}","build":"npm run clean && npm run lint && npm run build:ts","build:ts":"tsc -p .","build:migrations":"tsc migrations/*.ts","test":"npm run clean && npm run lint && npm run build:migrations && npm run test:cleandb && npm run test:startdb && npm run test:jest","test:only":"npm run lint && npm run test:jest","test:coverage":"npm run test -- -- --coverage","test:jest":"jest --runInBand","test:startdb":"docker run --name casbin-pg-adapter-db -e POSTGRES_USER=casbin -e POSTGRES_PASSWORD=casbin -e POSTGRES_DB=casbin -p 5432:5432 -d postgres:11-alpine","test:cleandb":"docker rm casbin-pg-adapter-db --force || echo No DB running","lint":"npm run lint:ts","lint:ts":"eslint --ext .ts *.ts {lib,migrations}/**/*.ts","migrate":"node-pg-migrate","preversion":"npm run lint","postversion":"git push && git push --tags","prepublishOnly":"npm run test && npm run build"},"dependencies":{"casbin":"^4.2.1","node-pg-migrate":"^4.6.1","pg":"^8.0.2"},"devDependencies":{"@types/jest":"^25.2.1","@types/node":"^13.11.1","@types/pg":"^7.14.3","@typescript-eslint/eslint-plugin":"^2.28.0","@typescript-eslint/parser":"^2.28.0","coveralls":"^3.0.11","eslint":"^6.8.0","jest":"^25.3.0","rimraf":"^3.0.2","ts-jest":"^25.4.0","typescript":"^3.8.3"},"keywords":["casbin","node-casbin","adapter","postgres","pg","node-pg","access-control","authorization","auth","authz","acl","rbac","abac"],"jest":{"preset":"ts-jest","testEnvironment":"node","testMatch":["**/tests/**/*.spec.ts"],"collectCoverageFrom":["*.ts","lib/**/*.ts"]},"eslintConfig":{"parser":"@typescript-eslint/parser","parserOptions":{"project":["./tsconfig.json","./tests/tsconfig.json"]},"env":{"node":true},"plugins":["@typescript-eslint"],"extends":["eslint:recommended","plugin:@typescript-eslint/eslint-recommended","plugin:@typescript-eslint/recommended"],"rules":{"@typescript-eslint/no-use-before-define":["error",{"functions":false,"classes":false,"typedefs":false}],"@typescript-eslint/explicit-function-return-type":["error",{"allowExpressions":true}],"@typescript-eslint/array-type":["error",{"default":"array-simple","readonly":"array-simple"}]}},"gitHead":"ded48d47f88637cf32acc11ca143b5104fdd05fd","_id":"casbin-pg-adapter@1.3.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-z3j7kjXdT2guXvGLk/DSdKjsWRwkJPw42eQGSUdG/i+y49g2MChenvjqp57ka1hOJ+AQrIe9dhxnXBIJwQnWug==","shasum":"6146662ba72ce2893cfb86da2643b435bf9fcf4e","tarball":"https://registry.npmjs.org/casbin-pg-adapter/-/casbin-pg-adapter-1.3.0.tgz","fileCount":13,"unpackedSize":20946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepngmCRA9TVsSAnZWagAAe1AP/jXl47kD6rHO6xugcPl3\nMyOlmjU4liC49RiWO4TRb7/Ki9rTd9GLQqncso3H5DZHn34S12zsmsWda7qN\nbh5mak6ouCAa4dFFVvJnkJGMYnhaPTi2vCCB8fvo0phTbXtskeqlpdsInaOg\nfbVWYzjWn3RubLNdL7XnxNd7yPiAu4YM4Bwz02Y8eglnxsWqNK5OHXOVNphl\ncBdUgz3JhFyhDvXrOJ644wW4KVRU9DnrABPq91uDuKQS1CRjSxGCnqG+bl9/\nMJb4R8j9QkS/NKPvEwAQgpxkMlaJ8DFkc3YGXyCac4eapJ6A4GdHlkU13zWP\nctuT+vOn+LuAcZahMjMmkTUz8PmafRElaDDVssGnC9QGyb8wmychkXLPLPXo\nm2tmucWUrIjddxzewC8suhDKHl8B9tOPWM7iFw1mb2fN9eUtjFnI7yqxfwtM\nzJVzQ/FgjQrLq8RGylo6Be2IESU+Zh8w/+sVxlLcXfQOG8nclONC2/vTOamo\n7CdZPF8+1hadeERwg1kZaSuVnkaQEbdOyTrsvNNtQ3omqxdMwZs+EWvNbuyN\n9JjJPzw/XOoC7HpJ8tfWT6idkUjIVJq/2Oh9eaz00QeO+3XGk5na365n++2u\n19v5QcR/tqxCRWDLLKAT5HVcz4mt4WBSrZQf2qeAQ65Iu17PSgGJIDwDHqba\n1zDQ\r\n=uirq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICtxaIEwe6m8RDEolksZWDzu3dVzsZQ9h6N/lQLXxuhsAiEAnWsgOInN8MNXze8QhKKBuN0SEsomHnqvBGnm6pmcxeo="}]},"maintainers":[{"email":"maxime@touchify.co","name":"mluce"}],"_npmUser":{"name":"mluce","email":"maxime@touchify.co"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/casbin-pg-adapter_1.3.0_1587968038053_0.623199410889574"},"_hasShrinkwrap":false},"1.4.0":{"name":"casbin-pg-adapter","version":"1.4.0","description":"PostgreSQL native adapter for Node-Casbin with advanced filter capability and improved performance.","author":{"name":"Touchify","email":"dev@touchify.co"},"license":"MIT","main":"index.js","types":"index.d.ts","homepage":"https://github.com/touchifyapp/casbin-pg-adapter#readme","bugs":{"url":"https://github.com/touchifyapp/casbin-pg-adapter/issues"},"repository":{"type":"git","url":"git+https://github.com/touchifyapp/casbin-pg-adapter.git"},"scripts":{"clean":"rimraf *.{js,d.ts} {lib,migrations}/**/*.{js,d.ts}","build":"npm run clean && npm run lint && npm run build:ts","build:ts":"tsc -p .","build:migrations":"tsc migrations/*.ts","test":"npm run clean && npm run lint && npm run build:migrations && npm run test:jest","test:only":"npm run lint && npm run test:jest","test:coverage":"npm run test -- -- --coverage","test:jest":"jest --runInBand","test:startdb":"docker run --name casbin-pg-adapter-db -e POSTGRES_USER=casbin -e POSTGRES_PASSWORD=casbin -e POSTGRES_DB=casbin -p 5432:5432 -d postgres:11-alpine","test:cleandb":"docker rm casbin-pg-adapter-db --force || echo No DB running","test:ci":"npm run coverage -- --ci","lint":"npm run lint:ts","lint:ts":"eslint --ext .ts *.ts {lib,migrations}/**/*.ts","migrate":"node-pg-migrate","preversion":"npm run lint","postversion":"git push && git push --tags","prepublishOnly":"npm run test && npm run build"},"dependencies":{"casbin":"^5.0.4","node-pg-migrate":"^5.1.0","pg":"^8.2.1"},"devDependencies":{"@types/jest":"^25.2.3","@types/node":"^12.0.0","@types/pg":"^7.14.3","@typescript-eslint/eslint-plugin":"^3.1.0","@typescript-eslint/parser":"^3.1.0","eslint":"^7.2.0","jest":"^26.0.1","rimraf":"^3.0.2","ts-jest":"^26.1.0","typescript":"^3.9.5"},"keywords":["casbin","node-casbin","adapter","postgres","pg","node-pg","access-control","authorization","auth","authz","acl","rbac","abac"],"jest":{"preset":"ts-jest","testEnvironment":"node","testMatch":["**/tests/**/*.spec.ts"],"collectCoverageFrom":["*.ts","lib/**/*.ts"]},"eslintConfig":{"parser":"@typescript-eslint/parser","parserOptions":{"project":["./tsconfig.json","./tests/tsconfig.json"]},"env":{"node":true},"plugins":["@typescript-eslint"],"extends":["eslint:recommended","plugin:@typescript-eslint/eslint-recommended","plugin:@typescript-eslint/recommended"],"rules":{"@typescript-eslint/no-use-before-define":["error",{"functions":false,"classes":false,"typedefs":false}],"@typescript-eslint/explicit-function-return-type":["error",{"allowExpressions":true}],"@typescript-eslint/array-type":["error",{"default":"array-simple","readonly":"array-simple"}]}},"gitHead":"a307fec9134a5c48b150a5a66606e844ea2faac0","_id":"casbin-pg-adapter@1.4.0","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-9T0i+t0XwdnsBFl+20ojAED9+05SN4haJDLOJTUh9liHO+yBi6SXwSboD0MLzserFkxCs8VJJ+BNJlavExlU+A==","shasum":"c9187d828b2bdf548137d7b9f8f4aea677792e36","tarball":"https://registry.npmjs.org/casbin-pg-adapter/-/casbin-pg-adapter-1.4.0.tgz","fileCount":15,"unpackedSize":21632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3stGCRA9TVsSAnZWagAABYEQAIapoZqPobbFYOpOJrNO\nc6xNafKPeesXHhw6EZA/4yHQ+uXFsRUDXkai+nH/3OFzPkz2nMCy0ZuzohKI\nuUIL8E9fxm0TuU8dl/mnSj2NUFOYog1/6aePR+XWkBVf0hLtJFwdiVFzhlhW\nph0YjgErjRbAWiah9yeWlV+VbhWkrgCyGGM/d6j8y6+00IF8uWDuz98sx1iA\nSZ9Qk9yYPWOTSaTcPEC05uPDngsCkrFAOXsHkFSAAAwAItkGUjlN4FIGSCH/\nT1oJlrrDAWyWoDTeLevM2gjHue8TlXDboYFaYmSStRpYqWILEMqlZJSOWNDh\nKV18HAyMzYbLzdHspwlI5ZFK9fBQgGfApV0OZl/llQpG5H8ZgB7aq6dyrC42\nAGCOEJo386B9weGmwWoXkF6zCoQGvBzzyxjTjnl39H1TfgmFTV4YMjbfqpV2\nnzjyWN9iyjzlH+KmD3deRzG/TSnmax0yHgur8hiJEBZcKmikaoNGGw5K5u01\nhcODhHfbh6UlkFftoIBR1uJEadn6+sy8Yt2u9eBmfIMMUbJcoZw1GhaimRyQ\nS/g08Ofl5VyOyi3V+Ci6rDp0bgHFxD2vve0V+g/gWXP2uHDDo40Y8ltm8uLA\n6g3hZGmqpT38MPjTO3NFjCoaBdDOV6XfT9Z+L+qGwqQ8/Ow/uOwzP/ziMchH\nADe+\r\n=YWvC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7ZXwYITQMTEx9AoxCLVGZOmt14rNHZNjhOV/S9EBDfwIgQIEgmyw2Dtv5Zyk9H14g3RvSylCiS5n9rALN8leLfhw="}]},"maintainers":[{"email":"maxime@touchify.co","name":"mluce"}],"_npmUser":{"name":"mluce","email":"maxime@touchify.co"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/casbin-pg-adapter_1.4.0_1591659333839_0.16566093532658455"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-18T13:22:19.834Z","1.0.0":"2020-04-18T13:22:19.982Z","modified":"2022-04-12T05:24:40.062Z","1.1.0":"2020-04-18T13:57:58.598Z","1.2.0":"2020-04-19T14:52:57.854Z","1.3.0":"2020-04-27T06:13:58.207Z","1.4.0":"2020-06-08T23:35:33.963Z"},"maintainers":[{"email":"maxime@touchify.co","name":"mluce"}],"description":"PostgreSQL native adapter for Node-Casbin with advanced filter capability and improved performance.","homepage":"https://github.com/touchifyapp/casbin-pg-adapter#readme","keywords":["casbin","node-casbin","adapter","postgres","pg","node-pg","access-control","authorization","auth","authz","acl","rbac","abac"],"repository":{"type":"git","url":"git+https://github.com/touchifyapp/casbin-pg-adapter.git"},"author":{"name":"Touchify","email":"dev@touchify.co"},"bugs":{"url":"https://github.com/touchifyapp/casbin-pg-adapter/issues"},"license":"MIT","readme":"# PostgreSQL Casbin Adapter\n\n[![NPM version](https://img.shields.io/npm/v/casbin-pg-adapter.svg?style=flat-square)](https://npmjs.org/package/casbin-pg-adapter)\n[![NPM download](https://img.shields.io/npm/dm/casbin-pg-adapter.svg?style=flat-square)](https://npmjs.org/package/casbin-pg-adapter)\n![Run Tests](https://github.com/touchifyapp/casbin-pg-adapter/workflows/Run%20Tests/badge.svg?branch=master&event=push)\n[![Coverage Status](https://coveralls.io/repos/github/touchifyapp/casbin-pg-adapter/badge.svg?branch=master)](https://coveralls.io/github/touchifyapp/casbin-pg-adapter?branch=master)\n\n[PostgreSQL](https://www.postgresql.org/) native adapter for [Node-Casbin](https://github.com/casbin/node-casbin). With this library, Node-Casbin can load policy from PosgreSQL database or save policy to it. It supports loading filtered policies and is built for improving performances in PostgreSQL. It uses [node-postgres](https://node-postgres.com/) to connect to PostgreSQL.\n\n`casbin-pg-adapter` also adds advanced filtering capability. You can filter using `LIKE` or `regexp` expressions when using `loadFilteredPolicy`.\n\n## Installation\n\n```bash\nnpm install casbin-pg-adapter\n```\n\n## Simple example\n\n```typescript\nimport { newEnforcer } from \"casbin\";\nimport PostgresAdapter from \"casbin-pg-adapter\";\n\nasync function myFunction() {\n    // Initialize a Postgres adapter and use it in a Node-Casbin enforcer:\n    // The adapter can not automatically create database.\n    // But the adapter will automatically and use the table named \"casbin_rule\".\n    // I think ORM should not automatically create databases.  \n    const a = await PostgresAdapter.newAdapter({\n        connectionString: \"postgresql://casbin:casbin@localhost:5432/casbin\"\n    });\n\n    const e = await newEnforcer(\"examples/rbac_model.conf\", a);\n\n    // Load the policy from DB.\n    await e.loadPolicy();\n\n    // Check the permission.\n    e.enforce(\"alice\", \"data1\", \"read\");\n\n    // Modify the policy.\n    // await e.addPolicy(...);\n    // await e.removePolicy(...);\n\n    // Save the policy back to DB.\n    await e.savePolicy();\n}\n```\n\n## Filtering example\n\n```typescript\nimport { newEnforcer } from \"casbin\";\nimport PostgresAdapter from \"casbin-pg-adapter\";\n\nasync function myFunction() {\n    const a = await PostgresAdapter.newAdapter({\n        connectionString: \"postgresql://casbin:casbin@localhost:5432/casbin\"\n    });\n\n    const e = await newEnforcer(\"examples/rbac_model.conf\", a);\n\n    // Load the filtered policy from DB.\n    await e.loadFilteredPolicy({\n        p: [\"alice\"],\n        g: [\"\", \"role:admin\"]\n    });\n\n    // Check the permission.\n    e.enforce(\"alice\", \"data1\", \"read\");\n}\n```\n\n## Advanced filtering example\n\n```typescript\nimport { newEnforcer } from \"casbin\";\nimport PostgresAdapter from \"casbin-pg-adapter\";\n\nasync function myFunction() {\n    const a = await PostgresAdapter.newAdapter({\n        connectionString: \"postgresql://casbin:casbin@localhost:5432/casbin\"\n    });\n\n    const e = await newEnforcer(\"examples/rbac_model.conf\", a);\n\n    // Load the filtered policy from DB.\n    await e.loadFilteredPolicy({\n        p: [\"regex:(role:.*)|(alice)\"],\n        g: [\"\", \"like:role:%\"]\n    });\n\n    // Check the permission.\n    e.enforce(\"alice\", \"data1\", \"read\");\n}\n```\n\n## Configuration\n\nYou can pass any [node-postgres](https://node-postgres.com/) options to the Adapter.\nSee `node-postgres` documentation: [Connecting to PostgreSQL](https://node-postgres.com/features/connecting#Programmatic).\n\n## Additional configurations\n\n#### Avoid database migration\n\nAdditionnally, you can pass the following option to the Adapter:\n * `migrate` (*Boolean*): If set to `false`, the Adapter will not apply migration when starting.\n\n**Note:** If you use this parameter, you should apply migration manually:\n\n```typescript\nasync function startup(): Promise<void> {\n    PostgresAdapter.migrate({\n        connectionString: \"postgresql://casbin:casbin@localhost:5432/casbin\"\n    });\n}\n\nasync function createEnforcer(): Promise<Enforcer> {\n    const a = await PostgresAdapter.newAdapter({\n        connectionString: \"postgresql://casbin:casbin@localhost:5432/casbin\",\n        migrate: false\n    });\n\n    return newEnforcer(\"examples/rbac_model.conf\", a);\n}\n```\n\n#### Disabling filtered behavior\n\nIf you want to use the `savePolicy` feature from `node-casbin`, you have to disable the filtered behavior of `PostgresAdapter`.\nYou can do it by calling `enableFiltered` on the adapter:\n\n```typescript\na.enableFiltered(false);\n```\n\n## Getting Help\n\n- [Node-Casbin](https://github.com/casbin/node-casbin)\n- [Casbin-PG-Adapter](https://github.com/touchifyapp/casbin-pg-adapter)\n\n## License\n\nThis project is under MIT License. See the [LICENSE](LICENSE) file for the full license text.\n\n","readmeFilename":"README.md"}