{"_id":"@avishaidotan/shared-lib","_rev":"4-48c5bb0e444c77697bd886c2d6f8d700","name":"@avishaidotan/shared-lib","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@avishaidotan/shared-lib","version":"1.0.0","keywords":[],"author":"","license":"ISC","_id":"@avishaidotan/shared-lib@1.0.0","maintainers":[{"name":"avishaidotan","email":"avishaidotan@gmail.com"}],"dist":{"shasum":"139ca4fc832feab263163990ec762e60b5b17b31","tarball":"https://registry.npmjs.org/@avishaidotan/shared-lib/-/shared-lib-1.0.0.tgz","fileCount":26,"integrity":"sha512-AUh0HutDTk88cJ2x6OFe88ztZhESM83ItpfUX3IyAapKZ4IVPmin0cHRTTnBerj5e1xfAkXhsAXieY8TcJoygQ==","signatures":[{"sig":"MEUCIQClkhYnYyiNT7mIGXkQag0KwwduqTZWIrei7cD4oLeuOAIgXRlj02btGbRtZWOO0Bt/rtzlkpIARMHCBOPALXv2EuM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28051},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"cda4e7d0ac9e0151659d5730e0431403d6f4fc3e","scripts":{"build":"tsc","prepare":"npm run build"},"_npmUser":{"name":"avishaidotan","email":"avishaidotan@gmail.com"},"_npmVersion":"10.9.2","description":"Shared library for Cymulate project","directories":{},"_nodeVersion":"22.13.0","dependencies":{"zod":"^3.22.4","chalk":"^4.1.2","dotenv":"^16.4.1","mongoose":"^8.12.1","crypto-js":"^4.2.0","@types/mongoose":"^5.11.96","@types/crypto-js":"^4.2.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^20.11.16"},"_npmOperationalInternal":{"tmp":"tmp/shared-lib_1.0.0_1742919017732_0.5611773939509159","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@avishaidotan/shared-lib","version":"1.0.1","keywords":[],"author":"","license":"ISC","_id":"@avishaidotan/shared-lib@1.0.1","maintainers":[{"name":"avishaidotan","email":"avishaidotan@gmail.com"}],"dist":{"shasum":"81179d1051ceb0613f59db700f245fc7075ffaa1","tarball":"https://registry.npmjs.org/@avishaidotan/shared-lib/-/shared-lib-1.0.1.tgz","fileCount":26,"integrity":"sha512-qmzAmq+2HJCx/ZyHJMf2uCJrlNTo5t1Ebz+TauL/F8MLz5V2fnOX/o4eR8Gvgr/4IK/kD+3YCSDUQwwyPO26tA==","signatures":[{"sig":"MEQCICJucdaxzfBrrOsoqAm36G35A3DAqsqHvvqgV5xuseDiAiB/9QwTKd6nNhZZdUz6bUYdn2Fn0gPYkt95MIYqO4r+Xg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26363},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"f619873195ec65442c5d9563ed1bacd37b7b7214","scripts":{"build":"tsc","prepare":"npm run build"},"_npmUser":{"name":"avishaidotan","email":"avishaidotan@gmail.com"},"_npmVersion":"10.9.2","description":"Shared library for Cymulate project","directories":{},"_nodeVersion":"22.13.0","dependencies":{"zod":"^3.22.4","chalk":"^4.1.2","dotenv":"^16.4.1","mongoose":"^8.12.1","crypto-js":"^4.2.0","@types/mongoose":"^5.11.96","@types/crypto-js":"^4.2.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^20.11.16"},"_npmOperationalInternal":{"tmp":"tmp/shared-lib_1.0.1_1743315927290_0.6466717113758944","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@avishaidotan/shared-lib","version":"1.0.2","keywords":[],"author":"","license":"ISC","_id":"@avishaidotan/shared-lib@1.0.2","maintainers":[{"name":"avishaidotan","email":"avishaidotan@gmail.com"}],"dist":{"shasum":"cb0eee037a22794bed211a524a1fe455d3f95688","tarball":"https://registry.npmjs.org/@avishaidotan/shared-lib/-/shared-lib-1.0.2.tgz","fileCount":26,"integrity":"sha512-3LRCPFm0VDyJgyufRRRhKHcw6qivwUtYhpRH2DbtWAxrPur1/z8y1uXRp16l4LtxqZMJSl27NnpAAvs3w8lxAw==","signatures":[{"sig":"MEQCIEL58CZF2zgnWQT7eEBYrp6NOLMkHO2dMHedbIygVskhAiAjIWlUHvpCzQXWoT+BFUDhMrXoDLGQTlLME4b8SEZn/Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26363},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"f619873195ec65442c5d9563ed1bacd37b7b7214","scripts":{"build":"tsc","prepare":"npm run build"},"_npmUser":{"name":"avishaidotan","email":"avishaidotan@gmail.com"},"_npmVersion":"10.9.2","description":"Shared library for Cymulate project","directories":{},"_nodeVersion":"22.13.0","dependencies":{"zod":"^3.22.4","chalk":"^4.1.2","dotenv":"^16.4.1","mongoose":"^8.12.1","crypto-js":"^4.2.0","@types/mongoose":"^5.11.96","@types/crypto-js":"^4.2.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^20.11.16"},"_npmOperationalInternal":{"tmp":"tmp/shared-lib_1.0.2_1743316031069_0.653014877162067","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@avishaidotan/shared-lib","version":"1.1.0","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","prepare":"npm run build"},"keywords":[],"author":"","license":"ISC","description":"Shared library for Cymulate project","dependencies":{"@types/crypto-js":"^4.2.1","@types/mongoose":"^5.11.96","chalk":"^4.1.2","crypto-js":"^4.2.0","dotenv":"^16.4.1","mongoose":"^8.12.1","zod":"^3.22.4"},"devDependencies":{"@types/node":"^20.11.16","typescript":"^5.3.3"},"_id":"@avishaidotan/shared-lib@1.1.0","gitHead":"3705d2434213b3a7bade190442180dcc0df61a5f","_nodeVersion":"22.13.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-v5aYM0PX5fzCDz1lZytLLCSCjxObUdwNheL9trHzh41K7yWU9ZCNS4w9zwXb176Na6rvwcN7BSKoFPthr8B8zA==","shasum":"856388ead4892edcb80b6505f67ec180a36601be","tarball":"https://registry.npmjs.org/@avishaidotan/shared-lib/-/shared-lib-1.1.0.tgz","fileCount":26,"unpackedSize":26452,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICCELP2+g0FfAnJ9pvC1k9usCbrj6Rd/XaM2jxM9aqZLAiBHN3hZ3hH4ysME+HLPWwpqqVp8AwFMjzn+OaCaKUJKUg=="}]},"_npmUser":{"name":"avishaidotan","email":"avishaidotan@gmail.com"},"directories":{},"maintainers":[{"name":"avishaidotan","email":"avishaidotan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/shared-lib_1.1.0_1743404393996_0.5130582680603784"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-25T16:10:17.632Z","modified":"2025-03-31T06:59:54.349Z","1.0.0":"2025-03-25T16:10:17.922Z","1.0.1":"2025-03-30T06:25:27.501Z","1.0.2":"2025-03-30T06:27:11.268Z","1.1.0":"2025-03-31T06:59:54.191Z"},"license":"ISC","keywords":[],"description":"Shared library for Cymulate project","maintainers":[{"name":"avishaidotan","email":"avishaidotan@gmail.com"}],"readme":"# Shared Library\r\n\r\nA shared TypeScript library providing common types, services, and helpers for microservices.\r\n\r\n## Features\r\n- Zod schemas and type definitions\r\n- AES Encryption Service\r\n- Database Service\r\n- Environment variables management\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install github:your-username/shared-lib\r\n```\r\n\r\n## Usage\r\n\r\n1. Create a `.env` file in your project root:\r\n```env\r\nENCRYPTION_KEY=your-secret-key\r\nDB_CONNECTION_STRING=your-database-connection-string\r\n```\r\n\r\n2. Import and use the services:\r\n```typescript\r\nimport { EncryptionService, DbService, User, UserSchema } from 'shared-lib';\r\n\r\n// Using the Encryption Service\r\nconst encryptionService = new EncryptionService();\r\nconst encrypted = encryptionService.encrypt('sensitive data');\r\nconst decrypted = encryptionService.decrypt(encrypted);\r\n\r\n// Using the DB Service\r\nconst dbService = new DbService();\r\nawait dbService.connect();\r\n\r\n// Using Types and Schemas\r\nconst userData = {\r\n  id: '123',\r\n  email: 'user@example.com',\r\n  name: 'John Doe'\r\n};\r\n\r\nconst validatedUser = UserSchema.parse(userData);\r\nconst user: User = validatedUser;\r\n```\r\n\r\n## Environment Variables\r\nThe following environment variables are required:\r\n- `ENCRYPTION_KEY`: Secret key for AES encryption\r\n- `DB_CONNECTION_STRING`: Database connection string\r\n\r\n## Development\r\n1. Clone the repository\r\n2. Install dependencies: `npm install`\r\n3. Build the project: `npm run build` # shared\n","readmeFilename":"README.md"}