silgi 0.41.12 → 0.41.14

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.12";
4
+ const version = "0.41.14";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
@@ -651,14 +651,11 @@ async function orchestrate(route, event, _input) {
651
651
  }
652
652
  silgiCtx.shared.$fetch = silgiFetch;
653
653
  silgiCtx.shared.silgi = silgiCtx;
654
- let result;
655
- if (!isGraphQL) {
656
- result = await route.service?.setup.handler?.(
657
- inputData,
658
- silgiCtx.shared,
659
- event
660
- );
661
- }
654
+ const result = await route.service?.setup.handler?.(
655
+ inputData,
656
+ silgiCtx.shared,
657
+ event
658
+ );
662
659
  await silgiCtx.callHook("fetch:after", {
663
660
  event,
664
661
  url: silgiURL,
@@ -934,8 +931,8 @@ async function middleware(event, url) {
934
931
  if (_previous !== void 0 && _previous !== kNotFound) {
935
932
  return _previous;
936
933
  }
937
- let allowedMethod = m.method ?? "";
938
- const methodIsAllowed = allowedMethod === "ALL" || allowedMethod === event.req.method;
934
+ const allowedMethod = m.method ?? "";
935
+ const methodIsAllowed = allowedMethod === "ALL" || allowedMethod === event.req.method || allowedMethod === "GRAPHQL";
939
936
  if (!methodIsAllowed) {
940
937
  return;
941
938
  }
@@ -970,7 +967,7 @@ async function middleware(event, url) {
970
967
  return _previous;
971
968
  }
972
969
  const allowedMethod = match.data.method ?? "";
973
- const methodIsAllowed = allowedMethod === "ALL" || allowedMethod === event.req.method;
970
+ const methodIsAllowed = allowedMethod === "ALL" || allowedMethod === event.req.method || allowedMethod === "GRAPHQL";
974
971
  if (!methodIsAllowed || !match.data.middleware) {
975
972
  return;
976
973
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.41.12",
4
+ "version": "0.41.14",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {