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

web container #253

Merged
merged 64 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
ac91544
init
chenyan-dfinity Sep 6, 2024
b8cc9f1
npm install works
chenyan-dfinity Sep 6, 2024
9acc9ce
log result
chenyan-dfinity Sep 6, 2024
df3bd92
xterm
chenyan-dfinity Sep 6, 2024
76c58dd
white background
chenyan-dfinity Sep 6, 2024
419cdea
fix
chenyan-dfinity Sep 7, 2024
e29a114
checkpoint
chenyan-dfinity Sep 7, 2024
5bba9cc
fake localhost
chenyan-dfinity Sep 8, 2024
e16f10b
fix xterm scroll
chenyan-dfinity Sep 8, 2024
653b7d7
refactor
chenyan-dfinity Sep 8, 2024
22e78a5
backend installStoredWasm
chenyan-dfinity Sep 8, 2024
753f73f
add origin
chenyan-dfinity Sep 8, 2024
cd73d38
fix iframe cross origin policy; add install_asset_canister in frontend
chenyan-dfinity Sep 8, 2024
b2525a8
frontend deploy
chenyan-dfinity Sep 9, 2024
62d93ea
authorize asset
chenyan-dfinity Sep 9, 2024
5950038
upload works
chenyan-dfinity Sep 9, 2024
3065fe1
display frontend
chenyan-dfinity Sep 10, 2024
af7b0b9
fetch more files
chenyan-dfinity Sep 10, 2024
b7dad2d
push files to container
chenyan-dfinity Sep 10, 2024
a1013ff
enough to build
chenyan-dfinity Sep 11, 2024
fea0349
put node files under /utils
chenyan-dfinity Sep 11, 2024
b568028
fix
chenyan-dfinity Sep 11, 2024
ee0892c
workflow works
chenyan-dfinity Sep 11, 2024
19080ee
hide img file from explorer
chenyan-dfinity Sep 11, 2024
e372f1f
skip same file
chenyan-dfinity Sep 12, 2024
b6c75a7
infer buildDir from dfx.json
chenyan-dfinity Sep 12, 2024
74cd653
bindgen
chenyan-dfinity Sep 12, 2024
7567e74
fix
chenyan-dfinity Sep 12, 2024
7600518
ui fix
chenyan-dfinity Sep 12, 2024
cf64e2f
add headers
chenyan-dfinity Sep 13, 2024
fdddcdf
fix ui
chenyan-dfinity Sep 13, 2024
edbe718
remove dfx from package.json; remove old files from asset
chenyan-dfinity Sep 13, 2024
73e1880
ui to specify declaration path
chenyan-dfinity Sep 13, 2024
ca55f47
fix
chenyan-dfinity Sep 14, 2024
8125a4f
use credentialless header to allow candid UI to load d3
chenyan-dfinity Sep 14, 2024
7b90932
enable jsh
chenyan-dfinity Sep 14, 2024
d5697c0
fix terminal size
chenyan-dfinity Sep 14, 2024
763eb5c
fix
chenyan-dfinity Sep 15, 2024
e2d2bcd
fix
chenyan-dfinity Sep 15, 2024
8dcdd5d
sync files to container
chenyan-dfinity Sep 15, 2024
cf51e1f
fix
chenyan-dfinity Sep 15, 2024
9b31b24
prompt when webcontainer fails to boot
chenyan-dfinity Sep 15, 2024
fcc7efd
fix
chenyan-dfinity Sep 16, 2024
cf94dd7
fix
chenyan-dfinity Sep 16, 2024
7f439bb
fix
chenyan-dfinity Sep 16, 2024
360a168
fix
chenyan-dfinity Sep 16, 2024
d32ef15
switch example to use bump-agent-js branch
chenyan-dfinity Sep 16, 2024
a7cee67
Update src/workers/file.ts
chenyan-dfinity Sep 25, 2024
c05fb80
Update src/App.tsx
chenyan-dfinity Sep 25, 2024
e50ad51
npm audit
chenyan-dfinity Sep 25, 2024
20f7f19
Merge remote-tracking branch 'origin/main' into container
chenyan-dfinity Sep 26, 2024
2892575
Merge remote-tracking branch 'origin/main' into container
chenyan-dfinity Sep 26, 2024
b4302b0
update settings
chenyan-dfinity Sep 28, 2024
93d2bef
script
chenyan-dfinity Oct 2, 2024
5ca50bd
rollback len when newId fails; enable canister_status for admin
chenyan-dfinity Oct 17, 2024
264acf7
fix
chenyan-dfinity Oct 18, 2024
e41aeb7
fix
chenyan-dfinity Oct 21, 2024
1275ac8
create new canisters on demand; deploy stored wasm (#264)
chenyan-dfinity Oct 30, 2024
08b3463
fix
chenyan-dfinity Nov 2, 2024
24d9a38
switch example back to master
chenyan-dfinity Nov 2, 2024
029ca0a
fix
chenyan-dfinity Nov 3, 2024
9b18614
fix
chenyan-dfinity Nov 8, 2024
1c84d2b
fix
chenyan-dfinity Nov 8, 2024
ce4675a
fix
chenyan-dfinity Nov 8, 2024
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
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ We plan on adding many more features to make playground a full-featured web IDE

- [Install Internet Computer SDK](https://sdk.dfinity.org/docs/quickstart/local-quickstart.html)
- [Install npm](https://nodejs.org/en/download/)
- [Install mops](https://mops.one/docs/install)
```
npm i -g ic-mops
```
- [Install mops-cli](https://github.com/chenyan2002/mops-cli/releases)
- [Install Rust](https://www.rust-lang.org/tools/install)
- Add wasm32 target to Rust
```
Expand All @@ -49,6 +46,8 @@ npm start # Run the local development server
dfx deploy
```

If you want to deploy frontend, remember to upload `assetstorage.wasm.gz` to the backend canister and update the module hash in `FrontendDeployModal`.

### npm audit warnings

Vulnerabilities from dev dependencies are false positives, we only aim to fix warnings from `npm audit --production`.
Expand Down
188 changes: 154 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
"private": true,
"type": "module",
"dependencies": {
"@dfinity/agent": "^2.0.0",
"@dfinity/candid": "^2.0.0",
"@dfinity/principal": "^2.0.0",
"@dfinity/agent": "^2.1.3",
"@dfinity/candid": "^2.1.3",
"@dfinity/identity": "^2.1.3",
"@dfinity/principal": "^2.1.3",
"@monaco-editor/react": "4.6.0",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@types/styled-components": "^5.1.34",
"@webcontainer/api": "^1.2.4",
"@xterm/addon-fit": "^0.10.0",
"@xterm/xterm": "^5.5.0",
"lodash.debounce": "^4.0.8",
"motoko": "^3.8.1",
"prettier-plugin-motoko": "^0.9.4",
Expand All @@ -31,14 +35,14 @@
"@types/node": "^20.14.2",
"@vitejs/plugin-react": "^4.3.1",
"comlink": "^4.4.1",
"dotenv": "^16.3.1",
"http-proxy-middleware": "^3.0.2",
"husky": "^9.1.5",
"lint-staged": "^15.2.10",
"mo-dev": "^0.13.0",
"prettier": "^3.3.3",
"typescript": "^5.5.4",
"vite": "^5.4.3",
"dotenv": "^16.3.1",
"vite-plugin-environment": "^1.1.3",
"vite-plugin-top-level-await": "^1.4.4",
"vite-plugin-wasm": "^3.3.0"
Expand Down
6 changes: 0 additions & 6 deletions public/.ic-assets.json

This file was deleted.

14 changes: 14 additions & 0 deletions public/.ic-assets.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"match": "**/*",
"headers": {
"Cross-Origin-Embedder-Policy": "credentialless",
"Cross-Origin-Opener-Policy": "same-origin",
"Content-Security-Policy": "frame-src *; frame-ancestors 'self'"
}
},
{
"match": ".well-known",
"ignore": false
}
]
Binary file added script/assetstorage.wasm.gz
Binary file not shown.
Loading
Loading