@sentry/solidstart 10.4.0 → 10.6.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.
@@ -18,29 +18,37 @@ function isRedirect(error) {
18
18
  return hasValidLocation && hasValidStatus;
19
19
  }
20
20
 
21
+ /**
22
+ * Filter function for low quality transactions
23
+ *
24
+ * Exported only for tests
25
+ */
26
+ function lowQualityTransactionsFilter(options) {
27
+ return Object.assign(
28
+ (event => {
29
+ if (event.type !== 'transaction') {
30
+ return event;
31
+ }
32
+ // Filter out transactions for build assets
33
+ if (event.transaction?.match(/^GET \/_build\//)) {
34
+ options.debug && core.debug.log('SolidStartLowQualityTransactionsFilter filtered transaction', event.transaction);
35
+ return null;
36
+ }
37
+ return event;
38
+ }) ,
39
+ { id: 'SolidStartLowQualityTransactionsFilter' },
40
+ );
41
+ }
42
+
21
43
  /**
22
44
  * Adds an event processor to filter out low quality transactions,
23
45
  * e.g. to filter out transactions for build assets
24
46
  */
25
47
  function filterLowQualityTransactions(options) {
26
- node.getGlobalScope().addEventProcessor(
27
- Object.assign(
28
- (event => {
29
- if (event.type !== 'transaction') {
30
- return event;
31
- }
32
- // Filter out transactions for build assets
33
- if (event.transaction?.match(/^GET \/_build\//)) {
34
- options.debug && core.debug.log('SolidStartLowQualityTransactionsFilter filtered transaction', event.transaction);
35
- return null;
36
- }
37
- return event;
38
- }) ,
39
- { id: 'SolidStartLowQualityTransactionsFilter' },
40
- ),
41
- );
48
+ node.getGlobalScope().addEventProcessor(lowQualityTransactionsFilter(options));
42
49
  }
43
50
 
44
51
  exports.filterLowQualityTransactions = filterLowQualityTransactions;
45
52
  exports.isRedirect = isRedirect;
53
+ exports.lowQualityTransactionsFilter = lowQualityTransactionsFilter;
46
54
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../src/server/utils.ts"],"sourcesContent":["import type { EventProcessor, Options } from '@sentry/core';\nimport { debug } from '@sentry/core';\nimport { getGlobalScope } from '@sentry/node';\n\n/**\n * Determines if a thrown \"error\" is a redirect Response which Solid Start users can throw to redirect to another route.\n * see: https://docs.solidjs.com/solid-router/reference/data-apis/response-helpers#redirect\n * @param error the potential redirect error\n */\nexport function isRedirect(error: unknown): boolean {\n if (error == null || !(error instanceof Response)) {\n return false;\n }\n\n const hasValidLocation = typeof error.headers.get('location') === 'string';\n const hasValidStatus = error.status >= 300 && error.status <= 308;\n return hasValidLocation && hasValidStatus;\n}\n\n/**\n * Adds an event processor to filter out low quality transactions,\n * e.g. to filter out transactions for build assets\n */\nexport function filterLowQualityTransactions(options: Options): void {\n getGlobalScope().addEventProcessor(\n Object.assign(\n (event => {\n if (event.type !== 'transaction') {\n return event;\n }\n // Filter out transactions for build assets\n if (event.transaction?.match(/^GET \\/_build\\//)) {\n options.debug && debug.log('SolidStartLowQualityTransactionsFilter filtered transaction', event.transaction);\n return null;\n }\n return event;\n }) satisfies EventProcessor,\n { id: 'SolidStartLowQualityTransactionsFilter' },\n ),\n );\n}\n"],"names":["getGlobalScope","debug"],"mappings":";;;;;AAIA;AACA;AACA;AACA;AACA;AACO,SAAS,UAAU,CAAC,KAAK,EAAoB;AACpD,EAAE,IAAI,KAAA,IAAS,IAAA,IAAQ,EAAE,KAAA,YAAiB,QAAQ,CAAC,EAAE;AACrD,IAAI,OAAO,KAAK;AAChB;;AAEA,EAAE,MAAM,gBAAA,GAAmB,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAA,KAAM,QAAQ;AAC5E,EAAE,MAAM,cAAA,GAAiB,KAAK,CAAC,MAAA,IAAU,GAAA,IAAO,KAAK,CAAC,MAAA,IAAU,GAAG;AACnE,EAAE,OAAO,gBAAA,IAAoB,cAAc;AAC3C;;AAEA;AACA;AACA;AACA;AACO,SAAS,4BAA4B,CAAC,OAAO,EAAiB;AACrE,EAAEA,mBAAc,EAAE,CAAC,iBAAiB;AACpC,IAAI,MAAM,CAAC,MAAM;AACjB,OAAO,SAAS;AAChB,QAAQ,IAAI,KAAK,CAAC,IAAA,KAAS,aAAa,EAAE;AAC1C,UAAU,OAAO,KAAK;AACtB;AACA;AACA,QAAQ,IAAI,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAC,EAAE;AACzD,UAAU,OAAO,CAAC,KAAA,IAASC,UAAK,CAAC,GAAG,CAAC,6DAA6D,EAAE,KAAK,CAAC,WAAW,CAAC;AACtH,UAAU,OAAO,IAAI;AACrB;AACA,QAAQ,OAAO,KAAK;AACpB,OAAO;AACP,MAAM,EAAE,EAAE,EAAE,wCAAA,EAA0C;AACtD,KAAK;AACL,GAAG;AACH;;;;;"}
1
+ {"version":3,"file":"utils.js","sources":["../../../src/server/utils.ts"],"sourcesContent":["import type { EventProcessor, Options } from '@sentry/core';\nimport { debug } from '@sentry/core';\nimport { getGlobalScope } from '@sentry/node';\n\n/**\n * Determines if a thrown \"error\" is a redirect Response which Solid Start users can throw to redirect to another route.\n * see: https://docs.solidjs.com/solid-router/reference/data-apis/response-helpers#redirect\n * @param error the potential redirect error\n */\nexport function isRedirect(error: unknown): boolean {\n if (error == null || !(error instanceof Response)) {\n return false;\n }\n\n const hasValidLocation = typeof error.headers.get('location') === 'string';\n const hasValidStatus = error.status >= 300 && error.status <= 308;\n return hasValidLocation && hasValidStatus;\n}\n\n/**\n * Filter function for low quality transactions\n *\n * Exported only for tests\n */\nexport function lowQualityTransactionsFilter(options: Options): EventProcessor {\n return Object.assign(\n (event => {\n if (event.type !== 'transaction') {\n return event;\n }\n // Filter out transactions for build assets\n if (event.transaction?.match(/^GET \\/_build\\//)) {\n options.debug && debug.log('SolidStartLowQualityTransactionsFilter filtered transaction', event.transaction);\n return null;\n }\n return event;\n }) satisfies EventProcessor,\n { id: 'SolidStartLowQualityTransactionsFilter' },\n );\n}\n\n/**\n * Adds an event processor to filter out low quality transactions,\n * e.g. to filter out transactions for build assets\n */\nexport function filterLowQualityTransactions(options: Options): void {\n getGlobalScope().addEventProcessor(lowQualityTransactionsFilter(options));\n}\n"],"names":["debug","getGlobalScope"],"mappings":";;;;;AAIA;AACA;AACA;AACA;AACA;AACO,SAAS,UAAU,CAAC,KAAK,EAAoB;AACpD,EAAE,IAAI,KAAA,IAAS,IAAA,IAAQ,EAAE,KAAA,YAAiB,QAAQ,CAAC,EAAE;AACrD,IAAI,OAAO,KAAK;AAChB;;AAEA,EAAE,MAAM,gBAAA,GAAmB,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAA,KAAM,QAAQ;AAC5E,EAAE,MAAM,cAAA,GAAiB,KAAK,CAAC,MAAA,IAAU,GAAA,IAAO,KAAK,CAAC,MAAA,IAAU,GAAG;AACnE,EAAE,OAAO,gBAAA,IAAoB,cAAc;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACO,SAAS,4BAA4B,CAAC,OAAO,EAA2B;AAC/E,EAAE,OAAO,MAAM,CAAC,MAAM;AACtB,KAAK,SAAS;AACd,MAAM,IAAI,KAAK,CAAC,IAAA,KAAS,aAAa,EAAE;AACxC,QAAQ,OAAO,KAAK;AACpB;AACA;AACA,MAAM,IAAI,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAC,EAAE;AACvD,QAAQ,OAAO,CAAC,KAAA,IAASA,UAAK,CAAC,GAAG,CAAC,6DAA6D,EAAE,KAAK,CAAC,WAAW,CAAC;AACpH,QAAQ,OAAO,IAAI;AACnB;AACA,MAAM,OAAO,KAAK;AAClB,KAAK;AACL,IAAI,EAAE,EAAE,EAAE,wCAAA,EAA0C;AACpD,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACO,SAAS,4BAA4B,CAAC,OAAO,EAAiB;AACrE,EAAEC,mBAAc,EAAE,CAAC,iBAAiB,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAC3E;;;;;;"}
@@ -1 +1 @@
1
- {"type":"module","version":"10.4.0"}
1
+ {"type":"module","version":"10.6.0"}
@@ -16,28 +16,35 @@ function isRedirect(error) {
16
16
  return hasValidLocation && hasValidStatus;
17
17
  }
18
18
 
19
+ /**
20
+ * Filter function for low quality transactions
21
+ *
22
+ * Exported only for tests
23
+ */
24
+ function lowQualityTransactionsFilter(options) {
25
+ return Object.assign(
26
+ (event => {
27
+ if (event.type !== 'transaction') {
28
+ return event;
29
+ }
30
+ // Filter out transactions for build assets
31
+ if (event.transaction?.match(/^GET \/_build\//)) {
32
+ options.debug && debug.log('SolidStartLowQualityTransactionsFilter filtered transaction', event.transaction);
33
+ return null;
34
+ }
35
+ return event;
36
+ }) ,
37
+ { id: 'SolidStartLowQualityTransactionsFilter' },
38
+ );
39
+ }
40
+
19
41
  /**
20
42
  * Adds an event processor to filter out low quality transactions,
21
43
  * e.g. to filter out transactions for build assets
22
44
  */
23
45
  function filterLowQualityTransactions(options) {
24
- getGlobalScope().addEventProcessor(
25
- Object.assign(
26
- (event => {
27
- if (event.type !== 'transaction') {
28
- return event;
29
- }
30
- // Filter out transactions for build assets
31
- if (event.transaction?.match(/^GET \/_build\//)) {
32
- options.debug && debug.log('SolidStartLowQualityTransactionsFilter filtered transaction', event.transaction);
33
- return null;
34
- }
35
- return event;
36
- }) ,
37
- { id: 'SolidStartLowQualityTransactionsFilter' },
38
- ),
39
- );
46
+ getGlobalScope().addEventProcessor(lowQualityTransactionsFilter(options));
40
47
  }
41
48
 
42
- export { filterLowQualityTransactions, isRedirect };
49
+ export { filterLowQualityTransactions, isRedirect, lowQualityTransactionsFilter };
43
50
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../src/server/utils.ts"],"sourcesContent":["import type { EventProcessor, Options } from '@sentry/core';\nimport { debug } from '@sentry/core';\nimport { getGlobalScope } from '@sentry/node';\n\n/**\n * Determines if a thrown \"error\" is a redirect Response which Solid Start users can throw to redirect to another route.\n * see: https://docs.solidjs.com/solid-router/reference/data-apis/response-helpers#redirect\n * @param error the potential redirect error\n */\nexport function isRedirect(error: unknown): boolean {\n if (error == null || !(error instanceof Response)) {\n return false;\n }\n\n const hasValidLocation = typeof error.headers.get('location') === 'string';\n const hasValidStatus = error.status >= 300 && error.status <= 308;\n return hasValidLocation && hasValidStatus;\n}\n\n/**\n * Adds an event processor to filter out low quality transactions,\n * e.g. to filter out transactions for build assets\n */\nexport function filterLowQualityTransactions(options: Options): void {\n getGlobalScope().addEventProcessor(\n Object.assign(\n (event => {\n if (event.type !== 'transaction') {\n return event;\n }\n // Filter out transactions for build assets\n if (event.transaction?.match(/^GET \\/_build\\//)) {\n options.debug && debug.log('SolidStartLowQualityTransactionsFilter filtered transaction', event.transaction);\n return null;\n }\n return event;\n }) satisfies EventProcessor,\n { id: 'SolidStartLowQualityTransactionsFilter' },\n ),\n );\n}\n"],"names":[],"mappings":";;;AAIA;AACA;AACA;AACA;AACA;AACO,SAAS,UAAU,CAAC,KAAK,EAAoB;AACpD,EAAE,IAAI,KAAA,IAAS,IAAA,IAAQ,EAAE,KAAA,YAAiB,QAAQ,CAAC,EAAE;AACrD,IAAI,OAAO,KAAK;AAChB;;AAEA,EAAE,MAAM,gBAAA,GAAmB,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAA,KAAM,QAAQ;AAC5E,EAAE,MAAM,cAAA,GAAiB,KAAK,CAAC,MAAA,IAAU,GAAA,IAAO,KAAK,CAAC,MAAA,IAAU,GAAG;AACnE,EAAE,OAAO,gBAAA,IAAoB,cAAc;AAC3C;;AAEA;AACA;AACA;AACA;AACO,SAAS,4BAA4B,CAAC,OAAO,EAAiB;AACrE,EAAE,cAAc,EAAE,CAAC,iBAAiB;AACpC,IAAI,MAAM,CAAC,MAAM;AACjB,OAAO,SAAS;AAChB,QAAQ,IAAI,KAAK,CAAC,IAAA,KAAS,aAAa,EAAE;AAC1C,UAAU,OAAO,KAAK;AACtB;AACA;AACA,QAAQ,IAAI,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAC,EAAE;AACzD,UAAU,OAAO,CAAC,KAAA,IAAS,KAAK,CAAC,GAAG,CAAC,6DAA6D,EAAE,KAAK,CAAC,WAAW,CAAC;AACtH,UAAU,OAAO,IAAI;AACrB;AACA,QAAQ,OAAO,KAAK;AACpB,OAAO;AACP,MAAM,EAAE,EAAE,EAAE,wCAAA,EAA0C;AACtD,KAAK;AACL,GAAG;AACH;;;;"}
1
+ {"version":3,"file":"utils.js","sources":["../../../src/server/utils.ts"],"sourcesContent":["import type { EventProcessor, Options } from '@sentry/core';\nimport { debug } from '@sentry/core';\nimport { getGlobalScope } from '@sentry/node';\n\n/**\n * Determines if a thrown \"error\" is a redirect Response which Solid Start users can throw to redirect to another route.\n * see: https://docs.solidjs.com/solid-router/reference/data-apis/response-helpers#redirect\n * @param error the potential redirect error\n */\nexport function isRedirect(error: unknown): boolean {\n if (error == null || !(error instanceof Response)) {\n return false;\n }\n\n const hasValidLocation = typeof error.headers.get('location') === 'string';\n const hasValidStatus = error.status >= 300 && error.status <= 308;\n return hasValidLocation && hasValidStatus;\n}\n\n/**\n * Filter function for low quality transactions\n *\n * Exported only for tests\n */\nexport function lowQualityTransactionsFilter(options: Options): EventProcessor {\n return Object.assign(\n (event => {\n if (event.type !== 'transaction') {\n return event;\n }\n // Filter out transactions for build assets\n if (event.transaction?.match(/^GET \\/_build\\//)) {\n options.debug && debug.log('SolidStartLowQualityTransactionsFilter filtered transaction', event.transaction);\n return null;\n }\n return event;\n }) satisfies EventProcessor,\n { id: 'SolidStartLowQualityTransactionsFilter' },\n );\n}\n\n/**\n * Adds an event processor to filter out low quality transactions,\n * e.g. to filter out transactions for build assets\n */\nexport function filterLowQualityTransactions(options: Options): void {\n getGlobalScope().addEventProcessor(lowQualityTransactionsFilter(options));\n}\n"],"names":[],"mappings":";;;AAIA;AACA;AACA;AACA;AACA;AACO,SAAS,UAAU,CAAC,KAAK,EAAoB;AACpD,EAAE,IAAI,KAAA,IAAS,IAAA,IAAQ,EAAE,KAAA,YAAiB,QAAQ,CAAC,EAAE;AACrD,IAAI,OAAO,KAAK;AAChB;;AAEA,EAAE,MAAM,gBAAA,GAAmB,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAA,KAAM,QAAQ;AAC5E,EAAE,MAAM,cAAA,GAAiB,KAAK,CAAC,MAAA,IAAU,GAAA,IAAO,KAAK,CAAC,MAAA,IAAU,GAAG;AACnE,EAAE,OAAO,gBAAA,IAAoB,cAAc;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACO,SAAS,4BAA4B,CAAC,OAAO,EAA2B;AAC/E,EAAE,OAAO,MAAM,CAAC,MAAM;AACtB,KAAK,SAAS;AACd,MAAM,IAAI,KAAK,CAAC,IAAA,KAAS,aAAa,EAAE;AACxC,QAAQ,OAAO,KAAK;AACpB;AACA;AACA,MAAM,IAAI,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAC,EAAE;AACvD,QAAQ,OAAO,CAAC,KAAA,IAAS,KAAK,CAAC,GAAG,CAAC,6DAA6D,EAAE,KAAK,CAAC,WAAW,CAAC;AACpH,QAAQ,OAAO,IAAI;AACnB;AACA,MAAM,OAAO,KAAK;AAClB,KAAK;AACL,IAAI,EAAE,EAAE,EAAE,wCAAA,EAA0C;AACpD,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACO,SAAS,4BAA4B,CAAC,OAAO,EAAiB;AACrE,EAAE,cAAc,EAAE,CAAC,iBAAiB,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAC3E;;;;"}
@@ -1,10 +1,16 @@
1
- import type { Options } from '@sentry/core';
1
+ import type { EventProcessor, Options } from '@sentry/core';
2
2
  /**
3
3
  * Determines if a thrown "error" is a redirect Response which Solid Start users can throw to redirect to another route.
4
4
  * see: https://docs.solidjs.com/solid-router/reference/data-apis/response-helpers#redirect
5
5
  * @param error the potential redirect error
6
6
  */
7
7
  export declare function isRedirect(error: unknown): boolean;
8
+ /**
9
+ * Filter function for low quality transactions
10
+ *
11
+ * Exported only for tests
12
+ */
13
+ export declare function lowQualityTransactionsFilter(options: Options): EventProcessor;
8
14
  /**
9
15
  * Adds an event processor to filter out low quality transactions,
10
16
  * e.g. to filter out transactions for build assets
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/server/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,OAAO,EAAE,MAAM,cAAc,CAAC;AAI5D;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQlD;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiBnE"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/server/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAI5D;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQlD;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,cAAc,CAe7E;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAEnE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/solidstart",
3
- "version": "10.4.0",
3
+ "version": "10.6.0",
4
4
  "description": "Official Sentry SDK for Solid Start",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/solidstart",
@@ -66,10 +66,10 @@
66
66
  }
67
67
  },
68
68
  "dependencies": {
69
- "@sentry/core": "10.4.0",
70
- "@sentry/node": "10.4.0",
71
- "@sentry/solid": "10.4.0",
72
- "@sentry/vite-plugin": "^4.0.0"
69
+ "@sentry/core": "10.6.0",
70
+ "@sentry/node": "10.6.0",
71
+ "@sentry/solid": "10.6.0",
72
+ "@sentry/vite-plugin": "^4.1.0"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@solidjs/router": "^0.13.4",