{"_id":"@adaptivelink/kv","_rev":"5-f2f4f3635917fa44e310c65949136a49","name":"@adaptivelink/kv","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@adaptivelink/kv","version":"0.1.0","module":"dist/kv.esm.js","types":"dist/main.d.ts","repository":{"type":"git","url":"git+https://github.com/adaptive/kv.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"bugs":{"url":"https://github.com/adaptive/kv/issues"},"homepage":"https://github.com/adaptive/pops#readme","author":{"name":"Hugo Romano","email":"adaptive@hey.com"},"keywords":["cloudflare","kv","storage","workers"],"license":"MIT","private":false,"dependencies":{"@adaptivelink/pops":"0.2.13","aws4fetch":"1.0.13"},"devDependencies":{"@rollup/plugin-commonjs":"17.0.0","@rollup/plugin-node-resolve":"11.0.1","prettier":"2.2.1","rollup":"2.36.1","rollup-plugin-cleanup":"3.2.1","rollup-plugin-terser":"7.0.2"},"scripts":{"build":"npx rollup -c","prebuild":"npx prettier --write '**/*.{js,json}' '!dist/**' --arrow-parens avoid --trailing-comma none","dry-run":"npm pack --dry-run"},"gitHead":"6a368e2502ab667412e399cc86e3df76efca66be","description":"### ⚙️ Environment Variables * KV_ACCESS_KEY_ID * KV_SECRET_ACCESS_KEY 🔒 * KV_DEFAULT_REGION * KV_S3_BUCKET","_id":"@adaptivelink/kv@0.1.0","_nodeVersion":"12.20.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-7mQmks5FCKcExnBkjMoAXc7/ZBksV89h1Owv5sU5CA9fkFZITzY8HA9lruNLkACAJKbCsjm/VpWLpAnDct/SFg==","shasum":"89bae09e9ef37d37b5d5468ee4222bef8632e1c7","tarball":"https://registry.npmjs.org/@adaptivelink/kv/-/kv-0.1.0.tgz","fileCount":5,"unpackedSize":3098,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+RCGCRA9TVsSAnZWagAADxsQAJJyAMc+fWXcdQN0SOs7\nMQ3q8vpbQdkZJVm43SE7iCsRbVOOJ/dKZKavAfaHugm6QWVJdZf30TTnp96x\naswiohBBx5gMk4TceeJOKT94p+Dvczbd2OROGVa0Ltd00GHC12hNc1hhof64\ndoqSEBP7IWbfDqtB0V8irdqUhxxSuCj0g66qbba4JH31EAPeuWkhOdnon4UI\n9YV2dv6ktz76cE0yUmTqz586ikRjStEJEFRJY4/tX1OXirV0hUsQHnP2LJAw\nqrOEyNB5zFZ22Aca+GddNqjRF2FvMd7G4n0nsq5DsVk/eCx7ZGYhqsmpp+iV\nIERzhLNx7IEorw0A0wUR6XGM7Fgy/yytcR8+Gagr684P/7gq+SFcq8BQPPf0\naMC9AhiKzZujxGrJHvBbFgca/h02IsUFU7JDYQvOhkVWFoJDdGtkw1HjH4ys\nDyZrOs+CQO3vdZizg15q5Ou+DWmKLei1stXRbI9GvxOpozvVfR1yS6mocjyr\nJZ68BEq4RoWGjzBfKWDF3cKcnNh3vi6Krjg0FwX3X1ZSbAbOhNYHs/aXmBKT\nzdIk5mQ9j6pjONVDjBQcIF8uFIoLMP2+3X5hdiH/vKqQWoXg0qB04lGoyZQ2\nWtQZIQqqQuHfUhHD9kueym/P0PagB9I2OFDjXI0gI8lU5HR/7ypGXESBJn0k\nzvHd\r\n=mXop\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDfL6zvN8SfBP+qJfwNlS9nA5/JzsHD2jrrzt2kr1FUQAiEA9pR1E9HDsiS5bUBAx3RSOqDqD8VrULRqvcEJ5LR6kAc="}]},"_npmUser":{"name":"undisclosed","email":"hugoromano@gmail.com"},"directories":{},"maintainers":[{"name":"undisclosed","email":"hugoromano@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/kv_0.1.0_1610158214493_0.8234465774791755"},"_hasShrinkwrap":false,"deprecated":"0.1.x is no longer supported"},"0.2.0":{"name":"@adaptivelink/kv","version":"0.2.0","description":"KV Solution for Cloudflare Worker and Stackpath Serverless Scripting","module":"dist/kv.esm.js","types":"dist/main.d.ts","repository":{"type":"git","url":"git+https://github.com/adaptive/kv.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"bugs":{"url":"https://github.com/adaptive/kv/issues"},"homepage":"https://github.com/adaptive/kv#readme","author":{"name":"Hugo Romano","email":"adaptive@hey.com"},"keywords":["cloudflare","stackpath","kv","s3","wasabi","aws","storage","workers","key","values","store","persist","save","config"],"license":"MIT","private":false,"dependencies":{"@adaptivelink/pops":"0.2.16","aws4fetch":"1.0.13"},"devDependencies":{"@rollup/plugin-commonjs":"17.0.0","@rollup/plugin-node-resolve":"11.1.0","prettier":"2.2.1","rollup":"2.38.0","rollup-plugin-cleanup":"3.2.1","rollup-plugin-terser":"7.0.2"},"scripts":{"build":"npx rollup -c","prebuild":"npx prettier --write '**/*.{js,json}' '!dist/**' --arrow-parens avoid --trailing-comma none","dry-run":"npm pack --dry-run"},"gitHead":"5d8b6d7834de0bf018f49dba063050b51f86bb4d","_id":"@adaptivelink/kv@0.2.0","_nodeVersion":"12.20.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-JxkMiu+7Fj8JU5Cz2tYmOA6SdoVhlI3ZGiMUBT32nH+Z77IRZErirXmYUEPxwC3HE67BENobsd1ZDul6yj4VIA==","shasum":"f0a8a1afa45f07b8205e8fa88f5ffb47679b6a7e","tarball":"https://registry.npmjs.org/@adaptivelink/kv/-/kv-0.2.0.tgz","fileCount":5,"unpackedSize":6747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEshwCRA9TVsSAnZWagAAiF0P+wf3fWowD/JKPkRcrPtM\ncJ26ffu9KnwxZVTHfusSCnE3e71XWJcWEafa/DtBJQ0xzifRVOX0AHkq6a0m\nY+d1/hoiuITsKp8KhFyUPFRVjc6iEhBk8ZxtaqaAtXlcAzjwG0vJW7JSjS2K\nu9gMWGUSite4zg19fA9N3fzdL2mZx10uEEpr5GsHhgm9Zk7NChillcubGUfd\na2RyAMhKasuCG7GgJTOysKMsIt4zrnvzeic8liXQU+Q+DEQfMWm21DtwiZzI\n9h+Wzg3+dattH/tYD4jaJgyTK1X/7X2TxlvsqAgiyP7wvVQhpgS5XWd8HEO0\nsQflypE+D65Jz18CpZ0e0oPz6rjxRyDWVQLzUTlaihGWo9kWkgE6+vWZqWsA\n+ocuP8y6cv8yVg2YxQ6ZBPv/CPEJ7qQQPgJV2IRxoz0rAnnWaGjc/zNwyCav\n+Cr3hDgZLeAwUMRo2Ml6vth5+crFndYAGxFuL90BF3u0Pa6cYJlNP2rUNqG/\ncjdg1HKBRv/Ej0jPd1wkuvPHozmRIVtxHuuV9D2MqgDKd8tWWeAxkpUXozHQ\nNfBhiksdvgTJek+q7QRrituatHef1iNCDRZnhvpmUJFuUplNfjYoQnmkEgOk\nkhzjVyu8XrKkUucDdxvbSxGMiPTh7EZ18NrVmKYXJO8nlSkStmPwnu4rWhap\n/zsX\r\n=cLdW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQndcxDwN2EWhBrRee1SRPkrVdWyOXlL/fMHp/VnwHvwIhAO/ltZIWeHNhD0puhXooA3c0H85ICXBfd098Zq/S3Yq2"}]},"_npmUser":{"name":"undisclosed","email":"hugoromano@gmail.com"},"directories":{},"maintainers":[{"name":"undisclosed","email":"hugoromano@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/kv_0.2.0_1611843695866_0.25031138991646795"},"_hasShrinkwrap":false},"0.2.1":{"name":"@adaptivelink/kv","version":"0.2.1","description":"KV Solution for Cloudflare Worker and Stackpath Serverless Scripting","module":"dist/kv.esm.js","types":"dist/main.d.ts","repository":{"type":"git","url":"git+https://github.com/adaptive/kv.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"bugs":{"url":"https://github.com/adaptive/kv/issues"},"homepage":"https://github.com/adaptive/kv#readme","author":{"name":"Hugo Romano","email":"hugoromano@gmail.com"},"keywords":["cloudflare","stackpath","kv","s3","wasabi","aws","storage","workers","key","values","store","persist","save","config"],"license":"MIT","private":false,"funding":{"type":"github","url":"https://github.com/sponsors/adaptive"},"dependencies":{"@adaptivelink/pops":"0.4.3","aws4fetch":"1.0.13"},"devDependencies":{"@rollup/plugin-commonjs":"21.0.1","@rollup/plugin-node-resolve":"13.0.6","prettier":"2.4.1","rollup":"2.58.0","rollup-plugin-cleanup":"3.2.1","rollup-plugin-terser":"7.0.2"},"scripts":{"build":"npx rollup -c","prebuild":"npx prettier --write '**/*.{js,json}' '!dist/**' --arrow-parens avoid --trailing-comma none","dry-run":"npm pack --dry-run"},"gitHead":"cb5e829f3b32f2c80a326cb74073e610948c52b6","_id":"@adaptivelink/kv@0.2.1","_nodeVersion":"12.22.7","_npmVersion":"6.14.15","dist":{"integrity":"sha512-u/Cl7aOiRxRldQx2QttYtENAN6SdkGQSWb25zDaIGT4WQiCcID69Ww9/DgKqAyDnIkWsDUX9Xxq48M2cBZbIag==","shasum":"b75939f07d30156cbddc277a263277e6551022c5","tarball":"https://registry.npmjs.org/@adaptivelink/kv/-/kv-0.2.1.tgz","fileCount":5,"unpackedSize":6858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhu2JNCRA9TVsSAnZWagAAYN8P/1CC9SnvKqqpU3ufQEuA\njToSjYb4HZfTcbdPPbXkHgbHsmpNdFgdpu2kgRiOYzgtQ52gRDIUPQmoFI17\nje6WROTzsjFfkgkP+3a55aXHVQPVLXrosTWT0W9KHV/Otgje+lj/3YqUVYZx\nV3Ovh0K2Bd30lPjCCYKFPkrSU+lVHpzdmhiu6igm6LxAbIjc5uj8pjz8d5ak\nr6NR7fCN6GfQocFcifiQQMKa5b+i7oxUvqzN5r1GoMdleKpJRcYEyBSL1ufQ\nDGmN4vk6RhEsDXx25n4MZULcrTNurXBLHhIIT3L1hfETB2WmIjMSl5fQQzma\nR53O+asTfTuTpAEbc+Xhbz0j7cVnK+bPaXjlFo8SjKqeepurmpWoEEdSksLC\nSQ8VrWGT0r7Vkz6TMZxnvS1H8b0RCcBmzjnzYpyewrD39ITqGKkyoszVycml\nu03yhhG0y7nPc4Ztd9ZfclPwAMwPM3DWeXxUW29lyTrpVbZbWMUDoWzBKjt/\n8q/WWxYGUaQ5ejGxsR683Vusb02DUpWiy9AcNmcy2uEX3gnV561rewhzO0j2\nyICgYUq4ArN6XlOFL4BD84+YmUdfrLh3EuDOoCt2HtFlVHJiXTHWHrmw+Y22\nEk3jVKm20hJL5U1NyfEHOR8gfSzavjOHn56EeF7/7EGcHL9HL6BwAtycbmb9\nnEGy\r\n=GXwc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCIERuTCcgamO38S/GFWfAUXxnCWAWRHJtuPm+v7gXeFozAh8wp1zbe0cjWYllJbHFhST01TeCtHE4VlwEazNveqyP"}]},"_npmUser":{"name":"undisclosed","email":"hugoromano@gmail.com"},"directories":{},"maintainers":[{"name":"undisclosed","email":"hugoromano@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/kv_0.2.1_1635011094405_0.7916404023474963"},"_hasShrinkwrap":false}},"time":{"created":"2021-01-09T02:10:14.312Z","0.1.0":"2021-01-09T02:10:14.627Z","modified":"2022-04-04T11:25:59.268Z","0.2.0":"2021-01-28T14:21:35.994Z","0.2.1":"2021-10-23T17:44:54.596Z"},"maintainers":[{"name":"undisclosed","email":"hugoromano@gmail.com"}],"description":"KV Solution for Cloudflare Worker and Stackpath Serverless Scripting","homepage":"https://github.com/adaptive/kv#readme","keywords":["cloudflare","stackpath","kv","s3","wasabi","aws","storage","workers","key","values","store","persist","save","config"],"repository":{"type":"git","url":"git+https://github.com/adaptive/kv.git"},"author":{"name":"Hugo Romano","email":"hugoromano@gmail.com"},"bugs":{"url":"https://github.com/adaptive/kv/issues"},"license":"MIT","readme":"# KV Utility\n\n[![npm](https://img.shields.io/npm/v/@adaptivelink/kv.svg)](https://www.npmjs.com/package/@adaptivelink/kv)\n\nA KV storage solution for Cloudflare Workers and Stackpath Serverless Scripting, that uses S3 providers as vendors, like AWS, Wasabi. Optionally you can encrypt your values at rest.\n\n## 🔨 Install with `yarn` or `npm`\n\n```bash\nyarn add @adaptivelink/kv\n```\n\n```bash\nnpm i @adaptivelink/kv\n```\n\n## ⚙️ Environment Variables\n\nYou need to configured the variables (Environment or Global) with your vendor data.\n\n- KV_ACCESS_KEY_ID\n- KV_SECRET_ACCESS_KEY 🔒\n- KV_DEFAULT_REGION\n- KV_S3_BUCKET\n- KV_NAMESPACE_PASSPHRASE 🔒 (optional)\n\n🔒 _Should be stored as environment encrypted variable, avoid global variable._\n\n## 🔓 Basic Usage in Cloudflare & Stackpath\n\n```javascript\nimport KV from \"@adaptivelink/kv\";\n\nconst NAMESPACE = new KV(\"namespace\");\n\nconst handleRequest = async (event) => {\n  const keyValue = await NAMESPACE.get(\"key\");\n  event.waitUntil(await NAMESPACE.put(\"hello\", \"world\"));\n};\n```\n\n## 🔐 Usage with Encrypted Values\n\n```javascript\n...\nconst NAMESPACE = new KV(\"namespace\", {\n  passphrase: KV_NAMESPACE_PASSPHRASE,\n});\n...\n```\n\n## 🔩 Methods\n\n### Writing Key-value pair\n\n`await NAMESPACE.put(key, value)`\n\n### Reading Key-value pair\n\n`await NAMESPACE.get(key)`\n\n### Deleting Key-value pair\n\n`await NAMESPACE.get(key)`\n\n🌐 Tested Vendors\n\n|Vendor|Data Consistency|\n|---|---|\n|[AWS S3](https://aws.amazon.com/s3/)|[strong read-after-write](https://aws.amazon.com/s3/consistency/)|\n|[Wasabi](https://wasabi.com/)|[subsecond read-after-write consistency](https://wasabi-support.zendesk.com/hc/en-us/articles/115001684591-What-data-consistency-model-does-Wasabi-employ-)|\n\n## ⚠️ Security Disclaimer\n\nThis software offers no guarantees, we strongly advise that you audit the code.\n\nWhen using encrypted KV option, only the values are encrypted with AES-GCM algorithm. That data is stored at the vendor encrypted, but encrypted/decrypted by the ⚙️ Worker script, meaning that the Isolate will have full access to the values. It would help if you referred to your serverless provider's terms to analyse their scope of access.\n\n## 🥰 Contribution\n\nFeel free to contribute with more features, documentation, and test with more vendors. Send your feedback.","readmeFilename":"README.md"}