projax 3.3.40 → 3.3.51

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 (115) hide show
  1. package/README.md +73 -0
  2. package/dist/__tests__/port-scanner.test.js +7 -17
  3. package/dist/__tests__/script-runner.test.js +7 -17
  4. package/dist/api/__tests__/database.test.js +7 -17
  5. package/dist/api/__tests__/database.test.js.map +1 -1
  6. package/dist/api/__tests__/routes.test.js +7 -17
  7. package/dist/api/__tests__/routes.test.js.map +1 -1
  8. package/dist/api/__tests__/scanner.test.js +7 -17
  9. package/dist/api/__tests__/scanner.test.js.map +1 -1
  10. package/dist/api/database.d.ts +20 -1
  11. package/dist/api/database.d.ts.map +1 -1
  12. package/dist/api/database.js +192 -21
  13. package/dist/api/database.js.map +1 -1
  14. package/dist/api/index.d.ts.map +1 -1
  15. package/dist/api/index.js +17 -19
  16. package/dist/api/index.js.map +1 -1
  17. package/dist/api/migrate.js +2 -1
  18. package/dist/api/migrate.js.map +1 -1
  19. package/dist/api/package.json +3 -2
  20. package/dist/api/routes/backup.d.ts +3 -0
  21. package/dist/api/routes/backup.d.ts.map +1 -0
  22. package/dist/api/routes/backup.js +51 -0
  23. package/dist/api/routes/backup.js.map +1 -0
  24. package/dist/api/routes/index.d.ts.map +1 -1
  25. package/dist/api/routes/index.js +6 -0
  26. package/dist/api/routes/index.js.map +1 -1
  27. package/dist/api/routes/mcp.d.ts +3 -0
  28. package/dist/api/routes/mcp.d.ts.map +1 -0
  29. package/dist/api/routes/mcp.js +147 -0
  30. package/dist/api/routes/mcp.js.map +1 -0
  31. package/dist/api/routes/projects.d.ts.map +1 -1
  32. package/dist/api/routes/projects.js +27 -17
  33. package/dist/api/routes/projects.js.map +1 -1
  34. package/dist/api/routes/settings.d.ts.map +1 -1
  35. package/dist/api/routes/settings.js +119 -11
  36. package/dist/api/routes/settings.js.map +1 -1
  37. package/dist/api/routes/workspaces.d.ts +3 -0
  38. package/dist/api/routes/workspaces.d.ts.map +1 -0
  39. package/dist/api/routes/workspaces.js +504 -0
  40. package/dist/api/routes/workspaces.js.map +1 -0
  41. package/dist/api/services/scanner.js +10 -19
  42. package/dist/api/services/scanner.js.map +1 -1
  43. package/dist/api/services/test-parser.js +3 -2
  44. package/dist/api/services/test-parser.js.map +1 -1
  45. package/dist/api/types.d.ts +31 -0
  46. package/dist/api/types.d.ts.map +1 -1
  47. package/dist/core/__tests__/database.test.js +7 -17
  48. package/dist/core/__tests__/detector.test.js +7 -17
  49. package/dist/core/__tests__/index.test.js +7 -17
  50. package/dist/core/__tests__/scanner.test.js +7 -17
  51. package/dist/core/__tests__/settings.test.js +7 -17
  52. package/dist/core/backup-utils.d.ts +17 -0
  53. package/dist/core/backup-utils.js +157 -0
  54. package/dist/core/database.d.ts +1 -0
  55. package/dist/core/database.js +9 -18
  56. package/dist/core/detector.js +11 -21
  57. package/dist/core/git-utils.d.ts +12 -0
  58. package/dist/core/git-utils.js +87 -0
  59. package/dist/core/index.d.ts +3 -0
  60. package/dist/core/index.js +8 -5
  61. package/dist/core/scanner.js +3 -2
  62. package/dist/core/settings.d.ts +85 -0
  63. package/dist/core/settings.js +306 -9
  64. package/dist/core/workspace-utils.d.ts +37 -0
  65. package/dist/core/workspace-utils.js +143 -0
  66. package/dist/core-bridge.js +7 -17
  67. package/dist/electron/core/__tests__/database.test.js +7 -17
  68. package/dist/electron/core/__tests__/detector.test.js +7 -17
  69. package/dist/electron/core/__tests__/index.test.js +7 -17
  70. package/dist/electron/core/__tests__/scanner.test.js +7 -17
  71. package/dist/electron/core/__tests__/settings.test.js +7 -17
  72. package/dist/electron/core/backup-utils.d.ts +17 -0
  73. package/dist/electron/core/backup-utils.js +157 -0
  74. package/dist/electron/core/database.d.ts +1 -0
  75. package/dist/electron/core/database.js +9 -18
  76. package/dist/electron/core/detector.js +11 -21
  77. package/dist/electron/core/git-utils.d.ts +12 -0
  78. package/dist/electron/core/git-utils.js +87 -0
  79. package/dist/electron/core/index.d.ts +3 -0
  80. package/dist/electron/core/index.js +8 -5
  81. package/dist/electron/core/scanner.js +3 -2
  82. package/dist/electron/core/settings.d.ts +85 -0
  83. package/dist/electron/core/settings.js +306 -9
  84. package/dist/electron/core/workspace-utils.d.ts +37 -0
  85. package/dist/electron/core/workspace-utils.js +143 -0
  86. package/dist/electron/core.js +7 -17
  87. package/dist/electron/main.js +663 -33
  88. package/dist/electron/port-extractor.js +9 -18
  89. package/dist/electron/port-scanner.js +11 -20
  90. package/dist/electron/port-utils.js +5 -4
  91. package/dist/electron/preload.d.ts +27 -2
  92. package/dist/electron/preload.js +18 -2
  93. package/dist/electron/renderer/assets/index-B-etDnj2.js +64 -0
  94. package/dist/electron/renderer/assets/index-Bx18Cyic.js +64 -0
  95. package/dist/electron/renderer/assets/index-C8f5yNYe.js +64 -0
  96. package/dist/electron/renderer/assets/index-CIZ3Wl6c.css +1 -0
  97. package/dist/electron/renderer/assets/index-CJbsU9y8.css +1 -0
  98. package/dist/electron/renderer/assets/index-CopVNRnR.js +64 -0
  99. package/dist/electron/renderer/assets/index-DUvcepWm.js +64 -0
  100. package/dist/electron/renderer/assets/index-DWe2TQFv.css +1 -0
  101. package/dist/electron/renderer/assets/index-DZzB20Xf.css +1 -0
  102. package/dist/electron/renderer/assets/index-DknLdADV.js +63 -0
  103. package/dist/electron/renderer/assets/index-DocuD8Lk.js +64 -0
  104. package/dist/electron/renderer/assets/index-DyU-xfd8.css +1 -0
  105. package/dist/electron/renderer/assets/index-GwC-JVUy.css +1 -0
  106. package/dist/electron/renderer/assets/index-fehviker.js +63 -0
  107. package/dist/electron/renderer/index.html +2 -2
  108. package/dist/electron/script-runner.js +20 -29
  109. package/dist/index.js +395 -21
  110. package/dist/port-extractor.js +9 -18
  111. package/dist/port-scanner.js +11 -20
  112. package/dist/port-utils.js +5 -4
  113. package/dist/script-runner.js +20 -29
  114. package/dist/test-parser.js +3 -2
  115. package/package.json +3 -2
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.getBranchesForProjects = exports.getCurrentBranch = void 0;
27
+ const child_process_1 = require("child_process");
28
+ const fs = __importStar(require("fs"));
29
+ const path = __importStar(require("path"));
30
+ /**
31
+ * Get the current git branch for a project
32
+ * @param projectPath The path to the project directory
33
+ * @returns The current branch name, or null if not a git repo or on error
34
+ */
35
+ function getCurrentBranch(projectPath) {
36
+ try {
37
+ // Check if .git directory exists
38
+ const gitDir = path.join(projectPath, '.git');
39
+ if (!fs.existsSync(gitDir) && !fs.existsSync(path.join(projectPath, '.git', 'HEAD'))) {
40
+ // Check if it's a worktree or submodule
41
+ const gitConfig = path.join(projectPath, '.git');
42
+ if (!fs.existsSync(gitConfig)) {
43
+ return null;
44
+ }
45
+ }
46
+ // Try to get the current branch
47
+ const branch = (0, child_process_1.execSync)('git rev-parse --abbrev-ref HEAD', {
48
+ cwd: projectPath,
49
+ encoding: 'utf-8',
50
+ stdio: ['pipe', 'pipe', 'pipe'],
51
+ }).trim();
52
+ // Handle detached HEAD state (returns "HEAD")
53
+ if (branch === 'HEAD') {
54
+ // Try to get the commit hash instead
55
+ try {
56
+ const commit = (0, child_process_1.execSync)('git rev-parse --short HEAD', {
57
+ cwd: projectPath,
58
+ encoding: 'utf-8',
59
+ stdio: ['pipe', 'pipe', 'pipe'],
60
+ }).trim();
61
+ return `detached@${commit}`;
62
+ }
63
+ catch {
64
+ return 'detached';
65
+ }
66
+ }
67
+ return branch || null;
68
+ }
69
+ catch (error) {
70
+ // Not a git repo, or git command failed
71
+ return null;
72
+ }
73
+ }
74
+ exports.getCurrentBranch = getCurrentBranch;
75
+ /**
76
+ * Get git branches for multiple projects
77
+ * @param projectPaths Array of project paths
78
+ * @returns Map of project path to branch name (or null)
79
+ */
80
+ function getBranchesForProjects(projectPaths) {
81
+ const branches = new Map();
82
+ for (const projectPath of projectPaths) {
83
+ branches.set(projectPath, getCurrentBranch(projectPath));
84
+ }
85
+ return branches;
86
+ }
87
+ exports.getBranchesForProjects = getBranchesForProjects;
@@ -2,6 +2,9 @@ export * from './database';
2
2
  export * from './detector';
3
3
  export * from './scanner';
4
4
  export * from './settings';
5
+ export * from './git-utils';
6
+ export * from './workspace-utils';
7
+ export * from './backup-utils';
5
8
  export { getDatabaseManager } from './database';
6
9
  import { Project, Test } from './database';
7
10
  export declare function getAllProjects(): Project[];
@@ -14,15 +14,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.getDatabaseManager = void 0;
18
- exports.getAllProjects = getAllProjects;
19
- exports.addProject = addProject;
20
- exports.removeProject = removeProject;
21
- exports.getTestsByProject = getTestsByProject;
17
+ exports.getTestsByProject = exports.removeProject = exports.addProject = exports.getAllProjects = exports.getDatabaseManager = void 0;
22
18
  __exportStar(require("./database"), exports);
23
19
  __exportStar(require("./detector"), exports);
24
20
  __exportStar(require("./scanner"), exports);
25
21
  __exportStar(require("./settings"), exports);
22
+ __exportStar(require("./git-utils"), exports);
23
+ __exportStar(require("./workspace-utils"), exports);
24
+ __exportStar(require("./backup-utils"), exports);
26
25
  var database_1 = require("./database");
27
26
  Object.defineProperty(exports, "getDatabaseManager", { enumerable: true, get: function () { return database_1.getDatabaseManager; } });
28
27
  // Convenience functions for common operations
@@ -30,12 +29,16 @@ const database_2 = require("./database");
30
29
  function getAllProjects() {
31
30
  return (0, database_2.getDatabaseManager)().getAllProjects();
32
31
  }
32
+ exports.getAllProjects = getAllProjects;
33
33
  function addProject(name, projectPath) {
34
34
  return (0, database_2.getDatabaseManager)().addProject(name, projectPath);
35
35
  }
36
+ exports.addProject = addProject;
36
37
  function removeProject(id) {
37
38
  (0, database_2.getDatabaseManager)().removeProject(id);
38
39
  }
40
+ exports.removeProject = removeProject;
39
41
  function getTestsByProject(projectId) {
40
42
  return (0, database_2.getDatabaseManager)().getTestsByProject(projectId);
41
43
  }
44
+ exports.getTestsByProject = getTestsByProject;
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.scanProject = scanProject;
4
- exports.scanAllProjects = scanAllProjects;
3
+ exports.scanAllProjects = exports.scanProject = void 0;
5
4
  const database_1 = require("./database");
6
5
  function scanProject(projectId) {
7
6
  return (0, database_1.getDatabaseManager)().scanProject(projectId);
8
7
  }
8
+ exports.scanProject = scanProject;
9
9
  function scanAllProjects() {
10
10
  return (0, database_1.getDatabaseManager)().scanAllProjects();
11
11
  }
12
+ exports.scanAllProjects = scanAllProjects;
@@ -8,9 +8,62 @@ export interface BrowserSettings {
8
8
  type: BrowserType;
9
9
  customPath?: string;
10
10
  }
11
+ export interface DisplaySettings {
12
+ projectTiles: {
13
+ showName: boolean;
14
+ showDescription: boolean;
15
+ showTags: boolean;
16
+ showRunningIndicator: boolean;
17
+ showPorts: boolean;
18
+ showGitBranch: boolean;
19
+ };
20
+ projectDetails: {
21
+ showStats: boolean;
22
+ showTestResults: boolean;
23
+ showTags: boolean;
24
+ showUrls: boolean;
25
+ showScripts: boolean;
26
+ showJenkins: boolean;
27
+ };
28
+ workspaceTiles: {
29
+ showName: boolean;
30
+ showDescription: boolean;
31
+ showPath: boolean;
32
+ showTags: boolean;
33
+ showProjectCount: boolean;
34
+ };
35
+ workspaceDetails: {
36
+ showProjectList: boolean;
37
+ showDescription: boolean;
38
+ showPath: boolean;
39
+ };
40
+ }
41
+ export interface AppearanceSettings {
42
+ theme?: string;
43
+ uiDensity?: 'compact' | 'normal' | 'comfortable';
44
+ fontSize?: number;
45
+ animations?: boolean;
46
+ defaultView?: 'projects' | 'workspaces';
47
+ }
48
+ export interface BehaviorSettings {
49
+ autoScanOnAdd?: boolean;
50
+ refreshInterval?: number;
51
+ autoOpenTerminal?: boolean;
52
+ notifications?: boolean;
53
+ defaultScriptSortOrder?: 'default' | 'alphabetical' | 'last-used';
54
+ }
55
+ export interface AdvancedSettings {
56
+ apiPortOverride?: number | null;
57
+ databaseLocation?: string;
58
+ debugMode?: boolean;
59
+ }
11
60
  export interface AppSettings {
12
61
  editor: EditorSettings;
13
62
  browser: BrowserSettings;
63
+ display?: DisplaySettings;
64
+ appearance?: AppearanceSettings;
65
+ behavior?: BehaviorSettings;
66
+ advanced?: AdvancedSettings;
14
67
  }
15
68
  /**
16
69
  * Get a setting value by key
@@ -40,6 +93,38 @@ export declare function getBrowserSettings(): BrowserSettings;
40
93
  * Set browser settings
41
94
  */
42
95
  export declare function setBrowserSettings(settings: BrowserSettings): void;
96
+ /**
97
+ * Get display settings
98
+ */
99
+ export declare function getDisplaySettings(): DisplaySettings;
100
+ /**
101
+ * Set display settings
102
+ */
103
+ export declare function setDisplaySettings(settings: DisplaySettings): void;
104
+ /**
105
+ * Get appearance settings
106
+ */
107
+ export declare function getAppearanceSettings(): AppearanceSettings;
108
+ /**
109
+ * Set appearance settings
110
+ */
111
+ export declare function setAppearanceSettings(settings: AppearanceSettings): void;
112
+ /**
113
+ * Get behavior settings
114
+ */
115
+ export declare function getBehaviorSettings(): BehaviorSettings;
116
+ /**
117
+ * Set behavior settings
118
+ */
119
+ export declare function setBehaviorSettings(settings: BehaviorSettings): void;
120
+ /**
121
+ * Get advanced settings
122
+ */
123
+ export declare function getAdvancedSettings(): AdvancedSettings;
124
+ /**
125
+ * Set advanced settings
126
+ */
127
+ export declare function setAdvancedSettings(settings: AdvancedSettings): void;
43
128
  /**
44
129
  * Get all app settings
45
130
  */
@@ -1,15 +1,37 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getSetting = getSetting;
4
- exports.setSetting = setSetting;
5
- exports.getAllSettings = getAllSettings;
6
- exports.getEditorSettings = getEditorSettings;
7
- exports.setEditorSettings = setEditorSettings;
8
- exports.getBrowserSettings = getBrowserSettings;
9
- exports.setBrowserSettings = setBrowserSettings;
10
- exports.getAppSettings = getAppSettings;
11
- exports.setAppSettings = setAppSettings;
3
+ exports.setAppSettings = exports.getAppSettings = exports.setAdvancedSettings = exports.getAdvancedSettings = exports.setBehaviorSettings = exports.getBehaviorSettings = exports.setAppearanceSettings = exports.getAppearanceSettings = exports.setDisplaySettings = exports.getDisplaySettings = exports.setBrowserSettings = exports.getBrowserSettings = exports.setEditorSettings = exports.getEditorSettings = exports.getAllSettings = exports.setSetting = exports.getSetting = void 0;
12
4
  const database_1 = require("./database");
5
+ const DEFAULT_DISPLAY_SETTINGS = {
6
+ projectTiles: {
7
+ showName: true,
8
+ showDescription: true,
9
+ showTags: true,
10
+ showRunningIndicator: true,
11
+ showPorts: true,
12
+ showGitBranch: true,
13
+ },
14
+ projectDetails: {
15
+ showStats: true,
16
+ showTestResults: true,
17
+ showTags: true,
18
+ showUrls: true,
19
+ showScripts: true,
20
+ showJenkins: false,
21
+ },
22
+ workspaceTiles: {
23
+ showName: true,
24
+ showDescription: true,
25
+ showPath: true,
26
+ showTags: true,
27
+ showProjectCount: true,
28
+ },
29
+ workspaceDetails: {
30
+ showProjectList: true,
31
+ showDescription: true,
32
+ showPath: true,
33
+ },
34
+ };
13
35
  const DEFAULT_SETTINGS = {
14
36
  editor: {
15
37
  type: 'vscode',
@@ -17,6 +39,24 @@ const DEFAULT_SETTINGS = {
17
39
  browser: {
18
40
  type: 'chrome',
19
41
  },
42
+ display: DEFAULT_DISPLAY_SETTINGS,
43
+ appearance: {
44
+ uiDensity: 'normal',
45
+ fontSize: 13,
46
+ animations: true,
47
+ defaultView: 'projects',
48
+ },
49
+ behavior: {
50
+ autoScanOnAdd: true,
51
+ refreshInterval: 5000,
52
+ autoOpenTerminal: false,
53
+ notifications: true,
54
+ defaultScriptSortOrder: 'default',
55
+ },
56
+ advanced: {
57
+ apiPortOverride: null,
58
+ debugMode: false,
59
+ },
20
60
  };
21
61
  /**
22
62
  * Get a setting value by key
@@ -24,18 +64,21 @@ const DEFAULT_SETTINGS = {
24
64
  function getSetting(key) {
25
65
  return (0, database_1.getDatabaseManager)().getSetting(key);
26
66
  }
67
+ exports.getSetting = getSetting;
27
68
  /**
28
69
  * Set a setting value by key
29
70
  */
30
71
  function setSetting(key, value) {
31
72
  (0, database_1.getDatabaseManager)().setSetting(key, value);
32
73
  }
74
+ exports.setSetting = setSetting;
33
75
  /**
34
76
  * Get all settings as a key-value object
35
77
  */
36
78
  function getAllSettings() {
37
79
  return (0, database_1.getDatabaseManager)().getAllSettings();
38
80
  }
81
+ exports.getAllSettings = getAllSettings;
39
82
  /**
40
83
  * Get editor settings
41
84
  */
@@ -48,6 +91,7 @@ function getEditorSettings() {
48
91
  customPath,
49
92
  };
50
93
  }
94
+ exports.getEditorSettings = getEditorSettings;
51
95
  /**
52
96
  * Set editor settings
53
97
  */
@@ -60,6 +104,7 @@ function setEditorSettings(settings) {
60
104
  // Note: Removing settings is not yet supported via the API
61
105
  // Setting to empty string would achieve similar effect if needed
62
106
  }
107
+ exports.setEditorSettings = setEditorSettings;
63
108
  /**
64
109
  * Get browser settings
65
110
  */
@@ -72,6 +117,7 @@ function getBrowserSettings() {
72
117
  customPath,
73
118
  };
74
119
  }
120
+ exports.getBrowserSettings = getBrowserSettings;
75
121
  /**
76
122
  * Set browser settings
77
123
  */
@@ -84,6 +130,243 @@ function setBrowserSettings(settings) {
84
130
  // Note: Removing settings is not yet supported via the API
85
131
  // Setting to empty string would achieve similar effect if needed
86
132
  }
133
+ exports.setBrowserSettings = setBrowserSettings;
134
+ /**
135
+ * Get display settings
136
+ */
137
+ function getDisplaySettings() {
138
+ const db = (0, database_1.getDatabaseManager)();
139
+ const settings = { ...DEFAULT_DISPLAY_SETTINGS };
140
+ // Project tiles
141
+ const ptShowName = db.getSetting('display.projectTiles.showName');
142
+ if (ptShowName !== null)
143
+ settings.projectTiles.showName = ptShowName === 'true';
144
+ const ptShowDesc = db.getSetting('display.projectTiles.showDescription');
145
+ if (ptShowDesc !== null)
146
+ settings.projectTiles.showDescription = ptShowDesc === 'true';
147
+ const ptShowTags = db.getSetting('display.projectTiles.showTags');
148
+ if (ptShowTags !== null)
149
+ settings.projectTiles.showTags = ptShowTags === 'true';
150
+ const ptShowRunning = db.getSetting('display.projectTiles.showRunningIndicator');
151
+ if (ptShowRunning !== null)
152
+ settings.projectTiles.showRunningIndicator = ptShowRunning === 'true';
153
+ const ptShowPorts = db.getSetting('display.projectTiles.showPorts');
154
+ if (ptShowPorts !== null)
155
+ settings.projectTiles.showPorts = ptShowPorts === 'true';
156
+ const ptShowGit = db.getSetting('display.projectTiles.showGitBranch');
157
+ if (ptShowGit !== null)
158
+ settings.projectTiles.showGitBranch = ptShowGit === 'true';
159
+ // Project details
160
+ const pdShowStats = db.getSetting('display.projectDetails.showStats');
161
+ if (pdShowStats !== null)
162
+ settings.projectDetails.showStats = pdShowStats === 'true';
163
+ const pdShowTests = db.getSetting('display.projectDetails.showTestResults');
164
+ if (pdShowTests !== null)
165
+ settings.projectDetails.showTestResults = pdShowTests === 'true';
166
+ const pdShowTags = db.getSetting('display.projectDetails.showTags');
167
+ if (pdShowTags !== null)
168
+ settings.projectDetails.showTags = pdShowTags === 'true';
169
+ const pdShowUrls = db.getSetting('display.projectDetails.showUrls');
170
+ if (pdShowUrls !== null)
171
+ settings.projectDetails.showUrls = pdShowUrls === 'true';
172
+ const pdShowScripts = db.getSetting('display.projectDetails.showScripts');
173
+ if (pdShowScripts !== null)
174
+ settings.projectDetails.showScripts = pdShowScripts === 'true';
175
+ const pdShowJenkins = db.getSetting('display.projectDetails.showJenkins');
176
+ if (pdShowJenkins !== null)
177
+ settings.projectDetails.showJenkins = pdShowJenkins === 'true';
178
+ // Workspace tiles
179
+ const wtShowName = db.getSetting('display.workspaceTiles.showName');
180
+ if (wtShowName !== null)
181
+ settings.workspaceTiles.showName = wtShowName === 'true';
182
+ const wtShowDesc = db.getSetting('display.workspaceTiles.showDescription');
183
+ if (wtShowDesc !== null)
184
+ settings.workspaceTiles.showDescription = wtShowDesc === 'true';
185
+ const wtShowPath = db.getSetting('display.workspaceTiles.showPath');
186
+ if (wtShowPath !== null)
187
+ settings.workspaceTiles.showPath = wtShowPath === 'true';
188
+ const wtShowTags = db.getSetting('display.workspaceTiles.showTags');
189
+ if (wtShowTags !== null)
190
+ settings.workspaceTiles.showTags = wtShowTags === 'true';
191
+ const wtShowCount = db.getSetting('display.workspaceTiles.showProjectCount');
192
+ if (wtShowCount !== null)
193
+ settings.workspaceTiles.showProjectCount = wtShowCount === 'true';
194
+ // Workspace details
195
+ const wdShowList = db.getSetting('display.workspaceDetails.showProjectList');
196
+ if (wdShowList !== null)
197
+ settings.workspaceDetails.showProjectList = wdShowList === 'true';
198
+ const wdShowDesc = db.getSetting('display.workspaceDetails.showDescription');
199
+ if (wdShowDesc !== null)
200
+ settings.workspaceDetails.showDescription = wdShowDesc === 'true';
201
+ const wdShowPath = db.getSetting('display.workspaceDetails.showPath');
202
+ if (wdShowPath !== null)
203
+ settings.workspaceDetails.showPath = wdShowPath === 'true';
204
+ return settings;
205
+ }
206
+ exports.getDisplaySettings = getDisplaySettings;
207
+ /**
208
+ * Set display settings
209
+ */
210
+ function setDisplaySettings(settings) {
211
+ const db = (0, database_1.getDatabaseManager)();
212
+ // Project tiles
213
+ db.setSetting('display.projectTiles.showName', String(settings.projectTiles.showName));
214
+ db.setSetting('display.projectTiles.showDescription', String(settings.projectTiles.showDescription));
215
+ db.setSetting('display.projectTiles.showTags', String(settings.projectTiles.showTags));
216
+ db.setSetting('display.projectTiles.showRunningIndicator', String(settings.projectTiles.showRunningIndicator));
217
+ db.setSetting('display.projectTiles.showPorts', String(settings.projectTiles.showPorts));
218
+ db.setSetting('display.projectTiles.showGitBranch', String(settings.projectTiles.showGitBranch));
219
+ // Project details
220
+ db.setSetting('display.projectDetails.showStats', String(settings.projectDetails.showStats));
221
+ db.setSetting('display.projectDetails.showTestResults', String(settings.projectDetails.showTestResults));
222
+ db.setSetting('display.projectDetails.showTags', String(settings.projectDetails.showTags));
223
+ db.setSetting('display.projectDetails.showUrls', String(settings.projectDetails.showUrls));
224
+ db.setSetting('display.projectDetails.showScripts', String(settings.projectDetails.showScripts));
225
+ db.setSetting('display.projectDetails.showJenkins', String(settings.projectDetails.showJenkins));
226
+ // Workspace tiles
227
+ db.setSetting('display.workspaceTiles.showName', String(settings.workspaceTiles.showName));
228
+ db.setSetting('display.workspaceTiles.showDescription', String(settings.workspaceTiles.showDescription));
229
+ db.setSetting('display.workspaceTiles.showPath', String(settings.workspaceTiles.showPath));
230
+ db.setSetting('display.workspaceTiles.showTags', String(settings.workspaceTiles.showTags));
231
+ db.setSetting('display.workspaceTiles.showProjectCount', String(settings.workspaceTiles.showProjectCount));
232
+ // Workspace details
233
+ db.setSetting('display.workspaceDetails.showProjectList', String(settings.workspaceDetails.showProjectList));
234
+ db.setSetting('display.workspaceDetails.showDescription', String(settings.workspaceDetails.showDescription));
235
+ db.setSetting('display.workspaceDetails.showPath', String(settings.workspaceDetails.showPath));
236
+ }
237
+ exports.setDisplaySettings = setDisplaySettings;
238
+ /**
239
+ * Get appearance settings
240
+ */
241
+ function getAppearanceSettings() {
242
+ const db = (0, database_1.getDatabaseManager)();
243
+ const settings = { ...DEFAULT_SETTINGS.appearance };
244
+ const theme = db.getSetting('appearance.theme');
245
+ if (theme)
246
+ settings.theme = theme;
247
+ const uiDensity = db.getSetting('appearance.uiDensity');
248
+ if (uiDensity && ['compact', 'normal', 'comfortable'].includes(uiDensity)) {
249
+ settings.uiDensity = uiDensity;
250
+ }
251
+ const fontSize = db.getSetting('appearance.fontSize');
252
+ if (fontSize) {
253
+ const size = parseInt(fontSize, 10);
254
+ if (!isNaN(size))
255
+ settings.fontSize = size;
256
+ }
257
+ const animations = db.getSetting('appearance.animations');
258
+ if (animations !== null)
259
+ settings.animations = animations === 'true';
260
+ const defaultView = db.getSetting('appearance.defaultView');
261
+ if (defaultView && ['projects', 'workspaces'].includes(defaultView)) {
262
+ settings.defaultView = defaultView;
263
+ }
264
+ return settings;
265
+ }
266
+ exports.getAppearanceSettings = getAppearanceSettings;
267
+ /**
268
+ * Set appearance settings
269
+ */
270
+ function setAppearanceSettings(settings) {
271
+ const db = (0, database_1.getDatabaseManager)();
272
+ if (settings.theme !== undefined)
273
+ db.setSetting('appearance.theme', settings.theme);
274
+ if (settings.uiDensity !== undefined)
275
+ db.setSetting('appearance.uiDensity', settings.uiDensity);
276
+ if (settings.fontSize !== undefined)
277
+ db.setSetting('appearance.fontSize', String(settings.fontSize));
278
+ if (settings.animations !== undefined)
279
+ db.setSetting('appearance.animations', String(settings.animations));
280
+ if (settings.defaultView !== undefined)
281
+ db.setSetting('appearance.defaultView', settings.defaultView);
282
+ }
283
+ exports.setAppearanceSettings = setAppearanceSettings;
284
+ /**
285
+ * Get behavior settings
286
+ */
287
+ function getBehaviorSettings() {
288
+ const db = (0, database_1.getDatabaseManager)();
289
+ const settings = { ...DEFAULT_SETTINGS.behavior };
290
+ const autoScan = db.getSetting('behavior.autoScanOnAdd');
291
+ if (autoScan !== null)
292
+ settings.autoScanOnAdd = autoScan === 'true';
293
+ const refreshInterval = db.getSetting('behavior.refreshInterval');
294
+ if (refreshInterval) {
295
+ const interval = parseInt(refreshInterval, 10);
296
+ if (!isNaN(interval))
297
+ settings.refreshInterval = interval;
298
+ }
299
+ const autoOpenTerminal = db.getSetting('behavior.autoOpenTerminal');
300
+ if (autoOpenTerminal !== null)
301
+ settings.autoOpenTerminal = autoOpenTerminal === 'true';
302
+ const notifications = db.getSetting('behavior.notifications');
303
+ if (notifications !== null)
304
+ settings.notifications = notifications === 'true';
305
+ const defaultSort = db.getSetting('behavior.defaultScriptSortOrder');
306
+ if (defaultSort && ['default', 'alphabetical', 'last-used'].includes(defaultSort)) {
307
+ settings.defaultScriptSortOrder = defaultSort;
308
+ }
309
+ return settings;
310
+ }
311
+ exports.getBehaviorSettings = getBehaviorSettings;
312
+ /**
313
+ * Set behavior settings
314
+ */
315
+ function setBehaviorSettings(settings) {
316
+ const db = (0, database_1.getDatabaseManager)();
317
+ if (settings.autoScanOnAdd !== undefined)
318
+ db.setSetting('behavior.autoScanOnAdd', String(settings.autoScanOnAdd));
319
+ if (settings.refreshInterval !== undefined)
320
+ db.setSetting('behavior.refreshInterval', String(settings.refreshInterval));
321
+ if (settings.autoOpenTerminal !== undefined)
322
+ db.setSetting('behavior.autoOpenTerminal', String(settings.autoOpenTerminal));
323
+ if (settings.notifications !== undefined)
324
+ db.setSetting('behavior.notifications', String(settings.notifications));
325
+ if (settings.defaultScriptSortOrder !== undefined)
326
+ db.setSetting('behavior.defaultScriptSortOrder', settings.defaultScriptSortOrder);
327
+ }
328
+ exports.setBehaviorSettings = setBehaviorSettings;
329
+ /**
330
+ * Get advanced settings
331
+ */
332
+ function getAdvancedSettings() {
333
+ const db = (0, database_1.getDatabaseManager)();
334
+ const settings = { ...DEFAULT_SETTINGS.advanced };
335
+ const apiPort = db.getSetting('advanced.apiPortOverride');
336
+ if (apiPort !== null) {
337
+ if (apiPort === '') {
338
+ settings.apiPortOverride = null;
339
+ }
340
+ else {
341
+ const port = parseInt(apiPort, 10);
342
+ if (!isNaN(port))
343
+ settings.apiPortOverride = port;
344
+ }
345
+ }
346
+ const dbLocation = db.getSetting('advanced.databaseLocation');
347
+ if (dbLocation)
348
+ settings.databaseLocation = dbLocation;
349
+ const debugMode = db.getSetting('advanced.debugMode');
350
+ if (debugMode !== null)
351
+ settings.debugMode = debugMode === 'true';
352
+ return settings;
353
+ }
354
+ exports.getAdvancedSettings = getAdvancedSettings;
355
+ /**
356
+ * Set advanced settings
357
+ */
358
+ function setAdvancedSettings(settings) {
359
+ const db = (0, database_1.getDatabaseManager)();
360
+ if (settings.apiPortOverride !== undefined) {
361
+ db.setSetting('advanced.apiPortOverride', settings.apiPortOverride === null ? '' : String(settings.apiPortOverride));
362
+ }
363
+ if (settings.databaseLocation !== undefined && settings.databaseLocation) {
364
+ db.setSetting('advanced.databaseLocation', settings.databaseLocation);
365
+ }
366
+ if (settings.debugMode !== undefined)
367
+ db.setSetting('advanced.debugMode', String(settings.debugMode));
368
+ }
369
+ exports.setAdvancedSettings = setAdvancedSettings;
87
370
  /**
88
371
  * Get all app settings
89
372
  */
@@ -91,12 +374,26 @@ function getAppSettings() {
91
374
  return {
92
375
  editor: getEditorSettings(),
93
376
  browser: getBrowserSettings(),
377
+ display: getDisplaySettings(),
378
+ appearance: getAppearanceSettings(),
379
+ behavior: getBehaviorSettings(),
380
+ advanced: getAdvancedSettings(),
94
381
  };
95
382
  }
383
+ exports.getAppSettings = getAppSettings;
96
384
  /**
97
385
  * Set all app settings
98
386
  */
99
387
  function setAppSettings(settings) {
100
388
  setEditorSettings(settings.editor);
101
389
  setBrowserSettings(settings.browser);
390
+ if (settings.display)
391
+ setDisplaySettings(settings.display);
392
+ if (settings.appearance)
393
+ setAppearanceSettings(settings.appearance);
394
+ if (settings.behavior)
395
+ setBehaviorSettings(settings.behavior);
396
+ if (settings.advanced)
397
+ setAdvancedSettings(settings.advanced);
102
398
  }
399
+ exports.setAppSettings = setAppSettings;
@@ -0,0 +1,37 @@
1
+ export interface WorkspaceFolder {
2
+ path: string;
3
+ name?: string;
4
+ }
5
+ export interface WorkspaceSettings {
6
+ [key: string]: any;
7
+ }
8
+ export interface WorkspaceExtensions {
9
+ recommendations?: string[];
10
+ unwantedRecommendations?: string[];
11
+ }
12
+ export interface ParsedWorkspace {
13
+ folders: WorkspaceFolder[];
14
+ settings?: WorkspaceSettings;
15
+ extensions?: WorkspaceExtensions;
16
+ }
17
+ /**
18
+ * Parse a .code-workspace file
19
+ * @param filePath Path to the .code-workspace file
20
+ * @returns Parsed workspace structure
21
+ */
22
+ export declare function parseWorkspaceFile(filePath: string): ParsedWorkspace;
23
+ /**
24
+ * Generate a .code-workspace file
25
+ * @param workspaceName Name of the workspace (used in comments)
26
+ * @param projects Array of project paths (absolute or relative)
27
+ * @param outputPath Path where the .code-workspace file should be created
28
+ * @param settings Optional workspace settings
29
+ * @param extensions Optional workspace extensions recommendations
30
+ */
31
+ export declare function generateWorkspaceFile(workspaceName: string, projects: string[], outputPath: string, settings?: WorkspaceSettings, extensions?: WorkspaceExtensions): void;
32
+ /**
33
+ * Validate that a path is a valid workspace file
34
+ * @param filePath Path to check
35
+ * @returns true if the path exists and is a valid .code-workspace file
36
+ */
37
+ export declare function validateWorkspacePath(filePath: string): boolean;