silgi 0.7.49 → 0.7.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.
@@ -1,4 +1,4 @@
1
- const version = "0.7.49";
1
+ const version = "0.7.51";
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);
@@ -670,7 +670,8 @@ async function execute(uriString, input, event, source) {
670
670
  result,
671
671
  success,
672
672
  source,
673
- modules: handler.modules
673
+ modules: handler.modules,
674
+ config
674
675
  });
675
676
  if (!cached) {
676
677
  if (success && cacheData?.cachedKey && handler.storage) {
@@ -684,7 +685,8 @@ async function execute(uriString, input, event, source) {
684
685
  event,
685
686
  source,
686
687
  error: err instanceof Error ? err : new Error(String(err)),
687
- timestamp: Date.now()
688
+ timestamp: Date.now(),
689
+ config
688
690
  });
689
691
  silgiCtx.captureError(SilgiError.from(err), {
690
692
  event,
@@ -1,3 +1,3 @@
1
- const version = "0.7.49";
1
+ const version = "0.7.51";
2
2
 
3
3
  export { version };
@@ -1,3 +1,3 @@
1
- const version = "0.7.49";
1
+ const version = "0.7.51";
2
2
 
3
3
  export { version };
@@ -480,7 +480,7 @@ type ModuleHookContext = Readonly<{
480
480
  error?: Error;
481
481
  success?: boolean;
482
482
  cached?: boolean;
483
- config?: {
483
+ config: {
484
484
  returnNull: boolean;
485
485
  };
486
486
  }>;
@@ -480,7 +480,7 @@ type ModuleHookContext = Readonly<{
480
480
  error?: Error;
481
481
  success?: boolean;
482
482
  cached?: boolean;
483
- config?: {
483
+ config: {
484
484
  returnNull: boolean;
485
485
  };
486
486
  }>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.7.49",
4
+ "version": "0.7.51",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {