feat: @polkadot-apps/cli#75
Open
charlesHetterich wants to merge 51 commits intomainfrom
Open
Conversation
Contributor
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
…ucture - Commander.js CLI at `apps/cli/` installing as `dot`, with --help and --version - `pnpm cli:install` compiles standalone binary to ~/.dot/bin/dot via bun and configures PATH - Release workflow extended: compiles 4 platform binaries and creates GitHub Release with them - `install.sh` for end-user installation from GitHub Releases - Turbo, workspace, and catalog wired up for the new `apps/` directory
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
@polkadot-apps/cli
…info, update - Remove: new, publish, search, setup, account, template - Add: build (native contract+frontend detection), test (vitest+cargo), update (self-update from GitHub Releases) - Rewrite init: toolchain setup (Rust nightly, cargo-pvm-contract, gh CLI), QR auth stubbed - Rewrite deploy: unified pipeline with --playground flag (absorbs old publish/ship) - Rewrite remix: interactive app picker when no domain given, --quest flag stubbed
…ly only preview is available)
…l` packageaimplement QR login in dot init via @polkadot-apps/terminal - Real QR code pairing + on-chain attestation via host-papp SDK - Sessions persist to ~/.polkadot-apps/, subsequent runs skip QR - Add @polkadot-apps/terminal (temporary file: link) and ws dependencies - Root postinstall patches verifiablejs WASM for bun compatibility - Skip cdm postinstall if .cdm/ already exists - Update CLAUDE.md with current CLI command reference - contracts/wrap.ts: retry queries with dev fallback origin for unmapped accounts
…yground registry - Use bulletin-deploy library API instead of shelling out to npx (pass QR signer for DotNS) - Read playground metadata from package.json playground:* fields instead of dot.json - Signing mutex ensures QR session handles one request at a time while transactions confirm in parallel - Add spinner done state tracking for parallel operation error handling
… in code coverage report
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
…ent on all macos versions)
…ploy command to use mobile signing
… bun is broken. so we need to make releases using mac runners until this is fixed in bun
# Conflicts: # pnpm-lock.yaml
- Fix deploy ignoring dot.json: loadPlaygroundConfig now falls back to dot.json when package.json playground:* fields are missing, fixing the remix→deploy workflow - Fix command injection: replace shell string interpolation with execFileSync for cdm deploy (--suri) and git clone (repo/branch) - Fix --suri ignored for frontend deploy: bulletin-deploy now receives the already-resolved signer when --suri is set - Fix connection leak: lift conn to top-level try/finally in deploy - Fix only paseo works: remove polkadot/preview-net from CHAINS and CHAIN_TO_ENV since they're not available in chain-client presets - Remove dead code: strip unused assetHub/bulletin URLs from config.ts - Consolidate WebSocket polyfill into shared polyfill.ts with guard - Import CLI version from package.json (single source of truth) - Share detectPackageManager/hasContracts/getBuildCommand via project.ts - Fix build/deploy hardcoding pnpm: detect package manager dynamically - Fix init.ts early process.exit: doQrLogin returns boolean instead - Fix info.ts process.exit in finally block - Improve remix domain randomness: crypto.randomBytes (16M options vs 100) - Add comments to empty catch blocks for debuggability
Extract all toolchain checks (rustup, nightly, rust-src, cdm, IPFS) into ensureToolchain() in project.ts. Called automatically at the start of deploy, build, and remix commands — silent when everything is installed, shows real install output (stdio: inherit) when installing. - dot init: verbose mode with checkmarks per tool - dot deploy/build/remix: quiet mode, only prints during installs - IPFS: auto-install via brew (macOS) or official tarball, auto-init - All install commands use stdio: inherit for visible progress - Exclude apps/cli/** from coverage thresholds
- Pass Alice as defaultOrigin to ContractManager so read-only queries don't spam "[contracts] No origin configured" warnings on every call - Add process.exit(0) at end of remix to prevent Bun stream cleanup crash (TypeError: undefined is not an object at handleResult)
…ip-contract into --contracts for inclusion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #69
Ports the CLI from playground-app/cli into
apps/cli/, rebuilt on top of@polkadot-apps/*packages with QR mobile signing via@polkadot-apps/terminal.Commands re-interpreted according to the requirements doc.
Installs as
dot. Compiled to a standalone binary viabun build --compileand distributed through GitHub Releases.Commands
dot initdot deploy--playground)dot builddot remixdot remix <domain>dot info <domain>dot updateKey integration points
dot initpairs with the Polkadot mobile wallet via@polkadot-apps/terminal. Session persists to~/.polkadot-apps/, subsequent runs skip QR.dot deploy --playgroundsigns registry transactions via the paired mobile wallet. Signing requests are serialized through a mutex so the QR session handles one at a time while transactions confirm in parallel.bulletin-deploylibrary API (not shelled out). Storage uses the pool signer, DotNS domain registration uses the QR signer.package.jsonfields (playground:domain,playground:name,playground:description,playground:tag,playground:icon,playground:branch) instead ofdot.json.@polkadot-apps/chain-client(getChainAPI) with@polkadot-apps/contracts(ContractManager) for registry contract calls. Best-block viaatBest: trueInkSdk.--suri //Alice(dev) →~/.polkadot/accounts.json(legacy mnemonic fallback).Infrastructure
apps/workspace directory added alongsidepackages/andexamples/apps/install.shfor end-user installation from GitHub Releases (usesghfor private repo auth)pnpm cli:installfor local dev (compiles binary to~/.polkadot/bin/dot)cli-dev-release.ymlworkflow for testing releases from this branchTests
In-source tests for all utility functions across CLI files (config, connection, project, ui, and command helpers). Command orchestrators are excluded from coverage via config since Istanbul can't selectively ignore chained Commander expressions. 922 tests, all passing.
Before Merging
Depends on two external PRs being merged and published:
@polkadot-apps/terminal— rh-terminal PR. Once merged, the terminal package becomes a workspace package.bulletin-deploy— Add Mobile Signer. Addssigner/signerAddressoptions for QR signing in DotNS operations.Once those land, the following temporary items in this PR need to be updated:
apps/cli/package.json: Change"@polkadot-apps/terminal": "file:..."→"workspace:*"apps/cli/package.json: Change"bulletin-deploy": "file:..."→ published npm versionpackage.json: Remove the rootpostinstallthat runspatch-wasm.sh(terminal's own postinstall handles it as a workspace package).github/workflows/cli-dev-release.yml: Delete this temporary dev release workflow