@contrast/common 1.20.1 → 1.21.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/lib/types.d.ts CHANGED
@@ -278,6 +278,15 @@ export interface Messages extends EventEmitter {
278
278
  on(event: Event.SERVER_SETTINGS_UPDATE, listener: (msg: Record<string, any>) => void): this;
279
279
  on(event: Event, listener: (...args: any[]) => void): this;
280
280
  }
281
+ /**
282
+ * IntentionalError is used when code wants to cause no-instrumentation in cases
283
+ * when no actual programmatic error has occurred. E.g., if the api is enabled
284
+ * but not all required api settings are present.
285
+ *
286
+ * It is expected that the code throwing an IntentionalError logs any pertinent
287
+ * information because the try/catch block will not output any error or message
288
+ * when it catches an IntentionalError.
289
+ */
281
290
  export declare class IntentionalError extends Error {
282
291
  }
283
292
  //# sourceMappingURL=types.d.ts.map
package/lib/types.js CHANGED
@@ -15,6 +15,15 @@
15
15
  */
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.IntentionalError = void 0;
18
+ /**
19
+ * IntentionalError is used when code wants to cause no-instrumentation in cases
20
+ * when no actual programmatic error has occurred. E.g., if the api is enabled
21
+ * but not all required api settings are present.
22
+ *
23
+ * It is expected that the code throwing an IntentionalError logs any pertinent
24
+ * information because the try/catch block will not output any error or message
25
+ * when it catches an IntentionalError.
26
+ */
18
27
  class IntentionalError extends Error {
19
28
  }
20
29
  exports.IntentionalError = IntentionalError;
package/lib/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAqUH,MAAa,gBAAiB,SAAQ,KAAK;CAAI;AAA/C,4CAA+C"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAqUH;;;;;;;;GAQG;AACH,MAAa,gBAAiB,SAAQ,KAAK;CAAG;AAA9C,4CAA8C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/common",
3
- "version": "1.20.1",
3
+ "version": "1.21.0",
4
4
  "description": "Shared constants and utilities for all Contrast Agent modules",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",