@ask-ell/sentry 0.0.1 → 0.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ask-ell/sentry",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -1 +1 @@
1
- {"version":3,"file":"sentry.configuration.d.ts","sourceRoot":"","sources":["../../../../packages/sentry/src/sentry.configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGnD,KAAK,mBAAmB,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,cAAc,CAAC,MAAM,CAAC,CAAC;AAExE,MAAM,MAAM,wBAAwB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,mBAAmB,CAAC;CAC7B,CAAC;AAEF,qBAAa,mBAAmB;IAIhB,OAAO,CAAC,KAAK;IAHzB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAU;gBAEJ,KAAK,EAAE,wBAAwB;IAInD,IAAI,IAAI,IAAI;CAiBf"}
1
+ {"version":3,"file":"sentry.configuration.d.ts","sourceRoot":"","sources":["../../../../packages/sentry/src/sentry.configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGnD,KAAK,mBAAmB,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,cAAc,CAAC,MAAM,CAAC,CAAC;AAExE,MAAM,MAAM,wBAAwB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,mBAAmB,CAAC;CAC7B,CAAC;AAEF,qBAAa,mBAAmB;IAIhB,OAAO,CAAC,KAAK;IAHzB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAU;gBAEJ,KAAK,EAAE,wBAAwB;IAInD,IAAI,IAAI,IAAI;CAsBf"}
@@ -11,12 +11,16 @@ export class SentryConfiguration {
11
11
  return this.logger.info("Sentry already inited. Step skipped");
12
12
  }
13
13
  const { publicKey, host, projectId, environment, init } = this.props;
14
- const dsn = `${publicKey}@${host}/${projectId}`;
15
- init({
14
+ const dsn = `https://${publicKey}@${host}/${projectId}`;
15
+ const client = init({
16
16
  dsn,
17
17
  sendDefaultPii: true,
18
18
  environment: environment ?? "production"
19
19
  });
20
+ if (!client) {
21
+ this.logger.warn(`Sentry not inited`);
22
+ return;
23
+ }
20
24
  this.logger.info(`Sentry inited for environment "${environment}"`);
21
25
  this.inited = true;
22
26
  }