tmux-ide 2.9.14 → 2.9.15
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/cli.js +1578 -1309
- package/package.json +1 -1
- package/packages/contracts/src/index.ts +1 -0
- package/packages/contracts/src/native-browser.ts +43 -0
- package/packages/daemon/dist/command-center/tmux-servers.js +6 -0
- package/packages/daemon/dist/lib/daemon-embed.js +15 -0
- package/packages/daemon/dist/lib/native-browser-rpc.js +110 -0
- package/packages/daemon/dist/lib/tmux-native-browser.js +80 -0
- package/packages/daemon/dist/lib/tmux-server-owner.js +9 -0
- package/packages/daemon/dist/native/TmuxIdeNotifier.app/Contents/Info.plist +2 -2
- package/packages/daemon/dist/native/TmuxIdeNotifier.app/Contents/MacOS/tmux-ide-notifier +0 -0
- package/packages/daemon/dist/native/TmuxIdeNotifier.app/Contents/Resources/Assets.car +0 -0
- package/packages/daemon/dist/native/TmuxIdeNotifier.app/Contents/_CodeSignature/CodeResources +2 -2
- package/packages/daemon/dist/open-browser.js +17 -5
- package/packages/daemon/src/command-center/tmux-servers.ts +11 -0
- package/packages/daemon/src/lib/daemon-embed.ts +17 -0
- package/packages/daemon/src/lib/native-browser-rpc.ts +118 -0
- package/packages/daemon/src/lib/tmux-native-browser.ts +100 -0
- package/packages/daemon/src/lib/tmux-server-owner.ts +9 -0
- package/packages/daemon/src/open-browser.ts +32 -5
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createNativeBrowserResolver } from "./tmux-native-browser.ts";
|
|
1
2
|
import { createNativeSurfaceContextResolver } from "./native-surface-context.ts";
|
|
2
3
|
import type { LocalImageOwner } from "../terminal/graphics/local-image-owner.ts";
|
|
3
4
|
import { shellEscape } from "./shell.ts";
|
|
@@ -619,6 +620,14 @@ export async function createNativeTmuxServerOwner(options: NativeTmuxServerOwner
|
|
|
619
620
|
run: (args, signal) => generationRunAsync(args, signal),
|
|
620
621
|
}),
|
|
621
622
|
resolvePaneEditorContext,
|
|
623
|
+
nativeBrowser: createNativeBrowserResolver({
|
|
624
|
+
generation,
|
|
625
|
+
assertOpen,
|
|
626
|
+
registry: workspaceRegistry,
|
|
627
|
+
catalog,
|
|
628
|
+
inventory: terminalInventoryRuntime,
|
|
629
|
+
run: generationRunAsync,
|
|
630
|
+
}),
|
|
622
631
|
catalog,
|
|
623
632
|
readWindowSplitLayout: async (workspaceName: string, input: WindowLinkTarget) => {
|
|
624
633
|
assertOpen();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { accessSync, constants, realpathSync, statSync } from "node:fs";
|
|
2
2
|
import { delimiter, isAbsolute, join, resolve } from "node:path";
|
|
3
|
+
import { homedir } from "node:os";
|
|
3
4
|
import { IdeError } from "./lib/errors.ts";
|
|
4
5
|
import { resolveRuntimeNamespace, runtimeNamespaceEnvironment } from "./lib/runtime-namespace.ts";
|
|
5
6
|
import {
|
|
@@ -16,14 +17,40 @@ export interface OpenBrowserOptions {
|
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
/** Resolve once before creating a pane; ignore relative PATH entries. */
|
|
19
|
-
export function resolveTerminalBrowser(
|
|
20
|
+
export function resolveTerminalBrowser(
|
|
21
|
+
environment: NodeJS.ProcessEnv = process.env,
|
|
22
|
+
platform: NodeJS.Platform = process.platform,
|
|
23
|
+
): string {
|
|
20
24
|
const configured = environment.TMUX_IDE_TERMINAL_BROWSER_BIN;
|
|
25
|
+
const home = environment.HOME ?? homedir();
|
|
26
|
+
// Resolve the managed alias on every invocation so an app update selects its
|
|
27
|
+
// matching browser. Native assets remain outside the universal npm package.
|
|
28
|
+
const bundled =
|
|
29
|
+
platform === "darwin" && isAbsolute(home)
|
|
30
|
+
? [
|
|
31
|
+
join(
|
|
32
|
+
home,
|
|
33
|
+
"Library",
|
|
34
|
+
"Application Support",
|
|
35
|
+
"tmux-ide",
|
|
36
|
+
"native-alpha",
|
|
37
|
+
"TmuxIDE.app",
|
|
38
|
+
"Contents",
|
|
39
|
+
"Resources",
|
|
40
|
+
"browser",
|
|
41
|
+
"terminal-browser",
|
|
42
|
+
),
|
|
43
|
+
]
|
|
44
|
+
: [];
|
|
21
45
|
const candidates = configured
|
|
22
46
|
? [configured]
|
|
23
|
-
:
|
|
24
|
-
|
|
25
|
-
.
|
|
26
|
-
|
|
47
|
+
: [
|
|
48
|
+
...bundled,
|
|
49
|
+
...(environment.PATH ?? "")
|
|
50
|
+
.split(delimiter)
|
|
51
|
+
.filter(isAbsolute)
|
|
52
|
+
.map((dir) => join(dir, "terminal-browser")),
|
|
53
|
+
];
|
|
27
54
|
for (const candidate of candidates) {
|
|
28
55
|
try {
|
|
29
56
|
if (!isAbsolute(candidate)) continue;
|