Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dx-server

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dx-server - npm Package Compare versions

Comparing version 0.0.1-pre-1 to 0.0.1-pre-10

12

cjs/express.js

@@ -40,6 +40,4 @@ "use strict";

case undefined:
// not found
buffer = Buffer.from('not found', charset);
res.statusCode = 404;
break;
// skip response. Some middleware may handle it outside the chain. For example, express middleware
return ret;
default:

@@ -63,3 +61,3 @@ if (!res.getHeader('content-type'))

else
await (0, node_util_1.promisify)(res.end.bind(res))(); // to be consistent, we end the response immediately
await (0, node_util_1.promisify)(res.end.bind(res))(undefined); // to be consistent, we end the response immediately
}

@@ -98,3 +96,3 @@ else {

}
await (0, node_util_1.promisify)(res.end.bind(res))();
await (0, node_util_1.promisify)(res.end.bind(res))(undefined); // some express middleware, such as express-session, requires explicitly passing chunk
}

@@ -146,2 +144,2 @@ return ret;

exports.setRedirect = setRedirect;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwcmVzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9leHByZXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLG1DQUE4QjtBQUM5Qix5Q0FBbUM7QUFDbkMsdUNBQWdEO0FBQ2hELDZDQUF5RTtBQUU1RCxRQUFBLGNBQWMsR0FBRyxJQUFBLHdCQUFXLEVBQUMsS0FBSyxFQUM5QyxFQUFDLFlBQVksS0FFVCxFQUFFLEVBQ0wsRUFBRTtJQUNILE9BQU87UUFDTixRQUFRLEVBQUUsWUFBWTtLQTBCckIsQ0FBQTtBQUNILENBQUMsRUFBRSxLQUFLLEVBQUUsR0FBRyxFQUFFLEVBQUMsSUFBSSxFQUFFLElBQUksRUFBRSxPQUFPLEVBQUUsU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LENBQUE7SUFDeEMsT0FBTyxDQUFDLElBQUksR0FBRyxNQUFNLENBQUE7SUFDckIsT0FBTyxDQUFDLElBQUksR0FBRyxRQUFRLENBQUE7QUFDeEIsQ0FBQztBQU5ELDhCQU1DO0FBRUQsU0FBZ0IsT0FBTyxDQUFDLElBQVMsRUFBRSxFQUFDLE1BQU0sRUFBRSxRQUFRLEtBR2hELEVBQUU7SUFDTCxNQUFNLFFBQVEsR0FBRyw0QkFBZSxDQUFDLEtBQUssQ0FBQTtJQUN0QyxJQUFJLE1BQU07UUFBRSxRQUFRLENBQUMsVUFBVSxHQUFHLE1BQU0sQ0FBQTtJQUV4QyxNQUFNLE9BQU8sR0FBRyxzQkFBYyxDQUFDLEtBQUssQ0FBQTtJQUNwQyxPQUFPLENBQUMsSUFBSSxHQUFHLElBQUksQ0FBQTtJQUNuQixPQUFPLENBQUMsSUFBSSxHQUFHLE1BQU0sQ0FBQTtJQUNyQixJQUFJLFFBQVEsS0FBSyxTQUFTO1FBQUUsT0FBTyxDQUFDLFFBQVEsR0FBRyxRQUFRLENBQUE7QUFDeEQsQ0FBQztBQVhELDBCQVdDO0FBRUQsU0FBZ0IsV0FBVyxDQUFDLEdBQVcsRUFBRSxNQUFpQjtJQUN6RCxNQUFNLFFBQVEsR0FBRyw0QkFBZSxDQUFDLEtBQUssQ0FBQTtJQUN0QyxNQUFNLE9BQU8sR0FBRyxzQkFBYyxDQUFDLEtBQUssQ0FBQTtJQUNwQyxRQUFRLENBQUMsVUFBVSxHQUFHLE1BQU0sQ0FBQTtJQUM1QixPQUFPLENBQUMsSUFBSSxHQUFHLEdBQUcsQ0FBQTtJQUNsQixPQUFPLENBQUMsSUFBSSxHQUFHLFVBQVUsQ0FBQTtBQUMxQixDQUFDO0FBTkQsa0NBTUMifQ==

@@ -1,2 +0,3 @@

import { type Express } from 'express';
export declare const expressApp: (setup: (app: Express) => any) => any;
import { type Express, type Router } from 'express';
export declare const expressApp: (setup: (app: Express) => any) => (next: any) => Promise<void>;
export declare const expressRouter: (setup: (router: Router) => any) => (next: any) => Promise<void>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.expressApp = void 0;
exports.expressRouter = exports.expressApp = void 0;
const express_1 = require("express");
const context_js_1 = require("./context.js");
const jdefer_1 = require("jdefer");
const expressApp = (setup) => {
const symbol = Symbol('expressApp');
const app = (0, express_1.default)();
setup(app);
return app.bind(app, context_js_1.requestContext.value, context_js_1.responseContext.value);
app.use((req, _res, _next) => req[symbol].resolve());
app.use((err, req, _res, _next) => req[symbol].reject(err));
return async (next) => {
const req = context_js_1.requestContext.value;
const defer = (0, jdefer_1.default)();
req[symbol] = defer;
app(req, context_js_1.responseContext.value);
await defer.promise;
await next();
};
};
exports.expressApp = expressApp;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwcmVzc0FwcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9leHByZXNzQXBwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFDQUE2QztBQUM3Qyw2Q0FBNEQ7QUFFckQsTUFBTSxVQUFVLEdBQUcsQ0FBQyxLQUE0QixFQUFFLEVBQUU7SUFDMUQsTUFBTSxHQUFHLEdBQUcsSUFBQSxpQkFBTyxHQUFFLENBQUE7SUFDckIsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFBO0lBQ1YsT0FBTyxHQUFHLENBQUMsSUFBSSxDQUFDLEdBQUcsRUFBRSwyQkFBYyxDQUFDLEtBQUssRUFBRSw0QkFBZSxDQUFDLEtBQUssQ0FBQyxDQUFBO0FBQ2xFLENBQUMsQ0FBQTtBQUpZLFFBQUEsVUFBVSxjQUl0QiJ9
const expressRouter = (setup) => {
const symbol = Symbol('expressRouter');
const router = express_1.default.Router();
setup(router);
router.use((req, _res, _next) => req[symbol].resolve());
router.use((err, req, _res, _next) => req[symbol].reject(err));
return async (next) => {
const req = context_js_1.requestContext.value;
const defer = (0, jdefer_1.default)();
req[symbol] = defer;
router(req, context_js_1.responseContext.value);
await defer.promise;
await next();
};
};
exports.expressRouter = expressRouter;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwcmVzc0FwcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9leHByZXNzQXBwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFDQUEwRDtBQUMxRCw2Q0FBNEQ7QUFFNUQsbUNBQThCO0FBRXZCLE1BQU0sVUFBVSxHQUFHLENBQUMsS0FBNEIsRUFBRSxFQUFFO0lBQzFELE1BQU0sTUFBTSxHQUFHLE1BQU0sQ0FBQyxZQUFZLENBQUMsQ0FBQTtJQUVuQyxNQUFNLEdBQUcsR0FBRyxJQUFBLGlCQUFPLEdBQUUsQ0FBQTtJQUNyQixLQUFLLENBQUMsR0FBRyxDQUFDLENBQUE7SUFDVixHQUFHLENBQUMsR0FBRyxDQUFDLENBQUMsR0FBRyxFQUFFLElBQUksRUFBRSxLQUFLLEVBQUUsRUFBRSxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUMsQ0FBQyxPQUFPLEVBQUUsQ0FBQyxDQUFBO0lBQ3BELEdBQUcsQ0FBQyxHQUFHLENBQUMsQ0FBQyxHQUFHLEVBQUUsR0FBRyxFQUFFLElBQUksRUFBRSxLQUFLLEVBQUUsRUFBRSxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUMsQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQTtJQUMzRCxPQUFPLEtBQUssRUFBQyxJQUFJLEVBQUMsRUFBRTtRQUNuQixNQUFNLEdBQUcsR0FBRywyQkFBYyxDQUFDLEtBQUssQ0FBQTtRQUNoQyxNQUFNLEtBQUssR0FBRyxJQUFBLGdCQUFTLEdBQUUsQ0FBQTtRQUN6QixHQUFHLEN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kIsTUFBTSxDQUFDLEdBQUcsRUFBRSw0QkFBZSxDQUFDLEtBQUssQ0FBQyxDQUFBO1FBQ2xDLE1BQU0sS0FBSyxDQUFDLE9BQU8sQ0FBQTtRQUNuQixNQUFNLElBQUksRUFBRSxDQUFBO0lBQ2IsQ0FBQyxDQUFBO0FBQ0YsQ0FBQyxDQUFBO0FBZlksUUFBQSxhQUFhLGlCQWV6QiJ9

