@jetshop/core 6.0.3 → 6.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -56,8 +56,10 @@ const startClient = (tree, config) => {
56
56
  apiUrl: config.apolloConfig.graphQLURI
57
57
  });
58
58
  }
59
- if (config.sentry && config.sentry.clientDSN) {
60
- Sentry.init(config.sentry.clientDSN);
59
+ if (__USE_SENTRY__) {
60
+ if (config.sentry && config.sentry.clientDSN) {
61
+ Sentry.init(config.sentry.clientDSN);
62
+ }
61
63
  }
62
64
  const { apolloConfig } = config;
63
65
  const authHandler = new AuthHandler({
@@ -1 +1 @@
1
- {"version":3,"file":"startClient.js","sourceRoot":"","sources":["startClient.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAuB,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAErE,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,aAAa,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,UAAU,MAAM,eAAe,CA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CAAC;AACP,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG,CAAC,IAAkB,EAAE,MAAmB,EAAE,EAAE;IACvD,2HAA2H;IAC3H,IAAK,MAAc,CAAC,eAAe,EAAE;QACnC,OAAO,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;KAClC;SAAM;QACL,2KAA2K;QAC1K,MAAc,CAAC,QAAQ,GAAG,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;KAC5D;AACH,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -14,7 +14,7 @@ process.on('unhandledRejection', (err) => {
14
14
  const createServer = ({ apolloServer, middlewares }) => {
15
15
  const app = express();
16
16
  // The Sentry.io request handler must be the first middleware on the app
17
- if (process.env.USE_SENTRY === '1') {
17
+ if (__USE_SENTRY__) {
18
18
  app.use(Sentry.Handlers.requestHandler());
19
19
  }
20
20
  app.set('trust proxy', true);
@@ -33,7 +33,7 @@ const createServer = ({ apolloServer, middlewares }) => {
33
33
  maxAge: '365d'
34
34
  }));
35
35
  // The error handler must be before any other error middleware
36
- if (process.env.USE_SENTRY === '1') {
36
+ if (__USE_SENTRY__) {
37
37
  app.use(Sentry.Handlers.errorHandler());
38
38
  }
39
39
  return app;
@@ -1 +1 @@
1
- {"version":3,"file":"createServer.js","sourceRoot":"","sources":["createServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AAEvC,OAAO,OAAqD,MAAM,SAAS,CAAC;AAC5E,OAAO,WAAW,MAAM,aAAa,CAAC;AACtC,OAAO,oBAAoB,MAAM,gDAAgD,CAAC;AAClF,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AACzD,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAE1C,qEAAqE;AACrE,6EAA6E;AAC7E,2DAA2D;AAC3D,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,GAAU,EAAE,EAAE;IAC9C,MAA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AAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IACxB,WAAW,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAEnE,GAAG,CAAC,GAAG,CACL,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE;QAC5C,MAAM,EAAE,MAAM;KACf,CAAC,CACH,CAAC;IAEF,8DAA8D;IAC9D,IAAI,cAAc,EAAE;QAClB,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC;KACzC;IAED,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -67,8 +67,10 @@ export const createApp = (Component, userConfig) => __awaiter(void 0, void 0, vo
67
67
  console.error('checkRequiredFiles failed!');
68
68
  process.exit(1);
69
69
  }
70
- if (sentry) {
71
- Sentry.init(sentry.serverDSN);
70
+ if (__USE_SENTRY__) {
71
+ if (sentry) {
72
+ Sentry.init(sentry.serverDSN);
73
+ }
72
74
  }
73
75
  const template = fs.readFileSync(templatePath, 'utf8');
74
76
  const middlewares = [];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,MAAM,qCAAqC,CAAC;AACxD,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,8EAA8E;AAC9E,iGAAiG;AACjG,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AAEpE,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAC5D,OAAO,iBAAiB,MAAM,qBAAqB,C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{ convertAnyToError } from './errorReporting.shared';
3
- export default (error, extra = {}) => {
4
- Sentry.withScope(scope => {
3
+ const errorReporting = (error, extra = {}) => {
4
+ Sentry.withScope((scope) => {
5
5
  // https://github.com/getsentry/sentry-javascript/issues/1607#issuecomment-425974249
6
- Object.keys(extra).forEach(key => {
6
+ Object.keys(extra).forEach((key) => {
7
7
  scope.setExtra(key, extra[key]);
8
8
  });
9
9
  Sentry.captureException(convertAnyToError(error));
10
10
  });
11
11
  };
12
+ export default __USE_SENTRY__
13
+ ? errorReporting
14
+ : () => {
15
+ return;
16
+ };
12
17
  //# sourceMappingURL=errorReporting.browser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errorReporting.browser.js","sourceRoot":"","sources":["errorReporting.browser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAU,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEpE,eAAe,CAAC,KAAY,EAAE,QAAgB,EAAE,EAAE,EAAE;IAClD,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;QACvB,oFAAoF;QACpF,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAC/B,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
1
+ {"version":3,"file":"errorReporting.browser.js","sourceRoot":"","sources":["errorReporting.browser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAU,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEpE,MAAM,cAAc,GAAG,CAAC,KAAY,EAAE,QAAgB,EAAE,EAAE,EAAE;IAC1D,MAAM,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE;QACzB,oFAAoF;QACpF,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACjC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,cAAc;IAC3B,CAAC,CAAC,cAAc;IAChB,CAAC,CAAC,GAAG,EAAE;QACH,OAAO;IACT,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
1
  import { Extras } from './errorReporting.shared';
2
2
  declare function errorReporting(error: Error, extra?: Extras): void;
3
- export default errorReporting;
3
+ declare const _default: typeof errorReporting;
4
+ export default _default;
package/errorReporting.js CHANGED
@@ -16,5 +16,9 @@ function errorReporting(error, extra) {
16
16
  }
17
17
  return report(error, extra);
18
18
  }
19
- export default errorReporting;
19
+ export default __USE_SENTRY__
20
+ ? errorReporting
21
+ : (_, __) => {
22
+ return;
23
+ };
20
24
  //# sourceMappingURL=errorReporting.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errorReporting.js","sourceRoot":"","sources":["errorReporting.ts"],"names":[],"mappings":"AAEA;;;;;;;EAOE;AACF,SAAS,cAAc,CAAC,KAAY,EAAE,KAAc;IAClD,IAAI,MAAc,CAAC;IACnB,IAAI,aAAa,EAAE;QACjB,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC,OAAO,CAAC;KACrD;SAAM;QACL,MAAM,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC,OAAO,CAAC;KACtD;IACD,OAAO,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"errorReporting.js","sourceRoot":"","sources":["errorReporting.ts"],"names":[],"mappings":"AAEA;;;;;;;EAOE;AACF,SAAS,cAAc,CAAC,KAAY,EAAE,KAAc;IAClD,IAAI,MAAc,CAAC;IACnB,IAAI,aAAa,EAAE;QACjB,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC,OAAO,CAAC;KACrD;SAAM;QACL,MAAM,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC,OAAO,CAAC;KACtD;IACD,OAAO,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED,eAAe,cAAc;IAC3B,CAAC,CAAC,cAAc;IAChB,CAAC,CAAC,CAAC,CAAQ,EAAE,EAAU,EAAE,EAAE;QACvB,OAAO;IACT,CAAC,CAAC"}
package/global.d.ts CHANGED
@@ -13,6 +13,7 @@ declare module 'apollo-link' {
13
13
 
14
14
  declare global {
15
15
  let __IN_SERVER__: boolean;
16
+ let __USE_SENTRY__: boolean;
16
17
  }
17
18
 
18
19
  declare module 'history' {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetshop/core",
3
- "version": "6.0.3",
3
+ "version": "6.0.4",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "**/*.js",