Skip to content

Commit 976eef9

Browse files
committed
chore(hyper-express): bump version to 0.0.10 and add UploadedFile export
- Updated package version to 0.0.10. - Added UploadedFile export in index.js. - Introduced originalUrl setter in ExpressRequest class. - Added url setter in Request class. - Cleaned up uploaded-file type definition by removing unused imports.
1 parent 062f54c commit 976eef9

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

packages/hyper-express/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const LiveFile = require('./src/components/plugins/LiveFile.js');
1010
const MultipartField = require('./src/components/plugins/MultipartField.js');
1111
const SSEventStream = require('./src/components/plugins/SSEventStream.js');
1212
const Websocket = require('./src/components/ws/Websocket.js');
13+
const UploadedFile = require('./src/shared/uploaded-file.js');
1314

1415
// Disable the uWebsockets.js version header if not specified to be kept
1516
if (!process.env['KEEP_UWS_HEADER']) {
@@ -28,6 +29,9 @@ module.exports = {
2829
MultipartField,
2930
SSEventStream,
3031
Websocket,
32+
UploadedFile,
3133
compressors: uWebsockets,
32-
express(...args) { return new Server(...args); },
34+
express(...args) {
35+
return new Server(...args);
36+
},
3337
};

packages/hyper-express/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@intentjs/hyper-express",
3-
"version": "0.0.7",
3+
"version": "0.0.10",
44
"description": "A fork of hyper-express to suit IntentJS requirements. High performance Node.js webserver with a simple-to-use API powered by uWebsockets.js under the hood.",
55
"main": "index.js",
66
"types": "./types/index.d.ts",

packages/hyper-express/src/components/compatibility/ExpressRequest.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ class ExpressRequest {
100100
return this.url;
101101
}
102102

103+
set originalUrl(url) {
104+
this.url = url;
105+
}
106+
103107
get fresh() {
104108
this._throw_unsupported('fresh');
105109
}

packages/hyper-express/src/components/http/Request.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,10 @@ class Request {
858858
return this._url;
859859
}
860860

861+
set url(url) {
862+
this._url = url;
863+
}
864+
861865
/**
862866
* Returns path for incoming request.
863867
* @returns {String}

packages/hyper-express/types/shared/uploaded-file.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { readFileSync } from 'fs-extra';
2-
31
export class UploadedFile {
42
_filename: string;
53
_size: number;

0 commit comments

Comments
 (0)