{"_id":"@bvhoach2393/nest-sum","_rev":"17-61804fafd4633e2b972073b3f1925ddd","name":"@bvhoach2393/nest-sum","dist-tags":{"latest":"1.1.8"},"versions":{"1.1.0":{"name":"@bvhoach2393/nest-sum","version":"1.1.0","keywords":["nestjs","library","sum","validation","config","typescript","environment"],"author":{"name":"bvhoach2393","email":"bvhoach2393@example.com"},"license":"MIT","_id":"@bvhoach2393/nest-sum@1.1.0","maintainers":[{"name":"bvhoach2393","email":"bvhoach2393@gmail.com"}],"homepage":"https://github.com/bvhoach2393/nest-sum#readme","bugs":{"url":"https://github.com/bvhoach2393/nest-sum/issues"},"dist":{"shasum":"669e744211ee1ed9916533bf3b69805370887e70","tarball":"https://registry.npmjs.org/@bvhoach2393/nest-sum/-/nest-sum-1.1.0.tgz","fileCount":13,"integrity":"sha512-MAIK/juuPg3oDzgmWy7HMzxw3UtuAiMKls2cnV7yDwtxRvSXwZ1pLYD/HEoHUvbwiTPIFvXnfjmpZdO8toPAbw==","signatures":[{"sig":"MEUCIGqny70IhL2LDKQNMY+FgyKM4A+/LWTHTavnzOzbtytsAiEArWUFQDuNhJ/Mrs0wbQuaE+cwflyEK1GJT24donMBRXo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":125216},"main":"index.js","types":"index.d.ts","engines":{"npm":">=7.0.0","node":">=16.0.0"},"gitHead":"bbd5fac63937cdd316d59006e2eb8670d5eafad0","scripts":{},"_npmUser":{"name":"bvhoach2393","email":"bvhoach2393@gmail.com"},"repository":{"url":"git+https://github.com/bvhoach2393/nest-sum.git","type":"git"},"_npmVersion":"11.4.2","description":"A NestJS library for safe number summation with MAX_VALUE validation","directories":{},"_nodeVersion":"24.2.0","_hasShrinkwrap":false,"peerDependencies":{"rxjs":"^7.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs/config":"^3.0.0 || ^4.0.0","reflect-metadata":"^0.1.13 || ^0.2.0"},"peerDependenciesMeta":{"@nestjs/config":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/nest-sum_1.1.0_1752688183751_0.2339896838331854","host":"s3://npm-registry-packages-npm-production"}},"1.1.4":{"name":"@bvhoach2393/nest-sum","version":"1.1.4","keywords":["nestjs","library","sum","validation","config","typescript","environment"],"author":{"name":"bvhoach2393","email":"bvhoach2393@example.com"},"license":"MIT","_id":"@bvhoach2393/nest-sum@1.1.4","maintainers":[{"name":"bvhoach2393","email":"bvhoach2393@gmail.com"}],"homepage":"https://github.com/bvhoach2393/nest-sum#readme","bugs":{"url":"https://github.com/bvhoach2393/nest-sum/issues"},"dist":{"shasum":"545140c701f35588c4a2022127da1875a4f2e98c","tarball":"https://registry.npmjs.org/@bvhoach2393/nest-sum/-/nest-sum-1.1.4.tgz","fileCount":13,"integrity":"sha512-1URqxGIsToTVaKbu+VR4hUn+VdXEYapJ+4CW0x+p5wS7qrn48j9WT/wdIXAayxpcuo1oJq8R0ly516OQCelmOA==","signatures":[{"sig":"MEUCIQCeE7ylqebMIqiq1WszfO3FDfk8reef+0XJqnAvmqsdFgIgYjIuJbqBZleBjBSyumkgjFduAOowPU/iGmWqHuakxV0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":125472},"main":"index.js","types":"index.d.ts","engines":{"npm":">=7.0.0","node":">=16.0.0"},"gitHead":"bbd5fac63937cdd316d59006e2eb8670d5eafad0","scripts":{},"_npmUser":{"name":"bvhoach2393","email":"bvhoach2393@gmail.com"},"repository":{"url":"git+https://github.com/bvhoach2393/nest-sum.git","type":"git"},"_npmVersion":"11.4.2","description":"A NestJS library for safe number summation with MAX_VALUE validation","directories":{},"_nodeVersion":"24.2.0","_hasShrinkwrap":false,"peerDependencies":{"rxjs":"^7.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs/config":"^3.0.0 || ^4.0.0","reflect-metadata":"^0.1.13 || ^0.2.0"},"peerDependenciesMeta":{"@nestjs/config":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/nest-sum_1.1.4_1752688666872_0.16255278710110477","host":"s3://npm-registry-packages-npm-production"}},"1.1.5":{"name":"@bvhoach2393/nest-sum","version":"1.1.5","keywords":["nestjs","library","sum","validation","config","typescript","environment"],"author":{"name":"bvhoach2393","email":"bvhoach2393@example.com"},"license":"MIT","_id":"@bvhoach2393/nest-sum@1.1.5","maintainers":[{"name":"bvhoach2393","email":"bvhoach2393@gmail.com"}],"homepage":"https://github.com/bvhoach2393/nest-sum#readme","bugs":{"url":"https://github.com/bvhoach2393/nest-sum/issues"},"dist":{"shasum":"051e79384b194cc1363779f293070e557b9904c4","tarball":"https://registry.npmjs.org/@bvhoach2393/nest-sum/-/nest-sum-1.1.5.tgz","fileCount":13,"integrity":"sha512-pNqliaOdrvZyB0GLaDd2v3QHpjx6y1dgw3nwE3VwoH+uN0FxjdlDrEe4VCDQW/VnVfXbH2sGVEFGJ59D3er+qg==","signatures":[{"sig":"MEQCIEq5XZngMjdDt1Te9TRBUb0UV1Ua6O5zAZ1E7if8w89uAiBxDg7cs7gH4153LEEF9FvCWfMhV4WpXWpLWA2HNChmSw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":125536},"main":"index.js","types":"index.d.ts","engines":{"npm":">=7.0.0","node":">=16.0.0"},"gitHead":"bbd5fac63937cdd316d59006e2eb8670d5eafad0","scripts":{},"_npmUser":{"name":"bvhoach2393","email":"bvhoach2393@gmail.com"},"repository":{"url":"git+https://github.com/bvhoach2393/nest-sum.git","type":"git"},"_npmVersion":"11.4.2","description":"A NestJS library for safe number summation with MAX_VALUE validation","directories":{},"_nodeVersion":"24.2.0","_hasShrinkwrap":false,"peerDependencies":{"rxjs":"^7.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs/config":"^3.0.0 || ^4.0.0","reflect-metadata":"^0.1.13 || ^0.2.0"},"peerDependenciesMeta":{"@nestjs/config":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/nest-sum_1.1.5_1752688709499_0.31514950087461346","host":"s3://npm-registry-packages-npm-production"}},"1.1.6":{"name":"@bvhoach2393/nest-sum","version":"1.1.6","keywords":["nestjs","library","sum","validation","config","typescript","environment"],"author":{"name":"bvhoach2393","email":"bvhoach2393@example.com"},"license":"MIT","_id":"@bvhoach2393/nest-sum@1.1.6","maintainers":[{"name":"bvhoach2393","email":"bvhoach2393@gmail.com"}],"homepage":"https://github.com/bvhoach2393/nest-sum#readme","bugs":{"url":"https://github.com/bvhoach2393/nest-sum/issues"},"dist":{"shasum":"43afcdfb83547ea551dff5ff9da6378b20337836","tarball":"https://registry.npmjs.org/@bvhoach2393/nest-sum/-/nest-sum-1.1.6.tgz","fileCount":13,"integrity":"sha512-wQ/E+qYtzYL6nkaBb5fVlBvsagGATrohZO/poUNGz5D4Lf4M2Gjj3t6UJVHbQV4G6cjFQ6LRQ4f0q+vDW5qtIA==","signatures":[{"sig":"MEUCIQCkD7xPmIki4KTUflL9MrAF4Q7qym9WAqEK22eLv5E+egIgLc36SOHfunI5YPB2MHoztErcWA8P8MI+35N2cG4QDcw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":125600},"main":"index.js","types":"index.d.ts","engines":{"npm":">=7.0.0","node":">=16.0.0"},"gitHead":"bbd5fac63937cdd316d59006e2eb8670d5eafad0","scripts":{},"_npmUser":{"name":"bvhoach2393","email":"bvhoach2393@gmail.com"},"repository":{"url":"git+https://github.com/bvhoach2393/nest-sum.git","type":"git"},"_npmVersion":"11.4.2","description":"A NestJS library for safe number summation with MAX_VALUE validation","directories":{},"_nodeVersion":"24.2.0","_hasShrinkwrap":false,"peerDependencies":{"rxjs":"^7.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs/config":"^3.0.0 || ^4.0.0","reflect-metadata":"^0.1.13 || ^0.2.0"},"peerDependenciesMeta":{"@nestjs/config":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/nest-sum_1.1.6_1752688859285_0.4065924515714767","host":"s3://npm-registry-packages-npm-production"}},"1.1.7":{"name":"@bvhoach2393/nest-sum","version":"1.1.7","keywords":["nestjs","library","sum","validation","config","typescript","environment"],"author":{"name":"bvhoach2393","email":"bvhoach2393@example.com"},"license":"MIT","_id":"@bvhoach2393/nest-sum@1.1.7","maintainers":[{"name":"bvhoach2393","email":"bvhoach2393@gmail.com"}],"homepage":"https://github.com/bvhoach2393/nest-sum#readme","bugs":{"url":"https://github.com/bvhoach2393/nest-sum/issues"},"dist":{"shasum":"e825cd1d17a855a706f8da780900976e29eb8a98","tarball":"https://registry.npmjs.org/@bvhoach2393/nest-sum/-/nest-sum-1.1.7.tgz","fileCount":13,"integrity":"sha512-twBbyRAoY8miakaHS8xm8eSGe/bjh00pJsvuEVa8H4T/l4lqyh+ilXeWQf/kaluTLX/qw8l/okiHXGsBFxTc1w==","signatures":[{"sig":"MEYCIQClH/mHL3iVnMjbvrC008+EfkBBeNg+dqlpmSm38WdILwIhAMVtHfRpG40NicgMIeWUMW9DLI/80SP5/w8o+af6Qt5Q","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":125664},"main":"index.js","types":"index.d.ts","engines":{"npm":">=7.0.0","node":">=16.0.0"},"gitHead":"bbd5fac63937cdd316d59006e2eb8670d5eafad0","scripts":{},"_npmUser":{"name":"bvhoach2393","email":"bvhoach2393@gmail.com"},"repository":{"url":"git+https://github.com/bvhoach2393/nest-sum.git","type":"git"},"_npmVersion":"11.4.2","description":"A NestJS library for safe number summation with MAX_VALUE validation","directories":{},"_nodeVersion":"24.2.0","_hasShrinkwrap":false,"peerDependencies":{"rxjs":"^7.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs/config":"^3.0.0 || ^4.0.0","reflect-metadata":"^0.1.13 || ^0.2.0"},"peerDependenciesMeta":{"@nestjs/config":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/nest-sum_1.1.7_1752724323204_0.6143337889918714","host":"s3://npm-registry-packages-npm-production"}},"1.1.8":{"name":"@bvhoach2393/nest-sum","version":"1.1.8","description":"A NestJS library for safe number summation with MAX_VALUE validation","main":"index.js","types":"index.d.ts","scripts":{},"repository":{"type":"git","url":"git+https://github.com/bvhoach2393/nest-sum.git"},"bugs":{"url":"https://github.com/bvhoach2393/nest-sum/issues"},"homepage":"https://github.com/bvhoach2393/nest-sum#readme","keywords":["nestjs","library","sum","validation","config","typescript","environment"],"author":{"name":"bvhoach2393","email":"bvhoach2393@example.com"},"license":"MIT","engines":{"node":">=16.0.0","npm":">=7.0.0"},"peerDependencies":{"@nestjs/common":"^10.0.0 || ^11.0.0","@nestjs/config":"^3.0.0 || ^4.0.0","@nestjs/core":"^10.0.0 || ^11.0.0","reflect-metadata":"^0.1.13 || ^0.2.0","rxjs":"^7.0.0"},"peerDependenciesMeta":{"@nestjs/config":{"optional":false}},"_id":"@bvhoach2393/nest-sum@1.1.8","gitHead":"bbd5fac63937cdd316d59006e2eb8670d5eafad0","_nodeVersion":"24.2.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-QouGoYfXTLy+BAv/VOalhbZB4qL+D/jsbTo9jT44W3BDtUDcvAZwUkmSBXuzC5DD1AKbeW3gnqgDg9X54g+OEw==","shasum":"261c39a64e62b9ffb44362a23279c6b84f258c50","tarball":"https://registry.npmjs.org/@bvhoach2393/nest-sum/-/nest-sum-1.1.8.tgz","fileCount":13,"unpackedSize":125728,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCH41KU13N5nnjzshZhYs+8gIFiBVq6wOald/jL2yCW0QIhANUi5XnTcrmQr1hwX0AVQ+d7uGHfuOxt4QE1SNpt+po4"}]},"_npmUser":{"name":"bvhoach2393","email":"bvhoach2393@gmail.com"},"directories":{},"maintainers":[{"name":"bvhoach2393","email":"bvhoach2393@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nest-sum_1.1.8_1752724384676_0.7222838956482811"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-16T17:49:43.691Z","modified":"2025-07-17T03:53:05.026Z","1.0.0":"2025-07-15T16:01:55.847Z","1.0.1":"2025-07-16T12:36:20.790Z","1.0.2":"2025-07-16T12:55:29.824Z","1.0.3":"2025-07-16T13:06:02.110Z","1.0.4":"2025-07-16T13:12:33.529Z","1.0.5":"2025-07-16T13:15:54.679Z","1.1.0":"2025-07-16T17:49:43.953Z","1.1.4":"2025-07-16T17:57:47.057Z","1.1.5":"2025-07-16T17:58:29.676Z","1.1.6":"2025-07-16T18:00:59.469Z","1.1.7":"2025-07-17T03:52:03.379Z","1.1.8":"2025-07-17T03:53:04.852Z"},"bugs":{"url":"https://github.com/bvhoach2393/nest-sum/issues"},"author":{"name":"bvhoach2393","email":"bvhoach2393@example.com"},"license":"MIT","homepage":"https://github.com/bvhoach2393/nest-sum#readme","keywords":["nestjs","library","sum","validation","config","typescript","environment"],"repository":{"type":"git","url":"git+https://github.com/bvhoach2393/nest-sum.git"},"description":"A NestJS library for safe number summation with MAX_VALUE validation","maintainers":[{"name":"bvhoach2393","email":"bvhoach2393@gmail.com"}],"readme":"# @bvhoach2393/nest-sum\n\nA NestJS library for safe number summation with MAX_VALUE validation.\n\n## Features\n\n- Validates input numbers against a configurable MAX_VALUE\n- Integrates with NestJS ConfigService\n- Provides clear error messages for validation failures\n- Full TypeScript support\n\n## Installation\n\n```bash\nnpm install @bvhoach2393/nest-sum\n```\n\n## Usage\n\n### 1. Import the module\n\n```typescript\nimport { Module } from '@nestjs/common';\nimport { ConfigModule } from '@nestjs/config';\nimport { NestSumModule } from '@bvhoach2393/nest-sum';\n\n@Module({\n  imports: [\n    ConfigModule.forRoot({\n      isGlobal: true,\n    }),\n    NestSumModule,\n  ],\n})\nexport class AppModule {}\n```\n\n### 2. Use the service\n\n```typescript\nimport { Injectable } from '@nestjs/common';\nimport { NestSumService } from '@bvhoach2393/nest-sum';\n\n@Injectable()\nexport class MyService {\n  constructor(private readonly nestSumService: NestSumService) {}\n\n  calculateSum(a: number, b: number): number {\n    return this.nestSumService.sum(a, b);\n  }\n}\n```\n\n### 3. Environment configuration\n\nSet the `MAX_VALUE` in your environment variables:\n\n```env\nMAX_VALUE=1000\n```\n\n## API\n\n### `sum(a: number, b: number): number`\n\nCalculates the sum of two numbers with validation.\n\n**Parameters:**\n- `a`: First number\n- `b`: Second number\n\n**Returns:**\n- The sum of `a` and `b`\n\n**Throws:**\n- Error if `MAX_VALUE` is not configured\n- Error if either `a` or `b` exceeds `MAX_VALUE`\n\n## Example\n\n```typescript\n// With MAX_VALUE=100\nnestSumService.sum(30, 40); // Returns 70\nnestSumService.sum(150, 20); // Throws error: exceeds MAX_VALUE\n```\n\n## Testing\n\n### Running Unit Tests\n\nTo run the unit tests for this library:\n\n```bash\n# Run tests for the nest-sum library\nnpm test -- libs/nest-sum\n\n# Run tests with coverage\nnpm run test:cov -- libs/nest-sum\n\n# Run tests in watch mode\nnpm run test:watch -- libs/nest-sum\n```\n\n### Test Coverage\n\nThe library includes comprehensive unit tests covering:\n- ✅ Service initialization\n- ✅ Valid sum calculation within MAX_VALUE\n- ✅ Error handling when MAX_VALUE is not configured\n- ✅ Validation when parameters exceed MAX_VALUE\n- ✅ Console logging for error cases\n\n## Development\n\n### Local Development\n\n1. Clone the repository\n2. Install dependencies: `npm install`\n3. Set up environment: `cp .env.example .env`\n4. Build the library: `npm run build:lib`\n5. Run tests: `npm test -- libs/nest-sum`\n\n### Building\n\n```bash\n# Build the library\nnpm run build:lib\n\n# Build all projects\nnpm run build\n```\n\n## Publishing to NPM Registry\n\n### Prerequisites\n\n1. Create an NPM account at [npmjs.com](https://npmjs.com)\n2. Login to NPM: `npm login`\n3. Verify your account: `npm whoami`\n\n### Publishing Steps\n\n```bash\n# 1. Navigate to the library directory\ncd libs/nest-sum\n\n# 2. Update version in package.json if needed\nnpm version patch  # or minor/major\n\n# 3. Build the library\ncd ../..\nnpm run build:lib\n\n# 4. Navigate back to library directory\ncd libs/nest-sum\n\n# 5. Publish to NPM\nnpm publish --access public\n\n# For scoped packages, use:\nnpm publish --access public\n```\n\n### Version Management\n\n```bash\n# Patch version (1.0.0 -> 1.0.1)\nnpm version patch\n\n# Minor version (1.0.0 -> 1.1.0)\nnpm version minor\n\n# Major version (1.0.0 -> 2.0.0)\nnpm version major\n\n```\n\n### Publication Checklist\n\n- [ ] All tests pass: `npm test -- libs/nest-sum`\n- [ ] Build successful: `npm run build:lib`\n- [ ] Version updated in `package.json`\n- [ ] README.md is up to date\n- [ ] Dependencies are correctly specified as peer dependencies\n- [ ] NPM account has appropriate permissions\n\n## Peer Dependencies\n\n- `@nestjs/common`: ^10.0.0 || ^11.0.0\n- `@nestjs/config`: ^3.0.0 || ^4.0.0\n- `@nestjs/core`: ^10.0.0 || ^11.0.0\n- `reflect-metadata`: ^0.1.13 || ^0.2.0\n- `rxjs`: ^7.0.0\n\n## License\n\nMIT\n","readmeFilename":"README.md"}