@eventra_dev/eventra-cli 0.1.26 → 0.1.27

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 +62 -50
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -9,23 +9,29 @@
9
9
  [![TypeScript](https://img.shields.io/badge/typescript-ready-blue.svg)](https://www.typescriptlang.org/)
10
10
  [![License](https://img.shields.io/npm/l/@eventra_dev/eventra-cli)]()
11
11
 
12
- Eventra CLI automatically discovers feature usage events in your codebase and syncs them with Eventra.
12
+ Eventra CLI automatically discovers and tracks event usage across your codebase — even through abstractions like wrappers, variables, and cross-file calls.
13
13
 
14
14
  ---
15
15
 
16
- # Installation
16
+ ## Overview
17
17
 
18
- ```bash
19
- npm install -D @eventra_dev/eventra-cli
20
- ```
18
+ Eventra scans your codebase using a TypeScript-powered engine and extracts event usage — even through abstractions like wrappers, variables, and cross-file calls.
19
+
20
+ It requires no runtime instrumentation and fits naturally into CI/CD workflows.
21
+
22
+ ---
23
+
24
+ ## Installation
21
25
 
22
26
  ```bash
27
+ npm install -D @eventra_dev/eventra-cli
28
+ # or
23
29
  pnpm add -D @eventra_dev/eventra-cli
24
30
  ```
25
31
 
26
32
  ---
27
33
 
28
- # Quick Start
34
+ ## Quick Start
29
35
 
30
36
  ```bash
31
37
  eventra init
@@ -36,22 +42,43 @@ eventra send
36
42
 
37
43
  ---
38
44
 
39
- # Commands
45
+ ## How it works
40
46
 
41
- ## eventra init
47
+ 1. Parses your project using the TypeScript AST
48
+ 2. Resolves function calls, imports, and dependencies
49
+ 3. Tracks event propagation through variables and wrappers
50
+ 4. Extracts event names and aggregates them
42
51
 
43
- Creates `eventra.json` configuration file.
52
+ No runtime required. No SDK needed.
44
53
 
45
54
  ---
46
55
 
47
- ## eventra sync
56
+ ## Why Eventra
57
+
58
+ - Prevent missing or inconsistent event tracking
59
+ - Keep your analytics schema in sync with code
60
+ - Detect dead or unused events
61
+ - Integrate validation into CI pipelines
62
+
63
+ ---
48
64
 
49
- Scans your project and discovers events automatically.
65
+ ## Commands
50
66
 
51
- ### Supports:
67
+ ### `eventra init`
68
+ Creates `eventra.json` configuration file.
69
+
70
+ ---
52
71
 
53
- - track("event")
54
- - analytics.track("event")
72
+ ### `eventra sync`
73
+ Scans your project and updates the list of detected events.
74
+
75
+ #### Supports
76
+
77
+ - Direct calls
78
+ ```ts
79
+ track("event")
80
+ analytics.track("event")
81
+ ```
55
82
 
56
83
  - Variables
57
84
  ```ts
@@ -74,7 +101,7 @@ track(`click_${type}`)
74
101
  track(condition ? "a" : "b")
75
102
  ```
76
103
 
77
- - Object format
104
+ - Object payloads
78
105
  ```ts
79
106
  track({ event: "click" })
80
107
  ```
@@ -88,36 +115,27 @@ const trackFeature = (name: string) => {
88
115
  trackFeature("click")
89
116
  ```
90
117
 
91
- - Multi-argument wrappers
92
- ```ts
93
- trackFeature("test", "click")
94
- ```
95
-
96
- - Cross-file tracking
97
-
98
- - Vue / Svelte / Astro support
118
+ - Cross-file event resolution
119
+ - Framework templates (Vue, Svelte, Astro)
99
120
 
100
121
  ---
101
122
 
102
- ## eventra check
103
-
104
- Validate events without modifying config.
123
+ ### `eventra check`
124
+ Validates detected events against config.
105
125
 
106
126
  ```bash
107
127
  eventra check
108
128
  ```
109
129
 
110
- ### Detects:
111
-
130
+ Detects:
112
131
  - New events
113
132
  - Removed events
114
- - Dynamic values
133
+ - Inconsistent tracking usage
115
134
 
116
135
  ---
117
136
 
118
- ## eventra check --fix
119
-
120
- Auto-fix mode.
137
+ ### `eventra check --fix`
138
+ Automatically updates config to match detected events.
121
139
 
122
140
  ```bash
123
141
  eventra check --fix
@@ -125,9 +143,8 @@ eventra check --fix
125
143
 
126
144
  ---
127
145
 
128
- ## eventra watch
129
-
130
- Real-time event detection.
146
+ ### `eventra watch`
147
+ Runs in watch mode and updates events in real time.
131
148
 
132
149
  ```bash
133
150
  eventra watch
@@ -135,9 +152,8 @@ eventra watch
135
152
 
136
153
  ---
137
154
 
138
- ## eventra send
139
-
140
- Send events to backend.
155
+ ### `eventra send`
156
+ Sends events to Eventra backend.
141
157
 
142
158
  ```bash
143
159
  eventra send
@@ -145,11 +161,12 @@ eventra send
145
161
 
146
162
  ---
147
163
 
148
- # Configuration
164
+ ## Configuration
149
165
 
150
166
  ```json
151
167
  {
152
168
  "apiKey": "",
169
+ "endpoint": "",
153
170
  "events": [],
154
171
  "wrappers": [],
155
172
  "functionWrappers": [],
@@ -163,25 +180,20 @@ eventra send
163
180
 
164
181
  ---
165
182
 
166
- # Supported Frameworks
183
+ ## Supported Environments
184
+
185
+ Eventra works with **any JavaScript or TypeScript codebase**.
167
186
 
168
- - React
169
- - Vue
170
- - Svelte
171
- - Astro
172
- - Node.js
173
- - Express
174
- - NestJS
175
- - Fastify
187
+ No framework limitations.
176
188
 
177
189
  ---
178
190
 
179
- # Requirements
191
+ ## Requirements
180
192
 
181
193
  - Node.js 18+
182
194
 
183
195
  ---
184
196
 
185
- # License
197
+ ## License
186
198
 
187
199
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventra_dev/eventra-cli",
3
- "version": "0.1.26",
3
+ "version": "0.1.27",
4
4
  "description": "Eventra CLI",
5
5
  "type": "commonjs",
6
6
  "bin": {