chore: release v2.4.5 with comprehensive testing and documentation updates

This commit is contained in:
kaitranntt committed 2025-11-05 16:10:03 -05:00
1 parent 7e2ee14f6f
commit 966a43f0f9
28 files changed
+2149 -853

No files matched your search

+1 -31
View File
@@ -1,7 +1,7 @@
const assert = require('assert');
const path = require('path');
const os = require('os');
const { expandPath, validateProfileName, isPathSafe } = require('../../../bin/helpers');
const { expandPath } = require('../../../bin/helpers');
describe('helpers', () => {
describe('expandPath', () => {
@@ -24,34 +24,4 @@ describe('helpers', () => {
}
});
});
describe('validateProfileName', () => {
it('accepts valid profile names', () => {
assert(validateProfileName('glm'));
assert(validateProfileName('sonnet-4-5'));
assert(validateProfileName('my_profile'));
assert(validateProfileName('profile123'));
});
it('rejects invalid profile names', () => {
assert(!validateProfileName('profile with spaces'));
assert(!validateProfileName('profile@special'));
assert(!validateProfileName('profile;injection'));
});
});
describe('isPathSafe', () => {
it('accepts safe paths', () => {
assert(isPathSafe('/usr/local/bin/claude'));
assert(isPathSafe('C:\\Program Files\\Claude\\claude.exe'));
assert(isPathSafe('/home/user/.local/bin/claude'));
});
it('rejects unsafe paths', () => {
assert(!isPathSafe('/usr/bin/claude; rm -rf /'));
assert(!isPathSafe('/usr/bin/claude|bash'));
assert(!isPathSafe('/usr/bin/claude&echo pwned'));
assert(!isPathSafe('/usr/bin/claude$(whoami)'));
});
});
});