Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
"@types/node": "catalog:"
},
"patchedDependencies": {
"@npmcli/agent@4.0.0": "patches/@npmcli%2Fagent@4.0.0.patch",
"@standard-community/standard-openapi@0.2.9": "patches/@standard-community%2Fstandard-openapi@0.2.9.patch",
"solid-js@1.9.10": "patches/solid-js@1.9.10.patch"
}
Expand Down
1 change: 1 addition & 0 deletions packages/opencode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
"@lydell/node-pty": "catalog:",
"@modelcontextprotocol/sdk": "1.27.1",
"@npmcli/arborist": "9.4.0",
"@npmcli/config": "10.8.1",
"@octokit/graphql": "9.0.2",
"@octokit/rest": "catalog:",
"@openauthjs/openauth": "catalog:",
Expand Down
Empty file.
43 changes: 43 additions & 0 deletions packages/opencode/src/npmcli-config.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
declare module "@npmcli/config" {
type Data = Record<string, unknown>
type Where = "default" | "builtin" | "global" | "user" | "project" | "env" | "cli"

namespace Config {
interface Options {
definitions: Data
shorthands: Record<string, string | string[]>
npmPath: string
flatten?: (input: Data, flat?: Data) => Data
nerfDarts?: string[]
argv?: string[]
cwd?: string
env?: NodeJS.ProcessEnv
execPath?: string
platform?: NodeJS.Platform
warn?: boolean
}
}

class Config {
constructor(input: Config.Options)

readonly data: Map<Where, { source: string | null }>
readonly flat: Data

load(): Promise<void>
}

export = Config
}

declare module "@npmcli/config/lib/definitions" {
export const definitions: Record<string, unknown>
export const shorthands: Record<string, string | string[]>
export const flatten: (input: Record<string, unknown>, flat?: Record<string, unknown>) => Record<string, unknown>
export const nerfDarts: string[]
export const proxyEnv: string[]
}

declare module "@npmcli/config/lib/definitions/index.js" {
export * from "@npmcli/config/lib/definitions"
}
2 changes: 2 additions & 0 deletions packages/shared/src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ declare module "@npmcli/arborist" {
progress?: boolean
savePrefix?: string
ignoreScripts?: boolean
[key: string]: unknown
}

export interface ArboristNode {
Expand All @@ -24,6 +25,7 @@ declare module "@npmcli/arborist" {
add?: string[]
save?: boolean
saveType?: "prod" | "dev" | "optional" | "peer"
[key: string]: unknown
}

export class Arborist {
Expand Down
13 changes: 13 additions & 0 deletions patches/@npmcli%2Fagent@4.0.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/lib/agents.js b/lib/agents.js
index 45ec59c4c13757379095131c4f0a5ea6f7284f45..0763b031e355a755ec6a26f98461aa3f63b8339b 100644
--- a/lib/agents.js
+++ b/lib/agents.js
@@ -32,7 +32,7 @@ module.exports = class Agent extends AgentBase {
}

get proxy () {
- return this.#proxy ? { url: this.#proxy } : {}
+ return this.#proxy ? { url: this.#proxy.toString() } : {}
}

#getProxy (options) {
Loading