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-7 to 0.0.1-pre-8

3

cjs/expressApp.d.ts

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

import { type Express } from 'express';
import { type Express, type Router } from 'express';
export declare const expressApp: (setup: (app: Express) => any) => (next: () => any) => void;
export declare const expressRouter: (setup: (router: Router) => any) => (next: () => any) => void;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.expressApp = void 0;
exports.expressRouter = exports.expressApp = void 0;
const express_1 = require("express");

@@ -22,2 +22,18 @@ const context_js_1 = require("./context.js");

exports.expressApp = expressApp;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwcmVzc0FwcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9leHByZXNzQXBwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFDQUE2QztBQUM3Qyw2Q0FBNEQ7QUFHckQsTUFBTSxVQUFVLEdBQUcsQ0FBQyxLQUE0QixFQUFFLEVBQUU7SUFDMUQsTUFBTSxHQUFHLEdBQUcsSUFBQSxpQkFBTyxHQUFFLENBQUE7SUFDckIsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFBO0lBQ1YsT0FBTyxDQUFDLElBQUksQ0FBQyxFQUFFO1FBQ2QsSUFBSSxLQUFLLENBQUE7UUFDVCxHQUFHLENBQUMsMkJBQWMsQ0FBQyxLQUFLLEVBQUUsNEJBQWUsQ0FBQyxLQUFLLEVBQUUsQ0FBQyxHQUFXLEVBQUUsRUFBRTtZQUNoRSxJQUFJLEdBQUc7Z0JBQUUsS0FBSyxHQUFHLEdBQUcsQ0FBQTs7Z0JBQ2YsSUFBSSxFQUFFLENBQUE7UUFDWixDQUFDLENBQUMsQ0FBQTtRQUNGLElBQUksS0FBSztZQUFFLE1BQU0sS0FBSyxDQUFBO0lBQ3ZCLENBQUMsQ0FBc0IsQ0FBQTtBQUN4QixDQUFDLENBQUE7QUFYWSxRQUFBLFVBQVUsY0FXdEIifQ==
const expressRouter = (setup) => {
const router = express_1.default.Router();
setup(router);
return (next => {
let error;
router(context_js_1.requestContext.value, context_js_1.responseContext.value, (err) => {
if (err)
error = err;
else
next();
});
if (error)
throw error;
});
};
exports.expressRouter = expressRouter;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwcmVzc0FwcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9leHByZXNzQXBwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFDQUEwRDtBQUMxRCw2Q0FBNEQ7QUFHckQsTUFBTSxVQUFVLEdBQUcsQ0FBQyxLQUE0QixFQUFFLEVBQUU7SUFDMUQsTUFBTSxHQUFHLEdBQUcsSUFBQSxpQkFBTyxHQUFFLENBQUE7SUFDckIsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFBO0lBQ1YsT0FBTyxDQUFDLElBQUksQ0FBQyxFQUFFO1FBQ2QsSUFBSSxLQUFLLENBQUE7UUFDVCxHQUFHLENBQUMsMkJBQWMsQ0FBQyxLQUFLLEVBQUUsNEJBQWUsQ0FBQyxLQUFLLEVBQUUsQ0FBQyxHQUFXLEVBQUUsRUFBRTtZQUNoRSxJQUFJLEdBQUc7Z0JBQUUsS0FBSyxHQUFHLEdBQUcsQ0FBQTs7Z0JBQ2YsSUFBSSxFQUFFLENBQUE7UUFDWixDQUFDLENBQUMsQ0FBQTtRQUNGLElBQUksS0FBSztZQUFFLE1BQU0sS0FBSyxDQUFBO0lBQ3ZCLENBQUMsQ0FBc0IsQ0FBQTtBQUN4QixDQUFDLENBQUE7QUFYWSxRQUFBLFVBQVUsY0FXdEI7QUFFTSxNQUFNLGFBQWEsR0FBRyxDQUFDLEtBQThCLEVBQUUsRUFBRTtJQUMvRCxNQUFNLE1BQU0sR0FBRyxpQkFBTyxDQUFDLE1BQU0sRUFBRSxDQUFBO0lBQy9CLEtBQUssQ0FBQyxNQUFNLENBQUMsQ0FBQTtJQUNiLE9BQU8sQ0FBQyxJQUFJLENBQUMsRUFBRTtRQUNkLElBQUksS0FBSyxDQUFBO1FBQ1QsTUFBTSxDQUFDLDJCQUFjLENBQUMsS0FBSyxFQUFFLDRCQUFlLENBQUMsS0FBSyxFQUFFLENBQUMsR0FBVyxFQUFFLEVBQUU7WUFDbkUsSUFBSSxHQUFHO2dCQUFFLEtBQUssR0FBRyxHQUFHLENBQUE7O2dCQUNmLElBQUksRUFBRSxDQUFBO1FBQ1osQ0FBQyxDQUFDLENBQUE7UUFDRixJQUFJLEtBQUs7WUFBRSxNQUFNLEtBQUssQ0FBQTtJQUN2QixDQUFDLENBQXNCLENBQUE7QUFDeEIsQ0FBQyxDQUFBO0FBWFksUUFBQSxhQUFhLGlCQVd6QiJ9

@@ -6,2 +6,2 @@ export { makeContext, requestContext, responseContext } from './context.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.setText = exports.setRedirect = exports.setBuffer = exports.setJson = exports.setHtml = exports.expressContext = exports.responseContext = exports.requestContext = exports.makeContext = 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");

@@ -31,2 +31,3 @@ Object.defineProperty(exports, "makeContext", { enumerable: true, get: function () { return context_js_1.makeContext; } });

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

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

import { type Express } from 'express';
import { type Express, type Router } from 'express';
export declare const expressApp: (setup: (app: Express) => any) => (next: () => any) => void;
export declare const expressRouter: (setup: (router: Router) => any) => (next: () => any) => void;

@@ -18,2 +18,17 @@ import express from 'express';

};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwcmVzc0FwcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9leHByZXNzQXBwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sT0FBdUIsTUFBTSxTQUFTLENBQUE7QUFDN0MsT0FBTyxFQUFDLGNBQWMsRUFBRSxlQUFlLEVBQUMsTUFBTSxjQUFjLENBQUE7QUFHNUQsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHLENBQUMsS0FBNEIsRUFBRSxFQUFFO0lBQzFELE1BQU0sR0FBRyxHQUFHLE9BQU8sRUFBRSxDQUFBO0lBQ3JCLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQTtJQUNWLE9BQU8sQ0FBQyxJQUFJLENBQUMsRUFBRTtRQUNkLElBQUksS0FBSyxDQUFBO1FBQ1QsR0FBRyxDQUFDLGNBQWMsQ0FBQyxLQUFLLEVBQUUsZUFBZSxDQUFDLEtBQUssRUFBRSxDQUFDLEdBQVcsRUFBRSxFQUFFO1lBQ2hFLElBQUksR0FBRztnQkFBRSxLQUFLLEdBQUcsR0FBRyxDQUFBOztnQkFDZixJQUFJLEVBQUUsQ0FBQTtRQUNaLENBQUMsQ0FBQyxDQUFBO1FBQ0YsSUFBSSxLQUFLO1lBQUUsTUFBTSxLQUFLLENBQUE7SUFDdkIsQ0FBQyxDQUFzQixDQUFBO0FBQ3hCLENBQUMsQ0FBQSJ9
export const expressRouter = (setup) => {
const router = express.Router();
setup(router);
return (next => {
let error;
router(requestContext.value, responseContext.value, (err) => {
if (err)
error = err;
else
next();
});
if (error)
throw error;
});
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW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Y0FBYyxDQUFDLEtBQUssRUFBRSxlQUFlLENBQUMsS0FBSyxFQUFFLENBQUMsR0FBVyxFQUFFLEVBQUU7WUFDbkUsSUFBSSxHQUFHO2dCQUFFLEtBQUssR0FBRyxHQUFHLENBQUE7O2dCQUNmLElBQUksRUFBRSxDQUFBO1FBQ1osQ0FBQyxDQUFDLENBQUE7UUFDRixJQUFJLEtBQUs7WUFBRSxNQUFNLEtBQUssQ0FBQTtJQUN2QixDQUFDLENBQXNCLENBQUE7QUFDeEIsQ0FBQyxDQUFBIn0=

@@ -6,2 +6,2 @@ export { makeContext, requestContext, responseContext } from './context.js';

export { catchApiError, catchError, notFound, notFoundApi } from './error.js';
export { expressApp } from './expressApp.js';
export { expressApp, expressRouter } from './expressApp.js';

@@ -6,3 +6,3 @@ export { makeContext, requestContext, responseContext } from './context.js';

export { catchApiError, catchError, notFound, notFoundApi } from './error.js';
export { expressApp } from './expressApp.js';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFdBQVcsRUFBRSxjQUFjLEVBQUUsZUFBZSxFQUFDLE1BQU0sY0FBYyxDQUFBO0FBQ3pFLE9BQU8sRUFDTixjQUFjLEVBQ2QsT0FBTyxFQUNQLE9BQU8sRUFDUCxTQUFTLEVBQ1QsV0FBVyxFQUNYLE9BQU8sRUFDUCxNQUFNLGNBQWMsQ0FBQTtBQUNyQixPQUFPLEVBQ04saUJBQWlCLEVBQ2pCLGVBQWUsRUFDZixZQUFZLEVBQ1osY0FBYyxFQUNkLGVBQWUsRUFDZixxQkFBcUIsRUFDckIsTUFBTSxXQUFXLENBQUE7QUFDbEIsT0FBTyxFQUFDLE1BQU0sRUFBQyxNQUFNLFlBQVksQ0FBQTtBQUNqQyxPQUFPLEVBQUMsYUFBYSxFQUFFLFVBQVUsRUFBRSxRQUFRLEVBQUUsV0FBVyxFQUFDLE1BQU0sWUFBWSxDQUFBO0FBQzNFLE9BQU8sRUFBQyxVQUFVLEVBQUMsTUFBTSxpQkFBaUIsQ0FBQSJ9
export { expressApp, expressRouter } from './expressApp.js';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFdBQVcsRUFBRSxjQUFjLEVBQUUsZUFBZSxFQUFDLE1BQU0sY0FBYyxDQUFBO0FBQ3pFLE9BQU8sRUFDTixjQUFjLEVBQ2QsT0FBTyxFQUNQLE9BQU8sRUFDUCxTQUFTLEVBQ1QsV0FBVyxFQUNYLE9BQU8sRUFDUCxNQUFNLGNBQWMsQ0FBQTtBQUNyQixPQUFPLEVBQ04saUJBQWlCLEVBQ2pCLGVBQWUsRUFDZixZQUFZLEVBQ1osY0FBYyxFQUNkLGVBQWUsRUFDZixxQkFBcUIsRUFDckIsTUFBTSxXQUFXLENBQUE7QUFDbEIsT0FBTyxFQUFDLE1BQU0sRUFBQyxNQUFNLFlBQVksQ0FBQTtBQUNqQyxPQUFPLEVBQUMsYUFBYSxFQUFFLFVBQVUsRUFBRSxRQUFRLEVBQUUsV0FBVyxFQUFDLE1BQU0sWUFBWSxDQUFBO0FBQzNFLE9BQU8sRUFBQyxVQUFVLEVBQUUsYUFBYSxFQUFDLE1BQU0saUJBQWlCLENBQUEifQ==
{
"name": "dx-server",
"version": "0.0.1-pre-7",
"version": "0.0.1-pre-8",
"main": "./cjs/index.js",

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

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