wao 0.41.3 → 0.41.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc-cjs +5 -0
- package/.babelrc-esm +5 -0
- package/.gitmodules +4 -0
- package/.prettierrc +6 -0
- package/README.md +90 -0
- package/app/.eslintrc.json +3 -0
- package/app/.mocharc.cjs +6 -0
- package/app/arweave.mjs +87 -0
- package/app/components/Footer.js +76 -0
- package/app/components/Global.js +1128 -0
- package/app/components/Header.js +306 -0
- package/app/components/Left.js +28 -0
- package/app/components/Logo.js +34 -0
- package/app/components/Middle.js +37 -0
- package/app/components/Sidebar.js +93 -0
- package/app/components/Tags.js +42 -0
- package/app/components/editor/Editor.js +322 -0
- package/app/components/editor/FilePath.js +42 -0
- package/app/components/editor/MonacoEditor.js +44 -0
- package/app/components/left/LeftMessages.js +85 -0
- package/app/components/left/LeftModules.js +86 -0
- package/app/components/left/LeftNetworks.js +438 -0
- package/app/components/left/LeftProcesses.js +98 -0
- package/app/components/left/LeftProjects.js +397 -0
- package/app/components/left/LeftTests.js +189 -0
- package/app/components/middle/MiddleBlocks.js +79 -0
- package/app/components/middle/MiddleEntity.js +16 -0
- package/app/components/middle/MiddleEntityAccount.js +264 -0
- package/app/components/middle/MiddleEntityAssignment.js +104 -0
- package/app/components/middle/MiddleEntityBlock.js +148 -0
- package/app/components/middle/MiddleEntityMessage.js +430 -0
- package/app/components/middle/MiddleEntityModule.js +183 -0
- package/app/components/middle/MiddleEntityProcess.js +323 -0
- package/app/components/middle/MiddleEntityTx.js +211 -0
- package/app/components/middle/MiddleMessages.js +87 -0
- package/app/components/middle/MiddleModules.js +89 -0
- package/app/components/middle/MiddleNetworks.js +516 -0
- package/app/components/middle/MiddleProcesses.js +87 -0
- package/app/components/middle/MiddleTests.js +134 -0
- package/app/components/modals/CreateFileModal.js +115 -0
- package/app/components/modals/CreateFolderModal.js +83 -0
- package/app/components/modals/CreateProjectModal.js +63 -0
- package/app/components/modals/FSModal.js +141 -0
- package/app/components/modals/ImportModal.js +105 -0
- package/app/components/modals/LaunchNetworkModal.js +95 -0
- package/app/components/modals/Modal.js +38 -0
- package/app/components/modals/ProxyModal.js +122 -0
- package/app/components/modals/RenameFileModal.js +95 -0
- package/app/components/styles/EditorScrollbarStyle.js +29 -0
- package/app/components/styles/EntityScrollbarStyle.js +29 -0
- package/app/components/styles/GlobalStyle.js +102 -0
- package/app/components/styles/XtermStyle.js +37 -0
- package/app/components/terminal/Terminal.js +132 -0
- package/app/components/terminal/Xterm.js +160 -0
- package/app/components/ui/avatar.jsx +49 -0
- package/app/components/ui/checkbox.jsx +17 -0
- package/app/components/ui/close-button.jsx +20 -0
- package/app/components/ui/color-mode.jsx +61 -0
- package/app/components/ui/dialog.jsx +54 -0
- package/app/components/ui/drawer.jsx +44 -0
- package/app/components/ui/field.jsx +22 -0
- package/app/components/ui/input-group.jsx +39 -0
- package/app/components/ui/popover.jsx +49 -0
- package/app/components/ui/provider.jsx +12 -0
- package/app/components/ui/radio.jsx +17 -0
- package/app/components/ui/slider.jsx +107 -0
- package/app/components/ui/toaster.jsx +69 -0
- package/app/components/ui/tooltip.jsx +35 -0
- package/app/index.js +10 -0
- package/app/jsconfig.json +7 -0
- package/app/lib/GithubCSS.js +1218 -0
- package/app/lib/addon-fit.js +72 -0
- package/app/lib/data.js +31 -0
- package/app/lib/github-markdown.css +1169 -0
- package/app/lib/global.js +1 -0
- package/app/lib/guide.js +82 -0
- package/app/lib/hub.js +109 -0
- package/app/lib/scripts.js +47 -0
- package/app/lib/store.js +34 -0
- package/app/lib/use.js +64 -0
- package/app/lib/utils.js +387 -0
- package/app/lib/webrtc.js +217 -0
- package/app/next.config.js +25 -0
- package/app/package.json +62 -0
- package/app/pages/404.js +9 -0
- package/app/pages/_app.js +10 -0
- package/app/pages/_document.js +14 -0
- package/app/pages/index.js +121 -0
- package/app/playwright.config.mjs +41 -0
- package/app/proxy.mjs +21 -0
- package/app/public/assets/cover.png +0 -0
- package/app/public/blueprints/apm.lua +91 -0
- package/app/public/blueprints/arena.lua +345 -0
- package/app/public/blueprints/arns.lua +318 -0
- package/app/public/blueprints/chat.lua +210 -0
- package/app/public/blueprints/chatroom.lua +56 -0
- package/app/public/blueprints/patch-legacy-reply.lua +13 -0
- package/app/public/blueprints/staking.lua +93 -0
- package/app/public/blueprints/token.lua +298 -0
- package/app/public/blueprints/voting.lua +45 -0
- package/app/public/favicon.ico +0 -0
- package/app/public/logo.png +0 -0
- package/cli-esm.js +55 -0
- package/cli.js +54 -0
- package/devnet/app/api.js +129 -0
- package/devnet/app/components/layout.js +89 -0
- package/devnet/app/components/pagination.js +144 -0
- package/devnet/app/components/search.js +159 -0
- package/devnet/app/components/table.js +124 -0
- package/devnet/app/components/tags.js +89 -0
- package/devnet/app/index.html +14 -0
- package/devnet/app/main.js +215 -0
- package/devnet/app/router.js +59 -0
- package/devnet/app/state.js +19 -0
- package/devnet/app/style.css +1606 -0
- package/devnet/app/utils.js +77 -0
- package/devnet/app/views/blocks.js +75 -0
- package/devnet/app/views/dashboard.js +127 -0
- package/devnet/app/views/entity.js +1473 -0
- package/devnet/app/views/messages.js +90 -0
- package/devnet/app/views/modules.js +165 -0
- package/devnet/app/views/processes.js +90 -0
- package/devnet/app/views/schedulers.js +90 -0
- package/devnet/app/views/transactions.js +88 -0
- package/devnet/migrations/0001_initial.sql +51 -0
- package/devnet/package.json +26 -0
- package/devnet/playwright.config.js +7 -0
- package/devnet/src/cu-worker.js +166 -0
- package/devnet/src/index.js +309 -0
- package/devnet/vite.config.js +17 -0
- package/devnet/vitest.config.js +10 -0
- package/devnet/wrangler-cu.toml +32 -0
- package/devnet/wrangler.toml +38 -0
- package/dhfs-tutorial-app/package.json +15 -0
- package/dist/esm/workspace/dashboard/public/favicon.png +0 -0
- package/dist/esm/workspace/src/counter.lua +14 -0
- package/dist/package.json +82 -0
- package/hb.sh +18 -0
- package/hbsig/.babelrc-cjs +5 -0
- package/hbsig/.babelrc-esm +5 -0
- package/hbsig/README.md +1 -0
- package/hbsig/dist/cjs/bin_to_str.js +44 -0
- package/hbsig/dist/cjs/collect-body-keys.js +470 -0
- package/hbsig/dist/cjs/commit.js +330 -0
- package/hbsig/dist/cjs/encode-array-item.js +110 -0
- package/hbsig/dist/cjs/encode-utils.js +242 -0
- package/hbsig/dist/cjs/encode.js +1365 -0
- package/hbsig/dist/cjs/erl_json.js +326 -0
- package/hbsig/dist/cjs/erl_str.js +1042 -0
- package/hbsig/dist/cjs/flat.js +279 -0
- package/hbsig/dist/cjs/http-message-signatures/httpbis.js +489 -0
- package/hbsig/dist/cjs/http-message-signatures/index.js +25 -0
- package/hbsig/dist/cjs/http-message-signatures/structured-header.js +129 -0
- package/hbsig/dist/cjs/httpsig.js +861 -0
- package/hbsig/dist/cjs/id.js +470 -0
- package/hbsig/dist/cjs/index.js +174 -0
- package/hbsig/dist/cjs/nocrypto.js +51 -0
- package/hbsig/dist/cjs/parser.js +201 -0
- package/hbsig/dist/cjs/send-utils.js +1231 -0
- package/hbsig/dist/cjs/send.js +211 -0
- package/hbsig/dist/cjs/signer-utils.js +494 -0
- package/hbsig/dist/cjs/signer.js +436 -0
- package/hbsig/dist/cjs/structured.js +515 -0
- package/hbsig/dist/cjs/test.js +12 -0
- package/hbsig/dist/cjs/utils.js +44 -0
- package/hbsig/dist/esm/bin_to_str.js +46 -0
- package/hbsig/dist/esm/collect-body-keys.js +436 -0
- package/hbsig/dist/esm/commit.js +219 -0
- package/hbsig/dist/esm/encode-array-item.js +112 -0
- package/hbsig/dist/esm/encode-utils.js +191 -0
- package/hbsig/dist/esm/encode.js +1256 -0
- package/hbsig/dist/esm/erl_json.js +292 -0
- package/hbsig/dist/esm/erl_str.js +1144 -0
- package/hbsig/dist/esm/flat.js +250 -0
- package/hbsig/dist/esm/http-message-signatures/httpbis.js +438 -0
- package/hbsig/dist/esm/http-message-signatures/index.js +4 -0
- package/hbsig/dist/esm/http-message-signatures/structured-header.js +105 -0
- package/hbsig/dist/esm/httpsig.js +866 -0
- package/hbsig/dist/esm/id.js +459 -0
- package/hbsig/dist/esm/index.js +13 -0
- package/hbsig/dist/esm/nocrypto.js +4 -0
- package/hbsig/dist/esm/package.json +3 -0
- package/hbsig/dist/esm/parser.js +171 -0
- package/hbsig/dist/esm/send-utils.js +1132 -0
- package/hbsig/dist/esm/send.js +142 -0
- package/hbsig/dist/esm/signer-utils.js +375 -0
- package/hbsig/dist/esm/signer.js +312 -0
- package/hbsig/dist/esm/structured.js +496 -0
- package/hbsig/dist/esm/test.js +2 -0
- package/hbsig/dist/esm/utils.js +29 -0
- package/hbsig/dist/package.json +39 -0
- package/hbsig/make.js +36 -0
- package/hbsig/package.json +39 -0
- package/hbsig/src/bin_to_str.js +46 -0
- package/hbsig/src/collect-body-keys.js +436 -0
- package/hbsig/src/commit.js +219 -0
- package/hbsig/src/encode-array-item.js +112 -0
- package/hbsig/src/encode-utils.js +191 -0
- package/hbsig/src/encode.js +1256 -0
- package/hbsig/src/erl_json.js +292 -0
- package/hbsig/src/erl_str.js +1144 -0
- package/hbsig/src/flat.js +250 -0
- package/hbsig/src/http-message-signatures/httpbis.js +438 -0
- package/hbsig/src/http-message-signatures/index.js +4 -0
- package/hbsig/src/http-message-signatures/structured-header.js +105 -0
- package/hbsig/src/httpsig.js +866 -0
- package/hbsig/src/id.js +459 -0
- package/hbsig/src/index.js +13 -0
- package/hbsig/src/nocrypto.js +4 -0
- package/hbsig/src/parser.js +171 -0
- package/hbsig/src/send-utils.js +1132 -0
- package/hbsig/src/send.js +142 -0
- package/hbsig/src/signer-utils.js +375 -0
- package/hbsig/src/signer.js +312 -0
- package/hbsig/src/structured.js +496 -0
- package/hbsig/src/test.js +2 -0
- package/hbsig/src/utils.js +29 -0
- package/lp/index.html +25 -0
- package/lp/package.json +19 -0
- package/lp/public/cover.png +0 -0
- package/lp/public/favicon.ico +0 -0
- package/lp/public/favicon.png +0 -0
- package/lp/public/images/book.jpg +0 -0
- package/lp/public/images/dashboard.png +0 -0
- package/lp/public/images/devnet.png +0 -0
- package/lp/public/images/hero-bg.png +0 -0
- package/lp/public/images/hyperadd.png +0 -0
- package/lp/public/images/message-flow.png +0 -0
- package/lp/public/images/mobile.png +0 -0
- package/lp/public/images/og-cover.png +0 -0
- package/lp/public/images/scan.png +0 -0
- package/lp/public/images/wao-hub.png +0 -0
- package/lp/public/images/wao-web.png +0 -0
- package/lp/public/logo.png +0 -0
- package/lp/src/App.jsx +29 -0
- package/lp/src/components/CodeBlock.jsx +37 -0
- package/lp/src/components/CodeBlock.module.css +89 -0
- package/lp/src/components/Footer.jsx +22 -0
- package/lp/src/components/Footer.module.css +60 -0
- package/lp/src/components/Nav.jsx +80 -0
- package/lp/src/components/Nav.module.css +177 -0
- package/lp/src/components/SectionWrapper.jsx +15 -0
- package/lp/src/hooks/useReveal.js +25 -0
- package/lp/src/hooks/useScrolled.js +14 -0
- package/lp/src/main.jsx +10 -0
- package/lp/src/sections/Book.jsx +60 -0
- package/lp/src/sections/Book.module.css +204 -0
- package/lp/src/sections/Browser.jsx +46 -0
- package/lp/src/sections/Browser.module.css +67 -0
- package/lp/src/sections/Devnet.jsx +55 -0
- package/lp/src/sections/Devnet.module.css +136 -0
- package/lp/src/sections/GetStarted.jsx +51 -0
- package/lp/src/sections/GetStarted.module.css +128 -0
- package/lp/src/sections/Hero.jsx +67 -0
- package/lp/src/sections/Hero.module.css +202 -0
- package/lp/src/sections/HyperADD.jsx +46 -0
- package/lp/src/sections/HyperADD.module.css +113 -0
- package/lp/src/sections/SDK.jsx +90 -0
- package/lp/src/sections/SDK.module.css +122 -0
- package/lp/src/sections/Testing.jsx +47 -0
- package/lp/src/sections/Testing.module.css +124 -0
- package/lp/src/sections/Vision.jsx +93 -0
- package/lp/src/sections/Vision.module.css +147 -0
- package/lp/src/styles/globals.css +285 -0
- package/lp/src/utils/scrollTo.js +4 -0
- package/lp/vite.config.js +7 -0
- package/make.js +39 -0
- package/package.json +17 -12
- package/patches/@permaweb+ao-loader+0.0.44.patch +64 -0
- package/plan.md +435 -0
- package/rebar.lock +1 -0
- package/src/accounts-web.js +128 -0
- package/src/accounts.js +124 -0
- package/src/adaptor-base.js +622 -0
- package/src/adaptor-cf.js +11 -0
- package/src/adaptor-web.js +11 -0
- package/src/adaptor.js +10 -0
- package/src/ao-loader.js +30660 -0
- package/src/ao.js +1173 -0
- package/src/aoconnect-base.js +1098 -0
- package/src/aoconnect-cf.js +9 -0
- package/src/aoconnect-web.js +8 -0
- package/src/aoconnect.js +8 -0
- package/src/aos_wamr.js +1 -0
- package/src/ar-remote.js +87 -0
- package/src/ar.js +276 -0
- package/src/armem-base.js +529 -0
- package/src/armem-cf.js +67 -0
- package/src/armem-web.js +19 -0
- package/src/armem.js +26 -0
- package/src/bao.js +141 -0
- package/src/bar.js +366 -0
- package/src/build.js +7 -0
- package/src/bundler.js +119 -0
- package/src/car.js +10 -0
- package/src/cf-env.js +29 -0
- package/src/cf.js +11 -0
- package/src/cli.js +561 -0
- package/src/compress.js +112 -0
- package/src/create.js +415 -0
- package/src/devs.js +86 -0
- package/src/dirname.js +1 -0
- package/src/dodb.js +26 -0
- package/src/erl_json.js +289 -0
- package/src/erl_str.js +1139 -0
- package/src/gql.js +229 -0
- package/src/hb.js +967 -0
- package/src/helpers.js +203 -0
- package/src/http.js +619 -0
- package/src/hub/bundler.js +123 -0
- package/src/hub/cu.js +74 -0
- package/src/hub/fs.js +157 -0
- package/src/hub/index.js +85 -0
- package/src/hub/utils.js +64 -0
- package/src/hub/ws-proxy.js +67 -0
- package/src/hyper-aos.js +1 -0
- package/src/hyperbeam-server.js +21 -0
- package/src/hyperbeam.js +585 -0
- package/src/index.js +5 -0
- package/src/keygen.js +47 -0
- package/src/lfdb.js +67 -0
- package/src/lua/aos.wasm +0 -0
- package/src/lua/aos2_0_1.js +1 -0
- package/src/lua/aos2_0_1.wasm +0 -0
- package/src/lua/aos2_0_3.js +1 -0
- package/src/lua/aos2_0_3.wasm +0 -0
- package/src/lua/aos2_0_4_32.js +1 -0
- package/src/lua/aos2_0_4_32.wasm +0 -0
- package/src/lua/aos2_0_6.wasm +0 -0
- package/src/lua/apm.lua +61 -0
- package/src/lua/llama.wasm +0 -0
- package/src/lua/process.wasm +0 -0
- package/src/lua/sqlite.js +1 -0
- package/src/lua/sqlite.wasm +0 -0
- package/src/lua/weavedb_mock.lua +44 -0
- package/src/lua/weavedrive.lua +53 -0
- package/src/run.js +25 -0
- package/src/server.js +173 -0
- package/src/storage-multi.js +183 -0
- package/src/tao.js +12 -0
- package/src/tar.js +10 -0
- package/src/test.js +42 -0
- package/src/tgql-d1.js +407 -0
- package/src/tgql.js +310 -0
- package/src/toerl.js +162 -0
- package/src/utils.js +777 -0
- package/src/wao.js +29 -0
- package/src/waosm/README.md +81 -0
- package/src/waosm/waosm.d.ts +40 -0
- package/src/waosm/waosm.js +240 -0
- package/src/waosm/waosm_bg.wasm +0 -0
- package/src/waosm/waosm_bg.wasm.d.ts +8 -0
- package/src/waosm-node/README.md +81 -0
- package/src/waosm-node/waosm.d.ts +8 -0
- package/src/waosm-node/waosm.js +4 -0
- package/src/waosm-node/waosm_bg.js +147 -0
- package/src/waosm-node/waosm_bg.wasm +0 -0
- package/src/waosm-node/waosm_bg.wasm.d.ts +8 -0
- package/src/waosm-node/waosm_bg.wasm.js +14 -0
- package/src/waosm-node.js +9 -0
- package/src/war.js +10 -0
- package/src/weavedrive.js +376 -0
- package/src/web.js +11 -0
- package/src/workspace/.mcp.json +8 -0
- package/src/workspace/CLAUDE.md +258 -0
- package/src/workspace/README.md +85 -0
- package/src/workspace/dashboard/index.html +163 -0
- package/src/workspace/dashboard/package.json +18 -0
- package/src/workspace/dashboard/public/favicon.ico +0 -0
- package/src/workspace/dashboard/public/favicon.png +0 -0
- package/src/workspace/dashboard/server.js +224 -0
- package/src/workspace/dashboard/src/App.jsx +2350 -0
- package/{cjs/workspace/frontend → src/workspace/dashboard}/vite.config.js +6 -0
- package/src/workspace/package.json +18 -0
- package/src/workspace/src/counter.lua +14 -0
- package/tsconfig.json +18 -0
- package/types/index.d.ts +329 -0
- package/waollama/.eslintrc.json +3 -0
- package/waollama/README.md +19 -0
- package/waollama/arweave.mjs +87 -0
- package/waollama/components/ui/avatar.jsx +49 -0
- package/waollama/components/ui/checkbox.jsx +17 -0
- package/waollama/components/ui/close-button.jsx +20 -0
- package/waollama/components/ui/color-mode.jsx +61 -0
- package/waollama/components/ui/dialog.jsx +54 -0
- package/waollama/components/ui/drawer.jsx +44 -0
- package/waollama/components/ui/field.jsx +22 -0
- package/waollama/components/ui/input-group.jsx +39 -0
- package/waollama/components/ui/popover.jsx +49 -0
- package/waollama/components/ui/provider.jsx +12 -0
- package/waollama/components/ui/radio.jsx +17 -0
- package/waollama/components/ui/slider.jsx +107 -0
- package/waollama/components/ui/tooltip.jsx +35 -0
- package/waollama/index.js +10 -0
- package/waollama/jsconfig.json +7 -0
- package/waollama/lib/ao-loader.js +30654 -0
- package/waollama/lib/client.js +1 -0
- package/waollama/lib/wasm.js +1 -0
- package/waollama/next.config.js +25 -0
- package/waollama/package.json +43 -0
- package/waollama/pages/404.js +9 -0
- package/waollama/pages/_app.js +9 -0
- package/waollama/pages/_document.js +14 -0
- package/waollama/pages/index.js +212 -0
- package/waollama/playwright.config.js +31 -0
- package/waollama/proxy.mjs +21 -0
- package/waollama/public/favicon.ico +0 -0
- package/waollama/public/human.png +0 -0
- package/waollama/public/llama.png +0 -0
- package/waosm/Cargo.toml +11 -0
- package/waosm/README.md +81 -0
- package/waosm/compress.js +112 -0
- package/waosm/make.js +33 -0
- package/waosm/package.json +10 -0
- package/waosm/src/lib.rs +180 -0
- package/waosm/test.js +16 -0
- package/cjs/workspace/.claude/agents/builder.md +0 -99
- package/cjs/workspace/.claude/agents/device-builder.md +0 -86
- package/cjs/workspace/.claude/agents/tester.md +0 -90
- package/cjs/workspace/.claude/mcp/dashboard/server.js +0 -128
- package/cjs/workspace/.claude/rules/deploy.md +0 -45
- package/cjs/workspace/.claude/rules/frontend.md +0 -69
- package/cjs/workspace/.claude/rules/hyperbeam.md +0 -104
- package/cjs/workspace/.claude/rules/lua.md +0 -108
- package/cjs/workspace/.claude/rules/testing.md +0 -257
- package/cjs/workspace/.claude/settings.json +0 -109
- package/cjs/workspace/.claude/skills/build/SKILL.md +0 -214
- package/cjs/workspace/.claude/skills/build-aos/SKILL.md +0 -129
- package/cjs/workspace/.claude/skills/build-device/SKILL.md +0 -192
- package/cjs/workspace/.claude/skills/build-frontend/SKILL.md +0 -134
- package/cjs/workspace/.claude/skills/build-module/SKILL.md +0 -281
- package/cjs/workspace/.claude/skills/create-aos/SKILL.md +0 -63
- package/cjs/workspace/.claude/skills/create-device/SKILL.md +0 -87
- package/cjs/workspace/.claude/skills/create-module/SKILL.md +0 -162
- package/cjs/workspace/.claude/skills/debug/SKILL.md +0 -57
- package/cjs/workspace/.claude/skills/deploy/SKILL.md +0 -85
- package/cjs/workspace/.claude/skills/dev/SKILL.md +0 -32
- package/cjs/workspace/.claude/skills/plan/SKILL.md +0 -176
- package/cjs/workspace/.claude/skills/readme/SKILL.md +0 -186
- package/cjs/workspace/.claude/skills/report/SKILL.md +0 -49
- package/cjs/workspace/.claude/skills/team/SKILL.md +0 -101
- package/cjs/workspace/.claude/skills/test/SKILL.md +0 -56
- package/cjs/workspace/.claude/skills/test-device/SKILL.md +0 -114
- package/cjs/workspace/.claude/skills/test-e2e/SKILL.md +0 -103
- package/cjs/workspace/.claude/skills/test-hb/SKILL.md +0 -76
- package/cjs/workspace/.claude/skills/validate/SKILL.md +0 -96
- package/cjs/workspace/.claude/skills/validate/scripts/check-lua.sh +0 -41
- package/cjs/workspace/docs/aos-lua.md +0 -428
- package/cjs/workspace/docs/debug.md +0 -230
- package/cjs/workspace/docs/hyperbeam-dev.md +0 -606
- package/cjs/workspace/docs/hyperbeam-devices.md +0 -618
- package/cjs/workspace/docs/wao-sdk.md +0 -807
- package/cjs/workspace/frontend/e2e/.gitkeep +0 -0
- package/cjs/workspace/frontend/index.html +0 -12
- package/cjs/workspace/frontend/package.json +0 -24
- package/cjs/workspace/frontend/playwright.config.js +0 -10
- package/cjs/workspace/frontend/src/App.jsx +0 -24
- package/cjs/workspace/frontend/test/.gitkeep +0 -0
- package/cjs/workspace/frontend/vitest.config.js +0 -10
- package/cjs/workspace/scripts/deploy.js +0 -140
- package/cjs/workspace/scripts/keygen.js +0 -52
- package/cjs/workspace/test/aos.test.js +0 -98
- package/cjs/workspace/test/hyperbeam.test.js +0 -80
- package/esm/compiler/native +0 -0
- package/esm/workspace/.claude/agents/builder.md +0 -99
- package/esm/workspace/.claude/agents/device-builder.md +0 -86
- package/esm/workspace/.claude/agents/tester.md +0 -90
- package/esm/workspace/.claude/mcp/dashboard/server.js +0 -128
- package/esm/workspace/.claude/rules/deploy.md +0 -45
- package/esm/workspace/.claude/rules/frontend.md +0 -69
- package/esm/workspace/.claude/rules/hyperbeam.md +0 -104
- package/esm/workspace/.claude/rules/lua.md +0 -108
- package/esm/workspace/.claude/rules/testing.md +0 -257
- package/esm/workspace/.claude/settings.json +0 -109
- package/esm/workspace/.claude/skills/build/SKILL.md +0 -214
- package/esm/workspace/.claude/skills/build-aos/SKILL.md +0 -129
- package/esm/workspace/.claude/skills/build-device/SKILL.md +0 -192
- package/esm/workspace/.claude/skills/build-frontend/SKILL.md +0 -134
- package/esm/workspace/.claude/skills/build-module/SKILL.md +0 -281
- package/esm/workspace/.claude/skills/create-aos/SKILL.md +0 -63
- package/esm/workspace/.claude/skills/create-device/SKILL.md +0 -87
- package/esm/workspace/.claude/skills/create-module/SKILL.md +0 -162
- package/esm/workspace/.claude/skills/debug/SKILL.md +0 -57
- package/esm/workspace/.claude/skills/deploy/SKILL.md +0 -85
- package/esm/workspace/.claude/skills/dev/SKILL.md +0 -32
- package/esm/workspace/.claude/skills/plan/SKILL.md +0 -176
- package/esm/workspace/.claude/skills/readme/SKILL.md +0 -186
- package/esm/workspace/.claude/skills/report/SKILL.md +0 -49
- package/esm/workspace/.claude/skills/team/SKILL.md +0 -101
- package/esm/workspace/.claude/skills/test/SKILL.md +0 -56
- package/esm/workspace/.claude/skills/test-device/SKILL.md +0 -114
- package/esm/workspace/.claude/skills/test-e2e/SKILL.md +0 -103
- package/esm/workspace/.claude/skills/test-hb/SKILL.md +0 -76
- package/esm/workspace/.claude/skills/validate/SKILL.md +0 -96
- package/esm/workspace/.claude/skills/validate/scripts/check-lua.sh +0 -41
- package/esm/workspace/docs/aos-lua.md +0 -428
- package/esm/workspace/docs/debug.md +0 -230
- package/esm/workspace/docs/hyperbeam-dev.md +0 -606
- package/esm/workspace/docs/hyperbeam-devices.md +0 -618
- package/esm/workspace/docs/wao-sdk.md +0 -807
- package/esm/workspace/frontend/e2e/.gitkeep +0 -0
- package/esm/workspace/frontend/index.html +0 -12
- package/esm/workspace/frontend/package.json +0 -24
- package/esm/workspace/frontend/playwright.config.js +0 -10
- package/esm/workspace/frontend/src/App.jsx +0 -24
- package/esm/workspace/frontend/src/main.jsx +0 -9
- package/esm/workspace/frontend/test/.gitkeep +0 -0
- package/esm/workspace/frontend/vite.config.js +0 -6
- package/esm/workspace/frontend/vitest.config.js +0 -10
- package/esm/workspace/scripts/deploy.js +0 -140
- package/esm/workspace/scripts/keygen.js +0 -52
- package/esm/workspace/test/aos.test.js +0 -98
- package/esm/workspace/test/hyperbeam.test.js +0 -80
- /package/{cjs/workspace/dashboard/public → devnet/app}/favicon.ico +0 -0
- /package/{cjs/workspace → dhfs-tutorial-app}/src/counter.lua +0 -0
- /package/{cjs → dist/cjs}/accounts-web.js +0 -0
- /package/{cjs → dist/cjs}/accounts.js +0 -0
- /package/{cjs → dist/cjs}/adaptor-base.js +0 -0
- /package/{cjs → dist/cjs}/adaptor-cf.js +0 -0
- /package/{cjs → dist/cjs}/adaptor-web.js +0 -0
- /package/{cjs → dist/cjs}/adaptor.js +0 -0
- /package/{cjs → dist/cjs}/ao-loader.js +0 -0
- /package/{cjs → dist/cjs}/ao.js +0 -0
- /package/{cjs → dist/cjs}/aoconnect-base.js +0 -0
- /package/{cjs → dist/cjs}/aoconnect-cf.js +0 -0
- /package/{cjs → dist/cjs}/aoconnect-web.js +0 -0
- /package/{cjs → dist/cjs}/aoconnect.js +0 -0
- /package/{cjs → dist/cjs}/aos_wamr.js +0 -0
- /package/{cjs → dist/cjs}/ar-remote.js +0 -0
- /package/{cjs → dist/cjs}/ar.js +0 -0
- /package/{cjs → dist/cjs}/armem-base.js +0 -0
- /package/{cjs → dist/cjs}/armem-cf.js +0 -0
- /package/{cjs → dist/cjs}/armem-web.js +0 -0
- /package/{cjs → dist/cjs}/armem.js +0 -0
- /package/{cjs → dist/cjs}/bao.js +0 -0
- /package/{cjs → dist/cjs}/bar.js +0 -0
- /package/{cjs → dist/cjs}/build.js +0 -0
- /package/{cjs → dist/cjs}/bundler.js +0 -0
- /package/{cjs → dist/cjs}/car.js +0 -0
- /package/{cjs → dist/cjs}/cf-env.js +0 -0
- /package/{cjs → dist/cjs}/cf.js +0 -0
- /package/{cjs → dist/cjs}/cli.js +0 -0
- /package/{cjs → dist/cjs}/compress.js +0 -0
- /package/{cjs → dist/cjs}/create.js +0 -0
- /package/{cjs → dist/cjs}/devs.js +0 -0
- /package/{cjs → dist/cjs}/dirname.js +0 -0
- /package/{cjs → dist/cjs}/dodb.js +0 -0
- /package/{cjs → dist/cjs}/erl_json.js +0 -0
- /package/{cjs → dist/cjs}/erl_str.js +0 -0
- /package/{cjs → dist/cjs}/gql.js +0 -0
- /package/{cjs → dist/cjs}/hb.js +0 -0
- /package/{cjs → dist/cjs}/helpers.js +0 -0
- /package/{cjs → dist/cjs}/http.js +0 -0
- /package/{cjs → dist/cjs}/hub/bundler.js +0 -0
- /package/{cjs → dist/cjs}/hub/cu.js +0 -0
- /package/{cjs → dist/cjs}/hub/fs.js +0 -0
- /package/{cjs → dist/cjs}/hub/index.js +0 -0
- /package/{cjs → dist/cjs}/hub/utils.js +0 -0
- /package/{cjs → dist/cjs}/hub/ws-proxy.js +0 -0
- /package/{cjs → dist/cjs}/hyper-aos.js +0 -0
- /package/{cjs → dist/cjs}/hyperbeam-server.js +0 -0
- /package/{cjs → dist/cjs}/hyperbeam.js +0 -0
- /package/{cjs → dist/cjs}/index.js +0 -0
- /package/{cjs → dist/cjs}/keygen.js +0 -0
- /package/{cjs → dist/cjs}/lfdb.js +0 -0
- /package/{cjs → dist/cjs}/lua/aos.wasm +0 -0
- /package/{cjs → dist/cjs}/lua/aos2_0_1.js +0 -0
- /package/{cjs → dist/cjs}/lua/aos2_0_1.wasm +0 -0
- /package/{cjs → dist/cjs}/lua/aos2_0_3.js +0 -0
- /package/{cjs → dist/cjs}/lua/aos2_0_3.wasm +0 -0
- /package/{cjs → dist/cjs}/lua/aos2_0_4_32.js +0 -0
- /package/{cjs → dist/cjs}/lua/aos2_0_4_32.wasm +0 -0
- /package/{cjs → dist/cjs}/lua/aos2_0_6.wasm +0 -0
- /package/{cjs → dist/cjs}/lua/apm.lua +0 -0
- /package/{cjs → dist/cjs}/lua/llama.wasm +0 -0
- /package/{cjs → dist/cjs}/lua/process.wasm +0 -0
- /package/{cjs → dist/cjs}/lua/sqlite.js +0 -0
- /package/{cjs → dist/cjs}/lua/sqlite.wasm +0 -0
- /package/{cjs → dist/cjs}/lua/weavedb_mock.lua +0 -0
- /package/{cjs → dist/cjs}/lua/weavedrive.lua +0 -0
- /package/{cjs → dist/cjs}/run.js +0 -0
- /package/{cjs → dist/cjs}/server.js +0 -0
- /package/{cjs → dist/cjs}/storage-multi.js +0 -0
- /package/{cjs → dist/cjs}/tao.js +0 -0
- /package/{cjs → dist/cjs}/tar.js +0 -0
- /package/{cjs → dist/cjs}/test.js +0 -0
- /package/{cjs → dist/cjs}/tgql-d1.js +0 -0
- /package/{cjs → dist/cjs}/tgql.js +0 -0
- /package/{cjs → dist/cjs}/toerl.js +0 -0
- /package/{cjs → dist/cjs}/utils.js +0 -0
- /package/{cjs → dist/cjs}/wao.js +0 -0
- /package/{cjs → dist/cjs}/waosm/waosm.js +0 -0
- /package/{cjs → dist/cjs}/waosm-node/waosm.js +0 -0
- /package/{cjs → dist/cjs}/waosm-node/waosm_bg.js +0 -0
- /package/{cjs → dist/cjs}/waosm-node/waosm_bg.wasm +0 -0
- /package/{cjs → dist/cjs}/waosm-node/waosm_bg.wasm.js +0 -0
- /package/{cjs → dist/cjs}/waosm-node.js +0 -0
- /package/{cjs → dist/cjs}/war.js +0 -0
- /package/{cjs → dist/cjs}/weavedrive.js +0 -0
- /package/{cjs → dist/cjs}/web.js +0 -0
- /package/{cjs → dist/cjs}/workspace/.mcp.json +0 -0
- /package/{cjs → dist/cjs}/workspace/CLAUDE.md +0 -0
- /package/{cjs → dist/cjs}/workspace/README.md +0 -0
- /package/{cjs → dist/cjs}/workspace/dashboard/index.html +0 -0
- /package/{cjs → dist/cjs}/workspace/dashboard/package.json +0 -0
- /package/{esm → dist/cjs}/workspace/dashboard/public/favicon.ico +0 -0
- /package/{cjs → dist/cjs}/workspace/dashboard/public/favicon.png +0 -0
- /package/{cjs → dist/cjs}/workspace/dashboard/server.js +0 -0
- /package/{cjs → dist/cjs}/workspace/dashboard/src/App.jsx +0 -0
- /package/{cjs → dist/cjs}/workspace/dashboard/src/main.jsx +0 -0
- /package/{cjs → dist/cjs}/workspace/dashboard/vite.config.js +0 -0
- /package/{cjs → dist/cjs}/workspace/package.json +0 -0
- /package/{esm → dist/cjs}/workspace/src/counter.lua +0 -0
- /package/{esm → dist/esm}/accounts-web.js +0 -0
- /package/{esm → dist/esm}/accounts.js +0 -0
- /package/{esm → dist/esm}/adaptor-base.js +0 -0
- /package/{esm → dist/esm}/adaptor-cf.js +0 -0
- /package/{esm → dist/esm}/adaptor-web.js +0 -0
- /package/{esm → dist/esm}/adaptor.js +0 -0
- /package/{esm → dist/esm}/ao-loader.js +0 -0
- /package/{esm → dist/esm}/ao.js +0 -0
- /package/{esm → dist/esm}/aoconnect-base.js +0 -0
- /package/{esm → dist/esm}/aoconnect-cf.js +0 -0
- /package/{esm → dist/esm}/aoconnect-web.js +0 -0
- /package/{esm → dist/esm}/aoconnect.js +0 -0
- /package/{esm → dist/esm}/aos_wamr.js +0 -0
- /package/{esm → dist/esm}/ar-remote.js +0 -0
- /package/{esm → dist/esm}/ar.js +0 -0
- /package/{esm → dist/esm}/armem-base.js +0 -0
- /package/{esm → dist/esm}/armem-cf.js +0 -0
- /package/{esm → dist/esm}/armem-web.js +0 -0
- /package/{esm → dist/esm}/armem.js +0 -0
- /package/{esm → dist/esm}/bao.js +0 -0
- /package/{esm → dist/esm}/bar.js +0 -0
- /package/{esm → dist/esm}/build.js +0 -0
- /package/{esm → dist/esm}/bundler.js +0 -0
- /package/{esm → dist/esm}/car.js +0 -0
- /package/{esm → dist/esm}/cf-env.js +0 -0
- /package/{esm → dist/esm}/cf.js +0 -0
- /package/{esm → dist/esm}/cli.js +0 -0
- /package/{esm → dist/esm}/compress.js +0 -0
- /package/{esm → dist/esm}/create.js +0 -0
- /package/{esm → dist/esm}/devs.js +0 -0
- /package/{esm → dist/esm}/dirname.js +0 -0
- /package/{esm → dist/esm}/dodb.js +0 -0
- /package/{esm → dist/esm}/erl_json.js +0 -0
- /package/{esm → dist/esm}/erl_str.js +0 -0
- /package/{esm → dist/esm}/gql.js +0 -0
- /package/{esm → dist/esm}/hb.js +0 -0
- /package/{esm → dist/esm}/helpers.js +0 -0
- /package/{esm → dist/esm}/http.js +0 -0
- /package/{esm → dist/esm}/hub/bundler.js +0 -0
- /package/{esm → dist/esm}/hub/cu.js +0 -0
- /package/{esm → dist/esm}/hub/fs.js +0 -0
- /package/{esm → dist/esm}/hub/index.js +0 -0
- /package/{esm → dist/esm}/hub/utils.js +0 -0
- /package/{esm → dist/esm}/hub/ws-proxy.js +0 -0
- /package/{esm → dist/esm}/hyper-aos.js +0 -0
- /package/{esm → dist/esm}/hyperbeam-server.js +0 -0
- /package/{esm → dist/esm}/hyperbeam.js +0 -0
- /package/{esm → dist/esm}/index.js +0 -0
- /package/{esm → dist/esm}/keygen.js +0 -0
- /package/{esm → dist/esm}/lfdb.js +0 -0
- /package/{esm → dist/esm}/lua/aos.wasm +0 -0
- /package/{esm → dist/esm}/lua/aos2_0_1.js +0 -0
- /package/{esm → dist/esm}/lua/aos2_0_1.wasm +0 -0
- /package/{esm → dist/esm}/lua/aos2_0_3.js +0 -0
- /package/{esm → dist/esm}/lua/aos2_0_3.wasm +0 -0
- /package/{esm → dist/esm}/lua/aos2_0_4_32.js +0 -0
- /package/{esm → dist/esm}/lua/aos2_0_4_32.wasm +0 -0
- /package/{esm → dist/esm}/lua/aos2_0_6.wasm +0 -0
- /package/{esm → dist/esm}/lua/apm.lua +0 -0
- /package/{esm → dist/esm}/lua/llama.wasm +0 -0
- /package/{esm → dist/esm}/lua/process.wasm +0 -0
- /package/{esm → dist/esm}/lua/sqlite.js +0 -0
- /package/{esm → dist/esm}/lua/sqlite.wasm +0 -0
- /package/{esm → dist/esm}/lua/weavedb_mock.lua +0 -0
- /package/{esm → dist/esm}/lua/weavedrive.lua +0 -0
- /package/{esm → dist/esm}/package.json +0 -0
- /package/{esm → dist/esm}/run.js +0 -0
- /package/{esm → dist/esm}/server.js +0 -0
- /package/{esm → dist/esm}/storage-multi.js +0 -0
- /package/{esm → dist/esm}/tao.js +0 -0
- /package/{esm → dist/esm}/tar.js +0 -0
- /package/{esm → dist/esm}/test.js +0 -0
- /package/{esm → dist/esm}/tgql-d1.js +0 -0
- /package/{esm → dist/esm}/tgql.js +0 -0
- /package/{esm → dist/esm}/toerl.js +0 -0
- /package/{esm → dist/esm}/utils.js +0 -0
- /package/{esm → dist/esm}/wao.js +0 -0
- /package/{esm → dist/esm}/waosm/README.md +0 -0
- /package/{esm → dist/esm}/waosm/waosm.d.ts +0 -0
- /package/{esm → dist/esm}/waosm/waosm.js +0 -0
- /package/{esm → dist/esm}/waosm/waosm_bg.wasm +0 -0
- /package/{esm → dist/esm}/waosm/waosm_bg.wasm.d.ts +0 -0
- /package/{esm → dist/esm}/waosm-node/README.md +0 -0
- /package/{esm → dist/esm}/waosm-node/waosm.d.ts +0 -0
- /package/{esm → dist/esm}/waosm-node/waosm.js +0 -0
- /package/{esm → dist/esm}/waosm-node/waosm_bg.js +0 -0
- /package/{esm → dist/esm}/waosm-node/waosm_bg.wasm +0 -0
- /package/{esm → dist/esm}/waosm-node/waosm_bg.wasm.d.ts +0 -0
- /package/{esm → dist/esm}/waosm-node/waosm_bg.wasm.js +0 -0
- /package/{esm → dist/esm}/waosm-node.js +0 -0
- /package/{esm → dist/esm}/war.js +0 -0
- /package/{esm → dist/esm}/weavedrive.js +0 -0
- /package/{esm → dist/esm}/web.js +0 -0
- /package/{esm → dist/esm}/workspace/.mcp.json +0 -0
- /package/{esm → dist/esm}/workspace/CLAUDE.md +0 -0
- /package/{esm → dist/esm}/workspace/README.md +0 -0
- /package/{esm → dist/esm}/workspace/dashboard/index.html +0 -0
- /package/{esm → dist/esm}/workspace/dashboard/package.json +0 -0
- /package/{esm/workspace/dashboard/public/favicon.png → dist/esm/workspace/dashboard/public/favicon.ico} +0 -0
- /package/{esm → dist/esm}/workspace/dashboard/server.js +0 -0
- /package/{esm → dist/esm}/workspace/dashboard/src/App.jsx +0 -0
- /package/{cjs/workspace/frontend → dist/esm/workspace/dashboard}/src/main.jsx +0 -0
- /package/{esm → dist/esm}/workspace/dashboard/vite.config.js +0 -0
- /package/{esm → dist/esm}/workspace/package.json +0 -0
- /package/{postinstall.cjs → dist/postinstall.cjs} +0 -0
- /package/{esm → src}/workspace/dashboard/src/main.jsx +0 -0
package/app/lib/utils.js
ADDED
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
import { useEffect, useState } from "react"
|
|
2
|
+
import { AO, acc } from "wao/web"
|
|
3
|
+
import { hash as sha256 } from "fast-sha256"
|
|
4
|
+
import { splitEvery, fromPairs, map, filter, includes } from "ramda"
|
|
5
|
+
import { common, createStarryNight } from "@wooorm/starry-night"
|
|
6
|
+
import markdownIt from "markdown-it"
|
|
7
|
+
import * as cheerio from "cheerio"
|
|
8
|
+
import { toHtml } from "hast-util-to-html"
|
|
9
|
+
import dayjs from "dayjs"
|
|
10
|
+
import relativeTime from "dayjs/plugin/relativeTime"
|
|
11
|
+
import { v4 } from "uuid"
|
|
12
|
+
import g from "/lib/global"
|
|
13
|
+
|
|
14
|
+
dayjs.extend(relativeTime)
|
|
15
|
+
|
|
16
|
+
function generateId() {
|
|
17
|
+
return v4()
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const wait = ms => new Promise(res => setTimeout(() => res(), ms))
|
|
21
|
+
|
|
22
|
+
const tags = tags => fromPairs(map(v => [v.name, v.value])(tags))
|
|
23
|
+
|
|
24
|
+
const getPreview = async txt => {
|
|
25
|
+
const starryNight = await createStarryNight(common)
|
|
26
|
+
const markdownItInstance = markdownIt({
|
|
27
|
+
html: true,
|
|
28
|
+
highlight(value, lang) {
|
|
29
|
+
const scope = starryNight.flagToScope(lang)
|
|
30
|
+
return toHtml({
|
|
31
|
+
type: "element",
|
|
32
|
+
tagName: "pre",
|
|
33
|
+
properties: {
|
|
34
|
+
className: scope
|
|
35
|
+
? [
|
|
36
|
+
"highlight",
|
|
37
|
+
"highlight-" +
|
|
38
|
+
scope.replace(/^source\./, "").replace(/\./g, "-"),
|
|
39
|
+
]
|
|
40
|
+
: undefined,
|
|
41
|
+
},
|
|
42
|
+
children: scope
|
|
43
|
+
? /** @type {Array<ElementContent>} */ (
|
|
44
|
+
starryNight.highlight(value, scope).children
|
|
45
|
+
)
|
|
46
|
+
: [{ type: "text", value }],
|
|
47
|
+
})
|
|
48
|
+
},
|
|
49
|
+
})
|
|
50
|
+
const html = markdownItInstance.render(txt)
|
|
51
|
+
const $ = cheerio.load(html)
|
|
52
|
+
$("a").each((_, el) => {
|
|
53
|
+
const href = $(el).attr("href")
|
|
54
|
+
$(el).attr("target", "_blank")
|
|
55
|
+
if (href && !href.match(/^(?:[a-z]+:)?\/\//i)) {
|
|
56
|
+
$(el).addClass("relative-link")
|
|
57
|
+
$(el).attr("data-href", href)
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
return $.html()
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function useResizeObserver(ref) {
|
|
65
|
+
const [dimensions, setDimensions] = useState({ width: 0, height: 0 })
|
|
66
|
+
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
// Only run on client side
|
|
69
|
+
if (typeof window === "undefined" || !ref.current) return
|
|
70
|
+
|
|
71
|
+
const observeTarget = ref.current
|
|
72
|
+
|
|
73
|
+
const resizeObserver = new ResizeObserver(entries => {
|
|
74
|
+
// We only care about the first element, most often there is only one.
|
|
75
|
+
const entry = entries[0]
|
|
76
|
+
|
|
77
|
+
setDimensions({
|
|
78
|
+
width: entry.contentRect.width,
|
|
79
|
+
height: entry.contentRect.height,
|
|
80
|
+
})
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
resizeObserver.observe(observeTarget)
|
|
84
|
+
|
|
85
|
+
return () => {
|
|
86
|
+
resizeObserver.unobserve(observeTarget)
|
|
87
|
+
resizeObserver.disconnect()
|
|
88
|
+
}
|
|
89
|
+
}, [ref])
|
|
90
|
+
|
|
91
|
+
return dimensions
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function resolvePath(basePath, relativePath) {
|
|
95
|
+
if (relativePath[0] === "/") return relativePath
|
|
96
|
+
const stack = basePath.replace(/\/+$/, "").split("/")
|
|
97
|
+
const parts = relativePath.split("/")
|
|
98
|
+
|
|
99
|
+
for (const part of parts) {
|
|
100
|
+
if (part === "..") {
|
|
101
|
+
if (stack.length > 1) stack.pop()
|
|
102
|
+
} else if (part !== "." && part !== "") {
|
|
103
|
+
stack.push(part)
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return stack.join("/")
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const ftype = fileext => {
|
|
111
|
+
return fileext === "js"
|
|
112
|
+
? "javascript"
|
|
113
|
+
: fileext === "ts"
|
|
114
|
+
? "typescript"
|
|
115
|
+
: fileext === "md"
|
|
116
|
+
? "markdown"
|
|
117
|
+
: fileext
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const getAct = message => {
|
|
121
|
+
if (message) {
|
|
122
|
+
const t = tags(message.http_msg.tags)
|
|
123
|
+
return t.Type === "Process" ? "Process" : t.Action
|
|
124
|
+
}
|
|
125
|
+
return null
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const filterFiles = filter(v => {
|
|
129
|
+
return v.pid && !includes(v.pid, ["0", "2", "3"])
|
|
130
|
+
})
|
|
131
|
+
const filterProjects = filter(v => v.id !== "2")
|
|
132
|
+
const short = (addr, len = 8) => {
|
|
133
|
+
return !addr ? "" : addr.slice(0, len) + "..." + addr.slice(-len)
|
|
134
|
+
}
|
|
135
|
+
const fromNow = ts => {
|
|
136
|
+
return dayjs(ts).fromNow()
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function b64urlEncode(buf) {
|
|
140
|
+
const b64 =
|
|
141
|
+
typeof btoa === "function"
|
|
142
|
+
? btoa(String.fromCharCode(...buf))
|
|
143
|
+
: Buffer.from(buf).toString("base64")
|
|
144
|
+
return b64.replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "")
|
|
145
|
+
}
|
|
146
|
+
function b64urlDecode(str) {
|
|
147
|
+
str = str.replace(/-/g, "+").replace(/_/g, "/")
|
|
148
|
+
if (str.length % 4) str += "=".repeat(4 - (str.length % 4))
|
|
149
|
+
if (typeof atob === "function") {
|
|
150
|
+
const bin = atob(str)
|
|
151
|
+
return Uint8Array.from(bin, c => c.charCodeAt(0))
|
|
152
|
+
}
|
|
153
|
+
return Uint8Array.from(Buffer.from(str, "base64"))
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const toAddr = pub => b64urlEncode(sha256(b64urlDecode(pub)))
|
|
157
|
+
|
|
158
|
+
const k = {
|
|
159
|
+
down: (n = 0) => `\x1b[${n === 0 ? "" : n}B`,
|
|
160
|
+
up: (n = 0) => `\x1b[${n === 0 ? "" : n}A`,
|
|
161
|
+
right: (n = 0) => `\x1b[${n === 0 ? "" : n}C`,
|
|
162
|
+
left: (n = 0) => `\x1b[${n === 0 ? "" : n}D`,
|
|
163
|
+
x: (n = 0) => `\x1b[${n === 0 ? "" : n}G`,
|
|
164
|
+
ctrlA: "\x01",
|
|
165
|
+
ctrlE: "\x05",
|
|
166
|
+
ctrlF: "\x06",
|
|
167
|
+
ctrlB: "\x02",
|
|
168
|
+
del: "\x1b[3~",
|
|
169
|
+
ctrlK: "\x0b",
|
|
170
|
+
ctrlV: "\x16",
|
|
171
|
+
ctrlD: "\x04",
|
|
172
|
+
altD: "\x1bd",
|
|
173
|
+
enter: 13,
|
|
174
|
+
bs: 127,
|
|
175
|
+
moveL: () => {
|
|
176
|
+
if (g.cur > 0) {
|
|
177
|
+
const cursorX = g.term.buffer.active.cursorX
|
|
178
|
+
if (cursorX === 0 && g.cur > 0) {
|
|
179
|
+
const cols = g.term.cols
|
|
180
|
+
g.term.write(k.up())
|
|
181
|
+
g.term.write(k.x(cols))
|
|
182
|
+
} else g.term.write(k.left())
|
|
183
|
+
g.cur--
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
moveR: () => {
|
|
187
|
+
if (g.cur < g.inputRef.current.length) {
|
|
188
|
+
const cursorX = g.term.buffer.active.cursorX
|
|
189
|
+
const cols = g.term.cols
|
|
190
|
+
if (cursorX === cols - 1) {
|
|
191
|
+
g.term.write(k.down())
|
|
192
|
+
g.term.write("\r")
|
|
193
|
+
} else g.term.write(k.right())
|
|
194
|
+
g.cur++
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
stats: () => {
|
|
198
|
+
const cols = g.term.cols
|
|
199
|
+
const x = g.term.buffer.active.cursorX
|
|
200
|
+
const len = g.inputRef.current.length
|
|
201
|
+
const plen = g.plen
|
|
202
|
+
let y = 0
|
|
203
|
+
if (g.cur > x) y = Math.floor((g.cur + plen - x) / cols)
|
|
204
|
+
const rows = Math.ceil((plen + len) / cols)
|
|
205
|
+
return { cols, x, len, y, plen, rows, cur: g.cur }
|
|
206
|
+
},
|
|
207
|
+
backspace: () => {
|
|
208
|
+
if (g.cur > 0) {
|
|
209
|
+
k.moveL()
|
|
210
|
+
setTimeout(() => k.delete(), 0)
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
delete: () => {
|
|
214
|
+
const { x, y, rows, cur, len } = k.stats()
|
|
215
|
+
if (cur < len) {
|
|
216
|
+
const left = g.inputRef.current.slice(0, g.cur)
|
|
217
|
+
const right = g.inputRef.current.slice(g.cur + 1)
|
|
218
|
+
g.inputRef.current = left + right
|
|
219
|
+
g.term.write(right + " ")
|
|
220
|
+
g.term.write(k.left(right.length + 1))
|
|
221
|
+
g.term.write(k.x(x + 1))
|
|
222
|
+
if (rows - y - 1 > 0) g.term.write(k.up(rows - y - 1))
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
void: () => {},
|
|
226
|
+
downH: () => {
|
|
227
|
+
if (g.historyIndex < g.history.length - 1) {
|
|
228
|
+
g.historyIndex++
|
|
229
|
+
k.history(g.history[g.historyIndex])
|
|
230
|
+
} else if (g.historyIndex === g.history.length - 1) {
|
|
231
|
+
g.historyIndex++
|
|
232
|
+
k.history(g.savedInput ?? "")
|
|
233
|
+
g.savedInput = null
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
upH: () => {
|
|
237
|
+
if (g.history.length > 0) {
|
|
238
|
+
if (g.historyIndex === g.history.length) {
|
|
239
|
+
g.savedInput = g.inputRef.current
|
|
240
|
+
}
|
|
241
|
+
if (g.historyIndex > 0) {
|
|
242
|
+
g.historyIndex--
|
|
243
|
+
k.history(g.history[g.historyIndex])
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
history: newInput => {
|
|
248
|
+
const oldLen = g.inputRef.current.length
|
|
249
|
+
const newLen = newInput.length
|
|
250
|
+
const cur = g.cur
|
|
251
|
+
if (cur > 0) g.term.write(k.left(cur))
|
|
252
|
+
g.term.write(" ".repeat(oldLen))
|
|
253
|
+
if (oldLen > 0) g.term.write(k.left(oldLen))
|
|
254
|
+
g.inputRef.current = newInput
|
|
255
|
+
g.cur = newLen
|
|
256
|
+
g.term.write(newInput)
|
|
257
|
+
},
|
|
258
|
+
cutW: () => {
|
|
259
|
+
if (g.cur < g.inputRef.current.length) {
|
|
260
|
+
const isWordChar = c => /\w/.test(c)
|
|
261
|
+
const text = g.inputRef.current
|
|
262
|
+
let end = g.cur
|
|
263
|
+
while (end < text.length && text[end] === " ") end++
|
|
264
|
+
const first = isWordChar(text[end])
|
|
265
|
+
while (
|
|
266
|
+
end < text.length &&
|
|
267
|
+
(isWordChar(text[end]) === first || (!first && text[end] === " "))
|
|
268
|
+
) {
|
|
269
|
+
end++
|
|
270
|
+
}
|
|
271
|
+
const left = text.slice(0, g.cur)
|
|
272
|
+
const right = text.slice(end)
|
|
273
|
+
g.inputRef.current = left + right
|
|
274
|
+
g.term.write(right + " ".repeat(end - g.cur))
|
|
275
|
+
g.term.write(k.left(right.length + (end - g.cur)))
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
cut: () => {
|
|
279
|
+
const { x, y, rows } = k.stats()
|
|
280
|
+
const left = g.inputRef.current.slice(0, g.cur)
|
|
281
|
+
const right = g.inputRef.current.slice(g.cur)
|
|
282
|
+
g.inputRef.current = left
|
|
283
|
+
g.term.write(" ".repeat(right.length))
|
|
284
|
+
g.term.write(k.x(x + 1))
|
|
285
|
+
if (rows - y - 1 > 0) g.term.write(k.up(rows - y - 1))
|
|
286
|
+
},
|
|
287
|
+
write: txt => {
|
|
288
|
+
const { len, x, cols, y, plen, rows } = k.stats()
|
|
289
|
+
const left = g.inputRef.current.slice(0, g.cur)
|
|
290
|
+
const right = g.inputRef.current.slice(g.cur)
|
|
291
|
+
let txt2 = txt + right
|
|
292
|
+
let rlen = right.length
|
|
293
|
+
g.term.write(txt2)
|
|
294
|
+
if (rlen > 0) {
|
|
295
|
+
const get = (x, txt) => {
|
|
296
|
+
const pad = cols - x
|
|
297
|
+
let x2 = 0
|
|
298
|
+
let up = 0
|
|
299
|
+
if (txt.length <= pad) {
|
|
300
|
+
x2 = x + txt.length
|
|
301
|
+
} else {
|
|
302
|
+
let txt3 = txt.slice(pad)
|
|
303
|
+
while (txt3.length > 0) {
|
|
304
|
+
up++
|
|
305
|
+
x2 = txt3.length
|
|
306
|
+
txt3 = txt3.slice(cols)
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
return { newx: x2, up }
|
|
310
|
+
}
|
|
311
|
+
let { newx } = get(x, txt)
|
|
312
|
+
let { up } = get(newx, right)
|
|
313
|
+
if (x === cols - 1 && txt.length === 1) {
|
|
314
|
+
newx = -1
|
|
315
|
+
up -= 1
|
|
316
|
+
}
|
|
317
|
+
g.term.write(k.x(newx + 1))
|
|
318
|
+
if (up > 0) g.term.write(k.up(up))
|
|
319
|
+
if (up < 0) g.term.write(k.down(up * -1))
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
g.inputRef.current = left + txt + right
|
|
323
|
+
g.cur += txt.length
|
|
324
|
+
},
|
|
325
|
+
paste: () => {
|
|
326
|
+
navigator.clipboard
|
|
327
|
+
.readText()
|
|
328
|
+
.then(paste => {
|
|
329
|
+
k.write(paste)
|
|
330
|
+
})
|
|
331
|
+
.catch(err => {
|
|
332
|
+
console.error("Clipboard read failed:", err)
|
|
333
|
+
})
|
|
334
|
+
},
|
|
335
|
+
end: () => {
|
|
336
|
+
if (g.cur < g.inputRef.current.length) {
|
|
337
|
+
const { len, x, cols, y, plen, rows } = k.stats()
|
|
338
|
+
const lastLine = (plen + len) % cols
|
|
339
|
+
const linesDown = rows - y - 1
|
|
340
|
+
if (linesDown > 0) g.term.write(k.down(linesDown))
|
|
341
|
+
if (lastLine - x > 0) g.term.write(k.right(lastLine - x))
|
|
342
|
+
else if (lastLine - x < 0) g.term.write(k.left(x - lastLine))
|
|
343
|
+
g.cur = len
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
top: () => {
|
|
347
|
+
if (g.cur > 0) {
|
|
348
|
+
const { plen, len, x, cols, y } = k.stats()
|
|
349
|
+
if (g.cur < x) g.term.write(k.left(g.cur))
|
|
350
|
+
else {
|
|
351
|
+
if (y > 0) g.term.write(k.up(y))
|
|
352
|
+
if (plen - x > 0) g.term.write(k.right(plen - x))
|
|
353
|
+
else if (plen - x < 0) g.term.write(k.left(x - plen))
|
|
354
|
+
}
|
|
355
|
+
g.cur = 0
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
}
|
|
359
|
+
async function isWasm64() {
|
|
360
|
+
try {
|
|
361
|
+
const ao = await new AO({ cache: "__wasm__" }).init(acc[0])
|
|
362
|
+
const { pid } = await ao.spwn({
|
|
363
|
+
module: "JArYBF-D8q2OmZ4Mok00sD2Y_6SYEQ7Hjx-6VZ_jl3g",
|
|
364
|
+
})
|
|
365
|
+
return pid !== null
|
|
366
|
+
} catch (e) {
|
|
367
|
+
return false
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
export {
|
|
371
|
+
isWasm64,
|
|
372
|
+
k,
|
|
373
|
+
toAddr,
|
|
374
|
+
fromNow,
|
|
375
|
+
short,
|
|
376
|
+
filterProjects,
|
|
377
|
+
filterFiles,
|
|
378
|
+
getAct,
|
|
379
|
+
ftype,
|
|
380
|
+
wait,
|
|
381
|
+
generateId,
|
|
382
|
+
tags,
|
|
383
|
+
useResizeObserver,
|
|
384
|
+
getPreview,
|
|
385
|
+
dayjs,
|
|
386
|
+
resolvePath,
|
|
387
|
+
}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
export default class WebRTC {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.config = { iceServers: [] }
|
|
4
|
+
|
|
5
|
+
this.peerConnection = null
|
|
6
|
+
this.dataChannel = null
|
|
7
|
+
this.isInitiator = false
|
|
8
|
+
|
|
9
|
+
this.onConnectionStateChange = null
|
|
10
|
+
this.onDataChannelOpen = null
|
|
11
|
+
this.onDataChannelClose = null
|
|
12
|
+
this.onDataChannelMessage = null
|
|
13
|
+
this.onIceGatheringStateChange = null
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Initialize as the connection initiator
|
|
18
|
+
* @returns {Promise<string>} Connection offer to be shared with peer
|
|
19
|
+
*/
|
|
20
|
+
async createOffer() {
|
|
21
|
+
this.isInitiator = true
|
|
22
|
+
this._setupPeerConnection()
|
|
23
|
+
|
|
24
|
+
this.dataChannel =
|
|
25
|
+
this.peerConnection.createDataChannel("serverlessChannel")
|
|
26
|
+
this._setupDataChannel()
|
|
27
|
+
|
|
28
|
+
try {
|
|
29
|
+
// Create the offer
|
|
30
|
+
const offer = await this.peerConnection.createOffer()
|
|
31
|
+
await this.peerConnection.setLocalDescription(offer)
|
|
32
|
+
|
|
33
|
+
// Wait for ICE gathering to complete
|
|
34
|
+
await this._waitForIceGathering()
|
|
35
|
+
|
|
36
|
+
// Return the complete offer with ICE candidates
|
|
37
|
+
return JSON.stringify(this.peerConnection.localDescription)
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.error("Error creating offer:", error)
|
|
40
|
+
throw error
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Generate an answer as the connection receiver
|
|
46
|
+
* @param {string} offerStr - The offer string from the initiator
|
|
47
|
+
* @returns {Promise<string>} Connection answer to be shared back to initiator
|
|
48
|
+
*/
|
|
49
|
+
async createAnswer(offerStr) {
|
|
50
|
+
this.isInitiator = false
|
|
51
|
+
this._setupPeerConnection()
|
|
52
|
+
|
|
53
|
+
// Set up handler for receiving the data channel
|
|
54
|
+
this.peerConnection.ondatachannel = event => {
|
|
55
|
+
this.dataChannel = event.channel
|
|
56
|
+
this._setupDataChannel()
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
try {
|
|
60
|
+
const offer = JSON.parse(offerStr)
|
|
61
|
+
await this.peerConnection.setRemoteDescription(
|
|
62
|
+
new RTCSessionDescription(offer)
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
// Create the answer
|
|
66
|
+
const answer = await this.peerConnection.createAnswer()
|
|
67
|
+
await this.peerConnection.setLocalDescription(answer)
|
|
68
|
+
|
|
69
|
+
// Wait for ICE gathering to complete
|
|
70
|
+
await this._waitForIceGathering()
|
|
71
|
+
|
|
72
|
+
// Return the complete answer with ICE candidates
|
|
73
|
+
return JSON.stringify(this.peerConnection.localDescription)
|
|
74
|
+
} catch (error) {
|
|
75
|
+
console.error("Error creating answer:", error)
|
|
76
|
+
throw error
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Set the remote answer (initiator side)
|
|
82
|
+
* @param {string} answerStr - The answer string from the receiver
|
|
83
|
+
* @returns {Promise<void>}
|
|
84
|
+
*/
|
|
85
|
+
async setAnswer(answerStr) {
|
|
86
|
+
if (!this.isInitiator) {
|
|
87
|
+
throw new Error("setAnswer can only be called by the initiator")
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
try {
|
|
91
|
+
const answer = JSON.parse(answerStr)
|
|
92
|
+
await this.peerConnection.setRemoteDescription(
|
|
93
|
+
new RTCSessionDescription(answer)
|
|
94
|
+
)
|
|
95
|
+
} catch (error) {
|
|
96
|
+
console.error("Error setting answer:", error)
|
|
97
|
+
throw error
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Send a message to the connected peer
|
|
103
|
+
* @param {string} message - Message to send
|
|
104
|
+
* @returns {boolean} - Success status
|
|
105
|
+
*/
|
|
106
|
+
sendMessage(message) {
|
|
107
|
+
if (this.dataChannel && this.dataChannel.readyState === "open") {
|
|
108
|
+
this.dataChannel.send(message)
|
|
109
|
+
return true
|
|
110
|
+
}
|
|
111
|
+
return false
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Close the connection
|
|
116
|
+
*/
|
|
117
|
+
close() {
|
|
118
|
+
if (this.dataChannel) {
|
|
119
|
+
this.dataChannel.close()
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (this.peerConnection) {
|
|
123
|
+
this.peerConnection.close()
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Get current connection state
|
|
129
|
+
* @returns {string} Connection state
|
|
130
|
+
*/
|
|
131
|
+
getConnectionState() {
|
|
132
|
+
return this.peerConnection ? this.peerConnection.connectionState : "closed"
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Setup the peer connection
|
|
137
|
+
* @private
|
|
138
|
+
*/
|
|
139
|
+
_setupPeerConnection() {
|
|
140
|
+
this.peerConnection = new RTCPeerConnection(this.config)
|
|
141
|
+
|
|
142
|
+
this.peerConnection.onicecandidate = event => {
|
|
143
|
+
console.log("ICE candidate:", event.candidate)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
this.peerConnection.onconnectionstatechange = () => {
|
|
147
|
+
console.log(
|
|
148
|
+
"Connection state changed:",
|
|
149
|
+
this.peerConnection.connectionState
|
|
150
|
+
)
|
|
151
|
+
if (this.onConnectionStateChange) {
|
|
152
|
+
this.onConnectionStateChange(this.peerConnection.connectionState)
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
this.peerConnection.onicegatheringstatechange = () => {
|
|
157
|
+
console.log("ICE gathering state:", this.peerConnection.iceGatheringState)
|
|
158
|
+
if (this.onIceGatheringStateChange) {
|
|
159
|
+
this.onIceGatheringStateChange(this.peerConnection.iceGatheringState)
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Setup the data channel
|
|
166
|
+
* @private
|
|
167
|
+
*/
|
|
168
|
+
_setupDataChannel() {
|
|
169
|
+
this.dataChannel.onopen = () => {
|
|
170
|
+
console.log("Data channel open")
|
|
171
|
+
if (this.onDataChannelOpen) {
|
|
172
|
+
this.onDataChannelOpen()
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
this.dataChannel.onclose = () => {
|
|
177
|
+
console.log("Data channel closed")
|
|
178
|
+
if (this.onDataChannelClose) {
|
|
179
|
+
this.onDataChannelClose()
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
this.dataChannel.onmessage = event => {
|
|
184
|
+
console.log("Message received:", event.data)
|
|
185
|
+
if (this.onDataChannelMessage) {
|
|
186
|
+
this.onDataChannelMessage(event.data)
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Wait for ICE gathering to complete
|
|
193
|
+
* @returns {Promise<void>}
|
|
194
|
+
* @private
|
|
195
|
+
*/
|
|
196
|
+
_waitForIceGathering() {
|
|
197
|
+
return new Promise(resolve => {
|
|
198
|
+
if (this.peerConnection.iceGatheringState === "complete") {
|
|
199
|
+
resolve()
|
|
200
|
+
} else {
|
|
201
|
+
const checkState = () => {
|
|
202
|
+
if (this.peerConnection.iceGatheringState === "complete") {
|
|
203
|
+
this.peerConnection.removeEventListener(
|
|
204
|
+
"icegatheringstatechange",
|
|
205
|
+
checkState
|
|
206
|
+
)
|
|
207
|
+
resolve()
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
this.peerConnection.addEventListener(
|
|
211
|
+
"icegatheringstatechange",
|
|
212
|
+
checkState
|
|
213
|
+
)
|
|
214
|
+
}
|
|
215
|
+
})
|
|
216
|
+
}
|
|
217
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const arnext = require("arnext/config")
|
|
2
|
+
const nextConfig = {
|
|
3
|
+
async headers() {
|
|
4
|
+
return [
|
|
5
|
+
{
|
|
6
|
+
source: "/:path*",
|
|
7
|
+
headers: [
|
|
8
|
+
{
|
|
9
|
+
key: "Cross-Origin-Opener-Policy",
|
|
10
|
+
value: "same-origin",
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
key: "Cross-Origin-Embedder-Policy",
|
|
14
|
+
value: "require-corp",
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
reactStrictMode: true,
|
|
21
|
+
experimental: {
|
|
22
|
+
optimizePackageImports: ["@chakra-ui/react"],
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
module.exports = arnext(nextConfig)
|
package/app/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "arnext-app",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "next dev",
|
|
7
|
+
"build": "next build",
|
|
8
|
+
"start": "next start",
|
|
9
|
+
"lint": "next lint",
|
|
10
|
+
"arweave": "npm run build:arweave && npx serve -s out",
|
|
11
|
+
"deploy": "node node_modules/arnext-arkb deploy out",
|
|
12
|
+
"deploy:turbo": "turbo upload-folder --folder-path out",
|
|
13
|
+
"build:arweave": "cross-env NEXT_PUBLIC_DEPLOY_TARGET='arweave' next build && node arweave.mjs",
|
|
14
|
+
"test": "mocha --reporter spec test/unit/**/*.test.mjs",
|
|
15
|
+
"test:e2e": "cross-env WAO_E2E_FROM_ROOT=1 node test/e2e/run-from-root.mjs",
|
|
16
|
+
"test:e2e:headed": "cross-env WAO_E2E_FROM_ROOT=1 PWPLAYHEADED=1 node test/e2e/run-from-root.mjs",
|
|
17
|
+
"test:e2e:ui": "cross-env WAO_E2E_FROM_ROOT=1 PWUI=1 node test/e2e/run-from-root.mjs"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@chakra-ui/react": "^3.6.0",
|
|
21
|
+
"@dha-team/arbundles": "^1.0.2",
|
|
22
|
+
"@emotion/react": "^11.14.0",
|
|
23
|
+
"@monaco-editor/react": "^4.7.0",
|
|
24
|
+
"@permaweb/ao-loader": "^0.0.46",
|
|
25
|
+
"@react-hook/resize-observer": "^2.0.2",
|
|
26
|
+
"@wooorm/starry-night": "^3.7.0",
|
|
27
|
+
"@xterm/xterm": "^5.5.0",
|
|
28
|
+
"arbundles": "^0.11.2",
|
|
29
|
+
"arnext": "^0.1.4",
|
|
30
|
+
"assert": "^2.1.0",
|
|
31
|
+
"chalk": "^5.4.1",
|
|
32
|
+
"dayjs": "^1.11.13",
|
|
33
|
+
"fast-sha256": "^1.3.0",
|
|
34
|
+
"hast-util-to-html": "^9.0.5",
|
|
35
|
+
"localforage": "^1.10.0",
|
|
36
|
+
"markdown-it": "^14.1.0",
|
|
37
|
+
"md5": "^2.3.0",
|
|
38
|
+
"next": "14.2.13",
|
|
39
|
+
"next-themes": "^0.4.4",
|
|
40
|
+
"react": "^18",
|
|
41
|
+
"react-dom": "^18",
|
|
42
|
+
"react-icons": "^5.5.0",
|
|
43
|
+
"react-resizable-panels": "^2.1.7",
|
|
44
|
+
"uuid": "^11.1.0",
|
|
45
|
+
"wao": "^0.41.1",
|
|
46
|
+
"zustand": "^5.0.3"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@ardrive/turbo-sdk": "^1.19.0",
|
|
50
|
+
"@playwright/test": "^1.49.1",
|
|
51
|
+
"arnext-arkb": "^0.0.1",
|
|
52
|
+
"cheerio": "^1.0.0",
|
|
53
|
+
"chai": "^5.1.2",
|
|
54
|
+
"cross-env": "^7.0.3",
|
|
55
|
+
"eslint": "8.57.1",
|
|
56
|
+
"eslint-config-next": "14.2.13",
|
|
57
|
+
"express": "^4.21.0",
|
|
58
|
+
"http-proxy-middleware": "^3.0.2",
|
|
59
|
+
"mocha": "^11.1.0",
|
|
60
|
+
"starknet": "^6.11.0"
|
|
61
|
+
}
|
|
62
|
+
}
|
package/app/pages/404.js
ADDED