@adonisjs/http-server 5.6.0 → 5.6.1

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/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # The MIT License
2
2
 
3
- Copyright 2021 Harminder Virk, contributors
3
+ Copyright 2022 Harminder Virk, contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
6
 
@@ -474,6 +474,7 @@ declare module '@ioc:Adonis/Core/Route' {
474
474
  */
475
475
  uuid(): {
476
476
  match: RegExp;
477
+ cast: (value: string) => string;
477
478
  };
478
479
  /**
479
480
  * Enforce value to be formatted as slug
@@ -20,6 +20,7 @@ export declare class RouteMatchers extends Macroable implements RouteMatchersCon
20
20
  */
21
21
  uuid(): {
22
22
  match: RegExp;
23
+ cast: (value: string) => string;
23
24
  };
24
25
  /**
25
26
  * Enforce value to be formatted as slug
@@ -26,7 +26,10 @@ class RouteMatchers extends macroable_1.Macroable {
26
26
  * Enforce value to be formatted as uuid
27
27
  */
28
28
  uuid() {
29
- return { match: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/ };
29
+ return {
30
+ match: /^[0-9a-zA-F]{8}-[0-9a-zA-F]{4}-[0-9a-zA-F]{4}-[0-9a-zA-F]{4}-[0-9a-zA-F]{12}$/,
31
+ cast: (value) => value.toLowerCase(),
32
+ };
30
33
  }
31
34
  /**
32
35
  * Enforce value to be formatted as slug
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adonisjs/http-server",
3
- "version": "5.6.0",
3
+ "version": "5.6.1",
4
4
  "description": "AdonisJS HTTP server with support packed with Routing and Cookies",
5
5
  "main": "build/providers/HttpServerProvider.js",
6
6
  "files": [
@@ -14,14 +14,14 @@
14
14
  "scripts": {
15
15
  "mrm": "mrm --preset=@adonisjs/mrm-preset",
16
16
  "pretest": "npm run lint",
17
- "test": "node japaFile.js && cross-env ASYNC_HOOKS=1 node japaFile.js",
17
+ "test": "node .bin/test.js",
18
18
  "clean": "del build",
19
19
  "compile": "npm run lint && npm run clean && tsc",
20
20
  "build": "npm run compile",
21
21
  "benchmark": "ENV_SILENT=true node build/benchmarks/index.js",
22
22
  "build:tmp": "npm run compile",
23
23
  "commit": "git-cz",
24
- "release": "np",
24
+ "release": "np --message=\"chore(release): %s\"",
25
25
  "version": "npm run build",
26
26
  "prepublishOnly": "npm run build",
27
27
  "lint": "eslint . --ext=.ts",
@@ -36,38 +36,40 @@
36
36
  "author": "virk,adonisjs",
37
37
  "license": "MIT",
38
38
  "devDependencies": {
39
- "@adonisjs/application": "^5.1.6",
40
- "@adonisjs/encryption": "^4.0.5",
41
- "@adonisjs/mrm-preset": "^4.1.2",
42
- "@adonisjs/require-ts": "^2.0.8",
43
- "@poppinss/dev-utils": "^1.1.5",
39
+ "@adonisjs/application": "^5.1.10",
40
+ "@adonisjs/encryption": "^4.0.7",
41
+ "@adonisjs/mrm-preset": "^5.0.2",
42
+ "@adonisjs/require-ts": "^2.0.10",
43
+ "@poppinss/dev-utils": "^2.0.2",
44
44
  "@types/cookie": "^0.4.1",
45
45
  "@types/ms": "^0.7.31",
46
- "@types/node": "^16.9.0",
46
+ "@types/node": "^17.0.21",
47
47
  "@types/pluralize": "0.0.29",
48
48
  "@types/proxy-addr": "^2.0.0",
49
49
  "@types/qs": "^6.9.7",
50
50
  "@types/supertest": "^2.0.11",
51
- "autocannon": "^7.4.0",
51
+ "autocannon": "^7.7.0",
52
+ "commitizen": "^4.2.4",
52
53
  "cross-env": "^7.0.3",
54
+ "cz-conventional-changelog": "^3.3.0",
53
55
  "del-cli": "^4.0.1",
54
- "eslint": "^7.31.0",
55
- "eslint-config-prettier": "^8.3.0",
56
- "eslint-plugin-adonis": "^1.3.3",
56
+ "eslint": "^8.9.0",
57
+ "eslint-config-prettier": "^8.4.0",
58
+ "eslint-plugin-adonis": "^2.1.0",
57
59
  "eslint-plugin-prettier": "^4.0.0",
58
- "fastify": "^3.21.0",
60
+ "fastify": "^3.27.2",
59
61
  "github-label-sync": "^2.0.2",
60
- "http-status-codes": "^2.1.4",
61
- "husky": "^7.0.2",
62
- "japa": "^3.1.1",
63
- "middie": "^5.3.0",
64
- "mrm": "^3.0.5",
65
- "np": "^7.5.0",
66
- "pem": "^1.14.4",
67
- "prettier": "^2.3.2",
62
+ "http-status-codes": "^2.2.0",
63
+ "husky": "^7.0.4",
64
+ "japa": "^4.0.0",
65
+ "middie": "^6.0.0",
66
+ "mrm": "^3.0.10",
67
+ "np": "^7.6.0",
68
+ "pem": "^1.14.6",
69
+ "prettier": "^2.5.1",
68
70
  "reflect-metadata": "^0.1.13",
69
- "supertest": "^6.1.6",
70
- "typescript": "^4.4.2"
71
+ "supertest": "^6.2.2",
72
+ "typescript": "^4.5.5"
71
73
  },
72
74
  "peerDependencies": {
73
75
  "@adonisjs/application": "^5.0.0",
@@ -92,23 +94,23 @@
92
94
  },
93
95
  "dependencies": {
94
96
  "@poppinss/matchit": "^3.1.2",
95
- "@poppinss/utils": "^3.1.5",
96
- "accepts": "^1.3.7",
97
- "co-compose": "^6.1.4",
98
- "content-disposition": "^0.5.3",
99
- "cookie": "^0.4.1",
100
- "destroy": "^1.0.4",
97
+ "@poppinss/utils": "^4.0.2",
98
+ "accepts": "^1.3.8",
99
+ "co-compose": "^7.0.1",
100
+ "content-disposition": "^0.5.4",
101
+ "cookie": "^0.4.2",
102
+ "destroy": "^1.1.0",
101
103
  "encodeurl": "^1.0.2",
102
104
  "etag": "^1.8.1",
103
105
  "fresh": "^0.5.2",
104
106
  "haye": "^3.0.0",
105
- "macroable": "^5.1.4",
106
- "mime-types": "^2.1.31",
107
+ "macroable": "^6.0.1",
108
+ "mime-types": "^2.1.34",
107
109
  "ms": "^2.1.3",
108
- "on-finished": "^2.3.0",
110
+ "on-finished": "^2.4.1",
109
111
  "pluralize": "^8.0.0",
110
112
  "proxy-addr": "^2.0.7",
111
- "qs": "^6.10.1",
113
+ "qs": "^6.10.3",
112
114
  "set-cookie-parser": "^2.4.8",
113
115
  "tmp-cache": "^1.1.0",
114
116
  "type-is": "^1.6.18",
@@ -132,5 +134,48 @@
132
134
  "publishConfig": {
133
135
  "access": "public",
134
136
  "tag": "latest"
137
+ },
138
+ "mrmConfig": {
139
+ "core": true,
140
+ "license": "MIT",
141
+ "services": [
142
+ "github-actions"
143
+ ],
144
+ "minNodeVersion": "14.15.4",
145
+ "probotApps": [
146
+ "stale",
147
+ "lock"
148
+ ],
149
+ "runGhActionsOnWindows": false
150
+ },
151
+ "eslintConfig": {
152
+ "extends": [
153
+ "plugin:adonis/typescriptPackage",
154
+ "prettier"
155
+ ],
156
+ "plugins": [
157
+ "prettier"
158
+ ],
159
+ "rules": {
160
+ "prettier/prettier": [
161
+ "error",
162
+ {
163
+ "endOfLine": "auto"
164
+ }
165
+ ]
166
+ }
167
+ },
168
+ "eslintIgnore": [
169
+ "build"
170
+ ],
171
+ "prettier": {
172
+ "trailingComma": "es5",
173
+ "semi": false,
174
+ "singleQuote": true,
175
+ "useTabs": false,
176
+ "quoteProps": "consistent",
177
+ "bracketSpacing": true,
178
+ "arrowParens": "always",
179
+ "printWidth": 100
135
180
  }
136
181
  }