equipped 4.2.2 → 4.2.4

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [4.2.4](https://github.com/kevinand11/equipped/compare/v4.2.3...v4.2.4) (2023-11-12)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * pass hex string for id ([07b31bb](https://github.com/kevinand11/equipped/commit/07b31bbb78d845b97bbd18570b89f4fc08470444))
11
+
12
+ ### [4.2.3](https://github.com/kevinand11/equipped/compare/v4.2.2...v4.2.3) (2023-11-12)
13
+
5
14
  ### [4.2.2](https://github.com/kevinand11/equipped/compare/v4.2.1...v4.2.2) (2023-11-07)
6
15
 
7
16
 
@@ -21,8 +21,8 @@ const exit_1 = require("../../exit");
21
21
  const instance_1 = require("../../instance");
22
22
  const retry_1 = require("../../utils/retry");
23
23
  const validations_1 = require("../../validations");
24
- const debezium_1 = require("../debezium");
25
24
  const _instance_1 = require("../_instance");
25
+ const debezium_1 = require("../debezium");
26
26
  class MongoDbChange extends _instance_1.DbChange {
27
27
  constructor(model, callbacks, mapper) {
28
28
  super(callbacks, mapper);
@@ -52,7 +52,8 @@ class MongoDbChange extends _instance_1.DbChange {
52
52
  } : {}),
53
53
  'collection.include.list': dbColName
54
54
  });
55
- const TestId = new mongoose_1.default.Types.ObjectId('__equipped__');
55
+ const hexId = '5f5f65717569707065645f5f';
56
+ const TestId = new mongoose_1.default.Types.ObjectId(hexId);
56
57
  const hydrate = (data) => model.hydrate({
57
58
  ...data, _id: makeId(data._id['$oid'] ?? data._id)
58
59
  }).toObject({ getters: true, virtuals: true });
