{"name":"@cucumber/pretty-formatter","version":"1.0.1","license":"MIT","_id":"@cucumber/pretty-formatter@1.0.1","maintainers":[{"name":"aslakhellesoy","email":"aslak.hellesoy@gmail.com"},{"name":"cukebot","email":"cukebot@cucumber.io"}],"contributors":[{"name":"Ilya Kozhevnikov","email":"git@kozhevnikov.com"},{"name":"Julien Biezemans","email":"jb@jbpros.com"}],"homepage":"https://github.com/cucumber/cucumber-js-pretty-formatter#readme","bugs":{"url":"https://github.com/cucumber/cucumber-js-pretty-formatter/issues"},"dist":{"shasum":"65d6c1df436920036a7bd02d08cb44d20e7af0ab","tarball":"http://registry-npm.ywwl.com/@cucumber/pretty-formatter/download/@cucumber/pretty-formatter-1.0.1.tgz","fileCount":31,"integrity":"sha512-A1lU4VVP0aUWdOTmpdzvXOyEYuPtBDI0xYwYJnmoMDplzxMdhcHk86lyyvYDoMoPzzq6OkOE3isuosvUU4X7IQ==","signatures":[{"sig":"MEQCIGSjVRgUbQeSY5MhTnt4mGlCHUojsMBbCj7hIT0M2FlnAiAs/WK2fPIH7fpzxzdtxvgfXZi6nrJOac7hgZqGh0e34g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":63574,"size":14329,"noattachment":false,"key":"/@cucumber/pretty-formatter/-/@cucumber/pretty-formatter-1.0.1.tgz"},"main":"lib/src/index.js","types":"lib/src/index.d.ts","gitHead":"419db766d5287566de94b4eece984cf9266fe67f","scripts":{"lint":"eslint \"src/**/*.ts\" \"test/**/*.ts\"","test":"npm run build && npm run test:mocha","build":"tsc -p tsconfig.node.json","lint:fix":"eslint --fix \"src/**/*.ts\" \"test/**/*.ts\"","test:mocha":"mocha","build:clean":"rm -rf lib","build:watch":"tsc -p tsconfig.node.json --watch","test:nobuild":"npm run test:mocha","build:release":"npm run build && npm run test:nobuild && npm run build:clean:tests","test:mocha:wip":"mocha -g wip","build:clean:tests":"rm -rf lib/test","update-dependencies":"npx npm-check-updates --upgrade --dep prod,dev,optional,bundle","test:mocha:wip:watch":"mocha -w -g wip"},"_npmUser":{"name":"cukebot","email":"cukebot@cucumber.io"},"repository":{"url":"git+https://github.com/cucumber/cucumber-js-pretty-formatter.git","type":"git"},"_npmVersion":"8.19.4","description":"Official Cucumber.js Pretty Formatter","directories":{"lib":"lib"},"_nodeVersion":"16.20.2","dependencies":{"figures":"^3.2.0","ts-dedent":"^2.0.0","cli-table3":"^0.6.0","ansi-styles":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"glob":"^10.0.0","mocha":"^10.0.0","colors":"^1.4.0","eslint":"^8.0.0","should":"^13.2.3","prettier":"^3.0.0","typescript":"^4.1.3","@types/glob":"^8.0.0","@types/node":"^18.0.0","@types/mocha":"^10.0.0","stream-to-string":"^1.2.0","@cucumber/cucumber":"^8.3.1","@cucumber/messages":"^24.0.0","eslint-plugin-import":"^2.22.1","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"peerDependencies":{"@cucumber/cucumber":">=7.0.0","@cucumber/messages":"*"},"_npmOperationalInternal":{"tmp":"tmp/pretty-formatter_1.0.1_1711443242072_0.06650854985349142","host":"s3://npm-registry-packages"},"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":1711443242222,"_cnpm_publish_time":1711443242222,"dist-tags":{"latest":"4.1.0"}}