@shepai/cli 1.55.2 → 1.55.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.
Files changed (64) hide show
  1. package/dist/src/presentation/web/app/actions/open-folder.d.ts.map +1 -1
  2. package/dist/src/presentation/web/app/actions/open-folder.js +17 -17
  3. package/dist/src/presentation/web/app/actions/open-shell.d.ts.map +1 -1
  4. package/dist/src/presentation/web/app/actions/open-shell.js +17 -17
  5. package/dist/tsconfig.build.tsbuildinfo +1 -1
  6. package/package.json +1 -1
  7. package/web/.next/BUILD_ID +1 -1
  8. package/web/.next/build-manifest.json +2 -2
  9. package/web/.next/cache/.previewinfo +1 -1
  10. package/web/.next/cache/.rscinfo +1 -1
  11. package/web/.next/cache/.tsbuildinfo +1 -1
  12. package/web/.next/cache/config.json +3 -3
  13. package/web/.next/fallback-build-manifest.json +2 -2
  14. package/web/.next/prerender-manifest.json +3 -3
  15. package/web/.next/required-server-files.js +1 -1
  16. package/web/.next/required-server-files.json +1 -1
  17. package/web/.next/server/app/_global-error.html +2 -2
  18. package/web/.next/server/app/_global-error.rsc +1 -1
  19. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  20. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  21. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  22. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  23. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  24. package/web/.next/server/app/page/server-reference-manifest.json +14 -14
  25. package/web/.next/server/app/page_client-reference-manifest.js +1 -1
  26. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  27. package/web/.next/server/chunks/ssr/[root-of-the-server]__03a0dba7._.js +2 -2
  28. package/web/.next/server/chunks/ssr/[root-of-the-server]__03a0dba7._.js.map +1 -1
  29. package/web/.next/server/chunks/ssr/[root-of-the-server]__2d1a8e37._.js +2 -2
  30. package/web/.next/server/chunks/ssr/[root-of-the-server]__2d1a8e37._.js.map +1 -1
  31. package/web/.next/server/chunks/ssr/[root-of-the-server]__6e8b5181._.js +1 -1
  32. package/web/.next/server/pages/500.html +2 -2
  33. package/web/.next/server/server-reference-manifest.js +1 -1
  34. package/web/.next/server/server-reference-manifest.json +15 -15
  35. package/web/.next/standalone/src/presentation/web/.next/BUILD_ID +1 -1
  36. package/web/.next/standalone/src/presentation/web/.next/build-manifest.json +2 -2
  37. package/web/.next/standalone/src/presentation/web/.next/prerender-manifest.json +3 -3
  38. package/web/.next/standalone/src/presentation/web/.next/required-server-files.json +1 -1
  39. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.html +2 -2
  40. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.rsc +1 -1
  41. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  42. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  43. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  44. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  45. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  46. package/web/.next/standalone/src/presentation/web/.next/server/app/page/server-reference-manifest.json +14 -14
  47. package/web/.next/standalone/src/presentation/web/.next/server/app/page_client-reference-manifest.js +1 -1
  48. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  49. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__03a0dba7._.js +2 -2
  50. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__2d1a8e37._.js +2 -2
  51. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__6e8b5181._.js +1 -1
  52. package/web/.next/standalone/src/presentation/web/.next/server/pages/500.html +2 -2
  53. package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.js +1 -1
  54. package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.json +15 -15
  55. package/web/.next/standalone/src/presentation/web/app/actions/open-folder.ts +19 -16
  56. package/web/.next/standalone/src/presentation/web/app/actions/open-shell.ts +19 -16
  57. package/web/.next/standalone/src/presentation/web/server.js +1 -1
  58. package/web/.next/static/chunks/{bf551f1aa44c2133.js → 958c51856b8d6ed7.js} +2 -2
  59. package/web/.next/static/chunks/{f9519a5c455143e6.js → f023fd36b47a5baa.js} +1 -1
  60. package/web/.next/trace +1 -1
  61. package/web/.next/trace-build +1 -1
  62. /package/web/.next/static/{YfN7Hg9rumm97Ou6lHF9d → cqDB25f0Vxmh-LBw_64mT}/_buildManifest.js +0 -0
  63. /package/web/.next/static/{YfN7Hg9rumm97Ou6lHF9d → cqDB25f0Vxmh-LBw_64mT}/_clientMiddlewareManifest.json +0 -0
  64. /package/web/.next/static/{YfN7Hg9rumm97Ou6lHF9d → cqDB25f0Vxmh-LBw_64mT}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"open-folder.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/open-folder.ts"],"names":[],"mappings":"AAMA,wBAAsB,UAAU,CAC9B,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAoC9D"}
1
+ {"version":3,"file":"open-folder.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/open-folder.ts"],"names":[],"mappings":"AAeA,wBAAsB,UAAU,CAC9B,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA8B9D"}
@@ -2,6 +2,14 @@
2
2
  import { existsSync } from 'node:fs';
3
3
  import { platform } from 'node:os';
4
4
  import { spawn } from 'node:child_process';
