{"name":"@percy/config","version":"1.21.0","license":"MIT","_id":"@percy/config@1.21.0","homepage":"https://github.com/percy/cli#readme","bugs":{"url":"https://github.com/percy/cli/issues"},"dist":{"shasum":"651f6a78c92a26da2f0b7d6ce24b91541cb343ee","tarball":"http://registry-npm.ywwl.com/@percy/config/download/@percy/config-1.21.0.tgz","fileCount":14,"integrity":"sha512-s6XFBhjP0fGVg8onapDwebGNIdwMgdidZW5q0HziBiQVqfwh/83NkDlCq+c6/JU5P0Y5DArxCIFDVUfiLkcs4A==","signatures":[{"sig":"MEYCIQDJj/82nK1Xkqmvs1u0qN8MNZCnbJZ3dDb+se7ZCIr7GwIhAIh/ifA2JoklDuEYohJC7DIQpxXb6lGkIdthdAUj+245","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkEaHzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqCWA//d3IlRtd8iBQAnZ7grZdV0MfXdwSWW+Rc2dcrPcf1CY5FMdan\r\nflZpRKJtUCJ8xqITc6nAdH+XdKArHkP5fJgwOqsM4wvtVrzK9jfFrU4/5EfZ\r\nzKHciI2XcL6bv8Eoi5DWZpc3sUx1E3XALdWt625pz7uUHf5eEw4NHhPN9Wc0\r\ntUIErj6iTc96sKiB4ITwoqxEZ1STv6j7cR+xOEhWt1l/d4AWBmUHplVG9g8f\r\nhAN94mlXntBlpOxsA9gmDBnp/e9OZukWDprzCBfg8uNtyJrUKHyrsskvDXlQ\r\nl/IA90SmTuG4E89FjVW1FTGlIqf7Haef1dZSRwOfRw+F+vVY7mDdv1J37rWO\r\nzTNDLz2paL5eXlJFUc1KLmNoCXIBHrzEwgLE0bleyoFFtfQq6b/4qC/DF1Lg\r\nl8QhpPCvwZk5JkSEgO07Gle+kV+bWMc/dAsC4BIxzHNDzslbMsMeFcPRaW5K\r\ne3qnM60PiAACsbEYhts5cEHecRaC5MigJfniBd91/4l044aHP6LpRdRgj3CV\r\n0dxJfD/AvgokHEYE7YcMd4Zz0yUSdvl+RgT1oMw8IVVVLIamMMvhnOJhhDtY\r\nAM9OknM7ilHlM4NhnXIUJZ+1lR+8viB00e/Zt3oToD4SLws8pz9RX04lqekD\r\nprCLw1Oym7AAeNXwI0kJJoSEKNcJVtADaGE=\r\n=bqbB\r\n-----END PGP SIGNATURE-----\r\n","size":11786,"noattachment":false,"key":"/@percy/config/-/@percy/config-1.21.0.tgz"},"main":"./dist/index.js","type":"module","types":"./types/index.d.ts","engines":{"node":">=14"},"exports":{".":"./dist/index.js","./utils":"./dist/utils/index.js","./test/helpers":"./test/helpers.js"},"gitHead":"44c63a3214f1fbfb0b1adcb6fcfe284a9f54d0cb","scripts":{"lint":"eslint --ignore-path ../../.gitignore .","test":"node ../../scripts/test","build":"node ../../scripts/build","test:types":"tsd","test:coverage":"yarn test --coverage"},"_npmUser":{"name":"percy-admin","email":"apps+npm@percy.io"},"repository":{"url":"git+https://github.com/percy/cli.git","type":"git","directory":"packages/config"},"_npmVersion":"lerna/6.0.1/node@v14.21.3+x64 (linux)","description":"Handles loading and adding options to Percy configuration files. Uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) to load configuration files and [JSON schema](https://json-schema.org/) with [AJV](https://github.com/epoberezkin/ajv) to val","directories":{},"_nodeVersion":"14.21.3","dependencies":{"ajv":"^8.6.2","yaml":"^2.0.0","cosmiconfig":"^7.0.0","@percy/logger":"1.21.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"json-schema-typed":"^7.0.3"},"_npmOperationalInternal":{"tmp":"tmp/config_1.21.0_1678877171154_0.8119674053749872","host":"s3://npm-registry-packages"},"readme":"# @percy/config\n\nHandles loading and adding options to Percy configuration files. Uses\n[cosmiconfig](https://github.com/davidtheclark/cosmiconfig) to load configuration files and [JSON\nschema](https://json-schema.org/) with [AJV](https://github.com/epoberezkin/ajv) to validate those\nconfiguration files.\n\n- [Loading config files](#loading-config-files)\n- [Extending config options](#extending-config-options)\n\n## Loading config files\n\nThe `.load()` method will load and validate a configuration file, optionally merging it with any\nprovided `overrides`. If no `path` is provided, will search for the first supported config found\nfrom the current directory up to the home directory. Configuration files are cached and reused unless\n`reload` is `true`.\n\n```js\nimport PercyConfig from '@percy/config'\n\n// loading is done synchronously\nconst config = PercyConfig.load(options)\n```\n\n#### Options\n\n- `path` — Config file path or directory containing a config file\n- `overrides` — Config option overrides\n- `reload` — Do not use cached config (**default** `false`)\n- `bail` — Return undefined when failing validation (**default** `false`)\n- `print` — Print info and error logs (**default** `false`)\n\n#### Supported files\n\n- `\"percy\"` entry in `package.json`\n- `.percyrc` YAML or JSON file\n- `.percy.json` JSON file\n- `.percy.yaml` or `.percy.yml` YAML file\n- `.percy.js` or `percy.config.js` file that exports an object\n\n## Extending config options\n\nThe `.addSchema()` function will add a sub-schema to the Percy configuration file which will be\nparsed and validated when `PercyConfig.load()` is called. See [JSON\nschema](https://json-schema.org/) for possible schema options.\n\n```js\nimport PercyConfig from '@percy/config'\n\nPercyConfig.addSchema({\n  propertyName: JSONSchema\n})\n```\n","publish_time":1678877171384,"maintainers":[{"name":"percy-admin","email":"apps+npm@percy.io"}],"_cnpm_publish_time":1678877171384,"dist-tags":{"alpha":"1.31.15-alpha.0","beta":"1.33.2-beta.0","latest":"1.33.1"}}