silgi 0.37.2 → 0.37.4
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/cli/index.mjs +1 -1
- package/dist/core/index.mjs +5 -1
- package/dist/types/index.d.mts +1 -0
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
package/dist/core/index.mjs
CHANGED
|
@@ -538,13 +538,16 @@ async function orchestrate(route, event) {
|
|
|
538
538
|
const routerParams = getRouterParams(event);
|
|
539
539
|
const queryParams = getQuery(event);
|
|
540
540
|
const service = route.service;
|
|
541
|
+
const earlyReturnValue = false;
|
|
541
542
|
const cachePromise = cacheExecute(input, route, silgiURL, event);
|
|
542
543
|
const beforeHookPromise = silgiCtx.callHook("fetch:before", {
|
|
543
544
|
url: silgiURL,
|
|
544
545
|
input,
|
|
545
546
|
event,
|
|
546
|
-
route
|
|
547
|
+
route,
|
|
548
|
+
earlyReturnValue
|
|
547
549
|
});
|
|
550
|
+
if (earlyReturnValue !== false) ;
|
|
548
551
|
const cacheData = await cachePromise;
|
|
549
552
|
await beforeHookPromise;
|
|
550
553
|
if (cacheData?.success) {
|
|
@@ -554,6 +557,7 @@ async function orchestrate(route, event) {
|
|
|
554
557
|
input,
|
|
555
558
|
result: cacheData.data,
|
|
556
559
|
success: true,
|
|
560
|
+
cached: true,
|
|
557
561
|
// modules: setup.modules,
|
|
558
562
|
route
|
|
559
563
|
});
|
package/dist/types/index.d.mts
CHANGED