{"_id":"4front-s3-deployments","_rev":"5-711e5824d19aa5b790c387366fc98e66","name":"4front-s3-deployments","description":"S3 based deployments for 4front","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"4front-s3-deployments","version":"0.0.1","description":"S3 based deployments for 4front","main":"index.js","scripts":{"test":"mocha --reporter spec --bail test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec test/"},"author":{"name":"David Von Lehman","email":"https://github.com/dvonlehman"},"licenses":[{"type":"Apache-2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}],"dependencies":{"async":"^0.9.0","aws-sdk":"^2.1.19","dash-assert":"^1.0.1","debug":"^2.1.3","lodash":"^3.6.0","mime":"^1.3.4","simple-errors":"^1.0.1"},"devDependencies":{"dash-assert":"^1.0.1","istanbul":"^0.3.11","mocha":"^2.2.1","s3rver":"0.0.2","shortid":"^2.2.2","simple-bufferstream":"^1.0.0"},"gitHead":"02e9ab9e7edb695afe804b95df4bbaf339259063","_id":"4front-s3-deployments@0.0.1","_shasum":"0650b912a12495b3da821993fbfda040c883b746","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"dvonlehman","email":"david.vonlehman@gmail.com"},"maintainers":[{"name":"dvonlehman","email":"david.vonlehman@gmail.com"}],"dist":{"shasum":"0650b912a12495b3da821993fbfda040c883b746","tarball":"https://registry.npmjs.org/4front-s3-deployments/-/4front-s3-deployments-0.0.1.tgz","integrity":"sha512-dJPfUglsRo8xdqZJWKOWpU+/iPOu+ivIZHI5+K4YPLDsK86QJXvUJgkYsy/GiBD0Eh7+LOBbZe9c60ei+GlTSw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHA0fySEJYMI6aATLXJnQVzJCXMFLm/C+MTgu5W+OBIwAiEA1KqMGPpzX7aTvu+hbJT/atx1X1dnCCcfrG9Uo6Z/mzs="}]}}},"readme":"# 4front-s3-deployments\n\n<!-- [![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url] -->\n[![Build Status][travis-image]][travis-url]\n[![Test Coverage][coveralls-image]][coveralls-url]\n\n[S3](http://aws.amazon.com/s3) based code deployments or the [4front web platform](http://4front.io). Used to store uploaded virtual app assets such as JavaScripts, stylesheets, html files, images, and more.\n\nAlthough static assets can be served via the 4front node.js platform, it is more efficient to use S3 as a web host directly. See the AWS docs on how to [configure a bucket for static hosting](http://docs.aws.amazon.com/AmazonS3/latest/UG/ConfiguringBucketWebsite.html). As a further optimization you can configure CloudFront (or another CDN) in front of the S3 bucket URL. The [htmlprep](https://www.npmjs.com/package/htmlprep) package dynamically rewrites your relative asset paths to the appropriate absolute path.\n\nFor a local installation of the 4front platform, the [s3rver](https://www.npmjs.com/package/s3rver) provides a mock implementation of S3 that utilizes your local filesystem.\n\n## Installation\n~~~\nnpm install 4front-s3-deployments\n~~~\n\n## Usage\n\n~~~js\nvar s3Deployments = require('4front-s3-deployments')({\n\tregion: 'us-west-2',\n\tbucket: '4front-deployments'\n});\n~~~\n\nYou can pass in any valid option accepted by the [AWS.config](http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html) object including `region`, `accessKeyId`, `secretAccessKey`, etc.\n\n### API\n\n~~~js\n// Deploy an individual file\ns3Deployments.deployFile(appId, versionId, fileInfo, callback);\n\n// Returns a readable stream\ns3Deployments.readFileStream(appId, versionId, filePath);\n\n// Delete version\ns3Deployments.deleteVersion(appId, versionId, callback);\n\n// Delete all deployed versions for an app\ns3Deployments.deleteAllVersions(appId, callback);\n\n// List all the files for a version\ns3Deployments.listFiles(appId, versionId, callback);\n\n// Check if file exists\ns3Deployments.fileExists(appId, versionId, filePath, callback);\n~~~\n\nSee the [unit tests](https://github.com/4front/s3-deployments/blob/master/test/s3.js) for example calls of all these functions.\n\n## Running Tests\n~~~\nnpm test\n~~~\n\n## License\nLicensed under the Apache License, Version 2.0. See the top-level file LICENSE.txt and (http://www.apache.org/licenses/LICENSE-2.0).\n\n[npm-image]: https://img.shields.io/npm/v/4front-s3-deployments.svg?style=flat\n[npm-url]: https://npmjs.org/package/4front-s3-deployments\n[travis-image]: https://img.shields.io/travis/4front/s3-deployments.svg?style=flat\n[travis-url]: https://travis-ci.org/4front/s3-deployments\n[coveralls-image]: https://img.shields.io/coveralls/4front/s3-deployments.svg?style=flat\n[coveralls-url]: https://coveralls.io/r/4front/s3-deployments?branch=master\n[downloads-image]: https://img.shields.io/npm/dm/4front-s3-deployments.svg?style=flat\n[downloads-url]: https://npmjs.org/package/4front-s3-deployments\n","maintainers":[{"name":"dvonlehman","email":"david.vonlehman@gmail.com"}],"time":{"modified":"2022-06-12T14:07:50.314Z","created":"2015-04-17T22:19:34.386Z","0.0.1":"2015-04-17T22:19:34.386Z","0.0.2":"2015-04-17T22:22:08.916Z"},"author":{"name":"David Von Lehman","email":"https://github.com/dvonlehman"},"readmeFilename":"README.md"}