casbin-pg-adapter-with-schema
Version:
PostgreSQL native adapter for Node-Casbin with advanced filter capability and improved performance.
129 lines (128 loc) • 3.44 kB
JSON
{
"name": "casbin-pg-adapter-with-schema",
"version": "1.4.5",
"description": "PostgreSQL native adapter for Node-Casbin with advanced filter capability and improved performance.",
"author": "Touchify <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"
},
"files": [
"*.d.ts",
"*.js",
"lib/**/*.d.ts",
"lib/**/*.js",
"migrations/**/*.js"
],
"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 test: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 build"
},
"dependencies": {
"casbin": "^5.0.4",
"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"
}
]
}
}
}