omnish 2.1.7 → 2.1.8
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/CHANGELOG.md +9 -0
- package/README.md +12 -4
- package/contrib/install-omnish.sh +185 -0
- package/dist/downloads/omnish-claude.tar.gz +0 -0
- package/dist/downloads/omnish-cursor.tar.gz +0 -0
- package/dist/index.js +187 -187
- package/package.json +4 -3
- package/scripts/node-version.cjs +51 -64
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.1.8] - 2026-07-11
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **Self-service install on old Node:** bootstrap script ships in the npm tarball; preinstall errors lead with `curl -fsSL https://unpkg.com/omnish@<version>/contrib/install-omnish.sh | bash` (no private GitHub raw URL). EBADENGINE flood is called out as ignorable noise.
|
|
15
|
+
- **`contrib/install-omnish.sh`:** Debian/Ubuntu VPS uses NodeSource first (replaces apt Node 12), installs `build-essential` for native modules, prints next steps after install.
|
|
16
|
+
- **Docs/README:** install section split into “already on Node 22” vs “old Node — run bootstrap”.
|
|
17
|
+
|
|
10
18
|
## [2.1.7] - 2026-07-11
|
|
11
19
|
|
|
12
20
|
### Added
|
|
@@ -93,6 +101,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
93
101
|
|
|
94
102
|
- Documentation and formatting updates across chat components and feature docs.
|
|
95
103
|
|
|
104
|
+
[2.1.8]: https://github.com/labKnowledge/omnish/compare/v2.1.7...v2.1.8
|
|
96
105
|
[2.1.7]: https://github.com/labKnowledge/omnish/compare/v2.1.6...v2.1.7
|
|
97
106
|
[2.1.6]: https://github.com/labKnowledge/omnish/compare/v2.1.5...v2.1.6
|
|
98
107
|
[2.1.5]: https://github.com/labKnowledge/omnish/compare/v2.1.4...v2.1.5
|
package/README.md
CHANGED
|
@@ -109,11 +109,9 @@ Names are alphanumeric plus `_`/`-`, max 32 characters; several names are reserv
|
|
|
109
109
|
|
|
110
110
|
## Install from npm
|
|
111
111
|
|
|
112
|
-
**Requires Node.js 22.13+** (`node -v`).
|
|
112
|
+
**Requires Node.js 22.13+** (`node -v`).
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
curl -fsSL https://raw.githubusercontent.com/labKnowledge/omnish/main/contrib/install-omnish.sh | bash
|
|
116
|
-
```
|
|
114
|
+
### Already on Node 22.13+
|
|
117
115
|
|
|
118
116
|
```bash
|
|
119
117
|
npm install -g omnish
|
|
@@ -122,6 +120,16 @@ omnish allow +YOUR_E164
|
|
|
122
120
|
omnish run
|
|
123
121
|
```
|
|
124
122
|
|
|
123
|
+
### Old Node (VPS with apt Node 12, etc.)
|
|
124
|
+
|
|
125
|
+
`npm install -g omnish` will fail on Node below 22.13 — that is expected. **Run the bootstrap installer instead** (upgrades Node, installs build tools on Debian/Ubuntu, then `npm install -g omnish`):
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
curl -fsSL https://unpkg.com/omnish/contrib/install-omnish.sh | bash
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
The script is published in the npm package (no GitHub clone required). If `npm install -g omnish` failed, the error message prints the same one-liner with your package version.
|
|
132
|
+
|
|
125
133
|
**Single phone:** omnish runs on a PC or server; you link it like WhatsApp Web (one QR scan on your phone). See [Quick start — One phone with WhatsApp](docs/guides/quick-start.md#one-phone-with-whatsapp).
|
|
126
134
|
|
|
127
135
|
**npm 11+ install warnings:** You may see advisory `allow-scripts` notices for native dependencies (`node-pty`, `better-sqlite3`, etc.). Install still succeeds; omnish pre-declares these in `allowScripts`. The `prebuild-install` deprecation warning comes from upstream native modules and is harmless.
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Bootstrap omnish install: ensure Node 22.13+, then npm install -g omnish.
|
|
3
|
+
# Served from npm (unpkg) — see scripts/node-version.cjs readBootstrapInstallScriptUrl().
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
OMNISH_NPM_SPEC="${OMNISH_NPM_SPEC:-omnish}"
|
|
7
|
+
NODE_MAJOR="${OMNISH_NODE_MAJOR:-22}"
|
|
8
|
+
NVM_INSTALL_URL="${NVM_INSTALL_URL:-https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh}"
|
|
9
|
+
|
|
10
|
+
need() {
|
|
11
|
+
command -v "$1" >/dev/null 2>&1 || {
|
|
12
|
+
echo "error: required command not found: $1" >&2
|
|
13
|
+
exit 1
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
is_debian_ubuntu() {
|
|
18
|
+
[[ -f /etc/debian_version ]] && command -v apt-get >/dev/null 2>&1
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
node_version_ok() {
|
|
22
|
+
node -e "
|
|
23
|
+
const [maj, min] = process.versions.node.split('.').map(Number);
|
|
24
|
+
const ok = maj > 22 || (maj === 22 && min >= 13);
|
|
25
|
+
process.exit(ok ? 0 : 1);
|
|
26
|
+
" 2>/dev/null
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
current_node() {
|
|
30
|
+
if command -v node >/dev/null 2>&1; then
|
|
31
|
+
node -v
|
|
32
|
+
else
|
|
33
|
+
echo "(not installed)"
|
|
34
|
+
fi
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
install_omnish() {
|
|
38
|
+
need npm
|
|
39
|
+
echo ""
|
|
40
|
+
echo "Installing ${OMNISH_NPM_SPEC} with Node $(node -v) …"
|
|
41
|
+
npm install -g "${OMNISH_NPM_SPEC}"
|
|
42
|
+
echo ""
|
|
43
|
+
echo "Done. Next steps:"
|
|
44
|
+
echo " omnish --version"
|
|
45
|
+
echo " omnish link # WhatsApp QR or --tg for Telegram"
|
|
46
|
+
echo " omnish allow +E164 # your phone number"
|
|
47
|
+
echo " omnish start"
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
ensure_build_deps() {
|
|
51
|
+
if ! is_debian_ubuntu; then
|
|
52
|
+
return 0
|
|
53
|
+
fi
|
|
54
|
+
echo "Installing build tools for native modules (better-sqlite3, node-pty) …"
|
|
55
|
+
export DEBIAN_FRONTEND=noninteractive
|
|
56
|
+
apt-get update -qq
|
|
57
|
+
apt-get install -y build-essential python3 curl ca-certificates
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
load_nvm() {
|
|
61
|
+
if [[ -s "${NVM_DIR:-$HOME/.nvm}/nvm.sh" ]]; then
|
|
62
|
+
# shellcheck source=/dev/null
|
|
63
|
+
. "${NVM_DIR:-$HOME/.nvm}/nvm.sh"
|
|
64
|
+
return 0
|
|
65
|
+
fi
|
|
66
|
+
return 1
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
try_nvm() {
|
|
70
|
+
if load_nvm; then
|
|
71
|
+
echo "Using nvm to install Node ${NODE_MAJOR} and set default …"
|
|
72
|
+
nvm install "${NODE_MAJOR}"
|
|
73
|
+
nvm alias default "${NODE_MAJOR}"
|
|
74
|
+
nvm use default
|
|
75
|
+
return 0
|
|
76
|
+
fi
|
|
77
|
+
return 1
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
try_fnm() {
|
|
81
|
+
if command -v fnm >/dev/null 2>&1; then
|
|
82
|
+
echo "Using fnm to install Node ${NODE_MAJOR} and set default …"
|
|
83
|
+
fnm install "${NODE_MAJOR}"
|
|
84
|
+
fnm default "${NODE_MAJOR}"
|
|
85
|
+
eval "$(fnm env)"
|
|
86
|
+
return 0
|
|
87
|
+
fi
|
|
88
|
+
return 1
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
try_nodesource() {
|
|
92
|
+
if ! is_debian_ubuntu; then
|
|
93
|
+
return 1
|
|
94
|
+
fi
|
|
95
|
+
need curl
|
|
96
|
+
echo "Using NodeSource to install Node ${NODE_MAJOR}.x (replaces old apt node) …"
|
|
97
|
+
curl -fsSL "https://deb.nodesource.com/setup_${NODE_MAJOR}.x" | bash -
|
|
98
|
+
apt-get install -y nodejs
|
|
99
|
+
hash -r 2>/dev/null || true
|
|
100
|
+
return 0
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
install_nvm() {
|
|
104
|
+
need curl
|
|
105
|
+
echo "nvm not found — installing nvm …"
|
|
106
|
+
curl -fsSL "${NVM_INSTALL_URL}" | bash
|
|
107
|
+
load_nvm || {
|
|
108
|
+
echo "error: nvm install finished but nvm.sh is missing. Open a new shell and re-run this script." >&2
|
|
109
|
+
exit 1
|
|
110
|
+
}
|
|
111
|
+
nvm install "${NODE_MAJOR}"
|
|
112
|
+
nvm alias default "${NODE_MAJOR}"
|
|
113
|
+
nvm use default
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
print_manual_help() {
|
|
117
|
+
cat <<EOF
|
|
118
|
+
|
|
119
|
+
omnish needs Node.js 22.13 or newer.
|
|
120
|
+
You have: $(current_node)
|
|
121
|
+
|
|
122
|
+
Automatic upgrade failed. Pick one path:
|
|
123
|
+
|
|
124
|
+
Debian/Ubuntu VPS (replaces old apt node, e.g. v12):
|
|
125
|
+
curl -fsSL https://deb.nodesource.com/setup_${NODE_MAJOR}.x | bash -
|
|
126
|
+
apt-get install -y nodejs build-essential python3
|
|
127
|
+
node -v
|
|
128
|
+
npm install -g ${OMNISH_NPM_SPEC}
|
|
129
|
+
|
|
130
|
+
nvm:
|
|
131
|
+
curl -o- ${NVM_INSTALL_URL} | bash
|
|
132
|
+
# restart shell
|
|
133
|
+
nvm install ${NODE_MAJOR}
|
|
134
|
+
nvm alias default ${NODE_MAJOR}
|
|
135
|
+
npm install -g ${OMNISH_NPM_SPEC}
|
|
136
|
+
|
|
137
|
+
Official installers:
|
|
138
|
+
https://nodejs.org/en/download
|
|
139
|
+
|
|
140
|
+
EOF
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
main() {
|
|
144
|
+
echo "omnish installer — Node $(current_node) (need 22.13+)"
|
|
145
|
+
|
|
146
|
+
if command -v node >/dev/null 2>&1 && node_version_ok; then
|
|
147
|
+
install_omnish
|
|
148
|
+
exit 0
|
|
149
|
+
fi
|
|
150
|
+
|
|
151
|
+
# Debian/Ubuntu VPS (common: distro Node 12 from apt) — NodeSource first.
|
|
152
|
+
if is_debian_ubuntu; then
|
|
153
|
+
ensure_build_deps
|
|
154
|
+
if try_nodesource && node_version_ok; then
|
|
155
|
+
install_omnish
|
|
156
|
+
exit 0
|
|
157
|
+
fi
|
|
158
|
+
fi
|
|
159
|
+
|
|
160
|
+
if try_nvm || try_fnm; then
|
|
161
|
+
if node_version_ok; then
|
|
162
|
+
install_omnish
|
|
163
|
+
exit 0
|
|
164
|
+
fi
|
|
165
|
+
fi
|
|
166
|
+
|
|
167
|
+
if try_nodesource && node_version_ok; then
|
|
168
|
+
install_omnish
|
|
169
|
+
exit 0
|
|
170
|
+
fi
|
|
171
|
+
|
|
172
|
+
if [[ "$(uname -s)" != "MINGW"* && "$(uname -s)" != "MSYS"* && "$(uname -s)" != "CYGWIN"* ]]; then
|
|
173
|
+
if install_nvm; then
|
|
174
|
+
if node_version_ok; then
|
|
175
|
+
install_omnish
|
|
176
|
+
exit 0
|
|
177
|
+
fi
|
|
178
|
+
fi
|
|
179
|
+
fi
|
|
180
|
+
|
|
181
|
+
print_manual_help
|
|
182
|
+
exit 1
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
main "$@"
|
|
Binary file
|
|
Binary file
|