silgi 0.37.49 → 0.37.51

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.37.49";
4
+ const version = "0.37.51";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
@@ -11,7 +11,7 @@ declare function silgiFetch<Schema extends SilgiSchema = SilgiSchema, Route exte
11
11
  /**
12
12
  * Fetch API for Silgi framework using standard Request options
13
13
  */
14
- declare function silgiFetch(_request: Request | URL | string, options?: RequestInit & {
14
+ declare function silgiFetch(_request: Request | URL, options?: RequestInit & {
15
15
  pathParams?: Record<string, any>;
16
16
  }, context?: SilgiRuntimeContext): Promise<Response | Promise<Response>>;
17
17
  declare function handler(event: SilgiEvent, url?: {
@@ -365,11 +365,13 @@ class _SilgiEvent {
365
365
  }
366
366
  class SilgiEventResponse {
367
367
  status;
368
- // statusText?: string;
368
+ statusText;
369
369
  _headers;
370
370
  get headers() {
371
371
  if (!this._headers) {
372
372
  this._headers = new Headers();
373
+ this._headers.set("Content-Type", "application/json");
374
+ this._headers.set("Accept", "application/json");
373
375
  }
374
376
  return this._headers;
375
377
  }
@@ -539,10 +541,10 @@ async function orchestrate(route, event, _input) {
539
541
  const hookContext = { earlyReturnValue: false };
540
542
  const routerParams = _input ? input.path : getRouterParams(event);
541
543
  const queryParams = _input ? input.query : getQuery(event);
542
- if (_input.path) {
544
+ if (_input?.path) {
543
545
  delete _input.path;
544
546
  }
545
- if (_input.query) {
547
+ if (_input?.query) {
546
548
  delete _input.query;
547
549
  }
548
550
  const inputData = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.37.49",
4
+ "version": "0.37.51",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {