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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from 'citty';
3
3
 
4
- const version = "0.41.20";
4
+ const version = "0.41.21";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
@@ -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) {
@@ -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
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.41.20",
4
+ "version": "0.41.21",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {