{"_id":"@blueshit/cos-client","_rev":"1-1a4b7d88df09d25964df49b1afb5acb7","name":"@blueshit/cos-client","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@blueshit/cos-client","version":"1.0.0","description":"简单腾讯云COS客户端","main":"dist/index.js","typings":"dist/index.d.ts","scripts":{"test":"jest","tag":"git tag v`node -p 'require(\"./package\").version'`","format":"prettier --write \"src/**/*.ts\"","clean":"rm -rf dist","test:cov":"jest --coverage","prepublishOnly":"npm run format && npm run clean && tsc && npm run test:cov","postpublish":"npm run tag && git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/npmshit/cos-client.git"},"keywords":["cos-client","tencent-cos"],"author":{"name":"Yourtion","email":"yourtion@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/npmshit/cos-client/issues"},"homepage":"https://github.com/npmshit/cos-client#readme","peerDependencies":{"@types/node":"*"},"devDependencies":{"@types/jest":"^26.0.24","@types/node":"^16.3.1","jest":"^27.0.6","prettier":"^2.3.2","ts-jest":"^27.0.3","typescript":"^4.3.5"},"prettier":{"printWidth":120,"trailingComma":"es5"},"jest":{"transform":{"^.+\\.tsx?$":"ts-jest"},"testRegex":"src/test","collectCoverageFrom":["src/index.ts"],"moduleFileExtensions":["ts","js","json"]},"dependencies":{"@types/mime":"^2.0.0","mime":"^2.3.1"},"gitHead":"b8fb7c2426160683cff3a542a36e72d6e27ecc7c","_id":"@blueshit/cos-client@1.0.0","_nodeVersion":"16.4.2","_npmVersion":"7.18.1","dist":{"integrity":"sha512-bFjsJkW21rt8TddUgp0QDTBmLEgA5lgdkTYqMqiB4z1IpmmboTFDCamk3XPZ3tGBFk8aboDWWhMVbDoxtULwZw==","shasum":"a58009bb69f9ead8602f065dfc7f2410b7a23e7d","tarball":"https://registry.npmjs.org/@blueshit/cos-client/-/cos-client-1.0.0.tgz","fileCount":5,"unpackedSize":13244,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7TPICRA9TVsSAnZWagAAgjYQAJBZYQRAfjvSViMp5rVT\nRC/TNjaIboDhZNVoQmhsJx45RVQTOfwglvpDlAxOa27cw+4XEyfFrX3wVh1d\nb7lzsfK5qPWu2Lc6FCZ9t5muAwnVoIMuw+SsaZYKDRtcMOx5SGC0unhh7SVa\n8uBeAKhnA+bM97ZBqtppO6R9RpsdZZwOxw52gMOfY285RiZ5RRZfao9vkQsS\nL/EoYGpU5QMaH3NpKlb5+6KHIwwwGJ60qVWzHyJKTDL2RyTeh0w5eYtk4x8I\nk2Or8ovRxoocP3298TmjbFcPRNUk/oMORY2ZdRn+Mk6vv6PxYRDeZDsqZu+n\nfsX2bRr1HURG5wZaJL83AdWih5yG0puxj9rSCysapa+DlmZRWRYFsRGPqc46\nSk46KPdXoZ9kP9RVSlkGqplC+8kvnsJT7zwkzcGDLJHFEywtkltpnlU/Cn9Y\nV9cDBFoHHGpHZoEj8JTMiJ2VliWPT8E8zdW03lcmq0d0e6N71wb1g5/jXt2O\nc4Q93YScrp1RiheBUb3qWFbQnBHp1qE4AVQq3XYb6GLZgPorrlratnboz7k+\nEgYhtWuAiO1Zt0WLcct6B/bIgHrk9DEOMwHK63Awpctc8ubFrjDaKH1cacBk\nEIq7fb53In2pQBWfcE6787uyDm4yvgqcTKgQHEGNJ2m9MGUqXM/5+Vok7djm\n2x+O\r\n=u5yW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFErBw9JhM2zDlo6EVlr/iJzkc7draBDB/LhBKACeXotAiEAwicjtUL8FU6CbtJwZdiPaOuFiiLdRJG+mrVS9PM6I5A="}]},"_npmUser":{"name":"yourtion","email":"yourtion@gmail.com"},"directories":{},"maintainers":[{"name":"leizongmin","email":"leizongmin@gmail.com"},{"name":"yourtion","email":"yourtion@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cos-client_1.0.0_1626158024337_0.9661777420249429"},"_hasShrinkwrap":false}},"time":{"created":"2021-07-13T06:33:44.278Z","1.0.0":"2021-07-13T06:33:44.498Z","modified":"2022-04-04T19:49:54.751Z"},"maintainers":[{"name":"leizongmin","email":"leizongmin@gmail.com"},{"name":"yourtion","email":"yourtion@gmail.com"}],"description":"简单腾讯云COS客户端","homepage":"https://github.com/npmshit/cos-client#readme","keywords":["cos-client","tencent-cos"],"repository":{"type":"git","url":"git+https://github.com/npmshit/cos-client.git"},"author":{"name":"Yourtion","email":"yourtion@gmail.com"},"bugs":{"url":"https://github.com/npmshit/cos-client/issues"},"license":"MIT","readme":"# cos-client\n\n腾讯云 COS 客户端\n\n## Install\n\n```javascript\nconst COSClient = require(\"@blueshit/cos-client\").default;\n\nconst client = new COSClient({\n  appId: \"xxxxx\",\n  secretId: \"xxxxx\",\n  secretKey: \"xxxxx\",\n  bucket: \"test\",\n  region: \"ap-guangzhou\",\n  prefix: \"test/\",\n});\n\n// 通过 Buffer 上传\nconst data = fs.readFileSync(\"icon.png\");\nclient.putObject(\"icon.png\", data)\n  .then(console.log)\n  .catch(console.log);\n\n// 通过 Stream 上传\nconst stream = fs.createReadStream(\"icon.png\");\nclient.putObject(\"icon.png\", stream)\n  .then(console.log)\n  .catch(console.log);\n```\n","readmeFilename":"README.md"}