mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
big format
This commit is contained in:
parent
8729edc5e0
commit
1ea3a8eb9b
183 changed files with 2629 additions and 2497 deletions
|
|
@ -77,7 +77,8 @@ async function regenerateWindowsCmdWrappers() {
|
|||
|
||||
// npm_config_global is string | undefined
|
||||
// if it exists, the value is true
|
||||
const isGlobal = process.env.npm_config_global === "true" || pkgPath.includes(path.join("npm", "node_modules"))
|
||||
const isGlobal =
|
||||
process.env.npm_config_global === "true" || pkgPath.includes(path.join("npm", "node_modules"))
|
||||
|
||||
// The npm rebuild command does 2 things - Execute lifecycle scripts and rebuild bin links
|
||||
// We want to skip lifecycle scripts to avoid infinite loops, so we use --ignore-scripts
|
||||
|
|
@ -93,7 +94,9 @@ async function regenerateWindowsCmdWrappers() {
|
|||
console.log("Successfully rebuilt npm bin links")
|
||||
} catch (error) {
|
||||
console.error("Error rebuilding npm links:", error.message)
|
||||
console.error("npm rebuild failed. You may need to manually run: npm rebuild opencode-ai --ignore-scripts")
|
||||
console.error(
|
||||
"npm rebuild failed. You may need to manually run: npm rebuild opencode-ai --ignore-scripts",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,12 +19,23 @@ const result = z.toJSONSchema(Config.Info, {
|
|||
const schema = ctx.jsonSchema
|
||||
|
||||
// Preserve strictness: set additionalProperties: false for objects
|
||||
if (schema && typeof schema === "object" && schema.type === "object" && schema.additionalProperties === undefined) {
|
||||
if (
|
||||
schema &&
|
||||
typeof schema === "object" &&
|
||||
schema.type === "object" &&
|
||||
schema.additionalProperties === undefined
|
||||
) {
|
||||
schema.additionalProperties = false
|
||||
}
|
||||
|
||||
// Add examples and default descriptions for string fields with defaults
|
||||
if (schema && typeof schema === "object" && "type" in schema && schema.type === "string" && schema?.default) {
|
||||
if (
|
||||
schema &&
|
||||
typeof schema === "object" &&
|
||||
"type" in schema &&
|
||||
schema.type === "string" &&
|
||||
schema?.default
|
||||
) {
|
||||
if (!schema.examples) {
|
||||
schema.examples = [schema.default]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue