@forgeailab/spark 0.3.0 → 0.4.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/package.json +2 -2
- package/src/commands/add.ts +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgeailab/spark",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "CLI for managing feature packs in an spark-scaffolded project.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"typecheck": "tsc --noEmit"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@forgeailab/spark-schema": "0.
|
|
26
|
+
"@forgeailab/spark-schema": "0.4.1",
|
|
27
27
|
"@clack/prompts": "latest",
|
|
28
28
|
"citty": "latest",
|
|
29
29
|
"picocolors": "latest",
|
package/src/commands/add.ts
CHANGED
|
@@ -236,6 +236,14 @@ export async function runAdd(requestedPacks: readonly string[], options: AddOpti
|
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
if (!options.yes) {
|
|
239
|
+
if (!process.stdin.isTTY) {
|
|
240
|
+
throw new Error(
|
|
241
|
+
'spark add needs interactive confirmation but stdin is not a TTY. ' +
|
|
242
|
+
'Re-run with --yes. Non-interactive callers (the /scaffold and /pack-add flows, ' +
|
|
243
|
+
'CI, or any agent-spawned process) must pass --yes — they gate approval before invoking add.',
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
|
|
239
247
|
const accepted = await confirm({
|
|
240
248
|
message: `Install ${plan.packs.map((pack) => pack.name).join(', ')}?`,
|
|
241
249
|
initialValue: false,
|