@sentry/solidstart 9.37.0 → 9.39.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/build/cjs/config/withSentry.js +1 -1
- package/build/cjs/config/withSentry.js.map +1 -1
- package/build/cjs/server/utils.js +4 -4
- package/build/cjs/server/utils.js.map +1 -1
- package/build/esm/config/withSentry.js +2 -2
- package/build/esm/config/withSentry.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/server/utils.js +5 -5
- package/build/esm/server/utils.js.map +1 -1
- package/package.json +4 -4
|
@@ -48,7 +48,7 @@ function withSentry(
|
|
|
48
48
|
await addInstrumentation.addDynamicImportEntryFileWrapper({ nitro, rollupConfig: config, sentryPluginOptions });
|
|
49
49
|
|
|
50
50
|
sentrySolidStartPluginOptions.debug &&
|
|
51
|
-
core.
|
|
51
|
+
core.debug.log(
|
|
52
52
|
'Wrapping the server entry file with a dynamic `import()`, so Sentry can be preloaded before the server initializes.',
|
|
53
53
|
);
|
|
54
54
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withSentry.js","sources":["../../../src/config/withSentry.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"withSentry.js","sources":["../../../src/config/withSentry.ts"],"sourcesContent":["import { debug } from '@sentry/core';\nimport type { Nitro } from 'nitropack';\nimport { addSentryPluginToVite } from '../vite/sentrySolidStartVite';\nimport type { SentrySolidStartPluginOptions } from '../vite/types';\nimport {\n addDynamicImportEntryFileWrapper,\n addInstrumentationFileToBuild,\n addSentryTopImport,\n} from './addInstrumentation';\nimport type { RollupConfig, SolidStartInlineConfig, SolidStartInlineServerConfig } from './types';\n\nconst defaultSentrySolidStartPluginOptions: Omit<\n SentrySolidStartPluginOptions,\n 'experimental_entrypointWrappedFunctions'\n> &\n Required<Pick<SentrySolidStartPluginOptions, 'experimental_entrypointWrappedFunctions'>> = {\n experimental_entrypointWrappedFunctions: ['default', 'handler', 'server'],\n};\n\n/**\n * Modifies the passed in Solid Start configuration with build-time enhancements such as\n * building the `instrument.server.ts` file into the appropriate build folder based on\n * build preset.\n *\n * @param solidStartConfig A Solid Start configuration object, as usually passed to `defineConfig` in `app.config.ts|js`\n * @param sentrySolidStartPluginOptions Options to configure the plugin\n * @returns The modified config to be exported and passed back into `defineConfig`\n */\nexport function withSentry(\n solidStartConfig: SolidStartInlineConfig = {},\n sentrySolidStartPluginOptions: SentrySolidStartPluginOptions,\n): SolidStartInlineConfig {\n const sentryPluginOptions = {\n ...sentrySolidStartPluginOptions,\n ...defaultSentrySolidStartPluginOptions,\n };\n\n const server = (solidStartConfig.server || {}) as SolidStartInlineServerConfig;\n const hooks = server.hooks || {};\n const viteConfig = solidStartConfig.vite;\n const vite =\n typeof viteConfig === 'function'\n ? (...args: Parameters<typeof viteConfig>) => addSentryPluginToVite(viteConfig(...args), sentryPluginOptions)\n : addSentryPluginToVite(viteConfig, sentryPluginOptions);\n\n return {\n ...solidStartConfig,\n vite,\n server: {\n ...server,\n hooks: {\n ...hooks,\n async 'rollup:before'(nitro: Nitro, config: RollupConfig) {\n if (sentrySolidStartPluginOptions?.autoInjectServerSentry === 'experimental_dynamic-import') {\n await addDynamicImportEntryFileWrapper({ nitro, rollupConfig: config, sentryPluginOptions });\n\n sentrySolidStartPluginOptions.debug &&\n debug.log(\n 'Wrapping the server entry file with a dynamic `import()`, so Sentry can be preloaded before the server initializes.',\n );\n } else {\n await addInstrumentationFileToBuild(nitro);\n\n if (sentrySolidStartPluginOptions?.autoInjectServerSentry === 'top-level-import') {\n await addSentryTopImport(nitro);\n }\n }\n\n // Run user provided hook\n if (hooks['rollup:before']) {\n hooks['rollup:before'](nitro);\n }\n },\n },\n },\n };\n}\n"],"names":["addSentryPluginToVite","addDynamicImportEntryFileWrapper","debug","addInstrumentationFileToBuild","addSentryTopImport"],"mappings":";;;;;;AAWA,MAAM;;AAIJ,GAA2F;AAC7F,EAAE,uCAAuC,EAAE,CAAC,SAAS,E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BAAkB,EAAE;AAC9F,cAAc,MAAMC,qCAAkB,CAAC,KAAK,CAAC;AAC7C;AACA;;AAEA;AACA,UAAU,IAAI,KAAK,CAAC,eAAe,CAAC,EAAE;AACtC,YAAY,KAAK,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC;AACzC;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL,GAAG;AACH;;;;"}
|
|
@@ -10,11 +10,11 @@ async function flushIfServerless() {
|
|
|
10
10
|
|
|
11
11
|
if (isServerless) {
|
|
12
12
|
try {
|
|
13
|
-
debugBuild.DEBUG_BUILD && core.
|
|
13
|
+
debugBuild.DEBUG_BUILD && core.debug.log('Flushing events...');
|
|
14
14
|
await node.flush(2000);
|
|
15
|
-
debugBuild.DEBUG_BUILD && core.
|
|
15
|
+
debugBuild.DEBUG_BUILD && core.debug.log('Done flushing events');
|
|
16
16
|
} catch (e) {
|
|
17
|
-
debugBuild.DEBUG_BUILD && core.
|
|
17
|
+
debugBuild.DEBUG_BUILD && core.debug.log('Error while flushing events:\n', e);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -47,7 +47,7 @@ function filterLowQualityTransactions(options) {
|
|
|
47
47
|
}
|
|
48
48
|
// Filter out transactions for build assets
|
|
49
49
|
if (event.transaction?.match(/^GET \/_build\//)) {
|
|
50
|
-
options.debug && core.
|
|
50
|
+
options.debug && core.debug.log('SolidStartLowQualityTransactionsFilter filtered transaction', event.transaction);
|
|
51
51
|
return null;
|
|
52
52
|
}
|
|
53
53
|
return event;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../src/server/utils.ts"],"sourcesContent":["import type { EventProcessor, Options } from '@sentry/core';\nimport {
|
|
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 { flush, getGlobalScope } from '@sentry/node';\nimport { DEBUG_BUILD } from '../common/debug-build';\n\n/** Flush the event queue to ensure that events get sent to Sentry before the response is finished and the lambda ends */\nexport async function flushIfServerless(): Promise<void> {\n const isServerless = !!process.env.LAMBDA_TASK_ROOT || !!process.env.VERCEL;\n\n if (isServerless) {\n try {\n DEBUG_BUILD && debug.log('Flushing events...');\n await flush(2000);\n DEBUG_BUILD && debug.log('Done flushing events');\n } catch (e) {\n DEBUG_BUILD && debug.log('Error while flushing events:\\n', e);\n }\n }\n}\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":["DEBUG_BUILD","debug","flush","getGlobalScope"],"mappings":";;;;;;AAKA;AACO,eAAe,iBAAiB,GAAkB;AACzD,EAAE,MAAM,YAAA,GAAe,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAA,IAAoB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM;;AAE7E,EAAE,IAAI,YAAY,EAAE;AACpB,IAAI,IAAI;AACR,MAAMA,0BAAeC,UAAK,CAAC,GAAG,CAAC,oBAAoB,CAAC;AACpD,MAAM,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
1
|
-
import {
|
|
1
|
+
import { debug } from '@sentry/core';
|
|
2
2
|
import { addSentryPluginToVite } from '../vite/sentrySolidStartVite.js';
|
|
3
3
|
import { addDynamicImportEntryFileWrapper, addInstrumentationFileToBuild, addSentryTopImport } from './addInstrumentation.js';
|
|
4
4
|
|
|
@@ -46,7 +46,7 @@ function withSentry(
|
|
|
46
46
|
await addDynamicImportEntryFileWrapper({ nitro, rollupConfig: config, sentryPluginOptions });
|
|
47
47
|
|
|
48
48
|
sentrySolidStartPluginOptions.debug &&
|
|
49
|
-
|
|
49
|
+
debug.log(
|
|
50
50
|
'Wrapping the server entry file with a dynamic `import()`, so Sentry can be preloaded before the server initializes.',
|
|
51
51
|
);
|
|
52
52
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withSentry.js","sources":["../../../src/config/withSentry.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"withSentry.js","sources":["../../../src/config/withSentry.ts"],"sourcesContent":["import { debug } from '@sentry/core';\nimport type { Nitro } from 'nitropack';\nimport { addSentryPluginToVite } from '../vite/sentrySolidStartVite';\nimport type { SentrySolidStartPluginOptions } from '../vite/types';\nimport {\n addDynamicImportEntryFileWrapper,\n addInstrumentationFileToBuild,\n addSentryTopImport,\n} from './addInstrumentation';\nimport type { RollupConfig, SolidStartInlineConfig, SolidStartInlineServerConfig } from './types';\n\nconst defaultSentrySolidStartPluginOptions: Omit<\n SentrySolidStartPluginOptions,\n 'experimental_entrypointWrappedFunctions'\n> &\n Required<Pick<SentrySolidStartPluginOptions, 'experimental_entrypointWrappedFunctions'>> = {\n experimental_entrypointWrappedFunctions: ['default', 'handler', 'server'],\n};\n\n/**\n * Modifies the passed in Solid Start configuration with build-time enhancements such as\n * building the `instrument.server.ts` file into the appropriate build folder based on\n * build preset.\n *\n * @param solidStartConfig A Solid Start configuration object, as usually passed to `defineConfig` in `app.config.ts|js`\n * @param sentrySolidStartPluginOptions Options to configure the plugin\n * @returns The modified config to be exported and passed back into `defineConfig`\n */\nexport function withSentry(\n solidStartConfig: SolidStartInlineConfig = {},\n sentrySolidStartPluginOptions: SentrySolidStartPluginOptions,\n): SolidStartInlineConfig {\n const sentryPluginOptions = {\n ...sentrySolidStartPluginOptions,\n ...defaultSentrySolidStartPluginOptions,\n };\n\n const server = (solidStartConfig.server || {}) as SolidStartInlineServerConfig;\n const hooks = server.hooks || {};\n const viteConfig = solidStartConfig.vite;\n const vite =\n typeof viteConfig === 'function'\n ? (...args: Parameters<typeof viteConfig>) => addSentryPluginToVite(viteConfig(...args), sentryPluginOptions)\n : addSentryPluginToVite(viteConfig, sentryPluginOptions);\n\n return {\n ...solidStartConfig,\n vite,\n server: {\n ...server,\n hooks: {\n ...hooks,\n async 'rollup:before'(nitro: Nitro, config: RollupConfig) {\n if (sentrySolidStartPluginOptions?.autoInjectServerSentry === 'experimental_dynamic-import') {\n await addDynamicImportEntryFileWrapper({ nitro, rollupConfig: config, sentryPluginOptions });\n\n sentrySolidStartPluginOptions.debug &&\n debug.log(\n 'Wrapping the server entry file with a dynamic `import()`, so Sentry can be preloaded before the server initializes.',\n );\n } else {\n await addInstrumentationFileToBuild(nitro);\n\n if (sentrySolidStartPluginOptions?.autoInjectServerSentry === 'top-level-import') {\n await addSentryTopImport(nitro);\n }\n }\n\n // Run user provided hook\n if (hooks['rollup:before']) {\n hooks['rollup:before'](nitro);\n }\n },\n },\n },\n };\n}\n"],"names":[],"mappings":";;;;AAWA,MAAM;;AAIJ,GAA2F;AAC7F,EAAE,uCAAuC,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC;AAC3E,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,UAAU;AAC1B,EAAE,gBAAgB,GAA2B,EAAE;AAC/C,EAAE,6BAA6B;AAC/B,EAA0B;AAC1B,EAAE,MAAM,sBAAsB;AAC9B,IAAI,GAAG,6BAA6B;AACpC,IAAI,GAAG,oCAAoC;AA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
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"9.
|
|
1
|
+
{"type":"module","version":"9.39.0"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { debug } from '@sentry/core';
|
|
2
2
|
import { getGlobalScope, flush } from '@sentry/node';
|
|
3
3
|
import { DEBUG_BUILD } from '../common/debug-build.js';
|
|
4
4
|
|
|
@@ -8,11 +8,11 @@ async function flushIfServerless() {
|
|
|
8
8
|
|
|
9
9
|
if (isServerless) {
|
|
10
10
|
try {
|
|
11
|
-
DEBUG_BUILD &&
|
|
11
|
+
DEBUG_BUILD && debug.log('Flushing events...');
|
|
12
12
|
await flush(2000);
|
|
13
|
-
DEBUG_BUILD &&
|
|
13
|
+
DEBUG_BUILD && debug.log('Done flushing events');
|
|
14
14
|
} catch (e) {
|
|
15
|
-
DEBUG_BUILD &&
|
|
15
|
+
DEBUG_BUILD && debug.log('Error while flushing events:\n', e);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -45,7 +45,7 @@ function filterLowQualityTransactions(options) {
|
|
|
45
45
|
}
|
|
46
46
|
// Filter out transactions for build assets
|
|
47
47
|
if (event.transaction?.match(/^GET \/_build\//)) {
|
|
48
|
-
options.debug &&
|
|
48
|
+
options.debug && debug.log('SolidStartLowQualityTransactionsFilter filtered transaction', event.transaction);
|
|
49
49
|
return null;
|
|
50
50
|
}
|
|
51
51
|
return event;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../src/server/utils.ts"],"sourcesContent":["import type { EventProcessor, Options } from '@sentry/core';\nimport {
|
|
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 { flush, getGlobalScope } from '@sentry/node';\nimport { DEBUG_BUILD } from '../common/debug-build';\n\n/** Flush the event queue to ensure that events get sent to Sentry before the response is finished and the lambda ends */\nexport async function flushIfServerless(): Promise<void> {\n const isServerless = !!process.env.LAMBDA_TASK_ROOT || !!process.env.VERCEL;\n\n if (isServerless) {\n try {\n DEBUG_BUILD && debug.log('Flushing events...');\n await flush(2000);\n DEBUG_BUILD && debug.log('Done flushing events');\n } catch (e) {\n DEBUG_BUILD && debug.log('Error while flushing events:\\n', e);\n }\n }\n}\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":";;;;AAKA;AACO,eAAe,iBAAiB,GAAkB;AACzD,EAAE,MAAM,YAAA,GAAe,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAA,IAAoB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM;;AAE7E,EAAE,IAAI,YAAY,EAAE;AACpB,IAAI,IAAI;AACR,MAAM,eAAe,KAAK,CAAC,GAAG,CAAC,oBAAoB,CAAC;AACpD,MAAM,MAAM,KAAK,CAAC,IAAI,CAAC;AACvB,MAAM,eAAe,KAAK,CAAC,GAAG,CAAC,sBAAsB,CAAC;AACtD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
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,9 +66,9 @@
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@sentry/core": "9.
|
|
70
|
-
"@sentry/node": "9.
|
|
71
|
-
"@sentry/solid": "9.
|
|
69
|
+
"@sentry/core": "9.39.0",
|
|
70
|
+
"@sentry/node": "9.39.0",
|
|
71
|
+
"@sentry/solid": "9.39.0",
|
|
72
72
|
"@sentry/vite-plugin": "2.22.6"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|