@bitclub.ai/opendesk-cli 0.1.4 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,21 +1,23 @@
1
1
  {
2
2
  "name": "@bitclub.ai/opendesk-cli",
3
- "version": "0.1.4",
3
+ "version": "0.2.0",
4
4
  "description": "OpenDesk CLI - An all-in-one ai studio for productivity scenarios",
5
5
  "license": "MulanPSL-2.0",
6
6
  "author": "uv0xab",
7
7
  "type": "module",
8
8
  "main": "./opendesk",
9
9
  "bin": {
10
- "opendesk": "./opendesk",
11
- "opendesk.cmd": "./opendesk.cmd",
12
- "opendesk.ps1": "./opendesk.ps1"
10
+ "opendesk": "./opendesk"
11
+ },
12
+ "scripts": {
13
+ "preinstall": "node preinstall.cjs"
13
14
  },
14
15
  "engines": {
15
16
  "node": ">=20.0.0"
16
17
  },
17
18
  "dependencies": {
18
19
  "number-to-alphabet": "^1.0.0",
19
- "vectra": "^0.11.1"
20
+ "vectra": "^0.11.1",
21
+ "esbuild": "^0.27.3"
20
22
  }
21
23
  }
package/preinstall.cjs ADDED
@@ -0,0 +1,9 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+ if (process.platform === 'win32') {
4
+ const target = path.join(__dirname, 'opendesk');
5
+ const content = fs.readFileSync(target, 'utf8');
6
+ if (content.startsWith('#!/bin/sh\n')) {
7
+ fs.writeFileSync(target, '#!/usr/bin/env node\n' + content.slice('#!/bin/sh\n'.length));
8
+ }
9
+ }
package/opendesk.cmd DELETED
@@ -1,31 +0,0 @@
1
- @echo off
2
- setlocal
3
- set "SCRIPT_DIR=%~dp0"
4
- set "OPENDESK_FILE=%SCRIPT_DIR%opendesk"
5
-
6
- REM Try to find node in PATH
7
- where node >nul 2>nul
8
- if %ERRORLEVEL% EQU 0 (
9
- node "%OPENDESK_FILE%" %*
10
- exit /b %ERRORLEVEL%
11
- )
12
-
13
- REM Try common node installation paths
14
- if exist "C:\Program Files\nodejs\node.exe" (
15
- "C:\Program Files\nodejs\node.exe" "%OPENDESK_FILE%" %*
16
- exit /b %ERRORLEVEL%
17
- )
18
-
19
- if exist "C:\Program Files (x86)\nodejs\node.exe" (
20
- "C:\Program Files (x86)\nodejs\node.exe" "%OPENDESK_FILE%" %*
21
- exit /b %ERRORLEVEL%
22
- )
23
-
24
- if exist "%LOCALAPPDATA%\Programs\nodejs\node.exe" (
25
- "%LOCALAPPDATA%\Programs\nodejs\node.exe" "%OPENDESK_FILE%" %*
26
- exit /b %ERRORLEVEL%
27
- )
28
-
29
- echo ERROR: node.exe not found in PATH or common installation locations
30
- echo Please install Node.js from https://nodejs.org/
31
- exit /b 1
package/opendesk.ps1 DELETED
@@ -1,8 +0,0 @@
1
- $ErrorActionPreference = "Stop"
2
-
3
- $scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Path
4
- $cmdScript = Join-Path $scriptPath "opendesk.cmd"
5
-
6
- # Delegate to the .cmd script to avoid duplicate logic
7
- & cmd.exe /c "`"$cmdScript`" $args"
8
- exit $LASTEXITCODE