// Generated by scripts/generate-manifest.mjs. Do not edit by hand. import type { AddOnCompiled } from '../../../../../types.js' type TemplateRecord = Record type TemplateAddOn = TemplateRecord & { integrations?: Array routes?: Array } type TemplateRenderContext = { [key: string]: any packageManager: any projectName: any typescript: any tailwind: any blank: any js: any jsx: any fileRouter: any codeRouter: any routerOnly: any includeExamples: any addOnEnabled: Record addOnOption: Record addOns: Array integrations: Array routes: Array getPackageManagerAddScript: (...args: Array) => string getPackageManagerRunScript: (...args: Array) => string getPackageManagerExecuteScript: (...args: Array) => string relativePath: (...args: Array) => string integrationImportContent: (...args: Array) => string integrationImportCode: (...args: Array) => string | undefined renderTemplate: (content: string) => string ignoreFile: () => never } type TemplateRenderer = (context: TemplateRenderContext) => string | undefined function __escapeXML(value: unknown) { if (value === undefined || value === null) { return '' } return String(value).replace(/[&<>'"]/g, (character) => { switch (character) { case '&': return '&' case '<': return '<' case '>': return '>' case '"': return '"' case "'": return ''' default: return character } }) } export function getManifestTemplateKey(template: string) { let hash = 0x811c9dc5 for (let i = 0; i < template.length; i++) { hash ^= template.charCodeAt(i) hash = Math.imul(hash, 0x01000193) >>> 0 } return `${hash.toString(16).padStart(8, '0')}:${template.length}` } const templateRenderers: Record = { } export function hasManifestTemplate(template: string) { return getManifestTemplateKey(template) in templateRenderers } export function renderManifestTemplate( template: string, context: TemplateRenderContext, ) { const key = getManifestTemplateKey(template) const renderer = templateRenderers[key] if (!renderer) { throw new Error(`Template ${key} was not precompiled into the manifest`) } return renderer(context) ?? '' } export const addOn = { "name": "Sentry", "phase": "setup", "description": "Add Sentry for error monitoring and crash reporting (requires Start).", "link": "https://sentry.com/", "modes": [ "file-router" ], "type": "add-on", "category": "monitoring", "color": "#362D59", "partner": { "id": "sentry", "tier": "bronze" }, "routes": [ { "url": "/demo/sentry/bad-event-handler", "name": "Sentry", "path": "src/routes/demo.sentry.bad-event-handler.tsx", "jsName": "SentryBadEventHandlerDemo" } ], "id": "sentry", "version": "0.0.0", "packageAdditions": { "dependencies": { "@sentry/solid": "^10.67.0" } }, "readmeIsEjs": false, "files": { "_dot_cursorrules.append": "We use Sentry for watching for errors in our deployed application, as well as for instrumentation of our application.\n\n## Error collection\n\nError collection is automatic and configured in `src/router.tsx`.\n\n## Instrumentation\n\nWe want our server functions intstrumented. So if you see a function name like `createServerFn`, you can instrument it with Sentry. You'll need to import `Sentry`:\n\n```tsx\nimport * as Sentry from '@sentry/browser'\n```\n\nAnd then wrap the implementation of the server function with `Sentry.startSpan`, liks so:\n\n```tsx\nSentry.startSpan({ name: 'Requesting all the pokemon' }, async () => {\n // Some lengthy operation here\n await fetch('https://api.pokemon.com/data/')\n})\n```\n", "_dot_env.local.append": "# Your Sentry DSN (from your Sentry account)\nVITE_SENTRY_DSN=\n", "src/routes/demo.sentry.bad-event-handler.tsx": "import { createFileRoute } from '@tanstack/solid-router'\n\nexport const Route = createFileRoute('/demo/sentry/bad-event-handler')({\n component: RouteComponent,\n})\n\nfunction RouteComponent() {\n return (\n
\n
\n

Sentry

\n

Error Handler Demo

\n {\n throw new Error('Sentry Frontend Error')\n }}\n class=\"demo-button\"\n >\n Throw error\n \n
\n
\n )\n}\n" }, "deletedFiles": [], "smallLogo": "" } satisfies AddOnCompiled