{"_id":"@ah-monica/next","_rev":"8-b0f0a4f17843bcb286cef1b65ac399fb","name":"@ah-monica/next","dist-tags":{"latest":"0.4.1"},"versions":{"0.1.0":{"name":"@ah-monica/next","version":"0.1.0","license":"Apache-2.0","_id":"@ah-monica/next@0.1.0","maintainers":[{"name":"kkyosuke","email":"kawamura@accelhack.com"}],"homepage":"https://github.com/Accel-Hack/monica#readme","bugs":{"url":"https://github.com/Accel-Hack/monica/issues"},"dist":{"shasum":"9ed2c15b85b6f1c55710fb1ecfab9ff7a992b8f1","tarball":"https://registry.npmjs.org/@ah-monica/next/-/next-0.1.0.tgz","fileCount":15,"integrity":"sha512-XKvOPpUQyA/MKYnyL6Kr6IpV3mZnx1eyEzVeka+l8wcsvMMvBnMJ5IFNY+Zb6vtgMMfmHATV6BIXPEV2PNMnYw==","signatures":[{"sig":"MEUCIQCI0vcXhFBmmifJOr9fRGNoafgzBJ9osD/+FpoHmImGUQIgaF3xqlIEQ7a1Gu9AsuK6bPq6IuVz3Sp193dO5bqwu0E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30130},"type":"module","engines":{"node":">=20.9"},"exports":{"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js"},"./server":{"types":"./dist/server/index.d.ts","import":"./dist/server/index.js"}},"scripts":{"test":"bun run build:dependencies && bun test","build":"bun run build:dependencies && tsc -p tsconfig.build.json","typecheck":"bun run build:dependencies && tsc --noEmit","pack:check":"bun run build && bun pm pack --dry-run","test:runtime":"node --conditions react-server test/runtime-smoke.mjs","test:next-build":"bun run build && node test/next-build-smoke.mjs","build:dependencies":"bun run --filter @ah-monica/core build && bun run --filter @ah-monica/node build"},"_npmUser":{"name":"kkyosuke","email":"kawamura@accelhack.com"},"repository":{"url":"git+https://github.com/Accel-Hack/monica.git","type":"git","directory":"sdk/typescript/next"},"_npmVersion":"11.19.1","description":"Next.js client and server adapters for the MONICA SDK","directories":{},"sideEffects":["./dist/server/index.js"],"_nodeVersion":"22.23.0","dependencies":{"server-only":"0.0.1","@ah-monica/core":"0.1.0","@ah-monica/node":"0.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"next":"16.3.3","react":"19.2.8","react-dom":"19.2.8","@types/bun":"^1.2.21","typescript":"^5.9.2","@types/node":"^24.0.0","@types/react":"^19.2.0","@types/react-dom":"^19.2.0"},"peerDependencies":{"next":">=15.3 <17"},"_npmOperationalInternal":{"tmp":"tmp/next_0.1.0_1788039409082_0.4732364828584994","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@ah-monica/next","version":"0.1.2","license":"Apache-2.0","_id":"@ah-monica/next@0.1.2","maintainers":[{"name":"kkyosuke","email":"kawamura@accelhack.com"},{"name":"namnam34","email":"namba_ryota@accelhack.com"}],"homepage":"https://github.com/Accel-Hack/monica-sdk-js#readme","bugs":{"url":"https://github.com/Accel-Hack/monica-sdk-js/issues"},"dist":{"shasum":"799f894c92e577ef8aa3112e1eb8b02916993111","tarball":"https://registry.npmjs.org/@ah-monica/next/-/next-0.1.2.tgz","fileCount":17,"integrity":"sha512-4A0PWcE51FnOxUFJoAOIMWlx1myJjYMRZ+bbVErJRt7iP9F59HLr4G70eSrMkzDvBcAGuboT+kmZ13fcc8AgxA==","signatures":[{"sig":"MEUCIGEGjh7Z357pvjrGiqyFPTSdICpt418hlHpktk+/w+0KAiEA4PvxMqoWLxOU2D4bKl1kYrDF+3vsAALVI2ZRJcPc/RY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ah-monica%2fnext@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":31794},"type":"module","engines":{"node":">=20.9"},"exports":{"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js"},"./server":{"types":"./dist/server/index.d.ts","import":"./dist/server/index.js"}},"gitHead":"fef6c6301fc29c3d036ec980c2c562c7b5f6af5d","scripts":{"test":"bun run build:dependencies && bun test","build":"bun run build:dependencies && tsc -p tsconfig.build.json","typecheck":"bun run build:dependencies && tsc --noEmit","pack:check":"bun run build && bun pm pack --dry-run","test:runtime":"node --conditions react-server test/runtime-smoke.mjs","test:next-build":"bun run build && node test/next-build-smoke.mjs","build:dependencies":"bun run --filter @ah-monica/core build && bun run --filter @ah-monica/node build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7782a833-a0a9-45ae-8459-179e4d50f9c0"}},"repository":{"url":"git+https://github.com/Accel-Hack/monica-sdk-js.git","type":"git","directory":"next"},"_npmVersion":"11.19.1","description":"Next.js client and server adapters for the MONICA SDK","directories":{},"sideEffects":["./dist/server/index.js"],"_nodeVersion":"24.20.0","dependencies":{"server-only":"0.0.1","@ah-monica/core":"0.1.2","@ah-monica/node":"0.1.2"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"next":"16.3.3","react":"19.2.8","react-dom":"19.2.8","@types/bun":"^1.2.21","typescript":"^5.9.2","@types/node":"^24.0.0","@types/react":"^19.2.0","@types/react-dom":"^19.2.0"},"peerDependencies":{"next":">=15.3 <17"},"_npmOperationalInternal":{"tmp":"tmp/next_0.1.2_1789004428962_0.972204449552234","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@ah-monica/next","version":"0.2.0","license":"Apache-2.0","_id":"@ah-monica/next@0.2.0","maintainers":[{"name":"kkyosuke","email":"kawamura@accelhack.com"},{"name":"namnam34","email":"namba_ryota@accelhack.com"}],"homepage":"https://github.com/Accel-Hack/monica-sdk-js#readme","bugs":{"url":"https://github.com/Accel-Hack/monica-sdk-js/issues"},"dist":{"shasum":"0bb540aaff265d6b594045670d258059d8e4d341","tarball":"https://registry.npmjs.org/@ah-monica/next/-/next-0.2.0.tgz","fileCount":17,"integrity":"sha512-vmQkwPlQ/m/dG+sBcvvfEAKAbzUybOPVAcpl6KYpgS/WP6Bohi8ERQHjkn53xNQL+Wq0foOoGBNSYRtxzN2mcQ==","signatures":[{"sig":"MEYCIQDc1sqaba33d8flp6BBg9tEbt8PO9wtQqTKVIK1ig4mLgIhALHLfXZQAlg4Vn/URv+i0vsws0HxGFs0RrtNFimFs9Uq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ah-monica%2fnext@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":33033},"type":"module","engines":{"node":">=20.9"},"exports":{"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js"},"./server":{"types":"./dist/server/index.d.ts","import":"./dist/server/index.js"}},"gitHead":"710a43a9849dba9f1c2ce98a45652d0d59f3a91a","scripts":{"test":"bun run build:dependencies && bun test","build":"bun run build:dependencies && tsc -p tsconfig.build.json","typecheck":"bun run build:dependencies && tsc --noEmit","pack:check":"bun run build && bun pm pack --dry-run","test:runtime":"node --conditions react-server test/runtime-smoke.mjs","test:next-build":"bun run build && node test/next-build-smoke.mjs","build:dependencies":"bun run --filter @ah-monica/core build && bun run --filter @ah-monica/node build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7782a833-a0a9-45ae-8459-179e4d50f9c0"}},"repository":{"url":"git+https://github.com/Accel-Hack/monica-sdk-js.git","type":"git","directory":"next"},"_npmVersion":"11.19.1","description":"Next.js client and server adapters for the MONICA SDK","directories":{},"sideEffects":["./dist/server/index.js"],"_nodeVersion":"24.20.0","dependencies":{"server-only":"0.0.1","@ah-monica/core":"0.2.0","@ah-monica/node":"0.2.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"next":"16.3.3","react":"19.2.8","react-dom":"19.2.8","@types/bun":"^1.2.21","typescript":"^5.9.2","@types/node":"^24.0.0","@types/react":"^19.2.0","@types/react-dom":"^19.2.0"},"peerDependencies":{"next":">=15.3 <17"},"_npmOperationalInternal":{"tmp":"tmp/next_0.2.0_1789034603819_0.6989406049033953","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@ah-monica/next","version":"0.2.1","license":"Apache-2.0","_id":"@ah-monica/next@0.2.1","maintainers":[{"name":"kkyosuke","email":"kawamura@accelhack.com"},{"name":"namnam34","email":"namba_ryota@accelhack.com"}],"homepage":"https://github.com/Accel-Hack/monica-sdk-js#readme","bugs":{"url":"https://github.com/Accel-Hack/monica-sdk-js/issues"},"dist":{"shasum":"6a1424c199cb7c7af79bf17bfcfe7b8eda864259","tarball":"https://registry.npmjs.org/@ah-monica/next/-/next-0.2.1.tgz","fileCount":17,"integrity":"sha512-uTJjiofjY83LbhyQ8x/BISiRIV0WFTOS2mPBNleSTlprwMd8UnJYAkL0QqfsqpE5O1o393sTqzxa8otGHkbjRg==","signatures":[{"sig":"MEYCIQDMkxHzPy7dxLUosjpOB9P2WkYyrWpbqi2tdwlBOFxV7QIhALXYDTK1NOErpkSsPIoJDqwaG4NdLFisKI2r1+sLR3sx","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ah-monica%2fnext@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":33581},"type":"module","engines":{"node":">=20.9"},"exports":{"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js"},"./server":{"types":"./dist/server/index.d.ts","import":"./dist/server/index.js"}},"gitHead":"6ccb8fc3a6ed26a1cee976602bba04f0d5891db1","scripts":{"test":"bun run build:dependencies && bun test","build":"bun run build:dependencies && tsc -p tsconfig.build.json","typecheck":"bun run build:dependencies && tsc --noEmit","pack:check":"bun run build && bun pm pack --dry-run","test:runtime":"node --conditions react-server test/runtime-smoke.mjs","test:next-build":"bun run build && node test/next-build-smoke.mjs","build:dependencies":"bun run --filter @ah-monica/core build && bun run --filter @ah-monica/node build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7782a833-a0a9-45ae-8459-179e4d50f9c0"}},"repository":{"url":"git+https://github.com/Accel-Hack/monica-sdk-js.git","type":"git","directory":"next"},"_npmVersion":"11.19.1","description":"Next.js client and server adapters for the MONICA SDK","directories":{},"sideEffects":["./dist/server/index.js"],"_nodeVersion":"24.20.0","dependencies":{"server-only":"0.0.1","@ah-monica/core":"0.2.1","@ah-monica/node":"0.2.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"next":"16.3.3","react":"19.2.8","react-dom":"19.2.8","@types/bun":"^1.2.21","typescript":"^5.9.2","@types/node":"^24.0.0","@types/react":"^19.2.0","@types/react-dom":"^19.2.0"},"peerDependencies":{"next":">=15.3 <17"},"_npmOperationalInternal":{"tmp":"tmp/next_0.2.1_1789097587371_0.7852116552155681","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@ah-monica/next","version":"0.3.0","license":"Apache-2.0","_id":"@ah-monica/next@0.3.0","maintainers":[{"name":"kkyosuke","email":"kawamura@accelhack.com"},{"name":"namnam34","email":"namba_ryota@accelhack.com"}],"homepage":"https://github.com/Accel-Hack/monica-sdk-js#readme","bugs":{"url":"https://github.com/Accel-Hack/monica-sdk-js/issues"},"dist":{"shasum":"e62817c7fe6ddf9802de9374c8b710b627bd0144","tarball":"https://registry.npmjs.org/@ah-monica/next/-/next-0.3.0.tgz","fileCount":17,"integrity":"sha512-9FqGsBiCWvkqXFYP+PVhODIvo8X8RLUmPsZ5/YD1fXo5BkDld82mVh6ALDiwCQ275O49p6porTPt+C1tTwsv1A==","signatures":[{"sig":"MEQCIHr8UOHTshEktet7POwIWP6q4RVmZBhi9UfUcIzL3yFgAiA/ThEVeUGfvZUHwJSLNFNeOsEQjfi1NlKXehsuPD6Utw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIE7BORXnwvdw1LigalxCCG2gLMRRe8fAhnDTwh0PRoTCAiEA4PlgF0kbPXMkJ54ud9ADDbam2bKy08kuL2tnCiP2pB0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ah-monica%2fnext@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":34796},"type":"module","engines":{"node":">=20.9"},"exports":{"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js"},"./server":{"types":"./dist/server/index.d.ts","import":"./dist/server/index.js"}},"gitHead":"ff961deaf85cd3e52d04e6857044944f841bba46","scripts":{"test":"bun run build:dependencies && bun test","build":"bun run build:dependencies && tsc -p tsconfig.build.json","typecheck":"bun run build:dependencies && tsc --noEmit","pack:check":"bun run build && bun pm pack --dry-run","test:runtime":"node --conditions react-server test/runtime-smoke.mjs","test:next-build":"bun run build && node test/next-build-smoke.mjs","build:dependencies":"bun run --filter @ah-monica/core build && bun run --filter @ah-monica/node build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7782a833-a0a9-45ae-8459-179e4d50f9c0"}},"repository":{"url":"git+https://github.com/Accel-Hack/monica-sdk-js.git","type":"git","directory":"next"},"_npmVersion":"11.19.1","description":"Next.js client and server adapters for the MONICA SDK","directories":{},"sideEffects":["./dist/server/index.js"],"_nodeVersion":"24.20.0","dependencies":{"server-only":"0.0.1","@ah-monica/core":"0.3.0","@ah-monica/node":"0.3.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"next":"16.3.3","react":"19.2.8","react-dom":"19.2.8","@types/bun":"^1.2.21","typescript":"^5.9.2","@types/node":"^24.0.0","@types/react":"^19.2.0","@types/react-dom":"^19.2.0"},"peerDependencies":{"next":">=15.3 <17"},"_npmOperationalInternal":{"tmp":"tmp/next_0.3.0_1790226280205_0.5812922261776039","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@ah-monica/next","version":"0.4.0","license":"Apache-2.0","_id":"@ah-monica/next@0.4.0","maintainers":[{"name":"kkyosuke","email":"kawamura@accelhack.com"},{"name":"namnam34","email":"namba_ryota@accelhack.com"}],"homepage":"https://github.com/Accel-Hack/monica-sdk-js#readme","bugs":{"url":"https://github.com/Accel-Hack/monica-sdk-js/issues"},"dist":{"shasum":"76784ac844131c85dde1f6a1f01009ad49e13a82","tarball":"https://registry.npmjs.org/@ah-monica/next/-/next-0.4.0.tgz","fileCount":17,"integrity":"sha512-4AO7nAeJRA7iRN9W7TepOJCFF7AUIySq52OkArmu0SnodfTSZ3KP10o6C9HKhg9o6oyRV3QpPS9jGo20V6FP/A==","signatures":[{"sig":"MEQCICtBoEaX+LY4ZsuWhjEgbrDRXzMyWWfewj12mbt7yELHAiAC6XBAd3JJwj7IUKoIkCpRFpWkK9Sic+jznA8+YWunGg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIBxq84qLsznjhNb7STb/rkk8B96FytMt4FFfmZrEeo5UAiBZWTbJPMJkEKAF25z1/Q1py0du4k9Hdn9R1QD+XBD6VA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ah-monica%2fnext@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":39354},"type":"module","engines":{"node":">=20.9"},"exports":{"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js"},"./server":{"types":"./dist/server/index.d.ts","import":"./dist/server/index.js"}},"gitHead":"5302bc5a3a31ba74743de4015f3bc91fa66f07ce","scripts":{"test":"bun run build:dependencies && bun test","build":"bun run build:dependencies && tsc -p tsconfig.build.json","typecheck":"bun run build:dependencies && tsc --noEmit","pack:check":"bun run build && bun pm pack --dry-run","test:runtime":"node --conditions react-server test/runtime-smoke.mjs","test:next-build":"bun run build && node test/next-build-smoke.mjs","build:dependencies":"bun run --filter @ah-monica/core build && bun run --filter @ah-monica/node build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"7782a833-a0a9-45ae-8459-179e4d50f9c0"}},"repository":{"url":"git+https://github.com/Accel-Hack/monica-sdk-js.git","type":"git","directory":"next"},"_npmVersion":"11.19.1","description":"Next.js client and server adapters for the MONICA SDK","directories":{},"sideEffects":["./dist/server/index.js"],"_nodeVersion":"24.21.0","dependencies":{"server-only":"0.0.1","@ah-monica/core":"0.4.0","@ah-monica/node":"0.4.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"next":"16.3.3","react":"19.2.8","react-dom":"19.2.8","@types/bun":"^1.2.21","typescript":"^5.9.2","@types/node":"^24.0.0","@types/react":"^19.2.0","@types/react-dom":"^19.2.0"},"peerDependencies":{"next":">=15.3 <17"},"_npmOperationalInternal":{"tmp":"tmp/next_0.4.0_1790667581428_0.16518139755488104","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"_id":"@ah-monica/next@0.4.1","bugs":{"url":"https://github.com/Accel-Hack/monica-sdk-js/issues"},"dist":{"shasum":"8996a2874fe3966f5615b389333132a7c83e5c8c","tarball":"https://registry.npmjs.org/@ah-monica/next/-/next-0.4.1.tgz","fileCount":17,"integrity":"sha512-MX1xGnyaG/4oGu1DFrdN8fm4XJcUtnXVMX2jp3mHG3oeUFBYTf68oBJFGvEI7a/JvbK+RkqRPLM13AJNtTQ5eQ==","signatures":[{"sig":"MEYCIQDu9ob1QWmve8R6qgAzRXSs+PP/UHW0stlWzcVyZo0NggIhAL6b3GyCRpMW0EseMPnZDtmyrjWZ1DIertHCPZ46x7Mv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICWdYeudl2IDvWGuD1eN3kE500Jx/aURZ6RX9rParnOUAiEA1FN8sw+nSN1Wbf630WzPgWqMnx+LvT3XszUDj6k5LP0="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ah-monica%2fnext@0.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":40492},"name":"@ah-monica/next","type":"module","engines":{"node":">=20.9"},"exports":{"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js"},"./server":{"types":"./dist/server/index.d.ts","import":"./dist/server/index.js"}},"gitHead":"cc26fcc5068f2643df9a53ca42fca233bad62f87","license":"Apache-2.0","scripts":{"test":"bun run build:dependencies && bun test","build":"bun run build:dependencies && tsc -p tsconfig.build.json","typecheck":"bun run build:dependencies && tsc --noEmit","pack:check":"bun run build && bun pm pack --dry-run","test:runtime":"node --conditions react-server test/runtime-smoke.mjs","test:next-build":"bun run build && node test/next-build-smoke.mjs","build:dependencies":"bun run --filter @ah-monica/core build && bun run --filter @ah-monica/node build"},"version":"0.4.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"7782a833-a0a9-45ae-8459-179e4d50f9c0"}},"homepage":"https://github.com/Accel-Hack/monica-sdk-js#readme","repository":{"url":"git+https://github.com/Accel-Hack/monica-sdk-js.git","type":"git","directory":"next"},"_npmVersion":"11.19.1","description":"Next.js client and server adapters for the MONICA SDK","directories":{},"maintainers":[{"name":"kkyosuke","email":"kawamura@accelhack.com"},{"name":"namnam34","email":"namba_ryota@accelhack.com"}],"sideEffects":["./dist/server/index.js"],"_nodeVersion":"24.21.0","dependencies":{"server-only":"0.0.1","@ah-monica/core":"0.4.1","@ah-monica/node":"0.4.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"next":"16.3.3","react":"19.2.8","react-dom":"19.2.8","@types/bun":"^1.2.21","typescript":"^5.9.2","@types/node":"^24.0.0","@types/react":"^19.2.0","@types/react-dom":"^19.2.0"},"peerDependencies":{"next":">=15.3 <17"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/next_0.4.1_1790669788717_0.8035318838231136"}}},"time":{"created":"2026-08-29T21:36:48.907Z","modified":"2026-09-29T08:16:29.209Z","0.1.0":"2026-08-29T21:36:49.213Z","0.1.2":"2026-09-10T01:40:29.100Z","0.2.0":"2026-09-10T10:03:23.972Z","0.2.1":"2026-09-11T03:33:07.510Z","0.3.0":"2026-09-24T05:04:40.287Z","0.4.0":"2026-09-29T07:39:41.514Z","0.4.1":"2026-09-29T08:16:28.827Z"},"bugs":{"url":"https://github.com/Accel-Hack/monica-sdk-js/issues"},"license":"Apache-2.0","homepage":"https://github.com/Accel-Hack/monica-sdk-js#readme","repository":{"url":"git+https://github.com/Accel-Hack/monica-sdk-js.git","type":"git","directory":"next"},"description":"Next.js client and server adapters for the MONICA SDK","maintainers":[{"name":"kkyosuke","email":"kawamura@accelhack.com"},{"name":"namnam34","email":"namba_ryota@accelhack.com"}],"readme":"# @ah-monica/next\n\nNext.js App Router の client / server の両方から MONICA へエラーを送る SDK。\nroot export は持たず、`@ah-monica/next/client` と `@ah-monica/next/server` に分かれている。\n\n- Next.js 15.3 以上 17 未満（peer dependency）\n- Node.js 20.9 以上\n- App Router（`instrumentation-client.ts`、`instrumentation.ts`、Error Boundary）\n- Edge runtime は対象外\n\n共通の使い方・オプション・制約は [ルートの README](../README.md) にある。\n\n## インストール\n\n```bash\nnpm install @ah-monica/next\n```\n\n## 使い方\n\n### Client\n\nclient bundle に含めてよい public key（`mpk_...`）だけを使う。`msk_...` を渡すと\n`TypeError` を投げる。管理画面で public key の許可 origin も設定する。\n\n```ts\n// src/infrastructure/monica.client.ts\nimport { createNextClient } from \"@ah-monica/next/client\";\n\nexport const monica = createNextClient({\n  dsn: process.env.NEXT_PUBLIC_MONICA_DSN,\n  environment: process.env.NEXT_PUBLIC_MONICA_ENVIRONMENT ?? \"development\",\n  release: process.env.NEXT_PUBLIC_MONICA_RELEASE,\n  beforeSend(item) {\n    // どの値が個人情報かはアプリケーション固有。送ってよい値だけを残す。\n    return item;\n  },\n});\n```\n\n`installGlobalHandlers()` は `error` と `unhandledrejection` を購読する。\n何度呼んでも listener は 1 組だけで、戻り値を呼ぶと解除できる。\n\n```ts\n// instrumentation-client.ts\nimport { monica } from \"./src/infrastructure/monica.client\";\n\nmonica.installGlobalHandlers();\n```\n\nError Boundary から明示的に送る場合:\n\n```tsx\n\"use client\";\n\nimport { useEffect } from \"react\";\nimport { monica } from \"../infrastructure/monica.client\";\n\nexport default function ErrorPage({ error }: { error: Error & { digest?: string } }) {\n  useEffect(() => {\n    void monica.captureException(error, {\n      contexts: { next: { digest: error.digest } },\n    });\n  }, [error]);\n\n  return <p>エラーが発生しました。</p>;\n}\n```\n\n`setUser` / `addBreadcrumb` / `captureMessage` / `flush` / `close` も使える。\n\n### Server（Node runtime）\n\nsecret key（`msk_...`）をサーバ専用の環境変数に置く。`NEXT_PUBLIC_` を付けてはならない。\n`@ah-monica/next/server` は Node runtime 専用で、Edge runtime では使わない。\n\n```ts\n// src/infrastructure/monica.server.ts\nimport { createNextServerClient } from \"@ah-monica/next/server\";\n\nexport const monica = createNextServerClient({\n  dsn: process.env.MONICA_DSN,\n  environment: process.env.MONICA_ENVIRONMENT ?? process.env.NODE_ENV!,\n  release: process.env.MONICA_RELEASE,\n  beforeSend(item) {\n    // request や user を足す場合も、この境界で個人情報を処理する。\n    return item;\n  },\n});\n```\n\nNext.js は `instrumentation.ts` を Edge runtime 向けにも bundle するので、server client は\n`NEXT_RUNTIME === \"nodejs\"` の分岐の中で dynamic import する。`register()` で読み込むと、\n稼働確認の `start` は起動時に送られる。\n\n```ts\n// instrumentation.ts\nimport type { Instrumentation } from \"next\";\n\nexport async function register() {\n  if (process.env.NEXT_RUNTIME === \"nodejs\") {\n    await import(\"./src/infrastructure/monica.server\");\n  }\n}\n\nexport const onRequestError: Instrumentation.onRequestError = async (...args) => {\n  if (process.env.NEXT_RUNTIME !== \"nodejs\") return;\n  const { monica } = await import(\"./src/infrastructure/monica.server\");\n  await monica.onRequestError(...args);\n};\n```\n\n`onRequestError` は送信完了まで await する。Next.js から渡される URL と headers は\n収集せず、`contexts.next` に route の種別だけを足す（`routerKind`、`routePath`、\n`routeType`、`renderSource`、`revalidateReason`、`renderType` のうち渡されたもの）。\ntag には `next.router_kind` と `next.route_type` が付く。\n\nServer Action や Route Handler では `monica.captureException(error)` を直接呼べる。\nserver client は [`@ah-monica/node`](../node/README.md) のクライアントと同じ API\n（`withScope`、`installProcessHooks` など）を持つ。\n\n### Cloudflare（OpenNext）で使う場合\n\nWorkers は応答を返したあとの送信を待たず、タイマーも発火しない。`register()` で client を\n作り、`start` の送信を `waitUntil` に載せる。定期の `interval` は送られず、isolate ごとの `start` だけになる。\nOpenNext は `register()` を最初の request の中で呼ぶので、global scope で fetch できない制約にも当たらない。\n\n```ts\n// instrumentation.ts\nexport async function register() {\n  if (process.env.NEXT_RUNTIME === \"nodejs\") {\n    const { monica } = await import(\"./src/infrastructure/monica.server\");\n    const { getCloudflareContext } = await import(\"@opennextjs/cloudflare\");\n    getCloudflareContext().ctx.waitUntil(monica.flush());\n  }\n}\n\n// onRequestError は上の例と同じ\n```\n\n## オプション\n\nclient / server とも同じ option を取る（server は `@ah-monica/node` と同一）。\n\n| option | 型 | default | 説明 |\n| --- | --- | --- | --- |\n| `dsn` | `string \\| null` | なし | client は `mpk_...`、server は `msk_...`。未指定・空文字なら何も送らない |\n| `environment` | `string` | 必須 | 1〜128 文字 |\n| `release` | `string` | なし | item の `release` に載る |\n| `sampleRate` | `number` | `1` | 0〜1 |\n| `maxBreadcrumbs` | `number` | `50` | 保持する breadcrumb 数 |\n| `maxQueueSize` | `number` | `100` | queue の上限 |\n| `batchSize` | `number` | `30` | 1 envelope に載せる item 数 |\n| `flushIntervalMs` | `number` | `5000` | queue に item がある間の自動送信間隔 |\n| `requestTimeoutMs` | `number` | `2000` | 1 回の HTTP request の上限 |\n| `maxRetries` | `number` | `5` | `429` / `5xx` / network 障害の再送回数 |\n| `onDiagnostic` | `(diagnostic) => void \\| null` | `console.warn` に 1 行 | 拒否されたときの診断の受け取り先。`null` で無効 |\n| `beforeSend` | `(item, hint) => item \\| null \\| Promise<...>` | なし | `null` を返すと破棄 |\n| `fetch` | `typeof fetch` | `globalThis.fetch` | 送信に使う fetch |\n\n## 稼働確認\n\n共通の仕組みは [ルートの README](../README.md#稼働確認) にある。\n\nClient:\n\n- ブラウザで `createNextClient()` を評価したとき（ページ読み込み時）と、タブや WebView が再び可視に\n  なったとき（`visibilitychange` で `visible`）に `trigger: \"start\"` を判定する。interval 内なら送らない。\n  ページを開いたままでも定期送信はしない。SSR 中に作られた client は送らず、storage にも触らない\n- 状態（interval を数え始めた時刻と header の値）は `localStorage` の `monica.presence.<public key>` に JSON で持つ。\n  `localStorage` が使えなければ `sessionStorage`（タブごと）、どちらも使えなければメモリ（読み込みごとに判定し直す）\n- `X-Monica-Presence-Sample-Rate` の率で端末ごとに間引く。外れた端末もその interval の間は抽選し直さない\n- WebView に埋め込む場合: 読み込みが 1 回きりの SPA でも、アプリが前面に戻って WebView が可視になるたびに\n  判定する。DOM storage が無効（Android の `setDomStorageEnabled(false)` など）だとメモリに持つので、読み込みのたびに送る\n\nServer:\n\n- [`@ah-monica/node`](../node/README.md#稼働確認) と同じ（プロセスのメモリに状態を持ち、`unref` したタイマーで判定する）\n- `next build` の間（`NEXT_PHASE=phase-production-build`）は送らない\n- Cloudflare（OpenNext）では [上の例](#cloudflareopennextで使う場合) のとおり `waitUntil(monica.flush())` を呼ぶ\n\n## 送信結果と診断\n\n拒否されたときは client / server とも既定で `console.warn` に 1 行出る（`422` / `401` / `413`）。\nブラウザの console に出したくない場合は `onDiagnostic` で差し替える（`null` で無効）。\n`flush()` の戻り値の `status` / `issues` / `error` / `stopped` からも取れる。\n詳しくは [TROUBLESHOOTING.md](../TROUBLESHOOTING.md)。\n\n## 制約\n\n- `@ah-monica/next/client` に secret key（`msk_...`）を渡すと `TypeError` を投げる。\n- client の `installGlobalHandlers()` は subresource（`<img>` / `<script>` / `<link>`）の\n  読み込み失敗を送らない。送るのは未捕捉の例外と unhandled rejection だけ。\n- root export は無い。`@ah-monica/next` をそのまま import することはできない。\n\n## ライセンス\n\n[Apache-2.0](LICENSE)\n","readmeFilename":"README.md"}