tidewave 0.5.1 → 0.5.2
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/CHANGELOG.md +5 -0
- package/README.md +29 -5
- package/dist/cli/index.js +2476 -104
- package/dist/core.d.ts +3 -0
- package/dist/http/handlers/config.d.ts +3 -0
- package/dist/http/handlers/html.d.ts +3 -0
- package/dist/http/index.d.ts +2 -1
- package/dist/next-js/handler.js +155 -95
- package/dist/vite-plugin.js +153 -34
- package/package.json +6 -4
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -24,6 +24,28 @@ Protocol (MCP) server for your editors.
|
|
|
24
24
|
|
|
25
25
|
If you are using Next.js, install Tidewave with:
|
|
26
26
|
|
|
27
|
+
```sh
|
|
28
|
+
$ npx tidewave install
|
|
29
|
+
# or
|
|
30
|
+
$ yarn dlx tidewave install
|
|
31
|
+
# or
|
|
32
|
+
$ pnpm dlx tidewave install
|
|
33
|
+
# or
|
|
34
|
+
$ bunx tidewave install
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
And you are almost there! Now make sure
|
|
38
|
+
[Tidewave is installed](https://hexdocs.pm/tidewave/installation.html) and you
|
|
39
|
+
are ready to connect Tidewave to your app.
|
|
40
|
+
|
|
41
|
+
In case the command abovees do not work, you can toggle the manual installation
|
|
42
|
+
instructions below
|
|
43
|
+
|
|
44
|
+
<details>
|
|
45
|
+
<summary>Show manual installation steps</summary><br />
|
|
46
|
+
|
|
47
|
+
**1. Add Tidewave as a dependency**
|
|
48
|
+
|
|
27
49
|
```sh
|
|
28
50
|
$ npm install -D tidewave
|
|
29
51
|
# or
|
|
@@ -34,6 +56,8 @@ $ pnpm add --save-dev tidewave
|
|
|
34
56
|
$ bun add --dev tidewave
|
|
35
57
|
```
|
|
36
58
|
|
|
59
|
+
**2. Create `pages/api/tidewave.ts`**
|
|
60
|
+
|
|
37
61
|
Then create `pages/api/tidewave.ts` with:
|
|
38
62
|
|
|
39
63
|
```typescript
|
|
@@ -60,8 +84,7 @@ export const config = {
|
|
|
60
84
|
};
|
|
61
85
|
```
|
|
62
86
|
|
|
63
|
-
|
|
64
|
-
type you use in your application._
|
|
87
|
+
**3. Create the proxy.ts or middleware.ts**
|
|
65
88
|
|
|
66
89
|
If you are using Next.js 16+, then create (or modify) `proxy.ts` with:
|
|
67
90
|
|
|
@@ -97,11 +120,14 @@ export const config = {
|
|
|
97
120
|
};
|
|
98
121
|
```
|
|
99
122
|
|
|
123
|
+
**4. Create instrumentation.ts**
|
|
124
|
+
|
|
100
125
|
Finally, we expose your application's spans, events, and logs to Tidewave MCP.
|
|
101
126
|
First install the NodeSDK:
|
|
102
127
|
|
|
103
128
|
```sh
|
|
104
129
|
npm install @opentelemetry/sdk-node
|
|
130
|
+
npm install -D @opentelemetry/sdk-trace-base @opentelemetry/sdk-logs
|
|
105
131
|
```
|
|
106
132
|
|
|
107
133
|
And then create (or modify) a custom `instrumentation.ts` file in the root
|
|
@@ -141,9 +167,7 @@ export async function register() {
|
|
|
141
167
|
}
|
|
142
168
|
```
|
|
143
169
|
|
|
144
|
-
|
|
145
|
-
[Tidewave is installed](https://hexdocs.pm/tidewave/installation.html) and you
|
|
146
|
-
are ready to connect Tidewave to your app.
|
|
170
|
+
</details>
|
|
147
171
|
|
|
148
172
|
### React + Vite
|
|
149
173
|
|