@tuyau/superjson 1.0.0 → 1.0.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.
|
@@ -7,7 +7,7 @@ var SuperjsonMiddleware = class {
|
|
|
7
7
|
async handle(ctx, next) {
|
|
8
8
|
const { request, response } = ctx;
|
|
9
9
|
const isSuperjsonRequest = this.#isSuperJsonRequest(ctx);
|
|
10
|
-
if (isSuperjsonRequest && request.hasBody()) {
|
|
10
|
+
if (isSuperjsonRequest && request.hasBody() && request.bodyType === "json") {
|
|
11
11
|
request.updateBody(SuperJSON.deserialize(request.body()));
|
|
12
12
|
}
|
|
13
13
|
await next();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuyau/superjson",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.1",
|
|
5
5
|
"description": "SuperJSON plugin for Tuyau and AdonisJS",
|
|
6
6
|
"author": "Julien Ripouteau <julien@ripouteau.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"superjson": "^2.2.6"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@adonisjs/assembler": "^8.
|
|
44
|
-
"@adonisjs/core": "^7.
|
|
45
|
-
"nock": "^
|
|
46
|
-
"@tuyau/core": "1.
|
|
43
|
+
"@adonisjs/assembler": "^8.5.2",
|
|
44
|
+
"@adonisjs/core": "^7.6.0",
|
|
45
|
+
"nock": "^15.0.1",
|
|
46
|
+
"@tuyau/core": "1.3.0"
|
|
47
47
|
},
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public",
|