Fix browser runtime error by excluding Node.js env module from shared package exports

This commit is contained in:
Chris Scott committed 2025-12-15 15:04:53 -05:00
1 parent f962c0fe09
commit 5c0ba50e02
15 files changed
+15 -15

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
import { promises as fs } from 'fs'
import path from 'path'
import { getAuthPath } from '@opencode-manager/shared'
import { getAuthPath } from '@opencode-manager/shared/config/env'
import { logger } from '../utils/logger'
import { AuthCredentialsSchema } from '../../../shared/src/schemas/auth'
import type { z } from 'zod'
+1 -1
View File
@@ -1,7 +1,7 @@
import { promises as fs } from 'fs'
import path from 'path'
import { logger } from '../utils/logger'
import { getReposPath } from '@opencode-manager/shared'
import { getReposPath } from '@opencode-manager/shared/config/env'
export async function readFileContent(filePath: string): Promise<string> {
try {
+2 -1
View File
@@ -13,7 +13,8 @@ import {
getFileStats,
listDirectory
} from './file-operations'
import { FILE_LIMITS, ALLOWED_MIME_TYPES, getReposPath } from '@opencode-manager/shared'
import { getReposPath, FILE_LIMITS } from '@opencode-manager/shared/config/env'
import { ALLOWED_MIME_TYPES } from '@opencode-manager/shared'
import type { ChunkedFileInfo, PatchOperation } from '@opencode-manager/shared'
const SHARED_WORKSPACE_BASE = getReposPath()
@@ -3,7 +3,7 @@ import path from 'path'
import { logger } from '../utils/logger'
import { createGitHubGitEnv, createNoPromptGitEnv } from '../utils/git-auth'
import { SettingsService } from './settings'
import { getWorkspacePath, getOpenCodeConfigFilePath, ENV } from '@opencode-manager/shared'
import { getWorkspacePath, getOpenCodeConfigFilePath, ENV } from '@opencode-manager/shared/config/env'
import type { Database } from 'bun:sqlite'
const OPENCODE_SERVER_PORT = ENV.OPENCODE.PORT
+1 -1
View File
@@ -1,5 +1,5 @@
import { logger } from '../utils/logger'
import { ENV } from '@opencode-manager/shared'
import { ENV } from '@opencode-manager/shared/config/env'
const OPENCODE_SERVER_URL = `http://127.0.0.1:${ENV.OPENCODE.PORT}`
+1 -1
View File
@@ -6,7 +6,7 @@ import type { Repo, CreateRepoInput } from '../types/repo'
import { logger } from '../utils/logger'
import { SettingsService } from './settings'
import { createGitEnvForRepoUrl, createNoPromptGitEnv, createGitHubGitEnv } from '../utils/git-auth'
import { getReposPath } from '@opencode-manager/shared'
import { getReposPath } from '@opencode-manager/shared/config/env'
import path from 'path'
export class GitAuthenticationError extends Error {