{"_id":"@cucumber/pretty-formatter@4.1.0","bugs":{"url":"https://github.com/cucumber/pretty-formatter/issues"},"dist":{"shasum":"6d236726a9c96dce21074b425db7673d55292477","tarball":"http://registry-npm.ywwl.com/@cucumber/pretty-formatter/download/@cucumber/pretty-formatter-4.1.0.tgz","fileCount":81,"integrity":"sha512-cbdb494+X3nHxvP34sbyia7CeVIkqs0K3+LWpsF8szCSUVYOxhmbP66H/Yd7f6yr2BhKLmkDokyEX24VAyOstA==","signatures":[{"sig":"MEUCIQDuWG5occgFrjiwuN3Wtya1378ksCMau/CBuXvzO3PkPgIgc+AFptrTsDCHnITvaKzxH4TxWQbIkN5f0BFuCY1pA48=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCAPFc7wjOxbs2EQx+UglFmebbnjvkKxIwRka8nBRThRgIgH4d+j4ADnTy3g6NXLMPFcSLp94RjF74CRUJaIygNPZU="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cucumber%2fpretty-formatter@4.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":261447,"size":65133,"noattachment":false,"key":"/@cucumber/pretty-formatter/-/@cucumber/pretty-formatter-4.1.0.tgz"},"main":"dist/index.js","name":"@cucumber/pretty-formatter","type":"module","types":"dist/index.d.ts","author":{"name":"David Goss"},"gitHead":"f2a11eec68334be9456049908dac8d9a1757d638","license":"MIT","scripts":{"fix":"biome check --fix --error-on-warnings","lint":"biome check --error-on-warnings","test":"mocha \"src/**/*.spec.ts\"","build":"tsc --build tsconfig.build.json","clean":"rm -rf dist","postbuild":"node -e \"require('.')\"","prepublishOnly":"tsc --build tsconfig.build.json","update-expected-files":"UPDATE_EXPECTED_FILES=true npm test"},"version":"4.1.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1cc1647e-d61f-4d99-a8b8-2ecc42b590e0"}},"homepage":"https://github.com/cucumber/pretty-formatter#readme","repository":{"url":"git+https://github.com/cucumber/pretty-formatter.git","type":"git","directory":"javascript"},"_npmVersion":"11.19.0","description":"<h1 align=\"center\">   <img alt=\"\" width=\"75\" src=\"https://github.com/cucumber.png\"/>   <br>   pretty-formatter </h1> <p align=\"center\">   <b>Rich formatting of Cucumber progress and results for the terminal</b> </p>","directories":{},"maintainers":[{"name":"cukebot","email":"cukebot@cucumber.io"}],"_nodeVersion":"24.21.0","dependencies":{"luxon":"^3.7.2","@cucumber/query":"16.1.1"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.5","chai":"^6.0.0","mocha":"^12.0.0","globby":"^16.0.0","typescript":"7.0.2","@types/chai":"^5.0.0","@types/node":"22.20.4","@types/luxon":"^3.7.1","@types/mocha":"^10.0.6","@biomejs/biome":"^2.4.13","@cucumber/messages":"34.2.1","@tsconfig/recommended":"^1.0.13","@cucumber/biome-config":"github:cucumber/biome-config#v0.6.0","@cucumber/message-streams":"^5.0.0"},"peerDependencies":{"@cucumber/messages":"*"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pretty-formatter_4.1.0_1790517231856_0.012460536010586498"},"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":1790517231931,"_cnpm_publish_time":1790517231931,"dist-tags":{"latest":"4.1.0"}}