Skip to content

Commit 8c346b7

Browse files
committed
Apply knip fixes
1 parent 5fe8aec commit 8c346b7

File tree

7 files changed

+24
-24
lines changed

7 files changed

+24
-24
lines changed

src/cli/OutputCtl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Log levels following syslog severity (https://en.wikipedia.org/wiki/Syslog#Severity_level)
33
* Lower numbers = more severe, higher numbers = more verbose
44
*/
5-
export const LOG_LEVEL = {
5+
const LOG_LEVEL = {
66
ERR: 3, // Error conditions
77
WARN: 4, // Warning conditions
88
NOTICE: 5, // Normal but significant (default)

src/cli/commands/BaseCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { getEnvCredentials } from '../helpers.ts'
66
import type { IOutputCtl } from '../OutputCtl.ts'
77
import OutputCtl, { LOG_LEVEL_DEFAULT, LOG_LEVEL_NAMES, parseLogLevel } from '../OutputCtl.ts'
88

9-
export abstract class BaseCommand extends Command {
9+
abstract class BaseCommand extends Command {
1010
logLevelOption = Option.String('-l,--log-level', {
1111
description: `Log level: ${LOG_LEVEL_NAMES.join(', ')} or 3-8 (default: notice)`,
1212
})

src/cli/commands/assemblies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface AssemblyGetOptions {
3636
assemblies: string[]
3737
}
3838

39-
export interface AssemblyDeleteOptions {
39+
interface AssemblyDeleteOptions {
4040
assemblies: string[]
4141
}
4242

src/cli/commands/notifications.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface NotificationsReplayOptions {
1212
assemblies: string[]
1313
}
1414

15-
export async function replay(
15+
async function replay(
1616
output: IOutputCtl,
1717
client: Transloadit,
1818
{ notify_url, assemblies }: NotificationsReplayOptions,

src/cli/commands/templates.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface TemplateModifyOptions {
3333
file: string
3434
}
3535

36-
export interface TemplateDeleteOptions {
36+
interface TemplateDeleteOptions {
3737
templates: string[]
3838
}
3939

@@ -162,7 +162,7 @@ const TemplateIdSchema = z.object({
162162
id: z.string(),
163163
})
164164

165-
export function list(
165+
function list(
166166
output: IOutputCtl,
167167
client: Transloadit,
168168
{ before, after, order, sort, fields }: TemplateListOptions,

src/cli/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function formatAPIError(err: unknown): string {
3636
}
3737

3838
// Re-export APIError type for convenience
39-
export type { APIError }
39+
4040

4141
export function zip<A, B>(listA: A[], listB: B[]): [A, B][]
4242
export function zip<T>(...lists: T[][]): T[][]

src/cli/types.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ import type { AssemblyStatus, Transloadit } from '../Transloadit.ts'
66
import type { IOutputCtl } from './OutputCtl.ts'
77

88
// Re-export transloadit types for CLI use
9-
export type { AssemblyStatus, BillResponse, ListedTemplate, TemplateResponse }
10-
export type { Transloadit }
11-
export type { CreateAssemblyOptions } from '../Transloadit.ts'
9+
10+
11+
1212

1313
// Zod schemas for runtime validation
14-
export const APIErrorSchema = z.object({
14+
const APIErrorSchema = z.object({
1515
error: z.string(),
1616
message: z.string(),
1717
})
1818
export type APIError = z.infer<typeof APIErrorSchema>
1919

20-
export const TransloaditAPIErrorSchema = z.object({
20+
const TransloaditAPIErrorSchema = z.object({
2121
error: z.string().optional(),
2222
message: z.string(),
2323
code: z.string().optional(),
@@ -55,14 +55,14 @@ export interface TemplateFile {
5555
}
5656

5757
// Template list item (from API)
58-
export interface TemplateListItem {
58+
interface TemplateListItem {
5959
id: string
6060
modified: string
6161
name?: string
6262
}
6363

6464
// CLI Invocation types
65-
export interface BaseInvocation {
65+
interface BaseInvocation {
6666
error?: boolean
6767
message?: string
6868
mode: string
@@ -71,7 +71,7 @@ export interface BaseInvocation {
7171
jsonMode?: boolean
7272
}
7373

74-
export interface AssemblyInvocation extends BaseInvocation {
74+
interface AssemblyInvocation extends BaseInvocation {
7575
mode: 'assemblies'
7676
action?: 'create' | 'get' | 'list' | 'delete' | 'replay'
7777
inputs: string[]
@@ -91,7 +91,7 @@ export interface AssemblyInvocation extends BaseInvocation {
9191
reparse?: boolean
9292
}
9393

94-
export interface TemplateInvocation extends BaseInvocation {
94+
interface TemplateInvocation extends BaseInvocation {
9595
mode: 'templates'
9696
action?: 'create' | 'get' | 'list' | 'delete' | 'modify' | 'sync'
9797
templates?: string[]
@@ -107,13 +107,13 @@ export interface TemplateInvocation extends BaseInvocation {
107107
recursive?: boolean
108108
}
109109

110-
export interface BillInvocation extends BaseInvocation {
110+
interface BillInvocation extends BaseInvocation {
111111
mode: 'bills'
112112
action?: 'get'
113113
months: string[]
114114
}
115115

116-
export interface NotificationInvocation extends BaseInvocation {
116+
interface NotificationInvocation extends BaseInvocation {
117117
mode: 'assembly-notifications'
118118
action?: 'list' | 'replay'
119119
assemblies?: string[]
@@ -123,26 +123,26 @@ export interface NotificationInvocation extends BaseInvocation {
123123
pagesize?: number
124124
}
125125

126-
export interface HelpInvocation extends BaseInvocation {
126+
interface HelpInvocation extends BaseInvocation {
127127
mode: 'help' | 'version' | 'register'
128128
}
129129

130-
export type Invocation =
130+
type Invocation =
131131
| AssemblyInvocation
132132
| TemplateInvocation
133133
| BillInvocation
134134
| NotificationInvocation
135135
| HelpInvocation
136136

137137
// Command handler type
138-
export type CommandHandler<T extends BaseInvocation = BaseInvocation> = (
138+
type CommandHandler<T extends BaseInvocation = BaseInvocation> = (
139139
output: IOutputCtl,
140140
client: Transloadit | undefined,
141141
invocation: T,
142142
) => void | Promise<void>
143143

144144
// Type guard for Error
145-
export function isError(value: unknown): value is Error {
145+
function isError(value: unknown): value is Error {
146146
return value instanceof Error
147147
}
148148

@@ -170,12 +170,12 @@ export function isErrnoException(value: unknown): value is NodeJS.ErrnoException
170170
}
171171

172172
// Safe array access helper
173-
export function safeGet<T>(arr: T[], index: number): T | undefined {
173+
function safeGet<T>(arr: T[], index: number): T | undefined {
174174
return arr[index]
175175
}
176176

177177
// Assert defined helper
178-
export function assertDefined<T>(value: T | undefined | null, message: string): T {
178+
function assertDefined<T>(value: T | undefined | null, message: string): T {
179179
if (value === undefined || value === null) {
180180
throw new Error(message)
181181
}

0 commit comments

Comments
 (0)