@trafficwar/node 2.2.3 → 2.2.5

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
@@ -89,6 +89,21 @@ const trafficwar = new TrafficWar({
89
89
  });
90
90
  ```
91
91
 
92
+ Set `verbose: true` to print, once at startup, `capture()` calls whose
93
+ `event` and `label` are both fixed string literals. The scan looks under the
94
+ working directory, or `catalogRoot` when that is set. A call is omitted when
95
+ either value is missing or computed (a variable, concatenation, or template
96
+ with an expression). The scan skips `node_modules` and does not print
97
+ payloads, API keys, or other properties. A scan failure is logged and does
98
+ not stop the client.
99
+
100
+ ```ts
101
+ const trafficwar = new TrafficWar({
102
+ apiKey: process.env.TRAFFICWAR_API_KEY!,
103
+ verbose: true,
104
+ });
105
+ ```
106
+
92
107
  The SDK generates a process-monotonic RFC 9562 UUIDv7 `event_id` for each event
93
108
  that omits one. A caller may override it with any valid UUID. Caller-owned
94
109
  objects are never modified.
@@ -322,6 +337,11 @@ delivery still fails.
322
337
  - `baseUrl`: ingest origin. Defaults to `https://ingest.trafficwar.tech`.
323
338
  - `debug`: print safe batch lifecycle diagnostics with `console.debug`.
324
339
  Defaults to `false`.
340
+ - `verbose`: at startup, statically scan source for `capture()` calls and
341
+ print pairs whose `event` and `label` are both fixed string literals.
342
+ Dynamic or missing values are omitted. Defaults to `false`.
343
+ - `catalogRoot`: directory scanned when `verbose` is true. Defaults to the
344
+ process working directory.
325
345
  - `timeoutMs`: timeout for each attempt. Defaults to 30,000 ms, safely above
326
346
  TrafficWar's 10-second durable acknowledgement window.
327
347
  - `maxRetries`: retries after the first attempt. Defaults to 3.