@@ -1,6 +0,6 @@

export { requestContext, responseContext } from './context.js';
export { expressContext, setHtml, setJson } from './express.js';
export { makeContext, requestContext, responseContext } from './context.js';
export { expressContext, setHtml, setJson, setBuffer, setRedirect, setText } from './express.js';
export { bufferBodyContext, jsonBodyContext, queryContext, rawBodyContext, textBodyContext, urlencodedBodyContext } from './body.js';
export { router } from './route.js';
export { catchApiError, catchError, notFound, notFoundApi } from './error.js';
export { expressApp } from './expressApp.js';
export { expressApp, expressRouter } from './expressApp.js';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.expressApp = exports.notFoundApi = exports.notFound = exports.catchError = exports.catchApiError = exports.router = exports.urlencodedBodyContext = exports.textBodyContext = exports.rawBodyContext = exports.queryContext = exports.jsonBodyContext = exports.bufferBodyContext = exports.setJson = exports.setHtml = exports.expressContext = exports.responseContext = exports.requestContext = void 0;
exports.expressRouter = exports.expressApp = exports.notFoundApi = exports.notFound = exports.catchError = exports.catchApiError = exports.router = exports.urlencodedBodyContext = exports.textBodyContext = exports.rawBodyContext = exports.queryContext = exports.jsonBodyContext = exports.bufferBodyContext = exports.setText = exports.setRedirect = exports.setBuffer = exports.setJson = exports.setHtml = exports.expressContext = exports.responseContext = exports.requestContext = exports.makeContext = void 0;
var context_js_1 = require("./context.js");
Object.defineProperty(exports, "makeContext", { enumerable: true, get: function () { return context_js_1.makeContext; } });
Object.defineProperty(exports, "requestContext", { enumerable: true, get: function () { return context_js_1.requestContext; } });

@@ -11,2 +12,5 @@ Object.defineProperty(exports, "responseContext", { enumerable: true, get: function () { return context_js_1.responseContext; } });

Object.defineProperty(exports, "setJson", { enumerable: true, get: function () { return express_js_1.setJson; } });
Object.defineProperty(exports, "setBuffer", { enumerable: true, get: function () { return express_js_1.setBuffer; } });
Object.defineProperty(exports, "setRedirect", { enumerable: true, get: function () { return express_js_1.setRedirect; } });
Object.defineProperty(exports, "setText", { enumerable: true, get: function () { return express_js_1.setText; } });
var body_js_1 = require("./body.js");

@@ -28,2 +32,3 @@ Object.defineProperty(exports, "bufferBodyContext", { enumerable: true, get: function () { return body_js_1.bufferBodyContext; } });

