{"_id":"@carecarta/hpt-validator-cli","_rev":"8-ea6364483ca2c0953345ebf5882e3044","name":"@carecarta/hpt-validator-cli","dist-tags":{"latest":"1.7.4"},"versions":{"1.7.3":{"name":"@carecarta/hpt-validator-cli","version":"1.7.3","author":{"name":"CareCarta","email":"dev@carecarta.com"},"license":"CC0-1.0","_id":"@carecarta/hpt-validator-cli@1.7.3","maintainers":[{"name":"carecarta-npm","email":"npm@carecarta.com"}],"bin":{"carecarta-hpt-validator":"dist/index.js"},"dist":{"shasum":"6476ed5f92ac47357cc077c97e06fb3d2278bfb5","tarball":"https://registry.npmjs.org/@carecarta/hpt-validator-cli/-/hpt-validator-cli-1.7.3.tgz","fileCount":9,"integrity":"sha512-xo2CfpsoZh0JIC+sIekwrq8B8va8F5ZvAV95Kzbvq4+34XsklAy8vU3z2pCMq/6YIt7cS2hQDhoCHpk8JhOTjw==","signatures":[{"sig":"MEUCIHOVduGnoDXnEEzL06gDNJteIbxq000gnUyEB1MeAYHNAiEA5WfPNQ5D+/W9rEz25thQUYROGfAeLmvSJ1/8isokrUU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15431},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"d97e6e0884467ecf613aa807bf55a876502fb1eb","scripts":{"cli":"node ./dist/index.js","lint":"tsc && eslint \"**/*.{js,ts}\"","build":"npx tsc && chmod +x ./dist/index.js","lint:fix":"tsc --noEmit && eslint \"**/*.{js,ts}\" --quiet --fix","prettier":"prettier --check \"**/*.{js,ts}\"","prepublish":"npx tsc && chmod +x ./dist/index.js","prettier:fix":"prettier --write \"**/*.{js,ts}\""},"_npmUser":{"name":"carecarta-npm","email":"npm@carecarta.com"},"_npmVersion":"10.8.2","description":"CLI for validating CMS Hospital Price Transparency machine-readable files (CareCarta fork)","directories":{},"_nodeVersion":"18.20.7","dependencies":{"chalk":"^5.3.0","commander":"^12.1.0","hpt-validator":"^1.11.1"},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","eslint":"^9.12.0","ts-node":"^10.9.1","prettier":"^3.3.3","typescript":"^5.6.3","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.2.1","@typescript-eslint/parser":"^8.8.1","@stylistic/eslint-plugin-js":"^2.9.0","@typescript-eslint/eslint-plugin":"^8.8.1"},"_npmOperationalInternal":{"tmp":"tmp/hpt-validator-cli_1.7.3_1752254890772_0.39989702189191845","host":"s3://npm-registry-packages-npm-production"}},"1.7.4":{"name":"@carecarta/hpt-validator-cli","version":"1.7.4","author":{"name":"CareCarta","email":"dev@carecarta.com"},"license":"CC0-1.0","description":"CLI for validating CMS Hospital Price Transparency machine-readable files (CareCarta fork)","type":"module","main":"./dist/index.js","bin":{"carecarta-hpt-validator":"dist/index.js"},"scripts":{"build":"npx tsc && chmod +x ./dist/index.js","prepublish":"npx tsc && chmod +x ./dist/index.js","lint":"tsc && eslint \"**/*.{js,ts}\"","lint:fix":"tsc --noEmit && eslint \"**/*.{js,ts}\" --quiet --fix","prettier":"prettier --check \"**/*.{js,ts}\"","prettier:fix":"prettier --write \"**/*.{js,ts}\"","cli":"node ./dist/index.js"},"dependencies":{"chalk":"^5.3.0","commander":"^12.1.0","hpt-validator":"^1.11.1"},"devDependencies":{"@stylistic/eslint-plugin-js":"^2.9.0","@typescript-eslint/eslint-plugin":"^8.8.1","@typescript-eslint/parser":"^8.8.1","eslint":"^9.12.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.2.1","esm":"^3.2.25","prettier":"^3.3.3","ts-node":"^10.9.1","typescript":"^5.6.3"},"_id":"@carecarta/hpt-validator-cli@1.7.4","gitHead":"d97e6e0884467ecf613aa807bf55a876502fb1eb","types":"./dist/index.d.ts","_nodeVersion":"18.20.7","_npmVersion":"10.8.2","dist":{"integrity":"sha512-qCKwlXKjOSJNtxRcXXouW7el/2QzR28ti4cpSIZNV6LMiTTiXHvm4gXRZKi36tHtCfreYBK4zA1ugdWIdoM8Iw==","shasum":"f6bd6fbb8dc8f18ef644d4d1c5fc224335a99198","tarball":"https://registry.npmjs.org/@carecarta/hpt-validator-cli/-/hpt-validator-cli-1.7.4.tgz","fileCount":9,"unpackedSize":16654,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCrhBLY8KGEZ3qFY3raHkljnJXp7rdtCInkGzR+25uNYAIgaiQCc9stF5eOtTQVj6YuUMsgZCJLCRVuVje3EEc1eK0="}]},"_npmUser":{"name":"carecarta-npm","email":"npm@carecarta.com"},"directories":{},"maintainers":[{"name":"carecarta-npm","email":"npm@carecarta.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/hpt-validator-cli_1.7.4_1752255127690_0.34853539146135737"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-11T17:28:10.660Z","modified":"2025-07-11T17:32:08.063Z","1.7.1":"2025-07-11T17:18:49.159Z","1.7.2":"2025-07-11T17:20:55.169Z","1.7.3":"2025-07-11T17:28:10.945Z","1.7.4":"2025-07-11T17:32:07.881Z"},"author":{"name":"CareCarta","email":"dev@carecarta.com"},"license":"CC0-1.0","description":"CLI for validating CMS Hospital Price Transparency machine-readable files (CareCarta fork)","maintainers":[{"name":"carecarta-npm","email":"npm@carecarta.com"}],"readme":"# Hospital Price Transparency CLI Validator\n\nCLI for validating CMS Hospital Price Transparency machine-readable files (CareCarta fork)\n\n## Getting Started\n\n### Prerequisites\n\nThese were the minimum versions used to develop the CLI tool. It is recommended to keep both Node and NPM up-to-date with the latest releases.\n\n- Node (version 16.x)\n- NPM (version 8.5.x)\n\n### Installation\n\nInstall the CLI globally with\n\n```sh\nnpm install -g @carecarta/hpt-validator-cli\n```\n\n### Usage\n\n```sh\ncarecarta-hpt-validator --help\nUsage: carecarta-hpt-validator [options] <filepath> <version>\n\nArguments:\n  filepath                   filepath to validate\n  version                    (choices: \"v2.0\", \"v2.0.0\")\n\nOptions:\n  -f, --format <string>      file format of file (choices: \"csv\", \"json\")\n  -o, --output <string>      output format (choices: \"table\", \"json\", default: \"table\")\n  -e, --error-limit <value>  maximum number for errors (default: 1000)\n  -h, --help                 display help for command\n```\n\n### Examples\n\nBasic usage:\n\n```sh\ncarecarta-hpt-validator ./sample.csv v2.0.0\n```\n\nOverriding the default error limit to show 50 errors:\n\n```sh\ncarecarta-hpt-validator ./sample.csv v2.0.0 -e 50\n```\n\nOverriding the default error limit to show all errors:\n\n```sh\ncarecarta-hpt-validator ./sample.csv v2.0.0 -e 0\n```\n\nUsing JSON output format:\n\n```sh\ncarecarta-hpt-validator ./sample.csv v2.0.0 -o json\n```\n\nUsing JSON output format with limited errors:\n\n```sh\ncarecarta-hpt-validator ./sample.csv v2.0.0 -o json -e 10\n```\n\n### Output Formats\n\nThe CLI supports two output formats:\n\n#### Table Format (default)\n\nThe default table format provides a human-readable output with colored text, showing validation results in a structured table format.\n\n#### JSON Format\n\nThe JSON format provides machine-readable output that includes:\n\n- File information (path, validator version, timestamp)\n- Validation status (valid/invalid)\n- Error and alert counts\n- Detailed error and alert arrays\n\nExample JSON output:\n\n```json\n{\n  \"file\": \"/path/to/sample.csv\",\n  \"version\": \"1.10.0\",\n  \"timestamp\": \"2025-01-11T17:00:00.000Z\",\n  \"valid\": false,\n  \"errorCount\": 2,\n  \"alertCount\": 1,\n  \"errors\": [\n    {\n      \"path\": \"C4\",\n      \"field\": \"code | 1 | type\",\n      \"message\": \"Invalid code type\"\n    }\n  ],\n  \"alerts\": [\n    {\n      \"path\": \"D5\",\n      \"field\": \"estimated_amount\",\n      \"message\": \"Nine 9s used for estimated amount\"\n    }\n  ]\n}\n```\n\n### Machine-readable File Extensions\n\nThe two current allowable file formats for the HPT MRFs are CSV and JSON. The CLI will auto detect the file format passed into the tool for files that end with `.csv` or `.json` and will run the appropriate validator for that file. The CLI can also detect files compressed by gzip. Files ending with the `.gz` extension will be decompressed before validation. These file format detections can be combined, so files ending with `.csv.gz` or `.json.gz` will be decompressed and validated as CSV or JSON, respectively. For other files ending with `.gz`, use the `-f` option described above.\n\n## Limitations\n\nThere may be a situation in which the CLI tool will run out of memory due to the amount of errors that are found in the file being validated. If you run into this NODE error, update the amount of errors to a smaller value that will be allowed to be collected with the `-e, --error-limit` flag.\n\n## Contributing\n\nThank you for considering contributing to an Open Source project of the US\nGovernment! For more information about our contribution guidelines, see\n[CONTRIBUTING.md](CONTRIBUTING.md)\n\n## Security\n\nFor more information about our Security, Vulnerability, and Responsible\nDisclosure Policies, see [SECURITY.md](SECURITY.md).\n\n## Authors and Maintainers\n\nThis is a fork of the original CMS HPT Validator CLI. A full list of contributors to the original project can be found on [https://github.cms.gov/CMSGov/hpt-validator-cli/graphs/contributors](https://github.cms.gov/CMSGov/hpt-validator-cli/graphs/contributors).\n\n## Public domain\n\nThis project is licensed within in the public domain within the United States,\nand copyright and related rights in the work worldwide are waived through the\n[CC0 1.0 Universal public domain\ndedication](https://creativecommons.org/publicdomain/zero/1.0/).\n\nAll contributions to this project will be released under the CC0 dedication. By\nsubmitting a pull request or issue, you are agreeing to comply with this waiver\nof copyright interest.\n","readmeFilename":"README.md"}