omnish 2.1.8 → 2.1.9

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.
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Canonical public URL for the omnish bootstrap installer (tunnel-relay /action route).
3
+ */
4
+ "use strict";
5
+
6
+ const INSTALL_SCRIPT_URL = "https://platform.omnish.dev/action/install-omnish.sh";
7
+
8
+ /** @param {string} [fallbackVersion] npm package version for unpkg fallback */
9
+ function readBootstrapInstallScriptUrl(fallbackVersion) {
10
+ return INSTALL_SCRIPT_URL;
11
+ }
12
+
13
+ /** unpkg fallback when platform host is unreachable */
14
+ function readBootstrapInstallScriptUnpkgUrl(pkg) {
15
+ const name = (pkg && pkg.name) || "omnish";
16
+ const version = (pkg && pkg.version) || "latest";
17
+ return "https://unpkg.com/" + name + "@" + version + "/contrib/install-omnish.sh";
18
+ }
19
+
20
+ module.exports = {
21
+ INSTALL_SCRIPT_URL,
22
+ readBootstrapInstallScriptUrl,
23
+ readBootstrapInstallScriptUnpkgUrl,
24
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnish",
3
- "version": "2.1.8",
3
+ "version": "2.1.9",
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",
@@ -29,6 +29,7 @@
29
29
  "scripts/check-baileys-dep.mjs",
30
30
  "scripts/check-native-modules.mjs",
31
31
  "scripts/check-node-version.cjs",
32
+ "scripts/install-script-url.cjs",
32
33
  "scripts/node-version.cjs",
33
34
  "scripts/fix-node-pty-perms.mjs",
34
35
  "contrib/install-omnish.sh",
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Canonical public URL for the omnish bootstrap installer (tunnel-relay /action route).
3
+ */
4
+ "use strict";
5
+
6
+ const INSTALL_SCRIPT_URL = "https://platform.omnish.dev/action/install-omnish.sh";
7
+
8
+ /** @param {string} [fallbackVersion] npm package version for unpkg fallback */
9
+ function readBootstrapInstallScriptUrl(fallbackVersion) {
10
+ return INSTALL_SCRIPT_URL;
11
+ }
12
+
13
+ /** unpkg fallback when platform host is unreachable */
14
+ function readBootstrapInstallScriptUnpkgUrl(pkg) {
15
+ const name = (pkg && pkg.name) || "omnish";
16
+ const version = (pkg && pkg.version) || "latest";
17
+ return "https://unpkg.com/" + name + "@" + version + "/contrib/install-omnish.sh";
18
+ }
19
+
20
+ module.exports = {
21
+ INSTALL_SCRIPT_URL,
22
+ readBootstrapInstallScriptUrl,
23
+ readBootstrapInstallScriptUnpkgUrl,
24
+ };
@@ -7,6 +7,7 @@
7
7
  var fs = require("fs");
8
8
  var os = require("os");
9
9
  var path = require("path");
10
+ var installUrl = require("./install-script-url.cjs");
10
11
 
11
12
  var DEFAULT_ENGINES_NODE = ">=22.13";
12
13
  var RECOMMENDED_NODE = "22";
@@ -29,12 +30,10 @@ function readEnginesNode() {
29
30
  return DEFAULT_ENGINES_NODE;
30
31
  }
31
32
 
32
- /** Public bootstrap script URL (served from npm via unpkg — works without GitHub access). */
33
+ /** Public bootstrap script URL (platform.omnish.dev). */
33
34
  function readBootstrapInstallScriptUrl() {
34
35
  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";
36
+ return installUrl.readBootstrapInstallScriptUrl(pkg && pkg.version);
38
37
  }
39
38
 
40
39
  function parseSemver(version) {
@@ -149,9 +148,12 @@ function formatNodeUpgradeHelp(result, platform) {
149
148
  "(EBADENGINE warnings above are expected on old Node — ignore them; the blocker is below.)",
150
149
  );
151
150
  lines.push("");
152
- lines.push("RUN THIS INSTEAD — upgrades Node 22+ and installs omnish:");
151
+ lines.push("RUN THIS INSTEAD — one command upgrades Node + installs omnish:");
153
152
  lines.push(" curl -fsSL " + bootstrap + " | bash");
154
153
  lines.push("");
154
+ lines.push("Fallback (npm mirror):");
155
+ lines.push(" curl -fsSL " + installUrl.readBootstrapInstallScriptUnpkgUrl(readPackageJson()) + " | bash");
156
+ lines.push("");
155
157
  lines.push("Required: Node " + result.required + " | You have: " + result.current);
156
158
  lines.push("Recommend: Node " + result.recommended + " (matches .nvmrc in the repo)");
157
159
  lines.push("");