silgi 0.41.32 → 0.41.34

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.32";
4
+ const version = "0.41.34";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
@@ -780,7 +780,7 @@ function getUrlPrefix(path, method) {
780
780
  };
781
781
  }
782
782
 
783
- async function orchestrate(route, event, _input, parent, info, callBack) {
783
+ async function orchestrate(route, event, _input, parent, info) {
784
784
  const silgiCtx = useSilgi();
785
785
  const isGraphQL = event.context.protocol === "GRAPHQL";
786
786
  const silgiURL = getUrlPrefix(route.route || event.req.url, route.method);
@@ -835,7 +835,7 @@ async function orchestrate(route, event, _input, parent, info, callBack) {
835
835
  }
836
836
  silgiCtx.shared.$fetch = silgiFetch;
837
837
  silgiCtx.shared.silgi = silgiCtx;
838
- const result = callBack ? await callBack() : await route.service?.handler?.(
838
+ const result = await route.service?.handler?.(
839
839
  // input
840
840
  inputData,
841
841
  // shared
@@ -1070,12 +1070,12 @@ async function handler(event, middlewareMode = false, input, parent, info, callB
1070
1070
  }
1071
1071
  event.context.params = match.params;
1072
1072
  event.context.matchedRoute = match.data;
1073
- return orchestrate(match.data, event, input, parent, info, callBack);
1073
+ return orchestrate(match.data, event, input, parent, info);
1074
1074
  });
1075
1075
  } else {
1076
1076
  event.context.params = match.params;
1077
1077
  event.context.matchedRoute = match.data;
1078
- return orchestrate(match.data, event, input, parent, info, callBack);
1078
+ return orchestrate(match.data, event, input, parent, info);
1079
1079
  }
1080
1080
  }
1081
1081
  }
@@ -469,7 +469,7 @@ interface ResolvedModuleMeta extends ModuleMeta {
469
469
  }
470
470
  type ModuleHookContext = Readonly<{
471
471
  event?: SilgiEvent;
472
- url: SilgiURL;
472
+ url?: SilgiURL;
473
473
  input?: unknown;
474
474
  result?: unknown;
475
475
  route?: SilgiRoute;
@@ -477,7 +477,7 @@ type ModuleHookContext = Readonly<{
477
477
  success?: boolean;
478
478
  cached?: boolean;
479
479
  }> & {
480
- hookContext: {
480
+ hookContext?: {
481
481
  earlyReturnValue: any | false;
482
482
  };
483
483
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.41.32",
4
+ "version": "0.41.34",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {