@jelou/cli 1.16.1 → 1.16.3

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/bin/jelou CHANGED
@@ -18,7 +18,7 @@ if (!pkg) {
18
18
  console.error(
19
19
  `@jelou/cli: unsupported platform ${key}\n` +
20
20
  `Supported: ${Object.keys(PLATFORMS).join(", ")}\n` +
21
- `Download manually from https://github.com/JelouLatam/jelou-functions-api/releases`
21
+ `Download manually from https://github.com/JelouLatam/jelou-cli/releases`
22
22
  );
23
23
  process.exit(1);
24
24
  }
@@ -31,8 +31,14 @@ try {
31
31
  } catch {
32
32
  console.error(
33
33
  `@jelou/cli: platform package ${pkg} is not installed.\n\n` +
34
- `This usually means npm was run with --no-optional. Reinstall with:\n\n` +
35
- ` npm install -g @jelou/cli\n`
34
+ `An in-place \`npm install -g @jelou/cli\` upgrade can leave the wrapper\n` +
35
+ `without its platform dependency (npm sees the wrapper as up-to-date and\n` +
36
+ `skips re-resolving optional deps). The cleanest fix is to uninstall first:\n\n` +
37
+ ` npm uninstall -g @jelou/cli\n` +
38
+ ` npm install -g @jelou/cli\n\n` +
39
+ `If that still fails, check that npm isn't configured to skip optional\n` +
40
+ `dependencies (look for \`omit=optional\` in ~/.npmrc, or a global\n` +
41
+ `\`--no-optional\` flag).\n`
36
42
  );
37
43
  process.exit(1);
38
44
  }
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env node
2
+
3
+ // Runs after npm has resolved optionalDependencies. If we're on a supported
4
+ // platform but the matching platform package didn't land on disk (npm's known
5
+ // silent-skip on in-place upgrades), fail the install loudly instead of leaving
6
+ // a broken wrapper that only surfaces the problem at runtime.
7
+
8
+ const PLATFORMS = {
9
+ "darwin-arm64": "@jelou/cli-darwin-arm64",
10
+ "darwin-x64": "@jelou/cli-darwin-x64",
11
+ "linux-x64": "@jelou/cli-linux-x64",
12
+ "linux-arm64": "@jelou/cli-linux-arm64",
13
+ "win32-x64": "@jelou/cli-win32-x64",
14
+ };
15
+
16
+ const key = `${process.platform}-${process.arch}`;
17
+ const pkg = PLATFORMS[key];
18
+
19
+ if (!pkg) {
20
+ // Unsupported platform — wrapper's bin script handles its own error path.
21
+ process.exit(0);
22
+ }
23
+
24
+ try {
25
+ require.resolve(`${pkg}/package.json`);
26
+ process.exit(0);
27
+ } catch {
28
+ console.error(
29
+ `\n@jelou/cli: optional dependency ${pkg} did not install.\n\n` +
30
+ `npm sometimes silently skips optional deps on in-place upgrades. Fix\n` +
31
+ `with a clean reinstall:\n\n` +
32
+ ` npm uninstall -g @jelou/cli\n` +
33
+ ` npm install -g @jelou/cli\n\n` +
34
+ `If that still fails, check for \`omit=optional\` in ~/.npmrc or a\n` +
35
+ `\`--no-optional\` flag.\n`
36
+ );
37
+ process.exit(1);
38
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jelou/cli",
3
- "version": "1.16.1",
3
+ "version": "1.16.3",
4
4
  "description": "Build AI agents on the Jelou platform — from your terminal or your AI editor.",
5
5
  "author": "Jelou Inc. (https://jelou.ai)",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -12,6 +12,9 @@
12
12
  "bin": {
13
13
  "jelou": "bin/jelou"
14
14
  },
15
+ "scripts": {
16
+ "postinstall": "node bin/postinstall.js"
17
+ },
15
18
  "files": [
16
19
  "bin/",
17
20
  "README.md",
@@ -19,11 +22,11 @@
19
22
  "THIRD_PARTY_NOTICES.md"
20
23
  ],
21
24
  "optionalDependencies": {
22
- "@jelou/cli-darwin-arm64": "1.16.1",
23
- "@jelou/cli-darwin-x64": "1.16.1",
24
- "@jelou/cli-linux-x64": "1.16.1",
25
- "@jelou/cli-linux-arm64": "1.16.1",
26
- "@jelou/cli-win32-x64": "1.16.1"
25
+ "@jelou/cli-darwin-arm64": "1.16.3",
26
+ "@jelou/cli-darwin-x64": "1.16.3",
27
+ "@jelou/cli-linux-x64": "1.16.3",
28
+ "@jelou/cli-linux-arm64": "1.16.3",
29
+ "@jelou/cli-win32-x64": "1.16.3"
27
30
  },
28
31
  "keywords": [
29
32
  "jelou",