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.
- package/dist/cli/index.mjs +1 -1
- package/dist/core/index.d.mts +1 -1
- package/dist/core/index.mjs +5 -3
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
package/dist/core/index.d.mts
CHANGED
|
@@ -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
|
|
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?: {
|
package/dist/core/index.mjs
CHANGED
|
@@ -365,11 +365,13 @@ class _SilgiEvent {
|
|
|
365
365
|
}
|
|
366
366
|
class SilgiEventResponse {
|
|
367
367
|
status;
|
|
368
|
-
|
|
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
|
|
544
|
+
if (_input?.path) {
|
|
543
545
|
delete _input.path;
|
|
544
546
|
}
|
|
545
|
-
if (_input
|
|
547
|
+
if (_input?.query) {
|
|
546
548
|
delete _input.query;
|
|
547
549
|
}
|
|
548
550
|
const inputData = {
|