@metamask-previews/error-reporting-service 3.0.1-preview-3685bfb → 3.0.1-preview-25d2d4502

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.
@@ -13,7 +13,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
13
  var _ErrorReportingService_captureException, _ErrorReportingService_messenger;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.ErrorReportingService = void 0;
16
- const MESSENGER_EXPOSED_METHODS = ['captureException'];
17
16
  /**
18
17
  * `ErrorReportingService` is designed to log an error to an error reporting app
19
18
  * such as Sentry, but in an agnostic fashion.
@@ -126,7 +125,7 @@ class ErrorReportingService {
126
125
  _ErrorReportingService_messenger.set(this, void 0);
127
126
  __classPrivateFieldSet(this, _ErrorReportingService_messenger, messenger, "f");
128
127
  __classPrivateFieldSet(this, _ErrorReportingService_captureException, captureException, "f");
129
- __classPrivateFieldGet(this, _ErrorReportingService_messenger, "f").registerMethodActionHandlers(this, MESSENGER_EXPOSED_METHODS);
128
+ __classPrivateFieldGet(this, _ErrorReportingService_messenger, "f").registerActionHandler('ErrorReportingService:captureException', __classPrivateFieldGet(this, _ErrorReportingService_captureException, "f").bind(this));
130
129
  }
131
130
  /**
132
131
  * Reports the given error to an external location.
@@ -1 +1 @@
1
- {"version":3,"file":"error-reporting-service.cjs","sourceRoot":"","sources":["../src/error-reporting-service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAIA,MAAM,yBAAyB,GAAG,CAAC,kBAAkB,CAAU,CAAC;AA4ChE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8FG;AACH,MAAa,qBAAqB;IAShC;;;;;;;;OAQG;IACH,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAgC;QAjBzE,SAAI,GAA4B,uBAAgC,CAAC;QAEjE,UAAK,GAAG,IAAI,CAAC;QAEJ,0DAAoE;QAEpE,mDAA2C;QAYlD,uBAAA,IAAI,oCAAc,SAAS,MAAA,CAAC;QAC5B,uBAAA,IAAI,2CAAqB,gBAAgB,MAAA,CAAC;QAE1C,uBAAA,IAAI,wCAAW,CAAC,4BAA4B,CAC1C,IAAI,EACJ,yBAAyB,CAC1B,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,gBAAgB,CAAC,KAAY;QAC3B,uBAAA,IAAI,+CAAkB,MAAtB,IAAI,EAAmB,KAAK,CAAC,CAAC;IAChC,CAAC;CACF;AAtCD,sDAsCC","sourcesContent":["import type { Messenger } from '@metamask/messenger';\n\nimport type { ErrorReportingServiceMethodActions } from './error-reporting-service-method-action-types';\n\nconst MESSENGER_EXPOSED_METHODS = ['captureException'] as const;\n\n/**\n * All actions that {@link ErrorReportingService} registers so that other\n * modules can call them.\n */\nexport type ErrorReportingServiceActions = ErrorReportingServiceMethodActions;\n\n/**\n * All events that {@link ErrorReportingService} publishes so that other modules\n * can subscribe to them.\n */\nexport type ErrorReportingServiceEvents = never;\n\n/**\n * All actions registered by other modules that {@link ErrorReportingService}\n * calls.\n */\ntype AllowedActions = never;\n\n/**\n * All events published by other modules that {@link ErrorReportingService}\n * subscribes to.\n */\ntype AllowedEvents = never;\n\n/**\n * The messenger restricted to actions and events that\n * {@link ErrorReportingService} needs to access.\n */\nexport type ErrorReportingServiceMessenger = Messenger<\n 'ErrorReportingService',\n ErrorReportingServiceActions | AllowedActions,\n ErrorReportingServiceEvents | AllowedEvents\n>;\n\n/**\n * The options that {@link ErrorReportingService} takes.\n */\ntype ErrorReportingServiceOptions = {\n captureException: ErrorReportingService['captureException'];\n messenger: ErrorReportingServiceMessenger;\n};\n\n/**\n * `ErrorReportingService` is designed to log an error to an error reporting app\n * such as Sentry, but in an agnostic fashion.\n *\n * @example\n *\n * In this example, we have a controller, and something bad happens, but we want\n * to report an error instead of throwing it.\n *\n * ``` ts\n * // === Controller file ===\n *\n * import type { ErrorReportingServiceCaptureExceptionAction } from '@metamask/error-reporting-service';\n *\n * // Define the messenger type for the controller.\n * type AllowedActions = ErrorReportingServiceCaptureExceptionAction;\n * type ExampleControllerMessenger = Messenger<\n * 'ExampleController',\n * AllowedActions,\n * never,\n * >;\n *\n * // Define the controller.\n * class ExampleController extends BaseController<\n * 'ExampleController',\n * ExampleControllerState,\n * ExampleControllerMessenger\n * > {\n * doSomething() {\n * // Imagine that we do something that produces an error and we want to\n * // report the error.\n * this.messenger.call(\n * 'ErrorReportingService:captureException',\n * new Error('Something went wrong'),\n * );\n * }\n * }\n *\n * // === Initialization file ===\n *\n * import { captureException } from '@sentry/browser';\n * import { ErrorReportingService } from '@metamask/error-reporting-service';\n * import { ExampleController } from './example-controller';\n *\n * type RootMessenger = Messenger<\n * 'Root',\n * MessengerActions<ErrorReportingServiceMessenger>,\n * MessengerEvents<ErrorReportingServiceMessenger>\n * >;\n *\n * // Create a root messenger.\n * const rootMessenger = new Messenger();\n *\n * // Register handler for the `ErrorReportingService:captureException`\n * // action in the root messenger.\n * const errorReportingServiceMessenger = new Messenger<\n * 'ErrorReportingService',\n * MessengerActions<ErrorReportingServiceMessenger>,\n * MessengerEvents<ErrorReportingServiceMessenger>,\n * RootMessenger\n * >({\n * namespace: 'ErrorReportingService',\n * parent: rootMessenger,\n * });\n * const errorReportingService = new ErrorReportingService({\n * messenger: errorReportingServiceMessenger,\n * captureException,\n * });\n *\n * const exampleControllerMessenger = new Messenger<\n * 'ExampleController',\n * MessengerActions<ExampleControllerMessenger>,\n * MessengerEvents<ExampleControllerMessenger>,\n * RootMessenger\n * >({\n * namespace: 'ExampleController',\n * parent: rootMessenger,\n * });\n * rootMessenger.delegate({\n * messenger: exampleControllerMessenger,\n * actions: ['ErrorReportingService:captureException'],\n * });\n * const exampleController = new ExampleController({\n * messenger: exampleControllerMessenger,\n * });\n *\n * // === Somewhere else ===\n *\n * // Now this will report an error without throwing it.\n * exampleController.doSomething();\n * ```\n *\n * @deprecated This service is deprecated and will be removed in a future\n * release. Please use `Messenger.captureException` directly instead.\n */\nexport class ErrorReportingService {\n name: 'ErrorReportingService' = 'ErrorReportingService' as const;\n\n state = null;\n\n readonly #captureException: ErrorReportingServiceOptions['captureException'];\n\n readonly #messenger: ErrorReportingServiceMessenger;\n\n /**\n * Constructs a new ErrorReportingService.\n *\n * @param options - The options.\n * @param options.messenger - The messenger suited to this\n * ErrorReportingService.\n * @param options.captureException - A function that stores the given error in\n * the error reporting service.\n */\n constructor({ messenger, captureException }: ErrorReportingServiceOptions) {\n this.#messenger = messenger;\n this.#captureException = captureException;\n\n this.#messenger.registerMethodActionHandlers(\n this,\n MESSENGER_EXPOSED_METHODS,\n );\n }\n\n /**\n * Reports the given error to an external location.\n *\n * @param error - The error to report.\n * @deprecated This function is deprecated and will be removed in a future\n * release. Please use `Messenger.captureException` directly instead.\n */\n captureException(error: Error): void {\n this.#captureException(error);\n }\n}\n"]}
1
+ {"version":3,"file":"error-reporting-service.cjs","sourceRoot":"","sources":["../src/error-reporting-service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAwDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8FG;AACH,MAAa,qBAAqB;IAShC;;;;;;;;OAQG;IACH,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAgC;QAjBzE,SAAI,GAA4B,uBAAgC,CAAC;QAEjE,UAAK,GAAG,IAAI,CAAC;QAEJ,0DAAoE;QAEpE,mDAA2C;QAYlD,uBAAA,IAAI,oCAAc,SAAS,MAAA,CAAC;QAC5B,uBAAA,IAAI,2CAAqB,gBAAgB,MAAA,CAAC;QAE1C,uBAAA,IAAI,wCAAW,CAAC,qBAAqB,CACnC,wCAAwC,EACxC,uBAAA,IAAI,+CAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAClC,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,gBAAgB,CAAC,KAAY;QAC3B,uBAAA,IAAI,+CAAkB,MAAtB,IAAI,EAAmB,KAAK,CAAC,CAAC;IAChC,CAAC;CACF;AAtCD,sDAsCC","sourcesContent":["import type { Messenger } from '@metamask/messenger';\n\n/**\n * The action which can be used to report an error.\n *\n * @deprecated This action is deprecated and will be removed in a future\n * release. Please use `Messenger.captureException` directly instead.\n */\nexport type ErrorReportingServiceCaptureExceptionAction = {\n type: 'ErrorReportingService:captureException';\n handler: ErrorReportingService['captureException'];\n};\n\n/**\n * All actions that {@link ErrorReportingService} registers so that other\n * modules can call them.\n */\nexport type ErrorReportingServiceActions =\n ErrorReportingServiceCaptureExceptionAction;\n\n/**\n * All events that {@link ErrorReportingService} publishes so that other modules\n * can subscribe to them.\n */\nexport type ErrorReportingServiceEvents = never;\n\n/**\n * All actions registered by other modules that {@link ErrorReportingService}\n * calls.\n */\ntype AllowedActions = never;\n\n/**\n * All events published by other modules that {@link ErrorReportingService}\n * subscribes to.\n */\ntype AllowedEvents = never;\n\n/**\n * The messenger restricted to actions and events that\n * {@link ErrorReportingService} needs to access.\n */\nexport type ErrorReportingServiceMessenger = Messenger<\n 'ErrorReportingService',\n ErrorReportingServiceActions | AllowedActions,\n ErrorReportingServiceEvents | AllowedEvents\n>;\n\n/**\n * The options that {@link ErrorReportingService} takes.\n */\ntype ErrorReportingServiceOptions = {\n captureException: ErrorReportingService['captureException'];\n messenger: ErrorReportingServiceMessenger;\n};\n\n/**\n * `ErrorReportingService` is designed to log an error to an error reporting app\n * such as Sentry, but in an agnostic fashion.\n *\n * @example\n *\n * In this example, we have a controller, and something bad happens, but we want\n * to report an error instead of throwing it.\n *\n * ``` ts\n * // === Controller file ===\n *\n * import type { ErrorReportingServiceCaptureExceptionAction } from '@metamask/error-reporting-service';\n *\n * // Define the messenger type for the controller.\n * type AllowedActions = ErrorReportingServiceCaptureExceptionAction;\n * type ExampleControllerMessenger = Messenger<\n * 'ExampleController',\n * AllowedActions,\n * never,\n * >;\n *\n * // Define the controller.\n * class ExampleController extends BaseController<\n * 'ExampleController',\n * ExampleControllerState,\n * ExampleControllerMessenger\n * > {\n * doSomething() {\n * // Imagine that we do something that produces an error and we want to\n * // report the error.\n * this.messenger.call(\n * 'ErrorReportingService:captureException',\n * new Error('Something went wrong'),\n * );\n * }\n * }\n *\n * // === Initialization file ===\n *\n * import { captureException } from '@sentry/browser';\n * import { ErrorReportingService } from '@metamask/error-reporting-service';\n * import { ExampleController } from './example-controller';\n *\n * type RootMessenger = Messenger<\n * 'Root',\n * MessengerActions<ErrorReportingServiceMessenger>,\n * MessengerEvents<ErrorReportingServiceMessenger>\n * >;\n *\n * // Create a root messenger.\n * const rootMessenger = new Messenger();\n *\n * // Register handler for the `ErrorReportingService:captureException`\n * // action in the root messenger.\n * const errorReportingServiceMessenger = new Messenger<\n * 'ErrorReportingService',\n * MessengerActions<ErrorReportingServiceMessenger>,\n * MessengerEvents<ErrorReportingServiceMessenger>,\n * RootMessenger\n * >({\n * namespace: 'ErrorReportingService',\n * parent: rootMessenger,\n * });\n * const errorReportingService = new ErrorReportingService({\n * messenger: errorReportingServiceMessenger,\n * captureException,\n * });\n *\n * const exampleControllerMessenger = new Messenger<\n * 'ExampleController',\n * MessengerActions<ExampleControllerMessenger>,\n * MessengerEvents<ExampleControllerMessenger>,\n * RootMessenger\n * >({\n * namespace: 'ExampleController',\n * parent: rootMessenger,\n * });\n * rootMessenger.delegate({\n * messenger: exampleControllerMessenger,\n * actions: ['ErrorReportingService:captureException'],\n * });\n * const exampleController = new ExampleController({\n * messenger: exampleControllerMessenger,\n * });\n *\n * // === Somewhere else ===\n *\n * // Now this will report an error without throwing it.\n * exampleController.doSomething();\n * ```\n *\n * @deprecated This service is deprecated and will be removed in a future\n * release. Please use `Messenger.captureException` directly instead.\n */\nexport class ErrorReportingService {\n name: 'ErrorReportingService' = 'ErrorReportingService' as const;\n\n state = null;\n\n readonly #captureException: ErrorReportingServiceOptions['captureException'];\n\n readonly #messenger: ErrorReportingServiceMessenger;\n\n /**\n * Constructs a new ErrorReportingService.\n *\n * @param options - The options.\n * @param options.messenger - The messenger suited to this\n * ErrorReportingService.\n * @param options.captureException - A function that stores the given error in\n * the error reporting service.\n */\n constructor({ messenger, captureException }: ErrorReportingServiceOptions) {\n this.#messenger = messenger;\n this.#captureException = captureException;\n\n this.#messenger.registerActionHandler(\n 'ErrorReportingService:captureException',\n this.#captureException.bind(this),\n );\n }\n\n /**\n * Reports the given error to an external location.\n *\n * @param error - The error to report.\n * @deprecated This function is deprecated and will be removed in a future\n * release. Please use `Messenger.captureException` directly instead.\n */\n captureException(error: Error): void {\n this.#captureException(error);\n }\n}\n"]}
@@ -1,10 +1,19 @@
1
1
  import type { Messenger } from "@metamask/messenger";
2
- import type { ErrorReportingServiceMethodActions } from "./error-reporting-service-method-action-types.cjs";
2
+ /**
3
+ * The action which can be used to report an error.
4
+ *
5
+ * @deprecated This action is deprecated and will be removed in a future
6
+ * release. Please use `Messenger.captureException` directly instead.
7
+ */
8
+ export type ErrorReportingServiceCaptureExceptionAction = {
9
+ type: 'ErrorReportingService:captureException';
10
+ handler: ErrorReportingService['captureException'];
11
+ };
3
12
  /**
4
13
  * All actions that {@link ErrorReportingService} registers so that other
5
14
  * modules can call them.
6
15
  */
7
- export type ErrorReportingServiceActions = ErrorReportingServiceMethodActions;
16
+ export type ErrorReportingServiceActions = ErrorReportingServiceCaptureExceptionAction;
8
17
  /**
9
18
  * All events that {@link ErrorReportingService} publishes so that other modules
10
19
  * can subscribe to them.
@@ -1 +1 @@
1
- {"version":3,"file":"error-reporting-service.d.cts","sourceRoot":"","sources":["../src/error-reporting-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,4BAA4B;AAErD,OAAO,KAAK,EAAE,kCAAkC,EAAE,0DAAsD;AAIxG;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG,KAAK,CAAC;AAEhD;;;GAGG;AACH,KAAK,cAAc,GAAG,KAAK,CAAC;AAE5B;;;GAGG;AACH,KAAK,aAAa,GAAG,KAAK,CAAC;AAE3B;;;GAGG;AACH,MAAM,MAAM,8BAA8B,GAAG,SAAS,CACpD,uBAAuB,EACvB,4BAA4B,GAAG,cAAc,EAC7C,2BAA2B,GAAG,aAAa,CAC5C,CAAC;AAEF;;GAEG;AACH,KAAK,4BAA4B,GAAG;IAClC,gBAAgB,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;IAC5D,SAAS,EAAE,8BAA8B,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8FG;AACH,qBAAa,qBAAqB;;IAChC,IAAI,EAAE,uBAAuB,CAAoC;IAEjE,KAAK,OAAQ;IAMb;;;;;;;;OAQG;gBACS,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,4BAA4B;IAUzE;;;;;;OAMG;IACH,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAGrC"}
1
+ {"version":3,"file":"error-reporting-service.d.cts","sourceRoot":"","sources":["../src/error-reporting-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,4BAA4B;AAErD;;;;;GAKG;AACH,MAAM,MAAM,2CAA2C,GAAG;IACxD,IAAI,EAAE,wCAAwC,CAAC;IAC/C,OAAO,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;CACpD,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GACtC,2CAA2C,CAAC;AAE9C;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG,KAAK,CAAC;AAEhD;;;GAGG;AACH,KAAK,cAAc,GAAG,KAAK,CAAC;AAE5B;;;GAGG;AACH,KAAK,aAAa,GAAG,KAAK,CAAC;AAE3B;;;GAGG;AACH,MAAM,MAAM,8BAA8B,GAAG,SAAS,CACpD,uBAAuB,EACvB,4BAA4B,GAAG,cAAc,EAC7C,2BAA2B,GAAG,aAAa,CAC5C,CAAC;AAEF;;GAEG;AACH,KAAK,4BAA4B,GAAG;IAClC,gBAAgB,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;IAC5D,SAAS,EAAE,8BAA8B,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8FG;AACH,qBAAa,qBAAqB;;IAChC,IAAI,EAAE,uBAAuB,CAAoC;IAEjE,KAAK,OAAQ;IAMb;;;;;;;;OAQG;gBACS,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,4BAA4B;IAUzE;;;;;;OAMG;IACH,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAGrC"}
@@ -1,10 +1,19 @@
1
1
  import type { Messenger } from "@metamask/messenger";
2
- import type { ErrorReportingServiceMethodActions } from "./error-reporting-service-method-action-types.mjs";
2
+ /**
3
+ * The action which can be used to report an error.
4
+ *
5
+ * @deprecated This action is deprecated and will be removed in a future
6
+ * release. Please use `Messenger.captureException` directly instead.
7
+ */
8
+ export type ErrorReportingServiceCaptureExceptionAction = {
9
+ type: 'ErrorReportingService:captureException';
10
+ handler: ErrorReportingService['captureException'];
11
+ };
3
12
  /**
4
13
  * All actions that {@link ErrorReportingService} registers so that other
5
14
  * modules can call them.
6
15
  */
7
- export type ErrorReportingServiceActions = ErrorReportingServiceMethodActions;
16
+ export type ErrorReportingServiceActions = ErrorReportingServiceCaptureExceptionAction;
8
17
  /**
9
18
  * All events that {@link ErrorReportingService} publishes so that other modules
10
19
  * can subscribe to them.
@@ -1 +1 @@
1
- {"version":3,"file":"error-reporting-service.d.mts","sourceRoot":"","sources":["../src/error-reporting-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,4BAA4B;AAErD,OAAO,KAAK,EAAE,kCAAkC,EAAE,0DAAsD;AAIxG;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG,KAAK,CAAC;AAEhD;;;GAGG;AACH,KAAK,cAAc,GAAG,KAAK,CAAC;AAE5B;;;GAGG;AACH,KAAK,aAAa,GAAG,KAAK,CAAC;AAE3B;;;GAGG;AACH,MAAM,MAAM,8BAA8B,GAAG,SAAS,CACpD,uBAAuB,EACvB,4BAA4B,GAAG,cAAc,EAC7C,2BAA2B,GAAG,aAAa,CAC5C,CAAC;AAEF;;GAEG;AACH,KAAK,4BAA4B,GAAG;IAClC,gBAAgB,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;IAC5D,SAAS,EAAE,8BAA8B,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8FG;AACH,qBAAa,qBAAqB;;IAChC,IAAI,EAAE,uBAAuB,CAAoC;IAEjE,KAAK,OAAQ;IAMb;;;;;;;;OAQG;gBACS,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,4BAA4B;IAUzE;;;;;;OAMG;IACH,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAGrC"}
1
+ {"version":3,"file":"error-reporting-service.d.mts","sourceRoot":"","sources":["../src/error-reporting-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,4BAA4B;AAErD;;;;;GAKG;AACH,MAAM,MAAM,2CAA2C,GAAG;IACxD,IAAI,EAAE,wCAAwC,CAAC;IAC/C,OAAO,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;CACpD,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GACtC,2CAA2C,CAAC;AAE9C;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG,KAAK,CAAC;AAEhD;;;GAGG;AACH,KAAK,cAAc,GAAG,KAAK,CAAC;AAE5B;;;GAGG;AACH,KAAK,aAAa,GAAG,KAAK,CAAC;AAE3B;;;GAGG;AACH,MAAM,MAAM,8BAA8B,GAAG,SAAS,CACpD,uBAAuB,EACvB,4BAA4B,GAAG,cAAc,EAC7C,2BAA2B,GAAG,aAAa,CAC5C,CAAC;AAEF;;GAEG;AACH,KAAK,4BAA4B,GAAG;IAClC,gBAAgB,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;IAC5D,SAAS,EAAE,8BAA8B,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8FG;AACH,qBAAa,qBAAqB;;IAChC,IAAI,EAAE,uBAAuB,CAAoC;IAEjE,KAAK,OAAQ;IAMb;;;;;;;;OAQG;gBACS,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,4BAA4B;IAUzE;;;;;;OAMG;IACH,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAGrC"}
@@ -10,7 +10,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
10
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
11
  };
12
12
  var _ErrorReportingService_captureException, _ErrorReportingService_messenger;
13
- const MESSENGER_EXPOSED_METHODS = ['captureException'];
14
13
  /**
15
14
  * `ErrorReportingService` is designed to log an error to an error reporting app
16
15
  * such as Sentry, but in an agnostic fashion.
@@ -123,7 +122,7 @@ export class ErrorReportingService {
123
122
  _ErrorReportingService_messenger.set(this, void 0);
124
123
  __classPrivateFieldSet(this, _ErrorReportingService_messenger, messenger, "f");
125
124
  __classPrivateFieldSet(this, _ErrorReportingService_captureException, captureException, "f");
126
- __classPrivateFieldGet(this, _ErrorReportingService_messenger, "f").registerMethodActionHandlers(this, MESSENGER_EXPOSED_METHODS);
125
+ __classPrivateFieldGet(this, _ErrorReportingService_messenger, "f").registerActionHandler('ErrorReportingService:captureException', __classPrivateFieldGet(this, _ErrorReportingService_captureException, "f").bind(this));
127
126
  }
128
127
  /**
129
128
  * Reports the given error to an external location.
@@ -1 +1 @@
1
- {"version":3,"file":"error-reporting-service.mjs","sourceRoot":"","sources":["../src/error-reporting-service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,MAAM,yBAAyB,GAAG,CAAC,kBAAkB,CAAU,CAAC;AA4ChE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8FG;AACH,MAAM,OAAO,qBAAqB;IAShC;;;;;;;;OAQG;IACH,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAgC;QAjBzE,SAAI,GAA4B,uBAAgC,CAAC;QAEjE,UAAK,GAAG,IAAI,CAAC;QAEJ,0DAAoE;QAEpE,mDAA2C;QAYlD,uBAAA,IAAI,oCAAc,SAAS,MAAA,CAAC;QAC5B,uBAAA,IAAI,2CAAqB,gBAAgB,MAAA,CAAC;QAE1C,uBAAA,IAAI,wCAAW,CAAC,4BAA4B,CAC1C,IAAI,EACJ,yBAAyB,CAC1B,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,gBAAgB,CAAC,KAAY;QAC3B,uBAAA,IAAI,+CAAkB,MAAtB,IAAI,EAAmB,KAAK,CAAC,CAAC;IAChC,CAAC;CACF","sourcesContent":["import type { Messenger } from '@metamask/messenger';\n\nimport type { ErrorReportingServiceMethodActions } from './error-reporting-service-method-action-types';\n\nconst MESSENGER_EXPOSED_METHODS = ['captureException'] as const;\n\n/**\n * All actions that {@link ErrorReportingService} registers so that other\n * modules can call them.\n */\nexport type ErrorReportingServiceActions = ErrorReportingServiceMethodActions;\n\n/**\n * All events that {@link ErrorReportingService} publishes so that other modules\n * can subscribe to them.\n */\nexport type ErrorReportingServiceEvents = never;\n\n/**\n * All actions registered by other modules that {@link ErrorReportingService}\n * calls.\n */\ntype AllowedActions = never;\n\n/**\n * All events published by other modules that {@link ErrorReportingService}\n * subscribes to.\n */\ntype AllowedEvents = never;\n\n/**\n * The messenger restricted to actions and events that\n * {@link ErrorReportingService} needs to access.\n */\nexport type ErrorReportingServiceMessenger = Messenger<\n 'ErrorReportingService',\n ErrorReportingServiceActions | AllowedActions,\n ErrorReportingServiceEvents | AllowedEvents\n>;\n\n/**\n * The options that {@link ErrorReportingService} takes.\n */\ntype ErrorReportingServiceOptions = {\n captureException: ErrorReportingService['captureException'];\n messenger: ErrorReportingServiceMessenger;\n};\n\n/**\n * `ErrorReportingService` is designed to log an error to an error reporting app\n * such as Sentry, but in an agnostic fashion.\n *\n * @example\n *\n * In this example, we have a controller, and something bad happens, but we want\n * to report an error instead of throwing it.\n *\n * ``` ts\n * // === Controller file ===\n *\n * import type { ErrorReportingServiceCaptureExceptionAction } from '@metamask/error-reporting-service';\n *\n * // Define the messenger type for the controller.\n * type AllowedActions = ErrorReportingServiceCaptureExceptionAction;\n * type ExampleControllerMessenger = Messenger<\n * 'ExampleController',\n * AllowedActions,\n * never,\n * >;\n *\n * // Define the controller.\n * class ExampleController extends BaseController<\n * 'ExampleController',\n * ExampleControllerState,\n * ExampleControllerMessenger\n * > {\n * doSomething() {\n * // Imagine that we do something that produces an error and we want to\n * // report the error.\n * this.messenger.call(\n * 'ErrorReportingService:captureException',\n * new Error('Something went wrong'),\n * );\n * }\n * }\n *\n * // === Initialization file ===\n *\n * import { captureException } from '@sentry/browser';\n * import { ErrorReportingService } from '@metamask/error-reporting-service';\n * import { ExampleController } from './example-controller';\n *\n * type RootMessenger = Messenger<\n * 'Root',\n * MessengerActions<ErrorReportingServiceMessenger>,\n * MessengerEvents<ErrorReportingServiceMessenger>\n * >;\n *\n * // Create a root messenger.\n * const rootMessenger = new Messenger();\n *\n * // Register handler for the `ErrorReportingService:captureException`\n * // action in the root messenger.\n * const errorReportingServiceMessenger = new Messenger<\n * 'ErrorReportingService',\n * MessengerActions<ErrorReportingServiceMessenger>,\n * MessengerEvents<ErrorReportingServiceMessenger>,\n * RootMessenger\n * >({\n * namespace: 'ErrorReportingService',\n * parent: rootMessenger,\n * });\n * const errorReportingService = new ErrorReportingService({\n * messenger: errorReportingServiceMessenger,\n * captureException,\n * });\n *\n * const exampleControllerMessenger = new Messenger<\n * 'ExampleController',\n * MessengerActions<ExampleControllerMessenger>,\n * MessengerEvents<ExampleControllerMessenger>,\n * RootMessenger\n * >({\n * namespace: 'ExampleController',\n * parent: rootMessenger,\n * });\n * rootMessenger.delegate({\n * messenger: exampleControllerMessenger,\n * actions: ['ErrorReportingService:captureException'],\n * });\n * const exampleController = new ExampleController({\n * messenger: exampleControllerMessenger,\n * });\n *\n * // === Somewhere else ===\n *\n * // Now this will report an error without throwing it.\n * exampleController.doSomething();\n * ```\n *\n * @deprecated This service is deprecated and will be removed in a future\n * release. Please use `Messenger.captureException` directly instead.\n */\nexport class ErrorReportingService {\n name: 'ErrorReportingService' = 'ErrorReportingService' as const;\n\n state = null;\n\n readonly #captureException: ErrorReportingServiceOptions['captureException'];\n\n readonly #messenger: ErrorReportingServiceMessenger;\n\n /**\n * Constructs a new ErrorReportingService.\n *\n * @param options - The options.\n * @param options.messenger - The messenger suited to this\n * ErrorReportingService.\n * @param options.captureException - A function that stores the given error in\n * the error reporting service.\n */\n constructor({ messenger, captureException }: ErrorReportingServiceOptions) {\n this.#messenger = messenger;\n this.#captureException = captureException;\n\n this.#messenger.registerMethodActionHandlers(\n this,\n MESSENGER_EXPOSED_METHODS,\n );\n }\n\n /**\n * Reports the given error to an external location.\n *\n * @param error - The error to report.\n * @deprecated This function is deprecated and will be removed in a future\n * release. Please use `Messenger.captureException` directly instead.\n */\n captureException(error: Error): void {\n this.#captureException(error);\n }\n}\n"]}
1
+ {"version":3,"file":"error-reporting-service.mjs","sourceRoot":"","sources":["../src/error-reporting-service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAwDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8FG;AACH,MAAM,OAAO,qBAAqB;IAShC;;;;;;;;OAQG;IACH,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAgC;QAjBzE,SAAI,GAA4B,uBAAgC,CAAC;QAEjE,UAAK,GAAG,IAAI,CAAC;QAEJ,0DAAoE;QAEpE,mDAA2C;QAYlD,uBAAA,IAAI,oCAAc,SAAS,MAAA,CAAC;QAC5B,uBAAA,IAAI,2CAAqB,gBAAgB,MAAA,CAAC;QAE1C,uBAAA,IAAI,wCAAW,CAAC,qBAAqB,CACnC,wCAAwC,EACxC,uBAAA,IAAI,+CAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAClC,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,gBAAgB,CAAC,KAAY;QAC3B,uBAAA,IAAI,+CAAkB,MAAtB,IAAI,EAAmB,KAAK,CAAC,CAAC;IAChC,CAAC;CACF","sourcesContent":["import type { Messenger } from '@metamask/messenger';\n\n/**\n * The action which can be used to report an error.\n *\n * @deprecated This action is deprecated and will be removed in a future\n * release. Please use `Messenger.captureException` directly instead.\n */\nexport type ErrorReportingServiceCaptureExceptionAction = {\n type: 'ErrorReportingService:captureException';\n handler: ErrorReportingService['captureException'];\n};\n\n/**\n * All actions that {@link ErrorReportingService} registers so that other\n * modules can call them.\n */\nexport type ErrorReportingServiceActions =\n ErrorReportingServiceCaptureExceptionAction;\n\n/**\n * All events that {@link ErrorReportingService} publishes so that other modules\n * can subscribe to them.\n */\nexport type ErrorReportingServiceEvents = never;\n\n/**\n * All actions registered by other modules that {@link ErrorReportingService}\n * calls.\n */\ntype AllowedActions = never;\n\n/**\n * All events published by other modules that {@link ErrorReportingService}\n * subscribes to.\n */\ntype AllowedEvents = never;\n\n/**\n * The messenger restricted to actions and events that\n * {@link ErrorReportingService} needs to access.\n */\nexport type ErrorReportingServiceMessenger = Messenger<\n 'ErrorReportingService',\n ErrorReportingServiceActions | AllowedActions,\n ErrorReportingServiceEvents | AllowedEvents\n>;\n\n/**\n * The options that {@link ErrorReportingService} takes.\n */\ntype ErrorReportingServiceOptions = {\n captureException: ErrorReportingService['captureException'];\n messenger: ErrorReportingServiceMessenger;\n};\n\n/**\n * `ErrorReportingService` is designed to log an error to an error reporting app\n * such as Sentry, but in an agnostic fashion.\n *\n * @example\n *\n * In this example, we have a controller, and something bad happens, but we want\n * to report an error instead of throwing it.\n *\n * ``` ts\n * // === Controller file ===\n *\n * import type { ErrorReportingServiceCaptureExceptionAction } from '@metamask/error-reporting-service';\n *\n * // Define the messenger type for the controller.\n * type AllowedActions = ErrorReportingServiceCaptureExceptionAction;\n * type ExampleControllerMessenger = Messenger<\n * 'ExampleController',\n * AllowedActions,\n * never,\n * >;\n *\n * // Define the controller.\n * class ExampleController extends BaseController<\n * 'ExampleController',\n * ExampleControllerState,\n * ExampleControllerMessenger\n * > {\n * doSomething() {\n * // Imagine that we do something that produces an error and we want to\n * // report the error.\n * this.messenger.call(\n * 'ErrorReportingService:captureException',\n * new Error('Something went wrong'),\n * );\n * }\n * }\n *\n * // === Initialization file ===\n *\n * import { captureException } from '@sentry/browser';\n * import { ErrorReportingService } from '@metamask/error-reporting-service';\n * import { ExampleController } from './example-controller';\n *\n * type RootMessenger = Messenger<\n * 'Root',\n * MessengerActions<ErrorReportingServiceMessenger>,\n * MessengerEvents<ErrorReportingServiceMessenger>\n * >;\n *\n * // Create a root messenger.\n * const rootMessenger = new Messenger();\n *\n * // Register handler for the `ErrorReportingService:captureException`\n * // action in the root messenger.\n * const errorReportingServiceMessenger = new Messenger<\n * 'ErrorReportingService',\n * MessengerActions<ErrorReportingServiceMessenger>,\n * MessengerEvents<ErrorReportingServiceMessenger>,\n * RootMessenger\n * >({\n * namespace: 'ErrorReportingService',\n * parent: rootMessenger,\n * });\n * const errorReportingService = new ErrorReportingService({\n * messenger: errorReportingServiceMessenger,\n * captureException,\n * });\n *\n * const exampleControllerMessenger = new Messenger<\n * 'ExampleController',\n * MessengerActions<ExampleControllerMessenger>,\n * MessengerEvents<ExampleControllerMessenger>,\n * RootMessenger\n * >({\n * namespace: 'ExampleController',\n * parent: rootMessenger,\n * });\n * rootMessenger.delegate({\n * messenger: exampleControllerMessenger,\n * actions: ['ErrorReportingService:captureException'],\n * });\n * const exampleController = new ExampleController({\n * messenger: exampleControllerMessenger,\n * });\n *\n * // === Somewhere else ===\n *\n * // Now this will report an error without throwing it.\n * exampleController.doSomething();\n * ```\n *\n * @deprecated This service is deprecated and will be removed in a future\n * release. Please use `Messenger.captureException` directly instead.\n */\nexport class ErrorReportingService {\n name: 'ErrorReportingService' = 'ErrorReportingService' as const;\n\n state = null;\n\n readonly #captureException: ErrorReportingServiceOptions['captureException'];\n\n readonly #messenger: ErrorReportingServiceMessenger;\n\n /**\n * Constructs a new ErrorReportingService.\n *\n * @param options - The options.\n * @param options.messenger - The messenger suited to this\n * ErrorReportingService.\n * @param options.captureException - A function that stores the given error in\n * the error reporting service.\n */\n constructor({ messenger, captureException }: ErrorReportingServiceOptions) {\n this.#messenger = messenger;\n this.#captureException = captureException;\n\n this.#messenger.registerActionHandler(\n 'ErrorReportingService:captureException',\n this.#captureException.bind(this),\n );\n }\n\n /**\n * Reports the given error to an external location.\n *\n * @param error - The error to report.\n * @deprecated This function is deprecated and will be removed in a future\n * release. Please use `Messenger.captureException` directly instead.\n */\n captureException(error: Error): void {\n this.#captureException(error);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yEAAkE;AAAzD,gIAAA,qBAAqB,OAAA","sourcesContent":["export { ErrorReportingService } from './error-reporting-service';\nexport type {\n ErrorReportingServiceActions,\n ErrorReportingServiceEvents,\n ErrorReportingServiceMessenger,\n} from './error-reporting-service';\nexport type {\n ErrorReportingServiceCaptureExceptionAction,\n ErrorReportingServiceMethodActions,\n} from './error-reporting-service-method-action-types';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yEAAkE;AAAzD,gIAAA,qBAAqB,OAAA","sourcesContent":["export { ErrorReportingService } from './error-reporting-service';\nexport type {\n ErrorReportingServiceActions,\n ErrorReportingServiceCaptureExceptionAction,\n ErrorReportingServiceEvents,\n ErrorReportingServiceMessenger,\n} from './error-reporting-service';\n"]}
package/dist/index.d.cts CHANGED
@@ -1,4 +1,3 @@
1
1
  export { ErrorReportingService } from "./error-reporting-service.cjs";
2
- export type { ErrorReportingServiceActions, ErrorReportingServiceEvents, ErrorReportingServiceMessenger, } from "./error-reporting-service.cjs";
3
- export type { ErrorReportingServiceCaptureExceptionAction, ErrorReportingServiceMethodActions, } from "./error-reporting-service-method-action-types.cjs";
2
+ export type { ErrorReportingServiceActions, ErrorReportingServiceCaptureExceptionAction, ErrorReportingServiceEvents, ErrorReportingServiceMessenger, } from "./error-reporting-service.cjs";
4
3
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,sCAAkC;AAClE,YAAY,EACV,4BAA4B,EAC5B,2BAA2B,EAC3B,8BAA8B,GAC/B,sCAAkC;AACnC,YAAY,EACV,2CAA2C,EAC3C,kCAAkC,GACnC,0DAAsD"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,sCAAkC;AAClE,YAAY,EACV,4BAA4B,EAC5B,2CAA2C,EAC3C,2BAA2B,EAC3B,8BAA8B,GAC/B,sCAAkC"}
package/dist/index.d.mts CHANGED
@@ -1,4 +1,3 @@
1
1
  export { ErrorReportingService } from "./error-reporting-service.mjs";
2
- export type { ErrorReportingServiceActions, ErrorReportingServiceEvents, ErrorReportingServiceMessenger, } from "./error-reporting-service.mjs";
3
- export type { ErrorReportingServiceCaptureExceptionAction, ErrorReportingServiceMethodActions, } from "./error-reporting-service-method-action-types.mjs";
2
+ export type { ErrorReportingServiceActions, ErrorReportingServiceCaptureExceptionAction, ErrorReportingServiceEvents, ErrorReportingServiceMessenger, } from "./error-reporting-service.mjs";
4
3
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,sCAAkC;AAClE,YAAY,EACV,4BAA4B,EAC5B,2BAA2B,EAC3B,8BAA8B,GAC/B,sCAAkC;AACnC,YAAY,EACV,2CAA2C,EAC3C,kCAAkC,GACnC,0DAAsD"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,sCAAkC;AAClE,YAAY,EACV,4BAA4B,EAC5B,2CAA2C,EAC3C,2BAA2B,EAC3B,8BAA8B,GAC/B,sCAAkC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,sCAAkC","sourcesContent":["export { ErrorReportingService } from './error-reporting-service';\nexport type {\n ErrorReportingServiceActions,\n ErrorReportingServiceEvents,\n ErrorReportingServiceMessenger,\n} from './error-reporting-service';\nexport type {\n ErrorReportingServiceCaptureExceptionAction,\n ErrorReportingServiceMethodActions,\n} from './error-reporting-service-method-action-types';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,sCAAkC","sourcesContent":["export { ErrorReportingService } from './error-reporting-service';\nexport type {\n ErrorReportingServiceActions,\n ErrorReportingServiceCaptureExceptionAction,\n ErrorReportingServiceEvents,\n ErrorReportingServiceMessenger,\n} from './error-reporting-service';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/error-reporting-service",
3
- "version": "3.0.1-preview-3685bfb",
3
+ "version": "3.0.1-preview-25d2d4502",
4
4
  "description": "Logs errors to an error reporting service such as Sentry",
5
5
  "keywords": [
6
6
  "MetaMask",
@@ -40,7 +40,6 @@
40
40
  "build:docs": "typedoc",
41
41
  "changelog:update": "../../scripts/update-changelog.sh @metamask/error-reporting-service",
42
42
  "changelog:validate": "../../scripts/validate-changelog.sh @metamask/error-reporting-service",
43
- "generate-method-action-types": "tsx ../../scripts/generate-method-action-types.ts",
44
43
  "since-latest-release": "../../scripts/since-latest-release.sh",
45
44
  "test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
46
45
  "test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",
@@ -59,7 +58,6 @@
59
58
  "deepmerge": "^4.2.2",
60
59
  "jest": "^29.7.0",
61
60
  "ts-jest": "^29.2.5",
62
- "tsx": "^4.20.5",
63
61
  "typedoc": "^0.25.13",
64
62
  "typedoc-plugin-missing-exports": "^2.0.0",
65
63
  "typescript": "~5.3.3"
@@ -1,7 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file is auto generated by `scripts/generate-method-action-types.ts`.
4
- * Do not edit manually.
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- //# sourceMappingURL=error-reporting-service-method-action-types.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-reporting-service-method-action-types.cjs","sourceRoot":"","sources":["../src/error-reporting-service-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated by `scripts/generate-method-action-types.ts`.\n * Do not edit manually.\n */\n\nimport type { ErrorReportingService } from './error-reporting-service';\n\n/**\n * Reports the given error to an external location.\n *\n * @param error - The error to report.\n * @deprecated This function is deprecated and will be removed in a future\n * release. Please use `Messenger.captureException` directly instead.\n */\nexport type ErrorReportingServiceCaptureExceptionAction = {\n type: `ErrorReportingService:captureException`;\n handler: ErrorReportingService['captureException'];\n};\n\n/**\n * Union of all ErrorReportingService action types.\n */\nexport type ErrorReportingServiceMethodActions =\n ErrorReportingServiceCaptureExceptionAction;\n"]}
@@ -1,21 +0,0 @@
1
- /**
2
- * This file is auto generated by `scripts/generate-method-action-types.ts`.
3
- * Do not edit manually.
4
- */
5
- import type { ErrorReportingService } from "./error-reporting-service.cjs";
6
- /**
7
- * Reports the given error to an external location.
8
- *
9
- * @param error - The error to report.
10
- * @deprecated This function is deprecated and will be removed in a future
11
- * release. Please use `Messenger.captureException` directly instead.
12
- */
13
- export type ErrorReportingServiceCaptureExceptionAction = {
14
- type: `ErrorReportingService:captureException`;
15
- handler: ErrorReportingService['captureException'];
16
- };
17
- /**
18
- * Union of all ErrorReportingService action types.
19
- */
20
- export type ErrorReportingServiceMethodActions = ErrorReportingServiceCaptureExceptionAction;
21
- //# sourceMappingURL=error-reporting-service-method-action-types.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-reporting-service-method-action-types.d.cts","sourceRoot":"","sources":["../src/error-reporting-service-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,sCAAkC;AAEvE;;;;;;GAMG;AACH,MAAM,MAAM,2CAA2C,GAAG;IACxD,IAAI,EAAE,wCAAwC,CAAC;IAC/C,OAAO,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;CACpD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAC5C,2CAA2C,CAAC"}
@@ -1,21 +0,0 @@
1
- /**
2
- * This file is auto generated by `scripts/generate-method-action-types.ts`.
3
- * Do not edit manually.
4
- */
5
- import type { ErrorReportingService } from "./error-reporting-service.mjs";
6
- /**
7
- * Reports the given error to an external location.
8
- *
9
- * @param error - The error to report.
10
- * @deprecated This function is deprecated and will be removed in a future
11
- * release. Please use `Messenger.captureException` directly instead.
12
- */
13
- export type ErrorReportingServiceCaptureExceptionAction = {
14
- type: `ErrorReportingService:captureException`;
15
- handler: ErrorReportingService['captureException'];
16
- };
17
- /**
18
- * Union of all ErrorReportingService action types.
19
- */
20
- export type ErrorReportingServiceMethodActions = ErrorReportingServiceCaptureExceptionAction;
21
- //# sourceMappingURL=error-reporting-service-method-action-types.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-reporting-service-method-action-types.d.mts","sourceRoot":"","sources":["../src/error-reporting-service-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,sCAAkC;AAEvE;;;;;;GAMG;AACH,MAAM,MAAM,2CAA2C,GAAG;IACxD,IAAI,EAAE,wCAAwC,CAAC;IAC/C,OAAO,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;CACpD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAC5C,2CAA2C,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * This file is auto generated by `scripts/generate-method-action-types.ts`.
3
- * Do not edit manually.
4
- */
5
- export {};
6
- //# sourceMappingURL=error-reporting-service-method-action-types.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-reporting-service-method-action-types.mjs","sourceRoot":"","sources":["../src/error-reporting-service-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated by `scripts/generate-method-action-types.ts`.\n * Do not edit manually.\n */\n\nimport type { ErrorReportingService } from './error-reporting-service';\n\n/**\n * Reports the given error to an external location.\n *\n * @param error - The error to report.\n * @deprecated This function is deprecated and will be removed in a future\n * release. Please use `Messenger.captureException` directly instead.\n */\nexport type ErrorReportingServiceCaptureExceptionAction = {\n type: `ErrorReportingService:captureException`;\n handler: ErrorReportingService['captureException'];\n};\n\n/**\n * Union of all ErrorReportingService action types.\n */\nexport type ErrorReportingServiceMethodActions =\n ErrorReportingServiceCaptureExceptionAction;\n"]}