@relai-fi/x402 0.6.0-rc.1 → 0.6.0-rc.2
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/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/server.cjs +3 -0
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +3 -0
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -864,7 +864,10 @@ var Relai = class {
|
|
|
864
864
|
if (pluginsWithHook.length > 0) {
|
|
865
865
|
const originalJson = res.json?.bind(res);
|
|
866
866
|
const originalSend = res.send?.bind(res);
|
|
867
|
+
let afterSettledFired = false;
|
|
867
868
|
const fireAfterSettled = (statusCode) => {
|
|
869
|
+
if (afterSettledFired) return;
|
|
870
|
+
afterSettledFired = true;
|
|
868
871
|
const resultWithStatus = { ...result, statusCode };
|
|
869
872
|
for (const plugin of pluginsWithHook) {
|
|
870
873
|
plugin.afterSettled(req, resultWithStatus, settleCtx).catch((e) => {
|