vite-plugin-agent-tail 0.2.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.
package/README.md CHANGED
@@ -2,10 +2,12 @@
2
2
 
3
3
  Vite 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 vite-plugin-agent-tail
10
+ npm install -D agent-tail
9
11
  ```
10
12
 
11
13
  ## Setup
@@ -13,10 +15,10 @@ npm install -D vite-plugin-agent-tail
13
15
  ```ts
14
16
  // vite.config.ts
15
17
  import { defineConfig } from "vite"
16
- import { browser_logs } from "vite-plugin-agent-tail"
18
+ import { agentTail } from "agent-tail/vite"
17
19
 
18
20
  export default defineConfig({
19
- plugins: [browser_logs()],
21
+ plugins: [agentTail()],
20
22
  })
21
23
  ```
22
24
 
@@ -35,7 +37,7 @@ The plugin injects a small script into your HTML that intercepts console methods
35
37
  Use both the plugin and the CLI to get browser console logs *and* server output in one place:
36
38
 
37
39
  ```bash
38
- npx agent-tail-core run 'fe: npm run dev' 'api: uvicorn main:app'
40
+ agent-tail run 'fe: npm run dev' 'api: uvicorn main:app'
39
41
  ```
40
42
 
41
43
  ## Docs
package/dist/index.d.mts CHANGED
@@ -2,6 +2,6 @@ import { BrowserLogsOptions, BrowserLogsOptions as BrowserLogsOptions$1, DEFAULT
2
2
  import { Plugin } from "vite";
3
3
 
4
4
  //#region src/plugin.d.ts
5
- declare function browser_logs(user_options?: BrowserLogsOptions$1): Plugin;
5
+ declare function agentTail(user_options?: BrowserLogsOptions$1): Plugin;
6
6
  //#endregion
7
- export { type BrowserLogsOptions, DEFAULT_OPTIONS, type LogEntry, type ResolvedOptions, browser_logs };
7
+ export { type BrowserLogsOptions, DEFAULT_OPTIONS, type LogEntry, type ResolvedOptions, agentTail };
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import fs from "node:fs";
2
2
  import { DEFAULT_OPTIONS, LogManager, format_log_line, generate_client_script, resolve_options, should_exclude } from "agent-tail-core";
3
3
 
4
4
  //#region src/plugin.ts
5
- function browser_logs(user_options) {
5
+ function agentTail(user_options) {
6
6
  const options = resolve_options(user_options);
7
7
  const log_manager = new LogManager(options);
8
8
  let log_path;
@@ -46,4 +46,4 @@ function browser_logs(user_options) {
46
46
  }
47
47
 
48
48
  //#endregion
49
- export { DEFAULT_OPTIONS, browser_logs };
49
+ export { DEFAULT_OPTIONS, agentTail };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vite-plugin-agent-tail",
3
3
  "type": "module",
4
- "version": "0.2.0",
4
+ "version": "0.3.1",
5
5
  "description": "Vite plugin for agent-tail — pipes browser console logs to files on disk during development.",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -30,7 +30,7 @@
30
30
  "README.md"
31
31
  ],
32
32
  "dependencies": {
33
- "agent-tail-core": "^0.2.0"
33
+ "agent-tail-core": "^0.3.1"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "vite": ">=5.0.0"