@rynx-ai/tmux 0.0.0-bootstrap.0

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.
@@ -0,0 +1,8 @@
1
+ export declare const BUNDLED_TMUX_UNAVAILABLE_MESSAGE = "Rynx bundled tmux is unavailable or damaged";
2
+ export interface BundledTmuxResolutionOptions {
3
+ platform?: string;
4
+ arch?: string;
5
+ resolve?: (specifier: string) => string;
6
+ }
7
+ /** Resolve the executable shipped for this installation's OS and architecture. */
8
+ export declare function resolveBundledTmux(options?: BundledTmuxResolutionOptions): string | undefined;
package/dist/index.js ADDED
@@ -0,0 +1,27 @@
1
+ import { accessSync, constants } from "node:fs";
2
+ import { createRequire } from "node:module";
3
+ const require = createRequire(import.meta.url);
4
+ export const BUNDLED_TMUX_UNAVAILABLE_MESSAGE = "Rynx bundled tmux is unavailable or damaged";
5
+ const BUNDLED_TMUX_PACKAGES = {
6
+ "darwin-arm64": "@rynx-ai/tmux-darwin-arm64/bin/tmux",
7
+ "darwin-x64": "@rynx-ai/tmux-darwin-x64/bin/tmux",
8
+ "linux-arm64": "@rynx-ai/tmux-linux-arm64/bin/tmux",
9
+ "linux-x64": "@rynx-ai/tmux-linux-x64/bin/tmux",
10
+ };
11
+ /** Resolve the executable shipped for this installation's OS and architecture. */
12
+ export function resolveBundledTmux(options = {}) {
13
+ const platform = options.platform ?? process.platform;
14
+ const arch = options.arch ?? process.arch;
15
+ const specifier = BUNDLED_TMUX_PACKAGES[`${platform}-${arch}`];
16
+ if (!specifier)
17
+ return undefined;
18
+ let executable;
19
+ try {
20
+ executable = (options.resolve ?? require.resolve)(specifier);
21
+ accessSync(executable, constants.X_OK);
22
+ }
23
+ catch {
24
+ return undefined;
25
+ }
26
+ return executable;
27
+ }
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@rynx-ai/tmux",
3
+ "version": "0.0.0-bootstrap.0",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://github.com/rynx-ai/rynx.git",
7
+ "directory": "packages/tmux"
8
+ },
9
+ "description": "Rynx-pinned tmux resolver for supported platforms.",
10
+ "license": "MIT",
11
+ "type": "module",
12
+ "engines": {
13
+ "node": ">=22.16"
14
+ },
15
+ "publishConfig": {
16
+ "registry": "https://registry.npmjs.org/",
17
+ "access": "public"
18
+ },
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "main": "./dist/index.js",
23
+ "types": "./dist/index.d.ts",
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/index.d.ts",
27
+ "default": "./dist/index.js"
28
+ }
29
+ },
30
+ "scripts": {
31
+ "build": "rm -rf dist && tsc -p tsconfig.json"
32
+ },
33
+ "optionalDependencies": {
34
+ "@rynx-ai/tmux-darwin-arm64": "0.1.11-beta.16",
35
+ "@rynx-ai/tmux-darwin-x64": "0.1.11-beta.16",
36
+ "@rynx-ai/tmux-linux-arm64": "0.1.11-beta.16",
37
+ "@rynx-ai/tmux-linux-x64": "0.1.11-beta.16"
38
+ }
39
+ }