@adonisjs/http-server 5.7.1 → 5.7.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.
|
@@ -47,7 +47,7 @@ class BriskRoute extends macroable_1.Macroable {
|
|
|
47
47
|
if (this.route) {
|
|
48
48
|
throw new utils_1.Exception(`\`Route.${invokedBy}\` and \`${this.invokedBy}\` cannot be called together`, 500, 'E_MULTIPLE_BRISK_HANDLERS');
|
|
49
49
|
}
|
|
50
|
-
this.route = new Route_1.Route(this.pattern, methods || ['
|
|
50
|
+
this.route = new Route_1.Route(this.pattern, methods || ['GET', 'HEAD'], handler, this.globalMatchers);
|
|
51
51
|
this.invokedBy = invokedBy;
|
|
52
52
|
return this.route;
|
|
53
53
|
}
|
|
@@ -62,11 +62,11 @@ class RouteResource extends macroable_1.Macroable {
|
|
|
62
62
|
const fullUrl = `${resourceTokens
|
|
63
63
|
.map((token) => `${token}/:${helpers_1.string.snakeCase((0, pluralize_1.singular)(token))}_id`)
|
|
64
64
|
.join('/')}/${mainResource}`;
|
|
65
|
-
this.makeRoute(fullUrl, ['
|
|
66
|
-
this.makeRoute(`${fullUrl}/create`, ['
|
|
65
|
+
this.makeRoute(fullUrl, ['GET', 'HEAD'], 'index');
|
|
66
|
+
this.makeRoute(`${fullUrl}/create`, ['GET', 'HEAD'], 'create');
|
|
67
67
|
this.makeRoute(fullUrl, ['POST'], 'store');
|
|
68
|
-
this.makeRoute(`${this.shallow ? mainResource : fullUrl}/:id`, ['
|
|
69
|
-
this.makeRoute(`${this.shallow ? mainResource : fullUrl}/:id/edit`, ['
|
|
68
|
+
this.makeRoute(`${this.shallow ? mainResource : fullUrl}/:id`, ['GET', 'HEAD'], 'show');
|
|
69
|
+
this.makeRoute(`${this.shallow ? mainResource : fullUrl}/:id/edit`, ['GET', 'HEAD'], 'edit');
|
|
70
70
|
this.makeRoute(`${this.shallow ? mainResource : fullUrl}/:id`, ['PUT', 'PATCH'], 'update');
|
|
71
71
|
this.makeRoute(`${this.shallow ? mainResource : fullUrl}/:id`, ['DELETE'], 'destroy');
|
|
72
72
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonisjs/http-server",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.4",
|
|
4
4
|
"description": "AdonisJS HTTP server with support packed with Routing and Cookies",
|
|
5
5
|
"main": "build/providers/HttpServerProvider.js",
|
|
6
6
|
"files": [
|
|
@@ -36,44 +36,44 @@
|
|
|
36
36
|
"author": "virk,adonisjs",
|
|
37
37
|
"license": "MIT",
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@adonisjs/application": "^5.2.
|
|
40
|
-
"@adonisjs/encryption": "^4.0.
|
|
39
|
+
"@adonisjs/application": "^5.2.1",
|
|
40
|
+
"@adonisjs/encryption": "^4.0.8",
|
|
41
41
|
"@adonisjs/mrm-preset": "^5.0.3",
|
|
42
|
-
"@adonisjs/require-ts": "^2.0.
|
|
43
|
-
"@japa/assert": "^1.3.
|
|
44
|
-
"@japa/run-failed-tests": "^1.0.
|
|
45
|
-
"@japa/runner": "^2.0.
|
|
46
|
-
"@japa/spec-reporter": "^1.1.
|
|
47
|
-
"@poppinss/dev-utils": "^2.0.
|
|
42
|
+
"@adonisjs/require-ts": "^2.0.11",
|
|
43
|
+
"@japa/assert": "^1.3.3",
|
|
44
|
+
"@japa/run-failed-tests": "^1.0.7",
|
|
45
|
+
"@japa/runner": "^2.0.6",
|
|
46
|
+
"@japa/spec-reporter": "^1.1.12",
|
|
47
|
+
"@poppinss/dev-utils": "^2.0.3",
|
|
48
48
|
"@types/cookie": "^0.4.1",
|
|
49
49
|
"@types/ms": "^0.7.31",
|
|
50
|
-
"@types/node": "^17.0.
|
|
50
|
+
"@types/node": "^17.0.23",
|
|
51
51
|
"@types/pluralize": "0.0.29",
|
|
52
52
|
"@types/proxy-addr": "^2.0.0",
|
|
53
53
|
"@types/qs": "^6.9.7",
|
|
54
54
|
"@types/supertest": "^2.0.12",
|
|
55
|
-
"autocannon": "^7.
|
|
55
|
+
"autocannon": "^7.8.1",
|
|
56
56
|
"commitizen": "^4.2.4",
|
|
57
57
|
"cross-env": "^7.0.3",
|
|
58
58
|
"cz-conventional-changelog": "^3.3.0",
|
|
59
59
|
"del-cli": "^4.0.1",
|
|
60
|
-
"eslint": "^8.
|
|
60
|
+
"eslint": "^8.12.0",
|
|
61
61
|
"eslint-config-prettier": "^8.5.0",
|
|
62
62
|
"eslint-plugin-adonis": "^2.1.0",
|
|
63
63
|
"eslint-plugin-prettier": "^4.0.0",
|
|
64
64
|
"fastify": "^3.27.4",
|
|
65
|
-
"github-label-sync": "^2.0
|
|
65
|
+
"github-label-sync": "^2.2.0",
|
|
66
66
|
"http-status-codes": "^2.2.0",
|
|
67
67
|
"husky": "^7.0.4",
|
|
68
68
|
"middie": "^6.0.0",
|
|
69
69
|
"mrm": "^4.0.0",
|
|
70
70
|
"np": "^7.6.1",
|
|
71
71
|
"pem": "^1.14.6",
|
|
72
|
-
"prettier": "^2.6.
|
|
72
|
+
"prettier": "^2.6.2",
|
|
73
73
|
"reflect-metadata": "^0.1.13",
|
|
74
74
|
"supertest": "^6.2.2",
|
|
75
75
|
"ts-node": "^10.7.0",
|
|
76
|
-
"typescript": "^4.6.
|
|
76
|
+
"typescript": "^4.6.3"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"@adonisjs/application": "^5.0.0",
|
|
@@ -98,9 +98,9 @@
|
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
100
|
"@poppinss/matchit": "^3.1.2",
|
|
101
|
-
"@poppinss/utils": "^4.0.
|
|
101
|
+
"@poppinss/utils": "^4.0.3",
|
|
102
102
|
"accepts": "^1.3.8",
|
|
103
|
-
"co-compose": "^7.0.
|
|
103
|
+
"co-compose": "^7.0.2",
|
|
104
104
|
"content-disposition": "^0.5.4",
|
|
105
105
|
"cookie": "^0.4.2",
|
|
106
106
|
"destroy": "^1.2.0",
|
|
@@ -108,14 +108,13 @@
|
|
|
108
108
|
"etag": "^1.8.1",
|
|
109
109
|
"fresh": "^0.5.2",
|
|
110
110
|
"haye": "^3.0.0",
|
|
111
|
-
"macroable": "^7.0.
|
|
111
|
+
"macroable": "^7.0.1",
|
|
112
112
|
"mime-types": "^2.1.35",
|
|
113
113
|
"ms": "^2.1.3",
|
|
114
114
|
"on-finished": "^2.4.1",
|
|
115
115
|
"pluralize": "^8.0.0",
|
|
116
116
|
"proxy-addr": "^2.0.7",
|
|
117
117
|
"qs": "^6.10.3",
|
|
118
|
-
"set-cookie-parser": "^2.4.8",
|
|
119
118
|
"tmp-cache": "^1.1.0",
|
|
120
119
|
"type-is": "^1.6.18",
|
|
121
120
|
"vary": "^1.1.2"
|