ccmanager 3.5.1 → 3.5.2

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.
Files changed (60) hide show
  1. package/dist/cli.js +3 -2
  2. package/dist/components/App.d.ts +1 -0
  3. package/dist/components/App.js +17 -39
  4. package/dist/components/App.test.js +12 -44
  5. package/dist/components/Configuration.js +10 -15
  6. package/dist/components/ConfigureCommand.js +18 -106
  7. package/dist/components/ConfigureCustomCommand.js +2 -17
  8. package/dist/components/ConfigureOther.js +5 -23
  9. package/dist/components/ConfigureOther.test.js +7 -31
  10. package/dist/components/ConfigureShortcuts.js +4 -31
  11. package/dist/components/ConfigureStatusHooks.js +5 -44
  12. package/dist/components/ConfigureStatusHooks.test.js +7 -31
  13. package/dist/components/ConfigureTimeout.js +2 -14
  14. package/dist/components/ConfigureWorktree.js +4 -47
  15. package/dist/components/ConfigureWorktreeHooks.js +5 -37
  16. package/dist/components/ConfigureWorktreeHooks.test.js +8 -33
  17. package/dist/components/Confirmation.js +9 -21
  18. package/dist/components/CustomCommandSummary.js +2 -5
  19. package/dist/components/DeleteConfirmation.js +10 -47
  20. package/dist/components/DeleteWorktree.js +14 -42
  21. package/dist/components/DeleteWorktree.test.js +6 -6
  22. package/dist/components/LoadingSpinner.js +3 -6
  23. package/dist/components/LoadingSpinner.test.js +22 -22
  24. package/dist/components/Menu.d.ts +1 -0
  25. package/dist/components/Menu.js +10 -42
  26. package/dist/components/Menu.recent-projects.test.js +8 -8
  27. package/dist/components/Menu.test.js +10 -10
  28. package/dist/components/MergeWorktree.js +16 -88
  29. package/dist/components/MergeWorktree.test.js +5 -5
  30. package/dist/components/NewWorktree.js +25 -105
  31. package/dist/components/NewWorktree.test.js +8 -8
  32. package/dist/components/PresetSelector.js +3 -9
  33. package/dist/components/ProjectList.js +9 -38
  34. package/dist/components/ProjectList.recent-projects.test.js +7 -7
  35. package/dist/components/ProjectList.test.js +37 -37
  36. package/dist/components/RemoteBranchSelector.js +2 -21
  37. package/dist/components/RemoteBranchSelector.test.js +8 -8
  38. package/dist/components/TextInputWrapper.d.ts +5 -0
  39. package/dist/components/TextInputWrapper.js +138 -11
  40. package/dist/contexts/ConfigEditorContext.d.ts +1 -1
  41. package/dist/contexts/ConfigEditorContext.js +3 -2
  42. package/dist/services/autoApprovalVerifier.js +1 -8
  43. package/dist/services/bunTerminal.js +41 -136
  44. package/dist/services/config/configEditor.js +2 -12
  45. package/dist/services/config/globalConfigManager.js +4 -24
  46. package/dist/services/config/projectConfigManager.js +3 -18
  47. package/dist/services/globalSessionOrchestrator.js +3 -12
  48. package/dist/services/globalSessionOrchestrator.test.js +1 -8
  49. package/dist/services/projectManager.js +13 -68
  50. package/dist/services/sessionManager.effect.test.js +9 -37
  51. package/dist/services/sessionManager.js +3 -18
  52. package/dist/services/sessionManager.test.js +9 -37
  53. package/dist/services/shortcutManager.js +7 -13
  54. package/dist/services/worktreeConfigManager.js +3 -8
  55. package/dist/services/worktreeService.js +2 -12
  56. package/dist/types/index.js +4 -12
  57. package/dist/utils/logger.js +12 -33
  58. package/dist/utils/mutex.js +3 -18
  59. package/dist/utils/worktreeUtils.js +3 -3
  60. package/package.json +12 -12
@@ -3,16 +3,15 @@ import * as path from 'path';
3
3
  import { format } from 'util';
4
4
  import os from 'os';
5
5
  /**
6
- * Log level enum for structured logging
6
+ * Log level constants for structured logging
7
7
  */
8
- var LogLevel;
9
- (function (LogLevel) {
10
- LogLevel["DEBUG"] = "DEBUG";
11
- LogLevel["INFO"] = "INFO";
12
- LogLevel["WARN"] = "WARN";
13
- LogLevel["ERROR"] = "ERROR";
14
- LogLevel["LOG"] = "LOG";
15
- })(LogLevel || (LogLevel = {}));
8
+ const LogLevel = {
9
+ DEBUG: 'DEBUG',
10
+ INFO: 'INFO',
11
+ WARN: 'WARN',
12
+ ERROR: 'ERROR',
13
+ LOG: 'LOG',
14
+ };
16
15
  /**
17
16
  * CLI-optimized logger with size management and rotation
18
17
  *
@@ -25,31 +24,11 @@ var LogLevel;
25
24
  * - Sensitive information filtering on console output
26
25
  */
27
26
  class Logger {
27
+ logFile;
28
+ config;
29
+ writeQueue = [];
30
+ isWriting = false;
28
31
  constructor(config = {}) {
29
- Object.defineProperty(this, "logFile", {
30
- enumerable: true,
31
- configurable: true,
32
- writable: true,
33
- value: void 0
34
- });
35
- Object.defineProperty(this, "config", {
36
- enumerable: true,
37
- configurable: true,
38
- writable: true,
39
- value: void 0
40
- });
41
- Object.defineProperty(this, "writeQueue", {
42
- enumerable: true,
43
- configurable: true,
44
- writable: true,
45
- value: []
46
- });
47
- Object.defineProperty(this, "isWriting", {
48
- enumerable: true,
49
- configurable: true,
50
- writable: true,
51
- value: false
52
- });
53
32
  this.config = {
54
33
  maxSizeBytes: config.maxSizeBytes ?? 5 * 1024 * 1024, // 5MB default
55
34
  maxRotatedFiles: config.maxRotatedFiles ?? 3,
@@ -3,25 +3,10 @@
3
3
  * Provides exclusive access to wrapped data through async locking.
4
4
  */
5
5
  export class Mutex {
6
+ data;
7
+ locked = false;
8
+ waitQueue = [];
6
9
  constructor(initialData) {
7
- Object.defineProperty(this, "data", {
8
- enumerable: true,
9
- configurable: true,
10
- writable: true,
11
- value: void 0
12
- });
13
- Object.defineProperty(this, "locked", {
14
- enumerable: true,
15
- configurable: true,
16
- writable: true,
17
- value: false
18
- });
19
- Object.defineProperty(this, "waitQueue", {
20
- enumerable: true,
21
- configurable: true,
22
- writable: true,
23
- value: []
24
- });
25
10
  this.data = initialData;
26
11
  }
27
12
  /**
@@ -39,14 +39,14 @@ export function generateWorktreeDirectory(projectPath, branchName, pattern) {
39
39
  case 'branch':
40
40
  case 'branch-name':
41
41
  // Sanitize branch name for filesystem
42
- sanitizedBranch ?? (sanitizedBranch = branchName
42
+ sanitizedBranch ??= branchName
43
43
  .replace(/\//g, '-') // Replace forward slashes with dashes
44
44
  .replace(/[^a-zA-Z0-9-_.]+/g, '') // Remove special characters except dash, dot, underscore
45
45
  .replace(/^-+|-+$/g, '') // Remove leading/trailing dashes
46
- .toLowerCase()); // Convert to lowercase for consistency
46
+ .toLowerCase(); // Convert to lowercase for consistency
47
47
  return sanitizedBranch;
48
48
  case 'project':
49
- projectName ?? (projectName = getGitRepositoryName(projectPath));
49
+ projectName ??= getGitRepositoryName(projectPath);
50
50
  return projectName;
51
51
  default:
52
52
  return placeholder;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccmanager",
3
- "version": "3.5.1",
3
+ "version": "3.5.2",
4
4
  "description": "TUI application for managing multiple Claude Code sessions across Git worktrees",
5
5
  "license": "MIT",
6
6
  "author": "Kodai Kabasawa",
@@ -41,17 +41,17 @@
41
41
  "bin"
42
42
  ],
43
43
  "optionalDependencies": {
44
- "@kodaikabasawa/ccmanager-darwin-arm64": "3.5.1",
45
- "@kodaikabasawa/ccmanager-darwin-x64": "3.5.1",
46
- "@kodaikabasawa/ccmanager-linux-arm64": "3.5.1",
47
- "@kodaikabasawa/ccmanager-linux-x64": "3.5.1",
48
- "@kodaikabasawa/ccmanager-win32-x64": "3.5.1"
44
+ "@kodaikabasawa/ccmanager-darwin-arm64": "3.5.2",
45
+ "@kodaikabasawa/ccmanager-darwin-x64": "3.5.2",
46
+ "@kodaikabasawa/ccmanager-linux-arm64": "3.5.2",
47
+ "@kodaikabasawa/ccmanager-linux-x64": "3.5.2",
48
+ "@kodaikabasawa/ccmanager-win32-x64": "3.5.2"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@eslint/js": "^9.28.0",
52
- "@sindresorhus/tsconfig": "^3.0.1",
52
+ "@sindresorhus/tsconfig": "^8.1.0",
53
53
  "@types/bun": "latest",
54
- "@types/react": "^18.0.32",
54
+ "@types/react": "^19.2.9",
55
55
  "@typescript-eslint/eslint-plugin": "^8.33.1",
56
56
  "@typescript-eslint/parser": "^8.33.1",
57
57
  "@vdemedes/prettier-config": "^2.0.1",
@@ -70,13 +70,13 @@
70
70
  "dependencies": {
71
71
  "@xterm/headless": "^6.0.0",
72
72
  "effect": "^3.18.2",
73
- "ink": "5.2.1",
73
+ "ink": "^6.6.0",
74
74
  "ink-select-input": "^6.0.0",
75
75
  "ink-text-input": "^6.0.0",
76
76
  "meow": "^14.0.0",
77
- "react": "18.3.1",
78
- "react-devtools-core": "^7.0.1",
79
- "react-dom": "18.3.1",
77
+ "react": "^19.2.3",
78
+ "react-devtools-core": "^6.1.2",
79
+ "react-dom": "^19.2.3",
80
80
  "strip-ansi": "^7.1.0"
81
81
  }
82
82
  }