{"_id":"@8ctopotamus/bunnycdn","_rev":"1-4d7d599b584d8468480efecc1ffedcd5","name":"@8ctopotamus/bunnycdn","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@8ctopotamus/bunnycdn","version":"0.0.1","description":"A NodeJS SDK for Bunny.Net CDN.","main":"lib/index.js","types":"lib/index.d.ts","type":"module","scripts":{"dev":"npx tsc --watch","prepublish":"npx tsc","test":"cross-env NODE_OPTIONS=--experimental-vm-modules npx jest"},"repository":{"type":"git","url":"git+https://github.com/8ctopotamus/bunnynet-node.git"},"keywords":["bunny.net","bunnynet","bunnycdn","bunny","cdn","node","sdk"],"author":{"name":"@8ctopotamus"},"license":"ISC","bugs":{"url":"https://github.com/8ctopotamus/bunnynet-node/issues"},"homepage":"https://github.com/8ctopotamus/bunnynet-node#readme","dependencies":{"mime-types":"^2.1.35","node-fetch":"^3.3.0"},"devDependencies":{"cross-env":"^7.0.3","dotenv":"^16.0.3","jest":"^29.3.1","typescript":"^4.9.3"},"gitHead":"4e9176057441c0dcf1750f22dab25ce0888eed36","_id":"@8ctopotamus/bunnycdn@0.0.1","_nodeVersion":"16.16.0","_npmVersion":"8.17.0","dist":{"integrity":"sha512-BZaHLMsTnmhvWleYAq4SLpwFx0zsdBePBuSkPwd5zty6KAvCUMpnxeokmmQpJXnnu8hoOFCEXOP2/L5sPGPmVg==","shasum":"d35cd864bf99dab268c45532aa93d1639ac41453","tarball":"https://registry.npmjs.org/@8ctopotamus/bunnycdn/-/bunnycdn-0.0.1.tgz","fileCount":14,"unpackedSize":25836,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCChjSnw3gxClZ6tihY9xiXbRDIH+yYu85yfRSS7OHYvAIgVN7sb/+q11kWSSbHRZPgD66HPPnmeMJGN5ZaNrPVbp0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkKk4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo4HhAAk3cx08n1xkiaSRQD6iW81mi63beVgDe/HfsF9jjD7aQCTEYO\r\nFxeXWEXKmX+uGg45P0uC7PyW022++qDYi8GGb73jAe4IuGqNNFG705Veln8H\r\nBuZY8aMswXgdYKLvdQHYFBQK6U0b4T2nzhqgzozXdVWdTF+lpukznTKaoSUc\r\nijLYcPVS3H8IMSf0eZEdv9lstqdWsI6AzCpANi/1A+MRqyNqKQNGcThhYO7t\r\nWZ73P+LxVJrw6Z2p4/yb4uD9SBESVEGEytB0QHIgwE7WzoehumtlsUlQiICe\r\ngTWbm2Jxi6Ee5LqRD+l5IGYCYsq/ZP9RgWuAvDb+Yn3zrAHwrpIjSN1nmJxn\r\nhHuFm8WUuH1lMnNhj9cuaoa+0bNMPgjsN0Y8vNjvD7EaGevqci8KYkYydro2\r\nOD2reFy1zPRENGsm7Z0eV+592l0DDmEmUf1SBDTz91grfx0EfTVDgVcTKnEJ\r\nV6P/IqiC1xpvHP17tcBbkBIccsDJJYNmPC6VqICDj9lsbSfA9avxl/ba8FnX\r\n/MbuvbjzslQPysXhLOc/UX/USaGhfD/lRhLwSiSabGZnWLSkf6ccMYyZ+xkW\r\nJWgTYR6+vz+5B5AW6/kRXFmdD18Onue45glYTInTS/R1qhNzDoRzE82b9qNZ\r\ncwgKlhi6kIr0HFSUk+thr/1qwy/4hWgyZFc=\r\n=53ak\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"8ctopotamus","email":"zylo.codes@gmail.com"},"directories":{},"maintainers":[{"name":"8ctopotamus","email":"zylo.codes@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bunnycdn_0.0.1_1670424887967_0.5960751178289956"},"_hasShrinkwrap":false},"0.0.2":{"name":"@8ctopotamus/bunnycdn","version":"0.0.2","description":"A NodeJS SDK for Bunny.Net CDN.","main":"lib/index.js","types":"lib/index.d.ts","type":"module","scripts":{"dev":"npx tsc --watch","prepublish":"npx tsc","test":"cross-env NODE_OPTIONS=--experimental-vm-modules npx jest"},"repository":{"type":"git","url":"git+https://github.com/8ctopotamus/bunnynet-node.git"},"keywords":["bunny.net","bunnynet","bunnycdn","bunny","cdn","node","sdk"],"author":{"name":"@8ctopotamus"},"license":"ISC","bugs":{"url":"https://github.com/8ctopotamus/bunnynet-node/issues"},"homepage":"https://github.com/8ctopotamus/bunnynet-node#readme","dependencies":{"cheerio":"^1.0.0-rc.12","mime-types":"^2.1.35","node-fetch":"^3.3.0"},"devDependencies":{"cross-env":"^7.0.3","dotenv":"^16.0.3","jest":"^29.3.1","typescript":"^4.9.3"},"gitHead":"dd2f4b69e428286c8a74173eced23c84ad3011d7","_id":"@8ctopotamus/bunnycdn@0.0.2","_nodeVersion":"16.16.0","_npmVersion":"8.17.0","dist":{"integrity":"sha512-skZO16ec7hoD9MdM1trpRO043Gdlal4mVPLkdzJk8lJom5sIPB9ld/tMR9Rj9JaW0P5HndG6e93Gxi6yQ8ppOA==","shasum":"4a0bebce01b833e7e8ef34e275d779d793a6d750","tarball":"https://registry.npmjs.org/@8ctopotamus/bunnycdn/-/bunnycdn-0.0.2.tgz","fileCount":14,"unpackedSize":25948,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOR7LUnmFtb6DmXmqBN96YhhGC2eIoFQDhu7I9oII1qQIhAJkO5eoZ04xcHmMt/Gmxk8EIK9NCHWBb8YO2DhZ9VTwJ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjk4FpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmre6g/+Miig9wIN0JjBuGqNLcKZlKNmuck7By9Y8D24W8MKHJiYGdqD\r\n3P9uOHt4LV3ZUZnAjyNQAB50M4CUhbwQxYhLOBLXgp3V9sbd086SsNZZMzS8\r\neAihC2Fe6GP3jCHjDanJ034IJSh7CzCdhHE/o7LlzjhKCKQWGEo2GKY+HfwC\r\nWr22F443ZfvHjGOJMWLEoqkTgah8XIkjoOmUP/Ltb68H8i0znMmHEg3nOHIn\r\nKCElBdxNX7NBFus6B9YHFo3UYQXsA27ybpZFy3fSdIB/uxstzQBrSIlFwAm9\r\nos2uLmHE8+sZiPvzHoTq3NTOEYeYWNSVnMMuwcBzsJ8fA1ztI+j5+jkacq9s\r\n/HxZ6nULL9SsKu6g+8wP9+MO8qXrYlWL1ItCGDoEoU84B794uR/achn646j1\r\nHd1Vk79+/kvRAMvyqn6p2NnWrKvy6ofX51FnfTcUqdHEtAoaEkJFMYgh2h2s\r\npgZViUxtrjJ54qWIcFbUEARlcg2sCWYqGEQ/CwWbHpCgf0OtWT4nP8hOyJp2\r\ncDRM0padWyJuQUwqAy6AO1V5zsbZ5xnAcuAoQ1st8g9bbIUcymQ34A5Az1Ug\r\nQODT5H+C3EWSvptmeA/K1DpZdRzqVoyjAixhpg3AbpVRhvgdpCuF5kfGCBsJ\r\nVzkGLkjgWksmUQSIrjpA8IoweUFdCqwDg7g=\r\n=oc7/\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"8ctopotamus","email":"zylo.codes@gmail.com"},"directories":{},"maintainers":[{"name":"8ctopotamus","email":"zylo.codes@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bunnycdn_0.0.2_1670611305603_0.47671761581551597"},"_hasShrinkwrap":false}},"time":{"created":"2022-12-07T14:54:47.906Z","0.0.1":"2022-12-07T14:54:48.118Z","modified":"2022-12-09T18:41:45.858Z","0.0.2":"2022-12-09T18:41:45.779Z"},"maintainers":[{"name":"8ctopotamus","email":"zylo.codes@gmail.com"}],"description":"A NodeJS SDK for Bunny.Net CDN.","homepage":"https://github.com/8ctopotamus/bunnynet-node#readme","keywords":["bunny.net","bunnynet","bunnycdn","bunny","cdn","node","sdk"],"repository":{"type":"git","url":"git+https://github.com/8ctopotamus/bunnynet-node.git"},"author":{"name":"@8ctopotamus"},"bugs":{"url":"https://github.com/8ctopotamus/bunnynet-node/issues"},"license":"ISC","readme":"# @8ctopotamus/bunnycdn\r\n\r\nA NodeJS SDK for [Bunny.Net CDN](https://bunny.net/).\r\n\r\n<a href=\"https://bunny.net/\" target=\"_blank\" title=\"Bunny.net website\">![Bunny.net hero banner graphic](./tests/bunnynet-banner.webp)</a>\r\n\r\nThe properties and methods mirror the endpoints described in the [BunnyCDN API Documentation](https://docs.bunny.net/docs).\r\n\r\n> ⚠ IMPORTANT: This package not anywhere near ready for use in actual projects. At this point it is an exercise in building an NPM package with TypeScript.\r\n\r\n## Usage\r\n\r\n```js\r\nimport BunnyCDN from '@8ctopotamus/bunnycdn'\r\n\r\n// configure the SDK\r\nconst bunny = new BunnyCDN({\r\n  pullzone: process.env.BUNNY_NET_PULLZONE,\r\n  accessKey: process.env.BUNNY_NET_ACCESS_KEY,\r\n  storageZoneName: process.env.BUNNY_NET_STORAGEZONE_NAME,\r\n  storageZonePassword: process.env.BUNNY_NET_STORAGEZONE_PASSWORD,\r\n  storageZoneRegion: process.env.BUNNY_NET_STORAGEZONE_REGION, // may be excluded if not applicable\r\n})\r\n\r\n```\r\n\r\n### Edge Storage API\r\n\r\n#### List folders and files at a given storage path\r\n\r\n```js\r\nawait bunny.storage.list('images')\r\n```\r\n\r\n#### Upload a file\r\n\r\n```js\r\nconst url = await bunny.storage.upload(`./img.jpg`, `images/img.jpg`)\r\n```\r\n\r\n#### Download a file\r\n\r\n```js\r\nawait bunny.storage.download(`images/img.jpg`, `./img.jpg`)\r\n```\r\n\r\n#### Delete a file\r\n\r\n```js\r\nawait bunny.storage.delete(`images/img.jpg`)\r\n```\r\n\r\n## Develop\r\n\r\nCreate and fill out a `.env` file in the root of the project:\r\n\r\n```env\r\nBUNNY_NET_PULLZONE=your_pullzone_name\r\nBUNNY_NET_ACCESS_KEY=your_access_key\r\nBUNNY_NET_STORAGEZONE_NAME=your_storagezone_name\r\nBUNNY_NET_STORAGEZONE_PASSWORD=your_storagezone_password\r\nBUNNY_NET_STORAGEZONE_REGION=your_storagezone_region_if_exists\r\n```\r\n\r\nRun `npm run dev` and `npm run test` in separate terminals\r\n\r\n## TODOs\r\n\r\n### Bunny.Net API\r\n\r\n* [ ] Abuse Case\r\n* [ ] Countries\r\n* [ ] Billing\r\n* [ ] Compute\r\n* [ ] Support\r\n* [ ] DRM Certificate\r\n* [ ] Region\r\n* [ ] Stream Video Library\r\n* [ ] DNS Zone\r\n* [...] Pull Zone\r\n* [ ] Purge\r\n* [ ] Statistics\r\n* [ ] Storage Zone\r\n* [ ] User\r\n\r\n### Stream API\r\n\r\n* Manage Collections\r\n  * [ ] Get Collection\r\n  * [ ] Update Collection\r\n  * [ ] Delete Collection\r\n  * [ ] Get Collection List\r\n  * [ ] Create Collection\r\n\r\n* Manage Videos\r\n  * [ ] Get Videoget\r\n  * [ ] Update Videopost\r\n  * [ ] Delete Videodelete\r\n  * [ ] Upload Videoput\r\n  * [ ] Get Video Heatmapget\r\n  * [ ] Get Video Statisticsget\r\n  * [ ] Reencode Videopost\r\n  * [ ] List Videosget\r\n  * [ ] Create Videopost\r\n  * [ ] Set Thumbnailpost\r\n  * [ ] Fetch Videopost\r\n  * [ ] Add Captionpost\r\n  * [ ] Delete Caption\r\n\r\n## Inspirations\r\n\r\n* [Code with Mark BunnyCDN](https://github.com/codewithmark/bunnycdn)\r\n* [BunnyCDN.PHP.Storage](https://github.com/BunnyWay/BunnyCDN.PHP.Storage#downloading-objects)\r\n\r\n## Helpful links for me\r\n\r\n* [How to allow ES6 Import/Exports AND CommonJS](https://www.sensedeep.com/blog/posts/2021/how-to-create-single-source-npm-module.html)\r\n* [Create NPM package with Typescript](https://spfx-app.dev/create-your-npm-package-with-typescript-in-a-few-minutes)\r\n* [SO: how to make jest run tests in a specific order](https://stackoverflow.com/questions/49247539/how-to-make-jest-run-tests-in-a-specific-order)\r\n\r\n","readmeFilename":"README.md"}