UNPKG

typeorm-transactional-async-callbacks

Version:

A Transactional Method Decorator for typeorm that uses cls-hooked to handle and propagate transactions between different repositories and service methods. Inpired by Spring Trasnactional Annotation and Sequelize CLS

74 lines (73 loc) 2.3 kB
{ "name": "typeorm-transactional-async-callbacks", "version": "0.5.1", "description": "A Transactional Method Decorator for typeorm that uses cls-hooked to handle and propagate transactions between different repositories and service methods. Inpired by Spring Trasnactional Annotation and Sequelize CLS", "main": "dist/index.js", "types": "dist/index.d.ts", "repository": { "type": "git", "url": "https://github.com/iNishant/typeorm-transactional" }, "author": { "name": "Nishant", "email": "saysnishant@gmail.com" }, "readmeFilename": "README.md", "keywords": [ "typescript", "typescript-orm", "typeorm", "orm", "cls-hooked", "transaction", "isolation", "decorator" ], "license": "MIT", "scripts": { "clean": "rm -rf ./dist", "check:format": "prettier --check \"src/**/*.ts\"", "check:lint": "eslint --cache \"src/**/*.ts\"", "check": "npm run check:lint && npm run check:format", "fix:format": "prettier --write \"src/**/*.ts\"", "fix:lint": "npm run check:lint --fix", "fix": "npm run fix:lint && npm run fix:format", "build": "npm run clean && tsc -p tsconfig.json", "setup-test-db": "npm run teardown-test-db; docker compose -f tests/docker-compose.yaml up -d --wait", "teardown-test-db": "docker compose -f tests/docker-compose.yaml down --remove-orphans -v", "test": "npm run setup-test-db && jest" }, "dependencies": { "@types/cls-hooked": "^4.3.3", "cls-hooked": "^4.2.2", "semver": "^7.5.1" }, "devDependencies": { "@nestjs/common": "^9.0.7", "@nestjs/core": "^9.0.7", "@nestjs/testing": "^9.0.7", "@nestjs/typeorm": "^9.0.0", "@types/jest": "^28.1.6", "@types/semver": "^7.5.0", "@typescript-eslint/eslint-plugin": "^5.31.0", "@typescript-eslint/parser": "^5.31.0", "eslint": "^8.20.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.2.1", "jest": "^28.1.3", "pg": "^8.7.3", "prettier": "^2.7.1", "reflect-metadata": "^0.1.13", "rxjs": "^7.5.6", "ts-jest": "^28.0.7", "typeorm": "^0.3.10", "typescript": "^4.7.4" }, "peerDependencies": { "reflect-metadata": ">= 0.1.12", "typeorm": ">= 0.2.8" }, "engines": { "node": ">=12.0.0" } }