5
+ // Use a record lookup instead of if/else to prevent the bundler from
6
+ // tree-shaking platform branches at build time. Turbopack evaluates
7
+ // os.platform() during the build and dead-code-eliminates unused branches,
8
+ // baking in the CI platform (linux) and breaking macOS/Windows installs.
9
+ const FOLDER_COMMANDS = {
10
+ darwin: { cmd: 'open', args: (p) => [p] },
11
+ linux: { cmd: 'xdg-open', args: (p) => [p] },
12
+ };
5
13
  export async function openFolder(repositoryPath) {
6
14
  if (!repositoryPath?.startsWith('/')) {
7
15
  return { success: false, error: 'repositoryPath must be an absolute path' };
@@ -10,27 +18,19 @@ export async function openFolder(repositoryPath) {
10
18
  if (!existsSync(repositoryPath)) {
11
19
  return { success: false, error: 'Directory not found' };
12
20
  }
13
- const currentPlatform = platform();
14
- if (currentPlatform === 'darwin') {
15
- const child = spawn('open', [repositoryPath], {
16
- detached: true,
17
- stdio: 'ignore',
18
- });
19
- child.unref();
20
- }
21
- else if (currentPlatform === 'linux') {
22
- const child = spawn('xdg-open', [repositoryPath], {
23
- detached: true,
24
- stdio: 'ignore',
25
- });
26
- child.unref();
27
- }
28
- else {
21
+ const entry = FOLDER_COMMANDS[platform()];
22
+ if (!entry) {
29
23
  return {
30
24
  success: false,
31
- error: `Unsupported platform: ${currentPlatform}. Folder open is supported on macOS and Linux only.`,
25
+ error: `Unsupported platform: ${platform()}. Folder open is supported on macOS and Linux only.`,
32
26
  };
33
27
  }
28
+ const child = spawn(entry.cmd, entry.args(repositoryPath), {
29
+ detached: true,
30
+ stdio: 'ignore',
31
+ });
32
+ child.on('error', () => undefined); // Prevent uncaught exception on spawn failure
33
+ child.unref();
34
34
  return { success: true, path: repositoryPath };
35
35
  }
36
36
  catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"open-shell.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/open-shell.ts"],"names":[],"mappings":"AAQA,UAAU,cAAc;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,SAAS,CAC7B,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA0C9E"}
1
+ {"version":3,"file":"open-shell.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/open-shell.ts"],"names":[],"mappings":"AAiBA,UAAU,cAAc;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,SAAS,CAC7B,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAoC9E"}
@@ -4,6 +4,14 @@ import { platform } from 'node:os';
4
4
  import { spawn } from 'node:child_process';
5
5
  import { getSettings } from '../../../../../packages/core/src/infrastructure/services/settings.service.js';
6
6
  import { computeWorktreePath } from '../../../../../packages/core/src/infrastructure/services/ide-launchers/compute-worktree-path.js';
7
+ // Use a record lookup instead of if/else to prevent the bundler from
8
+ // tree-shaking platform branches at build time. Turbopack evaluates
9
+ // os.platform() during the build and dead-code-eliminates unused branches,
10
+ // baking in the CI platform (linux) and breaking macOS/Windows installs.
11
+ const SHELL_COMMANDS = {
12
+ darwin: { cmd: 'open', args: (p) => ['-a', 'Terminal', p] },
13
+ linux: { cmd: 'x-terminal-emulator', args: (p) => [`--working-directory=${p}`] },
14
+ };
7
15
  export async function openShell(input) {
8
16
  const { repositoryPath, branch } = input;
9
17
  if (!repositoryPath?.startsWith('/')) {
@@ -16,27 +24,19 @@ export async function openShell(input) {
16
24
  if (!existsSync(targetPath)) {
17
25
  return { success: false, error: `Path does not exist: ${targetPath}` };
18
26
  }
19
- const currentPlatform = platform();
20
- if (currentPlatform === 'darwin') {
21
- const child = spawn('open', ['-a', 'Terminal', targetPath], {
22
- detached: true,
23
- stdio: 'ignore',
24
- });
25
- child.unref();
26
- }
27
- else if (currentPlatform === 'linux') {
28
- const child = spawn('x-terminal-emulator', [`--working-directory=${targetPath}`], {
29
- detached: true,
30
- stdio: 'ignore',
31
- });
32
- child.unref();
33
- }
34
- else {
27
+ const entry = SHELL_COMMANDS[platform()];
28
+ if (!entry) {
35
29
  return {
36
30
  success: false,
37
- error: `Unsupported platform: ${currentPlatform}. Shell launch is supported on macOS and Linux only.`,
31
+ error: `Unsupported platform: ${platform()}. Shell launch is supported on macOS and Linux only.`,
38
32
  };
39
33
  }
34
+ const child = spawn(entry.cmd, entry.args(targetPath), {
35
+ detached: true,
36
+ stdio: 'ignore',
37
+ });
38
+ child.on('error', () => undefined); // Prevent uncaught exception on spawn failure
39
+ child.unref();
40
40
  return { success: true, path: targetPath, shell };
41
41
  }
42
42
  catch (error) {