@blyp/core 0.1.2 → 0.1.22
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/README.md +273 -14
- package/STABILITY.md +56 -0
- package/dist/ai/anthropic/index.d.ts +3 -0
- package/dist/ai/anthropic/normalize.d.ts +9 -0
- package/dist/ai/anthropic/stream.d.ts +3 -0
- package/dist/ai/anthropic/wrap.d.ts +13 -0
- package/dist/ai/anthropic.js +701 -0
- package/dist/ai/anthropic.mjs +701 -0
- package/dist/ai/fetch.js +701 -0
- package/dist/ai/fetch.mjs +701 -0
- package/dist/ai/openai/index.d.ts +3 -0
- package/dist/ai/openai/normalize.d.ts +10 -0
- package/dist/ai/openai/stream.d.ts +3 -0
- package/dist/ai/openai/wrap.d.ts +24 -0
- package/dist/ai/openai.js +701 -0
- package/dist/ai/openai.mjs +701 -0
- package/dist/ai/shared/fetch.d.ts +5 -0
- package/dist/ai/shared/index.d.ts +2 -0
- package/dist/ai/shared/normalize.d.ts +17 -0
- package/dist/ai/shared/redaction.d.ts +6 -0
- package/dist/ai/shared/stream.d.ts +7 -0
- package/dist/ai/shared/trace.d.ts +116 -0
- package/dist/ai/shared/types.d.ts +161 -0
- package/dist/ai/shared.js +701 -0
- package/dist/ai/shared.mjs +701 -0
- package/dist/ai/vercel/index.d.ts +3 -0
- package/dist/ai/vercel/middleware.d.ts +3 -0
- package/dist/ai/vercel/model.d.ts +3 -0
- package/dist/ai/vercel.js +701 -0
- package/dist/ai/vercel.mjs +701 -0
- package/dist/astro.js +701 -0
- package/dist/astro.mjs +701 -0
- package/dist/client.js +1 -1132
- package/dist/client.mjs +1 -1125
- package/dist/connectors/betterstack.js +9 -1508
- package/dist/connectors/betterstack.mjs +9 -1483
- package/dist/connectors/databuddy/index.d.ts +7 -0
- package/dist/connectors/databuddy/sender.d.ts +5 -0
- package/dist/connectors/databuddy.js +9 -0
- package/dist/connectors/databuddy.mjs +9 -0
- package/dist/connectors/delivery/backoff.d.ts +2 -0
- package/dist/connectors/delivery/manager.d.ts +44 -0
- package/dist/connectors/delivery/queue-path.d.ts +1 -0
- package/dist/connectors/delivery/sqlite-adapter-bun.d.ts +1 -0
- package/dist/connectors/delivery/sqlite-adapter-node.d.ts +1 -0
- package/dist/connectors/delivery/sqlite-client.d.ts +37 -0
- package/dist/connectors/delivery/sqlite-worker.d.ts +1 -0
- package/dist/connectors/delivery/studio-queue.d.ts +12 -0
- package/dist/connectors/delivery/types.d.ts +98 -0
- package/dist/connectors/otlp/index.d.ts +1 -0
- package/dist/connectors/otlp.js +9 -1347
- package/dist/connectors/otlp.mjs +9 -1344
- package/dist/connectors/posthog/properties.d.ts +4 -0
- package/dist/connectors/posthog/sender.d.ts +0 -1
- package/dist/connectors/posthog.js +10 -1503
- package/dist/connectors/posthog.mjs +10 -1498
- package/dist/connectors/sentry.js +9 -1356
- package/dist/connectors/sentry.mjs +9 -1333
- package/dist/core/config.d.ts +7 -2
- package/dist/core/log-record.d.ts +5 -4
- package/dist/core/logger.d.ts +5 -0
- package/dist/core/optional-module.d.ts +1 -0
- package/dist/core/pino-pretty-loader.d.ts +4 -0
- package/dist/database.js +1 -24
- package/dist/database.mjs +1 -21
- package/dist/elysia.js +621 -4100
- package/dist/elysia.mjs +622 -4073
- package/dist/expo.js +1 -719
- package/dist/expo.mjs +1 -717
- package/dist/express.js +616 -4085
- package/dist/express.mjs +616 -4056
- package/dist/fastify.js +618 -4104
- package/dist/fastify.mjs +618 -4075
- package/dist/frameworks/astro/index.d.ts +2 -0
- package/dist/frameworks/astro/logger.d.ts +3 -0
- package/dist/frameworks/elysia/index.d.ts +1 -1
- package/dist/frameworks/elysia/logger.d.ts +2 -35
- package/dist/frameworks/nestjs/helpers.d.ts +2 -0
- package/dist/frameworks/nitro/index.d.ts +2 -0
- package/dist/frameworks/nitro/logger.d.ts +6 -0
- package/dist/frameworks/nuxt/index.d.ts +2 -0
- package/dist/frameworks/nuxt/logger.d.ts +3 -0
- package/dist/frameworks/react-router/index.d.ts +2 -0
- package/dist/frameworks/react-router/logger.d.ts +3 -0
- package/dist/frameworks/shared/h3.d.ts +19 -0
- package/dist/frameworks/shared/http.d.ts +3 -2
- package/dist/frameworks/shared/index.d.ts +2 -1
- package/dist/frameworks/shared/logger.d.ts +2 -0
- package/dist/frameworks/shared/request-context.d.ts +2 -0
- package/dist/frameworks/shared/trace.d.ts +6 -0
- package/dist/hono.js +624 -4079
- package/dist/hono.mjs +626 -4053
- package/dist/index.d.ts +57 -17
- package/dist/index.js +616 -6494
- package/dist/index.mjs +619 -6410
- package/dist/nestjs.js +626 -4574
- package/dist/nestjs.mjs +622 -4542
- package/dist/nextjs.js +625 -4107
- package/dist/nextjs.mjs +627 -4081
- package/dist/nitro.js +701 -0
- package/dist/nitro.mjs +701 -0
- package/dist/nuxt.js +701 -0
- package/dist/nuxt.mjs +701 -0
- package/dist/react-router.js +701 -0
- package/dist/react-router.mjs +701 -0
- package/dist/shared/redaction.d.ts +17 -0
- package/dist/standalone.js +606 -3258
- package/dist/standalone.mjs +611 -3234
- package/dist/sveltekit.js +625 -4106
- package/dist/sveltekit.mjs +626 -4079
- package/dist/tanstack-start.js +624 -4105
- package/dist/tanstack-start.mjs +626 -4079
- package/dist/types/connectors/databuddy.d.ts +52 -0
- package/dist/types/core/config.d.ts +89 -0
- package/dist/types/core/logger.d.ts +5 -0
- package/dist/types/core/structured-log.d.ts +2 -0
- package/dist/types/database.d.ts +1 -0
- package/dist/types/frameworks/astro.d.ts +33 -0
- package/dist/types/frameworks/client.d.ts +2 -0
- package/dist/types/frameworks/elysia.d.ts +2 -0
- package/dist/types/frameworks/express.d.ts +1 -0
- package/dist/types/frameworks/fastify.d.ts +1 -0
- package/dist/types/frameworks/hono.d.ts +1 -0
- package/dist/types/frameworks/http.d.ts +1 -0
- package/dist/types/frameworks/nestjs.d.ts +2 -0
- package/dist/types/frameworks/nextjs.d.ts +1 -0
- package/dist/types/frameworks/nitro.d.ts +63 -0
- package/dist/types/frameworks/nuxt.d.ts +12 -0
- package/dist/types/frameworks/react-router.d.ts +35 -0
- package/dist/types/frameworks/request-context.d.ts +1 -0
- package/dist/types/frameworks/shared.d.ts +28 -1
- package/dist/types/frameworks/standalone.d.ts +3 -2
- package/dist/types/frameworks/sveltekit.d.ts +1 -0
- package/dist/types/frameworks/tanstack-start.d.ts +9 -3
- package/dist/types/frameworks/workers.d.ts +3 -0
- package/dist/types/shared/client-log.d.ts +2 -1
- package/dist/workers.js +2 -626
- package/dist/workers.mjs +2 -623
- package/package.json +273 -143
- package/dist/client.js.map +0 -1
- package/dist/client.mjs.map +0 -1
- package/dist/connectors/betterstack.js.map +0 -1
- package/dist/connectors/betterstack.mjs.map +0 -1
- package/dist/connectors/otlp.js.map +0 -1
- package/dist/connectors/otlp.mjs.map +0 -1
- package/dist/connectors/posthog.js.map +0 -1
- package/dist/connectors/posthog.mjs.map +0 -1
- package/dist/connectors/sentry.js.map +0 -1
- package/dist/connectors/sentry.mjs.map +0 -1
- package/dist/database.js.map +0 -1
- package/dist/database.mjs.map +0 -1
- package/dist/elysia.js.map +0 -1
- package/dist/elysia.mjs.map +0 -1
- package/dist/expo.js.map +0 -1
- package/dist/expo.mjs.map +0 -1
- package/dist/express.js.map +0 -1
- package/dist/express.mjs.map +0 -1
- package/dist/fastify.js.map +0 -1
- package/dist/fastify.mjs.map +0 -1
- package/dist/hono.js.map +0 -1
- package/dist/hono.mjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/nestjs.js.map +0 -1
- package/dist/nestjs.mjs.map +0 -1
- package/dist/nextjs.js.map +0 -1
- package/dist/nextjs.mjs.map +0 -1
- package/dist/standalone.js.map +0 -1
- package/dist/standalone.mjs.map +0 -1
- package/dist/sveltekit.js.map +0 -1
- package/dist/sveltekit.mjs.map +0 -1
- package/dist/tanstack-start.js.map +0 -1
- package/dist/tanstack-start.mjs.map +0 -1
- package/dist/workers.js.map +0 -1
- package/dist/workers.mjs.map +0 -1
- package/exports/client.js +0 -3
- package/exports/client.mjs +0 -3
- package/exports/connectors/betterstack.js +0 -1
- package/exports/connectors/betterstack.mjs +0 -1
- package/exports/connectors/otlp.js +0 -1
- package/exports/connectors/otlp.mjs +0 -1
- package/exports/connectors/posthog.js +0 -1
- package/exports/connectors/posthog.mjs +0 -1
- package/exports/connectors/sentry.js +0 -1
- package/exports/connectors/sentry.mjs +0 -1
- package/exports/database.js +0 -1
- package/exports/database.mjs +0 -1
- package/exports/expo.js +0 -1
- package/exports/expo.mjs +0 -1
- package/exports/frameworks/elysia.js +0 -1
- package/exports/frameworks/elysia.mjs +0 -1
- package/exports/frameworks/express.js +0 -1
- package/exports/frameworks/express.mjs +0 -1
- package/exports/frameworks/fastify.js +0 -1
- package/exports/frameworks/fastify.mjs +0 -1
- package/exports/frameworks/hono.js +0 -1
- package/exports/frameworks/hono.mjs +0 -1
- package/exports/frameworks/nestjs.js +0 -1
- package/exports/frameworks/nestjs.mjs +0 -1
- package/exports/frameworks/nextjs.js +0 -1
- package/exports/frameworks/nextjs.mjs +0 -1
- package/exports/frameworks/standalone.js +0 -1
- package/exports/frameworks/standalone.mjs +0 -1
- package/exports/frameworks/sveltekit.js +0 -1
- package/exports/frameworks/sveltekit.mjs +0 -1
- package/exports/frameworks/tanstack-start.js +0 -1
- package/exports/frameworks/tanstack-start.mjs +0 -1
- package/exports/workers.js +0 -1
- package/exports/workers.mjs +0 -1
- package/types/client.d.ts +0 -34
- package/types/connectors/betterstack.d.ts +0 -1
- package/types/connectors/otlp.d.ts +0 -1
- package/types/connectors/posthog.d.ts +0 -1
- package/types/connectors/sentry.d.ts +0 -1
- package/types/database.d.ts +0 -1
- package/types/expo.d.ts +0 -17
- package/types/frameworks/client.d.ts +0 -160
- package/types/frameworks/elysia.d.ts +0 -1
- package/types/frameworks/expo.d.ts +0 -50
- package/types/frameworks/express.d.ts +0 -1
- package/types/frameworks/fastify.d.ts +0 -1
- package/types/frameworks/hono.d.ts +0 -1
- package/types/frameworks/nestjs.d.ts +0 -1
- package/types/frameworks/nextjs.d.ts +0 -1
- package/types/frameworks/standalone.d.ts +0 -1
- package/types/frameworks/sveltekit.d.ts +0 -1
- package/types/frameworks/tanstack-start.d.ts +0 -1
- package/types/frameworks/workers.d.ts +0 -115
- package/types/index.d.ts +0 -1
- package/types/workers.d.ts +0 -13
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
ClientLogBrowserContext,
|
|
3
|
-
ClientLogDeviceContext,
|
|
4
|
-
ClientLogEvent,
|
|
5
|
-
ClientLogLevel,
|
|
6
|
-
ClientLogPageContext,
|
|
7
|
-
RemoteDeliveryConfig,
|
|
8
|
-
RemoteDeliveryDropContext,
|
|
9
|
-
RemoteDeliveryFailureContext,
|
|
10
|
-
RemoteDeliveryFailureReason,
|
|
11
|
-
RemoteDeliveryRetryContext,
|
|
12
|
-
RemoteDeliverySuccessContext,
|
|
13
|
-
} from './client';
|
|
14
|
-
|
|
15
|
-
export interface ExpoLoggerConfig {
|
|
16
|
-
endpoint: string;
|
|
17
|
-
headers?: Record<string, string>;
|
|
18
|
-
localConsole?: boolean;
|
|
19
|
-
remoteSync?: boolean;
|
|
20
|
-
metadata?: Record<string, unknown> | (() => Record<string, unknown>);
|
|
21
|
-
delivery?: RemoteDeliveryConfig;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface ExpoLogger {
|
|
25
|
-
success: (message: unknown, ...args: unknown[]) => void;
|
|
26
|
-
critical: (message: unknown, ...args: unknown[]) => void;
|
|
27
|
-
warning: (message: unknown, ...args: unknown[]) => void;
|
|
28
|
-
info: (message: unknown, ...args: unknown[]) => void;
|
|
29
|
-
debug: (message: unknown, ...args: unknown[]) => void;
|
|
30
|
-
error: (message: unknown, ...args: unknown[]) => void;
|
|
31
|
-
warn: (message: unknown, ...args: unknown[]) => void;
|
|
32
|
-
table: (message: string, data?: unknown) => void;
|
|
33
|
-
child: (bindings: Record<string, unknown>) => ExpoLogger;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export declare function createExpoLogger(config: ExpoLoggerConfig): ExpoLogger;
|
|
37
|
-
|
|
38
|
-
export type {
|
|
39
|
-
ClientLogBrowserContext,
|
|
40
|
-
ClientLogDeviceContext,
|
|
41
|
-
ClientLogEvent,
|
|
42
|
-
ClientLogLevel,
|
|
43
|
-
ClientLogPageContext,
|
|
44
|
-
RemoteDeliveryConfig,
|
|
45
|
-
RemoteDeliveryDropContext,
|
|
46
|
-
RemoteDeliveryFailureContext,
|
|
47
|
-
RemoteDeliveryFailureReason,
|
|
48
|
-
RemoteDeliveryRetryContext,
|
|
49
|
-
RemoteDeliverySuccessContext,
|
|
50
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../dist/frameworks/express';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../dist/frameworks/fastify';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../dist/frameworks/hono';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../dist/frameworks/nestjs';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../dist/frameworks/nextjs';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../dist/frameworks/standalone';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../dist/frameworks/sveltekit';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../dist/frameworks/tanstack-start';
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
export interface HttpRequestLog {
|
|
2
|
-
type: 'http_request' | 'http_error';
|
|
3
|
-
method: string;
|
|
4
|
-
url: string;
|
|
5
|
-
path: string;
|
|
6
|
-
statusCode: number;
|
|
7
|
-
responseTime: number;
|
|
8
|
-
timestamp: string;
|
|
9
|
-
ip?: string;
|
|
10
|
-
userAgent?: string;
|
|
11
|
-
referrer?: string;
|
|
12
|
-
requestId?: string;
|
|
13
|
-
error?: string;
|
|
14
|
-
stack?: string;
|
|
15
|
-
code?: string;
|
|
16
|
-
why?: string;
|
|
17
|
-
fix?: string;
|
|
18
|
-
link?: string;
|
|
19
|
-
details?: unknown;
|
|
20
|
-
[key: string]: unknown;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface WorkersLoggerConfig {
|
|
24
|
-
env?: Record<string, unknown>;
|
|
25
|
-
customProps?: (request: Request) => Record<string, unknown>;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface WorkersEmitOptions {
|
|
29
|
-
response?: Response | { status: number };
|
|
30
|
-
status?: number;
|
|
31
|
-
error?: unknown;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export type StructuredLogLevel =
|
|
35
|
-
| 'debug'
|
|
36
|
-
| 'info'
|
|
37
|
-
| 'warn'
|
|
38
|
-
| 'warning'
|
|
39
|
-
| 'error'
|
|
40
|
-
| 'success'
|
|
41
|
-
| 'critical'
|
|
42
|
-
| 'table';
|
|
43
|
-
|
|
44
|
-
export interface StructuredLogError {
|
|
45
|
-
message: string;
|
|
46
|
-
code?: string | number;
|
|
47
|
-
type?: string;
|
|
48
|
-
stack?: string;
|
|
49
|
-
why?: string;
|
|
50
|
-
fix?: string;
|
|
51
|
-
link?: string;
|
|
52
|
-
details?: Record<string, unknown>;
|
|
53
|
-
cause?: unknown;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export interface StructuredLogEvent {
|
|
57
|
-
level: StructuredLogLevel;
|
|
58
|
-
message: string;
|
|
59
|
-
timestamp: string;
|
|
60
|
-
data?: unknown;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export interface StructuredLogPayload {
|
|
64
|
-
groupId: string;
|
|
65
|
-
timestamp: string;
|
|
66
|
-
level: StructuredLogLevel;
|
|
67
|
-
method?: string;
|
|
68
|
-
path?: string;
|
|
69
|
-
status?: number;
|
|
70
|
-
duration?: number;
|
|
71
|
-
events?: StructuredLogEvent[];
|
|
72
|
-
error?: StructuredLogError;
|
|
73
|
-
[key: string]: unknown;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export interface StructuredLogEmitOptions {
|
|
77
|
-
response?: Response | { status: number };
|
|
78
|
-
status?: number;
|
|
79
|
-
error?: unknown;
|
|
80
|
-
level?: StructuredLogLevel;
|
|
81
|
-
message?: string;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface StructuredLog {
|
|
85
|
-
set(fields: Record<string, unknown>): StructuredLog;
|
|
86
|
-
debug(message: unknown, ...args: unknown[]): StructuredLog;
|
|
87
|
-
info(message: unknown, ...args: unknown[]): StructuredLog;
|
|
88
|
-
warn(message: unknown, ...args: unknown[]): StructuredLog;
|
|
89
|
-
warning(message: unknown, ...args: unknown[]): StructuredLog;
|
|
90
|
-
error(message: unknown, ...args: unknown[]): StructuredLog;
|
|
91
|
-
success(message: unknown, ...args: unknown[]): StructuredLog;
|
|
92
|
-
critical(message: unknown, ...args: unknown[]): StructuredLog;
|
|
93
|
-
table(message: string, data?: unknown): StructuredLog;
|
|
94
|
-
emit(options?: StructuredLogEmitOptions): StructuredLogPayload;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export interface WorkersRequestLogger {
|
|
98
|
-
set(fields: Record<string, unknown>): WorkersRequestLogger;
|
|
99
|
-
emit(options?: WorkersEmitOptions): HttpRequestLog;
|
|
100
|
-
debug(message: unknown, ...args: unknown[]): void;
|
|
101
|
-
info(message: unknown, ...args: unknown[]): void;
|
|
102
|
-
warn(message: unknown, ...args: unknown[]): void;
|
|
103
|
-
warning(message: unknown, ...args: unknown[]): void;
|
|
104
|
-
error(message: unknown, ...args: unknown[]): void;
|
|
105
|
-
success(message: unknown, ...args: unknown[]): void;
|
|
106
|
-
critical(message: unknown, ...args: unknown[]): void;
|
|
107
|
-
table(message: string, data?: unknown): void;
|
|
108
|
-
createStructuredLog(
|
|
109
|
-
groupId: string,
|
|
110
|
-
initial?: Record<string, unknown>
|
|
111
|
-
): StructuredLog;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export declare function initWorkersLogger(config?: WorkersLoggerConfig): void;
|
|
115
|
-
export declare function createWorkersLogger(request: Request): WorkersRequestLogger;
|
package/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../dist/index';
|
package/types/workers.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export { createWorkersLogger, initWorkersLogger } from './frameworks/workers';
|
|
2
|
-
export type {
|
|
3
|
-
HttpRequestLog,
|
|
4
|
-
StructuredLog,
|
|
5
|
-
StructuredLogEmitOptions,
|
|
6
|
-
StructuredLogError,
|
|
7
|
-
StructuredLogEvent,
|
|
8
|
-
StructuredLogLevel,
|
|
9
|
-
StructuredLogPayload,
|
|
10
|
-
WorkersEmitOptions,
|
|
11
|
-
WorkersLoggerConfig,
|
|
12
|
-
WorkersRequestLogger,
|
|
13
|
-
} from './frameworks/workers';
|