{"name":"@cucumber/pretty-formatter","version":"2.0.0","author":{"name":"David Goss"},"license":"MIT","_id":"@cucumber/pretty-formatter@2.0.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":"983f1cce39b2911a93360294fcdc3702667f6f36","tarball":"http://registry-npm.ywwl.com/@cucumber/pretty-formatter/download/@cucumber/pretty-formatter-2.0.0.tgz","fileCount":27,"integrity":"sha512-RFi9sT8Ph9sv0FG3wCHOI3P+jK/dszKXj+0OjA2nTxwmfOVLpjksFwspt4/ytriWflG9CvF2anQnNKCeABac3g==","signatures":[{"sig":"MEQCIHQc1sTz8a8ueDgk7jj0Fzt6gJfMGuFl2Yc0VrbSWwT2AiBCYp/0stxyf4XAsjHpok1XNI01lWIFRHa90O0aSm8hOg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":88675,"size":23420,"noattachment":false,"key":"/@cucumber/pretty-formatter/-/@cucumber/pretty-formatter-2.0.0.tgz"},"main":"dist/src/index.js","type":"module","types":"dist/src/index.d.ts","gitHead":"ab8694ea5950f91d5e908913f4971881e464d2f5","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.2","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.17.0","dependencies":{"@cucumber/query":"^13.5.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^5.0.0","mocha":"^11.0.0","eslint":"9.30.1","globby":"^14.0.2","globals":"^16.3.0","ts-node":"^10.9.1","prettier":"3.6.2","@eslint/js":"^9.30.1","typescript":"5.8.3","@types/chai":"^5.0.0","@types/node":"22.16.0","@types/mocha":"^10.0.6","@eslint/compat":"^1.3.1","eslint-plugin-n":"17.21.0","@eslint/eslintrc":"^3.3.1","@cucumber/messages":"28.0.0","eslint-plugin-import":"2.32.0","@cucumber/message-streams":"^4.0.1","@typescript-eslint/parser":"8.35.1","@typescript-eslint/eslint-plugin":"8.35.1","eslint-plugin-simple-import-sort":"12.1.1"},"peerDependencies":{"@cucumber/messages":"*"},"_npmOperationalInternal":{"tmp":"tmp/pretty-formatter_2.0.0_1752838745157_0.31407800346110193","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":1752838745378,"_cnpm_publish_time":1752838745378,"dist-tags":{"latest":"4.1.0"}}