tidewave 0.6.0 → 0.8.0

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/package.json CHANGED
@@ -1,14 +1,13 @@
1
1
  {
2
2
  "name": "tidewave",
3
- "version": "0.6.0",
4
- "description": "Tidewave for JavaScript (Next.js, TanStack, Vite)",
3
+ "version": "0.8.0",
4
+ "description": "Tidewave for JavaScript (TanStack, Vite)",
5
5
  "keywords": [
6
6
  "typescript",
7
7
  "documentation",
8
8
  "mcp",
9
9
  "cli",
10
10
  "tidewave",
11
- "next",
12
11
  "vite",
13
12
  "tanstack"
14
13
  ],
@@ -37,16 +36,6 @@
37
36
  "import": "./dist/vite-plugin.js",
38
37
  "require": "./dist/vite-plugin.js"
39
38
  },
40
- "./next-js/handler": {
41
- "types": "./dist/next-js/handler.d.ts",
42
- "import": "./dist/next-js/handler.js",
43
- "require": "./dist/next-js/handler.js"
44
- },
45
- "./next-js/instrumentation": {
46
- "types": "./dist/next-js/instrumentation.d.ts",
47
- "import": "./dist/next-js/instrumentation.js",
48
- "require": "./dist/next-js/instrumentation.js"
49
- },
50
39
  "./tanstack": {
51
40
  "types": "./dist/tanstack.d.ts",
52
41
  "import": "./dist/tanstack.js",
@@ -62,7 +51,7 @@
62
51
  ],
63
52
  "scripts": {
64
53
  "dist": "bun run clean && bun run build:js && bun run build:types",
65
- "build:js": "bun build --outdir dist --root src --external typescript --external child_process --external module --external @opentelemetry/api --external @opentelemetry/sdk-logs --external @opentelemetry/sdk-trace-base src/next-js/handler.ts src/next-js/instrumentation.ts src/vite-plugin.ts src/tanstack.ts src/evaluation/eval_worker.ts src/cli/index.ts --target node",
54
+ "build:js": "bun build --outdir dist --root src --external typescript --external child_process --external module src/vite-plugin.ts src/tanstack.ts src/evaluation/eval_worker.ts src/cli/index.ts --target node",
66
55
  "build:types": "tsc -p tsconfig.declarations.json",
67
56
  "dev": "bun run src/cli/index.ts",
68
57
  "test": "bun test",
@@ -76,32 +65,25 @@
76
65
  "dependencies": {
77
66
  "@modelcontextprotocol/sdk": "^1.17.4",
78
67
  "body-parser": "^2.2.0",
79
- "connect": "^3.7.0",
80
68
  "typescript": "^5",
81
69
  "zod": "3.25.76"
82
70
  },
83
71
  "devDependencies": {
84
72
  "@eslint/js": "^9.16.0",
85
- "@opentelemetry/api": "^1.9.0",
86
- "@opentelemetry/sdk-logs": "^0.206.0",
87
- "@opentelemetry/sdk-trace-base": "^2.1.0",
88
73
  "@types/body-parser": "^1.19.6",
89
74
  "@types/bun": "latest",
90
- "@types/connect": "^3.4.38",
91
75
  "@types/node": "^22.10.1",
92
76
  "@typescript-eslint/eslint-plugin": "^8.18.0",
93
77
  "@typescript-eslint/parser": "^8.18.0",
94
- "@vercel/otel": "^2.0.1",
95
78
  "@vitest/ui": "^3.2.4",
96
79
  "bun-types": "latest",
97
80
  "chalk": "^5.3.0",
98
81
  "commander": "^12.1.0",
99
82
  "eslint": "^9.16.0",
100
83
  "globals": "^15.14.0",
101
- "next": "^15.5.3",
102
84
  "prettier": "^3.4.2",
103
85
  "vite": "^7.1.5",
104
- "vitest": "^3.2.4"
86
+ "vitest": "^4.1.8"
105
87
  },
106
88
  "peerDependencies": {
107
89
  "typescript": "^5"
@@ -1,7 +0,0 @@
1
- interface InstallOptions {
2
- prefix?: string;
3
- dryRun?: boolean;
4
- skipDeps?: boolean;
5
- }
6
- export declare function handleInstall(options: InstallOptions): Promise<void>;
7
- export {};
@@ -1,17 +0,0 @@
1
- import type { LogRecordProcessor, SdkLogRecord } from '@opentelemetry/sdk-logs';
2
- import type { Context } from '@opentelemetry/api';
3
- /**
4
- * Custom LogRecordProcessor that captures OpenTelemetry logger logs
5
- * and writes them directly to the tidewave logger.
6
- *
7
- * This is opt-in for users who want to capture actual logger logs
8
- * (not console.log, which is handled separately by console patching).
9
- */
10
- export declare class TidewaveLogRecordProcessor implements LogRecordProcessor {
11
- /**
12
- * Called when a log record is emitted.
13
- */
14
- onEmit(logRecord: SdkLogRecord, _context?: Context): void;
15
- forceFlush(): Promise<void>;
16
- shutdown(): Promise<void>;
17
- }
@@ -1,26 +0,0 @@
1
- import type { SpanProcessor } from '@opentelemetry/sdk-trace-base';
2
- import type { ReadableSpan } from '@opentelemetry/sdk-trace-base';
3
- import type { Span, Context } from '@opentelemetry/api';
4
- /**
5
- * Custom SpanProcessor that converts OpenTelemetry spans to logs and writes them
6
- * directly to the tidewave logger.
7
- * This is used to capture Next.js HTTP request/response spans and
8
- * make them available via the get_logs tool.
9
- */
10
- export declare class TidewaveSpanProcessor implements SpanProcessor {
11
- /**
12
- * Called when a span is started. We don't need to do anything here.
13
- */
14
- onStart(_span: Span, _parentContext: Context): void;
15
- /**
16
- * Called when a span ends. This is where we convert the span to a log entry
17
- * and write it directly to the tidewave logger.
18
- */
19
- onEnd(span: ReadableSpan): void;
20
- /**
21
- * Calculate span duration in milliseconds from high-resolution time
22
- */
23
- private calculateDuration;
24
- forceFlush(): Promise<void>;
25
- shutdown(): Promise<void>;
26
- }
@@ -1,11 +0,0 @@
1
- import type { NextApiRequest, NextApiResponse } from 'next';
2
- import { type Request, type Response } from '../http';
3
- import type { TidewaveConfig } from '../core';
4
- type NextJsHandler = (_req: NextApiRequest, _res: NextApiResponse) => Promise<void>;
5
- type NextHandler = () => ValueOrPromise<unknown>;
6
- export type FunctionLike = (...args: any[]) => unknown;
7
- export type Nextable<H extends FunctionLike> = (...args: [...Parameters<H>, NextHandler]) => ValueOrPromise<any>;
8
- export type ValueOrPromise<T> = T | Promise<T>;
9
- export type RequestHandler<Req extends Request, Res extends Response> = (req: Req, res: Res) => ValueOrPromise<void>;
10
- export declare function tidewaveHandler(config?: TidewaveConfig): Promise<NextJsHandler>;
11
- export {};