Skip to content
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

Add Storybook plugin #2531

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ jobs:
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

publish-storybook-pr:
name: Publish Storybook to `pr/${{ github.event.number }}` folder
# needs: lint-build-test
if: ${{ github.event_name == 'pull_request' }}
permissions:
contents: write
uses: ./.github/workflows/publish-github-pages.yml
with:
build_script: yarn workspace @metamask/snaps-sdk build && yarn workspace @metamask/snaps-storybook build && yarn workspace @metamask/snaps-sdk build:storybook
publish_dir: ./packages/snaps-sdk/storybook-static
destination_dir: storybook/pr/${{ github.event.number }}
secrets:
PUBLISH_PAGES_TOKEN: ${{ secrets.PUBLISH_PAGES_TOKEN }}

publish-staging-simulator:
name: Publish Snaps Simulator to `staging` folder
needs: lint-build-test
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,6 @@ packages/examples/examples/webpack/index.html

# Ubuntu package files
.deb

# Storybook
storybook-static
2 changes: 1 addition & 1 deletion packages/examples/packages/bip32/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "cG78m4B2d8yHgKq1rKrZsbGZApWbJyd3MNoBPGcjKUQ=",
"shasum": "NomZRuPMP0ibDai9Trz+ShTP52To2ogo+2In7fVh+J0=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/bip44/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "YvyYRUgAVoeYPTzZRjxKRYNAjJe5usTDyqQkKbGTFTo=",
"shasum": "EH5AWIvAGQuFsCEZCLgskmdExwwr8spTTvvEHZ4RiQA=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "FQwKp8UTAOjE30njzUvGS2OElCud9Hyj2+xkfRGeqIk=",
"shasum": "AK0uWGbXpxl+kTJd1u9ZC7yf92dM3sTH75YPJNWyveE=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/browserify/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "VglMoBJGhWpq4P+2P0DXMHVL3oF5+W2D4tlJtH8kdvw=",
"shasum": "ktCtBx1p0e3agXkJG2iBqZeynvnPKInXNTUVJpKs8M8=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "FHyz1K8TqeKyGniGR77kZFwRcm7IkjBuQ1zBifDPHvo=",
"shasum": "ROES6RVy9ejIET+XIfSp/yinhE4VUDZaoKQgdHKev6Y=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/cronjobs/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "9bT28snShrLQ7/OHDWJT6qDXdlc/asYH7x8o6zqfuUo=",
"shasum": "/YIFmpd6e+pYp6Aa/c9Iv8gBSRGtLeOMcJzjh+/6GUw=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/dialogs/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "bozHl8e7Md1GuWvLOXtPbKGejiE2gBOGV0cIg6M7zFc=",
"shasum": "j8iFb7SisanOBPMem7ZVCFv6Lf/2r6x3HKLxh7uDWNo=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "AKvlBnNv0PrE8VfPCdxMmbTMq451QKo9ggsERIMPEZc=",
"shasum": "owUFr66MLBemx+4zCreyyR3I2UHdFXkMLTQBjwFC2B0=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/ethers-js/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "60LZXNvbDxyYnWy5qP43Tj8UZTfnmUsjItCOpnLTju0=",
"shasum": "R6lbz4kTEsEac5uHl7VhS8sFmxLRCWQ18XxFxb35w8o=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "E6A+dO1EcNp9XYm9M0yEUafFXRM0W72ylmOhbA9FFio=",
"shasum": "EVttNDW8DakMBmMZG24BQLLkkVJzRva+WsbvxkUzbB0=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "GFAjUWW8q9iX+2J/wKFlVRjq1oJ377NW5qSVTbkYtIQ=",
"shasum": "Z913E2CFpHKz56E9QxjXUgNvTAJqi6kV+JMzibTVV20=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/get-file/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "37wMtBqKrmWF3CUdyQHZ3Ey86NpGnffqIq6GnqTf+Ro=",
"shasum": "cbQ++/UaPBWLbJ0P7OR/CMPPBVXbppHZ6G9LpjvGre4=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/home-page/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "9eJQJL4e2McSiHzayvby/1zLdHvf7Uc9ppUUw7v+rHQ=",
"shasum": "icw5/1FfzcEwDwo5ckH9j2RZrwqsikbfHfZFoeOtl9U=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/images/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "oyaKZ7cbZisTYS6p9+ol9+tbjfq2Yly3G5UDvIwDLOQ=",
"shasum": "9T6WRWeazyc1/0yEVyRnM5jNnOmQJ+ghGlPpJG34ns8=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "LfydCMo1VRRXKdciizK7HPLso/tVufqM0JGpWSts/os=",
"shasum": "OsXMcZoDQl7iI5MsPjP3BNja8bwmqx0KWeerhgu9uv4=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "8MoLqit0ldP9dXby0k6nOsNPcfTVhHFwD+NDkGTLWpE=",
"shasum": "6i0cbxc4InNv5sqlovvEGqWS/LEOxOo1tltnxXwSmAA=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "dd2RRHpmyhOtK2A1mWqgzYz+AI/UG2gyFWUsuCjW/QY=",
"shasum": "jzu42bAEI/u9ZvL5Bs2oSQjpbQqCwECra7Gl2xbENq8=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/json-rpc/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "wXoG3PQ8lhJu5MCXOoFXPd/eEzrkMzdCYNL5YKCzOXg=",
"shasum": "AcAtgVSzcnGdQ9N8Ux+7+WosCTpJce4WtGoWR9i9p3g=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/jsx/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "8CWhVcRMrN0tSMtxV0UXNvvS6kwVVJ+xJxADZ1AMkxY=",
"shasum": "Uxv/s5tfdz38+IaOPEftGQ2iLey0q+82YWAdU2yRams=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "+bfsURFNxni7MV/98u6zHjp9QgzWIAXI2wud9ClfejM=",
"shasum": "8wTZindSCjvNZFF4Di6tX16RmrGcEdZf6/J1rzkwNXk=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "U5POJ0kzznk+u1A4xxgFQX3LIU8QoVUqYYUylOUmUhs=",
"shasum": "xvXSjRUQEzNRtv/jz0eh/xNqBdBeZZZKYMO5+Taa57I=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "nP0QOJ+vurTLPgKtiYq2zWMxoBBfgZ4VkcQ8svyU1Sk=",
"shasum": "0hMR95zMr0Ot8EhfdigAdncOHAreBEEeEQzjTPhh0+M=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "VSXdhOsUAKupm4JXWCZcQ4HFKNrmxD3LySAmJlRQkGQ=",
"shasum": "acLRltL+gBNh+GBcl9lAAlGMzQlh1+lVEfKDuVlnO4Y=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "AP1xFEuyMDWaiey+kkUzjlMl1tt4ey26cntnHHNix/s=",
"shasum": "yG4JOx+Robak4/UMlxagPmNui1JcWxG1Bl7o3uMhmNM=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "R6xONAf4IA5HXDU2oyL732pa5T+Nhc6idkEr9Zo/fDo=",
"shasum": "oh7TagRHUSLE5KbcnWmRlyUsPQpLq8F1BXxHaVv6lUA=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "nOHygj95R/T+NtgyXLdS5YNxom7bflJoLGaSqAiLZNU=",
"shasum": "CfuiBXwLR1+oiIytBM+mpVBfe42PvA5M9XLeaHKXNsw=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "z18RzBaiNCS+tdOltE3CD6s/S+nTZTVHjLotmaVgKN8=",
"shasum": "r+pwBkDbfvH4pUuB8qTx9P1lHUqSgRKDOkKc4VKj0Kc=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/wasm/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "ZQJV6BNeSLTrnxxnbT+P+I1O9/novFlZcKVJuTxnRRM=",
"shasum": "wFoNbBcqit/JLNuDO6ktG3Pk9/qSCyVIRkjmRf7cMR0=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "nXyQsrdxb0igyATQImUC4UyAw598ldkJCRuu/OZTvss=",
"shasum": "Y62p+2izgaCjaRg6FngcL42nIPT+GZ0q0dxvcyh3NR8=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ exports[`plugin generates a source map 1`] = `
};
}, {}]
}, {}, [1]);
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25vcmVMaXN0IjpbXX0="
`;

exports[`plugin processes files using Browserify 1`] = `
Expand Down
1 change: 1 addition & 0 deletions packages/snaps-cli/.depcheckrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"assert",
"browser-pack",
"buffer",
"core-js-compat",
"eslint-config-*",
"eslint-plugin-*",
"events",
Expand Down
1 change: 1 addition & 0 deletions packages/snaps-cli/src/__mocks__/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const { join, dirname } = jest.requireActual('path');
// to provide the files it's looking for.
const BROWSERIFY_FILES = [
/* eslint-disable n/no-extraneous-require */
join(dirname(require.resolve('core-js-compat')), 'data.json'),
join(dirname(require.resolve('is-core-module/package.json')), 'core.json'),
join(dirname(require.resolve('browser-pack/package.json')), '_prelude.js'),
/* eslint-enable n/no-extraneous-require */
Expand Down
Loading
Loading