UNPKG

alepha

Version:

Alepha is a convention-driven TypeScript framework for building robust, end-to-end type-safe applications, from serverless APIs to full-stack React apps.

368 lines (367 loc) 15.9 kB
import * as _alepha_core1 from "alepha"; import { Alepha, Static } from "alepha"; import * as _alepha_server0 from "alepha/server"; import * as typebox144 from "typebox"; import { LogEntry } from "alepha/logger"; //#region src/schemas/DevActionMetadata.d.ts declare const devActionMetadataSchema: typebox144.TObject<{ name: typebox144.TString; group: typebox144.TString; method: typebox144.TString; path: typebox144.TString; prefix: typebox144.TString; fullPath: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; summary: typebox144.TOptional<typebox144.TString>; disabled: typebox144.TOptional<typebox144.TBoolean>; secure: typebox144.TOptional<typebox144.TBoolean>; hide: typebox144.TOptional<typebox144.TBoolean>; body: typebox144.TOptional<typebox144.TAny>; params: typebox144.TOptional<typebox144.TAny>; query: typebox144.TOptional<typebox144.TAny>; response: typebox144.TOptional<typebox144.TAny>; bodyContentType: typebox144.TOptional<typebox144.TString>; }>; type DevActionMetadata = Static<typeof devActionMetadataSchema>; //#endregion //#region src/schemas/DevBucketMetadata.d.ts declare const devBucketMetadataSchema: typebox144.TObject<{ name: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; mimeTypes: typebox144.TOptional<typebox144.TArray<typebox144.TString>>; maxSize: typebox144.TOptional<typebox144.TNumber>; provider: typebox144.TString; }>; type DevBucketMetadata = Static<typeof devBucketMetadataSchema>; //#endregion //#region src/schemas/DevCacheMetadata.d.ts declare const devCacheMetadataSchema: typebox144.TObject<{ name: typebox144.TString; ttl: typebox144.TOptional<typebox144.TAny>; disabled: typebox144.TOptional<typebox144.TBoolean>; provider: typebox144.TString; }>; type DevCacheMetadata = Static<typeof devCacheMetadataSchema>; //#endregion //#region src/schemas/DevLogEntry.d.ts declare const devLogEntrySchema: typebox144.TObject<{ formatted: typebox144.TString; entry: typebox144.TAny; }>; type DevLogEntry = Static<typeof devLogEntrySchema> & { entry: LogEntry; }; //#endregion //#region src/schemas/DevMetadata.d.ts declare const devMetadataSchema: typebox144.TObject<{ actions: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; group: typebox144.TString; method: typebox144.TString; path: typebox144.TString; prefix: typebox144.TString; fullPath: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; summary: typebox144.TOptional<typebox144.TString>; disabled: typebox144.TOptional<typebox144.TBoolean>; secure: typebox144.TOptional<typebox144.TBoolean>; hide: typebox144.TOptional<typebox144.TBoolean>; body: typebox144.TOptional<typebox144.TAny>; params: typebox144.TOptional<typebox144.TAny>; query: typebox144.TOptional<typebox144.TAny>; response: typebox144.TOptional<typebox144.TAny>; bodyContentType: typebox144.TOptional<typebox144.TString>; }>>; queues: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; schema: typebox144.TOptional<typebox144.TAny>; provider: typebox144.TString; }>>; schedulers: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; cron: typebox144.TOptional<typebox144.TString>; interval: typebox144.TOptional<typebox144.TAny>; lock: typebox144.TOptional<typebox144.TBoolean>; }>>; topics: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; schema: typebox144.TOptional<typebox144.TAny>; provider: typebox144.TString; }>>; buckets: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; mimeTypes: typebox144.TOptional<typebox144.TArray<typebox144.TString>>; maxSize: typebox144.TOptional<typebox144.TNumber>; provider: typebox144.TString; }>>; realms: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; roles: typebox144.TOptional<typebox144.TArray<typebox144.TAny>>; type: typebox144.TUnsafe<"internal" | "external">; settings: typebox144.TOptional<typebox144.TObject<{ accessTokenExpiration: typebox144.TOptional<typebox144.TAny>; refreshTokenExpiration: typebox144.TOptional<typebox144.TAny>; hasOnCreateSession: typebox144.TBoolean; hasOnRefreshSession: typebox144.TBoolean; hasOnDeleteSession: typebox144.TBoolean; }>>; }>>; caches: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; ttl: typebox144.TOptional<typebox144.TAny>; disabled: typebox144.TOptional<typebox144.TBoolean>; provider: typebox144.TString; }>>; pages: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; path: typebox144.TOptional<typebox144.TString>; params: typebox144.TOptional<typebox144.TAny>; query: typebox144.TOptional<typebox144.TAny>; hasComponent: typebox144.TBoolean; hasLazy: typebox144.TBoolean; hasResolve: typebox144.TBoolean; hasChildren: typebox144.TBoolean; hasParent: typebox144.TBoolean; hasErrorHandler: typebox144.TBoolean; static: typebox144.TOptional<typebox144.TBoolean>; cache: typebox144.TOptional<typebox144.TAny>; client: typebox144.TOptional<typebox144.TAny>; animation: typebox144.TOptional<typebox144.TAny>; }>>; providers: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; module: typebox144.TOptional<typebox144.TString>; dependencies: typebox144.TArray<typebox144.TString>; aliases: typebox144.TOptional<typebox144.TArray<typebox144.TString>>; }>>; modules: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; providers: typebox144.TArray<typebox144.TString>; }>>; }>; type DevMetadata = Static<typeof devMetadataSchema>; //#endregion //#region src/schemas/DevModuleMetadata.d.ts declare const devModuleMetadataSchema: typebox144.TObject<{ name: typebox144.TString; providers: typebox144.TArray<typebox144.TString>; }>; type DevModuleMetadata = Static<typeof devModuleMetadataSchema>; //#endregion //#region src/schemas/DevPageMetadata.d.ts declare const devPageMetadataSchema: typebox144.TObject<{ name: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; path: typebox144.TOptional<typebox144.TString>; params: typebox144.TOptional<typebox144.TAny>; query: typebox144.TOptional<typebox144.TAny>; hasComponent: typebox144.TBoolean; hasLazy: typebox144.TBoolean; hasResolve: typebox144.TBoolean; hasChildren: typebox144.TBoolean; hasParent: typebox144.TBoolean; hasErrorHandler: typebox144.TBoolean; static: typebox144.TOptional<typebox144.TBoolean>; cache: typebox144.TOptional<typebox144.TAny>; client: typebox144.TOptional<typebox144.TAny>; animation: typebox144.TOptional<typebox144.TAny>; }>; type DevPageMetadata = Static<typeof devPageMetadataSchema>; //#endregion //#region src/schemas/DevProviderMetadata.d.ts declare const devProviderMetadataSchema: typebox144.TObject<{ name: typebox144.TString; module: typebox144.TOptional<typebox144.TString>; dependencies: typebox144.TArray<typebox144.TString>; aliases: typebox144.TOptional<typebox144.TArray<typebox144.TString>>; }>; type DevProviderMetadata = Static<typeof devProviderMetadataSchema>; //#endregion //#region src/schemas/DevQueueMetadata.d.ts declare const devQueueMetadataSchema: typebox144.TObject<{ name: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; schema: typebox144.TOptional<typebox144.TAny>; provider: typebox144.TString; }>; type DevQueueMetadata = Static<typeof devQueueMetadataSchema>; //#endregion //#region src/schemas/DevRealmMetadata.d.ts declare const devRealmMetadataSchema: typebox144.TObject<{ name: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; roles: typebox144.TOptional<typebox144.TArray<typebox144.TAny>>; type: typebox144.TUnsafe<"internal" | "external">; settings: typebox144.TOptional<typebox144.TObject<{ accessTokenExpiration: typebox144.TOptional<typebox144.TAny>; refreshTokenExpiration: typebox144.TOptional<typebox144.TAny>; hasOnCreateSession: typebox144.TBoolean; hasOnRefreshSession: typebox144.TBoolean; hasOnDeleteSession: typebox144.TBoolean; }>>; }>; type DevRealmMetadata = Static<typeof devRealmMetadataSchema>; //#endregion //#region src/schemas/DevSchedulerMetadata.d.ts declare const devSchedulerMetadataSchema: typebox144.TObject<{ name: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; cron: typebox144.TOptional<typebox144.TString>; interval: typebox144.TOptional<typebox144.TAny>; lock: typebox144.TOptional<typebox144.TBoolean>; }>; type DevSchedulerMetadata = Static<typeof devSchedulerMetadataSchema>; //#endregion //#region src/schemas/DevTopicMetadata.d.ts declare const devTopicMetadataSchema: typebox144.TObject<{ name: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; schema: typebox144.TOptional<typebox144.TAny>; provider: typebox144.TString; }>; type DevTopicMetadata = Static<typeof devTopicMetadataSchema>; //#endregion //#region src/DevCollectorProvider.d.ts declare class DevCollectorProvider { protected readonly alepha: Alepha; protected readonly logs: DevLogEntry[]; protected readonly maxLogs = 10000; protected readonly onLog: _alepha_core1.HookDescriptor<"log">; protected readonly uiRoute: _alepha_server0.RouteDescriptor<{ response: typebox144.TString; }>; protected readonly metadataRoute: _alepha_server0.RouteDescriptor<{ response: typebox144.TObject<{ actions: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; group: typebox144.TString; method: typebox144.TString; path: typebox144.TString; prefix: typebox144.TString; fullPath: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; summary: typebox144.TOptional<typebox144.TString>; disabled: typebox144.TOptional<typebox144.TBoolean>; secure: typebox144.TOptional<typebox144.TBoolean>; hide: typebox144.TOptional<typebox144.TBoolean>; body: typebox144.TOptional<typebox144.TAny>; params: typebox144.TOptional<typebox144.TAny>; query: typebox144.TOptional<typebox144.TAny>; response: typebox144.TOptional<typebox144.TAny>; bodyContentType: typebox144.TOptional<typebox144.TString>; }>>; queues: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; schema: typebox144.TOptional<typebox144.TAny>; provider: typebox144.TString; }>>; schedulers: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; cron: typebox144.TOptional<typebox144.TString>; interval: typebox144.TOptional<typebox144.TAny>; lock: typebox144.TOptional<typebox144.TBoolean>; }>>; topics: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; schema: typebox144.TOptional<typebox144.TAny>; provider: typebox144.TString; }>>; buckets: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; mimeTypes: typebox144.TOptional<typebox144.TArray<typebox144.TString>>; maxSize: typebox144.TOptional<typebox144.TNumber>; provider: typebox144.TString; }>>; realms: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; roles: typebox144.TOptional<typebox144.TArray<typebox144.TAny>>; type: typebox144.TUnsafe<"internal" | "external">; settings: typebox144.TOptional<typebox144.TObject<{ accessTokenExpiration: typebox144.TOptional<typebox144.TAny>; refreshTokenExpiration: typebox144.TOptional<typebox144.TAny>; hasOnCreateSession: typebox144.TBoolean; hasOnRefreshSession: typebox144.TBoolean; hasOnDeleteSession: typebox144.TBoolean; }>>; }>>; caches: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; ttl: typebox144.TOptional<typebox144.TAny>; disabled: typebox144.TOptional<typebox144.TBoolean>; provider: typebox144.TString; }>>; pages: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; description: typebox144.TOptional<typebox144.TString>; path: typebox144.TOptional<typebox144.TString>; params: typebox144.TOptional<typebox144.TAny>; query: typebox144.TOptional<typebox144.TAny>; hasComponent: typebox144.TBoolean; hasLazy: typebox144.TBoolean; hasResolve: typebox144.TBoolean; hasChildren: typebox144.TBoolean; hasParent: typebox144.TBoolean; hasErrorHandler: typebox144.TBoolean; static: typebox144.TOptional<typebox144.TBoolean>; cache: typebox144.TOptional<typebox144.TAny>; client: typebox144.TOptional<typebox144.TAny>; animation: typebox144.TOptional<typebox144.TAny>; }>>; providers: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; module: typebox144.TOptional<typebox144.TString>; dependencies: typebox144.TArray<typebox144.TString>; aliases: typebox144.TOptional<typebox144.TArray<typebox144.TString>>; }>>; modules: typebox144.TArray<typebox144.TObject<{ name: typebox144.TString; providers: typebox144.TArray<typebox144.TString>; }>>; }>; }>; protected readonly logsRoute: _alepha_server0.RouteDescriptor<{ response: typebox144.TArray<typebox144.TObject<{ formatted: typebox144.TString; entry: typebox144.TAny; }>>; }>; getLogs(): DevLogEntry[]; getActions(): DevActionMetadata[]; getQueues(): DevQueueMetadata[]; getSchedulers(): DevSchedulerMetadata[]; getTopics(): DevTopicMetadata[]; getBuckets(): DevBucketMetadata[]; getRealms(): DevRealmMetadata[]; getCaches(): DevCacheMetadata[]; getPages(): DevPageMetadata[]; getProviders(): DevProviderMetadata[]; getModules(): DevModuleMetadata[]; getMetadata(): DevMetadata; protected getProviderName(provider?: "memory" | any): string; } //#endregion //#region src/index.d.ts /** * Developer tools module for monitoring and debugging Alepha applications. * * This module provides comprehensive data collection capabilities for tracking application behavior, * performance metrics, and debugging information in real-time. * * @see {@link DevCollectorProvider} * @module alepha.devtools */ declare const AlephaDevtools: _alepha_core1.Service<_alepha_core1.Module<{}>>; //#endregion export { AlephaDevtools, DevActionMetadata, DevBucketMetadata, DevCacheMetadata, DevCollectorProvider, DevLogEntry, DevMetadata, DevModuleMetadata, DevPageMetadata, DevProviderMetadata, DevQueueMetadata, DevRealmMetadata, DevSchedulerMetadata, DevTopicMetadata, devActionMetadataSchema, devBucketMetadataSchema, devCacheMetadataSchema, devLogEntrySchema, devMetadataSchema, devModuleMetadataSchema, devPageMetadataSchema, devProviderMetadataSchema, devQueueMetadataSchema, devRealmMetadataSchema, devSchedulerMetadataSchema, devTopicMetadataSchema }; //# sourceMappingURL=index.d.ts.map