{"_id":"@elara-services/downloader","_rev":"6-168622d9592cf552db15e958b4492f43","name":"@elara-services/downloader","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.0":{"name":"@elara-services/downloader","version":"1.0.0","description":"Downloads media to a certain directory","main":"./dist/index.js","author":{"name":"SUPERCHIEFYT","url":"Elara-Discord-Bots, Elara-Services"},"license":"ISC","scripts":{"build":"rm -rf dist && rm -rf docs && tsc && npx typedoc src/index.ts","pub":"npm run build && npm publish","firstpub":"npm run build && npm publish --access=public","lint":"eslint .","pf":"prettier --write src/**/*.ts","pc":"prettier --check src/**/*.ts","clean":"rm -rf .git","conf":"ts-node setup.ts"},"repository":{"type":"git","url":"git+https://github.com/elara-bots/npm.git#main"},"homepage":"https://elara-services-downloader.pages.dev/","devDependencies":{"@types/follow-redirects":"^1.14.4","@types/node":"^20.3.0","@typescript-eslint/eslint-plugin":"^5.59.9","@typescript-eslint/parser":"^5.59.9","eslint":"^8.42.0","prettier":"^2.8.8","ts-node":"10.9.1","tslib":"^2.6.0","typedoc":"0.24.8","typescript":"5.1.3"},"dependencies":{"follow-redirects":"^1.15.6"},"types":"./dist/index.d.ts","gitHead":"5b61442de2eaeac39d91e786ba8a6d2c2823c053","bugs":{"url":"https://github.com/elara-bots/npm/issues"},"_id":"@elara-services/downloader@1.0.0","_nodeVersion":"21.2.0","_npmVersion":"9.6.0","dist":{"integrity":"sha512-Vj/Yu2gMIuEUcDIHOpC6aYM4HQIn7UuaZxQ5vVkhoqvDZyw3lEMMCKFx1gCHZed5+Tl4DcBHVzvnnQT2zUwixA==","shasum":"f82d558738bba15ef8ebaf1ab71fcc4c0dcce7d2","tarball":"https://registry.npmjs.org/@elara-services/downloader/-/downloader-1.0.0.tgz","fileCount":15,"unpackedSize":154878,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3SfZ4VCEyqV48xiTUMll8nhe6bC58ab8DbGIhJZ9bdgIhAPMAuOAS3L32zb6nauJZnjqEq6X1IeNqG8WQTs+zNqeq"}]},"_npmUser":{"name":"elara-services","email":"elaradiscordbot@gmail.com"},"directories":{},"maintainers":[{"name":"elara-services","email":"elaradiscordbot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/downloader_1.0.0_1717556148964_0.9557645223841793"},"_hasShrinkwrap":false},"1.0.1":{"name":"@elara-services/downloader","version":"1.0.1","description":"Downloads media to a certain directory","main":"./dist/index.js","author":{"name":"SUPERCHIEFYT","url":"Elara-Discord-Bots, Elara-Services"},"license":"ISC","scripts":{"build":"rm -rf dist && rm -rf docs && tsc && npx typedoc src/index.ts","pub":"npm run build && npm publish","firstpub":"npm run build && npm publish --access=public","lint":"eslint .","pf":"prettier --write src/**/*.ts","pc":"prettier --check src/**/*.ts","clean":"rm -rf .git","conf":"ts-node setup.ts"},"repository":{"type":"git","url":"git+https://github.com/elara-bots/npm.git#main"},"homepage":"https://elara-services-downloader.pages.dev/","devDependencies":{"@types/follow-redirects":"^1.14.4","@types/node":"^20.3.0","@typescript-eslint/eslint-plugin":"^5.59.9","@typescript-eslint/parser":"^5.59.9","eslint":"^8.42.0","prettier":"^2.8.8","ts-node":"10.9.1","tslib":"^2.6.0","typedoc":"0.24.8","typescript":"5.1.3"},"dependencies":{"follow-redirects":"^1.15.6"},"types":"./dist/index.d.ts","gitHead":"16c9dd66cdfe38965103afb26b3954769d135242","bugs":{"url":"https://github.com/elara-bots/npm/issues"},"_id":"@elara-services/downloader@1.0.1","_nodeVersion":"21.2.0","_npmVersion":"9.6.0","dist":{"integrity":"sha512-HCQg4XH40IKDrFrhpyDiBB4rnMHSJ7IkB6vDTzfGT/nrF7O2VGdEnOWEmQCkMlCPpTax1xs6Pq0WB97Cfwfakw==","shasum":"f0e20c0458185cf3252b657adaef776777e3b451","tarball":"https://registry.npmjs.org/@elara-services/downloader/-/downloader-1.0.1.tgz","fileCount":15,"unpackedSize":156211,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8yZRK87nuyduJ3zaXFrDskxNhDzi1fPiZwjMMxf4iogIgChPz4nrolI94o6IGqGMC+wZP1IVsuU0xW90caVzJfRI="}]},"_npmUser":{"name":"elara-services","email":"elaradiscordbot@gmail.com"},"directories":{},"maintainers":[{"name":"elara-services","email":"elaradiscordbot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/downloader_1.0.1_1717557354709_0.12293665466454762"},"_hasShrinkwrap":false},"1.0.2":{"name":"@elara-services/downloader","version":"1.0.2","description":"Downloads media to a certain directory","main":"./dist/index.js","author":{"name":"SUPERCHIEFYT","url":"Elara-Discord-Bots, Elara-Services"},"license":"ISC","scripts":{"build":"rm -rf dist && rm -rf docs && tsc && npx typedoc src/index.ts","pub":"npm run build && npm publish","firstpub":"npm run build && npm publish --access=public","lint":"eslint .","pf":"prettier --write src/**/*.ts","pc":"prettier --check src/**/*.ts","clean":"rm -rf .git","conf":"ts-node setup.ts"},"repository":{"type":"git","url":"git+https://github.com/elara-bots/npm.git#main"},"homepage":"https://elara-services-downloader.pages.dev/","devDependencies":{"@types/follow-redirects":"^1.14.4","@types/node":"^20.3.0","@typescript-eslint/eslint-plugin":"^5.59.9","@typescript-eslint/parser":"^5.59.9","eslint":"^8.42.0","prettier":"^2.8.8","ts-node":"10.9.1","tslib":"^2.6.0","typedoc":"0.24.8","typescript":"5.1.3"},"dependencies":{"follow-redirects":"^1.15.6"},"types":"./dist/index.d.ts","gitHead":"16c9dd66cdfe38965103afb26b3954769d135242","bugs":{"url":"https://github.com/elara-bots/npm/issues"},"_id":"@elara-services/downloader@1.0.2","_nodeVersion":"21.2.0","_npmVersion":"9.6.0","dist":{"integrity":"sha512-gumCQbpg6JBeo52DgREbpkFCgd9sicFRhpViKX2YoZpEUsRHPc2mkOKY0vEF6NOLGgIOo0m+umRL1q3C9pqx6Q==","shasum":"22045b29a485f43113b5cff699b43b943ffddf9e","tarball":"https://registry.npmjs.org/@elara-services/downloader/-/downloader-1.0.2.tgz","fileCount":15,"unpackedSize":159080,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICU0VprSCHI5ERyrGbq1hoXL4CQFzbdFi/fi5a24jKsZAiEA/dEYg2TdrL/bmmv+2Q14jQh1Y54wZRWVf5+7NY9DO2A="}]},"_npmUser":{"name":"elara-services","email":"elaradiscordbot@gmail.com"},"directories":{},"maintainers":[{"name":"elara-services","email":"elaradiscordbot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/downloader_1.0.2_1717636538571_0.891532067323686"},"_hasShrinkwrap":false},"1.0.3":{"name":"@elara-services/downloader","version":"1.0.3","description":"Downloads media to a certain directory","main":"./dist/index.js","author":{"name":"SUPERCHIEFYT","url":"Elara-Discord-Bots, Elara-Services"},"license":"ISC","scripts":{"build":"rm -rf dist && rm -rf docs && tsc && npx typedoc src/index.ts","pub":"npm run build && npm publish","firstpub":"npm run build && npm publish --access=public","lint":"eslint .","pf":"prettier --write src/**/*.ts","pc":"prettier --check src/**/*.ts","clean":"rm -rf .git","conf":"ts-node setup.ts"},"repository":{"type":"git","url":"git+https://github.com/elara-bots/npm.git#main"},"homepage":"https://elara-services-downloader.pages.dev/","devDependencies":{"@types/follow-redirects":"^1.14.4","@types/node":"^20.3.0","@typescript-eslint/eslint-plugin":"^5.59.9","@typescript-eslint/parser":"^5.59.9","eslint":"^8.42.0","prettier":"^2.8.8","ts-node":"10.9.1","tslib":"^2.6.0","typedoc":"0.24.8","typescript":"5.1.3"},"dependencies":{"follow-redirects":"^1.15.6"},"types":"./dist/index.d.ts","gitHead":"16c9dd66cdfe38965103afb26b3954769d135242","bugs":{"url":"https://github.com/elara-bots/npm/issues"},"_id":"@elara-services/downloader@1.0.3","_nodeVersion":"21.2.0","_npmVersion":"9.6.0","dist":{"integrity":"sha512-tqnwE9kr/mClpv5GbYmC6RlCE8ye8OKsvyhWJqb2FyqYhDORgUSlI0FLuiwEBknztfSKJZM2HugXLWypolIngA==","shasum":"7cdb934d144843bd28ddd2a953d867a2396f0f0b","tarball":"https://registry.npmjs.org/@elara-services/downloader/-/downloader-1.0.3.tgz","fileCount":15,"unpackedSize":159017,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoXO4Q9XXsggp2IZ9lkrhLw8B5gsmptYwewn2dPYHB/AIgfYXWHM77URfgTa8AjSFzbqipSaPmqQ+UyrI7wjekw1A="}]},"_npmUser":{"name":"elara-services","email":"elaradiscordbot@gmail.com"},"directories":{},"maintainers":[{"name":"elara-services","email":"elaradiscordbot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/downloader_1.0.3_1717636798174_0.7368595517363818"},"_hasShrinkwrap":false},"1.0.4":{"name":"@elara-services/downloader","version":"1.0.4","description":"Downloads media to a certain directory","main":"./dist/src/index.js","author":{"name":"SUPERCHIEFYT","url":"Elara-Discord-Bots, Elara-Services"},"license":"ISC","scripts":{"build":"rm -rf dist && rm -rf docs && tsc && npx typedoc src/index.ts","pub":"npm run build && npm publish","firstpub":"npm run build && npm publish --access=public","lint":"eslint .","pf":"prettier --write src/**/*.ts","pc":"prettier --check src/**/*.ts","clean":"rm -rf .git","conf":"ts-node setup.ts"},"repository":{"type":"git","url":"git+https://github.com/elara-bots/npm.git#main"},"homepage":"https://elara-services-downloader.pages.dev/","devDependencies":{"@types/follow-redirects":"^1.14.4","@types/node":"^20.3.0","@typescript-eslint/eslint-plugin":"^5.59.9","@typescript-eslint/parser":"^5.59.9","eslint":"^8.42.0","prettier":"^2.8.8","ts-node":"10.9.1","tslib":"^2.6.0","typedoc":"0.24.8","typescript":"5.1.3"},"dependencies":{"follow-redirects":"^1.15.6","yargs":"^17.7.2"},"bin":{"download":"bin/index.js"},"types":"./dist/src/index.d.ts","gitHead":"e736c5a0a4d2a83e8d1d95ca84a36d74b08d7b65","bugs":{"url":"https://github.com/elara-bots/npm/issues"},"_id":"@elara-services/downloader@1.0.4","_nodeVersion":"21.2.0","_npmVersion":"9.6.0","dist":{"integrity":"sha512-lEUyQnxgehA3x6fxuuieI4i4d4jDL6Cv6FW3FSUVYXCHhWIKNdCJwts/o7WG/JPX3EYi2pk/YGzya6I1n+2i3Q==","shasum":"3055f430636f0cee173578b76e851bfd1f543196","tarball":"https://registry.npmjs.org/@elara-services/downloader/-/downloader-1.0.4.tgz","fileCount":17,"unpackedSize":175082,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxduRdDXYo2+5H+v4oH4j+YiC2UKziE1atmoiGHfbCTgIhAK9oZ8S4i8ZS2adZAhGWktYfmjM/3vqBt/cBDBMobN/X"}]},"_npmUser":{"name":"elara-services","email":"elaradiscordbot@gmail.com"},"directories":{},"maintainers":[{"name":"elara-services","email":"elaradiscordbot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/downloader_1.0.4_1717657440220_0.787345711459543"},"_hasShrinkwrap":false},"1.0.5":{"name":"@elara-services/downloader","version":"1.0.5","description":"Downloads media to a certain directory","main":"./dist/src/index.js","author":{"name":"SUPERCHIEFYT","url":"Elara-Discord-Bots, Elara-Services"},"license":"ISC","scripts":{"build":"rm -rf dist && rm -rf docs && tsc && npx typedoc src/index.ts","pub":"npm run build && npm publish","firstpub":"npm run build && npm publish --access=public","lint":"eslint .","pf":"prettier --write src/**/*.ts","pc":"prettier --check src/**/*.ts","clean":"rm -rf .git","conf":"ts-node setup.ts"},"repository":{"type":"git","url":"git+https://github.com/elara-bots/npm.git#main"},"homepage":"https://elara-services-downloader.pages.dev/","devDependencies":{"@types/follow-redirects":"^1.14.4","@types/node":"^20.3.0","@typescript-eslint/eslint-plugin":"^5.59.9","@typescript-eslint/parser":"^5.59.9","eslint":"^8.42.0","prettier":"^2.8.8","ts-node":"10.9.1","typedoc":"0.24.8","typescript":"5.1.3"},"dependencies":{"tslib":"^2.6.0","follow-redirects":"^1.15.6","yargs":"^17.7.2"},"bin":{"download":"bin/index.js"},"types":"./dist/src/index.d.ts","gitHead":"e736c5a0a4d2a83e8d1d95ca84a36d74b08d7b65","bugs":{"url":"https://github.com/elara-bots/npm/issues"},"_id":"@elara-services/downloader@1.0.5","_nodeVersion":"21.2.0","_npmVersion":"9.6.0","dist":{"integrity":"sha512-buQ2A4n29IbU1HKh/Hc7W2IdDk7RwCpmmAIVvrJYCV58KLp5WSq3GooFosxrmYd5CmAcT7xSVeTxULceupKJxg==","shasum":"c7fd9d28387880838eb21ebcd77f75dd2328e8f7","tarball":"https://registry.npmjs.org/@elara-services/downloader/-/downloader-1.0.5.tgz","fileCount":17,"unpackedSize":175082,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDFHVjnm9NXdFO8C2+tSQ09PX5BazeQKN0BkApHmogsJAiBPXC2a5CdCJj6QH2ci/qfcv1caGqWSj+MwpsM43IzdEQ=="}]},"_npmUser":{"name":"elara-services","email":"elaradiscordbot@gmail.com"},"directories":{},"maintainers":[{"name":"elara-services","email":"elaradiscordbot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/downloader_1.0.5_1717657621977_0.41246214575358464"},"_hasShrinkwrap":false},"1.0.6":{"name":"@elara-services/downloader","version":"1.0.6","description":"Downloads media to a certain directory","main":"./dist/src/index.js","author":{"name":"SUPERCHIEFYT","url":"Elara-Discord-Bots, Elara-Services"},"license":"ISC","scripts":{"build":"rm -rf dist && rm -rf docs && tsc && npx typedoc src/index.ts","pub":"npm run build && npm publish","firstpub":"npm run build && npm publish --access=public","lint":"eslint .","pf":"prettier --write src/**/*.ts","pc":"prettier --check src/**/*.ts","clean":"rm -rf .git","conf":"ts-node setup.ts"},"repository":{"type":"git","url":"git+https://github.com/elara-bots/npm.git#main"},"homepage":"https://elara-services-downloader.pages.dev/","devDependencies":{"@types/follow-redirects":"^1.14.4","@types/node":"^20.3.0","@typescript-eslint/eslint-plugin":"^5.59.9","@typescript-eslint/parser":"^5.59.9","eslint":"^8.42.0","prettier":"^2.8.8","ts-node":"10.9.1","typedoc":"0.24.8","typescript":"5.1.3"},"dependencies":{"tslib":"^2.6.0","follow-redirects":"^1.15.6","yargs":"^17.7.2"},"bin":{"download":"bin/index.js"},"types":"./dist/src/index.d.ts","gitHead":"e736c5a0a4d2a83e8d1d95ca84a36d74b08d7b65","bugs":{"url":"https://github.com/elara-bots/npm/issues"},"_id":"@elara-services/downloader@1.0.6","_nodeVersion":"21.2.0","_npmVersion":"9.6.0","dist":{"integrity":"sha512-5iev3PUXV5D3CbNxvBgENSVKWhe5Aub0fzLB+YGcGrFEqLUTMMQNseLi11WMGoRjxtCcBcc9HJiOmVO6ZZEBoQ==","shasum":"da9731c76669194e36df1da5a6d0966147287338","tarball":"https://registry.npmjs.org/@elara-services/downloader/-/downloader-1.0.6.tgz","fileCount":17,"unpackedSize":175045,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDE5Ndm0fbhpdVAwxQZ+Hc/iDbJn7NVXgAoyjfMC6GlAAiBBg8Q3L9i6xzsMDysgidNwm66Ls3Ff3FNpPAleS0+caQ=="}]},"_npmUser":{"name":"elara-services","email":"elaradiscordbot@gmail.com"},"directories":{},"maintainers":[{"name":"elara-services","email":"elaradiscordbot@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/downloader_1.0.6_1717657719846_0.1747963846508196"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-05T02:55:48.873Z","1.0.0":"2024-06-05T02:55:49.134Z","modified":"2024-06-06T07:08:40.197Z","1.0.1":"2024-06-05T03:15:54.926Z","1.0.2":"2024-06-06T01:15:38.741Z","1.0.3":"2024-06-06T01:19:58.347Z","1.0.4":"2024-06-06T07:04:00.370Z","1.0.5":"2024-06-06T07:07:02.164Z","1.0.6":"2024-06-06T07:08:40.036Z"},"maintainers":[{"name":"elara-services","email":"elaradiscordbot@gmail.com"}],"description":"Downloads media to a certain directory","homepage":"https://elara-services-downloader.pages.dev/","repository":{"type":"git","url":"git+https://github.com/elara-bots/npm.git#main"},"author":{"name":"SUPERCHIEFYT","url":"Elara-Discord-Bots, Elara-Services"},"bugs":{"url":"https://github.com/elara-bots/npm/issues"},"license":"ISC","readme":"# Welcome to the Downloader package\r\n----\r\n# Links:\r\n\r\n## [![Docs](https://cdn.discordapp.com/emojis/792291458081095691.png?size=24) Docs](https://elara-services-downloader.pages.dev)\r\n## [![Discord](https://cdn.discordapp.com/emojis/847624594717671476.png?size=24) Support](https://discord.gg/qafHJ63 \"Support Server\") \r\n## [![Patreon](https://cdn.discordapp.com/emojis/920524344042606695.png?size=24) Patreon](https://patreon.com/elaraservices \"Patreon\")\r\n## [![PayPal](https://cdn.discordapp.com/emojis/1106809124299214858.png?size=24) PayPal](https://paypal.me/superchiefyt \"PayPal\")\r\n\r\n----\r\n\r\n## Getting Started\r\n- NOTE: This package will automatically create the directories the file_path has if it doesn't exist! \r\n\r\n```js\r\n    const { Downloader } = require(\"@elara-services/downloader\");\r\n\r\n    // Without default directory. ('path' required to be included per-download)\r\n    const client = new Downloader();\r\n\r\n    // With default directory \r\n    const client = new Downloader(`${process.cwd()}/downloads`); // Will download all files to the downloads folder. \r\n```\r\n\r\n\r\n### Set Default Directory/Folder\r\n```js\r\n    // SET\r\n    // NOTE: This WILL create the directory if it doesn't exist!\r\n    client.setDefaultDirectory(`${process.cwd()}/downloads`); // Sets the default directory as `/downloads`\r\n\r\n    // RESET\r\n    client.setDefaultDirectory(null);\r\n```\r\n\r\n### Download File:\r\n```js\r\n    // Will extract the file name and extension from the link.\r\n    const r = await client.file(`LINK_HERE`); // Downloads the file to the default directory.\r\n\r\n    // With options.\r\n    const r = await client.file(`LINK_HERE`, {\r\n        name: `boop`, // [OPTIONAL]: Only use a file name not the extension! (extension is automatically set!)\r\n        path: `${process.cwd()}/images`, // [OPTIONAL]: OR `${process.cwd()}/images/file_name.png` (an exact path name you want to use)\r\n        extractFilename: false, // [OPTIONAL]: If false it won't extract the file name and use the one you provided.\r\n        maxRedirects: 2, // [OPTIONAL]: The max redirects to follow before erroring out. (default: 21)\r\n        // ...other_https_client_options,\r\n    });\r\n    // Use 'r'\r\n```\r\n\r\n### Download Files:\r\n```js\r\n    const r = await client.files([\r\n        { url: `....` },\r\n        { url: `....`, ...other_file_info_above },\r\n    ]);\r\n    // Returns { success: string[], errors: Error[] }\r\n```","readmeFilename":"README.MD"}