fix(temps-cli): per-instance default project, static deploy in up, and full build logs#153
Closed
dviejokfs wants to merge 5 commits into
Closed
fix(temps-cli): per-instance default project, static deploy in up, and full build logs#153dviejokfs wants to merge 5 commits into
up, and full build logs#153dviejokfs wants to merge 5 commits into
Conversation
…n up wizard Scope the default project to the active CLI context instead of a single global key, so a project created on one Temps server no longer leaks as the default on another (which 404'd with "Using project X (from global-config)"). Resolution now reads the active context's defaultProject before the legacy global key, which drains over time. create/delete/configure write through the new setDefaultProject helper. Make `temps up` fall back to the setup wizard when a resolved-but-stale default 404s (instead of dead-ending), unless the slug came from an explicit --project. Add a first-class Static deploy option to the up wizard: source_type static_files + project_type static (preset stays the valid `dockerfile` placeholder), auto-detects the build-output folder (dist/build/out/...) via detectStaticDir and always lets the user pick a custom folder, then uploads via deployStatic. New --static / --static-dir flags. Fixes static sites being wrongly routed through the Docker-image manual path.
The local-image build piped every line of Docker output into a single rewriting spinner (`Building: <first 60 chars>`), so the per-step BuildKit log was never shown — users only saw whatever line the spinner landed on (e.g. "#25 exporting layers"). BuildKit's default `auto` renderer also collapses to terse output on a non-TTY pipe. Force `--progress=plain` (+ BUILDKIT_PROGRESS=plain) and stream each build line to the terminal, dimmed and indented, instead of a spinner. Quiet/--json mode stays silent. Affects both `deploy:local-image` and the `up` manual path.
Contributor
Author
|
Superseded by #154 — re-homed onto a correctly-named branch ( |
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.
Summary
A batch of
@temps-sdk/clifixes and improvements, all scoped toapps/temps-cli/. Bumps the CLI to 0.1.28.1. Default project is now scoped per instance
Previously
defaultProjectlived in a single global config key with no instance association, whileapiUrlwas already context-aware. So a project created on one Temps server leaked as the default on another and 404'd:defaultProjectnow lives on the active CLI context (~/.temps/.contexts.json). A new instance starts with no default.context-default) before the legacy global key (kept for back-compat, drains over time).create/delete/configure get|set defaultProjectall write through the newsetDefaultProjecthelper.2.
temps upfalls back to the create wizard on a stale defaultWhen a resolved-but-stale slug 404s,
upnow runs the setup wizard (offers to create) instead of dead-ending on a 404 — unless the slug came from an explicit--projectflag.3. Static deploy support in the
upwizardStatic sites were being routed through the Docker-image manual path (Dockerfile generation), which made no sense for a pre-built folder.
source_type: static_files,project_type: static(preset stays the validdockerfileplaceholder;staticis only a local detection label, not an API preset — this was theInvalid preset: staticerror).detectStaticDir()auto-detects the build-output folder (dist/build/out/public/_site/output, or a rootindex.html), and the wizard always lets you pick a custom folder.--static/--static-dirflags. Uploads viadeployStatic.4. Full Docker build logs instead of one spinner line
The local-image build funneled every output line into a single rewriting spinner, so the per-step BuildKit log was lost — you'd only see e.g.
#25 exporting layers.--progress=plain(+BUILDKIT_PROGRESS=plain) and stream each build line to the terminal (dimmed/indented). Quiet/--jsonmode stays silent.deploy:local-imageand theupmanual path.Testing
bun run typecheck: zero errors in touched files (14 pre-existing errors remain in untouchedenv-sync/environments/providers/notifications).detect-project.test.ts(6 tests fordetectStaticDir) + existingcontexts.test.ts→ 15 pass, 0 fail.--progress=plainverified to stream the full step log on a realdocker build.Note
This is the
@temps-sdk/clinpm package — changes take effect forbunx @temps-sdk/clionly after publishing 0.1.28 to npm.