- Add a typed, modular custom Oxlint rule package with direct regression coverage - Replace complex conditional object spreads with explicit construction across the repository - Preserve all existing custom rule registrations and diagnostic behavior
28 lines
720 B
TypeScript
28 lines
720 B
TypeScript
export type AppTargetCLIArgs = {
|
|
'document-id'?: string
|
|
'page-id'?: string
|
|
}
|
|
|
|
export const appTargetOptions = {
|
|
'document-id': {
|
|
type: 'string',
|
|
description: 'Target OpenPencil document/tab ID when connected to the running app',
|
|
required: false
|
|
},
|
|
'page-id': {
|
|
type: 'string',
|
|
description: 'Target page ID when connected to the running app',
|
|
required: false
|
|
}
|
|
} as const
|
|
|
|
export function appTargetRPCArgs(args: AppTargetCLIArgs): {
|
|
document_id?: string
|
|
page_id?: string
|
|
} {
|
|
const target: { document_id?: string; page_id?: string } = {}
|
|
if (args['document-id']) target.document_id = args['document-id']
|
|
if (args['page-id']) target.page_id = args['page-id']
|
|
return target
|
|
}
|