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.7.1 to 0.8.0

cjs/router.d.ts

11

cjs/dx.js

@@ -10,10 +10,3 @@ "use strict";

// wrap in an async function to ensure the maker is called only once
const context = (...params) => getReq()[promiseSymbol] ??= (async () => {
try {
return getReq()[valueSymbol] = await maker(...params);
}
catch (e) {
throw e;
}
})();
const context = (...params) => getReq()[promiseSymbol] ??= (async () => getReq()[valueSymbol] = await maker(...params))();
Object.defineProperty(context, 'value', {

@@ -134,2 +127,2 @@ get() { return getReq()[valueSymbol]; },

// we leave setDownload() implementation for users, for now.
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvZHgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsdURBQWtEO0FBQ2xELGlEQUF1RDtBQXVCdkQsU0FBZ0IsYUFBYSxDQUszQixLQUErQjtJQUNoQyxNQUFNLGFBQWEsR0FBRyxNQUFNLENBQUMsU0FBUyxDQUFDLENBQUE7SUFDdkMsTUFBTSxXQUFXLEdBQUcsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFBO0lBQ25DLG9FQUFvRTtJQUNwRSxNQUFNLE9BQU8sR0FBZ0MsQ0FBQyxHQUFHLE1BQWMsRUFBRSxFQUFFLENBQUMsTUFBTSxFQUFFLENBQUMsYUFBYSxDQUFDLEtBQUssQ0FBQyxLQUFLLElBQUksRUFBRTtRQUMzRyxJQUFJLENBQUM7WUFDSixPQUFPLE1BQU0sRUFBRSxDQUFDLFdBQVcsQ0FBQyxHQUFHLE1BQU0sS0FBSyxDQUFDLEdBQUcsTUFBTSxDQUFD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FBNEQifQ==
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.router = exports.matchPattern = void 0;
exports.router = void 0;
const dx_js_1 = require("./dx.js");
require("urlpattern-polyfill");
const bodyHelpers_js_1 = require("./bodyHelpers.js");
// '' matches nothing
// '/' matches both https://example.com and https://example.com/
// '/foo' matches https://example.com/foo but not https://example.com/foo/
// '/foo/' matches https://example.com/foo/ but not https://example.com/foo
function matchPattern(pathname, pattern) {
const matched = new URLPattern({ pathname: pattern }).exec({ pathname });
if (!matched)
return;
return {
matched,
params: matched.pathname.groups
};
}
exports.matchPattern = matchPattern;
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods

@@ -32,8 +18,9 @@ const allMethods = [

for (const [pattern, handler] of routes) {
const match = matchPattern((0, bodyHelpers_js_1.urlFromReq)(req).pathname, `${prefix}${pattern}`, options);
if (match)
return handler({
...match,
next,
});
// '' matches nothing
// '/' matches both https://example.com and https://example.com/
// '/foo' matches https://example.com/foo but not https://example.com/foo/
// '/foo/' matches https://example.com/foo/ but not https://example.com/foo
const matched = new URLPattern({ pathname: `${prefix}${pattern}` }).exec({ pathname: (0, bodyHelpers_js_1.urlFromReq)(req).pathname });
if (matched)
return handler({ matched, next });
}

@@ -57,2 +44,2 @@ return next();

exports.router[method] = exports.router.method.bind(exports.router, method);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3JvdXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxtQ0FBeUM7QUFFekMsK0JBQTRCO0FBQzVCLHFEQUEyQztBQU8zQyxxQkFBcUI7QUFDckIsZ0VBQWdFO0FBQ2hFLDBFQUEwRTtBQUMxRSwyRUFBMkU7QUFDM0UsU0FBZ0IsWUFBWSxDQUMzQixRQUFnQixFQUNoQixPQUFlO0lBR2YsTUFBTSxPQUFPLEdBQ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UFDWixPQUFPLE9BQU8sTUFBTSxDQUFDLENBQUMsQ0FBQyxLQUFLLFFBQVE7WUFDbkMsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxTQUFTLEVBQUUsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsRUFBRSxNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQztZQUM1RCxDQUFDLENBQUMsVUFBVSxDQUFDLFNBQVMsRUFBRSxNQUFNLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFBO0lBQy9ELENBQUM7Q0FDRCxDQUFBO0FBRUQsS0FBSyxNQUFNLE1BQU0sSUFBSSxVQUFVO0lBQUUsY0FBTSxDQUFDLE1BQU0sQ0FBQyxHQUFHLGNBQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLGNBQU0sRUFBRSxNQUFNLENBQUMsQ0FBQSJ9

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

/// <reference types="node" resolution-mode="require"/>
import { Chainable } from './dx.js';
import { SendOptions } from 'send';
import { IncomingMessage } from 'node:http';
export declare function chainStatic(pattern: string, { getPathname, ...options }: SendOptions & {
getPathname?: (req: IncomingMessage) => string;
getPathname?(matched: URLPatternResult): string;
}): Chainable;

@@ -7,3 +7,2 @@ "use strict";

const staticHelpers_js_1 = require("./staticHelpers.js");
const router_js_1 = require("./router.js");
function chainStatic(pattern, { getPathname, ...options }) {

@@ -14,7 +13,8 @@ return async (next) => {

return next();
const match = (0, router_js_1.matchPattern)((0, bodyHelpers_js_1.urlFromReq)(req).pathname, pattern);
if (!match)
const { pathname } = (0, bodyHelpers_js_1.urlFromReq)(req);
const matched = new URLPattern({ pathname: pattern }).exec({ pathname });
if (!matched)
return next();
try {
await (0, staticHelpers_js_1.sendFile)(req, (0, dx_js_1.getRes)(), getPathname?.(req) ?? (0, bodyHelpers_js_1.urlFromReq)(req).pathname, options, next);
await (0, staticHelpers_js_1.sendFile)(req, (0, dx_js_1.getRes)(), getPathname?.(matched) ?? pathname, options, next);
}

@@ -29,2 +29,2 @@ catch (err) {

exports.chainStatic = chainStatic;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdGljLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3N0YXRpYy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxtQ0FBaUQ7QUFFakQscURBQTJDO0FBQzNDLHlEQUEyQztBQUMzQywyQ0FBd0M7QUFHeEMsU0FBZ0IsV0FBVyxDQUMxQixPQUFlLEVBQ2YsRUFBQyxXQUFXLEVBQUUsR0FBRyxPQUFPLEVBR3ZCO0lBRUQsT0FBTyxLQUFLLEVBQUMsSUFBSSxFQUFDLEVBQUU7UUFDbkIsTUFBTSxHQUFHLEdBQUcsSUFBQSxjQUFNLEdBQUUsQ0FBQTtRQUNwQixJQUFJLEdBQUcsQ0FBQyxNQUFNLEtBQUssS0FBSyxJQUFJLEdBQUcsQ0FBQyxNQUFNLEtBQUssTUFBTTtZQUFFLE9BQU8sSUFBSSxFQUFFLENBQUE7UUFFaEUsTUFBTSxLQUFLLEdBQUcsSUFBQSx3QkFBWSxFQUFDLElBQUEsMkJBQVUsRUFBQyxHQUFHLENBQUMsQ0FBQyxRQUFRLEVBQUUsT0FBTyxDQUFDLENBQUE7UUFDN0QsSUFBSSxDQUFDLEtBQUs7WUFBRSxPQUFPLElBQUksRUFBRSxDQUFBO1FBRXpCLElBQUksQ0FBQztZQUNKLE1BQU0sSUFBQSwyQkFBUSxFQUNkLEdBQUcsRUFDSCxJQUFBLGNBQU0sR0FBRSxFQUNSLFdBQVcsRUFBRSxDQUFDLEdBQUcsQ0FBQyxJQUFJLElBQUEsMkJBQVUsRUFBQyxH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sSUFBSSxFQUFFLENBQUE7UUFFM0IsSUFBSSxDQUFDO1lBQ0osTUFBTSxJQUFBLDJCQUFRLEVBQ2QsR0FBRyxFQUNILElBQUEsY0FBTSxHQUFFLEVBQ1IsV0FBVyxFQUFFLENBQUMsT0FBTyxDQUFDLElBQUksUUFBUSxFQUNsQyxPQUFPLEVBQ1AsSUFBSSxDQUNKLENBQUE7UUFDRCxDQUFDO1FBQUMsT0FBTyxHQUFHLEVBQUUsQ0FBQztZQUNkLE9BQU8sSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFBO1lBQ2hCLDJDQUEyQztZQUMzQyxZQUFZO1FBQ2IsQ0FBQztJQUNGLENBQUMsQ0FBQTtBQUNGLENBQUM7QUE3QkQsa0NBNkJDIn0=

@@ -7,10 +7,3 @@ import { AsyncLocalStorage } from 'node:async_hooks';

// wrap in an async function to ensure the maker is called only once
const context = (...params) => getReq()[promiseSymbol] ??= (async () => {
try {
return getReq()[valueSymbol] = await maker(...params);
}
catch (e) {
throw e;
}
})();
const context = (...params) => getReq()[promiseSymbol] ??= (async () => getReq()[valueSymbol] = await maker(...params))();
Object.defineProperty(context, 'value', {

@@ -119,2 +112,2 @@ get() { return getReq()[valueSymbol]; },

// we leave setDownload() implementation for users, for now.
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvZHgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxFQUFDLGlCQUFpQixFQUFDLE1BQU0sa0JBQWtCLENBQUE7QUFDbEQsT0FBTyxFQUFpQixRQUFRLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQTtBQXVCdkQsTUFBTSxVQUFVLGFBQWEsQ0FLM0IsS0FBK0I7SUFDaEMsTUFBTSxhQUFhLEdBQUcsTUFBTSxDQUFDLFNBQVMsQ0FBQyxDQUFBO0lBQ3ZDLE1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yw0RUFBNEU7QUFFNUUsbURBQW1EO0FBQ25ELHVCQUF1QjtBQUN2QixLQUFLO0FBQ0wscUpBQXFKO0FBRXJKLHdGQUF3RjtBQUN4RixzQ0FBc0M7QUFDdEMsNEdBQTRHO0FBQzVHLGdIQUFnSDtBQUNoSCw0REFBNEQifQ==
import { getReq } from './dx.js';
import 'urlpattern-polyfill';
import { urlFromReq } from './bodyHelpers.js';
// '' matches nothing
// '/' matches both https://example.com and https://example.com/
// '/foo' matches https://example.com/foo but not https://example.com/foo/
// '/foo/' matches https://example.com/foo/ but not https://example.com/foo
export function matchPattern(pathname, pattern) {
const matched = new URLPattern({ pathname: pattern }).exec({ pathname });
if (!matched)
return;
return {
matched,
params: matched.pathname.groups
};
}
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods

@@ -28,8 +15,9 @@ const allMethods = [

for (const [pattern, handler] of routes) {
const match = matchPattern(urlFromReq(req).pathname, `${prefix}${pattern}`, options);
if (match)
return handler({
...match,
next,
});
// '' matches nothing
// '/' matches both https://example.com and https://example.com/
// '/foo' matches https://example.com/foo but not https://example.com/foo/
// '/foo/' matches https://example.com/foo/ but not https://example.com/foo
const matched = new URLPattern({ pathname: `${prefix}${pattern}` }).exec({ pathname: urlFromReq(req).pathname });
if (matched)
return handler({ matched, next });
}

@@ -53,2 +41,2 @@ return next();

router[method] = router.method.bind(router, method);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3JvdXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQVksTUFBTSxFQUFDLE1BQU0sU0FBUyxDQUFBO0FBRXpDLE9BQU8scUJBQXFCLENBQUE7QUFDNUIsT0FBTyxFQUFDLFVBQVUsRUFBQyxNQUFNLGtCQUFrQixDQUFBO0FBTzNDLHFCQUFxQjtBQUNyQixnRUFBZ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BQUMsVUFBVSxDQUFDLE1BQU0sRUFBRSxNQUFNLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFBO0lBQzVELENBQUM7SUFDRCxHQUFHLENBQUMsR0FBRyxNQUFNO1FBQ1osT0FBTyxPQUFPLE1BQU0sQ0FBQyxDQUFDLENBQUMsS0FBSyxRQUFRO1lBQ25DLENBQUMsQ0FBQyxVQUFVLENBQUMsU0FBUyxFQUFFLENBQUMsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLEVBQUUsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRSxNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUM7WUFDNUQsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxTQUFTLEVBQUUsTUFBTSxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRSxNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQTtJQUMvRCxDQUFDO0NBQ0QsQ0FBQTtBQUVELEtBQUssTUFBTSxNQUFNLElBQUksVUFBVTtJQUFFLE1BQU0sQ0FBQyxNQUFNLENBQUMsR0FBRyxNQUFNLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUUsTUFBTSxDQUFDLENBQUEifQ==

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

/// <reference types="node" resolution-mode="require"/>
import { Chainable } from './dx.js';
import { SendOptions } from 'send';
import { IncomingMessage } from 'node:http';
export declare function chainStatic(pattern: string, { getPathname, ...options }: SendOptions & {
getPathname?: (req: IncomingMessage) => string;
getPathname?(matched: URLPatternResult): string;
}): Chainable;
import { getReq, getRes } from './dx.js';
import { urlFromReq } from './bodyHelpers.js';
import { sendFile } from './staticHelpers.js';
import { matchPattern } from './router.js';
export function chainStatic(pattern, { getPathname, ...options }) {

@@ -10,7 +9,8 @@ return async (next) => {

return next();
const match = matchPattern(urlFromReq(req).pathname, pattern);
if (!match)
const { pathname } = urlFromReq(req);
const matched = new URLPattern({ pathname: pattern }).exec({ pathname });
if (!matched)
return next();
try {
await sendFile(req, getRes(), getPathname?.(req) ?? urlFromReq(req).pathname, options, next);
await sendFile(req, getRes(), getPathname?.(matched) ?? pathname, options, next);
}

@@ -24,2 +24,2 @@ catch (err) {

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdGljLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3N0YXRpYy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQVksTUFBTSxFQUFFLE1BQU0sRUFBQyxNQUFNLFNBQVMsQ0FBQTtBQUVqRCxPQUFPLEVBQUMsVUFBVSxFQUFDLE1BQU0sa0JBQWtCLENBQUE7QUFDM0MsT0FBTyxFQUFDLFFBQVEsRUFBQyxNQUFNLG9CQUFvQixDQUFBO0FBQzNDLE9BQU8sRUFBQyxZQUFZLEVBQUMsTUFBTSxhQUFhLENBQUE7QUFHeEMsTUFBTSxVQUFVLFdBQVcsQ0FDMUIsT0FBZSxFQUNmLEVBQUMsV0FBVyxFQUFFLEdBQUcsT0FBTyxFQUd2QjtJQUVELE9BQU8sS0FBSyxFQUFDLElBQUksRUFBQyxFQUFFO1FBQ25CLE1BQU0sR0FBRyxHQUFHLE1BQU0sRUFBRSxDQUFBO1FBQ3BCLElBQUksR0FBRyxDQUFDLE1BQU0sS0FBSyxLQUFLLElBQUksR0FBRyxDQUFDLE1BQU0sS0FBSyxNQUFNO1lBQUUsT0FBTyxJQUFJLEVBQUUsQ0FBQTtRQUVoRSxNQUFNLEtBQUssR0FBRyxZQUFZLENBQUMsVUFBVSxDQUFDLEdBQUcsQ0FBQyxDQUFDLFFBQVEsRUFBRSxPQUFPLENBQUMsQ0FBQTtRQUM3RCxJ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tZQUFFLE9BQU8sSUFBSSxFQUFFLENBQUE7UUFFaEUsTUFBTSxFQUFDLFFBQVEsRUFBQyxHQUFHLFVBQVUsQ0FBQyxHQUFHLENBQUMsQ0FBQTtRQUNsQyxNQUFNLE9BQU8sR0FBRyxJQUFJLFVBQVUsQ0FBQyxFQUFDLFFBQVEsRUFBRSxPQUFPLEVBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxFQUFDLFFBQVEsRUFBQyxDQUFDLENBQUE7UUFDcEUsSUFBSSxDQUFDLE9BQU87WUFBRSxPQUFPLElBQUksRUFBRSxDQUFBO1FBRTNCLElBQUksQ0FBQztZQUNKLE1BQU0sUUFBUSxDQUNkLEdBQUcsRUFDSCxNQUFNLEVBQUUsRUFDUixXQUFXLEVBQUUsQ0FBQyxPQUFPLENBQUMsSUFBSSxRQUFRLEVBQ2xDLE9BQU8sRUFDUCxJQUFJLENBQ0osQ0FBQTtRQUNELENBQUM7UUFBQyxPQUFPLEdBQUcsRUFBRSxDQUFDO1lBQ2QsT0FBTyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUE7WUFDaEIsMkNBQTJDO1lBQzNDLFlBQVk7UUFDYixDQUFDO0lBQ0YsQ0FBQyxDQUFBO0FBQ0YsQ0FBQyJ9
{
"name": "dx-server",
"version": "0.7.1",
"version": "0.8.0",
"main": "./cjs/index.js",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/tranvansang/dx-server",

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

dxServer(req, res),
chainStatic('/', {root: resolve(dirname(fileURLToPath(import.meta.url)), 'public')}),
chainStatic('/*', {root: resolve(dirname(fileURLToPath(import.meta.url)), 'public')}),
() => setHtml('not found', {status: 404}),

@@ -285,3 +285,8 @@ )()

chain(
chainStatic('/assets', {root: resolve(dirname(fileURLToPath(import.meta.url)), 'public')})
chainStatic('/assets/*', {
root: resolve(dirname(fileURLToPath(import.meta.url)), 'public'),
getPathname(matched) {
return new URL(getReq().url, 'http://localhost').pathname.slice('/assets'.length)
},
}),
)

@@ -288,0 +293,0 @@ ```

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