{"id":26013266,"url":"https://github.com/msyea/wait-for-blah","last_synced_at":"2026-04-16T16:05:10.438Z","repository":{"id":35043773,"uuid":"190063715","full_name":"msyea/wait-for-blah","owner":"msyea","description":"Utility that waits for docker containers to puke to the stdout","archived":false,"fork":false,"pushed_at":"2023-01-03T23:20:49.000Z","size":886,"stargazers_count":1,"open_issues_count":14,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-03T04:16:18.092Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msyea.png","metadata":{"funding":{"github":["octocat","surftocat"],"patreon":"octocat","tidelift":"npm/octo-package","custom":["https://www.paypal.me/octocat","octocat.com"]},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-03T18:53:08.000Z","updated_at":"2019-10-04T11:11:42.000Z","dependencies_parsed_at":"2023-01-15T12:38:51.000Z","dependency_job_id":null,"html_url":"https://github.com/msyea/wait-for-blah","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msyea%2Fwait-for-blah","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msyea%2Fwait-for-blah/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msyea%2Fwait-for-blah/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msyea%2Fwait-for-blah/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msyea","download_url":"https://codeload.github.com/msyea/wait-for-blah/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242123676,"owners_count":20075409,"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":"2025-03-06T01:27:57.311Z","updated_at":"2026-04-16T16:05:10.407Z","avatar_url":"https://github.com/msyea.png","language":"JavaScript","funding_links":["https://github.com/sponsors/octocat","https://github.com/sponsors/surftocat","https://patreon.com/octocat","https://tidelift.com/funding/github/npm/octo-package","https://www.paypal.me/octocat","octocat.com"],"categories":[],"sub_categories":[],"readme":"# wait-for-blah\nAn elegant utility that waits for docker containers to be ready by monitoring their stdout\n\n# An example\nThis utility was inspired but this real life situation:\n\u003e You're waiting for a stub service (kafka) to be ready (create topics).\nUnfortunately existing libraries such as the excellent `dadarek/wait-for-dependencies` report ready when the service starts listening via TCP on a port not when the topic is created. For some people this is premature.\n\n# How it works\n\n```yaml\nversion: \"3\"\nservices:\n  zookeeper:\n    image: wurstmeister/zookeeper\n    expose:\n      - \"2181\"\n    depends_on:\n      - kafka\n  kafka:\n    image: wurstmeister/kafka:2.11-1.1.1\n    exposr:\n      - \"9092\"\n    environment:\n      KAFKA_ADVERTISED_HOST_NAME: kafka\n      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181\n      KAFKA_CREATE_TOPICS: custom-topic-1:1:1,custom-topic-2:1:1\n  mongo:\n    image: mongo\n  tests:\n    build: ./tests\n    links:\n      - kafka\n      - stub\n```\n\n```ts\nimport wfb from 'wait-for-blah'\n\nconst waitForKafka = () =\u003e wfb('kafka', /Created log for partition/)\nconst waitForMongo = () =\u003e wfb('mongo', [/waiting for connections/])\n\n(async () =\u003e {\n  await waitForKafka()\n  await waitForMongo()\n  await wfb('tests')\n})()\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsyea%2Fwait-for-blah","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsyea%2Fwait-for-blah","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsyea%2Fwait-for-blah/lists"}