YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix registeer cli
Louis Beaumont4e4ccfb99910
diff --git a/screenpipe-js/cli/dist/index.js b/screenpipe-js/cli/dist/index.jsindex 818cc3bd5..9018d9cb9 100755--- a/screenpipe-js/cli/dist/index.js+++ b/screenpipe-js/cli/dist/index.js@@ -438,14 +438,12 @@ import { Command as Command7 } from "commander";import fs2 from "fs";import { Command as Command3 } from "commander";import * as p4 from "@clack/prompts";-async function validateGitHubRepo(url2) {+function validateGitHubRepo(url2) {try {- const repoPath = url2.replace("https://github.com/", "").replace(/\/$/, "");- const apiUrl = `https://api.github.com/repos/${repoPath}`;- const response = await fetch(apiUrl, {- headers: { Accept: "application/vnd.github.v3+json" }- });- return response.status === 200;+ if (!url2.includes("github.com")) {+ return false;+ }+ return true;} catch (error) {return false;}@@ -493,7 +491,7 @@ var registerCommand = new Command3().name("register").description("register a nep4.intro(`${colors.highlight("\u26A0\uFE0F IMPORTANT: Publishing Process \u26A0\uFE0F")}`);const githubValidationSpinner = p4.spinner();githubValidationSpinner.start("Validating GitHub repository");- const isValidRepo = await validateGitHubRepo(opts.source);+ const isValidRepo = validateGitHubRepo(opts.source);if (!isValidRepo) {githubValidationSpinner.stop("GitHub validation failed");handleError(diff --git a/screenpipe-js/cli/package.json b/screenpipe-js/cli/package.jsonindex 02cc58069..583ba9d41 100644--- a/screenpipe-js/cli/package.json+++ b/screenpipe-js/cli/package.json@@ -1,6 +1,6 @@{"name": "@screenpipe/dev",- "version": "1.2.2",+ "version": "1.2.3","description": "screenpipe development CLI","type": "module","main": "dist/index.js",diff --git a/screenpipe-js/cli/src/commands/pipe/register.ts b/screenpipe-js/cli/src/commands/pipe/register.tsindex b042a184a..2411e395a 100644--- a/screenpipe-js/cli/src/commands/pipe/register.ts+++ b/screenpipe-js/cli/src/commands/pipe/register.ts@@ -8,17 +8,14 @@ import { handleError } from "../components/commands/add/utils/handle-error";import * as p from "@clack/prompts";// Function to validate GitHub repository existence-async function validateGitHubRepo(url: string): Promise<boolean> {+function validateGitHubRepo(url: string): boolean {try {- // GitHub API URL format: https://api.github.com/repos/{owner}/{repo}- const repoPath = url.replace("https://github.com/", "").replace(/\/$/, "");- const apiUrl = `https://api.github.com/repos/${repoPath}`;-- const response = await fetch(apiUrl, {- headers: { Accept: "application/vnd.github.v3+json" },- });+ // just check if contains github.com+ if (!url.includes("github.com")) {+ return false;+ }- return response.status === 200;+ return true;} catch (error) {return false;}@@ -89,7 +86,7 @@ export const registerCommand = new Command()const githubValidationSpinner = p.spinner();githubValidationSpinner.start("Validating GitHub repository");- const isValidRepo = await validateGitHubRepo(opts.source);+ const isValidRepo = validateGitHubRepo(opts.source);if (!isValidRepo) {githubValidationSpinner.stop("GitHub validation failed");handleError(