Bumps version to 1.1.2. Adds --quiet/-q flag and WISPCTL_NO_PROGRESS=1 env var. Useful for CI/agents.
+35
-3
Diff
round #0
+1
-1
cli/commands/deploy.ts
+1
-1
cli/commands/deploy.ts
···
477
477
478
478
export async function deploy(agent: Agent, did: string, options: DeployOptions): Promise<{ uri: string; url: string }> {
479
479
const siteDir = options.path
480
-
const siteName = options.site || basename(siteDir)
480
+
const siteName = (options.site || basename(siteDir)).toLowerCase()
481
481
482
482
// Validate site name (AT Protocol rkey format)
483
483
if (!/^[a-zA-Z0-9._~:-]{1,512}$/.test(siteName)) {
+9
-1
cli/index.ts
+9
-1
cli/index.ts
···
142
142
}
143
143
}
144
144
145
-
program.name('wisp-cli').description('CLI for wisp.place - deploy static sites to the AT Protocol').version('1.1.1')
145
+
program.name('wisp-cli').description('CLI for wisp.place - deploy static sites to the AT Protocol').version('1.1.2')
146
+
.option('-q, --quiet', 'Suppress progress output — useful for CI/agents (also set via WISPCTL_NO_PROGRESS=1)')
146
147
147
148
// Deploy command (default)
148
149
program
···
557
558
}
558
559
})
559
560
561
+
// Set WISPCTL_NO_PROGRESS from --quiet flag before any command runs
562
+
program.hook('preAction', () => {
563
+
if (program.opts().quiet) {
564
+
process.env.WISPCTL_NO_PROGRESS = '1'
565
+
}
566
+
})
567
+
560
568
program.parse()
+24
cli/lib/progress.ts
+24
cli/lib/progress.ts
···
20
20
}
21
21
22
22
export function createSpinner(text: string): SpinnerLike {
23
+
// when no tty is attached or WISPCTL_NO_PROGRESS is set, return a silent spinner
24
+
if (!process.stdout.isTTY || process.env.WISPCTL_NO_PROGRESS === '1') {
25
+
let currentText = text
26
+
return {
27
+
get text() {
28
+
return currentText
29
+
},
30
+
set text(newText: string) {
31
+
currentText = newText
32
+
},
33
+
start() {
34
+
return this
35
+
},
36
+
succeed(message?: string) {
37
+
console.log(`✓ ${message ?? currentText}`)
38
+
return this
39
+
},
40
+
fail(message?: string) {
41
+
console.error(`✗ ${message ?? currentText}`)
42
+
return this
43
+
},
44
+
}
45
+
}
46
+
23
47
const s = spinner()
24
48
let currentText = text
25
49
let started = false