zapdev 1.7.0 → 1.8.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/README.md +5 -3
- package/dist/cli.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -131,18 +131,20 @@ zapdev commit
|
|
|
131
131
|
| `-s, --staged` | Commit only changes that are already staged |
|
|
132
132
|
| `-r, --rebase` | Rebase on upstream if the push is rejected |
|
|
133
133
|
| `-m, --merge` | Merge upstream if the push is rejected |
|
|
134
|
-
| `-y, --yes` | Skip
|
|
134
|
+
| `-y, --yes` | Skip commit review; still confirm push unless `--push` is set |
|
|
135
135
|
|
|
136
136
|
```bash
|
|
137
137
|
zapdev commit -t feat # force the type
|
|
138
138
|
zapdev commit --staged # leave unstaged changes untouched
|
|
139
|
+
zapdev commit -y # commit automatically, then ask before pushing
|
|
140
|
+
zapdev commit -yp # commit and push without confirmation
|
|
139
141
|
```
|
|
140
142
|
|
|
141
143
|
Before contacting the LLM endpoint, zapdev runs `gitleaks git --staged --verbose` in each changed repository when Gitleaks is installed. A failed scan skips that repository without sending its diff; when Gitleaks is absent, the scan is skipped. The staged diff is sent to the configured endpoint, which may be remote.
|
|
142
144
|
|
|
143
145
|
Failures are reported per repository while the others continue. Any failure produces a nonzero exit code.
|
|
144
146
|
|
|
145
|
-
In a terminal, Git and its hooks display live logs and support native prompts, even with `--yes` (which
|
|
147
|
+
In a terminal, Git and its hooks display live logs and support native prompts, even with `--yes` (which skips commit review, not native Git prompts). Git controls hook stdin; interactive hooks should read from the terminal, for example `/dev/tty`. Each hook has a 60-second deadline, including time spent answering prompts; override it with `ZD_HOOK_TIMEOUT=120 zapdev commit`.
|
|
146
148
|
|
|
147
149
|
Pushing is optimistic, with no preliminary fetch. If the branch is behind upstream, `--rebase` runs `git pull --rebase`, while `--merge` runs `git pull --no-rebase --no-edit`; zapdev then retries once. Without either flag, interactive runs ask whether to rebase, merge, or quit. Runs using `--yes` or without a TTY must provide one of the flags.
|
|
148
150
|
|
|
@@ -166,7 +168,7 @@ Place an optional `zapdev.json` in the directory where you launch zapdev:
|
|
|
166
168
|
- **Publication:** fetch each remote's `main`, split committed contents, skip contents identical to `main`, then push without force. Uncommitted changes are excluded.
|
|
167
169
|
- **Failures:** stop that repository's publication, leaving earlier publications intact; other repositories continue. No automatic rebase/merge recovery.
|
|
168
170
|
|
|
169
|
-
Interactive runs still ask for confirmation
|
|
171
|
+
Interactive runs still ask for confirmation, including with `--yes`; `--push` publishes without asking. Without a TTY, `--yes` alone does not publish.
|
|
170
172
|
|
|
171
173
|
```bash
|
|
172
174
|
zapdev commit --publish-subtree # ask to publish after committing
|
package/dist/cli.js
CHANGED
|
@@ -554,7 +554,7 @@ function _getBuiltinFlags(long, short, userNames, userAliases) {
|
|
|
554
554
|
// package.json
|
|
555
555
|
var package_default = {
|
|
556
556
|
name: "zapdev",
|
|
557
|
-
version: "1.
|
|
557
|
+
version: "1.8.0",
|
|
558
558
|
description: "Fast, performant and lightweight git chores and dev tools using your terminal and an OpenAI-compatible LLM endpoint.",
|
|
559
559
|
type: "module",
|
|
560
560
|
bin: {
|
|
@@ -2538,7 +2538,7 @@ var commitCommand = defineCommand({
|
|
|
2538
2538
|
yes: {
|
|
2539
2539
|
type: "boolean",
|
|
2540
2540
|
alias: "y",
|
|
2541
|
-
description: "Skip
|
|
2541
|
+
description: "Skip commit review; still confirm push unless --push is set."
|
|
2542
2542
|
}
|
|
2543
2543
|
},
|
|
2544
2544
|
async run({ args }) {
|
|
@@ -2639,7 +2639,7 @@ var commitCommand = defineCommand({
|
|
|
2639
2639
|
}
|
|
2640
2640
|
if (committed.length === 0) return;
|
|
2641
2641
|
let shouldPush = Boolean(args.push);
|
|
2642
|
-
if (!shouldPush && interactive
|
|
2642
|
+
if (!shouldPush && interactive) {
|
|
2643
2643
|
const answer = await confirm({
|
|
2644
2644
|
message: `${publishSubtreeMode ? "Publish subtrees in" : "Push"} ${committed.map(({ label }) => label).join(", ")}?`,
|
|
2645
2645
|
initialValue: false
|