{"id":13464883,"url":"https://github.com/hapipal/haute-couture","last_synced_at":"2025-04-09T21:19:33.952Z","repository":{"id":8615192,"uuid":"59060143","full_name":"hapipal/haute-couture","owner":"hapipal","description":"File-based hapi plugin composer","archived":false,"fork":false,"pushed_at":"2024-06-14T21:13:58.000Z","size":352,"stargazers_count":68,"open_issues_count":5,"forks_count":14,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-09T21:19:23.056Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hapipal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-17T21:23:54.000Z","updated_at":"2024-05-09T12:23:57.000Z","dependencies_parsed_at":"2024-07-31T14:07:17.525Z","dependency_job_id":null,"html_url":"https://github.com/hapipal/haute-couture","commit_stats":{"total_commits":183,"total_committers":12,"mean_commits":15.25,"dds":0.1584699453551912,"last_synced_commit":"a60c054fb20517294e748ebb96ea9d221afa69e9"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hapipal%2Fhaute-couture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hapipal%2Fhaute-couture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hapipal%2Fhaute-couture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hapipal%2Fhaute-couture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hapipal","download_url":"https://codeload.github.com/hapipal/haute-couture/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248111973,"owners_count":21049578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T14:00:52.201Z","updated_at":"2025-04-09T21:19:33.904Z","avatar_url":"https://github.com/hapipal.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# haute-couture\n\nFile-based hapi plugin composer\n\n[![Build Status](https://travis-ci.com/hapipal/haute-couture.svg?branch=main)](https://travis-ci.com/hapipal/haute-couture) [![Coverage Status](https://coveralls.io/repos/hapipal/haute-couture/badge.svg?branch=main\u0026service=github)](https://coveralls.io/github/hapipal/haute-couture?branch=main)\n\nLead Maintainer - [Devin Ivy](https://github.com/devinivy)\n\n## Installation\n```sh\nnpm install @hapipal/haute-couture\n```\n\n## Introduction\nThis library will wire your hapi plugin together based simply upon where you place files and the contents of those files.  It has the ability to call nearly every configuration-related method in the hapi plugin API.  This means many good things!  Here are a few:\n\n - Route configurations placed in your `routes/` directory will be registered using `server.route()`.\n - You can place your authentication scheme in `auth/schemes.js` rather than calling `server.auth.scheme()`.\n - You can provision a cache simply by placing its configuration in `caches/my-cache-name.js`, and forget about `server.cache.provision()`.\n - You can still write all the custom plugin code you desire.\n - You can customize many aspects regarding how haute-couture composes your hapi plugin from files.\n\nHaute-couture understands 19 hapi plugin methods: those for server methods, server/request decorations, request lifecycle extensions, route configuration, cookie definitions, [vision](https://github.com/hapijs/vision) view managers, [schwifty](https://github.com/hapipal/schwifty) models, [schmervice](https://github.com/hapipal/schmervice) services, and plenty more.  And if that's not enough, you can always teach it about more through its flexible [amendment](API.md#await-hautecouturecomposeserver-options-composeoptions) system.\n\n## Usage\n\u003e See also the [API Reference](API.md)\n\u003e\n\u003e Haute-couture is intended for use with hapi v19+ and nodejs v12+, in addition to several optional peer hapi plugins noted in package.json (_see v3 for lower support_).\n\nThis library is not a hapi plugin: think of it instead as a useful subroutine of any hapi plugin.  The full documentation of the files and directories it recognizes can be found in the [API documentation](API.md#files-and-directories).\n\n### Example\nHere's an example of a very simple plugin that registers a single \"pinger\" route.\n\n#### `index.js`\n```js\nconst HauteCouture = require('@hapipal/haute-couture');\n\nmodule.exports = {\n  name: 'my-hapi-plugin',\n  register: async (server, options) =\u003e {\n\n    // Custom plugin code can go here\n\n    await HauteCouture.compose(server, options);\n  }\n};\n```\n\n#### `routes/pinger.js`\n```js\nmodule.exports = {\n  method: 'get',\n  path: '/',\n  options: {\n    handler(request) {\n\n      return { ping: 'pong' };\n    }\n  }\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhapipal%2Fhaute-couture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhapipal%2Fhaute-couture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhapipal%2Fhaute-couture/lists"}