devflow-kit 1.3.2 → 1.3.3
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 +11 -0
- package/dist/commands/init.js +26 -3
- package/dist/utils/post-install.d.ts +1 -1
- package/dist/utils/post-install.js +2 -9
- package/package.json +1 -1
- package/plugins/devflow-accessibility/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-ambient/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-audit-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-code-review/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-core-skills/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-debug/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-frontend-design/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-go/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-implement/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-java/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-python/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-react/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-resolve/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-rust/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-self-review/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-specify/.claude-plugin/plugin.json +1 -1
- package/plugins/devflow-typescript/.claude-plugin/plugin.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to DevFlow will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.3.3] - 2026-03-09
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **Sudo trust prompt** — Managed settings now shows a clear explanation, a copy-pasteable verification prompt, and an explicit fallback option before any password prompt
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- **Managed settings test coverage** — Unit tests for `installManagedSettings` two-stage write logic
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
8
18
|
## [1.3.2] - 2026-03-08
|
|
9
19
|
|
|
10
20
|
### Changed
|
|
@@ -830,6 +840,7 @@ devflow init
|
|
|
830
840
|
|
|
831
841
|
---
|
|
832
842
|
|
|
843
|
+
[1.3.3]: https://github.com/dean0x/devflow/compare/v1.3.2...v1.3.3
|
|
833
844
|
[1.3.2]: https://github.com/dean0x/devflow/compare/v1.3.1...v1.3.2
|
|
834
845
|
[1.3.1]: https://github.com/dean0x/devflow/compare/v1.3.0...v1.3.1
|
|
835
846
|
[1.3.0]: https://github.com/dean0x/devflow/compare/v1.2.0...v1.3.0
|
package/dist/commands/init.js
CHANGED
|
@@ -359,9 +359,32 @@ export const initCommand = new Command('init')
|
|
|
359
359
|
// Attempt managed settings write if user chose managed mode
|
|
360
360
|
let effectiveSecurityMode = securityMode;
|
|
361
361
|
if (securityMode === 'managed') {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
362
|
+
p.note('This writes a read-only security deny list to a system directory\n' +
|
|
363
|
+
'and may prompt for your password (sudo).\n\n' +
|
|
364
|
+
'Not sure about this? Paste this into another Claude Code session:\n\n' +
|
|
365
|
+
' "I\'m installing DevFlow and it wants to write a\n' +
|
|
366
|
+
' managed-settings.json file using sudo. Review the source\n' +
|
|
367
|
+
' at https://github.com/dean0x/devflow and tell me if\n' +
|
|
368
|
+
' it\'s safe."', 'Managed Settings');
|
|
369
|
+
const sudoChoice = await p.select({
|
|
370
|
+
message: 'Continue with managed settings?',
|
|
371
|
+
options: [
|
|
372
|
+
{ value: 'yes', label: 'Yes, continue', hint: 'May prompt for your password' },
|
|
373
|
+
{ value: 'no', label: 'No, fall back to settings.json', hint: 'Deny list stored in editable user settings instead' },
|
|
374
|
+
],
|
|
375
|
+
});
|
|
376
|
+
if (p.isCancel(sudoChoice)) {
|
|
377
|
+
p.cancel('Installation cancelled.');
|
|
378
|
+
process.exit(0);
|
|
379
|
+
}
|
|
380
|
+
if (sudoChoice === 'yes') {
|
|
381
|
+
const managed = await installManagedSettings(rootDir, verbose);
|
|
382
|
+
if (!managed) {
|
|
383
|
+
p.log.warn('Managed settings write failed — falling back to user settings');
|
|
384
|
+
effectiveSecurityMode = 'user';
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
365
388
|
effectiveSecurityMode = 'user';
|
|
366
389
|
}
|
|
367
390
|
}
|
|
@@ -28,7 +28,7 @@ export declare function mergeDenyList(existingJson: string, newDenyEntries: stri
|
|
|
28
28
|
*
|
|
29
29
|
* Strategy:
|
|
30
30
|
* 1. Try direct write (works if running as root or directory is writable)
|
|
31
|
-
* 2. If EACCES in TTY,
|
|
31
|
+
* 2. If EACCES in TTY, retry with sudo (caller is responsible for obtaining consent)
|
|
32
32
|
* 3. Returns true if managed settings were written, false if caller should fall back
|
|
33
33
|
*/
|
|
34
34
|
export declare function installManagedSettings(rootDir: string, verbose: boolean): Promise<boolean>;
|
|
@@ -67,7 +67,7 @@ export function mergeDenyList(existingJson, newDenyEntries) {
|
|
|
67
67
|
*
|
|
68
68
|
* Strategy:
|
|
69
69
|
* 1. Try direct write (works if running as root or directory is writable)
|
|
70
|
-
* 2. If EACCES in TTY,
|
|
70
|
+
* 2. If EACCES in TTY, retry with sudo (caller is responsible for obtaining consent)
|
|
71
71
|
* 3. Returns true if managed settings were written, false if caller should fall back
|
|
72
72
|
*/
|
|
73
73
|
export async function installManagedSettings(rootDir, verbose) {
|
|
@@ -118,17 +118,10 @@ export async function installManagedSettings(rootDir, verbose) {
|
|
|
118
118
|
return false;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
// Attempt 2: sudo (TTY only)
|
|
121
|
+
// Attempt 2: sudo (TTY only — sudo needs terminal for password prompt)
|
|
122
122
|
if (!process.stdin.isTTY) {
|
|
123
123
|
return false;
|
|
124
124
|
}
|
|
125
|
-
const confirmed = await p.confirm({
|
|
126
|
-
message: `Managed settings require admin access (${managedDir}). Use sudo?`,
|
|
127
|
-
initialValue: true,
|
|
128
|
-
});
|
|
129
|
-
if (p.isCancel(confirmed) || !confirmed) {
|
|
130
|
-
return false;
|
|
131
|
-
}
|
|
132
125
|
try {
|
|
133
126
|
execSync(`sudo mkdir -p '${managedDir}'`, { stdio: 'inherit' });
|
|
134
127
|
// Write via sudo tee to avoid shell quoting issues with the JSON content
|
package/package.json
CHANGED