nitrostack 1.0.72 → 1.0.73
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/auth/api-key.js.map +1 -1
- package/dist/auth/client.js.map +1 -1
- package/dist/auth/index.d.ts +2 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +3 -0
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/middleware.d.ts +1 -1
- package/dist/auth/middleware.d.ts.map +1 -1
- package/dist/auth/middleware.js.map +1 -1
- package/dist/auth/secure-secret.d.ts +136 -0
- package/dist/auth/secure-secret.d.ts.map +1 -0
- package/dist/auth/secure-secret.js +182 -0
- package/dist/auth/secure-secret.js.map +1 -0
- package/dist/auth/server-metadata.d.ts.map +1 -1
- package/dist/auth/server-metadata.js.map +1 -1
- package/dist/auth/simple-jwt.d.ts +100 -14
- package/dist/auth/simple-jwt.d.ts.map +1 -1
- package/dist/auth/simple-jwt.js +19 -9
- package/dist/auth/simple-jwt.js.map +1 -1
- package/dist/auth/token-store.js +1 -1
- package/dist/auth/token-store.js.map +1 -1
- package/dist/auth/token-validation.js +1 -1
- package/dist/auth/token-validation.js.map +1 -1
- package/dist/cli/commands/build.js +1 -1
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/generate-types.js +12 -12
- package/dist/cli/commands/generate-types.js.map +1 -1
- package/dist/cli/commands/generate.d.ts +8 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +13 -12
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/init.js +1 -1
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/upgrade.d.ts +10 -0
- package/dist/cli/commands/upgrade.d.ts.map +1 -0
- package/dist/cli/commands/upgrade.js +221 -0
- package/dist/cli/commands/upgrade.js.map +1 -0
- package/dist/cli/index.js +7 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/core/app-decorator.d.ts +4 -3
- package/dist/core/app-decorator.d.ts.map +1 -1
- package/dist/core/app-decorator.js +67 -28
- package/dist/core/app-decorator.js.map +1 -1
- package/dist/core/builders.d.ts +19 -7
- package/dist/core/builders.d.ts.map +1 -1
- package/dist/core/builders.js +15 -8
- package/dist/core/builders.js.map +1 -1
- package/dist/core/component.d.ts +8 -8
- package/dist/core/component.d.ts.map +1 -1
- package/dist/core/component.js +3 -2
- package/dist/core/component.js.map +1 -1
- package/dist/core/config-module.d.ts +11 -4
- package/dist/core/config-module.d.ts.map +1 -1
- package/dist/core/config-module.js +1 -1
- package/dist/core/config-module.js.map +1 -1
- package/dist/core/decorators/cache.decorator.d.ts +9 -9
- package/dist/core/decorators/cache.decorator.d.ts.map +1 -1
- package/dist/core/decorators/cache.decorator.js +3 -3
- package/dist/core/decorators/cache.decorator.js.map +1 -1
- package/dist/core/decorators/health-check.decorator.d.ts +3 -3
- package/dist/core/decorators/health-check.decorator.d.ts.map +1 -1
- package/dist/core/decorators/health-check.decorator.js +2 -2
- package/dist/core/decorators/health-check.decorator.js.map +1 -1
- package/dist/core/decorators/rate-limit.decorator.d.ts +5 -4
- package/dist/core/decorators/rate-limit.decorator.d.ts.map +1 -1
- package/dist/core/decorators/rate-limit.decorator.js +3 -3
- package/dist/core/decorators/rate-limit.decorator.js.map +1 -1
- package/dist/core/decorators.d.ts +47 -29
- package/dist/core/decorators.d.ts.map +1 -1
- package/dist/core/decorators.js +9 -9
- package/dist/core/decorators.js.map +1 -1
- package/dist/core/di/container.d.ts +21 -4
- package/dist/core/di/container.d.ts.map +1 -1
- package/dist/core/di/container.js +11 -7
- package/dist/core/di/container.js.map +1 -1
- package/dist/core/di/injectable.decorator.d.ts +5 -3
- package/dist/core/di/injectable.decorator.d.ts.map +1 -1
- package/dist/core/di/injectable.decorator.js.map +1 -1
- package/dist/core/errors.d.ts +4 -4
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js.map +1 -1
- package/dist/core/events/event-emitter.d.ts +3 -3
- package/dist/core/events/event-emitter.d.ts.map +1 -1
- package/dist/core/events/event-emitter.js.map +1 -1
- package/dist/core/events/event.decorator.d.ts +5 -5
- package/dist/core/events/event.decorator.d.ts.map +1 -1
- package/dist/core/events/event.decorator.js +10 -6
- package/dist/core/events/event.decorator.js.map +1 -1
- package/dist/core/events/log-emitter.d.ts +7 -1
- package/dist/core/events/log-emitter.d.ts.map +1 -1
- package/dist/core/events/log-emitter.js.map +1 -1
- package/dist/core/filters/exception-filter.decorator.d.ts +5 -5
- package/dist/core/filters/exception-filter.decorator.d.ts.map +1 -1
- package/dist/core/filters/exception-filter.decorator.js +3 -3
- package/dist/core/filters/exception-filter.decorator.js.map +1 -1
- package/dist/core/filters/exception-filter.interface.d.ts +14 -5
- package/dist/core/filters/exception-filter.interface.d.ts.map +1 -1
- package/dist/core/guards/apikey.guard.d.ts +1 -1
- package/dist/core/guards/apikey.guard.d.ts.map +1 -1
- package/dist/core/guards/guard.interface.d.ts +1 -1
- package/dist/core/guards/guard.interface.d.ts.map +1 -1
- package/dist/core/guards/jwt.guard.d.ts +1 -1
- package/dist/core/guards/jwt.guard.d.ts.map +1 -1
- package/dist/core/guards/oauth.guard.d.ts +1 -1
- package/dist/core/guards/oauth.guard.d.ts.map +1 -1
- package/dist/core/guards/use-guards.decorator.d.ts +3 -3
- package/dist/core/guards/use-guards.decorator.d.ts.map +1 -1
- package/dist/core/guards/use-guards.decorator.js +1 -1
- package/dist/core/guards/use-guards.decorator.js.map +1 -1
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/interceptors/interceptor.decorator.d.ts +4 -4
- package/dist/core/interceptors/interceptor.decorator.d.ts.map +1 -1
- package/dist/core/interceptors/interceptor.decorator.js +2 -2
- package/dist/core/interceptors/interceptor.decorator.js.map +1 -1
- package/dist/core/interceptors/interceptor.interface.d.ts +3 -3
- package/dist/core/interceptors/interceptor.interface.d.ts.map +1 -1
- package/dist/core/logger.d.ts.map +1 -1
- package/dist/core/logger.js.map +1 -1
- package/dist/core/middleware/middleware.decorator.d.ts +4 -4
- package/dist/core/middleware/middleware.decorator.d.ts.map +1 -1
- package/dist/core/middleware/middleware.decorator.js +2 -2
- package/dist/core/middleware/middleware.decorator.js.map +1 -1
- package/dist/core/middleware/middleware.interface.d.ts +3 -3
- package/dist/core/middleware/middleware.interface.d.ts.map +1 -1
- package/dist/core/module.d.ts +33 -14
- package/dist/core/module.d.ts.map +1 -1
- package/dist/core/module.js +11 -6
- package/dist/core/module.js.map +1 -1
- package/dist/core/oauth-module.d.ts +9 -3
- package/dist/core/oauth-module.d.ts.map +1 -1
- package/dist/core/oauth-module.js +4 -3
- package/dist/core/oauth-module.js.map +1 -1
- package/dist/core/pipes/pipe.decorator.d.ts +14 -5
- package/dist/core/pipes/pipe.decorator.d.ts.map +1 -1
- package/dist/core/pipes/pipe.decorator.js +2 -2
- package/dist/core/pipes/pipe.decorator.js.map +1 -1
- package/dist/core/pipes/pipe.interface.d.ts +9 -4
- package/dist/core/pipes/pipe.interface.d.ts.map +1 -1
- package/dist/core/prompt.d.ts +13 -4
- package/dist/core/prompt.d.ts.map +1 -1
- package/dist/core/prompt.js +2 -2
- package/dist/core/prompt.js.map +1 -1
- package/dist/core/resource.d.ts +7 -2
- package/dist/core/resource.d.ts.map +1 -1
- package/dist/core/resource.js +2 -2
- package/dist/core/resource.js.map +1 -1
- package/dist/core/server.d.ts +49 -3
- package/dist/core/server.d.ts.map +1 -1
- package/dist/core/server.js +61 -34
- package/dist/core/server.js.map +1 -1
- package/dist/core/tool.d.ts +44 -16
- package/dist/core/tool.d.ts.map +1 -1
- package/dist/core/tool.js +19 -6
- package/dist/core/tool.js.map +1 -1
- package/dist/core/transports/discovery-http-server.d.ts +7 -1
- package/dist/core/transports/discovery-http-server.d.ts.map +1 -1
- package/dist/core/transports/discovery-http-server.js.map +1 -1
- package/dist/core/transports/http-server.d.ts +2 -2
- package/dist/core/transports/http-server.d.ts.map +1 -1
- package/dist/core/transports/http-server.js +1 -1
- package/dist/core/transports/http-server.js.map +1 -1
- package/dist/core/transports/streamable-http.d.ts +4 -4
- package/dist/core/transports/streamable-http.d.ts.map +1 -1
- package/dist/core/transports/streamable-http.js +1 -1
- package/dist/core/transports/streamable-http.js.map +1 -1
- package/dist/core/types.d.ts +87 -15
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/widgets/widget-registry.d.ts +2 -2
- package/dist/core/widgets/widget-registry.d.ts.map +1 -1
- package/dist/core/widgets/widget-registry.js +1 -1
- package/dist/core/widgets/widget-registry.js.map +1 -1
- package/dist/testing/index.d.ts +44 -17
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +5 -8
- package/dist/testing/index.js.map +1 -1
- package/dist/ui-next/index.d.ts +1 -1
- package/dist/ui-next/index.d.ts.map +1 -1
- package/dist/ui-next/index.js.map +1 -1
- package/dist/widgets/hooks/useWidgetSDK.d.ts +5 -5
- package/dist/widgets/runtime/WidgetLayout.js.map +1 -1
- package/dist/widgets/sdk.d.ts +5 -5
- package/dist/widgets/sdk.d.ts.map +1 -1
- package/dist/widgets/sdk.js.map +1 -1
- package/package.json +1 -1
- package/src/studio/app/api/auth/fetch-metadata/route.ts +3 -2
- package/src/studio/app/api/auth/register-client/route.ts +3 -2
- package/src/studio/app/api/chat/route.ts +31 -17
- package/src/studio/app/api/health/checks/route.ts +5 -4
- package/src/studio/app/api/init/route.ts +3 -2
- package/src/studio/app/api/ping/route.ts +3 -2
- package/src/studio/app/api/prompts/[name]/route.ts +4 -3
- package/src/studio/app/api/prompts/route.ts +3 -2
- package/src/studio/app/api/resources/[...uri]/route.ts +3 -2
- package/src/studio/app/api/resources/route.ts +3 -2
- package/src/studio/app/api/roots/route.ts +3 -2
- package/src/studio/app/api/sampling/route.ts +3 -2
- package/src/studio/app/api/tools/[name]/call/route.ts +3 -2
- package/src/studio/app/api/tools/route.ts +4 -3
- package/src/studio/app/api/widget-examples/route.ts +5 -4
- package/src/studio/app/auth/callback/page.tsx +3 -2
- package/src/studio/app/chat/page.tsx +481 -105
- package/src/studio/app/health/page.tsx +1 -1
- package/src/studio/app/logs/page.tsx +2 -2
- package/src/studio/app/page.tsx +5 -5
- package/src/studio/app/prompts/page.tsx +2 -2
- package/src/studio/app/settings/page.tsx +3 -2
- package/src/studio/app/tools/page.tsx +3 -3
- package/src/studio/components/LogMessage.tsx +1 -1
- package/src/studio/components/MarkdownRenderer.tsx +245 -348
- package/src/studio/components/Sidebar.tsx +18 -3
- package/src/studio/components/VoiceOrbOverlay.tsx +12 -6
- package/src/studio/components/WidgetErrorBoundary.tsx +48 -0
- package/src/studio/components/WidgetRenderer.tsx +168 -215
- package/src/studio/components/ops/OpsCanvas.tsx +748 -0
- package/src/studio/components/ops/OpsNodeDetailPanel.tsx +150 -0
- package/src/studio/components/ops/OpsSummaryBar.tsx +90 -0
- package/src/studio/components/ops/index.ts +5 -0
- package/src/studio/components/ops/nodes/BaseNode.tsx +65 -0
- package/src/studio/components/ops/nodes/LLMCallNode.tsx +34 -0
- package/src/studio/components/ops/nodes/LLMResponseNode.tsx +33 -0
- package/src/studio/components/ops/nodes/ToolCallNode.tsx +30 -0
- package/src/studio/components/ops/nodes/ToolResultNode.tsx +43 -0
- package/src/studio/components/ops/nodes/UserPromptNode.tsx +34 -0
- package/src/studio/components/ops/nodes/WidgetRenderNode.tsx +23 -0
- package/src/studio/components/ops/nodes/index.ts +8 -0
- package/src/studio/components/tools/ToolsCanvas.tsx +2 -2
- package/src/studio/lib/api.ts +61 -42
- package/src/studio/lib/http-client-transport.ts +2 -2
- package/src/studio/lib/llm-service.ts +126 -47
- package/src/studio/lib/mcp-client.ts +9 -6
- package/src/studio/lib/ops-store.ts +427 -0
- package/src/studio/lib/ops-tracker.ts +416 -0
- package/src/studio/lib/ops-types.ts +164 -0
- package/src/studio/lib/store.ts +8 -11
- package/src/studio/lib/types.ts +228 -38
- package/src/studio/lib/widget-loader.ts +2 -2
- package/templates/typescript-oauth/src/modules/flights/flights.prompts.ts +19 -22
- package/dist/cli/build-widgets.mjs +0 -165
|
@@ -8,7 +8,7 @@ const EVENT_HANDLER_KEY = 'nitrostack:event_handler';
|
|
|
8
8
|
* ```typescript
|
|
9
9
|
* export class OrderTools {
|
|
10
10
|
* @Tool({ name: 'create_order', ... })
|
|
11
|
-
* async createOrder(input:
|
|
11
|
+
* async createOrder(input: Record<string, unknown>, ctx: ExecutionContext) {
|
|
12
12
|
* const order = await this.saveOrder(input);
|
|
13
13
|
*
|
|
14
14
|
* // Emit event
|
|
@@ -20,7 +20,7 @@ const EVENT_HANDLER_KEY = 'nitrostack:event_handler';
|
|
|
20
20
|
*
|
|
21
21
|
* export class NotificationService {
|
|
22
22
|
* @OnEvent('order.created')
|
|
23
|
-
* async handleOrderCreated(order:
|
|
23
|
+
* async handleOrderCreated(order: unknown) {
|
|
24
24
|
* await this.sendConfirmationEmail(order);
|
|
25
25
|
* }
|
|
26
26
|
* }
|
|
@@ -28,12 +28,13 @@ const EVENT_HANDLER_KEY = 'nitrostack:event_handler';
|
|
|
28
28
|
*/
|
|
29
29
|
export function OnEvent(event) {
|
|
30
30
|
return (target, propertyKey, descriptor) => {
|
|
31
|
-
const
|
|
31
|
+
const targetWithConstructor = target;
|
|
32
|
+
const existingHandlers = Reflect.getMetadata(EVENT_HANDLER_KEY, targetWithConstructor.constructor) || [];
|
|
32
33
|
existingHandlers.push({
|
|
33
34
|
event,
|
|
34
35
|
methodName: propertyKey,
|
|
35
36
|
});
|
|
36
|
-
Reflect.defineMetadata(EVENT_HANDLER_KEY, existingHandlers,
|
|
37
|
+
Reflect.defineMetadata(EVENT_HANDLER_KEY, existingHandlers, targetWithConstructor.constructor);
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
40
|
/**
|
|
@@ -49,8 +50,11 @@ export function registerEventHandlers(instance) {
|
|
|
49
50
|
const emitter = EventEmitter.getInstance();
|
|
50
51
|
const handlers = getEventHandlers(instance.constructor);
|
|
51
52
|
for (const { event, methodName } of handlers) {
|
|
52
|
-
const
|
|
53
|
-
|
|
53
|
+
const method = instance[String(methodName)];
|
|
54
|
+
if (typeof method === 'function') {
|
|
55
|
+
const handler = method.bind(instance);
|
|
56
|
+
emitter.on(event, handler);
|
|
57
|
+
}
|
|
54
58
|
}
|
|
55
59
|
}
|
|
56
60
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.decorator.js","sourceRoot":"","sources":["../../../src/core/events/event.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,iBAAiB,GAAG,0BAA0B,CAAC;AAUrD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,OAAO,CAAC,KAAa;IACnC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"event.decorator.js","sourceRoot":"","sources":["../../../src/core/events/event.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,iBAAiB,GAAG,0BAA0B,CAAC;AAUrD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,OAAO,CAAC,KAAa;IACnC,OAAO,CAAC,MAAc,EAAE,WAA4B,EAAE,UAA8B,EAAE,EAAE;QACtF,MAAM,qBAAqB,GAAG,MAAiC,CAAC;QAChE,MAAM,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC,iBAAiB,EAAE,qBAAqB,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QACzG,gBAAgB,CAAC,IAAI,CAAC;YACpB,KAAK;YACL,UAAU,EAAE,WAAW;SACxB,CAAC,CAAC;QACH,OAAO,CAAC,cAAc,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC;IACjG,CAAC,CAAC;AACJ,CAAC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>;
|
|
4
|
+
interface LogInfo {
|
|
5
|
+
level: string;
|
|
6
|
+
message: string;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}
|
|
4
9
|
export declare class EventEmitterTransport extends Transport {
|
|
5
10
|
constructor(opts?: Transport.TransportStreamOptions);
|
|
6
|
-
log(info:
|
|
11
|
+
log(info: LogInfo, callback: () => void): void;
|
|
7
12
|
}
|
|
13
|
+
export {};
|
|
8
14
|
//# sourceMappingURL=log-emitter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-emitter.d.ts","sourceRoot":"","sources":["../../../src/core/events/log-emitter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAG1C,eAAO,MAAM,UAAU,uBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"log-emitter.d.ts","sourceRoot":"","sources":["../../../src/core/events/log-emitter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAG1C,eAAO,MAAM,UAAU,uBAAqB,CAAC;AAE7C,UAAU,OAAO;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAGD,qBAAa,qBAAsB,SAAQ,SAAS;gBACtC,IAAI,CAAC,EAAE,SAAS,CAAC,sBAAsB;IAInD,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI;CAUxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-emitter.js","sourceRoot":"","sources":["../../../src/core/events/log-emitter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAE1C,6BAA6B;AAC7B,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,YAAY,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"log-emitter.js","sourceRoot":"","sources":["../../../src/core/events/log-emitter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAE1C,6BAA6B;AAC7B,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,YAAY,EAAE,CAAC;AAQ7C,oCAAoC;AACpC,MAAM,OAAO,qBAAsB,SAAQ,SAAS;IAClD,YAAY,IAAuC;QACjD,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAED,GAAG,CAAC,IAAa,EAAE,QAAoB;QACrC,YAAY,CAAC,GAAG,EAAE;YAChB,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAC7B,sDAAsD;YACtD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;QAEH,uBAAuB;QACvB,QAAQ,EAAE,CAAC;IACb,CAAC;CACF"}
|
|
@@ -7,10 +7,10 @@ import { ExceptionFilterConstructor } from './exception-filter.interface.js';
|
|
|
7
7
|
* ```typescript
|
|
8
8
|
* @ExceptionFilter()
|
|
9
9
|
* export class GlobalExceptionFilter implements ExceptionFilterInterface {
|
|
10
|
-
* catch(exception:
|
|
10
|
+
* catch(exception: unknown, context: ExecutionContext) {
|
|
11
11
|
* context.logger.error('Exception caught:', exception);
|
|
12
12
|
* return {
|
|
13
|
-
* error: exception.message,
|
|
13
|
+
* error: exception instanceof Error ? exception.message : String(exception),
|
|
14
14
|
* timestamp: new Date().toISOString(),
|
|
15
15
|
* };
|
|
16
16
|
* }
|
|
@@ -25,16 +25,16 @@ export declare function ExceptionFilter(): ClassDecorator;
|
|
|
25
25
|
* ```typescript
|
|
26
26
|
* @Tool({ name: 'create_user', ... })
|
|
27
27
|
* @UseFilters(ValidationExceptionFilter, HttpExceptionFilter)
|
|
28
|
-
* async createUser(input:
|
|
28
|
+
* async createUser(input: Record<string, unknown>) { }
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
export declare function UseFilters(...filters: ExceptionFilterConstructor[]): MethodDecorator;
|
|
32
32
|
/**
|
|
33
33
|
* Get exception filters for a method
|
|
34
34
|
*/
|
|
35
|
-
export declare function getExceptionFilterMetadata(target:
|
|
35
|
+
export declare function getExceptionFilterMetadata(target: object, propertyKey: string | symbol): ExceptionFilterConstructor[];
|
|
36
36
|
/**
|
|
37
37
|
* Check if a class is marked as an exception filter
|
|
38
38
|
*/
|
|
39
|
-
export declare function isExceptionFilter(target:
|
|
39
|
+
export declare function isExceptionFilter(target: object): boolean;
|
|
40
40
|
//# sourceMappingURL=exception-filter.decorator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exception-filter.decorator.d.ts","sourceRoot":"","sources":["../../../src/core/filters/exception-filter.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAK7E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,IAAI,cAAc,CAIhD;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,GAAG,OAAO,EAAE,0BAA0B,EAAE,GAAG,eAAe,CAUpF;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"exception-filter.decorator.d.ts","sourceRoot":"","sources":["../../../src/core/filters/exception-filter.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAK7E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,IAAI,cAAc,CAIhD;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,GAAG,OAAO,EAAE,0BAA0B,EAAE,GAAG,eAAe,CAUpF;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,0BAA0B,EAAE,CAErH;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEzD"}
|
|
@@ -8,10 +8,10 @@ const IS_EXCEPTION_FILTER_KEY = 'nitrostack:is_exception_filter';
|
|
|
8
8
|
* ```typescript
|
|
9
9
|
* @ExceptionFilter()
|
|
10
10
|
* export class GlobalExceptionFilter implements ExceptionFilterInterface {
|
|
11
|
-
* catch(exception:
|
|
11
|
+
* catch(exception: unknown, context: ExecutionContext) {
|
|
12
12
|
* context.logger.error('Exception caught:', exception);
|
|
13
13
|
* return {
|
|
14
|
-
* error: exception.message,
|
|
14
|
+
* error: exception instanceof Error ? exception.message : String(exception),
|
|
15
15
|
* timestamp: new Date().toISOString(),
|
|
16
16
|
* };
|
|
17
17
|
* }
|
|
@@ -30,7 +30,7 @@ export function ExceptionFilter() {
|
|
|
30
30
|
* ```typescript
|
|
31
31
|
* @Tool({ name: 'create_user', ... })
|
|
32
32
|
* @UseFilters(ValidationExceptionFilter, HttpExceptionFilter)
|
|
33
|
-
* async createUser(input:
|
|
33
|
+
* async createUser(input: Record<string, unknown>) { }
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
36
|
export function UseFilters(...filters) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exception-filter.decorator.js","sourceRoot":"","sources":["../../../src/core/filters/exception-filter.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,MAAM,oBAAoB,GAAG,6BAA6B,CAAC;AAC3D,MAAM,uBAAuB,GAAG,gCAAgC,CAAC;AAEjE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"exception-filter.decorator.js","sourceRoot":"","sources":["../../../src/core/filters/exception-filter.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,MAAM,oBAAoB,GAAG,6BAA6B,CAAC;AAC3D,MAAM,uBAAuB,GAAG,gCAAgC,CAAC;AAEjE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,CAAC,MAAc,EAAE,EAAE;QACxB,OAAO,CAAC,cAAc,CAAC,uBAAuB,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAChE,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,UAAU,CAAC,GAAG,OAAqC;IACjE,OAAO,CAAC,MAAc,EAAE,WAA4B,EAAE,UAA8B,EAAE,EAAE;QACtF,MAAM,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC,oBAAoB,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC;QAC7F,OAAO,CAAC,cAAc,CACpB,oBAAoB,EACpB,CAAC,GAAG,eAAe,EAAE,GAAG,OAAO,CAAC,EAChC,MAAM,EACN,WAAW,CACZ,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B,CAAC,MAAc,EAAE,WAA4B;IACrF,OAAO,OAAO,CAAC,WAAW,CAAC,oBAAoB,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC;AAC9E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAc;IAC9C,OAAO,OAAO,CAAC,WAAW,CAAC,uBAAuB,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;AACvE,CAAC"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
2
|
import { ExecutionContext } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Exception with optional status code
|
|
5
|
+
*/
|
|
6
|
+
export interface ExceptionWithStatus extends Error {
|
|
7
|
+
status?: number;
|
|
8
|
+
statusCode?: number;
|
|
9
|
+
code?: string;
|
|
10
|
+
}
|
|
3
11
|
/**
|
|
4
12
|
* Exception Filter Interface
|
|
5
13
|
*
|
|
@@ -10,10 +18,11 @@ import { ExecutionContext } from '../types.js';
|
|
|
10
18
|
* ```typescript
|
|
11
19
|
* @ExceptionFilter()
|
|
12
20
|
* export class HttpExceptionFilter implements ExceptionFilterInterface {
|
|
13
|
-
* catch(exception:
|
|
21
|
+
* catch(exception: unknown, context: ExecutionContext) {
|
|
22
|
+
* const err = exception as ExceptionWithStatus;
|
|
14
23
|
* return {
|
|
15
|
-
* statusCode:
|
|
16
|
-
* message:
|
|
24
|
+
* statusCode: err.status || 500,
|
|
25
|
+
* message: err.message,
|
|
17
26
|
* timestamp: new Date().toISOString(),
|
|
18
27
|
* };
|
|
19
28
|
* }
|
|
@@ -21,10 +30,10 @@ import { ExecutionContext } from '../types.js';
|
|
|
21
30
|
* ```
|
|
22
31
|
*/
|
|
23
32
|
export interface ExceptionFilterInterface {
|
|
24
|
-
catch(exception:
|
|
33
|
+
catch(exception: unknown, context: ExecutionContext): unknown | Promise<unknown>;
|
|
25
34
|
}
|
|
26
35
|
/**
|
|
27
36
|
* Exception filter constructor type
|
|
28
37
|
*/
|
|
29
|
-
export type ExceptionFilterConstructor = new (...args:
|
|
38
|
+
export type ExceptionFilterConstructor = new (...args: unknown[]) => ExceptionFilterInterface;
|
|
30
39
|
//# sourceMappingURL=exception-filter.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exception-filter.interface.d.ts","sourceRoot":"","sources":["../../../src/core/filters/exception-filter.interface.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C
|
|
1
|
+
{"version":3,"file":"exception-filter.interface.d.ts","sourceRoot":"","sources":["../../../src/core/filters/exception-filter.interface.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,KAAK;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,wBAAwB;IACvC,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAClF;AAED;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apikey.guard.d.ts","sourceRoot":"","sources":["../../../src/core/guards/apikey.guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,cAAc;IAC7B,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAC;IAEZ,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB,oCAAoC;IACpC,CAAC,GAAG,EAAE,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"apikey.guard.d.ts","sourceRoot":"","sources":["../../../src/core/guards/apikey.guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,cAAc;IAC7B,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAC;IAEZ,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB,oCAAoC;IACpC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard.interface.d.ts","sourceRoot":"","sources":["../../../src/core/guards/guard.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB;;;;OAIG;IACH,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACpE;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"guard.interface.d.ts","sourceRoot":"","sources":["../../../src/core/guards/guard.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB;;;;OAIG;IACH,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACpE;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwt.guard.d.ts","sourceRoot":"","sources":["../../../src/core/guards/jwt.guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"jwt.guard.d.ts","sourceRoot":"","sources":["../../../src/core/guards/jwt.guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.guard.d.ts","sourceRoot":"","sources":["../../../src/core/guards/oauth.guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,iBAAiB;IAChC,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;IAEZ,8DAA8D;IAC9D,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,0DAA0D;IAC1D,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAExB,uCAAuC;IACvC,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,sCAAsC;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,uCAAuC;IACvC,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,+CAA+C;IAC/C,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,oBAAoB;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"oauth.guard.d.ts","sourceRoot":"","sources":["../../../src/core/guards/oauth.guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,iBAAiB;IAChC,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;IAEZ,8DAA8D;IAC9D,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,0DAA0D;IAC1D,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAExB,uCAAuC;IACvC,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,sCAAsC;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,uCAAuC;IACvC,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,+CAA+C;IAC/C,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,oBAAoB;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
|
|
@@ -12,14 +12,14 @@ export declare const GUARDS_METADATA: unique symbol;
|
|
|
12
12
|
* ```typescript
|
|
13
13
|
* @Tool({ name: 'whoami', ... })
|
|
14
14
|
* @UseGuards(JWTGuard)
|
|
15
|
-
* async whoami(input:
|
|
15
|
+
* async whoami(input: Record<string, unknown>, context: ExecutionContext) {
|
|
16
16
|
* // This only executes if JWTGuard.canActivate returns true
|
|
17
17
|
* }
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
export declare function UseGuards(...guards: GuardConstructor[]): (target:
|
|
20
|
+
export declare function UseGuards(...guards: GuardConstructor[]): (target: object, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
21
21
|
/**
|
|
22
22
|
* Get guards metadata for a specific method
|
|
23
23
|
*/
|
|
24
|
-
export declare function getGuardsMetadata(target:
|
|
24
|
+
export declare function getGuardsMetadata(target: object, methodName: string): GuardConstructor[];
|
|
25
25
|
//# sourceMappingURL=use-guards.decorator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-guards.decorator.d.ts","sourceRoot":"","sources":["../../../src/core/guards/use-guards.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,eAAe,eAA4B,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,GAAG,MAAM,EAAE,gBAAgB,EAAE,IACpC,QAAQ,
|
|
1
|
+
{"version":3,"file":"use-guards.decorator.d.ts","sourceRoot":"","sources":["../../../src/core/guards/use-guards.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,eAAe,eAA4B,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,GAAG,MAAM,EAAE,gBAAgB,EAAE,IACpC,QAAQ,MAAM,EAAE,aAAa,MAAM,EAAE,YAAY,kBAAkB,wBAKrF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAExF"}
|
|
@@ -11,7 +11,7 @@ export const GUARDS_METADATA = Symbol('guards:metadata');
|
|
|
11
11
|
* ```typescript
|
|
12
12
|
* @Tool({ name: 'whoami', ... })
|
|
13
13
|
* @UseGuards(JWTGuard)
|
|
14
|
-
* async whoami(input:
|
|
14
|
+
* async whoami(input: Record<string, unknown>, context: ExecutionContext) {
|
|
15
15
|
* // This only executes if JWTGuard.canActivate returns true
|
|
16
16
|
* }
|
|
17
17
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-guards.decorator.js","sourceRoot":"","sources":["../../../src/core/guards/use-guards.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,SAAS,CAAC,GAAG,MAA0B;IACrD,OAAO,UAAU,
|
|
1
|
+
{"version":3,"file":"use-guards.decorator.js","sourceRoot":"","sources":["../../../src/core/guards/use-guards.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,SAAS,CAAC,GAAG,MAA0B;IACrD,OAAO,UAAU,MAAc,EAAE,WAAmB,EAAE,UAA8B;QAClF,wCAAwC;QACxC,OAAO,CAAC,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;QACrE,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,UAAkB;IAClE,OAAO,OAAO,CAAC,WAAW,CAAC,eAAe,EAAE,MAAM,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC;AACxE,CAAC"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -10,11 +10,11 @@ export { createPrompt, Prompt } from './prompt.js';
|
|
|
10
10
|
export { createComponent, Component } from './component.js';
|
|
11
11
|
export { createLogger, defaultLogger } from './logger.js';
|
|
12
12
|
export * from './errors.js';
|
|
13
|
-
export type { McpServerConfig, ToolDefinition, ResourceDefinition, PromptDefinition, ExecutionContext, Logger, } from './types.js';
|
|
13
|
+
export type { McpServerConfig, ToolDefinition, ResourceDefinition, PromptDefinition, ExecutionContext, Logger, AuthContext, JsonValue, JsonValueOrUndefined, JsonObject, JsonArray, JsonPrimitive, Constructor, ClassConstructor, } from './types.js';
|
|
14
14
|
export { Tool as ToolDecorator, Widget, Resource as ResourceDecorator, Prompt as PromptDecorator, extractTools, extractResources, extractPrompts, getWidgetMetadata, getGuardsMetadata, InitialTool, } from './decorators.js';
|
|
15
15
|
export type { ToolOptions, ResourceOptions, PromptOptions, } from './decorators.js';
|
|
16
16
|
export { Module, createModule, isModule, getModuleMetadata, } from './module.js';
|
|
17
|
-
export type { ModuleMetadata, } from './module.js';
|
|
17
|
+
export type { ModuleMetadata, ModuleImport, DynamicModule, Provider, } from './module.js';
|
|
18
18
|
export type { Guard, GuardConstructor } from './guards/guard.interface.js';
|
|
19
19
|
export { UseGuards, getGuardsMetadata as getGuardsMetadataFromDecorator } from './guards/use-guards.decorator.js';
|
|
20
20
|
export type { JWTPayload } from './guards/jwt.guard.js';
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,YAAY,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAG9E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzD,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGnD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG5D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CA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E,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtF,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,SAAS;AACT,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE7D,aAAa;AACb,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGlE,OAAO;AACP,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,WAAW;AACX,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzD,SAAS;AACT,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEnD,oBAAoB;AACpB,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE5D,SAAS;AACT,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE1D,SAAS;AACT,cAAc,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,SAAS;AACT,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE7D,aAAa;AACb,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGlE,OAAO;AACP,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,WAAW;AACX,OAAO,EAAE,cAAc,EAAE,QAAQ,E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
8
|
* @Interceptor()
|
|
9
9
|
* export class TransformInterceptor implements InterceptorInterface {
|
|
10
|
-
* async intercept(context: ExecutionContext, next: () => Promise<
|
|
10
|
+
* async intercept(context: ExecutionContext, next: () => Promise<unknown>) {
|
|
11
11
|
* const result = await next();
|
|
12
12
|
* return { success: true, data: result, timestamp: Date.now() };
|
|
13
13
|
* }
|
|
@@ -22,16 +22,16 @@ export declare function Interceptor(): ClassDecorator;
|
|
|
22
22
|
* ```typescript
|
|
23
23
|
* @Tool({ name: 'get_user', ... })
|
|
24
24
|
* @UseInterceptors(TransformInterceptor, CacheInterceptor)
|
|
25
|
-
* async getUser(input:
|
|
25
|
+
* async getUser(input: Record<string, unknown>) { }
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
28
|
export declare function UseInterceptors(...interceptors: InterceptorConstructor[]): MethodDecorator;
|
|
29
29
|
/**
|
|
30
30
|
* Get interceptors for a method
|
|
31
31
|
*/
|
|
32
|
-
export declare function getInterceptorMetadata(target:
|
|
32
|
+
export declare function getInterceptorMetadata(target: object, propertyKey: string | symbol): InterceptorConstructor[];
|
|
33
33
|
/**
|
|
34
34
|
* Check if a class is marked as an interceptor
|
|
35
35
|
*/
|
|
36
|
-
export declare function isInterceptor(target:
|
|
36
|
+
export declare function isInterceptor(target: object): boolean;
|
|
37
37
|
//# sourceMappingURL=interceptor.decorator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interceptor.decorator.d.ts","sourceRoot":"","sources":["../../../src/core/interceptors/interceptor.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAKpE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,IAAI,cAAc,CAI5C;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,GAAG,YAAY,EAAE,sBAAsB,EAAE,GAAG,eAAe,CAU1F;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"interceptor.decorator.d.ts","sourceRoot":"","sources":["../../../src/core/interceptors/interceptor.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAKpE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,IAAI,cAAc,CAI5C;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,GAAG,YAAY,EAAE,sBAAsB,EAAE,GAAG,eAAe,CAU1F;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,sBAAsB,EAAE,CAE7G;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAErD"}
|
|
@@ -8,7 +8,7 @@ const IS_INTERCEPTOR_KEY = 'nitrostack:is_interceptor';
|
|
|
8
8
|
* ```typescript
|
|
9
9
|
* @Interceptor()
|
|
10
10
|
* export class TransformInterceptor implements InterceptorInterface {
|
|
11
|
-
* async intercept(context: ExecutionContext, next: () => Promise<
|
|
11
|
+
* async intercept(context: ExecutionContext, next: () => Promise<unknown>) {
|
|
12
12
|
* const result = await next();
|
|
13
13
|
* return { success: true, data: result, timestamp: Date.now() };
|
|
14
14
|
* }
|
|
@@ -27,7 +27,7 @@ export function Interceptor() {
|
|
|
27
27
|
* ```typescript
|
|
28
28
|
* @Tool({ name: 'get_user', ... })
|
|
29
29
|
* @UseInterceptors(TransformInterceptor, CacheInterceptor)
|
|
30
|
-
* async getUser(input:
|
|
30
|
+
* async getUser(input: Record<string, unknown>) { }
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
33
|
export function UseInterceptors(...interceptors) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interceptor.decorator.js","sourceRoot":"","sources":["../../../src/core/interceptors/interceptor.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,MAAM,eAAe,GAAG,wBAAwB,CAAC;AACjD,MAAM,kBAAkB,GAAG,2BAA2B,CAAC;AAEvD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"interceptor.decorator.js","sourceRoot":"","sources":["../../../src/core/interceptors/interceptor.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,MAAM,eAAe,GAAG,wBAAwB,CAAC;AACjD,MAAM,kBAAkB,GAAG,2BAA2B,CAAC;AAEvD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,CAAC,MAAc,EAAE,EAAE;QACxB,OAAO,CAAC,cAAc,CAAC,kBAAkB,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,GAAG,YAAsC;IACvE,OAAO,CAAC,MAAc,EAAE,WAA4B,EAAE,UAA8B,EAAE,EAAE;QACtF,MAAM,oBAAoB,GAAG,OAAO,CAAC,WAAW,CAAC,eAAe,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC;QAC7F,OAAO,CAAC,cAAc,CACpB,eAAe,EACf,CAAC,GAAG,oBAAoB,EAAE,GAAG,YAAY,CAAC,EAC1C,MAAM,EACN,WAAW,CACZ,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAAc,EAAE,WAA4B;IACjF,OAAO,OAAO,CAAC,WAAW,CAAC,eAAe,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC;AACzE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,MAAc;IAC1C,OAAO,OAAO,CAAC,WAAW,CAAC,kBAAkB,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;AAClE,CAAC"}
|
|
@@ -10,7 +10,7 @@ import { ExecutionContext } from '../types.js';
|
|
|
10
10
|
* ```typescript
|
|
11
11
|
* @Interceptor()
|
|
12
12
|
* export class TransformInterceptor implements InterceptorInterface {
|
|
13
|
-
* async intercept(context: ExecutionContext, next: () => Promise<
|
|
13
|
+
* async intercept(context: ExecutionContext, next: () => Promise<unknown>) {
|
|
14
14
|
* const result = await next();
|
|
15
15
|
* return {
|
|
16
16
|
* success: true,
|
|
@@ -22,10 +22,10 @@ import { ExecutionContext } from '../types.js';
|
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
24
|
export interface InterceptorInterface {
|
|
25
|
-
intercept(context: ExecutionContext, next: () => Promise<
|
|
25
|
+
intercept(context: ExecutionContext, next: () => Promise<unknown>): Promise<unknown>;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Interceptor constructor type
|
|
29
29
|
*/
|
|
30
|
-
export type InterceptorConstructor = new (...args:
|
|
30
|
+
export type InterceptorConstructor = new (...args: unknown[]) => InterceptorInterface;
|
|
31
31
|
//# sourceMappingURL=interceptor.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interceptor.interface.d.ts","sourceRoot":"","sources":["../../../src/core/interceptors/interceptor.interface.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"interceptor.interface.d.ts","sourceRoot":"","sources":["../../../src/core/interceptors/interceptor.interface.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtF;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/core/logger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/core/logger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAW,MAAM,YAAY,CAAC;AAG7C;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,GAAG,MAAM,CA6DT;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,QAAkC,CAAC"}
|
package/dist/core/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/core/logger.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,OAK5B;IACC,MAAM,EAAE,KAAK,GAAG,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,YAAY,EAAE,aAAa,GAAG,KAAK,EAAE,GA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,OAAe,EAAE,IAAc,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC;QAC9E,IAAI,EAAE,CAAC,OAAe,EAAE,IAAc,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC;QAC5E,IAAI,EAAE,CAAC,OAAe,EAAE,IAAc,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC;QAC5E,KAAK,EAAE,CAAC,OAAe,EAAE,IAAc,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC;KAC/E,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC"}
|
|
@@ -7,7 +7,7 @@ import { MiddlewareConstructor } from './middleware.interface.js';
|
|
|
7
7
|
* ```typescript
|
|
8
8
|
* @Middleware()
|
|
9
9
|
* export class LoggingMiddleware implements MiddlewareInterface {
|
|
10
|
-
* async use(context: ExecutionContext, next: () => Promise<
|
|
10
|
+
* async use(context: ExecutionContext, next: () => Promise<unknown>) {
|
|
11
11
|
* console.log('Before');
|
|
12
12
|
* const result = await next();
|
|
13
13
|
* console.log('After');
|
|
@@ -24,16 +24,16 @@ export declare function Middleware(): ClassDecorator;
|
|
|
24
24
|
* ```typescript
|
|
25
25
|
* @Tool({ name: 'my_tool', ... })
|
|
26
26
|
* @UseMiddleware(LoggingMiddleware, AuthMiddleware)
|
|
27
|
-
* async myTool(input:
|
|
27
|
+
* async myTool(input: Record<string, unknown>, context: ExecutionContext) { }
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
30
|
export declare function UseMiddleware(...middlewares: MiddlewareConstructor[]): MethodDecorator;
|
|
31
31
|
/**
|
|
32
32
|
* Get middlewares for a method
|
|
33
33
|
*/
|
|
34
|
-
export declare function getMiddlewareMetadata(target:
|
|
34
|
+
export declare function getMiddlewareMetadata(target: object, propertyKey: string | symbol): MiddlewareConstructor[];
|
|
35
35
|
/**
|
|
36
36
|
* Check if a class is marked as middleware
|
|
37
37
|
*/
|
|
38
|
-
export declare function isMiddleware(target:
|
|
38
|
+
export declare function isMiddleware(target: object): boolean;
|
|
39
39
|
//# sourceMappingURL=middleware.decorator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.decorator.d.ts","sourceRoot":"","sources":["../../../src/core/middleware/middleware.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAKlE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,IAAI,cAAc,CAI3C;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,GAAG,WAAW,EAAE,qBAAqB,EAAE,GAAG,eAAe,CAUtF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"middleware.decorator.d.ts","sourceRoot":"","sources":["../../../src/core/middleware/middleware.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAKlE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,IAAI,cAAc,CAI3C;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,GAAG,WAAW,EAAE,qBAAqB,EAAE,GAAG,eAAe,CAUtF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,qBAAqB,EAAE,CAE3G;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEpD"}
|
|
@@ -8,7 +8,7 @@ const IS_MIDDLEWARE_KEY = 'nitrostack:is_middleware';
|
|
|
8
8
|
* ```typescript
|
|
9
9
|
* @Middleware()
|
|
10
10
|
* export class LoggingMiddleware implements MiddlewareInterface {
|
|
11
|
-
* async use(context: ExecutionContext, next: () => Promise<
|
|
11
|
+
* async use(context: ExecutionContext, next: () => Promise<unknown>) {
|
|
12
12
|
* console.log('Before');
|
|
13
13
|
* const result = await next();
|
|
14
14
|
* console.log('After');
|
|
@@ -29,7 +29,7 @@ export function Middleware() {
|
|
|
29
29
|
* ```typescript
|
|
30
30
|
* @Tool({ name: 'my_tool', ... })
|
|
31
31
|
* @UseMiddleware(LoggingMiddleware, AuthMiddleware)
|
|
32
|
-
* async myTool(input:
|
|
32
|
+
* async myTool(input: Record<string, unknown>, context: ExecutionContext) { }
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
35
|
export function UseMiddleware(...middlewares) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.decorator.js","sourceRoot":"","sources":["../../../src/core/middleware/middleware.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,MAAM,cAAc,GAAG,uBAAuB,CAAC;AAC/C,MAAM,iBAAiB,GAAG,0BAA0B,CAAC;AAErD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"middleware.decorator.js","sourceRoot":"","sources":["../../../src/core/middleware/middleware.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,MAAM,cAAc,GAAG,uBAAuB,CAAC;AAC/C,MAAM,iBAAiB,GAAG,0BAA0B,CAAC;AAErD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,CAAC,MAAc,EAAE,EAAE;QACxB,OAAO,CAAC,cAAc,CAAC,iBAAiB,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,GAAG,WAAoC;IACnE,OAAO,CAAC,MAAc,EAAE,WAA4B,EAAE,UAA8B,EAAE,EAAE;QACtF,MAAM,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAC,cAAc,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC;QAC3F,OAAO,CAAC,cAAc,CACpB,cAAc,EACd,CAAC,GAAG,mBAAmB,EAAE,GAAG,WAAW,CAAC,EACxC,MAAM,EACN,WAAW,CACZ,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAAc,EAAE,WAA4B;IAChF,OAAO,OAAO,CAAC,WAAW,CAAC,cAAc,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC;AACxE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,MAAc;IACzC,OAAO,OAAO,CAAC,WAAW,CAAC,iBAAiB,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;AACjE,CAAC"}
|
|
@@ -10,7 +10,7 @@ import { ExecutionContext } from '../types.js';
|
|
|
10
10
|
* ```typescript
|
|
11
11
|
* @Middleware()
|
|
12
12
|
* export class LoggingMiddleware implements MiddlewareInterface {
|
|
13
|
-
* async use(context: ExecutionContext, next: () => Promise<
|
|
13
|
+
* async use(context: ExecutionContext, next: () => Promise<unknown>) {
|
|
14
14
|
* console.log('Before:', context.toolName);
|
|
15
15
|
* const result = await next();
|
|
16
16
|
* console.log('After:', context.toolName);
|
|
@@ -20,10 +20,10 @@ import { ExecutionContext } from '../types.js';
|
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
22
|
export interface MiddlewareInterface {
|
|
23
|
-
use(context: ExecutionContext, next: () => Promise<
|
|
23
|
+
use(context: ExecutionContext, next: () => Promise<unknown>): Promise<unknown>;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Middleware constructor type
|
|
27
27
|
*/
|
|
28
|
-
export type MiddlewareConstructor = new (...args:
|
|
28
|
+
export type MiddlewareConstructor = new (...args: unknown[]) => MiddlewareInterface;
|
|
29
29
|
//# sourceMappingURL=middleware.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.interface.d.ts","sourceRoot":"","sources":["../../../src/core/middleware/middleware.interface.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,mBAAmB;IAClC,GAAG,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"middleware.interface.d.ts","sourceRoot":"","sources":["../../../src/core/middleware/middleware.interface.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,mBAAmB;IAClC,GAAG,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAChF;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,mBAAmB,CAAC"}
|