promptlike 0.12.0 → 0.12.1
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 +7 -0
- package/dist/lib/importShared.js +4 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.12.1 — 2026-10-30
|
|
4
|
+
|
|
5
|
+
- **Fix: `ple import` exits 1 when nothing was imported because it could not ask.** Run without a terminal (a script,
|
|
6
|
+
a pipe) and without `--all`, `ple import github:…` and `ple import ple:<user>/<repo>` printed the hint and exited 0,
|
|
7
|
+
so a script could not tell it from success. They now exit 1. Cancelling a pick on a terminal is your own choice and
|
|
8
|
+
stays 0; `--all` and `--dry-run` are unchanged.
|
|
9
|
+
|
|
3
10
|
## 0.12.0 — 2026-10-30
|
|
4
11
|
|
|
5
12
|
- **New: `ple visibility <prompt> public|private`** and **`ple visibility --all --project <repo> public|private`.**
|
package/dist/lib/importShared.js
CHANGED
|
@@ -108,7 +108,8 @@ function freeSlug(title) {
|
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
110
|
* Which of `rows` to import: all with `--all`, a pick on a terminal, nothing
|
|
111
|
-
* (with a hint) otherwise. Returns null when nothing was chosen.
|
|
111
|
+
* (with a hint, and exit code 1) otherwise. Returns null when nothing was chosen.
|
|
112
|
+
* Cancelling a pick on a terminal is the user's own choice and stays exit code 0.
|
|
112
113
|
*/
|
|
113
114
|
async function chooseRows(rows, all, deps) {
|
|
114
115
|
if (all)
|
|
@@ -116,6 +117,8 @@ async function chooseRows(rows, all, deps) {
|
|
|
116
117
|
const interactive = deps.isTTY ?? Boolean(process.stdin.isTTY && process.stdout.isTTY);
|
|
117
118
|
if (!interactive) {
|
|
118
119
|
console.log(format_1.c.muted(`\nNot a terminal — re-run with --all to import these ${rows.length}, or --dry-run to only look.`));
|
|
120
|
+
// Nothing was imported and nobody could be asked: a script must be able to tell this from success.
|
|
121
|
+
process.exitCode = 1;
|
|
119
122
|
return null;
|
|
120
123
|
}
|
|
121
124
|
const answer = await (deps.ask ?? defaultAsk)(`\nImport which? [all | 1,3-5 | Enter to cancel]: `);
|
package/package.json
CHANGED