You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(cli): mieweb target via @mieweb/os-cloud-provider - #15
Wires the opensource-server provider (@mieweb/os-cloud-provider, from mieweb/opensource-server#484, released to npmjs as 2026.10.3) into @mieweb/cli. Rebased onto main after #14 merged, and squashed into one commit.
Changes
--target mieweb uses the built-in provider @mieweb/os-cloud-provider@^2026.10.3, a regular dependency installed from npmjs. deploy, destroy, tail, login, logout and whoami go through it. Its default image is the matching release, ghcr.io/mieweb/opensource-server/cloud:v2026.10.3.
Fallback: commands the provider doesn't implement (dev) run on the Node host harness instead of erroring with "does not implement".
DeployContext.persistTargetConfig: a provider can save settings it resolved interactively to mieweb.jsonc. For example, the provider prompts for an os.mieweb.org site and saves it. The CLI edits the file with jsonc-parser, keeping comments, and refuses secret-looking keys.
mieweb init adds "start": "mieweb --target mieweb dev", which the cloud image's app.service runs. The host harness listens on $PORT when it's set.
Removed pr-preview.yml: it published PR builds to GitHub Packages for testing across repos while the contract and provider were unreleased. Both are now on npmjs.
Tests for provider resolution, the fallback and write-back; README, config schema and changesets updated.
Verified
CI-equivalent run locally: typecheck, all tests, and pnpm check:packs, which confirms no workspace: ranges in the packed tarballs.
Clean install: the CLI was packed with pnpm pack and installed into an empty project with npm i <tgz> --userconfig /dev/null (npmjs only, no token). The provider 2026.10.3 and @mieweb/*@0.3.1 all resolved from npmjs.
Without credentials, mieweb whoami returns "Not authenticated — provider opensource-server", and deploy with a bad token gives the login hint.
With a real API key, whoami against manager.os.mieweb.org returns "Authenticated as rgingras".
A full deploy → browser check → tail → redeploy → destroy run against manager.os.mieweb.org was done earlier with the preview builds of this code; see the PR history.
Missing wrangler: with wrangler not installed, wrangler-delegated commands on the cloudflare target used to end in a stack trace (a regression from feat(deploy): provider contract + wrangler reference provider #14). They now print mieweb: wrangler binary not found… and exit 1.
mieweb --version: prints the mieweb version and exits 0 on every target. Before, it printed an error after the version on non-cloudflare targets.
Three tests; patch changeset cli-missing-wrangler.
- built-in provider for --target mieweb: @mieweb/os-cloud-provider ^2026.10.3 (npmjs)
- verbs a provider doesn't implement (dev) fall back to the Node host harness
- DeployContext.persistTargetConfig: write resolved settings (e.g. the picked
site) back into mieweb.jsonc, keeping comments (jsonc-parser)
- mieweb init adds a start script for the cloud image; the host harness honors $PORT
- remove the GitHub Packages preview workflow (cross-repo previews are no longer needed)
- engines: node >=22.18 (required by @mieweb/os-cloud-provider)
- only dev/tail fall back to the legacy path when a provider lacks them;
login/logout/whoami/destroy keep runProviderVerb's explanations
- mieweb init: depend on this CLI's release and on @libsql/client + ioredis,
which the generated mieweb bindings (and npm start on the cloud image) need
- persistTargetConfig: refuse secret-looking keys anywhere in the patch,
including nested objects/arrays and access-key names
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The generated start script depends on a CLI omitted by production-only installs.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Declare @mieweb/cli as a production dependency
packages/cli/src/init.mjs:119
The new start script invokes mieweb at runtime, but the scaffold declares @mieweb/cli only as a devDependency. A production-only install (npm ci --omit=dev) therefore omits the executable required by npm start, causing startup to fail with mieweb: not found. Move @mieweb/cli into dependencies and update the scaffold test to check its runtime dependency entry.
The reason will be displayed to describe this comment to others. Learn more.
🟢 Approval recommended
The changes address prior feedback, include regression coverage for the main integration paths, and have no unresolved review findings.
No open issues 🎉
1 file not reviewed
pnpm-lock.yaml: Generated file
Review effort: Balanced
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
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.
Wires the opensource-server provider (
@mieweb/os-cloud-provider, from mieweb/opensource-server#484, released to npmjs as2026.10.3) into@mieweb/cli. Rebased ontomainafter #14 merged, and squashed into one commit.Changes
--target miewebuses the built-in provider@mieweb/os-cloud-provider@^2026.10.3, a regular dependency installed from npmjs.deploy,destroy,tail,login,logoutandwhoamigo through it. Its default image is the matching release,ghcr.io/mieweb/opensource-server/cloud:v2026.10.3.dev) run on the Node host harness instead of erroring with "does not implement".DeployContext.persistTargetConfig: a provider can save settings it resolved interactively tomieweb.jsonc. For example, the provider prompts for an os.mieweb.org site and saves it. The CLI edits the file withjsonc-parser, keeping comments, and refuses secret-looking keys.mieweb initadds"start": "mieweb --target mieweb dev", which the cloud image'sapp.serviceruns. The host harness listens on$PORTwhen it's set.pr-preview.yml: it published PR builds to GitHub Packages for testing across repos while the contract and provider were unreleased. Both are now on npmjs.Verified
pnpm check:packs, which confirms noworkspace:ranges in the packed tarballs.pnpm packand installed into an empty project withnpm i <tgz> --userconfig /dev/null(npmjs only, no token). The provider2026.10.3and@mieweb/*@0.3.1all resolved from npmjs.mieweb whoamireturns "Not authenticated — provider opensource-server", anddeploywith a bad token gives the login hint.whoamiagainst manager.os.mieweb.org returns "Authenticated as rgingras".Also fixed (folded in from #18)
mieweb: wrangler binary not found…and exit 1.mieweb --version: prints the mieweb version and exits 0 on every target. Before, it printed an error after the version on non-cloudflare targets.cli-missing-wrangler.