package/lib/server/app.js CHANGED
@@ -54,7 +54,7 @@ class Server {
54
54
  if (settings.useRateLimit)
55
55
  __classPrivateFieldGet(this, _Server_expressApp, "f").use((0, express_rate_limit_1.default)({
56
56
  windowMs: settings.rateLimitPeriodInMs,
57
- max: settings.rateLimit,
57
+ limit: settings.rateLimit,
58
58
  handler: (_, res) => res.status(statusCodes_1.StatusCodes.TooManyRequests).json([{ message: 'Too Many Requests' }])
59
59
  }));
60
60
  if (settings.useSlowDown)
@@ -5,7 +5,7 @@ import { AuthUser, RefreshUser } from '../../utils/authUser';
5
5
  type HeaderKeys = 'AccessToken' | 'RefreshToken' | 'Referer' | 'ContentType' | 'UserAgent';
6
6
  export declare class Request {
7
7
  #private;
8
- readonly ip: string;
8
+ readonly ip: string | undefined;
9
9
  readonly method: string;
10
10
  readonly path: string;
11
11
  readonly body: Record<string, any>;
@@ -19,7 +19,7 @@ export declare class Request {
19
19
  refreshUser: null | RefreshUser;
20
20
  pendingError: null | CustomError;
21
21
  constructor({ ip, body, cookies, params, query, method, path, headers, files, data }: {
22
- ip: string;
22
+ ip: string | undefined;
23
23
  body: Record<string, any>;
24
24
  cookies: Record<string, any>;
25
25
  params: Record<string, any>;
@@ -48,7 +48,7 @@ class Request {
48
48
  type: f.mimetype,
49
49
  size: f.size,
50
50
  isTruncated: f.truncated,
51
- data: Buffer.from(f.data),
51
+ data: f.data,
52
52
  duration: await (0, media_1.getMediaDuration)(f.data)
53
53
  })));
54
54
  return [key, fileArray];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "equipped",
3
- "version": "4.2.2",
3
+ "version": "4.2.4",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "main": "lib/index.js",
@@ -15,22 +15,22 @@
15
15
  "author": "",
16
16
  "license": "ISC",
17
17
  "devDependencies": {
18
- "@commitlint/cli": "^17.7.1",
19
- "@commitlint/config-conventional": "^17.7.0",
20
- "@types/amqplib": "^0.10.1",
21
- "@types/bcryptjs": "^2.4.3",
18
+ "@commitlint/cli": "^18.4.0",
19
+ "@commitlint/config-conventional": "^18.4.0",
20
+ "@types/amqplib": "^0.10.4",
21
+ "@types/bcryptjs": "^2.4.6",
22
22
  "@types/bull": "^3.15.9",
23
- "@types/cors": "^2.8.14",
24
- "@types/express": "^4.17.17",
25
- "@types/express-fileupload": "^1.4.1",
26
- "@types/jsonwebtoken": "^9.0.2",
27
- "@types/morgan": "^1.9.5",
28
- "@types/node": "^20.6.0",
29
- "@types/pug": "^2.0.6",
30
- "@types/supertest": "^2.0.12",
31
- "@typescript-eslint/eslint-plugin": "^6.6.0",
32
- "@typescript-eslint/parser": "^6.6.0",
33
- "eslint": "^8.49.0",
23
+ "@types/cors": "^2.8.16",
24
+ "@types/express": "^4.17.21",
25
+ "@types/express-fileupload": "^1.4.4",
26
+ "@types/jsonwebtoken": "^9.0.5",
27
+ "@types/morgan": "^1.9.9",
28
+ "@types/node": "^20.9.0",
29
+ "@types/pug": "^2.0.9",
30
+ "@types/supertest": "^2.0.16",
31
+ "@typescript-eslint/eslint-plugin": "^6.10.0",
32
+ "@typescript-eslint/parser": "^6.10.0",
33
+ "eslint": "^8.53.0",
34
34
  "eslint-plugin-promise": "^6.1.1",
35
35
  "husky": "^8.0.3",
36
36
  "standard-version": "^9.5.0",
@@ -39,31 +39,31 @@
39
39
  "dependencies": {
40
40
  "amqp-connection-manager": "^4.1.14",
41
41
  "amqplib": "^0.10.3",
42
- "axios": "^1.5.0",
42
+ "axios": "^1.6.1",
43
43
  "bcryptjs": "^2.4.3",
44
- "bull": "^4.11.3",
44
+ "bull": "^4.11.5",
45
45
  "chalk": "^4.1.2",
46
46
  "compression": "^1.7.4",
47
47
  "cookie-parser": "^1.4.6",
48
48
  "cors": "^2.8.5",
49
49
  "dotenv": "^16.3.1",
50
50
  "express": "^4.18.2",
51
- "express-fileupload": "^1.4.0",
52
- "express-rate-limit": "^6.11.0",
53
- "express-slow-down": "^1.6.0",
54
- "helmet": "^7.0.0",
51
+ "express-fileupload": "^1.4.2",
52
+ "express-rate-limit": "^7.1.4",
53
+ "express-slow-down": "^2.0.0",
54
+ "helmet": "^7.1.0",
55
55
  "jsonwebtoken": "^9.0.2",
56
- "jwks-rsa": "^3.0.1",
56
+ "jwks-rsa": "^3.1.0",
57
57
  "kafkajs": "^2.2.4",
58
- "mongoose": "^7.5.0",
58
+ "mongoose": "^8.0.0",
59
59
  "mongoose-lean-defaults": "^2.2.1",
60
60
  "mongoose-lean-getters": "^1.1.0",
61
61
  "mongoose-lean-virtuals": "^0.9.1",
62
62
  "morgan": "^1.10.0",
63
- "music-metadata": "^7.0.0",
63
+ "music-metadata": "^7.14.0",
64
64
  "path-to-regexp": "^6.2.1",
65
65
  "pug": "^3.0.2",
66
- "redis": "^4.6.8",
66
+ "redis": "^4.6.10",
67
67
  "socket.io": "4.7.2",
68
68
  "supertest": "^6.3.3",
69
69
  "valleyed": "4.2.2"