@sentry/tanstackstart-react 10.70.0 → 11.0.0-alpha.1

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/build/cjs/server/globalMiddleware.js +3 -2
  2. package/build/cjs/server/globalMiddleware.js.map +1 -1
  3. package/build/cjs/server/middleware.js.map +1 -1
  4. package/build/cjs/server/routeParametrization.js +1 -1
  5. package/build/cjs/server/routeParametrization.js.map +1 -1
  6. package/build/cjs/server/utils.js +3 -2
  7. package/build/cjs/server/utils.js.map +1 -1
  8. package/build/cjs/server/wrapFetchWithSentry.js +3 -3
  9. package/build/cjs/server/wrapFetchWithSentry.js.map +1 -1
  10. package/build/cjs/vite/sentryTanstackStart.js +2 -0
  11. package/build/cjs/vite/sentryTanstackStart.js.map +1 -1
  12. package/build/cjs/vite/sourceMaps.js +2 -2
  13. package/build/cjs/vite/sourceMaps.js.map +1 -1
  14. package/build/esm/package.json +1 -1
  15. package/build/esm/server/globalMiddleware.js +3 -2
  16. package/build/esm/server/globalMiddleware.js.map +1 -1
  17. package/build/esm/server/middleware.js.map +1 -1
  18. package/build/esm/server/routeParametrization.js +1 -1
  19. package/build/esm/server/routeParametrization.js.map +1 -1
  20. package/build/esm/server/utils.js +4 -3
  21. package/build/esm/server/utils.js.map +1 -1
  22. package/build/esm/server/wrapFetchWithSentry.js +4 -4
  23. package/build/esm/server/wrapFetchWithSentry.js.map +1 -1
  24. package/build/esm/vite/sentryTanstackStart.js +2 -0
  25. package/build/esm/vite/sentryTanstackStart.js.map +1 -1
  26. package/build/esm/vite/sourceMaps.js +1 -1
  27. package/build/esm/vite/sourceMaps.js.map +1 -1
  28. package/build/import-hook.mjs +1 -1
  29. package/build/types/index.types.d.ts +1 -0
  30. package/build/types/index.types.d.ts.map +1 -1
  31. package/build/types/server/globalMiddleware.d.ts.map +1 -1
  32. package/build/types/server/index.d.ts.map +1 -1
  33. package/build/types/server/utils.d.ts.map +1 -1
  34. package/build/types/server/wrapFetchWithSentry.d.ts +1 -1
  35. package/build/types/server/wrapFetchWithSentry.d.ts.map +1 -1
  36. package/build/types/vite/sentryTanstackStart.d.ts.map +1 -1
  37. package/build/types/vite/sourceMaps.d.ts +1 -1
  38. package/package.json +12 -25
  39. package/build/loader-hook.mjs +0 -1
  40. package/build/types-ts3.8/client/index.d.ts +0 -35
  41. package/build/types-ts3.8/client/sdk.d.ts +0 -9
  42. package/build/types-ts3.8/client/tunnelRoute.d.ts +0 -7
  43. package/build/types-ts3.8/common/index.d.ts +0 -2
  44. package/build/types-ts3.8/common/types.d.ts +0 -76
  45. package/build/types-ts3.8/config/index.d.ts +0 -2
  46. package/build/types-ts3.8/index.client.d.ts +0 -3
  47. package/build/types-ts3.8/index.server.d.ts +0 -4
  48. package/build/types-ts3.8/index.types.d.ts +0 -33
  49. package/build/types-ts3.8/server/globalMiddleware.d.ts +0 -12
  50. package/build/types-ts3.8/server/index.d.ts +0 -28
  51. package/build/types-ts3.8/server/middleware.d.ts +0 -23
  52. package/build/types-ts3.8/server/routeParametrization.d.ts +0 -12
  53. package/build/types-ts3.8/server/sdk.d.ts +0 -6
  54. package/build/types-ts3.8/server/tunnelRoute.d.ts +0 -35
  55. package/build/types-ts3.8/server/utils.d.ts +0 -6
  56. package/build/types-ts3.8/server/wrapFetchWithSentry.d.ts +0 -29
  57. package/build/types-ts3.8/vite/autoInstrumentMiddleware.d.ts +0 -43
  58. package/build/types-ts3.8/vite/index.d.ts +0 -4
  59. package/build/types-ts3.8/vite/routePatterns.d.ts +0 -18
  60. package/build/types-ts3.8/vite/sentryTanstackStart.d.ts +0 -79
  61. package/build/types-ts3.8/vite/sourceMaps.d.ts +0 -27
  62. package/build/types-ts3.8/vite/tunnelRoute.d.ts +0 -19
@@ -1,43 +0,0 @@
1
- import { Plugin } from 'vite';
2
- type AutoInstrumentMiddlewareOptions = {
3
- enabled?: boolean;
4
- debug?: boolean;
5
- };
6
- type WrapResult = {
7
- code: string;
8
- didWrap: boolean;
9
- skipped: string[];
10
- };
11
- /**
12
- * Wraps global middleware arrays (requestMiddleware, functionMiddleware) in createStart() files.
13
- */
14
- export declare function wrapGlobalMiddleware(code: string, id: string, debug: boolean): WrapResult;
15
- /**
16
- * Wraps route middleware arrays in createFileRoute() files.
17
- */
18
- export declare function wrapRouteMiddleware(code: string, id: string, debug: boolean): WrapResult;
19
- /**
20
- * Wraps middleware arrays in createServerFn().middleware([...]) calls.
21
- */
22
- export declare function wrapServerFnMiddleware(code: string, id: string, debug: boolean): WrapResult;
23
- /**
24
- * A Vite plugin that automatically instruments TanStack Start middlewares:
25
- * - `requestMiddleware` and `functionMiddleware` arrays in `createStart()`
26
- * - `middleware` arrays in `createFileRoute()` route definitions
27
- */
28
- export declare function makeAutoInstrumentMiddlewarePlugin(options?: AutoInstrumentMiddlewareOptions): Plugin;
29
- /**
30
- * Convert array contents to object shorthand syntax.
31
- * e.g., "foo, bar, baz" → "{ foo, bar, baz }"
32
- *
33
- * Returns null if contents contain non-identifier expressions (function calls, etc.)
34
- * which cannot be converted to object shorthand.
35
- */
36
- export declare function arrayToObjectShorthand(contents: string): string | null;
37
- /**
38
- * Adds the wrapMiddlewaresWithSentry import to the code.
39
- * Handles 'use client' and 'use server' directives by inserting the import after them.
40
- */
41
- export declare function addSentryImport(code: string): string;
42
- export {};
43
- //# sourceMappingURL=autoInstrumentMiddleware.d.ts.map
@@ -1,4 +0,0 @@
1
- export { sentryTanstackStart } from './sentryTanstackStart';
2
- export { SentryTanstackStartOptions } from './sentryTanstackStart';
3
- export { TunnelRouteOptions } from './tunnelRoute';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1,18 +0,0 @@
1
- import { Plugin } from 'vite';
2
- /**
3
- * Extracts route patterns from TanStack Start's generated routeTree.gen.ts
4
- * and replaces `__SENTRY_ROUTE_PATTERNS__` references with the extracted patterns.
5
- *
6
- * The route tree file is read during `transform` rather than `config` because
7
- * TanStack Start generates it during the build.
8
- */
9
- export declare function makeRoutePatternPlugin(): Plugin;
10
- /**
11
- * Extracts full route path patterns from the content of routeTree.gen.ts.
12
- *
13
- * Parses the `fullPaths` type union which contains the resolved full paths
14
- * (e.g., `fullPaths: '/' | '/page-a' | '/users/$userId'`).
15
- * This is more reliable than `path:` properties which can be relative for nested routes.
16
- */
17
- export declare function extractRoutePatterns(content: string): string[];
18
- //# sourceMappingURL=routePatterns.d.ts.map
@@ -1,79 +0,0 @@
1
- import { BuildTimeOptionsBase } from '@sentry/core';
2
- import { Plugin } from 'vite';
3
- import { TunnelRouteOptions } from './tunnelRoute';
4
- /**
5
- * Build-time options for the Sentry TanStack Start SDK.
6
- */
7
- export interface SentryTanstackStartOptions extends BuildTimeOptionsBase {
8
- /**
9
- * If this flag is `true`, the Sentry plugins will automatically instrument TanStack Start middlewares.
10
- *
11
- * This wraps global middlewares (`requestMiddleware` and `functionMiddleware`) in `createStart()` with Sentry
12
- * instrumentation to capture performance data.
13
- *
14
- * Set to `false` to disable automatic middleware instrumentation if you prefer to wrap middlewares manually
15
- * using `wrapMiddlewaresWithSentry`.
16
- *
17
- * @default true
18
- */
19
- autoInstrumentMiddleware?: boolean;
20
- /**
21
- * Options related to react component name annotations.
22
- * Disabled by default, unless a value is set for this option.
23
- * When enabled, your app's DOM will automatically be annotated during build-time with their respective component names.
24
- * This will unlock the capability to search for Replays in Sentry by component name, as well as see component names in breadcrumbs and performance monitoring.
25
- * Please note that this feature is not currently supported by the esbuild bundler plugins, and will only annotate React components
26
- */
27
- reactComponentAnnotation?: {
28
- /**
29
- * Whether the component name annotate plugin should be enabled or not.
30
- */
31
- enabled?: boolean;
32
- /**
33
- * A list of strings representing the names of components to ignore. The plugin will not apply `data-sentry` annotations on the DOM element for these components.
34
- */
35
- ignoredComponents?: string[];
36
- };
37
- /**
38
- * Configures a framework-managed same-origin tunnel route for Sentry envelopes.
39
- *
40
- * This creates a TanStack Start server route backed by `createSentryTunnelRoute()` and applies the resulting path
41
- * as the default `tunnel` option on the client.
42
- *
43
- * You can pass:
44
- * - `true` to generate an opaque route path per dev session or production build.
45
- * - `'/custom-path'` to use a fixed static route path.
46
- * - `{ allowedDsns, path }` for full control. If `allowedDsns` is omitted or empty, the tunnel route derives the DSN
47
- * from the active server Sentry client at runtime.
48
- *
49
- * If you also pass `tunnel` to `Sentry.init()`, that explicit runtime option wins and a warning is emitted because
50
- * the managed tunnel route is being bypassed.
51
- */
52
- tunnelRoute?: TunnelRouteOptions;
53
- }
54
- /**
55
- * Vite plugins for the Sentry TanStack Start SDK.
56
- *
57
- * @example
58
- * ```typescript
59
- * // vite.config.ts
60
- * import { defineConfig } from 'vite';
61
- * import { sentryTanstackStart } from '@sentry/tanstackstart-react/vite';
62
- * import { tanstackStart } from '@tanstack/react-start/plugin/vite';
63
- *
64
- * export default defineConfig({
65
- * plugins: [
66
- * tanstackStart(),
67
- * sentryTanstackStart({
68
- * org: 'your-org',
69
- * project: 'your-project',
70
- * }),
71
- * ],
72
- * });
73
- * ```
74
- *
75
- * @param options - Options to configure the Sentry Vite plugins
76
- * @returns An array of Vite plugins
77
- */
78
- export declare function sentryTanstackStart(options?: SentryTanstackStartOptions): Plugin[];
79
- //# sourceMappingURL=sentryTanstackStart.d.ts.map
@@ -1,27 +0,0 @@
1
- import { Plugin, UserConfig } from 'vite';
2
- import { SentryTanstackStartOptions } from './sentryTanstackStart';
3
- /**
4
- * A Sentry plugin for adding the @sentry/vite-plugin to automatically upload source maps to Sentry.
5
- */
6
- export declare function makeAddSentryVitePlugin(options: SentryTanstackStartOptions): Plugin[];
7
- /**
8
- * A Sentry plugin for TanStack Start React to enable "hidden" source maps if they are unset.
9
- */
10
- export declare function makeEnableSourceMapsVitePlugin(options: SentryTanstackStartOptions): Plugin[];
11
- /** There are 3 ways to set up source map generation (https://github.com/getsentry/sentry-javascript/issues/13993)
12
- *
13
- * 1. User explicitly disabled source maps
14
- * - keep this setting (emit a warning that errors won't be unminified in Sentry)
15
- * - We won't upload anything
16
- *
17
- * 2. Users enabled source map generation (true, 'hidden', 'inline').
18
- * - keep this setting (don't do anything - like deletion - besides uploading)
19
- *
20
- * 3. Users didn't set source maps generation
21
- * - we enable 'hidden' source maps generation
22
- * - configure `filesToDeleteAfterUpload` to delete all .map files (we emit a log about this)
23
- *
24
- * --> only exported for testing
25
- */
26
- export declare function getUpdatedSourceMapSettings(viteConfig: UserConfig, sentryPluginOptions?: SentryTanstackStartOptions): boolean | 'inline' | 'hidden';
27
- //# sourceMappingURL=sourceMaps.d.ts.map
@@ -1,19 +0,0 @@
1
- import { Plugin } from 'vite';
2
- export type TunnelRouteOptions = true | string | {
3
- /**
4
- * A list of DSNs that are allowed to use the managed tunnel route.
5
- *
6
- * If omitted or empty, the tunnel route will derive the allowed DSN from the active server Sentry SDK at runtime.
7
- */
8
- allowedDsns?: string[];
9
- /**
10
- * Controls the public route path used by the managed tunnel route.
11
- *
12
- * If omitted, an opaque path is generated once per dev session or production build.
13
- */
14
- path?: string;
15
- };
16
- export declare function resolveTunnelRoute(tunnel: true | string): string;
17
- export declare function injectManagedTunnelRoute(source: string, resolvedTunnelRoute: string): string;
18
- export declare function makeTunnelRoutePlugin(options: TunnelRouteOptions, debug?: boolean): Plugin;
19
- //# sourceMappingURL=tunnelRoute.d.ts.map