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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "vendor/phenodocs"]
path = vendor/phenodocs
url = https://github.com/KooshaPari/phenodocs.git
1 change: 1 addition & 0 deletions docs/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@phenotype:registry=https://npm.pkg.github.com
98 changes: 47 additions & 51 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,55 +1,51 @@
import { defineConfig } from "vitepress";
import { createPhenotypeConfig } from "@phenotype/docs/config";

export default defineConfig({
export default createPhenotypeConfig({
title: "CLIProxyAPI++",
description: "CLIProxyAPI++ documentation",
base: process.env.GITHUB_ACTIONS ? "/cliproxyapi-plusplus/" : "/",
srcDir: ".",
lastUpdated: true,
cleanUrls: true,
ignoreDeadLinks: true,
themeConfig: {
nav: [
{ text: "Home", link: "/" },
{ text: "Wiki", link: "/wiki/" },
{ text: "Development Guide", link: "/development/" },
{ text: "Document Index", link: "/index/" },
{ text: "API", link: "/api/" },
{ text: "Roadmap", link: "/roadmap/" },
],
sidebar: [
{
text: "Guide",
items: [
{ text: "Overview", link: "/" },
{ text: "Getting Started", link: "/getting-started" },
{ text: "Install", link: "/install" },
{ text: "Provider Usage", link: "/provider-usage" },
{ text: "Provider Catalog", link: "/provider-catalog" },
{ text: "DevOps and CI/CD", link: "/operations/devops-cicd" },
{ text: "Provider Operations", link: "/provider-operations" },
{ text: "Troubleshooting", link: "/troubleshooting" },
{ text: "Planning Boards", link: "/planning/" }
]
},
{
text: "Reference",
items: [
{ text: "Routing and Models", link: "/routing-reference" },
{ text: "Feature Guides", link: "/features/" },
{ text: "Docsets", link: "/docsets/" }
]
},
{
text: "API",
items: [
{ text: "API Index", link: "/api/" },
{ text: "OpenAI-Compatible API", link: "/api/openai-compatible" },
{ text: "Management API", link: "/api/management" },
{ text: "Operations API", link: "/api/operations" }
]
}
],
search: { provider: 'local' },
socialLinks: [{ icon: 'github', link: 'https://github.com/KooshaPari/cliproxyapi-plusplus' }]
}
})
githubOrg: "KooshaPari",
githubRepo: "cliproxyapi-plusplus",
nav: [
{ text: "Home", link: "/" },
{ text: "Wiki", link: "/wiki/" },
{ text: "Development Guide", link: "/development/" },
{ text: "Document Index", link: "/index/" },
{ text: "API", link: "/api/" },
{ text: "Roadmap", link: "/roadmap/" },
],
sidebar: [
{
text: "Guide",
items: [
{ text: "Overview", link: "/" },
{ text: "Getting Started", link: "/getting-started" },
{ text: "Install", link: "/install" },
{ text: "Provider Usage", link: "/provider-usage" },
{ text: "Provider Catalog", link: "/provider-catalog" },
{ text: "DevOps and CI/CD", link: "/operations/devops-cicd" },
{ text: "Provider Operations", link: "/provider-operations" },
{ text: "Troubleshooting", link: "/troubleshooting" },
{ text: "Planning Boards", link: "/planning/" },
],
},
{
text: "Reference",
items: [
{ text: "Routing and Models", link: "/routing-reference" },
{ text: "Feature Guides", link: "/features/" },
{ text: "Docsets", link: "/docsets/" },
],
},
{
text: "API",
items: [
{ text: "API Index", link: "/api/" },
{ text: "OpenAI-Compatible API", link: "/api/openai-compatible" },
{ text: "Management API", link: "/api/management" },
{ text: "Operations API", link: "/api/operations" },
],
},
],
});
15 changes: 1 addition & 14 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
import DefaultTheme from "vitepress/theme";
import type { Theme } from "vitepress";
import CategorySwitcher from "./components/CategorySwitcher.vue";
import "./custom.css";

const theme: Theme = {
...DefaultTheme,
enhanceApp({ app }) {
app.component("CategorySwitcher", CategorySwitcher);
},
Layout: DefaultTheme.Layout,
};

export default theme;
export { default } from "@phenotype/docs/theme";
16 changes: 9 additions & 7 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
"private": true,
"type": "module",
"scripts": {
"docs:dev": "vitepress dev .",
"docs:build": "vitepress build .",
"docs:preview": "vitepress preview ."
"postinstall": "cd ../vendor/phenodocs/packages/docs && bun install",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Verify whether CI/workflows provision Bun before dependency installation
rg -n -C3 '\bbun\b|npm|pnpm|yarn|install|docs' .github/workflows || true

# Verify current toolchain declarations
rg -n -C3 '"postinstall"|packageManager|engines|bun install' docs/package.json package.json || true

Repository: KooshaPari/cliproxyapi-plusplus

Length of output: 10601


postinstall unconditionally requires Bun and breaks CI in pr-test-build.yml.

Line 6 executes bun install unconditionally. In .github/workflows/pr-test-build.yml, the docs-build job runs npm install without provisioning Bun first (lines 364), causing the postinstall hook to fail.

The docs.yml workflow mitigates this by setting up Bun before npm install (lines 31–37), but pr-test-build.yml does not.

Add Bun setup to pr-test-build.yml before the npm install step, or declare the toolchain requirement explicitly:

Suggested changes to docs/package.json
 {
   "name": "cliproxyapi-plusplus-docs",
   "private": true,
   "type": "module",
+  "packageManager": "bun@1.2.0",
+  "engines": {
+    "bun": ">=1.2.0"
+  },
   "scripts": {
     "postinstall": "cd ../vendor/phenodocs/packages/docs && bun install",
     "dev": "vitepress dev .",
     "build": "vitepress build .",
     "preview": "vitepress preview ."
   },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"postinstall": "cd ../vendor/phenodocs/packages/docs && bun install",
{
"name": "cliproxyapi-plusplus-docs",
"private": true,
"type": "module",
"packageManager": "bun@1.2.0",
"engines": {
"bun": ">=1.2.0"
},
"scripts": {
"postinstall": "cd ../vendor/phenodocs/packages/docs && bun install",
"dev": "vitepress dev .",
"build": "vitepress build .",
"preview": "vitepress preview ."
},
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/package.json` at line 6, The postinstall script "postinstall": "cd
../vendor/phenodocs/packages/docs && bun install" unconditionally requires Bun
and breaks the pr-test-build.yml job; either make the postinstall script guard
the bun call (run bun install only if bun is available, e.g., check for
bun/command existence before invoking) or add a Bun setup step in the
pr-test-build.yml workflow before the npm install step so Bun is provisioned for
the docs postinstall; update either the "postinstall" script or the CI job
accordingly and ensure the change references the existing "postinstall" entry
and the docs-build/pr-test-build.yml npm install step.

"dev": "vitepress dev .",
"build": "vitepress build .",
"preview": "vitepress preview ."
},
"devDependencies": {
"vitepress": "^1.6.4"
"dependencies": {
"@phenotype/docs": "file:../vendor/phenodocs/packages/docs"
},
"overrides": {
"esbuild": ">=0.25.0"
"devDependencies": {
"vitepress": "^1.6.4",
"vue": "^3.5.0"
}
}
1 change: 1 addition & 0 deletions vendor/phenodocs
Submodule phenodocs added at 35e0e9