@haus-tech/haus-workflow 0.19.0 → 0.20.0
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.20.0](https://github.com/WeAreHausTech/haus-workflow/compare/v0.19.0...v0.20.0) (2026-06-11)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- **clone:** enhance user confirmation prompts before cloning repositories ([#93](https://github.com/WeAreHausTech/haus-workflow/issues/93)) ([1f3e6b4](https://github.com/WeAreHausTech/haus-workflow/commit/1f3e6b4c4e97b2ab7b979ab4fbcab8ce6cda3f32))
|
|
8
|
+
|
|
3
9
|
## [0.19.0](https://github.com/WeAreHausTech/haus-workflow/compare/v0.18.2...v0.19.0) (2026-06-11)
|
|
4
10
|
|
|
5
11
|
### Features
|
|
@@ -2,6 +2,8 @@ Clone repositories for this project. Per-repo setup (install, Docker, `.env`) is
|
|
|
2
2
|
|
|
3
3
|
Cloning a single repo is always `haus clone <url> [dir]`. This command picks _which_ repos to clone and runs that primitive for each. There are two modes, chosen by whether a name was given.
|
|
4
4
|
|
|
5
|
+
**Always ask before cloning — never assume.** The user may already have the repos on disk. Do not start cloning until they have confirmed. A missing `repos.local.json` does **not** mean they want a fresh clone; it just means nothing is recorded yet — you must still ask.
|
|
6
|
+
|
|
5
7
|
## Mode A — a project name was given (`project:clone <name>`)
|
|
6
8
|
|
|
7
9
|
Find one repo by name on GitHub and clone it. Does **not** require a workspace or `repos.manifest.json`.
|
|
@@ -13,9 +15,9 @@ Find one repo by name on GitHub and clone it. Does **not** require a workspace o
|
|
|
13
15
|
If that returns nothing, retry **without** `--owner` (a broader, all-of-GitHub search) and tell the user you widened it.
|
|
14
16
|
4. Decide from the results:
|
|
15
17
|
- **0 matches** — tell the user nothing matched `<name>`; offer to try a different name or broaden. Stop.
|
|
16
|
-
- **1 match** — show `fullName` + description and
|
|
18
|
+
- **1 match** — show `fullName` + description and ask the user to confirm before cloning.
|
|
17
19
|
- **2+ matches** — use `AskUserQuestion` to let the user pick which repo (list each `fullName` with its description; private repos noted). Include a final option like "None of these — search again / broaden" so they can refine.
|
|
18
|
-
5.
|
|
20
|
+
5. Once the user has confirmed both the repo and where it should land, clone it with `haus clone <url> [dir]` using the `url` from the search result (default target is a folder named after the repo under the current directory). Quote the exact command first.
|
|
19
21
|
6. Report the result (cloned / skipped if already present / failed). Remind the user that installing dependencies and configuring the repo is still a manual step for now.
|
|
20
22
|
|
|
21
23
|
## Mode B — no name was given (`project:clone`)
|
|
@@ -24,9 +26,11 @@ Clone a whole **workspace** from its manifest. Workspace-only (a `repos.manifest
|
|
|
24
26
|
|
|
25
27
|
1. Confirm `repos.manifest.json` exists at the workspace root. If not, tell the user this mode is for multi-repo workspaces (or they can pass a `<name>` to clone a single repo) and stop.
|
|
26
28
|
2. Read `repos.manifest.json`. Each entry has an `id`, a `folder`, and a git URL (`repo`). If entries have no `repo` URL, ask the user to add them (or supply the URLs) — `haus clone` needs a URL per repo.
|
|
27
|
-
3. Read `repos.local.json` if present — its `pathOverrides` map (`folder` → absolute path) marks repos the user already has locally.
|
|
28
|
-
4.
|
|
29
|
+
3. Read `repos.local.json` if present — its `pathOverrides` map (`folder` → absolute path) marks repos the user already has locally and does not want re-cloned.
|
|
30
|
+
4. **Always ask first**, via `AskUserQuestion` — never skip this, even when `repos.local.json` is absent or every repo is missing locally:
|
|
29
31
|
- **Clean clone** — clone every manifest repo fresh into its `folder` under the workspace.
|
|
30
|
-
- **
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
- **I already have some or all of them** — the user has clones elsewhere on disk. Ask where they live, then for each repo found there, record it in `repos.local.json` `pathOverrides` (`folder` → absolute path) so it's reused instead of cloned; clone only the repos that aren't found. (You can match by folder name under the directory they give, confirming each.)
|
|
33
|
+
- **Cancel** — do nothing.
|
|
34
|
+
5. Show the concrete plan before touching anything: list which repos will be cloned (and into which `folder`) and which will be reused/skipped. Get a final go-ahead.
|
|
35
|
+
6. For each repo to clone, run (quoting it first): `haus clone <repo-url> <folder>` from the workspace root. Offer `--dry-run` first if the user wants a preview. If one repo fails, report it and continue to the next.
|
|
36
|
+
7. After the loop, report which repos were cloned, reused (local), skipped (already present), and failed. Remind the user that installing dependencies and configuring each repo (`.env`, services) is still a manual step for now.
|