next-plugin-agent-tail 0.3.0 → 0.3.1

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.
Files changed (2) hide show
  1. package/README.md +7 -5
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -2,17 +2,19 @@
2
2
 
3
3
  Next.js plugin for [agent-tail](https://agent-tail.vercel.app/) — captures browser `console.log`, `console.warn`, `console.error`, unhandled errors, and unhandled promise rejections to log files on disk during development.
4
4
 
5
+ > **Tip:** Install the umbrella [`agent-tail`](https://www.npmjs.com/package/agent-tail) package to get the CLI, Vite plugin, and Next.js plugin in one install: `npm install -D agent-tail`
6
+
5
7
  ## Install
6
8
 
7
9
  ```bash
8
- npm install -D next-plugin-agent-tail
10
+ npm install -D agent-tail
9
11
  ```
10
12
 
11
13
  ## Setup
12
14
 
13
15
  ```ts
14
16
  // next.config.ts
15
- import { withAgentTail } from "next-plugin-agent-tail"
17
+ import { withAgentTail } from "agent-tail/next"
16
18
 
17
19
  export default withAgentTail({
18
20
  // your Next.js config
@@ -21,7 +23,7 @@ export default withAgentTail({
21
23
 
22
24
  ```tsx
23
25
  // app/layout.tsx
24
- import { AgentTailScript } from "next-plugin-agent-tail/script"
26
+ import { AgentTailScript } from "agent-tail/next/script"
25
27
 
26
28
  export default function RootLayout({ children }: { children: React.ReactNode }) {
27
29
  return (
@@ -37,7 +39,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
37
39
 
38
40
  ```ts
39
41
  // app/api/__browser-logs/route.ts
40
- export { POST } from "next-plugin-agent-tail/handler"
42
+ export { POST } from "agent-tail/next/handler"
41
43
  ```
42
44
 
43
45
  Then in another terminal:
@@ -51,7 +53,7 @@ tail -f tmp/logs/latest/browser.log
51
53
  Use both the plugin and the CLI to get browser console logs *and* server output in one place:
52
54
 
53
55
  ```bash
54
- npx agent-tail-core run 'fe: npm run dev' 'api: uvicorn main:app'
56
+ agent-tail run 'fe: npm run dev' 'api: uvicorn main:app'
55
57
  ```
56
58
 
57
59
  ## Docs
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "next-plugin-agent-tail",
3
3
  "type": "module",
4
- "version": "0.3.0",
4
+ "version": "0.3.1",
5
5
  "description": "Next.js plugin for agent-tail — pipes browser console logs to files on disk during development.",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -38,7 +38,7 @@
38
38
  "README.md"
39
39
  ],
40
40
  "dependencies": {
41
- "agent-tail-core": "^0.3.0"
41
+ "agent-tail-core": "^0.3.1"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "next": ">=13.0.0"