Skip to content

Allow configuring trusted domains at run-time #7339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 6, 2025
Merged

Conversation

code-asher
Copy link
Member

Also fixed a long-standing issue with repeatable flags in the config.

code-asher added 2 commits May 5, 2025 13:16
It can be set either:

1. In the product.json (normally the product.json is embedded during the
   build and not read at run-time).
2. With the --link-protection-trusted-domains flag.
@code-asher code-asher requested a review from a team as a code owner May 5, 2025 21:29
Copy link

codecov bot commented May 5, 2025

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 73.44%. Comparing base (47d6d3a) to head (d754e0f).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/node/cli.ts 71.42% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7339      +/-   ##
==========================================
+ Coverage   73.00%   73.44%   +0.43%     
==========================================
  Files          29       29              
  Lines        1793     1796       +3     
  Branches      383      384       +1     
==========================================
+ Hits         1309     1319      +10     
+ Misses        409      404       -5     
+ Partials       75       73       -2     
Files with missing lines Coverage Δ
src/node/cli.ts 93.52% <71.42%> (+2.61%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f2e334...d754e0f. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@code-asher code-asher force-pushed the asher/trusted-domains branch from a9c8392 to d754e0f Compare May 5, 2025 21:32
Comment on lines +718 to +723
if (opt === true) {
return `--${optName}`
} else if (Array.isArray(opt)) {
return opt.map((o) => `--${optName}=${o}`)
}
return `--${optName}=${opt}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (opt === true) {
return `--${optName}`
} else if (Array.isArray(opt)) {
return opt.map((o) => `--${optName}=${o}`)
}
return `--${optName}=${opt}`
if (opt === true) {
return `--${optName}`
}
if (Array.isArray(opt)) {
return opt.map((o) => `--${optName}=${o}`)
}
return `--${optName}=${opt}`
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically equivalent, true, but stylistically I like having one less line 😛

@code-asher code-asher merged commit c8257a3 into main May 6, 2025
11 checks passed
@code-asher code-asher deleted the asher/trusted-domains branch May 6, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants