fix(workspaces): finalize path portability and lint fixes

This commit is contained in:
mkorwel
2026-03-23 11:27:05 -07:00
parent 61034f4bc8
commit 99573ec504
10 changed files with 27 additions and 27 deletions
+3 -3
View File
@@ -6,11 +6,11 @@
import path from 'node:path';
import fs from 'node:fs';
import { spawnSync } from 'node:child_process';
import { fileURLToPath } from 'node:url';
import { ProviderFactory } from './providers/ProviderFactory.ts';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const REPO_ROOT = path.resolve(__dirname, '../../../..');
const REPO_ROOT = process.cwd();
const q = (str: string) => `'${str.replace(/'/g, "'\\''")}'`;
+3 -3
View File
@@ -6,11 +6,11 @@
import { spawnSync } from 'node:child_process';
import path from 'node:path';
import fs from 'node:fs';
import { fileURLToPath } from 'node:url';
import { ProviderFactory } from './providers/ProviderFactory.ts';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const REPO_ROOT = path.resolve(__dirname, '../../../..');
const REPO_ROOT = process.cwd();
export async function runChecker(
args: string[],
+3 -3
View File
@@ -5,12 +5,12 @@
*/
import path from 'node:path';
import fs from 'node:fs';
import { fileURLToPath } from 'node:url';
import readline from 'node:readline';
import { ProviderFactory } from './providers/ProviderFactory.ts';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const REPO_ROOT = path.resolve(__dirname, '../../../..');
const REPO_ROOT = process.cwd();
async function confirm(question: string): Promise<boolean> {
const rl = readline.createInterface({
+1 -1
View File
@@ -7,7 +7,7 @@
import { spawnSync } from 'child_process';
import path from 'path';
import fs from 'fs';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const prNumber = process.argv[2];
+3 -3
View File
@@ -6,11 +6,11 @@
import { spawnSync } from 'node:child_process';
import path from 'node:path';
import fs from 'node:fs';
import { fileURLToPath } from 'node:url';
import { ProviderFactory } from './providers/ProviderFactory.ts';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const REPO_ROOT = path.resolve(__dirname, '../../../..');
const REPO_ROOT = process.cwd();
const USER = process.env.USER || 'mattkorwel';
const INSTANCE_PREFIX = `gcli-workspace-${USER}`;
+3 -3
View File
@@ -6,10 +6,10 @@
import { spawnSync } from 'node:child_process';
import path from 'node:path';
import fs from 'node:fs';
import { fileURLToPath } from 'node:url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const REPO_ROOT = path.resolve(__dirname, '../../../..');
const REPO_ROOT = process.cwd();
export async function runLogs(args: string[]) {
const prNumber = args[0];
@@ -6,11 +6,11 @@
import { spawnSync } from 'node:child_process';
import path from 'node:path';
import fs from 'node:fs';
import { fileURLToPath } from 'node:url';
import { ProviderFactory } from './providers/ProviderFactory.ts';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const REPO_ROOT = path.resolve(__dirname, '../../../..');
const REPO_ROOT = process.cwd();
function q(str: string) {
return `'${str.replace(/'/g, "'\\''")}'`;
@@ -6,11 +6,11 @@
import { GceCosProvider } from './GceCosProvider.ts';
import type { WorkerProvider } from './BaseProvider.ts';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const REPO_ROOT = path.resolve(__dirname, '../../../../..');
const REPO_ROOT = process.cwd();
export class ProviderFactory {
static getProvider(config: {
+1 -1
View File
@@ -2,7 +2,7 @@ import { spawnSync } from 'child_process';
import path from 'path';
import fs from 'fs';
import os from 'os';
import { fileURLToPath } from 'url';
import readline from 'readline';
import { ProviderFactory } from './providers/ProviderFactory.ts';
+3 -3
View File
@@ -5,11 +5,11 @@
*/
import path from 'node:path';
import fs from 'node:fs';
import { fileURLToPath } from 'node:url';
import { ProviderFactory } from './providers/ProviderFactory.ts';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const REPO_ROOT = path.resolve(__dirname, '../../../..');
const REPO_ROOT = process.cwd();
async function runStatus(env: NodeJS.ProcessEnv = process.env) {
const settingsPath = path.join(REPO_ROOT, '.gemini/workspaces/settings.json');