@aui.io/apollo 0.1.46 → 0.1.47

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.
@@ -7,8 +7,14 @@ import type { Command } from "commander";
7
7
  * cd — your position binds context, so moving is always an explicit agent
8
8
  * action. APOLLO_SHELL_WRAPPED lets the CLI drop the
9
9
  * "cd <path>" tip when the wrapper is about to do it anyway.
10
+ *
11
+ * Parameterized on the bin name so distributions with their own bin
12
+ * (`apollo-internal`) wrap their own command instead of shadowing this one.
13
+ * zsh/bash both accept hyphens in `name() {}` function names; the local
14
+ * variables keep a fixed spelling because hyphens are not legal there.
10
15
  */
11
- export declare const SHELL_INIT_SCRIPT = "# apollo shell integration (zsh/bash)\napollo() {\n APOLLO_SHELL_WRAPPED=1 command apollo \"$@\"\n local apollo_exit=$?\n if [ \"$apollo_exit\" -eq 0 ] && [ \"$1\" = \"agent\" ]; then\n case \"$2\" in\n use|import|create)\n # The command just touched the registry; resolve the checkout so\n # name arguments and the interactive picker land in the right place.\n local apollo_target\n apollo_target=\"$(APOLLO_SHELL_WRAPPED=1 command apollo agent path 2>/dev/null)\"\n if [ -n \"$apollo_target\" ] && [ -d \"$apollo_target\" ]; then\n cd \"$apollo_target\" || return\n fi\n ;;\n esac\n fi\n return \"$apollo_exit\"\n}\n";
16
+ export declare function shellInitScript(bin: string): string;
17
+ export declare const SHELL_INIT_SCRIPT: string;
12
18
  /**
13
19
  * Reaching this point means the auto-cd wrapper is not active in this shell
14
20
  * session. npm hides postinstall output, so this is the user's only signal.
@@ -9,10 +9,16 @@ import path from "node:path";
9
9
  * cd — your position binds context, so moving is always an explicit agent
10
10
  * action. APOLLO_SHELL_WRAPPED lets the CLI drop the
11
11
  * "cd <path>" tip when the wrapper is about to do it anyway.
12
+ *
13
+ * Parameterized on the bin name so distributions with their own bin
14
+ * (`apollo-internal`) wrap their own command instead of shadowing this one.
15
+ * zsh/bash both accept hyphens in `name() {}` function names; the local
16
+ * variables keep a fixed spelling because hyphens are not legal there.
12
17
  */
13
- export const SHELL_INIT_SCRIPT = `# apollo shell integration (zsh/bash)
14
- apollo() {
15
- APOLLO_SHELL_WRAPPED=1 command apollo "$@"
18
+ export function shellInitScript(bin) {
19
+ return `# ${bin} shell integration (zsh/bash)
20
+ ${bin}() {
21
+ APOLLO_SHELL_WRAPPED=1 command ${bin} "$@"
16
22
  local apollo_exit=$?
17
23
  if [ "$apollo_exit" -eq 0 ] && [ "$1" = "agent" ]; then
18
24
  case "$2" in
@@ -20,7 +26,7 @@ apollo() {
20
26
  # The command just touched the registry; resolve the checkout so
21
27
  # name arguments and the interactive picker land in the right place.
22
28
  local apollo_target
23
- apollo_target="$(APOLLO_SHELL_WRAPPED=1 command apollo agent path 2>/dev/null)"
29
+ apollo_target="$(APOLLO_SHELL_WRAPPED=1 command ${bin} agent path 2>/dev/null)"
24
30
  if [ -n "$apollo_target" ] && [ -d "$apollo_target" ]; then
25
31
  cd "$apollo_target" || return
26
32
  fi
@@ -30,6 +36,8 @@ apollo() {
30
36
  return "$apollo_exit"
31
37
  }
32
38
  `;
39
+ }
40
+ export const SHELL_INIT_SCRIPT = shellInitScript("apollo");
33
41
  /**
34
42
  * Reaching this point means the auto-cd wrapper is not active in this shell
35
43
  * session. npm hides postinstall output, so this is the user's only signal.
@@ -1 +1 @@
1
- {"version":3,"file":"shell.js","sourceRoot":"","sources":["../../../src/commands/shell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAI7B;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;CAmBhC,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,oBAAoB;IAClC,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;IAC1B,MAAM,SAAS,GAAG,CAA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AAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QACrE,IAAI,CAAC;YACH,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;QACnF,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,SAAS;QACd,CAAC,CAAC,kIAAkI;QACpI,CAAC,CAAC,wGAAwG,CAAC;AAC/G,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAgB;IAChD,OAAO;SACJ,OAAO,CAAC,YAAY,CAAC;SACrB,WAAW,CAAC,qEAAqE,CAAC;SAClF,MAAM,CAAC,GAAG,EAAE;QACX,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aui.io/apollo-cli",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "description": "Command-line client for the Apollo runtime",
5
5
  "type": "module",
6
6
  "engines": {
@@ -33,12 +33,12 @@
33
33
  "test": "vitest run"
34
34
  },
35
35
  "dependencies": {
36
- "@aui.io/apollo-core": "0.1.46",
36
+ "@aui.io/apollo-core": "0.1.47",
37
37
  "commander": "^14.0.3",
38
38
  "picocolors": "^1.1.1"
39
39
  },
40
40
  "optionalDependencies": {
41
- "@aui.io/apollo-tui": "0.1.46"
41
+ "@aui.io/apollo-tui": "0.1.47"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@eslint/js": "^9.39.5",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aui.io/apollo-core",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "description": "Shared Apollo console core — API clients, config, and services",
5
5
  "type": "module",
6
6
  "engines": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aui.io/apollo-tui",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "description": "Interactive Apollo operator TUI built on OpenTUI",
5
5
  "type": "module",
6
6
  "engines": {
@@ -35,7 +35,7 @@
35
35
  "start": "node ./bin/apollo-tui.js"
36
36
  },
37
37
  "dependencies": {
38
- "@aui.io/apollo-core": "0.1.46",
38
+ "@aui.io/apollo-core": "0.1.47",
39
39
  "@opentui/core": "^0.4.5",
40
40
  "@opentui/react": "^0.4.5",
41
41
  "diff": "8.0.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aui.io/apollo",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "description": "Apollo operator console — CLI + interactive TUI",
5
5
  "type": "module",
6
6
  "engines": {
@@ -31,9 +31,9 @@
31
31
  "postpack": "node ./scripts/clean-bundle.mjs"
32
32
  },
33
33
  "dependencies": {
34
- "@aui.io/apollo-core": "0.1.46",
35
- "@aui.io/apollo-cli": "0.1.46",
36
- "@aui.io/apollo-tui": "0.1.46",
34
+ "@aui.io/apollo-core": "0.1.47",
35
+ "@aui.io/apollo-cli": "0.1.47",
36
+ "@aui.io/apollo-tui": "0.1.47",
37
37
  "picocolors": "^1.1.1",
38
38
  "yaml": "^2.9.0",
39
39
  "commander": "^14.0.3",