Socket
Socket
Sign inDemoInstall

elysia

Package Overview
Dependencies
Maintainers
1
Versions
412
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elysia - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

11

dist/index.js

@@ -38,3 +38,2 @@ import { Raikiri } from 'raikiri';

this.config = {
strictPath: false,
...config

@@ -85,7 +84,2 @@ };

this.router.add(method, path, mainHandler);
if (!this.config.strictPath && path !== '/')
if (path.endsWith('/'))
this.router.add(method, path.substring(0, path.length - 1), mainHandler);
else
this.router.add(method, `${path}/`, mainHandler);
}

@@ -163,3 +157,6 @@ onStart(handler) {

Object.values(instance.routes).forEach(({ method, path, handler, hooks }) => {
this._addHandler(method, `${prefix}${path}`, handler, hooks);
if (path === '/')
this._addHandler(method, prefix, handler, hooks);
else
this._addHandler(method, `${prefix}${path}`, handler, hooks);
});

@@ -166,0 +163,0 @@ return this;

@@ -175,3 +175,2 @@ /// <reference types="bun-types" />

export interface ElysiaConfig {
strictPath: boolean;
serve?: Partial<Serve>;

@@ -178,0 +177,0 @@ }

{
"name": "elysia",
"description": "Fast, and friendly Bun web framework",
"version": "0.2.2",
"version": "0.2.3",
"author": {

@@ -40,3 +40,3 @@ "name": "saltyAom",

"openapi-types": "^12.1.0",
"raikiri": "0.0.0-beta.3"
"raikiri": "0.0.0-beta.4"
},

@@ -43,0 +43,0 @@ "devDependencies": {

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