{"_id":"@amarajs/plugin-engine-server","_rev":"3-416da77fbb69a46c0f73905f0e6796c9","name":"@amarajs/plugin-engine-server","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@amarajs/plugin-engine-server","version":"0.1.0","description":"Enables AmaraJS features in a server environment.","main":"dist/amara-plugin-engine-server.js","umd:main":"dist/amara-plugin-engine-server.umd.js","jsnext:main":"src/index.js","scripts":{"build":"npm-run-all -p rollup:* -p minify:*","rollup:cjs":"rollup -c rollup.config.js -i src/index.js -f cjs -o dist/amara-plugin-engine-server.js","rollup:umd":"rollup -c rollup.config.js -i src/index.js -f umd -o dist/amara-plugin-engine-server.umd.js -n AmaraBundle","minify:cjs":"uglifyjs dist/amara-plugin-engine-server.js -cm toplevel -o dist/amara-plugin-engine-server.min.js --source-map filename=dist/amara-plugin-engine-server.min.js.map","minify:umd":"uglifyjs dist/amara-plugin-engine-server.umd.js -cm toplevel -o dist/amara-plugin-engine-server.umd.min.js --source-map filename=dist/amara-plugin-engine-server.umd.min.js.map"},"keywords":["amarajs","server","koa","express"],"author":{"name":"Dan Barnes","email":"amarajs.framework@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/amarajs/plugin-bundle.git"},"files":["src","dist"],"devDependencies":{"npm-run-all":"^4.1.2","rollup":"^0.57.1","rollup-plugin-buble":"^0.15.0","uglify-js":"^3.3.21"},"gitHead":"245504f0182e9736efb7c4463ee2ffa994318c66","bugs":{"url":"https://github.com/amarajs/plugin-bundle/issues"},"homepage":"https://github.com/amarajs/plugin-bundle#readme","_id":"@amarajs/plugin-engine-server@0.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"amarajs-dan","email":"amarajs.framework@gmail.com"},"dist":{"integrity":"sha512-q755151evrYY53/XnVEmjhgqFfIgc6uwFcwATFYTtapge7m0o9fk51fOkUMOvwglvo5VlX0tGIy4igb4GwOVgQ==","shasum":"975519823a50da15e2a50e49b6beac72ae715c63","tarball":"https://registry.npmjs.org/@amarajs/plugin-engine-server/-/plugin-engine-server-0.1.0.tgz","fileCount":10,"unpackedSize":17207,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF2OdwuiiZQgHXE7u2UlQj6hLndhMaTR+fzZtBnc2lvOAiAX5dY0ardX+FNrcQ3gjOjAztjKkaEQ/eLgcWq9ZBhBtw=="}]},"maintainers":[{"name":"amarajs-dan","email":"amarajs.framework@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-engine-server_0.1.0_1523579696777_0.3713063817387716"},"_hasShrinkwrap":false},"0.1.1":{"name":"@amarajs/plugin-engine-server","version":"0.1.1","description":"Enables AmaraJS features in a server environment.","main":"dist/amara-plugin-engine-server.js","umd:main":"dist/amara-plugin-engine-server.umd.js","jsnext:main":"src/index.js","scripts":{"build":"npm-run-all -p rollup:* -p minify:*","rollup:cjs":"rollup -c rollup.config.js -i src/index.js -f cjs -o dist/amara-plugin-engine-server.js","rollup:umd":"rollup -c rollup.config.js -i src/index.js -f umd -o dist/amara-plugin-engine-server.umd.js -n AmaraBundle","minify:cjs":"uglifyjs dist/amara-plugin-engine-server.js -cm toplevel -o dist/amara-plugin-engine-server.min.js --source-map filename=dist/amara-plugin-engine-server.min.js.map","minify:umd":"uglifyjs dist/amara-plugin-engine-server.umd.js -cm toplevel -o dist/amara-plugin-engine-server.umd.min.js --source-map filename=dist/amara-plugin-engine-server.umd.min.js.map"},"keywords":["amarajs","server","koa","express"],"author":{"name":"Dan Barnes","email":"amarajs.framework@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/amarajs/plugin-engine-server.git"},"files":["src","dist"],"devDependencies":{"npm-run-all":"^4.1.2","rollup":"^0.57.1","rollup-plugin-buble":"^0.15.0","uglify-js":"^3.3.21"},"gitHead":"78d0c168f123afaac7a37b16812a6479c5865ede","bugs":{"url":"https://github.com/amarajs/plugin-engine-server/issues"},"homepage":"https://github.com/amarajs/plugin-engine-server#readme","_id":"@amarajs/plugin-engine-server@0.1.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"amarajs-dan","email":"amarajs.framework@gmail.com"},"dist":{"integrity":"sha512-a5xyPXp8FYQa8VWmSB7ULyKqdrOb7U3iRjguuUvAJVGLpIrwqdIsIOu7yByVavetRSvteZJEe9UXSBiltf1eJw==","shasum":"3fae5b94fef7fc086a94c5093ee95fae7bc376d7","tarball":"https://registry.npmjs.org/@amarajs/plugin-engine-server/-/plugin-engine-server-0.1.1.tgz","fileCount":10,"unpackedSize":17214,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEfglJqeVIeMuuZ491I1jxl1BWIPOtpOD+1LodivTr5zAiBuR2FYefVAUY+Depb+ftOXVmsBoOcBzKHOYJTD57fSYA=="}]},"maintainers":[{"name":"amarajs-dan","email":"amarajs.framework@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-engine-server_0.1.1_1523580140466_0.44564686895953587"},"_hasShrinkwrap":false}},"time":{"created":"2018-04-13T00:34:56.704Z","0.1.0":"2018-04-13T00:34:56.888Z","modified":"2022-04-04T13:43:43.107Z","0.1.1":"2018-04-13T00:42:20.621Z"},"maintainers":[{"name":"amarajs-dan","email":"amarajs.framework@gmail.com"}],"description":"Enables AmaraJS features in a server environment.","homepage":"https://github.com/amarajs/plugin-engine-server#readme","keywords":["amarajs","server","koa","express"],"repository":{"type":"git","url":"git+https://github.com/amarajs/plugin-engine-server.git"},"author":{"name":"Dan Barnes","email":"amarajs.framework@gmail.com"},"bugs":{"url":"https://github.com/amarajs/plugin-engine-server/issues"},"license":"MIT","readme":"## [@amarajs/plugin-engine-server](https://github.com/amarajs/plugin-engine-server)\n\nEnables AmaraJS features in a server environment.\n\n### Installation\n\n`npm install --save @amarajs/plugin-engine-server`\n\n### Usage\n\n```javascript\nconst Koa = require('koa');\nconst Amara = require('@amarajs/core');\nconst AmaraServer = require('@amarajs/plugin-engine-server');\n\nconst server = new Koa();\nconst amara = Amara([\n    AmaraServer(server)\n]);\n\nserver.use(...); // add Koa middleware here\n\namara.bootstrap(8080);\n```\n\n### Description\n\nThe `@amarajs/plugin-engine-server` middleware provides [`@amarajs/core`](https://github.com/amarajs/core) with the ability to map each feature's `target` selector strings to HTTP requests. For example:\n\n```javascript\namara.add({\n    type: 'some-custom-type',\n    // @amarajs/plugin-engine-server will use these\n    // target strings to identify which HTTP requests\n    // this feature should be applied to\n    targets: ['GET /index.js', 'POST /users/*'],\n    apply: () => {}\n});\n```\n\n### Customization\n\nThis plugin accepts a [Koa](https://github.com/koajs/koa) server instance.\n\n### Contributing\n\nIf you have a feature request, please create a new issue so the community can discuss it.\n\nIf you find a defect, please submit a bug report that includes a working link to reproduce the problem (for example, using [this fiddle](https://jsfiddle.net/04f3v2x4/)). Of course, pull requests to fix open issues are always welcome!\n\n### License\n\nThe MIT License (MIT)\n\nCopyright (c) Dan Barnes\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md"}