@aeriajs/node-http 0.0.150 → 0.0.151
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/dist/driver.d.ts +1 -1
- package/dist/driver.js +3 -3
- package/dist/driver.mjs +2 -2
- package/package.json +2 -2
package/dist/driver.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GenericRequest, GenericResponse } from '@aeriajs/types';
|
|
2
2
|
import type { ServerOptions } from '@aeriajs/http';
|
|
3
|
-
import * as http from 'http';
|
|
3
|
+
import * as http from 'node:http';
|
|
4
4
|
export declare const abstractRequest: (request: http.IncomingMessage) => Promise<GenericRequest>;
|
|
5
5
|
export declare const abstractResponse: (response: http.ServerResponse) => GenericResponse;
|
|
6
6
|
export declare const registerServer: (options: ServerOptions, cb: (req: GenericRequest, res: GenericResponse) => void | Promise<void>) => {
|
package/dist/driver.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.registerServer = exports.abstractResponse = exports.abstractRequest = void 0;
|
|
4
4
|
const types_1 = require("@aeriajs/types");
|
|
5
5
|
const common_1 = require("@aeriajs/common");
|
|
6
|
-
const http = require("http");
|
|
7
|
-
const
|
|
6
|
+
const http = require("node:http");
|
|
7
|
+
const node_url_1 = require("node:url");
|
|
8
8
|
const getBody = async ($req) => {
|
|
9
9
|
const bodyParts = [];
|
|
10
10
|
for await (const chunk of $req) {
|
|
@@ -25,7 +25,7 @@ const abstractRequest = async (request) => {
|
|
|
25
25
|
? undefined
|
|
26
26
|
: await getBody(request),
|
|
27
27
|
query: url.includes('?')
|
|
28
|
-
? (0,
|
|
28
|
+
? (0, node_url_1.parse)(url, true).query
|
|
29
29
|
: {},
|
|
30
30
|
payload: {},
|
|
31
31
|
fragments: [],
|
package/dist/driver.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { ERROR_SYMBOL_DESCRIPTION } from "@aeriajs/types";
|
|
3
3
|
import { isEndpointError } from "@aeriajs/common";
|
|
4
|
-
import * as http from "http";
|
|
5
|
-
import { parse as parseUrl } from "url";
|
|
4
|
+
import * as http from "node:http";
|
|
5
|
+
import { parse as parseUrl } from "node:url";
|
|
6
6
|
const getBody = async ($req) => {
|
|
7
7
|
const bodyParts = [];
|
|
8
8
|
for await (const chunk of $req) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/node-http",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.151",
|
|
4
4
|
"description": "## Installation",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@aeriajs/common": "^0.0.125",
|
|
30
|
-
"@aeriajs/http": "^0.0.
|
|
30
|
+
"@aeriajs/http": "^0.0.151"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"test": "echo skipping",
|