@sentry/solidstart 11.9.0 → 11.10.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/README.md +5 -1
- package/build/cjs/client/index.js +1 -1
- package/build/cjs/client/sdk.js +2 -0
- package/build/cjs/client/sdk.js.map +1 -1
- package/build/cjs/client/solidrouter.js +1 -1
- package/build/cjs/common/tunnel.js +13 -0
- package/build/cjs/common/tunnel.js.map +1 -0
- package/build/cjs/config/withSentry.js +23 -2
- package/build/cjs/config/withSentry.js.map +1 -1
- package/build/cjs/index.client.js +1 -1
- package/build/cjs/index.server.js +6 -1
- package/build/cjs/index.server.js.map +1 -1
- package/build/cjs/nitro/tunnelPlugin.js +22 -0
- package/build/cjs/nitro/tunnelPlugin.js.map +1 -0
- package/build/cjs/server/index.js +6 -1
- package/build/cjs/server/index.js.map +1 -1
- package/build/cjs/solidrouter.client.js +1 -1
- package/build/cjs/solidrouter.js +1 -1
- package/build/cjs/vite/sentrySolidStartVite.js +12 -4
- package/build/cjs/vite/sentrySolidStartVite.js.map +1 -1
- package/build/esm/client/sdk.js +2 -0
- package/build/esm/client/sdk.js.map +1 -1
- package/build/esm/common/tunnel.js +10 -0
- package/build/esm/common/tunnel.js.map +1 -0
- package/build/esm/config/withSentry.js +23 -3
- package/build/esm/config/withSentry.js.map +1 -1
- package/build/esm/index.server.js +1 -1
- package/build/esm/nitro/tunnelPlugin.js +22 -0
- package/build/esm/nitro/tunnelPlugin.js.map +1 -0
- package/build/esm/package.json +1 -1
- package/build/esm/server/index.js +1 -1
- package/build/esm/vite/sentrySolidStartVite.js +12 -4
- package/build/esm/vite/sentrySolidStartVite.js.map +1 -1
- package/build/types/client/sdk.d.ts.map +1 -1
- package/build/types/common/tunnel.d.ts +9 -0
- package/build/types/common/tunnel.d.ts.map +1 -0
- package/build/types/config/types.d.ts +1 -0
- package/build/types/config/types.d.ts.map +1 -1
- package/build/types/config/withSentry.d.ts.map +1 -1
- package/build/types/nitro/tunnelPlugin.d.ts +7 -0
- package/build/types/nitro/tunnelPlugin.d.ts.map +1 -0
- package/build/types/server/index.d.ts +1 -1
- package/build/types/server/index.d.ts.map +1 -1
- package/build/types/vite/sentrySolidStartVite.d.ts +2 -2
- package/build/types/vite/sentrySolidStartVite.d.ts.map +1 -1
- package/package.json +15 -12
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
|
|
3
|
-
<
|
|
3
|
+
<picture>
|
|
4
|
+
<source srcset="https://sentry-brand.storage.googleapis.com/sentry-logo-white.png" media="(prefers-color-scheme: dark)" />
|
|
5
|
+
<source srcset="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" />
|
|
6
|
+
<img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280">
|
|
7
|
+
</picture>
|
|
4
8
|
</a>
|
|
5
9
|
</p>
|
|
6
10
|
|
|
@@ -13,7 +13,7 @@ Object.prototype.hasOwnProperty.call(solid, '__proto__') &&
|
|
|
13
13
|
value: solid['__proto__']
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
Object.keys(solid).forEach(k
|
|
16
|
+
Object.keys(solid).forEach(function (k) {
|
|
17
17
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = solid[k];
|
|
18
18
|
});
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
package/build/cjs/client/sdk.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
|
|
3
3
|
const core = require('@sentry/core');
|
|
4
|
+
const tunnel = require('../common/tunnel.js');
|
|
4
5
|
const solid = require('@sentry/solid');
|
|
5
6
|
|
|
6
7
|
function init(options) {
|
|
@@ -8,6 +9,7 @@ function init(options) {
|
|
|
8
9
|
defaultIntegrations: getDefaultIntegrations(options),
|
|
9
10
|
...options
|
|
10
11
|
};
|
|
12
|
+
tunnel.applyTunnelBasePath(opts);
|
|
11
13
|
core.applySdkMetadata(opts, "solidstart", ["solidstart", "solid"]);
|
|
12
14
|
return solid.init(opts);
|
|
13
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sources":["../../../src/client/sdk.ts"],"sourcesContent":["import type { Client, Integration } from '@sentry/core';\nimport { applySdkMetadata } from '@sentry/core';\nimport type { BrowserOptions } from '@sentry/solid';\nimport {\n browserTracingIntegration,\n getDefaultIntegrations as getDefaultSolidIntegrations,\n init as initSolidSDK,\n} from '@sentry/solid';\n\n// Treeshakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean;\n\n/**\n * Initializes the client side of the Solid Start SDK.\n */\nexport function init(options: BrowserOptions): Client | undefined {\n const opts = {\n defaultIntegrations: getDefaultIntegrations(options),\n ...options,\n };\n\n applySdkMetadata(opts, 'solidstart', ['solidstart', 'solid']);\n\n return initSolidSDK(opts);\n}\n\nfunction getDefaultIntegrations(options: BrowserOptions): Integration[] {\n const integrations = getDefaultSolidIntegrations(options);\n\n // This evaluates to true unless __SENTRY_TRACING__ is text-replaced with \"false\",\n // in which case everything inside will get tree-shaken away\n if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {\n // We add the default BrowserTracingIntegration here always.\n // We can do this, even if `solidRouterBrowserTracingIntegration` is\n // supplied as integration in `init` by users because it will win\n // over the default integration by virtue of having the same\n // `BrowserTracing` integration name and being added later.\n integrations.push(browserTracingIntegration());\n }\n\n return integrations;\n}\n"],"names":["applySdkMetadata","initSolidSDK","getDefaultSolidIntegrations","browserTracingIntegration"],"mappings":"
|
|
1
|
+
{"version":3,"file":"sdk.js","sources":["../../../src/client/sdk.ts"],"sourcesContent":["import type { Client, Integration } from '@sentry/core';\nimport { applySdkMetadata } from '@sentry/core';\nimport type { BrowserOptions } from '@sentry/solid';\nimport { applyTunnelBasePath } from '../common/tunnel';\nimport {\n browserTracingIntegration,\n getDefaultIntegrations as getDefaultSolidIntegrations,\n init as initSolidSDK,\n} from '@sentry/solid';\n\n// Treeshakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean;\n\n/**\n * Initializes the client side of the Solid Start SDK.\n */\nexport function init(options: BrowserOptions): Client | undefined {\n const opts = {\n defaultIntegrations: getDefaultIntegrations(options),\n ...options,\n };\n\n applyTunnelBasePath(opts);\n applySdkMetadata(opts, 'solidstart', ['solidstart', 'solid']);\n\n return initSolidSDK(opts);\n}\n\nfunction getDefaultIntegrations(options: BrowserOptions): Integration[] {\n const integrations = getDefaultSolidIntegrations(options);\n\n // This evaluates to true unless __SENTRY_TRACING__ is text-replaced with \"false\",\n // in which case everything inside will get tree-shaken away\n if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {\n // We add the default BrowserTracingIntegration here always.\n // We can do this, even if `solidRouterBrowserTracingIntegration` is\n // supplied as integration in `init` by users because it will win\n // over the default integration by virtue of having the same\n // `BrowserTracing` integration name and being added later.\n integrations.push(browserTracingIntegration());\n }\n\n return integrations;\n}\n"],"names":["applyTunnelBasePath","applySdkMetadata","initSolidSDK","getDefaultSolidIntegrations","browserTracingIntegration"],"mappings":";;;;;;AAgBO,SAAS,KAAK,OAAA,EAA6C;AAChE,EAAA,MAAM,IAAA,GAAO;AAAA,IACX,mBAAA,EAAqB,uBAAuB,OAAO,CAAA;AAAA,IACnD,GAAG;AAAA,GACL;AAEA,EAAAA,0BAAA,CAAoB,IAAI,CAAA;AACxB,EAAAC,qBAAA,CAAiB,IAAA,EAAM,YAAA,EAAc,CAAC,YAAA,EAAc,OAAO,CAAC,CAAA;AAE5D,EAAA,OAAOC,WAAa,IAAI,CAAA;AAC1B;AAEA,SAAS,uBAAuB,OAAA,EAAwC;AACtE,EAAA,MAAM,YAAA,GAAeC,6BAA4B,OAAO,CAAA;AAIxD,EAAA,IAAI,OAAO,kBAAA,KAAuB,WAAA,IAAe,kBAAA,EAAoB;AAMnE,IAAA,YAAA,CAAa,IAAA,CAAKC,iCAA2B,CAAA;AAAA,EAC/C;AAEA,EAAA,OAAO,YAAA;AACT;;;;"}
|
|
@@ -11,7 +11,7 @@ Object.prototype.hasOwnProperty.call(solidrouter, '__proto__') &&
|
|
|
11
11
|
value: solidrouter['__proto__']
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
Object.keys(solidrouter).forEach(k
|
|
14
|
+
Object.keys(solidrouter).forEach(function (k) {
|
|
15
15
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = solidrouter[k];
|
|
16
16
|
});
|
|
17
17
|
//# sourceMappingURL=solidrouter.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const core = require('@sentry/core');
|
|
4
|
+
|
|
5
|
+
const TUNNEL_BASE_PATH_GLOBAL = "__sentry_solidstart_base_path";
|
|
6
|
+
function applyTunnelBasePath(options) {
|
|
7
|
+
const basePath = typeof __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__ !== "undefined" ? __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__ : "";
|
|
8
|
+
options.tunnel = core._INTERNAL_applyTunnelDefaults(options.tunnel, { basePath });
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
exports.TUNNEL_BASE_PATH_GLOBAL = TUNNEL_BASE_PATH_GLOBAL;
|
|
12
|
+
exports.applyTunnelBasePath = applyTunnelBasePath;
|
|
13
|
+
//# sourceMappingURL=tunnel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tunnel.js","sources":["../../../src/common/tunnel.ts"],"sourcesContent":["import type { Options } from '@sentry/core';\nimport { _INTERNAL_applyTunnelDefaults as applyTunnelDefaults } from '@sentry/core';\n\n/** Set on the server by `withSentry` to the app's `server.baseURL`. */\nexport const TUNNEL_BASE_PATH_GLOBAL = '__sentry_solidstart_base_path';\n\ndeclare const __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__: string | undefined;\n\n/**\n * Serves the browser's managed tunnel under the app's `server.baseURL`, which `withSentry` defines at build time.\n * A `basePath` the user set wins.\n */\nexport function applyTunnelBasePath(options: Pick<Options, 'tunnel'>): void {\n const basePath =\n typeof __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__ !== 'undefined' ? __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__ : '';\n options.tunnel = applyTunnelDefaults(options.tunnel, { basePath });\n}\n"],"names":["applyTunnelDefaults"],"mappings":";;;;AAIO,MAAM,uBAAA,GAA0B;AAQhC,SAAS,oBAAoB,OAAA,EAAwC;AAC1E,EAAA,MAAM,QAAA,GACJ,OAAO,sCAAA,KAA2C,WAAA,GAAc,sCAAA,GAAyC,EAAA;AAC3G,EAAA,OAAA,CAAQ,SAASA,kCAAA,CAAoB,OAAA,CAAQ,MAAA,EAAQ,EAAE,UAAU,CAAA;AACnE;;;;;"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
|
|
3
|
+
const node_url = require('node:url');
|
|
3
4
|
const core = require('@sentry/core');
|
|
4
5
|
const config = require('@sentry/server-utils/orchestrion/config');
|
|
5
6
|
const rollup = require('@sentry/server-utils/orchestrion/rollup');
|
|
7
|
+
const tunnel = require('../common/tunnel.js');
|
|
6
8
|
const sentrySolidStartVite = require('../vite/sentrySolidStartVite.js');
|
|
7
9
|
const addInstrumentation = require('./addInstrumentation.js');
|
|
8
10
|
|
|
11
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
9
12
|
const IORedisDependencies = ["standard-as-callback"];
|
|
10
13
|
const defaultSentrySolidStartPluginOptions = {
|
|
11
14
|
experimental_entrypointWrappedFunctions: ["default", "handler", "server"]
|
|
@@ -16,12 +19,24 @@ function withSentry(solidStartConfig = {}, sentrySolidStartPluginOptions) {
|
|
|
16
19
|
...defaultSentrySolidStartPluginOptions
|
|
17
20
|
};
|
|
18
21
|
const server = solidStartConfig.server || {};
|
|
22
|
+
const tunnelBasePath = core._INTERNAL_normalizeTunnelBasePath(
|
|
23
|
+
server.baseURL
|
|
24
|
+
);
|
|
25
|
+
if (tunnelBasePath) {
|
|
26
|
+
core.GLOBAL_OBJ[tunnel.TUNNEL_BASE_PATH_GLOBAL] = tunnelBasePath;
|
|
27
|
+
}
|
|
19
28
|
const viteConfig = solidStartConfig.vite;
|
|
20
|
-
const vite = typeof viteConfig === "function" ? (...args) => sentrySolidStartVite.addSentryPluginToVite(viteConfig(...args), sentryPluginOptions) : sentrySolidStartVite.addSentryPluginToVite(viteConfig, sentryPluginOptions);
|
|
29
|
+
const vite = typeof viteConfig === "function" ? (...args) => sentrySolidStartVite.addSentryPluginToVite(viteConfig(...args), sentryPluginOptions, tunnelBasePath) : sentrySolidStartVite.addSentryPluginToVite(viteConfig, sentryPluginOptions, tunnelBasePath);
|
|
21
30
|
const addBuildTimeInstrumentation = sentryPluginOptions.buildTimeInstrumentation !== false;
|
|
22
31
|
const sentryNitroModule = (nitro) => {
|
|
23
32
|
nitro.hooks.hook("rollup:before", async (nitro2, rollupConfig) => {
|
|
24
33
|
const sentryRollupConfig = rollupConfig;
|
|
34
|
+
if (tunnelBasePath) {
|
|
35
|
+
sentryRollupConfig.plugins.push({
|
|
36
|
+
name: "sentry-solidstart-tunnel-base-path",
|
|
37
|
+
banner: `globalThis.${tunnel.TUNNEL_BASE_PATH_GLOBAL} = ${JSON.stringify(tunnelBasePath)};`
|
|
38
|
+
});
|
|
39
|
+
}
|
|
25
40
|
if (addBuildTimeInstrumentation) {
|
|
26
41
|
sentryRollupConfig.plugins.push(
|
|
27
42
|
rollup.sentryOrchestrionPlugin({ buildTimeInstrumentation: sentryPluginOptions.buildTimeInstrumentation }),
|
|
@@ -63,10 +78,16 @@ function withSentry(solidStartConfig = {}, sentrySolidStartPluginOptions) {
|
|
|
63
78
|
...server,
|
|
64
79
|
externals,
|
|
65
80
|
commonJS,
|
|
66
|
-
modules: [...existingModules, sentryNitroModule]
|
|
81
|
+
modules: [...existingModules, sentryNitroModule],
|
|
82
|
+
// Through `server.plugins`, since vinxi's dev server ignores plugins that Nitro modules add.
|
|
83
|
+
plugins: [...server.plugins || [], getTunnelPluginPath()]
|
|
67
84
|
}
|
|
68
85
|
};
|
|
69
86
|
}
|
|
87
|
+
function getTunnelPluginPath() {
|
|
88
|
+
const url = new URL("../nitro/tunnelPlugin.js", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('config/withSentry.js', document.baseURI).href)));
|
|
89
|
+
return url.protocol === "file:" ? node_url.fileURLToPath(url) : url.pathname;
|
|
90
|
+
}
|
|
70
91
|
|
|
71
92
|
exports.withSentry = withSentry;
|
|
72
93
|
//# sourceMappingURL=withSentry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withSentry.js","sources":["../../../src/config/withSentry.ts"],"sourcesContent":["import { debug } from '@sentry/core';\nimport { INSTRUMENTED_MODULE_NAMES } from '@sentry/server-utils/orchestrion/config';\nimport {\n commonJSInteropOptions,\n sentryCommonJSInteropPlugin,\n sentryOrchestrionPlugin,\n} from '@sentry/server-utils/orchestrion/rollup';\nimport type { Nitro, NitroConfig } from 'nitropack';\nimport { addSentryPluginToVite } from '../vite/sentrySolidStartVite';\nimport type { SentrySolidStartPluginOptions } from '../vite/types';\nimport {\n addDynamicImportEntryFileWrapper,\n addInstrumentationFileToBuild,\n addSentryTopImport,\n} from './addInstrumentation';\nimport type { RollupConfig, SolidStartInlineConfig, SolidStartInlineServerConfig } from './types';\n\n// ioredis requires this CommonJS helper to be bundled with it. Leaving it\n// external makes Nitro resolve the default export as a namespace object.\nconst IORedisDependencies = ['standard-as-callback'];\n\nconst defaultSentrySolidStartPluginOptions: Omit<\n SentrySolidStartPluginOptions,\n 'experimental_entrypointWrappedFunctions'\n> &\n Required<Pick<SentrySolidStartPluginOptions, 'experimental_entrypointWrappedFunctions'>> = {\n experimental_entrypointWrappedFunctions: ['default', 'handler', 'server'],\n};\n\n/**\n * Modifies the passed in Solid Start configuration with build-time enhancements such as\n * building the `instrument.server.ts` file into the appropriate build folder based on\n * build preset.\n *\n * @param solidStartConfig A Solid Start configuration object, as usually passed to `defineConfig` in `app.config.ts|js`\n * @param sentrySolidStartPluginOptions Options to configure the plugin\n * @returns The modified config to be exported and passed back into `defineConfig`\n */\nexport function withSentry(\n solidStartConfig: SolidStartInlineConfig = {},\n sentrySolidStartPluginOptions: SentrySolidStartPluginOptions,\n): SolidStartInlineConfig {\n const sentryPluginOptions = {\n ...sentrySolidStartPluginOptions,\n ...defaultSentrySolidStartPluginOptions,\n };\n\n const server = (solidStartConfig.server || {}) as SolidStartInlineServerConfig;\n const viteConfig = solidStartConfig.vite;\n const vite =\n typeof viteConfig === 'function'\n ? (...args: Parameters<typeof viteConfig>)
|
|
1
|
+
{"version":3,"file":"withSentry.js","sources":["../../../src/config/withSentry.ts"],"sourcesContent":["import { fileURLToPath } from 'node:url';\nimport { debug, GLOBAL_OBJ, _INTERNAL_normalizeTunnelBasePath as normalizeTunnelBasePath } from '@sentry/core';\nimport { INSTRUMENTED_MODULE_NAMES } from '@sentry/server-utils/orchestrion/config';\nimport {\n commonJSInteropOptions,\n sentryCommonJSInteropPlugin,\n sentryOrchestrionPlugin,\n} from '@sentry/server-utils/orchestrion/rollup';\nimport type { Nitro, NitroConfig } from 'nitropack';\nimport { TUNNEL_BASE_PATH_GLOBAL } from '../common/tunnel';\nimport { addSentryPluginToVite } from '../vite/sentrySolidStartVite';\nimport type { SentrySolidStartPluginOptions } from '../vite/types';\nimport {\n addDynamicImportEntryFileWrapper,\n addInstrumentationFileToBuild,\n addSentryTopImport,\n} from './addInstrumentation';\nimport type { RollupConfig, SolidStartInlineConfig, SolidStartInlineServerConfig } from './types';\n\n// ioredis requires this CommonJS helper to be bundled with it. Leaving it\n// external makes Nitro resolve the default export as a namespace object.\nconst IORedisDependencies = ['standard-as-callback'];\n\nconst defaultSentrySolidStartPluginOptions: Omit<\n SentrySolidStartPluginOptions,\n 'experimental_entrypointWrappedFunctions'\n> &\n Required<Pick<SentrySolidStartPluginOptions, 'experimental_entrypointWrappedFunctions'>> = {\n experimental_entrypointWrappedFunctions: ['default', 'handler', 'server'],\n};\n\n/**\n * Modifies the passed in Solid Start configuration with build-time enhancements such as\n * building the `instrument.server.ts` file into the appropriate build folder based on\n * build preset.\n *\n * @param solidStartConfig A Solid Start configuration object, as usually passed to `defineConfig` in `app.config.ts|js`\n * @param sentrySolidStartPluginOptions Options to configure the plugin\n * @returns The modified config to be exported and passed back into `defineConfig`\n */\nexport function withSentry(\n solidStartConfig: SolidStartInlineConfig = {},\n sentrySolidStartPluginOptions: SentrySolidStartPluginOptions,\n): SolidStartInlineConfig {\n const sentryPluginOptions = {\n ...sentrySolidStartPluginOptions,\n ...defaultSentrySolidStartPluginOptions,\n };\n\n const server = (solidStartConfig.server || {}) as SolidStartInlineServerConfig;\n // Requests reach the tunnel with `server.baseURL` still in front, so both sides serve it under that.\n const tunnelBasePath = normalizeTunnelBasePath(\n (server as SolidStartInlineServerConfig & { baseURL?: string }).baseURL,\n );\n // vinxi's dev server runs Nitro in this process, so the tunnel plugin can read it from here in dev.\n if (tunnelBasePath) {\n (GLOBAL_OBJ as { [TUNNEL_BASE_PATH_GLOBAL]?: string })[TUNNEL_BASE_PATH_GLOBAL] = tunnelBasePath;\n }\n\n const viteConfig = solidStartConfig.vite;\n const vite =\n typeof viteConfig === 'function'\n ? (...args: Parameters<typeof viteConfig>) =>\n addSentryPluginToVite(viteConfig(...args), sentryPluginOptions, tunnelBasePath)\n : addSentryPluginToVite(viteConfig, sentryPluginOptions, tunnelBasePath);\n\n const addBuildTimeInstrumentation = sentryPluginOptions.buildTimeInstrumentation !== false;\n\n // Use a module so we don't override preset hooks.\n const sentryNitroModule = (nitro: Nitro) => {\n nitro.hooks.hook('rollup:before', async (nitro, rollupConfig) => {\n // Nitro types the `rollup:before` hook's `rollupConfig.plugins` as `string[]` (plugin paths),\n // but at runtime it holds resolved plugin objects we can push onto, so narrow to our own shape.\n const sentryRollupConfig = rollupConfig as unknown as RollupConfig;\n\n if (tunnelBasePath) {\n // The built server runs in another process, so the tunnel plugin reads the base path from the bundle.\n sentryRollupConfig.plugins.push({\n name: 'sentry-solidstart-tunnel-base-path',\n banner: `globalThis.${TUNNEL_BASE_PATH_GLOBAL} = ${JSON.stringify(tunnelBasePath)};`,\n });\n }\n\n if (addBuildTimeInstrumentation) {\n sentryRollupConfig.plugins.push(\n sentryOrchestrionPlugin({ buildTimeInstrumentation: sentryPluginOptions.buildTimeInstrumentation }),\n sentryCommonJSInteropPlugin(),\n );\n }\n\n if (sentrySolidStartPluginOptions?.autoInjectServerSentry === 'experimental_dynamic-import') {\n await addDynamicImportEntryFileWrapper({\n nitro,\n rollupConfig: sentryRollupConfig,\n sentryPluginOptions,\n });\n\n sentrySolidStartPluginOptions.debug &&\n debug.log(\n 'Wrapping the server entry file with a dynamic `import()`, so Sentry can be preloaded before the server initializes.',\n );\n } else {\n await addInstrumentationFileToBuild(nitro);\n\n if (sentrySolidStartPluginOptions?.autoInjectServerSentry === 'top-level-import') {\n await addSentryTopImport(nitro);\n }\n }\n });\n };\n\n const existingModules = (server as SolidStartInlineServerConfig & { modules?: unknown[] }).modules || [];\n\n // An externalized dependency never passes through the orchestrion code transform, so force-inline\n // the instrumented modules. This has to be set statically on the Nitro config (not in a hook)\n // because externalization is a resolution-time decision made before Rollup normalizes `external`.\n let externals = (server as SolidStartInlineServerConfig & { externals?: { inline?: string[] } }).externals;\n let commonJS = (server as SolidStartInlineServerConfig & { commonJS?: NitroConfig['commonJS'] }).commonJS;\n if (addBuildTimeInstrumentation) {\n const existingInline = externals?.inline || [];\n externals = {\n ...externals,\n inline: [...new Set([...existingInline, ...INSTRUMENTED_MODULE_NAMES, ...IORedisDependencies])],\n };\n\n // The inlined drivers `require()` CommonJS dependencies that stay external. Fix the interop\n // for those requires (see `commonJSInteropOptions`). User-provided options win.\n commonJS = { ...commonJSInteropOptions(), ...commonJS };\n }\n\n return {\n ...solidStartConfig,\n vite,\n server: {\n ...server,\n externals,\n commonJS,\n modules: [...existingModules, sentryNitroModule],\n // Through `server.plugins`, since vinxi's dev server ignores plugins that Nitro modules add.\n plugins: [...(server.plugins || []), getTunnelPluginPath()],\n },\n };\n}\n\nfunction getTunnelPluginPath(): string {\n const url = new URL('../nitro/tunnelPlugin.js', import.meta.url);\n\n // `import.meta.url` is a file URL in the built package, but not in every test environment.\n return url.protocol === 'file:' ? fileURLToPath(url) : url.pathname;\n}\n"],"names":["normalizeTunnelBasePath","GLOBAL_OBJ","TUNNEL_BASE_PATH_GLOBAL","addSentryPluginToVite","nitro","sentryOrchestrionPlugin","sentryCommonJSInteropPlugin","addDynamicImportEntryFileWrapper","debug","addInstrumentationFileToBuild","addSentryTopImport","INSTRUMENTED_MODULE_NAMES","commonJSInteropOptions","fileURLToPath"],"mappings":"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"}
|
|
@@ -13,7 +13,7 @@ Object.prototype.hasOwnProperty.call(solid, '__proto__') &&
|
|
|
13
13
|
value: solid['__proto__']
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
Object.keys(solid).forEach(k
|
|
16
|
+
Object.keys(solid).forEach(function (k) {
|
|
17
17
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = solid[k];
|
|
18
18
|
});
|
|
19
19
|
//# sourceMappingURL=index.client.js.map
|
|
@@ -61,7 +61,10 @@ exports.getRootSpan = node.getRootSpan;
|
|
|
61
61
|
exports.getSentryRelease = node.getSentryRelease;
|
|
62
62
|
exports.getSpanDescendants = node.getSpanDescendants;
|
|
63
63
|
exports.getSpanStatusFromHttpCode = node.getSpanStatusFromHttpCode;
|
|
64
|
+
exports.getTunnelPath = node.getTunnelPath;
|
|
64
65
|
exports.graphqlIntegration = node.graphqlIntegration;
|
|
66
|
+
exports.handleTunnelRequest = node.handleTunnelRequest;
|
|
67
|
+
exports.handleTunnelRequestIfMatched = node.handleTunnelRequestIfMatched;
|
|
65
68
|
exports.hapiIntegration = node.hapiIntegration;
|
|
66
69
|
exports.honoIntegration = node.honoIntegration;
|
|
67
70
|
exports.honoMiddleware = node.honoMiddleware;
|
|
@@ -72,6 +75,7 @@ exports.initOpenTelemetry = node.initOpenTelemetry;
|
|
|
72
75
|
exports.instrumentSupabaseClient = node.instrumentSupabaseClient;
|
|
73
76
|
exports.isEnabled = node.isEnabled;
|
|
74
77
|
exports.isInitialized = node.isInitialized;
|
|
78
|
+
exports.isTunnelRequest = node.isTunnelRequest;
|
|
75
79
|
exports.kafkaIntegration = node.kafkaIntegration;
|
|
76
80
|
exports.knexIntegration = node.knexIntegration;
|
|
77
81
|
exports.koaIntegration = node.koaIntegration;
|
|
@@ -98,6 +102,7 @@ exports.prismaIntegration = node.prismaIntegration;
|
|
|
98
102
|
exports.redisIntegration = node.redisIntegration;
|
|
99
103
|
exports.requestDataIntegration = node.requestDataIntegration;
|
|
100
104
|
exports.rewriteFramesIntegration = node.rewriteFramesIntegration;
|
|
105
|
+
exports.serveTunnelIntegration = node.serveTunnelIntegration;
|
|
101
106
|
exports.setAttribute = node.setAttribute;
|
|
102
107
|
exports.setAttributes = node.setAttributes;
|
|
103
108
|
exports.setContext = node.setContext;
|
|
@@ -147,7 +152,7 @@ Object.prototype.hasOwnProperty.call(node, '__proto__') &&
|
|
|
147
152
|
value: node['__proto__']
|
|
148
153
|
});
|
|
149
154
|
|
|
150
|
-
Object.keys(node).forEach(k
|
|
155
|
+
Object.keys(node).forEach(function (k) {
|
|
151
156
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = node[k];
|
|
152
157
|
});
|
|
153
158
|
//# sourceMappingURL=index.server.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const core = require('@sentry/core');
|
|
2
|
+
const server = require('@sentry/core/server');
|
|
3
|
+
const h3 = require('h3');
|
|
4
|
+
const tunnel = require('../common/tunnel.js');
|
|
5
|
+
|
|
6
|
+
const tunnelPlugin = ((nitroApp) => {
|
|
7
|
+
server._INTERNAL_setManagedTunnelDefaults({
|
|
8
|
+
basePath: core.GLOBAL_OBJ[tunnel.TUNNEL_BASE_PATH_GLOBAL]
|
|
9
|
+
});
|
|
10
|
+
nitroApp.h3App.stack.unshift({
|
|
11
|
+
route: "",
|
|
12
|
+
handler: h3.eventHandler((event) => {
|
|
13
|
+
if (!server._INTERNAL_isServedTunnelRequest({ method: event.method, url: event.path })) {
|
|
14
|
+
return void 0;
|
|
15
|
+
}
|
|
16
|
+
return server._INTERNAL_handleServedTunnelRequest(h3.toWebRequest(event));
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
module.exports = tunnelPlugin;
|
|
22
|
+
//# sourceMappingURL=tunnelPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tunnelPlugin.js","sources":["../../../src/nitro/tunnelPlugin.ts"],"sourcesContent":["import { GLOBAL_OBJ } from '@sentry/core';\nimport {\n _INTERNAL_handleServedTunnelRequest as handleServedTunnelRequest,\n _INTERNAL_isServedTunnelRequest as isServedTunnelRequest,\n _INTERNAL_setManagedTunnelDefaults as setManagedTunnelDefaults,\n} from '@sentry/core/server';\nimport { eventHandler, toWebRequest } from 'h3';\nimport type { NitroAppPlugin } from 'nitropack';\nimport { TUNNEL_BASE_PATH_GLOBAL } from '../common/tunnel';\n\n/**\n * Answers managed tunnel requests on SolidStart v1 (Nitro v2), from the first layer of the h3 app. That runs before\n * route rules, the app's middleware and routing. `withSentry` registers it.\n */\nexport default (nitroApp => {\n // The first layer sees the path before Nitro strips `server.baseURL`, so the tunnel is served under it. The server\n // bundle's banner sets the global before this plugin runs.\n setManagedTunnelDefaults({\n basePath: (GLOBAL_OBJ as { [TUNNEL_BASE_PATH_GLOBAL]?: string })[TUNNEL_BASE_PATH_GLOBAL],\n });\n\n // Not the `request` hook: h3 still runs the first layer after a hook answered, so route rules would act on the\n // sent response.\n nitroApp.h3App.stack.unshift({\n route: '',\n handler: eventHandler(event => {\n // Checked on the method and path first, so no other request's body gets wrapped in a web `Request`.\n if (!isServedTunnelRequest({ method: event.method, url: event.path })) {\n return undefined;\n }\n\n // `toWebRequest` also reads the body of the mock requests serverless presets pass through `localFetch`, which\n // aren't Node streams. A returned `Response` is sent and ends the request, `undefined` hands it on.\n return handleServedTunnelRequest(toWebRequest(event));\n }),\n });\n}) satisfies NitroAppPlugin;\n"],"names":["setManagedTunnelDefaults","GLOBAL_OBJ","TUNNEL_BASE_PATH_GLOBAL","eventHandler","isServedTunnelRequest","handleServedTunnelRequest","toWebRequest"],"mappings":";;;;;AAcA,qBAAA,CAAgB,CAAA,QAAA,KAAY;AAG1B,EAAAA,yCAAA,CAAyB;AAAA,IACvB,QAAA,EAAWC,gBAAsDC,8BAAuB;AAAA,GACzF,CAAA;AAID,EAAA,QAAA,CAAS,KAAA,CAAM,MAAM,OAAA,CAAQ;AAAA,IAC3B,KAAA,EAAO,EAAA;AAAA,IACP,OAAA,EAASC,gBAAa,CAAA,KAAA,KAAS;AAE7B,MAAA,IAAI,CAACC,sCAAA,CAAsB,EAAE,MAAA,EAAQ,KAAA,CAAM,QAAQ,GAAA,EAAK,KAAA,CAAM,IAAA,EAAM,CAAA,EAAG;AACrE,QAAA,OAAO,MAAA;AAAA,MACT;AAIA,MAAA,OAAOC,0CAAA,CAA0BC,eAAA,CAAa,KAAK,CAAC,CAAA;AAAA,IACtD,CAAC;AAAA,GACF,CAAA;AACH,CAAA;;;;"}
|
|
@@ -60,7 +60,10 @@ exports.getRootSpan = node.getRootSpan;
|
|
|
60
60
|
exports.getSentryRelease = node.getSentryRelease;
|
|
61
61
|
exports.getSpanDescendants = node.getSpanDescendants;
|
|
62
62
|
exports.getSpanStatusFromHttpCode = node.getSpanStatusFromHttpCode;
|
|
63
|
+
exports.getTunnelPath = node.getTunnelPath;
|
|
63
64
|
exports.graphqlIntegration = node.graphqlIntegration;
|
|
65
|
+
exports.handleTunnelRequest = node.handleTunnelRequest;
|
|
66
|
+
exports.handleTunnelRequestIfMatched = node.handleTunnelRequestIfMatched;
|
|
64
67
|
exports.hapiIntegration = node.hapiIntegration;
|
|
65
68
|
exports.honoIntegration = node.honoIntegration;
|
|
66
69
|
exports.honoMiddleware = node.honoMiddleware;
|
|
@@ -71,6 +74,7 @@ exports.initOpenTelemetry = node.initOpenTelemetry;
|
|
|
71
74
|
exports.instrumentSupabaseClient = node.instrumentSupabaseClient;
|
|
72
75
|
exports.isEnabled = node.isEnabled;
|
|
73
76
|
exports.isInitialized = node.isInitialized;
|
|
77
|
+
exports.isTunnelRequest = node.isTunnelRequest;
|
|
74
78
|
exports.kafkaIntegration = node.kafkaIntegration;
|
|
75
79
|
exports.knexIntegration = node.knexIntegration;
|
|
76
80
|
exports.koaIntegration = node.koaIntegration;
|
|
@@ -97,6 +101,7 @@ exports.prismaIntegration = node.prismaIntegration;
|
|
|
97
101
|
exports.redisIntegration = node.redisIntegration;
|
|
98
102
|
exports.requestDataIntegration = node.requestDataIntegration;
|
|
99
103
|
exports.rewriteFramesIntegration = node.rewriteFramesIntegration;
|
|
104
|
+
exports.serveTunnelIntegration = node.serveTunnelIntegration;
|
|
100
105
|
exports.setAttribute = node.setAttribute;
|
|
101
106
|
exports.setAttributes = node.setAttributes;
|
|
102
107
|
exports.setContext = node.setContext;
|
|
@@ -145,7 +150,7 @@ Object.prototype.hasOwnProperty.call(node, '__proto__') &&
|
|
|
145
150
|
value: node['__proto__']
|
|
146
151
|
});
|
|
147
152
|
|
|
148
|
-
Object.keys(node).forEach(k
|
|
153
|
+
Object.keys(node).forEach(function (k) {
|
|
149
154
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = node[k];
|
|
150
155
|
});
|
|
151
156
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -11,7 +11,7 @@ Object.prototype.hasOwnProperty.call(solidrouter, '__proto__') &&
|
|
|
11
11
|
value: solidrouter['__proto__']
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
Object.keys(solidrouter).forEach(k
|
|
14
|
+
Object.keys(solidrouter).forEach(function (k) {
|
|
15
15
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = solidrouter[k];
|
|
16
16
|
});
|
|
17
17
|
//# sourceMappingURL=solidrouter.client.js.map
|
package/build/cjs/solidrouter.js
CHANGED
|
@@ -13,7 +13,7 @@ Object.prototype.hasOwnProperty.call(solidrouter, '__proto__') &&
|
|
|
13
13
|
value: solidrouter['__proto__']
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
Object.keys(solidrouter).forEach(k
|
|
16
|
+
Object.keys(solidrouter).forEach(function (k) {
|
|
17
17
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = solidrouter[k];
|
|
18
18
|
});
|
|
19
19
|
//# sourceMappingURL=solidrouter.js.map
|
|
@@ -4,9 +4,17 @@ const core = require('@sentry/core');
|
|
|
4
4
|
const buildInstrumentationFile = require('./buildInstrumentationFile.js');
|
|
5
5
|
const sourceMaps = require('./sourceMaps.js');
|
|
6
6
|
|
|
7
|
-
const sentrySolidStartVite = (options = {}, viteConfig) => {
|
|
7
|
+
const sentrySolidStartVite = (options = {}, viteConfig, tunnelBasePath = "") => {
|
|
8
8
|
core.warnOnRemovedBuildOptions(options, ["unstable_sentryVitePluginOptions"]);
|
|
9
|
-
const sentryPlugins = [
|
|
9
|
+
const sentryPlugins = [
|
|
10
|
+
{
|
|
11
|
+
name: "sentry-solidstart-tunnel-base-path",
|
|
12
|
+
// Serves the browser's managed tunnel under `server.baseURL`, like every other route of the app.
|
|
13
|
+
config: () => ({
|
|
14
|
+
define: { __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__: JSON.stringify(tunnelBasePath) }
|
|
15
|
+
})
|
|
16
|
+
}
|
|
17
|
+
];
|
|
10
18
|
if (options.autoInjectServerSentry !== "experimental_dynamic-import") {
|
|
11
19
|
sentryPlugins.push(buildInstrumentationFile.makeBuildInstrumentationFilePlugin(options));
|
|
12
20
|
}
|
|
@@ -19,9 +27,9 @@ const sentrySolidStartVite = (options = {}, viteConfig) => {
|
|
|
19
27
|
}
|
|
20
28
|
return sentryPlugins;
|
|
21
29
|
};
|
|
22
|
-
const addSentryPluginToVite = (config = {}, options) => {
|
|
30
|
+
const addSentryPluginToVite = (config = {}, options, tunnelBasePath) => {
|
|
23
31
|
const plugins = Array.isArray(config.plugins) ? [...config.plugins] : [];
|
|
24
|
-
plugins.unshift(sentrySolidStartVite(options, config));
|
|
32
|
+
plugins.unshift(sentrySolidStartVite(options, config, tunnelBasePath));
|
|
25
33
|
return {
|
|
26
34
|
...config,
|
|
27
35
|
plugins
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentrySolidStartVite.js","sources":["../../../src/vite/sentrySolidStartVite.ts"],"sourcesContent":["import { warnOnRemovedBuildOptions } from '@sentry/core';\nimport type { Plugin, UserConfig } from 'vite';\nimport { makeBuildInstrumentationFilePlugin } from './buildInstrumentationFile';\nimport { makeAddSentryVitePlugin, makeEnableSourceMapsVitePlugin } from './sourceMaps';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n/**\n * Various Sentry vite plugins to be used for SolidStart.\n */\nexport const sentrySolidStartVite = (options: SentrySolidStartPluginOptions = {}
|
|
1
|
+
{"version":3,"file":"sentrySolidStartVite.js","sources":["../../../src/vite/sentrySolidStartVite.ts"],"sourcesContent":["import { warnOnRemovedBuildOptions } from '@sentry/core';\nimport type { Plugin, UserConfig } from 'vite';\nimport { makeBuildInstrumentationFilePlugin } from './buildInstrumentationFile';\nimport { makeAddSentryVitePlugin, makeEnableSourceMapsVitePlugin } from './sourceMaps';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n/**\n * Various Sentry vite plugins to be used for SolidStart.\n */\nexport const sentrySolidStartVite = (\n options: SentrySolidStartPluginOptions = {},\n viteConfig: UserConfig,\n tunnelBasePath = '',\n): Plugin[] => {\n warnOnRemovedBuildOptions(options, ['unstable_sentryVitePluginOptions']);\n\n const sentryPlugins: Plugin[] = [\n {\n name: 'sentry-solidstart-tunnel-base-path',\n // Serves the browser's managed tunnel under `server.baseURL`, like every other route of the app.\n config: () => ({\n define: { __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__: JSON.stringify(tunnelBasePath) },\n }),\n },\n ];\n\n if (options.autoInjectServerSentry !== 'experimental_dynamic-import') {\n sentryPlugins.push(makeBuildInstrumentationFilePlugin(options));\n }\n\n if (process.env.NODE_ENV !== 'development') {\n if (options.sourcemaps?.disable !== true) {\n const sourceMapsPlugin = makeAddSentryVitePlugin(options, viteConfig);\n const enableSourceMapsPlugin = makeEnableSourceMapsVitePlugin(options);\n\n sentryPlugins.push(...sourceMapsPlugin, ...enableSourceMapsPlugin);\n }\n }\n\n return sentryPlugins;\n};\n\n/**\n * Helper to add the Sentry SolidStart vite plugin to a vite config.\n */\nexport const addSentryPluginToVite = (\n config: UserConfig = {},\n options: SentrySolidStartPluginOptions,\n tunnelBasePath?: string,\n): UserConfig => {\n const plugins = Array.isArray(config.plugins) ? [...config.plugins] : [];\n plugins.unshift(sentrySolidStartVite(options, config, tunnelBasePath));\n\n return {\n ...config,\n plugins,\n };\n};\n"],"names":["warnOnRemovedBuildOptions","makeBuildInstrumentationFilePlugin","makeAddSentryVitePlugin","makeEnableSourceMapsVitePlugin"],"mappings":";;;;;;AASO,MAAM,uBAAuB,CAClC,OAAA,GAAyC,EAAC,EAC1C,UAAA,EACA,iBAAiB,EAAA,KACJ;AACb,EAAAA,8BAAA,CAA0B,OAAA,EAAS,CAAC,kCAAkC,CAAC,CAAA;AAEvE,EAAA,MAAM,aAAA,GAA0B;AAAA,IAC9B;AAAA,MACE,IAAA,EAAM,oCAAA;AAAA;AAAA,MAEN,QAAQ,OAAO;AAAA,QACb,QAAQ,EAAE,sCAAA,EAAwC,IAAA,CAAK,SAAA,CAAU,cAAc,CAAA;AAAE,OACnF;AAAA;AACF,GACF;AAEA,EAAA,IAAI,OAAA,CAAQ,2BAA2B,6BAAA,EAA+B;AACpE,IAAA,aAAA,CAAc,IAAA,CAAKC,2DAAA,CAAmC,OAAO,CAAC,CAAA;AAAA,EAChE;AAEA,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,aAAA,EAAe;AAC1C,IAAA,IAAI,OAAA,CAAQ,UAAA,EAAY,OAAA,KAAY,IAAA,EAAM;AACxC,MAAA,MAAM,gBAAA,GAAmBC,kCAAA,CAAwB,OAAA,EAAS,UAAU,CAAA;AACpE,MAAA,MAAM,sBAAA,GAAyBC,0CAA+B,OAAO,CAAA;AAErE,MAAA,aAAA,CAAc,IAAA,CAAK,GAAG,gBAAA,EAAkB,GAAG,sBAAsB,CAAA;AAAA,IACnE;AAAA,EACF;AAEA,EAAA,OAAO,aAAA;AACT;AAKO,MAAM,wBAAwB,CACnC,MAAA,GAAqB,EAAC,EACtB,SACA,cAAA,KACe;AACf,EAAA,MAAM,OAAA,GAAU,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAA,GAAI,CAAC,GAAG,MAAA,CAAO,OAAO,CAAA,GAAI,EAAC;AACvE,EAAA,OAAA,CAAQ,OAAA,CAAQ,oBAAA,CAAqB,OAAA,EAAS,MAAA,EAAQ,cAAc,CAAC,CAAA;AAErE,EAAA,OAAO;AAAA,IACL,GAAG,MAAA;AAAA,IACH;AAAA,GACF;AACF;;;;;"}
|
package/build/esm/client/sdk.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { applySdkMetadata } from '@sentry/core';
|
|
2
|
+
import { applyTunnelBasePath } from '../common/tunnel.js';
|
|
2
3
|
import { init as init$1, getDefaultIntegrations as getDefaultIntegrations$1, browserTracingIntegration } from '@sentry/solid';
|
|
3
4
|
|
|
4
5
|
function init(options) {
|
|
@@ -6,6 +7,7 @@ function init(options) {
|
|
|
6
7
|
defaultIntegrations: getDefaultIntegrations(options),
|
|
7
8
|
...options
|
|
8
9
|
};
|
|
10
|
+
applyTunnelBasePath(opts);
|
|
9
11
|
applySdkMetadata(opts, "solidstart", ["solidstart", "solid"]);
|
|
10
12
|
return init$1(opts);
|
|
11
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sources":["../../../src/client/sdk.ts"],"sourcesContent":["import type { Client, Integration } from '@sentry/core';\nimport { applySdkMetadata } from '@sentry/core';\nimport type { BrowserOptions } from '@sentry/solid';\nimport {\n browserTracingIntegration,\n getDefaultIntegrations as getDefaultSolidIntegrations,\n init as initSolidSDK,\n} from '@sentry/solid';\n\n// Treeshakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean;\n\n/**\n * Initializes the client side of the Solid Start SDK.\n */\nexport function init(options: BrowserOptions): Client | undefined {\n const opts = {\n defaultIntegrations: getDefaultIntegrations(options),\n ...options,\n };\n\n applySdkMetadata(opts, 'solidstart', ['solidstart', 'solid']);\n\n return initSolidSDK(opts);\n}\n\nfunction getDefaultIntegrations(options: BrowserOptions): Integration[] {\n const integrations = getDefaultSolidIntegrations(options);\n\n // This evaluates to true unless __SENTRY_TRACING__ is text-replaced with \"false\",\n // in which case everything inside will get tree-shaken away\n if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {\n // We add the default BrowserTracingIntegration here always.\n // We can do this, even if `solidRouterBrowserTracingIntegration` is\n // supplied as integration in `init` by users because it will win\n // over the default integration by virtue of having the same\n // `BrowserTracing` integration name and being added later.\n integrations.push(browserTracingIntegration());\n }\n\n return integrations;\n}\n"],"names":["initSolidSDK","getDefaultSolidIntegrations"],"mappings":"
|
|
1
|
+
{"version":3,"file":"sdk.js","sources":["../../../src/client/sdk.ts"],"sourcesContent":["import type { Client, Integration } from '@sentry/core';\nimport { applySdkMetadata } from '@sentry/core';\nimport type { BrowserOptions } from '@sentry/solid';\nimport { applyTunnelBasePath } from '../common/tunnel';\nimport {\n browserTracingIntegration,\n getDefaultIntegrations as getDefaultSolidIntegrations,\n init as initSolidSDK,\n} from '@sentry/solid';\n\n// Treeshakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean;\n\n/**\n * Initializes the client side of the Solid Start SDK.\n */\nexport function init(options: BrowserOptions): Client | undefined {\n const opts = {\n defaultIntegrations: getDefaultIntegrations(options),\n ...options,\n };\n\n applyTunnelBasePath(opts);\n applySdkMetadata(opts, 'solidstart', ['solidstart', 'solid']);\n\n return initSolidSDK(opts);\n}\n\nfunction getDefaultIntegrations(options: BrowserOptions): Integration[] {\n const integrations = getDefaultSolidIntegrations(options);\n\n // This evaluates to true unless __SENTRY_TRACING__ is text-replaced with \"false\",\n // in which case everything inside will get tree-shaken away\n if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {\n // We add the default BrowserTracingIntegration here always.\n // We can do this, even if `solidRouterBrowserTracingIntegration` is\n // supplied as integration in `init` by users because it will win\n // over the default integration by virtue of having the same\n // `BrowserTracing` integration name and being added later.\n integrations.push(browserTracingIntegration());\n }\n\n return integrations;\n}\n"],"names":["initSolidSDK","getDefaultSolidIntegrations"],"mappings":";;;;AAgBO,SAAS,KAAK,OAAA,EAA6C;AAChE,EAAA,MAAM,IAAA,GAAO;AAAA,IACX,mBAAA,EAAqB,uBAAuB,OAAO,CAAA;AAAA,IACnD,GAAG;AAAA,GACL;AAEA,EAAA,mBAAA,CAAoB,IAAI,CAAA;AACxB,EAAA,gBAAA,CAAiB,IAAA,EAAM,YAAA,EAAc,CAAC,YAAA,EAAc,OAAO,CAAC,CAAA;AAE5D,EAAA,OAAOA,OAAa,IAAI,CAAA;AAC1B;AAEA,SAAS,uBAAuB,OAAA,EAAwC;AACtE,EAAA,MAAM,YAAA,GAAeC,yBAA4B,OAAO,CAAA;AAIxD,EAAA,IAAI,OAAO,kBAAA,KAAuB,WAAA,IAAe,kBAAA,EAAoB;AAMnE,IAAA,YAAA,CAAa,IAAA,CAAK,2BAA2B,CAAA;AAAA,EAC/C;AAEA,EAAA,OAAO,YAAA;AACT;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { _INTERNAL_applyTunnelDefaults } from '@sentry/core';
|
|
2
|
+
|
|
3
|
+
const TUNNEL_BASE_PATH_GLOBAL = "__sentry_solidstart_base_path";
|
|
4
|
+
function applyTunnelBasePath(options) {
|
|
5
|
+
const basePath = typeof __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__ !== "undefined" ? __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__ : "";
|
|
6
|
+
options.tunnel = _INTERNAL_applyTunnelDefaults(options.tunnel, { basePath });
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { TUNNEL_BASE_PATH_GLOBAL, applyTunnelBasePath };
|
|
10
|
+
//# sourceMappingURL=tunnel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tunnel.js","sources":["../../../src/common/tunnel.ts"],"sourcesContent":["import type { Options } from '@sentry/core';\nimport { _INTERNAL_applyTunnelDefaults as applyTunnelDefaults } from '@sentry/core';\n\n/** Set on the server by `withSentry` to the app's `server.baseURL`. */\nexport const TUNNEL_BASE_PATH_GLOBAL = '__sentry_solidstart_base_path';\n\ndeclare const __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__: string | undefined;\n\n/**\n * Serves the browser's managed tunnel under the app's `server.baseURL`, which `withSentry` defines at build time.\n * A `basePath` the user set wins.\n */\nexport function applyTunnelBasePath(options: Pick<Options, 'tunnel'>): void {\n const basePath =\n typeof __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__ !== 'undefined' ? __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__ : '';\n options.tunnel = applyTunnelDefaults(options.tunnel, { basePath });\n}\n"],"names":["applyTunnelDefaults"],"mappings":";;AAIO,MAAM,uBAAA,GAA0B;AAQhC,SAAS,oBAAoB,OAAA,EAAwC;AAC1E,EAAA,MAAM,QAAA,GACJ,OAAO,sCAAA,KAA2C,WAAA,GAAc,sCAAA,GAAyC,EAAA;AAC3G,EAAA,OAAA,CAAQ,SAASA,6BAAA,CAAoB,OAAA,CAAQ,MAAA,EAAQ,EAAE,UAAU,CAAA;AACnE;;;;"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { fileURLToPath } from 'node:url';
|
|
2
|
+
import { _INTERNAL_normalizeTunnelBasePath, GLOBAL_OBJ, debug } from '@sentry/core';
|
|
2
3
|
import { INSTRUMENTED_MODULE_NAMES } from '@sentry/server-utils/orchestrion/config';
|
|
3
4
|
import { commonJSInteropOptions, sentryOrchestrionPlugin, sentryCommonJSInteropPlugin } from '@sentry/server-utils/orchestrion/rollup';
|
|
5
|
+
import { TUNNEL_BASE_PATH_GLOBAL } from '../common/tunnel.js';
|
|
4
6
|
import { addSentryPluginToVite } from '../vite/sentrySolidStartVite.js';
|
|
5
7
|
import { addDynamicImportEntryFileWrapper, addInstrumentationFileToBuild, addSentryTopImport } from './addInstrumentation.js';
|
|
6
8
|
|
|
@@ -14,12 +16,24 @@ function withSentry(solidStartConfig = {}, sentrySolidStartPluginOptions) {
|
|
|
14
16
|
...defaultSentrySolidStartPluginOptions
|
|
15
17
|
};
|
|
16
18
|
const server = solidStartConfig.server || {};
|
|
19
|
+
const tunnelBasePath = _INTERNAL_normalizeTunnelBasePath(
|
|
20
|
+
server.baseURL
|
|
21
|
+
);
|
|
22
|
+
if (tunnelBasePath) {
|
|
23
|
+
GLOBAL_OBJ[TUNNEL_BASE_PATH_GLOBAL] = tunnelBasePath;
|
|
24
|
+
}
|
|
17
25
|
const viteConfig = solidStartConfig.vite;
|
|
18
|
-
const vite = typeof viteConfig === "function" ? (...args) => addSentryPluginToVite(viteConfig(...args), sentryPluginOptions) : addSentryPluginToVite(viteConfig, sentryPluginOptions);
|
|
26
|
+
const vite = typeof viteConfig === "function" ? (...args) => addSentryPluginToVite(viteConfig(...args), sentryPluginOptions, tunnelBasePath) : addSentryPluginToVite(viteConfig, sentryPluginOptions, tunnelBasePath);
|
|
19
27
|
const addBuildTimeInstrumentation = sentryPluginOptions.buildTimeInstrumentation !== false;
|
|
20
28
|
const sentryNitroModule = (nitro) => {
|
|
21
29
|
nitro.hooks.hook("rollup:before", async (nitro2, rollupConfig) => {
|
|
22
30
|
const sentryRollupConfig = rollupConfig;
|
|
31
|
+
if (tunnelBasePath) {
|
|
32
|
+
sentryRollupConfig.plugins.push({
|
|
33
|
+
name: "sentry-solidstart-tunnel-base-path",
|
|
34
|
+
banner: `globalThis.${TUNNEL_BASE_PATH_GLOBAL} = ${JSON.stringify(tunnelBasePath)};`
|
|
35
|
+
});
|
|
36
|
+
}
|
|
23
37
|
if (addBuildTimeInstrumentation) {
|
|
24
38
|
sentryRollupConfig.plugins.push(
|
|
25
39
|
sentryOrchestrionPlugin({ buildTimeInstrumentation: sentryPluginOptions.buildTimeInstrumentation }),
|
|
@@ -61,10 +75,16 @@ function withSentry(solidStartConfig = {}, sentrySolidStartPluginOptions) {
|
|
|
61
75
|
...server,
|
|
62
76
|
externals,
|
|
63
77
|
commonJS,
|
|
64
|
-
modules: [...existingModules, sentryNitroModule]
|
|
78
|
+
modules: [...existingModules, sentryNitroModule],
|
|
79
|
+
// Through `server.plugins`, since vinxi's dev server ignores plugins that Nitro modules add.
|
|
80
|
+
plugins: [...server.plugins || [], getTunnelPluginPath()]
|
|
65
81
|
}
|
|
66
82
|
};
|
|
67
83
|
}
|
|
84
|
+
function getTunnelPluginPath() {
|
|
85
|
+
const url = new URL("../nitro/tunnelPlugin.js", import.meta.url);
|
|
86
|
+
return url.protocol === "file:" ? fileURLToPath(url) : url.pathname;
|
|
87
|
+
}
|
|
68
88
|
|
|
69
89
|
export { withSentry };
|
|
70
90
|
//# sourceMappingURL=withSentry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withSentry.js","sources":["../../../src/config/withSentry.ts"],"sourcesContent":["import { debug } from '@sentry/core';\nimport { INSTRUMENTED_MODULE_NAMES } from '@sentry/server-utils/orchestrion/config';\nimport {\n commonJSInteropOptions,\n sentryCommonJSInteropPlugin,\n sentryOrchestrionPlugin,\n} from '@sentry/server-utils/orchestrion/rollup';\nimport type { Nitro, NitroConfig } from 'nitropack';\nimport { addSentryPluginToVite } from '../vite/sentrySolidStartVite';\nimport type { SentrySolidStartPluginOptions } from '../vite/types';\nimport {\n addDynamicImportEntryFileWrapper,\n addInstrumentationFileToBuild,\n addSentryTopImport,\n} from './addInstrumentation';\nimport type { RollupConfig, SolidStartInlineConfig, SolidStartInlineServerConfig } from './types';\n\n// ioredis requires this CommonJS helper to be bundled with it. Leaving it\n// external makes Nitro resolve the default export as a namespace object.\nconst IORedisDependencies = ['standard-as-callback'];\n\nconst defaultSentrySolidStartPluginOptions: Omit<\n SentrySolidStartPluginOptions,\n 'experimental_entrypointWrappedFunctions'\n> &\n Required<Pick<SentrySolidStartPluginOptions, 'experimental_entrypointWrappedFunctions'>> = {\n experimental_entrypointWrappedFunctions: ['default', 'handler', 'server'],\n};\n\n/**\n * Modifies the passed in Solid Start configuration with build-time enhancements such as\n * building the `instrument.server.ts` file into the appropriate build folder based on\n * build preset.\n *\n * @param solidStartConfig A Solid Start configuration object, as usually passed to `defineConfig` in `app.config.ts|js`\n * @param sentrySolidStartPluginOptions Options to configure the plugin\n * @returns The modified config to be exported and passed back into `defineConfig`\n */\nexport function withSentry(\n solidStartConfig: SolidStartInlineConfig = {},\n sentrySolidStartPluginOptions: SentrySolidStartPluginOptions,\n): SolidStartInlineConfig {\n const sentryPluginOptions = {\n ...sentrySolidStartPluginOptions,\n ...defaultSentrySolidStartPluginOptions,\n };\n\n const server = (solidStartConfig.server || {}) as SolidStartInlineServerConfig;\n const viteConfig = solidStartConfig.vite;\n const vite =\n typeof viteConfig === 'function'\n ? (...args: Parameters<typeof viteConfig>)
|
|
1
|
+
{"version":3,"file":"withSentry.js","sources":["../../../src/config/withSentry.ts"],"sourcesContent":["import { fileURLToPath } from 'node:url';\nimport { debug, GLOBAL_OBJ, _INTERNAL_normalizeTunnelBasePath as normalizeTunnelBasePath } from '@sentry/core';\nimport { INSTRUMENTED_MODULE_NAMES } from '@sentry/server-utils/orchestrion/config';\nimport {\n commonJSInteropOptions,\n sentryCommonJSInteropPlugin,\n sentryOrchestrionPlugin,\n} from '@sentry/server-utils/orchestrion/rollup';\nimport type { Nitro, NitroConfig } from 'nitropack';\nimport { TUNNEL_BASE_PATH_GLOBAL } from '../common/tunnel';\nimport { addSentryPluginToVite } from '../vite/sentrySolidStartVite';\nimport type { SentrySolidStartPluginOptions } from '../vite/types';\nimport {\n addDynamicImportEntryFileWrapper,\n addInstrumentationFileToBuild,\n addSentryTopImport,\n} from './addInstrumentation';\nimport type { RollupConfig, SolidStartInlineConfig, SolidStartInlineServerConfig } from './types';\n\n// ioredis requires this CommonJS helper to be bundled with it. Leaving it\n// external makes Nitro resolve the default export as a namespace object.\nconst IORedisDependencies = ['standard-as-callback'];\n\nconst defaultSentrySolidStartPluginOptions: Omit<\n SentrySolidStartPluginOptions,\n 'experimental_entrypointWrappedFunctions'\n> &\n Required<Pick<SentrySolidStartPluginOptions, 'experimental_entrypointWrappedFunctions'>> = {\n experimental_entrypointWrappedFunctions: ['default', 'handler', 'server'],\n};\n\n/**\n * Modifies the passed in Solid Start configuration with build-time enhancements such as\n * building the `instrument.server.ts` file into the appropriate build folder based on\n * build preset.\n *\n * @param solidStartConfig A Solid Start configuration object, as usually passed to `defineConfig` in `app.config.ts|js`\n * @param sentrySolidStartPluginOptions Options to configure the plugin\n * @returns The modified config to be exported and passed back into `defineConfig`\n */\nexport function withSentry(\n solidStartConfig: SolidStartInlineConfig = {},\n sentrySolidStartPluginOptions: SentrySolidStartPluginOptions,\n): SolidStartInlineConfig {\n const sentryPluginOptions = {\n ...sentrySolidStartPluginOptions,\n ...defaultSentrySolidStartPluginOptions,\n };\n\n const server = (solidStartConfig.server || {}) as SolidStartInlineServerConfig;\n // Requests reach the tunnel with `server.baseURL` still in front, so both sides serve it under that.\n const tunnelBasePath = normalizeTunnelBasePath(\n (server as SolidStartInlineServerConfig & { baseURL?: string }).baseURL,\n );\n // vinxi's dev server runs Nitro in this process, so the tunnel plugin can read it from here in dev.\n if (tunnelBasePath) {\n (GLOBAL_OBJ as { [TUNNEL_BASE_PATH_GLOBAL]?: string })[TUNNEL_BASE_PATH_GLOBAL] = tunnelBasePath;\n }\n\n const viteConfig = solidStartConfig.vite;\n const vite =\n typeof viteConfig === 'function'\n ? (...args: Parameters<typeof viteConfig>) =>\n addSentryPluginToVite(viteConfig(...args), sentryPluginOptions, tunnelBasePath)\n : addSentryPluginToVite(viteConfig, sentryPluginOptions, tunnelBasePath);\n\n const addBuildTimeInstrumentation = sentryPluginOptions.buildTimeInstrumentation !== false;\n\n // Use a module so we don't override preset hooks.\n const sentryNitroModule = (nitro: Nitro) => {\n nitro.hooks.hook('rollup:before', async (nitro, rollupConfig) => {\n // Nitro types the `rollup:before` hook's `rollupConfig.plugins` as `string[]` (plugin paths),\n // but at runtime it holds resolved plugin objects we can push onto, so narrow to our own shape.\n const sentryRollupConfig = rollupConfig as unknown as RollupConfig;\n\n if (tunnelBasePath) {\n // The built server runs in another process, so the tunnel plugin reads the base path from the bundle.\n sentryRollupConfig.plugins.push({\n name: 'sentry-solidstart-tunnel-base-path',\n banner: `globalThis.${TUNNEL_BASE_PATH_GLOBAL} = ${JSON.stringify(tunnelBasePath)};`,\n });\n }\n\n if (addBuildTimeInstrumentation) {\n sentryRollupConfig.plugins.push(\n sentryOrchestrionPlugin({ buildTimeInstrumentation: sentryPluginOptions.buildTimeInstrumentation }),\n sentryCommonJSInteropPlugin(),\n );\n }\n\n if (sentrySolidStartPluginOptions?.autoInjectServerSentry === 'experimental_dynamic-import') {\n await addDynamicImportEntryFileWrapper({\n nitro,\n rollupConfig: sentryRollupConfig,\n sentryPluginOptions,\n });\n\n sentrySolidStartPluginOptions.debug &&\n debug.log(\n 'Wrapping the server entry file with a dynamic `import()`, so Sentry can be preloaded before the server initializes.',\n );\n } else {\n await addInstrumentationFileToBuild(nitro);\n\n if (sentrySolidStartPluginOptions?.autoInjectServerSentry === 'top-level-import') {\n await addSentryTopImport(nitro);\n }\n }\n });\n };\n\n const existingModules = (server as SolidStartInlineServerConfig & { modules?: unknown[] }).modules || [];\n\n // An externalized dependency never passes through the orchestrion code transform, so force-inline\n // the instrumented modules. This has to be set statically on the Nitro config (not in a hook)\n // because externalization is a resolution-time decision made before Rollup normalizes `external`.\n let externals = (server as SolidStartInlineServerConfig & { externals?: { inline?: string[] } }).externals;\n let commonJS = (server as SolidStartInlineServerConfig & { commonJS?: NitroConfig['commonJS'] }).commonJS;\n if (addBuildTimeInstrumentation) {\n const existingInline = externals?.inline || [];\n externals = {\n ...externals,\n inline: [...new Set([...existingInline, ...INSTRUMENTED_MODULE_NAMES, ...IORedisDependencies])],\n };\n\n // The inlined drivers `require()` CommonJS dependencies that stay external. Fix the interop\n // for those requires (see `commonJSInteropOptions`). User-provided options win.\n commonJS = { ...commonJSInteropOptions(), ...commonJS };\n }\n\n return {\n ...solidStartConfig,\n vite,\n server: {\n ...server,\n externals,\n commonJS,\n modules: [...existingModules, sentryNitroModule],\n // Through `server.plugins`, since vinxi's dev server ignores plugins that Nitro modules add.\n plugins: [...(server.plugins || []), getTunnelPluginPath()],\n },\n };\n}\n\nfunction getTunnelPluginPath(): string {\n const url = new URL('../nitro/tunnelPlugin.js', import.meta.url);\n\n // `import.meta.url` is a file URL in the built package, but not in every test environment.\n return url.protocol === 'file:' ? fileURLToPath(url) : url.pathname;\n}\n"],"names":["normalizeTunnelBasePath","nitro"],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from '@sentry/node';
|
|
2
|
-
export { NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Scope, addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, bindScopeToEmitter, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, consoleIntegration, consoleLoggingIntegration, contextLinesIntegration, continueTrace, createConsolaReporter, createGetModuleFromFilename, createSentryWinstonTransport, createTransport, cron, dedupeIntegration, defaultStackParser, disableAnrDetectionForCallback, endSession, eventFiltersIntegration, expressErrorHandler, expressIntegration, extraErrorDataIntegration, fastifyIntegration, flush, functionToStringIntegration, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, honoIntegration, honoMiddleware, httpIntegration, httpServerIntegration, httpServerSpansIntegration, initOpenTelemetry, instrumentSupabaseClient, isEnabled, isInitialized, kafkaIntegration, knexIntegration, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, logger, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, neonIntegration, nitroIntegration, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, postgresJsIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, setAttribute, setAttributes, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, spanStreamingIntegration, spanToBaggageHeader, spanToJSON, spanToStaticSpanJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, supabaseIntegration, suppressTracing, tediousIntegration, trpcMiddleware, updateSpanName, withActiveSpan, withIsolationScope, withMonitor, withScope, withStaticSpan, withStreamedSpan, zodErrorsIntegration } from '@sentry/node';
|
|
2
|
+
export { NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Scope, addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, bindScopeToEmitter, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, consoleIntegration, consoleLoggingIntegration, contextLinesIntegration, continueTrace, createConsolaReporter, createGetModuleFromFilename, createSentryWinstonTransport, createTransport, cron, dedupeIntegration, defaultStackParser, disableAnrDetectionForCallback, endSession, eventFiltersIntegration, expressErrorHandler, expressIntegration, extraErrorDataIntegration, fastifyIntegration, flush, functionToStringIntegration, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, getTunnelPath, graphqlIntegration, handleTunnelRequest, handleTunnelRequestIfMatched, hapiIntegration, honoIntegration, honoMiddleware, httpIntegration, httpServerIntegration, httpServerSpansIntegration, initOpenTelemetry, instrumentSupabaseClient, isEnabled, isInitialized, isTunnelRequest, kafkaIntegration, knexIntegration, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, logger, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, neonIntegration, nitroIntegration, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, postgresJsIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, serveTunnelIntegration, setAttribute, setAttributes, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, spanStreamingIntegration, spanToBaggageHeader, spanToJSON, spanToStaticSpanJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, supabaseIntegration, suppressTracing, tediousIntegration, trpcMiddleware, updateSpanName, withActiveSpan, withIsolationScope, withMonitor, withScope, withStaticSpan, withStreamedSpan, zodErrorsIntegration } from '@sentry/node';
|
|
3
3
|
export { withSentryErrorBoundary } from '@sentry/solid';
|
|
4
4
|
export { init } from './server/sdk.js';
|
|
5
5
|
export { withServerActionInstrumentation } from './server/withServerActionInstrumentation.js';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GLOBAL_OBJ } from '@sentry/core';
|
|
2
|
+
import { _INTERNAL_setManagedTunnelDefaults, _INTERNAL_isServedTunnelRequest, _INTERNAL_handleServedTunnelRequest } from '@sentry/core/server';
|
|
3
|
+
import { eventHandler, toWebRequest } from 'h3';
|
|
4
|
+
import { TUNNEL_BASE_PATH_GLOBAL } from '../common/tunnel.js';
|
|
5
|
+
|
|
6
|
+
const tunnelPlugin = ((nitroApp) => {
|
|
7
|
+
_INTERNAL_setManagedTunnelDefaults({
|
|
8
|
+
basePath: GLOBAL_OBJ[TUNNEL_BASE_PATH_GLOBAL]
|
|
9
|
+
});
|
|
10
|
+
nitroApp.h3App.stack.unshift({
|
|
11
|
+
route: "",
|
|
12
|
+
handler: eventHandler((event) => {
|
|
13
|
+
if (!_INTERNAL_isServedTunnelRequest({ method: event.method, url: event.path })) {
|
|
14
|
+
return void 0;
|
|
15
|
+
}
|
|
16
|
+
return _INTERNAL_handleServedTunnelRequest(toWebRequest(event));
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export { tunnelPlugin as default };
|
|
22
|
+
//# sourceMappingURL=tunnelPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tunnelPlugin.js","sources":["../../../src/nitro/tunnelPlugin.ts"],"sourcesContent":["import { GLOBAL_OBJ } from '@sentry/core';\nimport {\n _INTERNAL_handleServedTunnelRequest as handleServedTunnelRequest,\n _INTERNAL_isServedTunnelRequest as isServedTunnelRequest,\n _INTERNAL_setManagedTunnelDefaults as setManagedTunnelDefaults,\n} from '@sentry/core/server';\nimport { eventHandler, toWebRequest } from 'h3';\nimport type { NitroAppPlugin } from 'nitropack';\nimport { TUNNEL_BASE_PATH_GLOBAL } from '../common/tunnel';\n\n/**\n * Answers managed tunnel requests on SolidStart v1 (Nitro v2), from the first layer of the h3 app. That runs before\n * route rules, the app's middleware and routing. `withSentry` registers it.\n */\nexport default (nitroApp => {\n // The first layer sees the path before Nitro strips `server.baseURL`, so the tunnel is served under it. The server\n // bundle's banner sets the global before this plugin runs.\n setManagedTunnelDefaults({\n basePath: (GLOBAL_OBJ as { [TUNNEL_BASE_PATH_GLOBAL]?: string })[TUNNEL_BASE_PATH_GLOBAL],\n });\n\n // Not the `request` hook: h3 still runs the first layer after a hook answered, so route rules would act on the\n // sent response.\n nitroApp.h3App.stack.unshift({\n route: '',\n handler: eventHandler(event => {\n // Checked on the method and path first, so no other request's body gets wrapped in a web `Request`.\n if (!isServedTunnelRequest({ method: event.method, url: event.path })) {\n return undefined;\n }\n\n // `toWebRequest` also reads the body of the mock requests serverless presets pass through `localFetch`, which\n // aren't Node streams. A returned `Response` is sent and ends the request, `undefined` hands it on.\n return handleServedTunnelRequest(toWebRequest(event));\n }),\n });\n}) satisfies NitroAppPlugin;\n"],"names":["setManagedTunnelDefaults","isServedTunnelRequest","handleServedTunnelRequest"],"mappings":";;;;;AAcA,qBAAA,CAAgB,CAAA,QAAA,KAAY;AAG1B,EAAAA,kCAAA,CAAyB;AAAA,IACvB,QAAA,EAAW,WAAsD,uBAAuB;AAAA,GACzF,CAAA;AAID,EAAA,QAAA,CAAS,KAAA,CAAM,MAAM,OAAA,CAAQ;AAAA,IAC3B,KAAA,EAAO,EAAA;AAAA,IACP,OAAA,EAAS,aAAa,CAAA,KAAA,KAAS;AAE7B,MAAA,IAAI,CAACC,+BAAA,CAAsB,EAAE,MAAA,EAAQ,KAAA,CAAM,QAAQ,GAAA,EAAK,KAAA,CAAM,IAAA,EAAM,CAAA,EAAG;AACrE,QAAA,OAAO,MAAA;AAAA,MACT;AAIA,MAAA,OAAOC,mCAAA,CAA0B,YAAA,CAAa,KAAK,CAAC,CAAA;AAAA,IACtD,CAAC;AAAA,GACF,CAAA;AACH,CAAA;;;;"}
|
package/build/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"11.
|
|
1
|
+
{"type":"module","version":"11.10.0"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from '@sentry/node';
|
|
2
|
-
export { NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Scope, addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, bindScopeToEmitter, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, consoleIntegration, consoleLoggingIntegration, contextLinesIntegration, continueTrace, createConsolaReporter, createGetModuleFromFilename, createSentryWinstonTransport, createTransport, cron, dedupeIntegration, defaultStackParser, disableAnrDetectionForCallback, endSession, eventFiltersIntegration, expressErrorHandler, expressIntegration, extraErrorDataIntegration, fastifyIntegration, flush, functionToStringIntegration, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, honoIntegration, honoMiddleware, httpIntegration, httpServerIntegration, httpServerSpansIntegration, initOpenTelemetry, instrumentSupabaseClient, isEnabled, isInitialized, kafkaIntegration, knexIntegration, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, logger, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, neonIntegration, nitroIntegration, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, postgresJsIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, setAttribute, setAttributes, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, spanStreamingIntegration, spanToBaggageHeader, spanToJSON, spanToStaticSpanJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, supabaseIntegration, suppressTracing, tediousIntegration, trpcMiddleware, updateSpanName, withActiveSpan, withIsolationScope, withMonitor, withScope, withStaticSpan, withStreamedSpan, zodErrorsIntegration } from '@sentry/node';
|
|
2
|
+
export { NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Scope, addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, bindScopeToEmitter, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, consoleIntegration, consoleLoggingIntegration, contextLinesIntegration, continueTrace, createConsolaReporter, createGetModuleFromFilename, createSentryWinstonTransport, createTransport, cron, dedupeIntegration, defaultStackParser, disableAnrDetectionForCallback, endSession, eventFiltersIntegration, expressErrorHandler, expressIntegration, extraErrorDataIntegration, fastifyIntegration, flush, functionToStringIntegration, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, getTunnelPath, graphqlIntegration, handleTunnelRequest, handleTunnelRequestIfMatched, hapiIntegration, honoIntegration, honoMiddleware, httpIntegration, httpServerIntegration, httpServerSpansIntegration, initOpenTelemetry, instrumentSupabaseClient, isEnabled, isInitialized, isTunnelRequest, kafkaIntegration, knexIntegration, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, logger, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, neonIntegration, nitroIntegration, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, postgresJsIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, serveTunnelIntegration, setAttribute, setAttributes, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, spanStreamingIntegration, spanToBaggageHeader, spanToJSON, spanToStaticSpanJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, supabaseIntegration, suppressTracing, tediousIntegration, trpcMiddleware, updateSpanName, withActiveSpan, withIsolationScope, withMonitor, withScope, withStaticSpan, withStreamedSpan, zodErrorsIntegration } from '@sentry/node';
|
|
3
3
|
export { withSentryErrorBoundary } from '@sentry/solid';
|
|
4
4
|
export { init } from './sdk.js';
|
|
5
5
|
export { withServerActionInstrumentation } from './withServerActionInstrumentation.js';
|
|
@@ -2,9 +2,17 @@ import { warnOnRemovedBuildOptions } from '@sentry/core';
|
|
|
2
2
|
import { makeBuildInstrumentationFilePlugin } from './buildInstrumentationFile.js';
|
|
3
3
|
import { makeAddSentryVitePlugin, makeEnableSourceMapsVitePlugin } from './sourceMaps.js';
|
|
4
4
|
|
|
5
|
-
const sentrySolidStartVite = (options = {}, viteConfig) => {
|
|
5
|
+
const sentrySolidStartVite = (options = {}, viteConfig, tunnelBasePath = "") => {
|
|
6
6
|
warnOnRemovedBuildOptions(options, ["unstable_sentryVitePluginOptions"]);
|
|
7
|
-
const sentryPlugins = [
|
|
7
|
+
const sentryPlugins = [
|
|
8
|
+
{
|
|
9
|
+
name: "sentry-solidstart-tunnel-base-path",
|
|
10
|
+
// Serves the browser's managed tunnel under `server.baseURL`, like every other route of the app.
|
|
11
|
+
config: () => ({
|
|
12
|
+
define: { __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__: JSON.stringify(tunnelBasePath) }
|
|
13
|
+
})
|
|
14
|
+
}
|
|
15
|
+
];
|
|
8
16
|
if (options.autoInjectServerSentry !== "experimental_dynamic-import") {
|
|
9
17
|
sentryPlugins.push(makeBuildInstrumentationFilePlugin(options));
|
|
10
18
|
}
|
|
@@ -17,9 +25,9 @@ const sentrySolidStartVite = (options = {}, viteConfig) => {
|
|
|
17
25
|
}
|
|
18
26
|
return sentryPlugins;
|
|
19
27
|
};
|
|
20
|
-
const addSentryPluginToVite = (config = {}, options) => {
|
|
28
|
+
const addSentryPluginToVite = (config = {}, options, tunnelBasePath) => {
|
|
21
29
|
const plugins = Array.isArray(config.plugins) ? [...config.plugins] : [];
|
|
22
|
-
plugins.unshift(sentrySolidStartVite(options, config));
|
|
30
|
+
plugins.unshift(sentrySolidStartVite(options, config, tunnelBasePath));
|
|
23
31
|
return {
|
|
24
32
|
...config,
|
|
25
33
|
plugins
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentrySolidStartVite.js","sources":["../../../src/vite/sentrySolidStartVite.ts"],"sourcesContent":["import { warnOnRemovedBuildOptions } from '@sentry/core';\nimport type { Plugin, UserConfig } from 'vite';\nimport { makeBuildInstrumentationFilePlugin } from './buildInstrumentationFile';\nimport { makeAddSentryVitePlugin, makeEnableSourceMapsVitePlugin } from './sourceMaps';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n/**\n * Various Sentry vite plugins to be used for SolidStart.\n */\nexport const sentrySolidStartVite = (options: SentrySolidStartPluginOptions = {}
|
|
1
|
+
{"version":3,"file":"sentrySolidStartVite.js","sources":["../../../src/vite/sentrySolidStartVite.ts"],"sourcesContent":["import { warnOnRemovedBuildOptions } from '@sentry/core';\nimport type { Plugin, UserConfig } from 'vite';\nimport { makeBuildInstrumentationFilePlugin } from './buildInstrumentationFile';\nimport { makeAddSentryVitePlugin, makeEnableSourceMapsVitePlugin } from './sourceMaps';\nimport type { SentrySolidStartPluginOptions } from './types';\n\n/**\n * Various Sentry vite plugins to be used for SolidStart.\n */\nexport const sentrySolidStartVite = (\n options: SentrySolidStartPluginOptions = {},\n viteConfig: UserConfig,\n tunnelBasePath = '',\n): Plugin[] => {\n warnOnRemovedBuildOptions(options, ['unstable_sentryVitePluginOptions']);\n\n const sentryPlugins: Plugin[] = [\n {\n name: 'sentry-solidstart-tunnel-base-path',\n // Serves the browser's managed tunnel under `server.baseURL`, like every other route of the app.\n config: () => ({\n define: { __SENTRY_SOLIDSTART_TUNNEL_BASE_PATH__: JSON.stringify(tunnelBasePath) },\n }),\n },\n ];\n\n if (options.autoInjectServerSentry !== 'experimental_dynamic-import') {\n sentryPlugins.push(makeBuildInstrumentationFilePlugin(options));\n }\n\n if (process.env.NODE_ENV !== 'development') {\n if (options.sourcemaps?.disable !== true) {\n const sourceMapsPlugin = makeAddSentryVitePlugin(options, viteConfig);\n const enableSourceMapsPlugin = makeEnableSourceMapsVitePlugin(options);\n\n sentryPlugins.push(...sourceMapsPlugin, ...enableSourceMapsPlugin);\n }\n }\n\n return sentryPlugins;\n};\n\n/**\n * Helper to add the Sentry SolidStart vite plugin to a vite config.\n */\nexport const addSentryPluginToVite = (\n config: UserConfig = {},\n options: SentrySolidStartPluginOptions,\n tunnelBasePath?: string,\n): UserConfig => {\n const plugins = Array.isArray(config.plugins) ? [...config.plugins] : [];\n plugins.unshift(sentrySolidStartVite(options, config, tunnelBasePath));\n\n return {\n ...config,\n plugins,\n };\n};\n"],"names":[],"mappings":";;;;AASO,MAAM,uBAAuB,CAClC,OAAA,GAAyC,EAAC,EAC1C,UAAA,EACA,iBAAiB,EAAA,KACJ;AACb,EAAA,yBAAA,CAA0B,OAAA,EAAS,CAAC,kCAAkC,CAAC,CAAA;AAEvE,EAAA,MAAM,aAAA,GAA0B;AAAA,IAC9B;AAAA,MACE,IAAA,EAAM,oCAAA;AAAA;AAAA,MAEN,QAAQ,OAAO;AAAA,QACb,QAAQ,EAAE,sCAAA,EAAwC,IAAA,CAAK,SAAA,CAAU,cAAc,CAAA;AAAE,OACnF;AAAA;AACF,GACF;AAEA,EAAA,IAAI,OAAA,CAAQ,2BAA2B,6BAAA,EAA+B;AACpE,IAAA,aAAA,CAAc,IAAA,CAAK,kCAAA,CAAmC,OAAO,CAAC,CAAA;AAAA,EAChE;AAEA,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,aAAA,EAAe;AAC1C,IAAA,IAAI,OAAA,CAAQ,UAAA,EAAY,OAAA,KAAY,IAAA,EAAM;AACxC,MAAA,MAAM,gBAAA,GAAmB,uBAAA,CAAwB,OAAA,EAAS,UAAU,CAAA;AACpE,MAAA,MAAM,sBAAA,GAAyB,+BAA+B,OAAO,CAAA;AAErE,MAAA,aAAA,CAAc,IAAA,CAAK,GAAG,gBAAA,EAAkB,GAAG,sBAAsB,CAAA;AAAA,IACnE;AAAA,EACF;AAEA,EAAA,OAAO,aAAA;AACT;AAKO,MAAM,wBAAwB,CACnC,MAAA,GAAqB,EAAC,EACtB,SACA,cAAA,KACe;AACf,EAAA,MAAM,OAAA,GAAU,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAA,GAAI,CAAC,GAAG,MAAA,CAAO,OAAO,CAAA,GAAI,EAAC;AACvE,EAAA,OAAA,CAAQ,OAAA,CAAQ,oBAAA,CAAqB,OAAA,EAAS,MAAA,EAAQ,cAAc,CAAC,CAAA;AAErE,EAAA,OAAO;AAAA,IACL,GAAG,MAAA;AAAA,IACH;AAAA,GACF;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/client/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,cAAc,CAAC;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/client/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,cAAc,CAAC;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAWpD;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAUhE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Options } from '@sentry/core';
|
|
2
|
+
/** Set on the server by `withSentry` to the app's `server.baseURL`. */
|
|
3
|
+
export declare const TUNNEL_BASE_PATH_GLOBAL = "__sentry_solidstart_base_path";
|
|
4
|
+
/**
|
|
5
|
+
* Serves the browser's managed tunnel under the app's `server.baseURL`, which `withSentry` defines at build time.
|
|
6
|
+
* A `basePath` the user set wins.
|
|
7
|
+
*/
|
|
8
|
+
export declare function applyTunnelBasePath(options: Pick<Options, 'tunnel'>): void;
|
|
9
|
+
//# sourceMappingURL=tunnel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tunnel.d.ts","sourceRoot":"","sources":["../../../src/common/tunnel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,uEAAuE;AACvE,eAAO,MAAM,uBAAuB,kCAAkC,CAAC;AAIvE;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,GAAG,IAAI,CAI1E"}
|
|
@@ -5,6 +5,7 @@ export type RollupConfig = {
|
|
|
5
5
|
};
|
|
6
6
|
export type SolidStartInlineConfig = NonNullable<Parameters<typeof defineConfig>[0]>;
|
|
7
7
|
export type SolidStartInlineServerConfig = {
|
|
8
|
+
plugins?: string[];
|
|
8
9
|
hooks?: {
|
|
9
10
|
close?: () => unknown;
|
|
10
11
|
'rollup:before'?: (nitro: Nitro) => unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAGvC,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,OAAO,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAErF,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,CAAC,EAAE;QACN,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC;QACtB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC;KAC7C,CAAC;CACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAGvC,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,OAAO,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAErF,MAAM,MAAM,4BAA4B,GAAG;IACzC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE;QACN,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC;QACtB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC;KAC7C,CAAC;CACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withSentry.d.ts","sourceRoot":"","sources":["../../../src/config/withSentry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"withSentry.d.ts","sourceRoot":"","sources":["../../../src/config/withSentry.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AAMnE,OAAO,KAAK,EAAgB,sBAAsB,EAAgC,MAAM,SAAS,CAAC;AAclG;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,gBAAgB,EAAE,sBAAsB,YAAK,EAC7C,6BAA6B,EAAE,6BAA6B,GAC3D,sBAAsB,CAmGxB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Answers managed tunnel requests on SolidStart v1 (Nitro v2), from the first layer of the h3 app. That runs before
|
|
3
|
+
* route rules, the app's middleware and routing. `withSentry` registers it.
|
|
4
|
+
*/
|
|
5
|
+
declare const _default: (nitroApp: import("nitropack").NitroApp) => void;
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=tunnelPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tunnelPlugin.d.ts","sourceRoot":"","sources":["../../../src/nitro/tunnelPlugin.ts"],"names":[],"mappings":"AAUA;;;GAGG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, disableAnrDetectionForCallback, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, consoleIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createTransport, cron, dedupeIntegration, defaultStackParser, endSession, expressErrorHandler, expressIntegration, extraErrorDataIntegration, fastifyIntegration, flush, functionToStringIntegration, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, httpIntegration, httpServerIntegration, httpServerSpansIntegration, eventFiltersIntegration, initOpenTelemetry, isInitialized, isEnabled, knexIntegration, kafkaIntegration, honoIntegration, honoMiddleware, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, nitroIntegration, mysqlIntegration, nativeNodeFetchIntegration, NodeClient, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, postgresJsIntegration, neonIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, Scope, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setAttribute, setAttributes, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, setUser, spanToBaggageHeader, spanToStaticSpanJSON, spanToJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, bindScopeToEmitter, suppressTracing, startSession, startSpan, startSpanManual, tediousIntegration, trpcMiddleware, updateSpanName, withActiveSpan, withIsolationScope, withMonitor, withScope, supabaseIntegration, instrumentSupabaseClient, zodErrorsIntegration, logger, consoleLoggingIntegration, createConsolaReporter, createSentryWinstonTransport, spanStreamingIntegration, withStaticSpan, withStreamedSpan, } from '@sentry/node';
|
|
1
|
+
export { addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, disableAnrDetectionForCallback, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, consoleIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createTransport, cron, dedupeIntegration, defaultStackParser, endSession, expressErrorHandler, expressIntegration, extraErrorDataIntegration, fastifyIntegration, flush, functionToStringIntegration, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, httpIntegration, httpServerIntegration, httpServerSpansIntegration, eventFiltersIntegration, initOpenTelemetry, isInitialized, isEnabled, knexIntegration, kafkaIntegration, honoIntegration, honoMiddleware, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, nitroIntegration, mysqlIntegration, nativeNodeFetchIntegration, NodeClient, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, postgresJsIntegration, neonIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, Scope, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setAttribute, setAttributes, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, setUser, spanToBaggageHeader, spanToStaticSpanJSON, spanToJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, bindScopeToEmitter, suppressTracing, startSession, startSpan, startSpanManual, tediousIntegration, trpcMiddleware, serveTunnelIntegration, getTunnelPath, handleTunnelRequest, handleTunnelRequestIfMatched, isTunnelRequest, updateSpanName, withActiveSpan, withIsolationScope, withMonitor, withScope, supabaseIntegration, instrumentSupabaseClient, zodErrorsIntegration, logger, consoleLoggingIntegration, createConsolaReporter, createSentryWinstonTransport, spanStreamingIntegration, withStaticSpan, withStreamedSpan, } from '@sentry/node';
|
|
2
2
|
export * from '@sentry/node';
|
|
3
3
|
export { withSentryErrorBoundary } from '@sentry/solid';
|
|
4
4
|
export { init } from './sdk';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAElB,cAAc,EAEd,8BAA8B,EAC9B,cAAc,EACd,yBAAyB,EACzB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,cAAc,EACd,KAAK,EACL,kBAAkB,EAClB,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,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,EACvB,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,cAAc,EACd,WAAW,EACX,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,0BAA0B,EAC1B,UAAU,EACV,sBAAsB,EACtB,8BAA8B,EAC9B,+BAA+B,EAC/B,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,wBAAwB,EACxB,KAAK,EACL,WAAW,EAEX,4BAA4B,EAE5B,gCAAgC,EAChC,qCAAqC,EACrC,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,EACd,MAAM,EACN,OAAO,EACP,YAAY,EACZ,aAAa,EAEb,wBAAwB,EAExB,qBAAqB,EAErB,oBAAoB,EACpB,OAAO,EACP,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,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,EACvB,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,cAAc,EACd,WAAW,EACX,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,0BAA0B,EAC1B,UAAU,EACV,sBAAsB,EACtB,8BAA8B,EAC9B,+BAA+B,EAC/B,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,wBAAwB,EACxB,KAAK,EACL,WAAW,EAEX,4BAA4B,EAE5B,gCAAgC,EAChC,qCAAqC,EACrC,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,EACd,MAAM,EACN,OAAO,EACP,YAAY,EACZ,aAAa,EAEb,wBAAwB,EAExB,qBAAqB,EAErB,oBAAoB,EACpB,OAAO,EACP,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,sBAAsB,EACtB,aAAa,EACb,mBAAmB,EACnB,4BAA4B,EAC5B,eAAe,EACf,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"}
|
|
@@ -3,9 +3,9 @@ import type { SentrySolidStartPluginOptions } from './types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Various Sentry vite plugins to be used for SolidStart.
|
|
5
5
|
*/
|
|
6
|
-
export declare const sentrySolidStartVite: (options: SentrySolidStartPluginOptions | undefined, viteConfig: UserConfig) => Plugin[];
|
|
6
|
+
export declare const sentrySolidStartVite: (options: SentrySolidStartPluginOptions | undefined, viteConfig: UserConfig, tunnelBasePath?: string) => Plugin[];
|
|
7
7
|
/**
|
|
8
8
|
* Helper to add the Sentry SolidStart vite plugin to a vite config.
|
|
9
9
|
*/
|
|
10
|
-
export declare const addSentryPluginToVite: (config: UserConfig | undefined, options: SentrySolidStartPluginOptions) => UserConfig;
|
|
10
|
+
export declare const addSentryPluginToVite: (config: UserConfig | undefined, options: SentrySolidStartPluginOptions, tunnelBasePath?: string) => UserConfig;
|
|
11
11
|
//# sourceMappingURL=sentrySolidStartVite.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentrySolidStartVite.d.ts","sourceRoot":"","sources":["../../../src/vite/sentrySolidStartVite.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAG/C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"sentrySolidStartVite.d.ts","sourceRoot":"","sources":["../../../src/vite/sentrySolidStartVite.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAG/C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,oBAAoB,YACtB,6BAA6B,0BAC1B,UAAU,8BAErB,MAAM,EA2BR,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,WACxB,UAAU,uBACT,6BAA6B,mBACrB,MAAM,KACtB,UAQF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/solidstart",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.10.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,21 +80,27 @@
|
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
"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.
|
|
83
|
+
"@sentry/core": "11.10.0",
|
|
84
|
+
"@sentry/nitro": "11.10.0",
|
|
85
|
+
"@sentry/node": "11.10.0",
|
|
86
|
+
"@sentry/server-runtime-injection": "11.10.0",
|
|
87
|
+
"@sentry/server-utils": "11.10.0",
|
|
88
|
+
"@sentry/solid": "11.10.0",
|
|
89
|
+
"@sentry/bundler-plugins": "11.10.0",
|
|
90
|
+
"@sentry/conventions": "0.29.0",
|
|
91
|
+
"h3": "^1.15.10"
|
|
91
92
|
},
|
|
92
93
|
"devDependencies": {
|
|
94
|
+
"@sentry-internal/rollup-utils": "11.10.0",
|
|
95
|
+
"@sentry/browser": "11.10.0",
|
|
93
96
|
"@solidjs/router": "^1.0.0",
|
|
94
97
|
"@solidjs/start": "^1.3.2",
|
|
95
98
|
"@solidjs/testing-library": "0.8.5",
|
|
96
99
|
"@testing-library/jest-dom": "^6.9.1",
|
|
97
100
|
"@testing-library/user-event": "^14.5.2",
|
|
101
|
+
"@types/node": "^20.19.0",
|
|
102
|
+
"nitropack": "^2.13.4",
|
|
103
|
+
"node-mock-http": "^1.0.4",
|
|
98
104
|
"solid-js": "^1.9.11",
|
|
99
105
|
"vinxi": "^0.5.11",
|
|
100
106
|
"vite": "^8.3.1",
|
|
@@ -122,9 +128,6 @@
|
|
|
122
128
|
"test:watch": "vitest --watch",
|
|
123
129
|
"yalc:publish": "yalc publish --push --sig"
|
|
124
130
|
},
|
|
125
|
-
"volta": {
|
|
126
|
-
"extends": "../../package.json"
|
|
127
|
-
},
|
|
128
131
|
"nx": {
|
|
129
132
|
"targets": {
|
|
130
133
|
"build:types": {
|