-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ENG-9212: integration socket.dev in OSS integration tests #6280
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
+118
−9
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
accd5e1
ENG-9212: integration socket.dev in OSS integration tests
masenf 7340af6
don't pass git+https dependencies through sfw
masenf 3853e0a
greptile feedback
masenf 88d0a0e
handle git+https wheels earlier in the process
masenf 7b6cc4c
simplify git+https install
masenf f47f39a
Revert pyi_hashes.json change
masenf 4951874
Make the bun/npm sfw shim more focused
masenf 9cf3995
Add local `sfw-shims` for adding sfw-enabled bun/npm to PATH
masenf aeb7fbf
Merge remote-tracking branch 'origin/main' into masenf/socket-dev-scan
masenf 81e0a77
consolidate sfw wrapper logic
masenf 6450dd3
reference upstream issue
masenf 89c412c
setup bun for integration_tests
masenf 027b7e9
install bun before setting up shims
masenf fc78cb5
exclude reflex-dev/reflex repo
masenf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #!/usr/bin/env bash | ||
| # Source this file to route npm/bun through Socket.dev Firewall (sfw). | ||
| # Usage: source scripts/sfw-shims/activate.sh | ||
| SHIM_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")" && pwd)" | ||
| export PATH="$SHIM_DIR:$PATH" | ||
| export REFLEX_USE_SYSTEM_BUN=1 | ||
| echo "sfw shims activated (npm=$(which npm), bun=$(which bun))" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| #!/usr/bin/env bash | ||
| # Remove this shim's directory from PATH so we find the real bun | ||
| SHIM_DIR="$(cd "$(dirname "$0")" && pwd)" | ||
| export PATH="${PATH//$SHIM_DIR:/}" | ||
| export PATH="${PATH//:$SHIM_DIR/}" | ||
|
|
||
| # Use sfw directly if available, otherwise fall back to npx sfw | ||
| if command -v sfw >/dev/null 2>&1; then | ||
| SFW=sfw | ||
| else | ||
| SFW="npx sfw" | ||
| fi | ||
|
|
||
| # Only route registry-touching commands through sfw | ||
| case "${1-}" in | ||
| install|add|update|pm) | ||
| exec $SFW bun "$@" ;; | ||
| *) | ||
| exec bun "$@" ;; | ||
| esac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| #!/usr/bin/env bash | ||
| # Remove this shim's directory from PATH so we find the real npm | ||
| SHIM_DIR="$(cd "$(dirname "$0")" && pwd)" | ||
| export PATH="${PATH//$SHIM_DIR:/}" | ||
| export PATH="${PATH//:$SHIM_DIR/}" | ||
|
|
||
| # Use sfw directly if available, otherwise fall back to npx sfw | ||
| if command -v sfw >/dev/null 2>&1; then | ||
| SFW=sfw | ||
| else | ||
| SFW="npx sfw" | ||
| fi | ||
|
|
||
| # Only route registry-touching commands through sfw | ||
| case "${1-}" in | ||
| install|ci|update|audit|pack|publish|fund|outdated) | ||
| exec $SFW npm "$@" ;; | ||
| *) | ||
| exec npm "$@" ;; | ||
| esac |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.