diff --git a/.gitignore b/.gitignore index 54278901..59dfb328 100644 --- a/.gitignore +++ b/.gitignore @@ -69,4 +69,8 @@ coverage/ .env frontend/dist -backend/bindings \ No newline at end of file +backend/bindings + +build_codesign_release.sh + +npx-cli/dist \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 8aba5e04..2011811a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,3 +12,5 @@ serde_json = "1.0" anyhow = "1.0" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } +openssl = { version = "0.10", features = ["vendored"] } +openssl-sys = { version = "0.9", features = ["vendored"] } \ No newline at end of file diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 28695d92..ac1714f0 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -33,6 +33,8 @@ mime_guess = "2.0" directories = "6.0.0" open = "5.3.2" ignore = "0.4" +openssl = { workspace = true } +openssl-sys = { workspace = true } [build-dependencies] ts-rs = { version = "9.0", features = ["uuid-impl", "chrono-impl"] } diff --git a/npx-cli/bin/cli.js b/npx-cli/bin/cli.js new file mode 100755 index 00000000..4d38bd52 --- /dev/null +++ b/npx-cli/bin/cli.js @@ -0,0 +1,39 @@ +#!/usr/bin/env node + +const { execSync } = require('child_process'); +const path = require('path'); +const fs = require('fs'); + +// Check if system is app-darwin-arm64 +const platform = process.platform; +const arch = process.arch; + +if (platform !== 'darwin' || arch !== 'arm64') { + console.error('❌ This package only supports macOS ARM64 (Apple Silicon) systems.'); + console.error(`Current system: ${platform}-${arch}`); + process.exit(1); +} + +try { + const zipPath = path.join(__dirname, '..', 'dist', 'app-darwin-arm64', 'vibe-kanban.zip'); + const extractDir = path.join(__dirname, '..', 'dist', 'app-darwin-arm64'); + + // Check if zip file exists + if (!fs.existsSync(zipPath)) { + console.error('❌ vibe-kanban.zip not found at:', zipPath); + process.exit(1); + } + + // Unzip the file + console.log('📦 Extracting vibe-kanban...'); + execSync(`unzip -o "${zipPath}" -d "${extractDir}"`, { stdio: 'inherit' }); + + // Execute the binary + const binaryPath = path.join(extractDir, 'vibe-kanban'); + console.log('🚀 Launching vibe-kanban...'); + execSync(`"${binaryPath}"`, { stdio: 'inherit' }); + +} catch (error) { + console.error('❌ Error running vibe-kanban:', error.message); + process.exit(1); +} diff --git a/npx-cli/package.json b/npx-cli/package.json new file mode 100644 index 00000000..55baf16b --- /dev/null +++ b/npx-cli/package.json @@ -0,0 +1,16 @@ +{ + "name": "vibe-kanban", + "private": false, + "version": "0.0.3", + "main": "index.js", + "bin": { + "my-npx-cli": "bin/cli.js" + }, + "keywords": [], + "author": "bloop", + "license": "", + "description": "NPX wrapper around vibe-kanban", + "files": [ + "dist" + ] +}