Release 0.6.2
This commit is contained in:
parent
c27f9a0daa
commit
d85834b13d
19
CHANGELOG.md
19
CHANGELOG.md
@ -253,3 +253,22 @@
|
||||
## [0.1.0]
|
||||
|
||||
- Initial release.
|
||||
## [0.6.2] - 2025-11-18
|
||||
|
||||
### Platform resilience (Windows/WSL)
|
||||
- Added `fs-helpers` that treat chmod/copy failures on NTFS/DrvFs as best-effort so CLI generation keeps working on WSL mounts.
|
||||
- Documented Windows/WSL workflows: install/test from ext4 copies, remount guidance for /mnt/c, and syncing tips.
|
||||
|
||||
### CLI/runtime
|
||||
- Global flag parsing moved into `cli-factory` for consistent log-level/oauth-timeout handling across commands.
|
||||
- `daemon` host/client hardened and covered with new tests; idle eviction and restart paths verified.
|
||||
- Imports now include platform-aware defaults for Cursor/Claude/Windsurf/VS Code/OpenCode configs with path dedupe.
|
||||
|
||||
### StdIO MCP coverage
|
||||
- Added stdio e2e tests using in-repo filesystem & memory MCP fixtures to ensure list/call works via execPath.
|
||||
|
||||
### Content extraction
|
||||
- `createCallResult` now reads nested `raw.content`/`raw.structuredContent` so tools that wrap responses render text/markdown/json correctly; new unit tests cover text joining, markdown, and JSON.
|
||||
|
||||
### Docs
|
||||
- New `docs/windows.md` with WSL/NTFS tips; added to docs index.
|
||||
|
||||
@ -2,6 +2,7 @@ import fs from 'node:fs/promises';
|
||||
import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { restoreCwdSafely } from './fixtures/test-helpers.js';
|
||||
|
||||
process.env.MCPORTER_DISABLE_AUTORUN = '1';
|
||||
const cliModulePromise = import('../src/cli.js');
|
||||
@ -28,7 +29,7 @@ describe('mcporter list --verbose end-to-end', () => {
|
||||
restoreHomedir?.();
|
||||
delete process.env.MCPORTER_NO_FORCE_EXIT;
|
||||
process.env = { ...originalEnv };
|
||||
process.chdir(originalCwd);
|
||||
restoreCwdSafely(originalCwd);
|
||||
await fs.rm(tempDir, { recursive: true, force: true }).catch(() => {});
|
||||
process.exitCode = undefined;
|
||||
});
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import fs from 'node:fs/promises';
|
||||
import net from 'node:net';
|
||||
import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { DaemonClient, resolveDaemonPaths } from '../src/daemon/client.js';
|
||||
import { makeShortTempDir } from './fixtures/test-helpers.js';
|
||||
|
||||
describe('daemon client', () => {
|
||||
it('keeps stdio sockets open until the daemon responds', async () => {
|
||||
const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), 'mcporter-daemon-client-'));
|
||||
const tmpDir = await makeShortTempDir('mcpd');
|
||||
const originalDir = process.env.MCPORTER_DAEMON_DIR;
|
||||
process.env.MCPORTER_DAEMON_DIR = tmpDir;
|
||||
const configPath = path.join(tmpDir, 'config.json');
|
||||
|
||||
24
tests/fixtures/test-helpers.ts
vendored
Normal file
24
tests/fixtures/test-helpers.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
import fs from 'node:fs/promises';
|
||||
import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
|
||||
// Generates a short-lived temp directory with a stable, short base to avoid
|
||||
// UNIX-domain socket length issues on macOS/Linux. On Windows we stick to the
|
||||
// platform temp dir.
|
||||
export async function makeShortTempDir(prefix: string): Promise<string> {
|
||||
const baseDir = process.platform === 'win32' ? os.tmpdir() : '/tmp';
|
||||
const dir = path.join(baseDir, `${prefix}-${Date.now().toString(36)}-${Math.random().toString(16).slice(2, 8)}`);
|
||||
await fs.mkdir(dir, { recursive: true });
|
||||
return dir;
|
||||
}
|
||||
|
||||
// Safely restore cwd when running under Vitest workers (which disallow chdir).
|
||||
export function restoreCwdSafely(originalCwd: string): void {
|
||||
try {
|
||||
process.chdir(originalCwd);
|
||||
} catch (error) {
|
||||
if (!(error instanceof Error) || !/chdir\(\) is not supported/.test(error.message)) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user