@sentry/solidstart 11.9.0 → 11.11.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.
Files changed (62) hide show
  1. package/README.md +5 -1
  2. package/build/cjs/client/index.js +1 -1
  3. package/build/cjs/client/sdk.js +2 -0
  4. package/build/cjs/client/sdk.js.map +1 -1
  5. package/build/cjs/client/solidrouter.js +1 -1
  6. package/build/cjs/common/tunnel.js +13 -0
  7. package/build/cjs/common/tunnel.js.map +1 -0
  8. package/build/cjs/config/withSentry.js +23 -2
  9. package/build/cjs/config/withSentry.js.map +1 -1
  10. package/build/cjs/index.client.js +1 -1
  11. package/build/cjs/index.server.js +12 -4
  12. package/build/cjs/index.server.js.map +1 -1
  13. package/build/cjs/nitro/tunnelPlugin.js +22 -0
  14. package/build/cjs/nitro/tunnelPlugin.js.map +1 -0
  15. package/build/cjs/server/index.js +9 -1
  16. package/build/cjs/server/index.js.map +1 -1
  17. package/build/cjs/solidrouter.client.js +1 -1
  18. package/build/cjs/solidrouter.js +1 -1
  19. package/build/cjs/vite/index.js +2 -0
  20. package/build/cjs/vite/index.js.map +1 -1
  21. package/build/cjs/vite/sentrySolidStart.js +11 -5
  22. package/build/cjs/vite/sentrySolidStart.js.map +1 -1
  23. package/build/cjs/vite/sentrySolidStartVite.js +12 -4
  24. package/build/cjs/vite/sentrySolidStartVite.js.map +1 -1
  25. package/build/esm/client/sdk.js +2 -0
  26. package/build/esm/client/sdk.js.map +1 -1
  27. package/build/esm/common/tunnel.js +10 -0
  28. package/build/esm/common/tunnel.js.map +1 -0
  29. package/build/esm/config/withSentry.js +23 -3
  30. package/build/esm/config/withSentry.js.map +1 -1
  31. package/build/esm/index.server.js +6 -2
  32. package/build/esm/index.server.js.map +1 -1
  33. package/build/esm/nitro/tunnelPlugin.js +22 -0
  34. package/build/esm/nitro/tunnelPlugin.js.map +1 -0
  35. package/build/esm/package.json +1 -1
  36. package/build/esm/server/index.js +1 -1
  37. package/build/esm/vite/index.js +1 -0
  38. package/build/esm/vite/index.js.map +1 -1
  39. package/build/esm/vite/sentrySolidStart.js +12 -6
  40. package/build/esm/vite/sentrySolidStart.js.map +1 -1
  41. package/build/esm/vite/sentrySolidStartVite.js +12 -4
  42. package/build/esm/vite/sentrySolidStartVite.js.map +1 -1
  43. package/build/types/client/sdk.d.ts.map +1 -1
  44. package/build/types/common/tunnel.d.ts +9 -0
  45. package/build/types/common/tunnel.d.ts.map +1 -0
  46. package/build/types/config/types.d.ts +1 -0
  47. package/build/types/config/types.d.ts.map +1 -1
  48. package/build/types/config/withSentry.d.ts.map +1 -1
  49. package/build/types/index.server.d.ts +6 -1
  50. package/build/types/index.server.d.ts.map +1 -1
  51. package/build/types/index.types.d.ts +6 -1
  52. package/build/types/index.types.d.ts.map +1 -1
  53. package/build/types/nitro/tunnelPlugin.d.ts +7 -0
  54. package/build/types/nitro/tunnelPlugin.d.ts.map +1 -0
  55. package/build/types/server/index.d.ts +1 -1
  56. package/build/types/server/index.d.ts.map +1 -1
  57. package/build/types/vite/index.d.ts +1 -0
  58. package/build/types/vite/index.d.ts.map +1 -1
  59. package/build/types/vite/sentrySolidStart.d.ts.map +1 -1
  60. package/build/types/vite/sentrySolidStartVite.d.ts +2 -2
  61. package/build/types/vite/sentrySolidStartVite.d.ts.map +1 -1
  62. package/package.json +18 -15
package/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  <p align="center">
2
2
  <a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
3
- <img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280" height="84">
3
+ <picture>
4
+ <source srcset="https://sentry-brand.storage.googleapis.com/sentry-logo-white.png" media="(prefers-color-scheme: dark)" />
5
+ <source srcset="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" />
6
+ <img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280">
7
+ </picture>
4
8
  </a>
5
9
  </p>
6
10
 
@@ -13,7 +13,7 @@ Object.prototype.hasOwnProperty.call(solid, '__proto__') &&
13
13
  value: solid['__proto__']
14
14
  });
15
15
 
