@routier/core 0.0.4 → 0.0.6
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/capabilities/Capability.d.ts +21 -0
- package/dist/capabilities/PerformanceCapability.d.ts +15 -0
- package/dist/capabilities/TracingCapability.d.ts +14 -0
- package/dist/capabilities/index.d.ts +4 -0
- package/dist/capabilities/index.js +707 -0
- package/dist/capabilities/index.js.map +1 -0
- package/dist/capabilities/performance/PerformanceTracker.d.ts +11 -0
- package/dist/capabilities/tracing/CallTraceManager.d.ts +12 -0
- package/dist/capabilities/types.d.ts +26 -0
- package/dist/codegen/index.js +621 -0
- package/dist/codegen/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +724 -522
- package/dist/index.js.map +1 -1
- package/dist/pipeline/TrampolinePipeline.d.ts +0 -1
- package/dist/pipeline/WorkPipeline.test.d.ts +1 -0
- package/dist/pipeline/index.js +47 -71
- package/dist/pipeline/index.js.map +1 -1
- package/dist/plugins/EphemeralDataPlugin.test.d.ts +1 -0
- package/dist/plugins/index.d.ts +0 -1
- package/dist/plugins/index.js +128 -550
- package/dist/plugins/index.js.map +1 -1
- package/dist/schema/index.js +4 -3
- package/dist/schema/index.js.map +1 -1
- package/package.json +5 -1
- package/dist/plugins/capabilities/DbPluginCapability.d.ts +0 -23
- package/dist/plugins/capabilities/index.d.ts +0 -2
- package/dist/plugins/capabilities/logging/DbPluginLoggingCapability.d.ts +0 -28
- package/dist/plugins/capabilities/logging/index.d.ts +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ExplorationOptions, MethodInfo } from "./types";
|
|
2
|
+
export declare abstract class Capability {
|
|
3
|
+
protected isValidObject(obj: unknown): obj is object;
|
|
4
|
+
protected getObjectName(obj: unknown): string;
|
|
5
|
+
protected exploreObjectMethods(obj: unknown, callback: (methodInfo: MethodInfo) => void, options?: ExplorationOptions): void;
|
|
6
|
+
protected exploreRootMethods(obj: object, callback: (methodInfo: MethodInfo) => void, filter: (methodInfo: MethodInfo) => boolean): void;
|
|
7
|
+
protected extractMethodNames(obj: unknown): (string | symbol)[];
|
|
8
|
+
protected isCallableMethod(descriptor: PropertyDescriptor | undefined, key: string | symbol): boolean;
|
|
9
|
+
protected isCustomClassInstance(value: unknown): boolean;
|
|
10
|
+
protected shouldProcessProperty(property: unknown): boolean;
|
|
11
|
+
protected exploreNestedMethods(obj: unknown, callback: (methodInfo: MethodInfo) => void, filter: (methodInfo: MethodInfo) => boolean, initialPath: string[], visited: Set<object>, maxDepth: number, includeNonEnumerable: boolean): void;
|
|
12
|
+
private explorePropertyMethods;
|
|
13
|
+
protected stringifyValue(value: unknown, maxDepth?: number, currentDepth?: number): string;
|
|
14
|
+
protected getFunctionName(fn: Function): string;
|
|
15
|
+
protected stringifyObject(obj: any, maxDepth: number, currentDepth: number): string;
|
|
16
|
+
protected stringifyArray(arr: any[], maxDepth: number, currentDepth: number): string;
|
|
17
|
+
protected stringifyClassInstance(obj: any, maxDepth: number, currentDepth: number): string;
|
|
18
|
+
protected stringifyPlainObject(obj: any, maxDepth: number, currentDepth: number): string;
|
|
19
|
+
protected getObjectProperties(obj: any): Record<string, any>;
|
|
20
|
+
abstract apply(instance: unknown): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Capability } from "./Capability";
|
|
2
|
+
import { MethodMetadata, PerformanceMetrics } from "./types";
|
|
3
|
+
export type PerformanceCapabilityOptions = {
|
|
4
|
+
log?: (type: 'ORIGIN' | 'CHILD', operationId: string, methodName: string, methodPath: string, performanceMetrics: PerformanceMetrics) => void;
|
|
5
|
+
shouldLog: (methodName: string | symbol, metadata: MethodMetadata) => boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare class PerformanceCapability extends Capability {
|
|
8
|
+
private callTraceManager;
|
|
9
|
+
private performanceTracker;
|
|
10
|
+
private log;
|
|
11
|
+
private shouldLog?;
|
|
12
|
+
constructor(options?: PerformanceCapabilityOptions);
|
|
13
|
+
private createPerformanceInterceptor;
|
|
14
|
+
apply(instance: unknown): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Capability } from "./Capability";
|
|
2
|
+
import { MethodMetadata } from "./types";
|
|
3
|
+
export type TracingCapabilityOptions = {
|
|
4
|
+
log?: (type: 'ORIGIN' | 'CHILD', operationId: string, methodName: string, methodPath: string, callTrace: string[], formattedCallTrace: string[], args: any[]) => void;
|
|
5
|
+
shouldLog: (methodName: string | symbol, metadata: MethodMetadata) => boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare class TracingCapability extends Capability {
|
|
8
|
+
private callTraceManager;
|
|
9
|
+
private log;
|
|
10
|
+
private shouldLogMethod?;
|
|
11
|
+
constructor(options?: TracingCapabilityOptions);
|
|
12
|
+
private createTracingInterceptor;
|
|
13
|
+
apply(instance: unknown): void;
|
|
14
|
+
}
|