@trafficwar/node 2.2.4 → 3.0.0

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/dist/index.d.cts CHANGED
@@ -67,12 +67,19 @@ interface TrafficWarOptions extends TrafficWarQueueOptions {
67
67
  debug?: boolean;
68
68
  /**
69
69
  * At startup, statically scan application source for `capture()` calls and
70
- * print each `event` and `label`. Defaults to `false`.
70
+ * print each pair whose `event` and `label` resolve to fixed strings.
71
+ * Calls with an unresolved or missing value are omitted. Defaults to `false`.
71
72
  */
72
73
  verbose?: boolean;
73
74
  /**
74
- * Directory scanned when `verbose` is true. Defaults to the process working
75
- * directory.
75
+ * Require a complete startup catalog of fixed event/label pairs. Unresolved,
76
+ * empty, or failed scans disable capture; unlisted runtime pairs are rejected.
77
+ * Defaults to true. Set false to opt out. Does not depend on verbose logging.
78
+ */
79
+ strictCatalog?: boolean;
80
+ /**
81
+ * Directory scanned when `verbose` or `strictCatalog` is true. Defaults to
82
+ * the process working directory.
76
83
  */
77
84
  catalogRoot?: string;
78
85
  timeoutMs?: number;
@@ -105,6 +112,7 @@ declare class TrafficWar {
105
112
  readonly baseUrl: string;
106
113
  readonly debug: boolean;
107
114
  readonly verbose: boolean;
115
+ readonly strictCatalog: boolean;
108
116
  readonly timeoutMs: number;
109
117
  readonly maxRetries: number;
110
118
  readonly compression: CompressionMode;
@@ -112,6 +120,8 @@ declare class TrafficWar {
112
120
  readonly flushIntervalMs: number;
113
121
  readonly maxQueueSize: number;
114
122
  constructor(options: TrafficWarOptions);
123
+ /** False when strictCatalog disabled capture at startup; recreate after fixing source. */
124
+ get captureEnabled(): boolean;
115
125
  capture(eventOrEvents: TrafficWarEvent | readonly TrafficWarEvent[]): void;
116
126
  /**
117
127
  * @deprecated Pass the array directly to capture().
package/dist/index.d.ts CHANGED
@@ -67,12 +67,19 @@ interface TrafficWarOptions extends TrafficWarQueueOptions {
67
67
  debug?: boolean;
68
68
  /**
69
69
  * At startup, statically scan application source for `capture()` calls and
70
- * print each `event` and `label`. Defaults to `false`.
70
+ * print each pair whose `event` and `label` resolve to fixed strings.
71
+ * Calls with an unresolved or missing value are omitted. Defaults to `false`.
71
72
  */
72
73
  verbose?: boolean;
73
74
  /**
74
- * Directory scanned when `verbose` is true. Defaults to the process working
75
- * directory.
75
+ * Require a complete startup catalog of fixed event/label pairs. Unresolved,
76
+ * empty, or failed scans disable capture; unlisted runtime pairs are rejected.
77
+ * Defaults to true. Set false to opt out. Does not depend on verbose logging.
78
+ */
79
+ strictCatalog?: boolean;
80
+ /**
81
+ * Directory scanned when `verbose` or `strictCatalog` is true. Defaults to
82
+ * the process working directory.
76
83
  */
77
84
  catalogRoot?: string;
78
85
  timeoutMs?: number;
@@ -105,6 +112,7 @@ declare class TrafficWar {
105
112
  readonly baseUrl: string;
106
113
  readonly debug: boolean;
107
114
  readonly verbose: boolean;
115
+ readonly strictCatalog: boolean;
108
116
  readonly timeoutMs: number;
109
117
  readonly maxRetries: number;
110
118
  readonly compression: CompressionMode;
@@ -112,6 +120,8 @@ declare class TrafficWar {
112
120
  readonly flushIntervalMs: number;
113
121
  readonly maxQueueSize: number;
114
122
  constructor(options: TrafficWarOptions);
123
+ /** False when strictCatalog disabled capture at startup; recreate after fixing source. */
124
+ get captureEnabled(): boolean;
115
125
  capture(eventOrEvents: TrafficWarEvent | readonly TrafficWarEvent[]): void;
116
126
  /**
117
127
  * @deprecated Pass the array directly to capture().