Skip to content

feat: Add snaps-sandbox package and integrate into CLI #3306

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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Apr 5, 2025

This adds a new package, @metamask/snaps-sandbox, which is a tool to interact with Snaps through a web app. It's a replacement for the Snaps Simulator, but doesn't simulate any functionality. Instead, it calls MetaMask through the usual JSON-RPC methods.

The sandbox can be used from the Snaps CLI by running mm-snap sandbox.

export var walkTokens = (__marked_exports.walkTokens || exports.walkTokens);
// ESM-uncomment-end
-
-//# sourceMappingURL=marked.umd.js.map
Copy link
Member Author

Choose a reason for hiding this comment

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

This source map doesn't exist, and Vite was complaining about it.

Copy link

socket-security bot commented Apr 5, 2025

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring alerts on:

  • negotiator@1.0.0
  • accepts@2.0.0
  • content-disposition@1.0.0
  • monaco-editor@0.52.2
  • happy-dom@17.4.4
  • mime-types@3.0.1
  • type-is@2.0.1

View full report

@Mrtenz
Copy link
Member Author

Mrtenz commented Apr 9, 2025

@SocketSecurity ignore npm/package-manager-detector@0.1.2

False positive.

@SocketSecurity ignore npm/mz@2.7.0
@SocketSecurity ignore npm/node-eval@2.0.0
@SocketSecurity ignore npm/negotiator@1.0.0
@SocketSecurity ignore npm/accepts@2.0.0
@SocketSecurity ignore npm/content-disposition@1.0.0
@SocketSecurity ignore npm/happy-dom@17.4.4
@SocketSecurity ignore npm/type-is@2.0.1
@SocketSecurity ignore npm/@chakra-ui/cli@3.15.1
@SocketSecurity ignore npm/monaco-editor@0.52.2

These seem fine.

Copy link

codecov bot commented Apr 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.03%. Comparing base (8589b4e) to head (f3b2a66).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3306      +/-   ##
==========================================
+ Coverage   97.80%   98.03%   +0.23%     
==========================================
  Files         364      402      +38     
  Lines        9911    11111    +1200     
  Branches     1616     1754     +138     
==========================================
+ Hits         9693    10893    +1200     
  Misses        218      218              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

github-merge-queue bot pushed a commit that referenced this pull request Apr 11, 2025
This will be replaced with `@metamask/snaps-sandbox` in #3306.
@Mrtenz Mrtenz force-pushed the mrtenz/sandbox branch 2 times, most recently from 7e34f3b to 8fcb57c Compare April 11, 2025 10:38
@Mrtenz Mrtenz changed the title Add snaps-sandbox package and integrate into CLI feat: Add snaps-sandbox package and integrate into CLI Apr 15, 2025
@Mrtenz Mrtenz marked this pull request as ready for review April 16, 2025 08:30
@Mrtenz Mrtenz requested a review from a team as a code owner April 16, 2025 08:30
@Mrtenz
Copy link
Member Author

Mrtenz commented Apr 16, 2025

@SocketSecurity ignore mime-types@3.0.1

New author is ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant