silgi 0.41.20 → 0.41.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.mjs +1 -1
- package/dist/core/index.mjs +1 -4
- package/dist/types/index.d.mts +1 -4
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
package/dist/core/index.mjs
CHANGED
|
@@ -399,16 +399,13 @@ class _SilgiEvent {
|
|
|
399
399
|
req;
|
|
400
400
|
url;
|
|
401
401
|
context;
|
|
402
|
-
protocol;
|
|
403
|
-
// Added property
|
|
404
402
|
_res;
|
|
405
403
|
constructor(req, context) {
|
|
406
404
|
this.context = context || new EmptyObject();
|
|
405
|
+
this.context.protocol = "HTTP";
|
|
407
406
|
this.req = req;
|
|
408
407
|
const _url = req._url;
|
|
409
408
|
this.url = _url && _url instanceof URL ? _url : new FastURL(req.url);
|
|
410
|
-
let proto = this.url.protocol.replace(":", "");
|
|
411
|
-
this.protocol = proto === "https" ? "http" : proto;
|
|
412
409
|
}
|
|
413
410
|
get res() {
|
|
414
411
|
if (!this._res) {
|
package/dist/types/index.d.mts
CHANGED
|
@@ -88,6 +88,7 @@ interface ExtendContext {
|
|
|
88
88
|
}
|
|
89
89
|
interface SilgiRuntimeContext extends Record<string, any> {
|
|
90
90
|
params?: Record<string, string>;
|
|
91
|
+
protocol: EventProtocol;
|
|
91
92
|
/**
|
|
92
93
|
* Matched router Node
|
|
93
94
|
*
|
|
@@ -105,10 +106,6 @@ type EventProtocol = 'GRAPHQL' | 'HTTP' | 'WEBSOCKET';
|
|
|
105
106
|
* Bu nitrojs, h3 event or request context.
|
|
106
107
|
*/
|
|
107
108
|
interface SilgiEvent extends Record<string, unknown> {
|
|
108
|
-
/**
|
|
109
|
-
* Protocol Type
|
|
110
|
-
*/
|
|
111
|
-
readonly protocol: EventProtocol;
|
|
112
109
|
/**
|
|
113
110
|
* Event context.
|
|
114
111
|
*/
|