axe-api 1.4.3 → 1.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -58,7 +58,11 @@ class ModelTreeBuilder {
58
58
  // We should add recursive models
59
59
  this.version.modelList.get().forEach((model) => {
60
60
  const recursiveRelations = model.relations.filter((relation) => relation.model === model.name);
61
- if (recursiveRelations.length === 2) {
61
+ const hasManyCount = recursiveRelations.filter((item) => item.type === Enums_1.Relationships.HAS_MANY).length;
62
+ const hasOneCount = recursiveRelations.filter((item) => item.type === Enums_1.Relationships.HAS_ONE).length;
63
+ if (recursiveRelations.length === 2 &&
64
+ hasManyCount === 1 &&
65
+ hasOneCount === 1) {
62
66
  model.setAsRecursive();
63
67
  tree.push(model);
64
68
  }
@@ -2,7 +2,7 @@ import logger from "pino";
2
2
  declare class LogService {
3
3
  private static logger;
4
4
  static setInstance(options?: logger.LoggerOptions | undefined): void;
5
- static instance(): logger.Logger<never>;
5
+ static instance(): logger.Logger<never, boolean>;
6
6
  static error(message: string): void;
7
7
  static warn(message: string): void;
8
8
  static info(message: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axe-api",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "description": "AXE API is a simple tool to create Rest APIs quickly.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -31,6 +31,18 @@
31
31
  "bin": {
32
32
  "axe": "bin/axe"
33
33
  },
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://github.com/axe-api/axe-api.git"
37
+ },
38
+ "keywords": [
39
+ "nodejs",
40
+ "api",
41
+ "rest",
42
+ "rest-api",
43
+ "restful",
44
+ "axe-api"
45
+ ],
34
46
  "scripts": {
35
47
  "build": "rm -rf build && tsc && rm -rf build/dev-kit",
36
48
  "build:watch": "tsc -w",
@@ -61,65 +73,65 @@
61
73
  "node": ">=18.0.0"
62
74
  },
63
75
  "dependencies": {
64
- "body-parser": "^1.20.2",
76
+ "body-parser": "^1.20.3",
65
77
  "change-case": "^4.1.2",
66
78
  "colors": "^1.4.0",
67
- "commander": "^12.0.0",
79
+ "commander": "^12.1.0",
68
80
  "connect": "^3.7.0",
69
- "dotenv": "^16.4.4",
81
+ "dotenv": "^16.4.5",
70
82
  "formidable": "^3.5.1",
71
83
  "knex": "^3.1.0",
72
- "knex-paginate": "^3.1.1",
84
+ "knex-paginate": "^3.1.4",
73
85
  "knex-schema-inspector": "^3.1.0",
74
86
  "nanoid": "^3.3.7",
75
- "pino": "^9.3.2",
76
- "pino-pretty": "^11.0.0",
87
+ "pino": "^9.4.0",
88
+ "pino-pretty": "^11.2.2",
77
89
  "pluralize": "^8.0.0",
78
- "rimraf": "^5.0.5",
90
+ "rimraf": "^5.0.10",
79
91
  "shelljs": "^0.8.5",
80
92
  "validatorjs": "^3.22.1"
81
93
  },
82
94
  "devDependencies": {
83
- "@babel/core": "^7.23.9",
84
- "@babel/preset-env": "^7.23.9",
85
- "@babel/preset-typescript": "^7.23.3",
86
- "@elastic/elasticsearch": "^8.12.1",
95
+ "@babel/core": "^7.25.2",
96
+ "@babel/preset-env": "^7.25.4",
97
+ "@babel/preset-typescript": "^7.24.7",
98
+ "@elastic/elasticsearch": "^8.15.0",
87
99
  "@types/accept-language-parser": "^1.5.6",
88
- "@types/aws-lambda": "^8.10.133",
100
+ "@types/aws-lambda": "^8.10.145",
89
101
  "@types/cors": "^2.8.17",
90
102
  "@types/formidable": "^3.4.5",
91
- "@types/multer": "^1.4.11",
103
+ "@types/multer": "^1.4.12",
92
104
  "@types/pluralize": "^0.0.33",
93
105
  "@types/validatorjs": "^3.15.5",
94
- "@typescript-eslint/eslint-plugin": "^7.0.1",
95
- "@typescript-eslint/parser": "^7.0.1",
106
+ "@typescript-eslint/eslint-plugin": "^7.18.0",
107
+ "@typescript-eslint/parser": "^7.18.0",
96
108
  "babel-jest": "^29.7.0",
97
109
  "cors": "^2.8.5",
98
- "eslint": "^8.56.0",
110
+ "eslint": "^8.57.1",
99
111
  "eslint-config-standard": "^17.1.0",
100
- "eslint-plugin-import": "^2.29.1",
112
+ "eslint-plugin-import": "^2.30.0",
101
113
  "eslint-plugin-node": "^11.1.0",
102
- "eslint-plugin-promise": "^6.1.1",
114
+ "eslint-plugin-promise": "^6.6.0",
103
115
  "eslint-plugin-unicorn": "^55.0.0",
104
116
  "eslint-watch": "^8.0.0",
105
- "glob": "^10.3.10",
106
- "husky": "^9.0.11",
117
+ "glob": "^11.0.0",
118
+ "husky": "^9.1.6",
107
119
  "jest": "^29.7.0",
108
- "lint-staged": "^15.2.2",
120
+ "lint-staged": "^15.2.10",
109
121
  "multer": "^1.4.5-lts.1",
110
122
  "mysql": "^2.18.1",
111
- "mysql2": "^3.10.3",
123
+ "mysql2": "^3.11.3",
112
124
  "node-cache": "^5.1.2",
113
- "pg": "^8.11.3",
114
- "prettier": "^3.2.5",
115
- "redis": "^4.6.13",
116
- "robust-validator": "^1.1.0",
117
- "serve-static": "^1.15.0",
125
+ "pg": "^8.13.0",
126
+ "prettier": "^3.3.3",
127
+ "redis": "^4.7.0",
128
+ "robust-validator": "^2.0.1",
129
+ "serve-static": "^1.16.2",
118
130
  "set-value": ">=4.1.0",
119
131
  "sqlite3": "^5.1.7",
120
132
  "ts-node": "^10.9.2",
121
- "tsx": "^4.7.1",
122
- "typescript": "^5.3.3"
133
+ "tsx": "^4.19.1",
134
+ "typescript": "^5.6.2"
123
135
  },
124
136
  "lint-staged": {
125
137
  "**/*": "prettier --write --ignore-unknown"
package/readme.md CHANGED
@@ -27,7 +27,7 @@
27
27
 
28
28
  It offers a comprehensive structure for your API, including numerous features and best practices that will save you time.
29
29
 
30
- ## Video Introduction
30
+ ## 🎥 Video Introduction
31
31
 
32
32
  <div style="display: flex; justify-content: center;">
33
33
 
@@ -37,10 +37,18 @@ It offers a comprehensive structure for your API, including numerous features an
37
37
 
38
38
  </div>
39
39
 
40
- ## Documentation
40
+ ## 📚 Documentation
41
41
 
42
42
  Axe API has great documentation. Please [check it out in here](https://axe-api.com/).
43
43
 
44
- ## License
44
+ ## 👥 Contributors
45
+
46
+ <a href="https://github.com/axe-api/axe-api/graphs/contributors">
47
+ <img src="https://contrib.rocks/image?repo=axe-api/axe-api" />
48
+ </a>
49
+
50
+ Made with [contrib.rocks](https://contrib.rocks).
51
+
52
+ ## 📜 License
45
53
 
46
54
  [MIT License](LICENSE)