@abide/bridge 0.6.0 → 0.6.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @abide/bridge
2
2
 
3
+ ## 0.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 4920103: installDirectory and searchPath read the platform, handlerIn reads handlerDirectory ([`8848623`](https://github.com/briancray/abide/commit/8848623ae50b5827cbde50add0b0f1a03c6f7db1))
8
+
3
9
  ## 0.6.0
4
10
 
5
11
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abide/bridge",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "type": "module",
5
5
  "description": "Connects the Claude Code on your machine to the assistant on an abide site",
6
6
  "license": "MIT",
package/src/install.ts CHANGED
@@ -26,7 +26,7 @@ const REGISTRY_KEY = `HKCU\\Software\\Classes\\${PAIRING_SCHEME}`
26
26
 
27
27
  /** The handler install bundles into `directory`, which the desktop starts. */
28
28
  export function handlerIn(directory: string): string {
29
- return `${directory}/handler/opened.js`
29
+ return `${handlerDirectory(directory)}/opened.js`
30
30
  }
31
31
 
32
32
  /** The directory the handler and what it keeps — its settings, the sites it always allows — are in. */
@@ -80,9 +80,8 @@ async function uninstallLinux(directory: string): Promise<void> {
80
80
  }
81
81
 
82
82
  /** Where install writes, under the visitor's own home on each desktop. */
83
- export function installDirectory(
84
- platform: NodeJS.Platform = process.platform,
85
- ): string {
83
+ export function installDirectory(): string {
84
+ const platform = process.platform
86
85
  if (platform === 'win32')
87
86
  return `${Bun.env.LOCALAPPDATA ?? `${Bun.env.USERPROFILE ?? ''}\\AppData\\Local`}\\abide-bridge`
88
87
  if (platform === 'linux') return `${dataHome()}/abide-bridge`
package/src/opened.ts CHANGED
@@ -93,12 +93,10 @@ function claudeArgsOf(pairing: Pairing, settings: HandlerSettings): string[] {
93
93
 
94
94
  /**
95
95
  * The `PATH` the bridge runs on: the directories of `bun` and `claude`, then the one install was run
96
- * on, joined by `separator` — `;` on Windows.
96
+ * on, joined by the platform's separator — `;` on Windows.
97
97
  */
98
- export function searchPath(
99
- settings: HandlerSettings,
100
- separator = process.platform === 'win32' ? ';' : ':',
101
- ): string {
98
+ export function searchPath(settings: HandlerSettings): string {
99
+ const separator = process.platform === 'win32' ? ';' : ':'
102
100
  const directories: string[] = []
103
101
  for (const directory of [
104
102
  directoryOf(settings.bun),
package/src/readLines.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * The lines `body` carries, each as it lands, the last one whether or not a newline ends it.
3
3
  *
4
- * The relay's pairing stream and the claude child's stdout. Its own rather than the docs app's
5
- * `linesOf`: this CLI ships without the docs app, and abide exports no line reader of its own.
4
+ * The relay's pairing stream and the claude child's stdout. Its own because this CLI carries no
5
+ * abide at run time, and abide exports no line reader of its own.
6
6
  */
7
7
  export async function* readLines(
8
8
  body: ReadableStream<Uint8Array>,