16
- Object.keys(solid).forEach(k => {
16
+ Object.keys(solid).forEach(function (k) {
17
17
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = solid[k];
18
18
  });
19
19
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  const core = require('@sentry/core');
4
+ const tunnel = require('../common/tunnel.js');
4
5
  const solid = require('@sentry/solid');
5
6
 
6
7
  function init(options) {
@@ -8,6 +9,7 @@ function init(options) {
8
9
  defaultIntegrations: getDefaultIntegrations(options),
9
10
  ...options
10
11
  };
12
+ tunnel.applyTunnelBasePath(opts);
11
13
  core.applySdkMetadata(opts, "solidstart", ["solidstart", "solid"]);
12
14
  return solid.init(opts);
13
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sources":["../../../src/client/sdk.ts"],"sourcesContent":["import type { Client, Integration } from '@sentry/core';\nimport { applySdkMetadata } from '@sentry/core';\nimport type { BrowserOptions } from '@sentry/solid';\nimport {\n browserTracingIntegration,\n getDefaultIntegrations as getDefaultSolidIntegrations,\n init as initSolidSDK,\n} from '@sentry/solid';\n\n// Treeshakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean;\n\n/**\n * Initializes the client side of the Solid Start SDK.\n */\nexport function init(options: BrowserOptions): Client | undefined {\n const opts = {\n defaultIntegrations: getDefaultIntegrations(options),\n ...options,\n };\n\n applySdkMetadata(opts, 'solidstart', ['solidstart', 'solid']);\n\n return initSolidSDK(opts);\n}\n\nfunction getDefaultIntegrations(options: BrowserOptions): Integration[] {\n const integrations = getDefaultSolidIntegrations(options);\n\n // This evaluates to true unless __SENTRY_TRACING__ is text-replaced with \"false\",\n // in which case everything inside will get tree-shaken away\n if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {\n // We add the default BrowserTracingIntegration here always.\n // We can do this, even if `solidRouterBrowserTracingIntegration` is\n // supplied as integration in `init` by users because it will win\n // over the default integration by virtue of having the same\n // `BrowserTracing` integration name and being added later.\n integrations.push(browserTracingIntegration());\n }\n\n return integrations;\n}\n"],"names":["applySdkMetadata","initSolidSDK","getDefaultSolidIntegrations","browserTracingIntegration"],"mappings":";;;;;AAeO,SAAS,KAAK,OAAA,EAA6C;AAChE,EAAA,MAAM,IAAA,GAAO;AAAA,IACX,mBAAA,EAAqB,uBAAuB,OAAO,CAAA;AAAA,IACnD,GAAG;AAAA,GACL;AAEA,EAAAA,qBAAA,CAAiB,IAAA,EAAM,YAAA,EAAc,CAAC,YAAA,EAAc,OAAO,CAAC,CAAA;AAE5D,EAAA,OAAOC,WAAa,IAAI,CAAA;AAC1B;AAEA,SAAS,uBAAuB,OAAA,EAAwC;AACtE,EAAA,MAAM,YAAA,GAAeC,6BAA4B,OAAO,CAAA;AAIxD,EAAA,IAAI,OAAO,kBAAA,KAAuB,WAAA,IAAe,kBAAA,EAAoB;AAMnE,IAAA,YAAA,CAAa,IAAA,CAAKC,iCAA2B,CAAA;AAAA,EAC/C;AAEA,EAAA,OAAO,YAAA;AACT;;;;"}
1
+ {"version":3,"file":"sdk.js","sources":["../../../src/client/sdk.ts"],"sourcesContent":["import type { Client, Integration } from '@sentry/core';\nimport { applySdkMetadata } from '@sentry/core';\nimport type { BrowserOptions } from '@sentry/solid';\nimport { applyTunnelBasePath } from '../common/tunnel';\nimport {\n browserTracingIntegration,\n getDefaultIntegrations as getDefaultSolidIntegrations,\n init as initSolidSDK,\n} from '@sentry/solid';\n\n// Treeshakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean;\n\n/**\n * Initializes the client side of the Solid Start SDK.\n */\nexport function init(options: BrowserOptions): Client | undefined {\n const opts = {\n defaultIntegrations: getDefaultIntegrations(options),\n ...options,\n };\n\n applyTunnelBasePath(opts);\n applySdkMetadata(opts, 'solidstart', ['solidstart', 'solid']);\n\n return initSolidSDK(opts);\n}\n\nfunction getDefaultIntegrations(options: BrowserOptions): Integration[] {\n const integrations = getDefaultSolidIntegrations(options);\n\n // This evaluates to true unless __SENTRY_TRACING__ is text-replaced with \"false\",\n // in which case everything inside will get tree-shaken away\n if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {\n // We add the default BrowserTracingIntegration here always.\n // We can do this, even if `solidRouterBrowserTracingIntegration` is\n // supplied as integration in `init` by users because it will win\n // over the default integration by virtue of having the same\n // `BrowserTracing` integration name and being added later.\n integrations.push(browserTracingIntegration());\n }\n\n return integrations;\n}\n"],"names":["applyTunnelBasePath","applySdkMetadata","initSolidSDK","getDefaultSolidIntegrations","browserTracingIntegration"],"mappings":";;;;;;AAgBO,SAAS,KAAK,OAAA,EAA6C;AAChE,EAAA,MAAM,IAAA,GAAO;AAAA,IACX,mBAAA,EAAqB,uBAAuB,OAAO,CAAA;AAAA,IACnD,GAAG;AAAA,GACL;AAEA,EAAAA,0BAAA,CAAoB,IAAI,CAAA;AACxB,EAAAC,qBAAA,CAAiB,IAAA,EAAM,YAAA,EAAc,CAAC,YAAA,EAAc,OAAO,CAAC,CAAA;AAE5D,EAAA,OAAOC,WAAa,IAAI,CAAA;AAC1B;AAEA,SAAS,uBAAuB,OAAA,EAAwC;AACtE,EAAA,MAAM,YAAA,GAAeC,6BAA4B,OAAO,CAAA;AAIxD,EAAA,IAAI,OAAO,kBAAA,KAAuB,WAAA,IAAe,kBAAA,EAAoB;AAMnE,IAAA,YAAA,CAAa,IAAA,CAAKC,iCAA2B,CAAA;AAAA,EAC/C;AAEA,EAAA,OAAO,YAAA;AACT;;;;"}
@@ -11,7 +11,7 @@ Object.prototype.hasOwnProperty.call(solidrouter, '__proto__') &&
11
11
  value: solidrouter['__proto__']
12
12
  });
13
13
 
14
- Object.keys(solidrouter).forEach(k => {
14
+ Object.keys(solidrouter).forEach(function (k) {
15
15
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = solidrouter[k];
16
16
  });
17
17
  //# sourceMappingURL=solidrouter.js.map
@@ -0,0 +1,13 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const core = require('@sentry/core');
4
+
5
+ const TUNNEL_BASE_PATH_GLOBAL = "__sentry_solidstart_base_path";
6
+ function applyTunnelBasePath(options) {
7
+ const basePath = typeof __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__ !== "undefined" ? __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__ : "";
8
+ options.tunnel = core._INTERNAL_applyTunnelDefaults(options.tunnel, { basePath });
9
+ }
10
+
11
+ exports.TUNNEL_BASE_PATH_GLOBAL = TUNNEL_BASE_PATH_GLOBAL;
12
+ exports.applyTunnelBasePath = applyTunnelBasePath;
13
+ //# sourceMappingURL=tunnel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tunnel.js","sources":["../../../src/common/tunnel.ts"],"sourcesContent":["import type { Options } from '@sentry/core';\nimport { _INTERNAL_applyTunnelDefaults as applyTunnelDefaults } from '@sentry/core';\n\n/** Set on the server by `withSentry` to the app's `server.baseURL`. */\nexport const TUNNEL_BASE_PATH_GLOBAL = '__sentry_solidstart_base_path';\n\ndeclare const __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__: string | undefined;\n\n/**\n * Serves the browser's managed tunnel under the app's base path, which `withSentry` (SolidStart 1) or\n * `sentrySolidStart` (SolidStart 2) defines at build time. A `basePath` the user set wins.\n */\nexport function applyTunnelBasePath(options: Pick<Options, 'tunnel'>): void {\n const basePath =\n typeof __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__ !== 'undefined' ? __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__ : '';\n options.tunnel = applyTunnelDefaults(options.tunnel, { basePath });\n}\n"],"names":["applyTunnelDefaults"],"mappings":";;;;AAIO,MAAM,uBAAA,GAA0B;AAQhC,SAAS,oBAAoB,OAAA,EAAwC;AAC1E,EAAA,MAAM,QAAA,GACJ,OAAO,sCAAA,KAA2C,WAAA,GAAc,sCAAA,GAAyC,EAAA;AAC3G,EAAA,OAAA,CAAQ,SAASA,kCAAA,CAAoB,OAAA,CAAQ,MAAA,EAAQ,EAAE,UAAU,CAAA;AACnE;;;;;"}
@@ -1,11 +1,14 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
+ const node_url = require('node:url');
3
4
  const core = require('@sentry/core');
4
5
  const config = require('@sentry/server-utils/orchestrion/config');
5
6
  const rollup = require('@sentry/server-utils/orchestrion/rollup');
7
+ const tunnel = require('../common/tunnel.js');
6
8
  const sentrySolidStartVite = require('../vite/sentrySolidStartVite.js');
7
9
  const addInstrumentation = require('./addInstrumentation.js');
8
10
 
11
+ var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
9
12
  const IORedisDependencies = ["standard-as-callback"];
10
13
  const defaultSentrySolidStartPluginOptions = {
11
14
  experimental_entrypointWrappedFunctions: ["default", "handler", "server"]
@@ -16,12 +19,24 @@ function withSentry(solidStartConfig = {}, sentrySolidStartPluginOptions) {
16
19
  ...defaultSentrySolidStartPluginOptions
17
20
  };
18
21
  const server = solidStartConfig.server || {};
22
+ const tunnelBasePath = core._INTERNAL_normalizeTunnelBasePath(
23
+ server.baseURL
24
+ );
25
+ if (tunnelBasePath) {
26
+ core.GLOBAL_OBJ[tunnel.TUNNEL_BASE_PATH_GLOBAL] = tunnelBasePath;
27
+ }
19
28
  const viteConfig = solidStartConfig.vite;
20
- const vite = typeof viteConfig === "function" ? (...args) => sentrySolidStartVite.addSentryPluginToVite(viteConfig(...args), sentryPluginOptions) : sentrySolidStartVite.addSentryPluginToVite(viteConfig, sentryPluginOptions);
29
+ const vite = typeof viteConfig === "function" ? (...args) => sentrySolidStartVite.addSentryPluginToVite(viteConfig(...args), sentryPluginOptions, tunnelBasePath) : sentrySolidStartVite.addSentryPluginToVite(viteConfig, sentryPluginOptions, tunnelBasePath);
21
30
  const addBuildTimeInstrumentation = sentryPluginOptions.buildTimeInstrumentation !== false;
22
31
  const sentryNitroModule = (nitro) => {
23
32
  nitro.hooks.hook("rollup:before", async (nitro2, rollupConfig) => {
24
33
  const sentryRollupConfig = rollupConfig;
34
+ if (tunnelBasePath) {
35
+ sentryRollupConfig.plugins.push({
36
+ name: "sentry-solidstart-tunnel-base-path",
37
+ banner: `globalThis.${tunnel.TUNNEL_BASE_PATH_GLOBAL} = ${JSON.stringify(tunnelBasePath)};`
38
+ });
39
+ }
25
40
  if (addBuildTimeInstrumentation) {
26
41
  sentryRollupConfig.plugins.push(
27
42
  rollup.sentryOrchestrionPlugin({ buildTimeInstrumentation: sentryPluginOptions.buildTimeInstrumentation }),
@@ -63,10 +78,16 @@ function withSentry(solidStartConfig = {}, sentrySolidStartPluginOptions) {
63
78
  ...server,
64
79
  externals,
65
80
  commonJS,
66
- modules: [...existingModules, sentryNitroModule]
81
+ modules: [...existingModules, sentryNitroModule],
82
+ // Through `server.plugins`, since vinxi's dev server ignores plugins that Nitro modules add.
83
+ plugins: [...server.plugins || [], getTunnelPluginPath()]
67
84
  }
68
85
  };
69
86
  }
87
+ function getTunnelPluginPath() {
88
+ const url = new URL("../nitro/tunnelPlugin.js", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('config/withSentry.js', document.baseURI).href)));
89
+ return url.protocol === "file:" ? node_url.fileURLToPath(url) : url.pathname;
90
+ }
70
91
 
71
92
  exports.withSentry = withSentry;
72
93
  //# sourceMappingURL=withSentry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"withSentry.js","sources":["../../../src/config/withSentry.ts"],"sourcesContent":["import { debug } from '@sentry/core';\nimport { INSTRUMENTED_MODULE_NAMES } from '@sentry/server-utils/orchestrion/config';\nimport {\n commonJSInteropOptions,\n sentryCommonJSInteropPlugin,\n sentryOrchestrionPlugin,\n} from '@sentry/server-utils/orchestrion/rollup';\nimport type { Nitro, NitroConfig } 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\n// ioredis requires this CommonJS helper to be bundled with it. Leaving it\n// external makes Nitro resolve the default export as a namespace object.\nconst IORedisDependencies = ['standard-as-callback'];\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 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 const addBuildTimeInstrumentation = sentryPluginOptions.buildTimeInstrumentation !== false;\n\n // Use a module so we don't override preset hooks.\n const sentryNitroModule = (nitro: Nitro) => {\n nitro.hooks.hook('rollup:before', async (nitro, rollupConfig) => {\n // Nitro types the `rollup:before` hook's `rollupConfig.plugins` as `string[]` (plugin paths),\n // but at runtime it holds resolved plugin objects we can push onto, so narrow to our own shape.\n const sentryRollupConfig = rollupConfig as unknown as RollupConfig;\n\n if (addBuildTimeInstrumentation) {\n sentryRollupConfig.plugins.push(\n sentryOrchestrionPlugin({ buildTimeInstrumentation: sentryPluginOptions.buildTimeInstrumentation }),\n sentryCommonJSInteropPlugin(),\n );\n }\n\n if (sentrySolidStartPluginOptions?.autoInjectServerSentry === 'experimental_dynamic-import') {\n await addDynamicImportEntryFileWrapper({\n nitro,\n rollupConfig: sentryRollupConfig,\n sentryPluginOptions,\n });\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 };\n\n const existingModules = (server as SolidStartInlineServerConfig & { modules?: unknown[] }).modules || [];\n\n // An externalized dependency never passes through the orchestrion code transform, so force-inline\n // the instrumented modules. This has to be set statically on the Nitro config (not in a hook)\n // because externalization is a resolution-time decision made before Rollup normalizes `external`.\n let externals = (server as SolidStartInlineServerConfig & { externals?: { inline?: string[] } }).externals;\n let commonJS = (server as SolidStartInlineServerConfig & { commonJS?: NitroConfig['commonJS'] }).commonJS;\n if (addBuildTimeInstrumentation) {\n const existingInline = externals?.inline || [];\n externals = {\n ...externals,\n inline: [...new Set([...existingInline, ...INSTRUMENTED_MODULE_NAMES, ...IORedisDependencies])],\n };\n\n // The inlined drivers `require()` CommonJS dependencies that stay external. Fix the interop\n // for those requires (see `commonJSInteropOptions`). User-provided options win.\n commonJS = { ...commonJSInteropOptions(), ...commonJS };\n }\n\n return {\n ...solidStartConfig,\n vite,\n server: {\n ...server,\n externals,\n commonJS,\n modules: [...existingModules, sentryNitroModule],\n },\n };\n}\n"],"names":["addSentryPluginToVite","nitro","sentryOrchestrionPlugin","sentryCommonJSInteropPlugin","addDynamicImportEntryFileWrapper","debug","addInstrumentationFileToBuild","addSentryTopImport","INSTRUMENTED_MODULE_NAMES","commonJSInteropOptions"],"mappings":";;;;;;;;AAmBA,MAAM,mBAAA,GAAsB,CAAC,sBAAsB,CAAA;AAEnD,MAAM,oCAAA,GAIuF;AAAA,EAC3F,uCAAA,EAAyC,CAAC,SAAA,EAAW,SAAA,EAAW,QAAQ;AAC1E,CAAA;AAWO,SAAS,UAAA,CACd,gBAAA,GAA2C,EAAC,EAC5C,6BAAA,EACwB;AACxB,EAAA,MAAM,mBAAA,GAAsB;AAAA,IAC1B,GAAG,6BAAA;AAAA,IACH,GAAG;AAAA,GACL;AAEA,EAAA,MAAM,MAAA,GAAU,gBAAA,CAAiB,MAAA,IAAU,EAAC;AAC5C,EAAA,MAAM,aAAa,gBAAA,CAAiB,IAAA;AACpC,EAAA,MAAM,IAAA,GACJ,OAAO,UAAA,KAAe,UAAA,GAClB,IAAI,IAAA,KAAwCA,0CAAA,CAAsB,UAAA,CAAW,GAAG,IAAI,CAAA,EAAG,mBAAmB,CAAA,GAC1GA,0CAAA,CAAsB,YAAY,mBAAmB,CAAA;AAE3D,EAAA,MAAM,2BAAA,GAA8B,oBAAoB,wBAAA,KAA6B,KAAA;AAGrF,EAAA,MAAM,iBAAA,GAAoB,CAAC,KAAA,KAAiB;AAC1C,IAAA,KAAA,CAAM,KAAA,CAAM,IAAA,CAAK,eAAA,EAAiB,OAAOC,QAAO,YAAA,KAAiB;AAG/D,MAAA,MAAM,kBAAA,GAAqB,YAAA;AAE3B,MAAA,IAAI,2BAAA,EAA6B;AAC/B,QAAA,kBAAA,CAAmB,OAAA,CAAQ,IAAA;AAAA,UACzBC,8BAAA,CAAwB,EAAE,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AA,MACA,OAAA,EAAS,CAAC,GAAG,eAAA,EAAiB,iBAAiB;AAAA;AACjD,GACF;AACF;;;;"}
1
+ {"version":3,"file":"withSentry.js","sources":["../../../src/config/withSentry.ts"],"sourcesContent":["import { fileURLToPath } from 'node:url';\nimport { debug, GLOBAL_OBJ, _INTERNAL_normalizeTunnelBasePath as normalizeTunnelBasePath } from '@sentry/core';\nimport { INSTRUMENTED_MODULE_NAMES } from '@sentry/server-utils/orchestrion/config';\nimport {\n commonJSInteropOptions,\n sentryCommonJSInteropPlugin,\n sentryOrchestrionPlugin,\n} from '@sentry/server-utils/orchestrion/rollup';\nimport type { Nitro, NitroConfig } from 'nitropack';\nimport { TUNNEL_BASE_PATH_GLOBAL } from '../common/tunnel';\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\n// ioredis requires this CommonJS helper to be bundled with it. Leaving it\n// external makes Nitro resolve the default export as a namespace object.\nconst IORedisDependencies = ['standard-as-callback'];\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 // Requests reach the tunnel with `server.baseURL` still in front, so both sides serve it under that.\n const tunnelBasePath = normalizeTunnelBasePath(\n (server as SolidStartInlineServerConfig & { baseURL?: string }).baseURL,\n );\n // vinxi's dev server runs Nitro in this process, so the tunnel plugin can read it from here in dev.\n if (tunnelBasePath) {\n (GLOBAL_OBJ as { [TUNNEL_BASE_PATH_GLOBAL]?: string })[TUNNEL_BASE_PATH_GLOBAL] = tunnelBasePath;\n }\n\n const viteConfig = solidStartConfig.vite;\n const vite =\n typeof viteConfig === 'function'\n ? (...args: Parameters<typeof viteConfig>) =>\n addSentryPluginToVite(viteConfig(...args), sentryPluginOptions, tunnelBasePath)\n : addSentryPluginToVite(viteConfig, sentryPluginOptions, tunnelBasePath);\n\n const addBuildTimeInstrumentation = sentryPluginOptions.buildTimeInstrumentation !== false;\n\n // Use a module so we don't override preset hooks.\n const sentryNitroModule = (nitro: Nitro) => {\n nitro.hooks.hook('rollup:before', async (nitro, rollupConfig) => {\n // Nitro types the `rollup:before` hook's `rollupConfig.plugins` as `string[]` (plugin paths),\n // but at runtime it holds resolved plugin objects we can push onto, so narrow to our own shape.\n const sentryRollupConfig = rollupConfig as unknown as RollupConfig;\n\n if (tunnelBasePath) {\n // The built server runs in another process, so the tunnel plugin reads the base path from the bundle.\n sentryRollupConfig.plugins.push({\n name: 'sentry-solidstart-tunnel-base-path',\n banner: `globalThis.${TUNNEL_BASE_PATH_GLOBAL} = ${JSON.stringify(tunnelBasePath)};`,\n });\n }\n\n if (addBuildTimeInstrumentation) {\n sentryRollupConfig.plugins.push(\n sentryOrchestrionPlugin({ buildTimeInstrumentation: sentryPluginOptions.buildTimeInstrumentation }),\n sentryCommonJSInteropPlugin(),\n );\n }\n\n if (sentrySolidStartPluginOptions?.autoInjectServerSentry === 'experimental_dynamic-import') {\n await addDynamicImportEntryFileWrapper({\n nitro,\n rollupConfig: sentryRollupConfig,\n sentryPluginOptions,\n });\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 };\n\n const existingModules = (server as SolidStartInlineServerConfig & { modules?: unknown[] }).modules || [];\n\n // An externalized dependency never passes through the orchestrion code transform, so force-inline\n // the instrumented modules. This has to be set statically on the Nitro config (not in a hook)\n // because externalization is a resolution-time decision made before Rollup normalizes `external`.\n let externals = (server as SolidStartInlineServerConfig & { externals?: { inline?: string[] } }).externals;\n let commonJS = (server as SolidStartInlineServerConfig & { commonJS?: NitroConfig['commonJS'] }).commonJS;\n if (addBuildTimeInstrumentation) {\n const existingInline = externals?.inline || [];\n externals = {\n ...externals,\n inline: [...new Set([...existingInline, ...INSTRUMENTED_MODULE_NAMES, ...IORedisDependencies])],\n };\n\n // The inlined drivers `require()` CommonJS dependencies that stay external. Fix the interop\n // for those requires (see `commonJSInteropOptions`). User-provided options win.\n commonJS = { ...commonJSInteropOptions(), ...commonJS };\n }\n\n return {\n ...solidStartConfig,\n vite,\n server: {\n ...server,\n externals,\n commonJS,\n modules: [...existingModules, sentryNitroModule],\n // Through `server.plugins`, since vinxi's dev server ignores plugins that Nitro modules add.\n plugins: [...(server.plugins || []), getTunnelPluginPath()],\n },\n };\n}\n\nfunction getTunnelPluginPath(): string {\n const url = new URL('../nitro/tunnelPlugin.js', import.meta.url);\n\n // `import.meta.url` is a file URL in the built package, but not in every test environment.\n return url.protocol === 'file:' ? fileURLToPath(url) : url.pathname;\n}\n"],"names":["normalizeTunnelBasePath","GLOBAL_OBJ","TUNNEL_BASE_PATH_GLOBAL","addSentryPluginToVite","nitro","sentryOrchestrionPlugin","sentryCommonJSInteropPlugin","addDynamicImportEntryFileWrapper","debug","addInstrumentationFileToBuild","addSentryTopImport","INSTRUMENTED_MODULE_NAMES","commonJSInteropOptions","fileURLToPath"],"mappings":";;;;;;;;;;;AAqBA,MAAM,mBAAA,GAAsB,CAAC,sBAAsB,CAAA;AAEnD,MAAM,oCAAA,GAIuF;AAAA,EAC3F,uCAAA,EAAyC,CAAC,SAAA,EAAW,SAAA,EAAW,QAAQ;AAC1E,CAAA;AAWO,SAAS,UAAA,CACd,gBAAA,GAA2C,EAAC,EAC5C,6BAAA,EACwB;AACxB,EAAA,MAAM,mBAAA,GAAsB;AAAA,IAC1B,GAAG,6BAAA;AAAA,IACH,GAAG;AAAA,GACL;AAEA,EAAA,MAAM,MAAA,GAAU,gBAAA,CAAiB,MAAA,IAAU,EAAC;AAE5C,EAAA,MAAM,cAAA,GAAiBA,sCAAA;AAAA,IACpB,MAAA,CAA+D;AAAA,GAClE;AAEA,EAAA,IAAI,cAAA,EAAgB;AAClB,IAACC,eAAA,CAAsDC,8BAAuB,CAAA,GAAI,cAAA;AAAA,EACpF;AAEA,EAAA,MAAM,aAAa,gBAAA,CAAiB,IAAA;AACpC,EAAA,MAAM,OACJ,OAAO,UAAA,KAAe,UAAA,GAClB,CAAA,GAAI,SACFC,0CAAA,CAAsB,UAAA,CAAW,GAAG,IAAI,GAAG,mBAAA,EAAqB,cAAc,IAChFA,0CAAA,CAAsB,UAAA,EAAY,qBAAqB,cAAc,CAAA;AAE3E,EAAA,MAAM,2BAAA,GAA8B,oBAAoB,wBAAA,KAA6B,KAAA;AAGrF,EAAA,MAAM,iBAAA,GAAoB,CAAC,KAAA,KAAiB;AAC1C,IAAA,KAAA,CAAM,KAAA,CAAM,IAAA,CAAK,eAAA,EAAiB,OAAOC,QAAO,YAAA,KAAiB;AAG/D,MAAA,MAAM,kBAAA,GAAqB,YAAA;AAE3B,MAAA,IAAI,cAAA,EAAgB;AAElB,QAAA,kBAAA,CAAmB,QAAQ,IAAA,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AAA,EAA2B,GAAG,mBAAmB,CAAC,CAAC;AAAA,KAChG;AAIA,IAAA,QAAA,GAAW,EAAE,GAAGC,6BAAA,EAAuB,EAAG,GAAG,QAAA,EAAS;AAAA,EACxD;AAEA,EAAA,OAAO;AAAA,IACL,GAAG,gBAAA;AAAA,IACH,IAAA;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,GAAG,MAAA;AAAA,MACH,SAAA;AAAA,MACA,QAAA;AAAA,MACA,OAAA,EAAS,CAAC,GAAG,eAAA,EAAiB,iBAAiB,CAAA;AAAA;AAAA,MAE/C,OAAA,EAAS,CAAC,GAAI,MAAA,CAAO,WAAW,EAAC,EAAI,qBAAqB;AAAA;AAC5D,GACF;AACF;AAEA,SAAS,mBAAA,GAA8B;AACrC,EAAA,MAAM,GAAA,GAAM,IAAI,GAAA,CAAI,0BAAA,EAA4B,sQAAe,CAAA;AAG/D,EAAA,OAAO,IAAI,QAAA,KAAa,OAAA,GAAUC,sBAAA,CAAc,GAAG,IAAI,GAAA,CAAI,QAAA;AAC7D;;;;"}
@@ -13,7 +13,7 @@ Object.prototype.hasOwnProperty.call(solid, '__proto__') &&
13
13
  value: solid['__proto__']
14
14
  });
15
15
 
16
- Object.keys(solid).forEach(k => {
16
+ Object.keys(solid).forEach(function (k) {
17
17
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = solid[k];
18
18
  });
19
19
  //# sourceMappingURL=index.client.js.map
@@ -1,13 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
+ const withSentry$1 = require('./config/withSentry.js');
3
4
  const node = require('@sentry/node');
4
5
  const solid = require('@sentry/solid');
5
6
  const sdk = require('./server/sdk.js');
6
7
  const withServerActionInstrumentation = require('./server/withServerActionInstrumentation.js');
7
8
  const middleware = require('./server/middleware.js');
8
- const withSentry = require('./config/withSentry.js');
9
-
10
9
 
10
+ const withSentry = withSentry$1.withSentry;
11
11
 
12
12
  exports.NodeClient = node.NodeClient;
13
13
  exports.SDK_VERSION = node.SDK_VERSION;
@@ -38,6 +38,7 @@ exports.createGetModuleFromFilename = node.createGetModuleFromFilename;
38
38
  exports.createSentryWinstonTransport = node.createSentryWinstonTransport;
39
39
  exports.createTransport = node.createTransport;
40
40
  exports.cron = node.cron;
41
+ exports.cronJobIntegration = node.cronJobIntegration;
41
42
  exports.dedupeIntegration = node.dedupeIntegration;
42
43
  exports.defaultStackParser = node.defaultStackParser;
43
44
  exports.disableAnrDetectionForCallback = node.disableAnrDetectionForCallback;
@@ -61,7 +62,10 @@ exports.getRootSpan = node.getRootSpan;
61
62
  exports.getSentryRelease = node.getSentryRelease;
62
63
  exports.getSpanDescendants = node.getSpanDescendants;
63
64
  exports.getSpanStatusFromHttpCode = node.getSpanStatusFromHttpCode;
65
+ exports.getTunnelPath = node.getTunnelPath;
64
66
  exports.graphqlIntegration = node.graphqlIntegration;
67
+ exports.handleTunnelRequest = node.handleTunnelRequest;
68
+ exports.handleTunnelRequestIfMatched = node.handleTunnelRequestIfMatched;
65
69
  exports.hapiIntegration = node.hapiIntegration;
66
70
  exports.honoIntegration = node.honoIntegration;
67
71
  exports.honoMiddleware = node.honoMiddleware;
@@ -72,6 +76,7 @@ exports.initOpenTelemetry = node.initOpenTelemetry;
72
76
  exports.instrumentSupabaseClient = node.instrumentSupabaseClient;
73
77
  exports.isEnabled = node.isEnabled;
74
78
  exports.isInitialized = node.isInitialized;
79
+ exports.isTunnelRequest = node.isTunnelRequest;
75
80
  exports.kafkaIntegration = node.kafkaIntegration;
76
81
  exports.knexIntegration = node.knexIntegration;
77
82
  exports.koaIntegration = node.koaIntegration;
@@ -89,6 +94,8 @@ exports.nativeNodeFetchIntegration = node.nativeNodeFetchIntegration;
89
94
  exports.neonIntegration = node.neonIntegration;
90
95
  exports.nitroIntegration = node.nitroIntegration;
91
96
  exports.nodeContextIntegration = node.nodeContextIntegration;
97
+ exports.nodeCronIntegration = node.nodeCronIntegration;
98
+ exports.nodeScheduleIntegration = node.nodeScheduleIntegration;
92
99
  exports.onUncaughtExceptionIntegration = node.onUncaughtExceptionIntegration;
93
100
  exports.onUnhandledRejectionIntegration = node.onUnhandledRejectionIntegration;
94
101
  exports.parameterize = node.parameterize;
@@ -98,6 +105,7 @@ exports.prismaIntegration = node.prismaIntegration;
98
105
  exports.redisIntegration = node.redisIntegration;
99
106
  exports.requestDataIntegration = node.requestDataIntegration;
100
107
  exports.rewriteFramesIntegration = node.rewriteFramesIntegration;
108
+ exports.serveTunnelIntegration = node.serveTunnelIntegration;
101
109
  exports.setAttribute = node.setAttribute;
102
110
  exports.setAttributes = node.setAttributes;
103
111
  exports.setContext = node.setContext;
@@ -139,7 +147,7 @@ exports.withSentryErrorBoundary = solid.withSentryErrorBoundary;
139
147
  exports.init = sdk.init;
140
148
  exports.withServerActionInstrumentation = withServerActionInstrumentation.withServerActionInstrumentation;
141
149
  exports.sentryBeforeResponseMiddleware = middleware.sentryBeforeResponseMiddleware;
142
- exports.withSentry = withSentry.withSentry;
150
+ exports.withSentry = withSentry;
143
151
  Object.prototype.hasOwnProperty.call(node, '__proto__') &&
144
152
  !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
145
153
  Object.defineProperty(exports, '__proto__', {
@@ -147,7 +155,7 @@ Object.prototype.hasOwnProperty.call(node, '__proto__') &&
147
155
  value: node['__proto__']
148
156
  });
149
157
 
150
- Object.keys(node).forEach(k => {
158
+ Object.keys(node).forEach(function (k) {
151
159
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = node[k];
152
160
  });
153
161
  //# sourceMappingURL=index.server.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.server.js","sources":["../../src/index.server.ts"],"sourcesContent":["import { withSentry as _withSentry } from './config';\n\nexport * from './server';\n\n/**\n * @deprecated Import `withSentry` from `@sentry/solidstart/vite` instead.\n * This export will be removed in the next major version.\n */\nexport const withSentry = _withSentry;\n"],"names":["_withSentry"],"mappings":";;;;;;;;;AAQO,MAAM,UAAA,GAAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,22 @@
1
+ const core = require('@sentry/core');
2
+ const server = require('@sentry/core/server');
3
+ const h3 = require('h3');
4
+ const tunnel = require('../common/tunnel.js');
5
+
6
+ const tunnelPlugin = ((nitroApp) => {
7
+ server._INTERNAL_setManagedTunnelDefaults({
8
+ basePath: core.GLOBAL_OBJ[tunnel.TUNNEL_BASE_PATH_GLOBAL]
9
+ });
10
+ nitroApp.h3App.stack.unshift({
11
+ route: "",
12
+ handler: h3.eventHandler((event) => {
13
+ if (!server._INTERNAL_isServedTunnelRequest({ method: event.method, url: event.path })) {
14
+ return void 0;
15
+ }
16
+ return server._INTERNAL_handleServedTunnelRequest(h3.toWebRequest(event));
17
+ })
18
+ });
19
+ });
20
+
21
+ module.exports = tunnelPlugin;
22
+ //# sourceMappingURL=tunnelPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tunnelPlugin.js","sources":["../../../src/nitro/tunnelPlugin.ts"],"sourcesContent":["import { GLOBAL_OBJ } from '@sentry/core';\nimport {\n _INTERNAL_handleServedTunnelRequest as handleServedTunnelRequest,\n _INTERNAL_isServedTunnelRequest as isServedTunnelRequest,\n _INTERNAL_setManagedTunnelDefaults as setManagedTunnelDefaults,\n} from '@sentry/core/server';\nimport { eventHandler, toWebRequest } from 'h3';\nimport type { NitroAppPlugin } from 'nitropack';\nimport { TUNNEL_BASE_PATH_GLOBAL } from '../common/tunnel';\n\n/**\n * Answers managed tunnel requests on SolidStart v1 (Nitro v2), from the first layer of the h3 app. That runs before\n * route rules, the app's middleware and routing. `withSentry` registers it.\n */\nexport default (nitroApp => {\n // The first layer sees the path before Nitro strips `server.baseURL`, so the tunnel is served under it. The server\n // bundle's banner sets the global before this plugin runs.\n setManagedTunnelDefaults({\n basePath: (GLOBAL_OBJ as { [TUNNEL_BASE_PATH_GLOBAL]?: string })[TUNNEL_BASE_PATH_GLOBAL],\n });\n\n // Not the `request` hook: h3 still runs the first layer after a hook answered, so route rules would act on the\n // sent response.\n nitroApp.h3App.stack.unshift({\n route: '',\n handler: eventHandler(event => {\n // Checked on the method and path first, so no other request's body gets wrapped in a web `Request`.\n if (!isServedTunnelRequest({ method: event.method, url: event.path })) {\n return undefined;\n }\n\n // `toWebRequest` also reads the body of the mock requests serverless presets pass through `localFetch`, which\n // aren't Node streams. A returned `Response` is sent and ends the request, `undefined` hands it on.\n return handleServedTunnelRequest(toWebRequest(event));\n }),\n });\n}) satisfies NitroAppPlugin;\n"],"names":["setManagedTunnelDefaults","GLOBAL_OBJ","TUNNEL_BASE_PATH_GLOBAL","eventHandler","isServedTunnelRequest","handleServedTunnelRequest","toWebRequest"],"mappings":";;;;;AAcA,qBAAA,CAAgB,CAAA,QAAA,KAAY;AAG1B,EAAAA,yCAAA,CAAyB;AAAA,IACvB,QAAA,EAAWC,gBAAsDC,8BAAuB;AAAA,GACzF,CAAA;AAID,EAAA,QAAA,CAAS,KAAA,CAAM,MAAM,OAAA,CAAQ;AAAA,IAC3B,KAAA,EAAO,EAAA;AAAA,IACP,OAAA,EAASC,gBAAa,CAAA,KAAA,KAAS;AAE7B,MAAA,IAAI,CAACC,sCAAA,CAAsB,EAAE,MAAA,EAAQ,KAAA,CAAM,QAAQ,GAAA,EAAK,KAAA,CAAM,IAAA,EAAM,CAAA,EAAG;AACrE,QAAA,OAAO,MAAA;AAAA,MACT;AAIA,MAAA,OAAOC,0CAAA,CAA0BC,eAAA,CAAa,KAAK,CAAC,CAAA;AAAA,IACtD,CAAC;AAAA,GACF,CAAA;AACH,CAAA;;;;"}
@@ -37,6 +37,7 @@ exports.createGetModuleFromFilename = node.createGetModuleFromFilename;
37
37
  exports.createSentryWinstonTransport = node.createSentryWinstonTransport;
38
38
  exports.createTransport = node.createTransport;
39
39
  exports.cron = node.cron;
40
+ exports.cronJobIntegration = node.cronJobIntegration;
40
41
  exports.dedupeIntegration = node.dedupeIntegration;
41
42
  exports.defaultStackParser = node.defaultStackParser;
42
43
  exports.disableAnrDetectionForCallback = node.disableAnrDetectionForCallback;
@@ -60,7 +61,10 @@ exports.getRootSpan = node.getRootSpan;
60
61
  exports.getSentryRelease = node.getSentryRelease;
61
62
  exports.getSpanDescendants = node.getSpanDescendants;
62
63
  exports.getSpanStatusFromHttpCode = node.getSpanStatusFromHttpCode;
64
+ exports.getTunnelPath = node.getTunnelPath;
63
65
  exports.graphqlIntegration = node.graphqlIntegration;
66
+ exports.handleTunnelRequest = node.handleTunnelRequest;
67
+ exports.handleTunnelRequestIfMatched = node.handleTunnelRequestIfMatched;
64
68
  exports.hapiIntegration = node.hapiIntegration;
65
69
  exports.honoIntegration = node.honoIntegration;
66
70
  exports.honoMiddleware = node.honoMiddleware;
@@ -71,6 +75,7 @@ exports.initOpenTelemetry = node.initOpenTelemetry;
71
75
  exports.instrumentSupabaseClient = node.instrumentSupabaseClient;
72
76
  exports.isEnabled = node.isEnabled;
73
77
  exports.isInitialized = node.isInitialized;
78
+ exports.isTunnelRequest = node.isTunnelRequest;
74
79
  exports.kafkaIntegration = node.kafkaIntegration;
75
80
  exports.knexIntegration = node.knexIntegration;
76
81
  exports.koaIntegration = node.koaIntegration;
@@ -88,6 +93,8 @@ exports.nativeNodeFetchIntegration = node.nativeNodeFetchIntegration;
88
93
  exports.neonIntegration = node.neonIntegration;
89
94
  exports.nitroIntegration = node.nitroIntegration;
90
95
  exports.nodeContextIntegration = node.nodeContextIntegration;
96
+ exports.nodeCronIntegration = node.nodeCronIntegration;
97
+ exports.nodeScheduleIntegration = node.nodeScheduleIntegration;
91
98
  exports.onUncaughtExceptionIntegration = node.onUncaughtExceptionIntegration;
92
99
  exports.onUnhandledRejectionIntegration = node.onUnhandledRejectionIntegration;
93
100
  exports.parameterize = node.parameterize;
@@ -97,6 +104,7 @@ exports.prismaIntegration = node.prismaIntegration;
97
104
  exports.redisIntegration = node.redisIntegration;
98
105
  exports.requestDataIntegration = node.requestDataIntegration;
99
106
  exports.rewriteFramesIntegration = node.rewriteFramesIntegration;
107
+ exports.serveTunnelIntegration = node.serveTunnelIntegration;
100
108
  exports.setAttribute = node.setAttribute;
101
109
  exports.setAttributes = node.setAttributes;
102
110
  exports.setContext = node.setContext;
@@ -145,7 +153,7 @@ Object.prototype.hasOwnProperty.call(node, '__proto__') &&
145
153
  value: node['__proto__']
146
154
  });
147
155
 
148
- Object.keys(node).forEach(k => {
156
+ Object.keys(node).forEach(function (k) {
149
157
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = node[k];
150
158
  });
151
159
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -11,7 +11,7 @@ Object.prototype.hasOwnProperty.call(solidrouter, '__proto__') &&
11
11
  value: solidrouter['__proto__']
12
12
  });
13
13
 
14
- Object.keys(solidrouter).forEach(k => {
14
+ Object.keys(solidrouter).forEach(function (k) {
15
15
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = solidrouter[k];
16
16
  });
17
17
  //# sourceMappingURL=solidrouter.client.js.map
@@ -13,7 +13,7 @@ Object.prototype.hasOwnProperty.call(solidrouter, '__proto__') &&
13
13
  value: solidrouter['__proto__']
14
14
  });
15
15
 
16
- Object.keys(solidrouter).forEach(k => {
16
+ Object.keys(solidrouter).forEach(function (k) {
17
17
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = solidrouter[k];
18
18
  });
19
19
  //# sourceMappingURL=solidrouter.js.map
@@ -1,8 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  const sentrySolidStart = require('./sentrySolidStart.js');
4
+ const withSentry = require('../config/withSentry.js');
4
5
 
5
6
 
6
7
 
7
8
  exports.sentrySolidStart = sentrySolidStart.sentrySolidStart;
9
+ exports.withSentry = withSentry.withSentry;
8
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -23,12 +23,18 @@ function makeSentryNitroPlugin(options) {
23
23
  enforce: "pre",
24
24
  config(userConfig) {
25
25
  const userNitro = userConfig.nitro;
26
+ const tunnelBasePath = core._INTERNAL_normalizeTunnelBasePath(userConfig.server?.baseURL || userConfig.base);
26
27
  return {
27
- nitro: nitro.setupSentryNitroModule(
28
- // `sourcemap` decides whether Sentry enables its own; `tracingChannel` is left as the user set it.
29
- { sourcemap: userNitro?.sourcemap, tracingChannel: userNitro?.tracingChannel },
30
- options
31
- )
28
+ define: { __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__: JSON.stringify(tunnelBasePath) },
29
+ nitro: {
30
+ ...nitro.setupSentryNitroModule(
31
+ // `sourcemap` decides whether Sentry enables its own; `tracingChannel` is left as the user set it.
32
+ { sourcemap: userNitro?.sourcemap, tracingChannel: userNitro?.tracingChannel },
33
+ options
34
+ ),
35
+ // `@sentry/nitro` serves the tunnel under this instead of Nitro's `baseURL`.
36
+ ...tunnelBasePath && { runtimeConfig: { sentryTunnelBasePath: tunnelBasePath } }
37
+ }
32
38
  };
33
39
  }
34
40
  };
@@ -1 +1 @@
1
- {"version":3,"file":"sentrySolidStart.js","sources":["../../../src/vite/sentrySolidStart.ts"],"sourcesContent":["import { type BuildTimeOptionsBase, warnOnRemovedBuildOptions } from '@sentry/core';\nimport { setupSentryNitroModule } from '@sentry/nitro';\nimport { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/vite';\nimport type { Plugin, UserConfig } from 'vite';\nimport { makeAddSentryVitePluginSolidStart2, makeEnableSourceMapsVitePlugin } from './sourceMaps';\n\n/**\n * Build-time options for the Sentry SolidStart SDK on SolidStart 2.\n */\nexport type SentrySolidStartOptions = BuildTimeOptionsBase;\n\n/**\n * Vite plugins for the Sentry SolidStart SDK. Requires SolidStart 2.\n *\n * On SolidStart 1, use `withSentry` in `app.config.ts` instead.\n *\n * @example\n * ```typescript\n * // vite.config.ts\n * import { sentrySolidStart } from '@sentry/solidstart/vite';\n * import { solidStart } from '@solidjs/start/config';\n * import { nitro } from 'nitro/vite';\n * import { defineConfig } from 'vite';\n *\n * export default defineConfig({\n * plugins: [\n * solidStart(),\n * sentrySolidStart({\n * org: 'your-org',\n * project: 'your-project',\n * }),\n * nitro(),\n * ],\n * });\n * ```\n *\n * @param options - Options to configure the Sentry Vite plugins\n * @returns An array of Vite plugins\n */\nexport function sentrySolidStart(options: SentrySolidStartOptions = {}): Plugin[] {\n warnOnRemovedBuildOptions(options, ['unstable_sentryVitePluginOptions']);\n\n const plugins: Plugin[] = [makeSentryNitroPlugin(options)];\n\n // Only the Nitro plugin is dev-safe; its module handles `dev` itself.\n if (process.env.NODE_ENV === 'development') {\n return plugins;\n }\n\n // Injects `diagnostics_channel` publishers into instrumented deps at build time, which is what\n // lets `Sentry.init()` run from a bundled Nitro plugin rather than an `--import` preload.\n plugins.push(sentryOrchestrionPlugin({ buildTimeInstrumentation: options.buildTimeInstrumentation }));\n\n if (options.sourcemaps?.disable !== true) {\n plugins.push(...makeAddSentryVitePluginSolidStart2(options), ...makeEnableSourceMapsVitePlugin(options));\n }\n\n return plugins;\n}\n\n// Nitro's `NitroConfig` only matches `@sentry/nitro`'s when both resolve the same `nitro` install,\n// which is not guaranteed, so the key stays opaque rather than coupling the two copies.\ntype ViteConfigWithNitro = UserConfig & { nitro?: Record<string, unknown> };\n\n/**\n * Delivers everything only Nitro can reach — server source maps, runtime hooks, the\n * `sourcemapMinify` opt-out — through Vite's `nitro` key.\n *\n * `setupSentryNitroModule` is handed only the keys it reads, never the user's whole config, so what\n * comes back is purely Sentry's additions. Vite concatenates arrays when merging a `config` return\n * value, so echoing the user's own `modules`/`plugins` back would duplicate every entry.\n *\n * `enforce: 'pre'` is load-bearing: Nitro creates its instance inside its own `config` hook, so a\n * normal-priority hook sorting after it would be read too late and silently ignored.\n */\nfunction makeSentryNitroPlugin(options: SentrySolidStartOptions): Plugin {\n return {\n name: 'sentry-solidstart-nitro',\n enforce: 'pre',\n config(userConfig: ViteConfigWithNitro) {\n const userNitro = userConfig.nitro;\n\n return {\n nitro: setupSentryNitroModule(\n // `sourcemap` decides whether Sentry enables its own; `tracingChannel` is left as the user set it.\n { sourcemap: userNitro?.sourcemap, tracingChannel: userNitro?.tracingChannel } as Parameters<\n typeof setupSentryNitroModule\n >[0],\n options,\n ) as Record<string, unknown>,\n } as Omit<UserConfig, 'plugins'>;\n },\n };\n}\n"],"names":["warnOnRemovedBuildOptions","sentryOrchestrionPlugin","makeAddSentryVitePluginSolidStart2","makeEnableSourceMapsVitePlugin","setupSentryNitroModule"],"mappings":";;;;;;;AAuCO,SAAS,gBAAA,CAAiB,OAAA,GAAmC,EAAC,EAAa;AAChF,EAAAA,8BAAA,CAA0B,OAAA,EAAS,CAAC,kCAAkC,CAAC,CAAA;AAEvE,EAAA,MAAM,OAAA,GAAoB,CAAC,qBAAA,CAAsB,OAAO,CAAC,CAAA;AAGzD,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,aAAA,EAAe;AAC1C,IAAA,OAAO,OAAA;AAAA,EACT;AAIA,EAAA,OAAA,CAAQ,KAAKC,4BAAA,CAAwB,EAAE,0BAA0B,OAAA,CAAQ,wBAAA,EAA0B,CAAC,CAAA;AAEpG,EAAA,IAAI,OAAA,CAAQ,UAAA,EAAY,OAAA,KAAY,IAAA,EAAM;AACxC,IAAA,OAAA,CAAQ,IAAA,CAAK,GAAGC,6CAAA,CAAmC,OAAO,GAAG,GAAGC,yCAAA,CAA+B,OAAO,CAAC,CAAA;AAAA,EACzG;AAEA,EAAA,OAAO,OAAA;AACT;AAiBA,SAAS,sBAAsB,OAAA,EAA0C;AACvE,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,yBAAA;AAAA,IACN,OAAA,EAAS,KAAA;AAAA,IACT,OAAO,UAAA,EAAiC;AACtC,MAAA,MAAM,YAAY,UAAA,CAAW,KAAA;AAE7B,MAAA,OAAO;AAAA,QACL,KAAA,EAAOC,4BAAA;AAAA;AAAA,UAEL,EAAE,SAAA,EAAW,SAAA,EAAW,SAAA,EAAW,cAAA,EAAgB,WAAW,cAAA,EAAe;AAAA,UAG7E;AAAA;AACF,OACF;AAAA,IACF;AAAA,GACF;AACF;;;;"}
1
+ {"version":3,"file":"sentrySolidStart.js","sources":["../../../src/vite/sentrySolidStart.ts"],"sourcesContent":["import {\n type BuildTimeOptionsBase,\n _INTERNAL_normalizeTunnelBasePath as normalizeTunnelBasePath,\n warnOnRemovedBuildOptions,\n} from '@sentry/core';\nimport { setupSentryNitroModule } from '@sentry/nitro';\nimport { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/vite';\nimport type { Plugin, UserConfig } from 'vite';\nimport { makeAddSentryVitePluginSolidStart2, makeEnableSourceMapsVitePlugin } from './sourceMaps';\n\n/**\n * Build-time options for the Sentry SolidStart SDK on SolidStart 2.\n */\nexport type SentrySolidStartOptions = BuildTimeOptionsBase;\n\n/**\n * Vite plugins for the Sentry SolidStart SDK. Requires SolidStart 2.\n *\n * On SolidStart 1, use `withSentry` in `app.config.ts` instead.\n *\n * @example\n * ```typescript\n * // vite.config.ts\n * import { sentrySolidStart } from '@sentry/solidstart/vite';\n * import { solidStart } from '@solidjs/start/config';\n * import { nitro } from 'nitro/vite';\n * import { defineConfig } from 'vite';\n *\n * export default defineConfig({\n * plugins: [\n * solidStart(),\n * sentrySolidStart({\n * org: 'your-org',\n * project: 'your-project',\n * }),\n * nitro(),\n * ],\n * });\n * ```\n *\n * @param options - Options to configure the Sentry Vite plugins\n * @returns An array of Vite plugins\n */\nexport function sentrySolidStart(options: SentrySolidStartOptions = {}): Plugin[] {\n warnOnRemovedBuildOptions(options, ['unstable_sentryVitePluginOptions']);\n\n const plugins: Plugin[] = [makeSentryNitroPlugin(options)];\n\n // Only the Nitro plugin is dev-safe; its module handles `dev` itself.\n if (process.env.NODE_ENV === 'development') {\n return plugins;\n }\n\n // Injects `diagnostics_channel` publishers into instrumented deps at build time, which is what\n // lets `Sentry.init()` run from a bundled Nitro plugin rather than an `--import` preload.\n plugins.push(sentryOrchestrionPlugin({ buildTimeInstrumentation: options.buildTimeInstrumentation }));\n\n if (options.sourcemaps?.disable !== true) {\n plugins.push(...makeAddSentryVitePluginSolidStart2(options), ...makeEnableSourceMapsVitePlugin(options));\n }\n\n return plugins;\n}\n\n// Nitro's `NitroConfig` only matches `@sentry/nitro`'s when both resolve the same `nitro` install,\n// which is not guaranteed, so the key stays opaque rather than coupling the two copies.\ntype ViteConfigWithNitro = UserConfig & {\n nitro?: Record<string, unknown>;\n server?: UserConfig['server'] & { baseURL?: string };\n};\n\n/**\n * Delivers everything only Nitro can reach — server source maps, runtime hooks, the\n * `sourcemapMinify` opt-out — through Vite's `nitro` key, and the app's base path to the browser SDK.\n *\n * `setupSentryNitroModule` is handed only the keys it reads, never the user's whole config, so what\n * comes back is purely Sentry's additions. Vite concatenates arrays when merging a `config` return\n * value, so echoing the user's own `modules`/`plugins` back would duplicate every entry.\n *\n * `enforce: 'pre'` is load-bearing: Nitro creates its instance inside its own `config` hook, so a\n * normal-priority hook sorting after it would be read too late and silently ignored.\n */\nfunction makeSentryNitroPlugin(options: SentrySolidStartOptions): Plugin {\n return {\n name: 'sentry-solidstart-nitro',\n enforce: 'pre',\n config(userConfig: ViteConfigWithNitro) {\n const userNitro = userConfig.nitro;\n // SolidStart serves the app under Vite's `base` (or `server.baseURL`), not Nitro's `baseURL`, so the browser\n // and the server both serve the managed tunnel under it.\n const tunnelBasePath = normalizeTunnelBasePath(userConfig.server?.baseURL || userConfig.base);\n\n return {\n define: { __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__: JSON.stringify(tunnelBasePath) },\n nitro: {\n ...(setupSentryNitroModule(\n // `sourcemap` decides whether Sentry enables its own; `tracingChannel` is left as the user set it.\n { sourcemap: userNitro?.sourcemap, tracingChannel: userNitro?.tracingChannel } as Parameters<\n typeof setupSentryNitroModule\n >[0],\n options,\n ) as Record<string, unknown>),\n // `@sentry/nitro` serves the tunnel under this instead of Nitro's `baseURL`.\n ...(tunnelBasePath && { runtimeConfig: { sentryTunnelBasePath: tunnelBasePath } }),\n },\n } as Omit<UserConfig, 'plugins'>;\n },\n };\n}\n"],"names":["warnOnRemovedBuildOptions","sentryOrchestrionPlugin","makeAddSentryVitePluginSolidStart2","makeEnableSourceMapsVitePlugin","normalizeTunnelBasePath","setupSentryNitroModule"],"mappings":";;;;;;;AA2CO,SAAS,gBAAA,CAAiB,OAAA,GAAmC,EAA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F;AACF;;;;"}
@@ -4,9 +4,17 @@ const core = require('@sentry/core');
4
4
  const buildInstrumentationFile = require('./buildInstrumentationFile.js');
5
5
  const sourceMaps = require('./sourceMaps.js');
6
6
 
7
- const sentrySolidStartVite = (options = {}, viteConfig) => {
7
+ const sentrySolidStartVite = (options = {}, viteConfig, tunnelBasePath = "") => {
8
8
  core.warnOnRemovedBuildOptions(options, ["unstable_sentryVitePluginOptions"]);
9
- const sentryPlugins = [];
9
+ const sentryPlugins = [
10
+ {
11
+ name: "sentry-solidstart-tunnel-base-path",
12
+ // Serves the browser's managed tunnel under `server.baseURL`, like every other route of the app.
13
+ config: () => ({
14
+ define: { __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__: JSON.stringify(tunnelBasePath) }
15
+ })
16
+ }
17
+ ];
10
18
  if (options.autoInjectServerSentry !== "experimental_dynamic-import") {
11
19
  sentryPlugins.push(buildInstrumentationFile.makeBuildInstrumentationFilePlugin(options));
12
20
  }
@@ -19,9 +27,9 @@ const sentrySolidStartVite = (options = {}, viteConfig) => {
19
27
  }
20
28
  return sentryPlugins;
21
29
  };
22
- const addSentryPluginToVite = (config = {}, options) => {
30
+ const addSentryPluginToVite = (config = {}, options, tunnelBasePath) => {
23
31
  const plugins = Array.isArray(config.plugins) ? [...config.plugins] : [];
24
- plugins.unshift(sentrySolidStartVite(options, config));
32
+ plugins.unshift(sentrySolidStartVite(options, config, tunnelBasePath));
25
33
  return {
26
34
  ...config,
27
35
  plugins
@@ -1 +1 @@
1
- {"version":3,"file":"sentrySolidStartVite.js","sources":["../../../src/vite/sentrySolidStartVite.ts"],"sourcesContent":["import { warnOnRemovedBuildOptions } from '@sentry/core';\nimport type { Plugin, UserConfig } from 'vite';\nimport { makeBuildInstrumentationFilePlugin } from './buildInstrumentationFile';\nimport { makeAddSentryVitePlugin, makeEnableSourceMapsVitePlugin } from './sourceMaps';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n/**\n * Various Sentry vite plugins to be used for SolidStart.\n */\nexport const sentrySolidStartVite = (options: SentrySolidStartPluginOptions = {}, viteConfig: UserConfig): Plugin[] => {\n warnOnRemovedBuildOptions(options, ['unstable_sentryVitePluginOptions']);\n\n const sentryPlugins: Plugin[] = [];\n\n if (options.autoInjectServerSentry !== 'experimental_dynamic-import') {\n sentryPlugins.push(makeBuildInstrumentationFilePlugin(options));\n }\n\n if (process.env.NODE_ENV !== 'development') {\n if (options.sourcemaps?.disable !== true) {\n const sourceMapsPlugin = makeAddSentryVitePlugin(options, viteConfig);\n const enableSourceMapsPlugin = makeEnableSourceMapsVitePlugin(options);\n\n sentryPlugins.push(...sourceMapsPlugin, ...enableSourceMapsPlugin);\n }\n }\n\n return sentryPlugins;\n};\n\n/**\n * Helper to add the Sentry SolidStart vite plugin to a vite config.\n */\nexport const addSentryPluginToVite = (config: UserConfig = {}, options: SentrySolidStartPluginOptions): UserConfig => {\n const plugins = Array.isArray(config.plugins) ? [...config.plugins] : [];\n plugins.unshift(sentrySolidStartVite(options, config));\n\n return {\n ...config,\n plugins,\n };\n};\n"],"names":["warnOnRemovedBuildOptions","makeBuildInstrumentationFilePlugin","makeAddSentryVitePlugin","makeEnableSourceMapsVitePlugin"],"mappings":";;;;;;AASO,MAAM,oBAAA,GAAuB,CAAC,OAAA,GAAyC,IAAI,UAAA,KAAqC;AACrH,EAAAA,8BAAA,CAA0B,OAAA,EAAS,CAAC,kCAAkC,CAAC,CAAA;AAEvE,EAAA,MAAM,gBAA0B,EAAC;AAEjC,EAAA,IAAI,OAAA,CAAQ,2BAA2B,6BAAA,EAA+B;AACpE,IAAA,aAAA,CAAc,IAAA,CAAKC,2DAAA,CAAmC,OAAO,CAAC,CAAA;AAAA,EAChE;AAEA,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,aAAA,EAAe;AAC1C,IAAA,IAAI,OAAA,CAAQ,UAAA,EAAY,OAAA,KAAY,IAAA,EAAM;AACxC,MAAA,MAAM,gBAAA,GAAmBC,kCAAA,CAAwB,OAAA,EAAS,UAAU,CAAA;AACpE,MAAA,MAAM,sBAAA,GAAyBC,0CAA+B,OAAO,CAAA;AAErE,MAAA,aAAA,CAAc,IAAA,CAAK,GAAG,gBAAA,EAAkB,GAAG,sBAAsB,CAAA;AAAA,IACnE;AAAA,EACF;AAEA,EAAA,OAAO,aAAA;AACT;AAKO,MAAM,qBAAA,GAAwB,CAAC,MAAA,GAAqB,IAAI,OAAA,KAAuD;AACpH,EAAA,MAAM,OAAA,GAAU,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAA,GAAI,CAAC,GAAG,MAAA,CAAO,OAAO,CAAA,GAAI,EAAC;AACvE,EAAA,OAAA,CAAQ,OAAA,CAAQ,oBAAA,CAAqB,OAAA,EAAS,MAAM,CAAC,CAAA;AAErD,EAAA,OAAO;AAAA,IACL,GAAG,MAAA;AAAA,IACH;AAAA,GACF;AACF;;;;;"}
1
+ {"version":3,"file":"sentrySolidStartVite.js","sources":["../../../src/vite/sentrySolidStartVite.ts"],"sourcesContent":["import { warnOnRemovedBuildOptions } from '@sentry/core';\nimport type { Plugin, UserConfig } from 'vite';\nimport { makeBuildInstrumentationFilePlugin } from './buildInstrumentationFile';\nimport { makeAddSentryVitePlugin, makeEnableSourceMapsVitePlugin } from './sourceMaps';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n/**\n * Various Sentry vite plugins to be used for SolidStart.\n */\nexport const sentrySolidStartVite = (\n options: SentrySolidStartPluginOptions = {},\n viteConfig: UserConfig,\n tunnelBasePath = '',\n): Plugin[] => {\n warnOnRemovedBuildOptions(options, ['unstable_sentryVitePluginOptions']);\n\n const sentryPlugins: Plugin[] = [\n {\n name: 'sentry-solidstart-tunnel-base-path',\n // Serves the browser's managed tunnel under `server.baseURL`, like every other route of the app.\n config: () => ({\n define: { __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__: JSON.stringify(tunnelBasePath) },\n }),\n },\n ];\n\n if (options.autoInjectServerSentry !== 'experimental_dynamic-import') {\n sentryPlugins.push(makeBuildInstrumentationFilePlugin(options));\n }\n\n if (process.env.NODE_ENV !== 'development') {\n if (options.sourcemaps?.disable !== true) {\n const sourceMapsPlugin = makeAddSentryVitePlugin(options, viteConfig);\n const enableSourceMapsPlugin = makeEnableSourceMapsVitePlugin(options);\n\n sentryPlugins.push(...sourceMapsPlugin, ...enableSourceMapsPlugin);\n }\n }\n\n return sentryPlugins;\n};\n\n/**\n * Helper to add the Sentry SolidStart vite plugin to a vite config.\n */\nexport const addSentryPluginToVite = (\n config: UserConfig = {},\n options: SentrySolidStartPluginOptions,\n tunnelBasePath?: string,\n): UserConfig => {\n const plugins = Array.isArray(config.plugins) ? [...config.plugins] : [];\n plugins.unshift(sentrySolidStartVite(options, config, tunnelBasePath));\n\n return {\n ...config,\n plugins,\n };\n};\n"],"names":["warnOnRemovedBuildOptions","makeBuildInstrumentationFilePlugin","makeAddSentryVitePlugin","makeEnableSourceMapsVitePlugin"],"mappings":";;;;;;AASO,MAAM,uBAAuB,CAClC,OAAA,GAAyC,EAAC,EAC1C,UAAA,EACA,iBAAiB,EAAA,KACJ;AACb,EAAAA,8BAAA,CAA0B,OAAA,EAAS,CAAC,kCAAkC,CAAC,CAAA;AAEvE,EAAA,MAAM,aAAA,GAA0B;AAAA,IAC9B;AAAA,MACE,IAAA,EAAM,oCAAA;AAAA;AAAA,MAEN,QAAQ,OAAO;AAAA,QACb,QAAQ,EAAE,sCAAA,EAAwC,IAAA,CAAK,SAAA,CAAU,cAAc,CAAA;AAAE,OACnF;AAAA;AACF,GACF;AAEA,EAAA,IAAI,OAAA,CAAQ,2BAA2B,6BAAA,EAA+B;AACpE,IAAA,aAAA,CAAc,IAAA,CAAKC,2DAAA,CAAmC,OAAO,CAAC,CAAA;AAAA,EAChE;AAEA,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,aAAA,EAAe;AAC1C,IAAA,IAAI,OAAA,CAAQ,UAAA,EAAY,OAAA,KAAY,IAAA,EAAM;AACxC,MAAA,MAAM,gBAAA,GAAmBC,kCAAA,CAAwB,OAAA,EAAS,UAAU,CAAA;AACpE,MAAA,MAAM,sBAAA,GAAyBC,0CAA+B,OAAO,CAAA;AAErE,MAAA,aAAA,CAAc,IAAA,CAAK,GAAG,gBAAA,EAAkB,GAAG,sBAAsB,CAAA;AAAA,IACnE;AAAA,EACF;AAEA,EAAA,OAAO,aAAA;AACT;AAKO,MAAM,wBAAwB,CACnC,MAAA,GAAqB,EAAC,EACtB,SACA,cAAA,KACe;AACf,EAAA,MAAM,OAAA,GAAU,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAA,GAAI,CAAC,GAAG,MAAA,CAAO,OAAO,CAAA,GAAI,EAAC;AACvE,EAAA,OAAA,CAAQ,OAAA,CAAQ,oBAAA,CAAqB,OAAA,EAAS,MAAA,EAAQ,cAAc,CAAC,CAAA;AAErE,EAAA,OAAO;AAAA,IACL,GAAG,MAAA;AAAA,IACH;AAAA,GACF;AACF;;;;;"}
@@ -1,4 +1,5 @@
1
1
  import { applySdkMetadata } from '@sentry/core';
2
+ import { applyTunnelBasePath } from '../common/tunnel.js';
2
3
  import { init as init$1, getDefaultIntegrations as getDefaultIntegrations$1, browserTracingIntegration } from '@sentry/solid';
3
4
 
4
5
  function init(options) {
@@ -6,6 +7,7 @@ function init(options) {
6
7
  defaultIntegrations: getDefaultIntegrations(options),
7
8
  ...options
8
9
  };
10
+ applyTunnelBasePath(opts);
9
11
  applySdkMetadata(opts, "solidstart", ["solidstart", "solid"]);
10
12
  return init$1(opts);
11
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sources":["../../../src/client/sdk.ts"],"sourcesContent":["import type { Client, Integration } from '@sentry/core';\nimport { applySdkMetadata } from '@sentry/core';\nimport type { BrowserOptions } from '@sentry/solid';\nimport {\n browserTracingIntegration,\n getDefaultIntegrations as getDefaultSolidIntegrations,\n init as initSolidSDK,\n} from '@sentry/solid';\n\n// Treeshakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean;\n\n/**\n * Initializes the client side of the Solid Start SDK.\n */\nexport function init(options: BrowserOptions): Client | undefined {\n const opts = {\n defaultIntegrations: getDefaultIntegrations(options),\n ...options,\n };\n\n applySdkMetadata(opts, 'solidstart', ['solidstart', 'solid']);\n\n return initSolidSDK(opts);\n}\n\nfunction getDefaultIntegrations(options: BrowserOptions): Integration[] {\n const integrations = getDefaultSolidIntegrations(options);\n\n // This evaluates to true unless __SENTRY_TRACING__ is text-replaced with \"false\",\n // in which case everything inside will get tree-shaken away\n if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {\n // We add the default BrowserTracingIntegration here always.\n // We can do this, even if `solidRouterBrowserTracingIntegration` is\n // supplied as integration in `init` by users because it will win\n // over the default integration by virtue of having the same\n // `BrowserTracing` integration name and being added later.\n integrations.push(browserTracingIntegration());\n }\n\n return integrations;\n}\n"],"names":["initSolidSDK","getDefaultSolidIntegrations"],"mappings":";;;AAeO,SAAS,KAAK,OAAA,EAA6C;AAChE,EAAA,MAAM,IAAA,GAAO;AAAA,IACX,mBAAA,EAAqB,uBAAuB,OAAO,CAAA;AAAA,IACnD,GAAG;AAAA,GACL;AAEA,EAAA,gBAAA,CAAiB,IAAA,EAAM,YAAA,EAAc,CAAC,YAAA,EAAc,OAAO,CAAC,CAAA;AAE5D,EAAA,OAAOA,OAAa,IAAI,CAAA;AAC1B;AAEA,SAAS,uBAAuB,OAAA,EAAwC;AACtE,EAAA,MAAM,YAAA,GAAeC,yBAA4B,OAAO,CAAA;AAIxD,EAAA,IAAI,OAAO,kBAAA,KAAuB,WAAA,IAAe,kBAAA,EAAoB;AAMnE,IAAA,YAAA,CAAa,IAAA,CAAK,2BAA2B,CAAA;AAAA,EAC/C;AAEA,EAAA,OAAO,YAAA;AACT;;;;"}
1
+ {"version":3,"file":"sdk.js","sources":["../../../src/client/sdk.ts"],"sourcesContent":["import type { Client, Integration } from '@sentry/core';\nimport { applySdkMetadata } from '@sentry/core';\nimport type { BrowserOptions } from '@sentry/solid';\nimport { applyTunnelBasePath } from '../common/tunnel';\nimport {\n browserTracingIntegration,\n getDefaultIntegrations as getDefaultSolidIntegrations,\n init as initSolidSDK,\n} from '@sentry/solid';\n\n// Treeshakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean;\n\n/**\n * Initializes the client side of the Solid Start SDK.\n */\nexport function init(options: BrowserOptions): Client | undefined {\n const opts = {\n defaultIntegrations: getDefaultIntegrations(options),\n ...options,\n };\n\n applyTunnelBasePath(opts);\n applySdkMetadata(opts, 'solidstart', ['solidstart', 'solid']);\n\n return initSolidSDK(opts);\n}\n\nfunction getDefaultIntegrations(options: BrowserOptions): Integration[] {\n const integrations = getDefaultSolidIntegrations(options);\n\n // This evaluates to true unless __SENTRY_TRACING__ is text-replaced with \"false\",\n // in which case everything inside will get tree-shaken away\n if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {\n // We add the default BrowserTracingIntegration here always.\n // We can do this, even if `solidRouterBrowserTracingIntegration` is\n // supplied as integration in `init` by users because it will win\n // over the default integration by virtue of having the same\n // `BrowserTracing` integration name and being added later.\n integrations.push(browserTracingIntegration());\n }\n\n return integrations;\n}\n"],"names":["initSolidSDK","getDefaultSolidIntegrations"],"mappings":";;;;AAgBO,SAAS,KAAK,OAAA,EAA6C;AAChE,EAAA,MAAM,IAAA,GAAO;AAAA,IACX,mBAAA,EAAqB,uBAAuB,OAAO,CAAA;AAAA,IACnD,GAAG;AAAA,GACL;AAEA,EAAA,mBAAA,CAAoB,IAAI,CAAA;AACxB,EAAA,gBAAA,CAAiB,IAAA,EAAM,YAAA,EAAc,CAAC,YAAA,EAAc,OAAO,CAAC,CAAA;AAE5D,EAAA,OAAOA,OAAa,IAAI,CAAA;AAC1B;AAEA,SAAS,uBAAuB,OAAA,EAAwC;AACtE,EAAA,MAAM,YAAA,GAAeC,yBAA4B,OAAO,CAAA;AAIxD,EAAA,IAAI,OAAO,kBAAA,KAAuB,WAAA,IAAe,kBAAA,EAAoB;AAMnE,IAAA,YAAA,CAAa,IAAA,CAAK,2BAA2B,CAAA;AAAA,EAC/C;AAEA,EAAA,OAAO,YAAA;AACT;;;;"}
@@ -0,0 +1,10 @@
1
+ import { _INTERNAL_applyTunnelDefaults } from '@sentry/core';
2
+
3
+ const TUNNEL_BASE_PATH_GLOBAL = "__sentry_solidstart_base_path";
4
+ function applyTunnelBasePath(options) {
5
+ const basePath = typeof __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__ !== "undefined" ? __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__ : "";
6
+ options.tunnel = _INTERNAL_applyTunnelDefaults(options.tunnel, { basePath });
7
+ }
8
+
9
+ export { TUNNEL_BASE_PATH_GLOBAL, applyTunnelBasePath };
10
+ //# sourceMappingURL=tunnel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tunnel.js","sources":["../../../src/common/tunnel.ts"],"sourcesContent":["import type { Options } from '@sentry/core';\nimport { _INTERNAL_applyTunnelDefaults as applyTunnelDefaults } from '@sentry/core';\n\n/** Set on the server by `withSentry` to the app's `server.baseURL`. */\nexport const TUNNEL_BASE_PATH_GLOBAL = '__sentry_solidstart_base_path';\n\ndeclare const __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__: string | undefined;\n\n/**\n * Serves the browser's managed tunnel under the app's base path, which `withSentry` (SolidStart 1) or\n * `sentrySolidStart` (SolidStart 2) defines at build time. A `basePath` the user set wins.\n */\nexport function applyTunnelBasePath(options: Pick<Options, 'tunnel'>): void {\n const basePath =\n typeof __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__ !== 'undefined' ? __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__ : '';\n options.tunnel = applyTunnelDefaults(options.tunnel, { basePath });\n}\n"],"names":["applyTunnelDefaults"],"mappings":";;AAIO,MAAM,uBAAA,GAA0B;AAQhC,SAAS,oBAAoB,OAAA,EAAwC;AAC1E,EAAA,MAAM,QAAA,GACJ,OAAO,sCAAA,KAA2C,WAAA,GAAc,sCAAA,GAAyC,EAAA;AAC3G,EAAA,OAAA,CAAQ,SAASA,6BAAA,CAAoB,OAAA,CAAQ,MAAA,EAAQ,EAAE,UAAU,CAAA;AACnE;;;;"}
@@ -1,6 +1,8 @@
1
- import { debug } from '@sentry/core';
1
+ import { fileURLToPath } from 'node:url';
2
+ import { _INTERNAL_normalizeTunnelBasePath, GLOBAL_OBJ, debug } from '@sentry/core';
2
3
  import { INSTRUMENTED_MODULE_NAMES } from '@sentry/server-utils/orchestrion/config';
3
4
  import { commonJSInteropOptions, sentryOrchestrionPlugin, sentryCommonJSInteropPlugin } from '@sentry/server-utils/orchestrion/rollup';
5
+ import { TUNNEL_BASE_PATH_GLOBAL } from '../common/tunnel.js';
4
6
  import { addSentryPluginToVite } from '../vite/sentrySolidStartVite.js';
5
7
  import { addDynamicImportEntryFileWrapper, addInstrumentationFileToBuild, addSentryTopImport } from './addInstrumentation.js';
6
8
 
@@ -14,12 +16,24 @@ function withSentry(solidStartConfig = {}, sentrySolidStartPluginOptions) {
14
16
  ...defaultSentrySolidStartPluginOptions
15
17
  };
16
18
  const server = solidStartConfig.server || {};
19
+ const tunnelBasePath = _INTERNAL_normalizeTunnelBasePath(
20
+ server.baseURL
21
+ );
22
+ if (tunnelBasePath) {
23
+ GLOBAL_OBJ[TUNNEL_BASE_PATH_GLOBAL] = tunnelBasePath;
24
+ }
17
25
  const viteConfig = solidStartConfig.vite;
18
- const vite = typeof viteConfig === "function" ? (...args) => addSentryPluginToVite(viteConfig(...args), sentryPluginOptions) : addSentryPluginToVite(viteConfig, sentryPluginOptions);
26
+ const vite = typeof viteConfig === "function" ? (...args) => addSentryPluginToVite(viteConfig(...args), sentryPluginOptions, tunnelBasePath) : addSentryPluginToVite(viteConfig, sentryPluginOptions, tunnelBasePath);
19
27
  const addBuildTimeInstrumentation = sentryPluginOptions.buildTimeInstrumentation !== false;
20
28
  const sentryNitroModule = (nitro) => {
21
29
  nitro.hooks.hook("rollup:before", async (nitro2, rollupConfig) => {
22
30
  const sentryRollupConfig = rollupConfig;
31
+ if (tunnelBasePath) {
32
+ sentryRollupConfig.plugins.push({
33
+ name: "sentry-solidstart-tunnel-base-path",
34
+ banner: `globalThis.${TUNNEL_BASE_PATH_GLOBAL} = ${JSON.stringify(tunnelBasePath)};`
35
+ });
36
+ }
23
37
  if (addBuildTimeInstrumentation) {
24
38
  sentryRollupConfig.plugins.push(
25
39
  sentryOrchestrionPlugin({ buildTimeInstrumentation: sentryPluginOptions.buildTimeInstrumentation }),
@@ -61,10 +75,16 @@ function withSentry(solidStartConfig = {}, sentrySolidStartPluginOptions) {
61
75
  ...server,
62
76
  externals,
63
77
  commonJS,
64
- modules: [...existingModules, sentryNitroModule]
78
+ modules: [...existingModules, sentryNitroModule],
79
+ // Through `server.plugins`, since vinxi's dev server ignores plugins that Nitro modules add.
80
+ plugins: [...server.plugins || [], getTunnelPluginPath()]
65
81
  }
66
82
  };
67
83
  }
84
+ function getTunnelPluginPath() {
85
+ const url = new URL("../nitro/tunnelPlugin.js", import.meta.url);
86
+ return url.protocol === "file:" ? fileURLToPath(url) : url.pathname;
87
+ }
68
88
 
69
89
  export { withSentry };
70
90
  //# sourceMappingURL=withSentry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"withSentry.js","sources":["../../../src/config/withSentry.ts"],"sourcesContent":["import { debug } from '@sentry/core';\nimport { INSTRUMENTED_MODULE_NAMES } from '@sentry/server-utils/orchestrion/config';\nimport {\n commonJSInteropOptions,\n sentryCommonJSInteropPlugin,\n sentryOrchestrionPlugin,\n} from '@sentry/server-utils/orchestrion/rollup';\nimport type { Nitro, NitroConfig } 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\n// ioredis requires this CommonJS helper to be bundled with it. Leaving it\n// external makes Nitro resolve the default export as a namespace object.\nconst IORedisDependencies = ['standard-as-callback'];\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 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 const addBuildTimeInstrumentation = sentryPluginOptions.buildTimeInstrumentation !== false;\n\n // Use a module so we don't override preset hooks.\n const sentryNitroModule = (nitro: Nitro) => {\n nitro.hooks.hook('rollup:before', async (nitro, rollupConfig) => {\n // Nitro types the `rollup:before` hook's `rollupConfig.plugins` as `string[]` (plugin paths),\n // but at runtime it holds resolved plugin objects we can push onto, so narrow to our own shape.\n const sentryRollupConfig = rollupConfig as unknown as RollupConfig;\n\n if (addBuildTimeInstrumentation) {\n sentryRollupConfig.plugins.push(\n sentryOrchestrionPlugin({ buildTimeInstrumentation: sentryPluginOptions.buildTimeInstrumentation }),\n sentryCommonJSInteropPlugin(),\n );\n }\n\n if (sentrySolidStartPluginOptions?.autoInjectServerSentry === 'experimental_dynamic-import') {\n await addDynamicImportEntryFileWrapper({\n nitro,\n rollupConfig: sentryRollupConfig,\n sentryPluginOptions,\n });\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 };\n\n const existingModules = (server as SolidStartInlineServerConfig & { modules?: unknown[] }).modules || [];\n\n // An externalized dependency never passes through the orchestrion code transform, so force-inline\n // the instrumented modules. This has to be set statically on the Nitro config (not in a hook)\n // because externalization is a resolution-time decision made before Rollup normalizes `external`.\n let externals = (server as SolidStartInlineServerConfig & { externals?: { inline?: string[] } }).externals;\n let commonJS = (server as SolidStartInlineServerConfig & { commonJS?: NitroConfig['commonJS'] }).commonJS;\n if (addBuildTimeInstrumentation) {\n const existingInline = externals?.inline || [];\n externals = {\n ...externals,\n inline: [...new Set([...existingInline, ...INSTRUMENTED_MODULE_NAMES, ...IORedisDependencies])],\n };\n\n // The inlined drivers `require()` CommonJS dependencies that stay external. Fix the interop\n // for those requires (see `commonJSInteropOptions`). User-provided options win.\n commonJS = { ...commonJSInteropOptions(), ...commonJS };\n }\n\n return {\n ...solidStartConfig,\n vite,\n server: {\n ...server,\n externals,\n commonJS,\n modules: [...existingModules, sentryNitroModule],\n },\n };\n}\n"],"names":["nitro"],"mappings":";;;;;;AAmBA,MAAM,mBAAA,GAAsB,CAAC,sBAAsB,CAAA;AAEnD,MAAM,oCAAA,GAIuF;AAAA,EAC3F,uCAAA,EAAyC,CAAC,SAAA,EAAW,SAAA,EAAW,QAAQ;AAC1E,CAAA;AAWO,SAAS,UAAA,CACd,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EAAoB;AAChF,UAAA,MAAM,mBAAmBA,MAAK,CAAA;AAAA,QAChC;AAAA,MACF;AAAA,IACF,CAAC,CAAA;AAAA,EACH,CAAA;AAEA,EAAA,MAAM,eAAA,GAAmB,MAAA,CAAkE,OAAA,IAAW,EAAC;AAKvG,EAAA,IAAI,YAAa,MAAA,CAAgF,SAAA;AACjG,EAAA,IAAI,WAAY,MAAA,CAAiF,QAAA;AACjG,EAAA,IAAI,2BAAA,EAA6B;AAC/B,IAAA,MAAM,cAAA,GAAiB,SAAA,EAAW,MAAA,IAAU,EAAC;AAC7C,IAAA,SAAA,GAAY;AAAA,MACV,GAAG,SAAA;AAAA,MACH,MAAA,EAAQ,CAAC,mBAAG,IAAI,GAAA,CAAI,CAAC,GAAG,cAAA,EAAgB,GAAG,yBAAA,EAA2B,GAAG,mBAAmB,CAAC,CAAC;AAAA,KAChG;AAIA,IAAA,QAAA,GAAW,EAAE,GAAG,sBAAA,EAAuB,EAAG,GAAG,QAAA,EAAS;AAAA,EACxD;AAEA,EAAA,OAAO;AAAA,IACL,GAAG,gBAAA;AAAA,IACH,IAAA;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,GAAG,MAAA;AAAA,MACH,SAAA;AAAA,MACA,QAAA;AAAA,MACA,OAAA,EAAS,CAAC,GAAG,eAAA,EAAiB,iBAAiB;AAAA;AACjD,GACF;AACF;;;;"}
1
+ {"version":3,"file":"withSentry.js","sources":["../../../src/config/withSentry.ts"],"sourcesContent":["import { fileURLToPath } from 'node:url';\nimport { debug, GLOBAL_OBJ, _INTERNAL_normalizeTunnelBasePath as normalizeTunnelBasePath } from '@sentry/core';\nimport { INSTRUMENTED_MODULE_NAMES } from '@sentry/server-utils/orchestrion/config';\nimport {\n commonJSInteropOptions,\n sentryCommonJSInteropPlugin,\n sentryOrchestrionPlugin,\n} from '@sentry/server-utils/orchestrion/rollup';\nimport type { Nitro, NitroConfig } from 'nitropack';\nimport { TUNNEL_BASE_PATH_GLOBAL } from '../common/tunnel';\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\n// ioredis requires this CommonJS helper to be bundled with it. Leaving it\n// external makes Nitro resolve the default export as a namespace object.\nconst IORedisDependencies = ['standard-as-callback'];\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 // Requests reach the tunnel with `server.baseURL` still in front, so both sides serve it under that.\n const tunnelBasePath = normalizeTunnelBasePath(\n (server as SolidStartInlineServerConfig & { baseURL?: string }).baseURL,\n );\n // vinxi's dev server runs Nitro in this process, so the tunnel plugin can read it from here in dev.\n if (tunnelBasePath) {\n (GLOBAL_OBJ as { [TUNNEL_BASE_PATH_GLOBAL]?: string })[TUNNEL_BASE_PATH_GLOBAL] = tunnelBasePath;\n }\n\n const viteConfig = solidStartConfig.vite;\n const vite =\n typeof viteConfig === 'function'\n ? (...args: Parameters<typeof viteConfig>) =>\n addSentryPluginToVite(viteConfig(...args), sentryPluginOptions, tunnelBasePath)\n : addSentryPluginToVite(viteConfig, sentryPluginOptions, tunnelBasePath);\n\n const addBuildTimeInstrumentation = sentryPluginOptions.buildTimeInstrumentation !== false;\n\n // Use a module so we don't override preset hooks.\n const sentryNitroModule = (nitro: Nitro) => {\n nitro.hooks.hook('rollup:before', async (nitro, rollupConfig) => {\n // Nitro types the `rollup:before` hook's `rollupConfig.plugins` as `string[]` (plugin paths),\n // but at runtime it holds resolved plugin objects we can push onto, so narrow to our own shape.\n const sentryRollupConfig = rollupConfig as unknown as RollupConfig;\n\n if (tunnelBasePath) {\n // The built server runs in another process, so the tunnel plugin reads the base path from the bundle.\n sentryRollupConfig.plugins.push({\n name: 'sentry-solidstart-tunnel-base-path',\n banner: `globalThis.${TUNNEL_BASE_PATH_GLOBAL} = ${JSON.stringify(tunnelBasePath)};`,\n });\n }\n\n if (addBuildTimeInstrumentation) {\n sentryRollupConfig.plugins.push(\n sentryOrchestrionPlugin({ buildTimeInstrumentation: sentryPluginOptions.buildTimeInstrumentation }),\n sentryCommonJSInteropPlugin(),\n );\n }\n\n if (sentrySolidStartPluginOptions?.autoInjectServerSentry === 'experimental_dynamic-import') {\n await addDynamicImportEntryFileWrapper({\n nitro,\n rollupConfig: sentryRollupConfig,\n sentryPluginOptions,\n });\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 };\n\n const existingModules = (server as SolidStartInlineServerConfig & { modules?: unknown[] }).modules || [];\n\n // An externalized dependency never passes through the orchestrion code transform, so force-inline\n // the instrumented modules. This has to be set statically on the Nitro config (not in a hook)\n // because externalization is a resolution-time decision made before Rollup normalizes `external`.\n let externals = (server as SolidStartInlineServerConfig & { externals?: { inline?: string[] } }).externals;\n let commonJS = (server as SolidStartInlineServerConfig & { commonJS?: NitroConfig['commonJS'] }).commonJS;\n if (addBuildTimeInstrumentation) {\n const existingInline = externals?.inline || [];\n externals = {\n ...externals,\n inline: [...new Set([...existingInline, ...INSTRUMENTED_MODULE_NAMES, ...IORedisDependencies])],\n };\n\n // The inlined drivers `require()` CommonJS dependencies that stay external. Fix the interop\n // for those requires (see `commonJSInteropOptions`). User-provided options win.\n commonJS = { ...commonJSInteropOptions(), ...commonJS };\n }\n\n return {\n ...solidStartConfig,\n vite,\n server: {\n ...server,\n externals,\n commonJS,\n modules: [...existingModules, sentryNitroModule],\n // Through `server.plugins`, since vinxi's dev server ignores plugins that Nitro modules add.\n plugins: [...(server.plugins || []), getTunnelPluginPath()],\n },\n };\n}\n\nfunction getTunnelPluginPath(): string {\n const url = new URL('../nitro/tunnelPlugin.js', import.meta.url);\n\n // `import.meta.url` is a file URL in the built package, but not in every test environment.\n return url.protocol === 'file:' ? fileURLToPath(url) : url.pathname;\n}\n"],"names":["normalizeTunnelBasePath","nitro"],"mappings":";;;;;;;;AAqBA,MAAM,mBAAA,GAAsB,CAAC,sBAAsB,CAAA;AAEnD,MAAM,oCAAA,GAIuF;AAAA,EAC3F,uCAAA,EAAyC,CAAC,SAAA,EAAW,SAAA,EAAW,QAAQ;AAC1E,CAAA;AAWO,SAAS,UAAA,CACd,gBAAA,GAA2C,EAAC,EAC5C,6BAAA,EACwB;AACxB,EAAA,MAAM,mBAAA,GAAsB;AAAA,IAC1B,GAAG,6BAAA;AAAA,IACH,GAAG;AAAA,GACL;AAEA,EAAA,MAAM,MAAA,GAAU,gBAAA,CAAiB,MAAA,IAAU,EAAC;AAE5C,EAAA,MAAM,cAAA,GAAiBA,iCAAA;AAAA,IACpB,MAAA,CAA+D;AAAA,GAClE;AAEA,EAAA,IAAI,cAAA,EAAgB;AAClB,IAAC,UAAA,CAAsD,uBAAuB,CAAA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+1,12 @@
1
+ import { withSentry as withSentry$1 } from './config/withSentry.js';
1
2
  export * from '@sentry/node';
2
- export { NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Scope, addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, bindScopeToEmitter, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, consoleIntegration, consoleLoggingIntegration, contextLinesIntegration, continueTrace, createConsolaReporter, createGetModuleFromFilename, createSentryWinstonTransport, createTransport, cron, dedupeIntegration, defaultStackParser, disableAnrDetectionForCallback, endSession, eventFiltersIntegration, expressErrorHandler, expressIntegration, extraErrorDataIntegration, fastifyIntegration, flush, functionToStringIntegration, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, honoIntegration, honoMiddleware, httpIntegration, httpServerIntegration, httpServerSpansIntegration, initOpenTelemetry, instrumentSupabaseClient, isEnabled, isInitialized, kafkaIntegration, knexIntegration, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, logger, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, neonIntegration, nitroIntegration, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, postgresJsIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, setAttribute, setAttributes, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, spanStreamingIntegration, spanToBaggageHeader, spanToJSON, spanToStaticSpanJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, supabaseIntegration, suppressTracing, tediousIntegration, trpcMiddleware, updateSpanName, withActiveSpan, withIsolationScope, withMonitor, withScope, withStaticSpan, withStreamedSpan, zodErrorsIntegration } from '@sentry/node';
3
+ export { NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Scope, addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, bindScopeToEmitter, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, consoleIntegration, consoleLoggingIntegration, contextLinesIntegration, continueTrace, createConsolaReporter, createGetModuleFromFilename, createSentryWinstonTransport, createTransport, cron, cronJobIntegration, dedupeIntegration, defaultStackParser, disableAnrDetectionForCallback, endSession, eventFiltersIntegration, expressErrorHandler, expressIntegration, extraErrorDataIntegration, fastifyIntegration, flush, functionToStringIntegration, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, getTunnelPath, graphqlIntegration, handleTunnelRequest, handleTunnelRequestIfMatched, hapiIntegration, honoIntegration, honoMiddleware, httpIntegration, httpServerIntegration, httpServerSpansIntegration, initOpenTelemetry, instrumentSupabaseClient, isEnabled, isInitialized, isTunnelRequest, kafkaIntegration, knexIntegration, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, logger, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, neonIntegration, nitroIntegration, nodeContextIntegration, nodeCronIntegration, nodeScheduleIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, postgresJsIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, serveTunnelIntegration, setAttribute, setAttributes, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, spanStreamingIntegration, spanToBaggageHeader, spanToJSON, spanToStaticSpanJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, supabaseIntegration, suppressTracing, tediousIntegration, trpcMiddleware, updateSpanName, withActiveSpan, withIsolationScope, withMonitor, withScope, withStaticSpan, withStreamedSpan, zodErrorsIntegration } from '@sentry/node';
3
4
  export { withSentryErrorBoundary } from '@sentry/solid';
4
5
  export { init } from './server/sdk.js';
5
6
  export { withServerActionInstrumentation } from './server/withServerActionInstrumentation.js';
6
7
  export { sentryBeforeResponseMiddleware } from './server/middleware.js';
7
- export { withSentry } from './config/withSentry.js';
8
+
9
+ const withSentry = withSentry$1;
10
+
11
+ export { withSentry };
8
12
  //# sourceMappingURL=index.server.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
1
+ {"version":3,"file":"index.server.js","sources":["../../src/index.server.ts"],"sourcesContent":["import { withSentry as _withSentry } from './config';\n\nexport * from './server';\n\n/**\n * @deprecated Import `withSentry` from `@sentry/solidstart/vite` instead.\n * This export will be removed in the next major version.\n */\nexport const withSentry = _withSentry;\n"],"names":["_withSentry"],"mappings":";;;;;;;;AAQO,MAAM,UAAA,GAAaA;;;;"}
@@ -0,0 +1,22 @@
1
+ import { GLOBAL_OBJ } from '@sentry/core';
2
+ import { _INTERNAL_setManagedTunnelDefaults, _INTERNAL_isServedTunnelRequest, _INTERNAL_handleServedTunnelRequest } from '@sentry/core/server';
3
+ import { eventHandler, toWebRequest } from 'h3';
4
+ import { TUNNEL_BASE_PATH_GLOBAL } from '../common/tunnel.js';
5
+
6
+ const tunnelPlugin = ((nitroApp) => {
7
+ _INTERNAL_setManagedTunnelDefaults({
8
+ basePath: GLOBAL_OBJ[TUNNEL_BASE_PATH_GLOBAL]
9
+ });
10
+ nitroApp.h3App.stack.unshift({
11
+ route: "",
12
+ handler: eventHandler((event) => {
13
+ if (!_INTERNAL_isServedTunnelRequest({ method: event.method, url: event.path })) {
14
+ return void 0;
15
+ }
16
+ return _INTERNAL_handleServedTunnelRequest(toWebRequest(event));
17
+ })
18
+ });
19
+ });
20
+
21
+ export { tunnelPlugin as default };
22
+ //# sourceMappingURL=tunnelPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tunnelPlugin.js","sources":["../../../src/nitro/tunnelPlugin.ts"],"sourcesContent":["import { GLOBAL_OBJ } from '@sentry/core';\nimport {\n _INTERNAL_handleServedTunnelRequest as handleServedTunnelRequest,\n _INTERNAL_isServedTunnelRequest as isServedTunnelRequest,\n _INTERNAL_setManagedTunnelDefaults as setManagedTunnelDefaults,\n} from '@sentry/core/server';\nimport { eventHandler, toWebRequest } from 'h3';\nimport type { NitroAppPlugin } from 'nitropack';\nimport { TUNNEL_BASE_PATH_GLOBAL } from '../common/tunnel';\n\n/**\n * Answers managed tunnel requests on SolidStart v1 (Nitro v2), from the first layer of the h3 app. That runs before\n * route rules, the app's middleware and routing. `withSentry` registers it.\n */\nexport default (nitroApp => {\n // The first layer sees the path before Nitro strips `server.baseURL`, so the tunnel is served under it. The server\n // bundle's banner sets the global before this plugin runs.\n setManagedTunnelDefaults({\n basePath: (GLOBAL_OBJ as { [TUNNEL_BASE_PATH_GLOBAL]?: string })[TUNNEL_BASE_PATH_GLOBAL],\n });\n\n // Not the `request` hook: h3 still runs the first layer after a hook answered, so route rules would act on the\n // sent response.\n nitroApp.h3App.stack.unshift({\n route: '',\n handler: eventHandler(event => {\n // Checked on the method and path first, so no other request's body gets wrapped in a web `Request`.\n if (!isServedTunnelRequest({ method: event.method, url: event.path })) {\n return undefined;\n }\n\n // `toWebRequest` also reads the body of the mock requests serverless presets pass through `localFetch`, which\n // aren't Node streams. A returned `Response` is sent and ends the request, `undefined` hands it on.\n return handleServedTunnelRequest(toWebRequest(event));\n }),\n });\n}) satisfies NitroAppPlugin;\n"],"names":["setManagedTunnelDefaults","isServedTunnelRequest","handleServedTunnelRequest"],"mappings":";;;;;AAcA,qBAAA,CAAgB,CAAA,QAAA,KAAY;AAG1B,EAAAA,kCAAA,CAAyB;AAAA,IACvB,QAAA,EAAW,WAAsD,uBAAuB;AAAA,GACzF,CAAA;AAID,EAAA,QAAA,CAAS,KAAA,CAAM,MAAM,OAAA,CAAQ;AAAA,IAC3B,KAAA,EAAO,EAAA;AAAA,IACP,OAAA,EAAS,aAAa,CAAA,KAAA,KAAS;AAE7B,MAAA,IAAI,CAACC,+BAAA,CAAsB,EAAE,MAAA,EAAQ,KAAA,CAAM,QAAQ,GAAA,EAAK,KAAA,CAAM,IAAA,EAAM,CAAA,EAAG;AACrE,QAAA,OAAO,MAAA;AAAA,MACT;AAIA,MAAA,OAAOC,mCAAA,CAA0B,YAAA,CAAa,KAAK,CAAC,CAAA;AAAA,IACtD,CAAC;AAAA,GACF,CAAA;AACH,CAAA;;;;"}
@@ -1 +1 @@
1
- {"type":"module","version":"11.9.0"}
1
+ {"type":"module","version":"11.11.0"}
@@ -1,5 +1,5 @@
1
1
  export * from '@sentry/node';
2
- export { NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Scope, addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, bindScopeToEmitter, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, consoleIntegration, consoleLoggingIntegration, contextLinesIntegration, continueTrace, createConsolaReporter, createGetModuleFromFilename, createSentryWinstonTransport, createTransport, cron, dedupeIntegration, defaultStackParser, disableAnrDetectionForCallback, endSession, eventFiltersIntegration, expressErrorHandler, expressIntegration, extraErrorDataIntegration, fastifyIntegration, flush, functionToStringIntegration, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, honoIntegration, honoMiddleware, httpIntegration, httpServerIntegration, httpServerSpansIntegration, initOpenTelemetry, instrumentSupabaseClient, isEnabled, isInitialized, kafkaIntegration, knexIntegration, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, logger, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, neonIntegration, nitroIntegration, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, postgresJsIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, setAttribute, setAttributes, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, spanStreamingIntegration, spanToBaggageHeader, spanToJSON, spanToStaticSpanJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, supabaseIntegration, suppressTracing, tediousIntegration, trpcMiddleware, updateSpanName, withActiveSpan, withIsolationScope, withMonitor, withScope, withStaticSpan, withStreamedSpan, zodErrorsIntegration } from '@sentry/node';
2
+ export { NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Scope, addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, bindScopeToEmitter, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, consoleIntegration, consoleLoggingIntegration, contextLinesIntegration, continueTrace, createConsolaReporter, createGetModuleFromFilename, createSentryWinstonTransport, createTransport, cron, cronJobIntegration, dedupeIntegration, defaultStackParser, disableAnrDetectionForCallback, endSession, eventFiltersIntegration, expressErrorHandler, expressIntegration, extraErrorDataIntegration, fastifyIntegration, flush, functionToStringIntegration, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, getTunnelPath, graphqlIntegration, handleTunnelRequest, handleTunnelRequestIfMatched, hapiIntegration, honoIntegration, honoMiddleware, httpIntegration, httpServerIntegration, httpServerSpansIntegration, initOpenTelemetry, instrumentSupabaseClient, isEnabled, isInitialized, isTunnelRequest, kafkaIntegration, knexIntegration, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, logger, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, neonIntegration, nitroIntegration, nodeContextIntegration, nodeCronIntegration, nodeScheduleIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, postgresJsIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, serveTunnelIntegration, setAttribute, setAttributes, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, spanStreamingIntegration, spanToBaggageHeader, spanToJSON, spanToStaticSpanJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, supabaseIntegration, suppressTracing, tediousIntegration, trpcMiddleware, updateSpanName, withActiveSpan, withIsolationScope, withMonitor, withScope, withStaticSpan, withStreamedSpan, zodErrorsIntegration } from '@sentry/node';
3
3
  export { withSentryErrorBoundary } from '@sentry/solid';
4
4
  export { init } from './sdk.js';
5
5
  export { withServerActionInstrumentation } from './withServerActionInstrumentation.js';
@@ -1,2 +1,3 @@
1
1
  export { sentrySolidStart } from './sentrySolidStart.js';
2
+ export { withSentry } from '../config/withSentry.js';
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,4 +1,4 @@
1
- import { warnOnRemovedBuildOptions } from '@sentry/core';
1
+ import { warnOnRemovedBuildOptions, _INTERNAL_normalizeTunnelBasePath } from '@sentry/core';
2
2
  import { setupSentryNitroModule } from '@sentry/nitro';
3
3
  import { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/vite';
4
4
  import { makeAddSentryVitePluginSolidStart2, makeEnableSourceMapsVitePlugin } from './sourceMaps.js';
@@ -21,12 +21,18 @@ function makeSentryNitroPlugin(options) {
21
21
  enforce: "pre",
22
22
  config(userConfig) {
23
23
  const userNitro = userConfig.nitro;
24
+ const tunnelBasePath = _INTERNAL_normalizeTunnelBasePath(userConfig.server?.baseURL || userConfig.base);
24
25
  return {
25
- nitro: setupSentryNitroModule(
26
- // `sourcemap` decides whether Sentry enables its own; `tracingChannel` is left as the user set it.
27
- { sourcemap: userNitro?.sourcemap, tracingChannel: userNitro?.tracingChannel },
28
- options
29
- )
26
+ define: { __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__: JSON.stringify(tunnelBasePath) },
27
+ nitro: {
28
+ ...setupSentryNitroModule(
29
+ // `sourcemap` decides whether Sentry enables its own; `tracingChannel` is left as the user set it.
30
+ { sourcemap: userNitro?.sourcemap, tracingChannel: userNitro?.tracingChannel },
31
+ options
32
+ ),
33
+ // `@sentry/nitro` serves the tunnel under this instead of Nitro's `baseURL`.
34
+ ...tunnelBasePath && { runtimeConfig: { sentryTunnelBasePath: tunnelBasePath } }
35
+ }
30
36
  };
31
37
  }
32
38
  };
@@ -1 +1 @@
1
- {"version":3,"file":"sentrySolidStart.js","sources":["../../../src/vite/sentrySolidStart.ts"],"sourcesContent":["import { type BuildTimeOptionsBase, warnOnRemovedBuildOptions } from '@sentry/core';\nimport { setupSentryNitroModule } from '@sentry/nitro';\nimport { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/vite';\nimport type { Plugin, UserConfig } from 'vite';\nimport { makeAddSentryVitePluginSolidStart2, makeEnableSourceMapsVitePlugin } from './sourceMaps';\n\n/**\n * Build-time options for the Sentry SolidStart SDK on SolidStart 2.\n */\nexport type SentrySolidStartOptions = BuildTimeOptionsBase;\n\n/**\n * Vite plugins for the Sentry SolidStart SDK. Requires SolidStart 2.\n *\n * On SolidStart 1, use `withSentry` in `app.config.ts` instead.\n *\n * @example\n * ```typescript\n * // vite.config.ts\n * import { sentrySolidStart } from '@sentry/solidstart/vite';\n * import { solidStart } from '@solidjs/start/config';\n * import { nitro } from 'nitro/vite';\n * import { defineConfig } from 'vite';\n *\n * export default defineConfig({\n * plugins: [\n * solidStart(),\n * sentrySolidStart({\n * org: 'your-org',\n * project: 'your-project',\n * }),\n * nitro(),\n * ],\n * });\n * ```\n *\n * @param options - Options to configure the Sentry Vite plugins\n * @returns An array of Vite plugins\n */\nexport function sentrySolidStart(options: SentrySolidStartOptions = {}): Plugin[] {\n warnOnRemovedBuildOptions(options, ['unstable_sentryVitePluginOptions']);\n\n const plugins: Plugin[] = [makeSentryNitroPlugin(options)];\n\n // Only the Nitro plugin is dev-safe; its module handles `dev` itself.\n if (process.env.NODE_ENV === 'development') {\n return plugins;\n }\n\n // Injects `diagnostics_channel` publishers into instrumented deps at build time, which is what\n // lets `Sentry.init()` run from a bundled Nitro plugin rather than an `--import` preload.\n plugins.push(sentryOrchestrionPlugin({ buildTimeInstrumentation: options.buildTimeInstrumentation }));\n\n if (options.sourcemaps?.disable !== true) {\n plugins.push(...makeAddSentryVitePluginSolidStart2(options), ...makeEnableSourceMapsVitePlugin(options));\n }\n\n return plugins;\n}\n\n// Nitro's `NitroConfig` only matches `@sentry/nitro`'s when both resolve the same `nitro` install,\n// which is not guaranteed, so the key stays opaque rather than coupling the two copies.\ntype ViteConfigWithNitro = UserConfig & { nitro?: Record<string, unknown> };\n\n/**\n * Delivers everything only Nitro can reach — server source maps, runtime hooks, the\n * `sourcemapMinify` opt-out — through Vite's `nitro` key.\n *\n * `setupSentryNitroModule` is handed only the keys it reads, never the user's whole config, so what\n * comes back is purely Sentry's additions. Vite concatenates arrays when merging a `config` return\n * value, so echoing the user's own `modules`/`plugins` back would duplicate every entry.\n *\n * `enforce: 'pre'` is load-bearing: Nitro creates its instance inside its own `config` hook, so a\n * normal-priority hook sorting after it would be read too late and silently ignored.\n */\nfunction makeSentryNitroPlugin(options: SentrySolidStartOptions): Plugin {\n return {\n name: 'sentry-solidstart-nitro',\n enforce: 'pre',\n config(userConfig: ViteConfigWithNitro) {\n const userNitro = userConfig.nitro;\n\n return {\n nitro: setupSentryNitroModule(\n // `sourcemap` decides whether Sentry enables its own; `tracingChannel` is left as the user set it.\n { sourcemap: userNitro?.sourcemap, tracingChannel: userNitro?.tracingChannel } as Parameters<\n typeof setupSentryNitroModule\n >[0],\n options,\n ) as Record<string, unknown>,\n } as Omit<UserConfig, 'plugins'>;\n },\n };\n}\n"],"names":[],"mappings":";;;;;AAuCO,SAAS,gBAAA,CAAiB,OAAA,GAAmC,EAAC,EAAa;AAChF,EAAA,yBAAA,CAA0B,OAAA,EAAS,CAAC,kCAAkC,CAAC,CAAA;AAEvE,EAAA,MAAM,OAAA,GAAoB,CAAC,qBAAA,CAAsB,OAAO,CAAC,CAAA;AAGzD,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,aAAA,EAAe;AAC1C,IAAA,OAAO,OAAA;AAAA,EACT;AAIA,EAAA,OAAA,CAAQ,KAAK,uBAAA,CAAwB,EAAE,0BAA0B,OAAA,CAAQ,wBAAA,EAA0B,CAAC,CAAA;AAEpG,EAAA,IAAI,OAAA,CAAQ,UAAA,EAAY,OAAA,KAAY,IAAA,EAAM;AACxC,IAAA,OAAA,CAAQ,IAAA,CAAK,GAAG,kCAAA,CAAmC,OAAO,GAAG,GAAG,8BAAA,CAA+B,OAAO,CAAC,CAAA;AAAA,EACzG;AAEA,EAAA,OAAO,OAAA;AACT;AAiBA,SAAS,sBAAsB,OAAA,EAA0C;AACvE,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,yBAAA;AAAA,IACN,OAAA,EAAS,KAAA;AAAA,IACT,OAAO,UAAA,EAAiC;AACtC,MAAA,MAAM,YAAY,UAAA,CAAW,KAAA;AAE7B,MAAA,OAAO;AAAA,QACL,KAAA,EAAO,sBAAA;AAAA;AAAA,UAEL,EAAE,SAAA,EAAW,SAAA,EAAW,SAAA,EAAW,cAAA,EAAgB,WAAW,cAAA,EAAe;AAAA,UAG7E;AAAA;AACF,OACF;AAAA,IACF;AAAA,GACF;AACF;;;;"}
1
+ {"version":3,"file":"sentrySolidStart.js","sources":["../../../src/vite/sentrySolidStart.ts"],"sourcesContent":["import {\n type BuildTimeOptionsBase,\n _INTERNAL_normalizeTunnelBasePath as normalizeTunnelBasePath,\n warnOnRemovedBuildOptions,\n} from '@sentry/core';\nimport { setupSentryNitroModule } from '@sentry/nitro';\nimport { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/vite';\nimport type { Plugin, UserConfig } from 'vite';\nimport { makeAddSentryVitePluginSolidStart2, makeEnableSourceMapsVitePlugin } from './sourceMaps';\n\n/**\n * Build-time options for the Sentry SolidStart SDK on SolidStart 2.\n */\nexport type SentrySolidStartOptions = BuildTimeOptionsBase;\n\n/**\n * Vite plugins for the Sentry SolidStart SDK. Requires SolidStart 2.\n *\n * On SolidStart 1, use `withSentry` in `app.config.ts` instead.\n *\n * @example\n * ```typescript\n * // vite.config.ts\n * import { sentrySolidStart } from '@sentry/solidstart/vite';\n * import { solidStart } from '@solidjs/start/config';\n * import { nitro } from 'nitro/vite';\n * import { defineConfig } from 'vite';\n *\n * export default defineConfig({\n * plugins: [\n * solidStart(),\n * sentrySolidStart({\n * org: 'your-org',\n * project: 'your-project',\n * }),\n * nitro(),\n * ],\n * });\n * ```\n *\n * @param options - Options to configure the Sentry Vite plugins\n * @returns An array of Vite plugins\n */\nexport function sentrySolidStart(options: SentrySolidStartOptions = {}): Plugin[] {\n warnOnRemovedBuildOptions(options, ['unstable_sentryVitePluginOptions']);\n\n const plugins: Plugin[] = [makeSentryNitroPlugin(options)];\n\n // Only the Nitro plugin is dev-safe; its module handles `dev` itself.\n if (process.env.NODE_ENV === 'development') {\n return plugins;\n }\n\n // Injects `diagnostics_channel` publishers into instrumented deps at build time, which is what\n // lets `Sentry.init()` run from a bundled Nitro plugin rather than an `--import` preload.\n plugins.push(sentryOrchestrionPlugin({ buildTimeInstrumentation: options.buildTimeInstrumentation }));\n\n if (options.sourcemaps?.disable !== true) {\n plugins.push(...makeAddSentryVitePluginSolidStart2(options), ...makeEnableSourceMapsVitePlugin(options));\n }\n\n return plugins;\n}\n\n// Nitro's `NitroConfig` only matches `@sentry/nitro`'s when both resolve the same `nitro` install,\n// which is not guaranteed, so the key stays opaque rather than coupling the two copies.\ntype ViteConfigWithNitro = UserConfig & {\n nitro?: Record<string, unknown>;\n server?: UserConfig['server'] & { baseURL?: string };\n};\n\n/**\n * Delivers everything only Nitro can reach — server source maps, runtime hooks, the\n * `sourcemapMinify` opt-out — through Vite's `nitro` key, and the app's base path to the browser SDK.\n *\n * `setupSentryNitroModule` is handed only the keys it reads, never the user's whole config, so what\n * comes back is purely Sentry's additions. Vite concatenates arrays when merging a `config` return\n * value, so echoing the user's own `modules`/`plugins` back would duplicate every entry.\n *\n * `enforce: 'pre'` is load-bearing: Nitro creates its instance inside its own `config` hook, so a\n * normal-priority hook sorting after it would be read too late and silently ignored.\n */\nfunction makeSentryNitroPlugin(options: SentrySolidStartOptions): Plugin {\n return {\n name: 'sentry-solidstart-nitro',\n enforce: 'pre',\n config(userConfig: ViteConfigWithNitro) {\n const userNitro = userConfig.nitro;\n // SolidStart serves the app under Vite's `base` (or `server.baseURL`), not Nitro's `baseURL`, so the browser\n // and the server both serve the managed tunnel under it.\n const tunnelBasePath = normalizeTunnelBasePath(userConfig.server?.baseURL || userConfig.base);\n\n return {\n define: { __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__: JSON.stringify(tunnelBasePath) },\n nitro: {\n ...(setupSentryNitroModule(\n // `sourcemap` decides whether Sentry enables its own; `tracingChannel` is left as the user set it.\n { sourcemap: userNitro?.sourcemap, tracingChannel: userNitro?.tracingChannel } as Parameters<\n typeof setupSentryNitroModule\n >[0],\n options,\n ) as Record<string, unknown>),\n // `@sentry/nitro` serves the tunnel under this instead of Nitro's `baseURL`.\n ...(tunnelBasePath && { runtimeConfig: { sentryTunnelBasePath: tunnelBasePath } }),\n },\n } as Omit<UserConfig, 'plugins'>;\n },\n };\n}\n"],"names":["normalizeTunnelBasePath"],"mappings":";;;;;AA2CO,SAAS,gBAAA,CAAiB,OAAA,GAAmC,EAAC,EAAa;AAChF,EAAA,yBAAA,CAA0B,OAAA,EAAS,CAAC,kCAAkC,CAAC,CAAA;AAEvE,EAAA,MAAM,OAAA,GAAoB,CAAC,qBAAA,CAAsB,OAAO,CAAC,CAAA;AAGzD,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,aAAA,EAAe;AAC1C,IAAA,OAAO,OAAA;AAAA,EACT;AAIA,EAAA,OAAA,CAAQ,KAAK,uBAAA,CAAwB,EAAE,0BAA0B,OAAA,CAAQ,wBAAA,EAA0B,CAAC,CAAA;AAEpG,EAAA,IAAI,OAAA,CAAQ,UAAA,EAAY,OAAA,KAAY,IAAA,EAAM;AACxC,IAAA,OAAA,CAAQ,IAAA,CAAK,GAAG,kCAAA,CAAmC,OAAO,GAAG,GAAG,8BAAA,CAA+B,OAAO,CAAC,CAAA;AAAA,EACzG;AAEA,EAAA,OAAO,OAAA;AACT;AAoBA,SAAS,sBAAsB,OAAA,EAA0C;AACvE,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,yBAAA;AAAA,IACN,OAAA,EAAS,KAAA;AAAA,IACT,OAAO,UAAA,EAAiC;AACtC,MAAA,MAAM,YAAY,UAAA,CAAW,KAAA;AAG7B,MAAA,MAAM,iBAAiBA,iCAAA,CAAwB,UAAA,CAAW,MAAA,EAAQ,OAAA,IAAW,WAAW,IAAI,CAAA;AAE5F,MAAA,OAAO;AAAA,QACL,QAAQ,EAAE,sCAAA,EAAwC,IAAA,CAAK,SAAA,CAAU,cAAc,CAAA,EAAE;AAAA,QACjF,KAAA,EAAO;AAAA,UACL,GAAI,sBAAA;AAAA;AAAA,YAEF,EAAE,SAAA,EAAW,SAAA,EAAW,SAAA,EAAW,cAAA,EAAgB,WAAW,cAAA,EAAe;AAAA,YAG7E;AAAA,WACF;AAAA;AAAA,UAEA,GAAI,cAAA,IAAkB,EAAE,eAAe,EAAE,oBAAA,EAAsB,gBAAe;AAAE;AAClF,OACF;AAAA,IACF;AAAA,GACF;AACF;;;;"}
@@ -2,9 +2,17 @@ import { warnOnRemovedBuildOptions } from '@sentry/core';
2
2
  import { makeBuildInstrumentationFilePlugin } from './buildInstrumentationFile.js';
3
3
  import { makeAddSentryVitePlugin, makeEnableSourceMapsVitePlugin } from './sourceMaps.js';
4
4
 
5
- const sentrySolidStartVite = (options = {}, viteConfig) => {
5
+ const sentrySolidStartVite = (options = {}, viteConfig, tunnelBasePath = "") => {
6
6
  warnOnRemovedBuildOptions(options, ["unstable_sentryVitePluginOptions"]);
7
- const sentryPlugins = [];
7
+ const sentryPlugins = [
8
+ {
9
+ name: "sentry-solidstart-tunnel-base-path",
10
+ // Serves the browser's managed tunnel under `server.baseURL`, like every other route of the app.
11
+ config: () => ({
12
+ define: { __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__: JSON.stringify(tunnelBasePath) }
13
+ })
14
+ }
15
+ ];
8
16
  if (options.autoInjectServerSentry !== "experimental_dynamic-import") {
9
17
  sentryPlugins.push(makeBuildInstrumentationFilePlugin(options));
10
18
  }
@@ -17,9 +25,9 @@ const sentrySolidStartVite = (options = {}, viteConfig) => {
17
25
  }
18
26
  return sentryPlugins;
19
27
  };
20
- const addSentryPluginToVite = (config = {}, options) => {
28
+ const addSentryPluginToVite = (config = {}, options, tunnelBasePath) => {
21
29
  const plugins = Array.isArray(config.plugins) ? [...config.plugins] : [];
22
- plugins.unshift(sentrySolidStartVite(options, config));
30
+ plugins.unshift(sentrySolidStartVite(options, config, tunnelBasePath));
23
31
  return {
24
32
  ...config,
25
33
  plugins
@@ -1 +1 @@
1
- {"version":3,"file":"sentrySolidStartVite.js","sources":["../../../src/vite/sentrySolidStartVite.ts"],"sourcesContent":["import { warnOnRemovedBuildOptions } from '@sentry/core';\nimport type { Plugin, UserConfig } from 'vite';\nimport { makeBuildInstrumentationFilePlugin } from './buildInstrumentationFile';\nimport { makeAddSentryVitePlugin, makeEnableSourceMapsVitePlugin } from './sourceMaps';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n/**\n * Various Sentry vite plugins to be used for SolidStart.\n */\nexport const sentrySolidStartVite = (options: SentrySolidStartPluginOptions = {}, viteConfig: UserConfig): Plugin[] => {\n warnOnRemovedBuildOptions(options, ['unstable_sentryVitePluginOptions']);\n\n const sentryPlugins: Plugin[] = [];\n\n if (options.autoInjectServerSentry !== 'experimental_dynamic-import') {\n sentryPlugins.push(makeBuildInstrumentationFilePlugin(options));\n }\n\n if (process.env.NODE_ENV !== 'development') {\n if (options.sourcemaps?.disable !== true) {\n const sourceMapsPlugin = makeAddSentryVitePlugin(options, viteConfig);\n const enableSourceMapsPlugin = makeEnableSourceMapsVitePlugin(options);\n\n sentryPlugins.push(...sourceMapsPlugin, ...enableSourceMapsPlugin);\n }\n }\n\n return sentryPlugins;\n};\n\n/**\n * Helper to add the Sentry SolidStart vite plugin to a vite config.\n */\nexport const addSentryPluginToVite = (config: UserConfig = {}, options: SentrySolidStartPluginOptions): UserConfig => {\n const plugins = Array.isArray(config.plugins) ? [...config.plugins] : [];\n plugins.unshift(sentrySolidStartVite(options, config));\n\n return {\n ...config,\n plugins,\n };\n};\n"],"names":[],"mappings":";;;;AASO,MAAM,oBAAA,GAAuB,CAAC,OAAA,GAAyC,IAAI,UAAA,KAAqC;AACrH,EAAA,yBAAA,CAA0B,OAAA,EAAS,CAAC,kCAAkC,CAAC,CAAA;AAEvE,EAAA,MAAM,gBAA0B,EAAC;AAEjC,EAAA,IAAI,OAAA,CAAQ,2BAA2B,6BAAA,EAA+B;AACpE,IAAA,aAAA,CAAc,IAAA,CAAK,kCAAA,CAAmC,OAAO,CAAC,CAAA;AAAA,EAChE;AAEA,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,aAAA,EAAe;AAC1C,IAAA,IAAI,OAAA,CAAQ,UAAA,EAAY,OAAA,KAAY,IAAA,EAAM;AACxC,MAAA,MAAM,gBAAA,GAAmB,uBAAA,CAAwB,OAAA,EAAS,UAAU,CAAA;AACpE,MAAA,MAAM,sBAAA,GAAyB,+BAA+B,OAAO,CAAA;AAErE,MAAA,aAAA,CAAc,IAAA,CAAK,GAAG,gBAAA,EAAkB,GAAG,sBAAsB,CAAA;AAAA,IACnE;AAAA,EACF;AAEA,EAAA,OAAO,aAAA;AACT;AAKO,MAAM,qBAAA,GAAwB,CAAC,MAAA,GAAqB,IAAI,OAAA,KAAuD;AACpH,EAAA,MAAM,OAAA,GAAU,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAA,GAAI,CAAC,GAAG,MAAA,CAAO,OAAO,CAAA,GAAI,EAAC;AACvE,EAAA,OAAA,CAAQ,OAAA,CAAQ,oBAAA,CAAqB,OAAA,EAAS,MAAM,CAAC,CAAA;AAErD,EAAA,OAAO;AAAA,IACL,GAAG,MAAA;AAAA,IACH;AAAA,GACF;AACF;;;;"}
1
+ {"version":3,"file":"sentrySolidStartVite.js","sources":["../../../src/vite/sentrySolidStartVite.ts"],"sourcesContent":["import { warnOnRemovedBuildOptions } from '@sentry/core';\nimport type { Plugin, UserConfig } from 'vite';\nimport { makeBuildInstrumentationFilePlugin } from './buildInstrumentationFile';\nimport { makeAddSentryVitePlugin, makeEnableSourceMapsVitePlugin } from './sourceMaps';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n/**\n * Various Sentry vite plugins to be used for SolidStart.\n */\nexport const sentrySolidStartVite = (\n options: SentrySolidStartPluginOptions = {},\n viteConfig: UserConfig,\n tunnelBasePath = '',\n): Plugin[] => {\n warnOnRemovedBuildOptions(options, ['unstable_sentryVitePluginOptions']);\n\n const sentryPlugins: Plugin[] = [\n {\n name: 'sentry-solidstart-tunnel-base-path',\n // Serves the browser's managed tunnel under `server.baseURL`, like every other route of the app.\n config: () => ({\n define: { __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__: JSON.stringify(tunnelBasePath) },\n }),\n },\n ];\n\n if (options.autoInjectServerSentry !== 'experimental_dynamic-import') {\n sentryPlugins.push(makeBuildInstrumentationFilePlugin(options));\n }\n\n if (process.env.NODE_ENV !== 'development') {\n if (options.sourcemaps?.disable !== true) {\n const sourceMapsPlugin = makeAddSentryVitePlugin(options, viteConfig);\n const enableSourceMapsPlugin = makeEnableSourceMapsVitePlugin(options);\n\n sentryPlugins.push(...sourceMapsPlugin, ...enableSourceMapsPlugin);\n }\n }\n\n return sentryPlugins;\n};\n\n/**\n * Helper to add the Sentry SolidStart vite plugin to a vite config.\n */\nexport const addSentryPluginToVite = (\n config: UserConfig = {},\n options: SentrySolidStartPluginOptions,\n tunnelBasePath?: string,\n): UserConfig => {\n const plugins = Array.isArray(config.plugins) ? [...config.plugins] : [];\n plugins.unshift(sentrySolidStartVite(options, config, tunnelBasePath));\n\n return {\n ...config,\n plugins,\n };\n};\n"],"names":[],"mappings":";;;;AASO,MAAM,uBAAuB,CAClC,OAAA,GAAyC,EAAC,EAC1C,UAAA,EACA,iBAAiB,EAAA,KACJ;AACb,EAAA,yBAAA,CAA0B,OAAA,EAAS,CAAC,kCAAkC,CAAC,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,MAAM,cAAc,CAAC;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAUpD;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAShE"}
1
+ {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/client/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,cAAc,CAAC;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAWpD;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAUhE"}
@@ -0,0 +1,9 @@
1
+ import type { Options } from '@sentry/core';
2
+ /** Set on the server by `withSentry` to the app's `server.baseURL`. */
3
+ export declare const TUNNEL_BASE_PATH_GLOBAL = "__sentry_solidstart_base_path";
4
+ /**
5
+ * Serves the browser's managed tunnel under the app's base path, which `withSentry` (SolidStart 1) or
6
+ * `sentrySolidStart` (SolidStart 2) defines at build time. A `basePath` the user set wins.
7
+ */
8
+ export declare function applyTunnelBasePath(options: Pick<Options, 'tunnel'>): void;
9
+ //# sourceMappingURL=tunnel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tunnel.d.ts","sourceRoot":"","sources":["../../../src/common/tunnel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,uEAAuE;AACvE,eAAO,MAAM,uBAAuB,kCAAkC,CAAC;AAIvE;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,GAAG,IAAI,CAI1E"}
@@ -5,6 +5,7 @@ export type RollupConfig = {
5
5
  };
6
6
  export type SolidStartInlineConfig = NonNullable<Parameters<typeof defineConfig>[0]>;
7
7
  export type SolidStartInlineServerConfig = {
8
+ plugins?: string[];
8
9
  hooks?: {
9
10
  close?: () => unknown;
10
11
  'rollup:before'?: (nitro: Nitro) => unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAGvC,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,OAAO,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAErF,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,CAAC,EAAE;QACN,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC;QACtB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC;KAC7C,CAAC;CACH,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAGvC,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,OAAO,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAErF,MAAM,MAAM,4BAA4B,GAAG;IACzC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE;QACN,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC;QACtB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC;KAC7C,CAAC;CACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"withSentry.d.ts","sourceRoot":"","sources":["../../../src/config/withSentry.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AAMnE,OAAO,KAAK,EAAgB,sBAAsB,EAAgC,MAAM,SAAS,CAAC;AAclG;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,gBAAgB,EAAE,sBAAsB,YAAK,EAC7C,6BAA6B,EAAE,6BAA6B,GAC3D,sBAAsB,CA+ExB"}
1
+ {"version":3,"file":"withSentry.d.ts","sourceRoot":"","sources":["../../../src/config/withSentry.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AAMnE,OAAO,KAAK,EAAgB,sBAAsB,EAAgC,MAAM,SAAS,CAAC;AAclG;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,gBAAgB,EAAE,sBAAsB,YAAK,EAC7C,6BAA6B,EAAE,6BAA6B,GAC3D,sBAAsB,CAmGxB"}
@@ -1,3 +1,8 @@
1
+ import { withSentry as _withSentry } from './config';
1
2
  export * from './server';
2
- export * from './config';
3
+ /**
4
+ * @deprecated Import `withSentry` from `@sentry/solidstart/vite` instead.
5
+ * This export will be removed in the next major version.
6
+ */
7
+ export declare const withSentry: typeof _withSentry;
3
8
  //# sourceMappingURL=index.server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../../src/index.server.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../../src/index.server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AAErD,cAAc,UAAU,CAAC;AAEzB;;;GAGG;AACH,eAAO,MAAM,UAAU,oBAAc,CAAC"}
@@ -1,9 +1,14 @@
1
1
  import type { Client, Integration, Options, StackParser } from '@sentry/core';
2
2
  import type * as clientSdk from './client';
3
+ import type * as configSdk from './config';
3
4
  import type * as serverSdk from './server';
4
5
  export * from './client';
5
6
  export * from './server';
6
- export * from './config';
7
+ /**
8
+ * @deprecated Import `withSentry` from `@sentry/solidstart/vite` instead.
9
+ * This export will be removed in the next major version.
10
+ */
11
+ export declare const withSentry: typeof configSdk.withSentry;
7
12
  /** Initializes Sentry Solid Start SDK */
8
13
  export declare function init(options: Options | clientSdk.BrowserOptions | serverSdk.NodeOptions): Client | undefined;
9
14
  export declare const linkedErrorsIntegration: typeof clientSdk.linkedErrorsIntegration;
@@ -1 +1 @@
1
- {"version":3,"file":"index.types.d.ts","sourceRoot":"","sources":["../../src/index.types.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,KAAK,KAAK,SAAS,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,KAAK,SAAS,MAAM,UAAU,CAAC;AAE3C,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AAEzB,yCAAyC;AACzC,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC,cAAc,GAAG,SAAS,CAAC,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;AAEtH,MAAM,CAAC,OAAO,CAAC,MAAM,uBAAuB,EAAE,OAAO,SAAS,CAAC,uBAAuB,CAAC;AACvF,MAAM,CAAC,OAAO,CAAC,MAAM,kBAAkB,EAAE,OAAO,SAAS,CAAC,kBAAkB,CAAC;AAC7E,MAAM,CAAC,OAAO,CAAC,MAAM,uBAAuB,EAAE,OAAO,SAAS,CAAC,uBAAuB,CAAC;AACvF,MAAM,CAAC,OAAO,CAAC,MAAM,SAAS,EAAE,OAAO,SAAS,CAA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AAM,CAAC,OAAO,CAAC,MAAM,kBAAkB,EAAE,OAAO,SAAS,CAAC,kBAAkB,CAAC;AAC7E,MAAM,CAAC,OAAO,CAAC,MAAM,kBAAkB,EAAE,OAAO,SAAS,CAAC,kBAAkB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Answers managed tunnel requests on SolidStart v1 (Nitro v2), from the first layer of the h3 app. That runs before
3
+ * route rules, the app's middleware and routing. `withSentry` registers it.
4
+ */
5
+ declare const _default: (nitroApp: import("nitropack").NitroApp) => void;
6
+ export default _default;
7
+ //# sourceMappingURL=tunnelPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tunnelPlugin.d.ts","sourceRoot":"","sources":["../../../src/nitro/tunnelPlugin.ts"],"names":[],"mappings":"AAUA;;;GAGG"}
@@ -1,4 +1,4 @@
1
- export { addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, disableAnrDetectionForCallback, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, consoleIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createTransport, cron, dedupeIntegration, defaultStackParser, endSession, expressErrorHandler, expressIntegration, extraErrorDataIntegration, fastifyIntegration, flush, functionToStringIntegration, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, httpIntegration, httpServerIntegration, httpServerSpansIntegration, eventFiltersIntegration, initOpenTelemetry, isInitialized, isEnabled, knexIntegration, kafkaIntegration, honoIntegration, honoMiddleware, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, nitroIntegration, mysqlIntegration, nativeNodeFetchIntegration, NodeClient, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, postgresJsIntegration, neonIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, Scope, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setAttribute, setAttributes, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, setUser, spanToBaggageHeader, spanToStaticSpanJSON, spanToJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, bindScopeToEmitter, suppressTracing, startSession, startSpan, startSpanManual, tediousIntegration, trpcMiddleware, updateSpanName, withActiveSpan, withIsolationScope, withMonitor, withScope, supabaseIntegration, instrumentSupabaseClient, zodErrorsIntegration, logger, consoleLoggingIntegration, createConsolaReporter, createSentryWinstonTransport, spanStreamingIntegration, withStaticSpan, withStreamedSpan, } from '@sentry/node';
1
+ export { addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, disableAnrDetectionForCallback, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, consoleIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createTransport, cron, dedupeIntegration, defaultStackParser, endSession, expressErrorHandler, expressIntegration, extraErrorDataIntegration, fastifyIntegration, flush, functionToStringIntegration, genericPoolIntegration, cronJobIntegration, nodeCronIntegration, nodeScheduleIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, httpIntegration, httpServerIntegration, httpServerSpansIntegration, eventFiltersIntegration, initOpenTelemetry, isInitialized, isEnabled, knexIntegration, kafkaIntegration, honoIntegration, honoMiddleware, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, nitroIntegration, mysqlIntegration, nativeNodeFetchIntegration, NodeClient, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, postgresJsIntegration, neonIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, Scope, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setAttribute, setAttributes, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, setUser, spanToBaggageHeader, spanToStaticSpanJSON, spanToJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, bindScopeToEmitter, suppressTracing, startSession, startSpan, startSpanManual, tediousIntegration, trpcMiddleware, serveTunnelIntegration, getTunnelPath, handleTunnelRequest, handleTunnelRequestIfMatched, isTunnelRequest, updateSpanName, withActiveSpan, withIsolationScope, withMonitor, withScope, supabaseIntegration, instrumentSupabaseClient, zodErrorsIntegration, logger, consoleLoggingIntegration, createConsolaReporter, createSentryWinstonTransport, spanStreamingIntegration, withStaticSpan, withStreamedSpan, } from '@sentry/node';
2
2
  export * from '@sentry/node';
3
3
  export { withSentryErrorBoundary } from '@sentry/solid';
4
4
  export { init } from './sdk';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAElB,cAAc,EAEd,8BAA8B,EAC9B,cAAc,EACd,yBAAyB,EACzB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,cAAc,EACd,KAAK,EACL,kBAAkB,EAClB,uBAA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kB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,MAAM,EACN,yBAAyB,EACzB,qBAAqB,EACrB,4BAA4B,EAC5B,wBAAwB,EACxB,cAAc,EAEd,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAGtB,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAIxD,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAE7B,cAAc,mCAAmC,CAAC;AAClD,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAElB,cAAc,EAEd,8BAA8B,EAC9B,cAAc,EACd,yBAAyB,EACzB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,cAAc,EACd,KAAK,EACL,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,EACb,2BAA2B,EAC3B,eAAe,EACf,IAAI,EACJ,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EAEV,mBAAmB,EACnB,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EAClB,KAAK,EACL,2BAA2B,EAC3B,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,aAAa,EACb,8BAA8B,EAC9B,SAAS,EACT,eAAe,EACf,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,EACvB,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,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1,4 @@
1
1
  export { sentrySolidStart } from './sentrySolidStart';
2
2
  export type { SentrySolidStartOptions } from './sentrySolidStart';
3
+ export { withSentry } from '../config/withSentry';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vite/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vite/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sentrySolidStart.d.ts","sourceRoot":"","sources":["../../../src/vite/sentrySolidStart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oBAAoB,EAA6B,MAAM,cAAc,CAAC;AAGpF,OAAO,KAAK,EAAE,MAAM,EAAc,MAAM,MAAM,CAAC;AAG/C;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,uBAA4B,GAAG,MAAM,EAAE,CAmBhF"}
1
+ {"version":3,"file":"sentrySolidStart.d.ts","sourceRoot":"","sources":["../../../src/vite/sentrySolidStart.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EAG1B,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,MAAM,EAAc,MAAM,MAAM,CAAC;AAG/C;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,uBAA4B,GAAG,MAAM,EAAE,CAmBhF"}
@@ -3,9 +3,9 @@ import type { SentrySolidStartPluginOptions } from './types';
3
3
  /**
4
4
  * Various Sentry vite plugins to be used for SolidStart.
5
5
  */
6
- export declare const sentrySolidStartVite: (options: SentrySolidStartPluginOptions | undefined, viteConfig: UserConfig) => Plugin[];
6
+ export declare const sentrySolidStartVite: (options: SentrySolidStartPluginOptions | undefined, viteConfig: UserConfig, tunnelBasePath?: string) => Plugin[];
7
7
  /**
8
8
  * Helper to add the Sentry SolidStart vite plugin to a vite config.
9
9
  */
10
- export declare const addSentryPluginToVite: (config: UserConfig | undefined, options: SentrySolidStartPluginOptions) => UserConfig;
10
+ export declare const addSentryPluginToVite: (config: UserConfig | undefined, options: SentrySolidStartPluginOptions, tunnelBasePath?: string) => UserConfig;
11
11
  //# sourceMappingURL=sentrySolidStartVite.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sentrySolidStartVite.d.ts","sourceRoot":"","sources":["../../../src/vite/sentrySolidStartVite.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAG/C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,oBAAoB,YAAa,6BAA6B,0BAAmB,UAAU,KAAG,MAAM,EAmBhH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,WAAY,UAAU,uBAAgB,6BAA6B,KAAG,UAQvG,CAAC"}
1
+ {"version":3,"file":"sentrySolidStartVite.d.ts","sourceRoot":"","sources":["../../../src/vite/sentrySolidStartVite.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAG/C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,oBAAoB,YACtB,6BAA6B,0BAC1B,UAAU,8BAErB,MAAM,EA2BR,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,WACxB,UAAU,uBACT,6BAA6B,mBACrB,MAAM,KACtB,UAQF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/solidstart",
3
- "version": "11.9.0",
3
+ "version": "11.11.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",
@@ -80,24 +80,30 @@
80
80
  }
81
81
  },
82
82
  "dependencies": {
83
- "@sentry/core": "11.9.0",
84
- "@sentry/nitro": "11.9.0",
85
- "@sentry/node": "11.9.0",
86
- "@sentry/server-runtime-injection": "11.9.0",
87
- "@sentry/server-utils": "11.9.0",
88
- "@sentry/solid": "11.9.0",
89
- "@sentry/bundler-plugins": "11.9.0",
90
- "@sentry/conventions": "0.27.0"
83
+ "@sentry/core": "11.11.0",
84
+ "@sentry/nitro": "11.11.0",
85
+ "@sentry/node": "11.11.0",
86
+ "@sentry/server-runtime-injection": "11.11.0",
87
+ "@sentry/server-utils": "11.11.0",
88
+ "@sentry/solid": "11.11.0",
89
+ "@sentry/bundler-plugins": "11.11.0",
90
+ "@sentry/conventions": "0.30.0",
91
+ "h3": "^1.15.10"
91
92
  },
92
93
  "devDependencies": {
94
+ "@sentry-internal/rollup-utils": "11.11.0",
95
+ "@sentry/browser": "11.11.0",
93
96
  "@solidjs/router": "^1.0.0",
94
97
  "@solidjs/start": "^1.3.2",
95
98
  "@solidjs/testing-library": "0.8.5",
96
99
  "@testing-library/jest-dom": "^6.9.1",
97
- "@testing-library/user-event": "^14.5.2",
98
- "solid-js": "^1.9.11",
100
+ "@testing-library/user-event": "^14.6.8",
101
+ "@types/node": "^20.19.0",
102
+ "nitropack": "^2.13.4",
103
+ "node-mock-http": "^1.0.4",
104
+ "solid-js": "^1.9.18",
99
105
  "vinxi": "^0.5.11",
100
- "vite": "^8.3.1",
106
+ "vite": "^8.3.5",
101
107
  "vite-plugin-solid": "^2.11.6"
102
108
  },
103
109
  "scripts": {
@@ -122,9 +128,6 @@
122
128
  "test:watch": "vitest --watch",
123
129
  "yalc:publish": "yalc publish --push --sig"
124
130
  },
125
- "volta": {
126
- "extends": "../../package.json"
127
- },
128
131
  "nx": {
129
132
  "targets": {
130
133
  "build:types": {