{"_id":"@dyanet/nextjs-config-aws","_rev":"6-a0104a6eea81a11e90bef63ba2ca2b83","name":"@dyanet/nextjs-config-aws","dist-tags":{"beta":"1.0.0-beta.1","latest":"1.2.0"},"versions":{"1.0.0-beta.1":{"name":"@dyanet/nextjs-config-aws","version":"1.0.0-beta.1","keywords":["nextjs","next.js","configuration","aws","secrets-manager","ssm","parameter-store","s3","typescript","zod","server-components","app-router","runtime-env","environment-variables"],"author":{"name":"Dyanet"},"license":"MIT","_id":"@dyanet/nextjs-config-aws@1.0.0-beta.1","maintainers":[{"name":"akber","email":"akber@dyanet.com"}],"homepage":"https://github.com/dyanet/config-aws/tree/main/packages/nextjs-config-aws","bugs":{"url":"https://github.com/dyanet/config-aws/issues"},"dist":{"shasum":"7d86d38a0c9be33ece5c1a350df1d604c8026f85","tarball":"https://registry.npmjs.org/@dyanet/nextjs-config-aws/-/nextjs-config-aws-1.0.0-beta.1.tgz","fileCount":50,"integrity":"sha512-pQyxbtrZVr6OQ37y9i3ljR+2vu99+pRFo389iCrfAdnwADSBrz6teO/c97rmWPdrAKF//dgapO9U3QdR5Z12RQ==","signatures":[{"sig":"MEUCIQDwCjTvci8t0oUWfx2c1olUnH1zGhFh9FWKs2TNUmqL2AIgG8BVk8/WOCg7/igX9+hvZUmNKZSlKcQxJGDi9hG0TUM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":88100},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","engines":{"npm":">=8.0.0","node":">=18.0.0"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"gitHead":"17428adc94d856eb2936deb9c10ab8b3f6a5dd52","scripts":{"lint":"eslint src/**/*.ts src/**/*.tsx","test":"jest","build":"npm run clean && npm run build:types && npm run build:esm && npm run build:cjs","clean":"rimraf dist","lint:fix":"eslint src/**/*.ts src/**/*.tsx --fix","build:cjs":"tsc --project tsconfig.cjs.json","build:esm":"tsc --project tsconfig.esm.json","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:types":"tsc --project tsconfig.types.json","test:coverage":"jest --coverage"},"_npmUser":{"name":"akber","email":"akber@dyanet.com"},"repository":{"url":"git+https://github.com/dyanet/config-aws.git","type":"git"},"_npmVersion":"11.6.3","description":"Next.js adapter for AWS configuration management with support for server components, runtime environment variables, and AWS services integration","directories":{},"_nodeVersion":"22.17.0","dependencies":{"@dyanet/config-aws":"^1.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.22.0","jest":"^29.5.0","next":"^16.0.0","react":"^19.0.0","rimraf":"^5.0.0","ts-jest":"^29.1.0","fast-check":"^3.15.0","typescript":"^5.9.2","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/react":"^19.0.0","@aws-sdk/client-s3":"^3.0.0","@aws-sdk/client-ssm":"^3.0.0","@aws-sdk/client-secrets-manager":"^3.0.0"},"peerDependencies":{"next":"^16.0.0","react":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-config-aws_1.0.0-beta.1_1764187608964_0.09607186741996787","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@dyanet/nextjs-config-aws","version":"1.0.0","keywords":["nextjs","next.js","configuration","aws","secrets-manager","ssm","parameter-store","s3","typescript","zod","server-components","app-router","runtime-env","environment-variables"],"author":{"name":"Dyanet"},"license":"MIT","_id":"@dyanet/nextjs-config-aws@1.0.0","maintainers":[{"name":"akber","email":"akber@dyanet.com"}],"homepage":"https://github.com/dyanet/config-aws/tree/main/packages/nextjs-config-aws","bugs":{"url":"https://github.com/dyanet/config-aws/issues"},"dist":{"shasum":"7d63529755fd4a9d50586251951343569e065627","tarball":"https://registry.npmjs.org/@dyanet/nextjs-config-aws/-/nextjs-config-aws-1.0.0.tgz","fileCount":68,"integrity":"sha512-2XhPczp9pND+CFWczqsVO8WrSZbb2NFilkhOFqveyTliMcvSLjRxw9qciCg7hQjSPHbeG6eOyOBf7kbgkpjgVg==","signatures":[{"sig":"MEQCIBXQKHzoz2kAvEBIwCJMBJ930bpmUSgoG0uqXKru4W3zAiBHn0V+DdoP6Elkk9io1H6OtTYCWUD8MqVj8MK0701rCQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":107952},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","engines":{"npm":">=8.0.0","node":">=18.0.0"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"gitHead":"d3e10cd201c7fc8f9799d367bb8fbc309c578bca","scripts":{"lint":"eslint src/**/*.ts src/**/*.tsx","test":"jest","build":"npm run clean && npm run build:types && npm run build:esm && npm run build:cjs","clean":"rimraf dist","lint:fix":"eslint src/**/*.ts src/**/*.tsx --fix","build:cjs":"tsc --project tsconfig.cjs.json","build:esm":"tsc --project tsconfig.esm.json","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:types":"tsc --project tsconfig.types.json","test:coverage":"jest --coverage"},"_npmUser":{"name":"akber","email":"akber@dyanet.com"},"repository":{"url":"git+https://github.com/dyanet/config-aws.git","type":"git"},"_npmVersion":"11.6.3","description":"Next.js adapter for AWS configuration management with support for server components, runtime environment variables, and AWS services integration","directories":{},"_nodeVersion":"22.17.0","dependencies":{"@dyanet/config-aws":"^1.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.22.0","jest":"^29.5.0","next":"^16.0.0","react":"^19.0.0","rimraf":"^5.0.0","ts-jest":"^29.1.0","fast-check":"^3.15.0","typescript":"^5.9.2","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/react":"^19.0.0","@aws-sdk/client-s3":"^3.0.0","@aws-sdk/client-ssm":"^3.0.0","@aws-sdk/client-secrets-manager":"^3.0.0"},"peerDependencies":{"next":"^16.0.0","react":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-config-aws_1.0.0_1766242916881_0.19409626904804322","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@dyanet/nextjs-config-aws","version":"1.1.0","keywords":["nextjs","next.js","configuration","aws","secrets-manager","ssm","parameter-store","s3","typescript","zod","server-components","app-router","runtime-env","environment-variables"],"author":{"name":"Dyanet"},"license":"MIT","_id":"@dyanet/nextjs-config-aws@1.1.0","maintainers":[{"name":"akber","email":"akber@dyanet.com"}],"homepage":"https://github.com/dyanet/config-aws/tree/main/packages/nextjs-config-aws","bugs":{"url":"https://github.com/dyanet/config-aws/issues"},"dist":{"shasum":"bee2bf4c13ec65371aa3ffdadb957801994917de","tarball":"https://registry.npmjs.org/@dyanet/nextjs-config-aws/-/nextjs-config-aws-1.1.0.tgz","fileCount":74,"integrity":"sha512-0WzOkbZ5598/Src7PSzBf8xfRr2ff3TLbGiyt2MBICHzYN0T4mNqqvzNoF87rLJvRZtMcPyHp6E/0Ri+7omdAg==","signatures":[{"sig":"MEQCIExvpP0lPum043oKRcZS2vxjxTeckdtzExJ3wyUZubRoAiBTheaWmpFGmhhMm256avOuZG/rOhyU0fBZZqRqP8FM8w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":116534},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","engines":{"npm":">=10.0.0","node":">=20.0.0"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"./react":{"types":"./dist/types/react.d.ts","import":"./dist/esm/react.js","require":"./dist/cjs/react.js"}},"gitHead":"5d1220c6404465bd3631c133ffbdcb286d3c5908","scripts":{"lint":"eslint src/**/*.ts src/**/*.tsx","test":"jest","build":"npm run clean && npm run build:types && npm run build:esm && npm run build:cjs","clean":"rimraf dist","lint:fix":"eslint src/**/*.ts src/**/*.tsx --fix","build:cjs":"tsc --project tsconfig.cjs.json","build:esm":"tsc --project tsconfig.esm.json","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:types":"tsc --project tsconfig.types.json","test:coverage":"jest --coverage"},"_npmUser":{"name":"akber","email":"akber@dyanet.com"},"repository":{"url":"git+https://github.com/dyanet/config-aws.git","type":"git"},"_npmVersion":"11.6.3","description":"Next.js adapter for AWS configuration management with support for server components, runtime environment variables, and AWS services integration","directories":{},"_nodeVersion":"22.17.0","dependencies":{"@dyanet/config-aws":"^1.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.22.0","jest":"^29.5.0","next":"^16.0.0","react":"^19.0.0","rimraf":"^6.0.0","ts-jest":"^29.1.0","fast-check":"^3.15.0","typescript":"^5.9.2","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/react":"^19.0.0","@aws-sdk/client-s3":"^3.0.0","@aws-sdk/client-ssm":"^3.0.0","@aws-sdk/client-secrets-manager":"^3.0.0"},"peerDependencies":{"next":"^16.0.0","react":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-config-aws_1.1.0_1766424283405_0.6260334357858857","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@dyanet/nextjs-config-aws","version":"1.1.1","keywords":["nextjs","next.js","configuration","aws","secrets-manager","ssm","parameter-store","s3","typescript","zod","server-components","app-router","runtime-env","environment-variables"],"author":{"name":"Dyanet"},"license":"MIT","_id":"@dyanet/nextjs-config-aws@1.1.1","maintainers":[{"name":"akber","email":"akber@dyanet.com"}],"homepage":"https://github.com/dyanet/config-aws/tree/main/packages/nextjs-config-aws","bugs":{"url":"https://github.com/dyanet/config-aws/issues"},"dist":{"shasum":"00f540a2283f002e110bc2ffdf0bfee2c20bff42","tarball":"https://registry.npmjs.org/@dyanet/nextjs-config-aws/-/nextjs-config-aws-1.1.1.tgz","fileCount":69,"integrity":"sha512-WiPVW//61Vg26V2nxU57X+aGyRK/F+sBLYDyTastE/t0ErY+hZS6PRnPzP3iNRNB0m2hftvdDtFoOsIIBTPAkQ==","signatures":[{"sig":"MEYCIQCokB3i5adgpsjFHmLwPOu+HjJAO59oPoydh38bDqGffgIhAJyt8JwVIr/Y8XaUKfog/xkXZUdLrqwDP/76NC+OKNNF","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":108553},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","engines":{"npm":">=10.0.0","node":">=20.0.0"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"gitHead":"dd38556279b9ef2fb1a8bdbdf675cef06e5be20f","scripts":{"lint":"eslint src/**/*.ts src/**/*.tsx","test":"jest","build":"npm run clean && npm run build:types && npm run build:esm && npm run build:cjs","clean":"rimraf dist","lint:fix":"eslint src/**/*.ts src/**/*.tsx --fix","build:cjs":"tsc --project tsconfig.cjs.json","build:esm":"tsc --project tsconfig.esm.json && echo {\"type\":\"module\"} > dist/esm/package.json","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:types":"tsc --project tsconfig.types.json","test:coverage":"jest --coverage"},"_npmUser":{"name":"akber","email":"akber@dyanet.com"},"repository":{"url":"git+https://github.com/dyanet/config-aws.git","type":"git"},"_npmVersion":"11.6.3","description":"Next.js adapter for AWS configuration management with support for server components, runtime environment variables, and AWS services integration","directories":{},"_nodeVersion":"22.17.0","dependencies":{"@dyanet/config-aws":"^1.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.22.0","jest":"^29.5.0","next":"^16.0.0","react":"^19.0.0","rimraf":"^6.0.0","ts-jest":"^29.1.0","fast-check":"^3.15.0","typescript":"^5.9.2","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/react":"^19.0.0","@aws-sdk/client-s3":"^3.0.0","@aws-sdk/client-ssm":"^3.0.0","@aws-sdk/client-secrets-manager":"^3.0.0"},"peerDependencies":{"next":"^16.0.0","react":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-config-aws_1.1.1_1766523922613_0.5019519614191417","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@dyanet/nextjs-config-aws","version":"1.1.2","keywords":["nextjs","next.js","configuration","aws","secrets-manager","ssm","parameter-store","s3","typescript","zod","server-components","app-router","runtime-env","environment-variables"],"author":{"name":"Dyanet"},"license":"MIT","_id":"@dyanet/nextjs-config-aws@1.1.2","maintainers":[{"name":"akber","email":"akber@dyanet.com"}],"homepage":"https://github.com/dyanet/config-aws/tree/main/packages/nextjs-config-aws","bugs":{"url":"https://github.com/dyanet/config-aws/issues"},"dist":{"shasum":"550da3a9d2f51974a870665009ee80e721c9064c","tarball":"https://registry.npmjs.org/@dyanet/nextjs-config-aws/-/nextjs-config-aws-1.1.2.tgz","fileCount":71,"integrity":"sha512-yYC6ZoNscaV48kZ7OvLyRAcH7jRWt90HpmJ1uckQIoIzavD1jkNUBxbcum0enkZJ+MBrZbZ4bIUNk3qew/6t1w==","signatures":[{"sig":"MEQCIGpAk+aQUd2GqCFVB5c3VsijF8pDkvcEfCJJEs2p5Od4AiBh4BSiqp1EwOam3A5jFlChR/V2s8OPtAn0qVg20veBvQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dyanet%2fnextjs-config-aws@1.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":109862},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","engines":{"npm":">=10.0.0","node":">=20.0.0"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"gitHead":"bd5197b54eb0e055fe5c0f5fe58ff62b2cffb2ad","scripts":{"lint":"eslint src/**/*.ts src/**/*.tsx","test":"jest","build":"npm run clean && npm run build:types && npm run build:esm && npm run build:cjs && npm run build:postbuild","clean":"rimraf dist","lint:fix":"eslint src/**/*.ts src/**/*.tsx --fix","build:cjs":"tsc --project tsconfig.cjs.json","build:esm":"tsc --project tsconfig.esm.json","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:types":"tsc --project tsconfig.types.json","test:coverage":"jest --coverage","build:postbuild":"node ../../scripts/postbuild.mjs ./dist"},"_npmUser":{"name":"akber","email":"akber@dyanet.com"},"repository":{"url":"git+https://github.com/dyanet/config-aws.git","type":"git"},"_npmVersion":"10.8.2","description":"Next.js adapter for AWS configuration management with support for server components, runtime environment variables, and AWS services integration","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@dyanet/config-aws":"^1.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.22.0","jest":"^29.5.0","next":"^16.0.0","react":"^19.0.0","rimraf":"^6.0.0","ts-jest":"^29.1.0","fast-check":"^3.15.0","typescript":"^5.9.2","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/react":"^19.0.0","@aws-sdk/client-s3":"^3.0.0","@aws-sdk/client-ssm":"^3.0.0","@aws-sdk/client-secrets-manager":"^3.0.0"},"peerDependencies":{"next":">=14.0.0","react":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-config-aws_1.1.2_1779952161731_0.05523599435669935","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"_id":"@dyanet/nextjs-config-aws@1.2.0","bugs":{"url":"https://github.com/dyanet/config-aws/issues"},"dist":{"shasum":"87a7581498c7694f3115cbbf47249452a21aa384","tarball":"https://registry.npmjs.org/@dyanet/nextjs-config-aws/-/nextjs-config-aws-1.2.0.tgz","integrity":"sha512-fgRXocEaCNYBZs3U1Jx4o1HXU/C8YKWZO4PHCcWl6MWtBN9X1tItwXvc7kNtrkBMk2n6U0SGvLkf4lRwTkB8BQ==","fileCount":71,"unpackedSize":111192,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dyanet%2fnextjs-config-aws@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDmIlJK+9xVKPjnOBi1zQghT7iBbNI4WImQr4XcYfl1/AIgaUgeOFwtR9tOEVjxe4TBJExFUs7CP9IBvWHFGg7W3K4="}]},"main":"dist/cjs/index.js","name":"@dyanet/nextjs-config-aws","types":"dist/types/index.d.ts","author":{"name":"Dyanet"},"module":"dist/esm/index.js","engines":{"npm":">=10.0.0","node":">=20.0.0"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"./client":{"types":"./dist/types/client/index.d.ts","import":"./dist/esm/client/index.js","require":"./dist/cjs/client/index.js"}},"gitHead":"a373b4982b7836a25ff22d1c593ebf3c48503718","license":"MIT","scripts":{"lint":"eslint src/**/*.ts src/**/*.tsx","test":"jest","build":"npm run clean && npm run build:types && npm run build:esm && npm run build:cjs && npm run build:postbuild","clean":"rimraf dist","lint:fix":"eslint src/**/*.ts src/**/*.tsx --fix","build:cjs":"tsc --project tsconfig.cjs.json","build:esm":"tsc --project tsconfig.esm.json","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:types":"tsc --project tsconfig.types.json","test:coverage":"jest --coverage","build:postbuild":"node ../../scripts/postbuild.mjs ./dist"},"version":"1.2.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:235d7db3-f9fa-42b8-8cdf-f9305834b0f3"},"approver":{"name":"akber","email":"akber@dyanet.com"}},"homepage":"https://github.com/dyanet/config-aws/tree/main/packages/nextjs-config-aws","keywords":["nextjs","next.js","configuration","aws","secrets-manager","ssm","parameter-store","s3","typescript","zod","server-components","app-router","runtime-env","environment-variables"],"repository":{"url":"git+https://github.com/dyanet/config-aws.git","type":"git"},"_npmVersion":"12.1.0","description":"Next.js adapter for AWS configuration management with support for server components, runtime environment variables, and AWS services integration","directories":{},"maintainers":[{"name":"akber","email":"akber@dyanet.com"}],"_nodeVersion":"24.21.0","dependencies":{"@dyanet/config-aws":"^1.1.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"devDependencies":{"zod":"^3.22.0","jest":"^29.5.0","next":"^16.0.0","react":"^19.0.0","rimraf":"^6.0.0","ts-jest":"^29.1.0","fast-check":"^3.15.0","typescript":"^5.9.2","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/react":"^19.0.0","@aws-sdk/client-s3":"^3.0.0","@aws-sdk/client-ssm":"^3.0.0","@aws-sdk/client-secrets-manager":"^3.0.0"},"peerDependencies":{"next":">=14.0.0","react":">=18.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nextjs-config-aws_1.2.0_1790520999446_0.00354690147707748"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-26T20:06:48.875Z","modified":"2026-09-27T14:56:39.828Z","1.0.0-beta.1":"2025-11-26T20:06:49.183Z","1.0.0":"2025-12-20T15:01:57.014Z","1.1.0":"2025-12-22T17:24:43.542Z","1.1.1":"2025-12-23T21:05:22.774Z","1.1.2":"2026-05-28T07:09:21.874Z","1.2.0":"2026-09-27T14:56:39.525Z"},"bugs":{"url":"https://github.com/dyanet/config-aws/issues"},"author":{"name":"Dyanet"},"license":"MIT","homepage":"https://github.com/dyanet/config-aws/tree/main/packages/nextjs-config-aws","keywords":["nextjs","next.js","configuration","aws","secrets-manager","ssm","parameter-store","s3","typescript","zod","server-components","app-router","runtime-env","environment-variables"],"repository":{"url":"git+https://github.com/dyanet/config-aws.git","type":"git"},"description":"Next.js adapter for AWS configuration management with support for server components, runtime environment variables, and AWS services integration","maintainers":[{"name":"akber","email":"akber@dyanet.com"}],"readme":"# @dyanet/nextjs-config-aws\r\n\r\n[![npm version](https://img.shields.io/npm/v/@dyanet/nextjs-config-aws.svg)](https://www.npmjs.com/package/@dyanet/nextjs-config-aws)\r\n[![CI](https://github.com/dyanet/config-aws/actions/workflows/ci.yml/badge.svg)](https://github.com/dyanet/config-aws/actions/workflows/ci.yml)\r\n[![codecov](https://codecov.io/gh/dyanet/config-aws/flag/nextjs-config-aws/graph/badge.svg)](https://codecov.io/gh/dyanet/config-aws)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n\r\nNext.js adapter for AWS configuration management. A thin wrapper around [@dyanet/config-aws](../config-aws) that provides server-side configuration loading, runtime environment variables, and automatic environment detection.\r\n\r\n## Features\r\n\r\n- **Simplified API** - Just `getConfig()`, `PublicEnvScript`, and `env()` - no loader complexity\r\n- **Automatic Environment Detection** - Configures itself based on NODE_ENV\r\n- **Runtime Environment Variables** - Deploy the same build to different environments\r\n- **Caching** - Avoid repeated AWS API calls during request handling\r\n- **Type Safety** - Full TypeScript support with Zod schema validation\r\n- **AWS Services** - Load configuration from Secrets Manager and SSM Parameter Store\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @dyanet/nextjs-config-aws\r\n```\r\n\r\n### Peer Dependencies\r\n\r\n```bash\r\nnpm install next react\r\n```\r\n\r\nSupports **Next.js `>=14`** and **React `>=18`** (App Router). Developed and tested against\r\nthe latest Next.js and React.\r\n\r\nFor AWS services, install the SDK clients you need:\r\n\r\n```bash\r\n# For Secrets Manager\r\nnpm install @aws-sdk/client-secrets-manager\r\n\r\n# For SSM Parameter Store\r\nnpm install @aws-sdk/client-ssm\r\n\r\n# For schema validation\r\nnpm install zod\r\n```\r\n\r\n## Quick Start\r\n\r\n### Server-Side Configuration\r\n\r\n```typescript\r\n// app/page.tsx (Server Component)\r\nimport { getConfig } from '@dyanet/nextjs-config-aws';\r\nimport { z } from 'zod';\r\n\r\nconst schema = z.object({\r\n  DATABASE_URL: z.string(),\r\n  API_KEY: z.string(),\r\n});\r\n\r\nexport default async function Page() {\r\n  // Minimal usage - auto-detects environment\r\n  const config = await getConfig({ schema });\r\n\r\n  return <div>Connected to: {config.DATABASE_URL}</div>;\r\n}\r\n```\r\n\r\n### With AWS Secrets Manager\r\n\r\n```typescript\r\n// app/page.tsx\r\nimport { getConfig } from '@dyanet/nextjs-config-aws';\r\nimport { z } from 'zod';\r\n\r\nconst schema = z.object({\r\n  DATABASE_URL: z.string(),\r\n  API_KEY: z.string(),\r\n});\r\n\r\nexport default async function Page() {\r\n  const config = await getConfig({\r\n    schema,\r\n    aws: { \r\n      secretName: '/my-app/config',\r\n      region: 'us-east-1'  // Optional, defaults to AWS_REGION env var\r\n    },\r\n  });\r\n\r\n  return <div>Connected to: {config.DATABASE_URL}</div>;\r\n}\r\n```\r\n\r\n### Runtime Environment Variables\r\n\r\n```tsx\r\n// app/layout.tsx\r\nimport { PublicEnvScript } from '@dyanet/nextjs-config-aws';\r\n\r\nexport default function RootLayout({ children }) {\r\n  return (\r\n    <html>\r\n      <head>\r\n        <PublicEnvScript\r\n          publicVars={['API_URL', 'APP_NAME', 'FEATURE_FLAGS']}\r\n        />\r\n      </head>\r\n      <body>{children}</body>\r\n    </html>\r\n  );\r\n}\r\n```\r\n\r\n```tsx\r\n// app/components/client-component.tsx\r\n'use client';\r\n\r\nimport { env } from '@dyanet/nextjs-config-aws/client';\r\n\r\nexport function ClientComponent() {\r\n  const apiUrl = env('API_URL');\r\n  const appName = env('APP_NAME', 'My App');\r\n\r\n  return <div>API: {apiUrl}, App: {appName}</div>;\r\n}\r\n```\r\n\r\n> **Import `env` from `@dyanet/nextjs-config-aws/client` in client components.** The main entry also exports the server-side `getConfig` and its file/AWS loaders, which a browser bundle can't include. (`env` is still exported from the main entry for server-side use and backward compatibility.)\r\n\r\n## Environment Detection\r\n\r\nThe library automatically configures itself based on `NODE_ENV`:\r\n\r\n| Environment | Env Vars | .env Files | AWS Sources |\r\n|-------------|----------|------------|-------------|\r\n| development | ✓ | .env.local, .env | Only if `forceAwsInDev: true` |\r\n| production  | ✓ | .env | ✓ (if configured) |\r\n| test        | ✓ | ✗ | ✗ |\r\n\r\n### Override Environment Detection\r\n\r\n```typescript\r\nconst config = await getConfig({\r\n  schema,\r\n  environment: 'production',  // Force production behavior\r\n});\r\n```\r\n\r\n### Force AWS in Development\r\n\r\n```typescript\r\nconst config = await getConfig({\r\n  schema,\r\n  aws: { secretName: '/my-app/config' },\r\n  forceAwsInDev: true,  // Load from AWS even in development\r\n});\r\n```\r\n\r\n## API Reference\r\n\r\n### getConfig()\r\n\r\nLoad configuration in Server Components, API routes, or server actions.\r\n\r\n```typescript\r\nimport { getConfig } from '@dyanet/nextjs-config-aws';\r\n```\r\n\r\n#### Options\r\n\r\n| Option | Type | Default | Description |\r\n|--------|------|---------|-------------|\r\n| `schema` | `ZodType<T>` | `undefined` | Zod schema for validation |\r\n| `aws.secretName` | `string` | `undefined` | AWS Secrets Manager secret name |\r\n| `aws.ssmPrefix` | `string` | `undefined` | AWS SSM Parameter Store path prefix |\r\n| `aws.region` | `string` | `AWS_REGION` | AWS region for all service calls |\r\n| `environment` | `'development' \\| 'production' \\| 'test'` | auto-detect | Override environment detection |\r\n| `forceAwsInDev` | `boolean` | `false` | Load from AWS in development mode |\r\n| `cache` | `boolean` | `true` | Enable caching |\r\n| `cacheTTL` | `number` | `60000` | Cache TTL in milliseconds |\r\n\r\n#### Examples\r\n\r\n```typescript\r\n// Minimal - just schema\r\nconst config = await getConfig({ schema });\r\n\r\n// With AWS Secrets Manager\r\nconst config = await getConfig({\r\n  schema,\r\n  aws: { secretName: '/my-app/secrets' }\r\n});\r\n\r\n// With SSM Parameter Store\r\nconst config = await getConfig({\r\n  schema,\r\n  aws: { ssmPrefix: '/my-app/config' }\r\n});\r\n\r\n// Both AWS sources\r\nconst config = await getConfig({\r\n  schema,\r\n  aws: { \r\n    secretName: '/my-app/secrets',\r\n    ssmPrefix: '/my-app/config',\r\n    region: 'us-west-2'\r\n  }\r\n});\r\n\r\n// Disable caching\r\nconst config = await getConfig({\r\n  schema,\r\n  cache: false\r\n});\r\n```\r\n\r\n### PublicEnvScript\r\n\r\nServer component that injects environment variables into the client.\r\n\r\n```tsx\r\nimport { PublicEnvScript } from '@dyanet/nextjs-config-aws';\r\n```\r\n\r\n#### Props\r\n\r\n| Prop | Type | Default | Description |\r\n|------|------|---------|-------------|\r\n| `publicVars` | `string[]` | `undefined` | Explicit list of variables to expose |\r\n| `publicPrefix` | `string` | `undefined` | Prefix to filter variables |\r\n| `variableName` | `string` | `'__ENV'` | Global variable name on window |\r\n| `nonce` | `string` | `undefined` | CSP nonce for script tag |\r\n\r\n**Security Note:** Only expose variables that are safe for public access. Never expose secrets, API keys, or sensitive data.\r\n\r\n```tsx\r\n// Explicit allowlist\r\n<PublicEnvScript publicVars={['API_URL', 'APP_NAME']} />\r\n\r\n// Prefix filtering\r\n<PublicEnvScript publicPrefix=\"PUBLIC_\" />\r\n\r\n// With CSP nonce\r\n<PublicEnvScript publicVars={['API_URL']} nonce={cspNonce} />\r\n```\r\n\r\n### env()\r\n\r\nAccess runtime environment variables on the client.\r\n\r\n```typescript\r\n'use client';\r\n\r\nimport { env } from '@dyanet/nextjs-config-aws/client';\r\n```\r\n\r\n```typescript\r\n// Get a variable (returns undefined if not found)\r\nconst apiUrl = env('API_URL');\r\n\r\n// Get with default value\r\nconst appName = env('APP_NAME', 'My App');\r\n```\r\n\r\n### Error Handling\r\n\r\n```typescript\r\nimport { ConfigurationError, ValidationError } from '@dyanet/nextjs-config-aws';\r\n\r\ntry {\r\n  const config = await getConfig({ schema });\r\n} catch (error) {\r\n  if (error instanceof ValidationError) {\r\n    console.error('Validation failed:', error.message);\r\n    // error.message includes the invalid/missing key names\r\n  }\r\n}\r\n```\r\n\r\n## App Router Examples\r\n\r\n### Server Component\r\n\r\n```tsx\r\n// app/dashboard/page.tsx\r\nimport { getConfig } from '@dyanet/nextjs-config-aws';\r\nimport { z } from 'zod';\r\n\r\nconst schema = z.object({\r\n  DATABASE_URL: z.string(),\r\n  FEATURE_FLAGS: z.string().transform(s => JSON.parse(s)),\r\n});\r\n\r\nexport default async function DashboardPage() {\r\n  const config = await getConfig({\r\n    schema,\r\n    aws: { ssmPrefix: '/app/config' },\r\n  });\r\n\r\n  return (\r\n    <div>\r\n      <h1>Dashboard</h1>\r\n      <p>Features: {JSON.stringify(config.FEATURE_FLAGS)}</p>\r\n    </div>\r\n  );\r\n}\r\n```\r\n\r\n### API Route\r\n\r\n```typescript\r\n// app/api/config/route.ts\r\nimport { NextResponse } from 'next/server';\r\nimport { getConfig } from '@dyanet/nextjs-config-aws';\r\nimport { z } from 'zod';\r\n\r\nconst schema = z.object({\r\n  API_VERSION: z.string(),\r\n  MAX_REQUESTS: z.coerce.number(),\r\n});\r\n\r\nexport async function GET() {\r\n  const config = await getConfig({ schema });\r\n\r\n  return NextResponse.json({\r\n    version: config.API_VERSION,\r\n    maxRequests: config.MAX_REQUESTS,\r\n  });\r\n}\r\n```\r\n\r\n### Server Action\r\n\r\n```typescript\r\n// app/actions.ts\r\n'use server';\r\n\r\nimport { getConfig } from '@dyanet/nextjs-config-aws';\r\nimport { z } from 'zod';\r\n\r\nconst schema = z.object({\r\n  API_KEY: z.string(),\r\n});\r\n\r\nexport async function fetchData() {\r\n  const config = await getConfig({\r\n    schema,\r\n    aws: { secretName: '/app/secrets' },\r\n  });\r\n\r\n  const response = await fetch('https://api.example.com/data', {\r\n    headers: { 'Authorization': `Bearer ${config.API_KEY}` },\r\n  });\r\n\r\n  return response.json();\r\n}\r\n```\r\n\r\n## Pages Router Examples\r\n\r\n### getServerSideProps\r\n\r\n```typescript\r\n// pages/dashboard.tsx\r\nimport { getConfig } from '@dyanet/nextjs-config-aws';\r\nimport { z } from 'zod';\r\nimport type { GetServerSideProps } from 'next';\r\n\r\nconst schema = z.object({\r\n  API_URL: z.string(),\r\n});\r\n\r\nexport const getServerSideProps: GetServerSideProps = async () => {\r\n  const config = await getConfig({ schema });\r\n\r\n  return {\r\n    props: {\r\n      apiUrl: config.API_URL,\r\n    },\r\n  };\r\n};\r\n\r\nexport default function Dashboard({ apiUrl }: { apiUrl: string }) {\r\n  return <div>API URL: {apiUrl}</div>;\r\n}\r\n```\r\n\r\n### API Route (Pages Router)\r\n\r\n```typescript\r\n// pages/api/config.ts\r\nimport type { NextApiRequest, NextApiResponse } from 'next';\r\nimport { getConfig } from '@dyanet/nextjs-config-aws';\r\nimport { z } from 'zod';\r\n\r\nconst schema = z.object({\r\n  APP_VERSION: z.string(),\r\n});\r\n\r\nexport default async function handler(req: NextApiRequest, res: NextApiResponse) {\r\n  const config = await getConfig({ schema });\r\n\r\n  res.json({ version: config.APP_VERSION });\r\n}\r\n```\r\n\r\n## Advanced Usage\r\n\r\nFor advanced use cases such as custom loaders, direct AWS SDK integration, or fine-grained control over configuration loading, import from `@dyanet/config-aws` directly:\r\n\r\n```typescript\r\nimport {\r\n  ConfigManager,\r\n  EnvironmentLoader,\r\n  EnvFileLoader,\r\n  SecretsManagerLoader,\r\n  SSMParameterStoreLoader,\r\n  S3Loader,\r\n} from '@dyanet/config-aws';\r\n\r\nconst manager = new ConfigManager({\r\n  loaders: [\r\n    new EnvironmentLoader({ prefix: 'APP_' }),\r\n    new EnvFileLoader({ paths: ['.env.local', '.env'] }),\r\n    new SecretsManagerLoader({ secretName: '/my-app/config' }),\r\n  ],\r\n  schema: mySchema,\r\n  precedence: 'aws-first',\r\n});\r\n\r\nawait manager.load();\r\nconst config = manager.getAll();\r\n```\r\n\r\n## Related Packages\r\n\r\n- **[@dyanet/config-aws](../config-aws)** - Framework-agnostic core library\r\n- **[@dyanet/nestjs-config-aws](../nestjs-config-aws)** - NestJS adapter\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md"}