Skip to content

Commit 79d19a8

Browse files
committed
refactor(core): remove unused code exports
1 parent 21997e5 commit 79d19a8

15 files changed

Lines changed: 28 additions & 77 deletions

File tree

packages/core/src/debounce.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/core/src/v3/apiClient/runStream.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export type RunShapeStreamOptions = {
8989
onFetchError?: (e: Error) => void;
9090
};
9191

92-
export type StreamPartResult<TRun, TStreams extends Record<string, any>> = {
92+
type StreamPartResult<TRun, TStreams extends Record<string, any>> = {
9393
[K in keyof TStreams]: {
9494
type: K;
9595
chunk: TStreams[K];
@@ -665,7 +665,7 @@ export class SSEStreamSubscriptionFactory implements StreamSubscriptionFactory {
665665
}
666666
}
667667

668-
export interface RunShapeProvider {
668+
interface RunShapeProvider {
669669
onShape(callback: (shape: SubscribeRunRawShape) => Promise<void>): Promise<() => void>;
670670
}
671671

packages/core/src/v3/apiClient/stream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ class ReadableShapeStream<T extends Row<unknown> = Row> {
225225
}
226226
}
227227

228-
export class LineTransformStream extends TransformStream<string, string[]> {
228+
class LineTransformStream extends TransformStream<string, string[]> {
229229
private buffer = "";
230230

231231
constructor() {

packages/core/src/v3/apiClientManager/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function getDevBranchEnvVar(): string | undefined {
1717
return value && !isDefaultDevBranch(value) ? value : undefined;
1818
}
1919

20-
export class ApiClientMissingError extends Error {
20+
class ApiClientMissingError extends Error {
2121
constructor(message: string) {
2222
super(message);
2323
this.name = "ApiClientMissingError";

packages/core/src/v3/clock/preciseWallClock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { PreciseDate } from "@google-cloud/precise-date";
22
import type { Clock, ClockTime } from "./clock.js";
33

4-
export type PreciseWallClockOptions = {
4+
type PreciseWallClockOptions = {
55
origin?: ClockTime;
66
now?: PreciseDate;
77
};

packages/core/src/v3/lifecycleHooks/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export type OnStartHookFunction<TPayload, TInitOutput extends TaskInitOutput = T
3333

3434
export type AnyOnStartHookFunction = OnStartHookFunction<unknown, TaskInitOutput>;
3535

36-
export type TaskStartAttemptHookParams<TPayload = unknown> = {
36+
type TaskStartAttemptHookParams<TPayload = unknown> = {
3737
ctx: TaskRunContext;
3838
payload: TPayload;
3939
task: string;
@@ -142,12 +142,12 @@ export type OnSuccessHookFunction<
142142

143143
export type AnyOnSuccessHookFunction = OnSuccessHookFunction<unknown, unknown, TaskInitOutput>;
144144

145-
export type TaskCompleteSuccessResult<TOutput> = {
145+
type TaskCompleteSuccessResult<TOutput> = {
146146
ok: true;
147147
data: TOutput;
148148
};
149149

150-
export type TaskCompleteErrorResult = {
150+
type TaskCompleteErrorResult = {
151151
ok: false;
152152
error: unknown;
153153
};

packages/core/src/v3/logger/taskLogger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export type LogLevel = "none" | "error" | "warn" | "info" | "debug" | "log";
1313

1414
export const logLevels: Array<LogLevel> = ["none", "error", "warn", "info", "debug"];
1515

16-
export type TaskLoggerConfig = {
16+
type TaskLoggerConfig = {
1717
logger: Logger;
1818
tracer: TriggerTracer;
1919
level: LogLevel;

packages/core/src/v3/otel/tracingSDK.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ function isValidAndNotEmpty(name: string | undefined): boolean {
656656
return isValid(name) && name.length > 0;
657657
}
658658

659-
export function parseOtelResourceAttributes(
659+
function parseOtelResourceAttributes(
660660
rawEnvAttributes: string | undefined | null
661661
): Record<string, string> {
662662
if (!rawEnvAttributes) return {};

packages/core/src/v3/realtimeStreams/index.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,9 @@ import type {
99
// Re-export the session-scoped stream instance so the SDK's
1010
// `SessionOutputChannel.pipe` / `.writer` can construct it without reaching
1111
// into the core package's internals.
12-
export { SessionStreamInstance } from "./sessionStreamInstance.js";
13-
export type {
14-
SessionStreamInstanceOptions,
15-
InitializeSessionStreamResponseLike,
16-
} from "./sessionStreamInstance.js";
17-
export {
18-
trimSessionStream,
19-
writeSessionControlRecord,
20-
writeTurnCompleteRecord,
21-
writeUpgradeRequiredRecord,
22-
} from "./sessionStreamOneshot.js";
12+
;
13+
;
14+
;
2315

2416
const API_NAME = "realtime-streams";
2517

packages/core/src/v3/runEngineWorker/supervisor/events.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ export type WorkerEvents = {
5050
];
5151
};
5252

53-
export type WorkerEventArgs<T extends keyof WorkerEvents> = WorkerEvents[T];
53+
type WorkerEventArgs<T extends keyof WorkerEvents> = WorkerEvents[T];

0 commit comments

Comments
 (0)