{"name":"@percy/env","version":"1.31.13","license":"MIT","_id":"@percy/env@1.31.13","maintainers":[{"name":"percy-admin","email":"apps+npm@percy.io"}],"homepage":"https://github.com/percy/cli#readme","bugs":{"url":"https://github.com/percy/cli/issues"},"dist":{"shasum":"1b9054fa462f36d8f93c14af55e3cb0bc164320b","tarball":"http://registry-npm.ywwl.com/@percy/env/download/@percy/env-1.31.13.tgz","fileCount":8,"integrity":"sha512-oYEPbZwEtRFfuso+V1lnAZkZZC1gSk+H+//AdLU5De1+h2jxYW14qc1bpW707ZSina5DY5C2tcbsHNV4lcYI/A==","signatures":[{"sig":"MEUCIQCdlfrgwDeDnd+cU9rnewF/mXpa2u2PqWBxRKVY9EYrGQIgYx97/hCUMtFF90gQHdLfApBBpSmz5J/e1fOwRG2sLKU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28114,"size":8179,"noattachment":false,"key":"/@percy/env/-/@percy/env-1.31.13.tgz"},"main":"./dist/index.js","type":"module","engines":{"node":">=14"},"exports":{".":"./dist/index.js","./utils":"./dist/utils.js","./test/helpers":"./test/helpers.js"},"gitHead":"7d28705b323836680b22f96e961ed5f39f09a56b","scripts":{"lint":"eslint --ignore-path ../../.gitignore .","test":"node ../../scripts/test","build":"node ../../scripts/build","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/env"},"_npmVersion":"lerna/6.0.1/node@v24.14.1+x64 (linux)","description":"This package provides various CI/CD support for Percy by coalescing different environment variables into a common interface for consumption by `@percy/client`.","directories":{},"_nodeVersion":"24.14.1","dependencies":{"@percy/logger":"1.31.13"},"publishConfig":{"tag":"latest","access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/env_1.31.13_1777549108204_0.7424230302576889","host":"s3://npm-registry-packages-npm-production"},"readme":"# @percy/env\n\nThis package provides various CI/CD support for Percy by coalescing different environment variables\ninto a common interface for consumption by `@percy/client`.\n\n## Supported Environments\n\nAuto-detected based on environment variables that the CI provider sets during a build.\n\n- [AppVeyor](https://www.browserstack.com/docs/percy/ci-cd/appveyor)\n- [Atlassian Bamboo](#supported-environments) (needs doc)\n- [AWS CodeBuild](#supported-environments) (needs doc)\n- [Azure Pipelines](https://www.browserstack.com/docs/percy/ci-cd/azure-pipelines)\n- [Bitbucket Pipelines](https://www.browserstack.com/docs/percy/ci-cd/bitbucket-pipeline)\n- [Bitrise](#supported-environments) (needs doc)\n- [Buildkite](https://www.browserstack.com/docs/percy/ci-cd/buildkite)\n- [CircleCI](https://www.browserstack.com/docs/percy/ci-cd/circleci)\n- [Cloudflare Pages](#supported-environments) (needs doc)\n- [Codemagic](#supported-environments) (needs doc)\n- [Codeship](https://www.browserstack.com/docs/percy/ci-cd/codeship)\n- [Drone CI](https://docs.percy.io/docs/drone)\n- [GitHub Actions](https://www.browserstack.com/docs/percy/ci-cd/github-actions)\n- [GitLab CI](https://www.browserstack.com/docs/percy/ci-cd/gitlab)\n- [GoCD](#supported-environments) (needs doc)\n- [Google Cloud Build](#supported-environments) (needs doc)\n- [Harness CI](#supported-environments) (needs doc)\n- [Heroku CI](#supported-environments) (needs doc)\n- [Jenkins](https://www.browserstack.com/docs/percy/ci-cd/jenkins)\n- [Jenkins PRB](https://www.browserstack.com/docs/percy/ci-cd/jenkins)\n- [Netlify](https://www.browserstack.com/docs/percy/ci-cd/netlify)\n- [Probo.CI](#supported-environments) (needs doc)\n- [Semaphore](https://www.browserstack.com/docs/percy/ci-cd/semaphore)\n- [TeamCity](#supported-environments) (needs doc)\n- [Travis CI](https://www.browserstack.com/docs/percy/ci-cd/travis-ci)\n- [Vercel](#vercel) — see note below\n- [Woodpecker CI](#supported-environments) (needs doc)\n\n## Opt-in Environments\n\nKubernetes-native pipelines do not inject provider-identifying environment variables\ninto step containers by default. To enable Percy detection on these systems, expose\nthe following variables via template substitution in your pipeline definition.\n\n### Tekton Pipelines\n\n```yaml\nsteps:\n  - name: percy\n    image: node:20\n    env:\n      - name: TEKTON_PIPELINE_RUN          # required — triggers detection\n        value: \"$(context.pipelineRun.name)\"\n      - name: TEKTON_COMMIT_SHA\n        value: \"$(params.commit-sha)\"\n      - name: TEKTON_BRANCH\n        value: \"$(params.branch)\"\n      - name: TEKTON_PULL_REQUEST          # optional\n        value: \"$(params.pr-number)\"\n```\n\n### Argo Workflows\n\n```yaml\n- name: percy\n  container:\n    image: node:20\n    env:\n      - name: ARGO_WORKFLOW_NAME           # required — triggers detection\n        value: \"{{workflow.name}}\"\n      - name: ARGO_WORKFLOW_UID            # recommended — used as parallel nonce\n        value: \"{{workflow.uid}}\"\n      - name: ARGO_COMMIT_SHA\n        value: \"{{workflow.parameters.commit-sha}}\"\n      - name: ARGO_BRANCH\n        value: \"{{workflow.parameters.branch}}\"\n      - name: ARGO_PULL_REQUEST            # optional\n        value: \"{{workflow.parameters.pr-number}}\"\n```\n\n### Vercel\n\nVercel exposes its `VERCEL_*` system environment variables to the build step only\nwhen **Automatically expose System Environment Variables** is enabled on the project\n(Settings → Environment Variables). Percy also needs `PERCY_PARALLEL_TOTAL=-1`\nset in the project environment for the parallel nonce to populate from\n`VERCEL_DEPLOYMENT_ID` — otherwise reruns of the same deploy will create separate\nPercy builds instead of deduping.\n\n## Percy Environment Variables\n\nThe following variables may be defined to override the respective derived CI environment variables.\n\n```bash\nPERCY_COMMIT          # build commit sha\nPERCY_BRANCH          # build branch name\nPERCY_PULL_REQUEST    # associated PR number\nPERCY_PARALLEL_NONCE  # parallel nonce unique for this CI workflow\nPERCY_PARALLEL_TOTAL  # total number of parallel shards\n```\n\nAdditional Percy specific environment variable may be set to control aspects of your Percy build.\n\n```bash\nPERCY_TARGET_COMMIT   # percy target commit sha\nPERCY_TARGET_BRANCH   # percy target branch name\nPERCY_PARTIAL_BUILD   # if this build was marked as partial\n```\n\n## Adding Environment Support\n\n1. Add CI detection to [`environment.js`](./src/environment.js)\n2. Add respective environment variables\n3. Add a dedicated CI test suite\n4. Open a Pull Request!\n","publish_time":1777549108350,"_cnpm_publish_time":1777549108350,"dist-tags":{"alpha":"1.31.15-alpha.0","beta":"1.33.0-beta.0","latest":"1.33.1"}}