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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnish",
3
- "version": "2.1.7",
3
+ "version": "2.1.8",
4
4
  "description": "omnish — allowlisted inbox → your real shell (WhatsApp, Telegram, Discord, Slack, and 20+ channels). No AI.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -17,10 +17,10 @@
17
17
  ],
18
18
  "repository": {
19
19
  "type": "git",
20
- "url": "git+https://github.com/eligapris/omnish.git"
20
+ "url": "git+https://github.com/labKnowledge/omnish.git"
21
21
  },
22
22
  "bugs": {
23
- "url": "https://github.com/eligapris/omnish/issues"
23
+ "url": "https://github.com/labKnowledge/omnish/issues"
24
24
  },
25
25
  "homepage": "https://omnish.dev",
26
26
  "files": [
@@ -31,6 +31,7 @@
31
31
  "scripts/check-node-version.cjs",
32
32
  "scripts/node-version.cjs",
33
33
  "scripts/fix-node-pty-perms.mjs",
34
+ "contrib/install-omnish.sh",
34
35
  "README.md",
35
36
  "CHANGELOG.md",
36
37
  "LICENSE",
@@ -11,18 +11,30 @@ var path = require("path");
11
11
  var DEFAULT_ENGINES_NODE = ">=22.13";
12
12
  var RECOMMENDED_NODE = "22";
13
13
 
14
- function readEnginesNode() {
14
+ function readPackageJson() {
15
15
  try {
16
- var pkg = JSON.parse(
16
+ return JSON.parse(
17
17
  fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf8"),
18
18
  );
19
- if (pkg.engines && typeof pkg.engines.node === "string") {
20
- return pkg.engines.node;
21
- }
22
- return DEFAULT_ENGINES_NODE;
23
19
  } catch (err) {
24
- return DEFAULT_ENGINES_NODE;
20
+ return null;
21
+ }
22
+ }
23
+
24
+ function readEnginesNode() {
25
+ var pkg = readPackageJson();
26
+ if (pkg && pkg.engines && typeof pkg.engines.node === "string") {
27
+ return pkg.engines.node;
25
28
  }
29
+ return DEFAULT_ENGINES_NODE;
30
+ }
31
+
32
+ /** Public bootstrap script URL (served from npm via unpkg — works without GitHub access). */
33
+ function readBootstrapInstallScriptUrl() {
34
+ var pkg = readPackageJson();
35
+ var name = (pkg && pkg.name) || "omnish";
36
+ var version = (pkg && pkg.version) || "latest";
37
+ return "https://unpkg.com/" + name + "@" + version + "/contrib/install-omnish.sh";
26
38
  }
27
39
 
28
40
  function parseSemver(version) {
@@ -124,101 +136,75 @@ function formatNodeUpgradeHelp(result, platform) {
124
136
  if (platform === undefined) {
125
137
  platform = os.platform();
126
138
  }
139
+ var bootstrap = readBootstrapInstallScriptUrl();
127
140
  var lines = [];
128
141
  var c = shellComment(platform);
129
142
  lines.push("");
130
- lines.push("=== omnish: upgrade Node to 22.13+ (you have " + result.current + ") ===");
143
+ lines.push(
144
+ "=== omnish: Node " + result.required + " required (you have " + result.current + ") ===",
145
+ );
146
+ lines.push("");
147
+ lines.push("npm install -g omnish cannot finish on this Node version.");
148
+ lines.push(
149
+ "(EBADENGINE warnings above are expected on old Node — ignore them; the blocker is below.)",
150
+ );
131
151
  lines.push("");
132
- if (platform !== "win32" && platform !== "darwin") {
133
- lines.push("QUICK FIX Debian/Ubuntu VPS (replaces old apt Node 12):");
134
- lines.push(" curl -fsSL https://deb.nodesource.com/setup_22.x | bash -");
135
- lines.push(" apt-get install -y nodejs");
136
- lines.push(" node -v");
137
- lines.push(" npm i -g omnish");
138
- lines.push("");
139
- }
140
- lines.push("omnish needs a newer Node.js to install and run.");
141
- lines.push(" Required : Node " + result.required + " (see package.json engines)");
142
- lines.push(" You have : " + result.current);
143
- lines.push(" Recommend: Node " + result.recommended + " (matches .nvmrc in the repo)");
152
+ lines.push("RUN THIS INSTEAD upgrades Node 22+ and installs omnish:");
153
+ lines.push(" curl -fsSL " + bootstrap + " | bash");
144
154
  lines.push("");
145
- lines.push("Why: omnish ships native addons (better-sqlite3, node-pty) and depends on");
146
- lines.push("packages that require Node 22+. Older Node cannot install or run omnish.");
155
+ lines.push("Required: Node " + result.required + " | You have: " + result.current);
156
+ lines.push("Recommend: Node " + result.recommended + " (matches .nvmrc in the repo)");
147
157
  lines.push("");
148
- lines.push("Pick one upgrade path, then re-run:");
149
- lines.push(" npm i -g omnish");
158
+ lines.push("Why: native addons (better-sqlite3, node-pty) and deps need Node 22+.");
150
159
  lines.push("");
151
160
 
152
161
  if (platform === "win32") {
153
- lines.push("Windows — nvm-windows (recommended if you use nvm):");
162
+ lines.push("Windows — nvm-windows:");
154
163
  lines.push(" nvm i 22");
155
164
  lines.push(" nvm use 22");
156
165
  lines.push(" node -v");
157
166
  lines.push(" npm i -g omnish");
158
167
  lines.push("");
159
- lines.push("Windows — official installer / winget:");
168
+ lines.push("Windows — winget:");
160
169
  lines.push(" winget install OpenJS.NodeJS.LTS");
161
170
  lines.push(" node -v");
162
171
  lines.push(" npm i -g omnish");
163
172
  lines.push("");
164
- lines.push("If npm still uses an old Node, open a new terminal after upgrading.");
173
+ lines.push("If npm still uses old Node, open a new terminal after upgrading.");
165
174
  return lines.join("\n");
166
175
  }
167
176
 
168
177
  if (platform === "darwin") {
169
- lines.push("macOS — nvm (install + set default + install omnish):");
170
- lines.push(c + " install nvm: https://github.com/nvm-sh/nvm#installing-and-updating");
171
- lines.push(
172
- " curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash",
173
- );
174
- lines.push(c + " restart your shell, then:");
175
- lines.push(" nvm i 22");
176
- lines.push(" nvm alias default 22");
177
- lines.push(" node -v");
178
- lines.push(" npm i -g omnish");
179
- lines.push("");
180
- lines.push("macOS — Homebrew:");
178
+ lines.push("macOS — Homebrew (fastest):");
181
179
  lines.push(" brew install node@22");
182
180
  lines.push(" brew link --overwrite --force node@22");
183
181
  lines.push(" node -v");
184
182
  lines.push(" npm i -g omnish");
185
183
  lines.push("");
186
- lines.push("macOS — fnm:");
187
- lines.push(" fnm use --install-if-missing 22");
188
- lines.push(" fnm default 22");
184
+ lines.push("macOS — nvm:");
185
+ lines.push(c + " https://github.com/nvm-sh/nvm#installing-and-updating");
186
+ lines.push(
187
+ " curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash",
188
+ );
189
+ lines.push(c + " restart shell, then:");
190
+ lines.push(" nvm i 22");
191
+ lines.push(" nvm alias default 22");
189
192
  lines.push(" npm i -g omnish");
190
193
  return lines.join("\n");
191
194
  }
192
195
 
193
- lines.push("Linux VPS / server — Debian or Ubuntu (replaces old apt node, e.g. v12):");
196
+ lines.push("Linux VPS — Debian/Ubuntu (replaces old apt Node, e.g. v12):");
194
197
  lines.push(" curl -fsSL https://deb.nodesource.com/setup_22.x | bash -");
195
- lines.push(" apt-get install -y nodejs");
198
+ lines.push(" apt-get install -y nodejs build-essential python3");
196
199
  lines.push(" node -v");
197
200
  lines.push(" npm i -g omnish");
198
201
  lines.push("");
199
- lines.push("Linux — nvm (install + set default + install omnish):");
200
- lines.push(c + " install nvm: https://github.com/nvm-sh/nvm#installing-and-updating");
202
+ lines.push("Linux — nvm:");
201
203
  lines.push(
202
204
  " curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash",
203
205
  );
204
- lines.push(c + " restart your shell, then:");
205
- lines.push(" nvm i 22");
206
- lines.push(" nvm alias default 22");
207
- lines.push(" node -v");
208
- lines.push(" npm i -g omnish");
209
- lines.push("");
210
- lines.push("Linux — fnm:");
211
- lines.push(" fnm use --install-if-missing 22");
212
- lines.push(" fnm default 22");
213
- lines.push(" npm i -g omnish");
214
- lines.push("");
215
- lines.push("Linux — official builds:");
216
- lines.push(" https://nodejs.org/en/download (pick 22.x)");
217
- lines.push("");
218
- lines.push("One-liner bootstrap (tries nvm/fnm, then installs omnish):");
219
- lines.push(
220
- " curl -fsSL https://raw.githubusercontent.com/labKnowledge/omnish/main/contrib/install-omnish.sh | bash",
221
- );
206
+ lines.push(c + " restart shell:");
207
+ lines.push(" nvm i 22 && nvm alias default 22 && npm i -g omnish");
222
208
  return lines.join("\n");
223
209
  }
224
210
 
@@ -250,4 +236,5 @@ module.exports = {
250
236
  checkNodeVersion: checkNodeVersion,
251
237
  formatNodeUpgradeHelp: formatNodeUpgradeHelp,
252
238
  formatNativeModuleNodeHint: formatNativeModuleNodeHint,
239
+ readBootstrapInstallScriptUrl: readBootstrapInstallScriptUrl,
253
240
  };