silgi 0.7.50 → 0.7.52

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,4 +1,4 @@
1
- const version = "0.7.50";
1
+ const version = "0.7.52";
2
2
  const packageJson = {
3
3
  version: version};
4
4
 
@@ -357,8 +357,6 @@ ${uriContent}
357
357
 
358
358
  async function createCoreFramework(silgi) {
359
359
  const relativeRootDir = relativeWithDot(silgi.options.rootDir, silgi.options.serverDir);
360
- if (silgi.options.preset !== "nitro" && silgi.options.preset !== "h3")
361
- return;
362
360
  const importItems = {
363
361
  "silgi/types": {
364
362
  import: [
@@ -608,6 +608,9 @@ function silgi(event) {
608
608
  }
609
609
  async function execute(uriString, input, event, source) {
610
610
  const silgiCtx = useSilgi();
611
+ const config = {
612
+ returnNull: false
613
+ };
611
614
  try {
612
615
  const operation = parseURI(uriString, silgiCtx.uris);
613
616
  if (!operation) {
@@ -616,9 +619,6 @@ async function execute(uriString, input, event, source) {
616
619
  let success = false;
617
620
  let cached = false;
618
621
  let result;
619
- const config = {
620
- returnNull: false
621
- };
622
622
  const handler = silgiCtx.scannedHandlers.get(operation.uri);
623
623
  if (event) {
624
624
  await silgiCtx.callHook("event:before", event, handler);
@@ -686,9 +686,7 @@ async function execute(uriString, input, event, source) {
686
686
  source,
687
687
  error: err instanceof Error ? err : new Error(String(err)),
688
688
  timestamp: Date.now(),
689
- config: {
690
- returnNull: false
691
- }
689
+ config
692
690
  });
693
691
  silgiCtx.captureError(SilgiError.from(err), {
694
692
  event,
@@ -1,3 +1,3 @@
1
- const version = "0.7.50";
1
+ const version = "0.7.52";
2
2
 
3
3
  export { version };
@@ -1,3 +1,3 @@
1
- const version = "0.7.50";
1
+ const version = "0.7.52";
2
2
 
3
3
  export { version };
@@ -827,7 +827,10 @@ interface SilgiRuntimeHooks {
827
827
  'action:after': (context: ModuleHookContext) => HookResult;
828
828
  'action:error': (context: ModuleHookContext) => HookResult;
829
829
  'action:finally': (context: ModuleHookContext) => HookResult;
830
- 'event:before': (event: SilgiEvents, handler: ResolvedMethodHandlerType | undefined) => HookResult;
830
+ 'event:before': (event: SilgiEvents, handler: ResolvedMethodHandlerType | undefined, options?: {
831
+ handlerSkipped: boolean;
832
+ throwErrors: boolean;
833
+ }) => HookResult;
831
834
  'error': CaptureError;
832
835
  }
833
836
 
@@ -827,7 +827,10 @@ interface SilgiRuntimeHooks {
827
827
  'action:after': (context: ModuleHookContext) => HookResult;
828
828
  'action:error': (context: ModuleHookContext) => HookResult;
829
829
  'action:finally': (context: ModuleHookContext) => HookResult;
830
- 'event:before': (event: SilgiEvents, handler: ResolvedMethodHandlerType | undefined) => HookResult;
830
+ 'event:before': (event: SilgiEvents, handler: ResolvedMethodHandlerType | undefined, options?: {
831
+ handlerSkipped: boolean;
832
+ throwErrors: boolean;
833
+ }) => HookResult;
831
834
  'error': CaptureError;
832
835
  }
833
836
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.7.50",
4
+ "version": "0.7.52",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {