Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/cli/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ they appear in the UI.
| Folder Trust | `security.folderTrust.enabled` | Setting to track whether Folder trust is enabled. | `true` |
| Enable Environment Variable Redaction | `security.environmentVariableRedaction.enabled` | Enable redaction of environment variables that may contain secrets. | `false` |

### Advanced

| UI Label | Setting | Description | Default |
| --------------------------------- | ------------------------------ | --------------------------------------------- | ------- |
| Auto Configure Max Old Space Size | `advanced.autoConfigureMemory` | Automatically configure Node.js memory limits | `false` |

### Experimental

| UI Label | Setting | Description | Default |
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/config/settingsSchema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ describe('SettingsSchema', () => {
expect(
getSettingsSchema().advanced.properties.autoConfigureMemory
.showInDialog,
).toBe(false);
).toBe(true);
});

it('should infer Settings type correctly', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/config/settingsSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,7 @@ const SETTINGS_SCHEMA = {
requiresRestart: true,
default: false,
description: 'Automatically configure Node.js memory limits',
showInDialog: false,
showInDialog: true,
},
dnsResolutionOrder: {
type: 'string',
Expand Down
21 changes: 18 additions & 3 deletions packages/cli/src/utils/settingsUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ describe('SettingsUtils', () => {
default: {},
description: 'Advanced settings for power users.',
showInDialog: false,
properties: {
autoConfigureMemory: {
type: 'boolean',
label: 'Auto Configure Max Old Space Size',
category: 'Advanced',
requiresRestart: true,
default: false,
description: 'Automatically configure Node.js memory limits',
showInDialog: true,
},
},
},
ui: {
type: 'object',
Expand Down Expand Up @@ -395,11 +406,15 @@ describe('SettingsUtils', () => {
expect(uiKeys).not.toContain('ui.theme'); // This is now marked false
});

it('should not include Advanced category settings', () => {
it('should include Advanced category settings', () => {
const categories = getDialogSettingsByCategory();

// Advanced settings should be filtered out
expect(categories['Advanced']).toBeUndefined();
// Advanced settings should now be included because of autoConfigureMemory
expect(categories['Advanced']).toBeDefined();
const advancedSettings = categories['Advanced'];
expect(advancedSettings.map((s) => s.key)).toContain(
'advanced.autoConfigureMemory',
);
});

it('should include settings with showInDialog=true', () => {
Expand Down
Loading