Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@ storybook-static
.agents
.vscode/mcp.json
AGENTS.md

# Sentry Config File
.env.sentry-build-plugin
54 changes: 45 additions & 9 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default defineNuxtConfig({
'@vueuse/nuxt',
'@nuxtjs/i18n',
'@nuxtjs/color-mode',
'@sentry/nuxt/module',
...(isStorybook ? [] : ['@nuxt/fonts']),
],

Expand Down Expand Up @@ -129,10 +130,22 @@ export default defineNuxtConfig({
allowQuery: ['offset', 'limit'],
},
},
'/api/registry/docs/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
'/api/registry/file/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
'/api/registry/provenance/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
'/api/registry/files/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
'/api/registry/docs/**': {
isr: true,
cache: { maxAge: 365 * 24 * 60 * 60 },
},
'/api/registry/file/**': {
isr: true,
cache: { maxAge: 365 * 24 * 60 * 60 },
},
'/api/registry/provenance/**': {
isr: true,
cache: { maxAge: 365 * 24 * 60 * 60 },
},
'/api/registry/files/**': {
isr: true,
cache: { maxAge: 365 * 24 * 60 * 60 },
},
'/api/registry/package-meta/**': { isr: 300 },
'/:pkg/.well-known/skills/**': { isr: 3600 },
'/:scope/:pkg/.well-known/skills/**': { isr: 3600 },
Expand Down Expand Up @@ -192,15 +205,25 @@ export default defineNuxtConfig({
'/leaderboard/likes': getISRConfig(900),
'/package/**': getISRConfig(300, { fallback: 'html' }),
'/package/:name/_payload.json': getISRConfig(300, { fallback: 'json' }),
'/package/:name/v/:version/_payload.json': getISRConfig(300, { fallback: 'json' }),
'/package/:org/:name/_payload.json': getISRConfig(300, { fallback: 'json' }),
'/package/:org/:name/v/:version/_payload.json': getISRConfig(300, { fallback: 'json' }),
'/package/:name/v/:version/_payload.json': getISRConfig(300, {
fallback: 'json',
}),
'/package/:org/:name/_payload.json': getISRConfig(300, {
fallback: 'json',
}),
'/package/:org/:name/v/:version/_payload.json': getISRConfig(300, {
fallback: 'json',
}),
// infinite cache (versioned - doesn't change)
'/package-code/**': {
headers: { 'Cache-Control': 'public, s-maxage=31536000, stale-while-revalidate=31536000' },
headers: {
'Cache-Control': 'public, s-maxage=31536000, stale-while-revalidate=31536000',
},
},
'/package-docs/**': {
headers: { 'Cache-Control': 'public, s-maxage=31536000, stale-while-revalidate=31536000' },
headers: {
'Cache-Control': 'public, s-maxage=31536000, stale-while-revalidate=31536000',
},
},
// static pages
'/': { prerender: true },
Expand Down Expand Up @@ -442,6 +465,19 @@ export default defineNuxtConfig({
imports: {
dirs: ['~/composables', '~/composables/*/*.ts'],
},

// @ts-expect-error FIXME later
sentry: {
org: 'npmxdev',
project: 'npmx',
sourcemaps: {
// This will delete all .map files in the build output after uploading them to Sentry. Modify as needed.
// For more information, see: https://docs.sentry.io/platforms/javascript/guides/nuxt/sourcemaps/
filesToDeleteAfterUpload: ['.*/**/*.map'],
},
autoInjectServerSentry: 'top-level-import',
},
sourcemap: { client: 'hidden' },
})

interface ISRConfigOptions {
Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"@nuxtjs/color-mode": "4.0.0",
"@nuxtjs/html-validator": "2.1.0",
"@nuxtjs/i18n": "10.2.4",
"@sentry/nuxt": "^10",
"@shikijs/langs": "4.0.2",
"@shikijs/markdown-exit": "4.0.2",
"@shikijs/themes": "4.0.2",
Expand All @@ -88,6 +89,7 @@
"fast-npm-meta": "1.4.2",
"focus-trap": "^8.0.0",
"gray-matter": "4.0.3",
"import-in-the-middle": "3.0.2",
"ipaddr.js": "2.3.0",
"marked": "18.0.0",
"module-replacements": "3.0.0-beta.8",
Expand Down Expand Up @@ -154,6 +156,11 @@
"node": "24"
},
"packageManager": "pnpm@11.1.1",
"pnpm": {
"overrides": {
"@vercel/nft": "^0.27.4"
}
},
"storybook": {
"url": "https://storybook.npmx.dev"
}
Expand Down
Loading
Loading