Object.defineProperty(exports, "expressApp", { enumerable: true, get: function () { return expressApp_js_1.expressApp; } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkNBQTREO0FBQXBELDRHQUFBLGNBQWMsT0FBQTtBQUFFLDZHQUFBLGVBQWUsT0FBQTtBQUN2QywyQ0FBNkQ7QUFBckQsNEdBQUEsY0FBYyxPQUFBO0FBQUUscUdBQUEsT0FBTyxPQUFBO0FBQUUscUdBQUEsT0FBTyxPQUFBO0FBQ3hDLHFDQU9rQjtBQU5qQiw0R0FBQSxpQkFBaUIsT0FBQTtBQUNqQiwwR0FBQSxlQUFlLE9BQUE7QUFDZix1R0FBQSxZQUFZLE9BQUE7QUFDWix5R0FBQSxjQUFjLE9BQUE7QUFDZCwwR0FBQSxlQUFlLE9BQUE7QUFDZixnSEFBQSxxQkFBcUIsT0FBQTtBQUV0Qix1Q0FBaUM7QUFBekIsa0dBQUEsTUFBTSxPQUFBO0FBQ2QsdUNBQTJFO0FBQW5FLHlHQUFBLGFBQWEsT0FBQTtBQUFFLHNHQUFBLFVBQVUsT0FBQTtBQUFFLG9HQUFBLFFBQVEsT0FBQTtBQUFFLHVHQUFBLFdBQVcsT0FBQTtBQUN4RCxpREFBMEM7QUFBbEMsMkdBQUEsVUFBVSxPQUFBIn0=
Object.defineProperty(exports, "expressRouter", { enumerable: true, get: function () { return expressApp_js_1.expressRouter; } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkNBQXlFO0FBQWpFLHlHQUFBLFdBQVcsT0FBQTtBQUFFLDRHQUFBLGNBQWMsT0FBQTtBQUFFLDZHQUFBLGVBQWUsT0FBQTtBQUNwRCwyQ0FPcUI7QUFOcEIsNEdBQUEsY0FBYyxPQUFBO0FBQ2QscUdBQUEsT0FBTyxPQUFBO0FBQ1AscUdBQUEsT0FBTyxPQUFBO0FBQ1AsdUdBQUEsU0FBUyxPQUFBO0FBQ1QseUdBQUEsV0FBVyxPQUFBO0FBQ1gscUdBQUEsT0FBTyxPQUFBO0FBRVIscUNBT2tCO0FBTmpCLDRHQUFBLGlCQUFpQixPQUFBO0FBQ2pCLDBHQUFBLGVBQWUsT0FBQTtBQUNmLHVHQUFBLFlBQVksT0FBQTtBQUNaLHlHQUFBLGNBQWMsT0FBQTtBQUNkLDBHQUFBLGVBQWUsT0FBQTtBQUNmLGdIQUFBLHFCQUFxQixPQUFBO0FBRXRCLHVDQUFpQztBQUF6QixrR0FBQSxNQUFNLE9BQUE7QUFDZCx1Q0FBMkU7QUFBbkUseUdBQUEsYUFBYSxPQUFBO0FBQUUsc0dBQUEsVUFBVSxPQUFBO0FBQUUsb0dBQUEsUUFBUSxPQUFBO0FBQUUsdUdBQUEsV0FBVyxPQUFBO0FBQ3hELGlEQUF5RDtBQUFqRCwyR0FBQSxVQUFVLE9BQUE7QUFBRSw4R0FBQSxhQUFhLE9BQUEifQ==

@@ -37,6 +37,4 @@ import makeDefer from 'jdefer';

case undefined:
// not found
buffer = Buffer.from('not found', charset);
res.statusCode = 404;
break;
// skip response. Some middleware may handle it outside the chain. For example, express middleware
return ret;
default:

@@ -60,3 +58,3 @@ if (!res.getHeader('content-type'))

else
await promisify(res.end.bind(res))(); // to be consistent, we end the response immediately
await promisify(res.end.bind(res))(undefined); // to be consistent, we end the response immediately
}

@@ -95,3 +93,3 @@ else {

}
await promisify(res.end.bind(res))();
await promisify(res.end.bind(res))(undefined); // some express middleware, such as express-session, requires explicitly passing chunk
}

@@ -138,2 +136,2 @@ return ret;

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwcmVzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9leHByZXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sU0FBUyxNQUFNLFFBQVEsQ0FBQTtBQUM5QixPQUFPLEVBQUMsU0FBUyxFQUFDLE1BQU0sV0FBVyxDQUFBO0FBQ25DLE9BQU8sRUFBQyxTQUFTLEVBQUUsV0FBVyxFQUFDLE1BQU0sV0FBVyxDQUFBO0FBQ2hELE9BQU8sRUFBQyxXQUFXLEVBQUUsY0FBYyxFQUFFLGVBQWUsRUFBQyxNQUFNLGNBQWMsQ0FBQTtBQUV6RSxNQUFNLENBQUMsTUFBTSxjQUFjLEdBQUcsV0FBVyxDQUFDLEtBQUssRUFDOUMsRUFBQyxZQUFZLEtBRVQsRUFBRSxFQUNMLEVBQUU7SUFDSCxPQUFPO1FBQ04sUUFBUSxFQUFFLFlBQVk7S0EwQnJCLENBQUE7QUFDSCxDQUFDLEVBQUUsS0FBSyxFQUFFLEdBQUcsRUFBRSxFQUFDLElBQUksRUFBRSxJQUFJLEVBQUUsT0FBTyxFQUFFLFFBQVEsRUFBQyxFQUFFLEVBQUU7SUFDakQsTUFBTSxHQUFHLEdBQUcsZUFBZSxDQUFDLEtBQUssQ0FBQTtJQUNqQyxNQUFNLGNBQWMsR0FBRyx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PLENBQUMsSUFBSSxHQUFHLFFBQVEsQ0FBQTtBQUN4QixDQUFDO0FBRUQsTUFBTSxVQUFVLE9BQU8sQ0FBQyxJQUFTLEVBQUUsRUFBQyxNQUFNLEVBQUUsUUFBUSxLQUdoRCxFQUFFO0lBQ0wsTUFBTSxRQUFRLEdBQUcsZUFBZSxDQUFDLEtBQUssQ0FBQTtJQUN0QyxJQUFJLE1BQU07UUFBRSxRQUFRLENBQUMsVUFBVSxHQUFHLE1BQU0sQ0FBQTtJQUV4QyxNQUFNLE9BQU8sR0FBRyxjQUFjLENBQUMsS0FBSyxDQUFBO0lBQ3BDLE9BQU8sQ0FBQyxJQUFJLEdBQUcsSUFBSSxDQUFBO0lBQ25CLE9BQU8sQ0FBQyxJQUFJLEdBQUcsTUFBTSxDQUFBO0lBQ3JCLElBQUksUUFBUSxLQUFLLFNBQVM7UUFBRSxPQUFPLENBQUMsUUFBUSxHQUFHLFFBQVEsQ0FBQTtBQUN4RCxDQUFDO0FBRUQsTUFBTSxVQUFVLFdBQVcsQ0FBQyxHQUFXLEVBQUUsTUFBaUI7SUFDekQsTUFBTSxRQUFRLEdBQUcsZUFBZSxDQUFDLEtBQUssQ0FBQTtJQUN0QyxNQUFNLE9BQU8sR0FBRyxjQUFjLENBQUMsS0FBSyxDQUFBO0lBQ3BDLFFBQVEsQ0FBQyxVQUFVLEdBQUcsTUFBTSxDQUFBO0lBQzVCLE9BQU8sQ0FBQyxJQUFJLEdBQUcsR0FBRyxDQUFBO0lBQ2xCLE9BQU8sQ0FBQyxJQUFJLEdBQUcsVUFBVSxDQUFBO0FBQzFCLENBQUMifQ==

@@ -1,2 +0,3 @@

import { type Express } from 'express';
export declare const expressApp: (setup: (app: Express) => any) => any;
import { type Express, type Router } from 'express';
export declare const expressApp: (setup: (app: Express) => any) => (next: any) => Promise<void>;
export declare const expressRouter: (setup: (router: Router) => any) => (next: any) => Promise<void>;
import express from 'express';
import { requestContext, responseContext } from './context.js';
import makeDefer from 'jdefer';
export const expressApp = (setup) => {
const symbol = Symbol('expressApp');
const app = express();
setup(app);
return app.bind(app, requestContext.value, responseContext.value);
app.use((req, _res, _next) => req[symbol].resolve());
app.use((err, req, _res, _next) => req[symbol].reject(err));
return async (next) => {
const req = requestContext.value;
const defer = makeDefer();
req[symbol] = defer;
app(req, responseContext.value);
await defer.promise;
await next();
};
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwcmVzc0FwcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9leHByZXNzQXBwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sT0FBdUIsTUFBTSxTQUFTLENBQUE7QUFDN0MsT0FBTyxFQUFDLGNBQWMsRUFBRSxlQUFlLEVBQUMsTUFBTSxjQUFjLENBQUE7QUFFNUQsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHLENBQUMsS0FBNEIsRUFBRSxFQUFFO0lBQzFELE1BQU0sR0FBRyxHQUFHLE9BQU8sRUFBRSxDQUFBO0lBQ3JCLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQTtJQUNWLE9BQU8sR0FBRyxDQUFDLElBQUksQ0FBQyxHQUFHLEVBQUUsY0FBYyxDQUFDLEtBQUssRUFBRSxlQUFlLENBQUMsS0FBSyxDQUFDLENBQUE7QUFDbEUsQ0FBQyxDQUFBIn0=
export const expressRouter = (setup) => {
const symbol = Symbol('expressRouter');
const router = express.Router();
setup(router);
router.use((req, _res, _next) => req[symbol].resolve());
router.use((err, req, _res, _next) => req[symbol].reject(err));
return async (next) => {
const req = requestContext.value;
const defer = makeDefer();
req[symbol] = defer;
router(req, responseContext.value);
await defer.promise;
await next();
};
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwcmVzc0FwcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4u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SxDQUFBO0lBQ2IsQ0FBQyxDQUFBO0FBQ0YsQ0FBQyxDQUFBIn0=

@@ -1,6 +0,6 @@

export { requestContext, responseContext } from './context.js';
export { expressContext, setHtml, setJson } from './express.js';
export { makeContext, requestContext, responseContext } from './context.js';
export { expressContext, setHtml, setJson, setBuffer, setRedirect, setText } from './express.js';
export { bufferBodyContext, jsonBodyContext, queryContext, rawBodyContext, textBodyContext, urlencodedBodyContext } from './body.js';
export { router } from './route.js';
export { catchApiError, catchError, notFound, notFoundApi } from './error.js';
export { expressApp } from './expressApp.js';
export { expressApp, expressRouter } from './expressApp.js';

@@ -1,7 +0,7 @@

export { requestContext, responseContext } from './context.js';
export { expressContext, setHtml, setJson } from './express.js';
export { makeContext, requestContext, responseContext } from './context.js';
export { expressContext, setHtml, setJson, setBuffer, setRedirect, setText } from './express.js';
export { bufferBodyContext, jsonBodyContext, queryContext, rawBodyContext, textBodyContext, urlencodedBodyContext } from './body.js';
export { router } from './route.js';
export { catchApiError, catchError, notFound, notFoundApi } from './error.js';
export { expressApp } from './expressApp.js';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLGNBQWMsRUFBRSxlQUFlLEVBQUMsTUFBTSxjQUFjLENBQUE7QUFDNUQsT0FBTyxFQUFDLGNBQWMsRUFBRSxPQUFPLEVBQUUsT0FBTyxFQUFDLE1BQU0sY0FBYyxDQUFBO0FBQzdELE9BQU8sRUFDTixpQkFBaUIsRUFDakIsZUFBZSxFQUNmLFlBQVksRUFDWixjQUFjLEVBQ2QsZUFBZSxFQUNmLHFCQUFxQixFQUNyQixNQUFNLFdBQVcsQ0FBQTtBQUNsQixPQUFPLEVBQUMsTUFBTSxFQUFDLE1BQU0sWUFBWSxDQUFBO0FBQ2pDLE9BQU8sRUFBQyxhQUFhLEVBQUUsVUFBVSxFQUFFLFFBQVEsRUFBRSxXQUFXLEVBQUMsTUFBTSxZQUFZLENBQUE7QUFDM0UsT0FBTyxFQUFDLFVBQVUsRUFBQyxNQUFNLGlCQUFpQixDQUFBIn0=
export { expressApp, expressRouter } from './expressApp.js';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFdBQVcsRUFBRSxjQUFjLEVBQUUsZUFBZSxFQUFDLE1BQU0sY0FBYyxDQUFBO0FBQ3pFLE9BQU8sRUFDTixjQUFjLEVBQ2QsT0FBTyxFQUNQLE9BQU8sRUFDUCxTQUFTLEVBQ1QsV0FBVyxFQUNYLE9BQU8sRUFDUCxNQUFNLGNBQWMsQ0FBQTtBQUNyQixPQUFPLEVBQ04saUJBQWlCLEVBQ2pCLGVBQWUsRUFDZixZQUFZLEVBQ1osY0FBYyxFQUNkLGVBQWUsRUFDZixxQkFBcUIsRUFDckIsTUFBTSxXQUFXLENBQUE7QUFDbEIsT0FBTyxFQUFDLE1BQU0sRUFBQyxNQUFNLFlBQVksQ0FBQTtBQUNqQyxPQUFPLEVBQUMsYUFBYSxFQUFFLFVBQVUsRUFBRSxRQUFRLEVBQUUsV0FBVyxFQUFDLE1BQU0sWUFBWSxDQUFBO0FBQzNFLE9BQU8sRUFBQyxVQUFVLEVBQUUsYUFBYSxFQUFDLE1BQU0saUJBQWlCLENBQUEifQ==
{
"name": "dx-server",
"version": "0.0.1-pre-1",
"version": "0.0.1-pre-10",
"main": "./cjs/index.js",

@@ -5,0 +5,0 @@ "repository": "git@github.com:tranvansang/dx-server.git",

@@ -32,3 +32,2 @@ # dx-server - modern, unopinionated, and satisfactory server

// https://nodejs.org/en/docs/guides/anatomy-of-an-http-transaction
const tcpServer = new Server()

@@ -115,1 +114,8 @@ .on('request', async (req, res) => {

```
## TODO
Until these middlewares are available as native dx-server middlewares, express middlewares can be used with `expressApp()`
- [ ] native static file serve, like 'static-serve'
- [ ] logger like morgan
- [ ] cookie, session
- [ ] cors
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc