@sentry/solidstart 11.11.0 → 11.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/_virtual/_rolldown/runtime.js +34 -0
- package/build/cjs/client/index.js +11 -18
- package/build/cjs/client/sdk.js +19 -20
- package/build/cjs/client/sdk.js.map +1 -1
- package/build/cjs/client/solidrouter.js +8 -16
- package/build/cjs/common/tunnel.js +11 -8
- package/build/cjs/common/tunnel.js.map +1 -1
- package/build/cjs/config/addInstrumentation.js +110 -111
- package/build/cjs/config/addInstrumentation.js.map +1 -1
- package/build/cjs/config/index.js +2 -0
- package/build/cjs/config/withSentry.js +86 -87
- package/build/cjs/config/withSentry.js.map +1 -1
- package/build/cjs/config/wrapServerEntryWithDynamicImport.js +139 -135
- package/build/cjs/config/wrapServerEntryWithDynamicImport.js.map +1 -1
- package/build/cjs/index.client.js +12 -18
- package/build/cjs/index.server.js +162 -159
- package/build/cjs/index.server.js.map +1 -1
- package/build/cjs/nitro/tunnelPlugin.js +12 -20
- package/build/cjs/nitro/tunnelPlugin.js.map +1 -1
- package/build/cjs/server/index.js +151 -158
- package/build/cjs/server/middleware.js +26 -37
- package/build/cjs/server/middleware.js.map +1 -1
- package/build/cjs/server/sdk.js +13 -14
- package/build/cjs/server/sdk.js.map +1 -1
- package/build/cjs/server/solidrouter.js +26 -18
- package/build/cjs/server/solidrouter.js.map +1 -1
- package/build/cjs/server/utils.js +32 -27
- package/build/cjs/server/utils.js.map +1 -1
- package/build/cjs/server/withServerActionInstrumentation.js +46 -49
- package/build/cjs/server/withServerActionInstrumentation.js.map +1 -1
- package/build/cjs/solidrouter.client.js +9 -16
- package/build/cjs/solidrouter.js +12 -18
- package/build/cjs/solidrouter.server.js +3 -8
- package/build/cjs/vite/buildInstrumentationFile.js +46 -46
- package/build/cjs/vite/buildInstrumentationFile.js.map +1 -1
- package/build/cjs/vite/index.js +5 -10
- package/build/cjs/vite/sentrySolidStart.js +86 -39
- package/build/cjs/vite/sentrySolidStart.js.map +1 -1
- package/build/cjs/vite/sentrySolidStartVite.js +32 -35
- package/build/cjs/vite/sentrySolidStartVite.js.map +1 -1
- package/build/cjs/vite/sourceMaps.js +117 -152
- package/build/cjs/vite/sourceMaps.js.map +1 -1
- package/build/esm/client/index.js +2 -3
- package/build/esm/client/sdk.js +19 -18
- package/build/esm/client/sdk.js.map +1 -1
- package/build/esm/client/solidrouter.js +1 -2
- package/build/esm/common/tunnel.js +11 -6
- package/build/esm/common/tunnel.js.map +1 -1
- package/build/esm/config/addInstrumentation.js +107 -109
- package/build/esm/config/addInstrumentation.js.map +1 -1
- package/build/esm/config/index.js +1 -0
- package/build/esm/config/withSentry.js +86 -84
- package/build/esm/config/withSentry.js.map +1 -1
- package/build/esm/config/wrapServerEntryWithDynamicImport.js +139 -133
- package/build/esm/config/wrapServerEntryWithDynamicImport.js.map +1 -1
- package/build/esm/index.client.js +3 -3
- package/build/esm/index.server.js +14 -10
- package/build/esm/index.server.js.map +1 -1
- package/build/esm/nitro/tunnelPlugin.js +12 -20
- package/build/esm/nitro/tunnelPlugin.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/server/index.js +7 -7
- package/build/esm/server/middleware.js +26 -35
- package/build/esm/server/middleware.js.map +1 -1
- package/build/esm/server/sdk.js +13 -12
- package/build/esm/server/sdk.js.map +1 -1
- package/build/esm/server/solidrouter.js +25 -16
- package/build/esm/server/solidrouter.js.map +1 -1
- package/build/esm/server/utils.js +32 -25
- package/build/esm/server/utils.js.map +1 -1
- package/build/esm/server/withServerActionInstrumentation.js +46 -47
- package/build/esm/server/withServerActionInstrumentation.js.map +1 -1
- package/build/esm/solidrouter.client.js +2 -2
- package/build/esm/solidrouter.js +3 -3
- package/build/esm/solidrouter.server.js +1 -2
- package/build/esm/vite/buildInstrumentationFile.js +43 -44
- package/build/esm/vite/buildInstrumentationFile.js.map +1 -1
- package/build/esm/vite/index.js +3 -3
- package/build/esm/vite/sentrySolidStart.js +86 -37
- package/build/esm/vite/sentrySolidStart.js.map +1 -1
- package/build/esm/vite/sentrySolidStartVite.js +32 -33
- package/build/esm/vite/sentrySolidStartVite.js.map +1 -1
- package/build/esm/vite/sourceMaps.js +117 -150
- package/build/esm/vite/sourceMaps.js.map +1 -1
- package/build/types/nitro/tunnelPlugin.d.ts +3 -3
- package/build/types/nitro/tunnelPlugin.d.ts.map +1 -1
- package/package.json +39 -37
- package/build/cjs/client/index.js.map +0 -1
- package/build/cjs/client/solidrouter.js.map +0 -1
- package/build/cjs/index.client.js.map +0 -1
- package/build/cjs/server/index.js.map +0 -1
- package/build/cjs/solidrouter.client.js.map +0 -1
- package/build/cjs/solidrouter.js.map +0 -1
- package/build/cjs/solidrouter.server.js.map +0 -1
- package/build/cjs/vite/index.js.map +0 -1
- package/build/esm/client/index.js.map +0 -1
- package/build/esm/client/solidrouter.js.map +0 -1
- package/build/esm/index.client.js.map +0 -1
- package/build/esm/server/index.js.map +0 -1
- package/build/esm/solidrouter.client.js.map +0 -1
- package/build/esm/solidrouter.js.map +0 -1
- package/build/esm/solidrouter.server.js.map +0 -1
- package/build/esm/vite/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
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
|
|
1
|
+
{"version":3,"file":"sentrySolidStart.js","names":["normalizeTunnelBasePath"],"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), makeServerEntryPlugin()];\n\n // Only the Nitro and server entry plugins are dev-safe; the Nitro 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\nconst SERVER_RUNTIME_CONDITION = 'sentry-solidstart-runtime';\n\n/**\n * Resolves `@sentry/solidstart` in server environments to the entry without the deprecated SolidStart 1\n * `withSentry`. Its build-time imports (Sentry CLI, oxc-parser) otherwise end up in the server output:\n * Nitro traces their native files, and Rolldown still emits the CLI's dynamic-import chunks after\n * tree-shaking the code that imports them.\n */\nfunction makeServerEntryPlugin(): Plugin {\n return {\n name: 'sentry-solidstart-server-entry',\n configEnvironment(name, config) {\n // Vite concatenates the returned conditions onto these. If none are set yet, returning one would\n // replace Vite's defaults, so leave resolution alone.\n if (name === 'client' || config.consumer === 'client' || !config.resolve?.conditions) {\n return;\n }\n\n return { resolve: { conditions: [SERVER_RUNTIME_CONDITION] } };\n },\n };\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,SAAgB,iBAAiB,UAAmC,CAAC,GAAa;CAChF,0BAA0B,SAAS,CAAC,kCAAkC,CAAC;CAEvE,MAAM,UAAoB,CAAC,sBAAsB,OAAO,GAAG,sBAAsB,CAAC;CAGlF,IAAA,QAAA,IAAA,aAA6B,eAC3B,OAAO;CAKT,QAAQ,KAAK,wBAAwB,EAAE,0BAA0B,QAAQ,yBAAyB,CAAC,CAAC;CAEpG,IAAI,QAAQ,YAAY,YAAY,MAClC,QAAQ,KAAK,GAAG,mCAAmC,OAAO,GAAG,GAAG,+BAA+B,OAAO,CAAC;CAGzG,OAAO;AACT;AAEA,MAAM,2BAA2B;;;;;;;AAQjC,SAAS,wBAAgC;CACvC,OAAO;EACL,MAAM;EACN,kBAAkB,MAAM,QAAQ;GAG9B,IAAI,SAAS,YAAY,OAAO,aAAa,YAAY,CAAC,OAAO,SAAS,YACxE;GAGF,OAAO,EAAE,SAAS,EAAE,YAAY,CAAC,wBAAwB,EAAE,EAAE;EAC/D;CACF;AACF;;;;;;;;;;;;AAoBA,SAAS,sBAAsB,SAA0C;CACvE,OAAO;EACL,MAAM;EACN,SAAS;EACT,OAAO,YAAiC;GACtC,MAAM,YAAY,WAAW;GAG7B,MAAM,iBAAiBA,kCAAwB,WAAW,QAAQ,WAAW,WAAW,IAAI;GAE5F,OAAO;IACL,QAAQ,EAAE,wCAAwC,KAAK,UAAU,cAAc,EAAE;IACjF,OAAO;KACL,GAAI,uBAEF;MAAE,WAAW,WAAW;MAAW,gBAAgB,WAAW;KAAe,GAG7E,OACF;KAEA,GAAI,kBAAkB,EAAE,eAAe,EAAE,sBAAsB,eAAe,EAAE;IAClF;GACF;EACF;CACF;AACF"}
|
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { makeBuildInstrumentationFilePlugin } from "./buildInstrumentationFile.js";
|
|
2
|
+
import { makeAddSentryVitePlugin, makeEnableSourceMapsVitePlugin } from "./sourceMaps.js";
|
|
3
|
+
import { warnOnRemovedBuildOptions } from "@sentry/core";
|
|
4
|
+
// src/vite/sentrySolidStartVite.ts
|
|
5
|
+
/**
|
|
6
|
+
* Various Sentry vite plugins to be used for SolidStart.
|
|
7
|
+
*/
|
|
5
8
|
const sentrySolidStartVite = (options = {}, viteConfig, tunnelBasePath = "") => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (options.sourcemaps?.disable !== true) {
|
|
21
|
-
const sourceMapsPlugin = makeAddSentryVitePlugin(options, viteConfig);
|
|
22
|
-
const enableSourceMapsPlugin = makeEnableSourceMapsVitePlugin(options);
|
|
23
|
-
sentryPlugins.push(...sourceMapsPlugin, ...enableSourceMapsPlugin);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return sentryPlugins;
|
|
9
|
+
warnOnRemovedBuildOptions(options, ["unstable_sentryVitePluginOptions"]);
|
|
10
|
+
const sentryPlugins = [{
|
|
11
|
+
name: "sentry-solidstart-tunnel-base-path",
|
|
12
|
+
config: () => ({ define: { __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__: JSON.stringify(tunnelBasePath) } })
|
|
13
|
+
}];
|
|
14
|
+
if (options.autoInjectServerSentry !== "experimental_dynamic-import") sentryPlugins.push(makeBuildInstrumentationFilePlugin(options));
|
|
15
|
+
if (process.env.NODE_ENV !== "development") {
|
|
16
|
+
if (options.sourcemaps?.disable !== true) {
|
|
17
|
+
const sourceMapsPlugin = makeAddSentryVitePlugin(options, viteConfig);
|
|
18
|
+
const enableSourceMapsPlugin = makeEnableSourceMapsVitePlugin(options);
|
|
19
|
+
sentryPlugins.push(...sourceMapsPlugin, ...enableSourceMapsPlugin);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return sentryPlugins;
|
|
27
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Helper to add the Sentry SolidStart vite plugin to a vite config.
|
|
26
|
+
*/
|
|
28
27
|
const addSentryPluginToVite = (config = {}, options, tunnelBasePath) => {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
const plugins = Array.isArray(config.plugins) ? [...config.plugins] : [];
|
|
29
|
+
plugins.unshift(sentrySolidStartVite(options, config, tunnelBasePath));
|
|
30
|
+
return {
|
|
31
|
+
...config,
|
|
32
|
+
plugins
|
|
33
|
+
};
|
|
35
34
|
};
|
|
36
|
-
|
|
37
35
|
export { addSentryPluginToVite, sentrySolidStartVite };
|
|
38
|
-
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=sentrySolidStartVite.js.map
|
|
@@ -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 = (\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"],"
|
|
1
|
+
{"version":3,"file":"sentrySolidStartVite.js","names":[],"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"],"mappings":";;;;;;;AASA,MAAa,wBACX,UAAyC,CAAC,GAC1C,YACA,iBAAiB,OACJ;CACb,0BAA0B,SAAS,CAAC,kCAAkC,CAAC;CAEvE,MAAM,gBAA0B,CAC9B;EACE,MAAM;EAEN,eAAe,EACb,QAAQ,EAAE,wCAAwC,KAAK,UAAU,cAAc,EAAE,EACnF;CACF,CACF;CAEA,IAAI,QAAQ,2BAA2B,+BACrC,cAAc,KAAK,mCAAmC,OAAO,CAAC;CAGhE,IAAA,QAAA,IAAA,aAA6B,eACvB;MAAA,QAAQ,YAAY,YAAY,MAAM;GACxC,MAAM,mBAAmB,wBAAwB,SAAS,UAAU;GACpE,MAAM,yBAAyB,+BAA+B,OAAO;GAErE,cAAc,KAAK,GAAG,kBAAkB,GAAG,sBAAsB;EACnE;;CAGF,OAAO;AACT;;;;AAKA,MAAa,yBACX,SAAqB,CAAC,GACtB,SACA,mBACe;CACf,MAAM,UAAU,MAAM,QAAQ,OAAO,OAAO,IAAI,CAAC,GAAG,OAAO,OAAO,IAAI,CAAC;CACvE,QAAQ,QAAQ,qBAAqB,SAAS,QAAQ,cAAc,CAAC;CAErE,OAAO;EACL,GAAG;EACH;CACF;AACF"}
|
|
@@ -1,159 +1,126 @@
|
|
|
1
|
-
import { sentryVitePlugin } from
|
|
2
|
-
|
|
1
|
+
import { sentryVitePlugin } from "@sentry/bundler-plugins/vite";
|
|
2
|
+
// src/vite/sourceMaps.ts
|
|
3
|
+
/**
|
|
4
|
+
* A Sentry plugin for adding the @sentry/bundler-plugins/vite plugin to automatically upload source maps to Sentry.
|
|
5
|
+
*/
|
|
3
6
|
function makeAddSentryVitePlugin(options, viteConfig) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
return [
|
|
32
|
-
...sentryVitePlugin({
|
|
33
|
-
applicationKey,
|
|
34
|
-
authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,
|
|
35
|
-
bundleSizeOptimizations,
|
|
36
|
-
debug: debug ?? false,
|
|
37
|
-
errorHandler,
|
|
38
|
-
headers,
|
|
39
|
-
moduleMetadata,
|
|
40
|
-
org: org ?? process.env.SENTRY_ORG,
|
|
41
|
-
project: project ?? process.env.SENTRY_PROJECT,
|
|
42
|
-
release,
|
|
43
|
-
silent,
|
|
44
|
-
telemetry: telemetry ?? true,
|
|
45
|
-
url: sentryUrl,
|
|
46
|
-
sourcemaps: {
|
|
47
|
-
...sourcemaps,
|
|
48
|
-
filesToDeleteAfterUpload: sourcemaps?.filesToDeleteAfterUpload ?? updatedFilesToDeleteAfterUpload
|
|
49
|
-
},
|
|
50
|
-
_metaOptions: {
|
|
51
|
-
telemetry: {
|
|
52
|
-
metaFramework: "solidstart"
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
})
|
|
56
|
-
];
|
|
7
|
+
const { applicationKey, authToken, bundleSizeOptimizations, debug, errorHandler, headers, moduleMetadata, org, project, release, sentryUrl, silent, sourcemaps, telemetry } = options;
|
|
8
|
+
let updatedFilesToDeleteAfterUpload = void 0;
|
|
9
|
+
if (typeof sourcemaps?.filesToDeleteAfterUpload === "undefined" && typeof viteConfig.build?.sourcemap === "undefined") {
|
|
10
|
+
updatedFilesToDeleteAfterUpload = [".*/**/*.map"];
|
|
11
|
+
debug && console.log(`[Sentry] Automatically setting \`sourcemaps.filesToDeleteAfterUpload: ${JSON.stringify(updatedFilesToDeleteAfterUpload)}\` to delete generated source maps after they were uploaded to Sentry.`);
|
|
12
|
+
}
|
|
13
|
+
return [...sentryVitePlugin({
|
|
14
|
+
applicationKey,
|
|
15
|
+
authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,
|
|
16
|
+
bundleSizeOptimizations,
|
|
17
|
+
debug: debug ?? false,
|
|
18
|
+
errorHandler,
|
|
19
|
+
headers,
|
|
20
|
+
moduleMetadata,
|
|
21
|
+
org: org ?? process.env.SENTRY_ORG,
|
|
22
|
+
project: project ?? process.env.SENTRY_PROJECT,
|
|
23
|
+
release,
|
|
24
|
+
silent,
|
|
25
|
+
telemetry: telemetry ?? true,
|
|
26
|
+
url: sentryUrl,
|
|
27
|
+
sourcemaps: {
|
|
28
|
+
...sourcemaps,
|
|
29
|
+
filesToDeleteAfterUpload: sourcemaps?.filesToDeleteAfterUpload ?? updatedFilesToDeleteAfterUpload
|
|
30
|
+
},
|
|
31
|
+
_metaOptions: { telemetry: { metaFramework: "solidstart" } }
|
|
32
|
+
})];
|
|
57
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* SolidStart 2 counterpart of `makeAddSentryVitePlugin`, reading the flat `BuildTimeOptionsBase`
|
|
36
|
+
* fields rather than the nested `sourceMapsUploadOptions`.
|
|
37
|
+
*
|
|
38
|
+
* Covers the Vite-built client assets only; Nitro emits the server bundle outside Vite's output dir
|
|
39
|
+
* and the Sentry Nitro module uploads that.
|
|
40
|
+
*/
|
|
58
41
|
function makeAddSentryVitePluginSolidStart2(options) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
const sentryPlugins = sentryVitePlugin({
|
|
93
|
-
...passthroughOptions,
|
|
94
|
-
authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,
|
|
95
|
-
debug: debug ?? false,
|
|
96
|
-
org: org ?? process.env.SENTRY_ORG,
|
|
97
|
-
project: project ?? process.env.SENTRY_PROJECT,
|
|
98
|
-
telemetry: telemetry ?? true,
|
|
99
|
-
url: sentryUrl,
|
|
100
|
-
sourcemaps: {
|
|
101
|
-
...sourcemaps,
|
|
102
|
-
filesToDeleteAfterUpload: filesToDeleteAfterUploadPromise
|
|
103
|
-
},
|
|
104
|
-
_metaOptions: {
|
|
105
|
-
telemetry: {
|
|
106
|
-
metaFramework: "solidstart"
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
return [configPlugin, ...sentryPlugins];
|
|
42
|
+
const { authToken, buildTimeInstrumentation: _buildTimeInstrumentation, debug, org, project, sentryUrl, sourcemaps, telemetry, ...passthroughOptions } = options;
|
|
43
|
+
let resolveFilesToDeleteAfterUpload;
|
|
44
|
+
const filesToDeleteAfterUploadPromise = new Promise((resolve) => {
|
|
45
|
+
resolveFilesToDeleteAfterUpload = resolve;
|
|
46
|
+
});
|
|
47
|
+
return [{
|
|
48
|
+
name: "sentry-solidstart-files-to-delete-after-upload",
|
|
49
|
+
apply: "build",
|
|
50
|
+
enforce: "post",
|
|
51
|
+
config(config) {
|
|
52
|
+
const userFilesToDelete = sourcemaps?.filesToDeleteAfterUpload;
|
|
53
|
+
if (typeof userFilesToDelete === "undefined" && typeof config.build?.sourcemap === "undefined") {
|
|
54
|
+
if (debug) console.log("[Sentry] Automatically setting `sourcemaps.filesToDeleteAfterUpload: [\"./**/*.map\"]` to delete generated source maps after they were uploaded to Sentry.");
|
|
55
|
+
resolveFilesToDeleteAfterUpload?.(["./**/*.map"]);
|
|
56
|
+
} else resolveFilesToDeleteAfterUpload?.(userFilesToDelete);
|
|
57
|
+
}
|
|
58
|
+
}, ...sentryVitePlugin({
|
|
59
|
+
...passthroughOptions,
|
|
60
|
+
authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,
|
|
61
|
+
debug: debug ?? false,
|
|
62
|
+
org: org ?? process.env.SENTRY_ORG,
|
|
63
|
+
project: project ?? process.env.SENTRY_PROJECT,
|
|
64
|
+
telemetry: telemetry ?? true,
|
|
65
|
+
url: sentryUrl,
|
|
66
|
+
sourcemaps: {
|
|
67
|
+
...sourcemaps,
|
|
68
|
+
filesToDeleteAfterUpload: filesToDeleteAfterUploadPromise
|
|
69
|
+
},
|
|
70
|
+
_metaOptions: { telemetry: { metaFramework: "solidstart" } }
|
|
71
|
+
})];
|
|
111
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* A Sentry plugin for SolidStart to enable "hidden" source maps if they are unset. Used by both
|
|
75
|
+
* SolidStart majors.
|
|
76
|
+
*/
|
|
112
77
|
function makeEnableSourceMapsVitePlugin(options) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
sourcemap: getUpdatedSourceMapSettings(viteConfig, options)
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
];
|
|
78
|
+
return [{
|
|
79
|
+
name: "sentry-solidstart-update-source-map-setting",
|
|
80
|
+
apply: "build",
|
|
81
|
+
enforce: "post",
|
|
82
|
+
config(viteConfig) {
|
|
83
|
+
return { build: { sourcemap: getUpdatedSourceMapSettings(viteConfig, options) } };
|
|
84
|
+
}
|
|
85
|
+
}];
|
|
127
86
|
}
|
|
87
|
+
/** There are 3 ways to set up source map generation (https://github.com/getsentry/sentry-javascript/issues/13993)
|
|
88
|
+
*
|
|
89
|
+
* 1. User explicitly disabled source maps
|
|
90
|
+
* - keep this setting (emit a warning that errors won't be unminified in Sentry)
|
|
91
|
+
* - We won't upload anything
|
|
92
|
+
*
|
|
93
|
+
* 2. Users enabled source map generation (true, 'hidden', 'inline').
|
|
94
|
+
* - keep this setting (don't do anything - like deletion - besides uploading)
|
|
95
|
+
*
|
|
96
|
+
* 3. Users didn't set source maps generation
|
|
97
|
+
* - we enable 'hidden' source maps generation
|
|
98
|
+
* - configure `filesToDeleteAfterUpload` to delete all .map files (we emit a log about this)
|
|
99
|
+
*
|
|
100
|
+
* --> only exported for testing
|
|
101
|
+
*/
|
|
128
102
|
function getUpdatedSourceMapSettings(viteConfig, sentryPluginOptions) {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
updatedSourceMapSetting = "hidden";
|
|
150
|
-
debug && // eslint-disable-next-line no-console
|
|
151
|
-
console.log(
|
|
152
|
-
`[Sentry] Enabled source map generation in the build options with \`${settingKey}: 'hidden'\`. The source maps will be deleted after they were uploaded to Sentry.`
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
return updatedSourceMapSetting;
|
|
103
|
+
const viteSourceMap = viteConfig?.build?.sourcemap;
|
|
104
|
+
let updatedSourceMapSetting = viteSourceMap;
|
|
105
|
+
const settingKey = "vite.build.sourcemap";
|
|
106
|
+
const debug = sentryPluginOptions?.debug;
|
|
107
|
+
if (viteSourceMap === false) {
|
|
108
|
+
updatedSourceMapSetting = viteSourceMap;
|
|
109
|
+
if (debug) console.warn(`[Sentry] Source map generation is currently disabled in your SolidStart configuration (\`${settingKey}: false \`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \`${settingKey}\` (e.g. by setting them to \`hidden\`).`);
|
|
110
|
+
else console.warn("[Sentry] Source map generation is disabled in your SolidStart configuration.");
|
|
111
|
+
} else if (viteSourceMap && [
|
|
112
|
+
"hidden",
|
|
113
|
+
"inline",
|
|
114
|
+
true
|
|
115
|
+
].includes(viteSourceMap)) {
|
|
116
|
+
updatedSourceMapSetting = viteSourceMap;
|
|
117
|
+
debug && console.log(`[Sentry] We discovered \`${settingKey}\` is set to \`${viteSourceMap.toString()}\`. Sentry will keep this source map setting. This will un-minify the code snippet on the Sentry Issue page.`);
|
|
118
|
+
} else {
|
|
119
|
+
updatedSourceMapSetting = "hidden";
|
|
120
|
+
debug && console.log(`[Sentry] Enabled source map generation in the build options with \`${settingKey}: 'hidden'\`. The source maps will be deleted after they were uploaded to Sentry.`);
|
|
121
|
+
}
|
|
122
|
+
return updatedSourceMapSetting;
|
|
156
123
|
}
|
|
157
|
-
|
|
158
124
|
export { getUpdatedSourceMapSettings, makeAddSentryVitePlugin, makeAddSentryVitePluginSolidStart2, makeEnableSourceMapsVitePlugin };
|
|
159
|
-
|
|
125
|
+
|
|
126
|
+
//# sourceMappingURL=sourceMaps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceMaps.js","sources":["../../../src/vite/sourceMaps.ts"],"sourcesContent":["import { sentryVitePlugin } from '@sentry/bundler-plugins/vite';\nimport type { Plugin, UserConfig } from 'vite';\nimport type { SentrySolidStartOptions } from './sentrySolidStart';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n// `debug` is all the source map setting logic needs, and all the two majors' option types share.\ntype SourceMapSettingOptions = { debug?: boolean };\n\ntype FilesToDeleteAfterUpload = string | string[] | undefined;\n\n/**\n * A Sentry plugin for adding the @sentry/bundler-plugins/vite plugin to automatically upload source maps to Sentry.\n */\nexport function makeAddSentryVitePlugin(options: SentrySolidStartPluginOptions, viteConfig: UserConfig): Plugin[] {\n const {\n applicationKey,\n authToken,\n bundleSizeOptimizations,\n debug,\n errorHandler,\n headers,\n moduleMetadata,\n org,\n project,\n release,\n sentryUrl,\n silent,\n sourcemaps,\n telemetry,\n } = options;\n\n let updatedFilesToDeleteAfterUpload: string[] | undefined = undefined;\n\n if (\n typeof sourcemaps?.filesToDeleteAfterUpload === 'undefined' &&\n // Only if source maps were previously not set, we update the \"filesToDeleteAfterUpload\" (as we override the setting with \"hidden\")\n typeof viteConfig.build?.sourcemap === 'undefined'\n ) {\n // For .output, .vercel, .netlify etc.\n updatedFilesToDeleteAfterUpload = ['.*/**/*.map'];\n\n debug &&\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] Automatically setting \\`sourcemaps.filesToDeleteAfterUpload: ${JSON.stringify(\n updatedFilesToDeleteAfterUpload,\n )}\\` to delete generated source maps after they were uploaded to Sentry.`,\n );\n }\n\n return [\n ...sentryVitePlugin({\n applicationKey,\n authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,\n bundleSizeOptimizations,\n debug: debug ?? false,\n errorHandler,\n headers,\n moduleMetadata,\n org: org ?? process.env.SENTRY_ORG,\n project: project ?? process.env.SENTRY_PROJECT,\n release,\n silent,\n telemetry: telemetry ?? true,\n url: sentryUrl,\n sourcemaps: {\n ...sourcemaps,\n filesToDeleteAfterUpload: sourcemaps?.filesToDeleteAfterUpload ?? updatedFilesToDeleteAfterUpload,\n },\n _metaOptions: {\n telemetry: {\n metaFramework: 'solidstart',\n },\n },\n }),\n ];\n}\n\n/**\n * SolidStart 2 counterpart of `makeAddSentryVitePlugin`, reading the flat `BuildTimeOptionsBase`\n * fields rather than the nested `sourceMapsUploadOptions`.\n *\n * Covers the Vite-built client assets only; Nitro emits the server bundle outside Vite's output dir\n * and the Sentry Nitro module uploads that.\n */\nexport function makeAddSentryVitePluginSolidStart2(options: SentrySolidStartOptions): Plugin[] {\n // Everything not destructured out is field-for-field what `sentryVitePlugin` accepts, so it is\n // spread through — a new shared option then reaches the plugin without editing a list here.\n const {\n authToken,\n buildTimeInstrumentation: _buildTimeInstrumentation,\n debug,\n org,\n project,\n sentryUrl,\n sourcemaps,\n telemetry,\n ...passthroughOptions\n } = options;\n\n // Deferred because the default depends on whether the user set `build.sourcemap` themselves,\n // which is only known once Vite resolves its config.\n let resolveFilesToDeleteAfterUpload:\n | ((value: FilesToDeleteAfterUpload | PromiseLike<FilesToDeleteAfterUpload>) => void)\n | undefined;\n const filesToDeleteAfterUploadPromise = new Promise<FilesToDeleteAfterUpload>(resolve => {\n resolveFilesToDeleteAfterUpload = resolve;\n });\n\n const configPlugin: Plugin = {\n name: 'sentry-solidstart-files-to-delete-after-upload',\n apply: 'build',\n enforce: 'post',\n config(config) {\n const userFilesToDelete = sourcemaps?.filesToDeleteAfterUpload;\n\n // Only clean up source maps we turned on ourselves.\n if (typeof userFilesToDelete === 'undefined' && typeof config.build?.sourcemap === 'undefined') {\n if (debug) {\n // eslint-disable-next-line no-console\n console.log(\n '[Sentry] Automatically setting `sourcemaps.filesToDeleteAfterUpload: [\"./**/*.map\"]` to delete generated source maps after they were uploaded to Sentry.',\n );\n }\n resolveFilesToDeleteAfterUpload?.(['./**/*.map']);\n } else {\n resolveFilesToDeleteAfterUpload?.(userFilesToDelete);\n }\n },\n };\n\n const sentryPlugins = sentryVitePlugin({\n ...passthroughOptions,\n authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,\n debug: debug ?? false,\n org: org ?? process.env.SENTRY_ORG,\n project: project ?? process.env.SENTRY_PROJECT,\n telemetry: telemetry ?? true,\n url: sentryUrl,\n sourcemaps: {\n ...sourcemaps,\n filesToDeleteAfterUpload: filesToDeleteAfterUploadPromise,\n },\n _metaOptions: {\n telemetry: {\n metaFramework: 'solidstart',\n },\n },\n });\n\n return [configPlugin, ...sentryPlugins];\n}\n\n/**\n * A Sentry plugin for SolidStart to enable \"hidden\" source maps if they are unset. Used by both\n * SolidStart majors.\n */\nexport function makeEnableSourceMapsVitePlugin(options: SourceMapSettingOptions): Plugin[] {\n return [\n {\n name: 'sentry-solidstart-update-source-map-setting',\n apply: 'build',\n enforce: 'post',\n config(viteConfig) {\n // Return only what changed: Vite concatenates arrays when merging a `config` return value,\n // so echoing the whole config back would duplicate every array the user had.\n return {\n build: {\n sourcemap: getUpdatedSourceMapSettings(viteConfig, options),\n },\n };\n },\n },\n ];\n}\n\n/** There are 3 ways to set up source map generation (https://github.com/getsentry/sentry-javascript/issues/13993)\n *\n * 1. User explicitly disabled source maps\n * - keep this setting (emit a warning that errors won't be unminified in Sentry)\n * - We won't upload anything\n *\n * 2. Users enabled source map generation (true, 'hidden', 'inline').\n * - keep this setting (don't do anything - like deletion - besides uploading)\n *\n * 3. Users didn't set source maps generation\n * - we enable 'hidden' source maps generation\n * - configure `filesToDeleteAfterUpload` to delete all .map files (we emit a log about this)\n *\n * --> only exported for testing\n */\nexport function getUpdatedSourceMapSettings(\n viteConfig: UserConfig,\n sentryPluginOptions?: SourceMapSettingOptions,\n): boolean | 'inline' | 'hidden' {\n const viteSourceMap = viteConfig?.build?.sourcemap;\n let updatedSourceMapSetting = viteSourceMap;\n\n const settingKey = 'vite.build.sourcemap';\n const debug = sentryPluginOptions?.debug;\n\n if (viteSourceMap === false) {\n updatedSourceMapSetting = viteSourceMap;\n\n if (debug) {\n // Longer debug message with more details\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry] Source map generation is currently disabled in your SolidStart configuration (\\`${settingKey}: false \\`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \\`${settingKey}\\` (e.g. by setting them to \\`hidden\\`).`,\n );\n } else {\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Source map generation is disabled in your SolidStart configuration.');\n }\n } else if (viteSourceMap && ['hidden', 'inline', true].includes(viteSourceMap)) {\n updatedSourceMapSetting = viteSourceMap;\n\n debug &&\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] We discovered \\`${settingKey}\\` is set to \\`${viteSourceMap.toString()}\\`. Sentry will keep this source map setting. This will un-minify the code snippet on the Sentry Issue page.`,\n );\n } else {\n updatedSourceMapSetting = 'hidden';\n\n debug &&\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] Enabled source map generation in the build options with \\`${settingKey}: 'hidden'\\`. The source maps will be deleted after they were uploaded to Sentry.`,\n );\n }\n\n return updatedSourceMapSetting;\n}\n"],"names":[],"mappings":";;AAaO,SAAS,uBAAA,CAAwB,SAAwC,UAAA,EAAkC;AAChH,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,SAAA;AAAA,IACA,uBAAA;AAAA,IACA,KAAA;AAAA,IACA,YAAA;AAAA,IACA,OAAA;AAAA,IACA,cAAA;AAAA,IACA,GAAA;AAAA,IACA,OAAA;AAAA,IACA,OAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,GACF,GAAI,OAAA;AAEJ,EAAA,IAAI,+BAAA,GAAwD,MAAA;AAE5D,EAAA,IACE,OAAO,YAAY,wBAAA,KAA6B,WAAA;AAAA,EAEhD,OAAO,UAAA,CAAW,KAAA,EAAO,SAAA,KAAc,WAAA,EACvC;AAEA,IAAA,+BAAA,GAAkC,CAAC,aAAa,CAAA;AAEhD,IAAA,KAAA;AAAA,IAEE,OAAA,CAAQ,GAAA;AAAA,MACN,yEAAyE,IAAA,CAAK,SAAA;AAAA,QAC5E;AAAA,OACD,CAAA,sEAAA;AAAA,KACH;AAAA,EACJ;AAEA,EAAA,OAAO;AAAA,IACL,GAAG,gBAAA,CAAiB;AAAA,MAClB,cAAA;AAAA,MACA,SAAA,EAAW,SAAA,IAAa,OAAA,CAAQ,GAAA,CAAI,iBAAA;AAAA,MACpC,uBAAA;AAAA,MACA,OAAO,KAAA,IAAS,KAAA;AAAA,MAChB,YAAA;AAAA,MACA,OAAA;AAAA,MACA,cAAA;AAAA,MACA,GAAA,EAAK,GAAA,IAAO,OAAA,CAAQ,GAAA,CAAI,UAAA;AAAA,MACxB,OAAA,EAAS,OAAA,IAAW,OAAA,CAAQ,GAAA,CAAI,cAAA;AAAA,MAChC,OAAA;AAAA,MACA,MAAA;AAAA,MACA,WAAW,SAAA,IAAa,IAAA;AAAA,MACxB,GAAA,EAAK,SAAA;AAAA,MACL,UAAA,EAAY;AAAA,QACV,GAAG,UAAA;AAAA,QACH,wBAAA,EAA0B,YAAY,wBAAA,IAA4B;AAAA,OACpE;AAAA,MACA,YAAA,EAAc;AAAA,QACZ,SAAA,EAAW;AAAA,UACT,aAAA,EAAe;AAAA;AACjB;AACF,KACD;AAAA,GACH;AACF;AASO,SAAS,mCAAmC,OAAA,EAA4C;AAG7F,EAAA,MAAM;AAAA,IACJ,SAAA;AAAA,IACA,wBAAA,EAA0B,yBAAA;AAAA,IAC1B,KAAA;AAAA,IACA,GAAA;AAAA,IACA,OAAA;AAAA,IACA,SAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,OAAA;AAIJ,EAAA,IAAI,+BAAA;AAGJ,EAAA,MAAM,+BAAA,GAAkC,IAAI,OAAA,CAAkC,CAAA,OAAA,KAAW;AACvF,IAAA,+BAAA,GAAkC,OAAA;AAAA,EACpC,CAAC,CAAA;AAED,EAAA,MAAM,YAAA,GAAuB;AAAA,IAC3B,IAAA,EAAM,gDAAA;AAAA,IACN,KAAA,EAAO,OAAA;AAAA,IACP,OAAA,EAAS,MAAA;AAAA,IACT,OAAO,MAAA,EAAQ;AACb,MAAA,MAAM,oBAAoB,UAAA,EAAY,wBAAA;AAGtC,MAAA,IAAI,OAAO,iBAAA,KAAsB,WAAA,IAAe,OAAO,MAAA,CAAO,KAAA,EAAO,cAAc,WAAA,EAAa;AAC9F,QAAA,IAAI,KAAA,EAAO;AAET,UAAA,OAAA,CAAQ,GAAA;AAAA,YACN;AAAA,WACF;AAAA,QACF;AACA,QAAA,+BAAA,GAAkC,CAAC,YAAY,CAAC,CAAA;AAAA,MAClD,CAAA,MAAO;AACL,QAAA,+BAAA,GAAkC,iBAAiB,CAAA;AAAA,MACrD;AAAA,IACF;AAAA,GACF;AAEA,EAAA,MAAM,gBAAgB,gBAAA,CAAiB;AAAA,IACrC,GAAG,kBAAA;AAAA,IACH,SAAA,EAAW,SAAA,IAAa,OAAA,CAAQ,GAAA,CAAI,iBAAA;AAAA,IACpC,OAAO,KAAA,IAAS,KAAA;AAAA,IAChB,GAAA,EAAK,GAAA,IAAO,OAAA,CAAQ,GAAA,CAAI,UAAA;AAAA,IACxB,OAAA,EAAS,OAAA,IAAW,OAAA,CAAQ,GAAA,CAAI,cAAA;AAAA,IAChC,WAAW,SAAA,IAAa,IAAA;AAAA,IACxB,GAAA,EAAK,SAAA;AAAA,IACL,UAAA,EAAY;AAAA,MACV,GAAG,UAAA;AAAA,MACH,wBAAA,EAA0B;AAAA,KAC5B;AAAA,IACA,YAAA,EAAc;AAAA,MACZ,SAAA,EAAW;AAAA,QACT,aAAA,EAAe;AAAA;AACjB;AACF,GACD,CAAA;AAED,EAAA,OAAO,CAAC,YAAA,EAAc,GAAG,aAAa,CAAA;AACxC;AAMO,SAAS,+BAA+B,OAAA,EAA4C;AACzF,EAAA,OAAO;AAAA,IACL;AAAA,MACE,IAAA,EAAM,6CAAA;AAAA,MACN,KAAA,EAAO,OAAA;AAAA,MACP,OAAA,EAAS,MAAA;AAAA,MACT,OAAO,UAAA,EAAY;AAGjB,QAAA,OAAO;AAAA,UACL,KAAA,EAAO;AAAA,YACL,SAAA,EAAW,2BAAA,CAA4B,UAAA,EAAY,OAAO;AAAA;AAC5D,SACF;AAAA,MACF;AAAA;AACF,GACF;AACF;AAiBO,SAAS,2BAAA,CACd,YACA,mBAAA,EAC+B;AAC/B,EAAA,MAAM,aAAA,GAAgB,YAAY,KAAA,EAAO,SAAA;AACzC,EAAA,IAAI,uBAAA,GAA0B,aAAA;AAE9B,EAAA,MAAM,UAAA,GAAa,sBAAA;AACnB,EAAA,MAAM,QAAQ,mBAAA,EAAqB,KAAA;AAEnC,EAAA,IAAI,kBAAkB,KAAA,EAAO;AAC3B,IAAA,uBAAA,GAA0B,aAAA;AAE1B,IAAA,IAAI,KAAA,EAAO;AAGT,MAAA,OAAA,CAAQ,IAAA;AAAA,QACN,CAAA,yFAAA,EAA4F,UAAU,CAAA,2QAAA,EAA8Q,UAAU,CAAA,wCAAA;AAAA,OAChY;AAAA,IACF,CAAA,MAAO;AAEL,MAAA,OAAA,CAAQ,KAAK,8EAA8E,CAAA;AAAA,IAC7F;AAAA,EACF,CAAA,MAAA,IAAW,iBAAiB,CAAC,QAAA,EAAU,UAAU,IAAI,CAAA,CAAE,QAAA,CAAS,aAAa,CAAA,EAAG;AAC9E,IAAA,uBAAA,GAA0B,aAAA;AAE1B,IAAA,KAAA;AAAA,IAEE,OAAA,CAAQ,GAAA;AAAA,MACN,CAAA,yBAAA,EAA4B,UAAU,CAAA,eAAA,EAAkB,aAAA,CAAc,UAAU,CAAA,4GAAA;AAAA,KAClF;AAAA,EACJ,CAAA,MAAO;AACL,IAAA,uBAAA,GAA0B,QAAA;AAE1B,IAAA,KAAA;AAAA,IAEE,OAAA,CAAQ,GAAA;AAAA,MACN,sEAAsE,UAAU,CAAA,kFAAA;AAAA,KAClF;AAAA,EACJ;AAEA,EAAA,OAAO,uBAAA;AACT;;;;"}
|
|
1
|
+
{"version":3,"file":"sourceMaps.js","names":[],"sources":["../../../src/vite/sourceMaps.ts"],"sourcesContent":["import { sentryVitePlugin } from '@sentry/bundler-plugins/vite';\nimport type { Plugin, UserConfig } from 'vite';\nimport type { SentrySolidStartOptions } from './sentrySolidStart';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n// `debug` is all the source map setting logic needs, and all the two majors' option types share.\ntype SourceMapSettingOptions = { debug?: boolean };\n\ntype FilesToDeleteAfterUpload = string | string[] | undefined;\n\n/**\n * A Sentry plugin for adding the @sentry/bundler-plugins/vite plugin to automatically upload source maps to Sentry.\n */\nexport function makeAddSentryVitePlugin(options: SentrySolidStartPluginOptions, viteConfig: UserConfig): Plugin[] {\n const {\n applicationKey,\n authToken,\n bundleSizeOptimizations,\n debug,\n errorHandler,\n headers,\n moduleMetadata,\n org,\n project,\n release,\n sentryUrl,\n silent,\n sourcemaps,\n telemetry,\n } = options;\n\n let updatedFilesToDeleteAfterUpload: string[] | undefined = undefined;\n\n if (\n typeof sourcemaps?.filesToDeleteAfterUpload === 'undefined' &&\n // Only if source maps were previously not set, we update the \"filesToDeleteAfterUpload\" (as we override the setting with \"hidden\")\n typeof viteConfig.build?.sourcemap === 'undefined'\n ) {\n // For .output, .vercel, .netlify etc.\n updatedFilesToDeleteAfterUpload = ['.*/**/*.map'];\n\n debug &&\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] Automatically setting \\`sourcemaps.filesToDeleteAfterUpload: ${JSON.stringify(\n updatedFilesToDeleteAfterUpload,\n )}\\` to delete generated source maps after they were uploaded to Sentry.`,\n );\n }\n\n return [\n ...sentryVitePlugin({\n applicationKey,\n authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,\n bundleSizeOptimizations,\n debug: debug ?? false,\n errorHandler,\n headers,\n moduleMetadata,\n org: org ?? process.env.SENTRY_ORG,\n project: project ?? process.env.SENTRY_PROJECT,\n release,\n silent,\n telemetry: telemetry ?? true,\n url: sentryUrl,\n sourcemaps: {\n ...sourcemaps,\n filesToDeleteAfterUpload: sourcemaps?.filesToDeleteAfterUpload ?? updatedFilesToDeleteAfterUpload,\n },\n _metaOptions: {\n telemetry: {\n metaFramework: 'solidstart',\n },\n },\n }),\n ];\n}\n\n/**\n * SolidStart 2 counterpart of `makeAddSentryVitePlugin`, reading the flat `BuildTimeOptionsBase`\n * fields rather than the nested `sourceMapsUploadOptions`.\n *\n * Covers the Vite-built client assets only; Nitro emits the server bundle outside Vite's output dir\n * and the Sentry Nitro module uploads that.\n */\nexport function makeAddSentryVitePluginSolidStart2(options: SentrySolidStartOptions): Plugin[] {\n // Everything not destructured out is field-for-field what `sentryVitePlugin` accepts, so it is\n // spread through — a new shared option then reaches the plugin without editing a list here.\n const {\n authToken,\n buildTimeInstrumentation: _buildTimeInstrumentation,\n debug,\n org,\n project,\n sentryUrl,\n sourcemaps,\n telemetry,\n ...passthroughOptions\n } = options;\n\n // Deferred because the default depends on whether the user set `build.sourcemap` themselves,\n // which is only known once Vite resolves its config.\n let resolveFilesToDeleteAfterUpload:\n | ((value: FilesToDeleteAfterUpload | PromiseLike<FilesToDeleteAfterUpload>) => void)\n | undefined;\n const filesToDeleteAfterUploadPromise = new Promise<FilesToDeleteAfterUpload>(resolve => {\n resolveFilesToDeleteAfterUpload = resolve;\n });\n\n const configPlugin: Plugin = {\n name: 'sentry-solidstart-files-to-delete-after-upload',\n apply: 'build',\n enforce: 'post',\n config(config) {\n const userFilesToDelete = sourcemaps?.filesToDeleteAfterUpload;\n\n // Only clean up source maps we turned on ourselves.\n if (typeof userFilesToDelete === 'undefined' && typeof config.build?.sourcemap === 'undefined') {\n if (debug) {\n // eslint-disable-next-line no-console\n console.log(\n '[Sentry] Automatically setting `sourcemaps.filesToDeleteAfterUpload: [\"./**/*.map\"]` to delete generated source maps after they were uploaded to Sentry.',\n );\n }\n resolveFilesToDeleteAfterUpload?.(['./**/*.map']);\n } else {\n resolveFilesToDeleteAfterUpload?.(userFilesToDelete);\n }\n },\n };\n\n const sentryPlugins = sentryVitePlugin({\n ...passthroughOptions,\n authToken: authToken ?? process.env.SENTRY_AUTH_TOKEN,\n debug: debug ?? false,\n org: org ?? process.env.SENTRY_ORG,\n project: project ?? process.env.SENTRY_PROJECT,\n telemetry: telemetry ?? true,\n url: sentryUrl,\n sourcemaps: {\n ...sourcemaps,\n filesToDeleteAfterUpload: filesToDeleteAfterUploadPromise,\n },\n _metaOptions: {\n telemetry: {\n metaFramework: 'solidstart',\n },\n },\n });\n\n return [configPlugin, ...sentryPlugins];\n}\n\n/**\n * A Sentry plugin for SolidStart to enable \"hidden\" source maps if they are unset. Used by both\n * SolidStart majors.\n */\nexport function makeEnableSourceMapsVitePlugin(options: SourceMapSettingOptions): Plugin[] {\n return [\n {\n name: 'sentry-solidstart-update-source-map-setting',\n apply: 'build',\n enforce: 'post',\n config(viteConfig) {\n // Return only what changed: Vite concatenates arrays when merging a `config` return value,\n // so echoing the whole config back would duplicate every array the user had.\n return {\n build: {\n sourcemap: getUpdatedSourceMapSettings(viteConfig, options),\n },\n };\n },\n },\n ];\n}\n\n/** There are 3 ways to set up source map generation (https://github.com/getsentry/sentry-javascript/issues/13993)\n *\n * 1. User explicitly disabled source maps\n * - keep this setting (emit a warning that errors won't be unminified in Sentry)\n * - We won't upload anything\n *\n * 2. Users enabled source map generation (true, 'hidden', 'inline').\n * - keep this setting (don't do anything - like deletion - besides uploading)\n *\n * 3. Users didn't set source maps generation\n * - we enable 'hidden' source maps generation\n * - configure `filesToDeleteAfterUpload` to delete all .map files (we emit a log about this)\n *\n * --> only exported for testing\n */\nexport function getUpdatedSourceMapSettings(\n viteConfig: UserConfig,\n sentryPluginOptions?: SourceMapSettingOptions,\n): boolean | 'inline' | 'hidden' {\n const viteSourceMap = viteConfig?.build?.sourcemap;\n let updatedSourceMapSetting = viteSourceMap;\n\n const settingKey = 'vite.build.sourcemap';\n const debug = sentryPluginOptions?.debug;\n\n if (viteSourceMap === false) {\n updatedSourceMapSetting = viteSourceMap;\n\n if (debug) {\n // Longer debug message with more details\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry] Source map generation is currently disabled in your SolidStart configuration (\\`${settingKey}: false \\`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \\`${settingKey}\\` (e.g. by setting them to \\`hidden\\`).`,\n );\n } else {\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Source map generation is disabled in your SolidStart configuration.');\n }\n } else if (viteSourceMap && ['hidden', 'inline', true].includes(viteSourceMap)) {\n updatedSourceMapSetting = viteSourceMap;\n\n debug &&\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] We discovered \\`${settingKey}\\` is set to \\`${viteSourceMap.toString()}\\`. Sentry will keep this source map setting. This will un-minify the code snippet on the Sentry Issue page.`,\n );\n } else {\n updatedSourceMapSetting = 'hidden';\n\n debug &&\n // eslint-disable-next-line no-console\n console.log(\n `[Sentry] Enabled source map generation in the build options with \\`${settingKey}: 'hidden'\\`. The source maps will be deleted after they were uploaded to Sentry.`,\n );\n }\n\n return updatedSourceMapSetting;\n}\n"],"mappings":";;;;;AAaA,SAAgB,wBAAwB,SAAwC,YAAkC;CAChH,MAAM,EACJ,gBACA,WACA,yBACA,OACA,cACA,SACA,gBACA,KACA,SACA,SACA,WACA,QACA,YACA,cACE;CAEJ,IAAI,kCAAwD,KAAA;CAE5D,IACE,OAAO,YAAY,6BAA6B,eAEhD,OAAO,WAAW,OAAO,cAAc,aACvC;EAEA,kCAAkC,CAAC,aAAa;EAEhD,SAEE,QAAQ,IACN,yEAAyE,KAAK,UAC5E,+BACF,EAAE,uEACJ;CACJ;CAEA,OAAO,CACL,GAAG,iBAAiB;EAClB;EACA,WAAW,aAAa,QAAQ,IAAI;EACpC;EACA,OAAO,SAAS;EAChB;EACA;EACA;EACA,KAAK,OAAO,QAAQ,IAAI;EACxB,SAAS,WAAW,QAAQ,IAAI;EAChC;EACA;EACA,WAAW,aAAa;EACxB,KAAK;EACL,YAAY;GACV,GAAG;GACH,0BAA0B,YAAY,4BAA4B;EACpE;EACA,cAAc,EACZ,WAAW,EACT,eAAe,aACjB,EACF;CACF,CAAC,CACH;AACF;;;;;;;;AASA,SAAgB,mCAAmC,SAA4C;CAG7F,MAAM,EACJ,WACA,0BAA0B,2BAC1B,OACA,KACA,SACA,WACA,YACA,WACA,GAAG,uBACD;CAIJ,IAAI;CAGJ,MAAM,kCAAkC,IAAI,SAAkC,YAAW;EACvF,kCAAkC;CACpC,CAAC;CA2CD,OAAO,CAAC;EAxCN,MAAM;EACN,OAAO;EACP,SAAS;EACT,OAAO,QAAQ;GACb,MAAM,oBAAoB,YAAY;GAGtC,IAAI,OAAO,sBAAsB,eAAe,OAAO,OAAO,OAAO,cAAc,aAAa;IAC9F,IAAI,OAEF,QAAQ,IACN,4JACF;IAEF,kCAAkC,CAAC,YAAY,CAAC;GAClD,OACE,kCAAkC,iBAAiB;EAEvD;CAsBiB,GAAG,GAnBA,iBAAiB;EACrC,GAAG;EACH,WAAW,aAAa,QAAQ,IAAI;EACpC,OAAO,SAAS;EAChB,KAAK,OAAO,QAAQ,IAAI;EACxB,SAAS,WAAW,QAAQ,IAAI;EAChC,WAAW,aAAa;EACxB,KAAK;EACL,YAAY;GACV,GAAG;GACH,0BAA0B;EAC5B;EACA,cAAc,EACZ,WAAW,EACT,eAAe,aACjB,EACF;CACF,CAEqC,CAAC;AACxC;;;;;AAMA,SAAgB,+BAA+B,SAA4C;CACzF,OAAO,CACL;EACE,MAAM;EACN,OAAO;EACP,SAAS;EACT,OAAO,YAAY;GAGjB,OAAO,EACL,OAAO,EACL,WAAW,4BAA4B,YAAY,OAAO,EAC5D,EACF;EACF;CACF,CACF;AACF;;;;;;;;;;;;;;;;AAiBA,SAAgB,4BACd,YACA,qBAC+B;CAC/B,MAAM,gBAAgB,YAAY,OAAO;CACzC,IAAI,0BAA0B;CAE9B,MAAM,aAAa;CACnB,MAAM,QAAQ,qBAAqB;CAEnC,IAAI,kBAAkB,OAAO;EAC3B,0BAA0B;EAE1B,IAAI,OAGF,QAAQ,KACN,4FAA4F,WAAW,6QAA6Q,WAAW,yCACjY;OAGA,QAAQ,KAAK,8EAA8E;CAE/F,OAAO,IAAI,iBAAiB;EAAC;EAAU;EAAU;CAAI,CAAC,CAAC,SAAS,aAAa,GAAG;EAC9E,0BAA0B;EAE1B,SAEE,QAAQ,IACN,4BAA4B,WAAW,iBAAiB,cAAc,SAAS,EAAE,6GACnF;CACJ,OAAO;EACL,0BAA0B;EAE1B,SAEE,QAAQ,IACN,sEAAsE,WAAW,mFACnF;CACJ;CAEA,OAAO;AACT"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* Serves the managed tunnel under the app's base path on SolidStart v1 (Nitro v2). The runtime answers the requests.
|
|
3
|
+
* `withSentry` registers it.
|
|
4
4
|
*/
|
|
5
|
-
declare const _default: (
|
|
5
|
+
declare const _default: () => void;
|
|
6
6
|
export default _default;
|
|
7
7
|
//# sourceMappingURL=tunnelPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tunnelPlugin.d.ts","sourceRoot":"","sources":["../../../src/nitro/tunnelPlugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tunnelPlugin.d.ts","sourceRoot":"","sources":["../../../src/nitro/tunnelPlugin.ts"],"names":[],"mappings":"AAKA;;;GAGG"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/solidstart",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.13.0",
|
|
4
4
|
"description": "Official Sentry SDK for Solid Start",
|
|
5
|
-
"repository":
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git://github.com/getsentry/sentry-javascript.git"
|
|
8
|
+
},
|
|
6
9
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/solidstart",
|
|
7
10
|
"author": "Sentry",
|
|
8
11
|
"license": "MIT",
|
|
@@ -30,6 +33,10 @@
|
|
|
30
33
|
"./package.json": "./package.json",
|
|
31
34
|
".": {
|
|
32
35
|
"types": "./build/types/index.types.d.ts",
|
|
36
|
+
"sentry-solidstart-runtime": {
|
|
37
|
+
"import": "./build/esm/server/index.js",
|
|
38
|
+
"require": "./build/cjs/server/index.js"
|
|
39
|
+
},
|
|
33
40
|
"browser": {
|
|
34
41
|
"import": "./build/esm/index.client.js",
|
|
35
42
|
"require": "./build/cjs/index.client.js"
|
|
@@ -80,19 +87,19 @@
|
|
|
80
87
|
}
|
|
81
88
|
},
|
|
82
89
|
"dependencies": {
|
|
83
|
-
"@sentry/core": "11.
|
|
84
|
-
"@sentry/nitro": "11.
|
|
85
|
-
"@sentry/node": "11.
|
|
86
|
-
"@sentry/server-runtime-injection": "11.
|
|
87
|
-
"@sentry/server-utils": "11.
|
|
88
|
-
"@sentry/solid": "11.
|
|
89
|
-
"@sentry/bundler-plugins": "11.
|
|
90
|
-
"@sentry/conventions": "0.
|
|
90
|
+
"@sentry/core": "11.13.0",
|
|
91
|
+
"@sentry/nitro": "11.13.0",
|
|
92
|
+
"@sentry/node": "11.13.0",
|
|
93
|
+
"@sentry/server-runtime-injection": "11.13.0",
|
|
94
|
+
"@sentry/server-utils": "11.13.0",
|
|
95
|
+
"@sentry/solid": "11.13.0",
|
|
96
|
+
"@sentry/bundler-plugins": "11.13.0",
|
|
97
|
+
"@sentry/conventions": "0.33.0",
|
|
91
98
|
"h3": "^1.15.10"
|
|
92
99
|
},
|
|
93
100
|
"devDependencies": {
|
|
94
|
-
"@sentry-internal/rollup-utils": "11.
|
|
95
|
-
"@sentry/browser": "11.
|
|
101
|
+
"@sentry-internal/rollup-utils": "11.13.0",
|
|
102
|
+
"@sentry/browser": "11.13.0",
|
|
96
103
|
"@solidjs/router": "^1.0.0",
|
|
97
104
|
"@solidjs/start": "^1.3.2",
|
|
98
105
|
"@solidjs/testing-library": "0.8.5",
|
|
@@ -100,34 +107,11 @@
|
|
|
100
107
|
"@testing-library/user-event": "^14.6.8",
|
|
101
108
|
"@types/node": "^20.19.0",
|
|
102
109
|
"nitropack": "^2.13.4",
|
|
103
|
-
"node-mock-http": "^1.0.4",
|
|
104
110
|
"solid-js": "^1.9.18",
|
|
105
111
|
"vinxi": "^0.5.11",
|
|
106
|
-
"vite": "^8.3.
|
|
112
|
+
"vite": "^8.3.6",
|
|
107
113
|
"vite-plugin-solid": "^2.11.6"
|
|
108
114
|
},
|
|
109
|
-
"scripts": {
|
|
110
|
-
"build": "run-p build:transpile build:types",
|
|
111
|
-
"build:dev": "pnpm run build",
|
|
112
|
-
"build:transpile": "rollup -c rollup.npm.config.mjs",
|
|
113
|
-
"build:types": "run-s build:types:core build:types:subexports",
|
|
114
|
-
"build:types:core": "tsc -p tsconfig.types.json",
|
|
115
|
-
"build:types:subexports": "tsc -p tsconfig.subexports-types.json",
|
|
116
|
-
"build:watch": "run-p build:transpile:watch",
|
|
117
|
-
"build:dev:watch": "pnpm run build:watch",
|
|
118
|
-
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
|
|
119
|
-
"build:tarball": "npm pack",
|
|
120
|
-
"circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts && madge --circular src/solidrouter.client.ts && madge --circular src/solidrouter.server.ts && madge --circular src/solidrouter.ts",
|
|
121
|
-
"clean": "rimraf build coverage sentry-solidstart-*.tgz ./*.d.ts ./*.d.ts.map ./client ./server",
|
|
122
|
-
"lint:fix": "oxlint . --fix --type-aware",
|
|
123
|
-
"lint": "oxlint . --type-aware",
|
|
124
|
-
"lint:types": "oxlint src --type-aware --type-check",
|
|
125
|
-
"lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module",
|
|
126
|
-
"test": "pnpm run test:unit",
|
|
127
|
-
"test:unit": "vitest run",
|
|
128
|
-
"test:watch": "vitest --watch",
|
|
129
|
-
"yalc:publish": "yalc publish --push --sig"
|
|
130
|
-
},
|
|
131
115
|
"nx": {
|
|
132
116
|
"targets": {
|
|
133
117
|
"build:types": {
|
|
@@ -140,5 +124,23 @@
|
|
|
140
124
|
]
|
|
141
125
|
}
|
|
142
126
|
}
|
|
127
|
+
},
|
|
128
|
+
"scripts": {
|
|
129
|
+
"build": "pnpm run \"/^build:(transpile|types)$/\"",
|
|
130
|
+
"build:dev": "pnpm run build",
|
|
131
|
+
"build:transpile": "rolldown -c rollup.npm.config.mjs",
|
|
132
|
+
"build:types": "pnpm run build:types:core && pnpm run build:types:subexports",
|
|
133
|
+
"build:types:core": "tsc -p tsconfig.types.json",
|
|
134
|
+
"build:types:subexports": "tsc -p tsconfig.subexports-types.json",
|
|
135
|
+
"build:tarball": "pnpm pack",
|
|
136
|
+
"clean": "node ../../scripts/rm.mjs build coverage sentry-solidstart-*.tgz ./*.d.ts ./*.d.ts.map ./client ./server",
|
|
137
|
+
"lint:fix": "oxlint . --fix --type-aware",
|
|
138
|
+
"lint": "oxlint . --type-aware",
|
|
139
|
+
"lint:types": "oxlint src --type-aware --type-check",
|
|
140
|
+
"lint:es-compatibility": "node ../../scripts/es-check.mjs es2020",
|
|
141
|
+
"test": "pnpm run test:unit",
|
|
142
|
+
"test:unit": "vitest run",
|
|
143
|
+
"test:watch": "vitest --watch",
|
|
144
|
+
"yalc:publish": "pnpm dlx yalc publish --push --sig"
|
|
143
145
|
}
|
|
144
|
-
}
|
|
146
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"solidrouter.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.client.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"solidrouter.client.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"solidrouter.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"solidrouter.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|