File tree Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 1+
2+ # 1.2.0-rc.0 - 23 Dec 2024
3+ Change:
4+ - Add support for Elysia 1.2
5+
16# 1.1.2 - 18 Dec 2024
27Bug fix:
38- [ #40 ] ( https://github.com/elysiajs/elysia-static/pull/40 ) serve indexHTML
Original file line number Diff line number Diff line change 11{
22 "name" : " @elysiajs/static" ,
3- "version" : " 1.1.2 " ,
3+ "version" : " 1.2.0 " ,
44 "license" : " MIT" ,
55 "scripts" : {
66 "dev" : " bun run --hot example/index.ts" ,
2424 "node-cache" : " ^5.1.2"
2525 },
2626 "devDependencies" : {
27- "@types/bun" : " 1.1.6 " ,
27+ "@types/bun" : " 1.1.14 " ,
2828 "@typescript-eslint/eslint-plugin" : " ^6.7.4" ,
29- "elysia" : " >= 1.1.0-rc.2 " ,
29+ "elysia" : " >= 1.2.0 " ,
3030 "eslint" : " 9.6.0" ,
3131 "tsup" : " ^8.1.0" ,
3232 "typescript" : " ^5.5.3"
3333 },
3434 "peerDependencies" : {
35- "elysia" : " >= 1.1 .0"
35+ "elysia" : " >= 1.2 .0"
3636 },
3737 "keywords" : [
3838 " elysia" ,
5151 "bugs" : " https://github.com/elysiajs/elysia-static/issues" ,
5252 "description" : " Plugin for Elysia for serving static folder" ,
5353 "homepage" : " https://github.com/elysiajs/elysia-static"
54- }
54+ }
Original file line number Diff line number Diff line change @@ -277,9 +277,8 @@ export const staticPlugin = async <Prefix extends string = '/prefix'>(
277277 headers [ 'Etag' ] = etag
278278 headers [ 'Cache-Control' ] = directive
279279 if ( maxAge !== null )
280- headers [
281- 'Cache-Control'
282- ] += `, max-age=${ maxAge } `
280+ headers [ 'Cache-Control' ] +=
281+ `, max-age=${ maxAge } `
283282
284283 return new Response ( file , {
285284 headers
@@ -297,8 +296,10 @@ export const staticPlugin = async <Prefix extends string = '/prefix'>(
297296 `${ prefix } /*` ,
298297 async ( { params, headers : reqHeaders } ) => {
299298 let path = enableDecodeURI
300- ? decodeURI ( `${ assets } /${ decodeURI ( params [ '*' ] ) } ` )
301- : `${ assets } /${ params [ '*' ] } `
299+ ? // @ts -ignore
300+ decodeURI ( `${ assets } /${ decodeURI ( params [ '*' ] ) } ` )
301+ : // @ts -ignore
302+ `${ assets } /${ params [ '*' ] } `
302303 // Handle varying filepath separators
303304 if ( isFSSepUnsafe ) {
304305 path = path . replace ( URL_PATH_SEP , sep )
You can’t perform that action at this time.
0 commit comments