fix(workspaces): clean up distractors and fix ESM runtime errors

This commit is contained in:
mkorwel
2026-03-23 11:15:57 -07:00
parent b2fe426d90
commit 9a19cd67ea
14 changed files with 646 additions and 455 deletions
@@ -5,16 +5,25 @@
*/
import { GceCosProvider } from './GceCosProvider.ts';
import { WorkspaceProvider } from './BaseProvider.ts';
import path from 'path';
import { fileURLToPath } from 'url';
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, '../../../../..');
export class ProviderFactory {
static getProvider(config: { projectId: string; zone: string; instanceName: string }): WorkspaceProvider {
static getProvider(config: {
projectId: string;
zone: string;
instanceName: string;
}): WorkerProvider {
// Currently we only have GceCosProvider, but this is where we'd branch
return new GceCosProvider(config.projectId, config.zone, config.instanceName, REPO_ROOT);
return new GceCosProvider(
config.projectId,
config.zone,
config.instanceName,
REPO_ROOT,
);
}
}