UNPKG

@athenna/database

Version:

The Athenna database handler for SQL/NoSQL.

245 lines (244 loc) 6.85 kB
{ "name": "@athenna/database", "version": "5.21.0", "description": "The Athenna database handler for SQL/NoSQL.", "license": "MIT", "author": "João Lenon <lenon@athenna.io>", "bugs": "https://github.com/AthennaIO/Database/issues", "repository": "https://github.com/AthennaIO/Database.git", "homepage": "https://github.com/AthennaIO/Database#readme", "keywords": [ "esm", "orm", "nodejs", "athenna", "database", "migrations", "factories", "seeders", "mysql", "mongodb", "postgresql", "sql", "nosql", "typescript" ], "engines": { "node": ">=20.0.0" }, "scripts": { "build": "node node_modules/@athenna/tsconfig/src/build.js", "lint:fix": "eslint \"{bin,src,tests}/**/*.ts\" --fix", "test": "npm run --silent lint:fix && node --enable-source-maps --import=@athenna/tsconfig bin/test.ts", "test:debug": "cross-env NODE_DEBUG=athenna:* node --inspect --enable-source-maps --import=@athenna/tsconfig bin/test.ts", "test:coverage": "c8 npm run --silent test" }, "files": [ "src/*.js", "src/*.d.ts", "src/**/*.js", "src/**/*.d.ts", "templates", "configurer" ], "type": "module", "main": "./src/index.js", "types": "./src/index.d.ts", "exports": { ".": "./src/index.js", "./types": "./src/types/index.js", "./package": "./package.json", "./package.json": "./package.json", "./testing/plugins": "./src/testing/plugins/index.js", "./commands/DbFreshCommand": "./src/commands/DbFreshCommand.js", "./commands/DbSeedCommand": "./src/commands/DbSeedCommand.js", "./commands/DbWipeCommand": "./src/commands/DbWipeCommand.js", "./commands/MakeCrudCommand": "./src/commands/MakeCrudCommand.js", "./commands/MakeMigrationCommand": "./src/commands/MakeMigrationCommand.js", "./commands/MakeModelCommand": "./src/commands/MakeModelCommand.js", "./commands/MakeSeederCommand": "./src/commands/MakeSeederCommand.js", "./commands/MigrationRevertCommand": "./src/commands/MigrationRevertCommand.js", "./commands/MigrationRunCommand": "./src/commands/MigrationRunCommand.js", "./providers/DatabaseProvider": "./src/providers/DatabaseProvider.js" }, "imports": { "#bin/*": "./bin/*.js", "#bin": "./bin/index.js", "#src/*": "./src/*.js", "#src": "./src/index.js", "#src/types": "./src/types/index.js", "#src/debug": "./src/debug/index.js", "#tests/*": "./tests/*.js", "#tests": "./tests/index.js" }, "dependencies": { "@faker-js/faker": "^8.4.1", "fast-deep-equal": "^3.1.3" }, "devDependencies": { "@athenna/artisan": "^5.6.0", "@athenna/common": "^5.9.0", "@athenna/config": "^5.3.0", "@athenna/ioc": "^5.1.0", "@athenna/logger": "^5.3.0", "@athenna/test": "^5.3.0", "@athenna/tsconfig": "^5.0.0", "@athenna/view": "^5.3.0", "@types/knex": "^0.16.1", "@types/mongoose": "^5.11.97", "@typescript-eslint/eslint-plugin": "^8.23.0", "@typescript-eslint/parser": "^8.23.0", "better-sqlite3": "^9.6.0", "commitizen": "^4.3.1", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.57.1", "eslint-config-prettier": "^8.10.0", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.31.0", "eslint-plugin-n": "^15.7.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-promise": "^6.6.0", "husky": "^3.1.0", "lint-staged": "^12.5.0", "mongodb-memory-server": "^9.5.0", "mongoose": "^8.10.0", "mysql2": "^3.12.0", "pg": "^8.13.1", "prettier": "^2.8.8" }, "c8": { "all": true, "include": [ "src/**/*.ts" ], "exclude": [ "src/types/*", "src/drivers/FakeDriver" ], "reporter": [ "text-summary", "html" ], "report-dir": "./tests/coverage", "check-coverage": true }, "husky": { "hooks": { "prepare-commit-msg": "lint-staged && exec < /dev/tty && git cz --hook || true" } }, "lint-staged": { "*.ts": [ "eslint --fix", "git add" ], "*.json": [ "prettier --write", "git add" ] }, "config": { "commitizen": { "path": "./node_modules/cz-conventional-changelog" } }, "prettier": { "singleQuote": true, "trailingComma": "none", "arrowParens": "avoid", "endOfLine": "lf", "semi": false, "printWidth": 80, "overrides": [ { "files": "tests/**/*", "options": { "printWidth": 120 } } ] }, "eslintIgnore": [], "eslintConfig": { "env": { "es2021": true, "node": true }, "globals": { "ioc": true, "Env": true, "Config": true }, "plugins": [ "prettier", "@typescript-eslint" ], "extends": [ "standard", "eslint:recommended", "plugin:prettier/recommended", "plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/eslint-recommended" ], "parser": "@typescript-eslint/parser", "rules": { "camelcase": "off", "dot-notation": "off", "prettier/prettier": "error", "no-useless-constructor": "off", "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-unused-vars": [ "error", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_", "caughtErrorsIgnorePattern": "^_" } ] } }, "athenna": { "commands": { "migration:run": { "path": "#src/commands/MigrationRunCommand" }, "migration:revert": { "path": "#src/commands/MigrationRevertCommand" }, "db:fresh": { "path": "#src/commands/DbFreshCommand", "loadAllCommands": true }, "db:seed": { "path": "#src/commands/DbSeedCommand" }, "db:wipe": { "path": "#src/commands/DbWipeCommand" }, "make:model": { "path": "#src/commands/MakeModelCommand" }, "make:seeder": { "path": "#src/commands/MakeSeederCommand" }, "make:migration": { "path": "#src/commands/MakeMigrationCommand" }, "make:crud": { "path": "#src/commands/MakeCrudCommand" } }, "templates": { "migration": "./templates/migration.edge", "model": "./templates/model.edge", "seeder": "./templates/seeder.edge", "crud-model": "./templates/crud-model.edge", "crud-migration": "./templates/crud-migration.edge", "crud-service": "./templates/crud-service.edge", "crud-controller": "./templates/crud-controller.edge", "crud-controller-test": "./templates/crud-controller-test.edge", "crud-service-test": "./templates/crud-service-test.edge" } } }