{"id":23593913,"url":"https://github.com/itv/pmpact","last_synced_at":"2026-05-02T13:01:49.039Z","repository":{"id":32955358,"uuid":"146436088","full_name":"ITV/pmpact","owner":"ITV","description":"A command line tool to convert Pact files to Postman collections.","archived":false,"fork":false,"pushed_at":"2024-10-25T11:34:49.000Z","size":289,"stargazers_count":16,"open_issues_count":1,"forks_count":3,"subscribers_count":70,"default_branch":"main","last_synced_at":"2025-05-07T22:06:52.177Z","etag":null,"topics":["cli","pact","postman","postman-collection"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ITV.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":"2018-08-28T11:14:37.000Z","updated_at":"2024-10-25T11:34:51.000Z","dependencies_parsed_at":"2023-11-14T17:38:19.945Z","dependency_job_id":"916750b8-da69-45fd-896b-abc8a9199341","html_url":"https://github.com/ITV/pmpact","commit_stats":{"total_commits":64,"total_committers":9,"mean_commits":7.111111111111111,"dds":0.359375,"last_synced_commit":"6354747bbcd1f00365b2b01a2bd329ddf45bd524"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITV%2Fpmpact","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITV%2Fpmpact/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITV%2Fpmpact/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITV%2Fpmpact/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ITV","download_url":"https://codeload.github.com/ITV/pmpact/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252961837,"owners_count":21832196,"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":["cli","pact","postman","postman-collection"],"created_at":"2024-12-27T09:14:00.386Z","updated_at":"2026-03-04T13:04:17.759Z","avatar_url":"https://github.com/ITV.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pmpact\n\nA command line tool to convert [_Pact_](https://docs.pact.io/) files to [_Postman_](https://www.getpostman.com/) collections.\n\n## Contents\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n  - [Installation from the repo](#installation-from-the-repo)\n- [Command line usage](#command-line-usage)\n  - [From a url](#from-a-url)\n  - [From a file](#from-a-file)\n  - [Save to a file](#save-to-a-file)\n  - [From a url that requires headers](#from-a-url-that-requires-headers)\n- [Postman usage](#postman-usage)\n  - [Import the collection in _Postman_](#import-the-collection-in-postman)\n  - [Create a _Postman_ environment](#create-a-postman-environment)\n- [Run tests](#run-tests)\n  - [Run all tests](#run-all-tests)\n  - [Run unit tests only](#run-unit-tests-only)\n  - [Run integration tests only](#run-integration-tests-only)\n- [License](#license)\n\n## Requirements\n\nRequires [_NodeJS_](https://nodejs.org/en/) version `v24.13` or higher.\n\n## Installation\n\n```\nnpm install -g pmpact\n```\n\n### Installation from the repo\n\nClone the repo and from the root execute:\n\n```\nnpm install\nnpm link\n```\n\n**Note**: Don't forget to run `npm unlink` if needed!\n\n## Command line usage\n\n### From a url\n\n```\npmpact http://pact-broker/provider/a-provider/consumer/a-consumer/latest\n```\n\n### From a file\n\n```\npmpact pact-file.json\n```\n\n### Save to a file\n\n```\npmpact http://pact-broker/provider/a-provider/consumer/a-consumer/latest -o postman-collection.json\n```\n\n### From a url that requires headers\n\n```\npmpact http://pact-broker/provider/a-provider/consumer/a-consumer/latest -H '{\"Authorization\":\"Basic ZFhmbHR5Rk1n...\"}'\n```\n\n## _Postman_ usage\n\n### Import the collection in _Postman_\n\nOnce you have a generated [_Postman_ collection](https://www.getpostman.com/docs/v6/postman/collections/intro_to_collections), select \"import\" in _Postman_. The generated collection format is `2.1`.\n\nA collection should appear, starting with the name \"Pact\".\n\n### Create a _Postman_ environment\n\nA url variable is used for all the requests. The next step is to create an [_Postman_ environment](https://www.getpostman.com/docs/v6/postman/environments_and_globals/intro_to_environments_and_globals) with a url variable, for example: `url: http://my-service.com`.\n\n1. ![Image](labs/assets/postman-environment/step1.png?raw=true)\n2. ![Image](labs/assets/postman-environment/step2.png?raw=true)\n3. ![Image](labs/assets/postman-environment/step3.png?raw=true)\n4. ![Image](labs/assets/postman-environment/step4.png?raw=true)\n\nYou're good to go - so make the requests!\n\n## Run tests\n\n### Run all tests\n\n```\nnpm test\n```\n\n### Run unit tests only\n\n```\nnpm run test-unit\n```\n\n### Run integration tests only\n\n```\nnpm run test-integration\n```\n\n### Watch tests\n\n```\nnpm install -g nodemon\nnodemon tests/unit -x \"npm run test-unit\"\nnodemon tests/integration -x \"npm run test-integration\"\n```\n\n## Release process\n\nWhen contributing, the process we adhere to for releases is found in [RELEASE.md](./RELEASE.md).\n\n## License\n\n[See License file](https://github.com/ITV/pmpact/blob/master/LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitv%2Fpmpact","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitv%2Fpmpact","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitv%2Fpmpact/lists"}