[
  {
    "path": ".editorconfig",
    "content": "# editorconfig.org\nroot = true\n\n[*]\nindent_size = 2\nindent_style = space\nend_of_line = lf\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n[*.md]\ntrim_trailing_whitespace = false\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Report a bug report to help us improve the module.\ntitle: ''\nlabels: bug\nassignees: ''\n\n---\n\n### Version\n@nuxtjs/sentry: <!-- ex: 5.9.0 -->\nnuxt: <!-- ex: 2.0.0 -->\n\n### Sentry configuration\n<!--\n    If relevant, please include the configuration you are using for this module.\n```\n-->\n\n### Reproduction Link\n<!--\n    A minimal test case on codesandbox or in a repository that can be used to reproduce the bug.\n-->\n\n### Steps to reproduce\n\n\n### What is Expected?\n\n\n### What is actually happening?\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "blank_issues_enabled: false\ncontact_links:\n  - name: Nuxt Community Discord\n    url: https://discord.nuxtjs.org/\n    about: Consider asking questions about the module here.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature request\nabout: Suggest an idea or enhancement for this project.\ntitle: ''\nlabels: feature-request\nassignees: ''\n\n---\n\n### Is your feature request related to a problem? Please describe.\n<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->\n\n### Describe the solution you'd like\n<!-- A clear and concise description of what you want to happen. -->\n\n### Describe alternatives you've considered\n<!-- A clear and concise description of any alternative solutions or features you've considered. -->\n\n### Additional context\n<!-- Add any other context or screenshots about the feature request here. -->\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/question.md",
    "content": "---\nname: Question\nabout: Ask a question about the module.\ntitle: ''\nlabels: question\nassignees: ''\n\n---\n\n<!--\n\n **IMPORTANT!**\nPlease make sure to look for an answer to your question in our documentation before asking a question here.\n\nIf relevant to your question, provide module configuration.\n\nIf you have a general question regarding the module use Discord `modules` channel. Thanks!\n\nNuxt Discord: https://discord.nuxtjs.org/\n\n-->\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "content": "---\nname: CI\n\non:\n  push:\n    branches:\n    - main\n  pull_request:\n    branches:\n    - main\n\njobs:\n  build:\n    name: Lint and test\n    runs-on: ubuntu-latest\n    env:\n      CI: true\n    strategy:\n      fail-fast: false\n      matrix:\n        node-version: [18, 20]\n    steps:\n      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4\n      - name: Setup node\n        uses: actions/setup-node@v4\n        with:\n          node-version: ${{ matrix.node-version }}\n          cache: yarn\n      - name: yarn install\n        run: yarn\n      - name: Unittesting\n        run: yarn test\n      - name: Linting\n        if: ${{ matrix.node-version == '18' }}\n        run: yarn lint\n"
  },
  {
    "path": ".github/workflows/size-limit.yml",
    "content": "---\nname: size\n\non:\n  pull_request:\n    branches:\n    - main\n\njobs:\n  size:\n    name: Size Check\n    runs-on: ubuntu-latest\n    env:\n      CI: true\n      CI_JOB_NUMBER: 1\n    strategy:\n      fail-fast: false\n      matrix:\n        node-version: [20]\n    steps:\n      - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4\n      - name: Setup node\n        uses: actions/setup-node@v4\n        with:\n          node-version: ${{ matrix.node-version }}\n          cache: yarn\n      - name: Check bundle sizes\n        uses: andresz1/size-limit-action@v1\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          build_script: size\n"
  },
  {
    "path": ".gitignore",
    "content": "# Dependencies\nnode_modules\n\n# Logs\n*.log*\n\n# Temp directories\n.temp\n.tmp\n.cache\n\n# Yarn\n**/.yarn/cache\n**/.yarn/*state*\n\n# Generated dirs\ndist\n\n# Nuxt\n.nuxt\n.output\n.vercel_build_output\n.build-*\n.env\n.netlify\n\n# Env\n.env\n\n# Testing\nreports\n*.lcov\n.nyc_output\n\n# VSCode\n.vscode\n\n# Intellij idea\n*.iml\n.idea\n\n# OSX\n.DS_Store\n.AppleDouble\n.LSOverride\n.AppleDB\n.AppleDesktop\nNetwork Trash Folder\nTemporary Items\n.apdisk\n"
  },
  {
    "path": ".npmrc",
    "content": "registry=https://registry.npmjs.org/\n"
  },
  {
    "path": ".nvmrc",
    "content": "20\n"
  },
  {
    "path": ".release-it.cjs",
    "content": "/* eslint-disable no-template-curly-in-string */\nmodule.exports = {\n  git: {\n    commitMessage: 'chore: release ${version}',\n    tagName: 'v${version}',\n  },\n  npm: {\n    publish: true,\n  },\n  github: {\n    release: true,\n    releaseName: '${version}',\n    releaseNotes (ctx) {\n      // Remove first, redundant line with the version and the date.\n      return ctx.changelog.split('\\n').slice(1).join('\\n')\n    },\n  },\n  plugins: {\n    '@release-it/conventional-changelog': {\n      preset: 'conventionalcommits',\n      infile: 'CHANGELOG.md',\n    },\n  },\n}\n"
  },
  {
    "path": ".size-limit.cjs",
    "content": "module.exports = [\n  {\n    name: 'fixture: base',\n    path: 'size-check/base/.nuxt/dist/client/',\n    gzip: false,\n    brotli: false,\n  },\n  {\n    name: 'fixture: replay',\n    path: 'size-check/replay/.nuxt/dist/client/',\n    gzip: false,\n    brotli: false,\n  },\n  {\n    name: 'fixture: lazy',\n    path: 'size-check/lazy/.nuxt/dist/client/',\n    gzip: false,\n    brotli: false,\n  },\n  {\n    name: 'fixture: tracing',\n    path: 'size-check/tracing/.nuxt/dist/client/',\n    gzip: false,\n    brotli: false,\n  },\n  {\n    name: 'fixture: lazy+tracing',\n    path: 'size-check/lazy+tracing/.nuxt/dist/client/',\n    gzip: false,\n    brotli: false,\n  },\n  {\n    name: 'fixture: typescript',\n    path: 'size-check/typescript/.nuxt/dist/client/',\n    gzip: false,\n    brotli: false,\n  },\n]\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "\n\n## [8.0.8](https://github.com/nuxt-community/sentry-module/compare/v8.0.7...v8.0.8) (2024-09-13)\n\n\n### Bug Fixes\n\n* **deps:** update devdependency @sentry/webpack-plugin to v2.22.3 ([#688](https://github.com/nuxt-community/sentry-module/issues/688)) ([e84d715](https://github.com/nuxt-community/sentry-module/commit/e84d71511d899398f186990ce68f41d9469774f6))\n* **deps:** update sentry sdk ([#666](https://github.com/nuxt-community/sentry-module/issues/666)) ([9d5dd24](https://github.com/nuxt-community/sentry-module/commit/9d5dd24d43ef962db5ea2043c359088af283e68b))\n* type declarations don't work with \"moduleResolution: node16\" ([8fe70f0](https://github.com/nuxt-community/sentry-module/commit/8fe70f09ebf708a0ac40c17d4863c7d2aecc0b9b))\n\n## [8.0.7](https://github.com/nuxt-community/sentry-module/compare/v8.0.6...v8.0.7) (2024-02-07)\n\n\n### Bug Fixes\n\n* **deps:** update devdependency @sentry/profiling-node to v7 ([#665](https://github.com/nuxt-community/sentry-module/issues/665)) ([df52090](https://github.com/nuxt-community/sentry-module/commit/df5209004dbb9a5016fca32204df7cfdf00af0eb))\n* **deps:** update sentry sdk ([#656](https://github.com/nuxt-community/sentry-module/issues/656)) ([89c6576](https://github.com/nuxt-community/sentry-module/commit/89c6576b173e138d891926ee677d2468f296d578))\n\n## [8.0.6](https://github.com/nuxt-community/sentry-module/compare/v8.0.4...v8.0.6) (2023-11-27)\n\n\n### Bug Fixes\n\n* **deps:** update sentry sdk to ^7.81.1 ([#653](https://github.com/nuxt-community/sentry-module/issues/653)) ([2c17b30](https://github.com/nuxt-community/sentry-module/commit/2c17b30f670b608e9064e7b6f576f23b2cfb180a))\n* make it possible to disable internal SDK integrations ([#655](https://github.com/nuxt-community/sentry-module/issues/655)) ([fd32a7e](https://github.com/nuxt-community/sentry-module/commit/fd32a7e47e0556013c4f7b7a2998e796e136ca22))\n\n## [8.0.4](https://github.com/nuxt-community/sentry-module/compare/v8.0.3...v8.0.4) (2023-11-20)\n\n\n### Bug Fixes\n\n* **deps:** update sentry sdk ([#646](https://github.com/nuxt-community/sentry-module/issues/646)) ([630c80b](https://github.com/nuxt-community/sentry-module/commit/630c80b9b70c251f2628157ad6554b7c14070497))\n* set `root` for RewriteFrames integration ([#650](https://github.com/nuxt-community/sentry-module/issues/650)) ([d8c4733](https://github.com/nuxt-community/sentry-module/commit/d8c4733788190307d45cab0ba7f7efd13caae071))\n\n## [8.0.3](https://github.com/nuxt-community/sentry-module/compare/v8.0.2...v8.0.3) (2023-11-16)\n\n\n### Bug Fixes\n\n* crash on handling unhandled exceptions ([#647](https://github.com/nuxt-community/sentry-module/issues/647)) ([007d84d](https://github.com/nuxt-community/sentry-module/commit/007d84d73e4acb9598641076e4712bbd928c66dc))\n\n## [8.0.2](https://github.com/nuxt-community/sentry-module/compare/v8.0.1...v8.0.2) (2023-11-13)\n\n\n### Bug Fixes\n\n* **deps:** update sentry sdk ([#632](https://github.com/nuxt-community/sentry-module/issues/632)) ([2de0ed1](https://github.com/nuxt-community/sentry-module/commit/2de0ed19b2b67fe53c9403477304e8f15ada8a7c))\n* support external configuration in form of *.ts ([#639](https://github.com/nuxt-community/sentry-module/issues/639)) ([e481548](https://github.com/nuxt-community/sentry-module/commit/e48154899a4a5a3a5fb8b67664f3ae394f995056))\n\n## [8.0.1](https://github.com/nuxt-community/sentry-module/compare/v8.0.0...v8.0.1) (2023-10-31)\n\n\n### Bug Fixes\n\n* **deps:** update sentry sdk to 7.77.0 ([#624](https://github.com/nuxt-community/sentry-module/issues/624)) ([a5073d1](https://github.com/nuxt-community/sentry-module/commit/a5073d10ce96d157e6349029a98ee1c09abd9582))\n\n## [8.0.0](https://github.com/nuxt-community/sentry-module/compare/v7.5.0...v8.0.0) (2023-10-31)\n\n\n### ⚠ BREAKING CHANGES\n\n* See migration guide at https://sentry.nuxtjs.org/guide/migration\n\n### Features\n\n* upgrade to webpack-plugin v2 for making releases ([#616](https://github.com/nuxt-community/sentry-module/issues/616)) ([b981638](https://github.com/nuxt-community/sentry-module/commit/b981638304bbad33d9896e25dd78cf518a43ae1a))\n\n\n### Bug Fixes\n\n* **deps:** update devdependency @sentry/webpack-plugin to v2.8.0 ([#621](https://github.com/nuxt-community/sentry-module/issues/621)) ([d981f1f](https://github.com/nuxt-community/sentry-module/commit/d981f1fbaa4b50fe608339c393802871d5f1d751))\n* **deps:** update sentry sdk ([#604](https://github.com/nuxt-community/sentry-module/issues/604)) ([3ae9b5b](https://github.com/nuxt-community/sentry-module/commit/3ae9b5b746ec01031bfd001c764fad30f8343180))\n\n## [8.0.0-rc.0](https://github.com/nuxt-community/sentry-module/compare/v7.5.0...v8.0.0-rc.0) (2023-09-19)\n\n\n### ⚠ BREAKING CHANGES\n\n* **publishRelease:** See migration guide at https://sentry.nuxtjs.org/guide/migration\n\n### Features\n\n* **publishRelease:** upgrade to webpack-plugin v2 ([d3ed0eb](https://github.com/nuxt-community/sentry-module/commit/d3ed0ebbec899d24ce13b963d9132282e5cdc26a))\n\n## [7.5.0](https://github.com/nuxt-community/sentry-module/compare/v7.4.0...v7.5.0) (2023-08-28)\n\n\n### Features\n\n* **tracing:** allow configuring vueRouterInstrumentation options ([#614](https://github.com/nuxt-community/sentry-module/issues/614)) ([977a74e](https://github.com/nuxt-community/sentry-module/commit/977a74e7b28f360116514258adcf8cbcec2b5be1))\n\n## [7.4.0](https://github.com/nuxt-community/sentry-module/compare/v7.3.1...v7.4.0) (2023-08-11)\n\n\n### Bug Fixes\n\n* **deps:** update sentry sdk ([#593](https://github.com/nuxt-community/sentry-module/issues/593)) ([35daec5](https://github.com/nuxt-community/sentry-module/commit/35daec5a015bf087893fd13f20d13a415e9a9c3a))\n* **deps:** update sentry sdk to ^7.63.0 ([ecdce1f](https://github.com/nuxt-community/sentry-module/commit/ecdce1f6f7488b016f1f8949a9455cf7ebc2d9d9))\n* **lazy:** avoid crash on using mocked instance after real one loaded ([#606](https://github.com/nuxt-community/sentry-module/issues/606)) ([e728a34](https://github.com/nuxt-community/sentry-module/commit/e728a349e212cb422a385ee8619cf00353b318fd))\n\n## [7.3.1](https://github.com/nuxt-community/sentry-module/compare/v7.3.0...v7.3.1) (2023-07-04)\n\n\n### Bug Fixes\n\n* **deps:** update sentry sdk to ^7.57.0 ([663147b](https://github.com/nuxt-community/sentry-module/commit/663147b0ca6a78d01056de44a538965113291ba4))\n\n## [7.3.0](https://github.com/nuxt-community/sentry-module/compare/v7.2.6...v7.3.0) (2023-05-21)\n\n\n### Features\n\n* **profiling:** add support for enabling Profiling integration ([#577](https://github.com/nuxt-community/sentry-module/issues/577)) ([9a9aa85](https://github.com/nuxt-community/sentry-module/commit/9a9aa859bec6ca9c6032f3dba5d8f06286fea6ff))\n\n\n### Bug Fixes\n\n* **deps:** update sentry sdk to ^7.52.1 ([#573](https://github.com/nuxt-community/sentry-module/issues/573)) ([a74cf7f](https://github.com/nuxt-community/sentry-module/commit/a74cf7f8ac63ec2db1f447dd458241311ef7e804))\n* **tracing:** tracing not enabled on the server ([#575](https://github.com/nuxt-community/sentry-module/issues/575)) ([7839d03](https://github.com/nuxt-community/sentry-module/commit/7839d037beef628c6c2f5b2860e16fcd3e9617f8))\n\n### [7.2.6](https://github.com/nuxt-community/sentry-module/compare/v7.2.5...v7.2.6) (2023-05-10)\n\n\n### Bug Fixes\n\n* crash happening when `@nuxt/kit` is installed ([#571](https://github.com/nuxt-community/sentry-module/issues/571)) ([10e650a](https://github.com/nuxt-community/sentry-module/commit/10e650a21881877d7ee89253defabaef77a71c9c))\n\n### [7.2.5](https://github.com/nuxt-community/sentry-module/compare/v7.2.4...v7.2.5) (2023-05-10)\n\n\n### Bug Fixes\n\n* config merging order on the server side ([#568](https://github.com/nuxt-community/sentry-module/issues/568)) ([4fc42dd](https://github.com/nuxt-community/sentry-module/commit/4fc42dd6c3ebc3947ebf84529b3a7d4b0354c812))\n\n### [7.2.4](https://github.com/nuxt-community/sentry-module/compare/v7.2.3...v7.2.4) (2023-05-09)\n\n\n### Bug Fixes\n\n* **deps:** update sentry sdk ([#563](https://github.com/nuxt-community/sentry-module/issues/563)) ([bcb9500](https://github.com/nuxt-community/sentry-module/commit/bcb95002ceaedffed5056f55241abad59b91879e))\n* remove use of unctx to avoid issues with conflicting versions ([#566](https://github.com/nuxt-community/sentry-module/issues/566)) ([d8dc14b](https://github.com/nuxt-community/sentry-module/commit/d8dc14b06f3276fef2d41c80c5608b75d9543ae5))\n\n### [7.2.3](https://github.com/nuxt-community/sentry-module/compare/v7.2.2...v7.2.3) (2023-05-02)\n\n\n### Bug Fixes\n\n* ensure Sentry re-initializes in Dev after Nuxt config change ([#565](https://github.com/nuxt-community/sentry-module/issues/565)) ([5ee045d](https://github.com/nuxt-community/sentry-module/commit/5ee045d0c7393070e45505ca1c922c0f4ce7168a))\n\n### [7.2.2](https://github.com/nuxt-community/sentry-module/compare/v7.2.1...v7.2.2) (2023-04-20)\n\n\n### Bug Fixes\n\n* **deps:** add `@sentry/core` explicitly as its used in types ([7124678](https://github.com/nuxt-community/sentry-module/commit/7124678e4d1e8a787594958ced3bbe5e0e23d42b))\n\n### [7.2.1](https://github.com/nuxt-community/sentry-module/compare/v7.2.0...v7.2.1) (2023-04-18)\n\n\n### Bug Fixes\n\n* only include 'crash' type for `ReportingObserver` integration ([#560](https://github.com/nuxt-community/sentry-module/issues/560)) ([782b9d1](https://github.com/nuxt-community/sentry-module/commit/782b9d186bcc6fc144c229876a8321a48789a3f2))\n\n## [7.2.0](https://github.com/nuxt-community/sentry-module/compare/v7.1.13...v7.2.0) (2023-04-18)\n\n\n### Features\n\n* extend guides in docs and add simpler way to enable Replay ([#559](https://github.com/nuxt-community/sentry-module/issues/559)) ([fd57b07](https://github.com/nuxt-community/sentry-module/commit/fd57b070832a3fbe2457d681c063cd59fe910745))\n\n\n### Bug Fixes\n\n* **deps:** update sentry sdk to ^7.48.0 ([#545](https://github.com/nuxt-community/sentry-module/issues/545)) ([30b283a](https://github.com/nuxt-community/sentry-module/commit/30b283a395c43027d5b0b06e2604f988c262003d))\n\n### [7.1.13](https://github.com/nuxt-community/sentry-module/compare/v7.1.12...v7.1.13) (2023-04-11)\n\n\n### Bug Fixes\n\n* don't shutdown Sentry SDK after build in dev mode ([#555](https://github.com/nuxt-community/sentry-module/issues/555)) ([b4c1312](https://github.com/nuxt-community/sentry-module/commit/b4c13126da05c9d382567077623553bb63f5a164))\n\n### [7.1.12](https://github.com/nuxt-community/sentry-module/compare/v7.1.11...v7.1.12) (2023-04-11)\n\n\n### Bug Fixes\n\n* **deps:** update sentry sdk to ^7.47.0 ([#552](https://github.com/nuxt-community/sentry-module/issues/552)) ([30c1a97](https://github.com/nuxt-community/sentry-module/commit/30c1a97cf0769fb94591f017914227dc0df8db57))\n* shutdown server Sentry SDK when `nuxt build` is done ([#551](https://github.com/nuxt-community/sentry-module/issues/551)) ([f24cfb2](https://github.com/nuxt-community/sentry-module/commit/f24cfb26a132f5214a8a81f5a2158e3f5317f4c2))\n\n### [7.1.11](https://github.com/nuxt-community/sentry-module/compare/v7.1.10...v7.1.11) (2023-04-03)\n\n\n### Bug Fixes\n\n* resolve aliases relative to module's dir ([#548](https://github.com/nuxt-community/sentry-module/issues/548)) ([94d7c90](https://github.com/nuxt-community/sentry-module/commit/94d7c907d89e977928f9838b3de7c8af016428a4))\n* significantly reduce client bundle size ([#547](https://github.com/nuxt-community/sentry-module/issues/547)) ([ad8eefd](https://github.com/nuxt-community/sentry-module/commit/ad8eefd0e4359f23701f3b92ea2d0d398772404d))\n\n### [7.1.10](https://github.com/nuxt-community/sentry-module/compare/v7.1.9...v7.1.10) (2023-03-28)\n\n\n### Bug Fixes\n\n* **types:** allow \"false\" in integrations options ([#543](https://github.com/nuxt-community/sentry-module/issues/543)) ([f4ffef2](https://github.com/nuxt-community/sentry-module/commit/f4ffef24f4d9afeb54cee2253a9252e380fa11ca))\n\n### [7.1.9](https://github.com/nuxt-community/sentry-module/compare/v7.1.8...v7.1.9) (2023-03-27)\n\n\n### Bug Fixes\n\n* **types:** restore original client types which have more methods ([#540](https://github.com/nuxt-community/sentry-module/issues/540)) ([16bc644](https://github.com/nuxt-community/sentry-module/commit/16bc644d5bdfb363c9d5fa2f9fd222feea21b2c4))\n\n### [7.1.8](https://github.com/nuxt-community/sentry-module/compare/v7.1.7...v7.1.8) (2023-03-27)\n\n\n### Bug Fixes\n\n* **types:** fix \"any\" type in arguments of config.beforeSend ([#539](https://github.com/nuxt-community/sentry-module/issues/539)) ([b4b5b48](https://github.com/nuxt-community/sentry-module/commit/b4b5b48a35b8e6276758615cafbf9ad7914aeda2))\n\n### [7.1.7](https://github.com/nuxt-community/sentry-module/compare/v7.1.6...v7.1.7) (2023-03-27)\n\n\n### Bug Fixes\n\n* **types:** restore type for process.sentry and improve $sentry types ([#534](https://github.com/nuxt-community/sentry-module/issues/534)) ([ed6fd1c](https://github.com/nuxt-community/sentry-module/commit/ed6fd1cffde640d779c541b494fa9654997ee534))\n\n### [7.1.6](https://github.com/nuxt-community/sentry-module/compare/v7.1.5...v7.1.6) (2023-03-24)\n\n\n### Bug Fixes\n\n* significantly reduce client bundle size ([#532](https://github.com/nuxt-community/sentry-module/issues/532)) ([2297dbc](https://github.com/nuxt-community/sentry-module/commit/2297dbc1a0ce37225877924a0307700ff8eb25e1))\n\n### [7.1.5](https://github.com/nuxt-community/sentry-module/compare/v7.1.4...v7.1.5) (2023-03-24)\n\n\n### Bug Fixes\n\n* **deps:** update sentry sdk to ^7.43.0 ([#522](https://github.com/nuxt-community/sentry-module/issues/522)) ([80de6b9](https://github.com/nuxt-community/sentry-module/commit/80de6b97fca02905a1fbe51ae5c9d0a536aaf5e1))\n* **deps:** update sentry sdk to ^7.44.2 ([#527](https://github.com/nuxt-community/sentry-module/issues/527)) ([82d1f08](https://github.com/nuxt-community/sentry-module/commit/82d1f0821fc7391687675d3e3798666218599ede))\n* **deps:** update sentry sdk to ^7.45.0 ([#531](https://github.com/nuxt-community/sentry-module/issues/531)) ([888b395](https://github.com/nuxt-community/sentry-module/commit/888b395584f8d8f2cd1a4c105946f7c6a944ba11))\n* **tracing:** connect backend and frontend traces ([#529](https://github.com/nuxt-community/sentry-module/issues/529)) ([30c3127](https://github.com/nuxt-community/sentry-module/commit/30c3127be674614ff1528d77084fcc7822489f64))\n\n### [7.1.4](https://github.com/nuxt-community/sentry-module/compare/v7.1.3...v7.1.4) (2023-03-07)\n\n### [7.1.3](https://github.com/nuxt-community/sentry-module/compare/v7.1.2...v7.1.3) (2023-03-07)\n\n\n### Bug Fixes\n\n* **deps:** update sentry dependencies to ^7.41.0 ([#516](https://github.com/nuxt-community/sentry-module/issues/516)) ([b318fc3](https://github.com/nuxt-community/sentry-module/commit/b318fc3fea0309027615e2f384c0c4c211dc3001))\n* **tracing:** initialize server side tracing correctly ([#517](https://github.com/nuxt-community/sentry-module/issues/517)) ([c7eda63](https://github.com/nuxt-community/sentry-module/commit/c7eda637da1c2526963e4a7b310c14f0882a83c2))\n\n### [7.1.2](https://github.com/nuxt-community/sentry-module/compare/v7.1.1...v7.1.2) (2023-03-03)\n\n\n### Bug Fixes\n\n* **deps:** update sentry dependencies to ^7.40.0 ([#515](https://github.com/nuxt-community/sentry-module/issues/515)) ([ce402a4](https://github.com/nuxt-community/sentry-module/commit/ce402a4a3a20758cea5f11b0122b0c86c8e38fdd))\n* **tracing:** automatically instrument server-side requests ([#514](https://github.com/nuxt-community/sentry-module/issues/514)) ([1d96f8b](https://github.com/nuxt-community/sentry-module/commit/1d96f8bb5c85d3c3247b518c97910cf32a8a268b))\n* update list of allowed integrations and allow configuring them ([#513](https://github.com/nuxt-community/sentry-module/issues/513)) ([7933761](https://github.com/nuxt-community/sentry-module/commit/793376171fd00925eb8b09a4cd6d22609513e58d))\n\n### [7.1.1](https://github.com/nuxt-community/sentry-module/compare/v7.1.0...v7.1.1) (2023-02-27)\n\n\n### Bug Fixes\n\n* **deps:** update sentry dependencies to ^7.39.0 ([#509](https://github.com/nuxt-community/sentry-module/issues/509)) ([46324d7](https://github.com/nuxt-community/sentry-module/commit/46324d737736b14f0ecb9d17dc0574c0ec85864c))\n* Windows paths for custom client configuration files ([#510](https://github.com/nuxt-community/sentry-module/issues/510)) ([bdea5fd](https://github.com/nuxt-community/sentry-module/commit/bdea5fd8d42098a5bb03d84c9e00584b40d7e47d))\n\n## [7.1.0](https://github.com/nuxt-community/sentry-module/compare/v7.0.4...v7.1.0) (2023-02-20)\n\n\n### Features\n\n* support HttpClient client integration ([#504](https://github.com/nuxt-community/sentry-module/issues/504)) ([24d4871](https://github.com/nuxt-community/sentry-module/commit/24d48719e3e2550941d2e664be25a4b5ace39c34))\n\n\n### Bug Fixes\n\n* **deps:** update sentry dependencies to ^7.38.0 ([#501](https://github.com/nuxt-community/sentry-module/issues/501)) ([4f8b727](https://github.com/nuxt-community/sentry-module/commit/4f8b727d108d0044c089d0098bcf77e22962e464))\n\n### [7.0.4](https://github.com/nuxt-community/sentry-module/compare/v7.0.3...v7.0.4) (2023-02-17)\n\n\n### Bug Fixes\n\n* apply runtime config last, after merging tracing options ([#499](https://github.com/nuxt-community/sentry-module/issues/499)) ([f434ec4](https://github.com/nuxt-community/sentry-module/commit/f434ec47868b5ad0511f16dc5b50cb4d7760e39c))\n* **deps:** update sentry dependencies to ^7.37.2 ([#493](https://github.com/nuxt-community/sentry-module/issues/493)) ([2306a9f](https://github.com/nuxt-community/sentry-module/commit/2306a9f67ebf10ba808e0abe755e78bf610d9e66))\n* **docs:** use correct yarn upgrade command ([#494](https://github.com/nuxt-community/sentry-module/issues/494)) ([9614795](https://github.com/nuxt-community/sentry-module/commit/9614795af3a5aa9730a2fbf4346f1eb0f7010059))\n\n### [7.0.3](https://github.com/nuxt-community/sentry-module/compare/v7.0.2...v7.0.3) (2023-01-25)\n\n\n### Bug Fixes\n\n* **deps:** update sentry dependencies to ^7.33.0 ([#487](https://github.com/nuxt-community/sentry-module/issues/487)) ([23fc7c1](https://github.com/nuxt-community/sentry-module/commit/23fc7c1c38230a92044b68fc9154c264335283da))\n* don't require webpack dependency at runtime ([#492](https://github.com/nuxt-community/sentry-module/issues/492)) ([db79dd0](https://github.com/nuxt-community/sentry-module/commit/db79dd032e929b7953d7bd621fccc24b9e364a5f))\n\n### [7.0.2](https://github.com/nuxt-community/sentry-module/compare/v7.0.1...v7.0.2) (2023-01-09)\n\n\n### Bug Fixes\n\n* **deps:** update sentry dependencies to ^7.29.0 ([#482](https://github.com/nuxt-community/sentry-module/issues/482)) ([96d7a8c](https://github.com/nuxt-community/sentry-module/commit/96d7a8c257be6f3dd625c80544704d91324f958f))\n* not able to resolve un-hoisted client-side dependencies ([#486](https://github.com/nuxt-community/sentry-module/issues/486)) ([82071ce](https://github.com/nuxt-community/sentry-module/commit/82071cef777de3d92d145c54aa01febb6a07cb9d))\n\n### [7.0.1](https://github.com/nuxt-community/sentry-module/compare/v7.0.0...v7.0.1) (2023-01-03)\n\n\n### Bug Fixes\n\n* more accurate type for `serverConfig` option ([#484](https://github.com/nuxt-community/sentry-module/issues/484)) ([95f9f4f](https://github.com/nuxt-community/sentry-module/commit/95f9f4fcb81d56298d9827add9edee112a814fd8))\n\n## [7.0.0](https://github.com/nuxt-community/sentry-module/compare/v6.0.3...v7.0.0) (2022-12-21)\n\n\n### ⚠ BREAKING CHANGES\n\n* Refer to https://sentry.nuxtjs.org/guide/migration for migration guide.\n\n### Features\n\n* enable tree shaking of Sentry SDK debug code ([#481](https://github.com/nuxt-community/sentry-module/issues/481)) ([c38f666](https://github.com/nuxt-community/sentry-module/commit/c38f66673203d784c1f65a762772fafc5e4bc4be))\n* support plugin path for clientConfig and serverConfig ([#477](https://github.com/nuxt-community/sentry-module/issues/477)) ([63e698a](https://github.com/nuxt-community/sentry-module/commit/63e698aea18d453fae733bc2551d1f185f892860))\n* **tracing:** enable Vue Router instrumentation by default ([#476](https://github.com/nuxt-community/sentry-module/issues/476)) ([acb2aaf](https://github.com/nuxt-community/sentry-module/commit/acb2aaff6fa99cb35875ae61fe6df13154f99454))\n* update Sentry SDK from v6 to v7 ([#461](https://github.com/nuxt-community/sentry-module/issues/461)) ([53bbeec](https://github.com/nuxt-community/sentry-module/commit/53bbeecb74ca11b8228769b7b2f1b02e35db5a3e))\n\n\n### Bug Fixes\n\n* **deps:** update sentry dependencies to ^7.28.0 ([#478](https://github.com/nuxt-community/sentry-module/issues/478)) ([877dce5](https://github.com/nuxt-community/sentry-module/commit/877dce58190d3b63142e42308934702338541b86))\n* gracefully handle Nuxt versions without Runtime Config ([#472](https://github.com/nuxt-community/sentry-module/issues/472)) ([08d7e6c](https://github.com/nuxt-community/sentry-module/commit/08d7e6c8c1f38c519b4ed71bc46b5c39cdb4d89c))\n\n### [6.0.3](https://github.com/nuxt-community/sentry-module/compare/v6.0.2...v6.0.3) (2022-12-13)\n\n\n### Bug Fixes\n\n* **tracing:** autoSessionTracking not working on the server-side ([#466](https://github.com/nuxt-community/sentry-module/issues/466)) ([67851ba](https://github.com/nuxt-community/sentry-module/commit/67851ba55df38ecdf60c8f7a3da57893e6acfc58))\n* incorrect option name in the warning message ([#467](https://github.com/nuxt-community/sentry-module/issues/467)) ([b81b2cf](https://github.com/nuxt-community/sentry-module/commit/b81b2cfb5cbc2055499f5601525f0576b0ff5216))\n* **deps:** update devdependency @sentry/webpack-plugin to ^1.20.0 ([#451](https://github.com/nuxt-community/sentry-module/issues/451)) ([e1fef90](https://github.com/nuxt-community/sentry-module/commit/e1fef907dfd2bae4348c9dcb5285cc0b156c8a78))\n\n### [6.0.2](https://github.com/nuxt-community/sentry-module/compare/v6.0.1...v6.0.2) (2022-12-12)\n\n\n### Bug Fixes\n\n* **tracing:** merge user's tracing configuration ([#463](https://github.com/nuxt-community/sentry-module/issues/463)) ([a567f82](https://github.com/nuxt-community/sentry-module/commit/a567f82ace5a22425c63a807a9736408727227f2))\n\n### [6.0.1](https://github.com/nuxt-community/sentry-module/compare/v6.0.0...v6.0.1) (2022-09-28)\n\n\n### Bug Fixes\n\n* **tracing:** set `tracesSampleRate` when `tracing` enabled ([#448](https://github.com/nuxt-community/sentry-module/issues/448)) ([fe6d511](https://github.com/nuxt-community/sentry-module/commit/fe6d5111726ac8acc250f83de8a0155fea6bff83)), closes [#447](https://github.com/nuxt-community/sentry-module/issues/447)\n\n## [6.0.0](https://github.com/nuxt-community/sentry-module/compare/v5.1.7...v6.0.0) (2022-08-26)\n\n\n### ⚠ BREAKING CHANGES\n\n* The server-side `process.sentry` will be created slightly later than before WHEN running the \"build\" action. It will be created before the pages are built (on `build:compile` hook) while before it was available a bit earlier on `ready` hook (with an issue that it was not always able to pass the project version to Sentry).\n* **options:** Remove deprecated `webpackConfig` option. Configure through the `publishRelease` option instead.\n* **options:** Remove deprecated `attachCommits` and `repo` options. Those can now be set through the `publishRelease` option.\n* **deps:** Don't ship with `@sentry/webpack-plugin` as a dependency. To use the \"publishRelease\" option, it's now necessary to manually install that package as a dev dependency.\n\n### Features\n\n* support for registering external integrations ([#276](https://github.com/nuxt-community/sentry-module/issues/276)) ([2cf56ef](https://github.com/nuxt-community/sentry-module/commit/2cf56ef81344bf5350eca530dc21d9b9044d1419))\n\n\n### Bug Fixes\n\n* **deps:** update devdependency @sentry/webpack-plugin to ^1.19.0 ([#434](https://github.com/nuxt-community/sentry-module/issues/434)) ([694ba04](https://github.com/nuxt-community/sentry-module/commit/694ba041203e10eb2c72679874d897dacaa1cc61))\n* **deps:** update sentry dependencies ([#405](https://github.com/nuxt-community/sentry-module/issues/405)) ([a465f39](https://github.com/nuxt-community/sentry-module/commit/a465f39aa2ae1eff13969fb27fda28c01c316685))\n* throw error instead of logging when @sentry/webpack-plugin missing ([d437a37](https://github.com/nuxt-community/sentry-module/commit/d437a379472e98d4dd660cd9920bb2c1bc578599))\n* use different hook for initializing server-side Sentry instance ([#403](https://github.com/nuxt-community/sentry-module/issues/403)) ([20734fa](https://github.com/nuxt-community/sentry-module/commit/20734fabd9cd9aff5cd4eaa9ad3d69c96b85f6ae))\n* **deps:** Don't ship with `@sentry/webpack-plugin` as a dependency ([#390](https://github.com/nuxt-community/sentry-module/issues/390)) ([b042a46](https://github.com/nuxt-community/sentry-module/commit/b042a469e3effc6f849839c652e404c807e07d8e))\n* **deps:** update dependency @sentry/webpack-plugin to ^1.18.7 ([#392](https://github.com/nuxt-community/sentry-module/issues/392)) ([f72147f](https://github.com/nuxt-community/sentry-module/commit/f72147f4ce22836580e6bcac72a5314bd38c24e2))\n* **deps:** update sentry dependencies ([#388](https://github.com/nuxt-community/sentry-module/issues/388)) ([5251cb6](https://github.com/nuxt-community/sentry-module/commit/5251cb64985c84dbed9841ea70bf5e6cf39ab5e9))\n* **deps:** update sentry dependencies ([#396](https://github.com/nuxt-community/sentry-module/issues/396)) ([7fec526](https://github.com/nuxt-community/sentry-module/commit/7fec526df4afd9b28b61c57d52091bfadc70694f))\n\n\n### Code Refactoring\n\n* **options:** remove deprecated \"attachCommits\" and \"repo\" ([#393](https://github.com/nuxt-community/sentry-module/issues/393)) ([1efcd28](https://github.com/nuxt-community/sentry-module/commit/1efcd2850a117afd5c775b3864912e8552b971a5))\n* **options:** remove deprecated \"webpackConfig\" ([#394](https://github.com/nuxt-community/sentry-module/issues/394)) ([859101e](https://github.com/nuxt-community/sentry-module/commit/859101ec0a17e50ff7c56551a47e9e0fa5b39992))\n\n### [5.1.7](https://github.com/nuxt-community/sentry-module/compare/v5.1.6...v5.1.7) (2022-02-02)\n\n\n### Bug Fixes\n\n* **deps:** update sentry dependencies ([#379](https://github.com/nuxt-community/sentry-module/issues/379)) ([e7db004](https://github.com/nuxt-community/sentry-module/commit/e7db004716e3eeef3e990cd9410cdf68c6575408))\n* don't pass empty object to integrations constructor ([#387](https://github.com/nuxt-community/sentry-module/issues/387)) ([b4b9415](https://github.com/nuxt-community/sentry-module/commit/b4b94151f13d46697efadab80e20574eba3ac968))\n\n### [5.1.6](https://github.com/nuxt-community/sentry-module/compare/v5.1.5...v5.1.6) (2021-11-26)\n\n\n### Bug Fixes\n\n* **deps:** update sentry dependencies to ^6.14.3 ([#367](https://github.com/nuxt-community/sentry-module/issues/367)) ([7a38d27](https://github.com/nuxt-community/sentry-module/commit/7a38d277206739339b8cc703cf18c8e192e205af))\n* **deps:** update sentry dependencies to ^6.15.0 ([#374](https://github.com/nuxt-community/sentry-module/issues/374)) ([77fcf74](https://github.com/nuxt-community/sentry-module/commit/77fcf745c070e8656280dcae6cc3d5b3e1aae11d))\n* don't pass empty object to integrations constructor ([#376](https://github.com/nuxt-community/sentry-module/issues/376)) ([18e12c5](https://github.com/nuxt-community/sentry-module/commit/18e12c59305974e0777bb32bb5c3ad99d7867d06))\n\n### [5.1.5](https://github.com/nuxt-community/sentry-module/compare/v5.1.4...v5.1.5) (2021-11-05)\n\n\n### Bug Fixes\n\n* **deps:** update sentry dependencies ([#355](https://github.com/nuxt-community/sentry-module/issues/355)) ([9d23a87](https://github.com/nuxt-community/sentry-module/commit/9d23a874e389f6e291359ffa30b7891eda0a69e0))\n* **docs:** typo in the lazy-loading section ([#363](https://github.com/nuxt-community/sentry-module/issues/363)) ([dfcc0ab](https://github.com/nuxt-community/sentry-module/commit/dfcc0ab23d00cd6f94a69161bbdde1d1ba427e5b))\n\n### [5.1.4](https://github.com/nuxt-community/sentry-module/compare/v5.1.3...v5.1.4) (2021-10-01)\n\n\n### Bug Fixes\n\n* **deps:** update sentry dependencies to ^6.13.2 ([#345](https://github.com/nuxt-community/sentry-module/issues/345)) ([e51a438](https://github.com/nuxt-community/sentry-module/commit/e51a4388d03461846ebd2c2dacef22cccd7048f6))\n* shutdown Sentry instance after generate ([#353](https://github.com/nuxt-community/sentry-module/issues/353)) ([ee4c293](https://github.com/nuxt-community/sentry-module/commit/ee4c293ba3cd623726250c495901cb88e14299bf))\n\n### [5.1.3](https://github.com/nuxt-community/sentry-module/compare/v5.1.2...v5.1.3) (2021-08-25)\n\n\n### Bug Fixes\n\n* lodash.merge import error on using runtime config ([acfff72](https://github.com/nuxt-community/sentry-module/commit/acfff728c2702f40fea2fb538fe5eeb3cdddfd5c))\n\n### [5.1.2](https://github.com/nuxt-community/sentry-module/compare/v5.1.1...v5.1.2) (2021-08-19)\n\n\n### Bug Fixes\n\n* allow overriding all \"webpackConfig\" options ([#338](https://github.com/nuxt-community/sentry-module/issues/338)) ([bbc46d7](https://github.com/nuxt-community/sentry-module/commit/bbc46d7785c81a6ccce17b836a3ca9f03e29719d))\n* allow overriding all webpackConfig setCommits options ([#337](https://github.com/nuxt-community/sentry-module/issues/337)) ([0ea6cbc](https://github.com/nuxt-community/sentry-module/commit/0ea6cbc0a7796921c875b098a7887ef9dbcaf090))\n* **types:** use BrowserOptions interface for clientConfig option ([#335](https://github.com/nuxt-community/sentry-module/issues/335)) ([1372a28](https://github.com/nuxt-community/sentry-module/commit/1372a283f6f1081499542292863f99b3b6b7d885))\n\n### [5.1.1](https://github.com/nuxt-community/sentry-module/compare/v5.1.0...v5.1.1) (2021-08-10)\n\n\n### Bug Fixes\n\n* **deps:** update sentry dependencies ([#309](https://github.com/nuxt-community/sentry-module/issues/309)) ([844fb57](https://github.com/nuxt-community/sentry-module/commit/844fb57bdb088a91ba08f64c7b6af17bb569ab43))\n\n## [5.1.0](https://github.com/nuxt-community/sentry-module/compare/v5.0.3...v5.1.0) (2021-05-28)\n\n\n### Features\n\n* allow disabling automatic version detection for releases ([#314](https://github.com/nuxt-community/sentry-module/issues/314)) ([e1677fa](https://github.com/nuxt-community/sentry-module/commit/e1677fa74a808e5ab6004f693fd36da4d1b9efef))\n\n\n### Bug Fixes\n\n* serialize regexpes properly in the server-side config ([#308](https://github.com/nuxt-community/sentry-module/issues/308)) ([9e3ae22](https://github.com/nuxt-community/sentry-module/commit/9e3ae221a7d339436abf01fead73228f3175b4d8)), closes [#307](https://github.com/nuxt-community/sentry-module/issues/307)\n* **deps:** update dependency @sentry/webpack-plugin to ^1.15.0 ([#305](https://github.com/nuxt-community/sentry-module/issues/305)) ([a0396b6](https://github.com/nuxt-community/sentry-module/commit/a0396b69ccd1a8d8e2105f874e546ebc95401170))\n* handle commonjs/es import styles for @sentry/cli ([#302](https://github.com/nuxt-community/sentry-module/issues/302)) ([d6a818d](https://github.com/nuxt-community/sentry-module/commit/d6a818dd7ed549537285beb8c44a1276a76fcfb9))\n* **deps:** update sentry dependencies to ^6.2.5 ([#300](https://github.com/nuxt-community/sentry-module/issues/300)) ([faf6f67](https://github.com/nuxt-community/sentry-module/commit/faf6f67300f2ae89124f3a75e9a91db3763fe798))\n* **docs:** fixes typography & content styling ([#288](https://github.com/nuxt-community/sentry-module/issues/288)) ([744bafb](https://github.com/nuxt-community/sentry-module/commit/744bafbeb55741ffeef93c6c62f2d73ef4e93037))\n\n### [5.0.3](https://github.com/nuxt-community/sentry-module/compare/v5.0.2...v5.0.3) (2021-03-18)\n\n\n### Bug Fixes\n\n* crash on lazy loading when using Runtime Config ([#286](https://github.com/nuxt-community/sentry-module/issues/286)) ([074bf77](https://github.com/nuxt-community/sentry-module/commit/074bf77fa5f3a9afdb8c7a198c0a74dd6db416b9))\n\n### [5.0.2](https://github.com/nuxt-community/sentry-module/compare/v5.0.1...v5.0.2) (2021-02-17)\n\n\n### Bug Fixes\n\n* support configuring \"CaptureConsole\" and \"Debug\" integrations ([#275](https://github.com/nuxt-community/sentry-module/issues/275)) ([73c5b12](https://github.com/nuxt-community/sentry-module/commit/73c5b12fcf8e8bd169eaf1fd559808553c2a9f39)), closes [#274](https://github.com/nuxt-community/sentry-module/issues/274)\n\n### [5.0.1](https://github.com/nuxt-community/sentry-module/compare/v5.0.0...v5.0.1) (2021-02-08)\n\n\n### Bug Fixes\n\n* better handling of functions options in config ([#267](https://github.com/nuxt-community/sentry-module/issues/267)) ([341bed5](https://github.com/nuxt-community/sentry-module/commit/341bed57a2abd79b69d0c6474afaaa77b363674f))\n\n## [5.0.0](https://github.com/nuxt-community/sentry-module/compare/v4.5.0...v5.0.0) (2021-01-21)\n\n\n### ⚠ BREAKING CHANGES\n\n* **deps:** This major version release doesn't contain any breaking API/code changes.\nStarting with this version sessions data will be sent by default. See [Release Health](https://docs.sentry.io/product/releases/health/) docs to learn more.\nYou can opt-out of this behavior by setting `autoSessionTracking` option to `false`, for example:\n\n```js\nsentry: {\n  config: {\n    autoSessionTracking: false\n  }\n}\n```\n\n### Features\n\n* Add runtime config support ([#254](https://github.com/nuxt-community/sentry-module/issues/254)) ([7f8b373](https://github.com/nuxt-community/sentry-module/commit/7f8b373a0ec5024fcd2c4ec40b5e01eae8281005))\n\n\n### Bug Fixes\n\n* **deps:** update sentry deps to v6 (major) ([#265](https://github.com/nuxt-community/sentry-module/issues/265)) ([7316f05](https://github.com/nuxt-community/sentry-module/commit/7316f052b7b05cf71826135230085bb4b33c3a5f))\n* **types:** add missing TS types for lazy-loading feature ([#262](https://github.com/nuxt-community/sentry-module/issues/262)) ([4a57102](https://github.com/nuxt-community/sentry-module/commit/4a571023c9779e289d14ae37377321a4cd589fec)), closes [#261](https://github.com/nuxt-community/sentry-module/issues/261)\n* support overriding integrations from @sentry/browser ([#257](https://github.com/nuxt-community/sentry-module/issues/257)) ([ae75bee](https://github.com/nuxt-community/sentry-module/commit/ae75beedccd12e144df8af5f695fda45caa83ff9)), closes [#251](https://github.com/nuxt-community/sentry-module/issues/251)\n\n## [4.5.0](https://github.com/nuxt-community/sentry-module/compare/v4.4.0...v4.5.0) (2020-11-11)\n\n\n### Features\n\n* add support for performance monitoring/tracing ([#250](https://github.com/nuxt-community/sentry-module/issues/250)) ([6a6a3be](https://github.com/nuxt-community/sentry-module/commit/6a6a3be408fbf559ecdcda9db659fcae3c9fdce9)), closes [#224](https://github.com/nuxt-community/sentry-module/issues/224)\n\n\n### Bug Fixes\n\n* **deps:** update sentry dependencies ^5.27.2 -> ^5.27.3 ([#249](https://github.com/nuxt-community/sentry-module/issues/249)) ([c9c4dde](https://github.com/nuxt-community/sentry-module/commit/c9c4dde53342646fbe5e90daeed9900ff8b97246))\n\n## [4.4.0](https://github.com/nuxt-community/sentry-module/compare/v4.3.5...v4.4.0) (2020-11-04)\n\n\n### Features\n\n* allow config to be passed to requestHandler ([#243](https://github.com/nuxt-community/sentry-module/issues/243)) ([9daaf4b](https://github.com/nuxt-community/sentry-module/commit/9daaf4b9d0852f9da7cef5f98b3a362fca21a80c))\n\n### [4.3.5](https://github.com/nuxt-community/sentry-module/compare/v4.3.4...v4.3.5) (2020-09-16)\n\n\n### Bug Fixes\n\n* initialize server-side Sentry when using Nuxt programmatically ([#235](https://github.com/nuxt-community/sentry-module/issues/235)) ([575e4db](https://github.com/nuxt-community/sentry-module/commit/575e4db0b29438494be4f27cb0d710046622e73f)), closes [#230](https://github.com/nuxt-community/sentry-module/issues/230)\n* **deps:** update Sentry dependency from 5.20.1 to 5.23.0 ([#223](https://github.com/nuxt-community/sentry-module/issues/223)) ([9894b02](https://github.com/nuxt-community/sentry-module/commit/9894b02fbe0c8f115b07cd4b8e70992d48e0825e))\n\n### [4.3.4](https://github.com/nuxt-community/sentry-module/compare/v4.3.3...v4.3.4) (2020-08-01)\n\n\n### Bug Fixes\n\n* **lazy:** improve error reporting for postponed global errors ([#220](https://github.com/nuxt-community/sentry-module/issues/220)) ([ecf5d00](https://github.com/nuxt-community/sentry-module/commit/ecf5d006e194cba218bec00f980b651b9c964ded)), closes [/github.com/getsentry/sentry-javascript/blob/9428c9a171a0c6ddcf24935fd03d6492feea0343/packages/browser/src/loader.js#L135-L147](https://github.com/nuxt-community//github.com/getsentry/sentry-javascript/blob/9428c9a171a0c6ddcf24935fd03d6492feea0343/packages/browser/src/loader.js/issues/L135-L147)\n\n### [4.3.3](https://github.com/nuxt-community/sentry-module/compare/v4.3.2...v4.3.3) (2020-07-30)\n\n\n### Bug Fixes\n\n* **lazy:** crash on iterating \"delayedCalls\" ([#219](https://github.com/nuxt-community/sentry-module/issues/219)) ([a3de1cf](https://github.com/nuxt-community/sentry-module/commit/a3de1cfc6d108487d616ebff203805e74bc59301))\n\n### [4.3.2](https://github.com/nuxt-community/sentry-module/compare/v4.3.1...v4.3.2) (2020-07-29)\n\n\n### Bug Fixes\n\n* crash on enabling publishRelease with no \"release\" ([#217](https://github.com/nuxt-community/sentry-module/issues/217)) ([92e7680](https://github.com/nuxt-community/sentry-module/commit/92e7680b533f14459741c238845a80c213f032fb)), closes [#200](https://github.com/nuxt-community/sentry-module/issues/200)\n\n### [4.3.1](https://github.com/nuxt-community/sentry-module/compare/v4.3.0...v4.3.1) (2020-07-29)\n\n\n### Bug Fixes\n\n* crash on running module outside of git repo when release not set ([#216](https://github.com/nuxt-community/sentry-module/issues/216)) ([8b00082](https://github.com/nuxt-community/sentry-module/commit/8b00082d6e209615971b89ec26835409cc975819)), closes [#200](https://github.com/nuxt-community/sentry-module/issues/200)\n\n## [4.3.0](https://github.com/nuxt-community/sentry-module/compare/v4.2.1...v4.3.0) (2020-07-28)\n\n\n### Features\n\n* add types for module configuration ([#213](https://github.com/nuxt-community/sentry-module/issues/213)) ([8236472](https://github.com/nuxt-community/sentry-module/commit/8236472545007c5968a88a6123f1b133c826e87a))\n\n\n### Bug Fixes\n\n* enable console logging of Vue errors in development ([#214](https://github.com/nuxt-community/sentry-module/issues/214)) ([55b7efe](https://github.com/nuxt-community/sentry-module/commit/55b7efedf149627b2ef4252cd83cd8f48da36e45))\n* infer \"config.release\" automatically if not provided ([#205](https://github.com/nuxt-community/sentry-module/issues/205)) ([059f4e9](https://github.com/nuxt-community/sentry-module/commit/059f4e958c3035bd41db875bc282e41660394468))\n\n### [4.2.1](https://github.com/nuxt-community/sentry-module/compare/v4.2.0...v4.2.1) (2020-07-27)\n\n\n### Bug Fixes\n\n* user's integrations options not respected on the client ([#208](https://github.com/nuxt-community/sentry-module/issues/208)) ([b81c7d3](https://github.com/nuxt-community/sentry-module/commit/b81c7d3ec2809e62dbf9d1d04053671dd8e21701)), closes [#207](https://github.com/nuxt-community/sentry-module/issues/207)\n\n## [4.2.0](https://github.com/nuxt-community/sentry-module/compare/v4.1.3...v4.2.0) (2020-07-27)\n\n\n### Features\n\n* support lazy loading of Sentry on the client ([#198](https://github.com/nuxt-community/sentry-module/issues/198)) ([963fead](https://github.com/nuxt-community/sentry-module/commit/963fead523d94661dfc4c597866db66408b7a667)), closes [#127](https://github.com/nuxt-community/sentry-module/issues/127)\n\n### [4.1.3](https://github.com/nuxt-community/sentry-module/compare/v4.1.2...v4.1.3) (2020-07-01)\n\n\n### Bug Fixes\n\n* **deps:** update Sentry dependencies to v5.18.1 ([#194](https://github.com/nuxt-community/sentry-module/issues/194)) ([39304b5](https://github.com/nuxt-community/sentry-module/commit/39304b50052628cab66d9c67ab30e1e132f3f30a))\n\n### [4.1.2](https://github.com/nuxt-community/sentry-module/compare/v4.1.1...v4.1.2) (2020-06-08)\n\n\n### Bug Fixes\n\n* **deps:** update Sentry dependencies to ^5.17.0 ([#189](https://github.com/nuxt-community/sentry-module/issues/189)) ([0f98c51](https://github.com/nuxt-community/sentry-module/commit/0f98c513bdad3dd44f174036197fff8d4688345d))\n\n### [4.1.1](https://github.com/nuxt-community/sentry-module/compare/v4.1.0...v4.1.1) (2020-06-08)\n\n\n### Bug Fixes\n\n* **deps:** move @nuxtjs/eslint-config-typescript to devDependencies ([98bab95](https://github.com/nuxt-community/sentry-module/commit/98bab95b507e587e7cd390326c454b252edfb85f))\n\n## [4.1.0](https://github.com/nuxt-community/sentry-module/compare/v4.0.3...v4.1.0) (2020-06-08)\n\n\n### Features\n\n* add an option to toggle logging of calls on mocked instance ([#187](https://github.com/nuxt-community/sentry-module/issues/187)) ([6a1692e](https://github.com/nuxt-community/sentry-module/commit/6a1692e2332da31ac7becafa34eca76678df11da)), closes [#176](https://github.com/nuxt-community/sentry-module/issues/176)\n\n\n### Bug Fixes\n\n* **deps:** update sentry dependencies to v5.16.1 ([#180](https://github.com/nuxt-community/sentry-module/issues/180)) ([a42035f](https://github.com/nuxt-community/sentry-module/commit/a42035fd149586be293416b2aecac78e9ca49c8a))\n* properly log state of the Sentry reporting ([#186](https://github.com/nuxt-community/sentry-module/issues/186)) ([36fde1a](https://github.com/nuxt-community/sentry-module/commit/36fde1ad3c4259c916bf21e1af05d417846a1958))\n\n### [4.0.3](https://github.com/nuxt-community/sentry-module/compare/v4.0.2...v4.0.3) (2020-05-04)\n\n\n### Bug Fixes\n\n* allow overriding webpackConfig urlPrefix ([#178](https://github.com/nuxt-community/sentry-module/issues/178)) ([c52694e](https://github.com/nuxt-community/sentry-module/commit/c52694ee35c54d6d027f4855815aa5870ba5899e))\n\n### [4.0.2](https://github.com/nuxt-community/sentry-module/compare/v4.0.1...v4.0.2) (2020-04-23)\n\n\n### Bug Fixes\n\n* set public path correctly when building on Windows ([#174](https://github.com/nuxt-community/sentry-module/issues/174)) ([b8b811a](https://github.com/nuxt-community/sentry-module/commit/b8b811a6ce3f3603bcb8d49ec737a6700b4a2f07))\n\n### [4.0.1](https://github.com/nuxt-community/sentry-module/compare/v4.0.0...v4.0.1) (2020-04-15)\n\n## [4.0.0](https://github.com/nuxt-community/sentry-module/compare/v3.3.1...v4.0.0) (2020-03-24)\n\n\n### ⚠ BREAKING CHANGES\n\n* Requires at least Nuxt v2.10.0\n\n### Bug Fixes\n\n* **deps:** update Sentry dependencies to v5.15.0 ([#166](https://github.com/nuxt-community/sentry-module/issues/166)) ([ebea3ca](https://github.com/nuxt-community/sentry-module/commit/ebea3ca5364f5b1499a9f88e4f6873243e514ed0))\n* properly handle publishing when custom webpack config is added ([#167](https://github.com/nuxt-community/sentry-module/issues/167)) ([ca2f680](https://github.com/nuxt-community/sentry-module/commit/ca2f680635996d3cc08ff1783e7cb59af28a91b4))\n\n# Changelog\n\nAll notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.\n\n### [3.3.1](https://github.com/nuxt-community/sentry-module/compare/v3.3.0...v3.3.1) (2020-03-06)\n\n## [3.3.0](https://github.com/nuxt-community/sentry-module/compare/v3.2.4...v3.3.0) (2020-02-27)\n\n\n### Features\n\n* add sourceMapStyle option ([#158](https://github.com/nuxt-community/sentry-module/issues/158)) ([450bf75](https://github.com/nuxt-community/sentry-module/commit/450bf75f6586877f618bc7ad2a0e560e3d3fc861)), closes [#157](https://github.com/nuxt-community/sentry-module/issues/157)\n\n\n### Bug Fixes\n\n* **deps:** update Sentry dependencies to v5.12.5  ([#154](https://github.com/nuxt-community/sentry-module/issues/154)) ([34203a6](https://github.com/nuxt-community/sentry-module/commit/34203a6cf981e8e6b2daaeea4b0acd3957df15f5))\n\n### [3.2.4](https://github.com/nuxt-community/sentry-module/compare/v3.2.3...v3.2.4) (2020-02-14)\n\n\n### Bug Fixes\n\n* released client sourcemaps don't have correct prefix (no /_nuxt/) ([#155](https://github.com/nuxt-community/sentry-module/issues/155)) ([2c8bc83](https://github.com/nuxt-community/sentry-module/commit/2c8bc833d531ca843b4c9bc878ade5b1a49891db))\n\n### [3.2.3](https://github.com/nuxt-community/sentry-module/compare/v3.2.2...v3.2.3) (2020-02-13)\n\n\n### Bug Fixes\n\n* allow string to webpackConfig.include ([#149](https://github.com/nuxt-community/sentry-module/issues/149)) ([146ff20](https://github.com/nuxt-community/sentry-module/commit/146ff206153792d80c9e460d75b60e99d80d581d))\n* don't set urlPrefix for release on server ([#150](https://github.com/nuxt-community/sentry-module/issues/150)) ([8e3e4d1](https://github.com/nuxt-community/sentry-module/commit/8e3e4d1c8289a8abae7337bbca8362da6fc5c1b9))\n* don't use Proxy to avoid problems with IE11 compatibility ([f78d7b6](https://github.com/nuxt-community/sentry-module/commit/f78d7b6a4838b45f4fe5b73ee0a1b0f548018824)), closes [#144](https://github.com/nuxt-community/sentry-module/issues/144)\n* enable source maps on server also ([c71d848](https://github.com/nuxt-community/sentry-module/commit/c71d8488c2b017dcdc2ecdb560b53fe5f4f671f4))\n* release failure with non-standard directory structure ([215c308](https://github.com/nuxt-community/sentry-module/commit/215c30842bcedef18c1d8485f20cdf0293701897)), closes [#132](https://github.com/nuxt-community/sentry-module/issues/132)\n* router.base not taken into account when releasing source maps ([#152](https://github.com/nuxt-community/sentry-module/issues/152)) ([8ffce3a](https://github.com/nuxt-community/sentry-module/commit/8ffce3acc00a0314bed0b168d05ae33597515306)), closes [#105](https://github.com/nuxt-community/sentry-module/issues/105)\n* **types:** add types for process.sentry ([#153](https://github.com/nuxt-community/sentry-module/issues/153)) ([0ff5969](https://github.com/nuxt-community/sentry-module/commit/0ff59695103c613d21956add54c15b12144de526))\n\n### [3.2.2](https://github.com/nuxt-community/sentry-module/compare/v3.2.1...v3.2.2) (2020-02-03)\n\n\n### Bug Fixes\n\n* **types:** use @sentry/minimal instead of @sentry/types ([#142](https://github.com/nuxt-community/sentry-module/issues/142)) ([de1874c](https://github.com/nuxt-community/sentry-module/commit/de1874cc3744052bef702f7c33f484c84b409119))\n\n### [3.2.1](https://github.com/nuxt-community/sentry-module/compare/v3.2.0...v3.2.1) (2020-01-31)\n\n\n### Bug Fixes\n\n* **types:** Make $sentry non-optional since the Proxy is now used when disabled ([238a68d](https://github.com/nuxt-community/sentry-module/commit/238a68d8a540f5410dbb4ffb604d036cef0b8bed))\n\n## [3.2.0](https://github.com/nuxt-community/sentry-module/compare/v3.1.1...v3.2.0) (2020-01-31)\n\n\n### Features\n\n* mock sentry in case it is disabled ([da106ab](https://github.com/nuxt-community/sentry-module/commit/da106ab9c40a37173e0f0b43ab3899c545ef225d))\n\n### [3.0.1](https://github.com/nuxt-community/sentry-module/compare/v3.0.0...v3.0.1) (2019-10-14)\n\n## [3.0.0](https://github.com/nuxt-community/sentry-module/compare/v2.3.2...v3.0.0) (2019-05-12)\n\n### Features\n* sentry 5 update, plugin for server side, ([#72](https://github.com/nuxt-community/sentry-module/issues/72)) ([17322f9](https://github.com/nuxt-community/sentry-module/commit/17322f9))\n\n### Bug Fixes\n\n* fix typo in sentry.client ([#81](https://github.com/nuxt-community/sentry-module/issues/81)) ([77a8f23](https://github.com/nuxt-community/sentry-module/commit/77a8f23))\n* **client:** client not being initialized ([#78](https://github.com/nuxt-community/sentry-module/issues/78)) ([a68f34b](https://github.com/nuxt-community/sentry-module/commit/a68f34b))\n\n## [2.3.2](https://github.com/nuxt-community/sentry-module/compare/v2.3.1...v2.3.2) (2019-04-02)\n\n\n### Bug Fixes\n\n* fix module options ([#59](https://github.com/nuxt-community/sentry-module/issues/59)) ([9b4d723](https://github.com/nuxt-community/sentry-module/commit/9b4d723))\n\n\n\n## [2.3.1](https://github.com/nuxt-community/sentry-module/compare/v2.3.0...v2.3.1) (2019-02-20)\n\n\n\n<a name=\"2.1.0\"></a>\n# [2.1.0](https://github.com/nuxt-community/sentry-module/compare/v2.0.0...v2.1.0) (2018-11-27)\n\n\n### Bug Fixes\n\n* change example of sentry command to valid ([6c9e862](https://github.com/nuxt-community/sentry-module/commit/6c9e862))\n\n\n### Features\n\n* add browser integrations ([8f11ea7](https://github.com/nuxt-community/sentry-module/commit/8f11ea7))\n\n\n\n<a name=\"2.0.0\"></a>\n# [2.0.0](https://github.com/nuxt-community/sentry-module/compare/v1.1.3...v2.0.0) (2018-10-19)\n\n\n### Features\n\n* use new sentry sdk, close [#20](https://github.com/nuxt-community/sentry-module/issues/20), [#30](https://github.com/nuxt-community/sentry-module/issues/30) ([da63340](https://github.com/nuxt-community/sentry-module/commit/da63340))\n\n\n\n<a name=\"1.1.3\"></a>\n## [1.1.3](https://github.com/nuxt-community/sentry-module/compare/v1.1.2...v1.1.3) (2018-09-10)\n\n\n### Bug Fixes\n\n* disabled option, fixes [#29](https://github.com/nuxt-community/sentry-module/issues/29) ([dbb2227](https://github.com/nuxt-community/sentry-module/commit/dbb2227))\n\n\n\n<a name=\"1.1.2\"></a>\n## [1.1.2](https://github.com/nuxt-community/sentry-module/compare/v1.1.1...v1.1.2) (2018-08-17)\n\n\n### Features\n\n* Add new option \"disabled\" ([0a8a047](https://github.com/nuxt-community/sentry-module/commit/0a8a047))\n\n\n\n<a name=\"1.1.1\"></a>\n## [1.1.1](https://github.com/nuxt-community/sentry-module/compare/v1.1.0...v1.1.1) (2018-07-12)\n\n\n### Features\n\n* add fallback for deprecated dns ([#24](https://github.com/nuxt-community/sentry-module/issues/24)) ([9f47f6a](https://github.com/nuxt-community/sentry-module/commit/9f47f6a))\n* updated logging to use consola ([#25](https://github.com/nuxt-community/sentry-module/issues/25)) ([f6abcc8](https://github.com/nuxt-community/sentry-module/commit/f6abcc8))\n\n\n\n<a name=\"1.1.0\"></a>\n# [1.1.0](https://github.com/nuxt-community/sentry-module/compare/v1.0.3...v1.1.0) (2018-06-26)\n\n\n### Features\n\n* capture errors during nuxt generate ([129cb0f](https://github.com/nuxt-community/sentry-module/commit/129cb0f))\n\n\n\n<a name=\"1.0.3\"></a>\n## [1.0.3](https://github.com/nuxt-community/sentry-module/compare/v1.0.2...v1.0.3) (2018-03-22)\n\n\n\n<a name=\"1.0.2\"></a>\n## [1.0.2](https://github.com/nuxt-community/sentry-module/compare/v1.0.1...v1.0.2) (2018-03-18)\n\n\n### Bug Fixes\n\n* env bool now parsed as bool instead of string, close [#13](https://github.com/nuxt-community/sentry-module/issues/13) ([849e1e8](https://github.com/nuxt-community/sentry-module/commit/849e1e8))\n* plugin is not loaded if no keys are provided, fix [#14](https://github.com/nuxt-community/sentry-module/issues/14) ([3e62730](https://github.com/nuxt-community/sentry-module/commit/3e62730))\n\n\n\n<a name=\"1.0.1\"></a>\n## [1.0.1](https://github.com/nuxt-community/sentry-module/compare/v1.0.0...v1.0.1) (2018-01-27)\n\n\n\n<a name=\"1.0.0\"></a>\n# [1.0.0](https://github.com/nuxt-community/sentry-module/compare/v0.2.0...v1.0.0) (2018-01-16)\n\n\n### Features\n\n* Support nuxt 1.0 new hook system ([85bf6d0](https://github.com/nuxt-community/sentry-module/commit/85bf6d0))\n\n\n\n<a name=\"0.2.0\"></a>\n# [0.2.0](https://github.com/nuxt-community/sentry-module/compare/v0.1.1...v0.2.0) (2017-12-13)\n\n\n\n<a name=\"0.1.1\"></a>\n## [0.1.1](https://github.com/nuxt-community/sentry-module/compare/v0.1.0...v0.1.1) (2017-11-28)\n\n\n\n<a name=\"0.1.0\"></a>\n# [0.1.0](https://github.com/nuxt-community/sentry-module/compare/v0.0.2...v0.1.0) (2017-10-24)\n\n\n### Features\n\n* more options ([cbca975](https://github.com/nuxt-community/sentry-module/commit/cbca975))\n\n\n\n<a name=\"0.0.2\"></a>\n## [0.0.2](https://github.com/nuxt-community/sentry-module/compare/v0.0.1...v0.0.2) (2017-10-17)\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) Diederik van den Burger <diederik@webrelated.nl>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "[![@nuxtjs/sentry](docs/static/preview.png)](https://sentry.nuxtjs.org)\n# @nuxtjs/sentry\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![Standard JS][standard-js-src]][standard-js-href]\n\n> [Sentry](http://sentry.io) module for [Nuxt 2](https://v2.nuxt.com/). For [Nuxt 3+](https://nuxt.com/) support see the official [`@sentry/nuxt` module](https://docs.sentry.io/platforms/javascript/guides/nuxt/).\n\n- [✨ &nbsp;Release Notes](https://sentry.nuxtjs.org/releases)\n- [📖 &nbsp;Documentation](https://sentry.nuxtjs.org)\n\n## Contributing\n\n1. Install dependencies with `yarn`.\n2. Run `yarn dev:prepare` to generate stubbed `dist` directory.\n3. Make your changes.\n4. Run `yarn lint` and `yarn test` to verify that there is no issues (consider adding new test for your changes).\n5. Submit a PR.\n\n## License\n\n[MIT License](./LICENSE)\n\n<!-- Badges -->\n[npm-version-src]: https://img.shields.io/npm/dt/@nuxtjs/sentry.svg?style=flat-square\n[npm-version-href]: https://npmjs.com/package/@nuxtjs/sentry\n[npm-downloads-src]: https://img.shields.io/npm/v/@nuxtjs/sentry/latest.svg?style=flat-square\n[npm-downloads-href]: https://npmjs.com/package/@nuxtjs/sentry\n[standard-js-src]: https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square\n[standard-js-href]: https://standardjs.com\n"
  },
  {
    "path": "build.config.ts",
    "content": "import { defineBuildConfig } from 'unbuild'\n\nexport default defineBuildConfig({\n  entries: [\n    {\n      builder: 'mkdist',\n      input: './src/templates/',\n      outDir: './dist/templates',\n      ext: 'js',\n      declaration: false,\n    },\n  ],\n  externals: [\n    '@nuxt/types',\n    '@sentry/browser',\n    '@sentry/cli',\n    '@sentry/core',\n    '@sentry/node',\n    '@sentry/profiling-node',\n    '@sentry/types',\n    '@sentry/webpack-plugin',\n    'consola',\n    'hash-sum',\n    'hookable',\n    'pathe',\n    'webpack',\n    'vuex',\n  ],\n})\n"
  },
  {
    "path": "docs/.gitignore",
    "content": "node_modules\n*.iml\n.idea\n*.log*\n.nuxt\n.vscode\n.DS_Store\ndist\nsw.*\n.env\n"
  },
  {
    "path": "docs/.nvmrc",
    "content": "20\n"
  },
  {
    "path": "docs/README.md",
    "content": "# docs\n\n## Setup\n\nInstall dependencies:\n\n```bash\nyarn install\n```\n\n## Development\n\n```bash\nyarn dev\n```\n\n## Static Generation\n\nThis will create the `dist/` directory for publishing to static hosting:\n\n```bash\nyarn generate\n```\n\nTo preview the static generated app, run `yarn start`\n\nFor detailed explanation on how things work, checkout [nuxt/content](https://content.nuxtjs.org) and [@nuxt/content theme docs](https://content.nuxtjs.org/themes-docs).\n"
  },
  {
    "path": "docs/content/en/configuration/options.md",
    "content": "---\ntitle: Options\ndescription: 'Options can be passed to Sentry using either environment variables'\nposition: 15\ncategory: Configuration\n---\n\n<alert type=\"info\">\n\n  This module is for Nuxt 2. For [Nuxt 3+](https://nuxt.com/) support see the official [`@sentry/nuxt` module](https://docs.sentry.io/platforms/javascript/guides/nuxt/).\n\n</alert>\n\nOptions can be passed using either:\n - environment variables\n - `sentry` object in `nuxt.config.js`\n - when registering the module: `modules: [['@nuxtjs/sentry', {/*options*/}]]`\n\nThe `config`, `serverConfig` and `clientConfig` options can also be configured using [Runtime Config](/configuration/runtime-config).\n\nThe `dsn` is the only option that is required to enable Sentry reporting.\n\n### dsn\n\n- Type: `String`\n- Default: `process.env.SENTRY_DSN || ''`\n- If no `dsn` is provided then Sentry will be initialized using mocked instance to prevent the code that references `$sentry` from crashing. No errors will be reported using that mocked instance.\n\n### lazy\n\n- Type: `Boolean` or `Object`\n- Default: `false`\n- Load Sentry lazily so it's not included in your main bundle\n- If `true` then the default options will be used:\n  ```js\n  {\n    injectMock: true,\n    injectLoadHook: false,\n    mockApiMethods: true,\n    chunkName: 'sentry',\n    webpackPrefetch: false,\n    webpackPreload: false\n  }\n  ```\n- Options:\n  - **injectMock**\n    - Type: `Boolean`\n    - Default: `true`\n    - Whether a Sentry mock needs to be injected that captures any calls to `$sentry` API methods while Sentry has not yet loaded. Captured API method calls are executed once Sentry is loaded\n    > When `injectMock: true` this module will also add a window.onerror listener. If errors are captured before Sentry has loaded then these will be reported once Sentry has loaded using sentry.captureException\n    ```js [pages/index.vue]\n    beforeMount() {\n      // onNuxtReady is called _after_ the Nuxt.js app is fully mounted,\n      // so Sentry is not yet loaded when beforeMount is called\n      // But when you set injectMock: true this call will be captured\n      // and executed after Sentry has loaded\n      this.$sentry.captureMessage('Hello!')\n    },\n    ```\n\n  - **injectLoadHook**\n    - Type: `Boolean`\n    - Default: `false`\n    - By default Sentry will be lazy loaded once `window.onNuxtReady` is called. If you want to explicitly control when Sentry will be loaded you can set `injectLoadHook: true`. The module will inject a `$sentryLoad` method into the Nuxt.js context which you need to call once you are ready to load Sentry\n    ```js [layouts/default.vue]\n    ...\n    mounted() {\n      // Only load Sentry after initial page has fully loaded\n      // (this example should behave similar to using window.onNuxtReady though)\n      this.$nextTick(() => this.$sentryLoad())\n    }\n    ```\n\n  - **mockApiMethods**\n    - Type: `Boolean` or `Array`\n    - Default `true`\n    - Which API methods from `@sentry/vue` should be mocked. You can use this to only mock methods you really use.\n    - This option is ignored when `injectMock: false`\n    - If `mockApiMethods: true` then all available API methods will be mocked\n    > If `injectMock: true` then _captureException_ will always be mocked for use with the window.onerror listener\n    ```js [nuxt.config.js]\n    sentry: {\n      lazy: {\n        mockApiMethods: ['captureMessage']\n      }\n    }\n    ```\n\n    ```js [pages/index.vue]\n    mounted() {\n      this.$sentry.captureMessage('This works!')\n\n      this.$sentry.captureEvent({\n        message: `\n          This will throw an error because\n          captureEvent doesn't exists on the mock\n        `\n      })\n\n      // To circumvent this problem you could use $sentryReady\n      (await this.$sentryReady()).captureEvent({\n        message: `\n          This will not throw an error because\n          captureEvent is only executed after\n          Sentry has been loaded\n        `\n      })\n    }\n    ```\n\n  - **chunkName**\n    - Type: `String`\n    - Default: `'sentry'`\n    - The _webpackChunkName_  to use, see [Webpack Magic Comments](https://webpack.js.org/API/module-methods/#magic-comments)\n\n  - **webpackPrefetch**\n    - Type: `Boolean`\n    - Default: `false`\n    - Whether the Sentry chunk should be prefetched\n\n  - **webpackPreload**\n    - Type: `Boolean`\n    - Default: `false`\n    - Whether the Sentry chunk should be preloaded\n\n### runtimeConfigKey\n\n- Type: `String`\n- Default: `sentry`\n- Specified object in Nuxt config in `publicRuntimeConfig[runtimeConfigKey]` will override some options at runtime. See documentation at https://nuxtjs.org/docs/2.x/configuration-glossary/configuration-runtime-config/\n- Used to define the environment at runtime for example\n- See also [Runtime Config](/configuration/runtime-config) documentation.\n\n### disabled\n\n- Type: `Boolean`\n- Default: `process.env.SENTRY_DISABLED || false`\n- Sentry will not be initialized if set to `true`.\n\n### disableClientSide\n\n- Type: `Boolean`\n- Default: `process.env.SENTRY_DISABLE_CLIENT_SIDE || false`\n\n### disableServerSide\n\n- Type: `Boolean`\n- Default: `process.env.SENTRY_DISABLE_SERVER_SIDE || false`\n\n### initialize\n\n- Type: `Boolean`\n- Default: `process.env.SENTRY_INITIALIZE || true`\n- Can be used to add the `$sentry` object without initializing it, which will result in not reporting errors to Sentry when they happen but not crashing on calling the Sentry APIs.\n\n### logMockCalls\n\n- Type: `Boolean`\n- Default: `true`\n- Whether to log calls to the mocked `$sentry` object in the console\n- Only applies when mocked instance is used (when `disabled`, `disableClientSide` or `disableServerSide` is `true`)\n\n### publishRelease\n\n<alert type=\"info\">\n\n  `@sentry/webpack-plugin@2` package must be installed manually as a dev dependency to be able to publish releases.\n\n</alert>\n\n- Type: `Boolean` or [`SentryWebpackPluginOptions`](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/main/packages/bundler-plugin-core/src/types.ts)\n- Default: `process.env.SENTRY_PUBLISH_RELEASE || false`\n- Enables Sentry releases for better debugging using source maps. Uses [@sentry/webpack-plugin](https://github.com/getsentry/sentry-javascript-bundler-plugins/).\n- Publishing releases requires the organization slug, project name and the Sentry authentication token to be provided. Those can be provided either via an object value or [environment variables or a properties file](https://docs.sentry.io/product/cli/configuration/#sentry-cli-working-with-projects). So for example, when using the object value, you'd set `authToken`, `org` and `project` options, and when using the environment variables you'd set `SENTRY_AUTH_TOKEN`, `SENTRY_ORG` and `SENTRY_PROJECT`.\n- It's recommended to pass an object value to this option rather than using the boolean `true`. When using the boolean, you have to provide all required options through other means mentioned above.\n- The releases are only published when this option is enabled and at the same time you are NOT running in development (`nuxt dev`) mode.\n- See https://docs.sentry.io/workflow/releases for more information. Note that the Sentry CLI options mentioned in the documentation typically have a [@sentry/webpack-plugin](https://github.com/getsentry/sentry-javascript-bundler-plugins/) equivalent.\n\nExample configuration:\n\n```js\nsentry: {\n  // ...\n  publishRelease: {\n    authToken: '<token>',\n    org: 'MyCompany',\n    project: 'my-project',\n    release: {\n      // Attach commits to the release (requires that the build triggered within a git repository).\n      setCommits: {\n        auto: true\n      }\n    }\n  }\n}\n```\n\n- module by default includes all js/map assets generated during the build step.\n\n### sourceMapStyle\n\n- Type: `String`\n- Default: `hidden-source-map`\n- Only has an effect when `publishRelease` is enabled\n- The type of source maps generated when publishing release to Sentry. See https://webpack.js.org/configuration/devtool for a list of available options\n\n### disableServerRelease\n\n- Type: `Boolean`\n- Default: `process.env.SENTRY_DISABLE_SERVER_RELEASE || false`\n- Only has an effect when `publishRelease` is enabled\n- See https://docs.sentry.io/workflow/releases for more information\n\n### disableClientRelease\n\n- Type: `Boolean`\n- Default: `process.env.SENTRY_DISABLE_CLIENT_RELEASE || false`\n- Only has an effect when `publishRelease` is enabled\n- See https://docs.sentry.io/workflow/releases for more information\n\n### clientIntegrations\n\n- Type: `Object`\n- Default:\n  ```js\n  {\n    ExtraErrorData: {},\n    ReportingObserver: { types: ['crash'] },\n  }\n  ```\n- Sentry by default also enables the following browser integrations: `Breadcrumbs`, `Dedupe`, `FunctionToString`, `GlobalHandlers`, `HttpContext`, `InboundFilters`, `LinkedErrors`, `TryCatch`.\n- When `tracing` option is enabled then the [Vue Router Instrumentation](https://docs.sentry.io/platforms/javascript/guides/vue/configuration/integrations/vue-router/) is also enabled.\n- The full list of client integrations that are supported: `Breadcrumbs`, `CaptureConsole`, `ContextLines`, `Debug`, `Dedupe`, `ExtraErrorData`, `FunctionToString`, `GlobalHandlers`, `HttpClient`, `HttpContext`, `InboundFilters`, `LinkedErrors`, `Replay`, `ReportingObserver`, `RewriteFrames`, `TryCatch`.\n- Integration options can be specified in the object value corresponding to the individual integration key.\n- To disable integration that is enabled by default, pass `false` as a value. For example to disable `ExtraErrorData` integration (only) set the option to:\n  ```js\n  {\n    ExtraErrorData: false,\n  }\n  ```\n- See also [Sentry Browser Integrations](https://docs.sentry.io/platforms/javascript/guides/vue/configuration/integrations/) for more information on configuring each integration.\n\n### serverIntegrations\n\n- Type: `Object`\n- Default:\n  ```js\n  {\n    Dedupe: {},\n    ExtraErrorData: {},\n    RewriteFrames: { root: <rootDir> },\n  }\n  ```\n- Sentry by default enables the following server integrations: `Console`, `ContextLines`, `Context`, `FunctionToString`, `Http`,  `InboundFilters`, `LinkedErrors`, `Modules`,`OnUncaughtException`, `OnUnhandledRejection`, `RequestData`.\n- The full list of server integrations that are supported includes the ones above plus: `CaptureConsole`, `Debug`, `Dedupe`, `ExtraErrorData`, `Hapi`, `RewriteFrames`.\n- Integration options can be specified in the object value corresponding to the individual integration key.\n- To disable integration that is enabled by default, pass `false` as a value. For example to disable `ExtraErrorData` integration (only) set the option to:\n  ```js\n  {\n    ExtraErrorData: false,\n  }\n  ```\n- See also [Sentry Server Integrations](https://docs.sentry.io/platforms/node/configuration/integrations/) for more information on configuring each integration.\n\n### customClientIntegrations\n\n- Type: `String`\n- Default: `undefined`\n- This option gives the flexibility to register any custom integration that is not handled internally by the `clientIntegrations` option.\n- The value needs to be a file path (can include [webpack aliases](https://nuxtjs.org/docs/2.x/directory-structure/assets#aliases)) pointing to a javascript file that exports a function returning an array of initialized integrations. The function will be passed a `context` argument which is the Nuxt Context.\n\nFor example:\n```js\nimport SentryRRWeb from '@sentry/rrweb'\n\nexport default function (context) {\n  return [new SentryRRWeb()]\n}\n```\n\n### customServerIntegrations\n\n- Type: `String`\n- Default: `undefined`\n- This option gives the flexibility to register any custom integration that is not handled internally by the `serverIntegrations` option.\n- The value needs to be a file path (can include [webpack aliases](https://nuxtjs.org/docs/2.x/directory-structure/assets#aliases)) pointing to a javascript file that exports a function returning an array of initialized integrations.\n\nFor example:\n```js\nimport MyAwesomeIntegration from 'my-awesome-integration'\n\nexport default function () {\n  return [new MyAwesomeIntegration()]\n}\n```\n\n### tracing\n\n- Type: `Boolean` or `Object`\n- Default: `false`\n\n- Enables Sentry Performance Monitoring on the [server](https://docs.sentry.io/platforms/node/guides/express/performance/) and [browser](https://docs.sentry.io/platforms/javascript/guides/vue/performance/) side.\n- Takes the following object configuration format (default values shown):\n  ```js\n  {\n    tracesSampleRate: 1.0,\n    browserTracing: {},\n    vueOptions: {\n      trackComponents: true,\n    },\n    vueRouterInstrumentationOptions: {\n      routeLabel: 'name',\n    },\n  }\n  ```\n- On the browser side the `BrowserTracing` integration is enabled by default and adds automatic instrumentation for monitoring the performance of the application. See all available [`BrowserTracing` options](https://docs.sentry.io/platforms/javascript/guides/vue/performance/instrumentation/automatic-instrumentation/).\n- The [Vue Router Integration](https://docs.sentry.io/platforms/javascript/guides/vue/configuration/integrations/vue-router/) is also automatically enabled on the browser side and defaults to using route names as labels. [Supported options](https://docs.sentry.io/platforms/javascript/guides/vue/configuration/integrations/vue-router/#configuration) can be passed through the `vueRouterInstrumentationOptions` object.\n- On the browser side extra options for [Tracking Vue components](https://docs.sentry.io/platforms/javascript/guides/vue/features/component-tracking/) can be passed through the `vueOptions` object.\n- On the server side the `Http` integration is enabled to trace HTTP requests and [tracingHandler](https://docs.sentry.io/platforms/node/guides/express/performance/) is enabled to trace `connect` and `express` routes.\n- See also the [Performance Monitoring](/guide/performance) section for more information.\n\n<alert type=\"info\">\n\n  The `tracesSampleRate` value can be between 0.0 and 1.0 (percentage of requests to capture) and Sentry documentation strongly recommends reducing the value from the default 1.0.\n\n</alert>\n\n### config\n\n- Type: `Object`\n- Default:\n  ```js\n  {\n    environment: this.options.dev ? 'development' : 'production'\n  }\n  ```\n- Additional options to pass to the Sentry SDK common to the Server and the Browser SDKs and which are passed to `Sentry.init()`. See Sentry's documentation for [Basic Browser Options](https://docs.sentry.io/platforms/javascript/guides/vue/configuration/options/) and [Basic Server Options](https://docs.sentry.io/platforms/node/configuration/options/).\n- If you need to pass options only to the client or the server SDK instance then use `clientConfig` and `serverConfig` respectively.\n- Note that `config.dsn` is automatically set based on the root `dsn` option.\n- The value for `config.release` is automatically inferred from the local repo unless specified manually.\n- Do not set `config.integrations`, use `clientIntegrations` and `serverIntegrations` options instead.\n\n### serverConfig\n\n- Type: `Object` or `String`\n- Default: `{}`\n- Sentry SDK [Basic Server Options](https://docs.sentry.io/platforms/node/configuration/options/).\n- The specified keys will override common options set in the `config` key.\n- The value can be a string in which case it needs to be a file path (can use [webpack aliases](https://nuxtjs.org/docs/2.x/directory-structure/assets#aliases)) pointing to a javascript file whose default export (a function) returns the configuration object. This is necessary in case some of the options rely on imported values or can't be serialized. The function can be `async`. An artificial example that switches out the `transport`:\n  ```js [nuxt.config.js]\n  sentry: {\n    dsn: '...',\n    serverConfig: '~/config/sentry-server-config.js',\n  }\n  ```\n  ```js [~/config/sentry-server-config.js]\n  import { makeNodeTransport } from '@sentry/node'\n\n  export default function() {\n    return {\n      transport: makeNodeTransport,\n    }\n  }\n  ```\n\n### clientConfig\n\n- Type: `Object` or `String`\n- Default: `{}`\n- Sentry SDK [Basic Browser Options](https://docs.sentry.io/platforms/javascript/guides/vue/configuration/options/).\n- The specified keys will override common options set in the `config` key.\n- The value can be a string in which case it needs to be a file path (can use [webpack aliases](https://nuxtjs.org/docs/2.x/directory-structure/assets#aliases)) pointing to a javascript file whose default export (a function) returns the configuration object. This is necessary in case some of the options rely on imported values or can't be serialized. The function is passed a `Nuxt Context` argument and can be `async`.\n- See an example usage on the [User Feedback](/guide/user-feedback) page.\n\n### requestHandlerConfig\n\n- Type: `Object`\n- Default: `{}`\n- Options passed to `requestHandler` in `@sentry/node`. See: https://docs.sentry.io/platforms/node/guides/express/\n"
  },
  {
    "path": "docs/content/en/configuration/runtime-config.md",
    "content": "---\ntitle: Runtime config\ndescription: \"Load Sentry configuration at runtime\"\nposition: 16\ncategory: Configuration\n---\n\n<alert type=\"info\">\n\n  This module is for Nuxt 2. For [Nuxt 3+](https://nuxt.com/) support see the official [`@sentry/nuxt` module](https://docs.sentry.io/platforms/javascript/guides/nuxt/).\n\n</alert>\n\nDefining options using the [Nuxt Runtime Config](https://nuxtjs.org/docs/2.x/configuration-glossary/configuration-runtime-config/) functionality allows them to be runtime-based rather than build-time based, as is the case by default.\n\nCurrently, only the `config`, `clientConfig` and `serverConfig` [options](/configuration/options) can be configured using the runtime config.\n\nIn the Nuxt configuration file define a `publicRuntimeConfig.sentry` configuration object with settings that will be applied at runtime. For example:\n\n```js [nuxt.config.js]\npublicRuntimeConfig: {\n  sentry: {\n    config: {\n      environment: process.env.SENTRY_ENVIRONMENT\n    },\n    serverConfig: {\n      // Any server-specific config\n    },\n    clientConfig: {\n      // Any client-specific config\n    }\n  }\n}\n```\n\nYou can customize the key that is used to access settings from `publicRuntimeConfig` by setting [`runtimeConfigKey`](/configuration/options#runtimeconfigkey) in the non-runtime options.\n\nThis functionality is supported from Nuxt 2.13 and up.\n"
  },
  {
    "path": "docs/content/en/getting-started/setup.md",
    "content": "---\ntitle: Setup\ndescription: 'Setup the sentry module into Nuxt'\nposition: 10\ncategory: Getting Started\n---\n\n<alert type=\"info\">\n\n  This module is for Nuxt 2. For [Nuxt 3+](https://nuxt.com/) support see the official [`@sentry/nuxt` module](https://docs.sentry.io/platforms/javascript/guides/nuxt/).\n\n</alert>\n\nCheck the [Nuxt.js documentation](https://nuxtjs.org/guides/configuration-glossary/configuration-modules) for more information about installing and using modules in Nuxt.js.\n\n> Nuxt.js v2.16.0+ is required, earlier versions are not supported.\n\n## Installation\n\nAdd `@nuxtjs/sentry` dependency to your project:\n\n<code-group>\n  <code-block label=\"Yarn\" active>\n\n  ```bash\n  yarn add @nuxtjs/sentry\n  ```\n\n  </code-block>\n  <code-block label=\"NPM\">\n\n  ```bash\n  npm install @nuxtjs/sentry\n  ```\n\n  </code-block>\n</code-group>\n\nThen, add `@nuxtjs/sentry` to the `modules` section of `nuxt.config.js` and set your unique `dsn` value:\n\n```js [nuxt.config.js]\n{\n  modules: [\n    '@nuxtjs/sentry'\n  ],\n  sentry: {\n    dsn: '', // Enter your project's DSN.\n    // Additional module options go here.\n  }\n}\n```\n\nSee [Options](/configuration/options) for a list of available options.\n\nNote that the Sentry SDK dependencies (`@sentry/*`) are not pinned and can be updated independently from the module itself by running `npm upgrade @nuxtjs/sentry` or `yarn upgrade @nuxtjs/sentry`. That means you don't have to wait for a new module release if you want to update to the latest SDK version.\n\n## Types\n\nIn Typescript or type-checked JavaScript projects, add `@nuxtjs/sentry` to the `types` array in `tsconfig.json` to enable module types.\n\n```json [tsconfig.json]\n{\n  \"compilerOptions\": {\n    // ...\n    \"types\": [\n      \"@nuxtjs/sentry\"\n    ]\n  }\n}\n```\n\n<alert type=\"info\">\n\n  The otherwise optional package `@sentry/webpack-plugin@2` has to be installed for types to be fully working.\n\n  If not using the relevant functionality (`publishRelease` option is not enabled) then this package can be installed as dev-only dependency.\n\n</alert>\n"
  },
  {
    "path": "docs/content/en/guide/enrich-events.md",
    "content": "---\ntitle: Enriching Events\ndescription: Enriching Reported Events\nposition: 21\ncategory: Guide\n---\n\nSentry SDK provides API for enhancing events that are being reported. For example, you can:\n  - set user information like IP address or username using `Sentry.setUser` API\n  - add custom structured data using `Sentry.setContext` API\n  - set custom key/value pairs (tags) that get indexed and can be used for filtering and searching using `Sentry.setTag` API\n  - add file attachments using `scope.addAttachment` API\n  - manually add breadcrumbs using `Sentry.addBreadcrumb` API\n  - and other...\n\nRead more about [Enriching Events](https://docs.sentry.io/platforms/javascript/guides/vue/enriching-events/).\n"
  },
  {
    "path": "docs/content/en/guide/lazy-loading.md",
    "content": "---\ntitle: Lazy-Loading\ndescription: Load Sentry module lazily on the client\nposition: 22\ncategory: Guide\n---\n\nSet `lazy: true` in your module options to load Sentry lazily on the client. This will prevent Sentry from being included in your main bundle and should result in a faster initial page load.\n\nYou can also pass a lazy config object in your module options (see [options](/configuration/options#lazy) for more information).\n\n<alert type=\"info\">\n\n  Please be aware that lazy loading could prevent some errors that happen early during app loading from being reported and, if `tracing` is enabled, some performance metrics might not be accurate.\n\n</alert>\n\n### Injected properties\n\n#### `$sentry` (mocked)\n- Type: `Object`\n\nNormally `$sentry` would always refer to the `@sentry/vue` API. But if we lazy load Sentry this API wont be available until Sentry has loaded. If you don't want to worry about whether Sentry is loaded or not, a mocked Sentry API is injected into the Nuxt.js context that will execute all Sentry API calls once Sentry is loaded\n\nSee: [`injectMock`](/configuration/options#lazy) and [`mockApiMethods`](/configuration/options#lazy) options.\n\n#### `$sentryReady`\n- Type `Function`\n\nThis method returns a Promise which will be resolved once Sentry has been loaded. You could use this instead of mocking `$sentry`.\n\nExample usage:\n```js\nthis.$sentryReady().then((sentry) => sentry.captureMessage('Erreur!'))\n// or\n(await this.$sentryReady()).captureMessage('Erreur!')\n```\n\n#### `$sentryLoad`\n- Type: `Function`\n\n> Only injected when `injectLoadHook: true`.\n\nThe callback you need to call to indicate that you are ready to load Sentry.\n\nExample usage:\n\n```js [layouts/default.vue]\n  mounted() {\n    // This will only load sentry once an error was thrown\n    // To prevent a chicken & egg issue, make sure to also\n    // set injectMock: true if you use this so the error\n    // that triggered the load will also be captured\n    this.errorListener = () => {\n      this.$sentryLoad()\n      window.removeEventListener('error', this.errorListener)\n    }\n    window.addEventListener('error', this.errorListener)\n  },\n  destroyed() {\n    window.removeEventListener('error', this.errorListener)\n  }\n```\n"
  },
  {
    "path": "docs/content/en/guide/migration.md",
    "content": "---\ntitle: Migration guide\ndescription: Follow this guide to upgrade from one major version to the other.\nposition: 29\ncategory: Guide\n---\n\nFollow this guide to upgrade from one major version to the other.\n\n## Upgrading from v7 to v8\n\nBreaking changes only affect the `publishRelease` and the (related to `publishRelease`) `sourceMapStyle` option.\n\nWhen using the `publishRelease` option, the `@sentry/webpack-plugin` package needs to be updated from version 1.x to 2.x.\n\nThe options supported by the `publishRelease` object have also changed slightly:\n - `configFile`, `dryRun`, `include`, `sourcemap` and `urlPrefix` options are no longer supported.\n - `setCommits` option moved to `release.setCommits`\n - `errorHandler` option signature has changed - see https://sentry.nuxtjs.org/guide/releases\n\nThe default value of the `sourceMapStyle` option has changed from `source-map` to `hidden-source-map` since the new version of the webpack plugin can handle source maps without having to reference them directly in the source files.\n\nYou can also check the [`@sentry/webpack-plugin` official migration guide](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/main/MIGRATION.md#upgrading-to-2x) for more information although not everything mentioned there applies to this module.\n\n## Upgrading from v6 to v7\n\nSentry SDK dependencies updated from v6 to v7. Please read about breaking changes in Sentry SDK's [Upgrading from v6.x to v7.x](https://github.com/getsentry/sentry-javascript/blob/master/MIGRATION.md#upgrading-from-6x-to-7x) document.\n\nSome of the breaking changes listed in that document are automatically handled by the module and don't need any action. Other notable changes that might require action are:\n\n  - The `@sentry/tracing` dependency should be uninstalled, regardless whether `tracing` option is used or not.\n  - The `whitelistUrls` and `blacklistUrls` Sentry `config` (or `clientConfig` / `serverConfig`) options have been renamed to `allowUrls` and `denyUrls`.\n  - The `Vue` integration was removed as is now merged into the Sentry Browser SDK. If you have been passing custom `Vue` options through the `clientIntegrations.Vue` object then those can now be merged directly into the `clientConfig` option (without the parent `Vue` key).\n  - The `UserAgent` integration was renamed to `HttpContext`. If you have been passing custom configuration to that integration through `clientIntegrations` option then you should rename the key.\n"
  },
  {
    "path": "docs/content/en/guide/performance.md",
    "content": "---\ntitle: Performance Monitoring\ndescription: Track performance metrics\nposition: 23\ncategory: Guide\n---\n\nTo automatically configure and enable performance monitoring, enable the [tracing](/configuration/options#tracing) option.\n\nThis enables various additional integrations for monitoring and instrumentation. On the client-side it enables [`BrowserTracing`](https://docs.sentry.io/platforms/javascript/guides/vue/performance/instrumentation/automatic-instrumentation/) and [`Vue Router Instrumentation`](https://docs.sentry.io/platforms/javascript/guides/vue/configuration/integrations/vue-router/) integrations. On the server-side it enables the [`Http` and `tracingHandler`](https://docs.sentry.io/platforms/node/guides/express/performance/instrumentation/automatic-instrumentation/) integrations for tracing HTTP requests and `connect`/`express` routes.\n\nSee the description of the [tracing](/configuration/options#tracing) option if you want to customize some aspect of that functionality like the percentage of requests to capture.\n\n<alert type=\"info\">\n\n  Note that the `tracesSampleRate` value can be between 0.0 and 1.0 (percentage of requests to capture) and Sentry documentation strongly recommends reducing the value from the default 1.0.\n\n</alert>\n\nSee also Sentry's SDK [client](https://docs.sentry.io/platforms/javascript/guides/vue/performance/) and [server](https://docs.sentry.io/platforms/node/guides/express/performance/) Performance Monitoring pages for additional information about those integrations.\n"
  },
  {
    "path": "docs/content/en/guide/profiling.md",
    "content": "---\ntitle: Profiling\ndescription: Node profiling enhances tracing by providing profiles for individual transactions\nposition: 25\ncategory: Guide\n---\n\nNode profiling can be enabled through an integration provided by the `@sentry/profiling-node` dependency that does not come with this module by default.\n\n### Setup\n\nInstall required dependency:\n\n<code-group>\n  <code-block label=\"Yarn\" active>\n\n  ```bash\n  yarn add @sentry/profiling-node\n  ```\n\n  </code-block>\n  <code-block label=\"NPM\">\n\n  ```bash\n  npm install @sentry/profiling-node\n  ```\n\n  </code-block>\n</code-group>\n\nInclude the following options in the module's configuration:\n\n```js [nuxt.config.js]\nsentry: {\n  dsn: '...',\n  tracing: {\n    tracesSampleRate: 1.0,\n  },\n  serverIntegrations: {\n    ProfilingIntegration: {},\n  },\n  serverConfig: {\n    // Set sampling rate for profiling - this is relative to tracesSampleRate\n    profilesSampleRate: 1.0,\n  },\n}\n```\n\n<alert type=\"info\">\n\n  Note that the `tracesSampleRate` value can be between 0.0 and 1.0 (percentage of requests to capture) and Sentry documentation strongly recommends reducing the value from the default 1.0.\n\n</alert>\n\n### Documentation\n\nSee Sentry's [Profiling](https://docs.sentry.io/platforms/node/profiling/) pages for additional information.\n"
  },
  {
    "path": "docs/content/en/guide/releases.md",
    "content": "---\ntitle: Releases\ndescription: Creating and publishing Releases\nposition: 24\ncategory: Guide\n---\n\n> Notifying Sentry of a release enables auto discovery of which commits to associate with a release and identifies what we consider \"the most recent release\" when searching in sentry.io.\n>\n> See Sentry's [Releases](https://docs.sentry.io/product/releases/) for additional information.\n\n\n## Setup\n\nFollow the following steps to create and publish releases to Sentry.\n\n1. Install the `@sentry/webpack-plugin@2` package as a dev dependency.\n2. Enable the [publishRelease](/configuration/options#publishrelease) option. Follow the link for mode detailed explanation of available options.\n\n<alert type=\"info\">\n\n  Releases will only be published during `nuxt build`.\n\n</alert>\n\n## Error handling\n\nOn error during publishing, the build will be interrupted. If you would instead want to ignore errors during publishing, you can modify the behavior by customizing the `publishRelease.errorHandler` option. For example, the following configuration will post a warning to the console instead of interrupting the build:\n\n```js\n{\n    sentry: {\n        publishRelease: {\n            // other options...\n            errorHandler(error) {\n                console.error(`Sentry Release Error: ${error.message}`);\n            },\n        },\n    }\n}\n```\n"
  },
  {
    "path": "docs/content/en/guide/session-replay.md",
    "content": "---\ntitle: Session Replay\ndescription: Record and replay user interactions that lead to an error\nposition: 24\ncategory: Guide\n---\n\nSession Replay helps you get to the root cause of an error or latency issue faster by providing you with a video-like reproduction of what was happening in the user's browser before, during, and after the issue.\n\n### Setup\n\nSession Replay comes as a separate integration that is not enabled by default. To enable it, add `Replay: {}` to the [`clientIntegrations`](/configuration/options#clientintegrations) option like so:\n\n```js [nuxt.config.js]\nsentry: {\n  dsn: '...',\n  clientIntegrations: {\n    Replay: {},\n  },\n  clientConfig: {\n    // This sets the sample rate to be 10%. You may want this to be 100% while\n    // in development and sample at a lower rate in production\n    replaysSessionSampleRate: 0.1,\n    // If the entire session is not sampled, use the below sample rate to sample\n    // sessions when an error occurs.\n    replaysOnErrorSampleRate: 1.0,\n  }\n}\n```\n\nYou can customize integration options by passing them within the `{}` object.\n\n<alert type=\"info\">\n\n  Note that the `replaysSessionSampleRate` and `replaysOnErrorSampleRate` options are part of the global client options and not options of the `Replay` integration itself.\n\n</alert>\n\n<alert type=\"info\">\n\n  Refer to the Sentry documentation below to make sure that Content Security Policy (CSP) is configured properly for allowing `Replay` integration to do its work.\n\n</alert>\n\n### Documentation\n\nSee Sentry's [Session Replay](https://docs.sentry.io/platforms/javascript/guides/vue/session-replay/) pages for additional information.\n"
  },
  {
    "path": "docs/content/en/guide/usage.md",
    "content": "---\ntitle: Usage / API\ndescription: Usage of Sentry in Nuxt\nposition: 20\ncategory: Guide\n---\n\n### Automatic Capturing\n\nOnce enabled, Sentry automatically reports errors, uncaught exceptions and unhandled rejections. No need for further steps, unless you like to report (certain) exceptions manually or have deactivated integrations like `GlobalError`. In this case, find out below how to send reports manually.\n\n### Usage in Vue components\n\nIn a Vue component, `Sentry` is available as `this.$sentry`, so we can call functions like\n\n```js\nthis.$sentry.captureException(new Error('example'))\n```\n\nwhere `this` is a Vue instance.\n\n### Usage in `asyncData`\n\nWhile using Nuxt's `asyncData` method, there's `$sentry` object in the `context` object:\n\n```js\nasync asyncData ({ params, $sentry }) {\n  try {\n    let { data } = await axios.get(`https://my-api/posts/${params.id}`)\n    return { title: data.title }\n  } catch (error) {\n    $sentry.captureException(error)\n  }\n}\n```\n\n### Usage in server middleware\n\nServer Sentry instance is accessible through `process.sentry`.\n\n### Usage in other lifecycle areas\n\nFor the other special Nuxt lifecycle areas like `plugins`, `middleware`, and `nuxtServerInit`, the `$sentry` object is also accessible through the `context` object like so:\n\n```js\nasync nuxtServerInit({ commit }, { $sentry }) {\n  try {\n    let { data } = await axios.get(`https://my-api/timestamp`)\n    commit('setTimeStamp', data)\n  } catch (error) {\n    $sentry.captureException(error)\n  }\n}\n```\n"
  },
  {
    "path": "docs/content/en/guide/user-feedback.md",
    "content": "---\ntitle: User Feedback\ndescription: A feedback dialog for providing additional user information\nposition: 25\ncategory: Guide\n---\n\nWhen a user experiences an error, Sentry provides the ability to collect additional feedback through a feedback dialog.\n\n### Setup\n\n`showReportDialog` is a function that should be called to trigger the User Feedback dialog. Due to how Nuxt works, we can't reference it directly from within Nuxt config as Sentry configuration is strinigified and the function reference does not survive that. We have to use the `clientConfig` option with a path to a custom client configuration that imports the function like so:\n\n```js [nuxt.config.js]\nsentry: {\n  dsn: '...',\n  clientConfig: '~/config/sentry-client-config.js',\n}\n```\n\n```js [~/config/sentry-client-config.js]\nimport { showReportDialog } from '@sentry/vue'\n\nexport default function(context) {\n  return {\n    beforeSend (event, hint) {\n      if (event.exception) {\n        showReportDialog({ eventId: event.event_id })\n      }\n      return event\n    },\n  }\n}\n```\n\n<alert type=\"info\">\n\n  The configuration provided through `clientConfig` is merged with the configuration provided in the Nuxt config so other configuration options can (but don't have to) be defined in Nuxt config.\n\n</alert>\n\n### Documentation\n\nSee Sentry's [User Feedback](https://docs.sentry.io/platforms/javascript/guides/vue/enriching-events/user-feedback/) pages for additional information.\n"
  },
  {
    "path": "docs/content/en/index.md",
    "content": "---\ntitle: Introduction\ndescription: 'Sentry Module for Nuxt'\nposition: 1\ncategory: ''\n---\n\n<alert type=\"info\">\n\n  This module is for Nuxt 2. For [Nuxt 3+](https://nuxt.com/) support see the official [`@sentry/nuxt` module](https://docs.sentry.io/platforms/javascript/guides/nuxt/).\n\n</alert>\n\n<img src=\"/preview.png\" class=\"light-img\" width=\"1280\" height=\"640\" alt=\"\"/>\n<img src=\"/preview-dark.png\" class=\"dark-img\" width=\"1280\" height=\"640\" alt=\"\"/>\n\n[Sentry Module](https://github.com/nuxt-community/sentry-module) for [Nuxt 2](https://v2.nuxt.com/).\n\n## Features\n\nThe module enables error logging through [Sentry](https://sentry.io/).\n\n## More Resources\n\n* [GitHub](https://github.com/nuxt-community/sentry-module)\n* [Releases](https://github.com/nuxt-community/sentry-module/releases)\n* [MIT Licence](https://github.com/nuxt-community/sentry-module/blob/master/LICENSE)\n"
  },
  {
    "path": "docs/content/settings.json",
    "content": "{\n  \"title\": \"Sentry module\",\n  \"url\": \"https://sentry.nuxtjs.org\",\n  \"logo\": {\n    \"light\": \"/logo-light.svg\",\n    \"dark\": \"/logo-dark.svg\"\n  },\n  \"github\": \"nuxt-community/sentry-module\",\n  \"twitter\": \"@nuxt_js\"\n}"
  },
  {
    "path": "docs/nuxt.config.js",
    "content": "import theme from '@nuxt/content-theme-docs'\n\nexport default theme({\n  docs: {\n    primaryColor: '#ae9dff',\n  },\n  modules: [\n    '@nuxtjs/redirect-module',\n  ],\n  redirect: {\n    onDecodeError: (_error, _req, _res, next) => next(),\n    rules: [\n      {\n        from: '^/guide/setup',\n        to: '/getting-started/setup',\n        statusCode: 301,\n      },\n      {\n        from: '^/sentry/lazy-loading',\n        to: '/getting-started/lazy-loading',\n        statusCode: 301,\n      },\n      {\n        from: '^/sentry/options',\n        to: '/configuration/options',\n        statusCode: 301,\n      },\n      {\n        from: '^/sentry/runtime-config',\n        to: '/configuration/runtime-config',\n        statusCode: 301,\n      },\n    ],\n  },\n})\n"
  },
  {
    "path": "docs/package.json",
    "content": "{\n  \"name\": \"docs\",\n  \"version\": \"1.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"nuxt\",\n    \"build\": \"nuxt build\",\n    \"start\": \"nuxt start\",\n    \"generate\": \"nuxt generate\",\n    \"postinstall\": \"patch-package\"\n\n  },\n  \"dependencies\": {\n    \"@nuxt/content-theme-docs\": \"0.11.1\",\n    \"@nuxt/types\": \"^2.18.1\",\n    \"@nuxtjs/redirect-module\": \"^0.3.1\",\n    \"nuxt\": \"2.18.1\",\n    \"patch-package\": \"^8.0.0\"\n  }\n}\n"
  },
  {
    "path": "docs/patches/@nuxtjs+tailwindcss+3.4.3.patch",
    "content": "diff --git a/node_modules/@nuxtjs/tailwindcss/lib/module.js b/node_modules/@nuxtjs/tailwindcss/lib/module.js\nindex c935c0b..0352b28 100644\n--- a/node_modules/@nuxtjs/tailwindcss/lib/module.js\n+++ b/node_modules/@nuxtjs/tailwindcss/lib/module.js\n@@ -56,17 +56,19 @@ module.exports = async function (moduleOptions) {\n     */\n     const { postcss } = nuxt.options.build\n \n-    postcss.preset.stage = 1 // see https://tailwindcss.com/docs/using-with-preprocessors#future-css-features\n-    postcss.plugins = postcss.plugins || {}\n+    postcss.postcssOptions = postcss.postcssOptions || {}\n+    postcss.postcssOptions.preset = postcss.postcssOptions.preset || {}\n+    postcss.postcssOptions.preset.stage = 1 // see https://tailwindcss.com/docs/using-with-preprocessors#future-css-features\n+    postcss.postcssOptions.plugins = postcss.postcssOptions.plugins || {}\n \n     // Let modules extend the tailwind config\n     await nuxt.callHook('tailwindcss:config', tailwindConfig)\n \n     /* istanbul ignore if */\n-    if (Array.isArray(postcss.plugins)) {\n+    if (Array.isArray(postcss.postcssOptions.plugins)) {\n       logger.error('Array syntax for postcss plugins is not supported with v3. Please use the object syntax: https://nuxtjs.org/guides/configuration-glossary/configuration-build#postcss')\n-    } else if (typeof postcss.plugins === 'object') {\n-      postcss.plugins.tailwindcss = tailwindConfig\n+    } else if (typeof postcss.postcssOptions.plugins === 'object') {\n+      postcss.postcssOptions.plugins.tailwindcss = tailwindConfig\n     }\n \n     /*\n"
  },
  {
    "path": "eslint.config.mjs",
    "content": "import base from 'eslint-config-rchl-base'\nimport typescript from 'eslint-config-rchl-typescript'\nimport vue from 'eslint-config-rchl-vue'\n\n/** @type {import('eslint').Linter.Config[]} */\nexport default [\n  {\n    ignores: [\n      '**/.nuxt/',\n      '**/dist/',\n      '**/templates/',\n      'node_modules/',\n    ],\n  },\n  ...base,\n  ...typescript,\n  ...vue,\n  {\n    rules: {\n      '@stylistic/indent': [\n        'error', 2, {\n          SwitchCase: 1,\n        },\n      ],\n      '@stylistic/semi': ['error', 'never'],\n      '@stylistic/space-before-function-paren': ['error', 'always'],\n    },\n  },\n  {\n    files: ['**/*.ts', '**/*.tsx'],\n    rules: {\n      '@stylistic/ts/indent': [\n        'error', 2, {\n          SwitchCase: 1,\n          FunctionDeclaration: { parameters: 'first' },\n          FunctionExpression: { parameters: 'first' },\n          CallExpression: { arguments: 'first' },\n        },\n      ],\n      '@stylistic/ts/member-delimiter-style': [\n        'error', {\n          multiline: {\n            delimiter: 'none',\n          },\n        },\n      ],\n      '@stylistic/ts/semi': ['error', 'never'],\n      '@stylistic/ts/space-before-function-paren': ['error', 'always'],\n    },\n  },\n  {\n    files: ['**/*.vue'],\n    rules: {\n      'vue/html-indent': ['error', 2],\n      'vue/script-indent': ['error', 2, { switchCase: 1 }],\n    },\n  },\n  {\n    files: ['**/.nuxt/*.js'],\n    rules: {\n      '@stylistic/comma-spacing': 'off',\n      '@stylistic/key-spacing': 'off',\n      '@stylistic/object-curly-spacing': 'off',\n      '@stylistic/quote-props': 'off',\n      '@stylistic/quotes': 'off',\n    },\n  },\n]\n"
  },
  {
    "path": "netlify.toml",
    "content": "# https://docs.netlify.com/configure-builds/file-based-configuration\n\n[build]\n  base    = \"docs\"\n  command = \"yarn generate\"\n  publish = \"dist\"\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"@nuxtjs/sentry\",\n  \"version\": \"8.0.8\",\n  \"description\": \"Sentry module for Nuxt.js\",\n  \"repository\": \"nuxt-community/sentry-module\",\n  \"license\": \"MIT\",\n  \"contributors\": [\n    {\n      \"name\": \"Diederik van den Burger <diederik@webrelated.nl>\"\n    },\n    {\n      \"name\": \"Rafal Chlodnicki (@rchl)\"\n    }\n  ],\n  \"publishConfig\": {\n    \"access\": \"public\",\n    \"registry\": \"https://registry.npmjs.org\"\n  },\n  \"type\": \"module\",\n  \"exports\": {\n    \".\": {\n      \"import\": \"./dist/module.mjs\",\n      \"require\": \"./dist/module.cjs\",\n      \"types\": \"./dist/module.d.ts\"\n    }\n  },\n  \"main\": \"./dist/module.cjs\",\n  \"types\": \"./dist/module.d.ts\",\n  \"files\": [\n    \"dist\"\n  ],\n  \"scripts\": {\n    \"build\": \"yarn prepack\",\n    \"prepack\": \"nuxt-module-build build\",\n    \"dev:prepare\": \"nuxt-module-build build --stub\",\n    \"dev:fixture\": \"node ./node_modules/nuxt/bin/nuxt.js -c ./test/fixture/default/nuxt.config\",\n    \"dev:fixture:build\": \"node ./node_modules/nuxt/bin/nuxt.js build -c ./test/fixture/default/nuxt.config\",\n    \"dev:fixture:start\": \"node ./node_modules/nuxt/bin/nuxt.js start -c ./test/fixture/default/nuxt.config\",\n    \"dev:generate\": \"nuxt generate -c ./test/fixture/default/nuxt.config --force-build\",\n    \"analyze\": \"node ./node_modules/nuxt/bin/nuxt.js build --analyze -c ./test/fixture/default/nuxt.config\",\n    \"size\": \"yarn build && cd size-check && yarn build && cd .. && yarn size-limit\",\n    \"lint\": \"eslint .\",\n    \"lint:fix\": \"eslint . --fix\",\n    \"lint:fixture\": \"eslint --no-ignore 'test/fixture/*/.nuxt/sentry.*'\",\n    \"release\": \"release-it\",\n    \"test\": \"yarn prepack && vitest run --poolOptions.threads.singleThread && yarn lint:fixture && yarn typecheck\",\n    \"test:watch\": \"vitest\",\n    \"typecheck\": \"yarn dev:prepare && tsc && tsc -p ./test/tsconfig.json\"\n  },\n  \"lint-staged\": {\n    \"*.{js,ts,vue}\": [\n      \"eslint\"\n    ]\n  },\n  \"husky\": {\n    \"hooks\": {\n      \"pre-commit\": \"lint-staged && npm run typecheck\",\n      \"post-merge\": \"yarn\"\n    }\n  },\n  \"dependencies\": {\n    \"@sentry/core\": \"^7.119.0\",\n    \"@sentry/integrations\": \"^7.114.0\",\n    \"@sentry/node\": \"^7.119.0\",\n    \"@sentry/utils\": \"^7.119.0\",\n    \"@sentry/vue\": \"^7.119.0\",\n    \"consola\": \"^3.2.3\",\n    \"defu\": \"^6.1.4\",\n    \"hash-sum\": \"^2.0.0\",\n    \"jiti\": \"^1.21.0\",\n    \"lodash.mergewith\": \"^4.6.2\",\n    \"mlly\": \"^1.5.0\",\n    \"pathe\": \"^1.1.2\"\n  },\n  \"devDependencies\": {\n    \"@nuxt/module-builder\": \"0.8.3\",\n    \"@nuxt/types\": \"2.18.1\",\n    \"@nuxt/typescript-build\": \"^3.0.2\",\n    \"@nuxtjs/module-test-utils\": \"1.6.3\",\n    \"@release-it/conventional-changelog\": \"8.0.1\",\n    \"@sentry/profiling-node\": \"7.119.0\",\n    \"@sentry/webpack-plugin\": \"2.22.3\",\n    \"@size-limit/file\": \"11.1.4\",\n    \"@types/hash-sum\": \"1.0.2\",\n    \"@types/lodash.mergewith\": \"4.6.9\",\n    \"@types/node\": \"20.16.3\",\n    \"@types/request-promise-native\": \"1.0.21\",\n    \"eslint\": \"^9.12.0\",\n    \"eslint-config-rchl-base\": \"^2.0.3\",\n    \"eslint-config-rchl-typescript\": \"^3.0.2\",\n    \"eslint-config-rchl-vue\": \"^3.0.0\",\n    \"hookable\": \"5.5.3\",\n    \"husky\": \"4.3.8\",\n    \"lint-staged\": \"15.2.10\",\n    \"npm-run-all2\": \"6.2.2\",\n    \"nuxt\": \"2.18.1\",\n    \"playwright-chromium\": \"1.46.1\",\n    \"release-it\": \"17.6.0\",\n    \"sass\": \"1.77.8\",\n    \"sentry-testkit\": \"5.0.9\",\n    \"size-limit\": \"11.1.4\",\n    \"typescript\": \"5.5.4\",\n    \"vitest\": \"2.1.2\",\n    \"vue\": \"2.7.16\",\n    \"vuex\": \"3.6.2\"\n  },\n  \"resolutions\": {\n    \"watchpack\": \"^2.0.0\"\n  }\n}\n"
  },
  {
    "path": "renovate.json",
    "content": "{\n  \"extends\": [\n    \"config:base\",\n    \":prHourlyLimit4\",\n    \":semanticCommitTypeAll(chore)\"\n  ],\n  \"meteor\": {\n    \"enabled\": false\n  },\n  \"lockFileMaintenance\": {\n    \"enabled\": true,\n    \"branchTopic\": \"lock-file-maintenance-{{packageFile}}\",\n    \"commitMessageExtra\": \"({{packageFile}})\"\n  },\n  \"postUpdateOptions\": [\n    \"yarnDedupeFewer\"\n  ],\n  \"rangeStrategy\": \"auto\",\n  \"npm\": {\n    \"commitMessageTopic\": \"{{prettyDepType}} {{depName}}\"\n  },\n  \"packageRules\": [\n    {\n      \"matchPackageNames\": [\n        \"node\"\n      ],\n      \"enabled\": false\n    },\n    {\n      \"groupName\": \"Sentry SDK\",\n      \"matchPackagePatterns\": [\"^@sentry\"],\n      \"matchFiles\": [\"package.json\"],\n      \"rangeStrategy\": \"bump\",\n      \"semanticCommitType\": \"fix\"\n    },\n    {\n      \"groupName\": \"size-limit\",\n      \"matchPackagePatterns\": [\"^@?size-limit\"],\n      \"matchFiles\": [\"package.json\"],\n      \"matchUpdateTypes\": [\n        \"major\"\n      ]\n    },\n    {\n      \"excludePackagePatterns\": [\"^@sentry\"],\n      \"groupName\": \"all non-major dependencies\",\n      \"groupSlug\": \"all-minor-patch\",\n      \"matchFiles\": [\"package.json\"],\n      \"matchUpdateTypes\": [\n        \"minor\",\n        \"patch\"\n      ]\n    },\n    {\n      \"groupName\": \"Docs dependencies\",\n      \"matchFiles\": [\"docs/package.json\"],\n      \"matchUpdateTypes\": [\n        \"minor\",\n        \"patch\"\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": "size-check/base/nuxt.config.cjs",
    "content": "const SentryModule = require('../..')\n\n/** @type {import('@nuxt/types').NuxtConfig} */\nconst config = {\n  rootDir: __dirname,\n  telemetry: false,\n  modules: [\n    /** @type {import('@nuxt/types').Module} */(/** @type {unknown} */(SentryModule)),\n  ],\n  sentry: {\n    dsn: 'https://fe8b7df6ea7042f69d7a97c66c2934f7@sentry.io.nuxt/1429779',\n  },\n}\n\nmodule.exports = config\n"
  },
  {
    "path": "size-check/base/pages/index.vue",
    "content": "<template>\n  <div>\n    <h3>Server-side</h3>\n    <span id=\"server-side\">{{ serverSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span>\n    <h3>Client-side</h3>\n    <span id=\"client-side\">{{ clientSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span>\n    <p>\n      <button id=\"crash-button\" type=\"button\" @click=\"crash_me()\">\n        crash me\n      </button>\n    </p>\n  </div>\n</template>\n\n<script>\nexport default {\n  asyncData ({ $sentry }) {\n    if (process.server) {\n      return {\n        serverSentryPresent: Boolean($sentry?.captureException),\n      }\n    }\n  },\n  data () {\n    return {\n      clientSentryPresent: false,\n      serverSentryPresent: false,\n    }\n  },\n  created () {\n    if (process.client) {\n      this.clientSentryPresent = Boolean(this.$sentry?.captureException)\n    }\n  },\n}\n</script>\n"
  },
  {
    "path": "size-check/lazy/nuxt.config.cjs",
    "content": "const SentryModule = require('../..')\n\n/** @type {import('@nuxt/types').NuxtConfig} */\nconst config = {\n  rootDir: __dirname,\n  telemetry: false,\n  modules: [\n    /** @type {import('@nuxt/types').Module} */(/** @type {unknown} */(SentryModule)),\n  ],\n  sentry: {\n    dsn: 'https://fe8b7df6ea7042f69d7a97c66c2934f7@sentry.io.nuxt/1429779',\n    lazy: true,\n  },\n}\n\nmodule.exports = config\n"
  },
  {
    "path": "size-check/lazy/pages/index.vue",
    "content": "<template>\n  <div>\n    <h3>Server-side</h3>\n    <span id=\"server-side\">{{ serverSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span>\n    <h3>Client-side</h3>\n    <span id=\"client-side\">{{ clientSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span>\n    <p>\n      <button id=\"crash-button\" type=\"button\" @click=\"crash_me()\">\n        crash me\n      </button>\n    </p>\n  </div>\n</template>\n\n<script>\nexport default {\n  asyncData ({ $sentry }) {\n    if (process.server) {\n      return {\n        serverSentryPresent: Boolean($sentry?.captureException),\n      }\n    }\n  },\n  data () {\n    return {\n      clientSentryPresent: false,\n      serverSentryPresent: false,\n    }\n  },\n  created () {\n    if (process.client) {\n      this.clientSentryPresent = Boolean(this.$sentry?.captureException)\n    }\n  },\n}\n</script>\n"
  },
  {
    "path": "size-check/lazy+tracing/nuxt.config.cjs",
    "content": "const SentryModule = require('../..')\n\n/** @type {import('@nuxt/types').NuxtConfig} */\nconst config = {\n  rootDir: __dirname,\n  telemetry: false,\n  modules: [\n    /** @type {import('@nuxt/types').Module} */(/** @type {unknown} */(SentryModule)),\n  ],\n  sentry: {\n    dsn: 'https://fe8b7df6ea7042f69d7a97c66c2934f7@sentry.io.nuxt/1429779',\n    lazy: true,\n    tracing: true,\n  },\n}\n\nmodule.exports = config\n"
  },
  {
    "path": "size-check/lazy+tracing/pages/index.vue",
    "content": "<template>\n  <div>\n    <h3>Server-side</h3>\n    <span id=\"server-side\">{{ serverSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span>\n    <h3>Client-side</h3>\n    <span id=\"client-side\">{{ clientSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span>\n    <p>\n      <button id=\"crash-button\" type=\"button\" @click=\"crash_me()\">\n        crash me\n      </button>\n    </p>\n  </div>\n</template>\n\n<script>\nexport default {\n  asyncData ({ $sentry }) {\n    if (process.server) {\n      return {\n        serverSentryPresent: Boolean($sentry?.captureException),\n      }\n    }\n  },\n  data () {\n    return {\n      clientSentryPresent: false,\n      serverSentryPresent: false,\n    }\n  },\n  created () {\n    if (process.client) {\n      this.clientSentryPresent = Boolean(this.$sentry?.captureException)\n    }\n  },\n}\n</script>\n"
  },
  {
    "path": "size-check/package.json",
    "content": "{\n    \"private\": true,\n    \"scripts\": {\n        \"build\": \"npm-run-all --parallel build:*\",\n        \"build:base\": \"nuxt build -c ./base/nuxt.config\",\n        \"build:replay\": \"nuxt build -c ./replay/nuxt.config\",\n        \"build:tracing\": \"nuxt build -c ./tracing/nuxt.config\",\n        \"build:lazy\": \"nuxt build -c ./lazy/nuxt.config\",\n        \"build:lazy+tracing\": \"nuxt build -c ./lazy+tracing/nuxt.config\",\n        \"build:typescript\": \"nuxt build -c ./typescript/nuxt.config\"\n    }\n}\n"
  },
  {
    "path": "size-check/replay/nuxt.config.cjs",
    "content": "const SentryModule = require('../..')\n\n/** @type {import('@nuxt/types').NuxtConfig} */\nconst config = {\n  rootDir: __dirname,\n  telemetry: false,\n  modules: [\n    /** @type {import('@nuxt/types').Module} */(/** @type {unknown} */(SentryModule)),\n  ],\n  sentry: {\n    dsn: 'https://fe8b7df6ea7042f69d7a97c66c2934f7@sentry.io.nuxt/1429779',\n    clientIntegrations: {\n      // Integration from @Sentry/browser package.\n      TryCatch: { eventTarget: false },\n      Replay: {},\n    },\n\n  },\n}\n\nmodule.exports = config\n"
  },
  {
    "path": "size-check/replay/pages/index.vue",
    "content": "<template>\n  <div>\n    <h3>Server-side</h3>\n    <span id=\"server-side\">{{ serverSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span>\n    <h3>Client-side</h3>\n    <span id=\"client-side\">{{ clientSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span>\n    <p>\n      <button id=\"crash-button\" type=\"button\" @click=\"crash_me()\">\n        crash me\n      </button>\n    </p>\n  </div>\n</template>\n\n<script>\nexport default {\n  asyncData ({ $sentry }) {\n    if (process.server) {\n      return {\n        serverSentryPresent: Boolean($sentry?.captureException),\n      }\n    }\n  },\n  data () {\n    return {\n      clientSentryPresent: false,\n      serverSentryPresent: false,\n    }\n  },\n  created () {\n    if (process.client) {\n      this.clientSentryPresent = Boolean(this.$sentry?.captureException)\n    }\n  },\n}\n</script>\n"
  },
  {
    "path": "size-check/tracing/nuxt.config.cjs",
    "content": "const SentryModule = require('../..')\n\n/** @type {import('@nuxt/types').NuxtConfig} */\nconst config = {\n  rootDir: __dirname,\n  telemetry: false,\n  modules: [\n    /** @type {import('@nuxt/types').Module} */(/** @type {unknown} */(SentryModule)),\n  ],\n  sentry: {\n    dsn: 'https://fe8b7df6ea7042f69d7a97c66c2934f7@sentry.io.nuxt/1429779',\n    tracing: true,\n  },\n}\n\nmodule.exports = config\n"
  },
  {
    "path": "size-check/tracing/pages/index.vue",
    "content": "<template>\n  <div>\n    <h3>Server-side</h3>\n    <span id=\"server-side\">{{ serverSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span>\n    <h3>Client-side</h3>\n    <span id=\"client-side\">{{ clientSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span>\n    <p>\n      <button id=\"crash-button\" type=\"button\" @click=\"crash_me()\">\n        crash me\n      </button>\n    </p>\n  </div>\n</template>\n\n<script>\nexport default {\n  asyncData ({ $sentry }) {\n    if (process.server) {\n      return {\n        serverSentryPresent: Boolean($sentry?.captureException),\n      }\n    }\n  },\n  data () {\n    return {\n      clientSentryPresent: false,\n      serverSentryPresent: false,\n    }\n  },\n  created () {\n    if (process.client) {\n      this.clientSentryPresent = Boolean(this.$sentry?.captureException)\n    }\n  },\n}\n</script>\n"
  },
  {
    "path": "size-check/typescript/config/server.config.ts",
    "content": "import type { ModuleOptions } from '../../../src/types'\n\nexport default function (): ModuleOptions['serverConfig'] {\n  return {\n    beforeSend (event, _hint) {\n      event.extra = {\n        foo: '1',\n      }\n      return event\n    },\n  }\n}\n"
  },
  {
    "path": "size-check/typescript/nuxt.config.ts",
    "content": "import { fileURLToPath } from 'node:url'\nimport initJiti from 'jiti'\nimport type { NuxtConfig } from '@nuxt/types'\n\nconst jiti = initJiti(fileURLToPath(import.meta.url))\n\nconst config: NuxtConfig = {\n  rootDir: __dirname,\n  telemetry: false,\n  buildModules: [\n    '@nuxt/typescript-build',\n  ],\n  modules: [\n    jiti.resolve('../..'),\n  ],\n  sentry: {\n    dsn: 'https://fe8b7df6ea7042f69d7a97c66c2934f7@sentry.io.nuxt/1429779',\n  },\n  typescript: {\n    typeCheck: false,\n  },\n}\n\nexport default config\n"
  },
  {
    "path": "size-check/typescript/pages/index.vue",
    "content": "<template>\n  <div>\n    <h3>Server-side</h3>\n    <span id=\"server-side\">{{ serverSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span>\n    <h3>Client-side</h3>\n    <span id=\"client-side\">{{ clientSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span>\n    <p>\n      <button id=\"crash-button\" type=\"button\" @click=\"crash_me()\">\n        crash me\n      </button>\n    </p>\n  </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\n\nexport default defineComponent({\n  asyncData ({ $sentry, query }) {\n    if (query.crashOnLoad) {\n      // @ts-ignore forces a crash\n      crashOnLoad()\n    }\n\n    if (process.server) {\n      return {\n        serverSentryPresent: Boolean($sentry?.captureException),\n      }\n    }\n  },\n  data () {\n    return {\n      clientSentryPresent: false,\n      serverSentryPresent: false,\n    }\n  },\n  created () {\n    if (process.client) {\n      this.clientSentryPresent = Boolean(this.$sentry?.captureException)\n    }\n  },\n})\n</script>\n"
  },
  {
    "path": "size-check/typescript/tsconfig.json",
    "content": "{\n    \"extends\": \"../../tsconfig.json\",\n    \"compilerOptions\": {\n        \"types\": [\n            \"@nuxt/typescript-build\",\n        ]\n    },\n}\n"
  },
  {
    "path": "src/hooks.ts",
    "content": "import { fileURLToPath } from 'url'\nimport { resolve } from 'path'\nimport { defu } from 'defu'\nimport type { ConsolaInstance } from 'consola'\nimport type { Configuration as WebpackConfig } from 'webpack'\nimport type { SentryWebpackPluginOptions } from '@sentry/webpack-plugin'\nimport type { Options } from '@sentry/types'\nimport * as Sentry from '@sentry/node'\nimport { addPluginTemplate, addTemplate, addWebpackPlugin } from './kit-shim'\nimport type { Nuxt } from './kit-shim'\nimport type { ModuleConfiguration } from './types/configuration'\nimport { clientSentryEnabled, serverSentryEnabled, canInitialize } from './utils'\nimport { resolveRelease, ResolvedClientOptions, resolveClientOptions, ResolvedServerOptions, resolveServerOptions } from './options'\nimport type { SentryHandlerProxy } from './options'\n\nconst RESOLVED_RELEASE_FILENAME = 'sentry.release.config.mjs'\n\nexport async function buildHook (nuxt: Nuxt, moduleOptions: ModuleConfiguration, logger: ConsolaInstance): Promise<void> {\n  const release = await resolveRelease(moduleOptions)\n\n  const templateDir = fileURLToPath(new URL('./templates', import.meta.url))\n\n  const pluginOptionClient = clientSentryEnabled(moduleOptions) && canInitialize(moduleOptions) ? moduleOptions.lazy ? 'lazy' : 'client' : 'mocked'\n  const clientOptions: ResolvedClientOptions = defu({ config: { release } }, await resolveClientOptions(nuxt, moduleOptions, logger))\n  addPluginTemplate({\n    src: resolve(templateDir, `plugin.${pluginOptionClient}.js`),\n    filename: 'sentry.client.js',\n    mode: 'client',\n    options: clientOptions,\n  })\n  if (pluginOptionClient !== 'mocked') {\n    addTemplate({\n      src: resolve(templateDir, 'client.shared.js'),\n      filename: 'sentry.client.shared.js',\n      options: clientOptions,\n    })\n  }\n\n  const pluginOptionServer = serverSentryEnabled(moduleOptions) ? 'server' : 'mocked'\n  const serverOptions: ResolvedServerOptions = defu({ config: { release } }, await resolveServerOptions(nuxt, moduleOptions, logger))\n  addPluginTemplate({\n    src: resolve(templateDir, `plugin.${pluginOptionServer}.js`),\n    filename: 'sentry.server.js',\n    mode: 'server',\n    options: serverOptions,\n  })\n\n  if (serverSentryEnabled(moduleOptions)) {\n    addTemplate({\n      src: resolve(templateDir, 'options.ejs'),\n      filename: RESOLVED_RELEASE_FILENAME,\n      options: { release },\n    })\n  }\n\n  // Tree shake debugging code if not running in dev mode and Sentry debug option is not enabled on the client.\n  if (!clientOptions.dev && !clientOptions.config.debug) {\n    const webpack = await import('webpack').then(m => m.default || m)\n    addWebpackPlugin(new webpack.DefinePlugin({\n      __SENTRY_DEBUG__: 'false',\n    }))\n  }\n}\n\nexport async function webpackConfigHook (nuxt: Nuxt, webpackConfigs: WebpackConfig[], options: ModuleConfiguration, logger: ConsolaInstance): Promise<void> {\n  let WebpackPlugin: typeof import('@sentry/webpack-plugin')\n  try {\n    WebpackPlugin = await import('@sentry/webpack-plugin').then(m => m.default || m)\n  } catch {\n    throw new Error('The \"@sentry/webpack-plugin\" package must be installed as a dev dependency to use the \"publishRelease\" option.')\n  }\n\n  const publishRelease: SentryWebpackPluginOptions = defu(options.publishRelease)\n  if (!publishRelease.sourcemaps) {\n    publishRelease.sourcemaps = {}\n  }\n  if (!publishRelease.sourcemaps.ignore) {\n    publishRelease.sourcemaps.ignore = []\n  }\n  if (!Array.isArray(publishRelease.sourcemaps.ignore)) {\n    publishRelease.sourcemaps.ignore = [publishRelease.sourcemaps.ignore]\n  }\n  if (!publishRelease.release) {\n    publishRelease.release = {}\n  }\n  publishRelease.release.name = publishRelease.release.name || options.config.release || await resolveRelease(options)\n  if (!publishRelease.release.name) {\n    // We've already tried to determine \"release\" manually using Sentry CLI so to avoid webpack plugin crashing, we'll just bail here.\n    logger.warn('Sentry release will not be published because \"config.release\" or \"publishRelease.release.name\" was not set nor it ' +\n                'was possible to determine it automatically from the repository.')\n    return\n  }\n\n  for (const config of webpackConfigs) {\n    config.devtool = options.sourceMapStyle\n    config.plugins = config.plugins || []\n    config.plugins.push(WebpackPlugin.sentryWebpackPlugin(publishRelease))\n  }\n}\n\nexport async function initializeServerSentry (nuxt: Nuxt, moduleOptions: ModuleConfiguration, sentryHandlerProxy: SentryHandlerProxy, logger: ConsolaInstance): Promise<void> {\n  if (process.sentry) {\n    return\n  }\n\n  let release: string | undefined\n  try {\n    const path = resolve(nuxt.options.buildDir, RESOLVED_RELEASE_FILENAME)\n    release = (await import(path)).release\n  } catch {\n    // Ignored\n  }\n\n  const serverOptions = await resolveServerOptions(nuxt, moduleOptions, logger)\n  const config: Options = defu({ release }, serverOptions.config)\n\n  process.sentry = Sentry\n\n  if (canInitialize(moduleOptions)) {\n    Sentry.init(config)\n    sentryHandlerProxy.errorHandler = Sentry.Handlers.errorHandler()\n    sentryHandlerProxy.requestHandler = Sentry.Handlers.requestHandler(moduleOptions.requestHandlerConfig)\n    if (serverOptions.tracing) {\n      sentryHandlerProxy.tracingHandler = Sentry.Handlers.tracingHandler()\n    }\n  }\n}\n\nexport async function shutdownServerSentry (): Promise<void> {\n  if (process.sentry) {\n    await process.sentry.close()\n    // @ts-expect-error not mutable in types\n    process.sentry = undefined\n  }\n}\n"
  },
  {
    "path": "src/kit-shim.ts",
    "content": "// Shim created based on v3.2.3 of @nuxt/kit\n\nimport { existsSync } from 'node:fs'\nimport { consola } from 'consola'\nimport { defu } from 'defu'\nimport hash from 'hash-sum'\nimport { basename, parse, normalize, resolve } from 'pathe'\nimport { resolveAlias as _resolveAlias } from 'pathe/utils'\nimport type { Hookable } from 'hookable'\nimport type { WebpackPluginInstance, Configuration as WebpackConfig } from 'webpack'\nimport type { NuxtOptions } from '@nuxt/types'\n\ntype NuxtHooks = Record<string, any>\nexport interface Nuxt {\n  /** The resolved Nuxt configuration. */\n  options: NuxtOptions\n  hooks: Hookable<NuxtHooks>\n  hook: Nuxt['hooks']['hook']\n  callHook: Nuxt['hooks']['callHook']\n  addHooks: Nuxt['hooks']['addHooks']\n  ready: () => Promise<void>\n  close: () => Promise<void>\n  /** The production or development server. */\n  server?: any\n  vfs: Record<string, string>\n}\n\ninterface ModuleMeta {\n  /** Module name. */\n  name?: string\n  /** Module version. */\n  version?: string\n  /**\n     * The configuration key used within `nuxt.config` for this module's options.\n     * For example, `@nuxtjs/axios` uses `axios`.\n     */\n  configKey?: string\n}\n/** The options received.  */\ntype ModuleOptions = Record<string, any>\ntype Awaitable<T> = T | Promise<T>\n/** Input module passed to defineNuxtModule. */\ninterface ModuleDefinition<T extends ModuleOptions = ModuleOptions> {\n  meta?: ModuleMeta\n  defaults?: T | ((nuxt: Nuxt) => T)\n  schema?: T\n  hooks?: Partial<NuxtHooks>\n  setup?: (this: void, resolvedOptions: T, nuxt: Nuxt) => Awaitable<void>\n}\nexport interface NuxtModule<T extends ModuleOptions = ModuleOptions> {\n  (this: void, inlineOptions: T, nuxt: Nuxt): void\n  getOptions?: (inlineOptions?: T, nuxt?: Nuxt) => Promise<T>\n  getMeta?: () => Promise<ModuleMeta>\n}\n\n/** Direct access to the Nuxt context - see https://github.com/unjs/unctx. */\nexport const nuxtCtx: { value: Nuxt | null } = {\n  value: null,\n}\n\n// TODO: Use use/tryUse from unctx. https://github.com/unjs/unctx/issues/6\n\n/**\n * Get access to Nuxt instance.\n *\n * Throws an error if Nuxt instance is unavailable.\n *\n * @example\n * ```js\n * const nuxt = useNuxt()\n * ```\n */\nexport function useNuxt (): Nuxt {\n  const instance = nuxtCtx.value\n  if (!instance) {\n    throw new Error('Nuxt instance is unavailable!')\n  }\n  return instance\n}\n\n/**\n * Get access to Nuxt instance.\n *\n * Returns null if Nuxt instance is unavailable.\n *\n * @example\n * ```js\n * const nuxt = tryUseNuxt()\n * if (nuxt) {\n *  // Do something\n * }\n * ```\n */\nexport function tryUseNuxt (): Nuxt | null {\n  return nuxtCtx.value\n}\n\n// -- Nuxt 2 compatibility shims --\nconst NUXT2_SHIMS_KEY = '__nuxt2_shims_sentry_key__'\nfunction nuxt2Shims (nuxt: Nuxt): void {\n  // Avoid duplicate install and only apply to Nuxt2\n  // @ts-expect-error nuxt2\n  if (!isNuxt2(nuxt) || nuxt[NUXT2_SHIMS_KEY]) {\n    return\n  }\n  // @ts-expect-error nuxt2\n  nuxt[NUXT2_SHIMS_KEY] = true\n\n  // Allow using nuxt.hooks\n  // @ts-expect-error Nuxt 2 extends hookable\n  nuxt.hooks = nuxt\n\n  // Allow using useNuxt()\n  if (!nuxtCtx.value) {\n    nuxtCtx.value = nuxt\n    nuxt.hook('close', () => {\n      nuxtCtx.value = null\n    })\n  }\n}\n\nexport function defineNuxtModule<OptionsT extends ModuleOptions> (definition: ModuleDefinition<OptionsT>): NuxtModule<OptionsT> {\n  // Normalize definition and meta\n  if (!definition.meta) {\n    definition.meta = {}\n  }\n  if (definition.meta.configKey === undefined) {\n    definition.meta.configKey = definition.meta.name\n  }\n\n  // Resolves module options from inline options, [configKey] in nuxt.config, defaults and schema\n  function getOptions (inlineOptions?: OptionsT): Promise<OptionsT> {\n    const nuxt = useNuxt()\n    const configKey = definition.meta!.configKey || definition.meta!.name!\n    const _defaults = definition.defaults instanceof Function ? definition.defaults(nuxt) : definition.defaults\n    const _options = defu(inlineOptions, nuxt.options[configKey as keyof NuxtOptions], _defaults) as OptionsT\n    return Promise.resolve(_options)\n  }\n\n  // Module format is always a simple function\n  async function normalizedModule (this: any, inlineOptions: OptionsT): Promise<any> {\n    const nuxt = this.nuxt\n\n    // Avoid duplicate installs\n    const uniqueKey = definition.meta!.name || definition.meta!.configKey\n    if (uniqueKey) {\n      nuxt.options._requiredModules = nuxt.options._requiredModules || {}\n      if (nuxt.options._requiredModules[uniqueKey]) {\n        return false\n      }\n      nuxt.options._requiredModules[uniqueKey] = true\n    }\n\n    // Nuxt 3 shims\n    nuxt2Shims(nuxt)\n\n    // Resolve module and options\n    const _options = await getOptions(inlineOptions)\n    const res = await definition.setup?.call(null as any, _options, nuxt) ?? {}\n\n    // Return module install result\n    return defu(res, {})\n  }\n\n  // Define getters for options and meta\n  normalizedModule.getMeta = () => Promise.resolve(definition.meta)\n  normalizedModule.getOptions = getOptions\n\n  return normalizedModule as NuxtModule<OptionsT>\n}\n\nexport const logger = consola\n\nexport function useLogger (tag?: string): typeof consola {\n  return tag ? logger.withTag(tag) : logger\n}\n\nexport function isNuxt2 (): boolean {\n  return true\n}\n\ninterface NuxtTemplate<Options = Record<string, any>> {\n  /** resolved output file path (generated) */\n  dst?: string\n  /** The target filename once the template is copied into the Nuxt buildDir */\n  filename?: string\n  /** An options object that will be accessible within the template via `<% options %>` */\n  options?: Options\n  /** The resolved path to the source file to be template */\n  src?: string\n  /** Provided compile option instead of src */\n  getContents?: (data: Options) => string | Promise<string>\n  /** Write to filesystem */\n  write?: boolean\n}\ninterface ResolvedNuxtTemplate<Options = Record<string, any>> extends NuxtTemplate<Options> {\n  filename: string\n  dst: string\n}\ninterface NuxtPlugin {\n  /** @deprecated use mode */\n  ssr?: boolean\n  src: string\n  mode?: 'all' | 'server' | 'client'\n}\ntype _TemplatePlugin<Options> = Omit<NuxtPlugin, 'src'> & NuxtTemplate<Options>\n\ninterface NuxtPluginTemplate<Options = Record<string, any>> extends _TemplatePlugin<Options> {}\n\n/**\n * Resolve path aliases respecting Nuxt alias options\n */\nexport function resolveAlias (path: string, alias?: Record<string, string>): string {\n  if (!alias) {\n    alias = tryUseNuxt()?.options.alias || {}\n  }\n  return _resolveAlias(path, alias)\n}\n\n/**\n * Normalize a nuxt plugin object\n */\nexport function normalizePlugin (plugin: NuxtPlugin | string): NuxtPlugin {\n  // Normalize src\n  if (typeof plugin === 'string') {\n    plugin = { src: plugin }\n  } else {\n    plugin = { ...plugin }\n  }\n\n  if (!plugin.src) {\n    throw new Error('Invalid plugin. src option is required: ' + JSON.stringify(plugin))\n  }\n\n  // TODO: only scan top-level files #18418\n  const nonTopLevelPlugin = plugin.src.match(/\\/plugins\\/[^/]+\\/index\\.[^/]+$/i)\n  if (nonTopLevelPlugin && nonTopLevelPlugin.length > 0 && !useNuxt().options.plugins.find(i => (typeof i === 'string' ? i : i.src).endsWith(nonTopLevelPlugin[0]))) {\n    console.warn(`[warn] [nuxt] [deprecation] You are using a plugin that is within a subfolder of your plugins directory without adding it to your config explicitly. You can move it to the top-level plugins directory, or include the file '~${nonTopLevelPlugin[0]}' in your plugins config (https://nuxt.com/docs/api/configuration/nuxt-config#plugins-1) to remove this warning.`)\n  }\n\n  // Normalize full path to plugin\n  plugin.src = normalize(resolveAlias(plugin.src))\n\n  // Normalize mode\n  if (plugin.ssr) {\n    plugin.mode = 'server'\n  }\n  if (!plugin.mode) {\n    const [, mode = 'all'] = plugin.src.match(/\\.(server|client)(\\.\\w+)*$/) || []\n    plugin.mode = mode as 'all' | 'client' | 'server'\n  }\n\n  return plugin\n}\n\n/**\n * Registers a nuxt plugin and to the plugins array.\n *\n * Note: You can use mode or .client and .server modifiers with fileName option\n * to use plugin only in client or server side.\n *\n * Note: By default plugin is prepended to the plugins array. You can use second argument to append (push) instead.\n *\n * @example\n * ```js\n * addPlugin({\n *   src: path.resolve(__dirname, 'templates/foo.js'),\n *   filename: 'foo.server.js' // [optional] only include in server bundle\n * })\n * ```\n */\nexport interface AddPluginOptions { append?: boolean }\nexport function addPlugin (_plugin: NuxtPlugin | string, opts: AddPluginOptions = {}): NuxtPlugin {\n  const nuxt = useNuxt()\n\n  // Normalize plugin\n  const plugin = normalizePlugin(_plugin)\n\n  // Remove any existing plugin with the same src\n  nuxt.options.plugins = nuxt.options.plugins.filter(p => normalizePlugin(p).src !== plugin.src)\n\n  // Prepend to array by default to be before user provided plugins since is usually used by modules\n  nuxt.options.plugins[opts.append ? 'push' : 'unshift'](plugin)\n\n  return plugin\n}\n\n/**\n * Adds a template and registers as a nuxt plugin.\n */\nexport function addPluginTemplate (plugin: NuxtPluginTemplate | string, opts: AddPluginOptions = {}): NuxtPlugin {\n  const normalizedPlugin: NuxtPlugin = typeof plugin === 'string'\n    ? { src: plugin }\n    // Update plugin src to template destination\n    : { ...plugin, src: addTemplate(plugin).dst! }\n\n  return addPlugin(normalizedPlugin, opts)\n}\n\n/**\n * Renders given template using lodash template during build into the project buildDir\n */\nexport function addTemplate (_template: NuxtTemplate<any> | string): ResolvedNuxtTemplate<any> {\n  const nuxt = useNuxt()\n\n  // Normalize template\n  const template = normalizeTemplate(_template)\n\n  // Remove any existing template with the same filename\n  nuxt.options.build.templates = (nuxt.options.build.templates as any[])\n    .filter(p => normalizeTemplate(p).filename !== template.filename)\n\n  // Add to templates array\n  nuxt.options.build.templates.push(template)\n\n  return template\n}\n\n/**\n * Normalize a nuxt template object\n */\nexport function normalizeTemplate (template: NuxtTemplate<any> | string): ResolvedNuxtTemplate<any> {\n  if (!template) {\n    throw new Error('Invalid template: ' + JSON.stringify(template))\n  }\n\n  // Normalize\n  if (typeof template === 'string') {\n    template = { src: template }\n  } else {\n    template = { ...template }\n  }\n\n  // Use src if provided\n  if (template.src) {\n    if (!existsSync(template.src)) {\n      throw new Error('Template not found: ' + template.src)\n    }\n    if (!template.filename) {\n      const srcPath = parse(template.src)\n      template.filename = (template as any).fileName ||\n        `${basename(srcPath.dir)}.${srcPath.name}.${hash(template.src)}${srcPath.ext}`\n    }\n  }\n\n  if (!template.src && !template.getContents) {\n    throw new Error('Invalid template. Either getContents or src options should be provided: ' + JSON.stringify(template))\n  }\n\n  if (!template.filename) {\n    throw new Error('Invalid template. Either filename should be provided: ' + JSON.stringify(template))\n  }\n\n  // Always write declaration files\n  if (template.filename.endsWith('.d.ts')) {\n    template.write = true\n  }\n\n  // Resolve dst\n  if (!template.dst) {\n    const nuxt = useNuxt()\n    template.dst = resolve(nuxt.options.buildDir, template.filename)\n  }\n\n  return template as ResolvedNuxtTemplate<any>\n}\n\ninterface ExtendConfigOptions {\n  /**\n   * Install plugin on dev\n   *\n   * @default true\n   */\n  dev?: boolean\n  /**\n    * Install plugin on build\n    *\n    * @default true\n    */\n  build?: boolean\n  /**\n   * Install plugin on server side\n   *\n   * @default true\n   */\n  server?: boolean\n  /**\n   * Install plugin on client side\n   *\n   * @default true\n   */\n  client?: boolean\n}\n\ninterface ExtendWebpackConfigOptions extends ExtendConfigOptions {}\n\n/**\n * Append webpack plugin to the config.\n */\nexport function addWebpackPlugin (plugin: WebpackPluginInstance | WebpackPluginInstance[], options?: ExtendWebpackConfigOptions): void {\n  extendWebpackConfig((config) => {\n    config.plugins = config.plugins || []\n    if (Array.isArray(plugin)) {\n      config.plugins.push(...plugin)\n    } else {\n      config.plugins.push(plugin)\n    }\n  }, options)\n}\n\n/**\n * Extend webpack config\n *\n * The fallback function might be called multiple times\n * when applying to both client and server builds.\n */\nexport function extendWebpackConfig (\n  fn: ((config: WebpackConfig) => void),\n  options: ExtendWebpackConfigOptions = {},\n): void {\n  const nuxt = useNuxt()\n\n  if (options.dev === false && nuxt.options.dev) {\n    return\n  }\n  if (options.build === false && nuxt.options.build) {\n    return\n  }\n\n  nuxt.hook('webpack:config', (configs: WebpackConfig[]) => {\n    if (options.server !== false) {\n      const config = configs.find(i => i.name === 'server')\n      if (config) {\n        fn(config)\n      }\n    }\n    if (options.client !== false) {\n      const config = configs.find(i => i.name === 'client')\n      if (config) {\n        fn(config)\n      }\n    }\n  })\n}\n"
  },
  {
    "path": "src/module.ts",
    "content": "import { fileURLToPath } from 'node:url'\nimport { defu } from 'defu'\nimport { resolvePath } from 'mlly'\nimport type { SentryWebpackPluginOptions } from '@sentry/webpack-plugin'\nimport { captureException, withScope } from '@sentry/node'\nimport type { Configuration as WebpackConfig } from 'webpack'\nimport { defineNuxtModule, isNuxt2, useLogger } from './kit-shim'\nimport { envToBool, boolToText, callOnce, canInitialize, clientSentryEnabled, serverSentryEnabled } from './utils'\nimport { buildHook, initializeServerSentry, shutdownServerSentry, webpackConfigHook } from './hooks'\nimport type { SentryHandlerProxy } from './options'\nimport type { ModuleConfiguration, ModuleOptions, ModulePublicRuntimeConfig } from './types'\n\nexport type { ModuleOptions, ModulePublicRuntimeConfig }\n\nconst logger = useLogger('nuxt:sentry')\n\nconst moduleDir = fileURLToPath(new URL('./', import.meta.url))\n\nexport default defineNuxtModule<ModuleConfiguration>({\n  meta: {\n    name: '@nuxtjs/sentry',\n    configKey: 'sentry',\n  },\n  defaults: nuxt => ({\n    lazy: false,\n    dsn: process.env.SENTRY_DSN || '',\n    disabled: envToBool(process.env.SENTRY_DISABLED) || false,\n    initialize: envToBool(process.env.SENTRY_INITIALIZE) || true,\n    runtimeConfigKey: 'sentry',\n    disableClientSide: envToBool(process.env.SENTRY_DISABLE_CLIENT_SIDE) || false,\n    disableServerSide: envToBool(process.env.SENTRY_DISABLE_SERVER_SIDE) || false,\n    publishRelease: envToBool(process.env.SENTRY_PUBLISH_RELEASE) || false,\n    disableServerRelease: envToBool(process.env.SENTRY_DISABLE_SERVER_RELEASE) || false,\n    disableClientRelease: envToBool(process.env.SENTRY_DISABLE_CLIENT_RELEASE) || false,\n    logMockCalls: true,\n    sourceMapStyle: 'hidden-source-map',\n    tracing: false,\n    clientIntegrations: {\n      ExtraErrorData: {},\n      ReportingObserver: { types: ['crash'] },\n    },\n    serverIntegrations: {\n      Dedupe: {},\n      ExtraErrorData: {},\n      RewriteFrames: { root: nuxt.options.rootDir },\n    },\n    customClientIntegrations: '',\n    customServerIntegrations: '',\n    config: {\n      environment: nuxt.options.dev ? 'development' : 'production',\n    },\n    serverConfig: {},\n    clientConfig: {},\n    requestHandlerConfig: {},\n  }),\n  async setup (options, nuxt) {\n    const defaultsPublishRelease: SentryWebpackPluginOptions = {\n      sourcemaps: {\n        ignore: [\n          'node_modules/**/*',\n        ],\n      },\n    }\n\n    if (options.publishRelease) {\n      options.publishRelease = defu(options.publishRelease, defaultsPublishRelease)\n    }\n\n    if (canInitialize(options) && (clientSentryEnabled(options) || serverSentryEnabled(options))) {\n      const status = `(client side: ${boolToText(clientSentryEnabled(options))}, server side: ${boolToText(serverSentryEnabled(options))})`\n      logger.success(`Sentry reporting is enabled ${status}`)\n    } else {\n      let why: string\n      if (options.disabled) {\n        why = '\"disabled\" option has been set'\n      } else if (!options.dsn) {\n        why = 'no DSN has been provided'\n      } else if (!options.initialize) {\n        why = '\"initialize\" option has been set to false'\n      } else {\n        why = 'both client and server side clients are disabled'\n      }\n      logger.info(`Sentry reporting is disabled (${why})`)\n    }\n\n    // Work-around issues with Nuxt not being able to resolve unhoisted dependencies that are imported in webpack context.\n    const aliasedDependencies = [\n      'lodash.mergewith',\n      '@sentry/browser',\n      '@sentry/core',\n      '@sentry/integrations',\n      '@sentry/utils',\n      '@sentry/vue',\n    ]\n    for (const dep of aliasedDependencies) {\n      nuxt.options.alias[`~${dep}`] = (await resolvePath(dep, { url: moduleDir })).replace(/\\/cjs\\//, '/esm/')\n    }\n\n    if (serverSentryEnabled(options)) {\n      /**\n       * Proxy that provides a dummy request handler before Sentry is initialized and gets replaced with Sentry's own\n       * handler after initialization. Otherwise server-side request tracing would not work as it depends on Sentry being\n       * initialized already during handler creation.\n       */\n      const sentryHandlerProxy: SentryHandlerProxy = {\n        errorHandler: (error, _, __, next) => {\n          next(error)\n        },\n        requestHandler: (_, __, next) => {\n          next()\n        },\n        tracingHandler: (_, __, next) => {\n          next()\n        },\n      }\n      // @ts-expect-error Nuxt 2 only hook\n      nuxt.hook('render:setupMiddleware', app => app.use((req, res, next) => {\n        sentryHandlerProxy.requestHandler(req, res, next)\n      }))\n      if (options.tracing) {\n        // @ts-expect-error Nuxt 2 only hook\n        nuxt.hook('render:setupMiddleware', app => app.use((req, res, next) => {\n          sentryHandlerProxy.tracingHandler(req, res, next)\n        }))\n      }\n      // @ts-expect-error Nuxt 2 only hook\n      nuxt.hook('render:errorMiddleware', app => app.use((error, req, res, next) => {\n        sentryHandlerProxy.errorHandler(error, req, res, next)\n      }))\n      // @ts-expect-error Nuxt 2 only hook\n      nuxt.hook('generate:routeFailed', ({ route, errors }) => {\n        type routeGeneretorError = {\n          type: 'handled' | 'unhandled'\n          route: unknown\n          error: Error\n        }\n        (errors as routeGeneretorError[]).forEach(({ error }) => withScope((scope) => {\n          scope.setExtra('route', route)\n          captureException(error)\n        }))\n      })\n      // This is messy but Nuxt provides many modes that it can be started with like:\n      // - nuxt dev\n      // - nuxt build\n      // - nuxt start\n      // - nuxt generate\n      // but it doesn't really provide great way to differentiate those or enough hooks to\n      // pick from. This should ensure that server Sentry will only be initialized **after**\n      // the release version has been determined and the options template created but before\n      // the build is started (if building).\n      if (isNuxt2()) {\n        const isBuilding = nuxt.options._build && !nuxt.options.dev\n        const initHook = isBuilding ? 'build:compile' : 'ready'\n        nuxt.hook(initHook, () => initializeServerSentry(nuxt, options, sentryHandlerProxy, logger))\n        const shutdownHook = isBuilding ? 'build:done' : 'close'\n        const shutdownServerSentryOnce = callOnce(() => shutdownServerSentry())\n        nuxt.hook(shutdownHook, shutdownServerSentryOnce)\n      }\n    }\n\n    nuxt.hook('build:before', () => buildHook(nuxt, options, logger))\n\n    // Enable publishing of sourcemaps\n    if (options.publishRelease && !options.disabled && !nuxt.options.dev) {\n      if (isNuxt2()) {\n        nuxt.hook('webpack:config', (webpackConfigs: WebpackConfig[]) => webpackConfigHook(nuxt, webpackConfigs, options, logger))\n      }\n    }\n  },\n}) as unknown /* casting to \"unknown\" prevents unnecessary types being exposed in the generated type definitions */\n"
  },
  {
    "path": "src/options.ts",
    "content": "import { fileURLToPath } from 'node:url'\nimport type { ConsolaInstance } from 'consola'\nimport { defu } from 'defu'\nimport initJiti from 'jiti'\nimport { relative } from 'pathe'\nimport { Integrations as SentryNodeIntegrations, autoDiscoverNodePerformanceMonitoringIntegrations } from '@sentry/node'\nimport type Sentry from '@sentry/node'\nimport * as SentryCore from '@sentry/core'\nimport * as PluggableIntegrations from '@sentry/integrations'\nimport type { Integration, Options } from '@sentry/types'\nimport type { LazyConfiguration, TracingConfiguration } from './types/configuration'\nimport type { AllIntegrations, BrowserIntegrations, ClientCoreIntegrations, ClientIntegrations, ClientPluggableIntegrations, NodeIntegrations, NodeProfilingIntegrations, ServerCoreIntegrations, ServerIntegrations, ServerPluggableIntegrations } from './types/sentry'\nimport type { ModuleConfiguration } from './types'\nimport { Nuxt, resolveAlias } from './kit-shim'\nimport { canInitialize } from './utils'\n\nconst jiti = initJiti(fileURLToPath(import.meta.url))\n\nexport interface SentryHandlerProxy {\n  errorHandler: ReturnType<typeof Sentry.Handlers.errorHandler>\n  requestHandler: ReturnType<typeof Sentry.Handlers.requestHandler>\n  tracingHandler: ReturnType<typeof Sentry.Handlers.tracingHandler>\n}\n\ntype BooleanMap<T extends Record<string, unknown>> = Record<keyof T, true>\ntype IntegrationToImportMapping = Record<keyof AllIntegrations, string>\n\nexport const BROWSER_CORE_INTEGRATIONS: BooleanMap<ClientCoreIntegrations> = {\n  FunctionToString: true,\n  InboundFilters: true,\n  LinkedErrors: true,\n}\n\n// Enabled by default in Vue - https://docs.sentry.io/platforms/javascript/guides/vue/configuration/integrations/default/\nexport const BROWSER_INTEGRATIONS: BooleanMap<BrowserIntegrations> = {\n  Breadcrumbs: true,\n  GlobalHandlers: true,\n  HttpContext: true,\n  Replay: true,\n  TryCatch: true,\n}\n\n// Optional in Vue - https://docs.sentry.io/platforms/javascript/guides/vue/configuration/integrations/plugin/\nexport const BROWSER_PLUGGABLE_INTEGRATIONS: BooleanMap<ClientPluggableIntegrations> = {\n  CaptureConsole: true,\n  ContextLines: true,\n  Debug: true,\n  Dedupe: true,\n  ExtraErrorData: true,\n  HttpClient: true,\n  ReportingObserver: true,\n  RewriteFrames: true,\n  SessionTiming: true,\n}\n\nconst SERVER_CORE_INTEGRATIONS: BooleanMap<ServerCoreIntegrations> = {\n  FunctionToString: true,\n  InboundFilters: true,\n  LinkedErrors: true,\n  RequestData: true,\n}\n\n// Enabled by default in Node.js - https://docs.sentry.io/platforms/node/configuration/integrations/default-integrations/\nconst SERVER_NODE_INTEGRATIONS: BooleanMap<NodeIntegrations> = {\n  Anr: true,\n  Apollo: true,\n  Console: true,\n  Context: true,\n  ContextLines: true,\n  Express: true,\n  GraphQL: true,\n  Hapi: true,\n  Http: true,\n  LocalVariables: true,\n  Modules: true,\n  Mongo: true,\n  Mysql: true,\n  OnUncaughtException: true,\n  OnUnhandledRejection: true,\n  Postgres: true,\n  Prisma: true,\n  Spotlight: true,\n  Undici: true,\n}\n\n// Optional in Node.js - https://docs.sentry.io/platforms/node/configuration/integrations/pluggable-integrations/\nconst SERVER_PLUGGABLE_INTEGRATIONS: BooleanMap<ServerPluggableIntegrations> = {\n  CaptureConsole: true,\n  Debug: true,\n  Dedupe: true,\n  ExtraErrorData: true,\n  HttpClient: true,\n  ReportingObserver: true,\n  RewriteFrames: true,\n  SessionTiming: true,\n}\n\nconst INTEGRATION_TO_IMPORT_NAME_MAP: IntegrationToImportMapping = {\n  Anr: 'Anr',\n  Apollo: 'Apollo',\n  Breadcrumbs: 'breadcrumbsIntegration',\n  CaptureConsole: 'captureConsoleIntegration',\n  Console: 'Console',\n  Context: 'Context',\n  ContextLines: 'contextLinesIntegration',\n  Debug: 'debugIntegration',\n  Dedupe: 'dedupeIntegration',\n  Express: 'Express',\n  ExtraErrorData: 'extraErrorDataIntegration',\n  FunctionToString: 'functionToStringIntegration',\n  GlobalHandlers: 'globalHandlersIntegration',\n  GraphQL: 'GraphQL',\n  Hapi: 'Hapi',\n  Http: 'Http',\n  HttpClient: 'httpClientIntegration',\n  HttpContext: 'httpContextIntegration',\n  InboundFilters: 'inboundFiltersIntegration',\n  LinkedErrors: 'linkedErrorsIntegration',\n  LocalVariables: 'LocalVariables',\n  Modules: 'Modules',\n  Mongo: 'Mongo',\n  Mysql: 'Mysql',\n  OnUncaughtException: 'OnUncaughtException',\n  OnUnhandledRejection: 'OnUnhandledRejection',\n  Postgres: 'Postgres',\n  Prisma: 'Prisma',\n  ProfilingIntegration: 'ProfilingIntegration',\n  Replay: 'replayIntegration',\n  ReportingObserver: 'reportingObserverIntegration',\n  RequestData: 'requestDataIntegration',\n  RewriteFrames: 'rewriteFramesIntegration',\n  SessionTiming: 'sessionTimingIntegration',\n  Spotlight: 'Spotlight',\n  TryCatch: 'browserApiErrorsIntegration',\n  Undici: 'Undici',\n}\n\nfunction mapClientIntegrationToImportName (key: keyof ClientIntegrations): string {\n  return INTEGRATION_TO_IMPORT_NAME_MAP[key]\n}\n\nfunction mapServerIntegrationToImportName (key: keyof ServerIntegrations): string {\n  if (key === 'ContextLines') {\n    return 'ContextLines'\n  }\n\n  return INTEGRATION_TO_IMPORT_NAME_MAP[key]\n}\n\n// External and optional Node.js integration - https://docs.sentry.io/platforms/node/profiling/\nexport const SERVER_PROFILING_INTEGRATION: keyof Pick<NodeProfilingIntegrations, 'ProfilingIntegration'> = 'ProfilingIntegration'\n\nfunction getEnabledIntegrations<T extends AllIntegrations> (integrations: T): (keyof T)[] {\n  return getIntegrationsKeys(integrations).filter(key => integrations[key])\n}\n\nfunction getDisabledIntegrationKeys<T extends AllIntegrations> (integrations: T): string[] {\n  return getIntegrationsKeys(integrations).filter(key => integrations[key] === false) as string[]\n}\n\nfunction getIntegrationsKeys<T extends Partial<Record<keyof AllIntegrations, unknown>>> (integrations: T): (keyof T)[] {\n  return Object.keys(integrations) as (keyof T)[]\n}\n\nfunction isBrowserCoreIntegration (name: string): name is keyof ClientCoreIntegrations {\n  return name in BROWSER_CORE_INTEGRATIONS\n}\n\nfunction isBrowserDefaultIntegration (name: string): name is keyof BrowserIntegrations {\n  return name in BROWSER_INTEGRATIONS\n}\n\nfunction isBrowserPluggableIntegration (name: string): name is keyof ClientPluggableIntegrations {\n  return name in BROWSER_PLUGGABLE_INTEGRATIONS\n}\n\nfunction isServerCoreIntegration (name: string): name is keyof ServerCoreIntegrations {\n  return name in SERVER_CORE_INTEGRATIONS\n}\n\nfunction isServerNodeIntegration (name: string): name is keyof NodeIntegrations {\n  return name in SERVER_NODE_INTEGRATIONS\n}\n\nfunction isServerPlugabbleIntegration (name: string): name is keyof ServerPluggableIntegrations {\n  return name in SERVER_PLUGGABLE_INTEGRATIONS\n}\n\nasync function getApiMethods (packageName: string): Promise<string[]> {\n  const packageApi = await import(packageName)\n\n  const apiMethods: string[] = []\n  for (const key in packageApi) {\n    if (key === 'default') {\n      for (const subKey in packageApi[key]) {\n        if (typeof packageApi[key][subKey] === 'function') {\n          apiMethods.push(subKey)\n        }\n      }\n      continue\n    }\n    if (typeof packageApi[key] === 'function') {\n      apiMethods.push(key)\n    }\n  }\n\n  return apiMethods\n}\n\nexport async function resolveRelease (moduleOptions: Readonly<ModuleConfiguration>): Promise<string | undefined> {\n  if (!('release' in moduleOptions.config)) {\n    // Determine \"config.release\" automatically from local repo if not provided.\n    try {\n      const SentryCli = await import('@sentry/cli').then(m => m.default || m)\n      const cli = new SentryCli()\n      return (await cli.releases.proposeVersion()).trim()\n    } catch {\n      // Ignore\n    }\n  }\n}\n\nfunction resolveClientLazyOptions (options: ModuleConfiguration, apiMethods: string[], logger: ConsolaInstance): void {\n  if (!options.lazy) {\n    return\n  }\n\n  const defaultLazyOptions: LazyConfiguration = {\n    injectMock: true,\n    injectLoadHook: false,\n    mockApiMethods: true,\n    chunkName: 'sentry',\n    webpackPrefetch: false,\n    webpackPreload: false,\n  }\n\n  options.lazy = defu(options.lazy, defaultLazyOptions)\n\n  if (!options.lazy.injectMock) {\n    options.lazy.mockApiMethods = []\n  } else if (options.lazy.mockApiMethods === true) {\n    options.lazy.mockApiMethods = apiMethods\n  } else if (Array.isArray(options.lazy.mockApiMethods)) {\n    const mockMethods = options.lazy.mockApiMethods\n    options.lazy.mockApiMethods = mockMethods.filter(method => apiMethods.includes(method))\n    const notfoundMethods = mockMethods.filter(method => !apiMethods.includes(method))\n    if (notfoundMethods.length) {\n      logger.warn('Some specified methods to mock weren\\'t found in @sentry/vue:', notfoundMethods)\n    }\n    if (!options.lazy.mockApiMethods.includes('captureException')) {\n      // always add captureException if a sentry mock is requested\n      options.lazy.mockApiMethods.push('captureException')\n    }\n  }\n}\n\nfunction resolveTracingOptions (options: ModuleConfiguration): void {\n  if (!options.tracing) {\n    return\n  }\n\n  const defaultTracingOptions: TracingConfiguration = {\n    tracesSampleRate: 1.0,\n    browserTracing: {},\n    vueOptions: {\n      trackComponents: true,\n    },\n    vueRouterInstrumentationOptions: {\n      routeLabel: 'name',\n    },\n  }\n\n  options.tracing = defu(options.tracing, defaultTracingOptions)\n\n  if (options.config.tracesSampleRate === undefined) {\n    options.config.tracesSampleRate = options.tracing.tracesSampleRate\n  }\n}\n\nexport type ResolvedClientOptions = {\n  dev: boolean\n  DISABLED_INTEGRATION_KEYS: string[]\n  runtimeConfigKey: string\n  config: Options\n  lazy: boolean | LazyConfiguration\n  apiMethods: string[]\n  clientConfigPath: string | undefined\n  customClientIntegrations: string | undefined\n  logMockCalls: boolean\n  tracing: boolean | TracingConfiguration\n  imports: Record<string, string[]>\n  initialize: boolean\n  integrations: Record<string, unknown>\n}\n\nexport async function resolveClientOptions (nuxt: Nuxt, moduleOptions: Readonly<ModuleConfiguration>, logger: ConsolaInstance): Promise<ResolvedClientOptions> {\n  const options: ModuleConfiguration = defu(moduleOptions)\n\n  let clientConfigPath: string | undefined\n  if (typeof options.clientConfig === 'string') {\n    clientConfigPath = resolveAlias(options.clientConfig)\n    clientConfigPath = relative(nuxt.options.buildDir, clientConfigPath)\n  } else {\n    options.config = defu(options.clientConfig, options.config)\n  }\n\n  const apiMethods = await getApiMethods('@sentry/vue')\n  resolveClientLazyOptions(options, apiMethods, logger)\n  resolveTracingOptions(options)\n\n  for (const name of getIntegrationsKeys(options.clientIntegrations)) {\n    if (!isBrowserDefaultIntegration(name) && !isBrowserCoreIntegration(name) && !isBrowserPluggableIntegration(name)) {\n      logger.warn(`Sentry clientIntegration \"${name}\" is not recognized and will be ignored.`)\n      delete options.clientIntegrations[name]\n    }\n  }\n\n  let customClientIntegrations: string | undefined\n  if (options.customClientIntegrations) {\n    if (typeof options.customClientIntegrations === 'string') {\n      customClientIntegrations = resolveAlias(options.customClientIntegrations)\n      customClientIntegrations = relative(nuxt.options.buildDir, customClientIntegrations)\n    } else {\n      logger.warn(`Invalid customClientIntegrations option. Expected a file path, got \"${typeof options.customClientIntegrations}\".`)\n    }\n  }\n\n  const importsBrowser: string[] = []\n  const importsCore: string[] = []\n  const importsPluggable: string[] = []\n\n  const integrations = getEnabledIntegrations<ClientIntegrations>(options.clientIntegrations)\n    .reduce((res, key) => {\n      const importName = mapClientIntegrationToImportName(key)\n\n      if (key in BROWSER_INTEGRATIONS) {\n        importsBrowser.push(importName)\n      } else if (key in BROWSER_CORE_INTEGRATIONS) {\n        importsCore.push(importName)\n      } else if (key in BROWSER_PLUGGABLE_INTEGRATIONS) {\n        importsPluggable.push(importName)\n      }\n\n      res[importName] = options.clientIntegrations[key]\n      return res\n    }, {} as Record<string, unknown>)\n\n  const imports = {\n    '~@sentry/browser': importsBrowser,\n    '~@sentry/core': importsCore,\n    '~@sentry/integrations': importsPluggable,\n    '~@sentry/vue': ['init', ...options.tracing ? ['browserTracingIntegration'] : []],\n  }\n\n  return {\n    dev: nuxt.options.dev,\n    runtimeConfigKey: options.runtimeConfigKey,\n    config: {\n      dsn: options.dsn,\n      ...options.config,\n    },\n    clientConfigPath,\n    DISABLED_INTEGRATION_KEYS: getDisabledIntegrationKeys(options.clientIntegrations),\n    lazy: options.lazy,\n    apiMethods,\n    customClientIntegrations,\n    logMockCalls: options.logMockCalls, // for mocked only\n    tracing: options.tracing,\n    imports,\n    initialize: canInitialize(options),\n    integrations,\n  }\n}\n\nexport type ResolvedServerOptions = {\n  config: Options\n  apiMethods: string[]\n  lazy: boolean | LazyConfiguration\n  logMockCalls: boolean\n  tracing: ModuleConfiguration['tracing']\n}\n\nexport async function resolveServerOptions (nuxt: Nuxt, moduleOptions: Readonly<ModuleConfiguration>, logger: ConsolaInstance): Promise<ResolvedServerOptions> {\n  const options: ModuleConfiguration = defu(moduleOptions)\n\n  if (options.tracing) {\n    resolveTracingOptions(options)\n    options.serverIntegrations = defu(options.serverIntegrations, { Http: { tracing: true } })\n  }\n\n  if (typeof options.serverConfig === 'string') {\n    const resolvedPath = resolveAlias(options.serverConfig)\n    try {\n      const mod = jiti(resolvedPath)\n      options.serverConfig = (mod.default || mod)()\n    } catch (error) {\n      logger.error(`Error handling the serverConfig plugin:\\n${error}`)\n    }\n  }\n\n  options.config = defu(getServerRuntimeConfig(nuxt, options), options.serverConfig, options.config)\n\n  for (const name of getIntegrationsKeys(options.serverIntegrations)) {\n    if (!isServerNodeIntegration(name) && !isServerCoreIntegration(name) && !isServerPlugabbleIntegration(name) && name !== SERVER_PROFILING_INTEGRATION) {\n      logger.warn(`Sentry serverIntegration \"${name}\" is not recognized and will be ignored.`)\n      delete options.serverIntegrations[name]\n    }\n  }\n\n  let customIntegrations: Integration[] = []\n  if (options.customServerIntegrations) {\n    const resolvedPath = resolveAlias(options.customServerIntegrations)\n    try {\n      const mod = jiti(resolvedPath)\n      customIntegrations = (mod.default || mod)()\n      if (!Array.isArray(customIntegrations)) {\n        logger.error(`Invalid value returned from customServerIntegrations plugin. Expected an array, got \"${typeof customIntegrations}\".`)\n      }\n    } catch (error) {\n      logger.error(`Error handling the customServerIntegrations plugin:\\n${error}`)\n    }\n  }\n\n  if (SERVER_PROFILING_INTEGRATION in options.serverIntegrations) {\n    const enabled = options.serverIntegrations[SERVER_PROFILING_INTEGRATION]\n    delete options.serverIntegrations[SERVER_PROFILING_INTEGRATION]\n    if (enabled) {\n      try {\n        const { ProfilingIntegration } = await import('@sentry/profiling-node').then(m => m.default || m)\n        customIntegrations.push(new ProfilingIntegration())\n      } catch (error) {\n        logger.error(`To use the ${SERVER_PROFILING_INTEGRATION} integration you need to install the \"@sentry/profiling-node\" dependency.`)\n        throw new Error((error as Error).message)\n      }\n    }\n  }\n\n  const resolvedIntegrations = [\n    // Automatically instrument Node.js libraries and frameworks\n    ...options.tracing ? autoDiscoverNodePerformanceMonitoringIntegrations() : [],\n    ...getEnabledIntegrations(options.serverIntegrations)\n      .map((name) => {\n        const importName = mapServerIntegrationToImportName(name)\n        const opt = options.serverIntegrations[name]\n        try {\n          if (isServerCoreIntegration(name)) {\n            // @ts-expect-error Some integrations don't take arguments but it doesn't hurt to pass one.\n            return Object.keys(opt as Record<string, unknown>).length ? SentryCore[importName](opt) : SentryCore[importName]()\n          } else if (isServerNodeIntegration(name)) {\n            // @ts-expect-error Some integrations don't take arguments but it doesn't hurt to pass one.\n            return Object.keys(opt as Record<string, unknown>).length ? new SentryNodeIntegrations[name](opt) : new SentryNodeIntegrations[name]()\n          } else if (isServerPlugabbleIntegration(name)) {\n            // @ts-expect-error Some integrations don't take arguments but it doesn't hurt to pass one.\n            return Object.keys(opt as Record<string, unknown>).length ? PluggableIntegrations[importName](opt) : PluggableIntegrations[importName]()\n          } else {\n            throw new Error(`Unsupported server integration \"${name}\"`)\n          }\n        } catch (error) {\n          throw new Error(`Failed initializing server integration \"${name}\".\\n${error}`)\n        }\n      }),\n    ...customIntegrations,\n  ]\n\n  const disabledIntegrationKeys = getDisabledIntegrationKeys(options.serverIntegrations)\n\n  // Use a function to be able to filter out default integrations.\n  options.config.integrations = (defaultIntegrations) => {\n    return [\n      ...defaultIntegrations.filter(integration => !disabledIntegrationKeys.includes(integration.name)),\n      ...resolvedIntegrations,\n    ]\n  }\n\n  return {\n    config: {\n      dsn: options.dsn,\n      ...options.config,\n    },\n    apiMethods: await getApiMethods('@sentry/node'),\n    lazy: options.lazy,\n    logMockCalls: options.logMockCalls, // for mocked only\n    tracing: options.tracing,\n  }\n}\n\nfunction getServerRuntimeConfig (nuxt: Nuxt, options: Readonly<ModuleConfiguration>): Partial<ModuleConfiguration['config']> | undefined {\n  const { publicRuntimeConfig } = nuxt.options\n  const { runtimeConfigKey } = options\n  if (publicRuntimeConfig && typeof publicRuntimeConfig !== 'function' && runtimeConfigKey in publicRuntimeConfig) {\n    return defu(\n      publicRuntimeConfig[runtimeConfigKey].serverConfig as Partial<ModuleConfiguration['serverConfig']>,\n      publicRuntimeConfig[runtimeConfigKey].config as Partial<ModuleConfiguration['config']>,\n    )\n  }\n}\n"
  },
  {
    "path": "src/templates/client.shared.js",
    "content": "import merge from '~lodash.mergewith'\nimport * as CoreSdk from '~@sentry/core'\nimport { captureUserFeedback, forceLoad, onLoad, showReportDialog, wrap } from '~@sentry/browser'\n<%\nfor (const [package, imports] of Object.entries(options.imports)) {\n  if (imports.length) {\n    %>import { <%= imports.join(', ') %> } from '<%= package %>'\n<%\n  }\n}\nif (options.clientConfigPath) {%>import getClientConfig from '<%= options.clientConfigPath %>'\n<%}\nif (options.customClientIntegrations) {%>import getCustomIntegrations from '<%= options.customClientIntegrations %>'\n<%}%>\n\nexport { init }\nexport const SentrySdk = { ...CoreSdk, ...{ captureUserFeedback, forceLoad, onLoad, showReportDialog, wrap } }\n\n/** @type {string[]} */\nconst DISABLED_INTEGRATION_KEYS = <%= serialize(options.DISABLED_INTEGRATION_KEYS) %>\n\n/**\n * @typedef {Parameters<typeof init>[0]} InitConfig\n * @param {import('@nuxt/types').Context} ctx\n * @return {Promise<InitConfig>}\n */\nexport<%= (options.clientConfigPath || options.customClientIntegrations) ? ' async' : '' %> function getConfig (ctx) {\n  /** @type {InitConfig} */\n  const config = {\n    <%= Object\n      .entries(options.config)\n      .map(([key, option]) => {\n        const value = typeof option === 'function' ? serializeFunction(option) : serialize(option)\n        return `${key}:${value}`\n      })\n      .join(',\\n    ') %>,\n  }\n\n  /** @type {NonNullable<InitConfig>['integrations']} */\n  const resolvedIntegrations = [\n    <%= Object\n      .entries(options.integrations)\n      .filter(([name]) => name !== 'Vue')\n      .map(([name, integration]) => {\n        const integrationOptions = Object\n          .entries(integration)\n          .map(([key, option]) => {\n            const value = typeof option === 'function' ? serializeFunction(option) : serialize(option)\n            return `${key}:${value}`\n          })\n\n        return `${name}(${integrationOptions.length ? '{ ' + integrationOptions.join(',') + ' }' : ''})`\n      })\n      .join(',\\n    ') %>,\n  ]\n  <%\n  if (options.tracing) {\n    const { browserTracing, vueOptions, vueRouterInstrumentationOptions, ...tracingOptions } = options.tracing\n  %>\n  resolvedIntegrations.push(browserTracingIntegration({\n    router: ctx.app.router,\n    ...<%= serialize(vueRouterInstrumentationOptions) %>,\n    ...<%= serialize(browserTracing) %>,\n  }))\n  merge(config, <%= serialize(vueOptions) %>, <%= serialize(tracingOptions) %>)\n  <% } %>\n\n  <% if (options.clientConfigPath) { %>\n  const clientConfig = await getClientConfig(ctx)\n  clientConfig ? merge(config, clientConfig) : console.error(`[@nuxtjs/sentry] Invalid value returned from the clientConfig plugin.`)\n  <% } %>\n\n  <% if (options.customClientIntegrations) { %>\n  const customIntegrations = await getCustomIntegrations(ctx)\n  if (Array.isArray(customIntegrations)) {\n    resolvedIntegrations.push(...customIntegrations)\n  } else {\n    console.error(`[@nuxtjs/sentry] Invalid value returned from customClientIntegrations plugin. Expected an array, got \"${typeof customIntegrations}\".`)\n  }\n  <% } %>\n  config.integrations = (defaultIntegrations) => {\n    return [\n      ...defaultIntegrations.filter(integration => !DISABLED_INTEGRATION_KEYS.includes(integration.name)),\n      ...resolvedIntegrations,\n    ]\n  }\n  const runtimeConfigKey = <%= serialize(options.runtimeConfigKey) %>\n  if (ctx.$config && runtimeConfigKey && ctx.$config[runtimeConfigKey]) {\n    merge(config, ctx.$config[runtimeConfigKey].config, ctx.$config[runtimeConfigKey].clientConfig)\n  }\n\n  return config\n}\n"
  },
  {
    "path": "src/templates/options.ejs",
    "content": "/* eslint-disable */\n<%\nfor (const [key, value] of Object.entries(options)) {\n%>export const <%= key %> = <%= serialize(value) %>\n<%\n}\n%>\n"
  },
  {
    "path": "src/templates/plugin.client.js",
    "content": "import Vue from 'vue'\nimport { getConfig, init, SentrySdk } from './sentry.client.shared'\n\n/** @type {import('@nuxt/types').Plugin} */\nexport default async function (ctx, inject) {\n  const config = await getConfig(ctx)\n  init({ Vue, ...config })\n  inject('sentry', SentrySdk)\n  ctx.$sentry = SentrySdk\n}\n"
  },
  {
    "path": "src/templates/plugin.lazy.js",
    "content": "import Vue from 'vue'\n\n<% if (options.lazy.injectMock) { %>\nconst API_METHODS = <%= JSON.stringify(options.lazy.mockApiMethods)%>\nlet delayedCalls = []\nlet SentryMock = {}\n<% } %>\nlet sentryReadyResolve\nlet loadInitiated = false\nlet loadCompleted = false\n\n<% if (options.lazy.injectMock) { %>\nlet delayedGlobalErrors = []\nlet delayedUnhandledRejections = []\n/** @param {ErrorEvent} event */\nconst delayGlobalError = function (event) {\n  delayedGlobalErrors.push([event.message, event.filename, event.lineno, event.colno, event.error])\n}\nconst delayUnhandledRejection = function (event) {\n  if ('reason' in event && event.reason) {\n    event = event.reason\n  } else if ('detail' in event && event.detail && 'reason' in event.detail && event.detail.reason) {\n    event = event.detail.reason\n  }\n  delayedUnhandledRejections.push(event)\n}\n\nconst vueErrorHandler = Vue.config.errorHandler\n\nVue.config.errorHandler = (error, vm, info) => {\n  if (!loadCompleted) {\n    if (vm) {\n      vm.$sentry.captureException(error)\n    }\n\n    if (Vue.util) {\n      Vue.util.warn(`Error in ${info}: \"${error.toString()}\"`, vm)\n    }\n    console.error(error)\n  }\n\n  if (vueErrorHandler) {\n    return vueErrorHandler(error, vm, info)\n  }\n}\n<% } %>\n\nexport default function SentryPlugin (ctx, inject) {\n  <% if (options.lazy.injectMock) { %>\n  API_METHODS.forEach((key) => {\n    SentryMock[key] = (...args) => delayedCalls.push([key, args])\n  })\n\n  window.addEventListener('error', delayGlobalError)\n  window.addEventListener('unhandledrejection', delayUnhandledRejection)\n\n  inject('sentry', SentryMock)\n  ctx.$sentry = SentryMock\n  <% } %>\n\n  const loadSentryHook = () => attemptLoadSentry(ctx, inject)\n\n  <% if (options.lazy.injectLoadHook) { %>\n  inject('sentryLoad', loadSentryHook)\n  ctx.$sentryLoad = loadSentryHook\n  <% } else { %>\n  window.<%= globals.readyCallback %>(loadSentryHook)\n  <% } %>\n\n  const sentryReadyPromise = new Promise((resolve) => {\n    sentryReadyResolve = resolve\n  })\n\n  const sentryReady = () => sentryReadyPromise\n\n  inject('sentryReady', sentryReady)\n  ctx.$sentryReady = sentryReady\n}\n\nasync function attemptLoadSentry (ctx, inject) {\n  if (loadInitiated) {\n    return\n  }\n\n  loadInitiated = true\n\n  if (!window.<%= globals.nuxt %>) {\n    <% if (options.dev) { %>\n    console.warn('$sentryLoad was called but window.<%= globals.nuxt %> is not available, delaying sentry loading until onNuxtReady callback. Do you really need to use lazy loading for Sentry?')\n    <% }\n    if (options.lazy.injectLoadHook) { %>window.<%= globals.readyCallback %>(() => loadSentry(ctx, inject))\n    <% } else { %>// Wait for onNuxtReady hook to trigger.\n    <% } %>return\n  }\n\n  await loadSentry(ctx, inject)\n}\n\nasync function loadSentry (ctx, inject) {\n  if (loadCompleted) {\n    return\n  }\n\n  <%\n  const magicComments = [`webpackChunkName: '${options.lazy.chunkName}'`]\n  if (options.lazy.webpackPrefetch) {\n    magicComments.push('webpackPrefetch: true')\n  }\n  if (options.lazy.webpackPreload) {\n    magicComments.push('webpackPreload: true')\n  }\n  %>\n  const { getConfig, init, SentrySdk } = await import(/* <%= magicComments.join(', ') %> */ './sentry.client.shared')\n  <% if (options.initialize) {%>\n  const config = await getConfig(ctx)\n  init({ Vue, ...config })\n  <% } %>\n\n  loadCompleted = true\n  <% if (options.lazy.injectMock) { %>\n  window.removeEventListener('error', delayGlobalError)\n  window.removeEventListener('unhandledrejection', delayUnhandledRejection)\n  if (delayedGlobalErrors.length) {\n    if (window.onerror) {\n      console.info('Reposting global errors after Sentry has loaded')\n      for (const errorArgs of delayedGlobalErrors) {\n        window.onerror.apply(window, errorArgs)\n      }\n    }\n    delayedGlobalErrors = []\n  }\n  if (delayedUnhandledRejections.length) {\n    if (window.onunhandledrejection) {\n      console.info('Reposting unhandled promise rejection errors after Sentry has loaded')\n      for (const reason of delayedUnhandledRejections) {\n        window.onunhandledrejection(reason)\n      }\n    }\n    delayedUnhandledRejections = []\n  }\n  delayedCalls.forEach(([methodName, args]) => SentrySdk[methodName].apply(SentrySdk, args))\n  <% } %>\n  forceInject(ctx, inject, 'sentry', SentrySdk)\n  sentryReadyResolve(SentrySdk)\n\n  // help gc\n  <% if (options.lazy.injectMock) { %>\n  // Avoid crashes in case the reference to the mocked object is being used after the actual Sentry instance has loaded.\n  API_METHODS.forEach((key) => {\n    SentryMock[key] = (...args) => SentrySdk[key].apply(SentrySdk, args)\n  })\n\n  // Dont unset delayedCalls & SentryMock during development - this will cause HMR issues.\n  <% if (!options.dev) { %>\n  delayedCalls = undefined\n  SentryMock = undefined\n  <% } else { %>\n  delayedCalls = []\n  <% } %>\n  <% } %>\n  sentryReadyResolve = undefined\n}\n\n// Custom inject function that is able to overwrite previously injected values,\n// which original inject doesn't allow to do.\n// This method is adapted from the inject method in nuxt/vue-app/template/index.js\nfunction forceInject (ctx, inject, key, value) {\n  inject(key, value)\n  const injectKey = '$' + key\n  ctx[injectKey] = value\n  window.<%= globals.nuxt %>.$options[injectKey] = value\n}\n"
  },
  {
    "path": "src/templates/plugin.mocked.js",
    "content": "const apiMethods = <%= JSON.stringify(options.apiMethods)%>\n\n/** @type {import('@nuxt/types').Plugin} */\nexport default function (ctx, inject) {\n  const SentryMock = {}\n  apiMethods.forEach(key => {\n    SentryMock[key] = <%= options.logMockCalls\n      ? '(...args) => console.warn(`$sentry.${key}() called, but Sentry plugin is disabled. Arguments:`, args)'\n      : '_ => _'%>\n  })\n\n  // Inject mocked sentry to the context as $sentry (this is used in case sentry is disabled)\n  inject('sentry', SentryMock)\n  ctx.$sentry = SentryMock\n}\n"
  },
  {
    "path": "src/templates/plugin.server.js",
    "content": "<% if (options.tracing) { %>\nimport { getActiveSpan, getDynamicSamplingContextFromSpan, spanToTraceHeader } from '~@sentry/core'\nimport { dynamicSamplingContextToSentryBaggageHeader } from '~@sentry/utils'\n<% } %>\n\n/** @type {import('@nuxt/types').Plugin} */\nexport default function (ctx, inject) {\n  const sentry = process.sentry || null\n  if (!sentry) {\n    return\n  }\n  inject('sentry', sentry)\n  ctx.$sentry = sentry\n  <% if (options.tracing) { %>\n  connectBackendTraces(ctx)\n  <% } %>\n  <% if (options.lazy) { %>\n  const sentryReady = () => Promise.resolve(sentry)\n  inject('sentryReady', sentryReady)\n  ctx.$sentryReady = sentryReady\n  <% } %>\n}\n\n<% if (options.tracing) { %>\n/** @param {import('@nuxt/types').Context} ctx */\nfunction connectBackendTraces (ctx) {\n  const { head } = ctx.app\n  if (!head || head instanceof Function) {\n    console.warn('[@nuxtjs/sentry] can not connect backend and frontend traces because app.head is a function or missing!')\n    return\n  }\n  const span = getActiveSpan()\n  if (!span) {\n    return\n  }\n  head.meta = head.meta || []\n  head.meta.push({ hid: 'sentry-trace', name: 'sentry-trace', content: spanToTraceHeader(span) })\n  const dsc = getDynamicSamplingContextFromSpan(span)\n  if (dsc) {\n    const baggage = dynamicSamplingContextToSentryBaggageHeader(dsc)\n    if (baggage) {\n      head.meta.push({ hid: 'sentry-baggage', name: 'baggage', content: baggage })\n    }\n  }\n}\n<% } %>\n"
  },
  {
    "path": "src/types/configuration.d.ts",
    "content": "import { Options as SentryOptions } from '@sentry/types'\nimport { browserTracingIntegration, vueRouterInstrumentation } from '@sentry/vue'\nimport { Options as SentryVueOptions, TracingOptions as SentryVueTracingOptions } from '@sentry/vue/types/types'\nimport { SentryWebpackPluginOptions } from '@sentry/webpack-plugin'\nimport { NodeOptions, Handlers } from '@sentry/node'\nimport { Configuration as WebpackOptions } from 'webpack'\nimport { ClientIntegrations, ServerIntegrations } from './sentry'\n\nexport interface LazyConfiguration {\n  chunkName?: string\n  injectLoadHook?: boolean\n  injectMock?: boolean\n  mockApiMethods?: boolean | string[]\n  webpackPrefetch?: boolean\n  webpackPreload?: boolean\n}\n\nexport interface TracingConfiguration extends Pick<SentryOptions, 'tracesSampleRate'> {\n  browserTracing?: Parameters<typeof browserTracingIntegration>[0]\n  vueOptions?: Partial<SentryVueTracingOptions>\n  vueRouterInstrumentationOptions?: Parameters<typeof vueRouterInstrumentation>[1]\n}\n\nexport interface ModuleConfiguration {\n  clientConfig: Partial<SentryVueOptions> | string\n  clientIntegrations: ClientIntegrations\n  config: SentryOptions\n  customClientIntegrations: string\n  customServerIntegrations: string\n  disableClientRelease: boolean\n  disableClientSide: boolean\n  disabled: boolean\n  disableServerRelease: boolean\n  disableServerSide: boolean\n  dsn: string\n  tracing: boolean | TracingConfiguration\n  initialize: boolean\n  lazy: boolean | LazyConfiguration\n  logMockCalls: boolean\n  /** See available options at https://docs.sentry.io/platforms/node/sourcemaps/uploading/webpack/ */\n  publishRelease: boolean | SentryWebpackPluginOptions\n  runtimeConfigKey: string\n  serverConfig: NodeOptions | string\n  serverIntegrations: ServerIntegrations\n  sourceMapStyle: WebpackOptions['devtool']\n  requestHandlerConfig: Handlers.RequestHandlerOptions\n}\n\nexport type PartialModuleConfiguration = Partial<ModuleConfiguration>\n"
  },
  {
    "path": "src/types/extend.d.ts",
    "content": "import 'vue'\nimport 'vuex'\nimport '@nuxt/types'\nimport * as SentryNode from '@sentry/node'\nimport * as SentryTypes from '@sentry/core'\nimport { PartialModuleConfiguration } from './configuration'\n\nexport type ModulePublicRuntimeConfig = Pick<PartialModuleConfiguration, 'config' | 'clientConfig' | 'serverConfig'>\n\ntype Sentry = typeof SentryTypes\ntype NodeSentry = typeof SentryNode\n\n// add type to Vue context\ndeclare module 'vue/types/vue' {\n  interface Vue {\n    readonly $sentry: Sentry\n    $sentryLoad(): Promise<void>\n    $sentryReady(): Promise<Sentry>\n  }\n}\n\n// App Context and NuxtAppOptions\ndeclare module '@nuxt/types' {\n  interface Context {\n    readonly $sentry: Sentry\n    $sentryLoad(): Promise<void>\n    $sentryReady(): Promise<Sentry>\n  }\n\n  interface NuxtOptions {\n    sentry?: PartialModuleConfiguration\n  }\n\n  interface NuxtAppOptions {\n    readonly $sentry: Sentry\n    $sentryLoad(): Promise<void>\n    $sentryReady(): Promise<Sentry>\n  }\n}\n\ndeclare module '@nuxt/types/config/runtime' {\n  interface NuxtRuntimeConfig {\n    sentry?: ModulePublicRuntimeConfig\n  }\n}\n\n// add types for Vuex Store\ndeclare module 'vuex/types' {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  interface Store<S> {\n    readonly $sentry: Sentry\n    $sentryLoad(): Promise<void>\n    $sentryReady(): Promise<Sentry>\n  }\n}\n\ndeclare global {\n  namespace NodeJS {\n    interface Process {\n      sentry: NodeSentry\n    }\n  }\n}\n"
  },
  {
    "path": "src/types/index.d.ts",
    "content": "import { PartialModuleConfiguration, ModuleConfiguration } from './configuration'\nimport { ModulePublicRuntimeConfig } from './extend'\n\ntype ModuleOptions = PartialModuleConfiguration\n\nexport { ModuleOptions, ModulePublicRuntimeConfig, ModuleConfiguration }\n"
  },
  {
    "path": "src/types/sentry.d.ts",
    "content": "import { IntegrationFn, IntegrationClass, Integration } from '@sentry/types'\nimport {\n  breadcrumbsIntegration,\n  browserApiErrorsIntegration,\n  globalHandlersIntegration,\n  httpContextIntegration,\n  replayIntegration,\n} from '@sentry/browser'\nimport {\n  functionToStringIntegration,\n  inboundFiltersIntegration,\n  linkedErrorsIntegration,\n  requestDataIntegration,\n} from '@sentry/core'\nimport {\n  captureConsoleIntegration,\n  contextLinesIntegration,\n  debugIntegration,\n  dedupeIntegration,\n  extraErrorDataIntegration,\n  httpClientIntegration,\n  reportingObserverIntegration,\n  rewriteFramesIntegration,\n  sessionTimingIntegration,\n} from '@sentry/integrations'\nimport {\n  Integrations,\n} from '@sentry/node'\n\ntype IntegrationConfig<T extends IntegrationFn> = Parameters<T>[0] | Record<string, never> | false\ntype ClassIntegrationConfig<T extends IntegrationClass<Integration>> = ConstructorParameters<T>[0] | Record<string, never> | false\n\nexport type BrowserIntegrations = {\n  Breadcrumbs?: IntegrationConfig<typeof breadcrumbsIntegration>\n  GlobalHandlers?: IntegrationConfig<typeof globalHandlersIntegration>\n  HttpContext?: IntegrationConfig<typeof httpContextIntegration>\n  Replay?: IntegrationConfig<typeof replayIntegration>\n  TryCatch?: IntegrationConfig<typeof browserApiErrorsIntegration>\n}\n\nexport type CoreIntegrations = {\n  FunctionToString?: IntegrationConfig<typeof functionToStringIntegration>\n  InboundFilters?: IntegrationConfig<typeof inboundFiltersIntegration>\n  LinkedErrors?: IntegrationConfig<typeof linkedErrorsIntegration>\n  RequestData?: IntegrationConfig<typeof requestDataIntegration>\n}\n\nexport type PluggableIntegrations = {\n  CaptureConsole?: IntegrationConfig<typeof captureConsoleIntegration>\n  ContextLines?: IntegrationConfig<typeof contextLinesIntegration>\n  Debug?: IntegrationConfig<typeof debugIntegration>\n  Dedupe?: IntegrationConfig<typeof dedupeIntegration>\n  ExtraErrorData?: IntegrationConfig<typeof extraErrorDataIntegration>\n  HttpClient?: IntegrationConfig<typeof httpClientIntegration>\n  ReportingObserver?: IntegrationConfig<typeof reportingObserverIntegration>\n  RewriteFrames?: IntegrationConfig<typeof rewriteFramesIntegration>\n  SessionTiming?: IntegrationConfig<typeof sessionTimingIntegration>\n}\n\nexport type NodeProfilingIntegrations = {\n  ProfilingIntegration?: IntegrationConfig<IntegrationFn> // Dummy type since we don't want to depend on `@sentry/profiling-node`\n}\n\nexport type NodeIntegrations = {\n  Anr?: ClassIntegrationConfig<typeof Integrations.Anr>\n  Apollo?: ClassIntegrationConfig<typeof Integrations.Apollo>\n  Console?: ClassIntegrationConfig<typeof Integrations.Console>\n  Context?: ClassIntegrationConfig<typeof Integrations.Context>\n  ContextLines?: ClassIntegrationConfig<typeof Integrations.ContextLines>\n  Express?: ClassIntegrationConfig<typeof Integrations.Express>\n  GraphQL?: ClassIntegrationConfig<typeof Integrations.GraphQL>\n  Hapi?: ClassIntegrationConfig<typeof Integrations.Hapi>\n  Http?: ClassIntegrationConfig<typeof Integrations.Http>\n  LocalVariables?: ClassIntegrationConfig<typeof Integrations.LocalVariables>\n  Modules?: ClassIntegrationConfig<typeof Integrations.Modules>\n  Mongo?: ClassIntegrationConfig<typeof Integrations.Mongo>\n  Mysql?: ClassIntegrationConfig<typeof Integrations.Mysql>\n  OnUncaughtException?: ClassIntegrationConfig<typeof Integrations.OnUncaughtException>\n  OnUnhandledRejection?: ClassIntegrationConfig<typeof Integrations.OnUnhandledRejection>\n  Postgres?: ClassIntegrationConfig<typeof Integrations.Postgres>\n  Prisma?: ClassIntegrationConfig<typeof Integrations.Prisma>\n  Spotlight?: ClassIntegrationConfig<typeof Integrations.Spotlight>\n  Undici?: ClassIntegrationConfig<typeof Integrations.Undici>\n}\n\nexport type ClientCoreIntegrations = Pick<CoreIntegrations, 'FunctionToString' | 'InboundFilters' | 'LinkedErrors'>\nexport type ClientPluggableIntegrations = PluggableIntegrations\nexport type ClientIntegrations = ClientCoreIntegrations & ClientPluggableIntegrations & BrowserIntegrations\n\nexport type ServerCoreIntegrations = CoreIntegrations\nexport type ServerPluggableIntegrations = Omit<PluggableIntegrations, 'ContextLines'>\nexport type ServerIntegrations = ServerCoreIntegrations & ServerPluggableIntegrations & NodeProfilingIntegrations & NodeIntegrations\n\nexport type AllIntegrations = ClientIntegrations & ServerIntegrations\n"
  },
  {
    "path": "src/utils.ts",
    "content": "import type { ModuleConfiguration } from './types'\n\nexport const boolToText = (value: boolean): 'enabled' | 'disabled' => value ? 'enabled' : 'disabled'\n\nexport const envToBool = (env: string | undefined): boolean => Boolean(env && env.toLowerCase() !== 'false' && env !== '0')\n\nexport const canInitialize = (options: ModuleConfiguration): boolean => Boolean(options.initialize && options.dsn)\n\nexport const clientSentryEnabled = (options: ModuleConfiguration): boolean => !options.disabled && !options.disableClientSide\n\nexport const serverSentryEnabled = (options: ModuleConfiguration): boolean => !options.disabled && !options.disableServerSide\n\nexport function callOnce (fn: (...args: any[]) => any): (...args: any[]) => any {\n  let called = false\n  return function callOnceWrapper (...subargs) {\n    if (!called) {\n      called = true\n      return fn(...subargs)\n    }\n  }\n}\n"
  },
  {
    "path": "test/default.test.ts",
    "content": "import { fileURLToPath } from 'url'\nimport { dirname } from 'path'\nimport { describe, afterAll, beforeAll, beforeEach, test, expect } from 'vitest'\nimport type { Browser } from 'playwright-chromium'\nimport sentryTestkit from 'sentry-testkit'\nimport { setup, url } from '@nuxtjs/module-test-utils'\nimport type { Nuxt } from '../src/kit-shim'\nimport { $$, createBrowser, loadConfig } from './utils'\n\nconst __filename = fileURLToPath(import.meta.url)\nconst __dirname = dirname(__filename)\n\nconst { testkit, localServer } = sentryTestkit.default()\nconst TEST_DSN = 'http://acacaeaccacacacabcaacdacdacadaca@sentry.io/000001'\n\ndescribe('Smoke test (default)', () => {\n  let nuxt: Nuxt\n  let browser: Browser\n\n  beforeAll(async () => {\n    await localServer.start(TEST_DSN)\n    const dsn = localServer.getDsn() ?? undefined\n    nuxt = (await setup(loadConfig(__dirname, 'default', { sentry: { dsn } }, { merge: true }))).nuxt\n    browser = await createBrowser()\n  })\n\n  afterAll(async () => {\n    if (browser) {\n      await browser.close()\n    }\n    await nuxt.close()\n    await localServer.stop()\n  })\n\n  beforeEach(() => {\n    testkit.reset()\n  })\n\n  test('builds and runs', async () => {\n    const page = await browser.newPage()\n    const errors: string[] = []\n    page.on('pageerror', (error) => {\n      errors.push(error.message)\n    })\n    await page.goto(url('/'))\n\n    // process.sentry is not initialized in webpack context in tests.\n    // expect(await $$('#server-side', page)).toBe('Works!')\n    expect(await $$('#client-side', page)).toBe('Works!')\n    expect(errors).toEqual([])\n  })\n\n  test('catches a server crash', async () => {\n    const page = await browser.newPage()\n    const response = await page.goto(url('/?crashOnLoad=1'))\n    expect(response!.status()).toBe(500)\n\n    const reports = testkit.reports()\n    expect(reports).toHaveLength(1)\n    expect(reports[0].error?.message).toContain('crashOnLoad is not defined')\n  })\n\n  test('catches a client crash', async () => {\n    const page = await browser.newPage()\n    await page.goto(url('/'))\n\n    expect(await $$('#client-side', page)).toBe('Works!')\n    await page.click('#crash-button')\n    const reports = testkit.reports()\n    expect(reports).toHaveLength(1)\n    expect(reports[0].error?.message).toContain('crash_me is not a function')\n  })\n\n  // TODO: Add tests for custom integration. Blocked by various sentry-kit bugs reported in its repo.\n})\n"
  },
  {
    "path": "test/fixture/default/config/custom-client-integrations.js",
    "content": "/**\n * @param {import('@nuxt/types').Context} _context\n * @return {Promise<import('@sentry/types').Integration[]>}\n */\nexport default async function (_context) {\n  return []\n}\n"
  },
  {
    "path": "test/fixture/default/nuxt.config.cjs",
    "content": "const SentryModule = require('../../..')\n\n/** @type {import('@nuxt/types').NuxtConfig} */\nconst config = {\n  rootDir: __dirname,\n  telemetry: false,\n  build: {\n    terser: false,\n  },\n  render: {\n    resourceHints: false,\n  },\n  modules: [\n    /** @type {import('@nuxt/types').Module} */(/** @type {unknown} */(SentryModule)),\n  ],\n  sentry: {\n    dsn: 'https://fe8b7df6ea7042f69d7a97c66c2934f7@sentry.io.nuxt/1429779',\n    clientIntegrations: {\n      // Integration from @Sentry/browser package.\n      TryCatch: { eventTarget: false },\n      Replay: {},\n    },\n    clientConfig: {\n      // This sets the sample rate to be 10%. You may want this to be 100% while\n      // in development and sample at a lower rate in production\n      replaysSessionSampleRate: 0.1,\n      // If the entire session is not sampled, use the below sample rate to sample\n      // sessions when an error occurs.\n      replaysOnErrorSampleRate: 1.0,\n    },\n    customClientIntegrations: '~/config/custom-client-integrations.js',\n    tracing: true,\n  },\n}\n\nmodule.exports = config\n"
  },
  {
    "path": "test/fixture/default/pages/index.vue",
    "content": "<template>\n  <div>\n    <h3>Server-side</h3>\n    <span id=\"server-side\">{{ serverSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span>\n    <h3>Client-side</h3>\n    <span id=\"client-side\">{{ clientSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span>\n    <p>\n      <button id=\"crash-button\" type=\"button\" @click=\"crash_me()\">\n        crash me\n      </button>\n    </p>\n  </div>\n</template>\n\n<script>\nexport default {\n  asyncData ({ $sentry, query }) {\n    if (query.crashOnLoad) {\n      // @ts-ignore forces a crash\n      crashOnLoad()\n    }\n\n    if (process.server) {\n      return {\n        serverSentryPresent: Boolean($sentry?.captureException),\n      }\n    }\n  },\n  data () {\n    return {\n      clientSentryPresent: false,\n      serverSentryPresent: false,\n    }\n  },\n  created () {\n    if (process.client) {\n      this.clientSentryPresent = Boolean(this.$sentry?.captureException)\n    }\n  },\n}\n</script>\n"
  },
  {
    "path": "test/fixture/lazy/config/custom-client-integrations.js",
    "content": "/**\n * @param {import('@nuxt/types').Context} _context\n * @return {Promise<import('@sentry/types').Integration[]>}\n */\nexport default async function (_context) {\n  return []\n}\n"
  },
  {
    "path": "test/fixture/lazy/nuxt.config.cjs",
    "content": "const SentryModule = require('../../..')\n\n/** @type {import('@nuxt/types').NuxtConfig} */\nconst config = {\n  rootDir: __dirname,\n  telemetry: false,\n  dev: false,\n  render: {\n    resourceHints: false,\n  },\n  modules: [\n    /** @type {import('@nuxt/types').Module} */(/** @type {unknown} */(SentryModule)),\n  ],\n  sentry: {\n    lazy: true,\n    dsn: 'https://fe8b7df6ea7042f69d7a97c66c2934f7@sentry.io.nuxt/1429779',\n    clientIntegrations: {\n      // Integration from @Sentry/browser package.\n      TryCatch: { eventTarget: false },\n    },\n    customClientIntegrations: '~/config/custom-client-integrations.js',\n    tracing: true,\n  },\n  publicRuntimeConfig: {\n    sentry: {\n      config: {\n        environment: 'production',\n      },\n    },\n  },\n}\n\nmodule.exports = config\n"
  },
  {
    "path": "test/fixture/lazy/pages/index.vue",
    "content": "<template>\n  <div>\n    <h3>Server-side</h3>\n    <span id=\"server-side\">{{ serverSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span>\n    <h3>Client-side</h3>\n    <span id=\"client-side\">Works {{ isSentryReady ? 'and is' : 'but is not' }} ready!</span>\n  </div>\n</template>\n\n<script>\nexport default {\n  asyncData ({ $sentry }) {\n    if (process.server) {\n      return {\n        serverSentryPresent: Boolean($sentry?.captureException),\n      }\n    }\n  },\n  data () {\n    return {\n      isSentryReady: false,\n      serverSentryPresent: false,\n    }\n  },\n  created () {\n    if (process.client) {\n      const mockedSentry = this.$sentry\n      this.$sentryReady().then(() => {\n        this.isSentryReady = true\n        console.info('Sentry is ready')\n        // Verify that it doesn't crash.\n        mockedSentry.captureMessage('test')\n      })\n    }\n  },\n  mounted () {\n    this.$sentry.captureMessage('Hi!')\n  },\n}\n</script>\n"
  },
  {
    "path": "test/fixture/typescript/api/index.ts",
    "content": "import type { ServerMiddleware } from '@nuxt/types'\n\nexport default <ServerMiddleware> function serverRoute (req, res) {\n  // @ts-expect-error crash on purpose\n  apiCrash()\n  res.end('OK')\n}\n"
  },
  {
    "path": "test/fixture/typescript/config/custom-client-integrations.ts",
    "content": "import type { Integration } from '@sentry/types'\nimport type { Context } from '@nuxt/types'\n\nexport default async function (_context: Context): Promise<Integration[]> {\n  return []\n}\n"
  },
  {
    "path": "test/fixture/typescript/config/server.config.ts",
    "content": "import { ModuleOptions } from '../../../../src/types'\n\nexport default function (): ModuleOptions['serverConfig'] {\n  return {\n    beforeSend (event, _hint) {\n      event.extra = {\n        foo: '1',\n      }\n      return event\n    },\n  }\n}\n"
  },
  {
    "path": "test/fixture/typescript/nuxt.config.ts",
    "content": "import { fileURLToPath } from 'node:url'\nimport initJiti from 'jiti'\nimport type { NuxtConfig } from '@nuxt/types'\n\nconst jiti = initJiti(fileURLToPath(import.meta.url))\n\nconst config: NuxtConfig = {\n  rootDir: __dirname,\n  telemetry: false,\n  build: {\n    terser: false,\n  },\n  render: {\n    resourceHints: false,\n  },\n  buildModules: [\n    '@nuxt/typescript-build',\n  ],\n  modules: [\n    jiti.resolve('../../..'),\n  ],\n  publicRuntimeConfig: {\n    baseURL: 'http://localhost:3000',\n  },\n  sentry: {\n    dsn: 'https://fe8b7df6ea7042f69d7a97c66c2934f7@sentry.io.nuxt/1429779',\n    clientIntegrations: {\n      // Integration from @Sentry/browser package.\n      TryCatch: { eventTarget: false },\n      Replay: {},\n      Dedupe: false,\n    },\n    serverIntegrations: {\n      Modules: false,\n    },\n    clientConfig: {\n      // This sets the sample rate to be 10%. You may want this to be 100% while\n      // in development and sample at a lower rate in production\n      replaysSessionSampleRate: 0.1,\n      // If the entire session is not sampled, use the below sample rate to sample\n      // sessions when an error occurs.\n      replaysOnErrorSampleRate: 1.0,\n    },\n    customClientIntegrations: '~/config/custom-client-integrations.ts',\n    serverConfig: '~/config/server.config',\n    tracing: true,\n  },\n  serverMiddleware: [\n    { path: '/api', handler: '~/api/index' },\n  ],\n  typescript: {\n    typeCheck: false,\n  },\n}\n\nexport default config\n"
  },
  {
    "path": "test/fixture/typescript/pages/disabled-integrations.vue",
    "content": "<template>\n  <div>\n    <p>Integrations</p>\n    <p id=\"client\">\n      Dedupe: {{ clientDedupeDisabled ? 'DISABLED' : 'ENABLED' }}\n    </p>\n    <p id=\"server\">\n      Modules: {{ serverModulesDisabled ? 'DISABLED' : 'ENABLED' }}\n    </p>\n  </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\nimport type { BrowserClient } from '@sentry/browser'\nimport type { NodeClient } from '@sentry/node'\n\nexport default defineComponent({\n  asyncData ({ $sentry }) {\n    if (process.server) {\n      return {\n        serverModulesDisabled: $sentry.getClient<NodeClient>()!.getIntegrationByName('Modules') === undefined,\n      }\n    }\n  },\n  data () {\n    return {\n      clientDedupeDisabled: false,\n      serverModulesDisabled: false,\n    }\n  },\n  created () {\n    if (process.client) {\n      this.clientDedupeDisabled = this.$sentry.getClient<BrowserClient>()!.getIntegrationByName('Dedupe') === undefined\n    }\n  },\n})\n</script>\n"
  },
  {
    "path": "test/fixture/typescript/pages/index.vue",
    "content": "<template>\n  <div>\n    <h3>Server-side</h3>\n    <span id=\"server-side\">{{ serverSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span>\n    <h3>Client-side</h3>\n    <span id=\"client-side\">{{ clientSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span>\n    <p>\n      <button id=\"crash-button\" type=\"button\" @click=\"crash_me()\">\n        crash me\n      </button>\n    </p>\n  </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\n\nexport default defineComponent({\n  async asyncData ({ $sentry, $config, query }) {\n    if (query.crashOnLoad) {\n      // @ts-ignore forces a crash\n      crashOnLoad()\n    } else if (query.crashOnLoadInApi) {\n      // Request crashes but doesn't propagate to asyncData.\n      await fetch(`${$config.baseURL}/api`)\n    }\n\n    if (process.server) {\n      return {\n        serverSentryPresent: Boolean($sentry?.captureException),\n      }\n    }\n  },\n  data () {\n    return {\n      clientSentryPresent: false,\n      serverSentryPresent: false,\n    }\n  },\n  created () {\n    if (process.client) {\n      this.clientSentryPresent = Boolean(this.$sentry?.captureException)\n    }\n  },\n})\n</script>\n"
  },
  {
    "path": "test/fixture/typescript/tsconfig.json",
    "content": "{\n    \"extends\": \"../../tsconfig.json\",\n    \"compilerOptions\": {\n        \"types\": [\n            \"@nuxt/typescript-build\",\n        ]\n    },\n}\n"
  },
  {
    "path": "test/fixture/with-lazy-config/nuxt.config.cjs",
    "content": "const SentryModule = require('../../..')\n\n/** @type {import('@nuxt/types').NuxtConfig} */\nconst config = {\n  rootDir: __dirname,\n  telemetry: false,\n  dev: false,\n  render: {\n    resourceHints: false,\n  },\n  modules: [\n    /** @type {import('@nuxt/types').Module} */(/** @type {unknown} */(SentryModule)),\n  ],\n  sentry: {\n    dsn: 'https://fe8b7df6ea7042f69d7a97c66c2934f7@sentry.io.nuxt/1429779',\n    config: {},\n    lazy: {\n      mockApiMethods: [\n        'captureMessage',\n      ],\n      injectLoadHook: true,\n      chunkName: 'my-chunk',\n      webpackPreload: true,\n      webpackPrefetch: true,\n    },\n  },\n}\n\nmodule.exports = config\n"
  },
  {
    "path": "test/fixture/with-lazy-config/pages/index.vue",
    "content": "<template>\n  <div>\n    <h3>Server-side</h3>\n    <span id=\"server-side\">{{ serverSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span>\n    <h3>Client-side</h3>\n    <span id=\"client-side\">Works {{ isSentryReady ? 'and is' : 'but is not' }} ready!</span>\n  </div>\n</template>\n\n<script>\nexport default {\n  asyncData ({ $sentry }) {\n    if (process.server) {\n      return {\n        serverSentryPresent: Boolean($sentry?.captureException),\n      }\n    }\n  },\n  data () {\n    return {\n      isSentryReady: false,\n      serverSentryPresent: false,\n    }\n  },\n  created () {\n    if (process.client) {\n      this.$sentryReady().then(() => {\n        this.isSentryReady = true\n        console.info('Sentry is ready')\n      })\n    }\n  },\n  mounted () {\n    this.$sentry.captureMessage('Hi!')\n\n    try {\n      this.$sentry.captureEvent({ message: 'This should fail' })\n      console.error('The call to captureEvent should fail so this line shouldn\\'t be printed (on initial load only, this line will be printed on eg HMR)')\n    } catch (err) {\n      console.info('Caught expected error on $sentry.captureEvent')\n    }\n\n    this.$nextTick(() => {\n      console.info('Loading Sentry in 1 second')\n      setTimeout(this.$sentryLoad, 1000)\n    })\n  },\n}\n</script>\n"
  },
  {
    "path": "test/fixture/with-lazy-config/pages/mounted.vue",
    "content": "<template>\n  <div>\n    <h3>Server-side</h3>\n    <span id=\"server-side\">{{ serverSentry ? 'Works!' : '$sentry object is missing!' }}</span>\n    <h3>Client-side</h3>\n    <span id=\"client-side\">Works {{ isSentryReady ? 'and is' : 'but is not' }} ready!</span>\n  </div>\n</template>\n\n<script>\nexport default {\n  data () {\n    return {\n      isSentryReady: false,\n      /** @type {import('@sentry/core') | null} */\n      serverSentry: this.$sentry,\n    }\n  },\n  created () {\n    this.$sentryReady().then(() => {\n      this.isSentryReady = true\n      console.info('Sentry is ready')\n    })\n  },\n  mounted () {\n    this.$nextTick(() => {\n      console.info('Loading Sentry in 1 second')\n      setTimeout(this.$sentryLoad, 1000)\n    })\n\n    if (process.client) {\n      throw new Error('oeps')\n    }\n  },\n}\n</script>\n"
  },
  {
    "path": "test/lazy.test.ts",
    "content": "import { fileURLToPath } from 'url'\nimport { dirname } from 'path'\nimport { describe, afterAll, beforeAll, test, expect } from 'vitest'\nimport type { Browser } from 'playwright-chromium'\nimport sentryTestkit from 'sentry-testkit'\nimport { setup, url } from '@nuxtjs/module-test-utils'\nimport type { Nuxt } from '../src/kit-shim'\nimport { $$, createBrowser, loadConfig } from './utils'\n\nconst __filename = fileURLToPath(import.meta.url)\nconst __dirname = dirname(__filename)\n\nconst { localServer } = sentryTestkit.default()\nconst TEST_DSN = 'http://acacaeaccacacacabcaacdacdacadaca@sentry.io/000001'\n\ndescribe('Smoke test (lazy)', () => {\n  let nuxt: Nuxt\n  let browser: Browser\n\n  beforeAll(async () => {\n    await localServer.start(TEST_DSN)\n    const dsn = localServer.getDsn() ?? undefined\n    nuxt = (await setup(loadConfig(__dirname, 'lazy', { sentry: { dsn } }, { merge: true }))).nuxt\n    browser = await createBrowser()\n  })\n\n  afterAll(async () => {\n    if (browser) {\n      await browser.close()\n    }\n    await nuxt.close()\n    await localServer.stop()\n  })\n\n  test('builds, runs and there are no errors', async () => {\n    const page = await browser.newPage()\n\n    const errors: string[] = []\n    page.on('pageerror', (error) => {\n      errors.push(error.message)\n    })\n\n    const consoleMessages: string[] = []\n    page.on('console', (message) => {\n      consoleMessages.push(message.text())\n    })\n\n    await page.goto(url('/'))\n\n    // process.sentry is not initialized in webpack context in tests.\n    // expect(await $$('#server-side', page)).toBe('Works!')\n    expect(await $$('#client-side', page)).toBe('Works and is ready!')\n    expect(errors).toEqual([])\n    expect(consoleMessages).toEqual(['Sentry is ready'])\n  })\n})\n"
  },
  {
    "path": "test/options.test.ts",
    "content": "import { describe, test, expect } from 'vitest'\nimport { defu } from 'defu'\nimport { PartialModuleConfiguration } from '../src/types/configuration'\nimport { ResolvedClientOptions, ResolvedServerOptions, resolveClientOptions, resolveServerOptions } from '../src/options'\nimport { nuxtCtx, Nuxt, NuxtModule, useLogger } from '../src/kit-shim'\nimport { ModuleConfiguration } from '../src/types'\nimport SentryModule from '../src/module'\n\nconst DUMMY_LOGGER = useLogger('nuxt:sentry:test')\nconst DUMMY_NUXT = {\n  options: {\n    dev: false,\n    buildDir: '',\n  },\n} as Nuxt\n// Set mocked Nuxt in context.\nnuxtCtx.value = DUMMY_NUXT\n\nasync function createOptions (options: PartialModuleConfiguration): Promise<ModuleConfiguration> {\n  const { getOptions } = SentryModule as NuxtModule<ModuleConfiguration>\n  return defu(options, getOptions ? await getOptions() : {}) as ModuleConfiguration\n}\n\ndescribe('Resolve Client Options', () => {\n  test('includes default values', async () => {\n    const options = await createOptions({\n      dsn: '123',\n    })\n    const resolvedOptions = await resolveClientOptions(DUMMY_NUXT, options, DUMMY_LOGGER)\n    expect(resolvedOptions).toMatchObject<Partial<ResolvedClientOptions>>({\n      config: {\n        dsn: '123',\n        environment: 'production',\n      },\n      integrations: {\n        extraErrorDataIntegration: {},\n        reportingObserverIntegration: {},\n      },\n      lazy: false,\n      logMockCalls: true,\n      tracing: false,\n    })\n  })\n\n  test('can override dsn in clientConfig', async () => {\n    const options = await createOptions({\n      dsn: '123',\n      clientConfig: {\n        dsn: '321',\n      },\n    })\n    const resolvedOptions = await resolveClientOptions(DUMMY_NUXT, options, DUMMY_LOGGER)\n    expect(resolvedOptions).toMatchObject<Partial<ResolvedClientOptions>>({\n      config: {\n        dsn: '321',\n      },\n    })\n  })\n\n  test('resolves tracing options', async () => {\n    const options = await createOptions({\n      dsn: '123',\n      tracing: true,\n    })\n    const resolvedOptions = await resolveClientOptions(DUMMY_NUXT, options, DUMMY_LOGGER)\n    expect(resolvedOptions).toMatchObject<Partial<ResolvedClientOptions>>({\n      config: {\n        dsn: '123',\n        environment: 'production',\n      },\n      integrations: {\n        extraErrorDataIntegration: {},\n        reportingObserverIntegration: {},\n      },\n      lazy: false,\n      logMockCalls: true,\n      tracing: {\n        browserTracing: {},\n        tracesSampleRate: 1,\n        vueOptions: {\n          trackComponents: true,\n        },\n      },\n    })\n  })\n\n  test('can override tracesSampleRate', async () => {\n    const options = await createOptions({\n      dsn: '123',\n      tracing: {\n        tracesSampleRate: 0.8,\n      },\n    })\n    const resolvedOptions = await resolveClientOptions(DUMMY_NUXT, options, DUMMY_LOGGER)\n    expect(resolvedOptions).toMatchObject<Partial<ResolvedClientOptions>>({\n      config: {\n        tracesSampleRate: 0.8,\n      },\n    })\n  })\n})\n\ndescribe('Resolve Server Options', () => {\n  test('includes default values', async () => {\n    const options = await createOptions({\n      dsn: '123',\n    })\n    const resolvedOptions = await resolveServerOptions(DUMMY_NUXT, options, DUMMY_LOGGER)\n    expect(resolvedOptions).toMatchObject<Partial<ResolvedServerOptions>>({\n      config: {\n        dsn: '123',\n        environment: 'production',\n      },\n      lazy: false,\n      logMockCalls: true,\n      tracing: false,\n    })\n    expect(resolvedOptions.config.integrations).not.toBeUndefined()\n    const integrations = Array.isArray(resolvedOptions.config.integrations)\n      ? resolvedOptions.config.integrations\n      : resolvedOptions.config.integrations!([])\n    expect(integrations).toBeTruthy()\n    expect(integrations?.map(integration => integration.name)).toEqual(expect.arrayContaining(['Dedupe', 'ExtraErrorData', 'RewriteFrames']))\n  })\n\n  test('can override dsn in serverConfig', async () => {\n    const options = await createOptions({\n      dsn: '123',\n      serverConfig: {\n        dsn: '321',\n      },\n    })\n    const resolvedOptions = await resolveServerOptions(DUMMY_NUXT, options, DUMMY_LOGGER)\n    expect(resolvedOptions).toMatchObject<Partial<ResolvedServerOptions>>({\n      config: {\n        dsn: '321',\n      },\n    })\n  })\n\n  test('resolves tracing options', async () => {\n    const options = await createOptions({\n      dsn: '123',\n      tracing: true,\n    })\n    const resolvedOptions = await resolveServerOptions(DUMMY_NUXT, options, DUMMY_LOGGER)\n    expect(resolvedOptions).toMatchObject<Partial<ResolvedServerOptions>>({\n      config: {\n        dsn: '123',\n        environment: 'production',\n        tracesSampleRate: 1,\n      },\n      tracing: {\n        browserTracing: {},\n        tracesSampleRate: 1,\n        vueOptions: {\n          trackComponents: true,\n        },\n        vueRouterInstrumentationOptions: {\n          routeLabel: 'name',\n        },\n      },\n    })\n    expect(resolvedOptions.config.integrations).not.toBeUndefined()\n    const integrations = Array.isArray(resolvedOptions.config.integrations)\n      ? resolvedOptions.config.integrations\n      : resolvedOptions.config.integrations!([])\n    expect(integrations).toBeTruthy()\n    expect(integrations?.map(integration => integration.name)).toEqual(expect.arrayContaining(['Http', 'Dedupe', 'ExtraErrorData', 'RewriteFrames']))\n  })\n\n  test('can override tracesSampleRate', async () => {\n    const options = await createOptions({\n      dsn: '123',\n      tracing: {\n        tracesSampleRate: 0.8,\n      },\n    })\n    const resolvedOptions = await resolveServerOptions(DUMMY_NUXT, options, DUMMY_LOGGER)\n    expect(resolvedOptions).toMatchObject<Partial<ResolvedServerOptions>>({\n      config: {\n        tracesSampleRate: 0.8,\n      },\n    })\n  })\n})\n"
  },
  {
    "path": "test/tsconfig.json",
    "content": "{\n    \"extends\": \"../tsconfig.json\",\n    \"include\": [\n        \"./**/*\",\n        \"../types/*.ts\",\n        // \"./**/.nuxt/sentry.*\",\n    ]\n}\n"
  },
  {
    "path": "test/typescript.test.ts",
    "content": "import { fileURLToPath } from 'url'\nimport { dirname } from 'path'\nimport { describe, afterAll, beforeAll, beforeEach, test, expect } from 'vitest'\nimport type { Browser } from 'playwright-chromium'\nimport sentryTestkit from 'sentry-testkit'\nimport type { NuxtConfig } from '@nuxt/types'\nimport { generatePort, setup, url } from '@nuxtjs/module-test-utils'\nimport type { Nuxt } from '../src/kit-shim'\nimport { $$, createBrowser, loadConfig } from './utils'\n\nconst __filename = fileURLToPath(import.meta.url)\nconst __dirname = dirname(__filename)\n\nconst { testkit, localServer } = sentryTestkit.default()\nconst TEST_DSN = 'http://acacaeaccacacacabcaacdacdacadaca@sentry.io/000001'\n\ndescribe('Smoke test (typescript)', () => {\n  let nuxt: Nuxt\n  let browser: Browser\n\n  beforeAll(async () => {\n    await localServer.start(TEST_DSN)\n    const dsn = localServer.getDsn()!\n    const port = await generatePort()\n    const overrides: NuxtConfig = {\n      sentry: { dsn },\n      server: { port },\n      publicRuntimeConfig: { baseURL: url('') },\n    }\n    const config = loadConfig(__dirname, 'typescript', overrides, { merge: true })\n    nuxt = (await setup(config)).nuxt\n    browser = await createBrowser()\n  })\n\n  afterAll(async () => {\n    if (browser) {\n      await browser.close()\n    }\n    await nuxt.close()\n    await localServer.stop()\n  })\n\n  beforeEach(() => {\n    testkit.reset()\n  })\n\n  test('builds and runs', async () => {\n    const page = await browser.newPage()\n    const errors: string[] = []\n    page.on('pageerror', (error) => {\n      errors.push(error.message)\n    })\n    await page.goto(url('/'))\n\n    // process.sentry is not initialized in webpack context in tests.\n    // expect(await $$('#server-side', page)).toBe('Works!')\n    expect(await $$('#client-side', page)).toBe('Works!')\n    expect(errors).toEqual([])\n  })\n\n  test('reads serverConfig from external file', async () => {\n    const page = await browser.newPage()\n    const response = await page.goto(url('/?crashOnLoad=1'))\n    expect(response!.status()).toBe(500)\n\n    const reports = testkit.reports()\n    expect(reports).toHaveLength(1)\n    expect(reports[0].error?.message).toContain('crashOnLoad is not defined')\n    // Coming from `serverConfig` file-based configuration\n    expect(reports[0].extra).toBeDefined()\n    expect(reports[0].extra!.foo).toBe('1')\n  })\n\n  test('catches a server crash in server middleware', async () => {\n    const page = await browser.newPage()\n    const response = await page.goto(url('/?crashOnLoadInApi=1'))\n    expect(response!.status()).toBe(200)\n\n    const reports = testkit.reports()\n    expect(reports).toHaveLength(1)\n    expect(reports[0].error?.message).toContain('apiCrash is not defined')\n    expect(reports[0].error?.stacktrace).toMatchObject({\n      frames: expect.arrayContaining([\n        expect.objectContaining({\n          filename: 'app:///api/index.ts',\n        }),\n      ]),\n    })\n  })\n\n  test('catches a client crash', async () => {\n    const page = await browser.newPage()\n    await page.goto(url('/'))\n\n    expect(await $$('#client-side', page)).toBe('Works!')\n    await page.click('#crash-button')\n    const reports = testkit.reports()\n    expect(reports).toHaveLength(1)\n    expect(reports[0].error?.message).toContain('crash_me is not a function')\n  })\n\n  test('can disable integrations that SDK enables by default', async () => {\n    const page = await browser.newPage()\n    await page.goto(url('/disabled-integrations'))\n\n    const clientParagraph = await $$('#client', page)\n    expect(clientParagraph).not.toBeNull()\n    expect(clientParagraph!.trim()).toBe('Dedupe: DISABLED')\n\n    const serverParagraph = await $$('#server', page)\n    expect(serverParagraph).not.toBeNull()\n    expect(serverParagraph!.trim()).toBe('Modules: DISABLED')\n  })\n\n  // TODO: Add tests for custom integration. Blocked by various sentry-kit bugs reported in its repo.\n})\n"
  },
  {
    "path": "test/utils.ts",
    "content": "import { fileURLToPath } from 'node:url'\nimport initJiti from 'jiti'\nimport { defu } from 'defu'\nimport { join } from 'pathe'\nimport { NuxtConfig } from '@nuxt/types'\nimport { chromium, Browser, Page } from 'playwright-chromium'\n\nconst jitiImport = initJiti(fileURLToPath(import.meta.url))\n\nexport async function createBrowser (): Promise<Browser> {\n  return await chromium.launch()\n}\n\n/**\n * @param {string} selector\n * @param {Page} page\n */\nexport async function $$ (selector: string, page: Page): Promise<string | null> {\n  const element = await page.$(selector)\n  if (element) {\n    return await element.textContent()\n  }\n  return null\n}\n\nexport function loadConfig (dir: string, fixture: string | null = null, override: NuxtConfig = {}, { merge = false } = {}): NuxtConfig {\n  const fixtureConfig = jitiImport(join(dir, 'fixture', fixture ?? '', 'nuxt.config'))\n  const config = Object.assign({}, fixtureConfig.default || fixtureConfig)\n\n  if (merge) {\n    return defu(override, config)\n  } else {\n    return {\n      ...defu(config),\n      ...defu(override),\n    }\n  }\n}\n"
  },
  {
    "path": "test/with-lazy-config.test.ts",
    "content": "import { fileURLToPath } from 'url'\nimport { dirname } from 'path'\nimport { describe, afterAll, beforeAll, test, expect } from 'vitest'\nimport type { Browser } from 'playwright-chromium'\nimport sentryTestkit from 'sentry-testkit'\nimport { setup, url } from '@nuxtjs/module-test-utils'\nimport type { Nuxt } from '../src/kit-shim'\nimport { $$, createBrowser, loadConfig } from './utils'\n\nconst __filename = fileURLToPath(import.meta.url)\nconst __dirname = dirname(__filename)\n\nconst { localServer } = sentryTestkit.default()\nconst TEST_DSN = 'http://acacaeaccacacacabcaacdacdacadaca@sentry.io/000001'\n\ndescribe('Smoke test (lazy config)', () => {\n  let nuxt: Nuxt\n  let browser: Browser\n\n  beforeAll(async () => {\n    await localServer.start(TEST_DSN)\n    const dsn = localServer.getDsn() ?? undefined\n    nuxt = (await setup(loadConfig(__dirname, 'with-lazy-config', { sentry: { dsn } }, { merge: true }))).nuxt\n    browser = await createBrowser()\n  })\n\n  afterAll(async () => {\n    if (browser) {\n      await browser.close()\n    }\n    await nuxt.close()\n    await localServer.stop()\n  })\n\n  test('builds and runs', async () => {\n    const page = await browser.newPage()\n    const messages: string[] = []\n    page.on('console', (msg) => {\n      messages.push(msg.text())\n    })\n    const errors: string[] = []\n    page.on('pageerror', (error) => {\n      errors.push(error.message)\n    })\n    await page.goto(url('/'))\n\n    expect(messages).toEqual(expect.arrayContaining(['Caught expected error on $sentry.captureEvent']))\n    expect(messages).toEqual(expect.arrayContaining(['Loading Sentry in 1 second']))\n    // process.sentry is not initialized in webpack context in tests.\n    // expect(await $$('#server-side', page)).toBe('Works!')\n    expect(await $$('#client-side', page)).toBe('Works but is not ready!')\n    await page.waitForTimeout(1100)\n    expect(await $$('#client-side', page)).toBe('Works and is ready!')\n    expect(messages).toEqual(expect.arrayContaining(['Sentry is ready']))\n    expect(errors).toEqual([])\n  })\n})\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"noErrorTruncation\": true,\n    \"allowJs\": true,\n    \"checkJs\": true,\n    \"esModuleInterop\": true,\n    \"lib\": [\n      \"ESNext\",\n      \"dom\",\n    ],\n    \"paths\": {\n      \"~@sentry/browser\": [\n        \"./node_modules/@sentry/browser\"\n      ],\n      \"~@sentry/core\": [\n        \"./node_modules/@sentry/core\"\n      ],\n      \"~@sentry/integrations\": [\n        \"./node_modules/@sentry/integrations\"\n      ],\n      \"~@sentry/utils\": [\n        \"./node_modules/@sentry/utils\"\n      ],\n      \"~@sentry/vue\": [\n        \"./node_modules/@sentry/vue\"\n      ],\n    },\n    \"target\": \"ESNext\",\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"Bundler\",\n    \"noEmit\": true,\n    \"strict\": true,\n    \"types\": [\n      \"node\",\n      \"vitest\",\n    ],\n  },\n  \"files\": [\n    \"./build.config.ts\",\n    \"./src/module.ts\",\n    \"./vitest.config.ts\",\n  ],\n  \"include\": [\n    \"./size-check/\",\n    \"./types/**.ts\",\n  ],\n  \"exclude\": [\n    \"**/dist\",\n    \"./node_modules/\",\n    \"./src/templates/client.*.js\",\n    \"./src/templates/plugin.*.js\",\n  ]\n}\n"
  },
  {
    "path": "types/vuex.d.ts",
    "content": "// Workaround for broken vuex export definition: https://github.com/vuejs/vuex/issues/2213\ndeclare module 'vuex' {\n  export * from 'vuex/types/index.d.ts'\n}\n"
  },
  {
    "path": "vitest.config.ts",
    "content": "import { defineConfig } from 'vitest/config'\n\nexport default defineConfig({\n  test: {\n    hookTimeout: 30000,\n    onConsoleLog (log, type) {\n      if (type === 'stderr') {\n        return false\n      }\n    },\n  },\n})\n"
  }
]