@trafficwar/node 2.2.5 → 3.0.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/dist/index.d.cts CHANGED
@@ -67,13 +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 pair whose `event` and `label` are both fixed string literals.
71
- * Calls with a dynamic or missing value are omitted. 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`.
72
72
  */
73
73
  verbose?: boolean;
74
74
  /**
75
- * Directory scanned when `verbose` is true. Defaults to the process working
76
- * 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.
77
83
  */
78
84
  catalogRoot?: string;
79
85
  timeoutMs?: number;
@@ -106,6 +112,7 @@ declare class TrafficWar {
106
112
  readonly baseUrl: string;
107
113
  readonly debug: boolean;
108
114
  readonly verbose: boolean;
115
+ readonly strictCatalog: boolean;
109
116
  readonly timeoutMs: number;
110
117
  readonly maxRetries: number;
111
118
  readonly compression: CompressionMode;
@@ -113,6 +120,8 @@ declare class TrafficWar {
113
120
  readonly flushIntervalMs: number;
114
121
  readonly maxQueueSize: number;
115
122
  constructor(options: TrafficWarOptions);
123
+ /** False when strictCatalog disabled capture at startup; recreate after fixing source. */
124
+ get captureEnabled(): boolean;
116
125
  capture(eventOrEvents: TrafficWarEvent | readonly TrafficWarEvent[]): void;
117
126
  /**
118
127
  * @deprecated Pass the array directly to capture().
package/dist/index.d.ts CHANGED
@@ -67,13 +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 pair whose `event` and `label` are both fixed string literals.
71
- * Calls with a dynamic or missing value are omitted. 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`.
72
72
  */
73
73
  verbose?: boolean;
74
74
  /**
75
- * Directory scanned when `verbose` is true. Defaults to the process working
76
- * 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.
77
83
  */
78
84
  catalogRoot?: string;
79
85
  timeoutMs?: number;
@@ -106,6 +112,7 @@ declare class TrafficWar {
106
112
  readonly baseUrl: string;
107
113
  readonly debug: boolean;
108
114
  readonly verbose: boolean;
115
+ readonly strictCatalog: boolean;
109
116
  readonly timeoutMs: number;
110
117
  readonly maxRetries: number;
111
118
  readonly compression: CompressionMode;
@@ -113,6 +120,8 @@ declare class TrafficWar {
113
120
  readonly flushIntervalMs: number;
114
121
  readonly maxQueueSize: number;
115
122
  constructor(options: TrafficWarOptions);
123
+ /** False when strictCatalog disabled capture at startup; recreate after fixing source. */
124
+ get captureEnabled(): boolean;
116
125
  capture(eventOrEvents: TrafficWarEvent | readonly TrafficWarEvent[]): void;
117
126
  /**
118
127
  * @deprecated Pass the array directly to capture().