{"id":24529261,"url":"https://github.com/opencomponents/oc-warmup","last_synced_at":"2025-06-28T02:38:18.428Z","repository":{"id":139897299,"uuid":"52408173","full_name":"opencomponents/oc-warmup","owner":"opencomponents","description":"A node.js module for warming up an OpenComponents registry","archived":false,"fork":false,"pushed_at":"2018-01-18T14:41:01.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-13T07:49:45.766Z","etag":null,"topics":["opencomponents"],"latest_commit_sha":null,"homepage":null,"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/opencomponents.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-02-24T02:31:42.000Z","updated_at":"2017-05-03T16:55:52.000Z","dependencies_parsed_at":"2023-05-28T05:45:40.314Z","dependency_job_id":null,"html_url":"https://github.com/opencomponents/oc-warmup","commit_stats":null,"previous_names":["matteofigus/oc-warmup"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/opencomponents/oc-warmup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomponents%2Foc-warmup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomponents%2Foc-warmup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomponents%2Foc-warmup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomponents%2Foc-warmup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencomponents","download_url":"https://codeload.github.com/opencomponents/oc-warmup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomponents%2Foc-warmup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259606816,"owners_count":22883544,"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":["opencomponents"],"created_at":"2025-01-22T07:35:41.194Z","updated_at":"2025-06-28T02:38:18.409Z","avatar_url":"https://github.com/opencomponents.png","language":"JavaScript","readme":"oc-warmup [![Build Status](https://secure.travis-ci.org/opencomponents/oc-warmup.png?branch=master)](http://travis-ci.org/opencomponents/oc-warmup)\n===============\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/opencomponents/oc-warmup.svg)](https://greenkeeper.io/)\n\n[![NPM](https://nodei.co/npm/oc-warmup.png?downloads=true)](https://npmjs.org/package/oc-warmup)\n\nAllows to warmup all components for a given [OpenComponents](https://github.com/opentable/oc)' registry. In practice, given every registry's instance has an internal cache for components' compiled views and server.js' closures, the module performs the following actions:\n\n* It scans the registry to retrieve components' list\n* Requests info for each component (latest version only) in order to get components' API (mandatory parameters and example values)\n* Makes a POST request for all components so that the cache is populated from S3\n* Responds with the list of components that responded with a 200 or not\n\n```js\nvar warmup = require('oc-warmup');\n\nwarmup({\n  url: 'http://registry-01234.mycompany.com/',\n\n  // optional params\n  components: c =\u003e c.name === 'header' \u0026\u0026 c.oc.state !== 'deprecated',\n  headers: { 'accept-language': 'en-US' },\n  timeout: 20000\n}, (error, result) =\u003e {\n  console.log(error);\n  // =\u003e something like 'error connecting to registry' or null\n\n  console.log(result);\n  // =\u003e something like { successful: ['a', 'b'], errors: ['* c: error blabla (500)']}\n});\n```\n\n# License\nMIT\n","funding_links":[],"categories":["Registry Plugins/Utilities"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencomponents%2Foc-warmup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencomponents%2Foc-warmup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencomponents%2Foc-warmup/lists"}