@sentry/solidstart 11.1.0 → 11.2.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.
@@ -24,7 +24,8 @@ function withSentry(solidStartConfig = {}, sentrySolidStartPluginOptions) {
24
24
  const sentryRollupConfig = rollupConfig;
25
25
  if (addBuildTimeInstrumentation) {
26
26
  sentryRollupConfig.plugins.push(
27
- rollup.sentryOrchestrionPlugin({ buildTimeInstrumentation: sentryPluginOptions.buildTimeInstrumentation })
27
+ rollup.sentryOrchestrionPlugin({ buildTimeInstrumentation: sentryPluginOptions.buildTimeInstrumentation }),
28
+ rollup.sentryCommonJSInteropPlugin()
28
29
  );
29
30
  }
30
31
  if (sentrySolidStartPluginOptions?.autoInjectServerSentry === "experimental_dynamic-import") {
@@ -46,12 +47,14 @@ function withSentry(solidStartConfig = {}, sentrySolidStartPluginOptions) {
46
47
  };
47
48
  const existingModules = server.modules || [];
48
49
  let externals = server.externals;
50
+ let commonJS = server.commonJS;
49
51
  if (addBuildTimeInstrumentation) {
50
52
  const existingInline = externals?.inline || [];
51
53
  externals = {
52
54
  ...externals,
53
55
  inline: [.../* @__PURE__ */ new Set([...existingInline, ...config.INSTRUMENTED_MODULE_NAMES, ...IORedisDependencies])]
54
56
  };
57
+ commonJS = { ...rollup.commonJSInteropOptions(), ...commonJS };
55
58
  }
56
59
  return {
57
60
  ...solidStartConfig,
@@ -59,6 +62,7 @@ function withSentry(solidStartConfig = {}, sentrySolidStartPluginOptions) {
59
62
  server: {
60
63
  ...server,
61
64
  externals,
65
+ commonJS,
62
66
  modules: [...existingModules, sentryNitroModule]
63
67
  }
64
68
  };
@@ -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 { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/rollup';\nimport type { Nitro } from 'nitropack';\nimport { addSentryPluginToVite } from '../vite/sentrySolidStartVite';\nimport type { SentrySolidStartPluginOptions } from '../vite/types';\nimport {\n addDynamicImportEntryFileWrapper,\n addInstrumentationFileToBuild,\n addSentryTopImport,\n} from './addInstrumentation';\nimport type { RollupConfig, SolidStartInlineConfig, SolidStartInlineServerConfig } from './types';\n\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 );\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 if (addBuildTimeInstrumentation) {\n const existingInline = externals?.inline || [];\n externals = {\n ...externals,\n inline: [...new Set([...existingInline, ...INSTRUMENTED_MODULE_NAMES, ...IORedisDependencies])],\n };\n }\n\n return {\n ...solidStartConfig,\n vite,\n server: {\n ...server,\n externals,\n modules: [...existingModules, sentryNitroModule],\n },\n };\n}\n"],"names":["addSentryPluginToVite","nitro","sentryOrchestrionPlugin","addDynamicImportEntryFileWrapper","debug","addInstrumentationFileToBuild","addSentryTopImport","INSTRUMENTED_MODULE_NAMES"],"mappings":";;;;;;;;AAeA,MAAM,mBAAA,GAAsB,CAAC,sBAAsB,CAAA;AAEnD,MAAM,oCAAA,GAIuF;AAAA,EAC3F,uCAAA,E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AAK,CAAA;AAEzC,QAAA,IAAI,6BAAA,EAA+B,2BAA2B,kBAAA,EAAoB;AAChF,UAAA,MAAMK,sCAAmBL,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,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,GAAGM,gCAAA,EAA2B,GAAG,mBAAmB,CAAC,CAAC;AAAA,KAChG;AAAA,EACF;AAEA,EAAA,OAAO;AAAA,IACL,GAAG,gBAAA;AAAA,IACH,IAAA;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,GAAG,MAAA;AAAA,MACH,SAAA;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 { 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,G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F;AAAA,MACJ,CAAA,MAAO;AACL,QAAA,MAAMC,iDAA8BL,MAAK,CAAA;AAEzC,QAAA,IAAI,6BAAA,EAA+B,2BAA2B,kBAAA,EAAoB;AAChF,UAAA,MAAMM,sCAAmBN,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,GAAGO,gCAAA,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;AAAA;AACjD,GACF;AACF;;;;"}
@@ -63,6 +63,8 @@ exports.getSpanDescendants = node.getSpanDescendants;
63
63
  exports.getSpanStatusFromHttpCode = node.getSpanStatusFromHttpCode;
64
64
  exports.graphqlIntegration = node.graphqlIntegration;
65
65
  exports.hapiIntegration = node.hapiIntegration;
66
+ exports.honoIntegration = node.honoIntegration;
67
+ exports.honoMiddleware = node.honoMiddleware;
66
68
  exports.httpIntegration = node.httpIntegration;
67
69
  exports.httpServerIntegration = node.httpServerIntegration;
68
70
  exports.httpServerSpansIntegration = node.httpServerSpansIntegration;
@@ -1 +1 @@
1
- {"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -62,6 +62,8 @@ exports.getSpanDescendants = node.getSpanDescendants;
62
62
  exports.getSpanStatusFromHttpCode = node.getSpanStatusFromHttpCode;
63
63
  exports.graphqlIntegration = node.graphqlIntegration;
64
64
  exports.hapiIntegration = node.hapiIntegration;
65
+ exports.honoIntegration = node.honoIntegration;
66
+ exports.honoMiddleware = node.honoMiddleware;
65
67
  exports.httpIntegration = node.httpIntegration;
66
68
  exports.httpServerIntegration = node.httpServerIntegration;
67
69
  exports.httpServerSpansIntegration = node.httpServerSpansIntegration;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -12,9 +12,10 @@ function makeBuildInstrumentationFilePlugin(options = {}) {
12
12
  async config(config, { command }) {
13
13
  const instrumentationFilePath = options.instrumentation || "./src/instrument.server.ts";
14
14
  const router = config.router;
15
- const build = config.build || {};
16
- const rollupOptions = build.rollupOptions || {};
17
- const input = [...rollupOptions.input || []];
15
+ const { rollupOptions, rolldownOptions, ...build } = config.build || {};
16
+ const bundlerOptionsKey = rolldownOptions ? "rolldownOptions" : "rollupOptions";
17
+ const bundlerOptions = rolldownOptions || rollupOptions || {};
18
+ const input = [...bundlerOptions.input || []];
18
19
  if (command !== "build" || router.target !== "server" || router.name === "server-fns") {
19
20
  return config;
20
21
  }
@@ -34,8 +35,8 @@ function makeBuildInstrumentationFilePlugin(options = {}) {
34
35
  ...config,
35
36
  build: {
36
37
  ...build,
37
- rollupOptions: {
38
- ...rollupOptions,
38
+ [bundlerOptionsKey]: {
39
+ ...bundlerOptions,
39
40
  input
40
41
  }
41
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"buildInstrumentationFile.js","sources":["../../../src/vite/buildInstrumentationFile.ts"],"sourcesContent":["import { consoleSandbox } from '@sentry/core';\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport type { Plugin, UserConfig } from 'vite';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n/**\n * A Sentry plugin for SolidStart to build the server\n * `instrument.server.ts` file.\n */\nexport function makeBuildInstrumentationFilePlugin(options: SentrySolidStartPluginOptions = {}): Plugin {\n return {\n name: 'sentry-solidstart-build-instrumentation-file',\n apply: 'build',\n enforce: 'post',\n async config(config: UserConfig, { command }) {\n const instrumentationFilePath = options.instrumentation || './src/instrument.server.ts';\n const router = (config as UserConfig & { router: { target: string; name: string; root: string } }).router;\n const build = config.build || {};\n const rollupOptions = build.rollupOptions || {};\n const input = [...((rollupOptions.input || []) as string[])];\n\n // plugin runs for client, server and sever-fns, we only want to run it for the server once.\n if (command !== 'build' || router.target !== 'server' || router.name === 'server-fns') {\n return config;\n }\n\n try {\n await fs.promises.access(instrumentationFilePath, fs.constants.F_OK);\n } catch (error) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry SolidStart Plugin] Could not access \\`${instrumentationFilePath}\\`, please make sure it exists.`,\n error,\n );\n });\n return config;\n }\n\n input.push(path.resolve(router.root, instrumentationFilePath));\n\n return {\n ...config,\n build: {\n ...build,\n rollupOptions: {\n ...rollupOptions,\n input,\n },\n },\n };\n },\n };\n}\n"],"names":["consoleSandbox"],"mappings":";;;;;;AAUO,SAAS,kCAAA,CAAmC,OAAA,GAAyC,EAAC,EAAW;AACtG,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,8CAAA;AAAA,IACN,KAAA,EAAO,OAAA;AAAA,IACP,OAAA,EAAS,MAAA;AAAA,IACT,MAAM,MAAA,CAAO,MAAA,EAAoB,EAAE,SAAQ,EAAG;AAC5C,MAAA,MAAM,uBAAA,GAA0B,QAAQ,eAAA,IAAmB,4BAAA;AAC3D,MAAA,MAAM,SAAU,MAAA,CAAmF,MAAA;AACnG,MAAA,MAAM,KAAA,GAAQ,MAAA,CAAO,KAAA,IAAS,EAAC;AAC/B,MAAA,MAAM,aAAA,GAAgB,KAAA,CAAM,aAAA,IAAiB,EAAC;AAC9C,MAAA,MAAM,QAAQ,CAAC,GAAK,aAAA,CAAc,KAAA,IAAS,EAAgB,CAAA;AAG3D,MAAA,IAAI,YAAY,OAAA,IAAW,MAAA,CAAO,WAAW,QAAA,IAAY,MAAA,CAAO,SAAS,YAAA,EAAc;AACrF,QAAA,OAAO,MAAA;AAAA,MACT;AAEA,MAAA,IAAI;AACF,QAAA,MAAM,GAAG,QAAA,CAAS,MAAA,CAAO,uBAAA,EAAyB,EAAA,CAAG,UAAU,IAAI,CAAA;AAAA,MACrE,SAAS,KAAA,EAAO;AACd,QAAAA,mBAAA,CAAe,MAAM;AAEnB,UAAA,OAAA,CAAQ,IAAA;AAAA,YACN,iDAAiD,uBAAuB,CAAA,+BAAA,CAAA;AAAA,YACxE;AAAA,WACF;AAAA,QACF,CAAC,CAAA;AACD,QAAA,OAAO,MAAA;AAAA,MACT;AAEA,MAAA,KAAA,CAAM,KAAK,IAAA,CAAK,OAAA,CAAQ,MAAA,CAAO,IAAA,EAAM,uBAAuB,CAAC,CAAA;AAE7D,MAAA,OAAO;AAAA,QACL,GAAG,MAAA;AAAA,QACH,KAAA,EAAO;AAAA,UACL,GAAG,KAAA;AAAA,UACH,aAAA,EAAe;AAAA,YACb,GAAG,aAAA;AAAA,YACH;AAAA;AACF;AACF,OACF;AAAA,IACF;AAAA,GACF;AACF;;;;"}
1
+ {"version":3,"file":"buildInstrumentationFile.js","sources":["../../../src/vite/buildInstrumentationFile.ts"],"sourcesContent":["import { consoleSandbox } from '@sentry/core';\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport type { Plugin, UserConfig } from 'vite';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n/**\n * A Sentry plugin for SolidStart to build the server\n * `instrument.server.ts` file.\n */\nexport function makeBuildInstrumentationFilePlugin(options: SentrySolidStartPluginOptions = {}): Plugin {\n return {\n name: 'sentry-solidstart-build-instrumentation-file',\n apply: 'build',\n enforce: 'post',\n async config(config: UserConfig, { command }) {\n const instrumentationFilePath = options.instrumentation || './src/instrument.server.ts';\n const router = (config as UserConfig & { router: { target: string; name: string; root: string } }).router;\n // `rollupOptions` is a deprecated alias of `rolldownOptions` in Vite 8+, but the only option in older Vite.\n // Returning both makes Vite 8 ignore `rollupOptions`, so only write back the one that is in use.\n // oxlint-disable-next-line typescript/no-deprecated\n const { rollupOptions, rolldownOptions, ...build } = config.build || {};\n const bundlerOptionsKey = rolldownOptions ? 'rolldownOptions' : 'rollupOptions';\n const bundlerOptions = rolldownOptions || rollupOptions || {};\n const input = [...((bundlerOptions.input || []) as string[])];\n\n // plugin runs for client, server and sever-fns, we only want to run it for the server once.\n if (command !== 'build' || router.target !== 'server' || router.name === 'server-fns') {\n return config;\n }\n\n try {\n await fs.promises.access(instrumentationFilePath, fs.constants.F_OK);\n } catch (error) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry SolidStart Plugin] Could not access \\`${instrumentationFilePath}\\`, please make sure it exists.`,\n error,\n );\n });\n return config;\n }\n\n input.push(path.resolve(router.root, instrumentationFilePath));\n\n return {\n ...config,\n build: {\n ...build,\n [bundlerOptionsKey]: {\n ...bundlerOptions,\n input,\n },\n },\n };\n },\n };\n}\n"],"names":["consoleSandbox"],"mappings":";;;;;;AAUO,SAAS,kCAAA,CAAmC,OAAA,GAAyC,EAAC,EAAW;AACtG,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,8CAAA;AAAA,IACN,KAAA,EAAO,OAAA;AAAA,IACP,OAAA,EAAS,MAAA;AAAA,IACT,MAAM,MAAA,CAAO,MAAA,EAAoB,EAAE,SAAQ,EAAG;AAC5C,MAAA,MAAM,uBAAA,GAA0B,QAAQ,eAAA,IAAmB,4BAAA;AAC3D,MAAA,MAAM,SAAU,MAAA,CAAmF,MAAA;AAInG,MAAA,MAAM,EAAE,eAAe,eAAA,EAAiB,GAAG,OAAM,GAAI,MAAA,CAAO,SAAS,EAAC;AACtE,MAAA,MAAM,iBAAA,GAAoB,kBAAkB,iBAAA,GAAoB,eAAA;AAChE,MAAA,MAAM,cAAA,GAAiB,eAAA,IAAmB,aAAA,IAAiB,EAAC;AAC5D,MAAA,MAAM,QAAQ,CAAC,GAAK,cAAA,CAAe,KAAA,IAAS,EAAgB,CAAA;AAG5D,MAAA,IAAI,YAAY,OAAA,IAAW,MAAA,CAAO,WAAW,QAAA,IAAY,MAAA,CAAO,SAAS,YAAA,EAAc;AACrF,QAAA,OAAO,MAAA;AAAA,MACT;AAEA,MAAA,IAAI;AACF,QAAA,MAAM,GAAG,QAAA,CAAS,MAAA,CAAO,uBAAA,EAAyB,EAAA,CAAG,UAAU,IAAI,CAAA;AAAA,MACrE,SAAS,KAAA,EAAO;AACd,QAAAA,mBAAA,CAAe,MAAM;AAEnB,UAAA,OAAA,CAAQ,IAAA;AAAA,YACN,iDAAiD,uBAAuB,CAAA,+BAAA,CAAA;AAAA,YACxE;AAAA,WACF;AAAA,QACF,CAAC,CAAA;AACD,QAAA,OAAO,MAAA;AAAA,MACT;AAEA,MAAA,KAAA,CAAM,KAAK,IAAA,CAAK,OAAA,CAAQ,MAAA,CAAO,IAAA,EAAM,uBAAuB,CAAC,CAAA;AAE7D,MAAA,OAAO;AAAA,QACL,GAAG,MAAA;AAAA,QACH,KAAA,EAAO;AAAA,UACL,GAAG,KAAA;AAAA,UACH,CAAC,iBAAiB,GAAG;AAAA,YACnB,GAAG,cAAA;AAAA,YACH;AAAA;AACF;AACF,OACF;AAAA,IACF;AAAA,GACF;AACF;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { debug } from '@sentry/core';
2
2
  import { INSTRUMENTED_MODULE_NAMES } from '@sentry/server-utils/orchestrion/config';
3
- import { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/rollup';
3
+ import { commonJSInteropOptions, sentryOrchestrionPlugin, sentryCommonJSInteropPlugin } from '@sentry/server-utils/orchestrion/rollup';
4
4
  import { addSentryPluginToVite } from '../vite/sentrySolidStartVite.js';
5
5
  import { addDynamicImportEntryFileWrapper, addInstrumentationFileToBuild, addSentryTopImport } from './addInstrumentation.js';
6
6
 
@@ -22,7 +22,8 @@ function withSentry(solidStartConfig = {}, sentrySolidStartPluginOptions) {
22
22
  const sentryRollupConfig = rollupConfig;
23
23
  if (addBuildTimeInstrumentation) {
24
24
  sentryRollupConfig.plugins.push(
25
- sentryOrchestrionPlugin({ buildTimeInstrumentation: sentryPluginOptions.buildTimeInstrumentation })
25
+ sentryOrchestrionPlugin({ buildTimeInstrumentation: sentryPluginOptions.buildTimeInstrumentation }),
26
+ sentryCommonJSInteropPlugin()
26
27
  );
27
28
  }
28
29
  if (sentrySolidStartPluginOptions?.autoInjectServerSentry === "experimental_dynamic-import") {
@@ -44,12 +45,14 @@ function withSentry(solidStartConfig = {}, sentrySolidStartPluginOptions) {
44
45
  };
45
46
  const existingModules = server.modules || [];
46
47
  let externals = server.externals;
48
+ let commonJS = server.commonJS;
47
49
  if (addBuildTimeInstrumentation) {
48
50
  const existingInline = externals?.inline || [];
49
51
  externals = {
50
52
  ...externals,
51
53
  inline: [.../* @__PURE__ */ new Set([...existingInline, ...INSTRUMENTED_MODULE_NAMES, ...IORedisDependencies])]
52
54
  };
55
+ commonJS = { ...commonJSInteropOptions(), ...commonJS };
53
56
  }
54
57
  return {
55
58
  ...solidStartConfig,
@@ -57,6 +60,7 @@ function withSentry(solidStartConfig = {}, sentrySolidStartPluginOptions) {
57
60
  server: {
58
61
  ...server,
59
62
  externals,
63
+ commonJS,
60
64
  modules: [...existingModules, sentryNitroModule]
61
65
  }
62
66
  };
@@ -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 { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/rollup';\nimport type { Nitro } from 'nitropack';\nimport { addSentryPluginToVite } from '../vite/sentrySolidStartVite';\nimport type { SentrySolidStartPluginOptions } from '../vite/types';\nimport {\n addDynamicImportEntryFileWrapper,\n addInstrumentationFileToBuild,\n addSentryTopImport,\n} from './addInstrumentation';\nimport type { RollupConfig, SolidStartInlineConfig, SolidStartInlineServerConfig } from './types';\n\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 );\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 if (addBuildTimeInstrumentation) {\n const existingInline = externals?.inline || [];\n externals = {\n ...externals,\n inline: [...new Set([...existingInline, ...INSTRUMENTED_MODULE_NAMES, ...IORedisDependencies])],\n };\n }\n\n return {\n ...solidStartConfig,\n vite,\n server: {\n ...server,\n externals,\n modules: [...existingModules, sentryNitroModule],\n },\n };\n}\n"],"names":["nitro"],"mappings":";;;;;;AAeA,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,KAAwC,qBAAA,CAAsB,UAAA,CAAW,GAAG,IAAI,CAAA,EAAG,mBAAmB,CAAA,GAC1G,qBAAA,CAAsB,YAAY,mBAAmB,CAAA;AAE3D,EAAA,M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G,mBAAmB,CAAC,CAAC;AAAA,KAChG;AAAA,EACF;AAEA,EAAA,OAAO;AAAA,IACL,GAAG,gBAAA;AAAA,IACH,IAAA;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,GAAG,MAAA;AAAA,MACH,SAAA;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 { 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,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,KAAwC,qBAAA,CAAsB,UAAA,CAAW,GAAG,IAAI,CAAA,EAAG,mBAAmB,CAAA,GAC1G,qBAAA,CAAsB,YAAY,mBAAmB,CAAA;AAE3D,EAAA,MAAM,2BAAA,GAA8B,oBAAoB,wBAAA,KAA6B,KAAA;AAGrF,EAAA,MAAM,iBAAA,GAAoB,CAAC,KAAA,KAAiB;AAC1C,IAAA,KAAA,CAA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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,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, httpIntegration, httpServerIntegration, httpServerSpansIntegration, initOpenTelemetry, instrumentSupabaseClient, isEnabled, isInitialized, kafkaIntegration, knexIntegration, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, logger, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, 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, 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, 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
3
  export { withSentryErrorBoundary } from '@sentry/solid';
4
4
  export { init } from './server/sdk.js';
5
5
  export { withServerActionInstrumentation } from './server/withServerActionInstrumentation.js';
@@ -1 +1 @@
1
- {"type":"module","version":"11.1.0"}
1
+ {"type":"module","version":"11.2.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, httpIntegration, httpServerIntegration, httpServerSpansIntegration, initOpenTelemetry, instrumentSupabaseClient, isEnabled, isInitialized, kafkaIntegration, knexIntegration, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, logger, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, 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, 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, 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
3
  export { withSentryErrorBoundary } from '@sentry/solid';
4
4
  export { init } from './sdk.js';
5
5
  export { withServerActionInstrumentation } from './withServerActionInstrumentation.js';
@@ -10,9 +10,10 @@ function makeBuildInstrumentationFilePlugin(options = {}) {
10
10
  async config(config, { command }) {
11
11
  const instrumentationFilePath = options.instrumentation || "./src/instrument.server.ts";
12
12
  const router = config.router;
13
- const build = config.build || {};
14
- const rollupOptions = build.rollupOptions || {};
15
- const input = [...rollupOptions.input || []];
13
+ const { rollupOptions, rolldownOptions, ...build } = config.build || {};
14
+ const bundlerOptionsKey = rolldownOptions ? "rolldownOptions" : "rollupOptions";
15
+ const bundlerOptions = rolldownOptions || rollupOptions || {};
16
+ const input = [...bundlerOptions.input || []];
16
17
  if (command !== "build" || router.target !== "server" || router.name === "server-fns") {
17
18
  return config;
18
19
  }
@@ -32,8 +33,8 @@ function makeBuildInstrumentationFilePlugin(options = {}) {
32
33
  ...config,
33
34
  build: {
34
35
  ...build,
35
- rollupOptions: {
36
- ...rollupOptions,
36
+ [bundlerOptionsKey]: {
37
+ ...bundlerOptions,
37
38
  input
38
39
  }
39
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"buildInstrumentationFile.js","sources":["../../../src/vite/buildInstrumentationFile.ts"],"sourcesContent":["import { consoleSandbox } from '@sentry/core';\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport type { Plugin, UserConfig } from 'vite';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n/**\n * A Sentry plugin for SolidStart to build the server\n * `instrument.server.ts` file.\n */\nexport function makeBuildInstrumentationFilePlugin(options: SentrySolidStartPluginOptions = {}): Plugin {\n return {\n name: 'sentry-solidstart-build-instrumentation-file',\n apply: 'build',\n enforce: 'post',\n async config(config: UserConfig, { command }) {\n const instrumentationFilePath = options.instrumentation || './src/instrument.server.ts';\n const router = (config as UserConfig & { router: { target: string; name: string; root: string } }).router;\n const build = config.build || {};\n const rollupOptions = build.rollupOptions || {};\n const input = [...((rollupOptions.input || []) as string[])];\n\n // plugin runs for client, server and sever-fns, we only want to run it for the server once.\n if (command !== 'build' || router.target !== 'server' || router.name === 'server-fns') {\n return config;\n }\n\n try {\n await fs.promises.access(instrumentationFilePath, fs.constants.F_OK);\n } catch (error) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry SolidStart Plugin] Could not access \\`${instrumentationFilePath}\\`, please make sure it exists.`,\n error,\n );\n });\n return config;\n }\n\n input.push(path.resolve(router.root, instrumentationFilePath));\n\n return {\n ...config,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AAO;AAAA,UACL,GAAG,KAAA;AAAA,UACH,aAAA,EAAe;AAAA,YACb,GAAG,aAAA;AAAA,YACH;AAAA;AACF;AACF,OACF;AAAA,IACF;AAAA,GACF;AACF;;;;"}
1
+ {"version":3,"file":"buildInstrumentationFile.js","sources":["../../../src/vite/buildInstrumentationFile.ts"],"sourcesContent":["import { consoleSandbox } from '@sentry/core';\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport type { Plugin, UserConfig } from 'vite';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n/**\n * A Sentry plugin for SolidStart to build the server\n * `instrument.server.ts` file.\n */\nexport function makeBuildInstrumentationFilePlugin(options: SentrySolidStartPluginOptions = {}): Plugin {\n return {\n name: 'sentry-solidstart-build-instrumentation-file',\n apply: 'build',\n enforce: 'post',\n async config(config: UserConfig, { command }) {\n const instrumentationFilePath = options.instrumentation || './src/instrument.server.ts';\n const router = (config as UserConfig & { router: { target: string; name: string; root: string } }).router;\n // `rollupOptions` is a deprecated alias of `rolldownOptions` in Vite 8+, but the only option in older Vite.\n // Returning both makes Vite 8 ignore `rollupOptions`, so only write back the one that is in use.\n // oxlint-disable-next-line typescript/no-deprecated\n const { rollupOptions, rolldownOptions, ...build } = config.build || {};\n const bundlerOptionsKey = rolldownOptions ? 'rolldownOptions' : 'rollupOptions';\n const bundlerOptions = rolldownOptions || rollupOptions || {};\n const input = [...((bundlerOptions.input || []) as string[])];\n\n // plugin runs for client, server and sever-fns, we only want to run it for the server once.\n if (command !== 'build' || router.target !== 'server' || router.name === 'server-fns') {\n return config;\n }\n\n try {\n await fs.promises.access(instrumentationFilePath, fs.constants.F_OK);\n } catch (error) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry SolidStart Plugin] Could not access \\`${instrumentationFilePath}\\`, please make sure it exists.`,\n error,\n );\n });\n return config;\n }\n\n input.push(path.resolve(router.root, instrumentationFilePath));\n\n return {\n ...config,\n build: {\n ...build,\n [bundlerOptionsKey]: {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;AAE7D,MAAA,OAAO;AAAA,QACL,GAAG,MAAA;AAAA,QACH,KAAA,EAAO;AAAA,UACL,GAAG,KAAA;AAAA,UACH,CAAC,iBAAiB,GAAG;AAAA,YACnB,GAAG,cAAA;AAAA,YACH;AAAA;AACF;AACF,OACF;AAAA,IACF;AAAA,GACF;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"withSentry.d.ts","sourceRoot":"","sources":["../../../src/config/withSentry.ts"],"names":[],"mappings":"AAKA,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,CAwExB"}
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,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, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, NodeClient, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, postgresJsIntegration, 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, 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, mysqlIntegration, nativeNodeFetchIntegration, NodeClient, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, postgresJsIntegration, 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';
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":"A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P,mBAAmB,EACnB,oBAAoB,EACpB,UAAU,EACV,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,SAAS,EACT,eAAe,EACf,kBAAkB,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,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,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AAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"buildInstrumentationFile.d.ts","sourceRoot":"","sources":["../../../src/vite/buildInstrumentationFile.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAc,MAAM,MAAM,CAAC;AAC/C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE7D;;;GAGG;AACH,wBAAgB,kCAAkC,CAAC,OAAO,GAAE,6BAAkC,GAAG,MAAM,CA4CtG"}
1
+ {"version":3,"file":"buildInstrumentationFile.d.ts","sourceRoot":"","sources":["../../../src/vite/buildInstrumentationFile.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAc,MAAM,MAAM,CAAC;AAC/C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE7D;;;GAGG;AACH,wBAAgB,kCAAkC,CAAC,OAAO,GAAE,6BAAkC,GAAG,MAAM,CAgDtG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/solidstart",
3
- "version": "11.1.0",
3
+ "version": "11.2.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,13 +80,13 @@
80
80
  }
81
81
  },
82
82
  "dependencies": {
83
- "@sentry/core": "11.1.0",
84
- "@sentry/nitro": "11.1.0",
85
- "@sentry/node": "11.1.0",
86
- "@sentry/server-runtime-injection": "11.1.0",
87
- "@sentry/server-utils": "11.1.0",
88
- "@sentry/solid": "11.1.0",
89
- "@sentry/bundler-plugins": "11.1.0",
83
+ "@sentry/core": "11.2.0",
84
+ "@sentry/nitro": "11.2.0",
85
+ "@sentry/node": "11.2.0",
86
+ "@sentry/server-runtime-injection": "11.2.0",
87
+ "@sentry/server-utils": "11.2.0",
88
+ "@sentry/solid": "11.2.0",
89
+ "@sentry/bundler-plugins": "11.2.0",
90
90
  "@sentry/conventions": "0.24.0"
91
91
  },
92
92
  "devDependencies": {
@@ -97,7 +97,7 @@
97
97
  "@testing-library/user-event": "^14.5.2",
98
98
  "solid-js": "^1.9.11",
99
99
  "vinxi": "^0.5.11",
100
- "vite": "^6.4.3",
100
+ "vite": "^8.3.1",
101
101
  "vite-plugin-solid": "^2.11.6"
102
102
  },
103
103
  "scripts": {