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.
package/dist/_chunks/index.mjs
CHANGED
package/dist/cli/prepare.mjs
CHANGED
|
@@ -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: [
|
package/dist/core/index.mjs
CHANGED
|
@@ -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,
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED
package/dist/types/index.d.mts
CHANGED
|
@@ -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
|
|
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/dist/types/index.d.ts
CHANGED
|
@@ -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
|
|
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
|
|