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

Live update applications from network explorer #447

Draft
wants to merge 46 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
aa4e93b
packages/cli: move buildContract to core
raykyri Mar 10, 2025
d9865b1
make buildContract async
raykyri Mar 10, 2025
7eee0a8
packages/core: add buildContract to browser using esbuild-wasm
raykyri Mar 10, 2025
12ef153
packages/core: add getSchema() to core, packages/network-explorer: ad…
raykyri Mar 11, 2025
0285de0
packages/network-explorer: pass wasmurl through, serve using vite-sta…
raykyri Mar 11, 2025
7ea0b8f
packages/network-explorer: build in prod
raykyri Mar 11, 2025
6a3b322
Revert "packages/network-explorer: build in prod"
raykyri Mar 11, 2025
1d186dd
add esbuild-wasm dep
raykyri Mar 11, 2025
a6405da
return internal tables only if requested, generate both schemas
raykyri Mar 11, 2025
4f4980d
generate the migrations/table mutations needed to update the snapshot
raykyri Mar 12, 2025
c96fd0e
pass migrations to createSnapshot
raykyri Mar 12, 2025
dd65c10
migrations -> changesets
raykyri Mar 12, 2025
a08cc26
apply changesets when creating snapshot
raykyri Mar 12, 2025
480c9b5
flatten button
raykyri Mar 13, 2025
7cde796
Merge branch 'main' into raymond.build-for-migration
raykyri Mar 13, 2025
46285fb
Merge branch 'main' into raymond.build-for-migration
raykyri Mar 13, 2025
9405782
add stop to run cli
raykyri Mar 13, 2025
8e2b986
refactor cli run into AppLauncher class
raykyri Mar 13, 2025
d7a0beb
more refactoring, clean up unused params
raykyri Mar 13, 2025
ffa3bb8
app now restarts successfully
raykyri Mar 13, 2025
0f9b496
allow triggering a refetch of SWR hooks in context providers
raykyri Mar 13, 2025
3d946b8
clean up ui, live update works
raykyri Mar 13, 2025
b5a0689
fix lint
raykyri Mar 13, 2025
1f9c6e9
refactor restart api, keep express/wss on AppInstance
raykyri Mar 13, 2025
19cc742
Merge branch 'main' into raymond.build-for-migration
raykyri Mar 13, 2025
02b1828
examples/chat: remove --admin from default server command
raykyri Mar 14, 2025
d95feb6
ci check for esbuild.wasm
raykyri Mar 14, 2025
559cd5e
use string: true for args
raykyri Mar 14, 2025
52c76c2
refactor class properties on appInstance
raykyri Mar 14, 2025
948970f
rename AppInstance
raykyri Mar 14, 2025
2d97824
pnpm fix
raykyri Mar 14, 2025
fb248fd
rename
raykyri Mar 14, 2025
b3be093
Merge branch 'main' into raymond.build-for-migration
joeltg Mar 14, 2025
6f5b9e2
packages/network-explorer: use new Editor for ContractView.tsx
joeltg Mar 14, 2025
d0d3a2d
package/network-explorer: use Editor for MigrationView.tsx
joeltg Mar 14, 2025
5d58750
packages/network-explorer: fix editor state handling
joeltg Mar 14, 2025
a58d6e3
packages/network-explorer: re-order imports
joeltg Mar 14, 2025
ebfc189
make 'canvas run' provide originalContract
raykyri Mar 14, 2025
861618a
Merge branch 'raymond.build-for-migration' of github.com:canvasxyz/ca…
raykyri Mar 14, 2025
c3c092f
fix
raykyri Mar 14, 2025
b75040f
packages/network-explorer: admin ui updates
raykyri Mar 14, 2025
dbfd82f
fix api rebinding
raykyri Mar 14, 2025
788efcc
add siwe check to 'canvas run' cli, network explorer
raykyri Mar 14, 2025
8f1eb47
Merge branch 'main' into raymond.build-for-migration
raykyri Mar 20, 2025
a8b83c4
lint fix
raykyri Mar 20, 2025
6d74bb5
packages/cli: add dep
raykyri Mar 20, 2025
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
Prev Previous commit
Next Next commit
fix
raykyri committed Mar 14, 2025
commit c3c092fa42e59f7990cc4bb8805b17ce22c1cb52
5 changes: 4 additions & 1 deletion packages/network-explorer/src/MigrationView.tsx
Original file line number Diff line number Diff line change
@@ -30,7 +30,10 @@ export const MigrationView = () => {
setWaitingForCommit(undefined)

try {
const newContract = await Canvas.buildContract(value, { wasmURL: "./esbuild.wasm" })
const { contract: newContract, originalContract } = await Canvas.buildContract(value, {
wasmURL: "./esbuild.wasm",
})
console.log(newContract, originalContract)

const app = await Canvas.initialize({ contract: contractData.contract, topic: "test.a" })
const newApp = await Canvas.initialize({ contract: newContract, topic: "test.b" })
1 change: 1 addition & 0 deletions packages/network-explorer/src/index.css
Original file line number Diff line number Diff line change
@@ -30,4 +30,5 @@ body {

.editor .cm-scroller {
height: 600px;
font-size: 84%;
}

Unchanged files with check annotations Beta

} else if (location.endsWith(".js") || location.endsWith(".ts")) {
// Handle if the location exists and it's a file.
let contract = fs.readFileSync(location, "utf-8")
let originalContract = contract

Check failure on line 89 in packages/cli/src/utils.ts

GitHub Actions / Lint

'originalContract' is never reassigned. Use 'const' instead
if (location.endsWith(".ts")) {
contract = (await Canvas.buildContract(location)).contract