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

feat: tutorial webcontainer refactoring and sdk examples #4

Merged
merged 9 commits into from
Dec 15, 2023

Conversation

shoom3301
Copy link
Contributor

@shoom3301 shoom3301 commented Dec 13, 2023

  1. Changed the tutorial webcontainer app from Svelte to Vanilla typescript
  2. Set up a couple of examples for SDK usages
  3. Added an example of app-data SDK usage

@shoom3301 shoom3301 requested a review from mfw78 December 13, 2023 07:38
Copy link

vercel bot commented Dec 13, 2023

@shoom3301 is attempting to deploy a commit to the cow Team on Vercel.

To accomplish this, @shoom3301 needs to request access to the Team.

Afterwards, an owner of the Team is required to accept their membership request.

If you're already a member of the respective Vercel Team, make sure that your Personal Vercel Account is connected to your GitHub account.

Copy link

socket-security bot commented Dec 13, 2023

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@rich_harris/svelte-split-pane 1.1.1 None +0 10.2 kB rich_harris
yootils 0.3.1 None +0 28.6 kB rich_harris
@sveltejs/repl 0.6.0 network +49 96.4 MB svelte-admin
port-authority 2.0.1 network +0 10.4 kB rich_harris
@sveltejs/site-kit 6.0.0-next.39 None +15 85.3 MB svelte-admin
vite 5.0.8 None +35 300 MB vitebot
prism-svelte 0.5.0 None +0 6.09 kB evilpingwin
esbuild 0.19.9 None +22 213 MB evanw
base64-js 1.5.1 None +0 9.62 kB feross
flexsearch 0.7.31 eval +0 360 kB nextapps
@types/prismjs 1.26.3 None +0 19.2 kB types
@replit/codemirror-lang-svelte 6.0.0 None +17 3.48 MB brianpool
@lezer/highlight 1.2.0 None +1 334 kB marijn
codemirror 6.0.1 None +13 3.01 MB marijn
@lezer/javascript 1.4.10 None +3 802 kB marijn
@types/ws 8.5.10 None +2 4.03 MB types
@codemirror/lint 6.4.2 None +5 1.62 MB marijn
@types/diff 5.0.9 None +0 15 kB types
@lezer/common 1.1.2 None +0 236 kB marijn
lightningcss 1.22.1 None +9 80 MB devongovett
@lezer/lr 1.3.14 environment +1 400 kB marijn
@codemirror/search 6.5.5 None +5 1.68 MB marijn
shiki-twoslash 3.1.2 network, filesystem, environment +8 10.5 MB shiki-deploys
events 3.3.0 None +0 82.8 kB goto-bus-stop
@rollup/wasm-node 4.9.0 eval, filesystem, environment +0 3.8 MB lukastaegert
@codemirror/lang-css 6.2.1 None +10 2.66 MB marijn
@codemirror/state 6.3.3 None +0 432 kB marijn
@codemirror/language 6.9.3 None +7 2.33 MB marijn
adm-zip 0.5.10 None +0 103 kB cthackers
@codemirror/commands 6.3.2 None +8 2.55 MB marijn
@sveltejs/adapter-vercel 3.0.3 environment +52 85.8 MB svelte-admin
@codemirror/autocomplete 6.11.1 None +8 2.56 MB marijn
@cowprotocol/app-data 1.2.2 eval, filesystem, shell, environment +121 21.4 MB cowprotocol_dev
@webcontainer/api 1.1.8 None +0 74.1 kB stackblitz-devops
prismjs 1.29.0 None +0 2.05 MB rundevelopment
@codemirror/view 6.22.3 None +3 1.54 MB marijn
diff 5.1.0 None +0 390 kB kpdecker
buffer 6.0.3 None +2 108 kB feross
url 0.11.3 eval +14 644 kB ljharb
@replit/codemirror-vim 6.1.0 None +11 3.3 MB schestakov
@fontsource/roboto-mono 5.0.16 None +0 1.91 MB lotusdevshack
@codemirror/lang-javascript 6.2.1 None +12 3.01 MB marijn
ws 8.15.1 None +0 141 kB lpinca
@safe-global/protocol-kit 1.3.0 eval, filesystem, shell +290 38.5 MB dasanra
@codemirror/lang-html 6.4.7 None +16 3.29 MB marijn
prettier-plugin-svelte 3.1.2 None +1 9.82 MB dummdidumm
prettier 3.1.1 filesystem, environment +0 8.42 MB prettier-bot
rollup 4.9.0 environment +0 2.16 MB lukastaegert
marked 8.0.1 None +0 899 kB tonybrix
@sveltejs/kit 1.24.1...1.30.3 None +13/-3 84.9 MB svelte-admin
esbuild-wasm 0.19.8...0.19.9 None +0/-0 11.9 MB evanw
browserslist 4.21.10...4.22.2 filesystem +5/-1 2.33 MB ai
@playwright/test 1.37.1...1.40.1 filesystem, shell +3/-1 10.2 MB dgozman-ms

🚮 Removed packages: @sveltejs/[email protected], @sveltejs/[email protected], [email protected], [email protected]

Copy link

socket-security bot commented Dec 13, 2023

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Issue Package Version Note Source
Protestware/Troll package es5-ext 0.10.62
  • Note: This package prints a protestware console message on install regarding Ukraine for users with Russian language locale

Next steps

What is protestware and troll packages?

This package is a joke, parody, or includes undocumented or hidden behavior unrelated to its primary function.

Consider that consuming this package my come along with functionality unrelated to its primary purpose.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore [email protected] bar@* or ignore all packages with @SocketSecurity ignore-all

@mfw78
Copy link
Contributor

mfw78 commented Dec 13, 2023

This is great! As mentioned on the call, if we can please include an example for appData, just to make sure that the package is working, and after that, I can start bringing in all the lesson plans.

@shoom3301
Copy link
Contributor Author

@mfw78 added app-data example:
1d8a9be

@shoom3301 shoom3301 requested a review from a team December 14, 2023 10:14
@shoom3301 shoom3301 self-assigned this Dec 14, 2023
@shoom3301 shoom3301 changed the title feat: cow sdk usage examples feat: tutorial webcontainer refactoring and sdk examples Dec 14, 2023
@shoom3301 shoom3301 marked this pull request as ready for review December 14, 2023 10:15
"@cowprotocol/cow-sdk": "^4.0.3",
"ethers": "^5.7.2"
}
"name": "my-vue-app",
Copy link
Contributor

Choose a reason for hiding this comment

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

@anxolin 's favourite 😁

import type { Web3Provider } from '@ethersproject/providers'

export async function run(provider: Web3Provider): Promise<unknown> {
console.log(provider)
Copy link
Contributor

Choose a reason for hiding this comment

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

Did we want this in prod?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is a default file, it should not be executed

import './types.ts'

import { Buffer } from 'buffer'
window.Buffer = Buffer // Yep, this is a hack
Copy link
Contributor

Choose a reason for hiding this comment

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

👨‍💻

@shoom3301 's PR
cowprotocol/docs#9

Tutorial how to create a pre-signed order using Safe

---------

Co-authored-by: shoom3301 <[email protected]>
Copy link

vercel bot commented Dec 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
tutorial ✅ Ready (Inspect) Visit Preview Dec 15, 2023 8:58am

@mfw78 mfw78 merged commit 2eaef53 into main Dec 15, 2023
2 of 4 checks passed
@mfw78 mfw78 deleted the feat/vanila-ts-example branch December 15, 2023 10:15
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.

3 participants