@ottocode/server 0.1.188 → 0.1.189
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ottocode/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.189",
|
|
4
4
|
"description": "HTTP API server for ottocode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"typecheck": "tsc --noEmit"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@ottocode/sdk": "0.1.
|
|
33
|
-
"@ottocode/database": "0.1.
|
|
32
|
+
"@ottocode/sdk": "0.1.189",
|
|
33
|
+
"@ottocode/database": "0.1.189",
|
|
34
34
|
"drizzle-orm": "^0.44.5",
|
|
35
35
|
"hono": "^4.9.9",
|
|
36
36
|
"zod": "^4.1.8"
|
package/src/routes/files.ts
CHANGED
|
@@ -79,7 +79,7 @@ async function listFilesWithRg(
|
|
|
79
79
|
const allFiles = stdout.split('\n').filter(Boolean);
|
|
80
80
|
|
|
81
81
|
const filtered = allFiles.filter((f) => {
|
|
82
|
-
const filename = f.split(
|
|
82
|
+
const filename = f.split(/[\\/]/).pop() || f;
|
|
83
83
|
return !shouldExcludeFile(filename);
|
|
84
84
|
});
|
|
85
85
|
|
|
@@ -114,7 +114,7 @@ function matchesGitignorePattern(
|
|
|
114
114
|
): boolean {
|
|
115
115
|
for (const pattern of patterns) {
|
|
116
116
|
const cleanPattern = pattern.replace(/^\//, '').replace(/\/$/, '');
|
|
117
|
-
const pathParts = relativePath.split(
|
|
117
|
+
const pathParts = relativePath.split(/[\\/]/);
|
|
118
118
|
|
|
119
119
|
if (pattern.endsWith('/')) {
|
|
120
120
|
if (pathParts[0] === cleanPattern) return true;
|
package/src/routes/terminals.ts
CHANGED
|
@@ -28,7 +28,10 @@ export function registerTerminalsRoutes(
|
|
|
28
28
|
|
|
29
29
|
let resolvedCommand = command;
|
|
30
30
|
if (command === 'bash' || command === 'sh' || command === 'shell') {
|
|
31
|
-
resolvedCommand =
|
|
31
|
+
resolvedCommand =
|
|
32
|
+
process.platform === 'win32'
|
|
33
|
+
? process.env.COMSPEC || 'cmd.exe'
|
|
34
|
+
: process.env.SHELL || '/bin/bash';
|
|
32
35
|
}
|
|
33
36
|
const resolvedCwd = cwd || process.cwd();
|
|
34
37
|
|
|
@@ -104,7 +104,9 @@ export async function getProjectTree(projectRoot: string): Promise<string> {
|
|
|
104
104
|
const execAsync = promisify(exec);
|
|
105
105
|
|
|
106
106
|
const { stdout } = await execAsync(
|
|
107
|
-
|
|
107
|
+
process.platform === 'win32'
|
|
108
|
+
? 'git ls-files 2>NUL || dir /s /b /a:-d 2>NUL'
|
|
109
|
+
: 'git ls-files 2>/dev/null || find . -type f -not -path "*/node_modules/*" -not -path "*/.git/*" -not -path "*/dist/*" 2>/dev/null | head -100',
|
|
108
110
|
{ cwd: projectRoot, maxBuffer: 1024 * 1024 },
|
|
109
111
|
);
|
|
110
112
|
|