Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make feature flags available to
@netlify/config
(#6691)
* refactor: construct API client earlier * refactor: move siteID up * fix: fetch featureflags in CLI * chore: add tests for feeding feature flags to config * chore: fix lint errors * chore: fix tests * chore: fix order * chore: logging * chore: conditionally get site info for config * chore: fix get site params * chore: analyse all flags before getting site * chore: only call getSite once * chore: add flags to site obj * chore: only set flags if site there * chore: fix undefined issue * chore: fix link test * chore: remove logs * chore: remove only * Revert changes to Link test * fix: only request API if there's a token * fix: fetch fresh siteData only in build and dev * chore: remove unneeded arg * fix: only fetch featureflags for build/deploy/dev * refactor: extract into variable * chore: rework test * fix: don't fetch when offline * fix: only make request if token exists * fix: prettier * fix: remove unneeded argument * fix: share featureflags across invocations by making it an instance variable * Revert changes to site-by-name fetching * refactor: remove siteId parameter * fix: wrap featureflag finding in try/catch * chore: add readme for help on PR and serve tests * fix: get site info from name or id, and do it just once * Revert "chore: add readme for help on PR and serve tests" This reverts commit 7c25a9f. * Revert "fix: get site info from name or id, and do it just once" This reverts commit fbb18b6. * fix: pass feature flag arg --------- Co-authored-by: Simon Knott <[email protected]> Co-authored-by: Lewis Thorley <[email protected]> Co-authored-by: Netlify Bot <[email protected]> Co-authored-by: Karin Hendrikse <[email protected]>
- Loading branch information
1706c8c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📊 Benchmark results
1706c8c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📊 Benchmark results
1706c8c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📊 Benchmark results