authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-05 00:42:26-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-05 00:42:26-07:00
log1d58f2ecc4b2f6cea9897dcf46734af6210d053e
treec510a084ef8dee676471535e195c9b5d011e9532
parentcb58dfd6453171a88183fc7bf1587bae6929c0e4
signature Signed by PGP key B5690EEEBB952194

refactor(tailscale): keep package internals private (#10011)


1 files changed, 4 insertions(+), 5 deletions(-)

packages/tailscale/src/tailscale.ts+4-5
...@@ -9,8 +9,8 @@ import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";...@@ -9,8 +9,8 @@ import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
99
10export const DEFAULT_TAILSCALE_SERVE_PORT = 443;10export const DEFAULT_TAILSCALE_SERVE_PORT = 443;
11export const TAILSCALE_STATUS_TIMEOUT = Duration.millis(1_500);11export const TAILSCALE_STATUS_TIMEOUT = Duration.millis(1_500);
12export const TAILSCALE_SERVE_TIMEOUT = Duration.seconds(10);12const TAILSCALE_SERVE_TIMEOUT = Duration.seconds(10);
13export const TAILSCALE_PROBE_TIMEOUT = Duration.millis(2_500);13const TAILSCALE_PROBE_TIMEOUT = Duration.millis(2_500);
1414
15// tailscale is a real executable everywhere (`tailscale.exe` on Windows), so15// tailscale is a real executable everywhere (`tailscale.exe` on Windows), so
16// it is always spawned directly rather than through cmd.exe shell mode.16// it is always spawned directly rather than through cmd.exe shell mode.
...@@ -47,7 +47,7 @@ const STDERR_DIAGNOSTIC_PATTERNS: ReadonlyArray<...@@ -47,7 +47,7 @@ const STDERR_DIAGNOSTIC_PATTERNS: ReadonlyArray<
47];47];
4848
49/** Classifies stderr into a safe label, dropping the text itself. */49/** Classifies stderr into a safe label, dropping the text itself. */
50export const stderrDiagnosticOf = (stderr: string): TailscaleStderrDiagnostic | undefined => {50const stderrDiagnosticOf = (stderr: string): TailscaleStderrDiagnostic | undefined => {
51 if (stderr.trim().length === 0) {51 if (stderr.trim().length === 0) {
52 return undefined;52 return undefined;
53 }53 }
...@@ -66,7 +66,7 @@ export class TailscaleCommandSpawnError extends Schema.TaggedErrorClass<Tailscal...@@ -66,7 +66,7 @@ export class TailscaleCommandSpawnError extends Schema.TaggedErrorClass<Tailscal
66 }66 }
67}67}
6868
69export class TailscaleCommandOutputError extends Schema.TaggedErrorClass<TailscaleCommandOutputError>()(69class TailscaleCommandOutputError extends Schema.TaggedErrorClass<TailscaleCommandOutputError>()(
70 "TailscaleCommandOutputError",70 "TailscaleCommandOutputError",
71 {71 {
72 ...TailscaleCommandContext,72 ...TailscaleCommandContext,
...@@ -137,7 +137,6 @@ const TailscaleStatusJson = Schema.Struct({...@@ -137,7 +137,6 @@ const TailscaleStatusJson = Schema.Struct({
137 Self: Schema.optional(TailscaleStatusSelf),137 Self: Schema.optional(TailscaleStatusSelf),
138});138});
139139
140export type TailscaleStatusSelf = typeof TailscaleStatusSelf.Type;
141export type TailscaleStatusJson = typeof TailscaleStatusJson.Type;140export type TailscaleStatusJson = typeof TailscaleStatusJson.Type;
142141
143export interface TailscaleStatus {142export interface TailscaleStatus {