diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..f2f6681 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Run RepoSense Extension", + "type": "extensionHost", + "request": "launch", + "args": [ + "--extensionDevelopmentPath=${workspaceFolder}/vscode-extension" + ], + "outFiles": [ + "${workspaceFolder}/vscode-extension/out/**/*.js" + ] + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7d678a6 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "reposense.backendUrl": "https://bits-and-bobs-deployment-1.onrender.com" +} diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..19fadc5 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: pip install -r backend/requirements.txt && cd backend && gunicorn -k uvicorn.workers.UvicornWorker src.main:app --bind 0.0.0.0:$PORT --workers 1 diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 0000000..4b54d15 --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,26 @@ +FROM python:3.12-slim + +WORKDIR /app + +# Ensure git is available for repository cloning in production images +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update \ + && apt-get install -y --no-install-recommends git ca-certificates \ + && rm -rf /var/lib/apt/lists/* + +# Copy requirements (Render's root is set to backend/) +COPY requirements.txt . + +# Install dependencies +RUN pip install --no-cache-dir -r requirements.txt + +# Copy the source +COPY src ./src +COPY .env* ./ + +# Expose port +EXPOSE 8000 + +# Run the app (Render sets PORT, defaults to 8000) +# Use a single worker because job state is stored in memory. +CMD ["sh", "-c", "gunicorn -k uvicorn.workers.UvicornWorker src.main:app --bind 0.0.0.0:${PORT:-8000} --workers 1"] diff --git a/backend/Procfile b/backend/Procfile new file mode 100644 index 0000000..85fbda5 --- /dev/null +++ b/backend/Procfile @@ -0,0 +1 @@ +web: cd backend && gunicorn -k uvicorn.workers.UvicornWorker src.main:app --bind 0.0.0.0:$PORT --workers 1 diff --git a/backend/render.yaml b/backend/render.yaml new file mode 100644 index 0000000..10d6544 --- /dev/null +++ b/backend/render.yaml @@ -0,0 +1,8 @@ +# This file should be moved to repo root or use web service dashboard +# services: +# - type: web +# name: reposense-backend +# root: backend +# env: python +# buildCommand: pip install -r requirements.txt +# startCommand: gunicorn -k uvicorn.workers.UvicornWorker src.main:app --bind 0.0.0.0:$PORT --workers 1 diff --git a/backend/requirements.txt b/backend/requirements.txt index 7d25fa8..8c59d5c 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -14,3 +14,6 @@ python-dotenv==1.2.2 # Async Support asyncio==4.0.0 + +# Production WSGI server for Render +gunicorn==22.0.0 diff --git a/backend/runtime.txt b/backend/runtime.txt new file mode 100644 index 0000000..44f8fbe --- /dev/null +++ b/backend/runtime.txt @@ -0,0 +1 @@ +python-3.12.0 diff --git a/backend/src/config.py b/backend/src/config.py index 5b60598..03b4aed 100644 --- a/backend/src/config.py +++ b/backend/src/config.py @@ -19,7 +19,7 @@ class Settings(BaseSettings): watsonx_api_key: str = "" watsonx_project_id: str = "" watsonx_url: str = "https://us-south.ml.cloud.ibm.com" - watsonx_model_id: str = "meta-llama/llama-3-3-70b-instruct" + watsonx_model_id: str = "ibm/granite-8b-code-instruct" # WatsonX Orchestrate Configuration orchestrate_api_key: str = "" @@ -94,8 +94,10 @@ def validate_log_level(cls, v: str) -> str: raise ValueError(f'log_level must be one of {valid_levels}') return v_upper + # Only use .env file if it exists (for local dev), otherwise rely on OS env vars (for Render/production) + _env_file_path = Path(__file__).parent.parent / ".env" model_config = SettingsConfigDict( - env_file=str(Path(__file__).parent.parent / ".env"), + env_file=str(_env_file_path) if _env_file_path.exists() else None, env_file_encoding="utf-8", case_sensitive=False, extra="ignore" @@ -133,11 +135,30 @@ def is_configured(self) -> bool: return len(self.missing_fields()) == 0 +# Initialize settings and log configuration status (for debugging) +import logging +logger = logging.getLogger(__name__) + # Global settings instance # Note: This will fail at import time if required env vars are missing. # For testing or tooling that needs to import without loading config, # consider mocking or setting dummy env vars. settings = Settings() # type: ignore[call-arg] +logger.info(f"Config loaded. Orchestrate API key present: {bool(settings.orchestrate_api_key)}") +logger.info(f"Missing fields: {settings.missing_fields()}") + + +def reload_settings() -> Settings: + """ + Reload configuration from environment and update the shared settings object in place. + + This preserves object identity so modules that imported `settings` continue + to see fresh values after `/config/setup` updates. + """ + new_settings = Settings() # type: ignore[call-arg] + for key, value in new_settings.model_dump().items(): + setattr(settings, key, value) + return settings # Constants diff --git a/backend/src/main.py b/backend/src/main.py index 89be3ca..9800cec 100644 --- a/backend/src/main.py +++ b/backend/src/main.py @@ -5,6 +5,9 @@ import asyncio import os +import shutil +import subprocess +import tempfile from contextlib import asynccontextmanager from pathlib import Path from typing import Optional @@ -46,6 +49,7 @@ class ConfigSetupRequest(BaseModel): delete_job as delete_job_from_store ) from .orchestrate import orchestrate_analysis +from fastapi.responses import JSONResponse def validate_local_path(local_path: str) -> str: @@ -109,6 +113,59 @@ def validate_local_path(local_path: str) -> str: ) +def validate_repo_url(repo_url: str) -> str: + """Validate repository URL format for server-side clone analysis.""" + normalized = (repo_url or "").strip() + if not normalized: + raise HTTPException(status_code=400, detail="repo_url cannot be empty") + + valid_prefixes = ("https://", "http://", "git@") + if not normalized.startswith(valid_prefixes): + raise HTTPException( + status_code=400, + detail="repo_url must start with https://, http://, or git@" + ) + + return normalized + + +def clone_repo_to_temp(repo_url: str) -> tuple[str, str]: + """Clone repository to a temporary directory and return (repo_path, temp_root).""" + temp_root = tempfile.mkdtemp(prefix="reposense-") + repo_path = str(Path(temp_root) / "repo") + + try: + subprocess.run( + ["git", "clone", "--depth", "1", repo_url, repo_path], + check=True, + capture_output=True, + text=True, + timeout=180, + ) + except FileNotFoundError as e: + shutil.rmtree(temp_root, ignore_errors=True) + raise HTTPException(status_code=500, detail="git is not available on the backend server") from e + except subprocess.TimeoutExpired as e: + shutil.rmtree(temp_root, ignore_errors=True) + raise HTTPException(status_code=408, detail="Timed out while cloning repository") from e + except subprocess.CalledProcessError as e: + shutil.rmtree(temp_root, ignore_errors=True) + stderr = (e.stderr or "").strip() + message = stderr[:300] if stderr else "Unknown git clone error" + raise HTTPException(status_code=400, detail=f"Failed to clone repository: {message}") from e + + return repo_path, temp_root + + +async def run_analysis_with_optional_cleanup(job_id: str, local_path: str, temp_root: Optional[str] = None) -> None: + """Run analysis and cleanup temporary clone directory when applicable.""" + try: + await orchestrate_analysis(job_id=job_id, local_path=local_path) + finally: + if temp_root: + shutil.rmtree(temp_root, ignore_errors=True) + + @asynccontextmanager async def lifespan(app: FastAPI): """ @@ -171,8 +228,16 @@ async def analyze_codebase( Raises: HTTPException: If max concurrent jobs exceeded """ - # Validate and sanitize the local path - validated_path = validate_local_path(request.local_path) + validated_path: Optional[str] = None + temp_clone_root: Optional[str] = None + + if request.repo_url: + validated_repo_url = validate_repo_url(request.repo_url) + validated_path, temp_clone_root = clone_repo_to_temp(validated_repo_url) + elif request.local_path: + validated_path = validate_local_path(request.local_path) + else: + raise HTTPException(status_code=400, detail="Either local_path or repo_url is required") # Check concurrent job limit active_jobs = get_active_job_count() @@ -192,9 +257,10 @@ async def analyze_codebase( # Start background analysis with validated path background_tasks.add_task( - orchestrate_analysis, + run_analysis_with_optional_cleanup, job_id=job_id, - local_path=validated_path + local_path=validated_path, + temp_root=temp_clone_root, ) # Return immediate response with job_id and initial progress @@ -292,6 +358,37 @@ async def config_status(): } +@app.get("/config/test-orchestrate") +async def config_test_orchestrate(): + """Perform an IAM token exchange using the configured ORCHESTRATE_API_KEY. + + Returns the first bytes of the token on success, or a 400 with the error message. + """ + try: + from .orchestrate_client import get_orchestrate_client + client = get_orchestrate_client() + token = await client._get_iam_token() + return {"ok": True, "message": "IAM token obtained", "token_excerpt": (token[:16] + "...") if token else None} + except Exception as e: + return JSONResponse(status_code=400, content={"ok": False, "error": str(e)}) + + +@app.get("/config/test-watsonx") +async def config_test_watsonx(): + """Perform a minimal WatsonX call to validate WatsonX credentials and project. + + Returns an excerpt of the response on success, or a 400 with the error message. + """ + try: + from .watsonx import _call_watsonx + # Use a short prompt that should always succeed if credentials and project are valid + resp = await _call_watsonx("Say hello in one short sentence.") + excerpt = resp[:200] if isinstance(resp, str) else str(resp) + return {"ok": True, "message": "WatsonX responded", "response_excerpt": excerpt} + except Exception as e: + return JSONResponse(status_code=400, content={"ok": False, "error": str(e)}) + + @app.post("/config/setup") async def config_setup(body: ConfigSetupRequest): """ @@ -336,7 +433,7 @@ async def config_setup(body: ConfigSetupRequest): encoding="utf-8" ) - config_module.settings = config_module.Settings() + config_module.reload_settings() missing = config_module.settings.missing_fields() return { diff --git a/backend/src/models.py b/backend/src/models.py index a5292cf..7f16149 100644 --- a/backend/src/models.py +++ b/backend/src/models.py @@ -5,7 +5,7 @@ from enum import Enum from typing import Optional, Union -from pydantic import BaseModel +from pydantic import BaseModel, model_validator # ============================================================================ @@ -87,8 +87,17 @@ class ErrorCode(str, Enum): # ============================================================================ class AnalyzeRequest(BaseModel): - """Request to analyze a local codebase""" - local_path: str + """Request to analyze a local codebase path or remote repository URL.""" + local_path: Optional[str] = None + repo_url: Optional[str] = None + + @model_validator(mode="after") + def validate_source(self) -> "AnalyzeRequest": + has_local = bool(self.local_path and self.local_path.strip()) + has_repo = bool(self.repo_url and self.repo_url.strip()) + if not has_local and not has_repo: + raise ValueError("Either local_path or repo_url must be provided") + return self # ============================================================================ diff --git a/backend/src/orchestrate_client.py b/backend/src/orchestrate_client.py index 56af66e..59bd1bc 100644 --- a/backend/src/orchestrate_client.py +++ b/backend/src/orchestrate_client.py @@ -41,6 +41,10 @@ def __init__(self): async def _get_iam_token(self) -> str: """Exchange IBM Cloud API key for an IAM Bearer token, refreshing when near expiry.""" + if not self.api_key or not self.api_key.strip(): + raise ValueError( + "ORCHESTRATE_API_KEY is missing or empty. Open RepoSense setup and save your Orchestrate API key." + ) if self._iam_token and time.time() < self._iam_token_expiry - 60: return self._iam_token async with httpx.AsyncClient(timeout=30) as client: @@ -260,15 +264,29 @@ async def call_hardener_agent(self, prompt: str) -> Dict[str, Any]: _orchestrate_client: Optional[OrchestrateClient] = None +def _client_matches_settings(client: OrchestrateClient) -> bool: + """Return True when the cached client reflects current runtime settings.""" + return ( + client.api_key == settings.orchestrate_api_key + and client.base_url == settings.orchestrate_url.rstrip('/') + and client.architect_agent_id == settings.orchestrate_agent_architect_id + and client.reviewer_agent_id == settings.orchestrate_agent_reviewer_id + and client.documenter_agent_id == settings.orchestrate_agent_documenter_id + and client.hardener_agent_id == settings.orchestrate_agent_hardener_id + and client.environment_id == settings.orchestrate_environment_id + and client.instance_id == settings.orchestrate_instance_id + and client.timeout == settings.orchestrate_timeout + ) + + def get_orchestrate_client() -> OrchestrateClient: """ - Get or create the global Orchestrate client instance. - - Returns: - OrchestrateClient instance + Get the Orchestrate client, recreating it if settings changed at runtime. + + This avoids stale credentials after /config/setup updates. """ global _orchestrate_client - if _orchestrate_client is None: + if _orchestrate_client is None or not _client_matches_settings(_orchestrate_client): _orchestrate_client = OrchestrateClient() return _orchestrate_client diff --git a/render.yaml b/render.yaml new file mode 100644 index 0000000..e49fb60 --- /dev/null +++ b/render.yaml @@ -0,0 +1,7 @@ +services: + - type: web + name: reposense-backend + env: docker + root: backend + dockerfilePath: ./Dockerfile + envVars: [] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a38c76c --- /dev/null +++ b/requirements.txt @@ -0,0 +1,16 @@ +# Core Framework +fastapi +uvicorn[standard] +pydantic +pydantic-settings +# IBM WatsonX AI +ibm-watsonx-ai + +# HTTP Client +httpx + +# Environment Variables +python-dotenv + +# Async Support +asyncio diff --git a/runtime.txt b/runtime.txt new file mode 100644 index 0000000..546f3c8 --- /dev/null +++ b/runtime.txt @@ -0,0 +1 @@ +python-3.11.9 diff --git a/vscode-extension/LICENSE b/vscode-extension/LICENSE new file mode 100644 index 0000000..14fac91 --- /dev/null +++ b/vscode-extension/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vscode-extension/RELEASE_NOTES.md b/vscode-extension/RELEASE_NOTES.md new file mode 100644 index 0000000..44f61c6 --- /dev/null +++ b/vscode-extension/RELEASE_NOTES.md @@ -0,0 +1,248 @@ +# RepoSense VS Code Extension - Release Notes + +## Version 1.0.0 - May 17, 2026 + +### Release Overview + +RepoSense 1.0.0 is the first stable release of the RepoSense VS Code extension, now fully integrated with a cloud-deployed backend service. This release enables repository analysis and health scoring directly from VS Code with real-time progress tracking. + +### What's New + +- **Cloud-Deployed Backend**: Backend service now runs on Render at `https://bits-and-bobs-deployment-1.onrender.com` +- **No Local Setup Required**: Simply install the extension and start analyzing workspaces +- **Real-Time Progress Updates**: Watch analysis progress as it happens with step-by-step status +- **Comprehensive Health Scoring**: Get detailed repository health metrics including: + - Code quality score + - Security assessment + - Documentation coverage + - Architecture analysis + - Top priority recommendations +- **WebView Sidebar**: Dedicated sidebar panel for analysis results and configuration +- **Configurable Backend URL**: Option to override backend URL for custom deployments + +### Installation + +#### Option A: Install from VSIX File (Recommended for Testing) + +1. Download the `reposense-1.0.0.vsix` file from the release assets +2. Open Visual Studio Code +3. Press `Ctrl+Shift+X` (Windows/Linux) or `Cmd+Shift+X` (Mac) to open Extensions +4. Click the `...` menu at the top of the Extensions panel +5. Select **"Install from VSIX..."** +6. Navigate to and select `reposense-1.0.0.vsix` +7. VS Code will install the extension and reload + +#### Option B: Install from VS Code Marketplace (When Published) + +Coming soon! The extension will be published to the official VS Code Marketplace, allowing one-click installation directly from VS Code. + +### Quick Start + +1. **Open the RepoSense Sidebar**: + - Click the RepoSense icon in the Activity Bar (left sidebar) + - A new panel titled "RepoSense" will appear + +2. **Configure Backend (First Time Only)**: + - If the backend is not yet configured, you'll see a setup screen + - Enter your credentials for IBM WatsonX and Orchestrate (these are used by the backend for AI analysis) + - Click "Save Configuration" + +3. **Analyze Your Workspace**: + - Click "Analyze Workspace" button + - The extension will send your workspace folder to the Render backend + - Watch real-time progress updates: + - ✓ Parser complete + - ✓ Architect complete + - ✓ Code Review complete + - ✓ Documentation complete + - ✓ Security Hardening complete + - Results will display automatically when analysis completes + +4. **View Results**: + - **Health Score**: Overall repository health (0-100) with letter grade (A-F) + - **Score Breakdown**: Detailed metrics for quality, security, documentation, and architecture + - **Top Priorities**: Key recommendations to improve repository health + - **Full Analysis**: Click "Open Full Report" to see comprehensive analysis details + +### Backend Service Details + +The RepoSense backend runs on **Render** (PaaS platform) at: +``` +https://bits-and-bobs-deployment-1.onrender.com +``` + +#### Supported Endpoints + +- `POST /analyze` - Start a new codebase analysis +- `GET /jobs/{job_id}` - Check analysis status and retrieve results +- `DELETE /jobs/{job_id}` - Delete an analysis job +- `GET /config/status` - Check backend configuration status +- `POST /config/setup` - Configure backend credentials +- `POST /cleanup` - Manually trigger cleanup of old analysis jobs + +#### Backend Features + +- **Asynchronous Processing**: Long-running analyses run in background tasks +- **Job Management**: Automatic cleanup of old jobs (>24 hours) +- **Concurrent Job Limits**: Default limit of 5 concurrent analyses +- **CORS Support**: Backend accepts requests from any origin +- **Path Validation**: Secure path validation prevents unauthorized filesystem access + +#### Technology Stack + +- **Framework**: FastAPI 0.104.1 +- **Server**: Uvicorn + Gunicorn (4 workers on Render) +- **AI Integration**: IBM WatsonX AI 1.5.11 +- **Process Orchestration**: Orchestrate AI platform +- **Deployment**: Render (Docker container, Python 3.12) + +### Configuration + +#### Extension Settings + +Access via VS Code: `File → Preferences → Settings → Search "reposense"` + +- **`reposense.backendUrl`** (default: `https://bits-and-bobs-deployment-1.onrender.com`) + - The backend API server URL + - Change this if running a custom backend deployment + +- **`reposense.requestTimeoutMs`** (default: `30000`) + - HTTP request timeout in milliseconds + - Increase if analyses are timing out + +- **`reposense.pollingIntervalMs`** (default: `2000`) + - How often to poll backend for job status (milliseconds) + - Lower = more frequent updates (higher bandwidth/CPU) + +### Usage Scenarios + +#### Scenario 1: Repository Health Check +``` +1. Open a workspace in VS Code +2. Click RepoSense in Activity Bar +3. Click "Analyze Workspace" +4. Wait for analysis (~2-5 minutes depending on repo size) +5. Review health score and recommendations +``` + +#### Scenario 2: Pre-Commit Quality Gate +``` +Use the health score to ensure code quality before pushing: +- If score < 70, review top priorities before committing +- If score >= 80, proceed with confidence +``` + +#### Scenario 3: Technical Debt Assessment +``` +1. Analyze workspace quarterly +2. Track health score trends +3. Use top priorities to guide refactoring work +``` + +### Architecture + +``` +┌─────────────────────────────────────────┐ +│ VS Code Extension (Webview Sidebar) │ +│ │ +│ - User Interface │ +│ - Job Polling │ +│ - Results Display │ +└──────────────────┬──────────────────────┘ + │ HTTPS + ↓ +┌─────────────────────────────────────────┐ +│ Render Backend (Cloud Deployed) │ +│ https://bits-and-bobs-deployment... │ +│ │ +│ - FastAPI Server │ +│ - Job Management │ +│ - Analysis Orchestration │ +│ - WatsonX AI Integration │ +│ - Orchestrate Process Execution │ +└──────────────────┬──────────────────────┘ + │ (async background tasks) + ↓ +┌─────────────────────────────────────────┐ +│ Analysis Pipeline (on Backend) │ +│ │ +│ 1. Parser - Extract code structure │ +│ 2. Architect - Analyze architecture │ +│ 3. Reviewer - AI code review │ +│ 4. Documenter - Generate docs │ +│ 5. Hardener - Security analysis │ +└─────────────────────────────────────────┘ +``` + +### Performance & Limitations + +- **Analysis Time**: 2-5 minutes depending on repository size +- **Concurrent Jobs**: Max 5 per backend instance +- **Free Tier**: Render free tier is used; may experience cold starts (first request slower) +- **Workspace Size**: Works best with codebases < 1 GB +- **Supported Languages**: Python, TypeScript, JavaScript (extensible) + +### Troubleshooting + +#### Issue: "Backend unreachable" +- **Cause**: Render service may be in cold start or down +- **Solution**: Wait 30 seconds and retry; check https://bits-and-bobs-deployment-1.onrender.com in browser + +#### Issue: "Configuration incomplete" +- **Cause**: WatsonX or Orchestrate API keys not set on backend +- **Solution**: + 1. Contact backend administrator to configure credentials + 2. Or configure via Settings panel if you have backend credentials + +#### Issue: Analysis takes very long +- **Cause**: Large repository or backend overloaded +- **Solution**: + - Increase `reposense.requestTimeoutMs` setting + - Try analyzing a smaller workspace + - Wait and retry (backend may be processing other jobs) + +#### Issue: "Maximum concurrent jobs exceeded" +- **Cause**: Too many analyses running on backend +- **Solution**: Wait for other analyses to complete; Render cleans up old jobs automatically + +### Known Limitations + +- Extension only supports analyzing a single workspace folder +- Backend must be configured with WatsonX and Orchestrate API keys +- Analyses are retained for 24 hours on backend, then auto-deleted +- Cannot cancel running analyses from UI (will auto-complete or timeout) +- Repository credentials/secrets are never sent to backend; only code structure is analyzed + +### Future Roadmap + +- Multi-workspace analysis support +- Analysis history and trends tracking +- Custom rule configuration for code quality +- Local backend option (Docker container) +- Integration with GitHub Actions for CI/CD +- Detailed code visualization and navigation +- Performance benchmarking and profiling tools + +### Feedback & Support + +- **Report Issues**: GitHub Issues (when repo is public) +- **Feature Requests**: GitHub Discussions or email +- **Documentation**: See [README.md](README.md) for additional information + +### Technical Support + +For backend deployment questions or custom setups, refer to: +- Backend docs: `backend/README.md` (in repository) +- Render documentation: https://render.com/docs +- FastAPI docs: https://fastapi.tiangolo.com +- Extension development: https://code.visualstudio.com/api + +### License + +MIT License - See [LICENSE](LICENSE) file for details + +--- + +**Happy Analyzing! 🎉** + +For the best experience, ensure your workspace is committed to Git and has a clear project structure. diff --git a/vscode-extension/out/SidebarProvider.js b/vscode-extension/out/SidebarProvider.js index 1ba38f9..64f917e 100644 --- a/vscode-extension/out/SidebarProvider.js +++ b/vscode-extension/out/SidebarProvider.js @@ -31,6 +31,8 @@ const vscode = __importStar(require("vscode")); const node_fetch_1 = __importDefault(require("node-fetch")); const config_1 = require("./config"); const fs = __importStar(require("fs")); +const path = __importStar(require("path")); +const cp = __importStar(require("child_process")); class SidebarProvider { constructor(_extensionUri, _statusBarItem) { this._extensionUri = _extensionUri; @@ -40,6 +42,7 @@ class SidebarProvider { // Cache — keyed per workspace folder path this._cachedResult = null; this._cachedWorkspacePath = null; + this._activeAnalysisPath = null; } triggerAnalysis(force = false) { this._analyzeWorkspace(force); @@ -58,11 +61,6 @@ class SidebarProvider { webviewView.webview.onDidReceiveMessage(async (data) => { switch (data.type) { case 'ready': { - const status = await this._checkBackendConfig(); - if (status === 'not_configured') { - webviewView.webview.postMessage({ type: 'setup' }); - return; - } const currentPath = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath; if (currentPath && this._cachedWorkspacePath === currentPath && this._cachedResult) { this._handleResult(this._cachedResult); @@ -82,32 +80,6 @@ class SidebarProvider { case 'openFullView': this._openEditorPanel(); break; - case 'saveConfig': { - const msgData = data; - try { - await this._saveConfig(msgData.data); - const status = await this._checkBackendConfig(); - if (status === 'configured') { - const currentPath = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath; - if (currentPath) { - await this._analyzeWorkspace(false); - } - else { - webviewView.webview.postMessage({ type: 'idle' }); - } - } - else { - webviewView.webview.postMessage({ type: 'setup' }); - } - } - catch (error) { - webviewView.webview.postMessage({ - type: 'error', - message: `Failed to save configuration: ${error instanceof Error ? error.message : String(error)}` - }); - } - break; - } } }); } @@ -131,53 +103,26 @@ class SidebarProvider { } }); } - async _checkBackendConfig() { - try { - const config = (0, config_1.getConfig)(); - const response = await (0, node_fetch_1.default)(`${config.backendUrl}/config/status`, { - timeout: config.requestTimeoutMs - }); - if (!response.ok) { - return 'unavailable'; - } - const data = await response.json(); - return data.configured ? 'configured' : 'not_configured'; - } - catch { - return 'unavailable'; - } - } - async _saveConfig(configData) { - const config = (0, config_1.getConfig)(); - const response = await (0, node_fetch_1.default)(`${config.backendUrl}/config/setup`, { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify(configData), - timeout: config.requestTimeoutMs - }); - if (!response.ok) { - const text = await response.text(); - throw new Error(`HTTP ${response.status}: ${text}`); - } - } async _analyzeWorkspace(force = false) { - const workspaceFolders = vscode.workspace.workspaceFolders; - if (!workspaceFolders || workspaceFolders.length === 0) { + const analysisPath = await this._resolveAnalysisPath(); + if (!analysisPath) { this._statusBarItem.text = '$(error) RepoSense: Error'; if (this._view) { this._view.webview.postMessage({ type: 'error', - message: 'No workspace folder open' + message: 'No valid folder selected for analysis' }); } return; } - const workspacePath = workspaceFolders[0].uri.fsPath; // Clear cache when switching folders - if (workspacePath !== this._cachedWorkspacePath) { + if (analysisPath !== this._cachedWorkspacePath) { this._cachedResult = null; } + this._activeAnalysisPath = analysisPath; try { + const config = (0, config_1.getConfig)(); + const analyzeRequestBody = await this._buildAnalyzeRequestBody(config.backendUrl, config.remoteRepoUrl, analysisPath); // Send initial status if (this._view) { this._view.webview.postMessage({ @@ -194,18 +139,24 @@ class SidebarProvider { message: 'Starting analysis...' }); } - const config = (0, config_1.getConfig)(); // Send POST request to start analysis const response = await (0, node_fetch_1.default)(`${config.backendUrl}/analyze`, { method: 'POST', headers: { 'Content-Type': 'application/json', }, - body: JSON.stringify({ local_path: workspacePath }), + body: JSON.stringify(analyzeRequestBody), timeout: config.requestTimeoutMs }); if (!response.ok) { const errorText = await response.text(); + // Provide more actionable error for 404s (likely wrong backend URL or missing endpoint) + if (response.status === 404) { + throw new Error(`HTTP 404: Endpoint not found. Check that the backend URL is correct and the server exposes /analyze.`); + } + if (response.status === 400 && errorText.includes('Path does not exist')) { + throw new Error(`HTTP 400: Selected analysis path does not exist on this machine (${analysisPath}). Please choose an existing folder and retry.`); + } throw new Error(`HTTP error! status: ${response.status}, message: ${errorText}`); } const data = await response.json(); @@ -225,6 +176,89 @@ class SidebarProvider { } } } + async _resolveAnalysisPath() { + const workspacePath = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath; + if (workspacePath && this._isExistingDirectory(workspacePath)) { + return workspacePath; + } + const activeEditorPath = vscode.window.activeTextEditor?.document.uri.fsPath; + if (activeEditorPath) { + const fallbackFolder = this._isExistingDirectory(activeEditorPath) + ? activeEditorPath + : path.dirname(activeEditorPath); + if (this._isExistingDirectory(fallbackFolder)) { + return fallbackFolder; + } + } + const picked = await vscode.window.showOpenDialog({ + canSelectFiles: false, + canSelectFolders: true, + canSelectMany: false, + openLabel: 'Select Folder to Analyze' + }); + return picked?.[0]?.fsPath ?? null; + } + _isExistingDirectory(targetPath) { + try { + return fs.existsSync(targetPath) && fs.statSync(targetPath).isDirectory(); + } + catch { + return false; + } + } + async _buildAnalyzeRequestBody(backendUrl, configuredRemoteRepoUrl, analysisPath) { + if (this._isLocalBackend(backendUrl)) { + return { local_path: analysisPath }; + } + const explicitRepoUrl = configuredRemoteRepoUrl.trim(); + if (explicitRepoUrl) { + return { repo_url: explicitRepoUrl }; + } + const detectedRepoUrl = this._tryGetWorkspaceGitRemote(analysisPath); + if (detectedRepoUrl) { + return { repo_url: detectedRepoUrl }; + } + throw new Error(`Backend URL ${backendUrl} is remote. Set reposense.remoteRepoUrl to your Git repository URL ` + + '(for example, https://github.com/org/repo.git) so Render can clone and analyze it.'); + } + _tryGetWorkspaceGitRemote(analysisPath) { + try { + const output = cp.execFileSync('git', ['-C', analysisPath, 'remote', 'get-url', 'origin'], { + encoding: 'utf8', + timeout: 5000, + stdio: ['ignore', 'pipe', 'ignore'] + }).trim(); + if (!output) { + return null; + } + return this._normalizeGitRemoteUrl(output); + } + catch { + return null; + } + } + _normalizeGitRemoteUrl(remoteUrl) { + const trimmed = remoteUrl.trim(); + const sshMatch = /^git@([^:]+):(.+)$/.exec(trimmed); + if (sshMatch) { + const host = sshMatch[1]; + const repoPath = sshMatch[2]; + return `https://${host}/${repoPath}`; + } + return trimmed; + } + _isLocalBackend(backendUrl) { + const host = this._getBackendHost(backendUrl); + return !!host && (host === 'localhost' || host === '127.0.0.1' || host === '::1'); + } + _getBackendHost(backendUrl) { + try { + return new URL(backendUrl).hostname.toLowerCase(); + } + catch { + return null; + } + } _startPolling(jobId) { // Clear any existing polling interval if (this._pollingInterval) { @@ -302,7 +336,7 @@ class SidebarProvider { } // Store in cache this._cachedResult = result; - this._cachedWorkspacePath = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath ?? null; + this._cachedWorkspacePath = this._activeAnalysisPath; this._view.webview.postMessage({ type: 'results', data: result }); this._statusBarItem.text = `$(graph) RepoSense: Score ${result.score.score}/100`; vscode.window.showInformationMessage(`RepoSense: Analysis complete — Score ${result.score.score}/100`, 'View Details').then((selection) => { diff --git a/vscode-extension/out/SidebarProvider.js.map b/vscode-extension/out/SidebarProvider.js.map index 254d167..d15059b 100644 --- a/vscode-extension/out/SidebarProvider.js.map +++ b/vscode-extension/out/SidebarProvider.js.map @@ -1 +1 @@ -{"version":3,"file":"SidebarProvider.js","sourceRoot":"","sources":["../src/SidebarProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,4DAA+B;AAC/B,qCAAqC;AACrC,uCAAyB;AAsIzB,MAAa,eAAe;IAWxB,YACqB,aAAyB,EACzB,cAAoC;QADpC,kBAAa,GAAb,aAAa,CAAY;QACzB,mBAAc,GAAd,cAAc,CAAsB;QATjD,gBAAW,GAAW,CAAC,CAAC;QACf,gBAAW,GAAW,CAAC,CAAC;QAEzC,0CAA0C;QAClC,kBAAa,GAA0B,IAAI,CAAC;QAC5C,yBAAoB,GAA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CAAC;SACxE;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,OAAO;QACV,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACvB,aAAa,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;SACxC;IACL,CAAC;CACJ;AAtdD,0CAsdC;AAED,gBAAgB"} \ No newline at end of file diff --git a/vscode-extension/out/config.js b/vscode-extension/out/config.js index 5664300..1aa1a45 100644 --- a/vscode-extension/out/config.js +++ b/vscode-extension/out/config.js @@ -28,7 +28,8 @@ const vscode = __importStar(require("vscode")); function getConfig() { const config = vscode.workspace.getConfiguration('reposense'); return { - backendUrl: config.get('backendUrl', 'http://localhost:8000'), + backendUrl: config.get('backendUrl', 'https://bits-and-bobs-deployment-1.onrender.com'), + remoteRepoUrl: config.get('remoteRepoUrl', ''), requestTimeoutMs: config.get('requestTimeoutMs', 30000), pollingIntervalMs: config.get('pollingIntervalMs', 2000), }; diff --git a/vscode-extension/out/config.js.map b/vscode-extension/out/config.js.map index 9f95110..03260c3 100644 --- a/vscode-extension/out/config.js.map +++ b/vscode-extension/out/config.js.map @@ -1 +1 @@ -{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AAQjC,SAAgB,SAAS;IACrB,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC9D,OAAO;QACH,UAAU,EAAE,MAAM,CAAC,GAAG,CAAS,YAAY,EAAE,uBAAuB,CAAC;QACrE,gBAAgB,EAAE,MAAM,CAAC,GAAG,CAAS,kBAAkB,EAAE,KAAK,CAAC;QAC/D,iBAAiB,EAAE,MAAM,CAAC,GAAG,CAAS,mBAAmB,EAAE,IAAI,CAAC;KACnE,CAAC;AACN,CAAC;AAPD,8BAOC"} \ No newline at end of file +{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AASjC,SAAgB,SAAS;IACrB,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC9D,OAAO;QACH,UAAU,EAAE,MAAM,CAAC,GAAG,CAAS,YAAY,EAAE,iDAAiD,CAAC;QAC/F,aAAa,EAAE,MAAM,CAAC,GAAG,CAAS,eAAe,EAAE,EAAE,CAAC;QACtD,gBAAgB,EAAE,MAAM,CAAC,GAAG,CAAS,kBAAkB,EAAE,KAAK,CAAC;QAC/D,iBAAiB,EAAE,MAAM,CAAC,GAAG,CAAS,mBAAmB,EAAE,IAAI,CAAC;KACnE,CAAC;AACN,CAAC;AARD,8BAQC"} \ No newline at end of file diff --git a/vscode-extension/package-lock.json b/vscode-extension/package-lock.json index 400e4fa..6893faa 100644 --- a/vscode-extension/package-lock.json +++ b/vscode-extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "reposense", - "version": "0.0.1", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "reposense", - "version": "0.0.1", + "version": "1.0.0", "dependencies": { "node-fetch": "^2.7.0" }, @@ -17,7 +17,8 @@ "@typescript-eslint/eslint-plugin": "^5.45.0", "@typescript-eslint/parser": "^5.45.0", "eslint": "^8.28.0", - "typescript": "^4.9.3" + "typescript": "^4.9.3", + "vsce": "^2.0.0" }, "engines": { "vscode": "^1.74.0" @@ -494,6 +495,17 @@ "dev": true, "license": "MIT" }, + "node_modules/azure-devops-node-api": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-11.2.0.tgz", + "integrity": "sha512-XdiGPhrpaT5J8wdERRKs5g8E0Zy1pvOYTli7z9E8nmOn3YGp4FhtjhrOyFmX/8veWCwdI69mCHKJw6l+4J/bHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -501,6 +513,46 @@ "dev": true, "license": "MIT" }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true, + "license": "ISC" + }, "node_modules/brace-expansion": { "version": "1.1.14", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", @@ -525,6 +577,41 @@ "node": ">=8" } }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", @@ -539,6 +626,23 @@ "node": ">= 0.4" } }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -566,6 +670,57 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/cheerio": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.2.0.tgz", + "integrity": "sha512-WDrybc/gKFpTYQutKIK6UvfcuxijIZfMfXaYm8NMsPQxSYvf+13fXUJ4rztGGbJcBQ/GF55gvrZ0Bc0bj/mqvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "encoding-sniffer": "^0.2.1", + "htmlparser2": "^10.1.0", + "parse5": "^7.3.0", + "parse5-htmlparser2-tree-adapter": "^7.1.0", + "parse5-parser-stream": "^7.1.2", + "undici": "^7.19.0", + "whatwg-mimetype": "^4.0.0" + }, + "engines": { + "node": ">=20.18.1" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + } + }, + "node_modules/cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true, + "license": "ISC" + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -599,6 +754,16 @@ "node": ">= 0.8" } }, + "node_modules/commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -621,6 +786,36 @@ "node": ">= 8" } }, + "node_modules/css-select": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz", + "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-what": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz", + "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, "node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -639,6 +834,32 @@ } } }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -656,6 +877,16 @@ "node": ">=0.4.0" } }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -682,6 +913,65 @@ "node": ">=6.0.0" } }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dev": true, + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", + "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -697,6 +987,43 @@ "node": ">= 0.4" } }, + "node_modules/encoding-sniffer": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.1.tgz", + "integrity": "sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw==", + "dev": true, + "license": "MIT", + "dependencies": { + "iconv-lite": "^0.6.3", + "whatwg-encoding": "^3.1.1" + }, + "funding": { + "url": "https://github.com/fb55/encoding-sniffer?sponsor=1" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/es-define-property": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", @@ -954,6 +1281,16 @@ "node": ">=0.10.0" } }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "dev": true, + "license": "(MIT OR WTFPL)", + "engines": { + "node": ">=6" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -1015,6 +1352,16 @@ "reusify": "^1.0.4" } }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "pend": "~1.2.0" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -1097,6 +1444,13 @@ "node": ">= 6" } }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true, + "license": "MIT" + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1153,6 +1507,13 @@ "node": ">= 0.4" } }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", + "dev": true, + "license": "MIT" + }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -1297,62 +1658,149 @@ "node": ">= 0.4" } }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", "dev": true, - "license": "MIT", + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, "engines": { - "node": ">= 4" + "node": ">=10" } }, - "node_modules/import-fresh": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", - "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "node_modules/htmlparser2": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz", + "integrity": "sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==", "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], "license": "MIT", "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "entities": "^7.0.1" + } + }, + "node_modules/htmlparser2/node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "dev": true, + "license": "BSD-2-Clause", "engines": { - "node": ">=6" + "node": ">=0.12" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, "engines": { - "node": ">=0.8.19" + "node": ">=0.10.0" } }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true, "license": "ISC" }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "license": "ISC" + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -1437,6 +1885,18 @@ "dev": true, "license": "MIT" }, + "node_modules/keytar": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/keytar/-/keytar-7.9.0.tgz", + "integrity": "sha512-VPD8mtVtm5JNtA2AErl6Chp06JBfy7diFQ7TQQhdpWOl6MrCRB+eRbvAZUsbGQS9kiMq0coJsy0W0vHpDCkWsQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "node-addon-api": "^4.3.0", + "prebuild-install": "^7.0.1" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -1447,6 +1907,16 @@ "json-buffer": "3.0.1" } }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -1461,6 +1931,16 @@ "node": ">= 0.8.0" } }, + "node_modules/linkify-it": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "uc.micro": "^1.0.1" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -1484,6 +1964,46 @@ "dev": true, "license": "MIT" }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/markdown-it": { + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", + "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1", + "entities": "~2.1.0", + "linkify-it": "^3.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "bin": { + "markdown-it": "bin/markdown-it.js" + } + }, + "node_modules/markdown-it/node_modules/entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "dev": true, + "license": "BSD-2-Clause", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -1494,6 +2014,13 @@ "node": ">= 0.4" } }, + "node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", + "dev": true, + "license": "MIT" + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -1518,6 +2045,19 @@ "node": ">=8.6" } }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -1541,6 +2081,19 @@ "node": ">= 0.6" } }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/minimatch": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", @@ -1554,6 +2107,23 @@ "node": "*" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true, + "license": "MIT" + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -1561,6 +2131,20 @@ "dev": true, "license": "MIT" }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true, + "license": "ISC" + }, + "node_modules/napi-build-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz", + "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==", + "dev": true, + "license": "MIT" + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -1575,6 +2159,26 @@ "dev": true, "license": "MIT" }, + "node_modules/node-abi": { + "version": "3.92.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.92.0.tgz", + "integrity": "sha512-KdHvFWZjEKDf0cakgFjebl371GPsISX2oZHcuyKqM7DtogIsHrqKeLTo8wBHxaXRAQlY2PsPlZmfo+9ZCxEREQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-addon-api": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", + "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==", + "dev": true, + "license": "MIT" + }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -1595,6 +2199,32 @@ } } }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1668,6 +2298,79 @@ "node": ">=6" } }, + "node_modules/parse-semver": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/parse-semver/-/parse-semver-1.1.1.tgz", + "integrity": "sha512-Eg1OuNntBMH0ojvEKSrvDSnwLmvVuUOSdylH/pSCPNMIspLlweJyIWXCE+k/5hm3cj/EBUYwmWkjhBALNP4LXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^5.1.0" + } + }, + "node_modules/parse-semver/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/parse5": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "entities": "^6.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz", + "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "domhandler": "^5.0.3", + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-parser-stream": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", + "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", + "dev": true, + "license": "MIT", + "dependencies": { + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5/node_modules/entities": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -1708,6 +2411,13 @@ "node": ">=8" } }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true, + "license": "MIT" + }, "node_modules/picomatch": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", @@ -1721,6 +2431,34 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/prebuild-install": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz", + "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==", + "deprecated": "No longer maintained. Please contact the author of the relevant native addon; alternatives are available.", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^2.0.0", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -1731,6 +2469,17 @@ "node": ">= 0.8.0" } }, + "node_modules/pump": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz", + "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -1741,6 +2490,22 @@ "node": ">=6" } }, + "node_modules/qs": { + "version": "6.15.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.2.tgz", + "integrity": "sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -1762,16 +2527,70 @@ ], "license": "MIT" }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "integrity": "sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "mute-stream": "~0.0.4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/reusify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", @@ -1824,6 +2643,44 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/sax": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.6.0.tgz", + "integrity": "sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=11.0.0" + } + }, "node_modules/semver": { "version": "7.8.0", "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.0.tgz", @@ -1860,6 +2717,129 @@ "node": ">=8" } }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", + "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -1870,6 +2850,16 @@ "node": ">=8" } }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -1909,6 +2899,36 @@ "node": ">=8" } }, + "node_modules/tar-fs": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz", + "integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -1916,6 +2936,16 @@ "dev": true, "license": "MIT" }, + "node_modules/tmp": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz", + "integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.14" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -1958,6 +2988,29 @@ "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -1984,6 +3037,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typed-rest-client": { + "version": "1.8.11", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", + "integrity": "sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + }, "node_modules/typescript": { "version": "4.9.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", @@ -1998,6 +3063,30 @@ "node": ">=4.2.0" } }, + "node_modules/uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "dev": true, + "license": "MIT" + }, + "node_modules/underscore": { + "version": "1.13.8", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.8.tgz", + "integrity": "sha512-DXtD3ZtEQzc7M8m4cXotyHR+FAS18C64asBYY5vqZexfYryNNnDc02W4hKg3rdQuqOYas1jkseX0+nZXjTXnvQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/undici": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.25.0.tgz", + "integrity": "sha512-xXnp4kTyor2Zq+J1FfPI6Eq3ew5h6Vl0F/8d9XU5zZQf1tX9s2Su1/3PiMmUANFULpmksxkClamIZcaUqryHsQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.18.1" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -2008,12 +3097,174 @@ "punycode": "^2.1.0" } }, + "node_modules/url-join": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", + "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", + "dev": true, + "license": "MIT" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/vsce": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/vsce/-/vsce-2.15.0.tgz", + "integrity": "sha512-P8E9LAZvBCQnoGoizw65JfGvyMqNGlHdlUXD1VAuxtvYAaHBKLBdKPnpy60XKVDAkQCfmMu53g+gq9FM+ydepw==", + "deprecated": "vsce has been renamed to @vscode/vsce. Install using @vscode/vsce instead.", + "dev": true, + "license": "MIT", + "dependencies": { + "azure-devops-node-api": "^11.0.1", + "chalk": "^2.4.2", + "cheerio": "^1.0.0-rc.9", + "commander": "^6.1.0", + "glob": "^7.0.6", + "hosted-git-info": "^4.0.2", + "keytar": "^7.7.0", + "leven": "^3.1.0", + "markdown-it": "^12.3.2", + "mime": "^1.3.4", + "minimatch": "^3.0.3", + "parse-semver": "^1.1.1", + "read": "^1.0.7", + "semver": "^5.1.0", + "tmp": "^0.2.1", + "typed-rest-client": "^1.8.4", + "url-join": "^4.0.1", + "xml2js": "^0.4.23", + "yauzl": "^2.3.1", + "yazl": "^2.2.2" + }, + "bin": { + "vsce": "vsce" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/vsce/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/vsce/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/vsce/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/vsce/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/vsce/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/vsce/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/vsce/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/vsce/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", "license": "BSD-2-Clause" }, + "node_modules/whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "deprecated": "Use @exodus/bytes instead for a more spec-conformant and faster implementation", + "dev": true, + "license": "MIT", + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", @@ -2057,6 +3308,58 @@ "dev": true, "license": "ISC" }, + "node_modules/xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "dev": true, + "license": "MIT", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "node_modules/yazl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", + "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/vscode-extension/package.json b/vscode-extension/package.json index 394213b..b878875 100644 --- a/vscode-extension/package.json +++ b/vscode-extension/package.json @@ -2,7 +2,11 @@ "name": "reposense", "displayName": "RepoSense", "description": "Analyze workspace repositories and get health scores", - "version": "0.0.1", + "version": "1.0.0", + "repository": { + "type": "git", + "url": "https://github.com/yourusername/bits-and-bobs-deployment.git" + }, "engines": { "vscode": "^1.74.0" }, @@ -63,6 +67,11 @@ "default": "http://localhost:8000", "description": "URL of the RepoSense backend API server" }, + "reposense.remoteRepoUrl": { + "type": "string", + "default": "", + "description": "Repository URL for remote backend analysis (for example, https://github.com/org/repo.git). Used when backendUrl is not localhost." + }, "reposense.requestTimeoutMs": { "type": "number", "default": 30000, @@ -79,6 +88,7 @@ "scripts": { "vscode:prepublish": "npm run compile", "compile": "tsc -p ./", + "package": "vsce package", "watch": "tsc -watch -p ./", "pretest": "npm run compile && npm run lint", "lint": "eslint src --ext ts" @@ -91,6 +101,8 @@ "@typescript-eslint/parser": "^5.45.0", "eslint": "^8.28.0", "typescript": "^4.9.3" + , + "vsce": "^2.0.0" }, "dependencies": { "node-fetch": "^2.7.0" diff --git a/vscode-extension/reposense-1.0.0.vsix b/vscode-extension/reposense-1.0.0.vsix new file mode 100644 index 0000000..76a5092 Binary files /dev/null and b/vscode-extension/reposense-1.0.0.vsix differ diff --git a/vscode-extension/src/SidebarProvider.ts b/vscode-extension/src/SidebarProvider.ts index 255be0c..ab00d5c 100644 --- a/vscode-extension/src/SidebarProvider.ts +++ b/vscode-extension/src/SidebarProvider.ts @@ -2,6 +2,8 @@ import * as vscode from 'vscode'; import fetch from 'node-fetch'; import { getConfig } from './config'; import * as fs from 'fs'; +import * as path from 'path'; +import * as cp from 'child_process'; // Backend API Models (matching models.py) type PayloadType = 'request' | 'result' | 'error'; @@ -145,6 +147,7 @@ export class SidebarProvider implements vscode.WebviewViewProvider { // Cache — keyed per workspace folder path private _cachedResult: AnalysisResult | null = null; private _cachedWorkspacePath: string | null = null; + private _activeAnalysisPath: string | null = null; constructor( private readonly _extensionUri: vscode.Uri, @@ -173,11 +176,6 @@ export class SidebarProvider implements vscode.WebviewViewProvider { webviewView.webview.onDidReceiveMessage(async (data: { type: string }) => { switch (data.type) { case 'ready': { - const status = await this._checkBackendConfig(); - if (status === 'not_configured') { - webviewView.webview.postMessage({ type: 'setup' }); - return; - } const currentPath = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath; if (currentPath && this._cachedWorkspacePath === currentPath && this._cachedResult) { this._handleResult(this._cachedResult); @@ -195,29 +193,7 @@ export class SidebarProvider implements vscode.WebviewViewProvider { case 'openFullView': this._openEditorPanel(); break; - case 'saveConfig': { - const msgData = data as { type: string; data: Record }; - try { - await this._saveConfig(msgData.data); - const status = await this._checkBackendConfig(); - if (status === 'configured') { - const currentPath = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath; - if (currentPath) { - await this._analyzeWorkspace(false); - } else { - webviewView.webview.postMessage({ type: 'idle' }); - } - } else { - webviewView.webview.postMessage({ type: 'setup' }); - } - } catch (error) { - webviewView.webview.postMessage({ - type: 'error', - message: `Failed to save configuration: ${error instanceof Error ? error.message : String(error)}` - }); - } - break; - } + } }); } @@ -250,55 +226,33 @@ export class SidebarProvider implements vscode.WebviewViewProvider { }); } - private async _checkBackendConfig(): Promise<'configured' | 'not_configured' | 'unavailable'> { - try { - const config = getConfig(); - const response = await fetch(`${config.backendUrl}/config/status`, { - timeout: config.requestTimeoutMs - }); - if (!response.ok) { return 'unavailable'; } - const data = await response.json() as { configured: boolean }; - return data.configured ? 'configured' : 'not_configured'; - } catch { - return 'unavailable'; - } - } - private async _saveConfig(configData: Record) { - const config = getConfig(); - const response = await fetch(`${config.backendUrl}/config/setup`, { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify(configData), - timeout: config.requestTimeoutMs - }); - if (!response.ok) { - const text = await response.text(); - throw new Error(`HTTP ${response.status}: ${text}`); - } - } private async _analyzeWorkspace(force: boolean = false) { - const workspaceFolders = vscode.workspace.workspaceFolders; - if (!workspaceFolders || workspaceFolders.length === 0) { + + const analysisPath = await this._resolveAnalysisPath(); + if (!analysisPath) { this._statusBarItem.text = '$(error) RepoSense: Error'; if (this._view) { this._view.webview.postMessage({ type: 'error', - message: 'No workspace folder open' + message: 'No valid folder selected for analysis' }); } return; } - const workspacePath = workspaceFolders[0].uri.fsPath; - // Clear cache when switching folders - if (workspacePath !== this._cachedWorkspacePath) { + if (analysisPath !== this._cachedWorkspacePath) { this._cachedResult = null; } + this._activeAnalysisPath = analysisPath; + try { + const config = getConfig(); + const analyzeRequestBody = await this._buildAnalyzeRequestBody(config.backendUrl, config.remoteRepoUrl, analysisPath); + // Send initial status if (this._view) { this._view.webview.postMessage({ @@ -317,20 +271,25 @@ export class SidebarProvider implements vscode.WebviewViewProvider { }); } - const config = getConfig(); - // Send POST request to start analysis const response = await fetch(`${config.backendUrl}/analyze`, { method: 'POST', headers: { 'Content-Type': 'application/json', }, - body: JSON.stringify({ local_path: workspacePath }), + body: JSON.stringify(analyzeRequestBody), timeout: config.requestTimeoutMs }); if (!response.ok) { const errorText = await response.text(); + // Provide more actionable error for 404s (likely wrong backend URL or missing endpoint) + if (response.status === 404) { + throw new Error(`HTTP 404: Endpoint not found. Check that the backend URL is correct and the server exposes /analyze.`); + } + if (response.status === 400 && errorText.includes('Path does not exist')) { + throw new Error(`HTTP 400: Selected analysis path does not exist on this machine (${analysisPath}). Please choose an existing folder and retry.`); + } throw new Error(`HTTP error! status: ${response.status}, message: ${errorText}`); } @@ -354,6 +313,108 @@ export class SidebarProvider implements vscode.WebviewViewProvider { } } + private async _resolveAnalysisPath(): Promise { + const workspacePath = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath; + if (workspacePath && this._isExistingDirectory(workspacePath)) { + return workspacePath; + } + + const activeEditorPath = vscode.window.activeTextEditor?.document.uri.fsPath; + if (activeEditorPath) { + const fallbackFolder = this._isExistingDirectory(activeEditorPath) + ? activeEditorPath + : path.dirname(activeEditorPath); + if (this._isExistingDirectory(fallbackFolder)) { + return fallbackFolder; + } + } + + const picked = await vscode.window.showOpenDialog({ + canSelectFiles: false, + canSelectFolders: true, + canSelectMany: false, + openLabel: 'Select Folder to Analyze' + }); + + return picked?.[0]?.fsPath ?? null; + } + + private _isExistingDirectory(targetPath: string): boolean { + try { + return fs.existsSync(targetPath) && fs.statSync(targetPath).isDirectory(); + } catch { + return false; + } + } + + private async _buildAnalyzeRequestBody( + backendUrl: string, + configuredRemoteRepoUrl: string, + analysisPath: string + ): Promise<{ local_path?: string; repo_url?: string }> { + if (this._isLocalBackend(backendUrl)) { + return { local_path: analysisPath }; + } + + const explicitRepoUrl = configuredRemoteRepoUrl.trim(); + if (explicitRepoUrl) { + return { repo_url: explicitRepoUrl }; + } + + const detectedRepoUrl = this._tryGetWorkspaceGitRemote(analysisPath); + if (detectedRepoUrl) { + return { repo_url: detectedRepoUrl }; + } + + throw new Error( + `Backend URL ${backendUrl} is remote. Set reposense.remoteRepoUrl to your Git repository URL ` + + '(for example, https://github.com/org/repo.git) so Render can clone and analyze it.' + ); + } + + private _tryGetWorkspaceGitRemote(analysisPath: string): string | null { + try { + const output = cp.execFileSync('git', ['-C', analysisPath, 'remote', 'get-url', 'origin'], { + encoding: 'utf8', + timeout: 5000, + stdio: ['ignore', 'pipe', 'ignore'] + }).trim(); + + if (!output) { + return null; + } + + return this._normalizeGitRemoteUrl(output); + } catch { + return null; + } + } + + private _normalizeGitRemoteUrl(remoteUrl: string): string { + const trimmed = remoteUrl.trim(); + const sshMatch = /^git@([^:]+):(.+)$/.exec(trimmed); + if (sshMatch) { + const host = sshMatch[1]; + const repoPath = sshMatch[2]; + return `https://${host}/${repoPath}`; + } + + return trimmed; + } + + private _isLocalBackend(backendUrl: string): boolean { + const host = this._getBackendHost(backendUrl); + return !!host && (host === 'localhost' || host === '127.0.0.1' || host === '::1'); + } + + private _getBackendHost(backendUrl: string): string | null { + try { + return new URL(backendUrl).hostname.toLowerCase(); + } catch { + return null; + } + } + private _startPolling(jobId: string) { // Clear any existing polling interval if (this._pollingInterval) { @@ -451,7 +512,7 @@ export class SidebarProvider implements vscode.WebviewViewProvider { // Store in cache this._cachedResult = result; - this._cachedWorkspacePath = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath ?? null; + this._cachedWorkspacePath = this._activeAnalysisPath; this._view!.webview.postMessage({ type: 'results', data: result }); this._statusBarItem.text = `$(graph) RepoSense: Score ${result.score.score}/100`; diff --git a/vscode-extension/src/config.ts b/vscode-extension/src/config.ts index f9c7777..29f0967 100644 --- a/vscode-extension/src/config.ts +++ b/vscode-extension/src/config.ts @@ -2,6 +2,7 @@ import * as vscode from 'vscode'; interface RepoSenseConfig { backendUrl: string; + remoteRepoUrl: string; requestTimeoutMs: number; pollingIntervalMs: number; } @@ -9,7 +10,8 @@ interface RepoSenseConfig { export function getConfig(): RepoSenseConfig { const config = vscode.workspace.getConfiguration('reposense'); return { - backendUrl: config.get('backendUrl', 'http://localhost:8000'), + backendUrl: config.get('backendUrl', 'https://bits-and-bobs-deployment-1.onrender.com'), + remoteRepoUrl: config.get('remoteRepoUrl', ''), requestTimeoutMs: config.get('requestTimeoutMs', 30000), pollingIntervalMs: config.get('pollingIntervalMs', 2000), }; diff --git a/vscode-extension/webview/main.html b/vscode-extension/webview/main.html index 219bc5b..f20dba6 100644 --- a/vscode-extension/webview/main.html +++ b/vscode-extension/webview/main.html @@ -59,103 +59,6 @@ - - -