{"name":"@cucumber/pretty-formatter","version":"2.2.0","author":{"name":"David Goss"},"license":"MIT","_id":"@cucumber/pretty-formatter@2.2.0","maintainers":[{"name":"cukebot","email":"cukebot@cucumber.io"},{"name":"davidjgoss","email":"david@davidgoss.co"}],"homepage":"https://github.com/cucumber/pretty-formatter#readme","bugs":{"url":"https://github.com/cucumber/pretty-formatter/issues"},"dist":{"shasum":"e222225c3ac2de9737fcd742a274188102e364b4","tarball":"http://registry-npm.ywwl.com/@cucumber/pretty-formatter/download/@cucumber/pretty-formatter-2.2.0.tgz","fileCount":28,"integrity":"sha512-WS9k/XEF1wV6q/nst6lYoF+gzQWa5giw4cZEXhAuK7oeyuamfKUYn8FM1i5dntdXqZ5l4ltH8fxVVphWF6dptQ==","signatures":[{"sig":"MEUCIQCrl+rmtSqehnmmZnbTejcOf9MzjXXn/pDxn+AaSf1T3gIgLdnKVST+ymYqFvKJI2pC+kFIGNmHoW09ZKQeQKZT2BM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":93175,"size":24505,"noattachment":false,"key":"/@cucumber/pretty-formatter/-/@cucumber/pretty-formatter-2.2.0.tgz"},"main":"dist/src/index.js","type":"module","types":"dist/src/index.d.ts","gitHead":"3636783ab113fea994cea91c13353cbba30bbf74","scripts":{"fix":"eslint --ext ts --max-warnings 0 src --fix src && prettier --write src","lint":"eslint --ext ts --max-warnings 0 src && prettier --check src","test":"mocha \"src/**/*.spec.ts\"","build":"tsc --build tsconfig.build.json","clean":"rm -rf dist","prepublishOnly":"tsc --build tsconfig.build.json"},"_npmUser":{"name":"cukebot","email":"cukebot@cucumber.io"},"repository":{"url":"git+https://github.com/cucumber/pretty-formatter.git","type":"git"},"_npmVersion":"10.9.3","description":"<h1 align=\"center\">   <img alt=\"\" width=\"75\" src=\"https://github.com/cucumber.png\"/>   <br>   pretty-formatter </h1> <p align=\"center\">   <b>Writes a rich report of the scenario and example execution as it happens</b> </p>","directories":{},"_nodeVersion":"22.19.0","dependencies":{"@cucumber/query":"^14.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^6.0.0","mocha":"^11.0.0","eslint":"9.35.0","globby":"^14.0.2","globals":"^16.3.0","ts-node":"^10.9.1","prettier":"3.6.2","@eslint/js":"^9.30.1","typescript":"5.9.2","@types/chai":"^5.0.0","@types/node":"22.18.1","@types/mocha":"^10.0.6","@eslint/compat":"^1.3.1","eslint-plugin-n":"17.21.3","@eslint/eslintrc":"^3.3.1","@cucumber/messages":"29.0.1","eslint-plugin-import":"2.32.0","@cucumber/message-streams":"^4.0.1","@typescript-eslint/parser":"8.43.0","@typescript-eslint/eslint-plugin":"8.43.0","eslint-plugin-simple-import-sort":"12.1.1"},"peerDependencies":{"@cucumber/messages":"*"},"_npmOperationalInternal":{"tmp":"tmp/pretty-formatter_2.2.0_1757605888389_0.04379875951997847","host":"s3://npm-registry-packages-npm-production"},"readme":"<h1 align=\"center\">\n  <img alt=\"\" width=\"75\" src=\"https://github.com/cucumber.png\"/>\n  <br>\n  pretty-formatter\n</h1>\n<p align=\"center\">\n  <b>Rich formatting of Cucumber progress and results for the terminal</b>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/@cucumber/pretty-formatter\" style=\"text-decoration: none\"><img src=\"https://img.shields.io/npm/v/@cucumber/pretty-formatter?style=flat&color=dark-green\" alt=\"Latest version on npm\"></a>\n  <a href=\"https://github.com/cucumber/pretty-formatter/actions\" style=\"text-decoration: none\"><img src=\"https://github.com/cucumber/pretty-formatter/actions/workflows/test-javascript.yaml/badge.svg\" alt=\"Build status\"></a>\n</p>\n\n![Example output of the pretty formatting, showing the different colors used](../screenshots/all-statuses.cucumber.pretty.png)\n\n## Usage\n\nThis package is used internally in `@cucumber/cucumber` to provide the `summary`, `progress` and `pretty` formatters; you don't need to install or manage it yourself.\nFor usage, see https://github.com/cucumber/cucumber-js/blob/main/docs/formatters.md.\n\nYou can use these low-level classes to provide formatting for a different implementation of Cucumber.\n\n### SummaryPrinter\n\nPrints a summary of test results including non-passing scenarios, statistics, and snippets.\n\n```typescript\nimport { SummaryPrinter } from '@cucumber/pretty-formatter'\n\nconst printer = new SummaryPrinter()\n\n// each time a message is emitted\nprinter.update(envelope)\n```\n\nCan also be used to summarise a test run that already happened, with a pre-populated `Query` object:\n\n```typescript\nimport { Query } from '@cucumber/query'\nimport { SummaryPrinter } from '@cucumber/pretty-formatter'\n\nconst query = new Query()\n\n// each time a message is emitted\nquery.update(envelope)\n\n// later\nSummaryPrinter.summarise(query)\n```\n\n### ProgressPrinter\n\nPrints test progress as single-character status indicators.\n\n```typescript\nimport { ProgressPrinter } from '@cucumber/pretty-formatter'\n\nconst printer = new ProgressPrinter()\n\n// each time a message is emitted\nprinter.update(envelope)\n```\n\n### PrettyPrinter\n\nPrints test progress in a prettified Gherkin-style format.\n\n```typescript\nimport { PrettyPrinter } from '@cucumber/pretty-formatter'\n\nconst printer = new PrettyPrinter()\n\n// each time a message is emitted\nprinter.update(envelope)\n```\n\n### Themes\n\nHere's the schema for a theme:\n\n```ts\ninterface Theme {\n    attachment?: Style\n    dataTable?: {\n        all?: Style\n        border?: Style\n        content?: Style\n    }\n    docString?: {\n        all?: Style\n        content?: Style\n        delimiter?: Style\n        mediaType?: Style\n    }\n    feature?: {\n        all?: Style\n        keyword?: Style\n        name?: Style\n    }\n    location?: Style\n    rule?: {\n        all?: Style\n        keyword?: Style\n        name?: Style\n    }\n    scenario?: {\n        all?: Style\n        keyword?: Style\n        name?: Style\n    }\n    status?: {\n        all?: Partial<Record<TestStepResultStatus, Style>>\n        icon?: Partial<Record<TestStepResultStatus, string>>\n        progress?: Partial<Record<TestStepResultStatus, string>>\n    }\n    step?: {\n        argument?: Style\n        keyword?: Style\n        text?: Style\n    }\n    tag?: Style\n    symbol?: {\n        bullet?: string\n    }\n}\n\nenum TestStepResultStatus {\n    UNKNOWN = \"UNKNOWN\",\n    PASSED = \"PASSED\",\n    SKIPPED = \"SKIPPED\",\n    PENDING = \"PENDING\",\n    UNDEFINED = \"UNDEFINED\",\n    AMBIGUOUS = \"AMBIGUOUS\",\n    FAILED = \"FAILED\"\n}\n```\n\n`Style` is any [Node.js supported modifier](https://nodejs.org/api/util.html#modifiers) or an array of them.\n\nSee the [default theme](./src/theme.ts) for a good example. It's exported as `CUCUMBER_THEME`, so you can clone and extend it if you'd like.","publish_time":1757605888593,"_cnpm_publish_time":1757605888593,"dist-tags":{"latest":"4.1.0"}}